@aperant/framework 0.17.0 → 0.20.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/CHANGELOG.md +261 -0
- package/agents/apt-executor.md +6 -0
- package/agents/apt-planner.md +3 -2
- package/bin/features-reconcile-check.mjs +77 -0
- package/dist/cli/artifacts/self-stage.d.mts.map +1 -1
- package/dist/cli/artifacts/self-stage.mjs +2 -1
- package/dist/cli/artifacts/self-stage.mjs.map +1 -1
- package/dist/cli/cli-wrappers/features-reconcile.d.mts +2 -0
- package/dist/cli/cli-wrappers/features-reconcile.d.mts.map +1 -0
- package/dist/cli/cli-wrappers/features-reconcile.mjs +9 -0
- package/dist/cli/cli-wrappers/features-reconcile.mjs.map +1 -0
- package/dist/cli/commands/ci-watch.mjs +49 -2
- package/dist/cli/commands/ci-watch.mjs.map +1 -1
- package/dist/cli/commands/commit.mjs +3 -3
- package/dist/cli/commands/commit.mjs.map +1 -1
- package/dist/cli/commands/event.mjs +16 -16
- package/dist/cli/commands/event.mjs.map +1 -1
- package/dist/cli/commands/features-reconcile.d.mts +2 -0
- package/dist/cli/commands/features-reconcile.d.mts.map +1 -0
- package/dist/cli/commands/features-reconcile.mjs +143 -0
- package/dist/cli/commands/features-reconcile.mjs.map +1 -0
- package/dist/cli/commands/health-check.d.mts +2 -2
- package/dist/cli/commands/health-check.mjs +2 -2
- package/dist/cli/commands/merge-integrate.mjs +3 -3
- package/dist/cli/commands/merge-integrate.mjs.map +1 -1
- package/dist/cli/commands/produce.d.mts +9 -0
- package/dist/cli/commands/produce.d.mts.map +1 -0
- package/dist/cli/commands/produce.mjs +1345 -0
- package/dist/cli/commands/produce.mjs.map +1 -0
- package/dist/cli/commands/task.d.mts +16 -1
- package/dist/cli/commands/task.d.mts.map +1 -1
- package/dist/cli/commands/task.mjs +434 -266
- package/dist/cli/commands/task.mjs.map +1 -1
- package/dist/cli/coordination/auto-emit-artifact-ready.mjs +5 -5
- package/dist/cli/coordination/auto-emit-artifact-ready.mjs.map +1 -1
- package/dist/cli/coordination/event-schema.d.mts +5 -3
- package/dist/cli/coordination/event-schema.d.mts.map +1 -1
- package/dist/cli/coordination/event-schema.mjs +245 -21
- package/dist/cli/coordination/event-schema.mjs.map +1 -1
- package/dist/cli/coordination/store.d.mts +2 -2
- package/dist/cli/coordination/store.mjs +4 -4
- package/dist/cli/coordination/store.mjs.map +1 -1
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +4 -2
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/features/area-shape.d.mts +11 -0
- package/dist/cli/features/area-shape.d.mts.map +1 -0
- package/dist/cli/features/area-shape.mjs +141 -0
- package/dist/cli/features/area-shape.mjs.map +1 -0
- package/dist/cli/features/delta.d.mts +78 -0
- package/dist/cli/features/delta.d.mts.map +1 -0
- package/dist/cli/features/delta.mjs +591 -0
- package/dist/cli/features/delta.mjs.map +1 -0
- package/dist/cli/features/reconcile.d.mts +236 -0
- package/dist/cli/features/reconcile.d.mts.map +1 -0
- package/dist/cli/features/reconcile.mjs +1126 -0
- package/dist/cli/features/reconcile.mjs.map +1 -0
- package/dist/cli/features/surface-map.d.mts +63 -0
- package/dist/cli/features/surface-map.d.mts.map +1 -0
- package/dist/cli/features/surface-map.mjs +191 -0
- package/dist/cli/features/surface-map.mjs.map +1 -0
- package/dist/cli/{commands/features-audit.d.mts → features/write-root.d.mts} +4 -3
- package/dist/cli/features/write-root.d.mts.map +1 -0
- package/dist/cli/features/write-root.mjs +137 -0
- package/dist/cli/features/write-root.mjs.map +1 -0
- package/dist/cli/gate/gates/features-reconciled.d.mts +36 -0
- package/dist/cli/gate/gates/features-reconciled.d.mts.map +1 -0
- package/dist/cli/gate/gates/features-reconciled.mjs +67 -0
- package/dist/cli/gate/gates/features-reconciled.mjs.map +1 -0
- package/dist/cli/gate/gates/index.mjs +1 -0
- package/dist/cli/gate/gates/index.mjs.map +1 -1
- package/dist/cli/help.d.mts.map +1 -1
- package/dist/cli/help.mjs +31 -1
- package/dist/cli/help.mjs.map +1 -1
- package/dist/cli/install/legacy-paths.d.mts.map +1 -1
- package/dist/cli/install/legacy-paths.mjs +2 -0
- package/dist/cli/install/legacy-paths.mjs.map +1 -1
- package/dist/cli/produce/blind-probe.d.mts +85 -0
- package/dist/cli/produce/blind-probe.d.mts.map +1 -0
- package/dist/cli/produce/blind-probe.mjs +217 -0
- package/dist/cli/produce/blind-probe.mjs.map +1 -0
- package/dist/cli/produce/claim.d.mts +188 -0
- package/dist/cli/produce/claim.d.mts.map +1 -0
- package/dist/cli/produce/claim.mjs +518 -0
- package/dist/cli/produce/claim.mjs.map +1 -0
- package/dist/cli/produce/done-gate.d.mts +87 -0
- package/dist/cli/produce/done-gate.d.mts.map +1 -0
- package/dist/cli/produce/done-gate.mjs +200 -0
- package/dist/cli/produce/done-gate.mjs.map +1 -0
- package/dist/cli/produce/events.d.mts +77 -0
- package/dist/cli/produce/events.d.mts.map +1 -0
- package/dist/cli/produce/events.mjs +126 -0
- package/dist/cli/produce/events.mjs.map +1 -0
- package/dist/cli/produce/evidence-oracle.d.mts +63 -0
- package/dist/cli/produce/evidence-oracle.d.mts.map +1 -0
- package/dist/cli/produce/evidence-oracle.mjs +122 -0
- package/dist/cli/produce/evidence-oracle.mjs.map +1 -0
- package/dist/cli/produce/ledger.d.mts +140 -0
- package/dist/cli/produce/ledger.d.mts.map +1 -0
- package/dist/cli/produce/ledger.mjs +272 -0
- package/dist/cli/produce/ledger.mjs.map +1 -0
- package/dist/cli/produce/probe-family.d.mts +53 -0
- package/dist/cli/produce/probe-family.d.mts.map +1 -0
- package/dist/cli/produce/probe-family.mjs +160 -0
- package/dist/cli/produce/probe-family.mjs.map +1 -0
- package/dist/cli/produce/projection.d.mts +55 -0
- package/dist/cli/produce/projection.d.mts.map +1 -0
- package/dist/cli/produce/projection.mjs +97 -0
- package/dist/cli/produce/projection.mjs.map +1 -0
- package/dist/cli/produce/run-id.d.mts +42 -0
- package/dist/cli/produce/run-id.d.mts.map +1 -0
- package/dist/cli/produce/run-id.mjs +79 -0
- package/dist/cli/produce/run-id.mjs.map +1 -0
- package/dist/cli/produce/saga.d.mts +180 -0
- package/dist/cli/produce/saga.d.mts.map +1 -0
- package/dist/cli/produce/saga.mjs +290 -0
- package/dist/cli/produce/saga.mjs.map +1 -0
- package/dist/cli/produce/scheduler.d.mts +165 -0
- package/dist/cli/produce/scheduler.d.mts.map +1 -0
- package/dist/cli/produce/scheduler.mjs +399 -0
- package/dist/cli/produce/scheduler.mjs.map +1 -0
- package/dist/cli/produce/setpoint.d.mts +52 -0
- package/dist/cli/produce/setpoint.d.mts.map +1 -0
- package/dist/cli/produce/setpoint.mjs +113 -0
- package/dist/cli/produce/setpoint.mjs.map +1 -0
- package/dist/cli/produce/verification-ttl.d.mts +75 -0
- package/dist/cli/produce/verification-ttl.d.mts.map +1 -0
- package/dist/cli/produce/verification-ttl.mjs +169 -0
- package/dist/cli/produce/verification-ttl.mjs.map +1 -0
- package/dist/cli/release-notes/ship-autodraft.mjs +2 -2
- package/dist/cli/roadmap/{conductor-view.d.mts → showrunner-view.d.mts} +3 -3
- package/dist/cli/roadmap/showrunner-view.d.mts.map +1 -0
- package/dist/cli/roadmap/{conductor-view.mjs → showrunner-view.mjs} +7 -7
- package/dist/cli/roadmap/showrunner-view.mjs.map +1 -0
- package/dist/cli/variant/gallery.d.mts.map +1 -1
- package/dist/cli/variant/gallery.mjs +7 -3
- package/dist/cli/variant/gallery.mjs.map +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +2 -1
- package/dist/plugin/agents/apt-executor.md +6 -0
- package/dist/plugin/agents/apt-planner.md +3 -2
- package/dist/plugin/skills/apt/SKILL.md +112 -38
- package/dist/plugin/skills/apt-close-task/SKILL.md +2 -2
- package/dist/plugin/skills/apt-debug/SKILL.md +22 -24
- package/dist/plugin/skills/apt-execute/SKILL.md +35 -26
- package/dist/plugin/skills/apt-fan-out/SKILL.md +4 -4
- package/dist/plugin/skills/apt-handoff/SKILL.md +1 -1
- package/dist/plugin/skills/apt-mockup/SKILL.md +1 -1
- package/dist/plugin/skills/apt-plan/SKILL.md +5 -5
- package/dist/plugin/skills/apt-plan/adapters/{conductor.md → showrunner.md} +16 -16
- package/dist/plugin/skills/apt-produce/SKILL.md +606 -0
- package/dist/plugin/skills/apt-quick/SKILL.md +27 -33
- package/dist/plugin/skills/apt-review/SKILL.md +14 -11
- package/dist/plugin/skills/apt-run/SKILL.md +132 -3
- package/dist/plugin/skills/apt-ship/SKILL.md +29 -5
- package/dist/plugin/skills/apt-spar/SKILL.md +5 -3
- package/dist/plugin/skills/apt-watch-ci/SKILL.md +6 -4
- package/dist/schemas/feature-registry.d.ts.map +1 -1
- package/dist/schemas/feature-registry.js +34 -3
- package/dist/schemas/feature-registry.js.map +1 -1
- package/dist/types/config.d.ts +8 -5
- package/dist/types/config.d.ts.map +1 -1
- package/package.json +4 -4
- package/prompts/{conductor-framework-context.md → showrunner-framework-context.md} +1 -1
- package/prompts/{conductor-status-check.md → showrunner-status-check.md} +1 -1
- package/prompts/{conductor-sub-agent.md → showrunner-sub-agent.md} +6 -6
- package/prompts/{conductor-system.md → showrunner-system.md} +8 -8
- package/skills/apt/SKILL.md +112 -38
- package/skills/apt-close-task/SKILL.md +2 -2
- package/skills/apt-debug/SKILL.md +22 -24
- package/skills/apt-execute/SKILL.md +35 -26
- package/skills/apt-fan-out/SKILL.md +4 -4
- package/skills/apt-handoff/SKILL.md +1 -1
- package/skills/apt-mockup/SKILL.md +1 -1
- package/skills/apt-plan/SKILL.md +5 -5
- package/skills/apt-plan/adapters/{conductor.md → showrunner.md} +16 -16
- package/skills/apt-produce/SKILL.md +606 -0
- package/skills/apt-quick/SKILL.md +27 -33
- package/skills/apt-review/SKILL.md +14 -11
- package/skills/apt-run/SKILL.md +132 -3
- package/skills/apt-ship/SKILL.md +29 -5
- package/skills/apt-spar/SKILL.md +5 -3
- package/skills/apt-watch-ci/SKILL.md +6 -4
- package/src/cli/artifacts/self-stage.mjs +2 -1
- package/src/cli/cli-wrappers/features-reconcile.mjs +9 -0
- package/src/cli/commands/ci-watch.mjs +51 -2
- package/src/cli/commands/commit.mjs +3 -3
- package/src/cli/commands/event.mjs +16 -16
- package/src/cli/commands/features-reconcile.mjs +157 -0
- package/src/cli/commands/health-check.mjs +2 -2
- package/src/cli/commands/merge-integrate.mjs +3 -3
- package/src/cli/commands/produce.mjs +1466 -0
- package/src/cli/commands/task.mjs +482 -285
- package/src/cli/coordination/auto-emit-artifact-ready.mjs +5 -5
- package/src/cli/coordination/event-schema.d.ts +4 -2
- package/src/cli/coordination/event-schema.mjs +276 -21
- package/src/cli/coordination/store.mjs +4 -4
- package/src/cli/dispatch.mjs +4 -2
- package/src/cli/features/area-shape.mjs +140 -0
- package/src/cli/features/delta.mjs +625 -0
- package/src/cli/features/reconcile.mjs +1169 -0
- package/src/cli/features/surface-map.mjs +192 -0
- package/src/cli/features/write-root.mjs +140 -0
- package/src/cli/gate/gates/features-reconciled.mjs +70 -0
- package/src/cli/gate/gates/index.mjs +1 -0
- package/src/cli/help.mjs +31 -1
- package/src/cli/install/legacy-paths.mjs +2 -0
- package/src/cli/produce/blind-probe.mjs +245 -0
- package/src/cli/produce/claim.mjs +543 -0
- package/src/cli/produce/done-gate.mjs +238 -0
- package/src/cli/produce/events.mjs +131 -0
- package/src/cli/produce/evidence-oracle.mjs +133 -0
- package/src/cli/produce/ledger.mjs +284 -0
- package/src/cli/produce/probe-family.mjs +168 -0
- package/src/cli/produce/projection.mjs +105 -0
- package/src/cli/produce/run-id.mjs +84 -0
- package/src/cli/produce/saga.mjs +303 -0
- package/src/cli/produce/scheduler.mjs +423 -0
- package/src/cli/produce/setpoint.mjs +122 -0
- package/src/cli/produce/verification-ttl.mjs +191 -0
- package/src/cli/release-notes/ship-autodraft.mjs +2 -2
- package/src/cli/roadmap/showrunner-view.d.ts +10 -0
- package/src/cli/roadmap/{conductor-view.mjs → showrunner-view.mjs} +6 -6
- package/src/cli/variant/gallery.mjs +7 -3
- package/templates/aperant-claude-md-appendix.md +2 -2
- package/workflows/scan-features.md +17 -11
- package/dist/cli/cli-wrappers/features-audit.d.mts +0 -2
- package/dist/cli/cli-wrappers/features-audit.d.mts.map +0 -1
- package/dist/cli/cli-wrappers/features-audit.mjs +0 -8
- package/dist/cli/cli-wrappers/features-audit.mjs.map +0 -1
- package/dist/cli/commands/features-audit.d.mts.map +0 -1
- package/dist/cli/commands/features-audit.mjs +0 -293
- package/dist/cli/commands/features-audit.mjs.map +0 -1
- package/dist/cli/features/registry-audit.d.mts +0 -56
- package/dist/cli/features/registry-audit.d.mts.map +0 -1
- package/dist/cli/features/registry-audit.mjs +0 -264
- package/dist/cli/features/registry-audit.mjs.map +0 -1
- package/dist/cli/roadmap/conductor-view.d.mts.map +0 -1
- package/dist/cli/roadmap/conductor-view.mjs.map +0 -1
- package/src/cli/cli-wrappers/features-audit.mjs +0 -8
- package/src/cli/commands/features-audit.mjs +0 -302
- package/src/cli/features/registry-audit.mjs +0 -254
- package/src/cli/roadmap/conductor-view.d.ts +0 -10
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/** The exact repair command surfaced in every coverage failure. */
|
|
2
|
+
export function draftRepairCommand(taskId: any): string;
|
|
3
|
+
/**
|
|
4
|
+
* Resolve the diff base COMMIT. An explicit ref is normalized through
|
|
5
|
+
* `git merge-base HEAD <ref>` — NOT used verbatim — for two reasons:
|
|
6
|
+
* (1) the ship gate / apt-ship pass a base BRANCH (`base_branch: 'main'`);
|
|
7
|
+
* once main advances past the fork point, `git diff main..HEAD`
|
|
8
|
+
* compares SNAPSHOTS and reports main-side changes reversed (phantom
|
|
9
|
+
* modifications/deletions the task never made) → false-red coverage
|
|
10
|
+
* findings on every stale branch. merge-base pins the fork point.
|
|
11
|
+
* (2) a garbage/unresolvable ref previously flowed into diffNameStatus,
|
|
12
|
+
* whose catch returned [] — an EMPTY diff → clause (a) vacuously green
|
|
13
|
+
* (fail-open). merge-base fails → null → callers fail CLOSED.
|
|
14
|
+
* merge-base(HEAD, X) === X whenever X is already an ancestor of HEAD, so the
|
|
15
|
+
* CI workflow's precomputed merge-base and sha-based callers are byte-identical.
|
|
16
|
+
* No explicit ref → merge-base HEAD origin/main (local main fallback).
|
|
17
|
+
*/
|
|
18
|
+
export function resolveBase(root: any, baseFlag: any): string | null;
|
|
19
|
+
/** Parse `git diff --name-status -z base..HEAD` preserving rename pairs. */
|
|
20
|
+
export function diffNameStatus(root: any, base: any): ({
|
|
21
|
+
status: string;
|
|
22
|
+
from: string;
|
|
23
|
+
to: string;
|
|
24
|
+
path?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
status: string;
|
|
27
|
+
path: string;
|
|
28
|
+
from?: undefined;
|
|
29
|
+
to?: undefined;
|
|
30
|
+
})[];
|
|
31
|
+
/**
|
|
32
|
+
* Structural receipt validator (N1): clause (a) coverage and clause (c)
|
|
33
|
+
* integrity TRUST receipt contents, so a malformed receipt must be EXCLUDED
|
|
34
|
+
* from trust rather than silently consumed.
|
|
35
|
+
*/
|
|
36
|
+
export function validateReceiptShape(data: any): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Scaffold (or idempotently re-scaffold) a per-writer delta from
|
|
39
|
+
* `git diff --name-status <base>..HEAD`.
|
|
40
|
+
*
|
|
41
|
+
* - renames preserved (`change: "renamed"` + previous_path/previous_blob_sha)
|
|
42
|
+
* - deletions pre-filled `remove` with the BASE blob fingerprint
|
|
43
|
+
* - additions pre-filled `upsert` + a minimal upsert operation
|
|
44
|
+
* - modifications marked `needs-disposition` (draft-only sentinel)
|
|
45
|
+
* - re-runs refresh fingerprints but PRESERVE agent-authored dispositions,
|
|
46
|
+
* areas, reasons, and all operations[].
|
|
47
|
+
*
|
|
48
|
+
* @param {{root: string, base?: string, taskId?: string, subtaskId?: string, dryRun?: boolean}} opts
|
|
49
|
+
* @returns {{ ok: boolean, deltaPath?: string, delta?: Record<string, any>, wrote?: boolean,
|
|
50
|
+
* qualifying?: number, base?: string, error?: string }}
|
|
51
|
+
*/
|
|
52
|
+
export function draftDelta({ root: rootIn, base: baseFlag, taskId, subtaskId, dryRun }: {
|
|
53
|
+
root: string;
|
|
54
|
+
base?: string;
|
|
55
|
+
taskId?: string;
|
|
56
|
+
subtaskId?: string;
|
|
57
|
+
dryRun?: boolean;
|
|
58
|
+
}): {
|
|
59
|
+
ok: boolean;
|
|
60
|
+
deltaPath?: string;
|
|
61
|
+
delta?: Record<string, any>;
|
|
62
|
+
wrote?: boolean;
|
|
63
|
+
qualifying?: number;
|
|
64
|
+
base?: string;
|
|
65
|
+
error?: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* materialize — the single ordered idempotent writer (ID-03 / AC5):
|
|
69
|
+
* (1) parse all deltas → (2) post-images in memory → (3) validate every
|
|
70
|
+
* post-image → (4) atomic tmp+rename area replace → (5) write receipt →
|
|
71
|
+
* (6) delete ONLY consumed deltas → (7) regenerate REGISTRY.md wholly from
|
|
72
|
+
* the JSONs.
|
|
73
|
+
*
|
|
74
|
+
* Crash-after-receipt recovery: a re-run detects deltas whose sha256 appears
|
|
75
|
+
* in an in-tree receipt's consumed_delta_hashes with matching area_hashes and
|
|
76
|
+
* completes the cleanup without rewriting.
|
|
77
|
+
*
|
|
78
|
+
* @returns envelope-ready object; never throws for expected failure classes.
|
|
79
|
+
*/
|
|
80
|
+
export function materialize({ root: rootIn, taskId, now }: {
|
|
81
|
+
root: any;
|
|
82
|
+
taskId: any;
|
|
83
|
+
now?: Date | undefined;
|
|
84
|
+
}): {
|
|
85
|
+
status: string;
|
|
86
|
+
reason: string;
|
|
87
|
+
policy: string;
|
|
88
|
+
kind?: undefined;
|
|
89
|
+
invalid?: undefined;
|
|
90
|
+
repair?: undefined;
|
|
91
|
+
materialized?: undefined;
|
|
92
|
+
receipt?: undefined;
|
|
93
|
+
consumed_deltas?: undefined;
|
|
94
|
+
cleaned_up?: undefined;
|
|
95
|
+
registry_regenerated?: undefined;
|
|
96
|
+
changed_paths?: undefined;
|
|
97
|
+
conflicts?: undefined;
|
|
98
|
+
areas?: undefined;
|
|
99
|
+
} | {
|
|
100
|
+
status: string;
|
|
101
|
+
kind: string;
|
|
102
|
+
invalid: {
|
|
103
|
+
path: any;
|
|
104
|
+
errors: string[];
|
|
105
|
+
}[];
|
|
106
|
+
repair: string;
|
|
107
|
+
reason?: undefined;
|
|
108
|
+
policy?: undefined;
|
|
109
|
+
materialized?: undefined;
|
|
110
|
+
receipt?: undefined;
|
|
111
|
+
consumed_deltas?: undefined;
|
|
112
|
+
cleaned_up?: undefined;
|
|
113
|
+
registry_regenerated?: undefined;
|
|
114
|
+
changed_paths?: undefined;
|
|
115
|
+
conflicts?: undefined;
|
|
116
|
+
areas?: undefined;
|
|
117
|
+
} | {
|
|
118
|
+
status: string;
|
|
119
|
+
materialized: number;
|
|
120
|
+
receipt: null;
|
|
121
|
+
consumed_deltas: never[];
|
|
122
|
+
cleaned_up: any[];
|
|
123
|
+
registry_regenerated: boolean;
|
|
124
|
+
changed_paths: any[];
|
|
125
|
+
reason?: undefined;
|
|
126
|
+
policy?: undefined;
|
|
127
|
+
kind?: undefined;
|
|
128
|
+
invalid?: undefined;
|
|
129
|
+
repair?: undefined;
|
|
130
|
+
conflicts?: undefined;
|
|
131
|
+
areas?: undefined;
|
|
132
|
+
} | {
|
|
133
|
+
status: string;
|
|
134
|
+
kind: string;
|
|
135
|
+
conflicts: {
|
|
136
|
+
kind: string;
|
|
137
|
+
message: string;
|
|
138
|
+
sources: any[];
|
|
139
|
+
}[];
|
|
140
|
+
repair: string;
|
|
141
|
+
reason?: undefined;
|
|
142
|
+
policy?: undefined;
|
|
143
|
+
invalid?: undefined;
|
|
144
|
+
materialized?: undefined;
|
|
145
|
+
receipt?: undefined;
|
|
146
|
+
consumed_deltas?: undefined;
|
|
147
|
+
cleaned_up?: undefined;
|
|
148
|
+
registry_regenerated?: undefined;
|
|
149
|
+
changed_paths?: undefined;
|
|
150
|
+
areas?: undefined;
|
|
151
|
+
} | {
|
|
152
|
+
status: string;
|
|
153
|
+
kind: string;
|
|
154
|
+
invalid: {
|
|
155
|
+
area: any;
|
|
156
|
+
errors: string[];
|
|
157
|
+
}[];
|
|
158
|
+
reason?: undefined;
|
|
159
|
+
policy?: undefined;
|
|
160
|
+
repair?: undefined;
|
|
161
|
+
materialized?: undefined;
|
|
162
|
+
receipt?: undefined;
|
|
163
|
+
consumed_deltas?: undefined;
|
|
164
|
+
cleaned_up?: undefined;
|
|
165
|
+
registry_regenerated?: undefined;
|
|
166
|
+
changed_paths?: undefined;
|
|
167
|
+
conflicts?: undefined;
|
|
168
|
+
areas?: undefined;
|
|
169
|
+
} | {
|
|
170
|
+
status: string;
|
|
171
|
+
materialized: number;
|
|
172
|
+
areas: any[];
|
|
173
|
+
receipt: any;
|
|
174
|
+
consumed_deltas: any[];
|
|
175
|
+
cleaned_up: any[];
|
|
176
|
+
registry_regenerated: boolean;
|
|
177
|
+
changed_paths: any[];
|
|
178
|
+
reason?: undefined;
|
|
179
|
+
policy?: undefined;
|
|
180
|
+
kind?: undefined;
|
|
181
|
+
invalid?: undefined;
|
|
182
|
+
repair?: undefined;
|
|
183
|
+
conflicts?: undefined;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Regenerate REGISTRY.md WHOLLY from the area JSONs (never patched in place).
|
|
187
|
+
* Non-conforming files are listed loudly — never silently skipped.
|
|
188
|
+
*
|
|
189
|
+
* @returns {{ path: string, changed: boolean }} — `changed:false` when the
|
|
190
|
+
* regeneration was content-identical (timestamp line ignored) and the
|
|
191
|
+
* existing file was kept byte-for-byte (N2).
|
|
192
|
+
*/
|
|
193
|
+
export function regenerateRegistryMd(root: any, now?: Date): {
|
|
194
|
+
path: string;
|
|
195
|
+
changed: boolean;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* checkReconciled — four read-only clauses (AC7/AC8). Judges ONLY base..HEAD
|
|
199
|
+
* deltas — never absolute registry completeness. Trust = in-tree presence +
|
|
200
|
+
* blob-fingerprint matching (squash-safe; NO git ancestry calls anywhere).
|
|
201
|
+
*
|
|
202
|
+
* @returns {Record<string, any>} envelope-ready result: status ('ok'|'fail'|
|
|
203
|
+
* 'warn'|'skip'), findings[], coverage_ok, schema_valid, integrity_ok,
|
|
204
|
+
* orphans_ok, base, qualifying_files, pending_deltas, receipts.
|
|
205
|
+
*/
|
|
206
|
+
export function checkReconciled({ root: rootIn, base: baseFlag, warnOnly, taskId }: {
|
|
207
|
+
root: any;
|
|
208
|
+
base: any;
|
|
209
|
+
warnOnly?: boolean | undefined;
|
|
210
|
+
taskId: any;
|
|
211
|
+
}): Record<string, any>;
|
|
212
|
+
/**
|
|
213
|
+
* gcReceipts — prune ONLY receipts that (1) exist on origin/main AND (2) are
|
|
214
|
+
* older than maxAgeDays by created_at. A fetch failure degrades to a warned
|
|
215
|
+
* NO-OP — never a deletion.
|
|
216
|
+
*/
|
|
217
|
+
export function gcReceipts({ root: rootIn, maxAgeDays, now }: {
|
|
218
|
+
root: any;
|
|
219
|
+
maxAgeDays?: number | undefined;
|
|
220
|
+
now?: Date | undefined;
|
|
221
|
+
}): {
|
|
222
|
+
status: string;
|
|
223
|
+
pruned: never[];
|
|
224
|
+
kept: number;
|
|
225
|
+
warning: string;
|
|
226
|
+
} | {
|
|
227
|
+
status: string;
|
|
228
|
+
pruned: any[];
|
|
229
|
+
kept: number;
|
|
230
|
+
warning?: undefined;
|
|
231
|
+
};
|
|
232
|
+
export const FEATURES_DIR: ".aperant/features";
|
|
233
|
+
export const DELTAS_DIR: ".aperant/features/deltas";
|
|
234
|
+
export const RECEIPTS_DIR: ".aperant/features/receipts";
|
|
235
|
+
export const MATERIALIZER_VERSION: 1;
|
|
236
|
+
//# sourceMappingURL=reconcile.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile.d.mts","sourceRoot":"","sources":["../../../src/cli/features/reconcile.mjs"],"names":[],"mappings":"AAmDA,mEAAmE;AACnE,wDAEC;AAoDD;;;;;;;;;;;;;;GAcG;AACH,qEASC;AAOD,4EAA4E;AAC5E;;;;;;;;;;KAwBC;AAqCD;;;;GAIG;AACH,yDA8BC;AAsDD;;;;;;;;;;;;;;GAcG;AACH,wFAJW;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAC,GAClF;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAkKlE;AAyHD;;;;;;;;;;;;GAYG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqMC;AAqBD;;;;;;;GAOG;AACH,6DAJa;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAiF9C;AAMD;;;;;;;;GAQG;AACH;;;;;IAJa,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CA4M/B;AAMD;;;;GAIG;AACH;;;;;;;;;;;;;;EA0CC;AAlmCD,2BAA4B,mBAAmB,CAAA;AAC/C,oDAAkD;AAClD,wDAAsD;AACtD,mCAAoC,CAAC,CAAA"}
|