svamp-cli 0.2.117 → 0.2.119
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 +91 -0
- package/bin/skills/loop/bin/loop-init.mjs +0 -3
- package/bin/skills/loop/test/test-checklist.mjs +65 -0
- package/dist/{agentCommands-CZgIpC1Z.mjs → agentCommands-BTkU0PQb.mjs} +4 -4
- package/dist/{auth-Dkiiq1bg.mjs → auth-DimbhOMP.mjs} +1 -1
- package/dist/cli.mjs +55 -55
- package/dist/{commands-Q1xvobXM.mjs → commands-3FsdWpJO.mjs} +2 -2
- package/dist/{commands-BxXUQlBD.mjs → commands-B5rek8XG.mjs} +20 -3
- package/dist/{commands-QWVhHPCf.mjs → commands-BEjlVtvS.mjs} +1 -1
- package/dist/{commands-Do6Od6jK.mjs → commands-BJfRk4KT.mjs} +17 -8
- package/dist/{commands-BvKgI__M.mjs → commands-Bw2V_awn.mjs} +6 -6
- package/dist/{commands-CsJyJgin.mjs → commands-fbQs3jLx.mjs} +5 -5
- package/dist/{fleet-l4Ku9jry.mjs → fleet-D5dNVJIp.mjs} +1 -1
- package/dist/{frpc-63NvAmuT.mjs → frpc-CdcXdQde.mjs} +1 -1
- package/dist/{headlessCli-BsVvbKhN.mjs → headlessCli-Lk2OU1Gh.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{package-uOEzgreT.mjs → package-B-M4dhbv.mjs} +1 -1
- package/dist/{run-Ci6VToZR.mjs → run-9C2ogsuu.mjs} +20 -5
- package/dist/{run-C1jI28ZZ.mjs → run-DIoR81Ev.mjs} +1 -1
- package/dist/{serveCommands-BuA8btah.mjs → serveCommands-BqApmjmR.mjs} +5 -5
- package/dist/{serveManager-DUjR8RGw.mjs → serveManager-XsXnI804.mjs} +2 -2
- package/dist/{sideband-DE8X9tg3.mjs → sideband-BHWq1P8E.mjs} +1 -1
- package/package.json +1 -1
package/bin/skills/loop/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: loop
|
|
3
|
-
version: 0.3.
|
|
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
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// checklist.mjs — the loop-engineering task/criteria atom.
|
|
2
|
+
// See docs/svamp-loop-engineering-vision.md. A checklist is a list of evaluable
|
|
3
|
+
// items persisted as JSON, in two layered scopes:
|
|
4
|
+
// session: <loopDir>/checklist.json (this session's goal)
|
|
5
|
+
// project: <projectDir>/.svamp/checklist.json (durable invariants, all sessions)
|
|
6
|
+
// The effective checklist a session enforces = project ∪ session. Each item is
|
|
7
|
+
// oracle-checked (a pass/fail command) or agent-evaluated. Done ≠ gone: a passing
|
|
8
|
+
// item STAYS in the list and is re-verified every loop, so it can regress to failing.
|
|
9
|
+
// The supervisor only lets the turn end when ALL effective items are passing.
|
|
10
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'node:fs';
|
|
11
|
+
import { join, dirname } from 'node:path';
|
|
12
|
+
import { execSync } from 'node:child_process';
|
|
13
|
+
|
|
14
|
+
export function sessionChecklistPath(loopDir) { return join(loopDir, 'checklist.json'); }
|
|
15
|
+
export function projectChecklistPath(projectDir) { return join(projectDir, '.svamp', 'checklist.json'); }
|
|
16
|
+
|
|
17
|
+
const STATUSES = ['pending', 'passing', 'failing'];
|
|
18
|
+
|
|
19
|
+
function readOne(path, scope) {
|
|
20
|
+
try {
|
|
21
|
+
if (!existsSync(path)) return [];
|
|
22
|
+
const j = JSON.parse(readFileSync(path, 'utf-8'));
|
|
23
|
+
const items = Array.isArray(j) ? j : (Array.isArray(j?.items) ? j.items : []);
|
|
24
|
+
return items.map((it, i) => ({
|
|
25
|
+
id: typeof it.id === 'string' && it.id ? it.id : `${scope}-${i}`,
|
|
26
|
+
text: String(it?.text ?? '').trim(),
|
|
27
|
+
// 'done' is a friendly alias for 'passing'.
|
|
28
|
+
status: it?.status === 'done' ? 'passing' : (STATUSES.includes(it?.status) ? it.status : 'pending'),
|
|
29
|
+
oracle: typeof it?.oracle === 'string' && it.oracle.trim() ? it.oracle.trim() : null,
|
|
30
|
+
scope,
|
|
31
|
+
})).filter((it) => it.text);
|
|
32
|
+
} catch { return []; }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Effective checklist = project invariants ∪ session goals (project first, then session). */
|
|
36
|
+
export function readEffectiveChecklist(loopDir, projectDir) {
|
|
37
|
+
return [
|
|
38
|
+
...readOne(projectChecklistPath(projectDir), 'project'),
|
|
39
|
+
...readOne(sessionChecklistPath(loopDir), 'session'),
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Run each item's oracle (if it has one) and return items with refreshed status.
|
|
45
|
+
* Items WITHOUT an oracle keep their stored status (those are agent-evaluated, not
|
|
46
|
+
* machine-checkable here). This is the per-loop regression check: a previously
|
|
47
|
+
* passing item whose oracle now fails flips to 'failing'.
|
|
48
|
+
*/
|
|
49
|
+
export function evaluateChecklist(items, projectDir, timeoutSec = 600) {
|
|
50
|
+
return items.map((it) => {
|
|
51
|
+
if (!it.oracle) return it;
|
|
52
|
+
try {
|
|
53
|
+
execSync(it.oracle, { cwd: projectDir, stdio: 'pipe', maxBuffer: 16 * 1024 * 1024, timeout: timeoutSec * 1000 });
|
|
54
|
+
return { ...it, status: 'passing' };
|
|
55
|
+
} catch {
|
|
56
|
+
return { ...it, status: 'failing' };
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** True when every effective item is passing (an empty list is trivially satisfied). */
|
|
62
|
+
export function allPassing(items) {
|
|
63
|
+
return items.length === 0 ? true : items.every((it) => it.status === 'passing');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** A one-line summary for the gate's history/state. */
|
|
67
|
+
export function summarize(items) {
|
|
68
|
+
const pass = items.filter((i) => i.status === 'passing').length;
|
|
69
|
+
const fail = items.filter((i) => i.status === 'failing').length;
|
|
70
|
+
return `${pass}/${items.length} passing${fail ? `, ${fail} failing` : ''}`;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Persist refreshed statuses back to each scope's file, so the UI renderer + the
|
|
75
|
+
* agent see live state. Writes the canonical { items: [...] } shape (scope stripped —
|
|
76
|
+
* it's implied by which file the item lives in).
|
|
77
|
+
*/
|
|
78
|
+
export function writeChecklistStatuses(loopDir, projectDir, items) {
|
|
79
|
+
const targets = [
|
|
80
|
+
['session', sessionChecklistPath(loopDir)],
|
|
81
|
+
['project', projectChecklistPath(projectDir)],
|
|
82
|
+
];
|
|
83
|
+
for (const [scope, path] of targets) {
|
|
84
|
+
const scoped = items.filter((it) => it.scope === scope).map(({ scope: _s, ...rest }) => rest);
|
|
85
|
+
if (scoped.length === 0 && !existsSync(path)) continue; // don't create empty files
|
|
86
|
+
try {
|
|
87
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
88
|
+
writeFileSync(path, JSON.stringify({ items: scoped }, null, 2));
|
|
89
|
+
} catch { /* best-effort persistence */ }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -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,
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// test-checklist.mjs — the loop-engineering checklist atom (read/merge/evaluate/persist).
|
|
2
|
+
import { mkdtempSync, mkdirSync, writeFileSync, readFileSync, existsSync, rmSync } from 'node:fs';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import {
|
|
6
|
+
readEffectiveChecklist, evaluateChecklist, allPassing, summarize,
|
|
7
|
+
writeChecklistStatuses, sessionChecklistPath, projectChecklistPath,
|
|
8
|
+
} from '../bin/checklist.mjs';
|
|
9
|
+
|
|
10
|
+
let passed = 0, failed = 0;
|
|
11
|
+
function ok(cond, msg) { if (cond) { passed++; console.log(` ✓ ${msg}`); } else { failed++; console.log(` ✗ ${msg}`); } }
|
|
12
|
+
function eq(a, b, msg) { ok(JSON.stringify(a) === JSON.stringify(b), `${msg} (got ${JSON.stringify(a)})`); }
|
|
13
|
+
|
|
14
|
+
const root = mkdtempSync(join(tmpdir(), 'cl-test-'));
|
|
15
|
+
const projectDir = root;
|
|
16
|
+
const loopDir = join(root, '.svamp', 'sess1', 'loop');
|
|
17
|
+
mkdirSync(loopDir, { recursive: true });
|
|
18
|
+
mkdirSync(join(root, '.svamp'), { recursive: true });
|
|
19
|
+
|
|
20
|
+
console.log('scope merge + normalization');
|
|
21
|
+
writeFileSync(projectChecklistPath(projectDir), JSON.stringify({ items: [
|
|
22
|
+
{ text: 'tests pass', oracle: 'true', status: 'passing' },
|
|
23
|
+
] }));
|
|
24
|
+
writeFileSync(sessionChecklistPath(loopDir), JSON.stringify({ items: [
|
|
25
|
+
{ text: 'add feature', status: 'done' }, // 'done' alias → passing
|
|
26
|
+
{ text: ' ', status: 'pending' }, // blank → dropped
|
|
27
|
+
{ text: 'no TODOs', oracle: 'false' }, // defaults to pending
|
|
28
|
+
] }));
|
|
29
|
+
let eff = readEffectiveChecklist(loopDir, projectDir);
|
|
30
|
+
eq(eff.length, 3, 'effective = project ∪ session, blanks dropped');
|
|
31
|
+
eq(eff[0].scope, 'project', 'project items come first');
|
|
32
|
+
eq(eff[0].text, 'tests pass', 'project item text');
|
|
33
|
+
eq(eff[1].status, 'passing', "'done' normalized to passing");
|
|
34
|
+
ok(eff.map(i => i.scope).join(',') === 'project,session,session', 'scope tags correct');
|
|
35
|
+
|
|
36
|
+
console.log('evaluate — oracle pass/fail drives status (regression check)');
|
|
37
|
+
const evaluated = evaluateChecklist(eff, projectDir);
|
|
38
|
+
eq(evaluated.find(i => i.text === 'tests pass').status, 'passing', 'oracle `true` → passing');
|
|
39
|
+
eq(evaluated.find(i => i.text === 'no TODOs').status, 'failing', 'oracle `false` → failing');
|
|
40
|
+
eq(evaluated.find(i => i.text === 'add feature').status, 'passing', 'no-oracle item keeps stored status');
|
|
41
|
+
|
|
42
|
+
console.log('allPassing gate');
|
|
43
|
+
ok(!allPassing(evaluated), 'not all passing while one oracle fails');
|
|
44
|
+
ok(allPassing([]), 'empty list is trivially satisfied');
|
|
45
|
+
ok(allPassing(evaluated.map(i => ({ ...i, status: 'passing' }))), 'all passing → true');
|
|
46
|
+
|
|
47
|
+
console.log('summarize');
|
|
48
|
+
ok(summarize(evaluated).startsWith('2/3 passing'), `summary reads "${summarize(evaluated)}"`);
|
|
49
|
+
|
|
50
|
+
console.log('persist statuses back to the right scope files');
|
|
51
|
+
writeChecklistStatuses(loopDir, projectDir, evaluated);
|
|
52
|
+
const proj = JSON.parse(readFileSync(projectChecklistPath(projectDir), 'utf-8'));
|
|
53
|
+
const sess = JSON.parse(readFileSync(sessionChecklistPath(loopDir), 'utf-8'));
|
|
54
|
+
eq(proj.items.length, 1, 'project file holds only project items');
|
|
55
|
+
eq(sess.items.length, 2, 'session file holds only session items');
|
|
56
|
+
ok(proj.items[0].scope === undefined, 'scope stripped from persisted file');
|
|
57
|
+
ok(sess.items.find(i => i.text === 'no TODOs').status === 'failing', 'failing status persisted (UI will show it)');
|
|
58
|
+
|
|
59
|
+
// regression: a re-read after persist is stable
|
|
60
|
+
const reEff = readEffectiveChecklist(loopDir, projectDir);
|
|
61
|
+
eq(reEff.length, 3, 're-read after persist is stable');
|
|
62
|
+
|
|
63
|
+
rmSync(root, { recursive: true, force: true });
|
|
64
|
+
console.log(`\nchecklist: ${passed} passed, ${failed} failed`);
|
|
65
|
+
process.exit(failed ? 1 : 0);
|
|
@@ -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-9C2ogsuu.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-9C2ogsuu.mjs').then(function (n) { return n.T; });
|
|
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-B5rek8XG.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-B5rek8XG.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-9C2ogsuu.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-9C2ogsuu.mjs').then(function (n) { return n._; });
|
|
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-9C2ogsuu.mjs').then(function (n) { return n.a0; });
|
|
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-fbQs3jLx.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-BqApmjmR.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-3FsdWpJO.mjs');
|
|
365
365
|
let machineId;
|
|
366
366
|
const processArgs = args.slice(1);
|
|
367
367
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -374,15 +374,15 @@ async function main() {
|
|
|
374
374
|
return true;
|
|
375
375
|
}), machineId);
|
|
376
376
|
process.exit(0);
|
|
377
|
-
} else if (subcommand === "routine" || subcommand === "routines") {
|
|
378
|
-
const { routineCommand } = await import('./commands-
|
|
377
|
+
} else if (subcommand === "trigger" || subcommand === "triggers" || subcommand === "routine" || subcommand === "routines") {
|
|
378
|
+
const { routineCommand } = await import('./commands-Bw2V_awn.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-BJfRk4KT.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-B-M4dhbv.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-DIoR81Ev.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-9C2ogsuu.mjs').then(function (n) { return n.W; });
|
|
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-9C2ogsuu.mjs').then(function (n) { return n.W; });
|
|
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-9C2ogsuu.mjs').then(function (n) { return n.X; });
|
|
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-9C2ogsuu.mjs').then(function (n) { return n.V; });
|
|
487
|
+
const { GeminiTransport } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.Y; });
|
|
488
|
+
const { DefaultTransport } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.U; });
|
|
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-B5rek8XG.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-B5rek8XG.mjs');
|
|
684
684
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
685
685
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
686
686
|
message,
|
|
@@ -767,7 +767,7 @@ async function handleSessionCommand() {
|
|
|
767
767
|
console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
|
|
768
768
|
process.exit(1);
|
|
769
769
|
}
|
|
770
|
-
const { sessionQuery } = await import('./commands-
|
|
770
|
+
const { sessionQuery } = await import('./commands-B5rek8XG.mjs');
|
|
771
771
|
await sessionQuery(dir, prompt, targetMachineId, {
|
|
772
772
|
timeout: parseFlagInt("--timeout"),
|
|
773
773
|
json: hasFlag("--json"),
|
|
@@ -800,7 +800,7 @@ async function handleSessionCommand() {
|
|
|
800
800
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
801
801
|
process.exit(1);
|
|
802
802
|
}
|
|
803
|
-
const { sessionApprove } = await import('./commands-
|
|
803
|
+
const { sessionApprove } = await import('./commands-B5rek8XG.mjs');
|
|
804
804
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
805
805
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
806
806
|
json: hasFlag("--json")
|
|
@@ -810,7 +810,7 @@ async function handleSessionCommand() {
|
|
|
810
810
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
811
811
|
process.exit(1);
|
|
812
812
|
}
|
|
813
|
-
const { sessionDeny } = await import('./commands-
|
|
813
|
+
const { sessionDeny } = await import('./commands-B5rek8XG.mjs');
|
|
814
814
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
815
815
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
816
816
|
json: hasFlag("--json")
|
|
@@ -844,7 +844,7 @@ async function handleSessionCommand() {
|
|
|
844
844
|
console.error('Usage: svamp session supervise <session-id> "<criteria>" [--oracle "cmd"] [--agent] [--parent <id>] [--action nudge|block] [--max N]');
|
|
845
845
|
process.exit(1);
|
|
846
846
|
}
|
|
847
|
-
const { sessionSupervise } = await import('./commands-
|
|
847
|
+
const { sessionSupervise } = await import('./commands-B5rek8XG.mjs');
|
|
848
848
|
const actionStr = parseFlagStr("--action");
|
|
849
849
|
await sessionSupervise(sessionArgs[1], sessionArgs[2], targetMachineId, {
|
|
850
850
|
oracle: parseFlagStr("--oracle"),
|
|
@@ -858,7 +858,7 @@ async function handleSessionCommand() {
|
|
|
858
858
|
console.error("Usage: svamp session unsupervise <session-id>");
|
|
859
859
|
process.exit(1);
|
|
860
860
|
}
|
|
861
|
-
const { sessionUnsupervise } = await import('./commands-
|
|
861
|
+
const { sessionUnsupervise } = await import('./commands-B5rek8XG.mjs');
|
|
862
862
|
await sessionUnsupervise(sessionArgs[1], targetMachineId);
|
|
863
863
|
} else if (sessionSubcommand === "set-title") {
|
|
864
864
|
const title = sessionArgs[1];
|
|
@@ -866,7 +866,7 @@ async function handleSessionCommand() {
|
|
|
866
866
|
console.error("Usage: svamp session set-title <title>");
|
|
867
867
|
process.exit(1);
|
|
868
868
|
}
|
|
869
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
869
|
+
const { sessionSetTitle } = await import('./agentCommands-BTkU0PQb.mjs');
|
|
870
870
|
await sessionSetTitle(title);
|
|
871
871
|
} else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
|
|
872
872
|
const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
@@ -874,7 +874,7 @@ async function handleSessionCommand() {
|
|
|
874
874
|
console.error("Usage: svamp session set-project-description <text>");
|
|
875
875
|
process.exit(1);
|
|
876
876
|
}
|
|
877
|
-
const { sessionSetProjectDescription } = await import('./agentCommands-
|
|
877
|
+
const { sessionSetProjectDescription } = await import('./agentCommands-BTkU0PQb.mjs');
|
|
878
878
|
await sessionSetProjectDescription(desc);
|
|
879
879
|
} else if (sessionSubcommand === "set-link") {
|
|
880
880
|
const url = sessionArgs[1];
|
|
@@ -883,7 +883,7 @@ async function handleSessionCommand() {
|
|
|
883
883
|
process.exit(1);
|
|
884
884
|
}
|
|
885
885
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
886
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
886
|
+
const { sessionSetLink } = await import('./agentCommands-BTkU0PQb.mjs');
|
|
887
887
|
await sessionSetLink(url, label);
|
|
888
888
|
} else if (sessionSubcommand === "notify") {
|
|
889
889
|
const message = sessionArgs[1];
|
|
@@ -892,7 +892,7 @@ async function handleSessionCommand() {
|
|
|
892
892
|
process.exit(1);
|
|
893
893
|
}
|
|
894
894
|
const level = parseFlagStr("--level") || "info";
|
|
895
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
895
|
+
const { sessionNotify } = await import('./agentCommands-BTkU0PQb.mjs');
|
|
896
896
|
await sessionNotify(message, level);
|
|
897
897
|
} else if (sessionSubcommand === "broadcast") {
|
|
898
898
|
const action = sessionArgs[1];
|
|
@@ -900,7 +900,7 @@ async function handleSessionCommand() {
|
|
|
900
900
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
901
901
|
process.exit(1);
|
|
902
902
|
}
|
|
903
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
903
|
+
const { sessionBroadcast } = await import('./agentCommands-BTkU0PQb.mjs');
|
|
904
904
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
905
905
|
} else if (sessionSubcommand === "inbox") {
|
|
906
906
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -911,7 +911,7 @@ async function handleSessionCommand() {
|
|
|
911
911
|
process.exit(1);
|
|
912
912
|
}
|
|
913
913
|
if (agentSessionId) {
|
|
914
|
-
const { inboxSend } = await import('./agentCommands-
|
|
914
|
+
const { inboxSend } = await import('./agentCommands-BTkU0PQb.mjs');
|
|
915
915
|
await inboxSend(sessionArgs[2], {
|
|
916
916
|
body: sessionArgs[3],
|
|
917
917
|
subject: parseFlagStr("--subject"),
|
|
@@ -926,7 +926,7 @@ async function handleSessionCommand() {
|
|
|
926
926
|
}
|
|
927
927
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
928
928
|
if (agentSessionId && !sessionArgs[2]) {
|
|
929
|
-
const { inboxList } = await import('./agentCommands-
|
|
929
|
+
const { inboxList } = await import('./agentCommands-BTkU0PQb.mjs');
|
|
930
930
|
await inboxList({
|
|
931
931
|
unread: hasFlag("--unread"),
|
|
932
932
|
limit: parseFlagInt("--limit"),
|
|
@@ -948,7 +948,7 @@ async function handleSessionCommand() {
|
|
|
948
948
|
process.exit(1);
|
|
949
949
|
}
|
|
950
950
|
if (agentSessionId && !sessionArgs[3]) {
|
|
951
|
-
const { inboxList } = await import('./agentCommands-
|
|
951
|
+
const { inboxList } = await import('./agentCommands-BTkU0PQb.mjs');
|
|
952
952
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
953
953
|
} else if (sessionArgs[3]) {
|
|
954
954
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -958,7 +958,7 @@ async function handleSessionCommand() {
|
|
|
958
958
|
}
|
|
959
959
|
} else if (inboxSubcmd === "reply") {
|
|
960
960
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
961
|
-
const { inboxReply } = await import('./agentCommands-
|
|
961
|
+
const { inboxReply } = await import('./agentCommands-BTkU0PQb.mjs');
|
|
962
962
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
963
963
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
964
964
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -994,7 +994,7 @@ async function handleMachineCommand() {
|
|
|
994
994
|
return;
|
|
995
995
|
}
|
|
996
996
|
if (machineSubcommand === "share") {
|
|
997
|
-
const { machineShare } = await import('./commands-
|
|
997
|
+
const { machineShare } = await import('./commands-B5rek8XG.mjs');
|
|
998
998
|
let machineId;
|
|
999
999
|
const shareArgs = [];
|
|
1000
1000
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -1024,7 +1024,7 @@ async function handleMachineCommand() {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
await machineShare(machineId, { add, remove, list, configPath, showConfig });
|
|
1026
1026
|
} else if (machineSubcommand === "exec") {
|
|
1027
|
-
const { machineExec } = await import('./commands-
|
|
1027
|
+
const { machineExec } = await import('./commands-B5rek8XG.mjs');
|
|
1028
1028
|
let machineId;
|
|
1029
1029
|
let cwd;
|
|
1030
1030
|
const cmdParts = [];
|
|
@@ -1044,7 +1044,7 @@ async function handleMachineCommand() {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
await machineExec(machineId, command, cwd);
|
|
1046
1046
|
} else if (machineSubcommand === "info") {
|
|
1047
|
-
const { machineInfo } = await import('./commands-
|
|
1047
|
+
const { machineInfo } = await import('./commands-B5rek8XG.mjs');
|
|
1048
1048
|
let machineId;
|
|
1049
1049
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
1050
1050
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -1064,10 +1064,10 @@ async function handleMachineCommand() {
|
|
|
1064
1064
|
level = machineArgs[++i];
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
|
-
const { machineNotify } = await import('./agentCommands-
|
|
1067
|
+
const { machineNotify } = await import('./agentCommands-BTkU0PQb.mjs');
|
|
1068
1068
|
await machineNotify(message, level);
|
|
1069
1069
|
} else if (machineSubcommand === "ls") {
|
|
1070
|
-
const { machineLs } = await import('./commands-
|
|
1070
|
+
const { machineLs } = await import('./commands-B5rek8XG.mjs');
|
|
1071
1071
|
let machineId;
|
|
1072
1072
|
let showHidden = false;
|
|
1073
1073
|
let path;
|
|
@@ -1125,24 +1125,24 @@ Examples:
|
|
|
1125
1125
|
};
|
|
1126
1126
|
const hasFlag = (name) => fleetArgs.includes(`--${name}`);
|
|
1127
1127
|
if (sub === "status") {
|
|
1128
|
-
const { fleetStatus } = await import('./fleet-
|
|
1128
|
+
const { fleetStatus } = await import('./fleet-D5dNVJIp.mjs');
|
|
1129
1129
|
await fleetStatus();
|
|
1130
1130
|
} else if (sub === "exec") {
|
|
1131
1131
|
const command = fleetArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1132
|
-
const { fleetExec } = await import('./fleet-
|
|
1132
|
+
const { fleetExec } = await import('./fleet-D5dNVJIp.mjs');
|
|
1133
1133
|
await fleetExec(command, { cwd: flag("cwd") });
|
|
1134
1134
|
} else if (sub === "upgrade-claude") {
|
|
1135
|
-
const { fleetUpgradeClaude } = await import('./fleet-
|
|
1135
|
+
const { fleetUpgradeClaude } = await import('./fleet-D5dNVJIp.mjs');
|
|
1136
1136
|
await fleetUpgradeClaude({ version: flag("version", "-v") });
|
|
1137
1137
|
} else if (sub === "upgrade-svamp") {
|
|
1138
|
-
const { fleetUpgradeSvamp } = await import('./fleet-
|
|
1138
|
+
const { fleetUpgradeSvamp } = await import('./fleet-D5dNVJIp.mjs');
|
|
1139
1139
|
await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
|
|
1140
1140
|
} else if (sub === "daemon-restart") {
|
|
1141
|
-
const { fleetDaemonRestart } = await import('./fleet-
|
|
1141
|
+
const { fleetDaemonRestart } = await import('./fleet-D5dNVJIp.mjs');
|
|
1142
1142
|
await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
|
|
1143
1143
|
} else if (sub === "push-skill") {
|
|
1144
1144
|
const name = fleetArgs[1];
|
|
1145
|
-
const { fleetPushSkill } = await import('./fleet-
|
|
1145
|
+
const { fleetPushSkill } = await import('./fleet-D5dNVJIp.mjs');
|
|
1146
1146
|
await fleetPushSkill(name);
|
|
1147
1147
|
} else {
|
|
1148
1148
|
console.error(`Unknown fleet subcommand: ${sub}`);
|
|
@@ -1158,7 +1158,7 @@ async function handleSkillsCommand() {
|
|
|
1158
1158
|
await printSkillsHelp();
|
|
1159
1159
|
return;
|
|
1160
1160
|
}
|
|
1161
|
-
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-
|
|
1161
|
+
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-BEjlVtvS.mjs');
|
|
1162
1162
|
if (skillsSubcommand === "find" || skillsSubcommand === "search") {
|
|
1163
1163
|
const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1164
1164
|
if (!query) {
|
|
@@ -1205,7 +1205,7 @@ async function loginToHypha() {
|
|
|
1205
1205
|
process.exit(1);
|
|
1206
1206
|
}
|
|
1207
1207
|
const anchor = anchorArg.replace(/\/+$/, "");
|
|
1208
|
-
const { loadInstanceConfig } = await import('./run-
|
|
1208
|
+
const { loadInstanceConfig } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n._; });
|
|
1209
1209
|
let cfg = null;
|
|
1210
1210
|
try {
|
|
1211
1211
|
cfg = await loadInstanceConfig({ anchor, force: true });
|
|
@@ -1316,7 +1316,7 @@ async function logoutFromHypha() {
|
|
|
1316
1316
|
} catch {
|
|
1317
1317
|
}
|
|
1318
1318
|
try {
|
|
1319
|
-
const { clearInstanceConfigCache } = await import('./run-
|
|
1319
|
+
const { clearInstanceConfigCache } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n._; });
|
|
1320
1320
|
clearInstanceConfigCache();
|
|
1321
1321
|
} catch {
|
|
1322
1322
|
}
|
|
@@ -1654,7 +1654,7 @@ async function applyClaudeAuthFlags(argv) {
|
|
|
1654
1654
|
"--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
|
|
1655
1655
|
);
|
|
1656
1656
|
}
|
|
1657
|
-
const mod = await import('./run-
|
|
1657
|
+
const mod = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.Z; });
|
|
1658
1658
|
if (hasHypha) {
|
|
1659
1659
|
let url;
|
|
1660
1660
|
const hyphaIdx = argv.indexOf("--use-hypha-proxy");
|
|
@@ -1708,7 +1708,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
1710
1710
|
if (collected.length === 0) return;
|
|
1711
|
-
const { updateEnvFile } = await import('./run-
|
|
1711
|
+
const { updateEnvFile } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.Z; });
|
|
1712
1712
|
const seen = /* @__PURE__ */ new Set();
|
|
1713
1713
|
const deduped = collected.filter((e) => {
|
|
1714
1714
|
const k = e.toLowerCase();
|
|
@@ -1741,7 +1741,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1741
1741
|
}
|
|
1742
1742
|
});
|
|
1743
1743
|
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(" ");
|
|
1744
|
-
const { wiseAskCli } = await import('./commands-
|
|
1744
|
+
const { wiseAskCli } = await import('./commands-B5rek8XG.mjs');
|
|
1745
1745
|
await wiseAskCli(machineId, message, sessionId, { json });
|
|
1746
1746
|
return;
|
|
1747
1747
|
}
|
|
@@ -1753,7 +1753,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1753
1753
|
}
|
|
1754
1754
|
return void 0;
|
|
1755
1755
|
};
|
|
1756
|
-
const { runWiseVoiceCli } = await import('./headlessCli-
|
|
1756
|
+
const { runWiseVoiceCli } = await import('./headlessCli-Lk2OU1Gh.mjs');
|
|
1757
1757
|
await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
|
|
1758
1758
|
return;
|
|
1759
1759
|
}
|
|
@@ -1795,7 +1795,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1795
1795
|
return;
|
|
1796
1796
|
}
|
|
1797
1797
|
const authArgs = rest.slice(1);
|
|
1798
|
-
const mod = await import('./auth-
|
|
1798
|
+
const mod = await import('./auth-DimbhOMP.mjs');
|
|
1799
1799
|
let action;
|
|
1800
1800
|
try {
|
|
1801
1801
|
action = mod.parseWiseAgentAuthArgs(authArgs);
|
|
@@ -1805,7 +1805,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1805
1805
|
return;
|
|
1806
1806
|
}
|
|
1807
1807
|
if (action) {
|
|
1808
|
-
const { updateEnvFile } = await import('./run-
|
|
1808
|
+
const { updateEnvFile } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.Z; });
|
|
1809
1809
|
const updates = mod.buildWiseAgentEnvUpdates(action);
|
|
1810
1810
|
updateEnvFile(updates);
|
|
1811
1811
|
for (const [k, v] of Object.entries(updates)) {
|
|
@@ -1819,7 +1819,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1819
1819
|
}
|
|
1820
1820
|
async function handleDaemonAuthCommand(argv) {
|
|
1821
1821
|
const sub = (argv[0] || "status").toLowerCase();
|
|
1822
|
-
const mod = await import('./run-
|
|
1822
|
+
const mod = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.Z; });
|
|
1823
1823
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
1824
1824
|
console.log(`
|
|
1825
1825
|
svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
|
|
@@ -2126,7 +2126,7 @@ Examples:
|
|
|
2126
2126
|
async function printSkillsHelp() {
|
|
2127
2127
|
let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
|
|
2128
2128
|
try {
|
|
2129
|
-
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-
|
|
2129
|
+
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-9C2ogsuu.mjs').then(function (n) { return n.$; });
|
|
2130
2130
|
browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
|
|
2131
2131
|
} catch {
|
|
2132
2132
|
}
|
|
@@ -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-B5rek8XG.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-9C2ogsuu.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { execSync } from 'node:child_process';
|
|
3
|
-
import { basename, resolve, join } from 'node:path';
|
|
3
|
+
import { basename, resolve, join, isAbsolute } from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import { G as normalizeAllowedUser, H as loadSecurityContextConfig, I as resolveSecurityContext, J as buildSecurityContextFromFlags, K as mergeSecurityContexts, c as connectToHypha, L as buildSessionShareUrl, M as computeOutboundHop, n as shortId, N as buildMachineShareUrl } from './run-
|
|
5
|
+
import { G as normalizeAllowedUser, H as loadSecurityContextConfig, I as resolveSecurityContext, J as buildSecurityContextFromFlags, K as mergeSecurityContexts, c as connectToHypha, L as buildSessionShareUrl, M as computeOutboundHop, n as shortId, N as buildMachineShareUrl } from './run-9C2ogsuu.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -999,6 +999,22 @@ function generateWorktreeName() {
|
|
|
999
999
|
const noun = WORKTREE_NOUNS[Math.floor(Math.random() * WORKTREE_NOUNS.length)];
|
|
1000
1000
|
return `${adj}-${noun}`;
|
|
1001
1001
|
}
|
|
1002
|
+
function ensureWorktreeExcludes(projectRoot) {
|
|
1003
|
+
try {
|
|
1004
|
+
const common = execSync("git rev-parse --git-common-dir", { cwd: projectRoot, stdio: "pipe" }).toString().trim();
|
|
1005
|
+
const commonAbs = isAbsolute(common) ? common : join(projectRoot, common);
|
|
1006
|
+
const excludeFile = join(commonAbs, "info", "exclude");
|
|
1007
|
+
const existing = existsSync(excludeFile) ? readFileSync(excludeFile, "utf-8") : "";
|
|
1008
|
+
const lines = existing.split("\n");
|
|
1009
|
+
const want = [".svamp/", ".dev/"];
|
|
1010
|
+
const missing = want.filter((w) => !lines.some((l) => l.trim() === w));
|
|
1011
|
+
if (missing.length) {
|
|
1012
|
+
const prefix = existing && !existing.endsWith("\n") ? "\n" : "";
|
|
1013
|
+
writeFileSync(excludeFile, existing + prefix + missing.join("\n") + "\n");
|
|
1014
|
+
}
|
|
1015
|
+
} catch {
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1002
1018
|
function createWorktree(baseDir) {
|
|
1003
1019
|
const absBase = resolve(baseDir);
|
|
1004
1020
|
const marker = "/.dev/worktree/";
|
|
@@ -1009,6 +1025,7 @@ function createWorktree(baseDir) {
|
|
|
1009
1025
|
} catch {
|
|
1010
1026
|
throw new Error(`Not a git repository: ${projectRoot}`);
|
|
1011
1027
|
}
|
|
1028
|
+
ensureWorktreeExcludes(projectRoot);
|
|
1012
1029
|
const name = generateWorktreeName();
|
|
1013
1030
|
const relPath = `.dev/worktree/${name}`;
|
|
1014
1031
|
try {
|
|
@@ -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-9C2ogsuu.mjs';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'url';
|
|
7
7
|
import 'child_process';
|
|
@@ -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-B5rek8XG.mjs';
|
|
3
3
|
import { execSync } from 'node:child_process';
|
|
4
|
-
import { n as shortId } from './run-
|
|
4
|
+
import { n as shortId } from './run-9C2ogsuu.mjs';
|
|
5
5
|
import 'node:path';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'os';
|
|
@@ -26,7 +26,12 @@ function git(cwd, args) {
|
|
|
26
26
|
return execSync(`git ${args}`, { cwd, stdio: "pipe", encoding: "utf-8" }).toString();
|
|
27
27
|
}
|
|
28
28
|
function worktreeStatus(worktreePath) {
|
|
29
|
-
|
|
29
|
+
const raw = git(worktreePath, "status --porcelain").trim();
|
|
30
|
+
if (!raw) return "";
|
|
31
|
+
return raw.split("\n").filter((line) => {
|
|
32
|
+
const p = line.slice(3);
|
|
33
|
+
return !p.startsWith(".svamp/") && !p.startsWith(".dev/");
|
|
34
|
+
}).join("\n").trim();
|
|
30
35
|
}
|
|
31
36
|
function aheadBehind(worktreePath, baseBranch) {
|
|
32
37
|
try {
|
|
@@ -101,7 +106,7 @@ ${childStatus}`
|
|
|
101
106
|
${detail.trim()}` };
|
|
102
107
|
}
|
|
103
108
|
try {
|
|
104
|
-
git(projectRoot, `worktree remove ${worktreePath}`);
|
|
109
|
+
git(projectRoot, `worktree remove --force ${worktreePath}`);
|
|
105
110
|
} catch (e) {
|
|
106
111
|
const detail = e.stderr?.toString() || "" || e.message;
|
|
107
112
|
return { ok: false, stage: "remove-worktree", detail: `merged OK but worktree removal failed: ${detail.trim()}` };
|
|
@@ -132,6 +137,10 @@ function requireLead(explicit) {
|
|
|
132
137
|
async function rpc(machine, id, method, kwargs = {}) {
|
|
133
138
|
return machine.sessionRPC(id, method, kwargs);
|
|
134
139
|
}
|
|
140
|
+
async function getMeta(machine, id) {
|
|
141
|
+
const r = await rpc(machine, id, "getMetadata");
|
|
142
|
+
return r?.metadata ?? r ?? {};
|
|
143
|
+
}
|
|
135
144
|
async function inbox(machine, fromId, toId, body, subject) {
|
|
136
145
|
await rpc(machine, toId, "sendInboxMessage", {
|
|
137
146
|
message: {
|
|
@@ -299,7 +308,7 @@ async function featureReport(text, opts = {}) {
|
|
|
299
308
|
const selfId = requireLead(opts.selfId);
|
|
300
309
|
const { server, machine } = await connectAndGetMachine(opts.machineId);
|
|
301
310
|
try {
|
|
302
|
-
const meta = await
|
|
311
|
+
const meta = await getMeta(machine, selfId);
|
|
303
312
|
const parent = meta?.parentSessionId;
|
|
304
313
|
if (!parent) {
|
|
305
314
|
console.error("This session has no parent (lead) to report to.");
|
|
@@ -318,7 +327,7 @@ async function featureDone(opts = {}) {
|
|
|
318
327
|
const selfId = requireLead(opts.selfId);
|
|
319
328
|
const { server, machine } = await connectAndGetMachine(opts.machineId);
|
|
320
329
|
try {
|
|
321
|
-
const meta = await
|
|
330
|
+
const meta = await getMeta(machine, selfId);
|
|
322
331
|
const parent = meta?.parentSessionId;
|
|
323
332
|
if (!parent) {
|
|
324
333
|
console.error("This session has no parent (lead) to report to.");
|
|
@@ -353,7 +362,7 @@ async function featureMerge(childPartial, opts = {}) {
|
|
|
353
362
|
const leadId = opts.leadId || process.env.SVAMP_SESSION_ID || "";
|
|
354
363
|
const { server, machine, fullId: childId } = await connectAndResolveSession(childPartial, opts.machineId);
|
|
355
364
|
try {
|
|
356
|
-
const meta = await
|
|
365
|
+
const meta = await getMeta(machine, childId);
|
|
357
366
|
const crew = meta?.crew || {};
|
|
358
367
|
const worktreePath = crew.worktreePath || meta?.path || "";
|
|
359
368
|
if (!worktreePath) {
|
|
@@ -366,7 +375,7 @@ async function featureMerge(childPartial, opts = {}) {
|
|
|
366
375
|
console.error("Could not determine the feature branch.");
|
|
367
376
|
process.exit(1);
|
|
368
377
|
}
|
|
369
|
-
const projectRoot = projectRootFromWorktree(worktreePath) || (leadId ? (await
|
|
378
|
+
const projectRoot = projectRootFromWorktree(worktreePath) || (leadId ? (await getMeta(machine, leadId).catch(() => ({})))?.path : null) || "";
|
|
370
379
|
if (!projectRoot) {
|
|
371
380
|
console.error("Could not determine the lead project root (base worktree).");
|
|
372
381
|
process.exit(1);
|
|
@@ -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-9C2ogsuu.mjs';
|
|
4
4
|
import 'os';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'fs';
|
|
@@ -89,7 +89,7 @@ async function routineCommand(args) {
|
|
|
89
89
|
process.exit(1);
|
|
90
90
|
}
|
|
91
91
|
const r = store.save(buildRoutineFromArgs(a));
|
|
92
|
-
console.log(`\u2705 added
|
|
92
|
+
console.log(`\u2705 added trigger ${r.id} (${r.name}) source=${r.trigger.type} action=${r.action.kind} session=${r.session_id}`);
|
|
93
93
|
if (r.trigger.key) console.log(` webhook key: ${r.trigger.key}`);
|
|
94
94
|
break;
|
|
95
95
|
}
|
|
@@ -100,7 +100,7 @@ async function routineCommand(args) {
|
|
|
100
100
|
break;
|
|
101
101
|
}
|
|
102
102
|
if (!rs.length) {
|
|
103
|
-
console.log("(no
|
|
103
|
+
console.log("(no triggers)");
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
106
|
for (const r of rs) console.log(`${r.enabled ? "\u25CF" : "\u25CB"} ${r.id} ${r.name} [${r.trigger.type}${r.trigger.cron ? " " + r.trigger.cron : ""}] -> ${r.action.kind} ${r.bind === "stateless" ? `stateless(${r.dir || "?"})` : `session=${r.session_id}`}`);
|
|
@@ -124,7 +124,7 @@ async function routineCommand(args) {
|
|
|
124
124
|
await serve(runner, Number(a.port) || 8722);
|
|
125
125
|
break;
|
|
126
126
|
default:
|
|
127
|
-
console.log(`usage: svamp
|
|
127
|
+
console.log(`usage: svamp trigger <add|list|remove|enable|disable|run-now|serve> (alias: svamp routine)
|
|
128
128
|
add --session <id> --name <n> [--schedule "*/5 * * * *" [--missed catchup]] [--webhook|--api [--get] [--public]] [--stateless --dir <path>] (--message "..." | --loop --dir <path> --task "..." [--oracle "cmd"])
|
|
129
129
|
list [--session <id>] [--json]
|
|
130
130
|
serve [--port 8722]`);
|
|
@@ -165,9 +165,9 @@ async function serve(runner, port) {
|
|
|
165
165
|
});
|
|
166
166
|
});
|
|
167
167
|
server.listen(port, () => {
|
|
168
|
-
console.log(`\u{1FA9D}
|
|
168
|
+
console.log(`\u{1FA9D} trigger server on http://localhost:${port}`);
|
|
169
169
|
console.log(` webhook URL: http://localhost:${port}/routine/<id>?key=<key>`);
|
|
170
|
-
console.log(` expose: svamp service expose
|
|
170
|
+
console.log(` expose: svamp service expose triggers --port ${port}`);
|
|
171
171
|
});
|
|
172
172
|
process.on("SIGINT", () => {
|
|
173
173
|
clearInterval(timer);
|
|
@@ -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-CdcXdQde.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-B5rek8XG.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-CdcXdQde.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-B5rek8XG.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-B5rek8XG.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-9C2ogsuu.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-9C2ogsuu.mjs';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'url';
|
|
9
9
|
import 'node:crypto';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as resolveModel, O as describeMisconfiguration, P as buildMachineDeps } from './run-
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { F as resolveModel, O as describeMisconfiguration, P as buildMachineDeps } from './run-9C2ogsuu.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-BHWq1P8E.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-9C2ogsuu.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -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-CdcXdQde.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-BHWq1P8E.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-B5rek8XG.mjs');
|
|
3040
3040
|
const timeout = c.reply?.timeout_sec || 120;
|
|
3041
3041
|
let result;
|
|
3042
3042
|
try {
|
|
@@ -9998,6 +9998,21 @@ function createSvampConfigChecker(directory, sessionId, getMetadata, setMetadata
|
|
|
9998
9998
|
logger.log(`[svampConfig] Session link updated: "${label}" \u2192 ${url}`);
|
|
9999
9999
|
}
|
|
10000
10000
|
}
|
|
10001
|
+
if (config.crew === null) {
|
|
10002
|
+
if (meta.crew) {
|
|
10003
|
+
setMetadata((m) => {
|
|
10004
|
+
const next = { ...m };
|
|
10005
|
+
delete next.crew;
|
|
10006
|
+
return next;
|
|
10007
|
+
});
|
|
10008
|
+
logger.log(`[svampConfig] crew role cleared`);
|
|
10009
|
+
}
|
|
10010
|
+
} else if (config.crew && typeof config.crew === "object") {
|
|
10011
|
+
if (JSON.stringify(meta.crew) !== JSON.stringify(config.crew)) {
|
|
10012
|
+
setMetadata((m) => ({ ...m, crew: config.crew }));
|
|
10013
|
+
logger.log(`[svampConfig] crew role updated: ${config.crew.role}`);
|
|
10014
|
+
}
|
|
10015
|
+
}
|
|
10001
10016
|
}
|
|
10002
10017
|
const configChecker = () => {
|
|
10003
10018
|
try {
|
|
@@ -10581,7 +10596,7 @@ async function startDaemon(options) {
|
|
|
10581
10596
|
const list = loadExposedTunnels().filter((t) => t.name !== name);
|
|
10582
10597
|
saveExposedTunnels(list);
|
|
10583
10598
|
}
|
|
10584
|
-
const { ServeManager } = await import('./serveManager-
|
|
10599
|
+
const { ServeManager } = await import('./serveManager-XsXnI804.mjs');
|
|
10585
10600
|
const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
|
|
10586
10601
|
ensureAutoInstalledSkills(logger).catch(() => {
|
|
10587
10602
|
});
|
|
@@ -13093,7 +13108,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
13093
13108
|
const specs = loadExposedTunnels();
|
|
13094
13109
|
if (specs.length === 0) return;
|
|
13095
13110
|
logger.log(`[exposed-tunnels] Restoring ${specs.length} tunnel(s) from ${EXPOSED_TUNNELS_FILE}`);
|
|
13096
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
13111
|
+
const { FrpcTunnel } = await import('./frpc-CdcXdQde.mjs');
|
|
13097
13112
|
for (const spec of specs) {
|
|
13098
13113
|
if (tunnels.has(spec.name)) continue;
|
|
13099
13114
|
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, Q 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, Q as generateHookSettings } from './run-9C2ogsuu.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-B5rek8XG.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-B5rek8XG.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-B5rek8XG.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-B5rek8XG.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-B5rek8XG.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-9C2ogsuu.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-CdcXdQde.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-9C2ogsuu.mjs';
|
|
2
2
|
import 'node:child_process';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|