svamp-cli 0.2.274 → 0.2.275
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-iom4Qnpt.mjs → agentCommands-DGT-1wjo.mjs} +5 -5
- package/dist/{auth-C5eN8Hte.mjs → auth-CT55Rse4.mjs} +1 -1
- package/dist/{cli-P3Tx1nrm.mjs → cli-DYTmO9JL.mjs} +63 -63
- package/dist/cli.mjs +2 -2
- package/dist/{commands-CQHlltkU.mjs → commands-BV_9mFkz.mjs} +2 -2
- package/dist/{commands-C7J1hEg3.mjs → commands-BvmFXAmu.mjs} +2 -2
- package/dist/{commands-CKhDT3cQ.mjs → commands-C0rRjhMD.mjs} +2 -2
- package/dist/{commands-VvErX3uk.mjs → commands-C8Zc5axO.mjs} +7 -7
- package/dist/{commands-CgrbLgCc.mjs → commands-CVPcbtWV.mjs} +1 -1
- package/dist/{commands-B6LByF-g.mjs → commands-CXHZapLH.mjs} +1 -1
- package/dist/{commands-D606feNR.mjs → commands-D7fIWAgz.mjs} +1 -1
- package/dist/{fleet-B1PDO1l8.mjs → fleet-BCel6ZVc.mjs} +1 -1
- package/dist/{frpc-Dzhtizmd.mjs → frpc-D3faR6iR.mjs} +1 -1
- package/dist/{headlessCli-1WzEZVMV.mjs → headlessCli-DVBFm7og.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{package-BYElq4R_.mjs → package-DIuZ7Wfp.mjs} +1 -1
- package/dist/{rpc-CIs3wZAu.mjs → rpc-BQ8zLSUc.mjs} +1 -1
- package/dist/{rpc-BMoQLUTg.mjs → rpc-xlV-4-BG.mjs} +1 -1
- package/dist/{run-l_8UB-9h.mjs → run-C3Fcbk-H.mjs} +91 -33
- package/dist/{run-DxoIx34n.mjs → run-DMPVho7i.mjs} +1 -1
- package/dist/{scheduler-uZ__o3N7.mjs → scheduler-DaFZY2ob.mjs} +1 -1
- package/dist/{serveCommands-twuwB_gw.mjs → serveCommands-B9Yhx1fl.mjs} +5 -5
- package/dist/{sideband-C8myzP2c.mjs → sideband-CYqmMG_m.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 { i as shortId } from './run-
|
|
5
|
+
import { i as shortId } from './run-C3Fcbk-H.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-C3Fcbk-H.mjs').then(function (n) { return n.al; });
|
|
100
100
|
const desc = sanitizeDescription(description, 240);
|
|
101
101
|
if (!desc) {
|
|
102
102
|
console.error("Project description is empty.");
|
|
@@ -343,7 +343,7 @@ async function sessionBroadcast(action, args) {
|
|
|
343
343
|
console.log(`Broadcast sent: ${action}`);
|
|
344
344
|
}
|
|
345
345
|
async function connectToMachineService() {
|
|
346
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
346
|
+
const { connectAndGetMachine } = await import('./commands-D7fIWAgz.mjs');
|
|
347
347
|
return connectAndGetMachine();
|
|
348
348
|
}
|
|
349
349
|
function buildInboxMessage(args) {
|
|
@@ -421,7 +421,7 @@ async function inboxSend(targetSessionId, opts) {
|
|
|
421
421
|
console.error("Message body is required.");
|
|
422
422
|
process.exit(1);
|
|
423
423
|
}
|
|
424
|
-
const { connectAndResolveSession } = await import('./commands-
|
|
424
|
+
const { connectAndResolveSession } = await import('./commands-D7fIWAgz.mjs');
|
|
425
425
|
let server;
|
|
426
426
|
try {
|
|
427
427
|
const { targetId, messageId } = await inboxSendCore(
|
|
@@ -475,7 +475,7 @@ async function inboxReply(messageId, body) {
|
|
|
475
475
|
console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
|
|
476
476
|
process.exit(1);
|
|
477
477
|
}
|
|
478
|
-
const { connectAndResolveSession } = await import('./commands-
|
|
478
|
+
const { connectAndResolveSession } = await import('./commands-D7fIWAgz.mjs');
|
|
479
479
|
const { server: localServer, machine: localMachine } = await connectToMachineService();
|
|
480
480
|
let localDisconnected = false;
|
|
481
481
|
const disconnectLocal = async () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as clearStopMarker, _ as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-
|
|
1
|
+
import { Z as clearStopMarker, _ as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-C3Fcbk-H.mjs';
|
|
2
2
|
import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
|
|
3
3
|
|
|
4
4
|
function flushAndExit(code) {
|
|
@@ -33,7 +33,7 @@ const subcommand = args[0];
|
|
|
33
33
|
let daemonSubcommand = args[1];
|
|
34
34
|
async function main() {
|
|
35
35
|
try {
|
|
36
|
-
const { getLoadedConfig } = await import('./run-
|
|
36
|
+
const { getLoadedConfig } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.ai; });
|
|
37
37
|
getLoadedConfig();
|
|
38
38
|
} catch {
|
|
39
39
|
}
|
|
@@ -52,7 +52,7 @@ async function main() {
|
|
|
52
52
|
}
|
|
53
53
|
const whenIdle = args.includes("--when-idle");
|
|
54
54
|
const force = args.includes("--force");
|
|
55
|
-
const mod = await import('./run-
|
|
55
|
+
const mod = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.as; });
|
|
56
56
|
if (whenIdle && !force) {
|
|
57
57
|
if (mod.isDaemonAlive()) {
|
|
58
58
|
mod.writePendingRestart({ reason: "svamp daemon restart --when-idle" });
|
|
@@ -356,7 +356,7 @@ async function main() {
|
|
|
356
356
|
console.error("svamp service: Service commands are not available in sandboxed sessions.");
|
|
357
357
|
process.exit(1);
|
|
358
358
|
}
|
|
359
|
-
const { handleServiceCommand } = await import('./commands-
|
|
359
|
+
const { handleServiceCommand } = await import('./commands-C8Zc5axO.mjs');
|
|
360
360
|
await handleServiceCommand();
|
|
361
361
|
} else if (subcommand === "serve") {
|
|
362
362
|
const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
|
|
@@ -364,7 +364,7 @@ async function main() {
|
|
|
364
364
|
console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
|
|
365
365
|
process.exit(1);
|
|
366
366
|
}
|
|
367
|
-
const { handleServeCommand } = await import('./serveCommands-
|
|
367
|
+
const { handleServeCommand } = await import('./serveCommands-B9Yhx1fl.mjs');
|
|
368
368
|
await handleServeCommand();
|
|
369
369
|
process.exit(0);
|
|
370
370
|
} else if (subcommand === "process" || subcommand === "proc") {
|
|
@@ -373,7 +373,7 @@ async function main() {
|
|
|
373
373
|
console.error("svamp process: Process commands are not available in sandboxed sessions.");
|
|
374
374
|
process.exit(1);
|
|
375
375
|
}
|
|
376
|
-
const { processCommand } = await import('./commands-
|
|
376
|
+
const { processCommand } = await import('./commands-BV_9mFkz.mjs');
|
|
377
377
|
let machineId;
|
|
378
378
|
const processArgs = args.slice(1);
|
|
379
379
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -387,18 +387,18 @@ async function main() {
|
|
|
387
387
|
}), machineId);
|
|
388
388
|
process.exit(0);
|
|
389
389
|
} else if (subcommand === "issue" || subcommand === "issues") {
|
|
390
|
-
const { issueCommand } = await import('./commands-
|
|
390
|
+
const { issueCommand } = await import('./commands-BvmFXAmu.mjs');
|
|
391
391
|
await issueCommand(args.slice(1));
|
|
392
392
|
await flushAndExit(0);
|
|
393
393
|
} else if (subcommand === "workflow" || subcommand === "workflows") {
|
|
394
|
-
const { workflowCommand } = await import('./commands-
|
|
394
|
+
const { workflowCommand } = await import('./commands-CXHZapLH.mjs');
|
|
395
395
|
await workflowCommand(args.slice(1));
|
|
396
396
|
await flushAndExit(0);
|
|
397
397
|
} else if (subcommand === "wise-agent" || subcommand === "wise") {
|
|
398
398
|
await handleWiseAgentCommand(args.slice(1));
|
|
399
399
|
process.exit(0);
|
|
400
400
|
} else if (subcommand === "feature" || subcommand === "crew") {
|
|
401
|
-
const { crewCommand } = await import('./commands-
|
|
401
|
+
const { crewCommand } = await import('./commands-C0rRjhMD.mjs');
|
|
402
402
|
await crewCommand(args.slice(1));
|
|
403
403
|
process.exit(0);
|
|
404
404
|
} else if (subcommand === "--help" || subcommand === "-h") {
|
|
@@ -406,7 +406,7 @@ async function main() {
|
|
|
406
406
|
} else if (!subcommand || subcommand === "start") {
|
|
407
407
|
await handleInteractiveCommand();
|
|
408
408
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
409
|
-
const pkg = await import('./package-
|
|
409
|
+
const pkg = await import('./package-DIuZ7Wfp.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
410
410
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
411
411
|
} else {
|
|
412
412
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -415,7 +415,7 @@ async function main() {
|
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
async function handleInteractiveCommand() {
|
|
418
|
-
const { runInteractive } = await import('./run-
|
|
418
|
+
const { runInteractive } = await import('./run-DMPVho7i.mjs');
|
|
419
419
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
420
420
|
let directory = process.cwd();
|
|
421
421
|
let resumeSessionId;
|
|
@@ -460,7 +460,7 @@ async function handleAgentCommand() {
|
|
|
460
460
|
return;
|
|
461
461
|
}
|
|
462
462
|
if (agentArgs[0] === "list") {
|
|
463
|
-
const { KNOWN_ACP_AGENTS, KNOWN_CODEX_AGENTS: KNOWN_CODEX_AGENTS2 } = await import('./run-
|
|
463
|
+
const { KNOWN_ACP_AGENTS, KNOWN_CODEX_AGENTS: KNOWN_CODEX_AGENTS2 } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.ao; });
|
|
464
464
|
console.log("Known agents:");
|
|
465
465
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
466
466
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -472,7 +472,7 @@ async function handleAgentCommand() {
|
|
|
472
472
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
473
473
|
return;
|
|
474
474
|
}
|
|
475
|
-
const { resolveAcpAgentConfig, KNOWN_CODEX_AGENTS } = await import('./run-
|
|
475
|
+
const { resolveAcpAgentConfig, KNOWN_CODEX_AGENTS } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.ao; });
|
|
476
476
|
let cwd = process.cwd();
|
|
477
477
|
const filteredArgs = [];
|
|
478
478
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -496,12 +496,12 @@ async function handleAgentCommand() {
|
|
|
496
496
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
497
497
|
let backend;
|
|
498
498
|
if (KNOWN_CODEX_AGENTS[config.agentName]) {
|
|
499
|
-
const { CodexAppServerBackend } = await import('./run-
|
|
499
|
+
const { CodexAppServerBackend } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.ap; });
|
|
500
500
|
backend = new CodexAppServerBackend({ cwd, log: logFn });
|
|
501
501
|
} else {
|
|
502
|
-
const { AcpBackend } = await import('./run-
|
|
503
|
-
const { GeminiTransport } = await import('./run-
|
|
504
|
-
const { DefaultTransport } = await import('./run-
|
|
502
|
+
const { AcpBackend } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.an; });
|
|
503
|
+
const { GeminiTransport } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.aq; });
|
|
504
|
+
const { DefaultTransport } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.am; });
|
|
505
505
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
506
506
|
backend = new AcpBackend({
|
|
507
507
|
agentName: config.agentName,
|
|
@@ -628,7 +628,7 @@ async function handleSessionCommand() {
|
|
|
628
628
|
process.exit(1);
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionLoopExtend, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-
|
|
631
|
+
const { sessionList, sessionWhoami, sessionSpawn, sessionArchive, sessionResume, sessionDelete, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionLoopStart, sessionLoopCancel, sessionLoopStatus, sessionLoopExtend, sessionInboxSend, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxClear } = await import('./commands-D7fIWAgz.mjs');
|
|
632
632
|
const parseFlagStr = (flag, shortFlag) => {
|
|
633
633
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
634
634
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -696,7 +696,7 @@ async function handleSessionCommand() {
|
|
|
696
696
|
allowDomain.push(sessionArgs[++i]);
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
const { parseShareArg } = await import('./commands-
|
|
699
|
+
const { parseShareArg } = await import('./commands-D7fIWAgz.mjs');
|
|
700
700
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
701
701
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
702
702
|
message,
|
|
@@ -786,7 +786,7 @@ async function handleSessionCommand() {
|
|
|
786
786
|
console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
|
|
787
787
|
process.exit(1);
|
|
788
788
|
}
|
|
789
|
-
const { sessionEditMessage } = await import('./commands-
|
|
789
|
+
const { sessionEditMessage } = await import('./commands-D7fIWAgz.mjs');
|
|
790
790
|
await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
791
791
|
} else if (sessionSubcommand === "refine") {
|
|
792
792
|
if (!sessionArgs[1] || !sessionArgs[2]) {
|
|
@@ -794,7 +794,7 @@ async function handleSessionCommand() {
|
|
|
794
794
|
console.error(" Asks the agent to revise its latest reply in place (no extra round).");
|
|
795
795
|
process.exit(1);
|
|
796
796
|
}
|
|
797
|
-
const { sessionRefineLastReply } = await import('./commands-
|
|
797
|
+
const { sessionRefineLastReply } = await import('./commands-D7fIWAgz.mjs');
|
|
798
798
|
await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
|
|
799
799
|
} else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
|
|
800
800
|
if (!sessionArgs[1]) {
|
|
@@ -802,7 +802,7 @@ async function handleSessionCommand() {
|
|
|
802
802
|
console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
|
|
803
803
|
process.exit(1);
|
|
804
804
|
}
|
|
805
|
-
const { sessionUndoEdit } = await import('./commands-
|
|
805
|
+
const { sessionUndoEdit } = await import('./commands-D7fIWAgz.mjs');
|
|
806
806
|
await sessionUndoEdit(sessionArgs[1], targetMachineId);
|
|
807
807
|
} else if (sessionSubcommand === "query") {
|
|
808
808
|
const dir = sessionArgs[1];
|
|
@@ -812,7 +812,7 @@ async function handleSessionCommand() {
|
|
|
812
812
|
console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
|
|
813
813
|
process.exit(1);
|
|
814
814
|
}
|
|
815
|
-
const { sessionQuery } = await import('./commands-
|
|
815
|
+
const { sessionQuery } = await import('./commands-D7fIWAgz.mjs');
|
|
816
816
|
await sessionQuery(dir, prompt, targetMachineId, {
|
|
817
817
|
timeout: parseFlagInt("--timeout"),
|
|
818
818
|
json: hasFlag("--json"),
|
|
@@ -845,7 +845,7 @@ async function handleSessionCommand() {
|
|
|
845
845
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
846
846
|
process.exit(1);
|
|
847
847
|
}
|
|
848
|
-
const { sessionApprove } = await import('./commands-
|
|
848
|
+
const { sessionApprove } = await import('./commands-D7fIWAgz.mjs');
|
|
849
849
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
850
850
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
851
851
|
json: hasFlag("--json")
|
|
@@ -855,7 +855,7 @@ async function handleSessionCommand() {
|
|
|
855
855
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
856
856
|
process.exit(1);
|
|
857
857
|
}
|
|
858
|
-
const { sessionDeny } = await import('./commands-
|
|
858
|
+
const { sessionDeny } = await import('./commands-D7fIWAgz.mjs');
|
|
859
859
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
860
860
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
861
861
|
json: hasFlag("--json")
|
|
@@ -907,7 +907,7 @@ async function handleSessionCommand() {
|
|
|
907
907
|
console.error("Usage: svamp session set-title <title>");
|
|
908
908
|
process.exit(1);
|
|
909
909
|
}
|
|
910
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
910
|
+
const { sessionSetTitle } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
911
911
|
await sessionSetTitle(title);
|
|
912
912
|
} else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
|
|
913
913
|
const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
@@ -915,7 +915,7 @@ async function handleSessionCommand() {
|
|
|
915
915
|
console.error("Usage: svamp session set-project-description <text>");
|
|
916
916
|
process.exit(1);
|
|
917
917
|
}
|
|
918
|
-
const { sessionSetProjectDescription } = await import('./agentCommands-
|
|
918
|
+
const { sessionSetProjectDescription } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
919
919
|
await sessionSetProjectDescription(desc);
|
|
920
920
|
} else if (sessionSubcommand === "set-link") {
|
|
921
921
|
const url = sessionArgs[1];
|
|
@@ -924,11 +924,11 @@ async function handleSessionCommand() {
|
|
|
924
924
|
process.exit(1);
|
|
925
925
|
}
|
|
926
926
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
927
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
927
|
+
const { sessionSetLink } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
928
928
|
await sessionSetLink(url, label);
|
|
929
929
|
} else if (sessionSubcommand === "link") {
|
|
930
930
|
const op = sessionArgs[1];
|
|
931
|
-
const lm = await import('./agentCommands-
|
|
931
|
+
const lm = await import('./agentCommands-DGT-1wjo.mjs');
|
|
932
932
|
if (op === "add") {
|
|
933
933
|
const url = sessionArgs[2];
|
|
934
934
|
if (!url || url.startsWith("--")) {
|
|
@@ -963,7 +963,7 @@ async function handleSessionCommand() {
|
|
|
963
963
|
process.exit(1);
|
|
964
964
|
}
|
|
965
965
|
const level = parseFlagStr("--level") || "info";
|
|
966
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
966
|
+
const { sessionNotify } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
967
967
|
await sessionNotify(message, level);
|
|
968
968
|
} else if (sessionSubcommand === "broadcast") {
|
|
969
969
|
const action = sessionArgs[1];
|
|
@@ -971,7 +971,7 @@ async function handleSessionCommand() {
|
|
|
971
971
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
972
972
|
process.exit(1);
|
|
973
973
|
}
|
|
974
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
974
|
+
const { sessionBroadcast } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
975
975
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
976
976
|
} else if (sessionSubcommand === "inbox") {
|
|
977
977
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -982,7 +982,7 @@ async function handleSessionCommand() {
|
|
|
982
982
|
process.exit(1);
|
|
983
983
|
}
|
|
984
984
|
if (agentSessionId) {
|
|
985
|
-
const { inboxSend } = await import('./agentCommands-
|
|
985
|
+
const { inboxSend } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
986
986
|
await inboxSend(sessionArgs[2], {
|
|
987
987
|
body: sessionArgs[3],
|
|
988
988
|
subject: parseFlagStr("--subject"),
|
|
@@ -997,7 +997,7 @@ async function handleSessionCommand() {
|
|
|
997
997
|
}
|
|
998
998
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
999
999
|
if (agentSessionId && !sessionArgs[2]) {
|
|
1000
|
-
const { inboxList } = await import('./agentCommands-
|
|
1000
|
+
const { inboxList } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
1001
1001
|
await inboxList({
|
|
1002
1002
|
unread: hasFlag("--unread"),
|
|
1003
1003
|
limit: parseFlagInt("--limit"),
|
|
@@ -1019,7 +1019,7 @@ async function handleSessionCommand() {
|
|
|
1019
1019
|
process.exit(1);
|
|
1020
1020
|
}
|
|
1021
1021
|
if (agentSessionId && !sessionArgs[3]) {
|
|
1022
|
-
const { inboxList } = await import('./agentCommands-
|
|
1022
|
+
const { inboxList } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
1023
1023
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
1024
1024
|
} else if (sessionArgs[3]) {
|
|
1025
1025
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -1029,7 +1029,7 @@ async function handleSessionCommand() {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
} else if (inboxSubcmd === "reply") {
|
|
1031
1031
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
1032
|
-
const { inboxReply } = await import('./agentCommands-
|
|
1032
|
+
const { inboxReply } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
1033
1033
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
1034
1034
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
1035
1035
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -1067,7 +1067,7 @@ async function handleMachineCommand() {
|
|
|
1067
1067
|
return;
|
|
1068
1068
|
}
|
|
1069
1069
|
if (machineSubcommand === "share") {
|
|
1070
|
-
const { machineShare } = await import('./commands-
|
|
1070
|
+
const { machineShare } = await import('./commands-D7fIWAgz.mjs');
|
|
1071
1071
|
let machineId;
|
|
1072
1072
|
const shareArgs = [];
|
|
1073
1073
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -1118,14 +1118,14 @@ async function handleMachineCommand() {
|
|
|
1118
1118
|
process.exit(1);
|
|
1119
1119
|
}
|
|
1120
1120
|
if (all) {
|
|
1121
|
-
const { fleetExec } = await import('./fleet-
|
|
1121
|
+
const { fleetExec } = await import('./fleet-BCel6ZVc.mjs');
|
|
1122
1122
|
await fleetExec(command, { cwd });
|
|
1123
1123
|
} else {
|
|
1124
|
-
const { machineExec } = await import('./commands-
|
|
1124
|
+
const { machineExec } = await import('./commands-D7fIWAgz.mjs');
|
|
1125
1125
|
await machineExec(machineId, command, cwd);
|
|
1126
1126
|
}
|
|
1127
1127
|
} else if (machineSubcommand === "info") {
|
|
1128
|
-
const { machineInfo } = await import('./commands-
|
|
1128
|
+
const { machineInfo } = await import('./commands-D7fIWAgz.mjs');
|
|
1129
1129
|
let machineId;
|
|
1130
1130
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
1131
1131
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -1145,10 +1145,10 @@ async function handleMachineCommand() {
|
|
|
1145
1145
|
level = machineArgs[++i];
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
|
-
const { machineNotify } = await import('./agentCommands-
|
|
1148
|
+
const { machineNotify } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
1149
1149
|
await machineNotify(message, level);
|
|
1150
1150
|
} else if (machineSubcommand === "ls") {
|
|
1151
|
-
const { machineLs } = await import('./commands-
|
|
1151
|
+
const { machineLs } = await import('./commands-D7fIWAgz.mjs');
|
|
1152
1152
|
let machineId;
|
|
1153
1153
|
let showHidden = false;
|
|
1154
1154
|
let path;
|
|
@@ -1207,20 +1207,20 @@ Examples:
|
|
|
1207
1207
|
};
|
|
1208
1208
|
const hasFlag = (name) => fleetArgs.includes(`--${name}`);
|
|
1209
1209
|
if (sub === "status") {
|
|
1210
|
-
const { fleetStatus } = await import('./fleet-
|
|
1210
|
+
const { fleetStatus } = await import('./fleet-BCel6ZVc.mjs');
|
|
1211
1211
|
await fleetStatus();
|
|
1212
1212
|
} else if (sub === "upgrade-claude") {
|
|
1213
|
-
const { fleetUpgradeClaude } = await import('./fleet-
|
|
1213
|
+
const { fleetUpgradeClaude } = await import('./fleet-BCel6ZVc.mjs');
|
|
1214
1214
|
await fleetUpgradeClaude({ version: flag("version", "-v") });
|
|
1215
1215
|
} else if (sub === "upgrade-svamp") {
|
|
1216
|
-
const { fleetUpgradeSvamp } = await import('./fleet-
|
|
1216
|
+
const { fleetUpgradeSvamp } = await import('./fleet-BCel6ZVc.mjs');
|
|
1217
1217
|
await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self"), force: hasFlag("force") });
|
|
1218
1218
|
} else if (sub === "daemon-restart") {
|
|
1219
|
-
const { fleetDaemonRestart } = await import('./fleet-
|
|
1219
|
+
const { fleetDaemonRestart } = await import('./fleet-BCel6ZVc.mjs');
|
|
1220
1220
|
await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
|
|
1221
1221
|
} else if (sub === "push-skill") {
|
|
1222
1222
|
const name = fleetArgs[1];
|
|
1223
|
-
const { fleetPushSkill } = await import('./fleet-
|
|
1223
|
+
const { fleetPushSkill } = await import('./fleet-BCel6ZVc.mjs');
|
|
1224
1224
|
await fleetPushSkill(name);
|
|
1225
1225
|
} else {
|
|
1226
1226
|
console.error(`Unknown fleet subcommand: ${sub}`);
|
|
@@ -1236,7 +1236,7 @@ async function handleSkillsCommand() {
|
|
|
1236
1236
|
await printSkillsHelp();
|
|
1237
1237
|
return;
|
|
1238
1238
|
}
|
|
1239
|
-
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-
|
|
1239
|
+
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-CVPcbtWV.mjs');
|
|
1240
1240
|
if (skillsSubcommand === "find" || skillsSubcommand === "search") {
|
|
1241
1241
|
const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1242
1242
|
if (!query) {
|
|
@@ -1283,7 +1283,7 @@ async function loginToHypha() {
|
|
|
1283
1283
|
process.exit(1);
|
|
1284
1284
|
}
|
|
1285
1285
|
const anchor = anchorArg.replace(/\/+$/, "");
|
|
1286
|
-
const { loadInstanceConfig } = await import('./run-
|
|
1286
|
+
const { loadInstanceConfig } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.ai; });
|
|
1287
1287
|
let cfg = null;
|
|
1288
1288
|
try {
|
|
1289
1289
|
cfg = await loadInstanceConfig({ anchor, force: true });
|
|
@@ -1394,7 +1394,7 @@ async function logoutFromHypha() {
|
|
|
1394
1394
|
} catch {
|
|
1395
1395
|
}
|
|
1396
1396
|
try {
|
|
1397
|
-
const { clearInstanceConfigCache } = await import('./run-
|
|
1397
|
+
const { clearInstanceConfigCache } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.ai; });
|
|
1398
1398
|
clearInstanceConfigCache();
|
|
1399
1399
|
} catch {
|
|
1400
1400
|
}
|
|
@@ -1733,7 +1733,7 @@ async function applyClaudeAuthFlags(argv) {
|
|
|
1733
1733
|
"--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
|
|
1734
1734
|
);
|
|
1735
1735
|
}
|
|
1736
|
-
const mod = await import('./run-
|
|
1736
|
+
const mod = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.aj; });
|
|
1737
1737
|
if (hasHypha) {
|
|
1738
1738
|
let url;
|
|
1739
1739
|
const hyphaIdx = argv.indexOf("--use-hypha-proxy");
|
|
@@ -1787,7 +1787,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1787
1787
|
}
|
|
1788
1788
|
}
|
|
1789
1789
|
if (collected.length === 0) return;
|
|
1790
|
-
const { updateEnvFile } = await import('./run-
|
|
1790
|
+
const { updateEnvFile } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.aj; });
|
|
1791
1791
|
const seen = /* @__PURE__ */ new Set();
|
|
1792
1792
|
const deduped = collected.filter((e) => {
|
|
1793
1793
|
const k = e.toLowerCase();
|
|
@@ -1820,7 +1820,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1820
1820
|
}
|
|
1821
1821
|
});
|
|
1822
1822
|
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(" ");
|
|
1823
|
-
const { wiseAskCli } = await import('./commands-
|
|
1823
|
+
const { wiseAskCli } = await import('./commands-D7fIWAgz.mjs');
|
|
1824
1824
|
await wiseAskCli(machineId, message, sessionId, { json });
|
|
1825
1825
|
return;
|
|
1826
1826
|
}
|
|
@@ -1832,7 +1832,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1832
1832
|
}
|
|
1833
1833
|
return void 0;
|
|
1834
1834
|
};
|
|
1835
|
-
const { runWiseVoiceCli } = await import('./headlessCli-
|
|
1835
|
+
const { runWiseVoiceCli } = await import('./headlessCli-DVBFm7og.mjs');
|
|
1836
1836
|
await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
|
|
1837
1837
|
return;
|
|
1838
1838
|
}
|
|
@@ -1850,7 +1850,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1850
1850
|
const mode = valueOf(["--mode"]);
|
|
1851
1851
|
const mission = valueOf(["--mission"]);
|
|
1852
1852
|
const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
|
|
1853
|
-
const { wiseJoinMeetingCli } = await import('./commands-
|
|
1853
|
+
const { wiseJoinMeetingCli } = await import('./commands-D7fIWAgz.mjs');
|
|
1854
1854
|
await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
|
|
1855
1855
|
return;
|
|
1856
1856
|
}
|
|
@@ -1862,7 +1862,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1862
1862
|
}
|
|
1863
1863
|
return void 0;
|
|
1864
1864
|
};
|
|
1865
|
-
const { wiseLeaveMeetingCli } = await import('./commands-
|
|
1865
|
+
const { wiseLeaveMeetingCli } = await import('./commands-D7fIWAgz.mjs');
|
|
1866
1866
|
await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
|
|
1867
1867
|
return;
|
|
1868
1868
|
}
|
|
@@ -1886,7 +1886,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1886
1886
|
}
|
|
1887
1887
|
});
|
|
1888
1888
|
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(" ");
|
|
1889
|
-
const { wiseAnnounceCli } = await import('./commands-
|
|
1889
|
+
const { wiseAnnounceCli } = await import('./commands-D7fIWAgz.mjs');
|
|
1890
1890
|
await wiseAnnounceCli(machineId, text, sessionId, { json });
|
|
1891
1891
|
return;
|
|
1892
1892
|
}
|
|
@@ -1898,7 +1898,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
return void 0;
|
|
1900
1900
|
};
|
|
1901
|
-
const { wiseMeetingsCli } = await import('./commands-
|
|
1901
|
+
const { wiseMeetingsCli } = await import('./commands-D7fIWAgz.mjs');
|
|
1902
1902
|
await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
|
|
1903
1903
|
return;
|
|
1904
1904
|
}
|
|
@@ -1948,7 +1948,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1948
1948
|
return;
|
|
1949
1949
|
}
|
|
1950
1950
|
const authArgs = rest.slice(1);
|
|
1951
|
-
const mod = await import('./auth-
|
|
1951
|
+
const mod = await import('./auth-CT55Rse4.mjs');
|
|
1952
1952
|
let action;
|
|
1953
1953
|
try {
|
|
1954
1954
|
action = mod.parseWiseAgentAuthArgs(authArgs);
|
|
@@ -1958,7 +1958,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1958
1958
|
return;
|
|
1959
1959
|
}
|
|
1960
1960
|
if (action) {
|
|
1961
|
-
const { updateEnvFile } = await import('./run-
|
|
1961
|
+
const { updateEnvFile } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.aj; });
|
|
1962
1962
|
const updates = mod.buildWiseAgentEnvUpdates(action);
|
|
1963
1963
|
updateEnvFile(updates);
|
|
1964
1964
|
for (const [k, v] of Object.entries(updates)) {
|
|
@@ -1972,7 +1972,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1972
1972
|
}
|
|
1973
1973
|
async function handleDaemonAuthCommand(argv) {
|
|
1974
1974
|
const sub = (argv[0] || "status").toLowerCase();
|
|
1975
|
-
const mod = await import('./run-
|
|
1975
|
+
const mod = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.aj; });
|
|
1976
1976
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
1977
1977
|
console.log(`
|
|
1978
1978
|
svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
|
|
@@ -2046,8 +2046,8 @@ one step: --use-hypha-proxy / --use-claude-login / --anthropic-base-url URL --an
|
|
|
2046
2046
|
}
|
|
2047
2047
|
async function handleDaemonCodexAuthCommand(argv) {
|
|
2048
2048
|
const sub = (argv[0] || "status").toLowerCase();
|
|
2049
|
-
const { updateEnvFile } = await import('./run-
|
|
2050
|
-
const { resolveCodexProvider } = await import('./run-
|
|
2049
|
+
const { updateEnvFile } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.aj; });
|
|
2050
|
+
const { resolveCodexProvider } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.ak; });
|
|
2051
2051
|
const redact = (k) => k && k.length > 10 ? `${k.slice(0, 6)}\u2026${k.slice(-4)}` : k ? "***" : "(unset)";
|
|
2052
2052
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
2053
2053
|
console.log(`
|
|
@@ -2379,7 +2379,7 @@ Examples:
|
|
|
2379
2379
|
async function printSkillsHelp() {
|
|
2380
2380
|
let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
|
|
2381
2381
|
try {
|
|
2382
|
-
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-
|
|
2382
|
+
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.ar; });
|
|
2383
2383
|
browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
|
|
2384
2384
|
} catch {
|
|
2385
2385
|
}
|
package/dist/cli.mjs
CHANGED
|
@@ -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-D7fIWAgz.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-C3Fcbk-H.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { f as flushAndExit } from './cli-
|
|
5
|
-
import { j as resolveProjectRoot, q as searchIssues, o as listIssues, l as resumeIssue, p as pauseIssue, m as addComment, u as updateIssue, k as getIssue, t as isVisibleTo, H as summarize, n as addIssue } from './run-
|
|
4
|
+
import { f as flushAndExit } from './cli-DYTmO9JL.mjs';
|
|
5
|
+
import { j as resolveProjectRoot, q as searchIssues, o as listIssues, l as resumeIssue, p as pauseIssue, m as addComment, u as updateIssue, k as getIssue, t as isVisibleTo, H as summarize, n as addIssue } from './run-C3Fcbk-H.mjs';
|
|
6
6
|
import './serviceManager-hlOVxkhW.mjs';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
@@ -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-D7fIWAgz.mjs';
|
|
4
4
|
import { execFileSync } from 'node:child_process';
|
|
5
|
-
import { u as updateIssue, m as addComment, n as addIssue, i as shortId } from './run-
|
|
5
|
+
import { u as updateIssue, m as addComment, n as addIssue, i as shortId } from './run-C3Fcbk-H.mjs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
@@ -60,7 +60,7 @@ async function serviceExpose(args) {
|
|
|
60
60
|
process.exit(1);
|
|
61
61
|
}
|
|
62
62
|
if (foreground) {
|
|
63
|
-
const { runFrpcTunnel } = await import('./frpc-
|
|
63
|
+
const { runFrpcTunnel } = await import('./frpc-D3faR6iR.mjs');
|
|
64
64
|
await runFrpcTunnel(name, ports, void 0, {
|
|
65
65
|
group,
|
|
66
66
|
groupKey,
|
|
@@ -70,7 +70,7 @@ async function serviceExpose(args) {
|
|
|
70
70
|
});
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
73
|
+
const { connectAndGetMachine } = await import('./commands-D7fIWAgz.mjs');
|
|
74
74
|
const { server, machine } = await connectAndGetMachine();
|
|
75
75
|
try {
|
|
76
76
|
const status = await machine.tunnelStart({
|
|
@@ -92,7 +92,7 @@ async function serviceExpose(args) {
|
|
|
92
92
|
console.log(` port ${port}: ${url}`);
|
|
93
93
|
}
|
|
94
94
|
if (process.env.SVAMP_SESSION_ID) {
|
|
95
|
-
const { autoAddSessionLink } = await import('./agentCommands-
|
|
95
|
+
const { autoAddSessionLink } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
96
96
|
let added = 0;
|
|
97
97
|
for (const [port, url] of urlEntries) {
|
|
98
98
|
const label = urlEntries.length > 1 ? `${name}:${port}` : name;
|
|
@@ -129,7 +129,7 @@ async function serviceServe(args) {
|
|
|
129
129
|
console.log(`Serving ${resolvedDir}`);
|
|
130
130
|
const servePort = 18080;
|
|
131
131
|
const http = await import('http');
|
|
132
|
-
const { serveStaticMount } = await import('./run-
|
|
132
|
+
const { serveStaticMount } = await import('./run-C3Fcbk-H.mjs').then(function (n) { return n.ah; });
|
|
133
133
|
const server = http.createServer((req, res) => {
|
|
134
134
|
const u = new URL(req.url || "/", "http://127.0.0.1");
|
|
135
135
|
let rel = u.pathname;
|
|
@@ -140,7 +140,7 @@ async function serviceServe(args) {
|
|
|
140
140
|
server.once("error", reject);
|
|
141
141
|
server.listen(servePort, "127.0.0.1", () => resolve());
|
|
142
142
|
});
|
|
143
|
-
const { runFrpcTunnel } = await import('./frpc-
|
|
143
|
+
const { runFrpcTunnel } = await import('./frpc-D3faR6iR.mjs');
|
|
144
144
|
void server;
|
|
145
145
|
await runFrpcTunnel(name, [servePort]);
|
|
146
146
|
} catch (err) {
|
|
@@ -150,7 +150,7 @@ async function serviceServe(args) {
|
|
|
150
150
|
}
|
|
151
151
|
async function serviceList(_args) {
|
|
152
152
|
try {
|
|
153
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
153
|
+
const { connectAndGetMachine } = await import('./commands-D7fIWAgz.mjs');
|
|
154
154
|
const { server, machine } = await connectAndGetMachine();
|
|
155
155
|
try {
|
|
156
156
|
const tunnels = await machine.tunnelList({});
|
|
@@ -190,7 +190,7 @@ async function serviceDelete(args) {
|
|
|
190
190
|
process.exit(1);
|
|
191
191
|
}
|
|
192
192
|
try {
|
|
193
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
193
|
+
const { connectAndGetMachine } = await import('./commands-D7fIWAgz.mjs');
|
|
194
194
|
const { server, machine } = await connectAndGetMachine();
|
|
195
195
|
try {
|
|
196
196
|
await machine.tunnelStop({ name });
|
|
@@ -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 { N as parseFrontmatter, O as getSkillsServer, P as getSkillsWorkspaceName, Q as getSkillsCollectionName, S as fetchWithTimeout, T as searchSkills, U as SKILLS_DIR, V as getSkillInfo, W as downloadSkillFile, X as listSkillFiles } from './run-
|
|
4
|
+
import { N as parseFrontmatter, O as getSkillsServer, P as getSkillsWorkspaceName, Q as getSkillsCollectionName, S as fetchWithTimeout, T as searchSkills, U as SKILLS_DIR, V as getSkillInfo, W as downloadSkillFile, X as listSkillFiles } from './run-C3Fcbk-H.mjs';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'url';
|
|
7
7
|
import 'child_process';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
|
-
import { j as resolveProjectRoot, I as workflowSteps, z as setWorkflowEnabled, E as isWorkflowEnabled, A as removeWorkflow, x as getWorkflow, D as listWorkflows, B as saveWorkflow, C as rawWorkflow } from './run-
|
|
2
|
+
import { j as resolveProjectRoot, I as workflowSteps, z as setWorkflowEnabled, E as isWorkflowEnabled, A as removeWorkflow, x as getWorkflow, D as listWorkflows, B as saveWorkflow, C as rawWorkflow } from './run-C3Fcbk-H.mjs';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
import 'fs';
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
2
2
|
import { execSync, execFileSync } from 'node:child_process';
|
|
3
3
|
import { basename, resolve, join, isAbsolute } from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import { $ as formatHandle, a0 as normalizeAllowedUser, a1 as loadSecurityContextConfig, a2 as resolveSecurityContext, a3 as buildSecurityContextFromFlags, a4 as mergeSecurityContexts, c as connectToHypha, a5 as buildSessionShareUrl, a6 as computeOutboundHop, i as shortId, a7 as registerAwaitingReply, a8 as buildMachineShareUrl, a9 as parseHandle, aa as handleMatchesMetadata } from './run-
|
|
5
|
+
import { $ as formatHandle, a0 as normalizeAllowedUser, a1 as loadSecurityContextConfig, a2 as resolveSecurityContext, a3 as buildSecurityContextFromFlags, a4 as mergeSecurityContexts, c as connectToHypha, a5 as buildSessionShareUrl, a6 as computeOutboundHop, i as shortId, a7 as registerAwaitingReply, a8 as buildMachineShareUrl, a9 as parseHandle, aa as handleMatchesMetadata } from './run-C3Fcbk-H.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
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-C3Fcbk-H.mjs';
|
|
5
5
|
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-CgEtGkX2.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
@@ -4,7 +4,7 @@ import { mkdirSync, chmodSync, writeFileSync, unlinkSync, existsSync, readFileSy
|
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
import { homedir, platform, arch } from 'os';
|
|
6
6
|
import { randomUUID, createHash } from 'crypto';
|
|
7
|
-
import { e as getFrpsSubdomainHost, f as getFrpsServerPort, h as getFrpsServerAddr } from './run-
|
|
7
|
+
import { e as getFrpsSubdomainHost, f as getFrpsServerPort, h as getFrpsServerAddr } from './run-C3Fcbk-H.mjs';
|
|
8
8
|
import 'fs/promises';
|
|
9
9
|
import 'url';
|
|
10
10
|
import 'node:crypto';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Y as resolveModel, ab as describeMisconfiguration, ac as buildMachineDeps } from './run-
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { Y as resolveModel, ab as describeMisconfiguration, ac as buildMachineDeps } from './run-C3Fcbk-H.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-CYqmMG_m.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-C3Fcbk-H.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as resolveProjectRoot, u as updateIssue, k as getIssue, l as resumeIssue, p as pauseIssue, m as addComment, n as addIssue, o as listIssues, q as searchIssues, t as isVisibleTo } from './run-
|
|
1
|
+
import { j as resolveProjectRoot, u as updateIssue, k as getIssue, l as resumeIssue, p as pauseIssue, m as addComment, n as addIssue, o as listIssues, q as searchIssues, t as isVisibleTo } from './run-C3Fcbk-H.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as resolveProjectRoot, v as getRun, w as listRuns, x as getWorkflow, y as runWorkflow, z as setWorkflowEnabled, A as removeWorkflow, B as saveWorkflow, C as rawWorkflow, D as listWorkflows } from './run-
|
|
1
|
+
import { j as resolveProjectRoot, v as getRun, w as listRuns, x as getWorkflow, y as runWorkflow, z as setWorkflowEnabled, A as removeWorkflow, B as saveWorkflow, C as rawWorkflow, D as listWorkflows } from './run-C3Fcbk-H.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1158,8 +1158,14 @@ async function readProcessTable() {
|
|
|
1158
1158
|
let stdout;
|
|
1159
1159
|
try {
|
|
1160
1160
|
const result = await execFileAsync$1("ps", ["-A", "-o", "pid=,ppid=,etime=,%cpu=,rss=,command="], {
|
|
1161
|
-
maxBuffer: 8 * 1024 * 1024
|
|
1161
|
+
maxBuffer: 8 * 1024 * 1024,
|
|
1162
1162
|
// 8MB — plenty for any realistic process table
|
|
1163
|
+
// Hard wall-clock deadline: on a wedged host (D-state / stuck FS) `ps` can block
|
|
1164
|
+
// forever; maxBuffer bounds size, not time. Without this the awaited promise never
|
|
1165
|
+
// settles and callers (killDescendant admin RPC, Tasks-panel detectDescendants) hang.
|
|
1166
|
+
// On timeout execFile rejects → the catch below returns [] (best-effort, no crash).
|
|
1167
|
+
timeout: 5e3,
|
|
1168
|
+
killSignal: "SIGKILL"
|
|
1163
1169
|
});
|
|
1164
1170
|
stdout = result.stdout;
|
|
1165
1171
|
} catch {
|
|
@@ -1602,16 +1608,19 @@ function isStructurallyLiveJwt(token) {
|
|
|
1602
1608
|
async function verifyTokenViaHypha(token, hyphaServerUrl) {
|
|
1603
1609
|
try {
|
|
1604
1610
|
const baseUrl = hyphaServerUrl.replace(/\/$/, "");
|
|
1605
|
-
const url = `${baseUrl}/public/services/ws/
|
|
1611
|
+
const url = `${baseUrl}/public/services/ws/parse_token`;
|
|
1606
1612
|
const resp = await fetch(url, {
|
|
1607
|
-
method: "
|
|
1613
|
+
method: "POST",
|
|
1608
1614
|
headers: {
|
|
1609
|
-
Authorization: `Bearer ${token}
|
|
1615
|
+
Authorization: `Bearer ${token}`,
|
|
1616
|
+
"Content-Type": "application/json"
|
|
1610
1617
|
},
|
|
1618
|
+
body: JSON.stringify({ token }),
|
|
1611
1619
|
signal: AbortSignal.timeout(1e4)
|
|
1612
1620
|
});
|
|
1613
1621
|
if (!resp.ok) return null;
|
|
1614
1622
|
const data = await resp.json();
|
|
1623
|
+
if (data?.is_anonymous === true) return null;
|
|
1615
1624
|
const email = data?.email;
|
|
1616
1625
|
if (typeof email === "string" && email) return email.toLowerCase();
|
|
1617
1626
|
return null;
|
|
@@ -2403,7 +2412,12 @@ class ServeManager {
|
|
|
2403
2412
|
cwd: cfg.workdir ?? process.cwd(),
|
|
2404
2413
|
env: { ...process.env, ...cfg.env ?? {} },
|
|
2405
2414
|
stdio: ["ignore", "pipe", "pipe"],
|
|
2406
|
-
|
|
2415
|
+
// #0483: run in its OWN process group so we can kill the whole tree. Managed mounts
|
|
2416
|
+
// are typically wrappers (npm start / npm run dev / python -m …) whose real listener
|
|
2417
|
+
// is a GRANDCHILD; killing only the direct pid leaves the grandchild holding the port
|
|
2418
|
+
// → next warmup hits EADDRINUSE → mount permanently broken + orphan accumulation.
|
|
2419
|
+
// killManagedTree() below signals -pid (the group).
|
|
2420
|
+
detached: true
|
|
2407
2421
|
});
|
|
2408
2422
|
child.stdout?.on("data", (d) => {
|
|
2409
2423
|
const line = d.toString().trimEnd();
|
|
@@ -2429,10 +2443,7 @@ class ServeManager {
|
|
|
2429
2443
|
this.log(`Managed process '${name}' ready on 127.0.0.1:${cfg.port}`);
|
|
2430
2444
|
}).catch((err) => {
|
|
2431
2445
|
this.log(`Managed process '${name}' warmup failed: ${err.message}`);
|
|
2432
|
-
|
|
2433
|
-
child.kill("SIGTERM");
|
|
2434
|
-
} catch {
|
|
2435
|
-
}
|
|
2446
|
+
this.killManagedTree(child, "SIGTERM");
|
|
2436
2447
|
this.managedProcs.delete(name);
|
|
2437
2448
|
throw err;
|
|
2438
2449
|
});
|
|
@@ -2440,12 +2451,33 @@ class ServeManager {
|
|
|
2440
2451
|
child,
|
|
2441
2452
|
pid: child.pid ?? 0,
|
|
2442
2453
|
lastRequestAt: Date.now(),
|
|
2454
|
+
activeConns: 0,
|
|
2443
2455
|
warmupPromise
|
|
2444
2456
|
};
|
|
2445
2457
|
this.managedProcs.set(name, newHandle);
|
|
2446
2458
|
this.log(`Managed process '${name}' starting: ${cfg.command} ${(cfg.args ?? []).join(" ")} (port ${cfg.port})`);
|
|
2447
2459
|
return warmupPromise;
|
|
2448
2460
|
}
|
|
2461
|
+
/**
|
|
2462
|
+
* #0483: kill the managed child's whole PROCESS GROUP (it was spawned detached, so it leads
|
|
2463
|
+
* its own group). This reaps grandchildren (the real listener behind an npm/python wrapper)
|
|
2464
|
+
* that a direct child.kill() would orphan, leaving the port bound. Falls back to a direct
|
|
2465
|
+
* child.kill() if the group signal fails (e.g. pid already gone).
|
|
2466
|
+
*/
|
|
2467
|
+
killManagedTree(child, signal) {
|
|
2468
|
+
const pid = child.pid;
|
|
2469
|
+
if (pid && pid > 0) {
|
|
2470
|
+
try {
|
|
2471
|
+
process.kill(-pid, signal);
|
|
2472
|
+
return;
|
|
2473
|
+
} catch {
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
try {
|
|
2477
|
+
child.kill(signal);
|
|
2478
|
+
} catch {
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2449
2481
|
/** Poll a URL until it returns <500 or the deadline passes. */
|
|
2450
2482
|
async warmupProbe(url, timeoutMs) {
|
|
2451
2483
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -2478,17 +2510,11 @@ class ServeManager {
|
|
|
2478
2510
|
const h = this.managedProcs.get(name);
|
|
2479
2511
|
if (!h) return;
|
|
2480
2512
|
this.managedProcs.delete(name);
|
|
2481
|
-
try {
|
|
2482
|
-
h.child.kill("SIGTERM");
|
|
2483
|
-
} catch {
|
|
2484
|
-
}
|
|
2485
2513
|
const child = h.child;
|
|
2514
|
+
this.killManagedTree(child, "SIGTERM");
|
|
2486
2515
|
await new Promise((resolve) => {
|
|
2487
2516
|
const t = setTimeout(() => {
|
|
2488
|
-
|
|
2489
|
-
child.kill("SIGKILL");
|
|
2490
|
-
} catch {
|
|
2491
|
-
}
|
|
2517
|
+
this.killManagedTree(child, "SIGKILL");
|
|
2492
2518
|
resolve();
|
|
2493
2519
|
}, 5e3);
|
|
2494
2520
|
child.once("exit", () => {
|
|
@@ -2508,6 +2534,10 @@ class ServeManager {
|
|
|
2508
2534
|
if (!cfg || !cfg.idleTimeoutSec || cfg.idleTimeoutSec <= 0) continue;
|
|
2509
2535
|
const h = this.managedProcs.get(name);
|
|
2510
2536
|
if (!h || h.warmupPromise) continue;
|
|
2537
|
+
if (h.activeConns > 0) {
|
|
2538
|
+
h.lastRequestAt = now;
|
|
2539
|
+
continue;
|
|
2540
|
+
}
|
|
2511
2541
|
if (now - h.lastRequestAt >= cfg.idleTimeoutSec * 1e3) {
|
|
2512
2542
|
this.log(`Idle eviction: stopping '${name}' (idle ${Math.round((now - h.lastRequestAt) / 1e3)}s \u2265 ${cfg.idleTimeoutSec}s)`);
|
|
2513
2543
|
this.stopManagedProcess(name).catch(() => {
|
|
@@ -2538,7 +2568,9 @@ class ServeManager {
|
|
|
2538
2568
|
...this.port > 0 ? { port: this.port } : {}
|
|
2539
2569
|
};
|
|
2540
2570
|
try {
|
|
2541
|
-
|
|
2571
|
+
const tmp = `${this.persistFile}.${process.pid}.${crypto.randomBytes(4).toString("hex")}.tmp`;
|
|
2572
|
+
fs.writeFileSync(tmp, JSON.stringify(state, null, 2));
|
|
2573
|
+
fs.renameSync(tmp, this.persistFile);
|
|
2542
2574
|
} catch (err) {
|
|
2543
2575
|
this.log(`Error persisting serve state: ${err.message}`);
|
|
2544
2576
|
}
|
|
@@ -2709,7 +2741,18 @@ a{color:#0969da;text-decoration:none;font-weight:500}a:hover{text-decoration:und
|
|
|
2709
2741
|
}
|
|
2710
2742
|
}
|
|
2711
2743
|
const handle = this.managedProcs.get(mount.name);
|
|
2712
|
-
if (handle)
|
|
2744
|
+
if (handle) {
|
|
2745
|
+
handle.lastRequestAt = Date.now();
|
|
2746
|
+
handle.activeConns++;
|
|
2747
|
+
let released = false;
|
|
2748
|
+
const release = () => {
|
|
2749
|
+
if (released) return;
|
|
2750
|
+
released = true;
|
|
2751
|
+
handle.activeConns = Math.max(0, handle.activeConns - 1);
|
|
2752
|
+
handle.lastRequestAt = Date.now();
|
|
2753
|
+
};
|
|
2754
|
+
res.on("close", release);
|
|
2755
|
+
}
|
|
2713
2756
|
const targetPath = mountResolvedByHost ? req.url || "/" : (basePath || "/") + (url.search || "");
|
|
2714
2757
|
const proxyReq = http.request({
|
|
2715
2758
|
hostname: "127.0.0.1",
|
|
@@ -2810,7 +2853,17 @@ Connection: close\r
|
|
|
2810
2853
|
}
|
|
2811
2854
|
}
|
|
2812
2855
|
const handle = this.managedProcs.get(mount.name);
|
|
2813
|
-
if (handle)
|
|
2856
|
+
if (handle) {
|
|
2857
|
+
handle.lastRequestAt = Date.now();
|
|
2858
|
+
handle.activeConns++;
|
|
2859
|
+
let released = false;
|
|
2860
|
+
clientSocket.on("close", () => {
|
|
2861
|
+
if (released) return;
|
|
2862
|
+
released = true;
|
|
2863
|
+
handle.activeConns = Math.max(0, handle.activeConns - 1);
|
|
2864
|
+
handle.lastRequestAt = Date.now();
|
|
2865
|
+
});
|
|
2866
|
+
}
|
|
2814
2867
|
const targetPath = mountResolvedByHost ? req.url || "/" : (url.pathname.slice(`/${mountName}`.length) || "/") + (url.search || "");
|
|
2815
2868
|
const upstream = net.connect(cfg.port, "127.0.0.1", () => {
|
|
2816
2869
|
const lines = [`${req.method} ${targetPath} HTTP/1.1`];
|
|
@@ -2902,7 +2955,7 @@ Connection: close\r
|
|
|
2902
2955
|
const mount = this.mounts.get(mountName);
|
|
2903
2956
|
const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, buildLinkSubdomain(subdomainSafe, mount.linkToken)]]) : void 0;
|
|
2904
2957
|
try {
|
|
2905
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
2958
|
+
const { FrpcTunnel } = await import('./frpc-D3faR6iR.mjs');
|
|
2906
2959
|
let tunnel;
|
|
2907
2960
|
tunnel = new FrpcTunnel({
|
|
2908
2961
|
name: tunnelName,
|
|
@@ -4394,6 +4447,7 @@ class ChannelOutbox {
|
|
|
4394
4447
|
}
|
|
4395
4448
|
/** Append a reply addressed to `to`. Assigns seq + ts, persists, and wakes waiters. */
|
|
4396
4449
|
append(channelId, r) {
|
|
4450
|
+
this.reload();
|
|
4397
4451
|
const seq = (this.seqByChannel.get(channelId) || 0) + 1;
|
|
4398
4452
|
this.seqByChannel.set(channelId, seq);
|
|
4399
4453
|
const reply = { seq, ts: Date.now(), to: r.to, body: r.body, ...r.correlationId ? { correlationId: r.correlationId } : {} };
|
|
@@ -4412,6 +4466,7 @@ class ChannelOutbox {
|
|
|
4412
4466
|
}
|
|
4413
4467
|
if (++this.appendsSinceCompact >= COMPACT_EVERY) {
|
|
4414
4468
|
this.appendsSinceCompact = 0;
|
|
4469
|
+
this.reload();
|
|
4415
4470
|
this._compact();
|
|
4416
4471
|
}
|
|
4417
4472
|
this.emitter.emit(channelId, reply);
|
|
@@ -4469,6 +4524,7 @@ class ChannelOutbox {
|
|
|
4469
4524
|
}
|
|
4470
4525
|
/** Drop a channel's outbox (on channel delete) — best-effort rewrite of the log. */
|
|
4471
4526
|
purge(channelId) {
|
|
4527
|
+
if (existsSync(this.file)) this.reload();
|
|
4472
4528
|
this.byChannel.delete(channelId);
|
|
4473
4529
|
this.seqByChannel.delete(channelId);
|
|
4474
4530
|
if (!existsSync(this.file)) return;
|
|
@@ -5704,7 +5760,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
5704
5760
|
const tunnels = handlers.tunnels;
|
|
5705
5761
|
if (!tunnels) throw new Error("Tunnel management not available");
|
|
5706
5762
|
if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
|
|
5707
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
5763
|
+
const { FrpcTunnel } = await import('./frpc-D3faR6iR.mjs');
|
|
5708
5764
|
const tunnel = new FrpcTunnel({
|
|
5709
5765
|
name: params.name,
|
|
5710
5766
|
ports: params.ports,
|
|
@@ -6178,7 +6234,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
6178
6234
|
}
|
|
6179
6235
|
const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
|
|
6180
6236
|
const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
|
|
6181
|
-
const { toolsForRole } = await import('./sideband-
|
|
6237
|
+
const { toolsForRole } = await import('./sideband-CYqmMG_m.mjs');
|
|
6182
6238
|
const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
|
|
6183
6239
|
return fmt(r2);
|
|
6184
6240
|
}
|
|
@@ -6277,7 +6333,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
6277
6333
|
if (r.error || !r.sender) return { error: r.error || "unauthorized" };
|
|
6278
6334
|
const callId = "call_" + Math.random().toString(16).slice(2, 12);
|
|
6279
6335
|
const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
|
|
6280
|
-
const { queryCore } = await import('./commands-
|
|
6336
|
+
const { queryCore } = await import('./commands-D7fIWAgz.mjs');
|
|
6281
6337
|
const timeout = c.reply?.timeout_sec || 120;
|
|
6282
6338
|
let result;
|
|
6283
6339
|
try {
|
|
@@ -6372,7 +6428,9 @@ ${d?.error || "not found"}`;
|
|
|
6372
6428
|
});
|
|
6373
6429
|
if (r.error || !r.sender) return { error: r.error || "unauthorized" };
|
|
6374
6430
|
const cursor = Math.max(0, Number(kwargs.cursor) || 0);
|
|
6375
|
-
const
|
|
6431
|
+
const waitRaw = Number(kwargs.wait ?? 25);
|
|
6432
|
+
const waitSec = Number.isFinite(waitRaw) ? waitRaw : 25;
|
|
6433
|
+
const waitMs = Math.min(Math.max(0, waitSec * 1e3), 6e4);
|
|
6376
6434
|
const outbox = new ChannelOutbox(dir);
|
|
6377
6435
|
const deadline = Date.now() + waitMs;
|
|
6378
6436
|
for (; ; ) {
|
|
@@ -6483,7 +6541,7 @@ function writeInboundContext(sessionId, ctx) {
|
|
|
6483
6541
|
try {
|
|
6484
6542
|
const p = ctxPath(sessionId);
|
|
6485
6543
|
mkdirSync$1(join$1(SVAMP_HOME$2, "inbound"), { recursive: true });
|
|
6486
|
-
const tmp = p
|
|
6544
|
+
const tmp = `${p}.${process.pid}.${randomUUID()}.tmp`;
|
|
6487
6545
|
writeFileSync$1(tmp, JSON.stringify({ ...ctx, deliveredAt: Date.now() }));
|
|
6488
6546
|
renameSync(tmp, p);
|
|
6489
6547
|
} catch {
|
|
@@ -15957,7 +16015,7 @@ async function startDaemon(options) {
|
|
|
15957
16015
|
try {
|
|
15958
16016
|
const dir = loadSessionIndex()[sessionId]?.directory;
|
|
15959
16017
|
if (!dir) return;
|
|
15960
|
-
const { reconcileServiceLinks } = await import('./agentCommands-
|
|
16018
|
+
const { reconcileServiceLinks } = await import('./agentCommands-DGT-1wjo.mjs');
|
|
15961
16019
|
const configPath = getSvampConfigPath(dir, sessionId);
|
|
15962
16020
|
const config = readSvampConfig(configPath);
|
|
15963
16021
|
const entries = Array.from(urls.entries());
|
|
@@ -15975,7 +16033,7 @@ async function startDaemon(options) {
|
|
|
15975
16033
|
}
|
|
15976
16034
|
}
|
|
15977
16035
|
async function createExposedTunnel(spec) {
|
|
15978
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
16036
|
+
const { FrpcTunnel } = await import('./frpc-D3faR6iR.mjs');
|
|
15979
16037
|
const tunnel = new FrpcTunnel({
|
|
15980
16038
|
name: spec.name,
|
|
15981
16039
|
ports: spec.ports,
|
|
@@ -18165,11 +18223,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
18165
18223
|
});
|
|
18166
18224
|
},
|
|
18167
18225
|
onIssue: async (params) => {
|
|
18168
|
-
const { issueRpc } = await import('./rpc-
|
|
18226
|
+
const { issueRpc } = await import('./rpc-BQ8zLSUc.mjs');
|
|
18169
18227
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
18170
18228
|
},
|
|
18171
18229
|
onWorkflow: async (params) => {
|
|
18172
|
-
const { workflowRpc } = await import('./rpc-
|
|
18230
|
+
const { workflowRpc } = await import('./rpc-xlV-4-BG.mjs');
|
|
18173
18231
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
18174
18232
|
},
|
|
18175
18233
|
onRipgrep: async (args, cwd) => {
|
|
@@ -18780,11 +18838,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
18780
18838
|
});
|
|
18781
18839
|
},
|
|
18782
18840
|
onIssue: async (params) => {
|
|
18783
|
-
const { issueRpc } = await import('./rpc-
|
|
18841
|
+
const { issueRpc } = await import('./rpc-BQ8zLSUc.mjs');
|
|
18784
18842
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
18785
18843
|
},
|
|
18786
18844
|
onWorkflow: async (params) => {
|
|
18787
|
-
const { workflowRpc } = await import('./rpc-
|
|
18845
|
+
const { workflowRpc } = await import('./rpc-xlV-4-BG.mjs');
|
|
18788
18846
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
18789
18847
|
},
|
|
18790
18848
|
onRipgrep: async (args, cwd) => {
|
|
@@ -19873,7 +19931,7 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
|
|
|
19873
19931
|
const PING_TIMEOUT_MS = 15e3;
|
|
19874
19932
|
const POST_RECONNECT_GRACE_MS = 2e4;
|
|
19875
19933
|
const RECONNECT_JITTER_MS = 2500;
|
|
19876
|
-
const { WorkflowScheduler } = await import('./scheduler-
|
|
19934
|
+
const { WorkflowScheduler } = await import('./scheduler-DaFZY2ob.mjs');
|
|
19877
19935
|
const workflowScheduler = new WorkflowScheduler({
|
|
19878
19936
|
projectRoots: () => {
|
|
19879
19937
|
const dirs = /* @__PURE__ */ new Set();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { ad as applyClaudeProxyEnv, ae as composeSessionId, af as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, ag as generateHookSettings } from './run-
|
|
1
|
+
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { ad as applyClaudeProxyEnv, ae as composeSessionId, af as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, ag as generateHookSettings } from './run-C3Fcbk-H.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 { j as resolveProjectRoot, D as listWorkflows, E as isWorkflowEnabled, F as workflowCrons, y as runWorkflow, G as cronMatches } from './run-
|
|
1
|
+
import { j as resolveProjectRoot, D as listWorkflows, E as isWorkflowEnabled, F as workflowCrons, y as runWorkflow, G as cronMatches } from './run-C3Fcbk-H.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-D7fIWAgz.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-D7fIWAgz.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-D7fIWAgz.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-D7fIWAgz.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-D7fIWAgz.mjs');
|
|
239
239
|
const { machine, server } = await connectAndGetMachine(machineId);
|
|
240
240
|
try {
|
|
241
241
|
const info = await machine.serveInfo();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as READ_ONLY_TOOLS, J as loadMachineContext, K as buildMachineInstructions, L as machineToolsForRole, M as buildMachineTools } from './run-
|
|
1
|
+
import { R as READ_ONLY_TOOLS, J as loadMachineContext, K as buildMachineInstructions, L as machineToolsForRole, M as buildMachineTools } from './run-C3Fcbk-H.mjs';
|
|
2
2
|
import 'node:child_process';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|