svamp-cli 0.2.167 → 0.2.169
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 -2
- package/dist/{agentCommands-juw5_q8v.mjs → agentCommands-DsFjNOme.mjs} +5 -5
- package/dist/{auth-DFU6j82G.mjs → auth-BnsFO6Ry.mjs} +1 -1
- package/dist/cli.mjs +61 -97
- package/dist/{commands-Jm-BUsrf.mjs → commands-BH_EjCPM.mjs} +2 -2
- package/dist/{commands-B9-jAYZy.mjs → commands-BIp-xxDy.mjs} +10 -39
- package/dist/{commands-C2gVT2LM.mjs → commands-D39YUhlU.mjs} +5 -5
- package/dist/{commands-CevXJKdi.mjs → commands-DCCaygY9.mjs} +1 -1
- package/dist/{commands-BYEL5DqA.mjs → commands-DJv_H3rc.mjs} +1 -1
- package/dist/{commands-D_Hlxfog.mjs → commands-VQJom2wo.mjs} +2 -2
- package/dist/{commands-yYLA6w6t.mjs → commands-hypEnMfp.mjs} +2 -119
- package/dist/{commands-Bb4Sr_iq.mjs → commands-mz1ZfhKj.mjs} +1 -1
- package/dist/{fleet-DGWqm1_M.mjs → fleet-D01NyQ31.mjs} +1 -1
- package/dist/{frpc-Cd9N3gGU.mjs → frpc-DyWyrIAA.mjs} +1 -1
- package/dist/{headlessCli-BlKUictN.mjs → headlessCli-g7q-ccAr.mjs} +2 -2
- package/dist/{httpServer-COU4szUc.mjs → httpServer-B9kdEU1z.mjs} +28 -0
- package/dist/index.mjs +1 -1
- package/dist/{package-CrzrTOTn.mjs → package-CTA2WTCH.mjs} +2 -2
- package/dist/{run-BeIP-YpD.mjs → run-DbJt6BE_.mjs} +49 -181
- package/dist/{run-BOdCp1Ru.mjs → run-Ld92ruLI.mjs} +1 -1
- package/dist/{serveCommands-BoV_jArl.mjs → serveCommands-BUPlnpAP.mjs} +5 -5
- package/dist/{serveManager-Do0sF4Rz.mjs → serveManager-CniGuJKe.mjs} +2 -2
- package/dist/{sideband-6iHsRWJX.mjs → sideband-BT55liUs.mjs} +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import { createServer } from 'node:http';
|
|
4
|
-
import {
|
|
4
|
+
import { R as RoutineStore, w as RoutineRunner } from './run-DbJt6BE_.mjs';
|
|
5
5
|
import 'os';
|
|
6
6
|
import 'fs/promises';
|
|
7
7
|
import 'fs';
|
|
@@ -22,41 +22,6 @@ import 'zod';
|
|
|
22
22
|
import 'node:fs/promises';
|
|
23
23
|
import 'node:util';
|
|
24
24
|
|
|
25
|
-
function runOracle(cmd, cwd, timeoutSec = 600) {
|
|
26
|
-
try {
|
|
27
|
-
execSync(cmd, { cwd, stdio: "pipe", maxBuffer: 16 * 1024 * 1024, timeout: timeoutSec * 1e3 });
|
|
28
|
-
return true;
|
|
29
|
-
} catch {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function itemOracle(item) {
|
|
34
|
-
if (item.eval?.type === "oracle" && item.eval.cmd?.trim()) return item.eval.cmd;
|
|
35
|
-
const legacy = item.oracle;
|
|
36
|
-
return typeof legacy === "string" && legacy.trim() ? legacy : void 0;
|
|
37
|
-
}
|
|
38
|
-
function verifyChecklistOracles(projectRoot, sessionId, timeoutSec = 600) {
|
|
39
|
-
const items = readChecklist(projectRoot, sessionId).filter((i) => i.disposition !== "delegated" && i.status !== "done");
|
|
40
|
-
const criteria = compileChecklist(items).criteria;
|
|
41
|
-
const failing = [];
|
|
42
|
-
let oracleTotal = 0, oraclePass = 0, agentSkipped = 0;
|
|
43
|
-
for (const it of items) {
|
|
44
|
-
const cmd = itemOracle(it);
|
|
45
|
-
if (cmd) {
|
|
46
|
-
oracleTotal++;
|
|
47
|
-
if (runOracle(cmd, projectRoot, timeoutSec)) oraclePass++;
|
|
48
|
-
else failing.push({ id: it.id, text: it.text });
|
|
49
|
-
} else if (it.eval?.type === "agent") {
|
|
50
|
-
agentSkipped++;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const verdict = failing.length === 0 ? "approved" : "rework";
|
|
54
|
-
const parts = [`Watchdog: ${oraclePass}/${oracleTotal} oracle check${oracleTotal === 1 ? "" : "s"} pass.`];
|
|
55
|
-
if (failing.length) parts.push(`Failing: ${failing.map((f) => f.text).join("; ")}.`);
|
|
56
|
-
if (agentSkipped) parts.push(`${agentSkipped} agent-judged item(s) need a live session (not checked).`);
|
|
57
|
-
return { verdict, criteria, guidance: parts.join(" "), oracleTotal, oraclePass, failing, agentSkipped, itemCount: items.length };
|
|
58
|
-
}
|
|
59
|
-
|
|
60
25
|
function parseArgs(argv) {
|
|
61
26
|
const a = { _: [] };
|
|
62
27
|
for (let i = 0; i < argv.length; i++) {
|
|
@@ -88,7 +53,13 @@ async function cliDeliver({ routine, resolved }) {
|
|
|
88
53
|
console.error(`[trigger] skip ${routine.id || routine.name}: report session ${reportTo} not live (inbox is in-memory)`);
|
|
89
54
|
return { skipped: "verify: report session not live" };
|
|
90
55
|
}
|
|
91
|
-
|
|
56
|
+
let res;
|
|
57
|
+
try {
|
|
58
|
+
const out = execFileSync("svamp", ["issue", "pending"], { cwd: dir, encoding: "utf8" });
|
|
59
|
+
res = { verdict: "approved", guidance: out.trim() || "No pending issues.", criteria: "svamp issue pending" };
|
|
60
|
+
} catch (e) {
|
|
61
|
+
res = { verdict: "rework", guidance: (String(e?.stdout || "") + String(e?.stderr || "")).trim() || "Pending issues remain.", criteria: "svamp issue pending" };
|
|
62
|
+
}
|
|
92
63
|
const message = {
|
|
93
64
|
messageId: randomUUID(),
|
|
94
65
|
from: `watchdog:${routine.name || routine.id}`,
|
|
@@ -104,7 +75,7 @@ Criteria: ${res.criteria || "(none)"}
|
|
|
104
75
|
urgency: "normal",
|
|
105
76
|
hopCount: 1
|
|
106
77
|
};
|
|
107
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
78
|
+
const { connectAndGetMachine } = await import('./commands-hypEnMfp.mjs');
|
|
108
79
|
const { server, machine } = await connectAndGetMachine();
|
|
109
80
|
try {
|
|
110
81
|
await machine.sessionRPC(reportTo, "sendInboxMessage", { message });
|
|
@@ -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-DyWyrIAA.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-hypEnMfp.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-DyWyrIAA.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-hypEnMfp.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-hypEnMfp.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-DbJt6BE_.mjs';
|
|
3
3
|
import { existsSync, unlinkSync, readFileSync, readdirSync, mkdirSync, writeFileSync, renameSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { parse, stringify } from 'yaml';
|
|
@@ -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 {
|
|
4
|
+
import { y as parseFrontmatter, z as getSkillsServer, A as getSkillsWorkspaceName, B as getSkillsCollectionName, C as fetchWithTimeout, D as searchSkills, E as SKILLS_DIR, F as getSkillInfo, G as downloadSkillFile, H as listSkillFiles } from './run-DbJt6BE_.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-hypEnMfp.mjs';
|
|
3
3
|
import { execSync } from 'node:child_process';
|
|
4
|
-
import { u as updateIssue, p as addComment, v as addIssue,
|
|
4
|
+
import { u as updateIssue, p as addComment, v as addIssue, x as shortId } from './run-DbJt6BE_.mjs';
|
|
5
5
|
import 'node:path';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'os';
|
|
@@ -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 {
|
|
5
|
+
import { O as formatHandle, P as normalizeAllowedUser, Q as loadSecurityContextConfig, T as resolveSecurityContext, U as buildSecurityContextFromFlags, V as mergeSecurityContexts, c as connectToHypha, W as buildSessionShareUrl, X as computeOutboundHop, x as shortId, Y as buildMachineShareUrl, Z as parseHandle, _ as handleMatchesMetadata } from './run-DbJt6BE_.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -2543,123 +2543,6 @@ async function sessionLoopStatus(sessionIdPartial, machineId) {
|
|
|
2543
2543
|
await server.disconnect();
|
|
2544
2544
|
}
|
|
2545
2545
|
}
|
|
2546
|
-
const CHECKLIST_MARK = {
|
|
2547
|
-
todo: " ",
|
|
2548
|
-
active: "~",
|
|
2549
|
-
verifying: "?",
|
|
2550
|
-
awaiting_review: "\u2026",
|
|
2551
|
-
rework: "\u21BB",
|
|
2552
|
-
blocked: "\u2717",
|
|
2553
|
-
done: "x"
|
|
2554
|
-
};
|
|
2555
|
-
function printChecklist(items) {
|
|
2556
|
-
if (!items.length) {
|
|
2557
|
-
console.log(" (empty checklist)");
|
|
2558
|
-
return;
|
|
2559
|
-
}
|
|
2560
|
-
items.forEach((it, i) => {
|
|
2561
|
-
const crew = it.disposition === "delegated" ? ` [crew${it.child?.sessionId ? ` ${it.child.sessionId.slice(0, 8)}` : ""}]` : "";
|
|
2562
|
-
const oracle = it.eval?.type === "oracle" ? ` (oracle: ${it.eval.cmd})` : "";
|
|
2563
|
-
console.log(` ${i + 1}. [${CHECKLIST_MARK[it.status] ?? " "}] ${it.text}${crew}${oracle}`);
|
|
2564
|
-
});
|
|
2565
|
-
const s = summarize(items);
|
|
2566
|
-
console.log(` \u2014 ${s.done}/${s.total} done${s.delegated ? `, ${s.delegated} delegated` : ""}${s.allDone ? " \u2713" : ""}`);
|
|
2567
|
-
}
|
|
2568
|
-
async function readChecklistItems(svc, fullId) {
|
|
2569
|
-
try {
|
|
2570
|
-
const raw = await svc.readFile(`.svamp/${fullId}/loop/criteria.json`);
|
|
2571
|
-
const content = typeof raw === "string" ? raw : raw?.content;
|
|
2572
|
-
if (content) {
|
|
2573
|
-
const parsed = JSON.parse(Buffer.from(content, "base64").toString("utf-8"));
|
|
2574
|
-
if (Array.isArray(parsed)) return parsed;
|
|
2575
|
-
if (Array.isArray(parsed?.items)) return parsed.items;
|
|
2576
|
-
}
|
|
2577
|
-
} catch {
|
|
2578
|
-
}
|
|
2579
|
-
return [];
|
|
2580
|
-
}
|
|
2581
|
-
function resolveItemIds(items, tokens) {
|
|
2582
|
-
const ids = [];
|
|
2583
|
-
for (const tok of tokens) {
|
|
2584
|
-
const byId = items.find((it) => it.id === tok);
|
|
2585
|
-
if (byId) {
|
|
2586
|
-
ids.push(byId.id);
|
|
2587
|
-
continue;
|
|
2588
|
-
}
|
|
2589
|
-
const idx = parseInt(tok, 10);
|
|
2590
|
-
if (!isNaN(idx) && idx >= 1 && idx <= items.length) ids.push(items[idx - 1].id);
|
|
2591
|
-
}
|
|
2592
|
-
return ids;
|
|
2593
|
-
}
|
|
2594
|
-
function mutateChecklistItems(items, action, args, opts, now = Date.now()) {
|
|
2595
|
-
const evalOpt = opts?.oracle ? { eval: { type: "oracle", cmd: opts.oracle } } : {};
|
|
2596
|
-
let next = items;
|
|
2597
|
-
if (action === "set") {
|
|
2598
|
-
next = args.map((text, i) => newItem(text, evalOpt, i, now));
|
|
2599
|
-
} else if (action === "add") {
|
|
2600
|
-
next = [...items, newItem(args.join(" ").trim(), evalOpt, items.length, now)];
|
|
2601
|
-
} else if (action === "done" || action === "rm") {
|
|
2602
|
-
const targetIds = new Set(resolveItemIds(items, args));
|
|
2603
|
-
next = action === "rm" ? items.filter((it) => !targetIds.has(it.id)) : items.map((it) => targetIds.has(it.id) ? { ...it, status: "done", doneAt: now } : it);
|
|
2604
|
-
}
|
|
2605
|
-
return next.map((it, i) => ({ ...it, order: i }));
|
|
2606
|
-
}
|
|
2607
|
-
function checklistConfigPatch(opts) {
|
|
2608
|
-
if (!opts) return void 0;
|
|
2609
|
-
const budget = {};
|
|
2610
|
-
if (opts.maxTokens && opts.maxTokens > 0) budget.max_tokens = opts.maxTokens;
|
|
2611
|
-
if (opts.maxRuntimeSec && opts.maxRuntimeSec > 0) budget.max_runtime_sec = opts.maxRuntimeSec;
|
|
2612
|
-
const hasBudget = Object.keys(budget).length > 0;
|
|
2613
|
-
if (!opts.maxIterations && !hasBudget) return void 0;
|
|
2614
|
-
return {
|
|
2615
|
-
...opts.maxIterations ? { maxIterations: opts.maxIterations } : {},
|
|
2616
|
-
...hasBudget ? { budget } : {}
|
|
2617
|
-
};
|
|
2618
|
-
}
|
|
2619
|
-
async function sessionChecklist(sessionIdPartial, action, args, machineId, opts) {
|
|
2620
|
-
const { server, machine, fullId } = await connectAndResolveSession(sessionIdPartial, machineId);
|
|
2621
|
-
try {
|
|
2622
|
-
const svc = getSessionProxy(machine, fullId);
|
|
2623
|
-
if (action === "get") {
|
|
2624
|
-
console.log(`Checklist on session ${fullId.slice(0, 8)}:`);
|
|
2625
|
-
printChecklist(await readChecklistItems(svc, fullId));
|
|
2626
|
-
return;
|
|
2627
|
-
}
|
|
2628
|
-
if (action === "clear") {
|
|
2629
|
-
await svc.updateConfig({ checklist: [] });
|
|
2630
|
-
console.log(`Checklist cleared on session ${fullId.slice(0, 8)} \u2014 loop stopped.`);
|
|
2631
|
-
return;
|
|
2632
|
-
}
|
|
2633
|
-
const current = await readChecklistItems(svc, fullId);
|
|
2634
|
-
if ((action === "set" || action === "add") && !args.join(" ").trim()) {
|
|
2635
|
-
console.error(`Usage: svamp session checklist <id> ${action} "<text>" [--oracle "cmd"]`);
|
|
2636
|
-
process.exit(1);
|
|
2637
|
-
}
|
|
2638
|
-
if (action === "done" || action === "rm") {
|
|
2639
|
-
if (!args.length) {
|
|
2640
|
-
console.error(`Usage: svamp session checklist <id> ${action} <id|#> [<id|#> \u2026]`);
|
|
2641
|
-
process.exit(1);
|
|
2642
|
-
}
|
|
2643
|
-
if (!resolveItemIds(current, args).length) {
|
|
2644
|
-
console.error("No matching items.");
|
|
2645
|
-
process.exit(1);
|
|
2646
|
-
}
|
|
2647
|
-
}
|
|
2648
|
-
const items = mutateChecklistItems(current, action, args, { oracle: opts?.oracle });
|
|
2649
|
-
const errs = validateChecklist(items);
|
|
2650
|
-
if (errs.length) {
|
|
2651
|
-
console.error(`Checklist invalid: ${errs.join("; ")}`);
|
|
2652
|
-
process.exit(1);
|
|
2653
|
-
}
|
|
2654
|
-
const ccfg = checklistConfigPatch(opts);
|
|
2655
|
-
await svc.updateConfig({ checklist: items, ...ccfg ? { checklistConfig: ccfg } : {} });
|
|
2656
|
-
console.log(`Checklist updated on session ${fullId.slice(0, 8)}:`);
|
|
2657
|
-
printChecklist(items);
|
|
2658
|
-
if (items.some((it) => it.status !== "done")) console.log(" \u{1F501} loop active \u2014 iterating until all done.");
|
|
2659
|
-
} finally {
|
|
2660
|
-
await server.disconnect();
|
|
2661
|
-
}
|
|
2662
|
-
}
|
|
2663
2546
|
async function sessionInboxSend(sessionIdPartial, body, machineId, opts) {
|
|
2664
2547
|
const { server, machine, fullId } = await connectAndResolveSession(sessionIdPartial, machineId);
|
|
2665
2548
|
try {
|
|
@@ -2814,4 +2697,4 @@ async function sessionInboxClear(sessionIdPartial, machineId, opts) {
|
|
|
2814
2697
|
}
|
|
2815
2698
|
}
|
|
2816
2699
|
|
|
2817
|
-
export {
|
|
2700
|
+
export { collectAssistantResponse, connectAndGetMachine, connectAndResolveSession, createWorktree, generateWorktreeName, machineExec, machineInfo, machineLs, machineShare, parseShareArg, queryCore, renderMessage, resolveSessionId, sendCore, sessionApprove, sessionArchive, sessionAttach, sessionDelete, sessionDeny, sessionEditMessage, sessionInboxClear, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxSend, sessionInfo, sessionList, sessionLoopCancel, sessionLoopStart, sessionLoopStatus, sessionMachines, sessionMessages, sessionQuery, sessionRefineLastReply, sessionResume, sessionSend, sessionShare, sessionSpawn, sessionUndoEdit, sessionWait, sessionWhoami, snapshotLatestSeq, validateSendOptions, wiseAnnounceCli, wiseAskCli, wiseJoinMeetingCli, wiseLeaveMeetingCli, wiseMeetingsCli };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
|
-
import { m as resolveProjectRoot, n as searchIssues, o as listIssues, p as addComment, u as updateIssue, q as getIssue, t as summarize, v as addIssue } from './run-
|
|
2
|
+
import { m as resolveProjectRoot, n as searchIssues, o as listIssues, p as addComment, u as updateIssue, q as getIssue, t as summarize, v as addIssue } from './run-DbJt6BE_.mjs';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
import 'fs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import os from 'node:os';
|
|
4
|
-
import { c as connectToHypha } from './run-
|
|
4
|
+
import { c as connectToHypha } from './run-DbJt6BE_.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-DbJt6BE_.mjs';
|
|
8
8
|
import 'fs/promises';
|
|
9
9
|
import 'url';
|
|
10
10
|
import 'node:crypto';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { N as resolveModel, $ as describeMisconfiguration, a0 as buildMachineDeps } from './run-DbJt6BE_.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-BT55liUs.mjs';
|
|
3
3
|
import { WebSocket } from 'ws';
|
|
4
4
|
import { execSync, spawn } from 'child_process';
|
|
5
5
|
import 'os';
|
|
@@ -132,6 +132,34 @@ data: ${JSON.stringify({ error: out.error })}
|
|
|
132
132
|
json(out?.error ? out.error === "channel not found" ? 404 : 401 : 200, out);
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
+
m = u.pathname.match(/^\/channel\/([\w.-]+)\/activity$/);
|
|
136
|
+
if (m) {
|
|
137
|
+
const cid = m[1];
|
|
138
|
+
const rpc2 = await findOwner(deps, cid);
|
|
139
|
+
if (!rpc2?.recordMeetingActivity) {
|
|
140
|
+
json(404, { error: "channel not found" });
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
let chunks2 = "";
|
|
144
|
+
req.on("data", (d) => {
|
|
145
|
+
chunks2 += d;
|
|
146
|
+
if (chunks2.length > 64 * 1024) req.destroy();
|
|
147
|
+
});
|
|
148
|
+
req.on("end", async () => {
|
|
149
|
+
let body = {};
|
|
150
|
+
try {
|
|
151
|
+
body = chunks2 ? JSON.parse(chunks2) : {};
|
|
152
|
+
} catch {
|
|
153
|
+
}
|
|
154
|
+
try {
|
|
155
|
+
const out = await rpc2.recordMeetingActivity({ channel: cid, key: keyOf(), from: body.from, kind: body.kind, text: body.text });
|
|
156
|
+
json(out?.error ? out.error === "channel not found" ? 404 : 401 : 200, out);
|
|
157
|
+
} catch (e) {
|
|
158
|
+
json(500, { error: e?.message || String(e) });
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
135
163
|
m = u.pathname.match(/^\/channel\/([\w.-]+)\/tool$/);
|
|
136
164
|
if (m) {
|
|
137
165
|
const cid = m[1];
|
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-DbJt6BE_.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "svamp-cli";
|
|
2
|
-
var version = "0.2.
|
|
2
|
+
var version = "0.2.169";
|
|
3
3
|
var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
|
|
4
4
|
var author = "Amun AI AB";
|
|
5
5
|
var license = "SEE LICENSE IN LICENSE";
|
|
@@ -19,7 +19,7 @@ var exports$1 = {
|
|
|
19
19
|
var scripts = {
|
|
20
20
|
build: "rm -rf dist bin/skills && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && cp -r ../../skills/loop bin/skills/loop && cp -r ../../skills/crew bin/skills/crew && tsc --noEmit && pkgroll",
|
|
21
21
|
typecheck: "tsc --noEmit",
|
|
22
|
-
test: "npx tsx test/test-context-window.mjs && npx tsx test/test-ratelimit-retry.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-loop-activation.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-inbox-guard.mjs && npx tsx test/test-auto-topic.mjs && npx tsx test/test-project-info.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && node test/test-supervisor-restart.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-inbox-cross-machine.mjs && npx tsx test/test-
|
|
22
|
+
test: "npx tsx test/test-context-window.mjs && npx tsx test/test-ratelimit-retry.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-loop-activation.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-inbox-guard.mjs && npx tsx test/test-auto-topic.mjs && npx tsx test/test-project-info.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && node test/test-supervisor-restart.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-inbox-cross-machine.mjs && npx tsx test/test-issue-store.mjs && npx tsx test/test-issue-close-gate.mjs && npx tsx test/test-workflow-store.mjs && npx tsx test/test-serve-link-subdomain.mjs && npx tsx test/test-short-id.mjs && npx tsx test/test-transcript-edit.mjs && npx tsx test/test-edit-history.mjs && npx tsx test/test-friendly-name.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && npx tsx test/test-frpc-status.mjs && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-routine.mjs && npx tsx test/test-routine-rpc.mjs && npx tsx test/test-session-file.mjs && npx tsx test/test-channel-rpc.mjs && npx tsx test/test-wise-agent.mjs && npx tsx test/test-channel-agent.mjs && npx tsx test/test-channels-service.mjs && npx tsx test/test-channel-async-reply.mjs && npx tsx test/test-channel-binding.mjs && npx tsx test/test-channel-identity.mjs && npx tsx test/test-shared-session-identity.mjs && npx tsx test/test-wise-agent-auth.mjs && npx tsx test/test-channel-http.mjs && npx tsx test/test-wise-voice.mjs && npx tsx test/test-wise-headless.mjs && npx tsx test/test-wise-machine.mjs && npx tsx test/test-crew-merge.mjs && npx tsx test/test-crew-verdict-routing.mjs",
|
|
23
23
|
"test:hypha": "node --no-warnings test/test-hypha-service.mjs",
|
|
24
24
|
dev: "tsx src/cli.ts",
|
|
25
25
|
"dev:daemon": "tsx src/cli.ts daemon start-sync",
|