@hanskristoffer/agentpool 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +31 -3
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -45,7 +45,7 @@ agentgate service install # launchd (macOS) or systemd --user (Linux)
45
45
 
46
46
  You can do every setup step with the CLI. To use the native app, build it with `bun run build:desktop` and open **Agentgate.app**. It connects to `http://127.0.0.1:7878` by default. On a fresh machine, **Set up this machine** installs the bundled CLI in `~/.config/agentgate/bin`, initializes the store, and starts a launchd service. Add that folder to your shell PATH to use the CLI. Closing or removing the app leaves that service and its CLI running.
47
47
 
48
- The app has Accounts, Activity, MCP servers, Skills, Projects, Machines, and Settings screens. **Settings → Configure coding tools** generates the Claude/Codex folders and T3 settings. The app's service and coding-tool controls apply only to its configured local daemon; remote setup and services use the CLI on that machine.
48
+ The app has Accounts, Activity, MCP servers, Skills, Projects, Machines, T3 Code, and Settings screens. **Settings → Configure coding tools** generates the Claude/Codex folders and T3 settings. The app's service and coding-tool controls apply only to its configured local daemon; remote setup and services use the CLI on that machine.
49
49
 
50
50
  ## A second machine (e.g. an always-on server)
51
51
 
@@ -54,10 +54,10 @@ There are two ways to connect machines, and a machine can use both:
54
54
  - **Same network (Tailscale):** both machines are on your tailnet. Pairing uses a code that expires after 10 minutes.
55
55
  - **Relay:** works across any network, without Tailscale. Every record is encrypted before it leaves the machine; the relay stores only ciphertext and can't read your credentials.
56
56
 
57
- On the first machine, run `agentgate pair` or use **Pair a machine** in the app. In a terminal it asks which method to use; `--tailnet` and `--relay` skip the question. It prints one command to run on the server, which installs agentgate, joins, runs `agentgate setup` and installs the service (on Linux this also runs `loginctl enable-linger` so it survives logout/reboot):
57
+ On the first machine, run `agentgate pair` or use **Pair a machine** in the app. In a terminal it asks which method to use and what to name the other machine; `--tailnet`, `--relay` and `--name` skip the questions, and an empty name uses the other machine's hostname. It prints one command to run on the server, which installs agentgate, joins, installs the service (on Linux this also runs `loginctl enable-linger` so it survives logout/reboot), and runs `agentgate setup --primary` so that machine's own Claude Code and Codex go through agentgate with no further setup (undo with `agentgate setup --primary off`):
58
58
 
59
59
  ```sh
60
- curl -fsSL https://raw.githubusercontent.com/HansKristoffer/agentgate/main/install.sh | sh -s -- join agr1.…
60
+ curl -fsSL https://raw.githubusercontent.com/HansKristoffer/agentgate/main/install.sh | AGENTGATE_NAME=srv sh -s -- join agr1.…
61
61
  ```
62
62
 
63
63
  If agentgate is already installed there, `agentgate join agr1.…` (relay) or `agentgate join http://mac.<tailnet>.ts.net:7878 <code>` (Tailscale) joins without reinstalling. Mark an always-on server with `agentgate init --always-on` or the **Always on** switch.
@@ -79,10 +79,38 @@ To control the server from the native app over Tailscale, open the connection se
79
79
 
80
80
  One instance per provider covers every account; the daemon switches eligible accounts when quota is exhausted. Account-specific continuations require their original account; if it is unavailable, the client receives an explicit restart error. In the app's **Accounts** screen, choose an **Active subscription** separately for Claude and Codex, or click **Use subscription** on an account. Your choice applies to the next request in every routed session and syncs to paired machines; if it is unavailable, the pool falls back to another account. Choose **Automatic** to clear the preference. The CLI equivalent is `agentgate accounts pin <id>` / `agentgate accounts unpin <id>`.
81
81
 
82
+ **Cursor** accounts can be added too (`agentgate login cursor`, or **Add account** in the app). Agentgate keeps their logins, shows each account's monthly plan usage, counts their tokens in the overview chart (read from Cursor's usage history every 15 minutes), and syncs the accounts to paired machines, but it does not route Cursor's own traffic. A machine on an older agentgate stops syncing once a Cursor account exists, until it is updated.
83
+
82
84
  ### Or: your normal Claude login
83
85
 
84
86
  `agentgate setup --primary` adds `ANTHROPIC_BASE_URL` to `~/.claude/settings.json` and the agentgate MCP server to `~/.claude.json`, so the Claude Code you already use (and T3's default Claude instance) goes through agentgate while keeping its own login. Claude Desktop is not affected: it sets its own API address; see [Claude Desktop](docs/user/claude-desktop.md). For only the MCP servers, use `agentgate setup --mcp`. Model requests use the pool; other requests keep your login, and your login is also the last resort when every pooled account is exhausted. Undo with `agentgate setup --primary off` (the previous base URL is restored, and later settings edits are preserved). It does the same for `~/.codex/config.toml` (or `$CODEX_HOME`): an `agentgate` model provider with `requires_openai_auth = true`, so Codex, the Codex app and T3's default Codex instance send their own ChatGPT login along as the last resort. Only do this with `agentgate service install`, or Claude Code and Codex can't reach their providers while the daemon is down.
85
87
 
88
+ ### Hand threads between machines
89
+
90
+ Start a thread on your laptop, hand it to an always-on server while you are away, and hand it back to test and push. A handed-off thread moves with its Claude session and its code: unpushed commits and uncommitted and untracked files (respecting `.gitignore`). Code travels directly between the two machines over Tailscale, or end-to-end encrypted through the relay; nothing is pushed to `origin`.
91
+
92
+ Connect agentgate to the T3 Code on each machine once. In T3 Code open **Settings → Connections**, turn on **Network access** (T3 Code only offers pairing links while it is on), then under **Authorized clients** choose **Create link** with **Standard** permissions. Run `agentgate t3 connect <link>` within five minutes, then turn Network access off again if you like; agentgate connects over this machine only (on a headless server, `t3 pair` prints a token: `agentgate t3 connect --url http://127.0.0.1:3773 --token <token>`). The T3 Code page in the app has the same form under **Machines**. You can set up another machine from the one you are on: create the link in that machine's T3 Code, then paste it into its row under **Machines**, or run `agentgate t3 connect <link> --node srv`. The link travels to it over your paired connection, and that machine redeems it with its own T3 Code. Both machines need T3's Claude provider set to agentgate's `CLAUDE_CONFIG_DIR` (above), and must be paired over Tailscale or in the same relay group.
93
+
94
+ ```sh
95
+ agentgate threads # active threads on every machine
96
+ agentgate handoff <thread> # to the first available always-on machine
97
+ agentgate handoff <thread> --to here # bring a thread to the machine you are on
98
+ agentgate handoffs # recent handoffs, with step timings
99
+ ```
100
+
101
+ In the app, the **T3 Code** page shows every machine's threads with **To server** or **To here**. An agent can hand itself off with the `agentgate__handoff_thread` tool, which appears in sessions once T3 Code is connected.
102
+
103
+ What to expect:
104
+
105
+ - A working thread is stopped, moved, and continued on the other machine. On the source it is archived, and the uncommitted changes that were sent are kept in a `git stash` so the worktree is clean for the return trip. That stash is dropped when the thread comes back, because its changes come back with it.
106
+ - The other machine reuses a worktree already on the thread's branch, or creates one and runs the project's setup script. Later trips reuse it, so setup runs once per branch and machine.
107
+ - If the other machine's checkout has its own changes or commits, it keeps them and the handoff reports a warning. Your uncommitted changes then stay where they were.
108
+ - The first time a thread arrives on a machine, T3 Code fails the first message you send it there. Send it again; the second one resumes the session. Threads that were working get this retry automatically, and later trips to the same machine reuse the thread without the failure.
109
+ - The first time a thread arrives on a machine, T3 Code's import also picks up other recent Claude sessions run in that project's main checkout, so threads that ran there can show up twice. Threads in worktrees are not affected, and later trips skip the import.
110
+ - Through the relay, a handoff can move up to 512 MiB of code and session; the relay sees only encrypted data, its size and timing. Pair over Tailscale for larger repositories.
111
+ - Claude Code threads only. Attachments, earlier turns' diffs and queued messages stay behind.
112
+ - agentgate's T3 Code token lasts 30 days. `agentgate t3` and the app show when to pair again.
113
+
86
114
  The proxy now provides quota freshness and reset visibility, searchable **Activity** with request attempts and stream outcomes, bounded retries and local cooldowns, routing strategies and optional session affinity, model discovery/aliases/policies, batch verification, and revision-safe configuration previews. See [the proxy guide](docs/user/proxy.md) for controls, CLI examples, defaults, and upgrade requirements. Codex background usage polling is opt-in pending live endpoint validation.
87
115
 
88
116
  ## MCP servers per repo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanskristoffer/agentpool",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "license": "UNLICENSED",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,9 +22,9 @@
22
22
  "agentgate": "bin/agentpool.js"
23
23
  },
24
24
  "optionalDependencies": {
25
- "agentpool-darwin-arm64": "0.11.0",
26
- "agentpool-darwin-x64": "0.11.0",
27
- "agentpool-linux-x64": "0.11.0",
28
- "agentpool-linux-arm64": "0.11.0"
25
+ "agentpool-darwin-arm64": "0.13.0",
26
+ "agentpool-darwin-x64": "0.13.0",
27
+ "agentpool-linux-x64": "0.13.0",
28
+ "agentpool-linux-arm64": "0.13.0"
29
29
  }
30
30
  }