svamp-cli 0.2.134 → 0.2.135

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.
@@ -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 { m as shortId } from './run-DR763Rgk.mjs';
5
+ import { m as shortId } from './run-gpXzhDA6.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-DR763Rgk.mjs').then(function (n) { return n.Z; });
99
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n._; });
100
100
  const desc = sanitizeDescription(description, 240);
101
101
  if (!desc) {
102
102
  console.error("Project description is empty.");
@@ -180,7 +180,7 @@ async function sessionBroadcast(action, args) {
180
180
  console.log(`Broadcast sent: ${action}`);
181
181
  }
182
182
  async function connectToMachineService() {
183
- const { connectAndGetMachine } = await import('./commands-CtY5nmos.mjs');
183
+ const { connectAndGetMachine } = await import('./commands-K2-vteB-.mjs');
184
184
  return connectAndGetMachine();
185
185
  }
186
186
  async function inboxSend(targetSessionId, opts) {
@@ -197,7 +197,7 @@ async function inboxSend(targetSessionId, opts) {
197
197
  }
198
198
  const { server, machine } = await connectToMachineService();
199
199
  try {
200
- const { resolveSessionId } = await import('./commands-CtY5nmos.mjs');
200
+ const { resolveSessionId } = await import('./commands-K2-vteB-.mjs');
201
201
  const sessions = await machine.listSessions();
202
202
  const match = resolveSessionId(sessions, targetSessionId);
203
203
  const fullTargetId = match.sessionId;
@@ -1,4 +1,4 @@
1
- import { D as resolveModel } from './run-DR763Rgk.mjs';
1
+ import { D as resolveModel } from './run-gpXzhDA6.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-DR763Rgk.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-gpXzhDA6.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-DR763Rgk.mjs').then(function (n) { return n.a4; });
37
+ const { getLoadedConfig } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a5; });
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-DR763Rgk.mjs').then(function (n) { return n.a6; });
54
+ const { restartDaemon } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a7; });
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-BuYN3SJw.mjs');
347
+ const { handleServiceCommand } = await import('./commands-372fH_Ye.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-KPNZF66M.mjs');
355
+ const { handleServeCommand } = await import('./serveCommands-C6U7M8nI.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-n1VNkeY_.mjs');
364
+ const { processCommand } = await import('./commands-CqjHsfm4.mjs');
365
365
  let machineId;
366
366
  const processArgs = args.slice(1);
367
367
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -375,14 +375,14 @@ async function main() {
375
375
  }), machineId);
376
376
  process.exit(0);
377
377
  } else if (subcommand === "trigger" || subcommand === "triggers" || subcommand === "routine" || subcommand === "routines") {
378
- const { routineCommand } = await import('./commands-ArwIozqO.mjs');
378
+ const { routineCommand } = await import('./commands-g87ont38.mjs');
379
379
  await routineCommand(args.slice(1));
380
380
  process.exit(0);
381
381
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
382
382
  await handleWiseAgentCommand(args.slice(1));
383
383
  process.exit(0);
384
384
  } else if (subcommand === "feature" || subcommand === "crew") {
385
- const { crewCommand } = await import('./commands-Dz-Gbl4M.mjs');
385
+ const { crewCommand } = await import('./commands-Du2aT4iG.mjs');
386
386
  await crewCommand(args.slice(1));
387
387
  process.exit(0);
388
388
  } else if (subcommand === "--help" || subcommand === "-h") {
@@ -390,7 +390,7 @@ async function main() {
390
390
  } else if (!subcommand || subcommand === "start") {
391
391
  await handleInteractiveCommand();
392
392
  } else if (subcommand === "--version" || subcommand === "-v") {
393
- const pkg = await import('./package-bDnyfkvV.mjs').catch(() => ({ default: { version: "unknown" } }));
393
+ const pkg = await import('./package-B_ObzpnN.mjs').catch(() => ({ default: { version: "unknown" } }));
394
394
  console.log(`svamp version: ${pkg.default.version}`);
395
395
  } else {
396
396
  console.error(`Unknown command: ${subcommand}`);
@@ -399,7 +399,7 @@ async function main() {
399
399
  }
400
400
  }
401
401
  async function handleInteractiveCommand() {
402
- const { runInteractive } = await import('./run-FErIPXzp.mjs');
402
+ const { runInteractive } = await import('./run-EBzkqp4Y.mjs');
403
403
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
404
404
  let directory = process.cwd();
405
405
  let resumeSessionId;
@@ -444,7 +444,7 @@ async function handleAgentCommand() {
444
444
  return;
445
445
  }
446
446
  if (agentArgs[0] === "list") {
447
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-DR763Rgk.mjs').then(function (n) { return n.a0; });
447
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a1; });
448
448
  console.log("Known agents:");
449
449
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
450
450
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -456,7 +456,7 @@ async function handleAgentCommand() {
456
456
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
457
457
  return;
458
458
  }
459
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-DR763Rgk.mjs').then(function (n) { return n.a0; });
459
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a1; });
460
460
  let cwd = process.cwd();
461
461
  const filteredArgs = [];
462
462
  for (let i = 0; i < agentArgs.length; i++) {
@@ -480,12 +480,12 @@ async function handleAgentCommand() {
480
480
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
481
481
  let backend;
482
482
  if (KNOWN_MCP_AGENTS[config.agentName]) {
483
- const { CodexMcpBackend } = await import('./run-DR763Rgk.mjs').then(function (n) { return n.a1; });
483
+ const { CodexMcpBackend } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a2; });
484
484
  backend = new CodexMcpBackend({ cwd, log: logFn });
485
485
  } else {
486
- const { AcpBackend } = await import('./run-DR763Rgk.mjs').then(function (n) { return n.$; });
487
- const { GeminiTransport } = await import('./run-DR763Rgk.mjs').then(function (n) { return n.a2; });
488
- const { DefaultTransport } = await import('./run-DR763Rgk.mjs').then(function (n) { return n._; });
486
+ const { AcpBackend } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a0; });
487
+ const { GeminiTransport } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a3; });
488
+ const { DefaultTransport } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.$; });
489
489
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
490
490
  backend = new AcpBackend({
491
491
  agentName: config.agentName,
@@ -612,7 +612,7 @@ async function handleSessionCommand() {
612
612
  process.exit(1);
613
613
  }
614
614
  }
615
- const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-CtY5nmos.mjs');
615
+ const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-K2-vteB-.mjs');
616
616
  const parseFlagStr = (flag, shortFlag) => {
617
617
  for (let i = 1; i < sessionArgs.length; i++) {
618
618
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -680,7 +680,7 @@ async function handleSessionCommand() {
680
680
  allowDomain.push(sessionArgs[++i]);
681
681
  }
682
682
  }
683
- const { parseShareArg } = await import('./commands-CtY5nmos.mjs');
683
+ const { parseShareArg } = await import('./commands-K2-vteB-.mjs');
684
684
  const shareEntries = share.map((s) => parseShareArg(s));
685
685
  await sessionSpawn(agent, dir, targetMachineId, {
686
686
  message,
@@ -765,7 +765,7 @@ async function handleSessionCommand() {
765
765
  console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
766
766
  process.exit(1);
767
767
  }
768
- const { sessionEditMessage } = await import('./commands-CtY5nmos.mjs');
768
+ const { sessionEditMessage } = await import('./commands-K2-vteB-.mjs');
769
769
  await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
770
770
  } else if (sessionSubcommand === "refine") {
771
771
  if (!sessionArgs[1] || !sessionArgs[2]) {
@@ -773,7 +773,7 @@ async function handleSessionCommand() {
773
773
  console.error(" Asks the agent to revise its latest reply in place (no extra round).");
774
774
  process.exit(1);
775
775
  }
776
- const { sessionRefineLastReply } = await import('./commands-CtY5nmos.mjs');
776
+ const { sessionRefineLastReply } = await import('./commands-K2-vteB-.mjs');
777
777
  await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
778
778
  } else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
779
779
  if (!sessionArgs[1]) {
@@ -781,7 +781,7 @@ async function handleSessionCommand() {
781
781
  console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
782
782
  process.exit(1);
783
783
  }
784
- const { sessionUndoEdit } = await import('./commands-CtY5nmos.mjs');
784
+ const { sessionUndoEdit } = await import('./commands-K2-vteB-.mjs');
785
785
  await sessionUndoEdit(sessionArgs[1], targetMachineId);
786
786
  } else if (sessionSubcommand === "query") {
787
787
  const dir = sessionArgs[1];
@@ -791,7 +791,7 @@ async function handleSessionCommand() {
791
791
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
792
792
  process.exit(1);
793
793
  }
794
- const { sessionQuery } = await import('./commands-CtY5nmos.mjs');
794
+ const { sessionQuery } = await import('./commands-K2-vteB-.mjs');
795
795
  await sessionQuery(dir, prompt, targetMachineId, {
796
796
  timeout: parseFlagInt("--timeout"),
797
797
  json: hasFlag("--json"),
@@ -824,7 +824,7 @@ async function handleSessionCommand() {
824
824
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
825
825
  process.exit(1);
826
826
  }
827
- const { sessionApprove } = await import('./commands-CtY5nmos.mjs');
827
+ const { sessionApprove } = await import('./commands-K2-vteB-.mjs');
828
828
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
829
829
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
830
830
  json: hasFlag("--json")
@@ -834,7 +834,7 @@ async function handleSessionCommand() {
834
834
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
835
835
  process.exit(1);
836
836
  }
837
- const { sessionDeny } = await import('./commands-CtY5nmos.mjs');
837
+ const { sessionDeny } = await import('./commands-K2-vteB-.mjs');
838
838
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
839
839
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
840
840
  json: hasFlag("--json")
@@ -876,7 +876,7 @@ async function handleSessionCommand() {
876
876
  console.error("Usage: svamp session set-title <title>");
877
877
  process.exit(1);
878
878
  }
879
- const { sessionSetTitle } = await import('./agentCommands-5XCerjqh.mjs');
879
+ const { sessionSetTitle } = await import('./agentCommands-DUGnqRQj.mjs');
880
880
  await sessionSetTitle(title);
881
881
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
882
882
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -884,7 +884,7 @@ async function handleSessionCommand() {
884
884
  console.error("Usage: svamp session set-project-description <text>");
885
885
  process.exit(1);
886
886
  }
887
- const { sessionSetProjectDescription } = await import('./agentCommands-5XCerjqh.mjs');
887
+ const { sessionSetProjectDescription } = await import('./agentCommands-DUGnqRQj.mjs');
888
888
  await sessionSetProjectDescription(desc);
889
889
  } else if (sessionSubcommand === "set-link") {
890
890
  const url = sessionArgs[1];
@@ -893,7 +893,7 @@ async function handleSessionCommand() {
893
893
  process.exit(1);
894
894
  }
895
895
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
896
- const { sessionSetLink } = await import('./agentCommands-5XCerjqh.mjs');
896
+ const { sessionSetLink } = await import('./agentCommands-DUGnqRQj.mjs');
897
897
  await sessionSetLink(url, label);
898
898
  } else if (sessionSubcommand === "notify") {
899
899
  const message = sessionArgs[1];
@@ -902,7 +902,7 @@ async function handleSessionCommand() {
902
902
  process.exit(1);
903
903
  }
904
904
  const level = parseFlagStr("--level") || "info";
905
- const { sessionNotify } = await import('./agentCommands-5XCerjqh.mjs');
905
+ const { sessionNotify } = await import('./agentCommands-DUGnqRQj.mjs');
906
906
  await sessionNotify(message, level);
907
907
  } else if (sessionSubcommand === "broadcast") {
908
908
  const action = sessionArgs[1];
@@ -910,7 +910,7 @@ async function handleSessionCommand() {
910
910
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
911
911
  process.exit(1);
912
912
  }
913
- const { sessionBroadcast } = await import('./agentCommands-5XCerjqh.mjs');
913
+ const { sessionBroadcast } = await import('./agentCommands-DUGnqRQj.mjs');
914
914
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
915
915
  } else if (sessionSubcommand === "inbox") {
916
916
  const inboxSubcmd = sessionArgs[1];
@@ -921,7 +921,7 @@ async function handleSessionCommand() {
921
921
  process.exit(1);
922
922
  }
923
923
  if (agentSessionId) {
924
- const { inboxSend } = await import('./agentCommands-5XCerjqh.mjs');
924
+ const { inboxSend } = await import('./agentCommands-DUGnqRQj.mjs');
925
925
  await inboxSend(sessionArgs[2], {
926
926
  body: sessionArgs[3],
927
927
  subject: parseFlagStr("--subject"),
@@ -936,7 +936,7 @@ async function handleSessionCommand() {
936
936
  }
937
937
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
938
938
  if (agentSessionId && !sessionArgs[2]) {
939
- const { inboxList } = await import('./agentCommands-5XCerjqh.mjs');
939
+ const { inboxList } = await import('./agentCommands-DUGnqRQj.mjs');
940
940
  await inboxList({
941
941
  unread: hasFlag("--unread"),
942
942
  limit: parseFlagInt("--limit"),
@@ -958,7 +958,7 @@ async function handleSessionCommand() {
958
958
  process.exit(1);
959
959
  }
960
960
  if (agentSessionId && !sessionArgs[3]) {
961
- const { inboxList } = await import('./agentCommands-5XCerjqh.mjs');
961
+ const { inboxList } = await import('./agentCommands-DUGnqRQj.mjs');
962
962
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
963
963
  } else if (sessionArgs[3]) {
964
964
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -968,7 +968,7 @@ async function handleSessionCommand() {
968
968
  }
969
969
  } else if (inboxSubcmd === "reply") {
970
970
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
971
- const { inboxReply } = await import('./agentCommands-5XCerjqh.mjs');
971
+ const { inboxReply } = await import('./agentCommands-DUGnqRQj.mjs');
972
972
  await inboxReply(sessionArgs[2], sessionArgs[3]);
973
973
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
974
974
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -1004,7 +1004,7 @@ async function handleMachineCommand() {
1004
1004
  return;
1005
1005
  }
1006
1006
  if (machineSubcommand === "share") {
1007
- const { machineShare } = await import('./commands-CtY5nmos.mjs');
1007
+ const { machineShare } = await import('./commands-K2-vteB-.mjs');
1008
1008
  let machineId;
1009
1009
  const shareArgs = [];
1010
1010
  for (let i = 1; i < machineArgs.length; i++) {
@@ -1055,14 +1055,14 @@ async function handleMachineCommand() {
1055
1055
  process.exit(1);
1056
1056
  }
1057
1057
  if (all) {
1058
- const { fleetExec } = await import('./fleet-s51HYyof.mjs');
1058
+ const { fleetExec } = await import('./fleet-BxQs8C8X.mjs');
1059
1059
  await fleetExec(command, { cwd });
1060
1060
  } else {
1061
- const { machineExec } = await import('./commands-CtY5nmos.mjs');
1061
+ const { machineExec } = await import('./commands-K2-vteB-.mjs');
1062
1062
  await machineExec(machineId, command, cwd);
1063
1063
  }
1064
1064
  } else if (machineSubcommand === "info") {
1065
- const { machineInfo } = await import('./commands-CtY5nmos.mjs');
1065
+ const { machineInfo } = await import('./commands-K2-vteB-.mjs');
1066
1066
  let machineId;
1067
1067
  for (let i = 1; i < machineArgs.length; i++) {
1068
1068
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1082,10 +1082,10 @@ async function handleMachineCommand() {
1082
1082
  level = machineArgs[++i];
1083
1083
  }
1084
1084
  }
1085
- const { machineNotify } = await import('./agentCommands-5XCerjqh.mjs');
1085
+ const { machineNotify } = await import('./agentCommands-DUGnqRQj.mjs');
1086
1086
  await machineNotify(message, level);
1087
1087
  } else if (machineSubcommand === "ls") {
1088
- const { machineLs } = await import('./commands-CtY5nmos.mjs');
1088
+ const { machineLs } = await import('./commands-K2-vteB-.mjs');
1089
1089
  let machineId;
1090
1090
  let showHidden = false;
1091
1091
  let path;
@@ -1141,20 +1141,20 @@ Examples:
1141
1141
  };
1142
1142
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1143
1143
  if (sub === "status") {
1144
- const { fleetStatus } = await import('./fleet-s51HYyof.mjs');
1144
+ const { fleetStatus } = await import('./fleet-BxQs8C8X.mjs');
1145
1145
  await fleetStatus();
1146
1146
  } else if (sub === "upgrade-claude") {
1147
- const { fleetUpgradeClaude } = await import('./fleet-s51HYyof.mjs');
1147
+ const { fleetUpgradeClaude } = await import('./fleet-BxQs8C8X.mjs');
1148
1148
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1149
1149
  } else if (sub === "upgrade-svamp") {
1150
- const { fleetUpgradeSvamp } = await import('./fleet-s51HYyof.mjs');
1150
+ const { fleetUpgradeSvamp } = await import('./fleet-BxQs8C8X.mjs');
1151
1151
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
1152
1152
  } else if (sub === "daemon-restart") {
1153
- const { fleetDaemonRestart } = await import('./fleet-s51HYyof.mjs');
1153
+ const { fleetDaemonRestart } = await import('./fleet-BxQs8C8X.mjs');
1154
1154
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1155
1155
  } else if (sub === "push-skill") {
1156
1156
  const name = fleetArgs[1];
1157
- const { fleetPushSkill } = await import('./fleet-s51HYyof.mjs');
1157
+ const { fleetPushSkill } = await import('./fleet-BxQs8C8X.mjs');
1158
1158
  await fleetPushSkill(name);
1159
1159
  } else {
1160
1160
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1170,7 +1170,7 @@ async function handleSkillsCommand() {
1170
1170
  await printSkillsHelp();
1171
1171
  return;
1172
1172
  }
1173
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-DN7-mLf3.mjs');
1173
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-C9_gRWF1.mjs');
1174
1174
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1175
1175
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1176
1176
  if (!query) {
@@ -1217,7 +1217,7 @@ async function loginToHypha() {
1217
1217
  process.exit(1);
1218
1218
  }
1219
1219
  const anchor = anchorArg.replace(/\/+$/, "");
1220
- const { loadInstanceConfig } = await import('./run-DR763Rgk.mjs').then(function (n) { return n.a4; });
1220
+ const { loadInstanceConfig } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a5; });
1221
1221
  let cfg = null;
1222
1222
  try {
1223
1223
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1328,7 +1328,7 @@ async function logoutFromHypha() {
1328
1328
  } catch {
1329
1329
  }
1330
1330
  try {
1331
- const { clearInstanceConfigCache } = await import('./run-DR763Rgk.mjs').then(function (n) { return n.a4; });
1331
+ const { clearInstanceConfigCache } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a5; });
1332
1332
  clearInstanceConfigCache();
1333
1333
  } catch {
1334
1334
  }
@@ -1666,7 +1666,7 @@ async function applyClaudeAuthFlags(argv) {
1666
1666
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1667
1667
  );
1668
1668
  }
1669
- const mod = await import('./run-DR763Rgk.mjs').then(function (n) { return n.a3; });
1669
+ const mod = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a4; });
1670
1670
  if (hasHypha) {
1671
1671
  let url;
1672
1672
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1720,7 +1720,7 @@ async function applyDaemonShareFlag(argv) {
1720
1720
  }
1721
1721
  }
1722
1722
  if (collected.length === 0) return;
1723
- const { updateEnvFile } = await import('./run-DR763Rgk.mjs').then(function (n) { return n.a3; });
1723
+ const { updateEnvFile } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a4; });
1724
1724
  const seen = /* @__PURE__ */ new Set();
1725
1725
  const deduped = collected.filter((e) => {
1726
1726
  const k = e.toLowerCase();
@@ -1753,7 +1753,7 @@ async function handleWiseAgentCommand(rest) {
1753
1753
  }
1754
1754
  });
1755
1755
  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(" ");
1756
- const { wiseAskCli } = await import('./commands-CtY5nmos.mjs');
1756
+ const { wiseAskCli } = await import('./commands-K2-vteB-.mjs');
1757
1757
  await wiseAskCli(machineId, message, sessionId, { json });
1758
1758
  return;
1759
1759
  }
@@ -1765,7 +1765,7 @@ async function handleWiseAgentCommand(rest) {
1765
1765
  }
1766
1766
  return void 0;
1767
1767
  };
1768
- const { runWiseVoiceCli } = await import('./headlessCli-CVBPgwuy.mjs');
1768
+ const { runWiseVoiceCli } = await import('./headlessCli-BZdzfGyK.mjs');
1769
1769
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1770
1770
  return;
1771
1771
  }
@@ -1807,7 +1807,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1807
1807
  return;
1808
1808
  }
1809
1809
  const authArgs = rest.slice(1);
1810
- const mod = await import('./auth-OUwQ2UwJ.mjs');
1810
+ const mod = await import('./auth-BWxPTz8i.mjs');
1811
1811
  let action;
1812
1812
  try {
1813
1813
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1817,7 +1817,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1817
1817
  return;
1818
1818
  }
1819
1819
  if (action) {
1820
- const { updateEnvFile } = await import('./run-DR763Rgk.mjs').then(function (n) { return n.a3; });
1820
+ const { updateEnvFile } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a4; });
1821
1821
  const updates = mod.buildWiseAgentEnvUpdates(action);
1822
1822
  updateEnvFile(updates);
1823
1823
  for (const [k, v] of Object.entries(updates)) {
@@ -1831,7 +1831,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1831
1831
  }
1832
1832
  async function handleDaemonAuthCommand(argv) {
1833
1833
  const sub = (argv[0] || "status").toLowerCase();
1834
- const mod = await import('./run-DR763Rgk.mjs').then(function (n) { return n.a3; });
1834
+ const mod = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a4; });
1835
1835
  if (sub === "--help" || sub === "-h" || sub === "help") {
1836
1836
  console.log(`
1837
1837
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2144,7 +2144,7 @@ Examples:
2144
2144
  async function printSkillsHelp() {
2145
2145
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2146
2146
  try {
2147
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-DR763Rgk.mjs').then(function (n) { return n.a5; });
2147
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-gpXzhDA6.mjs').then(function (n) { return n.a6; });
2148
2148
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2149
2149
  } catch {
2150
2150
  }
@@ -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-BQMO1bd_.mjs');
61
+ const { runFrpcTunnel } = await import('./frpc-iVFYzz91.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-CtY5nmos.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-K2-vteB-.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-BQMO1bd_.mjs');
126
+ const { runFrpcTunnel } = await import('./frpc-iVFYzz91.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-CtY5nmos.mjs');
135
+ const { connectAndGetMachine } = await import('./commands-K2-vteB-.mjs');
136
136
  const { server, machine } = await connectAndGetMachine();
137
137
  try {
138
138
  const tunnels = await machine.tunnelList({});
@@ -172,7 +172,7 @@ async function serviceDelete(args) {
172
172
  process.exit(1);
173
173
  }
174
174
  try {
175
- const { connectAndGetMachine } = await import('./commands-CtY5nmos.mjs');
175
+ const { connectAndGetMachine } = await import('./commands-K2-vteB-.mjs');
176
176
  const { server, machine } = await connectAndGetMachine();
177
177
  try {
178
178
  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-DR763Rgk.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-gpXzhDA6.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-CtY5nmos.mjs';
3
+ import { connectAndGetMachine } from './commands-K2-vteB-.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-DR763Rgk.mjs';
8
+ import './run-gpXzhDA6.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
- import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-CtY5nmos.mjs';
2
+ import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-K2-vteB-.mjs';
3
3
  import { execSync } from 'node:child_process';
4
- import { m as shortId } from './run-DR763Rgk.mjs';
4
+ import { m as shortId } from './run-gpXzhDA6.mjs';
5
5
  import 'node:path';
6
6
  import 'node:os';
7
7
  import 'os';
@@ -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 { I as formatHandle, J as normalizeAllowedUser, K as loadSecurityContextConfig, L as resolveSecurityContext, M as buildSecurityContextFromFlags, N as mergeSecurityContexts, c as connectToHypha, O as buildSessionShareUrl, P as computeOutboundHop, m as shortId, Q as buildMachineShareUrl, T as parseHandle, U as handleMatchesMetadata } from './run-DR763Rgk.mjs';
5
+ import { I as formatHandle, J as normalizeAllowedUser, K as loadSecurityContextConfig, L as resolveSecurityContext, M as buildSecurityContextFromFlags, N as mergeSecurityContexts, c as connectToHypha, O as buildSessionShareUrl, P as computeOutboundHop, m as shortId, Q as buildMachineShareUrl, T as parseHandle, U as handleMatchesMetadata } from './run-gpXzhDA6.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -1,7 +1,7 @@
1
1
  import { execSync, execFileSync } from 'node:child_process';
2
2
  import { randomUUID } from 'node:crypto';
3
3
  import { createServer } from 'node:http';
4
- import { E as readChecklist, F as compileChecklist, G as RoutineStore, H as RoutineRunner } from './run-DR763Rgk.mjs';
4
+ import { E as readChecklist, F as compileChecklist, G as RoutineStore, H as RoutineRunner } from './run-gpXzhDA6.mjs';
5
5
  import 'os';
6
6
  import 'fs/promises';
7
7
  import 'fs';
@@ -104,7 +104,7 @@ Criteria: ${res.criteria || "(none)"}
104
104
  urgency: "normal",
105
105
  hopCount: 1
106
106
  };
107
- const { connectAndGetMachine } = await import('./commands-CtY5nmos.mjs');
107
+ const { connectAndGetMachine } = await import('./commands-K2-vteB-.mjs');
108
108
  const { server, machine } = await connectAndGetMachine();
109
109
  try {
110
110
  await machine.sessionRPC(reportTo, "sendInboxMessage", { message });
@@ -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-DR763Rgk.mjs';
4
+ import { c as connectToHypha } from './run-gpXzhDA6.mjs';
5
5
  import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-HydRNEt7.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
@@ -4,7 +4,7 @@ import { mkdirSync, writeFileSync, unlinkSync, existsSync, chmodSync, readFileSy
4
4
  import { join } from 'path';
5
5
  import { homedir, platform, arch } from 'os';
6
6
  import { randomUUID, createHash } from 'crypto';
7
- import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-DR763Rgk.mjs';
7
+ import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-gpXzhDA6.mjs';
8
8
  import 'fs/promises';
9
9
  import 'url';
10
10
  import 'node:crypto';
@@ -1,5 +1,5 @@
1
- import { D as resolveModel, V as describeMisconfiguration, W as buildMachineDeps } from './run-DR763Rgk.mjs';
2
- import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-9B_SyE2c.mjs';
1
+ import { D as resolveModel, V as describeMisconfiguration, W as buildMachineDeps } from './run-gpXzhDA6.mjs';
2
+ import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-v4GqYhGB.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-DR763Rgk.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-gpXzhDA6.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.134";
2
+ var version = "0.2.135";
3
3
  var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
4
4
  var author = "Amun AI AB";
5
5
  var license = "SEE LICENSE IN LICENSE";
@@ -1,4 +1,4 @@
1
- import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { X as generateFriendlyName, m as shortId, c as connectToHypha, a as createSessionStore, r as registerMachineService, Y as generateHookSettings } from './run-DR763Rgk.mjs';
1
+ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { X as composeSessionId, Y as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, Z as generateHookSettings } from './run-gpXzhDA6.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';
@@ -605,7 +605,7 @@ const log = (...args) => {
605
605
  };
606
606
  async function runInteractive(options) {
607
607
  const cwd = options.directory;
608
- const sessionId = `${generateFriendlyName()}-${shortId()}`;
608
+ const sessionId = composeSessionId(generateFriendlyName());
609
609
  const permissionMode = options.permissionMode || "default";
610
610
  log(`Starting interactive session: ${sessionId}`);
611
611
  log(`Directory: ${cwd}`);
@@ -2677,7 +2677,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
2677
2677
  const tunnels = handlers.tunnels;
2678
2678
  if (!tunnels) throw new Error("Tunnel management not available");
2679
2679
  if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
2680
- const { FrpcTunnel } = await import('./frpc-BQMO1bd_.mjs');
2680
+ const { FrpcTunnel } = await import('./frpc-iVFYzz91.mjs');
2681
2681
  const tunnel = new FrpcTunnel({
2682
2682
  name: params.name,
2683
2683
  ports: params.ports,
@@ -2975,7 +2975,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
2975
2975
  }
2976
2976
  const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
2977
2977
  const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
2978
- const { toolsForRole } = await import('./sideband-9B_SyE2c.mjs');
2978
+ const { toolsForRole } = await import('./sideband-v4GqYhGB.mjs');
2979
2979
  const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
2980
2980
  return fmt(r2);
2981
2981
  }
@@ -3074,7 +3074,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
3074
3074
  if (r.error || !r.sender) return { error: r.error || "unauthorized" };
3075
3075
  const callId = "call_" + Math.random().toString(16).slice(2, 12);
3076
3076
  const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
3077
- const { queryCore } = await import('./commands-CtY5nmos.mjs');
3077
+ const { queryCore } = await import('./commands-K2-vteB-.mjs');
3078
3078
  const timeout = c.reply?.timeout_sec || 120;
3079
3079
  let result;
3080
3080
  try {
@@ -4642,14 +4642,15 @@ Output ONLY the full revised reply text \u2014 no preamble, no commentary, no su
4642
4642
  }
4643
4643
 
4644
4644
  const ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
4645
- const MAX_UNBIASED = Math.floor(256 / ALPHABET.length) * ALPHABET.length;
4646
- function shortId(length = 10) {
4645
+ const LOWER_ALPHABET = "abcdefghijklmnopqrstuvwxyz";
4646
+ function shortId(length = 10, alphabet = ALPHABET) {
4647
+ const maxUnbiased = Math.floor(256 / alphabet.length) * alphabet.length;
4647
4648
  let out = "";
4648
4649
  while (out.length < length) {
4649
4650
  const buf = randomBytes(length - out.length);
4650
4651
  for (let i = 0; i < buf.length && out.length < length; i++) {
4651
4652
  const b = buf[i];
4652
- if (b < MAX_UNBIASED) out += ALPHABET[b % ALPHABET.length];
4653
+ if (b < maxUnbiased) out += alphabet[b % alphabet.length];
4653
4654
  }
4654
4655
  }
4655
4656
  return out;
@@ -4927,9 +4928,18 @@ function sanitizeSegment(s) {
4927
4928
  return String(s || "").toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "");
4928
4929
  }
4929
4930
  function friendlyNameFromId(id) {
4930
- const m = /^(.+)-[a-zA-Z0-9]{10}$/.exec(String(id || ""));
4931
+ const m = /^(.+)-[a-zA-Z0-9]{6,10}$/.exec(String(id || ""));
4931
4932
  return m ? m[1] : void 0;
4932
4933
  }
4934
+ function composeSessionId(friendlyName, takenIds = [], len = 6) {
4935
+ const taken = takenIds instanceof Set ? takenIds : new Set(takenIds);
4936
+ let width = len;
4937
+ for (let attempt = 0; ; attempt++) {
4938
+ const candidate = `${friendlyName}-${shortId(width, LOWER_ALPHABET)}`;
4939
+ if (!taken.has(candidate)) return candidate;
4940
+ if (attempt > 0 && attempt % 16 === 0) width++;
4941
+ }
4942
+ }
4933
4943
  function formatHandle(projectName, friendlyName) {
4934
4944
  if (!friendlyName) return void 0;
4935
4945
  const proj = sanitizeSegment(projectName || "");
@@ -11420,7 +11430,7 @@ async function startDaemon(options) {
11420
11430
  saveExposedTunnels(list);
11421
11431
  }
11422
11432
  async function createExposedTunnel(spec) {
11423
- const { FrpcTunnel } = await import('./frpc-BQMO1bd_.mjs');
11433
+ const { FrpcTunnel } = await import('./frpc-iVFYzz91.mjs');
11424
11434
  const tunnel = new FrpcTunnel({
11425
11435
  name: spec.name,
11426
11436
  ports: spec.ports,
@@ -11440,7 +11450,7 @@ async function startDaemon(options) {
11440
11450
  return tunnel;
11441
11451
  }
11442
11452
  const tunnelRecreateState = /* @__PURE__ */ new Map();
11443
- const { ServeManager } = await import('./serveManager-DhtvDsmx.mjs');
11453
+ const { ServeManager } = await import('./serveManager-LSlxfyoD.mjs');
11444
11454
  const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
11445
11455
  ensureAutoInstalledSkills(logger).catch(() => {
11446
11456
  });
@@ -11570,6 +11580,19 @@ ${v.guidance ? v.guidance + "\n" : ""}Criteria: ${v.criteria || "(none)"}
11570
11580
  }
11571
11581
  return taken;
11572
11582
  };
11583
+ const collectKnownSessionIds = () => {
11584
+ const taken = /* @__PURE__ */ new Set();
11585
+ for (const s of pidToTrackedSession.values()) {
11586
+ if (s.svampSessionId) taken.add(s.svampSessionId);
11587
+ }
11588
+ try {
11589
+ for (const p of loadPersistedSessions()) {
11590
+ if (p.sessionId) taken.add(p.sessionId);
11591
+ }
11592
+ } catch {
11593
+ }
11594
+ return taken;
11595
+ };
11573
11596
  let machineServiceRef = null;
11574
11597
  const spawnSession = async (options2) => {
11575
11598
  logger.log("Spawning session:", JSON.stringify(options2));
@@ -11594,7 +11617,7 @@ ${v.guidance ? v.guidance + "\n" : ""}Criteria: ${v.criteria || "(none)"}
11594
11617
  return { type: "error", errorMessage: `Failed to create directory: ${err.message}` };
11595
11618
  }
11596
11619
  }
11597
- const sessionId = options2.sessionId || `${generateFriendlyName(collectKnownFriendlyNames())}-${shortId()}`;
11620
+ const sessionId = options2.sessionId || composeSessionId(generateFriendlyName(collectKnownFriendlyNames()), collectKnownSessionIds());
11598
11621
  const agentName = options2.agent || agentConfig.agent_type || "claude";
11599
11622
  if (agentName !== "claude" && (KNOWN_ACP_AGENTS[agentName] || KNOWN_MCP_AGENTS[agentName])) {
11600
11623
  return await spawnAgentSession(sessionId, directory, agentName, options2, resumeSessionId);
@@ -15028,4 +15051,4 @@ var run = /*#__PURE__*/Object.freeze({
15028
15051
  writeStopMarker: writeStopMarker
15029
15052
  });
15030
15053
 
15031
- export { acpBackend as $, buildMachineInstructions as A, machineToolsForRole as B, buildMachineTools as C, resolveModel as D, readChecklist as E, compileChecklist as F, RoutineStore as G, RoutineRunner as H, formatHandle as I, normalizeAllowedUser as J, loadSecurityContextConfig as K, resolveSecurityContext as L, buildSecurityContextFromFlags as M, mergeSecurityContexts as N, buildSessionShareUrl as O, computeOutboundHop as P, buildMachineShareUrl as Q, READ_ONLY_TOOLS as R, ServeAuth as S, parseHandle as T, handleMatchesMetadata as U, describeMisconfiguration as V, buildMachineDeps as W, generateFriendlyName as X, generateHookSettings as Y, projectInfo as Z, DefaultTransport$1 as _, createSessionStore as a, acpAgentConfig as a0, codexMcpBackend as a1, GeminiTransport$1 as a2, claudeAuth as a3, instanceConfig as a4, api as a5, run as a6, stopDaemon as b, connectToHypha as c, daemonStatus as d, clearStopMarker as e, stopMarkerExists as f, getHyphaServerUrl$1 as g, getFrpsSubdomainHost as h, getFrpsServerPort as i, getFrpsServerAddr as j, getHyphaServerUrl as k, hasCookieToken as l, shortId as m, getSkillsServer as n, getSkillsWorkspaceName as o, parseFrontmatter as p, getSkillsCollectionName as q, registerMachineService as r, startDaemon as s, fetchWithTimeout as t, searchSkills as u, SKILLS_DIR as v, getSkillInfo as w, downloadSkillFile as x, listSkillFiles as y, loadMachineContext as z };
15054
+ export { DefaultTransport$1 as $, buildMachineInstructions as A, machineToolsForRole as B, buildMachineTools as C, resolveModel as D, readChecklist as E, compileChecklist as F, RoutineStore as G, RoutineRunner as H, formatHandle as I, normalizeAllowedUser as J, loadSecurityContextConfig as K, resolveSecurityContext as L, buildSecurityContextFromFlags as M, mergeSecurityContexts as N, buildSessionShareUrl as O, computeOutboundHop as P, buildMachineShareUrl as Q, READ_ONLY_TOOLS as R, ServeAuth as S, parseHandle as T, handleMatchesMetadata as U, describeMisconfiguration as V, buildMachineDeps as W, composeSessionId as X, generateFriendlyName as Y, generateHookSettings as Z, projectInfo as _, createSessionStore as a, acpBackend as a0, acpAgentConfig as a1, codexMcpBackend as a2, GeminiTransport$1 as a3, claudeAuth as a4, instanceConfig as a5, api as a6, run as a7, stopDaemon as b, connectToHypha as c, daemonStatus as d, clearStopMarker as e, stopMarkerExists as f, getHyphaServerUrl$1 as g, getFrpsSubdomainHost as h, getFrpsServerPort as i, getFrpsServerAddr as j, getHyphaServerUrl as k, hasCookieToken as l, shortId as m, getSkillsServer as n, getSkillsWorkspaceName as o, parseFrontmatter as p, getSkillsCollectionName as q, registerMachineService as r, startDaemon as s, fetchWithTimeout as t, searchSkills as u, SKILLS_DIR as v, getSkillInfo as w, downloadSkillFile as x, listSkillFiles as y, loadMachineContext as z };
@@ -54,7 +54,7 @@ async function handleServeCommand() {
54
54
  }
55
55
  }
56
56
  async function serveAdd(args, machineId) {
57
- const { connectAndGetMachine } = await import('./commands-CtY5nmos.mjs');
57
+ const { connectAndGetMachine } = await import('./commands-K2-vteB-.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-CtY5nmos.mjs');
96
+ const { connectAndGetMachine } = await import('./commands-K2-vteB-.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-CtY5nmos.mjs');
185
+ const { connectAndGetMachine } = await import('./commands-K2-vteB-.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-CtY5nmos.mjs');
205
+ const { connectAndGetMachine } = await import('./commands-K2-vteB-.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-CtY5nmos.mjs');
238
+ const { connectAndGetMachine } = await import('./commands-K2-vteB-.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-DR763Rgk.mjs';
7
+ import { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run-gpXzhDA6.mjs';
8
8
  import 'os';
9
9
  import 'fs/promises';
10
10
  import 'url';
@@ -726,7 +726,7 @@ class ServeManager {
726
726
  const mount = this.mounts.get(mountName);
727
727
  const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, `static-${subdomainSafe}-${mount.linkToken}`]]) : void 0;
728
728
  try {
729
- const { FrpcTunnel } = await import('./frpc-BQMO1bd_.mjs');
729
+ const { FrpcTunnel } = await import('./frpc-iVFYzz91.mjs');
730
730
  let tunnel;
731
731
  tunnel = new FrpcTunnel({
732
732
  name: tunnelName,
@@ -1,4 +1,4 @@
1
- import { R as READ_ONLY_TOOLS, z as loadMachineContext, A as buildMachineInstructions, B as machineToolsForRole, C as buildMachineTools } from './run-DR763Rgk.mjs';
1
+ import { R as READ_ONLY_TOOLS, z as loadMachineContext, A as buildMachineInstructions, B as machineToolsForRole, C as buildMachineTools } from './run-gpXzhDA6.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.134",
3
+ "version": "0.2.135",
4
4
  "description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
5
5
  "author": "Amun AI AB",
6
6
  "license": "SEE LICENSE IN LICENSE",