svamp-cli 0.2.103 → 0.2.104

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-C_DlMpl7.mjs');
151
+ const { connectAndGetMachine } = await import('./commands-o0MBJocy.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-C_DlMpl7.mjs');
168
+ const { resolveSessionId } = await import('./commands-o0MBJocy.mjs');
169
169
  const sessions = await machine.listSessions();
170
170
  const match = resolveSessionId(sessions, targetSessionId);
171
171
  const fullTargetId = match.sessionId;
@@ -1,4 +1,4 @@
1
- import { E as resolveModel } from './run-BmZjAEob.mjs';
1
+ import { E as resolveModel } from './run-CoaYIdw1.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -9,8 +9,8 @@ import 'crypto';
9
9
  import 'node:fs';
10
10
  import 'node:child_process';
11
11
  import 'util';
12
- import 'node:crypto';
13
12
  import 'node:path';
13
+ import 'node:crypto';
14
14
  import 'node:os';
15
15
  import 'node:events';
16
16
  import '@agentclientprotocol/sdk';
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-BmZjAEob.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-CoaYIdw1.mjs';
2
2
  import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
3
3
  import 'os';
4
4
  import 'fs/promises';
@@ -10,8 +10,8 @@ import 'crypto';
10
10
  import 'node:fs';
11
11
  import 'node:child_process';
12
12
  import 'util';
13
- import 'node:crypto';
14
13
  import 'node:path';
14
+ import 'node:crypto';
15
15
  import 'node:os';
16
16
  import 'node:events';
17
17
  import '@agentclientprotocol/sdk';
@@ -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-BmZjAEob.mjs').then(function (n) { return n.Y; });
37
+ const { getLoadedConfig } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.Y; });
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-BmZjAEob.mjs').then(function (n) { return n._; });
54
+ const { restartDaemon } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n._; });
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-BvJ_Dl1l.mjs');
347
+ const { handleServiceCommand } = await import('./commands-AkN7uDYW.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-zFOjNs-0.mjs');
355
+ const { handleServeCommand } = await import('./serveCommands-DSn_4Auj.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-BXFukv2v.mjs');
364
+ const { processCommand } = await import('./commands-u519ohSC.mjs');
365
365
  let machineId;
366
366
  const processArgs = args.slice(1);
367
367
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -375,7 +375,7 @@ async function main() {
375
375
  }), machineId);
376
376
  process.exit(0);
377
377
  } else if (subcommand === "routine" || subcommand === "routines") {
378
- const { routineCommand } = await import('./commands-BGE6zFa1.mjs');
378
+ const { routineCommand } = await import('./commands-C1dsiSL5.mjs');
379
379
  await routineCommand(args.slice(1));
380
380
  process.exit(0);
381
381
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
@@ -386,7 +386,7 @@ async function main() {
386
386
  } else if (!subcommand || subcommand === "start") {
387
387
  await handleInteractiveCommand();
388
388
  } else if (subcommand === "--version" || subcommand === "-v") {
389
- const pkg = await import('./package-fu3Jsw1q.mjs').catch(() => ({ default: { version: "unknown" } }));
389
+ const pkg = await import('./package-IQYoSW7o.mjs').catch(() => ({ default: { version: "unknown" } }));
390
390
  console.log(`svamp version: ${pkg.default.version}`);
391
391
  } else {
392
392
  console.error(`Unknown command: ${subcommand}`);
@@ -395,7 +395,7 @@ async function main() {
395
395
  }
396
396
  }
397
397
  async function handleInteractiveCommand() {
398
- const { runInteractive } = await import('./run-DTOSfKSH.mjs');
398
+ const { runInteractive } = await import('./run-aFkkky75.mjs');
399
399
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
400
400
  let directory = process.cwd();
401
401
  let resumeSessionId;
@@ -440,7 +440,7 @@ async function handleAgentCommand() {
440
440
  return;
441
441
  }
442
442
  if (agentArgs[0] === "list") {
443
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.U; });
443
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.U; });
444
444
  console.log("Known agents:");
445
445
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
446
446
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -452,7 +452,7 @@ async function handleAgentCommand() {
452
452
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
453
453
  return;
454
454
  }
455
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.U; });
455
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.U; });
456
456
  let cwd = process.cwd();
457
457
  const filteredArgs = [];
458
458
  for (let i = 0; i < agentArgs.length; i++) {
@@ -476,12 +476,12 @@ async function handleAgentCommand() {
476
476
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
477
477
  let backend;
478
478
  if (KNOWN_MCP_AGENTS[config.agentName]) {
479
- const { CodexMcpBackend } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.V; });
479
+ const { CodexMcpBackend } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.V; });
480
480
  backend = new CodexMcpBackend({ cwd, log: logFn });
481
481
  } else {
482
- const { AcpBackend } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.T; });
483
- const { GeminiTransport } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.W; });
484
- const { DefaultTransport } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.Q; });
482
+ const { AcpBackend } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.T; });
483
+ const { GeminiTransport } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.W; });
484
+ const { DefaultTransport } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.Q; });
485
485
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
486
486
  backend = new AcpBackend({
487
487
  agentName: config.agentName,
@@ -608,7 +608,7 @@ async function handleSessionCommand() {
608
608
  process.exit(1);
609
609
  }
610
610
  }
611
- const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-C_DlMpl7.mjs');
611
+ const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-o0MBJocy.mjs');
612
612
  const parseFlagStr = (flag, shortFlag) => {
613
613
  for (let i = 1; i < sessionArgs.length; i++) {
614
614
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -676,7 +676,7 @@ async function handleSessionCommand() {
676
676
  allowDomain.push(sessionArgs[++i]);
677
677
  }
678
678
  }
679
- const { parseShareArg } = await import('./commands-C_DlMpl7.mjs');
679
+ const { parseShareArg } = await import('./commands-o0MBJocy.mjs');
680
680
  const shareEntries = share.map((s) => parseShareArg(s));
681
681
  await sessionSpawn(agent, dir, targetMachineId, {
682
682
  message,
@@ -763,7 +763,7 @@ async function handleSessionCommand() {
763
763
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
764
764
  process.exit(1);
765
765
  }
766
- const { sessionQuery } = await import('./commands-C_DlMpl7.mjs');
766
+ const { sessionQuery } = await import('./commands-o0MBJocy.mjs');
767
767
  await sessionQuery(dir, prompt, targetMachineId, {
768
768
  timeout: parseFlagInt("--timeout"),
769
769
  json: hasFlag("--json"),
@@ -796,7 +796,7 @@ async function handleSessionCommand() {
796
796
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
797
797
  process.exit(1);
798
798
  }
799
- const { sessionApprove } = await import('./commands-C_DlMpl7.mjs');
799
+ const { sessionApprove } = await import('./commands-o0MBJocy.mjs');
800
800
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
801
801
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
802
802
  json: hasFlag("--json")
@@ -806,7 +806,7 @@ async function handleSessionCommand() {
806
806
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
807
807
  process.exit(1);
808
808
  }
809
- const { sessionDeny } = await import('./commands-C_DlMpl7.mjs');
809
+ const { sessionDeny } = await import('./commands-o0MBJocy.mjs');
810
810
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
811
811
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
812
812
  json: hasFlag("--json")
@@ -841,7 +841,7 @@ async function handleSessionCommand() {
841
841
  console.error("Usage: svamp session set-title <title>");
842
842
  process.exit(1);
843
843
  }
844
- const { sessionSetTitle } = await import('./agentCommands-oHt9FQJt.mjs');
844
+ const { sessionSetTitle } = await import('./agentCommands-DhcQMAe-.mjs');
845
845
  await sessionSetTitle(title);
846
846
  } else if (sessionSubcommand === "set-link") {
847
847
  const url = sessionArgs[1];
@@ -850,7 +850,7 @@ async function handleSessionCommand() {
850
850
  process.exit(1);
851
851
  }
852
852
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
853
- const { sessionSetLink } = await import('./agentCommands-oHt9FQJt.mjs');
853
+ const { sessionSetLink } = await import('./agentCommands-DhcQMAe-.mjs');
854
854
  await sessionSetLink(url, label);
855
855
  } else if (sessionSubcommand === "notify") {
856
856
  const message = sessionArgs[1];
@@ -859,7 +859,7 @@ async function handleSessionCommand() {
859
859
  process.exit(1);
860
860
  }
861
861
  const level = parseFlagStr("--level") || "info";
862
- const { sessionNotify } = await import('./agentCommands-oHt9FQJt.mjs');
862
+ const { sessionNotify } = await import('./agentCommands-DhcQMAe-.mjs');
863
863
  await sessionNotify(message, level);
864
864
  } else if (sessionSubcommand === "broadcast") {
865
865
  const action = sessionArgs[1];
@@ -867,7 +867,7 @@ async function handleSessionCommand() {
867
867
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
868
868
  process.exit(1);
869
869
  }
870
- const { sessionBroadcast } = await import('./agentCommands-oHt9FQJt.mjs');
870
+ const { sessionBroadcast } = await import('./agentCommands-DhcQMAe-.mjs');
871
871
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
872
872
  } else if (sessionSubcommand === "inbox") {
873
873
  const inboxSubcmd = sessionArgs[1];
@@ -878,7 +878,7 @@ async function handleSessionCommand() {
878
878
  process.exit(1);
879
879
  }
880
880
  if (agentSessionId) {
881
- const { inboxSend } = await import('./agentCommands-oHt9FQJt.mjs');
881
+ const { inboxSend } = await import('./agentCommands-DhcQMAe-.mjs');
882
882
  await inboxSend(sessionArgs[2], {
883
883
  body: sessionArgs[3],
884
884
  subject: parseFlagStr("--subject"),
@@ -893,7 +893,7 @@ async function handleSessionCommand() {
893
893
  }
894
894
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
895
895
  if (agentSessionId && !sessionArgs[2]) {
896
- const { inboxList } = await import('./agentCommands-oHt9FQJt.mjs');
896
+ const { inboxList } = await import('./agentCommands-DhcQMAe-.mjs');
897
897
  await inboxList({
898
898
  unread: hasFlag("--unread"),
899
899
  limit: parseFlagInt("--limit"),
@@ -915,7 +915,7 @@ async function handleSessionCommand() {
915
915
  process.exit(1);
916
916
  }
917
917
  if (agentSessionId && !sessionArgs[3]) {
918
- const { inboxList } = await import('./agentCommands-oHt9FQJt.mjs');
918
+ const { inboxList } = await import('./agentCommands-DhcQMAe-.mjs');
919
919
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
920
920
  } else if (sessionArgs[3]) {
921
921
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -925,7 +925,7 @@ async function handleSessionCommand() {
925
925
  }
926
926
  } else if (inboxSubcmd === "reply") {
927
927
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
928
- const { inboxReply } = await import('./agentCommands-oHt9FQJt.mjs');
928
+ const { inboxReply } = await import('./agentCommands-DhcQMAe-.mjs');
929
929
  await inboxReply(sessionArgs[2], sessionArgs[3]);
930
930
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
931
931
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -961,7 +961,7 @@ async function handleMachineCommand() {
961
961
  return;
962
962
  }
963
963
  if (machineSubcommand === "share") {
964
- const { machineShare } = await import('./commands-C_DlMpl7.mjs');
964
+ const { machineShare } = await import('./commands-o0MBJocy.mjs');
965
965
  let machineId;
966
966
  const shareArgs = [];
967
967
  for (let i = 1; i < machineArgs.length; i++) {
@@ -991,7 +991,7 @@ async function handleMachineCommand() {
991
991
  }
992
992
  await machineShare(machineId, { add, remove, list, configPath, showConfig });
993
993
  } else if (machineSubcommand === "exec") {
994
- const { machineExec } = await import('./commands-C_DlMpl7.mjs');
994
+ const { machineExec } = await import('./commands-o0MBJocy.mjs');
995
995
  let machineId;
996
996
  let cwd;
997
997
  const cmdParts = [];
@@ -1011,7 +1011,7 @@ async function handleMachineCommand() {
1011
1011
  }
1012
1012
  await machineExec(machineId, command, cwd);
1013
1013
  } else if (machineSubcommand === "info") {
1014
- const { machineInfo } = await import('./commands-C_DlMpl7.mjs');
1014
+ const { machineInfo } = await import('./commands-o0MBJocy.mjs');
1015
1015
  let machineId;
1016
1016
  for (let i = 1; i < machineArgs.length; i++) {
1017
1017
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1031,10 +1031,10 @@ async function handleMachineCommand() {
1031
1031
  level = machineArgs[++i];
1032
1032
  }
1033
1033
  }
1034
- const { machineNotify } = await import('./agentCommands-oHt9FQJt.mjs');
1034
+ const { machineNotify } = await import('./agentCommands-DhcQMAe-.mjs');
1035
1035
  await machineNotify(message, level);
1036
1036
  } else if (machineSubcommand === "ls") {
1037
- const { machineLs } = await import('./commands-C_DlMpl7.mjs');
1037
+ const { machineLs } = await import('./commands-o0MBJocy.mjs');
1038
1038
  let machineId;
1039
1039
  let showHidden = false;
1040
1040
  let path;
@@ -1092,24 +1092,24 @@ Examples:
1092
1092
  };
1093
1093
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1094
1094
  if (sub === "status") {
1095
- const { fleetStatus } = await import('./fleet-BlrT4zSC.mjs');
1095
+ const { fleetStatus } = await import('./fleet-CjAI4rxS.mjs');
1096
1096
  await fleetStatus();
1097
1097
  } else if (sub === "exec") {
1098
1098
  const command = fleetArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1099
- const { fleetExec } = await import('./fleet-BlrT4zSC.mjs');
1099
+ const { fleetExec } = await import('./fleet-CjAI4rxS.mjs');
1100
1100
  await fleetExec(command, { cwd: flag("cwd") });
1101
1101
  } else if (sub === "upgrade-claude") {
1102
- const { fleetUpgradeClaude } = await import('./fleet-BlrT4zSC.mjs');
1102
+ const { fleetUpgradeClaude } = await import('./fleet-CjAI4rxS.mjs');
1103
1103
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1104
1104
  } else if (sub === "upgrade-svamp") {
1105
- const { fleetUpgradeSvamp } = await import('./fleet-BlrT4zSC.mjs');
1105
+ const { fleetUpgradeSvamp } = await import('./fleet-CjAI4rxS.mjs');
1106
1106
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
1107
1107
  } else if (sub === "daemon-restart") {
1108
- const { fleetDaemonRestart } = await import('./fleet-BlrT4zSC.mjs');
1108
+ const { fleetDaemonRestart } = await import('./fleet-CjAI4rxS.mjs');
1109
1109
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1110
1110
  } else if (sub === "push-skill") {
1111
1111
  const name = fleetArgs[1];
1112
- const { fleetPushSkill } = await import('./fleet-BlrT4zSC.mjs');
1112
+ const { fleetPushSkill } = await import('./fleet-CjAI4rxS.mjs');
1113
1113
  await fleetPushSkill(name);
1114
1114
  } else {
1115
1115
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1125,7 +1125,7 @@ async function handleSkillsCommand() {
1125
1125
  await printSkillsHelp();
1126
1126
  return;
1127
1127
  }
1128
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-C_B8GNUT.mjs');
1128
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-DsSzRtJu.mjs');
1129
1129
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1130
1130
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1131
1131
  if (!query) {
@@ -1172,7 +1172,7 @@ async function loginToHypha() {
1172
1172
  process.exit(1);
1173
1173
  }
1174
1174
  const anchor = anchorArg.replace(/\/+$/, "");
1175
- const { loadInstanceConfig } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.Y; });
1175
+ const { loadInstanceConfig } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.Y; });
1176
1176
  let cfg = null;
1177
1177
  try {
1178
1178
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1283,7 +1283,7 @@ async function logoutFromHypha() {
1283
1283
  } catch {
1284
1284
  }
1285
1285
  try {
1286
- const { clearInstanceConfigCache } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.Y; });
1286
+ const { clearInstanceConfigCache } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.Y; });
1287
1287
  clearInstanceConfigCache();
1288
1288
  } catch {
1289
1289
  }
@@ -1614,7 +1614,7 @@ async function applyClaudeAuthFlags(argv) {
1614
1614
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1615
1615
  );
1616
1616
  }
1617
- const mod = await import('./run-BmZjAEob.mjs').then(function (n) { return n.X; });
1617
+ const mod = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.X; });
1618
1618
  if (hasHypha) {
1619
1619
  let url;
1620
1620
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1668,7 +1668,7 @@ async function applyDaemonShareFlag(argv) {
1668
1668
  }
1669
1669
  }
1670
1670
  if (collected.length === 0) return;
1671
- const { updateEnvFile } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.X; });
1671
+ const { updateEnvFile } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.X; });
1672
1672
  const seen = /* @__PURE__ */ new Set();
1673
1673
  const deduped = collected.filter((e) => {
1674
1674
  const k = e.toLowerCase();
@@ -1701,7 +1701,7 @@ async function handleWiseAgentCommand(rest) {
1701
1701
  }
1702
1702
  });
1703
1703
  const message = rest.slice(1).map((a, idx) => ({ a, idx: idx + 1 })).filter(({ a, idx }) => !a.startsWith("-") && !consumed.has(String(idx))).map(({ a }) => a).join(" ");
1704
- const { wiseAskCli } = await import('./commands-C_DlMpl7.mjs');
1704
+ const { wiseAskCli } = await import('./commands-o0MBJocy.mjs');
1705
1705
  await wiseAskCli(machineId, message, sessionId, { json });
1706
1706
  return;
1707
1707
  }
@@ -1713,7 +1713,7 @@ async function handleWiseAgentCommand(rest) {
1713
1713
  }
1714
1714
  return void 0;
1715
1715
  };
1716
- const { runWiseVoiceCli } = await import('./headlessCli-D7NXB73S.mjs');
1716
+ const { runWiseVoiceCli } = await import('./headlessCli-CIMYmqci.mjs');
1717
1717
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1718
1718
  return;
1719
1719
  }
@@ -1755,7 +1755,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1755
1755
  return;
1756
1756
  }
1757
1757
  const authArgs = rest.slice(1);
1758
- const mod = await import('./auth-Dg0s5H5y.mjs');
1758
+ const mod = await import('./auth-D4G47YjL.mjs');
1759
1759
  let action;
1760
1760
  try {
1761
1761
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1765,7 +1765,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1765
1765
  return;
1766
1766
  }
1767
1767
  if (action) {
1768
- const { updateEnvFile } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.X; });
1768
+ const { updateEnvFile } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.X; });
1769
1769
  const updates = mod.buildWiseAgentEnvUpdates(action);
1770
1770
  updateEnvFile(updates);
1771
1771
  for (const [k, v] of Object.entries(updates)) {
@@ -1779,7 +1779,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1779
1779
  }
1780
1780
  async function handleDaemonAuthCommand(argv) {
1781
1781
  const sub = (argv[0] || "status").toLowerCase();
1782
- const mod = await import('./run-BmZjAEob.mjs').then(function (n) { return n.X; });
1782
+ const mod = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.X; });
1783
1783
  if (sub === "--help" || sub === "-h" || sub === "help") {
1784
1784
  console.log(`
1785
1785
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2082,7 +2082,7 @@ Examples:
2082
2082
  async function printSkillsHelp() {
2083
2083
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2084
2084
  try {
2085
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-BmZjAEob.mjs').then(function (n) { return n.Z; });
2085
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-CoaYIdw1.mjs').then(function (n) { return n.Z; });
2086
2086
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2087
2087
  } catch {
2088
2088
  }
@@ -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-Dn5pmk_f.mjs');
61
+ const { runFrpcTunnel } = await import('./frpc-B8ORdlOO.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-C_DlMpl7.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-o0MBJocy.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-Dn5pmk_f.mjs');
126
+ const { runFrpcTunnel } = await import('./frpc-B8ORdlOO.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-C_DlMpl7.mjs');
135
+ const { connectAndGetMachine } = await import('./commands-o0MBJocy.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-C_DlMpl7.mjs');
164
+ const { connectAndGetMachine } = await import('./commands-o0MBJocy.mjs');
165
165
  const { server, machine } = await connectAndGetMachine();
166
166
  try {
167
167
  await machine.tunnelStop({ name });
@@ -1,6 +1,6 @@
1
1
  import { execFileSync } from 'node:child_process';
2
2
  import { createServer } from 'node:http';
3
- import { R as RoutineStore, m as RoutineRunner } from './run-BmZjAEob.mjs';
3
+ import { R as RoutineStore, m as RoutineRunner } from './run-CoaYIdw1.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
6
6
  import 'fs';
@@ -10,8 +10,8 @@ import 'child_process';
10
10
  import 'crypto';
11
11
  import 'node:fs';
12
12
  import 'util';
13
- import 'node:crypto';
14
13
  import 'node:path';
14
+ import 'node:crypto';
15
15
  import 'node:os';
16
16
  import 'node:events';
17
17
  import '@agentclientprotocol/sdk';
@@ -31,8 +31,21 @@ function parseArgs(argv) {
31
31
  }
32
32
  return a;
33
33
  }
34
+ function isSessionLive(sid) {
35
+ try {
36
+ const out = execFileSync("svamp", ["session", "list", "--json"], { stdio: ["ignore", "pipe", "ignore"], timeout: 15e3 }).toString();
37
+ const list = JSON.parse(out);
38
+ return Array.isArray(list) && list.some((s) => s?.sessionId === sid);
39
+ } catch {
40
+ return false;
41
+ }
42
+ }
34
43
  async function cliDeliver({ routine, resolved }) {
35
44
  const sid = routine.session_id;
45
+ if (!isSessionLive(sid)) {
46
+ console.error(`[routine] skip ${routine.id || routine.name}: session ${sid} is stopped/archived`);
47
+ return;
48
+ }
36
49
  if (resolved.kind === "message") {
37
50
  execFileSync("svamp", ["session", "send", sid, resolved.text || ""], { stdio: "pipe" });
38
51
  return;
@@ -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-BmZjAEob.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-CoaYIdw1.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
@@ -9,8 +9,8 @@ import 'crypto';
9
9
  import 'node:fs';
10
10
  import 'node:child_process';
11
11
  import 'util';
12
- import 'node:crypto';
13
12
  import 'node:path';
13
+ import 'node:crypto';
14
14
  import 'node:os';
15
15
  import 'node:events';
16
16
  import '@agentclientprotocol/sdk';
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
2
2
  import { execSync } from 'node:child_process';
3
3
  import { basename, resolve, join } from 'node:path';
4
4
  import os from 'node:os';
5
- import { F as normalizeAllowedUser, G as loadSecurityContextConfig, H as resolveSecurityContext, I as buildSecurityContextFromFlags, J as mergeSecurityContexts, c as connectToHypha, K as buildSessionShareUrl, L as computeOutboundHop, M as buildMachineShareUrl } from './run-BmZjAEob.mjs';
5
+ import { F as normalizeAllowedUser, G as loadSecurityContextConfig, H as resolveSecurityContext, I as buildSecurityContextFromFlags, J as mergeSecurityContexts, c as connectToHypha, K as buildSessionShareUrl, L as computeOutboundHop, M as buildMachineShareUrl } from './run-CoaYIdw1.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -786,7 +786,6 @@ function formatPeerLine(s) {
786
786
  }
787
787
  async function sessionWhoami(opts) {
788
788
  const currentSessionId = process.env.SVAMP_SESSION_ID;
789
- const PEER_CAP = 18;
790
789
  const { server, machines } = await connectAndGetAllMachines();
791
790
  try {
792
791
  const perMachine = await Promise.allSettled(
@@ -814,9 +813,14 @@ async function sessionWhoami(opts) {
814
813
  }
815
814
  if (opts?.json) {
816
815
  console.log(formatJson({
816
+ operator: server.config?.user?.email || gathered.find((g) => g.info?.metadata?.sharing?.owner)?.info?.metadata?.sharing?.owner || null,
817
+ workspace: server.config?.workspace || null,
817
818
  currentSessionId: currentSession?.sessionId || currentSessionId || null,
818
819
  currentMachine: current ? machineLabel(current.info) : null,
820
+ totalSessions: gathered.reduce((n, g) => n + g.sessions.length, 0),
819
821
  machines: gathered.map((g) => ({
822
+ sessionCount: g.sessions.length,
823
+ activeCount: g.sessions.filter((s) => s.active).length,
820
824
  machine: machineLabel(g.info),
821
825
  isCurrent: g === current,
822
826
  sessions: g.sessions.map((s) => ({
@@ -831,7 +835,14 @@ async function sessionWhoami(opts) {
831
835
  }));
832
836
  return;
833
837
  }
838
+ const operatorUser = server.config?.user;
839
+ const operatorEmail = operatorUser?.email || gathered.find((g) => g.info?.metadata?.sharing?.owner)?.info?.metadata?.sharing?.owner;
840
+ const workspace = server.config?.workspace;
834
841
  const lines = ["# Your environment", ""];
842
+ if (operatorEmail || workspace) {
843
+ lines.push(`Operator: ${operatorEmail || "unknown"}${workspace ? ` \xB7 workspace ${workspace}` : ""}`);
844
+ lines.push("");
845
+ }
835
846
  if (currentSession && current) {
836
847
  const m = currentSession.metadata || {};
837
848
  lines.push("## This session");
@@ -848,30 +859,30 @@ async function sessionWhoami(opts) {
848
859
  }
849
860
  lines.push("");
850
861
  const byActive = (a, b) => (b.active ? 1 : 0) - (a.active ? 1 : 0);
851
- if (current) {
852
- const peers = current.sessions.filter((s) => s.sessionId !== currentSession?.sessionId).sort(byActive);
853
- lines.push(`## Same machine \u2014 ${machineLabel(current.info)} (${peers.length} peer${peers.length === 1 ? "" : "s"})`);
854
- if (peers.length === 0) lines.push(" (no other sessions here)");
855
- const shown = opts?.all ? peers : peers.slice(0, PEER_CAP);
856
- for (const s of shown) lines.push(formatPeerLine(s));
857
- if (peers.length > shown.length) lines.push(` \u2026 +${peers.length - shown.length} more \u2014 run \`svamp session whoami --all\` to see all`);
858
- lines.push("");
859
- }
860
- const others = gathered.filter((g) => g !== current);
861
- const otherTotal = others.reduce((n, g) => n + g.sessions.length, 0);
862
- if (others.length > 0) {
863
- lines.push(`## Other machines \u2014 same user (${otherTotal} session${otherTotal === 1 ? "" : "s"})`);
864
- for (const g of others) {
865
- const ms = [...g.sessions].sort(byActive);
866
- lines.push(` \u2022 ${machineLabel(g.info)} (${ms.length}):`);
867
- if (ms.length === 0) lines.push(" (none)");
868
- const shown = opts?.all ? ms : ms.slice(0, PEER_CAP);
869
- for (const s of shown) lines.push(formatPeerLine(s));
870
- if (ms.length > shown.length) lines.push(` \u2026 +${ms.length - shown.length} more (--all)`);
862
+ const activeOf = (arr) => arr.filter((s) => s.active).length;
863
+ const grandTotal = gathered.reduce((n, g) => n + g.sessions.length, 0);
864
+ const orderedMachines = [...gathered].sort((a, b) => {
865
+ if (a === current) return -1;
866
+ if (b === current) return 1;
867
+ return b.sessions.length - a.sessions.length;
868
+ });
869
+ lines.push(`## Machines (same user) \u2014 ${grandTotal} session${grandTotal === 1 ? "" : "s"} across ${gathered.length} machine${gathered.length === 1 ? "" : "s"}`);
870
+ for (const g of orderedMachines) {
871
+ const ms = [...g.sessions].sort(byActive);
872
+ const here = g === current ? " (this machine)" : "";
873
+ lines.push(`- ${machineLabel(g.info)}${here}: ${ms.length} session${ms.length === 1 ? "" : "s"} (${activeOf(ms)} active)`);
874
+ if (opts?.all) {
875
+ const peers = g === current ? ms.filter((s) => s.sessionId !== currentSession?.sessionId) : ms;
876
+ for (const s of peers) lines.push(formatPeerLine(s));
871
877
  }
872
- lines.push("");
873
878
  }
879
+ lines.push("- List sessions: `svamp session list` (add `--active`, or `-m <machine>` for one).");
880
+ if (!opts?.all && grandTotal > 1) {
881
+ lines.push("- Or `svamp session whoami --all` to list every session inline.");
882
+ }
883
+ lines.push("");
874
884
  lines.push("## Reach a peer");
885
+ lines.push("- `svamp session list` \u2014 find a peer's id/title, then:");
875
886
  lines.push("- `svamp session info <id>` / `svamp session messages <id>` \u2014 inspect before reaching out");
876
887
  lines.push('- `svamp session send <id> "<msg>"` \u2014 drop a message into a peer\'s inbox');
877
888
  lines.push('- Reply to an inbox message: `svamp session inbox reply <message-id> "<body>"`');
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-C_DlMpl7.mjs';
3
+ import { connectAndGetMachine } from './commands-o0MBJocy.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-BmZjAEob.mjs';
8
+ import './run-CoaYIdw1.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';