svamp-cli 0.2.257 → 0.2.259

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/{agentCommands-fCsOp7ko.mjs → agentCommands-w72BRYhk.mjs} +6 -9
  2. package/dist/{auth-BH6Awl3O.mjs → auth-CLFNmaXL.mjs} +2 -5
  3. package/dist/cli.mjs +156 -69
  4. package/dist/{commands-DNIxtTXe.mjs → commands-BPxSEwAc.mjs} +3 -6
  5. package/dist/{commands-B6BkPRui.mjs → commands-BpcWHrQ7.mjs} +8 -9
  6. package/dist/{commands-CE1PdEJJ.mjs → commands-BtXxn3tI.mjs} +2 -5
  7. package/dist/{commands-B5veY89L.mjs → commands-CXiGBP6w.mjs} +2 -5
  8. package/dist/{commands-BpNDUqvv.mjs → commands-D3jsQ9Sj.mjs} +21 -18
  9. package/dist/{commands-BzF6GzdR.mjs → commands-DVEsNZUB.mjs} +2 -5
  10. package/dist/{commands-BCmpKBjg.mjs → commands-bQxTpr-M.mjs} +2 -5
  11. package/dist/{fleet-XYsLuf-3.mjs → fleet-BC9JHEWF.mjs} +3 -6
  12. package/dist/{frpc-QESvQN-s.mjs → frpc-BCOnJSAM.mjs} +11 -10
  13. package/dist/{headlessCli-DuCmcrAL.mjs → headlessCli-fagwmUja.mjs} +3 -6
  14. package/dist/index.mjs +2 -5
  15. package/dist/{package-BA3c2JLu.mjs → package-Dn7kNPhz.mjs} +2 -2
  16. package/dist/{pinnedClaudeCode-DuLXaoGP.mjs → pinnedClaudeCode-B9O-hKxm.mjs} +1 -1
  17. package/dist/{rpc-DCeDG4c7.mjs → rpc-D-1o_gWF.mjs} +2 -5
  18. package/dist/{rpc-Bscxex4z.mjs → rpc-Dko-Fkk6.mjs} +2 -5
  19. package/dist/{run-BmOCcZRG.mjs → run-BWBtm0gY.mjs} +1 -5
  20. package/dist/{run-BtGnnEMI.mjs → run-CT8Leg3-.mjs} +729 -425
  21. package/dist/{scheduler-Dbqmnd_o.mjs → scheduler-CN8jChyQ.mjs} +2 -5
  22. package/dist/{serveCommands-DueTsJSe.mjs → serveCommands-sWtLnJRW.mjs} +5 -5
  23. package/dist/{serveManager-BclzoPIb.mjs → serveManager-BuXk1_SH.mjs} +180 -77
  24. package/dist/{sideband-C_ifGgde.mjs → sideband-ByYvGtj3.mjs} +2 -5
  25. package/dist/staticFileServer-CbYnj2bH.mjs +255 -0
  26. package/package.json +2 -2
  27. package/dist/caddy-CuTbE3NY.mjs +0 -322
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-BtGnnEMI.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-CT8Leg3-.mjs';
2
2
  import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
3
3
  import 'os';
4
4
  import 'fs/promises';
@@ -15,10 +15,7 @@ import 'node:path';
15
15
  import 'node:events';
16
16
  import 'node:os';
17
17
  import '@agentclientprotocol/sdk';
18
- import '@modelcontextprotocol/sdk/client/index.js';
19
- import '@modelcontextprotocol/sdk/client/stdio.js';
20
- import '@modelcontextprotocol/sdk/types.js';
21
- import 'zod';
18
+ import 'node:readline';
22
19
  import 'node:fs/promises';
23
20
  import 'node:util';
24
21
  import 'yaml';
@@ -35,7 +32,7 @@ const subcommand = args[0];
35
32
  let daemonSubcommand = args[1];
36
33
  async function main() {
37
34
  try {
38
- const { getLoadedConfig } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.ar; });
35
+ const { getLoadedConfig } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.as; });
39
36
  getLoadedConfig();
40
37
  } catch {
41
38
  }
@@ -54,7 +51,7 @@ async function main() {
54
51
  }
55
52
  const whenIdle = args.includes("--when-idle");
56
53
  const force = args.includes("--force");
57
- const mod = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.at; });
54
+ const mod = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.au; });
58
55
  if (whenIdle && !force) {
59
56
  if (mod.isDaemonAlive()) {
60
57
  mod.writePendingRestart({ reason: "svamp daemon restart --when-idle" });
@@ -321,6 +318,9 @@ async function main() {
321
318
  } else if (daemonSubcommand === "auth") {
322
319
  await handleDaemonAuthCommand(args.slice(2));
323
320
  process.exit(0);
321
+ } else if (daemonSubcommand === "codex-auth") {
322
+ await handleDaemonCodexAuthCommand(args.slice(2));
323
+ process.exit(0);
324
324
  } else {
325
325
  printDaemonHelp();
326
326
  }
@@ -355,7 +355,7 @@ async function main() {
355
355
  console.error("svamp service: Service commands are not available in sandboxed sessions.");
356
356
  process.exit(1);
357
357
  }
358
- const { handleServiceCommand } = await import('./commands-BpNDUqvv.mjs');
358
+ const { handleServiceCommand } = await import('./commands-D3jsQ9Sj.mjs');
359
359
  await handleServiceCommand();
360
360
  } else if (subcommand === "serve") {
361
361
  const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
@@ -363,7 +363,7 @@ async function main() {
363
363
  console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
364
364
  process.exit(1);
365
365
  }
366
- const { handleServeCommand } = await import('./serveCommands-DueTsJSe.mjs');
366
+ const { handleServeCommand } = await import('./serveCommands-sWtLnJRW.mjs');
367
367
  await handleServeCommand();
368
368
  process.exit(0);
369
369
  } else if (subcommand === "process" || subcommand === "proc") {
@@ -372,7 +372,7 @@ async function main() {
372
372
  console.error("svamp process: Process commands are not available in sandboxed sessions.");
373
373
  process.exit(1);
374
374
  }
375
- const { processCommand } = await import('./commands-DNIxtTXe.mjs');
375
+ const { processCommand } = await import('./commands-BPxSEwAc.mjs');
376
376
  let machineId;
377
377
  const processArgs = args.slice(1);
378
378
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -386,18 +386,18 @@ async function main() {
386
386
  }), machineId);
387
387
  process.exit(0);
388
388
  } else if (subcommand === "issue" || subcommand === "issues") {
389
- const { issueCommand } = await import('./commands-BzF6GzdR.mjs');
389
+ const { issueCommand } = await import('./commands-DVEsNZUB.mjs');
390
390
  await issueCommand(args.slice(1));
391
391
  process.exit(0);
392
392
  } else if (subcommand === "workflow" || subcommand === "workflows") {
393
- const { workflowCommand } = await import('./commands-B5veY89L.mjs');
393
+ const { workflowCommand } = await import('./commands-CXiGBP6w.mjs');
394
394
  await workflowCommand(args.slice(1));
395
395
  process.exit(0);
396
396
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
397
397
  await handleWiseAgentCommand(args.slice(1));
398
398
  process.exit(0);
399
399
  } else if (subcommand === "feature" || subcommand === "crew") {
400
- const { crewCommand } = await import('./commands-B6BkPRui.mjs');
400
+ const { crewCommand } = await import('./commands-BpcWHrQ7.mjs');
401
401
  await crewCommand(args.slice(1));
402
402
  process.exit(0);
403
403
  } else if (subcommand === "--help" || subcommand === "-h") {
@@ -405,7 +405,7 @@ async function main() {
405
405
  } else if (!subcommand || subcommand === "start") {
406
406
  await handleInteractiveCommand();
407
407
  } else if (subcommand === "--version" || subcommand === "-v") {
408
- const pkg = await import('./package-BA3c2JLu.mjs').catch(() => ({ default: { version: "unknown" } }));
408
+ const pkg = await import('./package-Dn7kNPhz.mjs').catch(() => ({ default: { version: "unknown" } }));
409
409
  console.log(`svamp version: ${pkg.default.version}`);
410
410
  } else {
411
411
  console.error(`Unknown command: ${subcommand}`);
@@ -414,7 +414,7 @@ async function main() {
414
414
  }
415
415
  }
416
416
  async function handleInteractiveCommand() {
417
- const { runInteractive } = await import('./run-BmOCcZRG.mjs');
417
+ const { runInteractive } = await import('./run-BWBtm0gY.mjs');
418
418
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
419
419
  let directory = process.cwd();
420
420
  let resumeSessionId;
@@ -459,19 +459,19 @@ async function handleAgentCommand() {
459
459
  return;
460
460
  }
461
461
  if (agentArgs[0] === "list") {
462
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.ao; });
462
+ const { KNOWN_ACP_AGENTS, KNOWN_CODEX_AGENTS: KNOWN_CODEX_AGENTS2 } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.ao; });
463
463
  console.log("Known agents:");
464
464
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
465
465
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
466
466
  }
467
- for (const [name, config2] of Object.entries(KNOWN_MCP_AGENTS2)) {
467
+ for (const [name, config2] of Object.entries(KNOWN_CODEX_AGENTS2)) {
468
468
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (MCP)`);
469
469
  }
470
470
  console.log('\nUse "svamp agent <name>" to start an interactive session.');
471
471
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
472
472
  return;
473
473
  }
474
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.ao; });
474
+ const { resolveAcpAgentConfig, KNOWN_CODEX_AGENTS } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.ao; });
475
475
  let cwd = process.cwd();
476
476
  const filteredArgs = [];
477
477
  for (let i = 0; i < agentArgs.length; i++) {
@@ -494,13 +494,13 @@ async function handleAgentCommand() {
494
494
  };
495
495
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
496
496
  let backend;
497
- if (KNOWN_MCP_AGENTS[config.agentName]) {
498
- const { CodexMcpBackend } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.ap; });
499
- backend = new CodexMcpBackend({ cwd, log: logFn });
497
+ if (KNOWN_CODEX_AGENTS[config.agentName]) {
498
+ const { CodexAppServerBackend } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.aq; });
499
+ backend = new CodexAppServerBackend({ cwd, log: logFn });
500
500
  } else {
501
- const { AcpBackend } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.an; });
502
- const { GeminiTransport } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.aq; });
503
- const { DefaultTransport } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.am; });
501
+ const { AcpBackend } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.an; });
502
+ const { GeminiTransport } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.ar; });
503
+ const { DefaultTransport } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.am; });
504
504
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
505
505
  backend = new AcpBackend({
506
506
  agentName: config.agentName,
@@ -627,7 +627,7 @@ async function handleSessionCommand() {
627
627
  process.exit(1);
628
628
  }
629
629
  }
630
- 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-CE1PdEJJ.mjs');
630
+ 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-BtXxn3tI.mjs');
631
631
  const parseFlagStr = (flag, shortFlag) => {
632
632
  for (let i = 1; i < sessionArgs.length; i++) {
633
633
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -695,7 +695,7 @@ async function handleSessionCommand() {
695
695
  allowDomain.push(sessionArgs[++i]);
696
696
  }
697
697
  }
698
- const { parseShareArg } = await import('./commands-CE1PdEJJ.mjs');
698
+ const { parseShareArg } = await import('./commands-BtXxn3tI.mjs');
699
699
  const shareEntries = share.map((s) => parseShareArg(s));
700
700
  await sessionSpawn(agent, dir, targetMachineId, {
701
701
  message,
@@ -785,7 +785,7 @@ async function handleSessionCommand() {
785
785
  console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
786
786
  process.exit(1);
787
787
  }
788
- const { sessionEditMessage } = await import('./commands-CE1PdEJJ.mjs');
788
+ const { sessionEditMessage } = await import('./commands-BtXxn3tI.mjs');
789
789
  await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
790
790
  } else if (sessionSubcommand === "refine") {
791
791
  if (!sessionArgs[1] || !sessionArgs[2]) {
@@ -793,7 +793,7 @@ async function handleSessionCommand() {
793
793
  console.error(" Asks the agent to revise its latest reply in place (no extra round).");
794
794
  process.exit(1);
795
795
  }
796
- const { sessionRefineLastReply } = await import('./commands-CE1PdEJJ.mjs');
796
+ const { sessionRefineLastReply } = await import('./commands-BtXxn3tI.mjs');
797
797
  await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
798
798
  } else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
799
799
  if (!sessionArgs[1]) {
@@ -801,7 +801,7 @@ async function handleSessionCommand() {
801
801
  console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
802
802
  process.exit(1);
803
803
  }
804
- const { sessionUndoEdit } = await import('./commands-CE1PdEJJ.mjs');
804
+ const { sessionUndoEdit } = await import('./commands-BtXxn3tI.mjs');
805
805
  await sessionUndoEdit(sessionArgs[1], targetMachineId);
806
806
  } else if (sessionSubcommand === "query") {
807
807
  const dir = sessionArgs[1];
@@ -811,7 +811,7 @@ async function handleSessionCommand() {
811
811
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
812
812
  process.exit(1);
813
813
  }
814
- const { sessionQuery } = await import('./commands-CE1PdEJJ.mjs');
814
+ const { sessionQuery } = await import('./commands-BtXxn3tI.mjs');
815
815
  await sessionQuery(dir, prompt, targetMachineId, {
816
816
  timeout: parseFlagInt("--timeout"),
817
817
  json: hasFlag("--json"),
@@ -844,7 +844,7 @@ async function handleSessionCommand() {
844
844
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
845
845
  process.exit(1);
846
846
  }
847
- const { sessionApprove } = await import('./commands-CE1PdEJJ.mjs');
847
+ const { sessionApprove } = await import('./commands-BtXxn3tI.mjs');
848
848
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
849
849
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
850
850
  json: hasFlag("--json")
@@ -854,7 +854,7 @@ async function handleSessionCommand() {
854
854
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
855
855
  process.exit(1);
856
856
  }
857
- const { sessionDeny } = await import('./commands-CE1PdEJJ.mjs');
857
+ const { sessionDeny } = await import('./commands-BtXxn3tI.mjs');
858
858
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
859
859
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
860
860
  json: hasFlag("--json")
@@ -906,7 +906,7 @@ async function handleSessionCommand() {
906
906
  console.error("Usage: svamp session set-title <title>");
907
907
  process.exit(1);
908
908
  }
909
- const { sessionSetTitle } = await import('./agentCommands-fCsOp7ko.mjs');
909
+ const { sessionSetTitle } = await import('./agentCommands-w72BRYhk.mjs');
910
910
  await sessionSetTitle(title);
911
911
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
912
912
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -914,7 +914,7 @@ async function handleSessionCommand() {
914
914
  console.error("Usage: svamp session set-project-description <text>");
915
915
  process.exit(1);
916
916
  }
917
- const { sessionSetProjectDescription } = await import('./agentCommands-fCsOp7ko.mjs');
917
+ const { sessionSetProjectDescription } = await import('./agentCommands-w72BRYhk.mjs');
918
918
  await sessionSetProjectDescription(desc);
919
919
  } else if (sessionSubcommand === "set-link") {
920
920
  const url = sessionArgs[1];
@@ -923,11 +923,11 @@ async function handleSessionCommand() {
923
923
  process.exit(1);
924
924
  }
925
925
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
926
- const { sessionSetLink } = await import('./agentCommands-fCsOp7ko.mjs');
926
+ const { sessionSetLink } = await import('./agentCommands-w72BRYhk.mjs');
927
927
  await sessionSetLink(url, label);
928
928
  } else if (sessionSubcommand === "link") {
929
929
  const op = sessionArgs[1];
930
- const lm = await import('./agentCommands-fCsOp7ko.mjs');
930
+ const lm = await import('./agentCommands-w72BRYhk.mjs');
931
931
  if (op === "add") {
932
932
  const url = sessionArgs[2];
933
933
  if (!url || url.startsWith("--")) {
@@ -962,7 +962,7 @@ async function handleSessionCommand() {
962
962
  process.exit(1);
963
963
  }
964
964
  const level = parseFlagStr("--level") || "info";
965
- const { sessionNotify } = await import('./agentCommands-fCsOp7ko.mjs');
965
+ const { sessionNotify } = await import('./agentCommands-w72BRYhk.mjs');
966
966
  await sessionNotify(message, level);
967
967
  } else if (sessionSubcommand === "broadcast") {
968
968
  const action = sessionArgs[1];
@@ -970,7 +970,7 @@ async function handleSessionCommand() {
970
970
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
971
971
  process.exit(1);
972
972
  }
973
- const { sessionBroadcast } = await import('./agentCommands-fCsOp7ko.mjs');
973
+ const { sessionBroadcast } = await import('./agentCommands-w72BRYhk.mjs');
974
974
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
975
975
  } else if (sessionSubcommand === "inbox") {
976
976
  const inboxSubcmd = sessionArgs[1];
@@ -981,7 +981,7 @@ async function handleSessionCommand() {
981
981
  process.exit(1);
982
982
  }
983
983
  if (agentSessionId) {
984
- const { inboxSend } = await import('./agentCommands-fCsOp7ko.mjs');
984
+ const { inboxSend } = await import('./agentCommands-w72BRYhk.mjs');
985
985
  await inboxSend(sessionArgs[2], {
986
986
  body: sessionArgs[3],
987
987
  subject: parseFlagStr("--subject"),
@@ -996,7 +996,7 @@ async function handleSessionCommand() {
996
996
  }
997
997
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
998
998
  if (agentSessionId && !sessionArgs[2]) {
999
- const { inboxList } = await import('./agentCommands-fCsOp7ko.mjs');
999
+ const { inboxList } = await import('./agentCommands-w72BRYhk.mjs');
1000
1000
  await inboxList({
1001
1001
  unread: hasFlag("--unread"),
1002
1002
  limit: parseFlagInt("--limit"),
@@ -1018,7 +1018,7 @@ async function handleSessionCommand() {
1018
1018
  process.exit(1);
1019
1019
  }
1020
1020
  if (agentSessionId && !sessionArgs[3]) {
1021
- const { inboxList } = await import('./agentCommands-fCsOp7ko.mjs');
1021
+ const { inboxList } = await import('./agentCommands-w72BRYhk.mjs');
1022
1022
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
1023
1023
  } else if (sessionArgs[3]) {
1024
1024
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -1028,7 +1028,7 @@ async function handleSessionCommand() {
1028
1028
  }
1029
1029
  } else if (inboxSubcmd === "reply") {
1030
1030
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
1031
- const { inboxReply } = await import('./agentCommands-fCsOp7ko.mjs');
1031
+ const { inboxReply } = await import('./agentCommands-w72BRYhk.mjs');
1032
1032
  await inboxReply(sessionArgs[2], sessionArgs[3]);
1033
1033
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
1034
1034
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -1066,7 +1066,7 @@ async function handleMachineCommand() {
1066
1066
  return;
1067
1067
  }
1068
1068
  if (machineSubcommand === "share") {
1069
- const { machineShare } = await import('./commands-CE1PdEJJ.mjs');
1069
+ const { machineShare } = await import('./commands-BtXxn3tI.mjs');
1070
1070
  let machineId;
1071
1071
  const shareArgs = [];
1072
1072
  for (let i = 1; i < machineArgs.length; i++) {
@@ -1117,14 +1117,14 @@ async function handleMachineCommand() {
1117
1117
  process.exit(1);
1118
1118
  }
1119
1119
  if (all) {
1120
- const { fleetExec } = await import('./fleet-XYsLuf-3.mjs');
1120
+ const { fleetExec } = await import('./fleet-BC9JHEWF.mjs');
1121
1121
  await fleetExec(command, { cwd });
1122
1122
  } else {
1123
- const { machineExec } = await import('./commands-CE1PdEJJ.mjs');
1123
+ const { machineExec } = await import('./commands-BtXxn3tI.mjs');
1124
1124
  await machineExec(machineId, command, cwd);
1125
1125
  }
1126
1126
  } else if (machineSubcommand === "info") {
1127
- const { machineInfo } = await import('./commands-CE1PdEJJ.mjs');
1127
+ const { machineInfo } = await import('./commands-BtXxn3tI.mjs');
1128
1128
  let machineId;
1129
1129
  for (let i = 1; i < machineArgs.length; i++) {
1130
1130
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1144,10 +1144,10 @@ async function handleMachineCommand() {
1144
1144
  level = machineArgs[++i];
1145
1145
  }
1146
1146
  }
1147
- const { machineNotify } = await import('./agentCommands-fCsOp7ko.mjs');
1147
+ const { machineNotify } = await import('./agentCommands-w72BRYhk.mjs');
1148
1148
  await machineNotify(message, level);
1149
1149
  } else if (machineSubcommand === "ls") {
1150
- const { machineLs } = await import('./commands-CE1PdEJJ.mjs');
1150
+ const { machineLs } = await import('./commands-BtXxn3tI.mjs');
1151
1151
  let machineId;
1152
1152
  let showHidden = false;
1153
1153
  let path;
@@ -1206,20 +1206,20 @@ Examples:
1206
1206
  };
1207
1207
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1208
1208
  if (sub === "status") {
1209
- const { fleetStatus } = await import('./fleet-XYsLuf-3.mjs');
1209
+ const { fleetStatus } = await import('./fleet-BC9JHEWF.mjs');
1210
1210
  await fleetStatus();
1211
1211
  } else if (sub === "upgrade-claude") {
1212
- const { fleetUpgradeClaude } = await import('./fleet-XYsLuf-3.mjs');
1212
+ const { fleetUpgradeClaude } = await import('./fleet-BC9JHEWF.mjs');
1213
1213
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1214
1214
  } else if (sub === "upgrade-svamp") {
1215
- const { fleetUpgradeSvamp } = await import('./fleet-XYsLuf-3.mjs');
1215
+ const { fleetUpgradeSvamp } = await import('./fleet-BC9JHEWF.mjs');
1216
1216
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self"), force: hasFlag("force") });
1217
1217
  } else if (sub === "daemon-restart") {
1218
- const { fleetDaemonRestart } = await import('./fleet-XYsLuf-3.mjs');
1218
+ const { fleetDaemonRestart } = await import('./fleet-BC9JHEWF.mjs');
1219
1219
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1220
1220
  } else if (sub === "push-skill") {
1221
1221
  const name = fleetArgs[1];
1222
- const { fleetPushSkill } = await import('./fleet-XYsLuf-3.mjs');
1222
+ const { fleetPushSkill } = await import('./fleet-BC9JHEWF.mjs');
1223
1223
  await fleetPushSkill(name);
1224
1224
  } else {
1225
1225
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1235,7 +1235,7 @@ async function handleSkillsCommand() {
1235
1235
  await printSkillsHelp();
1236
1236
  return;
1237
1237
  }
1238
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-BCmpKBjg.mjs');
1238
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-bQxTpr-M.mjs');
1239
1239
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1240
1240
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1241
1241
  if (!query) {
@@ -1282,7 +1282,7 @@ async function loginToHypha() {
1282
1282
  process.exit(1);
1283
1283
  }
1284
1284
  const anchor = anchorArg.replace(/\/+$/, "");
1285
- const { loadInstanceConfig } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.ar; });
1285
+ const { loadInstanceConfig } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.as; });
1286
1286
  let cfg = null;
1287
1287
  try {
1288
1288
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1393,7 +1393,7 @@ async function logoutFromHypha() {
1393
1393
  } catch {
1394
1394
  }
1395
1395
  try {
1396
- const { clearInstanceConfigCache } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.ar; });
1396
+ const { clearInstanceConfigCache } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.as; });
1397
1397
  clearInstanceConfigCache();
1398
1398
  } catch {
1399
1399
  }
@@ -1732,7 +1732,7 @@ async function applyClaudeAuthFlags(argv) {
1732
1732
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1733
1733
  );
1734
1734
  }
1735
- const mod = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.ak; });
1735
+ const mod = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.ak; });
1736
1736
  if (hasHypha) {
1737
1737
  let url;
1738
1738
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1786,7 +1786,7 @@ async function applyDaemonShareFlag(argv) {
1786
1786
  }
1787
1787
  }
1788
1788
  if (collected.length === 0) return;
1789
- const { updateEnvFile } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.ak; });
1789
+ const { updateEnvFile } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.ak; });
1790
1790
  const seen = /* @__PURE__ */ new Set();
1791
1791
  const deduped = collected.filter((e) => {
1792
1792
  const k = e.toLowerCase();
@@ -1819,7 +1819,7 @@ async function handleWiseAgentCommand(rest) {
1819
1819
  }
1820
1820
  });
1821
1821
  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(" ");
1822
- const { wiseAskCli } = await import('./commands-CE1PdEJJ.mjs');
1822
+ const { wiseAskCli } = await import('./commands-BtXxn3tI.mjs');
1823
1823
  await wiseAskCli(machineId, message, sessionId, { json });
1824
1824
  return;
1825
1825
  }
@@ -1831,7 +1831,7 @@ async function handleWiseAgentCommand(rest) {
1831
1831
  }
1832
1832
  return void 0;
1833
1833
  };
1834
- const { runWiseVoiceCli } = await import('./headlessCli-DuCmcrAL.mjs');
1834
+ const { runWiseVoiceCli } = await import('./headlessCli-fagwmUja.mjs');
1835
1835
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1836
1836
  return;
1837
1837
  }
@@ -1849,7 +1849,7 @@ async function handleWiseAgentCommand(rest) {
1849
1849
  const mode = valueOf(["--mode"]);
1850
1850
  const mission = valueOf(["--mission"]);
1851
1851
  const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
1852
- const { wiseJoinMeetingCli } = await import('./commands-CE1PdEJJ.mjs');
1852
+ const { wiseJoinMeetingCli } = await import('./commands-BtXxn3tI.mjs');
1853
1853
  await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
1854
1854
  return;
1855
1855
  }
@@ -1861,7 +1861,7 @@ async function handleWiseAgentCommand(rest) {
1861
1861
  }
1862
1862
  return void 0;
1863
1863
  };
1864
- const { wiseLeaveMeetingCli } = await import('./commands-CE1PdEJJ.mjs');
1864
+ const { wiseLeaveMeetingCli } = await import('./commands-BtXxn3tI.mjs');
1865
1865
  await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
1866
1866
  return;
1867
1867
  }
@@ -1885,7 +1885,7 @@ async function handleWiseAgentCommand(rest) {
1885
1885
  }
1886
1886
  });
1887
1887
  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(" ");
1888
- const { wiseAnnounceCli } = await import('./commands-CE1PdEJJ.mjs');
1888
+ const { wiseAnnounceCli } = await import('./commands-BtXxn3tI.mjs');
1889
1889
  await wiseAnnounceCli(machineId, text, sessionId, { json });
1890
1890
  return;
1891
1891
  }
@@ -1897,7 +1897,7 @@ async function handleWiseAgentCommand(rest) {
1897
1897
  }
1898
1898
  return void 0;
1899
1899
  };
1900
- const { wiseMeetingsCli } = await import('./commands-CE1PdEJJ.mjs');
1900
+ const { wiseMeetingsCli } = await import('./commands-BtXxn3tI.mjs');
1901
1901
  await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
1902
1902
  return;
1903
1903
  }
@@ -1947,7 +1947,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1947
1947
  return;
1948
1948
  }
1949
1949
  const authArgs = rest.slice(1);
1950
- const mod = await import('./auth-BH6Awl3O.mjs');
1950
+ const mod = await import('./auth-CLFNmaXL.mjs');
1951
1951
  let action;
1952
1952
  try {
1953
1953
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1957,7 +1957,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1957
1957
  return;
1958
1958
  }
1959
1959
  if (action) {
1960
- const { updateEnvFile } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.ak; });
1960
+ const { updateEnvFile } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.ak; });
1961
1961
  const updates = mod.buildWiseAgentEnvUpdates(action);
1962
1962
  updateEnvFile(updates);
1963
1963
  for (const [k, v] of Object.entries(updates)) {
@@ -1971,7 +1971,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1971
1971
  }
1972
1972
  async function handleDaemonAuthCommand(argv) {
1973
1973
  const sub = (argv[0] || "status").toLowerCase();
1974
- const mod = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.ak; });
1974
+ const mod = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.ak; });
1975
1975
  if (sub === "--help" || sub === "-h" || sub === "help") {
1976
1976
  console.log(`
1977
1977
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2043,6 +2043,93 @@ one step: --use-hypha-proxy / --use-claude-login / --anthropic-base-url URL --an
2043
2043
  console.error("Available: status, use-hypha-proxy, use-login, set <URL> <KEY>");
2044
2044
  process.exit(1);
2045
2045
  }
2046
+ async function handleDaemonCodexAuthCommand(argv) {
2047
+ const sub = (argv[0] || "status").toLowerCase();
2048
+ const { updateEnvFile } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.ak; });
2049
+ const { resolveCodexProvider } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.ap; });
2050
+ const redact = (k) => k && k.length > 10 ? `${k.slice(0, 6)}\u2026${k.slice(-4)}` : k ? "***" : "(unset)";
2051
+ if (sub === "--help" || sub === "-h" || sub === "help") {
2052
+ console.log(`
2053
+ svamp daemon codex-auth \u2014 Configure how Codex authenticates (parallels \`svamp daemon auth\`)
2054
+
2055
+ svamp daemon codex-auth Show current Codex auth (provider / native)
2056
+ svamp daemon codex-auth set <BASE_URL> <KEY> [MODEL]
2057
+ Use a custom OpenAI-compatible gateway (e.g. the
2058
+ Hypha proxy or a third-party endpoint). The gateway
2059
+ must speak the OpenAI Responses API. Persisted as
2060
+ SVAMP_CODEX_API_BASE / SVAMP_CODEX_API_KEY / SVAMP_CODEX_MODEL.
2061
+ svamp daemon codex-auth use-openai [KEY] \`codex login --with-api-key\` (arg or $OPENAI_API_KEY),
2062
+ and clear any custom gateway.
2063
+ svamp daemon codex-auth use-chatgpt \`codex login\` (ChatGPT OAuth \u2014 interactive), clear gateway.
2064
+ svamp daemon codex-auth clear Remove the custom gateway (fall back to ~/.codex/auth.json).
2065
+
2066
+ Persisted to ~/.svamp/.env. Run \`svamp daemon restart\` afterwards to apply.
2067
+ The generic LLM_API_BASE / LLM_API_KEY / LLM_MODEL env vars are also honored if already present.
2068
+ `);
2069
+ return;
2070
+ }
2071
+ if (sub === "status" || sub === "show") {
2072
+ const p = resolveCodexProvider(process.env);
2073
+ const { existsSync } = await import('node:fs');
2074
+ const nativeAuth = existsSync(`${process.env.HOME}/.codex/auth.json`);
2075
+ if (p.apiBase && p.apiKey) {
2076
+ console.log("Codex auth: custom OpenAI-compatible gateway");
2077
+ console.log(` base_url : ${p.apiBase}`);
2078
+ console.log(` api_key : ${redact(p.apiKey)}`);
2079
+ console.log(` model : ${p.model ?? "(codex default)"}`);
2080
+ } else {
2081
+ console.log(`Codex auth: native (${nativeAuth ? "~/.codex/auth.json present" : "NOT logged in \u2014 run codex-auth use-openai / use-chatgpt"})`);
2082
+ }
2083
+ return;
2084
+ }
2085
+ if (sub === "set") {
2086
+ const [baseUrl, apiKey, model] = [argv[1], argv[2], argv[3]];
2087
+ if (!baseUrl || !apiKey) {
2088
+ console.error("Usage: svamp daemon codex-auth set <base-url> <api-key> [model]");
2089
+ console.error(" e.g. svamp daemon codex-auth set https://tokenfans.ai/v1 sk-... gpt-5.5");
2090
+ process.exit(1);
2091
+ }
2092
+ updateEnvFile({ SVAMP_CODEX_API_BASE: baseUrl, SVAMP_CODEX_API_KEY: apiKey, SVAMP_CODEX_MODEL: model || "" });
2093
+ console.log(`Codex auth set to custom gateway (${baseUrl}${model ? `, model=${model}` : ""}). Run "svamp daemon restart" to apply.`);
2094
+ return;
2095
+ }
2096
+ if (sub === "use-openai") {
2097
+ const key = argv[1] || process.env.OPENAI_API_KEY;
2098
+ if (!key) {
2099
+ console.error("Usage: svamp daemon codex-auth use-openai <OPENAI_API_KEY> (or set $OPENAI_API_KEY)");
2100
+ process.exit(1);
2101
+ }
2102
+ const { spawnSync } = await import('node:child_process');
2103
+ const r = spawnSync("codex", ["login", "--with-api-key"], { input: key, encoding: "utf8", stdio: ["pipe", "inherit", "inherit"] });
2104
+ if (r.status !== 0) {
2105
+ console.error("codex login failed \u2014 is codex installed? (`npm i -g @openai/codex`)");
2106
+ process.exit(1);
2107
+ }
2108
+ updateEnvFile({ SVAMP_CODEX_API_BASE: "", SVAMP_CODEX_API_KEY: "", SVAMP_CODEX_MODEL: "" });
2109
+ console.log("Codex authenticated via OpenAI API key (~/.codex/auth.json); cleared any custom gateway.");
2110
+ return;
2111
+ }
2112
+ if (sub === "use-chatgpt" || sub === "use-login") {
2113
+ const { spawnSync } = await import('node:child_process');
2114
+ console.log("Launching `codex login` (ChatGPT OAuth \u2014 follow the browser prompt)\u2026");
2115
+ const r = spawnSync("codex", ["login"], { stdio: "inherit" });
2116
+ if (r.status !== 0) {
2117
+ console.error("codex login failed.");
2118
+ process.exit(1);
2119
+ }
2120
+ updateEnvFile({ SVAMP_CODEX_API_BASE: "", SVAMP_CODEX_API_KEY: "", SVAMP_CODEX_MODEL: "" });
2121
+ console.log("Codex authenticated via ChatGPT; cleared any custom gateway.");
2122
+ return;
2123
+ }
2124
+ if (sub === "clear") {
2125
+ updateEnvFile({ SVAMP_CODEX_API_BASE: "", SVAMP_CODEX_API_KEY: "", SVAMP_CODEX_MODEL: "" });
2126
+ console.log('Cleared the custom Codex gateway (falls back to ~/.codex/auth.json). Run "svamp daemon restart".');
2127
+ return;
2128
+ }
2129
+ console.error(`Unknown subcommand: svamp daemon codex-auth ${sub}`);
2130
+ console.error("Available: status, set <URL> <KEY> [MODEL], use-openai [KEY], use-chatgpt, clear");
2131
+ process.exit(1);
2132
+ }
2046
2133
  function printSessionHelp() {
2047
2134
  console.log(`
2048
2135
  svamp session \u2014 Spawn and manage AI agent sessions
@@ -2064,7 +2151,7 @@ QUICK START \u2014 Spawn a session, give it a task, get results:
2064
2151
  AGENTS:
2065
2152
  claude Claude Code \u2014 full coding agent (default)
2066
2153
  gemini Google Gemini via ACP protocol
2067
- codex OpenAI Codex via MCP protocol
2154
+ codex OpenAI Codex via app-server (streaming, resume, custom providers)
2068
2155
 
2069
2156
  Usage: svamp session spawn <agent> [options]
2070
2157
  The <agent> argument is required. Use "claude" if unsure.
@@ -2291,7 +2378,7 @@ Examples:
2291
2378
  async function printSkillsHelp() {
2292
2379
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2293
2380
  try {
2294
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-BtGnnEMI.mjs').then(function (n) { return n.as; });
2381
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-CT8Leg3-.mjs').then(function (n) { return n.at; });
2295
2382
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2296
2383
  } catch {
2297
2384
  }
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-CE1PdEJJ.mjs';
3
+ import { connectAndGetMachine } from './commands-BtXxn3tI.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-BtGnnEMI.mjs';
8
+ import './run-CT8Leg3-.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -15,10 +15,7 @@ import 'node:crypto';
15
15
  import 'util';
16
16
  import 'node:events';
17
17
  import '@agentclientprotocol/sdk';
18
- import '@modelcontextprotocol/sdk/client/index.js';
19
- import '@modelcontextprotocol/sdk/client/stdio.js';
20
- import '@modelcontextprotocol/sdk/types.js';
21
- import 'zod';
18
+ import 'node:readline';
22
19
  import 'node:fs/promises';
23
20
  import 'node:util';
24
21
  import 'yaml';