@wrongstack/core 0.9.19 → 0.9.20
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-DMVOX0cF.d.ts → agent-bridge-Dti3KXGk.d.ts} +1 -1
- package/dist/{agent-subagent-runner-C4qt9e5Y.d.ts → agent-subagent-runner-U-rs7kk7.d.ts} +3 -4
- package/dist/compactor-D7X96RLZ.d.ts +41 -0
- package/dist/{config-CWva0qoL.d.ts → config-CLXMDOSs.d.ts} +1 -1
- package/dist/{context-BRNbHmRM.d.ts → context-zkZeILpr.d.ts} +46 -0
- package/dist/coordination/index.d.ts +13 -13
- package/dist/coordination/index.js +660 -146
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +20 -20
- package/dist/defaults/index.js +918 -350
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-CiG9qUM_.d.ts → events-DH-9r-_C.d.ts} +42 -1
- package/dist/execution/index.d.ts +41 -30
- package/dist/execution/index.js +358 -112
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/extension/index.js.map +1 -1
- package/dist/{index-aizK8olO.d.ts → index-BIHJ4uII.d.ts} +11 -8
- package/dist/{index-p95HQ22A.d.ts → index-CFO9QmJo.d.ts} +8 -8
- package/dist/index.d.ts +311 -35
- package/dist/index.js +1933 -512
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/infrastructure/index.js +36 -0
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +9 -9
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-BkVEqkRe.d.ts → mcp-servers-DkESgh0G.d.ts} +25 -3
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/{multi-agent-3ZnTB1aT.d.ts → multi-agent-DNp6lAzg.d.ts} +35 -23
- package/dist/{multi-agent-coordinator-bRaI_aD1.d.ts → multi-agent-coordinator-CAhsegPz.d.ts} +20 -2
- package/dist/{null-fleet-bus-DKM3Iy9d.d.ts → null-fleet-bus-Dnl19vmf.d.ts} +411 -110
- package/dist/observability/index.d.ts +2 -2
- package/dist/{path-resolver-TcJfc29Y.d.ts → path-resolver-CHiBL0DD.d.ts} +2 -2
- package/dist/{permission-bPuzAy4x.d.ts → permission-H35s9Evv.d.ts} +1 -1
- package/dist/{permission-policy-BUQSutpl.d.ts → permission-policy-CT-nRmTn.d.ts} +2 -2
- package/dist/{plan-templates-fkQTyz3U.d.ts → plan-templates-Bs8iRwi6.d.ts} +4 -4
- package/dist/{provider-runner-BEpikbbN.d.ts → provider-runner-BZdDrWrS.d.ts} +3 -3
- package/dist/{retry-policy-BYkq0ugs.d.ts → retry-policy-J9N_PM40.d.ts} +1 -1
- package/dist/sdd/index.d.ts +9 -10
- package/dist/sdd/index.js +224 -68
- package/dist/sdd/index.js.map +1 -1
- package/dist/security/index.d.ts +3 -3
- package/dist/{selector-pox8abg0.d.ts → selector-CFTh3Z6p.d.ts} +1 -1
- package/dist/{session-reader-CSWcb5Ga.d.ts → session-reader-C7JJlxOw.d.ts} +2 -2
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/storage/index.d.ts +390 -6
- package/dist/storage/index.js +672 -35
- package/dist/storage/index.js.map +1 -1
- package/dist/{system-prompt-Bs-Wliab.d.ts → system-prompt-CneIxVip.d.ts} +1 -1
- package/dist/{tool-executor-Boo3dekH.d.ts → tool-executor-flTuxsqO.d.ts} +9 -4
- package/dist/types/index.d.ts +14 -14
- package/dist/types/index.js +60 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +18 -6
- package/dist/utils/index.js +61 -56
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/compactor-DVTKL7XD.d.ts +0 -23
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { c as AgentPhase, b as AgentDefinition, d as DefaultMultiAgentCoordinator, f as DispatchClassifier } from './multi-agent-coordinator-
|
|
2
|
-
import { n as SubagentConfig, u as TaskResult, k as CoordinatorStatus, v as TaskSpec, M as MultiAgentConfig, t as SubagentRunner } from './multi-agent-
|
|
3
|
-
import { B as SessionWriter, Q as Tool, y as SessionStore } from './context-
|
|
1
|
+
import { c as AgentPhase, b as AgentDefinition, d as DefaultMultiAgentCoordinator, f as DispatchClassifier } from './multi-agent-coordinator-CAhsegPz.js';
|
|
2
|
+
import { n as SubagentConfig, u as TaskResult, k as CoordinatorStatus, v as TaskSpec, M as MultiAgentConfig, t as SubagentRunner } from './multi-agent-DNp6lAzg.js';
|
|
3
|
+
import { B as SessionWriter, Q as Tool, y as SessionStore } from './context-zkZeILpr.js';
|
|
4
|
+
import { F as FleetBus, e as FleetUsage, f as FleetUsageAggregator } from './agent-subagent-runner-U-rs7kk7.js';
|
|
5
|
+
import { EventEmitter } from 'node:events';
|
|
4
6
|
import { a as DirectorStateSnapshot } from './director-state-BmYi3DGA.js';
|
|
5
|
-
import { I as InMemoryAgentBridge } from './agent-bridge-
|
|
6
|
-
import {
|
|
7
|
-
import { E as EventBus } from './events-CiG9qUM_.js';
|
|
7
|
+
import { I as InMemoryAgentBridge } from './agent-bridge-Dti3KXGk.js';
|
|
8
|
+
import { E as EventBus } from './events-DH-9r-_C.js';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Agent catalog aggregator.
|
|
@@ -30,6 +31,237 @@ declare const AGENT_CATALOG: Record<string, AgentDefinition>;
|
|
|
30
31
|
/** Role lookup helper. Returns undefined for unknown roles. */
|
|
31
32
|
declare function getAgentDefinition(role: string): AgentDefinition | undefined;
|
|
32
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Alert levels the Director can emit when a collab session needs attention.
|
|
36
|
+
* These flow through the FleetBus so the host can display them in the UI.
|
|
37
|
+
*/
|
|
38
|
+
declare enum DirectorAlertLevel {
|
|
39
|
+
/** The agent is still making progress but has hit a soft budget limit. */
|
|
40
|
+
WARNING = "warning",
|
|
41
|
+
/** The agent has hit a hard limit and the session cannot continue. */
|
|
42
|
+
CRITICAL = "critical",
|
|
43
|
+
/** The Director has decided to cancel the session (user request or policy). */
|
|
44
|
+
CANCELLED = "cancelled"
|
|
45
|
+
}
|
|
46
|
+
interface DirectorAlert {
|
|
47
|
+
sessionId: string;
|
|
48
|
+
subagentId: string;
|
|
49
|
+
role: string;
|
|
50
|
+
level: DirectorAlertLevel;
|
|
51
|
+
/** Human-readable message for UI/logs */
|
|
52
|
+
message: string;
|
|
53
|
+
/** Budget kind that triggered this alert, if any */
|
|
54
|
+
budgetKind?: 'timeout' | 'iterations' | 'tool_calls' | 'tokens' | 'cost';
|
|
55
|
+
/** Elapsed ms at time of alert */
|
|
56
|
+
elapsedMs?: number;
|
|
57
|
+
/** Limit that was hit */
|
|
58
|
+
limit?: number;
|
|
59
|
+
/** /btw notes the director has collected (may be empty) */
|
|
60
|
+
btwNotes?: string[];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Immutable snapshot of target files at the start of a collab session.
|
|
64
|
+
* All agents in the session read from this snapshot — they see the same baseline.
|
|
65
|
+
*/
|
|
66
|
+
interface SharedFileSnapshot {
|
|
67
|
+
id: string;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
files: SharedFileEntry[];
|
|
70
|
+
}
|
|
71
|
+
interface SharedFileEntry {
|
|
72
|
+
path: string;
|
|
73
|
+
content: string;
|
|
74
|
+
language?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Bug finding emitted by BugHunter and consumed by RefactorPlanner + Critic.
|
|
78
|
+
*/
|
|
79
|
+
interface BugFinding {
|
|
80
|
+
id: string;
|
|
81
|
+
type: string;
|
|
82
|
+
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
83
|
+
location: {
|
|
84
|
+
file: string;
|
|
85
|
+
line: number;
|
|
86
|
+
};
|
|
87
|
+
description: string;
|
|
88
|
+
suggestedFix?: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Refactoring plan emitted by RefactorPlanner, consuming BugFinding(s).
|
|
92
|
+
*/
|
|
93
|
+
interface RefactorPlan {
|
|
94
|
+
id: string;
|
|
95
|
+
basedOnBugIds: string[];
|
|
96
|
+
phases: RefactorPhase[];
|
|
97
|
+
riskScore: 'low' | 'medium' | 'high';
|
|
98
|
+
estimatedChangeCount: number;
|
|
99
|
+
rollbackStrategy: string;
|
|
100
|
+
}
|
|
101
|
+
/** One phase within a refactor plan. */
|
|
102
|
+
interface RefactorPhase {
|
|
103
|
+
number: number;
|
|
104
|
+
title: string;
|
|
105
|
+
tasks: string[];
|
|
106
|
+
risk: 'low' | 'medium' | 'high';
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Critic evaluation of a bug finding or refactor plan.
|
|
110
|
+
*/
|
|
111
|
+
interface CriticEvaluation {
|
|
112
|
+
id: string;
|
|
113
|
+
subjectType: 'bug_finding' | 'refactor_plan';
|
|
114
|
+
subjectId: string;
|
|
115
|
+
score: number;
|
|
116
|
+
verdict: 'approve' | 'needs_revision' | 'reject';
|
|
117
|
+
strengths: string[];
|
|
118
|
+
weaknesses: string[];
|
|
119
|
+
concerns: CriticConcern[];
|
|
120
|
+
}
|
|
121
|
+
interface CriticConcern {
|
|
122
|
+
description: string;
|
|
123
|
+
location?: {
|
|
124
|
+
file: string;
|
|
125
|
+
line: number;
|
|
126
|
+
};
|
|
127
|
+
severity: 'blocking' | 'advisory';
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Full structured report produced when a CollabSession resolves.
|
|
131
|
+
*/
|
|
132
|
+
interface CollabDebugReport {
|
|
133
|
+
sessionId: string;
|
|
134
|
+
startedAt: string;
|
|
135
|
+
completedAt: string;
|
|
136
|
+
targetPaths: string[];
|
|
137
|
+
/** How the session ended. 'completed' = all agents finished normally.
|
|
138
|
+
* 'cancelled' = Director called cancelCollabSession().
|
|
139
|
+
* 'timeout' = session-level timeout elapsed before all agents finished.
|
|
140
|
+
* 'critical_alert' = Director escalated a warning to a cancel decision.
|
|
141
|
+
*/
|
|
142
|
+
disposition: 'completed' | 'cancelled' | 'timeout' | 'critical_alert';
|
|
143
|
+
bugs: BugFinding[];
|
|
144
|
+
refactorPlans: RefactorPlan[];
|
|
145
|
+
evaluations: CriticEvaluation[];
|
|
146
|
+
/** Alerts that were raised during the session (may be empty). */
|
|
147
|
+
alerts: DirectorAlert[];
|
|
148
|
+
/** Overall verdict from the Critic across all evaluated subjects. */
|
|
149
|
+
overallVerdict: 'approve' | 'needs_revision' | 'reject';
|
|
150
|
+
/** Markdown-formatted summary for the director's context window. */
|
|
151
|
+
summary: string;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Per-agent budget configuration for collab sessions.
|
|
155
|
+
* Allows the caller (Director) to control the exact limits instead of
|
|
156
|
+
* using hard-coded defaults that may not match the director's policy.
|
|
157
|
+
*/
|
|
158
|
+
interface CollabBudgetConfig {
|
|
159
|
+
maxIterations: number;
|
|
160
|
+
maxToolCalls: number;
|
|
161
|
+
timeoutMs: number;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Budget overrides for specific roles in a collab session.
|
|
165
|
+
* When a role is not present in the map, the default budget is used.
|
|
166
|
+
*/
|
|
167
|
+
type CollabBudgetOverrides = Partial<Record<string, CollabBudgetConfig>>;
|
|
168
|
+
/**
|
|
169
|
+
* Emitted by a collab agent when it hits a soft budget limit.
|
|
170
|
+
* The Director's fleet handler receives this and calls collabAlert().
|
|
171
|
+
*/
|
|
172
|
+
interface CollabBudgetWarningPayload {
|
|
173
|
+
sessionId: string;
|
|
174
|
+
role: string;
|
|
175
|
+
kind: 'timeout' | 'iterations' | 'tool_calls' | 'tokens' | 'cost';
|
|
176
|
+
used: number;
|
|
177
|
+
limit: number;
|
|
178
|
+
timeoutMs?: number;
|
|
179
|
+
elapsedMs: number;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Emitted by the Director to cancel all agents in a collab session.
|
|
183
|
+
* CollabSession listens for this and causes its agent pool to finish early.
|
|
184
|
+
*/
|
|
185
|
+
interface DirectorCancelCollabPayload {
|
|
186
|
+
sessionId: string;
|
|
187
|
+
reason: string;
|
|
188
|
+
cancelledAt: string;
|
|
189
|
+
}
|
|
190
|
+
interface CollabSessionOptions {
|
|
191
|
+
/** Paths to scan — used to build the SharedFileSnapshot. */
|
|
192
|
+
targetPaths: string[];
|
|
193
|
+
/** Files already read and snapshot. When provided, snapshot is skipped. */
|
|
194
|
+
prebuiltSnapshot?: SharedFileSnapshot;
|
|
195
|
+
/** Max time to wait for the session to resolve (ms). Default: 10 min. */
|
|
196
|
+
timeoutMs?: number;
|
|
197
|
+
/**
|
|
198
|
+
* Budget overrides per role. When provided, these override the hard-coded
|
|
199
|
+
* defaults so the Director can enforce fleet-wide budget policy.
|
|
200
|
+
* Keys must match role names: 'bug-hunter', 'refactor-planner', 'critic'.
|
|
201
|
+
*/
|
|
202
|
+
budgetOverrides?: CollabBudgetOverrides;
|
|
203
|
+
/**
|
|
204
|
+
* Called by the Director when a collab agent hits a soft budget limit.
|
|
205
|
+
* The Director uses this to decide whether to cancel the session or extend.
|
|
206
|
+
* Return 'cancel' to stop the session immediately; 'extend' to continue
|
|
207
|
+
* with the agent's proposed new limits; 'ignore' to let the default
|
|
208
|
+
* auto-extend logic handle it.
|
|
209
|
+
*/
|
|
210
|
+
onBudgetWarning?: (alert: DirectorAlert) => 'cancel' | 'extend' | 'ignore';
|
|
211
|
+
}
|
|
212
|
+
declare class CollabSession extends EventEmitter {
|
|
213
|
+
readonly sessionId: string;
|
|
214
|
+
readonly options: CollabSessionOptions;
|
|
215
|
+
readonly snapshot: SharedFileSnapshot;
|
|
216
|
+
private readonly director;
|
|
217
|
+
private readonly fleetBus;
|
|
218
|
+
private readonly subagentIds;
|
|
219
|
+
private readonly bugs;
|
|
220
|
+
private readonly plans;
|
|
221
|
+
private readonly evaluations;
|
|
222
|
+
private readonly disposers;
|
|
223
|
+
private settled;
|
|
224
|
+
private readonly timeoutMs;
|
|
225
|
+
private cancelled;
|
|
226
|
+
private readonly alerts;
|
|
227
|
+
/** Tracks tool call counts per subagent for progress-based timeout decisions. */
|
|
228
|
+
private readonly progressBySubagent;
|
|
229
|
+
/** Last tool call count when a timeout warning was handled. */
|
|
230
|
+
private readonly lastTimeoutProgress;
|
|
231
|
+
/** Session-level timeout timer handle (cleared on cancel or natural completion). */
|
|
232
|
+
private _timeoutTimer?;
|
|
233
|
+
constructor(director: Director, fleetBus: FleetBus, options: CollabSessionOptions);
|
|
234
|
+
get id(): string;
|
|
235
|
+
getSessionAlerts(): DirectorAlert[];
|
|
236
|
+
isCancelled(): boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Snapshot of role → subagentId map. The Director calls coordinator.stop()
|
|
239
|
+
* for each agent when cancelling the session, using this map to enumerate
|
|
240
|
+
* all three collab agents.
|
|
241
|
+
*/
|
|
242
|
+
getSubagentIds(): ReadonlyMap<string, string>;
|
|
243
|
+
buildSnapshot(): Promise<SharedFileSnapshot>;
|
|
244
|
+
/**
|
|
245
|
+
* Cancel the session. Emits director.cancel_collab on the FleetBus so all
|
|
246
|
+
* collab agents finish early. The session-level timeout timer is also cleared.
|
|
247
|
+
* Safe to call multiple times (idempotent after first call).
|
|
248
|
+
*/
|
|
249
|
+
cancel(reason?: string): void;
|
|
250
|
+
start(): Promise<CollabDebugReport>;
|
|
251
|
+
private parseAndEmit;
|
|
252
|
+
private extractJsonObjects;
|
|
253
|
+
private budgetForRole;
|
|
254
|
+
private spawnAgent;
|
|
255
|
+
private buildBugHunterTask;
|
|
256
|
+
private buildRefactorPlannerTask;
|
|
257
|
+
private buildCriticTask;
|
|
258
|
+
private wireFleetBus;
|
|
259
|
+
private roleFromSubagentId;
|
|
260
|
+
private assembleReport;
|
|
261
|
+
private buildMarkdownSummary;
|
|
262
|
+
private cleanup;
|
|
263
|
+
}
|
|
264
|
+
|
|
33
265
|
/**
|
|
34
266
|
* Interface for a fleet coordinator. Implemented by both `Director`
|
|
35
267
|
* (full LLM-driven orchestration with fleet policy) and
|
|
@@ -155,14 +387,22 @@ interface IFleetManager {
|
|
|
155
387
|
} | undefined;
|
|
156
388
|
/**
|
|
157
389
|
* Called before a spawn is recorded. Returns a reason string if the
|
|
158
|
-
* spawn should be rejected (budget cap, depth limit, cost cap,
|
|
159
|
-
* or null to proceed. Director.spawn() calls this
|
|
390
|
+
* spawn should be rejected (budget cap, depth limit, cost cap, context
|
|
391
|
+
* overload, etc.), or null to proceed. Director.spawn() calls this
|
|
392
|
+
* internally.
|
|
160
393
|
*/
|
|
161
394
|
canSpawn(config: SubagentConfig): {
|
|
162
|
-
kind: 'max_spawns' | 'max_spawn_depth' | 'max_cost_usd';
|
|
395
|
+
kind: 'max_spawns' | 'max_spawn_depth' | 'max_cost_usd' | 'max_context_load';
|
|
163
396
|
limit: number;
|
|
164
397
|
observed: number;
|
|
165
398
|
} | null;
|
|
399
|
+
/**
|
|
400
|
+
* Update the leader agent's current context pressure (tokens used in the
|
|
401
|
+
* full API request: messages + systemPrompt + toolDefs). The fleet manager
|
|
402
|
+
* checks this before allowing a new spawn to prevent the leader from
|
|
403
|
+
* overflowing its context window while orchestrating subagents.
|
|
404
|
+
*/
|
|
405
|
+
setLeaderContextPressure(tokens: number): void;
|
|
166
406
|
/**
|
|
167
407
|
* Assign a memorable nickname (e.g. "Einstein (Bug Hunter)"), mark it
|
|
168
408
|
* as used so it is never reused, then record the spawn. The nickname
|
|
@@ -283,6 +523,19 @@ interface FleetManagerOptions {
|
|
|
283
523
|
directorBudget?: {
|
|
284
524
|
maxCostUsd?: number;
|
|
285
525
|
};
|
|
526
|
+
/**
|
|
527
|
+
* Maximum context load (as a fraction of maxContext) the leader agent
|
|
528
|
+
* is allowed to reach before a new spawn is rejected. Default: 0.85.
|
|
529
|
+
* When the leader's context pressure exceeds this threshold, spawning
|
|
530
|
+
* a new subagent is refused — the leader must compact first.
|
|
531
|
+
* Set to 1.0 to disable this check.
|
|
532
|
+
*/
|
|
533
|
+
maxLeaderContextLoad?: number;
|
|
534
|
+
/**
|
|
535
|
+
* Provider's max context window in tokens. Used with `maxLeaderContextLoad`
|
|
536
|
+
* to compute the absolute token threshold. Default: 128_000.
|
|
537
|
+
*/
|
|
538
|
+
maxContext?: number;
|
|
286
539
|
}
|
|
287
540
|
/**
|
|
288
541
|
* Fleet-level policy container extracted from `Director`. Owns:
|
|
@@ -309,7 +562,6 @@ declare class FleetManager implements IFleetManager {
|
|
|
309
562
|
/** Usage rollup across all subagents. */
|
|
310
563
|
readonly usage: FleetUsageAggregator;
|
|
311
564
|
private readonly manifestPath?;
|
|
312
|
-
private readonly sessionsRoot?;
|
|
313
565
|
private readonly directorRunId;
|
|
314
566
|
/** Spawn cap (lifetime total). Infinity means unlimited. */
|
|
315
567
|
readonly maxSpawns: number;
|
|
@@ -337,6 +589,12 @@ declare class FleetManager implements IFleetManager {
|
|
|
337
589
|
private readonly _usedNicknames;
|
|
338
590
|
/** The coordinator (wired via setCoordinator by Director after construction). */
|
|
339
591
|
private coordinator;
|
|
592
|
+
/** Leader agent's current context pressure (full request tokens). */
|
|
593
|
+
private leaderContextPressure;
|
|
594
|
+
/** Maximum context load fraction before spawn is refused. */
|
|
595
|
+
private readonly maxLeaderContextLoad;
|
|
596
|
+
/** Provider's max context window in tokens. */
|
|
597
|
+
private readonly maxContext;
|
|
340
598
|
constructor(opts?: FleetManagerOptions);
|
|
341
599
|
get fleetBus(): FleetBus;
|
|
342
600
|
/**
|
|
@@ -356,11 +614,12 @@ declare class FleetManager implements IFleetManager {
|
|
|
356
614
|
* which cap was exceeded. Does NOT throw — the caller decides
|
|
357
615
|
* how to surface the rejection.
|
|
358
616
|
*/
|
|
359
|
-
canSpawn(
|
|
360
|
-
kind: 'max_spawns' | 'max_spawn_depth' | 'max_cost_usd';
|
|
617
|
+
canSpawn(_config: SubagentConfig): {
|
|
618
|
+
kind: 'max_spawns' | 'max_spawn_depth' | 'max_cost_usd' | 'max_context_load';
|
|
361
619
|
limit: number;
|
|
362
620
|
observed: number;
|
|
363
621
|
} | null;
|
|
622
|
+
setLeaderContextPressure(tokens: number): void;
|
|
364
623
|
/**
|
|
365
624
|
* Assign a memorable nickname (e.g. "Einstein (Bug Hunter)") to the config,
|
|
366
625
|
* record it so the same name is never reused, then record the spawn.
|
|
@@ -445,98 +704,6 @@ declare class FleetManager implements IFleetManager {
|
|
|
445
704
|
};
|
|
446
705
|
}
|
|
447
706
|
|
|
448
|
-
/**
|
|
449
|
-
* Immutable snapshot of target files at the start of a collab session.
|
|
450
|
-
* All agents in the session read from this snapshot — they see the same baseline.
|
|
451
|
-
*/
|
|
452
|
-
interface SharedFileSnapshot {
|
|
453
|
-
id: string;
|
|
454
|
-
createdAt: string;
|
|
455
|
-
files: SharedFileEntry[];
|
|
456
|
-
}
|
|
457
|
-
interface SharedFileEntry {
|
|
458
|
-
path: string;
|
|
459
|
-
content: string;
|
|
460
|
-
language?: string;
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
* Bug finding emitted by BugHunter and consumed by RefactorPlanner + Critic.
|
|
464
|
-
*/
|
|
465
|
-
interface BugFinding {
|
|
466
|
-
id: string;
|
|
467
|
-
type: string;
|
|
468
|
-
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
469
|
-
location: {
|
|
470
|
-
file: string;
|
|
471
|
-
line: number;
|
|
472
|
-
};
|
|
473
|
-
description: string;
|
|
474
|
-
suggestedFix?: string;
|
|
475
|
-
}
|
|
476
|
-
/**
|
|
477
|
-
* Refactoring plan emitted by RefactorPlanner, consuming BugFinding(s).
|
|
478
|
-
*/
|
|
479
|
-
interface RefactorPlan {
|
|
480
|
-
id: string;
|
|
481
|
-
basedOnBugIds: string[];
|
|
482
|
-
phases: RefactorPhase[];
|
|
483
|
-
riskScore: 'low' | 'medium' | 'high';
|
|
484
|
-
estimatedChangeCount: number;
|
|
485
|
-
rollbackStrategy: string;
|
|
486
|
-
}
|
|
487
|
-
/** One phase within a refactor plan. */
|
|
488
|
-
interface RefactorPhase {
|
|
489
|
-
number: number;
|
|
490
|
-
title: string;
|
|
491
|
-
tasks: string[];
|
|
492
|
-
risk: 'low' | 'medium' | 'high';
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* Critic evaluation of a bug finding or refactor plan.
|
|
496
|
-
*/
|
|
497
|
-
interface CriticEvaluation {
|
|
498
|
-
id: string;
|
|
499
|
-
subjectType: 'bug_finding' | 'refactor_plan';
|
|
500
|
-
subjectId: string;
|
|
501
|
-
score: number;
|
|
502
|
-
verdict: 'approve' | 'needs_revision' | 'reject';
|
|
503
|
-
strengths: string[];
|
|
504
|
-
weaknesses: string[];
|
|
505
|
-
concerns: CriticConcern[];
|
|
506
|
-
}
|
|
507
|
-
interface CriticConcern {
|
|
508
|
-
description: string;
|
|
509
|
-
location?: {
|
|
510
|
-
file: string;
|
|
511
|
-
line: number;
|
|
512
|
-
};
|
|
513
|
-
severity: 'blocking' | 'advisory';
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Full structured report produced when a CollabSession resolves.
|
|
517
|
-
*/
|
|
518
|
-
interface CollabDebugReport {
|
|
519
|
-
sessionId: string;
|
|
520
|
-
startedAt: string;
|
|
521
|
-
completedAt: string;
|
|
522
|
-
targetPaths: string[];
|
|
523
|
-
bugs: BugFinding[];
|
|
524
|
-
refactorPlans: RefactorPlan[];
|
|
525
|
-
evaluations: CriticEvaluation[];
|
|
526
|
-
/** Overall verdict from the Critic across all evaluated subjects. */
|
|
527
|
-
overallVerdict: 'approve' | 'needs_revision' | 'reject';
|
|
528
|
-
/** Markdown-formatted summary for the director's context window. */
|
|
529
|
-
summary: string;
|
|
530
|
-
}
|
|
531
|
-
interface CollabSessionOptions {
|
|
532
|
-
/** Paths to scan — used to build the SharedFileSnapshot. */
|
|
533
|
-
targetPaths: string[];
|
|
534
|
-
/** Files already read and snapshot. When provided, snapshot is skipped. */
|
|
535
|
-
prebuiltSnapshot?: SharedFileSnapshot;
|
|
536
|
-
/** Max time to wait for the session to resolve (ms). Default: 10 min. */
|
|
537
|
-
timeoutMs?: number;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
707
|
/**
|
|
541
708
|
* Director — high-level orchestrator that owns a `MultiAgentCoordinator`,
|
|
542
709
|
* a `FleetBus`, and a `FleetUsageAggregator`. Exposes a small imperative
|
|
@@ -707,6 +874,21 @@ interface DirectorOptions {
|
|
|
707
874
|
* `makeLLMClassifier(complete)` from the dispatcher module.
|
|
708
875
|
*/
|
|
709
876
|
dispatchClassifier?: DispatchClassifier;
|
|
877
|
+
/**
|
|
878
|
+
* Maximum context load (as a fraction of maxContext) the leader agent
|
|
879
|
+
* is allowed to reach before a new spawn is rejected. Default: 0.85.
|
|
880
|
+
* When the leader's context pressure exceeds this threshold, spawning
|
|
881
|
+
* a new subagent is refused — the leader must compact first.
|
|
882
|
+
* Only used when no `fleetManager` is provided (inline mode).
|
|
883
|
+
* Set to 1.0 to disable this check.
|
|
884
|
+
*/
|
|
885
|
+
maxLeaderContextLoad?: number;
|
|
886
|
+
/**
|
|
887
|
+
* Provider's max context window in tokens. Used with `maxLeaderContextLoad`
|
|
888
|
+
* to compute the absolute token threshold. Default: 128_000.
|
|
889
|
+
* Only used when no `fleetManager` is provided (inline mode).
|
|
890
|
+
*/
|
|
891
|
+
maxContext?: number;
|
|
710
892
|
}
|
|
711
893
|
/**
|
|
712
894
|
* Thrown by `Director.spawn()` when a configured spawn cap (`maxSpawns`,
|
|
@@ -718,7 +900,7 @@ declare class FleetSpawnBudgetError extends Error {
|
|
|
718
900
|
readonly kind: 'max_spawns' | 'max_spawn_depth';
|
|
719
901
|
readonly limit: number;
|
|
720
902
|
readonly observed: number;
|
|
721
|
-
constructor(kind: 'max_spawns' | 'max_spawn_depth', limit: number, observed: number);
|
|
903
|
+
constructor(kind: 'max_spawns' | 'max_spawn_depth', limit: number, observed: number, message?: string);
|
|
722
904
|
}
|
|
723
905
|
/**
|
|
724
906
|
* Thrown by `Director.spawn()` when the fleet-wide cost cap is exceeded.
|
|
@@ -746,6 +928,20 @@ declare class Director implements ICoordinator {
|
|
|
746
928
|
* injected; otherwise own FleetUsageAggregator.
|
|
747
929
|
*/
|
|
748
930
|
readonly usage: FleetUsageAggregator;
|
|
931
|
+
/**
|
|
932
|
+
* Update the leader agent's current context pressure (full request tokens:
|
|
933
|
+
* messages + systemPrompt + toolDefs). The director checks this before every
|
|
934
|
+
* spawn — if the pressure exceeds `maxLeaderContextLoad * maxContext`,
|
|
935
|
+
* spawning is refused with a `FleetContextOverflowError`.
|
|
936
|
+
*
|
|
937
|
+
* Call this after each leader agent iteration to keep the pressure current.
|
|
938
|
+
* The compactor's `CompactReport.fullRequestTokensAfter` is a natural source.
|
|
939
|
+
*/
|
|
940
|
+
setLeaderContextPressure(tokens: number): void;
|
|
941
|
+
/**
|
|
942
|
+
* Read the leader agent's current context pressure.
|
|
943
|
+
*/
|
|
944
|
+
getLeaderContextPressure(): number;
|
|
749
945
|
/**
|
|
750
946
|
* Optional fleet-level policy container. When provided the Director
|
|
751
947
|
* delegates spawn budgeting, manifest entries, and checkpointing to it
|
|
@@ -831,6 +1027,23 @@ declare class Director implements ICoordinator {
|
|
|
831
1027
|
private taskCompletedListener;
|
|
832
1028
|
/** Optional LLM classifier for smart dispatch. Passed from options. */
|
|
833
1029
|
readonly dispatchClassifier?: DispatchClassifier;
|
|
1030
|
+
/** Leader agent's current context pressure (full request tokens). */
|
|
1031
|
+
private leaderContextPressure;
|
|
1032
|
+
/** Maximum context load fraction before spawn is refused. */
|
|
1033
|
+
private readonly maxLeaderContextLoad;
|
|
1034
|
+
/** Provider's max context window in tokens. */
|
|
1035
|
+
private readonly maxContext;
|
|
1036
|
+
/**
|
|
1037
|
+
* When set by `workComplete()`, the director stops dispatching new tasks
|
|
1038
|
+
* and terminates all running subagents. Used when the director's LLM decides
|
|
1039
|
+
* the goal is satisfied and no further spawns are needed — prevents the
|
|
1040
|
+
* coordinator from keeping workers alive for tasks that will never arrive.
|
|
1041
|
+
*/
|
|
1042
|
+
private workCompleteFlag;
|
|
1043
|
+
/** Pending /btw notes stashed by the leader agent (see setLeaderBtwNote). */
|
|
1044
|
+
private _leaderBtwNotes;
|
|
1045
|
+
/** Active collab sessions tracked by sessionId (see spawnCollab). */
|
|
1046
|
+
private readonly _activeCollabSessions;
|
|
834
1047
|
constructor(opts: DirectorOptions);
|
|
835
1048
|
/**
|
|
836
1049
|
* Record a granted budget extension and broadcast it on the FleetBus so
|
|
@@ -840,6 +1053,75 @@ declare class Director implements ICoordinator {
|
|
|
840
1053
|
private recordExtension;
|
|
841
1054
|
/** Cumulative auto-extension count for one subagent (0 when never extended). */
|
|
842
1055
|
extensionsFor(subagentId: string): number;
|
|
1056
|
+
/**
|
|
1057
|
+
* Signal that the director's work is done. Once called:
|
|
1058
|
+
* - `spawn()` throws `FleetSpawnBudgetError('max_spawns', …)` — no new
|
|
1059
|
+
* subagents can be created
|
|
1060
|
+
* - Running subagents are NOT forcibly stopped — they finish naturally,
|
|
1061
|
+
* but no new tasks are dispatched to them
|
|
1062
|
+
*
|
|
1063
|
+
* This lets the director LLM say "I'm satisfied with the results, stop
|
|
1064
|
+
* spawning and wind down" — without killing in-flight work mid-execution.
|
|
1065
|
+
* Call `terminateAll()` separately if you need immediate teardown.
|
|
1066
|
+
*
|
|
1067
|
+
* Idempotent — calling twice is a no-op.
|
|
1068
|
+
*/
|
|
1069
|
+
workComplete(): void;
|
|
1070
|
+
/** Returns true if `workComplete()` has been called on this director. */
|
|
1071
|
+
isWorkComplete(): boolean;
|
|
1072
|
+
/**
|
|
1073
|
+
* Stashes a /btw note on the leader agent's context. The leader's agent loop
|
|
1074
|
+
* calls `consumeBtwNotes()` at each iteration boundary and folds pending notes
|
|
1075
|
+
* into the conversation as a visible block — no abort, no restart, just a
|
|
1076
|
+
* "by the way" nudge the model picks up on its next turn.
|
|
1077
|
+
*
|
|
1078
|
+
* This is the entry point for the host (CLI, TUI) to inject /btw notes
|
|
1079
|
+
* programmatically without going through the slash-command path.
|
|
1080
|
+
*/
|
|
1081
|
+
setLeaderBtwNote(note: string): number;
|
|
1082
|
+
/**
|
|
1083
|
+
* Read and clear all pending /btw notes the leader has stashed.
|
|
1084
|
+
* Returns them in FIFO order (empty array when none).
|
|
1085
|
+
*
|
|
1086
|
+
* Called by CollabSession when a budget threshold event fires so the
|
|
1087
|
+
* Director can inspect accumulated /btw notes before deciding whether
|
|
1088
|
+
* to cancel the collab session or let it continue.
|
|
1089
|
+
*/
|
|
1090
|
+
getLeaderBtwNotes(): string[];
|
|
1091
|
+
/**
|
|
1092
|
+
* Peek at pending /btw notes without consuming them.
|
|
1093
|
+
* Useful for UI to show "N pending notes" without clearing them.
|
|
1094
|
+
*/
|
|
1095
|
+
peekLeaderBtwNotes(): string[];
|
|
1096
|
+
/**
|
|
1097
|
+
* Drain (read + clear) all /btw notes in one call.
|
|
1098
|
+
* Alias for getLeaderBtwNotes() — kept for symmetry with consumeBtwNotes()
|
|
1099
|
+
* in the agent's btw.ts. The Director calls this at the point where it
|
|
1100
|
+
* makes a cancellation decision, not on every budget event.
|
|
1101
|
+
*/
|
|
1102
|
+
drainLeaderBtwNotes(): string[];
|
|
1103
|
+
/**
|
|
1104
|
+
* Cancel an active collab session by its id.
|
|
1105
|
+
* Emits `director.cancel_collab` on the FleetBus so the session's agents
|
|
1106
|
+
* finish early with a 'cancelled' disposition.
|
|
1107
|
+
*
|
|
1108
|
+
* Returns silently if the session id is not tracked or already settled.
|
|
1109
|
+
* The CollabDebugReport will reflect 'cancelled' disposition when awaited.
|
|
1110
|
+
*/
|
|
1111
|
+
cancelCollabSession(sessionId: string, reason?: string): void;
|
|
1112
|
+
/**
|
|
1113
|
+
* Subscribe a callback to be notified whenever a collab session raises
|
|
1114
|
+
* an alert (warning level). The callback receives the full DirectorAlert
|
|
1115
|
+
* payload so the host (CLI, TUI) can display it to the user.
|
|
1116
|
+
* Returns an unsubscribe function.
|
|
1117
|
+
*/
|
|
1118
|
+
onCollabAlert(handler: (alert: DirectorAlert) => void): () => void;
|
|
1119
|
+
/**
|
|
1120
|
+
* Returns all active (not yet settled) collab session ids.
|
|
1121
|
+
* Useful for the TUI to render a "N active sessions" badge and for
|
|
1122
|
+
* the host to know what can be cancelled.
|
|
1123
|
+
*/
|
|
1124
|
+
activeCollabSessions(): string[];
|
|
843
1125
|
/** Best-effort session-writer append. Swallows failures — the director
|
|
844
1126
|
* must not break a fleet run because the session JSONL handle closed. */
|
|
845
1127
|
private appendSessionEvent;
|
|
@@ -1072,11 +1354,30 @@ declare function makeFleetHealthTool(director: Director): Tool;
|
|
|
1072
1354
|
declare function makeCollabDebugTool(director: Director): Tool;
|
|
1073
1355
|
/**
|
|
1074
1356
|
* Tool for subagents to emit structured events on the FleetBus.
|
|
1075
|
-
*
|
|
1076
|
-
*
|
|
1077
|
-
*
|
|
1357
|
+
* Any agent can emit any event type; the Director routes it to all listeners.
|
|
1358
|
+
* Common event types in collaborative sessions:
|
|
1359
|
+
* bug.found — BugHunter emits per-finding
|
|
1360
|
+
* refactor.plan — RefactorPlanner emits per-plan
|
|
1361
|
+
* critic.evaluation — Critic emits per-evaluation
|
|
1362
|
+
*
|
|
1363
|
+
* The payload structure is event-type-specific. Use null for empty payloads.
|
|
1078
1364
|
*/
|
|
1079
1365
|
declare function makeFleetEmitTool(director: Director): Tool;
|
|
1366
|
+
/**
|
|
1367
|
+
* Signal that the director's work is satisfied and the fleet should wind down.
|
|
1368
|
+
*
|
|
1369
|
+
* Once called:
|
|
1370
|
+
* - `spawn_subagent` throws — no new subagents can be created
|
|
1371
|
+
* - `assign_task` synthesizes an immediate `aborted_by_parent` completion
|
|
1372
|
+
* for any queued task (callers awaiting those tasks unblock immediately)
|
|
1373
|
+
* - Running subagents are NOT killed — they finish naturally; no new
|
|
1374
|
+
* tasks are dispatched to them
|
|
1375
|
+
*
|
|
1376
|
+
* Use this when you are satisfied with the results and want the fleet to
|
|
1377
|
+
* stop spawning without forcibly stopping in-flight work. Call
|
|
1378
|
+
* `terminate_subagent` separately for any subagent you need to stop immediately.
|
|
1379
|
+
*/
|
|
1380
|
+
declare function makeWorkCompleteTool(director: Director): Tool;
|
|
1080
1381
|
|
|
1081
1382
|
/**
|
|
1082
1383
|
* Opaque host interface so this factory doesn't have to depend on the
|
|
@@ -1245,7 +1546,7 @@ declare function makeDirectorSessionFactory(opts: DirectorSessionFactoryOptions)
|
|
|
1245
1546
|
* descriptions live on the tool definitions themselves; this preamble only
|
|
1246
1547
|
* teaches *when* to reach for them.
|
|
1247
1548
|
*/
|
|
1248
|
-
declare const DEFAULT_DIRECTOR_PREAMBLE = "You are the Director of a multi-agent fleet. You orchestrate worker\nsubagents by spawning them, assigning tasks, awaiting completions, and\nrolling up their outputs into your next decision.\n\nCore fleet tools available to you:\n - spawn_subagent \u2014 create a worker with a chosen provider / model / role\n - assign_task \u2014 hand a piece of work to a specific subagent\n - await_tasks \u2014 block until named task ids complete (parallel-safe)\n - ask_subagent \u2014 synchronously query a running subagent via the bridge\n - roll_up \u2014 aggregate finished tasks into a markdown/json summary\n - terminate_subagent \u2014 abort a stuck worker (use sparingly)\n - fleet_status \u2014 snapshot of all subagents and pending tasks\n - fleet_usage \u2014 token + cost breakdown per subagent and total\n\nWorking rules:\n 1. Decompose first. Before spawning, decide which sub-tasks are\n independent and can run in parallel. Sequential work doesn't need a\n subagent \u2014 do it yourself.\n 2. Match worker to job. Cheap/fast model for triage, capable model for\n synthesis. Different providers per sibling is allowed and encouraged.\n 3. Always pair an assign with an await. Don't fire-and-forget; you owe\n the user a single coherent answer at the end.\n 4. Roll up before deciding. After await_tasks resolves, call roll_up so\n the results are folded back into your context in a compact form.\n 5. Budget is real. Check fleet_usage periodically. If a subagent is\n thrashing, terminate it rather than letting cost climb silently.\n 6. Never claim a subagent's work as your own without verifying it. If a\n result looks wrong, ask_subagent for clarification before passing it\n to the user.";
|
|
1549
|
+
declare const DEFAULT_DIRECTOR_PREAMBLE = "You are the Director of a multi-agent fleet. You orchestrate worker\nsubagents by spawning them, assigning tasks, awaiting completions, and\nrolling up their outputs into your next decision.\n\nCore fleet tools available to you:\n - spawn_subagent \u2014 create a worker with a chosen provider / model / role\n - assign_task \u2014 hand a piece of work to a specific subagent\n - await_tasks \u2014 block until named task ids complete (parallel-safe)\n - ask_subagent \u2014 synchronously query a running subagent via the bridge\n - roll_up \u2014 aggregate finished tasks into a markdown/json summary\n - terminate_subagent \u2014 abort a stuck worker (use sparingly)\n - fleet_status \u2014 snapshot of all subagents and pending tasks\n - fleet_usage \u2014 token + cost breakdown per subagent and total\n\nWorking rules:\n 1. Decompose first. Before spawning, decide which sub-tasks are\n independent and can run in parallel. Sequential work doesn't need a\n subagent \u2014 do it yourself.\n 2. Match worker to job. Cheap/fast model for triage, capable model for\n synthesis. Different providers per sibling is allowed and encouraged.\n 3. Always pair an assign with an await. Don't fire-and-forget; you owe\n the user a single coherent answer at the end.\n 4. Roll up before deciding. After await_tasks resolves, call roll_up so\n the results are folded back into your context in a compact form.\n 5. Budget is real. Check fleet_usage periodically. If a subagent is\n thrashing, terminate it rather than letting cost climb silently.\n 6. Never claim a subagent's work as your own without verifying it. If a\n result looks wrong, ask_subagent for clarification before passing it\n to the user.\n 7. Wind down when satisfied. When the results are good enough, call\n work_complete \u2014 no new subagents will spawn and queued tasks complete\n as aborted. Running subagents finish naturally. Call terminate_subagent\n only for ones you need to stop immediately.";
|
|
1249
1550
|
/**
|
|
1250
1551
|
* Default baseline prepended to every subagent's system prompt. Tells the
|
|
1251
1552
|
* subagent its place in the hierarchy and the bridge contract — without
|
|
@@ -1444,4 +1745,4 @@ declare function attachAutoExtend(events: EventBus, policy?: AutoExtendPolicy):
|
|
|
1444
1745
|
*/
|
|
1445
1746
|
declare const NULL_FLEET_BUS: FleetBus;
|
|
1446
1747
|
|
|
1447
|
-
export { ACP_AGENTS as A, BUG_HUNTER_AGENT as B, type
|
|
1748
|
+
export { makeAskTool as $, ACP_AGENTS as A, BUG_HUNTER_AGENT as B, type CollabBudgetConfig as C, DEFAULT_DIRECTOR_PREAMBLE as D, FLEET_ROSTER_WITHACP as E, FLEET_ROSTER as F, FleetCostCapError as G, FleetManager as H, type FleetManagerOptions as I, type FleetRosterBudget as J, FleetSpawnBudgetError as K, type ICoordinator as L, type IFleetManager as M, NULL_FLEET_BUS as N, type RefactorPhase as O, type RefactorPlan as P, type SharedFileEntry as Q, REFACTOR_PLANNER_AGENT as R, SECURITY_SCANNER_AGENT as S, type SharedFileSnapshot as T, type SubagentPromptParts as U, applyRosterBudget as V, attachAutoExtend as W, composeDirectorPrompt as X, composeSubagentPrompt as Y, createDelegateTool as Z, getAgentDefinition as _, AGENTS_BY_PHASE as a, makeAssignTool as a0, makeAwaitTasksTool as a1, makeCollabDebugTool as a2, makeDirectorSessionFactory as a3, makeFleetEmitTool as a4, makeFleetHealthTool as a5, makeFleetSessionTool as a6, makeFleetStatusTool as a7, makeFleetUsageTool as a8, makeRollUpTool as a9, makeSpawnTool as aa, makeTerminateTool as ab, makeWorkCompleteTool as ac, rosterSummaryFromConfigs as ad, AGENT_CATALOG as b, ALL_AGENT_DEFINITIONS as c, ALL_FLEET_AGENTS as d, AUDIT_LOG_AGENT as e, type AutoExtendCeiling as f, type AutoExtendPolicy as g, type BugFinding as h, type CollabBudgetOverrides as i, type CollabBudgetWarningPayload as j, type CollabDebugReport as k, CollabSession as l, type CollabSessionOptions as m, type CreateDelegateToolOptions as n, type CriticConcern as o, type CriticEvaluation as p, DEFAULT_SUBAGENT_BASELINE as q, type DelegateHost as r, Director as s, type DirectorAlert as t, DirectorAlertLevel as u, type DirectorCancelCollabPayload as v, type DirectorPromptParts as w, type DirectorSessionFactory as x, type DirectorSessionFactoryOptions as y, FLEET_ROSTER_BUDGETS as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { e as MetricsSink, M as MetricLabels, f as MetricsSnapshot, b as HealthRegistry, H as HealthCheck, A as AggregateHealth, T as Tracer, S as Span } from '../observability-BhnVLBLS.js';
|
|
2
|
-
import { E as EventBus } from '../events-
|
|
3
|
-
import '../context-
|
|
2
|
+
import { E as EventBus } from '../events-DH-9r-_C.js';
|
|
3
|
+
import '../context-zkZeILpr.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* In-memory metrics sink. Suitable for embedded use, tests, and /metrics
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as EventBus } from './events-
|
|
1
|
+
import { E as EventBus } from './events-DH-9r-_C.js';
|
|
2
2
|
import { b as ModelsRegistry, R as ResolvedModel } from './models-registry-BcYJDKLm.js';
|
|
3
|
-
import { O as TokenCounter, $ as Usage, C as CacheStats } from './context-
|
|
3
|
+
import { O as TokenCounter, $ as Usage, C as CacheStats } from './context-zkZeILpr.js';
|
|
4
4
|
import { P as PathResolver } from './path-resolver-CPRj4bFY.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Q as Tool, d as Context } from './context-
|
|
1
|
+
import { Q as Tool, d as Context } from './context-zkZeILpr.js';
|
|
2
2
|
import { I as InputReader } from './input-reader-E-ffP2ee.js';
|
|
3
|
-
import { a as PermissionPolicy, P as PermissionDecision } from './permission-
|
|
3
|
+
import { a as PermissionPolicy, P as PermissionDecision } from './permission-H35s9Evv.js';
|
|
4
4
|
|
|
5
5
|
interface PermissionPolicyOptions {
|
|
6
6
|
trustFile: string;
|