svamp-cli 0.2.68 → 0.2.70

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.
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
2
2
  import { execSync } from 'node:child_process';
3
3
  import { resolve, join } from 'node:path';
4
4
  import os from 'node:os';
5
- import { n as normalizeAllowedUser, l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha, i as buildSessionShareUrl, j as buildMachineShareUrl } from './run-HuBXfVSz.mjs';
5
+ import { n as normalizeAllowedUser, l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha, i as buildSessionShareUrl, j as buildMachineShareUrl } from './run-BqAe7GgA.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -73,7 +73,10 @@ function formatJson(data) {
73
73
 
74
74
  const SESSION_RPC_PARAMS = {
75
75
  getMessages: ["afterSeq", "limit"],
76
+ getMessageCount: [],
77
+ getLatestMessages: ["beforeSeq", "limit"],
76
78
  sendMessage: ["content", "localId", "meta"],
79
+ btw: ["question"],
77
80
  getMetadata: [],
78
81
  updateMetadata: ["newMetadata", "expectedVersion"],
79
82
  updateConfig: ["patch"],
@@ -83,7 +86,7 @@ const SESSION_RPC_PARAMS = {
83
86
  permissionResponse: ["params"],
84
87
  switchMode: ["mode"],
85
88
  restartClaude: [],
86
- killSession: [],
89
+ archiveSession: [],
87
90
  keepAlive: ["thinking", "mode"],
88
91
  sessionEnd: [],
89
92
  getActivityState: [],
@@ -1002,10 +1005,10 @@ async function sessionSpawn(agent, directory, machineId, opts) {
1002
1005
  if (result.type === "success") {
1003
1006
  console.log(`Session started: ${result.sessionId}`);
1004
1007
  if (result.message) console.log(` ${result.message}`);
1005
- const effectivePermMode = opts?.permissionMode || "default";
1006
- if (effectivePermMode !== "bypassPermissions") {
1007
- console.log(`\x1B[33m\u26A0 Permission mode: ${effectivePermMode}. Agent may pause for tool approval.\x1B[0m`);
1008
- console.log(`\x1B[33m Use -p bypassPermissions to run without approval prompts.\x1B[0m`);
1008
+ const explicitPermMode = opts?.permissionMode;
1009
+ if (explicitPermMode && explicitPermMode !== "bypassPermissions") {
1010
+ console.log(`\x1B[33m\u26A0 Permission mode: ${explicitPermMode}. Agent will pause for tool approval.\x1B[0m`);
1011
+ console.log(`\x1B[33m Use \`svamp session approve <id>\` to unblock, or drop the flag to run autonomously.\x1B[0m`);
1009
1012
  }
1010
1013
  if (opts?.message && result.sessionId) {
1011
1014
  const svc = getSessionProxy(machine, result.sessionId);
@@ -1034,14 +1037,42 @@ async function sessionSpawn(agent, directory, machineId, opts) {
1034
1037
  await server.disconnect();
1035
1038
  }
1036
1039
  }
1037
- async function sessionStop(sessionId, machineId) {
1040
+ async function sessionArchive(sessionId, machineId) {
1038
1041
  const { server, machine, fullId } = await connectAndResolveSession(sessionId, machineId);
1039
1042
  try {
1040
- const success = await machine.stopSession(fullId);
1043
+ const success = await machine.archiveSession(fullId);
1041
1044
  if (success) {
1042
- console.log(`Session ${fullId.slice(0, 8)} stopped.`);
1045
+ console.log(`Session ${fullId.slice(0, 8)} archived. Run \`svamp session resume ${fullId.slice(0, 8)}\` to bring it back.`);
1043
1046
  } else {
1044
- console.error("Failed to stop session (not found on daemon).");
1047
+ console.error("Failed to archive session (not found on daemon).");
1048
+ process.exit(1);
1049
+ }
1050
+ } finally {
1051
+ await server.disconnect();
1052
+ }
1053
+ }
1054
+ async function sessionResume(sessionId, machineId) {
1055
+ const { server, machine, fullId } = await connectAndResolveSession(sessionId, machineId);
1056
+ try {
1057
+ const result = await machine.resumeSession(fullId);
1058
+ if (result?.success) {
1059
+ console.log(`Session ${fullId.slice(0, 8)} resumed.`);
1060
+ } else {
1061
+ console.error(`Failed to resume session: ${result?.message || "unknown error"}`);
1062
+ process.exit(1);
1063
+ }
1064
+ } finally {
1065
+ await server.disconnect();
1066
+ }
1067
+ }
1068
+ async function sessionDelete(sessionId, machineId) {
1069
+ const { server, machine, fullId } = await connectAndResolveSession(sessionId, machineId);
1070
+ try {
1071
+ const success = await machine.deleteSession(fullId);
1072
+ if (success) {
1073
+ console.log(`Session ${fullId.slice(0, 8)} deleted.`);
1074
+ } else {
1075
+ console.error("Failed to delete session.");
1045
1076
  process.exit(1);
1046
1077
  }
1047
1078
  } finally {
@@ -1285,12 +1316,12 @@ async function sessionAttach(sessionId, machineId) {
1285
1316
  process.stdout.write("> ");
1286
1317
  return;
1287
1318
  }
1288
- if (trimmed === "/kill") {
1319
+ if (trimmed === "/archive") {
1289
1320
  try {
1290
- await svc.killSession();
1291
- console.log("Session killed.");
1321
+ await svc.archiveSession();
1322
+ console.log("Session archived. Run `svamp session resume <id>` to bring it back.");
1292
1323
  } catch (err) {
1293
- console.error(`Kill failed: ${err.message}`);
1324
+ console.error(`Archive failed: ${err.message}`);
1294
1325
  }
1295
1326
  rl.close();
1296
1327
  await server.disconnect();
@@ -1330,66 +1361,359 @@ async function sessionAttach(sessionId, machineId) {
1330
1361
  process.exit(0);
1331
1362
  });
1332
1363
  }
1364
+ async function snapshotLatestSeq(machine, fullId) {
1365
+ try {
1366
+ const r = await machine.sessionRPC(fullId, "getMessageCount", {});
1367
+ return Math.max(0, Number(r?.latestSeq ?? 0));
1368
+ } catch {
1369
+ try {
1370
+ const r = await machine.sessionRPC(fullId, "getLatestMessages", { limit: 1 });
1371
+ const msgs = r?.messages || [];
1372
+ return msgs.length > 0 ? Number(msgs[msgs.length - 1].seq || 0) : 0;
1373
+ } catch {
1374
+ return 0;
1375
+ }
1376
+ }
1377
+ }
1378
+ async function collectAssistantResponse(machine, fullId, afterSeq) {
1379
+ const pageLimit = 500;
1380
+ let cursor = afterSeq;
1381
+ const collected = [];
1382
+ const seqs = [];
1383
+ for (let i = 0; i < 20; i++) {
1384
+ const { messages, hasMore } = await machine.sessionRPC(
1385
+ fullId,
1386
+ "getMessages",
1387
+ { afterSeq: cursor, limit: pageLimit }
1388
+ );
1389
+ if (!messages || messages.length === 0) break;
1390
+ for (const msg of messages) {
1391
+ const role = msg?.content?.role;
1392
+ if (role === "agent" || role === "assistant") {
1393
+ const data = msg.content?.content?.data || msg.content?.content;
1394
+ if (!data) continue;
1395
+ let blocks = null;
1396
+ if (data.type === "assistant") {
1397
+ const b = data.message?.content || data.content;
1398
+ blocks = Array.isArray(b) ? b : null;
1399
+ } else if (data.type === "output" && data.data?.type === "assistant") {
1400
+ const b = data.data.message?.content || data.data.content;
1401
+ blocks = Array.isArray(b) ? b : null;
1402
+ }
1403
+ if (blocks) {
1404
+ for (const block of blocks) {
1405
+ if (block.type === "text" && typeof block.text === "string" && block.text) {
1406
+ collected.push(block.text);
1407
+ if (!seqs.includes(msg.seq)) seqs.push(msg.seq);
1408
+ }
1409
+ }
1410
+ } else if (data.type === "result" && typeof data.result === "string" && data.result) {
1411
+ collected.push(data.result);
1412
+ if (!seqs.includes(msg.seq)) seqs.push(msg.seq);
1413
+ } else if (data.type === "output" && data.data?.type === "result" && typeof data.data.result === "string" && data.data.result) {
1414
+ collected.push(data.data.result);
1415
+ if (!seqs.includes(msg.seq)) seqs.push(msg.seq);
1416
+ }
1417
+ }
1418
+ cursor = Math.max(cursor, Number(msg.seq || 0));
1419
+ }
1420
+ if (!hasMore) break;
1421
+ }
1422
+ return { text: collected.join("\n").trim(), messageSeqs: seqs };
1423
+ }
1424
+ function validateSendOptions(opts) {
1425
+ if (!opts?.btw) return [];
1426
+ const incompatible = [];
1427
+ if (opts.subject) incompatible.push("--subject");
1428
+ if (opts.urgency) incompatible.push("--urgency");
1429
+ if (opts.wait) incompatible.push("--wait");
1430
+ if (opts.response) incompatible.push("--response");
1431
+ return incompatible;
1432
+ }
1433
+ async function sendCore(machine, fullId, message, opts) {
1434
+ if (opts?.btw) {
1435
+ const btwResult = await machine.sessionRPC(fullId, "btw", { question: message });
1436
+ if (!btwResult?.success) {
1437
+ return {
1438
+ sessionId: fullId,
1439
+ mode: "btw",
1440
+ sent: false,
1441
+ waited: false,
1442
+ status: "error",
1443
+ error: btwResult?.error || "btw failed"
1444
+ };
1445
+ }
1446
+ return {
1447
+ sessionId: fullId,
1448
+ mode: "btw",
1449
+ sent: true,
1450
+ waited: true,
1451
+ status: "idle",
1452
+ response: String(btwResult.answer || "")
1453
+ };
1454
+ }
1455
+ const wantResponse = !!opts?.response;
1456
+ const shouldWait = !!opts?.wait || wantResponse;
1457
+ let bypassEnsured = false;
1458
+ if (shouldWait && !opts?.requireApproval) {
1459
+ try {
1460
+ await machine.sessionRPC(fullId, "switchMode", { mode: "bypassPermissions" });
1461
+ bypassEnsured = true;
1462
+ } catch {
1463
+ }
1464
+ }
1465
+ const preSeq = wantResponse ? await snapshotLatestSeq(machine, fullId) : 0;
1466
+ const { randomUUID } = await import('node:crypto');
1467
+ const inboxMessage = {
1468
+ messageId: randomUUID(),
1469
+ body: message,
1470
+ timestamp: Date.now(),
1471
+ read: false,
1472
+ from: `cli:${os.userInfo().username}`,
1473
+ to: fullId,
1474
+ subject: opts?.subject,
1475
+ urgency: opts?.urgency || "urgent"
1476
+ };
1477
+ const result = await machine.sessionRPC(fullId, "sendInboxMessage", { message: inboxMessage });
1478
+ let waitResult;
1479
+ if (shouldWait) {
1480
+ const timeoutMs = (opts?.timeout || 300) * 1e3;
1481
+ waitResult = await waitForBusyThenIdle(machine, fullId, timeoutMs);
1482
+ }
1483
+ if (waitResult?.pendingPermissions?.length) {
1484
+ return {
1485
+ sessionId: fullId,
1486
+ mode: "send",
1487
+ sent: true,
1488
+ messageId: result.messageId,
1489
+ waited: true,
1490
+ status: "permission-pending",
1491
+ pendingPermissions: waitResult.pendingPermissions,
1492
+ bypassEnsured
1493
+ };
1494
+ }
1495
+ let response;
1496
+ if (wantResponse) {
1497
+ response = await collectAssistantResponse(machine, fullId, preSeq);
1498
+ }
1499
+ return {
1500
+ sessionId: fullId,
1501
+ mode: "send",
1502
+ sent: true,
1503
+ messageId: result.messageId,
1504
+ waited: shouldWait,
1505
+ status: shouldWait ? "idle" : "sent",
1506
+ bypassEnsured,
1507
+ ...wantResponse && response ? { response: response.text, responseSeqs: response.messageSeqs } : {}
1508
+ };
1509
+ }
1333
1510
  async function sessionSend(sessionId, message, machineId, opts) {
1511
+ const incompatible = validateSendOptions(opts);
1512
+ if (incompatible.length) {
1513
+ console.error(`Error: --btw is incompatible with: ${incompatible.join(", ")}`);
1514
+ console.error(" --btw runs as a one-shot forked query that returns the answer directly.");
1515
+ process.exit(1);
1516
+ }
1334
1517
  const { server, machine, fullId } = await connectAndResolveSession(sessionId, machineId);
1335
1518
  try {
1336
- const { randomUUID } = await import('node:crypto');
1337
- const inboxMessage = {
1338
- messageId: randomUUID(),
1339
- body: message,
1340
- timestamp: Date.now(),
1341
- read: false,
1342
- from: `cli:${os.userInfo().username}`,
1343
- to: fullId,
1344
- subject: opts?.subject,
1345
- urgency: opts?.urgency || "urgent"
1346
- };
1347
- const result = await machine.sessionRPC(fullId, "sendInboxMessage", { message: inboxMessage });
1348
- let waitResult;
1349
- if (opts?.wait) {
1350
- const timeoutMs = (opts.timeout || 300) * 1e3;
1351
- waitResult = await waitForBusyThenIdle(machine, fullId, timeoutMs);
1519
+ const r = await sendCore(machine, fullId, message, opts);
1520
+ if (r.mode === "btw") {
1521
+ if (r.status === "error") {
1522
+ if (opts?.json) {
1523
+ console.log(formatJson({
1524
+ sessionId: r.sessionId,
1525
+ mode: "btw",
1526
+ message,
1527
+ success: false,
1528
+ error: r.error
1529
+ }));
1530
+ } else {
1531
+ console.error(`btw failed: ${r.error || "unknown error"}`);
1532
+ }
1533
+ process.exitCode = 1;
1534
+ return;
1535
+ }
1536
+ if (opts?.json) {
1537
+ console.log(formatJson({
1538
+ sessionId: r.sessionId,
1539
+ mode: "btw",
1540
+ message,
1541
+ success: true,
1542
+ response: r.response || ""
1543
+ }));
1544
+ } else if (r.response) {
1545
+ console.log(r.response);
1546
+ }
1547
+ return;
1352
1548
  }
1353
- if (waitResult?.pendingPermissions?.length) {
1549
+ if (r.status === "permission-pending") {
1354
1550
  if (opts?.json) {
1355
1551
  console.log(formatJson({
1356
- sessionId: fullId,
1552
+ sessionId: r.sessionId,
1357
1553
  message,
1358
1554
  sent: true,
1359
- messageId: result.messageId,
1555
+ messageId: r.messageId,
1360
1556
  status: "permission-pending",
1361
- pendingPermissions: waitResult.pendingPermissions
1557
+ pendingPermissions: r.pendingPermissions
1362
1558
  }));
1363
1559
  } else {
1364
- console.log(`Message sent to session ${fullId.slice(0, 8)} (id: ${result.messageId.slice(0, 8)})`);
1560
+ console.log(`Message sent to session ${r.sessionId.slice(0, 8)} (id: ${(r.messageId || "").slice(0, 8)})`);
1365
1561
  console.log("Agent is waiting for permission approval:");
1366
- for (const p of waitResult.pendingPermissions) {
1562
+ for (const p of r.pendingPermissions || []) {
1367
1563
  const argsStr = JSON.stringify(p.arguments || {}).slice(0, 120);
1368
1564
  console.log(` [${p.id.slice(0, 8)}] ${p.tool}(${argsStr})`);
1369
1565
  }
1370
1566
  console.log(`
1371
- Use: svamp session approve ${fullId.slice(0, 8)}`);
1567
+ Use: svamp session approve ${r.sessionId.slice(0, 8)}`);
1372
1568
  }
1373
1569
  process.exitCode = 2;
1374
- } else if (opts?.json) {
1570
+ return;
1571
+ }
1572
+ if (opts?.json) {
1375
1573
  console.log(formatJson({
1376
- sessionId: fullId,
1574
+ sessionId: r.sessionId,
1377
1575
  message,
1378
1576
  sent: true,
1379
- messageId: result.messageId,
1380
- waited: !!opts.wait,
1381
- status: opts.wait ? "idle" : "sent"
1577
+ messageId: r.messageId,
1578
+ waited: r.waited,
1579
+ status: r.status,
1580
+ ...r.bypassEnsured ? { bypassEnsured: true } : {},
1581
+ ...opts.response ? { response: r.response || "", responseSeqs: r.responseSeqs || [] } : {}
1382
1582
  }));
1383
1583
  } else {
1384
- console.log(`Message sent to session ${fullId.slice(0, 8)} (id: ${result.messageId.slice(0, 8)})`);
1385
- if (opts?.wait) {
1584
+ console.log(`Message sent to session ${r.sessionId.slice(0, 8)} (id: ${(r.messageId || "").slice(0, 8)})`);
1585
+ if (r.waited) {
1386
1586
  console.log("Agent is idle.");
1387
1587
  }
1588
+ if (opts?.response) {
1589
+ if (r.response) {
1590
+ console.log("");
1591
+ console.log(r.response);
1592
+ } else {
1593
+ console.log("(no text response captured)");
1594
+ }
1595
+ }
1388
1596
  }
1389
1597
  } finally {
1390
1598
  await server.disconnect();
1391
1599
  }
1392
1600
  }
1601
+ async function queryCore(machine, directory, prompt, opts) {
1602
+ const absDir = resolve(directory);
1603
+ const spawnOpts = {
1604
+ directory: absDir,
1605
+ agent: "claude",
1606
+ permissionMode: opts?.permissionMode || "bypassPermissions",
1607
+ tags: opts?.tag ? [opts.tag] : ["svamp-query"]
1608
+ };
1609
+ const spawn = await machine.spawnSession(spawnOpts);
1610
+ if (spawn.type !== "success" || !spawn.sessionId) {
1611
+ return {
1612
+ sessionId: "",
1613
+ mode: "query",
1614
+ sent: false,
1615
+ waited: false,
1616
+ status: "error",
1617
+ error: spawn.errorMessage || `spawn returned type=${spawn.type}`,
1618
+ directory: absDir
1619
+ };
1620
+ }
1621
+ const spawnedId = spawn.sessionId;
1622
+ const svc = getSessionProxy(machine, spawnedId);
1623
+ await svc.sendMessage(
1624
+ JSON.stringify({
1625
+ role: "user",
1626
+ content: { type: "text", text: prompt },
1627
+ meta: { sentFrom: "svamp-cli-query" }
1628
+ })
1629
+ );
1630
+ const timeoutMs = (opts?.timeout || 300) * 1e3;
1631
+ const waitResult = await waitForBusyThenIdle(machine, spawnedId, timeoutMs);
1632
+ if (waitResult.pendingPermissions?.length) {
1633
+ return {
1634
+ sessionId: spawnedId,
1635
+ mode: "query",
1636
+ sent: true,
1637
+ waited: true,
1638
+ status: "permission-pending",
1639
+ pendingPermissions: waitResult.pendingPermissions,
1640
+ error: `Agent paused for tool approval (${waitResult.pendingPermissions.length} pending). Pass --permission-mode bypassPermissions or approve the request manually.`,
1641
+ directory: absDir
1642
+ };
1643
+ }
1644
+ const response = await collectAssistantResponse(machine, spawnedId, 0);
1645
+ return {
1646
+ sessionId: spawnedId,
1647
+ mode: "query",
1648
+ sent: true,
1649
+ waited: true,
1650
+ status: "idle",
1651
+ response: response.text,
1652
+ responseSeqs: response.messageSeqs,
1653
+ directory: absDir
1654
+ };
1655
+ }
1656
+ async function sessionQuery(directory, prompt, machineId, opts) {
1657
+ const { server, machine } = await connectAndGetMachine(machineId);
1658
+ let spawnedId;
1659
+ try {
1660
+ const r = await queryCore(machine, directory, prompt, opts);
1661
+ spawnedId = r.sessionId || void 0;
1662
+ if (r.status === "error") {
1663
+ if (opts?.json) {
1664
+ console.log(formatJson({
1665
+ success: false,
1666
+ error: r.error,
1667
+ directory: r.directory
1668
+ }));
1669
+ } else {
1670
+ console.error(`Failed to spawn query session: ${r.error}`);
1671
+ }
1672
+ process.exitCode = 1;
1673
+ return;
1674
+ }
1675
+ if (r.status === "permission-pending") {
1676
+ if (opts?.json) {
1677
+ console.log(formatJson({
1678
+ success: false,
1679
+ sessionId: r.sessionId,
1680
+ directory: r.directory,
1681
+ error: r.error,
1682
+ pendingPermissions: r.pendingPermissions
1683
+ }));
1684
+ } else {
1685
+ console.error(r.error);
1686
+ }
1687
+ process.exitCode = 2;
1688
+ return;
1689
+ }
1690
+ if (opts?.json) {
1691
+ console.log(formatJson({
1692
+ success: true,
1693
+ sessionId: r.sessionId,
1694
+ directory: r.directory,
1695
+ prompt,
1696
+ response: r.response || "",
1697
+ responseSeqs: r.responseSeqs || []
1698
+ }));
1699
+ } else {
1700
+ if (r.response) {
1701
+ console.log(r.response);
1702
+ } else {
1703
+ console.log("(no text response captured)");
1704
+ }
1705
+ }
1706
+ } finally {
1707
+ if (spawnedId && !opts?.keep) {
1708
+ try {
1709
+ await machine.deleteSession(spawnedId);
1710
+ } catch (err) {
1711
+ console.error(`Warning: failed to delete query session ${spawnedId}: ${err?.message || err}`);
1712
+ }
1713
+ }
1714
+ await server.disconnect();
1715
+ }
1716
+ }
1393
1717
  async function sessionWait(sessionId, machineId, opts) {
1394
1718
  const { server, machine, fullId } = await connectAndResolveSession(sessionId, machineId);
1395
1719
  try {
@@ -1897,4 +2221,4 @@ async function sessionInboxClear(sessionIdPartial, machineId, opts) {
1897
2221
  }
1898
2222
  }
1899
2223
 
1900
- export { connectAndGetMachine, connectAndResolveSession, createWorktree, generateWorktreeName, machineExec, machineInfo, machineLs, machineShare, parseShareArg, renderMessage, resolveSessionId, sessionApprove, sessionAttach, sessionDeny, sessionInboxClear, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxSend, sessionInfo, sessionList, sessionMachines, sessionMessages, sessionRalphCancel, sessionRalphStart, sessionRalphStatus, sessionSend, sessionShare, sessionSpawn, sessionStop, sessionWait };
2224
+ export { collectAssistantResponse, connectAndGetMachine, connectAndResolveSession, createWorktree, generateWorktreeName, machineExec, machineInfo, machineLs, machineShare, parseShareArg, queryCore, renderMessage, resolveSessionId, sendCore, sessionApprove, sessionArchive, sessionAttach, sessionDelete, sessionDeny, sessionInboxClear, sessionInboxList, sessionInboxRead, sessionInboxReply, sessionInboxSend, sessionInfo, sessionList, sessionMachines, sessionMessages, sessionQuery, sessionRalphCancel, sessionRalphStart, sessionRalphStatus, sessionResume, sessionSend, sessionShare, sessionSpawn, sessionWait, snapshotLatestSeq, validateSendOptions };
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-D5kCHCfX.mjs';
3
+ import { connectAndGetMachine } from './commands-BMOelGYC.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-HuBXfVSz.mjs';
8
+ import './run-BqAe7GgA.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
@@ -68,7 +68,7 @@ async function serviceExpose(args) {
68
68
  });
69
69
  return;
70
70
  }
71
- const { connectAndGetMachine } = await import('./commands-D5kCHCfX.mjs');
71
+ const { connectAndGetMachine } = await import('./commands-BMOelGYC.mjs');
72
72
  const { server, machine } = await connectAndGetMachine();
73
73
  try {
74
74
  const status = await machine.tunnelStart({
@@ -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-D5kCHCfX.mjs');
135
+ const { connectAndGetMachine } = await import('./commands-BMOelGYC.mjs');
136
136
  const { server, machine } = await connectAndGetMachine();
137
137
  try {
138
138
  const tunnels = await machine.tunnelList({});
@@ -161,7 +161,7 @@ async function serviceDelete(args) {
161
161
  process.exit(1);
162
162
  }
163
163
  try {
164
- const { connectAndGetMachine } = await import('./commands-D5kCHCfX.mjs');
164
+ const { connectAndGetMachine } = await import('./commands-BMOelGYC.mjs');
165
165
  const { server, machine } = await connectAndGetMachine();
166
166
  try {
167
167
  await machine.tunnelStop({ name });
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as connectToHypha, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, a as registerSessionService, s as startDaemon, b as stopDaemon } from './run-HuBXfVSz.mjs';
1
+ export { c as connectToHypha, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, a as registerSessionService, s as startDaemon, b as stopDaemon } from './run-BqAe7GgA.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.68";
2
+ var version = "0.2.70";
3
3
  var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
4
4
  var author = "Amun AI AB";
5
5
  var license = "SEE LICENSE IN LICENSE";
@@ -19,7 +19,7 @@ var exports$1 = {
19
19
  var scripts = {
20
20
  build: "rm -rf dist bin/skills && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && tsc --noEmit && pkgroll",
21
21
  typecheck: "tsc --noEmit",
22
- test: "npx tsx test/test-context-window.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-ralph-loop.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-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-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-ralph-loop-integration.mjs && npx tsx test/test-ralph-loop-modes.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 && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.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",
22
+ test: "npx tsx test/test-context-window.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-ralph-loop.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-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-ralph-loop-integration.mjs && npx tsx test/test-ralph-loop-modes.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 && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.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",
23
23
  "test:hypha": "node --no-warnings test/test-hypha-service.mjs",
24
24
  dev: "tsx src/cli.ts",
25
25
  "dev:daemon": "tsx src/cli.ts daemon start-sync",