svamp-cli 0.2.231 → 0.2.233

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 (25) hide show
  1. package/dist/{agentCommands-V9V2kh0Q.mjs → agentCommands-BprvTh3N.mjs} +5 -5
  2. package/dist/{auth-DkjnoUxX.mjs → auth-YYnPaBDn.mjs} +1 -1
  3. package/dist/cli.mjs +64 -62
  4. package/dist/{commands-qu4qKm64.mjs → commands-BODHeJVA.mjs} +3 -2
  5. package/dist/{commands-BtaFWs9X.mjs → commands-BYn3xaXh.mjs} +2 -2
  6. package/dist/{commands-BGRljSMD.mjs → commands-C1EQ3izR.mjs} +1 -1
  7. package/dist/{commands-CdpWrKls.mjs → commands-CGkrbQ_J.mjs} +8 -5
  8. package/dist/{commands-Bvdq1b3h.mjs → commands-CTnAk-JH.mjs} +6 -6
  9. package/dist/{commands-DBHDbRVm.mjs → commands-Cx_ZHmLi.mjs} +1 -1
  10. package/dist/{commands-CQP12ojC.mjs → commands-qBxpc3Sd.mjs} +1 -1
  11. package/dist/{fleet-BPNSihXR.mjs → fleet-BhhO65TT.mjs} +1 -1
  12. package/dist/{frpc-CUBlxR7B.mjs → frpc-DFzccA5A.mjs} +1 -1
  13. package/dist/{headlessCli-DxhjiAyU.mjs → headlessCli-OCdwxL-1.mjs} +2 -2
  14. package/dist/index.mjs +1 -1
  15. package/dist/{package-omNKWcir.mjs → package-CRR82jba.mjs} +1 -1
  16. package/dist/{rpc-CPHva9-3.mjs → rpc-BQf6T_IG.mjs} +4 -3
  17. package/dist/{rpc-Cm2Uy3Hf.mjs → rpc-Cqw0l8gl.mjs} +1 -1
  18. package/dist/{run-BzobWMYv.mjs → run-BUY7c3Fy.mjs} +12 -11
  19. package/dist/{run-DS_XkUa2.mjs → run-BZTCSX3X.mjs} +1 -1
  20. package/dist/{runStore-CtptN7US.mjs → runStore-DxRBIB_J.mjs} +58 -0
  21. package/dist/{scheduler-CwyAdWQa.mjs → scheduler-D2RtypGf.mjs} +2 -2
  22. package/dist/{serveCommands-YMWshAkF.mjs → serveCommands-CTXcJsdb.mjs} +5 -5
  23. package/dist/{serveManager-CkfMDcNQ.mjs → serveManager-DevsLcov.mjs} +2 -2
  24. package/dist/{sideband-DDCUdyBK.mjs → sideband-Ogaxgy7O.mjs} +1 -1
  25. package/package.json +1 -1
@@ -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 { A as shortId } from './run-BzobWMYv.mjs';
5
+ import { A as shortId } from './run-BUY7c3Fy.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-BzobWMYv.mjs').then(function (n) { return n.a9; });
99
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.a9; });
100
100
  const desc = sanitizeDescription(description, 240);
101
101
  if (!desc) {
102
102
  console.error("Project description is empty.");
@@ -327,7 +327,7 @@ async function sessionBroadcast(action, args) {
327
327
  console.log(`Broadcast sent: ${action}`);
328
328
  }
329
329
  async function connectToMachineService() {
330
- const { connectAndGetMachine } = await import('./commands-qu4qKm64.mjs');
330
+ const { connectAndGetMachine } = await import('./commands-BODHeJVA.mjs');
331
331
  return connectAndGetMachine();
332
332
  }
333
333
  function buildInboxMessage(args) {
@@ -405,7 +405,7 @@ async function inboxSend(targetSessionId, opts) {
405
405
  console.error("Message body is required.");
406
406
  process.exit(1);
407
407
  }
408
- const { connectAndResolveSession } = await import('./commands-qu4qKm64.mjs');
408
+ const { connectAndResolveSession } = await import('./commands-BODHeJVA.mjs');
409
409
  let server;
410
410
  try {
411
411
  const { targetId, messageId } = await inboxSendCore(
@@ -459,7 +459,7 @@ async function inboxReply(messageId, body) {
459
459
  console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
460
460
  process.exit(1);
461
461
  }
462
- const { connectAndResolveSession } = await import('./commands-qu4qKm64.mjs');
462
+ const { connectAndResolveSession } = await import('./commands-BODHeJVA.mjs');
463
463
  const { server: localServer, machine: localMachine } = await connectToMachineService();
464
464
  let localDisconnected = false;
465
465
  const disconnectLocal = async () => {
@@ -1,4 +1,4 @@
1
- import { P as resolveModel } from './run-BzobWMYv.mjs';
1
+ import { P as resolveModel } from './run-BUY7c3Fy.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-BzobWMYv.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-BUY7c3Fy.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-BzobWMYv.mjs').then(function (n) { return n.af; });
37
+ const { getLoadedConfig } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.af; });
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-BzobWMYv.mjs').then(function (n) { return n.ah; });
54
+ const { restartDaemon } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.ah; });
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-Bvdq1b3h.mjs');
347
+ const { handleServiceCommand } = await import('./commands-CTnAk-JH.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-YMWshAkF.mjs');
355
+ const { handleServeCommand } = await import('./serveCommands-CTXcJsdb.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-BtaFWs9X.mjs');
364
+ const { processCommand } = await import('./commands-BYn3xaXh.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-BGRljSMD.mjs');
378
+ const { issueCommand } = await import('./commands-C1EQ3izR.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-CQP12ojC.mjs');
382
+ const { workflowCommand } = await import('./commands-qBxpc3Sd.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-CdpWrKls.mjs');
389
+ const { crewCommand } = await import('./commands-CGkrbQ_J.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-omNKWcir.mjs').catch(() => ({ default: { version: "unknown" } }));
397
+ const pkg = await import('./package-CRR82jba.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-DS_XkUa2.mjs');
406
+ const { runInteractive } = await import('./run-BZTCSX3X.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-BzobWMYv.mjs').then(function (n) { return n.ac; });
451
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.ac; });
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-BzobWMYv.mjs').then(function (n) { return n.ac; });
463
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.ac; });
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-BzobWMYv.mjs').then(function (n) { return n.ad; });
487
+ const { CodexMcpBackend } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.ad; });
488
488
  backend = new CodexMcpBackend({ cwd, log: logFn });
489
489
  } else {
490
- const { AcpBackend } = await import('./run-BzobWMYv.mjs').then(function (n) { return n.ab; });
491
- const { GeminiTransport } = await import('./run-BzobWMYv.mjs').then(function (n) { return n.ae; });
492
- const { DefaultTransport } = await import('./run-BzobWMYv.mjs').then(function (n) { return n.aa; });
490
+ const { AcpBackend } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.ab; });
491
+ const { GeminiTransport } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.ae; });
492
+ const { DefaultTransport } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.aa; });
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-qu4qKm64.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-BODHeJVA.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-qu4qKm64.mjs');
687
+ const { parseShareArg } = await import('./commands-BODHeJVA.mjs');
688
688
  const shareEntries = share.map((s) => parseShareArg(s));
689
689
  await sessionSpawn(agent, dir, targetMachineId, {
690
690
  message,
@@ -692,6 +692,7 @@ async function handleSessionCommand() {
692
692
  worktree,
693
693
  isolate,
694
694
  permissionMode,
695
+ model: parseFlagStr("--model"),
695
696
  securityContextPath,
696
697
  share: shareEntries.length > 0 ? shareEntries : void 0,
697
698
  denyRead: denyRead.length > 0 ? denyRead : void 0,
@@ -771,7 +772,7 @@ async function handleSessionCommand() {
771
772
  console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
772
773
  process.exit(1);
773
774
  }
774
- const { sessionEditMessage } = await import('./commands-qu4qKm64.mjs');
775
+ const { sessionEditMessage } = await import('./commands-BODHeJVA.mjs');
775
776
  await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
776
777
  } else if (sessionSubcommand === "refine") {
777
778
  if (!sessionArgs[1] || !sessionArgs[2]) {
@@ -779,7 +780,7 @@ async function handleSessionCommand() {
779
780
  console.error(" Asks the agent to revise its latest reply in place (no extra round).");
780
781
  process.exit(1);
781
782
  }
782
- const { sessionRefineLastReply } = await import('./commands-qu4qKm64.mjs');
783
+ const { sessionRefineLastReply } = await import('./commands-BODHeJVA.mjs');
783
784
  await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
784
785
  } else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
785
786
  if (!sessionArgs[1]) {
@@ -787,7 +788,7 @@ async function handleSessionCommand() {
787
788
  console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
788
789
  process.exit(1);
789
790
  }
790
- const { sessionUndoEdit } = await import('./commands-qu4qKm64.mjs');
791
+ const { sessionUndoEdit } = await import('./commands-BODHeJVA.mjs');
791
792
  await sessionUndoEdit(sessionArgs[1], targetMachineId);
792
793
  } else if (sessionSubcommand === "query") {
793
794
  const dir = sessionArgs[1];
@@ -797,7 +798,7 @@ async function handleSessionCommand() {
797
798
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
798
799
  process.exit(1);
799
800
  }
800
- const { sessionQuery } = await import('./commands-qu4qKm64.mjs');
801
+ const { sessionQuery } = await import('./commands-BODHeJVA.mjs');
801
802
  await sessionQuery(dir, prompt, targetMachineId, {
802
803
  timeout: parseFlagInt("--timeout"),
803
804
  json: hasFlag("--json"),
@@ -830,7 +831,7 @@ async function handleSessionCommand() {
830
831
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
831
832
  process.exit(1);
832
833
  }
833
- const { sessionApprove } = await import('./commands-qu4qKm64.mjs');
834
+ const { sessionApprove } = await import('./commands-BODHeJVA.mjs');
834
835
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
835
836
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
836
837
  json: hasFlag("--json")
@@ -840,7 +841,7 @@ async function handleSessionCommand() {
840
841
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
841
842
  process.exit(1);
842
843
  }
843
- const { sessionDeny } = await import('./commands-qu4qKm64.mjs');
844
+ const { sessionDeny } = await import('./commands-BODHeJVA.mjs');
844
845
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
845
846
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
846
847
  json: hasFlag("--json")
@@ -885,7 +886,7 @@ async function handleSessionCommand() {
885
886
  console.error("Usage: svamp session set-title <title>");
886
887
  process.exit(1);
887
888
  }
888
- const { sessionSetTitle } = await import('./agentCommands-V9V2kh0Q.mjs');
889
+ const { sessionSetTitle } = await import('./agentCommands-BprvTh3N.mjs');
889
890
  await sessionSetTitle(title);
890
891
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
891
892
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -893,7 +894,7 @@ async function handleSessionCommand() {
893
894
  console.error("Usage: svamp session set-project-description <text>");
894
895
  process.exit(1);
895
896
  }
896
- const { sessionSetProjectDescription } = await import('./agentCommands-V9V2kh0Q.mjs');
897
+ const { sessionSetProjectDescription } = await import('./agentCommands-BprvTh3N.mjs');
897
898
  await sessionSetProjectDescription(desc);
898
899
  } else if (sessionSubcommand === "set-link") {
899
900
  const url = sessionArgs[1];
@@ -902,11 +903,11 @@ async function handleSessionCommand() {
902
903
  process.exit(1);
903
904
  }
904
905
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
905
- const { sessionSetLink } = await import('./agentCommands-V9V2kh0Q.mjs');
906
+ const { sessionSetLink } = await import('./agentCommands-BprvTh3N.mjs');
906
907
  await sessionSetLink(url, label);
907
908
  } else if (sessionSubcommand === "link") {
908
909
  const op = sessionArgs[1];
909
- const lm = await import('./agentCommands-V9V2kh0Q.mjs');
910
+ const lm = await import('./agentCommands-BprvTh3N.mjs');
910
911
  if (op === "add") {
911
912
  const url = sessionArgs[2];
912
913
  if (!url || url.startsWith("--")) {
@@ -941,7 +942,7 @@ async function handleSessionCommand() {
941
942
  process.exit(1);
942
943
  }
943
944
  const level = parseFlagStr("--level") || "info";
944
- const { sessionNotify } = await import('./agentCommands-V9V2kh0Q.mjs');
945
+ const { sessionNotify } = await import('./agentCommands-BprvTh3N.mjs');
945
946
  await sessionNotify(message, level);
946
947
  } else if (sessionSubcommand === "broadcast") {
947
948
  const action = sessionArgs[1];
@@ -949,7 +950,7 @@ async function handleSessionCommand() {
949
950
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
950
951
  process.exit(1);
951
952
  }
952
- const { sessionBroadcast } = await import('./agentCommands-V9V2kh0Q.mjs');
953
+ const { sessionBroadcast } = await import('./agentCommands-BprvTh3N.mjs');
953
954
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
954
955
  } else if (sessionSubcommand === "inbox") {
955
956
  const inboxSubcmd = sessionArgs[1];
@@ -960,7 +961,7 @@ async function handleSessionCommand() {
960
961
  process.exit(1);
961
962
  }
962
963
  if (agentSessionId) {
963
- const { inboxSend } = await import('./agentCommands-V9V2kh0Q.mjs');
964
+ const { inboxSend } = await import('./agentCommands-BprvTh3N.mjs');
964
965
  await inboxSend(sessionArgs[2], {
965
966
  body: sessionArgs[3],
966
967
  subject: parseFlagStr("--subject"),
@@ -975,7 +976,7 @@ async function handleSessionCommand() {
975
976
  }
976
977
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
977
978
  if (agentSessionId && !sessionArgs[2]) {
978
- const { inboxList } = await import('./agentCommands-V9V2kh0Q.mjs');
979
+ const { inboxList } = await import('./agentCommands-BprvTh3N.mjs');
979
980
  await inboxList({
980
981
  unread: hasFlag("--unread"),
981
982
  limit: parseFlagInt("--limit"),
@@ -997,7 +998,7 @@ async function handleSessionCommand() {
997
998
  process.exit(1);
998
999
  }
999
1000
  if (agentSessionId && !sessionArgs[3]) {
1000
- const { inboxList } = await import('./agentCommands-V9V2kh0Q.mjs');
1001
+ const { inboxList } = await import('./agentCommands-BprvTh3N.mjs');
1001
1002
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
1002
1003
  } else if (sessionArgs[3]) {
1003
1004
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -1007,7 +1008,7 @@ async function handleSessionCommand() {
1007
1008
  }
1008
1009
  } else if (inboxSubcmd === "reply") {
1009
1010
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
1010
- const { inboxReply } = await import('./agentCommands-V9V2kh0Q.mjs');
1011
+ const { inboxReply } = await import('./agentCommands-BprvTh3N.mjs');
1011
1012
  await inboxReply(sessionArgs[2], sessionArgs[3]);
1012
1013
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
1013
1014
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -1045,7 +1046,7 @@ async function handleMachineCommand() {
1045
1046
  return;
1046
1047
  }
1047
1048
  if (machineSubcommand === "share") {
1048
- const { machineShare } = await import('./commands-qu4qKm64.mjs');
1049
+ const { machineShare } = await import('./commands-BODHeJVA.mjs');
1049
1050
  let machineId;
1050
1051
  const shareArgs = [];
1051
1052
  for (let i = 1; i < machineArgs.length; i++) {
@@ -1096,14 +1097,14 @@ async function handleMachineCommand() {
1096
1097
  process.exit(1);
1097
1098
  }
1098
1099
  if (all) {
1099
- const { fleetExec } = await import('./fleet-BPNSihXR.mjs');
1100
+ const { fleetExec } = await import('./fleet-BhhO65TT.mjs');
1100
1101
  await fleetExec(command, { cwd });
1101
1102
  } else {
1102
- const { machineExec } = await import('./commands-qu4qKm64.mjs');
1103
+ const { machineExec } = await import('./commands-BODHeJVA.mjs');
1103
1104
  await machineExec(machineId, command, cwd);
1104
1105
  }
1105
1106
  } else if (machineSubcommand === "info") {
1106
- const { machineInfo } = await import('./commands-qu4qKm64.mjs');
1107
+ const { machineInfo } = await import('./commands-BODHeJVA.mjs');
1107
1108
  let machineId;
1108
1109
  for (let i = 1; i < machineArgs.length; i++) {
1109
1110
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1123,10 +1124,10 @@ async function handleMachineCommand() {
1123
1124
  level = machineArgs[++i];
1124
1125
  }
1125
1126
  }
1126
- const { machineNotify } = await import('./agentCommands-V9V2kh0Q.mjs');
1127
+ const { machineNotify } = await import('./agentCommands-BprvTh3N.mjs');
1127
1128
  await machineNotify(message, level);
1128
1129
  } else if (machineSubcommand === "ls") {
1129
- const { machineLs } = await import('./commands-qu4qKm64.mjs');
1130
+ const { machineLs } = await import('./commands-BODHeJVA.mjs');
1130
1131
  let machineId;
1131
1132
  let showHidden = false;
1132
1133
  let path;
@@ -1182,20 +1183,20 @@ Examples:
1182
1183
  };
1183
1184
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1184
1185
  if (sub === "status") {
1185
- const { fleetStatus } = await import('./fleet-BPNSihXR.mjs');
1186
+ const { fleetStatus } = await import('./fleet-BhhO65TT.mjs');
1186
1187
  await fleetStatus();
1187
1188
  } else if (sub === "upgrade-claude") {
1188
- const { fleetUpgradeClaude } = await import('./fleet-BPNSihXR.mjs');
1189
+ const { fleetUpgradeClaude } = await import('./fleet-BhhO65TT.mjs');
1189
1190
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1190
1191
  } else if (sub === "upgrade-svamp") {
1191
- const { fleetUpgradeSvamp } = await import('./fleet-BPNSihXR.mjs');
1192
+ const { fleetUpgradeSvamp } = await import('./fleet-BhhO65TT.mjs');
1192
1193
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
1193
1194
  } else if (sub === "daemon-restart") {
1194
- const { fleetDaemonRestart } = await import('./fleet-BPNSihXR.mjs');
1195
+ const { fleetDaemonRestart } = await import('./fleet-BhhO65TT.mjs');
1195
1196
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1196
1197
  } else if (sub === "push-skill") {
1197
1198
  const name = fleetArgs[1];
1198
- const { fleetPushSkill } = await import('./fleet-BPNSihXR.mjs');
1199
+ const { fleetPushSkill } = await import('./fleet-BhhO65TT.mjs');
1199
1200
  await fleetPushSkill(name);
1200
1201
  } else {
1201
1202
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1211,7 +1212,7 @@ async function handleSkillsCommand() {
1211
1212
  await printSkillsHelp();
1212
1213
  return;
1213
1214
  }
1214
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-DBHDbRVm.mjs');
1215
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-Cx_ZHmLi.mjs');
1215
1216
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1216
1217
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1217
1218
  if (!query) {
@@ -1258,7 +1259,7 @@ async function loginToHypha() {
1258
1259
  process.exit(1);
1259
1260
  }
1260
1261
  const anchor = anchorArg.replace(/\/+$/, "");
1261
- const { loadInstanceConfig } = await import('./run-BzobWMYv.mjs').then(function (n) { return n.af; });
1262
+ const { loadInstanceConfig } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.af; });
1262
1263
  let cfg = null;
1263
1264
  try {
1264
1265
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1369,7 +1370,7 @@ async function logoutFromHypha() {
1369
1370
  } catch {
1370
1371
  }
1371
1372
  try {
1372
- const { clearInstanceConfigCache } = await import('./run-BzobWMYv.mjs').then(function (n) { return n.af; });
1373
+ const { clearInstanceConfigCache } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.af; });
1373
1374
  clearInstanceConfigCache();
1374
1375
  } catch {
1375
1376
  }
@@ -1707,7 +1708,7 @@ async function applyClaudeAuthFlags(argv) {
1707
1708
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1708
1709
  );
1709
1710
  }
1710
- const mod = await import('./run-BzobWMYv.mjs').then(function (n) { return n.a8; });
1711
+ const mod = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.a8; });
1711
1712
  if (hasHypha) {
1712
1713
  let url;
1713
1714
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1761,7 +1762,7 @@ async function applyDaemonShareFlag(argv) {
1761
1762
  }
1762
1763
  }
1763
1764
  if (collected.length === 0) return;
1764
- const { updateEnvFile } = await import('./run-BzobWMYv.mjs').then(function (n) { return n.a8; });
1765
+ const { updateEnvFile } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.a8; });
1765
1766
  const seen = /* @__PURE__ */ new Set();
1766
1767
  const deduped = collected.filter((e) => {
1767
1768
  const k = e.toLowerCase();
@@ -1794,7 +1795,7 @@ async function handleWiseAgentCommand(rest) {
1794
1795
  }
1795
1796
  });
1796
1797
  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(" ");
1797
- const { wiseAskCli } = await import('./commands-qu4qKm64.mjs');
1798
+ const { wiseAskCli } = await import('./commands-BODHeJVA.mjs');
1798
1799
  await wiseAskCli(machineId, message, sessionId, { json });
1799
1800
  return;
1800
1801
  }
@@ -1806,7 +1807,7 @@ async function handleWiseAgentCommand(rest) {
1806
1807
  }
1807
1808
  return void 0;
1808
1809
  };
1809
- const { runWiseVoiceCli } = await import('./headlessCli-DxhjiAyU.mjs');
1810
+ const { runWiseVoiceCli } = await import('./headlessCli-OCdwxL-1.mjs');
1810
1811
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1811
1812
  return;
1812
1813
  }
@@ -1824,7 +1825,7 @@ async function handleWiseAgentCommand(rest) {
1824
1825
  const mode = valueOf(["--mode"]);
1825
1826
  const mission = valueOf(["--mission"]);
1826
1827
  const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
1827
- const { wiseJoinMeetingCli } = await import('./commands-qu4qKm64.mjs');
1828
+ const { wiseJoinMeetingCli } = await import('./commands-BODHeJVA.mjs');
1828
1829
  await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
1829
1830
  return;
1830
1831
  }
@@ -1836,7 +1837,7 @@ async function handleWiseAgentCommand(rest) {
1836
1837
  }
1837
1838
  return void 0;
1838
1839
  };
1839
- const { wiseLeaveMeetingCli } = await import('./commands-qu4qKm64.mjs');
1840
+ const { wiseLeaveMeetingCli } = await import('./commands-BODHeJVA.mjs');
1840
1841
  await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
1841
1842
  return;
1842
1843
  }
@@ -1860,7 +1861,7 @@ async function handleWiseAgentCommand(rest) {
1860
1861
  }
1861
1862
  });
1862
1863
  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(" ");
1863
- const { wiseAnnounceCli } = await import('./commands-qu4qKm64.mjs');
1864
+ const { wiseAnnounceCli } = await import('./commands-BODHeJVA.mjs');
1864
1865
  await wiseAnnounceCli(machineId, text, sessionId, { json });
1865
1866
  return;
1866
1867
  }
@@ -1872,7 +1873,7 @@ async function handleWiseAgentCommand(rest) {
1872
1873
  }
1873
1874
  return void 0;
1874
1875
  };
1875
- const { wiseMeetingsCli } = await import('./commands-qu4qKm64.mjs');
1876
+ const { wiseMeetingsCli } = await import('./commands-BODHeJVA.mjs');
1876
1877
  await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
1877
1878
  return;
1878
1879
  }
@@ -1922,7 +1923,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1922
1923
  return;
1923
1924
  }
1924
1925
  const authArgs = rest.slice(1);
1925
- const mod = await import('./auth-DkjnoUxX.mjs');
1926
+ const mod = await import('./auth-YYnPaBDn.mjs');
1926
1927
  let action;
1927
1928
  try {
1928
1929
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1932,7 +1933,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1932
1933
  return;
1933
1934
  }
1934
1935
  if (action) {
1935
- const { updateEnvFile } = await import('./run-BzobWMYv.mjs').then(function (n) { return n.a8; });
1936
+ const { updateEnvFile } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.a8; });
1936
1937
  const updates = mod.buildWiseAgentEnvUpdates(action);
1937
1938
  updateEnvFile(updates);
1938
1939
  for (const [k, v] of Object.entries(updates)) {
@@ -1946,7 +1947,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1946
1947
  }
1947
1948
  async function handleDaemonAuthCommand(argv) {
1948
1949
  const sub = (argv[0] || "status").toLowerCase();
1949
- const mod = await import('./run-BzobWMYv.mjs').then(function (n) { return n.a8; });
1950
+ const mod = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.a8; });
1950
1951
  if (sub === "--help" || sub === "-h" || sub === "help") {
1951
1952
  console.log(`
1952
1953
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2047,7 +2048,8 @@ AGENTS:
2047
2048
  COMMANDS:
2048
2049
 
2049
2050
  Lifecycle:
2050
- spawn <agent> [-d <path>] [options] Spawn a new agent session
2051
+ spawn <agent> [-d <path>] [--model <id>] [options] Spawn a new agent session
2052
+ (--model e.g. claude-fable-5, claude-opus-4-8)
2051
2053
  archive <id> Archive a session (resumable; preserves --resume token)
2052
2054
  resume <id> Resume an archived session (spawns agent with --resume)
2053
2055
  delete <id> Permanently delete a session (cannot be undone)
@@ -2259,7 +2261,7 @@ Examples:
2259
2261
  async function printSkillsHelp() {
2260
2262
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2261
2263
  try {
2262
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-BzobWMYv.mjs').then(function (n) { return n.ag; });
2264
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-BUY7c3Fy.mjs').then(function (n) { return n.ag; });
2263
2265
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2264
2266
  } catch {
2265
2267
  }
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { execSync } from 'node:child_process';
3
3
  import { basename, resolve, join, isAbsolute } from 'node:path';
4
4
  import os from 'node:os';
5
- import { Q as formatHandle, T as normalizeAllowedUser, U as loadSecurityContextConfig, V as resolveSecurityContext, W as buildSecurityContextFromFlags, X as mergeSecurityContexts, c as connectToHypha, Y as buildSessionShareUrl, Z as computeOutboundHop, A as shortId, _ as registerAwaitingReply, $ as buildMachineShareUrl, a0 as parseHandle, a1 as handleMatchesMetadata } from './run-BzobWMYv.mjs';
5
+ import { Q as formatHandle, T as normalizeAllowedUser, U as loadSecurityContextConfig, V as resolveSecurityContext, W as buildSecurityContextFromFlags, X as mergeSecurityContexts, c as connectToHypha, Y as buildSessionShareUrl, Z as computeOutboundHop, A as shortId, _ as registerAwaitingReply, $ as buildMachineShareUrl, a0 as parseHandle, a1 as handleMatchesMetadata } from './run-BUY7c3Fy.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -1191,7 +1191,8 @@ async function sessionSpawn(agent, directory, machineId, opts) {
1191
1191
  forceIsolation,
1192
1192
  tags: opts?.tags,
1193
1193
  parentSessionId: effectiveParentSessionId,
1194
- permissionMode: opts?.permissionMode
1194
+ permissionMode: opts?.permissionMode,
1195
+ model: opts?.model
1195
1196
  });
1196
1197
  if (result.type === "success") {
1197
1198
  console.log(`Session started: ${result.sessionId}`);
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-qu4qKm64.mjs';
3
+ import { connectAndGetMachine } from './commands-BODHeJVA.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:child_process';
6
6
  import 'node:path';
7
7
  import 'node:os';
8
- import './run-BzobWMYv.mjs';
8
+ import './run-BUY7c3Fy.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -1,7 +1,7 @@
1
1
  import { execSync } from 'node:child_process';
2
2
  import { existsSync, readFileSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
- import { m as resolveProjectRoot, w as searchIssues, v as listIssues, o as resumeIssue, p as pauseIssue, q as addComment, u as updateIssue, n as getIssue, x as isVisibleTo, z as summarize, t as addIssue } from './run-BzobWMYv.mjs';
4
+ import { m as resolveProjectRoot, w as searchIssues, v as listIssues, o as resumeIssue, p as pauseIssue, q as addComment, u as updateIssue, n as getIssue, x as isVisibleTo, z as summarize, t as addIssue } from './run-BUY7c3Fy.mjs';
5
5
  import 'os';
6
6
  import 'fs/promises';
7
7
  import 'fs';
@@ -1,8 +1,8 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { resolve } from 'node:path';
3
- import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-qu4qKm64.mjs';
3
+ import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-BODHeJVA.mjs';
4
4
  import { execSync } from 'node:child_process';
5
- import { u as updateIssue, q as addComment, t as addIssue, A as shortId } from './run-BzobWMYv.mjs';
5
+ import { u as updateIssue, q as addComment, t as addIssue, A as shortId } from './run-BUY7c3Fy.mjs';
6
6
  import 'node:os';
7
7
  import 'os';
8
8
  import 'fs/promises';
@@ -243,7 +243,8 @@ async function featureStart(brief, opts = {}) {
243
243
  directory: childDir,
244
244
  agent: "claude",
245
245
  parentSessionId: lead.sessionId,
246
- permissionMode: "bypassPermissions"
246
+ permissionMode: "bypassPermissions",
247
+ ...opts.model ? { model: opts.model } : {}
247
248
  });
248
249
  if (result.type !== "success" || !result.sessionId) {
249
250
  console.error(`Failed to spawn feature child: ${result.errorMessage || result.type}`);
@@ -576,8 +577,9 @@ function positionals(args, valueFlags) {
576
577
  const FEATURE_HELP = `Usage: svamp feature <command>
577
578
 
578
579
  start "<brief>" [--oracle "<cmd>"] [--base <branch>] [--action nudge|block]
579
- [--max N] [--dir <path>] [--no-worktree] [--lead <id>] [-m <machine>]
580
+ [--max N] [--dir <path>] [--no-worktree] [--model <id>] [--lead <id>] [-m <machine>]
580
581
  Spawn a managed child of the lead + attach a loop gate (oracle\u2192parent).
582
+ --model sets the child's model (e.g. claude-fable-5, claude-opus-4-8).
581
583
  Default: a git worktree + branch off the lead's project root (merges back).
582
584
  --no-worktree --dir <folder>: run the child directly IN <folder> (a subdir or
583
585
  sibling project) with NO worktree/branch \u2014 done/merge just detach & close it.
@@ -598,7 +600,7 @@ async function crewCommand(args) {
598
600
  return;
599
601
  }
600
602
  if (sub === "start") {
601
- const valueFlags = ["--oracle", "--base", "--action", "--max", "--dir", "-d", "--lead", "-m", "--machine", "--issue"];
603
+ const valueFlags = ["--oracle", "--base", "--action", "--max", "--dir", "-d", "--lead", "-m", "--machine", "--issue", "--model"];
602
604
  const brief = positionals(rest, valueFlags).join(" ");
603
605
  const maxStr = flag(rest, "--max");
604
606
  const action = flag(rest, "--action");
@@ -610,6 +612,7 @@ async function crewCommand(args) {
610
612
  oracle: flag(rest, "--oracle"),
611
613
  baseBranch: flag(rest, "--base"),
612
614
  issueId: flag(rest, "--issue"),
615
+ model: flag(rest, "--model"),
613
616
  action: action === "block" ? "block" : action === "nudge" ? "nudge" : void 0,
614
617
  maxRounds: maxStr ? parseInt(maxStr, 10) : void 0
615
618
  });
@@ -58,7 +58,7 @@ async function serviceExpose(args) {
58
58
  process.exit(1);
59
59
  }
60
60
  if (foreground) {
61
- const { runFrpcTunnel } = await import('./frpc-CUBlxR7B.mjs');
61
+ const { runFrpcTunnel } = await import('./frpc-DFzccA5A.mjs');
62
62
  await runFrpcTunnel(name, ports, void 0, {
63
63
  group,
64
64
  groupKey,
@@ -68,7 +68,7 @@ async function serviceExpose(args) {
68
68
  });
69
69
  return;
70
70
  }
71
- const { connectAndGetMachine } = await import('./commands-qu4qKm64.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-BODHeJVA.mjs');
72
72
  const { server, machine } = await connectAndGetMachine();
73
73
  try {
74
74
  const status = await machine.tunnelStart({
@@ -90,7 +90,7 @@ async function serviceExpose(args) {
90
90
  console.log(` port ${port}: ${url}`);
91
91
  }
92
92
  if (process.env.SVAMP_SESSION_ID) {
93
- const { autoAddSessionLink } = await import('./agentCommands-V9V2kh0Q.mjs');
93
+ const { autoAddSessionLink } = await import('./agentCommands-BprvTh3N.mjs');
94
94
  let added = 0;
95
95
  for (const [port, url] of urlEntries) {
96
96
  const label = urlEntries.length > 1 ? `${name}:${port}` : name;
@@ -136,7 +136,7 @@ async function serviceServe(args) {
136
136
  };
137
137
  process.on("SIGINT", cleanup);
138
138
  process.on("SIGTERM", cleanup);
139
- const { runFrpcTunnel } = await import('./frpc-CUBlxR7B.mjs');
139
+ const { runFrpcTunnel } = await import('./frpc-DFzccA5A.mjs');
140
140
  await runFrpcTunnel(name, [caddyPort]);
141
141
  } catch (err) {
142
142
  console.error(`Error serving directory: ${err.message}`);
@@ -145,7 +145,7 @@ async function serviceServe(args) {
145
145
  }
146
146
  async function serviceList(_args) {
147
147
  try {
148
- const { connectAndGetMachine } = await import('./commands-qu4qKm64.mjs');
148
+ const { connectAndGetMachine } = await import('./commands-BODHeJVA.mjs');
149
149
  const { server, machine } = await connectAndGetMachine();
150
150
  try {
151
151
  const tunnels = await machine.tunnelList({});
@@ -185,7 +185,7 @@ async function serviceDelete(args) {
185
185
  process.exit(1);
186
186
  }
187
187
  try {
188
- const { connectAndGetMachine } = await import('./commands-qu4qKm64.mjs');
188
+ const { connectAndGetMachine } = await import('./commands-BODHeJVA.mjs');
189
189
  const { server, machine } = await connectAndGetMachine();
190
190
  try {
191
191
  await machine.tunnelStop({ name });
@@ -1,7 +1,7 @@
1
1
  import os from 'os';
2
2
  import fs__default from 'fs';
3
3
  import { resolve, join, relative } from 'path';
4
- import { F as parseFrontmatter, G as getSkillsServer, H as getSkillsWorkspaceName, I as getSkillsCollectionName, J as fetchWithTimeout, K as searchSkills, L as SKILLS_DIR, M as getSkillInfo, N as downloadSkillFile, O as listSkillFiles } from './run-BzobWMYv.mjs';
4
+ import { F as parseFrontmatter, G as getSkillsServer, H as getSkillsWorkspaceName, I as getSkillsCollectionName, J as fetchWithTimeout, K as searchSkills, L as SKILLS_DIR, M as getSkillInfo, N as downloadSkillFile, O as listSkillFiles } from './run-BUY7c3Fy.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
@@ -1,5 +1,5 @@
1
1
  import { spawnSync } from 'node:child_process';
2
- import { m as resolveProjectRoot } from './run-BzobWMYv.mjs';
2
+ import { m as resolveProjectRoot } from './run-BUY7c3Fy.mjs';
3
3
  import { c as workflowSteps, s as setWorkflowEnabled, i as isWorkflowEnabled, r as removeWorkflow, g as getWorkflow, l as listWorkflows, a as saveWorkflow, b as rawWorkflow } from './store-BTs0H_y0.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import os from 'node:os';
4
- import { c as connectToHypha } from './run-BzobWMYv.mjs';
4
+ import { c as connectToHypha } from './run-BUY7c3Fy.mjs';
5
5
  import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-VIupR1NK.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
@@ -4,7 +4,7 @@ import { mkdirSync, writeFileSync, unlinkSync, existsSync, chmodSync, readFileSy
4
4
  import { join } from 'path';
5
5
  import { homedir, platform, arch } from 'os';
6
6
  import { randomUUID, createHash } from 'crypto';
7
- import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-BzobWMYv.mjs';
7
+ import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-BUY7c3Fy.mjs';
8
8
  import 'fs/promises';
9
9
  import 'url';
10
10
  import 'node:crypto';
@@ -1,5 +1,5 @@
1
- import { P as resolveModel, a2 as describeMisconfiguration, a3 as buildMachineDeps } from './run-BzobWMYv.mjs';
2
- import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-DDCUdyBK.mjs';
1
+ import { P as resolveModel, a2 as describeMisconfiguration, a3 as buildMachineDeps } from './run-BUY7c3Fy.mjs';
2
+ import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-Ogaxgy7O.mjs';
3
3
  import { WebSocket } from 'ws';
4
4
  import { execSync, spawn } from 'child_process';
5
5
  import 'os';
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-BzobWMYv.mjs';
1
+ export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-BUY7c3Fy.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -1,5 +1,5 @@
1
1
  var name = "svamp-cli";
2
- var version = "0.2.231";
2
+ var version = "0.2.233";
3
3
  var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
4
4
  var author = "Amun AI AB";
5
5
  var license = "SEE LICENSE IN LICENSE";
@@ -1,6 +1,6 @@
1
- import { m as resolveProjectRoot } from './run-BzobWMYv.mjs';
1
+ import { m as resolveProjectRoot } from './run-BUY7c3Fy.mjs';
2
2
  import { g as getWorkflow, s as setWorkflowEnabled, r as removeWorkflow, a as saveWorkflow, b as rawWorkflow, l as listWorkflows } from './store-BTs0H_y0.mjs';
3
- import { g as getRun, l as listRuns, r as runWorkflow } from './runStore-CtptN7US.mjs';
3
+ import { g as getRun, l as listRuns, r as runWorkflow } from './runStore-DxRBIB_J.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
6
6
  import 'fs';
@@ -73,7 +73,8 @@ async function workflowRpc(cwd, params) {
73
73
  else if (s.exitCode !== 0) out.push(` \u2717 step ${s.index + 1} failed (exit ${s.exitCode ?? "signal"}).`);
74
74
  }
75
75
  out.push(run.status === "success" ? `\u2713 workflow "${wf.name}" completed.` : `\u2717 workflow "${wf.name}" failed.`);
76
- return { ok: run.status === "success", output: out.join("\n"), runId: run.id };
76
+ if (run.escalatedIssue) out.push(` \u21B3 escalated to issue #${run.escalatedIssue} (agent will correct the workflow).`);
77
+ return { ok: run.status === "success", output: out.join("\n"), runId: run.id, escalatedIssue: run.escalatedIssue };
77
78
  }
78
79
  case "runs": {
79
80
  const limit = Number(params.limit) > 0 ? Number(params.limit) : void 0;
@@ -1,4 +1,4 @@
1
- import { m as resolveProjectRoot, u as updateIssue, n as getIssue, o as resumeIssue, p as pauseIssue, q as addComment, t as addIssue, v as listIssues, w as searchIssues, x as isVisibleTo } from './run-BzobWMYv.mjs';
1
+ import { m as resolveProjectRoot, u as updateIssue, n as getIssue, o as resumeIssue, p as pauseIssue, q as addComment, t as addIssue, v as listIssues, w as searchIssues, x as isVisibleTo } from './run-BUY7c3Fy.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -2934,7 +2934,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
2934
2934
  const tunnels = handlers.tunnels;
2935
2935
  if (!tunnels) throw new Error("Tunnel management not available");
2936
2936
  if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
2937
- const { FrpcTunnel } = await import('./frpc-CUBlxR7B.mjs');
2937
+ const { FrpcTunnel } = await import('./frpc-DFzccA5A.mjs');
2938
2938
  const tunnel = new FrpcTunnel({
2939
2939
  name: params.name,
2940
2940
  ports: params.ports,
@@ -3382,7 +3382,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
3382
3382
  }
3383
3383
  const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
3384
3384
  const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
3385
- const { toolsForRole } = await import('./sideband-DDCUdyBK.mjs');
3385
+ const { toolsForRole } = await import('./sideband-Ogaxgy7O.mjs');
3386
3386
  const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
3387
3387
  return fmt(r2);
3388
3388
  }
@@ -3481,7 +3481,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
3481
3481
  if (r.error || !r.sender) return { error: r.error || "unauthorized" };
3482
3482
  const callId = "call_" + Math.random().toString(16).slice(2, 12);
3483
3483
  const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
3484
- const { queryCore } = await import('./commands-qu4qKm64.mjs');
3484
+ const { queryCore } = await import('./commands-BODHeJVA.mjs');
3485
3485
  const timeout = c.reply?.timeout_sec || 120;
3486
3486
  let result;
3487
3487
  try {
@@ -11016,6 +11016,7 @@ function computeObservedContext(usage) {
11016
11016
  function inferWindowFromModelName(model) {
11017
11017
  if (!model) return 0;
11018
11018
  if (/\[1m\]/i.test(model)) return 1e6;
11019
+ if (/fable/i.test(model)) return 1e6;
11019
11020
  if (/opus-?4-?[7-9]/i.test(model)) return 1e6;
11020
11021
  if (/opus-?[5-9]/i.test(model)) return 1e6;
11021
11022
  if (/sonnet-?4-?[5-9]/i.test(model)) return 1e6;
@@ -12590,7 +12591,7 @@ async function startDaemon(options) {
12590
12591
  saveExposedTunnels(list);
12591
12592
  }
12592
12593
  async function createExposedTunnel(spec) {
12593
- const { FrpcTunnel } = await import('./frpc-CUBlxR7B.mjs');
12594
+ const { FrpcTunnel } = await import('./frpc-DFzccA5A.mjs');
12594
12595
  const tunnel = new FrpcTunnel({
12595
12596
  name: spec.name,
12596
12597
  ports: spec.ports,
@@ -12610,7 +12611,7 @@ async function startDaemon(options) {
12610
12611
  return tunnel;
12611
12612
  }
12612
12613
  const tunnelRecreateState = /* @__PURE__ */ new Map();
12613
- const { ServeManager } = await import('./serveManager-CkfMDcNQ.mjs');
12614
+ const { ServeManager } = await import('./serveManager-DevsLcov.mjs');
12614
12615
  const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
12615
12616
  ensureAutoInstalledSkills(logger).catch(() => {
12616
12617
  });
@@ -13034,7 +13035,7 @@ ${v.guidance ? v.guidance + "\n" : ""}Criteria: ${v.criteria || "(none)"}
13034
13035
  };
13035
13036
  let currentPermissionMode = options2.permissionMode || persisted?.permissionMode || "bypassPermissions";
13036
13037
  const sessionCreatedAt = persisted?.createdAt || Date.now();
13037
- let lastSpawnMeta = persisted?.spawnMeta || {};
13038
+ let lastSpawnMeta = persisted?.spawnMeta || (options2.model ? { model: options2.model } : {});
13038
13039
  let sessionWasProcessing = !!options2.wasProcessing;
13039
13040
  let lastMainModel;
13040
13041
  const AUTO_TOPIC_DISABLED = process.env.SVAMP_AUTO_TOPIC === "0";
@@ -14619,11 +14620,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
14619
14620
  });
14620
14621
  },
14621
14622
  onIssue: async (params) => {
14622
- const { issueRpc } = await import('./rpc-Cm2Uy3Hf.mjs');
14623
+ const { issueRpc } = await import('./rpc-Cqw0l8gl.mjs');
14623
14624
  return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
14624
14625
  },
14625
14626
  onWorkflow: async (params) => {
14626
- const { workflowRpc } = await import('./rpc-CPHva9-3.mjs');
14627
+ const { workflowRpc } = await import('./rpc-BQf6T_IG.mjs');
14627
14628
  return workflowRpc(params?.cwd || directory, params || {});
14628
14629
  },
14629
14630
  onRipgrep: async (args, cwd) => {
@@ -15156,11 +15157,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
15156
15157
  });
15157
15158
  },
15158
15159
  onIssue: async (params) => {
15159
- const { issueRpc } = await import('./rpc-Cm2Uy3Hf.mjs');
15160
+ const { issueRpc } = await import('./rpc-Cqw0l8gl.mjs');
15160
15161
  return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
15161
15162
  },
15162
15163
  onWorkflow: async (params) => {
15163
- const { workflowRpc } = await import('./rpc-CPHva9-3.mjs');
15164
+ const { workflowRpc } = await import('./rpc-BQf6T_IG.mjs');
15164
15165
  return workflowRpc(params?.cwd || directory, params || {});
15165
15166
  },
15166
15167
  onRipgrep: async (args, cwd) => {
@@ -16030,7 +16031,7 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
16030
16031
  const PING_TIMEOUT_MS = 15e3;
16031
16032
  const POST_RECONNECT_GRACE_MS = 2e4;
16032
16033
  const RECONNECT_JITTER_MS = 2500;
16033
- const { WorkflowScheduler } = await import('./scheduler-CwyAdWQa.mjs');
16034
+ const { WorkflowScheduler } = await import('./scheduler-D2RtypGf.mjs');
16034
16035
  const workflowScheduler = new WorkflowScheduler({
16035
16036
  projectRoots: () => {
16036
16037
  const dirs = /* @__PURE__ */ new Set();
@@ -1,4 +1,4 @@
1
- import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { a4 as applyClaudeProxyEnv, a5 as composeSessionId, a6 as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, a7 as generateHookSettings } from './run-BzobWMYv.mjs';
1
+ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { a4 as applyClaudeProxyEnv, a5 as composeSessionId, a6 as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, a7 as generateHookSettings } from './run-BUY7c3Fy.mjs';
2
2
  import os from 'node:os';
3
3
  import { resolve, join } from 'node:path';
4
4
  import { existsSync, readFileSync, watch } from 'node:fs';
@@ -2,6 +2,7 @@ import { spawn } from 'node:child_process';
2
2
  import { existsSync, readFileSync, mkdirSync, writeFileSync, renameSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
  import { c as workflowSteps, d as workflowsDir } from './store-BTs0H_y0.mjs';
5
+ import { v as listIssues, t as addIssue } from './run-BUY7c3Fy.mjs';
5
6
 
6
7
  const MAX_RUNS_PER_WORKFLOW = 50;
7
8
  const MAX_STREAM_CHARS = 8e3;
@@ -112,6 +113,56 @@ function defaultExecStep(root, cmd, env) {
112
113
  }
113
114
  });
114
115
  }
116
+ function escalateWorkflowFailure(projectRoot, wf, run) {
117
+ try {
118
+ if (process.env.SVAMP_WORKFLOW_ESCALATE === "0") return void 0;
119
+ const failLabel = `wf-fail:${wf.name}`;
120
+ const open = listIssues(projectRoot, { label: failLabel }).filter((i) => i.status !== "archived");
121
+ if (open.length > 0) return void 0;
122
+ const failed = run.steps.find((s) => s.timedOut || s.exitCode !== 0 && s.exitCode !== null) || run.steps[run.steps.length - 1];
123
+ const failCause = run.error ? `runner error: ${run.error}` : failed?.timedOut ? `step timed out after ${STEP_TIMEOUT_MS / 1e3}s` : `step exited with code ${failed?.exitCode ?? "null (killed/signal)"}`;
124
+ const defLines = workflowSteps(wf).map((s, i) => ` ${i}. ${s.run}`).join("\n") || " (no steps)";
125
+ const stderrTail = failed?.stderr ? capStream(failed.stderr, 3e3) : "(none)";
126
+ const stdoutTail = failed?.stdout ? capStream(failed.stdout, 1500) : "(none)";
127
+ const body = [
128
+ `Workflow **${wf.name}** failed on its last run (${run.trigger} trigger${run.triggerContext ? ` \xB7 ${run.triggerContext}` : ""}). Diagnose the failure and **correct the workflow definition** so future runs succeed \u2014 edit it with \`svamp workflow\` (see \`svamp workflow --help\`), or pause/remove it if it's obsolete.`,
129
+ "",
130
+ "## Failure",
131
+ `- Cause: ${failCause}`,
132
+ `- Failed step: ${failed ? `#${failed.index} \u2014 \`${failed.cmd}\`` : "(unknown)"}`,
133
+ `- Run id: ${run.id} \xB7 finished: ${run.finishedAt || "?"}`,
134
+ "",
135
+ "## Workflow definition",
136
+ "```",
137
+ `name: ${wf.name}`,
138
+ `steps:`,
139
+ defLines,
140
+ "```",
141
+ "",
142
+ "## Failed step stderr (tail)",
143
+ "```",
144
+ stderrTail,
145
+ "```",
146
+ "",
147
+ "## Failed step stdout (tail)",
148
+ "```",
149
+ stdoutTail,
150
+ "```"
151
+ ].join("\n");
152
+ const issue = addIssue(projectRoot, {
153
+ title: `Fix failing workflow "${wf.name}" (${failCause})`,
154
+ labels: ["workflow", "automation", "auto-escalated", failLabel],
155
+ verify: { type: "agent", text: `The workflow "${wf.name}" is corrected (or removed/paused) so it no longer fails with: ${failCause}` },
156
+ scope: wf.session ? "session" : "project",
157
+ session: wf.session ?? null,
158
+ triaged: true,
159
+ body
160
+ });
161
+ return issue.id;
162
+ } catch {
163
+ return void 0;
164
+ }
165
+ }
115
166
  async function runWorkflow(projectRoot, wf, opts) {
116
167
  const now = opts.now || (() => {
117
168
  const d = /* @__PURE__ */ new Date();
@@ -160,6 +211,13 @@ async function runWorkflow(projectRoot, wf, opts) {
160
211
  const end = now();
161
212
  run.finishedAt = end.iso;
162
213
  run.durationMs = end.ms - start.ms;
214
+ if (run.status === "failed") {
215
+ const escalated = escalateWorkflowFailure(projectRoot, wf, run);
216
+ if (escalated) {
217
+ run.escalatedIssue = escalated;
218
+ opts.log?.(`[workflow] run ${id} "${wf.name}" failed \u2192 escalated to issue #${escalated}`);
219
+ }
220
+ }
163
221
  recordRun(projectRoot, run);
164
222
  opts.log?.(`[workflow] run ${id} "${wf.name}" \u2192 ${run.status} (${run.steps.length} step${run.steps.length === 1 ? "" : "s"})`);
165
223
  return run;
@@ -1,6 +1,6 @@
1
- import { m as resolveProjectRoot, y as cronMatches } from './run-BzobWMYv.mjs';
1
+ import { m as resolveProjectRoot, y as cronMatches } from './run-BUY7c3Fy.mjs';
2
2
  import { l as listWorkflows, i as isWorkflowEnabled, w as workflowCrons } from './store-BTs0H_y0.mjs';
3
- import { r as runWorkflow } from './runStore-CtptN7US.mjs';
3
+ import { r as runWorkflow } from './runStore-DxRBIB_J.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
6
6
  import 'fs';
@@ -54,7 +54,7 @@ async function handleServeCommand() {
54
54
  }
55
55
  }
56
56
  async function serveAdd(args, machineId) {
57
- const { connectAndGetMachine } = await import('./commands-qu4qKm64.mjs');
57
+ const { connectAndGetMachine } = await import('./commands-BODHeJVA.mjs');
58
58
  const pos = positionalArgs(args);
59
59
  const name = pos[0];
60
60
  if (!name) {
@@ -93,7 +93,7 @@ async function serveAdd(args, machineId) {
93
93
  }
94
94
  }
95
95
  async function serveApply(args, machineId) {
96
- const { connectAndGetMachine } = await import('./commands-qu4qKm64.mjs');
96
+ const { connectAndGetMachine } = await import('./commands-BODHeJVA.mjs');
97
97
  const fs = await import('fs');
98
98
  const yaml = await import('yaml');
99
99
  const file = positionalArgs(args)[0];
@@ -182,7 +182,7 @@ async function serveApply(args, machineId) {
182
182
  }
183
183
  }
184
184
  async function serveRemove(args, machineId) {
185
- const { connectAndGetMachine } = await import('./commands-qu4qKm64.mjs');
185
+ const { connectAndGetMachine } = await import('./commands-BODHeJVA.mjs');
186
186
  const pos = positionalArgs(args);
187
187
  const name = pos[0];
188
188
  if (!name) {
@@ -202,7 +202,7 @@ async function serveRemove(args, machineId) {
202
202
  }
203
203
  }
204
204
  async function serveList(args, machineId) {
205
- const { connectAndGetMachine } = await import('./commands-qu4qKm64.mjs');
205
+ const { connectAndGetMachine } = await import('./commands-BODHeJVA.mjs');
206
206
  const all = hasFlag(args, "--all", "-a");
207
207
  const json = hasFlag(args, "--json");
208
208
  const sessionId = getFlag(args, "--session");
@@ -235,7 +235,7 @@ async function serveList(args, machineId) {
235
235
  }
236
236
  }
237
237
  async function serveInfo(machineId) {
238
- const { connectAndGetMachine } = await import('./commands-qu4qKm64.mjs');
238
+ const { connectAndGetMachine } = await import('./commands-BODHeJVA.mjs');
239
239
  const { machine, server } = await connectAndGetMachine(machineId);
240
240
  try {
241
241
  const info = await machine.serveInfo();
@@ -4,7 +4,7 @@ import * as fs from 'fs';
4
4
  import * as http from 'http';
5
5
  import * as net from 'net';
6
6
  import * as path from 'path';
7
- import { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run-BzobWMYv.mjs';
7
+ import { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run-BUY7c3Fy.mjs';
8
8
  import 'os';
9
9
  import 'fs/promises';
10
10
  import 'url';
@@ -733,7 +733,7 @@ class ServeManager {
733
733
  const mount = this.mounts.get(mountName);
734
734
  const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, buildLinkSubdomain(subdomainSafe, mount.linkToken)]]) : void 0;
735
735
  try {
736
- const { FrpcTunnel } = await import('./frpc-CUBlxR7B.mjs');
736
+ const { FrpcTunnel } = await import('./frpc-DFzccA5A.mjs');
737
737
  let tunnel;
738
738
  tunnel = new FrpcTunnel({
739
739
  name: tunnelName,
@@ -1,4 +1,4 @@
1
- import { R as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-BzobWMYv.mjs';
1
+ import { R as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-BUY7c3Fy.mjs';
2
2
  import 'node:child_process';
3
3
  import 'os';
4
4
  import 'fs/promises';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svamp-cli",
3
- "version": "0.2.231",
3
+ "version": "0.2.233",
4
4
  "description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
5
5
  "author": "Amun AI AB",
6
6
  "license": "SEE LICENSE IN LICENSE",