svamp-cli 0.1.54 → 0.1.56
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/cli.mjs +17 -17
- package/dist/{commands-DawcW7Ty.mjs → commands-CraYxTcv.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{package-HcoejbYj.mjs → package-4AMqauyI.mjs} +1 -1
- package/dist/{run-Bus1nAOe.mjs → run-FHqgSPLk.mjs} +1 -1
- package/dist/{run-xuIB35Y4.mjs → run-sALUrMgm.mjs} +16 -0
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as stopDaemon, s as startDaemon, d as daemonStatus } from './run-
|
|
1
|
+
import { b as stopDaemon, s as startDaemon, d as daemonStatus } from './run-sALUrMgm.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -113,7 +113,7 @@ async function main() {
|
|
|
113
113
|
} else if (!subcommand || subcommand === "start") {
|
|
114
114
|
await handleInteractiveCommand();
|
|
115
115
|
} else if (subcommand === "--version" || subcommand === "-v") {
|
|
116
|
-
const pkg = await import('./package-
|
|
116
|
+
const pkg = await import('./package-4AMqauyI.mjs').catch(() => ({ default: { version: "unknown" } }));
|
|
117
117
|
console.log(`svamp version: ${pkg.default.version}`);
|
|
118
118
|
} else {
|
|
119
119
|
console.error(`Unknown command: ${subcommand}`);
|
|
@@ -122,7 +122,7 @@ async function main() {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
async function handleInteractiveCommand() {
|
|
125
|
-
const { runInteractive } = await import('./run-
|
|
125
|
+
const { runInteractive } = await import('./run-FHqgSPLk.mjs');
|
|
126
126
|
const interactiveArgs = subcommand === "start" ? args.slice(1) : args;
|
|
127
127
|
let directory = process.cwd();
|
|
128
128
|
let resumeSessionId;
|
|
@@ -167,7 +167,7 @@ async function handleAgentCommand() {
|
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
if (agentArgs[0] === "list") {
|
|
170
|
-
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-
|
|
170
|
+
const { KNOWN_ACP_AGENTS, KNOWN_MCP_AGENTS: KNOWN_MCP_AGENTS2 } = await import('./run-sALUrMgm.mjs').then(function (n) { return n.i; });
|
|
171
171
|
console.log("Known agents:");
|
|
172
172
|
for (const [name, config2] of Object.entries(KNOWN_ACP_AGENTS)) {
|
|
173
173
|
console.log(` ${name.padEnd(12)} ${config2.command} ${config2.args.join(" ")} (ACP)`);
|
|
@@ -179,7 +179,7 @@ async function handleAgentCommand() {
|
|
|
179
179
|
console.log('Use "svamp agent -- <command> [args]" for a custom ACP agent.');
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
-
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-
|
|
182
|
+
const { resolveAcpAgentConfig, KNOWN_MCP_AGENTS } = await import('./run-sALUrMgm.mjs').then(function (n) { return n.i; });
|
|
183
183
|
let cwd = process.cwd();
|
|
184
184
|
const filteredArgs = [];
|
|
185
185
|
for (let i = 0; i < agentArgs.length; i++) {
|
|
@@ -203,12 +203,12 @@ async function handleAgentCommand() {
|
|
|
203
203
|
console.log(`Starting ${config.agentName} agent in ${cwd}...`);
|
|
204
204
|
let backend;
|
|
205
205
|
if (KNOWN_MCP_AGENTS[config.agentName]) {
|
|
206
|
-
const { CodexMcpBackend } = await import('./run-
|
|
206
|
+
const { CodexMcpBackend } = await import('./run-sALUrMgm.mjs').then(function (n) { return n.j; });
|
|
207
207
|
backend = new CodexMcpBackend({ cwd, log: logFn });
|
|
208
208
|
} else {
|
|
209
|
-
const { AcpBackend } = await import('./run-
|
|
210
|
-
const { GeminiTransport } = await import('./run-
|
|
211
|
-
const { DefaultTransport } = await import('./run-
|
|
209
|
+
const { AcpBackend } = await import('./run-sALUrMgm.mjs').then(function (n) { return n.h; });
|
|
210
|
+
const { GeminiTransport } = await import('./run-sALUrMgm.mjs').then(function (n) { return n.G; });
|
|
211
|
+
const { DefaultTransport } = await import('./run-sALUrMgm.mjs').then(function (n) { return n.D; });
|
|
212
212
|
const transportHandler = config.agentName === "gemini" ? new GeminiTransport() : new DefaultTransport(config.agentName);
|
|
213
213
|
backend = new AcpBackend({
|
|
214
214
|
agentName: config.agentName,
|
|
@@ -326,7 +326,7 @@ async function handleSessionCommand() {
|
|
|
326
326
|
printSessionHelp();
|
|
327
327
|
return;
|
|
328
328
|
}
|
|
329
|
-
const { sessionList, sessionSpawn, sessionStop, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionQueueAdd, sessionQueueList, sessionQueueClear } = await import('./commands-
|
|
329
|
+
const { sessionList, sessionSpawn, sessionStop, sessionInfo, sessionMessages, sessionAttach, sessionMachines, sessionSend, sessionWait, sessionShare, sessionRalphStart, sessionRalphCancel, sessionRalphStatus, sessionQueueAdd, sessionQueueList, sessionQueueClear } = await import('./commands-CraYxTcv.mjs');
|
|
330
330
|
const parseFlagStr = (flag, shortFlag) => {
|
|
331
331
|
for (let i = 1; i < sessionArgs.length; i++) {
|
|
332
332
|
if ((sessionArgs[i] === flag || shortFlag) && i + 1 < sessionArgs.length) {
|
|
@@ -386,7 +386,7 @@ async function handleSessionCommand() {
|
|
|
386
386
|
allowDomain.push(sessionArgs[++i]);
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
const { parseShareArg } = await import('./commands-
|
|
389
|
+
const { parseShareArg } = await import('./commands-CraYxTcv.mjs');
|
|
390
390
|
const shareEntries = share.map((s) => parseShareArg(s));
|
|
391
391
|
await sessionSpawn(agent, dir, targetMachineId, {
|
|
392
392
|
message,
|
|
@@ -470,7 +470,7 @@ async function handleSessionCommand() {
|
|
|
470
470
|
console.error("Usage: svamp session approve <session-id> [request-id] [--json]");
|
|
471
471
|
process.exit(1);
|
|
472
472
|
}
|
|
473
|
-
const { sessionApprove } = await import('./commands-
|
|
473
|
+
const { sessionApprove } = await import('./commands-CraYxTcv.mjs');
|
|
474
474
|
const approveReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
475
475
|
await sessionApprove(sessionArgs[1], approveReqId, targetMachineId, {
|
|
476
476
|
json: hasFlag("--json")
|
|
@@ -480,7 +480,7 @@ async function handleSessionCommand() {
|
|
|
480
480
|
console.error("Usage: svamp session deny <session-id> [request-id] [--json]");
|
|
481
481
|
process.exit(1);
|
|
482
482
|
}
|
|
483
|
-
const { sessionDeny } = await import('./commands-
|
|
483
|
+
const { sessionDeny } = await import('./commands-CraYxTcv.mjs');
|
|
484
484
|
const denyReqId = sessionArgs[2] && !sessionArgs[2].startsWith("--") ? sessionArgs[2] : void 0;
|
|
485
485
|
await sessionDeny(sessionArgs[1], denyReqId, targetMachineId, {
|
|
486
486
|
json: hasFlag("--json")
|
|
@@ -549,7 +549,7 @@ async function handleMachineCommand() {
|
|
|
549
549
|
return;
|
|
550
550
|
}
|
|
551
551
|
if (machineSubcommand === "share") {
|
|
552
|
-
const { machineShare } = await import('./commands-
|
|
552
|
+
const { machineShare } = await import('./commands-CraYxTcv.mjs');
|
|
553
553
|
let machineId;
|
|
554
554
|
const shareArgs = [];
|
|
555
555
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
@@ -579,7 +579,7 @@ async function handleMachineCommand() {
|
|
|
579
579
|
}
|
|
580
580
|
await machineShare(machineId, { add, remove, list, configPath, showConfig });
|
|
581
581
|
} else if (machineSubcommand === "exec") {
|
|
582
|
-
const { machineExec } = await import('./commands-
|
|
582
|
+
const { machineExec } = await import('./commands-CraYxTcv.mjs');
|
|
583
583
|
let machineId;
|
|
584
584
|
let cwd;
|
|
585
585
|
const cmdParts = [];
|
|
@@ -599,7 +599,7 @@ async function handleMachineCommand() {
|
|
|
599
599
|
}
|
|
600
600
|
await machineExec(machineId, command, cwd);
|
|
601
601
|
} else if (machineSubcommand === "info") {
|
|
602
|
-
const { machineInfo } = await import('./commands-
|
|
602
|
+
const { machineInfo } = await import('./commands-CraYxTcv.mjs');
|
|
603
603
|
let machineId;
|
|
604
604
|
for (let i = 1; i < machineArgs.length; i++) {
|
|
605
605
|
if ((machineArgs[i] === "--machine" || machineArgs[i] === "-m") && i + 1 < machineArgs.length) {
|
|
@@ -608,7 +608,7 @@ async function handleMachineCommand() {
|
|
|
608
608
|
}
|
|
609
609
|
await machineInfo(machineId);
|
|
610
610
|
} else if (machineSubcommand === "ls") {
|
|
611
|
-
const { machineLs } = await import('./commands-
|
|
611
|
+
const { machineLs } = await import('./commands-CraYxTcv.mjs');
|
|
612
612
|
let machineId;
|
|
613
613
|
let showHidden = false;
|
|
614
614
|
let path;
|
|
@@ -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 { l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha } from './run-
|
|
5
|
+
import { l as loadSecurityContextConfig, e as resolveSecurityContext, f as buildSecurityContextFromFlags, m as mergeSecurityContexts, c as connectToHypha } from './run-sALUrMgm.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
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-
|
|
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-sALUrMgm.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -2,7 +2,7 @@ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(im
|
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import { join, resolve } from 'node:path';
|
|
4
4
|
import { mkdirSync, writeFileSync, existsSync, unlinkSync, readFileSync, watch } from 'node:fs';
|
|
5
|
-
import { c as connectToHypha, a as registerSessionService } from './run-
|
|
5
|
+
import { c as connectToHypha, a as registerSessionService } from './run-sALUrMgm.mjs';
|
|
6
6
|
import { createServer } from 'node:http';
|
|
7
7
|
import { spawn } from 'node:child_process';
|
|
8
8
|
import { createInterface } from 'node:readline';
|
|
@@ -6288,9 +6288,25 @@ The automated loop has finished. Review the progress above and let me know if yo
|
|
|
6288
6288
|
heartbeatRunning = false;
|
|
6289
6289
|
}
|
|
6290
6290
|
}, HEARTBEAT_INTERVAL_MS);
|
|
6291
|
+
const PROXY_TOKEN_REFRESH_INTERVAL_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
6292
|
+
let proxyTokenRefreshInterval;
|
|
6293
|
+
if (process.env.ANTHROPIC_BASE_URL) {
|
|
6294
|
+
const refreshProxyToken = async () => {
|
|
6295
|
+
try {
|
|
6296
|
+
const freshToken = await server.generateToken({ expires_in: 30 * 24 * 3600 });
|
|
6297
|
+
process.env.ANTHROPIC_API_KEY = freshToken;
|
|
6298
|
+
logger.log("Proxy token refreshed (30-day expiry)");
|
|
6299
|
+
} catch (err) {
|
|
6300
|
+
logger.log(`Proxy token refresh failed (will retry in 7 days): ${err}`);
|
|
6301
|
+
}
|
|
6302
|
+
};
|
|
6303
|
+
proxyTokenRefreshInterval = setInterval(refreshProxyToken, PROXY_TOKEN_REFRESH_INTERVAL_MS);
|
|
6304
|
+
logger.log("Proxy token auto-refresh enabled (every 7 days)");
|
|
6305
|
+
}
|
|
6291
6306
|
const cleanup = async (source) => {
|
|
6292
6307
|
logger.log(`Cleaning up (source: ${source})...`);
|
|
6293
6308
|
clearInterval(heartbeatInterval);
|
|
6309
|
+
if (proxyTokenRefreshInterval) clearInterval(proxyTokenRefreshInterval);
|
|
6294
6310
|
if (unhandledRejectionResetTimer) clearTimeout(unhandledRejectionResetTimer);
|
|
6295
6311
|
machineService.updateDaemonState({
|
|
6296
6312
|
...initialDaemonState,
|