svamp-cli 0.2.331 → 0.2.333

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 (28) hide show
  1. package/dist/{adminCommands-DQ6TQAXa.mjs → adminCommands-BMzwjOct.mjs} +1 -1
  2. package/dist/{agentCommands-CovUtOYv.mjs → agentCommands-BVz1k2R2.mjs} +35 -6
  3. package/dist/{auth-CMWkQmps.mjs → auth-D0v5RwMJ.mjs} +1 -1
  4. package/dist/{cli-Cd_6Xp2x.mjs → cli-DmjtuskT.mjs} +93 -77
  5. package/dist/cli.mjs +2 -2
  6. package/dist/{commands-B-PLeiIB.mjs → commands-BOGd7CmP.mjs} +14 -4
  7. package/dist/{commands-CpXKePYP.mjs → commands-C3r_GhOb.mjs} +3 -3
  8. package/dist/{commands-D2he7eNq.mjs → commands-CPTWYXJD.mjs} +3 -3
  9. package/dist/{commands-DCTCLAPA.mjs → commands-CYgkxHsf.mjs} +3 -3
  10. package/dist/{commands-OwmAlnGb.mjs → commands-CwoMu1mu.mjs} +1 -1
  11. package/dist/{commands-CWkWkrZF.mjs → commands-DKouDroK.mjs} +1 -1
  12. package/dist/{commands-BCWHfbuw.mjs → commands-DcQMh7oz.mjs} +29 -18
  13. package/dist/{commands-Bv52WaQ0.mjs → commands-DmPwUOqX.mjs} +11 -11
  14. package/dist/{fleet-DrLOwe6r.mjs → fleet-5foIrEnM.mjs} +3 -3
  15. package/dist/{headlessCli-CDjGYUpj.mjs → headlessCli-BLZSVVlt.mjs} +2 -2
  16. package/dist/index.mjs +1 -1
  17. package/dist/{notifyCommands-DSRd8YaE.mjs → notifyCommands-DADOx-j_.mjs} +1 -1
  18. package/dist/package-By6uMuic.mjs +64 -0
  19. package/dist/{pinnedClaudeCode-BO0Qs_kE.mjs → pinnedClaudeCode-C43KnZ-Q.mjs} +27 -6
  20. package/dist/{rpc-OmhzsDGP.mjs → rpc-CoPRGZkJ.mjs} +2 -1
  21. package/dist/{rpc-CVBhR9Cj.mjs → rpc-UomHF39a.mjs} +13 -1
  22. package/dist/{run-DcwSfoyP.mjs → run-CkEjIO1m.mjs} +1 -1
  23. package/dist/{run-CSNL62FQ.mjs → run-PXdghhjy.mjs} +592 -147
  24. package/dist/{scheduler-DDw3YLzH.mjs → scheduler-gMWmsAgp.mjs} +1 -1
  25. package/dist/{serveCommands-BQ0jhFUR.mjs → serveCommands-Cklx2iuZ.mjs} +10 -10
  26. package/dist/{sideband-S3ycJa01.mjs → sideband-DXyAkIaB.mjs} +1 -1
  27. package/package.json +4 -4
  28. package/dist/package-C23qFmVz.mjs +0 -64
@@ -1,4 +1,4 @@
1
- import { c as connectToHypha, L as computeCollectionConfigUpdate, M as SYSTEM_COLLECTION_CONFIG } from './run-CSNL62FQ.mjs';
1
+ import { c as connectToHypha, N as computeCollectionConfigUpdate, O as SYSTEM_COLLECTION_CONFIG } from './run-PXdghhjy.mjs';
2
2
  import { existsSync, readFileSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
  import os from 'node:os';
@@ -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 { e as shortId } from './run-CSNL62FQ.mjs';
5
+ import { e as shortId } from './run-PXdghhjy.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-CSNL62FQ.mjs').then(function (n) { return n.at; });
99
+ const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-PXdghhjy.mjs').then(function (n) { return n.av; });
100
100
  const desc = sanitizeDescription(description, 240);
101
101
  if (!desc) {
102
102
  console.error("Project description is empty.");
@@ -251,6 +251,27 @@ function dropServiceLinks(config, kind, name) {
251
251
  config.session_link = next[0] ? { url: next[0].url, label: next[0].label } : void 0;
252
252
  return true;
253
253
  }
254
+ function reconcileServiceLinksExact(config, kinds, desired) {
255
+ const before = readSessionLinks(config);
256
+ const canon = (ls) => JSON.stringify(ls.map((l) => [l.id, l.label, l.url, l.icon || "", l.service ? `${l.service.kind}:${l.service.name}` : ""]));
257
+ const beforeCanon = canon(before);
258
+ const kindSet = new Set(kinds);
259
+ const desiredKeys = new Set(desired.map((d) => `${d.service.kind}:${d.service.name}`));
260
+ let links = before.filter((l) => {
261
+ if (l.service && kindSet.has(l.service.kind)) {
262
+ return desiredKeys.has(`${l.service.kind}:${l.service.name}`);
263
+ }
264
+ return true;
265
+ });
266
+ for (const item of desired) {
267
+ if (!item.url || !item.url.trim()) continue;
268
+ links = upsertSessionLink(links, item);
269
+ }
270
+ if (canon(links) === beforeCanon) return false;
271
+ config.session_links = links;
272
+ config.session_link = links[0] ? { url: links[0].url, label: links[0].label } : void 0;
273
+ return true;
274
+ }
254
275
  function requireSessionId() {
255
276
  const sessionId = process.env.SVAMP_SESSION_ID;
256
277
  if (!sessionId) {
@@ -307,6 +328,7 @@ async function sessionLinkRemove(id) {
307
328
  const configPath = getConfigPath(sessionId);
308
329
  const config = readConfig(configPath);
309
330
  const links = readSessionLinks(config);
331
+ const removed = links.find((l) => l.id === id);
310
332
  const next = links.filter((l) => l.id !== id);
311
333
  if (next.length === links.length) {
312
334
  console.error(`No link with id "${id}". Run: svamp session link list`);
@@ -314,6 +336,13 @@ async function sessionLinkRemove(id) {
314
336
  }
315
337
  writeSessionLinks(configPath, config, next);
316
338
  console.log(`Launch Pad: removed [${id}]${next.length ? "" : " (Launch Pad now empty)"}`);
339
+ if (removed?.service) {
340
+ const { kind, name } = removed.service;
341
+ const stopCmd = kind === "tunnel" ? `svamp service delete ${name}` : kind === "serve" ? `svamp serve remove ${name}` : `svamp process delete ${name}`;
342
+ console.log(`Note: this link is backed by a ${kind} "${name}" that is still running, so the`);
343
+ console.log(`Launch Pad will re-add it while the service is up. To fully stop it, run:`);
344
+ console.log(` ${stopCmd}`);
345
+ }
317
346
  }
318
347
  async function sessionNotify(message, level = "info") {
319
348
  requireNotSandboxed("session notify");
@@ -369,7 +398,7 @@ async function sessionBroadcast(action, args) {
369
398
  console.log(`Broadcast sent: ${action}`);
370
399
  }
371
400
  async function connectToMachineService() {
372
- const { connectAndGetMachine } = await import('./commands-CWkWkrZF.mjs');
401
+ const { connectAndGetMachine } = await import('./commands-DKouDroK.mjs');
373
402
  return connectAndGetMachine();
374
403
  }
375
404
  function buildInboxMessage(args) {
@@ -452,7 +481,7 @@ async function inboxSend(targetSessionId, opts) {
452
481
  console.error("Message body is required.");
453
482
  process.exit(1);
454
483
  }
455
- const { connectAndResolveSession } = await import('./commands-CWkWkrZF.mjs');
484
+ const { connectAndResolveSession } = await import('./commands-DKouDroK.mjs');
456
485
  let server;
457
486
  try {
458
487
  const { targetId, messageId } = await inboxSendCore(
@@ -507,7 +536,7 @@ async function inboxReply(messageId, body, opts) {
507
536
  console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
508
537
  process.exit(1);
509
538
  }
510
- const { connectAndResolveSession } = await import('./commands-CWkWkrZF.mjs');
539
+ const { connectAndResolveSession } = await import('./commands-DKouDroK.mjs');
511
540
  const { server: localServer, machine: localMachine } = await connectToMachineService();
512
541
  let localDisconnected = false;
513
542
  const disconnectLocal = async () => {
@@ -572,4 +601,4 @@ async function machineNotify(message, level = "info") {
572
601
  console.log(`Machine notification sent [${level}]: ${message}`);
573
602
  }
574
603
 
575
- export { autoAddSessionLink, buildInboxMessage, dropServiceLinks, inboxList, inboxReply, inboxReplyCore, inboxSend, inboxSendCore, linkDedupKey, machineNotify, reconcileServiceLinks, removeServiceLinks, removeSessionLinkByService, sessionBroadcast, sessionLinkAdd, sessionLinkList, sessionLinkRemove, sessionLinkUpdate, sessionNotify, sessionSetLink, sessionSetProjectDescription, sessionSetTitle, upsertSessionLink };
604
+ export { autoAddSessionLink, buildInboxMessage, dropServiceLinks, inboxList, inboxReply, inboxReplyCore, inboxSend, inboxSendCore, linkDedupKey, machineNotify, reconcileServiceLinks, reconcileServiceLinksExact, removeServiceLinks, removeSessionLinkByService, sessionBroadcast, sessionLinkAdd, sessionLinkList, sessionLinkRemove, sessionLinkUpdate, sessionNotify, sessionSetLink, sessionSetProjectDescription, sessionSetTitle, upsertSessionLink };
@@ -1,4 +1,4 @@
1
- import { a1 as resolveModel } from './run-CSNL62FQ.mjs';
1
+ import { a3 as resolveModel } from './run-PXdghhjy.mjs';
2
2
  import 'os';
3
3
  import 'fs/promises';
4
4
  import 'fs';