@certalis/agent-smith 0.1.9 → 0.1.11
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.
- package/README.md +12 -8
- package/dist/bin.js +149 -143
- package/dist/dashboard/{chunk-h03pp3xg.js → chunk-rnbsj0t8.js} +6 -6
- package/dist/dashboard/{chunk-h03pp3xg.js.map → chunk-rnbsj0t8.js.map} +58 -58
- package/dist/dashboard/index.html +3 -3
- package/dist/dashboard/manifest.json +2 -2
- package/dist/edge.js +13 -3
- package/dist/https.js +423 -0
- package/dist/pool.js +12446 -0
- package/dist/post-processor.worker.js +31 -31
- package/dist/server.js +46 -42
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ agent-smith
|
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
Or run it once without installing: `bunx @certalis/agent-smith`. To work from
|
|
48
|
-
source, clone this repository, then run `bun install && bun run
|
|
48
|
+
source, clone this repository, then run `bun install && bun run agent-smith`.
|
|
49
49
|
|
|
50
50
|
A host that supervises agent-smith itself can start the server in its own Bun
|
|
51
51
|
process, without the dashboard and with a private Unix socket beside the TCP port:
|
|
@@ -89,7 +89,7 @@ Codex works the same way with an OpenAI API key and an `openai-responses` pool.
|
|
|
89
89
|
|
|
90
90
|
The agents service and laptops can use one server-side pool through the
|
|
91
91
|
[authenticated HTTPS entrance](docs/https-edge.md) on managed HTTP hosts such as
|
|
92
|
-
Render. HTTPS needs no VPN or
|
|
92
|
+
Render. HTTPS needs no VPN: use the shipped standalone launcher or let an existing web service forward
|
|
93
93
|
only inference to the pool's private socket. Each device has its own revocable
|
|
94
94
|
key; provider tokens and the single database stay on the server.
|
|
95
95
|
|
|
@@ -97,7 +97,7 @@ Device keys allow independent revocation and cannot read management data.
|
|
|
97
97
|
This does not add per-client fairness or budgets.
|
|
98
98
|
|
|
99
99
|
Copy [`https-client.json`](examples/config/https-client.json) into your private
|
|
100
|
-
Agent
|
|
100
|
+
Agent Smith config. Put the device key in the owner-only file named by
|
|
101
101
|
`proxy_key_file`, not in the JSON or a shell profile. `base_url` is the endpoint
|
|
102
102
|
visible to your machine, not a second pool. The key can spend from the pool, but
|
|
103
103
|
cannot administer it. Remote client routing is off by default: set
|
|
@@ -122,6 +122,10 @@ their own marked `PATH` entry; they do not replace the real binaries or start a
|
|
|
122
122
|
second proxy. The forwarding key is for inference, not dashboard or management
|
|
123
123
|
access.
|
|
124
124
|
|
|
125
|
+
Claude sends one device credential in the API-key header to the gateway; it is
|
|
126
|
+
not an Anthropic Console key. Claude.ai cloud connectors are not available by default in this
|
|
127
|
+
mode; see the [client behavior and limits](docs/https-edge.md#configure-and-prove).
|
|
128
|
+
|
|
125
129
|
To switch back to ordinary local Claude Code/Codex, set `client.enabled` to
|
|
126
130
|
`false` and run `agent-smith install-client` again. It removes only its wrappers
|
|
127
131
|
and marked shell entry; it does not change the real clients or their credentials.
|
|
@@ -130,9 +134,9 @@ and marked shell entry; it does not change the real clients or their credentials
|
|
|
130
134
|
|
|
131
135
|
The config file is JSON, read at startup from:
|
|
132
136
|
|
|
133
|
-
- `~/.config/
|
|
137
|
+
- `~/.config/agent-smith/agent-smith.json` (or `$XDG_CONFIG_HOME/agent-smith/agent-smith.json`)
|
|
134
138
|
on macOS and Linux,
|
|
135
|
-
- or the path in `
|
|
139
|
+
- or the path in `AGENT_SMITH_CONFIG_PATH`.
|
|
136
140
|
|
|
137
141
|
Restart agent-smith after changing `providers`, `provider_pools`, `alerts` or
|
|
138
142
|
`block_when_all_full`.
|
|
@@ -144,7 +148,7 @@ Restart agent-smith after changing `providers`, `provider_pools`, `alerts` or
|
|
|
144
148
|
| `providers.<name>.base_url` | The upstream URL, for an endpoint compatible with one of the strategies. |
|
|
145
149
|
| `providers.<name>.models` | The models a provider serves, as `"client model": "provider model"`. A trailing `*` matches a prefix. Without it, the provider serves every model name unchanged. |
|
|
146
150
|
| `provider_pools.<protocol>` | The ordered providers for `anthropic-messages` or `openai-responses`. Clients reach it at `/v1/pool/<protocol>/*`, and the local wrappers use it automatically. |
|
|
147
|
-
| `client` | The Agent
|
|
151
|
+
| `client` | The Agent Smith origin and forwarding key used by `agent-smith install-client`. It is for this machine only; it does not define providers or a separate pool. |
|
|
148
152
|
| `team_routing` | Which subscription accounts may share a pool, and their usage caps. See the [configuration guide](docs/configuration.md#team-routing). |
|
|
149
153
|
| `alerts` | A Slack webhook or bot token and/or an email address that hear when a seat spends extra usage and when every account is full. A filled value turns its channel on. See [Alerts](docs/configuration.md#alerts). |
|
|
150
154
|
| `block_when_all_full` | `true` by default: when every account is full, every request is refused until the soonest reset, so none spends extra usage. |
|
|
@@ -209,7 +213,7 @@ the pool without SSH.
|
|
|
209
213
|
"client": {
|
|
210
214
|
"enabled": false,
|
|
211
215
|
"base_url": "http://127.0.0.1:18181",
|
|
212
|
-
"proxy_key_file": "~/.config/
|
|
216
|
+
"proxy_key_file": "~/.config/agent-smith/team-pool.key"
|
|
213
217
|
}
|
|
214
218
|
}
|
|
215
219
|
```
|
|
@@ -356,7 +360,7 @@ The server also exposes the routes directly:
|
|
|
356
360
|
- `http://localhost:8080/v1/pool/<protocol>/*`: a configured pool.
|
|
357
361
|
|
|
358
362
|
Run only the server with `agent-smith --serve`. Management writes need an
|
|
359
|
-
explicit `
|
|
363
|
+
explicit `AGENT_SMITH_ADMIN_KEY` sent as the `x-api-key` header. Read the
|
|
360
364
|
[configuration guide](docs/configuration.md) and the
|
|
361
365
|
[HTTP API reference](docs/api-http.md) before exposing anything beyond
|
|
362
366
|
localhost.
|