@agent-teams/docs-protocol 0.1.0-rc.1 → 0.1.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +34 -5
- package/assets/catalog.json +1 -0
- package/assets/docs-protocol.yml +13 -0
- package/assets/transition-catalog.json +1 -0
- package/dist/composition/cli.d.ts.map +1 -1
- package/dist/composition/cli.js +9 -1
- package/dist/composition/cli.js.map +1 -1
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.d.ts +15 -0
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.js +96 -0
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.js.map +1 -0
- package/dist/consumer-integration/adapters/bounded-repository-topology.d.ts +8 -0
- package/dist/consumer-integration/adapters/bounded-repository-topology.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/bounded-repository-topology.js +80 -0
- package/dist/consumer-integration/adapters/bounded-repository-topology.js.map +1 -0
- package/dist/consumer-integration/adapters/consumer-integration-schema-validator.d.ts +3 -0
- package/dist/consumer-integration/adapters/consumer-integration-schema-validator.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/consumer-integration-schema-validator.js +43 -0
- package/dist/consumer-integration/adapters/consumer-integration-schema-validator.js.map +1 -0
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.d.ts +14 -0
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.js +404 -0
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.js.map +1 -0
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.d.ts +3 -0
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.js +152 -0
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.js.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.d.ts +3 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.js +37 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.js.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.d.ts +16 -0
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.js +155 -0
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.js.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.d.ts +8 -0
- package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.js +160 -0
- package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.js.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-assets.d.ts +57 -0
- package/dist/consumer-integration/application/policies/consumer-integration-assets.d.ts.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-assets.js +151 -0
- package/dist/consumer-integration/application/policies/consumer-integration-assets.js.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.d.ts +4 -0
- package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.d.ts.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.js +23 -0
- package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.js.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-desired-state.d.ts +4 -0
- package/dist/consumer-integration/application/policies/consumer-integration-desired-state.d.ts.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-desired-state.js +153 -0
- package/dist/consumer-integration/application/policies/consumer-integration-desired-state.js.map +1 -0
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.d.ts +18 -0
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.d.ts.map +1 -0
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.js +537 -0
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.js.map +1 -0
- package/dist/consumer-integration/composition/consumer-integration-cli.d.ts +3 -0
- package/dist/consumer-integration/composition/consumer-integration-cli.d.ts.map +1 -0
- package/dist/consumer-integration/composition/consumer-integration-cli.js +223 -0
- package/dist/consumer-integration/composition/consumer-integration-cli.js.map +1 -0
- package/dist/consumer-integration/composition/node-consumer-integration.d.ts +28 -0
- package/dist/consumer-integration/composition/node-consumer-integration.d.ts.map +1 -0
- package/dist/consumer-integration/composition/node-consumer-integration.js +138 -0
- package/dist/consumer-integration/composition/node-consumer-integration.js.map +1 -0
- package/dist/consumer-integration/domain/model.d.ts +105 -0
- package/dist/consumer-integration/domain/model.d.ts.map +1 -0
- package/dist/consumer-integration/domain/model.js +2 -0
- package/dist/consumer-integration/domain/model.js.map +1 -0
- package/dist/consumer-integration/generated/canonical-assets.d.ts +3 -0
- package/dist/consumer-integration/generated/canonical-assets.d.ts.map +1 -0
- package/dist/consumer-integration/generated/canonical-assets.js +4 -0
- package/dist/consumer-integration/generated/canonical-assets.js.map +1 -0
- package/dist/consumer-integration/index.d.ts +11 -0
- package/dist/consumer-integration/index.d.ts.map +1 -0
- package/dist/consumer-integration/index.js +7 -0
- package/dist/consumer-integration/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +13 -3
- package/schemas/docs-consumer-integration-execution/v1.schema.json +29 -0
- package/schemas/docs-consumer-integration-plan/v1.schema.json +63 -0
- package/schemas/docs-consumer-integration-profile/v1.schema.json +110 -0
- package/schemas/docs-consumer-managed-state/v1.schema.json +99 -0
- package/schemas/qualified-docs-cohort/v1.schema.json +96 -0
- package/skills/docs/SKILL.md +28 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export function validPnpmPeerContext(value, exactVersion) {
|
|
2
|
+
if (value === exactVersion) {
|
|
3
|
+
return true;
|
|
4
|
+
}
|
|
5
|
+
if (typeof value !== "string" || !value.startsWith(`${exactVersion}(`)) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
const contentByDepth = [];
|
|
9
|
+
for (const character of value.slice(exactVersion.length)) {
|
|
10
|
+
if (character === "(") {
|
|
11
|
+
contentByDepth.push(false);
|
|
12
|
+
}
|
|
13
|
+
else if (character === ")") {
|
|
14
|
+
if (contentByDepth.pop() !== true) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
if (contentByDepth.length > 0) {
|
|
18
|
+
contentByDepth[contentByDepth.length - 1] = true;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
if (contentByDepth.length === 0 || /\s/u.test(character)) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
contentByDepth[contentByDepth.length - 1] = true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return contentByDepth.length === 0;
|
|
29
|
+
}
|
|
30
|
+
export function targetsManagedPackage(value) {
|
|
31
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
return Object.keys(value).some((key) => key.includes("@agent-teams/docs-protocol") ||
|
|
35
|
+
key.includes("@agent-teams/engineering-foundation"));
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=pnpm-lockfile-policy-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpm-lockfile-policy-v1.js","sourceRoot":"","sources":["../../../src/consumer-integration/adapters/pnpm-lockfile-policy-v1.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB,CAAC,KAAc,EAAE,YAAoB;IACvE,IAAI,KAAK,KAAK,YAAY,EAAE,CAAC;QAAA,OAAO,IAAI,CAAC;IAAA,CAAC;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G,EAAE,EAAE,CACrC,GAAG,CAAC,QAAQ,CAAC,4BAA4B,CAAC;QAC1C,GAAG,CAAC,QAAQ,CAAC,qCAAqC,CAAC,CACpD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ConsumerIntegrationDigest, ConsumerIntegrationFileObservation, ConsumerIntegrationIssue, QualifiedDocsCohortBindingV1 } from "../domain/model.js";
|
|
2
|
+
/** @public */
|
|
3
|
+
export interface PnpmManifestPlanV1 {
|
|
4
|
+
readonly state: "conflict" | "exact-current" | "known-prior";
|
|
5
|
+
readonly currentDigest: ConsumerIntegrationDigest;
|
|
6
|
+
readonly expectedDigest: ConsumerIntegrationDigest;
|
|
7
|
+
readonly postimage?: Uint8Array;
|
|
8
|
+
readonly issues: readonly ConsumerIntegrationIssue[];
|
|
9
|
+
}
|
|
10
|
+
export declare function planPnpmManifestV1(input: {
|
|
11
|
+
readonly observation: ConsumerIntegrationFileObservation;
|
|
12
|
+
readonly profilePath: string;
|
|
13
|
+
readonly cohort: QualifiedDocsCohortBindingV1;
|
|
14
|
+
readonly knownPriorScriptsDigest?: ConsumerIntegrationDigest;
|
|
15
|
+
}): PnpmManifestPlanV1;
|
|
16
|
+
//# sourceMappingURL=pnpm-manifest-adapter-v1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpm-manifest-adapter-v1.d.ts","sourceRoot":"","sources":["../../../src/consumer-integration/adapters/pnpm-manifest-adapter-v1.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,yBAAyB,EACzB,kCAAkC,EAClC,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,oBAAoB,CAAC;AAU5B,cAAc;AACd,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,eAAe,GAAG,aAAa,CAAC;IAC7D,QAAQ,CAAC,aAAa,EAAE,yBAAyB,CAAC;IAClD,QAAQ,CAAC,cAAc,EAAE,yBAAyB,CAAC;IACnD,QAAQ,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,SAAS,wBAAwB,EAAE,CAAC;CACtD;AAoGD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,QAAQ,CAAC,WAAW,EAAE,kCAAkC,CAAC;IACzD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAC;IAC9C,QAAQ,CAAC,uBAAuB,CAAC,EAAE,yBAAyB,CAAC;CAC9D,GAAG,kBAAkB,CA8ErB"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { applyEdits, modify } from "jsonc-parser";
|
|
2
|
+
import { parseJsonRecord, recordField } from "../../adapters/adoption-input.js";
|
|
3
|
+
import { canonicalConsumerIntegrationJson, canonicalDocsScripts, digestBytes } from "../application/policies/consumer-integration-assets.js";
|
|
4
|
+
const DOCS_PACKAGE = "@agent-teams/docs-protocol";
|
|
5
|
+
const FOUNDATION_PACKAGE = "@agent-teams/engineering-foundation";
|
|
6
|
+
function issue(subject, code, message) {
|
|
7
|
+
return { code, severity: "error", subject, message };
|
|
8
|
+
}
|
|
9
|
+
function rejectPrototypeKeys(value, path = "package.json") {
|
|
10
|
+
if (Array.isArray(value)) {
|
|
11
|
+
value.forEach((entry, index) => rejectPrototypeKeys(entry, `${path}[${index}]`));
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (typeof value !== "object" || value === null) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
18
|
+
if (["__proto__", "constructor", "prototype"].includes(key)) {
|
|
19
|
+
throw new TypeError(`${path}.${key} is forbidden.`);
|
|
20
|
+
}
|
|
21
|
+
rejectPrototypeKeys(entry, `${path}.${key}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function formatting(source) {
|
|
25
|
+
const eol = source.includes("\r\n") ? "\r\n" : "\n";
|
|
26
|
+
const indent = source.match(/\n([\t ]+)"/u)?.[1] ?? " ";
|
|
27
|
+
return {
|
|
28
|
+
eol,
|
|
29
|
+
insertSpaces: !indent.includes("\t"),
|
|
30
|
+
tabSize: indent.includes("\t") ? 1 : indent.length
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function applyField(source, path, value) {
|
|
34
|
+
return applyEdits(source, modify(source, [...path], value, {
|
|
35
|
+
formattingOptions: formatting(source)
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
function parseManifest(bytes) {
|
|
39
|
+
const source = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
40
|
+
if (source.startsWith("\uFEFF")) {
|
|
41
|
+
throw new TypeError("package.json must not contain a UTF-8 BOM.");
|
|
42
|
+
}
|
|
43
|
+
const manifest = parseJsonRecord(source);
|
|
44
|
+
rejectPrototypeKeys(manifest);
|
|
45
|
+
return { manifest, source };
|
|
46
|
+
}
|
|
47
|
+
function manifestShapeIssues(manifest) {
|
|
48
|
+
const issues = [];
|
|
49
|
+
for (const field of [
|
|
50
|
+
"scripts", "dependencies", "devDependencies", "optionalDependencies", "peerDependencies"
|
|
51
|
+
]) {
|
|
52
|
+
const value = manifest[field];
|
|
53
|
+
if (value !== undefined &&
|
|
54
|
+
(typeof value !== "object" || value === null || Array.isArray(value))) {
|
|
55
|
+
issues.push(issue(`package.json#${field}`, "DOCS_CONSUMER_MANIFEST_FIELD_INVALID", `${field} must be one object when present.`));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return issues;
|
|
59
|
+
}
|
|
60
|
+
function cohortDependencyIssues(dependencies, devDependencies, optionalDependencies, peerDependencies, cohort) {
|
|
61
|
+
const issues = [];
|
|
62
|
+
for (const packageName of [DOCS_PACKAGE, FOUNDATION_PACKAGE]) {
|
|
63
|
+
for (const [field, declarations] of [
|
|
64
|
+
["dependencies", dependencies],
|
|
65
|
+
["optionalDependencies", optionalDependencies],
|
|
66
|
+
["peerDependencies", peerDependencies]
|
|
67
|
+
]) {
|
|
68
|
+
if (declarations[packageName] !== undefined) {
|
|
69
|
+
issues.push(issue(`package.json#${field}`, "DOCS_CONSUMER_NON_DEV_DEPENDENCY", `${packageName} may be declared only in root devDependencies.`));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const requiredVersions = {
|
|
74
|
+
[DOCS_PACKAGE]: cohort.packages.docsProtocol.version,
|
|
75
|
+
[FOUNDATION_PACKAGE]: cohort.packages.engineeringFoundation.version
|
|
76
|
+
};
|
|
77
|
+
for (const [packageName, version] of Object.entries(requiredVersions)) {
|
|
78
|
+
if (devDependencies[packageName] !== version) {
|
|
79
|
+
issues.push(issue(`package.json#devDependencies.${packageName}`, "DOCS_CONSUMER_COHORT_PIN_REQUIRED", `Update ${packageName} and pnpm-lock.yaml together to exact version ${version} before consumer apply.`));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return issues;
|
|
83
|
+
}
|
|
84
|
+
export function planPnpmManifestV1(input) {
|
|
85
|
+
if (input.observation.state === "absent") {
|
|
86
|
+
const empty = digestBytes(new Uint8Array());
|
|
87
|
+
return {
|
|
88
|
+
state: "conflict",
|
|
89
|
+
currentDigest: empty,
|
|
90
|
+
expectedDigest: empty,
|
|
91
|
+
issues: [issue("package.json", "DOCS_CONSUMER_MANIFEST_MISSING", "A root package.json is required and is never created by consumer integration.")]
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const bytes = Buffer.from(input.observation.bytes);
|
|
95
|
+
const currentDigest = digestBytes(bytes);
|
|
96
|
+
let source;
|
|
97
|
+
let manifest;
|
|
98
|
+
try {
|
|
99
|
+
({ manifest, source } = parseManifest(bytes));
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
return {
|
|
103
|
+
state: "conflict",
|
|
104
|
+
currentDigest,
|
|
105
|
+
expectedDigest: currentDigest,
|
|
106
|
+
issues: [issue("package.json", "DOCS_CONSUMER_MANIFEST_INVALID", error instanceof Error ? error.message : "package.json is invalid.")]
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
const issues = manifestShapeIssues(manifest);
|
|
110
|
+
const scripts = recordField(manifest, "scripts");
|
|
111
|
+
const dependencies = recordField(manifest, "dependencies");
|
|
112
|
+
const devDependencies = recordField(manifest, "devDependencies");
|
|
113
|
+
const optionalDependencies = recordField(manifest, "optionalDependencies");
|
|
114
|
+
const peerDependencies = recordField(manifest, "peerDependencies");
|
|
115
|
+
issues.push(...cohortDependencyIssues(dependencies, devDependencies, optionalDependencies, peerDependencies, input.cohort));
|
|
116
|
+
const desiredScripts = canonicalDocsScripts(input.profilePath);
|
|
117
|
+
const observedScripts = Object.fromEntries(Object.keys(desiredScripts).map((script) => [
|
|
118
|
+
script,
|
|
119
|
+
scripts[script] ?? null
|
|
120
|
+
]));
|
|
121
|
+
const observedScriptsDigest = digestBytes(Buffer.from(canonicalConsumerIntegrationJson(observedScripts), "utf8"));
|
|
122
|
+
let postimage = source;
|
|
123
|
+
for (const [script, command] of Object.entries(desiredScripts)) {
|
|
124
|
+
const pre = `pre${script}`;
|
|
125
|
+
const post = `post${script}`;
|
|
126
|
+
if (scripts[pre] !== undefined || scripts[post] !== undefined) {
|
|
127
|
+
issues.push(issue(`package.json#scripts.${script}`, "DOCS_CONSUMER_RESERVED_LIFECYCLE_SCRIPT", `${pre} and ${post} are forbidden for managed documentation commands.`));
|
|
128
|
+
}
|
|
129
|
+
const current = scripts[script];
|
|
130
|
+
if (current !== undefined && current !== command &&
|
|
131
|
+
observedScriptsDigest !== input.knownPriorScriptsDigest) {
|
|
132
|
+
issues.push(issue(`package.json#scripts.${script}`, "DOCS_CONSUMER_RESERVED_SCRIPT_CONFLICT", `${script} contains unknown local behavior and was not overwritten.`));
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if (current !== command) {
|
|
136
|
+
postimage = applyField(postimage, ["scripts", script], command);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
const expectedBytes = Buffer.from(postimage, "utf8");
|
|
140
|
+
const expectedDigest = digestBytes(expectedBytes);
|
|
141
|
+
if (issues.length > 0) {
|
|
142
|
+
return { state: "conflict", currentDigest, expectedDigest, issues: Object.freeze(issues) };
|
|
143
|
+
}
|
|
144
|
+
if (expectedDigest === currentDigest) {
|
|
145
|
+
return { state: "exact-current", currentDigest, expectedDigest, issues: [] };
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
state: "known-prior",
|
|
149
|
+
currentDigest,
|
|
150
|
+
expectedDigest,
|
|
151
|
+
postimage: expectedBytes,
|
|
152
|
+
issues: []
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=pnpm-manifest-adapter-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpm-manifest-adapter-v1.js","sourceRoot":"","sources":["../../../src/consumer-integration/adapters/pnpm-manifest-adapter-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAOhF,OAAO,EACL,gCAAgC,EAChC,oBAAoB,EACpB,WAAW,EACZ,MAAM,wDAAwD,CAAC;AAEhE,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAClD,MAAM,kBAAkB,GAAG,qCAAqC,CAAC;AAWjE,SAAS,KAAK,CAAC,OAAe,EAAE,IAAY,EAAE,OAAe;IAC3D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACvD,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAc,EAAE,IAAI,GAAG,cAAc;IAChE,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,KAAK,CAAC,OAAO,CAAC,CA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C;YACrK,SAAS;QACX,CAAC;QACD,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;YACxB,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IACD,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;IAClD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC7F,CAAC;IACD,IAAI,cAAc,KAAK,aAAa,EAAE,CAAC;QACrC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC/E,CAAC;IACD,OAAO;QACL,KAAK,EAAE,aAAa;QACpB,aAAa;QACb,cAAc;QACd,SAAS,EAAE,aAAa;QACxB,MAAM,EAAE,EAAE;KACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { QualifiedDocsCohortBindingV1 } from "../domain/model.js";
|
|
2
|
+
type JsonRecord = Record<string, unknown>;
|
|
3
|
+
export declare class PnpmRuntimeClosureError extends Error {
|
|
4
|
+
readonly code = "DOCS_CONSUMER_RUNTIME_CLOSURE_MISMATCH";
|
|
5
|
+
}
|
|
6
|
+
export declare function computePnpmRuntimeClosureDigestV1(lock: JsonRecord, cohort: QualifiedDocsCohortBindingV1): `sha256:${string}`;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=pnpm-runtime-closure-v1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpm-runtime-closure-v1.d.ts","sourceRoot":"","sources":["../../../src/consumer-integration/adapters/pnpm-runtime-closure-v1.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAWvE,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,SAAgB,IAAI,4CAA4C;CACjE;AAsDD,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,4BAA4B,GACnC,UAAU,MAAM,EAAE,CAmHpB"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { canonicalConsumerIntegrationJson } from "../application/policies/consumer-integration-assets.js";
|
|
3
|
+
const PACKAGE_MANAGER = "pnpm@11.18.0";
|
|
4
|
+
const LOCKFILE_VERSION = "9.0";
|
|
5
|
+
const MAXIMUM_PACKAGES = 2048;
|
|
6
|
+
const MAXIMUM_DEPTH = 64;
|
|
7
|
+
const MAXIMUM_BYTES = 2 * 1024 * 1024;
|
|
8
|
+
const REGISTRY_VERSION = /^[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?(?:\+[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?$/u;
|
|
9
|
+
const SHA512_SRI = /^sha512-[A-Za-z0-9+/]{86}==$/u;
|
|
10
|
+
export class PnpmRuntimeClosureError extends Error {
|
|
11
|
+
code = "DOCS_CONSUMER_RUNTIME_CLOSURE_MISMATCH";
|
|
12
|
+
}
|
|
13
|
+
function fail(message) {
|
|
14
|
+
throw new PnpmRuntimeClosureError(message);
|
|
15
|
+
}
|
|
16
|
+
function record(value, label) {
|
|
17
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
18
|
+
fail(`${label} must be one object.`);
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
function binding(container, name) {
|
|
23
|
+
return ["dependencies", "devDependencies", "optionalDependencies"].flatMap((section) => {
|
|
24
|
+
const entries = container[section];
|
|
25
|
+
return entries === null || typeof entries !== "object" || Array.isArray(entries) ||
|
|
26
|
+
entries[name] === undefined ? [] : [entries[name]];
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function locator(name, raw, label) {
|
|
30
|
+
if (typeof raw !== "string" || raw.length > 1024 || /[\s\\:#]/u.test(raw)) {
|
|
31
|
+
fail(`${label} is not one bounded registry resolution.`);
|
|
32
|
+
}
|
|
33
|
+
const version = raw.split("(", 1)[0];
|
|
34
|
+
if (!REGISTRY_VERSION.test(version) || raw.startsWith("npm:")) {
|
|
35
|
+
fail(`${label} uses a non-registry or aliased resolution.`);
|
|
36
|
+
}
|
|
37
|
+
return `${name}@${raw}`;
|
|
38
|
+
}
|
|
39
|
+
function sortedEdges(snapshot, section, label) {
|
|
40
|
+
const value = snapshot[section] ?? {};
|
|
41
|
+
const source = record(value, `${label} ${section}`);
|
|
42
|
+
return Object.entries(source)
|
|
43
|
+
.toSorted(([left], [right]) => left < right ? -1 : left > right ? 1 : 0)
|
|
44
|
+
.map(([name, raw]) => ({ name, locator: locator(name, raw, `${label} ${section}.${name}`) }));
|
|
45
|
+
}
|
|
46
|
+
function packageRoots(cohort) {
|
|
47
|
+
return [
|
|
48
|
+
{ name: "@agent-teams/docs-protocol", ...cohort.packages.docsProtocol },
|
|
49
|
+
{ name: "@agent-teams/engineering-foundation", ...cohort.packages.engineeringFoundation }
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
export function computePnpmRuntimeClosureDigestV1(lock, cohort) {
|
|
53
|
+
if (String(lock["lockfileVersion"]) !== LOCKFILE_VERSION) {
|
|
54
|
+
fail("Runtime closure requires pnpm lockfileVersion 9.0.");
|
|
55
|
+
}
|
|
56
|
+
const importers = record(lock["importers"], "Runtime closure importers");
|
|
57
|
+
const packages = record(lock["packages"], "Runtime closure packages");
|
|
58
|
+
const snapshots = record(lock["snapshots"], "Runtime closure snapshots");
|
|
59
|
+
const root = record(importers["."], "Runtime closure root importer");
|
|
60
|
+
const expected = packageRoots(cohort);
|
|
61
|
+
const roots = expected.map((entry) => {
|
|
62
|
+
const bindings = binding(root, entry.name);
|
|
63
|
+
if (bindings.length !== 1) {
|
|
64
|
+
fail(`${entry.name} runtime closure root binding is not exact.`);
|
|
65
|
+
}
|
|
66
|
+
const selected = record(bindings[0], `${entry.name} runtime closure root binding`);
|
|
67
|
+
if (selected["specifier"] !== entry.version || typeof selected["version"] !== "string") {
|
|
68
|
+
fail(`${entry.name} runtime closure root binding is not exact.`);
|
|
69
|
+
}
|
|
70
|
+
const selectedLocator = locator(entry.name, selected["version"], `${entry.name} runtime closure root`);
|
|
71
|
+
if (selectedLocator.split("(", 1)[0] !== `${entry.name}@${entry.version}`) {
|
|
72
|
+
fail(`${entry.name} runtime closure root version differs from the Cohort.`);
|
|
73
|
+
}
|
|
74
|
+
const packageEntry = record(packages[`${entry.name}@${entry.version}`], `${entry.name} package`);
|
|
75
|
+
const resolution = record(packageEntry["resolution"], `${entry.name} resolution`);
|
|
76
|
+
if (resolution["integrity"] !== entry.integrity) {
|
|
77
|
+
fail(`${entry.name} runtime closure root integrity differs from the Cohort.`);
|
|
78
|
+
}
|
|
79
|
+
return { name: entry.name, locator: selectedLocator };
|
|
80
|
+
}).toSorted(({ name: left }, { name: right }) => left < right ? -1 : left > right ? 1 : 0);
|
|
81
|
+
const pending = roots.map(({ locator: rootLocator }) => ({ locator: rootLocator, depth: 0 }));
|
|
82
|
+
const visited = new Set();
|
|
83
|
+
const projectedPackages = [];
|
|
84
|
+
while (pending.length > 0) {
|
|
85
|
+
const current = pending.shift();
|
|
86
|
+
if (visited.has(current.locator)) {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (current.depth > MAXIMUM_DEPTH) {
|
|
90
|
+
fail(`Runtime closure exceeds maximum dependency depth ${MAXIMUM_DEPTH}.`);
|
|
91
|
+
}
|
|
92
|
+
visited.add(current.locator);
|
|
93
|
+
if (visited.size > MAXIMUM_PACKAGES) {
|
|
94
|
+
fail(`Runtime closure exceeds maximum package count ${MAXIMUM_PACKAGES}.`);
|
|
95
|
+
}
|
|
96
|
+
const physicalLocator = current.locator.split("(", 1)[0];
|
|
97
|
+
const packageEntry = record(packages[physicalLocator], `Runtime closure package ${physicalLocator}`);
|
|
98
|
+
const snapshot = record(snapshots[current.locator], `Runtime closure snapshot ${current.locator}`);
|
|
99
|
+
const resolution = record(packageEntry["resolution"], `Runtime closure resolution ${physicalLocator}`);
|
|
100
|
+
const integrity = resolution["integrity"];
|
|
101
|
+
if (typeof integrity !== "string" || !SHA512_SRI.test(integrity)) {
|
|
102
|
+
fail(`Runtime closure locator ${current.locator} has no exact registry SRI.`);
|
|
103
|
+
}
|
|
104
|
+
const dependencies = sortedEdges(snapshot, "dependencies", current.locator);
|
|
105
|
+
const optionalDependencies = sortedEdges(snapshot, "optionalDependencies", current.locator);
|
|
106
|
+
const edgeByName = new Map();
|
|
107
|
+
for (const edge of [...dependencies, ...optionalDependencies]) {
|
|
108
|
+
const prior = edgeByName.get(edge.name);
|
|
109
|
+
if (prior !== undefined && prior !== edge.locator) {
|
|
110
|
+
fail(`Runtime closure locator ${current.locator} has ambiguous dependency ${edge.name}.`);
|
|
111
|
+
}
|
|
112
|
+
edgeByName.set(edge.name, edge.locator);
|
|
113
|
+
pending.push({ locator: edge.locator, depth: current.depth + 1 });
|
|
114
|
+
}
|
|
115
|
+
projectedPackages.push({
|
|
116
|
+
locator: current.locator,
|
|
117
|
+
integrity,
|
|
118
|
+
dependencies,
|
|
119
|
+
optionalDependencies
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
projectedPackages.sort(({ locator: left }, { locator: right }) => left < right ? -1 : left > right ? 1 : 0);
|
|
123
|
+
const projection = {
|
|
124
|
+
schemaVersion: 1,
|
|
125
|
+
packageManager: PACKAGE_MANAGER,
|
|
126
|
+
lockfileVersion: LOCKFILE_VERSION,
|
|
127
|
+
packageCount: projectedPackages.length,
|
|
128
|
+
roots,
|
|
129
|
+
packages: projectedPackages
|
|
130
|
+
};
|
|
131
|
+
if (Buffer.byteLength(canonicalConsumerIntegrationJson(projection), "utf8") > MAXIMUM_BYTES) {
|
|
132
|
+
fail(`Runtime closure projection exceeds ${MAXIMUM_BYTES} bytes.`);
|
|
133
|
+
}
|
|
134
|
+
const physicalLocators = [...new Set(projectedPackages.map(({ locator: value }) => value.split("(", 1)[0]))].toSorted((left, right) => left < right ? -1 : left > right ? 1 : 0);
|
|
135
|
+
const pnpmLock = {
|
|
136
|
+
lockfileVersion: LOCKFILE_VERSION,
|
|
137
|
+
settings: { autoInstallPeers: true, excludeLinksFromLockfile: false },
|
|
138
|
+
importers: { ".": { devDependencies: Object.fromEntries(roots.map(({ name, locator: value }) => [
|
|
139
|
+
name,
|
|
140
|
+
{
|
|
141
|
+
specifier: expected.find((entry) => entry.name === name).version,
|
|
142
|
+
version: value.slice(`${name}@`.length)
|
|
143
|
+
}
|
|
144
|
+
])) } },
|
|
145
|
+
packages: Object.fromEntries(physicalLocators.map((value) => [value, packages[value]])),
|
|
146
|
+
snapshots: Object.fromEntries(projectedPackages.map(({ locator: value }) => [value, snapshots[value]]))
|
|
147
|
+
};
|
|
148
|
+
const source = `${canonicalConsumerIntegrationJson({
|
|
149
|
+
domain: "agent-teams.docs-runtime-closure/v1",
|
|
150
|
+
schemaVersion: 1,
|
|
151
|
+
packageManager: PACKAGE_MANAGER,
|
|
152
|
+
packageCount: projectedPackages.length,
|
|
153
|
+
pnpmLock
|
|
154
|
+
})}\n`;
|
|
155
|
+
if (Buffer.byteLength(source, "utf8") > MAXIMUM_BYTES) {
|
|
156
|
+
fail(`Runtime closure evidence exceeds ${MAXIMUM_BYTES} bytes.`);
|
|
157
|
+
}
|
|
158
|
+
return `sha256:${createHash("sha256").update(source).digest("hex")}`;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=pnpm-runtime-closure-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpm-runtime-closure-v1.js","sourceRoot":"","sources":["../../../src/consumer-integration/adapters/pnpm-runtime-closure-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,gCAAgC,EAAE,MAAM,wDAAwD,CAAC;AAE1G,MAAM,eAAe,GAAG,cAAc,CAAC;AACvC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC,MAAM,gBAAgB,GAAG,0GAA0G,CAAC;AACpI,MAAM,UAAU,GAAG,+BAA+B,CAAC;AAInD,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IAChC,IAAI,GAAG,wCAAwC,CAAC;CACjE;AAED,SAAS,IAAI,CAAC,OAAe;IAC3B,MAAM,IAAI,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,MAAM,CAAC,KAAc,EAAE,KAAa;IAC3C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,IAAI,CAAC,GAAG,KAAK,sBAAsB,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,KAAmB,CAAC;AAC7B,CAAC;AAED,SAAS,OAAO,CAAC,SAAqB,EAAE,IAAY;IAClD,OAAO,CAAC,cAAc,EAAE,iBAAiB,EAAE,sBAAsB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACrF,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QACnC,OAAO,OAAO,KAAK,IAA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P,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,aAAa,EAAE,CAAC;QACtD,IAAI,CAAC,oCAAoC,aAAa,SAAS,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ConsumerIntegrationDesiredStateV1, ConsumerIntegrationDigest, QualifiedDocsCohortBindingV1 } from "../../domain/model.js";
|
|
2
|
+
export declare const CANONICAL_DOCS_SKILL: "---\nname: docs-authoring\ndescription: Use when creating, changing, reorganizing, or reviewing governed documentation in this repository.\n---\n\n# Documentation Authoring\n\nProtocol: `agent-teams.docs-protocol/v1`.\n\n## Required workflow\n\n- Read the current types, owners, placement, metadata, and index policy with `pnpm docs:info`.\n- Search first with `pnpm docs:find -- --text query`.\n- Reuse or relate existing authority instead of creating a competing source.\n- Preview with `pnpm docs:new -- --type TYPE --id ID --title TITLE --owner OWNER --summary SUMMARY --dry-run`.\n- Review the exact destination, metadata, relations, anchors, and diagnostics.\n- Apply with `pnpm docs:new -- --type TYPE --id ID --title TITLE --owner OWNER --summary SUMMARY --apply` after review.\n- Manually update the reported index/link exactly when reachability requires it.\n- Finish with `pnpm docs:check` after the index is current.\n\n## Rules\n\n- Never invent owners, types, statuses, paths, or metadata outside `docs:info`.\n- If dependencies are absent, use only `pnpm install --frozen-lockfile`; never use npx, dlx, or latest tags.\n- Keep preview and apply inputs identical.\n- Stop when recovery is required; use `pnpm docs:doctor` before `pnpm docs:recover`.\n- Resolve required anchors and blockers before apply.\n- Do not bypass repository scripts or hand-edit transaction evidence.\n";
|
|
3
|
+
export declare const CANONICAL_CALLER_WORKFLOW_TEMPLATE: "name: Documentation Protocol\n\non:\n pull_request:\n merge_group:\n push:\n\npermissions:\n contents: read\n\njobs:\n docs-protocol:\n uses: {{REUSABLE_WORKFLOW_REPOSITORY}}/{{REUSABLE_WORKFLOW_PATH}}@{{REUSABLE_WORKFLOW_REVISION}}\n";
|
|
4
|
+
export declare const BOOTSTRAP_KNOWN_PRIOR_DOCS_SKILLS: readonly Uint8Array[];
|
|
5
|
+
export declare const MANAGED_ROUTE_BEGIN = "<!-- agent-teams-docs:route/v1 begin -->";
|
|
6
|
+
export declare const MANAGED_ROUTE_END = "<!-- agent-teams-docs:route/v1 end -->";
|
|
7
|
+
export declare const BOOTSTRAP_KNOWN_PRIOR_CALLER_WORKFLOWS: readonly Uint8Array[];
|
|
8
|
+
export interface KnownPriorCohortCatalogEntryV1 {
|
|
9
|
+
readonly cohort: QualifiedDocsCohortBindingV1;
|
|
10
|
+
readonly skill: Uint8Array;
|
|
11
|
+
readonly callerWorkflow: Uint8Array;
|
|
12
|
+
readonly agentsRouteDigest: ConsumerIntegrationDigest;
|
|
13
|
+
readonly docsScriptsDigest: ConsumerIntegrationDigest;
|
|
14
|
+
}
|
|
15
|
+
export interface CurrentSourceExecutorV1 {
|
|
16
|
+
readonly packages: QualifiedDocsCohortBindingV1["packages"];
|
|
17
|
+
readonly schemas: QualifiedDocsCohortBindingV1["schemas"];
|
|
18
|
+
readonly runtime: QualifiedDocsCohortBindingV1["runtime"];
|
|
19
|
+
readonly assetCatalogDigest: ConsumerIntegrationDigest;
|
|
20
|
+
readonly skillDigest: ConsumerIntegrationDigest;
|
|
21
|
+
readonly callerWorkflowDigest: ConsumerIntegrationDigest;
|
|
22
|
+
readonly agentsRouteDigest: ConsumerIntegrationDigest;
|
|
23
|
+
readonly docsScriptsDigest: ConsumerIntegrationDigest;
|
|
24
|
+
readonly directTargetCohortIds: readonly string[];
|
|
25
|
+
}
|
|
26
|
+
export interface ConsumerAssetCatalogV1 {
|
|
27
|
+
readonly catalogDigest: ConsumerIntegrationDigest;
|
|
28
|
+
readonly transitionCatalogDigest: ConsumerIntegrationDigest;
|
|
29
|
+
readonly currentSourceExecutors: readonly CurrentSourceExecutorV1[];
|
|
30
|
+
readonly directTargetBundles: readonly KnownPriorCohortCatalogEntryV1[];
|
|
31
|
+
}
|
|
32
|
+
export declare const BUNDLED_KNOWN_PRIOR_COHORTS: readonly KnownPriorCohortCatalogEntryV1[];
|
|
33
|
+
export declare const BUNDLED_CURRENT_SOURCE_EXECUTORS: readonly CurrentSourceExecutorV1[];
|
|
34
|
+
export declare const CANONICAL_TRANSITION_CATALOG: string;
|
|
35
|
+
export declare const CANONICAL_ASSET_CATALOG: string;
|
|
36
|
+
export declare function isBootstrapKnownPriorCallerWorkflow(bytes: Uint8Array): boolean;
|
|
37
|
+
export declare function digestBytes(value: Uint8Array): ConsumerIntegrationDigest;
|
|
38
|
+
export declare function canonicalCallerWorkflow(cohort: QualifiedDocsCohortBindingV1): string;
|
|
39
|
+
export declare function canonicalDocsScriptsDigest(profilePath: string): ConsumerIntegrationDigest;
|
|
40
|
+
export declare function canonicalManagedRoute(skillPath: string): string;
|
|
41
|
+
export declare function canonicalDocsScripts(profilePath: string): Readonly<Record<string, string>>;
|
|
42
|
+
export declare function canonicalConsumerIntegrationJson(value: unknown): string;
|
|
43
|
+
export declare function canonicalManagedState(desired: ConsumerIntegrationDesiredStateV1, assets: {
|
|
44
|
+
readonly skillDigest: ConsumerIntegrationDigest;
|
|
45
|
+
readonly callerWorkflowDigest: ConsumerIntegrationDigest;
|
|
46
|
+
readonly assetCatalogDigest: ConsumerIntegrationDigest;
|
|
47
|
+
readonly transitionCatalogDigest: ConsumerIntegrationDigest;
|
|
48
|
+
readonly agentsRouteDigest: ConsumerIntegrationDigest;
|
|
49
|
+
readonly docsScriptsDigest: ConsumerIntegrationDigest;
|
|
50
|
+
}): string;
|
|
51
|
+
export declare function describeCanonicalConsumerAssets(cohort: QualifiedDocsCohortBindingV1): {
|
|
52
|
+
readonly skillDigest: ConsumerIntegrationDigest;
|
|
53
|
+
readonly callerWorkflowDigest: ConsumerIntegrationDigest;
|
|
54
|
+
readonly assetCatalogDigest: ConsumerIntegrationDigest;
|
|
55
|
+
readonly transitionCatalogDigest: ConsumerIntegrationDigest;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=consumer-integration-assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumer-integration-assets.d.ts","sourceRoot":"","sources":["../../../../src/consumer-integration/application/policies/consumer-integration-assets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iCAAiC,EACjC,yBAAyB,EACzB,4BAA4B,EAC7B,MAAM,uBAAuB,CAAC;AAW/B,eAAO,MAAM,oBAAoB,m3CAAuB,CAAC;AACzD,eAAO,MAAM,kCAAkC,sPAAwC,CAAC;AAExF,eAAO,MAAM,iCAAiC,EAAE,SAAS,UAAU,EAYjE,CAAC;AAEH,eAAO,MAAM,mBAAmB,6CAA6C,CAAC;AAC9E,eAAO,MAAM,iBAAiB,2CAA2C,CAAC;AAI1E,eAAO,MAAM,sCAAsC,EAAE,SAAS,UAAU,EAgBtE,CAAC;AAEH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,UAAU,CAAC;IACpC,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;IACtD,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;CACvD;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;IAC5D,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC;IAC1D,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC;IAC1D,QAAQ,CAAC,kBAAkB,EAAE,yBAAyB,CAAC;IACvD,QAAQ,CAAC,WAAW,EAAE,yBAAyB,CAAC;IAChD,Q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AQ,CAAC,WAAW,EAAE,yBAAyB,CAAC;IAChD,QAAQ,CAAC,oBAAoB,EAAE,yBAAyB,CAAC;IACzD,QAAQ,CAAC,kBAAkB,EAAE,yBAAyB,CAAC;IACvD,QAAQ,CAAC,uBAAuB,EAAE,yBAAyB,CAAC;IAC5D,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;IACtD,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;CACvD,GACA,MAAM,CA8BR;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,4BAA4B,GAAG;IACrF,QAAQ,CAAC,WAAW,EAAE,yBAAyB,CAAC;IAChD,QAAQ,CAAC,oBAAoB,EAAE,yBAAyB,CAAC;IACzD,QAAQ,CAAC,kBAAkB,EAAE,yBAAyB,CAAC;IACvD,QAAQ,CAAC,uBAAuB,EAAE,yBAAyB,CAAC;CAC7D,CAUA"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { GENERATED_CALLER_WORKFLOW_TEMPLATE, GENERATED_DOCS_SKILL } from "../../generated/canonical-assets.js";
|
|
3
|
+
const CATALOG_SOURCE = Object.freeze({
|
|
4
|
+
skill: GENERATED_DOCS_SKILL,
|
|
5
|
+
callerWorkflowTemplate: GENERATED_CALLER_WORKFLOW_TEMPLATE
|
|
6
|
+
});
|
|
7
|
+
export const CANONICAL_DOCS_SKILL = CATALOG_SOURCE.skill;
|
|
8
|
+
export const CANONICAL_CALLER_WORKFLOW_TEMPLATE = CATALOG_SOURCE.callerWorkflowTemplate;
|
|
9
|
+
export const BOOTSTRAP_KNOWN_PRIOR_DOCS_SKILLS = Object.freeze([
|
|
10
|
+
Buffer.from(CANONICAL_DOCS_SKILL
|
|
11
|
+
.replace("--type TYPE --id ID --title TITLE --owner OWNER --summary SUMMARY --dry-run", "--type TYPE --id ID --dry-run")
|
|
12
|
+
.replace("--type TYPE --id ID --title TITLE --owner OWNER --summary SUMMARY --apply", "--type TYPE --id ID --apply")
|
|
13
|
+
.replace("- If dependencies are absent, use only `pnpm install --frozen-lockfile`; never use npx, dlx, or latest tags.\n", ""), "utf8")
|
|
14
|
+
]);
|
|
15
|
+
export const MANAGED_ROUTE_BEGIN = "<!-- agent-teams-docs:route/v1 begin -->";
|
|
16
|
+
export const MANAGED_ROUTE_END = "<!-- agent-teams-docs:route/v1 end -->";
|
|
17
|
+
const BOOTSTRAP_WORKFLOW_REVISION = "2679c8bc1e432091271d2f68ef904694e4d5838e";
|
|
18
|
+
export const BOOTSTRAP_KNOWN_PRIOR_CALLER_WORKFLOWS = Object.freeze([
|
|
19
|
+
Buffer.from(`name: Documentation Protocol
|
|
20
|
+
|
|
21
|
+
on:
|
|
22
|
+
pull_request:
|
|
23
|
+
push:
|
|
24
|
+
branches:
|
|
25
|
+
- main
|
|
26
|
+
|
|
27
|
+
permissions:
|
|
28
|
+
contents: read
|
|
29
|
+
|
|
30
|
+
jobs:
|
|
31
|
+
docs-protocol:
|
|
32
|
+
uses: agent-teams-ai/.github/.github/workflows/docs-protocol-check.yml@${BOOTSTRAP_WORKFLOW_REVISION}
|
|
33
|
+
`, "utf8")
|
|
34
|
+
]);
|
|
35
|
+
export const BUNDLED_KNOWN_PRIOR_COHORTS = Object.freeze([]);
|
|
36
|
+
export const BUNDLED_CURRENT_SOURCE_EXECUTORS = Object.freeze([]);
|
|
37
|
+
export const CANONICAL_TRANSITION_CATALOG = `${canonicalConsumerIntegrationJson({
|
|
38
|
+
schemaVersion: 1,
|
|
39
|
+
currentSourceExecutors: BUNDLED_CURRENT_SOURCE_EXECUTORS,
|
|
40
|
+
directTargetBundles: []
|
|
41
|
+
})}\n`;
|
|
42
|
+
export const CANONICAL_ASSET_CATALOG = `${canonicalConsumerIntegrationJson({
|
|
43
|
+
schemaVersion: 1,
|
|
44
|
+
skillPath: "skills/docs/SKILL.md",
|
|
45
|
+
skillDigest: digestBytes(Buffer.from(CATALOG_SOURCE.skill, "utf8")),
|
|
46
|
+
callerWorkflowTemplatePath: "assets/docs-protocol.yml",
|
|
47
|
+
callerWorkflowTemplateDigest: digestBytes(Buffer.from(CATALOG_SOURCE.callerWorkflowTemplate, "utf8")),
|
|
48
|
+
routeTemplate: canonicalManagedRoute("{skillPath}"),
|
|
49
|
+
scriptsTemplate: canonicalDocsScripts("{profilePath}"),
|
|
50
|
+
})}\n`;
|
|
51
|
+
export function isBootstrapKnownPriorCallerWorkflow(bytes) {
|
|
52
|
+
let source;
|
|
53
|
+
try {
|
|
54
|
+
source = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
if (source.normalize("NFC") !== source || source.includes("\u0000") || source.includes("\r")) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
const escapedRevision = BOOTSTRAP_WORKFLOW_REVISION.replaceAll("-", "\\-");
|
|
63
|
+
const match = new RegExp(`^name: Documentation Protocol\\n\\non:\\n pull_request:\\n push:\\n branches:\\n - ([A-Za-z0-9._/-]+)\\n\\npermissions:\\n contents: read\\n\\njobs:\\n docs-protocol:\\n uses: agent-teams-ai/\\.github/\\.github/workflows/docs-protocol-check\\.yml@${escapedRevision}\\n$`, "u").exec(source);
|
|
64
|
+
const branch = match?.[1];
|
|
65
|
+
return branch !== undefined && !branch.startsWith("/") && !branch.endsWith("/") &&
|
|
66
|
+
!branch.includes("..") && !branch.includes("//");
|
|
67
|
+
}
|
|
68
|
+
export function digestBytes(value) {
|
|
69
|
+
return `sha256:${createHash("sha256").update(value).digest("hex")}`;
|
|
70
|
+
}
|
|
71
|
+
export function canonicalCallerWorkflow(cohort) {
|
|
72
|
+
return CANONICAL_CALLER_WORKFLOW_TEMPLATE
|
|
73
|
+
.replace("{{REUSABLE_WORKFLOW_REPOSITORY}}", cohort.workflow.repository)
|
|
74
|
+
.replace("{{REUSABLE_WORKFLOW_PATH}}", cohort.workflow.path)
|
|
75
|
+
.replace("{{REUSABLE_WORKFLOW_REVISION}}", cohort.workflow.revision);
|
|
76
|
+
}
|
|
77
|
+
export function canonicalDocsScriptsDigest(profilePath) {
|
|
78
|
+
return digestBytes(Buffer.from(canonicalConsumerIntegrationJson(canonicalDocsScripts(profilePath)), "utf8"));
|
|
79
|
+
}
|
|
80
|
+
export function canonicalManagedRoute(skillPath) {
|
|
81
|
+
return `${MANAGED_ROUTE_BEGIN}
|
|
82
|
+
Use [${skillPath}](${skillPath}) for documentation.
|
|
83
|
+
${MANAGED_ROUTE_END}`;
|
|
84
|
+
}
|
|
85
|
+
export function canonicalDocsScripts(profilePath) {
|
|
86
|
+
return Object.freeze(Object.fromEntries(["check", "doctor", "find", "info", "new", "recover"].map((command) => [
|
|
87
|
+
`docs:${command}`,
|
|
88
|
+
`agent-teams-docs ${command} --consumer . --profile ${profilePath}`
|
|
89
|
+
])));
|
|
90
|
+
}
|
|
91
|
+
export function canonicalConsumerIntegrationJson(value) {
|
|
92
|
+
if (value === null || typeof value === "boolean" || typeof value === "string") {
|
|
93
|
+
return JSON.stringify(value);
|
|
94
|
+
}
|
|
95
|
+
if (typeof value === "number") {
|
|
96
|
+
if (!Number.isSafeInteger(value)) {
|
|
97
|
+
throw new TypeError("Managed state contains a non-canonical number.");
|
|
98
|
+
}
|
|
99
|
+
return JSON.stringify(value);
|
|
100
|
+
}
|
|
101
|
+
if (Array.isArray(value)) {
|
|
102
|
+
return `[${value.map(canonicalConsumerIntegrationJson).join(",")}]`;
|
|
103
|
+
}
|
|
104
|
+
if (typeof value !== "object" || value === undefined) {
|
|
105
|
+
throw new TypeError("Managed state contains a non-JSON value.");
|
|
106
|
+
}
|
|
107
|
+
return `{${Object.entries(value)
|
|
108
|
+
.toSorted(([left], [right]) => left < right ? -1 : left > right ? 1 : 0)
|
|
109
|
+
.map(([key, entry]) => `${JSON.stringify(key)}:${canonicalConsumerIntegrationJson(entry)}`)
|
|
110
|
+
.join(",")}}`;
|
|
111
|
+
}
|
|
112
|
+
export function canonicalManagedState(desired, assets) {
|
|
113
|
+
const body = {
|
|
114
|
+
schemaVersion: 1,
|
|
115
|
+
cohortId: desired.cohort.cohortId,
|
|
116
|
+
cohortAuthority: {
|
|
117
|
+
channel: desired.cohort.channel,
|
|
118
|
+
recordDigest: desired.cohort.recordDigest,
|
|
119
|
+
qualificationEventDigest: desired.cohort.qualificationEventDigest,
|
|
120
|
+
eligibleAfter: desired.cohort.eligibleAfter,
|
|
121
|
+
upgradeFrom: desired.cohort.upgradeFrom,
|
|
122
|
+
rollbackTo: desired.cohort.rollbackTo
|
|
123
|
+
},
|
|
124
|
+
repository: desired.repository,
|
|
125
|
+
packages: desired.cohort.packages,
|
|
126
|
+
schemas: desired.cohort.schemas,
|
|
127
|
+
runtime: desired.cohort.runtime,
|
|
128
|
+
profilePath: desired.profilePath,
|
|
129
|
+
skillPath: desired.skillPath,
|
|
130
|
+
callerWorkflowPath: desired.callerWorkflowPath,
|
|
131
|
+
managedStatePath: desired.managedStatePath,
|
|
132
|
+
assets
|
|
133
|
+
};
|
|
134
|
+
const stateDigest = digestBytes(Buffer.from(canonicalConsumerIntegrationJson({
|
|
135
|
+
domain: "agent-teams.docs-protocol.managed-state/v1",
|
|
136
|
+
body
|
|
137
|
+
}), "utf8"));
|
|
138
|
+
return `${canonicalConsumerIntegrationJson({ ...body, stateDigest })}\n`;
|
|
139
|
+
}
|
|
140
|
+
export function describeCanonicalConsumerAssets(cohort) {
|
|
141
|
+
const skillDigest = digestBytes(Buffer.from(CANONICAL_DOCS_SKILL, "utf8"));
|
|
142
|
+
const callerWorkflowDigest = digestBytes(Buffer.from(canonicalCallerWorkflow(cohort), "utf8"));
|
|
143
|
+
const assetCatalogDigest = digestBytes(Buffer.from(CANONICAL_ASSET_CATALOG, "utf8"));
|
|
144
|
+
return Object.freeze({
|
|
145
|
+
skillDigest,
|
|
146
|
+
callerWorkflowDigest,
|
|
147
|
+
assetCatalogDigest,
|
|
148
|
+
transitionCatalogDigest: digestBytes(Buffer.from(CANONICAL_TRANSITION_CATALOG, "utf8"))
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=consumer-integration-assets.js.map
|