agentera 3.0.0-dev.72 → 3.0.0-dev.74
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/README.md +111 -0
- package/bundle/.agentera-build-source.json +8 -0
- package/bundle/CHANGELOG.md +17 -17
- package/bundle/extract-corpus-parity.json +1 -1
- package/bundle/references/adapters/package-publication.json +49 -53
- package/bundle/references/adapters/package-registry.yaml +5 -1
- package/bundle/references/adapters/package-surface-characterization.md +6 -4
- package/bundle/references/analysis/evidence-tier-authority.yaml +45 -4
- package/bundle/references/analysis/personal-glossary-evaluation-authority.yaml +175 -0
- package/bundle/references/analysis/personal-glossary-evaluation-corpus.yaml +291 -0
- package/bundle/references/analysis/personal-glossary-holdout.yaml +192 -0
- package/bundle/references/artifacts/glossary-entry-contract.yaml +1533 -35
- package/bundle/references/cli/update-channels.yaml +2 -2
- package/bundle/references/cli/vocabulary.md +1 -1
- package/bundle/references/meta/retained-reference-authority.yaml +15 -0
- package/bundle/skills/agentera/capabilities/profile/schemas/artifacts.yaml +11 -7
- package/bundle/skills/agentera/capabilities/profile/schemas/exit.yaml +6 -3
- package/bundle/skills/agentera/capabilities/profile/schemas/validation.yaml +13 -7
- package/bundle/skills/agentera/schemas/artifacts/glossary.yaml +5 -0
- package/bundle/skills/agentera/schemas/artifacts/plan.yaml +7 -0
- package/dist/.agentera-build-source.json +8 -0
- package/dist/analytics/extractCorpus/copilotSessions.js +13 -4
- package/dist/analytics/extractCorpus/core.js +223 -3
- package/dist/analytics/extractCorpus/corpus.js +18 -1
- package/dist/analytics/extractCorpus/cursorSessions.js +22 -4
- package/dist/analytics/extractCorpus/evidenceTiers.js +123 -17
- package/dist/analytics/extractCorpus/filesystemSources.js +4 -0
- package/dist/analytics/extractCorpus/index.js +2 -2
- package/dist/analytics/extractCorpus/jsonlSessions.js +52 -3
- package/dist/analytics/extractCorpus/sqliteSessions.js +12 -3
- package/dist/analytics/personalGlossaryAdmission.js +26 -46
- package/dist/analytics/personalGlossaryCandidateProjection.js +692 -0
- package/dist/analytics/personalGlossaryCandidateProjectionExcerpts.js +144 -0
- package/dist/analytics/personalGlossaryCandidateReadView.js +23 -0
- package/dist/analytics/personalGlossaryCurrentGeneration.js +25 -0
- package/dist/analytics/personalGlossaryDecision.js +203 -0
- package/dist/analytics/personalGlossaryExplicit.js +788 -0
- package/dist/analytics/personalGlossaryExplicitMining.js +285 -0
- package/dist/analytics/personalGlossaryExplicitScope.js +41 -0
- package/dist/analytics/personalGlossaryExplicitSegments.js +418 -0
- package/dist/analytics/personalGlossaryExplicitTypes.js +26 -0
- package/dist/analytics/personalGlossaryLexicalClassifier.js +175 -0
- package/dist/analytics/personalGlossaryProfile.js +13 -3
- package/dist/analytics/personalGlossaryRecurrence.js +618 -0
- package/dist/analytics/personalGlossaryReviewRecordStorage.js +428 -0
- package/dist/analytics/personalGlossaryReviewRecords.js +332 -0
- package/dist/capabilities/index.js +5 -1
- package/dist/capabilities/profile/instructions.js +50 -15
- package/dist/cli/commands/personalGlossaryCandidateReads.js +744 -0
- package/dist/cli/commands/personalGlossaryDecision.js +349 -0
- package/dist/cli/commands/personalGlossaryPublish.js +484 -0
- package/dist/cli/commands/personalGlossaryReviewRecordReads.js +209 -0
- package/dist/cli/commands/personalGlossaryReviewRecords.js +623 -0
- package/dist/cli/commands/prime/briefOrientation.js +118 -19
- package/dist/cli/commands/report.js +18 -2
- package/dist/cli/commands/schema.js +179 -0
- package/dist/cli/commands/verify.js +51 -9
- package/dist/cli/dispatch/lifecycle.js +51 -6
- package/dist/cli/help.js +48 -2
- package/dist/cli/migrationRequired.js +4 -1
- package/dist/core/atomicWriter.js +4 -1
- package/dist/core/developmentInvocation.js +4 -1
- package/dist/core/yaml.js +53 -1
- package/dist/eval/glossaryEvaluation.js +751 -0
- package/dist/eval/glossaryEvaluationProcess.js +29 -0
- package/dist/eval/glossaryEvaluationRunner.js +571 -0
- package/dist/eval/glossaryEvaluationSuccessReport.js +297 -0
- package/dist/registries/activationTuples.js +31 -3
- package/dist/registries/evidenceTierContract.js +4 -0
- package/dist/registries/explicitSegmentGrammarContract.js +619 -0
- package/dist/registries/glossaryCandidateContractPaths.js +6 -0
- package/dist/registries/glossaryCandidateContracts.js +820 -0
- package/dist/registries/glossaryCandidateDecisionAuthority.js +119 -0
- package/dist/registries/glossaryCandidateDecisionContract.js +62 -0
- package/dist/registries/glossaryCandidateProjectionAuthority.js +197 -0
- package/dist/registries/glossaryCandidateProjectionContract.js +104 -0
- package/dist/registries/glossaryEntryContract.js +105 -103
- package/dist/registries/glossaryEntryTemporal.js +12 -0
- package/dist/registries/glossaryMiningAuthority.js +764 -0
- package/dist/registries/glossaryProfileFullContract.js +24 -0
- package/dist/registries/glossaryReviewRecordsAuthority.js +426 -0
- package/dist/registries/glossaryReviewRecordsContract.js +129 -0
- package/dist/registries/glossaryTermIdentity.js +122 -0
- package/dist/registries/packagePublication.js +3 -3
- package/dist/registries/personalGlossaryContracts.js +1 -0
- package/dist/release/releaseMetadata.js +14 -7
- package/dist/upgrade/npxPlatformStatus.js +2 -1
- package/dist/upgrade/projectIntegration.js +7 -1
- package/dist/validate/activationArtifactEvidence.js +18 -4
- package/dist/validate/activationEvidenceManifest.js +101 -22
- package/package.json +2 -4
- package/dist/cli/commands/personalGlossary.js +0 -176
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { resolveSourceRoot } from "../core/sourceRoot.js";
|
|
4
|
+
import { canonicalDigest, GLOSSARY_EVALUATION_SCHEMA_VERSION, GLOSSARY_METRIC_IDS, glossaryEvaluationAuthorityPath, glossaryEvaluationBehaviorFixturePath, glossaryEvaluationCaseCounts, glossaryEvaluationHoldoutPath, glossaryEvaluationLabelDigest, loadGlossaryEvaluationAuthority, loadGlossaryEvaluationBehaviorFixture, loadGlossaryEvaluationHoldout, mapping, metricRule, sha256, validateFrozenGlossaryBehaviorFixture, validateFrozenGlossaryHoldout, validateGlossaryEvaluationAuthority, wilsonLowerBound, } from "./glossaryEvaluation.js";
|
|
5
|
+
const MAX_SUCCESS_REPORT_UTF8_BYTES = 1_048_576;
|
|
6
|
+
const POLICY_PATH = "references/artifacts/glossary-entry-contract.yaml";
|
|
7
|
+
const SUCCESS_REPORT_FIELDS = [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"status",
|
|
10
|
+
"report",
|
|
11
|
+
"authority",
|
|
12
|
+
"policy",
|
|
13
|
+
"holdout",
|
|
14
|
+
"behavior_fixture",
|
|
15
|
+
"observations",
|
|
16
|
+
"metrics",
|
|
17
|
+
"metrics_sha256",
|
|
18
|
+
"gates",
|
|
19
|
+
"denominator_counts",
|
|
20
|
+
];
|
|
21
|
+
function record(value) {
|
|
22
|
+
return mapping(value);
|
|
23
|
+
}
|
|
24
|
+
function exactFields(value, expected) {
|
|
25
|
+
const fields = Object.keys(value);
|
|
26
|
+
return fields.length === expected.length && expected.every((field) => Object.hasOwn(value, field));
|
|
27
|
+
}
|
|
28
|
+
function same(value, expected) {
|
|
29
|
+
try {
|
|
30
|
+
return canonicalDigest(value) === canonicalDigest(expected);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function isLowerSha256(value) {
|
|
37
|
+
return typeof value === "string" && /^[a-f0-9]{64}$/u.test(value);
|
|
38
|
+
}
|
|
39
|
+
function nonNegativeInteger(value) {
|
|
40
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
|
|
41
|
+
}
|
|
42
|
+
function positiveInteger(value) {
|
|
43
|
+
return nonNegativeInteger(value) && value > 0;
|
|
44
|
+
}
|
|
45
|
+
function probability(value) {
|
|
46
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 && value <= 1;
|
|
47
|
+
}
|
|
48
|
+
function currentBindings(root) {
|
|
49
|
+
try {
|
|
50
|
+
const authorityPath = glossaryEvaluationAuthorityPath(root);
|
|
51
|
+
const holdoutPath = glossaryEvaluationHoldoutPath(root);
|
|
52
|
+
const behaviorPath = glossaryEvaluationBehaviorFixturePath(root);
|
|
53
|
+
const authorityBytes = fs.readFileSync(authorityPath);
|
|
54
|
+
const holdoutBytes = fs.readFileSync(holdoutPath);
|
|
55
|
+
const behaviorBytes = fs.readFileSync(behaviorPath);
|
|
56
|
+
const authority = loadGlossaryEvaluationAuthority(root);
|
|
57
|
+
const holdout = loadGlossaryEvaluationHoldout(root);
|
|
58
|
+
const behavior = loadGlossaryEvaluationBehaviorFixture(root);
|
|
59
|
+
if (validateGlossaryEvaluationAuthority(authority).length > 0 ||
|
|
60
|
+
validateFrozenGlossaryHoldout(authority, holdout, holdoutBytes).length > 0 ||
|
|
61
|
+
validateFrozenGlossaryBehaviorFixture(authority, holdout, behavior, behaviorBytes).length > 0) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
authority,
|
|
66
|
+
authorityBytes,
|
|
67
|
+
holdout,
|
|
68
|
+
holdoutBytes,
|
|
69
|
+
behavior,
|
|
70
|
+
behaviorBytes,
|
|
71
|
+
policyBytes: fs.readFileSync(path.join(root, POLICY_PATH)),
|
|
72
|
+
holdoutCaseCounts: glossaryEvaluationCaseCounts(holdout),
|
|
73
|
+
behaviorCaseCounts: glossaryEvaluationCaseCounts(behavior),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function passedMetric(value, expectedMetric, authority) {
|
|
81
|
+
const source = record(value);
|
|
82
|
+
if (source === null || source.metric !== expectedMetric)
|
|
83
|
+
return null;
|
|
84
|
+
const uncertainty = record(source.uncertainty);
|
|
85
|
+
const thresholds = record(source.thresholds);
|
|
86
|
+
const gates = record(source.gates);
|
|
87
|
+
if (uncertainty === null || thresholds === null || gates === null)
|
|
88
|
+
return null;
|
|
89
|
+
const numerator = source.numerator;
|
|
90
|
+
const denominator = source.denominator;
|
|
91
|
+
const pointEstimate = source.point_estimate;
|
|
92
|
+
const lowerBound = uncertainty.lower_bound;
|
|
93
|
+
const rule = metricRule(authority, expectedMetric);
|
|
94
|
+
if (!nonNegativeInteger(numerator) ||
|
|
95
|
+
!positiveInteger(denominator) ||
|
|
96
|
+
numerator > denominator ||
|
|
97
|
+
!probability(pointEstimate) ||
|
|
98
|
+
!probability(lowerBound) ||
|
|
99
|
+
pointEstimate !== numerator / denominator ||
|
|
100
|
+
lowerBound !== wilsonLowerBound(numerator, denominator, rule.confidence) ||
|
|
101
|
+
denominator < rule.minimumSampleSize ||
|
|
102
|
+
pointEstimate < rule.pointEstimateMinimum ||
|
|
103
|
+
lowerBound < rule.lowerBoundMinimum ||
|
|
104
|
+
uncertainty.method !== rule.uncertaintyMethod ||
|
|
105
|
+
uncertainty.confidence !== rule.confidence ||
|
|
106
|
+
uncertainty.one_sided !== true ||
|
|
107
|
+
thresholds.minimum_sample_size !== rule.minimumSampleSize ||
|
|
108
|
+
thresholds.point_estimate_minimum !== rule.pointEstimateMinimum ||
|
|
109
|
+
thresholds.lower_bound_minimum !== rule.lowerBoundMinimum ||
|
|
110
|
+
gates.denominator_nonzero !== true ||
|
|
111
|
+
gates.sample_sufficient !== true ||
|
|
112
|
+
gates.point_threshold !== true ||
|
|
113
|
+
gates.uncertainty_threshold !== true ||
|
|
114
|
+
source.status !== "pass" ||
|
|
115
|
+
!Array.isArray(source.failure_reasons) ||
|
|
116
|
+
source.failure_reasons.length !== 0) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
const metric = {
|
|
120
|
+
metric: expectedMetric,
|
|
121
|
+
numerator,
|
|
122
|
+
denominator,
|
|
123
|
+
point_estimate: pointEstimate,
|
|
124
|
+
uncertainty: {
|
|
125
|
+
method: rule.uncertaintyMethod,
|
|
126
|
+
confidence: rule.confidence,
|
|
127
|
+
one_sided: true,
|
|
128
|
+
lower_bound: lowerBound,
|
|
129
|
+
},
|
|
130
|
+
thresholds: {
|
|
131
|
+
minimum_sample_size: rule.minimumSampleSize,
|
|
132
|
+
point_estimate_minimum: rule.pointEstimateMinimum,
|
|
133
|
+
lower_bound_minimum: rule.lowerBoundMinimum,
|
|
134
|
+
},
|
|
135
|
+
gates: {
|
|
136
|
+
denominator_nonzero: true,
|
|
137
|
+
sample_sufficient: true,
|
|
138
|
+
point_threshold: true,
|
|
139
|
+
uncertainty_threshold: true,
|
|
140
|
+
},
|
|
141
|
+
status: "pass",
|
|
142
|
+
failure_reasons: [],
|
|
143
|
+
};
|
|
144
|
+
return same(source, metric) ? metric : null;
|
|
145
|
+
}
|
|
146
|
+
function validObservationSeams(value, counts) {
|
|
147
|
+
const seams = Array.isArray(value) ? value : null;
|
|
148
|
+
const expected = [
|
|
149
|
+
["discovery_recall", "discovery", "mineExplicitGlossaryCandidates", false],
|
|
150
|
+
["scope_accuracy", "scope", "mineExplicitGlossaryCandidates", true],
|
|
151
|
+
["inferred_review_precision", "inferred_review", "mineRecurringGlossaryCandidates+personalGlossaryDecision.v2", false],
|
|
152
|
+
["explicit_admission_precision", "explicit_admission", "mineExplicitGlossaryCandidates+personalGlossaryDecision.v2", false],
|
|
153
|
+
];
|
|
154
|
+
if (seams === null || seams.length !== expected.length)
|
|
155
|
+
return false;
|
|
156
|
+
return expected.every(([metric, family, producer, hasAbstentions], index) => {
|
|
157
|
+
const seam = record(seams[index]);
|
|
158
|
+
if (seam === null || !exactFields(seam, hasAbstentions
|
|
159
|
+
? ["metric", "producer", "cases", "candidates", "abstentions"]
|
|
160
|
+
: ["metric", "producer", "cases", "candidates"]))
|
|
161
|
+
return false;
|
|
162
|
+
const candidates = seam.candidates;
|
|
163
|
+
const abstentions = seam.abstentions;
|
|
164
|
+
return seam.metric === metric &&
|
|
165
|
+
seam.producer === producer &&
|
|
166
|
+
seam.cases === counts[family] &&
|
|
167
|
+
nonNegativeInteger(candidates) &&
|
|
168
|
+
candidates <= counts[family] &&
|
|
169
|
+
(!hasAbstentions || (nonNegativeInteger(abstentions) &&
|
|
170
|
+
candidates + abstentions <= counts[family]));
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
function validBindings(source, bindings) {
|
|
174
|
+
const expectedAuthority = {
|
|
175
|
+
schema_version: bindings.authority.schema_version,
|
|
176
|
+
path: "references/analysis/personal-glossary-evaluation-authority.yaml",
|
|
177
|
+
sha256: sha256(bindings.authorityBytes),
|
|
178
|
+
};
|
|
179
|
+
const expectedPolicy = { path: POLICY_PATH, sha256: sha256(bindings.policyBytes) };
|
|
180
|
+
const expectedHoldout = {
|
|
181
|
+
id: bindings.holdout.holdout_id,
|
|
182
|
+
status: bindings.holdout.status,
|
|
183
|
+
fixture_sha256: sha256(bindings.holdoutBytes),
|
|
184
|
+
labels_sha256: glossaryEvaluationLabelDigest(bindings.holdout),
|
|
185
|
+
provenance: bindings.holdout.provenance,
|
|
186
|
+
case_counts: bindings.holdoutCaseCounts,
|
|
187
|
+
};
|
|
188
|
+
const expectedBehavior = {
|
|
189
|
+
id: bindings.behavior.fixture_id,
|
|
190
|
+
status: bindings.behavior.status,
|
|
191
|
+
path: "references/analysis/personal-glossary-evaluation-corpus.yaml",
|
|
192
|
+
fixture_sha256: sha256(bindings.behaviorBytes),
|
|
193
|
+
provenance: bindings.behavior.provenance,
|
|
194
|
+
case_counts: bindings.behaviorCaseCounts,
|
|
195
|
+
};
|
|
196
|
+
const observations = record(source.observations);
|
|
197
|
+
return same(source.authority, expectedAuthority) &&
|
|
198
|
+
same(source.policy, expectedPolicy) &&
|
|
199
|
+
same(source.holdout, expectedHoldout) &&
|
|
200
|
+
same(source.behavior_fixture, expectedBehavior) &&
|
|
201
|
+
observations !== null &&
|
|
202
|
+
exactFields(observations, [
|
|
203
|
+
"schema_version",
|
|
204
|
+
"source",
|
|
205
|
+
"sha256",
|
|
206
|
+
"holdout_fixture_sha256",
|
|
207
|
+
"behavior_fixture_sha256",
|
|
208
|
+
"case_counts",
|
|
209
|
+
"seams",
|
|
210
|
+
"effects",
|
|
211
|
+
]) &&
|
|
212
|
+
observations.schema_version === "agentera.personalGlossaryEvaluationObservations.v2" &&
|
|
213
|
+
observations.source === "current_product_behavior" &&
|
|
214
|
+
isLowerSha256(observations.sha256) &&
|
|
215
|
+
observations.holdout_fixture_sha256 === expectedHoldout.fixture_sha256 &&
|
|
216
|
+
observations.behavior_fixture_sha256 === expectedBehavior.fixture_sha256 &&
|
|
217
|
+
same(observations.case_counts, bindings.holdoutCaseCounts) &&
|
|
218
|
+
same(observations.effects, []) &&
|
|
219
|
+
validObservationSeams(observations.seams, bindings.holdoutCaseCounts);
|
|
220
|
+
}
|
|
221
|
+
function validReleaseReport(source, metrics) {
|
|
222
|
+
const expectedReport = {
|
|
223
|
+
exploratory: { release_authorizing: false, status: "report_only", metrics },
|
|
224
|
+
release_gate: {
|
|
225
|
+
release_authorizing: true,
|
|
226
|
+
release_authorized: true,
|
|
227
|
+
status: "pass",
|
|
228
|
+
failure_reasons: [],
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
const expectedGates = {
|
|
232
|
+
explicit_admission: {
|
|
233
|
+
metric: "explicit_admission_precision",
|
|
234
|
+
status: "pass",
|
|
235
|
+
qualification_blocker: true,
|
|
236
|
+
outcome: "explicit_automatic_admission_only",
|
|
237
|
+
},
|
|
238
|
+
inferred_review: {
|
|
239
|
+
metric: "inferred_review_precision",
|
|
240
|
+
status: "pass",
|
|
241
|
+
outcome: "review_suggestions_only",
|
|
242
|
+
},
|
|
243
|
+
inferred_automatic_admission: {
|
|
244
|
+
status: "disabled",
|
|
245
|
+
enabled: false,
|
|
246
|
+
measured_result: "cannot_enable",
|
|
247
|
+
},
|
|
248
|
+
release_authorizing: "pass",
|
|
249
|
+
};
|
|
250
|
+
const denominatorCounts = Object.fromEntries(metrics.map(({ metric, denominator }) => [metric, denominator]));
|
|
251
|
+
return same(source.report, expectedReport) &&
|
|
252
|
+
same(source.gates, expectedGates) &&
|
|
253
|
+
same(source.denominator_counts, denominatorCounts);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Accept only the current, complete, successful glossary evaluator report.
|
|
257
|
+
* This parser reads authority inputs but never imports or runs the evaluator.
|
|
258
|
+
*/
|
|
259
|
+
export function validateGlossaryEvaluationSuccessReport(result, root = resolveSourceRoot()) {
|
|
260
|
+
if (result.returncode !== 0 || Buffer.byteLength(result.stdout, "utf8") > MAX_SUCCESS_REPORT_UTF8_BYTES) {
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
let source;
|
|
264
|
+
try {
|
|
265
|
+
source = record(JSON.parse(result.stdout));
|
|
266
|
+
}
|
|
267
|
+
catch {
|
|
268
|
+
return null;
|
|
269
|
+
}
|
|
270
|
+
if (source === null ||
|
|
271
|
+
!exactFields(source, SUCCESS_REPORT_FIELDS) ||
|
|
272
|
+
source.schemaVersion !== GLOSSARY_EVALUATION_SCHEMA_VERSION ||
|
|
273
|
+
source.status !== "pass") {
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
276
|
+
const bindings = currentBindings(root);
|
|
277
|
+
if (bindings === null || !validBindings(source, bindings))
|
|
278
|
+
return null;
|
|
279
|
+
const sourceMetrics = source.metrics;
|
|
280
|
+
if (!Array.isArray(sourceMetrics) || sourceMetrics.length !== GLOSSARY_METRIC_IDS.length)
|
|
281
|
+
return null;
|
|
282
|
+
const metrics = [];
|
|
283
|
+
for (const [index, metric] of GLOSSARY_METRIC_IDS.entries()) {
|
|
284
|
+
const passed = passedMetric(sourceMetrics[index], metric, bindings.authority);
|
|
285
|
+
if (passed === null)
|
|
286
|
+
return null;
|
|
287
|
+
metrics.push(passed);
|
|
288
|
+
}
|
|
289
|
+
const metricsSha256 = source.metrics_sha256;
|
|
290
|
+
if (!isLowerSha256(metricsSha256) ||
|
|
291
|
+
metricsSha256 !== canonicalDigest(metrics) ||
|
|
292
|
+
canonicalDigest(sourceMetrics) !== canonicalDigest(metrics) ||
|
|
293
|
+
!validReleaseReport(source, metrics)) {
|
|
294
|
+
return null;
|
|
295
|
+
}
|
|
296
|
+
return { metrics, metrics_sha256: metricsSha256 };
|
|
297
|
+
}
|
|
@@ -80,6 +80,34 @@ const addedTuples = [
|
|
|
80
80
|
{ class: "state", surface_id: "write:todo.repair", owner_path: "packages/cli/src/state/write/runtimeOperations.ts", owner_symbol_or_selector: "runtimeOperationSpecs", owner_selector: "todo.repair", semantic_selector_if_any: null, canonical_correction: "node packages/cli/dist/bin/agentera.js check validate state --format json" },
|
|
81
81
|
{ class: "package", surface_id: "emitted:packages/cli/src/cli/commands/doctor.ts", owner_path: "packages/cli/src/registries/packageRegistry.ts", owner_symbol_or_selector: "loadRegistry", owner_selector: "packages/cli/src/cli/commands/doctor.ts", semantic_selector_if_any: JSON.stringify({ path: "packages/cli/src/cli/commands/doctor.ts", selector: null, format: null, classification: null, reason: "Doctor project-state signals publish bounded reconciliation preview and apply guidance." }), canonical_correction: "pnpm -C packages/cli run verify:package" },
|
|
82
82
|
{ class: "package", surface_id: "emitted:packages/cli/src/state/todoReconciliationInspection.ts", owner_path: "packages/cli/src/registries/packageRegistry.ts", owner_symbol_or_selector: "loadRegistry", owner_selector: "packages/cli/src/state/todoReconciliationInspection.ts", semantic_selector_if_any: JSON.stringify({ path: "packages/cli/src/state/todoReconciliationInspection.ts", selector: null, format: null, classification: null, reason: "TODO reconciliation inspection publishes bounded preview and effect-bound apply guidance." }), canonical_correction: "pnpm -C packages/cli run verify:package" },
|
|
83
|
+
{ class: "package", surface_id: "generated:build-source-identity", owner_path: "packages/cli/src/registries/packageRegistry.ts", owner_symbol_or_selector: "loadRegistry", owner_selector: ".agentera-build-source.json", semantic_selector_if_any: JSON.stringify({ path: ".agentera-build-source.json", selector: null, format: "json", classification: "active", reason: "Build-generated source identity binds constructed dist and bundle output to one Git commit, tree, and exact working-tree digest; no source copy exists." }), canonical_correction: "pnpm -C packages/cli run verify:package" },
|
|
84
|
+
{
|
|
85
|
+
class: "reference",
|
|
86
|
+
surface_id: "references/analysis/personal-glossary-evaluation-authority.yaml",
|
|
87
|
+
owner_path: "packages/cli/src/eval/glossaryEvaluation.ts",
|
|
88
|
+
owner_symbol_or_selector: "loadGlossaryEvaluationAuthority",
|
|
89
|
+
owner_selector: "references/analysis/personal-glossary-evaluation-authority.yaml",
|
|
90
|
+
semantic_selector_if_any: null,
|
|
91
|
+
canonical_correction: "node packages/cli/dist/bin/agentera.js check validate retained-references --format json",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
class: "reference",
|
|
95
|
+
surface_id: "references/analysis/personal-glossary-holdout.yaml",
|
|
96
|
+
owner_path: "packages/cli/src/eval/glossaryEvaluation.ts",
|
|
97
|
+
owner_symbol_or_selector: "loadGlossaryEvaluationHoldout",
|
|
98
|
+
owner_selector: "references/analysis/personal-glossary-holdout.yaml",
|
|
99
|
+
semantic_selector_if_any: null,
|
|
100
|
+
canonical_correction: "node packages/cli/dist/bin/agentera.js check validate retained-references --format json",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
class: "reference",
|
|
104
|
+
surface_id: "references/analysis/personal-glossary-evaluation-corpus.yaml",
|
|
105
|
+
owner_path: "packages/cli/src/eval/glossaryEvaluation.ts",
|
|
106
|
+
owner_symbol_or_selector: "loadGlossaryEvaluationBehaviorFixture",
|
|
107
|
+
owner_selector: "references/analysis/personal-glossary-evaluation-corpus.yaml",
|
|
108
|
+
semantic_selector_if_any: null,
|
|
109
|
+
canonical_correction: "node packages/cli/dist/bin/agentera.js check validate retained-references --format json",
|
|
110
|
+
},
|
|
83
111
|
];
|
|
84
112
|
const tuples = [...rawTuples, ...addedTuples].map((tuple) => {
|
|
85
113
|
const reason = emittedReasons[tuple.surface_id];
|
|
@@ -95,12 +123,12 @@ export const ACTIVATION_TUPLE_AUTHORITY = Object.freeze({
|
|
|
95
123
|
cli: { count: 27, sha256: "9d0db6cafe592da30ea3469c91dc514bdd1b3b22e8229a0519e680cbcb01c2fa" },
|
|
96
124
|
capability: { count: 12, sha256: "892e6e5e2a57b41064bc44fa2946453225f1b1195aff77aad05365fd0a1071c2" },
|
|
97
125
|
runtime: { count: 81, sha256: "99b2abff3ebff889b54b1781c563ab4b32609a479c4e90d6aad854f48fba7edc" },
|
|
98
|
-
reference: { count:
|
|
126
|
+
reference: { count: 25, sha256: "2a40b8a8585933417a6e66a350c9ad68050288600cdac1e7f44b914e7022565c" },
|
|
99
127
|
state: { count: 38, sha256: "697de8dcd13ac521124c35058ba222aa5cb6cae546f00bb54652ceaca4b662aa" },
|
|
100
|
-
package: { count:
|
|
128
|
+
package: { count: 67, sha256: "5dbe325af5ffb29a1ea50534070d08fcff647d4d9ef5654b4ce03d76eeaa8adb" },
|
|
101
129
|
bootstrap: { count: 34, sha256: "9a7dd7e27110d85cf5c08835fdd8f08119e75579858e63bc6d396c733961d0bc" },
|
|
102
130
|
},
|
|
103
|
-
total: { count:
|
|
131
|
+
total: { count: 284, sha256: "6b0d109f9d833598dcd1ec5b21cbc57e80ee8f21a0e5b61ca8aa420c6d32eb60" },
|
|
104
132
|
});
|
|
105
133
|
export function canonicalTupleJson(value) { return JSON.stringify(value); }
|
|
106
134
|
export function digestCanonicalTuples(values) {
|
|
@@ -25,6 +25,10 @@ export const REQUIRED_SIGNAL_KINDS = [
|
|
|
25
25
|
"record_identity",
|
|
26
26
|
"date",
|
|
27
27
|
"evidence_anchor",
|
|
28
|
+
"session_id",
|
|
29
|
+
"origin_id",
|
|
30
|
+
"content_fingerprint",
|
|
31
|
+
"author_class",
|
|
28
32
|
];
|
|
29
33
|
/** Compatibility states that must have deterministic, actionable outcomes. */
|
|
30
34
|
export const REQUIRED_COMPATIBILITY_STATES = [
|