svamp-cli 0.2.235 → 0.2.236

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/{agentCommands-CQYzhyOV.mjs → agentCommands-Mim66pYY.mjs} +5 -5
  2. package/dist/{auth-DJJDXcNo.mjs → auth-BSYtbITx.mjs} +1 -1
  3. package/dist/cli.mjs +61 -61
  4. package/dist/{commands-C8eSHhho.mjs → commands-BaJRyJnJ.mjs} +2 -2
  5. package/dist/{commands-BMCNLXjz.mjs → commands-C07RBbtJ.mjs} +1 -1
  6. package/dist/{commands-BhP_0oWb.mjs → commands-C221nXts.mjs} +1 -1
  7. package/dist/{commands-BrkFOjiN.mjs → commands-D8a4f-BY.mjs} +1 -1
  8. package/dist/{commands-DjVnwCLk.mjs → commands-DUBpnJY3.mjs} +2 -2
  9. package/dist/{commands-B9uukn75.mjs → commands-DUz_h3Ol.mjs} +1 -1
  10. package/dist/{commands-pUbnaaJb.mjs → commands-zeaF9f5w.mjs} +6 -6
  11. package/dist/{fleet-DYoCJTed.mjs → fleet-b5DdOH8i.mjs} +2 -2
  12. package/dist/{frpc-D3UoKvqr.mjs → frpc-CoFt3YiO.mjs} +1 -1
  13. package/dist/{headlessCli-BJt2EMMB.mjs → headlessCli-BESypdgg.mjs} +2 -2
  14. package/dist/index.mjs +1 -1
  15. package/dist/{package-ChjZJIJr.mjs → package-oE0HJeDM.mjs} +1 -1
  16. package/dist/{pinnedClaudeCode-VIupR1NK.mjs → pinnedClaudeCode-ivV7xAp3.mjs} +15 -1
  17. package/dist/{rpc-DPWxDUve.mjs → rpc-BPCA-q42.mjs} +1 -1
  18. package/dist/{rpc-DaRTfCjS.mjs → rpc-Def2Apuq.mjs} +2 -2
  19. package/dist/{run-CVg6eagc.mjs → run--5q3ieqY.mjs} +86 -39
  20. package/dist/{run-Dt0YoXZ-.mjs → run-MOBlMV11.mjs} +1 -1
  21. package/dist/{runStore-DxBjBflT.mjs → runStore-Bfr7UIzR.mjs} +1 -1
  22. package/dist/{scheduler-CPX7QBP-.mjs → scheduler-Dfr3y3FI.mjs} +2 -2
  23. package/dist/{serveCommands-dQo7QYhs.mjs → serveCommands-CNXAhbi8.mjs} +5 -5
  24. package/dist/{serveManager-TUKxMan6.mjs → serveManager-DBqhEdOE.mjs} +2 -2
  25. package/dist/{sideband-Bt0Y2j3D.mjs → sideband-C3srx9Jx.mjs} +1 -1
  26. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, mkdirSync, writeFileSync, renameSync } from '
2
2
  import { join, dirname } from 'node:path';
3
3
  import os from 'node:os';
4
4
  import { requireNotSandboxed } from './sandboxDetect-DNTcbgWD.mjs';
5
- import { A as shortId } from './run-CVg6eagc.mjs';
5
+ import { A as shortId } from './run--5q3ieqY.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-CVg6eagc.mjs').then(function (n) { return n.a9; });
99
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.a9; });
100
100
  const desc = sanitizeDescription(description, 240);
101
101
  if (!desc) {
102
102
  console.error("Project description is empty.");
@@ -327,7 +327,7 @@ async function sessionBroadcast(action, args) {
327
327
  console.log(`Broadcast sent: ${action}`);
328
328
  }
329
329
  async function connectToMachineService() {
330
- const { connectAndGetMachine } = await import('./commands-BMCNLXjz.mjs');
330
+ const { connectAndGetMachine } = await import('./commands-C07RBbtJ.mjs');
331
331
  return connectAndGetMachine();
332
332
  }
333
333
  function buildInboxMessage(args) {
@@ -405,7 +405,7 @@ async function inboxSend(targetSessionId, opts) {
405
405
  console.error("Message body is required.");
406
406
  process.exit(1);
407
407
  }
408
- const { connectAndResolveSession } = await import('./commands-BMCNLXjz.mjs');
408
+ const { connectAndResolveSession } = await import('./commands-C07RBbtJ.mjs');
409
409
  let server;
410
410
  try {
411
411
  const { targetId, messageId } = await inboxSendCore(
@@ -459,7 +459,7 @@ async function inboxReply(messageId, body) {
459
459
  console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
460
460
  process.exit(1);
461
461
  }
462
- const { connectAndResolveSession } = await import('./commands-BMCNLXjz.mjs');
462
+ const { connectAndResolveSession } = await import('./commands-C07RBbtJ.mjs');
463
463
  const { server: localServer, machine: localMachine } = await connectToMachineService();
464
464
  let localDisconnected = false;
465
465
  const disconnectLocal = async () => {
@@ -1,4 +1,4 @@
1
- import { P as resolveModel } from './run-CVg6eagc.mjs';
1
+ import { P as resolveModel } from './run--5q3ieqY.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-CVg6eagc.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run--5q3ieqY.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-CVg6eagc.mjs').then(function (n) { return n.af; });
37
+ const { getLoadedConfig } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.af; });
38
38
  getLoadedConfig();
39
39
  } catch {
40
40
  }
@@ -51,7 +51,7 @@ async function main() {
51
51
  console.error(`svamp daemon restart: ${err.message || err}`);
52
52
  process.exit(1);
53
53
  }
54
- const { restartDaemon } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.ah; });
54
+ const { restartDaemon } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.ah; });
55
55
  await restartDaemon();
56
56
  process.exit(0);
57
57
  }
@@ -344,7 +344,7 @@ async function main() {
344
344
  console.error("svamp service: Service commands are not available in sandboxed sessions.");
345
345
  process.exit(1);
346
346
  }
347
- const { handleServiceCommand } = await import('./commands-pUbnaaJb.mjs');
347
+ const { handleServiceCommand } = await import('./commands-zeaF9f5w.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-dQo7QYhs.mjs');
355
+ const { handleServeCommand } = await import('./serveCommands-CNXAhbi8.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-DjVnwCLk.mjs');
364
+ const { processCommand } = await import('./commands-DUBpnJY3.mjs');
365
365
  let machineId;
366
366
  const processArgs = args.slice(1);
367
367
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -375,18 +375,18 @@ async function main() {
375
375
  }), machineId);
376
376
  process.exit(0);
377
377
  } else if (subcommand === "issue" || subcommand === "issues") {
378
- const { issueCommand } = await import('./commands-BrkFOjiN.mjs');
378
+ const { issueCommand } = await import('./commands-D8a4f-BY.mjs');
379
379
  await issueCommand(args.slice(1));
380
380
  process.exit(0);
381
381
  } else if (subcommand === "workflow" || subcommand === "workflows") {
382
- const { workflowCommand } = await import('./commands-BhP_0oWb.mjs');
382
+ const { workflowCommand } = await import('./commands-C221nXts.mjs');
383
383
  await workflowCommand(args.slice(1));
384
384
  process.exit(0);
385
385
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
386
386
  await handleWiseAgentCommand(args.slice(1));
387
387
  process.exit(0);
388
388
  } else if (subcommand === "feature" || subcommand === "crew") {
389
- const { crewCommand } = await import('./commands-C8eSHhho.mjs');
389
+ const { crewCommand } = await import('./commands-BaJRyJnJ.mjs');
390
390
  await crewCommand(args.slice(1));
391
391
  process.exit(0);
392
392
  } else if (subcommand === "--help" || subcommand === "-h") {
@@ -394,7 +394,7 @@ async function main() {
394
394
  } else if (!subcommand || subcommand === "start") {
395
395
  await handleInteractiveCommand();
396
396
  } else if (subcommand === "--version" || subcommand === "-v") {
397
- const pkg = await import('./package-ChjZJIJr.mjs').catch(() => ({ default: { version: "unknown" } }));
397
+ const pkg = await import('./package-oE0HJeDM.mjs').catch(() => ({ default: { version: "unknown" } }));
398
398
  console.log(`svamp version: ${pkg.default.version}`);
399
399
  } else {
400
400
  console.error(`Unknown command: ${subcommand}`);
@@ -403,7 +403,7 @@ async function main() {
403
403
  }
404
404
  }
405
405
  async function handleInteractiveCommand() {
406
- const { runInteractive } = await import('./run-Dt0YoXZ-.mjs');
406
+ const { runInteractive } = await import('./run-MOBlMV11.mjs');
407
407
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
408
408
  let directory = process.cwd();
409
409
  let resumeSessionId;
@@ -448,7 +448,7 @@ async function handleAgentCommand() {
448
448
  return;
449
449
  }
450
450
  if (agentArgs[0] === "list") {
451
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.ac; });
451
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.ac; });
452
452
  console.log("Known agents:");
453
453
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
454
454
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -460,7 +460,7 @@ async function handleAgentCommand() {
460
460
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
461
461
  return;
462
462
  }
463
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.ac; });
463
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.ac; });
464
464
  let cwd = process.cwd();
465
465
  const filteredArgs = [];
466
466
  for (let i = 0; i < agentArgs.length; i++) {
@@ -484,12 +484,12 @@ async function handleAgentCommand() {
484
484
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
485
485
  let backend;
486
486
  if (KNOWN_MCP_AGENTS[config.agentName]) {
487
- const { CodexMcpBackend } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.ad; });
487
+ const { CodexMcpBackend } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.ad; });
488
488
  backend = new CodexMcpBackend({ cwd, log: logFn });
489
489
  } else {
490
- const { AcpBackend } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.ab; });
491
- const { GeminiTransport } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.ae; });
492
- const { DefaultTransport } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.aa; });
490
+ const { AcpBackend } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.ab; });
491
+ const { GeminiTransport } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.ae; });
492
+ const { DefaultTransport } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.aa; });
493
493
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
494
494
  backend = new AcpBackend({
495
495
  agentName: config.agentName,
@@ -616,7 +616,7 @@ async function handleSessionCommand() {
616
616
  process.exit(1);
617
617
  }
618
618
  }
619
- const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-BMCNLXjz.mjs');
619
+ const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-C07RBbtJ.mjs');
620
620
  const parseFlagStr = (flag, shortFlag) => {
621
621
  for (let i = 1; i < sessionArgs.length; i++) {
622
622
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -684,7 +684,7 @@ async function handleSessionCommand() {
684
684
  allowDomain.push(sessionArgs[++i]);
685
685
  }
686
686
  }
687
- const { parseShareArg } = await import('./commands-BMCNLXjz.mjs');
687
+ const { parseShareArg } = await import('./commands-C07RBbtJ.mjs');
688
688
  const shareEntries = share.map((s) => parseShareArg(s));
689
689
  await sessionSpawn(agent, dir, targetMachineId, {
690
690
  message,
@@ -772,7 +772,7 @@ async function handleSessionCommand() {
772
772
  console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
773
773
  process.exit(1);
774
774
  }
775
- const { sessionEditMessage } = await import('./commands-BMCNLXjz.mjs');
775
+ const { sessionEditMessage } = await import('./commands-C07RBbtJ.mjs');
776
776
  await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
777
777
  } else if (sessionSubcommand === "refine") {
778
778
  if (!sessionArgs[1] || !sessionArgs[2]) {
@@ -780,7 +780,7 @@ async function handleSessionCommand() {
780
780
  console.error(" Asks the agent to revise its latest reply in place (no extra round).");
781
781
  process.exit(1);
782
782
  }
783
- const { sessionRefineLastReply } = await import('./commands-BMCNLXjz.mjs');
783
+ const { sessionRefineLastReply } = await import('./commands-C07RBbtJ.mjs');
784
784
  await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
785
785
  } else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
786
786
  if (!sessionArgs[1]) {
@@ -788,7 +788,7 @@ async function handleSessionCommand() {
788
788
  console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
789
789
  process.exit(1);
790
790
  }
791
- const { sessionUndoEdit } = await import('./commands-BMCNLXjz.mjs');
791
+ const { sessionUndoEdit } = await import('./commands-C07RBbtJ.mjs');
792
792
  await sessionUndoEdit(sessionArgs[1], targetMachineId);
793
793
  } else if (sessionSubcommand === "query") {
794
794
  const dir = sessionArgs[1];
@@ -798,7 +798,7 @@ async function handleSessionCommand() {
798
798
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
799
799
  process.exit(1);
800
800
  }
801
- const { sessionQuery } = await import('./commands-BMCNLXjz.mjs');
801
+ const { sessionQuery } = await import('./commands-C07RBbtJ.mjs');
802
802
  await sessionQuery(dir, prompt, targetMachineId, {
803
803
  timeout: parseFlagInt("--timeout"),
804
804
  json: hasFlag("--json"),
@@ -831,7 +831,7 @@ async function handleSessionCommand() {
831
831
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
832
832
  process.exit(1);
833
833
  }
834
- const { sessionApprove } = await import('./commands-BMCNLXjz.mjs');
834
+ const { sessionApprove } = await import('./commands-C07RBbtJ.mjs');
835
835
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
836
836
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
837
837
  json: hasFlag("--json")
@@ -841,7 +841,7 @@ async function handleSessionCommand() {
841
841
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
842
842
  process.exit(1);
843
843
  }
844
- const { sessionDeny } = await import('./commands-BMCNLXjz.mjs');
844
+ const { sessionDeny } = await import('./commands-C07RBbtJ.mjs');
845
845
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
846
846
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
847
847
  json: hasFlag("--json")
@@ -886,7 +886,7 @@ async function handleSessionCommand() {
886
886
  console.error("Usage: svamp session set-title <title>");
887
887
  process.exit(1);
888
888
  }
889
- const { sessionSetTitle } = await import('./agentCommands-CQYzhyOV.mjs');
889
+ const { sessionSetTitle } = await import('./agentCommands-Mim66pYY.mjs');
890
890
  await sessionSetTitle(title);
891
891
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
892
892
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -894,7 +894,7 @@ async function handleSessionCommand() {
894
894
  console.error("Usage: svamp session set-project-description <text>");
895
895
  process.exit(1);
896
896
  }
897
- const { sessionSetProjectDescription } = await import('./agentCommands-CQYzhyOV.mjs');
897
+ const { sessionSetProjectDescription } = await import('./agentCommands-Mim66pYY.mjs');
898
898
  await sessionSetProjectDescription(desc);
899
899
  } else if (sessionSubcommand === "set-link") {
900
900
  const url = sessionArgs[1];
@@ -903,11 +903,11 @@ async function handleSessionCommand() {
903
903
  process.exit(1);
904
904
  }
905
905
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
906
- const { sessionSetLink } = await import('./agentCommands-CQYzhyOV.mjs');
906
+ const { sessionSetLink } = await import('./agentCommands-Mim66pYY.mjs');
907
907
  await sessionSetLink(url, label);
908
908
  } else if (sessionSubcommand === "link") {
909
909
  const op = sessionArgs[1];
910
- const lm = await import('./agentCommands-CQYzhyOV.mjs');
910
+ const lm = await import('./agentCommands-Mim66pYY.mjs');
911
911
  if (op === "add") {
912
912
  const url = sessionArgs[2];
913
913
  if (!url || url.startsWith("--")) {
@@ -942,7 +942,7 @@ async function handleSessionCommand() {
942
942
  process.exit(1);
943
943
  }
944
944
  const level = parseFlagStr("--level") || "info";
945
- const { sessionNotify } = await import('./agentCommands-CQYzhyOV.mjs');
945
+ const { sessionNotify } = await import('./agentCommands-Mim66pYY.mjs');
946
946
  await sessionNotify(message, level);
947
947
  } else if (sessionSubcommand === "broadcast") {
948
948
  const action = sessionArgs[1];
@@ -950,7 +950,7 @@ async function handleSessionCommand() {
950
950
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
951
951
  process.exit(1);
952
952
  }
953
- const { sessionBroadcast } = await import('./agentCommands-CQYzhyOV.mjs');
953
+ const { sessionBroadcast } = await import('./agentCommands-Mim66pYY.mjs');
954
954
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
955
955
  } else if (sessionSubcommand === "inbox") {
956
956
  const inboxSubcmd = sessionArgs[1];
@@ -961,7 +961,7 @@ async function handleSessionCommand() {
961
961
  process.exit(1);
962
962
  }
963
963
  if (agentSessionId) {
964
- const { inboxSend } = await import('./agentCommands-CQYzhyOV.mjs');
964
+ const { inboxSend } = await import('./agentCommands-Mim66pYY.mjs');
965
965
  await inboxSend(sessionArgs[2], {
966
966
  body: sessionArgs[3],
967
967
  subject: parseFlagStr("--subject"),
@@ -976,7 +976,7 @@ async function handleSessionCommand() {
976
976
  }
977
977
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
978
978
  if (agentSessionId && !sessionArgs[2]) {
979
- const { inboxList } = await import('./agentCommands-CQYzhyOV.mjs');
979
+ const { inboxList } = await import('./agentCommands-Mim66pYY.mjs');
980
980
  await inboxList({
981
981
  unread: hasFlag("--unread"),
982
982
  limit: parseFlagInt("--limit"),
@@ -998,7 +998,7 @@ async function handleSessionCommand() {
998
998
  process.exit(1);
999
999
  }
1000
1000
  if (agentSessionId && !sessionArgs[3]) {
1001
- const { inboxList } = await import('./agentCommands-CQYzhyOV.mjs');
1001
+ const { inboxList } = await import('./agentCommands-Mim66pYY.mjs');
1002
1002
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
1003
1003
  } else if (sessionArgs[3]) {
1004
1004
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -1008,7 +1008,7 @@ async function handleSessionCommand() {
1008
1008
  }
1009
1009
  } else if (inboxSubcmd === "reply") {
1010
1010
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
1011
- const { inboxReply } = await import('./agentCommands-CQYzhyOV.mjs');
1011
+ const { inboxReply } = await import('./agentCommands-Mim66pYY.mjs');
1012
1012
  await inboxReply(sessionArgs[2], sessionArgs[3]);
1013
1013
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
1014
1014
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -1046,7 +1046,7 @@ async function handleMachineCommand() {
1046
1046
  return;
1047
1047
  }
1048
1048
  if (machineSubcommand === "share") {
1049
- const { machineShare } = await import('./commands-BMCNLXjz.mjs');
1049
+ const { machineShare } = await import('./commands-C07RBbtJ.mjs');
1050
1050
  let machineId;
1051
1051
  const shareArgs = [];
1052
1052
  for (let i = 1; i < machineArgs.length; i++) {
@@ -1097,14 +1097,14 @@ async function handleMachineCommand() {
1097
1097
  process.exit(1);
1098
1098
  }
1099
1099
  if (all) {
1100
- const { fleetExec } = await import('./fleet-DYoCJTed.mjs');
1100
+ const { fleetExec } = await import('./fleet-b5DdOH8i.mjs');
1101
1101
  await fleetExec(command, { cwd });
1102
1102
  } else {
1103
- const { machineExec } = await import('./commands-BMCNLXjz.mjs');
1103
+ const { machineExec } = await import('./commands-C07RBbtJ.mjs');
1104
1104
  await machineExec(machineId, command, cwd);
1105
1105
  }
1106
1106
  } else if (machineSubcommand === "info") {
1107
- const { machineInfo } = await import('./commands-BMCNLXjz.mjs');
1107
+ const { machineInfo } = await import('./commands-C07RBbtJ.mjs');
1108
1108
  let machineId;
1109
1109
  for (let i = 1; i < machineArgs.length; i++) {
1110
1110
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1124,10 +1124,10 @@ async function handleMachineCommand() {
1124
1124
  level = machineArgs[++i];
1125
1125
  }
1126
1126
  }
1127
- const { machineNotify } = await import('./agentCommands-CQYzhyOV.mjs');
1127
+ const { machineNotify } = await import('./agentCommands-Mim66pYY.mjs');
1128
1128
  await machineNotify(message, level);
1129
1129
  } else if (machineSubcommand === "ls") {
1130
- const { machineLs } = await import('./commands-BMCNLXjz.mjs');
1130
+ const { machineLs } = await import('./commands-C07RBbtJ.mjs');
1131
1131
  let machineId;
1132
1132
  let showHidden = false;
1133
1133
  let path;
@@ -1183,20 +1183,20 @@ Examples:
1183
1183
  };
1184
1184
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1185
1185
  if (sub === "status") {
1186
- const { fleetStatus } = await import('./fleet-DYoCJTed.mjs');
1186
+ const { fleetStatus } = await import('./fleet-b5DdOH8i.mjs');
1187
1187
  await fleetStatus();
1188
1188
  } else if (sub === "upgrade-claude") {
1189
- const { fleetUpgradeClaude } = await import('./fleet-DYoCJTed.mjs');
1189
+ const { fleetUpgradeClaude } = await import('./fleet-b5DdOH8i.mjs');
1190
1190
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1191
1191
  } else if (sub === "upgrade-svamp") {
1192
- const { fleetUpgradeSvamp } = await import('./fleet-DYoCJTed.mjs');
1192
+ const { fleetUpgradeSvamp } = await import('./fleet-b5DdOH8i.mjs');
1193
1193
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
1194
1194
  } else if (sub === "daemon-restart") {
1195
- const { fleetDaemonRestart } = await import('./fleet-DYoCJTed.mjs');
1195
+ const { fleetDaemonRestart } = await import('./fleet-b5DdOH8i.mjs');
1196
1196
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1197
1197
  } else if (sub === "push-skill") {
1198
1198
  const name = fleetArgs[1];
1199
- const { fleetPushSkill } = await import('./fleet-DYoCJTed.mjs');
1199
+ const { fleetPushSkill } = await import('./fleet-b5DdOH8i.mjs');
1200
1200
  await fleetPushSkill(name);
1201
1201
  } else {
1202
1202
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1212,7 +1212,7 @@ async function handleSkillsCommand() {
1212
1212
  await printSkillsHelp();
1213
1213
  return;
1214
1214
  }
1215
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-B9uukn75.mjs');
1215
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-DUz_h3Ol.mjs');
1216
1216
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1217
1217
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1218
1218
  if (!query) {
@@ -1259,7 +1259,7 @@ async function loginToHypha() {
1259
1259
  process.exit(1);
1260
1260
  }
1261
1261
  const anchor = anchorArg.replace(/\/+$/, "");
1262
- const { loadInstanceConfig } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.af; });
1262
+ const { loadInstanceConfig } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.af; });
1263
1263
  let cfg = null;
1264
1264
  try {
1265
1265
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1370,7 +1370,7 @@ async function logoutFromHypha() {
1370
1370
  } catch {
1371
1371
  }
1372
1372
  try {
1373
- const { clearInstanceConfigCache } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.af; });
1373
+ const { clearInstanceConfigCache } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.af; });
1374
1374
  clearInstanceConfigCache();
1375
1375
  } catch {
1376
1376
  }
@@ -1708,7 +1708,7 @@ async function applyClaudeAuthFlags(argv) {
1708
1708
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1709
1709
  );
1710
1710
  }
1711
- const mod = await import('./run-CVg6eagc.mjs').then(function (n) { return n.a8; });
1711
+ const mod = await import('./run--5q3ieqY.mjs').then(function (n) { return n.a8; });
1712
1712
  if (hasHypha) {
1713
1713
  let url;
1714
1714
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1762,7 +1762,7 @@ async function applyDaemonShareFlag(argv) {
1762
1762
  }
1763
1763
  }
1764
1764
  if (collected.length === 0) return;
1765
- const { updateEnvFile } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.a8; });
1765
+ const { updateEnvFile } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.a8; });
1766
1766
  const seen = /* @__PURE__ */ new Set();
1767
1767
  const deduped = collected.filter((e) => {
1768
1768
  const k = e.toLowerCase();
@@ -1795,7 +1795,7 @@ async function handleWiseAgentCommand(rest) {
1795
1795
  }
1796
1796
  });
1797
1797
  const message = rest.slice(1).map((a, idx) => ({ a, idx: idx + 1 })).filter(({ a, idx }) => !a.startsWith("-") && !consumed.has(String(idx))).map(({ a }) => a).join(" ");
1798
- const { wiseAskCli } = await import('./commands-BMCNLXjz.mjs');
1798
+ const { wiseAskCli } = await import('./commands-C07RBbtJ.mjs');
1799
1799
  await wiseAskCli(machineId, message, sessionId, { json });
1800
1800
  return;
1801
1801
  }
@@ -1807,7 +1807,7 @@ async function handleWiseAgentCommand(rest) {
1807
1807
  }
1808
1808
  return void 0;
1809
1809
  };
1810
- const { runWiseVoiceCli } = await import('./headlessCli-BJt2EMMB.mjs');
1810
+ const { runWiseVoiceCli } = await import('./headlessCli-BESypdgg.mjs');
1811
1811
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1812
1812
  return;
1813
1813
  }
@@ -1825,7 +1825,7 @@ async function handleWiseAgentCommand(rest) {
1825
1825
  const mode = valueOf(["--mode"]);
1826
1826
  const mission = valueOf(["--mission"]);
1827
1827
  const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
1828
- const { wiseJoinMeetingCli } = await import('./commands-BMCNLXjz.mjs');
1828
+ const { wiseJoinMeetingCli } = await import('./commands-C07RBbtJ.mjs');
1829
1829
  await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
1830
1830
  return;
1831
1831
  }
@@ -1837,7 +1837,7 @@ async function handleWiseAgentCommand(rest) {
1837
1837
  }
1838
1838
  return void 0;
1839
1839
  };
1840
- const { wiseLeaveMeetingCli } = await import('./commands-BMCNLXjz.mjs');
1840
+ const { wiseLeaveMeetingCli } = await import('./commands-C07RBbtJ.mjs');
1841
1841
  await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
1842
1842
  return;
1843
1843
  }
@@ -1861,7 +1861,7 @@ async function handleWiseAgentCommand(rest) {
1861
1861
  }
1862
1862
  });
1863
1863
  const text = rest.slice(1).map((a, idx) => ({ a, idx: idx + 1 })).filter(({ a, idx }) => !a.startsWith("-") && !consumed.has(String(idx))).map(({ a }) => a).join(" ");
1864
- const { wiseAnnounceCli } = await import('./commands-BMCNLXjz.mjs');
1864
+ const { wiseAnnounceCli } = await import('./commands-C07RBbtJ.mjs');
1865
1865
  await wiseAnnounceCli(machineId, text, sessionId, { json });
1866
1866
  return;
1867
1867
  }
@@ -1873,7 +1873,7 @@ async function handleWiseAgentCommand(rest) {
1873
1873
  }
1874
1874
  return void 0;
1875
1875
  };
1876
- const { wiseMeetingsCli } = await import('./commands-BMCNLXjz.mjs');
1876
+ const { wiseMeetingsCli } = await import('./commands-C07RBbtJ.mjs');
1877
1877
  await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
1878
1878
  return;
1879
1879
  }
@@ -1923,7 +1923,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1923
1923
  return;
1924
1924
  }
1925
1925
  const authArgs = rest.slice(1);
1926
- const mod = await import('./auth-DJJDXcNo.mjs');
1926
+ const mod = await import('./auth-BSYtbITx.mjs');
1927
1927
  let action;
1928
1928
  try {
1929
1929
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1933,7 +1933,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1933
1933
  return;
1934
1934
  }
1935
1935
  if (action) {
1936
- const { updateEnvFile } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.a8; });
1936
+ const { updateEnvFile } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.a8; });
1937
1937
  const updates = mod.buildWiseAgentEnvUpdates(action);
1938
1938
  updateEnvFile(updates);
1939
1939
  for (const [k, v] of Object.entries(updates)) {
@@ -1947,7 +1947,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1947
1947
  }
1948
1948
  async function handleDaemonAuthCommand(argv) {
1949
1949
  const sub = (argv[0] || "status").toLowerCase();
1950
- const mod = await import('./run-CVg6eagc.mjs').then(function (n) { return n.a8; });
1950
+ const mod = await import('./run--5q3ieqY.mjs').then(function (n) { return n.a8; });
1951
1951
  if (sub === "--help" || sub === "-h" || sub === "help") {
1952
1952
  console.log(`
1953
1953
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2261,7 +2261,7 @@ Examples:
2261
2261
  async function printSkillsHelp() {
2262
2262
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2263
2263
  try {
2264
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-CVg6eagc.mjs').then(function (n) { return n.ag; });
2264
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run--5q3ieqY.mjs').then(function (n) { return n.ag; });
2265
2265
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2266
2266
  } catch {
2267
2267
  }
@@ -1,8 +1,8 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { resolve } from 'node:path';
3
- import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-BMCNLXjz.mjs';
3
+ import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-C07RBbtJ.mjs';
4
4
  import { execSync } from 'node:child_process';
5
- import { u as updateIssue, q as addComment, t as addIssue, A as shortId } from './run-CVg6eagc.mjs';
5
+ import { u as updateIssue, q as addComment, t as addIssue, A as shortId } from './run--5q3ieqY.mjs';
6
6
  import 'node:os';
7
7
  import 'os';
8
8
  import 'fs/promises';
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { execSync } from 'node:child_process';
3
3
  import { basename, resolve, join, isAbsolute } from 'node:path';
4
4
  import os from 'node:os';
5
- import { Q as formatHandle, T as normalizeAllowedUser, U as loadSecurityContextConfig, V as resolveSecurityContext, W as buildSecurityContextFromFlags, X as mergeSecurityContexts, c as connectToHypha, Y as buildSessionShareUrl, Z as computeOutboundHop, A as shortId, _ as registerAwaitingReply, $ as buildMachineShareUrl, a0 as parseHandle, a1 as handleMatchesMetadata } from './run-CVg6eagc.mjs';
5
+ import { Q as formatHandle, T as normalizeAllowedUser, U as loadSecurityContextConfig, V as resolveSecurityContext, W as buildSecurityContextFromFlags, X as mergeSecurityContexts, c as connectToHypha, Y as buildSessionShareUrl, Z as computeOutboundHop, A as shortId, _ as registerAwaitingReply, $ as buildMachineShareUrl, a0 as parseHandle, a1 as handleMatchesMetadata } from './run--5q3ieqY.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -1,5 +1,5 @@
1
1
  import { spawnSync } from 'node:child_process';
2
- import { m as resolveProjectRoot } from './run-CVg6eagc.mjs';
2
+ import { m as resolveProjectRoot } from './run--5q3ieqY.mjs';
3
3
  import { c as workflowSteps, s as setWorkflowEnabled, i as isWorkflowEnabled, r as removeWorkflow, g as getWorkflow, l as listWorkflows, a as saveWorkflow, b as rawWorkflow } from './store-BTs0H_y0.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
@@ -1,7 +1,7 @@
1
1
  import { execSync } from 'node:child_process';
2
2
  import { existsSync, readFileSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
- import { m as resolveProjectRoot, w as searchIssues, v as listIssues, o as resumeIssue, p as pauseIssue, q as addComment, u as updateIssue, n as getIssue, x as isVisibleTo, z as summarize, t as addIssue } from './run-CVg6eagc.mjs';
4
+ import { m as resolveProjectRoot, w as searchIssues, v as listIssues, o as resumeIssue, p as pauseIssue, q as addComment, u as updateIssue, n as getIssue, x as isVisibleTo, z as summarize, t as addIssue } from './run--5q3ieqY.mjs';
5
5
  import 'os';
6
6
  import 'fs/promises';
7
7
  import 'fs';
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-BMCNLXjz.mjs';
3
+ import { connectAndGetMachine } from './commands-C07RBbtJ.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-CVg6eagc.mjs';
8
+ import './run--5q3ieqY.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -1,7 +1,7 @@
1
1
  import os from 'os';
2
2
  import fs__default from 'fs';
3
3
  import { resolve, join, relative } from 'path';
4
- import { F as parseFrontmatter, G as getSkillsServer, H as getSkillsWorkspaceName, I as getSkillsCollectionName, J as fetchWithTimeout, K as searchSkills, L as SKILLS_DIR, M as getSkillInfo, N as downloadSkillFile, O as listSkillFiles } from './run-CVg6eagc.mjs';
4
+ import { F as parseFrontmatter, G as getSkillsServer, H as getSkillsWorkspaceName, I as getSkillsCollectionName, J as fetchWithTimeout, K as searchSkills, L as SKILLS_DIR, M as getSkillInfo, N as downloadSkillFile, O as listSkillFiles } from './run--5q3ieqY.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
@@ -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-D3UoKvqr.mjs');
61
+ const { runFrpcTunnel } = await import('./frpc-CoFt3YiO.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-BMCNLXjz.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-C07RBbtJ.mjs');
72
72
  const { server, machine } = await connectAndGetMachine();
73
73
  try {
74
74
  const status = await machine.tunnelStart({
@@ -90,7 +90,7 @@ async function serviceExpose(args) {
90
90
  console.log(` port ${port}: ${url}`);
91
91
  }
92
92
  if (process.env.SVAMP_SESSION_ID) {
93
- const { autoAddSessionLink } = await import('./agentCommands-CQYzhyOV.mjs');
93
+ const { autoAddSessionLink } = await import('./agentCommands-Mim66pYY.mjs');
94
94
  let added = 0;
95
95
  for (const [port, url] of urlEntries) {
96
96
  const label = urlEntries.length > 1 ? `${name}:${port}` : name;
@@ -136,7 +136,7 @@ async function serviceServe(args) {
136
136
  };
137
137
  process.on("SIGINT", cleanup);
138
138
  process.on("SIGTERM", cleanup);
139
- const { runFrpcTunnel } = await import('./frpc-D3UoKvqr.mjs');
139
+ const { runFrpcTunnel } = await import('./frpc-CoFt3YiO.mjs');
140
140
  await runFrpcTunnel(name, [caddyPort]);
141
141
  } catch (err) {
142
142
  console.error(`Error serving directory: ${err.message}`);
@@ -145,7 +145,7 @@ async function serviceServe(args) {
145
145
  }
146
146
  async function serviceList(_args) {
147
147
  try {
148
- const { connectAndGetMachine } = await import('./commands-BMCNLXjz.mjs');
148
+ const { connectAndGetMachine } = await import('./commands-C07RBbtJ.mjs');
149
149
  const { server, machine } = await connectAndGetMachine();
150
150
  try {
151
151
  const tunnels = await machine.tunnelList({});
@@ -185,7 +185,7 @@ async function serviceDelete(args) {
185
185
  process.exit(1);
186
186
  }
187
187
  try {
188
- const { connectAndGetMachine } = await import('./commands-BMCNLXjz.mjs');
188
+ const { connectAndGetMachine } = await import('./commands-C07RBbtJ.mjs');
189
189
  const { server, machine } = await connectAndGetMachine();
190
190
  try {
191
191
  await machine.tunnelStop({ name });
@@ -1,8 +1,8 @@
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-CVg6eagc.mjs';
5
- import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-VIupR1NK.mjs';
4
+ import { c as connectToHypha } from './run--5q3ieqY.mjs';
5
+ import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-ivV7xAp3.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -4,7 +4,7 @@ import { mkdirSync, writeFileSync, unlinkSync, existsSync, chmodSync, readFileSy
4
4
  import { join } from 'path';
5
5
  import { homedir, platform, arch } from 'os';
6
6
  import { randomUUID, createHash } from 'crypto';
7
- import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-CVg6eagc.mjs';
7
+ import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run--5q3ieqY.mjs';
8
8
  import 'fs/promises';
9
9
  import 'url';
10
10
  import 'node:crypto';
@@ -1,5 +1,5 @@
1
- import { P as resolveModel, a2 as describeMisconfiguration, a3 as buildMachineDeps } from './run-CVg6eagc.mjs';
2
- import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-Bt0Y2j3D.mjs';
1
+ import { P as resolveModel, a2 as describeMisconfiguration, a3 as buildMachineDeps } from './run--5q3ieqY.mjs';
2
+ import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-C3srx9Jx.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-CVg6eagc.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--5q3ieqY.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.235";
2
+ var version = "0.2.236";
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";
@@ -3,6 +3,20 @@ import { promisify } from 'node:util';
3
3
 
4
4
  const PINNED_CLAUDE_CODE_VERSION = "2.1.195";
5
5
  const exec = promisify(exec$1);
6
+ let _reconcile = null;
7
+ function beginClaudeVersionReconcile(log) {
8
+ if (_reconcile) return;
9
+ _reconcile = ensureClaudeCodeVersion(log).catch((e) => {
10
+ log(`[claude-version] check failed: ${e?.message || e}`);
11
+ });
12
+ }
13
+ function awaitClaudeVersionReady(timeoutMs = 6e4) {
14
+ if (!_reconcile) return Promise.resolve();
15
+ return Promise.race([
16
+ _reconcile.then(() => void 0),
17
+ new Promise((resolve) => setTimeout(resolve, timeoutMs))
18
+ ]);
19
+ }
6
20
  async function readClaudeVersion() {
7
21
  try {
8
22
  const { stdout } = await exec("claude --version", { timeout: 1e4 });
@@ -55,4 +69,4 @@ async function ensureClaudeCodeVersion(log, pinned = PINNED_CLAUDE_CODE_VERSION,
55
69
  return { kind: "installed", from: current, to: after ?? pinned };
56
70
  }
57
71
 
58
- export { PINNED_CLAUDE_CODE_VERSION, ensureClaudeCodeVersion };
72
+ export { PINNED_CLAUDE_CODE_VERSION, awaitClaudeVersionReady, beginClaudeVersionReconcile, ensureClaudeCodeVersion };
@@ -1,4 +1,4 @@
1
- import { m as resolveProjectRoot, u as updateIssue, n as getIssue, o as resumeIssue, p as pauseIssue, q as addComment, t as addIssue, v as listIssues, w as searchIssues, x as isVisibleTo } from './run-CVg6eagc.mjs';
1
+ import { m as resolveProjectRoot, u as updateIssue, n as getIssue, o as resumeIssue, p as pauseIssue, q as addComment, t as addIssue, v as listIssues, w as searchIssues, x as isVisibleTo } from './run--5q3ieqY.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -1,6 +1,6 @@
1
- import { m as resolveProjectRoot } from './run-CVg6eagc.mjs';
1
+ import { m as resolveProjectRoot } from './run--5q3ieqY.mjs';
2
2
  import { g as getWorkflow, s as setWorkflowEnabled, r as removeWorkflow, a as saveWorkflow, b as rawWorkflow, l as listWorkflows } from './store-BTs0H_y0.mjs';
3
- import { g as getRun, l as listRuns, r as runWorkflow } from './runStore-DxBjBflT.mjs';
3
+ import { g as getRun, l as listRuns, r as runWorkflow } from './runStore-Bfr7UIzR.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
6
6
  import 'fs';
@@ -116,6 +116,12 @@ function resolveRoleLevel(sharing, userEmail) {
116
116
  }
117
117
  return level;
118
118
  }
119
+ function roleAtLeast(role, min) {
120
+ if (!role) return false;
121
+ const have = ROLE_HIERARCHY[role];
122
+ const need = ROLE_HIERARCHY[min];
123
+ return typeof have === "number" && typeof need === "number" && have >= need;
124
+ }
119
125
  function levelToRole(level) {
120
126
  const entry = Object.entries(ROLE_HIERARCHY).find(([, v]) => v === level);
121
127
  return entry?.[0] ?? null;
@@ -2934,7 +2940,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
2934
2940
  const tunnels = handlers.tunnels;
2935
2941
  if (!tunnels) throw new Error("Tunnel management not available");
2936
2942
  if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
2937
- const { FrpcTunnel } = await import('./frpc-D3UoKvqr.mjs');
2943
+ const { FrpcTunnel } = await import('./frpc-CoFt3YiO.mjs');
2938
2944
  const tunnel = new FrpcTunnel({
2939
2945
  name: params.name,
2940
2946
  ports: params.ports,
@@ -3114,8 +3120,8 @@ async function registerMachineService(server, machineId, metadata, daemonState,
3114
3120
  // require a signed-in, non-anonymous user so the daemon isn't an open
3115
3121
  // OpenAI relay. (No context at all = internal call → allowed.)
3116
3122
  wiseCreateEphemeralToken: async (params, context) => {
3117
- if (context && (!context.user || context.user.is_anonymous)) {
3118
- return { success: false, error: "Sign in to use WISE voice." };
3123
+ if (!roleAtLeast(getEffectiveRole(context, currentMetadata.sharing), "interact")) {
3124
+ return { success: false, error: "Not authorized: WISE voice requires interact access to this machine." };
3119
3125
  }
3120
3126
  const resolved = resolveModel({ provider: "openai" }, process.env);
3121
3127
  const misconfig = describeMisconfiguration(resolved);
@@ -3135,7 +3141,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
3135
3141
  // the realtime WISE voice loop (connected to this session's WISE agent).
3136
3142
  // sessionId set = attached to that session; omitted = global.
3137
3143
  wiseJoinMeeting: async (params, context) => {
3138
- if (context && (!context.user || context.user.is_anonymous)) return { success: false, error: "Sign in to launch a meeting agent." };
3144
+ if (!roleAtLeast(getEffectiveRole(context, currentMetadata.sharing), "interact")) return { success: false, error: "Not authorized: launching a meeting agent requires interact access to this machine." };
3139
3145
  const parsed = parseMeetingUrl(params?.meetingUrl || "");
3140
3146
  if (!parsed) return { success: false, error: "Unrecognized meeting link (supports Zoom, Google Meet, Teams)." };
3141
3147
  const base = (process.env.SVAMP_VEXA_API_URL || "").replace(/\/$/, "");
@@ -3216,7 +3222,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
3216
3222
  }
3217
3223
  },
3218
3224
  wiseLeaveMeeting: async (params, context) => {
3219
- if (context && (!context.user || context.user.is_anonymous)) return { success: false, error: "Sign in." };
3225
+ if (!roleAtLeast(getEffectiveRole(context, currentMetadata.sharing), "interact")) return { success: false, error: "Not authorized: managing a meeting agent requires interact access to this machine." };
3220
3226
  const k = params?.sessionId || (params?.platform && params?.nativeId ? `global:${params.nativeId}` : "");
3221
3227
  const rec = k ? activeMeetingAgents.get(k) : void 0;
3222
3228
  const platform = params?.platform || rec?.platform;
@@ -3233,7 +3239,10 @@ async function registerMachineService(server, machineId, metadata, daemonState,
3233
3239
  }
3234
3240
  },
3235
3241
  // Drives the title-bar "WISE in a meeting" indicator (poll per session).
3236
- wiseMeetingStatus: async (params) => {
3242
+ wiseMeetingStatus: async (params, context) => {
3243
+ if (!roleAtLeast(getEffectiveRole(context, currentMetadata.sharing), "view")) {
3244
+ return { active: false, error: "Not authorized to view meeting status on this machine." };
3245
+ }
3237
3246
  if (params?.sessionId) {
3238
3247
  const rec = activeMeetingAgents.get(params.sessionId);
3239
3248
  let transcript = [];
@@ -3250,7 +3259,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
3250
3259
  // (running inside its session) calls `svamp wise announce "<update>"` when work
3251
3260
  // is done so the room hears about it; this POSTs to the bot's Vexa chat endpoint.
3252
3261
  wiseAnnounce: async (params, context) => {
3253
- if (context && (!context.user || context.user.is_anonymous)) return { success: false, error: "Sign in to announce into a meeting." };
3262
+ if (!roleAtLeast(getEffectiveRole(context, currentMetadata.sharing), "interact")) return { success: false, error: "Not authorized: announcing into a meeting requires interact access to this machine." };
3254
3263
  const text = (params?.text || "").trim();
3255
3264
  if (!text) return { success: false, error: "Nothing to announce: provide text." };
3256
3265
  let rec = params?.sessionId ? activeMeetingAgents.get(params.sessionId) : void 0;
@@ -3284,8 +3293,8 @@ async function registerMachineService(server, machineId, metadata, daemonState,
3284
3293
  // which has no key post-Option-A and hits CORS/"Load failed" calling OpenAI direct.
3285
3294
  wiseSummarize: async (params, context) => {
3286
3295
  trackInbound();
3287
- if (context && (!context.user || context.user.is_anonymous)) {
3288
- return { success: false, error: "Sign in to use WISE." };
3296
+ if (!roleAtLeast(getEffectiveRole(context, currentMetadata.sharing), "interact")) {
3297
+ return { success: false, error: "Not authorized: WISE requires interact access to this machine." };
3289
3298
  }
3290
3299
  const text = (params?.text || "").trim();
3291
3300
  if (!text) return { success: true, answer: "(nothing to summarize)" };
@@ -3336,8 +3345,8 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
3336
3345
  // Option A. The browser uses the returned ephemeral secret for its WebRTC leg.
3337
3346
  wiseMintTranscriptionToken: async (params, context) => {
3338
3347
  trackInbound();
3339
- if (context && (!context.user || context.user.is_anonymous)) {
3340
- return { success: false, error: "Sign in to use dictation." };
3348
+ if (!roleAtLeast(getEffectiveRole(context, currentMetadata.sharing), "interact")) {
3349
+ return { success: false, error: "Not authorized: dictation requires interact access to this machine." };
3341
3350
  }
3342
3351
  const resolved = resolveModel({ provider: "openai" }, process.env);
3343
3352
  const misconfig = describeMisconfiguration(resolved);
@@ -3382,7 +3391,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
3382
3391
  }
3383
3392
  const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
3384
3393
  const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
3385
- const { toolsForRole } = await import('./sideband-Bt0Y2j3D.mjs');
3394
+ const { toolsForRole } = await import('./sideband-C3srx9Jx.mjs');
3386
3395
  const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
3387
3396
  return fmt(r2);
3388
3397
  }
@@ -3481,7 +3490,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
3481
3490
  if (r.error || !r.sender) return { error: r.error || "unauthorized" };
3482
3491
  const callId = "call_" + Math.random().toString(16).slice(2, 12);
3483
3492
  const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
3484
- const { queryCore } = await import('./commands-BMCNLXjz.mjs');
3493
+ const { queryCore } = await import('./commands-C07RBbtJ.mjs');
3485
3494
  const timeout = c.reply?.timeout_sec || 120;
3486
3495
  let result;
3487
3496
  try {
@@ -3651,6 +3660,7 @@ ${d?.error || "not found"}`;
3651
3660
  });
3652
3661
  },
3653
3662
  getLastInboundRpcAt: () => lastInboundRpcAt,
3663
+ getCurrentMetadata: () => currentMetadata,
3654
3664
  setHandlers: (newHandlers) => {
3655
3665
  handlers = newHandlers;
3656
3666
  },
@@ -4849,7 +4859,10 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
4849
4859
  if (meetingActivity.length > 80) meetingActivity.splice(0, meetingActivity.length - 80);
4850
4860
  return { ok: true };
4851
4861
  },
4852
- getMeetingActivity: async () => ({ activity: meetingActivity.slice(-40) }),
4862
+ getMeetingActivity: async (context) => {
4863
+ authorizeRequest(context, metadata.sharing, "view");
4864
+ return { activity: meetingActivity.slice(-40) };
4865
+ },
4853
4866
  channelDescribe: async (id) => {
4854
4867
  const c = channelStore.get(id);
4855
4868
  if (!c || c.enabled === false || c.system) return { error: "not found" };
@@ -6085,19 +6098,23 @@ var projectInfo = /*#__PURE__*/Object.freeze({
6085
6098
  });
6086
6099
 
6087
6100
  async function registerDebugService(server, machineId, deps) {
6101
+ const authorize = (context, role) => authorizeRequest(context, deps.getSharing?.(), role);
6088
6102
  const serviceInfo = await server.registerService(
6089
6103
  {
6090
6104
  id: `svamp-debug-${machineId}`,
6091
6105
  name: `Svamp Debug ${machineId.slice(0, 8)}`,
6092
6106
  type: "svamp-debug",
6093
- config: { visibility: "unlisted" },
6107
+ // require_context: true Hypha injects the caller context as the last arg of every
6108
+ // method, which the authorize() gate below enforces. 'unlisted' only hides discovery.
6109
+ config: { visibility: "unlisted", require_context: true },
6094
6110
  healthCheck: async () => ({
6095
6111
  ok: true,
6096
6112
  machineId,
6097
6113
  uptime: process.uptime(),
6098
6114
  timestamp: Date.now()
6099
6115
  }),
6100
- getSessionStates: async () => {
6116
+ getSessionStates: async (context) => {
6117
+ authorize(context, "view");
6101
6118
  const sessions = deps.getTrackedSessions();
6102
6119
  const states = [];
6103
6120
  for (const s of sessions) {
@@ -6120,27 +6137,33 @@ async function registerDebugService(server, machineId, deps) {
6120
6137
  }
6121
6138
  return states;
6122
6139
  },
6123
- getMachineInfo: async () => ({
6124
- machineId,
6125
- hostname: (await import('os')).hostname(),
6126
- platform: (await import('os')).platform(),
6127
- uptime: process.uptime(),
6128
- sessions: deps.getTrackedSessions().length
6129
- }),
6140
+ getMachineInfo: async (context) => {
6141
+ authorize(context, "view");
6142
+ return {
6143
+ machineId,
6144
+ hostname: (await import('os')).hostname(),
6145
+ platform: (await import('os')).platform(),
6146
+ uptime: process.uptime(),
6147
+ sessions: deps.getTrackedSessions().length
6148
+ };
6149
+ },
6130
6150
  // ── Artifact Sync RPCs ──
6131
- getArtifactSyncStatus: async () => {
6151
+ getArtifactSyncStatus: async (context) => {
6152
+ authorize(context, "view");
6132
6153
  const sync = deps.getArtifactSync?.();
6133
6154
  if (!sync) return { error: "Artifact sync not available" };
6134
6155
  return sync.getStatus();
6135
6156
  },
6136
- forceSyncAll: async () => {
6157
+ forceSyncAll: async (context) => {
6158
+ authorize(context, "admin");
6137
6159
  const sync = deps.getArtifactSync?.();
6138
6160
  const sessionsDir = deps.getSessionsDir?.();
6139
6161
  if (!sync || !sessionsDir) return { error: "Artifact sync not available" };
6140
6162
  await sync.syncAll(sessionsDir, machineId);
6141
6163
  return { success: true, status: sync.getStatus() };
6142
6164
  },
6143
- listRemoteSessions: async () => {
6165
+ listRemoteSessions: async (context) => {
6166
+ authorize(context, "view");
6144
6167
  const sync = deps.getArtifactSync?.();
6145
6168
  if (!sync) return [];
6146
6169
  return await sync.listRemoteSessions();
@@ -10716,6 +10739,7 @@ function summarize(issues) {
10716
10739
  return { total: issues.length, ready: by("ready"), in_progress: by("in_progress"), archived: by("archived") };
10717
10740
  }
10718
10741
 
10742
+ const UNBOUNDED_LOOP_ITERATIONS = 1e6;
10719
10743
  function backlogOraclePending(projectRoot, sessionId) {
10720
10744
  const inScope = (i) => !sessionId || isVisibleTo(i, sessionId);
10721
10745
  return listIssues(projectRoot).filter(inScope).filter((i) => i.status === "ready" || i.status === "in_progress").map((i) => ({ id: i.id }));
@@ -10809,7 +10833,7 @@ function checkLoopBudget(ledger, limits, now, startedAt) {
10809
10833
  const L = limits || {};
10810
10834
  const led = ledger || { turns: 0, tokens: 0, window: [] };
10811
10835
  const pos = (v) => typeof v === "number" && Number.isFinite(v) && v > 0;
10812
- if (pos(L.max_iterations) && led.turns >= L.max_iterations) {
10836
+ if (pos(L.max_iterations) && L.max_iterations < UNBOUNDED_LOOP_ITERATIONS && led.turns >= L.max_iterations) {
10813
10837
  return { exceeded: true, reason: `iteration budget reached (${led.turns}/${L.max_iterations} turns)` };
10814
10838
  }
10815
10839
  if (pos(L.max_runtime_sec) && pos(startedAt)) {
@@ -11721,7 +11745,8 @@ function writeSvampConfig(configPath, config) {
11721
11745
  renameSync$1(tmpPath, configPath);
11722
11746
  return content;
11723
11747
  }
11724
- const DEFAULT_LOOP_MAX_ITERATIONS = 1e3;
11748
+ const DEFAULT_LOOP_MAX_ITERATIONS = UNBOUNDED_LOOP_ITERATIONS;
11749
+ const LOOP_CHECKPOINT_CADENCE = 25;
11725
11750
  function getLoopDir(directory, sessionId) {
11726
11751
  if (sessionId) {
11727
11752
  const scoped = join$1(directory, ".svamp", sessionId, "loop");
@@ -12100,6 +12125,19 @@ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata
12100
12125
  sessionService.pushMessage({ type: "message", message: 'No loop to modify \u2014 start one with: svamp session loop <id> "<task>" --until "<criteria>" --max N', level: "warning" }, "event");
12101
12126
  } else {
12102
12127
  const newMax = typeof cfg.max_iterations === "number" ? cfg.max_iterations : typeof cfg.max_rounds === "number" ? cfg.max_rounds : void 0;
12128
+ const recomposedTask = (() => {
12129
+ try {
12130
+ const gt = existing.goal_task;
12131
+ const un = existing.until;
12132
+ const or = existing.oracle;
12133
+ const effMax = newMax != null ? newMax : existing.max_iterations;
12134
+ if (typeof effMax === "number" && effMax > 0 && (gt || un)) {
12135
+ return buildGoalCondition({ task: gt, until: un, oracle: or, maxIterations: Math.min(effMax, LOOP_CHECKPOINT_CADENCE) });
12136
+ }
12137
+ } catch {
12138
+ }
12139
+ return void 0;
12140
+ })();
12103
12141
  try {
12104
12142
  const lcPath = join$1(getLoopDir(directory, sessionId), "loop.config.json");
12105
12143
  const lc = readLoopJson(directory, sessionId, "loop.config.json") || {};
@@ -12120,6 +12158,7 @@ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata
12120
12158
  phase: "continue",
12121
12159
  iteration: 0,
12122
12160
  ...newMax != null ? { max_iterations: newMax } : {},
12161
+ ...recomposedTask ? { task: recomposedTask } : {},
12123
12162
  ...bumpedBudget ? { budget: { ...existing.budget || {}, ...bumpedBudget } } : {},
12124
12163
  completed_at: void 0,
12125
12164
  gave_up_reason: void 0,
@@ -12138,6 +12177,7 @@ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata
12138
12177
  if (cur) writeGoalLoopState(directory, sessionId, {
12139
12178
  ...cur,
12140
12179
  ...newMax != null ? { max_iterations: newMax } : {},
12180
+ ...recomposedTask ? { task: recomposedTask } : {},
12141
12181
  ...bumpedBudget ? { budget: { ...cur.budget || {}, ...bumpedBudget } } : {}
12142
12182
  });
12143
12183
  } catch {
@@ -12151,7 +12191,7 @@ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata
12151
12191
  const explicitMax = typeof cfg.max_iterations === "number" ? cfg.max_iterations : typeof cfg.max_rounds === "number" ? cfg.max_rounds : void 0;
12152
12192
  const hasExplicitMax = typeof explicitMax === "number" && explicitMax > 0;
12153
12193
  const hardMax = hasExplicitMax ? explicitMax : DEFAULT_LOOP_MAX_ITERATIONS;
12154
- const softTurnCap = hasExplicitMax ? explicitMax : 20;
12194
+ const softTurnCap = Math.min(hardMax, LOOP_CHECKPOINT_CADENCE);
12155
12195
  const condition = buildGoalCondition({ task, until, oracle, maxIterations: softTurnCap });
12156
12196
  const budget = parseLoopBudget(cfg.budget);
12157
12197
  try {
@@ -12607,7 +12647,7 @@ async function startDaemon(options) {
12607
12647
  saveExposedTunnels(list);
12608
12648
  }
12609
12649
  async function createExposedTunnel(spec) {
12610
- const { FrpcTunnel } = await import('./frpc-D3UoKvqr.mjs');
12650
+ const { FrpcTunnel } = await import('./frpc-CoFt3YiO.mjs');
12611
12651
  const tunnel = new FrpcTunnel({
12612
12652
  name: spec.name,
12613
12653
  ports: spec.ports,
@@ -12627,15 +12667,15 @@ async function startDaemon(options) {
12627
12667
  return tunnel;
12628
12668
  }
12629
12669
  const tunnelRecreateState = /* @__PURE__ */ new Map();
12630
- const { ServeManager } = await import('./serveManager-TUKxMan6.mjs');
12670
+ const { ServeManager } = await import('./serveManager-DBqhEdOE.mjs');
12631
12671
  const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
12632
12672
  ensureAutoInstalledSkills(logger).catch(() => {
12633
12673
  });
12634
12674
  ensureAutoInstalledCommands(logger);
12635
12675
  (async () => {
12636
12676
  try {
12637
- const { ensureClaudeCodeVersion } = await import('./pinnedClaudeCode-VIupR1NK.mjs');
12638
- await ensureClaudeCodeVersion((msg) => logger.log(msg));
12677
+ const { beginClaudeVersionReconcile } = await import('./pinnedClaudeCode-ivV7xAp3.mjs');
12678
+ beginClaudeVersionReconcile((msg) => logger.log(msg));
12639
12679
  } catch (e) {
12640
12680
  logger.log(`[claude-version] check failed: ${e?.message || e}`);
12641
12681
  }
@@ -14636,11 +14676,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
14636
14676
  });
14637
14677
  },
14638
14678
  onIssue: async (params) => {
14639
- const { issueRpc } = await import('./rpc-DPWxDUve.mjs');
14679
+ const { issueRpc } = await import('./rpc-BPCA-q42.mjs');
14640
14680
  return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
14641
14681
  },
14642
14682
  onWorkflow: async (params) => {
14643
- const { workflowRpc } = await import('./rpc-DaRTfCjS.mjs');
14683
+ const { workflowRpc } = await import('./rpc-Def2Apuq.mjs');
14644
14684
  return workflowRpc(params?.cwd || directory, params || {});
14645
14685
  },
14646
14686
  onRipgrep: async (args, cwd) => {
@@ -15173,11 +15213,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
15173
15213
  });
15174
15214
  },
15175
15215
  onIssue: async (params) => {
15176
- const { issueRpc } = await import('./rpc-DPWxDUve.mjs');
15216
+ const { issueRpc } = await import('./rpc-BPCA-q42.mjs');
15177
15217
  return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
15178
15218
  },
15179
15219
  onWorkflow: async (params) => {
15180
- const { workflowRpc } = await import('./rpc-DaRTfCjS.mjs');
15220
+ const { workflowRpc } = await import('./rpc-Def2Apuq.mjs');
15181
15221
  return workflowRpc(params?.cwd || directory, params || {});
15182
15222
  },
15183
15223
  onRipgrep: async (args, cwd) => {
@@ -15854,8 +15894,10 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
15854
15894
  return null;
15855
15895
  },
15856
15896
  getArtifactSync: () => artifactSync,
15857
- getSessionsDir: () => SVAMP_HOME
15897
+ getSessionsDir: () => SVAMP_HOME,
15858
15898
  // Legacy; debug service uses session index now
15899
+ // SECURITY #0207: authorize debug RPCs against the machine's live sharing config.
15900
+ getSharing: () => machineService.getCurrentMetadata().sharing
15859
15901
  });
15860
15902
  logger.log(`Debug service registered: svamp-debug-${machineId}`);
15861
15903
  const supervised = process.env.SVAMP_SUPERVISED === "1";
@@ -15909,6 +15951,11 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
15909
15951
  }
15910
15952
  }
15911
15953
  if (persistedSessions.length > 0) {
15954
+ try {
15955
+ const { awaitClaudeVersionReady } = await import('./pinnedClaudeCode-ivV7xAp3.mjs');
15956
+ await awaitClaudeVersionReady();
15957
+ } catch {
15958
+ }
15912
15959
  logger.log(`Restoring ${persistedSessions.length} persisted session(s)...`);
15913
15960
  const restoreConcurrency = Math.max(1, parseInt(process.env.SVAMP_RESTORE_CONCURRENCY || "8", 10) || 8);
15914
15961
  const restoreOne = async (persisted) => {
@@ -16047,7 +16094,7 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
16047
16094
  const PING_TIMEOUT_MS = 15e3;
16048
16095
  const POST_RECONNECT_GRACE_MS = 2e4;
16049
16096
  const RECONNECT_JITTER_MS = 2500;
16050
- const { WorkflowScheduler } = await import('./scheduler-CPX7QBP-.mjs');
16097
+ const { WorkflowScheduler } = await import('./scheduler-Dfr3y3FI.mjs');
16051
16098
  const workflowScheduler = new WorkflowScheduler({
16052
16099
  projectRoots: () => {
16053
16100
  const dirs = /* @__PURE__ */ new Set();
@@ -1,4 +1,4 @@
1
- import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { a4 as applyClaudeProxyEnv, a5 as composeSessionId, a6 as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, a7 as generateHookSettings } from './run-CVg6eagc.mjs';
1
+ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { a4 as applyClaudeProxyEnv, a5 as composeSessionId, a6 as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, a7 as generateHookSettings } from './run--5q3ieqY.mjs';
2
2
  import os from 'node:os';
3
3
  import { resolve, join } from 'node:path';
4
4
  import { existsSync, readFileSync, watch } from 'node:fs';
@@ -2,7 +2,7 @@ import { spawn } from 'node:child_process';
2
2
  import { existsSync, readFileSync, mkdirSync, writeFileSync, renameSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
  import { c as workflowSteps, d as workflowsDir } from './store-BTs0H_y0.mjs';
5
- import { v as listIssues, t as addIssue } from './run-CVg6eagc.mjs';
5
+ import { v as listIssues, t as addIssue } from './run--5q3ieqY.mjs';
6
6
 
7
7
  const MAX_RUNS_PER_WORKFLOW = 50;
8
8
  const MAX_STREAM_CHARS = 8e3;
@@ -1,6 +1,6 @@
1
- import { m as resolveProjectRoot, y as cronMatches } from './run-CVg6eagc.mjs';
1
+ import { m as resolveProjectRoot, y as cronMatches } from './run--5q3ieqY.mjs';
2
2
  import { l as listWorkflows, i as isWorkflowEnabled, w as workflowCrons } from './store-BTs0H_y0.mjs';
3
- import { r as runWorkflow } from './runStore-DxBjBflT.mjs';
3
+ import { r as runWorkflow } from './runStore-Bfr7UIzR.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
6
6
  import 'fs';
@@ -54,7 +54,7 @@ async function handleServeCommand() {
54
54
  }
55
55
  }
56
56
  async function serveAdd(args, machineId) {
57
- const { connectAndGetMachine } = await import('./commands-BMCNLXjz.mjs');
57
+ const { connectAndGetMachine } = await import('./commands-C07RBbtJ.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-BMCNLXjz.mjs');
96
+ const { connectAndGetMachine } = await import('./commands-C07RBbtJ.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-BMCNLXjz.mjs');
185
+ const { connectAndGetMachine } = await import('./commands-C07RBbtJ.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-BMCNLXjz.mjs');
205
+ const { connectAndGetMachine } = await import('./commands-C07RBbtJ.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-BMCNLXjz.mjs');
238
+ const { connectAndGetMachine } = await import('./commands-C07RBbtJ.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-CVg6eagc.mjs';
7
+ import { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run--5q3ieqY.mjs';
8
8
  import 'os';
9
9
  import 'fs/promises';
10
10
  import 'url';
@@ -733,7 +733,7 @@ class ServeManager {
733
733
  const mount = this.mounts.get(mountName);
734
734
  const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, buildLinkSubdomain(subdomainSafe, mount.linkToken)]]) : void 0;
735
735
  try {
736
- const { FrpcTunnel } = await import('./frpc-D3UoKvqr.mjs');
736
+ const { FrpcTunnel } = await import('./frpc-CoFt3YiO.mjs');
737
737
  let tunnel;
738
738
  tunnel = new FrpcTunnel({
739
739
  name: tunnelName,
@@ -1,4 +1,4 @@
1
- import { R as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-CVg6eagc.mjs';
1
+ import { R as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run--5q3ieqY.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.235",
3
+ "version": "0.2.236",
4
4
  "description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
5
5
  "author": "Amun AI AB",
6
6
  "license": "SEE LICENSE IN LICENSE",