svamp-cli 0.2.295 → 0.2.297

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 (28) hide show
  1. package/dist/{adminCommands-xUAF0WBr.mjs → adminCommands-DgjPSsrK.mjs} +1 -1
  2. package/dist/{agentCommands-Bq4ZGQMz.mjs → agentCommands-B7naHDWq.mjs} +16 -9
  3. package/dist/{auth-BNJguNHt.mjs → auth-BELggWCf.mjs} +1 -1
  4. package/dist/{cli-6_aaOi8g.mjs → cli-C-dcoT95.mjs} +73 -71
  5. package/dist/cli.mjs +2 -2
  6. package/dist/{commands-BxYTQHHv.mjs → commands-6NGsQNcq.mjs} +2 -2
  7. package/dist/{commands-Be5X3D0X.mjs → commands-9RCokP3o.mjs} +2 -2
  8. package/dist/{commands-DIy3pxIY.mjs → commands-B-sJlyvW.mjs} +2 -2
  9. package/dist/{commands-DvFnLd5w.mjs → commands-BJZyPz9N.mjs} +6 -3
  10. package/dist/{commands-BRYs2dLM.mjs → commands-BxKXn8q2.mjs} +2 -2
  11. package/dist/{commands-B2K4g98x.mjs → commands-DVw-VfWc.mjs} +1 -1
  12. package/dist/{commands-Dac3XqPQ.mjs → commands-Dk18oHFj.mjs} +7 -7
  13. package/dist/{commands-BUalDWw5.mjs → commands-cVnS-T4r.mjs} +1 -1
  14. package/dist/{fleet-DCyTQBjw.mjs → fleet-CbdPguLQ.mjs} +1 -1
  15. package/dist/{frpc-BgZIhk0_.mjs → frpc-DXiVmDEz.mjs} +1 -1
  16. package/dist/{headlessCli-DcQ0GWVi.mjs → headlessCli-DLqmC4KJ.mjs} +2 -2
  17. package/dist/index.mjs +1 -1
  18. package/dist/{notifyCommands-DPHXHmYE.mjs → notifyCommands-DYFhp4eV.mjs} +1 -1
  19. package/dist/package-Bbhk823j.mjs +64 -0
  20. package/dist/{rpc-BcC_Ua-I.mjs → rpc-CJbR3vhe.mjs} +1 -1
  21. package/dist/{rpc-DKgf9fx_.mjs → rpc-v1hrwmCr.mjs} +1 -1
  22. package/dist/{run-D2RVDRge.mjs → run-8Q-jBpEp.mjs} +1 -1
  23. package/dist/{run-DVtvYoyf.mjs → run-BKR-KNMV.mjs} +150 -12
  24. package/dist/{scheduler-CyAbfQzb.mjs → scheduler-DXE6xA8q.mjs} +1 -1
  25. package/dist/{serveCommands-CqD64t9I.mjs → serveCommands-B57iAgxC.mjs} +5 -5
  26. package/dist/{sideband-jirL_dMs.mjs → sideband-C5_SnwE7.mjs} +1 -1
  27. package/package.json +2 -2
  28. package/dist/package-BBHtbZbd.mjs +0 -64
@@ -1,4 +1,4 @@
1
- import { c as connectToHypha, O as computeCollectionConfigUpdate, P as SYSTEM_COLLECTION_CONFIG } from './run-DVtvYoyf.mjs';
1
+ import { c as connectToHypha, O as computeCollectionConfigUpdate, P as SYSTEM_COLLECTION_CONFIG } from './run-BKR-KNMV.mjs';
2
2
  import { existsSync, readFileSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
  import os from 'node:os';
@@ -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 { i as shortId } from './run-DVtvYoyf.mjs';
5
+ import { i as shortId } from './run-BKR-KNMV.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-DVtvYoyf.mjs').then(function (n) { return n.au; });
99
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.au; });
100
100
  const desc = sanitizeDescription(description, 240);
101
101
  if (!desc) {
102
102
  console.error("Project description is empty.");
@@ -343,7 +343,7 @@ async function sessionBroadcast(action, args) {
343
343
  console.log(`Broadcast sent: ${action}`);
344
344
  }
345
345
  async function connectToMachineService() {
346
- const { connectAndGetMachine } = await import('./commands-DvFnLd5w.mjs');
346
+ const { connectAndGetMachine } = await import('./commands-BJZyPz9N.mjs');
347
347
  return connectAndGetMachine();
348
348
  }
349
349
  function buildInboxMessage(args) {
@@ -356,7 +356,10 @@ function buildInboxMessage(args) {
356
356
  fromSession: args.fromSessionId,
357
357
  to: args.to,
358
358
  subject: args.subject,
359
- urgency: args.urgency || "normal",
359
+ // Default URGENT (wake the recipient immediately) so inbox sends/replies match `session send`
360
+ // and aren't silently deferred — the caller passes 'normal' explicitly for --when-idle or the
361
+ // inbox-turn anti-storm safeguard. (Owner directive: all message-sends default urgent.)
362
+ urgency: args.urgency || "urgent",
360
363
  ...args.replyTo ? { replyTo: args.replyTo } : {},
361
364
  ...args.threadId ? { threadId: args.threadId } : {}
362
365
  };
@@ -396,6 +399,8 @@ async function inboxReplyCore(localMachine, resolve, args) {
396
399
  to: fullId,
397
400
  body: args.body,
398
401
  subject: original.subject ? `Re: ${original.subject}` : void 0,
402
+ urgency: args.urgency,
403
+ // default (undefined) → urgent; --when-idle passes 'normal'
399
404
  replyTo: original.messageId,
400
405
  threadId: original.threadId || original.messageId
401
406
  });
@@ -421,7 +426,7 @@ async function inboxSend(targetSessionId, opts) {
421
426
  console.error("Message body is required.");
422
427
  process.exit(1);
423
428
  }
424
- const { connectAndResolveSession } = await import('./commands-DvFnLd5w.mjs');
429
+ const { connectAndResolveSession } = await import('./commands-BJZyPz9N.mjs');
425
430
  let server;
426
431
  try {
427
432
  const { targetId, messageId } = await inboxSendCore(
@@ -430,7 +435,8 @@ async function inboxSend(targetSessionId, opts) {
430
435
  server = r.server;
431
436
  return { machine: r.machine, fullId: r.fullId };
432
437
  },
433
- { fromSessionId: sessionId, target: targetSessionId, body, subject: opts?.subject, urgency: opts?.urgency }
438
+ // Default urgent (buildInboxMessage); --when-idle defers to the recipient's next idle turn.
439
+ { fromSessionId: sessionId, target: targetSessionId, body, subject: opts?.subject, urgency: opts?.urgency ?? (opts?.whenIdle ? "normal" : void 0) }
434
440
  );
435
441
  console.log(`Inbox message sent to ${targetId.slice(0, 8)} (id: ${messageId.slice(0, 8)})`);
436
442
  } finally {
@@ -468,14 +474,14 @@ async function inboxList(opts) {
468
474
  await server.disconnect();
469
475
  }
470
476
  }
471
- async function inboxReply(messageId, body) {
477
+ async function inboxReply(messageId, body, opts) {
472
478
  requireNotSandboxed("inbox reply");
473
479
  const sessionId = process.env.SVAMP_SESSION_ID;
474
480
  if (!sessionId) {
475
481
  console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
476
482
  process.exit(1);
477
483
  }
478
- const { connectAndResolveSession } = await import('./commands-DvFnLd5w.mjs');
484
+ const { connectAndResolveSession } = await import('./commands-BJZyPz9N.mjs');
479
485
  const { server: localServer, machine: localMachine } = await connectToMachineService();
480
486
  let localDisconnected = false;
481
487
  const disconnectLocal = async () => {
@@ -497,7 +503,8 @@ async function inboxReply(messageId, body) {
497
503
  senderServer = r.server;
498
504
  return { machine: r.machine, fullId: r.fullId };
499
505
  },
500
- { sessionId, messageId, body }
506
+ // Default urgent (a reply wakes the waiting party); --when-idle defers.
507
+ { sessionId, messageId, body, urgency: opts?.urgency ?? (opts?.whenIdle ? "normal" : void 0) }
501
508
  );
502
509
  switch (res.kind) {
503
510
  case "not-found":
@@ -1,4 +1,4 @@
1
- import { a4 as resolveModel } from './run-DVtvYoyf.mjs';
1
+ import { a4 as resolveModel } from './run-BKR-KNMV.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -1,4 +1,4 @@
1
- import { a5 as clearStopMarker, a6 as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-DVtvYoyf.mjs';
1
+ import { a5 as clearStopMarker, a6 as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-BKR-KNMV.mjs';
2
2
  import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
3
3
 
4
4
  function flushAndExit(code) {
@@ -33,7 +33,7 @@ const subcommand = args[0];
33
33
  let daemonSubcommand = args[1];
34
34
  async function main() {
35
35
  try {
36
- const { getLoadedConfig } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.aq; });
36
+ const { getLoadedConfig } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.aq; });
37
37
  getLoadedConfig();
38
38
  } catch {
39
39
  }
@@ -52,7 +52,7 @@ async function main() {
52
52
  }
53
53
  const whenIdle = args.includes("--when-idle");
54
54
  const force = args.includes("--force");
55
- const mod = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.aB; });
55
+ const mod = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.aB; });
56
56
  if (whenIdle && !force) {
57
57
  if (mod.isDaemonAlive()) {
58
58
  mod.writePendingRestart({ reason: "svamp daemon restart --when-idle" });
@@ -356,7 +356,7 @@ async function main() {
356
356
  console.error("svamp service: Service commands are not available in sandboxed sessions.");
357
357
  process.exit(1);
358
358
  }
359
- const { handleServiceCommand } = await import('./commands-Dac3XqPQ.mjs');
359
+ const { handleServiceCommand } = await import('./commands-Dk18oHFj.mjs');
360
360
  await handleServiceCommand();
361
361
  } else if (subcommand === "serve") {
362
362
  const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
@@ -364,7 +364,7 @@ async function main() {
364
364
  console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
365
365
  process.exit(1);
366
366
  }
367
- const { handleServeCommand } = await import('./serveCommands-CqD64t9I.mjs');
367
+ const { handleServeCommand } = await import('./serveCommands-B57iAgxC.mjs');
368
368
  await handleServeCommand();
369
369
  process.exit(0);
370
370
  } else if (subcommand === "process" || subcommand === "proc") {
@@ -373,7 +373,7 @@ async function main() {
373
373
  console.error("svamp process: Process commands are not available in sandboxed sessions.");
374
374
  process.exit(1);
375
375
  }
376
- const { processCommand } = await import('./commands-DIy3pxIY.mjs');
376
+ const { processCommand } = await import('./commands-B-sJlyvW.mjs');
377
377
  let machineId;
378
378
  const processArgs = args.slice(1);
379
379
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -387,26 +387,26 @@ async function main() {
387
387
  }), machineId);
388
388
  process.exit(0);
389
389
  } else if (subcommand === "outpost") {
390
- const { outpostCommand } = await import('./commands-BRYs2dLM.mjs');
390
+ const { outpostCommand } = await import('./commands-BxKXn8q2.mjs');
391
391
  await outpostCommand(args.slice(1));
392
392
  process.exit(0);
393
393
  } else if (subcommand === "issue" || subcommand === "issues") {
394
- const { issueCommand } = await import('./commands-Be5X3D0X.mjs');
394
+ const { issueCommand } = await import('./commands-9RCokP3o.mjs');
395
395
  await issueCommand(args.slice(1));
396
396
  await flushAndExit(0);
397
397
  } else if (subcommand === "workflow" || subcommand === "workflows") {
398
- const { workflowCommand } = await import('./commands-BUalDWw5.mjs');
398
+ const { workflowCommand } = await import('./commands-cVnS-T4r.mjs');
399
399
  await workflowCommand(args.slice(1));
400
400
  await flushAndExit(0);
401
401
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
402
402
  await handleWiseAgentCommand(args.slice(1));
403
403
  process.exit(0);
404
404
  } else if (subcommand === "feature" || subcommand === "crew") {
405
- const { crewCommand } = await import('./commands-BxYTQHHv.mjs');
405
+ const { crewCommand } = await import('./commands-6NGsQNcq.mjs');
406
406
  await crewCommand(args.slice(1));
407
407
  process.exit(0);
408
408
  } else if (subcommand === "notify") {
409
- const { notifyUser } = await import('./notifyCommands-DPHXHmYE.mjs');
409
+ const { notifyUser } = await import('./notifyCommands-DYFhp4eV.mjs');
410
410
  const rest = args.slice(1);
411
411
  let email;
412
412
  const o = {};
@@ -423,7 +423,7 @@ async function main() {
423
423
  } else if (subcommand === "admin") {
424
424
  const adminSub = args[1];
425
425
  if (adminSub === "set-collection-config") {
426
- const { setCollectionConfig } = await import('./adminCommands-xUAF0WBr.mjs');
426
+ const { setCollectionConfig } = await import('./adminCommands-DgjPSsrK.mjs');
427
427
  const rest = args.slice(2);
428
428
  let alias;
429
429
  let configJson;
@@ -433,10 +433,10 @@ async function main() {
433
433
  }
434
434
  await setCollectionConfig(alias, configJson);
435
435
  } else if (adminSub === "create-system-collections") {
436
- const { createSystemCollections } = await import('./adminCommands-xUAF0WBr.mjs');
436
+ const { createSystemCollections } = await import('./adminCommands-DgjPSsrK.mjs');
437
437
  await createSystemCollections();
438
438
  } else if (adminSub === "migrate-collection-children") {
439
- const { migrateCollectionChildren } = await import('./adminCommands-xUAF0WBr.mjs');
439
+ const { migrateCollectionChildren } = await import('./adminCommands-DgjPSsrK.mjs');
440
440
  const rest = args.slice(2).filter((a) => !a.startsWith("-"));
441
441
  await migrateCollectionChildren(rest[0], rest[1]);
442
442
  } else {
@@ -444,7 +444,7 @@ async function main() {
444
444
  }
445
445
  process.exit(0);
446
446
  } else if (subcommand === "events") {
447
- const { listEvents, ackEvent } = await import('./notifyCommands-DPHXHmYE.mjs');
447
+ const { listEvents, ackEvent } = await import('./notifyCommands-DYFhp4eV.mjs');
448
448
  const sub = args[1];
449
449
  const rest = args.slice(2);
450
450
  let email;
@@ -465,7 +465,7 @@ async function main() {
465
465
  } else if (!subcommand || subcommand === "start") {
466
466
  await handleInteractiveCommand();
467
467
  } else if (subcommand === "--version" || subcommand === "-v") {
468
- const pkg = await import('./package-BBHtbZbd.mjs').catch(() => ({ default: { version: "unknown" } }));
468
+ const pkg = await import('./package-Bbhk823j.mjs').catch(() => ({ default: { version: "unknown" } }));
469
469
  console.log(`svamp version: ${pkg.default.version}`);
470
470
  } else {
471
471
  console.error(`Unknown command: ${subcommand}`);
@@ -474,7 +474,7 @@ async function main() {
474
474
  }
475
475
  }
476
476
  async function handleInteractiveCommand() {
477
- const { runInteractive } = await import('./run-D2RVDRge.mjs');
477
+ const { runInteractive } = await import('./run-8Q-jBpEp.mjs');
478
478
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
479
479
  let directory = process.cwd();
480
480
  let resumeSessionId;
@@ -519,7 +519,7 @@ async function handleAgentCommand() {
519
519
  return;
520
520
  }
521
521
  if (agentArgs[0] === "list") {
522
- const { KNOWN_ACP_AGENTS, KNOWN_CODEX_AGENTS: KNOWN_CODEX_AGENTS2 } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.ax; });
522
+ const { KNOWN_ACP_AGENTS, KNOWN_CODEX_AGENTS: KNOWN_CODEX_AGENTS2 } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.ax; });
523
523
  console.log("Known agents:");
524
524
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
525
525
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -531,7 +531,7 @@ async function handleAgentCommand() {
531
531
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
532
532
  return;
533
533
  }
534
- const { resolveAcpAgentConfig, KNOWN_CODEX_AGENTS } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.ax; });
534
+ const { resolveAcpAgentConfig, KNOWN_CODEX_AGENTS } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.ax; });
535
535
  let cwd = process.cwd();
536
536
  const filteredArgs = [];
537
537
  for (let i = 0; i < agentArgs.length; i++) {
@@ -555,12 +555,12 @@ async function handleAgentCommand() {
555
555
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
556
556
  let backend;
557
557
  if (KNOWN_CODEX_AGENTS[config.agentName]) {
558
- const { CodexAppServerBackend } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.ay; });
558
+ const { CodexAppServerBackend } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.ay; });
559
559
  backend = new CodexAppServerBackend({ cwd, log: logFn });
560
560
  } else {
561
- const { AcpBackend } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.aw; });
562
- const { GeminiTransport } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.az; });
563
- const { DefaultTransport } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.av; });
561
+ const { AcpBackend } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.aw; });
562
+ const { GeminiTransport } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.az; });
563
+ const { DefaultTransport } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.av; });
564
564
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
565
565
  backend = new AcpBackend({
566
566
  agentName: config.agentName,
@@ -687,7 +687,7 @@ async function handleSessionCommand() {
687
687
  process.exit(1);
688
688
  }
689
689
  }
690
- const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionLoopExtend, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-DvFnLd5w.mjs');
690
+ const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionLoopExtend, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-BJZyPz9N.mjs');
691
691
  const parseFlagStr = (flag, shortFlag) => {
692
692
  for (let i = 1; i < sessionArgs.length; i++) {
693
693
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -755,7 +755,7 @@ async function handleSessionCommand() {
755
755
  allowDomain.push(sessionArgs[++i]);
756
756
  }
757
757
  }
758
- const { parseShareArg } = await import('./commands-DvFnLd5w.mjs');
758
+ const { parseShareArg } = await import('./commands-BJZyPz9N.mjs');
759
759
  const shareEntries = share.map((s) => parseShareArg(s));
760
760
  await sessionSpawn(agent, dir, targetMachineId, {
761
761
  message,
@@ -845,7 +845,7 @@ async function handleSessionCommand() {
845
845
  console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
846
846
  process.exit(1);
847
847
  }
848
- const { sessionEditMessage } = await import('./commands-DvFnLd5w.mjs');
848
+ const { sessionEditMessage } = await import('./commands-BJZyPz9N.mjs');
849
849
  await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
850
850
  } else if (sessionSubcommand === "refine") {
851
851
  if (!sessionArgs[1] || !sessionArgs[2]) {
@@ -853,7 +853,7 @@ async function handleSessionCommand() {
853
853
  console.error(" Asks the agent to revise its latest reply in place (no extra round).");
854
854
  process.exit(1);
855
855
  }
856
- const { sessionRefineLastReply } = await import('./commands-DvFnLd5w.mjs');
856
+ const { sessionRefineLastReply } = await import('./commands-BJZyPz9N.mjs');
857
857
  await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
858
858
  } else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
859
859
  if (!sessionArgs[1]) {
@@ -861,7 +861,7 @@ async function handleSessionCommand() {
861
861
  console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
862
862
  process.exit(1);
863
863
  }
864
- const { sessionUndoEdit } = await import('./commands-DvFnLd5w.mjs');
864
+ const { sessionUndoEdit } = await import('./commands-BJZyPz9N.mjs');
865
865
  await sessionUndoEdit(sessionArgs[1], targetMachineId);
866
866
  } else if (sessionSubcommand === "query") {
867
867
  const dir = sessionArgs[1];
@@ -871,7 +871,7 @@ async function handleSessionCommand() {
871
871
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
872
872
  process.exit(1);
873
873
  }
874
- const { sessionQuery } = await import('./commands-DvFnLd5w.mjs');
874
+ const { sessionQuery } = await import('./commands-BJZyPz9N.mjs');
875
875
  await sessionQuery(dir, prompt, targetMachineId, {
876
876
  timeout: parseFlagInt("--timeout"),
877
877
  json: hasFlag("--json"),
@@ -904,7 +904,7 @@ async function handleSessionCommand() {
904
904
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
905
905
  process.exit(1);
906
906
  }
907
- const { sessionApprove } = await import('./commands-DvFnLd5w.mjs');
907
+ const { sessionApprove } = await import('./commands-BJZyPz9N.mjs');
908
908
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
909
909
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
910
910
  json: hasFlag("--json")
@@ -914,7 +914,7 @@ async function handleSessionCommand() {
914
914
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
915
915
  process.exit(1);
916
916
  }
917
- const { sessionDeny } = await import('./commands-DvFnLd5w.mjs');
917
+ const { sessionDeny } = await import('./commands-BJZyPz9N.mjs');
918
918
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
919
919
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
920
920
  json: hasFlag("--json")
@@ -966,7 +966,7 @@ async function handleSessionCommand() {
966
966
  console.error("Usage: svamp session set-title <title>");
967
967
  process.exit(1);
968
968
  }
969
- const { sessionSetTitle } = await import('./agentCommands-Bq4ZGQMz.mjs');
969
+ const { sessionSetTitle } = await import('./agentCommands-B7naHDWq.mjs');
970
970
  await sessionSetTitle(title);
971
971
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
972
972
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -974,7 +974,7 @@ async function handleSessionCommand() {
974
974
  console.error("Usage: svamp session set-project-description <text>");
975
975
  process.exit(1);
976
976
  }
977
- const { sessionSetProjectDescription } = await import('./agentCommands-Bq4ZGQMz.mjs');
977
+ const { sessionSetProjectDescription } = await import('./agentCommands-B7naHDWq.mjs');
978
978
  await sessionSetProjectDescription(desc);
979
979
  } else if (sessionSubcommand === "set-link") {
980
980
  const url = sessionArgs[1];
@@ -983,11 +983,11 @@ async function handleSessionCommand() {
983
983
  process.exit(1);
984
984
  }
985
985
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
986
- const { sessionSetLink } = await import('./agentCommands-Bq4ZGQMz.mjs');
986
+ const { sessionSetLink } = await import('./agentCommands-B7naHDWq.mjs');
987
987
  await sessionSetLink(url, label);
988
988
  } else if (sessionSubcommand === "link") {
989
989
  const op = sessionArgs[1];
990
- const lm = await import('./agentCommands-Bq4ZGQMz.mjs');
990
+ const lm = await import('./agentCommands-B7naHDWq.mjs');
991
991
  if (op === "add") {
992
992
  const url = sessionArgs[2];
993
993
  if (!url || url.startsWith("--")) {
@@ -1022,7 +1022,7 @@ async function handleSessionCommand() {
1022
1022
  process.exit(1);
1023
1023
  }
1024
1024
  const level = parseFlagStr("--level") || "info";
1025
- const { sessionNotify } = await import('./agentCommands-Bq4ZGQMz.mjs');
1025
+ const { sessionNotify } = await import('./agentCommands-B7naHDWq.mjs');
1026
1026
  await sessionNotify(message, level);
1027
1027
  } else if (sessionSubcommand === "broadcast") {
1028
1028
  const action = sessionArgs[1];
@@ -1030,33 +1030,35 @@ async function handleSessionCommand() {
1030
1030
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
1031
1031
  process.exit(1);
1032
1032
  }
1033
- const { sessionBroadcast } = await import('./agentCommands-Bq4ZGQMz.mjs');
1033
+ const { sessionBroadcast } = await import('./agentCommands-B7naHDWq.mjs');
1034
1034
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
1035
1035
  } else if (sessionSubcommand === "inbox") {
1036
1036
  const inboxSubcmd = sessionArgs[1];
1037
1037
  const agentSessionId = process.env.SVAMP_SESSION_ID;
1038
1038
  if (inboxSubcmd === "send") {
1039
1039
  if (!sessionArgs[2] || !sessionArgs[3]) {
1040
- console.error('Usage: svamp session inbox send <target-session-id> "<body>" [--subject "..."] [--urgency urgent|normal] [--json]');
1040
+ console.error('Usage: svamp session inbox send <target-session-id> "<body>" [--subject "..."] [--when-idle] [--urgency urgent|normal] [--json] (urgent by default \u2014 wakes the recipient; --when-idle defers to their next idle turn)');
1041
1041
  process.exit(1);
1042
1042
  }
1043
1043
  if (agentSessionId) {
1044
- const { inboxSend } = await import('./agentCommands-Bq4ZGQMz.mjs');
1044
+ const { inboxSend } = await import('./agentCommands-B7naHDWq.mjs');
1045
1045
  await inboxSend(sessionArgs[2], {
1046
1046
  body: sessionArgs[3],
1047
1047
  subject: parseFlagStr("--subject"),
1048
- urgency: parseFlagStr("--urgency")
1048
+ urgency: parseFlagStr("--urgency"),
1049
+ whenIdle: hasFlag("--when-idle")
1049
1050
  });
1050
1051
  } else {
1051
1052
  await sessionInboxSend(sessionArgs[2], sessionArgs[3], targetMachineId, {
1052
1053
  subject: parseFlagStr("--subject"),
1053
1054
  urgency: parseFlagStr("--urgency"),
1055
+ whenIdle: hasFlag("--when-idle"),
1054
1056
  json: hasFlag("--json")
1055
1057
  });
1056
1058
  }
1057
1059
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
1058
1060
  if (agentSessionId && !sessionArgs[2]) {
1059
- const { inboxList } = await import('./agentCommands-Bq4ZGQMz.mjs');
1061
+ const { inboxList } = await import('./agentCommands-B7naHDWq.mjs');
1060
1062
  await inboxList({
1061
1063
  unread: hasFlag("--unread"),
1062
1064
  limit: parseFlagInt("--limit"),
@@ -1078,7 +1080,7 @@ async function handleSessionCommand() {
1078
1080
  process.exit(1);
1079
1081
  }
1080
1082
  if (agentSessionId && !sessionArgs[3]) {
1081
- const { inboxList } = await import('./agentCommands-Bq4ZGQMz.mjs');
1083
+ const { inboxList } = await import('./agentCommands-B7naHDWq.mjs');
1082
1084
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
1083
1085
  } else if (sessionArgs[3]) {
1084
1086
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -1088,7 +1090,7 @@ async function handleSessionCommand() {
1088
1090
  }
1089
1091
  } else if (inboxSubcmd === "reply") {
1090
1092
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
1091
- const { inboxReply } = await import('./agentCommands-Bq4ZGQMz.mjs');
1093
+ const { inboxReply } = await import('./agentCommands-B7naHDWq.mjs');
1092
1094
  await inboxReply(sessionArgs[2], sessionArgs[3]);
1093
1095
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
1094
1096
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -1126,7 +1128,7 @@ async function handleMachineCommand() {
1126
1128
  return;
1127
1129
  }
1128
1130
  if (machineSubcommand === "share") {
1129
- const { machineShare } = await import('./commands-DvFnLd5w.mjs');
1131
+ const { machineShare } = await import('./commands-BJZyPz9N.mjs');
1130
1132
  let machineId;
1131
1133
  const shareArgs = [];
1132
1134
  for (let i = 1; i < machineArgs.length; i++) {
@@ -1177,14 +1179,14 @@ async function handleMachineCommand() {
1177
1179
  process.exit(1);
1178
1180
  }
1179
1181
  if (all) {
1180
- const { fleetExec } = await import('./fleet-DCyTQBjw.mjs');
1182
+ const { fleetExec } = await import('./fleet-CbdPguLQ.mjs');
1181
1183
  await fleetExec(command, { cwd });
1182
1184
  } else {
1183
- const { machineExec } = await import('./commands-DvFnLd5w.mjs');
1185
+ const { machineExec } = await import('./commands-BJZyPz9N.mjs');
1184
1186
  await machineExec(machineId, command, cwd);
1185
1187
  }
1186
1188
  } else if (machineSubcommand === "info") {
1187
- const { machineInfo } = await import('./commands-DvFnLd5w.mjs');
1189
+ const { machineInfo } = await import('./commands-BJZyPz9N.mjs');
1188
1190
  let machineId;
1189
1191
  for (let i = 1; i < machineArgs.length; i++) {
1190
1192
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1204,10 +1206,10 @@ async function handleMachineCommand() {
1204
1206
  level = machineArgs[++i];
1205
1207
  }
1206
1208
  }
1207
- const { machineNotify } = await import('./agentCommands-Bq4ZGQMz.mjs');
1209
+ const { machineNotify } = await import('./agentCommands-B7naHDWq.mjs');
1208
1210
  await machineNotify(message, level);
1209
1211
  } else if (machineSubcommand === "ls") {
1210
- const { machineLs } = await import('./commands-DvFnLd5w.mjs');
1212
+ const { machineLs } = await import('./commands-BJZyPz9N.mjs');
1211
1213
  let machineId;
1212
1214
  let showHidden = false;
1213
1215
  let path;
@@ -1266,20 +1268,20 @@ Examples:
1266
1268
  };
1267
1269
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1268
1270
  if (sub === "status") {
1269
- const { fleetStatus } = await import('./fleet-DCyTQBjw.mjs');
1271
+ const { fleetStatus } = await import('./fleet-CbdPguLQ.mjs');
1270
1272
  await fleetStatus();
1271
1273
  } else if (sub === "upgrade-claude") {
1272
- const { fleetUpgradeClaude } = await import('./fleet-DCyTQBjw.mjs');
1274
+ const { fleetUpgradeClaude } = await import('./fleet-CbdPguLQ.mjs');
1273
1275
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1274
1276
  } else if (sub === "upgrade-svamp") {
1275
- const { fleetUpgradeSvamp } = await import('./fleet-DCyTQBjw.mjs');
1277
+ const { fleetUpgradeSvamp } = await import('./fleet-CbdPguLQ.mjs');
1276
1278
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self"), force: hasFlag("force") });
1277
1279
  } else if (sub === "daemon-restart") {
1278
- const { fleetDaemonRestart } = await import('./fleet-DCyTQBjw.mjs');
1280
+ const { fleetDaemonRestart } = await import('./fleet-CbdPguLQ.mjs');
1279
1281
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1280
1282
  } else if (sub === "push-skill") {
1281
1283
  const name = fleetArgs[1];
1282
- const { fleetPushSkill } = await import('./fleet-DCyTQBjw.mjs');
1284
+ const { fleetPushSkill } = await import('./fleet-CbdPguLQ.mjs');
1283
1285
  await fleetPushSkill(name);
1284
1286
  } else {
1285
1287
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1295,7 +1297,7 @@ async function handleSkillsCommand() {
1295
1297
  await printSkillsHelp();
1296
1298
  return;
1297
1299
  }
1298
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-B2K4g98x.mjs');
1300
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-DVw-VfWc.mjs');
1299
1301
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1300
1302
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1301
1303
  if (!query) {
@@ -1342,7 +1344,7 @@ async function loginToHypha() {
1342
1344
  process.exit(1);
1343
1345
  }
1344
1346
  const anchor = anchorArg.replace(/\/+$/, "");
1345
- const { loadInstanceConfig } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.aq; });
1347
+ const { loadInstanceConfig } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.aq; });
1346
1348
  let cfg = null;
1347
1349
  try {
1348
1350
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1453,7 +1455,7 @@ async function logoutFromHypha() {
1453
1455
  } catch {
1454
1456
  }
1455
1457
  try {
1456
- const { clearInstanceConfigCache } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.aq; });
1458
+ const { clearInstanceConfigCache } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.aq; });
1457
1459
  clearInstanceConfigCache();
1458
1460
  } catch {
1459
1461
  }
@@ -1795,7 +1797,7 @@ async function applyClaudeAuthFlags(argv) {
1795
1797
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1796
1798
  );
1797
1799
  }
1798
- const mod = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.ar; });
1800
+ const mod = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.ar; });
1799
1801
  if (hasHypha) {
1800
1802
  let url;
1801
1803
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1849,7 +1851,7 @@ async function applyDaemonShareFlag(argv) {
1849
1851
  }
1850
1852
  }
1851
1853
  if (collected.length === 0) return;
1852
- const { updateEnvFile } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.ar; });
1854
+ const { updateEnvFile } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.ar; });
1853
1855
  const seen = /* @__PURE__ */ new Set();
1854
1856
  const deduped = collected.filter((e) => {
1855
1857
  const k = e.toLowerCase();
@@ -1882,7 +1884,7 @@ async function handleWiseAgentCommand(rest) {
1882
1884
  }
1883
1885
  });
1884
1886
  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(" ");
1885
- const { wiseAskCli } = await import('./commands-DvFnLd5w.mjs');
1887
+ const { wiseAskCli } = await import('./commands-BJZyPz9N.mjs');
1886
1888
  await wiseAskCli(machineId, message, sessionId, { json });
1887
1889
  return;
1888
1890
  }
@@ -1894,7 +1896,7 @@ async function handleWiseAgentCommand(rest) {
1894
1896
  }
1895
1897
  return void 0;
1896
1898
  };
1897
- const { runWiseVoiceCli } = await import('./headlessCli-DcQ0GWVi.mjs');
1899
+ const { runWiseVoiceCli } = await import('./headlessCli-DLqmC4KJ.mjs');
1898
1900
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1899
1901
  return;
1900
1902
  }
@@ -1912,7 +1914,7 @@ async function handleWiseAgentCommand(rest) {
1912
1914
  const mode = valueOf(["--mode"]);
1913
1915
  const mission = valueOf(["--mission"]);
1914
1916
  const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
1915
- const { wiseJoinMeetingCli } = await import('./commands-DvFnLd5w.mjs');
1917
+ const { wiseJoinMeetingCli } = await import('./commands-BJZyPz9N.mjs');
1916
1918
  await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
1917
1919
  return;
1918
1920
  }
@@ -1924,7 +1926,7 @@ async function handleWiseAgentCommand(rest) {
1924
1926
  }
1925
1927
  return void 0;
1926
1928
  };
1927
- const { wiseLeaveMeetingCli } = await import('./commands-DvFnLd5w.mjs');
1929
+ const { wiseLeaveMeetingCli } = await import('./commands-BJZyPz9N.mjs');
1928
1930
  await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
1929
1931
  return;
1930
1932
  }
@@ -1948,7 +1950,7 @@ async function handleWiseAgentCommand(rest) {
1948
1950
  }
1949
1951
  });
1950
1952
  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(" ");
1951
- const { wiseAnnounceCli } = await import('./commands-DvFnLd5w.mjs');
1953
+ const { wiseAnnounceCli } = await import('./commands-BJZyPz9N.mjs');
1952
1954
  await wiseAnnounceCli(machineId, text, sessionId, { json });
1953
1955
  return;
1954
1956
  }
@@ -1960,7 +1962,7 @@ async function handleWiseAgentCommand(rest) {
1960
1962
  }
1961
1963
  return void 0;
1962
1964
  };
1963
- const { wiseMeetingsCli } = await import('./commands-DvFnLd5w.mjs');
1965
+ const { wiseMeetingsCli } = await import('./commands-BJZyPz9N.mjs');
1964
1966
  await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
1965
1967
  return;
1966
1968
  }
@@ -2010,7 +2012,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
2010
2012
  return;
2011
2013
  }
2012
2014
  const authArgs = rest.slice(1);
2013
- const mod = await import('./auth-BNJguNHt.mjs');
2015
+ const mod = await import('./auth-BELggWCf.mjs');
2014
2016
  let action;
2015
2017
  try {
2016
2018
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -2020,7 +2022,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
2020
2022
  return;
2021
2023
  }
2022
2024
  if (action) {
2023
- const { updateEnvFile } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.ar; });
2025
+ const { updateEnvFile } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.ar; });
2024
2026
  const updates = mod.buildWiseAgentEnvUpdates(action);
2025
2027
  updateEnvFile(updates);
2026
2028
  for (const [k, v] of Object.entries(updates)) {
@@ -2034,7 +2036,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
2034
2036
  }
2035
2037
  async function handleDaemonAuthCommand(argv) {
2036
2038
  const sub = (argv[0] || "status").toLowerCase();
2037
- const mod = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.ar; });
2039
+ const mod = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.ar; });
2038
2040
  if (sub === "--help" || sub === "-h" || sub === "help") {
2039
2041
  console.log(`
2040
2042
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2108,8 +2110,8 @@ one step: --use-hypha-proxy / --use-claude-login / --anthropic-base-url URL --an
2108
2110
  }
2109
2111
  async function handleDaemonCodexAuthCommand(argv) {
2110
2112
  const sub = (argv[0] || "status").toLowerCase();
2111
- const { updateEnvFile } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.ar; });
2112
- const { resolveCodexProvider } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.as; });
2113
+ const { updateEnvFile } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.ar; });
2114
+ const { resolveCodexProvider } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.as; });
2113
2115
  const redact = (k) => k && k.length > 10 ? `${k.slice(0, 6)}\u2026${k.slice(-4)}` : k ? "***" : "(unset)";
2114
2116
  if (sub === "--help" || sub === "-h" || sub === "help") {
2115
2117
  console.log(`
@@ -2441,7 +2443,7 @@ Examples:
2441
2443
  async function printSkillsHelp() {
2442
2444
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2443
2445
  try {
2444
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-DVtvYoyf.mjs').then(function (n) { return n.aA; });
2446
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-BKR-KNMV.mjs').then(function (n) { return n.aA; });
2445
2447
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2446
2448
  } catch {
2447
2449
  }
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import './run-DVtvYoyf.mjs';
1
+ import './run-BKR-KNMV.mjs';
2
2
  import './serviceManager-hlOVxkhW.mjs';
3
- import './cli-6_aaOi8g.mjs';
3
+ import './cli-C-dcoT95.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
6
6
  import 'fs';