@clossys/launcher 0.3.1 → 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 (285) hide show
  1. package/README.md +1324 -60
  2. package/contracts/conversation-contract.md +2 -2
  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 -4
  210. package/skeleton/README.md +14 -9
  211. package/skeleton/package.json +2 -1
  212. package/skill/SKILL.md +23 -7
  213. package/skill-catalogue/advisor/SKILL.md +59 -6
  214. package/skill-catalogue/architect/SKILL.md +2 -2
  215. package/skill-catalogue/bouncer/SKILL.md +2 -2
  216. package/skill-catalogue/builder/SKILL.md +2 -2
  217. package/skill-catalogue/butler/SKILL.md +2 -2
  218. package/skill-catalogue/controller/SKILL.md +2 -2
  219. package/skill-catalogue/customer/SKILL.md +2 -2
  220. package/skill-catalogue/designer/SKILL.md +4 -2
  221. package/skill-catalogue/giver/SKILL.md +2 -2
  222. package/skill-catalogue/influencer/SKILL.md +2 -2
  223. package/skill-catalogue/inspector/SKILL.md +2 -2
  224. package/skill-catalogue/integrator/SKILL.md +2 -2
  225. package/skill-catalogue/keeper/SKILL.md +2 -2
  226. package/skill-catalogue/launcher/SKILL.md +23 -7
  227. package/skill-catalogue/locksmith/SKILL.md +2 -2
  228. package/skill-catalogue/messenger/SKILL.md +2 -2
  229. package/skill-catalogue/observer/SKILL.md +2 -2
  230. package/skill-catalogue/publisher/SKILL.md +2 -2
  231. package/skill-catalogue/starter/SKILL.md +3 -2
  232. package/skill-catalogue/strategist/SKILL.md +12 -4
  233. package/skill-catalogue/writer/SKILL.md +2 -2
  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
package/dist/core.d.ts CHANGED
@@ -12,11 +12,14 @@ export declare const LEGACY_STATE_DIR_REL = ".clossys";
12
12
  export declare const LEGACY_WORKSPACE_MARKER_REL: string;
13
13
  export declare const LEGACY_WORKSPACE_INVENTORY_REL: string;
14
14
  export declare const ADVISOR_PACKAGE = "@clossys/advisor";
15
+ export declare const INTEGRATOR_PACKAGE = "@clossys/integrator";
15
16
  export declare const LAUNCHER_PACKAGE = "@clossys/launcher";
17
+ /** The engines a hub pins: each exactly, once, in `devDependencies`, at its live registry version. */
18
+ export declare const HUB_ENGINE_PACKAGES: readonly ["@clossys/advisor", "@clossys/integrator"];
16
19
  /** Written at generate time so this package never ships a nested AGENTS.md. */
17
- export declare const CONSUMER_AGENTS_MD = "# Account workspace\n\nThis folder is the account hub for Foundry packages.\n\nAfter `npx @clossys/launcher`, the same `@clossys-*` team is composed in\nevery inventoried checkout beside this hub. Talk with `@clossys-advisor` and\n`@clossys-<package>` here or in a product repository. A missing `@` mention\nis not how we signal incompatibility \u2014 `@clossys-advisor` is the hiring check.\n\nRun `npx @clossys/launcher` again for hub health and to refresh voices on\nclones next to the hub, not as how you talk to packages.\n\nThe person in this folder is a founder, not an engineer. Speak like a\nperson. Do not dump machine identifiers, JSON, hashes, or grant fields\nunless they ask.\n\nAdvisor is read-only until the sponsor approves a next action.\n";
18
- /** Canned guidance for inventoried product checkouts (not the hub). */
19
- export declare const SISTER_CONSUMER_AGENTS_MD = "# Product repository\n\nThis repository is part of the same account engagement. The same\n`@clossys-<package>` team is here for intro and questions;\n`@clossys-advisor` decides hiring and compatibility. This folder is not the\nhub \u2014 engines are hired per repository, not dumped here.\n";
20
+ export declare const CONSUMER_AGENTS_MD = "# Account workspace\n\nThis folder is the account hub for Foundry packages.\n\nAfter `npx @clossys/launcher`, the `@clossys-*` team is composed in this\nhub. Talk with `@clossys-advisor` and `@clossys-<package>` here. A launcher\nrun writes nothing into a product repository; once a repository is staffed\nin an approved plan, it gets `@clossys-advisor` and the voices of the roles\nstaffed there, with that plan's setup pull request. A missing `@` mention\nis a bug only here in the hub; in a product repository, a role that is not\nstaffed there is expected to be absent. `@clossys-advisor` is the hiring\ncheck.\n\nRun `npx @clossys/launcher` again for hub health and to refresh the voices\nin this hub, not as how you talk to packages.\n\nThe person in this folder is a founder, not an engineer. Speak like a\nperson. Do not dump machine identifiers, JSON, hashes, or grant fields\nunless they ask.\n\nAdvisor is read-only until the sponsor approves a next action.\n";
21
+ /** The hub guidance written while a launcher run still composed the team into checkouts beside the hub; resume refreshes it. */
22
+ export declare const SIBLING_COMPOSING_CONSUMER_AGENTS_MD = "# Account workspace\n\nThis folder is the account hub for Foundry packages.\n\nAfter `npx @clossys/launcher`, the same `@clossys-*` team is composed in\nevery inventoried checkout beside this hub. Talk with `@clossys-advisor` and\n`@clossys-<package>` here or in a product repository. A missing `@` mention\nis not how we signal incompatibility \u2014 `@clossys-advisor` is the hiring check.\n\nRun `npx @clossys/launcher` again for hub health and to refresh voices on\nclones next to the hub, not as how you talk to packages.\n\nThe person in this folder is a founder, not an engineer. Speak like a\nperson. Do not dump machine identifiers, JSON, hashes, or grant fields\nunless they ask.\n\nAdvisor is read-only until the sponsor approves a next action.\n";
20
23
  /** Previous generate-time guidance; used to refresh stale hub AGENTS.md on resume. */
21
24
  export declare const LEGACY_CONSUMER_AGENTS_MD = "# Account workspace\n\nThis repository is the account hub for Foundry packages. It inventories\nwhere packages are installed and coordinates engagement. It is not a\nproduct application and does not need the whole catalogue installed here.\n\nThe person in this folder is a founder, not an engineer. Speak like a\nperson. Do not dump machine identifiers, JSON, hashes, or grant fields\nunless they ask.\n\nWhen there is a next step, say only:\n\n1. Where we are (one sentence).\n2. What you should do next (one sentence).\n3. What we will not do until you say yes.\n4. Whether anything will be saved to git (usually no).\n\nWait for a plain yes before changing files. \"Approved\" in chat is\npermission for that one step only. It is not a lasting grant and it\ndoes not become a commit unless someone later saves a file.\n\nOpen this folder in your coding agent. Advisor is read-only until you\napprove a next action.\n\nRun `npx @clossys/launcher` again to resume. Public npm reads\nneed no token.\n";
22
25
  export declare const CONSUMER_CLAUDE_MD = "@AGENTS.md\n";
@@ -27,33 +30,71 @@ export declare function parseGitHubRemote(url: string): {
27
30
  } | null;
28
31
  /** True when the marker is a v1 account-hub document. */
29
32
  export declare function isHubDocument(value: unknown): value is HubDocument;
30
- /** Classifies a generated hub inventory (packed template skeleton/clossys/.state/inventory.json; the generated path does not ship) without inventing repositories. */
31
- export declare function inspectInventory(raw: string | null): InventoryObservation;
33
+ /**
34
+ * The inventory document's shape lives in docs/contracts/repository-inventory.json
35
+ * (in the public repository; that exact path does not ship in this
36
+ * package, but this package's build packs and ships its own copy of the
37
+ * contract) and is checked, on every read and write, by
38
+ * `validateInventoryDocument()` through the shared contract checker
39
+ * (./inventory-contract.ts, #1334, #1179).
40
+ */
41
+ export { validateInventoryDocument } from "./inventory-contract.js";
42
+ export type { InventoryValidation } from "./inventory-contract.js";
43
+ /**
44
+ * Classifies a generated hub inventory (packed template skeleton/clossys/.state/inventory.json; the generated path does not ship) without inventing repositories. Malformed input is "invalid", never silently folded into "empty" (#1334).
45
+ * Pass the file's exact bytes (`WorkspaceHost.readBytes()`), and the hub's owner when it is known, so a bare id and `<owner>/<id>` count as one repository (#1179).
46
+ */
47
+ export declare function inspectInventory(raw: string | Uint8Array | null, hubOwner?: string): InventoryObservation;
32
48
  /** True when the tree already pins Advisor in some bucket, so adopt would not need a new version. */
33
49
  export declare function hasAdvisorPin(manifest: unknown): boolean;
34
- /** Collects GitHub owner, cwd shape, default-hub presence, and the public Advisor pin. */
35
50
  /**
36
51
  * Reads the public `@clossys/launcher` registry version, used only to grade
37
52
  * catalogue-sourced skill staleness in the health report (#1183). A missing
38
53
  * or unparseable read leaves staleness ungraded rather than refusing.
39
54
  */
40
55
  export declare function readLiveLauncherVersion(host: WorkspaceHost): string | undefined;
56
+ /**
57
+ * Collects GitHub owner, cwd shape, default-hub presence, and the public
58
+ * Advisor and Integrator versions. Default-hub presence means only that
59
+ * `{owner}/workspace` exists on GitHub; its contents (marker, legacy marker,
60
+ * or none) are not observed here but classified after the clone, at apply
61
+ * time (#1585).
62
+ */
41
63
  export declare function observeWorkspace(host: WorkspaceHost): WorkspaceObservation;
42
64
  /**
43
65
  * Decides create, resume, or adopt from a cwd observation.
44
66
  * Appointing means: run this from the GitHub repository that should own the hub.
45
67
  */
46
- export declare function readInventoryRepositories(host: WorkspaceHost, source: string, label: string): readonly string[];
47
- export declare function planWorkspace(observation: WorkspaceObservation, host: WorkspaceHost, options?: {
48
- inventoryPath?: string;
49
- }): WorkspaceDecision;
68
+ /**
69
+ * Reads repository ids from a `schemaVersion: 1` inventory document, routed
70
+ * through `validateInventoryDocument` -- the same schema check `--inventory`
71
+ * and `inspectInventory` apply, so a caller here can never end up trusting a
72
+ * document neither of those would have accepted (#1334). Throws, naming the
73
+ * offending field, on anything present but invalid; a missing file is `[]`,
74
+ * not a throw -- an absent inventory is a fact about the hub, not a
75
+ * malformed one. The file is read as bytes; `hubOwner`, when given, makes a
76
+ * bare id and `<hubOwner>/<id>` one repository, so a document listing both
77
+ * is refused.
78
+ */
79
+ export declare function readInventoryRepositories(host: WorkspaceHost, source: string, label: string, hubOwner?: string): readonly string[];
80
+ export interface PlanWorkspaceOptions {
81
+ /** `--inventory <path>`: a prepared inventory document, appoint only. */
82
+ readonly inventoryPath?: string;
83
+ /** `--repositories`: the repository ids a founder chose on Advisor's repository card (#1179). Appoint or resume of a hub checkout. */
84
+ readonly repositories?: readonly string[];
85
+ /** `--replace-inventory`: explicit approval for `repositories` to replace a stored inventory that lists a different set, or one that fails its contract. */
86
+ readonly replaceInventory?: boolean;
87
+ }
88
+ export declare function planWorkspace(observation: WorkspaceObservation, host: WorkspaceHost, options?: PlanWorkspaceOptions): WorkspaceDecision;
50
89
  /**
51
90
  * Read-only pin and inventory report. Does not install or uninstall. Scans all
52
- * four dependency buckets; grades each pinned advisor version against the live
53
- * registry version, marking a pin older than live as a stale-pin finding and a
54
- * degraded report.
91
+ * four dependency buckets for both hub engines (Advisor and Integrator);
92
+ * grades each pinned version against that engine's live registry version,
93
+ * when known, marking a pin older than live as a stale-pin finding and a
94
+ * degraded report. `liveIntegratorVersion` is the last parameter so earlier
95
+ * callers keep their argument positions.
55
96
  */
56
- export declare function reportHubHealth(host: WorkspaceHost, directory: string, liveAdvisorVersion?: string, liveLauncherVersion?: string, retiredThisRun?: readonly string[], migration?: HubHealthReport["migration"]): HubHealthReport;
97
+ export declare function reportHubHealth(host: WorkspaceHost, directory: string, liveAdvisorVersion?: string, liveLauncherVersion?: string, retiredThisRun?: readonly string[], migration?: HubHealthReport["migration"], liveIntegratorVersion?: string): HubHealthReport;
57
98
  export declare function formatHubHealth(report: HubHealthReport): string;
58
99
  /**
59
100
  * Read-only inventory validation: runs `gh repo view --json name` for each
@@ -61,23 +102,39 @@ export declare function formatHubHealth(report: HubHealthReport): string;
61
102
  * a note; marks ids whose check fails as unknown. Never mutates the inventory.
62
103
  */
63
104
  export declare function checkInventoryEntries(host: WorkspaceHost, directory: string): InventoryValidationReport;
105
+ /** The position a message names instead of a document-sourced inventory id, matching `inventory-choice.ts`'s `listRemovedPositions`. `undefined` only for the stored-inventory-file-itself failure, which names the file by its own constant path instead. */
106
+ export declare function inventoryPositionLabel(inventoryId: string, position: number | undefined): string;
64
107
  export interface CloneMissingOutcome {
108
+ /** Internal use only (a `gh repo clone` argument, a caller's own lookup) -- never put directly in a printed message; see `position`. */
65
109
  readonly inventoryId: string;
110
+ /** This id's 0-based position in the stored inventory's `repositories` array; what a message names instead of `inventoryId`. `undefined` only for the stored-inventory-file-itself failure. */
111
+ readonly position?: number;
66
112
  readonly result: "cloned" | "skipped-other-reason" | "failed";
67
113
  readonly note: string;
68
114
  }
69
115
  /**
70
116
  * Explicit, approved action (#1179, the #1045 pattern): clones every
71
- * inventoried repository that resolveSisterCloneTargets's own skip pass
72
- * identified as "just needs a clone" (CLONE_NOT_BESIDE_HUB_NOTE), and only
73
- * those -- every other skip reason (wrong account, foundry supplier tree,
74
- * origin mismatch, invalid slug) is left exactly as skipped, never
75
- * attempted. Never called from resume's default path; only from the
76
- * --clone-missing flag. Reverses the launcher README's own no-clone
77
- * default for exactly this one approved action.
117
+ * inventoried repository that classifyInventoriedSiblings found not cloned
118
+ * beside the hub, and only those -- every other reason (wrong account,
119
+ * foundry supplier tree, origin mismatch, invalid slug, invalid inventory)
120
+ * is reported as skipped, never attempted, and a checkout already beside
121
+ * the hub is left out. Never called from resume's default path; only from
122
+ * the --clone-missing flag. Reverses the launcher README's own no-clone
123
+ * default for exactly this one approved action. Cloning is not composing:
124
+ * a cloned repository receives its team only once it is staffed in an
125
+ * approved plan, with that plan's setup pull request.
78
126
  */
79
127
  export declare function cloneMissingInventoryRepositories(host: WorkspaceHost, hubDirectory: string, hubOwner: string): readonly CloneMissingOutcome[];
80
- /** Applies a create, resume, or adopt plan through the host. Resume refreshes composed skills and stale AGENTS.md guidance. */
128
+ /**
129
+ * Applies a create, resume, or adopt plan through the host. Resume refreshes
130
+ * composed skills and stale AGENTS.md guidance. A resume plan that clones
131
+ * (`clone: true`, planned from an empty directory) is classified only after
132
+ * the clone, by `classifyClonedHub`: a marked clone resumes (migrating a
133
+ * legacy marker), an unmarked one is appointed through the adopt path, and
134
+ * every refusal Launcher decides happens before anything is written into the clone (#1585).
135
+ * Every path writes only into the hub checkout, never into an inventoried
136
+ * repository beside it.
137
+ */
81
138
  export declare function applyWorkspacePlan(host: WorkspaceHost, plan: WorkspacePlan, skeletonRoot: string, options?: ApplyWorkspaceOptions): WorkspaceApplyResult;
82
139
  export declare function launcherPackageRootFromModule(moduleUrl: string): string;
83
140
  export declare function skeletonRootFromModule(moduleUrl: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,qBAAqB,EAIrB,WAAW,EACX,eAAe,EACf,oBAAoB,EAEpB,yBAAyB,EAEzB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,aAAa,EAGd,MAAM,YAAY,CAAC;AAMpB,eAAO,MAAM,uBAAuB,cAAc,CAAC;AACnD,kGAAkG;AAClG,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,0JAA0J;AAC1J,eAAO,MAAM,aAAa,QAAkC,CAAC;AAC7D,eAAO,MAAM,oBAAoB,QAAwC,CAAC;AAC1E,eAAO,MAAM,uBAAuB,QAAwC,CAAC;AAC7E,eAAO,MAAM,kBAAkB,QAAqC,CAAC;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