svamp-cli 0.2.120 → 0.2.121
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/bin/skills/loop/SKILL.md +1 -1
- package/bin/skills/loop/bin/checklist.mjs +1 -4
- package/bin/skills/loop/bin/loop-init.mjs +1 -4
- package/bin/skills/loop/bin/stop-gate.mjs +3 -24
- package/dist/{agentCommands-DIfofhT-.mjs → agentCommands-yXsSYfmO.mjs} +4 -4
- package/dist/{auth-zcVYRjJ8.mjs → auth-DN7R9F_k.mjs} +1 -1
- package/dist/cli.mjs +57 -57
- package/dist/{commands-BOCpNFZX.mjs → commands-B6R-tDtR.mjs} +2 -2
- package/dist/{commands-BYsoZ6Fn.mjs → commands-B9sqOiBc.mjs} +2 -2
- package/dist/{commands-CPsUPDnI.mjs → commands-BDJR0VrZ.mjs} +1 -1
- package/dist/{commands-BFpGoTq8.mjs → commands-DZq4EX41.mjs} +1 -1
- package/dist/{commands-CuY9G_88.mjs → commands-DgrVRMPf.mjs} +1 -1
- package/dist/{commands-DOtJfJG7.mjs → commands-QyvD7F1z.mjs} +5 -5
- package/dist/{fleet-CEAB4PS0.mjs → fleet-DxDQfnD5.mjs} +1 -1
- package/dist/{frpc-DlsBjcRf.mjs → frpc-DRWpAeZW.mjs} +1 -1
- package/dist/{headlessCli-DuY4WQVa.mjs → headlessCli-yq6RWSPK.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{package-DS33M8qt.mjs → package-ClAJGLEQ.mjs} +2 -2
- package/dist/{run-C4BsPJ_p.mjs → run-CCjAePDZ.mjs} +159 -11
- package/dist/{run-6Pp8yTPw.mjs → run-D_sV2sA7.mjs} +1 -1
- package/dist/{serveCommands-UDH0noeg.mjs → serveCommands-DetQEHPQ.mjs} +5 -5
- package/dist/{serveManager-QZooKtI4.mjs → serveManager-BSwiPu1O.mjs} +2 -2
- package/dist/{sideband-Wfli3n7U.mjs → sideband-DDiW5TJU.mjs} +1 -1
- package/package.json +2 -2
package/bin/skills/loop/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: loop
|
|
3
|
-
version: 0.
|
|
3
|
+
version: 0.3.2
|
|
4
4
|
description: Run a task as a reliable, self-verifying loop — iterate until objective exit conditions are met, with an independent evaluator instead of self-judging. Use when a task needs repeated iterations until "done" (fix until tests pass, refactor until clean, build until a spec is met, autonomous long-running work).
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -11,10 +11,7 @@ import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'node:fs';
|
|
|
11
11
|
import { join, dirname } from 'node:path';
|
|
12
12
|
import { execSync } from 'node:child_process';
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
// the loop/ dir, not inside it (the checklist is session-scoped, independent of any
|
|
16
|
-
// active loop, and the UI/sync writes it there too: sync/ops.ts sessionChecklistRel).
|
|
17
|
-
export function sessionChecklistPath(loopDir) { return join(dirname(loopDir), 'checklist.json'); }
|
|
14
|
+
export function sessionChecklistPath(loopDir) { return join(loopDir, 'checklist.json'); }
|
|
18
15
|
export function projectChecklistPath(projectDir) { return join(projectDir, '.svamp', 'checklist.json'); }
|
|
19
16
|
|
|
20
17
|
const STATUSES = ['pending', 'passing', 'failing'];
|
|
@@ -58,7 +58,7 @@ rmSync(join(loopDir, 'evaluator-verdict.json'), { force: true });
|
|
|
58
58
|
rmSync(join(loopDir, 'history.jsonl'), { force: true });
|
|
59
59
|
|
|
60
60
|
// 1. Copy hook scripts so the project is self-contained.
|
|
61
|
-
for (const f of ['state-fp.mjs', 'stop-gate.mjs', '
|
|
61
|
+
for (const f of ['state-fp.mjs', 'stop-gate.mjs', 'inject-loop.mjs', 'loop-status.mjs', 'precompact.mjs']) {
|
|
62
62
|
const dest = join(binDir, f);
|
|
63
63
|
copyFileSync(join(HERE, f), dest);
|
|
64
64
|
try { chmodSync(dest, 0o755); } catch {}
|
|
@@ -71,9 +71,6 @@ const config = {
|
|
|
71
71
|
// and resolve their own dir relatively) read this to run the oracle + fingerprint the
|
|
72
72
|
// work product, since their depth no longer encodes the project root.
|
|
73
73
|
project_dir: dir,
|
|
74
|
-
// The success contract — the durable thing the gate judges against. Read by the daemon
|
|
75
|
-
// to populate the supervision:verdict event (docs/supervisor-gate-design.md).
|
|
76
|
-
...(criteria ? { criteria: criteria.trim() } : {}),
|
|
77
74
|
oracle: oracle ? { command: oracle, timeout_sec: 600 } : null,
|
|
78
75
|
evaluator: { enabled: evaluatorOn, model },
|
|
79
76
|
max_iterations: max,
|
|
@@ -16,7 +16,6 @@ import { readFileSync, writeFileSync, renameSync, existsSync, appendFileSync, st
|
|
|
16
16
|
import { dirname, join, resolve, relative } from 'node:path';
|
|
17
17
|
import { fileURLToPath } from 'node:url';
|
|
18
18
|
import { stateFingerprint } from './state-fp.mjs';
|
|
19
|
-
import { readEffectiveChecklist, evaluateChecklist, allPassing, summarize, writeChecklistStatuses } from './checklist.mjs';
|
|
20
19
|
|
|
21
20
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
22
21
|
// Resolve the loop home from the per-process env the daemon injects
|
|
@@ -132,26 +131,7 @@ if (evaluatorOn) {
|
|
|
132
131
|
}
|
|
133
132
|
}
|
|
134
133
|
|
|
135
|
-
|
|
136
|
-
// The effective checklist = project invariants ∪ session goals. Each item with an
|
|
137
|
-
// oracle is re-evaluated here (regression check); refreshed statuses are persisted
|
|
138
|
-
// so the UI + agent see live state. No-op when no checklist.json exists anywhere
|
|
139
|
-
// (allPassing([]) === true) — fully backward-compatible with criteria-only loops.
|
|
140
|
-
let checklistPass = true;
|
|
141
|
-
let checklistDetail = 'no checklist';
|
|
142
|
-
try {
|
|
143
|
-
const items = evaluateChecklist(readEffectiveChecklist(LOOP_DIR, PROJECT), PROJECT);
|
|
144
|
-
if (items.length > 0) {
|
|
145
|
-
writeChecklistStatuses(LOOP_DIR, PROJECT, items);
|
|
146
|
-
checklistPass = allPassing(items);
|
|
147
|
-
const failing = items.filter((i) => i.status !== 'passing');
|
|
148
|
-
checklistDetail = checklistPass
|
|
149
|
-
? `checklist: ${summarize(items)} — all passing`
|
|
150
|
-
: `checklist: ${summarize(items)}\n--- not yet passing ---\n${failing.map((i) => `[${i.scope}] ${i.text}${i.oracle ? ` (oracle: ${i.oracle})` : ''}`).join('\n')}`;
|
|
151
|
-
}
|
|
152
|
-
} catch { /* checklist is best-effort; never let it trap the gate */ }
|
|
153
|
-
|
|
154
|
-
const done = oraclePass && evaluatorPass && checklistPass;
|
|
134
|
+
const done = oraclePass && evaluatorPass;
|
|
155
135
|
|
|
156
136
|
// --- Decide -------------------------------------------------------------
|
|
157
137
|
const now = new Date().toISOString();
|
|
@@ -190,7 +170,7 @@ if (giveUp) {
|
|
|
190
170
|
}
|
|
191
171
|
|
|
192
172
|
writeJSONAtomic(STATE, { ...state, iteration: nextIter, phase: 'continue',
|
|
193
|
-
last_iteration_at: now, last_oracle: oracleDetail, last_eval: evaluatorDetail,
|
|
173
|
+
last_iteration_at: now, last_oracle: oracleDetail, last_eval: evaluatorDetail, ...tokenField });
|
|
194
174
|
|
|
195
175
|
appendHistory({ ts: now, iteration: nextIter, decision: 'continue', oracle: oraclePass, evaluator: evaluatorPass, detail: oraclePass ? evaluatorDetail : oracleDetail });
|
|
196
176
|
|
|
@@ -200,5 +180,4 @@ const STATEFP_REL = relative(PROJECT, join(LOOP_DIR, 'bin', 'state-fp.mjs')) ||
|
|
|
200
180
|
const evalHint = evaluatorOn && !evaluatorPass && oraclePass
|
|
201
181
|
? `\n\nThe code looks like it may be ready, but you must get an independent verdict: spawn the \`loop-evaluator\` subagent (or a fresh Task agent with a skeptical reviewer prompt) to judge the current diff against LOOP.md, then write its result to \`${VERDICT_REL}\` as {"verdict":"done"|"continue","reason":"...","guidance":"...","state_fp":"<run: node ${STATEFP_REL}>"}. Do not write the verdict yourself.`
|
|
202
182
|
: '';
|
|
203
|
-
|
|
204
|
-
block(`Loop is not complete${remaining}. Keep working on the task in LOOP.md.\n\n${oracleDetail}\n${evaluatorOn ? '\n' + evaluatorDetail : ''}${checklistHint}${evalHint}\n\nUpdate LOOP.md progress, fix the blocking issue, then finish your turn again to be re-checked.`);
|
|
183
|
+
block(`Loop is not complete${remaining}. Keep working on the task in LOOP.md.\n\n${oracleDetail}\n${evaluatorOn ? '\n' + evaluatorDetail : ''}${evalHint}\n\nUpdate LOOP.md progress, fix the blocking issue, then finish your turn again to be re-checked.`);
|
|
@@ -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 { n as shortId } from './run-
|
|
5
|
+
import { n as shortId } from './run-CCjAePDZ.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-CCjAePDZ.mjs').then(function (n) { return n.W; });
|
|
100
100
|
const desc = sanitizeDescription(description, 240);
|
|
101
101
|
if (!desc) {
|
|
102
102
|
console.error("Project description is empty.");
|
|
@@ -180,7 +180,7 @@ async function sessionBroadcast(action, args) {
|
|
|
180
180
|
console.log(`Broadcast sent: ${action}`);
|
|
181
181
|
}
|
|
182
182
|
async function connectToMachineService() {
|
|
183
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
183
|
+
const { connectAndGetMachine } = await import('./commands-DgrVRMPf.mjs');
|
|
184
184
|
return connectAndGetMachine();
|
|
185
185
|
}
|
|
186
186
|
async function inboxSend(targetSessionId, opts) {
|
|
@@ -197,7 +197,7 @@ async function inboxSend(targetSessionId, opts) {
|
|
|
197
197
|
}
|
|
198
198
|
const { server, machine } = await connectToMachineService();
|
|
199
199
|
try {
|
|
200
|
-
const { resolveSessionId } = await import('./commands-
|
|
200
|
+
const { resolveSessionId } = await import('./commands-DgrVRMPf.mjs');
|
|
201
201
|
const sessions = await machine.listSessions();
|
|
202
202
|
const match = resolveSessionId(sessions, targetSessionId);
|
|
203
203
|
const fullTargetId = match.sessionId;
|
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-CCjAePDZ.mjs';
|
|
2
2
|
import { ensureSupervisorViaServiceManager, LAUNCHD_LABEL } from './serviceManager-hlOVxkhW.mjs';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|
|
@@ -34,7 +34,7 @@ const subcommand = args[0];
|
|
|
34
34
|
let daemonSubcommand = args[1];
|
|
35
35
|
async function main() {
|
|
36
36
|
try {
|
|
37
|
-
const { getLoadedConfig } = await import('./run-
|
|
37
|
+
const { getLoadedConfig } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.a1; });
|
|
38
38
|
getLoadedConfig();
|
|
39
39
|
} catch {
|
|
40
40
|
}
|
|
@@ -51,7 +51,7 @@ async function main() {
|
|
|
51
51
|
console.error(`svamp daemon restart: ${err.message || err}`);
|
|
52
52
|
process.exit(1);
|
|
53
53
|
}
|
|
54
|
-
const { restartDaemon } = await import('./run-
|
|
54
|
+
const { restartDaemon } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.a3; });
|
|
55
55
|
await restartDaemon();
|
|
56
56
|
process.exit(0);
|
|
57
57
|
}
|
|
@@ -344,7 +344,7 @@ async function main() {
|
|
|
344
344
|
console.error("svamp service: Service commands are not available in sandboxed sessions.");
|
|
345
345
|
process.exit(1);
|
|
346
346
|
}
|
|
347
|
-
const { handleServiceCommand } = await import('./commands-
|
|
347
|
+
const { handleServiceCommand } = await import('./commands-QyvD7F1z.mjs');
|
|
348
348
|
await handleServiceCommand();
|
|
349
349
|
} else if (subcommand === "serve") {
|
|
350
350
|
const { isSandboxed: isSandboxedServe } = await import('./sandboxDetect-DNTcbgWD.mjs');
|
|
@@ -352,7 +352,7 @@ async function main() {
|
|
|
352
352
|
console.error("svamp serve: Serve commands are not available in sandboxed sessions.");
|
|
353
353
|
process.exit(1);
|
|
354
354
|
}
|
|
355
|
-
const { handleServeCommand } = await import('./serveCommands-
|
|
355
|
+
const { handleServeCommand } = await import('./serveCommands-DetQEHPQ.mjs');
|
|
356
356
|
await handleServeCommand();
|
|
357
357
|
process.exit(0);
|
|
358
358
|
} else if (subcommand === "process" || subcommand === "proc") {
|
|
@@ -361,7 +361,7 @@ async function main() {
|
|
|
361
361
|
console.error("svamp process: Process commands are not available in sandboxed sessions.");
|
|
362
362
|
process.exit(1);
|
|
363
363
|
}
|
|
364
|
-
const { processCommand } = await import('./commands-
|
|
364
|
+
const { processCommand } = await import('./commands-B9sqOiBc.mjs');
|
|
365
365
|
let machineId;
|
|
366
366
|
const processArgs = args.slice(1);
|
|
367
367
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -375,14 +375,14 @@ async function main() {
|
|
|
375
375
|
}), machineId);
|
|
376
376
|
process.exit(0);
|
|
377
377
|
} else if (subcommand === "trigger" || subcommand === "triggers" || subcommand === "routine" || subcommand === "routines") {
|
|
378
|
-
const { routineCommand } = await import('./commands-
|
|
378
|
+
const { routineCommand } = await import('./commands-DZq4EX41.mjs');
|
|
379
379
|
await routineCommand(args.slice(1));
|
|
380
380
|
process.exit(0);
|
|
381
381
|
} else if (subcommand === "wise-agent" || subcommand === "wise") {
|
|
382
382
|
await handleWiseAgentCommand(args.slice(1));
|
|
383
383
|
process.exit(0);
|
|
384
384
|
} else if (subcommand === "feature" || subcommand === "crew") {
|
|
385
|
-
const { crewCommand } = await import('./commands-
|
|
385
|
+
const { crewCommand } = await import('./commands-B6R-tDtR.mjs');
|
|
386
386
|
await crewCommand(args.slice(1));
|
|
387
387
|
process.exit(0);
|
|
388
388
|
} else if (subcommand === "--help" || subcommand === "-h") {
|
|
@@ -390,7 +390,7 @@ async function main() {
|
|
|
390
390
|
} else if (!subcommand || subcommand === "start") {
|
|
391
391
|
await handleInteractiveCommand();
|
|
392
392
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
393
|
-
const pkg = await import('./package-
|
|
393
|
+
const pkg = await import('./package-ClAJGLEQ.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
394
394
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
395
395
|
} else {
|
|
396
396
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -399,7 +399,7 @@ async function main() {
|
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
async function handleInteractiveCommand() {
|
|
402
|
-
const { runInteractive } = await import('./run-
|
|
402
|
+
const { runInteractive } = await import('./run-D_sV2sA7.mjs');
|
|
403
403
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
404
404
|
let directory = process.cwd();
|
|
405
405
|
let resumeSessionId;
|
|
@@ -444,7 +444,7 @@ async function handleAgentCommand() {
|
|
|
444
444
|
return;
|
|
445
445
|
}
|
|
446
446
|
if (agentArgs[0] === "list") {
|
|
447
|
-
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-
|
|
447
|
+
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.Z; });
|
|
448
448
|
console.log("Known agents:");
|
|
449
449
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
450
450
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -456,7 +456,7 @@ async function handleAgentCommand() {
|
|
|
456
456
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
457
457
|
return;
|
|
458
458
|
}
|
|
459
|
-
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-
|
|
459
|
+
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.Z; });
|
|
460
460
|
let cwd = process.cwd();
|
|
461
461
|
const filteredArgs = [];
|
|
462
462
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -480,12 +480,12 @@ async function handleAgentCommand() {
|
|
|
480
480
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
481
481
|
let backend;
|
|
482
482
|
if (KNOWN_MCP_AGENTS[config.agentName]) {
|
|
483
|
-
const { CodexMcpBackend } = await import('./run-
|
|
483
|
+
const { CodexMcpBackend } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n._; });
|
|
484
484
|
backend = new CodexMcpBackend({ cwd, log: logFn });
|
|
485
485
|
} else {
|
|
486
|
-
const { AcpBackend } = await import('./run-
|
|
487
|
-
const { GeminiTransport } = await import('./run-
|
|
488
|
-
const { DefaultTransport } = await import('./run-
|
|
486
|
+
const { AcpBackend } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.Y; });
|
|
487
|
+
const { GeminiTransport } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.$; });
|
|
488
|
+
const { DefaultTransport } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.X; });
|
|
489
489
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
490
490
|
backend = new AcpBackend({
|
|
491
491
|
agentName: config.agentName,
|
|
@@ -612,7 +612,7 @@ async function handleSessionCommand() {
|
|
|
612
612
|
process.exit(1);
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
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-
|
|
615
|
+
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-DgrVRMPf.mjs');
|
|
616
616
|
const parseFlagStr = (flag, shortFlag) => {
|
|
617
617
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
618
618
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -680,7 +680,7 @@ async function handleSessionCommand() {
|
|
|
680
680
|
allowDomain.push(sessionArgs[++i]);
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
const { parseShareArg } = await import('./commands-
|
|
683
|
+
const { parseShareArg } = await import('./commands-DgrVRMPf.mjs');
|
|
684
684
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
685
685
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
686
686
|
message,
|
|
@@ -765,7 +765,7 @@ async function handleSessionCommand() {
|
|
|
765
765
|
console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
|
|
766
766
|
process.exit(1);
|
|
767
767
|
}
|
|
768
|
-
const { sessionEditMessage } = await import('./commands-
|
|
768
|
+
const { sessionEditMessage } = await import('./commands-DgrVRMPf.mjs');
|
|
769
769
|
await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
770
770
|
} else if (sessionSubcommand === "refine") {
|
|
771
771
|
if (!sessionArgs[1] || !sessionArgs[2]) {
|
|
@@ -773,7 +773,7 @@ async function handleSessionCommand() {
|
|
|
773
773
|
console.error(" Asks the agent to revise its latest reply in place (no extra round).");
|
|
774
774
|
process.exit(1);
|
|
775
775
|
}
|
|
776
|
-
const { sessionRefineLastReply } = await import('./commands-
|
|
776
|
+
const { sessionRefineLastReply } = await import('./commands-DgrVRMPf.mjs');
|
|
777
777
|
await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
|
|
778
778
|
} else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
|
|
779
779
|
if (!sessionArgs[1]) {
|
|
@@ -781,7 +781,7 @@ async function handleSessionCommand() {
|
|
|
781
781
|
console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
|
|
782
782
|
process.exit(1);
|
|
783
783
|
}
|
|
784
|
-
const { sessionUndoEdit } = await import('./commands-
|
|
784
|
+
const { sessionUndoEdit } = await import('./commands-DgrVRMPf.mjs');
|
|
785
785
|
await sessionUndoEdit(sessionArgs[1], targetMachineId);
|
|
786
786
|
} else if (sessionSubcommand === "query") {
|
|
787
787
|
const dir = sessionArgs[1];
|
|
@@ -791,7 +791,7 @@ async function handleSessionCommand() {
|
|
|
791
791
|
console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
|
|
792
792
|
process.exit(1);
|
|
793
793
|
}
|
|
794
|
-
const { sessionQuery } = await import('./commands-
|
|
794
|
+
const { sessionQuery } = await import('./commands-DgrVRMPf.mjs');
|
|
795
795
|
await sessionQuery(dir, prompt, targetMachineId, {
|
|
796
796
|
timeout: parseFlagInt("--timeout"),
|
|
797
797
|
json: hasFlag("--json"),
|
|
@@ -824,7 +824,7 @@ async function handleSessionCommand() {
|
|
|
824
824
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
825
825
|
process.exit(1);
|
|
826
826
|
}
|
|
827
|
-
const { sessionApprove } = await import('./commands-
|
|
827
|
+
const { sessionApprove } = await import('./commands-DgrVRMPf.mjs');
|
|
828
828
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
829
829
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
830
830
|
json: hasFlag("--json")
|
|
@@ -834,7 +834,7 @@ async function handleSessionCommand() {
|
|
|
834
834
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
835
835
|
process.exit(1);
|
|
836
836
|
}
|
|
837
|
-
const { sessionDeny } = await import('./commands-
|
|
837
|
+
const { sessionDeny } = await import('./commands-DgrVRMPf.mjs');
|
|
838
838
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
839
839
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
840
840
|
json: hasFlag("--json")
|
|
@@ -868,7 +868,7 @@ async function handleSessionCommand() {
|
|
|
868
868
|
console.error('Usage: svamp session supervise <session-id> "<criteria>" [--oracle "cmd"] [--agent] [--parent <id>] [--action nudge|block] [--max N]');
|
|
869
869
|
process.exit(1);
|
|
870
870
|
}
|
|
871
|
-
const { sessionSupervise } = await import('./commands-
|
|
871
|
+
const { sessionSupervise } = await import('./commands-DgrVRMPf.mjs');
|
|
872
872
|
const actionStr = parseFlagStr("--action");
|
|
873
873
|
await sessionSupervise(sessionArgs[1], sessionArgs[2], targetMachineId, {
|
|
874
874
|
oracle: parseFlagStr("--oracle"),
|
|
@@ -882,7 +882,7 @@ async function handleSessionCommand() {
|
|
|
882
882
|
console.error("Usage: svamp session unsupervise <session-id>");
|
|
883
883
|
process.exit(1);
|
|
884
884
|
}
|
|
885
|
-
const { sessionUnsupervise } = await import('./commands-
|
|
885
|
+
const { sessionUnsupervise } = await import('./commands-DgrVRMPf.mjs');
|
|
886
886
|
await sessionUnsupervise(sessionArgs[1], targetMachineId);
|
|
887
887
|
} else if (sessionSubcommand === "set-title") {
|
|
888
888
|
const title = sessionArgs[1];
|
|
@@ -890,7 +890,7 @@ async function handleSessionCommand() {
|
|
|
890
890
|
console.error("Usage: svamp session set-title <title>");
|
|
891
891
|
process.exit(1);
|
|
892
892
|
}
|
|
893
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
893
|
+
const { sessionSetTitle } = await import('./agentCommands-yXsSYfmO.mjs');
|
|
894
894
|
await sessionSetTitle(title);
|
|
895
895
|
} else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
|
|
896
896
|
const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
@@ -898,7 +898,7 @@ async function handleSessionCommand() {
|
|
|
898
898
|
console.error("Usage: svamp session set-project-description <text>");
|
|
899
899
|
process.exit(1);
|
|
900
900
|
}
|
|
901
|
-
const { sessionSetProjectDescription } = await import('./agentCommands-
|
|
901
|
+
const { sessionSetProjectDescription } = await import('./agentCommands-yXsSYfmO.mjs');
|
|
902
902
|
await sessionSetProjectDescription(desc);
|
|
903
903
|
} else if (sessionSubcommand === "set-link") {
|
|
904
904
|
const url = sessionArgs[1];
|
|
@@ -907,7 +907,7 @@ async function handleSessionCommand() {
|
|
|
907
907
|
process.exit(1);
|
|
908
908
|
}
|
|
909
909
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
910
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
910
|
+
const { sessionSetLink } = await import('./agentCommands-yXsSYfmO.mjs');
|
|
911
911
|
await sessionSetLink(url, label);
|
|
912
912
|
} else if (sessionSubcommand === "notify") {
|
|
913
913
|
const message = sessionArgs[1];
|
|
@@ -916,7 +916,7 @@ async function handleSessionCommand() {
|
|
|
916
916
|
process.exit(1);
|
|
917
917
|
}
|
|
918
918
|
const level = parseFlagStr("--level") || "info";
|
|
919
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
919
|
+
const { sessionNotify } = await import('./agentCommands-yXsSYfmO.mjs');
|
|
920
920
|
await sessionNotify(message, level);
|
|
921
921
|
} else if (sessionSubcommand === "broadcast") {
|
|
922
922
|
const action = sessionArgs[1];
|
|
@@ -924,7 +924,7 @@ async function handleSessionCommand() {
|
|
|
924
924
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
925
925
|
process.exit(1);
|
|
926
926
|
}
|
|
927
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
927
|
+
const { sessionBroadcast } = await import('./agentCommands-yXsSYfmO.mjs');
|
|
928
928
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
929
929
|
} else if (sessionSubcommand === "inbox") {
|
|
930
930
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -935,7 +935,7 @@ async function handleSessionCommand() {
|
|
|
935
935
|
process.exit(1);
|
|
936
936
|
}
|
|
937
937
|
if (agentSessionId) {
|
|
938
|
-
const { inboxSend } = await import('./agentCommands-
|
|
938
|
+
const { inboxSend } = await import('./agentCommands-yXsSYfmO.mjs');
|
|
939
939
|
await inboxSend(sessionArgs[2], {
|
|
940
940
|
body: sessionArgs[3],
|
|
941
941
|
subject: parseFlagStr("--subject"),
|
|
@@ -950,7 +950,7 @@ async function handleSessionCommand() {
|
|
|
950
950
|
}
|
|
951
951
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
952
952
|
if (agentSessionId && !sessionArgs[2]) {
|
|
953
|
-
const { inboxList } = await import('./agentCommands-
|
|
953
|
+
const { inboxList } = await import('./agentCommands-yXsSYfmO.mjs');
|
|
954
954
|
await inboxList({
|
|
955
955
|
unread: hasFlag("--unread"),
|
|
956
956
|
limit: parseFlagInt("--limit"),
|
|
@@ -972,7 +972,7 @@ async function handleSessionCommand() {
|
|
|
972
972
|
process.exit(1);
|
|
973
973
|
}
|
|
974
974
|
if (agentSessionId && !sessionArgs[3]) {
|
|
975
|
-
const { inboxList } = await import('./agentCommands-
|
|
975
|
+
const { inboxList } = await import('./agentCommands-yXsSYfmO.mjs');
|
|
976
976
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
977
977
|
} else if (sessionArgs[3]) {
|
|
978
978
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -982,7 +982,7 @@ async function handleSessionCommand() {
|
|
|
982
982
|
}
|
|
983
983
|
} else if (inboxSubcmd === "reply") {
|
|
984
984
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
985
|
-
const { inboxReply } = await import('./agentCommands-
|
|
985
|
+
const { inboxReply } = await import('./agentCommands-yXsSYfmO.mjs');
|
|
986
986
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
987
987
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
988
988
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -1018,7 +1018,7 @@ async function handleMachineCommand() {
|
|
|
1018
1018
|
return;
|
|
1019
1019
|
}
|
|
1020
1020
|
if (machineSubcommand === "share") {
|
|
1021
|
-
const { machineShare } = await import('./commands-
|
|
1021
|
+
const { machineShare } = await import('./commands-DgrVRMPf.mjs');
|
|
1022
1022
|
let machineId;
|
|
1023
1023
|
const shareArgs = [];
|
|
1024
1024
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -1048,7 +1048,7 @@ async function handleMachineCommand() {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
await machineShare(machineId, { add, remove, list, configPath, showConfig });
|
|
1050
1050
|
} else if (machineSubcommand === "exec") {
|
|
1051
|
-
const { machineExec } = await import('./commands-
|
|
1051
|
+
const { machineExec } = await import('./commands-DgrVRMPf.mjs');
|
|
1052
1052
|
let machineId;
|
|
1053
1053
|
let cwd;
|
|
1054
1054
|
const cmdParts = [];
|
|
@@ -1068,7 +1068,7 @@ async function handleMachineCommand() {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
await machineExec(machineId, command, cwd);
|
|
1070
1070
|
} else if (machineSubcommand === "info") {
|
|
1071
|
-
const { machineInfo } = await import('./commands-
|
|
1071
|
+
const { machineInfo } = await import('./commands-DgrVRMPf.mjs');
|
|
1072
1072
|
let machineId;
|
|
1073
1073
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
1074
1074
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -1088,10 +1088,10 @@ async function handleMachineCommand() {
|
|
|
1088
1088
|
level = machineArgs[++i];
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
1091
|
-
const { machineNotify } = await import('./agentCommands-
|
|
1091
|
+
const { machineNotify } = await import('./agentCommands-yXsSYfmO.mjs');
|
|
1092
1092
|
await machineNotify(message, level);
|
|
1093
1093
|
} else if (machineSubcommand === "ls") {
|
|
1094
|
-
const { machineLs } = await import('./commands-
|
|
1094
|
+
const { machineLs } = await import('./commands-DgrVRMPf.mjs');
|
|
1095
1095
|
let machineId;
|
|
1096
1096
|
let showHidden = false;
|
|
1097
1097
|
let path;
|
|
@@ -1149,24 +1149,24 @@ Examples:
|
|
|
1149
1149
|
};
|
|
1150
1150
|
const hasFlag = (name) => fleetArgs.includes(`--${name}`);
|
|
1151
1151
|
if (sub === "status") {
|
|
1152
|
-
const { fleetStatus } = await import('./fleet-
|
|
1152
|
+
const { fleetStatus } = await import('./fleet-DxDQfnD5.mjs');
|
|
1153
1153
|
await fleetStatus();
|
|
1154
1154
|
} else if (sub === "exec") {
|
|
1155
1155
|
const command = fleetArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1156
|
-
const { fleetExec } = await import('./fleet-
|
|
1156
|
+
const { fleetExec } = await import('./fleet-DxDQfnD5.mjs');
|
|
1157
1157
|
await fleetExec(command, { cwd: flag("cwd") });
|
|
1158
1158
|
} else if (sub === "upgrade-claude") {
|
|
1159
|
-
const { fleetUpgradeClaude } = await import('./fleet-
|
|
1159
|
+
const { fleetUpgradeClaude } = await import('./fleet-DxDQfnD5.mjs');
|
|
1160
1160
|
await fleetUpgradeClaude({ version: flag("version", "-v") });
|
|
1161
1161
|
} else if (sub === "upgrade-svamp") {
|
|
1162
|
-
const { fleetUpgradeSvamp } = await import('./fleet-
|
|
1162
|
+
const { fleetUpgradeSvamp } = await import('./fleet-DxDQfnD5.mjs');
|
|
1163
1163
|
await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
|
|
1164
1164
|
} else if (sub === "daemon-restart") {
|
|
1165
|
-
const { fleetDaemonRestart } = await import('./fleet-
|
|
1165
|
+
const { fleetDaemonRestart } = await import('./fleet-DxDQfnD5.mjs');
|
|
1166
1166
|
await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
|
|
1167
1167
|
} else if (sub === "push-skill") {
|
|
1168
1168
|
const name = fleetArgs[1];
|
|
1169
|
-
const { fleetPushSkill } = await import('./fleet-
|
|
1169
|
+
const { fleetPushSkill } = await import('./fleet-DxDQfnD5.mjs');
|
|
1170
1170
|
await fleetPushSkill(name);
|
|
1171
1171
|
} else {
|
|
1172
1172
|
console.error(`Unknown fleet subcommand: ${sub}`);
|
|
@@ -1182,7 +1182,7 @@ async function handleSkillsCommand() {
|
|
|
1182
1182
|
await printSkillsHelp();
|
|
1183
1183
|
return;
|
|
1184
1184
|
}
|
|
1185
|
-
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-
|
|
1185
|
+
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-BDJR0VrZ.mjs');
|
|
1186
1186
|
if (skillsSubcommand === "find" || skillsSubcommand === "search") {
|
|
1187
1187
|
const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1188
1188
|
if (!query) {
|
|
@@ -1229,7 +1229,7 @@ async function loginToHypha() {
|
|
|
1229
1229
|
process.exit(1);
|
|
1230
1230
|
}
|
|
1231
1231
|
const anchor = anchorArg.replace(/\/+$/, "");
|
|
1232
|
-
const { loadInstanceConfig } = await import('./run-
|
|
1232
|
+
const { loadInstanceConfig } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.a1; });
|
|
1233
1233
|
let cfg = null;
|
|
1234
1234
|
try {
|
|
1235
1235
|
cfg = await loadInstanceConfig({ anchor, force: true });
|
|
@@ -1340,7 +1340,7 @@ async function logoutFromHypha() {
|
|
|
1340
1340
|
} catch {
|
|
1341
1341
|
}
|
|
1342
1342
|
try {
|
|
1343
|
-
const { clearInstanceConfigCache } = await import('./run-
|
|
1343
|
+
const { clearInstanceConfigCache } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.a1; });
|
|
1344
1344
|
clearInstanceConfigCache();
|
|
1345
1345
|
} catch {
|
|
1346
1346
|
}
|
|
@@ -1678,7 +1678,7 @@ async function applyClaudeAuthFlags(argv) {
|
|
|
1678
1678
|
"--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
|
|
1679
1679
|
);
|
|
1680
1680
|
}
|
|
1681
|
-
const mod = await import('./run-
|
|
1681
|
+
const mod = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.a0; });
|
|
1682
1682
|
if (hasHypha) {
|
|
1683
1683
|
let url;
|
|
1684
1684
|
const hyphaIdx = argv.indexOf("--use-hypha-proxy");
|
|
@@ -1732,7 +1732,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
1734
|
if (collected.length === 0) return;
|
|
1735
|
-
const { updateEnvFile } = await import('./run-
|
|
1735
|
+
const { updateEnvFile } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.a0; });
|
|
1736
1736
|
const seen = /* @__PURE__ */ new Set();
|
|
1737
1737
|
const deduped = collected.filter((e) => {
|
|
1738
1738
|
const k = e.toLowerCase();
|
|
@@ -1765,7 +1765,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
});
|
|
1767
1767
|
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(" ");
|
|
1768
|
-
const { wiseAskCli } = await import('./commands-
|
|
1768
|
+
const { wiseAskCli } = await import('./commands-DgrVRMPf.mjs');
|
|
1769
1769
|
await wiseAskCli(machineId, message, sessionId, { json });
|
|
1770
1770
|
return;
|
|
1771
1771
|
}
|
|
@@ -1777,7 +1777,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1777
1777
|
}
|
|
1778
1778
|
return void 0;
|
|
1779
1779
|
};
|
|
1780
|
-
const { runWiseVoiceCli } = await import('./headlessCli-
|
|
1780
|
+
const { runWiseVoiceCli } = await import('./headlessCli-yq6RWSPK.mjs');
|
|
1781
1781
|
await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
|
|
1782
1782
|
return;
|
|
1783
1783
|
}
|
|
@@ -1819,7 +1819,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1819
1819
|
return;
|
|
1820
1820
|
}
|
|
1821
1821
|
const authArgs = rest.slice(1);
|
|
1822
|
-
const mod = await import('./auth-
|
|
1822
|
+
const mod = await import('./auth-DN7R9F_k.mjs');
|
|
1823
1823
|
let action;
|
|
1824
1824
|
try {
|
|
1825
1825
|
action = mod.parseWiseAgentAuthArgs(authArgs);
|
|
@@ -1829,7 +1829,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1829
1829
|
return;
|
|
1830
1830
|
}
|
|
1831
1831
|
if (action) {
|
|
1832
|
-
const { updateEnvFile } = await import('./run-
|
|
1832
|
+
const { updateEnvFile } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.a0; });
|
|
1833
1833
|
const updates = mod.buildWiseAgentEnvUpdates(action);
|
|
1834
1834
|
updateEnvFile(updates);
|
|
1835
1835
|
for (const [k, v] of Object.entries(updates)) {
|
|
@@ -1843,7 +1843,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1843
1843
|
}
|
|
1844
1844
|
async function handleDaemonAuthCommand(argv) {
|
|
1845
1845
|
const sub = (argv[0] || "status").toLowerCase();
|
|
1846
|
-
const mod = await import('./run-
|
|
1846
|
+
const mod = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.a0; });
|
|
1847
1847
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
1848
1848
|
console.log(`
|
|
1849
1849
|
svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
|
|
@@ -2150,7 +2150,7 @@ Examples:
|
|
|
2150
2150
|
async function printSkillsHelp() {
|
|
2151
2151
|
let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
|
|
2152
2152
|
try {
|
|
2153
|
-
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-
|
|
2153
|
+
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-CCjAePDZ.mjs').then(function (n) { return n.a2; });
|
|
2154
2154
|
browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
|
|
2155
2155
|
} catch {
|
|
2156
2156
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
|
-
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-
|
|
2
|
+
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-DgrVRMPf.mjs';
|
|
3
3
|
import { execSync } from 'node:child_process';
|
|
4
|
-
import { n as shortId } from './run-
|
|
4
|
+
import { n as shortId } from './run-CCjAePDZ.mjs';
|
|
5
5
|
import 'node:path';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'os';
|
|
@@ -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-DgrVRMPf.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-CCjAePDZ.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -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, o as getSkillsServer, q as getSkillsWorkspaceName, t as getSkillsCollectionName, u as fetchWithTimeout, v as searchSkills, w as SKILLS_DIR, x as getSkillInfo, y as downloadSkillFile, z as listSkillFiles } from './run-
|
|
4
|
+
import { p as parseFrontmatter, o as getSkillsServer, q as getSkillsWorkspaceName, t as getSkillsCollectionName, u as fetchWithTimeout, v as searchSkills, w as SKILLS_DIR, x as getSkillInfo, y as downloadSkillFile, z as listSkillFiles } from './run-CCjAePDZ.mjs';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'url';
|
|
7
7
|
import 'child_process';
|
|
@@ -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-CCjAePDZ.mjs';
|
|
4
4
|
import 'os';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'fs';
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
2
2
|
import { execSync } from 'node:child_process';
|
|
3
3
|
import { basename, resolve, join, isAbsolute } from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import { G as formatHandle, H as normalizeAllowedUser, I as loadSecurityContextConfig, J as resolveSecurityContext, K as buildSecurityContextFromFlags, L as mergeSecurityContexts, c as connectToHypha, M as buildSessionShareUrl, N as computeOutboundHop, n as shortId, O as buildMachineShareUrl, P as parseHandle, Q as handleMatchesMetadata } from './run-
|
|
5
|
+
import { G as formatHandle, H as normalizeAllowedUser, I as loadSecurityContextConfig, J as resolveSecurityContext, K as buildSecurityContextFromFlags, L as mergeSecurityContexts, c as connectToHypha, M as buildSessionShareUrl, N as computeOutboundHop, n as shortId, O as buildMachineShareUrl, P as parseHandle, Q as handleMatchesMetadata } from './run-CCjAePDZ.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -58,7 +58,7 @@ async function serviceExpose(args) {
|
|
|
58
58
|
process.exit(1);
|
|
59
59
|
}
|
|
60
60
|
if (foreground) {
|
|
61
|
-
const { runFrpcTunnel } = await import('./frpc-
|
|
61
|
+
const { runFrpcTunnel } = await import('./frpc-DRWpAeZW.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-DgrVRMPf.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-DRWpAeZW.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-DgrVRMPf.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-DgrVRMPf.mjs');
|
|
165
165
|
const { server, machine } = await connectAndGetMachine();
|
|
166
166
|
try {
|
|
167
167
|
await machine.tunnelStop({ name });
|
|
@@ -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-CCjAePDZ.mjs';
|
|
5
5
|
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-HydRNEt7.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
@@ -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-CCjAePDZ.mjs';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'url';
|
|
9
9
|
import 'node:crypto';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as resolveModel, T as describeMisconfiguration, U as buildMachineDeps } from './run-
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { F as resolveModel, T as describeMisconfiguration, U as buildMachineDeps } from './run-CCjAePDZ.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-DDiW5TJU.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-CCjAePDZ.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "svamp-cli";
|
|
2
|
-
var version = "0.2.
|
|
2
|
+
var version = "0.2.121";
|
|
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 && cp -r ../../skills/crew bin/skills/crew && 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-auto-topic.mjs && npx tsx test/test-project-info.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-short-id.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-channel-binding.mjs && npx tsx test/test-channel-identity.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 && npx tsx test/test-crew-merge.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-auto-topic.mjs && npx tsx test/test-project-info.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-checklist.mjs && npx tsx test/test-short-id.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-channel-binding.mjs && npx tsx test/test-channel-identity.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 && npx tsx test/test-crew-merge.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",
|
|
@@ -2676,7 +2676,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
2676
2676
|
const tunnels = handlers.tunnels;
|
|
2677
2677
|
if (!tunnels) throw new Error("Tunnel management not available");
|
|
2678
2678
|
if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
|
|
2679
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
2679
|
+
const { FrpcTunnel } = await import('./frpc-DRWpAeZW.mjs');
|
|
2680
2680
|
const tunnel = new FrpcTunnel({
|
|
2681
2681
|
name: params.name,
|
|
2682
2682
|
ports: params.ports,
|
|
@@ -2937,7 +2937,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
2937
2937
|
}
|
|
2938
2938
|
const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
|
|
2939
2939
|
const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
|
|
2940
|
-
const { toolsForRole } = await import('./sideband-
|
|
2940
|
+
const { toolsForRole } = await import('./sideband-DDiW5TJU.mjs');
|
|
2941
2941
|
const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
|
|
2942
2942
|
return fmt(r2);
|
|
2943
2943
|
}
|
|
@@ -3036,7 +3036,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
3036
3036
|
if (r.error || !r.sender) return { error: r.error || "unauthorized" };
|
|
3037
3037
|
const callId = "call_" + Math.random().toString(16).slice(2, 12);
|
|
3038
3038
|
const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
|
|
3039
|
-
const { queryCore } = await import('./commands-
|
|
3039
|
+
const { queryCore } = await import('./commands-DgrVRMPf.mjs');
|
|
3040
3040
|
const timeout = c.reply?.timeout_sec || 120;
|
|
3041
3041
|
let result;
|
|
3042
3042
|
try {
|
|
@@ -3113,9 +3113,6 @@ ${d?.error || "not found"}`;
|
|
|
3113
3113
|
trackInbound();
|
|
3114
3114
|
const res = resolveChannel(kwargs.channel, kwargs.session);
|
|
3115
3115
|
if ("error" in res) return { error: res.error };
|
|
3116
|
-
if (res.tier === "session" && !("stopped" in res)) {
|
|
3117
|
-
return res.rpc.channelReceive({ channel: kwargs.channel, key: kwargs.key, from: kwargs.from, cursor: kwargs.cursor, correlationId: kwargs.correlationId, wait: kwargs.wait }, context);
|
|
3118
|
-
}
|
|
3119
3116
|
const { c, dir } = res;
|
|
3120
3117
|
if (c.reply?.mode !== "queue") {
|
|
3121
3118
|
return { error: "this channel has no async replies (not a queue-mode channel)" };
|
|
@@ -3130,9 +3127,16 @@ ${d?.error || "not found"}`;
|
|
|
3130
3127
|
});
|
|
3131
3128
|
if (r.error || !r.sender) return { error: r.error || "unauthorized" };
|
|
3132
3129
|
const cursor = Math.max(0, Number(kwargs.cursor) || 0);
|
|
3133
|
-
const
|
|
3134
|
-
const
|
|
3135
|
-
|
|
3130
|
+
const waitMs = Math.min(Math.max(0, Number(kwargs.wait ?? 25) * 1e3), 6e4);
|
|
3131
|
+
const deadline = Date.now() + waitMs;
|
|
3132
|
+
for (; ; ) {
|
|
3133
|
+
const outbox = new ChannelOutbox(dir);
|
|
3134
|
+
const replies = outbox.since(c.id, cursor, r.sender.name, kwargs.correlationId);
|
|
3135
|
+
if (replies.length || Date.now() >= deadline) {
|
|
3136
|
+
return { ok: true, replies, cursor: outbox.cursor(c.id) };
|
|
3137
|
+
}
|
|
3138
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
3139
|
+
}
|
|
3136
3140
|
}
|
|
3137
3141
|
},
|
|
3138
3142
|
{ overwrite: true }
|
|
@@ -9686,6 +9690,111 @@ class ProcessSupervisor {
|
|
|
9686
9690
|
}
|
|
9687
9691
|
}
|
|
9688
9692
|
|
|
9693
|
+
const STATUS_TO_MARKER = {
|
|
9694
|
+
todo: " ",
|
|
9695
|
+
active: "~",
|
|
9696
|
+
verifying: "*",
|
|
9697
|
+
awaiting_review: "?",
|
|
9698
|
+
rework: "r",
|
|
9699
|
+
blocked: "!",
|
|
9700
|
+
done: "x"
|
|
9701
|
+
};
|
|
9702
|
+
function renderCriteria(items) {
|
|
9703
|
+
if (!items.length) return "";
|
|
9704
|
+
const lines = items.map((it) => {
|
|
9705
|
+
const tag = it.disposition === "delegated" ? " (delegated)" : "";
|
|
9706
|
+
return `- [${STATUS_TO_MARKER[it.status] ?? " "}] ${it.text}${tag}`;
|
|
9707
|
+
});
|
|
9708
|
+
const { done, total } = summarize(items);
|
|
9709
|
+
return `Success criteria \u2014 drive this checklist to all-done (${done}/${total}):
|
|
9710
|
+
${lines.join("\n")}`;
|
|
9711
|
+
}
|
|
9712
|
+
function compileChecklist(items) {
|
|
9713
|
+
const criteria = renderCriteria(items);
|
|
9714
|
+
const oracleItem = items.find((i) => i.disposition === "inline" && i.eval?.type === "oracle");
|
|
9715
|
+
const oracle = oracleItem && oracleItem.eval?.type === "oracle" ? oracleItem.eval.cmd : void 0;
|
|
9716
|
+
return { criteria, ...oracle ? { oracle } : {} };
|
|
9717
|
+
}
|
|
9718
|
+
function routeVerdictToChecklist(items, v) {
|
|
9719
|
+
let matched = false;
|
|
9720
|
+
const next = items.map((it) => {
|
|
9721
|
+
if (it.child?.sessionId && it.child.sessionId === v.sessionId) {
|
|
9722
|
+
matched = true;
|
|
9723
|
+
return applyVerdict(it, v);
|
|
9724
|
+
}
|
|
9725
|
+
return it;
|
|
9726
|
+
});
|
|
9727
|
+
return { items: next, matched };
|
|
9728
|
+
}
|
|
9729
|
+
function applyVerdict(item, v) {
|
|
9730
|
+
const lastVerdict = { verdict: v.verdict, ...v.guidance ? { guidance: v.guidance } : {}, round: v.round, ts: v.ts };
|
|
9731
|
+
if (v.verdict === "approved") return { ...item, status: "done", doneAt: Date.parse(v.ts) || item.createdAt, lastVerdict };
|
|
9732
|
+
return { ...item, status: "rework", lastVerdict };
|
|
9733
|
+
}
|
|
9734
|
+
const VALID_STATUS = /* @__PURE__ */ new Set(["todo", "active", "verifying", "awaiting_review", "rework", "blocked", "done"]);
|
|
9735
|
+
function validateChecklist(items) {
|
|
9736
|
+
const errs = [];
|
|
9737
|
+
const ids = /* @__PURE__ */ new Set();
|
|
9738
|
+
for (const it of items) {
|
|
9739
|
+
if (!it.id) errs.push("item missing id");
|
|
9740
|
+
else if (ids.has(it.id)) errs.push(`duplicate item id "${it.id}"`);
|
|
9741
|
+
else ids.add(it.id);
|
|
9742
|
+
if (!it.text || !it.text.trim()) errs.push(`item "${it.id}" has empty text`);
|
|
9743
|
+
if (it.disposition !== "inline" && it.disposition !== "delegated") errs.push(`item "${it.id}" bad disposition`);
|
|
9744
|
+
if (!VALID_STATUS.has(it.status)) errs.push(`item "${it.id}" bad status "${it.status}"`);
|
|
9745
|
+
if (it.eval?.type === "oracle" && !it.eval.cmd.trim()) errs.push(`item "${it.id}" oracle eval needs a cmd`);
|
|
9746
|
+
}
|
|
9747
|
+
return errs;
|
|
9748
|
+
}
|
|
9749
|
+
function summarize(items) {
|
|
9750
|
+
const by = (s) => items.filter((i) => i.status === s).length;
|
|
9751
|
+
const done = by("done");
|
|
9752
|
+
return {
|
|
9753
|
+
total: items.length,
|
|
9754
|
+
done,
|
|
9755
|
+
todo: by("todo"),
|
|
9756
|
+
active: by("active"),
|
|
9757
|
+
blocked: by("blocked"),
|
|
9758
|
+
awaiting_review: by("awaiting_review"),
|
|
9759
|
+
delegated: items.filter((i) => i.disposition === "delegated").length,
|
|
9760
|
+
allDone: items.length > 0 && done === items.length
|
|
9761
|
+
};
|
|
9762
|
+
}
|
|
9763
|
+
function checklistPath(projectRoot, sessionId) {
|
|
9764
|
+
return join(projectRoot, ".svamp", sessionId, "loop", "checklist.json");
|
|
9765
|
+
}
|
|
9766
|
+
|
|
9767
|
+
function readChecklist(projectRoot, sessionId) {
|
|
9768
|
+
const p = checklistPath(projectRoot, sessionId);
|
|
9769
|
+
if (!existsSync(p)) return [];
|
|
9770
|
+
try {
|
|
9771
|
+
const parsed = JSON.parse(readFileSync(p, "utf8"));
|
|
9772
|
+
return Array.isArray(parsed?.items) ? parsed.items : [];
|
|
9773
|
+
} catch {
|
|
9774
|
+
return [];
|
|
9775
|
+
}
|
|
9776
|
+
}
|
|
9777
|
+
function writeChecklist(projectRoot, sessionId, items) {
|
|
9778
|
+
const p = checklistPath(projectRoot, sessionId);
|
|
9779
|
+
mkdirSync(dirname(p), { recursive: true });
|
|
9780
|
+
const file = { version: 1, items, updatedAt: Date.now() };
|
|
9781
|
+
const tmp = p + ".tmp";
|
|
9782
|
+
writeFileSync(tmp, JSON.stringify(file, null, 2));
|
|
9783
|
+
renameSync(tmp, p);
|
|
9784
|
+
}
|
|
9785
|
+
function clearChecklist(projectRoot, sessionId) {
|
|
9786
|
+
const p = checklistPath(projectRoot, sessionId);
|
|
9787
|
+
try {
|
|
9788
|
+
if (existsSync(p)) rmSync(p);
|
|
9789
|
+
} catch {
|
|
9790
|
+
}
|
|
9791
|
+
}
|
|
9792
|
+
function mutateChecklist(projectRoot, sessionId, fn) {
|
|
9793
|
+
const next = fn(readChecklist(projectRoot, sessionId));
|
|
9794
|
+
writeChecklist(projectRoot, sessionId, next);
|
|
9795
|
+
return next;
|
|
9796
|
+
}
|
|
9797
|
+
|
|
9689
9798
|
const OAUTH_TOKEN_ENDPOINT = "https://platform.claude.com/v1/oauth/token";
|
|
9690
9799
|
const OAUTH_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
|
|
9691
9800
|
const OAUTH_SCOPES = "user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload";
|
|
@@ -10778,6 +10887,38 @@ Continue working until they are met, or verify and finish \u2014 an independent
|
|
|
10778
10887
|
const { supervisor: _s, ...restPatch } = patch;
|
|
10779
10888
|
patch = restPatch;
|
|
10780
10889
|
}
|
|
10890
|
+
if ("checklist" in patch) {
|
|
10891
|
+
const raw = patch.checklist;
|
|
10892
|
+
const items = Array.isArray(raw) ? raw : [];
|
|
10893
|
+
if (items.length) {
|
|
10894
|
+
const errs = validateChecklist(items);
|
|
10895
|
+
if (errs.length) {
|
|
10896
|
+
sessionService.pushMessage({ type: "message", message: `Checklist rejected: ${errs.join("; ")}`, level: "error" }, "event");
|
|
10897
|
+
} else {
|
|
10898
|
+
writeChecklist(directory, sessionId, items);
|
|
10899
|
+
const { criteria, oracle } = compileChecklist(items);
|
|
10900
|
+
const ok = initLoop(directory, { task: criteria, criteria, oracle, maxIterations: 20, evaluator: true, sessionId });
|
|
10901
|
+
const s = summarize(items);
|
|
10902
|
+
if (ok) {
|
|
10903
|
+
const idle = getMetadata().lifecycleState === "idle";
|
|
10904
|
+
if (idle) {
|
|
10905
|
+
const q = getMetadata().messageQueue || [];
|
|
10906
|
+
const nudge = `Your goal checklist was updated (${s.done}/${s.total} done). Work the open items in order; an independent Stop gate re-checks the criteria before you can stop.`;
|
|
10907
|
+
setMetadata((m) => ({ ...m, messageQueue: [...q, { id: randomUUID$1(), text: nudge, displayText: `\u{1F4CB} Checklist updated`, createdAt: Date.now() }] }));
|
|
10908
|
+
onLoopActivated?.();
|
|
10909
|
+
}
|
|
10910
|
+
sessionService.pushMessage({ type: "message", message: `\u{1F4CB} Checklist set \u2014 ${s.total} item${s.total === 1 ? "" : "s"} (${s.delegated} delegated), ${s.done} done.` }, "event");
|
|
10911
|
+
logger.log(`[svampConfig] Checklist set (${s.total} items, ${s.delegated} delegated)`);
|
|
10912
|
+
}
|
|
10913
|
+
}
|
|
10914
|
+
} else {
|
|
10915
|
+
clearChecklist(directory, sessionId);
|
|
10916
|
+
deactivateLoop(directory, sessionId);
|
|
10917
|
+
sessionService.pushMessage({ type: "message", message: "Checklist cleared." }, "event");
|
|
10918
|
+
}
|
|
10919
|
+
const { checklist: _c, ...restPatch } = patch;
|
|
10920
|
+
patch = restPatch;
|
|
10921
|
+
}
|
|
10781
10922
|
if (Object.keys(patch).length > 0) {
|
|
10782
10923
|
const config = readSvampConfig(configPath);
|
|
10783
10924
|
for (const [key, value] of Object.entries(patch)) {
|
|
@@ -11205,7 +11346,7 @@ async function startDaemon(options) {
|
|
|
11205
11346
|
const list = loadExposedTunnels().filter((t) => t.name !== name);
|
|
11206
11347
|
saveExposedTunnels(list);
|
|
11207
11348
|
}
|
|
11208
|
-
const { ServeManager } = await import('./serveManager-
|
|
11349
|
+
const { ServeManager } = await import('./serveManager-BSwiPu1O.mjs');
|
|
11209
11350
|
const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
|
|
11210
11351
|
ensureAutoInstalledSkills(logger).catch(() => {
|
|
11211
11352
|
});
|
|
@@ -11266,6 +11407,13 @@ ${v.guidance ? v.guidance + "\n" : ""}Criteria: ${v.criteria || "(none)"}
|
|
|
11266
11407
|
hopCount: 1
|
|
11267
11408
|
})).catch(() => {
|
|
11268
11409
|
});
|
|
11410
|
+
try {
|
|
11411
|
+
if (parent?.directory) {
|
|
11412
|
+
const res = mutateChecklist(parent.directory, parentId, (items) => routeVerdictToChecklist(items, { sessionId: v.sessionId, verdict: v.verdict, guidance: v.guidance, round: v.round, ts: v.ts }).items);
|
|
11413
|
+
if (res.some((i) => i.child?.sessionId === v.sessionId)) logger.log(`[supervision] reflected '${v.verdict}' onto parent ${parentId.slice(0, 8)} checklist`);
|
|
11414
|
+
}
|
|
11415
|
+
} catch {
|
|
11416
|
+
}
|
|
11269
11417
|
logger.log(`[supervision] verdict '${v.verdict}' for ${v.sessionId.slice(0, 8)} \u2192 parent ${parentId.slice(0, 8)}`);
|
|
11270
11418
|
} catch {
|
|
11271
11419
|
}
|
|
@@ -13874,7 +14022,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
13874
14022
|
const specs = loadExposedTunnels();
|
|
13875
14023
|
if (specs.length === 0) return;
|
|
13876
14024
|
logger.log(`[exposed-tunnels] Restoring ${specs.length} tunnel(s) from ${EXPOSED_TUNNELS_FILE}`);
|
|
13877
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
14025
|
+
const { FrpcTunnel } = await import('./frpc-DRWpAeZW.mjs');
|
|
13878
14026
|
for (const spec of specs) {
|
|
13879
14027
|
if (tunnels.has(spec.name)) continue;
|
|
13880
14028
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { n as shortId, c as connectToHypha, a as createSessionStore, r as registerMachineService, V as generateHookSettings } from './run-
|
|
1
|
+
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { n as shortId, c as connectToHypha, a as createSessionStore, r as registerMachineService, V as generateHookSettings } from './run-CCjAePDZ.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';
|
|
@@ -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-DgrVRMPf.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-DgrVRMPf.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-DgrVRMPf.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-DgrVRMPf.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-DgrVRMPf.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-CCjAePDZ.mjs';
|
|
8
8
|
import 'os';
|
|
9
9
|
import 'fs/promises';
|
|
10
10
|
import 'url';
|
|
@@ -713,7 +713,7 @@ class ServeManager {
|
|
|
713
713
|
const mount = this.mounts.get(mountName);
|
|
714
714
|
const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, `static-${subdomainSafe}-${mount.linkToken}`]]) : void 0;
|
|
715
715
|
try {
|
|
716
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
716
|
+
const { FrpcTunnel } = await import('./frpc-DRWpAeZW.mjs');
|
|
717
717
|
let tunnel;
|
|
718
718
|
tunnel = new FrpcTunnel({
|
|
719
719
|
name: tunnelName,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-
|
|
1
|
+
import { A as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-CCjAePDZ.mjs';
|
|
2
2
|
import 'node:child_process';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svamp-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.121",
|
|
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 && cp -r ../../skills/crew bin/skills/crew && 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-auto-topic.mjs && npx tsx test/test-project-info.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-short-id.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-channel-binding.mjs && npx tsx test/test-channel-identity.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 && npx tsx test/test-crew-merge.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-auto-topic.mjs && npx tsx test/test-project-info.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-checklist.mjs && npx tsx test/test-short-id.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-channel-binding.mjs && npx tsx test/test-channel-identity.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 && npx tsx test/test-crew-merge.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",
|