@agent-teams/docs-protocol 0.1.0-rc.1 → 0.1.0-rc.10

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.
Files changed (90) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/README.md +34 -5
  3. package/assets/catalog.json +1 -0
  4. package/assets/docs-protocol.yml +14 -0
  5. package/assets/history/sha256-097df9fe1b90ab45f73389c8b69736f8a54d4199b09536d586222b5a7f0fbb09/caller.yml +13 -0
  6. package/assets/history/sha256-3e53262efc8a530b532380dac21d876456473d3b88aba20889a1d24823bf3a1b/caller.yml +14 -0
  7. package/assets/history/sha256-7b31cd257532247f64c55a014dc926c601e4d742176cfb8513b6b0d8ab48213e/skill.md +28 -0
  8. package/assets/transition-catalog.json +1 -0
  9. package/dist/composition/cli.d.ts.map +1 -1
  10. package/dist/composition/cli.js +9 -1
  11. package/dist/composition/cli.js.map +1 -1
  12. package/dist/consumer-integration/adapters/agents-route-adapter-v1.d.ts +15 -0
  13. package/dist/consumer-integration/adapters/agents-route-adapter-v1.d.ts.map +1 -0
  14. package/dist/consumer-integration/adapters/agents-route-adapter-v1.js +96 -0
  15. package/dist/consumer-integration/adapters/agents-route-adapter-v1.js.map +1 -0
  16. package/dist/consumer-integration/adapters/bounded-repository-topology.d.ts +8 -0
  17. package/dist/consumer-integration/adapters/bounded-repository-topology.d.ts.map +1 -0
  18. package/dist/consumer-integration/adapters/bounded-repository-topology.js +80 -0
  19. package/dist/consumer-integration/adapters/bounded-repository-topology.js.map +1 -0
  20. package/dist/consumer-integration/adapters/consumer-integration-schema-validator.d.ts +3 -0
  21. package/dist/consumer-integration/adapters/consumer-integration-schema-validator.d.ts.map +1 -0
  22. package/dist/consumer-integration/adapters/consumer-integration-schema-validator.js +43 -0
  23. package/dist/consumer-integration/adapters/consumer-integration-schema-validator.js.map +1 -0
  24. package/dist/consumer-integration/adapters/node-consumer-integration-repository.d.ts +14 -0
  25. package/dist/consumer-integration/adapters/node-consumer-integration-repository.d.ts.map +1 -0
  26. package/dist/consumer-integration/adapters/node-consumer-integration-repository.js +405 -0
  27. package/dist/consumer-integration/adapters/node-consumer-integration-repository.js.map +1 -0
  28. package/dist/consumer-integration/adapters/package-consumer-asset-catalog.d.ts +3 -0
  29. package/dist/consumer-integration/adapters/package-consumer-asset-catalog.d.ts.map +1 -0
  30. package/dist/consumer-integration/adapters/package-consumer-asset-catalog.js +152 -0
  31. package/dist/consumer-integration/adapters/package-consumer-asset-catalog.js.map +1 -0
  32. package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.d.ts +3 -0
  33. package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.d.ts.map +1 -0
  34. package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.js +37 -0
  35. package/dist/consumer-integration/adapters/pnpm-lockfile-policy-v1.js.map +1 -0
  36. package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.d.ts +16 -0
  37. package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.d.ts.map +1 -0
  38. package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.js +155 -0
  39. package/dist/consumer-integration/adapters/pnpm-manifest-adapter-v1.js.map +1 -0
  40. package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.d.ts +8 -0
  41. package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.d.ts.map +1 -0
  42. package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.js +245 -0
  43. package/dist/consumer-integration/adapters/pnpm-runtime-closure-v1.js.map +1 -0
  44. package/dist/consumer-integration/application/policies/consumer-integration-assets.d.ts +57 -0
  45. package/dist/consumer-integration/application/policies/consumer-integration-assets.d.ts.map +1 -0
  46. package/dist/consumer-integration/application/policies/consumer-integration-assets.js +147 -0
  47. package/dist/consumer-integration/application/policies/consumer-integration-assets.js.map +1 -0
  48. package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.d.ts +4 -0
  49. package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.d.ts.map +1 -0
  50. package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.js +23 -0
  51. package/dist/consumer-integration/application/policies/consumer-integration-authority-guards.js.map +1 -0
  52. package/dist/consumer-integration/application/policies/consumer-integration-desired-state.d.ts +4 -0
  53. package/dist/consumer-integration/application/policies/consumer-integration-desired-state.d.ts.map +1 -0
  54. package/dist/consumer-integration/application/policies/consumer-integration-desired-state.js +153 -0
  55. package/dist/consumer-integration/application/policies/consumer-integration-desired-state.js.map +1 -0
  56. package/dist/consumer-integration/application/use-cases/plan-consumer-integration.d.ts +18 -0
  57. package/dist/consumer-integration/application/use-cases/plan-consumer-integration.d.ts.map +1 -0
  58. package/dist/consumer-integration/application/use-cases/plan-consumer-integration.js +537 -0
  59. package/dist/consumer-integration/application/use-cases/plan-consumer-integration.js.map +1 -0
  60. package/dist/consumer-integration/composition/consumer-integration-cli.d.ts +3 -0
  61. package/dist/consumer-integration/composition/consumer-integration-cli.d.ts.map +1 -0
  62. package/dist/consumer-integration/composition/consumer-integration-cli.js +223 -0
  63. package/dist/consumer-integration/composition/consumer-integration-cli.js.map +1 -0
  64. package/dist/consumer-integration/composition/node-consumer-integration.d.ts +28 -0
  65. package/dist/consumer-integration/composition/node-consumer-integration.d.ts.map +1 -0
  66. package/dist/consumer-integration/composition/node-consumer-integration.js +138 -0
  67. package/dist/consumer-integration/composition/node-consumer-integration.js.map +1 -0
  68. package/dist/consumer-integration/domain/model.d.ts +105 -0
  69. package/dist/consumer-integration/domain/model.d.ts.map +1 -0
  70. package/dist/consumer-integration/domain/model.js +2 -0
  71. package/dist/consumer-integration/domain/model.js.map +1 -0
  72. package/dist/consumer-integration/generated/canonical-assets.d.ts +4 -0
  73. package/dist/consumer-integration/generated/canonical-assets.d.ts.map +1 -0
  74. package/dist/consumer-integration/generated/canonical-assets.js +5 -0
  75. package/dist/consumer-integration/generated/canonical-assets.js.map +1 -0
  76. package/dist/consumer-integration/index.d.ts +11 -0
  77. package/dist/consumer-integration/index.d.ts.map +1 -0
  78. package/dist/consumer-integration/index.js +7 -0
  79. package/dist/consumer-integration/index.js.map +1 -0
  80. package/dist/index.d.ts +1 -0
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +1 -0
  83. package/dist/index.js.map +1 -1
  84. package/package.json +13 -3
  85. package/schemas/docs-consumer-integration-execution/v1.schema.json +29 -0
  86. package/schemas/docs-consumer-integration-plan/v1.schema.json +63 -0
  87. package/schemas/docs-consumer-integration-profile/v1.schema.json +110 -0
  88. package/schemas/docs-consumer-managed-state/v1.schema.json +99 -0
  89. package/schemas/qualified-docs-cohort/v1.schema.json +96 -0
  90. package/skills/docs/SKILL.md +28 -0
@@ -0,0 +1,153 @@
1
+ const COHORT_ID = /^[a-z0-9]+(?:[._-][a-z0-9]+)*$/u;
2
+ const INTEGRITY = /^sha512-[A-Za-z0-9+/]{86}==$/u;
3
+ const NONZERO_SHA = /^(?!0{40}$)[0-9a-f]{40}$/u;
4
+ const NONZERO_SHA256 = /^sha256:(?!0{64}$)[0-9a-f]{64}$/u;
5
+ const REPOSITORY = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/u;
6
+ const REPOSITORY_ID = /^[1-9][0-9]*$/u;
7
+ const SEMVER = /^[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?$/u;
8
+ const REPOSITORY_PATH = /^(?!.*(?:^|\/)\.{1,2}(?:\/|$))[A-Za-z0-9._@-]{1,255}(?:\/[A-Za-z0-9._@-]{1,255})*$/u;
9
+ const PROFILE_PATH = "architecture/foundation/docs-protocol.yaml";
10
+ const SKILL_PATH = ".agents/skills/docs-authoring/SKILL.md";
11
+ const CALLER_WORKFLOW_PATH = ".github/workflows/docs-protocol.yml";
12
+ const MANAGED_STATE_PATH = "architecture/foundation/docs-protocol-managed-state.json";
13
+ const WORKFLOW_REPOSITORY = "agent-teams-ai/.github";
14
+ const WORKFLOW_PATH = ".github/workflows/docs-protocol-check.yml";
15
+ function hasUniqueEntries(entries) {
16
+ return new Set(entries).size === entries.length;
17
+ }
18
+ function hasExactKeys(value, keys) {
19
+ return Object.keys(value).toSorted().join("\u0000") === [...keys].toSorted().join("\u0000");
20
+ }
21
+ function hasValidGovernedRoots(roots) {
22
+ return roots === undefined || (roots.length > 0 && roots.length <= 32 &&
23
+ hasUniqueEntries(roots) && roots.every((root) => REPOSITORY_PATH.test(root)));
24
+ }
25
+ function isCanonicalUtcSeconds(value) {
26
+ const milliseconds = Date.parse(value);
27
+ return Number.isFinite(milliseconds) &&
28
+ new Date(milliseconds).toISOString().replace(".000", "") === value;
29
+ }
30
+ function assertPlainBoundedJson(value) {
31
+ let remaining = 2048;
32
+ const seen = new Set();
33
+ // oxlint-disable-next-line complexity -- this rejects every non-JSON runtime category.
34
+ const visit = (candidate, depth) => {
35
+ if (--remaining < 0 || depth > 16) {
36
+ throw new TypeError("Consumer input exceeds bounded JSON limits.");
37
+ }
38
+ if (candidate === null || typeof candidate === "boolean" ||
39
+ (typeof candidate === "number" && Number.isSafeInteger(candidate))) {
40
+ return;
41
+ }
42
+ if (typeof candidate === "string") {
43
+ if (candidate.length > 4096 || candidate.includes("\u0000")) {
44
+ throw new TypeError("Consumer input contains an invalid or overlong string.");
45
+ }
46
+ return;
47
+ }
48
+ if (typeof candidate !== "object" || seen.has(candidate)) {
49
+ throw new TypeError("Consumer input must be acyclic plain JSON data.");
50
+ }
51
+ seen.add(candidate);
52
+ const prototype = Object.getPrototypeOf(candidate);
53
+ if (prototype !== Object.prototype && prototype !== Array.prototype && prototype !== null) {
54
+ throw new TypeError("Consumer input must use plain JSON objects and arrays.");
55
+ }
56
+ if (Object.getOwnPropertySymbols(candidate).length > 0) {
57
+ throw new TypeError("Consumer input must not contain symbol properties.");
58
+ }
59
+ for (const [key, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(candidate))) {
60
+ if (Array.isArray(candidate) && key === "length") {
61
+ continue;
62
+ }
63
+ if (descriptor.get !== undefined || descriptor.set !== undefined || descriptor.enumerable !== true) {
64
+ throw new TypeError("Consumer input must not contain accessors or hidden properties.");
65
+ }
66
+ visit(descriptor.value, depth + 1);
67
+ }
68
+ };
69
+ visit(value, 0);
70
+ }
71
+ function hasValidCohortAuthority(cohort) {
72
+ return COHORT_ID.test(cohort.cohortId) &&
73
+ NONZERO_SHA256.test(cohort.recordDigest) &&
74
+ NONZERO_SHA256.test(cohort.qualificationEventDigest) &&
75
+ isCanonicalUtcSeconds(cohort.eligibleAfter) &&
76
+ hasUniqueEntries(cohort.upgradeFrom) &&
77
+ hasUniqueEntries(cohort.rollbackTo) &&
78
+ cohort.upgradeFrom.every((entry) => COHORT_ID.test(entry)) &&
79
+ cohort.rollbackTo.every((entry) => COHORT_ID.test(entry));
80
+ }
81
+ function hasValidPackages(cohort) {
82
+ const packages = cohort.packages;
83
+ return SEMVER.test(packages.docsProtocol.version) &&
84
+ SEMVER.test(packages.engineeringFoundation.version) &&
85
+ INTEGRITY.test(packages.docsProtocol.integrity) &&
86
+ INTEGRITY.test(packages.engineeringFoundation.integrity);
87
+ }
88
+ function hasValidWorkflow(cohort) {
89
+ const workflow = cohort.workflow;
90
+ return workflow.repository === WORKFLOW_REPOSITORY &&
91
+ workflow.path === WORKFLOW_PATH &&
92
+ NONZERO_SHA.test(workflow.revision) &&
93
+ NONZERO_SHA.test(workflow.blobSha);
94
+ }
95
+ export function assertQualifiedDocsCohortBindingV1(cohort) {
96
+ assertPlainBoundedJson(cohort);
97
+ const valid = hasExactKeys(cohort, [
98
+ "schemaVersion", "cohortId", "channel", "recordDigest", "qualificationEventDigest",
99
+ "eligibleAfter", "upgradeFrom", "rollbackTo", "packages", "workflow", "assets",
100
+ "schemas", "runtime"
101
+ ]) &&
102
+ hasExactKeys(cohort.packages, ["docsProtocol", "engineeringFoundation"]) &&
103
+ hasExactKeys(cohort.packages.docsProtocol, ["version", "integrity"]) &&
104
+ hasExactKeys(cohort.packages.engineeringFoundation, ["version", "integrity"]) &&
105
+ hasExactKeys(cohort.workflow, ["repository", "path", "revision", "blobSha"]) &&
106
+ hasExactKeys(cohort.assets, [
107
+ "skillDigest", "callerWorkflowDigest", "assetCatalogDigest", "transitionCatalogDigest"
108
+ ]) &&
109
+ hasExactKeys(cohort.schemas, [
110
+ "consumerIntegration", "managedState", "docsProtocol"
111
+ ]) &&
112
+ hasExactKeys(cohort.runtime, ["node", "pnpm", "runtimeClosureDigest"]) &&
113
+ cohort.schemaVersion === 1 &&
114
+ hasValidCohortAuthority(cohort) &&
115
+ hasValidPackages(cohort) &&
116
+ hasValidWorkflow(cohort) &&
117
+ NONZERO_SHA256.test(cohort.assets.skillDigest) &&
118
+ NONZERO_SHA256.test(cohort.assets.callerWorkflowDigest) &&
119
+ NONZERO_SHA256.test(cohort.assets.assetCatalogDigest) &&
120
+ NONZERO_SHA256.test(cohort.assets.transitionCatalogDigest) &&
121
+ cohort.runtime.node === ">=24.18.0 <25" &&
122
+ cohort.runtime.pnpm === ">=11.17.0 <12" &&
123
+ NONZERO_SHA256.test(cohort.runtime.runtimeClosureDigest);
124
+ if (!valid) {
125
+ throw new TypeError("Qualified Docs Cohort binding is invalid or unsupported.");
126
+ }
127
+ }
128
+ export function assertConsumerIntegrationDesiredStateV1(desired) {
129
+ assertPlainBoundedJson(desired);
130
+ assertQualifiedDocsCohortBindingV1(desired.cohort);
131
+ const valid = hasExactKeys(desired, [
132
+ "schemaVersion", "repository", "integrationRoot", "packageManager", "profilePath",
133
+ "skillPath", "callerWorkflowPath", "managedStatePath", "cohort",
134
+ ...(desired.governedDocsRoots === undefined ? [] : ["governedDocsRoots"])
135
+ ]) &&
136
+ hasExactKeys(desired.repository, ["provider", "id", "nameWithOwner"]) &&
137
+ desired.schemaVersion === 1 &&
138
+ desired.integrationRoot === "." &&
139
+ desired.packageManager === "pnpm" &&
140
+ desired.profilePath === PROFILE_PATH &&
141
+ desired.skillPath === SKILL_PATH &&
142
+ desired.callerWorkflowPath === CALLER_WORKFLOW_PATH &&
143
+ desired.managedStatePath === MANAGED_STATE_PATH &&
144
+ desired.repository.provider === "github" &&
145
+ REPOSITORY_ID.test(desired.repository.id) &&
146
+ REPOSITORY.test(desired.repository.nameWithOwner) &&
147
+ hasValidGovernedRoots(desired.governedDocsRoots) &&
148
+ desired.cohort.schemaVersion === 1;
149
+ if (!valid) {
150
+ throw new TypeError("Consumer integration desired state is invalid or unsupported.");
151
+ }
152
+ }
153
+ //# sourceMappingURL=consumer-integration-desired-state.js.map
@@ -0,0 +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,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,KA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,MAAM;QACjC,OAAO,CAAC,WAAW,KAAK,YAAY;QACpC,OAAO,CAAC,SAAS,KAAK,UAAU;QAChC,OAAO,CAAC,kBAAkB,KAAK,oBAAoB;QACnD,OAAO,CAAC,gBAAgB,KAAK,kBAAkB;QAC/C,OAAO,CAAC,UAAU,CAAC,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,18 @@
1
+ import { compileKnownFileTransactionPlan } from "@agent-teams/engineering-foundation/mutation";
2
+ import type { ConsumerIntegrationDesiredStateV1, ConsumerIntegrationPlanV1, ConsumerIntegrationSnapshot } from "../../domain/model.js";
3
+ import { type ConsumerAssetCatalogV1, type KnownPriorCohortCatalogEntryV1 } from "../policies/consumer-integration-assets.js";
4
+ export declare function compileConsumerIntegration(input: {
5
+ readonly desired: ConsumerIntegrationDesiredStateV1;
6
+ readonly snapshot: ConsumerIntegrationSnapshot;
7
+ readonly assetCatalog?: ConsumerAssetCatalogV1;
8
+ /** Unit-level compatibility input; production composition loads package assets. */
9
+ readonly knownPriorCohorts?: readonly KnownPriorCohortCatalogEntryV1[];
10
+ }): {
11
+ readonly plan: ConsumerIntegrationPlanV1;
12
+ readonly mutationPlan?: ReturnType<typeof compileKnownFileTransactionPlan>;
13
+ };
14
+ export declare function planConsumerIntegration(input: {
15
+ readonly desired: ConsumerIntegrationDesiredStateV1;
16
+ readonly snapshot: ConsumerIntegrationSnapshot;
17
+ }): ConsumerIntegrationPlanV1;
18
+ //# sourceMappingURL=plan-consumer-integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-consumer-integration.d.ts","sourceRoot":"","sources":["../../../../src/consumer-integration/application/use-cases/plan-consumer-integration.ts"],"names":[],"mappings":"AACA,OAAO,EACL,+BAA+B,EAEhC,MAAM,8CAA8C,CAAC;AAItD,OAAO,KAAK,EAEV,iCAAiC,EAIjC,yBAAyB,EACzB,2BAA2B,EAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAWL,KAAK,sBAAsB,EAK3B,KAAK,8BAA8B,EACpC,MAAM,4CAA4C,CAAC;AAygBpD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,QAAQ,CAAC,OAAO,EAAE,iCAAiC,CAAC;IACpD,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC;IAC/C,QAAQ,CAAC,YAAY,CAAC,EAAE,sBAAsB,CAAC;IAC/C,mFAAmF;IACnF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,8BAA8B,EAAE,CAAC;CACxE,GAAG;IACF,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;IACzC,QAAQ,CAAC,YAAY,CAAC,EAAE,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC;CAC5E,CAoHA;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,QAAQ,CAAC,OAAO,EAAE,iCAAiC,CAAC;IACpD,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC;CAChD,GAAG,yBAAyB,CAE5B"}