svamp-cli 0.2.101 → 0.2.102
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-CAqLhLOH.mjs → agentCommands-Cm-Cu_9Z.mjs} +17 -3
- package/dist/{auth-CYA0e4mT.mjs → auth-BwHB9Upd.mjs} +2 -1
- package/dist/cli.mjs +51 -50
- package/dist/{commands-B2uNdsyR.mjs → commands-Clj_0eV6.mjs} +3 -2
- package/dist/{commands-Bxn_4u7d.mjs → commands-DNxxgy4V.mjs} +2 -1
- package/dist/{commands-CdxEOPUt.mjs → commands-DpRXzSr9.mjs} +2 -1
- package/dist/{commands-D-3h8H0C.mjs → commands-h6yGJuJw.mjs} +5 -5
- package/dist/{commands-DRQUzw4j.mjs → commands-x1wznXLf.mjs} +2 -1
- package/dist/{fleet-CNF84yJV.mjs → fleet-Cilkj57K.mjs} +2 -1
- package/dist/{frpc-WVnBbyjf.mjs → frpc-cJUGFtWY.mjs} +2 -1
- package/dist/{headlessCli-DcP8eawK.mjs → headlessCli-CZEbwp47.mjs} +3 -2
- package/dist/{httpServer-wwHHk1EM.mjs → httpServer-D9qLS8ed.mjs} +56 -0
- package/dist/index.mjs +2 -1
- package/dist/{package-DHxiXJ3N.mjs → package-BsbKsOb_.mjs} +2 -2
- package/dist/{run-CsMTSngP.mjs → run-B_FyvS11.mjs} +218 -10
- package/dist/{run-C7WSV8zx.mjs → run-CW6bkzDX.mjs} +2 -1
- package/dist/{serveCommands-Can8WtLI.mjs → serveCommands-O2px1za0.mjs} +5 -5
- package/dist/{serveManager-DfETVSOb.mjs → serveManager-B757hHGd.mjs} +3 -2
- package/dist/{sideband-C10Ni7p_.mjs → sideband-DYhbiCEA.mjs} +2 -1
- package/package.json +2 -2
|
@@ -148,7 +148,7 @@ async function sessionBroadcast(action, args) {
|
|
|
148
148
|
console.log(`Broadcast sent: ${action}`);
|
|
149
149
|
}
|
|
150
150
|
async function connectToMachineService() {
|
|
151
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
151
|
+
const { connectAndGetMachine } = await import('./commands-DpRXzSr9.mjs');
|
|
152
152
|
return connectAndGetMachine();
|
|
153
153
|
}
|
|
154
154
|
async function inboxSend(targetSessionId, opts) {
|
|
@@ -165,7 +165,7 @@ async function inboxSend(targetSessionId, opts) {
|
|
|
165
165
|
}
|
|
166
166
|
const { server, machine } = await connectToMachineService();
|
|
167
167
|
try {
|
|
168
|
-
const { resolveSessionId } = await import('./commands-
|
|
168
|
+
const { resolveSessionId } = await import('./commands-DpRXzSr9.mjs');
|
|
169
169
|
const sessions = await machine.listSessions();
|
|
170
170
|
const match = resolveSessionId(sessions, targetSessionId);
|
|
171
171
|
const fullTargetId = match.sessionId;
|
|
@@ -233,8 +233,22 @@ async function inboxReply(messageId, body) {
|
|
|
233
233
|
console.error(`Message ${messageId} not found in inbox.`);
|
|
234
234
|
process.exit(1);
|
|
235
235
|
}
|
|
236
|
+
if (original.channelId && original.correlationId) {
|
|
237
|
+
const rr = await machine.sessionRPC(sessionId, "channelReply", {
|
|
238
|
+
channel: original.channelId,
|
|
239
|
+
correlationId: original.correlationId,
|
|
240
|
+
to: original.from,
|
|
241
|
+
body
|
|
242
|
+
});
|
|
243
|
+
if (rr?.error) {
|
|
244
|
+
console.error(`Channel reply failed: ${rr.error}`);
|
|
245
|
+
process.exit(1);
|
|
246
|
+
}
|
|
247
|
+
console.log(`Reply queued to "${original.from}" on channel ${original.channelId} (correlation ${original.correlationId}).`);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
236
250
|
if (!original.fromSession) {
|
|
237
|
-
console.error("Cannot reply: original message has no fromSession.");
|
|
251
|
+
console.error("Cannot reply: original message has no fromSession (and not a channel message).");
|
|
238
252
|
process.exit(1);
|
|
239
253
|
}
|
|
240
254
|
const { randomUUID } = await import('node:crypto');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as resolveModel } from './run-
|
|
1
|
+
import { E as resolveModel } from './run-B_FyvS11.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -12,6 +12,7 @@ import 'util';
|
|
|
12
12
|
import 'node:crypto';
|
|
13
13
|
import 'node:path';
|
|
14
14
|
import 'node:os';
|
|
15
|
+
import 'node:events';
|
|
15
16
|
import '@agentclientprotocol/sdk';
|
|
16
17
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
17
18
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
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-B_FyvS11.mjs';
|
|
2
2
|
import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|
|
@@ -13,6 +13,7 @@ import 'util';
|
|
|
13
13
|
import 'node:crypto';
|
|
14
14
|
import 'node:path';
|
|
15
15
|
import 'node:os';
|
|
16
|
+
import 'node:events';
|
|
16
17
|
import '@agentclientprotocol/sdk';
|
|
17
18
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
18
19
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -33,7 +34,7 @@ const subcommand = args[0];
|
|
|
33
34
|
let daemonSubcommand = args[1];
|
|
34
35
|
async function main() {
|
|
35
36
|
try {
|
|
36
|
-
const { getLoadedConfig } = await import('./run-
|
|
37
|
+
const { getLoadedConfig } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.Y; });
|
|
37
38
|
getLoadedConfig();
|
|
38
39
|
} catch {
|
|
39
40
|
}
|
|
@@ -50,7 +51,7 @@ async function main() {
|
|
|
50
51
|
console.error(`svamp daemon restart: ${err.message || err}`);
|
|
51
52
|
process.exit(1);
|
|
52
53
|
}
|
|
53
|
-
const { restartDaemon } = await import('./run-
|
|
54
|
+
const { restartDaemon } = await import('./run-B_FyvS11.mjs').then(function (n) { return n._; });
|
|
54
55
|
await restartDaemon();
|
|
55
56
|
process.exit(0);
|
|
56
57
|
}
|
|
@@ -343,7 +344,7 @@ async function main() {
|
|
|
343
344
|
console.error("svamp service: Service commands are not available in sandboxed sessions.");
|
|
344
345
|
process.exit(1);
|
|
345
346
|
}
|
|
346
|
-
const { handleServiceCommand } = await import('./commands-
|
|
347
|
+
const { handleServiceCommand } = await import('./commands-h6yGJuJw.mjs');
|
|
347
348
|
await handleServiceCommand();
|
|
348
349
|
} else if (subcommand === "serve") {
|
|
349
350
|
const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
|
|
@@ -351,7 +352,7 @@ async function main() {
|
|
|
351
352
|
console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
|
|
352
353
|
process.exit(1);
|
|
353
354
|
}
|
|
354
|
-
const { handleServeCommand } = await import('./serveCommands-
|
|
355
|
+
const { handleServeCommand } = await import('./serveCommands-O2px1za0.mjs');
|
|
355
356
|
await handleServeCommand();
|
|
356
357
|
process.exit(0);
|
|
357
358
|
} else if (subcommand === "process" || subcommand === "proc") {
|
|
@@ -360,7 +361,7 @@ async function main() {
|
|
|
360
361
|
console.error("svamp process: Process commands are not available in sandboxed sessions.");
|
|
361
362
|
process.exit(1);
|
|
362
363
|
}
|
|
363
|
-
const { processCommand } = await import('./commands-
|
|
364
|
+
const { processCommand } = await import('./commands-Clj_0eV6.mjs');
|
|
364
365
|
let machineId;
|
|
365
366
|
const processArgs = args.slice(1);
|
|
366
367
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -374,7 +375,7 @@ async function main() {
|
|
|
374
375
|
}), machineId);
|
|
375
376
|
process.exit(0);
|
|
376
377
|
} else if (subcommand === "routine" || subcommand === "routines") {
|
|
377
|
-
const { routineCommand } = await import('./commands-
|
|
378
|
+
const { routineCommand } = await import('./commands-DNxxgy4V.mjs');
|
|
378
379
|
await routineCommand(args.slice(1));
|
|
379
380
|
process.exit(0);
|
|
380
381
|
} else if (subcommand === "wise-agent" || subcommand === "wise") {
|
|
@@ -385,7 +386,7 @@ async function main() {
|
|
|
385
386
|
} else if (!subcommand || subcommand === "start") {
|
|
386
387
|
await handleInteractiveCommand();
|
|
387
388
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
388
|
-
const pkg = await import('./package-
|
|
389
|
+
const pkg = await import('./package-BsbKsOb_.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
389
390
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
390
391
|
} else {
|
|
391
392
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -394,7 +395,7 @@ async function main() {
|
|
|
394
395
|
}
|
|
395
396
|
}
|
|
396
397
|
async function handleInteractiveCommand() {
|
|
397
|
-
const { runInteractive } = await import('./run-
|
|
398
|
+
const { runInteractive } = await import('./run-CW6bkzDX.mjs');
|
|
398
399
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
399
400
|
let directory = process.cwd();
|
|
400
401
|
let resumeSessionId;
|
|
@@ -439,7 +440,7 @@ async function handleAgentCommand() {
|
|
|
439
440
|
return;
|
|
440
441
|
}
|
|
441
442
|
if (agentArgs[0] === "list") {
|
|
442
|
-
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-
|
|
443
|
+
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.U; });
|
|
443
444
|
console.log("Known agents:");
|
|
444
445
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
445
446
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -451,7 +452,7 @@ async function handleAgentCommand() {
|
|
|
451
452
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
452
453
|
return;
|
|
453
454
|
}
|
|
454
|
-
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-
|
|
455
|
+
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.U; });
|
|
455
456
|
let cwd = process.cwd();
|
|
456
457
|
const filteredArgs = [];
|
|
457
458
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -475,12 +476,12 @@ async function handleAgentCommand() {
|
|
|
475
476
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
476
477
|
let backend;
|
|
477
478
|
if (KNOWN_MCP_AGENTS[config.agentName]) {
|
|
478
|
-
const { CodexMcpBackend } = await import('./run-
|
|
479
|
+
const { CodexMcpBackend } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.V; });
|
|
479
480
|
backend = new CodexMcpBackend({ cwd, log: logFn });
|
|
480
481
|
} else {
|
|
481
|
-
const { AcpBackend } = await import('./run-
|
|
482
|
-
const { GeminiTransport } = await import('./run-
|
|
483
|
-
const { DefaultTransport } = await import('./run-
|
|
482
|
+
const { AcpBackend } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.T; });
|
|
483
|
+
const { GeminiTransport } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.W; });
|
|
484
|
+
const { DefaultTransport } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.Q; });
|
|
484
485
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
485
486
|
backend = new AcpBackend({
|
|
486
487
|
agentName: config.agentName,
|
|
@@ -607,7 +608,7 @@ async function handleSessionCommand() {
|
|
|
607
608
|
process.exit(1);
|
|
608
609
|
}
|
|
609
610
|
}
|
|
610
|
-
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-
|
|
611
|
+
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-DpRXzSr9.mjs');
|
|
611
612
|
const parseFlagStr = (flag, shortFlag) => {
|
|
612
613
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
613
614
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -675,7 +676,7 @@ async function handleSessionCommand() {
|
|
|
675
676
|
allowDomain.push(sessionArgs[++i]);
|
|
676
677
|
}
|
|
677
678
|
}
|
|
678
|
-
const { parseShareArg } = await import('./commands-
|
|
679
|
+
const { parseShareArg } = await import('./commands-DpRXzSr9.mjs');
|
|
679
680
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
680
681
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
681
682
|
message,
|
|
@@ -762,7 +763,7 @@ async function handleSessionCommand() {
|
|
|
762
763
|
console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
|
|
763
764
|
process.exit(1);
|
|
764
765
|
}
|
|
765
|
-
const { sessionQuery } = await import('./commands-
|
|
766
|
+
const { sessionQuery } = await import('./commands-DpRXzSr9.mjs');
|
|
766
767
|
await sessionQuery(dir, prompt, targetMachineId, {
|
|
767
768
|
timeout: parseFlagInt("--timeout"),
|
|
768
769
|
json: hasFlag("--json"),
|
|
@@ -795,7 +796,7 @@ async function handleSessionCommand() {
|
|
|
795
796
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
796
797
|
process.exit(1);
|
|
797
798
|
}
|
|
798
|
-
const { sessionApprove } = await import('./commands-
|
|
799
|
+
const { sessionApprove } = await import('./commands-DpRXzSr9.mjs');
|
|
799
800
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
800
801
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
801
802
|
json: hasFlag("--json")
|
|
@@ -805,7 +806,7 @@ async function handleSessionCommand() {
|
|
|
805
806
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
806
807
|
process.exit(1);
|
|
807
808
|
}
|
|
808
|
-
const { sessionDeny } = await import('./commands-
|
|
809
|
+
const { sessionDeny } = await import('./commands-DpRXzSr9.mjs');
|
|
809
810
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
810
811
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
811
812
|
json: hasFlag("--json")
|
|
@@ -840,7 +841,7 @@ async function handleSessionCommand() {
|
|
|
840
841
|
console.error("Usage: svamp session set-title <title>");
|
|
841
842
|
process.exit(1);
|
|
842
843
|
}
|
|
843
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
844
|
+
const { sessionSetTitle } = await import('./agentCommands-Cm-Cu_9Z.mjs');
|
|
844
845
|
await sessionSetTitle(title);
|
|
845
846
|
} else if (sessionSubcommand === "set-link") {
|
|
846
847
|
const url = sessionArgs[1];
|
|
@@ -849,7 +850,7 @@ async function handleSessionCommand() {
|
|
|
849
850
|
process.exit(1);
|
|
850
851
|
}
|
|
851
852
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
852
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
853
|
+
const { sessionSetLink } = await import('./agentCommands-Cm-Cu_9Z.mjs');
|
|
853
854
|
await sessionSetLink(url, label);
|
|
854
855
|
} else if (sessionSubcommand === "notify") {
|
|
855
856
|
const message = sessionArgs[1];
|
|
@@ -858,7 +859,7 @@ async function handleSessionCommand() {
|
|
|
858
859
|
process.exit(1);
|
|
859
860
|
}
|
|
860
861
|
const level = parseFlagStr("--level") || "info";
|
|
861
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
862
|
+
const { sessionNotify } = await import('./agentCommands-Cm-Cu_9Z.mjs');
|
|
862
863
|
await sessionNotify(message, level);
|
|
863
864
|
} else if (sessionSubcommand === "broadcast") {
|
|
864
865
|
const action = sessionArgs[1];
|
|
@@ -866,7 +867,7 @@ async function handleSessionCommand() {
|
|
|
866
867
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
867
868
|
process.exit(1);
|
|
868
869
|
}
|
|
869
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
870
|
+
const { sessionBroadcast } = await import('./agentCommands-Cm-Cu_9Z.mjs');
|
|
870
871
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
871
872
|
} else if (sessionSubcommand === "inbox") {
|
|
872
873
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -877,7 +878,7 @@ async function handleSessionCommand() {
|
|
|
877
878
|
process.exit(1);
|
|
878
879
|
}
|
|
879
880
|
if (agentSessionId) {
|
|
880
|
-
const { inboxSend } = await import('./agentCommands-
|
|
881
|
+
const { inboxSend } = await import('./agentCommands-Cm-Cu_9Z.mjs');
|
|
881
882
|
await inboxSend(sessionArgs[2], {
|
|
882
883
|
body: sessionArgs[3],
|
|
883
884
|
subject: parseFlagStr("--subject"),
|
|
@@ -892,7 +893,7 @@ async function handleSessionCommand() {
|
|
|
892
893
|
}
|
|
893
894
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
894
895
|
if (agentSessionId && !sessionArgs[2]) {
|
|
895
|
-
const { inboxList } = await import('./agentCommands-
|
|
896
|
+
const { inboxList } = await import('./agentCommands-Cm-Cu_9Z.mjs');
|
|
896
897
|
await inboxList({
|
|
897
898
|
unread: hasFlag("--unread"),
|
|
898
899
|
limit: parseFlagInt("--limit"),
|
|
@@ -914,7 +915,7 @@ async function handleSessionCommand() {
|
|
|
914
915
|
process.exit(1);
|
|
915
916
|
}
|
|
916
917
|
if (agentSessionId && !sessionArgs[3]) {
|
|
917
|
-
const { inboxList } = await import('./agentCommands-
|
|
918
|
+
const { inboxList } = await import('./agentCommands-Cm-Cu_9Z.mjs');
|
|
918
919
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
919
920
|
} else if (sessionArgs[3]) {
|
|
920
921
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -924,7 +925,7 @@ async function handleSessionCommand() {
|
|
|
924
925
|
}
|
|
925
926
|
} else if (inboxSubcmd === "reply") {
|
|
926
927
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
927
|
-
const { inboxReply } = await import('./agentCommands-
|
|
928
|
+
const { inboxReply } = await import('./agentCommands-Cm-Cu_9Z.mjs');
|
|
928
929
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
929
930
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
930
931
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -960,7 +961,7 @@ async function handleMachineCommand() {
|
|
|
960
961
|
return;
|
|
961
962
|
}
|
|
962
963
|
if (machineSubcommand === "share") {
|
|
963
|
-
const { machineShare } = await import('./commands-
|
|
964
|
+
const { machineShare } = await import('./commands-DpRXzSr9.mjs');
|
|
964
965
|
let machineId;
|
|
965
966
|
const shareArgs = [];
|
|
966
967
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -990,7 +991,7 @@ async function handleMachineCommand() {
|
|
|
990
991
|
}
|
|
991
992
|
await machineShare(machineId, { add, remove, list, configPath, showConfig });
|
|
992
993
|
} else if (machineSubcommand === "exec") {
|
|
993
|
-
const { machineExec } = await import('./commands-
|
|
994
|
+
const { machineExec } = await import('./commands-DpRXzSr9.mjs');
|
|
994
995
|
let machineId;
|
|
995
996
|
let cwd;
|
|
996
997
|
const cmdParts = [];
|
|
@@ -1010,7 +1011,7 @@ async function handleMachineCommand() {
|
|
|
1010
1011
|
}
|
|
1011
1012
|
await machineExec(machineId, command, cwd);
|
|
1012
1013
|
} else if (machineSubcommand === "info") {
|
|
1013
|
-
const { machineInfo } = await import('./commands-
|
|
1014
|
+
const { machineInfo } = await import('./commands-DpRXzSr9.mjs');
|
|
1014
1015
|
let machineId;
|
|
1015
1016
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
1016
1017
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -1030,10 +1031,10 @@ async function handleMachineCommand() {
|
|
|
1030
1031
|
level = machineArgs[++i];
|
|
1031
1032
|
}
|
|
1032
1033
|
}
|
|
1033
|
-
const { machineNotify } = await import('./agentCommands-
|
|
1034
|
+
const { machineNotify } = await import('./agentCommands-Cm-Cu_9Z.mjs');
|
|
1034
1035
|
await machineNotify(message, level);
|
|
1035
1036
|
} else if (machineSubcommand === "ls") {
|
|
1036
|
-
const { machineLs } = await import('./commands-
|
|
1037
|
+
const { machineLs } = await import('./commands-DpRXzSr9.mjs');
|
|
1037
1038
|
let machineId;
|
|
1038
1039
|
let showHidden = false;
|
|
1039
1040
|
let path;
|
|
@@ -1091,24 +1092,24 @@ Examples:
|
|
|
1091
1092
|
};
|
|
1092
1093
|
const hasFlag = (name) => fleetArgs.includes(`--${name}`);
|
|
1093
1094
|
if (sub === "status") {
|
|
1094
|
-
const { fleetStatus } = await import('./fleet-
|
|
1095
|
+
const { fleetStatus } = await import('./fleet-Cilkj57K.mjs');
|
|
1095
1096
|
await fleetStatus();
|
|
1096
1097
|
} else if (sub === "exec") {
|
|
1097
1098
|
const command = fleetArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1098
|
-
const { fleetExec } = await import('./fleet-
|
|
1099
|
+
const { fleetExec } = await import('./fleet-Cilkj57K.mjs');
|
|
1099
1100
|
await fleetExec(command, { cwd: flag("cwd") });
|
|
1100
1101
|
} else if (sub === "upgrade-claude") {
|
|
1101
|
-
const { fleetUpgradeClaude } = await import('./fleet-
|
|
1102
|
+
const { fleetUpgradeClaude } = await import('./fleet-Cilkj57K.mjs');
|
|
1102
1103
|
await fleetUpgradeClaude({ version: flag("version", "-v") });
|
|
1103
1104
|
} else if (sub === "upgrade-svamp") {
|
|
1104
|
-
const { fleetUpgradeSvamp } = await import('./fleet-
|
|
1105
|
+
const { fleetUpgradeSvamp } = await import('./fleet-Cilkj57K.mjs');
|
|
1105
1106
|
await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
|
|
1106
1107
|
} else if (sub === "daemon-restart") {
|
|
1107
|
-
const { fleetDaemonRestart } = await import('./fleet-
|
|
1108
|
+
const { fleetDaemonRestart } = await import('./fleet-Cilkj57K.mjs');
|
|
1108
1109
|
await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
|
|
1109
1110
|
} else if (sub === "push-skill") {
|
|
1110
1111
|
const name = fleetArgs[1];
|
|
1111
|
-
const { fleetPushSkill } = await import('./fleet-
|
|
1112
|
+
const { fleetPushSkill } = await import('./fleet-Cilkj57K.mjs');
|
|
1112
1113
|
await fleetPushSkill(name);
|
|
1113
1114
|
} else {
|
|
1114
1115
|
console.error(`Unknown fleet subcommand: ${sub}`);
|
|
@@ -1124,7 +1125,7 @@ async function handleSkillsCommand() {
|
|
|
1124
1125
|
await printSkillsHelp();
|
|
1125
1126
|
return;
|
|
1126
1127
|
}
|
|
1127
|
-
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-
|
|
1128
|
+
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-x1wznXLf.mjs');
|
|
1128
1129
|
if (skillsSubcommand === "find" || skillsSubcommand === "search") {
|
|
1129
1130
|
const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1130
1131
|
if (!query) {
|
|
@@ -1171,7 +1172,7 @@ async function loginToHypha() {
|
|
|
1171
1172
|
process.exit(1);
|
|
1172
1173
|
}
|
|
1173
1174
|
const anchor = anchorArg.replace(/\/+$/, "");
|
|
1174
|
-
const { loadInstanceConfig } = await import('./run-
|
|
1175
|
+
const { loadInstanceConfig } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.Y; });
|
|
1175
1176
|
let cfg = null;
|
|
1176
1177
|
try {
|
|
1177
1178
|
cfg = await loadInstanceConfig({ anchor, force: true });
|
|
@@ -1282,7 +1283,7 @@ async function logoutFromHypha() {
|
|
|
1282
1283
|
} catch {
|
|
1283
1284
|
}
|
|
1284
1285
|
try {
|
|
1285
|
-
const { clearInstanceConfigCache } = await import('./run-
|
|
1286
|
+
const { clearInstanceConfigCache } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.Y; });
|
|
1286
1287
|
clearInstanceConfigCache();
|
|
1287
1288
|
} catch {
|
|
1288
1289
|
}
|
|
@@ -1613,7 +1614,7 @@ async function applyClaudeAuthFlags(argv) {
|
|
|
1613
1614
|
"--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
|
|
1614
1615
|
);
|
|
1615
1616
|
}
|
|
1616
|
-
const mod = await import('./run-
|
|
1617
|
+
const mod = await import('./run-B_FyvS11.mjs').then(function (n) { return n.X; });
|
|
1617
1618
|
if (hasHypha) {
|
|
1618
1619
|
let url;
|
|
1619
1620
|
const hyphaIdx = argv.indexOf("--use-hypha-proxy");
|
|
@@ -1667,7 +1668,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1667
1668
|
}
|
|
1668
1669
|
}
|
|
1669
1670
|
if (collected.length === 0) return;
|
|
1670
|
-
const { updateEnvFile } = await import('./run-
|
|
1671
|
+
const { updateEnvFile } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.X; });
|
|
1671
1672
|
const seen = /* @__PURE__ */ new Set();
|
|
1672
1673
|
const deduped = collected.filter((e) => {
|
|
1673
1674
|
const k = e.toLowerCase();
|
|
@@ -1700,7 +1701,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1700
1701
|
}
|
|
1701
1702
|
});
|
|
1702
1703
|
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(" ");
|
|
1703
|
-
const { wiseAskCli } = await import('./commands-
|
|
1704
|
+
const { wiseAskCli } = await import('./commands-DpRXzSr9.mjs');
|
|
1704
1705
|
await wiseAskCli(machineId, message, sessionId, { json });
|
|
1705
1706
|
return;
|
|
1706
1707
|
}
|
|
@@ -1712,7 +1713,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1712
1713
|
}
|
|
1713
1714
|
return void 0;
|
|
1714
1715
|
};
|
|
1715
|
-
const { runWiseVoiceCli } = await import('./headlessCli-
|
|
1716
|
+
const { runWiseVoiceCli } = await import('./headlessCli-CZEbwp47.mjs');
|
|
1716
1717
|
await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
|
|
1717
1718
|
return;
|
|
1718
1719
|
}
|
|
@@ -1754,7 +1755,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1754
1755
|
return;
|
|
1755
1756
|
}
|
|
1756
1757
|
const authArgs = rest.slice(1);
|
|
1757
|
-
const mod = await import('./auth-
|
|
1758
|
+
const mod = await import('./auth-BwHB9Upd.mjs');
|
|
1758
1759
|
let action;
|
|
1759
1760
|
try {
|
|
1760
1761
|
action = mod.parseWiseAgentAuthArgs(authArgs);
|
|
@@ -1764,7 +1765,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1764
1765
|
return;
|
|
1765
1766
|
}
|
|
1766
1767
|
if (action) {
|
|
1767
|
-
const { updateEnvFile } = await import('./run-
|
|
1768
|
+
const { updateEnvFile } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.X; });
|
|
1768
1769
|
const updates = mod.buildWiseAgentEnvUpdates(action);
|
|
1769
1770
|
updateEnvFile(updates);
|
|
1770
1771
|
for (const [k, v] of Object.entries(updates)) {
|
|
@@ -1778,7 +1779,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1778
1779
|
}
|
|
1779
1780
|
async function handleDaemonAuthCommand(argv) {
|
|
1780
1781
|
const sub = (argv[0] || "status").toLowerCase();
|
|
1781
|
-
const mod = await import('./run-
|
|
1782
|
+
const mod = await import('./run-B_FyvS11.mjs').then(function (n) { return n.X; });
|
|
1782
1783
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
1783
1784
|
console.log(`
|
|
1784
1785
|
svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
|
|
@@ -2081,7 +2082,7 @@ Examples:
|
|
|
2081
2082
|
async function printSkillsHelp() {
|
|
2082
2083
|
let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
|
|
2083
2084
|
try {
|
|
2084
|
-
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-
|
|
2085
|
+
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-B_FyvS11.mjs').then(function (n) { return n.Z; });
|
|
2085
2086
|
browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
|
|
2086
2087
|
} catch {
|
|
2087
2088
|
}
|
|
@@ -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-DpRXzSr9.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-B_FyvS11.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -13,6 +13,7 @@ import 'child_process';
|
|
|
13
13
|
import 'crypto';
|
|
14
14
|
import 'util';
|
|
15
15
|
import 'node:crypto';
|
|
16
|
+
import 'node:events';
|
|
16
17
|
import '@agentclientprotocol/sdk';
|
|
17
18
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
18
19
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { execFileSync } from 'node:child_process';
|
|
2
2
|
import { createServer } from 'node:http';
|
|
3
|
-
import { R as RoutineStore, m as RoutineRunner } from './run-
|
|
3
|
+
import { R as RoutineStore, m as RoutineRunner } from './run-B_FyvS11.mjs';
|
|
4
4
|
import 'os';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'fs';
|
|
@@ -13,6 +13,7 @@ import 'util';
|
|
|
13
13
|
import 'node:crypto';
|
|
14
14
|
import 'node:path';
|
|
15
15
|
import 'node:os';
|
|
16
|
+
import 'node:events';
|
|
16
17
|
import '@agentclientprotocol/sdk';
|
|
17
18
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
18
19
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
2
2
|
import { execSync } from 'node:child_process';
|
|
3
3
|
import { basename, resolve, join } from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import { F as normalizeAllowedUser, G as loadSecurityContextConfig, H as resolveSecurityContext, I as buildSecurityContextFromFlags, J as mergeSecurityContexts, c as connectToHypha, K as buildSessionShareUrl, L as computeOutboundHop, M as buildMachineShareUrl } from './run-
|
|
5
|
+
import { F as normalizeAllowedUser, G as loadSecurityContextConfig, H as resolveSecurityContext, I as buildSecurityContextFromFlags, J as mergeSecurityContexts, c as connectToHypha, K as buildSessionShareUrl, L as computeOutboundHop, M as buildMachineShareUrl } from './run-B_FyvS11.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -12,6 +12,7 @@ import 'child_process';
|
|
|
12
12
|
import 'crypto';
|
|
13
13
|
import 'util';
|
|
14
14
|
import 'node:crypto';
|
|
15
|
+
import 'node:events';
|
|
15
16
|
import '@agentclientprotocol/sdk';
|
|
16
17
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
17
18
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -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-cJUGFtWY.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-DpRXzSr9.mjs');
|
|
72
72
|
const { server, machine } = await connectAndGetMachine();
|
|
73
73
|
try {
|
|
74
74
|
const status = await machine.tunnelStart({
|
|
@@ -123,7 +123,7 @@ async function serviceServe(args) {
|
|
|
123
123
|
};
|
|
124
124
|
process.on("SIGINT", cleanup);
|
|
125
125
|
process.on("SIGTERM", cleanup);
|
|
126
|
-
const { runFrpcTunnel } = await import('./frpc-
|
|
126
|
+
const { runFrpcTunnel } = await import('./frpc-cJUGFtWY.mjs');
|
|
127
127
|
await runFrpcTunnel(name, [caddyPort]);
|
|
128
128
|
} catch (err) {
|
|
129
129
|
console.error(`Error serving directory: ${err.message}`);
|
|
@@ -132,7 +132,7 @@ async function serviceServe(args) {
|
|
|
132
132
|
}
|
|
133
133
|
async function serviceList(_args) {
|
|
134
134
|
try {
|
|
135
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
135
|
+
const { connectAndGetMachine } = await import('./commands-DpRXzSr9.mjs');
|
|
136
136
|
const { server, machine } = await connectAndGetMachine();
|
|
137
137
|
try {
|
|
138
138
|
const tunnels = await machine.tunnelList({});
|
|
@@ -161,7 +161,7 @@ async function serviceDelete(args) {
|
|
|
161
161
|
process.exit(1);
|
|
162
162
|
}
|
|
163
163
|
try {
|
|
164
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
164
|
+
const { connectAndGetMachine } = await import('./commands-DpRXzSr9.mjs');
|
|
165
165
|
const { server, machine } = await connectAndGetMachine();
|
|
166
166
|
try {
|
|
167
167
|
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 { p as parseFrontmatter, n as getSkillsServer, o as getSkillsWorkspaceName, q as getSkillsCollectionName, t as fetchWithTimeout, u as searchSkills, v as SKILLS_DIR, w as getSkillInfo, x as downloadSkillFile, y as listSkillFiles } from './run-
|
|
4
|
+
import { p as parseFrontmatter, n as getSkillsServer, o as getSkillsWorkspaceName, q as getSkillsCollectionName, t as fetchWithTimeout, u as searchSkills, v as SKILLS_DIR, w as getSkillInfo, x as downloadSkillFile, y as listSkillFiles } from './run-B_FyvS11.mjs';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'url';
|
|
7
7
|
import 'child_process';
|
|
@@ -12,6 +12,7 @@ import 'util';
|
|
|
12
12
|
import 'node:crypto';
|
|
13
13
|
import 'node:path';
|
|
14
14
|
import 'node:os';
|
|
15
|
+
import 'node:events';
|
|
15
16
|
import '@agentclientprotocol/sdk';
|
|
16
17
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
17
18
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -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-B_FyvS11.mjs';
|
|
5
5
|
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-HydRNEt7.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
@@ -13,6 +13,7 @@ import 'crypto';
|
|
|
13
13
|
import 'node:child_process';
|
|
14
14
|
import 'util';
|
|
15
15
|
import 'node:crypto';
|
|
16
|
+
import 'node:events';
|
|
16
17
|
import '@agentclientprotocol/sdk';
|
|
17
18
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
18
19
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -3,7 +3,7 @@ import { mkdirSync, writeFileSync, unlinkSync, existsSync, chmodSync, readFileSy
|
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import { homedir, platform, arch } from 'os';
|
|
5
5
|
import { createHash, randomUUID } from 'crypto';
|
|
6
|
-
import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-
|
|
6
|
+
import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-B_FyvS11.mjs';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'url';
|
|
9
9
|
import 'node:fs';
|
|
@@ -12,6 +12,7 @@ import 'util';
|
|
|
12
12
|
import 'node:crypto';
|
|
13
13
|
import 'node:path';
|
|
14
14
|
import 'node:os';
|
|
15
|
+
import 'node:events';
|
|
15
16
|
import '@agentclientprotocol/sdk';
|
|
16
17
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
17
18
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as resolveModel, N as describeMisconfiguration, O as buildMachineDeps } from './run-
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { E as resolveModel, N as describeMisconfiguration, O as buildMachineDeps } from './run-B_FyvS11.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-DYhbiCEA.mjs';
|
|
3
3
|
import { WebSocket } from 'ws';
|
|
4
4
|
import { execSync, spawn } from 'child_process';
|
|
5
5
|
import 'os';
|
|
@@ -14,6 +14,7 @@ import 'util';
|
|
|
14
14
|
import 'node:crypto';
|
|
15
15
|
import 'node:path';
|
|
16
16
|
import 'node:os';
|
|
17
|
+
import 'node:events';
|
|
17
18
|
import '@agentclientprotocol/sdk';
|
|
18
19
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
19
20
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -52,6 +52,62 @@ function createChannelHttpServer(deps) {
|
|
|
52
52
|
res.writeHead(200, { "content-type": "text/markdown" }).end(d.skill?.body || "");
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
+
const keyOf = () => (req.headers.authorization || "").replace(/^Bearer\s+/i, "") || u.searchParams.get("key") || void 0;
|
|
56
|
+
m = u.pathname.match(/^\/channel\/([\w.-]+)\/receive$/);
|
|
57
|
+
if (m) {
|
|
58
|
+
const rpc2 = await findOwner(deps, m[1]);
|
|
59
|
+
if (!rpc2?.channelReceive) {
|
|
60
|
+
json(404, { error: "channel not found" });
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const out = await rpc2.channelReceive({
|
|
64
|
+
channel: m[1],
|
|
65
|
+
key: keyOf(),
|
|
66
|
+
from: u.searchParams.get("from") || void 0,
|
|
67
|
+
cursor: Number(u.searchParams.get("cursor") || 0),
|
|
68
|
+
correlationId: u.searchParams.get("correlationId") || void 0,
|
|
69
|
+
wait: u.searchParams.get("wait") != null ? Number(u.searchParams.get("wait")) : void 0
|
|
70
|
+
});
|
|
71
|
+
json(out?.error ? out.error === "channel not found" ? 404 : 401 : 200, out);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
m = u.pathname.match(/^\/channel\/([\w.-]+)\/events$/);
|
|
75
|
+
if (m) {
|
|
76
|
+
const rpc2 = await findOwner(deps, m[1]);
|
|
77
|
+
if (!rpc2?.channelReceive) {
|
|
78
|
+
res.writeHead(404).end("not found");
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const key = keyOf();
|
|
82
|
+
const from = u.searchParams.get("from") || void 0;
|
|
83
|
+
let cursor = Number(u.searchParams.get("cursor") || 0);
|
|
84
|
+
res.writeHead(200, { "content-type": "text/event-stream", "cache-control": "no-cache", connection: "keep-alive", "x-accel-buffering": "no" });
|
|
85
|
+
res.write(": connected\n\n");
|
|
86
|
+
let closed = false;
|
|
87
|
+
req.on("close", () => {
|
|
88
|
+
closed = true;
|
|
89
|
+
});
|
|
90
|
+
while (!closed) {
|
|
91
|
+
const out = await rpc2.channelReceive({ channel: m[1], key, from, cursor, wait: 25 });
|
|
92
|
+
if (out?.error) {
|
|
93
|
+
res.write(`event: error
|
|
94
|
+
data: ${JSON.stringify({ error: out.error })}
|
|
95
|
+
|
|
96
|
+
`);
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
for (const reply of out.replies || []) res.write(`data: ${JSON.stringify(reply)}
|
|
100
|
+
|
|
101
|
+
`);
|
|
102
|
+
cursor = out.cursor ?? cursor;
|
|
103
|
+
if (!(out.replies || []).length) res.write(": keepalive\n\n");
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
res.end();
|
|
107
|
+
} catch {
|
|
108
|
+
}
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
55
111
|
m = u.pathname.match(/^\/channel\/([\w.-]+)$/);
|
|
56
112
|
if (!m) {
|
|
57
113
|
json(404, { error: "not found" });
|
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-B_FyvS11.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -12,6 +12,7 @@ import 'util';
|
|
|
12
12
|
import 'node:crypto';
|
|
13
13
|
import 'node:path';
|
|
14
14
|
import 'node:os';
|
|
15
|
+
import 'node:events';
|
|
15
16
|
import '@agentclientprotocol/sdk';
|
|
16
17
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
17
18
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "svamp-cli";
|
|
2
|
-
var version = "0.2.
|
|
2
|
+
var version = "0.2.102";
|
|
3
3
|
var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
|
|
4
4
|
var author = "Amun AI AB";
|
|
5
5
|
var license = "SEE LICENSE IN LICENSE";
|
|
@@ -19,7 +19,7 @@ var exports$1 = {
|
|
|
19
19
|
var scripts = {
|
|
20
20
|
build: "rm -rf dist bin/skills && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && cp -r ../../skills/loop bin/skills/loop && tsc --noEmit && pkgroll",
|
|
21
21
|
typecheck: "tsc --noEmit",
|
|
22
|
-
test: "npx tsx test/test-context-window.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-loop-activation.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-inbox-guard.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && node test/test-supervisor-restart.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-routine.mjs && npx tsx test/test-routine-rpc.mjs && npx tsx test/test-session-file.mjs && npx tsx test/test-channel-rpc.mjs && npx tsx test/test-wise-agent.mjs && npx tsx test/test-channel-agent.mjs && npx tsx test/test-channels-service.mjs && npx tsx test/test-wise-agent-auth.mjs && npx tsx test/test-channel-http.mjs && npx tsx test/test-wise-voice.mjs && npx tsx test/test-wise-headless.mjs && npx tsx test/test-wise-machine.mjs",
|
|
22
|
+
test: "npx tsx test/test-context-window.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-loop-activation.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-inbox-guard.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && node test/test-supervisor-restart.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-routine.mjs && npx tsx test/test-routine-rpc.mjs && npx tsx test/test-session-file.mjs && npx tsx test/test-channel-rpc.mjs && npx tsx test/test-wise-agent.mjs && npx tsx test/test-channel-agent.mjs && npx tsx test/test-channels-service.mjs && npx tsx test/test-channel-async-reply.mjs && npx tsx test/test-wise-agent-auth.mjs && npx tsx test/test-channel-http.mjs && npx tsx test/test-wise-voice.mjs && npx tsx test/test-wise-headless.mjs && npx tsx test/test-wise-machine.mjs",
|
|
23
23
|
"test:hypha": "node --no-warnings test/test-hypha-service.mjs",
|
|
24
24
|
dev: "tsx src/cli.ts",
|
|
25
25
|
"dev:daemon": "tsx src/cli.ts daemon start-sync",
|
|
@@ -11,6 +11,7 @@ import { promisify } from 'util';
|
|
|
11
11
|
import { randomBytes, randomUUID, createHash } from 'node:crypto';
|
|
12
12
|
import { join as join$1 } from 'node:path';
|
|
13
13
|
import os, { homedir, platform } from 'node:os';
|
|
14
|
+
import { EventEmitter } from 'node:events';
|
|
14
15
|
import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
|
|
15
16
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
16
17
|
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -2165,7 +2166,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
2165
2166
|
const tunnels = handlers.tunnels;
|
|
2166
2167
|
if (!tunnels) throw new Error("Tunnel management not available");
|
|
2167
2168
|
if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
|
|
2168
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
2169
|
+
const { FrpcTunnel } = await import('./frpc-cJUGFtWY.mjs');
|
|
2169
2170
|
const tunnel = new FrpcTunnel({
|
|
2170
2171
|
name: params.name,
|
|
2171
2172
|
ports: params.ports,
|
|
@@ -2426,7 +2427,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
2426
2427
|
}
|
|
2427
2428
|
const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
|
|
2428
2429
|
const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
|
|
2429
|
-
const { toolsForRole } = await import('./sideband-
|
|
2430
|
+
const { toolsForRole } = await import('./sideband-DYhbiCEA.mjs');
|
|
2430
2431
|
const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
|
|
2431
2432
|
return fmt(r2);
|
|
2432
2433
|
}
|
|
@@ -2502,7 +2503,15 @@ ${d?.error || "not found"}`;
|
|
|
2502
2503
|
trackInbound();
|
|
2503
2504
|
const rpc = await findChannelOwner(kwargs.channel);
|
|
2504
2505
|
if (!rpc?.channelSend) return { error: "channel not found" };
|
|
2505
|
-
return rpc.channelSend({ channel: kwargs.channel, message: kwargs.message, from: kwargs.from, key: kwargs.key }, context);
|
|
2506
|
+
return rpc.channelSend({ channel: kwargs.channel, message: kwargs.message, from: kwargs.from, key: kwargs.key, reply_to: kwargs.reply_to }, context);
|
|
2507
|
+
},
|
|
2508
|
+
// Async reply retrieval for queue-mode channels — long-poll the channel outbox
|
|
2509
|
+
// for replies addressed to the caller. Channel-identity auth (key/from).
|
|
2510
|
+
receive: async (kwargs = {}, context) => {
|
|
2511
|
+
trackInbound();
|
|
2512
|
+
const rpc = await findChannelOwner(kwargs.channel);
|
|
2513
|
+
if (!rpc?.channelReceive) return { error: "channel not found" };
|
|
2514
|
+
return rpc.channelReceive({ channel: kwargs.channel, key: kwargs.key, from: kwargs.from, cursor: kwargs.cursor, correlationId: kwargs.correlationId, wait: kwargs.wait }, context);
|
|
2506
2515
|
}
|
|
2507
2516
|
},
|
|
2508
2517
|
{ overwrite: true }
|
|
@@ -2960,10 +2969,27 @@ function generateSkillBody(channel, ctx) {
|
|
|
2960
2969
|
const sendUrl = `${gw}/send`;
|
|
2961
2970
|
const key = ctx?.key || "<your-key>";
|
|
2962
2971
|
const isAgent = channel.action?.kind === "agent";
|
|
2972
|
+
const isQueue = channel.reply?.mode === "queue";
|
|
2973
|
+
const recvUrl = `${gw}/receive`;
|
|
2963
2974
|
const hyphaOpen = (channel.identity?.hypha_allow || []).length > 0;
|
|
2964
2975
|
const name = channel.skill?.name || channel.name;
|
|
2965
2976
|
const desc = channel.skill?.description || channel.description || `Send a message to the "${channel.name}" channel.`;
|
|
2966
|
-
const replyNote = isAgent ? `This is a **WISE Agent** channel: \`send()\` runs a fast assistant against the session's tools/skills and returns its answer synchronously in the result \`reply\`.` : `Delivery is fire-and-forget \u2014 the message lands in the agent's inbox, tagged with your verified identity (\`from\`).`;
|
|
2977
|
+
const replyNote = isAgent ? `This is a **WISE Agent** channel: \`send()\` runs a fast assistant against the session's tools/skills and returns its answer synchronously in the result \`reply\`.` : isQueue ? `This is an **async** channel: \`send()\` returns a \`correlationId\` and the agent replies later \u2014 poll \`receive()\` (or GET /receive \xB7 /events) for replies addressed to you.` : `Delivery is fire-and-forget \u2014 the message lands in the agent's inbox, tagged with your verified identity (\`from\`).`;
|
|
2978
|
+
const queueSection = isQueue ? `
|
|
2979
|
+
|
|
2980
|
+
## Getting the reply (async)
|
|
2981
|
+
\`send()\` returns \`{ correlationId }\`. The agent answers later; retrieve replies addressed
|
|
2982
|
+
to you by **long-polling** \`receive\` with a cursor you advance each call:
|
|
2983
|
+
\`\`\`js
|
|
2984
|
+
const { correlationId } = await get_service("${svc}").send({ channel: "${channel.id}", message: "\u2026", from: "your-name" });
|
|
2985
|
+
let cursor = 0;
|
|
2986
|
+
while (true) {
|
|
2987
|
+
const r = await get_service("${svc}").receive({ channel: "${channel.id}", key: "${key}", cursor, wait: 25 });
|
|
2988
|
+
cursor = r.cursor;
|
|
2989
|
+
for (const reply of r.replies) if (reply.correlationId === correlationId) return reply.body;
|
|
2990
|
+
}
|
|
2991
|
+
\`\`\`
|
|
2992
|
+
**HTTP:** \`POST ${recvUrl}\` with \`{"kwargs": {"channel": "${channel.id}", "key": "${key}", "cursor": 0, "wait": 25}}\` (long-poll), or stream \`GET <channel-http>/channel/${channel.id}/events?key=${key}\` (SSE).` : "";
|
|
2967
2993
|
const rpcLine = hyphaOpen ? `**Hypha RPC** \u2014 preferred. Your verified Hypha identity is accepted, no key needed:` : `**Hypha RPC** \u2014 verified identity:`;
|
|
2968
2994
|
return `---
|
|
2969
2995
|
name: ${name}
|
|
@@ -2991,7 +3017,139 @@ POST ${sendUrl}
|
|
|
2991
3017
|
Content-Type: application/json
|
|
2992
3018
|
|
|
2993
3019
|
{"kwargs": {"channel": "${channel.id}", "message": "your message here", "from": "your-name", "key": "${key}"}}
|
|
2994
|
-
|
|
3020
|
+
\`\`\`${queueSection}`;
|
|
3021
|
+
}
|
|
3022
|
+
|
|
3023
|
+
const MAX_PER_CHANNEL = 200;
|
|
3024
|
+
const TTL_MS = 60 * 60 * 1e3;
|
|
3025
|
+
class ChannelOutbox {
|
|
3026
|
+
file;
|
|
3027
|
+
byChannel = /* @__PURE__ */ new Map();
|
|
3028
|
+
seqByChannel = /* @__PURE__ */ new Map();
|
|
3029
|
+
emitter = new EventEmitter();
|
|
3030
|
+
constructor(projectDir) {
|
|
3031
|
+
const dir = join$1(projectDir, ".svamp", "channels");
|
|
3032
|
+
this.file = join$1(dir, "_outbox.jsonl");
|
|
3033
|
+
this.emitter.setMaxListeners(0);
|
|
3034
|
+
try {
|
|
3035
|
+
mkdirSync$1(dir, { recursive: true });
|
|
3036
|
+
} catch {
|
|
3037
|
+
}
|
|
3038
|
+
this._load();
|
|
3039
|
+
}
|
|
3040
|
+
_load() {
|
|
3041
|
+
if (!existsSync(this.file)) return;
|
|
3042
|
+
const cutoff = Date.now() - TTL_MS;
|
|
3043
|
+
try {
|
|
3044
|
+
for (const line of readFileSync(this.file, "utf8").split("\n")) {
|
|
3045
|
+
if (!line.trim()) continue;
|
|
3046
|
+
let rec = null;
|
|
3047
|
+
try {
|
|
3048
|
+
rec = JSON.parse(line);
|
|
3049
|
+
} catch {
|
|
3050
|
+
continue;
|
|
3051
|
+
}
|
|
3052
|
+
if (!rec || rec.ts < cutoff) continue;
|
|
3053
|
+
const { channelId, ...reply } = rec;
|
|
3054
|
+
const arr = this.byChannel.get(channelId) || [];
|
|
3055
|
+
arr.push(reply);
|
|
3056
|
+
this.byChannel.set(channelId, arr);
|
|
3057
|
+
this.seqByChannel.set(channelId, Math.max(this.seqByChannel.get(channelId) || 0, reply.seq));
|
|
3058
|
+
}
|
|
3059
|
+
for (const [ch, arr] of this.byChannel) if (arr.length > MAX_PER_CHANNEL) this.byChannel.set(ch, arr.slice(-MAX_PER_CHANNEL));
|
|
3060
|
+
} catch {
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
_evict(channelId) {
|
|
3064
|
+
const cutoff = Date.now() - TTL_MS;
|
|
3065
|
+
let arr = this.byChannel.get(channelId);
|
|
3066
|
+
if (!arr) return;
|
|
3067
|
+
if (arr.some((r) => r.ts < cutoff)) arr = arr.filter((r) => r.ts >= cutoff);
|
|
3068
|
+
if (arr.length > MAX_PER_CHANNEL) arr = arr.slice(-MAX_PER_CHANNEL);
|
|
3069
|
+
this.byChannel.set(channelId, arr);
|
|
3070
|
+
}
|
|
3071
|
+
/** Append a reply addressed to `to`. Assigns seq + ts, persists, and wakes waiters. */
|
|
3072
|
+
append(channelId, r) {
|
|
3073
|
+
const seq = (this.seqByChannel.get(channelId) || 0) + 1;
|
|
3074
|
+
this.seqByChannel.set(channelId, seq);
|
|
3075
|
+
const reply = { seq, ts: Date.now(), to: r.to, body: r.body, ...r.correlationId ? { correlationId: r.correlationId } : {} };
|
|
3076
|
+
const arr = this.byChannel.get(channelId) || [];
|
|
3077
|
+
arr.push(reply);
|
|
3078
|
+
this.byChannel.set(channelId, arr);
|
|
3079
|
+
this._evict(channelId);
|
|
3080
|
+
try {
|
|
3081
|
+
appendFileSync(this.file, JSON.stringify({ channelId, ...reply }) + "\n");
|
|
3082
|
+
} catch {
|
|
3083
|
+
try {
|
|
3084
|
+
mkdirSync$1(join$1(this.file, ".."), { recursive: true });
|
|
3085
|
+
appendFileSync(this.file, JSON.stringify({ channelId, ...reply }) + "\n");
|
|
3086
|
+
} catch {
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
this.emitter.emit(channelId, reply);
|
|
3090
|
+
return reply;
|
|
3091
|
+
}
|
|
3092
|
+
/** Replies for `to` on `channelId` with seq > cursor (optionally one correlationId). */
|
|
3093
|
+
since(channelId, cursor, to, correlationId) {
|
|
3094
|
+
this._evict(channelId);
|
|
3095
|
+
return (this.byChannel.get(channelId) || []).filter((r) => r.seq > cursor && r.to === to && (!correlationId || r.correlationId === correlationId));
|
|
3096
|
+
}
|
|
3097
|
+
/** Highest seq on a channel (the cursor a caller gets back). */
|
|
3098
|
+
cursor(channelId) {
|
|
3099
|
+
return this.seqByChannel.get(channelId) || 0;
|
|
3100
|
+
}
|
|
3101
|
+
/**
|
|
3102
|
+
* Long-poll: resolve immediately if there are replies after `cursor`, else wait for
|
|
3103
|
+
* the next append (filtered to this channel + `to`) or `timeoutMs`, then return.
|
|
3104
|
+
*/
|
|
3105
|
+
wait(channelId, cursor, to, timeoutMs, correlationId) {
|
|
3106
|
+
const ready = this.since(channelId, cursor, to, correlationId);
|
|
3107
|
+
if (ready.length) return Promise.resolve({ replies: ready, cursor: this.cursor(channelId) });
|
|
3108
|
+
return new Promise((resolve) => {
|
|
3109
|
+
const onReply = (r) => {
|
|
3110
|
+
if (r.to !== to || correlationId && r.correlationId !== correlationId) return;
|
|
3111
|
+
cleanup();
|
|
3112
|
+
resolve({ replies: this.since(channelId, cursor, to, correlationId), cursor: this.cursor(channelId) });
|
|
3113
|
+
};
|
|
3114
|
+
const timer = setTimeout(() => {
|
|
3115
|
+
cleanup();
|
|
3116
|
+
resolve({ replies: [], cursor: this.cursor(channelId) });
|
|
3117
|
+
}, Math.max(0, timeoutMs));
|
|
3118
|
+
const cleanup = () => {
|
|
3119
|
+
clearTimeout(timer);
|
|
3120
|
+
this.emitter.off(channelId, onReply);
|
|
3121
|
+
};
|
|
3122
|
+
this.emitter.on(channelId, onReply);
|
|
3123
|
+
});
|
|
3124
|
+
}
|
|
3125
|
+
/** Push subscription for SSE: calls onReply for each new reply addressed to `to`. */
|
|
3126
|
+
subscribe(channelId, to, onReply) {
|
|
3127
|
+
const handler = (r) => {
|
|
3128
|
+
if (r.to === to) onReply(r);
|
|
3129
|
+
};
|
|
3130
|
+
this.emitter.on(channelId, handler);
|
|
3131
|
+
return () => this.emitter.off(channelId, handler);
|
|
3132
|
+
}
|
|
3133
|
+
/** Drop a channel's outbox (on channel delete) — best-effort rewrite of the log. */
|
|
3134
|
+
purge(channelId) {
|
|
3135
|
+
this.byChannel.delete(channelId);
|
|
3136
|
+
this.seqByChannel.delete(channelId);
|
|
3137
|
+
if (!existsSync(this.file)) return;
|
|
3138
|
+
try {
|
|
3139
|
+
const kept = readFileSync(this.file, "utf8").split("\n").filter((l) => {
|
|
3140
|
+
if (!l.trim()) return false;
|
|
3141
|
+
try {
|
|
3142
|
+
return JSON.parse(l).channelId !== channelId;
|
|
3143
|
+
} catch {
|
|
3144
|
+
return false;
|
|
3145
|
+
}
|
|
3146
|
+
});
|
|
3147
|
+
const tmp = this.file + ".tmp";
|
|
3148
|
+
writeFileSync$1(tmp, kept.join("\n") + (kept.length ? "\n" : ""));
|
|
3149
|
+
renameSync$1(tmp, this.file);
|
|
3150
|
+
} catch {
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
2995
3153
|
}
|
|
2996
3154
|
|
|
2997
3155
|
function resolveSender(channel, input = {}) {
|
|
@@ -3269,6 +3427,7 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
|
|
|
3269
3427
|
callbacks.onMetadataUpdate?.(metadata);
|
|
3270
3428
|
};
|
|
3271
3429
|
const channelStore = new ChannelStore(initialMetadata.path);
|
|
3430
|
+
const channelOutbox = new ChannelOutbox(initialMetadata.path);
|
|
3272
3431
|
const cfg = server?.config || {};
|
|
3273
3432
|
const channelsServiceId = cfg.workspace && cfg.client_id ? `${cfg.workspace}/${cfg.client_id}:channels` : void 0;
|
|
3274
3433
|
const channelsBaseUrl = cfg.public_base_url || process.env.HYPHA_SERVER_URL || "https://hypha.aicell.io";
|
|
@@ -3476,6 +3635,7 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
|
|
|
3476
3635
|
removeChannel: async (id, context) => {
|
|
3477
3636
|
authorizeRequest(context, metadata.sharing, "admin");
|
|
3478
3637
|
const ok = channelStore.remove(id);
|
|
3638
|
+
channelOutbox.purge(id);
|
|
3479
3639
|
syncChannelsToMetadata();
|
|
3480
3640
|
return { success: ok };
|
|
3481
3641
|
},
|
|
@@ -3546,6 +3706,8 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
|
|
|
3546
3706
|
return { ok: result.status === "completed", call_id: callId, status: result.status, reply: result.reply, tool_calls: result.toolCalls, error: result.error };
|
|
3547
3707
|
}
|
|
3548
3708
|
if (c.action?.kind === "loop") return { error: "loop channels are served by the channel server, not channelSend" };
|
|
3709
|
+
const queue = c.reply?.mode === "queue";
|
|
3710
|
+
const replySession = queue ? params.reply_to?.session : void 0;
|
|
3549
3711
|
const inboxMsg = {
|
|
3550
3712
|
messageId: callId,
|
|
3551
3713
|
body: xmlEscape(String(params.message ?? "").slice(0, 16 * 1024)),
|
|
@@ -3554,17 +3716,56 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
|
|
|
3554
3716
|
from: r.sender.name,
|
|
3555
3717
|
verified: r.sender.verified,
|
|
3556
3718
|
channel: c.name,
|
|
3557
|
-
subject: c.name
|
|
3719
|
+
subject: c.name,
|
|
3720
|
+
...replySession ? { fromSession: replySession, threadId: callId } : {},
|
|
3721
|
+
...queue && !replySession ? { channelId: c.id, correlationId: callId } : {}
|
|
3558
3722
|
};
|
|
3559
3723
|
await rpcHandlers.sendInboxMessage(inboxMsg, ownerCtx);
|
|
3560
3724
|
channelStore.recordCall(c.id, { sender: r.sender.name, verified: r.sender.verified, callId, outcome: "delivered" });
|
|
3561
3725
|
syncChannelsToMetadata();
|
|
3562
|
-
return { ok: true, call_id: callId, status: "accepted" };
|
|
3726
|
+
return { ok: true, call_id: callId, status: queue ? "queued" : "accepted", ...queue ? { correlationId: callId } : {} };
|
|
3563
3727
|
} catch (e) {
|
|
3564
3728
|
channelStore.recordCall(c.id, { sender: r.sender.name, verified: r.sender.verified, callId, outcome: "error" });
|
|
3565
3729
|
return { ok: false, call_id: callId, status: "error", error: e?.message || String(e) };
|
|
3566
3730
|
}
|
|
3567
3731
|
},
|
|
3732
|
+
// Agent/owner answers a queued (async) channel message → channel outbox, addressed
|
|
3733
|
+
// to the original external caller. Routed here by `inbox reply` for channel-origin
|
|
3734
|
+
// inbox messages (which carry channelId + correlationId + from). Owner-gated since
|
|
3735
|
+
// it's the session speaking on its own behalf.
|
|
3736
|
+
channelReply: async (params, context) => {
|
|
3737
|
+
authorizeRequest(context, metadata.sharing, "interact");
|
|
3738
|
+
const c = channelStore.get(params.channel);
|
|
3739
|
+
if (!c) return { ok: false, error: "channel not found" };
|
|
3740
|
+
if (!params.to || !params.body) return { ok: false, error: "to and body are required" };
|
|
3741
|
+
const reply = channelOutbox.append(c.id, {
|
|
3742
|
+
correlationId: params.correlationId,
|
|
3743
|
+
to: String(params.to),
|
|
3744
|
+
body: String(params.body).slice(0, 16 * 1024)
|
|
3745
|
+
});
|
|
3746
|
+
channelStore.recordCall(c.id, { sender: String(params.to), verified: true, callId: params.correlationId || `seq_${reply.seq}`, outcome: "replied" });
|
|
3747
|
+
return { ok: true, seq: reply.seq };
|
|
3748
|
+
},
|
|
3749
|
+
// External caller retrieves async replies addressed to it. Channel-identity auth
|
|
3750
|
+
// (key/from) — NOT session sharing. Long-polls up to `wait` seconds for new replies
|
|
3751
|
+
// after `cursor`; the caller advances `cursor` each call (ack-by-cursor).
|
|
3752
|
+
channelReceive: async (params, context) => {
|
|
3753
|
+
const c = channelStore.get(params.channel);
|
|
3754
|
+
if (!c || c.enabled === false) return { error: "channel not found" };
|
|
3755
|
+
const u = context?.user;
|
|
3756
|
+
const r = resolveSender(c, {
|
|
3757
|
+
key: params.key,
|
|
3758
|
+
from: params.from,
|
|
3759
|
+
hyphaUser: u && u.is_anonymous !== true ? u.email || u.id : void 0,
|
|
3760
|
+
hyphaAnonymous: u?.is_anonymous === true,
|
|
3761
|
+
hyphaWorkspace: u?.scope?.current_workspace
|
|
3762
|
+
});
|
|
3763
|
+
if (r.error || !r.sender) return { error: r.error || "unauthorized" };
|
|
3764
|
+
const cursor = Math.max(0, Number(params.cursor) || 0);
|
|
3765
|
+
const waitMs = Math.min(Math.max(0, Number(params.wait ?? 25) * 1e3), 6e4);
|
|
3766
|
+
const out = await channelOutbox.wait(c.id, cursor, r.sender.name, waitMs, params.correlationId);
|
|
3767
|
+
return { ok: true, replies: out.replies, cursor: out.cursor };
|
|
3768
|
+
},
|
|
3568
3769
|
// ── Agent State ──
|
|
3569
3770
|
getAgentState: async (context) => {
|
|
3570
3771
|
authorizeRequest(context, metadata.sharing, "view");
|
|
@@ -3909,6 +4110,9 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
|
|
|
3909
4110
|
const child = spawn("claude", args, {
|
|
3910
4111
|
cwd,
|
|
3911
4112
|
timeout: 6e4,
|
|
4113
|
+
// Ignore stdin: --print otherwise waits ~3s for piped input ("no stdin
|
|
4114
|
+
// data received in 3s, proceeding without it") — pure latency per /btw.
|
|
4115
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
3912
4116
|
env: { ...process.env, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1" }
|
|
3913
4117
|
});
|
|
3914
4118
|
let stdout = "";
|
|
@@ -9922,7 +10126,7 @@ async function startDaemon(options) {
|
|
|
9922
10126
|
const list = loadExposedTunnels().filter((t) => t.name !== name);
|
|
9923
10127
|
saveExposedTunnels(list);
|
|
9924
10128
|
}
|
|
9925
|
-
const { ServeManager } = await import('./serveManager-
|
|
10129
|
+
const { ServeManager } = await import('./serveManager-B757hHGd.mjs');
|
|
9926
10130
|
const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
|
|
9927
10131
|
ensureAutoInstalledSkills(logger).catch(() => {
|
|
9928
10132
|
});
|
|
@@ -10582,6 +10786,10 @@ async function startDaemon(options) {
|
|
|
10582
10786
|
}
|
|
10583
10787
|
if (msg.session_id) {
|
|
10584
10788
|
claudeResumeId = msg.session_id;
|
|
10789
|
+
if (sessionMetadata.claudeSessionId !== msg.session_id) {
|
|
10790
|
+
sessionMetadata = { ...sessionMetadata, claudeSessionId: msg.session_id };
|
|
10791
|
+
sessionService.updateMetadata(sessionMetadata);
|
|
10792
|
+
}
|
|
10585
10793
|
}
|
|
10586
10794
|
signalProcessing(false);
|
|
10587
10795
|
sessionWasProcessing = false;
|
|
@@ -12212,7 +12420,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
12212
12420
|
const channelHttpPort = Number(process.env.SVAMP_CHANNEL_HTTP_PORT) || 0;
|
|
12213
12421
|
if (channelHttpPort > 0) {
|
|
12214
12422
|
try {
|
|
12215
|
-
const { createChannelHttpServer } = await import('./httpServer-
|
|
12423
|
+
const { createChannelHttpServer } = await import('./httpServer-D9qLS8ed.mjs');
|
|
12216
12424
|
const channelHttpServer = createChannelHttpServer({
|
|
12217
12425
|
getSessionIds: () => {
|
|
12218
12426
|
const ids = [];
|
|
@@ -12233,7 +12441,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
12233
12441
|
const specs = loadExposedTunnels();
|
|
12234
12442
|
if (specs.length === 0) return;
|
|
12235
12443
|
logger.log(`[exposed-tunnels] Restoring ${specs.length} tunnel(s) from ${EXPOSED_TUNNELS_FILE}`);
|
|
12236
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
12444
|
+
const { FrpcTunnel } = await import('./frpc-cJUGFtWY.mjs');
|
|
12237
12445
|
for (const spec of specs) {
|
|
12238
12446
|
if (tunnels.has(spec.name)) continue;
|
|
12239
12447
|
try {
|
|
@@ -2,7 +2,7 @@ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(im
|
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import { resolve, join } from 'node:path';
|
|
4
4
|
import { existsSync, readFileSync, watch } from 'node:fs';
|
|
5
|
-
import { c as connectToHypha, a as createSessionStore, r as registerMachineService, P as generateHookSettings } from './run-
|
|
5
|
+
import { c as connectToHypha, a as createSessionStore, r as registerMachineService, P as generateHookSettings } from './run-B_FyvS11.mjs';
|
|
6
6
|
import { createServer } from 'node:http';
|
|
7
7
|
import { spawn } from 'node:child_process';
|
|
8
8
|
import { createInterface } from 'node:readline';
|
|
@@ -14,6 +14,7 @@ import 'url';
|
|
|
14
14
|
import 'child_process';
|
|
15
15
|
import 'crypto';
|
|
16
16
|
import 'util';
|
|
17
|
+
import 'node:events';
|
|
17
18
|
import '@agentclientprotocol/sdk';
|
|
18
19
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
19
20
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -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-DpRXzSr9.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-DpRXzSr9.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-DpRXzSr9.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-DpRXzSr9.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-DpRXzSr9.mjs');
|
|
239
239
|
const { machine, server } = await connectAndGetMachine(machineId);
|
|
240
240
|
try {
|
|
241
241
|
const info = await machine.serveInfo();
|
|
@@ -4,7 +4,7 @@ import * as fs from 'fs';
|
|
|
4
4
|
import * as http from 'http';
|
|
5
5
|
import * as net from 'net';
|
|
6
6
|
import * as path from 'path';
|
|
7
|
-
import { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run-
|
|
7
|
+
import { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run-B_FyvS11.mjs';
|
|
8
8
|
import 'os';
|
|
9
9
|
import 'fs/promises';
|
|
10
10
|
import 'url';
|
|
@@ -14,6 +14,7 @@ import 'util';
|
|
|
14
14
|
import 'node:crypto';
|
|
15
15
|
import 'node:path';
|
|
16
16
|
import 'node:os';
|
|
17
|
+
import 'node:events';
|
|
17
18
|
import '@agentclientprotocol/sdk';
|
|
18
19
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
19
20
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -712,7 +713,7 @@ class ServeManager {
|
|
|
712
713
|
const mount = this.mounts.get(mountName);
|
|
713
714
|
const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, `static-${subdomainSafe}-${mount.linkToken}`]]) : void 0;
|
|
714
715
|
try {
|
|
715
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
716
|
+
const { FrpcTunnel } = await import('./frpc-cJUGFtWY.mjs');
|
|
716
717
|
let tunnel;
|
|
717
718
|
tunnel = new FrpcTunnel({
|
|
718
719
|
name: tunnelName,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z as READ_ONLY_TOOLS, A as loadMachineContext, B as buildMachineInstructions, C as machineToolsForRole, D as buildMachineTools } from './run-
|
|
1
|
+
import { z as READ_ONLY_TOOLS, A as loadMachineContext, B as buildMachineInstructions, C as machineToolsForRole, D as buildMachineTools } from './run-B_FyvS11.mjs';
|
|
2
2
|
import 'node:child_process';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|
|
@@ -12,6 +12,7 @@ import 'util';
|
|
|
12
12
|
import 'node:crypto';
|
|
13
13
|
import 'node:path';
|
|
14
14
|
import 'node:os';
|
|
15
|
+
import 'node:events';
|
|
15
16
|
import '@agentclientprotocol/sdk';
|
|
16
17
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
17
18
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svamp-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.102",
|
|
4
4
|
"description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
|
|
5
5
|
"author": "Amun AI AB",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "rm -rf dist bin/skills && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && cp -r ../../skills/loop bin/skills/loop && tsc --noEmit && pkgroll",
|
|
22
22
|
"typecheck": "tsc --noEmit",
|
|
23
|
-
"test": "npx tsx test/test-context-window.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-loop-activation.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-inbox-guard.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && node test/test-supervisor-restart.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-routine.mjs && npx tsx test/test-routine-rpc.mjs && npx tsx test/test-session-file.mjs && npx tsx test/test-channel-rpc.mjs && npx tsx test/test-wise-agent.mjs && npx tsx test/test-channel-agent.mjs && npx tsx test/test-channels-service.mjs && npx tsx test/test-wise-agent-auth.mjs && npx tsx test/test-channel-http.mjs && npx tsx test/test-wise-voice.mjs && npx tsx test/test-wise-headless.mjs && npx tsx test/test-wise-machine.mjs",
|
|
23
|
+
"test": "npx tsx test/test-context-window.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-loop-activation.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-inbox-guard.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && node test/test-supervisor-restart.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-routine.mjs && npx tsx test/test-routine-rpc.mjs && npx tsx test/test-session-file.mjs && npx tsx test/test-channel-rpc.mjs && npx tsx test/test-wise-agent.mjs && npx tsx test/test-channel-agent.mjs && npx tsx test/test-channels-service.mjs && npx tsx test/test-channel-async-reply.mjs && npx tsx test/test-wise-agent-auth.mjs && npx tsx test/test-channel-http.mjs && npx tsx test/test-wise-voice.mjs && npx tsx test/test-wise-headless.mjs && npx tsx test/test-wise-machine.mjs",
|
|
24
24
|
"test:hypha": "node --no-warnings test/test-hypha-service.mjs",
|
|
25
25
|
"dev": "tsx src/cli.ts",
|
|
26
26
|
"dev:daemon": "tsx src/cli.ts daemon start-sync",
|