@wrongstack/core 0.87.0 → 0.89.3
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-C9P_HPez.d.ts → agent-bridge-DbVe1dHT.d.ts} +1 -1
- package/dist/{agent-subagent-runner-2Aq0jOSj.d.ts → agent-subagent-runner-C6eqID1t.d.ts} +477 -476
- package/dist/{events-DnRqXaZ3.d.ts → brain-s9DyD_Vf.d.ts} +185 -92
- package/dist/{compactor-CJq7LQev.d.ts → compactor-DXLxLcmU.d.ts} +2 -2
- package/dist/{config-_DZ7dN-T.d.ts → config-84VaZpH6.d.ts} +45 -38
- package/dist/{context-ToHAp4-U.d.ts → context-CNRYfhUv.d.ts} +1 -1
- package/dist/coordination/index.d.ts +16 -17
- package/dist/coordination/index.js +208 -93
- package/dist/coordination/index.js.map +1 -1
- package/dist/{default-config-DEXI4jsl.d.ts → default-config-CXsDvOmP.d.ts} +3 -1
- package/dist/defaults/index.d.ts +32 -34
- package/dist/defaults/index.js +744 -274
- package/dist/defaults/index.js.map +1 -1
- package/dist/{director-state-CgIc30qi.d.ts → director-state-BfeCUbmk.d.ts} +1 -1
- package/dist/execution/index.d.ts +18 -19
- package/dist/execution/index.js +79 -64
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +9 -10
- package/dist/extension/index.js +8 -6
- package/dist/extension/index.js.map +1 -1
- package/dist/{index-BNOLadHw.d.ts → index-CqrroYcU.d.ts} +13 -15
- package/dist/{index-N0_c4bHQ.d.ts → index-D3Nax3YU.d.ts} +11 -10
- package/dist/index.d.ts +191 -178
- package/dist/index.js +1419 -526
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +9 -9
- package/dist/infrastructure/index.js +16 -5
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +14 -16
- package/dist/kernel/index.js +17 -0
- package/dist/kernel/index.js.map +1 -1
- package/dist/{logger-B72yyPc6.d.ts → logger-B63L5bTg.d.ts} +1 -1
- package/dist/{logger-C_27pj9i.d.ts → logger-B9J5puGM.d.ts} +1 -1
- package/dist/{mcp-servers-Dck3T85_.d.ts → mcp-servers-D3E5ixAR.d.ts} +3 -3
- package/dist/{mode-CHo2XtHs.d.ts → mode-ARA3HrkY.d.ts} +1 -1
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js +8 -6
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-Be3osGt5.d.ts → models-registry-B6_KfS65.d.ts} +1 -1
- package/dist/{models-registry-Boz639EI.d.ts → models-registry-DU64QxQa.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-DllpCVkF.d.ts → multi-agent-coordinator-DHNrjPaA.d.ts} +2 -2
- package/dist/{null-fleet-bus-BY0AN-sr.d.ts → null-fleet-bus-BzzciAc4.d.ts} +39 -32
- package/dist/observability/index.d.ts +3 -3
- package/dist/{observability-CoSNZdhX.d.ts → observability-D-HZN_mF.d.ts} +1 -1
- package/dist/{parallel-eternal-engine-D402RASp.d.ts → parallel-eternal-engine-CTpcrb9O.d.ts} +34 -33
- package/dist/{path-resolver-UPFTsDyD.d.ts → path-resolver-B7hgMAVe.d.ts} +3 -3
- package/dist/{permission-14CChMmO.d.ts → permission-BDv7z0mk.d.ts} +7 -2
- package/dist/{permission-policy-gW5htOo1.d.ts → permission-policy-dF74EpDp.d.ts} +2 -2
- package/dist/{system-prompt-C0rLCeyn.d.ts → pipeline-C1Ad9OjI.d.ts} +73 -73
- package/dist/{plan-templates-DRvPgkfZ.d.ts → plan-templates-CNphsz0n.d.ts} +79 -11
- package/dist/{provider-runner-COAJM8tC.d.ts → provider-runner-cqvlB_oS.d.ts} +5 -5
- package/dist/{retry-policy-DSu6O6rD.d.ts → retry-policy-BcmuT_V0.d.ts} +2 -2
- package/dist/sdd/index.d.ts +12 -33
- package/dist/sdd/index.js +110 -50
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-scrubber-yGBFQYju.d.ts → secret-vault-DrOhc2i5.d.ts} +7 -7
- package/dist/security/index.d.ts +4 -5
- package/dist/security/index.js +22 -4
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-11-fm95U.d.ts → selector-C7wcdqMA.d.ts} +1 -1
- package/dist/{session-event-bridge-D0u-x576.d.ts → session-event-bridge-IVzs2GpE.d.ts} +1 -1
- package/dist/{session-reader-BQU-toaN.d.ts → session-reader-DDz1Ek4V.d.ts} +2 -2
- package/dist/{skill-BJeF2DwY.d.ts → skill-BJxzIyyN.d.ts} +1 -1
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.js +3 -9
- package/dist/skills/index.js.map +1 -1
- package/dist/storage/index.d.ts +134 -14
- package/dist/storage/index.js +982 -248
- package/dist/storage/index.js.map +1 -1
- package/dist/{task-graph-CikNdRTG.d.ts → task-graph-DJBqO0EY.d.ts} +1 -1
- package/dist/types/index.d.ts +26 -28
- package/dist/types/index.js +62 -37
- package/dist/types/index.js.map +1 -1
- package/dist/utils/expect-defined.d.ts +7 -0
- package/dist/utils/expect-defined.js +11 -0
- package/dist/utils/expect-defined.js.map +1 -0
- package/dist/utils/index.d.ts +11 -20
- package/dist/utils/index.js +61 -43
- package/dist/utils/index.js.map +1 -1
- package/dist/{wstack-paths-BQMvEllz.d.ts → wstack-paths-_lqjzErq.d.ts} +1 -1
- package/package.json +5 -1
- package/dist/memory-CEXuo7sz.d.ts +0 -16
- package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
package/dist/{parallel-eternal-engine-D402RASp.d.ts → parallel-eternal-engine-CTpcrb9O.d.ts}
RENAMED
|
@@ -1,34 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { e as ProviderError, C as Context, T as Tool, m as ToolUseBlock, n as ToolResultBlock } from './context-CNRYfhUv.js';
|
|
2
|
+
import { R as RetryPolicy, E as ErrorHandler, a as RecoveryDecision } from './retry-policy-BcmuT_V0.js';
|
|
3
|
+
import { C as Compactor, a as CompactReport } from './compactor-DXLxLcmU.js';
|
|
4
|
+
import { M as ModelsRegistry } from './models-registry-B6_KfS65.js';
|
|
5
|
+
import { T as ToolExecutorOptions, a as ToolExecutorStrategy, b as ToolBatchResult } from './index-D3Nax3YU.js';
|
|
6
|
+
import { g as Agent, h as AgentFactory } from './agent-subagent-runner-C6eqID1t.js';
|
|
7
7
|
import { J as JournalEntry } from './goal-store-DvWLNu52.js';
|
|
8
|
-
import {
|
|
8
|
+
import { D as DispatchClassifier, a as DefaultMultiAgentCoordinator } from './multi-agent-coordinator-DHNrjPaA.js';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare class HybridCompactor implements Compactor {
|
|
17
|
-
private readonly preserveK;
|
|
18
|
-
private readonly eliseThreshold;
|
|
19
|
-
private readonly estimator;
|
|
20
|
-
constructor(opts?: CompactorOptions);
|
|
21
|
-
compact(ctx: Context, opts?: {
|
|
22
|
-
aggressive?: boolean | undefined;
|
|
23
|
-
}): Promise<CompactReport>;
|
|
24
|
-
/**
|
|
25
|
-
* Estimate the full API request token count: messages + systemPrompt + toolDefs.
|
|
26
|
-
* This is the accurate figure for context-window pressure monitoring.
|
|
27
|
-
*/
|
|
28
|
-
private estimateFullRequest;
|
|
29
|
-
private eliseOldToolResults;
|
|
30
|
-
private collapseAncientTurns;
|
|
31
|
-
private estimateMessages;
|
|
10
|
+
declare class DefaultRetryPolicy implements RetryPolicy {
|
|
11
|
+
shouldRetry(err: Error | ProviderError, attempt: number): boolean;
|
|
12
|
+
maxAttempts(err: Error | ProviderError): number;
|
|
13
|
+
delayMs(attempt: number): number;
|
|
32
14
|
}
|
|
33
15
|
|
|
34
16
|
/**
|
|
@@ -62,10 +44,28 @@ declare class DefaultErrorHandler implements ErrorHandler {
|
|
|
62
44
|
recover(err: unknown, ctx: Context): Promise<RecoveryDecision | null>;
|
|
63
45
|
}
|
|
64
46
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
47
|
+
interface CompactorOptions {
|
|
48
|
+
preserveK?: number | undefined;
|
|
49
|
+
eliseThreshold?: number | undefined;
|
|
50
|
+
estimator?: (((text: string) => number)) | undefined;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare class HybridCompactor implements Compactor {
|
|
54
|
+
private readonly preserveK;
|
|
55
|
+
private readonly eliseThreshold;
|
|
56
|
+
private readonly estimator;
|
|
57
|
+
constructor(opts?: CompactorOptions);
|
|
58
|
+
compact(ctx: Context, opts?: {
|
|
59
|
+
aggressive?: boolean | undefined;
|
|
60
|
+
}): Promise<CompactReport>;
|
|
61
|
+
/**
|
|
62
|
+
* Estimate the full API request token count: messages + systemPrompt + toolDefs.
|
|
63
|
+
* This is the accurate figure for context-window pressure monitoring.
|
|
64
|
+
*/
|
|
65
|
+
private estimateFullRequest;
|
|
66
|
+
private eliseOldToolResults;
|
|
67
|
+
private collapseAncientTurns;
|
|
68
|
+
private estimateMessages;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
declare class ToolExecutor {
|
|
@@ -73,6 +73,7 @@ declare class ToolExecutor {
|
|
|
73
73
|
private opts;
|
|
74
74
|
private readonly serializer;
|
|
75
75
|
private readonly iterationTimeoutMs;
|
|
76
|
+
private readonly maxToolTimeoutMs;
|
|
76
77
|
constructor(registry: {
|
|
77
78
|
get(name: string): Tool | undefined;
|
|
78
79
|
list(): Tool[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as EventBus } from './
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { E as EventBus } from './brain-s9DyD_Vf.js';
|
|
2
|
+
import { M as ModelsRegistry, b as ResolvedModel } from './models-registry-B6_KfS65.js';
|
|
3
|
+
import { c as TokenCounter, U as Usage, d as CacheStats } from './context-CNRYfhUv.js';
|
|
4
4
|
import { P as PathResolver } from './path-resolver-CPRj4bFY.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as Tool, C as Context, f as Permission } from './context-CNRYfhUv.js';
|
|
2
|
+
|
|
3
|
+
interface SecretScrubber {
|
|
4
|
+
scrub(text: string): string;
|
|
5
|
+
scrubObject<T>(obj: T): T;
|
|
6
|
+
}
|
|
2
7
|
|
|
3
8
|
interface TrustPolicy {
|
|
4
9
|
[toolNameOrPattern: string]: {
|
|
@@ -62,4 +67,4 @@ interface PermissionPolicy {
|
|
|
62
67
|
setPromptDelegate?(delegate: ((tool: Tool, input: unknown, suggestedPattern: string) => Promise<'yes' | 'no' | 'always' | 'deny'>) | undefined): void;
|
|
63
68
|
}
|
|
64
69
|
|
|
65
|
-
export type {
|
|
70
|
+
export type { PermissionPolicy as P, SecretScrubber as S, TrustPolicy as T, PermissionDecision as a };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as Tool, C as Context } from './context-CNRYfhUv.js';
|
|
2
2
|
import { I as InputReader } from './input-reader-E-ffP2ee.js';
|
|
3
|
-
import {
|
|
3
|
+
import { P as PermissionPolicy, a as PermissionDecision } from './permission-BDv7z0mk.js';
|
|
4
4
|
|
|
5
5
|
interface PermissionPolicyOptions {
|
|
6
6
|
trustFile: string;
|
|
@@ -1,5 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { T as Tool, l as TextBlock, g as ContentBlock } from './context-CNRYfhUv.js';
|
|
2
|
+
import { H as HookEvent, a as HookMatcher, I as InProcessHook, S as ShellHook, b as HookEntry } from './config-84VaZpH6.js';
|
|
3
|
+
|
|
4
|
+
/** Model capabilities relevant to prompt composition. */
|
|
5
|
+
interface ModelCapabilities {
|
|
6
|
+
maxContextTokens: number;
|
|
7
|
+
supportsTools: boolean;
|
|
8
|
+
supportsVision: boolean;
|
|
9
|
+
supportsReasoning: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface BuildContext {
|
|
12
|
+
cwd: string;
|
|
13
|
+
projectRoot: string;
|
|
14
|
+
tools: Tool[];
|
|
15
|
+
/** Provider id (e.g. "anthropic", "minimax-coding-plan"). */
|
|
16
|
+
provider?: string | undefined;
|
|
17
|
+
/** Model id (e.g. "claude-sonnet-4-6", "MiniMax-M2.7"). */
|
|
18
|
+
model?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* True when the prompt is being built for a SUBAGENT, not the host
|
|
21
|
+
* agent. Subagents are scoped to a single task — they should NOT see
|
|
22
|
+
* the host's strategic plan board (which is anchoring the host across
|
|
23
|
+
* turns, not steering individual subtasks). The plan-injection
|
|
24
|
+
* layer short-circuits when this flag is set.
|
|
25
|
+
*/
|
|
26
|
+
subagent?: boolean | undefined;
|
|
27
|
+
}
|
|
28
|
+
interface SystemPromptBuilder {
|
|
29
|
+
build(ctx: BuildContext): Promise<TextBlock[]>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Registry of lifecycle hooks (both in-process and shell). One instance is
|
|
34
|
+
* shared per session: the boot path loads `config.hooks` as shell entries and
|
|
35
|
+
* plugins add in-process entries via `PluginAPI.registerHook`. The
|
|
36
|
+
* `HookRunner` reads from it at each lifecycle phase.
|
|
37
|
+
*/
|
|
38
|
+
declare class HookRegistry {
|
|
39
|
+
private readonly entries;
|
|
40
|
+
/** Register an in-process hook. Returns an unsubscribe function. */
|
|
41
|
+
registerInProcess(event: HookEvent, matcher: HookMatcher | undefined, hook: InProcessHook, owner?: string | undefined): () => void;
|
|
42
|
+
/** Register a single shell hook. Returns an unsubscribe function. */
|
|
43
|
+
registerShell(event: HookEvent, hook: ShellHook): () => void;
|
|
44
|
+
/** Bulk-load shell hooks from a `config.hooks` map. */
|
|
45
|
+
loadShellHooks(hooks: Partial<Record<HookEvent, ShellHook[]>> | undefined): void;
|
|
46
|
+
/** All entries registered for an event, in registration order. */
|
|
47
|
+
list(event: HookEvent): readonly HookEntry[];
|
|
48
|
+
/** True when any entry is registered for the event. */
|
|
49
|
+
has(event: HookEvent): boolean;
|
|
50
|
+
/** Drop every registered hook (used in teardown / tests). */
|
|
51
|
+
clear(): void;
|
|
52
|
+
private remove;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Does a hook matcher apply to a tool name? `*` (or empty) matches everything;
|
|
56
|
+
* otherwise the matcher is a case-insensitive pipe-delimited list of exact
|
|
57
|
+
* tool names (`"edit|write"`). Non-tool events pass `undefined` and always match.
|
|
58
|
+
*/
|
|
59
|
+
declare function hookMatcherMatches(matcher: HookMatcher, toolName: string | undefined): boolean;
|
|
60
|
+
|
|
61
|
+
interface Renderer {
|
|
62
|
+
write(text: string | TextBlock): void;
|
|
63
|
+
writeLine(text?: string): void;
|
|
64
|
+
writeBlock(block: ContentBlock): void;
|
|
65
|
+
writeToolCall(name: string, input: unknown): void;
|
|
66
|
+
writeToolResult(name: string, content: unknown, isError: boolean): void;
|
|
67
|
+
writeDiff(unifiedDiff: string): void;
|
|
68
|
+
writeWarning(text: string): void;
|
|
69
|
+
writeError(text: string): void;
|
|
70
|
+
writeInfo(text: string): void;
|
|
71
|
+
clear(): void;
|
|
72
|
+
}
|
|
3
73
|
|
|
4
74
|
/**
|
|
5
75
|
* Container — dependency injection with explicit bind / override / decorate.
|
|
@@ -166,74 +236,4 @@ declare class Pipeline<T> {
|
|
|
166
236
|
private ensureUnique;
|
|
167
237
|
}
|
|
168
238
|
|
|
169
|
-
|
|
170
|
-
* Registry of lifecycle hooks (both in-process and shell). One instance is
|
|
171
|
-
* shared per session: the boot path loads `config.hooks` as shell entries and
|
|
172
|
-
* plugins add in-process entries via `PluginAPI.registerHook`. The
|
|
173
|
-
* `HookRunner` reads from it at each lifecycle phase.
|
|
174
|
-
*/
|
|
175
|
-
declare class HookRegistry {
|
|
176
|
-
private readonly entries;
|
|
177
|
-
/** Register an in-process hook. Returns an unsubscribe function. */
|
|
178
|
-
registerInProcess(event: HookEvent, matcher: HookMatcher | undefined, hook: InProcessHook, owner?: string | undefined): () => void;
|
|
179
|
-
/** Register a single shell hook. Returns an unsubscribe function. */
|
|
180
|
-
registerShell(event: HookEvent, hook: ShellHook): () => void;
|
|
181
|
-
/** Bulk-load shell hooks from a `config.hooks` map. */
|
|
182
|
-
loadShellHooks(hooks: Partial<Record<HookEvent, ShellHook[]>> | undefined): void;
|
|
183
|
-
/** All entries registered for an event, in registration order. */
|
|
184
|
-
list(event: HookEvent): readonly HookEntry[];
|
|
185
|
-
/** True when any entry is registered for the event. */
|
|
186
|
-
has(event: HookEvent): boolean;
|
|
187
|
-
/** Drop every registered hook (used in teardown / tests). */
|
|
188
|
-
clear(): void;
|
|
189
|
-
private remove;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Does a hook matcher apply to a tool name? `*` (or empty) matches everything;
|
|
193
|
-
* otherwise the matcher is a case-insensitive pipe-delimited list of exact
|
|
194
|
-
* tool names (`"edit|write"`). Non-tool events pass `undefined` and always match.
|
|
195
|
-
*/
|
|
196
|
-
declare function hookMatcherMatches(matcher: HookMatcher, toolName: string | undefined): boolean;
|
|
197
|
-
|
|
198
|
-
interface Renderer {
|
|
199
|
-
write(text: string | TextBlock): void;
|
|
200
|
-
writeLine(text?: string): void;
|
|
201
|
-
writeBlock(block: ContentBlock): void;
|
|
202
|
-
writeToolCall(name: string, input: unknown): void;
|
|
203
|
-
writeToolResult(name: string, content: unknown, isError: boolean): void;
|
|
204
|
-
writeDiff(unifiedDiff: string): void;
|
|
205
|
-
writeWarning(text: string): void;
|
|
206
|
-
writeError(text: string): void;
|
|
207
|
-
writeInfo(text: string): void;
|
|
208
|
-
clear(): void;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/** Model capabilities relevant to prompt composition. */
|
|
212
|
-
interface ModelCapabilities {
|
|
213
|
-
maxContextTokens: number;
|
|
214
|
-
supportsTools: boolean;
|
|
215
|
-
supportsVision: boolean;
|
|
216
|
-
supportsReasoning: boolean;
|
|
217
|
-
}
|
|
218
|
-
interface BuildContext {
|
|
219
|
-
cwd: string;
|
|
220
|
-
projectRoot: string;
|
|
221
|
-
tools: Tool[];
|
|
222
|
-
/** Provider id (e.g. "anthropic", "minimax-coding-plan"). */
|
|
223
|
-
provider?: string | undefined;
|
|
224
|
-
/** Model id (e.g. "claude-sonnet-4-6", "MiniMax-M2.7"). */
|
|
225
|
-
model?: string | undefined;
|
|
226
|
-
/**
|
|
227
|
-
* True when the prompt is being built for a SUBAGENT, not the host
|
|
228
|
-
* agent. Subagents are scoped to a single task — they should NOT see
|
|
229
|
-
* the host's strategic plan board (which is anchoring the host across
|
|
230
|
-
* turns, not steering individual subtasks). The plan-injection
|
|
231
|
-
* layer short-circuits when this flag is set.
|
|
232
|
-
*/
|
|
233
|
-
subagent?: boolean | undefined;
|
|
234
|
-
}
|
|
235
|
-
interface SystemPromptBuilder {
|
|
236
|
-
build(ctx: BuildContext): Promise<TextBlock[]>;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export { type BindOptions as B, Container as C, type Decorator as D, type Factory as F, HookRegistry as H, type Middleware as M, type NextFn as N, Pipeline as P, type ReadonlyPipeline as R, type SystemPromptBuilder as S, type Token as T, type BuildContext as a, type MiddlewareHandler as b, type ModelCapabilities as c, type PipelineOptions as d, type Renderer as e, hookMatcherMatches as h };
|
|
239
|
+
export { type BuildContext as B, Container as C, type Decorator as D, type Factory as F, HookRegistry as H, type ModelCapabilities as M, type NextFn as N, Pipeline as P, type ReadonlyPipeline as R, type SystemPromptBuilder as S, type Token as T, type Renderer as a, type BindOptions as b, type Middleware as c, type MiddlewareHandler as d, type PipelineOptions as e, hookMatcherMatches as h };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { E as EventBus } from './
|
|
2
|
-
import { S as SecretScrubber } from './
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { c as ConfigStore, a as Config, b as ConfigLoader, w as SyncConfig } from './config-_DZ7dN-T.js';
|
|
1
|
+
import { E as EventBus, M as MemoryScope, k as MemoryEntry, l as MemoryStore, m as MemoryRelevanceContext, S as ScoredEntry } from './brain-s9DyD_Vf.js';
|
|
2
|
+
import { S as SecretScrubber } from './permission-BDv7z0mk.js';
|
|
3
|
+
import { i as SessionStore, h as SessionMetadata, a as SessionWriter, p as ResumedSession, q as SessionData, r as SessionSummary, g as ContentBlock, S as SessionEvent, s as TodoItem, t as ConversationState } from './context-CNRYfhUv.js';
|
|
4
|
+
import { A as AttachmentStore, a as AddAttachmentInput, b as AttachmentRef, c as Attachment } from './session-reader-DDz1Ek4V.js';
|
|
5
|
+
import { W as WstackPaths } from './wstack-paths-_lqjzErq.js';
|
|
6
|
+
import { c as ConfigStore, C as Config, d as ConfigLoader, e as SyncConfig } from './config-84VaZpH6.js';
|
|
8
7
|
import { S as SecretVault } from './secret-vault-DoISxaKO.js';
|
|
9
8
|
|
|
10
9
|
interface SessionStoreOptions {
|
|
@@ -141,8 +140,49 @@ declare class DefaultAttachmentStore implements AttachmentStore {
|
|
|
141
140
|
private toBlock;
|
|
142
141
|
}
|
|
143
142
|
|
|
143
|
+
interface MemoryBackend {
|
|
144
|
+
readonly kind: string;
|
|
145
|
+
remember(scope: MemoryScope, entry: MemoryEntry, filePath: string): Promise<void>;
|
|
146
|
+
forget(scope: MemoryScope, query: string, filePath: string): Promise<number>;
|
|
147
|
+
readAll(scope: MemoryScope, filePath: string): Promise<string>;
|
|
148
|
+
list(scope: MemoryScope, filePath: string, limit?: number | undefined): Promise<MemoryEntry[]>;
|
|
149
|
+
search(scope: MemoryScope, query: string, filePath: string, limit?: number | undefined): Promise<MemoryEntry[]>;
|
|
150
|
+
/** Find memories related to the given text via graph traversal. Optional — falls back to search. */
|
|
151
|
+
findRelated?(scope: MemoryScope, filePath: string, text: string, limit: number): Promise<MemoryEntry[]>;
|
|
152
|
+
clear(scope: MemoryScope, filePath: string): Promise<void>;
|
|
153
|
+
consolidate(scope: MemoryScope, filePath: string): Promise<number>;
|
|
154
|
+
}
|
|
155
|
+
interface FileMemoryBackendOptions {
|
|
156
|
+
paths: WstackPaths;
|
|
157
|
+
}
|
|
158
|
+
declare class FileMemoryBackend implements MemoryBackend {
|
|
159
|
+
readonly kind = "file";
|
|
160
|
+
private readonly files;
|
|
161
|
+
constructor(opts: FileMemoryBackendOptions);
|
|
162
|
+
private resolveFile;
|
|
163
|
+
remember(scope: MemoryScope, entry: MemoryEntry, filePath: string): Promise<void>;
|
|
164
|
+
forget(scope: MemoryScope, query: string, filePath: string): Promise<number>;
|
|
165
|
+
readAll(scope: MemoryScope, filePath: string): Promise<string>;
|
|
166
|
+
list(scope: MemoryScope, filePath: string, limit?: number): Promise<MemoryEntry[]>;
|
|
167
|
+
search(scope: MemoryScope, query: string, filePath: string, limit?: number): Promise<MemoryEntry[]>;
|
|
168
|
+
clear(scope: MemoryScope, filePath: string): Promise<void>;
|
|
169
|
+
consolidate(scope: MemoryScope, filePath: string): Promise<number>;
|
|
170
|
+
}
|
|
171
|
+
declare function parseEntries(raw: string, scope?: MemoryScope): MemoryEntry[];
|
|
172
|
+
|
|
144
173
|
interface MemoryStoreOptions {
|
|
145
174
|
paths: WstackPaths;
|
|
175
|
+
/**
|
|
176
|
+
* Optional event bus — when provided, mutations emit events so plugins
|
|
177
|
+
* and other subsystems can react to memory changes.
|
|
178
|
+
*/
|
|
179
|
+
events?: EventBus | undefined;
|
|
180
|
+
/**
|
|
181
|
+
* Storage backend. Defaults to FileMemoryBackend when omitted.
|
|
182
|
+
* Plugins can register a custom backend (graph, semantic, vector)
|
|
183
|
+
* via the DI container to override storage behavior.
|
|
184
|
+
*/
|
|
185
|
+
backend?: MemoryBackend | undefined;
|
|
146
186
|
}
|
|
147
187
|
/**
|
|
148
188
|
* Three scopes:
|
|
@@ -152,6 +192,8 @@ interface MemoryStoreOptions {
|
|
|
152
192
|
*/
|
|
153
193
|
declare class DefaultMemoryStore implements MemoryStore {
|
|
154
194
|
private readonly files;
|
|
195
|
+
private readonly events?;
|
|
196
|
+
private readonly backend;
|
|
155
197
|
/**
|
|
156
198
|
* Per-scope serialization queue. `remember` / `forget` / `consolidate` /
|
|
157
199
|
* `clear` are read-modify-write against a single file; without a lock,
|
|
@@ -168,16 +210,42 @@ declare class DefaultMemoryStore implements MemoryStore {
|
|
|
168
210
|
private readonly writeChain;
|
|
169
211
|
/** Last write error per scope — surfaced as warnings on the next readAll(). */
|
|
170
212
|
private readonly writeErrors;
|
|
213
|
+
/**
|
|
214
|
+
* When the global root is a temporary directory (opencode, CI sandboxes),
|
|
215
|
+
* memory files are also mirrored to the project tree so they survive
|
|
216
|
+
* session cleanup. The primary path stays in the temp root for isolation;
|
|
217
|
+
* this backup ensures memory is never lost.
|
|
218
|
+
*/
|
|
219
|
+
private readonly persistBackup;
|
|
220
|
+
private readonly backupDir;
|
|
171
221
|
constructor(opts: MemoryStoreOptions);
|
|
222
|
+
/** Expose the backend for plugin introspection and advanced queries. */
|
|
223
|
+
getBackend(): MemoryBackend;
|
|
172
224
|
private runSerialized;
|
|
173
225
|
readAll(): Promise<string>;
|
|
174
226
|
read(scope: MemoryScope): Promise<string>;
|
|
175
|
-
|
|
227
|
+
/**
|
|
228
|
+
* List entries from a scope, newest first. Delegates to the backend
|
|
229
|
+
* so graph/semantic backends can return enriched or filtered results.
|
|
230
|
+
*/
|
|
231
|
+
list(scope?: MemoryScope, limit?: number): Promise<MemoryEntry[]>;
|
|
232
|
+
/**
|
|
233
|
+
* Find memories related to the given text via graph traversal.
|
|
234
|
+
* Falls back to content search when no graph backend is available.
|
|
235
|
+
*/
|
|
236
|
+
findRelated(text: string, scope?: MemoryScope, limit?: number): Promise<MemoryEntry[]>;
|
|
237
|
+
search(query: string, scope?: MemoryScope, limit?: number): Promise<MemoryEntry[]>;
|
|
238
|
+
remember(text: string, scope?: MemoryScope, metadata?: Omit<Partial<MemoryEntry>, 'scope' | 'text' | 'ts'>): Promise<void>;
|
|
239
|
+
/**
|
|
240
|
+
* Score and rank memories by relevance to the current context.
|
|
241
|
+
* Returns entries with score >= MIN_RELEVANCE_SCORE, sorted highest first.
|
|
242
|
+
*/
|
|
243
|
+
scoreRelevant(ctx: MemoryRelevanceContext, scope?: MemoryScope, limit?: number): Promise<ScoredEntry[]>;
|
|
176
244
|
forget(query: string, scope?: MemoryScope): Promise<number>;
|
|
177
|
-
private forgetUnsafe;
|
|
178
245
|
consolidate(scope: MemoryScope): Promise<void>;
|
|
179
|
-
private consolidateUnsafe;
|
|
180
246
|
clear(scope?: MemoryScope): Promise<void>;
|
|
247
|
+
/** Mirror current memory content to the persistent backup directory. */
|
|
248
|
+
private mirrorBackup;
|
|
181
249
|
}
|
|
182
250
|
|
|
183
251
|
/**
|
|
@@ -571,4 +639,4 @@ declare function listPlanTemplates(): PlanTemplate[];
|
|
|
571
639
|
declare function getPlanTemplate(name: string): PlanTemplate | undefined;
|
|
572
640
|
declare function formatPlanTemplates(): string;
|
|
573
641
|
|
|
574
|
-
export { type AbandonedSession as A,
|
|
642
|
+
export { type AbandonedSession as A, getPlanTemplate as B, type ConfigLoaderOptions as C, DEFAULT_CONFIG_MIGRATIONS as D, listPlanTemplates as E, FileMemoryBackend as F, loadPlan as G, loadTodosCheckpoint as H, parseEntries as I, removePlanItem as J, runConfigMigrations as K, savePlan as L, type MemoryBackend as M, saveTodosCheckpoint as N, setPlanItemStatus as O, type PersistedQueueItem as P, QueueStore as Q, RecoveryLock as R, SessionAnalyzer as S, type TodosCheckpointFile as T, type AttachmentStoreOptions as a, type ConfigMigration as b, ConfigMigrationError as c, type ConfigSource as d, DefaultAttachmentStore as e, DefaultConfigLoader as f, DefaultConfigStore as g, DefaultMemoryStore as h, DefaultSessionStore as i, type FileMemoryBackendOptions as j, type MemoryStoreOptions as k, type MigrationContext as l, type MigrationResult as m, type PlanFile as n, type PlanItem as o, type PlanTemplate as p, type RecoveryLockOptions as q, type SessionStoreOptions as r, addPlanItem as s, attachPlanCheckpoint as t, attachTodosCheckpoint as u, clearPlan as v, deriveTodosFromPlanItem as w, emptyPlan as x, formatPlan as y, formatPlanTemplates as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as EventBus } from './
|
|
2
|
-
import {
|
|
3
|
-
import { T as Tracer } from './observability-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { E as EventBus } from './brain-s9DyD_Vf.js';
|
|
2
|
+
import { L as Logger } from './logger-B63L5bTg.js';
|
|
3
|
+
import { T as Tracer } from './observability-D-HZN_mF.js';
|
|
4
|
+
import { P as Provider, R as Request, C as Context, b as Response } from './context-CNRYfhUv.js';
|
|
5
|
+
import { R as RetryPolicy } from './retry-policy-BcmuT_V0.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Options passed to a ProviderRunner when calling the provider.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as Context, b as Response, e as ProviderError } from './context-CNRYfhUv.js';
|
|
2
2
|
|
|
3
3
|
type RecoveryDecision = {
|
|
4
4
|
/**
|
|
@@ -43,4 +43,4 @@ interface RetryPolicy {
|
|
|
43
43
|
maxAttempts(err: ProviderError | Error): number;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export type { ErrorHandler as E,
|
|
46
|
+
export type { ErrorHandler as E, RetryPolicy as R, RecoveryDecision as a };
|
package/dist/sdd/index.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as EventBus } from '../
|
|
3
|
-
import {
|
|
4
|
-
import '../context-
|
|
5
|
-
import '../index-
|
|
6
|
-
import '../logger-
|
|
7
|
-
import '../
|
|
8
|
-
import '../config-
|
|
9
|
-
import '../models-registry-
|
|
10
|
-
import '../observability-
|
|
11
|
-
import '../
|
|
12
|
-
import '../
|
|
13
|
-
import '../retry-policy-DSu6O6rD.js';
|
|
1
|
+
import { k as Specification, S as SpecAnalysis, j as SpecValidationResult, T as TaskGraph, c as TaskNode, o as TaskFilter, q as TaskSort, p as TaskProgress, a as TaskType, b as TaskPriority, h as SpecStatus, i as SpecTemplate, e as SpecRequirement } from '../task-graph-DJBqO0EY.js';
|
|
2
|
+
import { E as EventBus } from '../brain-s9DyD_Vf.js';
|
|
3
|
+
import { O as DoneCondition, g as Agent, h as AgentFactory, f as TaskResult } from '../agent-subagent-runner-C6eqID1t.js';
|
|
4
|
+
import '../context-CNRYfhUv.js';
|
|
5
|
+
import '../index-D3Nax3YU.js';
|
|
6
|
+
import '../logger-B63L5bTg.js';
|
|
7
|
+
import '../pipeline-C1Ad9OjI.js';
|
|
8
|
+
import '../config-84VaZpH6.js';
|
|
9
|
+
import '../models-registry-B6_KfS65.js';
|
|
10
|
+
import '../observability-D-HZN_mF.js';
|
|
11
|
+
import '../permission-BDv7z0mk.js';
|
|
12
|
+
import '../retry-policy-BcmuT_V0.js';
|
|
14
13
|
|
|
15
14
|
declare class SpecParser {
|
|
16
15
|
parse(content: string): Specification;
|
|
@@ -708,26 +707,6 @@ declare class SddTaskDecomposer {
|
|
|
708
707
|
private hasAnyBlockedTasks;
|
|
709
708
|
}
|
|
710
709
|
|
|
711
|
-
/**
|
|
712
|
-
* SddParallelRun
|
|
713
|
-
*
|
|
714
|
-
* Drives a TaskGraph through ParallelEternalEngine's infrastructure
|
|
715
|
-
* (DefaultMultiAgentCoordinator + AgentSubagentRunner) but powered by
|
|
716
|
-
* SddTaskDecomposer — producing dependency-aware waves instead of
|
|
717
|
-
* goal-driven iterations.
|
|
718
|
-
*
|
|
719
|
-
* One-shot: completes when all tasks are done OR a deadlock is detected.
|
|
720
|
-
* Does NOT loop — each run() call is a discrete execution.
|
|
721
|
-
*
|
|
722
|
-
* Usage:
|
|
723
|
-
* ```
|
|
724
|
-
* const run = new SddParallelRun({ tracker, graph, agent, projectRoot });
|
|
725
|
-
* await run.run({ onWave });
|
|
726
|
-
* // or with progress callback:
|
|
727
|
-
* await run.run({ onProgress: (p) => console.log(renderProgress(p)) });
|
|
728
|
-
* ```
|
|
729
|
-
*/
|
|
730
|
-
|
|
731
710
|
interface SddParallelRunOptions {
|
|
732
711
|
/** Pre-constructed TaskTracker (must already hold the graph's initial state). */
|
|
733
712
|
tracker: TaskTracker;
|