svamp-cli 0.2.203 → 0.2.205

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.
Files changed (26) hide show
  1. package/bin/skills/loop/bin/stop-gate.mjs +54 -1
  2. package/bin/skills/loop/test/test-loop-gate.mjs +38 -0
  3. package/dist/{agentCommands-BMbdp3lO.mjs → agentCommands-Dn-TyE-y.mjs} +5 -5
  4. package/dist/{auth-DFV_MjVU.mjs → auth-D87LM3EX.mjs} +1 -1
  5. package/dist/cli.mjs +60 -60
  6. package/dist/{commands-DnTtqcre.mjs → commands-BYPH6u5o.mjs} +1 -1
  7. package/dist/{commands-Cbg4_aEA.mjs → commands-Cdo_UQYx.mjs} +1 -1
  8. package/dist/{commands-CW1VrEei.mjs → commands-Cqu8T0Rs.mjs} +2 -2
  9. package/dist/{commands-DfD7ACo-.mjs → commands-DCGhKy7Z.mjs} +1 -1
  10. package/dist/{commands-Ccbl9q_M.mjs → commands-DF4tYbiX.mjs} +29 -11
  11. package/dist/{commands-CKY0GfUp.mjs → commands-DgMLUDpQ.mjs} +2 -2
  12. package/dist/{commands-CVMpx7Ws.mjs → commands-fZ3aX4Z3.mjs} +5 -5
  13. package/dist/{fleet-Caxg-9CC.mjs → fleet-DqlgPRl6.mjs} +1 -1
  14. package/dist/{frpc-Sq_r6a9i.mjs → frpc-3mZl1NSJ.mjs} +1 -1
  15. package/dist/{headlessCli-CqDPtg1x.mjs → headlessCli-DjTqpDTv.mjs} +2 -2
  16. package/dist/index.mjs +1 -1
  17. package/dist/{package-BAOTsiw2.mjs → package-C0WXJEui.mjs} +1 -1
  18. package/dist/{rpc-DXp0vpxD.mjs → rpc-DCzFvohf.mjs} +2 -2
  19. package/dist/{rpc-BJKoRzGK.mjs → rpc-DRCY1RUn.mjs} +1 -1
  20. package/dist/{run-B5xwuwIO.mjs → run-CtrQ-GRN.mjs} +1 -1
  21. package/dist/{run-CsqoYIvO.mjs → run-n9IQLRFi.mjs} +50 -27
  22. package/dist/{scheduler-CSYBbqjZ.mjs → scheduler-DlibcB06.mjs} +1 -1
  23. package/dist/{serveCommands-CHWW6Mon.mjs → serveCommands-HEc1s3Uh.mjs} +5 -5
  24. package/dist/{serveManager-CkEjrt25.mjs → serveManager-CKkCHofi.mjs} +2 -2
  25. package/dist/{sideband-BXQYf8dr.mjs → sideband-CnLkQa7I.mjs} +1 -1
  26. package/package.json +1 -1
@@ -155,17 +155,70 @@ if (done) {
155
155
  const inboxBlocks = Number(state.inbox_blocks) || 0;
156
156
  if (cfg.inbox_guard !== false && inboxBlocks < INBOX_BLOCK_CAP) {
157
157
  let pending = 0;
158
+ let pendingIds = [];
158
159
  try {
159
160
  const arr = readJSON(join(LOOP_DIR, '..', 'inbox.json'), []);
160
161
  const msgs = Array.isArray(arr) ? arr : (Array.isArray(arr?.messages) ? arr.messages : []);
161
- pending = msgs.filter((m) => m && !m.handled && !m.read).length;
162
+ const pendingMsgs = msgs.filter((m) => m && !m.handled && !m.read);
163
+ pending = pendingMsgs.length;
164
+ pendingIds = pendingMsgs.map((m) => m.messageId).filter(Boolean);
162
165
  } catch { pending = 0; } // fail-open: no/corrupt inbox file → never block
163
166
  if (pending > 0) {
167
+ // #0146: this guard already surfaced these messages — record them in the shared hint ledger so
168
+ // the non-urgent settle hint below won't re-surface the same ids on the next iteration.
169
+ try {
170
+ const HINTED = join(LOOP_DIR, 'hinted-inbox.json');
171
+ const hintedRaw = readJSON(HINTED, []);
172
+ const merged = new Set([...(Array.isArray(hintedRaw) ? hintedRaw : []), ...pendingIds]);
173
+ writeJSONAtomic(HINTED, [...merged]);
174
+ } catch {}
164
175
  writeJSONAtomic(STATE, { ...state, inbox_blocks: inboxBlocks + 1, last_oracle: oracleDetail });
165
176
  appendHistory({ ts: now, iteration: iterNum, decision: 'inbox-block', pending, detail: oracleDetail });
166
177
  block(`The loop's exit conditions are met (oracle empty + evaluator done), but you have ${pending} UNHANDLED inbox message(s). Handle them first — read/reply/triage/merge each (\`svamp session inbox list\`), then finish your turn. (This guard fires at most once per loop, then allows stop, so a flood can't trap the loop.)`);
167
178
  }
168
179
  }
180
+ // #0146: NON-URGENT inbox hint at the settle point. We only reach here when the gate would
181
+ // OTHERWISE ALLOW the end (oracle pass + evaluator done) AND the urgent/unhandled guard above did
182
+ // not block. Surface UNREAD, NON-URGENT, NOT-awaiting-reply inbox messages the agent hasn't been
183
+ // hinted about yet so they don't pile up unseen while the loop grinds. Reads the same durable
184
+ // inbox.json (sibling of the loop dir) — no subprocess/daemon round-trip. Hint-once-per-message:
185
+ // we record the hinted ids in <LOOP_DIR>/hinted-inbox.json and BLOCK ONCE so the agent sees the
186
+ // hint this turn; the next settle won't re-hint the same ids → it allows the end (non-blocking
187
+ // thereafter). Fully defensive: any error → fall through to the normal allow (never trap the loop).
188
+ // Disable with `inbox_hint: false` in loop.config.json.
189
+ if (cfg.inbox_hint !== false) {
190
+ try {
191
+ const HINTED = join(LOOP_DIR, 'hinted-inbox.json');
192
+ const arr = readJSON(join(LOOP_DIR, '..', 'inbox.json'), []);
193
+ const msgs = Array.isArray(arr) ? arr : (Array.isArray(arr?.messages) ? arr.messages : []);
194
+ const hintedRaw = readJSON(HINTED, []);
195
+ const hintedIds = new Set(Array.isArray(hintedRaw) ? hintedRaw : []);
196
+ // unread + not-handled-by-agent + NOT urgent + NOT awaiting-reply (those already interrupt the
197
+ // loop) + not yet hinted. `handled` means the agent already consumed the message into a turn, so
198
+ // it's not "unseen" — only genuinely-unseen non-urgent mail deserves a settle-point nudge.
199
+ const fresh = msgs.filter((m) => m
200
+ && m.read !== true
201
+ && m.handled !== true
202
+ && m.urgency !== 'urgent'
203
+ && !(m.channelId && m.correlationId) // awaiting-reply markers
204
+ && m.messageId && !hintedIds.has(m.messageId));
205
+ if (fresh.length > 0) {
206
+ const preview = fresh.slice(0, 3).map((m) => {
207
+ const who = m.from || m.fromSession || 'unknown';
208
+ const subj = m.subject ? ` re "${m.subject}"` : '';
209
+ return `from ${who}${subj}`;
210
+ }).join('; ');
211
+ const more = fresh.length > 3 ? ` (+${fresh.length - 3} more)` : '';
212
+ // Record BEFORE blocking so the next settle won't re-hint these ids (hint-once guarantee).
213
+ for (const m of fresh) hintedIds.add(m.messageId);
214
+ try { writeJSONAtomic(HINTED, [...hintedIds]); } catch {}
215
+ process.stderr.write(`[loop] 📥 ${fresh.length} unread inbox message(s) while you worked: ${preview}${more}\n`);
216
+ writeJSONAtomic(STATE, { ...state, last_oracle: oracleDetail });
217
+ appendHistory({ ts: now, iteration: iterNum, decision: 'inbox-hint', count: fresh.length, detail: preview });
218
+ block(`📥 ${fresh.length} unread inbox message(s) arrived while you worked: ${preview}${more}. Consider reading them (\`svamp session inbox list\`) before settling. (This hint fires once per message — finish your turn again to be re-checked; it won't block on these again.)`);
219
+ }
220
+ } catch { /* fail-open: any inbox-hint error → never block, fall through to allow */ }
221
+ }
169
222
  // #0128: NON-BLOCKING open-crew hint. The loop is about to STOP — surface any active crew children
170
223
  // the lead hasn't merged/closed so an orphaned/forgotten crew is visible at the natural checkpoint.
171
224
  // Purely informational: it NEVER blocks or affects the decision (the loop still stops). Computed
@@ -374,6 +374,44 @@ try {
374
374
  ok(!r.blocked && readState(d).phase === 'done', 'all-handled inbox allows the loop to complete');
375
375
  }
376
376
 
377
+ // ---- Test 25: NON-URGENT inbox hint at settle — blocks ONCE, then allows (de-duped) (#0146) ----
378
+ console.log('Test 25: non-urgent inbox hint blocks once at settle, then allows (de-duped)');
379
+ { const d = newProject({ evaluator: 'on' }); dirs.push(d);
380
+ writeFileSync(join(d, 'answer.txt'), 'DONE\n'); // oracle passes
381
+ writeVerdict(d, { verdict: 'done', reason: 'ok', state_fp: fp(d) });
382
+ // Disable the #0103 urgent/unhandled guard so we exercise the non-urgent hint in isolation
383
+ // (otherwise the #0103 guard would block first on the same genuinely-pending message).
384
+ const cfgP = join(d, '.svamp', SID, 'loop', 'loop.config.json');
385
+ writeFileSync(cfgP, JSON.stringify({ ...JSON.parse(readFileSync(cfgP, 'utf8')), inbox_guard: false }));
386
+ // A genuinely-unseen (read=false, handled=false), non-urgent, non-awaiting-reply message.
387
+ writeFileSync(join(d, '.svamp', SID, 'inbox.json'), JSON.stringify([
388
+ { messageId: 'n1', from: 'agent:peer', subject: 'fyi', read: false, handled: false, urgency: 'normal' },
389
+ ]));
390
+ const r1 = runGate(d);
391
+ ok(r1.blocked && /unread inbox message/i.test(r1.reason), 'non-urgent unread message hints (blocks once) at the settle point');
392
+ ok(/fyi/.test(r1.reason), 'hint names the subject');
393
+ const hinted = JSON.parse(readFileSync(join(d, '.svamp', SID, 'loop', 'hinted-inbox.json'), 'utf8'));
394
+ ok(hinted.includes('n1'), 'hinted id recorded for de-dupe');
395
+ // Second settle: same message id already hinted → allows the loop to end (non-blocking thereafter).
396
+ const r2 = runGate(d);
397
+ ok(!r2.blocked && readState(d).phase === 'done', 'already-hinted message does not re-block — loop completes');
398
+ }
399
+
400
+ // ---- Test 26: urgent + awaiting-reply messages are NOT hinted by the non-urgent path (#0146) ----
401
+ console.log('Test 26: urgent / awaiting-reply messages skip the non-urgent hint');
402
+ { const d = newProject({ evaluator: 'on' }); dirs.push(d);
403
+ writeFileSync(join(d, 'answer.txt'), 'DONE\n');
404
+ writeVerdict(d, { verdict: 'done', reason: 'ok', state_fp: fp(d) });
405
+ // All handled (no #0103 block); one urgent, one awaiting-reply, one already-read → none qualify.
406
+ writeFileSync(join(d, '.svamp', SID, 'inbox.json'), JSON.stringify([
407
+ { messageId: 'u1', read: false, handled: true, urgency: 'urgent' },
408
+ { messageId: 'a1', read: false, handled: true, channelId: 'c', correlationId: 'x' },
409
+ { messageId: 'r1', read: true, handled: true, urgency: 'normal' },
410
+ ]));
411
+ const r = runGate(d);
412
+ ok(!r.blocked && readState(d).phase === 'done', 'no qualifying non-urgent unread message → loop completes (no noise)');
413
+ }
414
+
377
415
  console.log(`\n${fail === 0 ? '✅' : '❌'} ${pass} passed, ${fail} failed`);
378
416
  process.exit(fail === 0 ? 0 : 1);
379
417
  } 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-CsqoYIvO.mjs';
5
+ import { A as shortId } from './run-n9IQLRFi.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-CsqoYIvO.mjs').then(function (n) { return n.a8; });
99
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-n9IQLRFi.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-DnTtqcre.mjs');
183
+ const { connectAndGetMachine } = await import('./commands-BYPH6u5o.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-DnTtqcre.mjs');
261
+ const { connectAndResolveSession } = await import('./commands-BYPH6u5o.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-DnTtqcre.mjs');
315
+ const { connectAndResolveSession } = await import('./commands-BYPH6u5o.mjs');
316
316
  const { server: localServer, machine: localMachine } = await connectToMachineService();
317
317
  let localDisconnected = false;
318
318
  const disconnectLocal = async () => {
@@ -1,4 +1,4 @@
1
- import { P as resolveModel } from './run-CsqoYIvO.mjs';
1
+ import { P as resolveModel } from './run-n9IQLRFi.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
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-CsqoYIvO.mjs';
1
+ import { e as clearStopMarker, f as stopMarkerExists, s as startDaemon, b as stopDaemon, d as daemonStatus } from './run-n9IQLRFi.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-CsqoYIvO.mjs').then(function (n) { return n.ae; });
37
+ const { getLoadedConfig } = await import('./run-n9IQLRFi.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-CsqoYIvO.mjs').then(function (n) { return n.ag; });
54
+ const { restartDaemon } = await import('./run-n9IQLRFi.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-CVMpx7Ws.mjs');
347
+ const { handleServiceCommand } = await import('./commands-fZ3aX4Z3.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-CHWW6Mon.mjs');
355
+ const { handleServeCommand } = await import('./serveCommands-HEc1s3Uh.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-CW1VrEei.mjs');
364
+ const { processCommand } = await import('./commands-Cqu8T0Rs.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-Ccbl9q_M.mjs');
378
+ const { issueCommand } = await import('./commands-DF4tYbiX.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-Cbg4_aEA.mjs');
382
+ const { workflowCommand } = await import('./commands-Cdo_UQYx.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-CKY0GfUp.mjs');
389
+ const { crewCommand } = await import('./commands-DgMLUDpQ.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-BAOTsiw2.mjs').catch(() => ({ default: { version: "unknown" } }));
397
+ const pkg = await import('./package-C0WXJEui.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-B5xwuwIO.mjs');
406
+ const { runInteractive } = await import('./run-CtrQ-GRN.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-CsqoYIvO.mjs').then(function (n) { return n.ab; });
451
+ const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-n9IQLRFi.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-CsqoYIvO.mjs').then(function (n) { return n.ab; });
463
+ const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-n9IQLRFi.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-CsqoYIvO.mjs').then(function (n) { return n.ac; });
487
+ const { CodexMcpBackend } = await import('./run-n9IQLRFi.mjs').then(function (n) { return n.ac; });
488
488
  backend = new CodexMcpBackend({ cwd, log: logFn });
489
489
  } else {
490
- const { AcpBackend } = await import('./run-CsqoYIvO.mjs').then(function (n) { return n.aa; });
491
- const { GeminiTransport } = await import('./run-CsqoYIvO.mjs').then(function (n) { return n.ad; });
492
- const { DefaultTransport } = await import('./run-CsqoYIvO.mjs').then(function (n) { return n.a9; });
490
+ const { AcpBackend } = await import('./run-n9IQLRFi.mjs').then(function (n) { return n.aa; });
491
+ const { GeminiTransport } = await import('./run-n9IQLRFi.mjs').then(function (n) { return n.ad; });
492
+ const { DefaultTransport } = await import('./run-n9IQLRFi.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-DnTtqcre.mjs');
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-BYPH6u5o.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-DnTtqcre.mjs');
687
+ const { parseShareArg } = await import('./commands-BYPH6u5o.mjs');
688
688
  const shareEntries = share.map((s) => parseShareArg(s));
689
689
  await sessionSpawn(agent, dir, targetMachineId, {
690
690
  message,
@@ -769,7 +769,7 @@ async function handleSessionCommand() {
769
769
  console.error(" Rewinds history: rewrites the message + drops everything after it, then restarts Claude.");
770
770
  process.exit(1);
771
771
  }
772
- const { sessionEditMessage } = await import('./commands-DnTtqcre.mjs');
772
+ const { sessionEditMessage } = await import('./commands-BYPH6u5o.mjs');
773
773
  await sessionEditMessage(sessionArgs[1], sessionArgs[2], sessionArgs[3], targetMachineId);
774
774
  } else if (sessionSubcommand === "refine") {
775
775
  if (!sessionArgs[1] || !sessionArgs[2]) {
@@ -777,7 +777,7 @@ async function handleSessionCommand() {
777
777
  console.error(" Asks the agent to revise its latest reply in place (no extra round).");
778
778
  process.exit(1);
779
779
  }
780
- const { sessionRefineLastReply } = await import('./commands-DnTtqcre.mjs');
780
+ const { sessionRefineLastReply } = await import('./commands-BYPH6u5o.mjs');
781
781
  await sessionRefineLastReply(sessionArgs[1], sessionArgs[2], targetMachineId);
782
782
  } else if (sessionSubcommand === "undo-edit" || sessionSubcommand === "undo") {
783
783
  if (!sessionArgs[1]) {
@@ -785,7 +785,7 @@ async function handleSessionCommand() {
785
785
  console.error(" Reverts the most recent edit/refine, restoring the pre-edit history.");
786
786
  process.exit(1);
787
787
  }
788
- const { sessionUndoEdit } = await import('./commands-DnTtqcre.mjs');
788
+ const { sessionUndoEdit } = await import('./commands-BYPH6u5o.mjs');
789
789
  await sessionUndoEdit(sessionArgs[1], targetMachineId);
790
790
  } else if (sessionSubcommand === "query") {
791
791
  const dir = sessionArgs[1];
@@ -795,7 +795,7 @@ async function handleSessionCommand() {
795
795
  console.error(" Spawns a stateless Claude session in <directory>, sends <prompt>, prints the answer, then deletes the session.");
796
796
  process.exit(1);
797
797
  }
798
- const { sessionQuery } = await import('./commands-DnTtqcre.mjs');
798
+ const { sessionQuery } = await import('./commands-BYPH6u5o.mjs');
799
799
  await sessionQuery(dir, prompt, targetMachineId, {
800
800
  timeout: parseFlagInt("--timeout"),
801
801
  json: hasFlag("--json"),
@@ -828,7 +828,7 @@ async function handleSessionCommand() {
828
828
  console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
829
829
  process.exit(1);
830
830
  }
831
- const { sessionApprove } = await import('./commands-DnTtqcre.mjs');
831
+ const { sessionApprove } = await import('./commands-BYPH6u5o.mjs');
832
832
  const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
833
833
  await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
834
834
  json: hasFlag("--json")
@@ -838,7 +838,7 @@ async function handleSessionCommand() {
838
838
  console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
839
839
  process.exit(1);
840
840
  }
841
- const { sessionDeny } = await import('./commands-DnTtqcre.mjs');
841
+ const { sessionDeny } = await import('./commands-BYPH6u5o.mjs');
842
842
  const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
843
843
  await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
844
844
  json: hasFlag("--json")
@@ -880,7 +880,7 @@ async function handleSessionCommand() {
880
880
  console.error("Usage: svamp session set-title <title>");
881
881
  process.exit(1);
882
882
  }
883
- const { sessionSetTitle } = await import('./agentCommands-BMbdp3lO.mjs');
883
+ const { sessionSetTitle } = await import('./agentCommands-Dn-TyE-y.mjs');
884
884
  await sessionSetTitle(title);
885
885
  } else if (sessionSubcommand === "set-project-description" || sessionSubcommand === "set-project") {
886
886
  const desc = sessionArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
@@ -888,7 +888,7 @@ async function handleSessionCommand() {
888
888
  console.error("Usage: svamp session set-project-description <text>");
889
889
  process.exit(1);
890
890
  }
891
- const { sessionSetProjectDescription } = await import('./agentCommands-BMbdp3lO.mjs');
891
+ const { sessionSetProjectDescription } = await import('./agentCommands-Dn-TyE-y.mjs');
892
892
  await sessionSetProjectDescription(desc);
893
893
  } else if (sessionSubcommand === "set-link") {
894
894
  const url = sessionArgs[1];
@@ -897,7 +897,7 @@ async function handleSessionCommand() {
897
897
  process.exit(1);
898
898
  }
899
899
  const label = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
900
- const { sessionSetLink } = await import('./agentCommands-BMbdp3lO.mjs');
900
+ const { sessionSetLink } = await import('./agentCommands-Dn-TyE-y.mjs');
901
901
  await sessionSetLink(url, label);
902
902
  } else if (sessionSubcommand === "notify") {
903
903
  const message = sessionArgs[1];
@@ -906,7 +906,7 @@ async function handleSessionCommand() {
906
906
  process.exit(1);
907
907
  }
908
908
  const level = parseFlagStr("--level") || "info";
909
- const { sessionNotify } = await import('./agentCommands-BMbdp3lO.mjs');
909
+ const { sessionNotify } = await import('./agentCommands-Dn-TyE-y.mjs');
910
910
  await sessionNotify(message, level);
911
911
  } else if (sessionSubcommand === "broadcast") {
912
912
  const action = sessionArgs[1];
@@ -914,7 +914,7 @@ async function handleSessionCommand() {
914
914
  console.error("Usage: svamp session broadcast <action> [args...]\nActions: open-canvas <url> [label], close-canvas, toast <message>");
915
915
  process.exit(1);
916
916
  }
917
- const { sessionBroadcast } = await import('./agentCommands-BMbdp3lO.mjs');
917
+ const { sessionBroadcast } = await import('./agentCommands-Dn-TyE-y.mjs');
918
918
  await sessionBroadcast(action, sessionArgs.slice(2).filter((a) => !a.startsWith("--")));
919
919
  } else if (sessionSubcommand === "inbox") {
920
920
  const inboxSubcmd = sessionArgs[1];
@@ -925,7 +925,7 @@ async function handleSessionCommand() {
925
925
  process.exit(1);
926
926
  }
927
927
  if (agentSessionId) {
928
- const { inboxSend } = await import('./agentCommands-BMbdp3lO.mjs');
928
+ const { inboxSend } = await import('./agentCommands-Dn-TyE-y.mjs');
929
929
  await inboxSend(sessionArgs[2], {
930
930
  body: sessionArgs[3],
931
931
  subject: parseFlagStr("--subject"),
@@ -940,7 +940,7 @@ async function handleSessionCommand() {
940
940
  }
941
941
  } else if (inboxSubcmd === "list" || inboxSubcmd === "ls") {
942
942
  if (agentSessionId && !sessionArgs[2]) {
943
- const { inboxList } = await import('./agentCommands-BMbdp3lO.mjs');
943
+ const { inboxList } = await import('./agentCommands-Dn-TyE-y.mjs');
944
944
  await inboxList({
945
945
  unread: hasFlag("--unread"),
946
946
  limit: parseFlagInt("--limit"),
@@ -962,7 +962,7 @@ async function handleSessionCommand() {
962
962
  process.exit(1);
963
963
  }
964
964
  if (agentSessionId && !sessionArgs[3]) {
965
- const { inboxList } = await import('./agentCommands-BMbdp3lO.mjs');
965
+ const { inboxList } = await import('./agentCommands-Dn-TyE-y.mjs');
966
966
  await sessionInboxRead(agentSessionId, sessionArgs[2], targetMachineId);
967
967
  } else if (sessionArgs[3]) {
968
968
  await sessionInboxRead(sessionArgs[2], sessionArgs[3], targetMachineId);
@@ -972,7 +972,7 @@ async function handleSessionCommand() {
972
972
  }
973
973
  } else if (inboxSubcmd === "reply") {
974
974
  if (agentSessionId && sessionArgs[2] && sessionArgs[3] && !sessionArgs[4]) {
975
- const { inboxReply } = await import('./agentCommands-BMbdp3lO.mjs');
975
+ const { inboxReply } = await import('./agentCommands-Dn-TyE-y.mjs');
976
976
  await inboxReply(sessionArgs[2], sessionArgs[3]);
977
977
  } else if (sessionArgs[2] && sessionArgs[3] && sessionArgs[4]) {
978
978
  await sessionInboxReply(sessionArgs[2], sessionArgs[3], sessionArgs[4], targetMachineId);
@@ -1010,7 +1010,7 @@ async function handleMachineCommand() {
1010
1010
  return;
1011
1011
  }
1012
1012
  if (machineSubcommand === "share") {
1013
- const { machineShare } = await import('./commands-DnTtqcre.mjs');
1013
+ const { machineShare } = await import('./commands-BYPH6u5o.mjs');
1014
1014
  let machineId;
1015
1015
  const shareArgs = [];
1016
1016
  for (let i = 1; i < machineArgs.length; i++) {
@@ -1061,14 +1061,14 @@ async function handleMachineCommand() {
1061
1061
  process.exit(1);
1062
1062
  }
1063
1063
  if (all) {
1064
- const { fleetExec } = await import('./fleet-Caxg-9CC.mjs');
1064
+ const { fleetExec } = await import('./fleet-DqlgPRl6.mjs');
1065
1065
  await fleetExec(command, { cwd });
1066
1066
  } else {
1067
- const { machineExec } = await import('./commands-DnTtqcre.mjs');
1067
+ const { machineExec } = await import('./commands-BYPH6u5o.mjs');
1068
1068
  await machineExec(machineId, command, cwd);
1069
1069
  }
1070
1070
  } else if (machineSubcommand === "info") {
1071
- const { machineInfo } = await import('./commands-DnTtqcre.mjs');
1071
+ const { machineInfo } = await import('./commands-BYPH6u5o.mjs');
1072
1072
  let machineId;
1073
1073
  for (let i = 1; i < machineArgs.length; i++) {
1074
1074
  if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
@@ -1088,10 +1088,10 @@ async function handleMachineCommand() {
1088
1088
  level = machineArgs[++i];
1089
1089
  }
1090
1090
  }
1091
- const { machineNotify } = await import('./agentCommands-BMbdp3lO.mjs');
1091
+ const { machineNotify } = await import('./agentCommands-Dn-TyE-y.mjs');
1092
1092
  await machineNotify(message, level);
1093
1093
  } else if (machineSubcommand === "ls") {
1094
- const { machineLs } = await import('./commands-DnTtqcre.mjs');
1094
+ const { machineLs } = await import('./commands-BYPH6u5o.mjs');
1095
1095
  let machineId;
1096
1096
  let showHidden = false;
1097
1097
  let path;
@@ -1147,20 +1147,20 @@ Examples:
1147
1147
  };
1148
1148
  const hasFlag = (name) => fleetArgs.includes(`--${name}`);
1149
1149
  if (sub === "status") {
1150
- const { fleetStatus } = await import('./fleet-Caxg-9CC.mjs');
1150
+ const { fleetStatus } = await import('./fleet-DqlgPRl6.mjs');
1151
1151
  await fleetStatus();
1152
1152
  } else if (sub === "upgrade-claude") {
1153
- const { fleetUpgradeClaude } = await import('./fleet-Caxg-9CC.mjs');
1153
+ const { fleetUpgradeClaude } = await import('./fleet-DqlgPRl6.mjs');
1154
1154
  await fleetUpgradeClaude({ version: flag("version", "-v") });
1155
1155
  } else if (sub === "upgrade-svamp") {
1156
- const { fleetUpgradeSvamp } = await import('./fleet-Caxg-9CC.mjs');
1156
+ const { fleetUpgradeSvamp } = await import('./fleet-DqlgPRl6.mjs');
1157
1157
  await fleetUpgradeSvamp({ version: flag("version", "-v"), excludeSelf: hasFlag("exclude-self") });
1158
1158
  } else if (sub === "daemon-restart") {
1159
- const { fleetDaemonRestart } = await import('./fleet-Caxg-9CC.mjs');
1159
+ const { fleetDaemonRestart } = await import('./fleet-DqlgPRl6.mjs');
1160
1160
  await fleetDaemonRestart({ graceful: !hasFlag("cleanup") });
1161
1161
  } else if (sub === "push-skill") {
1162
1162
  const name = fleetArgs[1];
1163
- const { fleetPushSkill } = await import('./fleet-Caxg-9CC.mjs');
1163
+ const { fleetPushSkill } = await import('./fleet-DqlgPRl6.mjs');
1164
1164
  await fleetPushSkill(name);
1165
1165
  } else {
1166
1166
  console.error(`Unknown fleet subcommand: ${sub}`);
@@ -1176,7 +1176,7 @@ async function handleSkillsCommand() {
1176
1176
  await printSkillsHelp();
1177
1177
  return;
1178
1178
  }
1179
- const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-DfD7ACo-.mjs');
1179
+ const { skillsFind, skillsInstall, skillsList, skillsRemove, skillsPublish } = await import('./commands-DCGhKy7Z.mjs');
1180
1180
  if (skillsSubcommand === "find" || skillsSubcommand === "search") {
1181
1181
  const query = skillsArgs.slice(1).filter((a) => !a.startsWith("--")).join(" ");
1182
1182
  if (!query) {
@@ -1223,7 +1223,7 @@ async function loginToHypha() {
1223
1223
  process.exit(1);
1224
1224
  }
1225
1225
  const anchor = anchorArg.replace(/\/+$/, "");
1226
- const { loadInstanceConfig } = await import('./run-CsqoYIvO.mjs').then(function (n) { return n.ae; });
1226
+ const { loadInstanceConfig } = await import('./run-n9IQLRFi.mjs').then(function (n) { return n.ae; });
1227
1227
  let cfg = null;
1228
1228
  try {
1229
1229
  cfg = await loadInstanceConfig({ anchor, force: true });
@@ -1334,7 +1334,7 @@ async function logoutFromHypha() {
1334
1334
  } catch {
1335
1335
  }
1336
1336
  try {
1337
- const { clearInstanceConfigCache } = await import('./run-CsqoYIvO.mjs').then(function (n) { return n.ae; });
1337
+ const { clearInstanceConfigCache } = await import('./run-n9IQLRFi.mjs').then(function (n) { return n.ae; });
1338
1338
  clearInstanceConfigCache();
1339
1339
  } catch {
1340
1340
  }
@@ -1672,7 +1672,7 @@ async function applyClaudeAuthFlags(argv) {
1672
1672
  "--use-hypha-proxy, --use-claude-login, and --anthropic-base-url/--anthropic-api-key are mutually exclusive"
1673
1673
  );
1674
1674
  }
1675
- const mod = await import('./run-CsqoYIvO.mjs').then(function (n) { return n.a7; });
1675
+ const mod = await import('./run-n9IQLRFi.mjs').then(function (n) { return n.a7; });
1676
1676
  if (hasHypha) {
1677
1677
  let url;
1678
1678
  const hyphaIdx = argv.indexOf("--use-hypha-proxy");
@@ -1726,7 +1726,7 @@ async function applyDaemonShareFlag(argv) {
1726
1726
  }
1727
1727
  }
1728
1728
  if (collected.length === 0) return;
1729
- const { updateEnvFile } = await import('./run-CsqoYIvO.mjs').then(function (n) { return n.a7; });
1729
+ const { updateEnvFile } = await import('./run-n9IQLRFi.mjs').then(function (n) { return n.a7; });
1730
1730
  const seen = /* @__PURE__ */ new Set();
1731
1731
  const deduped = collected.filter((e) => {
1732
1732
  const k = e.toLowerCase();
@@ -1759,7 +1759,7 @@ async function handleWiseAgentCommand(rest) {
1759
1759
  }
1760
1760
  });
1761
1761
  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(" ");
1762
- const { wiseAskCli } = await import('./commands-DnTtqcre.mjs');
1762
+ const { wiseAskCli } = await import('./commands-BYPH6u5o.mjs');
1763
1763
  await wiseAskCli(machineId, message, sessionId, { json });
1764
1764
  return;
1765
1765
  }
@@ -1771,7 +1771,7 @@ async function handleWiseAgentCommand(rest) {
1771
1771
  }
1772
1772
  return void 0;
1773
1773
  };
1774
- const { runWiseVoiceCli } = await import('./headlessCli-CqDPtg1x.mjs');
1774
+ const { runWiseVoiceCli } = await import('./headlessCli-DjTqpDTv.mjs');
1775
1775
  await runWiseVoiceCli({ voice: valueOf(["--voice"]), wakeKeywordPath: valueOf(["--wake"]), model: valueOf(["--model"]) });
1776
1776
  return;
1777
1777
  }
@@ -1789,7 +1789,7 @@ async function handleWiseAgentCommand(rest) {
1789
1789
  const mode = valueOf(["--mode"]);
1790
1790
  const mission = valueOf(["--mission"]);
1791
1791
  const url = rest.slice(1).find((a) => /^https?:\/\//.test(a)) || "";
1792
- const { wiseJoinMeetingCli } = await import('./commands-DnTtqcre.mjs');
1792
+ const { wiseJoinMeetingCli } = await import('./commands-BYPH6u5o.mjs');
1793
1793
  await wiseJoinMeetingCli(machineId, url, sessionId, { json, mode, mission });
1794
1794
  return;
1795
1795
  }
@@ -1801,7 +1801,7 @@ async function handleWiseAgentCommand(rest) {
1801
1801
  }
1802
1802
  return void 0;
1803
1803
  };
1804
- const { wiseLeaveMeetingCli } = await import('./commands-DnTtqcre.mjs');
1804
+ const { wiseLeaveMeetingCli } = await import('./commands-BYPH6u5o.mjs');
1805
1805
  await wiseLeaveMeetingCli(valueOf(["--machine", "-m"]), valueOf(["--session", "-s"]), { json: rest.includes("--json") });
1806
1806
  return;
1807
1807
  }
@@ -1825,7 +1825,7 @@ async function handleWiseAgentCommand(rest) {
1825
1825
  }
1826
1826
  });
1827
1827
  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(" ");
1828
- const { wiseAnnounceCli } = await import('./commands-DnTtqcre.mjs');
1828
+ const { wiseAnnounceCli } = await import('./commands-BYPH6u5o.mjs');
1829
1829
  await wiseAnnounceCli(machineId, text, sessionId, { json });
1830
1830
  return;
1831
1831
  }
@@ -1837,7 +1837,7 @@ async function handleWiseAgentCommand(rest) {
1837
1837
  }
1838
1838
  return void 0;
1839
1839
  };
1840
- const { wiseMeetingsCli } = await import('./commands-DnTtqcre.mjs');
1840
+ const { wiseMeetingsCli } = await import('./commands-BYPH6u5o.mjs');
1841
1841
  await wiseMeetingsCli(valueOf(["--machine", "-m"]), { json: rest.includes("--json") });
1842
1842
  return;
1843
1843
  }
@@ -1887,7 +1887,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1887
1887
  return;
1888
1888
  }
1889
1889
  const authArgs = rest.slice(1);
1890
- const mod = await import('./auth-DFV_MjVU.mjs');
1890
+ const mod = await import('./auth-D87LM3EX.mjs');
1891
1891
  let action;
1892
1892
  try {
1893
1893
  action = mod.parseWiseAgentAuthArgs(authArgs);
@@ -1897,7 +1897,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1897
1897
  return;
1898
1898
  }
1899
1899
  if (action) {
1900
- const { updateEnvFile } = await import('./run-CsqoYIvO.mjs').then(function (n) { return n.a7; });
1900
+ const { updateEnvFile } = await import('./run-n9IQLRFi.mjs').then(function (n) { return n.a7; });
1901
1901
  const updates = mod.buildWiseAgentEnvUpdates(action);
1902
1902
  updateEnvFile(updates);
1903
1903
  for (const [k, v] of Object.entries(updates)) {
@@ -1911,7 +1911,7 @@ If none is set, hitting a WISE Agent channel returns a clear "not configured" er
1911
1911
  }
1912
1912
  async function handleDaemonAuthCommand(argv) {
1913
1913
  const sub = (argv[0] || "status").toLowerCase();
1914
- const mod = await import('./run-CsqoYIvO.mjs').then(function (n) { return n.a7; });
1914
+ const mod = await import('./run-n9IQLRFi.mjs').then(function (n) { return n.a7; });
1915
1915
  if (sub === "--help" || sub === "-h" || sub === "help") {
1916
1916
  console.log(`
1917
1917
  svamp daemon auth \u2014 Configure how Claude subprocesses authenticate
@@ -2224,7 +2224,7 @@ Examples:
2224
2224
  async function printSkillsHelp() {
2225
2225
  let browseUrl = "<HYPHA_SERVER_URL>/<workspace>/artifacts/marketplace (set HYPHA_SERVER_URL)";
2226
2226
  try {
2227
- const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-CsqoYIvO.mjs').then(function (n) { return n.af; });
2227
+ const { getArtifactBaseUrl, getSkillsCollectionName } = await import('./run-n9IQLRFi.mjs').then(function (n) { return n.af; });
2228
2228
  browseUrl = `${getArtifactBaseUrl()}/${getSkillsCollectionName()}`;
2229
2229
  } catch {
2230
2230
  }
@@ -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-CsqoYIvO.mjs';
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-n9IQLRFi.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -1,5 +1,5 @@
1
1
  import { spawnSync } from 'node:child_process';
2
- import { m as resolveProjectRoot } from './run-CsqoYIvO.mjs';
2
+ import { m as resolveProjectRoot } from './run-n9IQLRFi.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,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-DnTtqcre.mjs';
3
+ import { connectAndGetMachine } from './commands-BYPH6u5o.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-CsqoYIvO.mjs';
8
+ import './run-n9IQLRFi.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -1,7 +1,7 @@
1
1
  import os from 'os';
2
2
  import fs__default from 'fs';
3
3
  import { resolve, join, relative } from 'path';
4
- import { 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-CsqoYIvO.mjs';
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-n9IQLRFi.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
@@ -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-CsqoYIvO.mjs';
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-n9IQLRFi.mjs';
3
3
  import 'os';
4
4
  import 'fs/promises';
5
5
  import 'fs';
@@ -63,7 +63,8 @@ function fmtIssue(i) {
63
63
  const label = i.labels.length ? ` [${i.labels.join(", ")}]` : "";
64
64
  const v = i.verify ? ` (verify:${i.verify.type})` : "";
65
65
  const br = i.branch ? ` {branch:${i.branch}}` : "";
66
- return `#${i.id} ${STATUS_GLYPH[i.status]} ${i.title}${tri}${disp}${label}${v}${br}`;
66
+ const ans = i.answer ? " \u21A9answered" : "";
67
+ return `#${i.id} ${STATUS_GLYPH[i.status]} ${i.title}${tri}${disp}${label}${v}${br}${ans}`;
67
68
  }
68
69
  function buildVerify(args) {
69
70
  const cmd = flag(args, "--verify-cmd");
@@ -157,6 +158,10 @@ ${s.ready} ready \xB7 ${s.in_progress} in-progress \xB7 ${s.archived} archived`)
157
158
  }
158
159
  out(fmtIssue(issue));
159
160
  out(`status: ${issue.status} \xB7 scope: ${issue.scope} \xB7 created: ${issue.created}${issue.closed ? ` \xB7 closed: ${issue.closed}` : ""}`);
161
+ if (issue.answer) out(`
162
+ \u21A9 The user answered your question \u2014 act on this: ${issue.answer}`);
163
+ if (issue.question) out(`
164
+ \u23F8 Paused \u2014 awaiting your question: ${issue.question.text}`);
160
165
  if (issue.original) out(`
161
166
  Original request:
162
167
  ${issue.original}`);
@@ -175,7 +180,7 @@ ${issue.body}`);
175
180
  const worker = flag(rest, "--session") || sessionId;
176
181
  const cur = getIssue(root, id);
177
182
  const claim = worker && cur && cur.scope === "project" && !cur.session ? { session: worker } : {};
178
- const updated = updateIssue(root, id, { status: "in_progress", ...branch ? { branch } : {}, ...claim });
183
+ const updated = updateIssue(root, id, { status: "in_progress", answer: null, ...branch ? { branch } : {}, ...claim });
179
184
  if (!updated) {
180
185
  console.error(`Issue not found: ${id}`);
181
186
  process.exit(1);
@@ -367,7 +372,9 @@ ${tail}
367
372
  " - A question you can just answer \u2192 reply, then close.",
368
373
  " - Belongs to another session/repo \u2192 say where it should go (and route it), then close/redirect.",
369
374
  " B. UNDERSPECIFIED? Do not guess. Enrich from the codebase where you can, and CONFIRM with the user",
370
- " for anything genuinely ambiguous (ask 1-2 sharp questions) BEFORE marking it ready.",
375
+ " for anything genuinely ambiguous (ask 1-2 sharp questions) BEFORE marking it ready. TRIAGE is THE",
376
+ " place to ask \u2014 the work loop runs on sensible defaults and will NOT stop to ask, so surface every",
377
+ ' real question now (`svamp issue pause <id> --question "\u2026" [--option "A" --option "B"]`).',
371
378
  " C. SPLIT if the post bundles several independent asks: `svamp issue add` one per piece (carry the",
372
379
  " relevant context), triage each, keep the original as the primary.",
373
380
  " D. AUTOMATION: if it implies running on a schedule/event, `svamp workflow add` it (instead of / in",
@@ -387,22 +394,33 @@ ${tail}
387
394
  ].join("\n"));
388
395
  } else if (topic === "work") {
389
396
  out([
390
- "WORK the ready issues in THIS session's backlog (your own + shared project items; leave other",
391
- "sessions' private items alone). List: svamp issue list --status ready --session <id>.",
397
+ "WORK the actionable issues in THIS session's backlog (your own + shared project items; leave other",
398
+ "sessions' private items alone). List them with: svamp issue list --session <id> (shows ready AND",
399
+ "in-progress \u2014 a RESUMED issue is in-progress, so a ready-only filter would hide it). An issue badged",
400
+ "\u21A9answered carries a fresh user answer \u2014 work that one FIRST.",
392
401
  " TRIAGE FIRST any \u25B3triage (untriaged) issue \u2014 see `svamp issue guide triage`.",
393
402
  " For each issue:",
394
- " 1. On pickup: svamp issue work <id> (status \u2192 in_progress; live status reflects the work).",
403
+ " 1. On pickup: `svamp issue show <id>` FIRST, then `svamp issue work <id>`. ALWAYS read show \u2014 its",
404
+ ' top surfaces any "\u21A9 The user answered your question \u2014 act on this: \u2026" line. Picking up via',
405
+ " `work` clears that badge, so read it before you do. (status \u2192 in_progress; live status updates.)",
395
406
  ' 2. As you go: leave substantive `svamp issue comment <id> "\u2026"` notes \u2014 decisions, takeaways, blockers.',
396
407
  " 3. Before closing: VERIFY with evidence \u2014 run its verify-cmd; for verify:agent cite the files/commit",
397
408
  " that resolve it in a summary comment. Post the summary, THEN `svamp issue close <id>`.",
398
409
  " NEVER close an issue that isn't genuinely resolved.",
399
410
  " CONVERGE TO MAIN: if an issue used an isolated branch/worktree, merge it back to `main` (and remove",
400
411
  " the worktree) BEFORE closing \u2014 never leave unmerged branches.",
401
- " BLOCKED ON THE USER? Do NOT churn. PAUSE the issue with the question (and options, if any):",
412
+ "",
413
+ " DEFAULT FORWARD \u2014 DON'T PAUSE TO ASK QUESTIONS DURING WORK. Clarifying/preference questions belong in",
414
+ " TRIAGE, not here. While working, if something is ambiguous, pick the most sensible default, PROCEED, and",
415
+ " DOCUMENT the assumption in a `svamp issue comment` (so the user can correct it). An over-eager pause",
416
+ " defeats the whole point of an automated loop.",
417
+ " PAUSE ONLY when you are genuinely BLOCKED and cannot proceed by any reasonable default \u2014 e.g. you need a",
418
+ " secret/credential/access only the user has, an irreversible or destructive action needs sign-off, or the",
419
+ " user EXPLICITLY reserved the decision. In that case:",
402
420
  ' svamp issue pause <id> --question "\u2026" [--option "A" --option "B"]',
403
- " A paused issue is EXCLUDED from `pending`, so the loop can STOP cleanly instead of re-running on",
404
- " something only the user can unblock. The user answers (the app renders the options as buttons) \u2192",
405
- ' the issue resumes (`svamp issue resume <id> [--answer "\u2026"]`) and you pick it up again.',
421
+ " A paused issue is EXCLUDED from `pending`, so the loop stops cleanly. The user answers (app renders the",
422
+ " options as buttons) \u2192 it resumes in-progress, badged \u21A9answered with the answer surfaced at the top of",
423
+ " `show` \u2014 re-pick it up and act on the answer (do NOT re-ask the same question).",
406
424
  " Keep going until `svamp issue pending --session <id>` is empty (paused issues don't count)."
407
425
  ].join("\n"));
408
426
  } else {
@@ -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-DnTtqcre.mjs';
3
+ import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-BYPH6u5o.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-CsqoYIvO.mjs';
5
+ import { u as updateIssue, q as addComment, t as addIssue, A as shortId } from './run-n9IQLRFi.mjs';
6
6
  import 'node:os';
7
7
  import 'os';
8
8
  import 'fs/promises';
@@ -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-Sq_r6a9i.mjs');
61
+ const { runFrpcTunnel } = await import('./frpc-3mZl1NSJ.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-DnTtqcre.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-BYPH6u5o.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-Sq_r6a9i.mjs');
126
+ const { runFrpcTunnel } = await import('./frpc-3mZl1NSJ.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-DnTtqcre.mjs');
135
+ const { connectAndGetMachine } = await import('./commands-BYPH6u5o.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-DnTtqcre.mjs');
175
+ const { connectAndGetMachine } = await import('./commands-BYPH6u5o.mjs');
176
176
  const { server, machine } = await connectAndGetMachine();
177
177
  try {
178
178
  await machine.tunnelStop({ name });
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import os from 'node:os';
4
- import { c as connectToHypha } from './run-CsqoYIvO.mjs';
4
+ import { c as connectToHypha } from './run-n9IQLRFi.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-CsqoYIvO.mjs';
7
+ import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-n9IQLRFi.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-CsqoYIvO.mjs';
2
- import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-BXQYf8dr.mjs';
1
+ import { P as resolveModel, a1 as describeMisconfiguration, a2 as buildMachineDeps } from './run-n9IQLRFi.mjs';
2
+ import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-CnLkQa7I.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-CsqoYIvO.mjs';
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-n9IQLRFi.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.203";
2
+ var version = "0.2.205";
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";
@@ -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-CsqoYIvO.mjs';
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-n9IQLRFi.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -140,7 +140,7 @@ function issueRpc(cwd, params, deps = {}) {
140
140
  return updated;
141
141
  }
142
142
  case "work": {
143
- const patch = { status: "in_progress" };
143
+ const patch = { status: "in_progress", answer: null };
144
144
  if (params.branch) patch.branch = String(params.branch);
145
145
  const worker = params.session || null;
146
146
  const cur = getIssue(root, String(params.id));
@@ -1,4 +1,4 @@
1
- import { m as resolveProjectRoot } from './run-CsqoYIvO.mjs';
1
+ import { m as resolveProjectRoot } from './run-n9IQLRFi.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{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-CsqoYIvO.mjs';
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-n9IQLRFi.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-Sq_r6a9i.mjs');
2915
+ const { FrpcTunnel } = await import('./frpc-3mZl1NSJ.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-BXQYf8dr.mjs');
3362
+ const { toolsForRole } = await import('./sideband-CnLkQa7I.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-DnTtqcre.mjs');
3461
+ const { queryCore } = await import('./commands-BYPH6u5o.mjs');
3462
3462
  const timeout = c.reply?.timeout_sec || 120;
3463
3463
  let result;
3464
3464
  try {
@@ -4586,6 +4586,10 @@ function createSessionStore(server, sessionId, initialMetadata, initialAgentStat
4586
4586
  metadata
4587
4587
  };
4588
4588
  }
4589
+ if (newMetadata && typeof newMetadata === "object" && "isOrphaned" in newMetadata) {
4590
+ const { isOrphaned: _drop, ...rest } = newMetadata;
4591
+ newMetadata = rest;
4592
+ }
4589
4593
  metadata = newMetadata;
4590
4594
  metadataVersion++;
4591
4595
  notifyListeners({
@@ -5351,6 +5355,17 @@ Output ONLY the full revised reply text \u2014 no preamble, no commentary, no su
5351
5355
  ...lastActivity
5352
5356
  });
5353
5357
  },
5358
+ // #0137: re-broadcast the current activity (active + real thinking flag) without
5359
+ // changing it. Bumps `time` so the frontend treats it as the freshest signal and
5360
+ // won't let an older getSessions snapshot override it.
5361
+ reEmitActivity: () => {
5362
+ lastActivity = { ...lastActivity, time: Date.now() };
5363
+ notifyListeners({
5364
+ type: "activity",
5365
+ sessionId,
5366
+ ...lastActivity
5367
+ });
5368
+ },
5354
5369
  clearMessages: () => {
5355
5370
  messages.length = 0;
5356
5371
  nextSeq = 1;
@@ -10391,7 +10406,7 @@ function normalizeStatus(s) {
10391
10406
  if (s === "done") return "archived";
10392
10407
  return s === "ready" || s === "in_progress" || s === "paused" || s === "archived" ? s : "ready";
10393
10408
  }
10394
- const FIELD_ORDER = ["id", "title", "status", "scope", "labels", "verify", "disposition", "triaged", "branch", "session", "owner", "original", "created", "closed", "question"];
10409
+ const FIELD_ORDER = ["id", "title", "status", "scope", "labels", "verify", "disposition", "triaged", "branch", "session", "owner", "original", "created", "closed", "question", "answer"];
10395
10410
  function resolveProjectRoot(start = process.cwd()) {
10396
10411
  let dir = start;
10397
10412
  for (let i = 0; i < 40; i++) {
@@ -10453,6 +10468,7 @@ function parseIssue(content) {
10453
10468
  created: String(fm.created ?? (/* @__PURE__ */ new Date()).toISOString()),
10454
10469
  closed: fm.closed ?? null,
10455
10470
  question: fm.question && typeof fm.question === "object" ? fm.question : null,
10471
+ answer: typeof fm.answer === "string" && fm.answer.trim() ? fm.answer : null,
10456
10472
  body: (m[2] || "").trim() || void 0
10457
10473
  };
10458
10474
  }
@@ -10571,14 +10587,15 @@ Options: ${q.options.join(" \xB7 ")}` : "";
10571
10587
  } else {
10572
10588
  addComment(projectRoot, id, "\u23F8 Paused \u2014 waiting on your input.");
10573
10589
  }
10574
- return updateIssue(projectRoot, id, { status: "paused", question: q });
10590
+ return updateIssue(projectRoot, id, { status: "paused", question: q, answer: null });
10575
10591
  }
10576
10592
  function resumeIssue(projectRoot, id, answer) {
10577
10593
  const cur = getIssue(projectRoot, id);
10578
10594
  if (!cur) return null;
10579
- if (answer && answer.trim()) addComment(projectRoot, id, `\u25B6 Resumed \u2014 your answer: ${answer.trim()}`);
10595
+ const a = answer && answer.trim() ? answer.trim() : "";
10596
+ if (a) addComment(projectRoot, id, `\u25B6 Resumed \u2014 your answer: ${a}`);
10580
10597
  else addComment(projectRoot, id, "\u25B6 Resumed.");
10581
- return updateIssue(projectRoot, id, { status: "in_progress", question: null });
10598
+ return updateIssue(projectRoot, id, { status: "in_progress", question: null, answer: a || null });
10582
10599
  }
10583
10600
  function routeCrewVerdict(projectRoot, childSessionId, v) {
10584
10601
  const linked = listIssues(projectRoot, { includeArchived: true }).find((i) => i.disposition === "crew" && i.session === childSessionId);
@@ -12122,7 +12139,7 @@ async function startDaemon(options) {
12122
12139
  saveExposedTunnels(list);
12123
12140
  }
12124
12141
  async function createExposedTunnel(spec) {
12125
- const { FrpcTunnel } = await import('./frpc-Sq_r6a9i.mjs');
12142
+ const { FrpcTunnel } = await import('./frpc-3mZl1NSJ.mjs');
12126
12143
  const tunnel = new FrpcTunnel({
12127
12144
  name: spec.name,
12128
12145
  ports: spec.ports,
@@ -12142,7 +12159,7 @@ async function startDaemon(options) {
12142
12159
  return tunnel;
12143
12160
  }
12144
12161
  const tunnelRecreateState = /* @__PURE__ */ new Map();
12145
- const { ServeManager } = await import('./serveManager-CkEjrt25.mjs');
12162
+ const { ServeManager } = await import('./serveManager-CKkCHofi.mjs');
12146
12163
  const serveManager = new ServeManager(SVAMP_HOME, (msg) => logger.log(`[SERVE] ${msg}`), hyphaServerUrl);
12147
12164
  ensureAutoInstalledSkills(logger).catch(() => {
12148
12165
  });
@@ -12251,6 +12268,23 @@ ${v.guidance ? v.guidance + "\n" : ""}Criteria: ${v.criteria || "(none)"}
12251
12268
  consecutiveHeartbeatFailures = 0;
12252
12269
  lastReconnectAt = Date.now();
12253
12270
  }
12271
+ const reEmitLiveness = (phase) => {
12272
+ try {
12273
+ let reEmitted = 0;
12274
+ for (const tracked of pidToTrackedSession.values()) {
12275
+ if (tracked.stopped || !tracked.hyphaService) continue;
12276
+ try {
12277
+ tracked.hyphaService.reEmitActivity();
12278
+ reEmitted++;
12279
+ } catch {
12280
+ }
12281
+ }
12282
+ if (reEmitted > 0) logger.log(`[#0137] re-emitted liveness for ${reEmitted} live session(s) after reconnect (${phase})`);
12283
+ } catch {
12284
+ }
12285
+ };
12286
+ reEmitLiveness("immediate");
12287
+ setTimeout(() => reEmitLiveness("delayed"), 2500);
12254
12288
  });
12255
12289
  const getCurrentChildren = () => {
12256
12290
  return Array.from(pidToTrackedSession.values()).map((s) => {
@@ -14006,11 +14040,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
14006
14040
  });
14007
14041
  },
14008
14042
  onIssue: async (params) => {
14009
- const { issueRpc } = await import('./rpc-DXp0vpxD.mjs');
14043
+ const { issueRpc } = await import('./rpc-DCzFvohf.mjs');
14010
14044
  return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner });
14011
14045
  },
14012
14046
  onWorkflow: async (params) => {
14013
- const { workflowRpc } = await import('./rpc-BJKoRzGK.mjs');
14047
+ const { workflowRpc } = await import('./rpc-DRCY1RUn.mjs');
14014
14048
  return workflowRpc(params?.cwd || directory, params || {});
14015
14049
  },
14016
14050
  onRipgrep: async (args, cwd) => {
@@ -14520,11 +14554,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
14520
14554
  });
14521
14555
  },
14522
14556
  onIssue: async (params) => {
14523
- const { issueRpc } = await import('./rpc-DXp0vpxD.mjs');
14557
+ const { issueRpc } = await import('./rpc-DCzFvohf.mjs');
14524
14558
  return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner });
14525
14559
  },
14526
14560
  onWorkflow: async (params) => {
14527
- const { workflowRpc } = await import('./rpc-BJKoRzGK.mjs');
14561
+ const { workflowRpc } = await import('./rpc-DRCY1RUn.mjs');
14528
14562
  return workflowRpc(params?.cwd || directory, params || {});
14529
14563
  },
14530
14564
  onRipgrep: async (args, cwd) => {
@@ -15012,7 +15046,8 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
15012
15046
  buildMachineHandlers()
15013
15047
  );
15014
15048
  logger.log(`Machine service registered: svamp-machine-${machineId}`);
15015
- if (isHotReloadEnabled()) {
15049
+ const hotReloadDevSource = existsSync$1(join$1(__dirname$1, "sessionCore.ts"));
15050
+ if (isHotReloadEnabled() && hotReloadDevSource) {
15016
15051
  try {
15017
15052
  const hotReload = createHotReloadCoordinator({ log: logger.log });
15018
15053
  const sessionCoreSrc = join$1(__dirname$1, "sessionCore.ts");
@@ -15188,18 +15223,6 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
15188
15223
  break;
15189
15224
  }
15190
15225
  }
15191
- if (isOrphaned) {
15192
- for (const [, tracked] of pidToTrackedSession) {
15193
- if (tracked.svampSessionId === persisted.sessionId && tracked.hyphaService) {
15194
- tracked.hyphaService.updateMetadata({
15195
- ...persisted.metadata || {},
15196
- isOrphaned: true,
15197
- originalMachineId: persisted.machineId
15198
- });
15199
- break;
15200
- }
15201
- }
15202
- }
15203
15226
  if (persisted.wasProcessing && persisted.claudeResumeId && !isOrphaned) {
15204
15227
  sessionsToAutoContinue.push(persisted.sessionId);
15205
15228
  }
@@ -15309,7 +15332,7 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
15309
15332
  const PING_TIMEOUT_MS = 15e3;
15310
15333
  const POST_RECONNECT_GRACE_MS = 2e4;
15311
15334
  const RECONNECT_JITTER_MS = 2500;
15312
- const { WorkflowScheduler } = await import('./scheduler-CSYBbqjZ.mjs');
15335
+ const { WorkflowScheduler } = await import('./scheduler-DlibcB06.mjs');
15313
15336
  const workflowScheduler = new WorkflowScheduler({
15314
15337
  projectRoots: () => {
15315
15338
  const dirs = /* @__PURE__ */ new Set();
@@ -1,4 +1,4 @@
1
- import { m as resolveProjectRoot, y as cronMatches } from './run-CsqoYIvO.mjs';
1
+ import { m as resolveProjectRoot, y as cronMatches } from './run-n9IQLRFi.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-DnTtqcre.mjs');
57
+ const { connectAndGetMachine } = await import('./commands-BYPH6u5o.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-DnTtqcre.mjs');
96
+ const { connectAndGetMachine } = await import('./commands-BYPH6u5o.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-DnTtqcre.mjs');
185
+ const { connectAndGetMachine } = await import('./commands-BYPH6u5o.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-DnTtqcre.mjs');
205
+ const { connectAndGetMachine } = await import('./commands-BYPH6u5o.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-DnTtqcre.mjs');
238
+ const { connectAndGetMachine } = await import('./commands-BYPH6u5o.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-CsqoYIvO.mjs';
7
+ import { k as getHyphaServerUrl, S as ServeAuth, l as hasCookieToken } from './run-n9IQLRFi.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-Sq_r6a9i.mjs');
736
+ const { FrpcTunnel } = await import('./frpc-3mZl1NSJ.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-CsqoYIvO.mjs';
1
+ import { R as READ_ONLY_TOOLS, B as loadMachineContext, C as buildMachineInstructions, D as machineToolsForRole, E as buildMachineTools } from './run-n9IQLRFi.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.203",
3
+ "version": "0.2.205",
4
4
  "description": "Svamp CLI — AI workspace daemon on Hypha Cloud",
5
5
  "author": "Amun AI AB",
6
6
  "license": "SEE LICENSE IN LICENSE",