@wrongstack/core 0.309.1 → 0.310.1

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.
Files changed (120) hide show
  1. package/dist/chronicle/index.js +113 -41
  2. package/dist/chronicle/metrics-ingest.d.ts +7 -0
  3. package/dist/chronicle/metrics-schema.d.ts +4 -1
  4. package/dist/chronicle/project-server.js +94 -38
  5. package/dist/chronicle/query.d.ts +1 -0
  6. package/dist/chronicle/sqlite-journal-schema.d.ts +2 -1
  7. package/dist/chronicle/types.d.ts +2 -0
  8. package/dist/{agent-status-helpers.d.ts → coordination/agent-status-helpers.d.ts} +1 -1
  9. package/dist/{agent-status-tracker.d.ts → coordination/agent-status-tracker.d.ts} +2 -2
  10. package/dist/{middleware → coordination}/collab-pause.d.ts +1 -1
  11. package/dist/coordination/director-kanban-queue-helpers.d.ts +1 -1
  12. package/dist/coordination/fleet-status-tool.d.ts +1 -1
  13. package/dist/coordination/index.d.ts +5 -1
  14. package/dist/coordination/index.js +2061 -346
  15. package/dist/coordination/kanban-dispatch-port.d.ts +30 -0
  16. package/dist/coordination/kanban-ops-port.d.ts +21 -0
  17. package/dist/coordination/mailbox-hooks.d.ts +1 -1
  18. package/dist/coordination/mailbox-project-server.js +14 -9
  19. package/dist/core/context.d.ts +35 -44
  20. package/dist/core/conversation-state.d.ts +16 -52
  21. package/dist/core/index.js +53 -16
  22. package/dist/core/provider-runner.d.ts +2 -2
  23. package/dist/core/run-env.d.ts +7 -28
  24. package/dist/core/streaming-response-builder.d.ts +2 -2
  25. package/dist/execution/index.js +111 -153
  26. package/dist/goal/index.js +100 -22
  27. package/dist/hq/auth-store.d.ts +9 -0
  28. package/dist/hq/cost-bridge.d.ts +1 -1
  29. package/dist/hq/index.js +24 -2
  30. package/dist/index.d.ts +12 -5
  31. package/dist/index.js +27808 -33937
  32. package/dist/infrastructure/index.js +210 -132
  33. package/dist/infrastructure/provider-cache-ledger.d.ts +1 -1
  34. package/dist/infrastructure/token-counter.d.ts +5 -1
  35. package/dist/kernel/events/file-events.d.ts +6 -0
  36. package/dist/kernel/events/provider-events.d.ts +10 -7
  37. package/dist/kernel/events/session-events.d.ts +4 -4
  38. package/dist/kernel/events/tool-events.d.ts +12 -2
  39. package/dist/plugin/index.js +105 -35
  40. package/dist/security/index.d.ts +1 -0
  41. package/dist/security/index.js +47 -18
  42. package/dist/security/kanban-boundary.d.ts +1 -1
  43. package/dist/security/kanban-governance-port.d.ts +28 -0
  44. package/dist/session-catalog/index.js +2 -3
  45. package/dist/session-catalog/project-server.js +2 -3
  46. package/dist/session-catalog/protocol.d.ts +1 -1
  47. package/dist/session-catalog/registry.d.ts +1 -1
  48. package/dist/session-catalog/store-schema.d.ts +1 -1
  49. package/dist/session-catalog/store.d.ts +1 -1
  50. package/dist/storage/annotations-store.d.ts +1 -1
  51. package/dist/storage/board-store-port.d.ts +45 -0
  52. package/dist/storage/completed-work-checkpoint.d.ts +1 -1
  53. package/dist/storage/config-loader/types.d.ts +1 -1
  54. package/dist/storage/event-bus-port.d.ts +27 -0
  55. package/dist/storage/file-session-writer.d.ts +47 -5
  56. package/dist/storage/goal-coordination.d.ts +1 -1
  57. package/dist/storage/goal-store.d.ts +1 -1
  58. package/dist/storage/index.d.ts +3 -4
  59. package/dist/storage/index.js +1063 -1459
  60. package/dist/storage/plan-store.d.ts +1 -1
  61. package/dist/storage/queue-store.d.ts +1 -1
  62. package/dist/storage/replay-log-store.d.ts +1 -1
  63. package/dist/storage/session-recovery.d.ts +10 -0
  64. package/dist/storage/session-resume-validation.d.ts +13 -1
  65. package/dist/storage/session-store/events.d.ts +1 -1
  66. package/dist/storage/session-store/load-session-data.d.ts +1 -1
  67. package/dist/storage/session-store/rename-session.d.ts +1 -1
  68. package/dist/storage/session-store/resume-session.d.ts +3 -1
  69. package/dist/storage/session-store/session-store-index.d.ts +2 -1
  70. package/dist/storage/session-store/types.d.ts +1 -1
  71. package/dist/storage/session-store.d.ts +70 -0
  72. package/dist/storage/session-summary-tracker.d.ts +8 -0
  73. package/dist/storage/session-write-buffer.d.ts +31 -2
  74. package/dist/storage/task-store.d.ts +1 -1
  75. package/dist/storage/todos-checkpoint.d.ts +1 -1
  76. package/dist/storage/tool-audit-log.d.ts +1 -1
  77. package/dist/tasking/index.js +100 -22
  78. package/dist/tasking/task-tracker.d.ts +24 -1
  79. package/dist/types/compactor.d.ts +2 -2
  80. package/dist/types/config/runtime.d.ts +7 -0
  81. package/dist/types/config/tools.d.ts +30 -0
  82. package/dist/types/context.d.ts +212 -0
  83. package/dist/types/conversation-state.d.ts +109 -0
  84. package/dist/types/error-handler.d.ts +2 -2
  85. package/dist/types/file-event-record.d.ts +6 -0
  86. package/dist/types/index.d.ts +4 -4
  87. package/dist/types/index.js +19 -1
  88. package/dist/types/permission.d.ts +3 -3
  89. package/dist/types/plugin.d.ts +3 -3
  90. package/dist/types/provider-runner.d.ts +2 -2
  91. package/dist/types/provider.d.ts +10 -0
  92. package/dist/types/run-env.d.ts +32 -0
  93. package/dist/types/session.d.ts +3 -0
  94. package/dist/types/slash-command.d.ts +2 -2
  95. package/dist/types/token-counter.d.ts +30 -1
  96. package/dist/types/tool-executor.d.ts +2 -2
  97. package/dist/types/tool.d.ts +5 -5
  98. package/dist/utils/context-breakdown.d.ts +2 -2
  99. package/dist/utils/context-evidence.d.ts +12 -12
  100. package/dist/utils/crash-shield.d.ts +9 -0
  101. package/dist/utils/heap-watchdog.js +11 -3
  102. package/dist/utils/index.d.ts +1 -1
  103. package/dist/utils/index.js +72 -156
  104. package/dist/utils/regex-guard.d.ts +7 -30
  105. package/dist/utils/todos-format.d.ts +1 -1
  106. package/dist/utils/tree-kill.d.ts +2 -0
  107. package/dist/utils/tree-kill.js +1 -0
  108. package/dist/wiring/proxy-rewrite.d.ts +76 -0
  109. package/dist/wiring/proxy-rewrite.js +70 -0
  110. package/instructions/coordination/subagent-baseline.md +10 -0
  111. package/instructions/system-lite.md +2 -0
  112. package/instructions/system-pro.md +40 -0
  113. package/instructions/system.md +15 -0
  114. package/package.json +10 -9
  115. package/dist/defaults/index.d.ts +0 -69
  116. package/dist/defaults/index.js +0 -38133
  117. /package/dist/{fleet-notifier.d.ts → coordination/fleet-notifier.d.ts} +0 -0
  118. /package/dist/{session-registry-atomic-file.d.ts → session-catalog/session-registry-atomic-file.d.ts} +0 -0
  119. /package/dist/{session-registry-types.d.ts → session-catalog/session-registry-types.d.ts} +0 -0
  120. /package/dist/{session-registry.d.ts → session-catalog/session-registry.d.ts} +0 -0
@@ -0,0 +1,70 @@
1
+ // src/wiring/proxy-rewrite.ts
2
+ var PROXY_PATH_PREFIX = "/proxy/";
3
+ var PROXY_EXCLUDED_PROVIDERS = /* @__PURE__ */ new Set(["openai-codex"]);
4
+ function isProxyEligible(providerId) {
5
+ if (!providerId) return false;
6
+ if (PROXY_EXCLUDED_PROVIDERS.has(providerId)) return false;
7
+ return true;
8
+ }
9
+ function rewriteBaseUrl(originalBaseUrl, proxyUrl) {
10
+ if (!originalBaseUrl) return void 0;
11
+ if (!proxyUrl) return originalBaseUrl;
12
+ if (!isProxyEligibleForRewrite(originalBaseUrl, proxyUrl)) return originalBaseUrl;
13
+ return composeRewrittenUrl(originalBaseUrl, proxyUrl);
14
+ }
15
+ function isProxyEligibleForRewrite(originalBaseUrl, proxyUrl) {
16
+ if (!originalBaseUrl.includes("://")) return false;
17
+ if (!proxyUrl.includes("://")) return false;
18
+ const normalizedProxy = proxyUrl.replace(/\/+$/, "");
19
+ if (originalBaseUrl.startsWith(`${normalizedProxy}${PROXY_PATH_PREFIX}`)) {
20
+ return false;
21
+ }
22
+ try {
23
+ const parsed = new URL(originalBaseUrl);
24
+ const isLoopback = parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || // WHATWG URL serializes IPv6 hosts with brackets — `[::1]`, not `::1`.
25
+ parsed.hostname === "[::1]";
26
+ if (isLoopback && parsed.port !== "") return false;
27
+ } catch {
28
+ }
29
+ return true;
30
+ }
31
+ function composeRewrittenUrl(originalBaseUrl, proxyUrl) {
32
+ const parsedOriginal = new URL(originalBaseUrl);
33
+ const hostAndPath = `${parsedOriginal.host}${parsedOriginal.pathname}`;
34
+ const trailingQuery = parsedOriginal.search || "";
35
+ const trailingHash = parsedOriginal.hash || "";
36
+ const proxyRoot = proxyUrl.replace(/\/+$/, "");
37
+ return `${proxyRoot}${PROXY_PATH_PREFIX}${hostAndPath}${trailingQuery}${trailingHash}`;
38
+ }
39
+ var DEFAULT_PROXY_CONFIG = { enabled: false, url: "", active: false };
40
+ var currentConfig = { ...DEFAULT_PROXY_CONFIG };
41
+ function getProxyConfig() {
42
+ return currentConfig;
43
+ }
44
+ function applyProxyConfig(next) {
45
+ const previous = currentConfig;
46
+ currentConfig = {
47
+ enabled: next.enabled ?? previous.enabled,
48
+ url: next.url ?? previous.url,
49
+ active: next.active ?? previous.active
50
+ };
51
+ return previous;
52
+ }
53
+ function shouldRewriteFor(providerId) {
54
+ const cfg = currentConfig;
55
+ if (!cfg.enabled || !cfg.active || !cfg.url) return false;
56
+ return isProxyEligible(providerId);
57
+ }
58
+ function __resetProxyConfigForTests() {
59
+ currentConfig = { ...DEFAULT_PROXY_CONFIG };
60
+ }
61
+ export {
62
+ PROXY_EXCLUDED_PROVIDERS,
63
+ __resetProxyConfigForTests,
64
+ applyProxyConfig,
65
+ getProxyConfig,
66
+ isProxyEligible,
67
+ rewriteBaseUrl,
68
+ shouldRewriteFor
69
+ };
70
+ //# sourceMappingURL=proxy-rewrite.js.map
@@ -20,6 +20,16 @@ self-contained handoff; do not take over fleet orchestration.
20
20
  provides, and write it yourself only when none of them fit — then write the
21
21
  smallest version. A new dependency needs an explicit grant. The ladder trims
22
22
  code you invented; it never shrinks the assigned deliverable.
23
+ - Shape new code by architectural discipline, applied on trigger rather than as
24
+ ceremony: domain logic stays free of framework/SDK/I/O imports (external
25
+ services behind adapters at the edge, dependencies pointing inward); program
26
+ to interfaces when a behavior has or will have multiple implementations;
27
+ factories create multi-provider/dynamic services (payments, AI models,
28
+ storage); singletons only for expensive shared resources (pools, loggers,
29
+ cache); strategies replace `if`/`switch` over more than two interchangeable
30
+ behaviors; typed events decouple side-effects (audit, email, cache
31
+ invalidation). Watch SRP past ~200 lines. Name the pattern applied in one
32
+ line when scaffolding.
23
33
  <!--ws:if tool=codebase-search-->
24
34
  Confirm the repo does not already do it with `codebase-search` before writing
25
35
  a new helper.
@@ -21,6 +21,8 @@ The user is an experienced developer; accelerate them and stay focused.
21
21
  12. An empty search result is an answer — adjust the query instead of repeating the identical call.
22
22
  13. Keep responses concise and scannable.
23
23
  14. Match the user's language.
24
+ 15. Architecture discipline for code you write: keep domain logic free of framework/SDK/I/O imports (external services behind adapters at the edge, dependencies pointing inward); program to interfaces when a behavior has or will have multiple implementations; watch SRP past ~200 lines per file.
25
+ 16. Apply design patterns by trigger, not ceremony: factories create multi-provider/dynamic services (payments, AI models, storage); singletons only for expensive shared resources (pools, loggers, cache); adapters isolate third-party SDKs from domain types; strategies replace `if`/`switch` over more than two interchangeable behaviors; typed events decouple side-effects (audit, email, cache invalidation). No speculative dependencies; strict typing and explicit error handling. When scaffolding, name the pattern applied in one line.
24
26
 
25
27
  ## Working loop
26
28
 
@@ -138,6 +138,46 @@ The five questions above decide *whether the change is right*. This ladder decid
138
138
 
139
139
  **Guardrails.** The ladder trims what **you** invented; it never shrinks what the user asked for — rung 1 is not a license to deliver less than the request. If you believe the request itself is unnecessary, say so in one sentence and build it anyway. Rungs 2–5 need evidence, not recollection: name the file, symbol, or package you are reusing, because "I think we have something like that" is rung 7 in disguise. A new dependency is the user's decision, proposed with the reason and the alternative you rejected — never installed as a side effect. Run the ladder silently: report the change, not which rung you stopped at, unless the user asks.
140
140
 
141
+ ## Architecture discipline
142
+
143
+ The reasoning protocol decides *whether* the change is right; the cost ladder decides *how much* it costs; this section decides *what shape* the code takes. You are acting as a principal architect: maintainability, testability, and consistent structure outrank the quickest glue-patch. These rules govern only the code you write or touch — they are never a license to refactor working neighbors; note violations in your summary instead.
144
+
145
+ ### Layering (Clean/Hexagonal boundaries)
146
+
147
+ - **Domain/Core:** pure business logic — zero framework, SDK, or I/O imports. It does not know a database or a vendor exists.
148
+ - **Application/Use-cases:** orchestration. Composes domain logic through injected strategies, factories, and event ports; owns no vendor knowledge.
149
+ - **Infrastructure/Adapters:** DB drivers, third-party APIs, HTTP/RPC servers, queues — everything at the edge, wrapped behind domain-owned interfaces.
150
+ - Dependencies always point inward. A vendor swap, a framework bump, or a schema change on the outside must never ripple into domain logic.
151
+
152
+ ### Structural rules
153
+
154
+ - **Program to interfaces, not implementations.** Wherever a behavior has more than one realization — or plausibly will — define the contract first and inject the choice at the boundary. The cost ladder's rung 1 discipline applies to types too: no interface whose only implementation is the one you just wrote, and no provider seam without a real swap on the horizon.
155
+ - **Prefer composition over inheritance.** Build behavior from injected parts rather than class hierarchies.
156
+ - **Single responsibility per file.** Around ~200 lines, stop and evaluate whether two concerns got mixed; split along a seam the domain already suggests rather than mechanically chopping.
157
+ - **Zero speculative dependencies or framework sprawl.** Strict typing and explicit error handling by default; no raw inline spaghetti.
158
+
159
+ ### The five constitutional patterns
160
+
161
+ Apply when the trigger is present; skip the ceremony when it is not. Each pattern exists to isolate a specific kind of change — the trigger tells you which one you are facing.
162
+
163
+ 1. **Factory (creational).** Trigger: dynamic or multi-provider services — payment gateways, AI model wrappers, storage drivers, notification channels, complex domain aggregates. Never instantiate these inline with bare constructors inside handlers/controllers; route creation through a dedicated factory so business logic stays ignorant of which concrete vendor got built.
164
+ 2. **Singleton (creational).** Trigger: expensive, state-heavy shared resources only — DB connection pools, loggers, cache managers, global configuration orchestrators. Everything else gets a normal injected lifetime. Ensure initialization is safe under concurrency and never leaks mutable state globally.
165
+ 3. **Adapter (structural).** Trigger: any third-party SDK, legacy system, or external API schema. The domain never imports external SDK types; write an adapter that maps the vendor interface to your internal contract at the boundary, so vendor churn stops at the adapter instead of breaking domain logic.
166
+ 4. **Strategy (behavioral).** Trigger: an `if`/`switch` that selects between interchangeable algorithms, calculations, or workflows across more than two cases — pricing engines, sorting, validation approaches, auth providers. Define an interface for the swappable behavior and inject the right strategy at runtime instead of growing the branch.
167
+ 5. **Observer / typed events (behavioral).** Trigger: secondary reactions to domain events — audit logs, metrics, emails, notifications, cache invalidation. Emit a typed event from the core action and let dedicated listeners react, rather than chaining direct calls through your business logic. Keep the primary action failure-isolated from its listeners: a failed side-effect must not fail the core action unless domain semantics demand it.
168
+
169
+ ### Self-correction pass
170
+
171
+ Before presenting non-trivial code, ask once:
172
+ - *"Did I hardcode an external dependency?"* → wrap it in an adapter behind a domain-owned interface.
173
+ - *"Am I branching across more than two cases of interchangeable behavior?"* → refactor into an injected strategy.
174
+ - *"Am I constructing complex/vendored objects inside a handler?"* → delegate to a factory.
175
+ - *"Is a side-effect (audit, email, cache invalidation) wired directly into business logic?"* → decouple through a typed event.
176
+
177
+ ### Output discipline
178
+
179
+ When scaffolding a feature or adding a component, state briefly which patterns you applied and why — one line per pattern, not a lecture. Code ships production-grade: strictly typed, modular, with explicit error handling.
180
+
141
181
  <!--ws:if tool=todo-->
142
182
  ## Todo status lifecycle
143
183
 
@@ -76,6 +76,21 @@ Before you write any new code — a function, a wrapper, a flag, a fallback path
76
76
 
77
77
  The ladder trims what **you** invented; it never shrinks what the user asked for. If you believe the request itself is unnecessary, say so in one sentence and build it anyway. Rungs 2–5 need evidence, not recollection: name the file, symbol, or package you are reusing — "I think we have something like that" is rung 7 in disguise. A new dependency is the user's decision, never a side effect. Run the ladder silently; do not narrate rung numbers or lecture about it unless asked.
78
78
 
79
+ ## Architecture discipline
80
+
81
+ The five questions decide *whether* the change is right; the cost ladder decides *how much* it costs; this section decides *what shape* it takes. Maintainability, testability, and consistent structure outrank the fastest possible patch. These rules govern only the code you write or touch — they are never a license to refactor working neighbors; note violations in your summary instead.
82
+
83
+ - **Boundaries (clean/hexagonal):** domain logic stays pure (no framework, SDK, or I/O imports); orchestration sits above it; DB drivers, external APIs, and third-party SDKs live behind adapters at the edge. Dependencies point inward.
84
+ - **Program to interfaces** wherever a behavior has, or will plausibly have, more than one implementation; inject the concrete choice. Prefer composition over inheritance.
85
+ - **Single responsibility:** past ~200 lines, evaluate whether two concerns got mixed; split along a seam rather than appending.
86
+ - **Factory:** creation of dynamic or multi-provider services (payment gateways, AI models, storage drivers, notification channels) routes through a dedicated factory — never a bare constructor inside a handler.
87
+ - **Singleton:** only for expensive shared resources (connection pools, loggers, cache managers); no global mutable-state leakage.
88
+ - **Adapter:** third-party SDKs and external schemas never touch domain types. Map vendor shapes at the boundary so vendor churn stops there.
89
+ - **Strategy:** when an `if`/`switch` selects between interchangeable algorithms or behaviors across more than two cases, extract an injected strategy instead of growing the branch.
90
+ - **Observer/typed events:** decouple side-effects (audit logs, metrics, emails, notifications, cache invalidation) from the action that caused them.
91
+ - Zero speculative dependencies or framework sprawl; strict typing and explicit error handling by default.
92
+ - When scaffolding or adding a feature, state briefly which pattern you applied and why — one line each, not a lecture.
93
+
79
94
  <!--ws:if tool=todo-->
80
95
  ## Todo status lifecycle
81
96
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@wrongstack/core",
3
- "version": "0.309.1",
3
+ "version": "0.310.1",
4
4
  "license": "MIT",
5
- "description": "WrongStack core: kernel, types, defaults, and shared utilities for the WrongStack CLI agent.",
5
+ "description": "WrongStack core: kernel, types, and shared utilities for the WrongStack CLI agent.",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/WrongStack/WrongStack.git",
@@ -44,10 +44,6 @@
44
44
  "types": "./dist/core/model-ref.d.ts",
45
45
  "import": "./dist/core/model-ref.js"
46
46
  },
47
- "./defaults": {
48
- "types": "./dist/defaults/index.d.ts",
49
- "import": "./dist/defaults/index.js"
50
- },
51
47
  "./utils": {
52
48
  "types": "./dist/utils/index.d.ts",
53
49
  "import": "./dist/utils/index.js"
@@ -169,6 +165,10 @@
169
165
  "./replay": {
170
166
  "types": "./dist/replay/index.d.ts",
171
167
  "import": "./dist/replay/index.js"
168
+ },
169
+ "./wiring/proxy-rewrite": {
170
+ "types": "./dist/wiring/proxy-rewrite.d.ts",
171
+ "import": "./dist/wiring/proxy-rewrite.js"
172
172
  }
173
173
  },
174
174
  "files": [
@@ -182,11 +182,12 @@
182
182
  "wrongstackApiVersion": "0.1.10",
183
183
  "dependencies": {
184
184
  "zod": "4.4.3",
185
- "@wrongstack/kanban": "0.309.1",
186
- "@wrongstack/persistence": "0.309.1"
185
+ "@wrongstack/primitives": "0.310.1",
186
+ "@wrongstack/kanban": "0.310.1",
187
+ "@wrongstack/persistence": "0.310.1"
187
188
  },
188
189
  "devDependencies": {
189
- "@types/node": "^26.2.0",
190
+ "@types/node": "^22.19.0",
190
191
  "typescript": "^7.0.2"
191
192
  },
192
193
  "publishConfig": {
@@ -1,69 +0,0 @@
1
- export { createMessage, InMemoryAgentBridge, InMemoryBridgeTransport, } from '../coordination/agent-bridge.js';
2
- export { type AgentFactory, type AgentFactoryResult, type AgentRunnerOptions, makeAgentSubagentRunner, } from '../coordination/agent-subagent-runner.js';
3
- export { AGENT_CATALOG, AGENTS_BY_PHASE, type AgentBudgetTier, type AgentCapability, type AgentDefinition, type AgentPhase, ALL_AGENT_DEFINITIONS, getAgentDefinition, } from '../coordination/agents/index.js';
4
- export { type AutoExtendCeiling, type AutoExtendPolicy, attachAutoExtend, } from '../coordination/auto-extend.js';
5
- export { type CreateDelegateToolOptions, createDelegateTool, type DelegateHost, } from '../coordination/delegate-tool.js';
6
- export { Director, FleetSpawnBudgetError, } from '../coordination/director.js';
7
- export { composeDirectorPrompt, composeSubagentPrompt, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_SUBAGENT_BASELINE, type DirectorPromptParts, rosterSummaryFromConfigs, type SubagentPromptParts, } from '../coordination/director-prompts.js';
8
- export { type DirectorSessionFactory, type DirectorSessionFactoryOptions, makeDirectorSessionFactory, } from '../coordination/director-session.js';
9
- export { makeAskTool, makeAssignTool, makeAwaitTasksTool, makeCollabDebugTool, makeFleetEmitTool, makeFleetTool, makeRollUpTool, makeSpawnTool, makeTerminateTool, } from '../coordination/director-tools.js';
10
- export { DEFAULT_DISPATCH_ROLE, type DispatchCandidate, type DispatchClassifier, type DispatchMethod, type DispatchOptions, type DispatchResult, dispatchAgent, makeLLMClassifier, scoreAgents, } from '../coordination/dispatcher.js';
11
- export { ALL_FLEET_AGENTS, AUDIT_LOG_AGENT, applyRosterBudget, BUG_HUNTER_AGENT, FLEET_ROSTER, FLEET_ROSTER_BUDGETS, type FleetRosterBudget, REFACTOR_PLANNER_AGENT, SECURITY_SCANNER_AGENT, } from '../coordination/fleet.js';
12
- export { FleetBus, type FleetEvent, type FleetHandler, type FleetUsage, FleetUsageAggregator, type SubagentUsageSnapshot, } from '../coordination/fleet-bus.js';
13
- export type { ICoordinator } from '../coordination/icoordinator.js';
14
- export type { IFleetManager } from '../coordination/ifleet-manager.js';
15
- export { DefaultMultiAgentCoordinator, type MultiAgentCoordinatorOptions, } from '../coordination/multi-agent-coordinator.js';
16
- export { NULL_FLEET_BUS } from '../coordination/null-fleet-bus.js';
17
- export { BudgetExceededError, type BudgetKind, type BudgetLimits, type BudgetUsage, SubagentBudget, } from '../coordination/subagent-budget.js';
18
- export { AutoCompactionMiddleware } from '../execution/auto-compaction-middleware.js';
19
- export { installSubagentAutoCompaction } from '../execution/subagent-compaction.js';
20
- export { AutonomousRunner, type AutonomousRunnerOptions, type DoneCheckResult, DoneConditionChecker, } from '../execution/autonomous-runner.js';
21
- export { type AutonomyPromptContributorOptions, makeAutonomyPromptContributor, } from '../execution/autonomy-prompt-contributor.js';
22
- export { type CompactorOptions, DEFAULT_AUTONOMY_CONFIG, DEFAULT_CONTEXT_CONFIG, DEFAULT_TOOLS_CONFIG, HybridCompactor, } from '../execution/compactor.js';
23
- export { activateDesign, clearActiveKit, detectFrontendFile, detectFrontendIntent, getDesignState, installDesignStudioMiddleware, makeDesignDetectToolCallMiddleware, makeDesignDetectUserInputMiddleware, makeDesignStudioRequestMiddleware, makeDesignVerifyToolCallMiddleware, setActiveKit, setDesignOverrides, } from '../execution/design-detect.js';
24
- export { _resetDesignKitLoaderMemo, DefaultDesignKitLoader, type DesignKitLoaderOptions, getDesignKitLoader, resolveBundledDesignKitsDir, } from '../execution/design-kit-loader.js';
25
- export { classifyTokenValue, colorToHex, isColorToken, oklchToHex, parseOklch, } from '../execution/design-color.js';
26
- export { type MaterializeResult, materializeTokens, } from '../execution/design-materialize.js';
27
- export { type DesignAxis, type DesignVerifyReport, type DesignViolation, runDesignVerify, verifyFiles, } from '../execution/design-verify.js';
28
- export { resolveSemanticTune, SEMANTIC_TUNE_KNOBS, type SemanticTune, } from '../execution/design-tune.js';
29
- export { _resetDesignRulesCache, applyTokenOverrides, clearPersistedActiveKit, designProjectDir, type DesignOverrides, loadActiveKit, loadProjectDesignRules, type PersistedActiveKit, recordKitChoice, recordOverrides, } from '../execution/design-project-store.js';
30
- export { DefaultErrorHandler } from '../execution/error-handler.js';
31
- export { EternalAutonomyEngine, type EternalAutonomyOptions, type EternalEngineState, type IterationStage, } from '../execution/eternal-autonomy.js';
32
- export { buildGoalPreamble } from '../execution/goal-preamble.js';
33
- export { IntelligentCompactor, type IntelligentCompactorOptions, } from '../execution/intelligent-compactor.js';
34
- export { type ParallelEngineState, ParallelEternalEngine, type ParallelEternalOptions, type ParallelIterationStage, } from '../execution/parallel-eternal-engine.js';
35
- export { DefaultProviderRunner } from '../execution/provider-runner-impl.js';
36
- export { DefaultRetryPolicy } from '../execution/retry-policy.js';
37
- export { SelectiveCompactor, type SelectiveCompactorOptions, } from '../execution/selective-compactor.js';
38
- export { DefaultSkillLoader, type SkillLoaderOptions } from '../execution/skill-loader.js';
39
- export { DefaultPromptLoader, type PromptLoaderOptions, renderPrompt, } from '../execution/prompt-loader.js';
40
- export { type CompactorStrategy, createStrategyCompactor, type StrategyCompactorOptions, } from '../execution/strategy-compactor.js';
41
- export { ToolExecutor } from '../execution/tool-executor.js';
42
- export { type ContextManagerAction, type ContextManagerInput, type ContextManagerResult, type ContextManagerToolOptions, contextManagerTool, createContextManagerTool, } from '../infrastructure/context-manager.js';
43
- export { DefaultLogger, type DefaultLoggerOptions, type LogFormat, } from '../infrastructure/logger.js';
44
- export { allServers, awsServer, blockServer, braveSearchServer, context7Server, everArtServer, filesystemServer, githubServer, googleMapsServer, miniMaxVisionServer, playwrightServer, sentinelServer, slackServer, sshManagerServer, zaiVisionServer, } from '../infrastructure/mcp-servers.js';
45
- export { CODEX_MODELS, type CodexModelMeta, codexModelMeta } from '../models/codex-catalog.js';
46
- export { LLMSelector, type LLMSelectorOptions } from '../models/llm-selector.js';
47
- export { DefaultModeStore, loadProjectModes, loadUserModes, type ModeLoaderOptions, } from '../models/mode-store.js';
48
- export { classifyFamily, DefaultModelsRegistry, type DefaultModelsRegistryOptions, } from '../models/models-registry.js';
49
- export { describeCatalogModel, type ProviderModelDescriptor, resolveProviderModelList, } from '../models/provider-model-resolve.js';
50
- export { buildOtlpMetricsRequest, buildOtlpTracesRequest, DefaultHealthRegistry, InMemoryMetricsSink, type MetricsServerHandle, type MetricsServerOptions, NoopMetricsSink, NoopTracer, OTelTracer, type OtlpMetricsExporterHandle, type OtlpMetricsExporterOptions, type OtlpTraceExporterHandle, type OtlpTraceExporterOptions, PROMETHEUS_CONTENT_TYPE, renderPrometheus, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, wireMetricsToEvents, } from '../observability/index.js';
51
- export { AutoApprovePermissionPolicy, DefaultPermissionPolicy, type PermissionPolicyOptions, } from '../security/permission-policy.js';
52
- export { DefaultSecretScrubber } from '../security/secret-scrubber.js';
53
- export { DefaultSecretVault, migratePlaintextSecrets, rewriteConfigEncrypted, type SecretVaultOptions, } from '../security/secret-vault.js';
54
- export { decryptConfigSecrets, encryptConfigSecrets } from '../security/config-secrets.js';
55
- export { type AttachmentStoreOptions, DefaultAttachmentStore, } from '../storage/attachment-store.js';
56
- export { type ConfigLoaderOptions, type ConfigSource, DefaultConfigLoader, } from '../storage/config-loader.js';
57
- export { type ConfigMigration, ConfigMigrationError, DEFAULT_CONFIG_MIGRATIONS, type MigrationContext, type MigrationResult, runConfigMigrations, } from '../storage/config-migration.js';
58
- export { DefaultConfigStore } from '../storage/config-store.js';
59
- export { DirectorStateCheckpoint, type DirectorStateSnapshot, type DirectorSubagentState, type DirectorTaskState, loadDirectorState, } from '../storage/director-state.js';
60
- export { addPlanItem, attachPlanCheckpoint, clearPlan, deriveTodosFromPlanItem, emptyPlan, formatPlan, loadPlan, type PlanFile, type PlanItem, removePlanItem, savePlan, setPlanItemStatus, } from '../storage/plan-store.js';
61
- export { formatPlanTemplates, getPlanTemplate, listPlanTemplates, type PlanTemplate, } from '../storage/plan-templates.js';
62
- export { type PersistedQueueItem, QueueStore, } from '../storage/queue-store.js';
63
- export { type AbandonedSession, RecoveryLock, type RecoveryLockOptions, } from '../storage/recovery-lock.js';
64
- export { SessionAnalyzer } from '../storage/session-analyzer.js';
65
- export { type AuditLevel, createSessionEventBridge, resolveAuditLevel, resolveSessionLoggingConfig, type SessionEventBridge, type SessionEventBridgeOptions, type SessionSamplingOptions, type ToolProgressSamplingOptions, } from '../storage/session-event-bridge.js';
66
- export { DefaultSessionReader } from '../storage/session-reader.js';
67
- export { DefaultSessionStore, type SessionStoreOptions, } from '../storage/session-store.js';
68
- export { attachTodosCheckpoint, loadTodosCheckpoint, saveTodosCheckpoint, type TodosCheckpointFile, } from '../storage/todos-checkpoint.js';
69
- //# sourceMappingURL=index.d.ts.map