svamp-cli 0.2.86 → 0.2.87
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-BiIVrk52.mjs → agentCommands-CPV2AS4T.mjs} +2 -2
- package/dist/cli.mjs +46 -46
- package/dist/{commands-Db9HLZR5.mjs → commands-BPR-KpZM.mjs} +2 -2
- package/dist/{commands-BKYz39Hl.mjs → commands-CXEpyNro.mjs} +1 -1
- package/dist/{commands-BkUoyPy-.mjs → commands-CtCjHkST.mjs} +5 -5
- package/dist/{commands-Dj7Be8dw.mjs → commands-Dbm3UrJS.mjs} +1 -1
- package/dist/{commands-DQaKE9SC.mjs → commands-Dc5kN_0c.mjs} +1 -1
- package/dist/{fleet-DHV-NyW1.mjs → fleet-CEM8CAZN.mjs} +1 -1
- package/dist/{frpc-BfBqHN33.mjs → frpc-CJJTmC9m.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{package-C93hgi-7.mjs → package-BiX-a9rI.mjs} +2 -2
- package/dist/{run-CEs0etJC.mjs → run-3ndxhd-X.mjs} +1 -1
- package/dist/{run-rWXfNd7e.mjs → run-BV4hWpyA.mjs} +31 -21
- package/dist/{serveCommands-Cw5hnh0B.mjs → serveCommands-ClcajS1I.mjs} +5 -5
- package/dist/{serveManager-BgnooFJZ.mjs → serveManager-tAOF25rN.mjs} +2 -2
- package/package.json +2 -2
|
@@ -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-Dbm3UrJS.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-Dbm3UrJS.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-BV4hWpyA.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -32,7 +32,7 @@ const subcommand = args[0];
|
|
|
32
32
|
let daemonSubcommand = args[1];
|
|
33
33
|
async function main() {
|
|
34
34
|
try {
|
|
35
|
-
const { getLoadedConfig } = await import('./run-
|
|
35
|
+
const { getLoadedConfig } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.L; });
|
|
36
36
|
getLoadedConfig();
|
|
37
37
|
} catch {
|
|
38
38
|
}
|
|
@@ -49,7 +49,7 @@ async function main() {
|
|
|
49
49
|
console.error(`svamp daemon restart: ${err.message || err}`);
|
|
50
50
|
process.exit(1);
|
|
51
51
|
}
|
|
52
|
-
const { restartDaemon } = await import('./run-
|
|
52
|
+
const { restartDaemon } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.N; });
|
|
53
53
|
await restartDaemon();
|
|
54
54
|
process.exit(0);
|
|
55
55
|
}
|
|
@@ -301,7 +301,7 @@ async function main() {
|
|
|
301
301
|
console.error("svamp service: Service commands are not available in sandboxed sessions.");
|
|
302
302
|
process.exit(1);
|
|
303
303
|
}
|
|
304
|
-
const { handleServiceCommand } = await import('./commands-
|
|
304
|
+
const { handleServiceCommand } = await import('./commands-CtCjHkST.mjs');
|
|
305
305
|
await handleServiceCommand();
|
|
306
306
|
} else if (subcommand === "serve") {
|
|
307
307
|
const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
|
|
@@ -309,7 +309,7 @@ async function main() {
|
|
|
309
309
|
console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
|
|
310
310
|
process.exit(1);
|
|
311
311
|
}
|
|
312
|
-
const { handleServeCommand } = await import('./serveCommands-
|
|
312
|
+
const { handleServeCommand } = await import('./serveCommands-ClcajS1I.mjs');
|
|
313
313
|
await handleServeCommand();
|
|
314
314
|
process.exit(0);
|
|
315
315
|
} else if (subcommand === "process" || subcommand === "proc") {
|
|
@@ -318,7 +318,7 @@ async function main() {
|
|
|
318
318
|
console.error("svamp process: Process commands are not available in sandboxed sessions.");
|
|
319
319
|
process.exit(1);
|
|
320
320
|
}
|
|
321
|
-
const { processCommand } = await import('./commands-
|
|
321
|
+
const { processCommand } = await import('./commands-BPR-KpZM.mjs');
|
|
322
322
|
let machineId;
|
|
323
323
|
const processArgs = args.slice(1);
|
|
324
324
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -332,7 +332,7 @@ async function main() {
|
|
|
332
332
|
}), machineId);
|
|
333
333
|
process.exit(0);
|
|
334
334
|
} else if (subcommand === "routine" || subcommand === "routines") {
|
|
335
|
-
const { routineCommand } = await import('./commands-
|
|
335
|
+
const { routineCommand } = await import('./commands-Dc5kN_0c.mjs');
|
|
336
336
|
await routineCommand(args.slice(1));
|
|
337
337
|
process.exit(0);
|
|
338
338
|
} else if (subcommand === "--help" || subcommand === "-h") {
|
|
@@ -340,7 +340,7 @@ async function main() {
|
|
|
340
340
|
} else if (!subcommand || subcommand === "start") {
|
|
341
341
|
await handleInteractiveCommand();
|
|
342
342
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
343
|
-
const pkg = await import('./package-
|
|
343
|
+
const pkg = await import('./package-BiX-a9rI.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
344
344
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
345
345
|
} else {
|
|
346
346
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -349,7 +349,7 @@ async function main() {
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
async function handleInteractiveCommand() {
|
|
352
|
-
const { runInteractive } = await import('./run-
|
|
352
|
+
const { runInteractive } = await import('./run-3ndxhd-X.mjs');
|
|
353
353
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
354
354
|
let directory = process.cwd();
|
|
355
355
|
let resumeSessionId;
|
|
@@ -394,7 +394,7 @@ async function handleAgentCommand() {
|
|
|
394
394
|
return;
|
|
395
395
|
}
|
|
396
396
|
if (agentArgs[0] === "list") {
|
|
397
|
-
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-
|
|
397
|
+
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.H; });
|
|
398
398
|
console.log("Known agents:");
|
|
399
399
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
400
400
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -406,7 +406,7 @@ async function handleAgentCommand() {
|
|
|
406
406
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
407
407
|
return;
|
|
408
408
|
}
|
|
409
|
-
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-
|
|
409
|
+
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.H; });
|
|
410
410
|
let cwd = process.cwd();
|
|
411
411
|
const filteredArgs = [];
|
|
412
412
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -430,12 +430,12 @@ async function handleAgentCommand() {
|
|
|
430
430
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
431
431
|
let backend;
|
|
432
432
|
if (KNOWN_MCP_AGENTS[config.agentName]) {
|
|
433
|
-
const { CodexMcpBackend } = await import('./run-
|
|
433
|
+
const { CodexMcpBackend } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.I; });
|
|
434
434
|
backend = new CodexMcpBackend({ cwd, log: logFn });
|
|
435
435
|
} else {
|
|
436
|
-
const { AcpBackend } = await import('./run-
|
|
437
|
-
const { GeminiTransport } = await import('./run-
|
|
438
|
-
const { DefaultTransport } = await import('./run-
|
|
436
|
+
const { AcpBackend } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.G; });
|
|
437
|
+
const { GeminiTransport } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.J; });
|
|
438
|
+
const { DefaultTransport } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.F; });
|
|
439
439
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
440
440
|
backend = new AcpBackend({
|
|
441
441
|
agentName: config.agentName,
|
|
@@ -562,7 +562,7 @@ async function handleSessionCommand() {
|
|
|
562
562
|
process.exit(1);
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
const { sessionList, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-
|
|
565
|
+
const { sessionList, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-Dbm3UrJS.mjs');
|
|
566
566
|
const parseFlagStr = (flag, shortFlag) => {
|
|
567
567
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
568
568
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -628,7 +628,7 @@ async function handleSessionCommand() {
|
|
|
628
628
|
allowDomain.push(sessionArgs[++i]);
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
const { parseShareArg } = await import('./commands-
|
|
631
|
+
const { parseShareArg } = await import('./commands-Dbm3UrJS.mjs');
|
|
632
632
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
633
633
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
634
634
|
message,
|
|
@@ -714,7 +714,7 @@ async function handleSessionCommand() {
|
|
|
714
714
|
console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
|
|
715
715
|
process.exit(1);
|
|
716
716
|
}
|
|
717
|
-
const { sessionQuery } = await import('./commands-
|
|
717
|
+
const { sessionQuery } = await import('./commands-Dbm3UrJS.mjs');
|
|
718
718
|
await sessionQuery(dir, prompt, targetMachineId, {
|
|
719
719
|
timeout: parseFlagInt("--timeout"),
|
|
720
720
|
json: hasFlag("--json"),
|
|
@@ -747,7 +747,7 @@ async function handleSessionCommand() {
|
|
|
747
747
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
748
748
|
process.exit(1);
|
|
749
749
|
}
|
|
750
|
-
const { sessionApprove } = await import('./commands-
|
|
750
|
+
const { sessionApprove } = await import('./commands-Dbm3UrJS.mjs');
|
|
751
751
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
752
752
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
753
753
|
json: hasFlag("--json")
|
|
@@ -757,7 +757,7 @@ async function handleSessionCommand() {
|
|
|
757
757
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
758
758
|
process.exit(1);
|
|
759
759
|
}
|
|
760
|
-
const { sessionDeny } = await import('./commands-
|
|
760
|
+
const { sessionDeny } = await import('./commands-Dbm3UrJS.mjs');
|
|
761
761
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
762
762
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
763
763
|
json: hasFlag("--json")
|
|
@@ -793,7 +793,7 @@ async function handleSessionCommand() {
|
|
|
793
793
|
console.error("Usage: svamp session set-title <title>");
|
|
794
794
|
process.exit(1);
|
|
795
795
|
}
|
|
796
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
796
|
+
const { sessionSetTitle } = await import('./agentCommands-CPV2AS4T.mjs');
|
|
797
797
|
await sessionSetTitle(title);
|
|
798
798
|
} else if (sessionSubcommand === "set-link") {
|
|
799
799
|
const url = sessionArgs[1];
|
|
@@ -802,7 +802,7 @@ async function handleSessionCommand() {
|
|
|
802
802
|
process.exit(1);
|
|
803
803
|
}
|
|
804
804
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
805
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
805
|
+
const { sessionSetLink } = await import('./agentCommands-CPV2AS4T.mjs');
|
|
806
806
|
await sessionSetLink(url, label);
|
|
807
807
|
} else if (sessionSubcommand === "notify") {
|
|
808
808
|
const message = sessionArgs[1];
|
|
@@ -811,7 +811,7 @@ async function handleSessionCommand() {
|
|
|
811
811
|
process.exit(1);
|
|
812
812
|
}
|
|
813
813
|
const level = parseFlagStr("--level") || "info";
|
|
814
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
814
|
+
const { sessionNotify } = await import('./agentCommands-CPV2AS4T.mjs');
|
|
815
815
|
await sessionNotify(message, level);
|
|
816
816
|
} else if (sessionSubcommand === "broadcast") {
|
|
817
817
|
const action = sessionArgs[1];
|
|
@@ -819,7 +819,7 @@ async function handleSessionCommand() {
|
|
|
819
819
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
820
820
|
process.exit(1);
|
|
821
821
|
}
|
|
822
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
822
|
+
const { sessionBroadcast } = await import('./agentCommands-CPV2AS4T.mjs');
|
|
823
823
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
824
824
|
} else if (sessionSubcommand === "inbox") {
|
|
825
825
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -830,7 +830,7 @@ async function handleSessionCommand() {
|
|
|
830
830
|
process.exit(1);
|
|
831
831
|
}
|
|
832
832
|
if (agentSessionId) {
|
|
833
|
-
const { inboxSend } = await import('./agentCommands-
|
|
833
|
+
const { inboxSend } = await import('./agentCommands-CPV2AS4T.mjs');
|
|
834
834
|
await inboxSend(sessionArgs[2], {
|
|
835
835
|
body: sessionArgs[3],
|
|
836
836
|
subject: parseFlagStr("--subject"),
|
|
@@ -845,7 +845,7 @@ async function handleSessionCommand() {
|
|
|
845
845
|
}
|
|
846
846
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
847
847
|
if (agentSessionId && !sessionArgs[2]) {
|
|
848
|
-
const { inboxList } = await import('./agentCommands-
|
|
848
|
+
const { inboxList } = await import('./agentCommands-CPV2AS4T.mjs');
|
|
849
849
|
await inboxList({
|
|
850
850
|
unread: hasFlag("--unread"),
|
|
851
851
|
limit: parseFlagInt("--limit"),
|
|
@@ -867,7 +867,7 @@ async function handleSessionCommand() {
|
|
|
867
867
|
process.exit(1);
|
|
868
868
|
}
|
|
869
869
|
if (agentSessionId && !sessionArgs[3]) {
|
|
870
|
-
const { inboxList } = await import('./agentCommands-
|
|
870
|
+
const { inboxList } = await import('./agentCommands-CPV2AS4T.mjs');
|
|
871
871
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
872
872
|
} else if (sessionArgs[3]) {
|
|
873
873
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -877,7 +877,7 @@ async function handleSessionCommand() {
|
|
|
877
877
|
}
|
|
878
878
|
} else if (inboxSubcmd === "reply") {
|
|
879
879
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
880
|
-
const { inboxReply } = await import('./agentCommands-
|
|
880
|
+
const { inboxReply } = await import('./agentCommands-CPV2AS4T.mjs');
|
|
881
881
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
882
882
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
883
883
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -913,7 +913,7 @@ async function handleMachineCommand() {
|
|
|
913
913
|
return;
|
|
914
914
|
}
|
|
915
915
|
if (machineSubcommand === "share") {
|
|
916
|
-
const { machineShare } = await import('./commands-
|
|
916
|
+
const { machineShare } = await import('./commands-Dbm3UrJS.mjs');
|
|
917
917
|
let machineId;
|
|
918
918
|
const shareArgs = [];
|
|
919
919
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -943,7 +943,7 @@ async function handleMachineCommand() {
|
|
|
943
943
|
}
|
|
944
944
|
await machineShare(machineId, { add, remove, list, configPath, showConfig });
|
|
945
945
|
} else if (machineSubcommand === "exec") {
|
|
946
|
-
const { machineExec } = await import('./commands-
|
|
946
|
+
const { machineExec } = await import('./commands-Dbm3UrJS.mjs');
|
|
947
947
|
let machineId;
|
|
948
948
|
let cwd;
|
|
949
949
|
const cmdParts = [];
|
|
@@ -963,7 +963,7 @@ async function handleMachineCommand() {
|
|
|
963
963
|
}
|
|
964
964
|
await machineExec(machineId, command, cwd);
|
|
965
965
|
} else if (machineSubcommand === "info") {
|
|
966
|
-
const { machineInfo } = await import('./commands-
|
|
966
|
+
const { machineInfo } = await import('./commands-Dbm3UrJS.mjs');
|
|
967
967
|
let machineId;
|
|
968
968
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
969
969
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -983,10 +983,10 @@ async function handleMachineCommand() {
|
|
|
983
983
|
level = machineArgs[++i];
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
|
-
const { machineNotify } = await import('./agentCommands-
|
|
986
|
+
const { machineNotify } = await import('./agentCommands-CPV2AS4T.mjs');
|
|
987
987
|
await machineNotify(message, level);
|
|
988
988
|
} else if (machineSubcommand === "ls") {
|
|
989
|
-
const { machineLs } = await import('./commands-
|
|
989
|
+
const { machineLs } = await import('./commands-Dbm3UrJS.mjs');
|
|
990
990
|
let machineId;
|
|
991
991
|
let showHidden = false;
|
|
992
992
|
let path;
|
|
@@ -1044,24 +1044,24 @@ Examples:
|
|
|
1044
1044
|
};
|
|
1045
1045
|
const hasFlag = (name) => fleetArgs.includes(`--${name}`);
|
|
1046
1046
|
if (sub === "status") {
|
|
1047
|
-
const { fleetStatus } = await import('./fleet-
|
|
1047
|
+
const { fleetStatus } = await import('./fleet-CEM8CAZN.mjs');
|
|
1048
1048
|
await fleetStatus();
|
|
1049
1049
|
} else if (sub === "exec") {
|
|
1050
1050
|
const command = fleetArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1051
|
-
const { fleetExec } = await import('./fleet-
|
|
1051
|
+
const { fleetExec } = await import('./fleet-CEM8CAZN.mjs');
|
|
1052
1052
|
await fleetExec(command, { cwd: flag("cwd") });
|
|
1053
1053
|
} else if (sub === "upgrade-claude") {
|
|
1054
|
-
const { fleetUpgradeClaude } = await import('./fleet-
|
|
1054
|
+
const { fleetUpgradeClaude } = await import('./fleet-CEM8CAZN.mjs');
|
|
1055
1055
|
await fleetUpgradeClaude({ version: flag("version", "-v") });
|
|
1056
1056
|
} else if (sub === "upgrade-svamp") {
|
|
1057
|
-
const { fleetUpgradeSvamp } = await import('./fleet-
|
|
1057
|
+
const { fleetUpgradeSvamp } = await import('./fleet-CEM8CAZN.mjs');
|
|
1058
1058
|
await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
|
|
1059
1059
|
} else if (sub === "daemon-restart") {
|
|
1060
|
-
const { fleetDaemonRestart } = await import('./fleet-
|
|
1060
|
+
const { fleetDaemonRestart } = await import('./fleet-CEM8CAZN.mjs');
|
|
1061
1061
|
await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
|
|
1062
1062
|
} else if (sub === "push-skill") {
|
|
1063
1063
|
const name = fleetArgs[1];
|
|
1064
|
-
const { fleetPushSkill } = await import('./fleet-
|
|
1064
|
+
const { fleetPushSkill } = await import('./fleet-CEM8CAZN.mjs');
|
|
1065
1065
|
await fleetPushSkill(name);
|
|
1066
1066
|
} else {
|
|
1067
1067
|
console.error(`Unknown fleet subcommand: ${sub}`);
|
|
@@ -1077,7 +1077,7 @@ async function handleSkillsCommand() {
|
|
|
1077
1077
|
await printSkillsHelp();
|
|
1078
1078
|
return;
|
|
1079
1079
|
}
|
|
1080
|
-
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-
|
|
1080
|
+
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-CXEpyNro.mjs');
|
|
1081
1081
|
if (skillsSubcommand === "find" || skillsSubcommand === "search") {
|
|
1082
1082
|
const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1083
1083
|
if (!query) {
|
|
@@ -1124,7 +1124,7 @@ async function loginToHypha() {
|
|
|
1124
1124
|
process.exit(1);
|
|
1125
1125
|
}
|
|
1126
1126
|
const anchor = anchorArg.replace(/\/+$/, "");
|
|
1127
|
-
const { loadInstanceConfig } = await import('./run-
|
|
1127
|
+
const { loadInstanceConfig } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.L; });
|
|
1128
1128
|
let cfg = null;
|
|
1129
1129
|
try {
|
|
1130
1130
|
cfg = await loadInstanceConfig({ anchor, force: true });
|
|
@@ -1235,7 +1235,7 @@ async function logoutFromHypha() {
|
|
|
1235
1235
|
} catch {
|
|
1236
1236
|
}
|
|
1237
1237
|
try {
|
|
1238
|
-
const { clearInstanceConfigCache } = await import('./run-
|
|
1238
|
+
const { clearInstanceConfigCache } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.L; });
|
|
1239
1239
|
clearInstanceConfigCache();
|
|
1240
1240
|
} catch {
|
|
1241
1241
|
}
|
|
@@ -1548,7 +1548,7 @@ async function applyClaudeAuthFlags(argv) {
|
|
|
1548
1548
|
"--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
|
|
1549
1549
|
);
|
|
1550
1550
|
}
|
|
1551
|
-
const mod = await import('./run-
|
|
1551
|
+
const mod = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.K; });
|
|
1552
1552
|
if (hasHypha) {
|
|
1553
1553
|
let url;
|
|
1554
1554
|
const hyphaIdx = argv.indexOf("--use-hypha-proxy");
|
|
@@ -1602,7 +1602,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1602
1602
|
}
|
|
1603
1603
|
}
|
|
1604
1604
|
if (collected.length === 0) return;
|
|
1605
|
-
const { updateEnvFile } = await import('./run-
|
|
1605
|
+
const { updateEnvFile } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.K; });
|
|
1606
1606
|
const seen = /* @__PURE__ */ new Set();
|
|
1607
1607
|
const deduped = collected.filter((e) => {
|
|
1608
1608
|
const k = e.toLowerCase();
|
|
@@ -1615,7 +1615,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1615
1615
|
}
|
|
1616
1616
|
async function handleDaemonAuthCommand(argv) {
|
|
1617
1617
|
const sub = (argv[0] || "status").toLowerCase();
|
|
1618
|
-
const mod = await import('./run-
|
|
1618
|
+
const mod = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.K; });
|
|
1619
1619
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
1620
1620
|
console.log(`
|
|
1621
1621
|
svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
|
|
@@ -1908,7 +1908,7 @@ Examples:
|
|
|
1908
1908
|
async function printSkillsHelp() {
|
|
1909
1909
|
let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
|
|
1910
1910
|
try {
|
|
1911
|
-
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-
|
|
1911
|
+
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-BV4hWpyA.mjs').then(function (n) { return n.M; });
|
|
1912
1912
|
browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
|
|
1913
1913
|
} catch {
|
|
1914
1914
|
}
|
|
@@ -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-Dbm3UrJS.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-BV4hWpyA.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -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, l as getSkillsServer, m as getSkillsWorkspaceName, n as getSkillsCollectionName, o as fetchWithTimeout, q as searchSkills, t as SKILLS_DIR, u as getSkillInfo, v as downloadSkillFile, w as listSkillFiles } from './run-
|
|
4
|
+
import { p as parseFrontmatter, l as getSkillsServer, m as getSkillsWorkspaceName, n as getSkillsCollectionName, o as fetchWithTimeout, q as searchSkills, t as SKILLS_DIR, u as getSkillInfo, v as downloadSkillFile, w as listSkillFiles } from './run-BV4hWpyA.mjs';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'url';
|
|
7
7
|
import 'child_process';
|
|
@@ -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-
|
|
61
|
+
const { runFrpcTunnel } = await import('./frpc-CJJTmC9m.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-
|
|
71
|
+
const { connectAndGetMachine } = await import('./commands-Dbm3UrJS.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-
|
|
126
|
+
const { runFrpcTunnel } = await import('./frpc-CJJTmC9m.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-
|
|
135
|
+
const { connectAndGetMachine } = await import('./commands-Dbm3UrJS.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-Dbm3UrJS.mjs');
|
|
165
165
|
const { server, machine } = await connectAndGetMachine();
|
|
166
166
|
try {
|
|
167
167
|
await machine.tunnelStop({ name });
|
|
@@ -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 { x as normalizeAllowedUser, y as loadSecurityContextConfig, z as resolveSecurityContext, A as buildSecurityContextFromFlags, B as mergeSecurityContexts, c as connectToHypha, C as buildSessionShareUrl, D as buildMachineShareUrl } from './run-
|
|
5
|
+
import { x as normalizeAllowedUser, y as loadSecurityContextConfig, z as resolveSecurityContext, A as buildSecurityContextFromFlags, B as mergeSecurityContexts, c as connectToHypha, C as buildSessionShareUrl, D as buildMachineShareUrl } from './run-BV4hWpyA.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { execFileSync } from 'node:child_process';
|
|
2
2
|
import { createServer } from 'node:http';
|
|
3
|
-
import { R as RoutineStore, k as RoutineRunner } from './run-
|
|
3
|
+
import { R as RoutineStore, k as RoutineRunner } from './run-BV4hWpyA.mjs';
|
|
4
4
|
import 'os';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'fs';
|
|
@@ -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-BV4hWpyA.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 { e as getFrpsSubdomainHost, f as getFrpsServerPort, h as getFrpsServerAddr } from './run-
|
|
6
|
+
import { e as getFrpsSubdomainHost, f as getFrpsServerPort, h as getFrpsServerAddr } from './run-BV4hWpyA.mjs';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'url';
|
|
9
9
|
import 'node:fs';
|
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-BV4hWpyA.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "svamp-cli";
|
|
2
|
-
var version = "0.2.
|
|
2
|
+
var version = "0.2.87";
|
|
3
3
|
var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
|
|
4
4
|
var author = "Amun AI AB";
|
|
5
5
|
var license = "SEE LICENSE IN LICENSE";
|
|
@@ -19,7 +19,7 @@ var exports$1 = {
|
|
|
19
19
|
var scripts = {
|
|
20
20
|
build: "rm -rf dist bin/skills && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && tsc --noEmit && pkgroll",
|
|
21
21
|
typecheck: "tsc --noEmit",
|
|
22
|
-
test: "npx tsx test/test-context-window.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-ralph-loop.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-ralph-loop-integration.mjs && npx tsx test/test-ralph-loop-modes.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-routine.mjs && npx tsx test/test-routine-rpc.mjs",
|
|
22
|
+
test: "npx tsx test/test-context-window.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-ralph-loop.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-ralph-loop-integration.mjs && npx tsx test/test-ralph-loop-modes.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-routine.mjs && npx tsx test/test-routine-rpc.mjs && npx tsx test/test-session-file.mjs",
|
|
23
23
|
"test:hypha": "node --no-warnings test/test-hypha-service.mjs",
|
|
24
24
|
dev: "tsx src/cli.ts",
|
|
25
25
|
"dev:daemon": "tsx src/cli.ts daemon start-sync",
|
|
@@ -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, E as generateHookSettings } from './run-
|
|
5
|
+
import { c as connectToHypha, a as registerSessionService, E as generateHookSettings } from './run-BV4hWpyA.mjs';
|
|
6
6
|
import { createServer } from 'node:http';
|
|
7
7
|
import { spawn } from 'node:child_process';
|
|
8
8
|
import { createInterface } from 'node:readline';
|
|
@@ -1393,7 +1393,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
1393
1393
|
const tunnels = handlers.tunnels;
|
|
1394
1394
|
if (!tunnels) throw new Error("Tunnel management not available");
|
|
1395
1395
|
if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
|
|
1396
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
1396
|
+
const { FrpcTunnel } = await import('./frpc-CJJTmC9m.mjs');
|
|
1397
1397
|
const tunnel = new FrpcTunnel({
|
|
1398
1398
|
name: params.name,
|
|
1399
1399
|
ports: params.ports,
|
|
@@ -7512,6 +7512,32 @@ function checkTruncation(format, tail, fileSize, head) {
|
|
|
7512
7512
|
})().catch(() => { /* never block on validator errors */ });
|
|
7513
7513
|
`;
|
|
7514
7514
|
|
|
7515
|
+
const MAX_SESSION_READFILE_BYTES = 10 * 1024 * 1024;
|
|
7516
|
+
async function readSessionFileBase64(resolvedPath) {
|
|
7517
|
+
let st;
|
|
7518
|
+
try {
|
|
7519
|
+
st = await fs.stat(resolvedPath);
|
|
7520
|
+
} catch (err) {
|
|
7521
|
+
if (err?.code === "ENOENT") {
|
|
7522
|
+
return { success: false, code: "ENOENT", error: "File not found", path: resolvedPath };
|
|
7523
|
+
}
|
|
7524
|
+
throw err;
|
|
7525
|
+
}
|
|
7526
|
+
if (st.isDirectory()) {
|
|
7527
|
+
return { success: false, code: "EISDIR", error: "Path is a directory, not a file", path: resolvedPath };
|
|
7528
|
+
}
|
|
7529
|
+
if (!st.isFile()) {
|
|
7530
|
+
return { success: false, code: "ENOTREG", error: "Not a regular file (pipes, devices, and sockets cannot be previewed)", path: resolvedPath };
|
|
7531
|
+
}
|
|
7532
|
+
if (st.size > MAX_SESSION_READFILE_BYTES) {
|
|
7533
|
+
const mb = (st.size / (1024 * 1024)).toFixed(1);
|
|
7534
|
+
const limitMb = (MAX_SESSION_READFILE_BYTES / (1024 * 1024)).toFixed(0);
|
|
7535
|
+
return { success: false, code: "EFBIG", error: `File too large to preview (${mb} MB, limit ${limitMb} MB). Download it instead.`, path: resolvedPath };
|
|
7536
|
+
}
|
|
7537
|
+
const buffer = await fs.readFile(resolvedPath);
|
|
7538
|
+
return buffer.toString("base64");
|
|
7539
|
+
}
|
|
7540
|
+
|
|
7515
7541
|
const __filename$1 = fileURLToPath(import.meta.url);
|
|
7516
7542
|
const __dirname$1 = dirname(__filename$1);
|
|
7517
7543
|
const CLAUDE_SKILLS_DIR = join(os.homedir(), ".claude", "skills");
|
|
@@ -8685,7 +8711,7 @@ async function startDaemon(options) {
|
|
|
8685
8711
|
const list = loadExposedTunnels().filter((t) => t.name !== name);
|
|
8686
8712
|
saveExposedTunnels(list);
|
|
8687
8713
|
}
|
|
8688
|
-
const { ServeManager } = await import('./serveManager-
|
|
8714
|
+
const { ServeManager } = await import('./serveManager-tAOF25rN.mjs');
|
|
8689
8715
|
const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
|
|
8690
8716
|
ensureAutoInstalledSkills(logger).catch(() => {
|
|
8691
8717
|
});
|
|
@@ -10230,15 +10256,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
10230
10256
|
if (sessionMetadata.securityContext && resolvedPath !== resolve(directory) && !resolvedPath.startsWith(resolve(directory) + "/")) {
|
|
10231
10257
|
throw new Error("Path outside working directory");
|
|
10232
10258
|
}
|
|
10233
|
-
|
|
10234
|
-
const buffer = await fs.readFile(resolvedPath);
|
|
10235
|
-
return buffer.toString("base64");
|
|
10236
|
-
} catch (err) {
|
|
10237
|
-
if (err?.code === "ENOENT") {
|
|
10238
|
-
return { success: false, code: "ENOENT", error: "File not found", path: resolvedPath };
|
|
10239
|
-
}
|
|
10240
|
-
throw err;
|
|
10241
|
-
}
|
|
10259
|
+
return await readSessionFileBase64(resolvedPath);
|
|
10242
10260
|
},
|
|
10243
10261
|
onWriteFile: async (path, content) => {
|
|
10244
10262
|
const resolvedPath = resolve(directory, path);
|
|
@@ -10726,15 +10744,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
10726
10744
|
if (sessionMetadata.securityContext && resolvedPath !== resolve(directory) && !resolvedPath.startsWith(resolve(directory) + "/")) {
|
|
10727
10745
|
throw new Error("Path outside working directory");
|
|
10728
10746
|
}
|
|
10729
|
-
|
|
10730
|
-
const buffer = await fs.readFile(resolvedPath);
|
|
10731
|
-
return buffer.toString("base64");
|
|
10732
|
-
} catch (err) {
|
|
10733
|
-
if (err?.code === "ENOENT") {
|
|
10734
|
-
return { success: false, code: "ENOENT", error: "File not found", path: resolvedPath };
|
|
10735
|
-
}
|
|
10736
|
-
throw err;
|
|
10737
|
-
}
|
|
10747
|
+
return await readSessionFileBase64(resolvedPath);
|
|
10738
10748
|
},
|
|
10739
10749
|
onWriteFile: async (path, content) => {
|
|
10740
10750
|
const resolvedPath = resolve(directory, path);
|
|
@@ -11258,7 +11268,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
11258
11268
|
const specs = loadExposedTunnels();
|
|
11259
11269
|
if (specs.length === 0) return;
|
|
11260
11270
|
logger.log(`[exposed-tunnels] Restoring ${specs.length} tunnel(s) from ${EXPOSED_TUNNELS_FILE}`);
|
|
11261
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
11271
|
+
const { FrpcTunnel } = await import('./frpc-CJJTmC9m.mjs');
|
|
11262
11272
|
for (const spec of specs) {
|
|
11263
11273
|
if (tunnels.has(spec.name)) continue;
|
|
11264
11274
|
try {
|
|
@@ -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-Dbm3UrJS.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-Dbm3UrJS.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-Dbm3UrJS.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-Dbm3UrJS.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-Dbm3UrJS.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 { i as getHyphaServerUrl, S as ServeAuth, j as hasCookieToken } from './run-
|
|
7
|
+
import { i as getHyphaServerUrl, S as ServeAuth, j as hasCookieToken } from './run-BV4hWpyA.mjs';
|
|
8
8
|
import 'os';
|
|
9
9
|
import 'fs/promises';
|
|
10
10
|
import 'url';
|
|
@@ -712,7 +712,7 @@ class ServeManager {
|
|
|
712
712
|
const mount = this.mounts.get(mountName);
|
|
713
713
|
const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, `static-${subdomainSafe}-${mount.linkToken}`]]) : void 0;
|
|
714
714
|
try {
|
|
715
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
715
|
+
const { FrpcTunnel } = await import('./frpc-CJJTmC9m.mjs');
|
|
716
716
|
let tunnel;
|
|
717
717
|
tunnel = new FrpcTunnel({
|
|
718
718
|
name: tunnelName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svamp-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.87",
|
|
4
4
|
"description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
|
|
5
5
|
"author": "Amun AI AB",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "rm -rf dist bin/skills && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && tsc --noEmit && pkgroll",
|
|
22
22
|
"typecheck": "tsc --noEmit",
|
|
23
|
-
"test": "npx tsx test/test-context-window.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-ralph-loop.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-ralph-loop-integration.mjs && npx tsx test/test-ralph-loop-modes.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-routine.mjs && npx tsx test/test-routine-rpc.mjs",
|
|
23
|
+
"test": "npx tsx test/test-context-window.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-ralph-loop.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-ralph-loop-integration.mjs && npx tsx test/test-ralph-loop-modes.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-routine.mjs && npx tsx test/test-routine-rpc.mjs && npx tsx test/test-session-file.mjs",
|
|
24
24
|
"test:hypha": "node --no-warnings test/test-hypha-service.mjs",
|
|
25
25
|
"dev": "tsx src/cli.ts",
|
|
26
26
|
"dev:daemon": "tsx src/cli.ts daemon start-sync",
|