svamp-cli 0.2.101 → 0.2.103

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.2.0
3
+ version: 0.2.1
4
4
  description: Run a task as a reliable, self-verifying loop — iterate until objective exit conditions are met, with an independent evaluator instead of self-judging. Use when a task needs repeated iterations until "done" (fix until tests pass, refactor until clean, build until a spec is met, autonomous long-running work).
5
5
  ---
6
6
 
@@ -31,6 +31,10 @@ const evaluatorOn = args.evaluator !== 'off';
31
31
  const model = typeof args.model === 'string' ? args.model : null;
32
32
  const task = typeof args.task === 'string' ? args.task : '(describe the task here)';
33
33
  const criteria = typeof args.criteria === 'string' ? args.criteria : null;
34
+ // Owning session id, stamped into loop-state.json so the daemon can scope
35
+ // "loop active" (auto-approve / AskUserQuestion auto-dismiss / loop resume) to the
36
+ // session that started the loop instead of every session sharing this directory.
37
+ const sessionId = typeof args.session === 'string' ? args.session : null;
34
38
 
35
39
  const loopDir = join(dir, '.claude', 'loop');
36
40
  const binDir = join(loopDir, 'bin');
@@ -60,6 +64,7 @@ writeFileSync(join(loopDir, 'loop.config.json'), JSON.stringify(config, null, 2)
60
64
  // 3. loop-state.json (machine state, daemon/gate-owned)
61
65
  writeFileSync(join(loopDir, 'loop-state.json'), JSON.stringify({
62
66
  active: true, iteration: 0, phase: 'running', started_at: new Date().toISOString(),
67
+ ...(sessionId ? { session_id: sessionId } : {}),
63
68
  }, null, 2));
64
69
 
65
70
  // 4. LOOP.md (agent + human editable) — only if not present
@@ -148,7 +148,7 @@ async function sessionBroadcast(action, args) {
148
148
  console.log(`Broadcast sent: ${action}`);
149
149
  }
150
150
  async function connectToMachineService() {
151
- const { connectAndGetMachine } = await import('./commands-CdxEOPUt.mjs');
151
+ const { connectAndGetMachine } = await import('./commands-C_DlMpl7.mjs');
152
152
  return connectAndGetMachine();
153
153
  }
154
154
  async function inboxSend(targetSessionId, opts) {
@@ -165,7 +165,7 @@ async function inboxSend(targetSessionId, opts) {
165
165
  }
166
166
  const { server, machine } = await connectToMachineService();
167
167
  try {
168
- const { resolveSessionId } = await import('./commands-CdxEOPUt.mjs');
168
+ const { resolveSessionId } = await import('./commands-C_DlMpl7.mjs');
169
169
  const sessions = await machine.listSessions();
170
170
  const match = resolveSessionId(sessions, targetSessionId);
171
171
  const fullTargetId = match.sessionId;
@@ -233,8 +233,19 @@ async function inboxReply(messageId, body) {
233
233
  console.error(`Message ${messageId} not found in inbox.`);
234
234
  process.exit(1);
235
235
  }
236
+ if (original.channelId && original.correlationId) {
237
+ const rr = await machine.sessionRPC(sessionId, "channelReply", {
238
+ params: { channel: original.channelId, correlationId: original.correlationId, to: original.from, body }
239
+ });
240
+ if (rr?.error) {
241
+ console.error(`Channel reply failed: ${rr.error}`);
242
+ process.exit(1);
243
+ }
244
+ console.log(`Reply queued to "${original.from}" on channel ${original.channelId} (correlation ${original.correlationId}).`);
245
+ return;
246
+ }
236
247
  if (!original.fromSession) {
237
- console.error("Cannot reply: original message has no fromSession.");
248
+ console.error("Cannot reply: original message has no fromSession (and not a channel message).");
238
249
  process.exit(1);
239
250
  }
240
251
  const { randomUUID } = await import('node:crypto');
@@ -1,4 +1,4 @@
1
- import { E as resolveModel } from './run-CsMTSngP.mjs';
1
+ import { E as resolveModel } from './run-BmZjAEob.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -12,6 +12,7 @@ import 'util';
12
12
  import 'node:crypto';
13
13
  import 'node:path';
14
14
  import 'node:os';
15
+ import 'node:events';
15
16
  import '@agentclientprotocol/sdk';
16
17
  import '@modelcontextprotocol/sdk/client/index.js';
17
18
  import '@modelcontextprotocol/sdk/client/stdio.js';
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-CsMTSngP.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-BmZjAEob.mjs';
2
2
  import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
3
3
  import 'os';
4
4
  import 'fs/promises';
@@ -13,6 +13,7 @@ import 'util';
13
13
  import 'node:crypto';
14
14
  import 'node:path';
15
15
  import 'node:os';
16
+ import 'node:events';
16
17
  import '@agentclientprotocol/sdk';
17
18
  import '@modelcontextprotocol/sdk/client/index.js';
18
19
  import '@modelcontextprotocol/sdk/client/stdio.js';
@@ -33,7 +34,7 @@ const subcommand = args[0];
33
34
  let daemonSubcommand = args[1];
34
35
  async function main() {
35
36
  try {
36
- const { getLoadedConfig } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.Y; });
37
+ const { getLoadedConfig } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.Y; });
37
38
  getLoadedConfig();
38
39
  } catch {
39
40
  }
@@ -50,7 +51,7 @@ async function main() {
50
51
  console.error(`svamp daemon restart: ${err.message || err}`);
51
52
  process.exit(1);
52
53
  }
53
- const { restartDaemon } = await import('./run-CsMTSngP.mjs').then(function (n) { return n._; });
54
+ const { restartDaemon } = await import('./run-BmZjAEob.mjs').then(function (n) { return n._; });
54
55
  await restartDaemon();
55
56
  process.exit(0);
56
57
  }
@@ -343,7 +344,7 @@ async function main() {
343
344
  console.error("svamp service: Service commands are not available in sandboxed sessions.");
344
345
  process.exit(1);
345
346
  }
346
- const { handleServiceCommand } = await import('./commands-D-3h8H0C.mjs');
347
+ const { handleServiceCommand } = await import('./commands-BvJ_Dl1l.mjs');
347
348
  await handleServiceCommand();
348
349
  } else if (subcommand === "serve") {
349
350
  const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
@@ -351,7 +352,7 @@ async function main() {
351
352
  console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
352
353
  process.exit(1);
353
354
  }
354
- const { handleServeCommand } = await import('./serveCommands-Can8WtLI.mjs');
355
+ const { handleServeCommand } = await import('./serveCommands-zFOjNs-0.mjs');
355
356
  await handleServeCommand();
356
357
  process.exit(0);
357
358
  } else if (subcommand === "process" || subcommand === "proc") {
@@ -360,7 +361,7 @@ async function main() {
360
361
  console.error("svamp process: Process commands are not available in sandboxed sessions.");
361
362
  process.exit(1);
362
363
  }
363
- const { processCommand } = await import('./commands-B2uNdsyR.mjs');
364
+ const { processCommand } = await import('./commands-BXFukv2v.mjs');
364
365
  let machineId;
365
366
  const processArgs = args.slice(1);
366
367
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -374,7 +375,7 @@ async function main() {
374
375
  }), machineId);
375
376
  process.exit(0);
376
377
  } else if (subcommand === "routine" || subcommand === "routines") {
377
- const { routineCommand } = await import('./commands-Bxn_4u7d.mjs');
378
+ const { routineCommand } = await import('./commands-BGE6zFa1.mjs');
378
379
  await routineCommand(args.slice(1));
379
380
  process.exit(0);
380
381
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
@@ -385,7 +386,7 @@ async function main() {
385
386
  } else if (!subcommand || subcommand === "start") {
386
387
  await handleInteractiveCommand();
387
388
  } else if (subcommand === "--version" || subcommand === "-v") {
388
- const pkg = await import('./package-DHxiXJ3N.mjs').catch(() => ({ default: { version: "unknown" } }));
389
+ const pkg = await import('./package-fu3Jsw1q.mjs').catch(() => ({ default: { version: "unknown" } }));
389
390
  console.log(`svamp version: ${pkg.default.version}`);
390
391
  } else {
391
392
  console.error(`Unknown command: ${subcommand}`);
@@ -394,7 +395,7 @@ async function main() {
394
395
  }
395
396
  }
396
397
  async function handleInteractiveCommand() {
397
- const { runInteractive } = await import('./run-C7WSV8zx.mjs');
398
+ const { runInteractive } = await import('./run-DTOSfKSH.mjs');
398
399
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
399
400
  let directory = process.cwd();
400
401
  let resumeSessionId;
@@ -439,7 +440,7 @@ async function handleAgentCommand() {
439
440
  return;
440
441
  }
441
442
  if (agentArgs[0] === "list") {
442
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.U; });
443
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.U; });
443
444
  console.log("Known agents:");
444
445
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
445
446
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -451,7 +452,7 @@ async function handleAgentCommand() {
451
452
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
452
453
  return;
453
454
  }
454
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.U; });
455
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.U; });
455
456
  let cwd = process.cwd();
456
457
  const filteredArgs = [];
457
458
  for (let i = 0; i < agentArgs.length; i++) {
@@ -475,12 +476,12 @@ async function handleAgentCommand() {
475
476
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
476
477
  let backend;
477
478
  if (KNOWN_MCP_AGENTS[config.agentName]) {
478
- const { CodexMcpBackend } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.V; });
479
+ const { CodexMcpBackend } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.V; });
479
480
  backend = new CodexMcpBackend({ cwd, log: logFn });
480
481
  } else {
481
- const { AcpBackend } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.T; });
482
- const { GeminiTransport } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.W; });
483
- const { DefaultTransport } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.Q; });
482
+ const { AcpBackend } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.T; });
483
+ const { GeminiTransport } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.W; });
484
+ const { DefaultTransport } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.Q; });
484
485
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
485
486
  backend = new AcpBackend({
486
487
  agentName: config.agentName,
@@ -607,7 +608,7 @@ async function handleSessionCommand() {
607
608
  process.exit(1);
608
609
  }
609
610
  }
610
- 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-CdxEOPUt.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-C_DlMpl7.mjs');
611
612
  const parseFlagStr = (flag, shortFlag) => {
612
613
  for (let i = 1; i < sessionArgs.length; i++) {
613
614
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -675,7 +676,7 @@ async function handleSessionCommand() {
675
676
  allowDomain.push(sessionArgs[++i]);
676
677
  }
677
678
  }
678
- const { parseShareArg } = await import('./commands-CdxEOPUt.mjs');
679
+ const { parseShareArg } = await import('./commands-C_DlMpl7.mjs');
679
680
  const shareEntries = share.map((s) => parseShareArg(s));
680
681
  await sessionSpawn(agent, dir, targetMachineId, {
681
682
  message,
@@ -762,7 +763,7 @@ async function handleSessionCommand() {
762
763
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
763
764
  process.exit(1);
764
765
  }
765
- const { sessionQuery } = await import('./commands-CdxEOPUt.mjs');
766
+ const { sessionQuery } = await import('./commands-C_DlMpl7.mjs');
766
767
  await sessionQuery(dir, prompt, targetMachineId, {
767
768
  timeout: parseFlagInt("--timeout"),
768
769
  json: hasFlag("--json"),
@@ -795,7 +796,7 @@ async function handleSessionCommand() {
795
796
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
796
797
  process.exit(1);
797
798
  }
798
- const { sessionApprove } = await import('./commands-CdxEOPUt.mjs');
799
+ const { sessionApprove } = await import('./commands-C_DlMpl7.mjs');
799
800
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
800
801
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
801
802
  json: hasFlag("--json")
@@ -805,7 +806,7 @@ async function handleSessionCommand() {
805
806
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
806
807
  process.exit(1);
807
808
  }
808
- const { sessionDeny } = await import('./commands-CdxEOPUt.mjs');
809
+ const { sessionDeny } = await import('./commands-C_DlMpl7.mjs');
809
810
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
810
811
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
811
812
  json: hasFlag("--json")
@@ -840,7 +841,7 @@ async function handleSessionCommand() {
840
841
  console.error("Usage: svamp session set-title <title>");
841
842
  process.exit(1);
842
843
  }
843
- const { sessionSetTitle } = await import('./agentCommands-CAqLhLOH.mjs');
844
+ const { sessionSetTitle } = await import('./agentCommands-oHt9FQJt.mjs');
844
845
  await sessionSetTitle(title);
845
846
  } else if (sessionSubcommand === "set-link") {
846
847
  const url = sessionArgs[1];
@@ -849,7 +850,7 @@ async function handleSessionCommand() {
849
850
  process.exit(1);
850
851
  }
851
852
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
852
- const { sessionSetLink } = await import('./agentCommands-CAqLhLOH.mjs');
853
+ const { sessionSetLink } = await import('./agentCommands-oHt9FQJt.mjs');
853
854
  await sessionSetLink(url, label);
854
855
  } else if (sessionSubcommand === "notify") {
855
856
  const message = sessionArgs[1];
@@ -858,7 +859,7 @@ async function handleSessionCommand() {
858
859
  process.exit(1);
859
860
  }
860
861
  const level = parseFlagStr("--level") || "info";
861
- const { sessionNotify } = await import('./agentCommands-CAqLhLOH.mjs');
862
+ const { sessionNotify } = await import('./agentCommands-oHt9FQJt.mjs');
862
863
  await sessionNotify(message, level);
863
864
  } else if (sessionSubcommand === "broadcast") {
864
865
  const action = sessionArgs[1];
@@ -866,7 +867,7 @@ async function handleSessionCommand() {
866
867
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
867
868
  process.exit(1);
868
869
  }
869
- const { sessionBroadcast } = await import('./agentCommands-CAqLhLOH.mjs');
870
+ const { sessionBroadcast } = await import('./agentCommands-oHt9FQJt.mjs');
870
871
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
871
872
  } else if (sessionSubcommand === "inbox") {
872
873
  const inboxSubcmd = sessionArgs[1];
@@ -877,7 +878,7 @@ async function handleSessionCommand() {
877
878
  process.exit(1);
878
879
  }
879
880
  if (agentSessionId) {
880
- const { inboxSend } = await import('./agentCommands-CAqLhLOH.mjs');
881
+ const { inboxSend } = await import('./agentCommands-oHt9FQJt.mjs');
881
882
  await inboxSend(sessionArgs[2], {
882
883
  body: sessionArgs[3],
883
884
  subject: parseFlagStr("--subject"),
@@ -892,7 +893,7 @@ async function handleSessionCommand() {
892
893
  }
893
894
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
894
895
  if (agentSessionId && !sessionArgs[2]) {
895
- const { inboxList } = await import('./agentCommands-CAqLhLOH.mjs');
896
+ const { inboxList } = await import('./agentCommands-oHt9FQJt.mjs');
896
897
  await inboxList({
897
898
  unread: hasFlag("--unread"),
898
899
  limit: parseFlagInt("--limit"),
@@ -914,7 +915,7 @@ async function handleSessionCommand() {
914
915
  process.exit(1);
915
916
  }
916
917
  if (agentSessionId && !sessionArgs[3]) {
917
- const { inboxList } = await import('./agentCommands-CAqLhLOH.mjs');
918
+ const { inboxList } = await import('./agentCommands-oHt9FQJt.mjs');
918
919
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
919
920
  } else if (sessionArgs[3]) {
920
921
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -924,7 +925,7 @@ async function handleSessionCommand() {
924
925
  }
925
926
  } else if (inboxSubcmd === "reply") {
926
927
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
927
- const { inboxReply } = await import('./agentCommands-CAqLhLOH.mjs');
928
+ const { inboxReply } = await import('./agentCommands-oHt9FQJt.mjs');
928
929
  await inboxReply(sessionArgs[2], sessionArgs[3]);
929
930
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
930
931
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -960,7 +961,7 @@ async function handleMachineCommand() {
960
961
  return;
961
962
  }
962
963
  if (machineSubcommand === "share") {
963
- const { machineShare } = await import('./commands-CdxEOPUt.mjs');
964
+ const { machineShare } = await import('./commands-C_DlMpl7.mjs');
964
965
  let machineId;
965
966
  const shareArgs = [];
966
967
  for (let i = 1; i < machineArgs.length; i++) {
@@ -990,7 +991,7 @@ async function handleMachineCommand() {
990
991
  }
991
992
  await machineShare(machineId, { add, remove, list, configPath, showConfig });
992
993
  } else if (machineSubcommand === "exec") {
993
- const { machineExec } = await import('./commands-CdxEOPUt.mjs');
994
+ const { machineExec } = await import('./commands-C_DlMpl7.mjs');
994
995
  let machineId;
995
996
  let cwd;
996
997
  const cmdParts = [];
@@ -1010,7 +1011,7 @@ async function handleMachineCommand() {
1010
1011
  }
1011
1012
  await machineExec(machineId, command, cwd);
1012
1013
  } else if (machineSubcommand === "info") {
1013
- const { machineInfo } = await import('./commands-CdxEOPUt.mjs');
1014
+ const { machineInfo } = await import('./commands-C_DlMpl7.mjs');
1014
1015
  let machineId;
1015
1016
  for (let i = 1; i < machineArgs.length; i++) {
1016
1017
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1030,10 +1031,10 @@ async function handleMachineCommand() {
1030
1031
  level = machineArgs[++i];
1031
1032
  }
1032
1033
  }
1033
- const { machineNotify } = await import('./agentCommands-CAqLhLOH.mjs');
1034
+ const { machineNotify } = await import('./agentCommands-oHt9FQJt.mjs');
1034
1035
  await machineNotify(message, level);
1035
1036
  } else if (machineSubcommand === "ls") {
1036
- const { machineLs } = await import('./commands-CdxEOPUt.mjs');
1037
+ const { machineLs } = await import('./commands-C_DlMpl7.mjs');
1037
1038
  let machineId;
1038
1039
  let showHidden = false;
1039
1040
  let path;
@@ -1091,24 +1092,24 @@ Examples:
1091
1092
  };
1092
1093
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1093
1094
  if (sub === "status") {
1094
- const { fleetStatus } = await import('./fleet-CNF84yJV.mjs');
1095
+ const { fleetStatus } = await import('./fleet-BlrT4zSC.mjs');
1095
1096
  await fleetStatus();
1096
1097
  } else if (sub === "exec") {
1097
1098
  const command = fleetArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1098
- const { fleetExec } = await import('./fleet-CNF84yJV.mjs');
1099
+ const { fleetExec } = await import('./fleet-BlrT4zSC.mjs');
1099
1100
  await fleetExec(command, { cwd: flag("cwd") });
1100
1101
  } else if (sub === "upgrade-claude") {
1101
- const { fleetUpgradeClaude } = await import('./fleet-CNF84yJV.mjs');
1102
+ const { fleetUpgradeClaude } = await import('./fleet-BlrT4zSC.mjs');
1102
1103
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1103
1104
  } else if (sub === "upgrade-svamp") {
1104
- const { fleetUpgradeSvamp } = await import('./fleet-CNF84yJV.mjs');
1105
+ const { fleetUpgradeSvamp } = await import('./fleet-BlrT4zSC.mjs');
1105
1106
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
1106
1107
  } else if (sub === "daemon-restart") {
1107
- const { fleetDaemonRestart } = await import('./fleet-CNF84yJV.mjs');
1108
+ const { fleetDaemonRestart } = await import('./fleet-BlrT4zSC.mjs');
1108
1109
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1109
1110
  } else if (sub === "push-skill") {
1110
1111
  const name = fleetArgs[1];
1111
- const { fleetPushSkill } = await import('./fleet-CNF84yJV.mjs');
1112
+ const { fleetPushSkill } = await import('./fleet-BlrT4zSC.mjs');
1112
1113
  await fleetPushSkill(name);
1113
1114
  } else {
1114
1115
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1124,7 +1125,7 @@ async function handleSkillsCommand() {
1124
1125
  await printSkillsHelp();
1125
1126
  return;
1126
1127
  }
1127
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-DRQUzw4j.mjs');
1128
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-C_B8GNUT.mjs');
1128
1129
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1129
1130
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1130
1131
  if (!query) {
@@ -1171,7 +1172,7 @@ async function loginToHypha() {
1171
1172
  process.exit(1);
1172
1173
  }
1173
1174
  const anchor = anchorArg.replace(/\/+$/, "");
1174
- const { loadInstanceConfig } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.Y; });
1175
+ const { loadInstanceConfig } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.Y; });
1175
1176
  let cfg = null;
1176
1177
  try {
1177
1178
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1282,7 +1283,7 @@ async function logoutFromHypha() {
1282
1283
  } catch {
1283
1284
  }
1284
1285
  try {
1285
- const { clearInstanceConfigCache } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.Y; });
1286
+ const { clearInstanceConfigCache } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.Y; });
1286
1287
  clearInstanceConfigCache();
1287
1288
  } catch {
1288
1289
  }
@@ -1613,7 +1614,7 @@ async function applyClaudeAuthFlags(argv) {
1613
1614
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1614
1615
  );
1615
1616
  }
1616
- const mod = await import('./run-CsMTSngP.mjs').then(function (n) { return n.X; });
1617
+ const mod = await import('./run-BmZjAEob.mjs').then(function (n) { return n.X; });
1617
1618
  if (hasHypha) {
1618
1619
  let url;
1619
1620
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1667,7 +1668,7 @@ async function applyDaemonShareFlag(argv) {
1667
1668
  }
1668
1669
  }
1669
1670
  if (collected.length === 0) return;
1670
- const { updateEnvFile } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.X; });
1671
+ const { updateEnvFile } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.X; });
1671
1672
  const seen = /* @__PURE__ */ new Set();
1672
1673
  const deduped = collected.filter((e) => {
1673
1674
  const k = e.toLowerCase();
@@ -1700,7 +1701,7 @@ async function handleWiseAgentCommand(rest) {
1700
1701
  }
1701
1702
  });
1702
1703
  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(" ");
1703
- const { wiseAskCli } = await import('./commands-CdxEOPUt.mjs');
1704
+ const { wiseAskCli } = await import('./commands-C_DlMpl7.mjs');
1704
1705
  await wiseAskCli(machineId, message, sessionId, { json });
1705
1706
  return;
1706
1707
  }
@@ -1712,7 +1713,7 @@ async function handleWiseAgentCommand(rest) {
1712
1713
  }
1713
1714
  return void 0;
1714
1715
  };
1715
- const { runWiseVoiceCli } = await import('./headlessCli-DcP8eawK.mjs');
1716
+ const { runWiseVoiceCli } = await import('./headlessCli-D7NXB73S.mjs');
1716
1717
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1717
1718
  return;
1718
1719
  }
@@ -1754,7 +1755,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1754
1755
  return;
1755
1756
  }
1756
1757
  const authArgs = rest.slice(1);
1757
- const mod = await import('./auth-CYA0e4mT.mjs');
1758
+ const mod = await import('./auth-Dg0s5H5y.mjs');
1758
1759
  let action;
1759
1760
  try {
1760
1761
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1764,7 +1765,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1764
1765
  return;
1765
1766
  }
1766
1767
  if (action) {
1767
- const { updateEnvFile } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.X; });
1768
+ const { updateEnvFile } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.X; });
1768
1769
  const updates = mod.buildWiseAgentEnvUpdates(action);
1769
1770
  updateEnvFile(updates);
1770
1771
  for (const [k, v] of Object.entries(updates)) {
@@ -1778,7 +1779,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1778
1779
  }
1779
1780
  async function handleDaemonAuthCommand(argv) {
1780
1781
  const sub = (argv[0] || "status").toLowerCase();
1781
- const mod = await import('./run-CsMTSngP.mjs').then(function (n) { return n.X; });
1782
+ const mod = await import('./run-BmZjAEob.mjs').then(function (n) { return n.X; });
1782
1783
  if (sub === "--help" || sub === "-h" || sub === "help") {
1783
1784
  console.log(`
1784
1785
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2081,7 +2082,7 @@ Examples:
2081
2082
  async function printSkillsHelp() {
2082
2083
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2083
2084
  try {
2084
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-CsMTSngP.mjs').then(function (n) { return n.Z; });
2085
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.Z; });
2085
2086
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2086
2087
  } catch {
2087
2088
  }
@@ -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-CsMTSngP.mjs';
3
+ import { R as RoutineStore, m as RoutineRunner } from './run-BmZjAEob.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
6
6
  import 'fs';
@@ -13,6 +13,7 @@ import 'util';
13
13
  import 'node:crypto';
14
14
  import 'node:path';
15
15
  import 'node:os';
16
+ import 'node:events';
16
17
  import '@agentclientprotocol/sdk';
17
18
  import '@modelcontextprotocol/sdk/client/index.js';
18
19
  import '@modelcontextprotocol/sdk/client/stdio.js';
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-CdxEOPUt.mjs';
3
+ import { connectAndGetMachine } from './commands-C_DlMpl7.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-CsMTSngP.mjs';
8
+ import './run-BmZjAEob.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -13,6 +13,7 @@ import 'child_process';
13
13
  import 'crypto';
14
14
  import 'util';
15
15
  import 'node:crypto';
16
+ import 'node:events';
16
17
  import '@agentclientprotocol/sdk';
17
18
  import '@modelcontextprotocol/sdk/client/index.js';
18
19
  import '@modelcontextprotocol/sdk/client/stdio.js';
@@ -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-WVnBbyjf.mjs');
61
+ const { runFrpcTunnel } = await import('./frpc-Dn5pmk_f.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-CdxEOPUt.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-C_DlMpl7.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-WVnBbyjf.mjs');
126
+ const { runFrpcTunnel } = await import('./frpc-Dn5pmk_f.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-CdxEOPUt.mjs');
135
+ const { connectAndGetMachine } = await import('./commands-C_DlMpl7.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-CdxEOPUt.mjs');
164
+ const { connectAndGetMachine } = await import('./commands-C_DlMpl7.mjs');
165
165
  const { server, machine } = await connectAndGetMachine();
166
166
  try {
167
167
  await machine.tunnelStop({ name });
@@ -1,7 +1,7 @@
1
1
  import os from 'os';
2
2
  import fs__default from 'fs';
3
3
  import { resolve, join, relative } from 'path';
4
- import { p as parseFrontmatter, n as getSkillsServer, o as getSkillsWorkspaceName, q as getSkillsCollectionName, t as fetchWithTimeout, u as searchSkills, v as SKILLS_DIR, w as getSkillInfo, x as downloadSkillFile, y as listSkillFiles } from './run-CsMTSngP.mjs';
4
+ import { p as parseFrontmatter, n as getSkillsServer, o as getSkillsWorkspaceName, q as getSkillsCollectionName, t as fetchWithTimeout, u as searchSkills, v as SKILLS_DIR, w as getSkillInfo, x as downloadSkillFile, y as listSkillFiles } from './run-BmZjAEob.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
@@ -12,6 +12,7 @@ import 'util';
12
12
  import 'node:crypto';
13
13
  import 'node:path';
14
14
  import 'node:os';
15
+ import 'node:events';
15
16
  import '@agentclientprotocol/sdk';
16
17
  import '@modelcontextprotocol/sdk/client/index.js';
17
18
  import '@modelcontextprotocol/sdk/client/stdio.js';
@@ -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 { F as normalizeAllowedUser, G as loadSecurityContextConfig, H as resolveSecurityContext, I as buildSecurityContextFromFlags, J as mergeSecurityContexts, c as connectToHypha, K as buildSessionShareUrl, L as computeOutboundHop, M as buildMachineShareUrl } from './run-CsMTSngP.mjs';
5
+ import { F as normalizeAllowedUser, G as loadSecurityContextConfig, H as resolveSecurityContext, I as buildSecurityContextFromFlags, J as mergeSecurityContexts, c as connectToHypha, K as buildSessionShareUrl, L as computeOutboundHop, M as buildMachineShareUrl } from './run-BmZjAEob.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -12,6 +12,7 @@ import 'child_process';
12
12
  import 'crypto';
13
13
  import 'util';
14
14
  import 'node:crypto';
15
+ import 'node:events';
15
16
  import '@agentclientprotocol/sdk';
16
17
  import '@modelcontextprotocol/sdk/client/index.js';
17
18
  import '@modelcontextprotocol/sdk/client/stdio.js';
@@ -2419,8 +2420,17 @@ async function sessionInboxReply(sessionIdPartial, messageId, body, machineId) {
2419
2420
  console.error(`Message ${messageId} not found in inbox.`);
2420
2421
  process.exit(1);
2421
2422
  }
2423
+ if (original.channelId && original.correlationId) {
2424
+ const rr = await machine.sessionRPC(fullId, "channelReply", { params: { channel: original.channelId, correlationId: original.correlationId, to: original.from, body } });
2425
+ if (rr?.error) {
2426
+ console.error(`Channel reply failed: ${rr.error}`);
2427
+ process.exit(1);
2428
+ }
2429
+ console.log(`Reply queued to "${original.from}" on channel ${original.channelId} (correlation ${original.correlationId}).`);
2430
+ return;
2431
+ }
2422
2432
  if (!original.fromSession) {
2423
- console.error("Cannot reply: original message has no fromSession.");
2433
+ console.error("Cannot reply: original message has no fromSession (and not a channel message).");
2424
2434
  process.exit(1);
2425
2435
  }
2426
2436
  const { randomUUID } = await import('node:crypto');
@@ -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-CsMTSngP.mjs';
4
+ import { c as connectToHypha } from './run-BmZjAEob.mjs';
5
5
  import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-HydRNEt7.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
@@ -13,6 +13,7 @@ import 'crypto';
13
13
  import 'node:child_process';
14
14
  import 'util';
15
15
  import 'node:crypto';
16
+ import 'node:events';
16
17
  import '@agentclientprotocol/sdk';
17
18
  import '@modelcontextprotocol/sdk/client/index.js';
18
19
  import '@modelcontextprotocol/sdk/client/stdio.js';
@@ -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-CsMTSngP.mjs';
6
+ import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-BmZjAEob.mjs';
7
7
  import 'fs/promises';
8
8
  import 'url';
9
9
  import 'node:fs';
@@ -12,6 +12,7 @@ import 'util';
12
12
  import 'node:crypto';
13
13
  import 'node:path';
14
14
  import 'node:os';
15
+ import 'node:events';
15
16
  import '@agentclientprotocol/sdk';
16
17
  import '@modelcontextprotocol/sdk/client/index.js';
17
18
  import '@modelcontextprotocol/sdk/client/stdio.js';