Skip to content

Reason Network: your team's coding agents, talking to each other. The engine behind `reason network`.

The plugin brings tincan's tools, not just the skill

Lars Talian2bb7707c702b
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index d274706..497fcd7 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -8,7 +8,7 @@
{
"name": "tincan",
"source": "./plugins/tincan",
- "description": "How to use tincan: joining a team, finding the right teammate's agent, and messaging it.",
+ "description": "Your agents, talking to your teammates' agents: tincan's tools and skill for Claude Code.",
"homepage": "https://larstalian.github.io/tincan"
}
]
diff --git a/DESIGN.md b/DESIGN.md
index 0d26b58..f08a58e 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -240,7 +240,8 @@ edits): Claude Code plugin or `claude mcp add --scope user` + hooks, `~/.codex/c
`tincan setup [--remove]`, launchd/systemd service, `tincan doctor`. Amp: MCP only, by hand.
- **M3, ship** (done, pending a first tagged release): GitHub Actions builds for macOS and Linux, `install.sh`
(install and join in one line), GitHub Pages site. Later: Homebrew. The repo is a Claude Code
- plugin marketplace whose plugin carries the skill (`plugins/tincan/skills/tincan/SKILL.md`, also on the site).
+ plugin marketplace: its plugin brings the MCP server (installing tincan first if needed; `tincan setup` then
+ leaves Claude Code alone) and the skill (`plugins/tincan/skills/tincan/SKILL.md`, also on the site).
- **M4, team features**: file-overlap warnings ("bob/api-codex is also editing src/auth.rs", from
`PostToolUse` edit paths), anchor mailbox and history, hold/approve notifications, web dashboard.
diff --git a/README.md b/README.md
index 181035f..9cf8f6d 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,10 @@ On Windows, in PowerShell:
irm https://larstalian.github.io/tincan/install.ps1 | iex
```
-You get a team link (it's on your clipboard). Send it to your friends: they open it, paste one command, type
+Or in Claude Code (macOS and Linux): `/plugin marketplace add larstalian/tincan`, `/plugin install tincan@tincan`,
+restart, and ask Claude to start or join a team.
+
+You get a team link (it's on your clipboard). Send it to your teammates: they open it, paste one command, type
their name, and they're in. Or they just tell their agent "join my tincan team: <link>".
That's it. Ask any agent "who's on the team?", or tell it to ask someone's agent something.
@@ -45,9 +48,6 @@ tincan link # the team link again
tincan setup # which agents are on tincan, and how messages are handled
```
-In Claude Code, `/plugin marketplace add larstalian/tincan` and `/plugin install tincan@tincan` add the tincan
-skill too: how to join, and how to pick the one session to message.
-
## How it works
Each machine runs a small daemon. Teammates' machines connect directly (on the same Wi-Fi, or through the
diff --git a/plugins/tincan/.claude-plugin/plugin.json b/plugins/tincan/.claude-plugin/plugin.json
index 636c758..f5fdd71 100644
--- a/plugins/tincan/.claude-plugin/plugin.json
+++ b/plugins/tincan/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "tincan",
- "description": "How to use tincan: joining a team, finding the right teammate's agent, and messaging it. The tools themselves come from `tincan setup`.",
+ "description": "Your agents, talking to your teammates' agents. Installs tincan if needed, adds its tools, and the skill for joining a team and messaging the right session. macOS and Linux.",
"author": {
"name": "Lars Talian"
},
diff --git a/plugins/tincan/.mcp.json b/plugins/tincan/.mcp.json
new file mode 100644
index 0000000..73b47a0
--- /dev/null
+++ b/plugins/tincan/.mcp.json
@@ -0,0 +1,8 @@
+{
+ "mcpServers": {
+ "tincan": {
+ "command": "sh",
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/tincan-mcp"]
+ }
+ }
+}
diff --git a/plugins/tincan/scripts/tincan-mcp b/plugins/tincan/scripts/tincan-mcp
new file mode 100755
index 0000000..851868f
--- /dev/null
+++ b/plugins/tincan/scripts/tincan-mcp
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Claude Code starts tincan's MCP server with this, installing tincan first on a machine that doesn't have it.
+# Standard output is the MCP connection, so anything else goes to standard error.
+bin="$HOME/.local/bin/tincan"
+[ -x "$bin" ] || bin="$(command -v tincan 2>/dev/null)"
+if [ -z "$bin" ]; then
+ curl -fsSL https://larstalian.github.io/tincan/install.sh | TINCAN_NO_PROMPT=1 sh >&2 || exit 1
+ bin="$HOME/.local/bin/tincan"
+fi
+exec "$bin" mcp
diff --git a/plugins/tincan/skills/tincan/SKILL.md b/plugins/tincan/skills/tincan/SKILL.md
index 0a25947..ce5c725 100644
--- a/plugins/tincan/skills/tincan/SKILL.md
+++ b/plugins/tincan/skills/tincan/SKILL.md
@@ -8,10 +8,12 @@ description: Talk with your team's coding agents over tincan. See who is working
tincan connects coding agents across a team's machines. Every session on every teammate's machine shows up in a
live directory, and any of them can message another. You use it through the `tincan` command.
-## Not installed yet?
+## Joining or starting a team
If your user gave you a team link (`https://…/tincan/join/#tincan1…`), ask what name teammates should see (for
-your user's own cloud agent, their own name), then run, with the whole link exactly as given:
+your user's own cloud agent, their own name). If `tincan` is installed (the tincan plugin for Claude Code installs
+it), run `tincan join '<the whole link>' --as <name>`. Otherwise install and join in one go, with the whole link
+exactly as given:
```sh
curl -fsSL https://larstalian.github.io/tincan/install.sh | sh -s -- '<the whole link>' --as <name>
@@ -23,6 +25,8 @@ On Windows:
powershell -c "& ([scriptblock]::Create((irm https://larstalian.github.io/tincan/install.ps1))) '<the whole link>' --as <name>"
```
+To start a team instead: `tincan init <team> --as <name>`, then `tincan link` prints the link for teammates.
+
## Commands
- `tincan who`: every person, machine and session, with what each is working on.
@@ -34,17 +38,9 @@ powershell -c "& ([scriptblock]::Create((irm https://larstalian.github.io/tincan
## Picking the recipient
-Each message interrupts, and usually wakes, someone else's agent, so it goes to the one session that owns what
-you need. Narrow `tincan who` (or `list_team`) down until one session is left:
-
-1. The repo the question is about (an API question goes to the API repo, not yours).
-2. The branch with the change.
-3. What it is doing: its title or current task.
-4. The person your user named.
-5. Busy over idle, recently active over long idle.
-
-Still more than one? Ask your user which. None? Don't send; tell your user who is around. Never send to all of
-someone's sessions to find the right one.
+Each message interrupts someone else's agent, so send to the one session that owns what you need. Narrow
+`tincan who` (or `list_team`) by the repo the question is about, then the branch, then what each is doing, then
+the person your user named. Still more than one? Ask your user which. None? Tell your user who is around instead.
## How to behave
diff --git a/src/claude.rs b/src/claude.rs
index 3aa2c10..698b0f5 100644
--- a/src/claude.rs
+++ b/src/claude.rs
@@ -52,8 +52,8 @@ impl ClaudeSession {
}
}
-/// Whether tincan is one of Claude Code's MCP servers here (`tincan setup` chose Claude Code). Read once: the
-/// daemon restarts after setup.
+/// Whether tincan is one of Claude Code's MCP servers here (`tincan setup` chose Claude Code, or the tincan plugin
+/// is on). Read once: the daemon restarts after setup.
pub fn wired() -> bool {
static WIRED: std::sync::OnceLock<bool> = std::sync::OnceLock::new();
*WIRED.get_or_init(|| {
@@ -61,13 +61,22 @@ pub fn wired() -> bool {
Some(dir) => std::path::PathBuf::from(dir).join(".claude.json"),
None => paths::user_home().join(".claude.json"),
};
- std::fs::read(file)
- .ok()
- .and_then(|b| serde_json::from_slice::<serde_json::Value>(&b).ok())
- .is_some_and(|v| v["mcpServers"]["tincan"].is_object())
+ json(&file).is_some_and(|v| v["mcpServers"]["tincan"].is_object()) || plugin()
})
}
+/// Whether Claude Code has the tincan plugin on, which brings its own tincan MCP server. (Its launcher is a shell
+/// script: macOS and Linux.)
+pub fn plugin() -> bool {
+ cfg!(unix)
+ && json(&paths::claude_dir().join("settings.json"))
+ .is_some_and(|v| v["enabledPlugins"]["tincan@tincan"] == true)
+}
+
+fn json(file: &std::path::Path) -> Option<serde_json::Value> {
+ serde_json::from_slice(&std::fs::read(file).ok()?).ok()
+}
+
/// The messaging socket of a live session, by its id or process.
pub fn socket_for(session_id: Option<&str>, pid: Option<u32>) -> Option<ClaudeSocket> {
let c = scan().into_iter().find(|c| {
diff --git a/src/setup.rs b/src/setup.rs
index 7ca2d9d..f094a6a 100644
--- a/src/setup.rs
+++ b/src/setup.rs
@@ -178,7 +178,9 @@ fn claude(exe: &Path, remove: bool, dry: bool) -> Result<Option<Report>> {
let mut r = Report { agent: "Claude Code", lines: Vec::new(), notes: Vec::new() };
let get = Command::new(&bin).args(["mcp", "get", "tincan"]).stdin(std::process::Stdio::null()).output()?;
let existing = get.status.success();
- let current = existing && String::from_utf8_lossy(&get.stdout).contains(&exe.display().to_string());
+ // The tincan plugin brings its own server: a second one would show every tool twice.
+ let plugin = !remove && crate::claude::plugin();
+ let current = existing && !plugin && String::from_utf8_lossy(&get.stdout).contains(&exe.display().to_string());
if remove || (existing && !current) {
if existing && !dry {
Command::new(&bin)
@@ -191,7 +193,9 @@ fn claude(exe: &Path, remove: bool, dry: bool) -> Result<Option<Report>> {
return Ok(Some(r));
}
}
- if current {
+ if plugin {
+ r.lines.push("set up by the tincan plugin".into());
+ } else if current {
r.lines.push("tincan MCP server already set".into());
} else {
if !dry {
@@ -732,13 +736,14 @@ const AGENTS: [Agent; 8] = [
hint: "messages arrive instantly",
installed: || agent::find_bin("claude").is_some(),
wired: |_| {
- agent::find_bin("claude").is_some_and(|b| {
- Command::new(b)
- .args(["mcp", "get", "tincan"])
- .stdin(std::process::Stdio::null())
- .output()
- .is_ok_and(|o| o.status.success())
- })
+ crate::claude::plugin()
+ || agent::find_bin("claude").is_some_and(|b| {
+ Command::new(b)
+ .args(["mcp", "get", "tincan"])
+ .stdin(std::process::Stdio::null())
+ .output()
+ .is_ok_and(|o| o.status.success())
+ })
},
apply: claude,
},