svamp-cli 0.2.108 → 0.2.110

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 { basename, resolve, join } from 'node:path';
4
4
  import os from 'node:os';
5
- import { F as normalizeAllowedUser, G as loadSecurityContextConfig, H as resolveSecurityContext, I as buildSecurityContextFromFlags, J as mergeSecurityContexts, c as connectToHypha, K as buildSessionShareUrl, L as computeOutboundHop, M as buildMachineShareUrl } from './run-LyzVTe3J.mjs';
5
+ import { G as normalizeAllowedUser, H as loadSecurityContextConfig, I as resolveSecurityContext, J as buildSecurityContextFromFlags, K as mergeSecurityContexts, c as connectToHypha, L as buildSessionShareUrl, M as computeOutboundHop, n as shortId, N as buildMachineShareUrl } from './run-C3kuv0DL.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
8
8
  import 'fs';
@@ -10,8 +10,8 @@ import 'path';
10
10
  import 'url';
11
11
  import 'child_process';
12
12
  import 'crypto';
13
- import 'util';
14
13
  import 'node:crypto';
14
+ import 'util';
15
15
  import 'node:events';
16
16
  import '@agentclientprotocol/sdk';
17
17
  import '@modelcontextprotocol/sdk/client/index.js';
@@ -55,7 +55,9 @@ function formatSessionStatus(data) {
55
55
  `- Agent: ${data.flavor}`
56
56
  ];
57
57
  if (data.name) lines.push(`- Title: ${data.name}`);
58
- if (data.summary && data.summary !== data.name) lines.push(`- Summary: ${data.summary}`);
58
+ if (data.summary && data.summary !== data.name) lines.push(`- Topic: ${data.summary}`);
59
+ if (data.projectName) lines.push(`- Project: ${data.projectName}`);
60
+ if (data.projectDescription) lines.push(`- Project Description: ${data.projectDescription}`);
59
61
  if (data.path) lines.push(`- Path: ${data.path}`);
60
62
  if (data.host) lines.push(`- Host: ${data.host}`);
61
63
  if (data.lifecycleState) lines.push(`- Lifecycle: ${data.lifecycleState}`);
@@ -97,6 +99,7 @@ const SESSION_RPC_PARAMS = {
97
99
  switchMode: ["mode"],
98
100
  restartClaude: [],
99
101
  archiveSession: [],
102
+ regenerateSummary: [],
100
103
  keepAlive: ["thinking", "mode"],
101
104
  sessionEnd: [],
102
105
  getActivityState: [],
@@ -847,10 +850,13 @@ async function sessionWhoami(opts) {
847
850
  const m = currentSession.metadata || {};
848
851
  lines.push("## This session");
849
852
  lines.push(`- id: ${currentSession.sessionId}`);
850
- lines.push(`- title: ${resolveDisplayName(m, currentSession.directory)}`);
853
+ lines.push(`- topic: ${resolveDisplayName(m, currentSession.directory)}`);
851
854
  lines.push(`- agent: ${m.flavor || "claude"}`);
852
855
  lines.push(`- dir: ${m.path || currentSession.directory || "-"}`);
853
856
  lines.push(`- machine: ${machineLabel(current.info)}`);
857
+ if (m.projectName || m.projectDescription) {
858
+ lines.push(`- project: ${m.projectName || "-"}${m.projectDescription ? ` \u2014 ${m.projectDescription}` : ""}`);
859
+ }
854
860
  } else if (currentSessionId) {
855
861
  lines.push("## This session");
856
862
  lines.push(`- id: ${currentSessionId} (not yet visible in the machine registry)`);
@@ -1229,6 +1235,8 @@ async function sessionInfo(sessionId, machineId, opts) {
1229
1235
  thinking: activity.thinking ?? false,
1230
1236
  startedBy: metadata.startedBy || "",
1231
1237
  summary: metadata.summary?.text || void 0,
1238
+ projectName: metadata.projectName || void 0,
1239
+ projectDescription: metadata.projectDescription || void 0,
1232
1240
  claudeSessionId: metadata.claudeSessionId || void 0,
1233
1241
  sessionLink: metadata.sessionLink?.url || void 0,
1234
1242
  tags: metadata.tags?.length ? metadata.tags : void 0,
@@ -1679,13 +1687,12 @@ async function sendCore(machine, fullId, message, opts) {
1679
1687
  }
1680
1688
  }
1681
1689
  const preSeq = wantResponse ? await snapshotLatestSeq(machine, fullId) : 0;
1682
- const { randomUUID } = await import('node:crypto');
1683
1690
  const callerSessionId = process.env.SVAMP_SESSION_ID;
1684
1691
  const hop = computeOutboundHop(callerSessionId);
1685
1692
  let urgency = opts?.urgency ? opts.urgency : shouldWait ? "urgent" : "normal";
1686
1693
  if (hop.fromInboxTurn) urgency = "normal";
1687
1694
  const inboxMessage = {
1688
- messageId: randomUUID(),
1695
+ messageId: shortId(),
1689
1696
  body: message,
1690
1697
  timestamp: Date.now(),
1691
1698
  read: false,
@@ -2353,13 +2360,12 @@ async function sessionLoopStatus(sessionIdPartial, machineId) {
2353
2360
  async function sessionInboxSend(sessionIdPartial, body, machineId, opts) {
2354
2361
  const { server, machine, fullId } = await connectAndResolveSession(sessionIdPartial, machineId);
2355
2362
  try {
2356
- const { randomUUID } = await import('node:crypto');
2357
2363
  const callerSessionId = process.env.SVAMP_SESSION_ID;
2358
2364
  const hop = computeOutboundHop(callerSessionId);
2359
2365
  let urgency = opts?.urgency || "normal";
2360
2366
  if (hop.fromInboxTurn) urgency = "normal";
2361
2367
  const message = {
2362
- messageId: randomUUID(),
2368
+ messageId: shortId(),
2363
2369
  body,
2364
2370
  timestamp: Date.now(),
2365
2371
  read: false,
@@ -2460,10 +2466,9 @@ async function sessionInboxReply(sessionIdPartial, messageId, body, machineId) {
2460
2466
  console.error("Cannot reply: original message has no fromSession (and not a channel message).");
2461
2467
  process.exit(1);
2462
2468
  }
2463
- const { randomUUID } = await import('node:crypto');
2464
2469
  const hop = computeOutboundHop(process.env.SVAMP_SESSION_ID || fullId);
2465
2470
  const reply = {
2466
- messageId: randomUUID(),
2471
+ messageId: shortId(),
2467
2472
  body,
2468
2473
  timestamp: Date.now(),
2469
2474
  read: false,
@@ -1,16 +1,16 @@
1
1
  import os from 'os';
2
2
  import fs__default from 'fs';
3
3
  import { resolve, join, relative } from 'path';
4
- import { p as parseFrontmatter, n as getSkillsServer, o as getSkillsWorkspaceName, q as getSkillsCollectionName, t as fetchWithTimeout, u as searchSkills, v as SKILLS_DIR, w as getSkillInfo, x as downloadSkillFile, y as listSkillFiles } from './run-LyzVTe3J.mjs';
4
+ import { p as parseFrontmatter, o as getSkillsServer, q as getSkillsWorkspaceName, t as getSkillsCollectionName, u as fetchWithTimeout, v as searchSkills, w as SKILLS_DIR, x as getSkillInfo, y as downloadSkillFile, z as listSkillFiles } from './run-C3kuv0DL.mjs';
5
5
  import 'fs/promises';
6
6
  import 'url';
7
7
  import 'child_process';
8
8
  import 'crypto';
9
+ import 'node:crypto';
9
10
  import 'node:fs';
10
11
  import 'node:child_process';
11
12
  import 'util';
12
13
  import 'node:path';
13
- import 'node:crypto';
14
14
  import 'node:os';
15
15
  import 'node:events';
16
16
  import '@agentclientprotocol/sdk';
@@ -1,6 +1,6 @@
1
1
  import { execFileSync } from 'node:child_process';
2
2
  import { createServer } from 'node:http';
3
- import { R as RoutineStore, m as RoutineRunner } from './run-LyzVTe3J.mjs';
3
+ import { R as RoutineStore, m as RoutineRunner } from './run-C3kuv0DL.mjs';
4
4
  import 'os';
5
5
  import 'fs/promises';
6
6
  import 'fs';
@@ -8,10 +8,10 @@ import 'path';
8
8
  import 'url';
9
9
  import 'child_process';
10
10
  import 'crypto';
11
+ import 'node:crypto';
11
12
  import 'node:fs';
12
13
  import 'util';
13
14
  import 'node:path';
14
- import 'node:crypto';
15
15
  import 'node:os';
16
16
  import 'node:events';
17
17
  import '@agentclientprotocol/sdk';
@@ -1,18 +1,18 @@
1
1
  import { writeFileSync, readFileSync } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { connectAndGetMachine } from './commands-DOsK9QRw.mjs';
3
+ import { connectAndGetMachine } from './commands-Bg0_Ljvw.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-LyzVTe3J.mjs';
8
+ import './run-C3kuv0DL.mjs';
9
9
  import 'os';
10
10
  import 'fs/promises';
11
11
  import 'url';
12
12
  import 'child_process';
13
13
  import 'crypto';
14
- import 'util';
15
14
  import 'node:crypto';
15
+ import 'util';
16
16
  import 'node:events';
17
17
  import '@agentclientprotocol/sdk';
18
18
  import '@modelcontextprotocol/sdk/client/index.js';
@@ -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-LyzVTe3J.mjs';
4
+ import { c as connectToHypha } from './run-C3kuv0DL.mjs';
5
5
  import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-HydRNEt7.mjs';
6
6
  import 'os';
7
7
  import 'fs/promises';
@@ -10,9 +10,9 @@ import 'path';
10
10
  import 'url';
11
11
  import 'child_process';
12
12
  import 'crypto';
13
+ import 'node:crypto';
13
14
  import 'node:child_process';
14
15
  import 'util';
15
- import 'node:crypto';
16
16
  import 'node:events';
17
17
  import '@agentclientprotocol/sdk';
18
18
  import '@modelcontextprotocol/sdk/client/index.js';
@@ -3,14 +3,14 @@ import { mkdirSync, writeFileSync, unlinkSync, existsSync, chmodSync, readFileSy
3
3
  import { join } from 'path';
4
4
  import { homedir, platform, arch } from 'os';
5
5
  import { createHash, randomUUID } from 'crypto';
6
- import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-LyzVTe3J.mjs';
6
+ import { h as getFrpsSubdomainHost, i as getFrpsServerPort, j as getFrpsServerAddr } from './run-C3kuv0DL.mjs';
7
7
  import 'fs/promises';
8
8
  import 'url';
9
+ import 'node:crypto';
9
10
  import 'node:fs';
10
11
  import 'node:child_process';
11
12
  import 'util';
12
13
  import 'node:path';
13
- import 'node:crypto';
14
14
  import 'node:os';
15
15
  import 'node:events';
16
16
  import '@agentclientprotocol/sdk';
@@ -1,5 +1,5 @@
1
- import { E as resolveModel, N as describeMisconfiguration, O as buildMachineDeps } from './run-LyzVTe3J.mjs';
2
- import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-CgiHKPJo.mjs';
1
+ import { F as resolveModel, O as describeMisconfiguration, P as buildMachineDeps } from './run-C3kuv0DL.mjs';
2
+ import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-HcIQ3hOP.mjs';
3
3
  import { WebSocket } from 'ws';
4
4
  import { execSync, spawn } from 'child_process';
5
5
  import 'os';
@@ -8,11 +8,11 @@ import 'fs';
8
8
  import 'path';
9
9
  import 'url';
10
10
  import 'crypto';
11
+ import 'node:crypto';
11
12
  import 'node:fs';
12
13
  import 'node:child_process';
13
14
  import 'util';
14
15
  import 'node:path';
15
- import 'node:crypto';
16
16
  import 'node:os';
17
17
  import 'node:events';
18
18
  import '@agentclientprotocol/sdk';
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-LyzVTe3J.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-C3kuv0DL.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';
@@ -6,11 +6,11 @@ import 'path';
6
6
  import 'url';
7
7
  import 'child_process';
8
8
  import 'crypto';
9
+ import 'node:crypto';
9
10
  import 'node:fs';
10
11
  import 'node:child_process';
11
12
  import 'util';
12
13
  import 'node:path';
13
- import 'node:crypto';
14
14
  import 'node:os';
15
15
  import 'node:events';
16
16
  import '@agentclientprotocol/sdk';
@@ -1,5 +1,5 @@
1
1
  var name = "svamp-cli";
2
- var version = "0.2.108";
2
+ var version = "0.2.110";
3
3
  var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
4
4
  var author = "Amun AI AB";
5
5
  var license = "SEE LICENSE IN LICENSE";
@@ -19,7 +19,7 @@ var exports$1 = {
19
19
  var scripts = {
20
20
  build: "rm -rf dist bin/skills && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && cp -r ../../skills/loop bin/skills/loop && tsc --noEmit && pkgroll",
21
21
  typecheck: "tsc --noEmit",
22
- test: "npx tsx test/test-context-window.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-loop-activation.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-inbox-guard.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && node test/test-supervisor-restart.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-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 && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-routine.mjs && npx tsx test/test-routine-rpc.mjs && npx tsx test/test-session-file.mjs && npx tsx test/test-channel-rpc.mjs && npx tsx test/test-wise-agent.mjs && npx tsx test/test-channel-agent.mjs && npx tsx test/test-channels-service.mjs && npx tsx test/test-channel-async-reply.mjs && npx tsx test/test-channel-binding.mjs && npx tsx test/test-wise-agent-auth.mjs && npx tsx test/test-channel-http.mjs && npx tsx test/test-wise-voice.mjs && npx tsx test/test-wise-headless.mjs && npx tsx test/test-wise-machine.mjs",
22
+ test: "npx tsx test/test-context-window.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-loop-activation.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-inbox-guard.mjs && npx tsx test/test-auto-topic.mjs && npx tsx test/test-project-info.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-backend.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && node test/test-supervisor-restart.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-short-id.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 && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-routine.mjs && npx tsx test/test-routine-rpc.mjs && npx tsx test/test-session-file.mjs && npx tsx test/test-channel-rpc.mjs && npx tsx test/test-wise-agent.mjs && npx tsx test/test-channel-agent.mjs && npx tsx test/test-channels-service.mjs && npx tsx test/test-channel-async-reply.mjs && npx tsx test/test-channel-binding.mjs && npx tsx test/test-wise-agent-auth.mjs && npx tsx test/test-channel-http.mjs && npx tsx test/test-wise-voice.mjs && npx tsx test/test-wise-headless.mjs && npx tsx test/test-wise-machine.mjs",
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",