@agent-teams/engineering-foundation 0.4.1 → 0.5.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.
Files changed (225) hide show
  1. package/README.md +22 -0
  2. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.d.ts.map +1 -1
  3. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.js +12 -2
  4. package/dist/capabilities/public-api-compatibility/adapters/outbound/api-extractor/microsoft-public-api-extractor.js.map +1 -1
  5. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.d.ts +3 -0
  6. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.d.ts.map +1 -0
  7. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.js +26 -0
  8. package/dist/capabilities/repository-agent-workflow/adapters/inbound/cli/report-renderer.js.map +1 -0
  9. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-repository-agent-workflow-reader.d.ts +6 -0
  10. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-repository-agent-workflow-reader.d.ts.map +1 -0
  11. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-repository-agent-workflow-reader.js +81 -0
  12. package/dist/capabilities/repository-agent-workflow/adapters/outbound/filesystem/filesystem-repository-agent-workflow-reader.js.map +1 -0
  13. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.d.ts +15 -0
  14. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.d.ts.map +1 -0
  15. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.js +153 -0
  16. package/dist/capabilities/repository-agent-workflow/adapters/outbound/git/git-repository-changes-reader.js.map +1 -0
  17. package/dist/capabilities/repository-agent-workflow/adapters/outbound/pnpm/pnpm-package-script-runner.d.ts +17 -0
  18. package/dist/capabilities/repository-agent-workflow/adapters/outbound/pnpm/pnpm-package-script-runner.d.ts.map +1 -0
  19. package/dist/capabilities/repository-agent-workflow/adapters/outbound/pnpm/pnpm-package-script-runner.js +70 -0
  20. package/dist/capabilities/repository-agent-workflow/adapters/outbound/pnpm/pnpm-package-script-runner.js.map +1 -0
  21. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.d.ts +10 -0
  22. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.d.ts.map +1 -0
  23. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.js +30 -0
  24. package/dist/capabilities/repository-agent-workflow/adapters/outbound/process/process-execution.js.map +1 -0
  25. package/dist/capabilities/repository-agent-workflow/application/model/changed-workflow.d.ts +36 -0
  26. package/dist/capabilities/repository-agent-workflow/application/model/changed-workflow.d.ts.map +1 -0
  27. package/dist/capabilities/repository-agent-workflow/application/model/changed-workflow.js +2 -0
  28. package/dist/capabilities/repository-agent-workflow/application/model/changed-workflow.js.map +1 -0
  29. package/dist/capabilities/repository-agent-workflow/application/model/repository-agent-workflow.d.ts +34 -0
  30. package/dist/capabilities/repository-agent-workflow/application/model/repository-agent-workflow.d.ts.map +1 -0
  31. package/dist/capabilities/repository-agent-workflow/application/model/repository-agent-workflow.js +2 -0
  32. package/dist/capabilities/repository-agent-workflow/application/model/repository-agent-workflow.js.map +1 -0
  33. package/dist/capabilities/repository-agent-workflow/application/policies/evaluate-repository-agent-workflow.d.ts +4 -0
  34. package/dist/capabilities/repository-agent-workflow/application/policies/evaluate-repository-agent-workflow.d.ts.map +1 -0
  35. package/dist/capabilities/repository-agent-workflow/application/policies/evaluate-repository-agent-workflow.js +131 -0
  36. package/dist/capabilities/repository-agent-workflow/application/policies/evaluate-repository-agent-workflow.js.map +1 -0
  37. package/dist/capabilities/repository-agent-workflow/application/ports/changed-workflow.d.ts +17 -0
  38. package/dist/capabilities/repository-agent-workflow/application/ports/changed-workflow.d.ts.map +1 -0
  39. package/dist/capabilities/repository-agent-workflow/application/ports/changed-workflow.js +2 -0
  40. package/dist/capabilities/repository-agent-workflow/application/ports/changed-workflow.js.map +1 -0
  41. package/dist/capabilities/repository-agent-workflow/application/ports/repository-agent-workflow-reader.d.ts +5 -0
  42. package/dist/capabilities/repository-agent-workflow/application/ports/repository-agent-workflow-reader.d.ts.map +1 -0
  43. package/dist/capabilities/repository-agent-workflow/application/ports/repository-agent-workflow-reader.js +2 -0
  44. package/dist/capabilities/repository-agent-workflow/application/ports/repository-agent-workflow-reader.js.map +1 -0
  45. package/dist/capabilities/repository-agent-workflow/application/rules.d.ts +8 -0
  46. package/dist/capabilities/repository-agent-workflow/application/rules.d.ts.map +1 -0
  47. package/dist/capabilities/repository-agent-workflow/application/rules.js +35 -0
  48. package/dist/capabilities/repository-agent-workflow/application/rules.js.map +1 -0
  49. package/dist/capabilities/repository-agent-workflow/application/use-cases/analyze-repository-agent-workflow.d.ts +9 -0
  50. package/dist/capabilities/repository-agent-workflow/application/use-cases/analyze-repository-agent-workflow.d.ts.map +1 -0
  51. package/dist/capabilities/repository-agent-workflow/application/use-cases/analyze-repository-agent-workflow.js +7 -0
  52. package/dist/capabilities/repository-agent-workflow/application/use-cases/analyze-repository-agent-workflow.js.map +1 -0
  53. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.d.ts +4 -0
  54. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.d.ts.map +1 -0
  55. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.js +79 -0
  56. package/dist/capabilities/repository-agent-workflow/application/use-cases/run-changed-agent-workflow.js.map +1 -0
  57. package/dist/capabilities/repository-agent-workflow/changed-command.d.ts +9 -0
  58. package/dist/capabilities/repository-agent-workflow/changed-command.d.ts.map +1 -0
  59. package/dist/capabilities/repository-agent-workflow/changed-command.js +28 -0
  60. package/dist/capabilities/repository-agent-workflow/changed-command.js.map +1 -0
  61. package/dist/capabilities/repository-agent-workflow/contract/config.d.ts +5 -0
  62. package/dist/capabilities/repository-agent-workflow/contract/config.d.ts.map +1 -0
  63. package/dist/capabilities/repository-agent-workflow/contract/config.js +121 -0
  64. package/dist/capabilities/repository-agent-workflow/contract/config.js.map +1 -0
  65. package/dist/capabilities/repository-agent-workflow/module.d.ts +5 -0
  66. package/dist/capabilities/repository-agent-workflow/module.d.ts.map +1 -0
  67. package/dist/capabilities/repository-agent-workflow/module.js +49 -0
  68. package/dist/capabilities/repository-agent-workflow/module.js.map +1 -0
  69. package/dist/capabilities/repository-security-baseline/application/policies/evaluate-repository-security.d.ts.map +1 -1
  70. package/dist/capabilities/repository-security-baseline/application/policies/evaluate-repository-security.js +150 -125
  71. package/dist/capabilities/repository-security-baseline/application/policies/evaluate-repository-security.js.map +1 -1
  72. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.d.ts.map +1 -1
  73. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.js +9 -1
  74. package/dist/capabilities/workspace-dependency-declarations/application/policies/evaluate-workspace-dependencies.js.map +1 -1
  75. package/dist/cli-arguments.d.ts +12 -0
  76. package/dist/cli-arguments.d.ts.map +1 -0
  77. package/dist/cli-arguments.js +114 -0
  78. package/dist/cli-arguments.js.map +1 -0
  79. package/dist/cli.js +131 -125
  80. package/dist/cli.js.map +1 -1
  81. package/dist/composition/capability-registry.d.ts.map +1 -1
  82. package/dist/composition/capability-registry.js +2 -0
  83. package/dist/composition/capability-registry.js.map +1 -1
  84. package/dist/composition/rule-registry.d.ts.map +1 -1
  85. package/dist/composition/rule-registry.js +2 -0
  86. package/dist/composition/rule-registry.js.map +1 -1
  87. package/dist/foundation-config.d.ts +1 -1
  88. package/dist/foundation-config.d.ts.map +1 -1
  89. package/dist/foundation-config.js +2 -0
  90. package/dist/foundation-config.js.map +1 -1
  91. package/dist/local-mode/attach-transaction.d.ts +11 -0
  92. package/dist/local-mode/attach-transaction.d.ts.map +1 -0
  93. package/dist/local-mode/attach-transaction.js +176 -0
  94. package/dist/local-mode/attach-transaction.js.map +1 -0
  95. package/dist/local-mode/consumer-policy.d.ts +2 -3
  96. package/dist/local-mode/consumer-policy.d.ts.map +1 -1
  97. package/dist/local-mode/consumer-policy.js +102 -94
  98. package/dist/local-mode/consumer-policy.js.map +1 -1
  99. package/dist/local-mode/index.d.ts +1 -0
  100. package/dist/local-mode/index.d.ts.map +1 -1
  101. package/dist/local-mode/index.js.map +1 -1
  102. package/dist/local-mode/inspection.d.ts.map +1 -1
  103. package/dist/local-mode/inspection.js +126 -118
  104. package/dist/local-mode/inspection.js.map +1 -1
  105. package/dist/local-mode/local-state-store.d.ts +6 -0
  106. package/dist/local-mode/local-state-store.d.ts.map +1 -0
  107. package/dist/local-mode/local-state-store.js +138 -0
  108. package/dist/local-mode/local-state-store.js.map +1 -0
  109. package/dist/local-mode/registry-recovery.d.ts +5 -0
  110. package/dist/local-mode/registry-recovery.d.ts.map +1 -0
  111. package/dist/local-mode/registry-recovery.js +112 -0
  112. package/dist/local-mode/registry-recovery.js.map +1 -0
  113. package/dist/local-mode/service.d.ts +1 -1
  114. package/dist/local-mode/service.d.ts.map +1 -1
  115. package/dist/local-mode/service.js +14 -398
  116. package/dist/local-mode/service.js.map +1 -1
  117. package/dist/package-self-check.d.ts +1 -1
  118. package/dist/package-self-check.d.ts.map +1 -1
  119. package/dist/package-self-check.js +13 -1
  120. package/dist/package-self-check.js.map +1 -1
  121. package/dist/public-api-surface.d.ts +4 -0
  122. package/dist/public-api-surface.d.ts.map +1 -0
  123. package/dist/public-api-surface.js +4 -0
  124. package/dist/public-api-surface.js.map +1 -0
  125. package/dist/scaffolding/adapters/memory/memory-workspace.d.ts +9 -0
  126. package/dist/scaffolding/adapters/memory/memory-workspace.d.ts.map +1 -0
  127. package/dist/scaffolding/adapters/memory/memory-workspace.js +93 -0
  128. package/dist/scaffolding/adapters/memory/memory-workspace.js.map +1 -0
  129. package/dist/scaffolding/adapters/node/filesystem-journal.d.ts +6 -0
  130. package/dist/scaffolding/adapters/node/filesystem-journal.d.ts.map +1 -0
  131. package/dist/scaffolding/adapters/node/filesystem-journal.js +79 -0
  132. package/dist/scaffolding/adapters/node/filesystem-journal.js.map +1 -0
  133. package/dist/scaffolding/adapters/node/filesystem-path-guard.d.ts +7 -0
  134. package/dist/scaffolding/adapters/node/filesystem-path-guard.d.ts.map +1 -0
  135. package/dist/scaffolding/adapters/node/filesystem-path-guard.js +144 -0
  136. package/dist/scaffolding/adapters/node/filesystem-path-guard.js.map +1 -0
  137. package/dist/scaffolding/adapters/node/filesystem-workspace.d.ts +13 -0
  138. package/dist/scaffolding/adapters/node/filesystem-workspace.d.ts.map +1 -0
  139. package/dist/scaffolding/adapters/node/filesystem-workspace.js +336 -0
  140. package/dist/scaffolding/adapters/node/filesystem-workspace.js.map +1 -0
  141. package/dist/scaffolding/adapters/node/installed-foundation-version.d.ts +2 -0
  142. package/dist/scaffolding/adapters/node/installed-foundation-version.d.ts.map +1 -0
  143. package/dist/scaffolding/adapters/node/installed-foundation-version.js +10 -0
  144. package/dist/scaffolding/adapters/node/installed-foundation-version.js.map +1 -0
  145. package/dist/scaffolding/adapters/node/node-input-loader.d.ts +17 -0
  146. package/dist/scaffolding/adapters/node/node-input-loader.d.ts.map +1 -0
  147. package/dist/scaffolding/adapters/node/node-input-loader.js +157 -0
  148. package/dist/scaffolding/adapters/node/node-input-loader.js.map +1 -0
  149. package/dist/scaffolding/adapters/node/node-plan-authority.d.ts +3 -0
  150. package/dist/scaffolding/adapters/node/node-plan-authority.d.ts.map +1 -0
  151. package/dist/scaffolding/adapters/node/node-plan-authority.js +18 -0
  152. package/dist/scaffolding/adapters/node/node-plan-authority.js.map +1 -0
  153. package/dist/scaffolding/adapters/node/node-receipt-validator.d.ts +4 -0
  154. package/dist/scaffolding/adapters/node/node-receipt-validator.d.ts.map +1 -0
  155. package/dist/scaffolding/adapters/node/node-receipt-validator.js +10 -0
  156. package/dist/scaffolding/adapters/node/node-receipt-validator.js.map +1 -0
  157. package/dist/scaffolding/cli-command.d.ts +8 -0
  158. package/dist/scaffolding/cli-command.d.ts.map +1 -0
  159. package/dist/scaffolding/cli-command.js +60 -0
  160. package/dist/scaffolding/cli-command.js.map +1 -0
  161. package/dist/scaffolding/contract/types.d.ts +296 -0
  162. package/dist/scaffolding/contract/types.d.ts.map +1 -0
  163. package/dist/scaffolding/contract/types.js +2 -0
  164. package/dist/scaffolding/contract/types.js.map +1 -0
  165. package/dist/scaffolding/definitions/conformance-fixture.d.ts +3 -0
  166. package/dist/scaffolding/definitions/conformance-fixture.d.ts.map +1 -0
  167. package/dist/scaffolding/definitions/conformance-fixture.js +217 -0
  168. package/dist/scaffolding/definitions/conformance-fixture.js.map +1 -0
  169. package/dist/scaffolding/definitions/registry.d.ts +3 -0
  170. package/dist/scaffolding/definitions/registry.d.ts.map +1 -0
  171. package/dist/scaffolding/definitions/registry.js +6 -0
  172. package/dist/scaffolding/definitions/registry.js.map +1 -0
  173. package/dist/scaffolding/index.d.ts +11 -0
  174. package/dist/scaffolding/index.d.ts.map +1 -0
  175. package/dist/scaffolding/index.js +9 -0
  176. package/dist/scaffolding/index.js.map +1 -0
  177. package/dist/scaffolding/kernel/canonical-json.d.ts +6 -0
  178. package/dist/scaffolding/kernel/canonical-json.d.ts.map +1 -0
  179. package/dist/scaffolding/kernel/canonical-json.js +55 -0
  180. package/dist/scaffolding/kernel/canonical-json.js.map +1 -0
  181. package/dist/scaffolding/kernel/compiler.d.ts +4 -0
  182. package/dist/scaffolding/kernel/compiler.d.ts.map +1 -0
  183. package/dist/scaffolding/kernel/compiler.js +297 -0
  184. package/dist/scaffolding/kernel/compiler.js.map +1 -0
  185. package/dist/scaffolding/kernel/definition-registry.d.ts +50 -0
  186. package/dist/scaffolding/kernel/definition-registry.d.ts.map +1 -0
  187. package/dist/scaffolding/kernel/definition-registry.js +92 -0
  188. package/dist/scaffolding/kernel/definition-registry.js.map +1 -0
  189. package/dist/scaffolding/kernel/limits.d.ts +5 -0
  190. package/dist/scaffolding/kernel/limits.d.ts.map +1 -0
  191. package/dist/scaffolding/kernel/limits.js +5 -0
  192. package/dist/scaffolding/kernel/limits.js.map +1 -0
  193. package/dist/scaffolding/kernel/plan-validation.d.ts +3 -0
  194. package/dist/scaffolding/kernel/plan-validation.d.ts.map +1 -0
  195. package/dist/scaffolding/kernel/plan-validation.js +44 -0
  196. package/dist/scaffolding/kernel/plan-validation.js.map +1 -0
  197. package/dist/scaffolding/kernel/receipt.d.ts +35 -0
  198. package/dist/scaffolding/kernel/receipt.d.ts.map +1 -0
  199. package/dist/scaffolding/kernel/receipt.js +206 -0
  200. package/dist/scaffolding/kernel/receipt.js.map +1 -0
  201. package/dist/scaffolding/scaffold-error.d.ts +8 -0
  202. package/dist/scaffolding/scaffold-error.d.ts.map +1 -0
  203. package/dist/scaffolding/scaffold-error.js +11 -0
  204. package/dist/scaffolding/scaffold-error.js.map +1 -0
  205. package/dist/scaffolding/service.d.ts +8 -0
  206. package/dist/scaffolding/service.d.ts.map +1 -0
  207. package/dist/scaffolding/service.js +15 -0
  208. package/dist/scaffolding/service.js.map +1 -0
  209. package/dist/schema-ids.d.ts +1 -1
  210. package/dist/schema-ids.d.ts.map +1 -1
  211. package/dist/schema-ids.js +6 -0
  212. package/dist/schema-ids.js.map +1 -1
  213. package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.d.ts.map +1 -1
  214. package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.js +17 -12
  215. package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.js.map +1 -1
  216. package/package.json +5 -1
  217. package/presets/oxlint/maintainability-tests.json +23 -0
  218. package/presets/oxlint/maintainability.json +23 -0
  219. package/schemas/foundation-config/v1.schema.json +10 -0
  220. package/schemas/repository-agent-workflow/v1.schema.json +92 -0
  221. package/schemas/scaffold-intent/v1.schema.json +60 -0
  222. package/schemas/scaffold-plan/v1.schema.json +250 -0
  223. package/schemas/scaffold-receipt/v1.schema.json +299 -0
  224. package/schemas/scaffold-target-catalog/v1.schema.json +52 -0
  225. package/schemas/scaffolding-config/v1.schema.json +99 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-command.d.ts","sourceRoot":"","sources":["../../src/scaffolding/cli-command.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAkBD,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,oBAAoB,EAC5B,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,OAAO,CAAC,CAuDlB"}
@@ -0,0 +1,60 @@
1
+ import { applyFilesystemScaffold, readScaffoldPlanFile, recoverFilesystemScaffold } from "./index.js";
2
+ import { ScaffoldError } from "./scaffold-error.js";
3
+ import { planScaffoldFromFile } from "./service.js";
4
+ function renderPlan(plan) {
5
+ return `Scaffold Plan: ${plan.planDigest}\nProject: ${plan.projectId}\nComposition: ${plan.composition.id}\nTarget: ${plan.target.id} -> ${plan.target.path}\nOperations: ${plan.operations.length}\n`;
6
+ }
7
+ function renderReceipt(receipt) {
8
+ return `Scaffold Receipt: ${receipt.receiptDigest}\nPlan: ${receipt.planDigest}\nOutcome: ${receipt.outcome}\nOperations: ${receipt.operations.length}\n`;
9
+ }
10
+ function exitCode(receipt) {
11
+ return receipt.outcome === "applied" ||
12
+ receipt.outcome === "already-applied" ||
13
+ receipt.outcome === "failed-recovered"
14
+ ? 0
15
+ : 1;
16
+ }
17
+ export async function runScaffoldingCliCommand(parsed, json) {
18
+ switch (parsed.command) {
19
+ case "scaffold-apply": {
20
+ const planPath = parsed.positional[0];
21
+ if (planPath === undefined) {
22
+ throw new ScaffoldError("SCAFFOLD_INPUT_INVALID", "scaffold-apply requires a repository-relative Plan path.");
23
+ }
24
+ const plan = await readScaffoldPlanFile(parsed.consumerRoot, planPath);
25
+ const receipt = await applyFilesystemScaffold(parsed.consumerRoot, plan);
26
+ process.stdout.write(json ? `${JSON.stringify(receipt, null, 2)}\n` : renderReceipt(receipt));
27
+ process.exitCode = exitCode(receipt);
28
+ return true;
29
+ }
30
+ case "scaffold-plan": {
31
+ const intentPath = parsed.positional[0];
32
+ if (intentPath === undefined) {
33
+ throw new ScaffoldError("SCAFFOLD_INPUT_INVALID", "scaffold-plan requires a repository-relative Intent path.");
34
+ }
35
+ const plan = await planScaffoldFromFile({
36
+ consumerRoot: parsed.consumerRoot,
37
+ intentPath,
38
+ configPath: parsed.configPath
39
+ });
40
+ process.stdout.write(json ? `${JSON.stringify(plan, null, 2)}\n` : renderPlan(plan));
41
+ return true;
42
+ }
43
+ case "scaffold-recover": {
44
+ const receipt = await recoverFilesystemScaffold(parsed.consumerRoot);
45
+ if (receipt === undefined) {
46
+ process.stdout.write(json
47
+ ? `${JSON.stringify({ outcome: "no-pending-transaction" }, null, 2)}\n`
48
+ : "No pending scaffolding transaction.\n");
49
+ }
50
+ else {
51
+ process.stdout.write(json ? `${JSON.stringify(receipt, null, 2)}\n` : renderReceipt(receipt));
52
+ process.exitCode = exitCode(receipt);
53
+ }
54
+ return true;
55
+ }
56
+ default:
57
+ return false;
58
+ }
59
+ }
60
+ //# sourceMappingURL=cli-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-command.js","sourceRoot":"","sources":["../../src/scaffolding/cli-command.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AASpD,SAAS,UAAU,CAAC,IAAoB;IACtC,OAAO,kBAAkB,IAAI,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,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CACxE,CAAC;gBACF,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;YACvC,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC"}
@@ -0,0 +1,296 @@
1
+ export type JsonPrimitive = boolean | null | number | string;
2
+ export type JsonValue = JsonPrimitive | readonly JsonValue[] | {
3
+ readonly [key: string]: JsonValue;
4
+ };
5
+ export type JsonObject = {
6
+ readonly [key: string]: JsonValue;
7
+ };
8
+ export type Sha256Digest = `sha256:${string}`;
9
+ export type RepositoryPath = string;
10
+ export interface DefinitionRef {
11
+ readonly id: string;
12
+ readonly contractVersion: number;
13
+ }
14
+ export interface ConfiguredDefinition {
15
+ readonly ref: DefinitionRef;
16
+ readonly parameters?: JsonObject;
17
+ }
18
+ export interface ScaffoldCompositionV1 {
19
+ readonly id: string;
20
+ readonly scaffoldProfile: ConfiguredDefinition;
21
+ readonly recipe: ConfiguredDefinition;
22
+ readonly targetRoles: readonly string[];
23
+ readonly fixedRecipeParameters?: JsonObject;
24
+ readonly defaultRecipeParameters?: JsonObject;
25
+ readonly facets?: {
26
+ readonly fixed?: readonly ConfiguredDefinition[];
27
+ readonly default?: readonly ConfiguredDefinition[];
28
+ readonly allowed?: readonly DefinitionRef[];
29
+ };
30
+ readonly policies: readonly ConfiguredDefinition[];
31
+ }
32
+ export interface ScaffoldingConfigV1 {
33
+ readonly schemaVersion: 1;
34
+ readonly projectId: string;
35
+ readonly targetCatalogPath: RepositoryPath;
36
+ readonly compositions: readonly ScaffoldCompositionV1[];
37
+ }
38
+ export interface ScaffoldIntentV1 {
39
+ readonly schemaVersion: 1;
40
+ readonly compositionId: string;
41
+ readonly targetRef: string;
42
+ readonly recipeParameters?: JsonObject;
43
+ readonly facets?: readonly ConfiguredDefinition[];
44
+ }
45
+ export interface ScaffoldTargetV1 {
46
+ readonly id: string;
47
+ readonly role: string;
48
+ readonly path: RepositoryPath;
49
+ readonly packageName: string;
50
+ readonly ownerDocument?: string;
51
+ }
52
+ export interface ScaffoldTargetCatalogV1 {
53
+ readonly version: 1;
54
+ readonly packages: readonly ScaffoldTargetV1[];
55
+ }
56
+ export interface ScaffoldDiagnosticV1 {
57
+ readonly ruleId: string;
58
+ readonly severity: "error" | "info" | "warning";
59
+ readonly phase: "apply" | "composition" | "input" | "planning" | "policy" | "recovery";
60
+ readonly subject: string;
61
+ readonly message: string;
62
+ readonly remediation: string;
63
+ }
64
+ export interface ScaffoldReadAssertionV1 {
65
+ readonly path: RepositoryPath;
66
+ readonly state: "file";
67
+ readonly digest: Sha256Digest;
68
+ readonly size: number;
69
+ }
70
+ export interface MaterializeFileOperationV1 {
71
+ readonly id: string;
72
+ readonly kind: "materialize-file";
73
+ readonly path: RepositoryPath;
74
+ readonly precondition: {
75
+ readonly state: "absent";
76
+ };
77
+ readonly after: {
78
+ readonly digest: Sha256Digest;
79
+ readonly size: number;
80
+ readonly mode: "0644";
81
+ readonly mediaType: string;
82
+ readonly contentBase64: string;
83
+ };
84
+ readonly causes: readonly string[];
85
+ }
86
+ export interface ScaffoldPlanV1 {
87
+ readonly schemaVersion: 1;
88
+ readonly protocolVersion: 1;
89
+ readonly compiler: {
90
+ readonly id: "@agent-teams/engineering-foundation";
91
+ readonly version: string;
92
+ };
93
+ readonly projectId: string;
94
+ readonly authority: {
95
+ readonly configPath: RepositoryPath;
96
+ readonly targetCatalogPath: RepositoryPath;
97
+ };
98
+ readonly intent: ScaffoldIntentV1;
99
+ readonly intentDigest: Sha256Digest;
100
+ readonly authoritySnapshotDigest: Sha256Digest;
101
+ readonly composition: {
102
+ readonly id: string;
103
+ readonly scaffoldProfile: DefinitionRef;
104
+ readonly recipe: DefinitionRef;
105
+ readonly facets: readonly DefinitionRef[];
106
+ readonly policies: readonly DefinitionRef[];
107
+ };
108
+ readonly definitions: readonly {
109
+ readonly kind: "facet" | "policy" | "recipe" | "scaffold-profile";
110
+ readonly ref: DefinitionRef;
111
+ readonly contractDigest: Sha256Digest;
112
+ }[];
113
+ readonly resolved: {
114
+ readonly profileParameters: JsonObject;
115
+ readonly recipeParameters: JsonObject;
116
+ readonly facets: readonly {
117
+ readonly ref: DefinitionRef;
118
+ readonly parameters: JsonObject;
119
+ }[];
120
+ readonly policies: readonly {
121
+ readonly ref: DefinitionRef;
122
+ readonly parameters: JsonObject;
123
+ readonly outcome: "passed";
124
+ }[];
125
+ };
126
+ readonly target: ScaffoldTargetV1;
127
+ readonly readSet: readonly ScaffoldReadAssertionV1[];
128
+ readonly requiredAdapterCapabilities: readonly ["materialize-file/v1"];
129
+ readonly operations: readonly MaterializeFileOperationV1[];
130
+ readonly diagnostics: readonly ScaffoldDiagnosticV1[];
131
+ readonly planDigest: Sha256Digest;
132
+ }
133
+ export type ScaffoldOperationOutcome = "already-satisfied" | "applied" | "conflict" | "not-applied" | "recovered";
134
+ export interface ScaffoldOperationReceiptV1 {
135
+ readonly operationId: string;
136
+ readonly path: RepositoryPath;
137
+ readonly outcome: ScaffoldOperationOutcome;
138
+ readonly resultDigest?: Sha256Digest;
139
+ }
140
+ export type ScaffoldReceiptOutcome = "already-applied" | "applied" | "failed-recovered" | "recovery-required" | "rejected";
141
+ export interface ScaffoldReceiptCommonV1 {
142
+ readonly schemaVersion: 1;
143
+ readonly protocolVersion: 1;
144
+ readonly planDigest: Sha256Digest;
145
+ readonly diagnostics: readonly ScaffoldDiagnosticV1[];
146
+ readonly receiptDigest: Sha256Digest;
147
+ }
148
+ export type ScaffoldReceiptV1 = (ScaffoldReceiptCommonV1 & {
149
+ readonly outcome: "applied";
150
+ readonly operations: readonly [
151
+ ScaffoldOperationReceiptV1 & {
152
+ readonly outcome: "already-satisfied" | "applied";
153
+ readonly resultDigest: Sha256Digest;
154
+ },
155
+ ...(ScaffoldOperationReceiptV1 & {
156
+ readonly outcome: "already-satisfied" | "applied";
157
+ readonly resultDigest: Sha256Digest;
158
+ })[]
159
+ ];
160
+ } & ({
161
+ readonly adapter: {
162
+ readonly id: "foundation.filesystem/v1";
163
+ readonly contractVersion: 1;
164
+ };
165
+ readonly commit: {
166
+ readonly state: "committed";
167
+ readonly atomicity: "journaled-recoverable";
168
+ };
169
+ } | {
170
+ readonly adapter: {
171
+ readonly id: "foundation.memory/v1";
172
+ readonly contractVersion: 1;
173
+ };
174
+ readonly commit: {
175
+ readonly state: "committed";
176
+ readonly atomicity: "memory-atomic";
177
+ };
178
+ })) | (ScaffoldReceiptCommonV1 & {
179
+ readonly outcome: "already-applied";
180
+ readonly operations: readonly [
181
+ ScaffoldOperationReceiptV1 & {
182
+ readonly outcome: "already-satisfied";
183
+ readonly resultDigest: Sha256Digest;
184
+ },
185
+ ...(ScaffoldOperationReceiptV1 & {
186
+ readonly outcome: "already-satisfied";
187
+ readonly resultDigest: Sha256Digest;
188
+ })[]
189
+ ];
190
+ } & ({
191
+ readonly adapter: {
192
+ readonly id: "foundation.filesystem/v1";
193
+ readonly contractVersion: 1;
194
+ };
195
+ readonly commit: {
196
+ readonly state: "committed";
197
+ readonly atomicity: "journaled-recoverable";
198
+ };
199
+ } | {
200
+ readonly adapter: {
201
+ readonly id: "foundation.memory/v1";
202
+ readonly contractVersion: 1;
203
+ };
204
+ readonly commit: {
205
+ readonly state: "committed";
206
+ readonly atomicity: "memory-atomic";
207
+ };
208
+ })) | (ScaffoldReceiptCommonV1 & {
209
+ readonly adapter: {
210
+ readonly id: "foundation.filesystem/v1";
211
+ readonly contractVersion: 1;
212
+ };
213
+ readonly outcome: "failed-recovered";
214
+ readonly commit: {
215
+ readonly state: "recovered";
216
+ readonly atomicity: "journaled-recoverable";
217
+ };
218
+ readonly operations: readonly [
219
+ ScaffoldOperationReceiptV1 & {
220
+ readonly outcome: "already-satisfied" | "recovered";
221
+ readonly resultDigest: Sha256Digest;
222
+ },
223
+ ...(ScaffoldOperationReceiptV1 & {
224
+ readonly outcome: "already-satisfied" | "recovered";
225
+ readonly resultDigest: Sha256Digest;
226
+ })[]
227
+ ];
228
+ }) | (ScaffoldReceiptCommonV1 & {
229
+ readonly adapter: {
230
+ readonly id: "foundation.filesystem/v1";
231
+ readonly contractVersion: 1;
232
+ };
233
+ readonly outcome: "recovery-required";
234
+ readonly commit: {
235
+ readonly state: "recovery-required";
236
+ readonly atomicity: "journaled-recoverable";
237
+ };
238
+ readonly operations: readonly [
239
+ (ScaffoldOperationReceiptV1 & {
240
+ readonly outcome: "already-satisfied";
241
+ readonly resultDigest: Sha256Digest;
242
+ }) | (ScaffoldOperationReceiptV1 & {
243
+ readonly outcome: "conflict" | "not-applied";
244
+ readonly resultDigest?: never;
245
+ }),
246
+ ...((ScaffoldOperationReceiptV1 & {
247
+ readonly outcome: "already-satisfied";
248
+ readonly resultDigest: Sha256Digest;
249
+ }) | (ScaffoldOperationReceiptV1 & {
250
+ readonly outcome: "conflict" | "not-applied";
251
+ readonly resultDigest?: never;
252
+ }))[]
253
+ ];
254
+ }) | (ScaffoldReceiptCommonV1 & {
255
+ readonly outcome: "rejected";
256
+ readonly operations: readonly ((ScaffoldOperationReceiptV1 & {
257
+ readonly outcome: "already-satisfied";
258
+ readonly resultDigest: Sha256Digest;
259
+ }) | (ScaffoldOperationReceiptV1 & {
260
+ readonly outcome: "conflict" | "not-applied";
261
+ readonly resultDigest?: never;
262
+ }))[];
263
+ } & ({
264
+ readonly adapter: {
265
+ readonly id: "foundation.filesystem/v1";
266
+ readonly contractVersion: 1;
267
+ };
268
+ readonly commit: {
269
+ readonly state: "rejected";
270
+ readonly atomicity: "journaled-recoverable";
271
+ };
272
+ } | {
273
+ readonly adapter: {
274
+ readonly id: "foundation.memory/v1";
275
+ readonly contractVersion: 1;
276
+ };
277
+ readonly commit: {
278
+ readonly state: "rejected";
279
+ readonly atomicity: "memory-atomic";
280
+ };
281
+ }));
282
+ export interface ScaffoldCompilationInput {
283
+ readonly foundationVersion: string;
284
+ readonly configPath: RepositoryPath;
285
+ readonly config: ScaffoldingConfigV1;
286
+ readonly intent: ScaffoldIntentV1;
287
+ readonly catalog: ScaffoldTargetCatalogV1;
288
+ readonly authorityReadSet: readonly ScaffoldReadAssertionV1[];
289
+ }
290
+ export interface ScaffoldFileContribution {
291
+ readonly path: RepositoryPath;
292
+ readonly mediaType: string;
293
+ readonly content: string;
294
+ readonly causes: readonly string[];
295
+ }
296
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/scaffolding/contract/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAC7D,MAAM,MAAM,SAAS,GACjB,aAAa,GACb,SAAS,SAAS,EAAE,GACpB;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAC1C,MAAM,MAAM,UAAU,GAAG;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAE/D,MAAM,MAAM,YAAY,GAAG,UAAU,MAAM,EAAE,CAAC;AAC9C,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;CAClC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,eAAe,EAAE,oBAAoB,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAA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C,QAAQ,CAAC,gBAAgB,EAAE,SAAS,uBAAuB,EAAE,CAAC;CAC/D;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/scaffolding/contract/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { ScaffoldDefinition } from "../kernel/definition-registry.js";
2
+ export declare const CONFORMANCE_FIXTURE_DEFINITIONS: readonly ScaffoldDefinition[];
3
+ //# sourceMappingURL=conformance-fixture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conformance-fixture.d.ts","sourceRoot":"","sources":["../../../src/scaffolding/definitions/conformance-fixture.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,kCAAkC,CAAC;AA0L1C,eAAO,MAAM,+BAA+B,EAAE,SAAS,kBAAkB,EAgGrE,CAAC"}
@@ -0,0 +1,217 @@
1
+ import { posix } from "node:path";
2
+ import { ScaffoldError } from "../scaffold-error.js";
3
+ const EMPTY_PARAMETERS_SCHEMA = Object.freeze({
4
+ type: "object",
5
+ additionalProperties: false
6
+ });
7
+ const PROFILE_PARAMETERS_SCHEMA = Object.freeze({
8
+ type: "object",
9
+ additionalProperties: false,
10
+ required: ["tsconfigBase"],
11
+ properties: {
12
+ tsconfigBase: {
13
+ type: "string",
14
+ minLength: 1,
15
+ maxLength: 512,
16
+ pattern: "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.{1,2}(?:/|$))[A-Za-z0-9._@/-]+$"
17
+ }
18
+ }
19
+ });
20
+ const RECIPE_PARAMETERS_SCHEMA = Object.freeze({
21
+ type: "object",
22
+ additionalProperties: false,
23
+ required: ["featureId"],
24
+ properties: {
25
+ featureId: {
26
+ type: "string",
27
+ minLength: 1,
28
+ maxLength: 80,
29
+ pattern: "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
30
+ },
31
+ description: {
32
+ type: "string",
33
+ minLength: 1,
34
+ maxLength: 240
35
+ }
36
+ }
37
+ });
38
+ const TARGET_ROLE_POLICY_SCHEMA = Object.freeze({
39
+ type: "object",
40
+ additionalProperties: false,
41
+ required: ["allowedRoles"],
42
+ properties: {
43
+ allowedRoles: {
44
+ type: "array",
45
+ minItems: 1,
46
+ maxItems: 32,
47
+ uniqueItems: true,
48
+ items: {
49
+ type: "string",
50
+ minLength: 1,
51
+ maxLength: 80,
52
+ pattern: "^[a-z0-9][a-z0-9._/-]*$"
53
+ }
54
+ }
55
+ }
56
+ });
57
+ function requiredString(parameters, key) {
58
+ const value = parameters[key];
59
+ if (typeof value !== "string") {
60
+ throw new ScaffoldError("SCAFFOLD_INPUT_INVALID", `Missing validated string parameter: ${key}.`);
61
+ }
62
+ return value;
63
+ }
64
+ function repositoryFile(context, relativePath, content, causes, mediaType = "text/plain") {
65
+ return Object.freeze({
66
+ path: posix.join(context.target.path, relativePath),
67
+ mediaType,
68
+ content,
69
+ causes
70
+ });
71
+ }
72
+ function recipeFiles(context) {
73
+ const featureId = requiredString(context.recipeParameters, "featureId");
74
+ const description = context.recipeParameters.description;
75
+ const tsconfigBase = requiredString(context.profileParameters, "tsconfigBase");
76
+ const extendsPath = posix.relative(context.target.path, tsconfigBase);
77
+ const packageManifest = {
78
+ name: context.target.packageName,
79
+ version: "0.0.0",
80
+ private: true,
81
+ ...(typeof description === "string" ? { description } : {}),
82
+ type: "module",
83
+ exports: {
84
+ ".": "./src/index.ts"
85
+ },
86
+ scripts: {
87
+ typecheck: "tsc --project tsconfig.json --noEmit --pretty false"
88
+ }
89
+ };
90
+ const tsconfig = {
91
+ extends: extendsPath.startsWith(".") ? extendsPath : `./${extendsPath}`,
92
+ compilerOptions: {
93
+ composite: true,
94
+ declaration: true,
95
+ declarationMap: true,
96
+ noEmit: false,
97
+ outDir: "dist",
98
+ rootDir: "src",
99
+ tsBuildInfoFile: "dist/.tsbuildinfo"
100
+ },
101
+ include: ["src/**/*.ts"]
102
+ };
103
+ const identitySource = `export const fixtureIdentity = Object.freeze({\n featureId: ${JSON.stringify(featureId)},\n packageName: ${JSON.stringify(context.target.packageName)}\n});\n`;
104
+ const entrypointSource = `export { fixtureIdentity } from "./features/${featureId}/index.js";\n`;
105
+ return Object.freeze([
106
+ repositoryFile(context, "package.json", `${JSON.stringify(packageManifest, null, 2)}\n`, ["foundation.conformance-fixture-package"], "application/json"),
107
+ repositoryFile(context, "tsconfig.json", `${JSON.stringify(tsconfig, null, 2)}\n`, ["foundation.conformance-fixture-package"], "application/json"),
108
+ repositoryFile(context, `src/features/${featureId}/index.ts`, identitySource, ["foundation.conformance-fixture-package"]),
109
+ repositoryFile(context, "src/index.ts", entrypointSource, ["foundation.conformance-fixture-package"])
110
+ ]);
111
+ }
112
+ function typecheckFixtureFiles(context) {
113
+ const featureId = requiredString(context.recipeParameters, "featureId");
114
+ const source = `import { fixtureIdentity } from "./index.js";\n\nexport const fixtureFeatureId: string = fixtureIdentity.featureId;\nexport const expectedFixtureFeatureId = ${JSON.stringify(featureId)};\n`;
115
+ return Object.freeze([
116
+ repositoryFile(context, `src/features/${featureId}/index.contract.ts`, source, ["foundation.typecheck-fixture"])
117
+ ]);
118
+ }
119
+ function fixtureReadmeFiles(context) {
120
+ const featureId = requiredString(context.recipeParameters, "featureId");
121
+ const source = `# ${context.target.packageName}\n\nDeterministic conformance fixture for \`${featureId}\`.\n`;
122
+ return Object.freeze([
123
+ repositoryFile(context, "README.md", source, ["foundation.fixture-readme"], "text/markdown")
124
+ ]);
125
+ }
126
+ export const CONFORMANCE_FIXTURE_DEFINITIONS = Object.freeze([
127
+ {
128
+ kind: "scaffold-profile",
129
+ ref: {
130
+ id: "foundation.node-typescript-fixture",
131
+ contractVersion: 1
132
+ },
133
+ descriptor: {
134
+ kind: "scaffold-profile",
135
+ id: "foundation.node-typescript-fixture",
136
+ contractVersion: 1,
137
+ semantics: "node-typescript-testing-only"
138
+ },
139
+ parameterSchema: PROFILE_PARAMETERS_SCHEMA,
140
+ allowedRecipeIds: ["foundation.conformance-fixture-package"],
141
+ requiredPolicies: [
142
+ {
143
+ ref: { id: "foundation.target-role", contractVersion: 1 },
144
+ parameters: { allowedRoles: ["testing"] }
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ kind: "recipe",
150
+ ref: {
151
+ id: "foundation.conformance-fixture-package",
152
+ contractVersion: 1
153
+ },
154
+ descriptor: {
155
+ kind: "recipe",
156
+ id: "foundation.conformance-fixture-package",
157
+ contractVersion: 1,
158
+ semantics: "materialize-a-non-product-conformance-package"
159
+ },
160
+ parameterSchema: RECIPE_PARAMETERS_SCHEMA,
161
+ allowedProfileIds: ["foundation.node-typescript-fixture"],
162
+ allowedTargetRoles: ["testing"],
163
+ requiredPolicies: [],
164
+ compile: recipeFiles
165
+ },
166
+ {
167
+ kind: "facet",
168
+ ref: { id: "foundation.typecheck-fixture", contractVersion: 1 },
169
+ descriptor: {
170
+ kind: "facet",
171
+ id: "foundation.typecheck-fixture",
172
+ contractVersion: 1,
173
+ semantics: "compile-time-contract-for-conformance-fixture"
174
+ },
175
+ parameterSchema: EMPTY_PARAMETERS_SCHEMA,
176
+ allowedRecipeIds: ["foundation.conformance-fixture-package"],
177
+ requires: [],
178
+ conflicts: [],
179
+ requiredPolicies: [],
180
+ compile: typecheckFixtureFiles
181
+ },
182
+ {
183
+ kind: "facet",
184
+ ref: { id: "foundation.fixture-readme", contractVersion: 1 },
185
+ descriptor: {
186
+ kind: "facet",
187
+ id: "foundation.fixture-readme",
188
+ contractVersion: 1,
189
+ semantics: "readme-for-conformance-fixture"
190
+ },
191
+ parameterSchema: EMPTY_PARAMETERS_SCHEMA,
192
+ allowedRecipeIds: ["foundation.conformance-fixture-package"],
193
+ requires: [],
194
+ conflicts: [],
195
+ requiredPolicies: [],
196
+ compile: fixtureReadmeFiles
197
+ },
198
+ {
199
+ kind: "policy",
200
+ ref: { id: "foundation.target-role", contractVersion: 1 },
201
+ descriptor: {
202
+ kind: "policy",
203
+ id: "foundation.target-role",
204
+ contractVersion: 1,
205
+ semantics: "target-role-must-be-explicitly-allowed"
206
+ },
207
+ parameterSchema: TARGET_ROLE_POLICY_SCHEMA,
208
+ evaluate(context, parameters) {
209
+ const allowedRoles = parameters.allowedRoles;
210
+ if (!Array.isArray(allowedRoles) ||
211
+ !allowedRoles.includes(context.target.role)) {
212
+ throw new ScaffoldError("SCAFFOLD_INPUT_INVALID", `Target role ${context.target.role} is not allowed by the selected composition.`);
213
+ }
214
+ }
215
+ }
216
+ ]);
217
+ //# sourceMappingURL=conformance-fixture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conformance-fixture.js","sourceRoot":"","sources":["../../../src/scaffolding/definitions/conformance-fixture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAMlC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAMrD,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;CAC5B,CAAC,CAAC;AAEH,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,cAAc,CAAC;IAC1B,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,GAAG;YACd,OAAO,EAAE,gEAAgE;SAC1E;KACF;CACF,CAAC,CAAC;AAEH,MAAM,wBA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CACrB,wBAAwB,EACxB,eAAe,OAAO,CAAC,MAAM,CAAC,IAAI,8CAA8C,CACjF,CAAC;YACJ,CAAC;QACH,CAAC;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ScaffoldDefinitionRegistry } from "../kernel/definition-registry.js";
2
+ export declare function createDefaultScaffoldRegistry(): ScaffoldDefinitionRegistry;
3
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/scaffolding/definitions/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAG9E,wBAAgB,6BAA6B,IAAI,0BAA0B,CAE1E"}
@@ -0,0 +1,6 @@
1
+ import { ScaffoldDefinitionRegistry } from "../kernel/definition-registry.js";
2
+ import { CONFORMANCE_FIXTURE_DEFINITIONS } from "./conformance-fixture.js";
3
+ export function createDefaultScaffoldRegistry() {
4
+ return new ScaffoldDefinitionRegistry(CONFORMANCE_FIXTURE_DEFINITIONS);
5
+ }
6
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/scaffolding/definitions/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAE3E,MAAM,UAAU,6BAA6B;IAC3C,OAAO,IAAI,0BAA0B,CAAC,+BAA+B,CAAC,CAAC;AACzE,CAAC"}