svamp-cli 0.2.231-canary.0 → 0.2.232
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-DQ8AWomX.mjs → agentCommands-CLkkA63B.mjs} +5 -5
- package/dist/{auth-DbbTsm6R.mjs → auth-De4fXHBH.mjs} +1 -1
- package/dist/cli.mjs +61 -61
- package/dist/{commands-C4-LaKZT.mjs → commands-BBCRKwPS.mjs} +2 -2
- package/dist/{commands-4ka5ZQyg.mjs → commands-BNhVRoQs.mjs} +1 -1
- package/dist/{commands-DfKg_hXt.mjs → commands-CC6Yrum8.mjs} +2 -2
- package/dist/{commands-DyESdWcB.mjs → commands-CzmL2RED.mjs} +1 -1
- package/dist/{commands--XkWfxcR.mjs → commands-DMw4NQ1n.mjs} +1 -1
- package/dist/{commands-gxKBfH-9.mjs → commands-DVIOyrKz.mjs} +10 -7
- package/dist/{commands-DyJ7HMJl.mjs → commands-DaclSAqA.mjs} +1 -1
- package/dist/{fleet-Dkm9EQW-.mjs → fleet-DgeAJxSn.mjs} +1 -1
- package/dist/{frpc-D4I-1CO9.mjs → frpc-Ck3kIbkJ.mjs} +1 -1
- package/dist/{headlessCli-DufjFViU.mjs → headlessCli-C9JbKEQr.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{package-DkfV_XZC.mjs → package-TLjW2jIw.mjs} +1 -1
- package/dist/{rpc-DQ2uhpLR.mjs → rpc-04tnZ3AM.mjs} +4 -3
- package/dist/{rpc-qgv0GNgV.mjs → rpc-BAHpcsUP.mjs} +1 -1
- package/dist/{run-CiJNUuye.mjs → run-Ta86yFyh.mjs} +57 -37
- package/dist/{run-Dehv9lrA.mjs → run-_sEUC6P_.mjs} +1 -1
- package/dist/{runStore-CtptN7US.mjs → runStore-CcYmUVL4.mjs} +58 -0
- package/dist/{scheduler-BvwDI3YR.mjs → scheduler-DeY81hZy.mjs} +2 -2
- package/dist/{serveCommands-CH2u1qO2.mjs → serveCommands-C3iw65lW.mjs} +5 -5
- package/dist/{serveManager-ChzwgiY_.mjs → serveManager-DBD7r_r1.mjs} +2 -2
- package/dist/{sideband-HXnqgHgt.mjs → sideband-s9St435j.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 { A as shortId } from './run-
|
|
5
|
+
import { A as shortId } from './run-Ta86yFyh.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-Ta86yFyh.mjs').then(function (n) { return n.a9; });
|
|
100
100
|
const desc = sanitizeDescription(description, 240);
|
|
101
101
|
if (!desc) {
|
|
102
102
|
console.error("Project description is empty.");
|
|
@@ -327,7 +327,7 @@ async function sessionBroadcast(action, args) {
|
|
|
327
327
|
console.log(`Broadcast sent: ${action}`);
|
|
328
328
|
}
|
|
329
329
|
async function connectToMachineService() {
|
|
330
|
-
const { connectAndGetMachine } = await import('./commands
|
|
330
|
+
const { connectAndGetMachine } = await import('./commands-DMw4NQ1n.mjs');
|
|
331
331
|
return connectAndGetMachine();
|
|
332
332
|
}
|
|
333
333
|
function buildInboxMessage(args) {
|
|
@@ -405,7 +405,7 @@ async function inboxSend(targetSessionId, opts) {
|
|
|
405
405
|
console.error("Message body is required.");
|
|
406
406
|
process.exit(1);
|
|
407
407
|
}
|
|
408
|
-
const { connectAndResolveSession } = await import('./commands
|
|
408
|
+
const { connectAndResolveSession } = await import('./commands-DMw4NQ1n.mjs');
|
|
409
409
|
let server;
|
|
410
410
|
try {
|
|
411
411
|
const { targetId, messageId } = await inboxSendCore(
|
|
@@ -459,7 +459,7 @@ async function inboxReply(messageId, body) {
|
|
|
459
459
|
console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
|
|
460
460
|
process.exit(1);
|
|
461
461
|
}
|
|
462
|
-
const { connectAndResolveSession } = await import('./commands
|
|
462
|
+
const { connectAndResolveSession } = await import('./commands-DMw4NQ1n.mjs');
|
|
463
463
|
const { server: localServer, machine: localMachine } = await connectToMachineService();
|
|
464
464
|
let localDisconnected = false;
|
|
465
465
|
const disconnectLocal = async () => {
|
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-Ta86yFyh.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-Ta86yFyh.mjs').then(function (n) { return n.af; });
|
|
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-Ta86yFyh.mjs').then(function (n) { return n.ah; });
|
|
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-DVIOyrKz.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-C3iw65lW.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-CC6Yrum8.mjs');
|
|
365
365
|
let machineId;
|
|
366
366
|
const processArgs = args.slice(1);
|
|
367
367
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -375,18 +375,18 @@ async function main() {
|
|
|
375
375
|
}), machineId);
|
|
376
376
|
process.exit(0);
|
|
377
377
|
} else if (subcommand === "issue" || subcommand === "issues") {
|
|
378
|
-
const { issueCommand } = await import('./commands-
|
|
378
|
+
const { issueCommand } = await import('./commands-CzmL2RED.mjs');
|
|
379
379
|
await issueCommand(args.slice(1));
|
|
380
380
|
process.exit(0);
|
|
381
381
|
} else if (subcommand === "workflow" || subcommand === "workflows") {
|
|
382
|
-
const { workflowCommand } = await import('./commands-
|
|
382
|
+
const { workflowCommand } = await import('./commands-DaclSAqA.mjs');
|
|
383
383
|
await workflowCommand(args.slice(1));
|
|
384
384
|
process.exit(0);
|
|
385
385
|
} else if (subcommand === "wise-agent" || subcommand === "wise") {
|
|
386
386
|
await handleWiseAgentCommand(args.slice(1));
|
|
387
387
|
process.exit(0);
|
|
388
388
|
} else if (subcommand === "feature" || subcommand === "crew") {
|
|
389
|
-
const { crewCommand } = await import('./commands-
|
|
389
|
+
const { crewCommand } = await import('./commands-BBCRKwPS.mjs');
|
|
390
390
|
await crewCommand(args.slice(1));
|
|
391
391
|
process.exit(0);
|
|
392
392
|
} else if (subcommand === "--help" || subcommand === "-h") {
|
|
@@ -394,7 +394,7 @@ async function main() {
|
|
|
394
394
|
} else if (!subcommand || subcommand === "start") {
|
|
395
395
|
await handleInteractiveCommand();
|
|
396
396
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
397
|
-
const pkg = await import('./package-
|
|
397
|
+
const pkg = await import('./package-TLjW2jIw.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
398
398
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
399
399
|
} else {
|
|
400
400
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -403,7 +403,7 @@ async function main() {
|
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
async function handleInteractiveCommand() {
|
|
406
|
-
const { runInteractive } = await import('./run-
|
|
406
|
+
const { runInteractive } = await import('./run-_sEUC6P_.mjs');
|
|
407
407
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
408
408
|
let directory = process.cwd();
|
|
409
409
|
let resumeSessionId;
|
|
@@ -448,7 +448,7 @@ async function handleAgentCommand() {
|
|
|
448
448
|
return;
|
|
449
449
|
}
|
|
450
450
|
if (agentArgs[0] === "list") {
|
|
451
|
-
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-
|
|
451
|
+
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.ac; });
|
|
452
452
|
console.log("Known agents:");
|
|
453
453
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
454
454
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -460,7 +460,7 @@ async function handleAgentCommand() {
|
|
|
460
460
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
461
461
|
return;
|
|
462
462
|
}
|
|
463
|
-
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-
|
|
463
|
+
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.ac; });
|
|
464
464
|
let cwd = process.cwd();
|
|
465
465
|
const filteredArgs = [];
|
|
466
466
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -484,12 +484,12 @@ async function handleAgentCommand() {
|
|
|
484
484
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
485
485
|
let backend;
|
|
486
486
|
if (KNOWN_MCP_AGENTS[config.agentName]) {
|
|
487
|
-
const { CodexMcpBackend } = await import('./run-
|
|
487
|
+
const { CodexMcpBackend } = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.ad; });
|
|
488
488
|
backend = new CodexMcpBackend({ cwd, log: logFn });
|
|
489
489
|
} else {
|
|
490
|
-
const { AcpBackend } = await import('./run-
|
|
491
|
-
const { GeminiTransport } = await import('./run-
|
|
492
|
-
const { DefaultTransport } = await import('./run-
|
|
490
|
+
const { AcpBackend } = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.ab; });
|
|
491
|
+
const { GeminiTransport } = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.ae; });
|
|
492
|
+
const { DefaultTransport } = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.aa; });
|
|
493
493
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
494
494
|
backend = new AcpBackend({
|
|
495
495
|
agentName: config.agentName,
|
|
@@ -616,7 +616,7 @@ async function handleSessionCommand() {
|
|
|
616
616
|
process.exit(1);
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
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
|
|
619
|
+
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-DMw4NQ1n.mjs');
|
|
620
620
|
const parseFlagStr = (flag, shortFlag) => {
|
|
621
621
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
622
622
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -684,7 +684,7 @@ async function handleSessionCommand() {
|
|
|
684
684
|
allowDomain.push(sessionArgs[++i]);
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
const { parseShareArg } = await import('./commands
|
|
687
|
+
const { parseShareArg } = await import('./commands-DMw4NQ1n.mjs');
|
|
688
688
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
689
689
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
690
690
|
message,
|
|
@@ -771,7 +771,7 @@ async function handleSessionCommand() {
|
|
|
771
771
|
console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
|
|
772
772
|
process.exit(1);
|
|
773
773
|
}
|
|
774
|
-
const { sessionEditMessage } = await import('./commands
|
|
774
|
+
const { sessionEditMessage } = await import('./commands-DMw4NQ1n.mjs');
|
|
775
775
|
await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
776
776
|
} else if (sessionSubcommand === "refine") {
|
|
777
777
|
if (!sessionArgs[1] || !sessionArgs[2]) {
|
|
@@ -779,7 +779,7 @@ async function handleSessionCommand() {
|
|
|
779
779
|
console.error(" Asks the agent to revise its latest reply in place (no extra round).");
|
|
780
780
|
process.exit(1);
|
|
781
781
|
}
|
|
782
|
-
const { sessionRefineLastReply } = await import('./commands
|
|
782
|
+
const { sessionRefineLastReply } = await import('./commands-DMw4NQ1n.mjs');
|
|
783
783
|
await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
|
|
784
784
|
} else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
|
|
785
785
|
if (!sessionArgs[1]) {
|
|
@@ -787,7 +787,7 @@ async function handleSessionCommand() {
|
|
|
787
787
|
console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
|
|
788
788
|
process.exit(1);
|
|
789
789
|
}
|
|
790
|
-
const { sessionUndoEdit } = await import('./commands
|
|
790
|
+
const { sessionUndoEdit } = await import('./commands-DMw4NQ1n.mjs');
|
|
791
791
|
await sessionUndoEdit(sessionArgs[1], targetMachineId);
|
|
792
792
|
} else if (sessionSubcommand === "query") {
|
|
793
793
|
const dir = sessionArgs[1];
|
|
@@ -797,7 +797,7 @@ async function handleSessionCommand() {
|
|
|
797
797
|
console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
|
|
798
798
|
process.exit(1);
|
|
799
799
|
}
|
|
800
|
-
const { sessionQuery } = await import('./commands
|
|
800
|
+
const { sessionQuery } = await import('./commands-DMw4NQ1n.mjs');
|
|
801
801
|
await sessionQuery(dir, prompt, targetMachineId, {
|
|
802
802
|
timeout: parseFlagInt("--timeout"),
|
|
803
803
|
json: hasFlag("--json"),
|
|
@@ -830,7 +830,7 @@ async function handleSessionCommand() {
|
|
|
830
830
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
831
831
|
process.exit(1);
|
|
832
832
|
}
|
|
833
|
-
const { sessionApprove } = await import('./commands
|
|
833
|
+
const { sessionApprove } = await import('./commands-DMw4NQ1n.mjs');
|
|
834
834
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
835
835
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
836
836
|
json: hasFlag("--json")
|
|
@@ -840,7 +840,7 @@ async function handleSessionCommand() {
|
|
|
840
840
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
841
841
|
process.exit(1);
|
|
842
842
|
}
|
|
843
|
-
const { sessionDeny } = await import('./commands
|
|
843
|
+
const { sessionDeny } = await import('./commands-DMw4NQ1n.mjs');
|
|
844
844
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
845
845
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
846
846
|
json: hasFlag("--json")
|
|
@@ -885,7 +885,7 @@ async function handleSessionCommand() {
|
|
|
885
885
|
console.error("Usage: svamp session set-title <title>");
|
|
886
886
|
process.exit(1);
|
|
887
887
|
}
|
|
888
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
888
|
+
const { sessionSetTitle } = await import('./agentCommands-CLkkA63B.mjs');
|
|
889
889
|
await sessionSetTitle(title);
|
|
890
890
|
} else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
|
|
891
891
|
const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
@@ -893,7 +893,7 @@ async function handleSessionCommand() {
|
|
|
893
893
|
console.error("Usage: svamp session set-project-description <text>");
|
|
894
894
|
process.exit(1);
|
|
895
895
|
}
|
|
896
|
-
const { sessionSetProjectDescription } = await import('./agentCommands-
|
|
896
|
+
const { sessionSetProjectDescription } = await import('./agentCommands-CLkkA63B.mjs');
|
|
897
897
|
await sessionSetProjectDescription(desc);
|
|
898
898
|
} else if (sessionSubcommand === "set-link") {
|
|
899
899
|
const url = sessionArgs[1];
|
|
@@ -902,11 +902,11 @@ async function handleSessionCommand() {
|
|
|
902
902
|
process.exit(1);
|
|
903
903
|
}
|
|
904
904
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
905
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
905
|
+
const { sessionSetLink } = await import('./agentCommands-CLkkA63B.mjs');
|
|
906
906
|
await sessionSetLink(url, label);
|
|
907
907
|
} else if (sessionSubcommand === "link") {
|
|
908
908
|
const op = sessionArgs[1];
|
|
909
|
-
const lm = await import('./agentCommands-
|
|
909
|
+
const lm = await import('./agentCommands-CLkkA63B.mjs');
|
|
910
910
|
if (op === "add") {
|
|
911
911
|
const url = sessionArgs[2];
|
|
912
912
|
if (!url || url.startsWith("--")) {
|
|
@@ -941,7 +941,7 @@ async function handleSessionCommand() {
|
|
|
941
941
|
process.exit(1);
|
|
942
942
|
}
|
|
943
943
|
const level = parseFlagStr("--level") || "info";
|
|
944
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
944
|
+
const { sessionNotify } = await import('./agentCommands-CLkkA63B.mjs');
|
|
945
945
|
await sessionNotify(message, level);
|
|
946
946
|
} else if (sessionSubcommand === "broadcast") {
|
|
947
947
|
const action = sessionArgs[1];
|
|
@@ -949,7 +949,7 @@ async function handleSessionCommand() {
|
|
|
949
949
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
950
950
|
process.exit(1);
|
|
951
951
|
}
|
|
952
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
952
|
+
const { sessionBroadcast } = await import('./agentCommands-CLkkA63B.mjs');
|
|
953
953
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
954
954
|
} else if (sessionSubcommand === "inbox") {
|
|
955
955
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -960,7 +960,7 @@ async function handleSessionCommand() {
|
|
|
960
960
|
process.exit(1);
|
|
961
961
|
}
|
|
962
962
|
if (agentSessionId) {
|
|
963
|
-
const { inboxSend } = await import('./agentCommands-
|
|
963
|
+
const { inboxSend } = await import('./agentCommands-CLkkA63B.mjs');
|
|
964
964
|
await inboxSend(sessionArgs[2], {
|
|
965
965
|
body: sessionArgs[3],
|
|
966
966
|
subject: parseFlagStr("--subject"),
|
|
@@ -975,7 +975,7 @@ async function handleSessionCommand() {
|
|
|
975
975
|
}
|
|
976
976
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
977
977
|
if (agentSessionId && !sessionArgs[2]) {
|
|
978
|
-
const { inboxList } = await import('./agentCommands-
|
|
978
|
+
const { inboxList } = await import('./agentCommands-CLkkA63B.mjs');
|
|
979
979
|
await inboxList({
|
|
980
980
|
unread: hasFlag("--unread"),
|
|
981
981
|
limit: parseFlagInt("--limit"),
|
|
@@ -997,7 +997,7 @@ async function handleSessionCommand() {
|
|
|
997
997
|
process.exit(1);
|
|
998
998
|
}
|
|
999
999
|
if (agentSessionId && !sessionArgs[3]) {
|
|
1000
|
-
const { inboxList } = await import('./agentCommands-
|
|
1000
|
+
const { inboxList } = await import('./agentCommands-CLkkA63B.mjs');
|
|
1001
1001
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
1002
1002
|
} else if (sessionArgs[3]) {
|
|
1003
1003
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -1007,7 +1007,7 @@ async function handleSessionCommand() {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
} else if (inboxSubcmd === "reply") {
|
|
1009
1009
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
1010
|
-
const { inboxReply } = await import('./agentCommands-
|
|
1010
|
+
const { inboxReply } = await import('./agentCommands-CLkkA63B.mjs');
|
|
1011
1011
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
1012
1012
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
1013
1013
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -1045,7 +1045,7 @@ async function handleMachineCommand() {
|
|
|
1045
1045
|
return;
|
|
1046
1046
|
}
|
|
1047
1047
|
if (machineSubcommand === "share") {
|
|
1048
|
-
const { machineShare } = await import('./commands
|
|
1048
|
+
const { machineShare } = await import('./commands-DMw4NQ1n.mjs');
|
|
1049
1049
|
let machineId;
|
|
1050
1050
|
const shareArgs = [];
|
|
1051
1051
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -1096,14 +1096,14 @@ async function handleMachineCommand() {
|
|
|
1096
1096
|
process.exit(1);
|
|
1097
1097
|
}
|
|
1098
1098
|
if (all) {
|
|
1099
|
-
const { fleetExec } = await import('./fleet-
|
|
1099
|
+
const { fleetExec } = await import('./fleet-DgeAJxSn.mjs');
|
|
1100
1100
|
await fleetExec(command, { cwd });
|
|
1101
1101
|
} else {
|
|
1102
|
-
const { machineExec } = await import('./commands
|
|
1102
|
+
const { machineExec } = await import('./commands-DMw4NQ1n.mjs');
|
|
1103
1103
|
await machineExec(machineId, command, cwd);
|
|
1104
1104
|
}
|
|
1105
1105
|
} else if (machineSubcommand === "info") {
|
|
1106
|
-
const { machineInfo } = await import('./commands
|
|
1106
|
+
const { machineInfo } = await import('./commands-DMw4NQ1n.mjs');
|
|
1107
1107
|
let machineId;
|
|
1108
1108
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
1109
1109
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -1123,10 +1123,10 @@ async function handleMachineCommand() {
|
|
|
1123
1123
|
level = machineArgs[++i];
|
|
1124
1124
|
}
|
|
1125
1125
|
}
|
|
1126
|
-
const { machineNotify } = await import('./agentCommands-
|
|
1126
|
+
const { machineNotify } = await import('./agentCommands-CLkkA63B.mjs');
|
|
1127
1127
|
await machineNotify(message, level);
|
|
1128
1128
|
} else if (machineSubcommand === "ls") {
|
|
1129
|
-
const { machineLs } = await import('./commands
|
|
1129
|
+
const { machineLs } = await import('./commands-DMw4NQ1n.mjs');
|
|
1130
1130
|
let machineId;
|
|
1131
1131
|
let showHidden = false;
|
|
1132
1132
|
let path;
|
|
@@ -1182,20 +1182,20 @@ Examples:
|
|
|
1182
1182
|
};
|
|
1183
1183
|
const hasFlag = (name) => fleetArgs.includes(`--${name}`);
|
|
1184
1184
|
if (sub === "status") {
|
|
1185
|
-
const { fleetStatus } = await import('./fleet-
|
|
1185
|
+
const { fleetStatus } = await import('./fleet-DgeAJxSn.mjs');
|
|
1186
1186
|
await fleetStatus();
|
|
1187
1187
|
} else if (sub === "upgrade-claude") {
|
|
1188
|
-
const { fleetUpgradeClaude } = await import('./fleet-
|
|
1188
|
+
const { fleetUpgradeClaude } = await import('./fleet-DgeAJxSn.mjs');
|
|
1189
1189
|
await fleetUpgradeClaude({ version: flag("version", "-v") });
|
|
1190
1190
|
} else if (sub === "upgrade-svamp") {
|
|
1191
|
-
const { fleetUpgradeSvamp } = await import('./fleet-
|
|
1191
|
+
const { fleetUpgradeSvamp } = await import('./fleet-DgeAJxSn.mjs');
|
|
1192
1192
|
await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
|
|
1193
1193
|
} else if (sub === "daemon-restart") {
|
|
1194
|
-
const { fleetDaemonRestart } = await import('./fleet-
|
|
1194
|
+
const { fleetDaemonRestart } = await import('./fleet-DgeAJxSn.mjs');
|
|
1195
1195
|
await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
|
|
1196
1196
|
} else if (sub === "push-skill") {
|
|
1197
1197
|
const name = fleetArgs[1];
|
|
1198
|
-
const { fleetPushSkill } = await import('./fleet-
|
|
1198
|
+
const { fleetPushSkill } = await import('./fleet-DgeAJxSn.mjs');
|
|
1199
1199
|
await fleetPushSkill(name);
|
|
1200
1200
|
} else {
|
|
1201
1201
|
console.error(`Unknown fleet subcommand: ${sub}`);
|
|
@@ -1211,7 +1211,7 @@ async function handleSkillsCommand() {
|
|
|
1211
1211
|
await printSkillsHelp();
|
|
1212
1212
|
return;
|
|
1213
1213
|
}
|
|
1214
|
-
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-
|
|
1214
|
+
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-BNhVRoQs.mjs');
|
|
1215
1215
|
if (skillsSubcommand === "find" || skillsSubcommand === "search") {
|
|
1216
1216
|
const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1217
1217
|
if (!query) {
|
|
@@ -1258,7 +1258,7 @@ async function loginToHypha() {
|
|
|
1258
1258
|
process.exit(1);
|
|
1259
1259
|
}
|
|
1260
1260
|
const anchor = anchorArg.replace(/\/+$/, "");
|
|
1261
|
-
const { loadInstanceConfig } = await import('./run-
|
|
1261
|
+
const { loadInstanceConfig } = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.af; });
|
|
1262
1262
|
let cfg = null;
|
|
1263
1263
|
try {
|
|
1264
1264
|
cfg = await loadInstanceConfig({ anchor, force: true });
|
|
@@ -1369,7 +1369,7 @@ async function logoutFromHypha() {
|
|
|
1369
1369
|
} catch {
|
|
1370
1370
|
}
|
|
1371
1371
|
try {
|
|
1372
|
-
const { clearInstanceConfigCache } = await import('./run-
|
|
1372
|
+
const { clearInstanceConfigCache } = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.af; });
|
|
1373
1373
|
clearInstanceConfigCache();
|
|
1374
1374
|
} catch {
|
|
1375
1375
|
}
|
|
@@ -1707,7 +1707,7 @@ async function applyClaudeAuthFlags(argv) {
|
|
|
1707
1707
|
"--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
|
|
1708
1708
|
);
|
|
1709
1709
|
}
|
|
1710
|
-
const mod = await import('./run-
|
|
1710
|
+
const mod = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.a8; });
|
|
1711
1711
|
if (hasHypha) {
|
|
1712
1712
|
let url;
|
|
1713
1713
|
const hyphaIdx = argv.indexOf("--use-hypha-proxy");
|
|
@@ -1761,7 +1761,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1761
1761
|
}
|
|
1762
1762
|
}
|
|
1763
1763
|
if (collected.length === 0) return;
|
|
1764
|
-
const { updateEnvFile } = await import('./run-
|
|
1764
|
+
const { updateEnvFile } = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.a8; });
|
|
1765
1765
|
const seen = /* @__PURE__ */ new Set();
|
|
1766
1766
|
const deduped = collected.filter((e) => {
|
|
1767
1767
|
const k = e.toLowerCase();
|
|
@@ -1794,7 +1794,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1794
1794
|
}
|
|
1795
1795
|
});
|
|
1796
1796
|
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(" ");
|
|
1797
|
-
const { wiseAskCli } = await import('./commands
|
|
1797
|
+
const { wiseAskCli } = await import('./commands-DMw4NQ1n.mjs');
|
|
1798
1798
|
await wiseAskCli(machineId, message, sessionId, { json });
|
|
1799
1799
|
return;
|
|
1800
1800
|
}
|
|
@@ -1806,7 +1806,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1806
1806
|
}
|
|
1807
1807
|
return void 0;
|
|
1808
1808
|
};
|
|
1809
|
-
const { runWiseVoiceCli } = await import('./headlessCli-
|
|
1809
|
+
const { runWiseVoiceCli } = await import('./headlessCli-C9JbKEQr.mjs');
|
|
1810
1810
|
await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
|
|
1811
1811
|
return;
|
|
1812
1812
|
}
|
|
@@ -1824,7 +1824,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1824
1824
|
const mode = valueOf(["--mode"]);
|
|
1825
1825
|
const mission = valueOf(["--mission"]);
|
|
1826
1826
|
const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
|
|
1827
|
-
const { wiseJoinMeetingCli } = await import('./commands
|
|
1827
|
+
const { wiseJoinMeetingCli } = await import('./commands-DMw4NQ1n.mjs');
|
|
1828
1828
|
await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
|
|
1829
1829
|
return;
|
|
1830
1830
|
}
|
|
@@ -1836,7 +1836,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
return void 0;
|
|
1838
1838
|
};
|
|
1839
|
-
const { wiseLeaveMeetingCli } = await import('./commands
|
|
1839
|
+
const { wiseLeaveMeetingCli } = await import('./commands-DMw4NQ1n.mjs');
|
|
1840
1840
|
await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
|
|
1841
1841
|
return;
|
|
1842
1842
|
}
|
|
@@ -1860,7 +1860,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1860
1860
|
}
|
|
1861
1861
|
});
|
|
1862
1862
|
const text = rest.slice(1).map((a, idx) => ({ a, idx: idx + 1 })).filter(({ a, idx }) => !a.startsWith("-") && !consumed.has(String(idx))).map(({ a }) => a).join(" ");
|
|
1863
|
-
const { wiseAnnounceCli } = await import('./commands
|
|
1863
|
+
const { wiseAnnounceCli } = await import('./commands-DMw4NQ1n.mjs');
|
|
1864
1864
|
await wiseAnnounceCli(machineId, text, sessionId, { json });
|
|
1865
1865
|
return;
|
|
1866
1866
|
}
|
|
@@ -1872,7 +1872,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1872
1872
|
}
|
|
1873
1873
|
return void 0;
|
|
1874
1874
|
};
|
|
1875
|
-
const { wiseMeetingsCli } = await import('./commands
|
|
1875
|
+
const { wiseMeetingsCli } = await import('./commands-DMw4NQ1n.mjs');
|
|
1876
1876
|
await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
|
|
1877
1877
|
return;
|
|
1878
1878
|
}
|
|
@@ -1922,7 +1922,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1922
1922
|
return;
|
|
1923
1923
|
}
|
|
1924
1924
|
const authArgs = rest.slice(1);
|
|
1925
|
-
const mod = await import('./auth-
|
|
1925
|
+
const mod = await import('./auth-De4fXHBH.mjs');
|
|
1926
1926
|
let action;
|
|
1927
1927
|
try {
|
|
1928
1928
|
action = mod.parseWiseAgentAuthArgs(authArgs);
|
|
@@ -1932,7 +1932,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1932
1932
|
return;
|
|
1933
1933
|
}
|
|
1934
1934
|
if (action) {
|
|
1935
|
-
const { updateEnvFile } = await import('./run-
|
|
1935
|
+
const { updateEnvFile } = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.a8; });
|
|
1936
1936
|
const updates = mod.buildWiseAgentEnvUpdates(action);
|
|
1937
1937
|
updateEnvFile(updates);
|
|
1938
1938
|
for (const [k, v] of Object.entries(updates)) {
|
|
@@ -1946,7 +1946,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1946
1946
|
}
|
|
1947
1947
|
async function handleDaemonAuthCommand(argv) {
|
|
1948
1948
|
const sub = (argv[0] || "status").toLowerCase();
|
|
1949
|
-
const mod = await import('./run-
|
|
1949
|
+
const mod = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.a8; });
|
|
1950
1950
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
1951
1951
|
console.log(`
|
|
1952
1952
|
svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
|
|
@@ -2259,7 +2259,7 @@ Examples:
|
|
|
2259
2259
|
async function printSkillsHelp() {
|
|
2260
2260
|
let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
|
|
2261
2261
|
try {
|
|
2262
|
-
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-
|
|
2262
|
+
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-Ta86yFyh.mjs').then(function (n) { return n.ag; });
|
|
2263
2263
|
browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
|
|
2264
2264
|
} catch {
|
|
2265
2265
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
|
-
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands
|
|
3
|
+
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-DMw4NQ1n.mjs';
|
|
4
4
|
import { execSync } from 'node:child_process';
|
|
5
|
-
import { u as updateIssue, q as addComment, t as addIssue, A as shortId } from './run-
|
|
5
|
+
import { u as updateIssue, q as addComment, t as addIssue, A as shortId } from './run-Ta86yFyh.mjs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
@@ -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 { F as parseFrontmatter, G as getSkillsServer, H as getSkillsWorkspaceName, I as getSkillsCollectionName, J as fetchWithTimeout, K as searchSkills, L as SKILLS_DIR, M as getSkillInfo, N as downloadSkillFile, O as listSkillFiles } from './run-
|
|
4
|
+
import { F as parseFrontmatter, G as getSkillsServer, H as getSkillsWorkspaceName, I as getSkillsCollectionName, J as fetchWithTimeout, K as searchSkills, L as SKILLS_DIR, M as getSkillInfo, N as downloadSkillFile, O as listSkillFiles } from './run-Ta86yFyh.mjs';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'url';
|
|
7
7
|
import 'child_process';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { writeFileSync, readFileSync } from 'fs';
|
|
2
2
|
import { resolve } from 'path';
|
|
3
|
-
import { connectAndGetMachine } from './commands
|
|
3
|
+
import { connectAndGetMachine } from './commands-DMw4NQ1n.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-Ta86yFyh.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { m as resolveProjectRoot, w as searchIssues, v as listIssues, o as resumeIssue, p as pauseIssue, q as addComment, u as updateIssue, n as getIssue, x as isVisibleTo, z as summarize, t as addIssue } from './run-
|
|
4
|
+
import { m as resolveProjectRoot, w as searchIssues, v as listIssues, o as resumeIssue, p as pauseIssue, q as addComment, u as updateIssue, n as getIssue, x as isVisibleTo, z as summarize, t as addIssue } from './run-Ta86yFyh.mjs';
|
|
5
5
|
import 'os';
|
|
6
6
|
import 'fs/promises';
|
|
7
7
|
import 'fs';
|
|
@@ -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 { Q as formatHandle, T as normalizeAllowedUser, U as loadSecurityContextConfig, V as resolveSecurityContext, W as buildSecurityContextFromFlags, X as mergeSecurityContexts, c as connectToHypha, Y as buildSessionShareUrl, Z as computeOutboundHop, A as shortId, _ as registerAwaitingReply, $ as buildMachineShareUrl, a0 as parseHandle, a1 as handleMatchesMetadata } from './run-
|
|
5
|
+
import { Q as formatHandle, T as normalizeAllowedUser, U as loadSecurityContextConfig, V as resolveSecurityContext, W as buildSecurityContextFromFlags, X as mergeSecurityContexts, c as connectToHypha, Y as buildSessionShareUrl, Z as computeOutboundHop, A as shortId, _ as registerAwaitingReply, $ as buildMachineShareUrl, a0 as parseHandle, a1 as handleMatchesMetadata } from './run-Ta86yFyh.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -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-Ck3kIbkJ.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-DMw4NQ1n.mjs');
|
|
72
72
|
const { server, machine } = await connectAndGetMachine();
|
|
73
73
|
try {
|
|
74
74
|
const status = await machine.tunnelStart({
|
|
@@ -78,7 +78,10 @@ async function serviceExpose(args) {
|
|
|
78
78
|
groupKey: groupKey || void 0,
|
|
79
79
|
healthCheckType: healthCheck,
|
|
80
80
|
healthCheckPath: healthPath || void 0,
|
|
81
|
-
healthCheckInterval: healthInterval ? parseInt(healthInterval, 10) : void 0
|
|
81
|
+
healthCheckInterval: healthInterval ? parseInt(healthInterval, 10) : void 0,
|
|
82
|
+
// Attribute the tunnel to the exposing session so it appears in that
|
|
83
|
+
// session's Tasks panel (#0192). Undefined when run outside a session.
|
|
84
|
+
sessionId: process.env.SVAMP_SESSION_ID || void 0
|
|
82
85
|
});
|
|
83
86
|
console.log(`Tunnel '${name}' registered with daemon \u2014 supervised + restart-persistent.`);
|
|
84
87
|
if (status && status.urls) {
|
|
@@ -87,7 +90,7 @@ async function serviceExpose(args) {
|
|
|
87
90
|
console.log(` port ${port}: ${url}`);
|
|
88
91
|
}
|
|
89
92
|
if (process.env.SVAMP_SESSION_ID) {
|
|
90
|
-
const { autoAddSessionLink } = await import('./agentCommands-
|
|
93
|
+
const { autoAddSessionLink } = await import('./agentCommands-CLkkA63B.mjs');
|
|
91
94
|
let added = 0;
|
|
92
95
|
for (const [port, url] of urlEntries) {
|
|
93
96
|
const label = urlEntries.length > 1 ? `${name}:${port}` : name;
|
|
@@ -133,7 +136,7 @@ async function serviceServe(args) {
|
|
|
133
136
|
};
|
|
134
137
|
process.on("SIGINT", cleanup);
|
|
135
138
|
process.on("SIGTERM", cleanup);
|
|
136
|
-
const { runFrpcTunnel } = await import('./frpc-
|
|
139
|
+
const { runFrpcTunnel } = await import('./frpc-Ck3kIbkJ.mjs');
|
|
137
140
|
await runFrpcTunnel(name, [caddyPort]);
|
|
138
141
|
} catch (err) {
|
|
139
142
|
console.error(`Error serving directory: ${err.message}`);
|
|
@@ -142,7 +145,7 @@ async function serviceServe(args) {
|
|
|
142
145
|
}
|
|
143
146
|
async function serviceList(_args) {
|
|
144
147
|
try {
|
|
145
|
-
const { connectAndGetMachine } = await import('./commands
|
|
148
|
+
const { connectAndGetMachine } = await import('./commands-DMw4NQ1n.mjs');
|
|
146
149
|
const { server, machine } = await connectAndGetMachine();
|
|
147
150
|
try {
|
|
148
151
|
const tunnels = await machine.tunnelList({});
|
|
@@ -182,7 +185,7 @@ async function serviceDelete(args) {
|
|
|
182
185
|
process.exit(1);
|
|
183
186
|
}
|
|
184
187
|
try {
|
|
185
|
-
const { connectAndGetMachine } = await import('./commands
|
|
188
|
+
const { connectAndGetMachine } = await import('./commands-DMw4NQ1n.mjs');
|
|
186
189
|
const { server, machine } = await connectAndGetMachine();
|
|
187
190
|
try {
|
|
188
191
|
await machine.tunnelStop({ name });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
|
-
import { m as resolveProjectRoot } from './run-
|
|
2
|
+
import { m as resolveProjectRoot } from './run-Ta86yFyh.mjs';
|
|
3
3
|
import { c as workflowSteps, s as setWorkflowEnabled, i as isWorkflowEnabled, r as removeWorkflow, g as getWorkflow, l as listWorkflows, a as saveWorkflow, b as rawWorkflow } from './store-BTs0H_y0.mjs';
|
|
4
4
|
import 'os';
|
|
5
5
|
import 'fs/promises';
|
|
@@ -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-Ta86yFyh.mjs';
|
|
5
5
|
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-VIupR1NK.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-Ta86yFyh.mjs';
|
|
8
8
|
import 'fs/promises';
|
|
9
9
|
import 'url';
|
|
10
10
|
import 'node:crypto';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as resolveModel, a2 as describeMisconfiguration, a3 as buildMachineDeps } from './run-
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { P as resolveModel, a2 as describeMisconfiguration, a3 as buildMachineDeps } from './run-Ta86yFyh.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-s9St435j.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-Ta86yFyh.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as resolveProjectRoot } from './run-
|
|
1
|
+
import { m as resolveProjectRoot } from './run-Ta86yFyh.mjs';
|
|
2
2
|
import { g as getWorkflow, s as setWorkflowEnabled, r as removeWorkflow, a as saveWorkflow, b as rawWorkflow, l as listWorkflows } from './store-BTs0H_y0.mjs';
|
|
3
|
-
import { g as getRun, l as listRuns, r as runWorkflow } from './runStore-
|
|
3
|
+
import { g as getRun, l as listRuns, r as runWorkflow } from './runStore-CcYmUVL4.mjs';
|
|
4
4
|
import 'os';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'fs';
|
|
@@ -73,7 +73,8 @@ async function workflowRpc(cwd, params) {
|
|
|
73
73
|
else if (s.exitCode !== 0) out.push(` \u2717 step ${s.index + 1} failed (exit ${s.exitCode ?? "signal"}).`);
|
|
74
74
|
}
|
|
75
75
|
out.push(run.status === "success" ? `\u2713 workflow "${wf.name}" completed.` : `\u2717 workflow "${wf.name}" failed.`);
|
|
76
|
-
|
|
76
|
+
if (run.escalatedIssue) out.push(` \u21B3 escalated to issue #${run.escalatedIssue} (agent will correct the workflow).`);
|
|
77
|
+
return { ok: run.status === "success", output: out.join("\n"), runId: run.id, escalatedIssue: run.escalatedIssue };
|
|
77
78
|
}
|
|
78
79
|
case "runs": {
|
|
79
80
|
const limit = Number(params.limit) > 0 ? Number(params.limit) : void 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as resolveProjectRoot, u as updateIssue, n as getIssue, o as resumeIssue, p as pauseIssue, q as addComment, t as addIssue, v as listIssues, w as searchIssues, x as isVisibleTo } from './run-
|
|
1
|
+
import { m as resolveProjectRoot, u as updateIssue, n as getIssue, o as resumeIssue, p as pauseIssue, q as addComment, t as addIssue, v as listIssues, w as searchIssues, x as isVisibleTo } from './run-Ta86yFyh.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1967,6 +1967,33 @@ function savePersistedMachineMetadata(svampHomeDir, data) {
|
|
|
1967
1967
|
console.error("[HYPHA MACHINE] Failed to persist machine metadata:", err);
|
|
1968
1968
|
}
|
|
1969
1969
|
}
|
|
1970
|
+
function buildSessionTunnels(handlers, sessionId) {
|
|
1971
|
+
const specs = handlers.listExposedTunnels?.() ?? [];
|
|
1972
|
+
const tunnels = handlers.tunnels;
|
|
1973
|
+
const stateOf = (s) => {
|
|
1974
|
+
if (!s) return "reconnecting";
|
|
1975
|
+
if (s.probe && !s.probe.ok) return "failed";
|
|
1976
|
+
if (s.connected) return "connected";
|
|
1977
|
+
return s.restartAttempts > 0 ? "reconnecting" : "failed";
|
|
1978
|
+
};
|
|
1979
|
+
const rows = [];
|
|
1980
|
+
for (const spec of specs) {
|
|
1981
|
+
if (spec.sessionId !== sessionId) continue;
|
|
1982
|
+
const tunnel = tunnels?.get(spec.name);
|
|
1983
|
+
const status = tunnel ? tunnel.status : null;
|
|
1984
|
+
const urls = {};
|
|
1985
|
+
if (tunnel) for (const [port, url] of tunnel.getUrls()) urls[port] = url;
|
|
1986
|
+
rows.push({
|
|
1987
|
+
name: spec.name,
|
|
1988
|
+
ports: spec.ports,
|
|
1989
|
+
group: spec.group,
|
|
1990
|
+
live: !!tunnel,
|
|
1991
|
+
state: stateOf(status),
|
|
1992
|
+
urls: Object.keys(urls).length ? urls : void 0
|
|
1993
|
+
});
|
|
1994
|
+
}
|
|
1995
|
+
return rows;
|
|
1996
|
+
}
|
|
1970
1997
|
async function registerMachineService(server, machineId, metadata, daemonState, handlers) {
|
|
1971
1998
|
let currentMetadata = { ...metadata };
|
|
1972
1999
|
let currentDaemonState = { ...daemonState };
|
|
@@ -2773,30 +2800,27 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
2773
2800
|
// user can manage their own session's tasks without machine-level
|
|
2774
2801
|
// access.
|
|
2775
2802
|
/**
|
|
2776
|
-
* Snapshot of everything the session's Tasks panel needs to render
|
|
2803
|
+
* Snapshot of everything the session's Tasks panel needs to render.
|
|
2804
|
+
* Only svamp-MANAGED processes for this session are surfaced (#0192):
|
|
2777
2805
|
* - supervised: ProcessSpec/state filtered to this session
|
|
2778
|
-
* -
|
|
2806
|
+
* - tunnels: `svamp service expose` tunnels owned by this session
|
|
2807
|
+
* Unsupervised ps-tree descendants of the agent are no longer shown —
|
|
2808
|
+
* `detected` is kept as an empty array for wire back-compat with older
|
|
2809
|
+
* app clients that read `snap.detected`.
|
|
2779
2810
|
*/
|
|
2780
2811
|
sessionProcessList: async (params, context) => {
|
|
2781
2812
|
await authorizeSessionAccess(params.sessionId, "view", context);
|
|
2782
2813
|
const supervisor = handlers.supervisor;
|
|
2783
2814
|
const all = supervisor ? supervisor.list() : [];
|
|
2784
2815
|
const supervised = all.filter((p) => p.spec.sessionId === params.sessionId);
|
|
2816
|
+
const tunnels = buildSessionTunnels(handlers, params.sessionId);
|
|
2785
2817
|
const agentPid = handlers.getSessionPid?.(params.sessionId);
|
|
2786
|
-
|
|
2787
|
-
if (agentPid) {
|
|
2788
|
-
const supervisedPids = /* @__PURE__ */ new Set();
|
|
2789
|
-
for (const info of all) {
|
|
2790
|
-
if (info.state.pid) supervisedPids.add(info.state.pid);
|
|
2791
|
-
}
|
|
2792
|
-
detected = await detectDescendants(agentPid, supervisedPids);
|
|
2793
|
-
}
|
|
2794
|
-
return { supervised, detected, agentPid };
|
|
2818
|
+
return { supervised, tunnels, detected: [], agentPid };
|
|
2795
2819
|
},
|
|
2796
2820
|
/**
|
|
2797
|
-
* Cheap counts for the input-bar badge
|
|
2798
|
-
*
|
|
2799
|
-
*
|
|
2821
|
+
* Cheap counts for the input-bar badge. Counts only svamp-managed
|
|
2822
|
+
* processes for this session (supervised specs + exposed tunnels);
|
|
2823
|
+
* `detected` stays 0 for wire back-compat.
|
|
2800
2824
|
*/
|
|
2801
2825
|
sessionProcessCounts: async (params, context) => {
|
|
2802
2826
|
await authorizeSessionAccess(params.sessionId, "view", context);
|
|
@@ -2804,15 +2828,9 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
2804
2828
|
const all = supervisor ? supervisor.list() : [];
|
|
2805
2829
|
const supervised = all.filter((p) => p.spec.sessionId === params.sessionId);
|
|
2806
2830
|
const supervisedRunning = supervised.filter((p) => p.state.status === "running" || p.state.status === "starting").length;
|
|
2831
|
+
const tunnels = buildSessionTunnels(handlers, params.sessionId).length;
|
|
2807
2832
|
const agentPid = handlers.getSessionPid?.(params.sessionId);
|
|
2808
|
-
|
|
2809
|
-
if (agentPid) {
|
|
2810
|
-
const supervisedPids = /* @__PURE__ */ new Set();
|
|
2811
|
-
for (const info of all) if (info.state.pid) supervisedPids.add(info.state.pid);
|
|
2812
|
-
const list = await detectDescendants(agentPid, supervisedPids);
|
|
2813
|
-
detected = list.length;
|
|
2814
|
-
}
|
|
2815
|
-
return { supervised: supervised.length, supervisedRunning, detected, agentPid };
|
|
2833
|
+
return { supervised: supervised.length, supervisedRunning, tunnels, detected: 0, agentPid };
|
|
2816
2834
|
},
|
|
2817
2835
|
/** Logs for a supervised process, gated by session ownership. */
|
|
2818
2836
|
sessionProcessLogs: async (params, context) => {
|
|
@@ -2916,7 +2934,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
2916
2934
|
const tunnels = handlers.tunnels;
|
|
2917
2935
|
if (!tunnels) throw new Error("Tunnel management not available");
|
|
2918
2936
|
if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
|
|
2919
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
2937
|
+
const { FrpcTunnel } = await import('./frpc-Ck3kIbkJ.mjs');
|
|
2920
2938
|
const tunnel = new FrpcTunnel({
|
|
2921
2939
|
name: params.name,
|
|
2922
2940
|
ports: params.ports,
|
|
@@ -2943,6 +2961,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
2943
2961
|
healthCheckType: params.healthCheckType,
|
|
2944
2962
|
healthCheckPath: params.healthCheckPath,
|
|
2945
2963
|
healthCheckInterval: params.healthCheckInterval,
|
|
2964
|
+
sessionId: params.sessionId,
|
|
2946
2965
|
addedAt: Date.now()
|
|
2947
2966
|
});
|
|
2948
2967
|
const urls = {};
|
|
@@ -3363,7 +3382,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
3363
3382
|
}
|
|
3364
3383
|
const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
|
|
3365
3384
|
const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
|
|
3366
|
-
const { toolsForRole } = await import('./sideband-
|
|
3385
|
+
const { toolsForRole } = await import('./sideband-s9St435j.mjs');
|
|
3367
3386
|
const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
|
|
3368
3387
|
return fmt(r2);
|
|
3369
3388
|
}
|
|
@@ -3462,7 +3481,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
3462
3481
|
if (r.error || !r.sender) return { error: r.error || "unauthorized" };
|
|
3463
3482
|
const callId = "call_" + Math.random().toString(16).slice(2, 12);
|
|
3464
3483
|
const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
|
|
3465
|
-
const { queryCore } = await import('./commands
|
|
3484
|
+
const { queryCore } = await import('./commands-DMw4NQ1n.mjs');
|
|
3466
3485
|
const timeout = c.reply?.timeout_sec || 120;
|
|
3467
3486
|
let result;
|
|
3468
3487
|
try {
|
|
@@ -10719,7 +10738,7 @@ ${o.task.trim()}`);
|
|
|
10719
10738
|
${o.until.trim()}`);
|
|
10720
10739
|
lines.push("");
|
|
10721
10740
|
lines.push("Use your tools (Read, Bash, Grep, Glob) to inspect the ACTUAL repository state \u2014 do NOT trust the transcript. Check the working tree, git log/diff, build/test output, and whether changes were actually built/published/deployed where the request implied it.");
|
|
10722
|
-
lines.push('IMPORTANT \u2014 the loop oracle only counts OPEN (ready/in_progress) issues, so an issue removed from the queue without genuine resolution is invisible to it. Run `svamp issue list --all` (or read `.svamp/issues/`) and confirm NO issue tied to this goal was
|
|
10741
|
+
lines.push('IMPORTANT \u2014 the loop oracle only counts OPEN (ready/in_progress) issues, so an issue removed from the queue without genuine resolution is invisible to it. Run `svamp issue list --all` (or read `.svamp/issues/`) and confirm NO issue tied to this goal was sidelined merely to make the queue look empty. A PAUSED issue is FINE if it is genuinely blocked on a user answer OR clearly delegated/handed to another session (crew child or a named peer) \u2014 do NOT penalize those. Reject "done" ONLY if goal-relevant work is neither genuinely complete, nor legitimately blocked on the user, nor handed to another session.');
|
|
10723
10742
|
if (o.oracle) {
|
|
10724
10743
|
lines.push("");
|
|
10725
10744
|
lines.push(`The loop oracle is \`${o.oracle.trim()}\` and it currently PASSES${o.oracleOutput ? ` (output: ${o.oracleOutput.trim().slice(0, 400)})` : ""}. A green oracle here only means "no OPEN issues" \u2014 it does NOT mean each CLOSED issue actually works.`);
|
|
@@ -11795,7 +11814,10 @@ function spawnHeadlessEvaluator(prompt, opts) {
|
|
|
11795
11814
|
"--print",
|
|
11796
11815
|
prompt,
|
|
11797
11816
|
// Read-only reviewer (mirrors .claude/agents/loop-evaluator.md): it inspects real repo
|
|
11798
|
-
// state but must not mutate the working tree it's judging.
|
|
11817
|
+
// state but must not mutate the working tree it's judging. The allowedTools whitelist
|
|
11818
|
+
// already excludes mutation tools; --disallowedTools is belt-and-suspenders. Kept to
|
|
11819
|
+
// Write/Edit only — MultiEdit/NotebookEdit aren't known tool names on some claude builds
|
|
11820
|
+
// and emit a noisy "matches no known tool" warning (#0191 canary).
|
|
11799
11821
|
"--allowedTools",
|
|
11800
11822
|
"Read",
|
|
11801
11823
|
"Bash",
|
|
@@ -11804,8 +11826,6 @@ function spawnHeadlessEvaluator(prompt, opts) {
|
|
|
11804
11826
|
"--disallowedTools",
|
|
11805
11827
|
"Write",
|
|
11806
11828
|
"Edit",
|
|
11807
|
-
"MultiEdit",
|
|
11808
|
-
"NotebookEdit",
|
|
11809
11829
|
"--permission-mode",
|
|
11810
11830
|
"bypassPermissions",
|
|
11811
11831
|
"--output-format",
|
|
@@ -12570,7 +12590,7 @@ async function startDaemon(options) {
|
|
|
12570
12590
|
saveExposedTunnels(list);
|
|
12571
12591
|
}
|
|
12572
12592
|
async function createExposedTunnel(spec) {
|
|
12573
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
12593
|
+
const { FrpcTunnel } = await import('./frpc-Ck3kIbkJ.mjs');
|
|
12574
12594
|
const tunnel = new FrpcTunnel({
|
|
12575
12595
|
name: spec.name,
|
|
12576
12596
|
ports: spec.ports,
|
|
@@ -12590,7 +12610,7 @@ async function startDaemon(options) {
|
|
|
12590
12610
|
return tunnel;
|
|
12591
12611
|
}
|
|
12592
12612
|
const tunnelRecreateState = /* @__PURE__ */ new Map();
|
|
12593
|
-
const { ServeManager } = await import('./serveManager-
|
|
12613
|
+
const { ServeManager } = await import('./serveManager-DBD7r_r1.mjs');
|
|
12594
12614
|
const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
|
|
12595
12615
|
ensureAutoInstalledSkills(logger).catch(() => {
|
|
12596
12616
|
});
|
|
@@ -14599,11 +14619,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
14599
14619
|
});
|
|
14600
14620
|
},
|
|
14601
14621
|
onIssue: async (params) => {
|
|
14602
|
-
const { issueRpc } = await import('./rpc-
|
|
14622
|
+
const { issueRpc } = await import('./rpc-BAHpcsUP.mjs');
|
|
14603
14623
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
14604
14624
|
},
|
|
14605
14625
|
onWorkflow: async (params) => {
|
|
14606
|
-
const { workflowRpc } = await import('./rpc-
|
|
14626
|
+
const { workflowRpc } = await import('./rpc-04tnZ3AM.mjs');
|
|
14607
14627
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
14608
14628
|
},
|
|
14609
14629
|
onRipgrep: async (args, cwd) => {
|
|
@@ -15136,11 +15156,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
15136
15156
|
});
|
|
15137
15157
|
},
|
|
15138
15158
|
onIssue: async (params) => {
|
|
15139
|
-
const { issueRpc } = await import('./rpc-
|
|
15159
|
+
const { issueRpc } = await import('./rpc-BAHpcsUP.mjs');
|
|
15140
15160
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
15141
15161
|
},
|
|
15142
15162
|
onWorkflow: async (params) => {
|
|
15143
|
-
const { workflowRpc } = await import('./rpc-
|
|
15163
|
+
const { workflowRpc } = await import('./rpc-04tnZ3AM.mjs');
|
|
15144
15164
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
15145
15165
|
},
|
|
15146
15166
|
onRipgrep: async (args, cwd) => {
|
|
@@ -15714,7 +15734,7 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
|
|
|
15714
15734
|
sharingNotificationSync,
|
|
15715
15735
|
persistExposedTunnel,
|
|
15716
15736
|
forgetExposedTunnel,
|
|
15717
|
-
listExposedTunnels: () => loadExposedTunnels().map((t) => ({ name: t.name, ports: t.ports, group: t.group, addedAt: t.addedAt }))
|
|
15737
|
+
listExposedTunnels: () => loadExposedTunnels().map((t) => ({ name: t.name, ports: t.ports, group: t.group, sessionId: t.sessionId, addedAt: t.addedAt }))
|
|
15718
15738
|
});
|
|
15719
15739
|
const machineService = await registerMachineService(
|
|
15720
15740
|
server,
|
|
@@ -16010,7 +16030,7 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
|
|
|
16010
16030
|
const PING_TIMEOUT_MS = 15e3;
|
|
16011
16031
|
const POST_RECONNECT_GRACE_MS = 2e4;
|
|
16012
16032
|
const RECONNECT_JITTER_MS = 2500;
|
|
16013
|
-
const { WorkflowScheduler } = await import('./scheduler-
|
|
16033
|
+
const { WorkflowScheduler } = await import('./scheduler-DeY81hZy.mjs');
|
|
16014
16034
|
const workflowScheduler = new WorkflowScheduler({
|
|
16015
16035
|
projectRoots: () => {
|
|
16016
16036
|
const dirs = /* @__PURE__ */ new Set();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { a4 as applyClaudeProxyEnv, a5 as composeSessionId, a6 as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, a7 as generateHookSettings } from './run-
|
|
1
|
+
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { a4 as applyClaudeProxyEnv, a5 as composeSessionId, a6 as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, a7 as generateHookSettings } from './run-Ta86yFyh.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';
|
|
@@ -2,6 +2,7 @@ import { spawn } from 'node:child_process';
|
|
|
2
2
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, renameSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { c as workflowSteps, d as workflowsDir } from './store-BTs0H_y0.mjs';
|
|
5
|
+
import { v as listIssues, t as addIssue } from './run-Ta86yFyh.mjs';
|
|
5
6
|
|
|
6
7
|
const MAX_RUNS_PER_WORKFLOW = 50;
|
|
7
8
|
const MAX_STREAM_CHARS = 8e3;
|
|
@@ -112,6 +113,56 @@ function defaultExecStep(root, cmd, env) {
|
|
|
112
113
|
}
|
|
113
114
|
});
|
|
114
115
|
}
|
|
116
|
+
function escalateWorkflowFailure(projectRoot, wf, run) {
|
|
117
|
+
try {
|
|
118
|
+
if (process.env.SVAMP_WORKFLOW_ESCALATE === "0") return void 0;
|
|
119
|
+
const failLabel = `wf-fail:${wf.name}`;
|
|
120
|
+
const open = listIssues(projectRoot, { label: failLabel }).filter((i) => i.status !== "archived");
|
|
121
|
+
if (open.length > 0) return void 0;
|
|
122
|
+
const failed = run.steps.find((s) => s.timedOut || s.exitCode !== 0 && s.exitCode !== null) || run.steps[run.steps.length - 1];
|
|
123
|
+
const failCause = run.error ? `runner error: ${run.error}` : failed?.timedOut ? `step timed out after ${STEP_TIMEOUT_MS / 1e3}s` : `step exited with code ${failed?.exitCode ?? "null (killed/signal)"}`;
|
|
124
|
+
const defLines = workflowSteps(wf).map((s, i) => ` ${i}. ${s.run}`).join("\n") || " (no steps)";
|
|
125
|
+
const stderrTail = failed?.stderr ? capStream(failed.stderr, 3e3) : "(none)";
|
|
126
|
+
const stdoutTail = failed?.stdout ? capStream(failed.stdout, 1500) : "(none)";
|
|
127
|
+
const body = [
|
|
128
|
+
`Workflow **${wf.name}** failed on its last run (${run.trigger} trigger${run.triggerContext ? ` \xB7 ${run.triggerContext}` : ""}). Diagnose the failure and **correct the workflow definition** so future runs succeed \u2014 edit it with \`svamp workflow\` (see \`svamp workflow --help\`), or pause/remove it if it's obsolete.`,
|
|
129
|
+
"",
|
|
130
|
+
"## Failure",
|
|
131
|
+
`- Cause: ${failCause}`,
|
|
132
|
+
`- Failed step: ${failed ? `#${failed.index} \u2014 \`${failed.cmd}\`` : "(unknown)"}`,
|
|
133
|
+
`- Run id: ${run.id} \xB7 finished: ${run.finishedAt || "?"}`,
|
|
134
|
+
"",
|
|
135
|
+
"## Workflow definition",
|
|
136
|
+
"```",
|
|
137
|
+
`name: ${wf.name}`,
|
|
138
|
+
`steps:`,
|
|
139
|
+
defLines,
|
|
140
|
+
"```",
|
|
141
|
+
"",
|
|
142
|
+
"## Failed step stderr (tail)",
|
|
143
|
+
"```",
|
|
144
|
+
stderrTail,
|
|
145
|
+
"```",
|
|
146
|
+
"",
|
|
147
|
+
"## Failed step stdout (tail)",
|
|
148
|
+
"```",
|
|
149
|
+
stdoutTail,
|
|
150
|
+
"```"
|
|
151
|
+
].join("\n");
|
|
152
|
+
const issue = addIssue(projectRoot, {
|
|
153
|
+
title: `Fix failing workflow "${wf.name}" (${failCause})`,
|
|
154
|
+
labels: ["workflow", "automation", "auto-escalated", failLabel],
|
|
155
|
+
verify: { type: "agent", text: `The workflow "${wf.name}" is corrected (or removed/paused) so it no longer fails with: ${failCause}` },
|
|
156
|
+
scope: wf.session ? "session" : "project",
|
|
157
|
+
session: wf.session ?? null,
|
|
158
|
+
triaged: true,
|
|
159
|
+
body
|
|
160
|
+
});
|
|
161
|
+
return issue.id;
|
|
162
|
+
} catch {
|
|
163
|
+
return void 0;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
115
166
|
async function runWorkflow(projectRoot, wf, opts) {
|
|
116
167
|
const now = opts.now || (() => {
|
|
117
168
|
const d = /* @__PURE__ */ new Date();
|
|
@@ -160,6 +211,13 @@ async function runWorkflow(projectRoot, wf, opts) {
|
|
|
160
211
|
const end = now();
|
|
161
212
|
run.finishedAt = end.iso;
|
|
162
213
|
run.durationMs = end.ms - start.ms;
|
|
214
|
+
if (run.status === "failed") {
|
|
215
|
+
const escalated = escalateWorkflowFailure(projectRoot, wf, run);
|
|
216
|
+
if (escalated) {
|
|
217
|
+
run.escalatedIssue = escalated;
|
|
218
|
+
opts.log?.(`[workflow] run ${id} "${wf.name}" failed \u2192 escalated to issue #${escalated}`);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
163
221
|
recordRun(projectRoot, run);
|
|
164
222
|
opts.log?.(`[workflow] run ${id} "${wf.name}" \u2192 ${run.status} (${run.steps.length} step${run.steps.length === 1 ? "" : "s"})`);
|
|
165
223
|
return run;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as resolveProjectRoot, y as cronMatches } from './run-
|
|
1
|
+
import { m as resolveProjectRoot, y as cronMatches } from './run-Ta86yFyh.mjs';
|
|
2
2
|
import { l as listWorkflows, i as isWorkflowEnabled, w as workflowCrons } from './store-BTs0H_y0.mjs';
|
|
3
|
-
import { r as runWorkflow } from './runStore-
|
|
3
|
+
import { r as runWorkflow } from './runStore-CcYmUVL4.mjs';
|
|
4
4
|
import 'os';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import '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-DMw4NQ1n.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-DMw4NQ1n.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-DMw4NQ1n.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-DMw4NQ1n.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-DMw4NQ1n.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-Ta86yFyh.mjs';
|
|
8
8
|
import 'os';
|
|
9
9
|
import 'fs/promises';
|
|
10
10
|
import 'url';
|
|
@@ -733,7 +733,7 @@ class ServeManager {
|
|
|
733
733
|
const mount = this.mounts.get(mountName);
|
|
734
734
|
const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, buildLinkSubdomain(subdomainSafe, mount.linkToken)]]) : void 0;
|
|
735
735
|
try {
|
|
736
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
736
|
+
const { FrpcTunnel } = await import('./frpc-Ck3kIbkJ.mjs');
|
|
737
737
|
let tunnel;
|
|
738
738
|
tunnel = new FrpcTunnel({
|
|
739
739
|
name: tunnelName,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-
|
|
1
|
+
import { R as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-Ta86yFyh.mjs';
|
|
2
2
|
import 'node:child_process';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|