svamp-cli 0.2.332 → 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.
- package/dist/{adminCommands-BNGSC5oD.mjs → adminCommands-BMzwjOct.mjs} +1 -1
- package/dist/{agentCommands-DD47Krr1.mjs → agentCommands-BVz1k2R2.mjs} +35 -6
- package/dist/{auth-CE3Cnkn6.mjs → auth-D0v5RwMJ.mjs} +1 -1
- package/dist/{cli-CdYVO7ce.mjs → cli-DmjtuskT.mjs} +77 -77
- package/dist/cli.mjs +2 -2
- package/dist/{commands-D7wwybeC.mjs → commands-BOGd7CmP.mjs} +8 -3
- package/dist/{commands-CHKSUX7x.mjs → commands-C3r_GhOb.mjs} +3 -3
- package/dist/{commands-09sPSIH-.mjs → commands-CPTWYXJD.mjs} +3 -3
- package/dist/{commands-14Tf0D6G.mjs → commands-CYgkxHsf.mjs} +3 -3
- package/dist/{commands-BIKekqQG.mjs → commands-CwoMu1mu.mjs} +1 -1
- package/dist/{commands-C2X-uElg.mjs → commands-DKouDroK.mjs} +1 -1
- package/dist/{commands-DXJlhBPk.mjs → commands-DcQMh7oz.mjs} +7 -9
- package/dist/{commands-BIx8s0JL.mjs → commands-DmPwUOqX.mjs} +11 -11
- package/dist/{fleet-bAe_gJfS.mjs → fleet-5foIrEnM.mjs} +3 -3
- package/dist/{headlessCli-Bwg5pf3s.mjs → headlessCli-BLZSVVlt.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{notifyCommands-Cc3wLAWW.mjs → notifyCommands-DADOx-j_.mjs} +1 -1
- package/dist/package-By6uMuic.mjs +64 -0
- package/dist/{pinnedClaudeCode-BO0Qs_kE.mjs → pinnedClaudeCode-C43KnZ-Q.mjs} +27 -6
- package/dist/{rpc-Bv6_c-xW.mjs → rpc-CoPRGZkJ.mjs} +2 -1
- package/dist/{rpc-DObWvEis.mjs → rpc-UomHF39a.mjs} +13 -1
- package/dist/{run-CyyWhgFI.mjs → run-CkEjIO1m.mjs} +1 -1
- package/dist/{run-DGhVoN3s.mjs → run-PXdghhjy.mjs} +425 -101
- package/dist/{scheduler-BvtNZ0pl.mjs → scheduler-gMWmsAgp.mjs} +1 -1
- package/dist/{serveCommands-CEM708Ls.mjs → serveCommands-Cklx2iuZ.mjs} +10 -10
- package/dist/{sideband--9vWYqKA.mjs → sideband-DXyAkIaB.mjs} +1 -1
- package/package.json +3 -3
- package/dist/package-CPQqs8ty.mjs +0 -64
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as connectToHypha,
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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 };
|