svamp-cli 0.2.318 → 0.2.319

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 (27) hide show
  1. package/dist/{adminCommands-_az3eIOd.mjs → adminCommands-DBADX_Uo.mjs} +1 -1
  2. package/dist/{agentCommands-CI_sYhy6.mjs → agentCommands-BJeGwkeX.mjs} +6 -6
  3. package/dist/{auth-7Og-RZ50.mjs → auth-0NUGwOc0.mjs} +1 -1
  4. package/dist/{cli-D3_a7yin.mjs → cli-CWElpiIq.mjs} +76 -76
  5. package/dist/cli.mjs +2 -2
  6. package/dist/{commands-DxJHm9r0.mjs → commands-AdVHZXK6.mjs} +1 -1
  7. package/dist/{commands-DRYk0mQr.mjs → commands-BY1lmXaM.mjs} +1 -1
  8. package/dist/{commands-DaYsK7Af.mjs → commands-BsaTwKnd.mjs} +2 -2
  9. package/dist/{commands-eS7P4neN.mjs → commands-C0lwV0U3.mjs} +2 -2
  10. package/dist/{commands-C5bo2-Pk.mjs → commands-CJWgDDl5.mjs} +2 -2
  11. package/dist/{commands-CDL2fp9I.mjs → commands-CLgdrTSU.mjs} +2 -2
  12. package/dist/{commands-CwvpWFl7.mjs → commands-DMSkWb0h.mjs} +8 -8
  13. package/dist/{commands-B9niiK4o.mjs → commands-DubEbPAY.mjs} +1 -1
  14. package/dist/{fleet-BXfUlehy.mjs → fleet-OKnU0cYK.mjs} +2 -2
  15. package/dist/{headlessCli-CR9fW45i.mjs → headlessCli-CCO0IFYl.mjs} +2 -2
  16. package/dist/index.mjs +1 -1
  17. package/dist/{notifyCommands-DUr9QjLt.mjs → notifyCommands-4GUy4Mcl.mjs} +1 -1
  18. package/dist/{package-CDjOkJPh.mjs → package-BEEqsQhN.mjs} +1 -1
  19. package/dist/{pinnedClaudeCode-CnCpensV.mjs → pinnedClaudeCode-dbXgsGNK.mjs} +1 -1
  20. package/dist/{rpc-DX7_LzZf.mjs → rpc-FGp88Yxp.mjs} +1 -1
  21. package/dist/{rpc-CaKQ3aCj.mjs → rpc-TXF-di9u.mjs} +1 -1
  22. package/dist/{run-CC2ckdDX.mjs → run-09AkgeGM.mjs} +41 -12
  23. package/dist/{run-BuZDMLWU.mjs → run-7TVWXnOM.mjs} +1 -1
  24. package/dist/{scheduler-B11LcOId.mjs → scheduler-b-ysyKIj.mjs} +1 -1
  25. package/dist/{serveCommands-DtPbaNdu.mjs → serveCommands-D3W7w0G6.mjs} +29 -7
  26. package/dist/{sideband-C0CGbTIK.mjs → sideband-C1db5sMF.mjs} +1 -1
  27. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { c as connectToHypha, K as computeCollectionConfigUpdate, L as SYSTEM_COLLECTION_CONFIG } from './run-CC2ckdDX.mjs';
1
+ import { c as connectToHypha, K as computeCollectionConfigUpdate, L as SYSTEM_COLLECTION_CONFIG } from './run-09AkgeGM.mjs';
2
2
  import { existsSync, readFileSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
  import os from 'node:os';
@@ -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 { e as shortId } from './run-CC2ckdDX.mjs';
5
+ import { e as shortId } from './run-09AkgeGM.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -96,7 +96,7 @@ async function sessionSetTitle(title) {
96
96
  }
97
97
  async function sessionSetProjectDescription(description) {
98
98
  const dir = process.cwd();
99
- const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.as; });
99
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.as; });
100
100
  const desc = sanitizeDescription(description, 240);
101
101
  if (!desc) {
102
102
  console.error("Project description is empty.");
@@ -144,7 +144,7 @@ function readSessionLinks(config) {
144
144
  label: String(l.label || ""),
145
145
  url: String(l.url),
146
146
  ...l.icon ? { icon: String(l.icon) } : {},
147
- ...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
+ ...l.service && typeof l.service.name === "string" && (l.service.kind === "tunnel" || l.service.kind === "process" || l.service.kind === "serve") ? { service: { kind: l.service.kind, name: String(l.service.name) } } : {}
148
148
  }));
149
149
  }
150
150
  if (config.session_link && typeof config.session_link.url === "string") {
@@ -343,7 +343,7 @@ async function sessionBroadcast(action, args) {
343
343
  console.log(`Broadcast sent: ${action}`);
344
344
  }
345
345
  async function connectToMachineService() {
346
- const { connectAndGetMachine } = await import('./commands-DRYk0mQr.mjs');
346
+ const { connectAndGetMachine } = await import('./commands-BY1lmXaM.mjs');
347
347
  return connectAndGetMachine();
348
348
  }
349
349
  function buildInboxMessage(args) {
@@ -426,7 +426,7 @@ async function inboxSend(targetSessionId, opts) {
426
426
  console.error("Message body is required.");
427
427
  process.exit(1);
428
428
  }
429
- const { connectAndResolveSession } = await import('./commands-DRYk0mQr.mjs');
429
+ const { connectAndResolveSession } = await import('./commands-BY1lmXaM.mjs');
430
430
  let server;
431
431
  try {
432
432
  const { targetId, messageId } = await inboxSendCore(
@@ -481,7 +481,7 @@ async function inboxReply(messageId, body, opts) {
481
481
  console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
482
482
  process.exit(1);
483
483
  }
484
- const { connectAndResolveSession } = await import('./commands-DRYk0mQr.mjs');
484
+ const { connectAndResolveSession } = await import('./commands-BY1lmXaM.mjs');
485
485
  const { server: localServer, machine: localMachine } = await connectToMachineService();
486
486
  let localDisconnected = false;
487
487
  const disconnectLocal = async () => {
@@ -1,4 +1,4 @@
1
- import { a0 as resolveModel } from './run-CC2ckdDX.mjs';
1
+ import { a0 as resolveModel } from './run-09AkgeGM.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -1,4 +1,4 @@
1
- import { a1 as clearStopMarker, a2 as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-CC2ckdDX.mjs';
1
+ import { a1 as clearStopMarker, a2 as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-09AkgeGM.mjs';
2
2
  import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
3
3
 
4
4
  function flushAndExit(code) {
@@ -33,7 +33,7 @@ const subcommand = args[0];
33
33
  let daemonSubcommand = args[1];
34
34
  async function main() {
35
35
  try {
36
- const { getLoadedConfig } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.an; });
36
+ const { getLoadedConfig } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.an; });
37
37
  getLoadedConfig();
38
38
  } catch {
39
39
  }
@@ -52,7 +52,7 @@ async function main() {
52
52
  }
53
53
  const whenIdle = args.includes("--when-idle");
54
54
  const force = args.includes("--force");
55
- const mod = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.aC; });
55
+ const mod = await import('./run-09AkgeGM.mjs').then(function (n) { return n.aC; });
56
56
  if (whenIdle && !force) {
57
57
  if (mod.isDaemonAlive()) {
58
58
  mod.writePendingRestart({ reason: "svamp daemon restart --when-idle" });
@@ -359,7 +359,7 @@ async function main() {
359
359
  console.error("svamp service: Service commands are not available in sandboxed sessions.");
360
360
  process.exit(1);
361
361
  }
362
- const { handleServiceCommand } = await import('./commands-CwvpWFl7.mjs');
362
+ const { handleServiceCommand } = await import('./commands-DMSkWb0h.mjs');
363
363
  await handleServiceCommand();
364
364
  } else if (subcommand === "serve") {
365
365
  const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
@@ -367,7 +367,7 @@ async function main() {
367
367
  console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
368
368
  process.exit(1);
369
369
  }
370
- const { handleServeCommand } = await import('./serveCommands-DtPbaNdu.mjs');
370
+ const { handleServeCommand } = await import('./serveCommands-D3W7w0G6.mjs');
371
371
  await handleServeCommand();
372
372
  process.exit(0);
373
373
  } else if (subcommand === "process" || subcommand === "proc") {
@@ -376,7 +376,7 @@ async function main() {
376
376
  console.error("svamp process: Process commands are not available in sandboxed sessions.");
377
377
  process.exit(1);
378
378
  }
379
- const { processCommand } = await import('./commands-CDL2fp9I.mjs');
379
+ const { processCommand } = await import('./commands-CLgdrTSU.mjs');
380
380
  let machineId;
381
381
  const processArgs = args.slice(1);
382
382
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -390,26 +390,26 @@ async function main() {
390
390
  }), machineId);
391
391
  process.exit(0);
392
392
  } else if (subcommand === "outpost") {
393
- const { outpostCommand } = await import('./commands-C5bo2-Pk.mjs');
393
+ const { outpostCommand } = await import('./commands-CJWgDDl5.mjs');
394
394
  await outpostCommand(args.slice(1));
395
395
  process.exit(0);
396
396
  } else if (subcommand === "issue" || subcommand === "issues") {
397
- const { issueCommand } = await import('./commands-DaYsK7Af.mjs');
397
+ const { issueCommand } = await import('./commands-BsaTwKnd.mjs');
398
398
  await issueCommand(args.slice(1));
399
399
  await flushAndExit(0);
400
400
  } else if (subcommand === "workflow" || subcommand === "workflows") {
401
- const { workflowCommand } = await import('./commands-B9niiK4o.mjs');
401
+ const { workflowCommand } = await import('./commands-DubEbPAY.mjs');
402
402
  await workflowCommand(args.slice(1));
403
403
  await flushAndExit(0);
404
404
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
405
405
  await handleWiseAgentCommand(args.slice(1));
406
406
  process.exit(0);
407
407
  } else if (subcommand === "feature" || subcommand === "crew") {
408
- const { crewCommand } = await import('./commands-eS7P4neN.mjs');
408
+ const { crewCommand } = await import('./commands-C0lwV0U3.mjs');
409
409
  await crewCommand(args.slice(1));
410
410
  process.exit(0);
411
411
  } else if (subcommand === "notify") {
412
- const { notifyUser } = await import('./notifyCommands-DUr9QjLt.mjs');
412
+ const { notifyUser } = await import('./notifyCommands-4GUy4Mcl.mjs');
413
413
  const rest = args.slice(1);
414
414
  let email;
415
415
  const o = {};
@@ -426,7 +426,7 @@ async function main() {
426
426
  } else if (subcommand === "admin") {
427
427
  const adminSub = args[1];
428
428
  if (adminSub === "set-collection-config") {
429
- const { setCollectionConfig } = await import('./adminCommands-_az3eIOd.mjs');
429
+ const { setCollectionConfig } = await import('./adminCommands-DBADX_Uo.mjs');
430
430
  const rest = args.slice(2);
431
431
  let alias;
432
432
  let configJson;
@@ -436,10 +436,10 @@ async function main() {
436
436
  }
437
437
  await setCollectionConfig(alias, configJson);
438
438
  } else if (adminSub === "create-system-collections") {
439
- const { createSystemCollections } = await import('./adminCommands-_az3eIOd.mjs');
439
+ const { createSystemCollections } = await import('./adminCommands-DBADX_Uo.mjs');
440
440
  await createSystemCollections();
441
441
  } else if (adminSub === "migrate-collection-children") {
442
- const { migrateCollectionChildren } = await import('./adminCommands-_az3eIOd.mjs');
442
+ const { migrateCollectionChildren } = await import('./adminCommands-DBADX_Uo.mjs');
443
443
  const rest = args.slice(2).filter((a) => !a.startsWith("-"));
444
444
  await migrateCollectionChildren(rest[0], rest[1]);
445
445
  } else {
@@ -447,7 +447,7 @@ async function main() {
447
447
  }
448
448
  process.exit(0);
449
449
  } else if (subcommand === "events") {
450
- const { listEvents, ackEvent } = await import('./notifyCommands-DUr9QjLt.mjs');
450
+ const { listEvents, ackEvent } = await import('./notifyCommands-4GUy4Mcl.mjs');
451
451
  const sub = args[1];
452
452
  const rest = args.slice(2);
453
453
  let email;
@@ -468,7 +468,7 @@ async function main() {
468
468
  } else if (!subcommand || subcommand === "start") {
469
469
  await handleInteractiveCommand();
470
470
  } else if (subcommand === "--version" || subcommand === "-v") {
471
- const pkg = await import('./package-CDjOkJPh.mjs').catch(() => ({ default: { version: "unknown" } }));
471
+ const pkg = await import('./package-BEEqsQhN.mjs').catch(() => ({ default: { version: "unknown" } }));
472
472
  console.log(`svamp version: ${pkg.default.version}`);
473
473
  } else {
474
474
  console.error(`Unknown command: ${subcommand}`);
@@ -477,7 +477,7 @@ async function main() {
477
477
  }
478
478
  }
479
479
  async function handleInteractiveCommand() {
480
- const { runInteractive } = await import('./run-BuZDMLWU.mjs');
480
+ const { runInteractive } = await import('./run-7TVWXnOM.mjs');
481
481
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
482
482
  let directory = process.cwd();
483
483
  let resumeSessionId;
@@ -522,7 +522,7 @@ async function handleAgentCommand() {
522
522
  return;
523
523
  }
524
524
  if (agentArgs[0] === "list") {
525
- const { KNOWN_ACP_AGENTS, KNOWN_CODEX_AGENTS: KNOWN_CODEX_AGENTS2 } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.av; });
525
+ const { KNOWN_ACP_AGENTS, KNOWN_CODEX_AGENTS: KNOWN_CODEX_AGENTS2 } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.av; });
526
526
  console.log("Known agents:");
527
527
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
528
528
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -534,7 +534,7 @@ async function handleAgentCommand() {
534
534
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
535
535
  return;
536
536
  }
537
- const { resolveAcpAgentConfig, KNOWN_CODEX_AGENTS } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.av; });
537
+ const { resolveAcpAgentConfig, KNOWN_CODEX_AGENTS } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.av; });
538
538
  let cwd = process.cwd();
539
539
  const filteredArgs = [];
540
540
  for (let i = 0; i < agentArgs.length; i++) {
@@ -558,18 +558,18 @@ async function handleAgentCommand() {
558
558
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
559
559
  let backend;
560
560
  if (KNOWN_CODEX_AGENTS[config.agentName]) {
561
- const { CodexAppServerBackend } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.aw; });
561
+ const { CodexAppServerBackend } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.aw; });
562
562
  backend = new CodexAppServerBackend({ cwd, log: logFn });
563
563
  } else {
564
- const { AcpBackend } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.au; });
565
- const { GeminiTransport } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.ax; });
566
- const { KimiTransport } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.ay; });
567
- const { DefaultTransport } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.at; });
564
+ const { AcpBackend } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.au; });
565
+ const { GeminiTransport } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.ax; });
566
+ const { KimiTransport } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.ay; });
567
+ const { DefaultTransport } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.at; });
568
568
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : config.agentName === "kimi" ? new KimiTransport() : new DefaultTransport(config.agentName);
569
569
  let acpEnv;
570
570
  if (config.agentName === "kimi") {
571
- const { ensureKimiProviderConfigured } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.aA; });
572
- const { kimiSpawnEnv } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.az; });
571
+ const { ensureKimiProviderConfigured } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.aA; });
572
+ const { kimiSpawnEnv } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.az; });
573
573
  await ensureKimiProviderConfigured(process.env, config.command, logFn);
574
574
  acpEnv = kimiSpawnEnv(process.env);
575
575
  }
@@ -699,7 +699,7 @@ async function handleSessionCommand() {
699
699
  process.exit(1);
700
700
  }
701
701
  }
702
- const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionLoopExtend, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-DRYk0mQr.mjs');
702
+ const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionLoopExtend, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-BY1lmXaM.mjs');
703
703
  const parseFlagStr = (flag, shortFlag) => {
704
704
  for (let i = 1; i < sessionArgs.length; i++) {
705
705
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -773,7 +773,7 @@ async function handleSessionCommand() {
773
773
  console.warn(" --allow-write / a securityContext allowedDirectories, or keep the");
774
774
  console.warn(" sensitive path outside the workspace.");
775
775
  }
776
- const { parseShareArg } = await import('./commands-DRYk0mQr.mjs');
776
+ const { parseShareArg } = await import('./commands-BY1lmXaM.mjs');
777
777
  const shareEntries = share.map((s) => parseShareArg(s));
778
778
  await sessionSpawn(agent, dir, targetMachineId, {
779
779
  message,
@@ -864,7 +864,7 @@ async function handleSessionCommand() {
864
864
  console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
865
865
  process.exit(1);
866
866
  }
867
- const { sessionEditMessage } = await import('./commands-DRYk0mQr.mjs');
867
+ const { sessionEditMessage } = await import('./commands-BY1lmXaM.mjs');
868
868
  await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
869
869
  } else if (sessionSubcommand === "refine") {
870
870
  if (!sessionArgs[1] || !sessionArgs[2]) {
@@ -872,7 +872,7 @@ async function handleSessionCommand() {
872
872
  console.error(" Asks the agent to revise its latest reply in place (no extra round).");
873
873
  process.exit(1);
874
874
  }
875
- const { sessionRefineLastReply } = await import('./commands-DRYk0mQr.mjs');
875
+ const { sessionRefineLastReply } = await import('./commands-BY1lmXaM.mjs');
876
876
  await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
877
877
  } else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
878
878
  if (!sessionArgs[1]) {
@@ -880,7 +880,7 @@ async function handleSessionCommand() {
880
880
  console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
881
881
  process.exit(1);
882
882
  }
883
- const { sessionUndoEdit } = await import('./commands-DRYk0mQr.mjs');
883
+ const { sessionUndoEdit } = await import('./commands-BY1lmXaM.mjs');
884
884
  await sessionUndoEdit(sessionArgs[1], targetMachineId);
885
885
  } else if (sessionSubcommand === "query") {
886
886
  const dir = sessionArgs[1];
@@ -890,7 +890,7 @@ async function handleSessionCommand() {
890
890
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
891
891
  process.exit(1);
892
892
  }
893
- const { sessionQuery } = await import('./commands-DRYk0mQr.mjs');
893
+ const { sessionQuery } = await import('./commands-BY1lmXaM.mjs');
894
894
  await sessionQuery(dir, prompt, targetMachineId, {
895
895
  timeout: parseFlagInt("--timeout"),
896
896
  json: hasFlag("--json"),
@@ -923,7 +923,7 @@ async function handleSessionCommand() {
923
923
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
924
924
  process.exit(1);
925
925
  }
926
- const { sessionApprove } = await import('./commands-DRYk0mQr.mjs');
926
+ const { sessionApprove } = await import('./commands-BY1lmXaM.mjs');
927
927
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
928
928
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
929
929
  json: hasFlag("--json")
@@ -933,7 +933,7 @@ async function handleSessionCommand() {
933
933
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
934
934
  process.exit(1);
935
935
  }
936
- const { sessionDeny } = await import('./commands-DRYk0mQr.mjs');
936
+ const { sessionDeny } = await import('./commands-BY1lmXaM.mjs');
937
937
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
938
938
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
939
939
  json: hasFlag("--json")
@@ -985,7 +985,7 @@ async function handleSessionCommand() {
985
985
  console.error("Usage: svamp session set-title <title>");
986
986
  process.exit(1);
987
987
  }
988
- const { sessionSetTitle } = await import('./agentCommands-CI_sYhy6.mjs');
988
+ const { sessionSetTitle } = await import('./agentCommands-BJeGwkeX.mjs');
989
989
  await sessionSetTitle(title);
990
990
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
991
991
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -993,7 +993,7 @@ async function handleSessionCommand() {
993
993
  console.error("Usage: svamp session set-project-description <text>");
994
994
  process.exit(1);
995
995
  }
996
- const { sessionSetProjectDescription } = await import('./agentCommands-CI_sYhy6.mjs');
996
+ const { sessionSetProjectDescription } = await import('./agentCommands-BJeGwkeX.mjs');
997
997
  await sessionSetProjectDescription(desc);
998
998
  } else if (sessionSubcommand === "set-link") {
999
999
  const url = sessionArgs[1];
@@ -1002,11 +1002,11 @@ async function handleSessionCommand() {
1002
1002
  process.exit(1);
1003
1003
  }
1004
1004
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
1005
- const { sessionSetLink } = await import('./agentCommands-CI_sYhy6.mjs');
1005
+ const { sessionSetLink } = await import('./agentCommands-BJeGwkeX.mjs');
1006
1006
  await sessionSetLink(url, label);
1007
1007
  } else if (sessionSubcommand === "link") {
1008
1008
  const op = sessionArgs[1];
1009
- const lm = await import('./agentCommands-CI_sYhy6.mjs');
1009
+ const lm = await import('./agentCommands-BJeGwkeX.mjs');
1010
1010
  if (op === "add") {
1011
1011
  const url = sessionArgs[2];
1012
1012
  if (!url || url.startsWith("--")) {
@@ -1041,7 +1041,7 @@ async function handleSessionCommand() {
1041
1041
  process.exit(1);
1042
1042
  }
1043
1043
  const level = parseFlagStr("--level") || "info";
1044
- const { sessionNotify } = await import('./agentCommands-CI_sYhy6.mjs');
1044
+ const { sessionNotify } = await import('./agentCommands-BJeGwkeX.mjs');
1045
1045
  await sessionNotify(message, level);
1046
1046
  } else if (sessionSubcommand === "broadcast") {
1047
1047
  const action = sessionArgs[1];
@@ -1049,7 +1049,7 @@ async function handleSessionCommand() {
1049
1049
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
1050
1050
  process.exit(1);
1051
1051
  }
1052
- const { sessionBroadcast } = await import('./agentCommands-CI_sYhy6.mjs');
1052
+ const { sessionBroadcast } = await import('./agentCommands-BJeGwkeX.mjs');
1053
1053
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
1054
1054
  } else if (sessionSubcommand === "inbox") {
1055
1055
  const inboxSubcmd = sessionArgs[1];
@@ -1060,7 +1060,7 @@ async function handleSessionCommand() {
1060
1060
  process.exit(1);
1061
1061
  }
1062
1062
  if (agentSessionId) {
1063
- const { inboxSend } = await import('./agentCommands-CI_sYhy6.mjs');
1063
+ const { inboxSend } = await import('./agentCommands-BJeGwkeX.mjs');
1064
1064
  await inboxSend(sessionArgs[2], {
1065
1065
  body: sessionArgs[3],
1066
1066
  subject: parseFlagStr("--subject"),
@@ -1077,7 +1077,7 @@ async function handleSessionCommand() {
1077
1077
  }
1078
1078
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
1079
1079
  if (agentSessionId && !sessionArgs[2]) {
1080
- const { inboxList } = await import('./agentCommands-CI_sYhy6.mjs');
1080
+ const { inboxList } = await import('./agentCommands-BJeGwkeX.mjs');
1081
1081
  await inboxList({
1082
1082
  unread: hasFlag("--unread"),
1083
1083
  limit: parseFlagInt("--limit"),
@@ -1099,7 +1099,7 @@ async function handleSessionCommand() {
1099
1099
  process.exit(1);
1100
1100
  }
1101
1101
  if (agentSessionId && !sessionArgs[3]) {
1102
- const { inboxList } = await import('./agentCommands-CI_sYhy6.mjs');
1102
+ const { inboxList } = await import('./agentCommands-BJeGwkeX.mjs');
1103
1103
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
1104
1104
  } else if (sessionArgs[3]) {
1105
1105
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -1109,7 +1109,7 @@ async function handleSessionCommand() {
1109
1109
  }
1110
1110
  } else if (inboxSubcmd === "reply") {
1111
1111
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
1112
- const { inboxReply } = await import('./agentCommands-CI_sYhy6.mjs');
1112
+ const { inboxReply } = await import('./agentCommands-BJeGwkeX.mjs');
1113
1113
  await inboxReply(sessionArgs[2], sessionArgs[3]);
1114
1114
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
1115
1115
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -1147,7 +1147,7 @@ async function handleMachineCommand() {
1147
1147
  return;
1148
1148
  }
1149
1149
  if (machineSubcommand === "share") {
1150
- const { machineShare } = await import('./commands-DRYk0mQr.mjs');
1150
+ const { machineShare } = await import('./commands-BY1lmXaM.mjs');
1151
1151
  let machineId;
1152
1152
  const shareArgs = [];
1153
1153
  for (let i = 1; i < machineArgs.length; i++) {
@@ -1198,14 +1198,14 @@ async function handleMachineCommand() {
1198
1198
  process.exit(1);
1199
1199
  }
1200
1200
  if (all) {
1201
- const { fleetExec } = await import('./fleet-BXfUlehy.mjs');
1201
+ const { fleetExec } = await import('./fleet-OKnU0cYK.mjs');
1202
1202
  await fleetExec(command, { cwd });
1203
1203
  } else {
1204
- const { machineExec } = await import('./commands-DRYk0mQr.mjs');
1204
+ const { machineExec } = await import('./commands-BY1lmXaM.mjs');
1205
1205
  await machineExec(machineId, command, cwd);
1206
1206
  }
1207
1207
  } else if (machineSubcommand === "info") {
1208
- const { machineInfo } = await import('./commands-DRYk0mQr.mjs');
1208
+ const { machineInfo } = await import('./commands-BY1lmXaM.mjs');
1209
1209
  let machineId;
1210
1210
  for (let i = 1; i < machineArgs.length; i++) {
1211
1211
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1234,10 +1234,10 @@ async function handleMachineCommand() {
1234
1234
  console.error("Usage: svamp machine notify <message> [--level info|warning|error]");
1235
1235
  process.exit(1);
1236
1236
  }
1237
- const { machineNotify } = await import('./agentCommands-CI_sYhy6.mjs');
1237
+ const { machineNotify } = await import('./agentCommands-BJeGwkeX.mjs');
1238
1238
  await machineNotify(message, level);
1239
1239
  } else if (machineSubcommand === "ls") {
1240
- const { machineLs } = await import('./commands-DRYk0mQr.mjs');
1240
+ const { machineLs } = await import('./commands-BY1lmXaM.mjs');
1241
1241
  let machineId;
1242
1242
  let showHidden = false;
1243
1243
  let path;
@@ -1303,26 +1303,26 @@ Examples:
1303
1303
  };
1304
1304
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1305
1305
  if (sub === "status") {
1306
- const { fleetStatus } = await import('./fleet-BXfUlehy.mjs');
1306
+ const { fleetStatus } = await import('./fleet-OKnU0cYK.mjs');
1307
1307
  await fleetStatus();
1308
1308
  } else if (sub === "upgrade-claude") {
1309
- const { fleetUpgradeClaude } = await import('./fleet-BXfUlehy.mjs');
1309
+ const { fleetUpgradeClaude } = await import('./fleet-OKnU0cYK.mjs');
1310
1310
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1311
1311
  } else if (sub === "upgrade-codex") {
1312
- const { fleetUpgradeCodex } = await import('./fleet-BXfUlehy.mjs');
1312
+ const { fleetUpgradeCodex } = await import('./fleet-OKnU0cYK.mjs');
1313
1313
  await fleetUpgradeCodex({ version: flag("version", "-v") });
1314
1314
  } else if (sub === "upgrade-kimi") {
1315
- const { fleetUpgradeKimi } = await import('./fleet-BXfUlehy.mjs');
1315
+ const { fleetUpgradeKimi } = await import('./fleet-OKnU0cYK.mjs');
1316
1316
  await fleetUpgradeKimi({ version: flag("version", "-v") });
1317
1317
  } else if (sub === "upgrade-svamp") {
1318
- const { fleetUpgradeSvamp } = await import('./fleet-BXfUlehy.mjs');
1318
+ const { fleetUpgradeSvamp } = await import('./fleet-OKnU0cYK.mjs');
1319
1319
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self"), force: hasFlag("force") });
1320
1320
  } else if (sub === "daemon-restart") {
1321
- const { fleetDaemonRestart } = await import('./fleet-BXfUlehy.mjs');
1321
+ const { fleetDaemonRestart } = await import('./fleet-OKnU0cYK.mjs');
1322
1322
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1323
1323
  } else if (sub === "push-skill") {
1324
1324
  const name = fleetArgs[1];
1325
- const { fleetPushSkill } = await import('./fleet-BXfUlehy.mjs');
1325
+ const { fleetPushSkill } = await import('./fleet-OKnU0cYK.mjs');
1326
1326
  await fleetPushSkill(name);
1327
1327
  } else {
1328
1328
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1338,7 +1338,7 @@ async function handleSkillsCommand() {
1338
1338
  await printSkillsHelp();
1339
1339
  return;
1340
1340
  }
1341
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-DxJHm9r0.mjs');
1341
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-AdVHZXK6.mjs');
1342
1342
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1343
1343
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1344
1344
  if (!query) {
@@ -1385,7 +1385,7 @@ async function loginToHypha() {
1385
1385
  process.exit(1);
1386
1386
  }
1387
1387
  const anchor = anchorArg.replace(/\/+$/, "");
1388
- const { loadInstanceConfig } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.an; });
1388
+ const { loadInstanceConfig } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.an; });
1389
1389
  let cfg = null;
1390
1390
  try {
1391
1391
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1500,7 +1500,7 @@ async function logoutFromHypha() {
1500
1500
  } catch {
1501
1501
  }
1502
1502
  try {
1503
- const { clearInstanceConfigCache } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.an; });
1503
+ const { clearInstanceConfigCache } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.an; });
1504
1504
  clearInstanceConfigCache();
1505
1505
  } catch {
1506
1506
  }
@@ -1853,7 +1853,7 @@ async function applyClaudeAuthFlags(argv) {
1853
1853
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1854
1854
  );
1855
1855
  }
1856
- const mod = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.aq; });
1856
+ const mod = await import('./run-09AkgeGM.mjs').then(function (n) { return n.aq; });
1857
1857
  if (hasHypha) {
1858
1858
  let url;
1859
1859
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1907,7 +1907,7 @@ async function applyDaemonShareFlag(argv) {
1907
1907
  }
1908
1908
  }
1909
1909
  if (collected.length === 0) return;
1910
- const { updateEnvFile } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.aq; });
1910
+ const { updateEnvFile } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.aq; });
1911
1911
  const seen = /* @__PURE__ */ new Set();
1912
1912
  const deduped = collected.filter((e) => {
1913
1913
  const k = e.toLowerCase();
@@ -1940,7 +1940,7 @@ async function handleWiseAgentCommand(rest) {
1940
1940
  }
1941
1941
  });
1942
1942
  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(" ");
1943
- const { wiseAskCli } = await import('./commands-DRYk0mQr.mjs');
1943
+ const { wiseAskCli } = await import('./commands-BY1lmXaM.mjs');
1944
1944
  await wiseAskCli(machineId, message, sessionId, { json });
1945
1945
  return;
1946
1946
  }
@@ -1952,7 +1952,7 @@ async function handleWiseAgentCommand(rest) {
1952
1952
  }
1953
1953
  return void 0;
1954
1954
  };
1955
- const { runWiseVoiceCli } = await import('./headlessCli-CR9fW45i.mjs');
1955
+ const { runWiseVoiceCli } = await import('./headlessCli-CCO0IFYl.mjs');
1956
1956
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1957
1957
  return;
1958
1958
  }
@@ -1970,7 +1970,7 @@ async function handleWiseAgentCommand(rest) {
1970
1970
  const mode = valueOf(["--mode"]);
1971
1971
  const mission = valueOf(["--mission"]);
1972
1972
  const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
1973
- const { wiseJoinMeetingCli } = await import('./commands-DRYk0mQr.mjs');
1973
+ const { wiseJoinMeetingCli } = await import('./commands-BY1lmXaM.mjs');
1974
1974
  await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
1975
1975
  return;
1976
1976
  }
@@ -1982,7 +1982,7 @@ async function handleWiseAgentCommand(rest) {
1982
1982
  }
1983
1983
  return void 0;
1984
1984
  };
1985
- const { wiseLeaveMeetingCli } = await import('./commands-DRYk0mQr.mjs');
1985
+ const { wiseLeaveMeetingCli } = await import('./commands-BY1lmXaM.mjs');
1986
1986
  await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
1987
1987
  return;
1988
1988
  }
@@ -2006,7 +2006,7 @@ async function handleWiseAgentCommand(rest) {
2006
2006
  }
2007
2007
  });
2008
2008
  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(" ");
2009
- const { wiseAnnounceCli } = await import('./commands-DRYk0mQr.mjs');
2009
+ const { wiseAnnounceCli } = await import('./commands-BY1lmXaM.mjs');
2010
2010
  await wiseAnnounceCli(machineId, text, sessionId, { json });
2011
2011
  return;
2012
2012
  }
@@ -2018,7 +2018,7 @@ async function handleWiseAgentCommand(rest) {
2018
2018
  }
2019
2019
  return void 0;
2020
2020
  };
2021
- const { wiseMeetingsCli } = await import('./commands-DRYk0mQr.mjs');
2021
+ const { wiseMeetingsCli } = await import('./commands-BY1lmXaM.mjs');
2022
2022
  await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
2023
2023
  return;
2024
2024
  }
@@ -2069,7 +2069,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
2069
2069
  return;
2070
2070
  }
2071
2071
  const authArgs = rest.slice(1);
2072
- const mod = await import('./auth-7Og-RZ50.mjs');
2072
+ const mod = await import('./auth-0NUGwOc0.mjs');
2073
2073
  let action;
2074
2074
  try {
2075
2075
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -2079,7 +2079,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
2079
2079
  return;
2080
2080
  }
2081
2081
  if (action) {
2082
- const { updateEnvFile } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.aq; });
2082
+ const { updateEnvFile } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.aq; });
2083
2083
  const updates = mod.buildWiseAgentEnvUpdates(action);
2084
2084
  updateEnvFile(updates);
2085
2085
  for (const [k, v] of Object.entries(updates)) {
@@ -2093,7 +2093,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
2093
2093
  }
2094
2094
  async function handleDaemonAuthCommand(argv) {
2095
2095
  const sub = (argv[0] || "status").toLowerCase();
2096
- const mod = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.aq; });
2096
+ const mod = await import('./run-09AkgeGM.mjs').then(function (n) { return n.aq; });
2097
2097
  if (sub === "--help" || sub === "-h" || sub === "help") {
2098
2098
  console.log(`
2099
2099
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2167,8 +2167,8 @@ one step: --use-hypha-proxy / --use-claude-login / --anthropic-base-url URL --an
2167
2167
  }
2168
2168
  async function handleDaemonCodexAuthCommand(argv) {
2169
2169
  const sub = (argv[0] || "status").toLowerCase();
2170
- const { updateEnvFile } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.aq; });
2171
- const { resolveCodexProvider } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.ar; });
2170
+ const { updateEnvFile } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.aq; });
2171
+ const { resolveCodexProvider } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.ar; });
2172
2172
  const redact = (k) => k && k.length > 10 ? `${k.slice(0, 6)}\u2026${k.slice(-4)}` : k ? "***" : "(unset)";
2173
2173
  if (sub === "--help" || sub === "-h" || sub === "help") {
2174
2174
  console.log(`
@@ -2254,8 +2254,8 @@ The generic LLM_API_BASE / LLM_API_KEY / LLM_MODEL env vars are also honored if
2254
2254
  }
2255
2255
  async function handleDaemonKimiAuthCommand(argv) {
2256
2256
  const sub = (argv[0] || "status").toLowerCase();
2257
- const { updateEnvFile } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.aq; });
2258
- const { resolveKimiProvider, buildKimiCatalogAddArgs, DEFAULT_KIMI_PROVIDER } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.az; });
2257
+ const { updateEnvFile } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.aq; });
2258
+ const { resolveKimiProvider, buildKimiCatalogAddArgs, DEFAULT_KIMI_PROVIDER } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.az; });
2259
2259
  const redact = (k) => k && k.length > 10 ? `${k.slice(0, 6)}\u2026${k.slice(-4)}` : k ? "***" : "(unset)";
2260
2260
  const PRESETS = {
2261
2261
  "use-moonshot": { provider: "moonshotai", base: "https://api.moonshot.ai/v1", label: "Moonshot AI (moonshotai)" },
@@ -2618,7 +2618,7 @@ Examples:
2618
2618
  async function printSkillsHelp() {
2619
2619
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2620
2620
  try {
2621
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.aB; });
2621
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.aB; });
2622
2622
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2623
2623
  } catch {
2624
2624
  }
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import './run-CC2ckdDX.mjs';
1
+ import './run-09AkgeGM.mjs';
2
2
  import './serviceManager-hlOVxkhW.mjs';
3
- import './cli-D3_a7yin.mjs';
3
+ import './cli-CWElpiIq.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
6
6
  import 'fs';
@@ -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 { Q as parseFrontmatter, T as getSkillsServer, U as getSkillsWorkspaceName, V as getSkillsCollectionName, W as fetchWithTimeout, X as searchSkills, Y as SKILLS_DIR, Z as getSkillInfo, _ as downloadSkillFile, $ as listSkillFiles } from './run-CC2ckdDX.mjs';
4
+ import { Q as parseFrontmatter, T as getSkillsServer, U as getSkillsWorkspaceName, V as getSkillsCollectionName, W as fetchWithTimeout, X as searchSkills, Y as SKILLS_DIR, Z as getSkillInfo, _ as downloadSkillFile, $ as listSkillFiles } from './run-09AkgeGM.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { execSync, execFileSync } from 'node:child_process';
3
3
  import { basename, resolve, join, isAbsolute } from 'node:path';
4
4
  import os from 'node:os';
5
- import { a3 as formatHandle, a4 as normalizeAllowedUser, a5 as loadSecurityContextConfig, a6 as resolveSecurityContext, a7 as buildSecurityContextFromFlags, a8 as mergeSecurityContexts, c as connectToHypha, a9 as buildSessionShareUrl, aa as computeOutboundHop, e as shortId, ab as registerAwaitingReply, ac as buildMachineShareUrl, ad as parseHandle, ae as handleMatchesMetadata } from './run-CC2ckdDX.mjs';
5
+ import { a3 as formatHandle, a4 as normalizeAllowedUser, a5 as loadSecurityContextConfig, a6 as resolveSecurityContext, a7 as buildSecurityContextFromFlags, a8 as mergeSecurityContexts, c as connectToHypha, a9 as buildSessionShareUrl, aa as computeOutboundHop, e as shortId, ab as registerAwaitingReply, ac as buildMachineShareUrl, ad as parseHandle, ae as handleMatchesMetadata } from './run-09AkgeGM.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -1,8 +1,8 @@
1
1
  import { execSync } from 'node:child_process';
2
2
  import { existsSync, readFileSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
- import { f as flushAndExit } from './cli-D3_a7yin.mjs';
5
- import { f as resolveProjectRoot, n as searchIssues, l as listIssues, m as isPendingIssue, i as resumeIssue, p as pauseIssue, j as addComment, u as updateIssue, h as getIssue, o as isVisibleTo, H as summarize, k as addIssue } from './run-CC2ckdDX.mjs';
4
+ import { f as flushAndExit } from './cli-CWElpiIq.mjs';
5
+ import { f as resolveProjectRoot, n as searchIssues, l as listIssues, m as isPendingIssue, i as resumeIssue, p as pauseIssue, j as addComment, u as updateIssue, h as getIssue, o as isVisibleTo, H as summarize, k as addIssue } from './run-09AkgeGM.mjs';
6
6
  import './serviceManager-hlOVxkhW.mjs';
7
7
  import 'os';
8
8
  import 'fs/promises';
@@ -1,8 +1,8 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { join, resolve } from 'node:path';
3
- import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-DRYk0mQr.mjs';
3
+ import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-BY1lmXaM.mjs';
4
4
  import { execFileSync } from 'node:child_process';
5
- import { ag as withFileLock, u as updateIssue, j as addComment, k as addIssue, e as shortId } from './run-CC2ckdDX.mjs';
5
+ import { ag as withFileLock, u as updateIssue, j as addComment, k as addIssue, e as shortId } from './run-09AkgeGM.mjs';
6
6
  import 'node:os';
7
7
  import 'os';
8
8
  import 'fs/promises';
@@ -1,9 +1,9 @@
1
- import { connectAndResolveSession } from './commands-DRYk0mQr.mjs';
1
+ import { connectAndResolveSession } from './commands-BY1lmXaM.mjs';
2
2
  import 'node:fs';
3
3
  import 'node:child_process';
4
4
  import 'node:path';
5
5
  import 'node:os';
6
- import './run-CC2ckdDX.mjs';
6
+ import './run-09AkgeGM.mjs';
7
7
  import 'os';
8
8
  import 'fs/promises';
9
9
  import 'fs';
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-DRYk0mQr.mjs';
3
+ import { connectAndGetMachine } from './commands-BY1lmXaM.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-CC2ckdDX.mjs';
8
+ import './run-09AkgeGM.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -60,7 +60,7 @@ async function serviceExpose(args) {
60
60
  process.exit(1);
61
61
  }
62
62
  if (foreground) {
63
- const { runFrpcTunnel } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.ao; });
63
+ const { runFrpcTunnel } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.ao; });
64
64
  await runFrpcTunnel(name, ports, void 0, {
65
65
  group,
66
66
  groupKey,
@@ -70,7 +70,7 @@ async function serviceExpose(args) {
70
70
  });
71
71
  return;
72
72
  }
73
- const { connectAndGetMachine } = await import('./commands-DRYk0mQr.mjs');
73
+ const { connectAndGetMachine } = await import('./commands-BY1lmXaM.mjs');
74
74
  const { server, machine } = await connectAndGetMachine();
75
75
  try {
76
76
  const status = await machine.tunnelStart({
@@ -92,7 +92,7 @@ async function serviceExpose(args) {
92
92
  console.log(` port ${port}: ${url}`);
93
93
  }
94
94
  if (process.env.SVAMP_SESSION_ID) {
95
- const { autoAddSessionLink } = await import('./agentCommands-CI_sYhy6.mjs');
95
+ const { autoAddSessionLink } = await import('./agentCommands-BJeGwkeX.mjs');
96
96
  let added = 0;
97
97
  for (const [port, url] of urlEntries) {
98
98
  const label = urlEntries.length > 1 ? `${name}:${port}` : name;
@@ -128,8 +128,8 @@ async function serviceServe(args) {
128
128
  const resolvedDir = path.resolve(directory);
129
129
  console.log(`Serving ${resolvedDir}`);
130
130
  const http = await import('http');
131
- const { serveStaticMount } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.ap; });
132
- const { getFreePort } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.ao; });
131
+ const { serveStaticMount } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.ap; });
132
+ const { getFreePort } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.ao; });
133
133
  const server = http.createServer((req, res) => {
134
134
  const u = new URL(req.url || "/", "http://127.0.0.1");
135
135
  let rel = u.pathname;
@@ -152,7 +152,7 @@ async function serviceServe(args) {
152
152
  resolve(18080);
153
153
  });
154
154
  });
155
- const { runFrpcTunnel } = await import('./run-CC2ckdDX.mjs').then(function (n) { return n.ao; });
155
+ const { runFrpcTunnel } = await import('./run-09AkgeGM.mjs').then(function (n) { return n.ao; });
156
156
  void server;
157
157
  await runFrpcTunnel(name, [servePort]);
158
158
  } catch (err) {
@@ -162,7 +162,7 @@ async function serviceServe(args) {
162
162
  }
163
163
  async function serviceList(_args) {
164
164
  try {
165
- const { connectAndGetMachine } = await import('./commands-DRYk0mQr.mjs');
165
+ const { connectAndGetMachine } = await import('./commands-BY1lmXaM.mjs');
166
166
  const { server, machine } = await connectAndGetMachine();
167
167
  try {
168
168
  const tunnels = await machine.tunnelList({});
@@ -202,7 +202,7 @@ async function serviceDelete(args) {
202
202
  process.exit(1);
203
203
  }
204
204
  try {
205
- const { connectAndGetMachine } = await import('./commands-DRYk0mQr.mjs');
205
+ const { connectAndGetMachine } = await import('./commands-BY1lmXaM.mjs');
206
206
  const { server, machine } = await connectAndGetMachine();
207
207
  try {
208
208
  await machine.tunnelStop({ name });
@@ -1,5 +1,5 @@
1
1
  import { spawnSync } from 'node:child_process';
2
- import { f as resolveProjectRoot, I as workflowSteps, x as setWorkflowEnabled, D as isWorkflowEnabled, y as removeWorkflow, v as getWorkflow, C as listWorkflows, A as saveWorkflow, B as rawWorkflow } from './run-CC2ckdDX.mjs';
2
+ import { f as resolveProjectRoot, I as workflowSteps, x as setWorkflowEnabled, D as isWorkflowEnabled, y as removeWorkflow, v as getWorkflow, C as listWorkflows, A as saveWorkflow, B as rawWorkflow } from './run-09AkgeGM.mjs';
3
3
  import 'os';
4
4
  import 'fs/promises';
5
5
  import 'fs';
@@ -1,8 +1,8 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import os from 'node:os';
4
- import { af as PINNED_CODEX_VERSION, c as connectToHypha } from './run-CC2ckdDX.mjs';
5
- import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-CnCpensV.mjs';
4
+ import { af as PINNED_CODEX_VERSION, c as connectToHypha } from './run-09AkgeGM.mjs';
5
+ import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-dbXgsGNK.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -1,5 +1,5 @@
1
- import { a0 as resolveModel, ah as describeMisconfiguration, ai as buildMachineDeps } from './run-CC2ckdDX.mjs';
2
- import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-C0CGbTIK.mjs';
1
+ import { a0 as resolveModel, ah as describeMisconfiguration, ai as buildMachineDeps } from './run-09AkgeGM.mjs';
2
+ import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-C1db5sMF.mjs';
3
3
  import { WebSocket } from 'ws';
4
4
  import { execSync, spawn } from 'child_process';
5
5
  import 'os';
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-CC2ckdDX.mjs';
1
+ export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-09AkgeGM.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -1,4 +1,4 @@
1
- import { c as connectToHypha, S as SharingNotificationSync, J as parseJwtEmail } from './run-CC2ckdDX.mjs';
1
+ import { c as connectToHypha, S as SharingNotificationSync, J as parseJwtEmail } from './run-09AkgeGM.mjs';
2
2
  import { randomUUID } from 'node:crypto';
3
3
  import { existsSync, readFileSync } from 'node:fs';
4
4
  import { join } from 'node:path';
@@ -1,5 +1,5 @@
1
1
  var name = "svamp-cli";
2
- var version = "0.2.318";
2
+ var version = "0.2.319";
3
3
  var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
4
4
  var author = "Amun AI AB";
5
5
  var license = "SEE LICENSE IN LICENSE";
@@ -1,7 +1,7 @@
1
1
  import { spawn, exec as exec$1 } from 'node:child_process';
2
2
  import { promisify } from 'node:util';
3
3
 
4
- const PINNED_CLAUDE_CODE_VERSION = "2.1.225";
4
+ const PINNED_CLAUDE_CODE_VERSION = "2.1.226";
5
5
  const exec = promisify(exec$1);
6
6
  let _reconcile = null;
7
7
  function beginClaudeVersionReconcile(log) {
@@ -1,4 +1,4 @@
1
- import { f as resolveProjectRoot, q as getRun, t as listRuns, v as getWorkflow, w as runWorkflow, x as setWorkflowEnabled, y as removeWorkflow, z as validateWorkflowName, A as saveWorkflow, B as rawWorkflow, C as listWorkflows } from './run-CC2ckdDX.mjs';
1
+ import { f as resolveProjectRoot, q as getRun, t as listRuns, v as getWorkflow, w as runWorkflow, x as setWorkflowEnabled, y as removeWorkflow, z as validateWorkflowName, A as saveWorkflow, B as rawWorkflow, C as listWorkflows } from './run-09AkgeGM.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -1,4 +1,4 @@
1
- import { f as resolveProjectRoot, u as updateIssue, h as getIssue, i as resumeIssue, p as pauseIssue, j as addComment, k as addIssue, l as listIssues, m as isPendingIssue, n as searchIssues, o as isVisibleTo } from './run-CC2ckdDX.mjs';
1
+ import { f as resolveProjectRoot, u as updateIssue, h as getIssue, i as resumeIssue, p as pauseIssue, j as addComment, k as addIssue, l as listIssues, m as isPendingIssue, n as searchIssues, o as isVisibleTo } from './run-09AkgeGM.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -7921,7 +7921,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
7921
7921
  }
7922
7922
  const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
7923
7923
  const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
7924
- const { toolsForRole } = await import('./sideband-C0CGbTIK.mjs');
7924
+ const { toolsForRole } = await import('./sideband-C1db5sMF.mjs');
7925
7925
  const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
7926
7926
  return fmt(r2);
7927
7927
  }
@@ -8026,7 +8026,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
8026
8026
  return { ok: false, call_id: callId, status: "busy", error: "channel is busy (too many concurrent requests) \u2014 retry shortly" };
8027
8027
  }
8028
8028
  const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
8029
- const { queryCore } = await import('./commands-DRYk0mQr.mjs');
8029
+ const { queryCore } = await import('./commands-BY1lmXaM.mjs');
8030
8030
  const timeout = c.reply?.timeout_sec || 120;
8031
8031
  let result;
8032
8032
  try {
@@ -18803,7 +18803,7 @@ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata
18803
18803
  url: String(l.url).trim(),
18804
18804
  ...l.icon ? { icon: String(l.icon) } : {},
18805
18805
  // #0266: carry the service backing ({kind,name}) so the Launch Pad can decommission it.
18806
- ...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) } } : {}
18806
+ ...l.service && typeof l.service.name === "string" && (l.service.kind === "tunnel" || l.service.kind === "process" || l.service.kind === "serve") ? { service: { kind: l.service.kind, name: String(l.service.name) } } : {}
18807
18807
  }));
18808
18808
  const cur = meta.sessionLinks;
18809
18809
  if (JSON.stringify(cur || []) !== JSON.stringify(links)) {
@@ -19510,7 +19510,7 @@ async function startDaemon(options) {
19510
19510
  try {
19511
19511
  const dir = loadSessionIndex()[sessionId]?.directory;
19512
19512
  if (!dir) return;
19513
- const { reconcileServiceLinks } = await import('./agentCommands-CI_sYhy6.mjs');
19513
+ const { reconcileServiceLinks } = await import('./agentCommands-BJeGwkeX.mjs');
19514
19514
  const configPath = getSvampConfigPath(dir, sessionId);
19515
19515
  const config = readSvampConfig(configPath);
19516
19516
  const entries = Array.from(urls.entries());
@@ -19527,6 +19527,27 @@ async function startDaemon(options) {
19527
19527
  logger.log(`[exposed-tunnels] Link reconcile failed for ${tunnelName}: ${err?.message || err}`);
19528
19528
  }
19529
19529
  }
19530
+ async function reconcileMountSessionLink(sessionId, mountName, url) {
19531
+ if (!sessionId || !url) return;
19532
+ try {
19533
+ const dir = loadSessionIndex()[sessionId]?.directory;
19534
+ if (!dir) return;
19535
+ const { reconcileServiceLinks } = await import('./agentCommands-BJeGwkeX.mjs');
19536
+ const configPath = getSvampConfigPath(dir, sessionId);
19537
+ const config = readSvampConfig(configPath);
19538
+ const incoming = [{
19539
+ url: String(url),
19540
+ label: mountName,
19541
+ service: { kind: "serve", name: mountName }
19542
+ }];
19543
+ if (reconcileServiceLinks(config, incoming)) {
19544
+ writeSvampConfig(configPath, config);
19545
+ logger.log(`[serve] Reconciled Launch Pad link for mount ${mountName} \u2192 session ${sessionId}`);
19546
+ }
19547
+ } catch (err) {
19548
+ logger.log(`[serve] Link reconcile failed for mount ${mountName}: ${err?.message || err}`);
19549
+ }
19550
+ }
19530
19551
  async function createExposedTunnel(spec) {
19531
19552
  const { FrpcTunnel } = await Promise.resolve().then(function () { return frpc; });
19532
19553
  const tunnel = new FrpcTunnel({
@@ -19556,7 +19577,7 @@ async function startDaemon(options) {
19556
19577
  ensureAutoInstalledCommands(logger);
19557
19578
  (async () => {
19558
19579
  try {
19559
- const { beginClaudeVersionReconcile } = await import('./pinnedClaudeCode-CnCpensV.mjs');
19580
+ const { beginClaudeVersionReconcile } = await import('./pinnedClaudeCode-dbXgsGNK.mjs');
19560
19581
  beginClaudeVersionReconcile((msg) => logger.log(msg));
19561
19582
  } catch (e) {
19562
19583
  logger.log(`[claude-version] check failed: ${e?.message || e}`);
@@ -21873,11 +21894,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
21873
21894
  });
21874
21895
  },
21875
21896
  onIssue: async (params) => {
21876
- const { issueRpc } = await import('./rpc-CaKQ3aCj.mjs');
21897
+ const { issueRpc } = await import('./rpc-TXF-di9u.mjs');
21877
21898
  return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
21878
21899
  },
21879
21900
  onWorkflow: async (params) => {
21880
- const { workflowRpc } = await import('./rpc-DX7_LzZf.mjs');
21901
+ const { workflowRpc } = await import('./rpc-FGp88Yxp.mjs');
21881
21902
  return workflowRpc(params?.cwd || directory, params || {});
21882
21903
  },
21883
21904
  onRipgrep: async (args, cwd) => {
@@ -22584,11 +22605,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
22584
22605
  });
22585
22606
  },
22586
22607
  onIssue: async (params) => {
22587
- const { issueRpc } = await import('./rpc-CaKQ3aCj.mjs');
22608
+ const { issueRpc } = await import('./rpc-TXF-di9u.mjs');
22588
22609
  return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
22589
22610
  },
22590
22611
  onWorkflow: async (params) => {
22591
- const { workflowRpc } = await import('./rpc-DX7_LzZf.mjs');
22612
+ const { workflowRpc } = await import('./rpc-FGp88Yxp.mjs');
22592
22613
  return workflowRpc(params?.cwd || directory, params || {});
22593
22614
  },
22594
22615
  onRipgrep: async (args, cwd) => {
@@ -23571,7 +23592,15 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
23571
23592
  };
23572
23593
  writeDaemonStateFile(localState);
23573
23594
  logger.log("Daemon state file written \u2014 daemon is up; restoring mounts/sessions in background");
23574
- serveManager$1.restore().catch((err) => logger.error(`[serve] mount restore failed: ${err?.message || err}`));
23595
+ serveManager$1.restore().then(async () => {
23596
+ try {
23597
+ for (const m of serveManager$1.listMounts()) {
23598
+ if (m?.sessionId && m?.url) await reconcileMountSessionLink(m.sessionId, m.name, m.url);
23599
+ }
23600
+ } catch (err) {
23601
+ logger.log(`[serve] mount link reconcile failed: ${err?.message || err}`);
23602
+ }
23603
+ }).catch((err) => logger.error(`[serve] mount restore failed: ${err?.message || err}`));
23575
23604
  const daemonOwnerEmail = parseJwtEmail(process.env.HYPHA_TOKEN || "") || null;
23576
23605
  serveManager$1.setSessionResolver((sessionId) => {
23577
23606
  for (const [, session] of pidToTrackedSession) {
@@ -23631,7 +23660,7 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
23631
23660
  }
23632
23661
  if (persistedSessions.length > 0) {
23633
23662
  try {
23634
- const { awaitClaudeVersionReady } = await import('./pinnedClaudeCode-CnCpensV.mjs');
23663
+ const { awaitClaudeVersionReady } = await import('./pinnedClaudeCode-dbXgsGNK.mjs');
23635
23664
  await awaitClaudeVersionReady();
23636
23665
  } catch {
23637
23666
  }
@@ -23876,7 +23905,7 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
23876
23905
  const PING_TIMEOUT_MS = 15e3;
23877
23906
  const POST_RECONNECT_GRACE_MS = 2e4;
23878
23907
  const RECONNECT_JITTER_MS = 2500;
23879
- const { WorkflowScheduler } = await import('./scheduler-B11LcOId.mjs');
23908
+ const { WorkflowScheduler } = await import('./scheduler-b-ysyKIj.mjs');
23880
23909
  const workflowProjectRoots = () => {
23881
23910
  const dirs = /* @__PURE__ */ new Set();
23882
23911
  for (const s of pidToTrackedSession.values()) {
@@ -1,4 +1,4 @@
1
- import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { aj as applyClaudeProxyEnv, ak as composeSessionId, al as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, am as generateHookSettings } from './run-CC2ckdDX.mjs';
1
+ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { aj as applyClaudeProxyEnv, ak as composeSessionId, al as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, am as generateHookSettings } from './run-09AkgeGM.mjs';
2
2
  import os from 'node:os';
3
3
  import { resolve, join } from 'node:path';
4
4
  import { existsSync, readFileSync, watch } from 'node:fs';
@@ -1,4 +1,4 @@
1
- import { f as resolveProjectRoot, C as listWorkflows, D as isWorkflowEnabled, E as workflowSchedules, F as inZone, w as runWorkflow, G as cronMatches } from './run-CC2ckdDX.mjs';
1
+ import { f as resolveProjectRoot, C as listWorkflows, D as isWorkflowEnabled, E as workflowSchedules, F as inZone, w as runWorkflow, G as cronMatches } from './run-09AkgeGM.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -54,7 +54,7 @@ async function handleServeCommand() {
54
54
  }
55
55
  }
56
56
  async function serveAdd(args, machineId) {
57
- const { connectAndGetMachine } = await import('./commands-DRYk0mQr.mjs');
57
+ const { connectAndGetMachine } = await import('./commands-BY1lmXaM.mjs');
58
58
  const pos = positionalArgs(args);
59
59
  const name = pos[0];
60
60
  if (!name) {
@@ -74,9 +74,10 @@ async function serveAdd(args, machineId) {
74
74
  access = accessFlag.split(",").map((e) => e.trim()).filter(Boolean);
75
75
  }
76
76
  }
77
+ const sessionId = process.env.SVAMP_SESSION_ID;
77
78
  const { machine, server } = await connectAndGetMachine(machineId);
78
79
  try {
79
- const result = await machine.serveAdd({ name, directory, access });
80
+ const result = await machine.serveAdd({ name, directory, sessionId, access });
80
81
  console.log(`Mount added: ${name} \u2192 ${directory}`);
81
82
  const accessLabel = access === "public" ? "public (no auth)" : access === "link" ? "link (capability URL \u2014 anyone with the URL can view)" : access === "owner" ? "owner only (Hypha login)" : `${access.join(", ")} (Hypha login)`;
82
83
  console.log(`Access: ${accessLabel}`);
@@ -84,6 +85,13 @@ async function serveAdd(args, machineId) {
84
85
  if (access === "link") {
85
86
  console.log(`(URL embeds a long capability token; keep it secret to keep the mount private.)`);
86
87
  }
88
+ if (sessionId && result?.url) {
89
+ try {
90
+ const { autoAddSessionLink } = await import('./agentCommands-BJeGwkeX.mjs');
91
+ autoAddSessionLink(String(result.url), name, void 0, { kind: "serve", name });
92
+ } catch {
93
+ }
94
+ }
87
95
  } catch (err) {
88
96
  console.error(`Error: ${err.message || err}`);
89
97
  process.exit(1);
@@ -93,7 +101,7 @@ async function serveAdd(args, machineId) {
93
101
  }
94
102
  }
95
103
  async function serveApply(args, machineId) {
96
- const { connectAndGetMachine } = await import('./commands-DRYk0mQr.mjs');
104
+ const { connectAndGetMachine } = await import('./commands-BY1lmXaM.mjs');
97
105
  const fs = await import('fs');
98
106
  const yaml = await import('yaml');
99
107
  const file = positionalArgs(args)[0];
@@ -159,7 +167,7 @@ async function serveApply(args, machineId) {
159
167
  name: parsed.name,
160
168
  directory: parsed.directory ? path.resolve(parsed.directory) : void 0,
161
169
  process: proc,
162
- sessionId: parsed.sessionId ?? parsed.session_id,
170
+ sessionId: parsed.sessionId ?? parsed.session_id ?? process.env.SVAMP_SESSION_ID,
163
171
  access: parsed.access ?? "link",
164
172
  // default flipped from 'owner' to 'link' (capability URL)
165
173
  ownerEmail: parsed.ownerEmail ?? parsed.owner_email
@@ -173,6 +181,20 @@ async function serveApply(args, machineId) {
173
181
  if (proc?.wakeOnRequest) console.log("Wake-on-request: enabled (process starts on first incoming request)");
174
182
  if (proc?.idleTimeoutSec) console.log(`Idle timeout: ${proc.idleTimeoutSec}s`);
175
183
  console.log(`URL: ${result.url}`);
184
+ if (params.sessionId && result?.url) {
185
+ try {
186
+ const { autoAddSessionLink } = await import('./agentCommands-BJeGwkeX.mjs');
187
+ const prevSession = process.env.SVAMP_SESSION_ID;
188
+ process.env.SVAMP_SESSION_ID = String(params.sessionId);
189
+ try {
190
+ autoAddSessionLink(String(result.url), params.name, void 0, { kind: "serve", name: params.name });
191
+ } finally {
192
+ if (prevSession === void 0) delete process.env.SVAMP_SESSION_ID;
193
+ else process.env.SVAMP_SESSION_ID = prevSession;
194
+ }
195
+ } catch {
196
+ }
197
+ }
176
198
  } catch (err) {
177
199
  console.error(`Error: ${err.message || err}`);
178
200
  process.exit(1);
@@ -182,7 +204,7 @@ async function serveApply(args, machineId) {
182
204
  }
183
205
  }
184
206
  async function serveRemove(args, machineId) {
185
- const { connectAndGetMachine } = await import('./commands-DRYk0mQr.mjs');
207
+ const { connectAndGetMachine } = await import('./commands-BY1lmXaM.mjs');
186
208
  const pos = positionalArgs(args);
187
209
  const name = pos[0];
188
210
  if (!name) {
@@ -202,7 +224,7 @@ async function serveRemove(args, machineId) {
202
224
  }
203
225
  }
204
226
  async function serveList(args, machineId) {
205
- const { connectAndGetMachine } = await import('./commands-DRYk0mQr.mjs');
227
+ const { connectAndGetMachine } = await import('./commands-BY1lmXaM.mjs');
206
228
  const all = hasFlag(args, "--all", "-a");
207
229
  const json = hasFlag(args, "--json");
208
230
  const sessionId = getFlag(args, "--session");
@@ -236,7 +258,7 @@ async function serveList(args, machineId) {
236
258
  }
237
259
  }
238
260
  async function serveInfo(machineId) {
239
- const { connectAndGetMachine } = await import('./commands-DRYk0mQr.mjs');
261
+ const { connectAndGetMachine } = await import('./commands-BY1lmXaM.mjs');
240
262
  const { machine, server } = await connectAndGetMachine(machineId);
241
263
  try {
242
264
  const info = await machine.serveInfo();
@@ -1,4 +1,4 @@
1
- import { R as READ_ONLY_TOOLS, M as loadMachineContext, N as buildMachineInstructions, O as machineToolsForRole, P as buildMachineTools } from './run-CC2ckdDX.mjs';
1
+ import { R as READ_ONLY_TOOLS, M as loadMachineContext, N as buildMachineInstructions, O as machineToolsForRole, P as buildMachineTools } from './run-09AkgeGM.mjs';
2
2
  import 'node:child_process';
3
3
  import 'os';
4
4
  import 'fs/promises';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svamp-cli",
3
- "version": "0.2.318",
3
+ "version": "0.2.319",
4
4
  "description": "Svamp CLI \u2014 AI workspace daemon on Hypha Cloud",
5
5
  "author": "Amun AI AB",
6
6
  "license": "SEE LICENSE IN LICENSE",