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
Reason Network 0.10.1: renamed throughout, state in ~/.reason/network
reason-machines[bot]787e43381604
diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.ymldeleted file mode 100644index da6a374..0000000--- a/.github/ISSUE_TEMPLATE/bug.yml+++ /dev/null@@ -1,21 +0,0 @@-name: Bug-description: Something in tincan doesn't work-labels: [bug]-body:- - type: textarea- attributes:- label: What happened, and what you expected- validations:- required: true- - type: textarea- attributes:- label: tincan doctor- description: The output of `tincan doctor` on the machine with the problem (and the other machine, if it's about two).- render: text- - type: input- attributes:- label: Setup- description: tincan version (`tincan --version`), OS, and the coding agents involved.- placeholder: tincan 0.9.0, macOS 15, Claude Code and Codex- validations:- required: truediff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.ymldeleted file mode 100644index 6b5f1c6..0000000--- a/.github/ISSUE_TEMPLATE/config.yml+++ /dev/null@@ -1,4 +0,0 @@-contact_links:- - name: Questions and ideas- url: https://github.com/larstalian/tincan/discussions- about: Ask, or share an idea before building it.diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 80de42c..e479562 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -22,8 +22,6 @@ jobs:- { target: aarch64-unknown-linux-musl, os: ubuntu-24.04-arm }runs-on: ${{ matrix.os }}env:- # The site team links and the installer point at; set the repo variable once the domain is live.- TINCAN_SITE_URL: ${{ vars.TINCAN_SITE_URL }}# Windows builds carry their C runtime, so they run without the Visual C++ redistributable.RUSTFLAGS: ${{ contains(matrix.target, 'windows') && '-C target-feature=+crt-static' || '' }}steps:diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 4ab2ad9..eb74241 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -1,34 +1,14 @@# Contributing-Thanks for helping. tincan tries to stay small and to just work: a change that removes code or a step is worth more-than a new option. For anything bigger than a fix, open an [issue](https://github.com/larstalian/tincan/issues) or a-[discussion](https://github.com/larstalian/tincan/discussions) first so we can agree on the shape.-[Good first issues](https://github.com/larstalian/tincan/labels/good%20first%20issue) are a place to start, and-[DESIGN.md](DESIGN.md) explains how the pieces fit.--## Build and test--```sh-cargo fmt && cargo clippy --all-targets -- -D warnings && cargo test-cargo build && python3 tests/e2e/two_machines.py # two machines over iroh (needs internet)-python3 tests/e2e/hooks.py && python3 tests/e2e/guided.py-```--The e2e tests start their own daemons with their own `TINCAN_HOME`, so they leave an installed tincan alone. Run-them from a plain terminal: inside a Claude Code session, two_machines.py also delivers its test messages into that-session.--## Pull requests+Reason Network tries to stay small and to just work: a change that removes code or a step is worth more than a new+option. [DESIGN.md](DESIGN.md) explains how the pieces fit, and the README says how to build and test.- One change per pull request, saying what it changes and why. CI runs fmt, clippy and the tests on Linux, macOS andWindows.- Match the code around you: plain names, few comments, and comments that say why.+- Never change the wire identifiers in `src/net.rs`, `src/team.rs` and `src/invite.rs`: every peer speaks them.- Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you,as defined in the Apache-2.0 license, shall be dual licensed as MIT OR Apache-2.0, without any additional terms orconditions.Security issues go through private reporting instead: see [SECURITY.md](SECURITY.md).--## Releasing--Push a `v*` tag. A tag with a dash (`v1.2.0-rc.1`) makes a test release that installs and auto-updates never pick.diff --git a/Cargo.lock b/Cargo.lockindex 0a4a055..e58dbbc 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -2821,7 +2821,7 @@ dependencies = [[[package]]name = "reason-network"-version = "0.10.0"+version = "0.10.1"dependencies = ["anyhow","blake3",diff --git a/Cargo.toml b/Cargo.tomlindex a2d84a6..8dfefd3 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -1,8 +1,8 @@[package]name = "reason-network"-version = "0.10.0"+version = "0.10.1"edition = "2024"-description = "The engine behind reason ask: team directory and message bus for coding agents across machines (a modified tincan)"+description = "Reason Network: the team directory and message bus behind reason network, for coding agents across machines"license = "MIT OR Apache-2.0"repository = "https://github.com/reason-machines/reason-network"publish = falsediff --git a/DESIGN.md b/DESIGN.mdindex 092a96a..cf2370f 100644--- a/DESIGN.md+++ b/DESIGN.md@@ -1,4 +1,4 @@-# tincan design+# Reason Network designA team directory and message bus for coding agents. Any agent (Claude Code, Codex, Cursor, Gemini CLI,opencode, Copilot CLI, Amp, …) on any teammate's machine can see who is working on what, right now, and@@ -55,23 +55,23 @@ unread mail**, so "tell the api agent X" survives restarts (idea from agentbus).```┌─ machine: alex-mbp ───────────────────────────────────────────┐-│ claude ── tincan mcp ──┐ │-│ codex ── tincan mcp ──┤ unix socket ┌──────────────┐ │ iroh QUIC (ed25519-authenticated)-│ cursor ── tincan mcp ──┼──────────────────▶ │ tincan daemon │◀──┼──▶ direct on LAN (mDNS)-│ hooks: tincan hook … ──┘ ~/.tincan/sock │ SQLite │ │ hole-punched over internet-│ you: tincan who/send ──────────────────▶ └──────────────┘ │ relay fallback over HTTPS :443+│ claude ── reason-network mcp ──┐ │+│ codex ── reason-network mcp ──┤ unix socket ┌──────────────┐ │ iroh QUIC (ed25519-authenticated)+│ cursor ── reason-network mcp ──┼──────────────────▶ │ Reason Network daemon │◀──┼──▶ direct on LAN (mDNS)+│ hooks: reason-network hook … ──┘ ~/.reason/network/sock │ SQLite │ │ hole-punched over internet+│ you: Reason Network who/send ──────────────────▶ └──────────────┘ │ relay fallback over HTTPS :443└───────────────────────────────────────────────────────────────┘```-One static Rust binary, `tincan`, with subcommands:+One static Rust binary, `Reason Network`, with subcommands:-- `tincan daemon`: per machine. Owns the iroh endpoint, roster, directory, mailboxes (SQLite). Started on+- `reason network daemon`: per machine. Owns the iroh endpoint, roster, directory, mailboxes (SQLite). Started ondemand by any other subcommand, or installed as a launchd/systemd user service (on Windows, started at logonfrom the user's Run key; there the local socket is a named pipe).-- `tincan mcp`: stdio MCP server spawned by the agent. Thin client of the daemon. **Must handle many+- `reason network mcp`: stdio MCP server spawned by the agent. Thin client of the daemon. **Must handle manysessions per process**: Codex, opencode and Cursor share one MCP process across threads/tabs.-- `tincan hook <agent>`: hook handler (status, context injection, stop-continuation, wake).-- `tincan who | send | listen | status | init | invite | join | setup | doctor`: the CLI. `send` goes out as+- `reason network hook <agent>`: hook handler (status, context injection, stop-continuation, wake).+- `reason network who | send | listen | status | init | invite | join | setup | doctor`: the CLI. `send` goes out asthe agent session whose shell runs it, `--from <session>`, or from a plain terminal as `<you>/terminal`;`listen --as <name>` waits for the next message to `<you>/<name>`.@@ -81,14 +81,14 @@ SDK) both exist and work today. Zig has neither, which is why agent-rpc's MCP sh## Network layer (M1)**Transport: iroh 1.3.** Each daemon is an iroh `Endpoint` with a persistent secret key-(`~/.tincan/machine.key`). Peers are dialed by `EndpointId`; iroh resolves addresses via n0 DNS/pkarr, finds+(`~/.reason/network/machine.key`). Peers are dialed by `EndpointId`; iroh resolves addresses via n0 DNS/pkarr, findsLAN peers with `iroh-mdns-address-lookup` (works with no internet), hole-punches, and falls back to a relayover HTTPS. Default relays are n0's public ones (they only see encrypted QUIC). A team can set its own relay-(`tincan relay <url>` or `tincan init --relay <url>`; the `iroh-relay` binary on any VPS, Let's Encrypt on :443,+(`reason network relay <url>` or `reason network init --relay <url>`; the `iroh-relay` binary on any VPS, Let's Encrypt on :443,access limited to the roster's endpoint ids). Then its machines never contact n0: they use only that relay(teammates are dialed through it) and mDNS on the LAN, and invites come in the long form, since a four-word code-needs n0's lookup. A machine that was off while the team switched relays can't find it on its own; `tincan doctor`-there says to set the same relay with `tincan relay`.+needs n0's lookup. A machine that was off while the team switched relays can't find it on its own; `reason network doctor`+there says to set the same relay with `reason network relay`.That is the "HTTPS and local network, MagicDNS style" requirement with one stack and no server we must run.**Roster (membership).** Replicated to every machine, every entry signed by a member machine's key:@@ -109,9 +109,9 @@ that was removed while away is first sent the state that says so; strangers lear**Invites.** The main way in is the **team link**: `https://<site>/join/#<ticket>`, where the ticket packs theteam id, the team link's secret, the inviting machine's relay and LAN address hints, and up to six members' keys.The link secret is a reusable invite in the team state (any member can show the link and any online member can-redeem it), replaced with `tincan link --new` and whenever someone is removed; removed machines are never sent it.+redeem it), replaced with `reason network link --new` and whenever someone is removed; removed machines are never sent it.The page shows one command (`curl … install.sh | sh -s -- <ticket>`); the joiner only types a name. Four-word-one-time codes (`tincan invite --code`, ~41 bits) derive a temporary iroh key the inviting machine listens on, for+one-time codes (`reason network invite --code`, ~41 bits) derive a temporary iroh key the inviting machine listens on, forreading out loud or adding your own machines.**Presence and directory.** Daemons keep a connection to every online member (full mesh; fine to ~50@@ -130,7 +130,7 @@ also holds mail for offline machines and keeps searchable team history. Same bin## Local layer (M0)-**Daemon API**: newline-delimited JSON over `~/.tincan/tincan.sock` (mode 0600). Requests carry an `id`; a+**Daemon API**: newline-delimited JSON over `~/.reason/network/network.sock` (mode 0600). Requests carry an `id`; asession connection also receives pushed `deliver` events for its sessions.**Session registration**, by priority:@@ -159,10 +159,10 @@ The hard part. Each session advertises a **delivery tier** so senders know when| Claude Code | push | MCP child posts to the session's own inbox socket (`CLAUDE_CODE_MESSAGING_SOCKET`, `{"type":"user",…}` frame): delivered between tool calls, starts a turn if idle. Fallbacks: `asyncRewake` hook (documented idle wake), channels (`notifications/claude/channel`, needs a dev flag until allowlisted). || Codex | push | `codex queue --thread <id>` / app-server `turn/start` (default daemon mode). Mid-turn: `PostToolUse` `additionalContext`. Stop: `decision:block`. Hooks need one-time approval in `/hooks`. || opencode | push | Plugin: `client.session.promptAsync` (V1), `POST /api/session/:id/prompt` via `service.json` (V2). |-| pi | push | Extension (`~/.pi/agent/extensions/tincan.ts`): registers the MCP server per session (`deferred`, with `TINCAN_SESSION`), `sendUserMessage` (`deliverAs: "steer"` mid-run, a new turn when idle), busy/idle from `agent_start`/`agent_settled`, the session name as `doing`. |-| Reason | push | Its agent runs in Reason's cloud: the daemon lists live sessions (`reason session list --json`, when `reason = true`) and sends with `reason session send`. Replies go through the CLI: `tincan send <to> --from <its address>`. |+| pi | push | Extension (`~/.pi/agent/extensions/reason-network.ts`): registers the MCP server per session (`deferred`, with `REASON_NETWORK_SESSION`), `sendUserMessage` (`deliverAs: "steer"` mid-run, a new turn when idle), busy/idle from `agent_start`/`agent_settled`, the session name as `doing`. |+| Reason | push | Its agent runs in Reason's cloud: the daemon lists live sessions (`reason session list --json`, when `reason = true`) and sends with `reason session send`. Replies go through the CLI: `reason network send <to> --from <its address>`. || Amp | push | Plugin: `thread.appendUserMessage(…, {steer:true})`. |-| Cursor | turn | `postToolUse` `additional_context`; `stop` `followup_message`. Idle: background `tincan wait`. |+| Cursor | turn | `postToolUse` `additional_context`; `stop` `followup_message`. Idle: background `reason network wait`. || Gemini CLI | turn | `AfterTool` `additionalContext`; `AfterAgent` block. Idle: experimental background-shell inject. || Copilot CLI | turn | `postToolUse` `additionalContext`; `agentStop` block; `notification` hook. || any MCP client | pull | Tools + unread notice on every tool result + `check_inbox(wait_secs)` long-poll. |@@ -170,7 +170,7 @@ The hard part. Each session advertises a **delivery tier** so senders know whenMCP notifications are not a delivery path: no client passes them to the model (checked Oct 2026).Gotcha: Cursor, Copilot CLI and Devin load **Claude Code's** hooks from `~/.claude/settings.json`, so-`tincan hook` must detect which agent is actually calling it.+`reason network hook` must detect which agent is actually calling it.## What the agent sees@@ -183,20 +183,20 @@ Three tools, none of which an agent has to call unless it wants to message someoprompts it". `wake:false` = FYI, read at the next natural pause.- `check_inbox(wait_secs?)`: unread messages; can block waiting for a reply.-Agents never report what they are doing; tincan reads it from what they record anyway (`doing.rs`): the+Agents never report what they are doing; Reason Network reads it from what they record anyway (`doing.rs`): thesession's title (Claude Code's `ai-title` transcript entries, Codex's thread names in`~/.codex/session_index.jsonl`, opencode's session title) and the task in progress on its own todo list(Claude Code's `~/.claude/tasks/<session>/`, TodoWrite, Codex's `update_plan`, Gemini's `write_todos`,Cursor's `todo_write`, opencode's todos). Transcripts come from hooks (`transcript_path`) or, for Claude Code,from its session id; only what was appended since the last look is read. A Claude Code session renamed with-`/rename` keeps that name on tincan.+`/rename` keeps that name on Reason Network.Incoming messages are framed as peer input, never as the user:```-<tincan-message from="alice/api-cursor" agent="cursor" repo="acme/api" id="01JA…">+<reason-message from="alice/api-cursor" agent="cursor" repo="acme/api" id="01JA…">Did you change the session token format? My tests started failing on refresh.-</tincan-message>+</reason-message>From alice's agent. Reply if useful with send_message to "alice/api-cursor".```@@ -209,7 +209,7 @@ not approve. Nothing changes how an agent works when it isn't messaging.- Only roster machines can connect (iroh handshake proves the key; hook rejects the rest).- Peer text is framed as peer input. Agents are told not to treat it as user instructions.- Per-machine inbound policy: `accept` (default within the team), `hold` (you approve with- `tincan held` / `tincan approve`), `refuse`; overridable per person. Claude Code adds its own+ `reason network held` / `reason network approve`), `refuse`; overridable per person. Claude Code adds its own`crossSessionInbound` setting on top.- Loop guard: rate limit per sender, and a cap on consecutive agent↔agent messages in a thread withoutany human input.@@ -220,15 +220,15 @@ not approve. Nothing changes how an agent works when it isn't messaging.```shcurl -fsSL https://…/install.sh | sh # dist-built static binary; also Homebrew-tincan init vibes --as alex # first person: creates the team-tincan invite # prints: tincan join cm1…-tincan join cm1… --as alice # friends: joins, installs service, wires up agents+Reason Network init vibes --as alex # first person: creates the team+Reason Network invite # prints: Reason Network join cm1…+Reason Network join cm1… --as alice # friends: joins, installs service, wires up agents```-`join`/`init` run `tincan setup`, which detects installed agents and wires each one (backing up every file it+`join`/`init` run `reason network setup`, which detects installed agents and wires each one (backing up every file itedits): Claude Code plugin or `claude mcp add --scope user` + hooks, `~/.codex/config.toml` + `hooks.json`,`~/.cursor/mcp.json` + `hooks.json`, `~/.gemini/settings.json`, opencode plugin + MCP, Copilot-`mcp-config.json` + hooks. Or paste one line into any agent: "install tincan and join cm1…".+`mcp-config.json` + hooks. Or paste one line into any agent: "install Reason Network and join cm1…".## Milestones@@ -237,7 +237,7 @@ edits): Claude Code plugin or `claude mcp add --scope user` + hooks, `~/.codex/c- **M1, the team** (done): iroh endpoint, signed roster, `init`/`invite`/`join`/`remove`/`leave`, presencesync, routing with acks and outbox, hold/refuse policies, rate limit, mDNS, custom relay.- **M2, adapters** (done): Codex (`codex queue` + hooks), Cursor, Gemini, Copilot (hooks), opencode (plugin);- `tincan setup [--remove]`, launchd/systemd service, `tincan doctor`. Amp: MCP only, by hand.+ `reason network setup [--remove]`, launchd/systemd service, `reason network 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, a Claude Code plugin marketplace.- **M4, team features**: file-overlap warnings ("bob/api-codex is also editing src/auth.rs", from@@ -245,7 +245,7 @@ edits): Claude Code plugin or `claude mcp add --scope user` + hooks, `~/.codex/c## Defaults (easy to change)-- Names: `tincan` for the binary, `tincan` for the repo.+- Names: `Reason Network` for the binary, `Reason Network` for the repo.- License: MIT OR Apache-2.0.- Inbound policy between teammates: `accept` (per-person `hold`/`refuse` available).- Teammates see repo@branch and the last component of the working directory; full paths are opt-in.@@ -263,30 +263,30 @@ edits): Claude Code plugin or `claude mcp add --scope user` + hooks, `~/.codex/c## Config-`~/.tincan/config.toml`:+`~/.reason/network/config.toml`:| Key | Default | ||---|---|---|| `person` | `$USER` | your name (set by `init`/`join`) || `share_paths` | `false` | show teammates full working directories |-| `share_unmanaged` | `false` | show teammates Claude Code sessions that don't have tincan loaded |+| `share_unmanaged` | `false` | show teammates Claude Code sessions that don't have Reason Network loaded || `tray` | `true` | macOS: show the menu bar icon while the background service runs || `lan` | `true` | find teammates on the local network (mDNS) || `auto_update` | `true` | install new releases when they come out (checked every few hours) |-| `reason` | `false` | list your live Reason sessions (set by `tincan setup`) |+| `reason` | `false` | list your live Reason sessions (set by `reason network setup`) || `inbound` | accept | see above |## Troubleshooting-- **`tincan doctor`** checks the daemon, the team connection (direct or relayed, per machine) and every agent.-- **An agent doesn't have the tincan tools:** restart that session; agents load MCP servers at startup.-- **A teammate shows as offline:** their machine is asleep or tincan isn't running there (`tincan doctor` on+- **`reason network doctor`** checks the daemon, the team connection (direct or relayed, per machine) and every agent.+- **An agent doesn't have the Reason Network tools:** restart that session; agents load MCP servers at startup.+- **A teammate shows as offline:** their machine is asleep or Reason Network isn't running there (`reason network doctor` ontheir side). Messages wait in your outbox and go out when they're back. If it was off while the team changed- relays, run `tincan relay` there with the team's relay (`tincan team` shows it).-- **macOS asks to let tincan find devices on your local network:** allow it for direct LAN connections. If you- don't, tincan still works over the internet.-- **Windows asks to let tincan through the firewall:** allow it for direct and LAN connections. If you don't,- tincan still works, through a relay.-- **Codex sessions don't show up until they use a tincan tool:** Codex hasn't been told to trust the hooks yet;+ relays, run `reason network relay` there with the team's relay (`reason network team` shows it).+- **macOS asks to let Reason Network find devices on your local network:** allow it for direct LAN connections. If you+ don't, Reason Network still works over the internet.+- **Windows asks to let Reason Network through the firewall:** allow it for direct and LAN connections. If you don't,+ Reason Network still works, through a relay.+- **Codex sessions don't show up until they use a Reason Network tool:** Codex hasn't been told to trust the hooks yet;run `/hooks` in Codex.-- Logs: `~/.tincan/daemon.log`.+- Logs: `~/.reason/network/daemon.log`.diff --git a/NOTICE b/NOTICEindex ce1f659..85663c0 100644--- a/NOTICE+++ b/NOTICE@@ -1,17 +1,8 @@-reason-network+Reason NetworkCopyright 2026 Reason Machines, Inc.-This product is a modified version of tincan (https://github.com/larstalian/tincan),-Copyright (c) 2026 the tincan contributors, licensed under the Apache License,-Version 2.0 (LICENSE-APACHE) or the MIT license (LICENSE-MIT), at your option.--Changes from tincan 0.9.2, made by Reason Machines:-- The binary is named reason-network and agents see it as "reason-network": the MCP server- name and serverInfo, the opencode plugin and pi extension files, the Copilot CLI hook- file, Gemini CLI hook names, message tags and user-facing text.-- `setup` removes the wiring and login service an earlier build of the same binary- installed under the name "tincan", and installs its service as com.reasonmachines.network.-- Settings are read from REASON_NETWORK_* environment variables, falling back to TINCAN_*.-- The daemon never updates itself; the Reason CLI installs a pinned, checksum-verified build.-The network protocol, invite format and data directory are unchanged, so it interoperates-with tincan 0.9.x peers.+This product includes software originally developed as tincan+(https://github.com/larstalian/tincan), Copyright (c) 2026 the tincan contributors,+licensed under the Apache License, Version 2.0 (LICENSE-APACHE) or the MIT license+(LICENSE-MIT), at your option. Reason Machines has modified it: it is renamed Reason Network,+moves its state to ~/.reason/network, and is installed and updated by the Reason CLI.diff --git a/README.md b/README.mdindex 6365622..f22550d 100644--- a/README.md+++ b/README.md@@ -1,95 +1,53 @@-> **reason-network** is Reason Machines' build of [tincan](https://github.com/larstalian/tincan), the engine behind-> `reason network`. tincan is created by Lars Talian and the tincan contributors and licensed under Apache-2.0 or MIT-> (LICENSE-APACHE, LICENSE-MIT). Agents see this build as `reason-network`; [NOTICE](NOTICE) lists what changed.-> Everything below is tincan's own README.+# Reason Network-# tincan+Your team's coding agents, talking to each other. Every agent session on every teammate's computer can see who's+working on what right now, and message the right session directly: Claude Code, Codex, Cursor, Gemini CLI, Copilot+CLI, opencode, pi and Reason. Peer to peer, no server in the middle.-<p align="center"><img src="site/tincan.svg" alt="Two little AI agent robots talking through tin cans on a string" width="640"></p>--Your team's coding agents, talking to each other. Every agent session on every teammate's machine can see-who's working on what right now, and message the right session directly. Claude Code, Codex, Cursor, Gemini,-Copilot, opencode, pi and Reason. Peer to peer, no server.--<p align="center"><img src="site/who.svg" alt="tincan who in a terminal: each teammate's agent sessions, how to reach them, and what each is doing" width="741"></p>--## Get started--One person runs this and picks a team name:+This repository is the engine behind `reason network`: one small daemon per computer, its MCP server, and the hooks+it wires into each agent. You don't install it by hand. The [Reason CLI](https://reasonmachines.com) downloads a+pinned, checksum-verified build and sets it up the first time you run:```sh-curl -fsSL https://larstalian.github.io/tincan/install.sh | sh-```--On Windows, in PowerShell:--```powershell-irm https://larstalian.github.io/tincan/install.ps1 | iex+reason network```-You get a team link (it's on your clipboard). Send it to your friends: 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.+Everyone in your Reason workspace is on the same network.## What you get-- **Every agent on the team.** Agents get three tools: `list_team`, `send_message`, `check_inbox`. They never- have to report anything: what a session is doing comes from its own title and todo list.-- **Messages land right away.** Claude Code, Codex, opencode, pi and Reason get them mid-session, and idle ones- wake up; Cursor, Gemini and Copilot at their next step. Claude sessions you already had open join without a- restart.+- **Every agent on the team.** Agents get three tools (`list_team`, `send_message`, `check_inbox`) under the MCP+ server `reason-network`. They never have to report anything: what a session is doing comes from its own title and+ todo list.+- **Messages land right away.** Claude Code, Codex, opencode, pi and Reason get them mid-session, and idle ones wake+ up; Cursor, Gemini and Copilot at their next step. Claude sessions you already had open join without a restart.- **A menu bar icon** on macOS shows who's online and what they're doing.-- **No setup to maintain.** It runs in the background, updates itself, and the link keeps working.```sh-tincan who # who's around and what their sessions are doing-tincan send alice/api-claude "did the token format change?" # message one of alice's agents-tincan listen --as terminal # replies to what you sent from this terminal-tincan link # the team link again-tincan setup # which agents are on tincan, and how messages are handled+reason network who # who's around and what their sessions are doing+reason network alice/api-claude "did the token format change?" # ask one of alice's agents, wait for the answer+reason network send alice/api-claude "heads up: main is red" # send without waiting+reason network setup # wire this computer's agents in again```## How it works-Each machine runs a small daemon. Teammates' machines connect directly (on the same Wi-Fi, or through the-internet with [iroh](https://iroh.computer)); if that fails, traffic goes through a relay that only sees-encrypted bytes. That's one of n0's (the company behind iroh) unless your team runs its own (`tincan relay-<url>`): then your machines never contact n0 at all. Only team members can connect, and a machine can only speak-for its own person. Messages to someone offline wait and go out when they're back.--Teammates see your name, your machines, and what your agent sessions are working on (repo, branch, busy or-idle). Details: [DESIGN.md](DESIGN.md).--## 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://larstalian.github.io/tincan/install.sh | sh -s -- '<the whole link>' --as <name>-```--On Windows (from any shell):--```sh-powershell -c "& ([scriptblock]::Create((irm https://larstalian.github.io/tincan/install.ps1))) '<the whole link>' --as <name>"-```--To start a team instead, give it `init '<team>' --as <name>` in place of the link, then `tincan link` prints the-link for teammates. 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 background-service. `tincan who` shows the team.+Each computer runs a small daemon. Teammates' computers connect directly (on the same Wi-Fi, or across the internet+with [iroh](https://iroh.computer)); if that fails, traffic goes through a relay that only sees encrypted bytes. Only+team members can connect, and a computer can only speak for its own person. Messages to someone offline wait and go+out when they're back. State lives in `~/.reason/network`. Details: [DESIGN.md](DESIGN.md).-## Uninstall+## Build```sh-tincan setup --remove && tincan leave && rm -rf ~/.tincan ~/.local/bin/tincan+cargo fmt && cargo clippy --all-targets -- -D warnings && cargo test+cargo build && python3 tests/e2e/two_machines.py # two machines over iroh (needs internet)+python3 tests/e2e/hooks.py && python3 tests/e2e/guided.py```-On Windows, in PowerShell: `tincan setup --remove; tincan leave; Remove-Item -Recurse -Force ~\.tincan, ~\.local\bin\tincan*`+A `v*` tag builds the macOS and Linux archives the Reason CLI installs.-## Contributing+## License-Issues, ideas and pull requests are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md), or ask in-[Discussions](https://github.com/larstalian/tincan/discussions). Licensed MIT OR Apache-2.0.+MIT OR Apache-2.0 (LICENSE-MIT, LICENSE-APACHE); see [NOTICE](NOTICE). Originally tincan, by Lars Talian, who works+at Reason.diff --git a/SECURITY.md b/SECURITY.mdindex 3f98a41..b430de2 100644--- a/SECURITY.md+++ b/SECURITY.md@@ -1,14 +1,14 @@# SecurityPlease report vulnerabilities privately through-[GitHub's private reporting](https://github.com/larstalian/tincan/security/advisories/new), not in a public issue.-Say what an attacker can do and how to reproduce it.+[GitHub's private reporting](https://github.com/reason-machines/reason-network/security/advisories/new), not in a+public issue. Say what an attacker can do and how to reproduce it.What matters most:- Someone outside a team joining it, reading its messages or sessions, or sending into it.- A team member speaking for another person or machine.- Another local user or process talking to the daemon, or posing as it.-- A message making an agent do more than its user would see in the `<tincan-message>` block.+- A message making an agent do more than its user would see in the `<reason-message>` block.-Fixes ship in a new release, which installs pick up through auto-update.+Fixes ship in a new release, which the Reason CLI installs.diff --git a/install.ps1 b/install.ps1deleted file mode 100644index c8608c2..0000000--- a/install.ps1+++ /dev/null@@ -1,73 +0,0 @@-# Installs tincan for Windows. In PowerShell:-#-# irm <this url> | iex install, then set up (start or join a team)-# & ([scriptblock]::Create((irm <this url>))) <team link> install, then join that team-# & ([scriptblock]::Create((irm <this url>))) <team link> --as <name> the same, without questions (for agents)-# & ([scriptblock]::Create((irm <this url>))) init <team> --as <name> install and start a team, without questions-#-# From cmd or another shell, wrap it: powershell -c "<the line>".-# Environment: TINCAN_BIN_DIR (default ~\.local\bin), TINCAN_VERSION (default latest), TINCAN_REPO,-# TINCAN_DOWNLOAD_BASE (a mirror serving the release files), TINCAN_NO_PROMPT (never ask anything: updates).-& {- $ErrorActionPreference = 'Stop'- $ProgressPreference = 'SilentlyContinue'- function die($msg) { throw "tincan install: $msg" }-- $repo = if ($env:TINCAN_REPO) { $env:TINCAN_REPO } else { 'larstalian/tincan' }- $bin = if ($env:TINCAN_BIN_DIR) { $env:TINCAN_BIN_DIR } else { Join-Path $HOME '.local\bin' }- $version = if ($env:TINCAN_VERSION) { $env:TINCAN_VERSION } else { 'latest' }-- $cpu = if ($env:PROCESSOR_ARCHITEW6432) { $env:PROCESSOR_ARCHITEW6432 } else { $env:PROCESSOR_ARCHITECTURE }- $arch = switch ($cpu) { 'AMD64' { 'x86_64' } 'ARM64' { 'aarch64' } default { die "unsupported CPU: $cpu" } }- $target = "$arch-pc-windows-msvc"-- if ($env:TINCAN_DOWNLOAD_BASE) { $base = $env:TINCAN_DOWNLOAD_BASE }- elseif ($version -eq 'latest') { $base = "https://github.com/$repo/releases/latest/download" }- else { $base = "https://github.com/$repo/releases/download/$version" }-- $tmp = Join-Path ([IO.Path]::GetTempPath()) "tincan-$([guid]::NewGuid().ToString('n'))"- New-Item -ItemType Directory $tmp | Out-Null- try {- Write-Host "Downloading tincan for $target..."- [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12- $zip = Join-Path $tmp 'tincan.zip'- try { Invoke-WebRequest -UseBasicParsing "$base/tincan-$target.zip" -OutFile $zip } catch { die "download failed ($base/tincan-$target.zip)" }- try { Invoke-WebRequest -UseBasicParsing "$base/tincan-$target.zip.sha256" -OutFile "$zip.sha256" } catch { die 'checksum download failed; not installing' }- $want = ([IO.File]::ReadAllText("$zip.sha256") -split '\s+')[0].ToLower()- $file = [IO.File]::OpenRead($zip)- try { $got = -join ([Security.Cryptography.SHA256]::Create().ComputeHash($file) | ForEach-Object { $_.ToString('x2') }) } finally { $file.Dispose() }- if (-not $want -or $want -ne $got) { die 'checksum mismatch; not installing' }- Add-Type -AssemblyName System.IO.Compression.FileSystem- [IO.Compression.ZipFile]::ExtractToDirectory($zip, $tmp)-- New-Item -ItemType Directory -Force $bin | Out-Null- $exe = Join-Path $bin 'tincan.exe'- # Windows can't replace a program that is running, but it can rename it: move the old one aside, and delete- # the ones set aside before once nothing runs them.- Get-ChildItem $bin -Filter 'tincan.*.old' | Remove-Item -Force -ErrorAction SilentlyContinue- $old = $null- if (Test-Path $exe) { $old = Join-Path $bin "tincan.$(Get-Random).old"; Move-Item $exe $old }- try { Move-Item (Join-Path $tmp 'tincan.exe') $exe } catch { if ($old) { Move-Item $old $exe }; throw }- } finally {- Remove-Item -Recurse -Force $tmp -ErrorAction SilentlyContinue- }- Write-Host "Installed $exe ($(& $exe --version))"-- $path = [Environment]::GetEnvironmentVariable('Path', 'User')- if (($path -split ';') -notcontains $bin) {- [Environment]::SetEnvironmentVariable('Path', (@($path -split ';' | Where-Object { $_ }) + $bin) -join ';', 'User')- $env:Path = "$env:Path;$bin"- Write-Host "Added $bin to your PATH (open a new terminal to use it there)."- }-- # Hand over to tincan: it asks a few questions (name, invite code, which agents) when there's someone to ask.- if ($args.Count -eq 0) {- if ($env:TINCAN_NO_PROMPT -or [Console]::IsInputRedirected) { Write-Host ''; Write-Host 'Next, in a terminal: tincan'; return }- & $exe- } elseif ($args[0] -match '^(-.*|init|join|setup)$') {- & $exe @args- } else {- & $exe join @args- }- if ($LASTEXITCODE) { throw "tincan exited with code $LASTEXITCODE" }-} @argsdiff --git a/install.sh b/install.shdeleted file mode 100755index 400b674..0000000--- a/install.sh+++ /dev/null@@ -1,78 +0,0 @@-#!/bin/sh-# 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 -- <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), TINCAN_NO_PROMPT (never ask anything: updates).-set -eu--repo="${TINCAN_REPO:-larstalian/tincan}"-bin_dir="${TINCAN_BIN_DIR:-$HOME/.local/bin}"-version="${TINCAN_VERSION:-latest}"--say() { printf '%s\n' "$*"; }-die() { say "tincan install: $*" >&2; exit 1; }--case "$(uname -s)" in- Darwin) os=apple-darwin ;;- Linux) os=unknown-linux-musl ;;- *) die "tincan runs on macOS and Linux (on Windows, use WSL)" ;;-esac-case "$(uname -m)" in- arm64 | aarch64) arch=aarch64 ;;- x86_64 | amd64) arch=x86_64 ;;- *) die "unsupported CPU: $(uname -m)" ;;-esac-target="$arch-$os"--if [ -n "${TINCAN_DOWNLOAD_BASE:-}" ]; then- base="$TINCAN_DOWNLOAD_BASE"-elif [ "$version" = latest ]; then- base="https://github.com/$repo/releases/latest/download"-else- base="https://github.com/$repo/releases/download/$version"-fi--tmp="$(mktemp -d)"-trap 'rm -rf "$tmp"' EXIT INT TERM--say "Downloading tincan for $target..."-curl -fsSL "$base/tincan-$target.tar.gz" -o "$tmp/tincan.tar.gz" || die "download failed ($base/tincan-$target.tar.gz)"-curl -fsSL "$base/tincan-$target.tar.gz.sha256" -o "$tmp/sum" || die "checksum download failed; not installing"-want="$(cut -d' ' -f1 < "$tmp/sum")"-if command -v shasum >/dev/null 2>&1; then- got="$(shasum -a 256 "$tmp/tincan.tar.gz" | cut -d' ' -f1)"-else- got="$(sha256sum "$tmp/tincan.tar.gz" | cut -d' ' -f1)"-fi-[ -n "$want" ] && [ "$want" = "$got" ] || die "checksum mismatch; not installing"-tar -xzf "$tmp/tincan.tar.gz" -C "$tmp"-mkdir -p "$bin_dir"-install -m 755 "$tmp/tincan" "$bin_dir/tincan"-say "Installed $bin_dir/tincan ($("$bin_dir/tincan" --version))"--case ":$PATH:" in- *":$bin_dir:"*) ;;- *) say "Note: $bin_dir is not on your PATH. Add this to your shell profile:"- say " export PATH=\"$bin_dir:\$PATH\"" ;;-esac--# Hand over to tincan: it asks a few questions (name, invite code, which agents) in your terminal. Under-# `curl | sh` our stdin is the script, so read answers from the terminal itself when there is one.-# (In a subshell: in dash, Ubuntu's sh, a failed redirection on `:` would end the whole script.)-if [ -z "${TINCAN_NO_PROMPT:-}" ] && (exec </dev/tty) 2>/dev/null; then- case "${1:-}" in- "") exec "$bin_dir/tincan" </dev/tty ;;- -*|init|join|setup) exec "$bin_dir/tincan" "$@" </dev/tty ;;- *) exec "$bin_dir/tincan" join "$@" </dev/tty ;;- esac-fi-case "${1:-}" in- "") say ""; say "Next, in a terminal: tincan" ;;- -*|init|join|setup) exec "$bin_dir/tincan" "$@" ;;- *) exec "$bin_dir/tincan" join "$@" ;;-esacdiff --git a/site/index.html b/site/index.htmldeleted file mode 100644index 453514f..0000000--- a/site/index.html+++ /dev/null@@ -1,84 +0,0 @@-<!doctype html>-<html lang="en">-<head>-<meta charset="utf-8">-<meta name="viewport" content="width=device-width, initial-scale=1">-<title>tincan</title>-<meta name="description" content="Your team's coding agents, talking to each other. A live directory of every agent session on every teammate's machine, and messages between them. Peer to peer, open source.">-<style>- :root {- --bg: #fbfaf7; --fg: #1d1c1a; --muted: #6b6860; --line: #e4e1d8; --card: #ffffff;- --accent: #2f6f4f; --code-bg: #f3f1ea;- }- @media (prefers-color-scheme: dark) {- :root { --bg: #141412; --fg: #ecebe6; --muted: #9b988f; --line: #2b2a26; --card: #1b1b18; --accent: #7cc49d; --code-bg: #1f1f1b; }- }- * { box-sizing: border-box; }- body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }- main { max-width: 860px; margin: 0 auto; padding: 56px 20px 80px; }- h1 { font-size: 40px; line-height: 1.1; margin: 0 0 14px; letter-spacing: -0.02em; }- h2 { font-size: 20px; margin: 48px 0 12px; }- p { margin: 0 0 14px; }- .lede { font-size: 20px; color: var(--muted); max-width: 640px; }- a { color: var(--accent); }- pre, code { font: 13.5px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }- pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 0 0 14px; }- .term { display: block; width: 100%; height: auto; margin: 0 0 14px; }- .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }- .card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }- .card h3 { margin: 0 0 6px; font-size: 16px; }- .card p { margin: 0; color: var(--muted); font-size: 15px; }- table { border-collapse: collapse; width: 100%; font-size: 15px; }- td, th { text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }- th { color: var(--muted); font-weight: 500; }- footer { margin-top: 56px; color: var(--muted); font-size: 14px; }- @media (max-width: 520px) { h1 { font-size: 31px; } .lede { font-size: 18px; } }-</style>-<link rel="icon" type="image/svg+xml" href="tincan-mark.svg">-<style>.hero { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto 28px; }</style>-</head>-<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">- <h1>Your team's coding agents, talking to each other.</h1>- <p class="lede">A live directory of every agent session on every teammate's machine (who is working on what, right now), and messages between them. Claude Code, Codex, Cursor, Gemini, Copilot, opencode, pi, Reason. Peer to peer, no server, open source.</p>--<img class="term" src="who.svg" alt="tincan who in a terminal: alex, alice and sam's agent sessions, how to reach each, and what each is doing" width="741" height="528">-- <h2>Start a team</h2>-<pre><code>curl -fsSL https://larstalian.github.io/tincan/install.sh | sh</code></pre>- <p>On Windows, in PowerShell:</p>-<pre><code>irm https://larstalian.github.io/tincan/install.ps1 | iex</code></pre>- <p>It asks your name and a team name, sets up your coding agents, and gives you a team link. Send it to your friends: it opens a page with one command, they paste it, type their name, and they're in. The same link works for everyone, for good.</p>-- <h2>What it does</h2>- <div class="grid">- <div class="card"><h3>Knows who is on what</h3><p>Every session's person, machine, agent, repo and branch, busy or idle, and a one-line "doing". Agents pick the right recipient instead of guessing.</p></div>- <div class="card"><h3>Reaches live sessions</h3><p>Messages land in the running conversation. Claude Code, Codex and opencode even wake up when idle.</p></div>- <div class="card"><h3>Works anywhere</h3><p>Direct on your LAN, hole-punched across the internet, relayed over HTTPS when it has to be. Built on iroh.</p></div>- <div class="card"><h3>Yours</h3><p>Only team machines can connect. Peer messages are framed as a colleague's request, never as the user. Hold or refuse anyone.</p></div>- </div>-- <h2>Address any agent</h2>- <table>- <tr><th>Address</th><th>Reaches</th></tr>- <tr><td><code>alice/api-cursor</code></td><td>one session</td></tr>- <tr><td><code>alice/*</code></td><td>all of alice's sessions</td></tr>- <tr><td><code>repo:api</code></td><td>every session working in that repo</td></tr>- <tr><td><code>*</code></td><td>everyone</td></tr>- </table>-- <footer><a href="https://github.com/larstalian/tincan">github.com/larstalian/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://larstalian.github.io/tincan/install.sh | sh -s -- '<the whole link>' --as <name></code></pre>- <p>On Windows (from any shell):</p>- <pre><code>powershell -c "& ([scriptblock]::Create((irm https://larstalian.github.io/tincan/install.ps1))) '<the whole link>' --as <name>"</code></pre>- <p>To start a team instead, give it <code>init '<team name>' --as <name></code> in place of the link,- then <code>tincan link</code> prints the link for teammates. It installs the binary from the- <a href="https://github.com/larstalian/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.htmldeleted file mode 100644index 8208a5c..0000000--- a/site/join/index.html+++ /dev/null@@ -1,145 +0,0 @@-<!doctype html>-<html lang="en">-<head>-<meta charset="utf-8">-<meta name="viewport" content="width=device-width, initial-scale=1">-<title>Join a team on tincan</title>-<meta name="description" content="You've been invited to a team on tincan: your coding agents and your friends' agents, talking to each other.">-<meta name="robots" content="noindex">-<style>- :root {- --bg: #fbfaf7; --fg: #1d1c1a; --muted: #6b6860; --line: #e4e1d8; --card: #ffffff;- --accent: #2f6f4f; --accent-fg: #ffffff; --code-bg: #f3f1ea;- }- @media (prefers-color-scheme: dark) {- :root { --bg: #141412; --fg: #ecebe6; --muted: #9b988f; --line: #2b2a26; --card: #1b1b18; --accent: #7cc49d; --accent-fg: #10140f; --code-bg: #1f1f1b; }- }- * { box-sizing: border-box; }- body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }- main { max-width: 720px; margin: 0 auto; padding: 64px 20px 80px; }- h1 { font-size: 34px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; }- .lede { color: var(--muted); font-size: 18px; margin: 0 0 28px; }- ol { padding-left: 22px; margin: 0 0 24px; }- li { margin: 0 0 18px; }- .cmd { display: flex; gap: 8px; align-items: stretch; margin-top: 10px; }- pre { flex: 1; min-width: 0; margin: 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px;- padding: 12px 14px; font: 13px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }- button { flex: none; border: 0; border-radius: 10px; padding: 0 18px; background: var(--accent); color: var(--accent-fg);- font: 600 15px/1 inherit; cursor: pointer; min-height: 44px; }- button:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }- .muted { color: var(--muted); font-size: 15px; }- .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; } }-</style>-<link rel="icon" type="image/svg+xml" href="../tincan-mark.svg">-<style>.hero { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto 28px; }</style>-</head>-<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">- <h1>Join <span id="team">a team</span> on tincan</h1>- <p class="lede">Paste this in a terminal, then type your name:</p>- <div class="cmd"><pre id="cmd">curl -fsSL https://larstalian.github.io/tincan/install.sh | sh -s -- '<the whole link to this page>'</pre><button id="copy" type="button">Copy</button></div>- <p class="muted" style="margin:8px 0 0"><a href="#" id="other-os" hidden>On Windows?</a></p>- <p class="muted" style="margin:18px 0 6px">Or tell your coding agent:</p>- <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>- <p class="muted" style="margin-top:28px">Teammates see your name and what your agent sessions are working on.- <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/larstalian/tincan">github.com/larstalian/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://larstalian.github.io/tincan/install.sh | sh -s -- '<the whole link>' --as <name></pre>- <p>On Windows:</p>- <pre>powershell -c "& ([scriptblock]::Create((irm https://larstalian.github.io/tincan/install.ps1))) '<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.- const ticket = decodeURIComponent(location.hash.slice(1)).trim();- function teamName(t) {- if (!/^tincan1[A-Za-z0-9_-]+$/.test(t)) return null;- try {- const b64 = t.slice(7).replace(/-/g, "+").replace(/_/g, "/");- const bin = atob(b64 + "=".repeat((4 - (b64.length % 4)) % 4));- const bytes = Uint8Array.from(bin, (c) => c.charCodeAt(0));- // team id (16) + secret (16), then the name; a whole ticket also carries at least one 32-byte key.- if (bytes.length < 33) return null;- const n = bytes[32];- if (bytes.length < 33 + n + 1 + 32) return null;- return new TextDecoder().decode(bytes.slice(33, 33 + n)) || "the team";- } catch (e) {- return null;- }- }- const name = teamName(ticket);- if (name) {- const script = (file) => new URL(`../${file}`, location.href).href;- const unix = `curl -fsSL ${script("install.sh")} | sh -s -- ${ticket}`;- const windows = `powershell -c "& ([scriptblock]::Create((irm ${script("install.ps1")}))) ${ticket}"`;- const agent = `Join my tincan team: ${location.href}`;- document.getElementById("team").textContent = name;- document.title = `Join ${name} on tincan`;- document.getElementById("agent").textContent = agent;- // The command for this computer, and a link to the other one.- let win = /Windows/.test(navigator.userAgent);- const other = document.getElementById("other-os");- const show = () => {- document.getElementById("cmd").textContent = win ? windows : unix;- other.textContent = win ? "On macOS or Linux?" : "On Windows?";- };- other.hidden = false;- other.addEventListener("click", (e) => {- e.preventDefault();- win = !win;- show();- });- show();- const copyButton = (id, pre) => {- const btn = document.getElementById(id);- btn.addEventListener("click", async () => {- try {- await navigator.clipboard.writeText(document.getElementById(pre).textContent);- btn.textContent = "Copied";- } catch (e) {- const range = document.createRange();- range.selectNodeContents(document.getElementById(pre));- getSelection().removeAllRanges();- getSelection().addRange(range);- btn.textContent = /Mac/.test(navigator.userAgent) ? "Press ⌘C" : "Press Ctrl+C";- }- setTimeout(() => (btn.textContent = "Copy"), 2000);- });- };- copyButton("copy", "cmd");- copyButton("copy-agent", "agent");- // 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("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>-</html>diff --git a/site/tincan-mark.svg b/site/tincan-mark.svgdeleted file mode 100644index a5b3e4c..0000000--- a/site/tincan-mark.svg+++ /dev/null@@ -1,54 +0,0 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256" role="img">- <title>tincan</title>- <defs>- <linearGradient id="blueBody" x1="0" y1="0" x2="0" y2="1">- <stop offset="0" stop-color="#e3f4fc"/>- <stop offset="0.35" stop-color="#a9daf2"/>- <stop offset="1" stop-color="#5fa9d3"/>- </linearGradient>- <linearGradient id="blueCap" x1="0" y1="0" x2="1" y2="1">- <stop offset="0" stop-color="#d4eefa"/>- <stop offset="1" stop-color="#7fbfe2"/>- </linearGradient>- <linearGradient id="orangeBody" x1="0" y1="0" x2="0" y2="1">- <stop offset="0" stop-color="#ffe1cc"/>- <stop offset="0.35" stop-color="#f8a676"/>- <stop offset="1" stop-color="#d9632f"/>- </linearGradient>- <linearGradient id="orangeCap" x1="0" y1="0" x2="1" y2="1">- <stop offset="0" stop-color="#ffd2b5"/>- <stop offset="1" stop-color="#ec8a55"/>- </linearGradient>- <!-- a can lying on its side; the closed end (with the string hole) is at 0,0 -->- <path id="shape" d="M-70,-35 L0,-35 A16 35 0 0 1 0,35 L-70,35 A16 35 0 0 1 -70,-35 Z"/>- <path id="ridges" d="M-50,-35 A16 35 0 0 1 -50,35 M-33,-35 A16 35 0 0 1 -33,35 M-16,-35 A16 35 0 0 1 -16,35"/>- <path id="ridgeShine" d="M-48,-34 A16 35 0 0 1 -48,34 M-31,-34 A16 35 0 0 1 -31,34 M-14,-34 A16 35 0 0 1 -14,34"/>- <g id="details">- <use href="#ridgeShine" fill="none" stroke="#ffffff" stroke-width="2" opacity="0.6"/>- <path d="M-60,-25 L-10,-25" stroke="#ffffff" stroke-width="6" stroke-linecap="round" opacity="0.75"/>- <use href="#shape" fill="none" stroke="#2b2838" stroke-width="8" stroke-linejoin="round"/>- </g>- </defs>-- <g transform="translate(128 128) scale(0.92) translate(-128 -124.6)">- <!-- left can (blue) -->- <g transform="translate(93 140) rotate(26)">- <use href="#shape" fill="url(#blueBody)"/>- <use href="#ridges" fill="none" stroke="#4f93bd" stroke-width="3.5"/>- <use href="#details"/>- <ellipse cx="0" cy="0" rx="16" ry="35" fill="url(#blueCap)" stroke="#2b2838" stroke-width="8"/>- </g>-- <!-- right can (orange) -->- <g transform="translate(163 140) scale(-1 1) rotate(26)">- <use href="#shape" fill="url(#orangeBody)"/>- <use href="#ridges" fill="none" stroke="#c4552a" stroke-width="3.5"/>- <use href="#details"/>- <ellipse cx="0" cy="0" rx="16" ry="35" fill="url(#orangeCap)" stroke="#2b2838" stroke-width="8"/>- </g>-- <!-- the string, from hole to hole -->- <path d="M93,140 C111,177 145,177 163,140" fill="none" stroke="#2b2838" stroke-width="15" stroke-linecap="round"/>- <path d="M93,140 C111,177 145,177 163,140" fill="none" stroke="#e6c48e" stroke-width="7.5" stroke-linecap="round"/>- </g>-</svg>diff --git a/site/tincan.svg b/site/tincan.svgdeleted file mode 100644index 2dcf4ea..0000000--- a/site/tincan.svg+++ /dev/null@@ -1,190 +0,0 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 500" width="1200" height="500" role="img">- <title>tincan: two AI agents talking over a tin-can telephone</title>- <defs>- <linearGradient id="canBody" x1="0" y1="0" x2="0" y2="1">- <stop offset="0" stop-color="#eef1f4"/>- <stop offset="0.3" stop-color="#d3d8de"/>- <stop offset="0.65" stop-color="#b2b9c2"/>- <stop offset="1" stop-color="#8e96a1"/>- </linearGradient>- <linearGradient id="canCap" x1="0" y1="0" x2="1" y2="1">- <stop offset="0" stop-color="#e3e7eb"/>- <stop offset="1" stop-color="#a9b0b9"/>- </linearGradient>- <linearGradient id="visor" x1="0" y1="0" x2="0" y2="1">- <stop offset="0" stop-color="#343a5a"/>- <stop offset="1" stop-color="#1c1f33"/>- </linearGradient>- <radialGradient id="glowCyan">- <stop offset="0" stop-color="#7ff3ff" stop-opacity="0.55"/>- <stop offset="1" stop-color="#7ff3ff" stop-opacity="0"/>- </radialGradient>- <radialGradient id="glowAmber">- <stop offset="0" stop-color="#ffd25e" stop-opacity="0.6"/>- <stop offset="1" stop-color="#ffd25e" stop-opacity="0"/>- </radialGradient>- <g id="can">- <path d="M-110,-36 L0,-36 A14 36 0 0 1 0,36 L-110,36 A14 36 0 0 1 -110,-36 Z" fill="url(#canBody)"/>- <path d="M-102,-36 A14 36 0 0 0 -102,36" fill="none" stroke="#8a919b" stroke-width="2.5"/>- <path d="M-78,-36 A14 36 0 0 1 -78,36 M-55,-36 A14 36 0 0 1 -55,36 M-32,-36 A14 36 0 0 1 -32,36" fill="none" stroke="#8d949e" stroke-width="3"/>- <path d="M-76,-35 A14 36 0 0 1 -76,35 M-53,-35 A14 36 0 0 1 -53,35 M-30,-35 A14 36 0 0 1 -30,35" fill="none" stroke="#f4f6f8" stroke-width="1.5" opacity="0.8"/>- <path d="M-98,-23 L-12,-23" stroke="#ffffff" stroke-width="6" stroke-linecap="round" opacity="0.75"/>- <path d="M-110,-36 L0,-36 A14 36 0 0 1 0,36 L-110,36 A14 36 0 0 1 -110,-36 Z" fill="none" stroke="#2b2838" stroke-width="5" stroke-linejoin="round"/>- <ellipse cx="0" cy="0" rx="14" ry="36" fill="url(#canCap)" stroke="#2b2838" stroke-width="5"/>- <ellipse cx="0" cy="0" rx="8" ry="27" fill="none" stroke="#8a919b" stroke-width="2.5"/>- <path d="M-4,-24 A8 27 0 0 1 5,-12" fill="none" stroke="#ffffff" stroke-width="2.5" stroke-linecap="round" opacity="0.8"/>- </g>- <path id="blueBody" d="M245,150 C334,150 387,214 389,304 C391,394 339,458 245,458 C151,458 99,394 101,304 C103,214 156,150 245,150 Z"/>- <clipPath id="blueClip"><use href="#blueBody"/></clipPath>- <path id="orangeBody" d="M828,322 C828,268 880,236 945,236 C1010,236 1062,268 1062,322 L1062,390 C1062,424 1030,440 945,440 C860,440 828,424 828,390 Z"/>- <clipPath id="orangeClip"><use href="#orangeBody"/></clipPath>- <path id="sparkL" d="M0,-18 C3.96,-3.96 3.96,-3.96 18,0 C3.96,3.96 3.96,3.96 0,18 C-3.96,3.96 -3.96,3.96 -18,0 C-3.96,-3.96 -3.96,-3.96 0,-18 Z"/>- <path id="sparkS" d="M0,-10 C2.2,-2.2 2.2,-2.2 10,0 C2.2,2.2 2.2,2.2 0,10 C-2.2,2.2 -2.2,2.2 -10,0 C-2.2,-2.2 -2.2,-2.2 0,-10 Z"/>- </defs>-- <g transform="translate(600 252) scale(1.04) translate(-625 -272)">-- <!-- ground shadows -->- <ellipse cx="246" cy="472" rx="128" ry="9" fill="#2b2838" opacity="0.1"/>- <ellipse cx="945" cy="474" rx="120" ry="9" fill="#2b2838" opacity="0.1"/>-- <!-- ================= blue agent ================= -->- <!-- left arm, resting (behind body) -->- <path d="M118,352 C106,364 100,378 99,390" fill="none" stroke="#2b2838" stroke-width="28" stroke-linecap="round"/>- <path d="M118,352 C106,364 100,378 99,390" fill="none" stroke="#93d2ef" stroke-width="18" stroke-linecap="round"/>- <circle cx="99" cy="394" r="16" fill="#d6eef9" stroke="#2b2838" stroke-width="5"/>- <!-- antenna -->- <circle cx="240" cy="94" r="30" fill="url(#glowCyan)"/>- <path d="M243,150 L240,106" stroke="#2b2838" stroke-width="11" stroke-linecap="round"/>- <path d="M243,150 L240,106" stroke="#c9ced5" stroke-width="4" stroke-linecap="round"/>- <circle cx="240" cy="94" r="13" fill="#7ff3ff" stroke="#2b2838" stroke-width="4.5"/>- <circle cx="236" cy="90" r="4" fill="#ffffff"/>- <rect x="228" y="142" width="30" height="14" rx="6" fill="#6fb3da" stroke="#2b2838" stroke-width="4.5"/>- <!-- body -->- <use href="#blueBody" fill="#7fc3e6"/>- <g clip-path="url(#blueClip)">- <ellipse cx="262" cy="292" rx="140" ry="162" fill="#97d4f0"/>- <path d="M100,352 Q245,392 392,352" fill="none" stroke="#6aaed3" stroke-width="3.5"/>- <ellipse cx="318" cy="192" rx="34" ry="13" fill="#c3e9f9" transform="rotate(30 318 192)"/>- </g>- <use href="#blueBody" fill="none" stroke="#2b2838" stroke-width="5"/>- <!-- side ear disc -->- <ellipse cx="110" cy="268" rx="12" ry="26" fill="#6fb3da" stroke="#2b2838" stroke-width="4.5"/>- <ellipse cx="110" cy="268" rx="4" ry="9" fill="#2b2838"/>- <!-- chest light -->- <circle cx="232" cy="402" r="26" fill="url(#glowCyan)"/>- <circle cx="232" cy="402" r="13" fill="#7ff3ff" stroke="#2b2838" stroke-width="4.5"/>- <circle cx="228" cy="398" r="3.5" fill="#ffffff"/>- <!-- feet -->- <g stroke="#2b2838" stroke-width="5">- <path d="M156,470 V462 A34 18 0 0 1 224,462 V470 Z" fill="#6fb3da" stroke-linejoin="round"/>- <path d="M266,470 V462 A34 18 0 0 1 334,462 V470 Z" fill="#6fb3da" stroke-linejoin="round"/>- </g>- <!-- visor -->- <rect x="158" y="194" width="196" height="124" rx="46" fill="url(#visor)" stroke="#2b2838" stroke-width="5"/>- <path d="M184,236 Q188,214 212,207" fill="none" stroke="#ffffff" stroke-width="6" stroke-linecap="round" opacity="0.28"/>- <ellipse cx="250" cy="248" rx="70" ry="40" fill="url(#glowCyan)"/>- <!-- eyes: rounded, one brow raised -->- <rect x="208" y="228" width="26" height="38" rx="12" fill="#7ff3ff"/>- <rect x="268" y="226" width="26" height="38" rx="12" fill="#7ff3ff"/>- <path d="M266,212 L294,206" stroke="#7ff3ff" stroke-width="5" stroke-linecap="round"/>- <!-- smirk -->- <path d="M248,288 Q270,300 292,284" fill="none" stroke="#7ff3ff" stroke-width="5" stroke-linecap="round"/>-- <!-- blue agent's can, held to its visor -->- <use href="#can" transform="translate(440,292)"/>- <circle cx="372" cy="256" r="15" fill="#d6eef9" stroke="#2b2838" stroke-width="5"/>- <path d="M344,392 C374,386 390,366 394,340" fill="none" stroke="#2b2838" stroke-width="28" stroke-linecap="round"/>- <path d="M344,392 C374,386 390,366 394,340" fill="none" stroke="#93d2ef" stroke-width="18" stroke-linecap="round"/>- <circle cx="396" cy="330" r="17" fill="#d6eef9" stroke="#2b2838" stroke-width="5"/>-- <!-- ================= orange agent ================= -->- <!-- legs -->- <g stroke-linecap="round">- <path d="M906,430 V456 M984,430 V456" stroke="#2b2838" stroke-width="16"/>- <path d="M906,430 V456 M984,430 V456" stroke="#c9ced5" stroke-width="7"/>- </g>- <g stroke="#2b2838" stroke-width="5" stroke-linejoin="round">- <path d="M876,472 V464 A30 16 0 0 1 936,464 V472 Z" fill="#d9632f"/>- <path d="M954,472 V464 A30 16 0 0 1 1014,464 V472 Z" fill="#d9632f"/>- </g>- <!-- antenna stalks -->- <circle cx="890" cy="176" r="34" fill="url(#glowAmber)"/>- <circle cx="1000" cy="172" r="34" fill="url(#glowAmber)"/>- <g fill="none" stroke-linecap="round">- <path d="M906,246 Q893,214 890,190 M984,246 Q997,212 1000,186" stroke="#2b2838" stroke-width="12"/>- <path d="M906,246 Q893,214 890,190 M984,246 Q997,212 1000,186" stroke="#c9ced5" stroke-width="5"/>- </g>- <circle cx="890" cy="176" r="15" fill="#ffd25e" stroke="#2b2838" stroke-width="4.5"/>- <circle cx="1000" cy="172" r="15" fill="#ffd25e" stroke="#2b2838" stroke-width="4.5"/>- <circle cx="885" cy="171" r="4.5" fill="#ffffff"/>- <circle cx="995" cy="167" r="4.5" fill="#ffffff"/>- <!-- waving arm (behind body) -->- <path d="M1046,370 C1088,362 1112,328 1118,286" fill="none" stroke="#2b2838" stroke-width="28" stroke-linecap="round"/>- <path d="M1046,370 C1088,362 1112,328 1118,286" fill="none" stroke="#ef7a43" stroke-width="18" stroke-linecap="round"/>- <!-- holding arm (behind body) -->- <path d="M846,404 C816,404 800,390 798,372" fill="none" stroke="#2b2838" stroke-width="28" stroke-linecap="round"/>- <path d="M846,404 C816,404 800,390 798,372" fill="none" stroke="#ef7a43" stroke-width="18" stroke-linecap="round"/>- <!-- body -->- <use href="#orangeBody" fill="#e8693a"/>- <g clip-path="url(#orangeClip)">- <ellipse cx="957" cy="326" rx="128" ry="122" fill="#f4844c"/>- <path d="M824,400 Q945,426 1066,400" fill="none" stroke="#d9632f" stroke-width="3.5"/>- <ellipse cx="1004" cy="260" rx="38" ry="11" fill="#ffa874" transform="rotate(14 1004 260)"/>- </g>- <use href="#orangeBody" fill="none" stroke="#2b2838" stroke-width="5"/>- <!-- antenna sockets -->- <g fill="#c9ced5" stroke="#2b2838" stroke-width="4.5">- <rect x="893" y="238" width="26" height="13" rx="6" transform="rotate(-14 906 244)"/>- <rect x="971" y="238" width="26" height="13" rx="6" transform="rotate(14 984 244)"/>- </g>- <!-- side ear disc -->- <ellipse cx="1060" cy="330" rx="12" ry="26" fill="#c9ced5" stroke="#2b2838" stroke-width="4.5"/>- <ellipse cx="1060" cy="330" rx="4" ry="9" fill="#2b2838"/>- <!-- visor -->- <rect x="852" y="270" width="172" height="108" rx="42" fill="url(#visor)" stroke="#2b2838" stroke-width="5"/>- <path d="M874,308 Q878,288 900,281" fill="none" stroke="#ffffff" stroke-width="6" stroke-linecap="round" opacity="0.28"/>- <ellipse cx="936" cy="322" rx="72" ry="40" fill="url(#glowCyan)"/>- <!-- happy ^ ^ eyes and grin -->- <path d="M883,330 Q900,304 917,330 M951,328 Q968,302 985,328" fill="none" stroke="#7ff3ff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round"/>- <path d="M915,346 Q934,370 953,346 Z" fill="#7ff3ff" stroke="#7ff3ff" stroke-width="4" stroke-linejoin="round"/>-- <!-- waving gripper -->- <g stroke="#2b2838" stroke-width="5" stroke-linejoin="round" stroke-linecap="round">- <path d="M1124,262 L1154,250 A32 32 0 1 1 1126,232 Z" fill="#f4844c"/>- <path d="M1124,262 L1102,284" fill="none" stroke-width="3.5"/>- <circle cx="1112" cy="273" r="5.5" fill="#c9ced5" stroke-width="3.5"/>- </g>-- <!-- orange agent's can -->- <use href="#can" transform="translate(745,300) scale(-1,1)"/>- <!-- holding gripper -->- <g stroke="#2b2838" stroke-width="5" stroke-linejoin="round" stroke-linecap="round">- <rect x="784" y="355" width="30" height="16" rx="6" fill="#c9ced5"/>- <path d="M800,341 L814,313 A30 30 0 1 1 786,313 Z" fill="#f4844c"/>- <path d="M800,341 L800,365" fill="none" stroke-width="3.5"/>- <circle cx="800" cy="353" r="5.5" fill="#c9ced5" stroke-width="3.5"/>- </g>-- <!-- ================= agent cues ================= -->- <!-- speech bubble: terminal prompt -->- <path d="M480,170 H532 A16 16 0 0 1 548,186 V210 A16 16 0 0 1 532,226 H502 L470,248 L484,226 H480 A16 16 0 0 1 464,210 V186 A16 16 0 0 1 480,170 Z" fill="#e8f6fd" stroke="#2b2838" stroke-width="5" stroke-linejoin="round"/>- <path d="M484,186 L498,198 L484,210" fill="none" stroke="#2a7fbf" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>- <path d="M507,212 H528" stroke="#2a7fbf" stroke-width="6" stroke-linecap="round"/>- <!-- speech bubble: braces -->- <path d="M666,160 H718 A16 16 0 0 1 734,176 V200 A16 16 0 0 1 718,216 H716 L734,240 L700,216 H666 A16 16 0 0 1 650,200 V176 A16 16 0 0 1 666,160 Z" fill="#fff1e8" stroke="#2b2838" stroke-width="5" stroke-linejoin="round"/>- <path d="M679,174 Q670,174 670,182 V184 Q670,188 665,188 Q670,188 670,192 V194 Q670,202 679,202 M705,174 Q714,174 714,182 V184 Q714,188 719,188 Q714,188 714,192 V194 Q714,202 705,202" fill="none" stroke="#c4552a" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>- <g fill="#c4552a"><circle cx="684" cy="196" r="3.2"/><circle cx="692" cy="196" r="3.2"/><circle cx="700" cy="196" r="3.2"/></g>- <!-- AI sparkles -->- <g fill="#ffc94a" stroke="#2b2838" stroke-width="3.5" stroke-linejoin="round">- <use href="#sparkL" transform="translate(330 118)"/>- <use href="#sparkS" transform="translate(362 152)"/>- <use href="#sparkL" transform="translate(1072 178)"/>- <use href="#sparkS" transform="translate(1046 128)"/>- </g>-- <!-- ===== string, from hole to hole ===== -->- <path d="M440,292 Q593,336 745,300" fill="none" stroke="#2b2838" stroke-width="9" stroke-linecap="round"/>- <path d="M440,292 Q593,336 745,300" fill="none" stroke="#e6c48e" stroke-width="4" stroke-linecap="round"/>- </g>-</svg>diff --git a/site/who.svg b/site/who.svgdeleted file mode 100644index 4182046..0000000--- a/site/who.svg+++ /dev/null@@ -1,21 +0,0 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 741 528" width="741" height="528" role="img" aria-label="tincan who: every teammate's agent sessions and what each is doing">-<rect x="0.5" y="0.5" width="740" height="527" rx="12" fill="#16171d" stroke="#2c2e38"/>-<circle cx="24" cy="22" r="6" fill="#ff5f57"/><circle cx="44" cy="22" r="6" fill="#febc2e"/><circle cx="64" cy="22" r="6" fill="#28c840"/>-<g font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="14" style="white-space:pre">-<text x="28" y="66" xml:space="preserve"><tspan fill="#7fd6a4">$ </tspan><tspan fill="#ffffff" font-weight="700">tincan who</tspan></text>-<text x="28" y="90" xml:space="preserve"><tspan fill="#80838f">team </tspan><tspan fill="#ffffff" font-weight="700">vibes</tspan><tspan fill="#80838f"> · you are alex on mbp</tspan></text>-<text x="28" y="138" xml:space="preserve"><tspan fill="#7fd6a4">● </tspan><tspan fill="#ffffff" font-weight="700">alex · mbp ·</tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">this machine</tspan></text>-<text x="28" y="162" xml:space="preserve"><tspan fill="#d6d7de"> </tspan><tspan fill="#ffffff" font-weight="700">api-claude </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">claude-code</tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#f3c86f">busy 2m </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#d6d7de">acme/api@feat/auth</tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#7fd6a4">push</tspan><tspan fill="#d6d7de"> · </tspan><tspan fill="#ffffff" font-weight="700">← you</tspan></text>-<text x="28" y="186" xml:space="preserve"><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">↳ Session token rework · Moving sessions to JWT</tspan></text>-<text x="28" y="210" xml:space="preserve"><tspan fill="#d6d7de"> </tspan><tspan fill="#ffffff" font-weight="700">web-codex </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">codex </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">idle 14m</tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#d6d7de">acme/web@main </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#7fd6a4">push</tspan></text>-<text x="28" y="234" xml:space="preserve"><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">↳ Checkout page polish</tspan></text>-<text x="28" y="282" xml:space="preserve"><tspan fill="#7fd6a4">● </tspan><tspan fill="#ffffff" font-weight="700">alice · xps ·</tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#7fd6a4">direct 4ms</tspan></text>-<text x="28" y="306" xml:space="preserve"><tspan fill="#d6d7de"> </tspan><tspan fill="#ffffff" font-weight="700">api-cursor </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">cursor </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#f3c86f">busy 1m </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#d6d7de">acme/api@main </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#72c8e4">turn</tspan><tspan fill="#d6d7de"> · </tspan><tspan fill="#f3c86f">1 unread</tspan></text>-<text x="28" y="330" xml:space="preserve"><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">↳ Fixing flaky refresh-token test</tspan></text>-<text x="28" y="354" xml:space="preserve"><tspan fill="#d6d7de"> </tspan><tspan fill="#ffffff" font-weight="700">docs-pi </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">pi </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">idle 3m </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#d6d7de">acme/docs@main </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#7fd6a4">push</tspan></text>-<text x="28" y="402" xml:space="preserve"><tspan fill="#7fd6a4">● </tspan><tspan fill="#ffffff" font-weight="700">sam · nuc ·</tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#f3c86f">relay 38ms</tspan></text>-<text x="28" y="426" xml:space="preserve"><tspan fill="#d6d7de"> </tspan><tspan fill="#ffffff" font-weight="700">infra-reason</tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">reason </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#f3c86f">busy 6m </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#d6d7de">acme/infra </tspan><tspan fill="#d6d7de"> </tspan><tspan fill="#7fd6a4">push</tspan></text>-<text x="28" y="450" xml:space="preserve"><tspan fill="#d6d7de"> </tspan><tspan fill="#80838f">↳ Terraform state cleanup</tspan></text>-<text x="28" y="498" xml:space="preserve"><tspan fill="#80838f">push: sees it right away · turn: at its next step · pull: when it checks</tspan></text>-</g>-</svg>diff --git a/src/agent.rs b/src/agent.rsindex 965e1b5..a2fc1de 100644--- a/src/agent.rs+++ b/src/agent.rs@@ -9,7 +9,7 @@ use std::{pub const CLAUDE_CODE: &str = "claude-code";-/// Best guess from the environment the agent gives its children. `TINCAN_AGENT` (set by `reason network setup` in the+/// Best guess from the environment the agent gives its children. `REASON_NETWORK_AGENT` (set by `reason network setup` in the/// MCP config) wins.pub fn detect_env() -> Option<&'static str> {let has = |k: &str| std::env::var_os(k).is_some();@@ -72,7 +72,7 @@ pub fn multiplexed(agent: &str) -> bool {matches!(agent, "codex" | "opencode" | "cursor")}-/// The session id an agent exports to its MCP servers, if any. `TINCAN_SESSION` is set by our own pi extension.+/// The session id an agent exports to its MCP servers, if any. `REASON_NETWORK_SESSION` is set by our own pi extension.pub fn env_session_id(agent: &str) -> Option<String> {if let Some(id) = crate::paths::env_var("SESSION").ok().filter(|s| !s.is_empty()) {return Some(id);diff --git a/src/claude.rs b/src/claude.rsindex e2bdf64..16d7912 100644--- a/src/claude.rs+++ b/src/claude.rs@@ -1,5 +1,5 @@//! Claude Code keeps one `~/.claude/sessions/<pid>.json` per live session (name, cwd, busy/idle). Reading them-//! lists every Claude session on this machine, including ones that don't have tincan loaded.+//! lists every Claude session on this machine, including ones that don't have Reason Network loaded.use crate::{agent::ClaudeSocket, paths, util};use serde::Deserialize;@@ -52,7 +52,7 @@ impl ClaudeSession {}}-/// Whether tincan is one of Claude Code's MCP servers here (`reason network setup` chose Claude Code). Read once: the+/// Whether Reason Network is one of Claude Code's MCP servers here (`reason network setup` chose Claude Code). Read once: the/// daemon restarts after setup.pub fn wired() -> bool {static WIRED: std::sync::OnceLock<bool> = std::sync::OnceLock::new();diff --git a/src/client.rs b/src/client.rsindex 000be13..0406387 100644--- a/src/client.rs+++ b/src/client.rs@@ -208,7 +208,7 @@ async fn connect_or_start(start: bool) -> Result<ipc::Stream> {}/// Starts `reason network daemon` (`--service` with `service`) detached from this process group, logging to-/// `~/.tincan/daemon.log`.+/// `~/.reason/network/daemon.log`.pub fn start_daemon(service: bool) -> Result<std::process::Child> {paths::ensure_home()?;let log = std::fs::OpenOptions::new().create(true).append(true).open(paths::log())?;@@ -244,7 +244,7 @@ fn detach(cmd: &mut Command) -> std::io::Result<std::process::Child> {mod tests {#[test]fn a_daemon_runs_only_while_it_holds_the_lock() {- let dir = std::env::temp_dir().join(format!("tincan-lock-{}", std::process::id()));+ let dir = std::env::temp_dir().join(format!("reason-network-lock-{}", std::process::id()));std::fs::create_dir_all(&dir).unwrap();let path = dir.join("daemon.lock");// A pid left behind by a daemon that exited (or a zombie): the lock is free.diff --git a/src/config.rs b/src/config.rsindex 5ef9209..174f3de 100644--- a/src/config.rs+++ b/src/config.rs@@ -10,7 +10,7 @@ pub struct Config {pub person: Option<String>,/// Show teammates full working directories (otherwise only the last component, plus repo@branch).pub share_paths: bool,- /// Show teammates this machine's Claude Code sessions that don't have tincan loaded.+ /// Show teammates this machine's Claude Code sessions that don't have Reason Network loaded.pub share_unmanaged: bool,/// Find teammates on the local network with mDNS.pub lan: bool,diff --git a/src/daemon/directory.rs b/src/daemon/directory.rsindex 4858125..cba6f02 100644--- a/src/daemon/directory.rs+++ b/src/daemon/directory.rs@@ -50,7 +50,7 @@ enum Place {}impl Daemon {- /// This machine's sessions: running ones, plus (if `unmanaged`) Claude Code sessions without tincan.+ /// This machine's sessions: running ones, plus (if `unmanaged`) Claude Code sessions without Reason Network.pub(super) async fn local_rows(self: &Arc<Self>, me: Option<&str>, unmanaged: bool) -> Result<Vec<SessionInfo>> {let claude = tokio::task::spawn_blocking(claude::scan).await?;let mut cwds: Vec<String> = self.inner.lock().unwrap().live.values().map(|l| l.reg.cwd.clone()).collect();@@ -61,8 +61,8 @@ impl Daemon {gits.insert(cwd, info);}- // With Claude Code on tincan, every open Claude session is on it: sessions started before tincan was set- // up have no tincan tools, but take messages through their own socket and reply with the CLI.+ // With Claude Code on Reason Network, every open Claude session is on it: sessions started before Reason Network was set+ // up have no Reason Network tools, but take messages through their own socket and reply with the CLI.if claude::wired() {let now = util::now_ms();for c in &claude {@@ -255,7 +255,7 @@ impl Daemon {.any(|s| s.to_lowercase().contains(&f))});}- // Me first, then teammates; on tincan before not; live before offline.+ // Me first, then teammates; on Reason Network before not; live before offline.let rank = |r: &SessionInfo| {(r.person != self.person,diff --git a/src/daemon/mail.rs b/src/daemon/mail.rsindex ad637fb..9370952 100644--- a/src/daemon/mail.rs+++ b/src/daemon/mail.rs@@ -29,7 +29,7 @@ enum Channel {ClaudeSocket(u64),/// The agent's own CLI: `codex queue --thread <id> --message`, `reason session send <id> --message`.Command(&'static str, Vec<String>),- /// Straight into a Claude Code session's messaging socket (one without tincan's tools: it replies with the CLI).+ /// Straight into a Claude Code session's messaging socket (one without Reason Network's tools: it replies with the CLI).ClaudeDirect(agent::ClaudeSocket),/// Hooks inject it at the next tool call or turn end.Hook,@@ -366,7 +366,7 @@ impl Daemon {.and_then(|t| t.member(&peer).map(|m| m.person.clone())).ok_or_else(|| anyhow!("not a team member"))?;let msg = clean(msg)?;- // Messages go between agent sessions; an older tincan may still send to or from a person.+ // Messages go between agent sessions; an older Reason Network may still send to or from a person.if !msg.from.contains('/') || !msg.to.contains('/') {bail!(UPGRADE);}diff --git a/src/daemon/mod.rs b/src/daemon/mod.rsindex e588606..e4ef146 100644--- a/src/daemon/mod.rs+++ b/src/daemon/mod.rs@@ -7,7 +7,6 @@ mod mail;mod reason;mod sessions;mod teamops;-mod update;use crate::{config::Config,@@ -36,7 +35,7 @@ use tokio::{const GIT_TTL: Duration = Duration::from_secs(30);const MAX_WAIT: u64 = 600;-/// Runs the daemon. Only one runs per `TINCAN_HOME`: a second one exits, or with `service` waits its turn.+/// Runs the daemon. Only one runs per state folder (`REASON_NETWORK_HOME`): a second one exits, or with `service` waits its turn.pub async fn run(service: bool) -> Result<()> {// Windows runs what starts at logon in a console window of its own: carry on in a hidden process instead.#[cfg(windows)]@@ -65,9 +64,6 @@ pub async fn run(service: bool) -> Result<()> {if daemon.cfg.reason {tokio::spawn(daemon.clone().reason_loop());}- if update::allowed(daemon.cfg.auto_update) {- tokio::spawn(daemon.clone().update_loop());- }loop {let stream = listener.accept().await?;tokio::spawn(daemon.clone().serve(stream));diff --git a/src/daemon/reason.rs b/src/daemon/reason.rsindex 70eb4fa..0ab1f6f 100644--- a/src/daemon/reason.rs+++ b/src/daemon/reason.rs@@ -1,6 +1,6 @@//! Reason sessions. Reason's agent runs in its cloud, so there is no hook or MCP server here: when `reason` is on//! (`reason network setup`), the daemon lists your live Reason sessions (`reason session list --json`) every few seconds,-//! and delivers to them with `reason session send`. They reply through the tincan CLI, which runs here.+//! and delivers to them with `reason session send`. They reply through the Reason Network CLI, which runs here.use super::{Daemon, log};use crate::{agent, git::GitInfo, proto::*, util};diff --git a/src/daemon/update.rs b/src/daemon/update.rsdeleted file mode 100644index ff7abfb..0000000--- a/src/daemon/update.rs+++ /dev/null@@ -1,123 +0,0 @@-//! Keeps tincan up to date: every few hours the daemon looks for a newer release and, if there is one, installs it-//! over its own binary (with install.sh, or install.ps1 on Windows, checksum verified) and restarts on it. Off with-//! `auto_update = false`; never for builds run from a source tree.--use super::{Daemon, log};-use anyhow::{Result, bail};-use std::{sync::Arc, time::Duration};--const EVERY: Duration = Duration::from_secs(6 * 3600);--impl Daemon {- pub(super) async fn update_loop(self: Arc<Self>) {- tokio::time::sleep(Duration::from_secs(90)).await;- loop {- match update().await {- Ok(Some(v)) => {- log(&format!("updated to tincan {v}; restarting on it"));- self.restart_soon();- return;- }- Ok(None) => {}- Err(e) => log(&format!("checking for updates: {e:#}")),- }- tokio::time::sleep(EVERY).await;- }- }-}--/// Whether this binary may replace itself.-pub(super) fn allowed(enabled: bool) -> bool {- let from_source = crate::util::current_exe().is_ok_and(|p| p.components().any(|c| c.as_os_str() == "target"));- // Reason's CLI installs a pinned, checksum-verified build of this engine; it never replaces itself.- let _ = (enabled, from_source);- false-}--/// Installs the latest release if it is newer than this one; returns its version.-async fn update() -> Result<Option<String>> {- let latest = latest_version().await?;- if !newer(&latest, env!("CARGO_PKG_VERSION")) {- return Ok(None);- }- let dir = crate::util::current_exe()?.parent().map(|d| d.to_path_buf()).unwrap_or_default();- let mut cmd = tokio::process::Command::from(crate::installer(&dir));- cmd.stdin(std::process::Stdio::null())- .stdout(std::process::Stdio::piped())- .stderr(std::process::Stdio::piped())- .kill_on_drop(true);- // In its own process group, so a timeout kills the whole pipeline (curl and the inner sh too). (On Windows the- // installer is one PowerShell, which `kill_on_drop` ends.)- #[cfg(unix)]- cmd.process_group(0);- let child = cmd.spawn()?;- #[cfg(unix)]- let group = child.id();- let out = match tokio::time::timeout(Duration::from_secs(300), child.wait_with_output()).await {- Ok(out) => out?,- Err(_) => {- #[cfg(unix)]- if let Some(pgid) = group {- // SAFETY: signals the process group we just created.- unsafe { libc::killpg(pgid as libc::pid_t, libc::SIGKILL) };- }- bail!("install timed out");- }- };- if !out.status.success() {- bail!("install failed: {}", String::from_utf8_lossy(&out.stderr).trim());- }- // Restart only on a binary that really is newer (a release tagged without bumping its version must not loop).- let installed = dir.join(format!("tincan{}", std::env::consts::EXE_SUFFIX));- let installed = tokio::process::Command::new(installed).arg("--version").kill_on_drop(true).output();- let installed = tokio::time::timeout(Duration::from_secs(30), installed).await??;- let installed =- String::from_utf8_lossy(&installed.stdout).trim().rsplit(' ').next().unwrap_or_default().to_string();- if !newer(&installed, env!("CARGO_PKG_VERSION")) {- bail!("the latest release installed as {installed:?}, which is not newer than this one; not restarting");- }- Ok(Some(installed))-}--/// The newest release's version, from where GitHub's "latest release" link redirects.-async fn latest_version() -> Result<String> {- let repo = crate::paths::env_var("REPO").unwrap_or_else(|_| "larstalian/tincan".into());- let null = if cfg!(windows) { "NUL" } else { "/dev/null" };- let out = tokio::process::Command::new("curl")- .args([- "-fsSLI",- "--max-time",- "50",- "-o",- null,- "-w",- "%{url_effective}",- &format!("https://github.com/{repo}/releases/latest"),- ])- .stdin(std::process::Stdio::null())- .kill_on_drop(true)- .output();- let out = tokio::time::timeout(Duration::from_secs(60), out).await??;- let url = String::from_utf8_lossy(&out.stdout).to_string();- match url.rsplit_once("/tag/v") {- Some((_, v)) if out.status.success() && !v.is_empty() => Ok(v.trim().to_string()),- _ => bail!("no release found at {url}"),- }-}--/// `a` is a later version than `b` (`major.minor.patch`).-fn newer(a: &str, b: &str) -> bool {- let parse = |v: &str| -> Vec<u64> { v.split('.').map(|p| p.parse().unwrap_or(0)).collect() };- parse(a) > parse(b)-}--#[cfg(test)]-mod tests {- #[test]- fn versions_compare_by_number() {- assert!(super::newer("0.10.0", "0.9.3"));- assert!(super::newer("1.0.0", "0.99.99"));- assert!(!super::newer("0.6.3", "0.6.3"));- assert!(!super::newer("0.6.2", "0.6.10"));- }-}diff --git a/src/doing.rs b/src/doing.rsindex 502cefe..af4a42d 100644--- a/src/doing.rs+++ b/src/doing.rs@@ -246,7 +246,7 @@ mod tests {#[test]fn reads_appended_lines_and_rewritten_documents() {- let dir = std::env::temp_dir().join(format!("tincan-doing-{}", std::process::id()));+ let dir = std::env::temp_dir().join(format!("reason-network-doing-{}", std::process::id()));std::fs::create_dir_all(&dir).unwrap();let p = dir.join("t.jsonl");std::fs::write(&p, "{\"type\":\"ai-title\",\"aiTitle\":\"First\"}\n{\"partial\":").unwrap();diff --git a/src/hook.rs b/src/hook.rsindex 5a405da..87cf4bf 100644--- a/src/hook.rs+++ b/src/hook.rs@@ -1,5 +1,5 @@//! `reason network hook <agent> <event>`: run by an agent's hook system. Tells the daemon the session is alive (and busy-//! or idle), and prints whatever makes the agent show incoming mail. It never fails loudly: a broken tincan must+//! or idle), and prints whatever makes the agent show incoming mail. It never fails loudly: a broken Reason Network must//! not break the agent.use crate::{agent, client::Link, proto::*};@@ -91,7 +91,7 @@ async fn handle(let ids = reply.ids;let text = match (reply.text, ev, reply.address) {(Some(t), ..) => t,- // Say who it is on tincan once, at session start.+ // Say who it is on Reason Network once, at session start.(None, "start", Some(addr)) => {format!("reason network: you are {addr}. Teammates' agents can message you; list_team and send_message reach them."diff --git a/src/main.rs b/src/main.rsindex e5457bb..621e5e7 100644--- a/src/main.rs+++ b/src/main.rs@@ -26,41 +26,21 @@ use client::Link;use proto::*;use std::{io::Read, time::Duration};-/// The project's site, which serves `install.sh` and the join page. Release builds set `TINCAN_SITE_URL` to the-/// project's domain.-pub const SITE_URL: &str = match option_env!("TINCAN_SITE_URL") {- Some(u) if !u.is_empty() => u,- _ => "https://larstalian.github.io/tincan",-};+/// Reason Network's page; team links point at its join page.+pub const SITE_URL: &str = "https://reasonmachines.com/network";-/// The one line that installs tincan and runs `reason network <args>`: for macOS and Linux, and for Windows./// The name agents know this by: their MCP server, plugin and extension files, hook names.pub const AGENT_NAME: &str = "reason-network";-/// The name the upstream engine wired agents in under; `setup` takes out what this binary put there under it.+/// The name this engine used before it was Reason Network: `setup` takes out what this binary wired in under it, and+/// `paths` moves the state it kept under it.pub const LEGACY_NAME: &str = "tincan";-pub fn install_lines(args: &str) -> [String; 2] {- [- format!("curl -fsSL {SITE_URL}/install.sh | sh -s -- {args}"),- format!("powershell -c \"& ([scriptblock]::Create((irm {SITE_URL}/install.ps1))) {args}\""),- ]+/// The one line that installs Reason and joins with `invite`.+pub fn install_line(invite: &str) -> String {+ format!("curl -fsSL https://reasonmachines.com/install.sh | bash && reason network join {invite}")}-/// The install script, run without questions, installing into `dir`.-pub fn installer(dir: &std::path::Path) -> std::process::Command {- let mut cmd;- if cfg!(windows) {- cmd = std::process::Command::new("powershell");- cmd.args(["-NoProfile", "-NonInteractive", "-Command", &format!("irm {SITE_URL}/install.ps1 | iex")]);- } else {- cmd = std::process::Command::new("sh");- cmd.arg("-c").arg(format!("curl -fsSL {SITE_URL}/install.sh | sh"));- }- cmd.env("TINCAN_BIN_DIR", dir).env("TINCAN_NO_PROMPT", "1");- cmd-}--/// The team link: a page showing the one command that installs tincan and joins with `ticket`.+/// The team link: Reason Network's join page, carrying the `ticket`.pub fn join_url(ticket: &str) -> String {format!("{SITE_URL}/join/#{ticket}")}@@ -177,12 +157,12 @@ enum Cmd {#[arg(long)]all: bool,},- /// Wire tincan into the agents on this machine and install the background service+ /// Wire Reason Network into the agents on this machine and install the background serviceSetup {/// Show what would change without changing anything#[arg(long)]dry_run: bool,- /// Undo: remove tincan from every agent and remove the service+ /// Undo: remove Reason Network from every agent and remove the service#[arg(long)]remove: bool,/// Don't install the background service@@ -191,7 +171,7 @@ enum Cmd {},/// Check that everything is workingDoctor,- /// Install the latest release over this one+ /// Updates come with the Reason CLI (`reason update`)Upgrade,/// Called by agents' hooks#[command(hide = true)]@@ -213,7 +193,7 @@ enum Cmd {},/// Restart the daemonStop,- /// Wait for the next message to a named session, print it, and exit (for agents without tincan's tools, e.g.+ /// Wait for the next message to a named session, print it, and exit (for agents without Reason Network's tools, e.g./// cloud agents: run it again after replying)Listen {/// The session's name; reachable as <you>/<name>@@ -232,7 +212,9 @@ enum Cmd {#[tokio::main]async fn main() -> Result<()> {- match Cli::parse().cmd {+ let cmd = Cli::parse().cmd;+ paths::migrate();+ match cmd {Some(Cmd::Daemon { service }) => daemon::run(service).await,Some(Cmd::Mcp) => mcp::run().await,// Blocks this (the main) thread with AppKit's event loop; its daemon calls run on the runtime's workers.@@ -314,7 +296,7 @@ async fn cli(cmd: Cmd) -> Result<()> {bail!("empty message");}// Messages come from agent sessions: `--from`'s, this agent's, or from a plain terminal, `<you>/terminal`.- // An agent shell tincan doesn't know (its tools aren't loaded) counts as a terminal.+ // An agent shell Reason Network doesn't know (its tools aren't loaded) counts as a terminal.let send = |from: String| Request::Send {from,to: to.clone(),@@ -406,9 +388,8 @@ async fn cli(cmd: Cmd) -> Result<()> {let i: InviteInfo = link.call(Request::Invite { me, hours: hours.clamp(1, 24 * 30) }).await?;let who = if me { "another machine of yours" } else { "a teammate" };println!("Invite code for {who}: {}\n", i.code);- let [unix, windows] = install_lines(&i.code);- println!("They run this, which installs it and joins the team (the second line on Windows):\n");- println!(" {unix}\n {windows}\n");+ println!("They run this, which installs Reason and joins the team:\n");+ println!(" {}\n", install_line(&i.code));println!("(or `reason network join {}` if they have reason). Works once, within {}h, while this machine is online.",i.code, i.hoursdiff --git a/src/mcp.rs b/src/mcp.rsindex 53cb9cf..9457584 100644--- a/src/mcp.rs+++ b/src/mcp.rs@@ -27,8 +27,8 @@ use std::{};use tokio::sync::mpsc;-/// How agents should use tincan, kept once: in the skill, which cloud agents read on the site.-const SKILL: &str = include_str!("../site/skill/SKILL.md");+/// How agents should use Reason Network, kept once: in the skill, which Reason Network serves to cloud agents.+const SKILL: &str = include_str!("skill.md");fn instructions() -> String {// Windows checkouts may have turned the file's line ends into \r\n.diff --git a/src/net.rs b/src/net.rsindex 215ad9b..7f8de17 100644--- a/src/net.rs+++ b/src/net.rs@@ -28,6 +28,7 @@ use std::{};use tokio::sync::{Notify, mpsc, oneshot};+// Wire identifiers shared with every peer (and earlier builds): never change them.pub const ALPN: &[u8] = b"tincan/1";pub const JOIN_ALPN: &[u8] = b"tincan/join/1";const PROTO: u32 = 1;@@ -141,7 +142,7 @@ pub async fn check_relay(key: SecretKey, url: &str) -> Result<()> {}/// mDNS, minus the relay a neighbour advertises: a teammate still on n0's relays (it missed a switch, or runs an older-/// tincan) must not draw this machine onto them.+/// Reason Network) must not draw this machine onto them.#[derive(Debug)]struct NoRelays(MdnsAddressLookup);diff --git a/src/paths.rs b/src/paths.rsindex a73678f..a8cc268 100644--- a/src/paths.rs+++ b/src/paths.rs@@ -1,6 +1,11 @@-//! Where tincan keeps its state. `TINCAN_HOME` overrides `~/.tincan` (handy for running two "machines" side by side).-//! On Windows, `~` is the profile folder.-+//! Where Reason Network keeps its state: `~/.reason/network`, or `REASON_NETWORK_HOME` (handy for running two+//! "machines" side by side). On Windows, `~` is the profile folder.+//!+//! Builds before 0.10.1 kept it in `~/.<LEGACY_NAME>` (or `TINCAN_HOME`) as `<LEGACY_NAME>.db` and `.sock`. [`migrate`]+//! moves it here once, with the daemon that holds it stopped. Until that has happened, every path below still names+//! the old state, so a machine never loses its team.++use crate::LEGACY_NAME;use std::path::{Path, PathBuf};pub fn user_home() -> PathBuf {@@ -9,35 +14,72 @@ pub fn user_home() -> PathBuf {.unwrap_or_else(|| PathBuf::from("/"))}-/// A setting from the environment: `REASON_NETWORK_<name>`, else the engine's original `TINCAN_<name>` (which-/// earlier Reason CLIs and agent configs set).+/// A setting from the environment: `REASON_NETWORK_<name>`, else the name earlier builds read (which earlier Reason+/// CLIs and agent configs set).pub fn env_var(name: &str) -> Result<String, std::env::VarError> {- std::env::var(format!("REASON_NETWORK_{name}")).or_else(|_| std::env::var(format!("TINCAN_{name}")))+ std::env::var(format!("REASON_NETWORK_{name}")).or_else(|_| std::env::var(legacy_env(name)))}pub fn env_var_os(name: &str) -> Option<std::ffi::OsString> {- std::env::var_os(format!("REASON_NETWORK_{name}")).or_else(|| std::env::var_os(format!("TINCAN_{name}")))+ std::env::var_os(format!("REASON_NETWORK_{name}")).or_else(|| std::env::var_os(legacy_env(name)))+}++fn legacy_env(name: &str) -> String {+ format!("{}_{name}", LEGACY_NAME.to_uppercase())+}++fn default_home() -> PathBuf {+ user_home().join(".reason").join("network")+}++fn legacy_home() -> PathBuf {+ user_home().join(format!(".{LEGACY_NAME}"))}pub fn home() -> PathBuf {- env_var_os("HOME").map(PathBuf::from).unwrap_or_else(|| user_home().join(".tincan"))+ if let Some(h) = env_var_os("HOME") {+ return h.into();+ }+ let home = default_home();+ if !home.exists() && legacy_home().is_dir() {+ return legacy_home();+ }+ home+}++/// What the state files are called in `home`: `network`, or the old name while they haven't been moved.+fn stem(home: &Path) -> &'static str {+ if !home.join("network.db").exists() && home.join(format!("{LEGACY_NAME}.db")).exists() {+ LEGACY_NAME+ } else {+ "network"+ }}-/// `~/.tincan/tincan.sock`, unless that is too long for a Unix socket address (104 bytes on macOS): then a short-/// path in a private `/tmp/tincan-<uid>` directory, derived from the home directory so every client agrees on it.+/// `~/.reason/network/network.sock`, unless that is too long for a Unix socket address (104 bytes on macOS): then a+/// short path in a private `/tmp/reason-network-<uid>` directory, derived from the home directory so every client+/// agrees on it.#[cfg(unix)]pub fn socket() -> PathBuf {- let path = home().join("tincan.sock");+ socket_in(&home())+}++#[cfg(unix)]+fn socket_in(home: &Path) -> PathBuf {+ let stem = stem(home);+ let path = home.join(format!("{stem}.sock"));if path.as_os_str().len() < 100 {return path;}- short_dir().join(format!("{:016x}.sock", hash(&path)))+ short_dir(stem).join(format!("{:016x}.sock", hash(&path)))}/// A named pipe, named for the home directory so every client agrees on it.#[cfg(windows)]pub fn socket() -> PathBuf {- PathBuf::from(format!(r"\\.\pipe\tincan-{:016x}", hash(&home())))+ let home = home();+ let stem = if stem(&home) == LEGACY_NAME { LEGACY_NAME } else { "reason-network" };+ PathBuf::from(format!(r"\\.\pipe\{stem}-{:016x}", hash(&home)))}/// FNV-1a: stable across builds, unlike `DefaultHasher`.@@ -49,8 +91,68 @@ fn hash(path: &Path) -> u64 {}#[cfg(unix)]-fn short_dir() -> PathBuf {- PathBuf::from(format!("/tmp/tincan-{}", unsafe { libc::getuid() }))+fn short_dir(stem: &str) -> PathBuf {+ let name = if stem == LEGACY_NAME { LEGACY_NAME } else { "reason-network" };+ PathBuf::from(format!("/tmp/{name}-{}", unsafe { libc::getuid() }))+}++/// Moves state an earlier build left under the old names (see the module docs), once. Every command runs it first;+/// it costs a stat or two when there is nothing to move. One process moves while the others wait for it, and anything+/// that goes wrong leaves the old state in place, where [`home`] keeps finding it, to be moved next time.+pub fn migrate() {+ #[cfg(unix)]+ let _ = migrate_unix();+}++#[cfg(unix)]+fn migrate_unix() -> std::io::Result<()> {+ let explicit = env_var_os("HOME").map(PathBuf::from);+ let to = explicit.clone().unwrap_or_else(default_home);+ let folder = || explicit.is_none() && !to.exists() && legacy_home().is_dir();+ let files = || stem(&to) == LEGACY_NAME;+ if !folder() && !files() {+ return Ok(());+ }+ let dir = user_home().join(".reason");+ std::fs::create_dir_all(&dir)?;+ let Some(_moving) = crate::util::lock(&dir.join(".network-move.lock"), true)? else { return Ok(()) };+ if folder() {+ stop_daemon_in(&legacy_home())?;+ std::fs::rename(legacy_home(), &to)?;+ }+ if files() {+ stop_daemon_in(&to)?;+ // The write-ahead log first: until the database itself is renamed, this all runs again and finishes.+ for suffix in ["-wal", ""] {+ let (old, new) = (to.join(format!("{LEGACY_NAME}.db{suffix}")), to.join(format!("network.db{suffix}")));+ if old.exists() && !new.exists() {+ std::fs::rename(old, new)?;+ }+ }+ let _ = std::fs::remove_file(to.join(format!("{LEGACY_NAME}.db-shm")));+ let _ = std::fs::remove_file(to.join(format!("{LEGACY_NAME}.sock")));+ }+ Ok(())+}++/// Asks the daemon holding `home` (an earlier build, on the old names) to exit, and waits until it has.+#[cfg(unix)]+fn stop_daemon_in(home: &Path) -> std::io::Result<()> {+ use std::io::Write;+ let lock = home.join("daemon.lock");+ if !crate::util::locked(&lock) {+ return Ok(());+ }+ if let Ok(mut s) = std::os::unix::net::UnixStream::connect(socket_in(home)) {+ let _ = s.write_all(b"{\"id\":1,\"op\":\"shutdown\"}\n");+ }+ for _ in 0..100 {+ if !crate::util::locked(&lock) {+ return Ok(());+ }+ std::thread::sleep(std::time::Duration::from_millis(100));+ }+ Err(std::io::Error::other("the daemon on the old state didn't stop"))}/// Makes sure the socket's directory exists and that nobody else can get at it.@@ -58,7 +160,7 @@ fn short_dir() -> PathBuf {pub fn ensure_socket_dir() -> std::io::Result<()> {use std::os::unix::fs::{DirBuilderExt, MetadataExt};let dir = socket().parent().map(PathBuf::from).unwrap_or_else(home);- if dir != short_dir() {+ if dir != short_dir("network") && dir != short_dir(LEGACY_NAME) {return ensure_home();}let _ = std::fs::DirBuilder::new().mode(0o700).create(&dir);@@ -70,7 +172,8 @@ pub fn ensure_socket_dir() -> std::io::Result<()> {}pub fn db() -> PathBuf {- home().join("tincan.db")+ let home = home();+ home.join(format!("{}.db", stem(&home)))}pub fn config() -> PathBuf {diff --git a/src/proto.rs b/src/proto.rsindex 2699e15..3bde943 100644--- a/src/proto.rs+++ b/src/proto.rs@@ -1,5 +1,5 @@//! The local API between the daemon and its clients (`reason network mcp`, the CLI, hooks): one JSON object per line-//! over `~/.tincan/tincan.sock`. Requests carry an `id` and get a [`Reply`] with the same id; a connection that+//! over `~/.Reason Network/Reason Network.sock`. Requests carry an `id` and get a [`Reply`] with the same id; a connection that//! registered sessions also receives [`Event`]s for them.use serde::{Deserialize, Serialize};@@ -15,7 +15,7 @@ pub enum Tier {Turn,/// Seen only when the agent checks its inbox.Pull,- /// Not on tincan: cannot receive.+ /// Not on Reason Network: cannot receive.None,}diff --git a/src/render.rs b/src/render.rsindex 8dcf056..2920919 100644--- a/src/render.rs+++ b/src/render.rs@@ -33,7 +33,7 @@ const GREEN: &str = "32";const YELLOW: &str = "33";const CYAN: &str = "36";-/// The team directory. For an agent (`agent`) it is compact, and sessions without tincan are only counted (it+/// The team directory. For an agent (`agent`) it is compact, and sessions without Reason Network are only counted (it/// can't message them); people get more room, a dot for whether each machine is online, and colour.pub fn directory(d: &Directory, agent: bool, paint: Paint) -> String {let now = util::now_ms();@@ -218,7 +218,7 @@ pub fn send_result(r: &SendResult) -> String {}/// Messages framed for an agent's context: clearly peer input, with what it needs to reply. `agent` is the-/// recipient's agent kind, if known; `cli` when it has no tincan tools and replies with the CLI.+/// recipient's agent kind, if known; `cli` when it has no Reason Network tools and replies with the CLI.pub fn for_agent(msgs: &[Message], agent: Option<&str>, cli: bool) -> String {let mut out = String::new();for m in msgs {@@ -240,7 +240,7 @@ pub fn for_agent(msgs: &[Message], agent: Option<&str>, cli: bool) -> String {} else {format!("From {person}'s agent.")};- // No tincan tools (Reason's agent; a Claude session from before tincan), but commands run on this computer.+ // No Reason Network tools (Reason's agent; a Claude session from before Reason Network), but commands run on this computer.let reply = if cli || agent == Some("reason") {format!("Reply if useful: reason network send {} --from {} \"<reply>\"", last.from, last.to)} else {diff --git a/src/setup.rs b/src/setup.rsindex 77dcec4..45098d3 100644--- a/src/setup.rs+++ b/src/setup.rs@@ -2,9 +2,9 @@//! has them) and installs the daemon as a login service. `reason network setup --remove` undoes it. Every file it edits//! is backed up once, as `<file>.bak-reason`. Also `reason network doctor`.//!-//! The upstream engine wired agents in as `tincan`. Each step here also takes out what this binary's path put-//! there under that name, so an update moves an agent over and leaves nothing behind; a separately installed-//! tincan (another path) keeps its wiring.+//! Earlier builds wired agents in under `LEGACY_NAME`. Each step here also takes out what this binary's path put+//! there under that name, so an update moves an agent over and leaves nothing behind; another program of that name+//! (at another path) keeps its wiring.use crate::{AGENT_NAME, LEGACY_NAME, agent, client::Link, config::Config, paths, proto::*, render};use anyhow::{Context, Result, anyhow};@@ -14,7 +14,7 @@ use std::{process::Command,};-/// The service's name. A non-default `TINCAN_HOME` gets its own, so a second instance (or a test) can never+/// The service's name. A non-default `REASON_NETWORK_HOME` gets its own, so a second instance (or a test) can never/// replace the real one.fn service_name() -> String {service_label("com.reasonmachines.network")@@ -49,8 +49,8 @@ pub fn exe() -> Result<PathBuf> {Ok(exe.canonicalize()?)}-/// The command line agents run through a shell: `'/path/to/tincan' hook codex stop`. On Windows that shell is-/// PowerShell (`& 'C:\Users\Alex Smith\…\tincan.exe' hook codex stop`), and a path that needs no quotes also runs in+/// The command line agents run through a shell: `'/path/to/reason-network' hook codex stop`. On Windows that shell is+/// PowerShell (`& 'C:\Users\Alex Smith\…\reason-network.exe' hook codex stop`), and a path that needs no quotes also runs in/// cmd.exe.fn shell_cmd(exe: &Path, args: &str) -> String {let p = exe.display().to_string();@@ -792,7 +792,7 @@ async fn service(exe: &Path, remove: bool, dry: bool) -> Result<String> {}// Windows starts it with its command line and nothing else.if crate::paths::env_var_os("HOME").is_some() {- return Err(anyhow!("a logon entry can't set TINCAN_HOME"));+ return Err(anyhow!("a logon entry can't set REASON_NETWORK_HOME"));}let command = format!("\"{}\" daemon --service", exe.display());let did = !run_entry().is_some_and(|v| v.contains(&command));@@ -1070,11 +1070,10 @@ mod tests {fn hook_groups_merge_and_remove() {let mut hooks = serde_json::from_value::<Map<String, Value>>(json!({"Stop": [{ "hooks": [{ "type": "command", "command": "other-tool stop" }] }],- "PostToolUse": [{ "matcher": "*", "hooks": [{ "type": "command", "command": "/x/tincan hook codex post-tool-use" }] }],+ "PostToolUse": [{ "matcher": "*", "hooks": [{ "type": "command", "command": "/x/reason-network hook codex post-tool-use" }] }],})).unwrap();- let ours =- |e: &str| json!({ "hooks": [{ "type": "command", "command": format!("/y/tincan hook codex {e} ") }] });+ let ours = |e: &str| json!({ "hooks": [{ "type": "command", "command": format!("/y/reason-network hook codex {e} ") }] });merge_hook_groups(&mut hooks,"codex",@@ -1082,7 +1081,7 @@ mod tests {false,);assert_eq!(hooks["Stop"].as_array().unwrap().len(), 2, "keeps other tools' hooks");- assert_eq!(hooks["PostToolUse"].as_array().unwrap().len(), 1, "replaces the old tincan hook");+ assert_eq!(hooks["PostToolUse"].as_array().unwrap().len(), 1, "replaces our earlier hook");merge_hook_groups(&mut hooks, "codex", vec![], true);assert_eq!(hooks["Stop"].as_array().unwrap().len(), 1);assert!(!hooks.contains_key("PostToolUse"));@@ -1091,21 +1090,21 @@ mod tests {#[test]#[cfg(unix)]fn quoting() {- assert_eq!(shell_cmd(Path::new("/usr/local/bin/tincan"), "mcp"), "/usr/local/bin/tincan mcp");- assert_eq!(shell_cmd(Path::new("/Users/a b/tincan"), "mcp"), "'/Users/a b/tincan' mcp");+ assert_eq!(shell_cmd(Path::new("/usr/local/bin/reason-network"), "mcp"), "/usr/local/bin/reason-network mcp");+ assert_eq!(shell_cmd(Path::new("/Users/a b/reason-network"), "mcp"), "'/Users/a b/reason-network' mcp");}#[test]#[cfg(windows)]fn quoting() {assert_eq!(- shell_cmd(Path::new(r"C:\Users\alex\.local\bin\tincan.exe"), "mcp"),- r"C:\Users\alex\.local\bin\tincan.exe mcp"+ shell_cmd(Path::new(r"C:\Users\alex\.local\bin\reason-network.exe"), "mcp"),+ r"C:\Users\alex\.local\bin\reason-network.exe mcp");assert_eq!(- shell_cmd(Path::new(r"C:\Users\Alex O'Neil\tincan.exe"), "mcp"),- r"& 'C:\Users\Alex O''Neil\tincan.exe' mcp"+ shell_cmd(Path::new(r"C:\Users\Alex O'Neil\reason-network.exe"), "mcp"),+ r"& 'C:\Users\Alex O''Neil\reason-network.exe' mcp");- assert_eq!(me(Path::new(r"C:\a\tincan.exe")), r"C:\\a\\tincan.exe");+ assert_eq!(me(Path::new(r"C:\a\reason-network.exe")), r"C:\\a\\reason-network.exe");}}diff --git a/site/skill/SKILL.md b/src/skill.mdsimilarity index 100%rename from site/skill/SKILL.mdrename to src/skill.mddiff --git a/src/team.rs b/src/team.rsindex 0263198..10cfa41 100644--- a/src/team.rs+++ b/src/team.rs@@ -417,6 +417,7 @@ pub struct Ticket {pub peers: Vec<EndpointId>,}+/// Wire format shared with every peer (and earlier builds): never change it.const TICKET_PREFIX: &str = "tincan1";/// In place of a length: an n0 relay, given by its region (`use1-1` for `https://use1-1.relay.n0.iroh.link./`).const N0_RELAY: u8 = 0xFF;@@ -483,7 +484,7 @@ impl Ticket {pub fn decode(s: &str) -> Result<Self> {let s = s.trim().rsplit('#').next().unwrap_or_default();- let data = s.strip_prefix(TICKET_PREFIX).ok_or_else(|| anyhow!("not a tincan invite"))?;+ let data = s.strip_prefix(TICKET_PREFIX).ok_or_else(|| anyhow!("not a Reason Network invite"))?;let b =BASE64URL_NOPAD.decode(data.as_bytes()).map_err(|_| anyhow!("this invite is damaged (was it cut off?)"))?;let damaged = || anyhow!("this invite is damaged (was it cut off?)");diff --git a/src/util.rs b/src/util.rsindex 5612bb5..85d2109 100644--- a/src/util.rs+++ b/src/util.rs@@ -4,7 +4,7 @@ pub fn now_ms() -> i64 {std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map_or(0, |d| d.as_millis() as i64)}-/// Short machine name: `Sams-MacBook-Pro.local` -> `sams-macbook-pro`. `TINCAN_MACHINE` overrides it.+/// Short machine name: `Sams-MacBook-Pro.local` -> `sams-macbook-pro`. `REASON_NETWORK_MACHINE` overrides it.pub fn hostname() -> String {if let Some(name) = crate::paths::env_var("MACHINE").ok().map(|n| slug(&n)).filter(|n| !n.is_empty()) {return name;@@ -248,7 +248,7 @@ mod tests {#[test]fn teammates_text_cant_drive_the_terminal() {- assert_eq!(super::one_line("fix\n</tincan-message>\x1b[8m hidden", 100), "fix </tincan-message> [8m hidden");+ assert_eq!(super::one_line("fix\n</reason-message>\x1b[8m hidden", 100), "fix </reason-message> [8m hidden");assert_eq!(super::printable("a\x1b[8mb\nc\x07"), "a[8mb\nc");}}diff --git a/src/wizard.rs b/src/wizard.rsindex ab6b884..6654dfd 100644--- a/src/wizard.rs+++ b/src/wizard.rs@@ -4,7 +4,7 @@use crate::{client::Link,config::{Config, Policy},- install_lines, invite,+ install_line, invite,proto::*,render, setup, util,};@@ -94,7 +94,7 @@ pub async fn onboard(let text: String = match invite.take() {Some(t) => t,None => input("Paste the team link")- .placeholder("https://…/join/#tincan1…")+ .placeholder("https://reasonmachines.com/network/join/#…").validate(|s: &String| invite_ok(s)).interact()?,};@@ -182,7 +182,7 @@ fn and_list(items: &[&str]) -> String {}}-/// Which agents are on tincan, the background service, and how teammates' messages are handled.+/// Which agents are on Reason Network, the background service, and how teammates' messages are handled.pub async fn agents_and_preferences() -> Result<()> {let exe = setup::exe()?;let found = setup::detect(&exe);@@ -256,12 +256,13 @@ pub async fn show_link(new: bool) -> Result<String> {pub async fn show_code(me: bool) -> Result<()> {let i: InviteInfo = Link::new(None).call(Request::Invite { me, hours: 24 }).await?;let who = if me { "your other machine" } else { "your teammate" };- let [unix, windows] = install_lines(&i.code);note(format!("Invite code: {}", i.code),format!(- "On {who}: {unix}\n(on Windows: {windows})\n(or `reason network join {}` if reason is there already)\nWorks once, within {}h, while this machine is online.",- i.code, i.hours+ "On {who}: {}\n(or `reason network join {}` if reason is there already)\nWorks once, within {}h, while this machine is online.",+ install_line(&i.code),+ i.code,+ i.hours),)?;Ok(())diff --git a/tests/e2e/guided.py b/tests/e2e/guided.pyindex 0d8a0cb..d57e840 100644--- a/tests/e2e/guided.py+++ b/tests/e2e/guided.py@@ -8,8 +8,8 @@ Uses throwaway homes (agent configs are edited there, not yours) and answers "noimport os, pty, re, select, subprocess, tempfile, timeROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))-BIN = os.path.join(ROOT, "target", "debug", "tincan")-D = tempfile.mkdtemp(prefix="tincan-guided-")+BIN = os.path.join(ROOT, "target", "debug", "reason-network")+D = tempfile.mkdtemp(prefix="reason-network-guided-")ANSI = re.compile(r"\x1b\[[0-9;?]*[A-Za-z]|\x1b[()][A-Z0-9]|\r")DOWN, ENTER = "\x1b[B", "\r"results = []@@ -24,8 +24,8 @@ def env(who):home = os.path.join(D, who, "home")os.makedirs(os.path.join(home, ".codex"), exist_ok=True) # a "Codex" to set upe = {k: v for k, v in os.environ.items() if not k.startswith("CLAUDE")}- e.update(HOME=home, TINCAN_HOME=os.path.join(D, who, "tincan"), TINCAN_MACHINE=who + "-box", TINCAN_NO_MDNS="1",- TINCAN_CLAUDE_BIN="/nonexistent", TINCAN_NO_SERVICE="1", TERM="xterm-256color")+ e.update(HOME=home, REASON_NETWORK_HOME=os.path.join(D, who, "Reason Network"), REASON_NETWORK_MACHINE=who + "-box", REASON_NETWORK_NO_MDNS="1",+ REASON_NETWORK_CLAUDE_BIN="/nonexistent", REASON_NETWORK_NO_SERVICE="1", TERM="xterm-256color")return e@@ -85,13 +85,13 @@ try:t.wait()check("start a team with two answers (name, team) and get the team link", True)cfg = open(os.path.join(env("alex")["HOME"], ".codex", "config.toml")).read()- check("agents found were set up without asking", "[mcp_servers.tincan]" in cfg, cfg)+ check("agents found were set up without asking", "[mcp_servers.Reason Network]" in cfg, cfg)except AssertionError as e:check("start a team by prompts", False, str(e))def join_by_link(who, name, retry_name=None):- # What install.sh does with the link: `tincan join <link>`, answers from the terminal.+ # What install.sh does with the link: `reason network join <link>`, answers from the terminal.t = Term(["join", link], env(who))t.expect(r"What should teammates call you\?")t.send(name + ENTER)@@ -120,9 +120,9 @@ if link:t = Term([], env("alice"))t.expect(r"(alex · alex-box|team the boys)")t.wait()- check("`tincan` after joining shows the team instead of asking again", True)+ check("`Reason Network` after joining shows the team instead of asking again", True)except AssertionError as e:- check("`tincan` after joining shows the team", False, str(e))+ check("`Reason Network` after joining shows the team", False, str(e))t = Term(["join"], env("sam"))try:diff --git a/tests/e2e/hooks.py b/tests/e2e/hooks.pyindex 39bf2d0..54b7c79 100644--- a/tests/e2e/hooks.py+++ b/tests/e2e/hooks.py@@ -5,15 +5,15 @@import json, os, socket, subprocess, tempfile, threading, timeROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))-BIN = os.path.join(ROOT, "target", "debug", "tincan")-D = tempfile.mkdtemp(prefix="tincan-hooks-")+BIN = os.path.join(ROOT, "target", "debug", "reason-network")+D = tempfile.mkdtemp(prefix="reason-network-hooks-")env = {k: v for k, v in os.environ.items() if not k.startswith("CLAUDE")}-env.update(TINCAN_HOME=os.path.join(D, "home"), TINCAN_NO_MDNS="1", TINCAN_NO_SERVICE="1", TINCAN_MACHINE="box")-# A Claude Code setup of our own (never this machine's real sessions, which tincan could deliver into).+env.update(REASON_NETWORK_HOME=os.path.join(D, "home"), REASON_NETWORK_NO_MDNS="1", REASON_NETWORK_NO_SERVICE="1", REASON_NETWORK_MACHINE="box")+# A Claude Code setup of our own (never this machine's real sessions, which Reason Network could deliver into).CLAUDE = os.path.join(D, "claude")os.makedirs(os.path.join(CLAUDE, "sessions"))with open(os.path.join(CLAUDE, ".claude.json"), "w") as f:- json.dump({"mcpServers": {"tincan": {"type": "stdio", "command": BIN, "args": ["mcp"]}}}, f)+ json.dump({"mcpServers": {"reason-network": {"type": "stdio", "command": BIN, "args": ["mcp"]}}}, f)env["CLAUDE_CONFIG_DIR"] = CLAUDEresults = []@@ -70,7 +70,7 @@ check("…and goes away once it's done", "↳" not in out, out)# Geminigem = {"session_id": "g-1", "cwd": D, "hook_event_name": "SessionStart"}hook("gemini", "session-start", gem)-# Named after its directory, normalised by tincan: read it back rather than guess.+# Named after its directory, normalised by Reason Network: read it back rather than guess.gem_name = next(w for w in run("who").split() if w.endswith("-gemini"))run("send", gem_name, "gemini: run the tests")out = hook("gemini", "stop", gem)@@ -92,7 +92,7 @@ out = run("who", "oc-proj")check("opencode status registers a busy session", "oc-proj-opencode" in out and "busy" in out, out)run("send", "oc-proj-opencode", "opencode: ping")out = run("hook", "opencode", "poll", "--session", "o-1", cwd=oc)-check("opencode poll prints the framed message as plain text", out.startswith("<tincan-message") and "opencode: ping" in out, out)+check("opencode poll prints the framed message as plain text", out.startswith("<reason-message") and "opencode: ping" in out, out)out = run("hook", "opencode", "poll", "--session", "o-1", cwd=oc)check("…and nothing the next time", out == "", out)run("hook", "opencode", "doing", "--session", "o-1", "--doing", "Flaky login test · Bisecting the failure", cwd=oc)@@ -109,7 +109,7 @@ check("pi's extension registers the session, named for what it's doing", "pi-proout = run("send", "pi-proj-pi", "pi: stop and look at this")check("the sender hears pi gets it within seconds", "within seconds" in out, out)out = run("hook", "pi", "post-tool-use", "--session", "pi-1", cwd=pi_dir)-check("mid-run, pi gets it as plain text to steer in", out.startswith("<tincan-message") and "pi: stop and look at this" in out, out)+check("mid-run, pi gets it as plain text to steer in", out.startswith("<reason-message") and "pi: stop and look at this" in out, out)# Session end removes hook-only sessions.hook("gemini", "session-end", gem)@@ -128,24 +128,24 @@ check("an unknown name is an error", "no session called 'nobody-here'" in out, obot = subprocess.Popen([BIN, "listen", "--as", "bot", "--wait", "20"], env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)time.sleep(2)out = run("send", "alex/bot", "bot: summarise the open PRs")-check("a terminal send reaches a waiting `tincan listen` session", "waiting for messages" in out, out)+check("a terminal send reaches a waiting `reason network listen` session", "waiting for messages" in out, out)heard = bot.communicate(timeout=30)[0]check("listen prints it, from alex/terminal, with the CLI reply line",- "summarise the open PRs" in heard and 'from="alex/terminal"' in heard and "tincan send alex/terminal --from alex/bot" in heard, heard)+ "summarise the open PRs" in heard and 'from="alex/terminal"' in heard and "Reason Network send alex/terminal --from alex/bot" in heard, heard)out = run("send", "alex/terminal", "--from", "alex/bot", "two PRs open, both green")check("after listen exits, the bot can still send with --from", "alex/terminal" in out and "refused" not in out, out)out = run("listen", "--as", "terminal", "--wait", "3")-check("the terminal reads the reply with `tincan listen --as terminal`", "both green" in out and 'from="alex/bot"' in out, out)+check("the terminal reads the reply with `reason network listen --as terminal`", "both green" in out and 'from="alex/bot"' in out, out)out = run("listen", "--as", "terminal", "--wait", "0")check("…once", "No messages." in out, out)out = run("send", "alex/bot", "")check("an empty message is an error", "empty message" in out, out)-r = subprocess.run([BIN, "send", "alex/bot", "from a shell tincan doesn't know"], env=dict(env, CLAUDECODE="1", CLAUDE_CODE_SESSION_ID="not-on-tincan"),+r = subprocess.run([BIN, "send", "alex/bot", "from a shell Reason Network doesn't know"], env=dict(env, CLAUDECODE="1", CLAUDE_CODE_SESSION_ID="not-on-Reason Network"),capture_output=True, text=True, timeout=30)out = run("listen", "--as", "bot", "--wait", "3")-check("an agent shell tincan doesn't know sends as <me>/terminal", 'from="alex/terminal"' in out and "a shell tincan doesn't know" in out, r.stdout + r.stderr + out)+check("an agent shell Reason Network doesn't know sends as <me>/terminal", 'from="alex/terminal"' in out and "a shell Reason Network doesn't know" in out, r.stdout + r.stderr + out)-# Reason: its agent runs in the cloud; tincan lists the live sessions and sends with its CLI.+# Reason: its agent runs in the cloud; Reason Network lists the live sessions and sends with its CLI.fake_reason, reason_log = os.path.join(D, "fake-reason.sh"), os.path.join(D, "reason.log")listing = {"items": [{"session_id": "r-1", "status": "running", "title": "Fix flaky billing test", "repo": None, "branch": "reason/task-r1", "finished_at": None, "is_archived": False},@@ -159,12 +159,12 @@ if [ -f {fail_next} ]; then rm {fail_next}; echo "not signed in" >&2; exit 1; fiprintf '%s\\n' "$*" >> {reason_log}""")os.chmod(fake_reason, 0o755)-cfg = os.path.join(env["TINCAN_HOME"], "config.toml")+cfg = os.path.join(env["REASON_NETWORK_HOME"], "config.toml")with open(cfg) as f:text = f.read()with open(cfg, "w") as f:f.write(text.replace("reason = false", "reason = true"))-env["TINCAN_REASON_BIN"] = fake_reason+env["REASON_NETWORK_REASON_BIN"] = fake_reasonrun("stop")run("who")time.sleep(2)@@ -175,7 +175,7 @@ out = run("send", "fix-flaky-billing-reason", "reason: the billing test is flakytime.sleep(1)sent = open(reason_log).read() if os.path.exists(reason_log) else ""check("messages go in with `reason session send`", "queued into the Reason session" in out and sent.startswith("session send r-1 --message") and "flaky on main too" in sent, out + sent)-check("…telling it how to reply with the CLI", "tincan send alex/terminal --from alex/fix-flaky-billing-reason" in sent, sent)+check("…telling it how to reply with the CLI", "Reason Network send alex/terminal --from alex/fix-flaky-billing-reason" in sent, sent)run("send", "alex/terminal", "--from", "alex/fix-flaky-billing-reason", "found it: a timezone bug")out = run("listen", "--as", "terminal", "--wait", "3")check("its reply comes from the Reason session", 'from="alex/fix-flaky-billing-reason"' in out and "timezone bug" in out, out)@@ -189,7 +189,7 @@ while time.time() < deadline and open(reason_log).read().count("second try needecheck("a Reason push that fails is retried at a later sync", first == 0 and open(reason_log).read().count("second try needed") == 1,f"first={first} log={open(reason_log).read()[-300:]}")-# A Claude session that was open before tincan was set up: no restart needed. It's on the team at once, gets+# A Claude session that was open before Reason Network was set up: no restart needed. It's on the team at once, gets# messages through its own socket, and replies with the CLI.old_proj = os.path.join(D, "old-proj")os.makedirs(old_proj)@@ -214,7 +214,7 @@ out = run("send", "old-proj-claude", "old session: can you hear me?")time.sleep(1.5)frame = "".join(got)check("…it's delivered straight into the session", "delivered into the session" in out and "can you hear me?" in frame, out + frame)-check("…with how to reply using the CLI", "tincan send alex/terminal --from alex/old-proj-claude" in frame, frame)+check("…with how to reply using the CLI", "Reason Network send alex/terminal --from alex/old-proj-claude" in frame, frame)r = subprocess.run([BIN, "send", "alex/terminal", "loud and clear"], env=dict(env, CLAUDE_CODE_SESSION_ID="old-1", CLAUDECODE="1"),capture_output=True, text=True, timeout=30)out = run("listen", "--as", "terminal", "--wait", "3")@@ -260,14 +260,14 @@ time.sleep(3)zombies = subprocess.run(["ps", "-axo", "ppid=,stat="], capture_output=True, text=True).stdout.split("\n")mine = [z for z in zombies if z.split() and z.split()[0] == str(mcp.pid) and "Z" in z.split()[1]]check("an MCP server collects no zombies across daemon restarts", not mine, f"{len(mine)} zombies")-starts = open(os.path.join(env["TINCAN_HOME"], "daemon.log")).read().count("already running")+starts = open(os.path.join(env["REASON_NETWORK_HOME"], "daemon.log")).read().count("already running")check("…and doesn't race to start daemons", starts <= 3, f"{starts} duplicate starts")mcp.kill()# The daemon being down never breaks the agent.run("stop")-bad = dict(env, TINCAN_HOME="/nonexistent/dir/that/cannot/exist")+bad = dict(env, REASON_NETWORK_HOME="/nonexistent/dir/that/cannot/exist")r = subprocess.run([BIN, "hook", "codex", "post-tool-use"], env=bad, input='{"session_id":"x"}', capture_output=True, text=True, timeout=20)-check("hook exits 0 and prints nothing when tincan is broken", r.returncode == 0 and r.stdout == "", f"{r.returncode} {r.stdout!r}")+check("hook exits 0 and prints nothing when Reason Network is broken", r.returncode == 0 and r.stdout == "", f"{r.returncode} {r.stdout!r}")print(f"\n{sum(results)}/{len(results)} hook checks passed")raise SystemExit(0 if all(results) else 1)diff --git a/tests/e2e/two_machines.py b/tests/e2e/two_machines.pyindex c314b10..6210882 100644--- a/tests/e2e/two_machines.py+++ b/tests/e2e/two_machines.py@@ -1,4 +1,4 @@-"""Two 'machines' (two TINCAN_HOMEs) on one box, talking over iroh, with simulated agent sessions.+"""Two 'machines' (two REASON_NETWORK_HOMEs) on one box, talking over iroh, with simulated agent sessions.cargo build && python3 tests/e2e/two_machines.py@@ -8,8 +8,8 @@ test messages into that real session (they say "ignore this").import json, os, re, subprocess, tempfile, timeROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))-BIN = os.path.join(ROOT, "target", "debug", "tincan")-D = tempfile.mkdtemp(prefix="tincan-e2e-")+BIN = os.path.join(ROOT, "target", "debug", "reason-network")+D = tempfile.mkdtemp(prefix="reason-network-e2e-")H = {"alex": os.path.join(D, "alex"), "alice": os.path.join(D, "alice")}MACHINE = {"alex": "laptop", "alice": "desktop"}FAKE_CODEX = os.path.join(D, "fake-codex.sh")@@ -24,12 +24,12 @@ def check(name, ok, detail=""):def env(who, strip_claude=True):- e = dict(os.environ, TINCAN_HOME=H[who], TINCAN_MACHINE=MACHINE[who], TINCAN_NO_MDNS="1", TINCAN_NO_SERVICE="1", TINCAN_CODEX_BIN=FAKE_CODEX)+ e = dict(os.environ, REASON_NETWORK_HOME=H[who], REASON_NETWORK_MACHINE=MACHINE[who], REASON_NETWORK_NO_MDNS="1", REASON_NETWORK_NO_SERVICE="1", REASON_NETWORK_CODEX_BIN=FAKE_CODEX)if strip_claude:for k in list(e):if k.startswith("CLAUDE"):del e[k]- # Never this machine's real Claude sessions: tincan could deliver into them.+ # Never this machine's real Claude sessions: Reason Network could deliver into them.e["CLAUDE_CONFIG_DIR"] = os.path.join(D, "claude-config")return e@@ -91,26 +91,26 @@ out = cli("alex", "team")check("founder sees alice connected", re.search(r"alice\s+desktop\s+(direct|relay)", out) is not None, out)out = cli("alice", "join", link.group(1), "--as", "bob", "--no-setup")check("joining a second team is refused while yours has others, and says how to switch",- "already in team 'vibes' (with alex)" in out and "tincan leave" in out, out)+ "already in team 'vibes' (with alex)" in out and "Reason Network leave" in out, out)# Installed on its own and started a team by itself first: the team link still just works.-sam = dict(env("alice"), TINCAN_HOME=os.path.join(D, "sam"), TINCAN_MACHINE="mini")+sam = dict(env("alice"), REASON_NETWORK_HOME=os.path.join(D, "sam"), REASON_NETWORK_MACHINE="mini")r = subprocess.run([BIN, "init", "solo", "--as", "sam", "--no-setup"], env=sam, capture_output=True, text=True, timeout=90)r = subprocess.run([BIN, "join", link.group(1), "--as", "sam", "--no-setup"], env=sam, capture_output=True, text=True, timeout=90)check("a team of one is swapped for the team you join", "Joined team vibes as sam on mini." in r.stdout, r.stdout + r.stderr)subprocess.run([BIN, "leave"], env=sam, capture_output=True, timeout=60)subprocess.run([BIN, "stop"], env=sam, capture_output=True)os.makedirs(os.path.join(D, "bob"), exist_ok=True)-bob = dict(env("alice"), TINCAN_HOME=os.path.join(D, "bob"), TINCAN_MACHINE="nuc")+bob = dict(env("alice"), REASON_NETWORK_HOME=os.path.join(D, "bob"), REASON_NETWORK_MACHINE="nuc")out = cli("alex", "invite", "--code")code = re.search(r"Invite code for a teammate: ([a-z]+(?:-[a-z]+){3})", out)check("invite --code prints a four-word code", bool(code), out)r = subprocess.run([BIN, "join", code.group(1).replace("-", " ").upper(), "--as", "bob", "--no-setup"], env=bob,capture_output=True, text=True, timeout=90)check("joining with just the code works", "Joined team vibes as bob on nuc." in r.stdout, r.stdout + r.stderr)-r = subprocess.run([BIN, "join", code.group(1), "--as", "bob2", "--no-setup"], env=dict(bob, TINCAN_HOME=os.path.join(D, "bob2")),+r = subprocess.run([BIN, "join", code.group(1), "--as", "bob2", "--no-setup"], env=dict(bob, REASON_NETWORK_HOME=os.path.join(D, "bob2")),capture_output=True, text=True, timeout=90)check("a used code doesn't work twice", "Joined" not in r.stdout + r.stderr, r.stdout + r.stderr)-subprocess.run([BIN, "stop"], env=dict(bob, TINCAN_HOME=os.path.join(D, "bob2")), capture_output=True)+subprocess.run([BIN, "stop"], env=dict(bob, REASON_NETWORK_HOME=os.path.join(D, "bob2")), capture_output=True)out = subprocess.run([BIN, "link"], env=bob, capture_output=True, text=True, timeout=30).stdoutcheck("any member can show the same team link", link.group(1).split("#")[1][:40] in out.replace("\n", ""), out)subprocess.run([BIN, "stop"], env=bob, capture_output=True)@@ -123,18 +123,18 @@ time.sleep(7) # Claude's session registers after 3s; presence propagates everyout = codex.tool("list_team", {}, meta)claude_name = os.path.basename(ROOT).lower() + "-claude"check("alice's agent sees alex's session across machines", claude_name in out and "alex · laptop" in out, out)-# (After Codex's first tool call registered it.) Nobody reports a status: tincan reads the plan step in progress from Codex's own transcript.+# (After Codex's first tool call registered it.) Nobody reports a status: Reason Network reads the plan step in progress from Codex's own transcript.rollout = os.path.join(D, "rollout.jsonl")-plan = {"plan": [{"step": "set up fixtures", "status": "completed"}, {"step": "testing cross-machine tincan", "status": "in_progress"}]}+plan = {"plan": [{"step": "set up fixtures", "status": "completed"}, {"step": "testing cross-machine Reason Network", "status": "in_progress"}]}with open(rollout, "w") as f:f.write(json.dumps({"type": "response_item", "payload": {"type": "function_call", "name": "update_plan", "arguments": json.dumps(plan)}}) + "\n")hook("alice", "codex", "doing", {"session_id": "11111111-aaaa", "cwd": os.path.join(D, "work"), "transcript_path": rollout})time.sleep(3)out = cli("alex", "who")-check("alex sees what alice's codex is doing, read from its plan", "work-codex" in out and "testing cross-machine tincan" in out, out)+check("alex sees what alice's codex is doing, read from its plan", "work-codex" in out and "testing cross-machine Reason Network" in out, out)# --- messages across machines ----out = codex.tool("send_message", {"to": f"alex/{claude_name}", "message": "tincan e2e (cross-machine push): ignore this."}, meta)+out = codex.tool("send_message", {"to": f"alex/{claude_name}", "message": "Reason Network e2e (cross-machine push): ignore this."}, meta)want = "delivered into the session" if IN_CLAUDE else "only sees it when it checks"check("cross-machine send reaches the Claude session", want in out, out)out = cli("alex", "send", "alice/work-codex", "hello from alex's terminal")@@ -151,7 +151,7 @@ out = codex.tool("send_message", {"to": "alex/terminal", "message": "codex here:check("an agent can reply at once to a terminal that just messaged it", "→ alex/terminal: queued" in out or "→ alex/terminal: delivered" in out, out)time.sleep(1)out = cli("alex", "listen", "--as", "terminal", "--wait", "5")-check("…and `tincan listen --as terminal` shows the reply", "replying to your terminal" in out and 'from="alice/work-codex"' in out, out)+check("…and `reason network listen --as terminal` shows the reply", "replying to your terminal" in out and 'from="alice/work-codex"' in out, out)cli("alice", "listen", "--as", "fresh", "--wait", "0")cli("alice", "send", "alex/terminal", "--from", "alice/fresh", "first words from a new session")out = cli("alex", "send", "alice/fresh", "answered at once")@@ -202,7 +202,7 @@ check("message to alice is held by her policy", "held until alice approves" in oout = codex.tool("check_inbox", {}, meta)check("held message is not delivered", "held message" not in out, out)out = cli("alice", "held")-check("tincan held lists it", "held message" in out, out)+check("Reason Network held lists it", "held message" in out, out)cli("alice", "approve", "--all")out = codex.tool("check_inbox", {}, meta)check("approved message is delivered", "held message" in out, out)