@wrongstack/core 0.6.7 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-bridge-BCVxmrOn.d.ts → agent-bridge-Bji75Iv9.d.ts} +1 -1
- package/dist/{compactor-BUJ8550X.d.ts → compactor-BFKGzKd5.d.ts} +1 -1
- package/dist/{config-BHkYGzUT.d.ts → config-BXAhlqJb.d.ts} +1 -1
- package/dist/{context-C8mBUzBv.d.ts → context-BwxhvyW8.d.ts} +75 -3
- package/dist/coordination/index.d.ts +42 -12
- package/dist/coordination/index.js +2573 -40
- package/dist/coordination/index.js.map +1 -1
- package/dist/default-config-DvRSTELf.d.ts +20 -0
- package/dist/defaults/index.d.ts +21 -20
- package/dist/defaults/index.js +2896 -243
- package/dist/defaults/index.js.map +1 -1
- package/dist/{director-state-BmYi3DGA.d.ts → director-state-BUB7JRUr.d.ts} +1 -1
- package/dist/{events-DounT6pP.d.ts → events-AjrvHJ9V.d.ts} +25 -1
- package/dist/execution/index.d.ts +42 -13
- package/dist/execution/index.js +2497 -40
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/extension/index.js +3 -1
- package/dist/extension/index.js.map +1 -1
- package/dist/{index-DiIGZh5I.d.ts → index-B2WWETRP.d.ts} +6 -6
- package/dist/index.d.ts +36 -27
- package/dist/index.js +2863 -137
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/infrastructure/index.js +12 -0
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +9 -9
- package/dist/kernel/index.js +20 -4
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-CXFfDN_d.d.ts → mcp-servers-BDM2Leff.d.ts} +3 -3
- package/dist/models/index.d.ts +2 -2
- package/dist/{multi-agent-Iy8YUe3v.d.ts → multi-agent-DenFfUv5.d.ts} +11 -3
- package/dist/multi-agent-coordinator-DGUn-5Bb.d.ts +448 -0
- package/dist/{index-BlVITqm-.d.ts → null-fleet-bus-DJMbqYhL.d.ts} +105 -107
- package/dist/observability/index.d.ts +2 -2
- package/dist/{path-resolver-DwJO5XBn.d.ts → path-resolver-C1NM67-u.d.ts} +2 -2
- package/dist/{plan-templates-CG_pInJV.d.ts → plan-templates-CNY6f82B.d.ts} +4 -4
- package/dist/{provider-runner-DoohzfyD.d.ts → provider-runner-Cmuevptw.d.ts} +3 -3
- package/dist/{retry-policy-DOnwHAyz.d.ts → retry-policy-mEBn5qpv.d.ts} +1 -1
- package/dist/sdd/index.d.ts +3 -3
- package/dist/{secret-scrubber-DcTK9JHC.d.ts → secret-scrubber-BmiGszvl.d.ts} +1 -1
- package/dist/{secret-scrubber-C9UJxFCJ.d.ts → secret-scrubber-bZ5AyhwJ.d.ts} +1 -1
- package/dist/security/index.d.ts +3 -3
- package/dist/{selector-DVo3eT-P.d.ts → selector-BmUma5iG.d.ts} +1 -1
- package/dist/{session-reader-BXWxFAhS.d.ts → session-reader-g-FKCyBw.d.ts} +1 -1
- package/dist/storage/index.d.ts +6 -6
- package/dist/storage/index.js +101 -14
- package/dist/storage/index.js.map +1 -1
- package/dist/{system-prompt-BBGles-N.d.ts → system-prompt-BKrzd_ci.d.ts} +1 -1
- package/dist/{tool-executor-CwpjhwHC.d.ts → tool-executor-BoM0U0qn.d.ts} +6 -5
- package/dist/types/index.d.ts +16 -15
- package/dist/types/index.js +130 -20
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/agent-subagent-runner-BTloSwjE.d.ts +0 -174
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BridgeTransport, l as BridgeMessage, A as AgentBridge, m as AgentBridgeConfig } from './multi-agent-
|
|
1
|
+
import { B as BridgeTransport, l as BridgeMessage, A as AgentBridge, m as AgentBridgeConfig } from './multi-agent-DenFfUv5.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* In-memory pub/sub transport for agent-to-agent messaging.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { W as WireFamily } from './models-registry-Y2xbog0E.js';
|
|
2
|
-
import { P as Permission } from './context-
|
|
2
|
+
import { P as Permission } from './context-BwxhvyW8.js';
|
|
3
3
|
|
|
4
4
|
type ContextWindowModeId = 'balanced' | 'frugal' | 'deep' | 'archival';
|
|
5
5
|
type ContextWindowAggressiveOn = 'hard' | 'soft' | 'warn';
|
|
@@ -91,8 +91,62 @@ declare function asText(content: string | ContentBlock[]): string;
|
|
|
91
91
|
* This lets consumers (CLI, TUI, plugins, tests) branch on structured
|
|
92
92
|
* data instead of parsing error messages.
|
|
93
93
|
*/
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Machine-readable error codes as frozen constants.
|
|
96
|
+
*
|
|
97
|
+
* Use `ERROR_CODES.X` instead of raw string literals for:
|
|
98
|
+
* - IDE autocomplete and compile-time validation
|
|
99
|
+
* - Safe refactoring (rename updates all usages)
|
|
100
|
+
* - Plugin extensibility (extend the object to add custom codes)
|
|
101
|
+
*
|
|
102
|
+
* The `ErrorCode` type is derived from this object, so adding a new
|
|
103
|
+
* code here automatically updates the type without extra changes.
|
|
104
|
+
*/
|
|
105
|
+
declare const ERROR_CODES: {
|
|
106
|
+
readonly PROVIDER_RATE_LIMITED: "PROVIDER_RATE_LIMITED";
|
|
107
|
+
readonly PROVIDER_AUTH_FAILED: "PROVIDER_AUTH_FAILED";
|
|
108
|
+
readonly PROVIDER_OVERLOADED: "PROVIDER_OVERLOADED";
|
|
109
|
+
readonly PROVIDER_INVALID_REQUEST: "PROVIDER_INVALID_REQUEST";
|
|
110
|
+
readonly PROVIDER_SERVER_ERROR: "PROVIDER_SERVER_ERROR";
|
|
111
|
+
readonly PROVIDER_NETWORK_ERROR: "PROVIDER_NETWORK_ERROR";
|
|
112
|
+
readonly PROVIDER_CONTEXT_OVERFLOW: "PROVIDER_CONTEXT_OVERFLOW";
|
|
113
|
+
readonly TOOL_NOT_FOUND: "TOOL_NOT_FOUND";
|
|
114
|
+
readonly TOOL_PERMISSION_DENIED: "TOOL_PERMISSION_DENIED";
|
|
115
|
+
readonly TOOL_EXECUTION_FAILED: "TOOL_EXECUTION_FAILED";
|
|
116
|
+
readonly TOOL_TIMEOUT: "TOOL_TIMEOUT";
|
|
117
|
+
readonly TOOL_INPUT_INVALID: "TOOL_INPUT_INVALID";
|
|
118
|
+
readonly CONFIG_INVALID: "CONFIG_INVALID";
|
|
119
|
+
readonly CONFIG_NOT_FOUND: "CONFIG_NOT_FOUND";
|
|
120
|
+
readonly CONFIG_PARSE_FAILED: "CONFIG_PARSE_FAILED";
|
|
121
|
+
readonly CONFIG_MIGRATION_NEEDED: "CONFIG_MIGRATION_NEEDED";
|
|
122
|
+
readonly PLUGIN_LOAD_FAILED: "PLUGIN_LOAD_FAILED";
|
|
123
|
+
readonly PLUGIN_API_MISMATCH: "PLUGIN_API_MISMATCH";
|
|
124
|
+
readonly PLUGIN_MISSING_DEPENDENCY: "PLUGIN_MISSING_DEPENDENCY";
|
|
125
|
+
readonly AGENT_ITERATION_LIMIT: "AGENT_ITERATION_LIMIT";
|
|
126
|
+
readonly AGENT_CONTEXT_OVERFLOW: "AGENT_CONTEXT_OVERFLOW";
|
|
127
|
+
readonly AGENT_ABORTED: "AGENT_ABORTED";
|
|
128
|
+
readonly AGENT_RUN_FAILED: "AGENT_RUN_FAILED";
|
|
129
|
+
readonly SESSION_NOT_FOUND: "SESSION_NOT_FOUND";
|
|
130
|
+
readonly SESSION_CORRUPTED: "SESSION_CORRUPTED";
|
|
131
|
+
readonly SESSION_WRITE_FAILED: "SESSION_WRITE_FAILED";
|
|
132
|
+
readonly CONTAINER_TOKEN_ALREADY_BOUND: "CONTAINER_TOKEN_ALREADY_BOUND";
|
|
133
|
+
readonly CONTAINER_TOKEN_NOT_BOUND: "CONTAINER_TOKEN_NOT_BOUND";
|
|
134
|
+
readonly REGISTRY_DUPLICATE: "REGISTRY_DUPLICATE";
|
|
135
|
+
readonly REGISTRY_NOT_FOUND: "REGISTRY_NOT_FOUND";
|
|
136
|
+
readonly FS_READ_FAILED: "FS_READ_FAILED";
|
|
137
|
+
readonly FS_WRITE_FAILED: "FS_WRITE_FAILED";
|
|
138
|
+
readonly FS_MKDIR_FAILED: "FS_MKDIR_FAILED";
|
|
139
|
+
readonly FS_DELETE_FAILED: "FS_DELETE_FAILED";
|
|
140
|
+
readonly FS_ATOMIC_WRITE_FAILED: "FS_ATOMIC_WRITE_FAILED";
|
|
141
|
+
readonly UNKNOWN: "UNKNOWN";
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Union type derived from `ERROR_CODES`. Using `typeof ERROR_CODES[keyof typeof ERROR_CODES]`
|
|
145
|
+
* instead of a string literal union means TypeScript auto-updates the type whenever
|
|
146
|
+
* a new code is added to `ERROR_CODES` — no need to keep two lists in sync.
|
|
147
|
+
*/
|
|
148
|
+
type ErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES];
|
|
149
|
+
type ErrorSubsystem = 'provider' | 'tool' | 'config' | 'plugin' | 'agent' | 'session' | 'container' | 'fs' | 'general';
|
|
96
150
|
type ErrorSeverity = 'fatal' | 'error' | 'warning';
|
|
97
151
|
declare class WrongStackError extends Error {
|
|
98
152
|
readonly code: ErrorCode;
|
|
@@ -186,12 +240,26 @@ declare class SessionError extends WrongStackError {
|
|
|
186
240
|
cause?: unknown;
|
|
187
241
|
});
|
|
188
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* File system operation errors.
|
|
245
|
+
*/
|
|
246
|
+
declare class FsError extends WrongStackError {
|
|
247
|
+
readonly path?: string;
|
|
248
|
+
constructor(opts: {
|
|
249
|
+
message: string;
|
|
250
|
+
code: Extract<ErrorCode, 'FS_READ_FAILED' | 'FS_WRITE_FAILED' | 'FS_MKDIR_FAILED' | 'FS_DELETE_FAILED' | 'FS_ATOMIC_WRITE_FAILED'>;
|
|
251
|
+
path?: string;
|
|
252
|
+
context?: Record<string, unknown>;
|
|
253
|
+
cause?: unknown;
|
|
254
|
+
});
|
|
255
|
+
}
|
|
189
256
|
declare function isWrongStackError(err: unknown): err is WrongStackError;
|
|
190
257
|
declare function isToolError(err: unknown): err is ToolError;
|
|
191
258
|
declare function isConfigError(err: unknown): err is ConfigError;
|
|
192
259
|
declare function isPluginError(err: unknown): err is PluginError;
|
|
193
260
|
declare function isSessionError(err: unknown): err is SessionError;
|
|
194
261
|
declare function isAgentError(err: unknown): err is AgentError;
|
|
262
|
+
declare function isFsError(err: unknown): err is FsError;
|
|
195
263
|
|
|
196
264
|
type Permission = 'auto' | 'confirm' | 'deny';
|
|
197
265
|
/**
|
|
@@ -965,9 +1033,13 @@ declare class Context implements RunEnv {
|
|
|
965
1033
|
registerAbortHook(fn: () => void | Promise<void>): () => void;
|
|
966
1034
|
drainAbortHooks(): Promise<void>;
|
|
967
1035
|
recordRead(absPath: string, mtimeMs: number): void;
|
|
1036
|
+
/** Clear accumulated file-read metadata after compaction or at boundaries
|
|
1037
|
+
* where stale read history could cause tools to skip legitimate re-reads.
|
|
1038
|
+
* The agent re-populates this naturally on the next file access. */
|
|
1039
|
+
clearFileTracking(): void;
|
|
968
1040
|
hasRead(absPath: string): boolean;
|
|
969
1041
|
lastReadMtime(absPath: string): number | undefined;
|
|
970
1042
|
usage(): Usage;
|
|
971
1043
|
}
|
|
972
1044
|
|
|
973
|
-
export {
|
|
1045
|
+
export { isThinkingBlock as $, AgentError as A, type ToolFinalEvent as B, type Capabilities as C, type ToolProgressEvent as D, ERROR_CODES as E, type FileSnapshot as F, type ToolResultBlock as G, type ToolStreamEvent as H, type ImageBlock as I, type JSONSchema as J, type ToolUseBlock as K, asBlocks as L, type Message as M, asText as N, isAgentError as O, type Permission as P, isConfigError as Q, type Request as R, type SessionData as S, type TextBlock as T, type Usage as U, isFsError as V, WrongStackError as W, isImageBlock as X, isPluginError as Y, isSessionError as Z, isTextBlock as _, ConfigError as a, isToolError as a0, isToolResultBlock as a1, isToolUseBlock as a2, isWrongStackError as a3, toWrongStackError as a4, Context as a5, type TokenCounter as a6, type CacheStats as a7, type TodoItem as a8, ConversationState as a9, type ContextInit as aa, type ReadonlyConversationState as ab, type RunEnv as ac, type RunOptions as ad, type StateChange as ae, type StateChangeHandler as af, extractRunEnv as ag, wrapAsState as ah, type ContentBlock as b, type ErrorCode as c, type ErrorSeverity as d, type ErrorSubsystem as e, FsError as f, type MessageRole as g, PluginError as h, type Provider as i, ProviderError as j, type ProviderErrorBody as k, type Response as l, type ResumedSession as m, type RiskTier as n, SessionError as o, type SessionEvent as p, type SessionMetadata as q, type SessionStore as r, type SessionSummary as s, type SessionWriter as t, type StopReason as u, type StreamEvent as v, type ThinkingBlock as w, type Tool as x, type ToolCallContext as y, ToolError as z };
|
|
@@ -1,15 +1,45 @@
|
|
|
1
|
-
export { A as
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
import '../context-
|
|
7
|
-
import '
|
|
8
|
-
import '../events-
|
|
9
|
-
import '../index-
|
|
1
|
+
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, C as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, h as DEFAULT_SUBAGENT_BASELINE, i as DelegateHost, j as Director, k as DirectorPromptParts, l as DirectorSessionFactory, m as DirectorSessionFactoryOptions, F as FLEET_ROSTER, n as FLEET_ROSTER_BUDGETS, o as FLEET_ROSTER_WITHACP, p as FleetCostCapError, q as FleetManager, r as FleetManagerOptions, s as FleetRosterBudget, t as FleetSpawnBudgetError, I as ICoordinator, u as IFleetManager, N as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, v as SubagentPromptParts, w as applyRosterBudget, x as attachAutoExtend, y as composeDirectorPrompt, z as composeSubagentPrompt, E as createDelegateTool, G as getAgentDefinition, H as makeDirectorSessionFactory, J as rosterSummaryFromConfigs } from '../null-fleet-bus-DJMbqYhL.js';
|
|
2
|
+
import { A as AgentDefinition } from '../multi-agent-coordinator-DGUn-5Bb.js';
|
|
3
|
+
export { T as AGENT_TOOL_PRESETS, a as AgentBudgetTier, b as AgentCapability, c as AgentFactory, d as AgentFactoryResult, e as AgentPhase, f as AgentRunnerOptions, D as DEFAULT_DISPATCH_ROLE, g as DefaultMultiAgentCoordinator, h as DispatchCandidate, i as DispatchClassifier, j as DispatchMethod, k as DispatchOptions, l as DispatchResult, F as FleetBus, m as FleetEvent, n as FleetHandler, o as FleetUsage, p as FleetUsageAggregator, H as HEAVY_BUDGET, L as LIGHT_BUDGET, M as MEDIUM_BUDGET, q as MultiAgentCoordinatorOptions, S as SubagentUsageSnapshot, r as dispatchAgent, s as makeAgentSubagentRunner, t as makeLLMClassifier, u as scoreAgents } from '../multi-agent-coordinator-DGUn-5Bb.js';
|
|
4
|
+
export { n as BudgetExceededError, o as BudgetKind, p as BudgetLimits, q as BudgetThresholdDecision, r as BudgetThresholdHandler, s as BudgetThresholdSignal, t as BudgetUsage, u as SubagentBudget } from '../multi-agent-DenFfUv5.js';
|
|
5
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-Bji75Iv9.js';
|
|
6
|
+
import '../context-BwxhvyW8.js';
|
|
7
|
+
import '../director-state-BUB7JRUr.js';
|
|
8
|
+
import '../events-AjrvHJ9V.js';
|
|
9
|
+
import '../index-B2WWETRP.js';
|
|
10
10
|
import '../logger-BMQgxvdy.js';
|
|
11
|
-
import '../system-prompt-
|
|
11
|
+
import '../system-prompt-BKrzd_ci.js';
|
|
12
12
|
import '../observability-BhnVLBLS.js';
|
|
13
|
-
import '../secret-scrubber-
|
|
14
|
-
import '../config-
|
|
13
|
+
import '../secret-scrubber-bZ5AyhwJ.js';
|
|
14
|
+
import '../config-BXAhlqJb.js';
|
|
15
15
|
import '../models-registry-Y2xbog0E.js';
|
|
16
|
+
import 'node:events';
|
|
17
|
+
|
|
18
|
+
/** Phase 1 · Discovery — map the territory before any work begins. */
|
|
19
|
+
declare const DISCOVERY_AGENTS: AgentDefinition[];
|
|
20
|
+
|
|
21
|
+
/** Phase 2 · Planning — turn intent into requirements, plans, and architecture. */
|
|
22
|
+
declare const PLANNING_AGENTS: AgentDefinition[];
|
|
23
|
+
|
|
24
|
+
/** Phase 3 · Build — write, refactor, migrate, and fix code. */
|
|
25
|
+
declare const BUILD_AGENTS: AgentDefinition[];
|
|
26
|
+
|
|
27
|
+
/** Phase 4 · Verify — prove the code works under normal, end-to-end, and adverse conditions. */
|
|
28
|
+
declare const VERIFY_AGENTS: AgentDefinition[];
|
|
29
|
+
|
|
30
|
+
/** Phase 5 · Review — read-only quality, security, a11y, and compliance gates. */
|
|
31
|
+
declare const REVIEW_AGENTS: AgentDefinition[];
|
|
32
|
+
|
|
33
|
+
/** Phase 6 · Domain — specialists for the major slices of a system. */
|
|
34
|
+
declare const DOMAIN_AGENTS: AgentDefinition[];
|
|
35
|
+
|
|
36
|
+
/** Phase 7 · Knowledge — documentation, diagrams, localization, and prompts. */
|
|
37
|
+
declare const KNOWLEDGE_AGENTS: AgentDefinition[];
|
|
38
|
+
|
|
39
|
+
/** Phase 8 · Delivery & Ops — ship it, run it, keep it healthy. */
|
|
40
|
+
declare const DELIVERY_AGENTS: AgentDefinition[];
|
|
41
|
+
|
|
42
|
+
/** Phase 9 · Meta — agents that improve the agent system itself. */
|
|
43
|
+
declare const META_AGENTS: AgentDefinition[];
|
|
44
|
+
|
|
45
|
+
export { AgentDefinition, BUILD_AGENTS, DELIVERY_AGENTS, DISCOVERY_AGENTS, DOMAIN_AGENTS, KNOWLEDGE_AGENTS, META_AGENTS, PLANNING_AGENTS, REVIEW_AGENTS, VERIFY_AGENTS };
|