agentera 3.0.0-dev.38 → 3.0.0-dev.39
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/bundle/CHANGELOG.md +29 -4
- package/bundle/references/artifacts/state-storage-authority.yaml +118 -77
- package/bundle/references/cli/agent-ready-state-contract.yaml +84 -2
- package/bundle/skills/agentera/SKILL.md +26 -26
- package/bundle/skills/agentera/capabilities/build/schemas/exit.yaml +5 -4
- package/bundle/skills/agentera/capabilities/build/schemas/validation.yaml +17 -3
- package/bundle/skills/agentera/schemas/artifacts/plan.yaml +14 -3
- package/dist/capabilities/build/instructions.js +27 -2
- package/dist/capabilities/build/instructions.js.map +1 -1
- package/dist/capabilities/orchestrate/instructions.js +1 -1
- package/dist/cli/capabilityContext/bespoke.js +4 -3
- package/dist/cli/capabilityContext/bespoke.js.map +1 -1
- package/dist/cli/capabilityContext/build.js +77 -24
- package/dist/cli/capabilityContext/build.js.map +1 -1
- package/dist/cli/capabilityContext/closeout.js +2 -2
- package/dist/cli/capabilityContext/closeout.js.map +1 -1
- package/dist/cli/capabilityContext/evidence.js +2 -6
- package/dist/cli/capabilityContext/evidence.js.map +1 -1
- package/dist/cli/capabilityContext/planState.js +59 -78
- package/dist/cli/capabilityContext/planState.js.map +1 -1
- package/dist/cli/capabilityContext/projectVerification.js +410 -0
- package/dist/cli/capabilityContext/projectVerification.js.map +1 -0
- package/dist/cli/capabilityContext/startup.js +2 -2
- package/dist/cli/capabilityContext/startup.js.map +1 -1
- package/dist/cli/commands/prime/buildExecutionRequest.js +165 -0
- package/dist/cli/commands/prime/buildExecutionRequest.js.map +1 -0
- package/dist/cli/commands/prime/collectEntityOrientation.js +2 -1
- package/dist/cli/commands/prime/collectEntityOrientation.js.map +1 -1
- package/dist/cli/commands/prime/collectOrientationState.js +3 -1
- package/dist/cli/commands/prime/collectOrientationState.js.map +1 -1
- package/dist/cli/commands/prime.js +37 -2
- package/dist/cli/commands/prime.js.map +1 -1
- package/dist/cli/commands/query.js +4 -0
- package/dist/cli/commands/query.js.map +1 -1
- package/dist/cli/dispatch/prime.js +22 -1
- package/dist/cli/dispatch/prime.js.map +1 -1
- package/dist/cli/dispatch/shared.js +1 -1
- package/dist/cli/dispatch/shared.js.map +1 -1
- package/dist/cli/help.js +2 -1
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/orientation.js +2 -2
- package/dist/cli/orientation.js.map +1 -1
- package/dist/registries/glossaryCaveatContract.js +3 -1
- package/dist/registries/glossaryCaveatContract.js.map +1 -1
- package/dist/state/changelog.js +222 -0
- package/dist/state/changelog.js.map +1 -0
- package/dist/state/decisionEntities.js +16 -9
- package/dist/state/decisionEntities.js.map +1 -1
- package/dist/state/decisionMigrationProvenance.js +84 -1
- package/dist/state/decisionMigrationProvenance.js.map +1 -1
- package/dist/state/decisionOverlay.js +9 -32
- package/dist/state/decisionOverlay.js.map +1 -1
- package/dist/state/decisionRevision.js +69 -444
- package/dist/state/decisionRevision.js.map +1 -1
- package/dist/state/decisionRevisionMigration.js +90 -0
- package/dist/state/decisionRevisionMigration.js.map +1 -0
- package/dist/state/directRetrieval.js +3 -52
- package/dist/state/directRetrieval.js.map +1 -1
- package/dist/state/entityCutover.js +6 -6
- package/dist/state/entityCutover.js.map +1 -1
- package/dist/state/entityGlossaryAuthority.js +14 -0
- package/dist/state/entityGlossaryAuthority.js.map +1 -0
- package/dist/state/entityMigrationIdentity.js +6 -0
- package/dist/state/entityMigrationIdentity.js.map +1 -0
- package/dist/state/entityMigrationPreview.js +14 -23
- package/dist/state/entityMigrationPreview.js.map +1 -1
- package/dist/state/entityStorage.js +20 -19
- package/dist/state/entityStorage.js.map +1 -1
- package/dist/state/healthEntities.js +2 -4
- package/dist/state/healthEntities.js.map +1 -1
- package/dist/state/listRetrieval.js +7 -38
- package/dist/state/listRetrieval.js.map +1 -1
- package/dist/state/migrationSourceBinding.js +1 -1
- package/dist/state/migrationSourceBinding.js.map +1 -1
- package/dist/state/objectiveExperimentEntities.js +3 -3
- package/dist/state/objectiveExperimentEntities.js.map +1 -1
- package/dist/state/planEntities.js +40 -7
- package/dist/state/planEntities.js.map +1 -1
- package/dist/state/progressEntities.js +2 -4
- package/dist/state/progressEntities.js.map +1 -1
- package/dist/state/safeProjectFile.js +4 -1
- package/dist/state/safeProjectFile.js.map +1 -1
- package/dist/state/startupProjection.js +2 -70
- package/dist/state/startupProjection.js.map +1 -1
- package/dist/state/stateStorageAuthority.js +48 -0
- package/dist/state/stateStorageAuthority.js.map +1 -0
- package/dist/state/summarySourceRowAuthority.js +1 -1
- package/dist/state/summarySourceRowAuthority.js.map +1 -1
- package/dist/state/todoDocsEntities.js +2 -3
- package/dist/state/todoDocsEntities.js.map +1 -1
- package/dist/state/write/explain.js +38 -59
- package/dist/state/write/explain.js.map +1 -1
- package/dist/state/write/operations.js +2 -26
- package/dist/state/write/operations.js.map +1 -1
- package/dist/state/write/transaction.js +3 -3
- package/dist/state/write/transaction.js.map +1 -1
- package/dist/upgrade/upgradeOrchestrator.js +15 -10
- package/dist/upgrade/upgradeOrchestrator.js.map +1 -1
- package/package.json +2 -2
- package/dist/state/decisionRevisionPublication.js +0 -532
- package/dist/state/decisionRevisionPublication.js.map +0 -1
|
@@ -1,532 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Task 3: publish record-local amendments with recovery.
|
|
3
|
-
*
|
|
4
|
-
* The amendment publishes ONLY the revision document
|
|
5
|
-
* (`.agentera/revisions/decisions.yaml`), by replacing one stable-ID entry's
|
|
6
|
-
* bytes in place (record-local replacement) and leaving every other entry's
|
|
7
|
-
* bytes, comments, quoting, block scalars, and provenance untouched. The
|
|
8
|
-
* decisions projection (`.agentera/decisions.yaml`) is never rewritten by an
|
|
9
|
-
* amendment: reads already compose base→revisions→overlay (Task 2), so the
|
|
10
|
-
* immutable base record stays byte-stable and the composed read stays the
|
|
11
|
-
* single source of effective detail — the projection representation "agrees"
|
|
12
|
-
* via composition rather than via a redundant rewrite.
|
|
13
|
-
*
|
|
14
|
-
* A safe target-only change is proven before any side effect: the override
|
|
15
|
-
* bytes are spliced into a candidate, the candidate is re-parsed, every other
|
|
16
|
-
* stable ID's canonical value must be unchanged, and the target's value must
|
|
17
|
-
* equal the appended revision list. When the document cannot be safely
|
|
18
|
-
* byte-isolated (malformed, ambiguous boundaries, non-mapping root), apply
|
|
19
|
-
* refuses without side effects rather than reserialize the whole document.
|
|
20
|
-
*
|
|
21
|
-
* Split out of `decisionRevision.ts` so each module stays under the monolith
|
|
22
|
-
* lint gate. The publication primitives (build, find, project, publish) are
|
|
23
|
-
* exported from here; `decisionRevision.ts` re-exports them for callers that
|
|
24
|
-
* still import from the historical entry point.
|
|
25
|
-
*/
|
|
26
|
-
import fs from "node:fs";
|
|
27
|
-
import { parseDocument } from "yaml";
|
|
28
|
-
import { dumpYamlMapping, loadYamlMapping } from "../core/yaml.js";
|
|
29
|
-
import { resolveSourceRoot } from "../core/sourceRoot.js";
|
|
30
|
-
import { canonicalRecordJson } from "./archiveDiscovery.js";
|
|
31
|
-
import { decisionRevisionContract, decisionRevisionPath, decisionRevisionViolations, legacyFullProjectionFor, loadDecisionRevision, prepareDecisionAmendment, sha256, } from "./decisionRevision.js";
|
|
32
|
-
import { localDate } from "./write/assign.js";
|
|
33
|
-
import { reject } from "./write/errors.js";
|
|
34
|
-
import { withStateMutation, } from "./write/mutation.js";
|
|
35
|
-
import { decisionLegacyCoexistence, legacyConfidenceCaveat, } from "./decisionLegacyValidation.js";
|
|
36
|
-
const AMEND_RECOVERY_SYNTAX = "agentera state decisions amend --number N [--question ... --choice ... --reasoning ... --confidence firm ...] [--dry-run] --format json";
|
|
37
|
-
const AMEND_RECOVERY_EXAMPLE = 'agentera state decisions amend --number 53 --choice "..." --reasoning "..." --confidence firm --dry-run --format json';
|
|
38
|
-
/**
|
|
39
|
-
* Build the revision record an amendment publishes. It carries only the
|
|
40
|
-
* authority-declared amendable content paths the caller requested, plus
|
|
41
|
-
* revision provenance (`date`, `provenance`, `base_sha256`). Identity and
|
|
42
|
-
* temporal paths are never amended; the base hash ties the revision to the
|
|
43
|
-
* immutable base it was composed against. `degraded_projection` provenance is
|
|
44
|
-
* preserved when the base was bootstrapped from a complete legacy projection
|
|
45
|
-
* record (never promoted to historical_archive).
|
|
46
|
-
*/
|
|
47
|
-
export function buildPublishedRevisionRecord(preparation, options = {}) {
|
|
48
|
-
const record = {
|
|
49
|
-
date: options.date ?? localDate(),
|
|
50
|
-
provenance: preparation.base.provenance === "degraded_projection" ? "degraded_projection" : "historical_revision",
|
|
51
|
-
base_sha256: preparation.base.sha256,
|
|
52
|
-
};
|
|
53
|
-
for (const field of preparation.provenance.amended_fields) {
|
|
54
|
-
record[field] = structuredClone(preparation.requested[field]);
|
|
55
|
-
}
|
|
56
|
-
return { record, identity: sha256(record) };
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Find an identical revision already published for a stable ID. Identity is the
|
|
60
|
-
* canonical content of the full revision record (amendable fields + meta);
|
|
61
|
-
* byte-stable per the authority immutability rule, so an identical re-submission
|
|
62
|
-
* resolves as an idempotent replay.
|
|
63
|
-
*/
|
|
64
|
-
export function findPublishedRevision(revisions, identity) {
|
|
65
|
-
for (let index = 0; index < revisions.length; index += 1) {
|
|
66
|
-
if (sha256(revisions[index]) === identity) {
|
|
67
|
-
return { index, revision: revisions[index] };
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* A revision sharing the publication slot (same `date` + `base_sha256`) but
|
|
74
|
-
* carrying different amendable content is a duplicate-revision conflict: the
|
|
75
|
-
* ordering between them is ambiguous and neither may silently win.
|
|
76
|
-
*/
|
|
77
|
-
export function findConflictingRevision(revisions, candidate) {
|
|
78
|
-
for (let index = 0; index < revisions.length; index += 1) {
|
|
79
|
-
const existing = revisions[index];
|
|
80
|
-
if (sha256(existing) === sha256(candidate))
|
|
81
|
-
continue; // identical -> replay
|
|
82
|
-
if (typeof existing.date === "string" &&
|
|
83
|
-
typeof candidate.date === "string" &&
|
|
84
|
-
existing.date === candidate.date &&
|
|
85
|
-
existing.base_sha256 === candidate.base_sha256) {
|
|
86
|
-
return { index, revision: existing };
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
/** Coerce a CST list item into a plain revision record (its JSON value). */
|
|
92
|
-
function toRevisionRecord(node) {
|
|
93
|
-
if (!node)
|
|
94
|
-
return {};
|
|
95
|
-
if (typeof node.toJSON === "function") {
|
|
96
|
-
return node.toJSON();
|
|
97
|
-
}
|
|
98
|
-
return structuredClone(node);
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Project the new revision-list bytes for one stable ID by splicing the
|
|
102
|
-
* target entry into the existing document bytes, preserving every other
|
|
103
|
-
* entry byte-for-byte. The returned `bytes` are validated by an unchanged-byte
|
|
104
|
-
* proof (re-parse + canonical comparison of every other stable ID) before the
|
|
105
|
-
* caller stages them.
|
|
106
|
-
*
|
|
107
|
-
* When the existing document is absent the override becomes the whole
|
|
108
|
-
* document. When the target ID is absent the override entry is appended. When
|
|
109
|
-
* the target ID is present its key+value byte range is replaced wholesale with
|
|
110
|
-
* a freshly-serialized entry. Any failure to safely isolate the byte boundary
|
|
111
|
-
* (malformed document, non-mapping root, ambiguous identity) returns
|
|
112
|
-
* `{ safe: false }` so the caller refuses without side effects.
|
|
113
|
-
*/
|
|
114
|
-
export function projectRevisionOverride(documentBytes, stableId, nextRevisions, contract = decisionRevisionContract(resolveSourceRoot())) {
|
|
115
|
-
const entryBytes = dumpYamlMapping({ [stableId]: nextRevisions });
|
|
116
|
-
if (documentBytes.length === 0) {
|
|
117
|
-
return {
|
|
118
|
-
safe: true,
|
|
119
|
-
bytes: entryBytes,
|
|
120
|
-
existing: false,
|
|
121
|
-
before: [],
|
|
122
|
-
after: structuredClone(nextRevisions),
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
let parsedDoc;
|
|
126
|
-
try {
|
|
127
|
-
parsedDoc = parseDocument(documentBytes);
|
|
128
|
-
}
|
|
129
|
-
catch (error) {
|
|
130
|
-
return { safe: false, reason: `cannot parse decision revision document: ${error.message}` };
|
|
131
|
-
}
|
|
132
|
-
const root = parsedDoc.contents;
|
|
133
|
-
if (!root || !Array.isArray(root.items)) {
|
|
134
|
-
return { safe: false, reason: "decision revision document root must be a mapping keyed by stable decision ID" };
|
|
135
|
-
}
|
|
136
|
-
let before = [];
|
|
137
|
-
let spliceStart;
|
|
138
|
-
let spliceEnd;
|
|
139
|
-
let existing = false;
|
|
140
|
-
const items = root.items;
|
|
141
|
-
const target = items.find((pair) => pair.key && pair.key.value === stableId);
|
|
142
|
-
if (target) {
|
|
143
|
-
existing = true;
|
|
144
|
-
const keyRange = target.key?.range;
|
|
145
|
-
const valueRange = target.value?.range;
|
|
146
|
-
if (!keyRange || !valueRange) {
|
|
147
|
-
return { safe: false, reason: `decision revision entry '${stableId}' has no isolatable byte range` };
|
|
148
|
-
}
|
|
149
|
-
spliceStart = keyRange[0];
|
|
150
|
-
spliceEnd = valueRange[1];
|
|
151
|
-
const valueNode = target.value;
|
|
152
|
-
if (!valueNode || !Array.isArray(valueNode.items)) {
|
|
153
|
-
return { safe: false, reason: `decision revision entry '${stableId}' must be an ordered list` };
|
|
154
|
-
}
|
|
155
|
-
before = valueNode.items.map((item) => structuredClone(toRevisionRecord(item)));
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
// Append the new entry after the last byte of the document.
|
|
159
|
-
spliceStart = documentBytes.length;
|
|
160
|
-
spliceEnd = documentBytes.length;
|
|
161
|
-
const needsNewline = documentBytes.length > 0 && !documentBytes.endsWith("\n");
|
|
162
|
-
const candidate = `${needsNewline ? "\n" : ""}${entryBytes}`;
|
|
163
|
-
return {
|
|
164
|
-
safe: true,
|
|
165
|
-
bytes: documentBytes.slice(0, spliceStart) + candidate,
|
|
166
|
-
existing: false,
|
|
167
|
-
before: [],
|
|
168
|
-
after: structuredClone(nextRevisions),
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
const candidate = documentBytes.slice(0, spliceStart) + entryBytes + documentBytes.slice(spliceEnd);
|
|
172
|
-
// Unchanged-byte proof: re-parse the candidate and verify every other stable
|
|
173
|
-
// ID's canonical value is identical to the original document's.
|
|
174
|
-
let candidateMapping;
|
|
175
|
-
try {
|
|
176
|
-
candidateMapping = loadYamlMapping(candidate);
|
|
177
|
-
}
|
|
178
|
-
catch (error) {
|
|
179
|
-
return { safe: false, reason: `record-local splice produced an unparseable document: ${error.message}` };
|
|
180
|
-
}
|
|
181
|
-
const originalMapping = loadYamlMapping(documentBytes);
|
|
182
|
-
for (const [id, value] of Object.entries(originalMapping)) {
|
|
183
|
-
if (id === stableId)
|
|
184
|
-
continue;
|
|
185
|
-
const candidateValue = candidateMapping[id];
|
|
186
|
-
if (canonicalRecordJson(candidateValue) !== canonicalRecordJson(value)) {
|
|
187
|
-
return {
|
|
188
|
-
safe: false,
|
|
189
|
-
reason: `record-local splice would alter unrelated revision entry '${id}'; refusing without side effects`,
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
const violations = decisionRevisionViolations(candidateMapping, contract);
|
|
194
|
-
if (violations.length > 0) {
|
|
195
|
-
return { safe: false, reason: `record-local splice produced an invalid revision document: ${violations.join("; ")}` };
|
|
196
|
-
}
|
|
197
|
-
const targetValue = candidateMapping[stableId];
|
|
198
|
-
if (!Array.isArray(targetValue) || canonicalRecordJson(targetValue) !== canonicalRecordJson(nextRevisions)) {
|
|
199
|
-
return { safe: false, reason: `record-local splice did not place the appended revision under '${stableId}'` };
|
|
200
|
-
}
|
|
201
|
-
return {
|
|
202
|
-
safe: true,
|
|
203
|
-
bytes: candidate,
|
|
204
|
-
existing,
|
|
205
|
-
before: before,
|
|
206
|
-
after: structuredClone(nextRevisions),
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
function readRevisionDocumentBytes(revisionPath) {
|
|
210
|
-
if (!fs.existsSync(revisionPath))
|
|
211
|
-
return "";
|
|
212
|
-
return fs.readFileSync(revisionPath, "utf8");
|
|
213
|
-
}
|
|
214
|
-
function diffRevisionDocuments(before, after, label) {
|
|
215
|
-
if (before === after)
|
|
216
|
-
return "";
|
|
217
|
-
const beforeLines = before.length === 0 ? [] : before.split(/\n/);
|
|
218
|
-
const afterLines = after.split(/\n/);
|
|
219
|
-
const lines = [`--- ${label} (before)`, `+++ ${label} (after)`];
|
|
220
|
-
let i = 0;
|
|
221
|
-
let j = 0;
|
|
222
|
-
while (i < beforeLines.length || j < afterLines.length) {
|
|
223
|
-
if (i < beforeLines.length && j < afterLines.length && beforeLines[i] === afterLines[j]) {
|
|
224
|
-
lines.push(` ${beforeLines[i]}`);
|
|
225
|
-
i += 1;
|
|
226
|
-
j += 1;
|
|
227
|
-
}
|
|
228
|
-
else if (j < afterLines.length) {
|
|
229
|
-
lines.push(`+${afterLines[j]}`);
|
|
230
|
-
j += 1;
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
lines.push(`-${beforeLines[i]}`);
|
|
234
|
-
i += 1;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
return lines.join("\n");
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Publish a record-local decision amendment with recovery. Re-prepares the
|
|
241
|
-
* target inside the writer lock so a retry re-derives the same canonical
|
|
242
|
-
* revision identity; an identical re-submission is an idempotent replay that
|
|
243
|
-
* touches no file. Staging, revision publication, directory synchronization,
|
|
244
|
-
* and projection-consistency are distinct failure boundaries: an interruption
|
|
245
|
-
* at any boundary converges on retry without duplicates or mixed state.
|
|
246
|
-
*
|
|
247
|
-
* `transaction` is required for a real apply; omit it (or pass `dryRun`) for a
|
|
248
|
-
* side-effect-free projection of the revision, effective record, and
|
|
249
|
-
* projection effect. Calling with `dryRun: false` and no `transaction` is a
|
|
250
|
-
* caller error and refuses before any side effect.
|
|
251
|
-
*/
|
|
252
|
-
export function publishDecisionAmendment(projectRoot, preparation, options) {
|
|
253
|
-
const sourceRoot = options.sourceRoot ?? resolveSourceRoot();
|
|
254
|
-
const contract = decisionRevisionContract(sourceRoot);
|
|
255
|
-
const { record: revision, identity } = buildPublishedRevisionRecord(preparation, { date: options.date });
|
|
256
|
-
const stableId = `${contract.identityPrefix}:${preparation.number}`;
|
|
257
|
-
const revisionPath = decisionRevisionPath(projectRoot, sourceRoot);
|
|
258
|
-
const existingBytes = readRevisionDocumentBytes(revisionPath);
|
|
259
|
-
let existingDocument = {};
|
|
260
|
-
if (existingBytes.length > 0) {
|
|
261
|
-
try {
|
|
262
|
-
existingDocument = loadDecisionRevision(projectRoot, sourceRoot);
|
|
263
|
-
}
|
|
264
|
-
catch (error) {
|
|
265
|
-
reject({
|
|
266
|
-
class: "conflict",
|
|
267
|
-
message: `decision ${preparation.number} amendment cannot proceed: the revision document is broken: ${error.message}`,
|
|
268
|
-
syntax: AMEND_RECOVERY_SYNTAX,
|
|
269
|
-
example: AMEND_RECOVERY_EXAMPLE,
|
|
270
|
-
recovery: "Preserve the revision document for diagnostics, repair its YAML and amendable content paths, then retry the amend.",
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
const existingRevisions = existingDocument[stableId] ?? [];
|
|
275
|
-
// Idempotent replay: the exact revision is already published.
|
|
276
|
-
const replayMatch = findPublishedRevision(existingRevisions, identity);
|
|
277
|
-
if (replayMatch) {
|
|
278
|
-
return {
|
|
279
|
-
number: preparation.number,
|
|
280
|
-
revision,
|
|
281
|
-
revision_identity: identity,
|
|
282
|
-
revision_path: revisionPath,
|
|
283
|
-
effective: structuredClone(preparation.effective),
|
|
284
|
-
replay: true,
|
|
285
|
-
published: false,
|
|
286
|
-
projection_effect: projectionEffectFor(preparation, projectRoot, sourceRoot, existingBytes.length === 0 ? revisionPath : revisionPath),
|
|
287
|
-
provenance: preparation.provenance,
|
|
288
|
-
dry_run: options.dryRun,
|
|
289
|
-
...(options.dryRun
|
|
290
|
-
? {
|
|
291
|
-
diff: "",
|
|
292
|
-
before: structuredClone(existingDocument),
|
|
293
|
-
after: structuredClone(existingDocument),
|
|
294
|
-
}
|
|
295
|
-
: {}),
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
// Duplicate-revision conflict: same slot (date + base_sha256), different content.
|
|
299
|
-
const conflict = findConflictingRevision(existingRevisions, revision);
|
|
300
|
-
if (conflict) {
|
|
301
|
-
reject({
|
|
302
|
-
class: "conflict",
|
|
303
|
-
message: `decision ${preparation.number} already has a revision for ${revision.date} against the same base with different content; the ordering between them is ambiguous`,
|
|
304
|
-
syntax: AMEND_RECOVERY_SYNTAX,
|
|
305
|
-
example: AMEND_RECOVERY_EXAMPLE,
|
|
306
|
-
recovery: `Preserve the published revisions, reconcile which amendment for ${revision.date} is authoritative, then retry with a distinct date or after removing the conflicting revision; no files were changed.`,
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
const nextRevisions = [...existingRevisions, structuredClone(revision)];
|
|
310
|
-
const projection = projectRevisionOverride(existingBytes, stableId, nextRevisions, contract);
|
|
311
|
-
if (!projection.safe) {
|
|
312
|
-
reject({
|
|
313
|
-
class: "conflict",
|
|
314
|
-
message: `decision ${preparation.number} amendment cannot be applied with a safe record-local byte boundary: ${projection.reason}`,
|
|
315
|
-
syntax: AMEND_RECOVERY_SYNTAX,
|
|
316
|
-
example: AMEND_RECOVERY_EXAMPLE,
|
|
317
|
-
recovery: "Preserve the revision document for diagnostics, repair its structure (mapping of stable ID → ordered revision list), then retry; no unrelated bytes are reserialized and no files were changed.",
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
if (options.dryRun) {
|
|
321
|
-
return {
|
|
322
|
-
number: preparation.number,
|
|
323
|
-
revision,
|
|
324
|
-
revision_identity: identity,
|
|
325
|
-
revision_path: revisionPath,
|
|
326
|
-
effective: structuredClone(preparation.effective),
|
|
327
|
-
replay: false,
|
|
328
|
-
published: false,
|
|
329
|
-
projection_effect: projectionEffectFor(preparation, projectRoot, sourceRoot, revisionPath),
|
|
330
|
-
provenance: preparation.provenance,
|
|
331
|
-
dry_run: true,
|
|
332
|
-
diff: diffRevisionDocuments(existingBytes, projection.bytes, revisionPath),
|
|
333
|
-
before: structuredClone(existingDocument),
|
|
334
|
-
after: structuredClone(loadYamlMapping(projection.bytes)),
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
if (!options.transaction) {
|
|
338
|
-
reject({
|
|
339
|
-
class: "invalid_request",
|
|
340
|
-
message: `decision ${preparation.number} amend apply requires a state mutation transaction; a dry-run does not require one`,
|
|
341
|
-
syntax: AMEND_RECOVERY_SYNTAX,
|
|
342
|
-
example: AMEND_RECOVERY_EXAMPLE,
|
|
343
|
-
recovery: "Pass a StateMutationTransaction (the state writer does this for an apply); use --dry-run for a side-effect-free projection.",
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
const transaction = options.transaction;
|
|
347
|
-
transaction.publishRevisionDocument(revisionPath, projection.bytes, existingBytes.length === 0 ? undefined : existingBytes);
|
|
348
|
-
// After the immutable revision evidence is durable, verify the decisions
|
|
349
|
-
// projection base still agrees with the base_sha256 recorded on the revision.
|
|
350
|
-
// A concurrent projection change or stale base hash is caught here; the
|
|
351
|
-
// published revision is truthful evidence, the decisions projection bytes are
|
|
352
|
-
// preserved, and the caller receives an actionable retry/repair action.
|
|
353
|
-
verifyProjectionConsistency(preparation, projectRoot, sourceRoot);
|
|
354
|
-
transaction.revisionConsistencyCheckpoint();
|
|
355
|
-
return {
|
|
356
|
-
number: preparation.number,
|
|
357
|
-
revision,
|
|
358
|
-
revision_identity: identity,
|
|
359
|
-
revision_path: revisionPath,
|
|
360
|
-
effective: structuredClone(preparation.effective),
|
|
361
|
-
replay: false,
|
|
362
|
-
published: true,
|
|
363
|
-
projection_effect: projectionEffectFor(preparation, projectRoot, sourceRoot, revisionPath),
|
|
364
|
-
provenance: preparation.provenance,
|
|
365
|
-
dry_run: false,
|
|
366
|
-
diff: diffRevisionDocuments(existingBytes, projection.bytes, revisionPath),
|
|
367
|
-
before: structuredClone(existingDocument),
|
|
368
|
-
after: structuredClone(loadYamlMapping(projection.bytes)),
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
function projectionEffectFor(preparation, projectRoot, sourceRoot, revisionPath) {
|
|
372
|
-
return {
|
|
373
|
-
path: preparation.provenance.current_projection.path,
|
|
374
|
-
representation: preparation.provenance.current_projection.representation,
|
|
375
|
-
rewritten: false,
|
|
376
|
-
reason: "amendment publishes immutable revision evidence; the decisions projection stays byte-stable and reads compose base→revisions→overlay",
|
|
377
|
-
base_sha256: preparation.base.sha256,
|
|
378
|
-
...(revisionPath ? {} : {}),
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
/**
|
|
382
|
-
* Re-read the decisions projection base for the amended decision and verify its
|
|
383
|
-
* canonical hash still matches the `base_sha256` recorded on the published
|
|
384
|
-
* revision. A mismatch means the projection drifted after preparation (a
|
|
385
|
-
* concurrent change or a stale base); the amendment refuses to claim success
|
|
386
|
-
* and surfaces an actionable retry/repair action while preserving all bytes.
|
|
387
|
-
*/
|
|
388
|
-
function verifyProjectionConsistency(preparation, projectRoot, sourceRoot) {
|
|
389
|
-
const number = preparation.number;
|
|
390
|
-
const projectionPath = preparation.provenance.current_projection.path;
|
|
391
|
-
if (preparation.base.source === "archive") {
|
|
392
|
-
// An immutable numbered archive base cannot drift within a writer lock.
|
|
393
|
-
return;
|
|
394
|
-
}
|
|
395
|
-
// degraded_projection base: re-read the legacy full projection record.
|
|
396
|
-
const projection = legacyFullProjectionFor(projectRoot, number, projectionPath, sourceRoot);
|
|
397
|
-
if (projection.kind !== "full") {
|
|
398
|
-
reject({
|
|
399
|
-
class: "conflict",
|
|
400
|
-
message: `decision ${number} projection changed before the amendment completed; the hash-verified base is no longer recoverable`,
|
|
401
|
-
syntax: AMEND_RECOVERY_SYNTAX,
|
|
402
|
-
example: AMEND_RECOVERY_EXAMPLE,
|
|
403
|
-
recovery: "Preserve the published revision and the projection bytes, reconcile the base drift, then retry the amend.",
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
const currentHash = sha256(projection.record);
|
|
407
|
-
if (currentHash !== preparation.base.sha256) {
|
|
408
|
-
reject({
|
|
409
|
-
class: "conflict",
|
|
410
|
-
message: `decision ${number} projection base changed before the amendment completed; the revision was published against a stale base hash`,
|
|
411
|
-
syntax: AMEND_RECOVERY_SYNTAX,
|
|
412
|
-
example: AMEND_RECOVERY_EXAMPLE,
|
|
413
|
-
recovery: "Preserve the published revision and the projection bytes, reconcile the base drift (the published revision carries the original base_sha256), then retry the amend.",
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
/* ===========================================================================
|
|
418
|
-
* Writer bridge: shape the typed state-writer request into the amendment
|
|
419
|
-
* publication call and report the result as a StateWriteEnvelope. The envelope
|
|
420
|
-
* carries the published revision, the composed effective record, the projection
|
|
421
|
-
* effect, and the revision identity (for stable idempotent-replay detection).
|
|
422
|
-
* ========================================================================= */
|
|
423
|
-
function mapping(value) {
|
|
424
|
-
return value && typeof value === "object" && !Array.isArray(value)
|
|
425
|
-
? value
|
|
426
|
-
: {};
|
|
427
|
-
}
|
|
428
|
-
function buildAmendmentRequested(values) {
|
|
429
|
-
const requested = {};
|
|
430
|
-
const alternatives = mapping(values.alternatives);
|
|
431
|
-
const rejected = Array.isArray(alternatives.rejected) ? alternatives.rejected : [];
|
|
432
|
-
const hasAlternatives = alternatives.chosen !== undefined || rejected.length > 0;
|
|
433
|
-
if (hasAlternatives) {
|
|
434
|
-
requested.alternatives = [
|
|
435
|
-
...(alternatives.chosen !== undefined
|
|
436
|
-
? [{ name: alternatives.chosen, status: "chosen" }]
|
|
437
|
-
: []),
|
|
438
|
-
...rejected.map((name) => ({ name, status: "rejected" })),
|
|
439
|
-
];
|
|
440
|
-
}
|
|
441
|
-
for (const field of ["question", "context", "choice", "reasoning", "confidence", "feeds_into"]) {
|
|
442
|
-
if (values[field] !== undefined)
|
|
443
|
-
requested[field] = values[field];
|
|
444
|
-
}
|
|
445
|
-
return requested;
|
|
446
|
-
}
|
|
447
|
-
/**
|
|
448
|
-
* Publish (or dry-run) a record-local decision-content amendment. Re-prepares
|
|
449
|
-
* the target inside the writer lock so a retry re-derives the same canonical
|
|
450
|
-
* revision identity; the state writer remains the sole authority over the
|
|
451
|
-
* revision document. Returns the published revision, effective record, and
|
|
452
|
-
* projection effect; the decisions projection bytes are never rewritten.
|
|
453
|
-
*/
|
|
454
|
-
function executeDecisionAmendment(req, transaction) {
|
|
455
|
-
const number = Number(req.values.number);
|
|
456
|
-
if (!Number.isSafeInteger(number) || number < 1) {
|
|
457
|
-
reject({
|
|
458
|
-
class: "invalid_request",
|
|
459
|
-
message: `decision amend requires a positive decision number; received ${req.values.number ?? ""}`,
|
|
460
|
-
syntax: "agentera state decisions amend --number N [--question ... --confidence firm ...] [--dry-run] --format json",
|
|
461
|
-
example: 'agentera state decisions amend --number 53 --choice "..." --reasoning "..." --confidence firm --dry-run --format json',
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
const requested = buildAmendmentRequested(req.values);
|
|
465
|
-
const preparation = prepareDecisionAmendment(req.projectRoot, number, requested, {
|
|
466
|
-
sourceRoot: resolveSourceRoot(),
|
|
467
|
-
});
|
|
468
|
-
const publication = publishDecisionAmendment(req.projectRoot, preparation, {
|
|
469
|
-
transaction,
|
|
470
|
-
dryRun: req.dryRun,
|
|
471
|
-
});
|
|
472
|
-
// Amendment never rewrites the projection, so an untouched inherited legacy
|
|
473
|
-
// confidence label on the base survives byte-stable in the composed read.
|
|
474
|
-
// Surface it as a truthful compatibility caveat when the amendment did not
|
|
475
|
-
// amend confidence. A confidence the caller amended is current vocabulary
|
|
476
|
-
// (enforced at preparation) and produces no caveat.
|
|
477
|
-
const confidenceTouched = preparation.provenance.amended_fields.includes("confidence");
|
|
478
|
-
const amendCaveat = legacyConfidenceCaveat(preparation.effective, decisionLegacyCoexistence(resolveSourceRoot()), confidenceTouched, preparation.provenance.base === "historical_archive" ? "archive" : "active");
|
|
479
|
-
const result = {
|
|
480
|
-
schemaVersion: "agentera.stateWrite.v1",
|
|
481
|
-
command: "state decisions amend",
|
|
482
|
-
status: "pass",
|
|
483
|
-
artifact: req.artifact,
|
|
484
|
-
path: publication.revision_path,
|
|
485
|
-
operation: {
|
|
486
|
-
verb: "amend",
|
|
487
|
-
dry_run: publication.dry_run,
|
|
488
|
-
idempotent_replay: publication.replay,
|
|
489
|
-
forced: req.force,
|
|
490
|
-
},
|
|
491
|
-
assigned: { number: publication.number },
|
|
492
|
-
written: {
|
|
493
|
-
...structuredClone(publication.revision),
|
|
494
|
-
revision_identity: publication.revision_identity,
|
|
495
|
-
},
|
|
496
|
-
state: {
|
|
497
|
-
revision_document: publication.revision_path,
|
|
498
|
-
revision_count: publication.after ? Object.keys(publication.after).length : 0,
|
|
499
|
-
},
|
|
500
|
-
validation: { status: "pass", violations: [] },
|
|
501
|
-
...(amendCaveat ? { compatibility: { legacy_caveats: [amendCaveat] } } : {}),
|
|
502
|
-
compaction: null,
|
|
503
|
-
amendment: {
|
|
504
|
-
number: publication.number,
|
|
505
|
-
revision: structuredClone(publication.revision),
|
|
506
|
-
revision_identity: publication.revision_identity,
|
|
507
|
-
effective: publication.effective,
|
|
508
|
-
published: publication.published,
|
|
509
|
-
provenance: publication.provenance,
|
|
510
|
-
projection_effect: publication.projection_effect,
|
|
511
|
-
},
|
|
512
|
-
};
|
|
513
|
-
if (publication.diff !== undefined) {
|
|
514
|
-
result.diff = publication.diff;
|
|
515
|
-
result.before = (publication.before ?? {});
|
|
516
|
-
result.after = (publication.after ?? {});
|
|
517
|
-
}
|
|
518
|
-
return result;
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* Dispatch an amend request through the typed state writer. Dry-run bypasses
|
|
522
|
-
* the writer lock; a real apply stages, publishes the immutable revision
|
|
523
|
-
* evidence, fsyncs the directory, and runs the projection-consistency
|
|
524
|
-
* checkpoint inside a single StateMutationTransaction. Each interruption
|
|
525
|
-
* boundary converges on retry with a stable revision identity.
|
|
526
|
-
*/
|
|
527
|
-
export function dispatchDecisionAmendment(req, options = {}) {
|
|
528
|
-
if (req.dryRun)
|
|
529
|
-
return executeDecisionAmendment(req);
|
|
530
|
-
return withStateMutation(req.projectRoot, (transaction) => executeDecisionAmendment(req, transaction), options);
|
|
531
|
-
}
|
|
532
|
-
//# sourceMappingURL=decisionRevisionPublication.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decisionRevisionPublication.js","sourceRoot":"","sources":["../../../../../home/jgabor/git/agentera/packages/cli/src/state/decisionRevisionPublication.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAGrC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,MAAM,GAOP,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EACL,iBAAiB,GAGlB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,qBAAqB,GACzB,yIAAyI,CAAC;AAC5I,MAAM,sBAAsB,GAC1B,uHAAuH,CAAC;AAS1H;;;;;;;;GAQG;AACH,MAAM,UAA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