svamp-cli 0.2.114 → 0.2.115

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.
@@ -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 { n as shortId } from './run-aNUfTpRW.mjs';
5
+ import { n as shortId } from './run-DXzaCfex.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-aNUfTpRW.mjs').then(function (n) { return n.T; });
99
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-DXzaCfex.mjs').then(function (n) { return n.T; });
100
100
  const desc = sanitizeDescription(description, 240);
101
101
  if (!desc) {
102
102
  console.error("Project description is empty.");
@@ -180,7 +180,7 @@ async function sessionBroadcast(action, args) {
180
180
  console.log(`Broadcast sent: ${action}`);
181
181
  }
182
182
  async function connectToMachineService() {
183
- const { connectAndGetMachine } = await import('./commands-C29ciVUe.mjs');
183
+ const { connectAndGetMachine } = await import('./commands-B3NhziMR.mjs');
184
184
  return connectAndGetMachine();
185
185
  }
186
186
  async function inboxSend(targetSessionId, opts) {
@@ -197,7 +197,7 @@ async function inboxSend(targetSessionId, opts) {
197
197
  }
198
198
  const { server, machine } = await connectToMachineService();
199
199
  try {
200
- const { resolveSessionId } = await import('./commands-C29ciVUe.mjs');
200
+ const { resolveSessionId } = await import('./commands-B3NhziMR.mjs');
201
201
  const sessions = await machine.listSessions();
202
202
  const match = resolveSessionId(sessions, targetSessionId);
203
203
  const fullTargetId = match.sessionId;
@@ -1,4 +1,4 @@
1
- import { F as resolveModel } from './run-aNUfTpRW.mjs';
1
+ import { F as resolveModel } from './run-DXzaCfex.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
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-aNUfTpRW.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-DXzaCfex.mjs';
2
2
  import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
3
3
  import 'os';
4
4
  import 'fs/promises';
@@ -34,7 +34,7 @@ const subcommand = args[0];
34
34
  let daemonSubcommand = args[1];
35
35
  async function main() {
36
36
  try {
37
- const { getLoadedConfig } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n._; });
37
+ const { getLoadedConfig } = await import('./run-DXzaCfex.mjs').then(function (n) { return n._; });
38
38
  getLoadedConfig();
39
39
  } catch {
40
40
  }
@@ -51,7 +51,7 @@ async function main() {
51
51
  console.error(`svamp daemon restart: ${err.message || err}`);
52
52
  process.exit(1);
53
53
  }
54
- const { restartDaemon } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.a0; });
54
+ const { restartDaemon } = await import('./run-DXzaCfex.mjs').then(function (n) { return n.a0; });
55
55
  await restartDaemon();
56
56
  process.exit(0);
57
57
  }
@@ -344,7 +344,7 @@ async function main() {
344
344
  console.error("svamp service: Service commands are not available in sandboxed sessions.");
345
345
  process.exit(1);
346
346
  }
347
- const { handleServiceCommand } = await import('./commands-BYBzqLJZ.mjs');
347
+ const { handleServiceCommand } = await import('./commands-Vudp6ihZ.mjs');
348
348
  await handleServiceCommand();
349
349
  } else if (subcommand === "serve") {
350
350
  const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
@@ -352,7 +352,7 @@ async function main() {
352
352
  console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
353
353
  process.exit(1);
354
354
  }
355
- const { handleServeCommand } = await import('./serveCommands-BoFSdzkv.mjs');
355
+ const { handleServeCommand } = await import('./serveCommands-CFO3GtKq.mjs');
356
356
  await handleServeCommand();
357
357
  process.exit(0);
358
358
  } else if (subcommand === "process" || subcommand === "proc") {
@@ -361,7 +361,7 @@ async function main() {
361
361
  console.error("svamp process: Process commands are not available in sandboxed sessions.");
362
362
  process.exit(1);
363
363
  }
364
- const { processCommand } = await import('./commands-BBQI_6EM.mjs');
364
+ const { processCommand } = await import('./commands-Dmh59asw.mjs');
365
365
  let machineId;
366
366
  const processArgs = args.slice(1);
367
367
  const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
@@ -375,7 +375,7 @@ async function main() {
375
375
  }), machineId);
376
376
  process.exit(0);
377
377
  } else if (subcommand === "routine" || subcommand === "routines") {
378
- const { routineCommand } = await import('./commands-1DLUHWZ5.mjs');
378
+ const { routineCommand } = await import('./commands-DbQ14J-R.mjs');
379
379
  await routineCommand(args.slice(1));
380
380
  process.exit(0);
381
381
  } else if (subcommand === "wise-agent" || subcommand === "wise") {
@@ -386,7 +386,7 @@ async function main() {
386
386
  } else if (!subcommand || subcommand === "start") {
387
387
  await handleInteractiveCommand();
388
388
  } else if (subcommand === "--version" || subcommand === "-v") {
389
- const pkg = await import('./package-PUmSILNZ.mjs').catch(() => ({ default: { version: "unknown" } }));
389
+ const pkg = await import('./package-BuIQUz-N.mjs').catch(() => ({ default: { version: "unknown" } }));
390
390
  console.log(`svamp version: ${pkg.default.version}`);
391
391
  } else {
392
392
  console.error(`Unknown command: ${subcommand}`);
@@ -395,7 +395,7 @@ async function main() {
395
395
  }
396
396
  }
397
397
  async function handleInteractiveCommand() {
398
- const { runInteractive } = await import('./run-CiiUhPNf.mjs');
398
+ const { runInteractive } = await import('./run-BnPtZvoP.mjs');
399
399
  const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
400
400
  let directory = process.cwd();
401
401
  let resumeSessionId;
@@ -440,7 +440,7 @@ async function handleAgentCommand() {
440
440
  return;
441
441
  }
442
442
  if (agentArgs[0] === "list") {
443
- const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.W; });
443
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-DXzaCfex.mjs').then(function (n) { return n.W; });
444
444
  console.log("Known agents:");
445
445
  for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
446
446
  console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
@@ -452,7 +452,7 @@ async function handleAgentCommand() {
452
452
  console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
453
453
  return;
454
454
  }
455
- const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.W; });
455
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-DXzaCfex.mjs').then(function (n) { return n.W; });
456
456
  let cwd = process.cwd();
457
457
  const filteredArgs = [];
458
458
  for (let i = 0; i < agentArgs.length; i++) {
@@ -476,12 +476,12 @@ async function handleAgentCommand() {
476
476
  console.log(`Starting ${config.agentName} agent in ${cwd}...`);
477
477
  let backend;
478
478
  if (KNOWN_MCP_AGENTS[config.agentName]) {
479
- const { CodexMcpBackend } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.X; });
479
+ const { CodexMcpBackend } = await import('./run-DXzaCfex.mjs').then(function (n) { return n.X; });
480
480
  backend = new CodexMcpBackend({ cwd, log: logFn });
481
481
  } else {
482
- const { AcpBackend } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.V; });
483
- const { GeminiTransport } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.Y; });
484
- const { DefaultTransport } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.U; });
482
+ const { AcpBackend } = await import('./run-DXzaCfex.mjs').then(function (n) { return n.V; });
483
+ const { GeminiTransport } = await import('./run-DXzaCfex.mjs').then(function (n) { return n.Y; });
484
+ const { DefaultTransport } = await import('./run-DXzaCfex.mjs').then(function (n) { return n.U; });
485
485
  const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
486
486
  backend = new AcpBackend({
487
487
  agentName: config.agentName,
@@ -608,7 +608,7 @@ async function handleSessionCommand() {
608
608
  process.exit(1);
609
609
  }
610
610
  }
611
- const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-C29ciVUe.mjs');
611
+ const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-B3NhziMR.mjs');
612
612
  const parseFlagStr = (flag, shortFlag) => {
613
613
  for (let i = 1; i < sessionArgs.length; i++) {
614
614
  if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
@@ -676,7 +676,7 @@ async function handleSessionCommand() {
676
676
  allowDomain.push(sessionArgs[++i]);
677
677
  }
678
678
  }
679
- const { parseShareArg } = await import('./commands-C29ciVUe.mjs');
679
+ const { parseShareArg } = await import('./commands-B3NhziMR.mjs');
680
680
  const shareEntries = share.map((s) => parseShareArg(s));
681
681
  await sessionSpawn(agent, dir, targetMachineId, {
682
682
  message,
@@ -755,6 +755,30 @@ async function handleSessionCommand() {
755
755
  model: parseFlagStr("--model"),
756
756
  plain: hasFlag("--plain")
757
757
  });
758
+ } else if (sessionSubcommand === "edit-message" || sessionSubcommand === "edit") {
759
+ if (!sessionArgs[1] || !sessionArgs[2] || sessionArgs[3] === void 0) {
760
+ console.error("Usage: svamp session edit-message <session-id> <message-id> <new-text>");
761
+ console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
762
+ process.exit(1);
763
+ }
764
+ const { sessionEditMessage } = await import('./commands-B3NhziMR.mjs');
765
+ await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
766
+ } else if (sessionSubcommand === "refine") {
767
+ if (!sessionArgs[1] || !sessionArgs[2]) {
768
+ console.error("Usage: svamp session refine <session-id> <instruction>");
769
+ console.error(" Asks the agent to revise its latest reply in place (no extra round).");
770
+ process.exit(1);
771
+ }
772
+ const { sessionRefineLastReply } = await import('./commands-B3NhziMR.mjs');
773
+ await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
774
+ } else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
775
+ if (!sessionArgs[1]) {
776
+ console.error("Usage: svamp session undo-edit <session-id>");
777
+ console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
778
+ process.exit(1);
779
+ }
780
+ const { sessionUndoEdit } = await import('./commands-B3NhziMR.mjs');
781
+ await sessionUndoEdit(sessionArgs[1], targetMachineId);
758
782
  } else if (sessionSubcommand === "query") {
759
783
  const dir = sessionArgs[1];
760
784
  const prompt = sessionArgs[2];
@@ -763,7 +787,7 @@ async function handleSessionCommand() {
763
787
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
764
788
  process.exit(1);
765
789
  }
766
- const { sessionQuery } = await import('./commands-C29ciVUe.mjs');
790
+ const { sessionQuery } = await import('./commands-B3NhziMR.mjs');
767
791
  await sessionQuery(dir, prompt, targetMachineId, {
768
792
  timeout: parseFlagInt("--timeout"),
769
793
  json: hasFlag("--json"),
@@ -796,7 +820,7 @@ async function handleSessionCommand() {
796
820
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
797
821
  process.exit(1);
798
822
  }
799
- const { sessionApprove } = await import('./commands-C29ciVUe.mjs');
823
+ const { sessionApprove } = await import('./commands-B3NhziMR.mjs');
800
824
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
801
825
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
802
826
  json: hasFlag("--json")
@@ -806,7 +830,7 @@ async function handleSessionCommand() {
806
830
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
807
831
  process.exit(1);
808
832
  }
809
- const { sessionDeny } = await import('./commands-C29ciVUe.mjs');
833
+ const { sessionDeny } = await import('./commands-B3NhziMR.mjs');
810
834
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
811
835
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
812
836
  json: hasFlag("--json")
@@ -841,7 +865,7 @@ async function handleSessionCommand() {
841
865
  console.error("Usage: svamp session set-title <title>");
842
866
  process.exit(1);
843
867
  }
844
- const { sessionSetTitle } = await import('./agentCommands-D53qtjbo.mjs');
868
+ const { sessionSetTitle } = await import('./agentCommands-CFWM6S7e.mjs');
845
869
  await sessionSetTitle(title);
846
870
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
847
871
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -849,7 +873,7 @@ async function handleSessionCommand() {
849
873
  console.error("Usage: svamp session set-project-description <text>");
850
874
  process.exit(1);
851
875
  }
852
- const { sessionSetProjectDescription } = await import('./agentCommands-D53qtjbo.mjs');
876
+ const { sessionSetProjectDescription } = await import('./agentCommands-CFWM6S7e.mjs');
853
877
  await sessionSetProjectDescription(desc);
854
878
  } else if (sessionSubcommand === "set-link") {
855
879
  const url = sessionArgs[1];
@@ -858,7 +882,7 @@ async function handleSessionCommand() {
858
882
  process.exit(1);
859
883
  }
860
884
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
861
- const { sessionSetLink } = await import('./agentCommands-D53qtjbo.mjs');
885
+ const { sessionSetLink } = await import('./agentCommands-CFWM6S7e.mjs');
862
886
  await sessionSetLink(url, label);
863
887
  } else if (sessionSubcommand === "notify") {
864
888
  const message = sessionArgs[1];
@@ -867,7 +891,7 @@ async function handleSessionCommand() {
867
891
  process.exit(1);
868
892
  }
869
893
  const level = parseFlagStr("--level") || "info";
870
- const { sessionNotify } = await import('./agentCommands-D53qtjbo.mjs');
894
+ const { sessionNotify } = await import('./agentCommands-CFWM6S7e.mjs');
871
895
  await sessionNotify(message, level);
872
896
  } else if (sessionSubcommand === "broadcast") {
873
897
  const action = sessionArgs[1];
@@ -875,7 +899,7 @@ async function handleSessionCommand() {
875
899
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
876
900
  process.exit(1);
877
901
  }
878
- const { sessionBroadcast } = await import('./agentCommands-D53qtjbo.mjs');
902
+ const { sessionBroadcast } = await import('./agentCommands-CFWM6S7e.mjs');
879
903
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
880
904
  } else if (sessionSubcommand === "inbox") {
881
905
  const inboxSubcmd = sessionArgs[1];
@@ -886,7 +910,7 @@ async function handleSessionCommand() {
886
910
  process.exit(1);
887
911
  }
888
912
  if (agentSessionId) {
889
- const { inboxSend } = await import('./agentCommands-D53qtjbo.mjs');
913
+ const { inboxSend } = await import('./agentCommands-CFWM6S7e.mjs');
890
914
  await inboxSend(sessionArgs[2], {
891
915
  body: sessionArgs[3],
892
916
  subject: parseFlagStr("--subject"),
@@ -901,7 +925,7 @@ async function handleSessionCommand() {
901
925
  }
902
926
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
903
927
  if (agentSessionId && !sessionArgs[2]) {
904
- const { inboxList } = await import('./agentCommands-D53qtjbo.mjs');
928
+ const { inboxList } = await import('./agentCommands-CFWM6S7e.mjs');
905
929
  await inboxList({
906
930
  unread: hasFlag("--unread"),
907
931
  limit: parseFlagInt("--limit"),
@@ -923,7 +947,7 @@ async function handleSessionCommand() {
923
947
  process.exit(1);
924
948
  }
925
949
  if (agentSessionId && !sessionArgs[3]) {
926
- const { inboxList } = await import('./agentCommands-D53qtjbo.mjs');
950
+ const { inboxList } = await import('./agentCommands-CFWM6S7e.mjs');
927
951
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
928
952
  } else if (sessionArgs[3]) {
929
953
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -933,7 +957,7 @@ async function handleSessionCommand() {
933
957
  }
934
958
  } else if (inboxSubcmd === "reply") {
935
959
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
936
- const { inboxReply } = await import('./agentCommands-D53qtjbo.mjs');
960
+ const { inboxReply } = await import('./agentCommands-CFWM6S7e.mjs');
937
961
  await inboxReply(sessionArgs[2], sessionArgs[3]);
938
962
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
939
963
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -969,7 +993,7 @@ async function handleMachineCommand() {
969
993
  return;
970
994
  }
971
995
  if (machineSubcommand === "share") {
972
- const { machineShare } = await import('./commands-C29ciVUe.mjs');
996
+ const { machineShare } = await import('./commands-B3NhziMR.mjs');
973
997
  let machineId;
974
998
  const shareArgs = [];
975
999
  for (let i = 1; i < machineArgs.length; i++) {
@@ -999,7 +1023,7 @@ async function handleMachineCommand() {
999
1023
  }
1000
1024
  await machineShare(machineId, { add, remove, list, configPath, showConfig });
1001
1025
  } else if (machineSubcommand === "exec") {
1002
- const { machineExec } = await import('./commands-C29ciVUe.mjs');
1026
+ const { machineExec } = await import('./commands-B3NhziMR.mjs');
1003
1027
  let machineId;
1004
1028
  let cwd;
1005
1029
  const cmdParts = [];
@@ -1019,7 +1043,7 @@ async function handleMachineCommand() {
1019
1043
  }
1020
1044
  await machineExec(machineId, command, cwd);
1021
1045
  } else if (machineSubcommand === "info") {
1022
- const { machineInfo } = await import('./commands-C29ciVUe.mjs');
1046
+ const { machineInfo } = await import('./commands-B3NhziMR.mjs');
1023
1047
  let machineId;
1024
1048
  for (let i = 1; i < machineArgs.length; i++) {
1025
1049
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1039,10 +1063,10 @@ async function handleMachineCommand() {
1039
1063
  level = machineArgs[++i];
1040
1064
  }
1041
1065
  }
1042
- const { machineNotify } = await import('./agentCommands-D53qtjbo.mjs');
1066
+ const { machineNotify } = await import('./agentCommands-CFWM6S7e.mjs');
1043
1067
  await machineNotify(message, level);
1044
1068
  } else if (machineSubcommand === "ls") {
1045
- const { machineLs } = await import('./commands-C29ciVUe.mjs');
1069
+ const { machineLs } = await import('./commands-B3NhziMR.mjs');
1046
1070
  let machineId;
1047
1071
  let showHidden = false;
1048
1072
  let path;
@@ -1100,24 +1124,24 @@ Examples:
1100
1124
  };
1101
1125
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1102
1126
  if (sub === "status") {
1103
- const { fleetStatus } = await import('./fleet--CAdje9C.mjs');
1127
+ const { fleetStatus } = await import('./fleet-F8KB5IcM.mjs');
1104
1128
  await fleetStatus();
1105
1129
  } else if (sub === "exec") {
1106
1130
  const command = fleetArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1107
- const { fleetExec } = await import('./fleet--CAdje9C.mjs');
1131
+ const { fleetExec } = await import('./fleet-F8KB5IcM.mjs');
1108
1132
  await fleetExec(command, { cwd: flag("cwd") });
1109
1133
  } else if (sub === "upgrade-claude") {
1110
- const { fleetUpgradeClaude } = await import('./fleet--CAdje9C.mjs');
1134
+ const { fleetUpgradeClaude } = await import('./fleet-F8KB5IcM.mjs');
1111
1135
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1112
1136
  } else if (sub === "upgrade-svamp") {
1113
- const { fleetUpgradeSvamp } = await import('./fleet--CAdje9C.mjs');
1137
+ const { fleetUpgradeSvamp } = await import('./fleet-F8KB5IcM.mjs');
1114
1138
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
1115
1139
  } else if (sub === "daemon-restart") {
1116
- const { fleetDaemonRestart } = await import('./fleet--CAdje9C.mjs');
1140
+ const { fleetDaemonRestart } = await import('./fleet-F8KB5IcM.mjs');
1117
1141
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1118
1142
  } else if (sub === "push-skill") {
1119
1143
  const name = fleetArgs[1];
1120
- const { fleetPushSkill } = await import('./fleet--CAdje9C.mjs');
1144
+ const { fleetPushSkill } = await import('./fleet-F8KB5IcM.mjs');
1121
1145
  await fleetPushSkill(name);
1122
1146
  } else {
1123
1147
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1133,7 +1157,7 @@ async function handleSkillsCommand() {
1133
1157
  await printSkillsHelp();
1134
1158
  return;
1135
1159
  }
1136
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-BcIz9gl2.mjs');
1160
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-Dj2M3sTB.mjs');
1137
1161
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1138
1162
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1139
1163
  if (!query) {
@@ -1180,7 +1204,7 @@ async function loginToHypha() {
1180
1204
  process.exit(1);
1181
1205
  }
1182
1206
  const anchor = anchorArg.replace(/\/+$/, "");
1183
- const { loadInstanceConfig } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n._; });
1207
+ const { loadInstanceConfig } = await import('./run-DXzaCfex.mjs').then(function (n) { return n._; });
1184
1208
  let cfg = null;
1185
1209
  try {
1186
1210
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1291,7 +1315,7 @@ async function logoutFromHypha() {
1291
1315
  } catch {
1292
1316
  }
1293
1317
  try {
1294
- const { clearInstanceConfigCache } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n._; });
1318
+ const { clearInstanceConfigCache } = await import('./run-DXzaCfex.mjs').then(function (n) { return n._; });
1295
1319
  clearInstanceConfigCache();
1296
1320
  } catch {
1297
1321
  }
@@ -1622,7 +1646,7 @@ async function applyClaudeAuthFlags(argv) {
1622
1646
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1623
1647
  );
1624
1648
  }
1625
- const mod = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.Z; });
1649
+ const mod = await import('./run-DXzaCfex.mjs').then(function (n) { return n.Z; });
1626
1650
  if (hasHypha) {
1627
1651
  let url;
1628
1652
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1676,7 +1700,7 @@ async function applyDaemonShareFlag(argv) {
1676
1700
  }
1677
1701
  }
1678
1702
  if (collected.length === 0) return;
1679
- const { updateEnvFile } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.Z; });
1703
+ const { updateEnvFile } = await import('./run-DXzaCfex.mjs').then(function (n) { return n.Z; });
1680
1704
  const seen = /* @__PURE__ */ new Set();
1681
1705
  const deduped = collected.filter((e) => {
1682
1706
  const k = e.toLowerCase();
@@ -1709,7 +1733,7 @@ async function handleWiseAgentCommand(rest) {
1709
1733
  }
1710
1734
  });
1711
1735
  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(" ");
1712
- const { wiseAskCli } = await import('./commands-C29ciVUe.mjs');
1736
+ const { wiseAskCli } = await import('./commands-B3NhziMR.mjs');
1713
1737
  await wiseAskCli(machineId, message, sessionId, { json });
1714
1738
  return;
1715
1739
  }
@@ -1721,7 +1745,7 @@ async function handleWiseAgentCommand(rest) {
1721
1745
  }
1722
1746
  return void 0;
1723
1747
  };
1724
- const { runWiseVoiceCli } = await import('./headlessCli-C6MzdWRW.mjs');
1748
+ const { runWiseVoiceCli } = await import('./headlessCli-6Cps9gnO.mjs');
1725
1749
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1726
1750
  return;
1727
1751
  }
@@ -1763,7 +1787,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1763
1787
  return;
1764
1788
  }
1765
1789
  const authArgs = rest.slice(1);
1766
- const mod = await import('./auth-Ykv_kVPM.mjs');
1790
+ const mod = await import('./auth-B3NsDWG9.mjs');
1767
1791
  let action;
1768
1792
  try {
1769
1793
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1773,7 +1797,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1773
1797
  return;
1774
1798
  }
1775
1799
  if (action) {
1776
- const { updateEnvFile } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.Z; });
1800
+ const { updateEnvFile } = await import('./run-DXzaCfex.mjs').then(function (n) { return n.Z; });
1777
1801
  const updates = mod.buildWiseAgentEnvUpdates(action);
1778
1802
  updateEnvFile(updates);
1779
1803
  for (const [k, v] of Object.entries(updates)) {
@@ -1787,7 +1811,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1787
1811
  }
1788
1812
  async function handleDaemonAuthCommand(argv) {
1789
1813
  const sub = (argv[0] || "status").toLowerCase();
1790
- const mod = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.Z; });
1814
+ const mod = await import('./run-DXzaCfex.mjs').then(function (n) { return n.Z; });
1791
1815
  if (sub === "--help" || sub === "-h" || sub === "help") {
1792
1816
  console.log(`
1793
1817
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2090,7 +2114,7 @@ Examples:
2090
2114
  async function printSkillsHelp() {
2091
2115
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2092
2116
  try {
2093
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-aNUfTpRW.mjs').then(function (n) { return n.$; });
2117
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-DXzaCfex.mjs').then(function (n) { return n.$; });
2094
2118
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2095
2119
  } catch {
2096
2120
  }
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
2
2
  import { execSync } from 'node:child_process';
3
3
  import { basename, resolve, join } from 'node:path';
4
4
  import os from 'node:os';
5
- import { G as normalizeAllowedUser, H as loadSecurityContextConfig, I as resolveSecurityContext, J as buildSecurityContextFromFlags, K as mergeSecurityContexts, c as connectToHypha, L as buildSessionShareUrl, M as computeOutboundHop, n as shortId, N as buildMachineShareUrl } from './run-aNUfTpRW.mjs';
5
+ import { G as normalizeAllowedUser, H as loadSecurityContextConfig, I as resolveSecurityContext, J as buildSecurityContextFromFlags, K as mergeSecurityContexts, c as connectToHypha, L as buildSessionShareUrl, M as computeOutboundHop, n as shortId, N as buildMachineShareUrl } from './run-DXzaCfex.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -89,6 +89,9 @@ const SESSION_RPC_PARAMS = {
89
89
  getLatestMessages: ["beforeSeq", "limit"],
90
90
  sendMessage: ["content", "localId", "meta"],
91
91
  btw: ["question"],
92
+ editMessage: ["messageId", "newText"],
93
+ refineLastReply: ["instruction"],
94
+ undoLastEdit: [],
92
95
  getMetadata: [],
93
96
  updateMetadata: ["newMetadata", "expectedVersion"],
94
97
  updateConfig: ["patch"],
@@ -1294,6 +1297,48 @@ async function sessionMessages(sessionId, machineId, opts) {
1294
1297
  await server.disconnect();
1295
1298
  }
1296
1299
  }
1300
+ async function sessionEditMessage(sessionId, messageId, newText, machineId) {
1301
+ const { server, machine, fullId } = await connectAndResolveSession(sessionId, machineId);
1302
+ try {
1303
+ const res = await machine.sessionRPC(fullId, "editMessage", { messageId, newText });
1304
+ if (res?.success) {
1305
+ console.log("\u2713 Message edited; Claude restarted with the rewritten history.");
1306
+ } else {
1307
+ console.error(`\u2717 Edit failed: ${res?.message || "unknown error"}`);
1308
+ process.exitCode = 1;
1309
+ }
1310
+ } finally {
1311
+ await server.disconnect();
1312
+ }
1313
+ }
1314
+ async function sessionRefineLastReply(sessionId, instruction, machineId) {
1315
+ const { server, machine, fullId } = await connectAndResolveSession(sessionId, machineId);
1316
+ try {
1317
+ const res = await machine.sessionRPC(fullId, "refineLastReply", { instruction });
1318
+ if (res?.success) {
1319
+ console.log("\u2713 Latest reply refined; Claude restarted with the rewritten history.");
1320
+ } else {
1321
+ console.error(`\u2717 Refine failed: ${res?.message || "unknown error"}`);
1322
+ process.exitCode = 1;
1323
+ }
1324
+ } finally {
1325
+ await server.disconnect();
1326
+ }
1327
+ }
1328
+ async function sessionUndoEdit(sessionId, machineId) {
1329
+ const { server, machine, fullId } = await connectAndResolveSession(sessionId, machineId);
1330
+ try {
1331
+ const res = await machine.sessionRPC(fullId, "undoLastEdit", {});
1332
+ if (res?.success) {
1333
+ console.log("\u2713 Last edit reverted; Claude restarted with the pre-edit history.");
1334
+ } else {
1335
+ console.error(`\u2717 Undo failed: ${res?.message || "unknown error"}`);
1336
+ process.exitCode = 1;
1337
+ }
1338
+ } finally {
1339
+ await server.disconnect();
1340
+ }
1341
+ }
1297
1342
  async function sessionApprove(sessionId, requestId, machineId, opts) {
1298
1343
  const { server, machine, fullId } = await connectAndResolveSession(sessionId, machineId);
1299
1344
  try {
@@ -2500,4 +2545,4 @@ async function sessionInboxClear(sessionIdPartial, machineId, opts) {
2500
2545
  }
2501
2546
  }
2502
2547
 
2503
- export { collectAssistantResponse, connectAndGetMachine, connectAndResolveSession, createWorktree, generateWorktreeName, machineExec, machineInfo, machineLs, machineShare, parseShareArg, queryCore, renderMessage, resolveSessionId, sendCore, sessionApprove, sessionArchive, sessionAttach, sessionDelete, sessionDeny, sessionInboxClear, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxSend, sessionInfo, sessionList, sessionLoopCancel, sessionLoopStart, sessionLoopStatus, sessionMachines, sessionMessages, sessionQuery, sessionResume, sessionSend, sessionShare, sessionSpawn, sessionWait, sessionWhoami, snapshotLatestSeq, validateSendOptions, wiseAskCli };
2548
+ export { collectAssistantResponse, connectAndGetMachine, connectAndResolveSession, createWorktree, generateWorktreeName, machineExec, machineInfo, machineLs, machineShare, parseShareArg, queryCore, renderMessage, resolveSessionId, sendCore, sessionApprove, sessionArchive, sessionAttach, sessionDelete, sessionDeny, sessionEditMessage, sessionInboxClear, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxSend, sessionInfo, sessionList, sessionLoopCancel, sessionLoopStart, sessionLoopStatus, sessionMachines, sessionMessages, sessionQuery, sessionRefineLastReply, sessionResume, sessionSend, sessionShare, sessionSpawn, sessionUndoEdit, sessionWait, sessionWhoami, snapshotLatestSeq, validateSendOptions, wiseAskCli };
@@ -1,6 +1,6 @@
1
1
  import { execFileSync } from 'node:child_process';
2
2
  import { createServer } from 'node:http';
3
- import { R as RoutineStore, m as RoutineRunner } from './run-aNUfTpRW.mjs';
3
+ import { R as RoutineStore, m as RoutineRunner } from './run-DXzaCfex.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 { p as parseFrontmatter, o as getSkillsServer, q as getSkillsWorkspaceName, t as getSkillsCollectionName, u as fetchWithTimeout, v as searchSkills, w as SKILLS_DIR, x as getSkillInfo, y as downloadSkillFile, z as listSkillFiles } from './run-aNUfTpRW.mjs';
4
+ import { p as parseFrontmatter, o as getSkillsServer, q as getSkillsWorkspaceName, t as getSkillsCollectionName, u as fetchWithTimeout, v as searchSkills, w as SKILLS_DIR, x as getSkillInfo, y as downloadSkillFile, z as listSkillFiles } from './run-DXzaCfex.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-C29ciVUe.mjs';
3
+ import { connectAndGetMachine } from './commands-B3NhziMR.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-aNUfTpRW.mjs';
8
+ import './run-DXzaCfex.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -58,7 +58,7 @@ async function serviceExpose(args) {
58
58
  process.exit(1);
59
59
  }
60
60
  if (foreground) {
61
- const { runFrpcTunnel } = await import('./frpc-BjWZ129L.mjs');
61
+ const { runFrpcTunnel } = await import('./frpc-1aSnPVrE.mjs');
62
62
  await runFrpcTunnel(name, ports, void 0, {
63
63
  group,
64
64
  groupKey,
@@ -68,7 +68,7 @@ async function serviceExpose(args) {
68
68
  });
69
69
  return;
70
70
  }
71
- const { connectAndGetMachine } = await import('./commands-C29ciVUe.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-B3NhziMR.mjs');
72
72
  const { server, machine } = await connectAndGetMachine();
73
73
  try {
74
74
  const status = await machine.tunnelStart({
@@ -123,7 +123,7 @@ async function serviceServe(args) {
123
123
  };
124
124
  process.on("SIGINT", cleanup);
125
125
  process.on("SIGTERM", cleanup);
126
- const { runFrpcTunnel } = await import('./frpc-BjWZ129L.mjs');
126
+ const { runFrpcTunnel } = await import('./frpc-1aSnPVrE.mjs');
127
127
  await runFrpcTunnel(name, [caddyPort]);
128
128
  } catch (err) {
129
129
  console.error(`Error serving directory: ${err.message}`);
@@ -132,7 +132,7 @@ async function serviceServe(args) {
132
132
  }
133
133
  async function serviceList(_args) {
134
134
  try {
135
- const { connectAndGetMachine } = await import('./commands-C29ciVUe.mjs');
135
+ const { connectAndGetMachine } = await import('./commands-B3NhziMR.mjs');
136
136
  const { server, machine } = await connectAndGetMachine();
137
137
  try {
138
138
  const tunnels = await machine.tunnelList({});
@@ -161,7 +161,7 @@ async function serviceDelete(args) {
161
161
  process.exit(1);
162
162
  }
163
163
  try {
164
- const { connectAndGetMachine } = await import('./commands-C29ciVUe.mjs');
164
+ const { connectAndGetMachine } = await import('./commands-B3NhziMR.mjs');
165
165
  const { server, machine } = await connectAndGetMachine();
166
166
  try {
167
167
  await machine.tunnelStop({ name });
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import os from 'node:os';
4
- import { c as connectToHypha } from './run-aNUfTpRW.mjs';
4
+ import { c as connectToHypha } from './run-DXzaCfex.mjs';
5
5
  import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-HydRNEt7.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
@@ -3,7 +3,7 @@ import { mkdirSync, writeFileSync, unlinkSync, existsSync, chmodSync, readFileSy
3
3
  import { join } from 'path';
4
4
  import { homedir, platform, arch } from 'os';
5
5
  import { createHash, randomUUID } from 'crypto';
6
- import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-aNUfTpRW.mjs';
6
+ import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-DXzaCfex.mjs';
7
7
  import 'fs/promises';
8
8
  import 'url';
9
9
  import 'node:crypto';