@wrongstack/core 0.256.1 → 0.257.2
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/coordination/index.js +6 -5
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +2 -2
- package/dist/defaults/index.js +155 -31
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +1 -1
- package/dist/execution/index.js +133 -29
- package/dist/execution/index.js.map +1 -1
- package/dist/{goal-preamble-UiEkbNmW.d.ts → goal-preamble-CznHTZqP.d.ts} +2 -0
- package/dist/index.d.ts +10 -4
- package/dist/index.js +263 -48
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.js +9 -8
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/models/index.js +9 -8
- package/dist/models/index.js.map +1 -1
- package/dist/sdd/index.js +7 -2
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-vault-BkYkJWQs.d.ts → secret-vault-gxtFZYBt.d.ts} +7 -0
- package/dist/security/index.d.ts +1 -1
- package/dist/security/index.js +23 -9
- package/dist/security/index.js.map +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/storage/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +137 -36
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +99 -1
- package/dist/utils/index.js +101 -9
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -24,6 +24,8 @@ interface SkillLoaderOptions {
|
|
|
24
24
|
declare class DefaultSkillLoader implements SkillLoader {
|
|
25
25
|
private readonly dirs;
|
|
26
26
|
private cache?;
|
|
27
|
+
private entriesCache?;
|
|
28
|
+
private readonly bodyCache;
|
|
27
29
|
constructor(opts: SkillLoaderOptions);
|
|
28
30
|
list(): Promise<SkillManifest[]>;
|
|
29
31
|
find(name: string): Promise<SkillManifest | undefined>;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as
|
|
|
16
16
|
import { A as AttachmentStore, b as AttachmentRef, a as AddAttachmentInput } from './session-reader-CqRvaL5v.js';
|
|
17
17
|
export { c as Attachment, d as AttachmentKind, e as AttachmentMeta, D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from './session-reader-CqRvaL5v.js';
|
|
18
18
|
export { D as DEFAULT_AUTONOMY_CONFIG, a as DEFAULT_CONTEXT_CONFIG, b as DEFAULT_SESSION_LOGGING_CONFIG, c as DEFAULT_SESSION_PRUNE_DAYS, d as DEFAULT_TOOLS_CONFIG } from './default-config-CXsDvOmP.js';
|
|
19
|
-
import { a as DefaultSecretVault } from './secret-vault-
|
|
20
|
-
export { D as DefaultSecretScrubber, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, i as isSecretField, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-vault-
|
|
19
|
+
import { a as DefaultSecretVault } from './secret-vault-gxtFZYBt.js';
|
|
20
|
+
export { D as DefaultSecretScrubber, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, i as isSecretField, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-vault-gxtFZYBt.js';
|
|
21
21
|
import { D as DefaultLogger } from './logger-DmmQhf4P.js';
|
|
22
22
|
export { a as DefaultLoggerOptions, L as LogFormat, n as noOpLogger } from './logger-DmmQhf4P.js';
|
|
23
23
|
import { D as DefaultPathResolver } from './path-resolver-CbkT-RMU.js';
|
|
@@ -41,7 +41,7 @@ import { e as ToolRegistry, S as SystemPromptContributor, E as ExtensionRegistry
|
|
|
41
41
|
export { i as AfterIterationHook, j as AfterRunHook, k as AfterToolExecutionHook, l as AgentExtension, g as AgentInit, h as AgentInput, B as BeforeIterationHook, m as BeforeRunHook, n as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, H as HookRunEnv, o as HookRunner, p as HookRunnerOptions, O as OnErrorHook, q as PreToolUseResult, r as PromptResult, s as ProviderFactory, t as ProviderRunnerWrapper, R as RunResult, d as ToolWrapper, U as UserInputPayload, u as createDefaultPipelines } from './index-CitPrI3a.js';
|
|
42
42
|
export { AutonomyStage, DistributiveOmit, DistributivePick } from './types/index.js';
|
|
43
43
|
import { estimateMessageTokens } from './utils/index.js';
|
|
44
|
-
export { AtomicWriteOptions, BuildChildEnvOptions, CompileFail, CompileResult, DeepMergeOptions, FORBIDDEN_PROTO_KEYS, FileLockOptions, MessageRepairReport, MessageRepairResult, NewlineStyle, OutputLineGuard, RequestTokenBreakdown, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, assertNever, atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, completePartialObject, computeMessageTokens, createToolOutputSerializer, deepMerge, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, expandGlob, formatTodosList, getCalibrationState, getTermSize, isInteractive, isPrimitiveArray, isStdinTTY, isStdoutTTY, matchAny, matchGlob, mergeCustomModelDefs, mergeModelsPayload, normalizeToLf, onResize, recordActualUsage, repairToolUseAdjacency, resetCalibration, safeParse, safeStringify, sanitizeJsonString, setOutputLineGuard, setRawMode, sleep, stripAnsi, toStyle, truncate, unifiedDiff, validateAgainstSchema, withFileLock, writeErr, writeOut } from './utils/index.js';
|
|
44
|
+
export { AtomicWriteOptions, BuildChildEnvOptions, CompileFail, CompileResult, DeepMergeOptions, FORBIDDEN_PROTO_KEYS, FileLockOptions, HttpDispatcher, HttpsAgentAsDispatcher, MessageRepairReport, MessageRepairResult, NewlineStyle, OutputLineGuard, RequestTokenBreakdown, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, assertNever, assertNotPrivateHost, atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, completePartialObject, computeMessageTokens, createToolOutputSerializer, deepMerge, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, expandGlob, expandIPv6, formatTodosList, getCalibrationState, getTermSize, isInteractive, isPrimitiveArray, isPrivateIPv4, isPrivateIPv6, isStdinTTY, isStdoutTTY, matchAny, matchGlob, mergeCustomModelDefs, mergeModelsPayload, normalizeToLf, onResize, recordActualUsage, repairToolUseAdjacency, resetCalibration, safeParse, safeStringify, sanitizeJsonString, setOutputLineGuard, setRawMode, sleep, stripAnsi, toStyle, truncate, unifiedDiff, validateAgainstSchema, withFileLock, writeErr, writeOut } from './utils/index.js';
|
|
45
45
|
export { T as TaskItem, c as computeTaskItemProgress, f as formatTaskList, a as formatTaskProgress } from './task-format-vGOIftmK.js';
|
|
46
46
|
import { W as WstackPaths } from './wstack-paths-CJjEwPXn.js';
|
|
47
47
|
export { a as WstackPathOptions, p as projectHash, b as projectSlug, r as resolveWstackPaths, w as wstackGlobalRoot } from './wstack-paths-CJjEwPXn.js';
|
|
@@ -50,7 +50,7 @@ export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOp
|
|
|
50
50
|
export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, a as STANDARD_AUDIT_EVENTS, S as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from './session-event-bridge-BAFWdgQ3.js';
|
|
51
51
|
export { a as DirectorStateCheckpoint, D as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from './director-state-BfeCUbmk.js';
|
|
52
52
|
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-B8rSu908.js';
|
|
53
|
-
export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from './goal-preamble-
|
|
53
|
+
export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from './goal-preamble-CznHTZqP.js';
|
|
54
54
|
export { DefaultProviderRunner } from './defaults/index.js';
|
|
55
55
|
export { A as ACP_AGENTS, a as AGENTS_BY_PHASE, b as AGENT_CATALOG, c as ALL_AGENT_DEFINITIONS, d as ALL_FLEET_AGENTS, e as AUDIT_LOG_AGENT, f as AutoExtendCeiling, g as AutoExtendPolicy, B as BUG_HUNTER_AGENT, n as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, q as DEFAULT_SUBAGENT_BASELINE, r as DelegateHost, s as Director, w as DirectorPromptParts, x as DirectorSessionFactory, y as DirectorSessionFactoryOptions, F as FLEET_ROSTER, z as FLEET_ROSTER_BUDGETS, E as FLEET_ROSTER_WITHACP, G as FleetCostCapError, H as FleetManager, I as FleetManagerOptions, J as FleetRosterBudget, K as FleetSpawnBudgetError, L as ICoordinator, M as IFleetManager, O as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, V as SubagentPromptParts, W as applyRosterBudget, X as attachAutoExtend, Y as composeDirectorPrompt, Z as composeSubagentPrompt, _ as createDelegateTool, $ as getAgentDefinition, a1 as makeAskTool, a2 as makeAssignTool, a3 as makeAwaitTasksTool, a4 as makeCollabDebugTool, a5 as makeDirectorSessionFactory, a6 as makeFleetEmitTool, a7 as makeFleetHealthTool, a8 as makeFleetSessionTool, a9 as makeFleetStatusTool, aa as makeFleetUsageTool, ab as makeRollUpTool, ac as makeSpawnTool, ad as makeTerminateTool, af as rosterSummaryFromConfigs } from './null-fleet-bus-B5mfTJXT.js';
|
|
56
56
|
export { b as AgentBudgetTier, c as AgentCapability, A as AgentDefinition, d as AgentPhase, e as DEFAULT_DISPATCH_ROLE, a as DefaultMultiAgentCoordinator, f as DispatchCandidate, D as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from './multi-agent-coordinator-DqTUEAeC.js';
|
|
@@ -71,6 +71,8 @@ export { ConversationTurn, ENHANCER_SYSTEM_PROMPT, EnhanceResult, EnhanceUserPro
|
|
|
71
71
|
export { B as BrainInterventionInput, a as BrainMonitor, b as BrainMonitorOptions, D as DEPENDENCY_FILE_PATTERNS, c as DefaultMailbox, d as DepWatchEntry, e as DepWatcherBridgeOptions, f as DependencyWatcherConfig, G as GlobalMailbox, M as MailToolsOptions, g as MailboxResolver, h as MailboxToolOptions, O as OutdatedNotifyMessage, P as PackageAuthorEntry, i as PackageAuthorLog, j as PackageAuthorTrackerOptions, k as PackageOutdatedEntry, l as PackageOutdatedResult, m as PackageOutdatedWatcherOptions, n as attachDepWatcherBridge, o as detectPackageEcosystem, p as getFullPackageLog, q as getManifestPackages, r as getPackageAuthor, s as getPackagesByAgent, t as mailboxSessionTag, u as makeDependencyWatcherConfig, v as makeMailInboxTool, w as makeMailSendTool, x as makeMailboxTool, y as recordPackageAction, z as resolveMailboxIdentity, A as resolveProjectDir, C as startPackageOutdatedWatcher, E as updatePackageOutdatedStatus } from './package-outdated-watcher-BSgR_kK-.js';
|
|
72
72
|
export { AutonomyBrainOptions, BrainAutoRisk, TieredBrainArbiterOptions, createAutonomyBrain, createTieredBrainArbiter, formatDecisionSummary } from './execution/index.js';
|
|
73
73
|
import './path-resolver-CPRj4bFY.js';
|
|
74
|
+
import 'node:https';
|
|
75
|
+
import 'undici';
|
|
74
76
|
import './selector-DWsqVjGf.js';
|
|
75
77
|
import 'node:events';
|
|
76
78
|
|
|
@@ -504,6 +506,10 @@ declare function hasTextContent(m: Message): boolean;
|
|
|
504
506
|
* user/assistant messages until `preserveK` are covered, then walks forward to
|
|
505
507
|
* keep any tool_use/tool_result protocol pair intact — so a tool_result whose
|
|
506
508
|
* tool_use is preserved is never elided.
|
|
509
|
+
*
|
|
510
|
+
* Instrumentation: emits `compaction.find_preserve_start.ended` with the
|
|
511
|
+
* forward-walk inner-loop count so we can track whether the `.some()` calls
|
|
512
|
+
* over content blocks are causing measurable O(n·m) overhead.
|
|
507
513
|
*/
|
|
508
514
|
declare function findPreserveStart(messages: readonly Message[], preserveK: number): number;
|
|
509
515
|
interface EliseResult {
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,8 @@ import { join, extname, relative, isAbsolute, resolve, sep } from 'path';
|
|
|
7
7
|
import * as fs2 from 'fs';
|
|
8
8
|
import * as os6 from 'os';
|
|
9
9
|
import { hostname } from 'os';
|
|
10
|
+
import * as dns from 'dns/promises';
|
|
11
|
+
import * as net from 'net';
|
|
10
12
|
import { execFile, spawn } from 'child_process';
|
|
11
13
|
import { promisify } from 'util';
|
|
12
14
|
import { EventEmitter } from 'events';
|
|
@@ -16,8 +18,13 @@ import { pipeline } from 'stream/promises';
|
|
|
16
18
|
|
|
17
19
|
var __defProp = Object.defineProperty;
|
|
18
20
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
19
|
-
var __esm = (fn, res) => function __init() {
|
|
20
|
-
|
|
21
|
+
var __esm = (fn, res, err) => function __init() {
|
|
22
|
+
if (err) throw err[0];
|
|
23
|
+
try {
|
|
24
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
25
|
+
} catch (e) {
|
|
26
|
+
throw err = [e], e;
|
|
27
|
+
}
|
|
21
28
|
};
|
|
22
29
|
var __export = (target, all) => {
|
|
23
30
|
for (var name in all)
|
|
@@ -2169,16 +2176,6 @@ var MEMORY_TYPE_LABELS = {
|
|
|
2169
2176
|
anti_pattern: "Anti-pattern"
|
|
2170
2177
|
};
|
|
2171
2178
|
|
|
2172
|
-
// src/utils/expect-defined.ts
|
|
2173
|
-
function expectDefined(value, label) {
|
|
2174
|
-
if (value === null || value === void 0) {
|
|
2175
|
-
const err = new Error(label ? `Expected ${label} to be defined` : "Expected value to be defined");
|
|
2176
|
-
err.name = "ExpectDefinedError";
|
|
2177
|
-
throw err;
|
|
2178
|
-
}
|
|
2179
|
-
return value;
|
|
2180
|
-
}
|
|
2181
|
-
|
|
2182
2179
|
// src/utils/token-estimate.ts
|
|
2183
2180
|
var RoughTokenEstimate = (text, charsPerToken = 3.5) => Math.max(1, Math.ceil(text.length / charsPerToken));
|
|
2184
2181
|
var CAL_ALPHA = 0.3;
|
|
@@ -2199,12 +2196,15 @@ function getCachedEstimate(key, compute) {
|
|
|
2199
2196
|
const existing = ESTIMATE_CACHE.get(key);
|
|
2200
2197
|
if (existing !== void 0) return existing;
|
|
2201
2198
|
if (ESTIMATE_CACHE.size >= ESTIMATE_CACHE_MAX_SIZE) {
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2199
|
+
let evicted = 0;
|
|
2200
|
+
const maxEvict = Math.floor(ESTIMATE_CACHE_MAX_SIZE / 4);
|
|
2201
|
+
for (const k of ESTIMATE_CACHE.keys()) {
|
|
2202
|
+
if (evicted >= maxEvict) break;
|
|
2203
|
+
ESTIMATE_CACHE.delete(k);
|
|
2204
|
+
evicted++;
|
|
2205
2205
|
}
|
|
2206
2206
|
}
|
|
2207
|
-
const estimate = compute();
|
|
2207
|
+
const estimate = compute(key);
|
|
2208
2208
|
ESTIMATE_CACHE.set(key, estimate);
|
|
2209
2209
|
return estimate;
|
|
2210
2210
|
}
|
|
@@ -2213,13 +2213,11 @@ function estimateToolInputTokens(input) {
|
|
|
2213
2213
|
if (input === null || typeof input !== "object") {
|
|
2214
2214
|
return RoughTokenEstimate(String(input));
|
|
2215
2215
|
}
|
|
2216
|
-
|
|
2217
|
-
return getCachedEstimate(key, () => RoughTokenEstimate(key));
|
|
2216
|
+
return getCachedEstimate(JSON.stringify(input), (key) => RoughTokenEstimate(key));
|
|
2218
2217
|
}
|
|
2219
2218
|
function estimateToolResultTokens(content) {
|
|
2220
2219
|
if (typeof content === "string") return RoughTokenEstimate(content);
|
|
2221
|
-
|
|
2222
|
-
return getCachedEstimate(key, () => RoughTokenEstimate(key));
|
|
2220
|
+
return getCachedEstimate(JSON.stringify(content), (key) => RoughTokenEstimate(key));
|
|
2223
2221
|
}
|
|
2224
2222
|
function estimateTextTokens(text) {
|
|
2225
2223
|
return RoughTokenEstimate(text);
|
|
@@ -2347,6 +2345,16 @@ function resetCalibration(calibrationKey) {
|
|
|
2347
2345
|
_cals.delete(calibrationKey);
|
|
2348
2346
|
}
|
|
2349
2347
|
|
|
2348
|
+
// src/utils/expect-defined.ts
|
|
2349
|
+
function expectDefined(value, label) {
|
|
2350
|
+
if (value === null || value === void 0) {
|
|
2351
|
+
const err = new Error(label ? `Expected ${label} to be defined` : "Expected value to be defined");
|
|
2352
|
+
err.name = "ExpectDefinedError";
|
|
2353
|
+
throw err;
|
|
2354
|
+
}
|
|
2355
|
+
return value;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2350
2358
|
// src/utils/message-invariants.ts
|
|
2351
2359
|
function repairToolUseAdjacency(messages) {
|
|
2352
2360
|
const removedToolUses = [];
|
|
@@ -2440,6 +2448,25 @@ function isEmptyMessage(msg) {
|
|
|
2440
2448
|
}
|
|
2441
2449
|
|
|
2442
2450
|
// src/execution/compaction-core.ts
|
|
2451
|
+
function emitCompactionMetrics(event, metrics) {
|
|
2452
|
+
console.log(
|
|
2453
|
+
JSON.stringify({
|
|
2454
|
+
level: "debug",
|
|
2455
|
+
event,
|
|
2456
|
+
messageCount: metrics.messageCount,
|
|
2457
|
+
preserveStart: metrics.preserveStart,
|
|
2458
|
+
fastPathIterations: metrics.fastPathIterations,
|
|
2459
|
+
fastPathInnerIterations: metrics.fastPathInnerIterations,
|
|
2460
|
+
// Ratios — anything > 2.0 indicates the inner loop is running more than expected
|
|
2461
|
+
fastPathInnerPerOuter: metrics.fastPathIterations > 0 ? metrics.fastPathInnerIterations / metrics.fastPathIterations : 0,
|
|
2462
|
+
fullPassIterations: metrics.fullPassIterations,
|
|
2463
|
+
fullPassInnerIterations: metrics.fullPassInnerIterations,
|
|
2464
|
+
fullPassInnerPerOuter: metrics.fullPassIterations > 0 ? metrics.fullPassInnerIterations / metrics.fullPassIterations : 0,
|
|
2465
|
+
tokensSaved: metrics.tokensSaved,
|
|
2466
|
+
changed: metrics.changed
|
|
2467
|
+
})
|
|
2468
|
+
);
|
|
2469
|
+
}
|
|
2443
2470
|
var estimateMessages = estimateMessageTokens;
|
|
2444
2471
|
function hasTextContent(m) {
|
|
2445
2472
|
if (typeof m.content === "string") return m.content.trim().length > 0;
|
|
@@ -2456,37 +2483,78 @@ function findPreserveStart(messages, preserveK) {
|
|
|
2456
2483
|
preserveStart = i;
|
|
2457
2484
|
}
|
|
2458
2485
|
}
|
|
2486
|
+
let forwardWalkIterations = 0;
|
|
2487
|
+
let forwardWalkInnerIterations = 0;
|
|
2459
2488
|
for (let i = preserveStart; i < messages.length; i++) {
|
|
2489
|
+
forwardWalkIterations++;
|
|
2460
2490
|
const m = messages[i];
|
|
2461
2491
|
if (!m || typeof m.content === "string" || !Array.isArray(m.content)) continue;
|
|
2462
|
-
const hasToolUse3 = m.content.some((b) =>
|
|
2492
|
+
const hasToolUse3 = m.content.some((b) => {
|
|
2493
|
+
forwardWalkInnerIterations++;
|
|
2494
|
+
return b.type === "tool_use";
|
|
2495
|
+
});
|
|
2463
2496
|
if (hasToolUse3 && i + 1 < messages.length) {
|
|
2464
2497
|
const next = messages[i + 1];
|
|
2465
|
-
if (next && next.role === "user" && typeof next.content !== "string" && Array.isArray(next.content) && next.content.some((b) =>
|
|
2498
|
+
if (next && next.role === "user" && typeof next.content !== "string" && Array.isArray(next.content) && next.content.some((b) => {
|
|
2499
|
+
forwardWalkInnerIterations++;
|
|
2500
|
+
return b.type === "tool_result";
|
|
2501
|
+
})) {
|
|
2466
2502
|
preserveStart = i + 1;
|
|
2467
2503
|
}
|
|
2468
2504
|
}
|
|
2469
2505
|
}
|
|
2506
|
+
console.log(
|
|
2507
|
+
JSON.stringify({
|
|
2508
|
+
level: "debug",
|
|
2509
|
+
event: "compaction.find_preserve_start.ended",
|
|
2510
|
+
messageCount: messages.length,
|
|
2511
|
+
preserveK,
|
|
2512
|
+
preserveStart,
|
|
2513
|
+
forwardWalkIterations,
|
|
2514
|
+
forwardWalkInnerIterations,
|
|
2515
|
+
forwardWalkInnerPerOuter: forwardWalkIterations > 0 ? forwardWalkInnerIterations / forwardWalkIterations : 0
|
|
2516
|
+
})
|
|
2517
|
+
);
|
|
2470
2518
|
return preserveStart;
|
|
2471
2519
|
}
|
|
2472
2520
|
function eliseOldToolResults(messages, opts) {
|
|
2473
2521
|
const preserveStart = findPreserveStart(messages, opts.preserveK);
|
|
2474
2522
|
let hasOversized = false;
|
|
2523
|
+
let fastPathIterations = 0;
|
|
2524
|
+
let fastPathInnerIterations = 0;
|
|
2475
2525
|
for (let i = 0; i < preserveStart && !hasOversized; i++) {
|
|
2526
|
+
fastPathIterations++;
|
|
2476
2527
|
const msg = messages[i];
|
|
2477
2528
|
if (!msg || !Array.isArray(msg.content)) continue;
|
|
2478
2529
|
for (const b of msg.content) {
|
|
2530
|
+
fastPathInnerIterations++;
|
|
2479
2531
|
if (b.type === "tool_result" && estimateToolResultTokens(b.content) >= opts.eliseThreshold) {
|
|
2480
2532
|
hasOversized = true;
|
|
2481
2533
|
break;
|
|
2482
2534
|
}
|
|
2483
2535
|
}
|
|
2484
2536
|
}
|
|
2537
|
+
emitCompactionMetrics(
|
|
2538
|
+
hasOversized ? "compaction.elision.fast_path.oversized_found" : "compaction.elision.fast_path.no_oversized",
|
|
2539
|
+
{
|
|
2540
|
+
messageCount: messages.length,
|
|
2541
|
+
preserveStart,
|
|
2542
|
+
fastPathIterations,
|
|
2543
|
+
fastPathInnerIterations,
|
|
2544
|
+
fullPassIterations: 0,
|
|
2545
|
+
fullPassInnerIterations: 0,
|
|
2546
|
+
tokensSaved: 0,
|
|
2547
|
+
changed: false
|
|
2548
|
+
}
|
|
2549
|
+
);
|
|
2485
2550
|
if (!hasOversized) return { messages, saved: 0, changed: false };
|
|
2486
2551
|
let saved = 0;
|
|
2487
2552
|
let changed = false;
|
|
2553
|
+
let fullPassIterations = 0;
|
|
2554
|
+
let fullPassInnerIterations = 0;
|
|
2488
2555
|
const next = new Array(messages.length);
|
|
2489
2556
|
for (let i = 0; i < messages.length; i++) {
|
|
2557
|
+
fullPassIterations++;
|
|
2490
2558
|
const msg = messages[i];
|
|
2491
2559
|
if (i >= preserveStart || !msg || !Array.isArray(msg.content)) {
|
|
2492
2560
|
next[i] = msg;
|
|
@@ -2512,7 +2580,33 @@ function eliseOldToolResults(messages, opts) {
|
|
|
2512
2580
|
next[i] = { ...msg, content: newContent };
|
|
2513
2581
|
changed = true;
|
|
2514
2582
|
}
|
|
2583
|
+
fullPassInnerIterations += original.length;
|
|
2584
|
+
if (process.env["NODE_ENV"] === "development" || process.env["WRONGSTACK_DEBUG"] === "1") {
|
|
2585
|
+
const ratio = fullPassInnerIterations / fullPassIterations;
|
|
2586
|
+
if (ratio > 10) {
|
|
2587
|
+
console.error(
|
|
2588
|
+
JSON.stringify({
|
|
2589
|
+
level: "error",
|
|
2590
|
+
event: "compaction.elision.regression",
|
|
2591
|
+
message: `fullPassInnerPerOuter=${ratio.toFixed(2)} exceeds threshold 10 \u2014 possible O(n\xB7m) regression`,
|
|
2592
|
+
messageCount: messages.length,
|
|
2593
|
+
fullPassIterations,
|
|
2594
|
+
fullPassInnerIterations
|
|
2595
|
+
})
|
|
2596
|
+
);
|
|
2597
|
+
}
|
|
2598
|
+
}
|
|
2515
2599
|
}
|
|
2600
|
+
emitCompactionMetrics("compaction.elision.full_pass.ended", {
|
|
2601
|
+
messageCount: messages.length,
|
|
2602
|
+
preserveStart,
|
|
2603
|
+
fastPathIterations,
|
|
2604
|
+
fastPathInnerIterations,
|
|
2605
|
+
fullPassIterations,
|
|
2606
|
+
fullPassInnerIterations,
|
|
2607
|
+
tokensSaved: saved,
|
|
2608
|
+
changed
|
|
2609
|
+
});
|
|
2516
2610
|
return { messages: changed ? next : messages, saved, changed };
|
|
2517
2611
|
}
|
|
2518
2612
|
function buildLosslessDigest(messages) {
|
|
@@ -3060,6 +3154,10 @@ var PATTERNS = [
|
|
|
3060
3154
|
regex: /(?:^|\s)([A-Z_]{4,}(?:KEY|TOKEN|SECRET|PASSWORD|PWD))\s*[:=]\s*['"]?([A-Za-z0-9_/+=-]{20,512})['"]?(?:\s|$)/g
|
|
3061
3155
|
}
|
|
3062
3156
|
];
|
|
3157
|
+
var SIMPLE_PATTERNS = PATTERNS.filter((p) => p.type !== "high_entropy_env");
|
|
3158
|
+
var COMBINED_REGEX = new RegExp(SIMPLE_PATTERNS.map((p) => `(${p.regex.source})`).join("|"), "g");
|
|
3159
|
+
var HIGH_ENTROPY_REGEX = PATTERNS.find((p) => p.type === "high_entropy_env").regex;
|
|
3160
|
+
var COMBINED_REPLACEMENTS = SIMPLE_PATTERNS.map((p) => `[REDACTED:${p.type}]`);
|
|
3063
3161
|
var SCRUB_CHUNK_BYTES = 64 * 1024;
|
|
3064
3162
|
function hasCredentialAnchors(text) {
|
|
3065
3163
|
return text.includes("-----BEGIN") || // Private keys (most unique → cheap reject)
|
|
@@ -3101,17 +3199,27 @@ var DefaultSecretScrubber = class {
|
|
|
3101
3199
|
}
|
|
3102
3200
|
scrubOne(text) {
|
|
3103
3201
|
if (!hasCredentialAnchors(text)) return text;
|
|
3104
|
-
let out = text
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
return
|
|
3111
|
-
}
|
|
3112
|
-
|
|
3202
|
+
let out = text.replace(
|
|
3203
|
+
COMBINED_REGEX,
|
|
3204
|
+
(match, ...groups) => {
|
|
3205
|
+
const idx = groups.findIndex((g) => g !== void 0);
|
|
3206
|
+
if (idx < 0) return match;
|
|
3207
|
+
const replacement = COMBINED_REPLACEMENTS[idx];
|
|
3208
|
+
return replacement !== void 0 ? replacement : match;
|
|
3209
|
+
}
|
|
3210
|
+
);
|
|
3211
|
+
out = out.replace(HIGH_ENTROPY_REGEX, (_match, group1, _group2) => {
|
|
3212
|
+
return `${group1}=[REDACTED:high_entropy_env]`;
|
|
3213
|
+
});
|
|
3113
3214
|
return out;
|
|
3114
3215
|
}
|
|
3216
|
+
/**
|
|
3217
|
+
* Recursively scrub every string value in an object/array graph. Secrets can
|
|
3218
|
+
* appear under any key — a URL query param, an `authorization` header, an
|
|
3219
|
+
* arbitrarily-named nested field — so we don't gate recursion on key names.
|
|
3220
|
+
* The per-string `scrub()` fast-path (anchor pre-scan) keeps this cheap: any
|
|
3221
|
+
* value without a credential anchor returns immediately without regex work.
|
|
3222
|
+
*/
|
|
3115
3223
|
scrubObject(obj) {
|
|
3116
3224
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
3117
3225
|
const visit = (v) => {
|
|
@@ -4857,12 +4965,12 @@ var ConversationState = class {
|
|
|
4857
4965
|
for (const m of messages) {
|
|
4858
4966
|
if (m._estTokens === void 0) {
|
|
4859
4967
|
m._estTokens = computeMessageTokens(m);
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4968
|
+
if (Array.isArray(m.content)) {
|
|
4969
|
+
for (const b of m.content) {
|
|
4970
|
+
if (b.type === "tool_use" || b.type === "tool_result") {
|
|
4971
|
+
hasToolBlock = true;
|
|
4972
|
+
break;
|
|
4973
|
+
}
|
|
4866
4974
|
}
|
|
4867
4975
|
}
|
|
4868
4976
|
}
|
|
@@ -5121,7 +5229,7 @@ var DefaultSessionReader = class {
|
|
|
5121
5229
|
this.store = opts.store;
|
|
5122
5230
|
}
|
|
5123
5231
|
async query(q = {}) {
|
|
5124
|
-
const raw = await this.store.list(q.limit ? Math.max(q.limit
|
|
5232
|
+
const raw = await this.store.list(q.limit ? Math.max(q.limit, 100) : 1e3);
|
|
5125
5233
|
const titleNeedle = q.titleContains?.toLowerCase();
|
|
5126
5234
|
const filtered = raw.filter((s) => {
|
|
5127
5235
|
if (q.since && s.startedAt < q.since) return false;
|
|
@@ -6268,6 +6376,95 @@ function mergeCustomModelDefs(providerCustomModels, configModels) {
|
|
|
6268
6376
|
if (Object.keys(out).length === 0) return void 0;
|
|
6269
6377
|
return out;
|
|
6270
6378
|
}
|
|
6379
|
+
function isPrivateIPv4(addr) {
|
|
6380
|
+
const parts = addr.split(".").map((p) => Number.parseInt(p, 10));
|
|
6381
|
+
if (parts.length !== 4 || parts.some((n) => Number.isNaN(n) || n < 0 || n > 255)) {
|
|
6382
|
+
return true;
|
|
6383
|
+
}
|
|
6384
|
+
const [a, b, c] = parts;
|
|
6385
|
+
if (a === 0) return true;
|
|
6386
|
+
if (a === 10) return true;
|
|
6387
|
+
if (a === 127) return true;
|
|
6388
|
+
if (a === 169 && b === 254) return true;
|
|
6389
|
+
if (a === 172 && b >= 16 && b <= 31) return true;
|
|
6390
|
+
if (a === 192 && b === 168) return true;
|
|
6391
|
+
if (a === 192 && b === 0 && c === 0) return true;
|
|
6392
|
+
if (a === 100 && b >= 64 && b <= 127) return true;
|
|
6393
|
+
if (a >= 224) return true;
|
|
6394
|
+
return false;
|
|
6395
|
+
}
|
|
6396
|
+
function isPrivateIPv6(raw) {
|
|
6397
|
+
const lower = raw.toLowerCase();
|
|
6398
|
+
if (lower === "::" || lower === "::1") return true;
|
|
6399
|
+
const groups = expandIPv6(lower);
|
|
6400
|
+
if (!groups) return true;
|
|
6401
|
+
if (groups[0] === 0 && groups[1] === 0 && groups[2] === 0 && groups[3] === 0 && groups[4] === 0 && groups[5] === 65535) {
|
|
6402
|
+
const a = (groups[6] ?? 0) >> 8;
|
|
6403
|
+
const b = (groups[6] ?? 0) & 255;
|
|
6404
|
+
const c = (groups[7] ?? 0) >> 8;
|
|
6405
|
+
const d = (groups[7] ?? 0) & 255;
|
|
6406
|
+
return isPrivateIPv4(`${a}.${b}.${c}.${d}`);
|
|
6407
|
+
}
|
|
6408
|
+
const high = groups[0] ?? 0;
|
|
6409
|
+
if ((high & 65024) === 64512) return true;
|
|
6410
|
+
if ((high & 65472) === 65152) return true;
|
|
6411
|
+
if ((high & 65280) === 65280) return true;
|
|
6412
|
+
return false;
|
|
6413
|
+
}
|
|
6414
|
+
function expandIPv6(addr) {
|
|
6415
|
+
const parts = addr.split("::");
|
|
6416
|
+
if (parts.length > 2) return null;
|
|
6417
|
+
const parseGroups = (s) => {
|
|
6418
|
+
if (s === "") return [];
|
|
6419
|
+
const out = [];
|
|
6420
|
+
for (const g of s.split(":")) {
|
|
6421
|
+
if (g.length === 0 || g.length > 4) return null;
|
|
6422
|
+
const n = Number.parseInt(g, 16);
|
|
6423
|
+
if (Number.isNaN(n) || n < 0 || n > 65535) return null;
|
|
6424
|
+
out.push(n);
|
|
6425
|
+
}
|
|
6426
|
+
return out;
|
|
6427
|
+
};
|
|
6428
|
+
if (parts.length === 1) {
|
|
6429
|
+
const groups = parseGroups(parts[0] ?? "");
|
|
6430
|
+
if (!groups || groups.length !== 8) return null;
|
|
6431
|
+
return groups;
|
|
6432
|
+
}
|
|
6433
|
+
const head = parseGroups(parts[0] ?? "");
|
|
6434
|
+
const tail = parseGroups(parts[1] ?? "");
|
|
6435
|
+
if (!head || !tail) return null;
|
|
6436
|
+
const fill = 8 - head.length - tail.length;
|
|
6437
|
+
if (fill < 0) return null;
|
|
6438
|
+
return [...head, ...new Array(fill).fill(0), ...tail];
|
|
6439
|
+
}
|
|
6440
|
+
async function assertNotPrivateHost(hostname3) {
|
|
6441
|
+
const host = hostname3.startsWith("[") && hostname3.endsWith("]") ? hostname3.slice(1, -1) : hostname3;
|
|
6442
|
+
if (host === "localhost" || host.endsWith(".localhost")) {
|
|
6443
|
+
throw new Error("fetch: blocked localhost target");
|
|
6444
|
+
}
|
|
6445
|
+
const ipVersion = net.isIP(host);
|
|
6446
|
+
if (ipVersion === 4) {
|
|
6447
|
+
if (isPrivateIPv4(host)) {
|
|
6448
|
+
throw new Error(`fetch: blocked private/loopback address "${host}"`);
|
|
6449
|
+
}
|
|
6450
|
+
} else if (ipVersion === 6) {
|
|
6451
|
+
if (isPrivateIPv6(host)) {
|
|
6452
|
+
throw new Error(`fetch: blocked private/loopback address "${host}"`);
|
|
6453
|
+
}
|
|
6454
|
+
} else {
|
|
6455
|
+
try {
|
|
6456
|
+
const records = await dns.lookup(host, { all: true });
|
|
6457
|
+
for (const r of records) {
|
|
6458
|
+
const bad = r.family === 4 ? isPrivateIPv4(r.address) : isPrivateIPv6(r.address);
|
|
6459
|
+
if (bad) {
|
|
6460
|
+
throw new Error(`fetch: resolved to private address ${r.address}`);
|
|
6461
|
+
}
|
|
6462
|
+
}
|
|
6463
|
+
} catch (err) {
|
|
6464
|
+
if (err instanceof Error && err.message.startsWith("fetch:")) throw err;
|
|
6465
|
+
}
|
|
6466
|
+
}
|
|
6467
|
+
}
|
|
6271
6468
|
|
|
6272
6469
|
// src/storage/session-store.ts
|
|
6273
6470
|
init_atomic_write();
|
|
@@ -9734,6 +9931,8 @@ function compactSkillBody(body) {
|
|
|
9734
9931
|
var DefaultSkillLoader = class {
|
|
9735
9932
|
dirs;
|
|
9736
9933
|
cache;
|
|
9934
|
+
entriesCache;
|
|
9935
|
+
bodyCache = /* @__PURE__ */ new Map();
|
|
9737
9936
|
constructor(opts) {
|
|
9738
9937
|
this.dirs = [
|
|
9739
9938
|
{ dir: opts.paths.inProjectSkills, source: "project" },
|
|
@@ -9792,6 +9991,7 @@ var DefaultSkillLoader = class {
|
|
|
9792
9991
|
return lines.join("\n");
|
|
9793
9992
|
}
|
|
9794
9993
|
async listEntries() {
|
|
9994
|
+
if (this.entriesCache) return this.entriesCache;
|
|
9795
9995
|
const skills = await this.list();
|
|
9796
9996
|
const entries = [];
|
|
9797
9997
|
for (const s of skills) {
|
|
@@ -9802,33 +10002,47 @@ var DefaultSkillLoader = class {
|
|
|
9802
10002
|
} catch {
|
|
9803
10003
|
}
|
|
9804
10004
|
}
|
|
10005
|
+
this.entriesCache = entries;
|
|
9805
10006
|
return entries;
|
|
9806
10007
|
}
|
|
9807
10008
|
invalidateCache() {
|
|
9808
10009
|
this.cache = void 0;
|
|
10010
|
+
this.entriesCache = void 0;
|
|
10011
|
+
this.bodyCache.clear();
|
|
9809
10012
|
}
|
|
9810
10013
|
async readBody(name) {
|
|
10014
|
+
const cached = this.bodyCache.get(name);
|
|
10015
|
+
if (cached !== void 0) return cached;
|
|
9811
10016
|
const m = await this.find(name);
|
|
9812
10017
|
if (!m) throw new Error(`Skill "${name}" not found`);
|
|
9813
|
-
|
|
10018
|
+
const body = await fsp3.readFile(m.path, "utf8");
|
|
10019
|
+
this.bodyCache.set(name, body);
|
|
10020
|
+
return body;
|
|
9814
10021
|
}
|
|
9815
10022
|
async readSaveBody(name) {
|
|
10023
|
+
const key = `save:${name}`;
|
|
10024
|
+
const cached = this.bodyCache.get(key);
|
|
10025
|
+
if (cached !== void 0) return cached;
|
|
9816
10026
|
const m = await this.find(name);
|
|
9817
10027
|
if (!m) throw new Error(`Skill "${name}" not found`);
|
|
9818
10028
|
const savePath = path7.join(path7.dirname(m.path), "SKILL.save.md");
|
|
10029
|
+
let result;
|
|
9819
10030
|
try {
|
|
9820
|
-
|
|
10031
|
+
result = await fsp3.readFile(savePath, "utf8");
|
|
9821
10032
|
} catch {
|
|
9822
10033
|
const full = await fsp3.readFile(m.path, "utf8");
|
|
9823
10034
|
const body = stripFrontmatter(full);
|
|
9824
10035
|
const compact = compactSkillBody(body);
|
|
9825
10036
|
if (compact) {
|
|
9826
|
-
|
|
10037
|
+
result = `## Overview
|
|
9827
10038
|
|
|
9828
10039
|
${compact}`;
|
|
10040
|
+
} else {
|
|
10041
|
+
result = body.trim().slice(0, 300);
|
|
9829
10042
|
}
|
|
9830
|
-
return body.trim().slice(0, 300);
|
|
9831
10043
|
}
|
|
10044
|
+
this.bodyCache.set(key, result);
|
|
10045
|
+
return result;
|
|
9832
10046
|
}
|
|
9833
10047
|
};
|
|
9834
10048
|
function parseFrontmatter(raw) {
|
|
@@ -15440,17 +15654,17 @@ function normalize2(text) {
|
|
|
15440
15654
|
return ` ${text.toLowerCase().replace(/[^a-z0-9]+/g, " ").trim()} `;
|
|
15441
15655
|
}
|
|
15442
15656
|
function scoreAgents(task, catalog = AGENT_CATALOG) {
|
|
15443
|
-
const
|
|
15657
|
+
const haySet = new Set(normalize2(task).split(/\s+/).filter(Boolean));
|
|
15444
15658
|
const out = [];
|
|
15445
15659
|
for (const def of Object.values(catalog)) {
|
|
15446
15660
|
if (!def?.config?.role) continue;
|
|
15447
15661
|
let score = 0;
|
|
15448
15662
|
const matched = [];
|
|
15449
15663
|
for (const kw of def.capability.keywords) {
|
|
15450
|
-
const
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
score +=
|
|
15664
|
+
const needleWords = normalize2(kw).split(/\s+/).filter(Boolean);
|
|
15665
|
+
const allPresent = needleWords.every((w) => haySet.has(w));
|
|
15666
|
+
if (allPresent) {
|
|
15667
|
+
score += needleWords.length;
|
|
15454
15668
|
matched.push(kw);
|
|
15455
15669
|
}
|
|
15456
15670
|
}
|
|
@@ -17861,6 +18075,7 @@ Emit each evaluation immediately. Do not wait until you have read all reports.`;
|
|
|
17861
18075
|
}
|
|
17862
18076
|
for (const dispose of this.disposers) dispose();
|
|
17863
18077
|
this.disposers.length = 0;
|
|
18078
|
+
this.snapshot.files.length = 0;
|
|
17864
18079
|
}
|
|
17865
18080
|
};
|
|
17866
18081
|
|
|
@@ -38245,6 +38460,6 @@ function createChimeraPlugin() {
|
|
|
38245
38460
|
};
|
|
38246
38461
|
}
|
|
38247
38462
|
|
|
38248
|
-
export { ACP_AGENTS, AGENTS_BY_PHASE, AGENT_CATALOG, AISpecBuilder, ALL_AGENT_DEFINITIONS, ALL_FLEET_AGENTS, ALL_SYNC_CATEGORIES, AUDIT_LOG_AGENT, Agent, AgentError, AgentStatusTracker, AnnotationsStore, AutoApprovePermissionPolicy, AutoCompactionMiddleware, AutoExecutor, AutoPhasePlanner, AutoPhaseRunner, AutonomousRunner, BUG_HUNTER_AGENT, BrainDecisionQueue, BrainMonitor, BudgetExceededError, CHIMERA_REVIEW_PROMPT, CONTEXT_WINDOW_MODES, CORE_RECONSTRUCT_EVENTS, CheckpointManager, CloudSync, CollaborationBus, ConfigError, ConfigMigrationError, Container, Context, ConversationState, DEFAULT_AUTONOMY_CONFIG, DEFAULT_CONFIG_MIGRATIONS, DEFAULT_CONTEXT_CONFIG, DEFAULT_CONTEXT_WINDOW_MODE_ID, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_DISPATCH_ROLE, DEFAULT_MAX_ITERATIONS, DEFAULT_MODES, DEFAULT_RECOVERY_STRATEGIES, DEFAULT_SESSION_LOGGING_CONFIG, DEFAULT_SESSION_PRUNE_DAYS, DEFAULT_SPEC_TEMPLATE, DEFAULT_SUBAGENT_BASELINE, DEFAULT_TOOLS_CONFIG, DEPENDENCY_FILE_PATTERNS, DefaultAttachmentStore, DefaultBrainArbiter, DefaultConfigLoader, DefaultConfigStore, DefaultErrorHandler, DefaultHealthRegistry, DefaultLogger, DefaultMailbox, DefaultMemoryStore, DefaultModeStore, DefaultModelsRegistry, DefaultMultiAgentCoordinator, DefaultPathResolver, DefaultPermissionPolicy, DefaultPluginAPI, DefaultPromptStore, DefaultProviderRunner, DefaultRetryPolicy, DefaultSecretScrubber, DefaultSecretVault, DefaultSessionReader, DefaultSessionRewinder, DefaultSessionStore, DefaultSkillLoader, DefaultSystemPromptBuilder, DefaultTaskStore, DefaultTokenCounter, Director, DirectorStateCheckpoint, DoneConditionChecker, ENHANCER_SYSTEM_PROMPT, ERROR_CODES, EternalAutonomyEngine, EventBus, ExtensionRegistry, FLEET_ROSTER, FLEET_ROSTER_BUDGETS, FLEET_ROSTER_WITHACP, FORBIDDEN_PROTO_KEYS, FileMemoryBackend, FleetBus, FleetCostCapError, FleetManager, FleetSpawnBudgetError, FleetUsageAggregator, FsError, GitignoreUpdater, GlobalMailbox, GraphMemoryBackend, HookRegistry, HookRunner, HumanEscalatingBrainArbiter, HybridCompactor, InMemoryAgentBridge, InMemoryBridgeTransport, InMemoryMetricsSink, InputBuilder, IntelligentCompactor, KERNEL_API_VERSION, LAYER_1_IDENTITY, LLMSelector, MATRIX_PHASE_KEYS, MAX_JOURNAL_ENTRIES, MAX_PROGRESS_HISTORY, MEMORY_TYPE_LABELS, NULL_FLEET_BUS, NoopMetricsSink, NoopTracer, OTelTracer, ObservableBrainArbiter, PROMETHEUS_CONTENT_TYPE, ParallelEternalEngine, PhaseGraphBuilder, PhaseOrchestrator, PhaseStore, Pipeline, PluginError, ProviderError, ProviderRegistry, QueueStore, REFACTOR_PLANNER_AGENT, RecoveryLock, ReplayLogStore, ReplayProviderRunner, ReportGenerator, RunController, SECURITY_SCANNER_AGENT, SPEC_TEMPLATES, STANDARD_AUDIT_EVENTS, ScopedEventBus, SddError, SddParallelRun, SddTaskDecomposer, SecurityScanner, SecurityScannerOrchestrator, SelectiveCompactor, SessionAnalyzer, SessionError, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, SkillGenerator, SkillInstaller, SkillManifestStore, SlashCommandRegistry, SpecDrivenDev, SpecParser, SpecStore, SpecVersioning, StreamHangError, SubagentBudget, TOKENS, TaskFlow, TaskGenerator, TaskGraphStore, TaskTracker, TechStackDetector, ToolAuditLog, ToolError, ToolExecutor, ToolRegistry, WorktreeManager, WrongStackError, addPlanItem, allServers, analyzeCriticalPath, appendJournal, applyRosterBudget, asBlocks, asText, assertNever, assertSafePath, atomicWrite, attachAutoExtend, attachDepWatcherBridge, attachMailboxChecker, attachPlanCheckpoint, attachTodosCheckpoint, awsServer, blockServer, bootConfig, braveSearchServer, buildBtwBlock, buildChildEnv, buildGoalPreamble, buildLosslessDigest, buildMailboxBlock, buildOtlpMetricsRequest, buildOtlpTracesRequest, buildQueuedMessagesBlock, buildRecoveryStrategies, buildSmartDigest, classifyFamily, clearPlan, collabInjectMiddleware, collabPauseMiddleware, color, compactLog, compileGlob, compileUserRegex, completePartialObject, composeDirectorPrompt, composeSubagentPrompt, computeMessageTokens, computeTaskItemProgress, computeTaskProgress, consumeBtwNotes, consumeQueuedMessagesUpdate, context7Server, contextManagerTool, createAutoExecutor, createAutoPhaseFromTaskGraph, createAutonomyBrain, createChimeraPlugin, createContextManagerTool, createDefaultPipelines, createDelegateTool, createGitPlugin, createMailboxChecker, createMcpControlTool, createMcpUseTool, createMessage, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSessionEventBridge, createSkillsPlugin, createStrategyCompactor, createSyncPlugin, createTieredBrainArbiter, createToolOutputSerializer, decryptConfigSecrets, deepMerge, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, deriveTodosFromPlanItem, detectNewlineStyle, detectEcosystem as detectPackageEcosystem, dispatchAgent, downloadGitHubTarball, eliseOldToolResults, emptyGoal, emptyPlan, emptyTaskFile, encryptConfigSecrets, enhanceUserPrompt, ensureDir, estimateMessageTokens, estimateMessages, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, everArtServer, expandGlob, expectDefined, extractRunEnv, extractText, filesystemServer, findCriticalPath, findPreserveStart, flagsToConfigPatch, formatContextWindowModeList, formatDecisionSummary, formatGoal, formatHumanPrompt, formatPlan, formatPlanTemplates, formatTaskList, formatTaskProgress, formatTodosList, getAgentDefinition, getCalibrationState, getContextWindowMode, getFileHistory, getFilesByAgent, getFullLog, getFullPackageLog, getLastAuthor, getManifestPackages, getPackageAuthor, getPackagesByAgent, getPlanTemplate, getSessionRegistry, getTemplate, getTermSize, githubServer, goalFilePath, googleMapsServer, hasSessionRegistry, hasTextContent, hashRequest, hookMatcherMatches, injectPendingMailboxMessages, isAgentError, isConfigError, isContextWindowModeId, isFsError, isImageBlock, isInteractive, isPluginError, isPrimitiveArray, isSddError, isSecretField, isSessionError, isStdinTTY, isStdoutTTY, isTextBlock, isThinkingBlock, isToolError, isToolResultBlock, isToolUseBlock, isValidMatrixKey, isWrongStackError, listContextWindowModes, listPlanTemplates, listTemplates, loadDirectorState, loadGoal, loadPlan, loadPlugins, loadProjectModes, loadTasks, loadTodosCheckpoint, loadUserModes, mailboxSessionTag, makeAgentSubagentRunner, makeAskTool, makeAssignTool, makeAutonomyPromptContributor, makeAwaitTasksTool, makeCollabDebugTool, makeContinueToNextIterationTool, makeDependencyWatcherConfig, makeDirectorSessionFactory, makeFleetEmitTool, makeFleetHealthTool, makeFleetSessionTool, makeFleetStatusTool, makeFleetUsageTool, makeLLMClassifier, makeMailInboxTool, makeMailSendTool, makeMailboxTool, makeRollUpTool, makeSpawnTool, makeTerminateTool, matchAny, matchGlob, matrixKeyKind, mergeCustomModelDefs, mergeModelsPayload, migratePlaintextSecrets, miniMaxVisionServer, mutatePlan, mutateTasks, noOpLogger, noOpVault, normalizeRecipient, normalizeToLf, normalizedEqual, onResize, parseContinueDirective, parseEntries, parseProgressFromText, parseSkillRef, peekQueuedMessages, pendingBtwCount, phaseForRole, projectHash, projectSlug, recentTextTurns, recordActualUsage, recordFileAction, recordPackageAction, recordProgress, removePlanItem, renderProgress, renderPrometheus, renderSpecAnalysis, renderTaskGraph, renderTaskList, repairToolUseAdjacency, resetCalibration, resolveAuditLevel, resolveChimeraConfig, resolveContextWindowPolicy, resolveMailboxIdentity, resolveModelMatrix, resolveProjectDir, resolveSessionLoggingConfig, resolveWstackPaths, rewriteConfigEncrypted, rosterSummaryFromConfigs, runConfigMigrations, runProviderWithRetry, runShellHook, safeParse, safeStringify, sanitizeJsonString, saveGoal, savePlan, saveTasks, saveTodosCheckpoint, scoreAgents, scoreMessage, securitySlashCommand, sentinelServer, setBtwNote, setOutputLineGuard, setPlanItemStatus, setProgress, setQueuedMessagesSnapshot, setRawMode, shouldEnhance, slackServer, sleep, stableStringify, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, startPackageOutdatedWatcher, startTechStackConsumer, stripAnsi, summarizeUsage, templateToMarkdown, toStyle, toWrongStackError, topologicalSort, truncate, unifiedDiff, unloadPlugins, updatePackageOutdatedStatus, validateAgainstSchema, wireMetricsToEvents, withFileLock, wrapAsState, writeErr, writeOut, wstackGlobalRoot, zaiVisionServer };
|
|
38463
|
+
export { ACP_AGENTS, AGENTS_BY_PHASE, AGENT_CATALOG, AISpecBuilder, ALL_AGENT_DEFINITIONS, ALL_FLEET_AGENTS, ALL_SYNC_CATEGORIES, AUDIT_LOG_AGENT, Agent, AgentError, AgentStatusTracker, AnnotationsStore, AutoApprovePermissionPolicy, AutoCompactionMiddleware, AutoExecutor, AutoPhasePlanner, AutoPhaseRunner, AutonomousRunner, BUG_HUNTER_AGENT, BrainDecisionQueue, BrainMonitor, BudgetExceededError, CHIMERA_REVIEW_PROMPT, CONTEXT_WINDOW_MODES, CORE_RECONSTRUCT_EVENTS, CheckpointManager, CloudSync, CollaborationBus, ConfigError, ConfigMigrationError, Container, Context, ConversationState, DEFAULT_AUTONOMY_CONFIG, DEFAULT_CONFIG_MIGRATIONS, DEFAULT_CONTEXT_CONFIG, DEFAULT_CONTEXT_WINDOW_MODE_ID, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_DISPATCH_ROLE, DEFAULT_MAX_ITERATIONS, DEFAULT_MODES, DEFAULT_RECOVERY_STRATEGIES, DEFAULT_SESSION_LOGGING_CONFIG, DEFAULT_SESSION_PRUNE_DAYS, DEFAULT_SPEC_TEMPLATE, DEFAULT_SUBAGENT_BASELINE, DEFAULT_TOOLS_CONFIG, DEPENDENCY_FILE_PATTERNS, DefaultAttachmentStore, DefaultBrainArbiter, DefaultConfigLoader, DefaultConfigStore, DefaultErrorHandler, DefaultHealthRegistry, DefaultLogger, DefaultMailbox, DefaultMemoryStore, DefaultModeStore, DefaultModelsRegistry, DefaultMultiAgentCoordinator, DefaultPathResolver, DefaultPermissionPolicy, DefaultPluginAPI, DefaultPromptStore, DefaultProviderRunner, DefaultRetryPolicy, DefaultSecretScrubber, DefaultSecretVault, DefaultSessionReader, DefaultSessionRewinder, DefaultSessionStore, DefaultSkillLoader, DefaultSystemPromptBuilder, DefaultTaskStore, DefaultTokenCounter, Director, DirectorStateCheckpoint, DoneConditionChecker, ENHANCER_SYSTEM_PROMPT, ERROR_CODES, EternalAutonomyEngine, EventBus, ExtensionRegistry, FLEET_ROSTER, FLEET_ROSTER_BUDGETS, FLEET_ROSTER_WITHACP, FORBIDDEN_PROTO_KEYS, FileMemoryBackend, FleetBus, FleetCostCapError, FleetManager, FleetSpawnBudgetError, FleetUsageAggregator, FsError, GitignoreUpdater, GlobalMailbox, GraphMemoryBackend, HookRegistry, HookRunner, HumanEscalatingBrainArbiter, HybridCompactor, InMemoryAgentBridge, InMemoryBridgeTransport, InMemoryMetricsSink, InputBuilder, IntelligentCompactor, KERNEL_API_VERSION, LAYER_1_IDENTITY, LLMSelector, MATRIX_PHASE_KEYS, MAX_JOURNAL_ENTRIES, MAX_PROGRESS_HISTORY, MEMORY_TYPE_LABELS, NULL_FLEET_BUS, NoopMetricsSink, NoopTracer, OTelTracer, ObservableBrainArbiter, PROMETHEUS_CONTENT_TYPE, ParallelEternalEngine, PhaseGraphBuilder, PhaseOrchestrator, PhaseStore, Pipeline, PluginError, ProviderError, ProviderRegistry, QueueStore, REFACTOR_PLANNER_AGENT, RecoveryLock, ReplayLogStore, ReplayProviderRunner, ReportGenerator, RunController, SECURITY_SCANNER_AGENT, SPEC_TEMPLATES, STANDARD_AUDIT_EVENTS, ScopedEventBus, SddError, SddParallelRun, SddTaskDecomposer, SecurityScanner, SecurityScannerOrchestrator, SelectiveCompactor, SessionAnalyzer, SessionError, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, SkillGenerator, SkillInstaller, SkillManifestStore, SlashCommandRegistry, SpecDrivenDev, SpecParser, SpecStore, SpecVersioning, StreamHangError, SubagentBudget, TOKENS, TaskFlow, TaskGenerator, TaskGraphStore, TaskTracker, TechStackDetector, ToolAuditLog, ToolError, ToolExecutor, ToolRegistry, WorktreeManager, WrongStackError, addPlanItem, allServers, analyzeCriticalPath, appendJournal, applyRosterBudget, asBlocks, asText, assertNever, assertNotPrivateHost, assertSafePath, atomicWrite, attachAutoExtend, attachDepWatcherBridge, attachMailboxChecker, attachPlanCheckpoint, attachTodosCheckpoint, awsServer, blockServer, bootConfig, braveSearchServer, buildBtwBlock, buildChildEnv, buildGoalPreamble, buildLosslessDigest, buildMailboxBlock, buildOtlpMetricsRequest, buildOtlpTracesRequest, buildQueuedMessagesBlock, buildRecoveryStrategies, buildSmartDigest, classifyFamily, clearPlan, collabInjectMiddleware, collabPauseMiddleware, color, compactLog, compileGlob, compileUserRegex, completePartialObject, composeDirectorPrompt, composeSubagentPrompt, computeMessageTokens, computeTaskItemProgress, computeTaskProgress, consumeBtwNotes, consumeQueuedMessagesUpdate, context7Server, contextManagerTool, createAutoExecutor, createAutoPhaseFromTaskGraph, createAutonomyBrain, createChimeraPlugin, createContextManagerTool, createDefaultPipelines, createDelegateTool, createGitPlugin, createMailboxChecker, createMcpControlTool, createMcpUseTool, createMessage, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSessionEventBridge, createSkillsPlugin, createStrategyCompactor, createSyncPlugin, createTieredBrainArbiter, createToolOutputSerializer, decryptConfigSecrets, deepMerge, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, deriveTodosFromPlanItem, detectNewlineStyle, detectEcosystem as detectPackageEcosystem, dispatchAgent, downloadGitHubTarball, eliseOldToolResults, emptyGoal, emptyPlan, emptyTaskFile, encryptConfigSecrets, enhanceUserPrompt, ensureDir, estimateMessageTokens, estimateMessages, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, everArtServer, expandGlob, expandIPv6, expectDefined, extractRunEnv, extractText, filesystemServer, findCriticalPath, findPreserveStart, flagsToConfigPatch, formatContextWindowModeList, formatDecisionSummary, formatGoal, formatHumanPrompt, formatPlan, formatPlanTemplates, formatTaskList, formatTaskProgress, formatTodosList, getAgentDefinition, getCalibrationState, getContextWindowMode, getFileHistory, getFilesByAgent, getFullLog, getFullPackageLog, getLastAuthor, getManifestPackages, getPackageAuthor, getPackagesByAgent, getPlanTemplate, getSessionRegistry, getTemplate, getTermSize, githubServer, goalFilePath, googleMapsServer, hasSessionRegistry, hasTextContent, hashRequest, hookMatcherMatches, injectPendingMailboxMessages, isAgentError, isConfigError, isContextWindowModeId, isFsError, isImageBlock, isInteractive, isPluginError, isPrimitiveArray, isPrivateIPv4, isPrivateIPv6, isSddError, isSecretField, isSessionError, isStdinTTY, isStdoutTTY, isTextBlock, isThinkingBlock, isToolError, isToolResultBlock, isToolUseBlock, isValidMatrixKey, isWrongStackError, listContextWindowModes, listPlanTemplates, listTemplates, loadDirectorState, loadGoal, loadPlan, loadPlugins, loadProjectModes, loadTasks, loadTodosCheckpoint, loadUserModes, mailboxSessionTag, makeAgentSubagentRunner, makeAskTool, makeAssignTool, makeAutonomyPromptContributor, makeAwaitTasksTool, makeCollabDebugTool, makeContinueToNextIterationTool, makeDependencyWatcherConfig, makeDirectorSessionFactory, makeFleetEmitTool, makeFleetHealthTool, makeFleetSessionTool, makeFleetStatusTool, makeFleetUsageTool, makeLLMClassifier, makeMailInboxTool, makeMailSendTool, makeMailboxTool, makeRollUpTool, makeSpawnTool, makeTerminateTool, matchAny, matchGlob, matrixKeyKind, mergeCustomModelDefs, mergeModelsPayload, migratePlaintextSecrets, miniMaxVisionServer, mutatePlan, mutateTasks, noOpLogger, noOpVault, normalizeRecipient, normalizeToLf, normalizedEqual, onResize, parseContinueDirective, parseEntries, parseProgressFromText, parseSkillRef, peekQueuedMessages, pendingBtwCount, phaseForRole, projectHash, projectSlug, recentTextTurns, recordActualUsage, recordFileAction, recordPackageAction, recordProgress, removePlanItem, renderProgress, renderPrometheus, renderSpecAnalysis, renderTaskGraph, renderTaskList, repairToolUseAdjacency, resetCalibration, resolveAuditLevel, resolveChimeraConfig, resolveContextWindowPolicy, resolveMailboxIdentity, resolveModelMatrix, resolveProjectDir, resolveSessionLoggingConfig, resolveWstackPaths, rewriteConfigEncrypted, rosterSummaryFromConfigs, runConfigMigrations, runProviderWithRetry, runShellHook, safeParse, safeStringify, sanitizeJsonString, saveGoal, savePlan, saveTasks, saveTodosCheckpoint, scoreAgents, scoreMessage, securitySlashCommand, sentinelServer, setBtwNote, setOutputLineGuard, setPlanItemStatus, setProgress, setQueuedMessagesSnapshot, setRawMode, shouldEnhance, slackServer, sleep, stableStringify, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, startPackageOutdatedWatcher, startTechStackConsumer, stripAnsi, summarizeUsage, templateToMarkdown, toStyle, toWrongStackError, topologicalSort, truncate, unifiedDiff, unloadPlugins, updatePackageOutdatedStatus, validateAgainstSchema, wireMetricsToEvents, withFileLock, wrapAsState, writeErr, writeOut, wstackGlobalRoot, zaiVisionServer };
|
|
38249
38464
|
//# sourceMappingURL=index.js.map
|
|
38250
38465
|
//# sourceMappingURL=index.js.map
|