svamp-cli 0.2.185 → 0.2.187

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.
Files changed (29) hide show
  1. package/bin/skills/loop/SKILL.md +2 -1
  2. package/bin/skills/loop/bin/inject-loop.mjs +36 -1
  3. package/bin/skills/loop/bin/loop-init.mjs +2 -0
  4. package/bin/skills/loop/bin/stop-gate.mjs +1 -1
  5. package/dist/{agentCommands-Tcfv1U8D.mjs → agentCommands-D82YAIjn.mjs} +5 -5
  6. package/dist/{auth-B1W6o3z6.mjs → auth-CRgqElsS.mjs} +1 -1
  7. package/dist/cli.mjs +60 -60
  8. package/dist/{commands-BtvYB2td.mjs → commands-2vgPBzxG.mjs} +5 -5
  9. package/dist/{commands-W7DllEQt.mjs → commands-B7oQTg-f.mjs} +1 -1
  10. package/dist/{commands-BCcf9P0h.mjs → commands-BpIsPzLL.mjs} +1 -1
  11. package/dist/{commands-DhWWYPCu.mjs → commands-CkxVt5V0.mjs} +1 -1
  12. package/dist/{commands-wuGT62QI.mjs → commands-DB3LqPei.mjs} +1 -1
  13. package/dist/{commands-xE8KNuKU.mjs → commands-DIPPrpHk.mjs} +2 -2
  14. package/dist/{commands-DLUtnIUf.mjs → commands-DubAkp0i.mjs} +2 -2
  15. package/dist/{fleet-BtIF0tcq.mjs → fleet-PKdEHCXZ.mjs} +1 -1
  16. package/dist/{frpc-DGErIpoO.mjs → frpc-CDj2C0fs.mjs} +1 -1
  17. package/dist/{headlessCli-DyPAqqxN.mjs → headlessCli-BGGF_UPQ.mjs} +2 -2
  18. package/dist/index.mjs +1 -1
  19. package/dist/package-B6C96K9S.mjs +63 -0
  20. package/dist/{rpc-eRCuvMdD.mjs → rpc-B0_q0Ore.mjs} +1 -1
  21. package/dist/{rpc-efgqAqwL.mjs → rpc-DuAe8TKC.mjs} +1 -1
  22. package/dist/{run-L9mNCmzT.mjs → run-DZLwKdGH.mjs} +213 -207
  23. package/dist/{run-BuNdAM7A.mjs → run-FgS-4E-C.mjs} +5 -2
  24. package/dist/{scheduler-TtMT4mcq.mjs → scheduler-CVODqtZb.mjs} +1 -1
  25. package/dist/{serveCommands-DgbxJMHe.mjs → serveCommands-C8QvTpse.mjs} +5 -5
  26. package/dist/{serveManager-BH8Suv9x.mjs → serveManager-CU5NrVV-.mjs} +2 -2
  27. package/dist/{sideband-DRMOoCdW.mjs → sideband-B7uDd_pR.mjs} +1 -1
  28. package/package.json +2 -2
  29. package/dist/package-dix09Aop.mjs +0 -63
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: loop
3
- version: 0.4.0
3
+ version: 0.4.1
4
4
  description: Run a task as a reliable, self-verifying loop — iterate until objective exit conditions are met, with an independent evaluator instead of self-judging. Use when a task needs repeated iterations until "done" (fix until tests pass, refactor until clean, build until a spec is met, autonomous long-running work).
5
5
  ---
6
6
 
@@ -54,6 +54,7 @@ The loop ends only when **all** configured conditions hold:
54
54
  4. **Run the oracle yourself** to check you're actually passing before claiming done.
55
55
  5. **When you believe it's complete, get an independent verdict — do not grade yourself:**
56
56
  - Spawn a fresh subagent with the `Task` tool (use the `loop-evaluator` agent if present, otherwise an inline *skeptical reviewer* prompt). Give it **only** the goal (from `LOOP.md`), the current diff, and the oracle output — never your chain of thought.
57
+ - For an **issue-backlog** loop the evaluator must go further than the oracle: confirm EACH issue closed this round is genuinely resolved by the real change, AND judge **holistically from the user's perspective** — re-read the *original request* behind each closed issue and the *overall project goal*, and confirm we delivered what the user actually wanted end-to-end (built / published / deployed wherever the request implied it, not merely committed). A green oracle only means "no open issues"; reject `done` if the project goal isn't truly met for the user.
57
58
  - It returns `{"verdict":"done"|"continue","reason":...,"guidance":...}`. It should default to `continue` on any doubt.
58
59
  - Record it to `.claude/loop/evaluator-verdict.json`, adding the current state fingerprint:
59
60
  `{"verdict":"done","reason":"...","guidance":"...","state_fp":"<output of: node .claude/loop/bin/state-fp.mjs>"}`
@@ -2,7 +2,7 @@
2
2
  // inject-loop.mjs — Claude Code `SessionStart` / `UserPromptSubmit` hook.
3
3
  // Injects the current LOOP.md plus the loop protocol so every iteration starts
4
4
  // from the latest task/plan/progress without any daemon re-injection.
5
- import { readFileSync, existsSync } from 'node:fs';
5
+ import { readFileSync, writeFileSync, renameSync, existsSync } from 'node:fs';
6
6
  import { dirname, join, resolve, relative } from 'node:path';
7
7
  import { fileURLToPath } from 'node:url';
8
8
 
@@ -19,6 +19,41 @@ const cfg = readJSON(join(LOOP_DIR, 'loop.config.json'), null);
19
19
  const state = readJSON(join(LOOP_DIR, 'loop-state.json'), { active: false });
20
20
  if (!cfg || state.active === false) process.exit(0); // no active loop -> inject nothing
21
21
 
22
+ // Self-heal the Stop gate (#0072). This hook runs on every SessionStart/UserPromptSubmit while a
23
+ // loop is active, so it's the reliable place to GUARANTEE the gate is installed: in a shared working
24
+ // tree another tool/agent can rewrite .claude/settings.json and silently drop the Stop hook, which
25
+ // would let the loop end without the completion gate ever firing. If the loop's own stop-gate.mjs is
26
+ // missing from settings.hooks.Stop, re-install all four loop hooks (idempotent; merges, never clobbers
27
+ // unrelated settings). BIN points at THIS session's copied bin/, so each session heals its own gate.
28
+ function ensureLoopHooks() {
29
+ try {
30
+ const settingsPath = join(PROJECT_ENV || resolve(LOOP_DIR, '..', '..', '..'), '.claude', 'settings.json');
31
+ const binDir = join(LOOP_DIR, 'bin');
32
+ const node = process.execPath;
33
+ const cmd = (script) => `"${node}" "${join(binDir, script)}"`;
34
+ const stopGate = join(binDir, 'stop-gate.mjs');
35
+ if (!existsSync(stopGate)) return; // can't heal what isn't copied; loop-init owns first install
36
+ let settings = {};
37
+ if (existsSync(settingsPath)) { try { settings = JSON.parse(readFileSync(settingsPath, 'utf8')); } catch { settings = {}; } }
38
+ const hooks = settings.hooks || {};
39
+ // Is THIS loop's stop-gate present anywhere under hooks.Stop?
40
+ const stopOk = Array.isArray(hooks.Stop) && hooks.Stop.some((g) =>
41
+ Array.isArray(g?.hooks) && g.hooks.some((h) => typeof h?.command === 'string' && h.command.includes(stopGate)));
42
+ if (stopOk) return; // gate intact — nothing to do
43
+ // Re-install the loop hook set (same shape loop-init writes).
44
+ hooks.SessionStart = [{ hooks: [{ type: 'command', command: cmd('inject-loop.mjs') }] }];
45
+ hooks.UserPromptSubmit = [{ hooks: [{ type: 'command', command: cmd('inject-loop.mjs') }] }];
46
+ hooks.Stop = [{ hooks: [{ type: 'command', command: cmd('stop-gate.mjs') }] }];
47
+ hooks.PreCompact = [{ hooks: [{ type: 'command', command: cmd('precompact.mjs') }] }];
48
+ settings.hooks = hooks;
49
+ const tmp = settingsPath + '.tmp';
50
+ writeFileSync(tmp, JSON.stringify(settings, null, 2));
51
+ renameSync(tmp, settingsPath);
52
+ process.stderr.write('[loop] re-installed missing Stop gate into .claude/settings.json (#0072 self-heal)\n');
53
+ } catch { /* best-effort; never block injection on a heal failure */ }
54
+ }
55
+ ensureLoopHooks();
56
+
22
57
  const PROJECT = (typeof cfg.project_dir === 'string' && cfg.project_dir)
23
58
  || process.env.CLAUDE_PROJECT_DIR || resolve(LOOP_DIR, '..', '..', '..');
24
59
 
@@ -145,6 +145,8 @@ Check:
145
145
  - Does it actually satisfy every success criterion in LOOP.md (not just look plausible)?
146
146
  - Does the oracle genuinely pass, and does it actually cover the requirement?
147
147
  - Edge cases, stubbed/faked functionality, regressions.
148
+ - If this loop works an ISSUE BACKLOG: is EACH issue closed this round genuinely resolved by the real change? A green oracle only means "no open issues", not that each closed issue actually works — reject "done" if any was closed without real resolution.
149
+ - HOLISTIC, from the USER's perspective: re-read the ORIGINAL request behind each closed issue (not just its triaged title) and the OVERALL project goal, and confirm we delivered what the user actually wanted end-to-end — INCLUDING that the change was built / published / deployed wherever the request implied it, not merely committed. Reject "done" if the project goal isn't genuinely met from the user's point of view, even when no issues remain open.
148
150
 
149
151
  Return ONLY a JSON object:
150
152
  {"verdict":"done"|"continue","reason":"<concise>","guidance":"<what to fix if continue>"}
@@ -181,6 +181,6 @@ const remaining = max != null ? ` (iteration ${nextIter}/${max})` : '';
181
181
  const VERDICT_REL = relative(PROJECT, VERDICT) || VERDICT;
182
182
  const STATEFP_REL = relative(PROJECT, join(LOOP_DIR, 'bin', 'state-fp.mjs')) || join(LOOP_DIR, 'bin', 'state-fp.mjs');
183
183
  const evalHint = evaluatorOn && !evaluatorPass && oraclePass
184
- ? `\n\nThe code looks like it may be ready, but you must get an independent verdict: spawn the \`loop-evaluator\` subagent (or a fresh Task agent with a skeptical reviewer prompt) to judge the current diff against LOOP.md. If this loop works an issue backlog, the evaluator MUST also confirm that EACH issue closed during this loop is genuinely resolved by the actual change — a green oracle only means 'no open issues', not that each closed issue works; reject 'done' if any was closed without real resolution. Then write its result to \`${VERDICT_REL}\` as {"verdict":"done"|"continue","reason":"...","guidance":"...","state_fp":"<run: node ${STATEFP_REL}>"}. Do not write the verdict yourself.`
184
+ ? `\n\nThe code looks like it may be ready, but you must get an independent verdict: spawn the \`loop-evaluator\` subagent (or a fresh Task agent with a skeptical reviewer prompt) to judge the current diff against LOOP.md. If this loop works an issue backlog, the evaluator MUST also confirm that EACH issue closed during this loop is genuinely resolved by the actual change — a green oracle only means 'no open issues', not that each closed issue works; reject 'done' if any was closed without real resolution. BEYOND the individual issues, the evaluator MUST also judge HOLISTICALLY, from the USER's perspective: re-read the ORIGINAL request behind each closed issue (not just its triaged title) and the OVERALL project goal, and confirm we actually delivered what the user wanted end-to-end — including that the change was built / published / deployed wherever the issue implied it, not merely committed. Reject 'done' if the project goal is not genuinely met from the user's point of view, even when no issues remain open. Then write its result to \`${VERDICT_REL}\` as {"verdict":"done"|"continue","reason":"...","guidance":"...","state_fp":"<run: node ${STATEFP_REL}>"}. Do not write the verdict yourself.`
185
185
  : '';
186
186
  block(`Loop is not complete${remaining}. Keep working on the task in LOOP.md.\n\n${oracleDetail}\n${evaluatorOn ? '\n' + evaluatorDetail : ''}${evalHint}\n\nUpdate LOOP.md progress, fix the blocking issue, then finish your turn again to be re-checked.`);
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, mkdirSync, writeFileSync, renameSync } from '
2
2
  import { join, dirname } from 'node:path';
3
3
  import os from 'node:os';
4
4
  import { requireNotSandboxed } from './sandboxDetect-DNTcbgWD.mjs';
5
- import { x as shortId } from './run-L9mNCmzT.mjs';
5
+ import { x as shortId } from './run-DZLwKdGH.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -96,7 +96,7 @@ async function sessionSetTitle(title) {
96
96
  }
97
97
  async function sessionSetProjectDescription(description) {
98
98
  const dir = process.cwd();
99
- const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.a3; });
99
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.a5; });
100
100
  const desc = sanitizeDescription(description, 240);
101
101
  if (!desc) {
102
102
  console.error("Project description is empty.");
@@ -180,7 +180,7 @@ async function sessionBroadcast(action, args) {
180
180
  console.log(`Broadcast sent: ${action}`);
181
181
  }
182
182
  async function connectToMachineService() {
183
- const { connectAndGetMachine } = await import('./commands-DhWWYPCu.mjs');
183
+ const { connectAndGetMachine } = await import('./commands-CkxVt5V0.mjs');
184
184
  return connectAndGetMachine();
185
185
  }
186
186
  function buildInboxMessage(args) {
@@ -258,7 +258,7 @@ async function inboxSend(targetSessionId, opts) {
258
258
  console.error("Message body is required.");
259
259
  process.exit(1);
260
260
  }
261
- const { connectAndResolveSession } = await import('./commands-DhWWYPCu.mjs');
261
+ const { connectAndResolveSession } = await import('./commands-CkxVt5V0.mjs');
262
262
  let server;
263
263
  try {
264
264
  const { targetId, messageId } = await inboxSendCore(
@@ -312,7 +312,7 @@ async function inboxReply(messageId, body) {
312
312
  console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
313
313
  process.exit(1);
314
314
  }
315
- const { connectAndResolveSession } = await import('./commands-DhWWYPCu.mjs');
315
+ const { connectAndResolveSession } = await import('./commands-CkxVt5V0.mjs');
316
316
  const { server: localServer, machine: localMachine } = await connectToMachineService();
317
317
  let localDisconnected = false;
318
318
  const disconnectLocal = async () => {
@@ -1,4 +1,4 @@
1
- import { M as resolveModel } from './run-L9mNCmzT.mjs';
1
+ import { M as resolveModel } from './run-DZLwKdGH.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-L9mNCmzT.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-DZLwKdGH.mjs';
2
2
  import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
3
3
  import 'os';
4
4
  import 'fs/promises';
@@ -34,7 +34,7 @@ const subcommand = args[0];
34
34
  let daemonSubcommand = args[1];
35
35
  async function main() {
36
36
  try {
37
- const { getLoadedConfig } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.aa; });
37
+ const { getLoadedConfig } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.ab; });
38
38
  getLoadedConfig();
39
39
  } catch {
40
40
  }
@@ -51,7 +51,7 @@ async function main() {
51
51
  console.error(`svamp daemon restart: ${err.message || err}`);
52
52
  process.exit(1);
53
53
  }
54
- const { restartDaemon } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.ac; });
54
+ const { restartDaemon } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.ad; });
55
55
  await restartDaemon();
56
56
  process.exit(0);
57
57
  }
@@ -344,7 +344,7 @@ async function main() {
344
344
  console.error("svamp service: Service commands are not available in sandboxed sessions.");
345
345
  process.exit(1);
346
346
  }
347
- const { handleServiceCommand } = await import('./commands-BtvYB2td.mjs');
347
+ const { handleServiceCommand } = await import('./commands-2vgPBzxG.mjs');
348
348
  await handleServiceCommand();
349
349
  } else if (subcommand === "serve") {
350
350
  const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
@@ -352,7 +352,7 @@ async function main() {
352
352
  console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
353
353
  process.exit(1);
354
354
  }
355
- const { handleServeCommand } = await import('./serveCommands-DgbxJMHe.mjs');
355
+ const { handleServeCommand } = await import('./serveCommands-C8QvTpse.mjs');
356
356
  await handleServeCommand();
357
357
  process.exit(0);
358
358
  } else if (subcommand === "process" || subcommand === "proc") {
@@ -361,7 +361,7 @@ async function main() {
361
361
  console.error("svamp process: Process commands are not available in sandboxed sessions.");
362
362
  process.exit(1);
363
363
  }
364
- const { processCommand } = await import('./commands-DLUtnIUf.mjs');
364
+ const { processCommand } = await import('./commands-DubAkp0i.mjs');
365
365
  let machineId;
366
366
  const processArgs = args.slice(1);
367
367
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -375,18 +375,18 @@ async function main() {
375
375
  }), machineId);
376
376
  process.exit(0);
377
377
  } else if (subcommand === "issue" || subcommand === "issues") {
378
- const { issueCommand } = await import('./commands-W7DllEQt.mjs');
378
+ const { issueCommand } = await import('./commands-B7oQTg-f.mjs');
379
379
  await issueCommand(args.slice(1));
380
380
  process.exit(0);
381
381
  } else if (subcommand === "workflow" || subcommand === "workflows") {
382
- const { workflowCommand } = await import('./commands-BCcf9P0h.mjs');
382
+ const { workflowCommand } = await import('./commands-BpIsPzLL.mjs');
383
383
  await workflowCommand(args.slice(1));
384
384
  process.exit(0);
385
385
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
386
386
  await handleWiseAgentCommand(args.slice(1));
387
387
  process.exit(0);
388
388
  } else if (subcommand === "feature" || subcommand === "crew") {
389
- const { crewCommand } = await import('./commands-xE8KNuKU.mjs');
389
+ const { crewCommand } = await import('./commands-DIPPrpHk.mjs');
390
390
  await crewCommand(args.slice(1));
391
391
  process.exit(0);
392
392
  } else if (subcommand === "--help" || subcommand === "-h") {
@@ -394,7 +394,7 @@ async function main() {
394
394
  } else if (!subcommand || subcommand === "start") {
395
395
  await handleInteractiveCommand();
396
396
  } else if (subcommand === "--version" || subcommand === "-v") {
397
- const pkg = await import('./package-dix09Aop.mjs').catch(() => ({ default: { version: "unknown" } }));
397
+ const pkg = await import('./package-B6C96K9S.mjs').catch(() => ({ default: { version: "unknown" } }));
398
398
  console.log(`svamp version: ${pkg.default.version}`);
399
399
  } else {
400
400
  console.error(`Unknown command: ${subcommand}`);
@@ -403,7 +403,7 @@ async function main() {
403
403
  }
404
404
  }
405
405
  async function handleInteractiveCommand() {
406
- const { runInteractive } = await import('./run-BuNdAM7A.mjs');
406
+ const { runInteractive } = await import('./run-FgS-4E-C.mjs');
407
407
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
408
408
  let directory = process.cwd();
409
409
  let resumeSessionId;
@@ -448,7 +448,7 @@ async function handleAgentCommand() {
448
448
  return;
449
449
  }
450
450
  if (agentArgs[0] === "list") {
451
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.a6; });
451
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.a8; });
452
452
  console.log("Known agents:");
453
453
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
454
454
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -460,7 +460,7 @@ async function handleAgentCommand() {
460
460
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
461
461
  return;
462
462
  }
463
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.a6; });
463
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.a8; });
464
464
  let cwd = process.cwd();
465
465
  const filteredArgs = [];
466
466
  for (let i = 0; i < agentArgs.length; i++) {
@@ -484,12 +484,12 @@ async function handleAgentCommand() {
484
484
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
485
485
  let backend;
486
486
  if (KNOWN_MCP_AGENTS[config.agentName]) {
487
- const { CodexMcpBackend } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.a7; });
487
+ const { CodexMcpBackend } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.a9; });
488
488
  backend = new CodexMcpBackend({ cwd, log: logFn });
489
489
  } else {
490
- const { AcpBackend } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.a5; });
491
- const { GeminiTransport } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.a8; });
492
- const { DefaultTransport } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.a4; });
490
+ const { AcpBackend } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.a7; });
491
+ const { GeminiTransport } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.aa; });
492
+ const { DefaultTransport } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.a6; });
493
493
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
494
494
  backend = new AcpBackend({
495
495
  agentName: config.agentName,
@@ -616,7 +616,7 @@ async function handleSessionCommand() {
616
616
  process.exit(1);
617
617
  }
618
618
  }
619
- const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-DhWWYPCu.mjs');
619
+ const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-CkxVt5V0.mjs');
620
620
  const parseFlagStr = (flag, shortFlag) => {
621
621
  for (let i = 1; i < sessionArgs.length; i++) {
622
622
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -684,7 +684,7 @@ async function handleSessionCommand() {
684
684
  allowDomain.push(sessionArgs[++i]);
685
685
  }
686
686
  }
687
- const { parseShareArg } = await import('./commands-DhWWYPCu.mjs');
687
+ const { parseShareArg } = await import('./commands-CkxVt5V0.mjs');
688
688
  const shareEntries = share.map((s) => parseShareArg(s));
689
689
  await sessionSpawn(agent, dir, targetMachineId, {
690
690
  message,
@@ -769,7 +769,7 @@ async function handleSessionCommand() {
769
769
  console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
770
770
  process.exit(1);
771
771
  }
772
- const { sessionEditMessage } = await import('./commands-DhWWYPCu.mjs');
772
+ const { sessionEditMessage } = await import('./commands-CkxVt5V0.mjs');
773
773
  await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
774
774
  } else if (sessionSubcommand === "refine") {
775
775
  if (!sessionArgs[1] || !sessionArgs[2]) {
@@ -777,7 +777,7 @@ async function handleSessionCommand() {
777
777
  console.error(" Asks the agent to revise its latest reply in place (no extra round).");
778
778
  process.exit(1);
779
779
  }
780
- const { sessionRefineLastReply } = await import('./commands-DhWWYPCu.mjs');
780
+ const { sessionRefineLastReply } = await import('./commands-CkxVt5V0.mjs');
781
781
  await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
782
782
  } else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
783
783
  if (!sessionArgs[1]) {
@@ -785,7 +785,7 @@ async function handleSessionCommand() {
785
785
  console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
786
786
  process.exit(1);
787
787
  }
788
- const { sessionUndoEdit } = await import('./commands-DhWWYPCu.mjs');
788
+ const { sessionUndoEdit } = await import('./commands-CkxVt5V0.mjs');
789
789
  await sessionUndoEdit(sessionArgs[1], targetMachineId);
790
790
  } else if (sessionSubcommand === "query") {
791
791
  const dir = sessionArgs[1];
@@ -795,7 +795,7 @@ async function handleSessionCommand() {
795
795
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
796
796
  process.exit(1);
797
797
  }
798
- const { sessionQuery } = await import('./commands-DhWWYPCu.mjs');
798
+ const { sessionQuery } = await import('./commands-CkxVt5V0.mjs');
799
799
  await sessionQuery(dir, prompt, targetMachineId, {
800
800
  timeout: parseFlagInt("--timeout"),
801
801
  json: hasFlag("--json"),
@@ -828,7 +828,7 @@ async function handleSessionCommand() {
828
828
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
829
829
  process.exit(1);
830
830
  }
831
- const { sessionApprove } = await import('./commands-DhWWYPCu.mjs');
831
+ const { sessionApprove } = await import('./commands-CkxVt5V0.mjs');
832
832
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
833
833
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
834
834
  json: hasFlag("--json")
@@ -838,7 +838,7 @@ async function handleSessionCommand() {
838
838
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
839
839
  process.exit(1);
840
840
  }
841
- const { sessionDeny } = await import('./commands-DhWWYPCu.mjs');
841
+ const { sessionDeny } = await import('./commands-CkxVt5V0.mjs');
842
842
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
843
843
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
844
844
  json: hasFlag("--json")
@@ -880,7 +880,7 @@ async function handleSessionCommand() {
880
880
  console.error("Usage: svamp session set-title <title>");
881
881
  process.exit(1);
882
882
  }
883
- const { sessionSetTitle } = await import('./agentCommands-Tcfv1U8D.mjs');
883
+ const { sessionSetTitle } = await import('./agentCommands-D82YAIjn.mjs');
884
884
  await sessionSetTitle(title);
885
885
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
886
886
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -888,7 +888,7 @@ async function handleSessionCommand() {
888
888
  console.error("Usage: svamp session set-project-description <text>");
889
889
  process.exit(1);
890
890
  }
891
- const { sessionSetProjectDescription } = await import('./agentCommands-Tcfv1U8D.mjs');
891
+ const { sessionSetProjectDescription } = await import('./agentCommands-D82YAIjn.mjs');
892
892
  await sessionSetProjectDescription(desc);
893
893
  } else if (sessionSubcommand === "set-link") {
894
894
  const url = sessionArgs[1];
@@ -897,7 +897,7 @@ async function handleSessionCommand() {
897
897
  process.exit(1);
898
898
  }
899
899
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
900
- const { sessionSetLink } = await import('./agentCommands-Tcfv1U8D.mjs');
900
+ const { sessionSetLink } = await import('./agentCommands-D82YAIjn.mjs');
901
901
  await sessionSetLink(url, label);
902
902
  } else if (sessionSubcommand === "notify") {
903
903
  const message = sessionArgs[1];
@@ -906,7 +906,7 @@ async function handleSessionCommand() {
906
906
  process.exit(1);
907
907
  }
908
908
  const level = parseFlagStr("--level") || "info";
909
- const { sessionNotify } = await import('./agentCommands-Tcfv1U8D.mjs');
909
+ const { sessionNotify } = await import('./agentCommands-D82YAIjn.mjs');
910
910
  await sessionNotify(message, level);
911
911
  } else if (sessionSubcommand === "broadcast") {
912
912
  const action = sessionArgs[1];
@@ -914,7 +914,7 @@ async function handleSessionCommand() {
914
914
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
915
915
  process.exit(1);
916
916
  }
917
- const { sessionBroadcast } = await import('./agentCommands-Tcfv1U8D.mjs');
917
+ const { sessionBroadcast } = await import('./agentCommands-D82YAIjn.mjs');
918
918
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
919
919
  } else if (sessionSubcommand === "inbox") {
920
920
  const inboxSubcmd = sessionArgs[1];
@@ -925,7 +925,7 @@ async function handleSessionCommand() {
925
925
  process.exit(1);
926
926
  }
927
927
  if (agentSessionId) {
928
- const { inboxSend } = await import('./agentCommands-Tcfv1U8D.mjs');
928
+ const { inboxSend } = await import('./agentCommands-D82YAIjn.mjs');
929
929
  await inboxSend(sessionArgs[2], {
930
930
  body: sessionArgs[3],
931
931
  subject: parseFlagStr("--subject"),
@@ -940,7 +940,7 @@ async function handleSessionCommand() {
940
940
  }
941
941
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
942
942
  if (agentSessionId && !sessionArgs[2]) {
943
- const { inboxList } = await import('./agentCommands-Tcfv1U8D.mjs');
943
+ const { inboxList } = await import('./agentCommands-D82YAIjn.mjs');
944
944
  await inboxList({
945
945
  unread: hasFlag("--unread"),
946
946
  limit: parseFlagInt("--limit"),
@@ -962,7 +962,7 @@ async function handleSessionCommand() {
962
962
  process.exit(1);
963
963
  }
964
964
  if (agentSessionId && !sessionArgs[3]) {
965
- const { inboxList } = await import('./agentCommands-Tcfv1U8D.mjs');
965
+ const { inboxList } = await import('./agentCommands-D82YAIjn.mjs');
966
966
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
967
967
  } else if (sessionArgs[3]) {
968
968
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -972,7 +972,7 @@ async function handleSessionCommand() {
972
972
  }
973
973
  } else if (inboxSubcmd === "reply") {
974
974
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
975
- const { inboxReply } = await import('./agentCommands-Tcfv1U8D.mjs');
975
+ const { inboxReply } = await import('./agentCommands-D82YAIjn.mjs');
976
976
  await inboxReply(sessionArgs[2], sessionArgs[3]);
977
977
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
978
978
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -1010,7 +1010,7 @@ async function handleMachineCommand() {
1010
1010
  return;
1011
1011
  }
1012
1012
  if (machineSubcommand === "share") {
1013
- const { machineShare } = await import('./commands-DhWWYPCu.mjs');
1013
+ const { machineShare } = await import('./commands-CkxVt5V0.mjs');
1014
1014
  let machineId;
1015
1015
  const shareArgs = [];
1016
1016
  for (let i = 1; i < machineArgs.length; i++) {
@@ -1061,14 +1061,14 @@ async function handleMachineCommand() {
1061
1061
  process.exit(1);
1062
1062
  }
1063
1063
  if (all) {
1064
- const { fleetExec } = await import('./fleet-BtIF0tcq.mjs');
1064
+ const { fleetExec } = await import('./fleet-PKdEHCXZ.mjs');
1065
1065
  await fleetExec(command, { cwd });
1066
1066
  } else {
1067
- const { machineExec } = await import('./commands-DhWWYPCu.mjs');
1067
+ const { machineExec } = await import('./commands-CkxVt5V0.mjs');
1068
1068
  await machineExec(machineId, command, cwd);
1069
1069
  }
1070
1070
  } else if (machineSubcommand === "info") {
1071
- const { machineInfo } = await import('./commands-DhWWYPCu.mjs');
1071
+ const { machineInfo } = await import('./commands-CkxVt5V0.mjs');
1072
1072
  let machineId;
1073
1073
  for (let i = 1; i < machineArgs.length; i++) {
1074
1074
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1088,10 +1088,10 @@ async function handleMachineCommand() {
1088
1088
  level = machineArgs[++i];
1089
1089
  }
1090
1090
  }
1091
- const { machineNotify } = await import('./agentCommands-Tcfv1U8D.mjs');
1091
+ const { machineNotify } = await import('./agentCommands-D82YAIjn.mjs');
1092
1092
  await machineNotify(message, level);
1093
1093
  } else if (machineSubcommand === "ls") {
1094
- const { machineLs } = await import('./commands-DhWWYPCu.mjs');
1094
+ const { machineLs } = await import('./commands-CkxVt5V0.mjs');
1095
1095
  let machineId;
1096
1096
  let showHidden = false;
1097
1097
  let path;
@@ -1147,20 +1147,20 @@ Examples:
1147
1147
  };
1148
1148
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1149
1149
  if (sub === "status") {
1150
- const { fleetStatus } = await import('./fleet-BtIF0tcq.mjs');
1150
+ const { fleetStatus } = await import('./fleet-PKdEHCXZ.mjs');
1151
1151
  await fleetStatus();
1152
1152
  } else if (sub === "upgrade-claude") {
1153
- const { fleetUpgradeClaude } = await import('./fleet-BtIF0tcq.mjs');
1153
+ const { fleetUpgradeClaude } = await import('./fleet-PKdEHCXZ.mjs');
1154
1154
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1155
1155
  } else if (sub === "upgrade-svamp") {
1156
- const { fleetUpgradeSvamp } = await import('./fleet-BtIF0tcq.mjs');
1156
+ const { fleetUpgradeSvamp } = await import('./fleet-PKdEHCXZ.mjs');
1157
1157
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
1158
1158
  } else if (sub === "daemon-restart") {
1159
- const { fleetDaemonRestart } = await import('./fleet-BtIF0tcq.mjs');
1159
+ const { fleetDaemonRestart } = await import('./fleet-PKdEHCXZ.mjs');
1160
1160
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1161
1161
  } else if (sub === "push-skill") {
1162
1162
  const name = fleetArgs[1];
1163
- const { fleetPushSkill } = await import('./fleet-BtIF0tcq.mjs');
1163
+ const { fleetPushSkill } = await import('./fleet-PKdEHCXZ.mjs');
1164
1164
  await fleetPushSkill(name);
1165
1165
  } else {
1166
1166
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1176,7 +1176,7 @@ async function handleSkillsCommand() {
1176
1176
  await printSkillsHelp();
1177
1177
  return;
1178
1178
  }
1179
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-wuGT62QI.mjs');
1179
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-DB3LqPei.mjs');
1180
1180
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1181
1181
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1182
1182
  if (!query) {
@@ -1223,7 +1223,7 @@ async function loginToHypha() {
1223
1223
  process.exit(1);
1224
1224
  }
1225
1225
  const anchor = anchorArg.replace(/\/+$/, "");
1226
- const { loadInstanceConfig } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.aa; });
1226
+ const { loadInstanceConfig } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.ab; });
1227
1227
  let cfg = null;
1228
1228
  try {
1229
1229
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1334,7 +1334,7 @@ async function logoutFromHypha() {
1334
1334
  } catch {
1335
1335
  }
1336
1336
  try {
1337
- const { clearInstanceConfigCache } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.aa; });
1337
+ const { clearInstanceConfigCache } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.ab; });
1338
1338
  clearInstanceConfigCache();
1339
1339
  } catch {
1340
1340
  }
@@ -1672,7 +1672,7 @@ async function applyClaudeAuthFlags(argv) {
1672
1672
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1673
1673
  );
1674
1674
  }
1675
- const mod = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.a9; });
1675
+ const mod = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.a4; });
1676
1676
  if (hasHypha) {
1677
1677
  let url;
1678
1678
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1726,7 +1726,7 @@ async function applyDaemonShareFlag(argv) {
1726
1726
  }
1727
1727
  }
1728
1728
  if (collected.length === 0) return;
1729
- const { updateEnvFile } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.a9; });
1729
+ const { updateEnvFile } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.a4; });
1730
1730
  const seen = /* @__PURE__ */ new Set();
1731
1731
  const deduped = collected.filter((e) => {
1732
1732
  const k = e.toLowerCase();
@@ -1759,7 +1759,7 @@ async function handleWiseAgentCommand(rest) {
1759
1759
  }
1760
1760
  });
1761
1761
  const message = rest.slice(1).map((a, idx) => ({ a, idx: idx + 1 })).filter(({ a, idx }) => !a.startsWith("-") && !consumed.has(String(idx))).map(({ a }) => a).join(" ");
1762
- const { wiseAskCli } = await import('./commands-DhWWYPCu.mjs');
1762
+ const { wiseAskCli } = await import('./commands-CkxVt5V0.mjs');
1763
1763
  await wiseAskCli(machineId, message, sessionId, { json });
1764
1764
  return;
1765
1765
  }
@@ -1771,7 +1771,7 @@ async function handleWiseAgentCommand(rest) {
1771
1771
  }
1772
1772
  return void 0;
1773
1773
  };
1774
- const { runWiseVoiceCli } = await import('./headlessCli-DyPAqqxN.mjs');
1774
+ const { runWiseVoiceCli } = await import('./headlessCli-BGGF_UPQ.mjs');
1775
1775
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1776
1776
  return;
1777
1777
  }
@@ -1789,7 +1789,7 @@ async function handleWiseAgentCommand(rest) {
1789
1789
  const mode = valueOf(["--mode"]);
1790
1790
  const mission = valueOf(["--mission"]);
1791
1791
  const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
1792
- const { wiseJoinMeetingCli } = await import('./commands-DhWWYPCu.mjs');
1792
+ const { wiseJoinMeetingCli } = await import('./commands-CkxVt5V0.mjs');
1793
1793
  await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
1794
1794
  return;
1795
1795
  }
@@ -1801,7 +1801,7 @@ async function handleWiseAgentCommand(rest) {
1801
1801
  }
1802
1802
  return void 0;
1803
1803
  };
1804
- const { wiseLeaveMeetingCli } = await import('./commands-DhWWYPCu.mjs');
1804
+ const { wiseLeaveMeetingCli } = await import('./commands-CkxVt5V0.mjs');
1805
1805
  await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
1806
1806
  return;
1807
1807
  }
@@ -1825,7 +1825,7 @@ async function handleWiseAgentCommand(rest) {
1825
1825
  }
1826
1826
  });
1827
1827
  const text = rest.slice(1).map((a, idx) => ({ a, idx: idx + 1 })).filter(({ a, idx }) => !a.startsWith("-") && !consumed.has(String(idx))).map(({ a }) => a).join(" ");
1828
- const { wiseAnnounceCli } = await import('./commands-DhWWYPCu.mjs');
1828
+ const { wiseAnnounceCli } = await import('./commands-CkxVt5V0.mjs');
1829
1829
  await wiseAnnounceCli(machineId, text, sessionId, { json });
1830
1830
  return;
1831
1831
  }
@@ -1837,7 +1837,7 @@ async function handleWiseAgentCommand(rest) {
1837
1837
  }
1838
1838
  return void 0;
1839
1839
  };
1840
- const { wiseMeetingsCli } = await import('./commands-DhWWYPCu.mjs');
1840
+ const { wiseMeetingsCli } = await import('./commands-CkxVt5V0.mjs');
1841
1841
  await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
1842
1842
  return;
1843
1843
  }
@@ -1887,7 +1887,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1887
1887
  return;
1888
1888
  }
1889
1889
  const authArgs = rest.slice(1);
1890
- const mod = await import('./auth-B1W6o3z6.mjs');
1890
+ const mod = await import('./auth-CRgqElsS.mjs');
1891
1891
  let action;
1892
1892
  try {
1893
1893
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1897,7 +1897,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1897
1897
  return;
1898
1898
  }
1899
1899
  if (action) {
1900
- const { updateEnvFile } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.a9; });
1900
+ const { updateEnvFile } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.a4; });
1901
1901
  const updates = mod.buildWiseAgentEnvUpdates(action);
1902
1902
  updateEnvFile(updates);
1903
1903
  for (const [k, v] of Object.entries(updates)) {
@@ -1911,7 +1911,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1911
1911
  }
1912
1912
  async function handleDaemonAuthCommand(argv) {
1913
1913
  const sub = (argv[0] || "status").toLowerCase();
1914
- const mod = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.a9; });
1914
+ const mod = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.a4; });
1915
1915
  if (sub === "--help" || sub === "-h" || sub === "help") {
1916
1916
  console.log(`
1917
1917
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2224,7 +2224,7 @@ Examples:
2224
2224
  async function printSkillsHelp() {
2225
2225
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2226
2226
  try {
2227
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-L9mNCmzT.mjs').then(function (n) { return n.ab; });
2227
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-DZLwKdGH.mjs').then(function (n) { return n.ac; });
2228
2228
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2229
2229
  } catch {
2230
2230
  }