@agent-teams/docs-protocol 0.1.0-rc.8 → 0.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/CHANGELOG.md +73 -0
- package/assets/history/sha256-fd633c3c6337e5cfe51a9f36989bb654381634c5ab4add9e4da71fe40ab4e0dd/caller.yml +14 -0
- package/assets/transition-catalog.json +1 -1
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.d.ts +4 -9
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.d.ts.map +1 -1
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.js +3 -0
- package/dist/consumer-integration/adapters/agents-route-adapter-v1.js.map +1 -1
- package/dist/consumer-integration/adapters/consumer-integration-node-error.d.ts +5 -0
- package/dist/consumer-integration/adapters/consumer-integration-node-error.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/consumer-integration-node-error.js +9 -0
- package/dist/consumer-integration/adapters/consumer-integration-node-error.js.map +1 -0
- package/dist/consumer-integration/adapters/foundation-known-file-transaction.d.ts +3 -0
- package/dist/consumer-integration/adapters/foundation-known-file-transaction.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/foundation-known-file-transaction.js +7 -0
- package/dist/consumer-integration/adapters/foundation-known-file-transaction.js.map +1 -0
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.d.ts +3 -4
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.d.ts.map +1 -1
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.js +9 -132
- package/dist/consumer-integration/adapters/node-consumer-integration-repository.js.map +1 -1
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.d.ts +2 -0
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.d.ts.map +1 -1
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.js +1 -0
- package/dist/consumer-integration/adapters/package-consumer-asset-catalog.js.map +1 -1
- package/dist/consumer-integration/adapters/pnpm-lockfile-validator-v1.d.ts +3 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-validator-v1.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-validator-v1.js +120 -0
- package/dist/consumer-integration/adapters/pnpm-lockfile-validator-v1.js.map +1 -0
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.d.ts +4 -9
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.d.ts.map +1 -1
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.js +4 -1
- package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.js.map +1 -1
- package/dist/consumer-integration/adapters/strict-json-record.d.ts +3 -0
- package/dist/consumer-integration/adapters/strict-json-record.d.ts.map +1 -0
- package/dist/consumer-integration/adapters/strict-json-record.js +27 -0
- package/dist/consumer-integration/adapters/strict-json-record.js.map +1 -0
- package/dist/consumer-integration/application/model/consumer-integration-execution.d.ts +11 -0
- package/dist/consumer-integration/application/model/consumer-integration-execution.d.ts.map +1 -0
- package/dist/consumer-integration/application/model/consumer-integration-execution.js +2 -0
- package/dist/consumer-integration/application/model/consumer-integration-execution.js.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-assets.d.ts +1 -1
- package/dist/consumer-integration/application/policies/consumer-integration-assets.d.ts.map +1 -1
- package/dist/consumer-integration/application/policies/consumer-integration-desired-state.js +1 -1
- package/dist/consumer-integration/application/policies/consumer-integration-desired-state.js.map +1 -1
- package/dist/consumer-integration/application/policies/consumer-integration-prior-cohort.d.ts +14 -0
- package/dist/consumer-integration/application/policies/consumer-integration-prior-cohort.d.ts.map +1 -0
- package/dist/consumer-integration/application/policies/consumer-integration-prior-cohort.js +186 -0
- package/dist/consumer-integration/application/policies/consumer-integration-prior-cohort.js.map +1 -0
- package/dist/consumer-integration/application/ports/consumer-integration-lifecycle.d.ts +31 -0
- package/dist/consumer-integration/application/ports/consumer-integration-lifecycle.d.ts.map +1 -0
- package/dist/consumer-integration/application/ports/consumer-integration-lifecycle.js +2 -0
- package/dist/consumer-integration/application/ports/consumer-integration-lifecycle.js.map +1 -0
- package/dist/consumer-integration/application/ports/consumer-integration-planners.d.ts +35 -0
- package/dist/consumer-integration/application/ports/consumer-integration-planners.d.ts.map +1 -0
- package/dist/consumer-integration/application/ports/consumer-integration-planners.js +2 -0
- package/dist/consumer-integration/application/ports/consumer-integration-planners.js.map +1 -0
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.d.ts +2 -5
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.d.ts.map +1 -1
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.js +5 -192
- package/dist/consumer-integration/application/use-cases/plan-consumer-integration.js.map +1 -1
- package/dist/consumer-integration/application/use-cases/run-consumer-integration.d.ts +29 -0
- package/dist/consumer-integration/application/use-cases/run-consumer-integration.d.ts.map +1 -0
- package/dist/consumer-integration/application/use-cases/run-consumer-integration.js +139 -0
- package/dist/consumer-integration/application/use-cases/run-consumer-integration.js.map +1 -0
- package/dist/consumer-integration/composition/consumer-integration-cli.js +1 -1
- package/dist/consumer-integration/composition/consumer-integration-cli.js.map +1 -1
- package/dist/consumer-integration/composition/consumer-integration-planner.d.ts +19 -0
- package/dist/consumer-integration/composition/consumer-integration-planner.d.ts.map +1 -0
- package/dist/consumer-integration/composition/consumer-integration-planner.js +14 -0
- package/dist/consumer-integration/composition/consumer-integration-planner.js.map +1 -0
- package/dist/consumer-integration/composition/node-consumer-integration.d.ts +2 -10
- package/dist/consumer-integration/composition/node-consumer-integration.d.ts.map +1 -1
- package/dist/consumer-integration/composition/node-consumer-integration.js +19 -133
- package/dist/consumer-integration/composition/node-consumer-integration.js.map +1 -1
- package/dist/consumer-integration/generated/canonical-assets.d.ts +1 -1
- package/dist/consumer-integration/generated/canonical-assets.d.ts.map +1 -1
- package/dist/consumer-integration/generated/canonical-assets.js +1 -1
- package/dist/consumer-integration/generated/canonical-assets.js.map +1 -1
- package/dist/consumer-integration/index.d.ts +1 -1
- package/dist/consumer-integration/index.d.ts.map +1 -1
- package/dist/consumer-integration/index.js +1 -1
- package/dist/consumer-integration/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { parseDocument } from "yaml";
|
|
2
|
+
import { ConsumerIntegrationNodeError } from "./consumer-integration-node-error.js";
|
|
3
|
+
import { targetsManagedPackage, validPnpmPeerContext } from "./pnpm-lockfile-policy-v1.js";
|
|
4
|
+
import { computePnpmRuntimeClosureDigestV1, PnpmRuntimeClosureError } from "./pnpm-runtime-closure-v1.js";
|
|
5
|
+
function yamlRecord(value, subject) {
|
|
6
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
7
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_LOCKFILE_INVALID", `${subject} must be one mapping.`);
|
|
8
|
+
}
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
function assertRegistryPackageEntry(options) {
|
|
12
|
+
const resolution = yamlRecord(options.packageEntry["resolution"], `pnpm-lock.yaml#packages.${options.packageName}.resolution`);
|
|
13
|
+
if (resolution["integrity"] !== options.integrity) {
|
|
14
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_LOCKFILE_INTEGRITY_MISMATCH", `${options.packageName} registry integrity does not match the selected cohort.`);
|
|
15
|
+
}
|
|
16
|
+
const tarball = resolution["tarball"];
|
|
17
|
+
if (typeof tarball === "string" && !tarball.startsWith("https://registry.npmjs.org/")) {
|
|
18
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_LOCKFILE_SOURCE_INVALID", `${options.packageName} must resolve from registry.npmjs.org.`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function assertRootOwnsCohortPins(importers, packageNames) {
|
|
22
|
+
for (const [importerPath, importerValue] of Object.entries(importers)) {
|
|
23
|
+
if (importerPath === ".") {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
const nestedImporter = yamlRecord(importerValue, `pnpm-lock.yaml#importers.${importerPath}`);
|
|
27
|
+
for (const field of ["dependencies", "devDependencies", "optionalDependencies"]) {
|
|
28
|
+
const declarations = nestedImporter[field];
|
|
29
|
+
if (declarations === undefined) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const record = yamlRecord(declarations, `pnpm-lock.yaml#importers.${importerPath}.${field}`);
|
|
33
|
+
if (packageNames.some((packageName) => record[packageName] !== undefined)) {
|
|
34
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_NESTED_IMPORTER_PIN_FORBIDDEN", `Only the root importer may own Docs Protocol cohort pins; found one in ${importerPath}.`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function assertRegistryBoundRuntimeClosure(lockfile, desired) {
|
|
40
|
+
try {
|
|
41
|
+
// The Cohort digest qualifies the isolated release graph. A consumer may select
|
|
42
|
+
// compatible transitives or peer contexts, but every reachable edge stays registry/SRI bound.
|
|
43
|
+
computePnpmRuntimeClosureDigestV1(lockfile, desired.cohort);
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
if (error instanceof PnpmRuntimeClosureError) {
|
|
47
|
+
throw new ConsumerIntegrationNodeError(error.code, error.message, { cause: error });
|
|
48
|
+
}
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export function assertQualifiedPnpmLockfileV1(bytes, desired) {
|
|
53
|
+
const document = parseDocument(Buffer.from(bytes).toString("utf8"), { uniqueKeys: true });
|
|
54
|
+
if (document.errors.length > 0) {
|
|
55
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_LOCKFILE_INVALID", "pnpm-lock.yaml must be duplicate-free YAML.");
|
|
56
|
+
}
|
|
57
|
+
const lockfile = yamlRecord(document.toJS({ maxAliasCount: 0 }), "pnpm-lock.yaml");
|
|
58
|
+
if (String(lockfile["lockfileVersion"]) !== "9.0") {
|
|
59
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_LOCKFILE_INVALID", "V1 requires pnpm lockfileVersion 9.0.");
|
|
60
|
+
}
|
|
61
|
+
if (targetsManagedPackage(lockfile["overrides"]) ||
|
|
62
|
+
targetsManagedPackage(lockfile["patchedDependencies"])) {
|
|
63
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_LOCKFILE_OVERRIDE", "Docs Protocol cohort packages must not use lockfile overrides or patches.");
|
|
64
|
+
}
|
|
65
|
+
const importers = yamlRecord(lockfile["importers"], "pnpm-lock.yaml#importers");
|
|
66
|
+
if (importers["."] === undefined) {
|
|
67
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_UNSUPPORTED_WORKSPACE", "V1 requires one root pnpm importer in the repository lockfile.");
|
|
68
|
+
}
|
|
69
|
+
const importer = yamlRecord(importers["."], "pnpm-lock.yaml#importers.");
|
|
70
|
+
const devDependencies = yamlRecord(importer["devDependencies"], "pnpm-lock.yaml#importers...devDependencies");
|
|
71
|
+
for (const field of ["dependencies", "optionalDependencies", "peerDependencies"]) {
|
|
72
|
+
const declarations = importer[field];
|
|
73
|
+
if (declarations === undefined) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const record = yamlRecord(declarations, `pnpm-lock.yaml#importers...${field}`);
|
|
77
|
+
if (["@agent-teams/docs-protocol", "@agent-teams/engineering-foundation"]
|
|
78
|
+
.some((packageName) => record[packageName] !== undefined)) {
|
|
79
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_NON_DEV_DEPENDENCY", "Docs Protocol cohort packages may be declared only in root devDependencies.");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const packages = yamlRecord(lockfile["packages"], "pnpm-lock.yaml#packages");
|
|
83
|
+
const snapshots = yamlRecord(lockfile["snapshots"], "pnpm-lock.yaml#snapshots");
|
|
84
|
+
const targets = [
|
|
85
|
+
["@agent-teams/docs-protocol", desired.cohort.packages.docsProtocol],
|
|
86
|
+
["@agent-teams/engineering-foundation", desired.cohort.packages.engineeringFoundation]
|
|
87
|
+
];
|
|
88
|
+
assertRootOwnsCohortPins(importers, targets.map(([packageName]) => packageName));
|
|
89
|
+
for (const [packageName, target] of targets) {
|
|
90
|
+
const importerEntry = yamlRecord(devDependencies[packageName], `pnpm-lock.yaml#importers...${packageName}`);
|
|
91
|
+
const selectedVersion = importerEntry["version"];
|
|
92
|
+
if (importerEntry["specifier"] !== target.version ||
|
|
93
|
+
!validPnpmPeerContext(selectedVersion, target.version)) {
|
|
94
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_LOCKFILE_COHORT_MISMATCH", `${packageName} importer evidence must select exact cohort version ${target.version}.`);
|
|
95
|
+
}
|
|
96
|
+
const packageEntry = yamlRecord(packages[`${packageName}@${target.version}`], `pnpm-lock.yaml#packages.${packageName}`);
|
|
97
|
+
assertRegistryPackageEntry({ integrity: target.integrity, packageEntry, packageName });
|
|
98
|
+
const snapshotKey = `${packageName}@${selectedVersion}`;
|
|
99
|
+
if (snapshots[snapshotKey] === undefined) {
|
|
100
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_LOCKFILE_SNAPSHOT_MISSING", `${packageName} must have the exact selected pnpm snapshot.`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
for (const [packageName, target] of targets) {
|
|
104
|
+
const prefix = `${packageName}@`;
|
|
105
|
+
const keys = Object.keys(packages).filter((key) => key.startsWith(prefix));
|
|
106
|
+
if (keys.length !== 1 || keys[0] !== `${prefix}${target.version}`) {
|
|
107
|
+
throw new ConsumerIntegrationNodeError(packageName.endsWith("engineering-foundation")
|
|
108
|
+
? "DOCS_CONSUMER_DUPLICATE_FOUNDATION_RESOLUTION"
|
|
109
|
+
: "DOCS_CONSUMER_DUPLICATE_DOCS_PROTOCOL_RESOLUTION", `pnpm-lock.yaml must contain exactly one physical cohort ${packageName} resolution.`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const docsSelection = yamlRecord(devDependencies["@agent-teams/docs-protocol"], "pnpm-lock.yaml#importers...docs-protocol")["version"];
|
|
113
|
+
const docsSnapshot = yamlRecord(snapshots[`@agent-teams/docs-protocol@${String(docsSelection)}`], "pnpm-lock.yaml#snapshots.docs-protocol");
|
|
114
|
+
const docsDependencies = yamlRecord(docsSnapshot["dependencies"], "pnpm-lock.yaml#snapshots.docs-protocol.dependencies");
|
|
115
|
+
if (!validPnpmPeerContext(docsDependencies["@agent-teams/engineering-foundation"], desired.cohort.packages.engineeringFoundation.version)) {
|
|
116
|
+
throw new ConsumerIntegrationNodeError("DOCS_CONSUMER_COHORT_DEPENDENCY_MISMATCH", "The selected Docs Protocol snapshot must depend on the exact cohort Foundation version.");
|
|
117
|
+
}
|
|
118
|
+
assertRegistryBoundRuntimeClosure(lockfile, desired);
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=pnpm-lockfile-validator-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpm-lockfile-validator-v1.js","sourceRoot":"","sources":["../../../src/consumer-integration/adapters/pnpm-lockfile-validator-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAGrC,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAC3F,OAAO,EACL,iCAAiC,EACjC,uBAAuB,EACxB,MAAM,8BAA8B,CAAC;AAEtC,SAAS,UAAU,CAAC,KAAc,EAAE,OAAe;IACjD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,MAAM,IAAI,4BAA4B,CACpC,gCAAgC,EAChC,GAAG,OAAO,uBAAuB,CAClC,CAAC;IACJ,CAAC;IACD,OAAO,KAAgC,CAAC;AAC1C,CAAC;AAED,SAAS,0BAA0B,CAAC,O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AA0C,EAC1C,yFAAyF,CAC1F,CAAC;IACJ,CAAC;IACD,iCAAiC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import type { ConsumerIntegrationDigest, ConsumerIntegrationFileObservation,
|
|
2
|
-
|
|
3
|
-
export
|
|
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
|
-
}
|
|
1
|
+
import type { ConsumerIntegrationDigest, ConsumerIntegrationFileObservation, QualifiedDocsCohortBindingV1 } from "../domain/model.js";
|
|
2
|
+
import type { PnpmManifestPlanV1, PnpmManifestPlannerV1 } from "../application/ports/consumer-integration-planners.js";
|
|
3
|
+
export type { PnpmManifestPlanV1 } from "../application/ports/consumer-integration-planners.js";
|
|
10
4
|
export declare function planPnpmManifestV1(input: {
|
|
11
5
|
readonly observation: ConsumerIntegrationFileObservation;
|
|
12
6
|
readonly profilePath: string;
|
|
13
7
|
readonly cohort: QualifiedDocsCohortBindingV1;
|
|
14
8
|
readonly knownPriorScriptsDigest?: ConsumerIntegrationDigest;
|
|
15
9
|
}): PnpmManifestPlanV1;
|
|
10
|
+
export declare const pnpmManifestPlannerV1: PnpmManifestPlannerV1;
|
|
16
11
|
//# sourceMappingURL=pnpm-manifest-adapter-v1.d.ts.map
|
|
@@ -1 +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,
|
|
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,EAElC,4BAA4B,EAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,uDAAuD,CAAC;AAU/D,YAAY,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAoGhG,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;AAED,eAAO,MAAM,qBAAqB,EAAE,qBAElC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { applyEdits, modify } from "jsonc-parser";
|
|
2
|
-
import { parseJsonRecord, recordField } from "
|
|
2
|
+
import { parseJsonRecord, recordField } from "./strict-json-record.js";
|
|
3
3
|
import { canonicalConsumerIntegrationJson, canonicalDocsScripts, digestBytes } from "../application/policies/consumer-integration-assets.js";
|
|
4
4
|
const DOCS_PACKAGE = "@agent-teams/docs-protocol";
|
|
5
5
|
const FOUNDATION_PACKAGE = "@agent-teams/engineering-foundation";
|
|
@@ -152,4 +152,7 @@ export function planPnpmManifestV1(input) {
|
|
|
152
152
|
issues: []
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
+
export const pnpmManifestPlannerV1 = Object.freeze({
|
|
156
|
+
plan: planPnpmManifestV1
|
|
157
|
+
});
|
|
155
158
|
//# sourceMappingURL=pnpm-manifest-adapter-v1.js.map
|
|
@@ -1 +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,
|
|
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,yBAAyB,CAAC;AAWvE,OAAO,EACL,gCAAgC,EAChC,oBAAoB,EACpB,WAAW,EACZ,MAAM,wDAAwD,CAAC;AAEhE,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAClD,MAAM,kBAAkB,GAAG,qCAAqC,CAAC;AAIjE,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,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;QACjF,OAAO;IACT,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO;IACT,CAAC;IACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,EAAE,CAAC;QAC5E,IAAI,CAAC,WAAW,EAAE,aAAa,EAAE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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;AAED,MAAM,CAAC,MAAM,qBAAqB,GAA0B,MAAM,CAAC,MAAM,CAAC;IACxE,IAAI,EAAE,kBAAkB;CACzB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strict-json-record.d.ts","sourceRoot":"","sources":["../../../src/consumer-integration/adapters/strict-json-record.ts"],"names":[],"mappings":"AASA,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWvE;AAED,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,KAAK,EAAE,MAAM,GACZ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMzB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { parseDocument } from "yaml";
|
|
2
|
+
class ConsumerJsonInputError extends Error {
|
|
3
|
+
constructor(message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = "ConsumerJsonInputError";
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export function parseJsonRecord(source) {
|
|
9
|
+
const duplicateCheck = parseDocument(source, { uniqueKeys: true });
|
|
10
|
+
if (duplicateCheck.errors.length > 0) {
|
|
11
|
+
throw new ConsumerJsonInputError("Package manifest must not contain duplicate keys.");
|
|
12
|
+
}
|
|
13
|
+
const value = JSON.parse(source);
|
|
14
|
+
if (typeof value !== "object" || value === null || Array.isArray(value) ||
|
|
15
|
+
Object.getPrototypeOf(value) !== Object.prototype) {
|
|
16
|
+
throw new ConsumerJsonInputError("Package manifest must be one JSON object.");
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
export function recordField(manifest, field) {
|
|
21
|
+
const value = manifest[field];
|
|
22
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) &&
|
|
23
|
+
Object.getPrototypeOf(value) === Object.prototype
|
|
24
|
+
? value
|
|
25
|
+
: {};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=strict-json-record.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strict-json-record.js","sourceRoot":"","sources":["../../../src/consumer-integration/adapters/strict-json-record.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAErC,MAAM,sBAAuB,SAAQ,KAAK;IACxC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAED,MAAM,UAAU,eAAe,CAAC,MAAc;IAC5C,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;IACnE,IAAI,cAAc,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,sBAAsB,CAAC,mDAAmD,CAAC,CAAC;IACxF,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAY,CAAC;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACrE,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,SAAS,EAAE,CAAC;QACpD,MAAM,IAAI,sBAAsB,CAAC,2CAA2C,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,KAAgC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,QAAiC,EACjC,KAAa;IAEb,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACzE,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,SAAS;QACjD,CAAC,CAAC,KAAgC;QAClC,CAAC,CAAC,EAAE,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { KnownFileTransactionReceiptV1 } from "@agent-teams/engineering-foundation/mutation";
|
|
2
|
+
import type { ConsumerIntegrationIssue, ConsumerIntegrationPlanV1 } from "../../domain/model.js";
|
|
3
|
+
export interface ConsumerIntegrationExecutionV1 {
|
|
4
|
+
readonly schemaVersion: 1;
|
|
5
|
+
readonly command: "consumer.apply" | "consumer.check" | "consumer.plan" | "consumer.recover";
|
|
6
|
+
readonly outcome: "applied" | "blocked" | "change-required" | "current" | "recovered";
|
|
7
|
+
readonly issues: readonly ConsumerIntegrationIssue[];
|
|
8
|
+
readonly plan?: ConsumerIntegrationPlanV1;
|
|
9
|
+
readonly receipt?: KnownFileTransactionReceiptV1;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=consumer-integration-execution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumer-integration-execution.d.ts","sourceRoot":"","sources":["../../../../src/consumer-integration/application/model/consumer-integration-execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAElG,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,GAAG,eAAe,GAAG,kBAAkB,CAAC;IAC7F,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,iBAAiB,GAAG,SAAS,GAAG,WAAW,CAAC;IACtF,QAAQ,CAAC,MAAM,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACrD,QAAQ,CAAC,IAAI,CAAC,EAAE,yBAAyB,CAAC;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,6BAA6B,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumer-integration-execution.js","sourceRoot":"","sources":["../../../../src/consumer-integration/application/model/consumer-integration-execution.ts"],"names":[],"mappings":""}
|
|
@@ -31,7 +31,7 @@ export interface ConsumerAssetCatalogV1 {
|
|
|
31
31
|
}
|
|
32
32
|
export declare const BUNDLED_KNOWN_PRIOR_COHORTS: readonly KnownPriorCohortCatalogEntryV1[];
|
|
33
33
|
export declare const BUNDLED_CURRENT_SOURCE_EXECUTORS: readonly CurrentSourceExecutorV1[];
|
|
34
|
-
export declare const CANONICAL_TRANSITION_CATALOG = "{\"currentSourceExecutors\":[],\"directTargetBundles\":[{\"agentsRouteDigest\":\"sha256:08ca6c0782dbc36ace6359c8fe36807810f9668d999c7d9e8ead6bf281d9bf30\",\"callerWorkflowDigest\":\"sha256:097df9fe1b90ab45f73389c8b69736f8a54d4199b09536d586222b5a7f0fbb09\",\"callerWorkflowPath\":\"assets/history/sha256-097df9fe1b90ab45f73389c8b69736f8a54d4199b09536d586222b5a7f0fbb09/caller.yml\",\"cohort\":{\"assets\":{\"assetCatalogDigest\":\"sha256:0e24e8f1342b3ccd1e5939a45ed5fd55780ac3aa32bd8b25113924d5eb4da02f\",\"callerWorkflowDigest\":\"sha256:097df9fe1b90ab45f73389c8b69736f8a54d4199b09536d586222b5a7f0fbb09\",\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"transitionCatalogDigest\":\"sha256:5ada68b861bde63af2e1626e467ed09394b6c11bb13b17a443f0cb1741524b46\"},\"channel\":\"rc\",\"cohortId\":\"docs-2026-08-17-rc1\",\"eligibleAfter\":\"2026-08-18T02:32:57Z\",\"packages\":{\"docsProtocol\":{\"integrity\":\"sha512-OkUNMNTLEFNF/EU8L4G5+9WTg0LugsZ8nxv7dnFpPKJEUVcUrooNO2QY7DhOhHuCVDKP2ShTciCtBjra93RtJA==\",\"version\":\"0.1.0-rc.2\"},\"engineeringFoundation\":{\"integrity\":\"sha512-OLMoWreeMXfKVkVTA4A/plBZXgDE6DNB+AX7QK6K5s90s943n6vf57nskIu0eLHsQGKQ7X+AvF+DCR/57YbZtA==\",\"version\":\"0.17.0-rc.1\"}},\"qualificationEventDigest\":\"sha256:4b6f1684bb32ff0cd674d8d738ce0ed85744cb977cb8f181ad14e5b8c243cc71\",\"recordDigest\":\"sha256:5fffddec78e70c72a689c3f4957c74b7dac17e140dff6b87f2eadb6a2c61f968\",\"rollbackTo\":[],\"runtime\":{\"node\":\">=24.18.0 <25\",\"pnpm\":\">=11.17.0 <12\",\"runtimeClosureDigest\":\"sha256:64dac5ed1f1d565301b7195837e3c579d7a993d137c59afb9f299f6972d5c95e\"},\"schemaVersion\":1,\"schemas\":{\"consumerIntegration\":1,\"docsProtocol\":1,\"managedState\":1},\"upgradeFrom\":[],\"workflow\":{\"blobSha\":\"7d0f9c73a6bc1ddc2384f0ea06774719dc14458c\",\"path\":\".github/workflows/docs-protocol-check.yml\",\"repository\":\"agent-teams-ai/.github\",\"revision\":\"d55ebd46208f67736b5b76e7ef48a890570feeab\"}},\"docsScriptsDigest\":\"sha256:7a502ddeda5e3d0296b712b5c07e0905a9b7a8fcd374d37db8a02cb026a37881\",\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"skillPath\":\"assets/history/sha256-7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e/skill.md\"},{\"agentsRouteDigest\":\"sha256:08ca6c0782dbc36ace6359c8fe36807810f9668d999c7d9e8ead6bf281d9bf30\",\"callerWorkflowDigest\":\"sha256:3e53262efc8a530b532380dac21d876456473d3b88aba20889a1d24823bf3a1b\",\"callerWorkflowPath\":\"assets/history/sha256-3e53262efc8a530b532380dac21d876456473d3b88aba20889a1d24823bf3a1b/caller.yml\",\"cohort\":{\"assets\":{\"assetCatalogDigest\":\"sha256:b156dba1b2b88aa53bd9196dd49e93c0a153f6fb155ed2ce89c5dc1a0bf8eeb6\",\"callerWorkflowDigest\":\"sha256:3e53262efc8a530b532380dac21d876456473d3b88aba20889a1d24823bf3a1b\",\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"transitionCatalogDigest\":\"sha256:dcc2d636629237eab4918fb513f538a538b6ac3672a928bdffe866cf4fec9a7f\"},\"channel\":\"rc\",\"cohortId\":\"docs-2026-08-17-rc7\",\"eligibleAfter\":\"2026-08-18T13:25:26Z\",\"packages\":{\"docsProtocol\":{\"integrity\":\"sha512-ZsbaS07YSr0udgsvFekeuc86ILn+oQ63ikuF+q5nib+1Rk+UR9to4gpeZAYQvu57Axoxi9TjZ+olE6162e1Fkg==\",\"version\":\"0.1.0-rc.5\"},\"engineeringFoundation\":{\"integrity\":\"sha512-czq6garXWUbObaqeUmgGMs3LZRKgEdOiYyMtvcnXNXI4cMjBDhwlTmW+DfQ3h5WXHo7dqzPloQvr9pjzvQhSFA==\",\"version\":\"0.17.0-rc.3\"}},\"qualificationEventDigest\":\"sha256:d24c95a0d708ec9f72340181b4cb830560ad3f44429f8df8eb65032549c57d2e\",\"recordDigest\":\"sha256:55afadf793fb62703934082c2fe682a6f678ef92ad8cd2f58d1d2d80e007c836\",\"rollbackTo\":[\"docs-2026-08-17-rc1\"],\"runtime\":{\"node\":\">=24.18.0 <25\",\"pnpm\":\">=11.17.0 <12\",\"runtimeClosureDigest\":\"sha256:318ecaf7f78162e77794fa0eb02ac452823cfd47fce913434025698171afee81\"},\"schemaVersion\":1,\"schemas\":{\"consumerIntegration\":1,\"docsProtocol\":1,\"managedState\":1},\"upgradeFrom\":[\"docs-2026-08-17-rc1\",\"docs-2026-08-17-rc4\",\"docs-2026-08-17-rc5\",\"docs-2026-08-17-rc6\"],\"workflow\":{\"blobSha\":\"d452902e36bb144f9cb2816ced77cdd8ae629cd9\",\"path\":\".github/workflows/docs-protocol-check.yml\",\"repository\":\"agent-teams-ai/.github\",\"revision\":\"57e03681e820fd0378600b5169acfa1514d1065a\"}},\"docsScriptsDigest\":\"sha256:7a502ddeda5e3d0296b712b5c07e0905a9b7a8fcd374d37db8a02cb026a37881\",\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"skillPath\":\"assets/history/sha256-7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e/skill.md\"}],\"schemaVersion\":1}\n";
|
|
34
|
+
export declare const CANONICAL_TRANSITION_CATALOG = "{\"currentSourceExecutors\":[],\"directTargetBundles\":[{\"agentsRouteDigest\":\"sha256:08ca6c0782dbc36ace6359c8fe36807810f9668d999c7d9e8ead6bf281d9bf30\",\"callerWorkflowDigest\":\"sha256:097df9fe1b90ab45f73389c8b69736f8a54d4199b09536d586222b5a7f0fbb09\",\"callerWorkflowPath\":\"assets/history/sha256-097df9fe1b90ab45f73389c8b69736f8a54d4199b09536d586222b5a7f0fbb09/caller.yml\",\"cohort\":{\"assets\":{\"assetCatalogDigest\":\"sha256:0e24e8f1342b3ccd1e5939a45ed5fd55780ac3aa32bd8b25113924d5eb4da02f\",\"callerWorkflowDigest\":\"sha256:097df9fe1b90ab45f73389c8b69736f8a54d4199b09536d586222b5a7f0fbb09\",\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"transitionCatalogDigest\":\"sha256:5ada68b861bde63af2e1626e467ed09394b6c11bb13b17a443f0cb1741524b46\"},\"channel\":\"rc\",\"cohortId\":\"docs-2026-08-17-rc1\",\"eligibleAfter\":\"2026-08-18T02:32:57Z\",\"packages\":{\"docsProtocol\":{\"integrity\":\"sha512-OkUNMNTLEFNF/EU8L4G5+9WTg0LugsZ8nxv7dnFpPKJEUVcUrooNO2QY7DhOhHuCVDKP2ShTciCtBjra93RtJA==\",\"version\":\"0.1.0-rc.2\"},\"engineeringFoundation\":{\"integrity\":\"sha512-OLMoWreeMXfKVkVTA4A/plBZXgDE6DNB+AX7QK6K5s90s943n6vf57nskIu0eLHsQGKQ7X+AvF+DCR/57YbZtA==\",\"version\":\"0.17.0-rc.1\"}},\"qualificationEventDigest\":\"sha256:4b6f1684bb32ff0cd674d8d738ce0ed85744cb977cb8f181ad14e5b8c243cc71\",\"recordDigest\":\"sha256:5fffddec78e70c72a689c3f4957c74b7dac17e140dff6b87f2eadb6a2c61f968\",\"rollbackTo\":[],\"runtime\":{\"node\":\">=24.18.0 <25\",\"pnpm\":\">=11.17.0 <12\",\"runtimeClosureDigest\":\"sha256:64dac5ed1f1d565301b7195837e3c579d7a993d137c59afb9f299f6972d5c95e\"},\"schemaVersion\":1,\"schemas\":{\"consumerIntegration\":1,\"docsProtocol\":1,\"managedState\":1},\"upgradeFrom\":[],\"workflow\":{\"blobSha\":\"7d0f9c73a6bc1ddc2384f0ea06774719dc14458c\",\"path\":\".github/workflows/docs-protocol-check.yml\",\"repository\":\"agent-teams-ai/.github\",\"revision\":\"d55ebd46208f67736b5b76e7ef48a890570feeab\"}},\"docsScriptsDigest\":\"sha256:7a502ddeda5e3d0296b712b5c07e0905a9b7a8fcd374d37db8a02cb026a37881\",\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"skillPath\":\"assets/history/sha256-7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e/skill.md\"},{\"agentsRouteDigest\":\"sha256:08ca6c0782dbc36ace6359c8fe36807810f9668d999c7d9e8ead6bf281d9bf30\",\"callerWorkflowDigest\":\"sha256:3e53262efc8a530b532380dac21d876456473d3b88aba20889a1d24823bf3a1b\",\"callerWorkflowPath\":\"assets/history/sha256-3e53262efc8a530b532380dac21d876456473d3b88aba20889a1d24823bf3a1b/caller.yml\",\"cohort\":{\"assets\":{\"assetCatalogDigest\":\"sha256:b156dba1b2b88aa53bd9196dd49e93c0a153f6fb155ed2ce89c5dc1a0bf8eeb6\",\"callerWorkflowDigest\":\"sha256:3e53262efc8a530b532380dac21d876456473d3b88aba20889a1d24823bf3a1b\",\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"transitionCatalogDigest\":\"sha256:dcc2d636629237eab4918fb513f538a538b6ac3672a928bdffe866cf4fec9a7f\"},\"channel\":\"rc\",\"cohortId\":\"docs-2026-08-17-rc7\",\"eligibleAfter\":\"2026-08-18T13:25:26Z\",\"packages\":{\"docsProtocol\":{\"integrity\":\"sha512-ZsbaS07YSr0udgsvFekeuc86ILn+oQ63ikuF+q5nib+1Rk+UR9to4gpeZAYQvu57Axoxi9TjZ+olE6162e1Fkg==\",\"version\":\"0.1.0-rc.5\"},\"engineeringFoundation\":{\"integrity\":\"sha512-czq6garXWUbObaqeUmgGMs3LZRKgEdOiYyMtvcnXNXI4cMjBDhwlTmW+DfQ3h5WXHo7dqzPloQvr9pjzvQhSFA==\",\"version\":\"0.17.0-rc.3\"}},\"qualificationEventDigest\":\"sha256:d24c95a0d708ec9f72340181b4cb830560ad3f44429f8df8eb65032549c57d2e\",\"recordDigest\":\"sha256:55afadf793fb62703934082c2fe682a6f678ef92ad8cd2f58d1d2d80e007c836\",\"rollbackTo\":[\"docs-2026-08-17-rc1\"],\"runtime\":{\"node\":\">=24.18.0 <25\",\"pnpm\":\">=11.17.0 <12\",\"runtimeClosureDigest\":\"sha256:318ecaf7f78162e77794fa0eb02ac452823cfd47fce913434025698171afee81\"},\"schemaVersion\":1,\"schemas\":{\"consumerIntegration\":1,\"docsProtocol\":1,\"managedState\":1},\"upgradeFrom\":[\"docs-2026-08-17-rc1\",\"docs-2026-08-17-rc4\",\"docs-2026-08-17-rc5\",\"docs-2026-08-17-rc6\"],\"workflow\":{\"blobSha\":\"d452902e36bb144f9cb2816ced77cdd8ae629cd9\",\"path\":\".github/workflows/docs-protocol-check.yml\",\"repository\":\"agent-teams-ai/.github\",\"revision\":\"57e03681e820fd0378600b5169acfa1514d1065a\"}},\"docsScriptsDigest\":\"sha256:7a502ddeda5e3d0296b712b5c07e0905a9b7a8fcd374d37db8a02cb026a37881\",\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"skillPath\":\"assets/history/sha256-7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e/skill.md\"},{\"agentsRouteDigest\":\"sha256:08ca6c0782dbc36ace6359c8fe36807810f9668d999c7d9e8ead6bf281d9bf30\",\"callerWorkflowDigest\":\"sha256:3e53262efc8a530b532380dac21d876456473d3b88aba20889a1d24823bf3a1b\",\"callerWorkflowPath\":\"assets/history/sha256-3e53262efc8a530b532380dac21d876456473d3b88aba20889a1d24823bf3a1b/caller.yml\",\"cohort\":{\"assets\":{\"assetCatalogDigest\":\"sha256:b156dba1b2b88aa53bd9196dd49e93c0a153f6fb155ed2ce89c5dc1a0bf8eeb6\",\"callerWorkflowDigest\":\"sha256:3e53262efc8a530b532380dac21d876456473d3b88aba20889a1d24823bf3a1b\",\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"transitionCatalogDigest\":\"sha256:58546ba52fdb8a3293d4e1db003557208a859b149336f56c16bc8fc9061c7192\"},\"channel\":\"rc\",\"cohortId\":\"docs-2026-08-17-rc9\",\"eligibleAfter\":\"2026-08-18T19:03:38Z\",\"packages\":{\"docsProtocol\":{\"integrity\":\"sha512-JB4cQPqpXrmVdmiycHjHbklfQBux1wYNBo+HXFRDdLxUnjJlULe1HXjNYRf93WXfhjbV6lgN+sHRy4v1EeBEYA==\",\"version\":\"0.1.0-rc.9\"},\"engineeringFoundation\":{\"integrity\":\"sha512-uhmo9waigNcHQ5jkIGQgnGK4JDah0C8er6RKTNPUURpOUOvNM6maoEyBWp5rCy1ravzzSW3QXuNaZmCujppgGQ==\",\"version\":\"0.17.0-rc.6\"}},\"qualificationEventDigest\":\"sha256:a7e7434cf91808ab77d0529c1268011f70d824b15fe4b9ecf0dcc28c5f264912\",\"recordDigest\":\"sha256:01d4017999598091c3536e4f5977847ff18a52a235de149516251e595f9722d3\",\"rollbackTo\":[\"docs-2026-08-17-rc1\"],\"runtime\":{\"node\":\">=24.18.0 <25\",\"pnpm\":\">=11.17.0 <12\",\"runtimeClosureDigest\":\"sha256:da419d5445a4537e282d8585af537edb1d63075e8bda75f5d1419d3e5bc0dd64\"},\"schemaVersion\":1,\"schemas\":{\"consumerIntegration\":1,\"docsProtocol\":1,\"managedState\":1},\"upgradeFrom\":[\"docs-2026-08-17-rc1\",\"docs-2026-08-17-rc4\",\"docs-2026-08-17-rc5\",\"docs-2026-08-17-rc6\",\"docs-2026-08-17-rc7\",\"docs-2026-08-17-rc8\"],\"workflow\":{\"blobSha\":\"d452902e36bb144f9cb2816ced77cdd8ae629cd9\",\"path\":\".github/workflows/docs-protocol-check.yml\",\"repository\":\"agent-teams-ai/.github\",\"revision\":\"57e03681e820fd0378600b5169acfa1514d1065a\"}},\"docsScriptsDigest\":\"sha256:7a502ddeda5e3d0296b712b5c07e0905a9b7a8fcd374d37db8a02cb026a37881\",\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"skillPath\":\"assets/history/sha256-7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e/skill.md\"},{\"cohort\":{\"schemaVersion\":1,\"cohortId\":\"docs-2026-08-18-rc1\",\"channel\":\"rc\",\"recordDigest\":\"sha256:b034d870526169f77ce2b454b58313df5d674f1af0ad8a5931be269d303a6dc2\",\"qualificationEventDigest\":\"sha256:78440bff3be4beec3c40a87bd3d65156ab9367a25650050945dc535d294e7139\",\"eligibleAfter\":\"2026-08-18T23:44:26Z\",\"upgradeFrom\":[\"docs-2026-08-17-rc9\"],\"rollbackTo\":[\"docs-2026-08-17-rc9\"],\"packages\":{\"docsProtocol\":{\"version\":\"0.1.0-rc.10\",\"integrity\":\"sha512-5s7lzL4mesiaxfb+IaI6A2BOuZxPDORIr5O2yFZTQXVXpBR1N45wxyAtS4f/0WBUmAwKnf+NgE9ln1GuMWV7PA==\"},\"engineeringFoundation\":{\"version\":\"0.17.0-rc.7\",\"integrity\":\"sha512-Z2kPryDLikB5rmcQOzTQSA6JboU2Hn2ZBotI8PIN0mYZ2HuADunowY6GBgSQ1o7Xb1EIrWNq4i7HEkbhOE1XMw==\"}},\"workflow\":{\"repository\":\"agent-teams-ai/.github\",\"path\":\".github/workflows/docs-protocol-check.yml\",\"revision\":\"66f14ef062656f9c2d10cc211f814e8a7c864b25\",\"blobSha\":\"d452902e36bb144f9cb2816ced77cdd8ae629cd9\"},\"assets\":{\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"callerWorkflowDigest\":\"sha256:fd633c3c6337e5cfe51a9f36989bb654381634c5ab4add9e4da71fe40ab4e0dd\",\"assetCatalogDigest\":\"sha256:b156dba1b2b88aa53bd9196dd49e93c0a153f6fb155ed2ce89c5dc1a0bf8eeb6\",\"transitionCatalogDigest\":\"sha256:3c97ac8f2131d8578b865114161daff9391a3759bd432c3cd0e5fa179ff9d110\"},\"schemas\":{\"consumerIntegration\":1,\"managedState\":1,\"docsProtocol\":1},\"runtime\":{\"node\":\">=24.18.0 <25\",\"pnpm\":\">=11.17.0 <12\",\"runtimeClosureDigest\":\"sha256:ad074f5f983f04649383cd2c2db55fd29536f3784eaf77b7b4927e4d691046bf\"}},\"skillPath\":\"assets/history/sha256-7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e/skill.md\",\"skillDigest\":\"sha256:7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e\",\"callerWorkflowPath\":\"assets/history/sha256-fd633c3c6337e5cfe51a9f36989bb654381634c5ab4add9e4da71fe40ab4e0dd/caller.yml\",\"callerWorkflowDigest\":\"sha256:fd633c3c6337e5cfe51a9f36989bb654381634c5ab4add9e4da71fe40ab4e0dd\",\"agentsRouteDigest\":\"sha256:08ca6c0782dbc36ace6359c8fe36807810f9668d999c7d9e8ead6bf281d9bf30\",\"docsScriptsDigest\":\"sha256:7a502ddeda5e3d0296b712b5c07e0905a9b7a8fcd374d37db8a02cb026a37881\"}],\"schemaVersion\":1}\n";
|
|
35
35
|
export declare const CANONICAL_ASSET_CATALOG: string;
|
|
36
36
|
export declare function isBootstrapKnownPriorCallerWorkflow(bytes: Uint8Array): boolean;
|
|
37
37
|
export declare function digestBytes(value: Uint8Array): ConsumerIntegrationDigest;
|
|
@@ -1 +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;AAY/B,eAAO,MAAM,oBAAoB,m3CAAuB,CAAC;AACzD,eAAO,MAAM,kCAAkC,yQAAwC,CAAC;AAExF,eAAO,MAAM,iCAAiC,EAAE,SAAS,UAAU,EAYjE,CAAC;AAEH,eAAO,MAAM,mBAAmB,6CAA6C,CAAC;AAC9E,eAAO,MAAM,iBAAiB,2CAA2C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O,MAAM,4BAA4B,
|
|
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;AAY/B,eAAO,MAAM,oBAAoB,m3CAAuB,CAAC;AACzD,eAAO,MAAM,kCAAkC,yQAAwC,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,QAAQ,CAAC,oBAAoB,EAAE,yBAAyB,CAAC;IACzD,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;IACtD,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;IACtD,Q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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"}
|
package/dist/consumer-integration/application/policies/consumer-integration-desired-state.js
CHANGED
|
@@ -30,7 +30,7 @@ function isCanonicalUtcSeconds(value) {
|
|
|
30
30
|
function assertPlainBoundedJson(value) {
|
|
31
31
|
let remaining = 2048;
|
|
32
32
|
const seen = new Set();
|
|
33
|
-
// oxlint-disable-next-line complexity
|
|
33
|
+
// oxlint-disable-next-line complexity
|
|
34
34
|
const visit = (candidate, depth) => {
|
|
35
35
|
if (--remaining < 0 || depth > 16) {
|
|
36
36
|
throw new TypeError("Consumer input exceeds bounded JSON limits.");
|
package/dist/consumer-integration/application/policies/consumer-integration-desired-state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consumer-integration-desired-state.js","sourceRoot":"","sources":["../../../../src/consumer-integration/application/policies/consumer-integration-desired-state.ts"],"names":[],"mappings":"AAKA,MAAM,SAAS,GAAG,iCAAiC,CAAC;AACpD,MAAM,SAAS,GAAG,+BAA+B,CAAC;AAClD,MAAM,WAAW,GAAG,2BAA2B,CAAC;AAChD,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAC1D,MAAM,UAAU,GAAG,qCAAqC,CAAC;AACzD,MAAM,aAAa,GAAG,gBAAgB,CAAC;AACvC,MAAM,MAAM,GAAG,+CAA+C,CAAC;AAC/D,MAAM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,CAAC,KAAc;IAC5C,IAAI,SAAS,GAAG,IAAI,CAAC;IACrB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,
|
|
1
|
+
{"version":3,"file":"consumer-integration-desired-state.js","sourceRoot":"","sources":["../../../../src/consumer-integration/application/policies/consumer-integration-desired-state.ts"],"names":[],"mappings":"AAKA,MAAM,SAAS,GAAG,iCAAiC,CAAC;AACpD,MAAM,SAAS,GAAG,+BAA+B,CAAC;AAClD,MAAM,WAAW,GAAG,2BAA2B,CAAC;AAChD,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAC1D,MAAM,UAAU,GAAG,qCAAqC,CAAC;AACzD,MAAM,aAAa,GAAG,gBAAgB,CAAC;AACvC,MAAM,MAAM,GAAG,+CAA+C,CAAC;AAC/D,MAAM,eAAe,GAAG,qFAAqF,CAAC;AAE9G,MAAM,YAAY,GAAG,4CAA4C,CAAC;AAClE,MAAM,UAAU,GAAG,wCAAwC,CAAC;AAC5D,MAAM,oBAAoB,GAAG,qCAAqC,CAAC;AACnE,MAAM,kBAAkB,GAAG,0DAA0D,CAAC;AACtF,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AACrD,MAAM,aAAa,GAAG,2CAA2C,CAAC;AAElE,SAAS,gBAAgB,CAAC,OAA0B;IAClD,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC;AAClD,CAAC;AAED,SAAS,YAAY,CAAC,KAAa,EAAE,IAAuB;IAC1D,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC9F,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAoC;IACjE,OAAO,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,MAAM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AC,QAAQ,KAAK,QAAQ;QACxC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QACzC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;QACjD,qBAAqB,CAAC,OAAO,CAAC,iBAAiB,CAAC;QAChD,OAAO,CAAC,MAAM,CAAC,aAAa,KAAK,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,SAAS,CAAC,+DAA+D,CAAC,CAAC;IACvF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ConsumerIntegrationDesiredStateV1, ConsumerIntegrationDigest, ConsumerIntegrationSnapshot } from "../../domain/model.js";
|
|
2
|
+
import { type ConsumerAssetCatalogV1 } from "./consumer-integration-assets.js";
|
|
3
|
+
export interface TrustedPriorCohort {
|
|
4
|
+
readonly cohortId: string;
|
|
5
|
+
readonly allowedTargetCohortIds: readonly string[];
|
|
6
|
+
readonly schemas: ConsumerIntegrationDesiredStateV1["cohort"]["schemas"];
|
|
7
|
+
readonly skill: Uint8Array;
|
|
8
|
+
readonly callerWorkflow: Uint8Array;
|
|
9
|
+
readonly agentsRouteDigest: ConsumerIntegrationDigest;
|
|
10
|
+
readonly docsScriptsDigest: ConsumerIntegrationDigest;
|
|
11
|
+
readonly managedState: Uint8Array;
|
|
12
|
+
}
|
|
13
|
+
export declare function trustedPriorCohort(desired: ConsumerIntegrationDesiredStateV1, snapshot: ConsumerIntegrationSnapshot, catalog: ConsumerAssetCatalogV1): TrustedPriorCohort | undefined;
|
|
14
|
+
//# sourceMappingURL=consumer-integration-prior-cohort.d.ts.map
|
package/dist/consumer-integration/application/policies/consumer-integration-prior-cohort.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumer-integration-prior-cohort.d.ts","sourceRoot":"","sources":["../../../../src/consumer-integration/application/policies/consumer-integration-prior-cohort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,yBAAyB,EAEzB,2BAA2B,EAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAQL,KAAK,sBAAsB,EAG5B,MAAM,kCAAkC,CAAC;AAG1C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAC;IACnD,QAAQ,CAAC,OAAO,EAAE,iCAAiC,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC;IACzE,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;IACtD,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC;CACnC;AAsGD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,iCAAiC,EAC1C,QAAQ,EAAE,2BAA2B,EACrC,OAAO,EAAE,sBAAsB,GAC9B,kBAAkB,GAAG,SAAS,CA4GhC"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { CANONICAL_DOCS_SKILL, canonicalCallerWorkflow, canonicalConsumerIntegrationJson, canonicalDocsScripts, canonicalDocsScriptsDigest, canonicalManagedRoute, canonicalManagedState, digestBytes } from "./consumer-integration-assets.js";
|
|
2
|
+
import { assertConsumerIntegrationDesiredStateV1 } from "./consumer-integration-desired-state.js";
|
|
3
|
+
function desiredAtRecordedRepository(desired, record) {
|
|
4
|
+
const repository = record["repository"];
|
|
5
|
+
if (typeof repository !== "object" || repository === null || Array.isArray(repository)) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
const candidate = repository;
|
|
9
|
+
if (candidate.provider !== desired.repository.provider || candidate.id !== desired.repository.id) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
const recorded = { ...desired, repository: candidate };
|
|
13
|
+
try {
|
|
14
|
+
assertConsumerIntegrationDesiredStateV1(recorded);
|
|
15
|
+
return recorded;
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function inputDigest(observation) {
|
|
22
|
+
return observation.state === "file" ? digestBytes(observation.bytes) : undefined;
|
|
23
|
+
}
|
|
24
|
+
function managedRouteDigest(observation) {
|
|
25
|
+
if (observation.state !== "file") {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const source = Buffer.from(observation.bytes).toString("utf8").replaceAll("\r\n", "\n");
|
|
29
|
+
const begin = source.indexOf("<!-- agent-teams-docs:route/v1 begin -->");
|
|
30
|
+
const endMarker = "<!-- agent-teams-docs:route/v1 end -->";
|
|
31
|
+
const end = source.indexOf(endMarker, begin);
|
|
32
|
+
return begin >= 0 && end >= begin
|
|
33
|
+
? digestBytes(Buffer.from(source.slice(begin, end + endMarker.length), "utf8"))
|
|
34
|
+
: undefined;
|
|
35
|
+
}
|
|
36
|
+
function manifestScriptsDigest(observation, profilePath) {
|
|
37
|
+
if (observation.state !== "file") {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
const manifest = JSON.parse(Buffer.from(observation.bytes).toString("utf8"));
|
|
42
|
+
const scripts = typeof manifest["scripts"] === "object" && manifest["scripts"] !== null &&
|
|
43
|
+
!Array.isArray(manifest["scripts"])
|
|
44
|
+
? manifest["scripts"]
|
|
45
|
+
: {};
|
|
46
|
+
const observed = Object.fromEntries(Object.keys(canonicalDocsScripts(profilePath)).map((name) => [
|
|
47
|
+
name,
|
|
48
|
+
scripts[name] ?? null
|
|
49
|
+
]));
|
|
50
|
+
return digestBytes(Buffer.from(canonicalConsumerIntegrationJson(observed), "utf8"));
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function matchesRecordedCatalogEvidence(input) {
|
|
57
|
+
const recordedDesired = desiredAtRecordedRepository(input.desired, input.record);
|
|
58
|
+
if (recordedDesired === undefined) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
const expected = canonicalManagedState({ ...recordedDesired, cohort: input.prior.cohort }, {
|
|
62
|
+
skillDigest: digestBytes(input.prior.skill),
|
|
63
|
+
callerWorkflowDigest: digestBytes(input.prior.callerWorkflow),
|
|
64
|
+
assetCatalogDigest: input.prior.cohort.assets.assetCatalogDigest,
|
|
65
|
+
transitionCatalogDigest: input.prior.cohort.assets.transitionCatalogDigest,
|
|
66
|
+
agentsRouteDigest: input.prior.agentsRouteDigest,
|
|
67
|
+
docsScriptsDigest: input.prior.docsScriptsDigest
|
|
68
|
+
});
|
|
69
|
+
return canonicalConsumerIntegrationJson(input.record) ===
|
|
70
|
+
canonicalConsumerIntegrationJson(JSON.parse(expected));
|
|
71
|
+
}
|
|
72
|
+
function matchesObservedCatalogEvidence(input) {
|
|
73
|
+
return input.snapshot.skill.state === "file" &&
|
|
74
|
+
Buffer.from(input.snapshot.skill.bytes).equals(Buffer.from(input.prior.skill)) &&
|
|
75
|
+
input.snapshot.callerWorkflow.state === "file" &&
|
|
76
|
+
Buffer.from(input.snapshot.callerWorkflow.bytes).equals(Buffer.from(input.prior.callerWorkflow)) &&
|
|
77
|
+
managedRouteDigest(input.snapshot.agents) === input.prior.agentsRouteDigest &&
|
|
78
|
+
manifestScriptsDigest(input.snapshot.packageManifest, input.desired.profilePath) ===
|
|
79
|
+
input.prior.docsScriptsDigest;
|
|
80
|
+
}
|
|
81
|
+
// oxlint-disable-next-line complexity
|
|
82
|
+
export function trustedPriorCohort(desired, snapshot, catalog) {
|
|
83
|
+
if (snapshot.managedState.state !== "file") {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
const stateSource = Buffer.from(snapshot.managedState.bytes).toString("utf8");
|
|
88
|
+
const record = JSON.parse(stateSource);
|
|
89
|
+
const { stateDigest, ...body } = record;
|
|
90
|
+
if (typeof stateDigest !== "string" || stateDigest !== digestBytes(Buffer.from(canonicalConsumerIntegrationJson({ domain: "agent-teams.docs-protocol.managed-state/v1", body }), "utf8")) || `${canonicalConsumerIntegrationJson(record)}\n` !== stateSource) {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
const recordedDesired = desiredAtRecordedRepository(desired, record);
|
|
94
|
+
const currentSkill = Buffer.from(CANONICAL_DOCS_SKILL, "utf8");
|
|
95
|
+
const currentCaller = Buffer.from(canonicalCallerWorkflow(desired.cohort), "utf8");
|
|
96
|
+
const currentRouteDigest = digestBytes(Buffer.from(canonicalManagedRoute(desired.skillPath), "utf8"));
|
|
97
|
+
const currentScriptsDigest = canonicalDocsScriptsDigest(desired.profilePath);
|
|
98
|
+
const currentState = recordedDesired === undefined ? undefined : canonicalManagedState(recordedDesired, {
|
|
99
|
+
skillDigest: digestBytes(currentSkill),
|
|
100
|
+
callerWorkflowDigest: digestBytes(currentCaller),
|
|
101
|
+
assetCatalogDigest: catalog.catalogDigest,
|
|
102
|
+
transitionCatalogDigest: catalog.transitionCatalogDigest,
|
|
103
|
+
agentsRouteDigest: currentRouteDigest,
|
|
104
|
+
docsScriptsDigest: currentScriptsDigest
|
|
105
|
+
});
|
|
106
|
+
if (record["cohortId"] === desired.cohort.cohortId &&
|
|
107
|
+
desired.cohort.assets.skillDigest === digestBytes(currentSkill) &&
|
|
108
|
+
desired.cohort.assets.callerWorkflowDigest === digestBytes(currentCaller) &&
|
|
109
|
+
desired.cohort.assets.assetCatalogDigest === catalog.catalogDigest &&
|
|
110
|
+
desired.cohort.assets.transitionCatalogDigest === catalog.transitionCatalogDigest &&
|
|
111
|
+
currentState === stateSource && inputDigest(snapshot.skill) === digestBytes(currentSkill) &&
|
|
112
|
+
inputDigest(snapshot.callerWorkflow) === digestBytes(currentCaller) &&
|
|
113
|
+
managedRouteDigest(snapshot.agents) === currentRouteDigest &&
|
|
114
|
+
manifestScriptsDigest(snapshot.packageManifest, desired.profilePath) === currentScriptsDigest &&
|
|
115
|
+
snapshot.skill.state === "file" && snapshot.callerWorkflow.state === "file") {
|
|
116
|
+
return {
|
|
117
|
+
cohortId: desired.cohort.cohortId,
|
|
118
|
+
allowedTargetCohortIds: [],
|
|
119
|
+
schemas: desired.cohort.schemas,
|
|
120
|
+
skill: snapshot.skill.bytes,
|
|
121
|
+
callerWorkflow: snapshot.callerWorkflow.bytes,
|
|
122
|
+
agentsRouteDigest: currentRouteDigest,
|
|
123
|
+
docsScriptsDigest: currentScriptsDigest,
|
|
124
|
+
managedState: snapshot.managedState.bytes
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const prior = catalog.directTargetBundles.find(({ cohort }) => cohort.cohortId === record["cohortId"]);
|
|
128
|
+
if (prior !== undefined && matchesRecordedCatalogEvidence({ desired, record, prior }) &&
|
|
129
|
+
matchesObservedCatalogEvidence({ desired, snapshot, prior })) {
|
|
130
|
+
return {
|
|
131
|
+
cohortId: prior.cohort.cohortId,
|
|
132
|
+
allowedTargetCohortIds: desired.cohort.upgradeFrom.includes(prior.cohort.cohortId) ||
|
|
133
|
+
prior.cohort.rollbackTo.includes(desired.cohort.cohortId)
|
|
134
|
+
? [desired.cohort.cohortId]
|
|
135
|
+
: [],
|
|
136
|
+
schemas: prior.cohort.schemas,
|
|
137
|
+
skill: prior.skill,
|
|
138
|
+
callerWorkflow: prior.callerWorkflow,
|
|
139
|
+
agentsRouteDigest: prior.agentsRouteDigest,
|
|
140
|
+
docsScriptsDigest: prior.docsScriptsDigest,
|
|
141
|
+
managedState: snapshot.managedState.bytes
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
const technicalRecordedDesired = desiredAtRecordedRepository(desired, record);
|
|
145
|
+
const assets = record["assets"];
|
|
146
|
+
const sources = assets === undefined || technicalRecordedDesired === undefined ||
|
|
147
|
+
typeof record["cohortId"] !== "string" ? [] :
|
|
148
|
+
catalog.currentSourceExecutors.filter((candidate) => canonicalConsumerIntegrationJson(record["packages"]) ===
|
|
149
|
+
canonicalConsumerIntegrationJson(candidate.packages) &&
|
|
150
|
+
canonicalConsumerIntegrationJson(record["schemas"]) ===
|
|
151
|
+
canonicalConsumerIntegrationJson(candidate.schemas) &&
|
|
152
|
+
canonicalConsumerIntegrationJson(record["runtime"]) ===
|
|
153
|
+
canonicalConsumerIntegrationJson(candidate.runtime) &&
|
|
154
|
+
assets["skillDigest"] === candidate.skillDigest &&
|
|
155
|
+
assets["callerWorkflowDigest"] === candidate.callerWorkflowDigest &&
|
|
156
|
+
assets["assetCatalogDigest"] === candidate.assetCatalogDigest &&
|
|
157
|
+
assets["assetCatalogDigest"] === catalog.catalogDigest &&
|
|
158
|
+
assets["transitionCatalogDigest"] === catalog.transitionCatalogDigest &&
|
|
159
|
+
assets["agentsRouteDigest"] === candidate.agentsRouteDigest &&
|
|
160
|
+
assets["docsScriptsDigest"] === candidate.docsScriptsDigest &&
|
|
161
|
+
inputDigest(snapshot.skill) === candidate.skillDigest &&
|
|
162
|
+
inputDigest(snapshot.callerWorkflow) === candidate.callerWorkflowDigest &&
|
|
163
|
+
managedRouteDigest(snapshot.agents) === candidate.agentsRouteDigest &&
|
|
164
|
+
manifestScriptsDigest(snapshot.packageManifest, desired.profilePath) ===
|
|
165
|
+
candidate.docsScriptsDigest);
|
|
166
|
+
const source = sources.length === 1 ? sources[0] : undefined;
|
|
167
|
+
if (source === undefined || snapshot.skill.state !== "file" ||
|
|
168
|
+
snapshot.callerWorkflow.state !== "file") {
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
cohortId: String(record["cohortId"]),
|
|
173
|
+
allowedTargetCohortIds: source.directTargetCohortIds,
|
|
174
|
+
schemas: source.schemas,
|
|
175
|
+
skill: snapshot.skill.bytes,
|
|
176
|
+
callerWorkflow: snapshot.callerWorkflow.bytes,
|
|
177
|
+
agentsRouteDigest: source.agentsRouteDigest,
|
|
178
|
+
docsScriptsDigest: source.docsScriptsDigest,
|
|
179
|
+
managedState: snapshot.managedState.bytes
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
return undefined;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=consumer-integration-prior-cohort.js.map
|