opencode-swarm 7.86.0 → 7.87.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.
- package/dist/cli/{capability-probe-jevmgwmf.js → capability-probe-wsjzcp48.js} +2 -2
- package/dist/cli/{config-doctor-zejarrr6.js → config-doctor-6h64pn8n.js} +4 -4
- package/dist/cli/{dispatch-k86d928w.js → dispatch-kb69qw40.js} +3 -3
- package/dist/cli/{evidence-summary-service-g2znnd33.js → evidence-summary-service-gg5m9z57.js} +4 -4
- package/dist/cli/{guardrail-explain-rtd1x26f.js → guardrail-explain-scym5r5y.js} +13 -13
- package/dist/cli/{guardrail-log-80116wmz.js → guardrail-log-eegabqcp.js} +5 -5
- package/dist/cli/{index-0sxvwjt0.js → index-1cb4wxnm.js} +2 -2
- package/dist/cli/{index-zfsbaaqh.js → index-5e4e2hvv.js} +1 -1
- package/dist/cli/{index-vq2321gg.js → index-5hvbw5xh.js} +2 -2
- package/dist/cli/{index-5cb86007.js → index-5vpe6vq9.js} +1 -1
- package/dist/cli/{index-red8fm8p.js → index-89xjr3h4.js} +1162 -214
- package/dist/cli/{index-f8r50m3h.js → index-adz3nk9b.js} +2 -2
- package/dist/cli/{index-jwz50183.js → index-dsjyfd3g.js} +14 -14
- package/dist/cli/{index-ckntc5gf.js → index-gn8n22th.js} +2 -2
- package/dist/cli/{index-5q66xc88.js → index-gwzpy671.js} +2699 -1403
- package/dist/cli/{index-hw9b2xng.js → index-q9h0wb04.js} +36 -3
- package/dist/cli/{index-d9fbxaqd.js → index-s8bj492g.js} +1 -1
- package/dist/cli/{index-7r2b453y.js → index-ts2j1wjr.js} +2 -2
- package/dist/cli/{index-hz59hg4h.js → index-v4fcn4tr.js} +1 -1
- package/dist/cli/{index-eb85wtx9.js → index-vqyfscxd.js} +2 -2
- package/dist/cli/{index-yx44zd0p.js → index-zgwm4ryv.js} +9 -1
- package/dist/cli/index.js +12 -12
- package/dist/cli/{pending-delegations-rd40tv9s.js → pending-delegations-35fvcj7z.js} +3 -3
- package/dist/cli/{pr-subscriptions-y1nn36e5.js → pr-subscriptions-b18n1yd8.js} +4 -4
- package/dist/cli/{schema-8d32b2v6.js → schema-84146tvk.js} +3 -1
- package/dist/cli/{skill-generator-a5ehggyg.js → skill-generator-3pvpk4y2.js} +2 -2
- package/dist/commands/coupling.d.ts +36 -0
- package/dist/commands/epic.d.ts +52 -0
- package/dist/commands/registry.d.ts +18 -2
- package/dist/config/constants.d.ts +1 -0
- package/dist/config/schema.d.ts +145 -0
- package/dist/git/branch.d.ts +22 -1
- package/dist/hooks/delegation-gate/worktree-merge-status.d.ts +86 -0
- package/dist/index.js +8577 -5858
- package/dist/memory/schema.d.ts +3 -3
- package/dist/memory/scoring.d.ts +18 -0
- package/dist/memory/sqlite-provider.d.ts +10 -0
- package/dist/plan/manager.d.ts +10 -0
- package/dist/state.d.ts +16 -0
- package/dist/tools/epic-plan-waves.d.ts +79 -0
- package/dist/tools/epic-record-divergence.d.ts +73 -0
- package/dist/tools/epic-run-phase.d.ts +179 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/manifest.d.ts +3 -0
- package/dist/tools/tool-metadata.d.ts +12 -0
- package/dist/turbo/epic/activation.d.ts +193 -0
- package/dist/turbo/epic/calibration-engine.d.ts +88 -0
- package/dist/turbo/epic/calibration.d.ts +65 -0
- package/dist/turbo/epic/cochange-conflict.d.ts +79 -0
- package/dist/turbo/epic/cochange-source.d.ts +80 -0
- package/dist/turbo/epic/coupling-report.d.ts +85 -0
- package/dist/turbo/epic/divergence-recorder.d.ts +112 -0
- package/dist/turbo/epic/index.d.ts +24 -0
- package/dist/turbo/epic/promotion-evidence.d.ts +42 -0
- package/dist/turbo/epic/state.d.ts +85 -0
- package/dist/turbo/epic/task-commit.d.ts +110 -0
- package/dist/turbo/epic/upstream-commits.d.ts +82 -0
- package/dist/turbo/epic/wave-planner.d.ts +83 -0
- package/dist/turbo/lean/partition-common.d.ts +85 -0
- package/dist/turbo/lean/planner.d.ts +12 -20
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/logger.d.ts +19 -0
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worktree merge-back status registry (leaf module — no app imports).
|
|
3
|
+
*
|
|
4
|
+
* Bridges two subsystems that otherwise cannot see each other:
|
|
5
|
+
*
|
|
6
|
+
* - WORKTREE ISOLATION (`worktree-isolation.ts`) knows, at merge-back
|
|
7
|
+
* time, whether a Task-dispatched coder's isolated worktree merged
|
|
8
|
+
* cleanly back into the main tree.
|
|
9
|
+
* - EPIC MODE Rule 2 (`plan/manager.updateTaskStatus`) auto-commits a
|
|
10
|
+
* `swarm(task <id>):` marker on completion. That marker is the
|
|
11
|
+
* evidence Rule 3 scans to decide a downstream task's upstream is
|
|
12
|
+
* satisfied.
|
|
13
|
+
*
|
|
14
|
+
* Without this bridge, a coder whose worktree merge-back FAILED (conflict)
|
|
15
|
+
* leaves its changes stranded in the preserved worktree, yet Rule 2 would
|
|
16
|
+
* still fire an `--allow-empty` marker and Rule 3 would treat the task as
|
|
17
|
+
* done — silently advancing the plan past work that never landed.
|
|
18
|
+
*
|
|
19
|
+
* This module is deliberately a LEAF: it imports nothing from the app so
|
|
20
|
+
* that both `worktree-isolation.ts` (writer) and `plan/manager.ts` (reader)
|
|
21
|
+
* can depend on it without creating an import cycle.
|
|
22
|
+
*
|
|
23
|
+
* STATE DURABILITY: Status is stored in an in-memory Map (fast, per-process)
|
|
24
|
+
* AND persisted to `.swarm/worktree-merge-status.json` (survives plugin restart).
|
|
25
|
+
* On each write, the JSON file is atomically updated. On read, the in-memory
|
|
26
|
+
* map is checked first (fast path); on plugin restart, the map is empty but
|
|
27
|
+
* the durable file is restored on first read or Rule 2 lookup.
|
|
28
|
+
*/
|
|
29
|
+
/** Why a task's worktree work did not fully reach the main tree. */
|
|
30
|
+
export type WorktreeMergeOutcome = 'partial' | 'failed';
|
|
31
|
+
export interface WorktreeMergeFailure {
|
|
32
|
+
outcome: WorktreeMergeOutcome;
|
|
33
|
+
/** Pipeline stage that failed (e.g. 'merge', 'auto-commit'). */
|
|
34
|
+
stage: string;
|
|
35
|
+
/** Human-readable detail surfaced in the Rule 2 skip warning. */
|
|
36
|
+
message: string;
|
|
37
|
+
}
|
|
38
|
+
declare function getDurableStatusPath(projectDir?: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Load the durable file into the in-memory map. The clear+repopulate is
|
|
41
|
+
* synchronous (no `await`), so no read can observe a transiently-empty map
|
|
42
|
+
* in Node's single-threaded model. Called only from init and the one-shot
|
|
43
|
+
* lazy load — never on a steady-state lookup.
|
|
44
|
+
*/
|
|
45
|
+
declare function loadDurableStatus(statusPath: string): void;
|
|
46
|
+
declare function saveDurableStatus(statusPath: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Initialize the durable status path for this project and load existing
|
|
49
|
+
* status from disk. Called from `createDelegationGateHook` before any coder
|
|
50
|
+
* dispatches. Re-initializing the SAME path is a no-op (the in-memory map is
|
|
51
|
+
* already the live authority); switching to a DIFFERENT path reloads.
|
|
52
|
+
*/
|
|
53
|
+
export declare function initDurableStatusPath(projectDir: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Record that task `taskId`'s worktree merge-back did not fully land.
|
|
56
|
+
* No-op when `taskId` is undefined (non-plan dispatches carry no plan id
|
|
57
|
+
* and are never subject to Epic Rule 2).
|
|
58
|
+
*/
|
|
59
|
+
export declare function recordWorktreeMergeFailure(taskId: string | undefined, failure: WorktreeMergeFailure): void;
|
|
60
|
+
/**
|
|
61
|
+
* Clear any recorded failure for `taskId`. Called when a (re-)dispatch of
|
|
62
|
+
* the same task merges cleanly, so a later success supersedes an earlier
|
|
63
|
+
* failure and Rule 2 is allowed to commit the marker again.
|
|
64
|
+
*/
|
|
65
|
+
export declare function clearWorktreeMergeStatus(taskId: string | undefined): void;
|
|
66
|
+
/**
|
|
67
|
+
* Query whether task `taskId`'s most recent worktree merge-back failed.
|
|
68
|
+
* Returns the failure detail, or undefined when the task merged cleanly,
|
|
69
|
+
* was never worktree-isolated, or has no recorded status.
|
|
70
|
+
* On first read after plugin restart, loads from durable storage.
|
|
71
|
+
*/
|
|
72
|
+
export declare function getWorktreeMergeFailure(taskId: string): WorktreeMergeFailure | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* @internal test seam. Use `resetForTest()` in afterEach to isolate tests
|
|
75
|
+
* that set durableStatusPath via `initDurableStatusPath`.
|
|
76
|
+
*/
|
|
77
|
+
export declare const _internals: {
|
|
78
|
+
failuresByTask: Map<string, WorktreeMergeFailure>;
|
|
79
|
+
getDurableStatusPath: typeof getDurableStatusPath;
|
|
80
|
+
loadDurableStatus: typeof loadDurableStatus;
|
|
81
|
+
saveDurableStatus: typeof saveDurableStatus;
|
|
82
|
+
initDurableStatusPath: typeof initDurableStatusPath;
|
|
83
|
+
/** Reset both in-memory and durable state for test isolation. */
|
|
84
|
+
resetForTest(): void;
|
|
85
|
+
};
|
|
86
|
+
export {};
|