svamp-cli 0.2.114 → 0.2.116

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.2
3
+ version: 0.3.3
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,6 +71,9 @@ 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() } : {}),
74
77
  oracle: oracle ? { command: oracle, timeout_sec: 600 } : null,
75
78
  evaluator: { enabled: evaluatorOn, model },
76
79
  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-aNUfTpRW.mjs';
5
+ import { n as shortId } from './run-DHPCWQUq.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-aNUfTpRW.mjs').then(function (n) { return n.T; });
99
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-DHPCWQUq.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-C29ciVUe.mjs');
183
+ const { connectAndGetMachine } = await import('./commands-DdW5M7Le.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-C29ciVUe.mjs');
200
+ const { resolveSessionId } = await import('./commands-DdW5M7Le.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-aNUfTpRW.mjs';
1
+ import { F as resolveModel } from './run-DHPCWQUq.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-aNUfTpRW.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-DHPCWQUq.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-aNUfTpRW.mjs').then(function (n) { return n._; });
37
+ const { getLoadedConfig } = await import('./run-DHPCWQUq.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-aNUfTpRW.mjs').then(function (n) { return n.a0; });
54
+ const { restartDaemon } = await import('./run-DHPCWQUq.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-BYBzqLJZ.mjs');
347
+ const { handleServiceCommand } = await import('./commands-C1ERmRw4.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-BoFSdzkv.mjs');
355
+ const { handleServeCommand } = await import('./serveCommands-D9KR-bC5.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-BBQI_6EM.mjs');
364
+ const { processCommand } = await import('./commands-C0715MEC.mjs');
365
365
  let machineId;
366
366
  const processArgs = args.slice(1);
367
367
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -375,7 +375,7 @@ async function main() {
375
375
  }), machineId);
376
376
  process.exit(0);
377
377
  } else if (subcommand === "routine" || subcommand === "routines") {
378
- const { routineCommand } = await import('./commands-1DLUHWZ5.mjs');
378
+ const { routineCommand } = await import('./commands-ClxBUkI3.mjs');
379
379
  await routineCommand(args.slice(1));
380
380
  process.exit(0);
381
381
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
@@ -386,7 +386,7 @@ async function main() {
386
386
  } else if (!subcommand || subcommand === "start") {
387
387
  await handleInteractiveCommand();
388
388
  } else if (subcommand === "--version" || subcommand === "-v") {
389
- const pkg = await import('./package-PUmSILNZ.mjs').catch(() => ({ default: { version: "unknown" } }));
389
+ const pkg = await import('./package-BdLUrz6e.mjs').catch(() => ({ default: { version: "unknown" } }));
390
390
  console.log(`svamp version: ${pkg.default.version}`);
391
391
  } else {
392
392
  console.error(`Unknown command: ${subcommand}`);
@@ -395,7 +395,7 @@ async function main() {
395
395
  }
396
396
  }
397
397
  async function handleInteractiveCommand() {
398
- const { runInteractive } = await import('./run-CiiUhPNf.mjs');
398
+ const { runInteractive } = await import('./run-DnGdMH2k.mjs');
399
399
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
400
400
  let directory = process.cwd();
401
401
  let resumeSessionId;
@@ -440,7 +440,7 @@ async function handleAgentCommand() {
440
440
  return;
441
441
  }
442
442
  if (agentArgs[0] === "list") {
443
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.W; });
443
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-DHPCWQUq.mjs').then(function (n) { return n.W; });
444
444
  console.log("Known agents:");
445
445
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
446
446
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -452,7 +452,7 @@ async function handleAgentCommand() {
452
452
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
453
453
  return;
454
454
  }
455
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.W; });
455
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-DHPCWQUq.mjs').then(function (n) { return n.W; });
456
456
  let cwd = process.cwd();
457
457
  const filteredArgs = [];
458
458
  for (let i = 0; i < agentArgs.length; i++) {
@@ -476,12 +476,12 @@ async function handleAgentCommand() {
476
476
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
477
477
  let backend;
478
478
  if (KNOWN_MCP_AGENTS[config.agentName]) {
479
- const { CodexMcpBackend } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.X; });
479
+ const { CodexMcpBackend } = await import('./run-DHPCWQUq.mjs').then(function (n) { return n.X; });
480
480
  backend = new CodexMcpBackend({ cwd, log: logFn });
481
481
  } else {
482
- const { AcpBackend } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.V; });
483
- const { GeminiTransport } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.Y; });
484
- const { DefaultTransport } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.U; });
482
+ const { AcpBackend } = await import('./run-DHPCWQUq.mjs').then(function (n) { return n.V; });
483
+ const { GeminiTransport } = await import('./run-DHPCWQUq.mjs').then(function (n) { return n.Y; });
484
+ const { DefaultTransport } = await import('./run-DHPCWQUq.mjs').then(function (n) { return n.U; });
485
485
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
486
486
  backend = new AcpBackend({
487
487
  agentName: config.agentName,
@@ -608,7 +608,7 @@ async function handleSessionCommand() {
608
608
  process.exit(1);
609
609
  }
610
610
  }
611
- 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-C29ciVUe.mjs');
611
+ 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-DdW5M7Le.mjs');
612
612
  const parseFlagStr = (flag, shortFlag) => {
613
613
  for (let i = 1; i < sessionArgs.length; i++) {
614
614
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -676,7 +676,7 @@ async function handleSessionCommand() {
676
676
  allowDomain.push(sessionArgs[++i]);
677
677
  }
678
678
  }
679
- const { parseShareArg } = await import('./commands-C29ciVUe.mjs');
679
+ const { parseShareArg } = await import('./commands-DdW5M7Le.mjs');
680
680
  const shareEntries = share.map((s) => parseShareArg(s));
681
681
  await sessionSpawn(agent, dir, targetMachineId, {
682
682
  message,
@@ -763,7 +763,7 @@ async function handleSessionCommand() {
763
763
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
764
764
  process.exit(1);
765
765
  }
766
- const { sessionQuery } = await import('./commands-C29ciVUe.mjs');
766
+ const { sessionQuery } = await import('./commands-DdW5M7Le.mjs');
767
767
  await sessionQuery(dir, prompt, targetMachineId, {
768
768
  timeout: parseFlagInt("--timeout"),
769
769
  json: hasFlag("--json"),
@@ -796,7 +796,7 @@ async function handleSessionCommand() {
796
796
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
797
797
  process.exit(1);
798
798
  }
799
- const { sessionApprove } = await import('./commands-C29ciVUe.mjs');
799
+ const { sessionApprove } = await import('./commands-DdW5M7Le.mjs');
800
800
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
801
801
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
802
802
  json: hasFlag("--json")
@@ -806,7 +806,7 @@ async function handleSessionCommand() {
806
806
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
807
807
  process.exit(1);
808
808
  }
809
- const { sessionDeny } = await import('./commands-C29ciVUe.mjs');
809
+ const { sessionDeny } = await import('./commands-DdW5M7Le.mjs');
810
810
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
811
811
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
812
812
  json: hasFlag("--json")
@@ -841,7 +841,7 @@ async function handleSessionCommand() {
841
841
  console.error("Usage: svamp session set-title <title>");
842
842
  process.exit(1);
843
843
  }
844
- const { sessionSetTitle } = await import('./agentCommands-D53qtjbo.mjs');
844
+ const { sessionSetTitle } = await import('./agentCommands--H31qHbm.mjs');
845
845
  await sessionSetTitle(title);
846
846
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
847
847
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -849,7 +849,7 @@ async function handleSessionCommand() {
849
849
  console.error("Usage: svamp session set-project-description <text>");
850
850
  process.exit(1);
851
851
  }
852
- const { sessionSetProjectDescription } = await import('./agentCommands-D53qtjbo.mjs');
852
+ const { sessionSetProjectDescription } = await import('./agentCommands--H31qHbm.mjs');
853
853
  await sessionSetProjectDescription(desc);
854
854
  } else if (sessionSubcommand === "set-link") {
855
855
  const url = sessionArgs[1];
@@ -858,7 +858,7 @@ async function handleSessionCommand() {
858
858
  process.exit(1);
859
859
  }
860
860
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
861
- const { sessionSetLink } = await import('./agentCommands-D53qtjbo.mjs');
861
+ const { sessionSetLink } = await import('./agentCommands--H31qHbm.mjs');
862
862
  await sessionSetLink(url, label);
863
863
  } else if (sessionSubcommand === "notify") {
864
864
  const message = sessionArgs[1];
@@ -867,7 +867,7 @@ async function handleSessionCommand() {
867
867
  process.exit(1);
868
868
  }
869
869
  const level = parseFlagStr("--level") || "info";
870
- const { sessionNotify } = await import('./agentCommands-D53qtjbo.mjs');
870
+ const { sessionNotify } = await import('./agentCommands--H31qHbm.mjs');
871
871
  await sessionNotify(message, level);
872
872
  } else if (sessionSubcommand === "broadcast") {
873
873
  const action = sessionArgs[1];
@@ -875,7 +875,7 @@ async function handleSessionCommand() {
875
875
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
876
876
  process.exit(1);
877
877
  }
878
- const { sessionBroadcast } = await import('./agentCommands-D53qtjbo.mjs');
878
+ const { sessionBroadcast } = await import('./agentCommands--H31qHbm.mjs');
879
879
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
880
880
  } else if (sessionSubcommand === "inbox") {
881
881
  const inboxSubcmd = sessionArgs[1];
@@ -886,7 +886,7 @@ async function handleSessionCommand() {
886
886
  process.exit(1);
887
887
  }
888
888
  if (agentSessionId) {
889
- const { inboxSend } = await import('./agentCommands-D53qtjbo.mjs');
889
+ const { inboxSend } = await import('./agentCommands--H31qHbm.mjs');
890
890
  await inboxSend(sessionArgs[2], {
891
891
  body: sessionArgs[3],
892
892
  subject: parseFlagStr("--subject"),
@@ -901,7 +901,7 @@ async function handleSessionCommand() {
901
901
  }
902
902
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
903
903
  if (agentSessionId && !sessionArgs[2]) {
904
- const { inboxList } = await import('./agentCommands-D53qtjbo.mjs');
904
+ const { inboxList } = await import('./agentCommands--H31qHbm.mjs');
905
905
  await inboxList({
906
906
  unread: hasFlag("--unread"),
907
907
  limit: parseFlagInt("--limit"),
@@ -923,7 +923,7 @@ async function handleSessionCommand() {
923
923
  process.exit(1);
924
924
  }
925
925
  if (agentSessionId && !sessionArgs[3]) {
926
- const { inboxList } = await import('./agentCommands-D53qtjbo.mjs');
926
+ const { inboxList } = await import('./agentCommands--H31qHbm.mjs');
927
927
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
928
928
  } else if (sessionArgs[3]) {
929
929
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -933,7 +933,7 @@ async function handleSessionCommand() {
933
933
  }
934
934
  } else if (inboxSubcmd === "reply") {
935
935
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
936
- const { inboxReply } = await import('./agentCommands-D53qtjbo.mjs');
936
+ const { inboxReply } = await import('./agentCommands--H31qHbm.mjs');
937
937
  await inboxReply(sessionArgs[2], sessionArgs[3]);
938
938
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
939
939
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -969,7 +969,7 @@ async function handleMachineCommand() {
969
969
  return;
970
970
  }
971
971
  if (machineSubcommand === "share") {
972
- const { machineShare } = await import('./commands-C29ciVUe.mjs');
972
+ const { machineShare } = await import('./commands-DdW5M7Le.mjs');
973
973
  let machineId;
974
974
  const shareArgs = [];
975
975
  for (let i = 1; i < machineArgs.length; i++) {
@@ -999,7 +999,7 @@ async function handleMachineCommand() {
999
999
  }
1000
1000
  await machineShare(machineId, { add, remove, list, configPath, showConfig });
1001
1001
  } else if (machineSubcommand === "exec") {
1002
- const { machineExec } = await import('./commands-C29ciVUe.mjs');
1002
+ const { machineExec } = await import('./commands-DdW5M7Le.mjs');
1003
1003
  let machineId;
1004
1004
  let cwd;
1005
1005
  const cmdParts = [];
@@ -1019,7 +1019,7 @@ async function handleMachineCommand() {
1019
1019
  }
1020
1020
  await machineExec(machineId, command, cwd);
1021
1021
  } else if (machineSubcommand === "info") {
1022
- const { machineInfo } = await import('./commands-C29ciVUe.mjs');
1022
+ const { machineInfo } = await import('./commands-DdW5M7Le.mjs');
1023
1023
  let machineId;
1024
1024
  for (let i = 1; i < machineArgs.length; i++) {
1025
1025
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1039,10 +1039,10 @@ async function handleMachineCommand() {
1039
1039
  level = machineArgs[++i];
1040
1040
  }
1041
1041
  }
1042
- const { machineNotify } = await import('./agentCommands-D53qtjbo.mjs');
1042
+ const { machineNotify } = await import('./agentCommands--H31qHbm.mjs');
1043
1043
  await machineNotify(message, level);
1044
1044
  } else if (machineSubcommand === "ls") {
1045
- const { machineLs } = await import('./commands-C29ciVUe.mjs');
1045
+ const { machineLs } = await import('./commands-DdW5M7Le.mjs');
1046
1046
  let machineId;
1047
1047
  let showHidden = false;
1048
1048
  let path;
@@ -1100,24 +1100,24 @@ Examples:
1100
1100
  };
1101
1101
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1102
1102
  if (sub === "status") {
1103
- const { fleetStatus } = await import('./fleet--CAdje9C.mjs');
1103
+ const { fleetStatus } = await import('./fleet-js8FwhM_.mjs');
1104
1104
  await fleetStatus();
1105
1105
  } else if (sub === "exec") {
1106
1106
  const command = fleetArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1107
- const { fleetExec } = await import('./fleet--CAdje9C.mjs');
1107
+ const { fleetExec } = await import('./fleet-js8FwhM_.mjs');
1108
1108
  await fleetExec(command, { cwd: flag("cwd") });
1109
1109
  } else if (sub === "upgrade-claude") {
1110
- const { fleetUpgradeClaude } = await import('./fleet--CAdje9C.mjs');
1110
+ const { fleetUpgradeClaude } = await import('./fleet-js8FwhM_.mjs');
1111
1111
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1112
1112
  } else if (sub === "upgrade-svamp") {
1113
- const { fleetUpgradeSvamp } = await import('./fleet--CAdje9C.mjs');
1113
+ const { fleetUpgradeSvamp } = await import('./fleet-js8FwhM_.mjs');
1114
1114
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
1115
1115
  } else if (sub === "daemon-restart") {
1116
- const { fleetDaemonRestart } = await import('./fleet--CAdje9C.mjs');
1116
+ const { fleetDaemonRestart } = await import('./fleet-js8FwhM_.mjs');
1117
1117
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1118
1118
  } else if (sub === "push-skill") {
1119
1119
  const name = fleetArgs[1];
1120
- const { fleetPushSkill } = await import('./fleet--CAdje9C.mjs');
1120
+ const { fleetPushSkill } = await import('./fleet-js8FwhM_.mjs');
1121
1121
  await fleetPushSkill(name);
1122
1122
  } else {
1123
1123
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1133,7 +1133,7 @@ async function handleSkillsCommand() {
1133
1133
  await printSkillsHelp();
1134
1134
  return;
1135
1135
  }
1136
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-BcIz9gl2.mjs');
1136
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-zMw02qH_.mjs');
1137
1137
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1138
1138
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1139
1139
  if (!query) {
@@ -1180,7 +1180,7 @@ async function loginToHypha() {
1180
1180
  process.exit(1);
1181
1181
  }
1182
1182
  const anchor = anchorArg.replace(/\/+$/, "");
1183
- const { loadInstanceConfig } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n._; });
1183
+ const { loadInstanceConfig } = await import('./run-DHPCWQUq.mjs').then(function (n) { return n._; });
1184
1184
  let cfg = null;
1185
1185
  try {
1186
1186
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1291,7 +1291,7 @@ async function logoutFromHypha() {
1291
1291
  } catch {
1292
1292
  }
1293
1293
  try {
1294
- const { clearInstanceConfigCache } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n._; });
1294
+ const { clearInstanceConfigCache } = await import('./run-DHPCWQUq.mjs').then(function (n) { return n._; });
1295
1295
  clearInstanceConfigCache();
1296
1296
  } catch {
1297
1297
  }
@@ -1622,7 +1622,7 @@ async function applyClaudeAuthFlags(argv) {
1622
1622
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1623
1623
  );
1624
1624
  }
1625
- const mod = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.Z; });
1625
+ const mod = await import('./run-DHPCWQUq.mjs').then(function (n) { return n.Z; });
1626
1626
  if (hasHypha) {
1627
1627
  let url;
1628
1628
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1676,7 +1676,7 @@ async function applyDaemonShareFlag(argv) {
1676
1676
  }
1677
1677
  }
1678
1678
  if (collected.length === 0) return;
1679
- const { updateEnvFile } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.Z; });
1679
+ const { updateEnvFile } = await import('./run-DHPCWQUq.mjs').then(function (n) { return n.Z; });
1680
1680
  const seen = /* @__PURE__ */ new Set();
1681
1681
  const deduped = collected.filter((e) => {
1682
1682
  const k = e.toLowerCase();
@@ -1709,7 +1709,7 @@ async function handleWiseAgentCommand(rest) {
1709
1709
  }
1710
1710
  });
1711
1711
  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(" ");
1712
- const { wiseAskCli } = await import('./commands-C29ciVUe.mjs');
1712
+ const { wiseAskCli } = await import('./commands-DdW5M7Le.mjs');
1713
1713
  await wiseAskCli(machineId, message, sessionId, { json });
1714
1714
  return;
1715
1715
  }
@@ -1721,7 +1721,7 @@ async function handleWiseAgentCommand(rest) {
1721
1721
  }
1722
1722
  return void 0;
1723
1723
  };
1724
- const { runWiseVoiceCli } = await import('./headlessCli-C6MzdWRW.mjs');
1724
+ const { runWiseVoiceCli } = await import('./headlessCli-my-nvBDO.mjs');
1725
1725
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1726
1726
  return;
1727
1727
  }
@@ -1763,7 +1763,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1763
1763
  return;
1764
1764
  }
1765
1765
  const authArgs = rest.slice(1);
1766
- const mod = await import('./auth-Ykv_kVPM.mjs');
1766
+ const mod = await import('./auth-CUzGJvRf.mjs');
1767
1767
  let action;
1768
1768
  try {
1769
1769
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1773,7 +1773,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1773
1773
  return;
1774
1774
  }
1775
1775
  if (action) {
1776
- const { updateEnvFile } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.Z; });
1776
+ const { updateEnvFile } = await import('./run-DHPCWQUq.mjs').then(function (n) { return n.Z; });
1777
1777
  const updates = mod.buildWiseAgentEnvUpdates(action);
1778
1778
  updateEnvFile(updates);
1779
1779
  for (const [k, v] of Object.entries(updates)) {
@@ -1787,7 +1787,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1787
1787
  }
1788
1788
  async function handleDaemonAuthCommand(argv) {
1789
1789
  const sub = (argv[0] || "status").toLowerCase();
1790
- const mod = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.Z; });
1790
+ const mod = await import('./run-DHPCWQUq.mjs').then(function (n) { return n.Z; });
1791
1791
  if (sub === "--help" || sub === "-h" || sub === "help") {
1792
1792
  console.log(`
1793
1793
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2090,7 +2090,7 @@ Examples:
2090
2090
  async function printSkillsHelp() {
2091
2091
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2092
2092
  try {
2093
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.$; });
2093
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-DHPCWQUq.mjs').then(function (n) { return n.$; });
2094
2094
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2095
2095
  } catch {
2096
2096
  }
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-C29ciVUe.mjs';
3
+ import { connectAndGetMachine } from './commands-DdW5M7Le.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-aNUfTpRW.mjs';
8
+ import './run-DHPCWQUq.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -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-BjWZ129L.mjs');
61
+ const { runFrpcTunnel } = await import('./frpc-9qgaimIN.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-C29ciVUe.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-DdW5M7Le.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-BjWZ129L.mjs');
126
+ const { runFrpcTunnel } = await import('./frpc-9qgaimIN.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-C29ciVUe.mjs');
135
+ const { connectAndGetMachine } = await import('./commands-DdW5M7Le.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-C29ciVUe.mjs');
164
+ const { connectAndGetMachine } = await import('./commands-DdW5M7Le.mjs');
165
165
  const { server, machine } = await connectAndGetMachine();
166
166
  try {
167
167
  await machine.tunnelStop({ name });
@@ -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-aNUfTpRW.mjs';
3
+ import { R as RoutineStore, m as RoutineRunner } from './run-DHPCWQUq.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
6
6
  import 'fs';
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
2
2
  import { execSync } from 'node:child_process';
3
3
  import { basename, resolve, join } 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-aNUfTpRW.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-DHPCWQUq.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -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-aNUfTpRW.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-DHPCWQUq.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
@@ -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-aNUfTpRW.mjs';
4
+ import { c as connectToHypha } from './run-DHPCWQUq.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-aNUfTpRW.mjs';
6
+ import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-DHPCWQUq.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-aNUfTpRW.mjs';
2
- import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-BCKpph51.mjs';
1
+ import { F as resolveModel, O as describeMisconfiguration, P as buildMachineDeps } from './run-DHPCWQUq.mjs';
2
+ import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-CYNK4foC.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-aNUfTpRW.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-DHPCWQUq.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.114";
2
+ var version = "0.2.116";
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-BjWZ129L.mjs');
2679
+ const { FrpcTunnel } = await import('./frpc-9qgaimIN.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-BCKpph51.mjs');
2940
+ const { toolsForRole } = await import('./sideband-CYNK4foC.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-C29ciVUe.mjs');
3039
+ const { queryCore } = await import('./commands-DdW5M7Le.mjs');
3040
3040
  const timeout = c.reply?.timeout_sec || 120;
3041
3041
  let result;
3042
3042
  try {
@@ -9920,7 +9920,15 @@ function deactivateLoop(directory, sessionId) {
9920
9920
  } catch {
9921
9921
  }
9922
9922
  }
9923
- function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata, sessionService, logger, onLoopActivated) {
9923
+ function readLoopJson(directory, sessionId, file) {
9924
+ try {
9925
+ const p = join$1(getLoopDir(directory, sessionId), file);
9926
+ return existsSync$1(p) ? JSON.parse(readFileSync$1(p, "utf-8")) : null;
9927
+ } catch {
9928
+ return null;
9929
+ }
9930
+ }
9931
+ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata, sessionService, logger, onLoopActivated, onSupervisionVerdict) {
9924
9932
  const configPath = getSvampConfigPath(directory, sessionId);
9925
9933
  let lastConfigContent = "";
9926
9934
  if (existsSync$1(configPath)) {
@@ -10009,6 +10017,27 @@ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata
10009
10017
  "event"
10010
10018
  );
10011
10019
  logger.log(`[svampConfig] ${s.phase === "done" ? "Loop complete" : "Loop gave up"} (iter ${iter})`);
10020
+ try {
10021
+ const cfg = readLoopJson(directory, sessionId, "loop.config.json") || {};
10022
+ const ev = readLoopJson(directory, sessionId, "evaluator-verdict.json") || {};
10023
+ const verdict = {
10024
+ type: "supervision:verdict",
10025
+ sessionId,
10026
+ round: iter,
10027
+ verdict: s.phase === "done" ? "approved" : "rework",
10028
+ criteria: typeof cfg.criteria === "string" ? cfg.criteria : "",
10029
+ judge: cfg.evaluator?.enabled !== false ? "agent" : cfg.oracle ? "oracle" : "agent",
10030
+ ...s.phase === "gave_up" ? { guidance: s.gave_up_reason || "gave up before meeting the criteria" } : ev.guidance ? { guidance: String(ev.guidance) } : {},
10031
+ ts: (/* @__PURE__ */ new Date()).toISOString()
10032
+ };
10033
+ try {
10034
+ const vp = join$1(getLoopDir(directory, sessionId), "supervisor-verdict.json");
10035
+ writeFileSync$1(vp, JSON.stringify(verdict, null, 2));
10036
+ } catch {
10037
+ }
10038
+ onSupervisionVerdict?.(verdict);
10039
+ } catch {
10040
+ }
10012
10041
  } catch {
10013
10042
  }
10014
10043
  };
@@ -10064,6 +10093,53 @@ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata
10064
10093
  const { loop: _, ...restPatch } = patch;
10065
10094
  patch = restPatch;
10066
10095
  }
10096
+ if ("supervisor" in patch) {
10097
+ const sup = patch.supervisor;
10098
+ if (sup && typeof sup === "object" && typeof sup.criteria === "string" && sup.criteria.trim()) {
10099
+ const criteria = sup.criteria.trim();
10100
+ const judges = Array.isArray(sup.judges) ? sup.judges : [];
10101
+ const oracleJudge = judges.find((j) => j?.type === "oracle");
10102
+ const oracle = oracleJudge && typeof oracleJudge.cmd === "string" && oracleJudge.cmd.trim() ? oracleJudge.cmd.trim() : typeof sup.oracle === "string" && sup.oracle.trim() ? sup.oracle.trim() : void 0;
10103
+ const hasAgentJudge = judges.length === 0 || judges.some((j) => j?.type === "agent");
10104
+ const maxRounds = typeof sup.max_rounds === "number" ? sup.max_rounds : 20;
10105
+ const ok = initLoop(directory, {
10106
+ task: criteria,
10107
+ // P1: criteria seeds LOOP.md as the goal (skill carries it as config.criteria in #30)
10108
+ criteria,
10109
+ oracle,
10110
+ maxIterations: maxRounds,
10111
+ evaluator: hasAgentJudge,
10112
+ sessionId
10113
+ });
10114
+ if (ok) {
10115
+ const judgeLabel = judges.length ? judges.map((j) => j.type).join("\u2192") : "agent";
10116
+ const idle = getMetadata().lifecycleState === "idle";
10117
+ if (idle) {
10118
+ const existingQueue = getMetadata().messageQueue || [];
10119
+ const nudge = `You are now under supervision. Success criteria: ${criteria}
10120
+ Continue working until they are met, or verify and finish \u2014 an independent Stop gate will re-check before you can stop.`;
10121
+ setMetadata((m) => ({ ...m, messageQueue: [...existingQueue, { id: randomUUID$1(), text: nudge, displayText: `\u{1F441} Supervisor attached`, createdAt: Date.now() }] }));
10122
+ onLoopActivated?.();
10123
+ }
10124
+ sessionService.pushMessage(
10125
+ { type: "message", message: `\u{1F441} Supervisor attached \u2014 judges: ${judgeLabel}, max ${maxRounds}. Criteria: ${criteria.slice(0, 120)}${criteria.length > 120 ? "\u2026" : ""}` },
10126
+ "event"
10127
+ );
10128
+ logger.log(`[svampConfig] Supervisor attached (judges: ${judgeLabel}, max ${maxRounds})`);
10129
+ } else {
10130
+ sessionService.pushMessage(
10131
+ { type: "message", message: "Failed to attach supervisor \u2014 the loop skill could not be located. Reinstall with: svamp skills install loop --force", level: "error" },
10132
+ "event"
10133
+ );
10134
+ }
10135
+ } else {
10136
+ deactivateLoop(directory, sessionId);
10137
+ sessionService.pushMessage({ type: "message", message: "Supervisor detached." }, "event");
10138
+ logger.log(`[svampConfig] Supervisor detached`);
10139
+ }
10140
+ const { supervisor: _s, ...restPatch } = patch;
10141
+ patch = restPatch;
10142
+ }
10067
10143
  if (Object.keys(patch).length > 0) {
10068
10144
  const config = readSvampConfig(configPath);
10069
10145
  for (const [key, value] of Object.entries(patch)) {
@@ -10491,7 +10567,7 @@ async function startDaemon(options) {
10491
10567
  const list = loadExposedTunnels().filter((t) => t.name !== name);
10492
10568
  saveExposedTunnels(list);
10493
10569
  }
10494
- const { ServeManager } = await import('./serveManager-DrPFeC2o.mjs');
10570
+ const { ServeManager } = await import('./serveManager-B19qVJeZ.mjs');
10495
10571
  const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
10496
10572
  ensureAutoInstalledSkills(logger).catch(() => {
10497
10573
  });
@@ -10521,6 +10597,31 @@ async function startDaemon(options) {
10521
10597
  logger.log(`Hypha connection permanently lost: ${reason}. Daemon continues running \u2014 restart manually to reconnect.`);
10522
10598
  });
10523
10599
  const pidToTrackedSession = /* @__PURE__ */ new Map();
10600
+ const routeSupervisionVerdict = (parentId, v) => {
10601
+ try {
10602
+ if (!parentId) return;
10603
+ const parent = Array.from(pidToTrackedSession.values()).find((t) => t.svampSessionId === parentId);
10604
+ const send = parent?.sessionRPCHandlers?.sendInboxMessage;
10605
+ if (!send) return;
10606
+ Promise.resolve(send({
10607
+ messageId: randomUUID$1(),
10608
+ from: `agent:${v.sessionId}`,
10609
+ fromSession: v.sessionId,
10610
+ to: parentId,
10611
+ subject: `supervision: ${v.verdict} (child ${v.sessionId.slice(0, 8)})`,
10612
+ body: `<supervision-verdict child="${v.sessionId}" verdict="${v.verdict}" round="${v.round}" judge="${v.judge}">
10613
+ ${v.guidance ? v.guidance + "\n" : ""}Criteria: ${v.criteria || "(none)"}
10614
+ </supervision-verdict>`,
10615
+ timestamp: Date.now(),
10616
+ read: false,
10617
+ urgency: "normal",
10618
+ hopCount: 1
10619
+ })).catch(() => {
10620
+ });
10621
+ logger.log(`[supervision] verdict '${v.verdict}' for ${v.sessionId.slice(0, 8)} \u2192 parent ${parentId.slice(0, 8)}`);
10622
+ } catch {
10623
+ }
10624
+ };
10524
10625
  server.on("services_registered", () => {
10525
10626
  if (consecutiveHeartbeatFailures > 0) {
10526
10627
  logger.log(`Hypha reconnection successful \u2014 services re-registered (resetting ${consecutiveHeartbeatFailures} failures)`);
@@ -12084,7 +12185,8 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
12084
12185
  logger,
12085
12186
  () => {
12086
12187
  if (!trackedSession?.stopped) setTimeout(() => processMessageQueueRef?.(), 200);
12087
- }
12188
+ },
12189
+ (v) => routeSupervisionVerdict(sessionMetadata.parentSessionId, v)
12088
12190
  );
12089
12191
  checkSvampConfig = svampConfig.check;
12090
12192
  cleanupSvampConfig = svampConfig.cleanup;
@@ -12581,7 +12683,8 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
12581
12683
  }
12582
12684
  });
12583
12685
  }
12584
- }
12686
+ },
12687
+ (v) => routeSupervisionVerdict(sessionMetadata.parentSessionId, v)
12585
12688
  );
12586
12689
  const checkSvampConfig = svampConfigChecker.check;
12587
12690
  const writeSvampConfigPatchAcp = svampConfigChecker.writeConfig;
@@ -12976,7 +13079,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
12976
13079
  const specs = loadExposedTunnels();
12977
13080
  if (specs.length === 0) return;
12978
13081
  logger.log(`[exposed-tunnels] Restoring ${specs.length} tunnel(s) from ${EXPOSED_TUNNELS_FILE}`);
12979
- const { FrpcTunnel } = await import('./frpc-BjWZ129L.mjs');
13082
+ const { FrpcTunnel } = await import('./frpc-9qgaimIN.mjs');
12980
13083
  for (const spec of specs) {
12981
13084
  if (tunnels.has(spec.name)) continue;
12982
13085
  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-aNUfTpRW.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-DHPCWQUq.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-C29ciVUe.mjs');
57
+ const { connectAndGetMachine } = await import('./commands-DdW5M7Le.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-C29ciVUe.mjs');
96
+ const { connectAndGetMachine } = await import('./commands-DdW5M7Le.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-C29ciVUe.mjs');
185
+ const { connectAndGetMachine } = await import('./commands-DdW5M7Le.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-C29ciVUe.mjs');
205
+ const { connectAndGetMachine } = await import('./commands-DdW5M7Le.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-C29ciVUe.mjs');
238
+ const { connectAndGetMachine } = await import('./commands-DdW5M7Le.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-aNUfTpRW.mjs';
7
+ import { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run-DHPCWQUq.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-BjWZ129L.mjs');
716
+ const { FrpcTunnel } = await import('./frpc-9qgaimIN.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-aNUfTpRW.mjs';
1
+ import { A as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-DHPCWQUq.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.114",
3
+ "version": "0.2.116",
4
4
  "description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
5
5
  "author": "Amun AI AB",
6
6
  "license": "SEE LICENSE IN LICENSE",