svamp-cli 0.2.251 → 0.2.252
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-Bcqo8iMs.mjs → agentCommands-BfK_xRcZ.mjs} +5 -5
- package/dist/{auth-aefPotnn.mjs → auth-dxadQh0v.mjs} +1 -1
- package/dist/cli.mjs +77 -70
- package/dist/{commands-D7Sifr5h.mjs → commands-B9eaRA8O.mjs} +2 -2
- package/dist/{commands-CBOY46Ig.mjs → commands-BAtj5B4a.mjs} +6 -6
- package/dist/{commands-hPm8AYNG.mjs → commands-BkroIJOC.mjs} +9 -2
- package/dist/{commands-BwvIihFY.mjs → commands-Blddcoeh.mjs} +1 -1
- package/dist/{commands-DV7Somb0.mjs → commands-Cg3yUhp1.mjs} +1 -1
- package/dist/{commands-BF-wFyla.mjs → commands-CuSO_rgw.mjs} +2 -2
- package/dist/{commands-Cy6dc7Ey.mjs → commands-eDMV8Q8q.mjs} +1 -1
- package/dist/{fleet-CBIJW3k7.mjs → fleet-CNmpoV_Q.mjs} +1 -1
- package/dist/{frpc-DshAO_N4.mjs → frpc-DoUUUoZn.mjs} +1 -1
- package/dist/{headlessCli-l72fsaU0.mjs → headlessCli-DGTHnPjT.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{package-ayXBWSo-.mjs → package-C2CWKEW-.mjs} +1 -1
- package/dist/{rpc-CtfcD14b.mjs → rpc-665-sPRQ.mjs} +1 -1
- package/dist/{rpc-B2BhUPgt.mjs → rpc-_rwZwiHD.mjs} +1 -1
- package/dist/{run-CRe59VaY.mjs → run-BNxaekWa.mjs} +61 -38
- package/dist/{run-BCU137ie.mjs → run-BPNXOI3F.mjs} +1 -1
- package/dist/{scheduler-CW_l0_B6.mjs → scheduler-DjMTCoWS.mjs} +1 -1
- package/dist/{serveCommands-JgPmRokC.mjs → serveCommands-Bc6fchAf.mjs} +5 -5
- package/dist/{serveManager-CL0QrW7Z.mjs → serveManager-DAuIjPuV.mjs} +2 -2
- package/dist/{sideband-CiE3Nqih.mjs → sideband-D6vgqNiq.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 { k as shortId } from './run-
|
|
5
|
+
import { k as shortId } from './run-BNxaekWa.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -97,7 +97,7 @@ async function sessionSetTitle(title) {
|
|
|
97
97
|
}
|
|
98
98
|
async function sessionSetProjectDescription(description) {
|
|
99
99
|
const dir = process.cwd();
|
|
100
|
-
const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-
|
|
100
|
+
const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.al; });
|
|
101
101
|
const desc = sanitizeDescription(description, 240);
|
|
102
102
|
if (!desc) {
|
|
103
103
|
console.error("Project description is empty.");
|
|
@@ -344,7 +344,7 @@ async function sessionBroadcast(action, args) {
|
|
|
344
344
|
console.log(`Broadcast sent: ${action}`);
|
|
345
345
|
}
|
|
346
346
|
async function connectToMachineService() {
|
|
347
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
347
|
+
const { connectAndGetMachine } = await import('./commands-BkroIJOC.mjs');
|
|
348
348
|
return connectAndGetMachine();
|
|
349
349
|
}
|
|
350
350
|
function buildInboxMessage(args) {
|
|
@@ -422,7 +422,7 @@ async function inboxSend(targetSessionId, opts) {
|
|
|
422
422
|
console.error("Message body is required.");
|
|
423
423
|
process.exit(1);
|
|
424
424
|
}
|
|
425
|
-
const { connectAndResolveSession } = await import('./commands-
|
|
425
|
+
const { connectAndResolveSession } = await import('./commands-BkroIJOC.mjs');
|
|
426
426
|
let server;
|
|
427
427
|
try {
|
|
428
428
|
const { targetId, messageId } = await inboxSendCore(
|
|
@@ -476,7 +476,7 @@ async function inboxReply(messageId, body) {
|
|
|
476
476
|
console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
|
|
477
477
|
process.exit(1);
|
|
478
478
|
}
|
|
479
|
-
const { connectAndResolveSession } = await import('./commands-
|
|
479
|
+
const { connectAndResolveSession } = await import('./commands-BkroIJOC.mjs');
|
|
480
480
|
const { server: localServer, machine: localMachine } = await connectToMachineService();
|
|
481
481
|
let localDisconnected = false;
|
|
482
482
|
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-BNxaekWa.mjs';
|
|
2
2
|
import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|
|
@@ -35,7 +35,7 @@ const subcommand = args[0];
|
|
|
35
35
|
let daemonSubcommand = args[1];
|
|
36
36
|
async function main() {
|
|
37
37
|
try {
|
|
38
|
-
const { getLoadedConfig } = await import('./run-
|
|
38
|
+
const { getLoadedConfig } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.ar; });
|
|
39
39
|
getLoadedConfig();
|
|
40
40
|
} catch {
|
|
41
41
|
}
|
|
@@ -54,7 +54,7 @@ async function main() {
|
|
|
54
54
|
}
|
|
55
55
|
const whenIdle = args.includes("--when-idle");
|
|
56
56
|
const force = args.includes("--force");
|
|
57
|
-
const mod = await import('./run-
|
|
57
|
+
const mod = await import('./run-BNxaekWa.mjs').then(function (n) { return n.at; });
|
|
58
58
|
if (whenIdle && !force) {
|
|
59
59
|
if (mod.isDaemonAlive()) {
|
|
60
60
|
mod.writePendingRestart({ reason: "svamp daemon restart --when-idle" });
|
|
@@ -355,7 +355,7 @@ async function main() {
|
|
|
355
355
|
console.error("svamp service: Service commands are not available in sandboxed sessions.");
|
|
356
356
|
process.exit(1);
|
|
357
357
|
}
|
|
358
|
-
const { handleServiceCommand } = await import('./commands-
|
|
358
|
+
const { handleServiceCommand } = await import('./commands-BAtj5B4a.mjs');
|
|
359
359
|
await handleServiceCommand();
|
|
360
360
|
} else if (subcommand === "serve") {
|
|
361
361
|
const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
|
|
@@ -363,7 +363,7 @@ async function main() {
|
|
|
363
363
|
console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
|
|
364
364
|
process.exit(1);
|
|
365
365
|
}
|
|
366
|
-
const { handleServeCommand } = await import('./serveCommands-
|
|
366
|
+
const { handleServeCommand } = await import('./serveCommands-Bc6fchAf.mjs');
|
|
367
367
|
await handleServeCommand();
|
|
368
368
|
process.exit(0);
|
|
369
369
|
} else if (subcommand === "process" || subcommand === "proc") {
|
|
@@ -372,7 +372,7 @@ async function main() {
|
|
|
372
372
|
console.error("svamp process: Process commands are not available in sandboxed sessions.");
|
|
373
373
|
process.exit(1);
|
|
374
374
|
}
|
|
375
|
-
const { processCommand } = await import('./commands-
|
|
375
|
+
const { processCommand } = await import('./commands-B9eaRA8O.mjs');
|
|
376
376
|
let machineId;
|
|
377
377
|
const processArgs = args.slice(1);
|
|
378
378
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -386,18 +386,18 @@ async function main() {
|
|
|
386
386
|
}), machineId);
|
|
387
387
|
process.exit(0);
|
|
388
388
|
} else if (subcommand === "issue" || subcommand === "issues") {
|
|
389
|
-
const { issueCommand } = await import('./commands-
|
|
389
|
+
const { issueCommand } = await import('./commands-Blddcoeh.mjs');
|
|
390
390
|
await issueCommand(args.slice(1));
|
|
391
391
|
process.exit(0);
|
|
392
392
|
} else if (subcommand === "workflow" || subcommand === "workflows") {
|
|
393
|
-
const { workflowCommand } = await import('./commands-
|
|
393
|
+
const { workflowCommand } = await import('./commands-eDMV8Q8q.mjs');
|
|
394
394
|
await workflowCommand(args.slice(1));
|
|
395
395
|
process.exit(0);
|
|
396
396
|
} else if (subcommand === "wise-agent" || subcommand === "wise") {
|
|
397
397
|
await handleWiseAgentCommand(args.slice(1));
|
|
398
398
|
process.exit(0);
|
|
399
399
|
} else if (subcommand === "feature" || subcommand === "crew") {
|
|
400
|
-
const { crewCommand } = await import('./commands-
|
|
400
|
+
const { crewCommand } = await import('./commands-CuSO_rgw.mjs');
|
|
401
401
|
await crewCommand(args.slice(1));
|
|
402
402
|
process.exit(0);
|
|
403
403
|
} else if (subcommand === "--help" || subcommand === "-h") {
|
|
@@ -405,7 +405,7 @@ async function main() {
|
|
|
405
405
|
} else if (!subcommand || subcommand === "start") {
|
|
406
406
|
await handleInteractiveCommand();
|
|
407
407
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
408
|
-
const pkg = await import('./package-
|
|
408
|
+
const pkg = await import('./package-C2CWKEW-.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
409
409
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
410
410
|
} else {
|
|
411
411
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -414,7 +414,7 @@ async function main() {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
async function handleInteractiveCommand() {
|
|
417
|
-
const { runInteractive } = await import('./run-
|
|
417
|
+
const { runInteractive } = await import('./run-BPNXOI3F.mjs');
|
|
418
418
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
419
419
|
let directory = process.cwd();
|
|
420
420
|
let resumeSessionId;
|
|
@@ -459,7 +459,7 @@ async function handleAgentCommand() {
|
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
461
|
if (agentArgs[0] === "list") {
|
|
462
|
-
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-
|
|
462
|
+
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.ao; });
|
|
463
463
|
console.log("Known agents:");
|
|
464
464
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
465
465
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -471,7 +471,7 @@ async function handleAgentCommand() {
|
|
|
471
471
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
472
472
|
return;
|
|
473
473
|
}
|
|
474
|
-
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-
|
|
474
|
+
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.ao; });
|
|
475
475
|
let cwd = process.cwd();
|
|
476
476
|
const filteredArgs = [];
|
|
477
477
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -495,12 +495,12 @@ async function handleAgentCommand() {
|
|
|
495
495
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
496
496
|
let backend;
|
|
497
497
|
if (KNOWN_MCP_AGENTS[config.agentName]) {
|
|
498
|
-
const { CodexMcpBackend } = await import('./run-
|
|
498
|
+
const { CodexMcpBackend } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.ap; });
|
|
499
499
|
backend = new CodexMcpBackend({ cwd, log: logFn });
|
|
500
500
|
} else {
|
|
501
|
-
const { AcpBackend } = await import('./run-
|
|
502
|
-
const { GeminiTransport } = await import('./run-
|
|
503
|
-
const { DefaultTransport } = await import('./run-
|
|
501
|
+
const { AcpBackend } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.an; });
|
|
502
|
+
const { GeminiTransport } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.aq; });
|
|
503
|
+
const { DefaultTransport } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.am; });
|
|
504
504
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
505
505
|
backend = new AcpBackend({
|
|
506
506
|
agentName: config.agentName,
|
|
@@ -627,7 +627,7 @@ async function handleSessionCommand() {
|
|
|
627
627
|
process.exit(1);
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
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-
|
|
630
|
+
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-BkroIJOC.mjs');
|
|
631
631
|
const parseFlagStr = (flag, shortFlag) => {
|
|
632
632
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
633
633
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -695,7 +695,7 @@ async function handleSessionCommand() {
|
|
|
695
695
|
allowDomain.push(sessionArgs[++i]);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
const { parseShareArg } = await import('./commands-
|
|
698
|
+
const { parseShareArg } = await import('./commands-BkroIJOC.mjs');
|
|
699
699
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
700
700
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
701
701
|
message,
|
|
@@ -759,7 +759,8 @@ async function handleSessionCommand() {
|
|
|
759
759
|
await sessionAttach(sessionArgs[1], targetMachineId);
|
|
760
760
|
} else if (sessionSubcommand === "send") {
|
|
761
761
|
if (!sessionArgs[1] || !sessionArgs[2]) {
|
|
762
|
-
console.error('Usage: svamp session send <session-id> <message> [--model <id>] [--plain] [--subject "..."] [--urgency urgent|normal] [--wait] [--response] [--btw] [--require-approval] [--timeout N] [--json]');
|
|
762
|
+
console.error('Usage: svamp session send <session-id> <message> [--model <id>] [--plain] [--subject "..."] [--when-idle] [--urgency urgent|normal] [--wait] [--response] [--btw] [--require-approval] [--timeout N] [--json]');
|
|
763
|
+
console.error(" --when-idle Deferred delivery: park the message and let the recipient handle it on its next idle turn (default is urgent \u2014 wakes immediately).");
|
|
763
764
|
console.error(" --model <id> Switch the session model (e.g. claude-opus-4-7, claude-sonnet-4-6) before delivering the message \u2014 forces a respawn.");
|
|
764
765
|
process.exit(1);
|
|
765
766
|
}
|
|
@@ -771,6 +772,7 @@ async function handleSessionCommand() {
|
|
|
771
772
|
timeout: parseFlagInt("--timeout"),
|
|
772
773
|
json: hasFlag("--json"),
|
|
773
774
|
subject: parseFlagStr("--subject"),
|
|
775
|
+
whenIdle: hasFlag("--when-idle"),
|
|
774
776
|
urgency: parseFlagStr("--urgency"),
|
|
775
777
|
model: parseFlagStr("--model"),
|
|
776
778
|
plain: hasFlag("--plain"),
|
|
@@ -783,7 +785,7 @@ async function handleSessionCommand() {
|
|
|
783
785
|
console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
|
|
784
786
|
process.exit(1);
|
|
785
787
|
}
|
|
786
|
-
const { sessionEditMessage } = await import('./commands-
|
|
788
|
+
const { sessionEditMessage } = await import('./commands-BkroIJOC.mjs');
|
|
787
789
|
await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
788
790
|
} else if (sessionSubcommand === "refine") {
|
|
789
791
|
if (!sessionArgs[1] || !sessionArgs[2]) {
|
|
@@ -791,7 +793,7 @@ async function handleSessionCommand() {
|
|
|
791
793
|
console.error(" Asks the agent to revise its latest reply in place (no extra round).");
|
|
792
794
|
process.exit(1);
|
|
793
795
|
}
|
|
794
|
-
const { sessionRefineLastReply } = await import('./commands-
|
|
796
|
+
const { sessionRefineLastReply } = await import('./commands-BkroIJOC.mjs');
|
|
795
797
|
await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
|
|
796
798
|
} else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
|
|
797
799
|
if (!sessionArgs[1]) {
|
|
@@ -799,7 +801,7 @@ async function handleSessionCommand() {
|
|
|
799
801
|
console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
|
|
800
802
|
process.exit(1);
|
|
801
803
|
}
|
|
802
|
-
const { sessionUndoEdit } = await import('./commands-
|
|
804
|
+
const { sessionUndoEdit } = await import('./commands-BkroIJOC.mjs');
|
|
803
805
|
await sessionUndoEdit(sessionArgs[1], targetMachineId);
|
|
804
806
|
} else if (sessionSubcommand === "query") {
|
|
805
807
|
const dir = sessionArgs[1];
|
|
@@ -809,7 +811,7 @@ async function handleSessionCommand() {
|
|
|
809
811
|
console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
|
|
810
812
|
process.exit(1);
|
|
811
813
|
}
|
|
812
|
-
const { sessionQuery } = await import('./commands-
|
|
814
|
+
const { sessionQuery } = await import('./commands-BkroIJOC.mjs');
|
|
813
815
|
await sessionQuery(dir, prompt, targetMachineId, {
|
|
814
816
|
timeout: parseFlagInt("--timeout"),
|
|
815
817
|
json: hasFlag("--json"),
|
|
@@ -842,7 +844,7 @@ async function handleSessionCommand() {
|
|
|
842
844
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
843
845
|
process.exit(1);
|
|
844
846
|
}
|
|
845
|
-
const { sessionApprove } = await import('./commands-
|
|
847
|
+
const { sessionApprove } = await import('./commands-BkroIJOC.mjs');
|
|
846
848
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
847
849
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
848
850
|
json: hasFlag("--json")
|
|
@@ -852,7 +854,7 @@ async function handleSessionCommand() {
|
|
|
852
854
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
853
855
|
process.exit(1);
|
|
854
856
|
}
|
|
855
|
-
const { sessionDeny } = await import('./commands-
|
|
857
|
+
const { sessionDeny } = await import('./commands-BkroIJOC.mjs');
|
|
856
858
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
857
859
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
858
860
|
json: hasFlag("--json")
|
|
@@ -897,7 +899,7 @@ async function handleSessionCommand() {
|
|
|
897
899
|
console.error("Usage: svamp session set-title <title>");
|
|
898
900
|
process.exit(1);
|
|
899
901
|
}
|
|
900
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
902
|
+
const { sessionSetTitle } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
901
903
|
await sessionSetTitle(title);
|
|
902
904
|
} else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
|
|
903
905
|
const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
@@ -905,7 +907,7 @@ async function handleSessionCommand() {
|
|
|
905
907
|
console.error("Usage: svamp session set-project-description <text>");
|
|
906
908
|
process.exit(1);
|
|
907
909
|
}
|
|
908
|
-
const { sessionSetProjectDescription } = await import('./agentCommands-
|
|
910
|
+
const { sessionSetProjectDescription } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
909
911
|
await sessionSetProjectDescription(desc);
|
|
910
912
|
} else if (sessionSubcommand === "set-link") {
|
|
911
913
|
const url = sessionArgs[1];
|
|
@@ -914,11 +916,11 @@ async function handleSessionCommand() {
|
|
|
914
916
|
process.exit(1);
|
|
915
917
|
}
|
|
916
918
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
917
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
919
|
+
const { sessionSetLink } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
918
920
|
await sessionSetLink(url, label);
|
|
919
921
|
} else if (sessionSubcommand === "link") {
|
|
920
922
|
const op = sessionArgs[1];
|
|
921
|
-
const lm = await import('./agentCommands-
|
|
923
|
+
const lm = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
922
924
|
if (op === "add") {
|
|
923
925
|
const url = sessionArgs[2];
|
|
924
926
|
if (!url || url.startsWith("--")) {
|
|
@@ -953,7 +955,7 @@ async function handleSessionCommand() {
|
|
|
953
955
|
process.exit(1);
|
|
954
956
|
}
|
|
955
957
|
const level = parseFlagStr("--level") || "info";
|
|
956
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
958
|
+
const { sessionNotify } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
957
959
|
await sessionNotify(message, level);
|
|
958
960
|
} else if (sessionSubcommand === "broadcast") {
|
|
959
961
|
const action = sessionArgs[1];
|
|
@@ -961,7 +963,7 @@ async function handleSessionCommand() {
|
|
|
961
963
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
962
964
|
process.exit(1);
|
|
963
965
|
}
|
|
964
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
966
|
+
const { sessionBroadcast } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
965
967
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
966
968
|
} else if (sessionSubcommand === "inbox") {
|
|
967
969
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -972,7 +974,7 @@ async function handleSessionCommand() {
|
|
|
972
974
|
process.exit(1);
|
|
973
975
|
}
|
|
974
976
|
if (agentSessionId) {
|
|
975
|
-
const { inboxSend } = await import('./agentCommands-
|
|
977
|
+
const { inboxSend } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
976
978
|
await inboxSend(sessionArgs[2], {
|
|
977
979
|
body: sessionArgs[3],
|
|
978
980
|
subject: parseFlagStr("--subject"),
|
|
@@ -987,7 +989,7 @@ async function handleSessionCommand() {
|
|
|
987
989
|
}
|
|
988
990
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
989
991
|
if (agentSessionId && !sessionArgs[2]) {
|
|
990
|
-
const { inboxList } = await import('./agentCommands-
|
|
992
|
+
const { inboxList } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
991
993
|
await inboxList({
|
|
992
994
|
unread: hasFlag("--unread"),
|
|
993
995
|
limit: parseFlagInt("--limit"),
|
|
@@ -1009,7 +1011,7 @@ async function handleSessionCommand() {
|
|
|
1009
1011
|
process.exit(1);
|
|
1010
1012
|
}
|
|
1011
1013
|
if (agentSessionId && !sessionArgs[3]) {
|
|
1012
|
-
const { inboxList } = await import('./agentCommands-
|
|
1014
|
+
const { inboxList } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
1013
1015
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
1014
1016
|
} else if (sessionArgs[3]) {
|
|
1015
1017
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -1019,7 +1021,7 @@ async function handleSessionCommand() {
|
|
|
1019
1021
|
}
|
|
1020
1022
|
} else if (inboxSubcmd === "reply") {
|
|
1021
1023
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
1022
|
-
const { inboxReply } = await import('./agentCommands-
|
|
1024
|
+
const { inboxReply } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
1023
1025
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
1024
1026
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
1025
1027
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -1057,7 +1059,7 @@ async function handleMachineCommand() {
|
|
|
1057
1059
|
return;
|
|
1058
1060
|
}
|
|
1059
1061
|
if (machineSubcommand === "share") {
|
|
1060
|
-
const { machineShare } = await import('./commands-
|
|
1062
|
+
const { machineShare } = await import('./commands-BkroIJOC.mjs');
|
|
1061
1063
|
let machineId;
|
|
1062
1064
|
const shareArgs = [];
|
|
1063
1065
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -1108,14 +1110,14 @@ async function handleMachineCommand() {
|
|
|
1108
1110
|
process.exit(1);
|
|
1109
1111
|
}
|
|
1110
1112
|
if (all) {
|
|
1111
|
-
const { fleetExec } = await import('./fleet-
|
|
1113
|
+
const { fleetExec } = await import('./fleet-CNmpoV_Q.mjs');
|
|
1112
1114
|
await fleetExec(command, { cwd });
|
|
1113
1115
|
} else {
|
|
1114
|
-
const { machineExec } = await import('./commands-
|
|
1116
|
+
const { machineExec } = await import('./commands-BkroIJOC.mjs');
|
|
1115
1117
|
await machineExec(machineId, command, cwd);
|
|
1116
1118
|
}
|
|
1117
1119
|
} else if (machineSubcommand === "info") {
|
|
1118
|
-
const { machineInfo } = await import('./commands-
|
|
1120
|
+
const { machineInfo } = await import('./commands-BkroIJOC.mjs');
|
|
1119
1121
|
let machineId;
|
|
1120
1122
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
1121
1123
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -1135,10 +1137,10 @@ async function handleMachineCommand() {
|
|
|
1135
1137
|
level = machineArgs[++i];
|
|
1136
1138
|
}
|
|
1137
1139
|
}
|
|
1138
|
-
const { machineNotify } = await import('./agentCommands-
|
|
1140
|
+
const { machineNotify } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
1139
1141
|
await machineNotify(message, level);
|
|
1140
1142
|
} else if (machineSubcommand === "ls") {
|
|
1141
|
-
const { machineLs } = await import('./commands-
|
|
1143
|
+
const { machineLs } = await import('./commands-BkroIJOC.mjs');
|
|
1142
1144
|
let machineId;
|
|
1143
1145
|
let showHidden = false;
|
|
1144
1146
|
let path;
|
|
@@ -1197,20 +1199,20 @@ Examples:
|
|
|
1197
1199
|
};
|
|
1198
1200
|
const hasFlag = (name) => fleetArgs.includes(`--${name}`);
|
|
1199
1201
|
if (sub === "status") {
|
|
1200
|
-
const { fleetStatus } = await import('./fleet-
|
|
1202
|
+
const { fleetStatus } = await import('./fleet-CNmpoV_Q.mjs');
|
|
1201
1203
|
await fleetStatus();
|
|
1202
1204
|
} else if (sub === "upgrade-claude") {
|
|
1203
|
-
const { fleetUpgradeClaude } = await import('./fleet-
|
|
1205
|
+
const { fleetUpgradeClaude } = await import('./fleet-CNmpoV_Q.mjs');
|
|
1204
1206
|
await fleetUpgradeClaude({ version: flag("version", "-v") });
|
|
1205
1207
|
} else if (sub === "upgrade-svamp") {
|
|
1206
|
-
const { fleetUpgradeSvamp } = await import('./fleet-
|
|
1208
|
+
const { fleetUpgradeSvamp } = await import('./fleet-CNmpoV_Q.mjs');
|
|
1207
1209
|
await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self"), force: hasFlag("force") });
|
|
1208
1210
|
} else if (sub === "daemon-restart") {
|
|
1209
|
-
const { fleetDaemonRestart } = await import('./fleet-
|
|
1211
|
+
const { fleetDaemonRestart } = await import('./fleet-CNmpoV_Q.mjs');
|
|
1210
1212
|
await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
|
|
1211
1213
|
} else if (sub === "push-skill") {
|
|
1212
1214
|
const name = fleetArgs[1];
|
|
1213
|
-
const { fleetPushSkill } = await import('./fleet-
|
|
1215
|
+
const { fleetPushSkill } = await import('./fleet-CNmpoV_Q.mjs');
|
|
1214
1216
|
await fleetPushSkill(name);
|
|
1215
1217
|
} else {
|
|
1216
1218
|
console.error(`Unknown fleet subcommand: ${sub}`);
|
|
@@ -1226,7 +1228,7 @@ async function handleSkillsCommand() {
|
|
|
1226
1228
|
await printSkillsHelp();
|
|
1227
1229
|
return;
|
|
1228
1230
|
}
|
|
1229
|
-
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-
|
|
1231
|
+
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-Cg3yUhp1.mjs');
|
|
1230
1232
|
if (skillsSubcommand === "find" || skillsSubcommand === "search") {
|
|
1231
1233
|
const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1232
1234
|
if (!query) {
|
|
@@ -1273,7 +1275,7 @@ async function loginToHypha() {
|
|
|
1273
1275
|
process.exit(1);
|
|
1274
1276
|
}
|
|
1275
1277
|
const anchor = anchorArg.replace(/\/+$/, "");
|
|
1276
|
-
const { loadInstanceConfig } = await import('./run-
|
|
1278
|
+
const { loadInstanceConfig } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.ar; });
|
|
1277
1279
|
let cfg = null;
|
|
1278
1280
|
try {
|
|
1279
1281
|
cfg = await loadInstanceConfig({ anchor, force: true });
|
|
@@ -1384,7 +1386,7 @@ async function logoutFromHypha() {
|
|
|
1384
1386
|
} catch {
|
|
1385
1387
|
}
|
|
1386
1388
|
try {
|
|
1387
|
-
const { clearInstanceConfigCache } = await import('./run-
|
|
1389
|
+
const { clearInstanceConfigCache } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.ar; });
|
|
1388
1390
|
clearInstanceConfigCache();
|
|
1389
1391
|
} catch {
|
|
1390
1392
|
}
|
|
@@ -1630,7 +1632,7 @@ Commands:
|
|
|
1630
1632
|
|
|
1631
1633
|
Session management (requires daemon running):
|
|
1632
1634
|
svamp session spawn <agent> [opts] Spawn a new agent session (agents: claude, gemini, codex)
|
|
1633
|
-
svamp session send <id> <message> Send message to a session (
|
|
1635
|
+
svamp session send <id> <message> Send message to a session (urgent by default \u2014 wakes the recipient; --when-idle to defer to their next idle turn)
|
|
1634
1636
|
svamp session query <dir> <prompt> Stateless one-shot: spawn \u2192 ask \u2192 answer \u2192 delete
|
|
1635
1637
|
svamp session wait <id> Wait for agent to become idle
|
|
1636
1638
|
svamp session messages <id> Show message history (--last N, --json, --raw)
|
|
@@ -1723,7 +1725,7 @@ async function applyClaudeAuthFlags(argv) {
|
|
|
1723
1725
|
"--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
|
|
1724
1726
|
);
|
|
1725
1727
|
}
|
|
1726
|
-
const mod = await import('./run-
|
|
1728
|
+
const mod = await import('./run-BNxaekWa.mjs').then(function (n) { return n.ak; });
|
|
1727
1729
|
if (hasHypha) {
|
|
1728
1730
|
let url;
|
|
1729
1731
|
const hyphaIdx = argv.indexOf("--use-hypha-proxy");
|
|
@@ -1777,7 +1779,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1777
1779
|
}
|
|
1778
1780
|
}
|
|
1779
1781
|
if (collected.length === 0) return;
|
|
1780
|
-
const { updateEnvFile } = await import('./run-
|
|
1782
|
+
const { updateEnvFile } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.ak; });
|
|
1781
1783
|
const seen = /* @__PURE__ */ new Set();
|
|
1782
1784
|
const deduped = collected.filter((e) => {
|
|
1783
1785
|
const k = e.toLowerCase();
|
|
@@ -1810,7 +1812,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1810
1812
|
}
|
|
1811
1813
|
});
|
|
1812
1814
|
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(" ");
|
|
1813
|
-
const { wiseAskCli } = await import('./commands-
|
|
1815
|
+
const { wiseAskCli } = await import('./commands-BkroIJOC.mjs');
|
|
1814
1816
|
await wiseAskCli(machineId, message, sessionId, { json });
|
|
1815
1817
|
return;
|
|
1816
1818
|
}
|
|
@@ -1822,7 +1824,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1822
1824
|
}
|
|
1823
1825
|
return void 0;
|
|
1824
1826
|
};
|
|
1825
|
-
const { runWiseVoiceCli } = await import('./headlessCli-
|
|
1827
|
+
const { runWiseVoiceCli } = await import('./headlessCli-DGTHnPjT.mjs');
|
|
1826
1828
|
await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
|
|
1827
1829
|
return;
|
|
1828
1830
|
}
|
|
@@ -1840,7 +1842,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1840
1842
|
const mode = valueOf(["--mode"]);
|
|
1841
1843
|
const mission = valueOf(["--mission"]);
|
|
1842
1844
|
const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
|
|
1843
|
-
const { wiseJoinMeetingCli } = await import('./commands-
|
|
1845
|
+
const { wiseJoinMeetingCli } = await import('./commands-BkroIJOC.mjs');
|
|
1844
1846
|
await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
|
|
1845
1847
|
return;
|
|
1846
1848
|
}
|
|
@@ -1852,7 +1854,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1852
1854
|
}
|
|
1853
1855
|
return void 0;
|
|
1854
1856
|
};
|
|
1855
|
-
const { wiseLeaveMeetingCli } = await import('./commands-
|
|
1857
|
+
const { wiseLeaveMeetingCli } = await import('./commands-BkroIJOC.mjs');
|
|
1856
1858
|
await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
|
|
1857
1859
|
return;
|
|
1858
1860
|
}
|
|
@@ -1876,7 +1878,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1876
1878
|
}
|
|
1877
1879
|
});
|
|
1878
1880
|
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(" ");
|
|
1879
|
-
const { wiseAnnounceCli } = await import('./commands-
|
|
1881
|
+
const { wiseAnnounceCli } = await import('./commands-BkroIJOC.mjs');
|
|
1880
1882
|
await wiseAnnounceCli(machineId, text, sessionId, { json });
|
|
1881
1883
|
return;
|
|
1882
1884
|
}
|
|
@@ -1888,7 +1890,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1888
1890
|
}
|
|
1889
1891
|
return void 0;
|
|
1890
1892
|
};
|
|
1891
|
-
const { wiseMeetingsCli } = await import('./commands-
|
|
1893
|
+
const { wiseMeetingsCli } = await import('./commands-BkroIJOC.mjs');
|
|
1892
1894
|
await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
|
|
1893
1895
|
return;
|
|
1894
1896
|
}
|
|
@@ -1938,7 +1940,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1938
1940
|
return;
|
|
1939
1941
|
}
|
|
1940
1942
|
const authArgs = rest.slice(1);
|
|
1941
|
-
const mod = await import('./auth-
|
|
1943
|
+
const mod = await import('./auth-dxadQh0v.mjs');
|
|
1942
1944
|
let action;
|
|
1943
1945
|
try {
|
|
1944
1946
|
action = mod.parseWiseAgentAuthArgs(authArgs);
|
|
@@ -1948,7 +1950,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1948
1950
|
return;
|
|
1949
1951
|
}
|
|
1950
1952
|
if (action) {
|
|
1951
|
-
const { updateEnvFile } = await import('./run-
|
|
1953
|
+
const { updateEnvFile } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.ak; });
|
|
1952
1954
|
const updates = mod.buildWiseAgentEnvUpdates(action);
|
|
1953
1955
|
updateEnvFile(updates);
|
|
1954
1956
|
for (const [k, v] of Object.entries(updates)) {
|
|
@@ -1962,7 +1964,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1962
1964
|
}
|
|
1963
1965
|
async function handleDaemonAuthCommand(argv) {
|
|
1964
1966
|
const sub = (argv[0] || "status").toLowerCase();
|
|
1965
|
-
const mod = await import('./run-
|
|
1967
|
+
const mod = await import('./run-BNxaekWa.mjs').then(function (n) { return n.ak; });
|
|
1966
1968
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
1967
1969
|
console.log(`
|
|
1968
1970
|
svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
|
|
@@ -2077,14 +2079,19 @@ COMMANDS:
|
|
|
2077
2079
|
same-user sessions on other machines, and how to reach them (alias: env)
|
|
2078
2080
|
|
|
2079
2081
|
Communicate:
|
|
2080
|
-
send <id> <message> [--wait] [--response] [--btw] [--require-approval] [--timeout N] [--json] [--urgency urgent|normal]
|
|
2082
|
+
send <id> <message> [--when-idle] [--wait] [--response] [--btw] [--require-approval] [--timeout N] [--json] [--urgency urgent|normal]
|
|
2081
2083
|
Send a message to a running session.
|
|
2082
|
-
By default this is
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2084
|
+
By default this is URGENT: it wakes the recipient so they
|
|
2085
|
+
handle it promptly. Pass --when-idle to defer instead \u2014
|
|
2086
|
+
the message lands in the peer's inbox and is processed on
|
|
2087
|
+
their next idle turn (no interrupt). Loop safeguard: a send
|
|
2088
|
+
issued from a turn that was itself triggered by an inbox
|
|
2089
|
+
message is always forced non-urgent (no recursive wake
|
|
2090
|
+
cascades); the daemon's per-sender rate limit + circuit
|
|
2091
|
+
breaker further bound any storm.
|
|
2092
|
+
--when-idle defer: handle on the recipient's
|
|
2093
|
+
next idle turn (opposite of the
|
|
2094
|
+
urgent default)
|
|
2088
2095
|
--wait block until the agent goes idle
|
|
2089
2096
|
--response block AND print the agent's
|
|
2090
2097
|
text answer (implies --wait)
|
|
@@ -2276,7 +2283,7 @@ Examples:
|
|
|
2276
2283
|
async function printSkillsHelp() {
|
|
2277
2284
|
let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
|
|
2278
2285
|
try {
|
|
2279
|
-
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-
|
|
2286
|
+
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-BNxaekWa.mjs').then(function (n) { return n.as; });
|
|
2280
2287
|
browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
|
|
2281
2288
|
} catch {
|
|
2282
2289
|
}
|
|
@@ -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-BkroIJOC.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-BNxaekWa.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -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-DoUUUoZn.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-BkroIJOC.mjs');
|
|
72
72
|
const { server, machine } = await connectAndGetMachine();
|
|
73
73
|
try {
|
|
74
74
|
const status = await machine.tunnelStart({
|
|
@@ -90,7 +90,7 @@ async function serviceExpose(args) {
|
|
|
90
90
|
console.log(` port ${port}: ${url}`);
|
|
91
91
|
}
|
|
92
92
|
if (process.env.SVAMP_SESSION_ID) {
|
|
93
|
-
const { autoAddSessionLink } = await import('./agentCommands-
|
|
93
|
+
const { autoAddSessionLink } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
94
94
|
let added = 0;
|
|
95
95
|
for (const [port, url] of urlEntries) {
|
|
96
96
|
const label = urlEntries.length > 1 ? `${name}:${port}` : name;
|
|
@@ -136,7 +136,7 @@ async function serviceServe(args) {
|
|
|
136
136
|
};
|
|
137
137
|
process.on("SIGINT", cleanup);
|
|
138
138
|
process.on("SIGTERM", cleanup);
|
|
139
|
-
const { runFrpcTunnel } = await import('./frpc-
|
|
139
|
+
const { runFrpcTunnel } = await import('./frpc-DoUUUoZn.mjs');
|
|
140
140
|
await runFrpcTunnel(name, [caddyPort]);
|
|
141
141
|
} catch (err) {
|
|
142
142
|
console.error(`Error serving directory: ${err.message}`);
|
|
@@ -145,7 +145,7 @@ async function serviceServe(args) {
|
|
|
145
145
|
}
|
|
146
146
|
async function serviceList(_args) {
|
|
147
147
|
try {
|
|
148
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
148
|
+
const { connectAndGetMachine } = await import('./commands-BkroIJOC.mjs');
|
|
149
149
|
const { server, machine } = await connectAndGetMachine();
|
|
150
150
|
try {
|
|
151
151
|
const tunnels = await machine.tunnelList({});
|
|
@@ -185,7 +185,7 @@ async function serviceDelete(args) {
|
|
|
185
185
|
process.exit(1);
|
|
186
186
|
}
|
|
187
187
|
try {
|
|
188
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
188
|
+
const { connectAndGetMachine } = await import('./commands-BkroIJOC.mjs');
|
|
189
189
|
const { server, machine } = await connectAndGetMachine();
|
|
190
190
|
try {
|
|
191
191
|
await machine.tunnelStop({ name });
|
|
@@ -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 { a2 as formatHandle, a3 as normalizeAllowedUser, a4 as loadSecurityContextConfig, a5 as resolveSecurityContext, a6 as buildSecurityContextFromFlags, a7 as mergeSecurityContexts, c as connectToHypha, a8 as buildSessionShareUrl, a9 as computeOutboundHop, k as shortId, aa as registerAwaitingReply, ab as buildMachineShareUrl, ac as parseHandle, ad as handleMatchesMetadata } from './run-
|
|
5
|
+
import { a2 as formatHandle, a3 as normalizeAllowedUser, a4 as loadSecurityContextConfig, a5 as resolveSecurityContext, a6 as buildSecurityContextFromFlags, a7 as mergeSecurityContexts, c as connectToHypha, a8 as buildSessionShareUrl, a9 as computeOutboundHop, k as shortId, aa as registerAwaitingReply, ab as buildMachineShareUrl, ac as parseHandle, ad as handleMatchesMetadata } from './run-BNxaekWa.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -1670,6 +1670,12 @@ function isSelfBtw(fullId, btw, selfSessionId) {
|
|
|
1670
1670
|
return !!btw && !!selfSessionId && fullId === selfSessionId;
|
|
1671
1671
|
}
|
|
1672
1672
|
function validateSendOptions(opts) {
|
|
1673
|
+
if (opts?.whenIdle && opts.urgency) {
|
|
1674
|
+
return ["--when-idle (mutually exclusive with --urgency)"];
|
|
1675
|
+
}
|
|
1676
|
+
if (opts?.whenIdle && (opts.wait || opts.response)) {
|
|
1677
|
+
return [`--when-idle (incompatible with ${opts.wait ? "--wait" : "--response"})`];
|
|
1678
|
+
}
|
|
1673
1679
|
if (opts?.plain) {
|
|
1674
1680
|
const bad = [];
|
|
1675
1681
|
if (opts.btw) bad.push("--btw");
|
|
@@ -1680,6 +1686,7 @@ function validateSendOptions(opts) {
|
|
|
1680
1686
|
const incompatible = [];
|
|
1681
1687
|
if (opts.subject) incompatible.push("--subject");
|
|
1682
1688
|
if (opts.urgency) incompatible.push("--urgency");
|
|
1689
|
+
if (opts.whenIdle) incompatible.push("--when-idle");
|
|
1683
1690
|
if (opts.wait) incompatible.push("--wait");
|
|
1684
1691
|
if (opts.response) incompatible.push("--response");
|
|
1685
1692
|
if (opts.model) incompatible.push("--model");
|
|
@@ -1817,7 +1824,7 @@ async function sendCore(machine, fullId, message, opts) {
|
|
|
1817
1824
|
const preSeq = wantResponse ? await snapshotLatestSeq(machine, fullId) : 0;
|
|
1818
1825
|
const callerSessionId = process.env.SVAMP_SESSION_ID;
|
|
1819
1826
|
const hop = computeOutboundHop(callerSessionId);
|
|
1820
|
-
let urgency = opts?.urgency ? opts.urgency :
|
|
1827
|
+
let urgency = opts?.urgency ? opts.urgency : opts?.whenIdle ? "normal" : "urgent";
|
|
1821
1828
|
if (hop.fromInboxTurn) urgency = "normal";
|
|
1822
1829
|
const inboxMessage = {
|
|
1823
1830
|
messageId: shortId(),
|
|
@@ -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 { n as resolveProjectRoot, x as searchIssues, w as listIssues, p as resumeIssue, q as pauseIssue, t as addComment, u as updateIssue, o as getIssue, y as isVisibleTo, L as summarize, v as addIssue } from './run-
|
|
4
|
+
import { n as resolveProjectRoot, x as searchIssues, w as listIssues, p as resumeIssue, q as pauseIssue, t as addComment, u as updateIssue, o as getIssue, y as isVisibleTo, L as summarize, v as addIssue } from './run-BNxaekWa.mjs';
|
|
5
5
|
import 'os';
|
|
6
6
|
import 'fs/promises';
|
|
7
7
|
import 'fs';
|
|
@@ -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 { T as parseFrontmatter, U as getSkillsServer, V as getSkillsWorkspaceName, W as getSkillsCollectionName, X as fetchWithTimeout, Y as searchSkills, Z as SKILLS_DIR, _ as getSkillInfo, $ as downloadSkillFile, a0 as listSkillFiles } from './run-
|
|
4
|
+
import { T as parseFrontmatter, U as getSkillsServer, V as getSkillsWorkspaceName, W as getSkillsCollectionName, X as fetchWithTimeout, Y as searchSkills, Z as SKILLS_DIR, _ as getSkillInfo, $ as downloadSkillFile, a0 as listSkillFiles } from './run-BNxaekWa.mjs';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'url';
|
|
7
7
|
import 'child_process';
|
|
@@ -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-BkroIJOC.mjs';
|
|
4
4
|
import { execSync } from 'node:child_process';
|
|
5
|
-
import { u as updateIssue, t as addComment, v as addIssue, k as shortId } from './run-
|
|
5
|
+
import { u as updateIssue, t as addComment, v as addIssue, k as shortId } from './run-BNxaekWa.mjs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
|
-
import { n as resolveProjectRoot, M as workflowSteps, D as setWorkflowEnabled, I as isWorkflowEnabled, E as removeWorkflow, B as getWorkflow, H as listWorkflows, F as saveWorkflow, G as rawWorkflow } from './run-
|
|
2
|
+
import { n as resolveProjectRoot, M as workflowSteps, D as setWorkflowEnabled, I as isWorkflowEnabled, E as removeWorkflow, B as getWorkflow, H as listWorkflows, F as saveWorkflow, G as rawWorkflow } from './run-BNxaekWa.mjs';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
import 'fs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import os from 'node:os';
|
|
4
|
-
import { c as connectToHypha } from './run-
|
|
4
|
+
import { c as connectToHypha } from './run-BNxaekWa.mjs';
|
|
5
5
|
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-ivV7xAp3.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-BNxaekWa.mjs';
|
|
8
8
|
import 'fs/promises';
|
|
9
9
|
import 'url';
|
|
10
10
|
import 'node:crypto';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a1 as resolveModel, ae as describeMisconfiguration, af as buildMachineDeps } from './run-
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { a1 as resolveModel, ae as describeMisconfiguration, af as buildMachineDeps } from './run-BNxaekWa.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-D6vgqNiq.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-BNxaekWa.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as resolveProjectRoot, z as getRun, A as listRuns, B as getWorkflow, C as runWorkflow, D as setWorkflowEnabled, E as removeWorkflow, F as saveWorkflow, G as rawWorkflow, H as listWorkflows } from './run-
|
|
1
|
+
import { n as resolveProjectRoot, z as getRun, A as listRuns, B as getWorkflow, C as runWorkflow, D as setWorkflowEnabled, E as removeWorkflow, F as saveWorkflow, G as rawWorkflow, H as listWorkflows } from './run-BNxaekWa.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as resolveProjectRoot, u as updateIssue, o as getIssue, p as resumeIssue, q as pauseIssue, t as addComment, v as addIssue, w as listIssues, x as searchIssues, y as isVisibleTo } from './run-
|
|
1
|
+
import { n as resolveProjectRoot, u as updateIssue, o as getIssue, p as resumeIssue, q as pauseIssue, t as addComment, v as addIssue, w as listIssues, x as searchIssues, y as isVisibleTo } from './run-BNxaekWa.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1869,20 +1869,7 @@ class ChannelOutbox {
|
|
|
1869
1869
|
this.byChannel.delete(channelId);
|
|
1870
1870
|
this.seqByChannel.delete(channelId);
|
|
1871
1871
|
if (!existsSync(this.file)) return;
|
|
1872
|
-
|
|
1873
|
-
const kept = readFileSync(this.file, "utf8").split("\n").filter((l) => {
|
|
1874
|
-
if (!l.trim()) return false;
|
|
1875
|
-
try {
|
|
1876
|
-
return JSON.parse(l).channelId !== channelId;
|
|
1877
|
-
} catch {
|
|
1878
|
-
return false;
|
|
1879
|
-
}
|
|
1880
|
-
});
|
|
1881
|
-
const tmp = this.file + ".tmp";
|
|
1882
|
-
writeFileSync(tmp, kept.join("\n") + (kept.length ? "\n" : ""));
|
|
1883
|
-
renameSync(tmp, this.file);
|
|
1884
|
-
} catch {
|
|
1885
|
-
}
|
|
1872
|
+
this._compact();
|
|
1886
1873
|
}
|
|
1887
1874
|
}
|
|
1888
1875
|
|
|
@@ -2998,7 +2985,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
2998
2985
|
const tunnels = handlers.tunnels;
|
|
2999
2986
|
if (!tunnels) throw new Error("Tunnel management not available");
|
|
3000
2987
|
if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
|
|
3001
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
2988
|
+
const { FrpcTunnel } = await import('./frpc-DoUUUoZn.mjs');
|
|
3002
2989
|
const tunnel = new FrpcTunnel({
|
|
3003
2990
|
name: params.name,
|
|
3004
2991
|
ports: params.ports,
|
|
@@ -3223,6 +3210,11 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
3223
3210
|
};
|
|
3224
3211
|
let wired = false;
|
|
3225
3212
|
if (sid) {
|
|
3213
|
+
try {
|
|
3214
|
+
await authorizeSessionAccess(sid, "admin", context);
|
|
3215
|
+
} catch {
|
|
3216
|
+
return { success: false, error: `Not authorized: launching a meeting agent for session ${sid} requires admin access to that session.` };
|
|
3217
|
+
}
|
|
3226
3218
|
const sessionRpc = handlers.getSessionRPCHandlers?.(sid);
|
|
3227
3219
|
if (sessionRpc?.saveChannel) {
|
|
3228
3220
|
try {
|
|
@@ -3304,10 +3296,12 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
3304
3296
|
},
|
|
3305
3297
|
// Drives the title-bar "WISE in a meeting" indicator (poll per session).
|
|
3306
3298
|
wiseMeetingStatus: async (params, context) => {
|
|
3307
|
-
if (!roleAtLeast(getEffectiveRole(context, currentMetadata.sharing), "view")) {
|
|
3308
|
-
return { active: false, error: "Not authorized to view meeting status on this machine." };
|
|
3309
|
-
}
|
|
3310
3299
|
if (params?.sessionId) {
|
|
3300
|
+
try {
|
|
3301
|
+
await authorizeSessionAccess(params.sessionId, "view", context);
|
|
3302
|
+
} catch {
|
|
3303
|
+
return { active: false, error: `Not authorized to view meeting status for session ${params.sessionId}.` };
|
|
3304
|
+
}
|
|
3311
3305
|
const rec = activeMeetingAgents.get(params.sessionId);
|
|
3312
3306
|
let transcript = [];
|
|
3313
3307
|
try {
|
|
@@ -3317,6 +3311,9 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
3317
3311
|
}
|
|
3318
3312
|
return { active: !!rec, meeting: rec || null, transcript };
|
|
3319
3313
|
}
|
|
3314
|
+
if (!roleAtLeast(getEffectiveRole(context, currentMetadata.sharing), "view")) {
|
|
3315
|
+
return { active: false, error: "Not authorized to view meeting status on this machine." };
|
|
3316
|
+
}
|
|
3320
3317
|
return { active: activeMeetingAgents.size > 0, meetings: Array.from(activeMeetingAgents.values()) };
|
|
3321
3318
|
},
|
|
3322
3319
|
// GAP 3 — post a chat message into the live meeting. The deep coding agent
|
|
@@ -3455,7 +3452,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
3455
3452
|
}
|
|
3456
3453
|
const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
|
|
3457
3454
|
const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
|
|
3458
|
-
const { toolsForRole } = await import('./sideband-
|
|
3455
|
+
const { toolsForRole } = await import('./sideband-D6vgqNiq.mjs');
|
|
3459
3456
|
const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
|
|
3460
3457
|
return fmt(r2);
|
|
3461
3458
|
}
|
|
@@ -3554,7 +3551,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
3554
3551
|
if (r.error || !r.sender) return { error: r.error || "unauthorized" };
|
|
3555
3552
|
const callId = "call_" + Math.random().toString(16).slice(2, 12);
|
|
3556
3553
|
const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
|
|
3557
|
-
const { queryCore } = await import('./commands-
|
|
3554
|
+
const { queryCore } = await import('./commands-BkroIJOC.mjs');
|
|
3558
3555
|
const timeout = c.reply?.timeout_sec || 120;
|
|
3559
3556
|
let result;
|
|
3560
3557
|
try {
|
|
@@ -10153,7 +10150,7 @@ class ProcessSupervisor {
|
|
|
10153
10150
|
/** Stop all managed processes (called on daemon shutdown). */
|
|
10154
10151
|
async stopAll() {
|
|
10155
10152
|
const ids = Array.from(this.entries.keys());
|
|
10156
|
-
await Promise.all(ids.map((id) => this.stop(id).catch(() => {
|
|
10153
|
+
await Promise.all(ids.map((id) => this.stop(id, { markDesiredStopped: false }).catch(() => {
|
|
10157
10154
|
})));
|
|
10158
10155
|
}
|
|
10159
10156
|
// ── Public API ────────────────────────────────────────────────────────────
|
|
@@ -10191,11 +10188,20 @@ class ProcessSupervisor {
|
|
|
10191
10188
|
throw new Error(`Process '${entry.spec.name}' is already running`);
|
|
10192
10189
|
}
|
|
10193
10190
|
entry.stopping = false;
|
|
10191
|
+
if (entry.spec.desiredStopped) {
|
|
10192
|
+
entry.spec.desiredStopped = false;
|
|
10193
|
+
await this.persistSpec(entry.spec);
|
|
10194
|
+
}
|
|
10194
10195
|
this.resetFailureTracking(entry);
|
|
10195
10196
|
await this.startEntry(entry, false);
|
|
10196
10197
|
}
|
|
10197
|
-
/**
|
|
10198
|
-
|
|
10198
|
+
/**
|
|
10199
|
+
* Stop a running process. Does NOT remove it from supervision.
|
|
10200
|
+
* @param opts.markDesiredStopped When true (default — an EXPLICIT user `stop`), persist
|
|
10201
|
+
* a desired-stopped intent so a daemon restart does not resurrect it. `stopAll` (a daemon
|
|
10202
|
+
* shutdown, not a user action) passes false so keepAlive processes auto-restore (#nightly).
|
|
10203
|
+
*/
|
|
10204
|
+
async stop(idOrName, opts) {
|
|
10199
10205
|
const entry = this.require(idOrName);
|
|
10200
10206
|
entry.stopping = true;
|
|
10201
10207
|
this.clearTimers(entry);
|
|
@@ -10206,6 +10212,10 @@ class ProcessSupervisor {
|
|
|
10206
10212
|
entry.state.status = "stopped";
|
|
10207
10213
|
entry.state.stoppedAt = Date.now();
|
|
10208
10214
|
entry.state.pid = void 0;
|
|
10215
|
+
if (opts?.markDesiredStopped !== false && !entry.deleted && !entry.spec.desiredStopped) {
|
|
10216
|
+
entry.spec.desiredStopped = true;
|
|
10217
|
+
await this.persistSpec(entry.spec);
|
|
10218
|
+
}
|
|
10209
10219
|
}
|
|
10210
10220
|
/** Restart a process (stop if running, then start again). */
|
|
10211
10221
|
async restart(idOrName) {
|
|
@@ -10223,6 +10233,10 @@ class ProcessSupervisor {
|
|
|
10223
10233
|
if (entry.deleted) return;
|
|
10224
10234
|
entry.stopping = false;
|
|
10225
10235
|
this.resetFailureTracking(entry);
|
|
10236
|
+
if (entry.spec.desiredStopped) {
|
|
10237
|
+
entry.spec.desiredStopped = false;
|
|
10238
|
+
await this.persistSpec(entry.spec);
|
|
10239
|
+
}
|
|
10226
10240
|
entry.state.restartCount++;
|
|
10227
10241
|
await this.startEntry(entry, false);
|
|
10228
10242
|
} finally {
|
|
@@ -10357,12 +10371,17 @@ class ProcessSupervisor {
|
|
|
10357
10371
|
const spec = JSON.parse(raw);
|
|
10358
10372
|
const entry = this.makeEntry(spec);
|
|
10359
10373
|
this.entries.set(spec.id, entry);
|
|
10360
|
-
if (spec.keepAlive) {
|
|
10374
|
+
if (spec.keepAlive && !spec.desiredStopped) {
|
|
10361
10375
|
await this.startEntry(
|
|
10362
10376
|
entry,
|
|
10363
10377
|
true
|
|
10364
10378
|
/* onRestore */
|
|
10365
10379
|
);
|
|
10380
|
+
} else if (spec.keepAlive && spec.desiredStopped) {
|
|
10381
|
+
entry.state.status = "stopped";
|
|
10382
|
+
if (spec.ttl !== void 0 && spec.ttl > 0) this.setupTTL(entry);
|
|
10383
|
+
} else if (spec.ttl !== void 0 && spec.ttl > 0) {
|
|
10384
|
+
this.setupTTL(entry);
|
|
10366
10385
|
}
|
|
10367
10386
|
loaded++;
|
|
10368
10387
|
} catch (err) {
|
|
@@ -10489,7 +10508,6 @@ class ProcessSupervisor {
|
|
|
10489
10508
|
const uptime = state.startedAt ? Date.now() - state.startedAt : 0;
|
|
10490
10509
|
const now = Date.now();
|
|
10491
10510
|
if (uptime > BACKOFF_RESET_WINDOW_MS) {
|
|
10492
|
-
state.restartCount = 0;
|
|
10493
10511
|
state.consecutiveFailures = 0;
|
|
10494
10512
|
entry.failureWindowStart = void 0;
|
|
10495
10513
|
} else {
|
|
@@ -12512,10 +12530,15 @@ function writeGoalLoopState(directory, sessionId, state) {
|
|
|
12512
12530
|
try {
|
|
12513
12531
|
const dir = getLoopDir(directory, sessionId);
|
|
12514
12532
|
mkdirSync$1(dir, { recursive: true });
|
|
12515
|
-
|
|
12533
|
+
atomicWriteLoopState(join$1(dir, "loop-state.json"), { session_id: sessionId, engine: "goal", ...state });
|
|
12516
12534
|
} catch {
|
|
12517
12535
|
}
|
|
12518
12536
|
}
|
|
12537
|
+
function atomicWriteLoopState(path, obj) {
|
|
12538
|
+
const tmp = path + ".tmp";
|
|
12539
|
+
writeFileSync$1(tmp, JSON.stringify(obj, null, 2));
|
|
12540
|
+
renameSync$1(tmp, path);
|
|
12541
|
+
}
|
|
12519
12542
|
function safeBacklogPendingCount(projectRoot, sessionId) {
|
|
12520
12543
|
try {
|
|
12521
12544
|
return backlogOraclePending(projectRoot, sessionId).length;
|
|
@@ -12881,7 +12904,7 @@ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata
|
|
|
12881
12904
|
if (wasStopped) {
|
|
12882
12905
|
try {
|
|
12883
12906
|
const sp = join$1(getLoopDir(directory, sessionId), "loop-state.json");
|
|
12884
|
-
|
|
12907
|
+
atomicWriteLoopState(sp, {
|
|
12885
12908
|
...existing,
|
|
12886
12909
|
active: true,
|
|
12887
12910
|
phase: "continue",
|
|
@@ -12893,7 +12916,7 @@ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata
|
|
|
12893
12916
|
gave_up_reason: void 0,
|
|
12894
12917
|
stall_hinted: false,
|
|
12895
12918
|
resumed_at: Date.now()
|
|
12896
|
-
}
|
|
12919
|
+
});
|
|
12897
12920
|
} catch {
|
|
12898
12921
|
}
|
|
12899
12922
|
const eq = getMetadata().messageQueue || [];
|
|
@@ -13380,7 +13403,7 @@ async function startDaemon(options) {
|
|
|
13380
13403
|
try {
|
|
13381
13404
|
const dir = loadSessionIndex()[sessionId]?.directory;
|
|
13382
13405
|
if (!dir) return;
|
|
13383
|
-
const { reconcileServiceLinks } = await import('./agentCommands-
|
|
13406
|
+
const { reconcileServiceLinks } = await import('./agentCommands-BfK_xRcZ.mjs');
|
|
13384
13407
|
const configPath = getSvampConfigPath(dir, sessionId);
|
|
13385
13408
|
const config = readSvampConfig(configPath);
|
|
13386
13409
|
const entries = Array.from(urls.entries());
|
|
@@ -13398,7 +13421,7 @@ async function startDaemon(options) {
|
|
|
13398
13421
|
}
|
|
13399
13422
|
}
|
|
13400
13423
|
async function createExposedTunnel(spec) {
|
|
13401
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
13424
|
+
const { FrpcTunnel } = await import('./frpc-DoUUUoZn.mjs');
|
|
13402
13425
|
const tunnel = new FrpcTunnel({
|
|
13403
13426
|
name: spec.name,
|
|
13404
13427
|
ports: spec.ports,
|
|
@@ -13418,7 +13441,7 @@ async function startDaemon(options) {
|
|
|
13418
13441
|
return tunnel;
|
|
13419
13442
|
}
|
|
13420
13443
|
const tunnelRecreateState = /* @__PURE__ */ new Map();
|
|
13421
|
-
const { ServeManager } = await import('./serveManager-
|
|
13444
|
+
const { ServeManager } = await import('./serveManager-DAuIjPuV.mjs');
|
|
13422
13445
|
const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
|
|
13423
13446
|
ensureAutoInstalledSkills(logger).catch(() => {
|
|
13424
13447
|
});
|
|
@@ -15506,11 +15529,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
15506
15529
|
});
|
|
15507
15530
|
},
|
|
15508
15531
|
onIssue: async (params) => {
|
|
15509
|
-
const { issueRpc } = await import('./rpc-
|
|
15532
|
+
const { issueRpc } = await import('./rpc-_rwZwiHD.mjs');
|
|
15510
15533
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
15511
15534
|
},
|
|
15512
15535
|
onWorkflow: async (params) => {
|
|
15513
|
-
const { workflowRpc } = await import('./rpc-
|
|
15536
|
+
const { workflowRpc } = await import('./rpc-665-sPRQ.mjs');
|
|
15514
15537
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
15515
15538
|
},
|
|
15516
15539
|
onRipgrep: async (args, cwd) => {
|
|
@@ -15692,7 +15715,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
15692
15715
|
if (s.active === false || s.phase === "done") {
|
|
15693
15716
|
try {
|
|
15694
15717
|
const lp = join$1(getLoopDir(directory, sessionId), "loop-state.json");
|
|
15695
|
-
|
|
15718
|
+
atomicWriteLoopState(lp, {
|
|
15696
15719
|
...s,
|
|
15697
15720
|
active: true,
|
|
15698
15721
|
phase: "continue",
|
|
@@ -15702,7 +15725,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
15702
15725
|
stall_hinted: false,
|
|
15703
15726
|
resumed_at: Date.now()
|
|
15704
15727
|
// #0156: re-arm the stall hint
|
|
15705
|
-
}
|
|
15728
|
+
});
|
|
15706
15729
|
} catch {
|
|
15707
15730
|
}
|
|
15708
15731
|
}
|
|
@@ -16046,11 +16069,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
16046
16069
|
});
|
|
16047
16070
|
},
|
|
16048
16071
|
onIssue: async (params) => {
|
|
16049
|
-
const { issueRpc } = await import('./rpc-
|
|
16072
|
+
const { issueRpc } = await import('./rpc-_rwZwiHD.mjs');
|
|
16050
16073
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
16051
16074
|
},
|
|
16052
16075
|
onWorkflow: async (params) => {
|
|
16053
|
-
const { workflowRpc } = await import('./rpc-
|
|
16076
|
+
const { workflowRpc } = await import('./rpc-665-sPRQ.mjs');
|
|
16054
16077
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
16055
16078
|
},
|
|
16056
16079
|
onRipgrep: async (args, cwd) => {
|
|
@@ -17009,7 +17032,7 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
|
|
|
17009
17032
|
const PING_TIMEOUT_MS = 15e3;
|
|
17010
17033
|
const POST_RECONNECT_GRACE_MS = 2e4;
|
|
17011
17034
|
const RECONNECT_JITTER_MS = 2500;
|
|
17012
|
-
const { WorkflowScheduler } = await import('./scheduler-
|
|
17035
|
+
const { WorkflowScheduler } = await import('./scheduler-DjMTCoWS.mjs');
|
|
17013
17036
|
const workflowScheduler = new WorkflowScheduler({
|
|
17014
17037
|
projectRoots: () => {
|
|
17015
17038
|
const dirs = /* @__PURE__ */ new Set();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { ag as applyClaudeProxyEnv, ah as composeSessionId, ai as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, aj as generateHookSettings } from './run-
|
|
1
|
+
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { ag as applyClaudeProxyEnv, ah as composeSessionId, ai as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, aj as generateHookSettings } from './run-BNxaekWa.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';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as resolveProjectRoot, H as listWorkflows, I as isWorkflowEnabled, J as workflowCrons, C as runWorkflow, K as cronMatches } from './run-
|
|
1
|
+
import { n as resolveProjectRoot, H as listWorkflows, I as isWorkflowEnabled, J as workflowCrons, C as runWorkflow, K as cronMatches } from './run-BNxaekWa.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
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-BkroIJOC.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-BkroIJOC.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-BkroIJOC.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-BkroIJOC.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-BkroIJOC.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 { l as getHyphaServerUrl, S as ServeAuth, m as hasCookieToken } from './run-
|
|
7
|
+
import { l as getHyphaServerUrl, S as ServeAuth, m as hasCookieToken } from './run-BNxaekWa.mjs';
|
|
8
8
|
import 'os';
|
|
9
9
|
import 'fs/promises';
|
|
10
10
|
import 'url';
|
|
@@ -751,7 +751,7 @@ class ServeManager {
|
|
|
751
751
|
const mount = this.mounts.get(mountName);
|
|
752
752
|
const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, buildLinkSubdomain(subdomainSafe, mount.linkToken)]]) : void 0;
|
|
753
753
|
try {
|
|
754
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
754
|
+
const { FrpcTunnel } = await import('./frpc-DoUUUoZn.mjs');
|
|
755
755
|
let tunnel;
|
|
756
756
|
tunnel = new FrpcTunnel({
|
|
757
757
|
name: tunnelName,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as READ_ONLY_TOOLS, N as loadMachineContext, O as buildMachineInstructions, P as machineToolsForRole, Q as buildMachineTools } from './run-
|
|
1
|
+
import { R as READ_ONLY_TOOLS, N as loadMachineContext, O as buildMachineInstructions, P as machineToolsForRole, Q as buildMachineTools } from './run-BNxaekWa.mjs';
|
|
2
2
|
import 'node:child_process';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|