@certalis/agent-smith 0.1.8 → 0.1.9
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 +8 -2
- package/dist/bin.js +10 -1
- package/dist/post-processor.worker.js +3 -0
- package/dist/server.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,7 +100,8 @@ Copy [`https-client.json`](examples/config/https-client.json) into your private
|
|
|
100
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
|
-
cannot administer it.
|
|
103
|
+
cannot administer it. Remote client routing is off by default: set
|
|
104
|
+
`client.enabled` to `true` when this machine should use the shared pool.
|
|
104
105
|
|
|
105
106
|
An SSH tunnel remains an option for development. Use
|
|
106
107
|
[`team-client.json`](examples/config/team-client.json) and forward its local port
|
|
@@ -110,7 +111,7 @@ to the private server:
|
|
|
110
111
|
ssh -N -L 18181:127.0.0.1:8080 agent-smith-pool
|
|
111
112
|
```
|
|
112
113
|
|
|
113
|
-
Then
|
|
114
|
+
Then apply the flag with the normal client setup command:
|
|
114
115
|
|
|
115
116
|
```bash
|
|
116
117
|
agent-smith install-client
|
|
@@ -121,6 +122,10 @@ their own marked `PATH` entry; they do not replace the real binaries or start a
|
|
|
121
122
|
second proxy. The forwarding key is for inference, not dashboard or management
|
|
122
123
|
access.
|
|
123
124
|
|
|
125
|
+
To switch back to ordinary local Claude Code/Codex, set `client.enabled` to
|
|
126
|
+
`false` and run `agent-smith install-client` again. It removes only its wrappers
|
|
127
|
+
and marked shell entry; it does not change the real clients or their credentials.
|
|
128
|
+
|
|
124
129
|
## Configuration
|
|
125
130
|
|
|
126
131
|
The config file is JSON, read at startup from:
|
|
@@ -202,6 +207,7 @@ the pool without SSH.
|
|
|
202
207
|
```json
|
|
203
208
|
{
|
|
204
209
|
"client": {
|
|
210
|
+
"enabled": false,
|
|
205
211
|
"base_url": "http://127.0.0.1:18181",
|
|
206
212
|
"proxy_key_file": "~/.config/ccflare/team-pool.key"
|
|
207
213
|
}
|
package/dist/bin.js
CHANGED
|
@@ -1421,6 +1421,8 @@ function sanitizeClientRouting(value) {
|
|
|
1421
1421
|
if (!isRecord(value))
|
|
1422
1422
|
return;
|
|
1423
1423
|
const client = {};
|
|
1424
|
+
if (typeof value.enabled === "boolean")
|
|
1425
|
+
client.enabled = value.enabled;
|
|
1424
1426
|
if (typeof value.base_url === "string") {
|
|
1425
1427
|
try {
|
|
1426
1428
|
const url = new URL(value.base_url);
|
|
@@ -1726,6 +1728,7 @@ var init_src4 = __esm(() => {
|
|
|
1726
1728
|
getClientRouting() {
|
|
1727
1729
|
const client = this.data.client;
|
|
1728
1730
|
return {
|
|
1731
|
+
enabled: client?.enabled === true,
|
|
1729
1732
|
...client?.base_url && { baseUrl: client.base_url },
|
|
1730
1733
|
...client?.proxy_key_file && {
|
|
1731
1734
|
proxyKeyFile: client.proxy_key_file
|
|
@@ -4636,7 +4639,8 @@ var init_base = __esm(() => {
|
|
|
4636
4639
|
TRANSPORT_HEADERS_TO_DELETE = [
|
|
4637
4640
|
"host",
|
|
4638
4641
|
"accept-encoding",
|
|
4639
|
-
"content-encoding"
|
|
4642
|
+
"content-encoding",
|
|
4643
|
+
"transfer-encoding"
|
|
4640
4644
|
];
|
|
4641
4645
|
CLIENT_CREDENTIAL_HEADERS_TO_DELETE = [
|
|
4642
4646
|
"api-key",
|
|
@@ -18004,6 +18008,11 @@ Examples:
|
|
|
18004
18008
|
if (parsed.installClient) {
|
|
18005
18009
|
const config2 = new Config;
|
|
18006
18010
|
const client2 = config2.getClientRouting();
|
|
18011
|
+
if (!client2.enabled) {
|
|
18012
|
+
disableLocalClientRouting();
|
|
18013
|
+
console.log("Remote client routing is disabled (client.enabled=false).");
|
|
18014
|
+
return;
|
|
18015
|
+
}
|
|
18007
18016
|
if (!client2.baseUrl || !client2.proxyKeyFile) {
|
|
18008
18017
|
throw new Error("client.base_url and client.proxy_key_file are required before installing client wrappers");
|
|
18009
18018
|
}
|
|
@@ -1473,6 +1473,8 @@ function sanitizeClientRouting(value) {
|
|
|
1473
1473
|
if (!isRecord(value))
|
|
1474
1474
|
return;
|
|
1475
1475
|
const client = {};
|
|
1476
|
+
if (typeof value.enabled === "boolean")
|
|
1477
|
+
client.enabled = value.enabled;
|
|
1476
1478
|
if (typeof value.base_url === "string") {
|
|
1477
1479
|
try {
|
|
1478
1480
|
const url = new URL(value.base_url);
|
|
@@ -1778,6 +1780,7 @@ var init_src4 = __esm(() => {
|
|
|
1778
1780
|
getClientRouting() {
|
|
1779
1781
|
const client = this.data.client;
|
|
1780
1782
|
return {
|
|
1783
|
+
enabled: client?.enabled === true,
|
|
1781
1784
|
...client?.base_url && { baseUrl: client.base_url },
|
|
1782
1785
|
...client?.proxy_key_file && {
|
|
1783
1786
|
proxyKeyFile: client.proxy_key_file
|
package/dist/server.js
CHANGED
|
@@ -1459,7 +1459,8 @@ var init_base = __esm(() => {
|
|
|
1459
1459
|
TRANSPORT_HEADERS_TO_DELETE = [
|
|
1460
1460
|
"host",
|
|
1461
1461
|
"accept-encoding",
|
|
1462
|
-
"content-encoding"
|
|
1462
|
+
"content-encoding",
|
|
1463
|
+
"transfer-encoding"
|
|
1463
1464
|
];
|
|
1464
1465
|
CLIENT_CREDENTIAL_HEADERS_TO_DELETE = [
|
|
1465
1466
|
"api-key",
|
|
@@ -3992,6 +3993,8 @@ function sanitizeClientRouting(value) {
|
|
|
3992
3993
|
if (!isRecord(value))
|
|
3993
3994
|
return;
|
|
3994
3995
|
const client2 = {};
|
|
3996
|
+
if (typeof value.enabled === "boolean")
|
|
3997
|
+
client2.enabled = value.enabled;
|
|
3995
3998
|
if (typeof value.base_url === "string") {
|
|
3996
3999
|
try {
|
|
3997
4000
|
const url = new URL(value.base_url);
|
|
@@ -4297,6 +4300,7 @@ var init_src7 = __esm(() => {
|
|
|
4297
4300
|
getClientRouting() {
|
|
4298
4301
|
const client2 = this.data.client;
|
|
4299
4302
|
return {
|
|
4303
|
+
enabled: client2?.enabled === true,
|
|
4300
4304
|
...client2?.base_url && { baseUrl: client2.base_url },
|
|
4301
4305
|
...client2?.proxy_key_file && {
|
|
4302
4306
|
proxyKeyFile: client2.proxy_key_file
|
package/package.json
CHANGED