@agent-teams/engineering-foundation 4.0.3 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/capabilities/documentation-local-references/adapters/inbound/configuration/load-capability-config.d.ts +2 -2
- package/dist/capabilities/documentation-local-references/adapters/inbound/configuration/load-capability-config.d.ts.map +1 -1
- package/dist/capabilities/documentation-local-references/adapters/inbound/configuration/load-capability-config.js +10 -2
- package/dist/capabilities/documentation-local-references/adapters/inbound/configuration/load-capability-config.js.map +1 -1
- package/dist/capabilities/documentation-local-references/adapters/inbound/configuration/parse-capability-config.d.ts.map +1 -1
- package/dist/capabilities/documentation-local-references/adapters/inbound/configuration/parse-capability-config.js +72 -4
- package/dist/capabilities/documentation-local-references/adapters/inbound/configuration/parse-capability-config.js.map +1 -1
- package/dist/capabilities/documentation-local-references/adapters/outbound/crypto/node-markdown-source-digest.d.ts +2 -0
- package/dist/capabilities/documentation-local-references/adapters/outbound/crypto/node-markdown-source-digest.d.ts.map +1 -0
- package/dist/capabilities/documentation-local-references/adapters/outbound/crypto/node-markdown-source-digest.js +9 -0
- package/dist/capabilities/documentation-local-references/adapters/outbound/crypto/node-markdown-source-digest.js.map +1 -0
- package/dist/capabilities/documentation-local-references/application/model/documentation-local-references.d.ts +13 -0
- package/dist/capabilities/documentation-local-references/application/model/documentation-local-references.d.ts.map +1 -1
- package/dist/capabilities/documentation-local-references/application/policies/admit-historical-artifacts.d.ts +12 -0
- package/dist/capabilities/documentation-local-references/application/policies/admit-historical-artifacts.d.ts.map +1 -0
- package/dist/capabilities/documentation-local-references/application/policies/admit-historical-artifacts.js +49 -0
- package/dist/capabilities/documentation-local-references/application/policies/admit-historical-artifacts.js.map +1 -0
- package/dist/capabilities/documentation-local-references/application/policies/evaluate-documentation-local-references.d.ts.map +1 -1
- package/dist/capabilities/documentation-local-references/application/policies/evaluate-documentation-local-references.js +42 -0
- package/dist/capabilities/documentation-local-references/application/policies/evaluate-documentation-local-references.js.map +1 -1
- package/dist/capabilities/documentation-local-references/application/rules.d.ts +2 -0
- package/dist/capabilities/documentation-local-references/application/rules.d.ts.map +1 -1
- package/dist/capabilities/documentation-local-references/application/rules.js +5 -3
- package/dist/capabilities/documentation-local-references/application/rules.js.map +1 -1
- package/dist/capabilities/documentation-local-references/application/use-cases/analyze-documentation-local-references.d.ts +1 -0
- package/dist/capabilities/documentation-local-references/application/use-cases/analyze-documentation-local-references.d.ts.map +1 -1
- package/dist/capabilities/documentation-local-references/application/use-cases/analyze-documentation-local-references.js +6 -0
- package/dist/capabilities/documentation-local-references/application/use-cases/analyze-documentation-local-references.js.map +1 -1
- package/dist/capabilities/documentation-local-references/contract/config.d.ts +1 -1
- package/dist/capabilities/documentation-local-references/contract/config.js +1 -1
- package/dist/capabilities/documentation-local-references/module.d.ts.map +1 -1
- package/dist/capabilities/documentation-local-references/module.js +22 -10
- package/dist/capabilities/documentation-local-references/module.js.map +1 -1
- package/dist/capabilities/documentation-local-references/schemas.d.ts +1 -1
- package/dist/capabilities/documentation-local-references/schemas.d.ts.map +1 -1
- package/dist/capabilities/documentation-local-references/schemas.js +1 -0
- package/dist/capabilities/documentation-local-references/schemas.js.map +1 -1
- package/dist/schema-catalog.d.ts +1 -1
- package/dist/schema-catalog.d.ts.map +1 -1
- package/dist/schema-ids.d.ts +1 -1
- package/dist/schema-ids.d.ts.map +1 -1
- package/package.json +2 -1
- package/schemas/documentation-local-references/v2.schema.json +99 -0
package/README.md
CHANGED
|
@@ -205,6 +205,16 @@ The current built-in Composition is a testing-only conformance fixture. Product
|
|
|
205
205
|
package and feature recipes, structured updates, and Nx integration require
|
|
206
206
|
separate capability qualification before they become available.
|
|
207
207
|
|
|
208
|
+
## Exact historical Markdown artifacts
|
|
209
|
+
|
|
210
|
+
The current source adds `documentation-local-references/v2` for explicitly
|
|
211
|
+
declared historical artifacts. It binds exact paths, raw SHA-256 and complete
|
|
212
|
+
absolute-reference occurrences while retaining the configured roots and all
|
|
213
|
+
ordinary checks. Historical information remains in passing reports; changed
|
|
214
|
+
bytes, stale declarations and ordinary errors reject. Version 1 remains
|
|
215
|
+
unchanged. See the [contract and limits](../../docs/reference/documentation-local-references.md).
|
|
216
|
+
Use a published package that includes this schema before explicit consumer adoption.
|
|
217
|
+
|
|
208
218
|
## Disposable scaffold crash qualification
|
|
209
219
|
|
|
210
220
|
Developer tests can import `runScaffoldCrashQualification` and the types
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DocumentationLocalReferencesPolicy } from "../../../application/model/documentation-local-references.js";
|
|
2
2
|
export interface DocumentationConfigurationDependencies {
|
|
3
3
|
readonly readYaml: (consumerRoot: string, configPath: string, phase: string, signal?: AbortSignal) => Promise<unknown>;
|
|
4
|
-
readonly assertSchema: (schemaId: "documentation-local-references/v1", input: unknown, phase: string) => Promise<void>;
|
|
4
|
+
readonly assertSchema: (schemaId: "documentation-local-references/v1" | "documentation-local-references/v2", input: unknown, phase: string) => Promise<void>;
|
|
5
5
|
}
|
|
6
|
-
export declare function loadCapabilityConfig(dependencies: DocumentationConfigurationDependencies, consumerRoot: string, configPath: string, signal?: AbortSignal): Promise<DocumentationLocalReferencesPolicy>;
|
|
6
|
+
export declare function loadCapabilityConfig(dependencies: DocumentationConfigurationDependencies, consumerRoot: string, configPath: string, signal?: AbortSignal, observeSchemaVersion?: (version: 1 | 2) => void): Promise<DocumentationLocalReferencesPolicy>;
|
|
7
7
|
//# sourceMappingURL=load-capability-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-capability-config.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/documentation-local-references/adapters/inbound/configuration/load-capability-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,8DAA8D,CAAC;AAGvH,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,QAAQ,EAAE,CACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,CACrB,QAAQ,EAAE,mCAAmC,
|
|
1
|
+
{"version":3,"file":"load-capability-config.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/documentation-local-references/adapters/inbound/configuration/load-capability-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,8DAA8D,CAAC;AAGvH,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,QAAQ,EAAE,CACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,CACrB,QAAQ,EAAE,mCAAmC,GAAG,mCAAmC,EACnF,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,KACV,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED,wBAAsB,oBAAoB,CACxC,YAAY,EAAE,sCAAsC,EACpD,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,EACpB,oBAAoB,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,GAC9C,OAAO,CAAC,kCAAkC,CAAC,CAsB7C"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { parseCapabilityConfig } from "./parse-capability-config.js";
|
|
2
|
-
export async function loadCapabilityConfig(dependencies, consumerRoot, configPath, signal) {
|
|
2
|
+
export async function loadCapabilityConfig(dependencies, consumerRoot, configPath, signal, observeSchemaVersion) {
|
|
3
3
|
const input = await dependencies.readYaml(consumerRoot, configPath, "documentation-local-references-config", signal);
|
|
4
|
-
|
|
4
|
+
const version = typeof input === "object" &&
|
|
5
|
+
input !== null &&
|
|
6
|
+
!Array.isArray(input) &&
|
|
7
|
+
"schemaVersion" in input &&
|
|
8
|
+
input.schemaVersion === 2
|
|
9
|
+
? 2
|
|
10
|
+
: 1;
|
|
11
|
+
observeSchemaVersion?.(version);
|
|
12
|
+
await dependencies.assertSchema(version === 2 ? "documentation-local-references/v2" : "documentation-local-references/v1", input, "documentation-local-references-config");
|
|
5
13
|
return parseCapabilityConfig(input);
|
|
6
14
|
}
|
|
7
15
|
//# sourceMappingURL=load-capability-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-capability-config.js","sourceRoot":"","sources":["../../../../../../src/capabilities/documentation-local-references/adapters/inbound/configuration/load-capability-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAgBrE,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,YAAoD,EACpD,YAAoB,EACpB,UAAkB,EAClB,MAAoB;
|
|
1
|
+
{"version":3,"file":"load-capability-config.js","sourceRoot":"","sources":["../../../../../../src/capabilities/documentation-local-references/adapters/inbound/configuration/load-capability-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAgBrE,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,YAAoD,EACpD,YAAoB,EACpB,UAAkB,EAClB,MAAoB,EACpB,oBAA+C;IAE/C,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,QAAQ,CACvC,YAAY,EACZ,UAAU,EACV,uCAAuC,EACvC,MAAM,CACP,CAAC;IACF,MAAM,OAAO,GACX,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB,eAAe,IAAI,KAAK;QACxB,KAAK,CAAC,aAAa,KAAK,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,CAAC,CAAC;IACR,oBAAoB,EAAE,CAAC,OAAO,CAAC,CAAC;IAChC,MAAM,YAAY,CAAC,YAAY,CAC7B,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,mCAAmC,EACzF,KAAK,EACL,uCAAuC,CACxC,CAAC;IACF,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-capability-config.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/documentation-local-references/adapters/inbound/configuration/parse-capability-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"parse-capability-config.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/documentation-local-references/adapters/inbound/configuration/parse-capability-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kCAAkC,EAGnC,MAAM,8DAA8D,CAAC;AAgHtE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,kCAAkC,CAoCxF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { configurationInputError as inputError, assertConfigRepositoryRelativePath, } from "../../../application/configuration-input.js";
|
|
2
|
-
import { CAPABILITY_CONFIG_SCHEMA_VERSION } from "../../../contract/config.js";
|
|
3
2
|
function record(value, field) {
|
|
4
3
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
5
4
|
inputError(`${field} must be an object.`);
|
|
@@ -25,11 +24,77 @@ function onlyKeys(value, keys, field) {
|
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
}
|
|
27
|
+
function positiveInteger(value, field, maximum) {
|
|
28
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1 || value > maximum) {
|
|
29
|
+
inputError(field + " must be a positive integer at most " + maximum + ".");
|
|
30
|
+
}
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
function historicalReferences(value) {
|
|
34
|
+
if (!Array.isArray(value) || value.length === 0 || value.length > 1000) {
|
|
35
|
+
inputError("historical artifact references must contain between 1 and 1000 occurrences.");
|
|
36
|
+
}
|
|
37
|
+
const occurrences = new Set();
|
|
38
|
+
return Object.freeze(value.map((entry) => {
|
|
39
|
+
const reference = record(entry, "historical reference");
|
|
40
|
+
onlyKeys(reference, ["kind", "line", "column", "rawTarget"], "historical reference");
|
|
41
|
+
const kind = reference["kind"];
|
|
42
|
+
if (kind !== "link" && kind !== "image" && kind !== "definition") {
|
|
43
|
+
inputError("historical reference kind must be link, image, or definition.");
|
|
44
|
+
}
|
|
45
|
+
const line = positiveInteger(reference["line"], "historical reference line", 50_000);
|
|
46
|
+
const column = positiveInteger(reference["column"], "historical reference column", 4_194_304);
|
|
47
|
+
const rawTarget = string(reference["rawTarget"], "historical reference rawTarget");
|
|
48
|
+
if (rawTarget.length === 0 || rawTarget.length > 16_384) {
|
|
49
|
+
inputError("historical reference rawTarget must contain between 1 and 16384 characters.");
|
|
50
|
+
}
|
|
51
|
+
const identity = JSON.stringify([kind, line, column]);
|
|
52
|
+
if (occurrences.has(identity)) {
|
|
53
|
+
inputError("historical artifact references contain a duplicate occurrence.");
|
|
54
|
+
}
|
|
55
|
+
occurrences.add(identity);
|
|
56
|
+
return Object.freeze({ kind, line, column, rawTarget });
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
function historicalArtifacts(value, markdownRoots) {
|
|
60
|
+
if (!Array.isArray(value) || value.length === 0 || value.length > 100) {
|
|
61
|
+
inputError("historicalArtifacts must contain between 1 and 100 artifacts.");
|
|
62
|
+
}
|
|
63
|
+
const paths = new Set();
|
|
64
|
+
return Object.freeze(value.map((entry) => {
|
|
65
|
+
const artifact = record(entry, "historical artifact");
|
|
66
|
+
onlyKeys(artifact, ["path", "sha256", "references"], "historical artifact");
|
|
67
|
+
const path = string(artifact["path"], "historical artifact path");
|
|
68
|
+
assertConfigRepositoryRelativePath(path);
|
|
69
|
+
if (path.length > 300 || !/\.md$/iu.test(path)) {
|
|
70
|
+
inputError("historical artifact path must identify a Markdown file within 300 characters.");
|
|
71
|
+
}
|
|
72
|
+
if (!markdownRoots.some((root) => path.startsWith(root + "/"))) {
|
|
73
|
+
inputError("historical artifact path must be beneath a configured Markdown root: " + path + ".");
|
|
74
|
+
}
|
|
75
|
+
if (paths.has(path)) {
|
|
76
|
+
inputError("historicalArtifacts contains a duplicate path: " + path + ".");
|
|
77
|
+
}
|
|
78
|
+
paths.add(path);
|
|
79
|
+
const sha256 = string(artifact["sha256"], "historical artifact sha256");
|
|
80
|
+
if (!/^[a-f0-9]{64}$/u.test(sha256)) {
|
|
81
|
+
inputError("historical artifact sha256 must contain exactly 64 lowercase hexadecimal digits.");
|
|
82
|
+
}
|
|
83
|
+
return Object.freeze({
|
|
84
|
+
path,
|
|
85
|
+
sha256,
|
|
86
|
+
references: historicalReferences(artifact["references"]),
|
|
87
|
+
});
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
28
90
|
export function parseCapabilityConfig(input) {
|
|
29
91
|
const root = record(input, "documentation local references config");
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
92
|
+
const version = root["schemaVersion"];
|
|
93
|
+
onlyKeys(root, version === 2
|
|
94
|
+
? ["schemaVersion", "markdownRoots", "anchorProfile", "historicalArtifacts"]
|
|
95
|
+
: ["schemaVersion", "markdownRoots", "anchorProfile"], "config");
|
|
96
|
+
if (version !== 1 && version !== 2) {
|
|
97
|
+
inputError("schemaVersion must be 1 or 2.");
|
|
33
98
|
}
|
|
34
99
|
const markdownRoots = strings(root["markdownRoots"], "markdownRoots");
|
|
35
100
|
if (markdownRoots.length === 0) {
|
|
@@ -50,6 +115,9 @@ export function parseCapabilityConfig(input) {
|
|
|
50
115
|
return Object.freeze({
|
|
51
116
|
anchorProfile,
|
|
52
117
|
markdownRoots: Object.freeze([...markdownRoots].toSorted()),
|
|
118
|
+
...(version === 2
|
|
119
|
+
? { historicalArtifacts: historicalArtifacts(root["historicalArtifacts"], markdownRoots) }
|
|
120
|
+
: {}),
|
|
53
121
|
});
|
|
54
122
|
}
|
|
55
123
|
//# sourceMappingURL=parse-capability-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-capability-config.js","sourceRoot":"","sources":["../../../../../../src/capabilities/documentation-local-references/adapters/inbound/configuration/parse-capability-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse-capability-config.js","sourceRoot":"","sources":["../../../../../../src/capabilities/documentation-local-references/adapters/inbound/configuration/parse-capability-config.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,uBAAuB,IAAI,UAAU,EACrC,kCAAkC,GACnC,MAAM,6CAA6C,CAAC;AAErD,SAAS,MAAM,CAAC,KAAc,EAAE,KAAa;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,UAAU,CAAC,GAAG,KAAK,qBAAqB,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,KAAgC,CAAC;AAC1C,CAAC;AAED,SAAS,MAAM,CAAC,KAAc,EAAE,KAAa;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,UAAU,CAAC,GAAG,KAAK,oBAAoB,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,OAAO,CAAC,KAAc,EAAE,KAAa;IAC5C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,EAAE,CAAC;QAC9E,UAAU,CAAC,GAAG,KAAK,+BAA+B,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,KAA0B,CAAC;AACpC,CAAC;AAED,SAAS,QAAQ,CAAC,KAA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A6C,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,aAAa;QACb,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC3D,GAAG,CAAC,OAAO,KAAK,CAAC;YACf,CAAC,CAAC,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,aAAa,CAAC,EAAE;YAC1F,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-markdown-source-digest.d.ts","sourceRoot":"","sources":["../../../../../../src/capabilities/documentation-local-references/adapters/outbound/crypto/node-markdown-source-digest.ts"],"names":[],"mappings":"AAMA,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE3D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
// Markdown observation decodes valid UTF-8 fatally and preserves the BOM.
|
|
3
|
+
// Its source is unmodified: UTF-8 encoding preserves the observed raw bytes,
|
|
4
|
+
// including CRLF and non-ASCII text. Never reread a file to authorize a
|
|
5
|
+
// classification of a different observation.
|
|
6
|
+
export function digestMarkdownSource(source) {
|
|
7
|
+
return createHash("sha256").update(source, "utf8").digest("hex");
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=node-markdown-source-digest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-markdown-source-digest.js","sourceRoot":"","sources":["../../../../../../src/capabilities/documentation-local-references/adapters/outbound/crypto/node-markdown-source-digest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,0EAA0E;AAC1E,6EAA6E;AAC7E,wEAAwE;AACxE,6CAA6C;AAC7C,MAAM,UAAU,oBAAoB,CAAC,MAAc;IACjD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import type { MarkdownAnchorProfile, MarkdownReferenceObservation, MarkdownReferenceResolution, MarkdownRepositoryObservation } from "@agent-teams/document-authoring/observation";
|
|
2
|
+
export interface HistoricalMarkdownReference {
|
|
3
|
+
readonly kind: MarkdownReferenceObservation["kind"];
|
|
4
|
+
readonly line: number;
|
|
5
|
+
readonly column: number;
|
|
6
|
+
readonly rawTarget: string;
|
|
7
|
+
}
|
|
8
|
+
export interface HistoricalMarkdownArtifact {
|
|
9
|
+
readonly path: string;
|
|
10
|
+
readonly sha256: string;
|
|
11
|
+
readonly references: readonly HistoricalMarkdownReference[];
|
|
12
|
+
}
|
|
2
13
|
export interface DocumentationLocalReferencesPolicy {
|
|
3
14
|
readonly anchorProfile: MarkdownAnchorProfile;
|
|
4
15
|
readonly markdownRoots: readonly string[];
|
|
16
|
+
readonly historicalArtifacts?: readonly HistoricalMarkdownArtifact[];
|
|
5
17
|
}
|
|
6
18
|
export interface ResolvedMarkdownReferenceObservation {
|
|
7
19
|
readonly reference: MarkdownReferenceObservation;
|
|
@@ -11,5 +23,6 @@ export interface ResolvedMarkdownReferenceObservation {
|
|
|
11
23
|
export interface DocumentationLocalReferencesObservation {
|
|
12
24
|
readonly repository: MarkdownRepositoryObservation;
|
|
13
25
|
readonly resolvedReferences: readonly ResolvedMarkdownReferenceObservation[];
|
|
26
|
+
readonly sourceDigests: ReadonlyMap<string, string>;
|
|
14
27
|
}
|
|
15
28
|
//# sourceMappingURL=documentation-local-references.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentation-local-references.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/model/documentation-local-references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,6CAA6C,CAAC;AAErD,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"documentation-local-references.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/model/documentation-local-references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,6CAA6C,CAAC;AAErD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAC,MAAM,CAAC,CAAC;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,SAAS,2BAA2B,EAAE,CAAC;CAC7D;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;CACtE;AAED,MAAM,WAAW,oCAAoC;IACnD,QAAQ,CAAC,SAAS,EAAE,4BAA4B,CAAC;IACjD,QAAQ,CAAC,UAAU,EAAE,2BAA2B,CAAC;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,UAAU,EAAE,6BAA6B,CAAC;IACnD,QAAQ,CAAC,kBAAkB,EAAE,SAAS,oCAAoC,EAAE,CAAC;IAC7E,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DocumentationLocalReferencesObservation, DocumentationLocalReferencesPolicy, HistoricalMarkdownArtifact } from "../model/documentation-local-references.js";
|
|
2
|
+
interface HistoricalArtifactIssue {
|
|
3
|
+
readonly artifact: HistoricalMarkdownArtifact;
|
|
4
|
+
readonly actualSha256?: string;
|
|
5
|
+
readonly reason: "source-unobserved" | "source-digest-mismatch" | "reference-set-mismatch";
|
|
6
|
+
}
|
|
7
|
+
export declare function admitHistoricalArtifacts(policy: DocumentationLocalReferencesPolicy, observation: DocumentationLocalReferencesObservation): {
|
|
8
|
+
readonly admitted: ReadonlyMap<string, HistoricalMarkdownArtifact>;
|
|
9
|
+
readonly issues: readonly HistoricalArtifactIssue[];
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=admit-historical-artifacts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admit-historical-artifacts.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/policies/admit-historical-artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uCAAuC,EACvC,kCAAkC,EAClC,0BAA0B,EAE3B,MAAM,4CAA4C,CAAC;AAEpD,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;IAC9C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,GAAG,wBAAwB,GAAG,wBAAwB,CAAC;CAC5F;AAMD,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,kCAAkC,EAC1C,WAAW,EAAE,uCAAuC,GACnD;IACD,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IACnE,QAAQ,CAAC,MAAM,EAAE,SAAS,uBAAuB,EAAE,CAAC;CACrD,CA8CA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
function occurrenceKey(reference) {
|
|
2
|
+
return JSON.stringify([reference.kind, reference.line, reference.column, reference.rawTarget]);
|
|
3
|
+
}
|
|
4
|
+
export function admitHistoricalArtifacts(policy, observation) {
|
|
5
|
+
if (policy.historicalArtifacts === undefined) {
|
|
6
|
+
return { admitted: new Map(), issues: [] };
|
|
7
|
+
}
|
|
8
|
+
const absoluteReferences = new Map();
|
|
9
|
+
for (const { reference, resolution, sourcePath } of observation.resolvedReferences) {
|
|
10
|
+
if (resolution.kind !== "unsafe" || resolution.reason !== "absolute-path") {
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
const references = absoluteReferences.get(sourcePath) ?? [];
|
|
14
|
+
references.push({
|
|
15
|
+
kind: reference.kind,
|
|
16
|
+
line: reference.location.line,
|
|
17
|
+
column: reference.location.column,
|
|
18
|
+
rawTarget: reference.rawTarget,
|
|
19
|
+
});
|
|
20
|
+
absoluteReferences.set(sourcePath, references);
|
|
21
|
+
}
|
|
22
|
+
const admitted = new Map();
|
|
23
|
+
const issues = [];
|
|
24
|
+
for (const artifact of policy.historicalArtifacts ?? []) {
|
|
25
|
+
const actualSha256 = observation.sourceDigests.get(artifact.path);
|
|
26
|
+
if (actualSha256 === undefined) {
|
|
27
|
+
issues.push({ artifact, reason: "source-unobserved" });
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (actualSha256 !== artifact.sha256) {
|
|
31
|
+
issues.push({ artifact, actualSha256, reason: "source-digest-mismatch" });
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const references = absoluteReferences.get(artifact.path) ?? [];
|
|
35
|
+
const observedKeys = new Set(references.map(occurrenceKey));
|
|
36
|
+
const declaredKeys = new Set(artifact.references.map(occurrenceKey));
|
|
37
|
+
if (artifact.references.length === 0 ||
|
|
38
|
+
declaredKeys.size !== artifact.references.length ||
|
|
39
|
+
observedKeys.size !== references.length ||
|
|
40
|
+
references.length !== artifact.references.length ||
|
|
41
|
+
[...declaredKeys].some((key) => !observedKeys.has(key))) {
|
|
42
|
+
issues.push({ artifact, actualSha256, reason: "reference-set-mismatch" });
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
admitted.set(artifact.path, artifact);
|
|
46
|
+
}
|
|
47
|
+
return { admitted, issues };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=admit-historical-artifacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admit-historical-artifacts.js","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/policies/admit-historical-artifacts.ts"],"names":[],"mappings":"AAaA,SAAS,aAAa,CAAC,SAAsC;IAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AACjG,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,MAA0C,EAC1C,WAAoD;IAKpD,IAAI,MAAM,CAAC,mBAAmB,KAAK,SAAS,EAAE,CAAC;QAC7C,OAAO,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC7C,CAAC;IACD,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAyC,CAAC;IAC5E,KAAK,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,WAAW,CAAC,kBAAkB,EAAE,CAAC;QACnF,IAAI,UAAU,CAAC,IAAI,KAAK,QAAQ,IAAI,UAAU,CAAC,MAAM,KAAK,eAAe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,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;QACrE,IACE,QAAQ,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC;YAChC,YAAY,CAAC,IAAI,KAAK,QAAQ,CAAC,UAAU,CAAC,MAAM;YAChD,YAAY,CAAC,IAAI,KAAK,UAAU,CAAC,MAAM;YACvC,UAAU,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,CAAC,MAAM;YAChD,CAAC,GAAG,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EACvD,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,wBAAwB,EAAE,CAAC,CAAC;YAC1E,SAAS;QACX,CAAC;QACD,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate-documentation-local-references.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/policies/evaluate-documentation-local-references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAM7F,OAAO,KAAK,EACV,uCAAuC,EACvC,kCAAkC,EACnC,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"evaluate-documentation-local-references.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/policies/evaluate-documentation-local-references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAM7F,OAAO,KAAK,EACV,uCAAuC,EACvC,kCAAkC,EACnC,MAAM,4CAA4C,CAAC;AAQpD,UAAU,eAAe;IACvB,QAAQ,CAAC,WAAW,EAAE,uCAAuC,CAAC;IAC9D,QAAQ,CAAC,MAAM,EAAE,kCAAkC,CAAC;CACrD;AAuGD,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,eAAe,GACrB,SAAS,oBAAoB,EAAE,CAqGjC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { anchorsForMarkdownDocument, } from "@agent-teams/document-authoring/observation";
|
|
2
2
|
import { DOCUMENTATION_LOCAL_REFERENCE_RULES, } from "../rules.js";
|
|
3
|
+
import { admitHistoricalArtifacts } from "./admit-historical-artifacts.js";
|
|
3
4
|
function diagnostic(input) {
|
|
4
5
|
return {
|
|
5
6
|
evidence: input.evidence ?? [],
|
|
@@ -82,8 +83,49 @@ function resolutionDiagnostic(input) {
|
|
|
82
83
|
}
|
|
83
84
|
export function evaluateDocumentationLocalReferences(input) {
|
|
84
85
|
const diagnostics = input.observation.repository.issues.map(issueDiagnostic);
|
|
86
|
+
const historical = admitHistoricalArtifacts(input.policy, input.observation);
|
|
87
|
+
for (const issue of historical.issues) {
|
|
88
|
+
diagnostics.push(diagnostic({
|
|
89
|
+
evidence: [
|
|
90
|
+
{ kind: "historical-artifact-rejection", value: issue.reason },
|
|
91
|
+
{ kind: "expected-sha256", value: issue.artifact.sha256 },
|
|
92
|
+
...(issue.actualSha256 === undefined
|
|
93
|
+
? []
|
|
94
|
+
: [{ kind: "observed-sha256", value: issue.actualSha256 }]),
|
|
95
|
+
],
|
|
96
|
+
message: "Historical artifact declaration does not match the observation: " + issue.reason + ".",
|
|
97
|
+
path: issue.artifact.path,
|
|
98
|
+
rule: DOCUMENTATION_LOCAL_REFERENCE_RULES.historicalArtifactInvalid,
|
|
99
|
+
subject: issue.artifact.path,
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
85
102
|
for (const observedReference of input.observation.resolvedReferences) {
|
|
86
103
|
const { reference, resolution, sourcePath } = observedReference;
|
|
104
|
+
const historicalArtifact = historical.admitted.get(sourcePath);
|
|
105
|
+
if (historicalArtifact !== undefined &&
|
|
106
|
+
resolution.kind === "unsafe" &&
|
|
107
|
+
resolution.reason === "absolute-path") {
|
|
108
|
+
diagnostics.push(diagnostic({
|
|
109
|
+
column: reference.location.column,
|
|
110
|
+
evidence: [
|
|
111
|
+
{ kind: "raw-target", value: reference.rawTarget },
|
|
112
|
+
{
|
|
113
|
+
kind: "original-rule",
|
|
114
|
+
value: DOCUMENTATION_LOCAL_REFERENCE_RULES.invalidReference.id,
|
|
115
|
+
},
|
|
116
|
+
{ kind: "original-reason", value: "absolute-path" },
|
|
117
|
+
{ kind: "artifact-sha256", value: historicalArtifact.sha256 },
|
|
118
|
+
],
|
|
119
|
+
line: reference.location.line,
|
|
120
|
+
message: "Preserved historical absolute reference; its target was not resolved: " +
|
|
121
|
+
reference.rawTarget +
|
|
122
|
+
".",
|
|
123
|
+
path: sourcePath,
|
|
124
|
+
rule: DOCUMENTATION_LOCAL_REFERENCE_RULES.historicalAbsoluteReference,
|
|
125
|
+
subject: sourcePath + ":" + reference.location.line,
|
|
126
|
+
}));
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
87
129
|
if (resolution.kind === "external") {
|
|
88
130
|
continue;
|
|
89
131
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate-documentation-local-references.js","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/policies/evaluate-documentation-local-references.ts"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,GAG3B,MAAM,6CAA6C,CAAC;AAKrD,OAAO,EACL,mCAAmC,GAEpC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"evaluate-documentation-local-references.js","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/policies/evaluate-documentation-local-references.ts"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,GAG3B,MAAM,6CAA6C,CAAC;AAKrD,OAAO,EACL,mCAAmC,GAEpC,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AE,UAAU,CAAC,cAAc;gBACtC,IAAI,EAAE,mCAAmC,CAAC,aAAa;gBACvD,OAAO,EAAE,GAAG,UAAU,IAAI,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE;aACpD,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -8,6 +8,8 @@ export interface DocumentationLocalReferencesRuleMetadata {
|
|
|
8
8
|
readonly severity: DiagnosticSeverity;
|
|
9
9
|
}
|
|
10
10
|
export declare const DOCUMENTATION_LOCAL_REFERENCE_RULES: Readonly<{
|
|
11
|
+
historicalArtifactInvalid: DocumentationLocalReferencesRuleMetadata;
|
|
12
|
+
historicalAbsoluteReference: DocumentationLocalReferencesRuleMetadata;
|
|
11
13
|
brokenLink: DocumentationLocalReferencesRuleMetadata;
|
|
12
14
|
directoryReadmeMissing: DocumentationLocalReferencesRuleMetadata;
|
|
13
15
|
invalidReference: DocumentationLocalReferencesRuleMetadata;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/documentation-local-references/application/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAGxF,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;CACvC;
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/documentation-local-references/application/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAGxF,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;CACvC;AAmBD,eAAO,MAAM,mCAAmC;;;;;;;;;;EAmD9C,CAAC;AAEH,eAAO,MAAM,yCAAyC,EAAE,WAAW,CACjE,MAAM,EACN,wCAAwC,CAIzC,CAAC"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { createUniqueRegistry } from "../../../features/validation-reporting/api.js";
|
|
2
|
-
function rule(suffix, rationale, remediation, requiresArchitectureReview = false) {
|
|
2
|
+
function rule(suffix, rationale, remediation, requiresArchitectureReview = false, severity = "error") {
|
|
3
3
|
return Object.freeze({
|
|
4
|
-
documentation: "docs/
|
|
4
|
+
documentation: "docs/reference/documentation-local-references.md",
|
|
5
5
|
id: `documentation.local-references.${suffix}`,
|
|
6
6
|
rationale,
|
|
7
7
|
remediation,
|
|
8
8
|
requiresArchitectureReview,
|
|
9
|
-
severity
|
|
9
|
+
severity,
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
export const DOCUMENTATION_LOCAL_REFERENCE_RULES = Object.freeze({
|
|
13
|
+
historicalArtifactInvalid: rule("historical-artifact-invalid", "Historical classification requires an observed exact artifact and a complete unchanged occurrence declaration.", "Restore the declared artifact bytes and occurrences, or review the obsolete declaration. Ordinary validation remains active.", true),
|
|
14
|
+
historicalAbsoluteReference: rule("historical-absolute-reference", "An exact hash-bound historical artifact records this absolute reference without resolving its target.", "Preserve the historical bytes and declaration. This observation does not establish that the historical target exists.", true, "info"),
|
|
13
15
|
brokenLink: rule("broken-link", "A local Markdown target must resolve to a regular repository file.", "Correct the local target or add the referenced file."),
|
|
14
16
|
directoryReadmeMissing: rule("directory-readme-missing", "Directory links are stable only when they resolve through an explicit README.md.", "Add README.md to the target directory or link to an existing file."),
|
|
15
17
|
invalidReference: rule("invalid-reference", "Malformed local paths cannot be checked deterministically.", "Use a valid UTF-8, repository-relative Markdown target."),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/capabilities/documentation-local-references/application/rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAWrF,SAAS,IAAI,CACX,MAAc,EACd,SAAiB,EACjB,WAAmB,EACnB,0BAA0B,GAAG,KAAK;
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/capabilities/documentation-local-references/application/rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAWrF,SAAS,IAAI,CACX,MAAc,EACd,SAAiB,EACjB,WAAmB,EACnB,0BAA0B,GAAG,KAAK,EAClC,QAAQ,GAAuB,OAAO;IAEtC,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,aAAa,EAAE,kDAAkD;QACjE,EAAE,EAAE,kCAAkC,MAAM,EAAE;QAC9C,SAAS;QACT,WAAW;QACX,0BAA0B;QAC1B,QAAQ;KACT,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,mCAAmC,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/D,yBAAyB,EAAE,IAAI,CAC7B,6BAA6B,EAC7B,gHAAgH,EAChH,8HAA8H,EAC9H,IAAI,CACL;IACD,2BAA2B,EAAE,IAAI,CAC/B,+BAA+B,EAC/B,uGAAuG,EACvG,uHAAuH,EACvH,IAAI,EACJ,MAAM,CACP;IACD,UAAU,EAAE,IAAI,CACd,aAAa,EACb,oEAAoE,EACpE,sDAAsD,CACvD;IACD,sBAAsB,EAAE,IAAI,CAC1B,0BAA0B,EAC1B,kFAAkF,EAClF,oEAAoE,CACrE;IACD,gBAAgB,EAAE,IAAI,CACpB,mBAAmB,EACnB,4DAA4D,EAC5D,yDAAyD,CAC1D;IACD,aAAa,EAAE,IAAI,CACjB,gBAAgB,EAChB,qFAAqF,EACrF,qDAAqD,CACtD;IACD,gBAAgB,EAAE,IAAI,CACpB,mBAAmB,EACnB,uEAAuE,EACvE,+DAA+D,EAC/D,IAAI,CACL;IACD,iBAAiB,EAAE,IAAI,CACrB,oBAAoB,EACpB,6FAA6F,EAC7F,uEAAuE,CACxE;IACD,YAAY,EAAE,IAAI,CAChB,eAAe,EACf,4GAA4G,EAC5G,wEAAwE,EACxE,IAAI,CACL;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yCAAyC,GAGlD,oBAAoB,CACtB,MAAM,EACN,MAAM,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAC9F,CAAC"}
|
|
@@ -8,5 +8,6 @@ export interface AnalyzeDocumentationLocalReferencesInput {
|
|
|
8
8
|
}
|
|
9
9
|
export declare function analyzeDocumentationLocalReferences(input: AnalyzeDocumentationLocalReferencesInput, dependencies: {
|
|
10
10
|
readonly repository: MarkdownRepository;
|
|
11
|
+
readonly digestSource: (source: string) => string;
|
|
11
12
|
}): Promise<readonly FoundationDiagnostic[]>;
|
|
12
13
|
//# sourceMappingURL=analyze-documentation-local-references.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-documentation-local-references.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/use-cases/analyze-documentation-local-references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,KAAK,EAEV,kCAAkC,EAEnC,MAAM,4CAA4C,CAAC;AAGpD,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,kCAAkC,CAAC;IACpD,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,wBAAsB,mCAAmC,CACvD,KAAK,EAAE,wCAAwC,EAC/C,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"analyze-documentation-local-references.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/use-cases/analyze-documentation-local-references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,KAAK,EAEV,kCAAkC,EAEnC,MAAM,4CAA4C,CAAC;AAGpD,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,kCAAkC,CAAC;IACpD,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,wBAAsB,mCAAmC,CACvD,KAAK,EAAE,wCAAwC,EAC/C,YAAY,EAAE;IACZ,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACnD,GACA,OAAO,CAAC,SAAS,oBAAoB,EAAE,CAAC,CA0C1C"}
|
|
@@ -7,8 +7,13 @@ export async function analyzeDocumentationLocalReferences(input, dependencies) {
|
|
|
7
7
|
roots: input.policy.markdownRoots,
|
|
8
8
|
...(input.signal === undefined ? {} : { signal: input.signal }),
|
|
9
9
|
});
|
|
10
|
+
const historicalPaths = new Set((input.policy.historicalArtifacts ?? []).map((artifact) => artifact.path));
|
|
11
|
+
const sourceDigests = new Map();
|
|
10
12
|
const resolvedReferences = [];
|
|
11
13
|
for (const document of observation.documents) {
|
|
14
|
+
if (historicalPaths.has(document.repositoryPath)) {
|
|
15
|
+
sourceDigests.set(document.repositoryPath, dependencies.digestSource(document.source));
|
|
16
|
+
}
|
|
12
17
|
for (const reference of document.references) {
|
|
13
18
|
assertNotCancelled(input.signal);
|
|
14
19
|
const resolution = await dependencies.repository.resolveReference({
|
|
@@ -26,6 +31,7 @@ export async function analyzeDocumentationLocalReferences(input, dependencies) {
|
|
|
26
31
|
}
|
|
27
32
|
const resolvedObservation = Object.freeze({
|
|
28
33
|
repository: observation,
|
|
34
|
+
sourceDigests,
|
|
29
35
|
resolvedReferences: Object.freeze(resolvedReferences),
|
|
30
36
|
});
|
|
31
37
|
return evaluateDocumentationLocalReferences({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-documentation-local-references.js","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/use-cases/analyze-documentation-local-references.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAOtF,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAQ9G,MAAM,CAAC,KAAK,UAAU,mCAAmC,CACvD,KAA+C,EAC/C,
|
|
1
|
+
{"version":3,"file":"analyze-documentation-local-references.js","sourceRoot":"","sources":["../../../../../src/capabilities/documentation-local-references/application/use-cases/analyze-documentation-local-references.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAOtF,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAQ9G,MAAM,CAAC,KAAK,UAAU,mCAAmC,CACvD,KAA+C,EAC/C,YAGC;IAED,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,MAA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gBAC/D,MAAM,EAAE,QAAQ;aACjB,CAAC,CAAC;YACH,kBAAkB,CAAC,IAAI,CACrB,MAAM,CAAC,MAAM,CAAC;gBACZ,SAAS;gBACT,UAAU;gBACV,UAAU,EAAE,QAAQ,CAAC,cAAc;aACpC,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IACD,MAAM,mBAAmB,GAA4C,MAAM,CAAC,MAAM,CAAC;QACjF,UAAU,EAAE,WAAW;QACvB,aAAa;QACb,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC;KACtD,CAAC,CAAC;IACH,OAAO,oCAAoC,CAAC;QAC1C,WAAW,EAAE,mBAAmB;QAChC,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/capabilities/documentation-local-references/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EAE1B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/capabilities/documentation-local-references/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EAE1B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAEL,yCAAyC,EAC1C,MAAM,wBAAwB,CAAC;AAIhC,OAAO,EAEL,KAAK,sCAAsC,EAC5C,MAAM,4DAA4D,CAAC;AAGpE,OAAO,EAAE,yCAAyC,EAAE,CAAC;AAErD,wBAAgB,4CAA4C,CAAC,KAAK,EAAE;IAClE,QAAQ,CAAC,YAAY,EAAE,sCAAsC,CAAC,cAAc,CAAC,CAAC;CAC/E,GAAG,oBAAoB,CAkDvB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { capabilityFailureReport, capabilityReport, } from "../../features/validation-reporting/api.js";
|
|
2
2
|
import { FilesystemMarkdownRepository } from "@agent-teams/document-authoring/observation";
|
|
3
|
-
import { DOCUMENTATION_LOCAL_REFERENCE_RULES_BY_ID } from "./application/rules.js";
|
|
3
|
+
import { DOCUMENTATION_LOCAL_REFERENCE_RULES, DOCUMENTATION_LOCAL_REFERENCE_RULES_BY_ID, } from "./application/rules.js";
|
|
4
|
+
import { digestMarkdownSource } from "./adapters/outbound/crypto/node-markdown-source-digest.js";
|
|
4
5
|
import { analyzeDocumentationLocalReferences } from "./application/use-cases/analyze-documentation-local-references.js";
|
|
5
6
|
import { CAPABILITY_CONFIG_SCHEMA_VERSION, CAPABILITY_ID } from "./contract/config.js";
|
|
6
7
|
import { loadCapabilityConfig, } from "./adapters/inbound/configuration/load-capability-config.js";
|
|
@@ -11,22 +12,33 @@ export function createDocumentationLocalReferencesCapability(input) {
|
|
|
11
12
|
configSchemaVersion: CAPABILITY_CONFIG_SCHEMA_VERSION,
|
|
12
13
|
id: CAPABILITY_ID,
|
|
13
14
|
async run(invocation) {
|
|
15
|
+
let requestedSchemaVersion = 1;
|
|
14
16
|
try {
|
|
15
|
-
const dependencies = Object.freeze({
|
|
16
|
-
|
|
17
|
+
const dependencies = Object.freeze({
|
|
18
|
+
repository: new FilesystemMarkdownRepository(),
|
|
19
|
+
digestSource: digestMarkdownSource,
|
|
20
|
+
});
|
|
21
|
+
const policy = await loadCapabilityConfig({ readYaml: loadStrictYamlFile, assertSchema: input.assertSchema }, invocation.consumerRoot, invocation.configPath, invocation.signal, (version) => {
|
|
22
|
+
requestedSchemaVersion = version;
|
|
23
|
+
});
|
|
24
|
+
const diagnostics = await analyzeDocumentationLocalReferences({
|
|
25
|
+
consumerRoot: invocation.consumerRoot,
|
|
26
|
+
policy,
|
|
27
|
+
...(invocation.signal === undefined ? {} : { signal: invocation.signal }),
|
|
28
|
+
}, dependencies);
|
|
17
29
|
return capabilityReport({
|
|
18
|
-
capabilityConfigSchemaVersion:
|
|
30
|
+
capabilityConfigSchemaVersion: requestedSchemaVersion,
|
|
19
31
|
capabilityId: CAPABILITY_ID,
|
|
20
|
-
diagnostics
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
diagnostics,
|
|
33
|
+
outcome: diagnostics.every((entry) => entry.ruleId === DOCUMENTATION_LOCAL_REFERENCE_RULES.historicalAbsoluteReference.id &&
|
|
34
|
+
entry.severity === "info")
|
|
35
|
+
? "passed"
|
|
36
|
+
: "violations",
|
|
25
37
|
});
|
|
26
38
|
}
|
|
27
39
|
catch (error) {
|
|
28
40
|
return capabilityFailureReport({
|
|
29
|
-
capabilityConfigSchemaVersion:
|
|
41
|
+
capabilityConfigSchemaVersion: requestedSchemaVersion,
|
|
30
42
|
capabilityId: CAPABILITY_ID,
|
|
31
43
|
error,
|
|
32
44
|
phase: "documentation-local-references-execution",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/capabilities/documentation-local-references/module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,gBAAgB,GAGjB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/capabilities/documentation-local-references/module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,gBAAgB,GAGjB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EACL,mCAAmC,EACnC,yCAAyC,GAC1C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AACjG,OAAO,EAAE,mCAAmC,EAAE,MAAM,mEAAmE,CAAC;AACxH,OAAO,EAAE,gCAAgC,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACvF,OAAO,EACL,oBAAoB,GAErB,MAAM,4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,KAAK,CAAC,QAAQ,KAAK,MAAM,CAC5B;wBACC,CAAC,CAAC,QAAQ;wBACV,CAAC,CAAC,YAAY;iBACjB,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,uBAAuB,CAAC;oBAC7B,6BAA6B,EAAE,sBAAsB;oBACrD,YAAY,EAAE,aAAa;oBAC3B,KAAK;oBACL,KAAK,EAAE,0CAA0C;iBAClD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DOCUMENTATION_LOCAL_REFERENCES_SCHEMA_IDS: readonly ["documentation-local-references/v1"];
|
|
1
|
+
export declare const DOCUMENTATION_LOCAL_REFERENCES_SCHEMA_IDS: readonly ["documentation-local-references/v1", "documentation-local-references/v2"];
|
|
2
2
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/capabilities/documentation-local-references/schemas.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,yCAAyC,YACpD,mCAAmC,CAC3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/capabilities/documentation-local-references/schemas.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,yCAAyC,YACpD,mCAAmC,EACnC,mCAAmC,CAC3B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Published schema identities contributed by their semantic owner. Schema bytes stay in schemas/.
|
|
2
2
|
export const DOCUMENTATION_LOCAL_REFERENCES_SCHEMA_IDS = [
|
|
3
3
|
"documentation-local-references/v1",
|
|
4
|
+
"documentation-local-references/v2",
|
|
4
5
|
];
|
|
5
6
|
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/capabilities/documentation-local-references/schemas.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,mCAAmC;CAC3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/capabilities/documentation-local-references/schemas.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,mCAAmC;IACnC,mCAAmC;CAC3B,CAAC"}
|
package/dist/schema-catalog.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const assertSchema: (schemaId: "architecture-source-dependencies/v1" | "architecture-source-dependencies/v2" | "architecture-source-dependencies/v3" | "contract-json-schema-release-baseline/v1" | "contract-json-schema-releases/v1" | "contract-protobuf-breaking-qualification/v1" | "contract-protobuf-evolution-baseline/v1" | "contract-protobuf-evolution/v1" | "documentation-local-references/v1" | "foundation-check-report/v1" | "foundation-command-error/v1" | "foundation-config/v1" | "foundation-config/v2" | "foundation-config/v3" | "foundation-transaction-envelope/v2" | "governance-architecture-decision-baseline/v1" | "governance-architecture-decisions/v1" | "package-public-api-audit-report/v1" | "package-public-api-audit-request/v1" | "package-public-api-baseline/v1" | "package-public-api-compatibility/v1" | "package-public-api-compatibility/v2" | "package-public-api-native-transition/v1" | "quality-executable-specification-catalog/v1" | "quality-executable-specifications/v1" | "quality-findings-baseline/v1" | "quality-format-coverage/v1" | "quality-gate-run-report/v1" | "quality-gate-runner/v1" | "quality-gate-runner/v2" | "quality-source-coverage/v1" | "quality-source-coverage/v2" | "quality-source-coverage/v3" | "quality-source-coverage/v4" | "quality-source-coverage/v5" | "quality-source-topology/v1" | "quality-suppression-governance/v1" | "repository-agent-workflow/v1" | "repository-agent-workflow/v2" | "repository-security-baseline/v1" | "scaffold-authority-evidence/v1" | "scaffold-intent/v1" | "scaffold-plan/v1" | "scaffold-receipt/v1" | "scaffold-recovery-journal/v1" | "scaffold-target-catalog/v1" | "scaffolding-config/v1" | "workspace-dependency-declarations/v1" | "workspace-dependency-declarations/v2", input: unknown, phase: string) => Promise<void>, isFoundationSchemaId: (value: string) => value is "architecture-source-dependencies/v1" | "architecture-source-dependencies/v2" | "architecture-source-dependencies/v3" | "contract-json-schema-release-baseline/v1" | "contract-json-schema-releases/v1" | "contract-protobuf-breaking-qualification/v1" | "contract-protobuf-evolution-baseline/v1" | "contract-protobuf-evolution/v1" | "documentation-local-references/v1" | "foundation-check-report/v1" | "foundation-command-error/v1" | "foundation-config/v1" | "foundation-config/v2" | "foundation-config/v3" | "foundation-transaction-envelope/v2" | "governance-architecture-decision-baseline/v1" | "governance-architecture-decisions/v1" | "package-public-api-audit-report/v1" | "package-public-api-audit-request/v1" | "package-public-api-baseline/v1" | "package-public-api-compatibility/v1" | "package-public-api-compatibility/v2" | "package-public-api-native-transition/v1" | "quality-executable-specification-catalog/v1" | "quality-executable-specifications/v1" | "quality-findings-baseline/v1" | "quality-format-coverage/v1" | "quality-gate-run-report/v1" | "quality-gate-runner/v1" | "quality-gate-runner/v2" | "quality-source-coverage/v1" | "quality-source-coverage/v2" | "quality-source-coverage/v3" | "quality-source-coverage/v4" | "quality-source-coverage/v5" | "quality-source-topology/v1" | "quality-suppression-governance/v1" | "repository-agent-workflow/v1" | "repository-agent-workflow/v2" | "repository-security-baseline/v1" | "scaffold-authority-evidence/v1" | "scaffold-intent/v1" | "scaffold-plan/v1" | "scaffold-receipt/v1" | "scaffold-recovery-journal/v1" | "scaffold-target-catalog/v1" | "scaffolding-config/v1" | "workspace-dependency-declarations/v1" | "workspace-dependency-declarations/v2", readFoundationSchema: (schemaId: "architecture-source-dependencies/v1" | "architecture-source-dependencies/v2" | "architecture-source-dependencies/v3" | "contract-json-schema-release-baseline/v1" | "contract-json-schema-releases/v1" | "contract-protobuf-breaking-qualification/v1" | "contract-protobuf-evolution-baseline/v1" | "contract-protobuf-evolution/v1" | "documentation-local-references/v1" | "foundation-check-report/v1" | "foundation-command-error/v1" | "foundation-config/v1" | "foundation-config/v2" | "foundation-config/v3" | "foundation-transaction-envelope/v2" | "governance-architecture-decision-baseline/v1" | "governance-architecture-decisions/v1" | "package-public-api-audit-report/v1" | "package-public-api-audit-request/v1" | "package-public-api-baseline/v1" | "package-public-api-compatibility/v1" | "package-public-api-compatibility/v2" | "package-public-api-native-transition/v1" | "quality-executable-specification-catalog/v1" | "quality-executable-specifications/v1" | "quality-findings-baseline/v1" | "quality-format-coverage/v1" | "quality-gate-run-report/v1" | "quality-gate-runner/v1" | "quality-gate-runner/v2" | "quality-source-coverage/v1" | "quality-source-coverage/v2" | "quality-source-coverage/v3" | "quality-source-coverage/v4" | "quality-source-coverage/v5" | "quality-source-topology/v1" | "quality-suppression-governance/v1" | "repository-agent-workflow/v1" | "repository-agent-workflow/v2" | "repository-security-baseline/v1" | "scaffold-authority-evidence/v1" | "scaffold-intent/v1" | "scaffold-plan/v1" | "scaffold-receipt/v1" | "scaffold-recovery-journal/v1" | "scaffold-target-catalog/v1" | "scaffolding-config/v1" | "workspace-dependency-declarations/v1" | "workspace-dependency-declarations/v2") => Promise<string>;
|
|
1
|
+
export declare const assertSchema: (schemaId: "architecture-source-dependencies/v1" | "architecture-source-dependencies/v2" | "architecture-source-dependencies/v3" | "contract-json-schema-release-baseline/v1" | "contract-json-schema-releases/v1" | "contract-protobuf-breaking-qualification/v1" | "contract-protobuf-evolution-baseline/v1" | "contract-protobuf-evolution/v1" | "documentation-local-references/v1" | "documentation-local-references/v2" | "foundation-check-report/v1" | "foundation-command-error/v1" | "foundation-config/v1" | "foundation-config/v2" | "foundation-config/v3" | "foundation-transaction-envelope/v2" | "governance-architecture-decision-baseline/v1" | "governance-architecture-decisions/v1" | "package-public-api-audit-report/v1" | "package-public-api-audit-request/v1" | "package-public-api-baseline/v1" | "package-public-api-compatibility/v1" | "package-public-api-compatibility/v2" | "package-public-api-native-transition/v1" | "quality-executable-specification-catalog/v1" | "quality-executable-specifications/v1" | "quality-findings-baseline/v1" | "quality-format-coverage/v1" | "quality-gate-run-report/v1" | "quality-gate-runner/v1" | "quality-gate-runner/v2" | "quality-source-coverage/v1" | "quality-source-coverage/v2" | "quality-source-coverage/v3" | "quality-source-coverage/v4" | "quality-source-coverage/v5" | "quality-source-topology/v1" | "quality-suppression-governance/v1" | "repository-agent-workflow/v1" | "repository-agent-workflow/v2" | "repository-security-baseline/v1" | "scaffold-authority-evidence/v1" | "scaffold-intent/v1" | "scaffold-plan/v1" | "scaffold-receipt/v1" | "scaffold-recovery-journal/v1" | "scaffold-target-catalog/v1" | "scaffolding-config/v1" | "workspace-dependency-declarations/v1" | "workspace-dependency-declarations/v2", input: unknown, phase: string) => Promise<void>, isFoundationSchemaId: (value: string) => value is "architecture-source-dependencies/v1" | "architecture-source-dependencies/v2" | "architecture-source-dependencies/v3" | "contract-json-schema-release-baseline/v1" | "contract-json-schema-releases/v1" | "contract-protobuf-breaking-qualification/v1" | "contract-protobuf-evolution-baseline/v1" | "contract-protobuf-evolution/v1" | "documentation-local-references/v1" | "documentation-local-references/v2" | "foundation-check-report/v1" | "foundation-command-error/v1" | "foundation-config/v1" | "foundation-config/v2" | "foundation-config/v3" | "foundation-transaction-envelope/v2" | "governance-architecture-decision-baseline/v1" | "governance-architecture-decisions/v1" | "package-public-api-audit-report/v1" | "package-public-api-audit-request/v1" | "package-public-api-baseline/v1" | "package-public-api-compatibility/v1" | "package-public-api-compatibility/v2" | "package-public-api-native-transition/v1" | "quality-executable-specification-catalog/v1" | "quality-executable-specifications/v1" | "quality-findings-baseline/v1" | "quality-format-coverage/v1" | "quality-gate-run-report/v1" | "quality-gate-runner/v1" | "quality-gate-runner/v2" | "quality-source-coverage/v1" | "quality-source-coverage/v2" | "quality-source-coverage/v3" | "quality-source-coverage/v4" | "quality-source-coverage/v5" | "quality-source-topology/v1" | "quality-suppression-governance/v1" | "repository-agent-workflow/v1" | "repository-agent-workflow/v2" | "repository-security-baseline/v1" | "scaffold-authority-evidence/v1" | "scaffold-intent/v1" | "scaffold-plan/v1" | "scaffold-receipt/v1" | "scaffold-recovery-journal/v1" | "scaffold-target-catalog/v1" | "scaffolding-config/v1" | "workspace-dependency-declarations/v1" | "workspace-dependency-declarations/v2", readFoundationSchema: (schemaId: "architecture-source-dependencies/v1" | "architecture-source-dependencies/v2" | "architecture-source-dependencies/v3" | "contract-json-schema-release-baseline/v1" | "contract-json-schema-releases/v1" | "contract-protobuf-breaking-qualification/v1" | "contract-protobuf-evolution-baseline/v1" | "contract-protobuf-evolution/v1" | "documentation-local-references/v1" | "documentation-local-references/v2" | "foundation-check-report/v1" | "foundation-command-error/v1" | "foundation-config/v1" | "foundation-config/v2" | "foundation-config/v3" | "foundation-transaction-envelope/v2" | "governance-architecture-decision-baseline/v1" | "governance-architecture-decisions/v1" | "package-public-api-audit-report/v1" | "package-public-api-audit-request/v1" | "package-public-api-baseline/v1" | "package-public-api-compatibility/v1" | "package-public-api-compatibility/v2" | "package-public-api-native-transition/v1" | "quality-executable-specification-catalog/v1" | "quality-executable-specifications/v1" | "quality-findings-baseline/v1" | "quality-format-coverage/v1" | "quality-gate-run-report/v1" | "quality-gate-runner/v1" | "quality-gate-runner/v2" | "quality-source-coverage/v1" | "quality-source-coverage/v2" | "quality-source-coverage/v3" | "quality-source-coverage/v4" | "quality-source-coverage/v5" | "quality-source-topology/v1" | "quality-suppression-governance/v1" | "repository-agent-workflow/v1" | "repository-agent-workflow/v2" | "repository-security-baseline/v1" | "scaffold-authority-evidence/v1" | "scaffold-intent/v1" | "scaffold-plan/v1" | "scaffold-receipt/v1" | "scaffold-recovery-journal/v1" | "scaffold-target-catalog/v1" | "scaffolding-config/v1" | "workspace-dependency-declarations/v1" | "workspace-dependency-declarations/v2") => Promise<string>;
|
|
2
2
|
//# sourceMappingURL=schema-catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-catalog.d.ts","sourceRoot":"","sources":["../src/schema-catalog.ts"],"names":[],"mappings":"AAeA,eAAO,MACL,YAAY,
|
|
1
|
+
{"version":3,"file":"schema-catalog.d.ts","sourceRoot":"","sources":["../src/schema-catalog.ts"],"names":[],"mappings":"AAeA,eAAO,MACL,YAAY,kxDACA,oBAAoB,kvDACpB,oBAAoB,mvDAShC,CAAC"}
|
package/dist/schema-ids.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const FOUNDATION_SCHEMA_IDS: readonly ["architecture-source-dependencies/v1", "architecture-source-dependencies/v2", "architecture-source-dependencies/v3", "contract-json-schema-release-baseline/v1", "contract-json-schema-releases/v1", "contract-protobuf-breaking-qualification/v1", "contract-protobuf-evolution-baseline/v1", "contract-protobuf-evolution/v1", "documentation-local-references/v1", "foundation-command-error/v1", "foundation-config/v1", "foundation-config/v2", "foundation-config/v3", "foundation-check-report/v1", "foundation-transaction-envelope/v2", "governance-architecture-decision-baseline/v1", "governance-architecture-decisions/v1", "package-public-api-audit-request/v1", "package-public-api-audit-report/v1", "package-public-api-baseline/v1", "package-public-api-native-transition/v1", "package-public-api-compatibility/v1", "package-public-api-compatibility/v2", "quality-executable-specification-catalog/v1", "quality-executable-specifications/v1", "quality-gate-run-report/v1", "quality-gate-runner/v1", "quality-gate-runner/v2", "quality-source-coverage/v1", "quality-source-coverage/v2", "quality-source-coverage/v3", "quality-source-coverage/v4", "quality-source-coverage/v5", "quality-source-topology/v1", "quality-format-coverage/v1", "quality-suppression-governance/v1", "quality-findings-baseline/v1", "repository-agent-workflow/v1", "repository-agent-workflow/v2", "repository-security-baseline/v1", "scaffold-authority-evidence/v1", "scaffold-intent/v1", "scaffold-plan/v1", "scaffold-receipt/v1", "scaffold-recovery-journal/v1", "scaffold-target-catalog/v1", "scaffolding-config/v1", "workspace-dependency-declarations/v1", "workspace-dependency-declarations/v2"], firstSchemaId: "architecture-source-dependencies/v1" | "architecture-source-dependencies/v2" | "architecture-source-dependencies/v3" | "contract-json-schema-release-baseline/v1" | "contract-json-schema-releases/v1" | "contract-protobuf-breaking-qualification/v1" | "contract-protobuf-evolution-baseline/v1" | "contract-protobuf-evolution/v1" | "documentation-local-references/v1" | "foundation-check-report/v1" | "foundation-command-error/v1" | "foundation-config/v1" | "foundation-config/v2" | "foundation-config/v3" | "foundation-transaction-envelope/v2" | "governance-architecture-decision-baseline/v1" | "governance-architecture-decisions/v1" | "package-public-api-audit-report/v1" | "package-public-api-audit-request/v1" | "package-public-api-baseline/v1" | "package-public-api-compatibility/v1" | "package-public-api-compatibility/v2" | "package-public-api-native-transition/v1" | "quality-executable-specification-catalog/v1" | "quality-executable-specifications/v1" | "quality-findings-baseline/v1" | "quality-format-coverage/v1" | "quality-gate-run-report/v1" | "quality-gate-runner/v1" | "quality-gate-runner/v2" | "quality-source-coverage/v1" | "quality-source-coverage/v2" | "quality-source-coverage/v3" | "quality-source-coverage/v4" | "quality-source-coverage/v5" | "quality-source-topology/v1" | "quality-suppression-governance/v1" | "repository-agent-workflow/v1" | "repository-agent-workflow/v2" | "repository-security-baseline/v1" | "scaffold-authority-evidence/v1" | "scaffold-intent/v1" | "scaffold-plan/v1" | "scaffold-receipt/v1" | "scaffold-recovery-journal/v1" | "scaffold-target-catalog/v1" | "scaffolding-config/v1" | "workspace-dependency-declarations/v1" | "workspace-dependency-declarations/v2";
|
|
1
|
+
declare const FOUNDATION_SCHEMA_IDS: readonly ["architecture-source-dependencies/v1", "architecture-source-dependencies/v2", "architecture-source-dependencies/v3", "contract-json-schema-release-baseline/v1", "contract-json-schema-releases/v1", "contract-protobuf-breaking-qualification/v1", "contract-protobuf-evolution-baseline/v1", "contract-protobuf-evolution/v1", "documentation-local-references/v1", "documentation-local-references/v2", "foundation-command-error/v1", "foundation-config/v1", "foundation-config/v2", "foundation-config/v3", "foundation-check-report/v1", "foundation-transaction-envelope/v2", "governance-architecture-decision-baseline/v1", "governance-architecture-decisions/v1", "package-public-api-audit-request/v1", "package-public-api-audit-report/v1", "package-public-api-baseline/v1", "package-public-api-native-transition/v1", "package-public-api-compatibility/v1", "package-public-api-compatibility/v2", "quality-executable-specification-catalog/v1", "quality-executable-specifications/v1", "quality-gate-run-report/v1", "quality-gate-runner/v1", "quality-gate-runner/v2", "quality-source-coverage/v1", "quality-source-coverage/v2", "quality-source-coverage/v3", "quality-source-coverage/v4", "quality-source-coverage/v5", "quality-source-topology/v1", "quality-format-coverage/v1", "quality-suppression-governance/v1", "quality-findings-baseline/v1", "repository-agent-workflow/v1", "repository-agent-workflow/v2", "repository-security-baseline/v1", "scaffold-authority-evidence/v1", "scaffold-intent/v1", "scaffold-plan/v1", "scaffold-receipt/v1", "scaffold-recovery-journal/v1", "scaffold-target-catalog/v1", "scaffolding-config/v1", "workspace-dependency-declarations/v1", "workspace-dependency-declarations/v2"], firstSchemaId: "architecture-source-dependencies/v1" | "architecture-source-dependencies/v2" | "architecture-source-dependencies/v3" | "contract-json-schema-release-baseline/v1" | "contract-json-schema-releases/v1" | "contract-protobuf-breaking-qualification/v1" | "contract-protobuf-evolution-baseline/v1" | "contract-protobuf-evolution/v1" | "documentation-local-references/v1" | "documentation-local-references/v2" | "foundation-check-report/v1" | "foundation-command-error/v1" | "foundation-config/v1" | "foundation-config/v2" | "foundation-config/v3" | "foundation-transaction-envelope/v2" | "governance-architecture-decision-baseline/v1" | "governance-architecture-decisions/v1" | "package-public-api-audit-report/v1" | "package-public-api-audit-request/v1" | "package-public-api-baseline/v1" | "package-public-api-compatibility/v1" | "package-public-api-compatibility/v2" | "package-public-api-native-transition/v1" | "quality-executable-specification-catalog/v1" | "quality-executable-specifications/v1" | "quality-findings-baseline/v1" | "quality-format-coverage/v1" | "quality-gate-run-report/v1" | "quality-gate-runner/v1" | "quality-gate-runner/v2" | "quality-source-coverage/v1" | "quality-source-coverage/v2" | "quality-source-coverage/v3" | "quality-source-coverage/v4" | "quality-source-coverage/v5" | "quality-source-topology/v1" | "quality-suppression-governance/v1" | "repository-agent-workflow/v1" | "repository-agent-workflow/v2" | "repository-security-baseline/v1" | "scaffold-authority-evidence/v1" | "scaffold-intent/v1" | "scaffold-plan/v1" | "scaffold-receipt/v1" | "scaffold-recovery-journal/v1" | "scaffold-target-catalog/v1" | "scaffolding-config/v1" | "workspace-dependency-declarations/v1" | "workspace-dependency-declarations/v2";
|
|
2
2
|
export { FOUNDATION_SCHEMA_IDS };
|
|
3
3
|
export type FoundationSchemaId = typeof firstSchemaId;
|
|
4
4
|
//# sourceMappingURL=schema-ids.d.ts.map
|
package/dist/schema-ids.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-ids.d.ts","sourceRoot":"","sources":["../src/schema-ids.ts"],"names":[],"mappings":"AAsBA,QAAA,MAAmB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"schema-ids.d.ts","sourceRoot":"","sources":["../src/schema-ids.ts"],"names":[],"mappings":"AAsBA,QAAA,MAAmB,qBAAqB,grDAAE,aAAa,otDAoBrD,CAAC;AAEH,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,MAAM,MAAM,kBAAkB,GAAG,OAAO,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
"schemas/contract-protobuf-evolution-baseline/v1.schema.json",
|
|
81
81
|
"schemas/contract-protobuf-evolution/v1.schema.json",
|
|
82
82
|
"schemas/documentation-local-references/v1.schema.json",
|
|
83
|
+
"schemas/documentation-local-references/v2.schema.json",
|
|
83
84
|
"schemas/foundation-command-error/v1.schema.json",
|
|
84
85
|
"schemas/foundation-config/v1.schema.json",
|
|
85
86
|
"schemas/foundation-config/v2.schema.json",
|
|
@@ -143,5 +144,5 @@
|
|
|
143
144
|
},
|
|
144
145
|
"sideEffects": false,
|
|
145
146
|
"type": "module",
|
|
146
|
-
"version": "4.0
|
|
147
|
+
"version": "4.1.0"
|
|
147
148
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.agent-teams.ai/engineering-foundation/documentation-local-references/v2",
|
|
4
|
+
"title": "Local Markdown references with exact historical artifact declarations",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "markdownRoots", "anchorProfile", "historicalArtifacts"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": {
|
|
10
|
+
"const": 2
|
|
11
|
+
},
|
|
12
|
+
"markdownRoots": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"minItems": 1,
|
|
15
|
+
"maxItems": 100,
|
|
16
|
+
"uniqueItems": true,
|
|
17
|
+
"items": {
|
|
18
|
+
"$ref": "#/$defs/repositoryDirectory"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"anchorProfile": {
|
|
22
|
+
"enum": ["github", "none"]
|
|
23
|
+
},
|
|
24
|
+
"historicalArtifacts": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"minItems": 1,
|
|
27
|
+
"maxItems": 100,
|
|
28
|
+
"uniqueItems": true,
|
|
29
|
+
"items": {
|
|
30
|
+
"$ref": "#/$defs/historicalArtifact"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"$defs": {
|
|
35
|
+
"repositoryDirectory": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1,
|
|
38
|
+
"maxLength": 300,
|
|
39
|
+
"pattern": "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[*?{}[\\]]).+$"
|
|
40
|
+
},
|
|
41
|
+
"historicalArtifact": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"required": ["path", "sha256", "references"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"path": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1,
|
|
49
|
+
"maxLength": 300,
|
|
50
|
+
"pattern": "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[*?{}[\\]]).+$",
|
|
51
|
+
"allOf": [
|
|
52
|
+
{
|
|
53
|
+
"type": "string",
|
|
54
|
+
"pattern": "\\.[mM][dD]$"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"sha256": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
61
|
+
},
|
|
62
|
+
"references": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"minItems": 1,
|
|
65
|
+
"maxItems": 1000,
|
|
66
|
+
"uniqueItems": true,
|
|
67
|
+
"items": {
|
|
68
|
+
"$ref": "#/$defs/historicalReference"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"historicalReference": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["kind", "line", "column", "rawTarget"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"kind": {
|
|
79
|
+
"enum": ["link", "image", "definition"]
|
|
80
|
+
},
|
|
81
|
+
"line": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"minimum": 1,
|
|
84
|
+
"maximum": 50000
|
|
85
|
+
},
|
|
86
|
+
"column": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"minimum": 1,
|
|
89
|
+
"maximum": 4194304
|
|
90
|
+
},
|
|
91
|
+
"rawTarget": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"maxLength": 16384
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|