svamp-cli 0.2.329 → 0.2.331
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-C-p7ayqB.mjs → adminCommands-DQ6TQAXa.mjs} +1 -1
- package/dist/{agentCommands-B4sCl_5R.mjs → agentCommands-CovUtOYv.mjs} +5 -5
- package/dist/{auth-X_CjxN_J.mjs → auth-CMWkQmps.mjs} +1 -1
- package/dist/{cli-BY4DQnRs.mjs → cli-Cd_6Xp2x.mjs} +77 -77
- package/dist/cli.mjs +2 -2
- package/dist/{commands-BR5FB3lB.mjs → commands-B-PLeiIB.mjs} +2 -2
- package/dist/{commands-C8uGnx2z.mjs → commands-BCWHfbuw.mjs} +2 -2
- package/dist/{commands-6uHR7YHf.mjs → commands-Bv52WaQ0.mjs} +11 -11
- package/dist/{commands-rKfH5E8g.mjs → commands-CWkWkrZF.mjs} +1 -1
- package/dist/{commands-rmxjAHLz.mjs → commands-CpXKePYP.mjs} +3 -3
- package/dist/{commands-BQjZb1eL.mjs → commands-D2he7eNq.mjs} +3 -3
- package/dist/{commands-BInj_IDQ.mjs → commands-DCTCLAPA.mjs} +3 -3
- package/dist/{commands-CEURyD-l.mjs → commands-OwmAlnGb.mjs} +1 -1
- package/dist/{fleet-CxxkWc3z.mjs → fleet-DrLOwe6r.mjs} +1 -1
- package/dist/{headlessCli-NkXGxjrT.mjs → headlessCli-CDjGYUpj.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{notifyCommands-CEvdTCIS.mjs → notifyCommands-DSRd8YaE.mjs} +1 -1
- package/dist/{package-BNriEfp8.mjs → package-C23qFmVz.mjs} +2 -2
- package/dist/{rpc-q5KTMSRl.mjs → rpc-CVBhR9Cj.mjs} +1 -1
- package/dist/{rpc-fZm83jEI.mjs → rpc-OmhzsDGP.mjs} +1 -1
- package/dist/{run-1CHjd0_g.mjs → run-CSNL62FQ.mjs} +133 -11
- package/dist/{run-C7JwLKGe.mjs → run-DcwSfoyP.mjs} +1 -1
- package/dist/{scheduler-DTRcVW02.mjs → scheduler-DDw3YLzH.mjs} +1 -1
- package/dist/{serveCommands-CXlZ6Bdy.mjs → serveCommands-BQ0jhFUR.mjs} +10 -10
- package/dist/{sideband-C4QaSCEM.mjs → sideband-S3ycJa01.mjs} +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { f as flushAndExit } from './cli-
|
|
5
|
-
import { f as resolveProjectRoot, n as searchIssues, l as listIssues, m as isPendingIssue, i as resumeIssue, p as pauseIssue, j as addComment, u as updateIssue, h as getIssue, o as isVisibleTo, I as summarize, k as addIssue } from './run-
|
|
4
|
+
import { f as flushAndExit } from './cli-Cd_6Xp2x.mjs';
|
|
5
|
+
import { f as resolveProjectRoot, n as searchIssues, l as listIssues, m as isPendingIssue, i as resumeIssue, p as pauseIssue, j as addComment, u as updateIssue, h as getIssue, o as isVisibleTo, I as summarize, k as addIssue } from './run-CSNL62FQ.mjs';
|
|
6
6
|
import './serviceManager-hlOVxkhW.mjs';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from 'path';
|
|
2
|
-
import { w as wantsHelp } from './cli-
|
|
3
|
-
import './run-
|
|
2
|
+
import { w as wantsHelp } from './cli-Cd_6Xp2x.mjs';
|
|
3
|
+
import './run-CSNL62FQ.mjs';
|
|
4
4
|
import 'os';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'fs';
|
|
@@ -83,7 +83,7 @@ async function serviceExpose(args) {
|
|
|
83
83
|
process.exit(1);
|
|
84
84
|
}
|
|
85
85
|
if (foreground) {
|
|
86
|
-
const { runFrpcTunnel } = await import('./run-
|
|
86
|
+
const { runFrpcTunnel } = await import('./run-CSNL62FQ.mjs').then(function (n) { return n.ap; });
|
|
87
87
|
await runFrpcTunnel(name, ports, void 0, {
|
|
88
88
|
group,
|
|
89
89
|
groupKey,
|
|
@@ -93,7 +93,7 @@ async function serviceExpose(args) {
|
|
|
93
93
|
});
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
96
|
+
const { connectAndGetMachine } = await import('./commands-CWkWkrZF.mjs');
|
|
97
97
|
const { server, machine } = await connectAndGetMachine();
|
|
98
98
|
try {
|
|
99
99
|
const status = await machine.tunnelStart({
|
|
@@ -115,7 +115,7 @@ async function serviceExpose(args) {
|
|
|
115
115
|
console.log(` port ${port}: ${url}`);
|
|
116
116
|
}
|
|
117
117
|
if (process.env.SVAMP_SESSION_ID) {
|
|
118
|
-
const { autoAddSessionLink } = await import('./agentCommands-
|
|
118
|
+
const { autoAddSessionLink } = await import('./agentCommands-CovUtOYv.mjs');
|
|
119
119
|
let added = 0;
|
|
120
120
|
for (const [port, url] of urlEntries) {
|
|
121
121
|
const label = urlEntries.length > 1 ? `${name}:${port}` : name;
|
|
@@ -151,8 +151,8 @@ async function serviceServe(args) {
|
|
|
151
151
|
const resolvedDir = path.resolve(directory);
|
|
152
152
|
console.log(`Serving ${resolvedDir}`);
|
|
153
153
|
const http = await import('http');
|
|
154
|
-
const { serveStaticMount } = await import('./run-
|
|
155
|
-
const { getFreePort } = await import('./run-
|
|
154
|
+
const { serveStaticMount } = await import('./run-CSNL62FQ.mjs').then(function (n) { return n.aq; });
|
|
155
|
+
const { getFreePort } = await import('./run-CSNL62FQ.mjs').then(function (n) { return n.ap; });
|
|
156
156
|
const server = http.createServer((req, res) => {
|
|
157
157
|
const u = new URL(req.url || "/", "http://127.0.0.1");
|
|
158
158
|
let rel = u.pathname;
|
|
@@ -175,7 +175,7 @@ async function serviceServe(args) {
|
|
|
175
175
|
resolve(18080);
|
|
176
176
|
});
|
|
177
177
|
});
|
|
178
|
-
const { runFrpcTunnel } = await import('./run-
|
|
178
|
+
const { runFrpcTunnel } = await import('./run-CSNL62FQ.mjs').then(function (n) { return n.ap; });
|
|
179
179
|
void server;
|
|
180
180
|
await runFrpcTunnel(name, [servePort]);
|
|
181
181
|
} catch (err) {
|
|
@@ -185,7 +185,7 @@ async function serviceServe(args) {
|
|
|
185
185
|
}
|
|
186
186
|
async function serviceList(_args) {
|
|
187
187
|
try {
|
|
188
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
188
|
+
const { connectAndGetMachine } = await import('./commands-CWkWkrZF.mjs');
|
|
189
189
|
const { server, machine } = await connectAndGetMachine();
|
|
190
190
|
try {
|
|
191
191
|
const tunnels = await machine.tunnelList({});
|
|
@@ -225,11 +225,11 @@ async function serviceDelete(args) {
|
|
|
225
225
|
process.exit(1);
|
|
226
226
|
}
|
|
227
227
|
try {
|
|
228
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
228
|
+
const { connectAndGetMachine } = await import('./commands-CWkWkrZF.mjs');
|
|
229
229
|
const { server, machine } = await connectAndGetMachine();
|
|
230
230
|
try {
|
|
231
231
|
await machine.tunnelStop({ name });
|
|
232
|
-
const { removeSessionLinkByService } = await import('./agentCommands-
|
|
232
|
+
const { removeSessionLinkByService } = await import('./agentCommands-CovUtOYv.mjs');
|
|
233
233
|
removeSessionLinkByService("tunnel", name);
|
|
234
234
|
console.log(`Stopped tunnel '${name}'.`);
|
|
235
235
|
} catch (err) {
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
2
2
|
import { execSync, execFileSync } from 'node:child_process';
|
|
3
3
|
import { basename, resolve, join, isAbsolute } from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import { a2 as formatHandle, a3 as normalizeAllowedUser, a4 as loadSecurityContextConfig, a5 as resolveSecurityContext, a6 as buildSecurityContextFromFlags, a7 as mergeSecurityContexts, c as connectToHypha, a8 as buildSessionShareUrl, a9 as computeOutboundHop, e as shortId, aa as registerAwaitingReply, ab as buildMachineShareUrl, ac as parseHandle, ad as handleMatchesMetadata } from './run-
|
|
5
|
+
import { a2 as formatHandle, a3 as normalizeAllowedUser, a4 as loadSecurityContextConfig, a5 as resolveSecurityContext, a6 as buildSecurityContextFromFlags, a7 as mergeSecurityContexts, c as connectToHypha, a8 as buildSessionShareUrl, a9 as computeOutboundHop, e as shortId, aa as registerAwaitingReply, ab as buildMachineShareUrl, ac as parseHandle, ad as handleMatchesMetadata } from './run-CSNL62FQ.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { join, resolve } from 'node:path';
|
|
3
|
-
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-
|
|
3
|
+
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-CWkWkrZF.mjs';
|
|
4
4
|
import { execFileSync } from 'node:child_process';
|
|
5
|
-
import { ah as withFileLock, u as updateIssue, j as addComment, k as addIssue, e as shortId } from './run-
|
|
6
|
-
import { w as wantsHelp } from './cli-
|
|
5
|
+
import { ah as withFileLock, u as updateIssue, j as addComment, k as addIssue, e as shortId } from './run-CSNL62FQ.mjs';
|
|
6
|
+
import { w as wantsHelp } from './cli-Cd_6Xp2x.mjs';
|
|
7
7
|
import 'node:os';
|
|
8
8
|
import 'os';
|
|
9
9
|
import 'fs/promises';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { connectAndResolveSession } from './commands-
|
|
2
|
-
import { w as wantsHelp } from './cli-
|
|
1
|
+
import { connectAndResolveSession } from './commands-CWkWkrZF.mjs';
|
|
2
|
+
import { w as wantsHelp } from './cli-Cd_6Xp2x.mjs';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:child_process';
|
|
5
5
|
import 'node:path';
|
|
6
6
|
import 'node:os';
|
|
7
|
-
import './run-
|
|
7
|
+
import './run-CSNL62FQ.mjs';
|
|
8
8
|
import 'os';
|
|
9
9
|
import 'fs/promises';
|
|
10
10
|
import 'fs';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { writeFileSync, readFileSync } from 'fs';
|
|
2
2
|
import { resolve } from 'path';
|
|
3
|
-
import { connectAndGetMachine } from './commands-
|
|
4
|
-
import { w as wantsHelp } from './cli-
|
|
3
|
+
import { connectAndGetMachine } from './commands-CWkWkrZF.mjs';
|
|
4
|
+
import { w as wantsHelp } from './cli-Cd_6Xp2x.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:child_process';
|
|
7
7
|
import 'node:path';
|
|
8
8
|
import 'node:os';
|
|
9
|
-
import './run-
|
|
9
|
+
import './run-CSNL62FQ.mjs';
|
|
10
10
|
import 'os';
|
|
11
11
|
import 'fs/promises';
|
|
12
12
|
import 'url';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import os from 'os';
|
|
2
2
|
import fs__default from 'fs';
|
|
3
3
|
import { resolve, join, relative } from 'path';
|
|
4
|
-
import { T as parseFrontmatter, U as getSkillsServer, V as getSkillsWorkspaceName, W as getSkillsCollectionName, X as fetchWithTimeout, Y as searchSkills, Z as SKILLS_DIR, _ as getSkillInfo, $ as downloadSkillFile, a0 as listSkillFiles } from './run-
|
|
4
|
+
import { T as parseFrontmatter, U as getSkillsServer, V as getSkillsWorkspaceName, W as getSkillsCollectionName, X as fetchWithTimeout, Y as searchSkills, Z as SKILLS_DIR, _ as getSkillInfo, $ as downloadSkillFile, a0 as listSkillFiles } from './run-CSNL62FQ.mjs';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'url';
|
|
7
7
|
import 'child_process';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import os from 'node:os';
|
|
4
|
-
import { ae as PINNED_CODEX_VERSION, c as connectToHypha } from './run-
|
|
4
|
+
import { ae as PINNED_CODEX_VERSION, c as connectToHypha } from './run-CSNL62FQ.mjs';
|
|
5
5
|
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-BO0Qs_kE.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a1 as resolveModel, ai as describeMisconfiguration, aj as buildMachineDeps } from './run-
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { a1 as resolveModel, ai as describeMisconfiguration, aj as buildMachineDeps } from './run-CSNL62FQ.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-S3ycJa01.mjs';
|
|
3
3
|
import { WebSocket } from 'ws';
|
|
4
4
|
import { execSync, spawn } from 'child_process';
|
|
5
5
|
import 'os';
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-
|
|
1
|
+
export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-CSNL62FQ.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as connectToHypha, S as SharingNotificationSync, K as parseJwtEmail } from './run-
|
|
1
|
+
import { c as connectToHypha, S as SharingNotificationSync, K as parseJwtEmail } from './run-CSNL62FQ.mjs';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import { existsSync, readFileSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "svamp-cli";
|
|
2
|
-
var version = "0.2.
|
|
2
|
+
var version = "0.2.331";
|
|
3
3
|
var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
|
|
4
4
|
var author = "Amun AI AB";
|
|
5
5
|
var license = "SEE LICENSE IN LICENSE";
|
|
@@ -19,7 +19,7 @@ var exports$1 = {
|
|
|
19
19
|
var scripts = {
|
|
20
20
|
build: "rm -rf dist bin/skills bin/commands && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && cp -r ../../skills/crew bin/skills/crew && cp -r ../../commands bin/commands && tsc --noEmit && pkgroll",
|
|
21
21
|
typecheck: "tsc --noEmit",
|
|
22
|
-
test: "node test/with-timeout.mjs 420 npx tsx test/test-context-window.mjs && node test/with-timeout.mjs 420 npx tsx test/test-ratelimit-retry.mjs && node test/with-timeout.mjs 420 npx tsx test/test-completed-requests.mjs && node test/with-timeout.mjs 420 npx tsx test/test-reconnect-health.mjs &&node test/with-timeout.mjs 420 npx tsx test/test-fleet-version-parse.mjs &&node test/with-timeout.mjs 420 npx tsx test/test-instance-config.mjs && node test/with-timeout.mjs 420 npx tsx test/test-authorize.mjs && node test/with-timeout.mjs 420 npx tsx test/test-normalize-allowed-user.mjs && node test/with-timeout.mjs 420 npx tsx test/test-share-url.mjs && node test/with-timeout.mjs 420 npx tsx test/test-update-sharing-normalization.mjs && node test/with-timeout.mjs 420 npx tsx test/test-sharing-notify-sync.mjs && node test/with-timeout.mjs 420 npx tsx test/test-sharing-notify-resolve.mjs && node test/with-timeout.mjs 420 npx tsx test/test-staged-homes-sweep.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-helpers.mjs && node test/with-timeout.mjs 420 npx tsx test/test-cli-routing.mjs && node test/with-timeout.mjs 420 npx tsx test/test-security-context.mjs && node test/with-timeout.mjs 420 npx tsx test/test-isolation-decision.mjs && node test/with-timeout.mjs 420 npx tsx test/test-message-helpers.mjs && node test/with-timeout.mjs 420 npx tsx test/test-stdin-delivery.mjs && node test/with-timeout.mjs 420 npx tsx test/test-agent-config.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wrap-command.mjs && node test/with-timeout.mjs 420 npx tsx test/test-credential-staging.mjs && node test/with-timeout.mjs 420 npx tsx test/test-claude-auth.mjs && node test/with-timeout.mjs 420 npx tsx test/test-backend-accounts.mjs && node test/with-timeout.mjs 420 npx tsx test/test-codex-force-model.mjs && node test/with-timeout.mjs 420 npx tsx test/test-backend-oauth.mjs && node test/with-timeout.mjs 420 npx tsx test/test-btw-proxy-env.mjs && node test/with-timeout.mjs 420 npx tsx test/test-output-formatters.mjs && node test/with-timeout.mjs 420 npx tsx test/test-inbox-guard.mjs && node test/with-timeout.mjs 420 npx tsx test/test-user-events.mjs && node test/with-timeout.mjs 420 npx tsx test/test-migrate-children.mjs && node test/with-timeout.mjs 420 npx tsx test/test-outpost-install.mjs && node test/with-timeout.mjs 420 npx tsx test/test-outpost-setup.mjs && node test/with-timeout.mjs 420 npx tsx test/test-outpost-pairing.mjs && node test/with-timeout.mjs 420 npx tsx test/test-outpost-coordinator.mjs && node test/with-timeout.mjs 420 npx tsx test/e2e-outpost-transport.mjs && node test/with-timeout.mjs 420 npx tsx test/test-inbox-reconcile.mjs && node test/with-timeout.mjs 420 npx tsx test/test-auto-topic.mjs && node test/with-timeout.mjs 420 npx tsx test/test-project-info.mjs && node test/with-timeout.mjs 420 npx tsx test/test-agent-types.mjs && node test/with-timeout.mjs 420 npx tsx test/test-transport.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-update-handlers.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-scanner.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hypha-client.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hook-settings.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-service-logic.mjs && node test/with-timeout.mjs 420 npx tsx test/test-daemon-persistence.mjs && node test/with-timeout.mjs 420 npx tsx test/test-detect-isolation.mjs && node test/with-timeout.mjs 420 npx tsx test/test-isolation-disable.mjs && node test/with-timeout.mjs 420 npx tsx test/test-machine-service-logic.mjs && node test/with-timeout.mjs 420 npx tsx test/test-machine-session-visibility.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-access-fallback.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-rpc-role-map.mjs && node test/with-timeout.mjs 420 npx tsx test/test-interactive-helpers.mjs && node test/with-timeout.mjs 420 npx tsx test/test-pinned-codex.mjs && node test/with-timeout.mjs 420 npx tsx test/test-codex-request-timeout.mjs && node test/with-timeout.mjs 420 npx tsx test/test-codex-app-server.mjs && node test/with-timeout.mjs 420 npx tsx test/test-kimi-provider.mjs && node test/with-timeout.mjs 420 npx tsx test/test-acp-backend.mjs && node test/with-timeout.mjs 420 npx tsx test/test-acp-bridge.mjs && node test/with-timeout.mjs 420 npx tsx test/test-listener-backoff.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-identity-env.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hook-server.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-commands.mjs && node test/with-timeout.mjs 420 npx tsx test/test-interactive-console.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-messages.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-send-query.mjs && node test/with-timeout.mjs 420 npx tsx test/test-skills.mjs && node test/with-timeout.mjs 420 npx tsx test/test-agent-grouping.mjs && node test/with-timeout.mjs 420 npx tsx test/test-machine-list-directory.mjs && node test/with-timeout.mjs 420 npx tsx test/test-service-commands.mjs && node test/with-timeout.mjs 420 npx tsx test/test-supervisor.mjs && node test/with-timeout.mjs 420 npx tsx test/test-supervisor-lock.mjs && node test/with-timeout.mjs 420 node test/test-supervisor-restart.mjs && node test/with-timeout.mjs 420 npx tsx test/test-clear-detection.mjs && node test/with-timeout.mjs 420 npx tsx test/test-compact-detect.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-consolidation.mjs && node test/with-timeout.mjs 420 npx tsx test/test-inbox-store.mjs && node test/with-timeout.mjs 420 npx tsx test/test-inbox.mjs && node test/with-timeout.mjs 420 npx tsx test/test-inbox-cross-machine.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-store.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-store-lock.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-close-gate.mjs && node test/with-timeout.mjs 420 npx tsx test/test-loop-verify.mjs && node test/with-timeout.mjs 420 npx tsx test/test-restore-decision.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-rpc.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-pause.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-store.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-rpc.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-scheduler.mjs && node test/with-timeout.mjs 420 npx tsx test/test-cron.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-runs.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-runs-lock.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-idle.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-reconcile.mjs && node test/with-timeout.mjs 420 npx tsx test/test-serve-link-subdomain.mjs && node test/with-timeout.mjs 420 npx tsx test/test-short-id.mjs && node test/with-timeout.mjs 420 npx tsx test/test-transcript-edit.mjs && node test/with-timeout.mjs 420 npx tsx test/test-edit-history.mjs && node test/with-timeout.mjs 420 npx tsx test/test-friendly-name.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-rpc-dispatch.mjs && node test/with-timeout.mjs 420 npx tsx test/test-sandbox-cli.mjs && node test/with-timeout.mjs 420 npx tsx test/test-serve-manager.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-files-gateway.mjs && node test/with-timeout.mjs 420 npx tsx test/test-serve-ws-upgrade.mjs && node test/with-timeout.mjs 420 npx tsx test/test-serve-auth.mjs && node test/with-timeout.mjs 420 npx tsx test/test-static-file-server.mjs && node test/with-timeout.mjs 420 npx tsx test/test-serve-stability.mjs && node test/with-timeout.mjs 420 npx tsx test/test-frpc-e2e.mjs --unit-only && node test/with-timeout.mjs 420 npx tsx test/test-frpc-status.mjs && node test/with-timeout.mjs 420 npx tsx test/test-frpc-orphan-reap.mjs && node test/with-timeout.mjs 420 node test/pinnedClaudeCode.test.mjs && node test/with-timeout.mjs 420 node test/fleet.test.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-file.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-rpc.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wise-agent.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-agent.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channels-service.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hotreload-seam.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hot-reload.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hot-reload-live.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-core.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-async-reply.mjs && node test/with-timeout.mjs 420 npx tsx test/test-outbox-reload.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-binding.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-store-lock.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-identity.mjs && node test/with-timeout.mjs 420 npx tsx test/test-stateless-dispatch-limiter.mjs && node test/with-timeout.mjs 420 npx tsx test/test-shared-session-identity.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wise-agent-auth.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-http.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-upload.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-file-access.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wise-voice.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wise-headless.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wise-machine.mjs && node test/with-timeout.mjs 420 npx tsx test/test-crew-merge.mjs && node test/with-timeout.mjs 420 npx tsx test/test-crew-verdict-routing.mjs && node test/with-timeout.mjs 420 npx tsx test/test-crew-standalone.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-links.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-loop-pause-guard.mjs && node test/with-timeout.mjs 420 npx tsx test/test-artifact-guard.mjs && node test/with-timeout.mjs 420 npx tsx test/test-artifact-sync-pagination.mjs && node test/with-timeout.mjs 420 npx tsx test/test-graceful-restart.mjs && node test/with-timeout.mjs 420 npx tsx test/test-flush-exit.mjs && node test/with-timeout.mjs 420 npx tsx test/test-codex-skills.mjs && node test/with-timeout.mjs 420 npx tsx test/test-nightly-0807-fixes.mjs && node test/with-timeout.mjs 420 npx tsx test/test-nightly-0814-fixes.mjs && node test/with-timeout.mjs 420 npx tsx test/test-log-prune.mjs && node test/with-timeout.mjs 420 node test/test-message-count-cache.mjs && node test/with-timeout.mjs 420 node test/test-serve-link-gate.mjs && node test/with-timeout.mjs 420 node test/test-security-context-unenforceable.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-id-resolution.mjs && node test/with-timeout.mjs 420 npx tsx test/test-help-flag-never-acts.mjs && node test/with-timeout.mjs 420 npx tsx test/test-with-timeout.mjs && node test/with-timeout.mjs 420 npx tsx test/test-message-queue-cap.mjs",
|
|
22
|
+
test: "node test/with-timeout.mjs 420 npx tsx test/test-context-window.mjs && node test/with-timeout.mjs 420 npx tsx test/test-ratelimit-retry.mjs && node test/with-timeout.mjs 420 npx tsx test/test-completed-requests.mjs && node test/with-timeout.mjs 420 npx tsx test/test-reconnect-health.mjs &&node test/with-timeout.mjs 420 npx tsx test/test-fleet-version-parse.mjs &&node test/with-timeout.mjs 420 npx tsx test/test-instance-config.mjs && node test/with-timeout.mjs 420 npx tsx test/test-authorize.mjs && node test/with-timeout.mjs 420 npx tsx test/test-normalize-allowed-user.mjs && node test/with-timeout.mjs 420 npx tsx test/test-share-url.mjs && node test/with-timeout.mjs 420 npx tsx test/test-update-sharing-normalization.mjs && node test/with-timeout.mjs 420 npx tsx test/test-sharing-notify-sync.mjs && node test/with-timeout.mjs 420 npx tsx test/test-sharing-notify-resolve.mjs && node test/with-timeout.mjs 420 npx tsx test/test-staged-homes-sweep.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-helpers.mjs && node test/with-timeout.mjs 420 npx tsx test/test-cli-routing.mjs && node test/with-timeout.mjs 420 npx tsx test/test-security-context.mjs && node test/with-timeout.mjs 420 npx tsx test/test-isolation-decision.mjs && node test/with-timeout.mjs 420 npx tsx test/test-message-helpers.mjs && node test/with-timeout.mjs 420 npx tsx test/test-stdin-delivery.mjs && node test/with-timeout.mjs 420 npx tsx test/test-agent-config.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wrap-command.mjs && node test/with-timeout.mjs 420 npx tsx test/test-credential-staging.mjs && node test/with-timeout.mjs 420 npx tsx test/test-claude-auth.mjs && node test/with-timeout.mjs 420 npx tsx test/test-backend-accounts.mjs && node test/with-timeout.mjs 420 npx tsx test/test-codex-force-model.mjs && node test/with-timeout.mjs 420 npx tsx test/test-backend-oauth.mjs && node test/with-timeout.mjs 420 npx tsx test/test-btw-proxy-env.mjs && node test/with-timeout.mjs 420 npx tsx test/test-output-formatters.mjs && node test/with-timeout.mjs 420 npx tsx test/test-inbox-guard.mjs && node test/with-timeout.mjs 420 npx tsx test/test-user-events.mjs && node test/with-timeout.mjs 420 npx tsx test/test-migrate-children.mjs && node test/with-timeout.mjs 420 npx tsx test/test-outpost-install.mjs && node test/with-timeout.mjs 420 npx tsx test/test-outpost-setup.mjs && node test/with-timeout.mjs 420 npx tsx test/test-outpost-pairing.mjs && node test/with-timeout.mjs 420 npx tsx test/test-outpost-coordinator.mjs && node test/with-timeout.mjs 420 npx tsx test/e2e-outpost-transport.mjs && node test/with-timeout.mjs 420 npx tsx test/test-inbox-reconcile.mjs && node test/with-timeout.mjs 420 npx tsx test/test-auto-topic.mjs && node test/with-timeout.mjs 420 npx tsx test/test-project-info.mjs && node test/with-timeout.mjs 420 npx tsx test/test-agent-types.mjs && node test/with-timeout.mjs 420 npx tsx test/test-transport.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-update-handlers.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-scanner.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hypha-client.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hook-settings.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-service-logic.mjs && node test/with-timeout.mjs 420 npx tsx test/test-daemon-persistence.mjs && node test/with-timeout.mjs 420 npx tsx test/test-detect-isolation.mjs && node test/with-timeout.mjs 420 npx tsx test/test-isolation-disable.mjs && node test/with-timeout.mjs 420 npx tsx test/test-machine-service-logic.mjs && node test/with-timeout.mjs 420 npx tsx test/test-machine-session-visibility.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-access-fallback.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-rpc-role-map.mjs && node test/with-timeout.mjs 420 npx tsx test/test-interactive-helpers.mjs && node test/with-timeout.mjs 420 npx tsx test/test-pinned-codex.mjs && node test/with-timeout.mjs 420 npx tsx test/test-codex-request-timeout.mjs && node test/with-timeout.mjs 420 npx tsx test/test-codex-app-server.mjs && node test/with-timeout.mjs 420 npx tsx test/test-kimi-provider.mjs && node test/with-timeout.mjs 420 npx tsx test/test-acp-backend.mjs && node test/with-timeout.mjs 420 npx tsx test/test-acp-bridge.mjs && node test/with-timeout.mjs 420 npx tsx test/test-listener-backoff.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-identity-env.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hook-server.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-commands.mjs && node test/with-timeout.mjs 420 npx tsx test/test-interactive-console.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-messages.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-send-query.mjs && node test/with-timeout.mjs 420 npx tsx test/test-skills.mjs && node test/with-timeout.mjs 420 npx tsx test/test-agent-grouping.mjs && node test/with-timeout.mjs 420 npx tsx test/test-machine-list-directory.mjs && node test/with-timeout.mjs 420 npx tsx test/test-service-commands.mjs && node test/with-timeout.mjs 420 npx tsx test/test-supervisor.mjs && node test/with-timeout.mjs 420 npx tsx test/test-supervisor-lock.mjs && node test/with-timeout.mjs 420 node test/test-supervisor-restart.mjs && node test/with-timeout.mjs 420 npx tsx test/test-clear-detection.mjs && node test/with-timeout.mjs 420 npx tsx test/test-compact-detect.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-consolidation.mjs && node test/with-timeout.mjs 420 npx tsx test/test-inbox-store.mjs && node test/with-timeout.mjs 420 npx tsx test/test-inbox.mjs && node test/with-timeout.mjs 420 npx tsx test/test-inbox-cross-machine.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-store.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-store-lock.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-close-gate.mjs && node test/with-timeout.mjs 420 npx tsx test/test-loop-verify.mjs && node test/with-timeout.mjs 420 npx tsx test/test-restore-decision.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-rpc.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-pause.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-store.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-rpc.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-scheduler.mjs && node test/with-timeout.mjs 420 npx tsx test/test-cron.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-runs.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-runs-lock.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-idle.mjs && node test/with-timeout.mjs 420 npx tsx test/test-workflow-reconcile.mjs && node test/with-timeout.mjs 420 npx tsx test/test-serve-link-subdomain.mjs && node test/with-timeout.mjs 420 npx tsx test/test-short-id.mjs && node test/with-timeout.mjs 420 npx tsx test/test-transcript-edit.mjs && node test/with-timeout.mjs 420 npx tsx test/test-edit-history.mjs && node test/with-timeout.mjs 420 npx tsx test/test-friendly-name.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-rpc-dispatch.mjs && node test/with-timeout.mjs 420 npx tsx test/test-sandbox-cli.mjs && node test/with-timeout.mjs 420 npx tsx test/test-serve-manager.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-files-gateway.mjs && node test/with-timeout.mjs 420 npx tsx test/test-serve-ws-upgrade.mjs && node test/with-timeout.mjs 420 npx tsx test/test-serve-auth.mjs && node test/with-timeout.mjs 420 npx tsx test/test-static-file-server.mjs && node test/with-timeout.mjs 420 npx tsx test/test-serve-stability.mjs && node test/with-timeout.mjs 420 npx tsx test/test-frpc-e2e.mjs --unit-only && node test/with-timeout.mjs 420 npx tsx test/test-frpc-status.mjs && node test/with-timeout.mjs 420 npx tsx test/test-frpc-orphan-reap.mjs && node test/with-timeout.mjs 420 node test/pinnedClaudeCode.test.mjs && node test/with-timeout.mjs 420 node test/fleet.test.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-file.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-rpc.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wise-agent.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-agent.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channels-service.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hotreload-seam.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hot-reload.mjs && node test/with-timeout.mjs 420 npx tsx test/test-hot-reload-live.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-core.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-async-reply.mjs && node test/with-timeout.mjs 420 npx tsx test/test-outbox-reload.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-binding.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-store-lock.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-identity.mjs && node test/with-timeout.mjs 420 npx tsx test/test-stateless-dispatch-limiter.mjs && node test/with-timeout.mjs 420 npx tsx test/test-shared-session-identity.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wise-agent-auth.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-http.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-upload.mjs && node test/with-timeout.mjs 420 npx tsx test/test-channel-file-access.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wise-voice.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wise-headless.mjs && node test/with-timeout.mjs 420 npx tsx test/test-wise-machine.mjs && node test/with-timeout.mjs 420 npx tsx test/test-crew-merge.mjs && node test/with-timeout.mjs 420 npx tsx test/test-crew-verdict-routing.mjs && node test/with-timeout.mjs 420 npx tsx test/test-crew-standalone.mjs && node test/with-timeout.mjs 420 npx tsx test/test-session-links.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-loop-pause-guard.mjs && node test/with-timeout.mjs 420 npx tsx test/test-artifact-guard.mjs && node test/with-timeout.mjs 420 npx tsx test/test-artifact-sync-pagination.mjs && node test/with-timeout.mjs 420 npx tsx test/test-graceful-restart.mjs && node test/with-timeout.mjs 420 npx tsx test/test-flush-exit.mjs && node test/with-timeout.mjs 420 npx tsx test/test-codex-skills.mjs && node test/with-timeout.mjs 420 npx tsx test/test-nightly-0807-fixes.mjs && node test/with-timeout.mjs 420 npx tsx test/test-nightly-0814-fixes.mjs && node test/with-timeout.mjs 420 npx tsx test/test-log-prune.mjs && node test/with-timeout.mjs 420 node test/test-message-count-cache.mjs && node test/with-timeout.mjs 420 node test/test-serve-link-gate.mjs && node test/with-timeout.mjs 420 node test/test-security-context-unenforceable.mjs && node test/with-timeout.mjs 420 npx tsx test/test-issue-id-resolution.mjs && node test/with-timeout.mjs 420 npx tsx test/test-help-flag-never-acts.mjs && node test/with-timeout.mjs 420 npx tsx test/test-with-timeout.mjs && node test/with-timeout.mjs 420 npx tsx test/test-message-queue-cap.mjs && node test/with-timeout.mjs 420 npx tsx test/test-compaction-backstop.mjs",
|
|
23
23
|
"test:hypha": "node --no-warnings test/test-hypha-service.mjs",
|
|
24
24
|
dev: "tsx src/cli.ts",
|
|
25
25
|
"dev:daemon": "tsx src/cli.ts daemon start-sync",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as resolveProjectRoot, u as updateIssue, h as getIssue, i as resumeIssue, p as pauseIssue, j as addComment, k as addIssue, l as listIssues, m as isPendingIssue, n as searchIssues, o as isVisibleTo } from './run-
|
|
1
|
+
import { f as resolveProjectRoot, u as updateIssue, h as getIssue, i as resumeIssue, p as pauseIssue, j as addComment, k as addIssue, l as listIssues, m as isPendingIssue, n as searchIssues, o as isVisibleTo } from './run-CSNL62FQ.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as resolveProjectRoot, q as getRun, t as listRuns, v as getWorkflow, w as runWorkflow, x as setWorkflowEnabled, y as removeWorkflow, z as validateCronExpr, A as validateWorkflowName, B as saveWorkflow, C as rawWorkflow, D as listWorkflows } from './run-
|
|
1
|
+
import { f as resolveProjectRoot, q as getRun, t as listRuns, v as getWorkflow, w as runWorkflow, x as setWorkflowEnabled, y as removeWorkflow, z as validateCronExpr, A as validateWorkflowName, B as saveWorkflow, C as rawWorkflow, D as listWorkflows } from './run-CSNL62FQ.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -8332,7 +8332,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
8332
8332
|
}
|
|
8333
8333
|
const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
|
|
8334
8334
|
const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
|
|
8335
|
-
const { toolsForRole } = await import('./sideband-
|
|
8335
|
+
const { toolsForRole } = await import('./sideband-S3ycJa01.mjs');
|
|
8336
8336
|
const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
|
|
8337
8337
|
return fmt(r2);
|
|
8338
8338
|
}
|
|
@@ -8437,7 +8437,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
8437
8437
|
return { ok: false, call_id: callId, status: "busy", error: "channel is busy (too many concurrent requests) \u2014 retry shortly" };
|
|
8438
8438
|
}
|
|
8439
8439
|
const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
|
|
8440
|
-
const { queryCore } = await import('./commands-
|
|
8440
|
+
const { queryCore } = await import('./commands-CWkWkrZF.mjs');
|
|
8441
8441
|
const timeout = c.reply?.timeout_sec || 120;
|
|
8442
8442
|
let result;
|
|
8443
8443
|
let thrownSessionId;
|
|
@@ -18220,6 +18220,49 @@ function resolveContextWindow(opts) {
|
|
|
18220
18220
|
return candidate;
|
|
18221
18221
|
}
|
|
18222
18222
|
|
|
18223
|
+
const DEFAULT_AUTO_COMPACT_RATIO = 0.85;
|
|
18224
|
+
const MIN_WINDOW_FOR_BACKSTOP = 5e4;
|
|
18225
|
+
const MIN_RATIO = 0.5;
|
|
18226
|
+
const MAX_RATIO = 0.97;
|
|
18227
|
+
function resolveAutoCompactEnabled(env = process.env) {
|
|
18228
|
+
const v = (env.SVAMP_AUTO_COMPACT ?? "").trim().toLowerCase();
|
|
18229
|
+
if (v === "0" || v === "false" || v === "off" || v === "no") return false;
|
|
18230
|
+
return true;
|
|
18231
|
+
}
|
|
18232
|
+
function resolveAutoCompactRatio(env = process.env) {
|
|
18233
|
+
const raw = (env.SVAMP_AUTO_COMPACT_RATIO ?? "").trim();
|
|
18234
|
+
if (!raw) return DEFAULT_AUTO_COMPACT_RATIO;
|
|
18235
|
+
const n = Number(raw);
|
|
18236
|
+
if (!Number.isFinite(n)) return DEFAULT_AUTO_COMPACT_RATIO;
|
|
18237
|
+
if (n < MIN_RATIO) return MIN_RATIO;
|
|
18238
|
+
if (n > MAX_RATIO) return MAX_RATIO;
|
|
18239
|
+
return n;
|
|
18240
|
+
}
|
|
18241
|
+
function decideProactiveCompaction(opts) {
|
|
18242
|
+
const { observed, window, ratio, enabled } = opts;
|
|
18243
|
+
const pct = window > 0 ? observed / window : 0;
|
|
18244
|
+
if (!enabled) return { shouldCompact: false, window, pct, reason: "disabled" };
|
|
18245
|
+
if (!(window >= MIN_WINDOW_FOR_BACKSTOP)) return { shouldCompact: false, window, pct, reason: "window-too-small" };
|
|
18246
|
+
if (!(observed > 0)) return { shouldCompact: false, window, pct, reason: "no-observed" };
|
|
18247
|
+
if (pct >= ratio) return { shouldCompact: true, window, pct, reason: "threshold" };
|
|
18248
|
+
return { shouldCompact: false, window, pct, reason: "below-threshold" };
|
|
18249
|
+
}
|
|
18250
|
+
function fmtK(n) {
|
|
18251
|
+
return `${Math.round((n || 0) / 1e3)}K`;
|
|
18252
|
+
}
|
|
18253
|
+
function describeAutoCompact(observed, window, pct) {
|
|
18254
|
+
return `Context at ${Math.round(pct * 100)}% of the ${fmtK(window)} window (${fmtK(observed)} tokens) \u2014 compacting automatically to stay under the model's limit.`;
|
|
18255
|
+
}
|
|
18256
|
+
function isContextTooLongError(text) {
|
|
18257
|
+
if (!text) return false;
|
|
18258
|
+
const t = text.toLowerCase();
|
|
18259
|
+
if (t.includes("prompt is too long")) return true;
|
|
18260
|
+
if (/tokens\s*>\s*[\d,]+\s*maximum/.test(t)) return true;
|
|
18261
|
+
if (t.includes("input length and") && t.includes("max_tokens") && t.includes("context")) return true;
|
|
18262
|
+
if (t.includes("context") && t.includes("exceed") && t.includes("limit") && !t.includes("subscription")) return true;
|
|
18263
|
+
return false;
|
|
18264
|
+
}
|
|
18265
|
+
|
|
18223
18266
|
function fmtTokens(n) {
|
|
18224
18267
|
return Math.max(0, Math.round(n)).toLocaleString("en-US");
|
|
18225
18268
|
}
|
|
@@ -18228,6 +18271,14 @@ function isCompactCommand(text) {
|
|
|
18228
18271
|
const t = text.trim();
|
|
18229
18272
|
return t === "/compact" || t.startsWith("/compact ") || t.startsWith("/compact\n") || t.startsWith("/compact ");
|
|
18230
18273
|
}
|
|
18274
|
+
const COMPACT_CONTINUATION_SENTINEL = "This session is being continued from a previous conversation that ran out of context.";
|
|
18275
|
+
function isCompactionArtifactText(text) {
|
|
18276
|
+
if (!text) return false;
|
|
18277
|
+
const t = text.trimStart();
|
|
18278
|
+
if (t.startsWith(COMPACT_CONTINUATION_SENTINEL)) return true;
|
|
18279
|
+
if (t.trimEnd().startsWith("<local-command-stdout>")) return true;
|
|
18280
|
+
return false;
|
|
18281
|
+
}
|
|
18231
18282
|
function describeCompaction(meta) {
|
|
18232
18283
|
const trigger = meta?.trigger === "auto" ? "auto" : "manual";
|
|
18233
18284
|
const pre = typeof meta?.pre_tokens === "number" ? meta.pre_tokens : void 0;
|
|
@@ -18739,6 +18790,9 @@ function dedupeLines(lines) {
|
|
|
18739
18790
|
function buildClaudeErrorHint(text, apiErrorStatus) {
|
|
18740
18791
|
const lower = (text || "").toLowerCase();
|
|
18741
18792
|
const isOverload = apiErrorStatus === 529 || lower.includes("529") || lower.includes("overload");
|
|
18793
|
+
if (isContextTooLongError(text)) {
|
|
18794
|
+
return "\n\nThe conversation exceeded the model's context window (the prompt is too long). The daemon is compacting the history automatically to recover \u2014 resend your message. If it keeps overflowing, start a fresh session, or raise the auto-compaction headroom with a lower `SVAMP_AUTO_COMPACT_RATIO` (e.g. 0.75) on the machine running the daemon.";
|
|
18795
|
+
}
|
|
18742
18796
|
const isResumeIssue = lower.includes("tool_use.name") || lower.includes("invalid_request") || lower.includes("messages.");
|
|
18743
18797
|
const isBillingIssue = lower.includes("credit") || lower.includes("balance") || lower.includes("billing") || lower.includes("quota") || lower.includes("subscription") || lower.includes("payment") || lower.includes("1m-context") || lower.includes("1m context");
|
|
18744
18798
|
const isLoginIssue = lower.includes("login") || lower.includes("logged in") || lower.includes("auth") || lower.includes("api key") || lower.includes("unauthorized");
|
|
@@ -20329,7 +20383,7 @@ async function startDaemon(options) {
|
|
|
20329
20383
|
try {
|
|
20330
20384
|
const dir = loadSessionIndex()[sessionId]?.directory;
|
|
20331
20385
|
if (!dir) return;
|
|
20332
|
-
const { reconcileServiceLinks } = await import('./agentCommands-
|
|
20386
|
+
const { reconcileServiceLinks } = await import('./agentCommands-CovUtOYv.mjs');
|
|
20333
20387
|
const configPath = getSvampConfigPath(dir, sessionId);
|
|
20334
20388
|
const config = readSvampConfig(configPath);
|
|
20335
20389
|
const entries = Array.from(urls.entries());
|
|
@@ -20351,7 +20405,7 @@ async function startDaemon(options) {
|
|
|
20351
20405
|
try {
|
|
20352
20406
|
const dir = loadSessionIndex()[sessionId]?.directory;
|
|
20353
20407
|
if (!dir) return;
|
|
20354
|
-
const { reconcileServiceLinks } = await import('./agentCommands-
|
|
20408
|
+
const { reconcileServiceLinks } = await import('./agentCommands-CovUtOYv.mjs');
|
|
20355
20409
|
const configPath = getSvampConfigPath(dir, sessionId);
|
|
20356
20410
|
const config = readSvampConfig(configPath);
|
|
20357
20411
|
const incoming = [{
|
|
@@ -20372,7 +20426,7 @@ async function startDaemon(options) {
|
|
|
20372
20426
|
try {
|
|
20373
20427
|
const dir = loadSessionIndex()[sessionId]?.directory;
|
|
20374
20428
|
if (!dir) return;
|
|
20375
|
-
const { dropServiceLinks } = await import('./agentCommands-
|
|
20429
|
+
const { dropServiceLinks } = await import('./agentCommands-CovUtOYv.mjs');
|
|
20376
20430
|
const configPath = getSvampConfigPath(dir, sessionId);
|
|
20377
20431
|
const config = readSvampConfig(configPath);
|
|
20378
20432
|
if (dropServiceLinks(config, "serve", mountName)) {
|
|
@@ -21343,6 +21397,11 @@ ${parts.join("\n")}`);
|
|
|
21343
21397
|
let consecutiveOverloadRetries = 0;
|
|
21344
21398
|
let overloadBailedThisTurn = false;
|
|
21345
21399
|
let pendingCompactTurn = false;
|
|
21400
|
+
const autoCompactEnabled = resolveAutoCompactEnabled();
|
|
21401
|
+
const autoCompactRatio = resolveAutoCompactRatio();
|
|
21402
|
+
let autoCompactWasAutoInjected = false;
|
|
21403
|
+
let autoCompactDisabled = false;
|
|
21404
|
+
let autoCompactRecoveryTried = false;
|
|
21346
21405
|
let noIsolationWarned = false;
|
|
21347
21406
|
const RATELIMIT_CFG = getRateLimitRetryConfig();
|
|
21348
21407
|
let currentTurnMessage;
|
|
@@ -21706,6 +21765,23 @@ ${parts.join("\n")}`);
|
|
|
21706
21765
|
} else if (isRetryableRateLimit(resultText, msg.api_error_status) && scheduleRateLimitRetry2()) {
|
|
21707
21766
|
rateLimitRetryScheduled = true;
|
|
21708
21767
|
lastErrorMessagePushed = true;
|
|
21768
|
+
} else if (isContextTooLongError(resultText) && autoCompactEnabled && !autoCompactDisabled && !autoCompactRecoveryTried) {
|
|
21769
|
+
autoCompactRecoveryTried = true;
|
|
21770
|
+
logger.log(`[Session ${sessionId}] Context-overflow 400 \u2014 injecting one automatic /compact recovery`);
|
|
21771
|
+
sessionService.pushMessage(
|
|
21772
|
+
{ type: "message", message: "The conversation exceeded the model's context window. Compacting automatically to recover \u2014 resend your message once it finishes. If this repeats, start a fresh session.", level: "warning" },
|
|
21773
|
+
"event"
|
|
21774
|
+
);
|
|
21775
|
+
const existingQueue = sessionMetadata.messageQueue || [];
|
|
21776
|
+
sessionMetadata = {
|
|
21777
|
+
...sessionMetadata,
|
|
21778
|
+
messageQueue: [
|
|
21779
|
+
{ id: randomUUID(), text: "/compact", displayText: "\u{1F5DC}\uFE0F Auto-compacting to recover from context overflow", createdAt: Date.now(), alreadyStored: true, autoCompact: true },
|
|
21780
|
+
...existingQueue
|
|
21781
|
+
]
|
|
21782
|
+
};
|
|
21783
|
+
sessionService.updateMetadata(sessionMetadata);
|
|
21784
|
+
lastErrorMessagePushed = true;
|
|
21709
21785
|
} else {
|
|
21710
21786
|
const lower = resultText.toLowerCase();
|
|
21711
21787
|
const isLoginIssue = lower.includes("login") || lower.includes("logged in") || lower.includes("auth") || lower.includes("api key") || lower.includes("unauthorized");
|
|
@@ -21769,13 +21845,22 @@ ${parts.join("\n")}`);
|
|
|
21769
21845
|
}
|
|
21770
21846
|
if (pendingCompactTurn) {
|
|
21771
21847
|
pendingCompactTurn = false;
|
|
21848
|
+
const wasAuto = autoCompactWasAutoInjected;
|
|
21849
|
+
autoCompactWasAutoInjected = false;
|
|
21850
|
+
if (wasAuto) {
|
|
21851
|
+
autoCompactDisabled = true;
|
|
21852
|
+
logger.log(`[Session ${sessionId}] Auto /compact unsupported by this Claude Code \u2014 disabling the auto-compaction backstop for this session`);
|
|
21853
|
+
}
|
|
21772
21854
|
logger.log(`[Session ${sessionId}] /compact produced no compaction boundary \u2014 Claude Code likely too old to handle it in stream-json mode`);
|
|
21773
21855
|
sessionService.pushMessage(
|
|
21774
21856
|
{ type: "message", message: compactUnsupportedWarning(), level: "warning" },
|
|
21775
21857
|
"event"
|
|
21776
21858
|
);
|
|
21777
21859
|
}
|
|
21778
|
-
if (!msg.is_error)
|
|
21860
|
+
if (!msg.is_error) {
|
|
21861
|
+
resetRateLimitStreak();
|
|
21862
|
+
autoCompactRecoveryTried = false;
|
|
21863
|
+
}
|
|
21779
21864
|
if (msg.session_id) {
|
|
21780
21865
|
claudeResumeId = msg.session_id;
|
|
21781
21866
|
if (sessionMetadata.claudeSessionId !== msg.session_id) {
|
|
@@ -21861,6 +21946,35 @@ ${parts.join("\n")}`);
|
|
|
21861
21946
|
logger.log(`[Session ${sessionId}] ${taskInfo}`);
|
|
21862
21947
|
sessionService.pushMessage({ type: "session_event", message: taskInfo }, "session");
|
|
21863
21948
|
}
|
|
21949
|
+
if (!msg.is_error && !pendingCompactTurn && !autoCompactDisabled && autoCompactEnabled) {
|
|
21950
|
+
try {
|
|
21951
|
+
const observed = computeObservedContext(msg.usage);
|
|
21952
|
+
const decision = decideProactiveCompaction({
|
|
21953
|
+
observed,
|
|
21954
|
+
window: resolvedWindow > 0 ? resolvedWindow : sessionMetadata.contextWindow || 0,
|
|
21955
|
+
ratio: autoCompactRatio,
|
|
21956
|
+
enabled: autoCompactEnabled
|
|
21957
|
+
});
|
|
21958
|
+
if (decision.shouldCompact) {
|
|
21959
|
+
logger.log(`[Session ${sessionId}] Auto-compaction backstop firing at ${Math.round(decision.pct * 100)}% of ${decision.window} window (${observed} tokens) \u2014 injecting /compact`);
|
|
21960
|
+
sessionService.pushMessage(
|
|
21961
|
+
{ type: "message", message: describeAutoCompact(observed, decision.window, decision.pct), level: "warning" },
|
|
21962
|
+
"event"
|
|
21963
|
+
);
|
|
21964
|
+
const existingQueue = sessionMetadata.messageQueue || [];
|
|
21965
|
+
sessionMetadata = {
|
|
21966
|
+
...sessionMetadata,
|
|
21967
|
+
messageQueue: [
|
|
21968
|
+
{ id: randomUUID(), text: "/compact", displayText: "\u{1F5DC}\uFE0F Auto-compacting context", createdAt: Date.now(), alreadyStored: true, autoCompact: true },
|
|
21969
|
+
...existingQueue
|
|
21970
|
+
]
|
|
21971
|
+
};
|
|
21972
|
+
sessionService.updateMetadata(sessionMetadata);
|
|
21973
|
+
}
|
|
21974
|
+
} catch (e) {
|
|
21975
|
+
logger.log(`[Session ${sessionId}] Auto-compaction backstop check failed: ${e?.message}`);
|
|
21976
|
+
}
|
|
21977
|
+
}
|
|
21864
21978
|
const queueLen = sessionMetadata.messageQueue?.length ?? 0;
|
|
21865
21979
|
if (queueLen > 0 && claudeResumeId && !trackedSession.stopped) {
|
|
21866
21980
|
setTimeout(() => processMessageQueueRef?.(), 200);
|
|
@@ -21947,6 +22061,8 @@ ${parts.join("\n")}`);
|
|
|
21947
22061
|
sessionService.pushMessage(msg, "session");
|
|
21948
22062
|
} else if (msg.type === "system" && msg.subtype === "compact_boundary") {
|
|
21949
22063
|
pendingCompactTurn = false;
|
|
22064
|
+
autoCompactWasAutoInjected = false;
|
|
22065
|
+
autoCompactRecoveryTried = false;
|
|
21950
22066
|
const compactLine = describeCompaction(msg.compact_metadata);
|
|
21951
22067
|
logger.log(`[Session ${sessionId}] ${compactLine}`);
|
|
21952
22068
|
sessionService.pushMessage(
|
|
@@ -21974,6 +22090,10 @@ ${parts.join("\n")}`);
|
|
|
21974
22090
|
consecutiveOverloadRetries = 0;
|
|
21975
22091
|
}
|
|
21976
22092
|
sessionService.pushMessage(msg, "agent");
|
|
22093
|
+
} else if (msg.type === "user" && typeof msg.message?.content === "string" && isCompactionArtifactText(msg.message.content)) {
|
|
22094
|
+
logger.log(
|
|
22095
|
+
`[Session ${sessionId}] Suppressed /compact synthetic user artifact (not stored)`
|
|
22096
|
+
);
|
|
21977
22097
|
} else {
|
|
21978
22098
|
sessionService.pushMessage(msg, "agent");
|
|
21979
22099
|
}
|
|
@@ -22759,11 +22879,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
22759
22879
|
});
|
|
22760
22880
|
},
|
|
22761
22881
|
onIssue: async (params) => {
|
|
22762
|
-
const { issueRpc } = await import('./rpc-
|
|
22882
|
+
const { issueRpc } = await import('./rpc-CVBhR9Cj.mjs');
|
|
22763
22883
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
22764
22884
|
},
|
|
22765
22885
|
onWorkflow: async (params) => {
|
|
22766
|
-
const { workflowRpc } = await import('./rpc-
|
|
22886
|
+
const { workflowRpc } = await import('./rpc-OmhzsDGP.mjs');
|
|
22767
22887
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
22768
22888
|
},
|
|
22769
22889
|
onRipgrep: async (args, cwd) => {
|
|
@@ -22902,6 +23022,8 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
22902
23022
|
userMessagePending = true;
|
|
22903
23023
|
turnInitiatedByUser = true;
|
|
22904
23024
|
currentTurnMessage = next.text;
|
|
23025
|
+
pendingCompactTurn = isCompactCommand(next.text);
|
|
23026
|
+
autoCompactWasAutoInjected = pendingCompactTurn && !!next.autoCompact;
|
|
22905
23027
|
resetRateLimitStreak();
|
|
22906
23028
|
if (rateLimitRetryTimer) {
|
|
22907
23029
|
clearTimeout(rateLimitRetryTimer);
|
|
@@ -23469,11 +23591,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
23469
23591
|
});
|
|
23470
23592
|
},
|
|
23471
23593
|
onIssue: async (params) => {
|
|
23472
|
-
const { issueRpc } = await import('./rpc-
|
|
23594
|
+
const { issueRpc } = await import('./rpc-CVBhR9Cj.mjs');
|
|
23473
23595
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
23474
23596
|
},
|
|
23475
23597
|
onWorkflow: async (params) => {
|
|
23476
|
-
const { workflowRpc } = await import('./rpc-
|
|
23598
|
+
const { workflowRpc } = await import('./rpc-OmhzsDGP.mjs');
|
|
23477
23599
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
23478
23600
|
},
|
|
23479
23601
|
onRipgrep: async (args, cwd) => {
|
|
@@ -24826,7 +24948,7 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
|
|
|
24826
24948
|
const PING_TIMEOUT_MS = 15e3;
|
|
24827
24949
|
const POST_RECONNECT_GRACE_MS = 2e4;
|
|
24828
24950
|
const RECONNECT_JITTER_MS = 2500;
|
|
24829
|
-
const { WorkflowScheduler } = await import('./scheduler-
|
|
24951
|
+
const { WorkflowScheduler } = await import('./scheduler-DDw3YLzH.mjs');
|
|
24830
24952
|
const workflowProjectRoots = () => {
|
|
24831
24953
|
const dirs = /* @__PURE__ */ new Set();
|
|
24832
24954
|
for (const s of pidToTrackedSession.values()) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { ak as applyClaudeProxyEnv, al as composeSessionId, am as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, an as generateHookSettings } from './run-
|
|
1
|
+
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { ak as applyClaudeProxyEnv, al as composeSessionId, am as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, an as generateHookSettings } from './run-CSNL62FQ.mjs';
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import { resolve, join } from 'node:path';
|
|
4
4
|
import { existsSync, readFileSync, watch } from 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as resolveProjectRoot, D as listWorkflows, E as isWorkflowEnabled, F as workflowSchedules, G as inZone, w as runWorkflow, H as cronMatches } from './run-
|
|
1
|
+
import { f as resolveProjectRoot, D as listWorkflows, E as isWorkflowEnabled, F as workflowSchedules, G as inZone, w as runWorkflow, H as cronMatches } from './run-CSNL62FQ.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|