@cello-protocol/cli 0.0.44 → 0.0.46

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.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Shared argv parsing primitives.
3
+ *
4
+ * Extracted from cli-args.ts (DOD-CLI-PARITY-1 Phase 0) so that BOTH the registry (which parses a
5
+ * command's args inside its run()) and cli-args (which validates them before dispatch) can use it
6
+ * without an import cycle: cli-args → registry → arg-parse, never back.
7
+ */
8
+ /**
9
+ * Split a subcommand's argv into the `--agent <name>` flag and the remaining positionals.
10
+ *
11
+ * Extracted originally (MONIKER-1 review Finding 1) because the old inline filter used
12
+ * `i === agentIdx + 1` unguarded: with --agent ABSENT, agentIdx is -1 and the predicate silently
13
+ * dropped positional index 0 — `cello moniker set Bob` / `cello contact list` printed usage instead
14
+ * of dispatching. The flag's value is excluded ONLY when the flag exists.
15
+ */
16
+ export declare function splitAgentFlag(args: string[]): {
17
+ agent: string | undefined;
18
+ positional: string[];
19
+ };
20
+ //# sourceMappingURL=arg-parse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arg-parse.d.ts","sourceRoot":"","sources":["../src/arg-parse.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAalG"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Shared argv parsing primitives.
3
+ *
4
+ * Extracted from cli-args.ts (DOD-CLI-PARITY-1 Phase 0) so that BOTH the registry (which parses a
5
+ * command's args inside its run()) and cli-args (which validates them before dispatch) can use it
6
+ * without an import cycle: cli-args → registry → arg-parse, never back.
7
+ */
8
+ /**
9
+ * Split a subcommand's argv into the `--agent <name>` flag and the remaining positionals.
10
+ *
11
+ * Extracted originally (MONIKER-1 review Finding 1) because the old inline filter used
12
+ * `i === agentIdx + 1` unguarded: with --agent ABSENT, agentIdx is -1 and the predicate silently
13
+ * dropped positional index 0 — `cello moniker set Bob` / `cello contact list` printed usage instead
14
+ * of dispatching. The flag's value is excluded ONLY when the flag exists.
15
+ */
16
+ export function splitAgentFlag(args) {
17
+ // POSIX `--` end-of-flags terminator (review F1): everything after the first `--` is a positional
18
+ // VALUE, verbatim — so a value that starts with `-` (a negative number, or an away text like
19
+ // "- back Monday") can be passed. --agent is recognized only BEFORE the terminator.
20
+ const ddIdx = args.indexOf("--");
21
+ const flagScan = ddIdx === -1 ? args : args.slice(0, ddIdx);
22
+ const afterTerminator = ddIdx === -1 ? [] : args.slice(ddIdx + 1);
23
+ const agentIdx = flagScan.indexOf("--agent");
24
+ const agent = agentIdx !== -1 ? flagScan[agentIdx + 1] : undefined;
25
+ const positional = flagScan
26
+ .filter((a, i) => !(a === "--agent" || (agentIdx !== -1 && i === agentIdx + 1)))
27
+ .concat(afterTerminator);
28
+ return { agent, positional };
29
+ }
30
+ //# sourceMappingURL=arg-parse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arg-parse.js","sourceRoot":"","sources":["../src/arg-parse.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,IAAc;IAC3C,kGAAkG;IAClG,6FAA6F;IAC7F,oFAAoF;IACpF,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC5D,MAAM,eAAe,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC7C,MAAM,KAAK,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,MAAM,UAAU,GAAG,QAAQ;SACxB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;SAC/E,MAAM,CAAC,eAAe,CAAC,CAAC;IAC3B,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAC/B,CAAC"}
@@ -2,11 +2,14 @@
2
2
  /**
3
3
  * cello — the CELLO CLI binary.
4
4
  *
5
- * Commands:
6
- * cello login — Start the daemon (or connect to existing), exit 0
7
- * cello logout — Send shutdown command to daemon
8
- * cello status — Query daemon and print structured JSON response
9
- * cello register — Register a loaded agent with the directory (ML-DSA + FROST DKG)
5
+ * DOD-CLI-PARITY-1 Phase 0: this file no longer contains a dispatch switch. Every command lives in
6
+ * the registry (src/registry.ts), which is also what renders `cello --help` and per-command help —
7
+ * so dispatch, the command table, and the help text cannot drift apart. Adding a command means
8
+ * adding one registry entry; this binary does not change.
9
+ *
10
+ * The bash-adapter contract (§3): a command's JSON result goes to stdout, a structured failure goes
11
+ * to stderr VERBATIM, and the exit code branches on it — so any bash-capable agent can drive a
12
+ * CELLO node with `cello <cmd> | jq` and `$?`, with no MCP dependency.
10
13
  */
11
14
  export {};
12
15
  //# sourceMappingURL=cello.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cello.d.ts","sourceRoot":"","sources":["../../src/bin/cello.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG"}
1
+ {"version":3,"file":"cello.d.ts","sourceRoot":"","sources":["../../src/bin/cello.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;GAWG"}
package/dist/bin/cello.js CHANGED
@@ -2,17 +2,20 @@
2
2
  /**
3
3
  * cello — the CELLO CLI binary.
4
4
  *
5
- * Commands:
6
- * cello login — Start the daemon (or connect to existing), exit 0
7
- * cello logout — Send shutdown command to daemon
8
- * cello status — Query daemon and print structured JSON response
9
- * cello register — Register a loaded agent with the directory (ML-DSA + FROST DKG)
5
+ * DOD-CLI-PARITY-1 Phase 0: this file no longer contains a dispatch switch. Every command lives in
6
+ * the registry (src/registry.ts), which is also what renders `cello --help` and per-command help —
7
+ * so dispatch, the command table, and the help text cannot drift apart. Adding a command means
8
+ * adding one registry entry; this binary does not change.
9
+ *
10
+ * The bash-adapter contract (§3): a command's JSON result goes to stdout, a structured failure goes
11
+ * to stderr VERBATIM, and the exit code branches on it — so any bash-capable agent can drive a
12
+ * CELLO node with `cello <cmd> | jq` and `$?`, with no MCP dependency.
10
13
  */
11
14
  import { homedir } from "node:os";
12
15
  import { join, dirname } from "node:path";
13
16
  import { createRequire } from "node:module";
14
- import { login, logout, status, register, createAgent, removeAgent, refreshShares, relayReceipts, sessions, contactAdd, contactRemove, contactList, contactSetTier, contactSetAway, settingsGet, settingsSet, monikerSet, telegramSetToken } from "../commands.js";
15
- import { USAGE, KNOWN_COMMANDS, checkArgs, helpForCommand, splitAgentFlag } from "../cli-args.js";
17
+ import { KNOWN_COMMANDS, USAGE, checkArgs, helpForCommand } from "../cli-args.js";
18
+ import { findCommand } from "../registry.js";
16
19
  const logger = {
17
20
  debug(event, context) {
18
21
  const line = JSON.stringify({ level: "debug", event, ...context, ts: new Date().toISOString() });
@@ -38,198 +41,40 @@ const require = createRequire(import.meta.url);
38
41
  const daemonPkgPath = require.resolve("@cello-protocol/daemon/package.json");
39
42
  const daemonBin = join(dirname(daemonPkgPath), "dist/bin/cello-daemon.js");
40
43
  async function main() {
41
- let result;
42
- // M8B F2: answer --help/-h on every subcommand and REJECT unknown flags before
43
- // dispatch, so a flag can never be coerced into a positional argument (previously
44
- // `cello register --help` tried to register an agent literally named "--help").
45
- if (command && KNOWN_COMMANDS.has(command)) {
46
- const check = checkArgs(command, process.argv.slice(3));
47
- if (check.kind === "help") {
48
- process.stdout.write(helpForCommand(command) + "\n");
49
- process.exit(0);
50
- return;
51
- }
52
- if (check.kind === "unknown_flag") {
53
- process.stderr.write(`Unknown flag '${check.flag}' for 'cello ${command}'.\n`);
54
- process.stdout.write(helpForCommand(command) + "\n");
55
- process.exit(1);
56
- return;
57
- }
44
+ const spec = command ? findCommand(command) : undefined;
45
+ if (!spec || !KNOWN_COMMANDS.has(command)) {
46
+ // No command, or one we don't have: print the described command table.
47
+ process.stdout.write(USAGE + "\n");
48
+ process.exit(command ? 1 : 0);
49
+ return;
50
+ }
51
+ const args = process.argv.slice(3);
52
+ // M8B F2: answer --help/-h on every subcommand and REJECT unknown flags BEFORE dispatch, so a
53
+ // flag can never be coerced into a positional argument.
54
+ const check = checkArgs(command, args);
55
+ if (check.kind === "help") {
56
+ process.stdout.write(helpForCommand(command) + "\n");
57
+ process.exit(0);
58
+ return;
58
59
  }
59
- switch (command) {
60
- case "login":
61
- result = await login(celloDir, daemonBin, logger);
62
- break;
63
- case "logout":
64
- // DOD-LOGOUT-WAIT-1: logout now WAITS for the daemon to actually die before claiming
65
- // "Daemon stopped." — the immediate progress line tells the operator the command
66
- // activated and the short pause is expected.
67
- result = await logout(celloDir, (line) => process.stdout.write(line + "\n"));
68
- break;
69
- case "status":
70
- result = await status(celloDir);
71
- break;
72
- case "register": {
73
- // cello register <agent> [preAuthToken] (token falls back to CELLO_PREAUTH_TOKEN
74
- // so it need not appear in shell history). Optional phone stub follows.
75
- const agent = process.argv[3] ?? "";
76
- const preAuthToken = process.argv[4] ?? process.env.CELLO_PREAUTH_TOKEN ?? "";
77
- const phoneStub = process.argv[5] ?? "";
78
- // M8C-ONBOARD-WARN-1 (revised 2026-07-06, Andre): the pre-auth exposure "note" is REMOVED
79
- // entirely. A single-use, 24h, consumed-on-success token has no meaningful exposure risk, so
80
- // the note only drew attention to a non-issue ("this thing you weren't worried about? don't
81
- // worry about it") — pure noise on the core onboarding path. No warning at all is correct.
82
- result = await register(celloDir, agent, preAuthToken, phoneStub);
83
- break;
84
- }
85
- case "create-agent": {
86
- // cello create-agent <name> — create a fresh local agent identity (PERSIST-002 AC-004).
87
- const name = process.argv[3] ?? "";
88
- result = await createAgent(celloDir, name);
89
- break;
90
- }
91
- case "remove-agent": {
92
- // cello remove-agent <name> — retire a local agent (one-way) and free its name (REMOVE-001).
93
- const name = process.argv[3] ?? "";
94
- result = await removeAgent(celloDir, name);
95
- break;
96
- }
97
- case "refresh": {
98
- // cello refresh <name> — proactive share refresh / epoch rollover (M8B DOD-REFRESH-1).
99
- const name = process.argv[3] ?? "";
100
- result = await refreshShares(celloDir, name);
101
- break;
102
- }
103
- case "receipts": {
104
- // cello receipts <name> — list the agent's stored relay ordering receipts (M8B DOD-RELAYSIG-1).
105
- const name = process.argv[3] ?? "";
106
- result = await relayReceipts(celloDir, name);
107
- break;
108
- }
109
- case "sessions": {
110
- // cello sessions [--open|--closed|--failed|--all] [--limit N] — the full session history.
111
- // Defaults to open (live + resumable) so failed/closed don't flood it; the daemon caps the
112
- // count. (`cello status` only ever shows live/resumable, never this full list.)
113
- const args = process.argv.slice(3);
114
- let filter;
115
- if (args.includes("--all"))
116
- filter = "all";
117
- else if (args.includes("--closed"))
118
- filter = "closed";
119
- else if (args.includes("--failed"))
120
- filter = "failed";
121
- else if (args.includes("--open"))
122
- filter = "open";
123
- const limitIdx = args.indexOf("--limit");
124
- let limit;
125
- if (limitIdx !== -1 && args[limitIdx + 1] !== undefined) {
126
- const n = Number(args[limitIdx + 1]);
127
- if (Number.isFinite(n) && n > 0)
128
- limit = Math.floor(n);
129
- }
130
- result = await sessions(celloDir, { filter, limit });
131
- break;
132
- }
133
- case "contact": {
134
- // cello contact add <pubkey> [--agent <name>] | remove <pubkey> [--agent <name>] | list [--agent <name>]
135
- const { agent, positional } = splitAgentFlag(process.argv.slice(3));
136
- const [sub, pubkey, tierArg] = positional;
137
- if (sub === "add" && pubkey) {
138
- result = await contactAdd(celloDir, pubkey, agent);
139
- }
140
- else if (sub === "remove" && pubkey) {
141
- result = await contactRemove(celloDir, pubkey, agent);
142
- }
143
- else if (sub === "list") {
144
- result = await contactList(celloDir, agent);
145
- }
146
- else if (sub === "tier" && pubkey && tierArg !== undefined) {
147
- // cello contact tier <pubkey> <0..4> — daemon validates the value; a non-numeric arg is
148
- // surfaced as the daemon's invalid_tier verdict (NaN → rejected there).
149
- result = await contactSetTier(celloDir, pubkey, Number(tierArg), agent);
150
- }
151
- else if (sub === "away" && pubkey) {
152
- // cello contact away <pubkey> <message…> — the rest of the args form the away text; empty → clear.
153
- const message = positional.slice(2).join(" ");
154
- result = await contactSetAway(celloDir, pubkey, message.length > 0 ? message : null, agent);
155
- }
156
- else {
157
- result = { exitCode: 1, output: "Usage: cello contact add|remove <pubkey> [--agent <name>] | cello contact list [--agent <name>] | cello contact tier <pubkey> <0..4> [--agent <name>] | cello contact away <pubkey> <message> [--agent <name>]" };
158
- }
159
- break;
160
- }
161
- case "settings": {
162
- // cello settings get [key] [--agent] | set <key> <value> [--agent] (DOD-SETTINGS-SURFACE-1)
163
- const { agent, positional } = splitAgentFlag(process.argv.slice(3));
164
- const [sub, key, value] = positional;
165
- if (sub === "get") {
166
- result = await settingsGet(celloDir, key, agent); // key optional → list all when absent
167
- }
168
- else if (sub === "set" && key && value !== undefined) {
169
- result = await settingsSet(celloDir, key, value, agent);
170
- }
171
- else {
172
- result = { exitCode: 1, output: "Usage: cello settings get [key] [--agent <name>] | cello settings set <key> <value> [--agent <name>]" };
173
- }
174
- break;
175
- }
176
- case "moniker": {
177
- // cello moniker set <name> [--agent <agent>] | cello moniker clear [--agent <agent>] (MONIKER-1)
178
- const { agent, positional } = splitAgentFlag(process.argv.slice(3));
179
- const [sub, name] = positional;
180
- if (sub === "set" && name) {
181
- result = await monikerSet(celloDir, name, agent);
182
- }
183
- else if (sub === "clear" && !name) {
184
- result = await monikerSet(celloDir, null, agent);
185
- }
186
- else {
187
- result = { exitCode: 1, output: helpForCommand("moniker") };
188
- }
189
- break;
190
- }
191
- case "telegram": {
192
- // cello telegram set-token <bot_token> <allowlisted_chat_id>
193
- const sub = process.argv[3];
194
- const botToken = process.argv[4];
195
- const chatId = process.argv[5];
196
- if (sub === "set-token" && botToken && chatId) {
197
- result = await telegramSetToken(celloDir, botToken, chatId);
198
- }
199
- else {
200
- result = { exitCode: 1, output: "Usage: cello telegram set-token <bot_token> <allowlisted_chat_id>" };
201
- }
202
- break;
203
- }
204
- case "install": {
205
- // cello install hermes --agent <name> [--hermes-home <path>] (HERMES-001)
206
- const args = process.argv.slice(3);
207
- const agentIdx = args.indexOf("--agent");
208
- const homeIdx = args.indexOf("--hermes-home");
209
- // Find the target positional, excluding both flags AND their values — so
210
- // `cello install --agent alice hermes` still resolves target=hermes (mirrors
211
- // the `contact` case's positional filter).
212
- const target = args.find((a, i) => !a.startsWith("-") &&
213
- !(agentIdx !== -1 && i === agentIdx + 1) &&
214
- !(homeIdx !== -1 && i === homeIdx + 1));
215
- if (target !== "hermes") {
216
- result = { exitCode: 1, output: helpForCommand("install") };
217
- break;
218
- }
219
- const { installHermes } = await import("../hermes/install-hermes.js");
220
- result = await installHermes({
221
- agentName: agentIdx !== -1 ? (args[agentIdx + 1] ?? "") : "",
222
- hermesHome: homeIdx !== -1 ? args[homeIdx + 1] : undefined,
223
- });
224
- break;
225
- }
226
- default:
227
- // M8B F1: the usage string lists EVERY command (refresh/receipts were missing).
228
- process.stdout.write(USAGE + "\n");
229
- process.exit(command ? 1 : 0);
230
- return;
60
+ if (check.kind === "unknown_flag") {
61
+ process.stderr.write(`Unknown flag '${check.flag}' for 'cello ${command}'.\n`);
62
+ process.stdout.write(helpForCommand(command) + "\n");
63
+ process.exit(1);
64
+ return;
231
65
  }
232
- process.stdout.write(result.output + "\n");
66
+ const ctx = {
67
+ celloDir,
68
+ daemonBin,
69
+ logger,
70
+ onProgress: (line) => process.stdout.write(line + "\n"),
71
+ };
72
+ const result = await spec.run(ctx, args);
73
+ // Report the outcome, never the intent: stdout carries the result, stderr the structured failure.
74
+ if (result.stdout.length > 0)
75
+ process.stdout.write(result.stdout + "\n");
76
+ if (result.stderr.length > 0)
77
+ process.stderr.write(result.stderr + "\n");
233
78
  process.exit(result.exitCode);
234
79
  }
235
80
  main().catch((err) => {
@@ -1 +1 @@
1
- {"version":3,"file":"cello.js","sourceRoot":"","sources":["../../src/bin/cello.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAsB,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvR,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGlG,MAAM,MAAM,GAAW;IACrB,KAAK,CAAC,KAAa,EAAE,OAAgC;QACnD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QACjG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GA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AAI,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;KACxD,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAEzC,kGAAkG;IAClG,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzE,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IAC5B,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,OAAO,IAAI,CAAC,CAAC;IAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,15 +1,31 @@
1
1
  /**
2
- * M8B riders F1/F2 — CLI argument handling, extracted from src/bin/cello.ts so the
2
+ * CLI argument handling — validation that runs BEFORE dispatch, kept out of src/bin/cello.ts so the
3
3
  * usage surface is testable without spawning the binary.
4
4
  *
5
- * F1: USAGE lists EVERY dispatchable command (refresh and receipts were missing).
6
- * F2: every subcommand answers --help/-h, and an unrecognized flag is REJECTED
7
- * instead of being coerced into a positional argument (previously
8
- * `cello register --help` tried to register an agent literally named "--help").
5
+ * M8B riders F1/F2 (原): USAGE lists EVERY dispatchable command; every subcommand answers --help/-h;
6
+ * an unrecognized flag is REJECTED rather than coerced into a positional (previously
7
+ * `cello register --help` tried to register an agent literally named "--help").
8
+ *
9
+ * DOD-CLI-PARITY-1 Phase 0: this module no longer OWNS the command list, the help text, or the flag
10
+ * table — it DERIVES all three from the registry (registry.ts), the single source of truth. That is
11
+ * what makes drift between dispatch, `cello --help`, and `cello <cmd> --help` structurally
12
+ * impossible rather than merely discouraged.
13
+ */
14
+ import { COMMANDS } from "./registry.js";
15
+ export { splitAgentFlag } from "./arg-parse.js";
16
+ /** Every dispatchable command — derived, so it cannot fall out of step with the registry. */
17
+ export declare const KNOWN_COMMANDS: ReadonlySet<string>;
18
+ export type KnownCommand = string;
19
+ /**
20
+ * The top-level `cello --help`.
21
+ *
22
+ * CC-7 (P2-5 / DOD-ONBOARD-HELP-1): opens with what CELLO is + the onboarding path a first-time
23
+ * user needs. DOD-CLI-PARITY-1 §7 closes the remaining gap — the command list is now a DESCRIBED
24
+ * table rendered from each registry entry's `summary` (it used to be a single pipe-delimited blob
25
+ * with no per-command descriptions). Arguments stay in per-command `--help`.
9
26
  */
10
- export declare const KNOWN_COMMANDS: Set<"login" | "logout" | "status" | "register" | "create-agent" | "remove-agent" | "refresh" | "receipts" | "sessions" | "contact" | "settings" | "moniker" | "telegram" | "install">;
11
- export type KnownCommand = typeof KNOWN_COMMANDS extends Set<infer T> ? T : never;
12
27
  export declare const USAGE: string;
28
+ /** Per-command help — the registry entry's own text, verbatim. */
13
29
  export declare function helpForCommand(command: string): string;
14
30
  export type ArgsCheck = {
15
31
  kind: "ok";
@@ -22,21 +38,13 @@ export type ArgsCheck = {
22
38
  /**
23
39
  * F2: validate a subcommand's arguments BEFORE dispatch.
24
40
  * - --help / -h ANYWHERE → help. This is a dedicated pre-scan so help wins even when it
25
- * follows an unknown flag or sits where --limit would consume its value — asking for
41
+ * follows an unknown flag or sits where a value-consuming flag would swallow it — asking for
26
42
  * help must never be masked by another argument error.
27
43
  * - any other dash-prefixed token the command does not recognize → unknown_flag
28
44
  * (never silently coerced into a positional).
45
+ * - after a POSIX `--` terminator, everything is a positional VALUE, verbatim.
29
46
  */
30
- /**
31
- * Split a subcommand's argv into the `--agent <name>` flag and the remaining positionals.
32
- * Extracted (MONIKER-1 review Finding 1) because the old inline filter used
33
- * `i === agentIdx + 1` unguarded: with --agent ABSENT, agentIdx is -1 and the predicate
34
- * silently dropped positional index 0 — `cello moniker set Bob` / `cello contact list`
35
- * printed usage instead of dispatching. The flag's value is excluded ONLY when the flag exists.
36
- */
37
- export declare function splitAgentFlag(args: string[]): {
38
- agent: string | undefined;
39
- positional: string[];
40
- };
41
47
  export declare function checkArgs(command: string, args: string[]): ArgsCheck;
48
+ /** The registry, re-exported for callers that want to enumerate commands (e.g. the dispatcher). */
49
+ export { COMMANDS };
42
50
  //# sourceMappingURL=cli-args.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-args.d.ts","sourceRoot":"","sources":["../src/cli-args.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,eAAO,MAAM,cAAc,uLAehB,CAAC;AAEZ,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAIlF,eAAO,MAAM,KAAK,QAO0C,CAAC;AAmD7D,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAWD,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,GACd;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3C;;;;;;;GAOG;AACH;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,UAAU,EAAE,MAAM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