svamp-cli 0.2.247 → 0.2.249

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/{agentCommands-DOzMhE_G.mjs → agentCommands-B_ozIVKT.mjs} +28 -11
  2. package/dist/{auth-B_ZnoKX0.mjs → auth-BLDmT7XN.mjs} +2 -1
  3. package/dist/cli.mjs +62 -61
  4. package/dist/{commands-vCeWXvYJ.mjs → commands-C3TQOYUo.mjs} +2 -1
  5. package/dist/{commands-Bm5q9G35.mjs → commands-CL8YI8k5.mjs} +2 -1
  6. package/dist/{commands-_rMwFmFH.mjs → commands-CRMQUQZG.mjs} +2 -1
  7. package/dist/{commands-F6j9TF4Q.mjs → commands-Cs2fNd-_.mjs} +7 -7
  8. package/dist/{commands-CxOPcoWa.mjs → commands-DS4i8ohA.mjs} +10 -6
  9. package/dist/{commands-BENx03Oz.mjs → commands-Djvi1cZ2.mjs} +3 -2
  10. package/dist/{commands-C2u9U3y6.mjs → commands-DwhA-iV3.mjs} +3 -2
  11. package/dist/{fleet-pMXCRilx.mjs → fleet-CJZOVjOY.mjs} +2 -1
  12. package/dist/{frpc-Di-y4cWK.mjs → frpc-CsjEXBuS.mjs} +2 -1
  13. package/dist/{headlessCli-D6k9Pnum.mjs → headlessCli-qBontdlf.mjs} +3 -2
  14. package/dist/index.mjs +2 -1
  15. package/dist/{package-BJYmQjS2.mjs → package-CP8yEiNu.mjs} +2 -2
  16. package/dist/{rpc-DbY7NUhj.mjs → rpc-BGFgegj5.mjs} +1 -3
  17. package/dist/{rpc-BncvIQMO.mjs → rpc-C1DI7HfZ.mjs} +2 -1
  18. package/dist/{run-CYx_Rhiu.mjs → run-C61rsl7r.mjs} +2 -1
  19. package/dist/{run-1BBi0_ol.mjs → run-CHIppB2r.mjs} +655 -35
  20. package/dist/{scheduler-BkXOKjHn.mjs → scheduler-Csp21zzg.mjs} +1 -3
  21. package/dist/{serveCommands-CESRU6-1.mjs → serveCommands-BYHk72ZO.mjs} +5 -5
  22. package/dist/{serveManager-BZtpClpC.mjs → serveManager-Di3xrvG2.mjs} +3 -2
  23. package/dist/{sideband-BqD4-WWR.mjs → sideband-Cs-kNLye.mjs} +2 -1
  24. package/package.json +2 -2
  25. package/dist/runStore-C5IyfbON.mjs +0 -239
  26. package/dist/store-BTs0H_y0.mjs +0 -148
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, mkdirSync, writeFileSync, renameSync } from '
2
2
  import { join, dirname } from 'node:path';
3
3
  import os from 'node:os';
4
4
  import { requireNotSandboxed } from './sandboxDetect-DNTcbgWD.mjs';
5
- import { A as shortId } from './run-1BBi0_ol.mjs';
5
+ import { k as shortId } from './run-CHIppB2r.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -21,6 +21,7 @@ import '@modelcontextprotocol/sdk/types.js';
21
21
  import 'zod';
22
22
  import 'node:fs/promises';
23
23
  import 'node:util';
24
+ import 'yaml';
24
25
 
25
26
  const SVAMP_HOME = process.env.SVAMP_HOME || join(os.homedir(), ".svamp");
26
27
  function getConfigPath(sessionId) {
@@ -96,7 +97,7 @@ async function sessionSetTitle(title) {
96
97
  }
97
98
  async function sessionSetProjectDescription(description) {
98
99
  const dir = process.cwd();
99
- const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.a9; });
100
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.al; });
100
101
  const desc = sanitizeDescription(description, 240);
101
102
  if (!desc) {
102
103
  console.error("Project description is empty.");
@@ -143,7 +144,8 @@ function readSessionLinks(config) {
143
144
  id: String(l.id || shortLinkId()),
144
145
  label: String(l.label || ""),
145
146
  url: String(l.url),
146
- ...l.icon ? { icon: String(l.icon) } : {}
147
+ ...l.icon ? { icon: String(l.icon) } : {},
148
+ ...l.service && typeof l.service.name === "string" && (l.service.kind === "tunnel" || l.service.kind === "process") ? { service: { kind: l.service.kind, name: String(l.service.name) } } : {}
147
149
  }));
148
150
  }
149
151
  if (config.session_link && typeof config.session_link.url === "string") {
@@ -183,32 +185,47 @@ function upsertSessionLink(links, incoming) {
183
185
  const next = links.slice();
184
186
  const idx = next.findIndex((l) => linkDedupKey(l.url) === key);
185
187
  const icon = incoming.icon?.trim();
188
+ const service = incoming.service ?? (idx >= 0 ? next[idx].service : void 0);
186
189
  if (idx >= 0) {
187
190
  const existing = next[idx];
188
191
  next[idx] = {
189
192
  id: existing.id,
190
193
  url,
191
194
  label: labelFor(url, incoming.label),
192
- ...icon ? { icon } : existing.icon ? { icon: existing.icon } : {}
195
+ ...icon ? { icon } : existing.icon ? { icon: existing.icon } : {},
196
+ ...service ? { service } : {}
193
197
  };
194
198
  } else {
195
- next.push({ id: shortLinkId(), url, label: labelFor(url, incoming.label), ...icon ? { icon } : {} });
199
+ next.push({ id: shortLinkId(), url, label: labelFor(url, incoming.label), ...icon ? { icon } : {}, ...service ? { service } : {} });
196
200
  }
197
201
  return next;
198
202
  }
199
- function autoAddSessionLink(url, label, icon) {
203
+ function autoAddSessionLink(url, label, icon, service) {
200
204
  const sessionId = process.env.SVAMP_SESSION_ID;
201
205
  if (!sessionId || !url || !url.trim()) return false;
202
206
  try {
203
207
  const configPath = getConfigPath(sessionId);
204
208
  const config = readConfig(configPath);
205
- const next = upsertSessionLink(readSessionLinks(config), { url, label, icon });
209
+ const next = upsertSessionLink(readSessionLinks(config), { url, label, icon, service });
206
210
  writeSessionLinks(configPath, config, next);
207
211
  return true;
208
212
  } catch {
209
213
  return false;
210
214
  }
211
215
  }
216
+ function reconcileServiceLinks(config, incoming) {
217
+ const before = readSessionLinks(config);
218
+ let links = before;
219
+ for (const item of incoming) {
220
+ if (!item.url || !item.url.trim()) continue;
221
+ links = upsertSessionLink(links, item);
222
+ }
223
+ const canon = (ls) => JSON.stringify(ls.map((l) => [l.id, l.label, l.url, l.icon || "", l.service ? `${l.service.kind}:${l.service.name}` : ""]));
224
+ if (canon(links) === canon(before)) return false;
225
+ config.session_links = links;
226
+ config.session_link = links[0] ? { url: links[0].url, label: links[0].label } : void 0;
227
+ return true;
228
+ }
212
229
  function requireSessionId() {
213
230
  const sessionId = process.env.SVAMP_SESSION_ID;
214
231
  if (!sessionId) {
@@ -327,7 +344,7 @@ async function sessionBroadcast(action, args) {
327
344
  console.log(`Broadcast sent: ${action}`);
328
345
  }
329
346
  async function connectToMachineService() {
330
- const { connectAndGetMachine } = await import('./commands-vCeWXvYJ.mjs');
347
+ const { connectAndGetMachine } = await import('./commands-C3TQOYUo.mjs');
331
348
  return connectAndGetMachine();
332
349
  }
333
350
  function buildInboxMessage(args) {
@@ -405,7 +422,7 @@ async function inboxSend(targetSessionId, opts) {
405
422
  console.error("Message body is required.");
406
423
  process.exit(1);
407
424
  }
408
- const { connectAndResolveSession } = await import('./commands-vCeWXvYJ.mjs');
425
+ const { connectAndResolveSession } = await import('./commands-C3TQOYUo.mjs');
409
426
  let server;
410
427
  try {
411
428
  const { targetId, messageId } = await inboxSendCore(
@@ -459,7 +476,7 @@ async function inboxReply(messageId, body) {
459
476
  console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
460
477
  process.exit(1);
461
478
  }
462
- const { connectAndResolveSession } = await import('./commands-vCeWXvYJ.mjs');
479
+ const { connectAndResolveSession } = await import('./commands-C3TQOYUo.mjs');
463
480
  const { server: localServer, machine: localMachine } = await connectToMachineService();
464
481
  let localDisconnected = false;
465
482
  const disconnectLocal = async () => {
@@ -523,4 +540,4 @@ async function machineNotify(message, level = "info") {
523
540
  console.log(`Machine notification sent [${level}]: ${message}`);
524
541
  }
525
542
 
526
- export { autoAddSessionLink, buildInboxMessage, inboxList, inboxReply, inboxReplyCore, inboxSend, inboxSendCore, linkDedupKey, machineNotify, sessionBroadcast, sessionLinkAdd, sessionLinkList, sessionLinkRemove, sessionLinkUpdate, sessionNotify, sessionSetLink, sessionSetProjectDescription, sessionSetTitle, upsertSessionLink };
543
+ export { autoAddSessionLink, buildInboxMessage, inboxList, inboxReply, inboxReplyCore, inboxSend, inboxSendCore, linkDedupKey, machineNotify, reconcileServiceLinks, sessionBroadcast, sessionLinkAdd, sessionLinkList, sessionLinkRemove, sessionLinkUpdate, sessionNotify, sessionSetLink, sessionSetProjectDescription, sessionSetTitle, upsertSessionLink };
@@ -1,4 +1,4 @@
1
- import { P as resolveModel } from './run-1BBi0_ol.mjs';
1
+ import { a1 as resolveModel } from './run-CHIppB2r.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -20,6 +20,7 @@ import '@modelcontextprotocol/sdk/types.js';
20
20
  import 'zod';
21
21
  import 'node:fs/promises';
22
22
  import 'node:util';
23
+ import 'yaml';
23
24
 
24
25
  function buildWiseAgentEnvUpdates(action) {
25
26
  switch (action.kind) {
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-1BBi0_ol.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-CHIppB2r.mjs';
2
2
  import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
3
3
  import 'os';
4
4
  import 'fs/promises';
@@ -21,6 +21,7 @@ import '@modelcontextprotocol/sdk/types.js';
21
21
  import 'zod';
22
22
  import 'node:fs/promises';
23
23
  import 'node:util';
24
+ import 'yaml';
24
25
 
25
26
  const nodeMajor = parseInt(process.versions.node.split(".")[0], 10);
26
27
  if (nodeMajor < 22) {
@@ -34,7 +35,7 @@ const subcommand = args[0];
34
35
  let daemonSubcommand = args[1];
35
36
  async function main() {
36
37
  try {
37
- const { getLoadedConfig } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.af; });
38
+ const { getLoadedConfig } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.ar; });
38
39
  getLoadedConfig();
39
40
  } catch {
40
41
  }
@@ -53,7 +54,7 @@ async function main() {
53
54
  }
54
55
  const whenIdle = args.includes("--when-idle");
55
56
  const force = args.includes("--force");
56
- const mod = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.ah; });
57
+ const mod = await import('./run-CHIppB2r.mjs').then(function (n) { return n.at; });
57
58
  if (whenIdle && !force) {
58
59
  if (mod.isDaemonAlive()) {
59
60
  mod.writePendingRestart({ reason: "svamp daemon restart --when-idle" });
@@ -354,7 +355,7 @@ async function main() {
354
355
  console.error("svamp service: Service commands are not available in sandboxed sessions.");
355
356
  process.exit(1);
356
357
  }
357
- const { handleServiceCommand } = await import('./commands-F6j9TF4Q.mjs');
358
+ const { handleServiceCommand } = await import('./commands-Cs2fNd-_.mjs');
358
359
  await handleServiceCommand();
359
360
  } else if (subcommand === "serve") {
360
361
  const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
@@ -362,7 +363,7 @@ async function main() {
362
363
  console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
363
364
  process.exit(1);
364
365
  }
365
- const { handleServeCommand } = await import('./serveCommands-CESRU6-1.mjs');
366
+ const { handleServeCommand } = await import('./serveCommands-BYHk72ZO.mjs');
366
367
  await handleServeCommand();
367
368
  process.exit(0);
368
369
  } else if (subcommand === "process" || subcommand === "proc") {
@@ -371,7 +372,7 @@ async function main() {
371
372
  console.error("svamp process: Process commands are not available in sandboxed sessions.");
372
373
  process.exit(1);
373
374
  }
374
- const { processCommand } = await import('./commands-BENx03Oz.mjs');
375
+ const { processCommand } = await import('./commands-Djvi1cZ2.mjs');
375
376
  let machineId;
376
377
  const processArgs = args.slice(1);
377
378
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -385,18 +386,18 @@ async function main() {
385
386
  }), machineId);
386
387
  process.exit(0);
387
388
  } else if (subcommand === "issue" || subcommand === "issues") {
388
- const { issueCommand } = await import('./commands-_rMwFmFH.mjs');
389
+ const { issueCommand } = await import('./commands-CRMQUQZG.mjs');
389
390
  await issueCommand(args.slice(1));
390
391
  process.exit(0);
391
392
  } else if (subcommand === "workflow" || subcommand === "workflows") {
392
- const { workflowCommand } = await import('./commands-CxOPcoWa.mjs');
393
+ const { workflowCommand } = await import('./commands-DS4i8ohA.mjs');
393
394
  await workflowCommand(args.slice(1));
394
395
  process.exit(0);
395
396
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
396
397
  await handleWiseAgentCommand(args.slice(1));
397
398
  process.exit(0);
398
399
  } else if (subcommand === "feature" || subcommand === "crew") {
399
- const { crewCommand } = await import('./commands-C2u9U3y6.mjs');
400
+ const { crewCommand } = await import('./commands-DwhA-iV3.mjs');
400
401
  await crewCommand(args.slice(1));
401
402
  process.exit(0);
402
403
  } else if (subcommand === "--help" || subcommand === "-h") {
@@ -404,7 +405,7 @@ async function main() {
404
405
  } else if (!subcommand || subcommand === "start") {
405
406
  await handleInteractiveCommand();
406
407
  } else if (subcommand === "--version" || subcommand === "-v") {
407
- const pkg = await import('./package-BJYmQjS2.mjs').catch(() => ({ default: { version: "unknown" } }));
408
+ const pkg = await import('./package-CP8yEiNu.mjs').catch(() => ({ default: { version: "unknown" } }));
408
409
  console.log(`svamp version: ${pkg.default.version}`);
409
410
  } else {
410
411
  console.error(`Unknown command: ${subcommand}`);
@@ -413,7 +414,7 @@ async function main() {
413
414
  }
414
415
  }
415
416
  async function handleInteractiveCommand() {
416
- const { runInteractive } = await import('./run-CYx_Rhiu.mjs');
417
+ const { runInteractive } = await import('./run-C61rsl7r.mjs');
417
418
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
418
419
  let directory = process.cwd();
419
420
  let resumeSessionId;
@@ -458,7 +459,7 @@ async function handleAgentCommand() {
458
459
  return;
459
460
  }
460
461
  if (agentArgs[0] === "list") {
461
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.ac; });
462
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.ao; });
462
463
  console.log("Known agents:");
463
464
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
464
465
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -470,7 +471,7 @@ async function handleAgentCommand() {
470
471
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
471
472
  return;
472
473
  }
473
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.ac; });
474
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.ao; });
474
475
  let cwd = process.cwd();
475
476
  const filteredArgs = [];
476
477
  for (let i = 0; i < agentArgs.length; i++) {
@@ -494,12 +495,12 @@ async function handleAgentCommand() {
494
495
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
495
496
  let backend;
496
497
  if (KNOWN_MCP_AGENTS[config.agentName]) {
497
- const { CodexMcpBackend } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.ad; });
498
+ const { CodexMcpBackend } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.ap; });
498
499
  backend = new CodexMcpBackend({ cwd, log: logFn });
499
500
  } else {
500
- const { AcpBackend } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.ab; });
501
- const { GeminiTransport } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.ae; });
502
- const { DefaultTransport } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.aa; });
501
+ const { AcpBackend } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.an; });
502
+ const { GeminiTransport } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.aq; });
503
+ const { DefaultTransport } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.am; });
503
504
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
504
505
  backend = new AcpBackend({
505
506
  agentName: config.agentName,
@@ -626,7 +627,7 @@ async function handleSessionCommand() {
626
627
  process.exit(1);
627
628
  }
628
629
  }
629
- 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-vCeWXvYJ.mjs');
630
+ 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-C3TQOYUo.mjs');
630
631
  const parseFlagStr = (flag, shortFlag) => {
631
632
  for (let i = 1; i < sessionArgs.length; i++) {
632
633
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -694,7 +695,7 @@ async function handleSessionCommand() {
694
695
  allowDomain.push(sessionArgs[++i]);
695
696
  }
696
697
  }
697
- const { parseShareArg } = await import('./commands-vCeWXvYJ.mjs');
698
+ const { parseShareArg } = await import('./commands-C3TQOYUo.mjs');
698
699
  const shareEntries = share.map((s) => parseShareArg(s));
699
700
  await sessionSpawn(agent, dir, targetMachineId, {
700
701
  message,
@@ -782,7 +783,7 @@ async function handleSessionCommand() {
782
783
  console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
783
784
  process.exit(1);
784
785
  }
785
- const { sessionEditMessage } = await import('./commands-vCeWXvYJ.mjs');
786
+ const { sessionEditMessage } = await import('./commands-C3TQOYUo.mjs');
786
787
  await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
787
788
  } else if (sessionSubcommand === "refine") {
788
789
  if (!sessionArgs[1] || !sessionArgs[2]) {
@@ -790,7 +791,7 @@ async function handleSessionCommand() {
790
791
  console.error(" Asks the agent to revise its latest reply in place (no extra round).");
791
792
  process.exit(1);
792
793
  }
793
- const { sessionRefineLastReply } = await import('./commands-vCeWXvYJ.mjs');
794
+ const { sessionRefineLastReply } = await import('./commands-C3TQOYUo.mjs');
794
795
  await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
795
796
  } else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
796
797
  if (!sessionArgs[1]) {
@@ -798,7 +799,7 @@ async function handleSessionCommand() {
798
799
  console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
799
800
  process.exit(1);
800
801
  }
801
- const { sessionUndoEdit } = await import('./commands-vCeWXvYJ.mjs');
802
+ const { sessionUndoEdit } = await import('./commands-C3TQOYUo.mjs');
802
803
  await sessionUndoEdit(sessionArgs[1], targetMachineId);
803
804
  } else if (sessionSubcommand === "query") {
804
805
  const dir = sessionArgs[1];
@@ -808,7 +809,7 @@ async function handleSessionCommand() {
808
809
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
809
810
  process.exit(1);
810
811
  }
811
- const { sessionQuery } = await import('./commands-vCeWXvYJ.mjs');
812
+ const { sessionQuery } = await import('./commands-C3TQOYUo.mjs');
812
813
  await sessionQuery(dir, prompt, targetMachineId, {
813
814
  timeout: parseFlagInt("--timeout"),
814
815
  json: hasFlag("--json"),
@@ -841,7 +842,7 @@ async function handleSessionCommand() {
841
842
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
842
843
  process.exit(1);
843
844
  }
844
- const { sessionApprove } = await import('./commands-vCeWXvYJ.mjs');
845
+ const { sessionApprove } = await import('./commands-C3TQOYUo.mjs');
845
846
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
846
847
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
847
848
  json: hasFlag("--json")
@@ -851,7 +852,7 @@ async function handleSessionCommand() {
851
852
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
852
853
  process.exit(1);
853
854
  }
854
- const { sessionDeny } = await import('./commands-vCeWXvYJ.mjs');
855
+ const { sessionDeny } = await import('./commands-C3TQOYUo.mjs');
855
856
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
856
857
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
857
858
  json: hasFlag("--json")
@@ -896,7 +897,7 @@ async function handleSessionCommand() {
896
897
  console.error("Usage: svamp session set-title <title>");
897
898
  process.exit(1);
898
899
  }
899
- const { sessionSetTitle } = await import('./agentCommands-DOzMhE_G.mjs');
900
+ const { sessionSetTitle } = await import('./agentCommands-B_ozIVKT.mjs');
900
901
  await sessionSetTitle(title);
901
902
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
902
903
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -904,7 +905,7 @@ async function handleSessionCommand() {
904
905
  console.error("Usage: svamp session set-project-description <text>");
905
906
  process.exit(1);
906
907
  }
907
- const { sessionSetProjectDescription } = await import('./agentCommands-DOzMhE_G.mjs');
908
+ const { sessionSetProjectDescription } = await import('./agentCommands-B_ozIVKT.mjs');
908
909
  await sessionSetProjectDescription(desc);
909
910
  } else if (sessionSubcommand === "set-link") {
910
911
  const url = sessionArgs[1];
@@ -913,11 +914,11 @@ async function handleSessionCommand() {
913
914
  process.exit(1);
914
915
  }
915
916
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
916
- const { sessionSetLink } = await import('./agentCommands-DOzMhE_G.mjs');
917
+ const { sessionSetLink } = await import('./agentCommands-B_ozIVKT.mjs');
917
918
  await sessionSetLink(url, label);
918
919
  } else if (sessionSubcommand === "link") {
919
920
  const op = sessionArgs[1];
920
- const lm = await import('./agentCommands-DOzMhE_G.mjs');
921
+ const lm = await import('./agentCommands-B_ozIVKT.mjs');
921
922
  if (op === "add") {
922
923
  const url = sessionArgs[2];
923
924
  if (!url || url.startsWith("--")) {
@@ -952,7 +953,7 @@ async function handleSessionCommand() {
952
953
  process.exit(1);
953
954
  }
954
955
  const level = parseFlagStr("--level") || "info";
955
- const { sessionNotify } = await import('./agentCommands-DOzMhE_G.mjs');
956
+ const { sessionNotify } = await import('./agentCommands-B_ozIVKT.mjs');
956
957
  await sessionNotify(message, level);
957
958
  } else if (sessionSubcommand === "broadcast") {
958
959
  const action = sessionArgs[1];
@@ -960,7 +961,7 @@ async function handleSessionCommand() {
960
961
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
961
962
  process.exit(1);
962
963
  }
963
- const { sessionBroadcast } = await import('./agentCommands-DOzMhE_G.mjs');
964
+ const { sessionBroadcast } = await import('./agentCommands-B_ozIVKT.mjs');
964
965
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
965
966
  } else if (sessionSubcommand === "inbox") {
966
967
  const inboxSubcmd = sessionArgs[1];
@@ -971,7 +972,7 @@ async function handleSessionCommand() {
971
972
  process.exit(1);
972
973
  }
973
974
  if (agentSessionId) {
974
- const { inboxSend } = await import('./agentCommands-DOzMhE_G.mjs');
975
+ const { inboxSend } = await import('./agentCommands-B_ozIVKT.mjs');
975
976
  await inboxSend(sessionArgs[2], {
976
977
  body: sessionArgs[3],
977
978
  subject: parseFlagStr("--subject"),
@@ -986,7 +987,7 @@ async function handleSessionCommand() {
986
987
  }
987
988
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
988
989
  if (agentSessionId && !sessionArgs[2]) {
989
- const { inboxList } = await import('./agentCommands-DOzMhE_G.mjs');
990
+ const { inboxList } = await import('./agentCommands-B_ozIVKT.mjs');
990
991
  await inboxList({
991
992
  unread: hasFlag("--unread"),
992
993
  limit: parseFlagInt("--limit"),
@@ -1008,7 +1009,7 @@ async function handleSessionCommand() {
1008
1009
  process.exit(1);
1009
1010
  }
1010
1011
  if (agentSessionId && !sessionArgs[3]) {
1011
- const { inboxList } = await import('./agentCommands-DOzMhE_G.mjs');
1012
+ const { inboxList } = await import('./agentCommands-B_ozIVKT.mjs');
1012
1013
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
1013
1014
  } else if (sessionArgs[3]) {
1014
1015
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -1018,7 +1019,7 @@ async function handleSessionCommand() {
1018
1019
  }
1019
1020
  } else if (inboxSubcmd === "reply") {
1020
1021
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
1021
- const { inboxReply } = await import('./agentCommands-DOzMhE_G.mjs');
1022
+ const { inboxReply } = await import('./agentCommands-B_ozIVKT.mjs');
1022
1023
  await inboxReply(sessionArgs[2], sessionArgs[3]);
1023
1024
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
1024
1025
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -1056,7 +1057,7 @@ async function handleMachineCommand() {
1056
1057
  return;
1057
1058
  }
1058
1059
  if (machineSubcommand === "share") {
1059
- const { machineShare } = await import('./commands-vCeWXvYJ.mjs');
1060
+ const { machineShare } = await import('./commands-C3TQOYUo.mjs');
1060
1061
  let machineId;
1061
1062
  const shareArgs = [];
1062
1063
  for (let i = 1; i < machineArgs.length; i++) {
@@ -1107,14 +1108,14 @@ async function handleMachineCommand() {
1107
1108
  process.exit(1);
1108
1109
  }
1109
1110
  if (all) {
1110
- const { fleetExec } = await import('./fleet-pMXCRilx.mjs');
1111
+ const { fleetExec } = await import('./fleet-CJZOVjOY.mjs');
1111
1112
  await fleetExec(command, { cwd });
1112
1113
  } else {
1113
- const { machineExec } = await import('./commands-vCeWXvYJ.mjs');
1114
+ const { machineExec } = await import('./commands-C3TQOYUo.mjs');
1114
1115
  await machineExec(machineId, command, cwd);
1115
1116
  }
1116
1117
  } else if (machineSubcommand === "info") {
1117
- const { machineInfo } = await import('./commands-vCeWXvYJ.mjs');
1118
+ const { machineInfo } = await import('./commands-C3TQOYUo.mjs');
1118
1119
  let machineId;
1119
1120
  for (let i = 1; i < machineArgs.length; i++) {
1120
1121
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1134,10 +1135,10 @@ async function handleMachineCommand() {
1134
1135
  level = machineArgs[++i];
1135
1136
  }
1136
1137
  }
1137
- const { machineNotify } = await import('./agentCommands-DOzMhE_G.mjs');
1138
+ const { machineNotify } = await import('./agentCommands-B_ozIVKT.mjs');
1138
1139
  await machineNotify(message, level);
1139
1140
  } else if (machineSubcommand === "ls") {
1140
- const { machineLs } = await import('./commands-vCeWXvYJ.mjs');
1141
+ const { machineLs } = await import('./commands-C3TQOYUo.mjs');
1141
1142
  let machineId;
1142
1143
  let showHidden = false;
1143
1144
  let path;
@@ -1196,20 +1197,20 @@ Examples:
1196
1197
  };
1197
1198
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1198
1199
  if (sub === "status") {
1199
- const { fleetStatus } = await import('./fleet-pMXCRilx.mjs');
1200
+ const { fleetStatus } = await import('./fleet-CJZOVjOY.mjs');
1200
1201
  await fleetStatus();
1201
1202
  } else if (sub === "upgrade-claude") {
1202
- const { fleetUpgradeClaude } = await import('./fleet-pMXCRilx.mjs');
1203
+ const { fleetUpgradeClaude } = await import('./fleet-CJZOVjOY.mjs');
1203
1204
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1204
1205
  } else if (sub === "upgrade-svamp") {
1205
- const { fleetUpgradeSvamp } = await import('./fleet-pMXCRilx.mjs');
1206
+ const { fleetUpgradeSvamp } = await import('./fleet-CJZOVjOY.mjs');
1206
1207
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self"), force: hasFlag("force") });
1207
1208
  } else if (sub === "daemon-restart") {
1208
- const { fleetDaemonRestart } = await import('./fleet-pMXCRilx.mjs');
1209
+ const { fleetDaemonRestart } = await import('./fleet-CJZOVjOY.mjs');
1209
1210
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1210
1211
  } else if (sub === "push-skill") {
1211
1212
  const name = fleetArgs[1];
1212
- const { fleetPushSkill } = await import('./fleet-pMXCRilx.mjs');
1213
+ const { fleetPushSkill } = await import('./fleet-CJZOVjOY.mjs');
1213
1214
  await fleetPushSkill(name);
1214
1215
  } else {
1215
1216
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1225,7 +1226,7 @@ async function handleSkillsCommand() {
1225
1226
  await printSkillsHelp();
1226
1227
  return;
1227
1228
  }
1228
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-Bm5q9G35.mjs');
1229
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-CL8YI8k5.mjs');
1229
1230
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1230
1231
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1231
1232
  if (!query) {
@@ -1272,7 +1273,7 @@ async function loginToHypha() {
1272
1273
  process.exit(1);
1273
1274
  }
1274
1275
  const anchor = anchorArg.replace(/\/+$/, "");
1275
- const { loadInstanceConfig } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.af; });
1276
+ const { loadInstanceConfig } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.ar; });
1276
1277
  let cfg = null;
1277
1278
  try {
1278
1279
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1383,7 +1384,7 @@ async function logoutFromHypha() {
1383
1384
  } catch {
1384
1385
  }
1385
1386
  try {
1386
- const { clearInstanceConfigCache } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.af; });
1387
+ const { clearInstanceConfigCache } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.ar; });
1387
1388
  clearInstanceConfigCache();
1388
1389
  } catch {
1389
1390
  }
@@ -1722,7 +1723,7 @@ async function applyClaudeAuthFlags(argv) {
1722
1723
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1723
1724
  );
1724
1725
  }
1725
- const mod = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.a8; });
1726
+ const mod = await import('./run-CHIppB2r.mjs').then(function (n) { return n.ak; });
1726
1727
  if (hasHypha) {
1727
1728
  let url;
1728
1729
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1776,7 +1777,7 @@ async function applyDaemonShareFlag(argv) {
1776
1777
  }
1777
1778
  }
1778
1779
  if (collected.length === 0) return;
1779
- const { updateEnvFile } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.a8; });
1780
+ const { updateEnvFile } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.ak; });
1780
1781
  const seen = /* @__PURE__ */ new Set();
1781
1782
  const deduped = collected.filter((e) => {
1782
1783
  const k = e.toLowerCase();
@@ -1809,7 +1810,7 @@ async function handleWiseAgentCommand(rest) {
1809
1810
  }
1810
1811
  });
1811
1812
  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(" ");
1812
- const { wiseAskCli } = await import('./commands-vCeWXvYJ.mjs');
1813
+ const { wiseAskCli } = await import('./commands-C3TQOYUo.mjs');
1813
1814
  await wiseAskCli(machineId, message, sessionId, { json });
1814
1815
  return;
1815
1816
  }
@@ -1821,7 +1822,7 @@ async function handleWiseAgentCommand(rest) {
1821
1822
  }
1822
1823
  return void 0;
1823
1824
  };
1824
- const { runWiseVoiceCli } = await import('./headlessCli-D6k9Pnum.mjs');
1825
+ const { runWiseVoiceCli } = await import('./headlessCli-qBontdlf.mjs');
1825
1826
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1826
1827
  return;
1827
1828
  }
@@ -1839,7 +1840,7 @@ async function handleWiseAgentCommand(rest) {
1839
1840
  const mode = valueOf(["--mode"]);
1840
1841
  const mission = valueOf(["--mission"]);
1841
1842
  const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
1842
- const { wiseJoinMeetingCli } = await import('./commands-vCeWXvYJ.mjs');
1843
+ const { wiseJoinMeetingCli } = await import('./commands-C3TQOYUo.mjs');
1843
1844
  await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
1844
1845
  return;
1845
1846
  }
@@ -1851,7 +1852,7 @@ async function handleWiseAgentCommand(rest) {
1851
1852
  }
1852
1853
  return void 0;
1853
1854
  };
1854
- const { wiseLeaveMeetingCli } = await import('./commands-vCeWXvYJ.mjs');
1855
+ const { wiseLeaveMeetingCli } = await import('./commands-C3TQOYUo.mjs');
1855
1856
  await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
1856
1857
  return;
1857
1858
  }
@@ -1875,7 +1876,7 @@ async function handleWiseAgentCommand(rest) {
1875
1876
  }
1876
1877
  });
1877
1878
  const text = rest.slice(1).map((a, idx) => ({ a, idx: idx + 1 })).filter(({ a, idx }) => !a.startsWith("-") && !consumed.has(String(idx))).map(({ a }) => a).join(" ");
1878
- const { wiseAnnounceCli } = await import('./commands-vCeWXvYJ.mjs');
1879
+ const { wiseAnnounceCli } = await import('./commands-C3TQOYUo.mjs');
1879
1880
  await wiseAnnounceCli(machineId, text, sessionId, { json });
1880
1881
  return;
1881
1882
  }
@@ -1887,7 +1888,7 @@ async function handleWiseAgentCommand(rest) {
1887
1888
  }
1888
1889
  return void 0;
1889
1890
  };
1890
- const { wiseMeetingsCli } = await import('./commands-vCeWXvYJ.mjs');
1891
+ const { wiseMeetingsCli } = await import('./commands-C3TQOYUo.mjs');
1891
1892
  await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
1892
1893
  return;
1893
1894
  }
@@ -1937,7 +1938,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1937
1938
  return;
1938
1939
  }
1939
1940
  const authArgs = rest.slice(1);
1940
- const mod = await import('./auth-B_ZnoKX0.mjs');
1941
+ const mod = await import('./auth-BLDmT7XN.mjs');
1941
1942
  let action;
1942
1943
  try {
1943
1944
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1947,7 +1948,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1947
1948
  return;
1948
1949
  }
1949
1950
  if (action) {
1950
- const { updateEnvFile } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.a8; });
1951
+ const { updateEnvFile } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.ak; });
1951
1952
  const updates = mod.buildWiseAgentEnvUpdates(action);
1952
1953
  updateEnvFile(updates);
1953
1954
  for (const [k, v] of Object.entries(updates)) {
@@ -1961,7 +1962,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1961
1962
  }
1962
1963
  async function handleDaemonAuthCommand(argv) {
1963
1964
  const sub = (argv[0] || "status").toLowerCase();
1964
- const mod = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.a8; });
1965
+ const mod = await import('./run-CHIppB2r.mjs').then(function (n) { return n.ak; });
1965
1966
  if (sub === "--help" || sub === "-h" || sub === "help") {
1966
1967
  console.log(`
1967
1968
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2275,7 +2276,7 @@ Examples:
2275
2276
  async function printSkillsHelp() {
2276
2277
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2277
2278
  try {
2278
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-1BBi0_ol.mjs').then(function (n) { return n.ag; });
2279
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-CHIppB2r.mjs').then(function (n) { return n.as; });
2279
2280
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2280
2281
  } catch {
2281
2282
  }
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { execSync } from 'node:child_process';
3
3
  import { basename, resolve, join, isAbsolute } from 'node:path';
4
4
  import os from 'node:os';
5
- import { Q as formatHandle, T as normalizeAllowedUser, U as loadSecurityContextConfig, V as resolveSecurityContext, W as buildSecurityContextFromFlags, X as mergeSecurityContexts, c as connectToHypha, Y as buildSessionShareUrl, Z as computeOutboundHop, A as shortId, _ as registerAwaitingReply, $ as buildMachineShareUrl, a0 as parseHandle, a1 as handleMatchesMetadata } from './run-1BBi0_ol.mjs';
5
+ import { a2 as formatHandle, a3 as normalizeAllowedUser, a4 as loadSecurityContextConfig, a5 as resolveSecurityContext, a6 as buildSecurityContextFromFlags, a7 as mergeSecurityContexts, c as connectToHypha, a8 as buildSessionShareUrl, a9 as computeOutboundHop, k as shortId, aa as registerAwaitingReply, ab as buildMachineShareUrl, ac as parseHandle, ad as handleMatchesMetadata } from './run-CHIppB2r.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -20,6 +20,7 @@ import '@modelcontextprotocol/sdk/types.js';
20
20
  import 'zod';
21
21
  import 'node:fs/promises';
22
22
  import 'node:util';
23
+ import 'yaml';
23
24
 
24
25
  function formatTime(ts) {
25
26
  if (!ts) 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 { F as parseFrontmatter, G as getSkillsServer, H as getSkillsWorkspaceName, I as getSkillsCollectionName, J as fetchWithTimeout, K as searchSkills, L as SKILLS_DIR, M as getSkillInfo, N as downloadSkillFile, O as listSkillFiles } from './run-1BBi0_ol.mjs';
4
+ import { T as parseFrontmatter, U as getSkillsServer, V as getSkillsWorkspaceName, W as getSkillsCollectionName, X as fetchWithTimeout, Y as searchSkills, Z as SKILLS_DIR, _ as getSkillInfo, $ as downloadSkillFile, a0 as listSkillFiles } from './run-CHIppB2r.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
@@ -20,6 +20,7 @@ import '@modelcontextprotocol/sdk/types.js';
20
20
  import 'zod';
21
21
  import 'node:fs/promises';
22
22
  import 'node:util';
23
+ import 'yaml';
23
24
 
24
25
  const SVAMP_HOME = process.env.SVAMP_HOME || join(os.homedir(), ".svamp");
25
26
  const ENV_FILE = join(SVAMP_HOME, ".env");