@wrongstack/core 0.265.1 → 0.267.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-DrkBxszZ.d.ts → agent-bridge-STJ3JwwK.d.ts} +1 -1
- package/dist/{agent-subagent-runner-DM2pP-B6.d.ts → agent-subagent-runner-CzPGP3jA.d.ts} +25 -7
- package/dist/{brain-BXd_61kQ.d.ts → brain-Cdg77tVN.d.ts} +73 -1
- package/dist/{compactor-B8pOf45Y.d.ts → compactor-iMZ84CXq.d.ts} +19 -1
- package/dist/{config-BMCj_XDs.d.ts → config-Du3pYYln.d.ts} +54 -3
- package/dist/{context-MRk5PhNv.d.ts → context-dT5Ueund.d.ts} +65 -1
- package/dist/coordination/index.d.ts +17 -17
- package/dist/coordination/index.js +138 -114
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +25 -25
- package/dist/defaults/index.js +1729 -781
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +15 -15
- package/dist/execution/index.js +1119 -229
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/prompt-enhancer.d.ts +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/{goal-preamble-DvHDSKSe.d.ts → goal-preamble-SulMTowG.d.ts} +28 -11
- package/dist/{goal-store-DtLMySNb.d.ts → goal-store-CABDwdFE.d.ts} +1 -1
- package/dist/{index-CEDeNodM.d.ts → index-Bms0m4oy.d.ts} +5 -5
- package/dist/{index-B-ch8K9C.d.ts → index-DtCVWel4.d.ts} +8 -8
- package/dist/index-IEuxQd-E.d.ts +82 -0
- package/dist/index.d.ts +118 -45
- package/dist/index.js +3083 -1602
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/infrastructure/index.js +72 -1
- 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-2x4w6Jn9.d.ts → mcp-servers-C2cBTxUR.d.ts} +3 -3
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js +30 -1
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-DmJlKuNp.d.ts → models-registry-BqGZNJQ-.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-DyCkCZnU.d.ts → multi-agent-coordinator-B8R43uPz.d.ts} +1 -1
- package/dist/{null-fleet-bus-CG9QY2aP.d.ts → null-fleet-bus-CnXa5oTH.d.ts} +14 -9
- package/dist/observability/index.d.ts +2 -2
- package/dist/{parallel-eternal-engine-Jw9uhEoT.d.ts → parallel-eternal-engine-DdNnw9BQ.d.ts} +11 -9
- package/dist/{path-resolver-Dy2ej-gE.d.ts → path-resolver-COIMLCQL.d.ts} +3 -3
- package/dist/{permission-B9SB45lp.d.ts → permission-B75JAi3-.d.ts} +1 -1
- package/dist/{permission-policy-CkjSXabK.d.ts → permission-policy-DlR9eJAM.d.ts} +2 -2
- package/dist/{pipeline-DPDxH_7m.d.ts → pipeline-BfD2k1rT.d.ts} +2 -2
- package/dist/{plan-templates-CzD9GnAU.d.ts → plan-templates-DSIKCXZN.d.ts} +5 -5
- package/dist/{llm-selector-C0tfTCUe.d.ts → provider-model-resolve-BNRsNuJx.d.ts} +40 -3
- package/dist/{provider-runner-DMa70ODu.d.ts → provider-runner-CX7iIvox.d.ts} +3 -3
- package/dist/{retry-policy-CN0khdlj.d.ts → retry-policy-BilV1ujH.d.ts} +1 -1
- package/dist/sdd/index.d.ts +8 -8
- package/dist/sdd/index.js +12 -12
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-vault-B2yw84VT.d.ts → secret-vault-gkvEZZfE.d.ts} +2 -2
- package/dist/security/index.d.ts +5 -67
- package/dist/security/index.js +96 -76
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-CzHh_igB.d.ts → selector-Bc7eWtT3.d.ts} +1 -1
- package/dist/{session-event-bridge-BUI6Jf-4.d.ts → session-event-bridge-D-araDEz.d.ts} +1 -1
- package/dist/{session-reader-CMgdMSRP.d.ts → session-reader-D7Dapswh.d.ts} +1 -1
- package/dist/storage/index.d.ts +11 -11
- package/dist/storage/index.js +81 -84
- package/dist/storage/index.js.map +1 -1
- package/dist/tools/index.d.ts +4 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts +19 -19
- package/dist/types/index.js +1265 -400
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +454 -406
- package/dist/utils/index.js +2191 -1201
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { i as AfterIterationHook, j as AfterRunHook, k as AfterToolExecutionHook, l as AgentExtension, B as BeforeIterationHook, m as BeforeRunHook, n as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, v as ProviderRunnerFn, t as ProviderRunnerWrapper } from '../index-
|
|
2
|
-
import '../context-
|
|
1
|
+
export { i as AfterIterationHook, j as AfterRunHook, k as AfterToolExecutionHook, l as AgentExtension, B as BeforeIterationHook, m as BeforeRunHook, n as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, v as ProviderRunnerFn, t as ProviderRunnerWrapper } from '../index-Bms0m4oy.js';
|
|
2
|
+
import '../context-dT5Ueund.js';
|
|
3
3
|
import '../logger-B63L5bTg.js';
|
|
4
|
-
import '../pipeline-
|
|
5
|
-
import '../config-
|
|
4
|
+
import '../pipeline-BfD2k1rT.js';
|
|
5
|
+
import '../config-Du3pYYln.js';
|
|
6
6
|
import '../observability-D-HZN_mF.js';
|
|
7
|
-
import '../brain-
|
|
8
|
-
import '../permission-
|
|
7
|
+
import '../brain-Cdg77tVN.js';
|
|
8
|
+
import '../permission-B75JAi3-.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { S as SkillLoader, a as SkillManifest, b as SkillEntry } from './skill-DGIXCtdv.js';
|
|
2
2
|
import { W as WstackPaths } from './wstack-paths-hOpNLmvf.js';
|
|
3
|
-
import { P as Provider, C as Context } from './context-
|
|
4
|
-
import { C as Compactor, a as CompactReport } from './compactor-
|
|
5
|
-
import { M as MessageSelector } from './selector-
|
|
6
|
-
import { E as EventBus } from './brain-
|
|
7
|
-
import { M as MiddlewareHandler } from './pipeline-
|
|
8
|
-
import { S as SessionEventBridge } from './session-event-bridge-
|
|
9
|
-
import { C as ContextWindowAggressiveOn,
|
|
10
|
-
import { g as Agent, D as DoneCondition } from './agent-subagent-runner-
|
|
11
|
-
import { R as RunResult, S as SystemPromptContributor } from './index-
|
|
3
|
+
import { P as Provider, C as Context } from './context-dT5Ueund.js';
|
|
4
|
+
import { C as Compactor, a as CompactReport } from './compactor-iMZ84CXq.js';
|
|
5
|
+
import { M as MessageSelector } from './selector-Bc7eWtT3.js';
|
|
6
|
+
import { E as EventBus } from './brain-Cdg77tVN.js';
|
|
7
|
+
import { M as MiddlewareHandler } from './pipeline-BfD2k1rT.js';
|
|
8
|
+
import { S as SessionEventBridge } from './session-event-bridge-D-araDEz.js';
|
|
9
|
+
import { C as ContextWindowAggressiveOn, h as ContextWindowPolicy } from './config-Du3pYYln.js';
|
|
10
|
+
import { g as Agent, D as DoneCondition } from './agent-subagent-runner-CzPGP3jA.js';
|
|
11
|
+
import { R as RunResult, S as SystemPromptContributor } from './index-Bms0m4oy.js';
|
|
12
12
|
|
|
13
13
|
interface SkillLoaderOptions {
|
|
14
14
|
paths: WstackPaths;
|
|
@@ -178,8 +178,15 @@ declare class SelectiveCompactor implements Compactor {
|
|
|
178
178
|
private computeTargetBudget;
|
|
179
179
|
private eliseOldToolResults;
|
|
180
180
|
private hasTextContent;
|
|
181
|
+
/**
|
|
182
|
+
* Estimate message-array tokens via the shared `estimateMessages` primitive
|
|
183
|
+
* so SelectiveCompactor's before/after/load figures agree with the
|
|
184
|
+
* middleware threshold math and the other compactors. Previously this used a
|
|
185
|
+
* private `ceil(len/3.5)` walk that diverged from the calibrated shared
|
|
186
|
+
* estimator, causing the selective `load`/`targetBudget` comparison to mix
|
|
187
|
+
* two incompatible token scales.
|
|
188
|
+
*/
|
|
181
189
|
private estimateTokens;
|
|
182
|
-
private roughTokenEstimate;
|
|
183
190
|
}
|
|
184
191
|
|
|
185
192
|
type CompactorStrategy = 'hybrid' | 'intelligent' | 'selective';
|
|
@@ -224,6 +231,16 @@ interface StrategyCompactorOptions {
|
|
|
224
231
|
*/
|
|
225
232
|
declare function createStrategyCompactor(opts?: StrategyCompactorOptions): Compactor;
|
|
226
233
|
|
|
234
|
+
interface ContextWindowBudgetSnapshot {
|
|
235
|
+
maxContext: number;
|
|
236
|
+
inputTokens: number;
|
|
237
|
+
availableInputTokens: number;
|
|
238
|
+
remainingInputTokens: number;
|
|
239
|
+
reservedOutputTokens: number;
|
|
240
|
+
reservedSafetyTokens: number;
|
|
241
|
+
load: number;
|
|
242
|
+
overflowTokens: number;
|
|
243
|
+
}
|
|
227
244
|
type CompactionFailureMode = 'throw' | 'throw_on_hard' | 'continue';
|
|
228
245
|
interface AutoCompactionOptions {
|
|
229
246
|
aggressiveOn?: ContextWindowAggressiveOn | undefined;
|
|
@@ -451,4 +468,4 @@ declare function makeAutonomyPromptContributor(opts: AutonomyPromptContributorOp
|
|
|
451
468
|
*/
|
|
452
469
|
declare function buildGoalPreamble(goal: string, deliverables?: string[]): string;
|
|
453
470
|
|
|
454
|
-
export { AutoCompactionMiddleware as A, type CompactorStrategy as C, DefaultSkillLoader as D, IntelligentCompactor as I, SelectiveCompactor as S, AutonomousRunner as a, type AutonomousRunnerOptions as b, type AutonomyPromptContributorOptions as c, type DoneCheckResult as d, DoneConditionChecker as e, type IntelligentCompactorOptions as f, type SelectiveCompactorOptions as g, type SkillLoaderOptions as h, type StrategyCompactorOptions as i, buildGoalPreamble as j, createStrategyCompactor as k, makeAutonomyPromptContributor as m };
|
|
471
|
+
export { AutoCompactionMiddleware as A, type CompactorStrategy as C, DefaultSkillLoader as D, IntelligentCompactor as I, SelectiveCompactor as S, AutonomousRunner as a, type AutonomousRunnerOptions as b, type AutonomyPromptContributorOptions as c, type DoneCheckResult as d, DoneConditionChecker as e, type IntelligentCompactorOptions as f, type SelectiveCompactorOptions as g, type SkillLoaderOptions as h, type StrategyCompactorOptions as i, buildGoalPreamble as j, createStrategyCompactor as k, type ContextWindowBudgetSnapshot as l, makeAutonomyPromptContributor as m };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as TextBlock, T as Tool, m as ToolUseBlock, C as Context, n as ToolResultBlock, R as Request, b as Response, P as Provider, g as ContentBlock, a9 as WrongStackError } from './context-dT5Ueund.js';
|
|
2
2
|
import { L as Logger } from './logger-B63L5bTg.js';
|
|
3
|
-
import { B as BuildContext, H as HookRegistry, a as Renderer, P as Pipeline, C as Container } from './pipeline-
|
|
4
|
-
import { H as HookEvent, W as WireFamily, P as ProviderConfig } from './config-
|
|
3
|
+
import { B as BuildContext, H as HookRegistry, a as Renderer, P as Pipeline, C as Container } from './pipeline-BfD2k1rT.js';
|
|
4
|
+
import { H as HookEvent, W as WireFamily, P as ProviderConfig } from './config-Du3pYYln.js';
|
|
5
5
|
import { T as Tracer } from './observability-D-HZN_mF.js';
|
|
6
|
-
import { E as EventBus } from './brain-
|
|
7
|
-
import { P as PermissionPolicy, S as SecretScrubber } from './permission-
|
|
6
|
+
import { E as EventBus } from './brain-Cdg77tVN.js';
|
|
7
|
+
import { P as PermissionPolicy, S as SecretScrubber } from './permission-B75JAi3-.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* A contributor that injects additional TextBlocks into the system prompt.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { T as Token, a as Renderer, S as SystemPromptBuilder, H as HookRegistry } from './pipeline-
|
|
2
|
-
import { E as EventBus, c as MemoryStore, B as BrainArbiter } from './brain-
|
|
3
|
-
import { C as Compactor } from './compactor-
|
|
4
|
-
import {
|
|
5
|
-
import { E as ErrorHandler, R as RetryPolicy } from './retry-policy-
|
|
1
|
+
import { T as Token, a as Renderer, S as SystemPromptBuilder, H as HookRegistry } from './pipeline-BfD2k1rT.js';
|
|
2
|
+
import { E as EventBus, c as MemoryStore, B as BrainArbiter } from './brain-Cdg77tVN.js';
|
|
3
|
+
import { C as Compactor } from './compactor-iMZ84CXq.js';
|
|
4
|
+
import { k as ConfigLoader, j as ConfigStore, M as ModelsRegistry } from './config-Du3pYYln.js';
|
|
5
|
+
import { E as ErrorHandler, R as RetryPolicy } from './retry-policy-BilV1ujH.js';
|
|
6
6
|
import { I as InputReader } from './input-reader-E-ffP2ee.js';
|
|
7
7
|
import { L as Logger } from './logger-B63L5bTg.js';
|
|
8
8
|
import { M as ModeStore } from './mode-CZlO9iU1.js';
|
|
9
9
|
import { P as PathResolver } from './path-resolver-CPRj4bFY.js';
|
|
10
|
-
import { P as PermissionPolicy, S as SecretScrubber } from './permission-
|
|
11
|
-
import { P as ProviderRunner } from './provider-runner-
|
|
12
|
-
import { c as TokenCounter, i as SessionStore } from './context-
|
|
10
|
+
import { P as PermissionPolicy, S as SecretScrubber } from './permission-B75JAi3-.js';
|
|
11
|
+
import { P as ProviderRunner } from './provider-runner-CX7iIvox.js';
|
|
12
|
+
import { c as TokenCounter, i as SessionStore } from './context-dT5Ueund.js';
|
|
13
13
|
import { S as SkillLoader } from './skill-DGIXCtdv.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import './secret-vault-gkvEZZfE.js';
|
|
2
|
+
import './permission-policy-DlR9eJAM.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Well-known tool capabilities used for authorization decisions.
|
|
6
|
+
*
|
|
7
|
+
* These are the preferred values for `Tool.capabilities`.
|
|
8
|
+
* New capabilities should be added here with clear documentation.
|
|
9
|
+
*
|
|
10
|
+
* Philosophy (2026-06+):
|
|
11
|
+
* - Prefer capabilities over exact tool name matching.
|
|
12
|
+
* - Subagent guards and future policies should primarily key off capabilities.
|
|
13
|
+
* - Name-based denylists are legacy and will be phased down.
|
|
14
|
+
*/
|
|
15
|
+
declare const ToolCapabilities: {
|
|
16
|
+
/** Can execute arbitrary commands in the user's shell (the `bash` tool). */
|
|
17
|
+
readonly SHELL_ARBITRARY: "shell.arbitrary";
|
|
18
|
+
/** Can execute a restricted set of commands (the `exec` tool). */
|
|
19
|
+
readonly SHELL_RESTRICTED: "shell.restricted";
|
|
20
|
+
/** Can read files inside the project (and possibly outside via symlinks if not guarded). */
|
|
21
|
+
readonly FS_READ: "fs.read";
|
|
22
|
+
/** Can write / modify / delete files inside the project. */
|
|
23
|
+
readonly FS_WRITE: "fs.write";
|
|
24
|
+
/** Can write files outside the current project root (very high risk). */
|
|
25
|
+
readonly FS_WRITE_OUTSIDE_PROJECT: "fs.write.outside-project";
|
|
26
|
+
/** Can perform outbound network requests. */
|
|
27
|
+
readonly NET_OUTBOUND: "net.outbound";
|
|
28
|
+
/** Proxies tools from external MCP servers (unknown capability). */
|
|
29
|
+
readonly MCP_PROXY: "mcp.proxy";
|
|
30
|
+
/** Can spawn or manage subagents / multi-agent tasks. */
|
|
31
|
+
readonly SUBAGENT_SPAWN: "subagent.spawn";
|
|
32
|
+
/** Can mutate global or session configuration / trust state. */
|
|
33
|
+
readonly CONFIG_MUTATE: "config.mutate";
|
|
34
|
+
/** Can install packages or run package managers with side effects. */
|
|
35
|
+
readonly PACKAGE_INSTALL: "package.install";
|
|
36
|
+
};
|
|
37
|
+
type ToolCapability = (typeof ToolCapabilities)[keyof typeof ToolCapabilities];
|
|
38
|
+
/**
|
|
39
|
+
* Set of capabilities that are considered dangerous for subagents by default.
|
|
40
|
+
* Subagents should not receive these capabilities unless the leader explicitly
|
|
41
|
+
* allows the specific tool at spawn time.
|
|
42
|
+
*/
|
|
43
|
+
declare const DANGEROUS_FOR_SUBAGENTS: readonly ToolCapability[];
|
|
44
|
+
/**
|
|
45
|
+
* Wide capability allowlist for subagents that the user has authorized to act
|
|
46
|
+
* with full developer power (the CLI fleet host applies this to any subagent
|
|
47
|
+
* that isn't given an explicit, narrower grant). It covers everything needed to
|
|
48
|
+
* do real work end-to-end — read, write/edit inside the project, outbound
|
|
49
|
+
* network, and shell/build/install — so a delegated coding or build agent runs
|
|
50
|
+
* the same toolchain the leader would, without per-tool confirmation it cannot
|
|
51
|
+
* answer.
|
|
52
|
+
*
|
|
53
|
+
* Deliberately EXCLUDED (require an explicit per-spawn `allowedCapabilities`
|
|
54
|
+
* grant, because they escape the task's blast radius rather than perform it):
|
|
55
|
+
* - `fs.write.outside-project` — writing outside the repo (e.g. ~/.ssh).
|
|
56
|
+
* - `mcp.proxy` — third-party MCP tools (also hard-blocked by name).
|
|
57
|
+
* - `subagent.spawn` — recursive delegation (the baseline prompt forbids it).
|
|
58
|
+
* - `config.mutate` — rewriting trust/config is privilege escalation, not work.
|
|
59
|
+
*/
|
|
60
|
+
declare const WIDE_SUBAGENT_CAPABILITIES: readonly ToolCapability[];
|
|
61
|
+
/**
|
|
62
|
+
* Check if a tool (or its capabilities array) includes any dangerous capability
|
|
63
|
+
* for subagent execution.
|
|
64
|
+
*/
|
|
65
|
+
declare function hasDangerousCapabilityForSubagents(toolOrCaps: {
|
|
66
|
+
capabilities?: readonly string[] | undefined;
|
|
67
|
+
} | readonly string[] | undefined): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Check if a tool declares a specific capability (or any of the provided ones).
|
|
70
|
+
*/
|
|
71
|
+
declare function hasCapability(toolOrCaps: {
|
|
72
|
+
capabilities?: readonly string[] | undefined;
|
|
73
|
+
} | readonly string[] | undefined, capability: ToolCapability | ToolCapability[]): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Returns the intersection of a tool's capabilities with the dangerous set.
|
|
76
|
+
* Useful for logging and audit trails.
|
|
77
|
+
*/
|
|
78
|
+
declare function getDangerousCapabilities(toolOrCaps: {
|
|
79
|
+
capabilities?: readonly string[] | undefined;
|
|
80
|
+
} | readonly string[] | undefined): ToolCapability[];
|
|
81
|
+
|
|
82
|
+
export { DANGEROUS_FOR_SUBAGENTS as D, ToolCapabilities as T, WIDE_SUBAGENT_CAPABILITIES as W, type ToolCapability as a, hasDangerousCapabilityForSubagents as b, getDangerousCapabilities as g, hasCapability as h };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
import { S as SystemPromptBuilder, b as ModelCapabilities, B as BuildContext, C as Container, H as HookRegistry, c as Mailbox, d as MailboxMessage, a as Renderer } from './pipeline-
|
|
2
|
-
export { A as AgentHeartbeatInput, e as AgentRegistrationInput, f as BindOptions, D as Decorator, F as Factory, g as MailboxAckInput, h as MailboxAgentStatus, i as MailboxMessageType, j as MailboxQuery, k as MailboxSendInput, l as MailboxTaskContext, m as Middleware, M as MiddlewareHandler, N as NextFn, P as Pipeline, n as PipelineOptions, o as ReadReceipts, p as RegisteredAgent, T as Token, q as hookMatcherMatches, r as normalizeRecipient } from './pipeline-
|
|
3
|
-
import { E as EventBus, c as MemoryStore, a as EventName, L as Listener, B as BrainArbiter } from './brain-
|
|
4
|
-
export { e as BrainDecision, f as BrainDecisionOption, g as BrainDecisionQueue, h as BrainDecisionRequest, i as BrainDecisionSource, j as BrainFallback, k as BrainRisk, D as DefaultBrainArbiter, l as DefaultBrainArbiterOptions, m as EventLogger, n as EventMap, H as HumanEscalatingBrainArbiter, o as MEMORY_TYPE_LABELS, p as MemoryClearedPayload, q as MemoryConsolidatedPayload, b as MemoryEntry, r as MemoryForgottenPayload, s as MemoryPriority, d as MemoryRelevanceContext, t as MemoryRememberedPayload, M as MemoryScope, u as MemoryType, O as ObservableBrainArbiter, v as ScopedEventBus, S as ScoredEntry, w as formatHumanPrompt } from './brain-
|
|
5
|
-
import { W as WorktreeManager } from './index-
|
|
6
|
-
export { A as AllocateOpts, M as MergeOpts, a as MergeResult, R as RunController, b as RunControllerOptions, T as TOKENS, c as WorktreeHandle, d as WorktreeManagerOptions, e as WorktreeRunResult, f as WorktreeStatus, g as assertSafePath } from './index-
|
|
7
|
-
import { C as Context, P as Provider, T as Tool, R as Request, b as Response, M as Message, g as ContentBlock,
|
|
8
|
-
export { A as AgentError, d as CacheStats,
|
|
9
|
-
import { P as ProviderRunner, R as RunProviderOptions$1 } from './provider-runner-
|
|
10
|
-
import {
|
|
11
|
-
export { A as AutonomyConfig,
|
|
12
|
-
export { a as CompactReport, C as Compactor } from './compactor-
|
|
13
|
-
import { P as PermissionPolicy } from './permission-
|
|
14
|
-
export { a as PermissionDecision, S as SecretScrubber, T as TrustPolicy } from './permission-
|
|
1
|
+
import { S as SystemPromptBuilder, b as ModelCapabilities, B as BuildContext, C as Container, H as HookRegistry, c as Mailbox, d as MailboxMessage, a as Renderer } from './pipeline-BfD2k1rT.js';
|
|
2
|
+
export { A as AgentHeartbeatInput, e as AgentRegistrationInput, f as BindOptions, D as Decorator, F as Factory, g as MailboxAckInput, h as MailboxAgentStatus, i as MailboxMessageType, j as MailboxQuery, k as MailboxSendInput, l as MailboxTaskContext, m as Middleware, M as MiddlewareHandler, N as NextFn, P as Pipeline, n as PipelineOptions, o as ReadReceipts, p as RegisteredAgent, T as Token, q as hookMatcherMatches, r as normalizeRecipient } from './pipeline-BfD2k1rT.js';
|
|
3
|
+
import { E as EventBus, c as MemoryStore, a as EventName, L as Listener, B as BrainArbiter } from './brain-Cdg77tVN.js';
|
|
4
|
+
export { e as BrainDecision, f as BrainDecisionOption, g as BrainDecisionQueue, h as BrainDecisionRequest, i as BrainDecisionSource, j as BrainFallback, k as BrainRisk, D as DefaultBrainArbiter, l as DefaultBrainArbiterOptions, m as EventLogger, n as EventMap, H as HumanEscalatingBrainArbiter, o as MEMORY_TYPE_LABELS, p as MemoryClearedPayload, q as MemoryConsolidatedPayload, b as MemoryEntry, r as MemoryForgottenPayload, s as MemoryPriority, d as MemoryRelevanceContext, t as MemoryRememberedPayload, M as MemoryScope, u as MemoryType, O as ObservableBrainArbiter, v as ScopedEventBus, S as ScoredEntry, w as formatHumanPrompt } from './brain-Cdg77tVN.js';
|
|
5
|
+
import { W as WorktreeManager } from './index-DtCVWel4.js';
|
|
6
|
+
export { A as AllocateOpts, M as MergeOpts, a as MergeResult, R as RunController, b as RunControllerOptions, T as TOKENS, c as WorktreeHandle, d as WorktreeManagerOptions, e as WorktreeRunResult, f as WorktreeStatus, g as assertSafePath } from './index-DtCVWel4.js';
|
|
7
|
+
import { C as Context, P as Provider, T as Tool, R as Request, b as Response, M as Message, g as ContentBlock, o as TextBlock, J as JSONSchema } from './context-dT5Ueund.js';
|
|
8
|
+
export { A as AgentError, d as CacheStats, l as Capabilities, v as ConfigError, w as ContextEvidenceState, x as ContextFileEvidence, y as ContextInit, z as ContextIntentEvidence, B as ContextRepeatedReadEvidence, u as ConversationState, E as ERROR_CODES, D as ErrorCode, F as ErrorSeverity, G as ErrorSubsystem, H as FileSnapshot, I as FsError, K as ImageBlock, L as MessageRole, f as Permission, N as PluginError, e as ProviderError, O as ProviderErrorBody, Q as ReadonlyConversationState, q as ResumedSession, V as RiskTier, W as RunEnv, p as RunOptions, X as SddError, r as SessionData, Y as SessionError, S as SessionEvent, h as SessionMetadata, i as SessionStore, s as SessionSummary, a as SessionWriter, Z as StateChange, _ as StateChangeHandler, $ as StopReason, a0 as StreamEvent, a1 as StreamHangError, a2 as ThinkingBlock, t as TodoItem, c as TokenCounter, a3 as ToolCallContext, a4 as ToolError, a5 as ToolEvidenceStatus, a6 as ToolFinalEvent, a7 as ToolIconId, k as ToolOutputMetadata, j as ToolProgressEvent, n as ToolResultBlock, a8 as ToolStreamEvent, m as ToolUseBlock, U as Usage, a9 as WrongStackError, aa as asBlocks, ab as asText, ac as extractRunEnv, ad as isAgentError, ae as isConfigError, af as isFsError, ag as isImageBlock, ah as isPluginError, ai as isSddError, aj as isSessionError, ak as isTextBlock, al as isThinkingBlock, am as isToolError, an as isToolResultBlock, ao as isToolUseBlock, ap as isWrongStackError, aq as toWrongStackError, ar as wrapAsState } from './context-dT5Ueund.js';
|
|
9
|
+
import { P as ProviderRunner, R as RunProviderOptions$1 } from './provider-runner-CX7iIvox.js';
|
|
10
|
+
import { m as HookInput, n as HookOutcome, i as Config, T as TokenSavingTier, H as HookEvent, f as HookMatcher, I as InProcessHook, d as ModelMatrixEntry, j as ConfigStore } from './config-Du3pYYln.js';
|
|
11
|
+
export { A as AutonomyConfig, o as CONTEXT_WINDOW_MODES, p as CircuitBreakerRuntimeConfig, k as ConfigLoader, q as ContextConfig, C as ContextWindowAggressiveOn, r as ContextWindowConfigLike, s as ContextWindowMode, t as ContextWindowModeId, h as ContextWindowPolicy, u as ContextWindowThresholds, v as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, g as HookEntry, w as IndexingConfig, L as LaunchConfig, x as LogConfig, c as MCPServerConfig, e as ModelsDevModel, a as ModelsDevPayload, y as ModelsDevProvider, M as ModelsRegistry, z as PluginConfig, B as ProviderApiKey, P as ProviderConfig, b as ResolvedModel, R as ResolvedProvider, E as SessionLoggingConfig, S as ShellHook, G as SyncCategory, l as SyncConfig, J as ToolsConfig, W as WireFamily, K as formatContextWindowModeList, N as getContextWindowMode, O as isContextWindowModeId, Q as listContextWindowModes, U as normalizeTokenSavingTier, V as resolveContextWindowPolicy } from './config-Du3pYYln.js';
|
|
12
|
+
export { a as CompactReport, C as Compactor } from './compactor-iMZ84CXq.js';
|
|
13
|
+
import { P as PermissionPolicy } from './permission-B75JAi3-.js';
|
|
14
|
+
export { a as PermissionDecision, S as SecretScrubber, T as TrustPolicy } from './permission-B75JAi3-.js';
|
|
15
15
|
export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as SessionRewinder } from './session-rewinder-C9HnMkhP.js';
|
|
16
|
-
import { A as AttachmentStore, b as AttachmentRef, a as AddAttachmentInput } from './session-reader-
|
|
17
|
-
export { c as Attachment, d as AttachmentKind, e as AttachmentMeta, D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from './session-reader-
|
|
16
|
+
import { A as AttachmentStore, b as AttachmentRef, a as AddAttachmentInput } from './session-reader-D7Dapswh.js';
|
|
17
|
+
export { c as Attachment, d as AttachmentKind, e as AttachmentMeta, D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from './session-reader-D7Dapswh.js';
|
|
18
18
|
export { D as DEFAULT_AUTONOMY_CONFIG, a as DEFAULT_CIRCUIT_BREAKER_CONFIG, b as DEFAULT_CONTEXT_CONFIG, c as DEFAULT_SESSION_LOGGING_CONFIG, d as DEFAULT_SESSION_PRUNE_DAYS, e as DEFAULT_TOOLS_CONFIG } from './default-config-B0cj-Hry.js';
|
|
19
|
-
import {
|
|
20
|
-
export {
|
|
19
|
+
import { D as DefaultSecretVault } from './secret-vault-gkvEZZfE.js';
|
|
20
|
+
export { a as DefaultSecretScrubber, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, i as isSecretField, m as migratePlaintextSecrets, r as rewriteConfigEncrypted, b as rotateConfigKeys } from './secret-vault-gkvEZZfE.js';
|
|
21
21
|
import { D as DefaultLogger } from './logger-DmmQhf4P.js';
|
|
22
22
|
export { a as DefaultLoggerOptions, L as LogFormat, n as noOpLogger } from './logger-DmmQhf4P.js';
|
|
23
|
-
import { D as DefaultPathResolver } from './path-resolver-
|
|
24
|
-
export { a as DefaultTokenCounter } from './path-resolver-
|
|
25
|
-
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, E as EternalAutonomyEngine, c as EternalAutonomyOptions, d as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, e as ParallelEternalEngine, f as ParallelEternalOptions, g as ParallelIterationStage, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from './parallel-eternal-engine-
|
|
23
|
+
import { D as DefaultPathResolver } from './path-resolver-COIMLCQL.js';
|
|
24
|
+
export { a as DefaultTokenCounter } from './path-resolver-COIMLCQL.js';
|
|
25
|
+
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, E as EternalAutonomyEngine, c as EternalAutonomyOptions, d as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, e as ParallelEternalEngine, f as ParallelEternalOptions, g as ParallelIterationStage, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from './parallel-eternal-engine-DdNnw9BQ.js';
|
|
26
26
|
import { S as SkillLoader } from './skill-DGIXCtdv.js';
|
|
27
27
|
export { b as SkillEntry, a as SkillManifest } from './skill-DGIXCtdv.js';
|
|
28
28
|
export { I as InputReader, P as PromptOption } from './input-reader-E-ffP2ee.js';
|
|
29
|
-
import { k as SlashCommand, P as PluginAPI, l as PluginPipelines, m as ToolRegistryView, n as ProviderRegistryView, o as MCPRegistryView, p as SlashCommandRegistryView, q as SessionWriterView, r as MetricsSinkView, s as PluginCapabilities, t as PluginDependency, u as Plugin } from './agent-subagent-runner-
|
|
30
|
-
export { g as Agent, h as AgentFactory, v as AgentFactoryResult, w as AgentRunnerOptions, x as BudgetExceededError, y as BudgetKind, z as BudgetLimits, E as BudgetNegotiationMode, G as BudgetThresholdDecision, H as BudgetThresholdHandler, I as BudgetThresholdSignal, J as BudgetUsage, K as CoordinatorEvents, C as CoordinatorStatus, L as DECISION_TIMEOUT_MS, D as DoneCondition, F as FleetBus, N as FleetEvent, O as FleetHandler, i as FleetUsage, j as FleetUsageAggregator, c as MultiAgentConfig, M as MultiAgentCoordinator, e as SpawnResult, Q as SubagentBudget, S as SubagentConfig, R as SubagentContext, U as SubagentError, V as SubagentErrorKind, W as SubagentRunContext, X as SubagentRunOutcome, d as SubagentRunner, Y as SubagentUsageSnapshot, Z as TIMEOUT_PREEMPT_FRACTION, _ as TaskDelegation, f as TaskResult, T as TaskSpec, $ as makeAgentSubagentRunner, a0 as withDisabledToolFiltering } from './agent-subagent-runner-
|
|
31
|
-
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-
|
|
29
|
+
import { k as SlashCommand, P as PluginAPI, l as PluginPipelines, m as ToolRegistryView, n as ProviderRegistryView, o as MCPRegistryView, p as SlashCommandRegistryView, q as SessionWriterView, r as MetricsSinkView, s as PluginCapabilities, t as PluginDependency, u as Plugin } from './agent-subagent-runner-CzPGP3jA.js';
|
|
30
|
+
export { g as Agent, h as AgentFactory, v as AgentFactoryResult, w as AgentRunnerOptions, x as BudgetExceededError, y as BudgetKind, z as BudgetLimits, E as BudgetNegotiationMode, G as BudgetThresholdDecision, H as BudgetThresholdHandler, I as BudgetThresholdSignal, J as BudgetUsage, K as CoordinatorEvents, C as CoordinatorStatus, L as DECISION_TIMEOUT_MS, D as DoneCondition, F as FleetBus, N as FleetEvent, O as FleetHandler, i as FleetUsage, j as FleetUsageAggregator, c as MultiAgentConfig, M as MultiAgentCoordinator, e as SpawnResult, Q as SubagentBudget, S as SubagentConfig, R as SubagentContext, U as SubagentError, V as SubagentErrorKind, W as SubagentRunContext, X as SubagentRunOutcome, d as SubagentRunner, Y as SubagentUsageSnapshot, Z as TIMEOUT_PREEMPT_FRACTION, _ as TaskDelegation, f as TaskResult, T as TaskSpec, $ as makeAgentSubagentRunner, a0 as withDisabledToolFiltering } from './agent-subagent-runner-CzPGP3jA.js';
|
|
31
|
+
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-BqGZNJQ-.js';
|
|
32
32
|
import { M as ModeStore } from './mode-CZlO9iU1.js';
|
|
33
33
|
export { D as DEFAULT_MODES, b as Mode, a as ModeConfig, c as ModeManifest } from './mode-CZlO9iU1.js';
|
|
34
|
-
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-
|
|
34
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-STJ3JwwK.js';
|
|
35
35
|
export { D as DEFAULT_SPEC_TEMPLATE, S as SpecAnalysis, a as SpecApiEndpoint, b as SpecRequirement, c as SpecSection, d as SpecSectionType, e as SpecStatus, f as SpecTemplate, g as SpecValidationResult, h as Specification } from './spec-TBi3Jr6T.js';
|
|
36
36
|
import { d as TaskGraph, T as TaskType, a as TaskPriority, e as TaskNode } from './task-graph-u1q9Jkyk.js';
|
|
37
37
|
export { C as CriticalPathResult, f as TaskAssignment, g as TaskDependency, h as TaskEdge, i as TaskFilter, c as TaskProgress, j as TaskSort, b as TaskStatus, k as computeTaskProgress, l as findCriticalPath, t as topologicalSort } from './task-graph-u1q9Jkyk.js';
|
|
38
38
|
import { T as Tracer, M as MetricsSink, H as HealthRegistry } from './observability-D-HZN_mF.js';
|
|
39
39
|
export { A as AggregateHealth, a as HealthCheck, b as HealthCheckResult, c as HealthStatus, d as MetricLabels, e as MetricSeries, f as MetricsSnapshot, S as Span } from './observability-D-HZN_mF.js';
|
|
40
|
-
import { e as ToolRegistry, S as SystemPromptContributor, E as ExtensionRegistry, P as ProviderRegistry, A as AgentPipelines, f as ToolExecutorLike, c as ToolCallPipelinePayload } from './index-
|
|
41
|
-
export { i as AfterIterationHook, j as AfterRunHook, k as AfterToolExecutionHook, l as AgentExtension, g as AgentInit, h as AgentInput, B as BeforeIterationHook, m as BeforeRunHook, n as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, H as HookRunEnv, o as HookRunner, p as HookRunnerOptions, O as OnErrorHook, q as PreToolUseResult, r as PromptResult, s as ProviderFactory, t as ProviderRunnerWrapper, R as RunResult, d as ToolWrapper, U as UserInputPayload, u as createDefaultPipelines } from './index-
|
|
40
|
+
import { e as ToolRegistry, S as SystemPromptContributor, E as ExtensionRegistry, P as ProviderRegistry, A as AgentPipelines, f as ToolExecutorLike, c as ToolCallPipelinePayload } from './index-Bms0m4oy.js';
|
|
41
|
+
export { i as AfterIterationHook, j as AfterRunHook, k as AfterToolExecutionHook, l as AgentExtension, g as AgentInit, h as AgentInput, B as BeforeIterationHook, m as BeforeRunHook, n as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, H as HookRunEnv, o as HookRunner, p as HookRunnerOptions, O as OnErrorHook, q as PreToolUseResult, r as PromptResult, s as ProviderFactory, t as ProviderRunnerWrapper, R as RunResult, d as ToolWrapper, U as UserInputPayload, u as createDefaultPipelines } from './index-Bms0m4oy.js';
|
|
42
42
|
export { AutonomyStage, DistributiveOmit, DistributivePick } from './types/index.js';
|
|
43
43
|
import { estimateMessageTokens } from './utils/index.js';
|
|
44
|
-
export { AtomicWriteOptions, BuildChildEnvOptions, CompileFail, CompileResult, DeepMergeOptions, FORBIDDEN_PROTO_KEYS, FileLockOptions, MessageRepairReport, MessageRepairResult, NewlineStyle, OutputLineGuard, RequestTokenBreakdown, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, assertNever, assertNotPrivateHost, atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, completePartialObject, computeMessageTokens, createToolOutputSerializer, deepMerge, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, expandGlob, expandIPv6, formatTodosList, getCalibrationState, getTermSize, isInteractive, isPrimitiveArray, isPrivateIPv4, isPrivateIPv6, isStdinTTY, isStdoutTTY, matchAny, matchGlob, mergeCustomModelDefs, mergeModelsPayload, normalizeToLf, onResize, recordActualUsage, repairToolUseAdjacency, resetCalibration, safeParse, safeStringify, sanitizeJsonString, setOutputLineGuard, setRawMode, sleep, stripAnsi, toStyle, truncate, unifiedDiff, validateAgainstSchema, withFileLock, writeErr, writeOut } from './utils/index.js';
|
|
44
|
+
export { AtomicWriteOptions, BuildChildEnvOptions, CompactToolDefinitionForWireOptions, CompactWireToolDefinition, CompileFail, CompileResult, DeepMergeOptions, FORBIDDEN_PROTO_KEYS, FileLockOptions, MessageRepairReport, MessageRepairResult, NewlineStyle, OutputLineGuard, RecordToolOutputEvidenceInput, RequestTokenBreakdown, SafeParseResult, ToolOutputSerializerOptions, ToolWireDefinitionLike, UnifiedDiffOptions, ValidationError, ValidationResult, assertNever, assertNotPrivateHost, atomicWrite, buildChildEnv, buildContextEvidenceDigest, color, compactSchemaDescriptions, compactToolDefinitionForWire, compileGlob, compileUserRegex, completePartialObject, computeMessageTokens, createContextEvidenceState, createToolOutputSerializer, deepMerge, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, expandGlob, expandIPv6, formatTodosList, getCalibrationState, getTermSize, isInteractive, isPrimitiveArray, isPrivateIPv4, isPrivateIPv6, isStdinTTY, isStdoutTTY, markAssistantReferencedEvidence, matchAny, matchGlob, mergeCustomModelDefs, mergeModelsPayload, normalizeToLf, onResize, recordActualUsage, recordToolOutputEvidence, recordUserIntentEvidence, repairToolUseAdjacency, repeatedReadPressure, resetCalibration, safeParse, safeStringify, sanitizeJsonString, setOutputLineGuard, setRawMode, sleep, stripAnsi, toStyle, truncate, unifiedDiff, validateAgainstSchema, withFileLock, writeErr, writeOut } from './utils/index.js';
|
|
45
|
+
export { H as HttpDispatcher, a as HttpsAgentAsDispatcher } from './dispatcher-types.d-BBeXBQgS.js';
|
|
46
|
+
export { toErrorMessage } from './utils/error.js';
|
|
47
|
+
export { expectDefined } from './utils/expect-defined.js';
|
|
45
48
|
export { T as TaskItem, c as computeTaskItemProgress, f as formatTaskList, a as formatTaskProgress } from './task-format-vGOIftmK.js';
|
|
46
49
|
import { W as WstackPaths } from './wstack-paths-hOpNLmvf.js';
|
|
47
50
|
export { a as WstackPathOptions, p as projectHash, b as projectSlug, r as resolveWstackPaths, w as wstackGlobalRoot } from './wstack-paths-hOpNLmvf.js';
|
|
48
|
-
export {
|
|
49
|
-
export {
|
|
50
|
-
export { H as HttpDispatcher, a as HttpsAgentAsDispatcher } from './dispatcher-types.d-BBeXBQgS.js';
|
|
51
|
-
export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, F as FileMemoryBackend, j as FileMemoryBackendOptions, M as MemoryBackend, k as MemoryStoreOptions, l as MigrationContext, m as MigrationResult, P as PersistedQueueItem, n as PlanFile, o as PlanItem, p as PlanTemplate, Q as QueueStore, R as RecoveryLock, q as RecoveryLockOptions, S as SessionAnalyzer, r as SessionStoreOptions, T as TodosCheckpointFile, s as addPlanItem, t as attachPlanCheckpoint, u as attachTodosCheckpoint, v as clearPlan, w as deriveTodosFromPlanItem, x as emptyPlan, y as formatPlan, z as formatPlanTemplates, B as getPlanTemplate, E as listPlanTemplates, G as loadPlan, H as loadTodosCheckpoint, I as mutatePlan, J as parseEntries, K as removePlanItem, L as runConfigMigrations, N as savePlan, O as saveTodosCheckpoint, U as setPlanItemStatus } from './plan-templates-CzD9GnAU.js';
|
|
52
|
-
export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, a as STANDARD_AUDIT_EVENTS, S as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from './session-event-bridge-BUI6Jf-4.js';
|
|
51
|
+
export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, F as FileMemoryBackend, j as FileMemoryBackendOptions, M as MemoryBackend, k as MemoryStoreOptions, l as MigrationContext, m as MigrationResult, P as PersistedQueueItem, n as PlanFile, o as PlanItem, p as PlanTemplate, Q as QueueStore, R as RecoveryLock, q as RecoveryLockOptions, S as SessionAnalyzer, r as SessionStoreOptions, T as TodosCheckpointFile, s as addPlanItem, t as attachPlanCheckpoint, u as attachTodosCheckpoint, v as clearPlan, w as deriveTodosFromPlanItem, x as emptyPlan, y as formatPlan, z as formatPlanTemplates, B as getPlanTemplate, E as listPlanTemplates, G as loadPlan, H as loadTodosCheckpoint, I as mutatePlan, J as parseEntries, K as removePlanItem, L as runConfigMigrations, N as savePlan, O as saveTodosCheckpoint, U as setPlanItemStatus } from './plan-templates-DSIKCXZN.js';
|
|
52
|
+
export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, a as STANDARD_AUDIT_EVENTS, S as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from './session-event-bridge-D-araDEz.js';
|
|
53
53
|
export { a as DirectorStateCheckpoint, D as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from './director-state-BfeCUbmk.js';
|
|
54
|
-
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-
|
|
55
|
-
export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from './goal-preamble-
|
|
54
|
+
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-DlR9eJAM.js';
|
|
55
|
+
export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from './goal-preamble-SulMTowG.js';
|
|
56
56
|
export { DefaultProviderRunner } from './defaults/index.js';
|
|
57
|
-
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-
|
|
58
|
-
export { T as AGENT_TOOL_PRESETS, c as AgentBudgetTier, d as AgentCapability, b as AgentDefinition, A 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-
|
|
59
|
-
export { D as DefaultModeStore, L as LLMSelector, a as LLMSelectorOptions, M as ModeLoaderOptions, l as loadProjectModes, b as loadUserModes } from './
|
|
57
|
+
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-CnXa5oTH.js';
|
|
58
|
+
export { T as AGENT_TOOL_PRESETS, c as AgentBudgetTier, d as AgentCapability, b as AgentDefinition, A 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-B8R43uPz.js';
|
|
59
|
+
export { D as DefaultModeStore, L as LLMSelector, a as LLMSelectorOptions, M as ModeLoaderOptions, P as ProviderModelDescriptor, d as describeCatalogModel, l as loadProjectModes, b as loadUserModes, r as resolveProviderModelList } from './provider-model-resolve-BNRsNuJx.js';
|
|
60
60
|
import { TaskStore } from './sdd/index.js';
|
|
61
61
|
export { AISpecBuilder, AISpecBuilderOptions, AISpecPhase, AISpecSession, AutoExecutor, AutoExecutorOptions, BottleneckTask, CollectedAnswer, CriticalPathAnalysis, DefaultTaskStore, ExecutionSummary, GeneratedTask, SPEC_TEMPLATES, SddParallelRun, SddParallelRunOptions, SddProgress, SddTaskDecomposer, SddTaskDecomposerOptions, SpecDiff, SpecDrivenDev, SpecDrivenDevOptions, SpecIndexEntry, SpecParser, SpecStore, SpecStoreOptions, SpecVersion, SpecVersioning, TaskBatch, TaskExecutionContext, TaskExecutionResult, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskGraphIndexEntry, TaskGraphStore, TaskGraphStoreOptions, TaskTracker, TaskTrackerOptions, TaskTransition, WaveResult, analyzeCriticalPath, createAutoExecutor, getTemplate, listTemplates, renderProgress, renderSpecAnalysis, renderTaskGraph, renderTaskList, templateToMarkdown } from './sdd/index.js';
|
|
62
62
|
export { DefaultHealthRegistry, InMemoryMetricsSink, MetricsServerHandle, MetricsServerOptions, NoopMetricsSink, NoopTracer, OTelTracer, OtlpMetricsExporterHandle, OtlpMetricsExporterOptions, OtlpTraceExporterHandle, OtlpTraceExporterOptions, PROMETHEUS_CONTENT_TYPE, buildOtlpMetricsRequest, buildOtlpTracesRequest, renderPrometheus, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, wireMetricsToEvents } from './observability/index.js';
|
|
63
|
-
export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, q as slackServer, z as zaiVisionServer } from './mcp-servers-
|
|
63
|
+
export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, q as slackServer, z as zaiVisionServer } from './mcp-servers-C2cBTxUR.js';
|
|
64
64
|
export { DownloadResult, InstallResult, InstalledSkillEntry, ManifestData, ParsedRef, SkillInstaller, SkillInstallerOptions, SkillManifestStore, UpdateResult, downloadGitHubTarball, parseSkillRef } from './skills/index.js';
|
|
65
65
|
import { ReplayLogStore, DefaultPromptStore } from './storage/index.js';
|
|
66
66
|
export { ALL_SYNC_CATEGORIES, AgentEntry, AgentLiveStatus, AgentStatusTracker, AgentStatusTrackerOptions, Annotation, AnnotationsStore, AnnotationsStoreOptions, AuditEntry, CloudSync, ConsolidationOp, DefaultSessionRewinder, FleetNotifier, FleetNotifierOptions, GraphMemoryBackend, GraphMemoryBackendOptions, MemoryConsolidatorOptions, PromptEntry, PromptStore, RecoveryPlan, ReplayEntry, ReplayLogStoreOptions, SessionLiveStatus, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, SessionRegistryEntry, SessionRewinderOptions, StaleSession, SyncResult, TaskFile, ToolAuditLog, ToolAuditLogOptions, VerifyResult, emptyTaskFile, getSessionRegistry, hasSessionRegistry, loadTasks, mutateTasks, saveTasks } from './storage/index.js';
|
|
67
|
-
export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as MAX_PROGRESS_HISTORY, P as ProgressSnapshot, b as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, p as parseProgressFromText, r as recordProgress, s as saveGoal, c as setProgress, d as summarizeUsage } from './goal-store-
|
|
68
|
-
import { R as RetryPolicy, E as ErrorHandler } from './retry-policy-
|
|
67
|
+
export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as MAX_PROGRESS_HISTORY, P as ProgressSnapshot, b as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, p as parseProgressFromText, r as recordProgress, s as saveGoal, c as setProgress, d as summarizeUsage } from './goal-store-CABDwdFE.js';
|
|
68
|
+
import { R as RetryPolicy, E as ErrorHandler } from './retry-policy-BilV1ujH.js';
|
|
69
69
|
export { ApplyResult, ApprovalDecision, AutonomousBrain, AutonomousBrainOptions, AutonomousCoordinator, AutonomousCoordinatorOptions, AutonomousDecisionRequest, AutonomousDecisionType, BUILD_AGENTS, BrainInterventionInput, BrainMonitor, BrainMonitorOptions, ChangeFile, ChangeManager, ChangeManagerOptions, ChangeNode, ChangeProposal, ChangeStatus, ConsensusOptions, ConsensusProtocol, ConsensusResult, CoordinatorEvent, CoordinatorStats, DAGEdgeEvent, DAGEdgeHandler, DAGNode, DAGNodeStatus, DEFAULT_QUALITY_CHECKS, DELIVERY_AGENTS, DEPENDENCY_FILE_PATTERNS, DISCOVERY_AGENTS, DOMAIN_AGENTS, DecisionNode, DecisionPrompt, DefaultMailbox, DepWatchEntry, DepWatcherBridgeOptions, DependencyWatcherConfig, EscalationDecision, FactCategory, FactNode, GlobalMailbox, GoalNode, GoalPriority, GoalStatus, GraphSubscription, KNOWLEDGE_AGENTS, KnowledgeGraph, LLMProvider, META_AGENTS, MailToolsOptions, MailboxHooksOptions, MailboxResolver, MailboxToolOptions, NodeFilter, NodeType, OutdatedNotifyMessage, PLANNING_AGENTS, PackageAuthorEntry, PackageAuthorLog, PackageAuthorTrackerOptions, PackageOutdatedEntry, PackageOutdatedResult, PackageOutdatedWatcherOptions, PrioritizationDecision, QualityCheck, QualityGateChecks, QualityGateResult, QuorumRule, REVIEW_AGENTS, RollbackResult, RunnablesHandler, SpawnDecision, TaskAuctionOptions, TaskAuctioneer, TaskBid, TaskDAG, VERIFY_AGENTS, VoteNode, VoteRecord, VoteValue, VoterConfig, attachDepWatcherBridge, createMailboxHooks, detectEcosystem, detectEcosystem as detectPackageEcosystem, getFullPackageLog, getManifestPackages, getPackageAuthor, getPackagesByAgent, mailboxSessionTag, makeDependencyWatcherConfig, makeMailInboxTool, makeMailSendTool, makeMailboxTool, recordPackageAction, resolveMailboxIdentity, resolveProjectDir, startPackageOutdatedWatcher, updatePackageOutdatedStatus } from './coordination/index.js';
|
|
70
70
|
import { MCPRegistryHandle } from './tools/index.js';
|
|
71
71
|
export { createMcpControlTool } from './tools/index.js';
|
|
72
72
|
import { L as Logger } from './logger-B63L5bTg.js';
|
|
73
73
|
export { a as LogLevel } from './logger-B63L5bTg.js';
|
|
74
74
|
export { R as RotatableSecretVault, S as SecretVault, e as encryptedPrefixForVersion, n as noOpVault, p as parseEncryptedVersion } from './secret-vault-BAKpgFw_.js';
|
|
75
|
+
export { D as DANGEROUS_FOR_SUBAGENTS, T as ToolCapabilities, a as ToolCapability, W as WIDE_SUBAGENT_CAPABILITIES, g as getDangerousCapabilities, h as hasCapability, b as hasDangerousCapabilityForSubagents } from './index-IEuxQd-E.js';
|
|
75
76
|
export { ConversationTurn, ENHANCER_SYSTEM_PROMPT, EnhanceResult, EnhanceUserPromptOptions, enhanceUserPrompt, normalizedEqual, recentTextTurns, shouldEnhance } from './execution/prompt-enhancer.js';
|
|
76
77
|
export { AutonomyBrainOptions, BrainAutoRisk, TieredBrainArbiterOptions, createAutonomyBrain, createTieredBrainArbiter, formatDecisionSummary } from './execution/index.js';
|
|
77
78
|
import './path-resolver-CPRj4bFY.js';
|
|
78
79
|
import 'node:https';
|
|
79
80
|
import 'undici';
|
|
80
|
-
import './selector-
|
|
81
|
+
import './selector-Bc7eWtT3.js';
|
|
81
82
|
import 'node:events';
|
|
82
83
|
|
|
83
84
|
/**
|
|
@@ -474,7 +475,7 @@ interface EliseResult {
|
|
|
474
475
|
changed: boolean;
|
|
475
476
|
}
|
|
476
477
|
/**
|
|
477
|
-
* Elide oversized
|
|
478
|
+
* Elide oversized tool I/O that falls before the preserve window. Pure:
|
|
478
479
|
* returns a fresh array (or the same reference when unchanged). Replaces the
|
|
479
480
|
* duplicate copies that lived in all three compactors.
|
|
480
481
|
*/
|
|
@@ -850,7 +851,7 @@ declare class InputBuilder {
|
|
|
850
851
|
private shouldCollapse;
|
|
851
852
|
}
|
|
852
853
|
|
|
853
|
-
declare const LAYER_1_IDENTITY = "You are WrongStack, a command-line AI coding agent.\n\nYou operate inside the user's terminal with direct read and write access to their working directory, the ability to run shell commands, and access to the web. You assist a developer who knows what they're doing \u2014 your job is to accelerate them, not to second-guess them.\n\nThese are your baseline instructions. When an active mode prompt (Teach, Brief, Code Reviewer, etc.) is present in your context, its instructions **override** conflicting defaults below \u2014 the mode layer always wins on conflict.\n\n## Core principles\n\n1. **Read before you write.** Always inspect the relevant files before proposing changes. Assumptions about code you haven't read are bugs in waiting.\n2. **Prefer surgical edits over rewrites.** When modifying existing files, use the edit tool with str_replace; only use write for new files or full replacements explicitly requested.\n3. **Show your work.** Before non-trivial changes, briefly state what you're about to do \u2014 one sentence, not a wall of text. After tool calls, summarize what happened, not what you did mechanically.\n4. **Be honest about limits.** If you don't know, say so. If something failed, say what failed and what you'll try next. Never fabricate file contents, API responses, or test results.\n5. **Be concise.** The user is a developer in a terminal. No marketing language, no \"great question!\", no bullet-point lists when prose works. If a one-liner answers, a one-liner is the answer. (Active modes may override verbosity \u2014 follow the mode's guidance on depth.)\n6. **Ask when blocked, proceed when not.** If the task is ambiguous in a way that meaningfully changes the approach, ask. If it's ambiguous in a way that doesn't, pick a reasonable default and proceed, stating the assumption.\n7. **Trust the tools.** If a permission prompt is shown, the user will answer. Do not preemptively explain that you \"would like to\" do something \u2014 call the tool, let the permission flow decide.\n8. **Format for scanability.** Use code blocks for code, backticks for file paths, bold for key terms. One-liners stay one line. Paragraphs max 3 sentences.\n9. **Match the user's language.** Respond in the same language the user writes in. If they write in Turkish, reply in Turkish. If they mix languages, follow the dominant one.\n10. **Recover explicitly.** When a tool fails, distinguish the failure type and respond accordingly:\n\n| Failure type | Examples | Strategy |\n|---|---|---|\n| **Transient** | Timeout, rate limit, network hiccup | Retry once with adjusted params, then report |\n| **Permanent** | Syntax error, missing file, type error, permission denied | Do NOT retry \u2014 diagnose and report the root cause |\n| **Validation** | Invalid argument, out-of-range value, schema mismatch | State what was rejected and what range/format is accepted |\n\nNever silently skip a failure \u2014 always report it, even when you choose not to retry.\n\n## Decision heuristics\n\n- **Task is ambiguous** (unclear which file, conflicting requirements) \u2192 ask before proceeding\n- **Task is clear, approach is unknown** \u2192 try one approach, report what happened\n- **Tool fails** \u2192 classify the failure (transient/permanent/validation), then apply the appropriate recovery\n- **Permission prompt shown** \u2192 wait for user, do not act unilaterally\n- **Tool denied by user** \u2192 do NOT retry the same tool in the next iteration. If the user denies a write, bash, or any tool, respect that decision. The user's \"no\" is final \u2014 acknowledge it and ask if they'd like to clarify what they actually want.\n- **Context window filling up** \u2192 use context_manager proactively; don't wait to be told\n\n## How you work\n\n- **Stay focused.** When fixing a bug, fix only the bug \u2014 don't refactor neighboring code unless the user asks.\n- **Comment with purpose.** Add comments only when they explain why, not what. The code already says what.\n- **Own your output.** Never call work \"production-ready\" or \"fully tested\" \u2014 the user makes that call.\n- **Move on from mistakes.** When something fails, report what happened and what you'll do next. No apologies, no hand-wringing.\n- **Respect denied tools.** If the user denies a tool call (via permission prompt), do not retry that same operation in the next iteration. The user's \"no\" means \"find another way or ask\". Never re-attempt a denied tool unless the user explicitly asks you to try again.\n- **When denied, ask.** If the user refuses a tool call, do not attempt to work around it, do not suggest alternatives unprompted, and do not retry. Acknowledge the denial and explicitly ask: \"What would you like me to do instead?\"\n- **Stay in your lane.** Don't lecture about software engineering principles unless explicitly asked \u2014 the user is the expert on their codebase.\n\n## After-task suggestions\n\n**You are the leader agent.** After completing a significant task, you MAY end your\nresponse with 2\u20134 suggested next prompt options in a `<next_steps>` block.\nThe `/next 1`, `/next 2`, `/next 1 2 3` shortcuts let the user select one\nand continue in a new agent session.\n\nFormat:\n\n```\n<next_steps>\n1. Prompt option 1 \u2014 a concrete next action phrased as what to type\n2. Prompt option 2\n3. Prompt option 3 (optional)\n</next_steps>\n```\n\nRules:\n- Each item is a **prompt the user can type** \u2014 not an instruction to a human.\n Write \"pnpm test\" not \"Run the test suite.\"\n- Human-only actions (e.g., \"open DevTools\") go outside the tag as plain text,\n not inside `<next_steps>`.\n- Items marked `auto=\"true\"` must include the exact input content for copy-paste.\n- Order by priority. Keep each suggestion to one line.\n- Skip during multi-step operations \u2014 only show after completion.\n- If nothing is pending, omit the tag entirely.\n\n**After a significant task**, also post a status update to the inter-agent\nmailbox so other agents in the fleet can discover what you finished and\nroute follow-on work. Use:\n`mailbox action=send to=* type=status subject=\"<one-line task summary>\" body=\"<brief outcome>\"`\n\nThe user can execute via `/next 1`, view via `/next list`, or generate\nfresh suggestions via `/suggest`.";
|
|
854
|
+
declare const LAYER_1_IDENTITY = "You are WrongStack, a command-line AI coding agent.\n\nYou operate inside the user's terminal with direct read and write access to their working directory, the ability to run shell commands, and access to the web. You assist a developer who knows what they're doing \u2014 your job is to accelerate them, not to second-guess them.\n\nThese are your baseline instructions. When an active mode prompt (Teach, Brief, Code Reviewer, etc.) is present in your context, its instructions **override** conflicting defaults below \u2014 the mode layer always wins on conflict.\n\n## Core principles\n\n1. **Read before you write.** Always inspect the relevant files before proposing changes. Assumptions about code you haven't read are bugs in waiting.\n2. **Prefer surgical edits over rewrites.** When modifying existing files, use the edit tool with str_replace; only use write for new files or full replacements explicitly requested.\n3. **Show your work.** Before non-trivial changes, briefly state what you're about to do \u2014 one sentence, not a wall of text. After tool calls, summarize what happened, not what you did mechanically.\n4. **Be honest about limits.** If you don't know, say so. If something failed, say what failed and what you'll try next. Never fabricate file contents, API responses, or test results.\n5. **Be concise.** The user is a developer in a terminal. No marketing language, no \"great question!\", no bullet-point lists when prose works. If a one-liner answers, a one-liner is the answer. (Active modes may override verbosity \u2014 follow the mode's guidance on depth.)\n6. **Ask when blocked, proceed when not.** If the task is ambiguous in a way that meaningfully changes the approach, ask. If it's ambiguous in a way that doesn't, pick a reasonable default and proceed, stating the assumption.\n7. **Trust the tools.** If a permission prompt is shown, the user will answer. Do not preemptively explain that you \"would like to\" do something \u2014 call the tool, let the permission flow decide.\n8. **Format for scanability.** Use code blocks for code, backticks for file paths, bold for key terms. One-liners stay one line. Paragraphs max 3 sentences.\n9. **Match the user's language.** Respond in the same language the user writes in. If they write in Turkish, reply in Turkish. If they mix languages, follow the dominant one.\n10. **Recover explicitly.** When a tool fails, distinguish the failure type and respond accordingly:\n\n| Failure type | Examples | Strategy |\n|---|---|---|\n| **Transient** | Timeout, rate limit, network hiccup | Retry once with adjusted params, then report |\n| **Permanent** | Syntax error, missing file, type error, permission denied | Do NOT retry \u2014 diagnose and report the root cause |\n| **Validation** | Invalid argument, out-of-range value, schema mismatch | State what was rejected and what range/format is accepted |\n\nNever silently skip a failure \u2014 always report it, even when you choose not to retry.\n\n**Empty results are not failures.** When a tool returns an empty result (no lines, no matches, no output), this means the operation completed successfully but found nothing. Do NOT retry the same call with the same parameters \u2014 interpret the empty result and adjust your approach. For example, an empty file read at a given offset means you've reached the end of the file; an empty grep means no matches exist.\n\n## Decision heuristics\n\n- **Task is ambiguous** (unclear which file, conflicting requirements) \u2192 ask before proceeding\n- **Task is clear, approach is unknown** \u2192 try one approach, report what happened\n- **Tool fails** \u2192 classify the failure (transient/permanent/validation), then apply the appropriate recovery\n- **Permission prompt shown** \u2192 wait for user, do not act unilaterally\n- **Tool denied by user** \u2192 do NOT retry the same tool in the next iteration. If the user denies a write, bash, or any tool, respect that decision. The user's \"no\" is final \u2014 acknowledge it and ask if they'd like to clarify what they actually want.\n- **Context window filling up** \u2192 use context_manager proactively; don't wait to be told\n\n## How you work\n\n- **Stay focused.** When fixing a bug, fix only the bug \u2014 don't refactor neighboring code unless the user asks.\n- **Comment with purpose.** Add comments only when they explain why, not what. The code already says what.\n- **Own your output.** Never call work \"production-ready\" or \"fully tested\" \u2014 the user makes that call.\n- **Move on from mistakes.** When something fails, report what happened and what you'll do next. No apologies, no hand-wringing.\n- **Respect denied tools.** If the user denies a tool call (via permission prompt), do not retry that same operation in the next iteration. The user's \"no\" means \"find another way or ask\". Never re-attempt a denied tool unless the user explicitly asks you to try again.\n- **When denied, ask.** If the user refuses a tool call, do not attempt to work around it, do not suggest alternatives unprompted, and do not retry. Acknowledge the denial and explicitly ask: \"What would you like me to do instead?\"\n- **Stay in your lane.** Don't lecture about software engineering principles unless explicitly asked \u2014 the user is the expert on their codebase.\n\n## After-task suggestions\n\n**You are the leader agent.** After completing a significant task, you MAY end your\nresponse with 2\u20134 suggested next prompt options in a `<next_steps>` block.\nThe `/next 1`, `/next 2`, `/next 1 2 3` shortcuts let the user select one\nand continue in a new agent session.\n\nFormat:\n\n```\n<next_steps>\n1. Prompt option 1 \u2014 a concrete next action phrased as what to type\n2. Prompt option 2\n3. Prompt option 3 (optional)\n</next_steps>\n```\n\nRules:\n- Each item is a **prompt the user can type** \u2014 not an instruction to a human.\n Write \"pnpm test\" not \"Run the test suite.\"\n- Human-only actions (e.g., \"open DevTools\") go outside the tag as plain text,\n not inside `<next_steps>`.\n- Items marked `auto=\"true\"` must include the exact input content for copy-paste.\n- Order by priority. Keep each suggestion to one line.\n- Skip during multi-step operations \u2014 only show after completion.\n- If nothing is pending, omit the tag entirely.\n\n**After a significant task**, also post a status update to the inter-agent\nmailbox so other agents in the fleet can discover what you finished and\nroute follow-on work. Use:\n`mailbox action=send to=* type=status subject=\"<one-line task summary>\" body=\"<brief outcome>\"`\n\nThe user can execute via `/next 1`, view via `/next list`, or generate\nfresh suggestions via `/suggest`.";
|
|
854
855
|
interface DefaultSystemPromptBuilderOptions {
|
|
855
856
|
memoryStore?: MemoryStore | undefined;
|
|
856
857
|
skillLoader?: SkillLoader | undefined;
|
|
@@ -2210,6 +2211,78 @@ declare function compactLog(opts: Pick<FileAuthorTrackerOptions, 'storageDir' |
|
|
|
2210
2211
|
kept: number;
|
|
2211
2212
|
}>;
|
|
2212
2213
|
|
|
2214
|
+
/**
|
|
2215
|
+
* commit-safety — detect when a commit would sweep up work that this session
|
|
2216
|
+
* did NOT author.
|
|
2217
|
+
*
|
|
2218
|
+
* When several coding agents (or a separate wrongstack process, or a human)
|
|
2219
|
+
* edit the same worktree at once, a blanket `git add .` / commit-all captures
|
|
2220
|
+
* everyone's uncommitted changes — including half-finished work from another
|
|
2221
|
+
* agent. There is no way to un-bake that once it lands in a shared commit.
|
|
2222
|
+
*
|
|
2223
|
+
* This module reads the working tree and cross-references it against the
|
|
2224
|
+
* per-project {@link file-author-tracker} log (which records the sessionId that
|
|
2225
|
+
* created/edited each file). Dirty files whose latest author is a DIFFERENT
|
|
2226
|
+
* session are flagged as "foreign"; dirty files with no recorded author are
|
|
2227
|
+
* "unverified" (a concurrent non-wrongstack agent, a build/format step, or a
|
|
2228
|
+
* human). The result is a plain-text warning callers render before committing.
|
|
2229
|
+
*
|
|
2230
|
+
* Warn-only by design: this never blocks or rewrites what gets committed — it
|
|
2231
|
+
* surfaces the risk so the agent (or user) can scope the commit to its own
|
|
2232
|
+
* files or coordinate first.
|
|
2233
|
+
*
|
|
2234
|
+
* @module commit-safety
|
|
2235
|
+
*/
|
|
2236
|
+
interface CommitSafetyOptions {
|
|
2237
|
+
/** Directory to run git in (the agent's cwd is fine). */
|
|
2238
|
+
cwd: string;
|
|
2239
|
+
/** Project root, used to locate the file-author log. */
|
|
2240
|
+
projectRoot: string;
|
|
2241
|
+
/**
|
|
2242
|
+
* The current session's id — the "self" key. Dirty files authored by a
|
|
2243
|
+
* different sessionId are flagged as foreign. When omitted, every authored
|
|
2244
|
+
* file counts as foreign (we cannot prove ownership).
|
|
2245
|
+
*/
|
|
2246
|
+
sessionId?: string | undefined;
|
|
2247
|
+
/**
|
|
2248
|
+
* Directory holding the file-author log. Defaults to the resolved per-project
|
|
2249
|
+
* dir (`~/.wrongstack/projects/<slug>`). Mainly an injection seam for tests.
|
|
2250
|
+
*/
|
|
2251
|
+
storageDir?: string | undefined;
|
|
2252
|
+
/** Abort signal for the git subprocesses. */
|
|
2253
|
+
signal?: AbortSignal | undefined;
|
|
2254
|
+
}
|
|
2255
|
+
interface ForeignFile {
|
|
2256
|
+
/** Repo-relative path. */
|
|
2257
|
+
path: string;
|
|
2258
|
+
/** Human-readable name of the agent that last authored it, if known. */
|
|
2259
|
+
agentName?: string | undefined;
|
|
2260
|
+
/** Session that last authored it, if known. */
|
|
2261
|
+
sessionId?: string | undefined;
|
|
2262
|
+
}
|
|
2263
|
+
interface CommitSafetyReport {
|
|
2264
|
+
/** Total uncommitted (staged + unstaged + untracked) paths. */
|
|
2265
|
+
dirtyCount: number;
|
|
2266
|
+
/** Dirty files whose latest recorded author is a DIFFERENT session. */
|
|
2267
|
+
foreignFiles: ForeignFile[];
|
|
2268
|
+
/** Dirty files with no recorded author for any session. */
|
|
2269
|
+
unverifiedFiles: string[];
|
|
2270
|
+
/** Branch names of OTHER active worktrees of this repo (excludes ours). */
|
|
2271
|
+
otherWorktrees: string[];
|
|
2272
|
+
/**
|
|
2273
|
+
* Pre-formatted, plain-text (no ANSI) multi-line warning, or '' when there
|
|
2274
|
+
* is nothing notable to surface. Callers may colorize/wrap as they see fit.
|
|
2275
|
+
*/
|
|
2276
|
+
warning: string;
|
|
2277
|
+
}
|
|
2278
|
+
/**
|
|
2279
|
+
* Assess whether committing now risks capturing another agent's work.
|
|
2280
|
+
*
|
|
2281
|
+
* Best-effort: any git failure (not a repo, git missing, timeout) yields an
|
|
2282
|
+
* empty report rather than throwing — commit-safety must never break a commit.
|
|
2283
|
+
*/
|
|
2284
|
+
declare function assessCommitSafety(opts: CommitSafetyOptions): Promise<CommitSafetyReport>;
|
|
2285
|
+
|
|
2213
2286
|
/**
|
|
2214
2287
|
* techstack-mailbox-consumer — Auto-spawns the tech-stack agent when
|
|
2215
2288
|
* dep-watcher messages land in the mailbox.
|
|
@@ -2529,4 +2602,4 @@ interface ChimeraReviewNeededPayload {
|
|
|
2529
2602
|
declare const CHIMERA_REVIEW_PROMPT = "You are Chimera, a post-session code quality agent. You review files that\nwere ADDED or MODIFIED during an AI coding session and produce a concise,\nactionable report.\n\nRULES\n1. Only review the files provided \u2014 do not expand scope.\n2. Use read/grep/lint tools to inspect files before flagging issues.\n3. Be surgical \u2014 flag real bugs, not style preferences.\n4. Severity-ranked: Critical > High > Medium > Low. Only report Medium+.\n5. One finding per line with severity, file:line, and a one-sentence fix.\n\nWHAT TO LOOK FOR\n- Logic bugs: off-by-one, inverted condition, null deref without guard\n- Type safety: `as any`, missing return type on export, `!` assertion\n- Error handling: missing try/catch on async, swallowed errors\n- Security: hardcoded secret, shell injection, innerHTML XSS\n- Resource leaks: event listener not removed, file handle not closed\n- Test gaps: new logic without corresponding test\n- API design: wrong status code, missing validation, secrets in URL\n\nREPORT FORMAT\n## \uD83E\uDD82 Chimera Review\n\n### Critical (N)\n1. [BUG] `path/file.ts:42` \u2014 description\n \u2192 fix suggestion\n\n### High (N)\n...\n\n### Medium (N)\n...\n\n### Summary\n- Files reviewed: N\n- Findings: C critical, H high, M medium\n- Clean files: N\n\nIf NOTHING worth flagging:\n## \uD83E\uDD82 Chimera Review \u2014 all clear \u2705\nNo issues found in N changed files.";
|
|
2530
2603
|
declare function createChimeraPlugin(): Plugin;
|
|
2531
2604
|
|
|
2532
|
-
export { AddAttachmentInput, AgentPipelines, AttachmentRef, AttachmentStore, type AutoPhaseOptions, type AutoPhasePlanResult, AutoPhasePlanner, type AutoPhasePlannerOptions, AutoPhaseRunner, type AutoPhaseRunnerOptions, type BootConfigOptions, type BootConfigResult, BrainArbiter, BuildContext, CHIMERA_REVIEW_PROMPT, type Checkpoint, CheckpointManager, type CheckpointManagerOptions, type ChimeraReviewNeededPayload, type CollabBusState, type InjectedToolResult as CollabInjectedToolResult, type CollabPauseMiddlewareOptions, CollaborationBus, Config, ConfigStore, Container, ContentBlock, type ContentScore, Context, type ContinueDirective, DefaultLogger, DefaultPathResolver, DefaultPluginAPI, DefaultPromptStore, DefaultSecretVault, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, type DetectedDependency, type DetectionResult, type EliseResult, EventBus, EventName, ExtensionRegistry, type FileAuthorEntry, type FileAuthorLog, type FileAuthorTrackerOptions, type Finding, type FullScanResult, type GeneratedSecuritySkill, type GeneratedSkill, type GeneratedSkillContent, GitignoreUpdater, HealthRegistry, HookEvent, HookInput, HookMatcher, HookOutcome, HookRegistry, InProcessHook, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, JSONSchema, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, MATRIX_PHASE_KEYS, MCPRegistryHandle, MCPRegistryView, Mailbox, type MailboxLoopOptions, MailboxMessage, type MatrixKeyKind, MemoryStore, Message, MetricsSink, MetricsSinkView, ModeStore, ModelCapabilities, ModelMatrixEntry, type PackageManager, PermissionPolicy, type PhaseEventMap, type PhaseEventName, type PhaseExecutionContext, type PhaseFilter, type PhaseGraph, PhaseGraphBuilder, type PhaseGraphBuilderOptions, type PhaseNode, PhaseOrchestrator, type PhaseOrchestratorOptions, type PhaseProgress, type PhaseSort, type PhaseStatus, PhaseStore, type PhaseStoreOptions, type PhaseTemplate, Plugin, PluginAPI, type PluginAPIInit, PluginCapabilities, PluginDependency, PluginPipelines, Provider, ProviderRegistry, ProviderRegistryView, ProviderRunner, Renderer, ReplayLogStore, type ReplayMode, ReplayProviderRunner, type ReplayProviderRunnerOptions, ReportGenerator, type ReportOptions, Request, type ResolvedChimeraConfig, Response, RunProviderOptions$1 as RunProviderOptions, type ScanOptions, type ScanResult, type ScanScope, type SecurityPattern, SecurityScanner, type SecurityScannerContext, type SecurityScannerOptions, SecurityScannerOrchestrator, SessionWriterView, type SeverityLevel, type ShellHookSpec, type SkillGenerationContext, SkillGenerator, type SkillGeneratorOptions, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, SystemPromptContributor, TaskGraph, TaskNode, TaskPriority, TaskStore, TaskType, type TechStack, type TechStackConsumerOptions, TechStackDetector, type TechStackInfo, TextBlock, TokenSavingTier, Tool, ToolCallPipelinePayload, ToolRegistry, ToolRegistryView, Tracer, WorktreeManager, WstackPaths, attachMailboxChecker, bootConfig, buildBtwBlock, buildLosslessDigest, buildMailboxBlock, buildQueuedMessagesBlock, buildSmartDigest, collabInjectMiddleware, collabPauseMiddleware, compactLog, consumeBtwNotes, consumeQueuedMessagesUpdate, createAutoPhaseFromTaskGraph, createChimeraPlugin, createGitPlugin, createMailboxChecker, createMcpUseTool, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSkillsPlugin, createSyncPlugin, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, definePlugin, eliseOldToolResults, estimateMessageTokens, estimateMessages, extractText, findPreserveStart, flagsToConfigPatch, getFileHistory, getFilesByAgent, getFullLog, getLastAuthor, hasTextContent, hashRequest, injectPendingMailboxMessages, isValidMatrixKey, loadPlugins, makeContinueToNextIterationTool, matrixKeyKind, parseContinueDirective, peekQueuedMessages, pendingBtwCount, phaseForRole, recordFileAction, resolveChimeraConfig, resolveModelMatrix, runProviderWithRetry, runShellHook, scoreMessage, securitySlashCommand, setBtwNote, setQueuedMessagesSnapshot, stableStringify, startTechStackConsumer, unloadPlugins };
|
|
2605
|
+
export { AddAttachmentInput, AgentPipelines, AttachmentRef, AttachmentStore, type AutoPhaseOptions, type AutoPhasePlanResult, AutoPhasePlanner, type AutoPhasePlannerOptions, AutoPhaseRunner, type AutoPhaseRunnerOptions, type BootConfigOptions, type BootConfigResult, BrainArbiter, BuildContext, CHIMERA_REVIEW_PROMPT, type Checkpoint, CheckpointManager, type CheckpointManagerOptions, type ChimeraReviewNeededPayload, type CollabBusState, type InjectedToolResult as CollabInjectedToolResult, type CollabPauseMiddlewareOptions, CollaborationBus, type CommitSafetyOptions, type CommitSafetyReport, Config, ConfigStore, Container, ContentBlock, type ContentScore, Context, type ContinueDirective, DefaultLogger, DefaultPathResolver, DefaultPluginAPI, DefaultPromptStore, DefaultSecretVault, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, type DetectedDependency, type DetectionResult, type EliseResult, EventBus, EventName, ExtensionRegistry, type FileAuthorEntry, type FileAuthorLog, type FileAuthorTrackerOptions, type Finding, type ForeignFile, type FullScanResult, type GeneratedSecuritySkill, type GeneratedSkill, type GeneratedSkillContent, GitignoreUpdater, HealthRegistry, HookEvent, HookInput, HookMatcher, HookOutcome, HookRegistry, InProcessHook, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, JSONSchema, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, MATRIX_PHASE_KEYS, MCPRegistryHandle, MCPRegistryView, Mailbox, type MailboxLoopOptions, MailboxMessage, type MatrixKeyKind, MemoryStore, Message, MetricsSink, MetricsSinkView, ModeStore, ModelCapabilities, ModelMatrixEntry, type PackageManager, PermissionPolicy, type PhaseEventMap, type PhaseEventName, type PhaseExecutionContext, type PhaseFilter, type PhaseGraph, PhaseGraphBuilder, type PhaseGraphBuilderOptions, type PhaseNode, PhaseOrchestrator, type PhaseOrchestratorOptions, type PhaseProgress, type PhaseSort, type PhaseStatus, PhaseStore, type PhaseStoreOptions, type PhaseTemplate, Plugin, PluginAPI, type PluginAPIInit, PluginCapabilities, PluginDependency, PluginPipelines, Provider, ProviderRegistry, ProviderRegistryView, ProviderRunner, Renderer, ReplayLogStore, type ReplayMode, ReplayProviderRunner, type ReplayProviderRunnerOptions, ReportGenerator, type ReportOptions, Request, type ResolvedChimeraConfig, Response, RunProviderOptions$1 as RunProviderOptions, type ScanOptions, type ScanResult, type ScanScope, type SecurityPattern, SecurityScanner, type SecurityScannerContext, type SecurityScannerOptions, SecurityScannerOrchestrator, SessionWriterView, type SeverityLevel, type ShellHookSpec, type SkillGenerationContext, SkillGenerator, type SkillGeneratorOptions, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, SystemPromptContributor, TaskGraph, TaskNode, TaskPriority, TaskStore, TaskType, type TechStack, type TechStackConsumerOptions, TechStackDetector, type TechStackInfo, TextBlock, TokenSavingTier, Tool, ToolCallPipelinePayload, ToolRegistry, ToolRegistryView, Tracer, WorktreeManager, WstackPaths, assessCommitSafety, attachMailboxChecker, bootConfig, buildBtwBlock, buildLosslessDigest, buildMailboxBlock, buildQueuedMessagesBlock, buildSmartDigest, collabInjectMiddleware, collabPauseMiddleware, compactLog, consumeBtwNotes, consumeQueuedMessagesUpdate, createAutoPhaseFromTaskGraph, createChimeraPlugin, createGitPlugin, createMailboxChecker, createMcpUseTool, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSkillsPlugin, createSyncPlugin, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, definePlugin, eliseOldToolResults, estimateMessageTokens, estimateMessages, extractText, findPreserveStart, flagsToConfigPatch, getFileHistory, getFilesByAgent, getFullLog, getLastAuthor, hasTextContent, hashRequest, injectPendingMailboxMessages, isValidMatrixKey, loadPlugins, makeContinueToNextIterationTool, matrixKeyKind, parseContinueDirective, peekQueuedMessages, pendingBtwCount, phaseForRole, recordFileAction, resolveChimeraConfig, resolveModelMatrix, runProviderWithRetry, runShellHook, scoreMessage, securitySlashCommand, setBtwNote, setQueuedMessagesSnapshot, stableStringify, startTechStackConsumer, unloadPlugins };
|