svamp-cli 0.2.79 → 0.2.80
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.
- package/dist/{agentCommands-CDr8wjR0.mjs → agentCommands-CcNJ1dcR.mjs} +2 -2
- package/dist/cli.mjs +40 -40
- package/dist/{commands-BxyD6EGp.mjs → commands-BKJNCTjq.mjs} +2 -2
- package/dist/{commands-fDM-vliz.mjs → commands-C6lrExeN.mjs} +1 -1
- package/dist/{commands-DBzx8p4a.mjs → commands-iCbgYseB.mjs} +3 -3
- package/dist/{fleet-CQNb2lQG.mjs → fleet-BdWjugcV.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{package-D7b87vtl.mjs → package-C4KoS6-F.mjs} +1 -1
- package/dist/{run-B4Fm5EI5.mjs → run-DamsNf6r.mjs} +1 -1
- package/dist/{run-B8H-qZH6.mjs → run-W8JZkXIf.mjs} +30 -12
- package/dist/{serveCommands-Bm6-KRVS.mjs → serveCommands-DEik3hcu.mjs} +5 -5
- package/dist/{serveManager-D58o1Gom.mjs → serveManager-DTR_TDIp.mjs} +1 -1
- package/package.json +1 -1
|
@@ -148,7 +148,7 @@ async function sessionBroadcast(action, args) {
|
|
|
148
148
|
console.log(`Broadcast sent: ${action}`);
|
|
149
149
|
}
|
|
150
150
|
async function connectToMachineService() {
|
|
151
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
151
|
+
const { connectAndGetMachine } = await import('./commands-C6lrExeN.mjs');
|
|
152
152
|
return connectAndGetMachine();
|
|
153
153
|
}
|
|
154
154
|
async function inboxSend(targetSessionId, opts) {
|
|
@@ -165,7 +165,7 @@ async function inboxSend(targetSessionId, opts) {
|
|
|
165
165
|
}
|
|
166
166
|
const { server, machine } = await connectToMachineService();
|
|
167
167
|
try {
|
|
168
|
-
const { resolveSessionId } = await import('./commands-
|
|
168
|
+
const { resolveSessionId } = await import('./commands-C6lrExeN.mjs');
|
|
169
169
|
const sessions = await machine.listSessions();
|
|
170
170
|
const match = resolveSessionId(sessions, targetSessionId);
|
|
171
171
|
const fullTargetId = match.sessionId;
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-
|
|
1
|
+
import { s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-W8JZkXIf.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -44,7 +44,7 @@ async function main() {
|
|
|
44
44
|
console.error(`svamp daemon restart: ${err.message || err}`);
|
|
45
45
|
process.exit(1);
|
|
46
46
|
}
|
|
47
|
-
const { restartDaemon } = await import('./run-
|
|
47
|
+
const { restartDaemon } = await import('./run-W8JZkXIf.mjs').then(function (n) { return n.u; });
|
|
48
48
|
await restartDaemon();
|
|
49
49
|
process.exit(0);
|
|
50
50
|
}
|
|
@@ -287,7 +287,7 @@ async function main() {
|
|
|
287
287
|
console.error("svamp service: Service commands are not available in sandboxed sessions.");
|
|
288
288
|
process.exit(1);
|
|
289
289
|
}
|
|
290
|
-
const { handleServiceCommand } = await import('./commands-
|
|
290
|
+
const { handleServiceCommand } = await import('./commands-iCbgYseB.mjs');
|
|
291
291
|
await handleServiceCommand();
|
|
292
292
|
} else if (subcommand === "serve") {
|
|
293
293
|
const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
|
|
@@ -295,7 +295,7 @@ async function main() {
|
|
|
295
295
|
console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
|
|
296
296
|
process.exit(1);
|
|
297
297
|
}
|
|
298
|
-
const { handleServeCommand } = await import('./serveCommands-
|
|
298
|
+
const { handleServeCommand } = await import('./serveCommands-DEik3hcu.mjs');
|
|
299
299
|
await handleServeCommand();
|
|
300
300
|
process.exit(0);
|
|
301
301
|
} else if (subcommand === "process" || subcommand === "proc") {
|
|
@@ -304,7 +304,7 @@ async function main() {
|
|
|
304
304
|
console.error("svamp process: Process commands are not available in sandboxed sessions.");
|
|
305
305
|
process.exit(1);
|
|
306
306
|
}
|
|
307
|
-
const { processCommand } = await import('./commands-
|
|
307
|
+
const { processCommand } = await import('./commands-BKJNCTjq.mjs');
|
|
308
308
|
let machineId;
|
|
309
309
|
const processArgs = args.slice(1);
|
|
310
310
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -322,7 +322,7 @@ async function main() {
|
|
|
322
322
|
} else if (!subcommand || subcommand === "start") {
|
|
323
323
|
await handleInteractiveCommand();
|
|
324
324
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
325
|
-
const pkg = await import('./package-
|
|
325
|
+
const pkg = await import('./package-C4KoS6-F.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
326
326
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
327
327
|
} else {
|
|
328
328
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -331,7 +331,7 @@ async function main() {
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
async function handleInteractiveCommand() {
|
|
334
|
-
const { runInteractive } = await import('./run-
|
|
334
|
+
const { runInteractive } = await import('./run-DamsNf6r.mjs');
|
|
335
335
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
336
336
|
let directory = process.cwd();
|
|
337
337
|
let resumeSessionId;
|
|
@@ -376,7 +376,7 @@ async function handleAgentCommand() {
|
|
|
376
376
|
return;
|
|
377
377
|
}
|
|
378
378
|
if (agentArgs[0] === "list") {
|
|
379
|
-
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-
|
|
379
|
+
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-W8JZkXIf.mjs').then(function (n) { return n.p; });
|
|
380
380
|
console.log("Known agents:");
|
|
381
381
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
382
382
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -388,7 +388,7 @@ async function handleAgentCommand() {
|
|
|
388
388
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
|
-
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-
|
|
391
|
+
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-W8JZkXIf.mjs').then(function (n) { return n.p; });
|
|
392
392
|
let cwd = process.cwd();
|
|
393
393
|
const filteredArgs = [];
|
|
394
394
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -412,12 +412,12 @@ async function handleAgentCommand() {
|
|
|
412
412
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
413
413
|
let backend;
|
|
414
414
|
if (KNOWN_MCP_AGENTS[config.agentName]) {
|
|
415
|
-
const { CodexMcpBackend } = await import('./run-
|
|
415
|
+
const { CodexMcpBackend } = await import('./run-W8JZkXIf.mjs').then(function (n) { return n.q; });
|
|
416
416
|
backend = new CodexMcpBackend({ cwd, log: logFn });
|
|
417
417
|
} else {
|
|
418
|
-
const { AcpBackend } = await import('./run-
|
|
419
|
-
const { GeminiTransport } = await import('./run-
|
|
420
|
-
const { DefaultTransport } = await import('./run-
|
|
418
|
+
const { AcpBackend } = await import('./run-W8JZkXIf.mjs').then(function (n) { return n.o; });
|
|
419
|
+
const { GeminiTransport } = await import('./run-W8JZkXIf.mjs').then(function (n) { return n.G; });
|
|
420
|
+
const { DefaultTransport } = await import('./run-W8JZkXIf.mjs').then(function (n) { return n.D; });
|
|
421
421
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
422
422
|
backend = new AcpBackend({
|
|
423
423
|
agentName: config.agentName,
|
|
@@ -544,7 +544,7 @@ async function handleSessionCommand() {
|
|
|
544
544
|
process.exit(1);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
const { sessionList, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-
|
|
547
|
+
const { sessionList, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-C6lrExeN.mjs');
|
|
548
548
|
const parseFlagStr = (flag, shortFlag) => {
|
|
549
549
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
550
550
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -610,7 +610,7 @@ async function handleSessionCommand() {
|
|
|
610
610
|
allowDomain.push(sessionArgs[++i]);
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
const { parseShareArg } = await import('./commands-
|
|
613
|
+
const { parseShareArg } = await import('./commands-C6lrExeN.mjs');
|
|
614
614
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
615
615
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
616
616
|
message,
|
|
@@ -696,7 +696,7 @@ async function handleSessionCommand() {
|
|
|
696
696
|
console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
|
|
697
697
|
process.exit(1);
|
|
698
698
|
}
|
|
699
|
-
const { sessionQuery } = await import('./commands-
|
|
699
|
+
const { sessionQuery } = await import('./commands-C6lrExeN.mjs');
|
|
700
700
|
await sessionQuery(dir, prompt, targetMachineId, {
|
|
701
701
|
timeout: parseFlagInt("--timeout"),
|
|
702
702
|
json: hasFlag("--json"),
|
|
@@ -729,7 +729,7 @@ async function handleSessionCommand() {
|
|
|
729
729
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
730
730
|
process.exit(1);
|
|
731
731
|
}
|
|
732
|
-
const { sessionApprove } = await import('./commands-
|
|
732
|
+
const { sessionApprove } = await import('./commands-C6lrExeN.mjs');
|
|
733
733
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
734
734
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
735
735
|
json: hasFlag("--json")
|
|
@@ -739,7 +739,7 @@ async function handleSessionCommand() {
|
|
|
739
739
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
740
740
|
process.exit(1);
|
|
741
741
|
}
|
|
742
|
-
const { sessionDeny } = await import('./commands-
|
|
742
|
+
const { sessionDeny } = await import('./commands-C6lrExeN.mjs');
|
|
743
743
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
744
744
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
745
745
|
json: hasFlag("--json")
|
|
@@ -775,7 +775,7 @@ async function handleSessionCommand() {
|
|
|
775
775
|
console.error("Usage: svamp session set-title <title>");
|
|
776
776
|
process.exit(1);
|
|
777
777
|
}
|
|
778
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
778
|
+
const { sessionSetTitle } = await import('./agentCommands-CcNJ1dcR.mjs');
|
|
779
779
|
await sessionSetTitle(title);
|
|
780
780
|
} else if (sessionSubcommand === "set-link") {
|
|
781
781
|
const url = sessionArgs[1];
|
|
@@ -784,7 +784,7 @@ async function handleSessionCommand() {
|
|
|
784
784
|
process.exit(1);
|
|
785
785
|
}
|
|
786
786
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
787
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
787
|
+
const { sessionSetLink } = await import('./agentCommands-CcNJ1dcR.mjs');
|
|
788
788
|
await sessionSetLink(url, label);
|
|
789
789
|
} else if (sessionSubcommand === "notify") {
|
|
790
790
|
const message = sessionArgs[1];
|
|
@@ -793,7 +793,7 @@ async function handleSessionCommand() {
|
|
|
793
793
|
process.exit(1);
|
|
794
794
|
}
|
|
795
795
|
const level = parseFlagStr("--level") || "info";
|
|
796
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
796
|
+
const { sessionNotify } = await import('./agentCommands-CcNJ1dcR.mjs');
|
|
797
797
|
await sessionNotify(message, level);
|
|
798
798
|
} else if (sessionSubcommand === "broadcast") {
|
|
799
799
|
const action = sessionArgs[1];
|
|
@@ -801,7 +801,7 @@ async function handleSessionCommand() {
|
|
|
801
801
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
802
802
|
process.exit(1);
|
|
803
803
|
}
|
|
804
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
804
|
+
const { sessionBroadcast } = await import('./agentCommands-CcNJ1dcR.mjs');
|
|
805
805
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
806
806
|
} else if (sessionSubcommand === "inbox") {
|
|
807
807
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -812,7 +812,7 @@ async function handleSessionCommand() {
|
|
|
812
812
|
process.exit(1);
|
|
813
813
|
}
|
|
814
814
|
if (agentSessionId) {
|
|
815
|
-
const { inboxSend } = await import('./agentCommands-
|
|
815
|
+
const { inboxSend } = await import('./agentCommands-CcNJ1dcR.mjs');
|
|
816
816
|
await inboxSend(sessionArgs[2], {
|
|
817
817
|
body: sessionArgs[3],
|
|
818
818
|
subject: parseFlagStr("--subject"),
|
|
@@ -827,7 +827,7 @@ async function handleSessionCommand() {
|
|
|
827
827
|
}
|
|
828
828
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
829
829
|
if (agentSessionId && !sessionArgs[2]) {
|
|
830
|
-
const { inboxList } = await import('./agentCommands-
|
|
830
|
+
const { inboxList } = await import('./agentCommands-CcNJ1dcR.mjs');
|
|
831
831
|
await inboxList({
|
|
832
832
|
unread: hasFlag("--unread"),
|
|
833
833
|
limit: parseFlagInt("--limit"),
|
|
@@ -849,7 +849,7 @@ async function handleSessionCommand() {
|
|
|
849
849
|
process.exit(1);
|
|
850
850
|
}
|
|
851
851
|
if (agentSessionId && !sessionArgs[3]) {
|
|
852
|
-
const { inboxList } = await import('./agentCommands-
|
|
852
|
+
const { inboxList } = await import('./agentCommands-CcNJ1dcR.mjs');
|
|
853
853
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
854
854
|
} else if (sessionArgs[3]) {
|
|
855
855
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -859,7 +859,7 @@ async function handleSessionCommand() {
|
|
|
859
859
|
}
|
|
860
860
|
} else if (inboxSubcmd === "reply") {
|
|
861
861
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
862
|
-
const { inboxReply } = await import('./agentCommands-
|
|
862
|
+
const { inboxReply } = await import('./agentCommands-CcNJ1dcR.mjs');
|
|
863
863
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
864
864
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
865
865
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -895,7 +895,7 @@ async function handleMachineCommand() {
|
|
|
895
895
|
return;
|
|
896
896
|
}
|
|
897
897
|
if (machineSubcommand === "share") {
|
|
898
|
-
const { machineShare } = await import('./commands-
|
|
898
|
+
const { machineShare } = await import('./commands-C6lrExeN.mjs');
|
|
899
899
|
let machineId;
|
|
900
900
|
const shareArgs = [];
|
|
901
901
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -925,7 +925,7 @@ async function handleMachineCommand() {
|
|
|
925
925
|
}
|
|
926
926
|
await machineShare(machineId, { add, remove, list, configPath, showConfig });
|
|
927
927
|
} else if (machineSubcommand === "exec") {
|
|
928
|
-
const { machineExec } = await import('./commands-
|
|
928
|
+
const { machineExec } = await import('./commands-C6lrExeN.mjs');
|
|
929
929
|
let machineId;
|
|
930
930
|
let cwd;
|
|
931
931
|
const cmdParts = [];
|
|
@@ -945,7 +945,7 @@ async function handleMachineCommand() {
|
|
|
945
945
|
}
|
|
946
946
|
await machineExec(machineId, command, cwd);
|
|
947
947
|
} else if (machineSubcommand === "info") {
|
|
948
|
-
const { machineInfo } = await import('./commands-
|
|
948
|
+
const { machineInfo } = await import('./commands-C6lrExeN.mjs');
|
|
949
949
|
let machineId;
|
|
950
950
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
951
951
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -965,10 +965,10 @@ async function handleMachineCommand() {
|
|
|
965
965
|
level = machineArgs[++i];
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
const { machineNotify } = await import('./agentCommands-
|
|
968
|
+
const { machineNotify } = await import('./agentCommands-CcNJ1dcR.mjs');
|
|
969
969
|
await machineNotify(message, level);
|
|
970
970
|
} else if (machineSubcommand === "ls") {
|
|
971
|
-
const { machineLs } = await import('./commands-
|
|
971
|
+
const { machineLs } = await import('./commands-C6lrExeN.mjs');
|
|
972
972
|
let machineId;
|
|
973
973
|
let showHidden = false;
|
|
974
974
|
let path;
|
|
@@ -1026,24 +1026,24 @@ Examples:
|
|
|
1026
1026
|
};
|
|
1027
1027
|
const hasFlag = (name) => fleetArgs.includes(`--${name}`);
|
|
1028
1028
|
if (sub === "status") {
|
|
1029
|
-
const { fleetStatus } = await import('./fleet-
|
|
1029
|
+
const { fleetStatus } = await import('./fleet-BdWjugcV.mjs');
|
|
1030
1030
|
await fleetStatus();
|
|
1031
1031
|
} else if (sub === "exec") {
|
|
1032
1032
|
const command = fleetArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1033
|
-
const { fleetExec } = await import('./fleet-
|
|
1033
|
+
const { fleetExec } = await import('./fleet-BdWjugcV.mjs');
|
|
1034
1034
|
await fleetExec(command, { cwd: flag("cwd") });
|
|
1035
1035
|
} else if (sub === "upgrade-claude") {
|
|
1036
|
-
const { fleetUpgradeClaude } = await import('./fleet-
|
|
1036
|
+
const { fleetUpgradeClaude } = await import('./fleet-BdWjugcV.mjs');
|
|
1037
1037
|
await fleetUpgradeClaude({ version: flag("version", "-v") });
|
|
1038
1038
|
} else if (sub === "upgrade-svamp") {
|
|
1039
|
-
const { fleetUpgradeSvamp } = await import('./fleet-
|
|
1039
|
+
const { fleetUpgradeSvamp } = await import('./fleet-BdWjugcV.mjs');
|
|
1040
1040
|
await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
|
|
1041
1041
|
} else if (sub === "daemon-restart") {
|
|
1042
|
-
const { fleetDaemonRestart } = await import('./fleet-
|
|
1042
|
+
const { fleetDaemonRestart } = await import('./fleet-BdWjugcV.mjs');
|
|
1043
1043
|
await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
|
|
1044
1044
|
} else if (sub === "push-skill") {
|
|
1045
1045
|
const name = fleetArgs[1];
|
|
1046
|
-
const { fleetPushSkill } = await import('./fleet-
|
|
1046
|
+
const { fleetPushSkill } = await import('./fleet-BdWjugcV.mjs');
|
|
1047
1047
|
await fleetPushSkill(name);
|
|
1048
1048
|
} else {
|
|
1049
1049
|
console.error(`Unknown fleet subcommand: ${sub}`);
|
|
@@ -1502,7 +1502,7 @@ async function applyClaudeAuthFlags(argv) {
|
|
|
1502
1502
|
"--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
|
|
1503
1503
|
);
|
|
1504
1504
|
}
|
|
1505
|
-
const mod = await import('./run-
|
|
1505
|
+
const mod = await import('./run-W8JZkXIf.mjs').then(function (n) { return n.t; });
|
|
1506
1506
|
if (hasHypha) {
|
|
1507
1507
|
mod.setClaudeAuthHyphaProxy();
|
|
1508
1508
|
console.log("Claude auth configured: hypha-proxy (uses HYPHA_TOKEN live at each spawn).");
|
|
@@ -1540,7 +1540,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1540
1540
|
}
|
|
1541
1541
|
}
|
|
1542
1542
|
if (collected.length === 0) return;
|
|
1543
|
-
const { updateEnvFile } = await import('./run-
|
|
1543
|
+
const { updateEnvFile } = await import('./run-W8JZkXIf.mjs').then(function (n) { return n.t; });
|
|
1544
1544
|
const seen = /* @__PURE__ */ new Set();
|
|
1545
1545
|
const deduped = collected.filter((e) => {
|
|
1546
1546
|
const k = e.toLowerCase();
|
|
@@ -1553,7 +1553,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1553
1553
|
}
|
|
1554
1554
|
async function handleDaemonAuthCommand(argv) {
|
|
1555
1555
|
const sub = (argv[0] || "status").toLowerCase();
|
|
1556
|
-
const mod = await import('./run-
|
|
1556
|
+
const mod = await import('./run-W8JZkXIf.mjs').then(function (n) { return n.t; });
|
|
1557
1557
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
1558
1558
|
console.log(`
|
|
1559
1559
|
svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { writeFileSync, readFileSync } from 'fs';
|
|
2
2
|
import { resolve } from 'path';
|
|
3
|
-
import { connectAndGetMachine } from './commands-
|
|
3
|
+
import { connectAndGetMachine } from './commands-C6lrExeN.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-
|
|
8
|
+
import './run-W8JZkXIf.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
2
2
|
import { execSync } from 'node:child_process';
|
|
3
3
|
import { resolve, join } from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import { n as normalizeAllowedUser, l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha, i as buildSessionShareUrl, j as buildMachineShareUrl } from './run-
|
|
5
|
+
import { n as normalizeAllowedUser, l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha, i as buildSessionShareUrl, j as buildMachineShareUrl } from './run-W8JZkXIf.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -68,7 +68,7 @@ async function serviceExpose(args) {
|
|
|
68
68
|
});
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
71
|
+
const { connectAndGetMachine } = await import('./commands-C6lrExeN.mjs');
|
|
72
72
|
const { server, machine } = await connectAndGetMachine();
|
|
73
73
|
try {
|
|
74
74
|
const status = await machine.tunnelStart({
|
|
@@ -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-
|
|
135
|
+
const { connectAndGetMachine } = await import('./commands-C6lrExeN.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-
|
|
164
|
+
const { connectAndGetMachine } = await import('./commands-C6lrExeN.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-
|
|
4
|
+
import { c as connectToHypha } from './run-W8JZkXIf.mjs';
|
|
5
5
|
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-HydRNEt7.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as connectToHypha, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, a as registerSessionService, s as startDaemon, b as stopDaemon } from './run-
|
|
1
|
+
export { c as connectToHypha, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, a as registerSessionService, s as startDaemon, b as stopDaemon } from './run-W8JZkXIf.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -2,7 +2,7 @@ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(im
|
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import { resolve, join } from 'node:path';
|
|
4
4
|
import { existsSync, readFileSync, watch } from 'node:fs';
|
|
5
|
-
import { c as connectToHypha, a as registerSessionService, k as generateHookSettings } from './run-
|
|
5
|
+
import { c as connectToHypha, a as registerSessionService, k as generateHookSettings } from './run-W8JZkXIf.mjs';
|
|
6
6
|
import { createServer } from 'node:http';
|
|
7
7
|
import { spawn } from 'node:child_process';
|
|
8
8
|
import { createInterface } from 'node:readline';
|
|
@@ -7976,7 +7976,7 @@ async function startDaemon(options) {
|
|
|
7976
7976
|
const list = loadExposedTunnels().filter((t) => t.name !== name);
|
|
7977
7977
|
saveExposedTunnels(list);
|
|
7978
7978
|
}
|
|
7979
|
-
const { ServeManager } = await import('./serveManager-
|
|
7979
|
+
const { ServeManager } = await import('./serveManager-DTR_TDIp.mjs');
|
|
7980
7980
|
const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
|
|
7981
7981
|
ensureAutoInstalledSkills(logger).catch(() => {
|
|
7982
7982
|
});
|
|
@@ -8087,6 +8087,9 @@ async function startDaemon(options) {
|
|
|
8087
8087
|
allowedBashLiterals.add(command);
|
|
8088
8088
|
}
|
|
8089
8089
|
}, shouldAutoAllow2 = function(toolName, toolInput) {
|
|
8090
|
+
if (toolName === "AskUserQuestion") {
|
|
8091
|
+
return sessionMetadata.ralphLoop?.active === true;
|
|
8092
|
+
}
|
|
8090
8093
|
if (toolName === "Bash") {
|
|
8091
8094
|
const inputObj = toolInput;
|
|
8092
8095
|
if (inputObj?.command) {
|
|
@@ -8278,6 +8281,7 @@ async function startDaemon(options) {
|
|
|
8278
8281
|
const allowedBashPrefixes = /* @__PURE__ */ new Set();
|
|
8279
8282
|
const EDIT_TOOLS = /* @__PURE__ */ new Set(["Edit", "MultiEdit", "Write", "NotebookEdit"]);
|
|
8280
8283
|
const pendingPermissions = /* @__PURE__ */ new Map();
|
|
8284
|
+
const permRequestIdToCorrelation = /* @__PURE__ */ new Map();
|
|
8281
8285
|
let backgroundTaskCount = 0;
|
|
8282
8286
|
let backgroundTaskNames = [];
|
|
8283
8287
|
let userMessagePending = false;
|
|
@@ -8447,7 +8451,8 @@ async function startDaemon(options) {
|
|
|
8447
8451
|
const requestId = msg.request_id;
|
|
8448
8452
|
const toolName = msg.request.tool_name;
|
|
8449
8453
|
const toolInput = msg.request.input;
|
|
8450
|
-
|
|
8454
|
+
const correlationId = msg.request.tool_use_id || requestId;
|
|
8455
|
+
logger.log(`[Session ${sessionId}] Permission request: ${requestId} (corr=${correlationId}) tool=${toolName}`);
|
|
8451
8456
|
if (shouldAutoAllow2(toolName, toolInput)) {
|
|
8452
8457
|
logger.log(`[Session ${sessionId}] Auto-allowing ${toolName} (mode=${currentPermissionMode})`);
|
|
8453
8458
|
if (claudeProcess && !claudeProcess.killed && claudeProcess.stdin) {
|
|
@@ -8464,14 +8469,15 @@ async function startDaemon(options) {
|
|
|
8464
8469
|
continue;
|
|
8465
8470
|
}
|
|
8466
8471
|
const permissionPromise = new Promise((resolve2) => {
|
|
8467
|
-
pendingPermissions.set(
|
|
8472
|
+
pendingPermissions.set(correlationId, { resolve: resolve2, toolName, input: toolInput, requestId });
|
|
8473
|
+
permRequestIdToCorrelation.set(requestId, correlationId);
|
|
8468
8474
|
});
|
|
8469
8475
|
const currentRequests = { ...sessionService._agentState?.requests };
|
|
8470
8476
|
sessionService.updateAgentState({
|
|
8471
8477
|
controlledByUser: false,
|
|
8472
8478
|
requests: {
|
|
8473
8479
|
...currentRequests,
|
|
8474
|
-
[
|
|
8480
|
+
[correlationId]: {
|
|
8475
8481
|
tool: toolName,
|
|
8476
8482
|
arguments: toolInput,
|
|
8477
8483
|
createdAt: Date.now()
|
|
@@ -8479,11 +8485,13 @@ async function startDaemon(options) {
|
|
|
8479
8485
|
}
|
|
8480
8486
|
});
|
|
8481
8487
|
permissionPromise.then((result) => {
|
|
8488
|
+
permRequestIdToCorrelation.delete(requestId);
|
|
8482
8489
|
if (claudeProcess && !claudeProcess.killed && claudeProcess.stdin) {
|
|
8483
8490
|
const controlResponse = JSON.stringify({
|
|
8484
8491
|
type: "control_response",
|
|
8485
8492
|
response: {
|
|
8486
8493
|
subtype: "success",
|
|
8494
|
+
// Echo the ORIGINAL request_id — Claude correlates by it.
|
|
8487
8495
|
request_id: requestId,
|
|
8488
8496
|
response: result
|
|
8489
8497
|
}
|
|
@@ -8492,13 +8500,13 @@ async function startDaemon(options) {
|
|
|
8492
8500
|
claudeProcess.stdin.write(controlResponse + "\n");
|
|
8493
8501
|
}
|
|
8494
8502
|
const reqs = { ...sessionService._agentState?.requests };
|
|
8495
|
-
delete reqs[
|
|
8503
|
+
delete reqs[correlationId];
|
|
8496
8504
|
sessionService.updateAgentState({
|
|
8497
8505
|
controlledByUser: false,
|
|
8498
8506
|
requests: reqs,
|
|
8499
8507
|
completedRequests: {
|
|
8500
8508
|
...sessionService._agentState?.completedRequests,
|
|
8501
|
-
[
|
|
8509
|
+
[correlationId]: {
|
|
8502
8510
|
tool: toolName,
|
|
8503
8511
|
arguments: toolInput,
|
|
8504
8512
|
completedAt: Date.now(),
|
|
@@ -8512,10 +8520,12 @@ async function startDaemon(options) {
|
|
|
8512
8520
|
} else if (msg.type === "control_cancel_request") {
|
|
8513
8521
|
const requestId = msg.request_id;
|
|
8514
8522
|
logger.log(`[Session ${sessionId}] Permission cancel: ${requestId}`);
|
|
8515
|
-
const
|
|
8523
|
+
const corr = permRequestIdToCorrelation.get(requestId) || requestId;
|
|
8524
|
+
const pending = pendingPermissions.get(corr);
|
|
8516
8525
|
if (pending) {
|
|
8517
8526
|
pending.resolve({ behavior: "deny", message: "Cancelled" });
|
|
8518
|
-
pendingPermissions.delete(
|
|
8527
|
+
pendingPermissions.delete(corr);
|
|
8528
|
+
permRequestIdToCorrelation.delete(requestId);
|
|
8519
8529
|
}
|
|
8520
8530
|
} else if (msg.type === "control_response") {
|
|
8521
8531
|
logger.log(`[Session ${sessionId}] Control response: ${JSON.stringify(msg).slice(0, 200)}`);
|
|
@@ -9290,11 +9300,19 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
9290
9300
|
}
|
|
9291
9301
|
if (pending) {
|
|
9292
9302
|
pendingPermissions.delete(requestId);
|
|
9303
|
+
permRequestIdToCorrelation.delete(pending.requestId);
|
|
9293
9304
|
if (params.approved) {
|
|
9294
|
-
pending.
|
|
9295
|
-
|
|
9296
|
-
updatedInput
|
|
9297
|
-
|
|
9305
|
+
let updatedInput = pending.input || {};
|
|
9306
|
+
if (pending.toolName === "AskUserQuestion" && (params.answers || params.response)) {
|
|
9307
|
+
updatedInput = { ...updatedInput };
|
|
9308
|
+
if (params.answers && typeof params.answers === "object") {
|
|
9309
|
+
updatedInput.answers = params.answers;
|
|
9310
|
+
}
|
|
9311
|
+
if (typeof params.response === "string" && params.response.trim()) {
|
|
9312
|
+
updatedInput.response = params.response;
|
|
9313
|
+
}
|
|
9314
|
+
}
|
|
9315
|
+
pending.resolve({ behavior: "allow", updatedInput });
|
|
9298
9316
|
} else {
|
|
9299
9317
|
pending.resolve({
|
|
9300
9318
|
behavior: "deny",
|
|
@@ -54,7 +54,7 @@ async function handleServeCommand() {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
async function serveAdd(args, machineId) {
|
|
57
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
57
|
+
const { connectAndGetMachine } = await import('./commands-C6lrExeN.mjs');
|
|
58
58
|
const pos = positionalArgs(args);
|
|
59
59
|
const name = pos[0];
|
|
60
60
|
if (!name) {
|
|
@@ -93,7 +93,7 @@ async function serveAdd(args, machineId) {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
async function serveApply(args, machineId) {
|
|
96
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
96
|
+
const { connectAndGetMachine } = await import('./commands-C6lrExeN.mjs');
|
|
97
97
|
const fs = await import('fs');
|
|
98
98
|
const yaml = await import('yaml');
|
|
99
99
|
const file = positionalArgs(args)[0];
|
|
@@ -182,7 +182,7 @@ async function serveApply(args, machineId) {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
async function serveRemove(args, machineId) {
|
|
185
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
185
|
+
const { connectAndGetMachine } = await import('./commands-C6lrExeN.mjs');
|
|
186
186
|
const pos = positionalArgs(args);
|
|
187
187
|
const name = pos[0];
|
|
188
188
|
if (!name) {
|
|
@@ -202,7 +202,7 @@ async function serveRemove(args, machineId) {
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
async function serveList(args, machineId) {
|
|
205
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
205
|
+
const { connectAndGetMachine } = await import('./commands-C6lrExeN.mjs');
|
|
206
206
|
const all = hasFlag(args, "--all", "-a");
|
|
207
207
|
const json = hasFlag(args, "--json");
|
|
208
208
|
const sessionId = getFlag(args, "--session");
|
|
@@ -235,7 +235,7 @@ async function serveList(args, machineId) {
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
async function serveInfo(machineId) {
|
|
238
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
238
|
+
const { connectAndGetMachine } = await import('./commands-C6lrExeN.mjs');
|
|
239
239
|
const { machine, server } = await connectAndGetMachine(machineId);
|
|
240
240
|
try {
|
|
241
241
|
const info = await machine.serveInfo();
|
|
@@ -4,7 +4,7 @@ import * as fs from 'fs';
|
|
|
4
4
|
import * as http from 'http';
|
|
5
5
|
import * as net from 'net';
|
|
6
6
|
import * as path from 'path';
|
|
7
|
-
import { S as ServeAuth, h as hasCookieToken } from './run-
|
|
7
|
+
import { S as ServeAuth, h as hasCookieToken } from './run-W8JZkXIf.mjs';
|
|
8
8
|
import 'os';
|
|
9
9
|
import 'fs/promises';
|
|
10
10
|
import 'url';
|