@clossys/writer 0.3.9 → 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 (136) hide show
  1. package/README.md +647 -6
  2. package/dist/addressability.d.ts +11 -1
  3. package/dist/addressability.d.ts.map +1 -1
  4. package/dist/addressability.js +169 -3
  5. package/dist/addressability.js.map +1 -1
  6. package/dist/approval-bypass.d.ts +120 -0
  7. package/dist/approval-bypass.d.ts.map +1 -0
  8. package/dist/approval-bypass.js +2318 -0
  9. package/dist/approval-bypass.js.map +1 -0
  10. package/dist/approval.d.ts +62 -0
  11. package/dist/approval.d.ts.map +1 -0
  12. package/dist/approval.js +421 -0
  13. package/dist/approval.js.map +1 -0
  14. package/dist/approve-cli.d.ts +82 -0
  15. package/dist/approve-cli.d.ts.map +1 -0
  16. package/dist/approve-cli.js +430 -0
  17. package/dist/approve-cli.js.map +1 -0
  18. package/dist/cli.d.ts +15 -0
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/cli.js +264 -22
  21. package/dist/cli.js.map +1 -1
  22. package/dist/field-options.d.ts +59 -0
  23. package/dist/field-options.d.ts.map +1 -0
  24. package/dist/field-options.js +109 -0
  25. package/dist/field-options.js.map +1 -0
  26. package/dist/fold-wallpaper-gate.d.ts +7 -0
  27. package/dist/fold-wallpaper-gate.d.ts.map +1 -0
  28. package/dist/fold-wallpaper-gate.js +29 -0
  29. package/dist/fold-wallpaper-gate.js.map +1 -0
  30. package/dist/front-door.check.d.ts +2 -0
  31. package/dist/front-door.check.d.ts.map +1 -0
  32. package/dist/front-door.check.js +8 -0
  33. package/dist/front-door.check.js.map +1 -0
  34. package/dist/front-door.d.ts +82 -0
  35. package/dist/front-door.d.ts.map +1 -0
  36. package/dist/front-door.js +271 -0
  37. package/dist/front-door.js.map +1 -0
  38. package/dist/generated/advisor-plan-contract.generated.d.ts +3 -0
  39. package/dist/generated/advisor-plan-contract.generated.d.ts.map +1 -0
  40. package/dist/generated/advisor-plan-contract.generated.js +430 -0
  41. package/dist/generated/advisor-plan-contract.generated.js.map +1 -0
  42. package/dist/generated/contract-schema.generated.d.ts +97 -0
  43. package/dist/generated/contract-schema.generated.d.ts.map +1 -0
  44. package/dist/generated/contract-schema.generated.js +496 -0
  45. package/dist/generated/contract-schema.generated.js.map +1 -0
  46. package/dist/index.d.ts +18 -2
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +26 -0
  49. package/dist/index.js.map +1 -1
  50. package/dist/live-copy-gate.d.ts +16 -0
  51. package/dist/live-copy-gate.d.ts.map +1 -0
  52. package/dist/live-copy-gate.js +135 -0
  53. package/dist/live-copy-gate.js.map +1 -0
  54. package/dist/messaging-kit.d.ts +113 -0
  55. package/dist/messaging-kit.d.ts.map +1 -0
  56. package/dist/messaging-kit.js +121 -0
  57. package/dist/messaging-kit.js.map +1 -0
  58. package/dist/passage.d.ts +2 -1
  59. package/dist/passage.d.ts.map +1 -1
  60. package/dist/passage.js +2 -1
  61. package/dist/passage.js.map +1 -1
  62. package/dist/plan-authority.d.ts +73 -0
  63. package/dist/plan-authority.d.ts.map +1 -0
  64. package/dist/plan-authority.js +126 -0
  65. package/dist/plan-authority.js.map +1 -0
  66. package/dist/plan-contract.d.ts +16 -0
  67. package/dist/plan-contract.d.ts.map +1 -0
  68. package/dist/plan-contract.js +33 -0
  69. package/dist/plan-contract.js.map +1 -0
  70. package/dist/plan-digest.d.ts +23 -0
  71. package/dist/plan-digest.d.ts.map +1 -0
  72. package/dist/plan-digest.js +82 -0
  73. package/dist/plan-digest.js.map +1 -0
  74. package/dist/plan-rules.d.ts +54 -0
  75. package/dist/plan-rules.d.ts.map +1 -0
  76. package/dist/plan-rules.js +145 -0
  77. package/dist/plan-rules.js.map +1 -0
  78. package/dist/render-registry-parity.d.ts +20 -0
  79. package/dist/render-registry-parity.d.ts.map +1 -0
  80. package/dist/render-registry-parity.js +45 -0
  81. package/dist/render-registry-parity.js.map +1 -0
  82. package/dist/resolve.d.ts +40 -6
  83. package/dist/resolve.d.ts.map +1 -1
  84. package/dist/resolve.js +144 -18
  85. package/dist/resolve.js.map +1 -1
  86. package/dist/scan.d.ts +32 -0
  87. package/dist/scan.d.ts.map +1 -1
  88. package/dist/scan.js +67 -6
  89. package/dist/scan.js.map +1 -1
  90. package/dist/schema.d.ts +1 -0
  91. package/dist/schema.d.ts.map +1 -1
  92. package/dist/schema.js +231 -5
  93. package/dist/schema.js.map +1 -1
  94. package/dist/site-identity.d.ts +88 -0
  95. package/dist/site-identity.d.ts.map +1 -0
  96. package/dist/site-identity.js +82 -0
  97. package/dist/site-identity.js.map +1 -0
  98. package/dist/treatment-word-budget.d.ts +31 -0
  99. package/dist/treatment-word-budget.d.ts.map +1 -0
  100. package/dist/treatment-word-budget.js +80 -0
  101. package/dist/treatment-word-budget.js.map +1 -0
  102. package/dist/types.d.ts +76 -7
  103. package/dist/types.d.ts.map +1 -1
  104. package/dist/types.js +9 -7
  105. package/dist/types.js.map +1 -1
  106. package/fit-signals.json +11 -0
  107. package/package.json +201 -11
  108. package/skill/SKILL.md +49 -0
  109. package/src/addressability.ts +186 -4
  110. package/src/approval-bypass.ts +2263 -0
  111. package/src/approval.ts +491 -0
  112. package/src/approve-cli.ts +474 -0
  113. package/src/cli.ts +274 -22
  114. package/src/field-options.ts +134 -0
  115. package/src/fold-wallpaper-gate.ts +29 -0
  116. package/src/front-door.check.ts +10 -0
  117. package/src/front-door.ts +312 -0
  118. package/src/generated/advisor-plan-contract.generated.ts +430 -0
  119. package/src/generated/contract-schema.generated.ts +520 -0
  120. package/src/index.ts +107 -1
  121. package/src/live-copy-gate.ts +150 -0
  122. package/src/messaging-kit.ts +195 -0
  123. package/src/passage.ts +2 -1
  124. package/src/plan-authority.ts +160 -0
  125. package/src/plan-contract.ts +45 -0
  126. package/src/plan-digest.ts +81 -0
  127. package/src/plan-rules.ts +179 -0
  128. package/src/render-registry-parity.ts +65 -0
  129. package/src/resolve.ts +185 -19
  130. package/src/scan.ts +97 -6
  131. package/src/schema.ts +247 -5
  132. package/src/site-identity.ts +125 -0
  133. package/src/treatment-word-budget.ts +100 -0
  134. package/src/types.ts +83 -7
  135. package/templates/front-door.en.json +426 -0
  136. package/CHANGELOG.md +0 -330
@@ -0,0 +1,430 @@
1
+ // AUTO-GENERATED by this package's build-time packer (issue #1586).
2
+ // Do not edit by hand -- edits are overwritten on the next `npm run build`.
3
+ // Source of truth: the shared Advisor plan contract in this package's source
4
+ // repository (not shipped in this package). Every package that validates a
5
+ // plan packs this same contract.
6
+ /** The shared Advisor plan contract (advisor-plan.json) this package validates against. */
7
+ export const ADVISOR_PLAN_CONTRACT = {
8
+ "$schema": "http://json-schema.org/draft-07/schema#",
9
+ "$id": "https://github.com/clossys/foundry/blob/main/docs/contracts/advisor-plan.json",
10
+ "title": "Advisor plan",
11
+ "description": "Issue #1175 and #1475: the plan record at clossys/advisor/plan.json that Advisor writes and renders into its STATUS document, that Launcher reads before it applies an approved plan, and that Writer reads when it resolves copy a delegate approved for production (issue #1586). packages/advisor/src/status.ts's AdvisorPlan type is the shape's owner; this file is the one definition @clossys/advisor, @clossys/launcher and @clossys/writer validate against (each package packs it at build time, so none depends on another). Every object is closed: a key this contract does not declare is refused, never ignored, because an unknown key is either a typo or a field some other reader would silently drop. A later field is added here first, in the same change as its reader. Every time is a real calendar time, asserted field by field through `format` (see definitions.dateTime and definitions.date), never by shape alone, so each one parses and can be ordered. The canonical plan digest, which an approval binds, is defined in docs/contracts/advisor-plan-digest.md; its fixture corpus is docs/contracts/advisor-plan-digest.fixture.json. CODE RULES (issue #1178). The keywords above cannot relate one field to another, so the rules below are defined here, once, and checked in code by each of those packages after the schema passes; a plan that breaks one is invalid exactly as a plan that breaks the schema is, and so has no digest. Their shared corpus is docs/contracts/advisor-plan-rules.fixture.json, and each of them is tested against every plan case in it. A refusal names the rule and the position of the field at fault (for example staffing[1].repository), never its value. R1: no two staffing entries name the same repository; repository ids compare case-insensitively, as the repository inventory compares them. R2: when staffing is present, every staffing[].roles entry is one of mandate.roles, and every mandate.roles entry that is not a hub-only role (definitions.hubOnlyRoles) appears in at least one staffing entry. R3: every packages[].repository is spelled exactly as some staffing[].repository. R4: no two packages share a planItem. R5: no two packages share both a repository (compared case-insensitively) and a name; when R1 and R3 both hold (staffing ids are distinct case-insensitively, and every package's repository is spelled exactly as one of them), the case-insensitive comparison changes nothing, and it keeps R5 true on its own when either does not. R6: resolution is present exactly when packages is present. R7: no two kits share an id. R8: no role appears twice in one staffing entry's roles. R9: no role appears twice in mandate.roles. R10: a repository has at most one pin-starter act (repositories compared case-insensitively), and a pin-starter act's placement is devDependencies. R11: no staffing[].roles entry is a hub-only role (definitions.hubOnlyRoles). A hub-only role may be in mandate.roles and works from the hub, but it is never staffed in a repository, so no package act installs its package there; Advisor's package resolution also refuses a staffed hub-only role (hub-only-package), but R11 refuses such a plan first, because resolution reads only a valid plan. So a plan whose mandate.roles are all hub-only roles does no work in any product repository: it has no staffing (an empty staffing is refused by minItems, and any entry would break R2 or R11), and so it has no packages. R12: every packages[].planItem is exactly that act's repository, a colon and its name, in the same letter case. So a planItem carries no plan text, and it is the key the repository change set (C16) and the installed-state ledger (L10) use. APPROVAL BINDING. An approval binds bytes only through decisions[].subjectDigest. The latest decision is found by `at` as described under `decisions`; it approves something only when it has chosen \"approved\" and carries a subjectDigest, and the subject it approves is that digest, which names the exact change the approver was shown. When several decisions share the latest instant, they approve only if every one of them has chosen \"approved\" with the same subjectDigest; when any decision time does not parse, nothing is approved. An approval with no subjectDigest binds nothing. FREEZE. From an approving decision until every repository it covers has been applied, or a new plan replaces it, Advisor changes no field the plan digest covers. Recording the approval appends a decision and may update asOf, and the digest excludes both, so the digest at approval equals the digest at apply. DELEGATED COPY APPROVAL (issue #1586). delegatedCopyApproval declares that copy a delegate approved is accepted on production. It grants that only through an approval that binds this plan: @clossys/writer accepts it only when the plan it is given validates (schema and code rules), declares delegatedCopyApproval, and has a latest decision, found as APPROVAL BINDING describes, that has chosen \"approved\" with a subjectDigest equal to this plan's own canonical digest. When scopes is present, only an entry whose id is inside one of those namespaces is covered. The digest covers delegatedCopyApproval, so adding it, removing it or changing its scopes after an approval leaves the plan unapproved for this purpose until a new approval names the new digest. An approval whose subjectDigest names anything other than this plan's digest, such as another plan or an apply bundle, grants nothing here.",
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": [
15
+ "schemaVersion",
16
+ "asOf",
17
+ "mandate",
18
+ "whereWeAre",
19
+ "recommendedNext",
20
+ "decisions",
21
+ "blockers"
22
+ ],
23
+ "properties": {
24
+ "schemaVersion": {
25
+ "const": 1
26
+ },
27
+ "asOf": {
28
+ "$ref": "#/definitions/dateTime",
29
+ "description": "When this plan record was last written. Excluded from the canonical plan digest."
30
+ },
31
+ "mandate": {
32
+ "$ref": "#/definitions/mandate"
33
+ },
34
+ "whereWeAre": {
35
+ "type": "array",
36
+ "description": "A few plain-language status lines.",
37
+ "items": {
38
+ "$ref": "#/definitions/nonBlankString"
39
+ }
40
+ },
41
+ "recommendedNext": {
42
+ "description": "The one pending step for the whole plan, or null once nothing is pending.",
43
+ "oneOf": [
44
+ {
45
+ "type": "null"
46
+ },
47
+ {
48
+ "$ref": "#/definitions/recommendedNext"
49
+ }
50
+ ]
51
+ },
52
+ "decisions": {
53
+ "type": "array",
54
+ "description": "What was recommended, what was chosen, when, and by whom. The latest decision is the entry with the latest `at`, never the last one in the array; it approves the plan only when it has chosen \"approved\", and it binds an approval to bytes only through its subjectDigest (see APPROVAL BINDING in this contract's description). Append a decision; never rewrite an earlier one. Excluded from the canonical plan digest, because an approval is itself recorded here.",
55
+ "items": {
56
+ "$ref": "#/definitions/decision"
57
+ }
58
+ },
59
+ "blockers": {
60
+ "type": "array",
61
+ "items": {
62
+ "$ref": "#/definitions/blocker"
63
+ }
64
+ },
65
+ "kits": {
66
+ "type": "array",
67
+ "minItems": 1,
68
+ "description": "Optional. The kits Advisor recommends for this plan. Code rule R7.",
69
+ "items": {
70
+ "$ref": "#/definitions/kit"
71
+ }
72
+ },
73
+ "staffing": {
74
+ "type": "array",
75
+ "minItems": 1,
76
+ "description": "Optional. Which roles work in which repository: one entry per repository, named by its repository inventory id, never a URL or a path. Code rules R1, R2, R8 and R11.",
77
+ "items": {
78
+ "$ref": "#/definitions/staffingEntry"
79
+ }
80
+ },
81
+ "packages": {
82
+ "type": "array",
83
+ "minItems": 1,
84
+ "description": "Optional. The exact package acts this plan authorizes, each one version and one integrity value, never a range or a tag. Code rules R3, R4, R5, R6 and R10.",
85
+ "items": {
86
+ "$ref": "#/definitions/packageAct"
87
+ }
88
+ },
89
+ "resolution": {
90
+ "$ref": "#/definitions/resolution",
91
+ "description": "Optional. Where the exact versions in packages came from. Code rule R6."
92
+ },
93
+ "delegatedCopyApproval": {
94
+ "$ref": "#/definitions/delegatedCopyApproval",
95
+ "description": "Optional (issue #1586). Declares that copy a delegate approved is accepted on production, in every copy entry-id namespace or only in scopes. @clossys/writer reads it only through an approval that binds this plan: see DELEGATED COPY APPROVAL in this contract's description. The plan digest covers it, so FREEZE applies to it."
96
+ }
97
+ },
98
+ "definitions": {
99
+ "nonBlankString": {
100
+ "title": "a string with at least one non-whitespace character",
101
+ "type": "string",
102
+ "pattern": "\\S"
103
+ },
104
+ "dateTime": {
105
+ "title": "a real ISO 8601 date-time with a time zone, such as 2026-09-24T12:00:00Z",
106
+ "description": "format date-time, asserted field by field: YYYY-MM-DDThh:mm, optional :ss and fraction, then Z or +hh:mm/-hh:mm. Month 01-12; a day that exists in that month of that year (leap years included); hours 00-23; minutes and seconds 00-59 (no leap second); offset hours 00-23 and minutes 00-59; and Date.parse must give a finite time. So 2026-02-30, 2026-09-24T24:30:00Z and +24:00 are refused, and every accepted time can be ordered.",
107
+ "type": "string",
108
+ "format": "date-time"
109
+ },
110
+ "date": {
111
+ "title": "a real ISO 8601 date such as 2026-09-24",
112
+ "description": "format date, asserted field by field: YYYY-MM-DD with month 01-12 and a day that exists in that month of that year (leap years included), and a finite Date.parse.",
113
+ "type": "string",
114
+ "format": "date"
115
+ },
116
+ "dateOrDateTime": {
117
+ "title": "a real ISO 8601 date such as 2026-09-24, or a date-time with a time zone such as 2026-09-24T12:00:00Z",
118
+ "oneOf": [
119
+ {
120
+ "$ref": "#/definitions/date"
121
+ },
122
+ {
123
+ "$ref": "#/definitions/dateTime"
124
+ }
125
+ ]
126
+ },
127
+ "mandate": {
128
+ "type": "object",
129
+ "additionalProperties": false,
130
+ "required": [
131
+ "problem",
132
+ "primaryProblemId",
133
+ "roles"
134
+ ],
135
+ "properties": {
136
+ "problem": {
137
+ "$ref": "#/definitions/nonBlankString",
138
+ "description": "The client's problem, in their own words."
139
+ },
140
+ "primaryProblemId": {
141
+ "$ref": "#/definitions/nonBlankString"
142
+ },
143
+ "roles": {
144
+ "type": "array",
145
+ "items": {
146
+ "$ref": "#/definitions/nonBlankString"
147
+ }
148
+ }
149
+ }
150
+ },
151
+ "recommendedNext": {
152
+ "type": "object",
153
+ "additionalProperties": false,
154
+ "required": [
155
+ "action",
156
+ "owner"
157
+ ],
158
+ "properties": {
159
+ "action": {
160
+ "$ref": "#/definitions/nonBlankString"
161
+ },
162
+ "owner": {
163
+ "$ref": "#/definitions/nonBlankString"
164
+ },
165
+ "due": {
166
+ "$ref": "#/definitions/dateOrDateTime",
167
+ "description": "Optional."
168
+ }
169
+ }
170
+ },
171
+ "decision": {
172
+ "type": "object",
173
+ "additionalProperties": false,
174
+ "required": [
175
+ "at",
176
+ "recommended",
177
+ "chosen",
178
+ "by"
179
+ ],
180
+ "properties": {
181
+ "at": {
182
+ "$ref": "#/definitions/dateTime"
183
+ },
184
+ "recommended": {
185
+ "$ref": "#/definitions/nonBlankString"
186
+ },
187
+ "chosen": {
188
+ "$ref": "#/definitions/nonBlankString"
189
+ },
190
+ "by": {
191
+ "$ref": "#/definitions/nonBlankString"
192
+ },
193
+ "subjectDigest": {
194
+ "$ref": "#/definitions/sha256Digest",
195
+ "description": "Optional. On an approving decision, the digest of the exact change the approver was shown. An approval without it binds nothing (see APPROVAL BINDING in this contract's description)."
196
+ }
197
+ }
198
+ },
199
+ "sha256Digest": {
200
+ "title": "sha256: followed by 64 lowercase hexadecimal digits",
201
+ "type": "string",
202
+ "pattern": "^sha256:[0-9a-f]{64}$"
203
+ },
204
+ "sha512Integrity": {
205
+ "title": "one sha512 integrity value: sha512- followed by the canonical base64 of 64 bytes (88 characters ending in ==)",
206
+ "description": "Canonical base64 only: the last character before == carries two bits of data and four zero bits, so it is one of A, Q, g or w. Any other character there would decode to the same bytes as one of those, so a second spelling of one value is refused.",
207
+ "type": "string",
208
+ "pattern": "^sha512-[A-Za-z0-9+/]{85}[AQgw]==$"
209
+ },
210
+ "exactVersion": {
211
+ "title": "an exact release version such as 1.2.3, with no range, tag, prerelease or build suffix, and at most 16 digits in each part",
212
+ "description": "Each part is 0 or has no leading zero, and has at most 16 digits, the longest numeric part semver accepts.",
213
+ "type": "string",
214
+ "pattern": "^(0|[1-9][0-9]{0,15})\\.(0|[1-9][0-9]{0,15})\\.(0|[1-9][0-9]{0,15})$"
215
+ },
216
+ "repositoryId": {
217
+ "title": "a repository inventory id: a bare repository name, or owner/name",
218
+ "description": "The repository inventory's id rule (docs/contracts/repository-inventory.json) as one pattern: an optional GitHub owner (letters, digits and single inner hyphens, at most 39 characters) and a slash, then a repository name of letters, digits, '.', '_' and '-' that is not exactly '.' or '..'. No whitespace, no empty segment, at most one slash.",
219
+ "type": "string",
220
+ "pattern": "^(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?/)?(?!\\.\\.?$)[A-Za-z0-9._-]+$"
221
+ },
222
+ "packageName": {
223
+ "title": "a scoped package name in lowercase, such as @scope/name, of at most 214 characters",
224
+ "description": "npm's limit is 214 characters, asserted by the lookahead because the checker has no maxLength. Neither the scope nor the name may start with '.', '_' or '-'.",
225
+ "type": "string",
226
+ "pattern": "^(?=.{1,214}$)@[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$"
227
+ },
228
+ "kit": {
229
+ "type": "object",
230
+ "additionalProperties": false,
231
+ "required": [
232
+ "id",
233
+ "source",
234
+ "verdict"
235
+ ],
236
+ "properties": {
237
+ "id": {
238
+ "$ref": "#/definitions/nonBlankString",
239
+ "description": "The kit's id: a curated preset's id, or the id Advisor gave a composed kit."
240
+ },
241
+ "source": {
242
+ "enum": [
243
+ "preset",
244
+ "composed"
245
+ ]
246
+ },
247
+ "verdict": {
248
+ "enum": [
249
+ "recommended"
250
+ ],
251
+ "description": "One value for now. A later verdict widens this list, and a reader that predates it refuses the new value rather than guessing its meaning."
252
+ }
253
+ }
254
+ },
255
+ "staffingEntry": {
256
+ "type": "object",
257
+ "additionalProperties": false,
258
+ "required": [
259
+ "repository",
260
+ "roles"
261
+ ],
262
+ "properties": {
263
+ "repository": {
264
+ "$ref": "#/definitions/repositoryId"
265
+ },
266
+ "roles": {
267
+ "type": "array",
268
+ "minItems": 1,
269
+ "description": "Role directories (short names) staffed in this repository, in the order the brief lists them.",
270
+ "items": {
271
+ "$ref": "#/definitions/nonBlankString"
272
+ }
273
+ }
274
+ }
275
+ },
276
+ "hubOnlyRoles": {
277
+ "title": "the roles whose package lives in the engagement hub only",
278
+ "description": "Data, not a schema that any field uses: the list code rules R2 and R11 read, so that every package that validates a plan reads the one list. The apply-approved-plan RFC (issue #1178) places each role here in the hub: its package is pinned exactly once, in the hub, and a product repository runs its commands through npx at the hub's exact version, pinning nothing. Advisor is placed there by decision D24 and Integrator by decision D23; Launcher's hub skeleton and resume pin both Advisor and Integrator, exactly, in the hub's devDependencies. Such a role is never staffed in a repository (R11).",
279
+ "const": [
280
+ "advisor",
281
+ "integrator"
282
+ ]
283
+ },
284
+ "packageAct": {
285
+ "type": "object",
286
+ "additionalProperties": false,
287
+ "required": [
288
+ "planItem",
289
+ "repository",
290
+ "act",
291
+ "name",
292
+ "version",
293
+ "integrity",
294
+ "placement"
295
+ ],
296
+ "properties": {
297
+ "planItem": {
298
+ "$ref": "#/definitions/nonBlankString",
299
+ "description": "The act's repository, a colon and its name, exactly (R12); unique in the plan (R4)."
300
+ },
301
+ "repository": {
302
+ "$ref": "#/definitions/repositoryId",
303
+ "description": "One of staffing[].repository, spelled exactly the same (R3)."
304
+ },
305
+ "act": {
306
+ "enum": [
307
+ "install",
308
+ "pin-starter"
309
+ ],
310
+ "description": "install adds a role's package; pin-starter pins the package that checks this repository's pull requests, at most once per repository and always as a devDependency (R10). A later act widens this list, and a reader that predates it refuses the new value."
311
+ },
312
+ "name": {
313
+ "$ref": "#/definitions/packageName"
314
+ },
315
+ "version": {
316
+ "$ref": "#/definitions/exactVersion"
317
+ },
318
+ "integrity": {
319
+ "$ref": "#/definitions/sha512Integrity"
320
+ },
321
+ "placement": {
322
+ "enum": [
323
+ "dependencies",
324
+ "devDependencies"
325
+ ]
326
+ }
327
+ }
328
+ },
329
+ "resolution": {
330
+ "type": "object",
331
+ "additionalProperties": false,
332
+ "required": [
333
+ "snapshotDigest"
334
+ ],
335
+ "properties": {
336
+ "snapshotDigest": {
337
+ "$ref": "#/definitions/sha256Digest",
338
+ "description": "The digest of the registry snapshot the exact versions and integrity values in packages were read from."
339
+ }
340
+ }
341
+ },
342
+ "delegatedCopyApproval": {
343
+ "type": "object",
344
+ "additionalProperties": false,
345
+ "required": [
346
+ "target"
347
+ ],
348
+ "properties": {
349
+ "target": {
350
+ "enum": [
351
+ "production"
352
+ ],
353
+ "description": "The resolution target on which a delegate's approval is accepted. One value for now: a delegate's approval already resolves on preview with no declaration. A later target widens this list, and a reader that predates it refuses the new value rather than guessing its meaning."
354
+ },
355
+ "scopes": {
356
+ "type": "array",
357
+ "minItems": 1,
358
+ "description": "Optional. The copy entry-id namespaces this declaration covers: an entry is covered when its id equals an item or starts with the item and a dot, so site.home covers site.home and site.home.title but not site.homepage.title. Absent, it covers every entry. An empty list is refused (omit the member instead). A repeated item is redundant, not refused.",
359
+ "items": {
360
+ "$ref": "#/definitions/copyDelegateScope"
361
+ }
362
+ }
363
+ }
364
+ },
365
+ "copyDelegateScope": {
366
+ "title": "a copy entry-id namespace such as home or site.home: dot-separated segments of lowercase letters and digits with single inner hyphens, and no wildcard",
367
+ "description": "The same rule as @clossys/writer's delegate scope item: one or more segments separated by single dots, each one or more lowercase ASCII letters or digits, with single hyphens only between them.",
368
+ "type": "string",
369
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*(\\.[a-z0-9]+(-[a-z0-9]+)*)*$"
370
+ },
371
+ "blockerKind": {
372
+ "description": "The five blocker kinds of the Controller loop record (docs/contracts/loop.json), in their fixed order.",
373
+ "enum": [
374
+ "missing-input",
375
+ "missing-authority",
376
+ "failing-evidence",
377
+ "unavailable-environment",
378
+ "contradiction"
379
+ ]
380
+ },
381
+ "blocker": {
382
+ "type": "object",
383
+ "description": "One capability at rest with exactly one next action. Field for field the same shape as the Controller loop record's Blocker.",
384
+ "additionalProperties": false,
385
+ "required": [
386
+ "capabilityId",
387
+ "kind",
388
+ "owner",
389
+ "nextAction",
390
+ "since"
391
+ ],
392
+ "properties": {
393
+ "capabilityId": {
394
+ "$ref": "#/definitions/nonBlankString"
395
+ },
396
+ "kind": {
397
+ "$ref": "#/definitions/blockerKind"
398
+ },
399
+ "owner": {
400
+ "$ref": "#/definitions/nonBlankString"
401
+ },
402
+ "nextAction": {
403
+ "type": "object",
404
+ "additionalProperties": false,
405
+ "required": [
406
+ "who",
407
+ "how",
408
+ "byWhen"
409
+ ],
410
+ "properties": {
411
+ "who": {
412
+ "$ref": "#/definitions/nonBlankString"
413
+ },
414
+ "how": {
415
+ "$ref": "#/definitions/nonBlankString"
416
+ },
417
+ "byWhen": {
418
+ "$ref": "#/definitions/dateOrDateTime"
419
+ }
420
+ }
421
+ },
422
+ "since": {
423
+ "$ref": "#/definitions/dateTime",
424
+ "description": "When the blocker was recorded."
425
+ }
426
+ }
427
+ }
428
+ }
429
+ };
430
+ //# sourceMappingURL=advisor-plan-contract.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advisor-plan-contract.generated.js","sourceRoot":"","sources":["../../src/generated/advisor-plan-contract.generated.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,4EAA4E;AAC5E,6EAA6E;AAC7E,2EAA2E;AAC3E,iCAAiC;AAEjC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,qBAAqB,GAAsC;IACtE,SAAS,EAAE,yCAAyC;IACpD,KAAK,EAAE,+EAA+E;IACtF,OAAO,EAAE,cAAc;IACvB,aAAa,EAAE,k1KAAk1K;IACj2K,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,eAAe;QACf,MAAM;QACN,SAAS;QACT,YAAY;QACZ,iBAAiB;QACjB,WAAW;QACX,UAAU;KACX;IACD,YAAY,EAAE;QACZ,eAAe,EAAE;YACf,OAAO,EAAE,CAAC;SACX;QACD,MAAM,EAAE;YACN,MAAM,EAAE,wBAAwB;YAChC,aAAa,EAAE,kFAAkF;SAClG;QACD,SAAS,EAAE;YACT,MAAM,EAAE,uBAAuB;SAChC;QACD,YAAY,EAAE;YACZ,MAAM,EAAE,OAAO;YACf,aAAa,EAAE,oCAAoC;YACnD,OAAO,EAAE;gBACP,MAAM,EAAE,8BAA8B;aACvC;SACF;QACD,iBAAiB,EAAE;YACjB,aAAa,EAAE,2EAA2E;YAC1F,OAAO,EAAE;gBACP;oBACE,MAAM,EAAE,MAAM;iBACf;gBACD;oBACE,MAAM,EAAE,+BAA+B;iBACxC;aACF;SACF;QACD,WAAW,EAAE;YACX,MAAM,EAAE,OAAO;YACf,aAAa,EAAE,6cAA6c;YAC5d,OAAO,EAAE;gBACP,MAAM,EAAE,wBAAwB;aACjC;SACF;QACD,UAAU,EAAE;YACV,MAAM,EAAE,OAAO;YACf,OAAO,EAAE;gBACP,MAAM,EAAE,uBAAuB;aAChC;SACF;QACD,MAAM,EAAE;YACN,MAAM,EAAE,OAAO;YACf,UAAU,EAAE,CAAC;YACb,aAAa,EAAE,oEAAoE;YACnF,OAAO,EAAE;g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AAO,EAAE;wBACP,MAAM,EAAE,iCAAiC;qBAC1C;iBACF;aACF;SACF;QACD,mBAAmB,EAAE;YACnB,OAAO,EAAE,wJAAwJ;YACjK,aAAa,EAAE,mMAAmM;YAClN,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,sDAAsD;SAClE;QACD,aAAa,EAAE;YACb,aAAa,EAAE,wGAAwG;YACvH,MAAM,EAAE;gBACN,eAAe;gBACf,mBAAmB;gBACnB,kBAAkB;gBAClB,yBAAyB;gBACzB,eAAe;aAChB;SACF;QACD,SAAS,EAAE;YACT,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,8HAA8H;YAC7I,sBAAsB,EAAE,KAAK;YAC7B,UAAU,EAAE;gBACV,cAAc;gBACd,MAAM;gBACN,OAAO;gBACP,YAAY;gBACZ,OAAO;aACR;YACD,YAAY,EAAE;gBACZ,cAAc,EAAE;oBACd,MAAM,EAAE,8BAA8B;iBACvC;gBACD,MAAM,EAAE;oBACN,MAAM,EAAE,2BAA2B;iBACpC;gBACD,OAAO,EAAE;oBACP,MAAM,EAAE,8BAA8B;iBACvC;gBACD,YAAY,EAAE;oBACZ,MAAM,EAAE,QAAQ;oBAChB,sBAAsB,EAAE,KAAK;oBAC7B,UAAU,EAAE;wBACV,KAAK;wBACL,KAAK;wBACL,QAAQ;qBACT;oBACD,YAAY,EAAE;wBACZ,KAAK,EAAE;4BACL,MAAM,EAAE,8BAA8B;yBACvC;wBACD,KAAK,EAAE;4BACL,MAAM,EAAE,8BAA8B;yBACvC;wBACD,QAAQ,EAAE;4BACR,MAAM,EAAE,8BAA8B;yBACvC;qBACF;iBACF;gBACD,OAAO,EAAE;oBACP,MAAM,EAAE,wBAAwB;oBAChC,aAAa,EAAE,gCAAgC;iBAChD;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * A minimal JSON Schema (draft-07) checker for this repository's shared
3
+ * contracts (issue #1475): the plan record and the engagement brief, which
4
+ * two packages validate against without either depending on the other.
5
+ *
6
+ * It implements exactly the keywords those contracts use, and throws on any
7
+ * other keyword, or keyword form, it meets instead of half-checking it.
8
+ * `assertImplementedContract()` walks a whole contract, so a test can prove
9
+ * every subschema is implemented, visited by a value or not. Property
10
+ * lookups use Object.hasOwn, so an inherited name (toString, constructor,
11
+ * __proto__) is never mistaken for a declared or present property.
12
+ *
13
+ * Messages, paths and errors never echo text from the document under test
14
+ * -- neither a value nor a key. A brief can carry founder text, a refusal
15
+ * can end up in a log, and these messages are read by agents: a hostile
16
+ * document can put prompt-injection text in a key name as easily as in a
17
+ * value. A path names only fields the contract declares (schema text, not
18
+ * document text) and array indices. A field the contract does not declare,
19
+ * or a repeated key, is reported at the object that holds it, by the key's
20
+ * 1-based position in that object ("key 3 of this object"), never by name.
21
+ *
22
+ * Every string, and every object key, must be well-formed Unicode: a lone
23
+ * surrogate is refused whatever the contract says, because it has no UTF-8
24
+ * encoding and so no canonical form. A document this checker accepts can
25
+ * always be digested.
26
+ *
27
+ * `readContractDocument()` is the one way to turn a plan or brief FILE into
28
+ * a value: it refuses bytes that are not valid UTF-8 and any object that
29
+ * repeats a key, at any depth. `JSON.parse` alone would silently keep the
30
+ * last of two duplicate keys, so a reviewer reading the file could see a
31
+ * value that is not the one validated and digested.
32
+ *
33
+ * This file imports nothing. It is the one implementation: a package that
34
+ * cannot import it carries a generated, byte-identical copy.
35
+ */
36
+ export type ContractSchema = Readonly<Record<string, unknown>>;
37
+ /**
38
+ * One place a value breaks its contract. `path` is `""` for the document
39
+ * itself, else like `blockers[0].nextAction.who`: only names the contract
40
+ * declares, and array indices. Neither `path` nor `message` ever carries
41
+ * document text.
42
+ */
43
+ export interface ContractViolation {
44
+ readonly path: string;
45
+ readonly message: string;
46
+ }
47
+ /** Resolves a file-level `$ref` (for example `engagement-context.json`) to that contract. Throws when it cannot. */
48
+ export type ContractLoader = (name: string) => ContractSchema;
49
+ /** Walks every subschema of `schema`, visited by a value or not, and throws on the first keyword this checker does not implement. */
50
+ export declare function assertImplementedContract(schema: ContractSchema, at?: string): void;
51
+ /**
52
+ * Every violation of `value` against `contract`; empty when it conforms. A
53
+ * type mismatch stops there and returns alone, since every other keyword
54
+ * assumes the value is already the right type. Otherwise, on an object, any
55
+ * `const` or `enum` violation of the object itself comes before a missing
56
+ * required field, which comes before each present key's violations in the
57
+ * order the keys were written (see `keyOrder()`), then any from `oneOf`,
58
+ * `allOf` and `not`. Never throws for a bad value. Throws only when the
59
+ * contract itself uses a keyword this checker does not implement, or a
60
+ * `$ref` it cannot resolve -- a defect in the contract, not in the value.
61
+ */
62
+ export declare function validateAgainstContract(contract: ContractSchema, value: unknown, load: ContractLoader): ContractViolation[];
63
+ /** `label.path message` (for example `plan.blockers[0].capabilityId is required`), or `label message` for the document itself. */
64
+ export declare function formatContractViolation(label: string, violation: ContractViolation): string;
65
+ /**
66
+ * Why `readContractDocument()` refused a file, as data a caller can act on
67
+ * without parsing the message: `reason` says which rule failed, and
68
+ * `position` (never file text) is set only for a syntax error or a leading
69
+ * byte order mark. The message carries no file text either: a repeated key
70
+ * is named by its 1-based position in its object, and that object as the
71
+ * top-level object or by its position, never by any key.
72
+ *
73
+ * A position, here and in every message, is a 0-based index into the
74
+ * decoded text in UTF-16 code units: JavaScript's string index. It equals
75
+ * the byte offset only for ASCII text; a character outside the Basic
76
+ * Multilingual Plane (an emoji, say) counts as two.
77
+ */
78
+ export declare class ContractDocumentError extends Error {
79
+ readonly reason: "encoding" | "syntax" | "repeated-key";
80
+ readonly position?: number | undefined;
81
+ constructor(message: string, reason: "encoding" | "syntax" | "repeated-key", position?: number | undefined);
82
+ }
83
+ /**
84
+ * Reads a plan or brief file's bytes as strict JSON: UTF-8 that decodes
85
+ * without error (never silently replaced with U+FFFD) and does not start
86
+ * with a byte order mark, exactly one JSON value, and no object that repeats a key at any depth -- the I-JSON rules
87
+ * RFC 8785 canonicalization assumes. Refuses bytes that break a rule with a
88
+ * ContractDocumentError whose message says which rule, by position only: a
89
+ * syntax error by its position (a UTF-16 code-unit index, see
90
+ * ContractDocumentError), a repeated key by its 1-based position in its
91
+ * object and that object's position (or "the top-level object") -- never
92
+ * any text from the file. It does not validate the value against a contract; call
93
+ * `validateAgainstContract()` next, which then numbers an undeclared field
94
+ * by its position as written in the file.
95
+ */
96
+ export declare function readContractDocument(bytes: Uint8Array): unknown;
97
+ //# sourceMappingURL=contract-schema.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-schema.generated.d.ts","sourceRoot":"","sources":["../../src/generated/contract-schema.generated.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,oHAAoH;AACpH,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,cAAc,CAAC;AAkE9D,qIAAqI;AACrI,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,SAAM,GAAG,IAAI,CAShF;AA+LD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,GAAG,iBAAiB,EAAE,CAE3H;AAED,kIAAkI;AAClI,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,MAAM,CAG3F;AAQD;;;;;;;;;;;;GAYG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAG5C,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,cAAc;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM;gBAF1B,OAAO,EAAE,MAAM,EACN,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,cAAc,EAC9C,QAAQ,CAAC,EAAE,MAAM,YAAA;CAI7B;AA2HD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAY/D"}