svamp-cli 0.2.166 → 0.2.168

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.
@@ -486,7 +486,7 @@ function buildTools(deps, skills) {
486
486
  {
487
487
  name: "set_checklist",
488
488
  readOnly: false,
489
- description: "Create or replace the bound session's checklist (the loop's success criteria) and start the self-verifying loop. Each item is a concrete, checkable requirement. ONLY after the caller confirmed the proposal.",
489
+ description: "Turn the caller's goals into tracked ISSUES (the backlog = the loop's success criteria) and start the self-verifying loop. Each item becomes one concrete, checkable issue (optional per-item oracle \u2192 its verify-cmd). ONLY after the caller confirmed the proposal.",
490
490
  parameters: { type: "object", properties: {
491
491
  items: { type: "array", description: "The checklist items (success criteria).", items: { type: "object", properties: {
492
492
  text: { type: "string", description: "A concrete, checkable requirement." },
@@ -503,7 +503,7 @@ function buildTools(deps, skills) {
503
503
  prompt: a?.prompt ? str$1(a.prompt) : void 0,
504
504
  maxIterations: typeof a?.max_iterations === "number" ? a.max_iterations : void 0
505
505
  });
506
- return r.ok ? `Set a ${items.length}-item checklist and started the loop.` : `Could not set the checklist: ${r.error || "unknown error"}.`;
506
+ return r.ok ? `Created ${items.length} issue(s) and started the backlog loop.` : `Could not create the issues: ${r.error || "unknown error"}.`;
507
507
  }
508
508
  },
509
509
  {
@@ -665,7 +665,7 @@ You are WISE Agent, a fast, text-mode companion to the deep coding agent (Claude
665
665
  - run_bash \u2014 run a shell command on the session's machine (when granted).
666
666
  - send_to_session \u2014 hand a clear, reformulated instruction to the deep coding agent (when granted); pass wait=true to block for its reply.
667
667
  - create_routine / create_loop / create_channel \u2014 set up a scheduled/triggered routine, a self-verifying loop, or an inbound channel for this session (when granted). ALWAYS propose first and confirm before calling these (see below).
668
- - set_checklist / stop_loop \u2014 turn the caller's goals into a tracked checklist (the loop's success criteria) and start the self-verifying loop, or stop a running loop (when granted). Each item is one concrete, checkable requirement (optional per-item oracle command). ALWAYS propose the items first and confirm before calling.
668
+ - set_checklist / stop_loop \u2014 turn the caller's goals into tracked ISSUES (the backlog = the loop's success criteria) and start the self-verifying loop, or stop a running loop (when granted). Each item becomes one concrete, checkable issue (optional per-item oracle command \u2192 its verify-cmd). ALWAYS propose the items first and confirm before calling.
669
669
 
670
670
  # Instructions
671
671
  - Answer general questions and questions about yourself directly. Use tools only to act on the machine/session.
@@ -972,6 +972,21 @@ function makeHttpTransport(resolved, fetchImpl = fetch) {
972
972
  };
973
973
  }
974
974
 
975
+ function toSchema(t) {
976
+ return { name: t.name, description: t.description, parameters: t.parameters || { type: "object", properties: {} } };
977
+ }
978
+ async function buildWiseProfile(deps, config, opts) {
979
+ const ctx = opts?.ctx ?? await loadWiseAgentContext(deps, config);
980
+ const instructions = buildWiseAgentInstructions(ctx, config);
981
+ const gated = gateTools(buildTools(deps, ctx.skills), config, opts?.sender || "caller");
982
+ return {
983
+ instructions,
984
+ skills: ctx.skills.map((s) => ({ name: s.name, description: s.description })),
985
+ tools: gated.map(toSchema),
986
+ projectInstructions: ctx.projectInstructions
987
+ };
988
+ }
989
+
975
990
  let _testTransport;
976
991
  function resolveWiseTransport(config, env) {
977
992
  const resolved = resolveModel(config, env);
@@ -1059,23 +1074,27 @@ function buildSessionDeps(rpc, opts = {}) {
1059
1074
  }, ctx);
1060
1075
  },
1061
1076
  async applyChecklist(items, opts2) {
1062
- const built = (items || []).filter((i) => i?.text && i.text.trim()).map((i, idx) => ({
1063
- id: `wise-${Date.now().toString(36)}-${idx}`,
1064
- text: i.text.trim(),
1065
- status: "todo",
1066
- disposition: "inline",
1067
- scope: "session",
1068
- ...i.oracle && i.oracle.trim() ? { verify: { type: "command", text: i.oracle.trim() }, oracle: i.oracle.trim() } : {}
1069
- }));
1077
+ const list = (items || []).filter((i) => i?.text && i.text.trim());
1078
+ const shq = (s) => `'${String(s).replace(/'/g, "'\\''")}'`;
1079
+ let created = 0;
1080
+ for (const i of list) {
1081
+ const oracle = i.oracle?.trim();
1082
+ const cmd = `svamp issue add --ready ${oracle ? `--verify-cmd ${shq(oracle)} ` : ""}--body ${shq(i.text.trim())}`;
1083
+ try {
1084
+ const r = normalizeBash(await rpc.bash(cmd, void 0, void 0, ctx));
1085
+ if (r.exitCode === 0) created++;
1086
+ } catch {
1087
+ }
1088
+ }
1070
1089
  await rpc.updateConfig({
1071
- checklist: built,
1072
- checklistConfig: {
1073
- ...opts2?.prompt ? { prompt: opts2.prompt } : {},
1074
- maxIterations: opts2?.maxIterations ?? 20,
1090
+ loop: {
1091
+ task: opts2?.prompt?.trim() || "Work the ready issues in this session backlog until none remain (`svamp issue list --status ready`).",
1092
+ oracle: "svamp issue pending",
1093
+ max_iterations: opts2?.maxIterations ?? 20,
1075
1094
  evaluator: true
1076
1095
  }
1077
1096
  }, ctx);
1078
- return { ok: true };
1097
+ return { ok: created > 0 || list.length === 0, ...created === 0 && list.length ? { error: "could not create issues" } : {} };
1079
1098
  },
1080
1099
  async stopLoop() {
1081
1100
  await rpc.updateConfig({ loop: null }, ctx);
@@ -1277,7 +1296,7 @@ function validateRoutine(r) {
1277
1296
  if (!a || !ACTION_KINDS.includes(a.kind)) errs.push(`action.kind must be one of ${ACTION_KINDS.join("|")}`);
1278
1297
  if (a?.kind === "message" && !a.template) errs.push("action.template required for message action");
1279
1298
  if (a?.kind === "loop" && !a.loop && !a.task_template) errs.push("action.loop or action.task_template required for loop action");
1280
- if (a?.kind === "verify" && !r.dir) errs.push("a verify (checklist watchdog) action requires a dir (the project root holding .svamp/<sid>/loop/criteria.json)");
1299
+ if (a?.kind === "verify" && !r.dir) errs.push("a verify (backlog watchdog) action requires a dir (the project root holding .svamp/issues)");
1281
1300
  if (r.overlap && !OVERLAP.includes(r.overlap)) errs.push(`overlap must be one of ${OVERLAP.join("|")}`);
1282
1301
  if (r.bind && r.bind !== "stateful" && r.bind !== "stateless") errs.push('bind must be "stateful" or "stateless"');
1283
1302
  if (r.bind === "stateless") {
@@ -2772,7 +2791,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
2772
2791
  const tunnels = handlers.tunnels;
2773
2792
  if (!tunnels) throw new Error("Tunnel management not available");
2774
2793
  if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
2775
- const { FrpcTunnel } = await import('./frpc-B6KtYbVe.mjs');
2794
+ const { FrpcTunnel } = await import('./frpc-bF6D2Qqh.mjs');
2776
2795
  const tunnel = new FrpcTunnel({
2777
2796
  name: params.name,
2778
2797
  ports: params.ports,
@@ -3213,7 +3232,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
3213
3232
  }
3214
3233
  const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
3215
3234
  const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
3216
- const { toolsForRole } = await import('./sideband-BuMjm0m2.mjs');
3235
+ const { toolsForRole } = await import('./sideband-37mLaOSD.mjs');
3217
3236
  const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
3218
3237
  return fmt(r2);
3219
3238
  }
@@ -3312,7 +3331,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
3312
3331
  if (r.error || !r.sender) return { error: r.error || "unauthorized" };
3313
3332
  const callId = "call_" + Math.random().toString(16).slice(2, 12);
3314
3333
  const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
3315
- const { queryCore } = await import('./commands-DbEd_EMK.mjs');
3334
+ const { queryCore } = await import('./commands-C6I52suC.mjs');
3316
3335
  const timeout = c.reply?.timeout_sec || 120;
3317
3336
  let result;
3318
3337
  try {
@@ -4391,6 +4410,31 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
4391
4410
  return { error: e?.message || String(e) };
4392
4411
  }
4393
4412
  },
4413
+ channelGetProfile: async (params, context) => {
4414
+ const c = channelStore.get(params.channel);
4415
+ if (!c || c.enabled === false) return { error: "channel not found" };
4416
+ const u = context?.user;
4417
+ const r = resolveSender(c, {
4418
+ key: params.key,
4419
+ from: params.from,
4420
+ hyphaUser: u && u.is_anonymous !== true ? u.email || u.id : void 0,
4421
+ hyphaAnonymous: u?.is_anonymous === true,
4422
+ hyphaWorkspace: u?.scope?.current_workspace
4423
+ });
4424
+ if (r.error || !r.sender) return { error: r.error || "unauthorized" };
4425
+ try {
4426
+ const agentConfig = c.action?.kind === "agent" ? c.action.agent || {} : {};
4427
+ const deps = buildSessionDeps(rpcHandlers, {
4428
+ cwd: metadata.path,
4429
+ ownerEmail: metadata.sharing?.owner,
4430
+ status: () => ({ thinking: lastActivity.thinking, sessionId })
4431
+ });
4432
+ const profile = await buildWiseProfile(deps, agentConfig, { sender: r.sender.name });
4433
+ return { ok: true, instructions: profile.instructions, projectInstructions: profile.projectInstructions, skills: profile.skills, tools: profile.tools };
4434
+ } catch (e) {
4435
+ return { error: e?.message || String(e) };
4436
+ }
4437
+ },
4394
4438
  channelDescribe: async (id) => {
4395
4439
  const c = channelStore.get(id);
4396
4440
  if (!c || c.enabled === false || c.system) return { error: "not found" };
@@ -10103,117 +10147,6 @@ class ProcessSupervisor {
10103
10147
  }
10104
10148
  }
10105
10149
 
10106
- const STATUS_TO_MARKER = {
10107
- todo: " ",
10108
- active: "~",
10109
- verifying: "*",
10110
- awaiting_review: "?",
10111
- rework: "r",
10112
- blocked: "!",
10113
- done: "x"
10114
- };
10115
- function renderCriteria(items) {
10116
- if (!items.length) return "";
10117
- const lines = items.map((it) => {
10118
- const tag = it.disposition === "delegated" ? " (delegated)" : "";
10119
- let how = "";
10120
- if (it.disposition !== "delegated" && it.eval) {
10121
- if (it.eval.type === "agent" && it.eval.prompt) how = `
10122
- \u21B3 verify: ${it.eval.prompt}`;
10123
- else if (it.eval.type === "oracle") how = `
10124
- \u21B3 verify by command (must pass): ${it.eval.cmd}`;
10125
- else if (it.eval.type === "manual") how = `
10126
- \u21B3 verify: manual sign-off`;
10127
- }
10128
- return `- [${STATUS_TO_MARKER[it.status] ?? " "}] ${it.text}${tag}${how}`;
10129
- });
10130
- const { done, total } = summarize$1(items);
10131
- return `Success criteria \u2014 drive this checklist to all-done (${done}/${total}):
10132
- ${lines.join("\n")}`;
10133
- }
10134
- function compileChecklist(items) {
10135
- const criteria = renderCriteria(items);
10136
- const oracleItem = items.find((i) => i.disposition === "inline" && i.eval?.type === "oracle");
10137
- const oracle = oracleItem && oracleItem.eval?.type === "oracle" ? oracleItem.eval.cmd : void 0;
10138
- return { criteria, ...oracle ? { oracle } : {} };
10139
- }
10140
- const VALID_STATUS = /* @__PURE__ */ new Set(["todo", "active", "verifying", "awaiting_review", "rework", "blocked", "done"]);
10141
- function validateChecklist(items) {
10142
- const errs = [];
10143
- const ids = /* @__PURE__ */ new Set();
10144
- for (const it of items) {
10145
- if (!it.id) errs.push("item missing id");
10146
- else if (ids.has(it.id)) errs.push(`duplicate item id "${it.id}"`);
10147
- else ids.add(it.id);
10148
- if (!it.text || !it.text.trim()) errs.push(`item "${it.id}" has empty text`);
10149
- if (it.disposition !== "inline" && it.disposition !== "delegated") errs.push(`item "${it.id}" bad disposition`);
10150
- if (!VALID_STATUS.has(it.status)) errs.push(`item "${it.id}" bad status "${it.status}"`);
10151
- if (it.eval?.type === "oracle" && !it.eval.cmd.trim()) errs.push(`item "${it.id}" oracle eval needs a cmd`);
10152
- }
10153
- return errs;
10154
- }
10155
- function summarize$1(items) {
10156
- const by = (s) => items.filter((i) => i.status === s).length;
10157
- const done = by("done");
10158
- return {
10159
- total: items.length,
10160
- done,
10161
- todo: by("todo"),
10162
- active: by("active"),
10163
- blocked: by("blocked"),
10164
- awaiting_review: by("awaiting_review"),
10165
- delegated: items.filter((i) => i.disposition === "delegated").length,
10166
- allDone: items.length > 0 && done === items.length
10167
- };
10168
- }
10169
- function newItem(text, opts = {}, order = 0, now = Date.now()) {
10170
- return {
10171
- id: shortId(),
10172
- text: text.trim(),
10173
- disposition: opts.disposition ?? "inline",
10174
- ...opts.eval ? { eval: opts.eval } : {},
10175
- status: "todo",
10176
- order,
10177
- createdAt: now
10178
- };
10179
- }
10180
- function checklistPath(projectRoot, sessionId) {
10181
- return join(projectRoot, ".svamp", sessionId, "loop", "criteria.json");
10182
- }
10183
- function legacyChecklistPath(projectRoot, sessionId) {
10184
- return join(projectRoot, ".svamp", sessionId, "criteria.json");
10185
- }
10186
-
10187
- function readChecklist(projectRoot, sessionId) {
10188
- let p = checklistPath(projectRoot, sessionId);
10189
- if (!existsSync(p)) {
10190
- const legacy = legacyChecklistPath(projectRoot, sessionId);
10191
- if (!existsSync(legacy)) return [];
10192
- p = legacy;
10193
- }
10194
- try {
10195
- const parsed = JSON.parse(readFileSync(p, "utf8"));
10196
- return Array.isArray(parsed?.items) ? parsed.items : [];
10197
- } catch {
10198
- return [];
10199
- }
10200
- }
10201
- function writeChecklist(projectRoot, sessionId, items) {
10202
- const p = checklistPath(projectRoot, sessionId);
10203
- mkdirSync(dirname(p), { recursive: true });
10204
- const file = { version: 1, items, updatedAt: Date.now() };
10205
- const tmp = p + ".tmp";
10206
- writeFileSync(tmp, JSON.stringify(file, null, 2));
10207
- renameSync(tmp, p);
10208
- }
10209
- function clearChecklist(projectRoot, sessionId) {
10210
- const p = checklistPath(projectRoot, sessionId);
10211
- try {
10212
- if (existsSync(p)) rmSync(p);
10213
- } catch {
10214
- }
10215
- }
10216
-
10217
10150
  const FIELD_ORDER = ["id", "title", "status", "scope", "labels", "verify", "disposition", "triaged", "branch", "session", "original", "created", "closed"];
10218
10151
  function resolveProjectRoot(start = process.cwd()) {
10219
10152
  let dir = start;
@@ -11509,51 +11442,7 @@ Or verify and finish \u2014 an independent Stop gate re-checks before you can st
11509
11442
  const { [_gateKey]: _drop, ...restPatch } = patch;
11510
11443
  patch = restPatch;
11511
11444
  }
11512
- if ("checklist" in patch) {
11513
- const raw = patch.checklist;
11514
- const items = Array.isArray(raw) ? raw : [];
11515
- const ccfg = patch.checklistConfig && typeof patch.checklistConfig === "object" ? patch.checklistConfig : {};
11516
- const generalPrompt = typeof ccfg.prompt === "string" ? ccfg.prompt.trim() : "";
11517
- if (items.length || generalPrompt) {
11518
- const errs = items.length ? validateChecklist(items) : [];
11519
- if (errs.length) {
11520
- sessionService.pushMessage({ type: "message", message: `Checklist rejected: ${errs.join("; ")}`, level: "error" }, "event");
11521
- } else {
11522
- let checklistCriteria = "";
11523
- let oracle;
11524
- if (items.length) {
11525
- writeChecklist(directory, sessionId, items);
11526
- const compiled = compileChecklist(items);
11527
- checklistCriteria = compiled.criteria;
11528
- oracle = compiled.oracle;
11529
- } else {
11530
- clearChecklist(directory, sessionId);
11531
- }
11532
- const task = generalPrompt || checklistCriteria;
11533
- const criteria = [generalPrompt, checklistCriteria].filter(Boolean).join("\n\n") || task;
11534
- const maxIterations = typeof ccfg.maxIterations === "number" ? ccfg.maxIterations : typeof ccfg.max_iterations === "number" ? ccfg.max_iterations : 20;
11535
- const evaluator = ccfg.evaluator !== false;
11536
- const budget = parseLoopBudget(ccfg.budget);
11537
- const ok = initLoop(directory, { task, criteria, oracle, maxIterations, evaluator, budget, sessionId });
11538
- const s = summarize$1(items);
11539
- if (ok) {
11540
- const idle = getMetadata().lifecycleState === "idle";
11541
- if (idle) {
11542
- const q = getMetadata().messageQueue || [];
11543
- const nudge = items.length ? `Your goal checklist was updated (${s.done}/${s.total} done). Work the open items in order; an independent Stop gate re-checks the criteria before you can stop.` : `Your loop goal was set. Work toward it; an independent Stop gate re-checks the criteria before you can stop.`;
11544
- setMetadata((m) => ({ ...m, messageQueue: [...q, { id: randomUUID$1(), text: nudge, displayText: items.length ? `\u{1F4CB} Checklist updated` : `\u{1F501} Loop goal set`, createdAt: Date.now() }] }));
11545
- onLoopActivated?.();
11546
- }
11547
- const msg = items.length ? `\u{1F4CB} Checklist set \u2014 ${s.total} item${s.total === 1 ? "" : "s"} (${s.delegated} delegated), ${s.done} done.` : `\u{1F501} Loop goal set.`;
11548
- sessionService.pushMessage({ type: "message", message: msg }, "event");
11549
- logger.log(`[svampConfig] Checklist set (${s.total} items, ${s.delegated} delegated, prompt=${generalPrompt ? "yes" : "no"})`);
11550
- }
11551
- }
11552
- } else {
11553
- clearChecklist(directory, sessionId);
11554
- deactivateLoop(directory, sessionId);
11555
- sessionService.pushMessage({ type: "message", message: "Checklist cleared." }, "event");
11556
- }
11445
+ if ("checklist" in patch || "checklistConfig" in patch) {
11557
11446
  const { checklist: _c, checklistConfig: _cc, ...restPatch } = patch;
11558
11447
  patch = restPatch;
11559
11448
  }
@@ -11985,7 +11874,7 @@ async function startDaemon(options) {
11985
11874
  saveExposedTunnels(list);
11986
11875
  }
11987
11876
  async function createExposedTunnel(spec) {
11988
- const { FrpcTunnel } = await import('./frpc-B6KtYbVe.mjs');
11877
+ const { FrpcTunnel } = await import('./frpc-bF6D2Qqh.mjs');
11989
11878
  const tunnel = new FrpcTunnel({
11990
11879
  name: spec.name,
11991
11880
  ports: spec.ports,
@@ -12005,7 +11894,7 @@ async function startDaemon(options) {
12005
11894
  return tunnel;
12006
11895
  }
12007
11896
  const tunnelRecreateState = /* @__PURE__ */ new Map();
12008
- const { ServeManager } = await import('./serveManager-BH7mQRkn.mjs');
11897
+ const { ServeManager } = await import('./serveManager-C5s6iQR9.mjs');
12009
11898
  const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
12010
11899
  ensureAutoInstalledSkills(logger).catch(() => {
12011
11900
  });
@@ -14788,7 +14677,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
14788
14677
  const channelHttpPort = Number(process.env.SVAMP_CHANNEL_HTTP_PORT) || 0;
14789
14678
  if (channelHttpPort > 0) {
14790
14679
  try {
14791
- const { createChannelHttpServer } = await import('./httpServer-B8C1P8IL.mjs');
14680
+ const { createChannelHttpServer } = await import('./httpServer-COU4szUc.mjs');
14792
14681
  const channelHttpServer = createChannelHttpServer({
14793
14682
  getSessionIds: () => {
14794
14683
  const ids = [];
@@ -15613,4 +15502,4 @@ var run = /*#__PURE__*/Object.freeze({
15613
15502
  writeStopMarker: writeStopMarker
15614
15503
  });
15615
15504
 
15616
- export { buildMachineShareUrl as $, getSkillsCollectionName as A, fetchWithTimeout as B, searchSkills as C, SKILLS_DIR as D, getSkillInfo as E, downloadSkillFile as F, listSkillFiles as G, loadMachineContext as H, buildMachineInstructions as I, machineToolsForRole as J, buildMachineTools as K, resolveModel as L, readChecklist as M, compileChecklist as N, RoutineStore as O, RoutineRunner as P, formatHandle as Q, READ_ONLY_TOOLS as R, ServeAuth as S, normalizeAllowedUser as T, loadSecurityContextConfig as U, resolveSecurityContext as V, buildSecurityContextFromFlags as W, mergeSecurityContexts as X, buildSessionShareUrl as Y, validateChecklist as Z, computeOutboundHop as _, createSessionStore as a, summarize$1 as a0, newItem as a1, parseHandle as a2, handleMatchesMetadata as a3, describeMisconfiguration as a4, buildMachineDeps as a5, composeSessionId as a6, generateFriendlyName as a7, generateHookSettings as a8, projectInfo as a9, DefaultTransport$1 as aa, acpBackend as ab, acpAgentConfig as ac, codexMcpBackend as ad, GeminiTransport$1 as ae, claudeAuth as af, instanceConfig as ag, api as ah, run as ai, stopDaemon as b, connectToHypha as c, daemonStatus as d, clearStopMarker as e, stopMarkerExists as f, getHyphaServerUrl$1 as g, getFrpsSubdomainHost as h, getFrpsServerPort as i, getFrpsServerAddr as j, getHyphaServerUrl as k, hasCookieToken as l, resolveProjectRoot as m, searchIssues as n, listIssues as o, addComment as p, getIssue as q, registerMachineService as r, startDaemon as s, summarize as t, updateIssue as u, addIssue as v, shortId as w, parseFrontmatter as x, getSkillsServer as y, getSkillsWorkspaceName as z };
15505
+ export { describeMisconfiguration as $, getSkillsWorkspaceName as A, getSkillsCollectionName as B, fetchWithTimeout as C, searchSkills as D, SKILLS_DIR as E, getSkillInfo as F, downloadSkillFile as G, listSkillFiles as H, READ_ONLY_TOOLS as I, loadMachineContext as J, buildMachineInstructions as K, machineToolsForRole as L, buildMachineTools as M, resolveModel as N, formatHandle as O, normalizeAllowedUser as P, loadSecurityContextConfig as Q, RoutineStore as R, ServeAuth as S, resolveSecurityContext as T, buildSecurityContextFromFlags as U, mergeSecurityContexts as V, buildSessionShareUrl as W, computeOutboundHop as X, buildMachineShareUrl as Y, parseHandle as Z, handleMatchesMetadata as _, createSessionStore as a, buildMachineDeps as a0, composeSessionId as a1, generateFriendlyName as a2, generateHookSettings as a3, projectInfo as a4, DefaultTransport$1 as a5, acpBackend as a6, acpAgentConfig as a7, codexMcpBackend as a8, GeminiTransport$1 as a9, claudeAuth as aa, instanceConfig as ab, api as ac, run as ad, stopDaemon as b, connectToHypha as c, daemonStatus as d, clearStopMarker as e, stopMarkerExists as f, getHyphaServerUrl$1 as g, getFrpsSubdomainHost as h, getFrpsServerPort as i, getFrpsServerAddr as j, getHyphaServerUrl as k, hasCookieToken as l, resolveProjectRoot as m, searchIssues as n, listIssues as o, addComment as p, getIssue as q, registerMachineService as r, startDaemon as s, summarize as t, updateIssue as u, addIssue as v, RoutineRunner as w, shortId as x, parseFrontmatter as y, getSkillsServer as z };
@@ -54,7 +54,7 @@ async function handleServeCommand() {
54
54
  }
55
55
  }
56
56
  async function serveAdd(args, machineId) {
57
- const { connectAndGetMachine } = await import('./commands-DbEd_EMK.mjs');
57
+ const { connectAndGetMachine } = await import('./commands-C6I52suC.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-DbEd_EMK.mjs');
96
+ const { connectAndGetMachine } = await import('./commands-C6I52suC.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-DbEd_EMK.mjs');
185
+ const { connectAndGetMachine } = await import('./commands-C6I52suC.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-DbEd_EMK.mjs');
205
+ const { connectAndGetMachine } = await import('./commands-C6I52suC.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-DbEd_EMK.mjs');
238
+ const { connectAndGetMachine } = await import('./commands-C6I52suC.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-DEfioSLJ.mjs';
7
+ import { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run-Ysr90GYa.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-B6KtYbVe.mjs');
736
+ const { FrpcTunnel } = await import('./frpc-bF6D2Qqh.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, H as loadMachineContext, I as buildMachineInstructions, J as machineToolsForRole, K as buildMachineTools } from './run-DEfioSLJ.mjs';
1
+ import { I as READ_ONLY_TOOLS, J as loadMachineContext, K as buildMachineInstructions, L as machineToolsForRole, M as buildMachineTools } from './run-Ysr90GYa.mjs';
2
2
  import 'node:child_process';
3
3
  import 'os';
4
4
  import 'fs/promises';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svamp-cli",
3
- "version": "0.2.166",
3
+ "version": "0.2.168",
4
4
  "description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
5
5
  "author": "Amun AI AB",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -20,7 +20,7 @@
20
20
  "scripts": {
21
21
  "build": "rm -rf dist bin/skills && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && cp -r ../../skills/loop bin/skills/loop && cp -r ../../skills/crew bin/skills/crew && tsc --noEmit && pkgroll",
22
22
  "typecheck": "tsc --noEmit",
23
- "test": "npx tsx test/test-context-window.mjs && npx tsx test/test-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-checklist.mjs && npx tsx test/test-checklist-cli.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-checklist-watchdog.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
+ "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",
24
24
  "test:hypha": "node --no-warnings test/test-hypha-service.mjs",
25
25
  "dev": "tsx src/cli.ts",
26
26
  "dev:daemon": "tsx src/cli.ts daemon start-sync",