svamp-cli 0.2.356 → 0.2.358
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/{agentCommands-D91RcjqQ.mjs → agentCommands-C_KvvYFp.mjs} +5 -5
- package/dist/{claudeAuth-C0wc1GTM.mjs → claudeAuth-DMDvPNhO.mjs} +11 -6
- package/dist/cli.mjs +136 -67
- package/dist/{commands-CoOc4qiw.mjs → commands-B19lVZjm.mjs} +10 -3
- package/dist/{commands-C13-yE2R.mjs → commands-Bmoy6Rlw.mjs} +5 -4
- package/dist/{commands-sPvRcG3J.mjs → commands-CFBKkfX8.mjs} +9 -9
- package/dist/{commands-B-yczgz_.mjs → commands-CcdoQIkb.mjs} +114 -17
- package/dist/{commands-BMeDrpSv.mjs → commands-DH_YQrAP.mjs} +5 -21
- package/dist/{commands-BbmypSgx.mjs → commands-DRxANaS5.mjs} +61 -18
- package/dist/{commands-BkdbelFo.mjs → commands-nkvTnUJj.mjs} +6 -5
- package/dist/friendlyName-B-OEwt0t.mjs +341 -0
- package/dist/{headlessCli-C8HzQvis.mjs → headlessCli-BpTXz6FD.mjs} +24 -16
- package/dist/{hookSettings-FFc1pi8j.mjs → hookSettings-CvvUhwCK.mjs} +122 -30
- package/dist/{friendlyName-1UZcyDhu.mjs → inboxGuard-CDqmIypF.mjs} +32 -347
- package/dist/index.mjs +7 -6
- package/dist/{loopVerify-DALtTk2V.mjs → loopVerify-CxAKJB5a.mjs} +1 -1
- package/dist/package-DTTWvJbp.mjs +64 -0
- package/dist/{rpc-ccY7xvlo.mjs → rpc-CAlAHQAy.mjs} +3 -1
- package/dist/{rpc-CBkSkzsI.mjs → rpc-CacreLQ8.mjs} +10 -6
- package/dist/{run-DCq3aEiF.mjs → run-Bc81iurl.mjs} +26 -7
- package/dist/{run-DDmeV9K3.mjs → run-DKOND4dO.mjs} +48 -30
- package/dist/{scheduler-BkVJ27Ki.mjs → scheduler-IyLWBF8T.mjs} +25 -7
- package/dist/{serveCommands-CLhkccJM.mjs → serveCommands-B-Ym_QXc.mjs} +8 -8
- package/dist/{store-B4E6NzG6.mjs → store-D8dok6_d.mjs} +53 -14
- package/package.json +3 -3
- package/dist/package-BrsiNutS.mjs +0 -64
|
@@ -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-Cdzsj5TC.mjs';
|
|
5
|
-
import { s as shortId } from './friendlyName-
|
|
5
|
+
import { s as shortId } from './friendlyName-B-OEwt0t.mjs';
|
|
6
6
|
import 'node:crypto';
|
|
7
7
|
|
|
8
8
|
const SVAMP_HOME = process.env.SVAMP_HOME || join(os.homedir(), ".svamp");
|
|
@@ -79,7 +79,7 @@ async function sessionSetTitle(title) {
|
|
|
79
79
|
}
|
|
80
80
|
async function sessionSetProjectDescription(description) {
|
|
81
81
|
const dir = process.cwd();
|
|
82
|
-
const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-
|
|
82
|
+
const { projectName, writeProjectInfo, sanitizeDescription, projectInfoPath } = await import('./run-DKOND4dO.mjs').then(function (n) { return n.p; });
|
|
83
83
|
const desc = sanitizeDescription(description, 240);
|
|
84
84
|
if (!desc) {
|
|
85
85
|
console.error("Project description is empty.");
|
|
@@ -382,7 +382,7 @@ async function sessionBroadcast(action, args) {
|
|
|
382
382
|
console.log(`Broadcast sent: ${action}`);
|
|
383
383
|
}
|
|
384
384
|
async function connectToMachineService() {
|
|
385
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
385
|
+
const { connectAndGetMachine } = await import('./commands-CcdoQIkb.mjs').then(function (n) { return n.d; });
|
|
386
386
|
return connectAndGetMachine();
|
|
387
387
|
}
|
|
388
388
|
function buildInboxMessage(args) {
|
|
@@ -465,7 +465,7 @@ async function inboxSend(targetSessionId, opts) {
|
|
|
465
465
|
console.error("Message body is required.");
|
|
466
466
|
process.exit(1);
|
|
467
467
|
}
|
|
468
|
-
const { connectAndResolveSession } = await import('./commands-
|
|
468
|
+
const { connectAndResolveSession } = await import('./commands-CcdoQIkb.mjs').then(function (n) { return n.d; });
|
|
469
469
|
let server;
|
|
470
470
|
try {
|
|
471
471
|
const { targetId, messageId } = await inboxSendCore(
|
|
@@ -520,7 +520,7 @@ async function inboxReply(messageId, body, opts) {
|
|
|
520
520
|
console.error("SVAMP_SESSION_ID not set. This command must be run inside a Svamp session.");
|
|
521
521
|
process.exit(1);
|
|
522
522
|
}
|
|
523
|
-
const { connectAndResolveSession } = await import('./commands-
|
|
523
|
+
const { connectAndResolveSession } = await import('./commands-CcdoQIkb.mjs').then(function (n) { return n.d; });
|
|
524
524
|
const { server: localServer, machine: localMachine } = await connectToMachineService();
|
|
525
525
|
let localDisconnected = false;
|
|
526
526
|
const disconnectLocal = async () => {
|
|
@@ -226,12 +226,17 @@ async function probeLongContext1MEntitlement(baseUrl, apiKey, fetchImpl = fetch)
|
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
function applyLongContext1M(spawnEnv) {
|
|
229
|
-
if (envFlagEnabled(spawnEnv.CLAUDE_CODE_DISABLE_1M_CONTEXT) || envFlagEnabled(process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT)) return;
|
|
230
|
-
if (longContext1MEntitlement !== "entitled") return;
|
|
229
|
+
if (envFlagEnabled(spawnEnv.CLAUDE_CODE_DISABLE_1M_CONTEXT) || envFlagEnabled(process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT)) return false;
|
|
230
|
+
if (longContext1MEntitlement !== "entitled") return false;
|
|
231
231
|
const existing = spawnEnv.ANTHROPIC_BETAS ?? process.env.ANTHROPIC_BETAS ?? "";
|
|
232
232
|
const betas = existing.split(",").map((b) => b.trim()).filter(Boolean);
|
|
233
233
|
if (!betas.includes(BETA_1M_TOKEN)) betas.push(BETA_1M_TOKEN);
|
|
234
234
|
spawnEnv.ANTHROPIC_BETAS = betas.join(",");
|
|
235
|
+
return true;
|
|
236
|
+
}
|
|
237
|
+
function describeContextWindow(injected) {
|
|
238
|
+
if (injected) return "1M context";
|
|
239
|
+
return `200K context (1M beta not sent \u2014 entitlement ${longContext1MEntitlement})`;
|
|
235
240
|
}
|
|
236
241
|
function applyTodoTools(spawnEnv) {
|
|
237
242
|
const override = spawnEnv.CLAUDE_CODE_ENABLE_TODO_TOOLS ?? process.env.CLAUDE_CODE_ENABLE_TODO_TOOLS;
|
|
@@ -265,8 +270,8 @@ function applyClaudeProxyEnv(spawnEnv) {
|
|
|
265
270
|
spawnEnv.ANTHROPIC_BASE_URL = proxyUrl;
|
|
266
271
|
spawnEnv.ANTHROPIC_API_KEY = token;
|
|
267
272
|
applyPromptCacheTtl(spawnEnv);
|
|
268
|
-
applyLongContext1M(spawnEnv);
|
|
269
|
-
return `hypha proxy (${proxyUrl}, 1h cache TTL,
|
|
273
|
+
const oneM = applyLongContext1M(spawnEnv);
|
|
274
|
+
return `hypha proxy (${proxyUrl}, 1h cache TTL, ${describeContextWindow(oneM)})`;
|
|
270
275
|
}
|
|
271
276
|
if (mode === "custom") {
|
|
272
277
|
const url = process.env.ANTHROPIC_BASE_URL;
|
|
@@ -279,8 +284,8 @@ function applyClaudeProxyEnv(spawnEnv) {
|
|
|
279
284
|
spawnEnv.ANTHROPIC_BASE_URL = url;
|
|
280
285
|
spawnEnv.ANTHROPIC_API_KEY = key;
|
|
281
286
|
applyPromptCacheTtl(spawnEnv);
|
|
282
|
-
applyLongContext1M(spawnEnv);
|
|
283
|
-
return `custom proxy (${url}, 1h cache TTL,
|
|
287
|
+
const oneM = applyLongContext1M(spawnEnv);
|
|
288
|
+
return `custom proxy (${url}, 1h cache TTL, ${describeContextWindow(oneM)})`;
|
|
284
289
|
}
|
|
285
290
|
delete spawnEnv.ANTHROPIC_BASE_URL;
|
|
286
291
|
delete spawnEnv.ANTHROPIC_API_KEY;
|