@clossys/launcher 0.3.0 → 0.4.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 (286) hide show
  1. package/README.md +1328 -60
  2. package/contracts/conversation-contract.md +2 -1
  3. package/contracts/product-ci-workflow.yml +74 -0
  4. package/contracts/repository-inventory.json +53 -0
  5. package/dist/admission-fixture.d.ts +168 -0
  6. package/dist/admission-fixture.d.ts.map +1 -0
  7. package/dist/admission-fixture.js +453 -0
  8. package/dist/admission-fixture.js.map +1 -0
  9. package/dist/admission.d.ts +124 -0
  10. package/dist/admission.d.ts.map +1 -0
  11. package/dist/admission.js +799 -0
  12. package/dist/admission.js.map +1 -0
  13. package/dist/agents-guide.d.ts +9 -0
  14. package/dist/agents-guide.d.ts.map +1 -0
  15. package/dist/agents-guide.js +26 -0
  16. package/dist/agents-guide.js.map +1 -0
  17. package/dist/apply-command-options.check.d.ts +12 -0
  18. package/dist/apply-command-options.check.d.ts.map +1 -0
  19. package/dist/apply-command-options.check.js +20 -0
  20. package/dist/apply-command-options.check.js.map +1 -0
  21. package/dist/apply-plan-cli.d.ts +39 -1
  22. package/dist/apply-plan-cli.d.ts.map +1 -1
  23. package/dist/apply-plan-cli.js +432 -15
  24. package/dist/apply-plan-cli.js.map +1 -1
  25. package/dist/apply-plan.d.ts +46 -59
  26. package/dist/apply-plan.d.ts.map +1 -1
  27. package/dist/apply-plan.js +112 -97
  28. package/dist/apply-plan.js.map +1 -1
  29. package/dist/apply-step-fixture.d.ts +87 -0
  30. package/dist/apply-step-fixture.d.ts.map +1 -0
  31. package/dist/apply-step-fixture.js +199 -0
  32. package/dist/apply-step-fixture.js.map +1 -0
  33. package/dist/apply-store.d.ts +93 -0
  34. package/dist/apply-store.d.ts.map +1 -0
  35. package/dist/apply-store.js +625 -0
  36. package/dist/apply-store.js.map +1 -0
  37. package/dist/approval-sheet.d.ts +21 -0
  38. package/dist/approval-sheet.d.ts.map +1 -0
  39. package/dist/approval-sheet.js +157 -0
  40. package/dist/approval-sheet.js.map +1 -0
  41. package/dist/body-command.d.ts +42 -0
  42. package/dist/body-command.d.ts.map +1 -0
  43. package/dist/body-command.js +143 -0
  44. package/dist/body-command.js.map +1 -0
  45. package/dist/change-set-contract.d.ts +381 -0
  46. package/dist/change-set-contract.d.ts.map +1 -0
  47. package/dist/change-set-contract.js +738 -0
  48. package/dist/change-set-contract.js.map +1 -0
  49. package/dist/change-set-digest.d.ts +28 -0
  50. package/dist/change-set-digest.d.ts.map +1 -0
  51. package/dist/change-set-digest.js +65 -0
  52. package/dist/change-set-digest.js.map +1 -0
  53. package/dist/check-cli.d.ts.map +1 -1
  54. package/dist/check-cli.js +14 -3
  55. package/dist/check-cli.js.map +1 -1
  56. package/dist/cli.d.ts +17 -6
  57. package/dist/cli.d.ts.map +1 -1
  58. package/dist/cli.js +84 -23
  59. package/dist/cli.js.map +1 -1
  60. package/dist/core.d.ts +79 -22
  61. package/dist/core.d.ts.map +1 -1
  62. package/dist/core.js +843 -268
  63. package/dist/core.js.map +1 -1
  64. package/dist/dry-materialize.d.ts +63 -0
  65. package/dist/dry-materialize.d.ts.map +1 -0
  66. package/dist/dry-materialize.js +330 -0
  67. package/dist/dry-materialize.js.map +1 -0
  68. package/dist/generated/contract-schema.generated.d.ts +97 -0
  69. package/dist/generated/contract-schema.generated.d.ts.map +1 -0
  70. package/dist/generated/contract-schema.generated.js +496 -0
  71. package/dist/generated/contract-schema.generated.js.map +1 -0
  72. package/dist/generated/package-scope.generated.d.ts +6 -0
  73. package/dist/generated/package-scope.generated.d.ts.map +1 -0
  74. package/dist/generated/package-scope.generated.js +10 -0
  75. package/dist/generated/package-scope.generated.js.map +1 -0
  76. package/dist/generated/plan-contracts.generated.d.ts +3 -0
  77. package/dist/generated/plan-contracts.generated.d.ts.map +1 -0
  78. package/dist/generated/plan-contracts.generated.js +2840 -0
  79. package/dist/generated/plan-contracts.generated.js.map +1 -0
  80. package/dist/host.d.ts.map +1 -1
  81. package/dist/host.js +11 -0
  82. package/dist/host.js.map +1 -1
  83. package/dist/identity.d.ts +15 -0
  84. package/dist/identity.d.ts.map +1 -0
  85. package/dist/identity.js +48 -0
  86. package/dist/identity.js.map +1 -0
  87. package/dist/index.d.ts +34 -5
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +19 -2
  90. package/dist/index.js.map +1 -1
  91. package/dist/inventory-adoption.d.ts +24 -5
  92. package/dist/inventory-adoption.d.ts.map +1 -1
  93. package/dist/inventory-adoption.js +70 -25
  94. package/dist/inventory-adoption.js.map +1 -1
  95. package/dist/inventory-choice.d.ts +40 -0
  96. package/dist/inventory-choice.d.ts.map +1 -0
  97. package/dist/inventory-choice.js +156 -0
  98. package/dist/inventory-choice.js.map +1 -0
  99. package/dist/inventory-contract.d.ts +89 -0
  100. package/dist/inventory-contract.d.ts.map +1 -0
  101. package/dist/inventory-contract.js +121 -0
  102. package/dist/inventory-contract.js.map +1 -0
  103. package/dist/key-editor.d.ts +30 -0
  104. package/dist/key-editor.d.ts.map +1 -0
  105. package/dist/key-editor.js +445 -0
  106. package/dist/key-editor.js.map +1 -0
  107. package/dist/ledger-contract.d.ts +187 -0
  108. package/dist/ledger-contract.d.ts.map +1 -0
  109. package/dist/ledger-contract.js +532 -0
  110. package/dist/ledger-contract.js.map +1 -0
  111. package/dist/ledger-trust.d.ts +90 -0
  112. package/dist/ledger-trust.d.ts.map +1 -0
  113. package/dist/ledger-trust.js +198 -0
  114. package/dist/ledger-trust.js.map +1 -0
  115. package/dist/lockfile-invariants.d.ts +48 -0
  116. package/dist/lockfile-invariants.d.ts.map +1 -0
  117. package/dist/lockfile-invariants.js +375 -0
  118. package/dist/lockfile-invariants.js.map +1 -0
  119. package/dist/lockfile-readers.d.ts +72 -0
  120. package/dist/lockfile-readers.d.ts.map +1 -0
  121. package/dist/lockfile-readers.js +713 -0
  122. package/dist/lockfile-readers.js.map +1 -0
  123. package/dist/lockfile-regen.d.ts +106 -0
  124. package/dist/lockfile-regen.d.ts.map +1 -0
  125. package/dist/lockfile-regen.js +760 -0
  126. package/dist/lockfile-regen.js.map +1 -0
  127. package/dist/lockfile-tool-env.d.ts +29 -0
  128. package/dist/lockfile-tool-env.d.ts.map +1 -0
  129. package/dist/lockfile-tool-env.js +111 -0
  130. package/dist/lockfile-tool-env.js.map +1 -0
  131. package/dist/materialize.d.ts +113 -0
  132. package/dist/materialize.d.ts.map +1 -0
  133. package/dist/materialize.js +840 -0
  134. package/dist/materialize.js.map +1 -0
  135. package/dist/observe-repository.d.ts +90 -0
  136. package/dist/observe-repository.d.ts.map +1 -0
  137. package/dist/observe-repository.js +1367 -0
  138. package/dist/observe-repository.js.map +1 -0
  139. package/dist/plan-bundle-setup-fixture.d.ts +68 -0
  140. package/dist/plan-bundle-setup-fixture.d.ts.map +1 -0
  141. package/dist/plan-bundle-setup-fixture.js +167 -0
  142. package/dist/plan-bundle-setup-fixture.js.map +1 -0
  143. package/dist/plan-bundle.d.ts +250 -0
  144. package/dist/plan-bundle.d.ts.map +1 -0
  145. package/dist/plan-bundle.js +827 -0
  146. package/dist/plan-bundle.js.map +1 -0
  147. package/dist/plan-command.d.ts +29 -0
  148. package/dist/plan-command.d.ts.map +1 -0
  149. package/dist/plan-command.js +493 -0
  150. package/dist/plan-command.js.map +1 -0
  151. package/dist/plan-contract.d.ts +153 -0
  152. package/dist/plan-contract.d.ts.map +1 -0
  153. package/dist/plan-contract.js +61 -0
  154. package/dist/plan-contract.js.map +1 -0
  155. package/dist/plan-digest.d.ts +25 -0
  156. package/dist/plan-digest.d.ts.map +1 -0
  157. package/dist/plan-digest.js +106 -0
  158. package/dist/plan-digest.js.map +1 -0
  159. package/dist/plan-rules.d.ts +23 -0
  160. package/dist/plan-rules.d.ts.map +1 -0
  161. package/dist/plan-rules.js +177 -0
  162. package/dist/plan-rules.js.map +1 -0
  163. package/dist/planned-bundle.d.ts +20 -0
  164. package/dist/planned-bundle.d.ts.map +1 -0
  165. package/dist/planned-bundle.js +191 -0
  166. package/dist/planned-bundle.js.map +1 -0
  167. package/dist/product-repository.d.ts +4 -0
  168. package/dist/product-repository.d.ts.map +1 -1
  169. package/dist/product-repository.js +9 -1
  170. package/dist/product-repository.js.map +1 -1
  171. package/dist/provenance-gate.d.ts +48 -0
  172. package/dist/provenance-gate.d.ts.map +1 -0
  173. package/dist/provenance-gate.js +324 -0
  174. package/dist/provenance-gate.js.map +1 -0
  175. package/dist/pull-request-body.d.ts +45 -0
  176. package/dist/pull-request-body.d.ts.map +1 -0
  177. package/dist/pull-request-body.js +232 -0
  178. package/dist/pull-request-body.js.map +1 -0
  179. package/dist/registry-snapshot.d.ts +141 -0
  180. package/dist/registry-snapshot.d.ts.map +1 -0
  181. package/dist/registry-snapshot.js +483 -0
  182. package/dist/registry-snapshot.js.map +1 -0
  183. package/dist/release-age-edit.d.ts +52 -0
  184. package/dist/release-age-edit.d.ts.map +1 -0
  185. package/dist/release-age-edit.js +413 -0
  186. package/dist/release-age-edit.js.map +1 -0
  187. package/dist/root-entries.d.ts +36 -0
  188. package/dist/root-entries.d.ts.map +1 -0
  189. package/dist/root-entries.js +80 -0
  190. package/dist/root-entries.js.map +1 -0
  191. package/dist/setup-template-scripts.d.ts +34 -0
  192. package/dist/setup-template-scripts.d.ts.map +1 -0
  193. package/dist/setup-template-scripts.js +557 -0
  194. package/dist/setup-template-scripts.js.map +1 -0
  195. package/dist/setup-templates.d.ts +54 -0
  196. package/dist/setup-templates.d.ts.map +1 -0
  197. package/dist/setup-templates.js +427 -0
  198. package/dist/setup-templates.js.map +1 -0
  199. package/dist/skills.d.ts +34 -1
  200. package/dist/skills.d.ts.map +1 -1
  201. package/dist/skills.js +129 -17
  202. package/dist/skills.js.map +1 -1
  203. package/dist/status.d.ts +63 -0
  204. package/dist/status.d.ts.map +1 -0
  205. package/dist/status.js +539 -0
  206. package/dist/status.js.map +1 -0
  207. package/dist/types.d.ts +151 -13
  208. package/dist/types.d.ts.map +1 -1
  209. package/package.json +4 -5
  210. package/skeleton/README.md +14 -9
  211. package/skeleton/package.json +2 -1
  212. package/skill/SKILL.md +20 -16
  213. package/skill-catalogue/advisor/SKILL.md +100 -11
  214. package/skill-catalogue/architect/SKILL.md +2 -13
  215. package/skill-catalogue/bouncer/SKILL.md +2 -13
  216. package/skill-catalogue/builder/SKILL.md +2 -13
  217. package/skill-catalogue/butler/SKILL.md +2 -13
  218. package/skill-catalogue/controller/SKILL.md +2 -13
  219. package/skill-catalogue/customer/SKILL.md +4 -13
  220. package/skill-catalogue/designer/SKILL.md +9 -14
  221. package/skill-catalogue/giver/SKILL.md +2 -13
  222. package/skill-catalogue/influencer/SKILL.md +2 -13
  223. package/skill-catalogue/inspector/SKILL.md +2 -13
  224. package/skill-catalogue/integrator/SKILL.md +2 -13
  225. package/skill-catalogue/keeper/SKILL.md +2 -13
  226. package/skill-catalogue/launcher/SKILL.md +20 -16
  227. package/skill-catalogue/locksmith/SKILL.md +2 -13
  228. package/skill-catalogue/messenger/SKILL.md +2 -13
  229. package/skill-catalogue/observer/SKILL.md +2 -13
  230. package/skill-catalogue/publisher/SKILL.md +11 -17
  231. package/skill-catalogue/starter/SKILL.md +3 -13
  232. package/skill-catalogue/strategist/SKILL.md +14 -17
  233. package/skill-catalogue/writer/SKILL.md +7 -14
  234. package/src/admission-fixture.ts +572 -0
  235. package/src/admission.ts +816 -0
  236. package/src/agents-guide.ts +29 -0
  237. package/src/apply-command-options.check.ts +27 -0
  238. package/src/apply-plan-cli.ts +454 -14
  239. package/src/apply-plan.ts +112 -124
  240. package/src/apply-step-fixture.ts +236 -0
  241. package/src/apply-store.ts +584 -0
  242. package/src/approval-sheet.ts +164 -0
  243. package/src/body-command.ts +162 -0
  244. package/src/change-set-contract.ts +937 -0
  245. package/src/change-set-digest.ts +70 -0
  246. package/src/check-cli.ts +14 -3
  247. package/src/cli.ts +90 -22
  248. package/src/core.ts +973 -275
  249. package/src/dry-materialize.ts +353 -0
  250. package/src/generated/contract-schema.generated.ts +520 -0
  251. package/src/generated/package-scope.generated.ts +10 -0
  252. package/src/generated/plan-contracts.generated.ts +2840 -0
  253. package/src/host.ts +10 -0
  254. package/src/identity.ts +51 -0
  255. package/src/index.ts +72 -3
  256. package/src/inventory-adoption.ts +107 -29
  257. package/src/inventory-choice.ts +172 -0
  258. package/src/inventory-contract.ts +166 -0
  259. package/src/key-editor.ts +446 -0
  260. package/src/ledger-contract.ts +637 -0
  261. package/src/ledger-trust.ts +267 -0
  262. package/src/lockfile-invariants.ts +421 -0
  263. package/src/lockfile-readers.ts +749 -0
  264. package/src/lockfile-regen.ts +851 -0
  265. package/src/lockfile-tool-env.ts +131 -0
  266. package/src/materialize.ts +886 -0
  267. package/src/observe-repository.ts +1365 -0
  268. package/src/plan-bundle-setup-fixture.ts +200 -0
  269. package/src/plan-bundle.ts +964 -0
  270. package/src/plan-command.ts +509 -0
  271. package/src/plan-contract.ts +179 -0
  272. package/src/plan-digest.ts +102 -0
  273. package/src/plan-rules.ts +188 -0
  274. package/src/planned-bundle.ts +211 -0
  275. package/src/product-repository.ts +10 -1
  276. package/src/provenance-gate.ts +352 -0
  277. package/src/pull-request-body.ts +261 -0
  278. package/src/registry-snapshot.ts +534 -0
  279. package/src/release-age-edit.ts +430 -0
  280. package/src/root-entries.ts +81 -0
  281. package/src/setup-template-scripts.ts +571 -0
  282. package/src/setup-templates.ts +471 -0
  283. package/src/skills.ts +161 -18
  284. package/src/status.ts +557 -0
  285. package/src/types.ts +148 -13
  286. package/CHANGELOG.md +0 -131
@@ -0,0 +1,381 @@
1
+ import type { ValidationResult } from "./plan-contract.js";
2
+ export type RepositoryVisibility = "private" | "internal" | "public";
3
+ export type ChangeSetPhase = "setup" | "apply";
4
+ export type PackageManagerKind = "npm" | "pnpm" | "yarn" | "none";
5
+ export type LockfileName = "package-lock.json" | "pnpm-lock.yaml" | "yarn.lock" | "none";
6
+ export type ReleaseAgeSurfaceKind = "pnpm-workspace" | "yarnrc" | "npmrc";
7
+ /** The surfaces an exempt-release-age item can write: npm has no exemption key, so never .npmrc. */
8
+ export type ExemptionSurfaceKind = "pnpm-workspace" | "yarnrc";
9
+ export type DependencyPlacement = "dependencies" | "devDependencies";
10
+ /** A discovery root: a directory agent hosts read skills from, holding a link to each composed skill. */
11
+ export type DiscoveryRoot = ".claude/skills" | ".cursor/skills";
12
+ export type WriteRecordSource = "engagement-brief" | "agents-pointer" | "claude-loader" | "agents-guide";
13
+ /** One exact package: one version and one sha512 integrity value. */
14
+ export interface PinnedPackage {
15
+ readonly name: string;
16
+ readonly version: string;
17
+ readonly integrity: string;
18
+ }
19
+ export type ChangeSetItem = {
20
+ readonly id: string;
21
+ readonly act: "write-record";
22
+ readonly source: WriteRecordSource;
23
+ } | {
24
+ readonly id: string;
25
+ readonly act: "compose-skills";
26
+ readonly roles: readonly string[];
27
+ } | {
28
+ readonly id: string;
29
+ readonly act: "install" | "pin-starter";
30
+ readonly planItem: string;
31
+ readonly package: PinnedPackage;
32
+ readonly placement: DependencyPlacement;
33
+ /** True when the default branch already has this exact version and integrity at this placement; such an item writes nothing. */
34
+ readonly satisfiedInBase: boolean;
35
+ } | {
36
+ readonly id: string;
37
+ readonly act: "exempt-release-age";
38
+ readonly scope: string;
39
+ readonly surface: ExemptionSurfaceKind;
40
+ readonly path: string;
41
+ } | {
42
+ readonly id: string;
43
+ readonly act: "declare-root-entry";
44
+ readonly path: string;
45
+ readonly entries: readonly RootEntryDeclaration[];
46
+ } | {
47
+ readonly id: string;
48
+ readonly act: "write-ledger" | "add-caller-workflow" | "write-starter-request" | "add-ci-template" | "add-path-scope-job";
49
+ };
50
+ /** One root entry a declare-root-entry item adds to a Controller profile: always an extension the repository allows. */
51
+ export interface RootEntryDeclaration {
52
+ readonly name: string;
53
+ readonly classification: "extension";
54
+ readonly disposition: "allowed";
55
+ }
56
+ /** What was observed of the Controller repository profile on the default branch (code rule C13). */
57
+ export interface RepositoryProfileObservation {
58
+ /** The profile Controller would locate. */
59
+ readonly path: string;
60
+ /** none: no root vocabulary Controller checks; checked: one it checks; unparseable: not readable as a profile with a well-formed rootEntries. */
61
+ readonly rootVocabulary: "none" | "checked" | "unparseable";
62
+ /** Root names the set introduces that the vocabulary does not declare. */
63
+ readonly undeclaredRoots: readonly string[];
64
+ /** Root names the set introduces that the vocabulary declares as prohibited. */
65
+ readonly prohibitedRoots: readonly string[];
66
+ }
67
+ /** `sha256:` and 64 hex digits of a file's bytes, or null when the file is absent. */
68
+ export type ContentDigest = string | null;
69
+ /** A file whose exact bytes the set writes; mode 120000 is a discovery link, whose bytes are its target. */
70
+ export interface WholeFileChange {
71
+ readonly path: string;
72
+ readonly mode: "100644" | "120000";
73
+ readonly before: ContentDigest;
74
+ readonly after: ContentDigest;
75
+ readonly item: string;
76
+ }
77
+ /** The lockfile resolves this package to this exact version and integrity. */
78
+ export interface PackageInvariant extends PinnedPackage {
79
+ readonly item: string;
80
+ }
81
+ /** The ledger the set writes has this generation. */
82
+ export interface LedgerInvariant {
83
+ readonly ledgerGeneration: number;
84
+ }
85
+ /** A file checked by its invariants, never by its bytes; its `before` and `after` are outside the digest. */
86
+ export interface DerivedFileChange {
87
+ readonly path: string;
88
+ readonly mode: "100644";
89
+ readonly derived: true;
90
+ readonly item: string;
91
+ readonly invariants: readonly (PackageInvariant | LedgerInvariant)[];
92
+ readonly before?: ContentDigest;
93
+ readonly after?: ContentDigest;
94
+ }
95
+ export type FileChange = WholeFileChange | DerivedFileChange;
96
+ /** One owned key inside package.json, by JSON pointer. */
97
+ export interface KeyChange {
98
+ readonly file: "package.json";
99
+ readonly pointer: string;
100
+ readonly before: string | null;
101
+ readonly after: string | null;
102
+ readonly item: string;
103
+ }
104
+ export type RefusalReason = "unowned-existing" | "client-edited" | "deleted" | "manifest-absent" | "unsafe-path" | "release-age-surface-conflict" | "release-age-surface-unparseable" | "root-vocabulary-unknown" | "root-entry-prohibited" | "skills-root-is-link";
105
+ export type ChangeSetRefusal = {
106
+ readonly path: string;
107
+ readonly reason: RefusalReason;
108
+ readonly item: string;
109
+ } | {
110
+ readonly file: "package.json";
111
+ readonly pointer: string;
112
+ readonly reason: RefusalReason;
113
+ readonly item: string;
114
+ };
115
+ export interface ChangeSetDeferral {
116
+ readonly planItem: string;
117
+ readonly reason: "after-setup";
118
+ }
119
+ /** One repository's change set (repository-change-set.json, in the public repository, not shipped in this package). */
120
+ export interface RepositoryChangeSet {
121
+ readonly schemaVersion: 1;
122
+ readonly kind: "clossys.repository-change-set";
123
+ readonly producer: {
124
+ readonly name: string;
125
+ readonly version: string;
126
+ };
127
+ readonly planDigest: string;
128
+ readonly repository: {
129
+ readonly id: string;
130
+ readonly nodeId: string;
131
+ readonly visibility: RepositoryVisibility;
132
+ readonly defaultBranch: string;
133
+ readonly baseCommit: string;
134
+ };
135
+ readonly ledger: {
136
+ readonly generation: number;
137
+ };
138
+ readonly phase: ChangeSetPhase;
139
+ readonly engine: PinnedPackage;
140
+ /** The exact Integrator package the hub pins; a product repository's CI runs its provenance check by this version. */
141
+ readonly integrator: PinnedPackage;
142
+ readonly observed: {
143
+ readonly packageManager: PackageManagerKind;
144
+ readonly lockfile: LockfileName;
145
+ readonly releaseAgeSurfaces: readonly {
146
+ readonly surface: ReleaseAgeSurfaceKind;
147
+ readonly path: string;
148
+ }[];
149
+ /** Whether the default branch has a workflow of its own, one whose file name does not start with clossys-. */
150
+ readonly consumerCi: boolean;
151
+ /** The discovery roots that are, or lie under, a symbolic link on the default branch; no link is written under them. */
152
+ readonly symlinkedSkillRoots: readonly DiscoveryRoot[];
153
+ /** The Controller repository profile the default branch declares, or null. */
154
+ readonly repositoryProfile: RepositoryProfileObservation | null;
155
+ /** Which of .agents, .agents/skills and .agents/skills/clossys-<role> is a symbolic link on the default branch. */
156
+ readonly linkedAgentsPaths: readonly string[];
157
+ };
158
+ readonly items: readonly ChangeSetItem[];
159
+ readonly files: readonly FileChange[];
160
+ readonly keys: readonly KeyChange[];
161
+ readonly refused: readonly ChangeSetRefusal[];
162
+ readonly deferred: readonly ChangeSetDeferral[];
163
+ readonly pathAllowList: readonly string[];
164
+ readonly branch: string;
165
+ readonly bundle: string;
166
+ readonly pullRequest: {
167
+ readonly title: string;
168
+ readonly bodySha256?: string;
169
+ };
170
+ readonly inverse?: string;
171
+ /** Tool versions recorded for diagnosis when derived files are regenerated; outside the digest. */
172
+ readonly tooling?: readonly {
173
+ readonly tool: "node" | "npm" | "pnpm" | "yarn";
174
+ readonly version: string;
175
+ }[];
176
+ /** Whole-file bytes materialize reads when the set is stored; outside the digest. */
177
+ readonly texts?: readonly {
178
+ readonly path: string;
179
+ readonly text: string;
180
+ }[];
181
+ readonly changeSetDigest: string;
182
+ }
183
+ export type CheckVerdict = "satisfied" | "violated" | "indeterminate";
184
+ export type ApplyCheckId = "V1" | "V2" | "V3" | "V4" | "V5" | "V6" | "V7" | "V8" | "V9";
185
+ export interface ApplyCheck {
186
+ readonly check: ApplyCheckId;
187
+ readonly verdict: CheckVerdict;
188
+ readonly rule?: string;
189
+ }
190
+ /**
191
+ * On what authority a change set is written (installed-ledger.json,
192
+ * definitions.binding): approved as a member of the bundle whose digest the
193
+ * approving decision names, or admitted as the apply set that follows an
194
+ * approved setup set under the one-approval rule.
195
+ */
196
+ export type ApprovalBinding = {
197
+ readonly kind: "approved";
198
+ readonly subjectDigest: string;
199
+ } | {
200
+ readonly kind: "admitted";
201
+ readonly subjectDigest: string;
202
+ readonly setupChangeSet: string;
203
+ };
204
+ export type ApplyBundleRepository = {
205
+ readonly id: string;
206
+ readonly verdict: CheckVerdict;
207
+ readonly phase: ChangeSetPhase;
208
+ readonly changeSet: string;
209
+ readonly checks: readonly ApplyCheck[];
210
+ /** Only in a planned bundle, when V1 to V9 all passed and an approval binds the set (code rule A6). */
211
+ readonly state?: "planned";
212
+ /** Only in a planned bundle, when every V3 check passed (code rule A7). */
213
+ readonly binding?: ApprovalBinding;
214
+ } | {
215
+ readonly id: string;
216
+ readonly verdict: "violated" | "indeterminate";
217
+ readonly reason: string;
218
+ readonly checks: readonly ApplyCheck[];
219
+ };
220
+ /**
221
+ * One application attempt (apply-bundle.json, in the public repository, not
222
+ * shipped in this package). A report bundle claims no repository state; a
223
+ * planned bundle records which repositories passed V1 to V9 and are bound by
224
+ * an approval. See its contract.
225
+ */
226
+ export interface ApplyBundle {
227
+ readonly schemaVersion: 1;
228
+ readonly kind: "clossys.apply-bundle";
229
+ readonly mode: "report" | "planned";
230
+ readonly plan: {
231
+ readonly path: "clossys/advisor/plan.json";
232
+ readonly digest: string;
233
+ readonly committed: boolean;
234
+ };
235
+ readonly snapshot: {
236
+ readonly path: "clossys/.state/apply/registry-snapshot.json";
237
+ readonly digest: string;
238
+ } | null;
239
+ readonly engine: PinnedPackage;
240
+ readonly authorization: {
241
+ readonly planDigest: string;
242
+ readonly expiresAt: string;
243
+ } | null;
244
+ readonly computedAt: string;
245
+ readonly repositories: readonly ApplyBundleRepository[];
246
+ readonly bundleDigest: string;
247
+ }
248
+ /** The path of the installed-state ledger every change set writes. */
249
+ export declare const LEDGER_PATH = "clossys/.state/installed.json";
250
+ /** Where the engagement brief is written. */
251
+ export declare const BRIEF_PATH = "clossys/brief.json";
252
+ /** Every file name a lockfile can have. */
253
+ export declare const LOCKFILE_NAMES: readonly string[];
254
+ /**
255
+ * The repository's lockfile path, as the change-set contract defines it: the
256
+ * observed lockfile, or, when there is none, the one its package manager
257
+ * writes; null when the repository has no package manager.
258
+ */
259
+ export declare function lockfilePath(observed: {
260
+ readonly packageManager: PackageManagerKind;
261
+ readonly lockfile: LockfileName;
262
+ }): string | null;
263
+ /** Where a composed skill is written for a role. */
264
+ export declare function skillPath(role: string): string;
265
+ /** Where the composed-skill manifest is written: one per compose-skills item (code rule C9). */
266
+ export declare const SKILLS_MANIFEST_PATH = "clossys/.state/skills.json";
267
+ /** Controller's limit on a root entry name, in UTF-16 code units. */
268
+ export declare const MAX_ROOT_NAME_UNITS = 255;
269
+ /** A lowercase id token, such as a role: the contracts' idToken. */
270
+ export declare const ID_TOKEN: RegExp;
271
+ /**
272
+ * The root names a change set can introduce: the first segment of each
273
+ * owned pattern other than `**`, read from the packed contract. A fixed list,
274
+ * so no plan or brief text can become a root entry (code rules C13 and L9).
275
+ */
276
+ export declare const INTRODUCIBLE_ROOTS: ReadonlySet<string>;
277
+ /** The planItem a package act for this repository and package has: `${repositoryId}:${name}`, exactly (code rules C16 and L10). */
278
+ export declare function derivedPlanItem(repositoryId: string, name: string): string;
279
+ /** The discovery roots, in canonical order. */
280
+ export declare const DISCOVERY_ROOTS: readonly DiscoveryRoot[];
281
+ /** Where a role's discovery link is written under a discovery root. */
282
+ export declare function discoveryLinkPath(root: DiscoveryRoot, role: string): string;
283
+ /** A discovery link's target: its exact bytes, with no line feed. */
284
+ export declare function discoveryLinkTarget(role: string): string;
285
+ /** The role a discovery link path names, or null when the path is not a discovery link. */
286
+ export declare function discoveryLinkRole(path: string): string | null;
287
+ /** The file each write-record source writes (code rule C9). */
288
+ export declare const WRITE_RECORD_PATHS: Readonly<Record<WriteRecordSource, string>>;
289
+ /** The setup template acts, each with exactly the files it writes (code rule C9). */
290
+ export type TemplateAct = "add-caller-workflow" | "write-starter-request" | "add-ci-template" | "add-path-scope-job";
291
+ export declare const TEMPLATE_PATHS: Readonly<Record<TemplateAct, readonly string[]>>;
292
+ /** For each surface an exempt-release-age item writes: its file, the list key in it, and the package manager that reads it (code rule C12). */
293
+ export declare const EXEMPTION_SURFACES: Readonly<Record<ExemptionSurfaceKind, {
294
+ readonly path: string;
295
+ readonly key: string;
296
+ readonly packageManager: PackageManagerKind;
297
+ }>>;
298
+ /**
299
+ * How a whole file may change (the contract's WRITE KINDS, code rule C15).
300
+ * write: after is not null. link: after is not null, and before is null or
301
+ * equal to it. create-or-edit: after is not null and differs from before.
302
+ * edit: before and after are not null and differ. No act deletes a file.
303
+ */
304
+ export type WriteKind = "write" | "link" | "create-or-edit" | "edit";
305
+ /** The write kind of each act's whole files; null for an act that writes no whole file. A compose-skills discovery link is a link. */
306
+ export declare const WRITE_KINDS: Readonly<Record<ChangeSetItem["act"], WriteKind | null>>;
307
+ /** The write kind a whole file at `path` has when `item` names it. */
308
+ export declare function writeKindOf(item: ChangeSetItem, path: string): WriteKind | null;
309
+ /** `sha256:` and the hex SHA-256 of a text's UTF-8 bytes: a file's content digest. */
310
+ export declare function contentDigest(text: string): string;
311
+ /** The JSON pointer of one dependency entry in package.json. */
312
+ export declare function dependencyPointer(placement: DependencyPlacement, name: string): string;
313
+ /** A relative path with `/` between segments and no empty, `.` or `..` segment (the contracts' safePath). */
314
+ export declare function isSafeRelativePath(path: string): boolean;
315
+ /** A path pattern as the contract allows one: a safe path whose segments may use `*`, where a segment containing `**` is exactly `**`, and which is not `**` alone. */
316
+ export declare function isPathPattern(pattern: string): boolean;
317
+ /**
318
+ * Whether a safe relative path is matched by a path pattern: `*` matches
319
+ * any characters within one segment, and a segment that is exactly `**`
320
+ * matches any number of whole segments, including none. An unsafe path, or
321
+ * a pattern the contract does not allow, matches nothing.
322
+ */
323
+ export declare function matchesPathPattern(path: string, pattern: string): boolean;
324
+ /** Orders two strings by their UTF-16 code units. */
325
+ export declare function compareCodeUnits(left: string, right: string): number;
326
+ /** Orders two tuples of strings member by member, by UTF-16 code units. */
327
+ export declare function compareTuples(left: readonly string[], right: readonly string[]): number;
328
+ /** The sort keys of the change-set contract's canonical order (code rule C8), shared by the planner that writes it and the rule that checks it. */
329
+ export declare const CANONICAL_KEYS: {
330
+ readonly item: (item: ChangeSetItem) => string[];
331
+ readonly file: (file: FileChange) => string[];
332
+ readonly key: (key: KeyChange) => string[];
333
+ readonly refusal: (refusal: ChangeSetRefusal) => string[];
334
+ readonly deferral: (deferral: ChangeSetDeferral) => string[];
335
+ readonly invariant: (invariant: PackageInvariant | LedgerInvariant) => string[];
336
+ readonly pattern: (pattern: string) => string[];
337
+ readonly surface: (surface: {
338
+ readonly surface: string;
339
+ readonly path: string;
340
+ }) => string[];
341
+ readonly root: (root: string) => string[];
342
+ readonly name: (name: string) => string[];
343
+ readonly tool: (tool: {
344
+ readonly tool: string;
345
+ }) => string[];
346
+ };
347
+ /** A copy of `values` in canonical order by `key`. */
348
+ export declare function canonicalOrder<T>(values: readonly T[], key: (value: T) => readonly string[]): T[];
349
+ /** The worst of some verdicts: violated, then indeterminate, then satisfied; satisfied for none. */
350
+ export declare function worstVerdict(verdicts: readonly CheckVerdict[]): CheckVerdict;
351
+ /** The rule a bundle check carries when its authorization is for another plan (code rule A4). */
352
+ export declare const AUTHORIZATION_PLAN_MISMATCH = "authorization-plan-mismatch";
353
+ /** The rule a bundle check carries when the plan has package acts and no authorization permits them (code rule A4). */
354
+ export declare const AUTHORIZATION_ABSENT = "authorization-absent";
355
+ export type ChangeSetRuleId = "C1" | "C2" | "C3" | "C4" | "C5" | "C6" | "C7" | "C8" | "C9" | "C10" | "C11" | "C12" | "C13" | "C14" | "C15" | "C16" | "C17";
356
+ export type ApplyBundleRuleId = "A1" | "A2" | "A3" | "A4" | "A5" | "A6" | "A7";
357
+ /** One reason a change set or bundle is refused: `rule` is "schema" for the contract's keywords, else the code rule's id. */
358
+ export interface ChangeSetViolation {
359
+ readonly rule: "schema" | ChangeSetRuleId | ApplyBundleRuleId;
360
+ readonly path: string;
361
+ readonly message: string;
362
+ }
363
+ interface RuleViolation<R> {
364
+ readonly rule: R;
365
+ readonly path: string;
366
+ readonly message: string;
367
+ }
368
+ /** Code rules C1-C16 of repository-change-set.json, over a set whose schema already passes. Messages name positions, never values. */
369
+ export declare function changeSetRuleViolations(set: RepositoryChangeSet): RuleViolation<ChangeSetRuleId>[];
370
+ /** Code rules A1-A7 of apply-bundle.json, over a bundle whose schema already passes. */
371
+ export declare function applyBundleRuleViolations(bundle: ApplyBundle): RuleViolation<ApplyBundleRuleId>[];
372
+ /** Every reason a change set is refused: the change-set contract's schema, then, once that passes, its code rules C1-C16. */
373
+ export declare function repositoryChangeSetViolations(value: unknown): ChangeSetViolation[];
374
+ /** Every reason a bundle is refused: the bundle contract's schema, then, once that passes, its code rules A1-A7. */
375
+ export declare function applyBundleViolations(value: unknown): ChangeSetViolation[];
376
+ /** Validates a change set against repository-change-set.json and its code rules C1-C16. No reason echoes a value. */
377
+ export declare function validateRepositoryChangeSet(value: unknown): ValidationResult;
378
+ /** Validates a bundle against apply-bundle.json and its code rules A1-A7. No reason echoes a value. */
379
+ export declare function validateApplyBundle(value: unknown): ValidationResult;
380
+ export {};
381
+ //# sourceMappingURL=change-set-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-set-contract.d.ts","sourceRoot":"","sources":["../src/change-set-contract.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AACrE,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,CAAC;AAC/C,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAClE,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,gBAAgB,GAAG,WAAW,GAAG,MAAM,CAAC;AACzF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC1E,oGAAoG;AACpG,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG,QAAQ,CAAC;AAC/D,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG,iBAAiB,CAAC;AACrE,yGAAyG;AACzG,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,eAAe,GAAG,cAAc,CAAC;AAEzG,qEAAqE;AACrE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B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