omnius 1.0.570 → 1.0.571
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/index.js
CHANGED
|
@@ -327301,9 +327301,9 @@ ${lanes.join("\n")}
|
|
|
327301
327301
|
}
|
|
327302
327302
|
return flatten2(results);
|
|
327303
327303
|
function visitDirectory(path22, absolutePath, depth2) {
|
|
327304
|
-
const
|
|
327305
|
-
if (visited.has(
|
|
327306
|
-
visited.set(
|
|
327304
|
+
const canonicalPath2 = toCanonical(realpath(absolutePath));
|
|
327305
|
+
if (visited.has(canonicalPath2)) return;
|
|
327306
|
+
visited.set(canonicalPath2, true);
|
|
327307
327307
|
const { files, directories } = getFileSystemEntries(path22);
|
|
327308
327308
|
for (const current of toSorted(files, compareStringsCaseSensitive)) {
|
|
327309
327309
|
const name10 = combinePaths(path22, current);
|
|
@@ -505227,13 +505227,13 @@ ${options2.prefix}` : "\n" : options2.prefix
|
|
|
505227
505227
|
if (!this.typingWatchers) this.typingWatchers = /* @__PURE__ */ new Map();
|
|
505228
505228
|
this.typingWatchers.isInvoked = false;
|
|
505229
505229
|
const createProjectWatcher = (path16, typingsWatcherType) => {
|
|
505230
|
-
const
|
|
505231
|
-
toRemove.delete(
|
|
505232
|
-
if (!this.typingWatchers.has(
|
|
505230
|
+
const canonicalPath2 = this.toPath(path16);
|
|
505231
|
+
toRemove.delete(canonicalPath2);
|
|
505232
|
+
if (!this.typingWatchers.has(canonicalPath2)) {
|
|
505233
505233
|
const watchType = typingsWatcherType === "FileWatcher" ? WatchType.TypingInstallerLocationFile : WatchType.TypingInstallerLocationDirectory;
|
|
505234
505234
|
this.typingWatchers.set(
|
|
505235
|
-
|
|
505236
|
-
canWatchDirectoryOrFilePath(
|
|
505235
|
+
canonicalPath2,
|
|
505236
|
+
canWatchDirectoryOrFilePath(canonicalPath2) ? typingsWatcherType === "FileWatcher" ? this.projectService.watchFactory.watchFile(
|
|
505237
505237
|
path16,
|
|
505238
505238
|
() => !this.typingWatchers.isInvoked ? this.onTypingInstallerWatchInvoke() : this.writeLog(`TypingWatchers already invoked`),
|
|
505239
505239
|
2e3,
|
|
@@ -508521,8 +508521,8 @@ ${options2.prefix}` : "\n" : options2.prefix
|
|
|
508521
508521
|
var _a22;
|
|
508522
508522
|
cleanExtendedConfigCache(this.extendedConfigCache, extendedConfigFilePath, (fileName) => this.toPath(fileName));
|
|
508523
508523
|
let ensureProjectsForOpenFiles = false;
|
|
508524
|
-
(_a22 = this.sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) == null ? void 0 : _a22.projects.forEach((
|
|
508525
|
-
ensureProjectsForOpenFiles = this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(
|
|
508524
|
+
(_a22 = this.sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) == null ? void 0 : _a22.projects.forEach((canonicalPath2) => {
|
|
508525
|
+
ensureProjectsForOpenFiles = this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath2, `Change in extended config file ${extendedConfigFileName} detected`) || ensureProjectsForOpenFiles;
|
|
508526
508526
|
});
|
|
508527
508527
|
if (ensureProjectsForOpenFiles) this.delayEnsureProjectForOpenFiles();
|
|
508528
508528
|
},
|
|
@@ -571564,6 +571564,13 @@ function buildReferenceContractBundle(input) {
|
|
|
571564
571564
|
});
|
|
571565
571565
|
}
|
|
571566
571566
|
}
|
|
571567
|
+
if (input.includeDeliverySurface && !candidates.some((candidate) => candidate.id === "delivery_surface")) {
|
|
571568
|
+
candidates.push({
|
|
571569
|
+
id: "delivery_surface",
|
|
571570
|
+
phase: input.phase,
|
|
571571
|
+
reason: "workspace_delivery_coverage_manifest"
|
|
571572
|
+
});
|
|
571573
|
+
}
|
|
571567
571574
|
if (input.includeExplicit !== false) {
|
|
571568
571575
|
for (const id2 of explicitContractIds(input.explicitModules)) {
|
|
571569
571576
|
candidates.push({
|
|
@@ -571711,10 +571718,10 @@ var init_phase_skill_guidance = __esm({
|
|
|
571711
571718
|
"use strict";
|
|
571712
571719
|
init_dist5();
|
|
571713
571720
|
PHASE_FOCUS = {
|
|
571714
|
-
explore: "repository discovery requirements analysis source inspection provenance",
|
|
571715
|
-
plan: "requirements planning architecture design acceptance criteria risk analysis",
|
|
571721
|
+
explore: "repository discovery requirements analysis source inspection provenance capability boundary falsification",
|
|
571722
|
+
plan: "requirements planning architecture design acceptance criteria claim evidence risk analysis",
|
|
571716
571723
|
implement: "implementation code change editing debugging tests integration safety",
|
|
571717
|
-
verify: "verification validation acceptance tests release documentation consistency",
|
|
571724
|
+
verify: "verification validation acceptance tests evidence receipts release documentation consistency",
|
|
571718
571725
|
mixed: "implementation verification testing code review evidence"
|
|
571719
571726
|
};
|
|
571720
571727
|
}
|
|
@@ -571725,6 +571732,9 @@ import { createHash as createHash30 } from "node:crypto";
|
|
|
571725
571732
|
import { existsSync as existsSync90, readFileSync as readFileSync70 } from "node:fs";
|
|
571726
571733
|
import { join as join102 } from "node:path";
|
|
571727
571734
|
import { z as z17 } from "zod";
|
|
571735
|
+
function canonicalPath(path16) {
|
|
571736
|
+
return String(path16 ?? "").trim().replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/+/g, "/");
|
|
571737
|
+
}
|
|
571728
571738
|
function duplicates(values) {
|
|
571729
571739
|
const seen = /* @__PURE__ */ new Set();
|
|
571730
571740
|
const out = /* @__PURE__ */ new Set();
|
|
@@ -571770,17 +571780,25 @@ function normalizeEvidence2(availableEvidence) {
|
|
|
571770
571780
|
}
|
|
571771
571781
|
return evidence;
|
|
571772
571782
|
}
|
|
571773
|
-
function evaluateDeliveryCoverage(manifest, availableEvidenceIds = []) {
|
|
571783
|
+
function evaluateDeliveryCoverage(manifest, availableEvidenceIds = [], sourceObservations = []) {
|
|
571774
571784
|
const gaps = [];
|
|
571775
571785
|
const sourceById = new Map(manifest.sources.map((item) => [item.id, item]));
|
|
571776
571786
|
const contractById = new Map(manifest.contracts.map((item) => [item.id, item]));
|
|
571777
571787
|
const acceptanceById = new Map(manifest.acceptance.map((item) => [item.id, item]));
|
|
571788
|
+
const inspectionById = new Map(manifest.inspections.map((item) => [item.id, item]));
|
|
571789
|
+
const contradictionById = new Map(manifest.contradictionChecks.map((item) => [item.id, item]));
|
|
571778
571790
|
const availableEvidence = normalizeEvidence2(availableEvidenceIds);
|
|
571779
571791
|
const available = new Set(availableEvidence.map((item) => item.id));
|
|
571792
|
+
const observations = [...sourceObservations].map((item) => ({
|
|
571793
|
+
...item,
|
|
571794
|
+
path: canonicalPath(item.path)
|
|
571795
|
+
}));
|
|
571780
571796
|
for (const id2 of duplicates([
|
|
571781
571797
|
...manifest.sources.map((item) => item.id),
|
|
571782
571798
|
...manifest.contracts.map((item) => item.id),
|
|
571783
571799
|
...manifest.acceptance.map((item) => item.id),
|
|
571800
|
+
...manifest.inspections.map((item) => item.id),
|
|
571801
|
+
...manifest.contradictionChecks.map((item) => item.id),
|
|
571784
571802
|
...manifest.claims.map((item) => item.id)
|
|
571785
571803
|
])) {
|
|
571786
571804
|
gaps.push({ claimId: id2, code: "duplicate_id", detail: `Duplicate manifest id '${id2}'.` });
|
|
@@ -571801,6 +571819,7 @@ function evaluateDeliveryCoverage(manifest, availableEvidenceIds = []) {
|
|
|
571801
571819
|
}
|
|
571802
571820
|
}
|
|
571803
571821
|
const claimStates = manifest.claims.map((claim) => {
|
|
571822
|
+
const gapsBeforeClaim = gaps.length;
|
|
571804
571823
|
for (const sourceId of claim.sourceIds) {
|
|
571805
571824
|
if (!sourceById.has(sourceId)) {
|
|
571806
571825
|
gaps.push({ claimId: claim.id, code: "unknown_source", detail: `Claim references unknown source '${sourceId}'.` });
|
|
@@ -571854,6 +571873,57 @@ function evaluateDeliveryCoverage(manifest, availableEvidenceIds = []) {
|
|
|
571854
571873
|
if (claim.state === "blocked" && !claim.blockedReason) {
|
|
571855
571874
|
gaps.push({ claimId: claim.id, code: "blocked_reason_required", detail: "Blocked claims require a concrete blockedReason." });
|
|
571856
571875
|
}
|
|
571876
|
+
if (manifest.schemaVersion >= 2 && claim.state !== "blocked" && (claim.requiredInspectionIds.length === 0 || claim.requiredContradictionCheckIds.length === 0)) {
|
|
571877
|
+
gaps.push({
|
|
571878
|
+
claimId: claim.id,
|
|
571879
|
+
code: "missing_inspection_contract",
|
|
571880
|
+
detail: "V2 non-blocked claims must name source inspections and contradiction checks."
|
|
571881
|
+
});
|
|
571882
|
+
}
|
|
571883
|
+
const missingInspectionIds = [];
|
|
571884
|
+
for (const inspectionId of claim.requiredInspectionIds) {
|
|
571885
|
+
const inspection = inspectionById.get(inspectionId);
|
|
571886
|
+
if (!inspection) {
|
|
571887
|
+
missingInspectionIds.push(inspectionId);
|
|
571888
|
+
gaps.push({ claimId: claim.id, code: "unknown_inspection", detail: `Claim references unknown inspection '${inspectionId}'.` });
|
|
571889
|
+
continue;
|
|
571890
|
+
}
|
|
571891
|
+
const unsatisfiedPaths = inspection.targetPaths.filter((path16) => {
|
|
571892
|
+
const normalizedPath = canonicalPath(path16);
|
|
571893
|
+
return !observations.some((observation) => observation.path === normalizedPath && observation.stale !== true && observation.fidelity === "full" && Boolean(observation.contentHash));
|
|
571894
|
+
});
|
|
571895
|
+
if (unsatisfiedPaths.length > 0) {
|
|
571896
|
+
missingInspectionIds.push(inspectionId);
|
|
571897
|
+
const observedButUnusable = unsatisfiedPaths.some((path16) => observations.some((observation) => observation.path === canonicalPath(path16)));
|
|
571898
|
+
gaps.push({
|
|
571899
|
+
claimId: claim.id,
|
|
571900
|
+
code: observedButUnusable ? "stale_inspection" : "missing_inspection",
|
|
571901
|
+
detail: `${inspection.boundary} inspection '${inspectionId}' needs fresh full hashed read(s): ${unsatisfiedPaths.join(", ")}.`
|
|
571902
|
+
});
|
|
571903
|
+
}
|
|
571904
|
+
}
|
|
571905
|
+
const missingContradictionCheckIds = [];
|
|
571906
|
+
for (const checkId of claim.requiredContradictionCheckIds) {
|
|
571907
|
+
const check = contradictionById.get(checkId);
|
|
571908
|
+
if (!check) {
|
|
571909
|
+
missingContradictionCheckIds.push(checkId);
|
|
571910
|
+
gaps.push({ claimId: claim.id, code: "unknown_contradiction_check", detail: `Claim references unknown contradiction check '${checkId}'.` });
|
|
571911
|
+
continue;
|
|
571912
|
+
}
|
|
571913
|
+
const unresolvedInspectionIds = check.inspectionIds.filter((id2) => {
|
|
571914
|
+
if (!claim.requiredInspectionIds.includes(id2))
|
|
571915
|
+
return true;
|
|
571916
|
+
return missingInspectionIds.includes(id2);
|
|
571917
|
+
});
|
|
571918
|
+
if (unresolvedInspectionIds.length > 0) {
|
|
571919
|
+
missingContradictionCheckIds.push(checkId);
|
|
571920
|
+
gaps.push({
|
|
571921
|
+
claimId: claim.id,
|
|
571922
|
+
code: "missing_contradiction_check",
|
|
571923
|
+
detail: `Contradiction check '${checkId}' (${check.question}) lacks fresh inspection evidence: ${unresolvedInspectionIds.join(", ")}.`
|
|
571924
|
+
});
|
|
571925
|
+
}
|
|
571926
|
+
}
|
|
571857
571927
|
const required = requiredLayers(claim.state);
|
|
571858
571928
|
const selected = claim.requiredAcceptanceIds.map((id2) => acceptanceById.get(id2)).filter((item) => Boolean(item));
|
|
571859
571929
|
const missingAcceptanceIds = required.filter((layer) => !selected.some((item) => item.layer === layer && item.requiredFor.includes(claim.state)));
|
|
@@ -571884,11 +571954,16 @@ function evaluateDeliveryCoverage(manifest, availableEvidenceIds = []) {
|
|
|
571884
571954
|
gaps.push({ claimId: claim.id, code: "missing_evidence", detail: `Evidence receipt(s) are not present in this run: ${missingEvidence.join(", ")}.` });
|
|
571885
571955
|
}
|
|
571886
571956
|
}
|
|
571957
|
+
const claimHasGap = gaps.slice(gapsBeforeClaim).some((gap) => gap.claimId === claim.id);
|
|
571958
|
+
const attainedState = claim.state === "blocked" ? "blocked" : claimHasGap ? "unproven" : claim.state;
|
|
571887
571959
|
return {
|
|
571888
571960
|
id: claim.id,
|
|
571889
571961
|
state: claim.state,
|
|
571962
|
+
attainedState,
|
|
571890
571963
|
evidenceIds: claim.evidenceIds,
|
|
571891
|
-
missingAcceptanceIds
|
|
571964
|
+
missingAcceptanceIds,
|
|
571965
|
+
missingInspectionIds,
|
|
571966
|
+
missingContradictionCheckIds
|
|
571892
571967
|
};
|
|
571893
571968
|
});
|
|
571894
571969
|
return {
|
|
@@ -571916,7 +571991,7 @@ function renderDeliveryCoverageState(evaluation, sourcePath) {
|
|
|
571916
571991
|
`sha256=${evaluation.manifestHash}`,
|
|
571917
571992
|
`completion_ready=${evaluation.completionReady}`,
|
|
571918
571993
|
"claims:",
|
|
571919
|
-
...evaluation.claimStates.slice(0, 12).map((claim) => `- id=${claim.id} state=${claim.state} evidence=${claim.evidenceIds.join(",") || "none"} missing_acceptance=${claim.missingAcceptanceIds.join(",") || "none"}`),
|
|
571994
|
+
...evaluation.claimStates.slice(0, 12).map((claim) => `- id=${claim.id} state=${claim.state} attained=${claim.attainedState} evidence=${claim.evidenceIds.join(",") || "none"} missing_inspection=${claim.missingInspectionIds.join(",") || "none"} missing_contradiction=${claim.missingContradictionCheckIds.join(",") || "none"} missing_acceptance=${claim.missingAcceptanceIds.join(",") || "none"}`),
|
|
571920
571995
|
"gaps:",
|
|
571921
571996
|
...evaluation.gaps.length > 0 ? evaluation.gaps.slice(0, 12).map((gap) => `- [${gap.code}] ${gap.claimId}: ${gap.detail}`) : ["- none"],
|
|
571922
571997
|
"Treat this as delivery truth, not a recovery directive. A blocked or simulation-only claim must remain labeled at that state.",
|
|
@@ -571924,7 +571999,7 @@ function renderDeliveryCoverageState(evaluation, sourcePath) {
|
|
|
571924
571999
|
];
|
|
571925
572000
|
return lines.join("\n");
|
|
571926
572001
|
}
|
|
571927
|
-
var deliveryRealityStates, acceptanceLayers, sourceSchema, contractSchema, acceptanceSchema, subjectSchema, claimSchema, deliveryCoverageManifestSchema;
|
|
572002
|
+
var deliveryRealityStates, acceptanceLayers, sourceSchema, contractSchema, acceptanceSchema, inspectionSchema, contradictionCheckSchema, subjectSchema, claimSchema, deliveryCoverageManifestSchema;
|
|
571928
572003
|
var init_deliveryCoverage = __esm({
|
|
571929
572004
|
"packages/orchestrator/dist/deliveryCoverage.js"() {
|
|
571930
572005
|
"use strict";
|
|
@@ -571966,6 +572041,17 @@ var init_deliveryCoverage = __esm({
|
|
|
571966
572041
|
verificationCommands: z17.array(z17.string().min(1)).min(1),
|
|
571967
572042
|
safetyInterlock: z17.string().min(1).optional()
|
|
571968
572043
|
});
|
|
572044
|
+
inspectionSchema = z17.object({
|
|
572045
|
+
id: z17.string().min(1),
|
|
572046
|
+
boundary: z17.string().min(1),
|
|
572047
|
+
targetPaths: z17.array(z17.string().min(1)).min(1),
|
|
572048
|
+
proves: z17.string().min(1)
|
|
572049
|
+
});
|
|
572050
|
+
contradictionCheckSchema = z17.object({
|
|
572051
|
+
id: z17.string().min(1),
|
|
572052
|
+
question: z17.string().min(1),
|
|
572053
|
+
inspectionIds: z17.array(z17.string().min(1)).min(1)
|
|
572054
|
+
});
|
|
571969
572055
|
subjectSchema = z17.object({
|
|
571970
572056
|
productSeries: z17.string().min(1),
|
|
571971
572057
|
commands: z17.array(z17.string().min(1)).default([]),
|
|
@@ -571980,13 +572066,21 @@ var init_deliveryCoverage = __esm({
|
|
|
571980
572066
|
sourceIds: z17.array(z17.string().min(1)).min(1),
|
|
571981
572067
|
evidenceIds: z17.array(z17.string().min(1)).default([]),
|
|
571982
572068
|
requiredAcceptanceIds: z17.array(z17.string().min(1)).default([]),
|
|
572069
|
+
/** Source boundaries that must be freshly read before this claim is true. */
|
|
572070
|
+
requiredInspectionIds: z17.array(z17.string().min(1)).default([]),
|
|
572071
|
+
/** Falsification checks that must be grounded in those source inspections. */
|
|
572072
|
+
requiredContradictionCheckIds: z17.array(z17.string().min(1)).default([]),
|
|
571983
572073
|
blockedReason: z17.string().min(1).optional()
|
|
571984
572074
|
});
|
|
571985
572075
|
deliveryCoverageManifestSchema = z17.object({
|
|
571986
|
-
|
|
572076
|
+
// Version 1 remains readable for existing workspaces. Version 2 activates
|
|
572077
|
+
// claim-driven source inspection and falsification gates.
|
|
572078
|
+
schemaVersion: z17.union([z17.literal(1), z17.literal(2)]),
|
|
571987
572079
|
sources: z17.array(sourceSchema),
|
|
571988
572080
|
contracts: z17.array(contractSchema),
|
|
571989
572081
|
acceptance: z17.array(acceptanceSchema),
|
|
572082
|
+
inspections: z17.array(inspectionSchema).default([]),
|
|
572083
|
+
contradictionChecks: z17.array(contradictionCheckSchema).default([]),
|
|
571990
572084
|
claims: z17.array(claimSchema)
|
|
571991
572085
|
});
|
|
571992
572086
|
}
|
|
@@ -593567,16 +593661,29 @@ evidence=${record.evidenceIds.join(",") || "none"}`
|
|
|
593567
593661
|
const loaded = loadDeliveryCoverageManifest(this.authoritativeWorkingDirectory());
|
|
593568
593662
|
if (!loaded)
|
|
593569
593663
|
return null;
|
|
593664
|
+
for (const entry of this._evidenceLedger.snapshot(200)) {
|
|
593665
|
+
this._evidenceLedger.validateFreshness(entry.path, _pathResolve(this.authoritativeWorkingDirectory(), entry.path));
|
|
593666
|
+
}
|
|
593570
593667
|
const evidence = this._completionLedger?.evidence.map((entry) => ({
|
|
593571
593668
|
id: entry.id,
|
|
593572
593669
|
success: entry.success,
|
|
593573
593670
|
receipt: entry.receipt
|
|
593574
593671
|
})) ?? [];
|
|
593575
|
-
const
|
|
593672
|
+
const sourceObservations = this._evidenceLedger.snapshot(200).map((entry) => ({
|
|
593673
|
+
path: entry.path,
|
|
593674
|
+
contentHash: entry.contentHash,
|
|
593675
|
+
fidelity: entry.fidelity,
|
|
593676
|
+
stale: entry.stale
|
|
593677
|
+
}));
|
|
593678
|
+
const evaluated = evaluateDeliveryCoverage(loaded.manifest, evidence, sourceObservations);
|
|
593679
|
+
const firstInspectionGap = evaluated.gaps.find((gap) => gap.code === "missing_inspection" || gap.code === "stale_inspection" || gap.code === "missing_contradiction_check");
|
|
593576
593680
|
return {
|
|
593577
593681
|
rendered: renderDeliveryCoverageState(evaluated, loaded.path),
|
|
593578
593682
|
gaps: evaluated.gaps.map((gap) => `[${gap.code}] ${gap.claimId}: ${gap.detail}`),
|
|
593579
|
-
completionReady: evaluated.completionReady
|
|
593683
|
+
completionReady: evaluated.completionReady,
|
|
593684
|
+
...firstInspectionGap ? { nextInspection: firstInspectionGap.detail } : {},
|
|
593685
|
+
sourcePath: loaded.path,
|
|
593686
|
+
evaluation: evaluated
|
|
593580
593687
|
};
|
|
593581
593688
|
}
|
|
593582
593689
|
_modelCapabilityProfile() {
|
|
@@ -593608,6 +593715,24 @@ evidence=${record.evidenceIds.join(",") || "none"}`
|
|
|
593608
593715
|
this._completionLedger = {
|
|
593609
593716
|
...this._completionLedger,
|
|
593610
593717
|
unresolved: [...retained, ...unresolved],
|
|
593718
|
+
deliveryCoverage: {
|
|
593719
|
+
manifestHash: coverage.evaluation.manifestHash,
|
|
593720
|
+
sourcePath: coverage.sourcePath,
|
|
593721
|
+
evaluatedAtIso: (/* @__PURE__ */ new Date()).toISOString(),
|
|
593722
|
+
claims: coverage.evaluation.claimStates.map((claim) => ({
|
|
593723
|
+
id: claim.id,
|
|
593724
|
+
state: claim.state,
|
|
593725
|
+
attainedState: claim.attainedState,
|
|
593726
|
+
missingInspectionIds: [...claim.missingInspectionIds],
|
|
593727
|
+
missingContradictionCheckIds: [...claim.missingContradictionCheckIds],
|
|
593728
|
+
missingAcceptanceIds: [...claim.missingAcceptanceIds]
|
|
593729
|
+
})),
|
|
593730
|
+
gaps: coverage.evaluation.gaps.map((gap) => ({
|
|
593731
|
+
claimId: gap.claimId,
|
|
593732
|
+
code: gap.code,
|
|
593733
|
+
detail: gap.detail
|
|
593734
|
+
}))
|
|
593735
|
+
},
|
|
593611
593736
|
status: coverage.completionReady && unresolved.length === 0 ? this._completionLedger.status : "incomplete_verification",
|
|
593612
593737
|
updatedAtIso: (/* @__PURE__ */ new Date()).toISOString()
|
|
593613
593738
|
};
|
|
@@ -594362,10 +594487,10 @@ ${read3.content}`;
|
|
|
594362
594487
|
if (!branchDerived && !partialMaterialization && path16) {
|
|
594363
594488
|
try {
|
|
594364
594489
|
const canonicalBody = input.result.output || input.output;
|
|
594365
|
-
const
|
|
594490
|
+
const canonicalPath2 = this._normalizeEvidencePath(path16);
|
|
594366
594491
|
const sourceRevision = typeof input.result.beforeHash === "string" ? input.result.beforeHash : _createHash("sha256").update(canonicalBody).digest("hex");
|
|
594367
594492
|
const stored = this._artifactStore().put({
|
|
594368
|
-
path:
|
|
594493
|
+
path: canonicalPath2,
|
|
594369
594494
|
revision: sourceRevision,
|
|
594370
594495
|
content: canonicalBody,
|
|
594371
594496
|
ranges: [{
|
|
@@ -594405,13 +594530,13 @@ ${read3.content}`;
|
|
|
594405
594530
|
ledger.linkDependency({ sourceRecordId: artifact.id, targetRecordId: result.id, relation: "derived_from", requiredForActiveWork: true });
|
|
594406
594531
|
ledger.linkDependency({ sourceRecordId: action.id, targetRecordId: artifact.id, relation: "requires", requiredForActiveWork: true });
|
|
594407
594532
|
if (!branchDerived && !partialMaterialization && path16) {
|
|
594408
|
-
const
|
|
594409
|
-
const previous = this._contextMemoryArtifactByPath.get(
|
|
594533
|
+
const canonicalPath2 = this._normalizeEvidencePath(path16);
|
|
594534
|
+
const previous = this._contextMemoryArtifactByPath.get(canonicalPath2);
|
|
594410
594535
|
const currentHash = typeof input.result.beforeHash === "string" ? input.result.beforeHash : void 0;
|
|
594411
594536
|
if (previous && previous.epoch === epoch && previous.contentHash && currentHash && previous.contentHash !== currentHash) {
|
|
594412
594537
|
ledger.supersedeArtifact(previous.recordId, artifact.id);
|
|
594413
594538
|
}
|
|
594414
|
-
this._contextMemoryArtifactByPath.set(
|
|
594539
|
+
this._contextMemoryArtifactByPath.set(canonicalPath2, {
|
|
594415
594540
|
recordId: artifact.id,
|
|
594416
594541
|
contentHash: currentHash,
|
|
594417
594542
|
...canonicalArtifactReference ? { artifactReference: canonicalArtifactReference } : {},
|
|
@@ -600229,7 +600354,8 @@ ${String(concreteGoal).replace(/\s+/g, " ").trim().slice(0, 1200)}` : null
|
|
|
600229
600354
|
tier: this.options.modelTier ?? "large",
|
|
600230
600355
|
includeCore: false,
|
|
600231
600356
|
includePhase: true,
|
|
600232
|
-
includeExplicit: false
|
|
600357
|
+
includeExplicit: false,
|
|
600358
|
+
includeDeliverySurface: Boolean(deliveryCoverageBlock)
|
|
600233
600359
|
});
|
|
600234
600360
|
const phaseSkillGuidance = buildPhaseSkillGuidance({
|
|
600235
600361
|
repoRoot: this.authoritativeWorkingDirectory(),
|
|
@@ -602029,12 +602155,12 @@ ${notice}`;
|
|
|
602029
602155
|
this._emitSteeringLifecycle(record, gatesOldPlan ? `admitted at turn ${turn}; old-plan actions are gated pending structured reconciliation` : `admitted at turn ${turn}; awaiting structured reconciliation`);
|
|
602030
602156
|
}
|
|
602031
602157
|
}
|
|
602032
|
-
_canonicalReadEvidencePayload(
|
|
602033
|
-
const evidence = this._evidenceLedger.get(
|
|
602158
|
+
_canonicalReadEvidencePayload(canonicalPath2, contentHash2) {
|
|
602159
|
+
const evidence = this._evidenceLedger.get(canonicalPath2);
|
|
602034
602160
|
if (evidence && !evidence.stale && evidence.contentHash === contentHash2 && evidence.fidelity === "full" && this._mustHonorExplicitFullFileRead(Buffer.byteLength(evidence.content, "utf8"), evidence.content.split("\n").length, this._branchRoutingContextWindow())) {
|
|
602035
602161
|
return evidence.content;
|
|
602036
602162
|
}
|
|
602037
|
-
const branch = this._branchEvidenceByPath.get(
|
|
602163
|
+
const branch = this._branchEvidenceByPath.get(canonicalPath2);
|
|
602038
602164
|
if (branch && branch.contentHash === contentHash2 && branch.taskEpoch === this._taskEpoch && branch.contractComplete) {
|
|
602039
602165
|
return branch.output;
|
|
602040
602166
|
}
|
|
@@ -602485,17 +602611,17 @@ The steering reconciliation was emitted this turn. Wait for the next model decis
|
|
|
602485
602611
|
}
|
|
602486
602612
|
}
|
|
602487
602613
|
_evictInlineReadArtifacts(messages2, path16, contentHash2, reason) {
|
|
602488
|
-
const
|
|
602614
|
+
const canonicalPath2 = this._normalizeEvidencePath(path16);
|
|
602489
602615
|
let evicted = 0;
|
|
602490
602616
|
for (const [callId, artifact] of this._inlineReadArtifacts) {
|
|
602491
|
-
if (artifact.path !==
|
|
602617
|
+
if (artifact.path !== canonicalPath2 || artifact.contentHash !== contentHash2) {
|
|
602492
602618
|
continue;
|
|
602493
602619
|
}
|
|
602494
602620
|
const message2 = messages2.find((candidate) => candidate.role === "tool" && candidate.tool_call_id === artifact.callId);
|
|
602495
602621
|
if (message2) {
|
|
602496
602622
|
message2.content = [
|
|
602497
602623
|
"[FULL_FILE_READ_EVICTED]",
|
|
602498
|
-
`path=${
|
|
602624
|
+
`path=${canonicalPath2}`,
|
|
602499
602625
|
`sha256=${contentHash2}`,
|
|
602500
602626
|
`reason=${reason}`,
|
|
602501
602627
|
"The full body was deliberately removed after a verified evidence extraction. Use the newer anchored extraction result; re-read only if the file changes or a distinct range is required."
|
|
@@ -602598,15 +602724,15 @@ The steering reconciliation was emitted this turn. Wait for the next model decis
|
|
|
602598
602724
|
purpose: typeof input.args["purpose"] === "string" ? input.args["purpose"] : void 0
|
|
602599
602725
|
});
|
|
602600
602726
|
const contractFingerprint = _createHash("sha256").update(JSON.stringify(branchBrief.discoveryContract ?? branchBrief)).digest("hex").slice(0, 20);
|
|
602601
|
-
const
|
|
602602
|
-
const branchRequestId = `branch:${this._taskEpoch}:${_createHash("sha256").update(`${
|
|
602603
|
-
const cacheKey = `${this._taskEpoch}|${
|
|
602727
|
+
const canonicalPath2 = this._normalizeEvidencePath(rawPath);
|
|
602728
|
+
const branchRequestId = `branch:${this._taskEpoch}:${_createHash("sha256").update(`${canonicalPath2}|${fullHash}|${offset ?? 0}:${limit ?? "EOF"}|${contractFingerprint}`).digest("hex").slice(0, 20)}`;
|
|
602729
|
+
const cacheKey = `${this._taskEpoch}|${canonicalPath2}|${fullHash}|${offset ?? 0}:${limit ?? "EOF"}|${contractFingerprint}`;
|
|
602604
602730
|
const cached2 = this._branchEvidenceCache.get(cacheKey);
|
|
602605
602731
|
if (cached2?.contractComplete) {
|
|
602606
602732
|
const fingerprint2 = this._buildToolFingerprint(input.toolName, input.args);
|
|
602607
602733
|
const rehydrated = this._rehydrateResolvedReadEvidence({
|
|
602608
602734
|
fingerprint: fingerprint2,
|
|
602609
|
-
canonicalPath,
|
|
602735
|
+
canonicalPath: canonicalPath2,
|
|
602610
602736
|
contentHash: fullHash,
|
|
602611
602737
|
payload: cached2.output,
|
|
602612
602738
|
turn: input.turn
|
|
@@ -602619,7 +602745,7 @@ The steering reconciliation was emitted this turn. Wait for the next model decis
|
|
|
602619
602745
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
602620
602746
|
});
|
|
602621
602747
|
if (explicitExtraction) {
|
|
602622
|
-
this._evictInlineReadArtifacts(input.messages,
|
|
602748
|
+
this._evictInlineReadArtifacts(input.messages, canonicalPath2, fullHash, "verified_branch_extract_cache");
|
|
602623
602749
|
}
|
|
602624
602750
|
return {
|
|
602625
602751
|
success: true,
|
|
@@ -602637,7 +602763,7 @@ The steering reconciliation was emitted this turn. Wait for the next model decis
|
|
|
602637
602763
|
schema: "omnius.branch-evidence.v1",
|
|
602638
602764
|
requestId: cached2.requestId,
|
|
602639
602765
|
taskEpoch: this._taskEpoch,
|
|
602640
|
-
path:
|
|
602766
|
+
path: canonicalPath2,
|
|
602641
602767
|
contentHash: fullHash,
|
|
602642
602768
|
sourceRange: {
|
|
602643
602769
|
startLine: startIndex + 1,
|
|
@@ -602705,7 +602831,7 @@ ${suffix}`.slice(0, outputBudgetChars);
|
|
|
602705
602831
|
}
|
|
602706
602832
|
this._branchEvidenceCache.set(cacheKey, {
|
|
602707
602833
|
output,
|
|
602708
|
-
path:
|
|
602834
|
+
path: canonicalPath2,
|
|
602709
602835
|
contentHash: fullHash,
|
|
602710
602836
|
sourceBytes: stat9.size,
|
|
602711
602837
|
createdAt: Date.now(),
|
|
@@ -602720,7 +602846,7 @@ ${suffix}`.slice(0, outputBudgetChars);
|
|
|
602720
602846
|
searchRounds: ev.provenance.searchRounds.length
|
|
602721
602847
|
}
|
|
602722
602848
|
});
|
|
602723
|
-
this._branchEvidenceByPath.set(
|
|
602849
|
+
this._branchEvidenceByPath.set(canonicalPath2, {
|
|
602724
602850
|
output,
|
|
602725
602851
|
contentHash: fullHash,
|
|
602726
602852
|
mtimeMs: stat9.mtimeMs,
|
|
@@ -602730,12 +602856,12 @@ ${suffix}`.slice(0, outputBudgetChars);
|
|
|
602730
602856
|
unresolvedRecoveries: ev.requirementCoverage.filter((coverage) => coverage.status === "unresolved").map((coverage) => `${coverage.id}: ${coverage.recovery ?? "narrow recovery required"}`)
|
|
602731
602857
|
});
|
|
602732
602858
|
if (explicitExtraction) {
|
|
602733
|
-
const evicted = this._evictInlineReadArtifacts(input.messages,
|
|
602859
|
+
const evicted = this._evictInlineReadArtifacts(input.messages, canonicalPath2, fullHash, "verified_branch_extract");
|
|
602734
602860
|
if (evicted > 0) {
|
|
602735
602861
|
this.emit({
|
|
602736
602862
|
type: "status",
|
|
602737
602863
|
toolName: input.toolName,
|
|
602738
|
-
content: `Full read context evicted after verified branch extraction: ${
|
|
602864
|
+
content: `Full read context evicted after verified branch extraction: ${canonicalPath2} sha256=${fullHash.slice(0, 12)} artifacts=${evicted}`,
|
|
602739
602865
|
turn: input.turn,
|
|
602740
602866
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
602741
602867
|
});
|
|
@@ -602765,7 +602891,7 @@ ${suffix}`.slice(0, outputBudgetChars);
|
|
|
602765
602891
|
schema: "omnius.branch-evidence.v1",
|
|
602766
602892
|
requestId: branchRequestId,
|
|
602767
602893
|
taskEpoch: this._taskEpoch,
|
|
602768
|
-
path:
|
|
602894
|
+
path: canonicalPath2,
|
|
602769
602895
|
contentHash: fullHash,
|
|
602770
602896
|
sourceRange: {
|
|
602771
602897
|
startLine: startIndex + 1,
|
|
@@ -604531,6 +604657,34 @@ ${dynamicProjectContext}`
|
|
|
604531
604657
|
messages2.push({ role: "system", content: feedback });
|
|
604532
604658
|
return true;
|
|
604533
604659
|
};
|
|
604660
|
+
const holdDeliveryCoverageTaskComplete = (turn) => {
|
|
604661
|
+
const coverage = this._deliveryCoverageState();
|
|
604662
|
+
if (!coverage || coverage.completionReady)
|
|
604663
|
+
return false;
|
|
604664
|
+
this._reconcileDeliveryCoverageForCompletion();
|
|
604665
|
+
this._saveCompletionLedgerSafe();
|
|
604666
|
+
const gaps = coverage.gaps.slice(0, 6);
|
|
604667
|
+
const feedback = [
|
|
604668
|
+
"[COMPLETION BLOCKED — delivery claim evidence incomplete]",
|
|
604669
|
+
"A declared delivery claim cannot be promoted beyond its current evidence state.",
|
|
604670
|
+
"Open claim deltas:",
|
|
604671
|
+
...gaps.length > 0 ? gaps.map((gap) => ` - ${gap}`) : [" - delivery coverage is not completion-ready"],
|
|
604672
|
+
"",
|
|
604673
|
+
coverage.nextInspection ? `Smallest next observation: ${coverage.nextInspection}` : "Run the missing canonical acceptance command or mark the claim blocked with its real prerequisite.",
|
|
604674
|
+
"Do not replace a missing source inspection with a grep/listing, partial read, or prose summary."
|
|
604675
|
+
].join("\n");
|
|
604676
|
+
lastCompletionGateReason = gaps.join("; ") || "delivery claim evidence incomplete";
|
|
604677
|
+
lastCompletionGateFeedback = feedback;
|
|
604678
|
+
lastCompletionGateCode = "delivery_coverage";
|
|
604679
|
+
messages2.push({ role: "system", content: feedback });
|
|
604680
|
+
this.emit({
|
|
604681
|
+
type: "status",
|
|
604682
|
+
content: `task_complete held by delivery coverage gate: ${lastCompletionGateReason.slice(0, 360)}`,
|
|
604683
|
+
turn,
|
|
604684
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
604685
|
+
});
|
|
604686
|
+
return true;
|
|
604687
|
+
};
|
|
604534
604688
|
const completionHoldEscapeMax = (() => {
|
|
604535
604689
|
const raw = Number(process.env["OMNIUS_COMPLETION_HOLD_MAX"]);
|
|
604536
604690
|
return Number.isFinite(raw) && raw >= 1 ? Math.floor(raw) : 3;
|
|
@@ -604579,7 +604733,7 @@ ${lastCompletionGateFeedback.trim().slice(0, 4e3)}` : ""
|
|
|
604579
604733
|
lastCompletionGateCode = "";
|
|
604580
604734
|
return true;
|
|
604581
604735
|
}
|
|
604582
|
-
const held = holdCompileFixLoopTaskComplete(turn) || holdUnresolvedVerificationTaskComplete(turn) || holdNoProgressTaskComplete(args, turn) || holdProvenanceTaskComplete(args, turn);
|
|
604736
|
+
const held = holdDeliveryCoverageTaskComplete(turn) || holdCompileFixLoopTaskComplete(turn) || holdUnresolvedVerificationTaskComplete(turn) || holdNoProgressTaskComplete(args, turn) || holdProvenanceTaskComplete(args, turn);
|
|
604583
604737
|
if (!held) {
|
|
604584
604738
|
this._completionHoldState.count = 0;
|
|
604585
604739
|
this._completionHoldState.lastKey = "";
|
|
@@ -604591,7 +604745,7 @@ ${lastCompletionGateFeedback.trim().slice(0, 4e3)}` : ""
|
|
|
604591
604745
|
this._focusSupervisor?.markCompletionBlocked({
|
|
604592
604746
|
turn,
|
|
604593
604747
|
reason: lastCompletionGateReason || "completion requested before required evidence was present",
|
|
604594
|
-
requiredNextAction: lastCompletionGateCode === "compile_error_fix_loop" ? "run_verification" : lastCompletionGateCode === "todo_verification" ? "run_verification" : "update_todos"
|
|
604748
|
+
requiredNextAction: lastCompletionGateCode === "delivery_coverage" ? "read_authoritative_target" : lastCompletionGateCode === "compile_error_fix_loop" ? "run_verification" : lastCompletionGateCode === "todo_verification" ? "run_verification" : "update_todos"
|
|
604595
604749
|
});
|
|
604596
604750
|
const focusDirective = this._focusSupervisor?.snapshot().directive;
|
|
604597
604751
|
if (focusDirective) {
|
|
@@ -614544,15 +614698,15 @@ ${telegramPersonaHead}` : stripped
|
|
|
614544
614698
|
}).slice(0, maxRecoverFiles);
|
|
614545
614699
|
let recoveredTokens = 0;
|
|
614546
614700
|
for (const [filePath, entry] of entries) {
|
|
614547
|
-
const
|
|
614548
|
-
if (alreadyVisiblePaths.has(
|
|
614701
|
+
const canonicalPath2 = this._normalizeEvidencePath(filePath);
|
|
614702
|
+
if (alreadyVisiblePaths.has(canonicalPath2))
|
|
614549
614703
|
continue;
|
|
614550
614704
|
try {
|
|
614551
614705
|
const { readFileSync: readFileSync147 } = await import("node:fs");
|
|
614552
614706
|
const absolutePath = this._absoluteToolPath(filePath);
|
|
614553
614707
|
const content = readFileSync147(absolutePath, "utf8");
|
|
614554
614708
|
const tokenEst = Math.ceil(content.length / 4);
|
|
614555
|
-
const branchNode = this._branchEvidenceByPath.get(
|
|
614709
|
+
const branchNode = this._branchEvidenceByPath.get(canonicalPath2);
|
|
614556
614710
|
const currentMtime = this._statMtimeMsForToolPath(filePath) ?? 0;
|
|
614557
614711
|
const smallCompleteSource = this._mustHonorExplicitFullFileRead(Buffer.byteLength(content, "utf8"), content.split("\n").length, this._branchRoutingContextWindow());
|
|
614558
614712
|
if (smallCompleteSource) {
|
|
@@ -614565,7 +614719,7 @@ ${telegramPersonaHead}` : stripped
|
|
|
614565
614719
|
${content}
|
|
614566
614720
|
</recovered-file>`
|
|
614567
614721
|
});
|
|
614568
|
-
alreadyVisiblePaths.add(
|
|
614722
|
+
alreadyVisiblePaths.add(canonicalPath2);
|
|
614569
614723
|
recoveredFiles.push(filePath);
|
|
614570
614724
|
recoveredTokens += sourceTokens;
|
|
614571
614725
|
continue;
|
|
@@ -614585,7 +614739,7 @@ ${branchNode.output}
|
|
|
614585
614739
|
});
|
|
614586
614740
|
recoveredFiles.push(filePath);
|
|
614587
614741
|
recoveredTokens += nodeTokens;
|
|
614588
|
-
alreadyVisiblePaths.add(
|
|
614742
|
+
alreadyVisiblePaths.add(canonicalPath2);
|
|
614589
614743
|
continue;
|
|
614590
614744
|
}
|
|
614591
614745
|
if (branchNode && !branchNode.contractComplete) {
|
|
@@ -614594,7 +614748,7 @@ ${branchNode.output}
|
|
|
614594
614748
|
if (recoveredTokens + referenceTokens > fileRecoveryBudget)
|
|
614595
614749
|
continue;
|
|
614596
614750
|
result.push({ role: "system", content: partialReference });
|
|
614597
|
-
alreadyVisiblePaths.add(
|
|
614751
|
+
alreadyVisiblePaths.add(canonicalPath2);
|
|
614598
614752
|
recoveredFiles.push(filePath);
|
|
614599
614753
|
recoveredTokens += referenceTokens;
|
|
614600
614754
|
continue;
|
|
@@ -614613,7 +614767,7 @@ ${branchNode.output}
|
|
|
614613
614767
|
const referenceTokens = Math.ceil(reference.length / 4);
|
|
614614
614768
|
if (recoveredTokens + referenceTokens <= fileRecoveryBudget) {
|
|
614615
614769
|
result.push({ role: "system", content: reference });
|
|
614616
|
-
alreadyVisiblePaths.add(
|
|
614770
|
+
alreadyVisiblePaths.add(canonicalPath2);
|
|
614617
614771
|
recoveredFiles.push(filePath);
|
|
614618
614772
|
recoveredTokens += referenceTokens;
|
|
614619
614773
|
}
|
|
@@ -614977,6 +615131,7 @@ ${trimmedNew}`;
|
|
|
614977
615131
|
...coverage?.gaps.slice(0, 3) ?? []
|
|
614978
615132
|
].filter(Boolean).join(" | ") || "none"}`,
|
|
614979
615133
|
`surviving_blockers=${[...blockedTodos, ...coverage?.gaps.slice(0, 3) ?? []].join(" | ") || "none"}`,
|
|
615134
|
+
`next_claim_inspection=${coverage?.nextInspection?.replace(/\s+/g, " ").slice(0, 420) || "none"}`,
|
|
614980
615135
|
`evidence_handles=${evidenceHandles.join(",") || "none"}`
|
|
614981
615136
|
];
|
|
614982
615137
|
const tier = this.options.modelTier ?? "large";
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.571",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.571",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED
|
@@ -50,7 +50,13 @@ correctness, transport routing, CAN fragmentation, or actuator behavior.
|
|
|
50
50
|
## Product and provenance coverage
|
|
51
51
|
|
|
52
52
|
If `.omnius/delivery-coverage.json` is present, it is the structured claim
|
|
53
|
-
contract. Read its gaps and keep final wording within the declared state.
|
|
53
|
+
contract. Read its gaps and keep final wording within the declared state. For
|
|
54
|
+
schema version 2, each non-blocked claim must name fresh, full, content-hashed
|
|
55
|
+
source inspections for every relevant boundary and at least one named
|
|
56
|
+
contradiction check grounded in those inspections. A grep result, directory
|
|
57
|
+
listing, partial read, stale read, or a summary of source does not satisfy an
|
|
58
|
+
inspection. Treat the first missing inspection as the next discovery action;
|
|
59
|
+
this is a state delta, not a standing recovery instruction.
|
|
54
60
|
Every product series, command, parameter, and model format claimed as
|
|
55
61
|
supported must map to exactly one source-backed contract and provenance record.
|
|
56
62
|
Each selected acceptance layer must also name its canonical verification
|