@wrongstack/core 0.89.1 → 0.104.0
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-B8F2ORwg.d.ts → agent-bridge-mOxbpFcg.d.ts} +1 -1
- package/dist/{agent-subagent-runner-CQaLFNnA.d.ts → agent-subagent-runner-DukQLUcS.d.ts} +433 -433
- package/dist/{events-DzyLtja6.d.ts → brain-Dfv4Y82E.d.ts} +179 -92
- package/dist/{compactor-CJq7LQev.d.ts → compactor-DXLxLcmU.d.ts} +2 -2
- package/dist/{config-_DZ7dN-T.d.ts → config-BSU-6vah.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 +128 -37
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +34 -35
- package/dist/defaults/index.js +752 -218
- 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 +65 -370
- package/dist/execution/index.js +446 -53
- 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/goal-preamble-CI8lxeY1.d.ts +378 -0
- package/dist/{goal-store-DvWLNu52.d.ts → goal-store-ht0VmR1A.d.ts} +63 -21
- package/dist/{index-Ca_lOmKl.d.ts → index-BWRN6wOb.d.ts} +13 -15
- package/dist/{index-Dx-CnrDN.d.ts → index-DIKEcfgC.d.ts} +9 -10
- package/dist/index.d.ts +188 -176
- package/dist/index.js +1508 -407
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +9 -9
- package/dist/infrastructure/index.js +4 -2
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +14 -16
- 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-CXCsANdY.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-Da9nd8Ic.d.ts → multi-agent-coordinator-51LvnXkD.d.ts} +2 -2
- package/dist/{null-fleet-bus-CHJOXv3t.d.ts → null-fleet-bus-D09hMzFQ.d.ts} +32 -31
- 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-DyMCj2Pw.d.ts → parallel-eternal-engine-CUtmM_0V.d.ts} +54 -35
- package/dist/{path-resolver-TjBlRKyH.d.ts → path-resolver-DDJiMAtX.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-BqiA_UMr.d.ts} +73 -73
- package/dist/{plan-templates-D9UhwoGh.d.ts → plan-templates-BdDxl9cI.d.ts} +79 -11
- package/dist/{provider-runner-BEPWwkxH.d.ts → provider-runner-BUunikwY.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 +17 -33
- package/dist/sdd/index.js +145 -36
- 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 +4 -2
- 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-BpJ5trO9.d.ts} +2 -2
- package/dist/{session-reader-BQU-toaN.d.ts → session-reader-DDz1Ek4V.d.ts} +2 -2
- package/dist/{skill-BJeF2DwY.d.ts → skill-Bj6Ezqb8.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/spec-TBi3Jr6T.d.ts +78 -0
- package/dist/storage/index.d.ts +145 -13
- package/dist/storage/index.js +990 -172
- package/dist/storage/index.js.map +1 -1
- package/dist/task-format-vGOIftmK.d.ts +23 -0
- package/dist/task-graph-u1q9Jkyk.d.ts +84 -0
- package/dist/types/index.d.ts +27 -28
- package/dist/types/index.js +19 -31
- 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 +8 -20
- package/dist/utils/index.js +120 -41
- 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/skills/tech-stack/SKILL.md +177 -0
- package/dist/memory-CEXuo7sz.d.ts +0 -16
- package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
- package/dist/task-graph-CikNdRTG.d.ts +0 -161
|
@@ -1,106 +1,87 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as Usage, C as Context, j as ToolProgressEvent, T as Tool } from './context-CNRYfhUv.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
id: string;
|
|
24
|
-
source: BrainDecisionSource;
|
|
25
|
-
question: string;
|
|
26
|
-
context?: string | undefined;
|
|
27
|
-
options?: BrainDecisionOption[] | undefined;
|
|
28
|
-
risk: BrainRisk;
|
|
29
|
-
/** What a non-LLM/default Brain should do when policy cannot decide safely. */
|
|
30
|
-
fallback: BrainFallback;
|
|
3
|
+
type MemoryScope = 'project-agents' | 'project-memory' | 'user-memory';
|
|
4
|
+
type MemoryType = 'fact' | 'decision' | 'convention' | 'preference' | 'reference' | 'anti_pattern';
|
|
5
|
+
declare const MEMORY_TYPE_LABELS: Record<MemoryType, string>;
|
|
6
|
+
type MemoryPriority = 'critical' | 'high' | 'medium' | 'low';
|
|
7
|
+
interface MemoryEntry {
|
|
8
|
+
scope: MemoryScope;
|
|
9
|
+
text: string;
|
|
10
|
+
ts: string;
|
|
11
|
+
/** Category — helps the agent decide whether to inject or ignore. */
|
|
12
|
+
type?: MemoryType | undefined;
|
|
13
|
+
/** Free-form tags for grouping (e.g. ["build", "pnpm", "typescript"]). */
|
|
14
|
+
tags?: string[] | undefined;
|
|
15
|
+
/** Priority — critical entries are always injected; low may be skipped. */
|
|
16
|
+
priority?: MemoryPriority | undefined;
|
|
17
|
+
/** Session or agent that created this entry. */
|
|
18
|
+
source?: string | undefined;
|
|
19
|
+
/** 0.0–1.0 confidence. Low-confidence entries are injected less often. */
|
|
20
|
+
confidence?: number | undefined;
|
|
21
|
+
/** ISO timestamp of last access (read or injection into context). */
|
|
22
|
+
lastAccessed?: string | undefined;
|
|
31
23
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
optionId?: string | undefined;
|
|
24
|
+
interface MemoryRememberedPayload {
|
|
25
|
+
scope: MemoryScope;
|
|
35
26
|
text: string;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
options?: BrainDecisionOption[] | undefined;
|
|
41
|
-
rationale?: string | undefined;
|
|
42
|
-
} | {
|
|
43
|
-
type: 'deny';
|
|
44
|
-
reason: string;
|
|
45
|
-
};
|
|
46
|
-
interface BrainArbiter {
|
|
47
|
-
decide(request: BrainDecisionRequest): Promise<BrainDecision>;
|
|
27
|
+
ts: string;
|
|
28
|
+
type?: MemoryType | undefined;
|
|
29
|
+
tags?: string[] | undefined;
|
|
30
|
+
priority?: MemoryPriority | undefined;
|
|
48
31
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
*/
|
|
54
|
-
declare class ObservableBrainArbiter implements BrainArbiter {
|
|
55
|
-
private readonly inner;
|
|
56
|
-
private readonly events;
|
|
57
|
-
constructor(inner: BrainArbiter, events: EventBus);
|
|
58
|
-
decide(request: BrainDecisionRequest): Promise<BrainDecision>;
|
|
32
|
+
interface MemoryForgottenPayload {
|
|
33
|
+
scope: MemoryScope;
|
|
34
|
+
query: string;
|
|
35
|
+
removed: number;
|
|
59
36
|
}
|
|
60
|
-
interface
|
|
61
|
-
/**
|
|
62
|
-
|
|
37
|
+
interface MemoryClearedPayload {
|
|
38
|
+
/** Scope that was cleared, or undefined when all scopes were cleared. */
|
|
39
|
+
scope?: MemoryScope | undefined;
|
|
63
40
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
declare class BrainDecisionQueue {
|
|
69
|
-
private readonly events;
|
|
70
|
-
private readonly opts;
|
|
71
|
-
private readonly pending;
|
|
72
|
-
private readonly offAnswer;
|
|
73
|
-
constructor(events: EventBus, opts?: BrainDecisionQueueOptions);
|
|
74
|
-
requestHumanDecision(request: BrainDecisionRequest): Promise<BrainDecision>;
|
|
75
|
-
dispose(): void;
|
|
41
|
+
interface MemoryConsolidatedPayload {
|
|
42
|
+
scope: MemoryScope;
|
|
43
|
+
/** Entries removed by deduplication. */
|
|
44
|
+
removed: number;
|
|
76
45
|
}
|
|
77
46
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
47
|
+
* Context used to score memory relevance for context injection.
|
|
48
|
+
* Passed by the system prompt builder.
|
|
80
49
|
*/
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
50
|
+
interface MemoryRelevanceContext {
|
|
51
|
+
/** Current user message or task description. */
|
|
52
|
+
currentTask: string;
|
|
53
|
+
/** Active skills in this session (e.g. ["typescript-strict", "git-flow"]). */
|
|
54
|
+
activeSkills?: string[] | undefined;
|
|
55
|
+
/** Active mode (e.g. "Teach", "Brief", "Code Reviewer"). */
|
|
56
|
+
activeMode?: string | undefined;
|
|
57
|
+
/** Available tools — memories referencing relevant tools score higher. */
|
|
58
|
+
toolNames?: string[] | undefined;
|
|
86
59
|
}
|
|
87
|
-
interface
|
|
88
|
-
|
|
89
|
-
|
|
60
|
+
interface ScoredEntry extends MemoryEntry {
|
|
61
|
+
score: number;
|
|
62
|
+
matchReason: string;
|
|
90
63
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
64
|
+
interface MemoryStore {
|
|
65
|
+
readAll(): Promise<string>;
|
|
66
|
+
read(scope: MemoryScope): Promise<string>;
|
|
67
|
+
remember(text: string, scope?: MemoryScope, metadata?: Omit<Partial<MemoryEntry>, 'scope' | 'text' | 'ts'>): Promise<void>;
|
|
68
|
+
forget(query: string, scope?: MemoryScope): Promise<number>;
|
|
69
|
+
consolidate(scope: MemoryScope): Promise<void>;
|
|
70
|
+
clear(scope?: MemoryScope): Promise<void>;
|
|
71
|
+
/** List entries, newest first. */
|
|
72
|
+
list(scope?: MemoryScope, limit?: number): Promise<MemoryEntry[]>;
|
|
73
|
+
/** Search by content (substring or semantic). */
|
|
74
|
+
search(query: string, scope?: MemoryScope, limit?: number): Promise<MemoryEntry[]>;
|
|
75
|
+
/** Access the backend for advanced queries. */
|
|
76
|
+
getBackend?(): unknown;
|
|
77
|
+
/** Graph-based related memory traversal. */
|
|
78
|
+
findRelated?(text: string, scope?: MemoryScope, limit?: number): Promise<MemoryEntry[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Score and rank memories by relevance to the current context.
|
|
81
|
+
* Returns only entries that meet a relevance threshold.
|
|
82
|
+
*/
|
|
83
|
+
scoreRelevant?(ctx: MemoryRelevanceContext, scope?: MemoryScope, limit?: number): Promise<ScoredEntry[]>;
|
|
102
84
|
}
|
|
103
|
-
declare function formatHumanPrompt(request: BrainDecisionRequest): string;
|
|
104
85
|
|
|
105
86
|
/**
|
|
106
87
|
* EventBus — observe-only typed event bus.
|
|
@@ -705,6 +686,10 @@ interface EventMap {
|
|
|
705
686
|
branch?: string | undefined;
|
|
706
687
|
error: string;
|
|
707
688
|
};
|
|
689
|
+
'memory.remembered': MemoryRememberedPayload;
|
|
690
|
+
'memory.forgotten': MemoryForgottenPayload;
|
|
691
|
+
'memory.cleared': MemoryClearedPayload;
|
|
692
|
+
'memory.consolidated': MemoryConsolidatedPayload;
|
|
708
693
|
error: {
|
|
709
694
|
err: Error;
|
|
710
695
|
phase: string;
|
|
@@ -859,4 +844,106 @@ declare class ScopedEventBus extends EventBus {
|
|
|
859
844
|
get scopedListenerCount(): number;
|
|
860
845
|
}
|
|
861
846
|
|
|
862
|
-
|
|
847
|
+
/**
|
|
848
|
+
* Brain coordination primitives.
|
|
849
|
+
*
|
|
850
|
+
* Brain is an authority layer above a leader/director but below the human. It is
|
|
851
|
+
* intentionally modeled as a decision interface first, not as an autonomous
|
|
852
|
+
* bypass: callers ask for a decision, Brain either answers within policy or
|
|
853
|
+
* escalates to the human.
|
|
854
|
+
*/
|
|
855
|
+
|
|
856
|
+
type BrainDecisionSource = 'autophase' | 'director' | 'tool' | 'user' | 'system';
|
|
857
|
+
type BrainRisk = 'low' | 'medium' | 'high' | 'critical';
|
|
858
|
+
type BrainFallback = 'ask_human' | 'deny' | 'continue';
|
|
859
|
+
interface BrainDecisionOption {
|
|
860
|
+
id: string;
|
|
861
|
+
label: string;
|
|
862
|
+
consequence?: string | undefined;
|
|
863
|
+
risk?: BrainRisk | undefined;
|
|
864
|
+
recommended?: boolean | undefined;
|
|
865
|
+
}
|
|
866
|
+
interface BrainDecisionRequest {
|
|
867
|
+
id: string;
|
|
868
|
+
source: BrainDecisionSource;
|
|
869
|
+
question: string;
|
|
870
|
+
context?: string | undefined;
|
|
871
|
+
options?: BrainDecisionOption[] | undefined;
|
|
872
|
+
risk: BrainRisk;
|
|
873
|
+
/** What a non-LLM/default Brain should do when policy cannot decide safely. */
|
|
874
|
+
fallback: BrainFallback;
|
|
875
|
+
}
|
|
876
|
+
type BrainDecision = {
|
|
877
|
+
type: 'answer';
|
|
878
|
+
optionId?: string | undefined;
|
|
879
|
+
text: string;
|
|
880
|
+
rationale?: string | undefined;
|
|
881
|
+
} | {
|
|
882
|
+
type: 'ask_human';
|
|
883
|
+
prompt: string;
|
|
884
|
+
options?: BrainDecisionOption[] | undefined;
|
|
885
|
+
rationale?: string | undefined;
|
|
886
|
+
} | {
|
|
887
|
+
type: 'deny';
|
|
888
|
+
reason: string;
|
|
889
|
+
};
|
|
890
|
+
interface BrainArbiter {
|
|
891
|
+
decide(request: BrainDecisionRequest): Promise<BrainDecision>;
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Event-emitting decorator for any Brain implementation. Hosts wire this around
|
|
895
|
+
* their actual arbiter so TUI/session surfaces can render Brain decisions
|
|
896
|
+
* without coupling to the caller that requested the decision.
|
|
897
|
+
*/
|
|
898
|
+
declare class ObservableBrainArbiter implements BrainArbiter {
|
|
899
|
+
private readonly inner;
|
|
900
|
+
private readonly events;
|
|
901
|
+
constructor(inner: BrainArbiter, events: EventBus);
|
|
902
|
+
decide(request: BrainDecisionRequest): Promise<BrainDecision>;
|
|
903
|
+
}
|
|
904
|
+
interface BrainDecisionQueueOptions {
|
|
905
|
+
/** Safety fallback if the human never answers. Default: no timeout. */
|
|
906
|
+
timeoutMs?: number | undefined;
|
|
907
|
+
}
|
|
908
|
+
/**
|
|
909
|
+
* Bridge between an `ask_human` Brain decision and the UI. It emits the visible
|
|
910
|
+
* ask-human event, then resolves when the TUI emits `brain.human_answered`.
|
|
911
|
+
*/
|
|
912
|
+
declare class BrainDecisionQueue {
|
|
913
|
+
private readonly events;
|
|
914
|
+
private readonly opts;
|
|
915
|
+
private readonly pending;
|
|
916
|
+
private readonly offAnswer;
|
|
917
|
+
constructor(events: EventBus, opts?: BrainDecisionQueueOptions);
|
|
918
|
+
requestHumanDecision(request: BrainDecisionRequest): Promise<BrainDecision>;
|
|
919
|
+
dispose(): void;
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* Decorator that turns `ask_human` into an actual awaited human decision.
|
|
923
|
+
* The wrapped Brain remains policy-only; this layer owns the UI/event bridge.
|
|
924
|
+
*/
|
|
925
|
+
declare class HumanEscalatingBrainArbiter implements BrainArbiter {
|
|
926
|
+
private readonly inner;
|
|
927
|
+
private readonly queue;
|
|
928
|
+
constructor(inner: BrainArbiter, queue: BrainDecisionQueue);
|
|
929
|
+
decide(request: BrainDecisionRequest): Promise<BrainDecision>;
|
|
930
|
+
}
|
|
931
|
+
interface DefaultBrainArbiterOptions {
|
|
932
|
+
/** Allow deterministic auto-answering for low-risk requests. Default true. */
|
|
933
|
+
allowLowRiskAutoAnswer?: boolean | undefined;
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* Conservative deterministic Brain implementation.
|
|
937
|
+
*
|
|
938
|
+
* It only auto-answers low-risk requests when the caller provided a recommended
|
|
939
|
+
* option. Everything else follows the request fallback. This gives hosts a safe
|
|
940
|
+
* policy object to wire before an LLM-backed Brain exists.
|
|
941
|
+
*/
|
|
942
|
+
declare class DefaultBrainArbiter implements BrainArbiter {
|
|
943
|
+
private readonly allowLowRiskAutoAnswer;
|
|
944
|
+
constructor(opts?: DefaultBrainArbiterOptions);
|
|
945
|
+
decide(request: BrainDecisionRequest): Promise<BrainDecision>;
|
|
946
|
+
}
|
|
947
|
+
declare function formatHumanPrompt(request: BrainDecisionRequest): string;
|
|
948
|
+
|
|
949
|
+
export { type BrainDecision as B, DefaultBrainArbiter as D, EventBus as E, HumanEscalatingBrainArbiter as H, type Listener as L, type MemoryScope as M, ObservableBrainArbiter as O, type ScoredEntry as S, type BrainDecisionRequest as a, type BrainArbiter as b, type EventName as c, type BrainDecisionOption as d, BrainDecisionQueue as e, type BrainDecisionSource as f, type BrainFallback as g, type BrainRisk as h, type DefaultBrainArbiterOptions as i, formatHumanPrompt as j, type MemoryEntry as k, type MemoryStore as l, type MemoryRelevanceContext as m, type EventLogger as n, type EventMap as o, MEMORY_TYPE_LABELS as p, type MemoryClearedPayload as q, type MemoryConsolidatedPayload as r, type MemoryForgottenPayload as s, type MemoryPriority as t, type MemoryRememberedPayload as u, type MemoryType as v, ScopedEventBus as w };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as Context } from './context-CNRYfhUv.js';
|
|
2
2
|
|
|
3
3
|
interface CompactRepairReport {
|
|
4
4
|
removedToolUses: string[];
|
|
@@ -38,4 +38,4 @@ interface Compactor {
|
|
|
38
38
|
}): Promise<CompactReport>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export type {
|
|
41
|
+
export type { Compactor as C, CompactReport as a };
|
|
@@ -1,5 +1,40 @@
|
|
|
1
|
-
import { W as WireFamily } from './models-registry-
|
|
2
|
-
import {
|
|
1
|
+
import { W as WireFamily } from './models-registry-B6_KfS65.js';
|
|
2
|
+
import { k as Capabilities, f as Permission } from './context-CNRYfhUv.js';
|
|
3
|
+
|
|
4
|
+
type ContextWindowModeId = 'balanced' | 'frugal' | 'deep' | 'archival';
|
|
5
|
+
type ContextWindowAggressiveOn = 'hard' | 'soft' | 'warn';
|
|
6
|
+
interface ContextWindowThresholds {
|
|
7
|
+
warn: number;
|
|
8
|
+
soft: number;
|
|
9
|
+
hard: number;
|
|
10
|
+
}
|
|
11
|
+
interface ContextWindowMode {
|
|
12
|
+
id: ContextWindowModeId;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
thresholds: ContextWindowThresholds;
|
|
16
|
+
aggressiveOn: ContextWindowAggressiveOn;
|
|
17
|
+
preserveK: number;
|
|
18
|
+
eliseThreshold: number;
|
|
19
|
+
targetLoad: number;
|
|
20
|
+
}
|
|
21
|
+
interface ContextWindowPolicy extends ContextWindowMode {
|
|
22
|
+
}
|
|
23
|
+
interface ContextWindowConfigLike {
|
|
24
|
+
mode?: ContextWindowModeId | string | undefined;
|
|
25
|
+
warnThreshold?: number | undefined;
|
|
26
|
+
softThreshold?: number | undefined;
|
|
27
|
+
hardThreshold?: number | undefined;
|
|
28
|
+
preserveK?: number | undefined;
|
|
29
|
+
eliseThreshold?: number | undefined;
|
|
30
|
+
}
|
|
31
|
+
declare const DEFAULT_CONTEXT_WINDOW_MODE_ID: ContextWindowModeId;
|
|
32
|
+
declare const CONTEXT_WINDOW_MODES: readonly ContextWindowMode[];
|
|
33
|
+
declare function listContextWindowModes(): ContextWindowMode[];
|
|
34
|
+
declare function getContextWindowMode(id: string | null | undefined): ContextWindowMode | null;
|
|
35
|
+
declare function isContextWindowModeId(id: string): id is ContextWindowModeId;
|
|
36
|
+
declare function resolveContextWindowPolicy(config?: ContextWindowConfigLike, overrideMode?: string | null | undefined): ContextWindowPolicy;
|
|
37
|
+
declare function formatContextWindowModeList(activeId?: string | null): string;
|
|
3
38
|
|
|
4
39
|
/**
|
|
5
40
|
* Lifecycle hook types — the pure, serializable contract shared by the config
|
|
@@ -96,41 +131,6 @@ type HookEntry = {
|
|
|
96
131
|
timeoutMs?: number | undefined;
|
|
97
132
|
};
|
|
98
133
|
|
|
99
|
-
type ContextWindowModeId = 'balanced' | 'frugal' | 'deep' | 'archival';
|
|
100
|
-
type ContextWindowAggressiveOn = 'hard' | 'soft' | 'warn';
|
|
101
|
-
interface ContextWindowThresholds {
|
|
102
|
-
warn: number;
|
|
103
|
-
soft: number;
|
|
104
|
-
hard: number;
|
|
105
|
-
}
|
|
106
|
-
interface ContextWindowMode {
|
|
107
|
-
id: ContextWindowModeId;
|
|
108
|
-
name: string;
|
|
109
|
-
description: string;
|
|
110
|
-
thresholds: ContextWindowThresholds;
|
|
111
|
-
aggressiveOn: ContextWindowAggressiveOn;
|
|
112
|
-
preserveK: number;
|
|
113
|
-
eliseThreshold: number;
|
|
114
|
-
targetLoad: number;
|
|
115
|
-
}
|
|
116
|
-
interface ContextWindowPolicy extends ContextWindowMode {
|
|
117
|
-
}
|
|
118
|
-
interface ContextWindowConfigLike {
|
|
119
|
-
mode?: ContextWindowModeId | string | undefined;
|
|
120
|
-
warnThreshold?: number | undefined;
|
|
121
|
-
softThreshold?: number | undefined;
|
|
122
|
-
hardThreshold?: number | undefined;
|
|
123
|
-
preserveK?: number | undefined;
|
|
124
|
-
eliseThreshold?: number | undefined;
|
|
125
|
-
}
|
|
126
|
-
declare const DEFAULT_CONTEXT_WINDOW_MODE_ID: ContextWindowModeId;
|
|
127
|
-
declare const CONTEXT_WINDOW_MODES: readonly ContextWindowMode[];
|
|
128
|
-
declare function listContextWindowModes(): ContextWindowMode[];
|
|
129
|
-
declare function getContextWindowMode(id: string | null | undefined): ContextWindowMode | null;
|
|
130
|
-
declare function isContextWindowModeId(id: string): id is ContextWindowModeId;
|
|
131
|
-
declare function resolveContextWindowPolicy(config?: ContextWindowConfigLike, overrideMode?: string | null | undefined): ContextWindowPolicy;
|
|
132
|
-
declare function formatContextWindowModeList(activeId?: string | null): string;
|
|
133
|
-
|
|
134
134
|
interface ContextConfig {
|
|
135
135
|
/** Context-window policy mode. Controls compaction thresholds and preservation depth. */
|
|
136
136
|
mode?: ContextWindowModeId | undefined;
|
|
@@ -269,6 +269,13 @@ interface FeaturesConfig {
|
|
|
269
269
|
plugins: boolean;
|
|
270
270
|
/** Register `remember` / `forget` tools backed by memory store. */
|
|
271
271
|
memory: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Automatically consolidate session learnings into long-term memory
|
|
274
|
+
* after each completed run. The agent extracts key facts, conventions,
|
|
275
|
+
* and decisions via a lightweight LLM call and persists them.
|
|
276
|
+
* Enabled by default when `memory` is on; set to false to opt out.
|
|
277
|
+
*/
|
|
278
|
+
memoryConsolidation?: boolean | undefined;
|
|
272
279
|
/** Fetch the models.dev catalog at startup. When false, the provider
|
|
273
280
|
* must declare its `family` explicitly in `providers[<id>]`. */
|
|
274
281
|
modelsRegistry: boolean;
|
|
@@ -496,4 +503,4 @@ interface ConfigStore {
|
|
|
496
503
|
watch(cb: (next: Readonly<Config>, prev: Readonly<Config>) => void): () => void;
|
|
497
504
|
}
|
|
498
505
|
|
|
499
|
-
export { type AutonomyConfig as A, listContextWindowModes as B,
|
|
506
|
+
export { type AutonomyConfig as A, listContextWindowModes as B, type ContextWindowAggressiveOn as C, DEFAULT_CONTEXT_WINDOW_MODE_ID as D, resolveContextWindowPolicy as E, type FeaturesConfig as F, type HookEvent as H, type InProcessHook as I, type LaunchConfig as L, type MCPServerConfig as M, type PluginConfig as P, type ShellHook as S, type ToolsConfig as T, type HookMatcher as a, type HookEntry as b, type ContextWindowPolicy as c, type Config as d, type ConfigStore as e, type ConfigLoader as f, type SyncConfig as g, type ModelMatrixEntry as h, type HookInput as i, type HookOutcome as j, CONTEXT_WINDOW_MODES as k, type ContextConfig as l, type ContextWindowConfigLike as m, type ContextWindowMode as n, type ContextWindowModeId as o, type ContextWindowThresholds as p, type CustomModelDefinition as q, type IndexingConfig as r, type LogConfig as s, type ProviderApiKey as t, type ProviderConfig as u, type SessionLoggingConfig as v, type SyncCategory as w, formatContextWindowModeList as x, getContextWindowMode as y, isContextWindowModeId as z };
|
|
@@ -1218,4 +1218,4 @@ declare class Context implements RunEnv {
|
|
|
1218
1218
|
usage(): Usage;
|
|
1219
1219
|
}
|
|
1220
1220
|
|
|
1221
|
-
export { type
|
|
1221
|
+
export { type ToolStreamEvent as $, AgentError as A, type MessageRole as B, Context as C, PluginError as D, ERROR_CODES as E, type FileSnapshot as F, type ProviderErrorBody as G, type ReadonlyConversationState as H, type ImageBlock as I, type JSONSchema as J, type RiskTier as K, type RunEnv as L, type Message as M, SessionError as N, type StateChange as O, type Provider as P, type StateChangeHandler as Q, type Request as R, type SessionEvent as S, type Tool as T, type Usage as U, type StopReason as V, type StreamEvent as W, type ThinkingBlock as X, type ToolCallContext as Y, ToolError as Z, type ToolFinalEvent as _, type SessionWriter as a, WrongStackError as a0, asBlocks as a1, asText as a2, extractRunEnv as a3, isAgentError as a4, isConfigError as a5, isFsError as a6, isImageBlock as a7, isPluginError as a8, isSessionError as a9, isTextBlock as aa, isThinkingBlock as ab, isToolError as ac, isToolResultBlock as ad, isToolUseBlock as ae, isWrongStackError as af, toWrongStackError as ag, wrapAsState as ah, type Response as b, type TokenCounter as c, type CacheStats as d, ProviderError as e, type Permission as f, type ContentBlock as g, type SessionMetadata as h, type SessionStore as i, type ToolProgressEvent as j, type Capabilities as k, type TextBlock as l, type ToolUseBlock as m, type ToolResultBlock as n, type RunOptions as o, type ResumedSession as p, type SessionData as q, type SessionSummary as r, type TodoItem as s, ConversationState as t, ConfigError as u, type ContextInit as v, type ErrorCode as w, type ErrorSeverity as x, type ErrorSubsystem as y, FsError as z };
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
export {
|
|
2
|
-
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, h as BugFinding, C as CollabBudgetConfig, i as CollabBudgetOverrides, j as CollabBudgetWarningPayload, k as CollabDebugReport, l as CollabSession, m as CollabSessionOptions, n as CreateDelegateToolOptions, o as CriticConcern, p as CriticEvaluation, D as DEFAULT_DIRECTOR_PREAMBLE, q as DEFAULT_SUBAGENT_BASELINE, r as DelegateHost, s as Director, t as DirectorAlert, u as DirectorAlertLevel, v as DirectorCancelCollabPayload, 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, N as LargeAnswerStore, O as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, P as RefactorPhase, Q as RefactorPlan, S as SECURITY_SCANNER_AGENT, T as SharedFileEntry, U as SharedFileSnapshot, V as SubagentPromptParts, W as applyRosterBudget, X as attachAutoExtend, Y as composeDirectorPrompt, Z as composeSubagentPrompt, _ as createDelegateTool, $ as getAgentDefinition, a0 as makeAskResultTool, 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, ae as makeWorkCompleteTool, af as rosterSummaryFromConfigs } from '../null-fleet-bus-
|
|
3
|
-
import {
|
|
4
|
-
export { T as AGENT_TOOL_PRESETS,
|
|
5
|
-
export {
|
|
6
|
-
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-
|
|
7
|
-
import '../context-
|
|
1
|
+
export { b as BrainArbiter, B as BrainDecision, d as BrainDecisionOption, e as BrainDecisionQueue, a as BrainDecisionRequest, f as BrainDecisionSource, g as BrainFallback, h as BrainRisk, D as DefaultBrainArbiter, i as DefaultBrainArbiterOptions, H as HumanEscalatingBrainArbiter, O as ObservableBrainArbiter, j as formatHumanPrompt } from '../brain-Dfv4Y82E.js';
|
|
2
|
+
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, h as BugFinding, C as CollabBudgetConfig, i as CollabBudgetOverrides, j as CollabBudgetWarningPayload, k as CollabDebugReport, l as CollabSession, m as CollabSessionOptions, n as CreateDelegateToolOptions, o as CriticConcern, p as CriticEvaluation, D as DEFAULT_DIRECTOR_PREAMBLE, q as DEFAULT_SUBAGENT_BASELINE, r as DelegateHost, s as Director, t as DirectorAlert, u as DirectorAlertLevel, v as DirectorCancelCollabPayload, 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, N as LargeAnswerStore, O as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, P as RefactorPhase, Q as RefactorPlan, S as SECURITY_SCANNER_AGENT, T as SharedFileEntry, U as SharedFileSnapshot, V as SubagentPromptParts, W as applyRosterBudget, X as attachAutoExtend, Y as composeDirectorPrompt, Z as composeSubagentPrompt, _ as createDelegateTool, $ as getAgentDefinition, a0 as makeAskResultTool, 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, ae as makeWorkCompleteTool, af as rosterSummaryFromConfigs } from '../null-fleet-bus-D09hMzFQ.js';
|
|
3
|
+
import { A as AgentDefinition } from '../multi-agent-coordinator-51LvnXkD.js';
|
|
4
|
+
export { T as AGENT_TOOL_PRESETS, b as AgentBudgetTier, c as AgentCapability, 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, H as HEAVY_BUDGET, L as LIGHT_BUDGET, M as MEDIUM_BUDGET, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from '../multi-agent-coordinator-51LvnXkD.js';
|
|
5
|
+
export { h as AgentFactory, i as AgentFactoryResult, j as AgentRunnerOptions, k as BudgetExceededError, l as BudgetKind, m as BudgetLimits, n as BudgetNegotiationMode, o as BudgetThresholdDecision, p as BudgetThresholdHandler, q as BudgetThresholdSignal, r as BudgetUsage, F as FleetBus, s as FleetEvent, t as FleetHandler, u as FleetUsage, v as FleetUsageAggregator, w as SubagentBudget, x as SubagentUsageSnapshot, y as makeAgentSubagentRunner } from '../agent-subagent-runner-DukQLUcS.js';
|
|
6
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-mOxbpFcg.js';
|
|
7
|
+
import '../context-CNRYfhUv.js';
|
|
8
8
|
import 'node:events';
|
|
9
|
-
import '../director-state-
|
|
10
|
-
import '../config-
|
|
11
|
-
import '../models-registry-
|
|
12
|
-
import '../index-
|
|
13
|
-
import '../logger-
|
|
14
|
-
import '../
|
|
15
|
-
import '../observability-
|
|
16
|
-
import '../
|
|
17
|
-
import '../
|
|
18
|
-
import '../retry-policy-DSu6O6rD.js';
|
|
9
|
+
import '../director-state-BfeCUbmk.js';
|
|
10
|
+
import '../config-BSU-6vah.js';
|
|
11
|
+
import '../models-registry-B6_KfS65.js';
|
|
12
|
+
import '../index-DIKEcfgC.js';
|
|
13
|
+
import '../logger-B63L5bTg.js';
|
|
14
|
+
import '../pipeline-BqiA_UMr.js';
|
|
15
|
+
import '../observability-D-HZN_mF.js';
|
|
16
|
+
import '../permission-BDv7z0mk.js';
|
|
17
|
+
import '../retry-policy-BcmuT_V0.js';
|
|
19
18
|
|
|
20
19
|
/** Phase 1 · Discovery — map the territory before any work begins. */
|
|
21
20
|
declare const DISCOVERY_AGENTS: AgentDefinition[];
|