@wrongstack/core 0.155.0 → 0.250.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.
Files changed (81) hide show
  1. package/dist/{agent-bridge-BbZU5TPN.d.ts → agent-bridge-4gc0vfW2.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-Bsueu0J2.d.ts → agent-subagent-runner-Dz-9kiE6.d.ts} +9 -8
  3. package/dist/{brain-CS_B0vIE.d.ts → brain-sCZ3lCjq.d.ts} +26 -2
  4. package/dist/{compactor-BueGt7LG.d.ts → compactor-BRfg3QPd.d.ts} +1 -1
  5. package/dist/{config-BaVThgnT.d.ts → config-eSsrto5d.d.ts} +8 -2
  6. package/dist/{context-C7G_MtLV.d.ts → context-CLz3z_E8.d.ts} +126 -2
  7. package/dist/coordination/index.d.ts +70 -13
  8. package/dist/coordination/index.js +1986 -146
  9. package/dist/coordination/index.js.map +1 -1
  10. package/dist/defaults/index.d.ts +26 -26
  11. package/dist/defaults/index.js +1110 -296
  12. package/dist/defaults/index.js.map +1 -1
  13. package/dist/execution/index.d.ts +45 -16
  14. package/dist/execution/index.js +229 -56
  15. package/dist/execution/index.js.map +1 -1
  16. package/dist/execution/prompt-enhancer.d.ts +86 -0
  17. package/dist/execution/prompt-enhancer.js +125 -0
  18. package/dist/execution/prompt-enhancer.js.map +1 -0
  19. package/dist/extension/index.d.ts +6 -6
  20. package/dist/extension/index.js +3 -1
  21. package/dist/extension/index.js.map +1 -1
  22. package/dist/{goal-preamble-CbV8pXLD.d.ts → goal-preamble-BjJpnLW4.d.ts} +19 -10
  23. package/dist/{index-CI1hRfPt.d.ts → index-Dy8OwfBD.d.ts} +8 -8
  24. package/dist/{index-B5wz-GXm.d.ts → index-IehiNryU.d.ts} +7 -5
  25. package/dist/index.d.ts +438 -128
  26. package/dist/index.js +4989 -849
  27. package/dist/index.js.map +1 -1
  28. package/dist/infrastructure/index.d.ts +7 -7
  29. package/dist/infrastructure/index.js +61 -13
  30. package/dist/infrastructure/index.js.map +1 -1
  31. package/dist/kernel/index.d.ts +9 -9
  32. package/dist/kernel/index.js +7 -1
  33. package/dist/kernel/index.js.map +1 -1
  34. package/dist/{llm-selector-CP72f1lC.d.ts → llm-selector-D22R4AFz.d.ts} +2 -2
  35. package/dist/logger-DmmQhf4P.d.ts +65 -0
  36. package/dist/{mcp-servers-CPERR2De.d.ts → mcp-servers-DfXxCASH.d.ts} +3 -3
  37. package/dist/models/index.d.ts +5 -5
  38. package/dist/models/index.js +89 -9
  39. package/dist/models/index.js.map +1 -1
  40. package/dist/{models-registry-D90K9UnM.d.ts → models-registry-DpanBg8D.d.ts} +1 -1
  41. package/dist/{multi-agent-coordinator-BSKSFNhv.d.ts → multi-agent-coordinator-CnbEqpv0.d.ts} +8 -8
  42. package/dist/{null-fleet-bus-CGOez8Le.d.ts → null-fleet-bus-Do1OLYpj.d.ts} +7 -7
  43. package/dist/observability/index.d.ts +2 -2
  44. package/dist/package-outdated-watcher-CA5GGB4C.d.ts +560 -0
  45. package/dist/{parallel-eternal-engine-CYoTKjsz.d.ts → parallel-eternal-engine-UZg1xOzE.d.ts} +13 -9
  46. package/dist/{path-resolver-DuhlmPil.d.ts → path-resolver-BaP06Owy.d.ts} +3 -3
  47. package/dist/{permission-B7nKnEvQ.d.ts → permission-DbWPbuoA.d.ts} +1 -1
  48. package/dist/{permission-policy-8-6zBmfA.d.ts → permission-policy-AOk0LVsV.d.ts} +2 -2
  49. package/dist/pipeline-D1n-gQI-.d.ts +493 -0
  50. package/dist/{plan-templates-DbH7lg-t.d.ts → plan-templates-BUVRY0pU.d.ts} +18 -7
  51. package/dist/{provider-runner-Cocq0O9E.d.ts → provider-runner-D0HgUqwV.d.ts} +3 -3
  52. package/dist/{retry-policy-rutAfVeR.d.ts → retry-policy-BVnkbMET.d.ts} +1 -1
  53. package/dist/sdd/index.d.ts +8 -8
  54. package/dist/sdd/index.js +221 -87
  55. package/dist/sdd/index.js.map +1 -1
  56. package/dist/{secret-vault-w8MbUe2Q.d.ts → secret-vault-CeVNiy_f.d.ts} +3 -2
  57. package/dist/security/index.d.ts +5 -4
  58. package/dist/security/index.js +155 -13
  59. package/dist/security/index.js.map +1 -1
  60. package/dist/{selector-4vDFZKt3.d.ts → selector-Cb4_9-hf.d.ts} +1 -1
  61. package/dist/{session-event-bridge-DWlvglC2.d.ts → session-event-bridge-BhtkkFFy.d.ts} +4 -2
  62. package/dist/{session-reader-BAtCxdaw.d.ts → session-reader-CCOssnBS.d.ts} +1 -1
  63. package/dist/skills/index.js +171 -21
  64. package/dist/skills/index.js.map +1 -1
  65. package/dist/storage/index.d.ts +150 -12
  66. package/dist/storage/index.js +1041 -214
  67. package/dist/storage/index.js.map +1 -1
  68. package/dist/types/index.d.ts +67 -20
  69. package/dist/types/index.js +562 -55
  70. package/dist/types/index.js.map +1 -1
  71. package/dist/utils/expect-defined.js +3 -1
  72. package/dist/utils/expect-defined.js.map +1 -1
  73. package/dist/utils/index.d.ts +25 -4
  74. package/dist/utils/index.js +45 -14
  75. package/dist/utils/index.js.map +1 -1
  76. package/dist/{wstack-paths-DD50Omgn.d.ts → wstack-paths-CJjEwPXn.d.ts} +14 -1
  77. package/package.json +7 -3
  78. package/skills/chimera/SKILL.md +105 -0
  79. package/skills/research-web/SKILL.md +342 -0
  80. package/dist/logger-B9J5puGM.d.ts +0 -32
  81. package/dist/pipeline-BG7UgbDc.d.ts +0 -239
@@ -1,239 +0,0 @@
1
- import { T as Tool, l as TextBlock, g as ContentBlock } from './context-C7G_MtLV.js';
2
- import { H as HookEvent, e as HookMatcher, I as InProcessHook, S as ShellHook, f as HookEntry } from './config-BaVThgnT.js';
3
-
4
- /** Model capabilities relevant to prompt composition. */
5
- interface ModelCapabilities {
6
- maxContextTokens: number;
7
- supportsTools: boolean;
8
- supportsVision: boolean;
9
- supportsReasoning: boolean;
10
- }
11
- interface BuildContext {
12
- cwd: string;
13
- projectRoot: string;
14
- tools: Tool[];
15
- /** Provider id (e.g. "anthropic", "minimax-coding-plan"). */
16
- provider?: string | undefined;
17
- /** Model id (e.g. "claude-sonnet-4-6", "MiniMax-M2.7"). */
18
- model?: string | undefined;
19
- /**
20
- * True when the prompt is being built for a SUBAGENT, not the host
21
- * agent. Subagents are scoped to a single task — they should NOT see
22
- * the host's strategic plan board (which is anchoring the host across
23
- * turns, not steering individual subtasks). The plan-injection
24
- * layer short-circuits when this flag is set.
25
- */
26
- subagent?: boolean | undefined;
27
- }
28
- interface SystemPromptBuilder {
29
- build(ctx: BuildContext): Promise<TextBlock[]>;
30
- }
31
-
32
- /**
33
- * Registry of lifecycle hooks (both in-process and shell). One instance is
34
- * shared per session: the boot path loads `config.hooks` as shell entries and
35
- * plugins add in-process entries via `PluginAPI.registerHook`. The
36
- * `HookRunner` reads from it at each lifecycle phase.
37
- */
38
- declare class HookRegistry {
39
- private readonly entries;
40
- /** Register an in-process hook. Returns an unsubscribe function. */
41
- registerInProcess(event: HookEvent, matcher: HookMatcher | undefined, hook: InProcessHook, owner?: string | undefined): () => void;
42
- /** Register a single shell hook. Returns an unsubscribe function. */
43
- registerShell(event: HookEvent, hook: ShellHook): () => void;
44
- /** Bulk-load shell hooks from a `config.hooks` map. */
45
- loadShellHooks(hooks: Partial<Record<HookEvent, ShellHook[]>> | undefined): void;
46
- /** All entries registered for an event, in registration order. */
47
- list(event: HookEvent): readonly HookEntry[];
48
- /** True when any entry is registered for the event. */
49
- has(event: HookEvent): boolean;
50
- /** Drop every registered hook (used in teardown / tests). */
51
- clear(): void;
52
- private remove;
53
- }
54
- /**
55
- * Does a hook matcher apply to a tool name? `*` (or empty) matches everything;
56
- * otherwise the matcher is a case-insensitive pipe-delimited list of exact
57
- * tool names (`"edit|write"`). Non-tool events pass `undefined` and always match.
58
- */
59
- declare function hookMatcherMatches(matcher: HookMatcher, toolName: string | undefined): boolean;
60
-
61
- interface Renderer {
62
- write(text: string | TextBlock): void;
63
- writeLine(text?: string): void;
64
- writeBlock(block: ContentBlock): void;
65
- writeToolCall(name: string, input: unknown): void;
66
- writeToolResult(name: string, content: unknown, isError: boolean): void;
67
- writeDiff(unifiedDiff: string): void;
68
- writeWarning(text: string): void;
69
- writeError(text: string): void;
70
- writeInfo(text: string): void;
71
- clear(): void;
72
- }
73
-
74
- /**
75
- * Container — dependency injection with explicit bind / override / decorate.
76
- *
77
- * Invariants:
78
- * bind() — throws if token already bound
79
- * override() — throws if nothing to replace
80
- * decorate() — stacks; cached value cleared on register
81
- */
82
- type Token<T> = symbol & {
83
- readonly __type?: T;
84
- };
85
- type Factory<T> = (c: Container) => T;
86
- type Decorator<T> = (inner: T, c: Container) => T;
87
- interface BindOptions {
88
- singleton?: boolean | undefined;
89
- owner?: string | undefined;
90
- }
91
- declare class Container {
92
- private readonly entries;
93
- /**
94
- * Tokens currently mid-resolve. Tracked so we can detect circular
95
- * dependencies (A → B → A) and throw a structured error instead of
96
- * overflowing the call stack with "Maximum call stack size exceeded".
97
- *
98
- * Not a memoization cache — the per-entry `cache` field is the source
99
- * of truth for "have I built this before?". This set only lives for
100
- * the duration of a single resolve call.
101
- */
102
- private readonly resolving;
103
- bind<T>(token: Token<T>, factory: Factory<T>, opts?: BindOptions): void;
104
- override<T>(token: Token<T>, factory: Factory<T>, opts?: BindOptions): void;
105
- decorate<T>(token: Token<T>, decorator: Decorator<T>, owner?: string): void;
106
- resolve<T>(token: Token<T>): T;
107
- /**
108
- * Build a human-readable description of the dependency cycle that
109
- * caused the resolution to re-enter. Lists the tokens in the order
110
- * they were entered, then appends the re-entered token to close the
111
- * loop. Falls back to a generic message if the resolving set is
112
- * somehow empty (shouldn't happen, but defensive).
113
- */
114
- private describeCycle;
115
- has<T>(token: Token<T>): boolean;
116
- /**
117
- * Resolve a token if it is bound, otherwise return undefined.
118
- * Unlike resolve(), this does not throw if the token is unbound.
119
- */
120
- safeResolve<T>(token: Token<T>): T | undefined;
121
- ownerOf<T>(token: Token<T>): string | undefined;
122
- /**
123
- * Remove a token's binding (along with any decorators stacked on it).
124
- * Returns true if the token existed. Use this to withdraw temporary
125
- * bindings installed by a short-lived run or plugin — without it, the
126
- * entry persists in the map forever.
127
- */
128
- unbind<T>(token: Token<T>): boolean;
129
- /**
130
- * Drop every binding. Intended for tests and short-lived CLI invocations
131
- * that rebuild the container from scratch. Production code should prefer
132
- * `unbind` on the specific tokens it owns.
133
- */
134
- clear(): void;
135
- list(): Array<{
136
- token: symbol;
137
- owner: string;
138
- }>;
139
- /**
140
- * Inspect a binding's full shape, including decorator count and whether
141
- * a singleton value is cached. Returns null if the token is unbound.
142
- * Decorator and factory function references are not exposed — only counts
143
- * and metadata, to keep internal state hidden.
144
- */
145
- inspect<T>(token: Token<T>): {
146
- owner: string;
147
- singleton: boolean;
148
- decoratorCount: number;
149
- cached: boolean;
150
- } | null;
151
- }
152
-
153
- /**
154
- * Pipeline — Koa-style middleware chain with named middleware
155
- * and position-aware insertion. Generic over input type T.
156
- */
157
- type NextFn<T> = (value: T) => Promise<T>;
158
- type MiddlewareHandler<T> = (value: T, next: NextFn<T>) => Promise<T>;
159
- /**
160
- * Called when a middleware crashes (throws or rejects). Used by the
161
- * Pipeline's error boundary to log the offender without aborting the run.
162
- *
163
- * Return `'rethrow'` to propagate the error (default for core middleware),
164
- * or `'swallow'` to skip past the crashing middleware and continue with the
165
- * value the previous one produced. Plugin middleware should usually be
166
- * swallowed so one bad plugin can't kill an agent run.
167
- */
168
- type PipelineErrorPolicy = 'rethrow' | 'swallow';
169
- interface PipelineErrorEvent {
170
- middleware: string;
171
- owner?: string | undefined;
172
- err: unknown;
173
- }
174
- type PipelineErrorHandler = (ev: PipelineErrorEvent) => PipelineErrorPolicy | Promise<PipelineErrorPolicy>;
175
- interface Middleware<T> {
176
- name: string;
177
- handler: MiddlewareHandler<T>;
178
- owner?: string | undefined;
179
- }
180
- interface PipelineOptions {
181
- /** When true and the target middleware is not found, operations silently no-op instead of throwing. */
182
- optional?: boolean | undefined;
183
- }
184
- /**
185
- * Read-only view of a pipeline. Returned to consumers (plugins, hooks)
186
- * so they can inspect but not mutate the chain.
187
- */
188
- interface ReadonlyPipeline<T> {
189
- readonly size: number;
190
- list(): readonly string[];
191
- run(input: T): Promise<T>;
192
- }
193
- declare class Pipeline<T> {
194
- private readonly chain;
195
- private errorHandler?;
196
- /**
197
- * Install an error boundary. When a middleware throws or rejects, the
198
- * handler is called and decides whether to swallow (continue with the
199
- * pre-handler value) or rethrow. Without a handler, errors propagate.
200
- *
201
- * Wire one per pipeline at boot — the host CLI typically installs a
202
- * single boundary that logs to the operational log and emits a
203
- * `pipeline.error` event for /diag.
204
- */
205
- setErrorHandler(handler: PipelineErrorHandler | undefined): this;
206
- use(mw: Middleware<T> | Middleware<unknown>): this;
207
- prepend(mw: Middleware<T>): this;
208
- /**
209
- * Insert middleware at an explicit index. Out-of-range indices are clamped.
210
- * Use this when insertBefore/insertAfter are insufficient (e.g. to place
211
- * a middleware at a known position regardless of named targets).
212
- */
213
- insertAt(index: number, mw: Middleware<T>): this;
214
- /**
215
- * Insert mw immediately before the first occurrence of target.
216
- * If called multiple times with the same target, each call inserts
217
- * before the target's current position — so after insertBefore('B', X)
218
- * then insertBefore('B', Y), the order is Y → X → B.
219
- */
220
- insertBefore(target: string, mw: Middleware<T>, opts?: PipelineOptions): this;
221
- /**
222
- * Insert mw immediately after the first occurrence of target.
223
- * If called multiple times with the same target, each call inserts
224
- * after the target's current position — so after insertAfter('B', X)
225
- * then insertAfter('B', Y), the order is B → X → Y.
226
- */
227
- insertAfter(target: string, mw: Middleware<T>, opts?: PipelineOptions): this;
228
- replace(target: string, mw: Middleware<T>, opts?: PipelineOptions): this;
229
- remove(name: string, opts?: PipelineOptions): this;
230
- list(): readonly string[];
231
- size(): number;
232
- /** Return a read-only view suitable for passing to plugins. */
233
- asReadonly(): ReadonlyPipeline<T>;
234
- run(input: T): Promise<T>;
235
- private indexOf;
236
- private ensureUnique;
237
- }
238
-
239
- export { type BuildContext as B, Container as C, type Decorator as D, type Factory as F, HookRegistry as H, type MiddlewareHandler as M, type NextFn as N, Pipeline as P, type ReadonlyPipeline as R, type SystemPromptBuilder as S, type Token as T, type Renderer as a, type ModelCapabilities as b, type BindOptions as c, type Middleware as d, type PipelineOptions as e, hookMatcherMatches as h };