svamp-cli 0.2.53 → 0.2.54
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-CmaybHHk.mjs → agentCommands-D-6ATrHo.mjs} +2 -2
- package/dist/cli.mjs +33 -33
- package/dist/{commands-CY_yS6CZ.mjs → commands-BNIVLFgV.mjs} +1 -1
- package/dist/{commands-BXNmL7Vw.mjs → commands-BhHHe1su.mjs} +2 -2
- package/dist/{commands-ErfU1raO.mjs → commands-DoffX-4R.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{package-CdGJdYjj.mjs → package-DcBY_0uu.mjs} +1 -1
- package/dist/{run-CPIINXWC.mjs → run-BYFtZS9Q.mjs} +27 -3
- package/dist/{run-D2qdA8Hw.mjs → run-DoGWxVuz.mjs} +1 -1
- package/dist/{serveCommands-ThiCkJKF.mjs → serveCommands-BDK1krQl.mjs} +5 -5
- package/dist/{serveManager-Blsg_Pa9.mjs → serveManager-B37Bn3Bt.mjs} +1 -1
- package/package.json +1 -1
|
@@ -148,7 +148,7 @@ async function sessionBroadcast(action, args) {
|
|
|
148
148
|
console.log(`Broadcast sent: ${action}`);
|
|
149
149
|
}
|
|
150
150
|
async function connectToMachineService() {
|
|
151
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
151
|
+
const { connectAndGetMachine } = await import('./commands-BNIVLFgV.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-BNIVLFgV.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-BYFtZS9Q.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -43,7 +43,7 @@ async function main() {
|
|
|
43
43
|
console.error(`svamp daemon restart: ${err.message || err}`);
|
|
44
44
|
process.exit(1);
|
|
45
45
|
}
|
|
46
|
-
const { restartDaemon } = await import('./run-
|
|
46
|
+
const { restartDaemon } = await import('./run-BYFtZS9Q.mjs').then(function (n) { return n.u; });
|
|
47
47
|
await restartDaemon();
|
|
48
48
|
process.exit(0);
|
|
49
49
|
}
|
|
@@ -279,7 +279,7 @@ async function main() {
|
|
|
279
279
|
console.error("svamp service: Service commands are not available in sandboxed sessions.");
|
|
280
280
|
process.exit(1);
|
|
281
281
|
}
|
|
282
|
-
const { handleServiceCommand } = await import('./commands-
|
|
282
|
+
const { handleServiceCommand } = await import('./commands-DoffX-4R.mjs');
|
|
283
283
|
await handleServiceCommand();
|
|
284
284
|
} else if (subcommand === "serve") {
|
|
285
285
|
const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
|
|
@@ -287,7 +287,7 @@ async function main() {
|
|
|
287
287
|
console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
|
|
288
288
|
process.exit(1);
|
|
289
289
|
}
|
|
290
|
-
const { handleServeCommand } = await import('./serveCommands-
|
|
290
|
+
const { handleServeCommand } = await import('./serveCommands-BDK1krQl.mjs');
|
|
291
291
|
await handleServeCommand();
|
|
292
292
|
process.exit(0);
|
|
293
293
|
} else if (subcommand === "process" || subcommand === "proc") {
|
|
@@ -296,7 +296,7 @@ async function main() {
|
|
|
296
296
|
console.error("svamp process: Process commands are not available in sandboxed sessions.");
|
|
297
297
|
process.exit(1);
|
|
298
298
|
}
|
|
299
|
-
const { processCommand } = await import('./commands-
|
|
299
|
+
const { processCommand } = await import('./commands-BhHHe1su.mjs');
|
|
300
300
|
let machineId;
|
|
301
301
|
const processArgs = args.slice(1);
|
|
302
302
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -314,7 +314,7 @@ async function main() {
|
|
|
314
314
|
} else if (!subcommand || subcommand === "start") {
|
|
315
315
|
await handleInteractiveCommand();
|
|
316
316
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
317
|
-
const pkg = await import('./package-
|
|
317
|
+
const pkg = await import('./package-DcBY_0uu.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
318
318
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
319
319
|
} else {
|
|
320
320
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -323,7 +323,7 @@ async function main() {
|
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
async function handleInteractiveCommand() {
|
|
326
|
-
const { runInteractive } = await import('./run-
|
|
326
|
+
const { runInteractive } = await import('./run-DoGWxVuz.mjs');
|
|
327
327
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
328
328
|
let directory = process.cwd();
|
|
329
329
|
let resumeSessionId;
|
|
@@ -368,7 +368,7 @@ async function handleAgentCommand() {
|
|
|
368
368
|
return;
|
|
369
369
|
}
|
|
370
370
|
if (agentArgs[0] === "list") {
|
|
371
|
-
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-
|
|
371
|
+
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-BYFtZS9Q.mjs').then(function (n) { return n.p; });
|
|
372
372
|
console.log("Known agents:");
|
|
373
373
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
374
374
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -380,7 +380,7 @@ async function handleAgentCommand() {
|
|
|
380
380
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
381
381
|
return;
|
|
382
382
|
}
|
|
383
|
-
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-
|
|
383
|
+
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-BYFtZS9Q.mjs').then(function (n) { return n.p; });
|
|
384
384
|
let cwd = process.cwd();
|
|
385
385
|
const filteredArgs = [];
|
|
386
386
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -404,12 +404,12 @@ async function handleAgentCommand() {
|
|
|
404
404
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
405
405
|
let backend;
|
|
406
406
|
if (KNOWN_MCP_AGENTS[config.agentName]) {
|
|
407
|
-
const { CodexMcpBackend } = await import('./run-
|
|
407
|
+
const { CodexMcpBackend } = await import('./run-BYFtZS9Q.mjs').then(function (n) { return n.q; });
|
|
408
408
|
backend = new CodexMcpBackend({ cwd, log: logFn });
|
|
409
409
|
} else {
|
|
410
|
-
const { AcpBackend } = await import('./run-
|
|
411
|
-
const { GeminiTransport } = await import('./run-
|
|
412
|
-
const { DefaultTransport } = await import('./run-
|
|
410
|
+
const { AcpBackend } = await import('./run-BYFtZS9Q.mjs').then(function (n) { return n.o; });
|
|
411
|
+
const { GeminiTransport } = await import('./run-BYFtZS9Q.mjs').then(function (n) { return n.G; });
|
|
412
|
+
const { DefaultTransport } = await import('./run-BYFtZS9Q.mjs').then(function (n) { return n.D; });
|
|
413
413
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
414
414
|
backend = new AcpBackend({
|
|
415
415
|
agentName: config.agentName,
|
|
@@ -536,7 +536,7 @@ async function handleSessionCommand() {
|
|
|
536
536
|
process.exit(1);
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
const { sessionList, sessionSpawn, sessionStop, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-
|
|
539
|
+
const { sessionList, sessionSpawn, sessionStop, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-BNIVLFgV.mjs');
|
|
540
540
|
const parseFlagStr = (flag, shortFlag) => {
|
|
541
541
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
542
542
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -596,7 +596,7 @@ async function handleSessionCommand() {
|
|
|
596
596
|
allowDomain.push(sessionArgs[++i]);
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
const { parseShareArg } = await import('./commands-
|
|
599
|
+
const { parseShareArg } = await import('./commands-BNIVLFgV.mjs');
|
|
600
600
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
601
601
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
602
602
|
message,
|
|
@@ -682,7 +682,7 @@ async function handleSessionCommand() {
|
|
|
682
682
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
683
683
|
process.exit(1);
|
|
684
684
|
}
|
|
685
|
-
const { sessionApprove } = await import('./commands-
|
|
685
|
+
const { sessionApprove } = await import('./commands-BNIVLFgV.mjs');
|
|
686
686
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
687
687
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
688
688
|
json: hasFlag("--json")
|
|
@@ -692,7 +692,7 @@ async function handleSessionCommand() {
|
|
|
692
692
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
693
693
|
process.exit(1);
|
|
694
694
|
}
|
|
695
|
-
const { sessionDeny } = await import('./commands-
|
|
695
|
+
const { sessionDeny } = await import('./commands-BNIVLFgV.mjs');
|
|
696
696
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
697
697
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
698
698
|
json: hasFlag("--json")
|
|
@@ -728,7 +728,7 @@ async function handleSessionCommand() {
|
|
|
728
728
|
console.error("Usage: svamp session set-title <title>");
|
|
729
729
|
process.exit(1);
|
|
730
730
|
}
|
|
731
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
731
|
+
const { sessionSetTitle } = await import('./agentCommands-D-6ATrHo.mjs');
|
|
732
732
|
await sessionSetTitle(title);
|
|
733
733
|
} else if (sessionSubcommand === "set-link") {
|
|
734
734
|
const url = sessionArgs[1];
|
|
@@ -737,7 +737,7 @@ async function handleSessionCommand() {
|
|
|
737
737
|
process.exit(1);
|
|
738
738
|
}
|
|
739
739
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
740
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
740
|
+
const { sessionSetLink } = await import('./agentCommands-D-6ATrHo.mjs');
|
|
741
741
|
await sessionSetLink(url, label);
|
|
742
742
|
} else if (sessionSubcommand === "notify") {
|
|
743
743
|
const message = sessionArgs[1];
|
|
@@ -746,7 +746,7 @@ async function handleSessionCommand() {
|
|
|
746
746
|
process.exit(1);
|
|
747
747
|
}
|
|
748
748
|
const level = parseFlagStr("--level") || "info";
|
|
749
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
749
|
+
const { sessionNotify } = await import('./agentCommands-D-6ATrHo.mjs');
|
|
750
750
|
await sessionNotify(message, level);
|
|
751
751
|
} else if (sessionSubcommand === "broadcast") {
|
|
752
752
|
const action = sessionArgs[1];
|
|
@@ -754,7 +754,7 @@ async function handleSessionCommand() {
|
|
|
754
754
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
755
755
|
process.exit(1);
|
|
756
756
|
}
|
|
757
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
757
|
+
const { sessionBroadcast } = await import('./agentCommands-D-6ATrHo.mjs');
|
|
758
758
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
759
759
|
} else if (sessionSubcommand === "inbox") {
|
|
760
760
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -765,7 +765,7 @@ async function handleSessionCommand() {
|
|
|
765
765
|
process.exit(1);
|
|
766
766
|
}
|
|
767
767
|
if (agentSessionId) {
|
|
768
|
-
const { inboxSend } = await import('./agentCommands-
|
|
768
|
+
const { inboxSend } = await import('./agentCommands-D-6ATrHo.mjs');
|
|
769
769
|
await inboxSend(sessionArgs[2], {
|
|
770
770
|
body: sessionArgs[3],
|
|
771
771
|
subject: parseFlagStr("--subject"),
|
|
@@ -780,7 +780,7 @@ async function handleSessionCommand() {
|
|
|
780
780
|
}
|
|
781
781
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
782
782
|
if (agentSessionId && !sessionArgs[2]) {
|
|
783
|
-
const { inboxList } = await import('./agentCommands-
|
|
783
|
+
const { inboxList } = await import('./agentCommands-D-6ATrHo.mjs');
|
|
784
784
|
await inboxList({
|
|
785
785
|
unread: hasFlag("--unread"),
|
|
786
786
|
limit: parseFlagInt("--limit"),
|
|
@@ -802,7 +802,7 @@ async function handleSessionCommand() {
|
|
|
802
802
|
process.exit(1);
|
|
803
803
|
}
|
|
804
804
|
if (agentSessionId && !sessionArgs[3]) {
|
|
805
|
-
const { inboxList } = await import('./agentCommands-
|
|
805
|
+
const { inboxList } = await import('./agentCommands-D-6ATrHo.mjs');
|
|
806
806
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
807
807
|
} else if (sessionArgs[3]) {
|
|
808
808
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -812,7 +812,7 @@ async function handleSessionCommand() {
|
|
|
812
812
|
}
|
|
813
813
|
} else if (inboxSubcmd === "reply") {
|
|
814
814
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
815
|
-
const { inboxReply } = await import('./agentCommands-
|
|
815
|
+
const { inboxReply } = await import('./agentCommands-D-6ATrHo.mjs');
|
|
816
816
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
817
817
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
818
818
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -848,7 +848,7 @@ async function handleMachineCommand() {
|
|
|
848
848
|
return;
|
|
849
849
|
}
|
|
850
850
|
if (machineSubcommand === "share") {
|
|
851
|
-
const { machineShare } = await import('./commands-
|
|
851
|
+
const { machineShare } = await import('./commands-BNIVLFgV.mjs');
|
|
852
852
|
let machineId;
|
|
853
853
|
const shareArgs = [];
|
|
854
854
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -878,7 +878,7 @@ async function handleMachineCommand() {
|
|
|
878
878
|
}
|
|
879
879
|
await machineShare(machineId, { add, remove, list, configPath, showConfig });
|
|
880
880
|
} else if (machineSubcommand === "exec") {
|
|
881
|
-
const { machineExec } = await import('./commands-
|
|
881
|
+
const { machineExec } = await import('./commands-BNIVLFgV.mjs');
|
|
882
882
|
let machineId;
|
|
883
883
|
let cwd;
|
|
884
884
|
const cmdParts = [];
|
|
@@ -898,7 +898,7 @@ async function handleMachineCommand() {
|
|
|
898
898
|
}
|
|
899
899
|
await machineExec(machineId, command, cwd);
|
|
900
900
|
} else if (machineSubcommand === "info") {
|
|
901
|
-
const { machineInfo } = await import('./commands-
|
|
901
|
+
const { machineInfo } = await import('./commands-BNIVLFgV.mjs');
|
|
902
902
|
let machineId;
|
|
903
903
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
904
904
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -918,10 +918,10 @@ async function handleMachineCommand() {
|
|
|
918
918
|
level = machineArgs[++i];
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
|
-
const { machineNotify } = await import('./agentCommands-
|
|
921
|
+
const { machineNotify } = await import('./agentCommands-D-6ATrHo.mjs');
|
|
922
922
|
await machineNotify(message, level);
|
|
923
923
|
} else if (machineSubcommand === "ls") {
|
|
924
|
-
const { machineLs } = await import('./commands-
|
|
924
|
+
const { machineLs } = await import('./commands-BNIVLFgV.mjs');
|
|
925
925
|
let machineId;
|
|
926
926
|
let showHidden = false;
|
|
927
927
|
let path;
|
|
@@ -1388,7 +1388,7 @@ async function applyClaudeAuthFlags(argv) {
|
|
|
1388
1388
|
"--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
|
|
1389
1389
|
);
|
|
1390
1390
|
}
|
|
1391
|
-
const mod = await import('./run-
|
|
1391
|
+
const mod = await import('./run-BYFtZS9Q.mjs').then(function (n) { return n.t; });
|
|
1392
1392
|
if (hasHypha) {
|
|
1393
1393
|
mod.setClaudeAuthHyphaProxy();
|
|
1394
1394
|
console.log("Claude auth configured: hypha-proxy (uses HYPHA_TOKEN live at each spawn).");
|
|
@@ -1426,7 +1426,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
}
|
|
1428
1428
|
if (collected.length === 0) return;
|
|
1429
|
-
const { updateEnvFile } = await import('./run-
|
|
1429
|
+
const { updateEnvFile } = await import('./run-BYFtZS9Q.mjs').then(function (n) { return n.t; });
|
|
1430
1430
|
const seen = /* @__PURE__ */ new Set();
|
|
1431
1431
|
const deduped = collected.filter((e) => {
|
|
1432
1432
|
const k = e.toLowerCase();
|
|
@@ -1439,7 +1439,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
async function handleDaemonAuthCommand(argv) {
|
|
1441
1441
|
const sub = (argv[0] || "status").toLowerCase();
|
|
1442
|
-
const mod = await import('./run-
|
|
1442
|
+
const mod = await import('./run-BYFtZS9Q.mjs').then(function (n) { return n.t; });
|
|
1443
1443
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
1444
1444
|
console.log(`
|
|
1445
1445
|
svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
2
2
|
import { execSync } from 'node:child_process';
|
|
3
3
|
import { resolve, join } from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import { n as normalizeAllowedUser, l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha, i as buildSessionShareUrl, j as buildMachineShareUrl } from './run-
|
|
5
|
+
import { n as normalizeAllowedUser, l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha, i as buildSessionShareUrl, j as buildMachineShareUrl } from './run-BYFtZS9Q.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -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-BNIVLFgV.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-BYFtZS9Q.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -97,7 +97,7 @@ async function serviceServe(args) {
|
|
|
97
97
|
}
|
|
98
98
|
async function serviceList(_args) {
|
|
99
99
|
try {
|
|
100
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
100
|
+
const { connectAndGetMachine } = await import('./commands-BNIVLFgV.mjs');
|
|
101
101
|
const { server, machine } = await connectAndGetMachine();
|
|
102
102
|
try {
|
|
103
103
|
const tunnels = await machine.tunnelList({});
|
|
@@ -126,7 +126,7 @@ async function serviceDelete(args) {
|
|
|
126
126
|
process.exit(1);
|
|
127
127
|
}
|
|
128
128
|
try {
|
|
129
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
129
|
+
const { connectAndGetMachine } = await import('./commands-BNIVLFgV.mjs');
|
|
130
130
|
const { server, machine } = await connectAndGetMachine();
|
|
131
131
|
try {
|
|
132
132
|
await machine.tunnelStop({ name });
|
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-BYFtZS9Q.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1210,6 +1210,30 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
1210
1210
|
if (!sm) throw new Error("Serve manager not available");
|
|
1211
1211
|
return sm.getInfo();
|
|
1212
1212
|
},
|
|
1213
|
+
/**
|
|
1214
|
+
* Aggregate frpc tunnel health for all serve mounts.
|
|
1215
|
+
* Returns null when no mounts exist; otherwise the worst-failing tunnel's
|
|
1216
|
+
* status (consecutiveErrors, failingDurationMs, probe info, etc).
|
|
1217
|
+
*/
|
|
1218
|
+
serveTunnelHealth: async (context) => {
|
|
1219
|
+
authorizeRequest(context, currentMetadata.sharing, "view");
|
|
1220
|
+
const sm = handlers.serveManager;
|
|
1221
|
+
if (!sm) return null;
|
|
1222
|
+
return sm.getTunnelHealth();
|
|
1223
|
+
},
|
|
1224
|
+
/**
|
|
1225
|
+
* Manually destroy + recreate all per-mount frpc tunnels.
|
|
1226
|
+
* Owner-triggered safeguard for the "ghosted tunnel" failure mode that
|
|
1227
|
+
* the auto-recover loop catches eventually but the user may want to
|
|
1228
|
+
* skip waiting for. Returns when recreation has completed.
|
|
1229
|
+
*/
|
|
1230
|
+
serveRestartTunnel: async (context) => {
|
|
1231
|
+
authorizeRequest(context, currentMetadata.sharing, "admin");
|
|
1232
|
+
const sm = handlers.serveManager;
|
|
1233
|
+
if (!sm) throw new Error("Serve manager not available");
|
|
1234
|
+
await sm.recreateTunnel();
|
|
1235
|
+
return { success: true, health: sm.getTunnelHealth() };
|
|
1236
|
+
},
|
|
1213
1237
|
// WISE voice — create ephemeral token for OpenAI Realtime API
|
|
1214
1238
|
wiseCreateEphemeralToken: async (params, context) => {
|
|
1215
1239
|
authorizeRequest(context, currentMetadata.sharing, "interact");
|
|
@@ -7351,7 +7375,7 @@ async function startDaemon(options) {
|
|
|
7351
7375
|
const supervisor = new ProcessSupervisor(join(SVAMP_HOME, "processes"));
|
|
7352
7376
|
await supervisor.init();
|
|
7353
7377
|
const tunnels = /* @__PURE__ */ new Map();
|
|
7354
|
-
const { ServeManager } = await import('./serveManager-
|
|
7378
|
+
const { ServeManager } = await import('./serveManager-B37Bn3Bt.mjs');
|
|
7355
7379
|
const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
|
|
7356
7380
|
ensureAutoInstalledSkills(logger).catch(() => {
|
|
7357
7381
|
});
|
|
@@ -10015,8 +10039,8 @@ The automated loop has finished. Review the progress above and let me know if yo
|
|
|
10015
10039
|
}
|
|
10016
10040
|
}
|
|
10017
10041
|
}
|
|
10018
|
-
const FRPC_FAILING_THRESHOLD_MS =
|
|
10019
|
-
const PROBE_STALENESS_THRESHOLD_MS =
|
|
10042
|
+
const FRPC_FAILING_THRESHOLD_MS = 9e4;
|
|
10043
|
+
const PROBE_STALENESS_THRESHOLD_MS = 9e4;
|
|
10020
10044
|
const tunnelLooksDead = (h) => {
|
|
10021
10045
|
if (h.failingDurationMs > FRPC_FAILING_THRESHOLD_MS) {
|
|
10022
10046
|
return `failing ${Math.round(h.failingDurationMs / 1e3)}s`;
|
|
@@ -2,7 +2,7 @@ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(im
|
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import { resolve, join } from 'node:path';
|
|
4
4
|
import { existsSync, readFileSync, watch } from 'node:fs';
|
|
5
|
-
import { c as connectToHypha, a as registerSessionService, k as generateHookSettings } from './run-
|
|
5
|
+
import { c as connectToHypha, a as registerSessionService, k as generateHookSettings } from './run-BYFtZS9Q.mjs';
|
|
6
6
|
import { createServer } from 'node:http';
|
|
7
7
|
import { spawn } from 'node:child_process';
|
|
8
8
|
import { createInterface } from 'node:readline';
|
|
@@ -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-BNIVLFgV.mjs');
|
|
58
58
|
const pos = positionalArgs(args);
|
|
59
59
|
const name = pos[0];
|
|
60
60
|
if (!name) {
|
|
@@ -86,7 +86,7 @@ async function serveAdd(args, machineId) {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
async function serveApply(args, machineId) {
|
|
89
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
89
|
+
const { connectAndGetMachine } = await import('./commands-BNIVLFgV.mjs');
|
|
90
90
|
const fs = await import('fs');
|
|
91
91
|
const yaml = await import('yaml');
|
|
92
92
|
const file = positionalArgs(args)[0];
|
|
@@ -171,7 +171,7 @@ async function serveApply(args, machineId) {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
async function serveRemove(args, machineId) {
|
|
174
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
174
|
+
const { connectAndGetMachine } = await import('./commands-BNIVLFgV.mjs');
|
|
175
175
|
const pos = positionalArgs(args);
|
|
176
176
|
const name = pos[0];
|
|
177
177
|
if (!name) {
|
|
@@ -191,7 +191,7 @@ async function serveRemove(args, machineId) {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
async function serveList(args, machineId) {
|
|
194
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
194
|
+
const { connectAndGetMachine } = await import('./commands-BNIVLFgV.mjs');
|
|
195
195
|
const all = hasFlag(args, "--all", "-a");
|
|
196
196
|
const json = hasFlag(args, "--json");
|
|
197
197
|
const sessionId = getFlag(args, "--session");
|
|
@@ -224,7 +224,7 @@ async function serveList(args, machineId) {
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
async function serveInfo(machineId) {
|
|
227
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
227
|
+
const { connectAndGetMachine } = await import('./commands-BNIVLFgV.mjs');
|
|
228
228
|
const { machine, server } = await connectAndGetMachine(machineId);
|
|
229
229
|
try {
|
|
230
230
|
const info = await machine.serveInfo();
|
|
@@ -3,7 +3,7 @@ import * as fs from 'fs';
|
|
|
3
3
|
import * as http from 'http';
|
|
4
4
|
import * as net from 'net';
|
|
5
5
|
import * as path from 'path';
|
|
6
|
-
import { S as ServeAuth, h as hasCookieToken } from './run-
|
|
6
|
+
import { S as ServeAuth, h as hasCookieToken } from './run-BYFtZS9Q.mjs';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
9
9
|
import 'url';
|