@wrongstack/core 0.272.2 → 0.273.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-DFQYEeXf.d.ts → agent-bridge-BZ2enORi.d.ts} +1 -1
- package/dist/{agent-subagent-runner-BZa_IEcd.d.ts → agent-subagent-runner-ehb4xGvd.d.ts} +11 -4
- package/dist/{brain-etbcbRwV.d.ts → brain-BxN2k2HP.d.ts} +101 -0
- package/dist/{config-rRS8yorV.d.ts → config-C8IYxlO8.d.ts} +8 -1
- package/dist/coordination/index.d.ts +13 -13
- package/dist/coordination/index.js +79 -25
- package/dist/coordination/index.js.map +1 -1
- package/dist/{default-config-B0cj-Hry.d.ts → default-config-BbX4ojZs.d.ts} +1 -0
- package/dist/defaults/index.d.ts +20 -19
- package/dist/defaults/index.js +2813 -206
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +10 -10
- package/dist/execution/index.js +8 -2
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +4 -4
- package/dist/{global-mailbox-DJ4EoRr0.d.ts → global-mailbox-C9dsc9Y_.d.ts} +1 -1
- package/dist/{goal-preamble-hM8BH7TK.d.ts → goal-preamble-NhflDjYb.d.ts} +6 -6
- package/dist/{goal-store-CWlbT0TO.d.ts → goal-store-Cx363x7Z.d.ts} +1 -1
- package/dist/hq/index.d.ts +4 -4
- package/dist/hq/index.js +1 -0
- package/dist/hq/index.js.map +1 -1
- package/dist/{index-DWm_PE9L.d.ts → index-B7fHDt0B.d.ts} +12 -4
- package/dist/{index-2Lhk5v0o.d.ts → index-BbVprU-9.d.ts} +6 -0
- package/dist/index.d.ts +194 -33
- package/dist/index.js +3222 -681
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +4 -4
- package/dist/kernel/index.d.ts +94 -14
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-BpWHTKlE.d.ts → mcp-servers-B6fSRNC1.d.ts} +1 -1
- package/dist/models/index.d.ts +3 -3
- package/dist/{models-registry-CXQFUn5t.d.ts → models-registry-4C6Wr91w.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-jyimfo7D.d.ts → multi-agent-coordinator-q1skFeNP.d.ts} +1 -1
- package/dist/{null-fleet-bus-DOGQcvrY.d.ts → null-fleet-bus-C9rrgQwc.d.ts} +15 -5
- package/dist/observability/index.d.ts +1 -1
- package/dist/{parallel-eternal-engine-rItJBYp9.d.ts → parallel-eternal-engine-CtXly2Sf.d.ts} +7 -6
- package/dist/{path-resolver-DrpF5MGK.d.ts → path-resolver-Bim6G5Jz.d.ts} +2 -2
- package/dist/{pipeline-Ckkn3AOA.d.ts → pipeline-CNVKuQDQ.d.ts} +1 -1
- package/dist/{plan-templates-BvHw5Znw.d.ts → plan-templates-C4wXMmiM.d.ts} +3 -3
- package/dist/{provider-model-resolve-nZqnCeaR.d.ts → provider-model-resolve-DFd3IPpw.d.ts} +1 -1
- package/dist/{provider-runner-zVOn1p67.d.ts → provider-runner-BpM0mdBE.d.ts} +1 -1
- package/dist/sdd/index.d.ts +1111 -11
- package/dist/sdd/index.js +5516 -2949
- package/dist/sdd/index.js.map +1 -1
- package/dist/security/index.d.ts +1 -1
- package/dist/security/index.js +6 -0
- package/dist/security/index.js.map +1 -1
- package/dist/storage/index.d.ts +8 -8
- package/dist/storage/index.js +3 -2
- package/dist/storage/index.js.map +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts +14 -14
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +30 -4
- package/dist/utils/index.js +110 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/{index-DqW4o62H.d.ts → worktree-manager-BDuXTaWL.d.ts} +48 -90
- package/dist/{wstack-paths-hOpNLmvf.d.ts → wstack-paths-BqkDAkoh.d.ts} +2 -0
- package/package.json +1 -1
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as EventBus, c as MemoryStore, B as BrainArbiter } from './brain-etbcbRwV.js';
|
|
3
|
-
import { C as Compactor } from './compactor-72ug-ZRB.js';
|
|
4
|
-
import { k as ConfigLoader, j as ConfigStore, M as ModelsRegistry } from './config-rRS8yorV.js';
|
|
5
|
-
import { E as ErrorHandler, R as RetryPolicy } from './retry-policy-BV7nzeAd.js';
|
|
6
|
-
import { I as InputReader } from './input-reader-E-ffP2ee.js';
|
|
7
|
-
import { L as Logger } from './logger-B63L5bTg.js';
|
|
8
|
-
import { M as ModeStore } from './mode-CZlO9iU1.js';
|
|
9
|
-
import { P as PathResolver } from './path-resolver-CPRj4bFY.js';
|
|
10
|
-
import { P as PermissionPolicy, S as SecretScrubber } from './permission-CC7XFYWG.js';
|
|
11
|
-
import { P as ProviderRunner } from './provider-runner-zVOn1p67.js';
|
|
12
|
-
import { e as TokenCounter, k as SessionStore } from './context-Dw55zZ_Q.js';
|
|
13
|
-
import { S as SkillLoader } from './skill-DGIXCtdv.js';
|
|
1
|
+
import { E as EventBus } from './brain-BxN2k2HP.js';
|
|
14
2
|
|
|
15
3
|
/**
|
|
16
4
|
* Lifecycle of a single worktree handle.
|
|
@@ -115,6 +103,52 @@ declare class WorktreeManager {
|
|
|
115
103
|
}>;
|
|
116
104
|
/** Merge the worktree branch back into the base branch (squash by default). */
|
|
117
105
|
merge(handle: WorktreeHandle, opts?: MergeOpts): Promise<MergeResult>;
|
|
106
|
+
/**
|
|
107
|
+
* Current tip SHA of a handle's base branch (without checking it out). Capture
|
|
108
|
+
* this before a merge so a regressed merge can be reverted to exactly this
|
|
109
|
+
* commit — unambiguous even when a squash produced no diff. Returns null on
|
|
110
|
+
* failure (caller then skips the revert).
|
|
111
|
+
*/
|
|
112
|
+
baseHead(handle: WorktreeHandle): Promise<string | null>;
|
|
113
|
+
/**
|
|
114
|
+
* Hard-reset the base branch back to `sha` (a value previously returned by
|
|
115
|
+
* {@link baseHead}). Used to undo a squash-merge whose integrated result failed
|
|
116
|
+
* re-verification, so an auto-resolved-but-broken merge never sticks on base.
|
|
117
|
+
* Safe because SDD merges are serialized — no other commit lands in between.
|
|
118
|
+
*/
|
|
119
|
+
revertBaseTo(handle: WorktreeHandle, sha: string): Promise<boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* Current base branch + tip SHA, captured WITHOUT a handle. The SDD run calls
|
|
122
|
+
* this once at start so a later rollback knows which branch the run's squash
|
|
123
|
+
* commits landed on. Returns null when not in a usable git state.
|
|
124
|
+
*/
|
|
125
|
+
currentBase(): Promise<{
|
|
126
|
+
branch: string;
|
|
127
|
+
sha: string;
|
|
128
|
+
} | null>;
|
|
129
|
+
/**
|
|
130
|
+
* Force-remove EVERY managed worktree + branch this project owns, without
|
|
131
|
+
* relying on the in-memory `handles` map — so it works post-run (a fresh
|
|
132
|
+
* manager can clean up a previous run's leftovers). Enumerates
|
|
133
|
+
* `git worktree list --porcelain`, removes every checkout living under the
|
|
134
|
+
* `.wrongstack/worktrees` root, deletes every `wstack/ap/*` branch, then prunes.
|
|
135
|
+
* Returns the number of worktrees removed. Never throws — best-effort cleanup.
|
|
136
|
+
*/
|
|
137
|
+
cleanupAllManaged(): Promise<{
|
|
138
|
+
removed: number;
|
|
139
|
+
}>;
|
|
140
|
+
/**
|
|
141
|
+
* Undo a run's squash commits by reverting each (newest → oldest) on the base
|
|
142
|
+
* branch — history-preserving, never a destructive reset. Refuses on a dirty
|
|
143
|
+
* working tree (so uncommitted work is never clobbered) and aborts cleanly if a
|
|
144
|
+
* revert conflicts, reporting which SHA. `shas` are the run commit SHAs in the
|
|
145
|
+
* order they landed; this reverses them. Returns the count reverted.
|
|
146
|
+
*/
|
|
147
|
+
revertCommits(baseBranch: string, shas: string[]): Promise<{
|
|
148
|
+
ok: boolean;
|
|
149
|
+
reverted: number;
|
|
150
|
+
reason?: string;
|
|
151
|
+
}>;
|
|
118
152
|
/**
|
|
119
153
|
* Run the caller-supplied resolver against a conflicted squash-merge, then
|
|
120
154
|
* commit if it cleared every marker. Returns a successful `MergeResult` on a
|
|
@@ -162,80 +196,4 @@ declare class WorktreeManager {
|
|
|
162
196
|
/** Throw if `dir` resolves outside `projectRoot`. */
|
|
163
197
|
declare function assertSafePath(dir: string, projectRoot: string): void;
|
|
164
198
|
|
|
165
|
-
|
|
166
|
-
readonly Logger: Token<Logger>;
|
|
167
|
-
readonly TokenCounter: Token<TokenCounter>;
|
|
168
|
-
readonly SessionStore: Token<SessionStore>;
|
|
169
|
-
readonly MemoryStore: Token<MemoryStore>;
|
|
170
|
-
readonly PermissionPolicy: Token<PermissionPolicy>;
|
|
171
|
-
readonly Compactor: Token<Compactor>;
|
|
172
|
-
readonly PathResolver: Token<PathResolver>;
|
|
173
|
-
readonly ConfigLoader: Token<ConfigLoader>;
|
|
174
|
-
readonly ConfigStore: Token<ConfigStore>;
|
|
175
|
-
readonly Renderer: Token<Renderer>;
|
|
176
|
-
readonly InputReader: Token<InputReader>;
|
|
177
|
-
readonly ErrorHandler: Token<ErrorHandler>;
|
|
178
|
-
readonly RetryPolicy: Token<RetryPolicy>;
|
|
179
|
-
readonly SkillLoader: Token<SkillLoader>;
|
|
180
|
-
readonly SystemPromptBuilder: Token<SystemPromptBuilder>;
|
|
181
|
-
readonly SecretScrubber: Token<SecretScrubber>;
|
|
182
|
-
readonly ModelsRegistry: Token<ModelsRegistry>;
|
|
183
|
-
readonly ModeStore: Token<ModeStore>;
|
|
184
|
-
/** Replaces the entire provider call layer — retry, streaming, tracing. */
|
|
185
|
-
readonly ProviderRunner: Token<ProviderRunner>;
|
|
186
|
-
/** Optional git-worktree lifecycle manager (per-phase isolation in AutoPhase). */
|
|
187
|
-
readonly WorktreeManager: Token<WorktreeManager>;
|
|
188
|
-
/** Optional global Brain arbiter for policy/decision escalation. */
|
|
189
|
-
readonly BrainArbiter: Token<BrainArbiter>;
|
|
190
|
-
/** Lifecycle hook registry (shell + in-process hooks). */
|
|
191
|
-
readonly HookRegistry: Token<HookRegistry>;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* RunController centralises abort + cleanup for a single agent run. It
|
|
196
|
-
* wraps a single AbortController and exposes a registry of teardown
|
|
197
|
-
* hooks that fire (LIFO, exactly once) when the run aborts OR ends
|
|
198
|
-
* normally. Anyone holding the controller can:
|
|
199
|
-
*
|
|
200
|
-
* - read `signal` to bail out cooperatively
|
|
201
|
-
* - call `abort(reason?)` to abort the run
|
|
202
|
-
* - call `onAbort(fn)` to register a cleanup hook
|
|
203
|
-
* - call `dispose()` when the run ends normally — this fires the
|
|
204
|
-
* hooks too, so cleanup runs regardless of outcome
|
|
205
|
-
*
|
|
206
|
-
* Hooks must be idempotent and synchronous-or-quick. Errors thrown
|
|
207
|
-
* inside hooks are caught and surfaced through `errorSink` (or the
|
|
208
|
-
* console as a last resort) so one bad hook can't block the others.
|
|
209
|
-
*/
|
|
210
|
-
interface RunControllerOptions {
|
|
211
|
-
/** Optional parent signal — abort propagates from parent → this. */
|
|
212
|
-
parentSignal?: AbortSignal | undefined;
|
|
213
|
-
/** Receives errors thrown by cleanup hooks. Defaults to console.warn. */
|
|
214
|
-
errorSink?: (err: unknown, where: string) => void;
|
|
215
|
-
}
|
|
216
|
-
declare class RunController {
|
|
217
|
-
private readonly ctrl;
|
|
218
|
-
private readonly hooks;
|
|
219
|
-
private disposed;
|
|
220
|
-
private hooksDrained;
|
|
221
|
-
private readonly errorSink;
|
|
222
|
-
constructor(opts?: RunControllerOptions);
|
|
223
|
-
get signal(): AbortSignal;
|
|
224
|
-
get aborted(): boolean;
|
|
225
|
-
abort(reason?: unknown): void;
|
|
226
|
-
/**
|
|
227
|
-
* Register a teardown hook. Returns an unsubscribe function so callers
|
|
228
|
-
* can opt out before the hook fires (e.g. when a tool finishes cleanly
|
|
229
|
-
* before abort happens).
|
|
230
|
-
*/
|
|
231
|
-
onAbort(fn: () => void | Promise<void>): () => void;
|
|
232
|
-
/**
|
|
233
|
-
* Fire cleanup hooks and tear down listeners — called when the run
|
|
234
|
-
* ends *normally* so cleanup happens regardless of outcome. Subsequent
|
|
235
|
-
* aborts become no-ops.
|
|
236
|
-
*/
|
|
237
|
-
dispose(): Promise<void>;
|
|
238
|
-
private runHooks;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export { type AllocateOpts as A, type MergeOpts as M, RunController as R, TOKENS as T, WorktreeManager as W, type MergeResult as a, type RunControllerOptions as b, type WorktreeHandle as c, type WorktreeManagerOptions as d, type RunResult as e, type WorktreeStatus as f, assertSafePath as g };
|
|
199
|
+
export { type AllocateOpts as A, type MergeOpts as M, type RunResult as R, WorktreeManager as W, type MergeResult as a, type WorktreeHandle as b, type WorktreeManagerOptions as c, type WorktreeStatus as d, assertSafePath as e };
|
|
@@ -79,6 +79,8 @@ interface WstackPaths {
|
|
|
79
79
|
projectPlan: string;
|
|
80
80
|
/** ~/.wrongstack/projects/<hash>/autophase — AutoPhase phase-graph JSON files */
|
|
81
81
|
projectAutophase: string;
|
|
82
|
+
/** ~/.wrongstack/projects/<hash>/sdd-boards — live SDD board snapshots + JSONL event logs */
|
|
83
|
+
projectSddBoards: string;
|
|
82
84
|
/** ~/.wrongstack/sync.json — CloudSync configuration */
|
|
83
85
|
syncConfig: string;
|
|
84
86
|
/** Function to get the status.json path for a project given its hash. */
|