svamp-cli 0.2.319 → 0.2.321
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-DBADX_Uo.mjs → adminCommands-BRiz5afS.mjs} +1 -1
- package/dist/{agentCommands-BJeGwkeX.mjs → agentCommands-Cve_0_8K.mjs} +32 -6
- package/dist/{auth-0NUGwOc0.mjs → auth-DrLE8Yp-.mjs} +1 -1
- package/dist/{cli-CWElpiIq.mjs → cli-xMKB7O8k.mjs} +89 -85
- package/dist/cli.mjs +2 -2
- package/dist/{commands-BsaTwKnd.mjs → commands-BxHc_Exm.mjs} +3 -3
- package/dist/{commands-C0lwV0U3.mjs → commands-C-QNVo3l.mjs} +5 -3
- package/dist/{commands-DubEbPAY.mjs → commands-CXgDZgqh.mjs} +4 -2
- package/dist/{commands-AdVHZXK6.mjs → commands-D1d9snmv.mjs} +1 -1
- package/dist/{commands-CJWgDDl5.mjs → commands-D9-YqAI3.mjs} +5 -3
- package/dist/{commands-CLgdrTSU.mjs → commands-DfRahEsO.mjs} +5 -3
- package/dist/{commands-DMSkWb0h.mjs → commands-Fvgfzyo3.mjs} +34 -9
- package/dist/{commands-BY1lmXaM.mjs → commands-slA1eX13.mjs} +1 -1
- package/dist/{fleet-OKnU0cYK.mjs → fleet-umFHXPoE.mjs} +2 -2
- package/dist/{headlessCli-CCO0IFYl.mjs → headlessCli-DgJ15daM.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{notifyCommands-4GUy4Mcl.mjs → notifyCommands-Cip4lIYS.mjs} +1 -1
- package/dist/package-DJRwvqcx.mjs +64 -0
- package/dist/{pinnedClaudeCode-dbXgsGNK.mjs → pinnedClaudeCode-BkZfX5pW.mjs} +1 -1
- package/dist/{rpc-FGp88Yxp.mjs → rpc-Bz9w7JV9.mjs} +1 -1
- package/dist/{rpc-TXF-di9u.mjs → rpc-CLoO6Z5Z.mjs} +1 -1
- package/dist/{run-09AkgeGM.mjs → run-CKLatoxa.mjs} +268 -94
- package/dist/{run-7TVWXnOM.mjs → run-CxuKTe0N.mjs} +1 -1
- package/dist/{scheduler-b-ysyKIj.mjs → scheduler-Bs0nAlhs.mjs} +1 -1
- package/dist/{serveCommands-D3W7w0G6.mjs → serveCommands-Bi7DJs-3.mjs} +33 -8
- package/dist/{sideband-C1db5sMF.mjs → sideband-CFbMRvzr.mjs} +1 -1
- package/package.json +3 -3
- package/dist/package-BEEqsQhN.mjs +0 -64
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as connectToHypha, K as computeCollectionConfigUpdate, L as SYSTEM_COLLECTION_CONFIG } from './run-
|
|
1
|
+
import { c as connectToHypha, K as computeCollectionConfigUpdate, L as SYSTEM_COLLECTION_CONFIG } from './run-CKLatoxa.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-CKLatoxa.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-CKLatoxa.mjs').then(function (n) { return n.as; });
|
|
100
100
|
const desc = sanitizeDescription(description, 240);
|
|
101
101
|
if (!desc) {
|
|
102
102
|
console.error("Project description is empty.");
|
|
@@ -212,6 +212,24 @@ function autoAddSessionLink(url, label, icon, service) {
|
|
|
212
212
|
return false;
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
+
function removeServiceLinks(links, kind, name) {
|
|
216
|
+
return links.filter((l) => !(l.service && l.service.kind === kind && l.service.name === name));
|
|
217
|
+
}
|
|
218
|
+
function removeSessionLinkByService(kind, name, sessionId) {
|
|
219
|
+
const sid = sessionId || process.env.SVAMP_SESSION_ID;
|
|
220
|
+
if (!sid || !name) return false;
|
|
221
|
+
try {
|
|
222
|
+
const configPath = getConfigPath(sid);
|
|
223
|
+
const config = readConfig(configPath);
|
|
224
|
+
const before = readSessionLinks(config);
|
|
225
|
+
const next = removeServiceLinks(before, kind, name);
|
|
226
|
+
if (next.length === before.length) return false;
|
|
227
|
+
writeSessionLinks(configPath, config, next);
|
|
228
|
+
return true;
|
|
229
|
+
} catch {
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
215
233
|
function reconcileServiceLinks(config, incoming) {
|
|
216
234
|
const before = readSessionLinks(config);
|
|
217
235
|
let links = before;
|
|
@@ -225,6 +243,14 @@ function reconcileServiceLinks(config, incoming) {
|
|
|
225
243
|
config.session_link = links[0] ? { url: links[0].url, label: links[0].label } : void 0;
|
|
226
244
|
return true;
|
|
227
245
|
}
|
|
246
|
+
function dropServiceLinks(config, kind, name) {
|
|
247
|
+
const before = readSessionLinks(config);
|
|
248
|
+
const next = removeServiceLinks(before, kind, name);
|
|
249
|
+
if (next.length === before.length) return false;
|
|
250
|
+
config.session_links = next;
|
|
251
|
+
config.session_link = next[0] ? { url: next[0].url, label: next[0].label } : void 0;
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
228
254
|
function requireSessionId() {
|
|
229
255
|
const sessionId = process.env.SVAMP_SESSION_ID;
|
|
230
256
|
if (!sessionId) {
|
|
@@ -343,7 +369,7 @@ async function sessionBroadcast(action, args) {
|
|
|
343
369
|
console.log(`Broadcast sent: ${action}`);
|
|
344
370
|
}
|
|
345
371
|
async function connectToMachineService() {
|
|
346
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
372
|
+
const { connectAndGetMachine } = await import('./commands-slA1eX13.mjs');
|
|
347
373
|
return connectAndGetMachine();
|
|
348
374
|
}
|
|
349
375
|
function buildInboxMessage(args) {
|
|
@@ -426,7 +452,7 @@ async function inboxSend(targetSessionId, opts) {
|
|
|
426
452
|
console.error("Message body is required.");
|
|
427
453
|
process.exit(1);
|
|
428
454
|
}
|
|
429
|
-
const { connectAndResolveSession } = await import('./commands-
|
|
455
|
+
const { connectAndResolveSession } = await import('./commands-slA1eX13.mjs');
|
|
430
456
|
let server;
|
|
431
457
|
try {
|
|
432
458
|
const { targetId, messageId } = await inboxSendCore(
|
|
@@ -481,7 +507,7 @@ async function inboxReply(messageId, body, opts) {
|
|
|
481
507
|
console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
|
|
482
508
|
process.exit(1);
|
|
483
509
|
}
|
|
484
|
-
const { connectAndResolveSession } = await import('./commands-
|
|
510
|
+
const { connectAndResolveSession } = await import('./commands-slA1eX13.mjs');
|
|
485
511
|
const { server: localServer, machine: localMachine } = await connectToMachineService();
|
|
486
512
|
let localDisconnected = false;
|
|
487
513
|
const disconnectLocal = async () => {
|
|
@@ -546,4 +572,4 @@ async function machineNotify(message, level = "info") {
|
|
|
546
572
|
console.log(`Machine notification sent [${level}]: ${message}`);
|
|
547
573
|
}
|
|
548
574
|
|
|
549
|
-
export { autoAddSessionLink, buildInboxMessage, inboxList, inboxReply, inboxReplyCore, inboxSend, inboxSendCore, linkDedupKey, machineNotify, reconcileServiceLinks, sessionBroadcast, sessionLinkAdd, sessionLinkList, sessionLinkRemove, sessionLinkUpdate, sessionNotify, sessionSetLink, sessionSetProjectDescription, sessionSetTitle, upsertSessionLink };
|
|
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 };
|