svamp-cli 0.2.71 → 0.2.72

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.
@@ -148,7 +148,7 @@ async function sessionBroadcast(action, args) {
148
148
  console.log(`Broadcast sent: ${action}`);
149
149
  }
150
150
  async function connectToMachineService() {
151
- const { connectAndGetMachine } = await import('./commands-B0zqVia0.mjs');
151
+ const { connectAndGetMachine } = await import('./commands-DV0URNXH.mjs');
152
152
  return connectAndGetMachine();
153
153
  }
154
154
  async function inboxSend(targetSessionId, opts) {
@@ -165,7 +165,7 @@ async function inboxSend(targetSessionId, opts) {
165
165
  }
166
166
  const { server, machine } = await connectToMachineService();
167
167
  try {
168
- const { resolveSessionId } = await import('./commands-B0zqVia0.mjs');
168
+ const { resolveSessionId } = await import('./commands-DV0URNXH.mjs');
169
169
  const sessions = await machine.listSessions();
170
170
  const match = resolveSessionId(sessions, targetSessionId);
171
171
  const fullTargetId = match.sessionId;
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-h-QVSVFd.mjs';
1
+ import { s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-CC-0bNTe.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -44,7 +44,7 @@ async function main() {
44
44
  console.error(`svamp daemon restart: ${err.message || err}`);
45
45
  process.exit(1);
46
46
  }
47
- const { restartDaemon } = await import('./run-h-QVSVFd.mjs').then(function (n) { return n.u; });
47
+ const { restartDaemon } = await import('./run-CC-0bNTe.mjs').then(function (n) { return n.u; });
48
48
  await restartDaemon();
49
49
  process.exit(0);
50
50
  }
@@ -280,7 +280,7 @@ async function main() {
280
280
  console.error("svamp service: Service commands are not available in sandboxed sessions.");
281
281
  process.exit(1);
282
282
  }
283
- const { handleServiceCommand } = await import('./commands-Cc8AE2jl.mjs');
283
+ const { handleServiceCommand } = await import('./commands-DJVdDzTe.mjs');
284
284
  await handleServiceCommand();
285
285
  } else if (subcommand === "serve") {
286
286
  const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
@@ -288,7 +288,7 @@ async function main() {
288
288
  console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
289
289
  process.exit(1);
290
290
  }
291
- const { handleServeCommand } = await import('./serveCommands-CM17DByZ.mjs');
291
+ const { handleServeCommand } = await import('./serveCommands-BeQKrUIn.mjs');
292
292
  await handleServeCommand();
293
293
  process.exit(0);
294
294
  } else if (subcommand === "process" || subcommand === "proc") {
@@ -297,7 +297,7 @@ async function main() {
297
297
  console.error("svamp process: Process commands are not available in sandboxed sessions.");
298
298
  process.exit(1);
299
299
  }
300
- const { processCommand } = await import('./commands-Kztc20Nx.mjs');
300
+ const { processCommand } = await import('./commands-Cyp2k10B.mjs');
301
301
  let machineId;
302
302
  const processArgs = args.slice(1);
303
303
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -315,7 +315,7 @@ async function main() {
315
315
  } else if (!subcommand || subcommand === "start") {
316
316
  await handleInteractiveCommand();
317
317
  } else if (subcommand === "--version" || subcommand === "-v") {
318
- const pkg = await import('./package-CDSBvCp_.mjs').catch(() => ({ default: { version: "unknown" } }));
318
+ const pkg = await import('./package-hpa4sCE_.mjs').catch(() => ({ default: { version: "unknown" } }));
319
319
  console.log(`svamp version: ${pkg.default.version}`);
320
320
  } else {
321
321
  console.error(`Unknown command: ${subcommand}`);
@@ -324,7 +324,7 @@ async function main() {
324
324
  }
325
325
  }
326
326
  async function handleInteractiveCommand() {
327
- const { runInteractive } = await import('./run-B_bKTQ8M.mjs');
327
+ const { runInteractive } = await import('./run-D4yrAi1I.mjs');
328
328
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
329
329
  let directory = process.cwd();
330
330
  let resumeSessionId;
@@ -369,7 +369,7 @@ async function handleAgentCommand() {
369
369
  return;
370
370
  }
371
371
  if (agentArgs[0] === "list") {
372
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-h-QVSVFd.mjs').then(function (n) { return n.p; });
372
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-CC-0bNTe.mjs').then(function (n) { return n.p; });
373
373
  console.log("Known agents:");
374
374
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
375
375
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -381,7 +381,7 @@ async function handleAgentCommand() {
381
381
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
382
382
  return;
383
383
  }
384
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-h-QVSVFd.mjs').then(function (n) { return n.p; });
384
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-CC-0bNTe.mjs').then(function (n) { return n.p; });
385
385
  let cwd = process.cwd();
386
386
  const filteredArgs = [];
387
387
  for (let i = 0; i < agentArgs.length; i++) {
@@ -405,12 +405,12 @@ async function handleAgentCommand() {
405
405
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
406
406
  let backend;
407
407
  if (KNOWN_MCP_AGENTS[config.agentName]) {
408
- const { CodexMcpBackend } = await import('./run-h-QVSVFd.mjs').then(function (n) { return n.q; });
408
+ const { CodexMcpBackend } = await import('./run-CC-0bNTe.mjs').then(function (n) { return n.q; });
409
409
  backend = new CodexMcpBackend({ cwd, log: logFn });
410
410
  } else {
411
- const { AcpBackend } = await import('./run-h-QVSVFd.mjs').then(function (n) { return n.o; });
412
- const { GeminiTransport } = await import('./run-h-QVSVFd.mjs').then(function (n) { return n.G; });
413
- const { DefaultTransport } = await import('./run-h-QVSVFd.mjs').then(function (n) { return n.D; });
411
+ const { AcpBackend } = await import('./run-CC-0bNTe.mjs').then(function (n) { return n.o; });
412
+ const { GeminiTransport } = await import('./run-CC-0bNTe.mjs').then(function (n) { return n.G; });
413
+ const { DefaultTransport } = await import('./run-CC-0bNTe.mjs').then(function (n) { return n.D; });
414
414
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
415
415
  backend = new AcpBackend({
416
416
  agentName: config.agentName,
@@ -537,7 +537,7 @@ async function handleSessionCommand() {
537
537
  process.exit(1);
538
538
  }
539
539
  }
540
- const { sessionList, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-B0zqVia0.mjs');
540
+ const { sessionList, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-DV0URNXH.mjs');
541
541
  const parseFlagStr = (flag, shortFlag) => {
542
542
  for (let i = 1; i < sessionArgs.length; i++) {
543
543
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -603,7 +603,7 @@ async function handleSessionCommand() {
603
603
  allowDomain.push(sessionArgs[++i]);
604
604
  }
605
605
  }
606
- const { parseShareArg } = await import('./commands-B0zqVia0.mjs');
606
+ const { parseShareArg } = await import('./commands-DV0URNXH.mjs');
607
607
  const shareEntries = share.map((s) => parseShareArg(s));
608
608
  await sessionSpawn(agent, dir, targetMachineId, {
609
609
  message,
@@ -687,7 +687,7 @@ async function handleSessionCommand() {
687
687
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
688
688
  process.exit(1);
689
689
  }
690
- const { sessionQuery } = await import('./commands-B0zqVia0.mjs');
690
+ const { sessionQuery } = await import('./commands-DV0URNXH.mjs');
691
691
  await sessionQuery(dir, prompt, targetMachineId, {
692
692
  timeout: parseFlagInt("--timeout"),
693
693
  json: hasFlag("--json"),
@@ -720,7 +720,7 @@ async function handleSessionCommand() {
720
720
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
721
721
  process.exit(1);
722
722
  }
723
- const { sessionApprove } = await import('./commands-B0zqVia0.mjs');
723
+ const { sessionApprove } = await import('./commands-DV0URNXH.mjs');
724
724
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
725
725
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
726
726
  json: hasFlag("--json")
@@ -730,7 +730,7 @@ async function handleSessionCommand() {
730
730
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
731
731
  process.exit(1);
732
732
  }
733
- const { sessionDeny } = await import('./commands-B0zqVia0.mjs');
733
+ const { sessionDeny } = await import('./commands-DV0URNXH.mjs');
734
734
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
735
735
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
736
736
  json: hasFlag("--json")
@@ -766,7 +766,7 @@ async function handleSessionCommand() {
766
766
  console.error("Usage: svamp session set-title <title>");
767
767
  process.exit(1);
768
768
  }
769
- const { sessionSetTitle } = await import('./agentCommands-COEbsMuw.mjs');
769
+ const { sessionSetTitle } = await import('./agentCommands-C1Q4jqOT.mjs');
770
770
  await sessionSetTitle(title);
771
771
  } else if (sessionSubcommand === "set-link") {
772
772
  const url = sessionArgs[1];
@@ -775,7 +775,7 @@ async function handleSessionCommand() {
775
775
  process.exit(1);
776
776
  }
777
777
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
778
- const { sessionSetLink } = await import('./agentCommands-COEbsMuw.mjs');
778
+ const { sessionSetLink } = await import('./agentCommands-C1Q4jqOT.mjs');
779
779
  await sessionSetLink(url, label);
780
780
  } else if (sessionSubcommand === "notify") {
781
781
  const message = sessionArgs[1];
@@ -784,7 +784,7 @@ async function handleSessionCommand() {
784
784
  process.exit(1);
785
785
  }
786
786
  const level = parseFlagStr("--level") || "info";
787
- const { sessionNotify } = await import('./agentCommands-COEbsMuw.mjs');
787
+ const { sessionNotify } = await import('./agentCommands-C1Q4jqOT.mjs');
788
788
  await sessionNotify(message, level);
789
789
  } else if (sessionSubcommand === "broadcast") {
790
790
  const action = sessionArgs[1];
@@ -792,7 +792,7 @@ async function handleSessionCommand() {
792
792
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
793
793
  process.exit(1);
794
794
  }
795
- const { sessionBroadcast } = await import('./agentCommands-COEbsMuw.mjs');
795
+ const { sessionBroadcast } = await import('./agentCommands-C1Q4jqOT.mjs');
796
796
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
797
797
  } else if (sessionSubcommand === "inbox") {
798
798
  const inboxSubcmd = sessionArgs[1];
@@ -803,7 +803,7 @@ async function handleSessionCommand() {
803
803
  process.exit(1);
804
804
  }
805
805
  if (agentSessionId) {
806
- const { inboxSend } = await import('./agentCommands-COEbsMuw.mjs');
806
+ const { inboxSend } = await import('./agentCommands-C1Q4jqOT.mjs');
807
807
  await inboxSend(sessionArgs[2], {
808
808
  body: sessionArgs[3],
809
809
  subject: parseFlagStr("--subject"),
@@ -818,7 +818,7 @@ async function handleSessionCommand() {
818
818
  }
819
819
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
820
820
  if (agentSessionId && !sessionArgs[2]) {
821
- const { inboxList } = await import('./agentCommands-COEbsMuw.mjs');
821
+ const { inboxList } = await import('./agentCommands-C1Q4jqOT.mjs');
822
822
  await inboxList({
823
823
  unread: hasFlag("--unread"),
824
824
  limit: parseFlagInt("--limit"),
@@ -840,7 +840,7 @@ async function handleSessionCommand() {
840
840
  process.exit(1);
841
841
  }
842
842
  if (agentSessionId && !sessionArgs[3]) {
843
- const { inboxList } = await import('./agentCommands-COEbsMuw.mjs');
843
+ const { inboxList } = await import('./agentCommands-C1Q4jqOT.mjs');
844
844
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
845
845
  } else if (sessionArgs[3]) {
846
846
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -850,7 +850,7 @@ async function handleSessionCommand() {
850
850
  }
851
851
  } else if (inboxSubcmd === "reply") {
852
852
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
853
- const { inboxReply } = await import('./agentCommands-COEbsMuw.mjs');
853
+ const { inboxReply } = await import('./agentCommands-C1Q4jqOT.mjs');
854
854
  await inboxReply(sessionArgs[2], sessionArgs[3]);
855
855
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
856
856
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -886,7 +886,7 @@ async function handleMachineCommand() {
886
886
  return;
887
887
  }
888
888
  if (machineSubcommand === "share") {
889
- const { machineShare } = await import('./commands-B0zqVia0.mjs');
889
+ const { machineShare } = await import('./commands-DV0URNXH.mjs');
890
890
  let machineId;
891
891
  const shareArgs = [];
892
892
  for (let i = 1; i < machineArgs.length; i++) {
@@ -916,7 +916,7 @@ async function handleMachineCommand() {
916
916
  }
917
917
  await machineShare(machineId, { add, remove, list, configPath, showConfig });
918
918
  } else if (machineSubcommand === "exec") {
919
- const { machineExec } = await import('./commands-B0zqVia0.mjs');
919
+ const { machineExec } = await import('./commands-DV0URNXH.mjs');
920
920
  let machineId;
921
921
  let cwd;
922
922
  const cmdParts = [];
@@ -936,7 +936,7 @@ async function handleMachineCommand() {
936
936
  }
937
937
  await machineExec(machineId, command, cwd);
938
938
  } else if (machineSubcommand === "info") {
939
- const { machineInfo } = await import('./commands-B0zqVia0.mjs');
939
+ const { machineInfo } = await import('./commands-DV0URNXH.mjs');
940
940
  let machineId;
941
941
  for (let i = 1; i < machineArgs.length; i++) {
942
942
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -956,10 +956,10 @@ async function handleMachineCommand() {
956
956
  level = machineArgs[++i];
957
957
  }
958
958
  }
959
- const { machineNotify } = await import('./agentCommands-COEbsMuw.mjs');
959
+ const { machineNotify } = await import('./agentCommands-C1Q4jqOT.mjs');
960
960
  await machineNotify(message, level);
961
961
  } else if (machineSubcommand === "ls") {
962
- const { machineLs } = await import('./commands-B0zqVia0.mjs');
962
+ const { machineLs } = await import('./commands-DV0URNXH.mjs');
963
963
  let machineId;
964
964
  let showHidden = false;
965
965
  let path;
@@ -1429,7 +1429,7 @@ async function applyClaudeAuthFlags(argv) {
1429
1429
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1430
1430
  );
1431
1431
  }
1432
- const mod = await import('./run-h-QVSVFd.mjs').then(function (n) { return n.t; });
1432
+ const mod = await import('./run-CC-0bNTe.mjs').then(function (n) { return n.t; });
1433
1433
  if (hasHypha) {
1434
1434
  mod.setClaudeAuthHyphaProxy();
1435
1435
  console.log("Claude auth configured: hypha-proxy (uses HYPHA_TOKEN live at each spawn).");
@@ -1467,7 +1467,7 @@ async function applyDaemonShareFlag(argv) {
1467
1467
  }
1468
1468
  }
1469
1469
  if (collected.length === 0) return;
1470
- const { updateEnvFile } = await import('./run-h-QVSVFd.mjs').then(function (n) { return n.t; });
1470
+ const { updateEnvFile } = await import('./run-CC-0bNTe.mjs').then(function (n) { return n.t; });
1471
1471
  const seen = /* @__PURE__ */ new Set();
1472
1472
  const deduped = collected.filter((e) => {
1473
1473
  const k = e.toLowerCase();
@@ -1480,7 +1480,7 @@ async function applyDaemonShareFlag(argv) {
1480
1480
  }
1481
1481
  async function handleDaemonAuthCommand(argv) {
1482
1482
  const sub = (argv[0] || "status").toLowerCase();
1483
- const mod = await import('./run-h-QVSVFd.mjs').then(function (n) { return n.t; });
1483
+ const mod = await import('./run-CC-0bNTe.mjs').then(function (n) { return n.t; });
1484
1484
  if (sub === "--help" || sub === "-h" || sub === "help") {
1485
1485
  console.log(`
1486
1486
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-B0zqVia0.mjs';
3
+ import { connectAndGetMachine } from './commands-DV0URNXH.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-h-QVSVFd.mjs';
8
+ import './run-CC-0bNTe.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -68,7 +68,7 @@ async function serviceExpose(args) {
68
68
  });
69
69
  return;
70
70
  }
71
- const { connectAndGetMachine } = await import('./commands-B0zqVia0.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-DV0URNXH.mjs');
72
72
  const { server, machine } = await connectAndGetMachine();
73
73
  try {
74
74
  const status = await machine.tunnelStart({
@@ -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-B0zqVia0.mjs');
135
+ const { connectAndGetMachine } = await import('./commands-DV0URNXH.mjs');
136
136
  const { server, machine } = await connectAndGetMachine();
137
137
  try {
138
138
  const tunnels = await machine.tunnelList({});
@@ -161,7 +161,7 @@ async function serviceDelete(args) {
161
161
  process.exit(1);
162
162
  }
163
163
  try {
164
- const { connectAndGetMachine } = await import('./commands-B0zqVia0.mjs');
164
+ const { connectAndGetMachine } = await import('./commands-DV0URNXH.mjs');
165
165
  const { server, machine } = await connectAndGetMachine();
166
166
  try {
167
167
  await machine.tunnelStop({ name });
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
2
2
  import { execSync } from 'node:child_process';
3
3
  import { resolve, join } from 'node:path';
4
4
  import os from 'node:os';
5
- import { n as normalizeAllowedUser, l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha, i as buildSessionShareUrl, j as buildMachineShareUrl } from './run-h-QVSVFd.mjs';
5
+ import { n as normalizeAllowedUser, l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha, i as buildSessionShareUrl, j as buildMachineShareUrl } from './run-CC-0bNTe.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as connectToHypha, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, a as registerSessionService, s as startDaemon, b as stopDaemon } from './run-h-QVSVFd.mjs';
1
+ export { c as connectToHypha, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, a as registerSessionService, s as startDaemon, b as stopDaemon } from './run-CC-0bNTe.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.71";
2
+ var version = "0.2.72";
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";
@@ -19,7 +19,7 @@ var exports$1 = {
19
19
  var scripts = {
20
20
  build: "rm -rf dist bin/skills && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && tsc --noEmit && pkgroll",
21
21
  typecheck: "tsc --noEmit",
22
- test: "npx tsx test/test-context-window.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-ralph-loop.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-ralph-loop-integration.mjs && npx tsx test/test-ralph-loop-modes.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only",
22
+ test: "npx tsx test/test-context-window.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-ralph-loop.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-ralph-loop-integration.mjs && npx tsx test/test-ralph-loop-modes.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && node test/pinnedClaudeCode.test.mjs",
23
23
  "test:hypha": "node --no-warnings test/test-hypha-service.mjs",
24
24
  dev: "tsx src/cli.ts",
25
25
  "dev:daemon": "tsx src/cli.ts daemon start-sync",
@@ -0,0 +1,58 @@
1
+ import { spawn, exec as exec$1 } from 'node:child_process';
2
+ import { promisify } from 'node:util';
3
+
4
+ const PINNED_CLAUDE_CODE_VERSION = "2.1.168";
5
+ const exec = promisify(exec$1);
6
+ async function readClaudeVersion() {
7
+ try {
8
+ const { stdout } = await exec("claude --version", { timeout: 1e4 });
9
+ const m = stdout.trim().match(/(\d+\.\d+\.\d+(?:[-.][\w]+)?)/);
10
+ return m ? m[1] : null;
11
+ } catch {
12
+ return null;
13
+ }
14
+ }
15
+ function runInstaller(version, log) {
16
+ return new Promise((resolve) => {
17
+ const proc = spawn("claude", ["install", version], { stdio: ["ignore", "pipe", "pipe"] });
18
+ let stderr = "";
19
+ proc.stdout?.on("data", (b) => log(`[claude install] ${b.toString().trimEnd()}`));
20
+ proc.stderr?.on("data", (b) => {
21
+ const s = b.toString();
22
+ stderr += s;
23
+ log(`[claude install] ${s.trimEnd()}`);
24
+ });
25
+ proc.on("error", (e) => {
26
+ stderr += String(e);
27
+ resolve({ ok: false, stderr });
28
+ });
29
+ proc.on("exit", (code) => resolve({ ok: code === 0, stderr }));
30
+ });
31
+ }
32
+ async function ensureClaudeCodeVersion(log, pinned = PINNED_CLAUDE_CODE_VERSION, opts) {
33
+ const autoInstall = opts?.allowAutoInstall !== false;
34
+ const current = await readClaudeVersion();
35
+ if (!current) {
36
+ log(`[claude-version] 'claude' not on PATH \u2014 please run the Anthropic installer once: curl -fsSL https://claude.ai/install.sh | sh`);
37
+ return { kind: "not-installed", want: pinned };
38
+ }
39
+ if (current === pinned) {
40
+ log(`[claude-version] OK \u2014 claude ${current} matches pinned ${pinned}`);
41
+ return { kind: "ok", version: current };
42
+ }
43
+ if (!autoInstall) {
44
+ log(`[claude-version] DRIFT \u2014 installed ${current} \u2260 pinned ${pinned} (auto-install disabled)`);
45
+ return { kind: "skipped", reason: `installed=${current} pinned=${pinned}` };
46
+ }
47
+ log(`[claude-version] DRIFT \u2014 installed ${current} \u2260 pinned ${pinned}; running 'claude install ${pinned}'`);
48
+ const { ok, stderr } = await runInstaller(pinned, log);
49
+ if (!ok) {
50
+ log(`[claude-version] install failed for ${pinned}: ${stderr.trim().slice(0, 400)}`);
51
+ return { kind: "install-failed", from: current, want: pinned, error: stderr.slice(0, 400) };
52
+ }
53
+ const after = await readClaudeVersion();
54
+ log(`[claude-version] installer finished; now reports ${after ?? "unknown"}`);
55
+ return { kind: "installed", from: current, to: after ?? pinned };
56
+ }
57
+
58
+ export { PINNED_CLAUDE_CODE_VERSION, ensureClaudeCodeVersion };
@@ -6477,6 +6477,8 @@ You are running inside a Svamp session (id: ${sessionId}) on Hypha Cloud. Use th
6477
6477
  ## Parallel Agents
6478
6478
 
6479
6479
  You may be running in parallel with other agents \u2014 possibly sharing the same working directory. Stay aware of peers: if files change unexpectedly, or you want to initiate collaboration or coordinate to avoid edit conflicts, discover peers with \`svamp session list\` and inspect their activity with \`svamp session info <id>\` / \`svamp session messages <id>\`. Reach out via \`svamp session send <id> "<msg>"\` when coordination is genuinely useful. Keep cross-agent chatter minimal and purposeful: never reply reflexively, avoid ping-pong loops (especially across restarts where queued messages may re-fire), and only initiate contact with a concrete reason. Treat peer messages as informational unless they clearly require action.
6480
+
6481
+ **Inbox messages between agents** arrive wrapped as \`<svamp-message message-id="\u2026" from="agent:\u2026" from-session="\u2026" \u2026>BODY</svamp-message>\`. A plain user turn has no such wrapper \u2014 that's how you tell them apart. To reply to the sender, use \`svamp session inbox reply <message-id> "<body>"\` (auto-routes to \`from-session\`, preserves \`thread-id\`). Replying is optional \u2014 only when it's useful for the work.
6480
6482
  `;
6481
6483
  }
6482
6484
 
@@ -7867,10 +7869,18 @@ async function startDaemon(options) {
7867
7869
  const list = loadExposedTunnels().filter((t) => t.name !== name);
7868
7870
  saveExposedTunnels(list);
7869
7871
  }
7870
- const { ServeManager } = await import('./serveManager-Bzjw2bO6.mjs');
7872
+ const { ServeManager } = await import('./serveManager-B9cemdRt.mjs');
7871
7873
  const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
7872
7874
  ensureAutoInstalledSkills(logger).catch(() => {
7873
7875
  });
7876
+ (async () => {
7877
+ try {
7878
+ const { ensureClaudeCodeVersion } = await import('./pinnedClaudeCode-HydRNEt7.mjs');
7879
+ await ensureClaudeCodeVersion((msg) => logger.log(msg));
7880
+ } catch (e) {
7881
+ logger.log(`[claude-version] check failed: ${e?.message || e}`);
7882
+ }
7883
+ })();
7874
7884
  preventMachineSleep(logger);
7875
7885
  try {
7876
7886
  logger.log("Connecting to Hypha server...");
@@ -2,7 +2,7 @@ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(im
2
2
  import os from 'node:os';
3
3
  import { resolve, join } from 'node:path';
4
4
  import { existsSync, readFileSync, watch } from 'node:fs';
5
- import { c as connectToHypha, a as registerSessionService, k as generateHookSettings } from './run-h-QVSVFd.mjs';
5
+ import { c as connectToHypha, a as registerSessionService, k as generateHookSettings } from './run-CC-0bNTe.mjs';
6
6
  import { createServer } from 'node:http';
7
7
  import { spawn } from 'node:child_process';
8
8
  import { createInterface } from 'node:readline';
@@ -54,7 +54,7 @@ async function handleServeCommand() {
54
54
  }
55
55
  }
56
56
  async function serveAdd(args, machineId) {
57
- const { connectAndGetMachine } = await import('./commands-B0zqVia0.mjs');
57
+ const { connectAndGetMachine } = await import('./commands-DV0URNXH.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-B0zqVia0.mjs');
96
+ const { connectAndGetMachine } = await import('./commands-DV0URNXH.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-B0zqVia0.mjs');
185
+ const { connectAndGetMachine } = await import('./commands-DV0URNXH.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-B0zqVia0.mjs');
205
+ const { connectAndGetMachine } = await import('./commands-DV0URNXH.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-B0zqVia0.mjs');
238
+ const { connectAndGetMachine } = await import('./commands-DV0URNXH.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 { S as ServeAuth, h as hasCookieToken } from './run-h-QVSVFd.mjs';
7
+ import { S as ServeAuth, h as hasCookieToken } from './run-CC-0bNTe.mjs';
8
8
  import 'os';
9
9
  import 'fs/promises';
10
10
  import 'url';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svamp-cli",
3
- "version": "0.2.71",
3
+ "version": "0.2.72",
4
4
  "description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
5
5
  "author": "Amun AI AB",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -20,7 +20,7 @@
20
20
  "scripts": {
21
21
  "build": "rm -rf dist bin/skills && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && tsc --noEmit && pkgroll",
22
22
  "typecheck": "tsc --noEmit",
23
- "test": "npx tsx test/test-context-window.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-ralph-loop.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-ralph-loop-integration.mjs && npx tsx test/test-ralph-loop-modes.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only",
23
+ "test": "npx tsx test/test-context-window.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-ralph-loop.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-ralph-loop-integration.mjs && npx tsx test/test-ralph-loop-modes.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && node test/pinnedClaudeCode.test.mjs",
24
24
  "test:hypha": "node --no-warnings test/test-hypha-service.mjs",
25
25
  "dev": "tsx src/cli.ts",
26
26
  "dev:daemon": "tsx src/cli.ts daemon start-sync",