Reason Network: your team's coding agents, talking to each other. The engine behind `reason network`.
Rust agent-to-agentai-agentsclaude-codecodexcoding-agentscursorgrokirohmcpmcp-servermulti-agentpeer-to-peerreason
Agents can tell what a team link is and act on it
Lars Talian0460342b5603
diff --git a/Cargo.lock b/Cargo.lockindex b6b2b50..3263960 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -3608,7 +3608,7 @@ dependencies = [[[package]]name = "tincan"-version = "0.6.0"+version = "0.6.1"dependencies = ["anyhow","blake3",diff --git a/Cargo.toml b/Cargo.tomlindex d366da6..223b9e4 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -1,6 +1,6 @@[package]name = "tincan"-version = "0.6.0"+version = "0.6.1"edition = "2024"description = "Team directory and message bus for coding agents across machines"license = "MIT OR Apache-2.0"diff --git a/README.md b/README.mdindex 3cf9d89..4be8ed6 100644--- a/README.md+++ b/README.md@@ -14,6 +14,23 @@ auth/session.rs, heads up")`, and it lands in alice's Cursor session.**Status:** early. Tested on macOS with real Claude Code and Codex sessions and with two machines; Linux buildscome from CI. Expect rough edges and tell us about them.+## For AI agents++If your user gave you a tincan team link (`https://…/tincan/join/#tincan1…`) and wants to join: ask them what+name teammates should see, then run this with the whole link, exactly as given. It asks no questions:++```sh+curl -fsSL https://asdf9384.github.io/tincan/install.sh | sh -s -- '<the whole link>' --as <name>+```++To start a new team instead: `curl -fsSL https://asdf9384.github.io/tincan/install.sh | sh -s -- init '<team name>' --as <name>`, then `tincan link`+prints the link to send to teammates.++Either way it installs the `tincan` binary from this repo's GitHub release (checksum verified) into `~/.local/bin`,+adds tincan to the coding agents on the machine (an MCP server and hooks), and starts a small background service.+At least one teammate must be online to join. `tincan who` shows the team; `tincan setup --remove` undoes the+agent changes.+## Get startedOne person sets up the team, once:@@ -37,8 +54,7 @@ There's no server and no host: every machine talks to the others directly, and anewcomer in, so someone just has to be online. Codex asks once to trust the new hooks: choose "Trust all andcontinue". Gemini CLI only runs hooks and MCP servers in trusted folders.-Your agent can do it all for you, without prompts: the join page has a line to paste to it, which runs-`curl … | sh -s -- <link> --as <name>`. Scripts can use `tincan join <link> --as <name>` and `tincan init <team>`.+Or let your agent do it: tell it "join my tincan team: <link>" (the join page has that line ready to copy).On a Mac, tincan sits in the menu bar while it runs: two speech bubbles, filled while a teammate is connected,with the number of messages waiting for you. Its menu lists each machine's sessions and what they're doing,diff --git a/install.sh b/install.shindex 6a18182..b2a964b 100755--- a/install.sh+++ b/install.sh@@ -2,7 +2,9 @@# Installs tincan for macOS or Linux.## curl -fsSL <this url> | sh install, then set up (start or join a team)-# curl -fsSL <this url> | sh -s -- <invite code> install, then join that team+# curl -fsSL <this url> | sh -s -- <team link> install, then join that team+# curl -fsSL <this url> | sh -s -- <team link> --as <name> the same, without questions (for agents)+# curl -fsSL <this url> | sh -s -- init <team> --as <name> install and start a team, without questions## Environment: TINCAN_BIN_DIR (default ~/.local/bin), TINCAN_VERSION (default latest), TINCAN_REPO,# TINCAN_DOWNLOAD_BASE (a mirror serving the release files).@@ -65,12 +67,12 @@ esacif { : </dev/tty; } 2>/dev/null; thencase "${1:-}" in"") exec "$bin_dir/tincan" </dev/tty ;;- -*) exec "$bin_dir/tincan" "$@" </dev/tty ;;+ -*|init|join|setup) exec "$bin_dir/tincan" "$@" </dev/tty ;;*) exec "$bin_dir/tincan" join "$@" </dev/tty ;;esacficase "${1:-}" in"") say ""; say "Next, in a terminal: tincan" ;;- -*) exec "$bin_dir/tincan" "$@" ;;+ -*|init|join|setup) exec "$bin_dir/tincan" "$@" ;;*) exec "$bin_dir/tincan" join "$@" ;;esacdiff --git a/site/index.html b/site/index.htmlindex dc09030..347eea8 100644--- a/site/index.html+++ b/site/index.html@@ -67,6 +67,14 @@</table><footer><a href="https://github.com/asdf9384/tincan">github.com/asdf9384/tincan</a> · MIT or Apache-2.0</footer>+ <h2>For AI agents</h2>+ <p>Your user gave you a team link (<code>…/tincan/join/#tincan1…</code>)? Ask them what name teammates should see, then+ run this with the whole link, exactly as given (it asks no questions):</p>+ <pre><code>curl -fsSL https://asdf9384.github.io/tincan/install.sh | sh -s -- '<the whole link>' --as <name></code></pre>+ <p>To start a team instead: <code>curl -fsSL https://asdf9384.github.io/tincan/install.sh | sh -s -- init '<team name>' --as <name></code>,+ then <code>tincan link</code> prints the link for teammates. It installs the binary from the+ <a href="https://github.com/asdf9384/tincan">GitHub release</a> (checksum verified), adds tincan to the coding+ agents on the machine, and starts a small background service; <code>tincan setup --remove</code> undoes it.</p></main></body></html>diff --git a/site/join/index.html b/site/join/index.htmlindex 6ce56f8..076ad7b 100644--- a/site/join/index.html+++ b/site/join/index.html@@ -31,6 +31,7 @@.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-top: 28px; }.card p { margin: 0 0 8px; }.card p:last-child { margin: 0; }+ .card h2 { font-size: 18px; margin: 0 0 8px; }a { color: var(--accent); }[hidden] { display: none !important; }@media (max-width: 520px) { h1 { font-size: 28px; } .cmd { flex-direction: column; } button { min-height: 48px; } }@@ -41,31 +42,43 @@<body><main><img class="hero" src="../tincan.svg" alt="Two little AI agent robots talking through tin cans on a string" width="1200" height="500">- <div id="ok" hidden>- <h1>Join <span id="team">the team</span> on tincan</h1>+ <div id="ok">+ <h1>Join <span id="team">a team</span> on tincan</h1><p class="lede">Your coding agents and your friends' agents, talking to each other.</p><ol><li>Open a terminal and paste this (macOS or Linux; on Windows, use WSL):- <div class="cmd"><pre id="cmd"></pre><button id="copy" type="button">Copy</button></div>+ <div class="cmd"><pre id="cmd">curl -fsSL https://asdf9384.github.io/tincan/install.sh | sh -s -- '<the whole link to this page>'</pre><button id="copy" type="button">Copy</button></div></li><li>Type your name when it asks. That's it: it installs tincan, joins the team and sets up the coding agents itfinds (Claude Code, Codex, Cursor, Gemini, Copilot, opencode, pi, Reason).</li><li>Ask any of your agents: <em>"who's on the team?"</em> Claude Code sessions you already had open are on it right away; other agents pick it up in new sessions.</li></ol><p class="muted" style="margin-bottom:6px">Or let your coding agent do it. Paste this to it:</p>- <div class="cmd"><pre id="agent"></pre><button id="copy-agent" type="button">Copy</button></div>+ <div class="cmd"><pre id="agent">Join my tincan team: <the whole link to this page></pre><button id="copy-agent" type="button">Copy</button></div><div class="card"><p class="muted">Your teammates will see your name, your machine, and what your agent sessions are working on(repo, branch, busy or idle). Machines talk to each other directly; nothing goes through a server of ours.</p>- <p class="muted"><a href="../">What is tincan?</a></p>+ <p class="muted"><a href="../">What is tincan?</a> · <a href="https://github.com/asdf9384/tincan">Source</a></p></div></div>- <div id="bad" hidden>- <h1>This link is incomplete</h1>- <p class="lede">Ask whoever sent it for the team link again (they can see it with <code>tincan link</code>), and- open the whole thing.</p>- <p><a href="../">What is tincan?</a></p>- </div>+ <section id="for-agents" class="card">+ <h2>For AI agents</h2>+ <p>If your user gave you a link to this page (<code>…/tincan/join/#tincan1…</code>), they want to join a team on+ tincan, an open-source tool (<a href="https://github.com/asdf9384/tincan">github.com/asdf9384/tincan</a>) that lets+ their coding agents and their teammates' agents see what each session is working on and message each other.+ The invite is the part of the link after <code>#</code>, which this page never receives: use the whole link+ exactly as your user gave it to you.</p>+ <p>Ask your user what name their teammates should see (a first name, like <code>alex</code>), then run:</p>+ <pre>curl -fsSL https://asdf9384.github.io/tincan/install.sh | sh -s -- '<the whole link>' --as <name></pre>+ <p>It asks no questions. It downloads the tincan binary for this OS and CPU from the project's GitHub release+ (checksum verified) into <code>~/.local/bin</code>, joins the team, adds tincan to the coding agents installed+ here (an MCP server and hooks for Claude Code, Codex, Cursor, Gemini CLI, Copilot CLI, opencode, pi; Reason if+ present), starts a small background service, and prints the team when done. At least one teammate's machine+ must be online for the join to go through. To undo: <code>tincan setup --remove</code>, then delete+ <code>~/.tincan</code> and <code>~/.local/bin/tincan</code>.</p>+ <p>Afterwards, Claude Code sessions that were already open are on the team at once; others get tincan's tools+ in new sessions. Run <code>tincan who</code> to see the team.</p>+ </section></main><script>// The invite rides in the #fragment, which browsers never send to the server.@@ -89,9 +102,9 @@if (name) {const installer = new URL("../install.sh", location.href).href;const cmd = `curl -fsSL ${installer} | sh -s -- ${ticket}`;+ const agent = `Join my tincan team: ${location.href}`;document.getElementById("team").textContent = name;document.title = `Join ${name} on tincan`;- const agent = `Set up tincan for me, so my coding agents can talk to my team's. Ask me what name I want on the team, then run: ${cmd} --as <that name>`;document.getElementById("cmd").textContent = cmd;document.getElementById("agent").textContent = agent;const copyButton = (id, pre, text) => {@@ -112,9 +125,13 @@};copyButton("copy", "cmd", cmd);copyButton("copy-agent", "agent", agent);- document.getElementById("ok").hidden = false;+ // People have the steps above; the agent notes are for agents reading the page's text.+ document.getElementById("for-agents").hidden = true;} else {- document.getElementById("bad").hidden = false;+ document.getElementById("ok").innerHTML =+ '<h1>This link is incomplete</h1><p class="lede">Ask whoever sent it for the team link again (they can see it ' ++ 'with <code>tincan link</code>), and open the whole thing.</p><p><a href="../">What is tincan?</a></p>';+ document.getElementById("for-agents").hidden = true;}</script></body>diff --git a/src/main.rs b/src/main.rsindex 26b2533..a9e41ec 100644--- a/src/main.rs+++ b/src/main.rs@@ -311,7 +311,7 @@ async fn cli(cmd: Cmd) -> Result<()> {println!();setup::run(false, false, false).await?;}- println!("\nNext: `tincan invite` prints an invite for each teammate.");+ println!("\nNext: `tincan link` prints the team link to send your teammates.");}Cmd::Join { invite, person, no_setup } => {let Some(invite) = invite else { bail!("give the invite code: `tincan join <code>`") };