@hanskristoffer/agentpool 0.17.0 → 0.18.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 +10 -8
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  One daemon per machine that:
4
4
 
5
- - pools several **Claude** and **Codex** subscriptions and moves to the next account when one hits its limit;
5
+ - pools several **Claude**, **Codex**, and **Cursor** subscriptions and moves to the next account when one hits its limit;
6
6
  - hosts **MCP servers** and gives each GitHub repo its own set (e.g. a separate PostHog project per repo), plus general ones for every repo;
7
7
  - **shares** all of it between your machines over Tailscale or an end-to-end encrypted relay, and keeps working when the other machines are offline.
8
8
 
@@ -66,6 +66,8 @@ If agentgate is already installed there, `agentgate join agr1.…` (relay) or `a
66
66
 
67
67
  The server now has every account, MCP instance and repo mapping, and takes over token refreshes.
68
68
 
69
+ To sign every machine in to GitHub and Infisical as you, run `agentgate logins share` on the machine where you are signed in, or use **Share** under **Shared logins** on the Machines screen. It shares the `gh` login for github.com and the Infisical CLI login, skipping either one this machine doesn't use. Every paired machine, including servers that join later, then runs `gh auth login` and `gh auth setup-git` with that token (so `gh` must be installed there) and gets the same Infisical session. The machine that shared re-reads its logins every ten minutes, so if you log in again there, the others follow. Infisical must keep its login in a file: if it uses the system keychain, run `infisical vault set file` and `infisical login` first. `agentgate logins` and the Machines screen show whether this machine is signed in with each login, and `agentgate logins forget github|infisical` stops sharing; machines already signed in stay signed in.
70
+
69
71
  **The relay invite never expires and is a master key.** Anyone who has it can read every account and MCP login, so share it privately. If it leaks, run `agentgate relay rotate` and have every relay machine join again with the new command. Removing a relay machine (`agentgate unpair <node>` or **Remove** in the app) rotates the same way. A rotation can't revoke Tailscale links, so also unpair the removed machine on every machine you keep. By default it uses the hosted relay at `https://agentgate-relay.hanskristoffer.dk`. To use your own instead, deploy `apps/relay` to your Cloudflare account (see [the relay](docs/operations/relay.md#deploying-and-self-hosting)) and pass `--relay-url`, or set `AGENTGATE_RELAY_URL`. `agentgate relay status` shows sync state and errors.
70
72
 
71
73
  To control the server from the native app over Tailscale, open the connection settings at the bottom of the sidebar, enter `http://srv.<tailnet>.ts.net:7878`, and paste the token printed by `agentgate admin-token` on the server. Remote management uses bearer authentication over Tailscale. The relay carries sync only, not remote management.
@@ -79,13 +81,13 @@ To control the server from the native app over Tailscale, open the connection se
79
81
  | Claude | `CLAUDE_CONFIG_DIR path` = `~/.config/agentgate/claude` |
80
82
  | Codex | `CODEX_HOME path` = `~/.config/agentgate/codex` |
81
83
 
82
- 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>`.
84
+ 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, Codex, and Cursor, 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>`.
83
85
 
84
- **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.
86
+ **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. Agent runs are pooled like Claude and Codex: set `CURSOR_API_BASE_URL` to `http://127.0.0.1:<port>/cursor` (the address `agentgate status` prints, with `/cursor` on the end). Other Cursor calls keep the CLI's own login. A machine on an older agentgate stops syncing once a Cursor account exists, until it is updated.
85
87
 
86
88
  ### Or: your normal Claude login
87
89
 
88
- `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.
90
+ `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`. That, and `setup --primary`, also write `~/.cursor/mcp.json`, so Cursor and the Cursor CLI get the same servers. Start a new session to pick them up. 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.
89
91
 
90
92
  ### Hand threads between machines
91
93
 
@@ -107,15 +109,15 @@ What to expect:
107
109
  - 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.
108
110
  - 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.
109
111
  - 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.
110
- - The first time a thread arrives on a machine, T3 Code fails the first message sent to it there. agentgate sends that message for you, asking the agent to reply "Ready", and sends it again when it fails, so your own first message works. A thread that was working then gets "Continue where you left off." Background tasks such as a command watching a PR are stopped on the machine the thread leaves, and the agent is told which ones were running so it can start them again. Later trips to the same machine reuse the thread and skip this.
112
+ - The first time a thread arrives on a machine, T3 Code fails the first message sent to it there. agentgate sends that message for you, asking the agent to reply "Ready", and sends it again when it fails, so your own first message works. A thread that was working then gets "Continue where you left off.", and messages you had queued are queued again behind it, in order. Background tasks such as a command watching a PR are stopped on the machine the thread leaves, and the agent is told which ones were running so it can start them again. Later trips to the same machine reuse the thread and skip this.
111
113
  - 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.
112
114
  - 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.
113
- - Claude Code threads only. Attachments, earlier turns' diffs and queued messages stay behind.
115
+ - Claude Code threads only. Attachments, including those on queued messages, and earlier turns' diffs stay behind.
114
116
  - agentgate's T3 Code token lasts 30 days. `agentgate t3` and the app show when to pair again.
115
117
 
116
118
  ### Keep projects in sync
117
119
 
118
- Turn on **Keep projects in sync** on the T3 Code page, or run `agentgate t3 sync on`, and a GitHub project you add in T3 Code on one machine shows up in T3 Code on your other machines. Machines check every 30 seconds, and opening the T3 Code page checks right away. Each machine needs T3 Code connected as above. A machine that already has a checkout of the repository gets a project for that checkout. Otherwise T3 Code clones it into the clone folder (`agentgate t3 dirs`) with that machine's own GitHub login, so `gh` must be signed in there. It clones over HTTPS, or over SSH when that machine's existing checkouts use SSH. Removing a project only removes it on that machine, and agentgate never adds it back there. A clone that failed is the exception: remove it in T3 Code and agentgate tries again.
120
+ Turn on **Keep projects in sync** on the T3 Code page, or run `agentgate t3 sync on`, and a GitHub project you add in T3 Code on one machine shows up in T3 Code on your other machines. Machines check every 30 seconds, and opening the T3 Code page checks right away. Each machine needs T3 Code connected as above. A machine that already has a checkout of the repository gets a project for that checkout. Otherwise T3 Code clones it into the clone folder (`agentgate t3 dirs`) with that machine's own GitHub login, so `gh` must be signed in there (`agentgate logins share` does that for every machine). It clones over HTTPS, or over SSH when that machine's existing checkouts use SSH. Removing a project only removes it on that machine, and agentgate never adds it back there. A clone that failed is the exception: remove it in T3 Code and agentgate tries again.
119
121
 
120
122
  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.
121
123
 
@@ -277,6 +279,6 @@ Builds produce four macOS/Linux binaries and `dist/SHA256SUMS`. Releases use [re
277
279
 
278
280
  The release also carries a signed app archive and `latest.json`. Installed apps check that on launch and every four hours and offer a restart to update; the public key in `tauri.conf.json` rejects anything not signed with the updater key. Keep that key: without it, installed copies can never update again. On launch, an updated app also replaces the daemon copy the service runs when it differs from the bundled one, then restarts the service.
279
281
 
280
- The bundled daemon is signed with the app's `Entitlements.plist`. It holds only `allow-jit`: under the hardened runtime, a compiled Bun binary without it falls back to the JavaScript interpreter and runs about 50 times slower. The standalone CLI binaries are not signed.
282
+ The bundled daemon is signed with the app's `Entitlements.plist`. It holds only `allow-jit`: under the hardened runtime, a compiled Bun binary without it falls back to the JavaScript interpreter and runs about 50 times slower. The release job signs the standalone macOS CLI binaries with the same certificate, without the hardened runtime. macOS ties privacy grants such as access to `~/Documents` to that signature, so they survive `agentgate update`; an ad-hoc signed binary would ask again after every update.
281
283
 
282
284
  See [release and recovery instructions](docs/operations/releasing.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanskristoffer/agentpool",
3
- "version": "0.17.0",
3
+ "version": "0.18.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.17.0",
26
- "agentpool-darwin-x64": "0.17.0",
27
- "agentpool-linux-x64": "0.17.0",
28
- "agentpool-linux-arm64": "0.17.0"
25
+ "agentpool-darwin-arm64": "0.18.0",
26
+ "agentpool-darwin-x64": "0.18.0",
27
+ "agentpool-linux-x64": "0.18.0",
28
+ "agentpool-linux-arm64": "0.18.0"
29
29
  }
30
30
  }