svamp-cli 0.2.117 → 0.2.118

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: loop
3
- version: 0.3.3
3
+ version: 0.3.2
4
4
  description: Run a task as a reliable, self-verifying loop — iterate until objective exit conditions are met, with an independent evaluator instead of self-judging. Use when a task needs repeated iterations until "done" (fix until tests pass, refactor until clean, build until a spec is met, autonomous long-running work).
5
5
  ---
6
6
 
@@ -71,9 +71,6 @@ const config = {
71
71
  // and resolve their own dir relatively) read this to run the oracle + fingerprint the
72
72
  // work product, since their depth no longer encodes the project root.
73
73
  project_dir: dir,
74
- // The success contract — the durable thing the gate judges against. Read by the daemon
75
- // to populate the supervision:verdict event (docs/supervisor-gate-design.md).
76
- ...(criteria ? { criteria: criteria.trim() } : {}),
77
74
  oracle: oracle ? { command: oracle, timeout_sec: 600 } : null,
78
75
  evaluator: { enabled: evaluatorOn, model },
79
76
  max_iterations: max,
@@ -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 { n as shortId } from './run-Ci6VToZR.mjs';
5
+ import { n as shortId } from './run-9C2ogsuu.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-Ci6VToZR.mjs').then(function (n) { return n.T; });
99
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.T; });
100
100
  const desc = sanitizeDescription(description, 240);
101
101
  if (!desc) {
102
102
  console.error("Project description is empty.");
@@ -180,7 +180,7 @@ async function sessionBroadcast(action, args) {
180
180
  console.log(`Broadcast sent: ${action}`);
181
181
  }
182
182
  async function connectToMachineService() {
183
- const { connectAndGetMachine } = await import('./commands-BxXUQlBD.mjs');
183
+ const { connectAndGetMachine } = await import('./commands-B5rek8XG.mjs');
184
184
  return connectAndGetMachine();
185
185
  }
186
186
  async function inboxSend(targetSessionId, opts) {
@@ -197,7 +197,7 @@ async function inboxSend(targetSessionId, opts) {
197
197
  }
198
198
  const { server, machine } = await connectToMachineService();
199
199
  try {
200
- const { resolveSessionId } = await import('./commands-BxXUQlBD.mjs');
200
+ const { resolveSessionId } = await import('./commands-B5rek8XG.mjs');
201
201
  const sessions = await machine.listSessions();
202
202
  const match = resolveSessionId(sessions, targetSessionId);
203
203
  const fullTargetId = match.sessionId;
@@ -1,4 +1,4 @@
1
- import { F as resolveModel } from './run-Ci6VToZR.mjs';
1
+ import { F as resolveModel } from './run-9C2ogsuu.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-Ci6VToZR.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-9C2ogsuu.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-Ci6VToZR.mjs').then(function (n) { return n._; });
37
+ const { getLoadedConfig } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n._; });
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-Ci6VToZR.mjs').then(function (n) { return n.a0; });
54
+ const { restartDaemon } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.a0; });
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-CsJyJgin.mjs');
347
+ const { handleServiceCommand } = await import('./commands-fbQs3jLx.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-BuA8btah.mjs');
355
+ const { handleServeCommand } = await import('./serveCommands-BqApmjmR.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-Q1xvobXM.mjs');
364
+ const { processCommand } = await import('./commands-3FsdWpJO.mjs');
365
365
  let machineId;
366
366
  const processArgs = args.slice(1);
367
367
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -374,15 +374,15 @@ async function main() {
374
374
  return true;
375
375
  }), machineId);
376
376
  process.exit(0);
377
- } else if (subcommand === "routine" || subcommand === "routines") {
378
- const { routineCommand } = await import('./commands-BvKgI__M.mjs');
377
+ } else if (subcommand === "trigger" || subcommand === "triggers" || subcommand === "routine" || subcommand === "routines") {
378
+ const { routineCommand } = await import('./commands-Bw2V_awn.mjs');
379
379
  await routineCommand(args.slice(1));
380
380
  process.exit(0);
381
381
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
382
382
  await handleWiseAgentCommand(args.slice(1));
383
383
  process.exit(0);
384
384
  } else if (subcommand === "feature" || subcommand === "crew") {
385
- const { crewCommand } = await import('./commands-Do6Od6jK.mjs');
385
+ const { crewCommand } = await import('./commands-BJfRk4KT.mjs');
386
386
  await crewCommand(args.slice(1));
387
387
  process.exit(0);
388
388
  } else if (subcommand === "--help" || subcommand === "-h") {
@@ -390,7 +390,7 @@ async function main() {
390
390
  } else if (!subcommand || subcommand === "start") {
391
391
  await handleInteractiveCommand();
392
392
  } else if (subcommand === "--version" || subcommand === "-v") {
393
- const pkg = await import('./package-uOEzgreT.mjs').catch(() => ({ default: { version: "unknown" } }));
393
+ const pkg = await import('./package-CxWiFy_P.mjs').catch(() => ({ default: { version: "unknown" } }));
394
394
  console.log(`svamp version: ${pkg.default.version}`);
395
395
  } else {
396
396
  console.error(`Unknown command: ${subcommand}`);
@@ -399,7 +399,7 @@ async function main() {
399
399
  }
400
400
  }
401
401
  async function handleInteractiveCommand() {
402
- const { runInteractive } = await import('./run-C1jI28ZZ.mjs');
402
+ const { runInteractive } = await import('./run-DIoR81Ev.mjs');
403
403
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
404
404
  let directory = process.cwd();
405
405
  let resumeSessionId;
@@ -444,7 +444,7 @@ async function handleAgentCommand() {
444
444
  return;
445
445
  }
446
446
  if (agentArgs[0] === "list") {
447
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-Ci6VToZR.mjs').then(function (n) { return n.W; });
447
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.W; });
448
448
  console.log("Known agents:");
449
449
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
450
450
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -456,7 +456,7 @@ async function handleAgentCommand() {
456
456
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
457
457
  return;
458
458
  }
459
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-Ci6VToZR.mjs').then(function (n) { return n.W; });
459
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.W; });
460
460
  let cwd = process.cwd();
461
461
  const filteredArgs = [];
462
462
  for (let i = 0; i < agentArgs.length; i++) {
@@ -480,12 +480,12 @@ async function handleAgentCommand() {
480
480
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
481
481
  let backend;
482
482
  if (KNOWN_MCP_AGENTS[config.agentName]) {
483
- const { CodexMcpBackend } = await import('./run-Ci6VToZR.mjs').then(function (n) { return n.X; });
483
+ const { CodexMcpBackend } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.X; });
484
484
  backend = new CodexMcpBackend({ cwd, log: logFn });
485
485
  } else {
486
- const { AcpBackend } = await import('./run-Ci6VToZR.mjs').then(function (n) { return n.V; });
487
- const { GeminiTransport } = await import('./run-Ci6VToZR.mjs').then(function (n) { return n.Y; });
488
- const { DefaultTransport } = await import('./run-Ci6VToZR.mjs').then(function (n) { return n.U; });
486
+ const { AcpBackend } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.V; });
487
+ const { GeminiTransport } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.Y; });
488
+ const { DefaultTransport } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.U; });
489
489
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
490
490
  backend = new AcpBackend({
491
491
  agentName: config.agentName,
@@ -612,7 +612,7 @@ async function handleSessionCommand() {
612
612
  process.exit(1);
613
613
  }
614
614
  }
615
- 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-BxXUQlBD.mjs');
615
+ 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-B5rek8XG.mjs');
616
616
  const parseFlagStr = (flag, shortFlag) => {
617
617
  for (let i = 1; i < sessionArgs.length; i++) {
618
618
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -680,7 +680,7 @@ async function handleSessionCommand() {
680
680
  allowDomain.push(sessionArgs[++i]);
681
681
  }
682
682
  }
683
- const { parseShareArg } = await import('./commands-BxXUQlBD.mjs');
683
+ const { parseShareArg } = await import('./commands-B5rek8XG.mjs');
684
684
  const shareEntries = share.map((s) => parseShareArg(s));
685
685
  await sessionSpawn(agent, dir, targetMachineId, {
686
686
  message,
@@ -767,7 +767,7 @@ async function handleSessionCommand() {
767
767
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
768
768
  process.exit(1);
769
769
  }
770
- const { sessionQuery } = await import('./commands-BxXUQlBD.mjs');
770
+ const { sessionQuery } = await import('./commands-B5rek8XG.mjs');
771
771
  await sessionQuery(dir, prompt, targetMachineId, {
772
772
  timeout: parseFlagInt("--timeout"),
773
773
  json: hasFlag("--json"),
@@ -800,7 +800,7 @@ async function handleSessionCommand() {
800
800
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
801
801
  process.exit(1);
802
802
  }
803
- const { sessionApprove } = await import('./commands-BxXUQlBD.mjs');
803
+ const { sessionApprove } = await import('./commands-B5rek8XG.mjs');
804
804
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
805
805
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
806
806
  json: hasFlag("--json")
@@ -810,7 +810,7 @@ async function handleSessionCommand() {
810
810
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
811
811
  process.exit(1);
812
812
  }
813
- const { sessionDeny } = await import('./commands-BxXUQlBD.mjs');
813
+ const { sessionDeny } = await import('./commands-B5rek8XG.mjs');
814
814
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
815
815
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
816
816
  json: hasFlag("--json")
@@ -844,7 +844,7 @@ async function handleSessionCommand() {
844
844
  console.error('Usage: svamp session supervise <session-id> "<criteria>" [--oracle "cmd"] [--agent] [--parent <id>] [--action nudge|block] [--max N]');
845
845
  process.exit(1);
846
846
  }
847
- const { sessionSupervise } = await import('./commands-BxXUQlBD.mjs');
847
+ const { sessionSupervise } = await import('./commands-B5rek8XG.mjs');
848
848
  const actionStr = parseFlagStr("--action");
849
849
  await sessionSupervise(sessionArgs[1], sessionArgs[2], targetMachineId, {
850
850
  oracle: parseFlagStr("--oracle"),
@@ -858,7 +858,7 @@ async function handleSessionCommand() {
858
858
  console.error("Usage: svamp session unsupervise <session-id>");
859
859
  process.exit(1);
860
860
  }
861
- const { sessionUnsupervise } = await import('./commands-BxXUQlBD.mjs');
861
+ const { sessionUnsupervise } = await import('./commands-B5rek8XG.mjs');
862
862
  await sessionUnsupervise(sessionArgs[1], targetMachineId);
863
863
  } else if (sessionSubcommand === "set-title") {
864
864
  const title = sessionArgs[1];
@@ -866,7 +866,7 @@ async function handleSessionCommand() {
866
866
  console.error("Usage: svamp session set-title <title>");
867
867
  process.exit(1);
868
868
  }
869
- const { sessionSetTitle } = await import('./agentCommands-CZgIpC1Z.mjs');
869
+ const { sessionSetTitle } = await import('./agentCommands-BTkU0PQb.mjs');
870
870
  await sessionSetTitle(title);
871
871
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
872
872
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -874,7 +874,7 @@ async function handleSessionCommand() {
874
874
  console.error("Usage: svamp session set-project-description <text>");
875
875
  process.exit(1);
876
876
  }
877
- const { sessionSetProjectDescription } = await import('./agentCommands-CZgIpC1Z.mjs');
877
+ const { sessionSetProjectDescription } = await import('./agentCommands-BTkU0PQb.mjs');
878
878
  await sessionSetProjectDescription(desc);
879
879
  } else if (sessionSubcommand === "set-link") {
880
880
  const url = sessionArgs[1];
@@ -883,7 +883,7 @@ async function handleSessionCommand() {
883
883
  process.exit(1);
884
884
  }
885
885
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
886
- const { sessionSetLink } = await import('./agentCommands-CZgIpC1Z.mjs');
886
+ const { sessionSetLink } = await import('./agentCommands-BTkU0PQb.mjs');
887
887
  await sessionSetLink(url, label);
888
888
  } else if (sessionSubcommand === "notify") {
889
889
  const message = sessionArgs[1];
@@ -892,7 +892,7 @@ async function handleSessionCommand() {
892
892
  process.exit(1);
893
893
  }
894
894
  const level = parseFlagStr("--level") || "info";
895
- const { sessionNotify } = await import('./agentCommands-CZgIpC1Z.mjs');
895
+ const { sessionNotify } = await import('./agentCommands-BTkU0PQb.mjs');
896
896
  await sessionNotify(message, level);
897
897
  } else if (sessionSubcommand === "broadcast") {
898
898
  const action = sessionArgs[1];
@@ -900,7 +900,7 @@ async function handleSessionCommand() {
900
900
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
901
901
  process.exit(1);
902
902
  }
903
- const { sessionBroadcast } = await import('./agentCommands-CZgIpC1Z.mjs');
903
+ const { sessionBroadcast } = await import('./agentCommands-BTkU0PQb.mjs');
904
904
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
905
905
  } else if (sessionSubcommand === "inbox") {
906
906
  const inboxSubcmd = sessionArgs[1];
@@ -911,7 +911,7 @@ async function handleSessionCommand() {
911
911
  process.exit(1);
912
912
  }
913
913
  if (agentSessionId) {
914
- const { inboxSend } = await import('./agentCommands-CZgIpC1Z.mjs');
914
+ const { inboxSend } = await import('./agentCommands-BTkU0PQb.mjs');
915
915
  await inboxSend(sessionArgs[2], {
916
916
  body: sessionArgs[3],
917
917
  subject: parseFlagStr("--subject"),
@@ -926,7 +926,7 @@ async function handleSessionCommand() {
926
926
  }
927
927
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
928
928
  if (agentSessionId && !sessionArgs[2]) {
929
- const { inboxList } = await import('./agentCommands-CZgIpC1Z.mjs');
929
+ const { inboxList } = await import('./agentCommands-BTkU0PQb.mjs');
930
930
  await inboxList({
931
931
  unread: hasFlag("--unread"),
932
932
  limit: parseFlagInt("--limit"),
@@ -948,7 +948,7 @@ async function handleSessionCommand() {
948
948
  process.exit(1);
949
949
  }
950
950
  if (agentSessionId && !sessionArgs[3]) {
951
- const { inboxList } = await import('./agentCommands-CZgIpC1Z.mjs');
951
+ const { inboxList } = await import('./agentCommands-BTkU0PQb.mjs');
952
952
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
953
953
  } else if (sessionArgs[3]) {
954
954
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -958,7 +958,7 @@ async function handleSessionCommand() {
958
958
  }
959
959
  } else if (inboxSubcmd === "reply") {
960
960
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
961
- const { inboxReply } = await import('./agentCommands-CZgIpC1Z.mjs');
961
+ const { inboxReply } = await import('./agentCommands-BTkU0PQb.mjs');
962
962
  await inboxReply(sessionArgs[2], sessionArgs[3]);
963
963
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
964
964
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -994,7 +994,7 @@ async function handleMachineCommand() {
994
994
  return;
995
995
  }
996
996
  if (machineSubcommand === "share") {
997
- const { machineShare } = await import('./commands-BxXUQlBD.mjs');
997
+ const { machineShare } = await import('./commands-B5rek8XG.mjs');
998
998
  let machineId;
999
999
  const shareArgs = [];
1000
1000
  for (let i = 1; i < machineArgs.length; i++) {
@@ -1024,7 +1024,7 @@ async function handleMachineCommand() {
1024
1024
  }
1025
1025
  await machineShare(machineId, { add, remove, list, configPath, showConfig });
1026
1026
  } else if (machineSubcommand === "exec") {
1027
- const { machineExec } = await import('./commands-BxXUQlBD.mjs');
1027
+ const { machineExec } = await import('./commands-B5rek8XG.mjs');
1028
1028
  let machineId;
1029
1029
  let cwd;
1030
1030
  const cmdParts = [];
@@ -1044,7 +1044,7 @@ async function handleMachineCommand() {
1044
1044
  }
1045
1045
  await machineExec(machineId, command, cwd);
1046
1046
  } else if (machineSubcommand === "info") {
1047
- const { machineInfo } = await import('./commands-BxXUQlBD.mjs');
1047
+ const { machineInfo } = await import('./commands-B5rek8XG.mjs');
1048
1048
  let machineId;
1049
1049
  for (let i = 1; i < machineArgs.length; i++) {
1050
1050
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1064,10 +1064,10 @@ async function handleMachineCommand() {
1064
1064
  level = machineArgs[++i];
1065
1065
  }
1066
1066
  }
1067
- const { machineNotify } = await import('./agentCommands-CZgIpC1Z.mjs');
1067
+ const { machineNotify } = await import('./agentCommands-BTkU0PQb.mjs');
1068
1068
  await machineNotify(message, level);
1069
1069
  } else if (machineSubcommand === "ls") {
1070
- const { machineLs } = await import('./commands-BxXUQlBD.mjs');
1070
+ const { machineLs } = await import('./commands-B5rek8XG.mjs');
1071
1071
  let machineId;
1072
1072
  let showHidden = false;
1073
1073
  let path;
@@ -1125,24 +1125,24 @@ Examples:
1125
1125
  };
1126
1126
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1127
1127
  if (sub === "status") {
1128
- const { fleetStatus } = await import('./fleet-l4Ku9jry.mjs');
1128
+ const { fleetStatus } = await import('./fleet-D5dNVJIp.mjs');
1129
1129
  await fleetStatus();
1130
1130
  } else if (sub === "exec") {
1131
1131
  const command = fleetArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1132
- const { fleetExec } = await import('./fleet-l4Ku9jry.mjs');
1132
+ const { fleetExec } = await import('./fleet-D5dNVJIp.mjs');
1133
1133
  await fleetExec(command, { cwd: flag("cwd") });
1134
1134
  } else if (sub === "upgrade-claude") {
1135
- const { fleetUpgradeClaude } = await import('./fleet-l4Ku9jry.mjs');
1135
+ const { fleetUpgradeClaude } = await import('./fleet-D5dNVJIp.mjs');
1136
1136
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1137
1137
  } else if (sub === "upgrade-svamp") {
1138
- const { fleetUpgradeSvamp } = await import('./fleet-l4Ku9jry.mjs');
1138
+ const { fleetUpgradeSvamp } = await import('./fleet-D5dNVJIp.mjs');
1139
1139
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
1140
1140
  } else if (sub === "daemon-restart") {
1141
- const { fleetDaemonRestart } = await import('./fleet-l4Ku9jry.mjs');
1141
+ const { fleetDaemonRestart } = await import('./fleet-D5dNVJIp.mjs');
1142
1142
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1143
1143
  } else if (sub === "push-skill") {
1144
1144
  const name = fleetArgs[1];
1145
- const { fleetPushSkill } = await import('./fleet-l4Ku9jry.mjs');
1145
+ const { fleetPushSkill } = await import('./fleet-D5dNVJIp.mjs');
1146
1146
  await fleetPushSkill(name);
1147
1147
  } else {
1148
1148
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1158,7 +1158,7 @@ async function handleSkillsCommand() {
1158
1158
  await printSkillsHelp();
1159
1159
  return;
1160
1160
  }
1161
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-QWVhHPCf.mjs');
1161
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-BEjlVtvS.mjs');
1162
1162
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1163
1163
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1164
1164
  if (!query) {
@@ -1205,7 +1205,7 @@ async function loginToHypha() {
1205
1205
  process.exit(1);
1206
1206
  }
1207
1207
  const anchor = anchorArg.replace(/\/+$/, "");
1208
- const { loadInstanceConfig } = await import('./run-Ci6VToZR.mjs').then(function (n) { return n._; });
1208
+ const { loadInstanceConfig } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n._; });
1209
1209
  let cfg = null;
1210
1210
  try {
1211
1211
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1316,7 +1316,7 @@ async function logoutFromHypha() {
1316
1316
  } catch {
1317
1317
  }
1318
1318
  try {
1319
- const { clearInstanceConfigCache } = await import('./run-Ci6VToZR.mjs').then(function (n) { return n._; });
1319
+ const { clearInstanceConfigCache } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n._; });
1320
1320
  clearInstanceConfigCache();
1321
1321
  } catch {
1322
1322
  }
@@ -1654,7 +1654,7 @@ async function applyClaudeAuthFlags(argv) {
1654
1654
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1655
1655
  );
1656
1656
  }
1657
- const mod = await import('./run-Ci6VToZR.mjs').then(function (n) { return n.Z; });
1657
+ const mod = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.Z; });
1658
1658
  if (hasHypha) {
1659
1659
  let url;
1660
1660
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1708,7 +1708,7 @@ async function applyDaemonShareFlag(argv) {
1708
1708
  }
1709
1709
  }
1710
1710
  if (collected.length === 0) return;
1711
- const { updateEnvFile } = await import('./run-Ci6VToZR.mjs').then(function (n) { return n.Z; });
1711
+ const { updateEnvFile } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.Z; });
1712
1712
  const seen = /* @__PURE__ */ new Set();
1713
1713
  const deduped = collected.filter((e) => {
1714
1714
  const k = e.toLowerCase();
@@ -1741,7 +1741,7 @@ async function handleWiseAgentCommand(rest) {
1741
1741
  }
1742
1742
  });
1743
1743
  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(" ");
1744
- const { wiseAskCli } = await import('./commands-BxXUQlBD.mjs');
1744
+ const { wiseAskCli } = await import('./commands-B5rek8XG.mjs');
1745
1745
  await wiseAskCli(machineId, message, sessionId, { json });
1746
1746
  return;
1747
1747
  }
@@ -1753,7 +1753,7 @@ async function handleWiseAgentCommand(rest) {
1753
1753
  }
1754
1754
  return void 0;
1755
1755
  };
1756
- const { runWiseVoiceCli } = await import('./headlessCli-BsVvbKhN.mjs');
1756
+ const { runWiseVoiceCli } = await import('./headlessCli-Lk2OU1Gh.mjs');
1757
1757
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1758
1758
  return;
1759
1759
  }
@@ -1795,7 +1795,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1795
1795
  return;
1796
1796
  }
1797
1797
  const authArgs = rest.slice(1);
1798
- const mod = await import('./auth-Dkiiq1bg.mjs');
1798
+ const mod = await import('./auth-DimbhOMP.mjs');
1799
1799
  let action;
1800
1800
  try {
1801
1801
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1805,7 +1805,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1805
1805
  return;
1806
1806
  }
1807
1807
  if (action) {
1808
- const { updateEnvFile } = await import('./run-Ci6VToZR.mjs').then(function (n) { return n.Z; });
1808
+ const { updateEnvFile } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.Z; });
1809
1809
  const updates = mod.buildWiseAgentEnvUpdates(action);
1810
1810
  updateEnvFile(updates);
1811
1811
  for (const [k, v] of Object.entries(updates)) {
@@ -1819,7 +1819,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1819
1819
  }
1820
1820
  async function handleDaemonAuthCommand(argv) {
1821
1821
  const sub = (argv[0] || "status").toLowerCase();
1822
- const mod = await import('./run-Ci6VToZR.mjs').then(function (n) { return n.Z; });
1822
+ const mod = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.Z; });
1823
1823
  if (sub === "--help" || sub === "-h" || sub === "help") {
1824
1824
  console.log(`
1825
1825
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2126,7 +2126,7 @@ Examples:
2126
2126
  async function printSkillsHelp() {
2127
2127
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2128
2128
  try {
2129
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-Ci6VToZR.mjs').then(function (n) { return n.$; });
2129
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.$; });
2130
2130
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2131
2131
  } catch {
2132
2132
  }
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-BxXUQlBD.mjs';
3
+ import { connectAndGetMachine } from './commands-B5rek8XG.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-Ci6VToZR.mjs';
8
+ import './run-9C2ogsuu.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -1,8 +1,8 @@
1
- import { existsSync, readFileSync } from 'node:fs';
1
+ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { execSync } from 'node:child_process';
3
- import { basename, resolve, join } from 'node:path';
3
+ import { basename, resolve, join, isAbsolute } from 'node:path';
4
4
  import os from 'node:os';
5
- import { G as normalizeAllowedUser, H as loadSecurityContextConfig, I as resolveSecurityContext, J as buildSecurityContextFromFlags, K as mergeSecurityContexts, c as connectToHypha, L as buildSessionShareUrl, M as computeOutboundHop, n as shortId, N as buildMachineShareUrl } from './run-Ci6VToZR.mjs';
5
+ import { G as normalizeAllowedUser, H as loadSecurityContextConfig, I as resolveSecurityContext, J as buildSecurityContextFromFlags, K as mergeSecurityContexts, c as connectToHypha, L as buildSessionShareUrl, M as computeOutboundHop, n as shortId, N as buildMachineShareUrl } from './run-9C2ogsuu.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -999,6 +999,22 @@ function generateWorktreeName() {
999
999
  const noun = WORKTREE_NOUNS[Math.floor(Math.random() * WORKTREE_NOUNS.length)];
1000
1000
  return `${adj}-${noun}`;
1001
1001
  }
1002
+ function ensureWorktreeExcludes(projectRoot) {
1003
+ try {
1004
+ const common = execSync("git rev-parse --git-common-dir", { cwd: projectRoot, stdio: "pipe" }).toString().trim();
1005
+ const commonAbs = isAbsolute(common) ? common : join(projectRoot, common);
1006
+ const excludeFile = join(commonAbs, "info", "exclude");
1007
+ const existing = existsSync(excludeFile) ? readFileSync(excludeFile, "utf-8") : "";
1008
+ const lines = existing.split("\n");
1009
+ const want = [".svamp/", ".dev/"];
1010
+ const missing = want.filter((w) => !lines.some((l) => l.trim() === w));
1011
+ if (missing.length) {
1012
+ const prefix = existing && !existing.endsWith("\n") ? "\n" : "";
1013
+ writeFileSync(excludeFile, existing + prefix + missing.join("\n") + "\n");
1014
+ }
1015
+ } catch {
1016
+ }
1017
+ }
1002
1018
  function createWorktree(baseDir) {
1003
1019
  const absBase = resolve(baseDir);
1004
1020
  const marker = "/.dev/worktree/";
@@ -1009,6 +1025,7 @@ function createWorktree(baseDir) {
1009
1025
  } catch {
1010
1026
  throw new Error(`Not a git repository: ${projectRoot}`);
1011
1027
  }
1028
+ ensureWorktreeExcludes(projectRoot);
1012
1029
  const name = generateWorktreeName();
1013
1030
  const relPath = `.dev/worktree/${name}`;
1014
1031
  try {
@@ -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 { p as parseFrontmatter, o as getSkillsServer, q as getSkillsWorkspaceName, t as getSkillsCollectionName, u as fetchWithTimeout, v as searchSkills, w as SKILLS_DIR, x as getSkillInfo, y as downloadSkillFile, z as listSkillFiles } from './run-Ci6VToZR.mjs';
4
+ import { p as parseFrontmatter, o as getSkillsServer, q as getSkillsWorkspaceName, t as getSkillsCollectionName, u as fetchWithTimeout, v as searchSkills, w as SKILLS_DIR, x as getSkillInfo, y as downloadSkillFile, z as listSkillFiles } from './run-9C2ogsuu.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
- import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-BxXUQlBD.mjs';
2
+ import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-B5rek8XG.mjs';
3
3
  import { execSync } from 'node:child_process';
4
- import { n as shortId } from './run-Ci6VToZR.mjs';
4
+ import { n as shortId } from './run-9C2ogsuu.mjs';
5
5
  import 'node:path';
6
6
  import 'node:os';
7
7
  import 'os';
@@ -26,7 +26,12 @@ function git(cwd, args) {
26
26
  return execSync(`git ${args}`, { cwd, stdio: "pipe", encoding: "utf-8" }).toString();
27
27
  }
28
28
  function worktreeStatus(worktreePath) {
29
- return git(worktreePath, "status --porcelain").trim();
29
+ const raw = git(worktreePath, "status --porcelain").trim();
30
+ if (!raw) return "";
31
+ return raw.split("\n").filter((line) => {
32
+ const p = line.slice(3);
33
+ return !p.startsWith(".svamp/") && !p.startsWith(".dev/");
34
+ }).join("\n").trim();
30
35
  }
31
36
  function aheadBehind(worktreePath, baseBranch) {
32
37
  try {
@@ -101,7 +106,7 @@ ${childStatus}`
101
106
  ${detail.trim()}` };
102
107
  }
103
108
  try {
104
- git(projectRoot, `worktree remove ${worktreePath}`);
109
+ git(projectRoot, `worktree remove --force ${worktreePath}`);
105
110
  } catch (e) {
106
111
  const detail = e.stderr?.toString() || "" || e.message;
107
112
  return { ok: false, stage: "remove-worktree", detail: `merged OK but worktree removal failed: ${detail.trim()}` };
@@ -132,6 +137,10 @@ function requireLead(explicit) {
132
137
  async function rpc(machine, id, method, kwargs = {}) {
133
138
  return machine.sessionRPC(id, method, kwargs);
134
139
  }
140
+ async function getMeta(machine, id) {
141
+ const r = await rpc(machine, id, "getMetadata");
142
+ return r?.metadata ?? r ?? {};
143
+ }
135
144
  async function inbox(machine, fromId, toId, body, subject) {
136
145
  await rpc(machine, toId, "sendInboxMessage", {
137
146
  message: {
@@ -299,7 +308,7 @@ async function featureReport(text, opts = {}) {
299
308
  const selfId = requireLead(opts.selfId);
300
309
  const { server, machine } = await connectAndGetMachine(opts.machineId);
301
310
  try {
302
- const meta = await rpc(machine, selfId, "getMetadata");
311
+ const meta = await getMeta(machine, selfId);
303
312
  const parent = meta?.parentSessionId;
304
313
  if (!parent) {
305
314
  console.error("This session has no parent (lead) to report to.");
@@ -318,7 +327,7 @@ async function featureDone(opts = {}) {
318
327
  const selfId = requireLead(opts.selfId);
319
328
  const { server, machine } = await connectAndGetMachine(opts.machineId);
320
329
  try {
321
- const meta = await rpc(machine, selfId, "getMetadata");
330
+ const meta = await getMeta(machine, selfId);
322
331
  const parent = meta?.parentSessionId;
323
332
  if (!parent) {
324
333
  console.error("This session has no parent (lead) to report to.");
@@ -353,7 +362,7 @@ async function featureMerge(childPartial, opts = {}) {
353
362
  const leadId = opts.leadId || process.env.SVAMP_SESSION_ID || "";
354
363
  const { server, machine, fullId: childId } = await connectAndResolveSession(childPartial, opts.machineId);
355
364
  try {
356
- const meta = await rpc(machine, childId, "getMetadata");
365
+ const meta = await getMeta(machine, childId);
357
366
  const crew = meta?.crew || {};
358
367
  const worktreePath = crew.worktreePath || meta?.path || "";
359
368
  if (!worktreePath) {
@@ -366,7 +375,7 @@ async function featureMerge(childPartial, opts = {}) {
366
375
  console.error("Could not determine the feature branch.");
367
376
  process.exit(1);
368
377
  }
369
- const projectRoot = projectRootFromWorktree(worktreePath) || (leadId ? (await rpc(machine, leadId, "getMetadata").catch(() => null))?.path : null) || "";
378
+ const projectRoot = projectRootFromWorktree(worktreePath) || (leadId ? (await getMeta(machine, leadId).catch(() => ({})))?.path : null) || "";
370
379
  if (!projectRoot) {
371
380
  console.error("Could not determine the lead project root (base worktree).");
372
381
  process.exit(1);
@@ -1,6 +1,6 @@
1
1
  import { execFileSync } from 'node:child_process';
2
2
  import { createServer } from 'node:http';
3
- import { R as RoutineStore, m as RoutineRunner } from './run-Ci6VToZR.mjs';
3
+ import { R as RoutineStore, m as RoutineRunner } from './run-9C2ogsuu.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
6
6
  import 'fs';
@@ -89,7 +89,7 @@ async function routineCommand(args) {
89
89
  process.exit(1);
90
90
  }
91
91
  const r = store.save(buildRoutineFromArgs(a));
92
- console.log(`\u2705 added routine ${r.id} (${r.name}) trigger=${r.trigger.type} action=${r.action.kind} session=${r.session_id}`);
92
+ console.log(`\u2705 added trigger ${r.id} (${r.name}) source=${r.trigger.type} action=${r.action.kind} session=${r.session_id}`);
93
93
  if (r.trigger.key) console.log(` webhook key: ${r.trigger.key}`);
94
94
  break;
95
95
  }
@@ -100,7 +100,7 @@ async function routineCommand(args) {
100
100
  break;
101
101
  }
102
102
  if (!rs.length) {
103
- console.log("(no routines)");
103
+ console.log("(no triggers)");
104
104
  break;
105
105
  }
106
106
  for (const r of rs) console.log(`${r.enabled ? "\u25CF" : "\u25CB"} ${r.id} ${r.name} [${r.trigger.type}${r.trigger.cron ? " " + r.trigger.cron : ""}] -> ${r.action.kind} ${r.bind === "stateless" ? `stateless(${r.dir || "?"})` : `session=${r.session_id}`}`);
@@ -124,7 +124,7 @@ async function routineCommand(args) {
124
124
  await serve(runner, Number(a.port) || 8722);
125
125
  break;
126
126
  default:
127
- console.log(`usage: svamp routine <add|list|remove|enable|disable|run-now|serve>
127
+ console.log(`usage: svamp trigger <add|list|remove|enable|disable|run-now|serve> (alias: svamp routine)
128
128
  add --session <id> --name <n> [--schedule "*/5 * * * *" [--missed catchup]] [--webhook|--api [--get] [--public]] [--stateless --dir <path>] (--message "..." | --loop --dir <path> --task "..." [--oracle "cmd"])
129
129
  list [--session <id>] [--json]
130
130
  serve [--port 8722]`);
@@ -165,9 +165,9 @@ async function serve(runner, port) {
165
165
  });
166
166
  });
167
167
  server.listen(port, () => {
168
- console.log(`\u{1FA9D} routine server on http://localhost:${port}`);
168
+ console.log(`\u{1FA9D} trigger server on http://localhost:${port}`);
169
169
  console.log(` webhook URL: http://localhost:${port}/routine/<id>?key=<key>`);
170
- console.log(` expose: svamp service expose routines --port ${port}`);
170
+ console.log(` expose: svamp service expose triggers --port ${port}`);
171
171
  });
172
172
  process.on("SIGINT", () => {
173
173
  clearInterval(timer);
@@ -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-63NvAmuT.mjs');
61
+ const { runFrpcTunnel } = await import('./frpc-CdcXdQde.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-BxXUQlBD.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-B5rek8XG.mjs');
72
72
  const { server, machine } = await connectAndGetMachine();
73
73
  try {
74
74
  const status = await machine.tunnelStart({
@@ -123,7 +123,7 @@ async function serviceServe(args) {
123
123
  };
124
124
  process.on("SIGINT", cleanup);
125
125
  process.on("SIGTERM", cleanup);
126
- const { runFrpcTunnel } = await import('./frpc-63NvAmuT.mjs');
126
+ const { runFrpcTunnel } = await import('./frpc-CdcXdQde.mjs');
127
127
  await runFrpcTunnel(name, [caddyPort]);
128
128
  } catch (err) {
129
129
  console.error(`Error serving directory: ${err.message}`);
@@ -132,7 +132,7 @@ async function serviceServe(args) {
132
132
  }
133
133
  async function serviceList(_args) {
134
134
  try {
135
- const { connectAndGetMachine } = await import('./commands-BxXUQlBD.mjs');
135
+ const { connectAndGetMachine } = await import('./commands-B5rek8XG.mjs');
136
136
  const { server, machine } = await connectAndGetMachine();
137
137
  try {
138
138
  const tunnels = await machine.tunnelList({});
@@ -161,7 +161,7 @@ async function serviceDelete(args) {
161
161
  process.exit(1);
162
162
  }
163
163
  try {
164
- const { connectAndGetMachine } = await import('./commands-BxXUQlBD.mjs');
164
+ const { connectAndGetMachine } = await import('./commands-B5rek8XG.mjs');
165
165
  const { server, machine } = await connectAndGetMachine();
166
166
  try {
167
167
  await machine.tunnelStop({ name });
@@ -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-Ci6VToZR.mjs';
4
+ import { c as connectToHypha } from './run-9C2ogsuu.mjs';
5
5
  import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-HydRNEt7.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
@@ -3,7 +3,7 @@ import { mkdirSync, writeFileSync, unlinkSync, existsSync, chmodSync, readFileSy
3
3
  import { join } from 'path';
4
4
  import { homedir, platform, arch } from 'os';
5
5
  import { createHash, randomUUID } from 'crypto';
6
- import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-Ci6VToZR.mjs';
6
+ import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-9C2ogsuu.mjs';
7
7
  import 'fs/promises';
8
8
  import 'url';
9
9
  import 'node:crypto';
@@ -1,5 +1,5 @@
1
- import { F as resolveModel, O as describeMisconfiguration, P as buildMachineDeps } from './run-Ci6VToZR.mjs';
2
- import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-DE8X9tg3.mjs';
1
+ import { F as resolveModel, O as describeMisconfiguration, P as buildMachineDeps } from './run-9C2ogsuu.mjs';
2
+ import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-BHWq1P8E.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-Ci6VToZR.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-9C2ogsuu.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.117";
2
+ var version = "0.2.118";
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";
@@ -2676,7 +2676,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
2676
2676
  const tunnels = handlers.tunnels;
2677
2677
  if (!tunnels) throw new Error("Tunnel management not available");
2678
2678
  if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
2679
- const { FrpcTunnel } = await import('./frpc-63NvAmuT.mjs');
2679
+ const { FrpcTunnel } = await import('./frpc-CdcXdQde.mjs');
2680
2680
  const tunnel = new FrpcTunnel({
2681
2681
  name: params.name,
2682
2682
  ports: params.ports,
@@ -2937,7 +2937,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
2937
2937
  }
2938
2938
  const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
2939
2939
  const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
2940
- const { toolsForRole } = await import('./sideband-DE8X9tg3.mjs');
2940
+ const { toolsForRole } = await import('./sideband-BHWq1P8E.mjs');
2941
2941
  const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
2942
2942
  return fmt(r2);
2943
2943
  }
@@ -3036,7 +3036,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
3036
3036
  if (r.error || !r.sender) return { error: r.error || "unauthorized" };
3037
3037
  const callId = "call_" + Math.random().toString(16).slice(2, 12);
3038
3038
  const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
3039
- const { queryCore } = await import('./commands-BxXUQlBD.mjs');
3039
+ const { queryCore } = await import('./commands-B5rek8XG.mjs');
3040
3040
  const timeout = c.reply?.timeout_sec || 120;
3041
3041
  let result;
3042
3042
  try {
@@ -9998,6 +9998,21 @@ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata
9998
9998
  logger.log(`[svampConfig] Session link updated: "${label}" \u2192 ${url}`);
9999
9999
  }
10000
10000
  }
10001
+ if (config.crew === null) {
10002
+ if (meta.crew) {
10003
+ setMetadata((m) => {
10004
+ const next = { ...m };
10005
+ delete next.crew;
10006
+ return next;
10007
+ });
10008
+ logger.log(`[svampConfig] crew role cleared`);
10009
+ }
10010
+ } else if (config.crew && typeof config.crew === "object") {
10011
+ if (JSON.stringify(meta.crew) !== JSON.stringify(config.crew)) {
10012
+ setMetadata((m) => ({ ...m, crew: config.crew }));
10013
+ logger.log(`[svampConfig] crew role updated: ${config.crew.role}`);
10014
+ }
10015
+ }
10001
10016
  }
10002
10017
  const configChecker = () => {
10003
10018
  try {
@@ -10581,7 +10596,7 @@ async function startDaemon(options) {
10581
10596
  const list = loadExposedTunnels().filter((t) => t.name !== name);
10582
10597
  saveExposedTunnels(list);
10583
10598
  }
10584
- const { ServeManager } = await import('./serveManager-DUjR8RGw.mjs');
10599
+ const { ServeManager } = await import('./serveManager-XsXnI804.mjs');
10585
10600
  const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
10586
10601
  ensureAutoInstalledSkills(logger).catch(() => {
10587
10602
  });
@@ -13093,7 +13108,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
13093
13108
  const specs = loadExposedTunnels();
13094
13109
  if (specs.length === 0) return;
13095
13110
  logger.log(`[exposed-tunnels] Restoring ${specs.length} tunnel(s) from ${EXPOSED_TUNNELS_FILE}`);
13096
- const { FrpcTunnel } = await import('./frpc-63NvAmuT.mjs');
13111
+ const { FrpcTunnel } = await import('./frpc-CdcXdQde.mjs');
13097
13112
  for (const spec of specs) {
13098
13113
  if (tunnels.has(spec.name)) continue;
13099
13114
  try {
@@ -1,4 +1,4 @@
1
- import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { n as shortId, c as connectToHypha, a as createSessionStore, r as registerMachineService, Q as generateHookSettings } from './run-Ci6VToZR.mjs';
1
+ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { n as shortId, c as connectToHypha, a as createSessionStore, r as registerMachineService, Q as generateHookSettings } from './run-9C2ogsuu.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';
@@ -54,7 +54,7 @@ async function handleServeCommand() {
54
54
  }
55
55
  }
56
56
  async function serveAdd(args, machineId) {
57
- const { connectAndGetMachine } = await import('./commands-BxXUQlBD.mjs');
57
+ const { connectAndGetMachine } = await import('./commands-B5rek8XG.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-BxXUQlBD.mjs');
96
+ const { connectAndGetMachine } = await import('./commands-B5rek8XG.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-BxXUQlBD.mjs');
185
+ const { connectAndGetMachine } = await import('./commands-B5rek8XG.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-BxXUQlBD.mjs');
205
+ const { connectAndGetMachine } = await import('./commands-B5rek8XG.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-BxXUQlBD.mjs');
238
+ const { connectAndGetMachine } = await import('./commands-B5rek8XG.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-Ci6VToZR.mjs';
7
+ import { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run-9C2ogsuu.mjs';
8
8
  import 'os';
9
9
  import 'fs/promises';
10
10
  import 'url';
@@ -713,7 +713,7 @@ class ServeManager {
713
713
  const mount = this.mounts.get(mountName);
714
714
  const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, `static-${subdomainSafe}-${mount.linkToken}`]]) : void 0;
715
715
  try {
716
- const { FrpcTunnel } = await import('./frpc-63NvAmuT.mjs');
716
+ const { FrpcTunnel } = await import('./frpc-CdcXdQde.mjs');
717
717
  let tunnel;
718
718
  tunnel = new FrpcTunnel({
719
719
  name: tunnelName,
@@ -1,4 +1,4 @@
1
- import { A as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-Ci6VToZR.mjs';
1
+ import { A as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-9C2ogsuu.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.117",
3
+ "version": "0.2.118",
4
4
  "description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
5
5
  "author": "Amun AI AB",
6
6
  "license": "SEE LICENSE IN LICENSE",