@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,537 @@
|
|
|
1
|
+
/* oxlint-disable max-lines -- compiler phases remain colocated to keep the private mutation intent non-exported. */
|
|
2
|
+
import { compileKnownFileTransactionPlan } from "@agent-teams/engineering-foundation/mutation";
|
|
3
|
+
import { planAgentsRouteV1 } from "../../adapters/agents-route-adapter-v1.js";
|
|
4
|
+
import { planPnpmManifestV1 } from "../../adapters/pnpm-manifest-adapter-v1.js";
|
|
5
|
+
import { BUNDLED_KNOWN_PRIOR_COHORTS, BOOTSTRAP_KNOWN_PRIOR_CALLER_WORKFLOWS, BOOTSTRAP_KNOWN_PRIOR_DOCS_SKILLS, CANONICAL_DOCS_SKILL, canonicalCallerWorkflow, canonicalConsumerIntegrationJson, canonicalDocsScripts, canonicalDocsScriptsDigest, canonicalManagedRoute, canonicalManagedState, BUNDLED_CURRENT_SOURCE_EXECUTORS, describeCanonicalConsumerAssets, digestBytes, isBootstrapKnownPriorCallerWorkflow } from "../policies/consumer-integration-assets.js";
|
|
6
|
+
import { consumerIntegrationAuthorityGuards } from "../policies/consumer-integration-authority-guards.js";
|
|
7
|
+
import { assertConsumerIntegrationDesiredStateV1 } from "../policies/consumer-integration-desired-state.js";
|
|
8
|
+
function desiredAtRecordedRepository(desired, record) {
|
|
9
|
+
const repository = record["repository"];
|
|
10
|
+
if (typeof repository !== "object" || repository === null || Array.isArray(repository)) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
const candidate = repository;
|
|
14
|
+
if (candidate.provider !== desired.repository.provider || candidate.id !== desired.repository.id) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
const recorded = { ...desired, repository: candidate };
|
|
18
|
+
try {
|
|
19
|
+
assertConsumerIntegrationDesiredStateV1(recorded);
|
|
20
|
+
return recorded;
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function issue(code, subject, message) {
|
|
27
|
+
return { code, severity: "error", subject, message };
|
|
28
|
+
}
|
|
29
|
+
function assertSnapshotRuntime(snapshot) {
|
|
30
|
+
const expected = [
|
|
31
|
+
"agents", "callerWorkflow", "integrationProfile", "lockfile",
|
|
32
|
+
"managedState", "packageManifest", "skill"
|
|
33
|
+
];
|
|
34
|
+
if (Object.getPrototypeOf(snapshot) !== Object.prototype ||
|
|
35
|
+
Object.keys(snapshot).toSorted().join("\u0000") !== expected.join("\u0000")) {
|
|
36
|
+
throw new TypeError("Consumer snapshot must contain only the seven V1 observations.");
|
|
37
|
+
}
|
|
38
|
+
let totalBytes = 0;
|
|
39
|
+
for (const key of expected) {
|
|
40
|
+
const observation = snapshot[key];
|
|
41
|
+
if (Object.getPrototypeOf(observation) !== Object.prototype) {
|
|
42
|
+
throw new TypeError(`Consumer snapshot observation is invalid: ${key}.`);
|
|
43
|
+
}
|
|
44
|
+
if (observation.state === "absent") {
|
|
45
|
+
if (Object.keys(observation).length !== 1) {
|
|
46
|
+
throw new TypeError(`Absent snapshot observation has extra fields: ${key}.`);
|
|
47
|
+
}
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (observation.state !== "file" || !(observation.bytes instanceof Uint8Array) ||
|
|
51
|
+
!Number.isInteger(observation.mode) || observation.mode < 0 || observation.mode > 0o777 ||
|
|
52
|
+
Object.keys(observation).toSorted().join("\u0000") !== "bytes\u0000mode\u0000state") {
|
|
53
|
+
throw new TypeError(`File snapshot observation is invalid: ${key}.`);
|
|
54
|
+
}
|
|
55
|
+
totalBytes += observation.bytes.byteLength;
|
|
56
|
+
if (totalBytes > 64 * 1024 * 1024) {
|
|
57
|
+
throw new TypeError("Consumer snapshot exceeds the bounded 64 MiB runtime contract.");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function managedRouteDigest(observation) {
|
|
62
|
+
if (observation.state !== "file") {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
const source = Buffer.from(observation.bytes).toString("utf8").replaceAll("\r\n", "\n");
|
|
66
|
+
const begin = source.indexOf("<!-- agent-teams-docs:route/v1 begin -->");
|
|
67
|
+
const endMarker = "<!-- agent-teams-docs:route/v1 end -->";
|
|
68
|
+
const end = source.indexOf(endMarker, begin);
|
|
69
|
+
return begin >= 0 && end >= begin
|
|
70
|
+
? digestBytes(Buffer.from(source.slice(begin, end + endMarker.length), "utf8"))
|
|
71
|
+
: undefined;
|
|
72
|
+
}
|
|
73
|
+
function manifestScriptsDigest(observation, profilePath) {
|
|
74
|
+
if (observation.state !== "file") {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
const manifest = JSON.parse(Buffer.from(observation.bytes).toString("utf8"));
|
|
79
|
+
const scripts = typeof manifest["scripts"] === "object" && manifest["scripts"] !== null &&
|
|
80
|
+
!Array.isArray(manifest["scripts"])
|
|
81
|
+
? manifest["scripts"]
|
|
82
|
+
: {};
|
|
83
|
+
const observed = Object.fromEntries(Object.keys(canonicalDocsScripts(profilePath)).map((name) => [
|
|
84
|
+
name,
|
|
85
|
+
scripts[name] ?? null
|
|
86
|
+
]));
|
|
87
|
+
return digestBytes(Buffer.from(canonicalConsumerIntegrationJson(observed), "utf8"));
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function matchesRecordedCatalogEvidence(input) {
|
|
94
|
+
const recordedDesired = desiredAtRecordedRepository(input.desired, input.record);
|
|
95
|
+
if (recordedDesired === undefined) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
const expected = canonicalManagedState({ ...recordedDesired, cohort: input.prior.cohort }, {
|
|
99
|
+
skillDigest: digestBytes(input.prior.skill),
|
|
100
|
+
callerWorkflowDigest: digestBytes(input.prior.callerWorkflow),
|
|
101
|
+
assetCatalogDigest: input.prior.cohort.assets.assetCatalogDigest,
|
|
102
|
+
transitionCatalogDigest: input.prior.cohort.assets.transitionCatalogDigest,
|
|
103
|
+
agentsRouteDigest: input.prior.agentsRouteDigest,
|
|
104
|
+
docsScriptsDigest: input.prior.docsScriptsDigest
|
|
105
|
+
});
|
|
106
|
+
return canonicalConsumerIntegrationJson(input.record) ===
|
|
107
|
+
canonicalConsumerIntegrationJson(JSON.parse(expected));
|
|
108
|
+
}
|
|
109
|
+
function matchesObservedCatalogEvidence(input) {
|
|
110
|
+
return input.snapshot.skill.state === "file" &&
|
|
111
|
+
Buffer.from(input.snapshot.skill.bytes).equals(Buffer.from(input.prior.skill)) &&
|
|
112
|
+
input.snapshot.callerWorkflow.state === "file" &&
|
|
113
|
+
Buffer.from(input.snapshot.callerWorkflow.bytes).equals(Buffer.from(input.prior.callerWorkflow)) &&
|
|
114
|
+
managedRouteDigest(input.snapshot.agents) === input.prior.agentsRouteDigest &&
|
|
115
|
+
manifestScriptsDigest(input.snapshot.packageManifest, input.desired.profilePath) === input.prior.docsScriptsDigest;
|
|
116
|
+
}
|
|
117
|
+
// oxlint-disable-next-line complexity -- every evidence predicate must hold before source-executor trust.
|
|
118
|
+
function trustedPriorCohort(desired, snapshot, catalog) {
|
|
119
|
+
if (snapshot.managedState.state !== "file") {
|
|
120
|
+
return undefined;
|
|
121
|
+
}
|
|
122
|
+
try {
|
|
123
|
+
const stateSource = Buffer.from(snapshot.managedState.bytes).toString("utf8");
|
|
124
|
+
const record = JSON.parse(stateSource);
|
|
125
|
+
const { stateDigest, ...body } = record;
|
|
126
|
+
if (typeof stateDigest !== "string" || stateDigest !== digestBytes(Buffer.from(canonicalConsumerIntegrationJson({ domain: "agent-teams.docs-protocol.managed-state/v1", body }), "utf8")) || `${canonicalConsumerIntegrationJson(record)}\n` !== stateSource) {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
const recordedDesired = desiredAtRecordedRepository(desired, record);
|
|
130
|
+
const currentSkill = Buffer.from(CANONICAL_DOCS_SKILL, "utf8");
|
|
131
|
+
const currentCaller = Buffer.from(canonicalCallerWorkflow(desired.cohort), "utf8");
|
|
132
|
+
const currentRouteDigest = digestBytes(Buffer.from(canonicalManagedRoute(desired.skillPath), "utf8"));
|
|
133
|
+
const currentScriptsDigest = canonicalDocsScriptsDigest(desired.profilePath);
|
|
134
|
+
const currentState = recordedDesired === undefined ? undefined : canonicalManagedState(recordedDesired, {
|
|
135
|
+
skillDigest: digestBytes(currentSkill),
|
|
136
|
+
callerWorkflowDigest: digestBytes(currentCaller),
|
|
137
|
+
assetCatalogDigest: catalog.catalogDigest,
|
|
138
|
+
transitionCatalogDigest: catalog.transitionCatalogDigest,
|
|
139
|
+
agentsRouteDigest: currentRouteDigest,
|
|
140
|
+
docsScriptsDigest: currentScriptsDigest
|
|
141
|
+
});
|
|
142
|
+
if (record["cohortId"] === desired.cohort.cohortId &&
|
|
143
|
+
desired.cohort.assets.skillDigest === digestBytes(currentSkill) &&
|
|
144
|
+
desired.cohort.assets.callerWorkflowDigest === digestBytes(currentCaller) &&
|
|
145
|
+
desired.cohort.assets.assetCatalogDigest === catalog.catalogDigest &&
|
|
146
|
+
desired.cohort.assets.transitionCatalogDigest === catalog.transitionCatalogDigest &&
|
|
147
|
+
currentState === stateSource && inputDigest(snapshot.skill) === digestBytes(currentSkill) &&
|
|
148
|
+
inputDigest(snapshot.callerWorkflow) === digestBytes(currentCaller) &&
|
|
149
|
+
managedRouteDigest(snapshot.agents) === currentRouteDigest &&
|
|
150
|
+
manifestScriptsDigest(snapshot.packageManifest, desired.profilePath) === currentScriptsDigest &&
|
|
151
|
+
snapshot.skill.state === "file" && snapshot.callerWorkflow.state === "file") {
|
|
152
|
+
return {
|
|
153
|
+
cohortId: desired.cohort.cohortId,
|
|
154
|
+
allowedTargetCohortIds: [],
|
|
155
|
+
schemas: desired.cohort.schemas,
|
|
156
|
+
skill: snapshot.skill.bytes,
|
|
157
|
+
callerWorkflow: snapshot.callerWorkflow.bytes,
|
|
158
|
+
agentsRouteDigest: currentRouteDigest,
|
|
159
|
+
docsScriptsDigest: currentScriptsDigest,
|
|
160
|
+
managedState: snapshot.managedState.bytes
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
const prior = catalog.directTargetBundles.find(({ cohort }) => cohort.cohortId === record["cohortId"]);
|
|
164
|
+
if (prior !== undefined && matchesRecordedCatalogEvidence({ desired, record, prior }) &&
|
|
165
|
+
matchesObservedCatalogEvidence({ desired, snapshot, prior })) {
|
|
166
|
+
return {
|
|
167
|
+
cohortId: prior.cohort.cohortId,
|
|
168
|
+
allowedTargetCohortIds: desired.cohort.upgradeFrom.includes(prior.cohort.cohortId) ||
|
|
169
|
+
prior.cohort.rollbackTo.includes(desired.cohort.cohortId)
|
|
170
|
+
? [desired.cohort.cohortId]
|
|
171
|
+
: [],
|
|
172
|
+
schemas: prior.cohort.schemas,
|
|
173
|
+
skill: prior.skill,
|
|
174
|
+
callerWorkflow: prior.callerWorkflow,
|
|
175
|
+
agentsRouteDigest: prior.agentsRouteDigest,
|
|
176
|
+
docsScriptsDigest: prior.docsScriptsDigest,
|
|
177
|
+
managedState: snapshot.managedState.bytes
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
const technicalRecordedDesired = desiredAtRecordedRepository(desired, record);
|
|
181
|
+
const assets = record["assets"];
|
|
182
|
+
const sources = assets === undefined || technicalRecordedDesired === undefined ||
|
|
183
|
+
typeof record["cohortId"] !== "string" ? [] :
|
|
184
|
+
catalog.currentSourceExecutors.filter((candidate) => canonicalConsumerIntegrationJson(record["packages"]) ===
|
|
185
|
+
canonicalConsumerIntegrationJson(candidate.packages) &&
|
|
186
|
+
canonicalConsumerIntegrationJson(record["schemas"]) ===
|
|
187
|
+
canonicalConsumerIntegrationJson(candidate.schemas) &&
|
|
188
|
+
canonicalConsumerIntegrationJson(record["runtime"]) ===
|
|
189
|
+
canonicalConsumerIntegrationJson(candidate.runtime) &&
|
|
190
|
+
assets["skillDigest"] === candidate.skillDigest &&
|
|
191
|
+
assets["callerWorkflowDigest"] === candidate.callerWorkflowDigest &&
|
|
192
|
+
assets["assetCatalogDigest"] === candidate.assetCatalogDigest &&
|
|
193
|
+
assets["assetCatalogDigest"] === catalog.catalogDigest &&
|
|
194
|
+
assets["transitionCatalogDigest"] === catalog.transitionCatalogDigest &&
|
|
195
|
+
assets["agentsRouteDigest"] === candidate.agentsRouteDigest &&
|
|
196
|
+
assets["docsScriptsDigest"] === candidate.docsScriptsDigest &&
|
|
197
|
+
inputDigest(snapshot.skill) === candidate.skillDigest &&
|
|
198
|
+
inputDigest(snapshot.callerWorkflow) === candidate.callerWorkflowDigest &&
|
|
199
|
+
managedRouteDigest(snapshot.agents) === candidate.agentsRouteDigest &&
|
|
200
|
+
manifestScriptsDigest(snapshot.packageManifest, desired.profilePath) ===
|
|
201
|
+
candidate.docsScriptsDigest);
|
|
202
|
+
const source = sources.length === 1 ? sources[0] : undefined;
|
|
203
|
+
if (source === undefined || snapshot.skill.state !== "file" ||
|
|
204
|
+
snapshot.callerWorkflow.state !== "file") {
|
|
205
|
+
return undefined;
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
cohortId: String(record["cohortId"]),
|
|
209
|
+
allowedTargetCohortIds: source.directTargetCohortIds,
|
|
210
|
+
schemas: source.schemas,
|
|
211
|
+
skill: snapshot.skill.bytes,
|
|
212
|
+
callerWorkflow: snapshot.callerWorkflow.bytes,
|
|
213
|
+
agentsRouteDigest: source.agentsRouteDigest,
|
|
214
|
+
docsScriptsDigest: source.docsScriptsDigest,
|
|
215
|
+
managedState: snapshot.managedState.bytes
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
catch {
|
|
219
|
+
return undefined;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function inputDigest(observation) {
|
|
223
|
+
return observation.state === "file" ? digestBytes(observation.bytes) : undefined;
|
|
224
|
+
}
|
|
225
|
+
function fullAsset(input) {
|
|
226
|
+
const expectedDigest = digestBytes(input.postimage);
|
|
227
|
+
if (input.observation.state === "absent") {
|
|
228
|
+
return {
|
|
229
|
+
plan: {
|
|
230
|
+
id: input.id,
|
|
231
|
+
path: input.path,
|
|
232
|
+
ownership: input.ownership ?? "full-bytes",
|
|
233
|
+
state: "absent",
|
|
234
|
+
expectedDigest,
|
|
235
|
+
action: "create"
|
|
236
|
+
},
|
|
237
|
+
operation: {
|
|
238
|
+
path: input.path,
|
|
239
|
+
precondition: { state: "absent" },
|
|
240
|
+
postimage: { bytes: input.postimage }
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
const currentBytes = input.observation.bytes;
|
|
245
|
+
const currentMode = input.observation.mode;
|
|
246
|
+
const currentDigest = digestBytes(currentBytes);
|
|
247
|
+
if (currentDigest === expectedDigest &&
|
|
248
|
+
Buffer.from(input.observation.bytes).equals(Buffer.from(input.postimage))) {
|
|
249
|
+
return {
|
|
250
|
+
plan: {
|
|
251
|
+
id: input.id,
|
|
252
|
+
path: input.path,
|
|
253
|
+
ownership: input.ownership ?? "full-bytes",
|
|
254
|
+
state: "exact-current",
|
|
255
|
+
currentDigest,
|
|
256
|
+
expectedDigest,
|
|
257
|
+
action: "none"
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
const known = input.knownPrior.some((candidate) => Buffer.from(candidate).equals(Buffer.from(currentBytes)));
|
|
262
|
+
if (!known) {
|
|
263
|
+
return {
|
|
264
|
+
plan: {
|
|
265
|
+
id: input.id,
|
|
266
|
+
path: input.path,
|
|
267
|
+
ownership: input.ownership ?? "full-bytes",
|
|
268
|
+
state: "unknown-modified",
|
|
269
|
+
currentDigest,
|
|
270
|
+
expectedDigest,
|
|
271
|
+
action: "blocked"
|
|
272
|
+
},
|
|
273
|
+
issue: issue("DOCS_CONSUMER_UNKNOWN_MANAGED_ASSET", input.path, "Managed bytes are not exact-current or a known prior revision and were not overwritten.")
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
return {
|
|
277
|
+
plan: {
|
|
278
|
+
id: input.id,
|
|
279
|
+
path: input.path,
|
|
280
|
+
ownership: input.ownership ?? "full-bytes",
|
|
281
|
+
state: "known-prior",
|
|
282
|
+
currentDigest,
|
|
283
|
+
expectedDigest,
|
|
284
|
+
action: "replace"
|
|
285
|
+
},
|
|
286
|
+
operation: {
|
|
287
|
+
path: input.path,
|
|
288
|
+
precondition: {
|
|
289
|
+
state: "known-file",
|
|
290
|
+
acceptedPreimages: [{
|
|
291
|
+
bytes: currentBytes,
|
|
292
|
+
mode: currentMode
|
|
293
|
+
}]
|
|
294
|
+
},
|
|
295
|
+
postimage: {
|
|
296
|
+
bytes: input.postimage,
|
|
297
|
+
mode: currentMode
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
function partialAsset(input) {
|
|
303
|
+
const action = input.state === "conflict" ? "blocked" : input.state === "absent" ? "create" :
|
|
304
|
+
input.state === "exact-current" ? "none" : "replace";
|
|
305
|
+
const plan = {
|
|
306
|
+
id: input.id,
|
|
307
|
+
path: input.path,
|
|
308
|
+
ownership: input.ownership,
|
|
309
|
+
state: input.state,
|
|
310
|
+
currentDigest: input.currentDigest,
|
|
311
|
+
expectedDigest: input.expectedDigest,
|
|
312
|
+
action
|
|
313
|
+
};
|
|
314
|
+
if ((action !== "replace" && action !== "create") || input.postimage === undefined) {
|
|
315
|
+
return { plan };
|
|
316
|
+
}
|
|
317
|
+
if (action === "create") {
|
|
318
|
+
return {
|
|
319
|
+
plan,
|
|
320
|
+
operation: {
|
|
321
|
+
path: input.path,
|
|
322
|
+
precondition: { state: "absent" },
|
|
323
|
+
postimage: { bytes: input.postimage }
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
if (input.current.state !== "file") {
|
|
328
|
+
return { plan };
|
|
329
|
+
}
|
|
330
|
+
return {
|
|
331
|
+
plan,
|
|
332
|
+
operation: {
|
|
333
|
+
path: input.path,
|
|
334
|
+
precondition: {
|
|
335
|
+
state: "known-file",
|
|
336
|
+
acceptedPreimages: [{ bytes: input.current.bytes, mode: input.current.mode }]
|
|
337
|
+
},
|
|
338
|
+
postimage: { bytes: input.postimage, mode: input.current.mode }
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
function cohortIssues(desired, prior, catalog) {
|
|
343
|
+
const issues = [];
|
|
344
|
+
if (prior !== undefined && prior.cohortId !== desired.cohort.cohortId &&
|
|
345
|
+
!prior.allowedTargetCohortIds.includes(desired.cohort.cohortId)) {
|
|
346
|
+
issues.push(issue("DOCS_CONSUMER_COHORT_TRANSITION_FORBIDDEN", desired.cohort.cohortId, `Cohort transition from ${prior.cohortId} is not an authorized upgrade or rollback edge.`));
|
|
347
|
+
}
|
|
348
|
+
if (prior !== undefined && prior.cohortId !== desired.cohort.cohortId &&
|
|
349
|
+
canonicalConsumerIntegrationJson(prior.schemas) !==
|
|
350
|
+
canonicalConsumerIntegrationJson(desired.cohort.schemas)) {
|
|
351
|
+
issues.push(issue("DOCS_CONSUMER_COHORT_SCHEMA_INCOMPATIBLE", desired.cohort.cohortId, "The requested transition crosses a schema boundary and requires a qualified fix-forward Cohort."));
|
|
352
|
+
}
|
|
353
|
+
const targetBundle = catalog.directTargetBundles.find(({ cohort }) => cohort.cohortId === desired.cohort.cohortId &&
|
|
354
|
+
canonicalConsumerIntegrationJson(cohort) === canonicalConsumerIntegrationJson(desired.cohort));
|
|
355
|
+
const canonical = targetBundle === undefined
|
|
356
|
+
? {
|
|
357
|
+
...describeCanonicalConsumerAssets(desired.cohort),
|
|
358
|
+
assetCatalogDigest: catalog.catalogDigest,
|
|
359
|
+
transitionCatalogDigest: catalog.transitionCatalogDigest
|
|
360
|
+
}
|
|
361
|
+
: {
|
|
362
|
+
skillDigest: digestBytes(targetBundle.skill),
|
|
363
|
+
callerWorkflowDigest: digestBytes(targetBundle.callerWorkflow),
|
|
364
|
+
assetCatalogDigest: targetBundle.cohort.assets.assetCatalogDigest,
|
|
365
|
+
transitionCatalogDigest: targetBundle.cohort.assets.transitionCatalogDigest
|
|
366
|
+
};
|
|
367
|
+
if (canonical.skillDigest !== desired.cohort.assets.skillDigest ||
|
|
368
|
+
canonical.callerWorkflowDigest !== desired.cohort.assets.callerWorkflowDigest ||
|
|
369
|
+
canonical.assetCatalogDigest !== desired.cohort.assets.assetCatalogDigest ||
|
|
370
|
+
canonical.transitionCatalogDigest !== desired.cohort.assets.transitionCatalogDigest) {
|
|
371
|
+
issues.push(issue("DOCS_CONSUMER_COHORT_ASSET_MISMATCH", desired.cohort.cohortId, "Qualified Cohort asset digests do not match this exact Docs Protocol build."));
|
|
372
|
+
}
|
|
373
|
+
for (const rollbackId of desired.cohort.rollbackTo) {
|
|
374
|
+
const bundled = catalog.directTargetBundles.find(({ cohort }) => cohort.cohortId === rollbackId);
|
|
375
|
+
if (bundled === undefined || canonicalConsumerIntegrationJson(bundled.cohort.schemas) !==
|
|
376
|
+
canonicalConsumerIntegrationJson(desired.cohort.schemas)) {
|
|
377
|
+
issues.push(issue("DOCS_CONSUMER_ROLLBACK_BUNDLE_MISSING", rollbackId, "Every declared rollback edge requires one exact schema-compatible package-owned target bundle."));
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
return issues;
|
|
381
|
+
}
|
|
382
|
+
function planFullAssets(input) {
|
|
383
|
+
const skillBytes = input.targetBundle?.skill ?? Buffer.from(CANONICAL_DOCS_SKILL, "utf8");
|
|
384
|
+
const callerBytes = input.targetBundle?.callerWorkflow ??
|
|
385
|
+
Buffer.from(canonicalCallerWorkflow(input.desired.cohort), "utf8");
|
|
386
|
+
const routeBytes = Buffer.from(canonicalManagedRoute(input.desired.skillPath), "utf8");
|
|
387
|
+
const bootstrapCaller = input.snapshot.callerWorkflow.state === "file" &&
|
|
388
|
+
isBootstrapKnownPriorCallerWorkflow(input.snapshot.callerWorkflow.bytes)
|
|
389
|
+
? [input.snapshot.callerWorkflow.bytes]
|
|
390
|
+
: [];
|
|
391
|
+
const managedStateBytes = Buffer.from(canonicalManagedState(input.desired, {
|
|
392
|
+
skillDigest: digestBytes(skillBytes),
|
|
393
|
+
callerWorkflowDigest: digestBytes(callerBytes),
|
|
394
|
+
assetCatalogDigest: input.targetCatalogDigest,
|
|
395
|
+
transitionCatalogDigest: input.targetTransitionCatalogDigest,
|
|
396
|
+
agentsRouteDigest: digestBytes(routeBytes),
|
|
397
|
+
docsScriptsDigest: canonicalDocsScriptsDigest(input.desired.profilePath)
|
|
398
|
+
}), "utf8");
|
|
399
|
+
return [
|
|
400
|
+
fullAsset({
|
|
401
|
+
id: "skill",
|
|
402
|
+
path: input.desired.skillPath,
|
|
403
|
+
observation: input.snapshot.skill,
|
|
404
|
+
postimage: skillBytes,
|
|
405
|
+
knownPrior: input.prior === undefined
|
|
406
|
+
? BOOTSTRAP_KNOWN_PRIOR_DOCS_SKILLS
|
|
407
|
+
: [input.prior.skill]
|
|
408
|
+
}),
|
|
409
|
+
fullAsset({
|
|
410
|
+
id: "caller-workflow",
|
|
411
|
+
path: input.desired.callerWorkflowPath,
|
|
412
|
+
observation: input.snapshot.callerWorkflow,
|
|
413
|
+
postimage: callerBytes,
|
|
414
|
+
knownPrior: input.prior === undefined ? [
|
|
415
|
+
...BOOTSTRAP_KNOWN_PRIOR_CALLER_WORKFLOWS,
|
|
416
|
+
...bootstrapCaller
|
|
417
|
+
] : [input.prior.callerWorkflow]
|
|
418
|
+
}),
|
|
419
|
+
fullAsset({
|
|
420
|
+
id: "managed-state",
|
|
421
|
+
path: input.desired.managedStatePath,
|
|
422
|
+
observation: input.snapshot.managedState,
|
|
423
|
+
postimage: managedStateBytes,
|
|
424
|
+
knownPrior: input.prior === undefined ? [] : [input.prior.managedState]
|
|
425
|
+
})
|
|
426
|
+
];
|
|
427
|
+
}
|
|
428
|
+
export function compileConsumerIntegration(input) {
|
|
429
|
+
assertConsumerIntegrationDesiredStateV1(input.desired);
|
|
430
|
+
assertSnapshotRuntime(input.snapshot);
|
|
431
|
+
const desired = input.desired;
|
|
432
|
+
const assetCatalog = input.assetCatalog ?? Object.freeze({
|
|
433
|
+
catalogDigest: describeCanonicalConsumerAssets(desired.cohort).assetCatalogDigest,
|
|
434
|
+
transitionCatalogDigest: describeCanonicalConsumerAssets(desired.cohort).transitionCatalogDigest,
|
|
435
|
+
currentSourceExecutors: BUNDLED_CURRENT_SOURCE_EXECUTORS,
|
|
436
|
+
directTargetBundles: input.knownPriorCohorts ?? BUNDLED_KNOWN_PRIOR_COHORTS
|
|
437
|
+
});
|
|
438
|
+
const prior = trustedPriorCohort(desired, input.snapshot, assetCatalog);
|
|
439
|
+
const issues = [...cohortIssues(desired, prior, assetCatalog)];
|
|
440
|
+
const manifest = planPnpmManifestV1({
|
|
441
|
+
observation: input.snapshot.packageManifest,
|
|
442
|
+
profilePath: desired.profilePath,
|
|
443
|
+
cohort: desired.cohort,
|
|
444
|
+
...(prior === undefined ? {} : { knownPriorScriptsDigest: prior.docsScriptsDigest })
|
|
445
|
+
});
|
|
446
|
+
issues.push(...manifest.issues);
|
|
447
|
+
const route = planAgentsRouteV1({
|
|
448
|
+
observation: input.snapshot.agents,
|
|
449
|
+
skillPath: desired.skillPath,
|
|
450
|
+
...(prior === undefined ? {} : { knownPriorRouteDigest: prior.agentsRouteDigest })
|
|
451
|
+
});
|
|
452
|
+
issues.push(...route.issues);
|
|
453
|
+
const targetBundle = assetCatalog.directTargetBundles.find(({ cohort }) => cohort.cohortId === desired.cohort.cohortId &&
|
|
454
|
+
canonicalConsumerIntegrationJson(cohort) === canonicalConsumerIntegrationJson(desired.cohort));
|
|
455
|
+
const results = planFullAssets({
|
|
456
|
+
desired,
|
|
457
|
+
snapshot: input.snapshot,
|
|
458
|
+
prior,
|
|
459
|
+
targetBundle,
|
|
460
|
+
targetCatalogDigest: targetBundle?.cohort.assets.assetCatalogDigest ?? assetCatalog.catalogDigest,
|
|
461
|
+
targetTransitionCatalogDigest: targetBundle?.cohort.assets.transitionCatalogDigest ??
|
|
462
|
+
assetCatalog.transitionCatalogDigest
|
|
463
|
+
});
|
|
464
|
+
for (const result of results) {
|
|
465
|
+
if (result.issue !== undefined) {
|
|
466
|
+
issues.push(result.issue);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
const manifestAsset = partialAsset({
|
|
470
|
+
id: "package-manifest",
|
|
471
|
+
path: "package.json",
|
|
472
|
+
ownership: "partial-fields",
|
|
473
|
+
state: manifest.state,
|
|
474
|
+
currentDigest: manifest.currentDigest,
|
|
475
|
+
expectedDigest: manifest.expectedDigest,
|
|
476
|
+
current: input.snapshot.packageManifest,
|
|
477
|
+
...(manifest.postimage === undefined ? {} : { postimage: manifest.postimage })
|
|
478
|
+
});
|
|
479
|
+
const routeAsset = partialAsset({
|
|
480
|
+
id: "agents-route",
|
|
481
|
+
path: "AGENTS.md",
|
|
482
|
+
ownership: "managed-block",
|
|
483
|
+
state: route.state,
|
|
484
|
+
currentDigest: route.currentDigest,
|
|
485
|
+
expectedDigest: route.expectedDigest,
|
|
486
|
+
current: input.snapshot.agents,
|
|
487
|
+
...(route.postimage === undefined ? {} : { postimage: route.postimage })
|
|
488
|
+
});
|
|
489
|
+
const assets = Object.freeze([
|
|
490
|
+
manifestAsset.plan,
|
|
491
|
+
routeAsset.plan,
|
|
492
|
+
...results.map(({ plan }) => plan)
|
|
493
|
+
].toSorted((left, right) => left.path < right.path ? -1 : left.path > right.path ? 1 : 0));
|
|
494
|
+
const operations = [
|
|
495
|
+
manifestAsset.operation,
|
|
496
|
+
routeAsset.operation,
|
|
497
|
+
...results.map(({ operation }) => operation)
|
|
498
|
+
].filter((operation) => operation !== undefined);
|
|
499
|
+
const blocked = issues.some(({ severity }) => severity === "error");
|
|
500
|
+
const outcome = blocked ? "blocked" : operations.length === 0 ? "current" : "change-required";
|
|
501
|
+
const guardOperations = consumerIntegrationAuthorityGuards(input.snapshot, operations.length > 0);
|
|
502
|
+
const mutationPlan = blocked
|
|
503
|
+
? undefined
|
|
504
|
+
: compileKnownFileTransactionPlan({ operations: [...operations, ...guardOperations] });
|
|
505
|
+
const planDigest = digestBytes(Buffer.from(canonicalConsumerIntegrationJson({
|
|
506
|
+
domain: "agent-teams.docs-protocol.consumer-integration-plan/v1",
|
|
507
|
+
desired,
|
|
508
|
+
assets: assets.map(({ id, path, ownership, state, currentDigest, expectedDigest, action }) => ({
|
|
509
|
+
id,
|
|
510
|
+
path,
|
|
511
|
+
ownership,
|
|
512
|
+
state,
|
|
513
|
+
currentDigest: currentDigest ?? null,
|
|
514
|
+
expectedDigest,
|
|
515
|
+
action
|
|
516
|
+
})),
|
|
517
|
+
issues,
|
|
518
|
+
mutationPlanDigest: mutationPlan?.planDigest ?? null
|
|
519
|
+
}), "utf8"));
|
|
520
|
+
const plan = Object.freeze({
|
|
521
|
+
schemaVersion: 1,
|
|
522
|
+
cohortId: desired.cohort.cohortId,
|
|
523
|
+
repository: Object.freeze({ ...desired.repository }),
|
|
524
|
+
planDigest,
|
|
525
|
+
outcome,
|
|
526
|
+
assets,
|
|
527
|
+
issues: Object.freeze(issues)
|
|
528
|
+
});
|
|
529
|
+
return Object.freeze({
|
|
530
|
+
plan,
|
|
531
|
+
...(mutationPlan === undefined ? {} : { mutationPlan })
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
export function planConsumerIntegration(input) {
|
|
535
|
+
return compileConsumerIntegration(input).plan;
|
|
536
|
+
}
|
|
537
|
+
//# sourceMappingURL=plan-consumer-integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-consumer-integration.js","sourceRoot":"","sources":["../../../../src/consumer-integration/application/use-cases/plan-consumer-integration.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,OAAO,EACL,+BAA+B,EAEhC,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAUhF,OAAO,EACL,2BAA2B,EAC3B,sCAAsC,EACtC,iCAAiC,EACjC,oBAAoB,EACpB,uBAAuB,EACvB,gCAAgC,E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-cli.d.ts","sourceRoot":"","sources":["../../../src/consumer-integration/composition/consumer-integration-cli.ts"],"names":[],"mappings":"AAwIA,wBAAgB,uBAAuB,IAAI,MAAM,CAehD;AAGD,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA8DxF"}
|