@wrongstack/core 0.77.0 → 0.82.6
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/{agent-bridge-EWdqs8v6.d.ts → agent-bridge-C9P_HPez.d.ts} +2 -2
- package/dist/{agent-subagent-runner-D8qW8OSC.d.ts → agent-subagent-runner-2Aq0jOSj.d.ts} +107 -102
- package/dist/{compactor-D_ExJajC.d.ts → compactor-CJq7LQev.d.ts} +3 -3
- package/dist/{config-Dy0CK_o6.d.ts → config-_DZ7dN-T.d.ts} +77 -75
- package/dist/{context-y87Jc5ei.d.ts → context-ToHAp4-U.d.ts} +119 -90
- package/dist/coordination/index.d.ts +16 -16
- package/dist/coordination/index.js +318 -37
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +31 -31
- package/dist/defaults/index.js +419 -67
- package/dist/defaults/index.js.map +1 -1
- package/dist/{director-state-BmYi3DGA.d.ts → director-state-CgIc30qi.d.ts} +19 -19
- package/dist/{events-CYaoLN5_.d.ts → events-DnRqXaZ3.d.ts} +43 -42
- package/dist/execution/index.d.ts +53 -53
- package/dist/execution/index.js +67 -23
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +9 -9
- package/dist/extension/index.js +8 -1
- package/dist/extension/index.js.map +1 -1
- package/dist/{goal-store-C7jcumEh.d.ts → goal-store-DvWLNu52.d.ts} +4 -4
- package/dist/{index-DIxjTOga.d.ts → index-BNOLadHw.d.ts} +28 -28
- package/dist/{index-Dsda0uCn.d.ts → index-N0_c4bHQ.d.ts} +45 -45
- package/dist/index.d.ts +165 -165
- package/dist/index.js +593 -137
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +9 -9
- package/dist/infrastructure/index.js +13 -5
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +14 -14
- package/dist/kernel/index.js +7 -0
- package/dist/kernel/index.js.map +1 -1
- package/dist/logger-B72yyPc6.d.ts +12 -0
- package/dist/{logger-BppKxDqZ.d.ts → logger-C_27pj9i.d.ts} +6 -7
- package/dist/{mcp-servers-T0O6UN_w.d.ts → mcp-servers-Dck3T85_.d.ts} +20 -20
- package/dist/{mode-BO4SEUIv.d.ts → mode-CHo2XtHs.d.ts} +4 -4
- package/dist/models/index.d.ts +10 -10
- package/dist/models/index.js +8 -2
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-BcYJDKLm.d.ts → models-registry-Be3osGt5.d.ts} +28 -28
- package/dist/{models-registry-Cuq1C8V9.d.ts → models-registry-Boz639EI.d.ts} +12 -12
- package/dist/{multi-agent-coordinator-DpbG3wiy.d.ts → multi-agent-coordinator-DllpCVkF.d.ts} +12 -12
- package/dist/{null-fleet-bus-u5ys3lW_.d.ts → null-fleet-bus-BY0AN-sr.d.ts} +121 -121
- package/dist/observability/index.d.ts +41 -41
- package/dist/observability/index.js.map +1 -1
- package/dist/{observability-BhnVLBLS.d.ts → observability-CoSNZdhX.d.ts} +4 -4
- package/dist/{parallel-eternal-engine-Dn0P8Pbj.d.ts → parallel-eternal-engine-D402RASp.d.ts} +49 -49
- package/dist/{path-resolver-B32v2JIq.d.ts → path-resolver-UPFTsDyD.d.ts} +6 -6
- package/dist/{permission-V5BLOrY6.d.ts → permission-14CChMmO.d.ts} +10 -8
- package/dist/{permission-policy-CBVx-d-8.d.ts → permission-policy-gW5htOo1.d.ts} +7 -7
- package/dist/{plan-templates-BcUwLlMQ.d.ts → plan-templates-DRvPgkfZ.d.ts} +65 -32
- package/dist/{provider-runner-CSi_7l0h.d.ts → provider-runner-COAJM8tC.d.ts} +6 -6
- package/dist/{retry-policy-CG3qvH_e.d.ts → retry-policy-DSu6O6rD.d.ts} +4 -4
- package/dist/sdd/index.d.ts +47 -47
- package/dist/sdd/index.js +47 -22
- package/dist/sdd/index.js.map +1 -1
- package/dist/security/index.d.ts +6 -6
- package/dist/security/index.js +7 -1
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-RvBR_YRW.d.ts → selector-11-fm95U.d.ts} +2 -2
- package/dist/{session-event-bridge-CDHxcmQU.d.ts → session-event-bridge-D0u-x576.d.ts} +7 -7
- package/dist/{session-reader-BIpwM60D.d.ts → session-reader-BQU-toaN.d.ts} +23 -23
- package/dist/{skill-CxuWrsKK.d.ts → skill-BJeF2DwY.d.ts} +1 -1
- package/dist/skills/index.d.ts +9 -9
- package/dist/skills/index.js +15 -3
- package/dist/skills/index.js.map +1 -1
- package/dist/storage/index.d.ts +15 -15
- package/dist/storage/index.js +378 -76
- package/dist/storage/index.js.map +1 -1
- package/dist/{system-prompt-CA11g6Jo.d.ts → system-prompt-C0rLCeyn.d.ts} +16 -11
- package/dist/{task-graph-D1YQbpxF.d.ts → task-graph-CikNdRTG.d.ts} +22 -22
- package/dist/types/index.d.ts +25 -25
- package/dist/types/index.js +45 -10
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +46 -45
- package/dist/utils/index.js +53 -12
- package/dist/utils/index.js.map +1 -1
- package/dist/{wstack-paths-D7evAFWM.d.ts → wstack-paths-BQMvEllz.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/logger-DDd5C--Z.d.ts +0 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as HookEvent, n as HookMatcher, I as InProcessHook, u as ShellHook, H as HookEntry } from './config-
|
|
2
|
-
import { T as TextBlock, c as ContentBlock, Q as Tool } from './context-
|
|
1
|
+
import { l as HookEvent, n as HookMatcher, I as InProcessHook, u as ShellHook, H as HookEntry } from './config-_DZ7dN-T.js';
|
|
2
|
+
import { T as TextBlock, c as ContentBlock, Q as Tool } from './context-ToHAp4-U.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Container — dependency injection with explicit bind / override / decorate.
|
|
@@ -15,8 +15,8 @@ type Token<T> = symbol & {
|
|
|
15
15
|
type Factory<T> = (c: Container) => T;
|
|
16
16
|
type Decorator<T> = (inner: T, c: Container) => T;
|
|
17
17
|
interface BindOptions {
|
|
18
|
-
singleton?: boolean;
|
|
19
|
-
owner?: string;
|
|
18
|
+
singleton?: boolean | undefined;
|
|
19
|
+
owner?: string | undefined;
|
|
20
20
|
}
|
|
21
21
|
declare class Container {
|
|
22
22
|
private readonly entries;
|
|
@@ -43,6 +43,11 @@ declare class Container {
|
|
|
43
43
|
*/
|
|
44
44
|
private describeCycle;
|
|
45
45
|
has<T>(token: Token<T>): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Resolve a token if it is bound, otherwise return undefined.
|
|
48
|
+
* Unlike resolve(), this does not throw if the token is unbound.
|
|
49
|
+
*/
|
|
50
|
+
safeResolve<T>(token: Token<T>): T | undefined;
|
|
46
51
|
ownerOf<T>(token: Token<T>): string | undefined;
|
|
47
52
|
/**
|
|
48
53
|
* Remove a token's binding (along with any decorators stacked on it).
|
|
@@ -93,18 +98,18 @@ type MiddlewareHandler<T> = (value: T, next: NextFn<T>) => Promise<T>;
|
|
|
93
98
|
type PipelineErrorPolicy = 'rethrow' | 'swallow';
|
|
94
99
|
interface PipelineErrorEvent {
|
|
95
100
|
middleware: string;
|
|
96
|
-
owner?: string;
|
|
101
|
+
owner?: string | undefined;
|
|
97
102
|
err: unknown;
|
|
98
103
|
}
|
|
99
104
|
type PipelineErrorHandler = (ev: PipelineErrorEvent) => PipelineErrorPolicy | Promise<PipelineErrorPolicy>;
|
|
100
105
|
interface Middleware<T> {
|
|
101
106
|
name: string;
|
|
102
107
|
handler: MiddlewareHandler<T>;
|
|
103
|
-
owner?: string;
|
|
108
|
+
owner?: string | undefined;
|
|
104
109
|
}
|
|
105
110
|
interface PipelineOptions {
|
|
106
111
|
/** When true and the target middleware is not found, operations silently no-op instead of throwing. */
|
|
107
|
-
optional?: boolean;
|
|
112
|
+
optional?: boolean | undefined;
|
|
108
113
|
}
|
|
109
114
|
/**
|
|
110
115
|
* Read-only view of a pipeline. Returned to consumers (plugins, hooks)
|
|
@@ -170,7 +175,7 @@ declare class Pipeline<T> {
|
|
|
170
175
|
declare class HookRegistry {
|
|
171
176
|
private readonly entries;
|
|
172
177
|
/** Register an in-process hook. Returns an unsubscribe function. */
|
|
173
|
-
registerInProcess(event: HookEvent, matcher: HookMatcher | undefined, hook: InProcessHook, owner?: string): () => void;
|
|
178
|
+
registerInProcess(event: HookEvent, matcher: HookMatcher | undefined, hook: InProcessHook, owner?: string | undefined): () => void;
|
|
174
179
|
/** Register a single shell hook. Returns an unsubscribe function. */
|
|
175
180
|
registerShell(event: HookEvent, hook: ShellHook): () => void;
|
|
176
181
|
/** Bulk-load shell hooks from a `config.hooks` map. */
|
|
@@ -215,9 +220,9 @@ interface BuildContext {
|
|
|
215
220
|
projectRoot: string;
|
|
216
221
|
tools: Tool[];
|
|
217
222
|
/** Provider id (e.g. "anthropic", "minimax-coding-plan"). */
|
|
218
|
-
provider?: string;
|
|
223
|
+
provider?: string | undefined;
|
|
219
224
|
/** Model id (e.g. "claude-sonnet-4-6", "MiniMax-M2.7"). */
|
|
220
|
-
model?: string;
|
|
225
|
+
model?: string | undefined;
|
|
221
226
|
/**
|
|
222
227
|
* True when the prompt is being built for a SUBAGENT, not the host
|
|
223
228
|
* agent. Subagents are scoped to a single task — they should NOT see
|
|
@@ -225,7 +230,7 @@ interface BuildContext {
|
|
|
225
230
|
* turns, not steering individual subtasks). The plan-injection
|
|
226
231
|
* layer short-circuits when this flag is set.
|
|
227
232
|
*/
|
|
228
|
-
subagent?: boolean;
|
|
233
|
+
subagent?: boolean | undefined;
|
|
229
234
|
}
|
|
230
235
|
interface SystemPromptBuilder {
|
|
231
236
|
build(ctx: BuildContext): Promise<TextBlock[]>;
|
|
@@ -5,7 +5,7 @@ interface SpecSection {
|
|
|
5
5
|
title: string;
|
|
6
6
|
content: string;
|
|
7
7
|
level: number;
|
|
8
|
-
children?: SpecSection[];
|
|
8
|
+
children?: SpecSection[] | undefined;
|
|
9
9
|
}
|
|
10
10
|
interface SpecRequirement {
|
|
11
11
|
id: string;
|
|
@@ -13,8 +13,8 @@ interface SpecRequirement {
|
|
|
13
13
|
priority: 'critical' | 'high' | 'medium' | 'low';
|
|
14
14
|
description: string;
|
|
15
15
|
acceptanceCriteria: string[];
|
|
16
|
-
blockedBy?: string[];
|
|
17
|
-
implements?: string[];
|
|
16
|
+
blockedBy?: string[] | undefined;
|
|
17
|
+
implements?: string[] | undefined;
|
|
18
18
|
}
|
|
19
19
|
interface SpecApiEndpoint {
|
|
20
20
|
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
@@ -22,7 +22,7 @@ interface SpecApiEndpoint {
|
|
|
22
22
|
description: string;
|
|
23
23
|
request?: Record<string, unknown>;
|
|
24
24
|
response?: Record<string, unknown>;
|
|
25
|
-
auth?: boolean;
|
|
25
|
+
auth?: boolean | undefined;
|
|
26
26
|
}
|
|
27
27
|
interface Specification {
|
|
28
28
|
id: string;
|
|
@@ -32,8 +32,8 @@ interface Specification {
|
|
|
32
32
|
overview: string;
|
|
33
33
|
sections: SpecSection[];
|
|
34
34
|
requirements: SpecRequirement[];
|
|
35
|
-
apiEndpoints?: SpecApiEndpoint[];
|
|
36
|
-
dependencies?: string[];
|
|
35
|
+
apiEndpoints?: SpecApiEndpoint[] | undefined;
|
|
36
|
+
dependencies?: string[] | undefined;
|
|
37
37
|
createdAt: number;
|
|
38
38
|
updatedAt: number;
|
|
39
39
|
metadata?: Record<string, unknown>;
|
|
@@ -85,17 +85,17 @@ interface TaskNode {
|
|
|
85
85
|
type: TaskType;
|
|
86
86
|
priority: TaskPriority;
|
|
87
87
|
status: TaskStatus;
|
|
88
|
-
assignee?: string;
|
|
89
|
-
estimateHours?: number;
|
|
90
|
-
actualHours?: number;
|
|
91
|
-
tags?: string[];
|
|
92
|
-
specRequirementId?: string;
|
|
93
|
-
parentId?: string;
|
|
94
|
-
children?: string[];
|
|
88
|
+
assignee?: string | undefined;
|
|
89
|
+
estimateHours?: number | undefined;
|
|
90
|
+
actualHours?: number | undefined;
|
|
91
|
+
tags?: string[] | undefined;
|
|
92
|
+
specRequirementId?: string | undefined;
|
|
93
|
+
parentId?: string | undefined;
|
|
94
|
+
children?: string[] | undefined;
|
|
95
95
|
createdAt: number;
|
|
96
96
|
updatedAt: number;
|
|
97
|
-
startedAt?: number;
|
|
98
|
-
completedAt?: number;
|
|
97
|
+
startedAt?: number | undefined;
|
|
98
|
+
completedAt?: number | undefined;
|
|
99
99
|
metadata?: Record<string, unknown>;
|
|
100
100
|
}
|
|
101
101
|
interface TaskEdge {
|
|
@@ -103,7 +103,7 @@ interface TaskEdge {
|
|
|
103
103
|
from: string;
|
|
104
104
|
to: string;
|
|
105
105
|
type: 'blocks' | 'depends_on' | 'relates_to' | 'implements';
|
|
106
|
-
weight?: number;
|
|
106
|
+
weight?: number | undefined;
|
|
107
107
|
}
|
|
108
108
|
interface TaskGraph {
|
|
109
109
|
id: string;
|
|
@@ -138,12 +138,12 @@ interface TaskProgress {
|
|
|
138
138
|
actualHours: number;
|
|
139
139
|
}
|
|
140
140
|
interface TaskFilter {
|
|
141
|
-
status?: TaskStatus[];
|
|
142
|
-
priority?: TaskPriority[];
|
|
143
|
-
type?: TaskType[];
|
|
144
|
-
assignee?: string[];
|
|
145
|
-
tags?: string[];
|
|
146
|
-
specRequirementId?: string;
|
|
141
|
+
status?: TaskStatus[] | undefined;
|
|
142
|
+
priority?: TaskPriority[] | undefined;
|
|
143
|
+
type?: TaskType[] | undefined;
|
|
144
|
+
assignee?: string[] | undefined;
|
|
145
|
+
tags?: string[] | undefined;
|
|
146
|
+
specRequirementId?: string | undefined;
|
|
147
147
|
}
|
|
148
148
|
interface TaskSort {
|
|
149
149
|
field: 'priority' | 'createdAt' | 'updatedAt' | 'status';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
export { A as AgentError, a as Capabilities, b as ConfigError, c as ContentBlock, E as ERROR_CODES, g as ErrorCode, h as ErrorSeverity, i as ErrorSubsystem, F as FileSnapshot, j as FsError, I as ImageBlock, J as JSONSchema, M as Message, k as MessageRole, P as Permission, l as PluginError, m as Provider, n as ProviderError, o as ProviderErrorBody, p as Request, q as Response, r as ResumedSession, s as RiskTier, S as SessionData, v as SessionError, w as SessionEvent, x as SessionMetadata, y as SessionStore, z as SessionSummary, B as SessionWriter, H as StopReason, K as StreamEvent, T as TextBlock, L as ThinkingBlock, Q as Tool, U as ToolCallContext, V as ToolError, W as ToolFinalEvent, X as ToolProgressEvent, Y as ToolResultBlock, Z as ToolStreamEvent, _ as ToolUseBlock, $ as Usage, a0 as WrongStackError, a1 as asBlocks, a2 as asText, a4 as isAgentError, a5 as isConfigError, a6 as isFsError, a7 as isImageBlock, a8 as isPluginError, a9 as isSessionError, aa as isTextBlock, ab as isThinkingBlock, ac as isToolError, ad as isToolResultBlock, ae as isToolUseBlock, af as isWrongStackError, ag as toWrongStackError } from '../context-
|
|
2
|
-
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-
|
|
3
|
-
export { A as AutonomyConfig, C as CONTEXT_WINDOW_MODES, a as Config, b as ConfigLoader, c as ConfigStore, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, k as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, H as HookEntry, l as HookEvent, m as HookInput, n as HookMatcher, o as HookOutcome, I as InProcessHook, p as IndexingConfig, L as LaunchConfig, q as LogConfig, M as MCPServerConfig, r as ModelMatrixEntry, P as PluginConfig, s as ProviderApiKey, t as ProviderConfig, S as SessionLoggingConfig, u as ShellHook, v as SyncCategory, w as SyncConfig, T as ToolsConfig, x as formatContextWindowModeList, y as getContextWindowMode, z as isContextWindowModeId, B as listContextWindowModes, E as resolveContextWindowPolicy } from '../config-
|
|
4
|
-
export { C as CompactReport, a as Compactor } from '../compactor-
|
|
5
|
-
export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from '../permission-
|
|
1
|
+
export { A as AgentError, a as Capabilities, b as ConfigError, c as ContentBlock, E as ERROR_CODES, g as ErrorCode, h as ErrorSeverity, i as ErrorSubsystem, F as FileSnapshot, j as FsError, I as ImageBlock, J as JSONSchema, M as Message, k as MessageRole, P as Permission, l as PluginError, m as Provider, n as ProviderError, o as ProviderErrorBody, p as Request, q as Response, r as ResumedSession, s as RiskTier, S as SessionData, v as SessionError, w as SessionEvent, x as SessionMetadata, y as SessionStore, z as SessionSummary, B as SessionWriter, H as StopReason, K as StreamEvent, T as TextBlock, L as ThinkingBlock, Q as Tool, U as ToolCallContext, V as ToolError, W as ToolFinalEvent, X as ToolProgressEvent, Y as ToolResultBlock, Z as ToolStreamEvent, _ as ToolUseBlock, $ as Usage, a0 as WrongStackError, a1 as asBlocks, a2 as asText, a4 as isAgentError, a5 as isConfigError, a6 as isFsError, a7 as isImageBlock, a8 as isPluginError, a9 as isSessionError, aa as isTextBlock, ab as isThinkingBlock, ac as isToolError, ad as isToolResultBlock, ae as isToolUseBlock, af as isWrongStackError, ag as toWrongStackError } from '../context-ToHAp4-U.js';
|
|
2
|
+
export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-COAJM8tC.js';
|
|
3
|
+
export { A as AutonomyConfig, C as CONTEXT_WINDOW_MODES, a as Config, b as ConfigLoader, c as ConfigStore, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, k as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, H as HookEntry, l as HookEvent, m as HookInput, n as HookMatcher, o as HookOutcome, I as InProcessHook, p as IndexingConfig, L as LaunchConfig, q as LogConfig, M as MCPServerConfig, r as ModelMatrixEntry, P as PluginConfig, s as ProviderApiKey, t as ProviderConfig, S as SessionLoggingConfig, u as ShellHook, v as SyncCategory, w as SyncConfig, T as ToolsConfig, x as formatContextWindowModeList, y as getContextWindowMode, z as isContextWindowModeId, B as listContextWindowModes, E as resolveContextWindowPolicy } from '../config-_DZ7dN-T.js';
|
|
4
|
+
export { C as CompactReport, a as Compactor } from '../compactor-CJq7LQev.js';
|
|
5
|
+
export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from '../permission-14CChMmO.js';
|
|
6
6
|
export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as SessionRewinder } from '../session-rewinder-C9HnMkhP.js';
|
|
7
|
-
export { A as AddAttachmentInput, a as Attachment, b as AttachmentKind, c as AttachmentMeta, d as AttachmentRef, e as AttachmentStore, D as DefaultSessionReader } from '../session-reader-
|
|
7
|
+
export { A as AddAttachmentInput, a as Attachment, b as AttachmentKind, c as AttachmentMeta, d as AttachmentRef, e as AttachmentStore, D as DefaultSessionReader } from '../session-reader-BQU-toaN.js';
|
|
8
8
|
export { D as DEFAULT_AUTONOMY_CONFIG, a as DEFAULT_CONTEXT_CONFIG, b as DEFAULT_SESSION_LOGGING_CONFIG, c as DEFAULT_TOOLS_CONFIG } from '../default-config-DEXI4jsl.js';
|
|
9
9
|
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from '../secret-scrubber-7rSC_emZ.js';
|
|
10
|
-
export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-
|
|
11
|
-
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-
|
|
10
|
+
export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-C_27pj9i.js';
|
|
11
|
+
export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-UPFTsDyD.js';
|
|
12
12
|
export { M as MemoryEntry, a as MemoryScope, b as MemoryStore } from '../memory-CEXuo7sz.js';
|
|
13
|
-
import { I as IterationStage, g as ParallelIterationStage } from '../parallel-eternal-engine-
|
|
14
|
-
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from '../parallel-eternal-engine-
|
|
15
|
-
export { S as SkillEntry, a as SkillLoader, b as SkillManifest } from '../skill-
|
|
16
|
-
export { a as BuildContext, c as ModelCapabilities, e as Renderer, S as SystemPromptBuilder } from '../system-prompt-
|
|
13
|
+
import { I as IterationStage, g as ParallelIterationStage } from '../parallel-eternal-engine-D402RASp.js';
|
|
14
|
+
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from '../parallel-eternal-engine-D402RASp.js';
|
|
15
|
+
export { S as SkillEntry, a as SkillLoader, b as SkillManifest } from '../skill-BJeF2DwY.js';
|
|
16
|
+
export { a as BuildContext, c as ModelCapabilities, e as Renderer, S as SystemPromptBuilder } from '../system-prompt-C0rLCeyn.js';
|
|
17
17
|
export { I as InputReader, P as PromptOption } from '../input-reader-E-ffP2ee.js';
|
|
18
|
-
export { C as CoordinatorEvents, o as CoordinatorStatus, D as DoneCondition, M as MCPRegistryView, t as MetricsSinkView, u as MultiAgentConfig, v as MultiAgentCoordinator, P as Plugin, w as PluginAPI, x as PluginCapabilities, y as PluginDependency, z as PluginPipelines, E as ProviderFactory, G as ProviderRegistryView, S as SessionWriterView, H as SlashCommand, I as SlashCommandRegistryView, J as SpawnResult, L as SubagentConfig, N as SubagentContext, O as SubagentError, Q as SubagentErrorKind, R as SubagentRunContext, T as SubagentRunOutcome, U as SubagentRunner, W as TaskDelegation, X as TaskResult, Y as TaskSpec, Z as ToolRegistryView } from '../agent-subagent-runner-
|
|
19
|
-
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-
|
|
20
|
-
export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest, c as ModeStore } from '../mode-
|
|
21
|
-
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-
|
|
22
|
-
export { C as CriticalPathResult, D as DEFAULT_SPEC_TEMPLATE, S as SpecAnalysis, a as SpecApiEndpoint, b as SpecRequirement, c as SpecSection, d as SpecSectionType, e as SpecStatus, f as SpecTemplate, g as SpecValidationResult, h as Specification, T as TaskAssignment, i as TaskDependency, j as TaskEdge, k as TaskFilter, l as TaskGraph, m as TaskNode, n as TaskPriority, o as TaskProgress, p as TaskSort, q as TaskStatus, r as TaskType, s as computeTaskProgress, t as findCriticalPath, u as topologicalSort } from '../task-graph-
|
|
23
|
-
export { A as AggregateHealth, H as HealthCheck, a as HealthCheckResult, b as HealthRegistry, c as HealthStatus, M as MetricLabels, d as MetricSeries, e as MetricsSink, f as MetricsSnapshot, S as Span, T as Tracer } from '../observability-
|
|
24
|
-
export { S as SystemPromptContributor } from '../index-
|
|
25
|
-
import '../events-
|
|
26
|
-
import '../logger-
|
|
27
|
-
import '../retry-policy-
|
|
28
|
-
import '../models-registry-
|
|
18
|
+
export { C as CoordinatorEvents, o as CoordinatorStatus, D as DoneCondition, M as MCPRegistryView, t as MetricsSinkView, u as MultiAgentConfig, v as MultiAgentCoordinator, P as Plugin, w as PluginAPI, x as PluginCapabilities, y as PluginDependency, z as PluginPipelines, E as ProviderFactory, G as ProviderRegistryView, S as SessionWriterView, H as SlashCommand, I as SlashCommandRegistryView, J as SpawnResult, L as SubagentConfig, N as SubagentContext, O as SubagentError, Q as SubagentErrorKind, R as SubagentRunContext, T as SubagentRunOutcome, U as SubagentRunner, W as TaskDelegation, X as TaskResult, Y as TaskSpec, Z as ToolRegistryView } from '../agent-subagent-runner-2Aq0jOSj.js';
|
|
19
|
+
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-Boz639EI.js';
|
|
20
|
+
export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest, c as ModeStore } from '../mode-CHo2XtHs.js';
|
|
21
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-C9P_HPez.js';
|
|
22
|
+
export { C as CriticalPathResult, D as DEFAULT_SPEC_TEMPLATE, S as SpecAnalysis, a as SpecApiEndpoint, b as SpecRequirement, c as SpecSection, d as SpecSectionType, e as SpecStatus, f as SpecTemplate, g as SpecValidationResult, h as Specification, T as TaskAssignment, i as TaskDependency, j as TaskEdge, k as TaskFilter, l as TaskGraph, m as TaskNode, n as TaskPriority, o as TaskProgress, p as TaskSort, q as TaskStatus, r as TaskType, s as computeTaskProgress, t as findCriticalPath, u as topologicalSort } from '../task-graph-CikNdRTG.js';
|
|
23
|
+
export { A as AggregateHealth, H as HealthCheck, a as HealthCheckResult, b as HealthRegistry, c as HealthStatus, M as MetricLabels, d as MetricSeries, e as MetricsSink, f as MetricsSnapshot, S as Span, T as Tracer } from '../observability-CoSNZdhX.js';
|
|
24
|
+
export { S as SystemPromptContributor } from '../index-N0_c4bHQ.js';
|
|
25
|
+
import '../events-DnRqXaZ3.js';
|
|
26
|
+
import '../logger-B72yyPc6.js';
|
|
27
|
+
import '../retry-policy-DSu6O6rD.js';
|
|
28
|
+
import '../models-registry-Be3osGt5.js';
|
|
29
29
|
import '../secret-vault-DoISxaKO.js';
|
|
30
30
|
import '../secret-scrubber-3MHDDAtm.js';
|
|
31
31
|
import '../path-resolver-CPRj4bFY.js';
|
|
32
|
-
import '../goal-store-
|
|
33
|
-
import '../multi-agent-coordinator-
|
|
32
|
+
import '../goal-store-DvWLNu52.js';
|
|
33
|
+
import '../multi-agent-coordinator-DllpCVkF.js';
|
|
34
34
|
import 'node:events';
|
|
35
35
|
|
|
36
36
|
/** Union of serial and parallel autonomy engine stage types (from EternalAutonomyEngine / ParallelEternalEngine). */
|
package/dist/types/index.js
CHANGED
|
@@ -606,8 +606,10 @@ function isStdoutTTY() {
|
|
|
606
606
|
}
|
|
607
607
|
function writeTo(s, stream) {
|
|
608
608
|
if (!stream || typeof stream.write !== "function") return false;
|
|
609
|
-
|
|
610
|
-
|
|
609
|
+
{
|
|
610
|
+
stream.write(s);
|
|
611
|
+
return true;
|
|
612
|
+
}
|
|
611
613
|
}
|
|
612
614
|
function writeErr(s, stream = process.stderr) {
|
|
613
615
|
return writeTo(s, stream);
|
|
@@ -771,7 +773,7 @@ var DefaultTokenCounter = class {
|
|
|
771
773
|
} else if (this.registry && this.providerId && model) {
|
|
772
774
|
if (this.priceCache.size >= PRICE_CACHE_MAX_SIZE) {
|
|
773
775
|
const keys = [...this.priceCache.keys()];
|
|
774
|
-
this.priceCache.delete(keys[0]);
|
|
776
|
+
this.priceCache.delete(keys[0] ?? "");
|
|
775
777
|
}
|
|
776
778
|
void this.registry.getModel(this.providerId, model).then((m) => {
|
|
777
779
|
if (m) {
|
|
@@ -796,7 +798,7 @@ var DefaultTokenCounter = class {
|
|
|
796
798
|
const price = priceFromModel(resolved);
|
|
797
799
|
if (this.priceCache.size >= PRICE_CACHE_MAX_SIZE) {
|
|
798
800
|
const keys = [...this.priceCache.keys()];
|
|
799
|
-
this.priceCache.delete(keys[0]);
|
|
801
|
+
this.priceCache.delete(keys[0] ?? "");
|
|
800
802
|
}
|
|
801
803
|
this.priceCache.set(resolved.modelId, price);
|
|
802
804
|
this.applyPrice(usage, price);
|
|
@@ -864,6 +866,12 @@ function round4(n) {
|
|
|
864
866
|
}
|
|
865
867
|
|
|
866
868
|
// src/utils/token-estimate.ts
|
|
869
|
+
function expectDefined(value) {
|
|
870
|
+
if (value === null || value === void 0) {
|
|
871
|
+
throw new Error("Expected value to be defined");
|
|
872
|
+
}
|
|
873
|
+
return value;
|
|
874
|
+
}
|
|
867
875
|
var RoughTokenEstimate = (text, charsPerToken = 3.5) => Math.max(1, Math.ceil(text.length / charsPerToken));
|
|
868
876
|
var ESTIMATE_CACHE = /* @__PURE__ */ new Map();
|
|
869
877
|
var ESTIMATE_CACHE_MAX_SIZE = 1e4;
|
|
@@ -873,7 +881,7 @@ function getCachedEstimate(key, compute) {
|
|
|
873
881
|
if (ESTIMATE_CACHE.size >= ESTIMATE_CACHE_MAX_SIZE) {
|
|
874
882
|
const keys = [...ESTIMATE_CACHE.keys()];
|
|
875
883
|
for (let i = 0; i < Math.floor(ESTIMATE_CACHE_MAX_SIZE / 4); i++) {
|
|
876
|
-
ESTIMATE_CACHE.delete(keys[i]);
|
|
884
|
+
ESTIMATE_CACHE.delete(expectDefined(keys[i]));
|
|
877
885
|
}
|
|
878
886
|
}
|
|
879
887
|
const estimate = compute();
|
|
@@ -947,6 +955,12 @@ function estimateRequestTokens(messages, systemPrompt, tools) {
|
|
|
947
955
|
}
|
|
948
956
|
|
|
949
957
|
// src/utils/message-invariants.ts
|
|
958
|
+
function expectDefined2(value) {
|
|
959
|
+
if (value === null || value === void 0) {
|
|
960
|
+
throw new Error("Expected value to be defined");
|
|
961
|
+
}
|
|
962
|
+
return value;
|
|
963
|
+
}
|
|
950
964
|
function repairToolUseAdjacency(messages) {
|
|
951
965
|
const removedToolUses = [];
|
|
952
966
|
const removedToolResults = [];
|
|
@@ -954,7 +968,7 @@ function repairToolUseAdjacency(messages) {
|
|
|
954
968
|
let changed = false;
|
|
955
969
|
const out = [];
|
|
956
970
|
for (let i = 0; i < messages.length; i++) {
|
|
957
|
-
const original = messages[i];
|
|
971
|
+
const original = expectDefined2(messages[i]);
|
|
958
972
|
let msg = original;
|
|
959
973
|
if (hasToolUse(msg)) {
|
|
960
974
|
const nextIds = toolResultIds(messages[i + 1]);
|
|
@@ -2109,6 +2123,12 @@ Remember: your job is to make the user a better developer, not just to complete
|
|
|
2109
2123
|
];
|
|
2110
2124
|
|
|
2111
2125
|
// src/types/context-window.ts
|
|
2126
|
+
function expectDefined3(value) {
|
|
2127
|
+
if (value === null || value === void 0) {
|
|
2128
|
+
throw new Error("Expected value to be defined");
|
|
2129
|
+
}
|
|
2130
|
+
return value;
|
|
2131
|
+
}
|
|
2112
2132
|
var DEFAULT_CONTEXT_WINDOW_MODE_ID = "balanced";
|
|
2113
2133
|
var CONTEXT_WINDOW_MODES = Object.freeze([
|
|
2114
2134
|
{
|
|
@@ -2165,7 +2185,7 @@ function isContextWindowModeId(id) {
|
|
|
2165
2185
|
}
|
|
2166
2186
|
function resolveContextWindowPolicy(config = {}, overrideMode) {
|
|
2167
2187
|
const requested = overrideMode ?? config.mode ?? DEFAULT_CONTEXT_WINDOW_MODE_ID;
|
|
2168
|
-
const mode = getContextWindowMode(requested) ?? getContextWindowMode(DEFAULT_CONTEXT_WINDOW_MODE_ID);
|
|
2188
|
+
const mode = getContextWindowMode(requested) ?? expectDefined3(getContextWindowMode(DEFAULT_CONTEXT_WINDOW_MODE_ID));
|
|
2169
2189
|
if (mode.id !== DEFAULT_CONTEXT_WINDOW_MODE_ID) {
|
|
2170
2190
|
return mode;
|
|
2171
2191
|
}
|
|
@@ -2216,7 +2236,7 @@ var InMemoryBridgeTransport = class {
|
|
|
2216
2236
|
}
|
|
2217
2237
|
subscribe(agentId, handler) {
|
|
2218
2238
|
if (!this.subs.has(agentId)) this.subs.set(agentId, /* @__PURE__ */ new Set());
|
|
2219
|
-
this.subs.get(agentId)
|
|
2239
|
+
this.subs.get(agentId)?.add(handler);
|
|
2220
2240
|
return () => this.subs.get(agentId)?.delete(handler);
|
|
2221
2241
|
}
|
|
2222
2242
|
close(agentId) {
|
|
@@ -2622,6 +2642,12 @@ function createToolOutputSerializer(opts = {}) {
|
|
|
2622
2642
|
}
|
|
2623
2643
|
|
|
2624
2644
|
// src/execution/tool-executor.ts
|
|
2645
|
+
function expectDefined4(value) {
|
|
2646
|
+
if (value === null || value === void 0) {
|
|
2647
|
+
throw new Error("Expected value to be defined");
|
|
2648
|
+
}
|
|
2649
|
+
return value;
|
|
2650
|
+
}
|
|
2625
2651
|
var ToolExecutor = class {
|
|
2626
2652
|
constructor(registry, opts) {
|
|
2627
2653
|
this.registry = registry;
|
|
@@ -2910,6 +2936,9 @@ ${post.additionalContext}` };
|
|
|
2910
2936
|
async runStreamedTool(tool, input, ctx, signal, toolUseId) {
|
|
2911
2937
|
let finalOutput;
|
|
2912
2938
|
let sawFinal = false;
|
|
2939
|
+
if (!tool.executeStream) {
|
|
2940
|
+
throw new Error(`Tool "${tool.name}" does not support streaming execution`);
|
|
2941
|
+
}
|
|
2913
2942
|
const stream = tool.executeStream(input, ctx, { signal });
|
|
2914
2943
|
for await (const ev of stream) {
|
|
2915
2944
|
if (ev.type === "final") {
|
|
@@ -3014,7 +3043,7 @@ function hasMalformedArguments(input) {
|
|
|
3014
3043
|
function extractMalformedRaw(input) {
|
|
3015
3044
|
if (!hasMalformedArguments(input)) return void 0;
|
|
3016
3045
|
const obj = input;
|
|
3017
|
-
const value = obj[Object.keys(obj)[0]];
|
|
3046
|
+
const value = obj[expectDefined4(Object.keys(obj)[0])];
|
|
3018
3047
|
if (value === void 0 || value === null) return void 0;
|
|
3019
3048
|
if (typeof value === "string") return value;
|
|
3020
3049
|
try {
|
|
@@ -3061,6 +3090,12 @@ function compileUserRegex(pattern, flags) {
|
|
|
3061
3090
|
}
|
|
3062
3091
|
|
|
3063
3092
|
// src/storage/session-reader.ts
|
|
3093
|
+
function expectDefined5(value) {
|
|
3094
|
+
if (value === null || value === void 0) {
|
|
3095
|
+
throw new Error("Expected value to be defined");
|
|
3096
|
+
}
|
|
3097
|
+
return value;
|
|
3098
|
+
}
|
|
3064
3099
|
var DefaultSessionReader = class {
|
|
3065
3100
|
store;
|
|
3066
3101
|
constructor(opts) {
|
|
@@ -3122,7 +3157,7 @@ var DefaultSessionReader = class {
|
|
|
3122
3157
|
continue;
|
|
3123
3158
|
}
|
|
3124
3159
|
for (let i = 0; i < data.events.length; i++) {
|
|
3125
|
-
const ev = data.events[i];
|
|
3160
|
+
const ev = expectDefined5(data.events[i]);
|
|
3126
3161
|
if (allowedTypes && !allowedTypes.has(ev.type)) continue;
|
|
3127
3162
|
const text = eventText(ev);
|
|
3128
3163
|
if (text === null) continue;
|