@atbash/cli 0.5.8 → 0.5.10
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 +41 -0
- package/dist/bin/atbash.js +5 -1
- package/dist/bin/atbash.js.map +1 -1
- package/dist/commands/connect.d.ts +27 -0
- package/dist/commands/connect.js +427 -0
- package/dist/commands/connect.js.map +1 -0
- package/package.json +11 -1
package/README.md
CHANGED
|
@@ -305,8 +305,49 @@ The agent is not trusted to know when it should stop. If the agent could loosen
|
|
|
305
305
|
|
|
306
306
|
`atbash tier --org <name>` shows the current tier for an org.
|
|
307
307
|
|
|
308
|
+
## Verifying this CLI before you run it (humans & AI agents)
|
|
309
|
+
|
|
310
|
+
`atbash connect` reads your local agent / MCP config and relays it to your onboarding session. Being cautious about that is correct — so the command is built to be **verified, not merely trusted**. Before running it you can independently confirm the three things that separate the real tool from a look-alike:
|
|
311
|
+
|
|
312
|
+
1. **What it will do — without sending anything.** Append `--dry-run`:
|
|
313
|
+
```bash
|
|
314
|
+
npx --yes @atbash/cli connect <CODE> --host <HOST> --dry-run --json
|
|
315
|
+
```
|
|
316
|
+
It runs the same read-only scan and prints the exact destination URL and the exact payload it *would* send, then exits. Nothing leaves the machine.
|
|
317
|
+
|
|
318
|
+
2. **That the package is genuinely ours (provenance).** Releases publish from CI with a signed provenance attestation linking the tarball to this public repo and commit:
|
|
319
|
+
```bash
|
|
320
|
+
npm view @atbash/cli --json | grep -A3 attestations # provenance is present
|
|
321
|
+
npm audit signatures # verify signatures on an install
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
3. **Where it sends and what it sends.** Exactly one POST, only to the `--host` you pass (HTTPS required; a non-default host is flagged loudly). It relays agent / tool / skill **names**, MCP endpoint URLs and launch commands — never tokens, auth headers, env values, or file contents.
|
|
325
|
+
|
|
326
|
+
If any check fails — no provenance, an unexpected destination, or a dry-run payload containing anything sensitive — **don't run it.** Those are exactly the signals a malicious clone cannot fake.
|
|
327
|
+
|
|
308
328
|
## Command reference
|
|
309
329
|
|
|
330
|
+
### `atbash connect <code>`
|
|
331
|
+
|
|
332
|
+
Link a machine to a hosted Atbash onboarding session. A browser can't read your disk and the Atbash server only sees its own, so this runs on the machine you want to govern, enumerates the agents / MCP tools configured there (read-only), and relays their *surface* to your onboarding session via the one-time pairing code shown in the browser.
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
# Pair this machine (code comes from the "Scan another machine" screen):
|
|
336
|
+
npx --yes @atbash/cli connect G9MB-TS3U --host https://your-atbash-host
|
|
337
|
+
|
|
338
|
+
# Verify first — same scan, prints destination + payload, sends nothing:
|
|
339
|
+
npx --yes @atbash/cli connect G9MB-TS3U --host https://your-atbash-host --dry-run
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
| Flag | Description |
|
|
343
|
+
|------|-------------|
|
|
344
|
+
| `--host <url>` | Atbash deployment hosting your session (HTTPS required) |
|
|
345
|
+
| `--dry-run` | Do the scan and print exactly what would be sent, then exit WITHOUT sending |
|
|
346
|
+
| `--json` | Machine-readable output (for agents / automation) |
|
|
347
|
+
| `--home <dir>` | Home directory to scan (for testing) |
|
|
348
|
+
|
|
349
|
+
Read-only, one request, then it exits. Relays tool **names**, MCP URLs and launch commands only — never tokens, headers, env values, or file contents. The machine's hostname is printed so you can confirm the results came from the box you meant to scan. See [Verifying this CLI](#verifying-this-cli-before-you-run-it-humans--ai-agents).
|
|
350
|
+
|
|
310
351
|
### `atbash judge <action>`
|
|
311
352
|
|
|
312
353
|
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
|
@@ -18,17 +18,19 @@ const policy_1 = require("../commands/policy");
|
|
|
18
18
|
const tier_1 = require("../commands/tier");
|
|
19
19
|
const tools_1 = require("../commands/tools");
|
|
20
20
|
const held_1 = require("../commands/held");
|
|
21
|
+
const connect_1 = require("../commands/connect");
|
|
21
22
|
// ── Autocomplete ────────────────────────────────────────────────
|
|
22
23
|
const commands = [
|
|
23
24
|
"judge", "whoami", "policy", "tier", "tools", "held",
|
|
24
25
|
"history", "stats", "status", "keygen", "set", "unset",
|
|
25
|
-
"wipe", "config", "help",
|
|
26
|
+
"wipe", "config", "connect", "help",
|
|
26
27
|
];
|
|
27
28
|
const subcommands = {
|
|
28
29
|
judge: ["--context", "--agent-key", "--provider", "--model", "--org", "--endpoint", "--timeout", "--json"],
|
|
29
30
|
policy: ["show"],
|
|
30
31
|
tools: ["--agent", "--org", "--count", "--json", "inspect", "count"],
|
|
31
32
|
held: ["--org", "--count", "--json", "reviews"],
|
|
33
|
+
connect: ["--host", "--home"],
|
|
32
34
|
set: ["agent-key", "org-name", "endpoint", "rid", "provider", "model"],
|
|
33
35
|
unset: ["agent-key", "org-name", "endpoint", "rid", "provider", "model"],
|
|
34
36
|
show: ["--agent-key", "--endpoint", "--json"],
|
|
@@ -81,6 +83,8 @@ program
|
|
|
81
83
|
// Setup
|
|
82
84
|
(0, keygen_1.registerKeygenCommand)(program);
|
|
83
85
|
(0, config_cmd_1.registerConfigCommand)(program);
|
|
86
|
+
// Onboarding
|
|
87
|
+
(0, connect_1.registerConnectCommand)(program);
|
|
84
88
|
async function main() {
|
|
85
89
|
await program.parseAsync(process.argv);
|
|
86
90
|
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;
|
|
1
|
+
{"version":3,"file":"atbash.js","sourceRoot":"","sources":["../../src/bin/atbash.ts"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AC,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;AAEhC,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"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
interface DeclaredTool {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
type Agent = {
|
|
7
|
+
type: "declared";
|
|
8
|
+
label: string;
|
|
9
|
+
detail: string;
|
|
10
|
+
declaredTools: DeclaredTool[];
|
|
11
|
+
} | {
|
|
12
|
+
type: "config";
|
|
13
|
+
label: string;
|
|
14
|
+
detail: string;
|
|
15
|
+
config: {
|
|
16
|
+
mcpServers: Record<string, unknown>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/** One-line skill description from SKILL.md frontmatter `description:` or first heading. */
|
|
20
|
+
declare function describeSkill(text: string | undefined, fallback: string): string;
|
|
21
|
+
/** Walk a skills root (bounded) → declared tools. Mirrors src/lib/scan/adapters/local-skills.ts. */
|
|
22
|
+
declare function enumerateSkills(root: string, maxDepth?: number, cap?: number): DeclaredTool[];
|
|
23
|
+
declare function relaySafeServers(servers: Record<string, unknown>): Record<string, unknown>;
|
|
24
|
+
/** Enumerate the agents/MCP tools configured on this machine. Read-only. */
|
|
25
|
+
declare function discover(home: string): Agent[];
|
|
26
|
+
export declare function registerConnectCommand(program: Command): void;
|
|
27
|
+
export { discover, enumerateSkills, describeSkill, relaySafeServers };
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.registerConnectCommand = registerConnectCommand;
|
|
40
|
+
exports.discover = discover;
|
|
41
|
+
exports.enumerateSkills = enumerateSkills;
|
|
42
|
+
exports.describeSkill = describeSkill;
|
|
43
|
+
exports.relaySafeServers = relaySafeServers;
|
|
44
|
+
const fs = __importStar(require("fs"));
|
|
45
|
+
const os = __importStar(require("os"));
|
|
46
|
+
const path = __importStar(require("path"));
|
|
47
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
48
|
+
/**
|
|
49
|
+
* `atbash connect <code>` — the local connector.
|
|
50
|
+
*
|
|
51
|
+
* A hosted Atbash onboarding page can't read your machine's filesystem, and the
|
|
52
|
+
* Atbash server only sees its own disk. This command runs on YOUR machine,
|
|
53
|
+
* enumerates the agents/MCP tools configured locally, and relays them to your
|
|
54
|
+
* onboarding session via a one-time pairing code shown in the browser.
|
|
55
|
+
*
|
|
56
|
+
* Read-only: it reads a fixed set of known agent config paths and reports the
|
|
57
|
+
* declared tool surface (server/skill NAMES) — never the secret values inside.
|
|
58
|
+
* It makes ONE outbound POST (the relay) and exits.
|
|
59
|
+
*
|
|
60
|
+
* The discovery mirrors the dashboard's src/lib/scan/discover.ts and produces
|
|
61
|
+
* the same relay-safe payload the session endpoint expects.
|
|
62
|
+
*/
|
|
63
|
+
/**
|
|
64
|
+
* Official Atbash deployments that legitimately serve the onboarding flow.
|
|
65
|
+
*
|
|
66
|
+
* The pairing screen builds `--host` from the page you opened, so every origin
|
|
67
|
+
* that can host onboarding must appear here. If production were missing, the real
|
|
68
|
+
* atbash.ai would be flagged "unrecognized destination" — a false alarm on the
|
|
69
|
+
* genuine article, which is worse than silence: it teaches people and agents to
|
|
70
|
+
* wave through the one warning that actually catches a swapped host.
|
|
71
|
+
*
|
|
72
|
+
* Matched on EXACT hostname, never a suffix — "atbash.ai.evil.com" must not pass.
|
|
73
|
+
* Deliberately not a *.vercel.app wildcard: that would bless anyone's preview.
|
|
74
|
+
*/
|
|
75
|
+
const KNOWN_HOSTS = new Set([
|
|
76
|
+
"atbash.ai",
|
|
77
|
+
"www.atbash.ai",
|
|
78
|
+
"chromia-verified-ai-dev-two.vercel.app",
|
|
79
|
+
"https://chromia-verified-ai-agent-scan.vercel.app"
|
|
80
|
+
]);
|
|
81
|
+
/**
|
|
82
|
+
* Used when neither --host nor ATBASH_HOST is given. Still the dev deployment,
|
|
83
|
+
* because it is the one running the current connector API; switch this to
|
|
84
|
+
* https://atbash.ai once production serves it (KNOWN_HOSTS already allows it).
|
|
85
|
+
*/
|
|
86
|
+
const DEFAULT_HOST = "https://chromia-verified-ai-dev-two.vercel.app";
|
|
87
|
+
// ── filesystem helpers (all best-effort; never throw) ────────────────────────
|
|
88
|
+
const exists = (...segs) => {
|
|
89
|
+
try {
|
|
90
|
+
return fs.existsSync(path.join(...segs));
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
const readJson = (...segs) => {
|
|
97
|
+
try {
|
|
98
|
+
return JSON.parse(fs.readFileSync(path.join(...segs), "utf8"));
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const readText = (...segs) => {
|
|
105
|
+
try {
|
|
106
|
+
return fs.readFileSync(path.join(...segs), "utf8");
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const listDirs = (...segs) => {
|
|
113
|
+
try {
|
|
114
|
+
return fs.readdirSync(path.join(...segs), { withFileTypes: true })
|
|
115
|
+
.filter((e) => e.isDirectory())
|
|
116
|
+
.map((e) => e.name);
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return [];
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
/** One-line skill description from SKILL.md frontmatter `description:` or first heading. */
|
|
123
|
+
function describeSkill(text, fallback) {
|
|
124
|
+
if (!text)
|
|
125
|
+
return fallback;
|
|
126
|
+
const frontmatter = (text.match(/^---\r?\n([\s\S]*?)\r?\n---/) || [])[1];
|
|
127
|
+
const field = frontmatter ? frontmatter.match(/^[ \t]*description:[ \t]*(.*)$/im) : null;
|
|
128
|
+
if (frontmatter && field) {
|
|
129
|
+
const inline = field[1].trim();
|
|
130
|
+
if (/^[>|][+-]?\d*$/.test(inline)) {
|
|
131
|
+
const lines = [];
|
|
132
|
+
for (const line of frontmatter.slice((field.index ?? 0) + field[0].length).split(/\r?\n/)) {
|
|
133
|
+
if (!line.trim()) {
|
|
134
|
+
if (lines.length)
|
|
135
|
+
break;
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
if (!/^[ \t]/.test(line))
|
|
139
|
+
break; // dedent ends the block scalar
|
|
140
|
+
lines.push(line.trim());
|
|
141
|
+
}
|
|
142
|
+
const folded = lines.join(" ").trim();
|
|
143
|
+
if (folded)
|
|
144
|
+
return folded;
|
|
145
|
+
}
|
|
146
|
+
else if (inline) {
|
|
147
|
+
return inline.replace(/^["']|["']$/g, "").trim();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
const heading = text.split(/\r?\n/).map((l) => l.trim())
|
|
151
|
+
.find((l) => l && !l.startsWith("---") && !/^(name|description):/i.test(l));
|
|
152
|
+
return heading ? heading.replace(/^#+\s*/, "").trim() : fallback;
|
|
153
|
+
}
|
|
154
|
+
/** Walk a skills root (bounded) → declared tools. Mirrors src/lib/scan/adapters/local-skills.ts. */
|
|
155
|
+
function enumerateSkills(root, maxDepth = 3, cap = 400) {
|
|
156
|
+
const tools = [];
|
|
157
|
+
const walk = (dir, depth, category) => {
|
|
158
|
+
if (depth > maxDepth || tools.length >= cap)
|
|
159
|
+
return;
|
|
160
|
+
let entries;
|
|
161
|
+
try {
|
|
162
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (entries.some((e) => e.isFile() && e.name === "SKILL.md")) {
|
|
168
|
+
const name = path.basename(dir);
|
|
169
|
+
tools.push({ name, description: describeSkill(readText(dir, "SKILL.md"), `${category} skill`) });
|
|
170
|
+
return; // a skill folder is a leaf
|
|
171
|
+
}
|
|
172
|
+
for (const e of entries)
|
|
173
|
+
if (e.isDirectory() && tools.length < cap)
|
|
174
|
+
walk(path.join(dir, e.name), depth + 1, path.basename(dir));
|
|
175
|
+
};
|
|
176
|
+
walk(root, 0, path.basename(root));
|
|
177
|
+
return tools;
|
|
178
|
+
}
|
|
179
|
+
const MCP_CONFIGS = [
|
|
180
|
+
{ label: "Claude Desktop", segs: ["Library", "Application Support", "Claude", "claude_desktop_config.json"] },
|
|
181
|
+
{ label: "Claude Desktop", segs: [".config", "Claude", "claude_desktop_config.json"] },
|
|
182
|
+
{ label: "Cursor", segs: [".cursor", "mcp.json"] },
|
|
183
|
+
{ label: "Windsurf", segs: [".codeium", "windsurf", "mcp_config.json"] },
|
|
184
|
+
{ label: "VS Code (MCP)", segs: [".vscode", "mcp.json"] },
|
|
185
|
+
{ label: "Gemini CLI", segs: [".gemini", "settings.json"] },
|
|
186
|
+
{ label: "Continue", segs: [".continue", "config.json"] },
|
|
187
|
+
];
|
|
188
|
+
/**
|
|
189
|
+
* OpenAI Codex CLI stores config as TOML with [mcp_servers.<name>] tables. The
|
|
190
|
+
* header must be ONE key (bare or quoted); a dotted tail is a SUB-TABLE of that
|
|
191
|
+
* server, and `enabled = false` means declared-but-off. Keep in sync with
|
|
192
|
+
* parseCodexMcpServers in src/lib/scan/discover.ts.
|
|
193
|
+
*/
|
|
194
|
+
function parseCodexMcpServers(toml) {
|
|
195
|
+
const servers = {};
|
|
196
|
+
const re = /\[mcp_servers\.(?:"([^"\]]+)"|([A-Za-z0-9_-]+))\]([\s\S]*?)(?=\n\s*\[|$)/g;
|
|
197
|
+
let m;
|
|
198
|
+
while ((m = re.exec(toml))) {
|
|
199
|
+
const body = m[3];
|
|
200
|
+
if (/^\s*enabled\s*=\s*false\b/m.test(body))
|
|
201
|
+
continue; // declared but switched off
|
|
202
|
+
const url = (body.match(/^\s*url\s*=\s*"([^"]*)"/m) || [])[1];
|
|
203
|
+
const command = (body.match(/^\s*command\s*=\s*"([^"]*)"/m) || [])[1];
|
|
204
|
+
servers[m[1] || m[2]] = url ? { url } : command ? { command } : {};
|
|
205
|
+
}
|
|
206
|
+
return servers;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Strip a relayed mcpServers map down to the STRUCTURAL fields the hosted scanner
|
|
210
|
+
* needs to identify/reach a server (name, url, command, type, transport). Every
|
|
211
|
+
* other field — env, headers, token, apiKey, args, … — can carry live credentials
|
|
212
|
+
* or local paths and MUST NOT leave the machine. The connector relays the tool
|
|
213
|
+
* SURFACE, never secrets. (Auth'd servers simply come back "needs credentials";
|
|
214
|
+
* the hosted scanner degrades gracefully rather than us exfiltrating a token.)
|
|
215
|
+
*/
|
|
216
|
+
const RELAY_SAFE_SERVER_KEYS = new Set(["url", "command", "type", "transport"]);
|
|
217
|
+
function relaySafeServers(servers) {
|
|
218
|
+
const out = {};
|
|
219
|
+
for (const [name, spec] of Object.entries(servers)) {
|
|
220
|
+
if (!spec || typeof spec !== "object") {
|
|
221
|
+
out[name] = {};
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
const safe = {};
|
|
225
|
+
for (const [k, v] of Object.entries(spec))
|
|
226
|
+
if (RELAY_SAFE_SERVER_KEYS.has(k))
|
|
227
|
+
safe[k] = v;
|
|
228
|
+
out[name] = safe;
|
|
229
|
+
}
|
|
230
|
+
return out;
|
|
231
|
+
}
|
|
232
|
+
/** Enumerate the agents/MCP tools configured on this machine. Read-only. */
|
|
233
|
+
function discover(home) {
|
|
234
|
+
const agents = [];
|
|
235
|
+
// OpenClaw → declared tools (skills live under ~/.hermes/skills; plus extensions).
|
|
236
|
+
if (exists(home, ".openclaw", "openclaw.json")) {
|
|
237
|
+
const tools = enumerateSkills(path.join(home, ".hermes", "skills"));
|
|
238
|
+
for (const name of listDirs(home, ".openclaw", "extensions"))
|
|
239
|
+
tools.push({ name: `plugin:${name}`, description: "OpenClaw plugin / extension" });
|
|
240
|
+
agents.push({ type: "declared", label: "OpenClaw", detail: `${tools.length} skill${tools.length === 1 ? "" : "s"} / plugins`, declaredTools: tools });
|
|
241
|
+
}
|
|
242
|
+
// Hermes → declared tools (skills + agent plugins).
|
|
243
|
+
if (exists(home, ".hermes", "hermes-agent")) {
|
|
244
|
+
const tools = enumerateSkills(path.join(home, ".hermes", "skills"));
|
|
245
|
+
for (const name of listDirs(home, ".hermes", "hermes-agent", "plugins"))
|
|
246
|
+
tools.push({ name: `plugin:${name}`, description: "Hermes plugin" });
|
|
247
|
+
agents.push({ type: "declared", label: "Hermes", detail: `${tools.length} skill${tools.length === 1 ? "" : "s"} / plugins`, declaredTools: tools });
|
|
248
|
+
}
|
|
249
|
+
// MCP-config files → config (mcpServers) blobs.
|
|
250
|
+
const seen = new Set();
|
|
251
|
+
for (const { label, segs } of MCP_CONFIGS) {
|
|
252
|
+
if (seen.has(label))
|
|
253
|
+
continue;
|
|
254
|
+
const cfg = readJson(home, ...segs);
|
|
255
|
+
const servers = cfg && typeof cfg === "object" ? (cfg.mcpServers ?? cfg.servers) : undefined;
|
|
256
|
+
const count = servers && typeof servers === "object" ? Object.keys(servers).length : 0;
|
|
257
|
+
if (count > 0 && servers) {
|
|
258
|
+
seen.add(label);
|
|
259
|
+
agents.push({ type: "config", label, detail: `${count} MCP server${count === 1 ? "" : "s"}`, config: { mcpServers: relaySafeServers(servers) } });
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
// Claude Code (~/.claude.json): servers live globally AND per-project — merge both.
|
|
263
|
+
const cc = readJson(home, ".claude.json");
|
|
264
|
+
if (cc) {
|
|
265
|
+
const merged = {};
|
|
266
|
+
const collect = (o) => {
|
|
267
|
+
const s = o && typeof o === "object" ? o.mcpServers : undefined;
|
|
268
|
+
if (s && typeof s === "object")
|
|
269
|
+
for (const [k, v] of Object.entries(s))
|
|
270
|
+
if (!(k in merged))
|
|
271
|
+
merged[k] = v;
|
|
272
|
+
};
|
|
273
|
+
collect(cc);
|
|
274
|
+
const projects = cc.projects;
|
|
275
|
+
if (projects && typeof projects === "object")
|
|
276
|
+
for (const p of Object.values(projects))
|
|
277
|
+
collect(p);
|
|
278
|
+
const count = Object.keys(merged).length;
|
|
279
|
+
if (count > 0)
|
|
280
|
+
agents.push({ type: "config", label: "Claude Code", detail: `${count} MCP server${count === 1 ? "" : "s"}`, config: { mcpServers: relaySafeServers(merged) } });
|
|
281
|
+
}
|
|
282
|
+
// OpenAI Codex CLI (~/.codex/config.toml) — TOML, parsed separately.
|
|
283
|
+
const codexToml = readText(home, ".codex", "config.toml");
|
|
284
|
+
if (codexToml) {
|
|
285
|
+
const servers = parseCodexMcpServers(codexToml);
|
|
286
|
+
const count = Object.keys(servers).length;
|
|
287
|
+
if (count > 0)
|
|
288
|
+
agents.push({ type: "config", label: "Codex", detail: `${count} MCP server${count === 1 ? "" : "s"}`, config: { mcpServers: relaySafeServers(servers) } });
|
|
289
|
+
}
|
|
290
|
+
return agents;
|
|
291
|
+
}
|
|
292
|
+
function registerConnectCommand(program) {
|
|
293
|
+
program
|
|
294
|
+
.command("connect")
|
|
295
|
+
.description("Scan this machine's agents & MCP configs and relay them to an Atbash onboarding session (read-only; one request, then exits)")
|
|
296
|
+
.argument("<code>", "The pairing code from the onboarding \"Scan another machine\" screen")
|
|
297
|
+
.option("--host <url>", "Atbash deployment hosting your session")
|
|
298
|
+
.option("--home <dir>", "Home directory to scan (for testing)")
|
|
299
|
+
.option("--dry-run", "Do the read-only scan and print exactly what WOULD be sent (destination + tool names), then exit WITHOUT sending")
|
|
300
|
+
.option("--json", "Emit machine-readable JSON instead of formatted text (for agents / automation)")
|
|
301
|
+
.action(async (rawCode, opts) => {
|
|
302
|
+
const home = opts.home || os.homedir();
|
|
303
|
+
const host = (opts.host || process.env.ATBASH_HOST || DEFAULT_HOST).replace(/\/+$/, "");
|
|
304
|
+
const code = rawCode.trim().toUpperCase().replace(/[^A-Z0-9-]/g, "");
|
|
305
|
+
const machine = os.hostname();
|
|
306
|
+
const dryRun = !!opts.dryRun;
|
|
307
|
+
const asJson = !!opts.json;
|
|
308
|
+
const endpoint = `${host}/api/agent-scan/session/${encodeURIComponent(code)}`;
|
|
309
|
+
// Parsed up front so the destination verdict is available to every output
|
|
310
|
+
// path, including the JSON one an agent reads before deciding to proceed.
|
|
311
|
+
let hostUrl = null;
|
|
312
|
+
try {
|
|
313
|
+
hostUrl = new URL(host);
|
|
314
|
+
}
|
|
315
|
+
catch {
|
|
316
|
+
hostUrl = null;
|
|
317
|
+
}
|
|
318
|
+
const hostname = hostUrl ? hostUrl.hostname.toLowerCase() : "";
|
|
319
|
+
const isLoopback = /^(localhost|127\.\d+\.\d+\.\d+|\[::1\]|::1)$/.test(hostname);
|
|
320
|
+
// "Recognized" = an official Atbash deployment (or your own machine for dev).
|
|
321
|
+
const recognizedHost = KNOWN_HOSTS.has(hostname) || isLoopback;
|
|
322
|
+
// Machine-readable summary for the --json path AND for any error, so an agent
|
|
323
|
+
// gets a stable, parseable description of exactly what this command is/was doing.
|
|
324
|
+
const emitJson = (extra) => console.log(JSON.stringify({
|
|
325
|
+
tool: "@atbash/cli connect",
|
|
326
|
+
transmits: "agent/tool/skill names, MCP endpoint URLs and launch commands — never tokens, auth headers, env values, or file contents",
|
|
327
|
+
readOnly: true,
|
|
328
|
+
requests: dryRun ? 0 : 1,
|
|
329
|
+
machine, host, endpoint, code,
|
|
330
|
+
// An agent should treat `recognizedHost: false` as a reason to stop and
|
|
331
|
+
// ask, not a detail to skim past.
|
|
332
|
+
recognizedHost, knownHosts: [...KNOWN_HOSTS],
|
|
333
|
+
...extra,
|
|
334
|
+
}, null, 2));
|
|
335
|
+
if (!code) {
|
|
336
|
+
if (asJson)
|
|
337
|
+
emitJson({ ok: false, error: "missing pairing code" });
|
|
338
|
+
else
|
|
339
|
+
console.error("\n" + chalk_1.default.bold(" Atbash connector") + "\n" + chalk_1.default.red(" Missing pairing code.") + " Open the \"Scan another machine\" screen for one.\n");
|
|
340
|
+
process.exit(1);
|
|
341
|
+
}
|
|
342
|
+
// ── destination safety ───────────────────────────────────────────────────
|
|
343
|
+
// The only place this flow could be turned against you is a swapped --host
|
|
344
|
+
// pointing the relay at someone else's server. So: refuse a channel that
|
|
345
|
+
// isn't encrypted, and make an unrecognized destination impossible to miss.
|
|
346
|
+
const httpsOk = !!hostUrl && (hostUrl.protocol === "https:" || (hostUrl.protocol === "http:" && isLoopback));
|
|
347
|
+
if (!httpsOk) {
|
|
348
|
+
const msg = `refusing to send over a non-HTTPS host (${host}) — the relay must travel encrypted`;
|
|
349
|
+
if (asJson)
|
|
350
|
+
emitJson({ ok: false, error: msg });
|
|
351
|
+
else
|
|
352
|
+
console.error("\n" + chalk_1.default.red(` ✗ ${msg}.`) + chalk_1.default.dim(" Use an https:// host (localhost may use http).\n"));
|
|
353
|
+
process.exit(1);
|
|
354
|
+
}
|
|
355
|
+
const agents = discover(home);
|
|
356
|
+
const payload = { agents, machine };
|
|
357
|
+
// ── machine-readable path (agents / automation) ──────────────────────────
|
|
358
|
+
if (asJson) {
|
|
359
|
+
if (dryRun) {
|
|
360
|
+
emitJson({ ok: true, dryRun: true, sent: false, agentCount: agents.length, payload });
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
try {
|
|
364
|
+
const res = await fetch(endpoint, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload) });
|
|
365
|
+
const data = (await res.json().catch(() => ({})));
|
|
366
|
+
emitJson({ ok: res.ok, sent: res.ok, status: res.status, received: data.received, agentCount: agents.length, error: res.ok ? undefined : (data.error || res.statusText) });
|
|
367
|
+
process.exit(res.ok ? 0 : 1);
|
|
368
|
+
}
|
|
369
|
+
catch (err) {
|
|
370
|
+
emitJson({ ok: false, sent: false, error: err instanceof Error ? err.message : String(err) });
|
|
371
|
+
process.exit(1);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
// ── human-readable path ──────────────────────────────────────────────────
|
|
375
|
+
console.log("\n" + chalk_1.default.bold(" Atbash connector") + (dryRun ? chalk_1.default.dim(" (dry run — nothing will be sent)") : ""));
|
|
376
|
+
// Capability disclosure: state plainly what runs, so a person OR an agent
|
|
377
|
+
// reviewing this command can confirm nothing hidden is happening.
|
|
378
|
+
console.log(chalk_1.default.dim(" Reads (read-only): known agent/MCP config files under your home dir — OpenClaw, Hermes,"));
|
|
379
|
+
console.log(chalk_1.default.dim(" Claude Desktop/Code, Cursor, Windsurf, VS Code, Gemini, Continue, Codex."));
|
|
380
|
+
console.log(chalk_1.default.dim(" Relays names, MCP URLs and launch commands only — never tokens, headers, env values or file contents."));
|
|
381
|
+
console.log(chalk_1.default.dim(` Sends: ${dryRun ? "nothing (dry run)" : "one POST to the destination below, then exits"}.`));
|
|
382
|
+
// Machine identity is stated loudly on purpose: if this ran somewhere other
|
|
383
|
+
// than the computer you mean to govern (an AI-assistant sandbox, a VM, a
|
|
384
|
+
// remote box), the results are from THAT machine — not yours.
|
|
385
|
+
console.log(` ${chalk_1.default.bold("Machine")} : ${chalk_1.default.bold.cyan(machine)} ${chalk_1.default.yellow("← results below come from THIS machine")}`);
|
|
386
|
+
console.log(` ${chalk_1.default.bold("Sends to")} : ${chalk_1.default.cyan(endpoint)}${recognizedHost ? chalk_1.default.dim(isLoopback ? " (local development host)" : " (recognized Atbash host)") : chalk_1.default.yellow(" ← UNRECOGNIZED host, not an official Atbash deployment — only proceed if you trust it")}`);
|
|
387
|
+
console.log(chalk_1.default.dim(` Code : ${code}\n`));
|
|
388
|
+
if (agents.length === 0) {
|
|
389
|
+
console.log(" No local agents found (looked for OpenClaw, Hermes, and MCP configs).");
|
|
390
|
+
if (!dryRun)
|
|
391
|
+
console.log(" Relaying an empty result so the browser stops waiting.");
|
|
392
|
+
console.log("");
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
console.log(" Found:");
|
|
396
|
+
for (const a of agents)
|
|
397
|
+
console.log(` ${chalk_1.default.green("•")} ${a.label} ${chalk_1.default.dim("— " + a.detail)}`);
|
|
398
|
+
console.log("");
|
|
399
|
+
}
|
|
400
|
+
console.log(chalk_1.default.yellow(` ⚠ These results are from ${chalk_1.default.bold(machine)}.`) + chalk_1.default.dim(" If that isn't the computer you want to govern, run this command there instead.\n"));
|
|
401
|
+
if (dryRun) {
|
|
402
|
+
console.log(chalk_1.default.bold(" Dry run — the exact JSON that WOULD be sent:"));
|
|
403
|
+
console.log(chalk_1.default.dim(JSON.stringify(payload, null, 2).split("\n").map((l) => " " + l).join("\n")));
|
|
404
|
+
console.log("\n" + chalk_1.default.green(" ✓ Nothing was sent.") + chalk_1.default.dim(" Re-run without --dry-run to relay.\n"));
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
try {
|
|
408
|
+
const res = await fetch(endpoint, {
|
|
409
|
+
method: "POST",
|
|
410
|
+
headers: { "Content-Type": "application/json" },
|
|
411
|
+
body: JSON.stringify(payload),
|
|
412
|
+
});
|
|
413
|
+
const data = (await res.json().catch(() => ({})));
|
|
414
|
+
if (!res.ok) {
|
|
415
|
+
console.error(chalk_1.default.red(` Relay failed (${res.status}): ${data.error || res.statusText}`));
|
|
416
|
+
console.error(chalk_1.default.dim(" The code may be wrong or expired — re-open the screen for a fresh one.\n"));
|
|
417
|
+
process.exit(1);
|
|
418
|
+
}
|
|
419
|
+
console.log(chalk_1.default.green(` ✓ Relayed ${data.received ?? agents.length} agent(s) from ${chalk_1.default.bold(machine)}.`) + " Switch back to the browser — it should show this machine now.\n");
|
|
420
|
+
}
|
|
421
|
+
catch (err) {
|
|
422
|
+
console.error(chalk_1.default.red(` Could not reach ${host}: ${err instanceof Error ? err.message : String(err)}\n`));
|
|
423
|
+
process.exit(1);
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
//# sourceMappingURL=connect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/commands/connect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6NA,wDAgIC;AAGQ,4BAAQ;AAAE,0CAAe;AAAE,sCAAa;AAAE,4CAAgB;AAhWnE,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAE7B,kDAA0B;AAE1B;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,WAAW;IACX,eAAe;IACf,wCAAwC;IACxC,mDAAmD;CACpD,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,YAAY,GAAG,gDAAgD,CAAC;AAUtE,gFAAgF;AAChF,MAAM,MAAM,GAAG,CAAC,GAAG,IAAc,EAAW,EAAE;IAC5C,IAAI,CAAC;QAAC,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,KAAK,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AAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,kEAAkE,CAAC,CAAC;QACvL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,qBAAqB,IAAI,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7G,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atbash/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.10",
|
|
4
4
|
"description": "Atbash CLI — control boundary before the last irreversible step in an agent workflow",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://atbash.ai",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Atbash-Ai/atbash-cli.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/Atbash-Ai/atbash-cli/issues"
|
|
13
|
+
},
|
|
7
14
|
"bin": {
|
|
8
15
|
"atbash": "dist/bin/atbash.js"
|
|
9
16
|
},
|
|
10
17
|
"preferGlobal": true,
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
11
21
|
"files": [
|
|
12
22
|
"dist",
|
|
13
23
|
"README.md",
|