@atbash/cli 0.5.15-dev.17 → 0.5.15-dev.18
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 +6 -55
- package/dist/bin/atbash.js +1 -4
- package/dist/bin/atbash.js.map +1 -1
- package/dist/commands/connect.d.ts +24 -84
- package/dist/commands/connect.js +73 -289
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/held.js +4 -0
- package/dist/commands/held.js.map +1 -1
- package/dist/commands/history.js +2 -0
- package/dist/commands/history.js.map +1 -1
- package/dist/commands/judge.js +1 -0
- package/dist/commands/judge.js.map +1 -1
- package/dist/commands/policy.js +2 -0
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/setup.d.ts +8 -390
- package/dist/commands/setup.js +167 -1871
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/stats.js +1 -0
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/status.js +2 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/tier.js +2 -0
- package/dist/commands/tier.js.map +1 -1
- package/dist/commands/tools.js +7 -1
- package/dist/commands/tools.js.map +1 -1
- package/dist/commands/whoami.js +2 -0
- package/dist/commands/whoami.js.map +1 -1
- package/package.json +2 -3
- package/dist/commands/mcp-cmd.d.ts +0 -13
- package/dist/commands/mcp-cmd.js +0 -216
- package/dist/commands/mcp-cmd.js.map +0 -1
- package/dist/shared/atbash-targets.d.ts +0 -49
- package/dist/shared/atbash-targets.js +0 -63
- package/dist/shared/atbash-targets.js.map +0 -1
- package/dist/shared/openclaw-runtime.d.ts +0 -221
- package/dist/shared/openclaw-runtime.js +0 -453
- package/dist/shared/openclaw-runtime.js.map +0 -1
package/README.md
CHANGED
|
@@ -380,40 +380,12 @@ npx --yes @atbash/cli setup
|
|
|
380
380
|
| `--host <url>` | Deployment to check the agent's registration against |
|
|
381
381
|
| `--runtime <ids...>` | Only configure these runtimes (currently: `openclaw`) |
|
|
382
382
|
| `--dry-run` | Show which files would change, and the diffs, then exit WITHOUT writing |
|
|
383
|
-
| `-y, --yes` | Do not ask for confirmation before writing
|
|
384
|
-
| `--replace-key` | Consent to changing which agent this machine signs as, when the key supplied names a different agent than the one already here. Needed only for non-interactive runs |
|
|
383
|
+
| `-y, --yes` | Do not ask for confirmation before writing |
|
|
385
384
|
| `--no-install` | Write the key file and configs only; install no packages |
|
|
386
385
|
| `--skip-verify` | Make no network calls at all |
|
|
387
386
|
| `--allow-unrecognized-host` | Permit a `--host` outside the built-in Atbash allowlist |
|
|
388
387
|
| `--home <dir>` | Home directory to configure (for testing) |
|
|
389
388
|
|
|
390
|
-
**Onboarding a different agent on a machine that already has one.**
|
|
391
|
-
|
|
392
|
-
Supply the new agent's key and setup will offer to switch. This is the one change
|
|
393
|
-
it makes that is a *substitution* rather than an addition: afterwards every
|
|
394
|
-
integration reading `~/.config/atbash/guard-client-key` signs as the new agent, so
|
|
395
|
-
tool calls are attributed to it. So it is asked on its own:
|
|
396
|
-
|
|
397
|
-
```
|
|
398
|
-
This machine is about to change which agent it signs as.
|
|
399
|
-
now: 0237722e87b6636d67ee495f57e27eae0e2624a382d0603c3b3a396643f230bf94
|
|
400
|
-
new: 02b95c249d84f417e3e395a127425428b540671cc15881eb828c17b722a53fc599
|
|
401
|
-
Every integration on this machine reading ~/.config/atbash/guard-client-key
|
|
402
|
-
will switch to the new agent. The current key is archived first, to
|
|
403
|
-
~/.config/atbash/keys/0237722e….key, so the old agent stays recoverable.
|
|
404
|
-
|
|
405
|
-
Replace the agent this machine signs as? [y/N]
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
Answer **no** and nothing is changed at all — the run stops rather than configuring
|
|
409
|
-
a runtime for an agent whose key was never installed, which would leave the machine
|
|
410
|
-
signing as one agent while the dashboard shows another.
|
|
411
|
-
|
|
412
|
-
`-y/--yes` deliberately does **not** answer this question: agreeing to write files
|
|
413
|
-
is not the same as agreeing to become a different agent. A script that means it
|
|
414
|
-
passes `--replace-key`. A fresh machine, or a re-run with the same agent, never sees
|
|
415
|
-
the prompt.
|
|
416
|
-
|
|
417
389
|
If no key is supplied, setup looks in order at `--key`, `--key-file`, `--keys-dir`,
|
|
418
390
|
`ATBASH_AGENT_KEY`, the existing `~/.config/atbash/guard-client-key`, your
|
|
419
391
|
`atbash config`, and finally a hidden prompt that accepts **either** a key or a path.
|
|
@@ -425,11 +397,11 @@ Wherever it comes from, the key is written once to
|
|
|
425
397
|
|
|
426
398
|
- It never transmits the private key. The only network call is a registration
|
|
427
399
|
check, and that sends the **public** key.
|
|
428
|
-
- It never writes the private key into an MCP client config. The
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
400
|
+
- It never writes the private key into an MCP client config. The documented
|
|
401
|
+
`@atbash/mcp` wiring carries the key as an `ATBASH_AGENT_PRIVKEY` value inside
|
|
402
|
+
files like `claude_desktop_config.json`, and that package has no key-file
|
|
403
|
+
fallback today. MCP clients are detected and the snippet is printed for you to
|
|
404
|
+
add by hand.
|
|
433
405
|
- It never edits your application source. Code-level integrations (LangChain,
|
|
434
406
|
LangGraph, AutoGen, Eliza, the SDK boundary) stay yours to write.
|
|
435
407
|
- It never rewrites a config that uses comments or trailing commas — reserializing
|
|
@@ -441,27 +413,6 @@ Wherever it comes from, the key is written once to
|
|
|
441
413
|
Every file it changes is copied to a `.atbash-bak` alongside it first, and repeat
|
|
442
414
|
runs are idempotent.
|
|
443
415
|
|
|
444
|
-
### `atbash mcp`
|
|
445
|
-
|
|
446
|
-
Runs the Atbash MCP server, reading the agent key from `~/.config/atbash/guard-client-key` instead of from a config file. You do not normally run this by hand — it is what `atbash setup` puts in your MCP client's server list:
|
|
447
|
-
|
|
448
|
-
```json
|
|
449
|
-
{ "mcpServers": { "atbash": { "command": "npx", "args": ["--yes", "@atbash/cli", "mcp"] } } }
|
|
450
|
-
```
|
|
451
|
-
|
|
452
|
-
| Flag | Description |
|
|
453
|
-
|------|-------------|
|
|
454
|
-
| `--key-file <path>` | Agent key file to read (default: `~/.config/atbash/guard-client-key`) |
|
|
455
|
-
| `--endpoint <url>` | Atbash endpoint the server should use |
|
|
456
|
-
|
|
457
|
-
**Why this exists.** `@atbash/mcp` reads its identity from `ATBASH_AGENT_PRIVKEY` and has no key-file fallback, so the wiring in its own docs puts a raw private key inside `claude_desktop_config.json` — a file people sync between machines and paste into help requests. This launcher keeps the key in the 0600 file and passes it to the server through the child process environment, so nothing secret is written to a config file.
|
|
458
|
-
|
|
459
|
-
An `ATBASH_AGENT_PRIVKEY` already present in the environment still wins, so if you deliberately inject the key at launch time nothing changes for you.
|
|
460
|
-
|
|
461
|
-
**Known issue it works around.** Every published `@atbash/mcp` (0.1.0–0.1.3) fails to start: they import `getOrgTierInfo` as a named export from `@atbash/sdk`, and `@atbash/sdk@0.3.24` removed it, so their `^0.3.19` range resolves to a version that cannot satisfy the import. This launcher installs the compatible pair together (`@atbash/mcp@0.1.3` with `@atbash/sdk@0.3.23`). That pinned SDK is itself deprecated — the real fix is republishing `@atbash/mcp` against `@atbash/sdk@^0.7`.
|
|
462
|
-
|
|
463
|
-
First launch takes ~10–15s while npx caches the packages, then about a second. A client with a short startup timeout may fail once and succeed on retry.
|
|
464
|
-
|
|
465
416
|
### `atbash judge <action>`
|
|
466
417
|
|
|
467
418
|
Submit a pending action for judgment. The action string is the exact operation the agent is about to execute — a transfer, a command, a mutation.
|
package/dist/bin/atbash.js
CHANGED
|
@@ -20,12 +20,11 @@ const tools_1 = require("../commands/tools");
|
|
|
20
20
|
const held_1 = require("../commands/held");
|
|
21
21
|
const connect_1 = require("../commands/connect");
|
|
22
22
|
const setup_1 = require("../commands/setup");
|
|
23
|
-
const mcp_cmd_1 = require("../commands/mcp-cmd");
|
|
24
23
|
// ── Autocomplete ────────────────────────────────────────────────
|
|
25
24
|
const commands = [
|
|
26
25
|
"judge", "whoami", "policy", "tier", "tools", "held",
|
|
27
26
|
"history", "stats", "status", "keygen", "set", "unset",
|
|
28
|
-
"wipe", "config", "connect", "setup", "
|
|
27
|
+
"wipe", "config", "connect", "setup", "help",
|
|
29
28
|
];
|
|
30
29
|
const subcommands = {
|
|
31
30
|
judge: ["--context", "--agent-key", "--provider", "--model", "--org", "--endpoint", "--timeout", "--json"],
|
|
@@ -33,7 +32,6 @@ const subcommands = {
|
|
|
33
32
|
tools: ["--agent", "--org", "--count", "--json", "inspect", "count"],
|
|
34
33
|
held: ["--org", "--count", "--json", "reviews"],
|
|
35
34
|
connect: ["--host", "--home"],
|
|
36
|
-
mcp: ["--key-file", "--endpoint"],
|
|
37
35
|
setup: ["--key", "--key-file", "--keys-dir", "--host", "--runtime", "--dry-run", "--yes", "--no-install", "--skip-verify", "--home"],
|
|
38
36
|
set: ["agent-key", "org-name", "endpoint", "rid", "provider", "model"],
|
|
39
37
|
unset: ["agent-key", "org-name", "endpoint", "rid", "provider", "model"],
|
|
@@ -90,7 +88,6 @@ program
|
|
|
90
88
|
// Onboarding
|
|
91
89
|
(0, connect_1.registerConnectCommand)(program);
|
|
92
90
|
(0, setup_1.registerSetupCommand)(program);
|
|
93
|
-
(0, mcp_cmd_1.registerMcpCommand)(program);
|
|
94
91
|
async function main() {
|
|
95
92
|
await program.parseAsync(process.argv);
|
|
96
93
|
await (0, sdk_1.shutdownTelemetry)();
|
package/dist/bin/atbash.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atbash.js","sourceRoot":"","sources":["../../src/bin/atbash.ts"],"names":[],"mappings":";;;;;;AACA,yCAAoC;AACpC,wDAAgC;AAChC,qCAAgE;AAChE,6CAAyD;AACzD,+CAA2D;AAC3D,+CAA2D;AAC3D,iDAA6D;AAC7D,6CAAyD;AACzD,uDAA+D;AAC/D,+CAA2D;AAC3D,+CAA2D;AAC3D,2CAAuD;AACvD,6CAAyD;AACzD,2CAAuD;AACvD,iDAA6D;AAC7D,6CAAyD;
|
|
1
|
+
{"version":3,"file":"atbash.js","sourceRoot":"","sources":["../../src/bin/atbash.ts"],"names":[],"mappings":";;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AE,KAAK;IACb,gBAAgB,EAAE,IAAI;CACvB,CAAC,CAAC;AAEH,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,6EAA6E,CAAC;KAC1F,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AAEnE,OAAO;AACP,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAAC;AAC9B,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;AAC/B,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;AAC/B,IAAA,0BAAmB,EAAC,OAAO,CAAC,CAAC;AAE7B,aAAa;AACb,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAAC;AAE9B,oBAAoB;AACpB,IAAA,0BAAmB,EAAC,OAAO,CAAC,CAAC;AAE7B,OAAO;AACP,IAAA,gCAAsB,EAAC,OAAO,CAAC,CAAC;AAChC,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAAC;AAC9B,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;AAE/B,QAAQ;AACR,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;AAC/B,IAAA,kCAAqB,EAAC,OAAO,CAAC,CAAC;AAE/B,aAAa;AACb,IAAA,gCAAsB,EAAC,OAAO,CAAC,CAAC;AAChC,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAAC;AAE9B,KAAK,UAAU,IAAI;IACjB,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,IAAA,uBAAiB,GAAE,CAAC;AAC5B,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -14,6 +14,25 @@ import { Command } from "commander";
|
|
|
14
14
|
* The discovery mirrors the dashboard's src/lib/scan/discover.ts and produces
|
|
15
15
|
* the same relay-safe payload the session endpoint expects.
|
|
16
16
|
*/
|
|
17
|
+
/**
|
|
18
|
+
* Official Atbash deployments that legitimately serve the onboarding flow.
|
|
19
|
+
*
|
|
20
|
+
* The pairing screen builds `--host` from the page you opened, so every origin
|
|
21
|
+
* that can host onboarding must appear here. If production were missing, the real
|
|
22
|
+
* atbash.ai would be flagged "unrecognized destination" — a false alarm on the
|
|
23
|
+
* genuine article, which is worse than silence: it teaches people and agents to
|
|
24
|
+
* wave through the one warning that actually catches a swapped host.
|
|
25
|
+
*
|
|
26
|
+
* Matched on EXACT hostname, never a suffix — "atbash.ai.evil.com" must not pass.
|
|
27
|
+
* Deliberately not a *.vercel.app wildcard: that would bless anyone's preview.
|
|
28
|
+
*/
|
|
29
|
+
export declare const KNOWN_HOSTS: Set<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Used when neither --host nor ATBASH_HOST is given. Still the dev deployment,
|
|
32
|
+
* because it is the one running the current connector API; switch this to
|
|
33
|
+
* https://atbash.ai once production serves it (KNOWN_HOSTS already allows it).
|
|
34
|
+
*/
|
|
35
|
+
export declare const DEFAULT_HOST = "https://chromia-verified-ai-dev-two.vercel.app";
|
|
17
36
|
interface DeclaredTool {
|
|
18
37
|
name: string;
|
|
19
38
|
description?: string;
|
|
@@ -34,7 +53,6 @@ type Agent = {
|
|
|
34
53
|
detail: string;
|
|
35
54
|
declaredTools: DeclaredTool[];
|
|
36
55
|
surfaceEvidence?: SurfaceEvidence;
|
|
37
|
-
governance?: Governance;
|
|
38
56
|
} | {
|
|
39
57
|
type: "config";
|
|
40
58
|
label: string;
|
|
@@ -43,7 +61,6 @@ type Agent = {
|
|
|
43
61
|
mcpServers: Record<string, unknown>;
|
|
44
62
|
};
|
|
45
63
|
};
|
|
46
|
-
declare const MAX_RELAY_SERVERS = 200;
|
|
47
64
|
/** One-line skill description from SKILL.md frontmatter `description:` or first heading.
|
|
48
65
|
* Frontmatter is parsed with a real YAML parser (handles quotes, block scalars,
|
|
49
66
|
* folded/multiline values and nested maps that the previous regex mis-read). */
|
|
@@ -53,6 +70,10 @@ declare function describeSkill(text: string | undefined, fallback: string): stri
|
|
|
53
70
|
declare function safeDescription(raw: string): string | undefined;
|
|
54
71
|
/** Walk a skills root (bounded) → declared tools. Mirrors src/lib/scan/adapters/local-skills.ts. */
|
|
55
72
|
declare function enumerateSkills(root: string, maxDepth?: number, cap?: number): DeclaredTool[];
|
|
73
|
+
export declare const MCP_CONFIGS: {
|
|
74
|
+
label: string;
|
|
75
|
+
segs: string[];
|
|
76
|
+
}[];
|
|
56
77
|
/**
|
|
57
78
|
* THE sanitization boundary. Reduce an mcpServers map to the SANITIZED structural
|
|
58
79
|
* signal the hosted scanner needs — server name, host+path of the endpoint, and
|
|
@@ -66,88 +87,7 @@ declare function enumerateSkills(root: string, maxDepth?: number, cap?: number):
|
|
|
66
87
|
* size against the input size and label the result partial — see `discover()`.
|
|
67
88
|
*/
|
|
68
89
|
declare function relaySafeServers(servers: Record<string, unknown>): Record<string, unknown>;
|
|
69
|
-
/**
|
|
70
|
-
* Atbash's own wiring on this machine — is the boundary actually in place?
|
|
71
|
-
*
|
|
72
|
-
* The relay reported an agent's TOOL SURFACE and nothing about whether Atbash
|
|
73
|
-
* governs it, so the dashboard's "re-scan to confirm it reports as enforcing"
|
|
74
|
-
* had nothing to read. Worse, the two failures that matter most are invisible in
|
|
75
|
-
* a file listing: a plugin installed but never enabled, and a plugin enabled but
|
|
76
|
-
* pointed at no key. Both leave a machine that looks wired and enforces nothing.
|
|
77
|
-
*
|
|
78
|
-
* FILE READS ONLY. No processes are spawned, so this stays inside the read-only
|
|
79
|
-
* promise the onboarding page makes about this command. Everything below is a
|
|
80
|
-
* documented location:
|
|
81
|
-
*
|
|
82
|
-
* - OpenClaw: the plugin entry in `~/.openclaw/openclaw.json`. Both the current
|
|
83
|
-
* `openclaw` key and the legacy `atbash-plugin` key count, since the dashboard
|
|
84
|
-
* recognizes either.
|
|
85
|
-
* - Hermes: plugins are OPT-IN via a `plugins.enabled` allow-list in
|
|
86
|
-
* `~/.hermes/config.yaml` (hermes_cli/plugins.py:_get_enabled_plugins — a
|
|
87
|
-
* missing key means nothing loads), and the plugin reads its key path from
|
|
88
|
-
* `~/.hermes/.env`.
|
|
89
|
-
*
|
|
90
|
-
* `enforcing` is only ever true when BOTH the hook is switched on and a key path
|
|
91
|
-
* is configured. Reporting enforcement on the strength of an installed package
|
|
92
|
-
* would recreate the exact false green this is meant to catch.
|
|
93
|
-
*/
|
|
94
|
-
interface Governance {
|
|
95
|
-
installed: boolean;
|
|
96
|
-
enforcing: boolean;
|
|
97
|
-
entry?: string;
|
|
98
|
-
keyPathConfigured: boolean;
|
|
99
|
-
agentPubkey?: string;
|
|
100
|
-
/**
|
|
101
|
-
* Every agent this machine has been wired to, newest-known last.
|
|
102
|
-
*
|
|
103
|
-
* A machine governs exactly ONE agent at a time: the plugin config names one
|
|
104
|
-
* key path and that file holds one identity, so each `atbash setup` run
|
|
105
|
-
* displaces the previous agent and archives its key under
|
|
106
|
-
* `~/.config/atbash/keys/<pubkey>.key`. On a real box that had quietly rotated
|
|
107
|
-
* five times, nothing anywhere said so — the browser could not tell "already
|
|
108
|
-
* protected" from "protected, but for a different agent than the one you are
|
|
109
|
-
* onboarding".
|
|
110
|
-
*
|
|
111
|
-
* Only PUBLIC keys leave the machine, and only from filenames — the archived
|
|
112
|
-
* files are never opened. The current agent's key is included so the caller can
|
|
113
|
-
* mark which of the list is live without a second lookup.
|
|
114
|
-
*/
|
|
115
|
-
knownAgents?: string[];
|
|
116
|
-
}
|
|
117
90
|
/** Enumerate the agents/MCP tools configured on this machine. Read-only. */
|
|
118
91
|
declare function discover(home: string): Agent[];
|
|
119
|
-
/**
|
|
120
|
-
* Vet the SHAPE of a relay destination — a separate, earlier question than
|
|
121
|
-
* whether the host is one of ours.
|
|
122
|
-
*
|
|
123
|
-
* `--host` is copied off a web page and everything `discover()` finds is POSTed
|
|
124
|
-
* to it, so the string itself is attacker-influenced. Four refusals:
|
|
125
|
-
*
|
|
126
|
-
* - **Unparseable.** Anything unrecognized is refused rather than tried.
|
|
127
|
-
* - **Credentials** (`user:pass@`). They have no use here, and they are how a
|
|
128
|
-
* lookalike URL hides its real host from someone skimming a pasted command.
|
|
129
|
-
* - **A query string or fragment.** The endpoint path is APPENDED to this
|
|
130
|
-
* value, so a `?` or `#` swallows it and sends the payload somewhere nobody
|
|
131
|
-
* reviewed: `https://h/?x=` + `/api/agent-scan/...` requests `/` instead.
|
|
132
|
-
* - **Plain HTTP**, except to loopback so a local dev server still works.
|
|
133
|
-
*
|
|
134
|
-
* The KNOWN_HOSTS allowlist is the SEPARATE gate applied after this one, and it
|
|
135
|
-
* is what makes a swapped host non-exfiltrating; this is the shape check that
|
|
136
|
-
* keeps a well-formed-looking URL from quietly redirecting the request. Both
|
|
137
|
-
* must pass before anything is sent.
|
|
138
|
-
*/
|
|
139
|
-
export interface HostVerdict {
|
|
140
|
-
/** Normalized `scheme://host[/path]`; the raw trimmed input if unparseable. */
|
|
141
|
-
host: string;
|
|
142
|
-
hostname: string;
|
|
143
|
-
isLoopback: boolean;
|
|
144
|
-
/** An official Atbash deployment, or this machine for local development. */
|
|
145
|
-
recognized: boolean;
|
|
146
|
-
/** Non-null means refuse to send. User-facing text. */
|
|
147
|
-
problem: string | null;
|
|
148
|
-
/** Optional remediation line shown after `problem`. */
|
|
149
|
-
hint?: string;
|
|
150
|
-
}
|
|
151
|
-
export declare function checkRelayHost(raw: string): HostVerdict;
|
|
152
92
|
export declare function registerConnectCommand(program: Command): void;
|
|
153
|
-
export { discover, enumerateSkills, describeSkill, relaySafeServers, safeDescription
|
|
93
|
+
export { discover, enumerateSkills, describeSkill, relaySafeServers, safeDescription };
|