@topolo/cli 0.13.9 → 0.13.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/dist/index.js CHANGED
@@ -14,7 +14,7 @@ function registerAgentPacksCommand(program2) {
14
14
  throw new Error("Exact closed smoke operation, role/case and UUID required.");
15
15
  const store = packs.opts().store ?? resolve(homedir(), "AgentPacks");
16
16
  if (options.harness === "claude") {
17
- const { operateClaudeSmoke } = await import("./claude-pack-backend-4F4VHMI5.js");
17
+ const { operateClaudeSmoke } = await import("./claude-pack-backend-RMSOPHVQ.js");
18
18
  console.log(JSON.stringify(await operateClaudeSmoke({
19
19
  store,
20
20
  kind: "smoke-" + operation,
@@ -44,7 +44,7 @@ function registerAgentPacksCommand(program2) {
44
44
  });
45
45
  packs.command("configure").description("Qualify and configure an adopted Claude roster through its live native backend").argument("<pack>").option("--harness <name>", "Host adapter", "claude").requiredOption("--policy <path>", "Reviewed execution policy JSON").requiredOption("--endpoint <url>", "Explicit loopback main-process inspector endpoint, enabled separately with authorization").requiredOption("--pid <pid>", "Expected Claude main-process PID").option("--apply", "Apply native groups, pins, models, effort and permission modes; otherwise preflight only").action(async (pack, options) => {
46
46
  if (options.harness !== "claude") throw new Error("Native configure is currently qualified only for Claude Desktop.");
47
- const { configureClaudePack } = await import("./claude-pack-backend-4F4VHMI5.js");
47
+ const { configureClaudePack } = await import("./claude-pack-backend-RMSOPHVQ.js");
48
48
  const result = await configureClaudePack({
49
49
  store: packs.opts().store ?? resolve(homedir(), "AgentPacks"),
50
50
  pack,
@@ -67,8 +67,10 @@ function registerAgentPacksCommand(program2) {
67
67
  "list",
68
68
  "recover",
69
69
  "doctor",
70
+ "open",
70
71
  "policy",
71
72
  "permissions",
73
+ "lane",
72
74
  "approvals",
73
75
  "remote-recover",
74
76
  "connect",
@@ -80,9 +82,40 @@ function registerAgentPacksCommand(program2) {
80
82
  for (const name of commands) {
81
83
  const command = packs.command(name).description(name === "add" ? "Add an installed or bundled pack, group, or agent" : `Run the pack ${name} operation`);
82
84
  if (name === "switch" || name === "recover") command.option("--policy <path>", "Reviewed policy for an adopted Claude roster").option("--endpoint <url>", "Explicit authorized Claude main-process inspector endpoint").option("--pid <pid>", "Expected Claude main-process PID").option("--apply", "Apply a native switch; recovery is always read-only");
83
- if (name === "approvals") command.option("--intake <id>", "Exact owning native intake identity").option("--fingerprint <hash>", "Exact pending native request fingerprint").option("--response <path>", "Recorded one-request response JSON").option("--human-decision-recorded", "Assert that the exact human decision is recorded in the intake");
85
+ if (name === "lane") command.option("--input <path>", "Closed native lifecycle input JSON").option("--pack <name>", "Exact installed pack for Claude native lifecycle").option("--policy <path>", "Current reviewed source execution policy").option("--endpoint <url>", "Explicit authorized current Claude main-process inspector endpoint").option("--pid <pid>", "Expected current Claude native main PID").option("--connection <id>", "Exact explicit owned lane connection");
86
+ if (name === "approvals") command.option("--connection <id>", "Exact private dynamic lane control connection").option("--intake <id>", "Exact owning native intake identity").option("--fingerprint <hash>", "Exact pending native request fingerprint").option("--response <path>", "Recorded one-request response JSON").option("--human-decision-recorded", "Assert that the exact human decision is recorded in the intake");
84
87
  command.option("--harness <name>", "Local host adapter (codex, claude Desktop Code sessions)", "codex").option("--adapter-help", "Show every option supported by the selected adapter").argument("[arguments...]").allowUnknownOption().allowExcessArguments().addHelpText("after", name === "add" ? "\nExamples:\n topolo agent-packs add founder\n topolo agent-packs add founder --group specialists\n topolo agent-packs add founder --agent strategy\n" : "\nRun topolo agent-packs <command> --adapter-help for all adapter options. Cloud commands require explicit --environment and --context-key.\n").action(async (args, options) => {
85
88
  if (!["codex", "claude"].includes(options.harness)) throw new Error(`The ${options.harness} pack adapter is not available. Supported adapters: codex, claude.`);
89
+ if (name === "lane" && options.harness === "claude" && !options.adapterHelp && !["status", "models-template", "models-install"].includes(args[0] ?? "")) {
90
+ if (options.connection) {
91
+ if (args.length !== 1 || !["read", "context-start", "context-read", "fixture-start", "fixture-read", "retire", "close"].includes(args[0]))
92
+ throw new Error("Closed existing Claude lane control operation required.");
93
+ const input3 = options.input ? JSON.parse(readFileSync(options.input, "utf8")) : {};
94
+ if (!input3 || typeof input3 !== "object" || Array.isArray(input3) || Object.keys(input3).some((k) => k !== "operationId")) throw new Error("Only an exact bootstrap/fixture operation UUID may be supplied.");
95
+ const { operateClaudeLaneControl } = await import("./claude-pack-backend-RMSOPHVQ.js");
96
+ console.log(JSON.stringify(await operateClaudeLaneControl({
97
+ store: packs.opts().store ?? resolve(homedir(), "AgentPacks"),
98
+ connection: options.connection,
99
+ operation: { kind: args[0], ...input3 }
100
+ }), null, 2));
101
+ return;
102
+ }
103
+ if (args.length !== 1 || !options.input || !options.pack || !options.policy || !options.endpoint || !options.pid)
104
+ throw new Error("Closed Claude lane operation requires --input, --pack, --policy, --endpoint and --pid.");
105
+ const input2 = JSON.parse(readFileSync(options.input, "utf8"));
106
+ if (!input2 || typeof input2 !== "object" || Array.isArray(input2)) throw new Error("Closed native lane input object required.");
107
+ const { operateClaudeLane } = await import("./claude-pack-backend-RMSOPHVQ.js");
108
+ console.log(JSON.stringify(await operateClaudeLane({
109
+ store: packs.opts().store ?? resolve(homedir(), "AgentPacks"),
110
+ pack: options.pack,
111
+ policy: options.policy,
112
+ endpoint: options.endpoint,
113
+ pid: Number(options.pid),
114
+ operation: args[0],
115
+ input: input2
116
+ }), null, 2));
117
+ return;
118
+ }
86
119
  if (name === "approvals" && options.harness === "claude" && !options.adapterHelp) {
87
120
  if (!["list", "details", "respond"].includes(args[0] ?? "") || args.length > 2)
88
121
  throw new Error("Approvals requires list, details KEY, or respond KEY.");
@@ -96,7 +129,20 @@ function registerAgentPacksCommand(program2) {
96
129
  throw new Error("Only a one-request once/deny response is supported.");
97
130
  decision = response.decision;
98
131
  }
99
- const { operateClaudeApprovals } = await import("./claude-pack-backend-4F4VHMI5.js");
132
+ if (options.connection) {
133
+ const { operateClaudeLaneControl } = await import("./claude-pack-backend-RMSOPHVQ.js");
134
+ console.log(JSON.stringify(await operateClaudeLaneControl({
135
+ store: packs.opts().store ?? resolve(homedir(), "AgentPacks"),
136
+ connection: options.connection,
137
+ operation: {
138
+ kind: "approval-" + args[0],
139
+ ...args[0] !== "list" ? { key: args[1], intake: options.intake, fingerprint: options.fingerprint } : {},
140
+ ...args[0] === "respond" ? { decision, humanDecisionRecorded: options.humanDecisionRecorded } : {}
141
+ }
142
+ }), null, 2));
143
+ return;
144
+ }
145
+ const { operateClaudeApprovals } = await import("./claude-pack-backend-RMSOPHVQ.js");
100
146
  console.log(JSON.stringify(await operateClaudeApprovals({
101
147
  store: packs.opts().store ?? resolve(homedir(), "AgentPacks"),
102
148
  kind: args[0],
@@ -108,10 +154,10 @@ function registerAgentPacksCommand(program2) {
108
154
  }), null, 2));
109
155
  return;
110
156
  }
111
- if (options.policy || options.endpoint || options.pid || options.apply) {
157
+ if (name !== "lane" && (options.policy || options.endpoint || options.pid || options.apply)) {
112
158
  if (options.harness !== "claude" || !options.policy || !options.endpoint || !options.pid || args.length !== 1)
113
159
  throw new Error("Native switch/recovery requires one Claude pack, --policy, --endpoint and --pid.");
114
- const { configureClaudePack } = await import("./claude-pack-backend-4F4VHMI5.js");
160
+ const { configureClaudePack } = await import("./claude-pack-backend-RMSOPHVQ.js");
115
161
  const result2 = await configureClaudePack({
116
162
  store: packs.opts().store ?? resolve(homedir(), "AgentPacks"),
117
163
  pack: args[0],
@@ -129,7 +175,12 @@ function registerAgentPacksCommand(program2) {
129
175
  if (!adapter) throw new Error("This CLI installation is missing its bundled Topolo Agent Pack adapter. Reinstall @topolo/cli.");
130
176
  const store = packs.opts().store;
131
177
  const forwarded = (options.adapterHelp ? ["--help"] : args).map((value) => value === "--group" ? "--set" : value);
178
+ if (name === "lane" && !options.adapterHelp) {
179
+ if (options.input) forwarded.push("--input", options.input);
180
+ if (options.connection) forwarded.push("--connection", options.connection);
181
+ }
132
182
  if (name === "approvals" && !options.adapterHelp) {
183
+ if (options.connection) forwarded.push("--connection", options.connection);
133
184
  if (options.intake) forwarded.push("--intake", options.intake);
134
185
  if (options.fingerprint) forwarded.push("--fingerprint", options.fingerprint);
135
186
  if (options.response) forwarded.push("--response", options.response);
@@ -158,7 +209,7 @@ import { platform as platform2 } from "os";
158
209
  import { createInterface } from "readline/promises";
159
210
  import { stdin as input } from "process";
160
211
 
161
- // node_modules/.pnpm/@topolo+sdk@0.23.20/node_modules/@topolo/sdk/dist/index.js
212
+ // node_modules/.pnpm/@topolo+sdk@0.23.21/node_modules/@topolo/sdk/dist/index.js
162
213
  function record(value) {
163
214
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
164
215
  }
@@ -523,6 +574,9 @@ function publicTopoloErrorMessage(error) {
523
574
  const code = canonicalTopoloServiceErrorCode(
524
575
  typeof error === "string" ? error : error.code ?? extractTopoloServiceErrorCode(error.body)
525
576
  ) ?? "request_failed";
577
+ if (code === "organization_policy_admin_permission_required") {
578
+ return "Organization policy administration permission is required.";
579
+ }
526
580
  if (/(?:organization|org).*(?:enroll|membership|member|admission)/.test(code)) {
527
581
  return "Organization or application enrollment is required.";
528
582
  }
@@ -550,6 +604,9 @@ function topoloErrorHint(error) {
550
604
  if (code === "enrollment_required" || code === "membership_required" || /(?:organization|org).*(?:enroll|membership|member|admission)|(?:enroll|membership).*(?:organization|org)/.test(code)) {
551
605
  return "The current identity is not enrolled for this organization or application. Use an enrolled identity or ask an organization administrator to complete enrollment.";
552
606
  }
607
+ if (code === "organization_policy_admin_permission_required") {
608
+ return "This action requires explicit organization policy administration permission. Ask an authorized organization administrator to review the exact grant and the published principal and workspace authorization contract.";
609
+ }
553
610
  if (/(?:organization|org).*(?:context|required|missing|invalid|unknown|not_found)/.test(code)) {
554
611
  return "Select a signed-in organization context, then verify the effective identity and organization before retrying.";
555
612
  }
@@ -3768,7 +3825,7 @@ async function pollUntilApproved(params) {
3768
3825
  throw new Error("Device code expired. Run `topolo auth login` again.");
3769
3826
  }
3770
3827
 
3771
- // node_modules/.pnpm/@topolo+sdk@0.23.20/node_modules/@topolo/sdk/dist/node/credential-store.js
3828
+ // node_modules/.pnpm/@topolo+sdk@0.23.21/node_modules/@topolo/sdk/dist/node/credential-store.js
3772
3829
  import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2, chmod as chmod2, lstat, readdir as readdir2 } from "fs/promises";
3773
3830
  import { existsSync as existsSync2, mkdirSync, lstatSync, readdirSync, readFileSync as readFileSync2, openSync, writeFileSync, fsyncSync, closeSync, renameSync, unlinkSync, rmdirSync, linkSync } from "fs";
3774
3831
  import { createHash as createHash2, randomUUID as randomUUID2 } from "crypto";
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@topolo/cli",
3
3
  "packageManager": "pnpm@10.17.1",
4
- "version": "0.13.9",
5
- "topoloPublishedVersion": "0.13.9",
4
+ "version": "0.13.10",
5
+ "topoloPublishedVersion": "0.13.10",
6
6
  "description": "Public command-line interface for Topolo customer organizations, developers, and agents.",
7
7
  "license": "UNLICENSED",
8
8
  "author": "Topolo",
@@ -27,12 +27,12 @@
27
27
  "test:watch": "vitest",
28
28
  "coverage": "pnpm run coverage:node && pnpm run coverage:adapter",
29
29
  "coverage:node": "vitest run --coverage",
30
- "coverage:adapter": "python3 -m venv node_modules/.cache/agent-pack-test && node_modules/.cache/agent-pack-test/bin/python -m pip install --disable-pip-version-check --quiet --timeout 15 --retries 0 -r agent-packs/requirements-test.txt && PYTHONPATH=agent-packs/src:agent-packs COVERAGE_FILE=node_modules/.cache/agent-pack-test/.coverage node_modules/.cache/agent-pack-test/bin/python -m coverage run --branch --source=topolo_agent_pack.topolo,topolo_agent_pack.claude,topolo_agent_pack.policy,topolo_agent_pack.permissions,topolo_agent_pack.approvals,topolo_agent_pack.execution,topolo_agent_pack.live,topolo_agent_pack.cli,coverage_changed -m unittest discover -s agent-packs/tests && COVERAGE_FILE=node_modules/.cache/agent-pack-test/.coverage node_modules/.cache/agent-pack-test/bin/python -m coverage report && COVERAGE_FILE=node_modules/.cache/agent-pack-test/.coverage node_modules/.cache/agent-pack-test/bin/python -m coverage report --include='*/topolo_agent_pack/topolo.py,*/topolo_agent_pack/claude.py,*/topolo_agent_pack/policy.py,*/topolo_agent_pack/permissions.py,*/topolo_agent_pack/approvals.py,*/topolo_agent_pack/execution.py,*/agent-packs/coverage_changed.py' --fail-under=100 && COVERAGE_FILE=node_modules/.cache/agent-pack-test/.coverage node_modules/.cache/agent-pack-test/bin/python -m coverage json -o node_modules/.cache/agent-pack-test/coverage.json && node_modules/.cache/agent-pack-test/bin/python agent-packs/coverage_changed.py"
30
+ "coverage:adapter": "python3 -m venv node_modules/.cache/agent-pack-test && node_modules/.cache/agent-pack-test/bin/python -m pip install --disable-pip-version-check --quiet --timeout 15 --retries 0 -r agent-packs/requirements-test.txt && PYTHONPATH=agent-packs/src:agent-packs COVERAGE_FILE=node_modules/.cache/agent-pack-test/.coverage node_modules/.cache/agent-pack-test/bin/python -m coverage run --branch --source=topolo_agent_pack.topolo,topolo_agent_pack.claude,topolo_agent_pack.policy,topolo_agent_pack.permissions,topolo_agent_pack.approvals,topolo_agent_pack.execution,topolo_agent_pack.live,topolo_agent_pack.cli,topolo_agent_pack.lanes,topolo_agent_pack.task_models,coverage_changed -m unittest discover -s agent-packs/tests && COVERAGE_FILE=node_modules/.cache/agent-pack-test/.coverage node_modules/.cache/agent-pack-test/bin/python -m coverage report && COVERAGE_FILE=node_modules/.cache/agent-pack-test/.coverage node_modules/.cache/agent-pack-test/bin/python -m coverage report --include='*/topolo_agent_pack/topolo.py,*/topolo_agent_pack/claude.py,*/topolo_agent_pack/policy.py,*/topolo_agent_pack/permissions.py,*/topolo_agent_pack/approvals.py,*/topolo_agent_pack/execution.py,*/topolo_agent_pack/lanes.py,*/topolo_agent_pack/task_models.py,*/agent-packs/coverage_changed.py' --fail-under=100 && COVERAGE_FILE=node_modules/.cache/agent-pack-test/.coverage node_modules/.cache/agent-pack-test/bin/python -m coverage json -o node_modules/.cache/agent-pack-test/coverage.json && node_modules/.cache/agent-pack-test/bin/python agent-packs/coverage_changed.py"
31
31
  },
32
32
  "dependencies": {
33
33
  "@modelcontextprotocol/sdk": "^1.0.0",
34
- "@topolo/mcp": "0.14.25",
35
- "@topolo/sdk": "0.23.20",
34
+ "@topolo/mcp": "0.14.26",
35
+ "@topolo/sdk": "0.23.21",
36
36
  "commander": "^12.1.0",
37
37
  "undici": "6.29.0"
38
38
  },