svamp-cli 0.2.132 → 0.2.133
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-BDNWncl5.mjs → agentCommands-BEL8eLC9.mjs} +4 -4
- package/dist/{auth-Ksxqxzyv.mjs → auth-Cjg7shbC.mjs} +1 -1
- package/dist/cli.mjs +55 -55
- package/dist/{commands-DBK1fNXa.mjs → commands-BZTPbDDd.mjs} +1 -1
- package/dist/{commands-DPaQqYqB.mjs → commands-B_KrIOzc.mjs} +5 -5
- package/dist/{commands-Bo0Q8YE4.mjs → commands-CieDX3EA.mjs} +2 -2
- package/dist/{commands-CUC1AuUX.mjs → commands-DWuqoFfm.mjs} +1 -1
- package/dist/{commands-DGg-VsO6.mjs → commands-ExvGqPwp.mjs} +2 -2
- package/dist/{commands-CL2_5Y_z.mjs → commands-Ha1wHq8e.mjs} +2 -2
- package/dist/{fleet-C9c2QT6k.mjs → fleet-BqfJ3HeP.mjs} +1 -1
- package/dist/{frpc-DfLwao6Q.mjs → frpc-7_8NlJdO.mjs} +1 -1
- package/dist/{headlessCli-B1P8po51.mjs → headlessCli-DXgFdane.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{package-DnlePUXO.mjs → package-CprybK0W.mjs} +1 -1
- package/dist/{run-DixX_Uxr.mjs → run-BVjsB21-.mjs} +6 -6
- package/dist/{run-B5kZj3yf.mjs → run-BuSf4NE3.mjs} +1 -1
- package/dist/{serveCommands-BCMGIpJh.mjs → serveCommands-BVfsemcs.mjs} +5 -5
- package/dist/{serveManager-B88r8IyD.mjs → serveManager-DoB0n7Pz.mjs} +17 -4
- package/dist/{sideband-DIoU1RsH.mjs → sideband-_zT4hzVK.mjs} +1 -1
- package/package.json +1 -1
|
@@ -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 { m as shortId } from './run-
|
|
5
|
+
import { m as shortId } from './run-BVjsB21-.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-
|
|
99
|
+
const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.Z; });
|
|
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-
|
|
183
|
+
const { connectAndGetMachine } = await import('./commands-DWuqoFfm.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-
|
|
200
|
+
const { resolveSessionId } = await import('./commands-DWuqoFfm.mjs');
|
|
201
201
|
const sessions = await machine.listSessions();
|
|
202
202
|
const match = resolveSessionId(sessions, targetSessionId);
|
|
203
203
|
const fullTargetId = match.sessionId;
|
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-
|
|
1
|
+
import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-BVjsB21-.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-
|
|
37
|
+
const { getLoadedConfig } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a4; });
|
|
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-
|
|
54
|
+
const { restartDaemon } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a6; });
|
|
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-
|
|
347
|
+
const { handleServiceCommand } = await import('./commands-B_KrIOzc.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-
|
|
355
|
+
const { handleServeCommand } = await import('./serveCommands-BVfsemcs.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-
|
|
364
|
+
const { processCommand } = await import('./commands-Ha1wHq8e.mjs');
|
|
365
365
|
let machineId;
|
|
366
366
|
const processArgs = args.slice(1);
|
|
367
367
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -375,14 +375,14 @@ async function main() {
|
|
|
375
375
|
}), machineId);
|
|
376
376
|
process.exit(0);
|
|
377
377
|
} else if (subcommand === "trigger" || subcommand === "triggers" || subcommand === "routine" || subcommand === "routines") {
|
|
378
|
-
const { routineCommand } = await import('./commands-
|
|
378
|
+
const { routineCommand } = await import('./commands-CieDX3EA.mjs');
|
|
379
379
|
await routineCommand(args.slice(1));
|
|
380
380
|
process.exit(0);
|
|
381
381
|
} else if (subcommand === "wise-agent" || subcommand === "wise") {
|
|
382
382
|
await handleWiseAgentCommand(args.slice(1));
|
|
383
383
|
process.exit(0);
|
|
384
384
|
} else if (subcommand === "feature" || subcommand === "crew") {
|
|
385
|
-
const { crewCommand } = await import('./commands-
|
|
385
|
+
const { crewCommand } = await import('./commands-ExvGqPwp.mjs');
|
|
386
386
|
await crewCommand(args.slice(1));
|
|
387
387
|
process.exit(0);
|
|
388
388
|
} else if (subcommand === "--help" || subcommand === "-h") {
|
|
@@ -390,7 +390,7 @@ async function main() {
|
|
|
390
390
|
} else if (!subcommand || subcommand === "start") {
|
|
391
391
|
await handleInteractiveCommand();
|
|
392
392
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
393
|
-
const pkg = await import('./package-
|
|
393
|
+
const pkg = await import('./package-CprybK0W.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
394
394
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
395
395
|
} else {
|
|
396
396
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -399,7 +399,7 @@ async function main() {
|
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
async function handleInteractiveCommand() {
|
|
402
|
-
const { runInteractive } = await import('./run-
|
|
402
|
+
const { runInteractive } = await import('./run-BuSf4NE3.mjs');
|
|
403
403
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
404
404
|
let directory = process.cwd();
|
|
405
405
|
let resumeSessionId;
|
|
@@ -444,7 +444,7 @@ async function handleAgentCommand() {
|
|
|
444
444
|
return;
|
|
445
445
|
}
|
|
446
446
|
if (agentArgs[0] === "list") {
|
|
447
|
-
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-
|
|
447
|
+
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a0; });
|
|
448
448
|
console.log("Known agents:");
|
|
449
449
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
450
450
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -456,7 +456,7 @@ async function handleAgentCommand() {
|
|
|
456
456
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
457
457
|
return;
|
|
458
458
|
}
|
|
459
|
-
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-
|
|
459
|
+
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a0; });
|
|
460
460
|
let cwd = process.cwd();
|
|
461
461
|
const filteredArgs = [];
|
|
462
462
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -480,12 +480,12 @@ async function handleAgentCommand() {
|
|
|
480
480
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
481
481
|
let backend;
|
|
482
482
|
if (KNOWN_MCP_AGENTS[config.agentName]) {
|
|
483
|
-
const { CodexMcpBackend } = await import('./run-
|
|
483
|
+
const { CodexMcpBackend } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a1; });
|
|
484
484
|
backend = new CodexMcpBackend({ cwd, log: logFn });
|
|
485
485
|
} else {
|
|
486
|
-
const { AcpBackend } = await import('./run-
|
|
487
|
-
const { GeminiTransport } = await import('./run-
|
|
488
|
-
const { DefaultTransport } = await import('./run-
|
|
486
|
+
const { AcpBackend } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.$; });
|
|
487
|
+
const { GeminiTransport } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a2; });
|
|
488
|
+
const { DefaultTransport } = await import('./run-BVjsB21-.mjs').then(function (n) { return n._; });
|
|
489
489
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
490
490
|
backend = new AcpBackend({
|
|
491
491
|
agentName: config.agentName,
|
|
@@ -612,7 +612,7 @@ async function handleSessionCommand() {
|
|
|
612
612
|
process.exit(1);
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
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-
|
|
615
|
+
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-DWuqoFfm.mjs');
|
|
616
616
|
const parseFlagStr = (flag, shortFlag) => {
|
|
617
617
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
618
618
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -680,7 +680,7 @@ async function handleSessionCommand() {
|
|
|
680
680
|
allowDomain.push(sessionArgs[++i]);
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
const { parseShareArg } = await import('./commands-
|
|
683
|
+
const { parseShareArg } = await import('./commands-DWuqoFfm.mjs');
|
|
684
684
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
685
685
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
686
686
|
message,
|
|
@@ -765,7 +765,7 @@ async function handleSessionCommand() {
|
|
|
765
765
|
console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
|
|
766
766
|
process.exit(1);
|
|
767
767
|
}
|
|
768
|
-
const { sessionEditMessage } = await import('./commands-
|
|
768
|
+
const { sessionEditMessage } = await import('./commands-DWuqoFfm.mjs');
|
|
769
769
|
await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
770
770
|
} else if (sessionSubcommand === "refine") {
|
|
771
771
|
if (!sessionArgs[1] || !sessionArgs[2]) {
|
|
@@ -773,7 +773,7 @@ async function handleSessionCommand() {
|
|
|
773
773
|
console.error(" Asks the agent to revise its latest reply in place (no extra round).");
|
|
774
774
|
process.exit(1);
|
|
775
775
|
}
|
|
776
|
-
const { sessionRefineLastReply } = await import('./commands-
|
|
776
|
+
const { sessionRefineLastReply } = await import('./commands-DWuqoFfm.mjs');
|
|
777
777
|
await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
|
|
778
778
|
} else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
|
|
779
779
|
if (!sessionArgs[1]) {
|
|
@@ -781,7 +781,7 @@ async function handleSessionCommand() {
|
|
|
781
781
|
console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
|
|
782
782
|
process.exit(1);
|
|
783
783
|
}
|
|
784
|
-
const { sessionUndoEdit } = await import('./commands-
|
|
784
|
+
const { sessionUndoEdit } = await import('./commands-DWuqoFfm.mjs');
|
|
785
785
|
await sessionUndoEdit(sessionArgs[1], targetMachineId);
|
|
786
786
|
} else if (sessionSubcommand === "query") {
|
|
787
787
|
const dir = sessionArgs[1];
|
|
@@ -791,7 +791,7 @@ async function handleSessionCommand() {
|
|
|
791
791
|
console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
|
|
792
792
|
process.exit(1);
|
|
793
793
|
}
|
|
794
|
-
const { sessionQuery } = await import('./commands-
|
|
794
|
+
const { sessionQuery } = await import('./commands-DWuqoFfm.mjs');
|
|
795
795
|
await sessionQuery(dir, prompt, targetMachineId, {
|
|
796
796
|
timeout: parseFlagInt("--timeout"),
|
|
797
797
|
json: hasFlag("--json"),
|
|
@@ -824,7 +824,7 @@ async function handleSessionCommand() {
|
|
|
824
824
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
825
825
|
process.exit(1);
|
|
826
826
|
}
|
|
827
|
-
const { sessionApprove } = await import('./commands-
|
|
827
|
+
const { sessionApprove } = await import('./commands-DWuqoFfm.mjs');
|
|
828
828
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
829
829
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
830
830
|
json: hasFlag("--json")
|
|
@@ -834,7 +834,7 @@ async function handleSessionCommand() {
|
|
|
834
834
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
835
835
|
process.exit(1);
|
|
836
836
|
}
|
|
837
|
-
const { sessionDeny } = await import('./commands-
|
|
837
|
+
const { sessionDeny } = await import('./commands-DWuqoFfm.mjs');
|
|
838
838
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
839
839
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
840
840
|
json: hasFlag("--json")
|
|
@@ -876,7 +876,7 @@ async function handleSessionCommand() {
|
|
|
876
876
|
console.error("Usage: svamp session set-title <title>");
|
|
877
877
|
process.exit(1);
|
|
878
878
|
}
|
|
879
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
879
|
+
const { sessionSetTitle } = await import('./agentCommands-BEL8eLC9.mjs');
|
|
880
880
|
await sessionSetTitle(title);
|
|
881
881
|
} else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
|
|
882
882
|
const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
@@ -884,7 +884,7 @@ async function handleSessionCommand() {
|
|
|
884
884
|
console.error("Usage: svamp session set-project-description <text>");
|
|
885
885
|
process.exit(1);
|
|
886
886
|
}
|
|
887
|
-
const { sessionSetProjectDescription } = await import('./agentCommands-
|
|
887
|
+
const { sessionSetProjectDescription } = await import('./agentCommands-BEL8eLC9.mjs');
|
|
888
888
|
await sessionSetProjectDescription(desc);
|
|
889
889
|
} else if (sessionSubcommand === "set-link") {
|
|
890
890
|
const url = sessionArgs[1];
|
|
@@ -893,7 +893,7 @@ async function handleSessionCommand() {
|
|
|
893
893
|
process.exit(1);
|
|
894
894
|
}
|
|
895
895
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
896
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
896
|
+
const { sessionSetLink } = await import('./agentCommands-BEL8eLC9.mjs');
|
|
897
897
|
await sessionSetLink(url, label);
|
|
898
898
|
} else if (sessionSubcommand === "notify") {
|
|
899
899
|
const message = sessionArgs[1];
|
|
@@ -902,7 +902,7 @@ async function handleSessionCommand() {
|
|
|
902
902
|
process.exit(1);
|
|
903
903
|
}
|
|
904
904
|
const level = parseFlagStr("--level") || "info";
|
|
905
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
905
|
+
const { sessionNotify } = await import('./agentCommands-BEL8eLC9.mjs');
|
|
906
906
|
await sessionNotify(message, level);
|
|
907
907
|
} else if (sessionSubcommand === "broadcast") {
|
|
908
908
|
const action = sessionArgs[1];
|
|
@@ -910,7 +910,7 @@ async function handleSessionCommand() {
|
|
|
910
910
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
911
911
|
process.exit(1);
|
|
912
912
|
}
|
|
913
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
913
|
+
const { sessionBroadcast } = await import('./agentCommands-BEL8eLC9.mjs');
|
|
914
914
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
915
915
|
} else if (sessionSubcommand === "inbox") {
|
|
916
916
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -921,7 +921,7 @@ async function handleSessionCommand() {
|
|
|
921
921
|
process.exit(1);
|
|
922
922
|
}
|
|
923
923
|
if (agentSessionId) {
|
|
924
|
-
const { inboxSend } = await import('./agentCommands-
|
|
924
|
+
const { inboxSend } = await import('./agentCommands-BEL8eLC9.mjs');
|
|
925
925
|
await inboxSend(sessionArgs[2], {
|
|
926
926
|
body: sessionArgs[3],
|
|
927
927
|
subject: parseFlagStr("--subject"),
|
|
@@ -936,7 +936,7 @@ async function handleSessionCommand() {
|
|
|
936
936
|
}
|
|
937
937
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
938
938
|
if (agentSessionId && !sessionArgs[2]) {
|
|
939
|
-
const { inboxList } = await import('./agentCommands-
|
|
939
|
+
const { inboxList } = await import('./agentCommands-BEL8eLC9.mjs');
|
|
940
940
|
await inboxList({
|
|
941
941
|
unread: hasFlag("--unread"),
|
|
942
942
|
limit: parseFlagInt("--limit"),
|
|
@@ -958,7 +958,7 @@ async function handleSessionCommand() {
|
|
|
958
958
|
process.exit(1);
|
|
959
959
|
}
|
|
960
960
|
if (agentSessionId && !sessionArgs[3]) {
|
|
961
|
-
const { inboxList } = await import('./agentCommands-
|
|
961
|
+
const { inboxList } = await import('./agentCommands-BEL8eLC9.mjs');
|
|
962
962
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
963
963
|
} else if (sessionArgs[3]) {
|
|
964
964
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -968,7 +968,7 @@ async function handleSessionCommand() {
|
|
|
968
968
|
}
|
|
969
969
|
} else if (inboxSubcmd === "reply") {
|
|
970
970
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
971
|
-
const { inboxReply } = await import('./agentCommands-
|
|
971
|
+
const { inboxReply } = await import('./agentCommands-BEL8eLC9.mjs');
|
|
972
972
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
973
973
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
974
974
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -1004,7 +1004,7 @@ async function handleMachineCommand() {
|
|
|
1004
1004
|
return;
|
|
1005
1005
|
}
|
|
1006
1006
|
if (machineSubcommand === "share") {
|
|
1007
|
-
const { machineShare } = await import('./commands-
|
|
1007
|
+
const { machineShare } = await import('./commands-DWuqoFfm.mjs');
|
|
1008
1008
|
let machineId;
|
|
1009
1009
|
const shareArgs = [];
|
|
1010
1010
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -1055,14 +1055,14 @@ async function handleMachineCommand() {
|
|
|
1055
1055
|
process.exit(1);
|
|
1056
1056
|
}
|
|
1057
1057
|
if (all) {
|
|
1058
|
-
const { fleetExec } = await import('./fleet-
|
|
1058
|
+
const { fleetExec } = await import('./fleet-BqfJ3HeP.mjs');
|
|
1059
1059
|
await fleetExec(command, { cwd });
|
|
1060
1060
|
} else {
|
|
1061
|
-
const { machineExec } = await import('./commands-
|
|
1061
|
+
const { machineExec } = await import('./commands-DWuqoFfm.mjs');
|
|
1062
1062
|
await machineExec(machineId, command, cwd);
|
|
1063
1063
|
}
|
|
1064
1064
|
} else if (machineSubcommand === "info") {
|
|
1065
|
-
const { machineInfo } = await import('./commands-
|
|
1065
|
+
const { machineInfo } = await import('./commands-DWuqoFfm.mjs');
|
|
1066
1066
|
let machineId;
|
|
1067
1067
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
1068
1068
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -1082,10 +1082,10 @@ async function handleMachineCommand() {
|
|
|
1082
1082
|
level = machineArgs[++i];
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
|
-
const { machineNotify } = await import('./agentCommands-
|
|
1085
|
+
const { machineNotify } = await import('./agentCommands-BEL8eLC9.mjs');
|
|
1086
1086
|
await machineNotify(message, level);
|
|
1087
1087
|
} else if (machineSubcommand === "ls") {
|
|
1088
|
-
const { machineLs } = await import('./commands-
|
|
1088
|
+
const { machineLs } = await import('./commands-DWuqoFfm.mjs');
|
|
1089
1089
|
let machineId;
|
|
1090
1090
|
let showHidden = false;
|
|
1091
1091
|
let path;
|
|
@@ -1141,20 +1141,20 @@ Examples:
|
|
|
1141
1141
|
};
|
|
1142
1142
|
const hasFlag = (name) => fleetArgs.includes(`--${name}`);
|
|
1143
1143
|
if (sub === "status") {
|
|
1144
|
-
const { fleetStatus } = await import('./fleet-
|
|
1144
|
+
const { fleetStatus } = await import('./fleet-BqfJ3HeP.mjs');
|
|
1145
1145
|
await fleetStatus();
|
|
1146
1146
|
} else if (sub === "upgrade-claude") {
|
|
1147
|
-
const { fleetUpgradeClaude } = await import('./fleet-
|
|
1147
|
+
const { fleetUpgradeClaude } = await import('./fleet-BqfJ3HeP.mjs');
|
|
1148
1148
|
await fleetUpgradeClaude({ version: flag("version", "-v") });
|
|
1149
1149
|
} else if (sub === "upgrade-svamp") {
|
|
1150
|
-
const { fleetUpgradeSvamp } = await import('./fleet-
|
|
1150
|
+
const { fleetUpgradeSvamp } = await import('./fleet-BqfJ3HeP.mjs');
|
|
1151
1151
|
await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
|
|
1152
1152
|
} else if (sub === "daemon-restart") {
|
|
1153
|
-
const { fleetDaemonRestart } = await import('./fleet-
|
|
1153
|
+
const { fleetDaemonRestart } = await import('./fleet-BqfJ3HeP.mjs');
|
|
1154
1154
|
await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
|
|
1155
1155
|
} else if (sub === "push-skill") {
|
|
1156
1156
|
const name = fleetArgs[1];
|
|
1157
|
-
const { fleetPushSkill } = await import('./fleet-
|
|
1157
|
+
const { fleetPushSkill } = await import('./fleet-BqfJ3HeP.mjs');
|
|
1158
1158
|
await fleetPushSkill(name);
|
|
1159
1159
|
} else {
|
|
1160
1160
|
console.error(`Unknown fleet subcommand: ${sub}`);
|
|
@@ -1170,7 +1170,7 @@ async function handleSkillsCommand() {
|
|
|
1170
1170
|
await printSkillsHelp();
|
|
1171
1171
|
return;
|
|
1172
1172
|
}
|
|
1173
|
-
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-
|
|
1173
|
+
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-BZTPbDDd.mjs');
|
|
1174
1174
|
if (skillsSubcommand === "find" || skillsSubcommand === "search") {
|
|
1175
1175
|
const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1176
1176
|
if (!query) {
|
|
@@ -1217,7 +1217,7 @@ async function loginToHypha() {
|
|
|
1217
1217
|
process.exit(1);
|
|
1218
1218
|
}
|
|
1219
1219
|
const anchor = anchorArg.replace(/\/+$/, "");
|
|
1220
|
-
const { loadInstanceConfig } = await import('./run-
|
|
1220
|
+
const { loadInstanceConfig } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a4; });
|
|
1221
1221
|
let cfg = null;
|
|
1222
1222
|
try {
|
|
1223
1223
|
cfg = await loadInstanceConfig({ anchor, force: true });
|
|
@@ -1328,7 +1328,7 @@ async function logoutFromHypha() {
|
|
|
1328
1328
|
} catch {
|
|
1329
1329
|
}
|
|
1330
1330
|
try {
|
|
1331
|
-
const { clearInstanceConfigCache } = await import('./run-
|
|
1331
|
+
const { clearInstanceConfigCache } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a4; });
|
|
1332
1332
|
clearInstanceConfigCache();
|
|
1333
1333
|
} catch {
|
|
1334
1334
|
}
|
|
@@ -1666,7 +1666,7 @@ async function applyClaudeAuthFlags(argv) {
|
|
|
1666
1666
|
"--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
|
|
1667
1667
|
);
|
|
1668
1668
|
}
|
|
1669
|
-
const mod = await import('./run-
|
|
1669
|
+
const mod = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a3; });
|
|
1670
1670
|
if (hasHypha) {
|
|
1671
1671
|
let url;
|
|
1672
1672
|
const hyphaIdx = argv.indexOf("--use-hypha-proxy");
|
|
@@ -1720,7 +1720,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1720
1720
|
}
|
|
1721
1721
|
}
|
|
1722
1722
|
if (collected.length === 0) return;
|
|
1723
|
-
const { updateEnvFile } = await import('./run-
|
|
1723
|
+
const { updateEnvFile } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a3; });
|
|
1724
1724
|
const seen = /* @__PURE__ */ new Set();
|
|
1725
1725
|
const deduped = collected.filter((e) => {
|
|
1726
1726
|
const k = e.toLowerCase();
|
|
@@ -1753,7 +1753,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1753
1753
|
}
|
|
1754
1754
|
});
|
|
1755
1755
|
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(" ");
|
|
1756
|
-
const { wiseAskCli } = await import('./commands-
|
|
1756
|
+
const { wiseAskCli } = await import('./commands-DWuqoFfm.mjs');
|
|
1757
1757
|
await wiseAskCli(machineId, message, sessionId, { json });
|
|
1758
1758
|
return;
|
|
1759
1759
|
}
|
|
@@ -1765,7 +1765,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
return void 0;
|
|
1767
1767
|
};
|
|
1768
|
-
const { runWiseVoiceCli } = await import('./headlessCli-
|
|
1768
|
+
const { runWiseVoiceCli } = await import('./headlessCli-DXgFdane.mjs');
|
|
1769
1769
|
await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
|
|
1770
1770
|
return;
|
|
1771
1771
|
}
|
|
@@ -1807,7 +1807,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1807
1807
|
return;
|
|
1808
1808
|
}
|
|
1809
1809
|
const authArgs = rest.slice(1);
|
|
1810
|
-
const mod = await import('./auth-
|
|
1810
|
+
const mod = await import('./auth-Cjg7shbC.mjs');
|
|
1811
1811
|
let action;
|
|
1812
1812
|
try {
|
|
1813
1813
|
action = mod.parseWiseAgentAuthArgs(authArgs);
|
|
@@ -1817,7 +1817,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1817
1817
|
return;
|
|
1818
1818
|
}
|
|
1819
1819
|
if (action) {
|
|
1820
|
-
const { updateEnvFile } = await import('./run-
|
|
1820
|
+
const { updateEnvFile } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a3; });
|
|
1821
1821
|
const updates = mod.buildWiseAgentEnvUpdates(action);
|
|
1822
1822
|
updateEnvFile(updates);
|
|
1823
1823
|
for (const [k, v] of Object.entries(updates)) {
|
|
@@ -1831,7 +1831,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1831
1831
|
}
|
|
1832
1832
|
async function handleDaemonAuthCommand(argv) {
|
|
1833
1833
|
const sub = (argv[0] || "status").toLowerCase();
|
|
1834
|
-
const mod = await import('./run-
|
|
1834
|
+
const mod = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a3; });
|
|
1835
1835
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
1836
1836
|
console.log(`
|
|
1837
1837
|
svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
|
|
@@ -2144,7 +2144,7 @@ Examples:
|
|
|
2144
2144
|
async function printSkillsHelp() {
|
|
2145
2145
|
let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
|
|
2146
2146
|
try {
|
|
2147
|
-
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-
|
|
2147
|
+
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-BVjsB21-.mjs').then(function (n) { return n.a5; });
|
|
2148
2148
|
browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
|
|
2149
2149
|
} catch {
|
|
2150
2150
|
}
|
|
@@ -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, n as getSkillsServer, o as getSkillsWorkspaceName, q as getSkillsCollectionName, t as fetchWithTimeout, u as searchSkills, v as SKILLS_DIR, w as getSkillInfo, x as downloadSkillFile, y as listSkillFiles } from './run-
|
|
4
|
+
import { p as parseFrontmatter, n as getSkillsServer, o as getSkillsWorkspaceName, q as getSkillsCollectionName, t as fetchWithTimeout, u as searchSkills, v as SKILLS_DIR, w as getSkillInfo, x as downloadSkillFile, y as listSkillFiles } from './run-BVjsB21-.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-7_8NlJdO.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-DWuqoFfm.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-7_8NlJdO.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-DWuqoFfm.mjs');
|
|
136
136
|
const { server, machine } = await connectAndGetMachine();
|
|
137
137
|
try {
|
|
138
138
|
const tunnels = await machine.tunnelList({});
|
|
@@ -172,7 +172,7 @@ async function serviceDelete(args) {
|
|
|
172
172
|
process.exit(1);
|
|
173
173
|
}
|
|
174
174
|
try {
|
|
175
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
175
|
+
const { connectAndGetMachine } = await import('./commands-DWuqoFfm.mjs');
|
|
176
176
|
const { server, machine } = await connectAndGetMachine();
|
|
177
177
|
try {
|
|
178
178
|
await machine.tunnelStop({ name });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { execSync, execFileSync } from 'node:child_process';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import { createServer } from 'node:http';
|
|
4
|
-
import { E as readChecklist, F as compileChecklist, G as RoutineStore, H as RoutineRunner } from './run-
|
|
4
|
+
import { E as readChecklist, F as compileChecklist, G as RoutineStore, H as RoutineRunner } from './run-BVjsB21-.mjs';
|
|
5
5
|
import 'os';
|
|
6
6
|
import 'fs/promises';
|
|
7
7
|
import 'fs';
|
|
@@ -104,7 +104,7 @@ Criteria: ${res.criteria || "(none)"}
|
|
|
104
104
|
urgency: "normal",
|
|
105
105
|
hopCount: 1
|
|
106
106
|
};
|
|
107
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
107
|
+
const { connectAndGetMachine } = await import('./commands-DWuqoFfm.mjs');
|
|
108
108
|
const { server, machine } = await connectAndGetMachine();
|
|
109
109
|
try {
|
|
110
110
|
await machine.sessionRPC(reportTo, "sendInboxMessage", { message });
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
2
2
|
import { execSync } from 'node:child_process';
|
|
3
3
|
import { basename, resolve, join, isAbsolute } from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import { I as formatHandle, J as normalizeAllowedUser, K as loadSecurityContextConfig, L as resolveSecurityContext, M as buildSecurityContextFromFlags, N as mergeSecurityContexts, c as connectToHypha, O as buildSessionShareUrl, P as computeOutboundHop, m as shortId, Q as buildMachineShareUrl, T as parseHandle, U as handleMatchesMetadata } from './run-
|
|
5
|
+
import { I as formatHandle, J as normalizeAllowedUser, K as loadSecurityContextConfig, L as resolveSecurityContext, M as buildSecurityContextFromFlags, N as mergeSecurityContexts, c as connectToHypha, O as buildSessionShareUrl, P as computeOutboundHop, m as shortId, Q as buildMachineShareUrl, T as parseHandle, U as handleMatchesMetadata } from './run-BVjsB21-.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
|
-
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-
|
|
2
|
+
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-DWuqoFfm.mjs';
|
|
3
3
|
import { execSync } from 'node:child_process';
|
|
4
|
-
import { m as shortId } from './run-
|
|
4
|
+
import { m as shortId } from './run-BVjsB21-.mjs';
|
|
5
5
|
import 'node:path';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'os';
|
|
@@ -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-DWuqoFfm.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-BVjsB21-.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -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-BVjsB21-.mjs';
|
|
5
5
|
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-HydRNEt7.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
@@ -4,7 +4,7 @@ import { mkdirSync, writeFileSync, unlinkSync, existsSync, chmodSync, readFileSy
|
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
import { homedir, platform, arch } from 'os';
|
|
6
6
|
import { randomUUID, createHash } from 'crypto';
|
|
7
|
-
import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-
|
|
7
|
+
import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-BVjsB21-.mjs';
|
|
8
8
|
import 'fs/promises';
|
|
9
9
|
import 'url';
|
|
10
10
|
import 'node:crypto';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as resolveModel, V as describeMisconfiguration, W as buildMachineDeps } from './run-
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { D as resolveModel, V as describeMisconfiguration, W as buildMachineDeps } from './run-BVjsB21-.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-_zT4hzVK.mjs';
|
|
3
3
|
import { WebSocket } from 'ws';
|
|
4
4
|
import { execSync, spawn } from 'child_process';
|
|
5
5
|
import 'os';
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-
|
|
1
|
+
export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-BVjsB21-.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -2677,7 +2677,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
2677
2677
|
const tunnels = handlers.tunnels;
|
|
2678
2678
|
if (!tunnels) throw new Error("Tunnel management not available");
|
|
2679
2679
|
if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
|
|
2680
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
2680
|
+
const { FrpcTunnel } = await import('./frpc-7_8NlJdO.mjs');
|
|
2681
2681
|
const tunnel = new FrpcTunnel({
|
|
2682
2682
|
name: params.name,
|
|
2683
2683
|
ports: params.ports,
|
|
@@ -2975,7 +2975,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
2975
2975
|
}
|
|
2976
2976
|
const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
|
|
2977
2977
|
const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
|
|
2978
|
-
const { toolsForRole } = await import('./sideband-
|
|
2978
|
+
const { toolsForRole } = await import('./sideband-_zT4hzVK.mjs');
|
|
2979
2979
|
const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
|
|
2980
2980
|
return fmt(r2);
|
|
2981
2981
|
}
|
|
@@ -3074,7 +3074,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
3074
3074
|
if (r.error || !r.sender) return { error: r.error || "unauthorized" };
|
|
3075
3075
|
const callId = "call_" + Math.random().toString(16).slice(2, 12);
|
|
3076
3076
|
const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
|
|
3077
|
-
const { queryCore } = await import('./commands-
|
|
3077
|
+
const { queryCore } = await import('./commands-DWuqoFfm.mjs');
|
|
3078
3078
|
const timeout = c.reply?.timeout_sec || 120;
|
|
3079
3079
|
let result;
|
|
3080
3080
|
try {
|
|
@@ -11416,7 +11416,7 @@ async function startDaemon(options) {
|
|
|
11416
11416
|
saveExposedTunnels(list);
|
|
11417
11417
|
}
|
|
11418
11418
|
async function createExposedTunnel(spec) {
|
|
11419
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
11419
|
+
const { FrpcTunnel } = await import('./frpc-7_8NlJdO.mjs');
|
|
11420
11420
|
const tunnel = new FrpcTunnel({
|
|
11421
11421
|
name: spec.name,
|
|
11422
11422
|
ports: spec.ports,
|
|
@@ -11436,7 +11436,7 @@ async function startDaemon(options) {
|
|
|
11436
11436
|
return tunnel;
|
|
11437
11437
|
}
|
|
11438
11438
|
const tunnelRecreateState = /* @__PURE__ */ new Map();
|
|
11439
|
-
const { ServeManager } = await import('./serveManager-
|
|
11439
|
+
const { ServeManager } = await import('./serveManager-DoB0n7Pz.mjs');
|
|
11440
11440
|
const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
|
|
11441
11441
|
ensureAutoInstalledSkills(logger).catch(() => {
|
|
11442
11442
|
});
|
|
@@ -14276,7 +14276,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
14276
14276
|
};
|
|
14277
14277
|
writeDaemonStateFile(localState);
|
|
14278
14278
|
logger.log("Daemon state file written \u2014 daemon is up; restoring mounts/sessions in background");
|
|
14279
|
-
|
|
14279
|
+
serveManager.restore().catch((err) => logger.error(`[serve] mount restore failed: ${err?.message || err}`));
|
|
14280
14280
|
const persistedSessions = loadPersistedSessions();
|
|
14281
14281
|
try {
|
|
14282
14282
|
const knownIds = new Set(persistedSessions.map((s) => s.sessionId).concat(Object.keys(loadSessionIndex())));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { X as generateFriendlyName, m as shortId, c as connectToHypha, a as createSessionStore, r as registerMachineService, Y as generateHookSettings } from './run-
|
|
1
|
+
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { X as generateFriendlyName, m as shortId, c as connectToHypha, a as createSessionStore, r as registerMachineService, Y as generateHookSettings } from './run-BVjsB21-.mjs';
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import { resolve, join } from 'node:path';
|
|
4
4
|
import { existsSync, readFileSync, watch } from 'node:fs';
|
|
@@ -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-DWuqoFfm.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-DWuqoFfm.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-DWuqoFfm.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-DWuqoFfm.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-DWuqoFfm.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 { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run-
|
|
7
|
+
import { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run-BVjsB21-.mjs';
|
|
8
8
|
import 'os';
|
|
9
9
|
import 'fs/promises';
|
|
10
10
|
import 'url';
|
|
@@ -259,7 +259,9 @@ class ServeManager {
|
|
|
259
259
|
if (restoredCount > 0) {
|
|
260
260
|
this.log(`Restoring ${restoredCount} mount(s)...`);
|
|
261
261
|
await this.ensureRunning();
|
|
262
|
-
|
|
262
|
+
const mountList = Array.from(this.mounts.values());
|
|
263
|
+
const mountConcurrency = Math.max(1, parseInt(process.env.SVAMP_RESTORE_CONCURRENCY || "8", 10) || 8);
|
|
264
|
+
const restoreOneMount = async (m) => {
|
|
263
265
|
try {
|
|
264
266
|
await this.startMountTunnel(m.name);
|
|
265
267
|
} catch (err) {
|
|
@@ -272,7 +274,18 @@ class ServeManager {
|
|
|
272
274
|
this.log(`Restored managed process '${m.name}' failed to start: ${err.message}`);
|
|
273
275
|
}
|
|
274
276
|
}
|
|
275
|
-
}
|
|
277
|
+
};
|
|
278
|
+
let mountCursor = 0;
|
|
279
|
+
const mountWorker = async () => {
|
|
280
|
+
while (mountCursor < mountList.length) {
|
|
281
|
+
await restoreOneMount(mountList[mountCursor++]);
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
const mt0 = Date.now();
|
|
285
|
+
await Promise.all(
|
|
286
|
+
Array.from({ length: Math.min(mountConcurrency, mountList.length) }, () => mountWorker())
|
|
287
|
+
);
|
|
288
|
+
this.log(`Restored ${mountList.length} mount(s) in ${Date.now() - mt0}ms (concurrency ${mountConcurrency})`);
|
|
276
289
|
this.ensureIdleTimer();
|
|
277
290
|
this.persist();
|
|
278
291
|
}
|
|
@@ -713,7 +726,7 @@ class ServeManager {
|
|
|
713
726
|
const mount = this.mounts.get(mountName);
|
|
714
727
|
const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, `static-${subdomainSafe}-${mount.linkToken}`]]) : void 0;
|
|
715
728
|
try {
|
|
716
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
729
|
+
const { FrpcTunnel } = await import('./frpc-7_8NlJdO.mjs');
|
|
717
730
|
let tunnel;
|
|
718
731
|
tunnel = new FrpcTunnel({
|
|
719
732
|
name: tunnelName,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as READ_ONLY_TOOLS, z as loadMachineContext, A as buildMachineInstructions, B as machineToolsForRole, C as buildMachineTools } from './run-
|
|
1
|
+
import { R as READ_ONLY_TOOLS, z as loadMachineContext, A as buildMachineInstructions, B as machineToolsForRole, C as buildMachineTools } from './run-BVjsB21-.mjs';
|
|
2
2
|
import 'node:child_process';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|