svamp-cli 0.2.207 → 0.2.208
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/bin/stop-gate.mjs +2 -30
- package/bin/skills/loop/test/test-loop-gate.mjs +12 -65
- package/dist/{agentCommands-BSaoLPO_.mjs → agentCommands-CVWo8yPD.mjs} +5 -5
- package/dist/{auth-Behk8m8n.mjs → auth-_TflpNT8.mjs} +1 -1
- package/dist/cli.mjs +63 -61
- package/dist/{commands-yMEYWNDW.mjs → commands-1g_moi9a.mjs} +1 -1
- package/dist/{commands-CXrlYmu9.mjs → commands-BOnJ4i5s.mjs} +2 -2
- package/dist/{commands-CaT6IgiY.mjs → commands-BQ6onHxp.mjs} +2 -2
- package/dist/{commands-CI9WGg34.mjs → commands-CBwu-xas.mjs} +6 -1
- package/dist/{commands-VFstSv8U.mjs → commands-Cgiu5rqe.mjs} +1 -1
- package/dist/{commands-DvuFTSEF.mjs → commands-DIvRihhh.mjs} +5 -5
- package/dist/{commands-CqHcpDYQ.mjs → commands-y6pREjHy.mjs} +1 -1
- package/dist/{fleet-Evgqqw66.mjs → fleet-C30UUFhy.mjs} +1 -1
- package/dist/{frpc-_v1in_1L.mjs → frpc-B5cfTJlA.mjs} +1 -1
- package/dist/{headlessCli-C3tETysU.mjs → headlessCli-CctBAyHF.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{package-8HPAx9Ry.mjs → package-CnEYOFQt.mjs} +1 -1
- package/dist/{rpc-Ci-Ge4tu.mjs → rpc-DSoOVh7M.mjs} +1 -1
- package/dist/{rpc-BkpMe22P.mjs → rpc-Dpyy1lrt.mjs} +1 -1
- package/dist/{run-DBd-1Pll.mjs → run-BSBuPJdb.mjs} +1 -1
- package/dist/{run-9H6Of0HT.mjs → run-Cc0vbRpn.mjs} +14 -11
- package/dist/{scheduler-C7_ILALz.mjs → scheduler-B3C7f443.mjs} +1 -1
- package/dist/{serveCommands-CBBsb9Ct.mjs → serveCommands-D6MEN05Z.mjs} +5 -5
- package/dist/{serveManager-DLgPs76r.mjs → serveManager-_08XeGmm.mjs} +2 -2
- package/dist/{sideband-_ZCZ7bLW.mjs → sideband-D_Ee4j96.mjs} +1 -1
- package/package.json +1 -1
|
@@ -256,42 +256,14 @@ const giveUp = overIters || overTime || overTokens;
|
|
|
256
256
|
const tokenField = maxTokens ? { tokens_used: tokensUsed } : {};
|
|
257
257
|
|
|
258
258
|
if (giveUp) {
|
|
259
|
+
// Bounded out: let it stop so we never block forever. (Single state write.)
|
|
259
260
|
const why = overTokens ? `token budget (${tokensUsed}/${maxTokens} tokens)`
|
|
260
261
|
: overTime ? `runtime budget (${cfg.budget.max_runtime_sec}s)`
|
|
261
262
|
: `max_iterations (${max})`;
|
|
262
|
-
const limitName = overTokens ? 'token budget' : overTime ? 'runtime budget' : 'iteration limit';
|
|
263
|
-
// #0156: reaching the cap here means the exit conditions are NOT met (the `done` path above
|
|
264
|
-
// already handled the met case) — i.e. work is STILL REMAINING. Going silently dormant
|
|
265
|
-
// (active:false) makes a STALL indistinguishable from 'completed' (idle-pike's 11h-dormant bug).
|
|
266
|
-
// So block ONCE to make the agent surface the stall LOUDLY + offer extend/resume <options>;
|
|
267
|
-
// then on the next stop allow it (a stall must never trap the loop forever).
|
|
268
|
-
if (!state.stall_hinted) {
|
|
269
|
-
writeJSONAtomic(STATE, { ...state, iteration: nextIter, stall_hinted: true,
|
|
270
|
-
last_iteration_at: now, last_oracle: oracleDetail, ...tokenField });
|
|
271
|
-
appendHistory({ ts: now, iteration: nextIter, decision: 'stall_hint', reason: why, oracle: oraclePass, detail: oracleDetail });
|
|
272
|
-
const suggested = (overIters && max != null) ? Math.max(max * 2, nextIter + 10) : null;
|
|
273
|
-
const sess = SID || '<session>';
|
|
274
|
-
const resumeCmd = suggested != null
|
|
275
|
-
? `svamp session loop ${sess} --max ${suggested}`
|
|
276
|
-
: `svamp session loop ${sess} --budget <bigger>`;
|
|
277
|
-
const firstLine = String(oracleDetail || 'oracle still failing').split('\n')[0];
|
|
278
|
-
block(
|
|
279
|
-
`⚠️ LOOP STALLED — hit the ${limitName} (${why}) but the exit conditions are NOT met: ${firstLine}. `
|
|
280
|
-
+ `Work is still remaining; do NOT keep grinding, and do NOT just stop silently. In ONE final message:\n`
|
|
281
|
-
+ `1) Tell the user the loop hit its ${limitName} with work still pending, and briefly why it didn't finish.\n`
|
|
282
|
-
+ `2) Present clickable options so they can extend+resume or stop — exactly like:\n`
|
|
283
|
-
+ `<options>\n`
|
|
284
|
-
+ ` <option>Extend the limit${suggested != null ? ` to ${suggested}` : ''} and resume the loop</option>\n`
|
|
285
|
-
+ ` <option>Stop the loop here</option>\n`
|
|
286
|
-
+ `</options>\n`
|
|
287
|
-
+ `If the user picks an extend option, run: ${resumeCmd} (this reactivates + extends the loop). Then end your turn.`,
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
// Already surfaced the stall once → allow stop so it can never trap the loop.
|
|
291
263
|
writeJSONAtomic(STATE, { ...state, active: false, phase: 'gave_up', iteration: nextIter,
|
|
292
264
|
completed_at: now, last_oracle: oracleDetail, gave_up_reason: why, ...tokenField });
|
|
293
265
|
appendHistory({ ts: now, iteration: nextIter, decision: 'gave_up', reason: why, oracle: oraclePass, detail: oracleDetail });
|
|
294
|
-
process.stderr.write(`[loop] reached ${why}; allowing stop
|
|
266
|
+
process.stderr.write(`[loop] reached ${why}; allowing stop.\n`);
|
|
295
267
|
allow();
|
|
296
268
|
}
|
|
297
269
|
|
|
@@ -113,21 +113,13 @@ try {
|
|
|
113
113
|
ok(!r.blocked, 'gate allows when evaluator off and oracle passes');
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
// ---- Test 7: max_iterations bound ->
|
|
117
|
-
console.log('Test 7: max_iterations
|
|
116
|
+
// ---- Test 7: max_iterations bound -> eventually allows (never infinite) ----
|
|
117
|
+
console.log('Test 7: max_iterations prevents infinite blocking');
|
|
118
118
|
{ const d = newProject({ evaluator: 'off', max: 1 }); dirs.push(d); // oracle keeps failing (answer.txt=TODO)
|
|
119
|
-
const r1 = runGate(d); // iteration -> 1, block
|
|
120
|
-
const r2 = runGate(d, true); // iteration -> 2 > max ->
|
|
121
|
-
const r3 = runGate(d, true); // already hinted -> give up, allow
|
|
119
|
+
const r1 = runGate(d); // iteration -> 1, block
|
|
120
|
+
const r2 = runGate(d, true); // iteration -> 2 > max -> give up, allow
|
|
122
121
|
ok(r1.blocked, 'first failing attempt blocks');
|
|
123
|
-
|
|
124
|
-
// (don't go silently dormant), presenting extend/resume <options>.
|
|
125
|
-
ok(r2.blocked, '#0156: exceeding max_iterations blocks ONCE with a stall hint (not silent)');
|
|
126
|
-
ok(/STALL/i.test(r2.reason) && /<options>/.test(r2.reason), '#0156: stall hint explains + presents <options>');
|
|
127
|
-
ok(/loop .* --max/.test(r2.reason), '#0156: stall hint gives the resume+extend command');
|
|
128
|
-
ok(readState(d).stall_hinted === true, '#0156: state records stall_hinted after the hint');
|
|
129
|
-
ok(!r3.blocked, 'after the stall hint the gate allows stop (no infinite loop)');
|
|
130
|
-
ok(readState(d).phase === 'gave_up' && readState(d).active === false, 'finally marked gave_up/inactive');
|
|
122
|
+
ok(!r2.blocked, 'after exceeding max_iterations the gate allows stop (no infinite loop)');
|
|
131
123
|
}
|
|
132
124
|
|
|
133
125
|
// ---- Test 8: inactive loop -> no-op allow ----
|
|
@@ -160,10 +152,8 @@ try {
|
|
|
160
152
|
const cfg = JSON.parse(readFileSync(cfgP, 'utf8')); cfg.budget = { max_runtime_sec: 1 }; writeFileSync(cfgP, JSON.stringify(cfg));
|
|
161
153
|
const spP = join(d, '.svamp', SID, 'loop', 'loop-state.json');
|
|
162
154
|
const sp = JSON.parse(readFileSync(spP, 'utf8')); sp.started_at = new Date(Date.now() - 5000).toISOString(); writeFileSync(spP, JSON.stringify(sp));
|
|
163
|
-
const r = runGate(d);
|
|
164
|
-
|
|
165
|
-
ok(r.blocked && /STALL/i.test(r.reason), 'runtime over-budget surfaces a stall hint first (not silent)');
|
|
166
|
-
ok(!r2.blocked, 'gate allows stop once runtime budget is exceeded (after the stall hint)');
|
|
155
|
+
const r = runGate(d);
|
|
156
|
+
ok(!r.blocked, 'gate allows stop once runtime budget is exceeded');
|
|
167
157
|
ok(readState(d).gave_up_reason?.includes('runtime'), 'state records runtime give-up reason');
|
|
168
158
|
}
|
|
169
159
|
|
|
@@ -190,10 +180,8 @@ try {
|
|
|
190
180
|
JSON.stringify({ message: { usage: { input_tokens: 400, output_tokens: 300 } } }),
|
|
191
181
|
JSON.stringify({ message: { usage: { input_tokens: 500, output_tokens: 200, cache_read_input_tokens: 50 } } }),
|
|
192
182
|
].join('\n')); // total = 1450 > 1000
|
|
193
|
-
const r = runGate(d, false, tp);
|
|
194
|
-
|
|
195
|
-
ok(r.blocked && /STALL/i.test(r.reason), 'token over-budget surfaces a stall hint first (not silent)');
|
|
196
|
-
ok(!r2.blocked, 'gate allows stop once token budget is exceeded (after the stall hint)');
|
|
183
|
+
const r = runGate(d, false, tp);
|
|
184
|
+
ok(!r.blocked, 'gate allows stop once token budget is exceeded');
|
|
197
185
|
ok(readState(d).gave_up_reason?.includes('token'), 'state records token give-up reason');
|
|
198
186
|
ok(readState(d).tokens_used === 1450, 'tokens summed from transcript');
|
|
199
187
|
}
|
|
@@ -205,10 +193,8 @@ try {
|
|
|
205
193
|
const cfg = JSON.parse(readFileSync(cfgP, 'utf8')); cfg.max_iterations = null; writeFileSync(cfgP, JSON.stringify(cfg));
|
|
206
194
|
const spP = join(d, '.svamp', SID, 'loop', 'loop-state.json');
|
|
207
195
|
const sp = JSON.parse(readFileSync(spP, 'utf8')); sp.iteration = 200; writeFileSync(spP, JSON.stringify(sp)); // at the hard ceiling
|
|
208
|
-
const r = runGate(d);
|
|
209
|
-
|
|
210
|
-
ok(r.blocked && /STALL/i.test(r.reason), 'hard-ceiling hit surfaces a stall hint first');
|
|
211
|
-
ok(!r2.blocked, 'gate allows stop at the hard fallback ceiling even with null max_iterations');
|
|
196
|
+
const r = runGate(d);
|
|
197
|
+
ok(!r.blocked, 'gate allows stop at the hard fallback ceiling even with null max_iterations');
|
|
212
198
|
}
|
|
213
199
|
|
|
214
200
|
// ---- Test 14: non-git project fingerprint is content-sensitive (CRITICAL #1) ----
|
|
@@ -239,8 +225,7 @@ try {
|
|
|
239
225
|
const cfg = JSON.parse(readFileSync(cfgP, 'utf8')); cfg.max_iterations = 1e9; writeFileSync(cfgP, JSON.stringify(cfg));
|
|
240
226
|
const spP = join(d, '.svamp', SID, 'loop', 'loop-state.json');
|
|
241
227
|
const sp = JSON.parse(readFileSync(spP, 'utf8')); sp.iteration = 201; writeFileSync(spP, JSON.stringify(sp));
|
|
242
|
-
runGate(d);
|
|
243
|
-
const r = runGate(d); // then allow
|
|
228
|
+
const r = runGate(d);
|
|
244
229
|
ok(!r.blocked && /max_iterations \(200\)/.test(readState(d).gave_up_reason || ''), 'max_iterations 1e9 clamped to 200 → gives up');
|
|
245
230
|
}
|
|
246
231
|
|
|
@@ -389,44 +374,6 @@ try {
|
|
|
389
374
|
ok(!r.blocked && readState(d).phase === 'done', 'all-handled inbox allows the loop to complete');
|
|
390
375
|
}
|
|
391
376
|
|
|
392
|
-
// ---- Test 25: NON-URGENT inbox hint at settle — blocks ONCE, then allows (de-duped) (#0146) ----
|
|
393
|
-
console.log('Test 25: non-urgent inbox hint blocks once at settle, then allows (de-duped)');
|
|
394
|
-
{ const d = newProject({ evaluator: 'on' }); dirs.push(d);
|
|
395
|
-
writeFileSync(join(d, 'answer.txt'), 'DONE\n'); // oracle passes
|
|
396
|
-
writeVerdict(d, { verdict: 'done', reason: 'ok', state_fp: fp(d) });
|
|
397
|
-
// Disable the #0103 urgent/unhandled guard so we exercise the non-urgent hint in isolation
|
|
398
|
-
// (otherwise the #0103 guard would block first on the same genuinely-pending message).
|
|
399
|
-
const cfgP = join(d, '.svamp', SID, 'loop', 'loop.config.json');
|
|
400
|
-
writeFileSync(cfgP, JSON.stringify({ ...JSON.parse(readFileSync(cfgP, 'utf8')), inbox_guard: false }));
|
|
401
|
-
// A genuinely-unseen (read=false, handled=false), non-urgent, non-awaiting-reply message.
|
|
402
|
-
writeFileSync(join(d, '.svamp', SID, 'inbox.json'), JSON.stringify([
|
|
403
|
-
{ messageId: 'n1', from: 'agent:peer', subject: 'fyi', read: false, handled: false, urgency: 'normal' },
|
|
404
|
-
]));
|
|
405
|
-
const r1 = runGate(d);
|
|
406
|
-
ok(r1.blocked && /unread inbox message/i.test(r1.reason), 'non-urgent unread message hints (blocks once) at the settle point');
|
|
407
|
-
ok(/fyi/.test(r1.reason), 'hint names the subject');
|
|
408
|
-
const hinted = JSON.parse(readFileSync(join(d, '.svamp', SID, 'loop', 'hinted-inbox.json'), 'utf8'));
|
|
409
|
-
ok(hinted.includes('n1'), 'hinted id recorded for de-dupe');
|
|
410
|
-
// Second settle: same message id already hinted → allows the loop to end (non-blocking thereafter).
|
|
411
|
-
const r2 = runGate(d);
|
|
412
|
-
ok(!r2.blocked && readState(d).phase === 'done', 'already-hinted message does not re-block — loop completes');
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// ---- Test 26: urgent + awaiting-reply messages are NOT hinted by the non-urgent path (#0146) ----
|
|
416
|
-
console.log('Test 26: urgent / awaiting-reply messages skip the non-urgent hint');
|
|
417
|
-
{ const d = newProject({ evaluator: 'on' }); dirs.push(d);
|
|
418
|
-
writeFileSync(join(d, 'answer.txt'), 'DONE\n');
|
|
419
|
-
writeVerdict(d, { verdict: 'done', reason: 'ok', state_fp: fp(d) });
|
|
420
|
-
// All handled (no #0103 block); one urgent, one awaiting-reply, one already-read → none qualify.
|
|
421
|
-
writeFileSync(join(d, '.svamp', SID, 'inbox.json'), JSON.stringify([
|
|
422
|
-
{ messageId: 'u1', read: false, handled: true, urgency: 'urgent' },
|
|
423
|
-
{ messageId: 'a1', read: false, handled: true, channelId: 'c', correlationId: 'x' },
|
|
424
|
-
{ messageId: 'r1', read: true, handled: true, urgency: 'normal' },
|
|
425
|
-
]));
|
|
426
|
-
const r = runGate(d);
|
|
427
|
-
ok(!r.blocked && readState(d).phase === 'done', 'no qualifying non-urgent unread message → loop completes (no noise)');
|
|
428
|
-
}
|
|
429
|
-
|
|
430
377
|
console.log(`\n${fail === 0 ? '✅' : '❌'} ${pass} passed, ${fail} failed`);
|
|
431
378
|
process.exit(fail === 0 ? 0 : 1);
|
|
432
379
|
} finally {
|
|
@@ -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 { A as shortId } from './run-
|
|
5
|
+
import { A as shortId } from './run-Cc0vbRpn.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-Cc0vbRpn.mjs').then(function (n) { return n.a8; });
|
|
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-CBwu-xas.mjs');
|
|
184
184
|
return connectAndGetMachine();
|
|
185
185
|
}
|
|
186
186
|
function buildInboxMessage(args) {
|
|
@@ -258,7 +258,7 @@ async function inboxSend(targetSessionId, opts) {
|
|
|
258
258
|
console.error("Message body is required.");
|
|
259
259
|
process.exit(1);
|
|
260
260
|
}
|
|
261
|
-
const { connectAndResolveSession } = await import('./commands-
|
|
261
|
+
const { connectAndResolveSession } = await import('./commands-CBwu-xas.mjs');
|
|
262
262
|
let server;
|
|
263
263
|
try {
|
|
264
264
|
const { targetId, messageId } = await inboxSendCore(
|
|
@@ -312,7 +312,7 @@ async function inboxReply(messageId, body) {
|
|
|
312
312
|
console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
|
|
313
313
|
process.exit(1);
|
|
314
314
|
}
|
|
315
|
-
const { connectAndResolveSession } = await import('./commands-
|
|
315
|
+
const { connectAndResolveSession } = await import('./commands-CBwu-xas.mjs');
|
|
316
316
|
const { server: localServer, machine: localMachine } = await connectToMachineService();
|
|
317
317
|
let localDisconnected = false;
|
|
318
318
|
const disconnectLocal = async () => {
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-
|
|
1
|
+
import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-Cc0vbRpn.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-Cc0vbRpn.mjs').then(function (n) { return n.ae; });
|
|
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-Cc0vbRpn.mjs').then(function (n) { return n.ag; });
|
|
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-DIvRihhh.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-D6MEN05Z.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-BQ6onHxp.mjs');
|
|
365
365
|
let machineId;
|
|
366
366
|
const processArgs = args.slice(1);
|
|
367
367
|
const mIdx = processArgs.findIndex((a) => a === "--machine" || a === "-m");
|
|
@@ -375,18 +375,18 @@ async function main() {
|
|
|
375
375
|
}), machineId);
|
|
376
376
|
process.exit(0);
|
|
377
377
|
} else if (subcommand === "issue" || subcommand === "issues") {
|
|
378
|
-
const { issueCommand } = await import('./commands-
|
|
378
|
+
const { issueCommand } = await import('./commands-1g_moi9a.mjs');
|
|
379
379
|
await issueCommand(args.slice(1));
|
|
380
380
|
process.exit(0);
|
|
381
381
|
} else if (subcommand === "workflow" || subcommand === "workflows") {
|
|
382
|
-
const { workflowCommand } = await import('./commands-
|
|
382
|
+
const { workflowCommand } = await import('./commands-y6pREjHy.mjs');
|
|
383
383
|
await workflowCommand(args.slice(1));
|
|
384
384
|
process.exit(0);
|
|
385
385
|
} else if (subcommand === "wise-agent" || subcommand === "wise") {
|
|
386
386
|
await handleWiseAgentCommand(args.slice(1));
|
|
387
387
|
process.exit(0);
|
|
388
388
|
} else if (subcommand === "feature" || subcommand === "crew") {
|
|
389
|
-
const { crewCommand } = await import('./commands-
|
|
389
|
+
const { crewCommand } = await import('./commands-BOnJ4i5s.mjs');
|
|
390
390
|
await crewCommand(args.slice(1));
|
|
391
391
|
process.exit(0);
|
|
392
392
|
} else if (subcommand === "--help" || subcommand === "-h") {
|
|
@@ -394,7 +394,7 @@ async function main() {
|
|
|
394
394
|
} else if (!subcommand || subcommand === "start") {
|
|
395
395
|
await handleInteractiveCommand();
|
|
396
396
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
397
|
-
const pkg = await import('./package-
|
|
397
|
+
const pkg = await import('./package-CnEYOFQt.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
398
398
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
399
399
|
} else {
|
|
400
400
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -403,7 +403,7 @@ async function main() {
|
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
async function handleInteractiveCommand() {
|
|
406
|
-
const { runInteractive } = await import('./run-
|
|
406
|
+
const { runInteractive } = await import('./run-BSBuPJdb.mjs');
|
|
407
407
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
408
408
|
let directory = process.cwd();
|
|
409
409
|
let resumeSessionId;
|
|
@@ -448,7 +448,7 @@ async function handleAgentCommand() {
|
|
|
448
448
|
return;
|
|
449
449
|
}
|
|
450
450
|
if (agentArgs[0] === "list") {
|
|
451
|
-
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-
|
|
451
|
+
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.ab; });
|
|
452
452
|
console.log("Known agents:");
|
|
453
453
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
454
454
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -460,7 +460,7 @@ async function handleAgentCommand() {
|
|
|
460
460
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
461
461
|
return;
|
|
462
462
|
}
|
|
463
|
-
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-
|
|
463
|
+
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.ab; });
|
|
464
464
|
let cwd = process.cwd();
|
|
465
465
|
const filteredArgs = [];
|
|
466
466
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -484,12 +484,12 @@ async function handleAgentCommand() {
|
|
|
484
484
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
485
485
|
let backend;
|
|
486
486
|
if (KNOWN_MCP_AGENTS[config.agentName]) {
|
|
487
|
-
const { CodexMcpBackend } = await import('./run-
|
|
487
|
+
const { CodexMcpBackend } = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.ac; });
|
|
488
488
|
backend = new CodexMcpBackend({ cwd, log: logFn });
|
|
489
489
|
} else {
|
|
490
|
-
const { AcpBackend } = await import('./run-
|
|
491
|
-
const { GeminiTransport } = await import('./run-
|
|
492
|
-
const { DefaultTransport } = await import('./run-
|
|
490
|
+
const { AcpBackend } = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.aa; });
|
|
491
|
+
const { GeminiTransport } = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.ad; });
|
|
492
|
+
const { DefaultTransport } = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.a9; });
|
|
493
493
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
494
494
|
backend = new AcpBackend({
|
|
495
495
|
agentName: config.agentName,
|
|
@@ -616,7 +616,7 @@ async function handleSessionCommand() {
|
|
|
616
616
|
process.exit(1);
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
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-
|
|
619
|
+
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-CBwu-xas.mjs');
|
|
620
620
|
const parseFlagStr = (flag, shortFlag) => {
|
|
621
621
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
622
622
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -684,7 +684,7 @@ async function handleSessionCommand() {
|
|
|
684
684
|
allowDomain.push(sessionArgs[++i]);
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
const { parseShareArg } = await import('./commands-
|
|
687
|
+
const { parseShareArg } = await import('./commands-CBwu-xas.mjs');
|
|
688
688
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
689
689
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
690
690
|
message,
|
|
@@ -771,7 +771,7 @@ async function handleSessionCommand() {
|
|
|
771
771
|
console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
|
|
772
772
|
process.exit(1);
|
|
773
773
|
}
|
|
774
|
-
const { sessionEditMessage } = await import('./commands-
|
|
774
|
+
const { sessionEditMessage } = await import('./commands-CBwu-xas.mjs');
|
|
775
775
|
await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
776
776
|
} else if (sessionSubcommand === "refine") {
|
|
777
777
|
if (!sessionArgs[1] || !sessionArgs[2]) {
|
|
@@ -779,7 +779,7 @@ async function handleSessionCommand() {
|
|
|
779
779
|
console.error(" Asks the agent to revise its latest reply in place (no extra round).");
|
|
780
780
|
process.exit(1);
|
|
781
781
|
}
|
|
782
|
-
const { sessionRefineLastReply } = await import('./commands-
|
|
782
|
+
const { sessionRefineLastReply } = await import('./commands-CBwu-xas.mjs');
|
|
783
783
|
await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
|
|
784
784
|
} else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
|
|
785
785
|
if (!sessionArgs[1]) {
|
|
@@ -787,7 +787,7 @@ async function handleSessionCommand() {
|
|
|
787
787
|
console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
|
|
788
788
|
process.exit(1);
|
|
789
789
|
}
|
|
790
|
-
const { sessionUndoEdit } = await import('./commands-
|
|
790
|
+
const { sessionUndoEdit } = await import('./commands-CBwu-xas.mjs');
|
|
791
791
|
await sessionUndoEdit(sessionArgs[1], targetMachineId);
|
|
792
792
|
} else if (sessionSubcommand === "query") {
|
|
793
793
|
const dir = sessionArgs[1];
|
|
@@ -797,7 +797,7 @@ async function handleSessionCommand() {
|
|
|
797
797
|
console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
|
|
798
798
|
process.exit(1);
|
|
799
799
|
}
|
|
800
|
-
const { sessionQuery } = await import('./commands-
|
|
800
|
+
const { sessionQuery } = await import('./commands-CBwu-xas.mjs');
|
|
801
801
|
await sessionQuery(dir, prompt, targetMachineId, {
|
|
802
802
|
timeout: parseFlagInt("--timeout"),
|
|
803
803
|
json: hasFlag("--json"),
|
|
@@ -830,7 +830,7 @@ async function handleSessionCommand() {
|
|
|
830
830
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
831
831
|
process.exit(1);
|
|
832
832
|
}
|
|
833
|
-
const { sessionApprove } = await import('./commands-
|
|
833
|
+
const { sessionApprove } = await import('./commands-CBwu-xas.mjs');
|
|
834
834
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
835
835
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
836
836
|
json: hasFlag("--json")
|
|
@@ -840,7 +840,7 @@ async function handleSessionCommand() {
|
|
|
840
840
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
841
841
|
process.exit(1);
|
|
842
842
|
}
|
|
843
|
-
const { sessionDeny } = await import('./commands-
|
|
843
|
+
const { sessionDeny } = await import('./commands-CBwu-xas.mjs');
|
|
844
844
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
845
845
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
846
846
|
json: hasFlag("--json")
|
|
@@ -850,7 +850,7 @@ async function handleSessionCommand() {
|
|
|
850
850
|
const maybeTask = sessionArgs[2] && !sessionArgs[2].startsWith("-") ? sessionArgs[2] : void 0;
|
|
851
851
|
const until = parseFlagStr("--until") ?? parseFlagStr("--criteria");
|
|
852
852
|
if (!id || !maybeTask && !until) {
|
|
853
|
-
console.error('Usage: svamp session loop <session-id> ["<task>"] --until "<criteria>" [--oracle "cmd"] [--agent] [--parent <id>] [--max N] [--evaluator on|off]');
|
|
853
|
+
console.error('Usage: svamp session loop <session-id> ["<task>"] --until "<criteria>" [--oracle "cmd"] [--agent] [--parent <id>] [--max N] [--max-tokens-per-hour N] [--evaluator on|off]');
|
|
854
854
|
console.error(" With a task: kicks the agent off and gates it until done.");
|
|
855
855
|
console.error(" With only --until: hot-plugs the gate onto the running session (no kickoff).");
|
|
856
856
|
process.exit(1);
|
|
@@ -862,6 +862,8 @@ async function handleSessionCommand() {
|
|
|
862
862
|
agent: hasFlag("--agent"),
|
|
863
863
|
parent: parseFlagStr("--parent"),
|
|
864
864
|
maxIterations: parseFlagInt("--max") ?? parseFlagInt("--max-iterations") ?? parseFlagInt("--max-rounds"),
|
|
865
|
+
maxTokensPerHour: parseFlagInt("--max-tokens-per-hour"),
|
|
866
|
+
maxRuntimeSec: parseFlagInt("--max-runtime") ?? parseFlagInt("--max-runtime-sec"),
|
|
865
867
|
evaluator: evalStr ? evalStr !== "off" : void 0
|
|
866
868
|
});
|
|
867
869
|
} else if (sessionSubcommand === "loop-cancel") {
|
|
@@ -882,7 +884,7 @@ async function handleSessionCommand() {
|
|
|
882
884
|
console.error("Usage: svamp session set-title <title>");
|
|
883
885
|
process.exit(1);
|
|
884
886
|
}
|
|
885
|
-
const { sessionSetTitle } = await import('./agentCommands-
|
|
887
|
+
const { sessionSetTitle } = await import('./agentCommands-CVWo8yPD.mjs');
|
|
886
888
|
await sessionSetTitle(title);
|
|
887
889
|
} else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
|
|
888
890
|
const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
@@ -890,7 +892,7 @@ async function handleSessionCommand() {
|
|
|
890
892
|
console.error("Usage: svamp session set-project-description <text>");
|
|
891
893
|
process.exit(1);
|
|
892
894
|
}
|
|
893
|
-
const { sessionSetProjectDescription } = await import('./agentCommands-
|
|
895
|
+
const { sessionSetProjectDescription } = await import('./agentCommands-CVWo8yPD.mjs');
|
|
894
896
|
await sessionSetProjectDescription(desc);
|
|
895
897
|
} else if (sessionSubcommand === "set-link") {
|
|
896
898
|
const url = sessionArgs[1];
|
|
@@ -899,7 +901,7 @@ async function handleSessionCommand() {
|
|
|
899
901
|
process.exit(1);
|
|
900
902
|
}
|
|
901
903
|
const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
902
|
-
const { sessionSetLink } = await import('./agentCommands-
|
|
904
|
+
const { sessionSetLink } = await import('./agentCommands-CVWo8yPD.mjs');
|
|
903
905
|
await sessionSetLink(url, label);
|
|
904
906
|
} else if (sessionSubcommand === "notify") {
|
|
905
907
|
const message = sessionArgs[1];
|
|
@@ -908,7 +910,7 @@ async function handleSessionCommand() {
|
|
|
908
910
|
process.exit(1);
|
|
909
911
|
}
|
|
910
912
|
const level = parseFlagStr("--level") || "info";
|
|
911
|
-
const { sessionNotify } = await import('./agentCommands-
|
|
913
|
+
const { sessionNotify } = await import('./agentCommands-CVWo8yPD.mjs');
|
|
912
914
|
await sessionNotify(message, level);
|
|
913
915
|
} else if (sessionSubcommand === "broadcast") {
|
|
914
916
|
const action = sessionArgs[1];
|
|
@@ -916,7 +918,7 @@ async function handleSessionCommand() {
|
|
|
916
918
|
console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
|
|
917
919
|
process.exit(1);
|
|
918
920
|
}
|
|
919
|
-
const { sessionBroadcast } = await import('./agentCommands-
|
|
921
|
+
const { sessionBroadcast } = await import('./agentCommands-CVWo8yPD.mjs');
|
|
920
922
|
await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
|
|
921
923
|
} else if (sessionSubcommand === "inbox") {
|
|
922
924
|
const inboxSubcmd = sessionArgs[1];
|
|
@@ -927,7 +929,7 @@ async function handleSessionCommand() {
|
|
|
927
929
|
process.exit(1);
|
|
928
930
|
}
|
|
929
931
|
if (agentSessionId) {
|
|
930
|
-
const { inboxSend } = await import('./agentCommands-
|
|
932
|
+
const { inboxSend } = await import('./agentCommands-CVWo8yPD.mjs');
|
|
931
933
|
await inboxSend(sessionArgs[2], {
|
|
932
934
|
body: sessionArgs[3],
|
|
933
935
|
subject: parseFlagStr("--subject"),
|
|
@@ -942,7 +944,7 @@ async function handleSessionCommand() {
|
|
|
942
944
|
}
|
|
943
945
|
} else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
|
|
944
946
|
if (agentSessionId && !sessionArgs[2]) {
|
|
945
|
-
const { inboxList } = await import('./agentCommands-
|
|
947
|
+
const { inboxList } = await import('./agentCommands-CVWo8yPD.mjs');
|
|
946
948
|
await inboxList({
|
|
947
949
|
unread: hasFlag("--unread"),
|
|
948
950
|
limit: parseFlagInt("--limit"),
|
|
@@ -964,7 +966,7 @@ async function handleSessionCommand() {
|
|
|
964
966
|
process.exit(1);
|
|
965
967
|
}
|
|
966
968
|
if (agentSessionId && !sessionArgs[3]) {
|
|
967
|
-
const { inboxList } = await import('./agentCommands-
|
|
969
|
+
const { inboxList } = await import('./agentCommands-CVWo8yPD.mjs');
|
|
968
970
|
await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
|
|
969
971
|
} else if (sessionArgs[3]) {
|
|
970
972
|
await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
|
|
@@ -974,7 +976,7 @@ async function handleSessionCommand() {
|
|
|
974
976
|
}
|
|
975
977
|
} else if (inboxSubcmd === "reply") {
|
|
976
978
|
if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
|
|
977
|
-
const { inboxReply } = await import('./agentCommands-
|
|
979
|
+
const { inboxReply } = await import('./agentCommands-CVWo8yPD.mjs');
|
|
978
980
|
await inboxReply(sessionArgs[2], sessionArgs[3]);
|
|
979
981
|
} else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
|
|
980
982
|
await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
|
|
@@ -1012,7 +1014,7 @@ async function handleMachineCommand() {
|
|
|
1012
1014
|
return;
|
|
1013
1015
|
}
|
|
1014
1016
|
if (machineSubcommand === "share") {
|
|
1015
|
-
const { machineShare } = await import('./commands-
|
|
1017
|
+
const { machineShare } = await import('./commands-CBwu-xas.mjs');
|
|
1016
1018
|
let machineId;
|
|
1017
1019
|
const shareArgs = [];
|
|
1018
1020
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -1063,14 +1065,14 @@ async function handleMachineCommand() {
|
|
|
1063
1065
|
process.exit(1);
|
|
1064
1066
|
}
|
|
1065
1067
|
if (all) {
|
|
1066
|
-
const { fleetExec } = await import('./fleet-
|
|
1068
|
+
const { fleetExec } = await import('./fleet-C30UUFhy.mjs');
|
|
1067
1069
|
await fleetExec(command, { cwd });
|
|
1068
1070
|
} else {
|
|
1069
|
-
const { machineExec } = await import('./commands-
|
|
1071
|
+
const { machineExec } = await import('./commands-CBwu-xas.mjs');
|
|
1070
1072
|
await machineExec(machineId, command, cwd);
|
|
1071
1073
|
}
|
|
1072
1074
|
} else if (machineSubcommand === "info") {
|
|
1073
|
-
const { machineInfo } = await import('./commands-
|
|
1075
|
+
const { machineInfo } = await import('./commands-CBwu-xas.mjs');
|
|
1074
1076
|
let machineId;
|
|
1075
1077
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
1076
1078
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -1090,10 +1092,10 @@ async function handleMachineCommand() {
|
|
|
1090
1092
|
level = machineArgs[++i];
|
|
1091
1093
|
}
|
|
1092
1094
|
}
|
|
1093
|
-
const { machineNotify } = await import('./agentCommands-
|
|
1095
|
+
const { machineNotify } = await import('./agentCommands-CVWo8yPD.mjs');
|
|
1094
1096
|
await machineNotify(message, level);
|
|
1095
1097
|
} else if (machineSubcommand === "ls") {
|
|
1096
|
-
const { machineLs } = await import('./commands-
|
|
1098
|
+
const { machineLs } = await import('./commands-CBwu-xas.mjs');
|
|
1097
1099
|
let machineId;
|
|
1098
1100
|
let showHidden = false;
|
|
1099
1101
|
let path;
|
|
@@ -1149,20 +1151,20 @@ Examples:
|
|
|
1149
1151
|
};
|
|
1150
1152
|
const hasFlag = (name) => fleetArgs.includes(`--${name}`);
|
|
1151
1153
|
if (sub === "status") {
|
|
1152
|
-
const { fleetStatus } = await import('./fleet-
|
|
1154
|
+
const { fleetStatus } = await import('./fleet-C30UUFhy.mjs');
|
|
1153
1155
|
await fleetStatus();
|
|
1154
1156
|
} else if (sub === "upgrade-claude") {
|
|
1155
|
-
const { fleetUpgradeClaude } = await import('./fleet-
|
|
1157
|
+
const { fleetUpgradeClaude } = await import('./fleet-C30UUFhy.mjs');
|
|
1156
1158
|
await fleetUpgradeClaude({ version: flag("version", "-v") });
|
|
1157
1159
|
} else if (sub === "upgrade-svamp") {
|
|
1158
|
-
const { fleetUpgradeSvamp } = await import('./fleet-
|
|
1160
|
+
const { fleetUpgradeSvamp } = await import('./fleet-C30UUFhy.mjs');
|
|
1159
1161
|
await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
|
|
1160
1162
|
} else if (sub === "daemon-restart") {
|
|
1161
|
-
const { fleetDaemonRestart } = await import('./fleet-
|
|
1163
|
+
const { fleetDaemonRestart } = await import('./fleet-C30UUFhy.mjs');
|
|
1162
1164
|
await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
|
|
1163
1165
|
} else if (sub === "push-skill") {
|
|
1164
1166
|
const name = fleetArgs[1];
|
|
1165
|
-
const { fleetPushSkill } = await import('./fleet-
|
|
1167
|
+
const { fleetPushSkill } = await import('./fleet-C30UUFhy.mjs');
|
|
1166
1168
|
await fleetPushSkill(name);
|
|
1167
1169
|
} else {
|
|
1168
1170
|
console.error(`Unknown fleet subcommand: ${sub}`);
|
|
@@ -1178,7 +1180,7 @@ async function handleSkillsCommand() {
|
|
|
1178
1180
|
await printSkillsHelp();
|
|
1179
1181
|
return;
|
|
1180
1182
|
}
|
|
1181
|
-
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-
|
|
1183
|
+
const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-Cgiu5rqe.mjs');
|
|
1182
1184
|
if (skillsSubcommand === "find" || skillsSubcommand === "search") {
|
|
1183
1185
|
const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
|
|
1184
1186
|
if (!query) {
|
|
@@ -1225,7 +1227,7 @@ async function loginToHypha() {
|
|
|
1225
1227
|
process.exit(1);
|
|
1226
1228
|
}
|
|
1227
1229
|
const anchor = anchorArg.replace(/\/+$/, "");
|
|
1228
|
-
const { loadInstanceConfig } = await import('./run-
|
|
1230
|
+
const { loadInstanceConfig } = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.ae; });
|
|
1229
1231
|
let cfg = null;
|
|
1230
1232
|
try {
|
|
1231
1233
|
cfg = await loadInstanceConfig({ anchor, force: true });
|
|
@@ -1336,7 +1338,7 @@ async function logoutFromHypha() {
|
|
|
1336
1338
|
} catch {
|
|
1337
1339
|
}
|
|
1338
1340
|
try {
|
|
1339
|
-
const { clearInstanceConfigCache } = await import('./run-
|
|
1341
|
+
const { clearInstanceConfigCache } = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.ae; });
|
|
1340
1342
|
clearInstanceConfigCache();
|
|
1341
1343
|
} catch {
|
|
1342
1344
|
}
|
|
@@ -1674,7 +1676,7 @@ async function applyClaudeAuthFlags(argv) {
|
|
|
1674
1676
|
"--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
|
|
1675
1677
|
);
|
|
1676
1678
|
}
|
|
1677
|
-
const mod = await import('./run-
|
|
1679
|
+
const mod = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.a7; });
|
|
1678
1680
|
if (hasHypha) {
|
|
1679
1681
|
let url;
|
|
1680
1682
|
const hyphaIdx = argv.indexOf("--use-hypha-proxy");
|
|
@@ -1728,7 +1730,7 @@ async function applyDaemonShareFlag(argv) {
|
|
|
1728
1730
|
}
|
|
1729
1731
|
}
|
|
1730
1732
|
if (collected.length === 0) return;
|
|
1731
|
-
const { updateEnvFile } = await import('./run-
|
|
1733
|
+
const { updateEnvFile } = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.a7; });
|
|
1732
1734
|
const seen = /* @__PURE__ */ new Set();
|
|
1733
1735
|
const deduped = collected.filter((e) => {
|
|
1734
1736
|
const k = e.toLowerCase();
|
|
@@ -1761,7 +1763,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1761
1763
|
}
|
|
1762
1764
|
});
|
|
1763
1765
|
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(" ");
|
|
1764
|
-
const { wiseAskCli } = await import('./commands-
|
|
1766
|
+
const { wiseAskCli } = await import('./commands-CBwu-xas.mjs');
|
|
1765
1767
|
await wiseAskCli(machineId, message, sessionId, { json });
|
|
1766
1768
|
return;
|
|
1767
1769
|
}
|
|
@@ -1773,7 +1775,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1773
1775
|
}
|
|
1774
1776
|
return void 0;
|
|
1775
1777
|
};
|
|
1776
|
-
const { runWiseVoiceCli } = await import('./headlessCli-
|
|
1778
|
+
const { runWiseVoiceCli } = await import('./headlessCli-CctBAyHF.mjs');
|
|
1777
1779
|
await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
|
|
1778
1780
|
return;
|
|
1779
1781
|
}
|
|
@@ -1791,7 +1793,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1791
1793
|
const mode = valueOf(["--mode"]);
|
|
1792
1794
|
const mission = valueOf(["--mission"]);
|
|
1793
1795
|
const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
|
|
1794
|
-
const { wiseJoinMeetingCli } = await import('./commands-
|
|
1796
|
+
const { wiseJoinMeetingCli } = await import('./commands-CBwu-xas.mjs');
|
|
1795
1797
|
await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
|
|
1796
1798
|
return;
|
|
1797
1799
|
}
|
|
@@ -1803,7 +1805,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1803
1805
|
}
|
|
1804
1806
|
return void 0;
|
|
1805
1807
|
};
|
|
1806
|
-
const { wiseLeaveMeetingCli } = await import('./commands-
|
|
1808
|
+
const { wiseLeaveMeetingCli } = await import('./commands-CBwu-xas.mjs');
|
|
1807
1809
|
await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
|
|
1808
1810
|
return;
|
|
1809
1811
|
}
|
|
@@ -1827,7 +1829,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1827
1829
|
}
|
|
1828
1830
|
});
|
|
1829
1831
|
const text = rest.slice(1).map((a, idx) => ({ a, idx: idx + 1 })).filter(({ a, idx }) => !a.startsWith("-") && !consumed.has(String(idx))).map(({ a }) => a).join(" ");
|
|
1830
|
-
const { wiseAnnounceCli } = await import('./commands-
|
|
1832
|
+
const { wiseAnnounceCli } = await import('./commands-CBwu-xas.mjs');
|
|
1831
1833
|
await wiseAnnounceCli(machineId, text, sessionId, { json });
|
|
1832
1834
|
return;
|
|
1833
1835
|
}
|
|
@@ -1839,7 +1841,7 @@ async function handleWiseAgentCommand(rest) {
|
|
|
1839
1841
|
}
|
|
1840
1842
|
return void 0;
|
|
1841
1843
|
};
|
|
1842
|
-
const { wiseMeetingsCli } = await import('./commands-
|
|
1844
|
+
const { wiseMeetingsCli } = await import('./commands-CBwu-xas.mjs');
|
|
1843
1845
|
await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
|
|
1844
1846
|
return;
|
|
1845
1847
|
}
|
|
@@ -1889,7 +1891,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1889
1891
|
return;
|
|
1890
1892
|
}
|
|
1891
1893
|
const authArgs = rest.slice(1);
|
|
1892
|
-
const mod = await import('./auth-
|
|
1894
|
+
const mod = await import('./auth-_TflpNT8.mjs');
|
|
1893
1895
|
let action;
|
|
1894
1896
|
try {
|
|
1895
1897
|
action = mod.parseWiseAgentAuthArgs(authArgs);
|
|
@@ -1899,7 +1901,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1899
1901
|
return;
|
|
1900
1902
|
}
|
|
1901
1903
|
if (action) {
|
|
1902
|
-
const { updateEnvFile } = await import('./run-
|
|
1904
|
+
const { updateEnvFile } = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.a7; });
|
|
1903
1905
|
const updates = mod.buildWiseAgentEnvUpdates(action);
|
|
1904
1906
|
updateEnvFile(updates);
|
|
1905
1907
|
for (const [k, v] of Object.entries(updates)) {
|
|
@@ -1913,7 +1915,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
|
|
|
1913
1915
|
}
|
|
1914
1916
|
async function handleDaemonAuthCommand(argv) {
|
|
1915
1917
|
const sub = (argv[0] || "status").toLowerCase();
|
|
1916
|
-
const mod = await import('./run-
|
|
1918
|
+
const mod = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.a7; });
|
|
1917
1919
|
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
1918
1920
|
console.log(`
|
|
1919
1921
|
svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
|
|
@@ -2226,7 +2228,7 @@ Examples:
|
|
|
2226
2228
|
async function printSkillsHelp() {
|
|
2227
2229
|
let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
|
|
2228
2230
|
try {
|
|
2229
|
-
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-
|
|
2231
|
+
const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-Cc0vbRpn.mjs').then(function (n) { return n.af; });
|
|
2230
2232
|
browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
|
|
2231
2233
|
} catch {
|
|
2232
2234
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
|
-
import { m as resolveProjectRoot, w as searchIssues, v as listIssues, o as resumeIssue, p as pauseIssue, q as addComment, u as updateIssue, n as getIssue, x as isVisibleTo, z as summarize, t as addIssue } from './run-
|
|
2
|
+
import { m as resolveProjectRoot, w as searchIssues, v as listIssues, o as resumeIssue, p as pauseIssue, q as addComment, u as updateIssue, n as getIssue, x as isVisibleTo, z as summarize, t as addIssue } from './run-Cc0vbRpn.mjs';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
import 'fs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
|
-
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-
|
|
3
|
+
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-CBwu-xas.mjs';
|
|
4
4
|
import { execSync } from 'node:child_process';
|
|
5
|
-
import { u as updateIssue, q as addComment, t as addIssue, A as shortId } from './run-
|
|
5
|
+
import { u as updateIssue, q as addComment, t as addIssue, A as shortId } from './run-Cc0vbRpn.mjs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
@@ -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-CBwu-xas.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-Cc0vbRpn.mjs';
|
|
9
9
|
import 'os';
|
|
10
10
|
import 'fs/promises';
|
|
11
11
|
import 'url';
|
|
@@ -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 { Q as formatHandle, T as normalizeAllowedUser, U as loadSecurityContextConfig, V as resolveSecurityContext, W as buildSecurityContextFromFlags, X as mergeSecurityContexts, c as connectToHypha, Y as buildSessionShareUrl, Z as computeOutboundHop, A as shortId, _ as buildMachineShareUrl, $ as parseHandle, a0 as handleMatchesMetadata } from './run-
|
|
5
|
+
import { Q as formatHandle, T as normalizeAllowedUser, U as loadSecurityContextConfig, V as resolveSecurityContext, W as buildSecurityContextFromFlags, X as mergeSecurityContexts, c as connectToHypha, Y as buildSessionShareUrl, Z as computeOutboundHop, A as shortId, _ as buildMachineShareUrl, $ as parseHandle, a0 as handleMatchesMetadata } from './run-Cc0vbRpn.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -2509,6 +2509,10 @@ async function sessionLoopStart(sessionIdPartial, task, machineId, opts) {
|
|
|
2509
2509
|
const isStart = !!(task || until);
|
|
2510
2510
|
const maxIterations = opts?.maxIterations ?? (isStart ? 20 : void 0);
|
|
2511
2511
|
const evaluator = opts?.agent ? true : opts?.evaluator !== false;
|
|
2512
|
+
const budget = opts?.maxTokensPerHour || opts?.maxRuntimeSec ? {
|
|
2513
|
+
...opts?.maxTokensPerHour ? { max_tokens_per_hour: opts.maxTokensPerHour } : {},
|
|
2514
|
+
...opts?.maxRuntimeSec ? { max_runtime_sec: opts.maxRuntimeSec } : {}
|
|
2515
|
+
} : void 0;
|
|
2512
2516
|
await svc.updateConfig({
|
|
2513
2517
|
loop: {
|
|
2514
2518
|
...task ? { task } : {},
|
|
@@ -2516,6 +2520,7 @@ async function sessionLoopStart(sessionIdPartial, task, machineId, opts) {
|
|
|
2516
2520
|
...opts?.oracle ? { oracle: opts.oracle } : {},
|
|
2517
2521
|
...opts?.parent ? { parent: opts.parent } : {},
|
|
2518
2522
|
...maxIterations != null ? { max_iterations: maxIterations } : {},
|
|
2523
|
+
...budget ? { budget } : {},
|
|
2519
2524
|
evaluator
|
|
2520
2525
|
}
|
|
2521
2526
|
});
|
|
@@ -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 { F as parseFrontmatter, G as getSkillsServer, H as getSkillsWorkspaceName, I as getSkillsCollectionName, J as fetchWithTimeout, K as searchSkills, L as SKILLS_DIR, M as getSkillInfo, N as downloadSkillFile, O as listSkillFiles } from './run-
|
|
4
|
+
import { F as parseFrontmatter, G as getSkillsServer, H as getSkillsWorkspaceName, I as getSkillsCollectionName, J as fetchWithTimeout, K as searchSkills, L as SKILLS_DIR, M as getSkillInfo, N as downloadSkillFile, O as listSkillFiles } from './run-Cc0vbRpn.mjs';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'url';
|
|
7
7
|
import 'child_process';
|
|
@@ -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-B5cfTJlA.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-CBwu-xas.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-B5cfTJlA.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-CBwu-xas.mjs');
|
|
136
136
|
const { server, machine } = await connectAndGetMachine();
|
|
137
137
|
try {
|
|
138
138
|
const tunnels = await machine.tunnelList({});
|
|
@@ -172,7 +172,7 @@ async function serviceDelete(args) {
|
|
|
172
172
|
process.exit(1);
|
|
173
173
|
}
|
|
174
174
|
try {
|
|
175
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
175
|
+
const { connectAndGetMachine } = await import('./commands-CBwu-xas.mjs');
|
|
176
176
|
const { server, machine } = await connectAndGetMachine();
|
|
177
177
|
try {
|
|
178
178
|
await machine.tunnelStop({ name });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
|
-
import { m as resolveProjectRoot } from './run-
|
|
2
|
+
import { m as resolveProjectRoot } from './run-Cc0vbRpn.mjs';
|
|
3
3
|
import { c as workflowSteps, s as setWorkflowEnabled, i as isWorkflowEnabled, r as removeWorkflow, g as getWorkflow, l as listWorkflows, a as saveWorkflow, b as rawWorkflow } from './store-BTs0H_y0.mjs';
|
|
4
4
|
import 'os';
|
|
5
5
|
import 'fs/promises';
|
|
@@ -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-Cc0vbRpn.mjs';
|
|
5
5
|
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-HydRNEt7.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
@@ -4,7 +4,7 @@ import { mkdirSync, writeFileSync, unlinkSync, existsSync, chmodSync, readFileSy
|
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
import { homedir, platform, arch } from 'os';
|
|
6
6
|
import { randomUUID, createHash } from 'crypto';
|
|
7
|
-
import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-
|
|
7
|
+
import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-Cc0vbRpn.mjs';
|
|
8
8
|
import 'fs/promises';
|
|
9
9
|
import 'url';
|
|
10
10
|
import 'node:crypto';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as resolveModel, a1 as describeMisconfiguration, a2 as buildMachineDeps } from './run-
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { P as resolveModel, a1 as describeMisconfiguration, a2 as buildMachineDeps } from './run-Cc0vbRpn.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-D_Ee4j96.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-Cc0vbRpn.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as resolveProjectRoot } from './run-
|
|
1
|
+
import { m as resolveProjectRoot } from './run-Cc0vbRpn.mjs';
|
|
2
2
|
import { g as getWorkflow, s as setWorkflowEnabled, r as removeWorkflow, a as saveWorkflow, b as rawWorkflow, l as listWorkflows } from './store-BTs0H_y0.mjs';
|
|
3
3
|
import { g as getRun, l as listRuns, r as runWorkflow } from './runStore-CtptN7US.mjs';
|
|
4
4
|
import 'os';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as resolveProjectRoot, u as updateIssue, n as getIssue, o as resumeIssue, p as pauseIssue, q as addComment, t as addIssue, v as listIssues, w as searchIssues, x as isVisibleTo } from './run-
|
|
1
|
+
import { m as resolveProjectRoot, u as updateIssue, n as getIssue, o as resumeIssue, p as pauseIssue, q as addComment, t as addIssue, v as listIssues, w as searchIssues, x as isVisibleTo } from './run-Cc0vbRpn.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { a3 as applyClaudeProxyEnv, a4 as composeSessionId, a5 as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, a6 as generateHookSettings } from './run-
|
|
1
|
+
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { a3 as applyClaudeProxyEnv, a4 as composeSessionId, a5 as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, a6 as generateHookSettings } from './run-Cc0vbRpn.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';
|
|
@@ -2912,7 +2912,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
2912
2912
|
const tunnels = handlers.tunnels;
|
|
2913
2913
|
if (!tunnels) throw new Error("Tunnel management not available");
|
|
2914
2914
|
if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
|
|
2915
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
2915
|
+
const { FrpcTunnel } = await import('./frpc-B5cfTJlA.mjs');
|
|
2916
2916
|
const tunnel = new FrpcTunnel({
|
|
2917
2917
|
name: params.name,
|
|
2918
2918
|
ports: params.ports,
|
|
@@ -3359,7 +3359,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
3359
3359
|
}
|
|
3360
3360
|
const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
|
|
3361
3361
|
const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
|
|
3362
|
-
const { toolsForRole } = await import('./sideband-
|
|
3362
|
+
const { toolsForRole } = await import('./sideband-D_Ee4j96.mjs');
|
|
3363
3363
|
const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
|
|
3364
3364
|
return fmt(r2);
|
|
3365
3365
|
}
|
|
@@ -3458,7 +3458,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
3458
3458
|
if (r.error || !r.sender) return { error: r.error || "unauthorized" };
|
|
3459
3459
|
const callId = "call_" + Math.random().toString(16).slice(2, 12);
|
|
3460
3460
|
const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
|
|
3461
|
-
const { queryCore } = await import('./commands-
|
|
3461
|
+
const { queryCore } = await import('./commands-CBwu-xas.mjs');
|
|
3462
3462
|
const timeout = c.reply?.timeout_sec || 120;
|
|
3463
3463
|
let result;
|
|
3464
3464
|
try {
|
|
@@ -11466,10 +11466,12 @@ function parseLoopBudget(raw) {
|
|
|
11466
11466
|
if (!raw || typeof raw !== "object") return void 0;
|
|
11467
11467
|
const rt = Number(raw.max_runtime_sec);
|
|
11468
11468
|
const tok = Number(raw.max_tokens);
|
|
11469
|
+
const tph = Number(raw.max_tokens_per_hour);
|
|
11469
11470
|
const out = {};
|
|
11470
11471
|
if (Number.isFinite(rt) && rt > 0) out.max_runtime_sec = rt;
|
|
11471
11472
|
if (Number.isFinite(tok) && tok > 0) out.max_tokens = tok;
|
|
11472
|
-
|
|
11473
|
+
if (Number.isFinite(tph) && tph > 0) out.max_tokens_per_hour = tph;
|
|
11474
|
+
return out.max_runtime_sec || out.max_tokens || out.max_tokens_per_hour ? out : void 0;
|
|
11473
11475
|
}
|
|
11474
11476
|
function initLoop(directory, cfg) {
|
|
11475
11477
|
const initScript = resolveLoopInit();
|
|
@@ -11481,6 +11483,7 @@ function initLoop(directory, cfg) {
|
|
|
11481
11483
|
args.push("--evaluator", cfg.evaluator === false ? "off" : "on");
|
|
11482
11484
|
if (cfg.budget?.max_runtime_sec) args.push("--max-runtime", String(cfg.budget.max_runtime_sec));
|
|
11483
11485
|
if (cfg.budget?.max_tokens) args.push("--max-tokens", String(cfg.budget.max_tokens));
|
|
11486
|
+
if (cfg.budget?.max_tokens_per_hour) args.push("--max-tokens-per-hour", String(cfg.budget.max_tokens_per_hour));
|
|
11484
11487
|
if (cfg.model) args.push("--model", cfg.model);
|
|
11485
11488
|
if (cfg.sessionId) args.push("--session", cfg.sessionId);
|
|
11486
11489
|
const res = spawnSync(process.execPath, args, { encoding: "utf-8", timeout: 3e4 });
|
|
@@ -12181,7 +12184,7 @@ async function startDaemon(options) {
|
|
|
12181
12184
|
saveExposedTunnels(list);
|
|
12182
12185
|
}
|
|
12183
12186
|
async function createExposedTunnel(spec) {
|
|
12184
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
12187
|
+
const { FrpcTunnel } = await import('./frpc-B5cfTJlA.mjs');
|
|
12185
12188
|
const tunnel = new FrpcTunnel({
|
|
12186
12189
|
name: spec.name,
|
|
12187
12190
|
ports: spec.ports,
|
|
@@ -12201,7 +12204,7 @@ async function startDaemon(options) {
|
|
|
12201
12204
|
return tunnel;
|
|
12202
12205
|
}
|
|
12203
12206
|
const tunnelRecreateState = /* @__PURE__ */ new Map();
|
|
12204
|
-
const { ServeManager } = await import('./serveManager-
|
|
12207
|
+
const { ServeManager } = await import('./serveManager-_08XeGmm.mjs');
|
|
12205
12208
|
const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
|
|
12206
12209
|
ensureAutoInstalledSkills(logger).catch(() => {
|
|
12207
12210
|
});
|
|
@@ -14093,11 +14096,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
14093
14096
|
});
|
|
14094
14097
|
},
|
|
14095
14098
|
onIssue: async (params) => {
|
|
14096
|
-
const { issueRpc } = await import('./rpc-
|
|
14099
|
+
const { issueRpc } = await import('./rpc-Dpyy1lrt.mjs');
|
|
14097
14100
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
14098
14101
|
},
|
|
14099
14102
|
onWorkflow: async (params) => {
|
|
14100
|
-
const { workflowRpc } = await import('./rpc-
|
|
14103
|
+
const { workflowRpc } = await import('./rpc-DSoOVh7M.mjs');
|
|
14101
14104
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
14102
14105
|
},
|
|
14103
14106
|
onRipgrep: async (args, cwd) => {
|
|
@@ -14638,11 +14641,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
14638
14641
|
});
|
|
14639
14642
|
},
|
|
14640
14643
|
onIssue: async (params) => {
|
|
14641
|
-
const { issueRpc } = await import('./rpc-
|
|
14644
|
+
const { issueRpc } = await import('./rpc-Dpyy1lrt.mjs');
|
|
14642
14645
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
14643
14646
|
},
|
|
14644
14647
|
onWorkflow: async (params) => {
|
|
14645
|
-
const { workflowRpc } = await import('./rpc-
|
|
14648
|
+
const { workflowRpc } = await import('./rpc-DSoOVh7M.mjs');
|
|
14646
14649
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
14647
14650
|
},
|
|
14648
14651
|
onRipgrep: async (args, cwd) => {
|
|
@@ -15416,7 +15419,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
15416
15419
|
const PING_TIMEOUT_MS = 15e3;
|
|
15417
15420
|
const POST_RECONNECT_GRACE_MS = 2e4;
|
|
15418
15421
|
const RECONNECT_JITTER_MS = 2500;
|
|
15419
|
-
const { WorkflowScheduler } = await import('./scheduler-
|
|
15422
|
+
const { WorkflowScheduler } = await import('./scheduler-B3C7f443.mjs');
|
|
15420
15423
|
const workflowScheduler = new WorkflowScheduler({
|
|
15421
15424
|
projectRoots: () => {
|
|
15422
15425
|
const dirs = /* @__PURE__ */ new Set();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as resolveProjectRoot, y as cronMatches } from './run-
|
|
1
|
+
import { m as resolveProjectRoot, y as cronMatches } from './run-Cc0vbRpn.mjs';
|
|
2
2
|
import { l as listWorkflows, i as isWorkflowEnabled, w as workflowCrons } from './store-BTs0H_y0.mjs';
|
|
3
3
|
import { r as runWorkflow } from './runStore-CtptN7US.mjs';
|
|
4
4
|
import 'os';
|
|
@@ -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-CBwu-xas.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-CBwu-xas.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-CBwu-xas.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-CBwu-xas.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-CBwu-xas.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-Cc0vbRpn.mjs';
|
|
8
8
|
import 'os';
|
|
9
9
|
import 'fs/promises';
|
|
10
10
|
import 'url';
|
|
@@ -733,7 +733,7 @@ class ServeManager {
|
|
|
733
733
|
const mount = this.mounts.get(mountName);
|
|
734
734
|
const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, buildLinkSubdomain(subdomainSafe, mount.linkToken)]]) : void 0;
|
|
735
735
|
try {
|
|
736
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
736
|
+
const { FrpcTunnel } = await import('./frpc-B5cfTJlA.mjs');
|
|
737
737
|
let tunnel;
|
|
738
738
|
tunnel = new FrpcTunnel({
|
|
739
739
|
name: tunnelName,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-
|
|
1
|
+
import { R as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-Cc0vbRpn.mjs';
|
|
2
2
|
import 'node:child_process';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|