@productbrain/cli 0.1.0-beta.96 → 0.1.0-beta.973

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 (410) hide show
  1. package/dist/__tests__/audit.test.js +5 -0
  2. package/dist/__tests__/audit.test.js.map +1 -1
  3. package/dist/__tests__/authority-domains.test.js +3 -0
  4. package/dist/__tests__/authority-domains.test.js.map +1 -1
  5. package/dist/__tests__/canonicalRefs.vocab.test.d.ts +2 -0
  6. package/dist/__tests__/canonicalRefs.vocab.test.d.ts.map +1 -0
  7. package/dist/__tests__/canonicalRefs.vocab.test.js +251 -0
  8. package/dist/__tests__/canonicalRefs.vocab.test.js.map +1 -0
  9. package/dist/__tests__/config.test.js +272 -2
  10. package/dist/__tests__/config.test.js.map +1 -1
  11. package/dist/__tests__/constants.test.js +6 -1
  12. package/dist/__tests__/constants.test.js.map +1 -1
  13. package/dist/__tests__/envelope-contract.test.js +29 -3
  14. package/dist/__tests__/envelope-contract.test.js.map +1 -1
  15. package/dist/__tests__/errors.test.js +1 -0
  16. package/dist/__tests__/errors.test.js.map +1 -1
  17. package/dist/__tests__/handshake-augment.test.d.ts +2 -0
  18. package/dist/__tests__/handshake-augment.test.d.ts.map +1 -0
  19. package/dist/__tests__/handshake-augment.test.js +423 -0
  20. package/dist/__tests__/handshake-augment.test.js.map +1 -0
  21. package/dist/__tests__/handshake-dormancy.test.d.ts +2 -0
  22. package/dist/__tests__/handshake-dormancy.test.d.ts.map +1 -0
  23. package/dist/__tests__/handshake-dormancy.test.js +207 -0
  24. package/dist/__tests__/handshake-dormancy.test.js.map +1 -0
  25. package/dist/__tests__/handshake-formatter.test.d.ts +2 -0
  26. package/dist/__tests__/handshake-formatter.test.d.ts.map +1 -0
  27. package/dist/__tests__/handshake-formatter.test.js +67 -0
  28. package/dist/__tests__/handshake-formatter.test.js.map +1 -0
  29. package/dist/__tests__/handshake-preview.test.js +566 -4
  30. package/dist/__tests__/handshake-preview.test.js.map +1 -1
  31. package/dist/__tests__/handshake.e2e.test.d.ts +2 -0
  32. package/dist/__tests__/handshake.e2e.test.d.ts.map +1 -0
  33. package/dist/__tests__/handshake.e2e.test.js +1252 -0
  34. package/dist/__tests__/handshake.e2e.test.js.map +1 -0
  35. package/dist/__tests__/handshake.test.js +611 -2
  36. package/dist/__tests__/handshake.test.js.map +1 -1
  37. package/dist/__tests__/manifest.test.js +118 -1
  38. package/dist/__tests__/manifest.test.js.map +1 -1
  39. package/dist/__tests__/onboarding-path-b.test.js +4 -4
  40. package/dist/__tests__/onboarding-path-b.test.js.map +1 -1
  41. package/dist/__tests__/orient.test.js +184 -7
  42. package/dist/__tests__/orient.test.js.map +1 -1
  43. package/dist/__tests__/perimeter.test.d.ts +2 -0
  44. package/dist/__tests__/perimeter.test.d.ts.map +1 -0
  45. package/dist/__tests__/perimeter.test.js +165 -0
  46. package/dist/__tests__/perimeter.test.js.map +1 -0
  47. package/dist/__tests__/personal-layer.test.d.ts +1 -2
  48. package/dist/__tests__/personal-layer.test.d.ts.map +1 -1
  49. package/dist/__tests__/personal-layer.test.js +12 -48
  50. package/dist/__tests__/personal-layer.test.js.map +1 -1
  51. package/dist/__tests__/profiles.test.js +122 -7
  52. package/dist/__tests__/profiles.test.js.map +1 -1
  53. package/dist/__tests__/promote.test.js +2 -2
  54. package/dist/__tests__/promote.test.js.map +1 -1
  55. package/dist/__tests__/session-state-machine.test.js +45 -1
  56. package/dist/__tests__/session-state-machine.test.js.map +1 -1
  57. package/dist/__tests__/session-switch.test.d.ts +2 -0
  58. package/dist/__tests__/session-switch.test.d.ts.map +1 -0
  59. package/dist/__tests__/session-switch.test.js +129 -0
  60. package/dist/__tests__/session-switch.test.js.map +1 -0
  61. package/dist/__tests__/setup-ingest.test.js +16 -0
  62. package/dist/__tests__/setup-ingest.test.js.map +1 -1
  63. package/dist/__tests__/skill-vocabulary.test.d.ts +21 -0
  64. package/dist/__tests__/skill-vocabulary.test.d.ts.map +1 -0
  65. package/dist/__tests__/skill-vocabulary.test.js +187 -0
  66. package/dist/__tests__/skill-vocabulary.test.js.map +1 -0
  67. package/dist/__tests__/update-check.test.d.ts +2 -0
  68. package/dist/__tests__/update-check.test.d.ts.map +1 -0
  69. package/dist/__tests__/update-check.test.js +56 -0
  70. package/dist/__tests__/update-check.test.js.map +1 -0
  71. package/dist/__tests__/upgrade-runner.test.d.ts +2 -0
  72. package/dist/__tests__/upgrade-runner.test.d.ts.map +1 -0
  73. package/dist/__tests__/upgrade-runner.test.js +42 -0
  74. package/dist/__tests__/upgrade-runner.test.js.map +1 -0
  75. package/dist/__tests__/vocabulary-leak.test.d.ts +39 -0
  76. package/dist/__tests__/vocabulary-leak.test.d.ts.map +1 -0
  77. package/dist/__tests__/vocabulary-leak.test.js +534 -0
  78. package/dist/__tests__/vocabulary-leak.test.js.map +1 -0
  79. package/dist/__tests__/workspace.test.js +32 -12
  80. package/dist/__tests__/workspace.test.js.map +1 -1
  81. package/dist/commands/__tests__/connect-handoff.test.d.ts +11 -0
  82. package/dist/commands/__tests__/connect-handoff.test.d.ts.map +1 -0
  83. package/dist/commands/__tests__/connect-handoff.test.js +111 -0
  84. package/dist/commands/__tests__/connect-handoff.test.js.map +1 -0
  85. package/dist/commands/__tests__/setup-detect-surfaces.test.d.ts +15 -0
  86. package/dist/commands/__tests__/setup-detect-surfaces.test.d.ts.map +1 -0
  87. package/dist/commands/__tests__/setup-detect-surfaces.test.js +149 -0
  88. package/dist/commands/__tests__/setup-detect-surfaces.test.js.map +1 -0
  89. package/dist/commands/__tests__/setup-state.test.d.ts +2 -0
  90. package/dist/commands/__tests__/setup-state.test.d.ts.map +1 -0
  91. package/dist/commands/__tests__/setup-state.test.js +194 -0
  92. package/dist/commands/__tests__/setup-state.test.js.map +1 -0
  93. package/dist/commands/admin/seed.d.ts +46 -2
  94. package/dist/commands/admin/seed.d.ts.map +1 -1
  95. package/dist/commands/admin/seed.js +475 -33
  96. package/dist/commands/admin/seed.js.map +1 -1
  97. package/dist/commands/admin/seed.test.d.ts +5 -0
  98. package/dist/commands/admin/seed.test.d.ts.map +1 -1
  99. package/dist/commands/admin/seed.test.js +67 -2
  100. package/dist/commands/admin/seed.test.js.map +1 -1
  101. package/dist/commands/admin/seedRegistryEntries.generated.d.ts +14 -0
  102. package/dist/commands/admin/seedRegistryEntries.generated.d.ts.map +1 -0
  103. package/dist/commands/admin/seedRegistryEntries.generated.js +117 -0
  104. package/dist/commands/admin/seedRegistryEntries.generated.js.map +1 -0
  105. package/dist/commands/admin/seedRegistryEntries.test.d.ts +11 -0
  106. package/dist/commands/admin/seedRegistryEntries.test.d.ts.map +1 -0
  107. package/dist/commands/admin/seedRegistryEntries.test.js +67 -0
  108. package/dist/commands/admin/seedRegistryEntries.test.js.map +1 -0
  109. package/dist/commands/audit.d.ts.map +1 -1
  110. package/dist/commands/audit.js +30 -3
  111. package/dist/commands/audit.js.map +1 -1
  112. package/dist/commands/authority-domains.d.ts +25 -1
  113. package/dist/commands/authority-domains.d.ts.map +1 -1
  114. package/dist/commands/authority-domains.js +51 -4
  115. package/dist/commands/authority-domains.js.map +1 -1
  116. package/dist/commands/capture.d.ts.map +1 -1
  117. package/dist/commands/capture.js +3 -2
  118. package/dist/commands/capture.js.map +1 -1
  119. package/dist/commands/codex-prep.d.ts +1 -0
  120. package/dist/commands/codex-prep.d.ts.map +1 -1
  121. package/dist/commands/codex-prep.js +10 -7
  122. package/dist/commands/codex-prep.js.map +1 -1
  123. package/dist/commands/connect-config.test.d.ts +2 -0
  124. package/dist/commands/connect-config.test.d.ts.map +1 -0
  125. package/dist/commands/connect-config.test.js +44 -0
  126. package/dist/commands/connect-config.test.js.map +1 -0
  127. package/dist/commands/connect-context.d.ts +45 -0
  128. package/dist/commands/connect-context.d.ts.map +1 -0
  129. package/dist/commands/connect-context.js +64 -0
  130. package/dist/commands/connect-context.js.map +1 -0
  131. package/dist/commands/connect-context.test.d.ts +2 -0
  132. package/dist/commands/connect-context.test.d.ts.map +1 -0
  133. package/dist/commands/connect-context.test.js +110 -0
  134. package/dist/commands/connect-context.test.js.map +1 -0
  135. package/dist/commands/connect-handoff.d.ts +51 -0
  136. package/dist/commands/connect-handoff.d.ts.map +1 -0
  137. package/dist/commands/connect-handoff.js +70 -0
  138. package/dist/commands/connect-handoff.js.map +1 -0
  139. package/dist/commands/connect-integration.test.js +29 -12
  140. package/dist/commands/connect-integration.test.js.map +1 -1
  141. package/dist/commands/connect-screens.d.ts +6 -4
  142. package/dist/commands/connect-screens.d.ts.map +1 -1
  143. package/dist/commands/connect-screens.js +30 -19
  144. package/dist/commands/connect-screens.js.map +1 -1
  145. package/dist/commands/connect.d.ts +21 -6
  146. package/dist/commands/connect.d.ts.map +1 -1
  147. package/dist/commands/connect.js +65 -58
  148. package/dist/commands/connect.js.map +1 -1
  149. package/dist/commands/connect.test.js +17 -1
  150. package/dist/commands/connect.test.js.map +1 -1
  151. package/dist/commands/doctor.d.ts.map +1 -1
  152. package/dist/commands/doctor.js +68 -3
  153. package/dist/commands/doctor.js.map +1 -1
  154. package/dist/commands/doctor.test.js +131 -0
  155. package/dist/commands/doctor.test.js.map +1 -1
  156. package/dist/commands/handshake.d.ts +194 -2
  157. package/dist/commands/handshake.d.ts.map +1 -1
  158. package/dist/commands/handshake.js +1537 -46
  159. package/dist/commands/handshake.js.map +1 -1
  160. package/dist/commands/method.d.ts.map +1 -1
  161. package/dist/commands/method.js +3 -0
  162. package/dist/commands/method.js.map +1 -1
  163. package/dist/commands/orient.d.ts +63 -2
  164. package/dist/commands/orient.d.ts.map +1 -1
  165. package/dist/commands/orient.js +106 -4
  166. package/dist/commands/orient.js.map +1 -1
  167. package/dist/commands/profile.d.ts +1 -14
  168. package/dist/commands/profile.d.ts.map +1 -1
  169. package/dist/commands/profile.js +89 -72
  170. package/dist/commands/profile.js.map +1 -1
  171. package/dist/commands/promote.js +1 -1
  172. package/dist/commands/promote.js.map +1 -1
  173. package/dist/commands/relate.d.ts.map +1 -1
  174. package/dist/commands/relate.js +13 -0
  175. package/dist/commands/relate.js.map +1 -1
  176. package/dist/commands/session.d.ts.map +1 -1
  177. package/dist/commands/session.js +51 -14
  178. package/dist/commands/session.js.map +1 -1
  179. package/dist/commands/setup-audit.d.ts +59 -0
  180. package/dist/commands/setup-audit.d.ts.map +1 -0
  181. package/dist/commands/setup-audit.js +250 -0
  182. package/dist/commands/setup-audit.js.map +1 -0
  183. package/dist/commands/setup-detect-surfaces.d.ts +38 -0
  184. package/dist/commands/setup-detect-surfaces.d.ts.map +1 -0
  185. package/dist/commands/setup-detect-surfaces.js +76 -0
  186. package/dist/commands/setup-detect-surfaces.js.map +1 -0
  187. package/dist/commands/setup-ingest.d.ts.map +1 -1
  188. package/dist/commands/setup-ingest.js +4 -2
  189. package/dist/commands/setup-ingest.js.map +1 -1
  190. package/dist/commands/setup-state.d.ts +42 -0
  191. package/dist/commands/setup-state.d.ts.map +1 -0
  192. package/dist/commands/setup-state.js +93 -0
  193. package/dist/commands/setup-state.js.map +1 -0
  194. package/dist/commands/setup.d.ts +17 -9
  195. package/dist/commands/setup.d.ts.map +1 -1
  196. package/dist/commands/setup.js +52 -131
  197. package/dist/commands/setup.js.map +1 -1
  198. package/dist/commands/upgrade.d.ts +5 -0
  199. package/dist/commands/upgrade.d.ts.map +1 -0
  200. package/dist/commands/upgrade.js +89 -0
  201. package/dist/commands/upgrade.js.map +1 -0
  202. package/dist/commands/whoami.d.ts +12 -0
  203. package/dist/commands/whoami.d.ts.map +1 -0
  204. package/dist/commands/whoami.js +70 -0
  205. package/dist/commands/whoami.js.map +1 -0
  206. package/dist/commands/whoami.test.d.ts +2 -0
  207. package/dist/commands/whoami.test.d.ts.map +1 -0
  208. package/dist/commands/whoami.test.js +50 -0
  209. package/dist/commands/whoami.test.js.map +1 -0
  210. package/dist/commands/workspace.d.ts +23 -2
  211. package/dist/commands/workspace.d.ts.map +1 -1
  212. package/dist/commands/workspace.js +2 -2
  213. package/dist/commands/workspace.js.map +1 -1
  214. package/dist/formatters/__tests__/orient-provenance.test.d.ts +7 -0
  215. package/dist/formatters/__tests__/orient-provenance.test.d.ts.map +1 -0
  216. package/dist/formatters/__tests__/orient-provenance.test.js +454 -0
  217. package/dist/formatters/__tests__/orient-provenance.test.js.map +1 -0
  218. package/dist/formatters/audit.d.ts +6 -0
  219. package/dist/formatters/audit.d.ts.map +1 -1
  220. package/dist/formatters/audit.js.map +1 -1
  221. package/dist/formatters/entry.d.ts +21 -0
  222. package/dist/formatters/entry.d.ts.map +1 -1
  223. package/dist/formatters/entry.js +46 -5
  224. package/dist/formatters/entry.js.map +1 -1
  225. package/dist/formatters/handshake.d.ts +19 -3
  226. package/dist/formatters/handshake.d.ts.map +1 -1
  227. package/dist/formatters/handshake.js +48 -13
  228. package/dist/formatters/handshake.js.map +1 -1
  229. package/dist/formatters/orient.d.ts +79 -4
  230. package/dist/formatters/orient.d.ts.map +1 -1
  231. package/dist/formatters/orient.js +119 -18
  232. package/dist/formatters/orient.js.map +1 -1
  233. package/dist/formatters/session.js +1 -1
  234. package/dist/formatters/session.js.map +1 -1
  235. package/dist/generators/adapters.js +2 -2
  236. package/dist/generators/context-md.js +6 -6
  237. package/dist/generators/context-md.js.map +1 -1
  238. package/dist/generators/manifest.d.ts +76 -0
  239. package/dist/generators/manifest.d.ts.map +1 -1
  240. package/dist/generators/manifest.js +125 -14
  241. package/dist/generators/manifest.js.map +1 -1
  242. package/dist/generators/portable-knowledge.d.ts +6 -12
  243. package/dist/generators/portable-knowledge.d.ts.map +1 -1
  244. package/dist/generators/portable-knowledge.js +2 -19
  245. package/dist/generators/portable-knowledge.js.map +1 -1
  246. package/dist/generators/region-projections.d.ts +18 -0
  247. package/dist/generators/region-projections.d.ts.map +1 -0
  248. package/dist/generators/region-projections.js +49 -0
  249. package/dist/generators/region-projections.js.map +1 -0
  250. package/dist/generators/region-projections.test.d.ts +2 -0
  251. package/dist/generators/region-projections.test.d.ts.map +1 -0
  252. package/dist/generators/region-projections.test.js +63 -0
  253. package/dist/generators/region-projections.test.js.map +1 -0
  254. package/dist/generators/region.d.ts +24 -0
  255. package/dist/generators/region.d.ts.map +1 -0
  256. package/dist/generators/region.js +87 -0
  257. package/dist/generators/region.js.map +1 -0
  258. package/dist/generators/region.test.d.ts +2 -0
  259. package/dist/generators/region.test.d.ts.map +1 -0
  260. package/dist/generators/region.test.js +126 -0
  261. package/dist/generators/region.test.js.map +1 -0
  262. package/dist/generators/surface-profiles.d.ts +1 -2
  263. package/dist/generators/surface-profiles.d.ts.map +1 -1
  264. package/dist/generators/surface-profiles.js.map +1 -1
  265. package/dist/index.js +142 -27
  266. package/dist/index.js.map +1 -1
  267. package/dist/lib/activation.d.ts.map +1 -1
  268. package/dist/lib/activation.js +3 -3
  269. package/dist/lib/activation.js.map +1 -1
  270. package/dist/lib/activation.test.js +3 -3
  271. package/dist/lib/activation.test.js.map +1 -1
  272. package/dist/lib/canonicalRefs.d.ts +72 -0
  273. package/dist/lib/canonicalRefs.d.ts.map +1 -1
  274. package/dist/lib/canonicalRefs.js +67 -0
  275. package/dist/lib/canonicalRefs.js.map +1 -1
  276. package/dist/lib/client.d.ts.map +1 -1
  277. package/dist/lib/client.js +14 -4
  278. package/dist/lib/client.js.map +1 -1
  279. package/dist/lib/config.d.ts +70 -4
  280. package/dist/lib/config.d.ts.map +1 -1
  281. package/dist/lib/config.js +151 -11
  282. package/dist/lib/config.js.map +1 -1
  283. package/dist/lib/connectKeyLabel.d.ts +9 -0
  284. package/dist/lib/connectKeyLabel.d.ts.map +1 -0
  285. package/dist/lib/connectKeyLabel.js +12 -0
  286. package/dist/lib/connectKeyLabel.js.map +1 -0
  287. package/dist/lib/constants.d.ts +2 -0
  288. package/dist/lib/constants.d.ts.map +1 -1
  289. package/dist/lib/constants.js +2 -0
  290. package/dist/lib/constants.js.map +1 -1
  291. package/dist/lib/errors.d.ts +3 -0
  292. package/dist/lib/errors.d.ts.map +1 -1
  293. package/dist/lib/errors.js +3 -0
  294. package/dist/lib/errors.js.map +1 -1
  295. package/dist/lib/normalizeMaterializedFilename.d.ts +28 -0
  296. package/dist/lib/normalizeMaterializedFilename.d.ts.map +1 -0
  297. package/dist/lib/normalizeMaterializedFilename.js +56 -0
  298. package/dist/lib/normalizeMaterializedFilename.js.map +1 -0
  299. package/dist/lib/normalizeMaterializedFilename.test.d.ts +16 -0
  300. package/dist/lib/normalizeMaterializedFilename.test.d.ts.map +1 -0
  301. package/dist/lib/normalizeMaterializedFilename.test.js +90 -0
  302. package/dist/lib/normalizeMaterializedFilename.test.js.map +1 -0
  303. package/dist/lib/onboarding-path-b.d.ts.map +1 -1
  304. package/dist/lib/onboarding-path-b.js +0 -1
  305. package/dist/lib/onboarding-path-b.js.map +1 -1
  306. package/dist/lib/onboarding-shared.d.ts +0 -1
  307. package/dist/lib/onboarding-shared.d.ts.map +1 -1
  308. package/dist/lib/onboarding-shared.js +1 -17
  309. package/dist/lib/onboarding-shared.js.map +1 -1
  310. package/dist/lib/profiles.d.ts +3 -1
  311. package/dist/lib/profiles.d.ts.map +1 -1
  312. package/dist/lib/profiles.js +9 -6
  313. package/dist/lib/profiles.js.map +1 -1
  314. package/dist/lib/session.d.ts +10 -0
  315. package/dist/lib/session.d.ts.map +1 -1
  316. package/dist/lib/session.js +14 -0
  317. package/dist/lib/session.js.map +1 -1
  318. package/dist/lib/update-check.d.ts +20 -0
  319. package/dist/lib/update-check.d.ts.map +1 -1
  320. package/dist/lib/update-check.js +122 -21
  321. package/dist/lib/update-check.js.map +1 -1
  322. package/dist/lib/upgrade-runner.d.ts +21 -0
  323. package/dist/lib/upgrade-runner.d.ts.map +1 -0
  324. package/dist/lib/upgrade-runner.js +109 -0
  325. package/dist/lib/upgrade-runner.js.map +1 -0
  326. package/dist/lib/workspaceVocabCache.d.ts +60 -0
  327. package/dist/lib/workspaceVocabCache.d.ts.map +1 -0
  328. package/dist/lib/workspaceVocabCache.js +98 -0
  329. package/dist/lib/workspaceVocabCache.js.map +1 -0
  330. package/dist/setup/__tests__/coach-traces.test.d.ts +2 -0
  331. package/dist/setup/__tests__/coach-traces.test.d.ts.map +1 -0
  332. package/dist/setup/__tests__/coach-traces.test.js +189 -0
  333. package/dist/setup/__tests__/coach-traces.test.js.map +1 -0
  334. package/dist/setup/__tests__/setup-commands.test.d.ts +2 -0
  335. package/dist/setup/__tests__/setup-commands.test.d.ts.map +1 -0
  336. package/dist/setup/__tests__/setup-commands.test.js +177 -0
  337. package/dist/setup/__tests__/setup-commands.test.js.map +1 -0
  338. package/dist/setup/__tests__/state-machine.test.d.ts +2 -0
  339. package/dist/setup/__tests__/state-machine.test.d.ts.map +1 -0
  340. package/dist/setup/__tests__/state-machine.test.js +341 -0
  341. package/dist/setup/__tests__/state-machine.test.js.map +1 -0
  342. package/dist/setup/detect-surfaces.d.ts +21 -0
  343. package/dist/setup/detect-surfaces.d.ts.map +1 -0
  344. package/dist/setup/detect-surfaces.js +39 -0
  345. package/dist/setup/detect-surfaces.js.map +1 -0
  346. package/dist/setup/manifest-writer.d.ts +17 -0
  347. package/dist/setup/manifest-writer.d.ts.map +1 -0
  348. package/dist/setup/manifest-writer.js +153 -0
  349. package/dist/setup/manifest-writer.js.map +1 -0
  350. package/dist/setup/perimeter.d.ts +72 -0
  351. package/dist/setup/perimeter.d.ts.map +1 -0
  352. package/dist/setup/perimeter.js +128 -0
  353. package/dist/setup/perimeter.js.map +1 -0
  354. package/dist/setup/state-machine.d.ts +67 -0
  355. package/dist/setup/state-machine.d.ts.map +1 -0
  356. package/dist/setup/state-machine.js +124 -0
  357. package/dist/setup/state-machine.js.map +1 -0
  358. package/dist/surfaces/__tests__/adapter.test.d.ts +2 -0
  359. package/dist/surfaces/__tests__/adapter.test.d.ts.map +1 -0
  360. package/dist/surfaces/__tests__/adapter.test.js +90 -0
  361. package/dist/surfaces/__tests__/adapter.test.js.map +1 -0
  362. package/dist/surfaces/__tests__/pb-setup-passthrough.test.d.ts +2 -0
  363. package/dist/surfaces/__tests__/pb-setup-passthrough.test.d.ts.map +1 -0
  364. package/dist/surfaces/__tests__/pb-setup-passthrough.test.js +132 -0
  365. package/dist/surfaces/__tests__/pb-setup-passthrough.test.js.map +1 -0
  366. package/dist/surfaces/__tests__/telemetry.test.d.ts +2 -0
  367. package/dist/surfaces/__tests__/telemetry.test.d.ts.map +1 -0
  368. package/dist/surfaces/__tests__/telemetry.test.js +55 -0
  369. package/dist/surfaces/__tests__/telemetry.test.js.map +1 -0
  370. package/dist/surfaces/adapter.d.ts +70 -0
  371. package/dist/surfaces/adapter.d.ts.map +1 -0
  372. package/dist/surfaces/adapter.js +2 -0
  373. package/dist/surfaces/adapter.js.map +1 -0
  374. package/dist/surfaces/adapters/claude.d.ts +3 -0
  375. package/dist/surfaces/adapters/claude.d.ts.map +1 -0
  376. package/dist/surfaces/adapters/claude.js +67 -0
  377. package/dist/surfaces/adapters/claude.js.map +1 -0
  378. package/dist/surfaces/adapters/codex.d.ts +3 -0
  379. package/dist/surfaces/adapters/codex.d.ts.map +1 -0
  380. package/dist/surfaces/adapters/codex.js +61 -0
  381. package/dist/surfaces/adapters/codex.js.map +1 -0
  382. package/dist/surfaces/adapters/copilot.d.ts +3 -0
  383. package/dist/surfaces/adapters/copilot.d.ts.map +1 -0
  384. package/dist/surfaces/adapters/copilot.js +59 -0
  385. package/dist/surfaces/adapters/copilot.js.map +1 -0
  386. package/dist/surfaces/adapters/cursor.d.ts +3 -0
  387. package/dist/surfaces/adapters/cursor.d.ts.map +1 -0
  388. package/dist/surfaces/adapters/cursor.js +78 -0
  389. package/dist/surfaces/adapters/cursor.js.map +1 -0
  390. package/dist/surfaces/registry.d.ts +58 -2
  391. package/dist/surfaces/registry.d.ts.map +1 -1
  392. package/dist/surfaces/registry.js +82 -7
  393. package/dist/surfaces/registry.js.map +1 -1
  394. package/dist/surfaces/telemetry.d.ts +17 -0
  395. package/dist/surfaces/telemetry.d.ts.map +1 -0
  396. package/dist/surfaces/telemetry.js +31 -0
  397. package/dist/surfaces/telemetry.js.map +1 -0
  398. package/package.json +3 -1
  399. package/dist/__tests__/setup.test.d.ts +0 -2
  400. package/dist/__tests__/setup.test.d.ts.map +0 -1
  401. package/dist/__tests__/setup.test.js +0 -141
  402. package/dist/__tests__/setup.test.js.map +0 -1
  403. package/dist/generators/__tests__/surface-profiles.test.d.ts +0 -2
  404. package/dist/generators/__tests__/surface-profiles.test.d.ts.map +0 -1
  405. package/dist/generators/__tests__/surface-profiles.test.js +0 -89
  406. package/dist/generators/__tests__/surface-profiles.test.js.map +0 -1
  407. package/dist/lib/onboarding-phases.d.ts +0 -9
  408. package/dist/lib/onboarding-phases.d.ts.map +0 -1
  409. package/dist/lib/onboarding-phases.js +0 -120
  410. package/dist/lib/onboarding-phases.js.map +0 -1
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Setup write perimeter — WP-421 S7 (STD-236, doneWhen #22).
3
+ *
4
+ * Single runtime guard for every disk write the setup machinery makes. Writes
5
+ * are permitted ONLY within paths that the manifest explicitly declares safe:
6
+ *
7
+ * - `path.resolve(process.cwd(), '.productbrain')` — hard-coded canonical
8
+ * authoring root. Always allowed regardless of manifest contents (this is
9
+ * where pb itself stores its own state).
10
+ * - `path.resolve(process.cwd(), surface)` for every `surface` in
11
+ * `manifest.surfaces[]` — explicit per-workspace allowlist.
12
+ *
13
+ * Anything else throws `setup-perimeter-violation`. This is the single
14
+ * choke point the S7 perimeter fixtures exercise (HOME-sandboxed) and is the
15
+ * only place we encode the "PB never writes outside its declared surfaces"
16
+ * promise (STD-234) as RUNTIME enforcement rather than convention.
17
+ *
18
+ * Wiring follow-up: this module is NEW in S7. Adapter writers in
19
+ * `packages/cli/src/surfaces/adapters/*.ts` and the dormant-marker
20
+ * `appendFileSync` paths in `commands/handshake.ts` should call this guard
21
+ * before each write. That cross-cutting wiring is intentionally out of scope
22
+ * for S7 — see TEN capture in the slice notes (residual finding).
23
+ *
24
+ * Chain: STD-234 (write perimeter), STD-236 (this guard), DEC-952 (adapters),
25
+ * DEC-955 (manifest defaults).
26
+ */
27
+ /**
28
+ * The minimal manifest shape this guard consults. Accepts the full
29
+ * `Manifest` from `generators/manifest.ts` or any structurally compatible
30
+ * subset (e.g. tests that synthesize just `{ surfaces: [...] }`).
31
+ */
32
+ export interface PerimeterManifest {
33
+ surfaces?: string[];
34
+ }
35
+ /** Error code emitted when a write is refused. Stable string for tests. */
36
+ export declare const SETUP_PERIMETER_VIOLATION: "setup-perimeter-violation";
37
+ /**
38
+ * Optional argument bag — extends the manifest with a `cwd` override so callers
39
+ * can validate against an explicit repo root instead of `process.cwd()`. Added
40
+ * for WP-431 S3 (review fix #5) so the manifest writer no longer mutates global
41
+ * state via `process.chdir` to make the perimeter check land on the right root.
42
+ */
43
+ export interface PerimeterOptions {
44
+ cwd?: string;
45
+ }
46
+ /**
47
+ * Asserts that `absPath` is inside the setup write perimeter for the supplied
48
+ * `cwd` (or `process.cwd()` when omitted) + manifest. Throws an Error with
49
+ * `code === 'setup-perimeter-violation'` (and a descriptive message containing
50
+ * the offending path) when the write is refused.
51
+ *
52
+ * The function is synchronous and pure aside from the optional `process.cwd()`
53
+ * read — adapters call it inline before every write.
54
+ *
55
+ * Per STD-236 the path argument MUST already be absolute. Callers pass the
56
+ * fully-resolved on-disk path they intend to write to; the guard does the
57
+ * containment check from that point. (Resolving relative paths inside the
58
+ * guard would mask call-site bugs where the caller meant to write inside the
59
+ * repo but accidentally produced an absolute path elsewhere.)
60
+ */
61
+ export declare function assertSetupWritePath(absPath: string, manifest: PerimeterManifest, options?: PerimeterOptions): void;
62
+ /**
63
+ * isSetupWritePathAllowed — non-throwing companion to assertSetupWritePath.
64
+ *
65
+ * Returns true iff `absPath` resolves inside the perimeter (.productbrain/ plus the
66
+ * manifest's declared surfaces). Use it to filter candidate paths BEFORE asserting —
67
+ * e.g. surface paths a workspace hasn't enabled — so excluded surfaces are skipped
68
+ * silently instead of throwing and being logged as a false warning on every run.
69
+ * Empty/non-string/NUL paths return false (the assert variant throws on those).
70
+ */
71
+ export declare function isSetupWritePathAllowed(absPath: string, manifest: PerimeterManifest, options?: PerimeterOptions): boolean;
72
+ //# sourceMappingURL=perimeter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"perimeter.d.ts","sourceRoot":"","sources":["../../src/setup/perimeter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,2EAA2E;AAC3E,eAAO,MAAM,yBAAyB,EAAG,2BAAoC,CAAC;AA8B9E;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,GAAE,gBAAqB,GAC7B,IAAI,CAuBN;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAmBT"}
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Setup write perimeter — WP-421 S7 (STD-236, doneWhen #22).
3
+ *
4
+ * Single runtime guard for every disk write the setup machinery makes. Writes
5
+ * are permitted ONLY within paths that the manifest explicitly declares safe:
6
+ *
7
+ * - `path.resolve(process.cwd(), '.productbrain')` — hard-coded canonical
8
+ * authoring root. Always allowed regardless of manifest contents (this is
9
+ * where pb itself stores its own state).
10
+ * - `path.resolve(process.cwd(), surface)` for every `surface` in
11
+ * `manifest.surfaces[]` — explicit per-workspace allowlist.
12
+ *
13
+ * Anything else throws `setup-perimeter-violation`. This is the single
14
+ * choke point the S7 perimeter fixtures exercise (HOME-sandboxed) and is the
15
+ * only place we encode the "PB never writes outside its declared surfaces"
16
+ * promise (STD-234) as RUNTIME enforcement rather than convention.
17
+ *
18
+ * Wiring follow-up: this module is NEW in S7. Adapter writers in
19
+ * `packages/cli/src/surfaces/adapters/*.ts` and the dormant-marker
20
+ * `appendFileSync` paths in `commands/handshake.ts` should call this guard
21
+ * before each write. That cross-cutting wiring is intentionally out of scope
22
+ * for S7 — see TEN capture in the slice notes (residual finding).
23
+ *
24
+ * Chain: STD-234 (write perimeter), STD-236 (this guard), DEC-952 (adapters),
25
+ * DEC-955 (manifest defaults).
26
+ */
27
+ import { resolve, sep } from 'path';
28
+ /** Error code emitted when a write is refused. Stable string for tests. */
29
+ export const SETUP_PERIMETER_VIOLATION = 'setup-perimeter-violation';
30
+ /**
31
+ * Hard-coded authoring root. Always allowed in addition to manifest surfaces.
32
+ * Resolved at call time against `process.cwd()` so the perimeter shifts
33
+ * correctly when tests override the working directory.
34
+ */
35
+ const HARD_CODED_ALLOWED = '.productbrain';
36
+ /**
37
+ * Resolve `pathSpec` against a base. Treats `pathSpec` as relative to `base`
38
+ * unless it is already absolute. Mirrors `path.resolve(base, spec)` semantics
39
+ * but is spelled out for clarity at the call site below.
40
+ */
41
+ function resolveUnder(base, pathSpec) {
42
+ return resolve(base, pathSpec);
43
+ }
44
+ /**
45
+ * Returns true iff `candidate` is at or beneath `root`.
46
+ *
47
+ * Compares the resolved (canonical) forms with a path-separator-aware suffix
48
+ * check so `…/.productbrain` does not accidentally match `…/.productbrain-backup/`.
49
+ */
50
+ function isWithin(root, candidate) {
51
+ if (candidate === root)
52
+ return true;
53
+ const rootWithSep = root.endsWith(sep) ? root : root + sep;
54
+ return candidate.startsWith(rootWithSep);
55
+ }
56
+ /**
57
+ * Asserts that `absPath` is inside the setup write perimeter for the supplied
58
+ * `cwd` (or `process.cwd()` when omitted) + manifest. Throws an Error with
59
+ * `code === 'setup-perimeter-violation'` (and a descriptive message containing
60
+ * the offending path) when the write is refused.
61
+ *
62
+ * The function is synchronous and pure aside from the optional `process.cwd()`
63
+ * read — adapters call it inline before every write.
64
+ *
65
+ * Per STD-236 the path argument MUST already be absolute. Callers pass the
66
+ * fully-resolved on-disk path they intend to write to; the guard does the
67
+ * containment check from that point. (Resolving relative paths inside the
68
+ * guard would mask call-site bugs where the caller meant to write inside the
69
+ * repo but accidentally produced an absolute path elsewhere.)
70
+ */
71
+ export function assertSetupWritePath(absPath, manifest, options = {}) {
72
+ // Defensive: refuse non-absolute paths outright. The contract is "the
73
+ // caller resolves first, the guard checks containment" — accepting a
74
+ // relative path here would make the perimeter dependent on whatever
75
+ // `process.cwd()` happens to be when the guard runs.
76
+ if (!absPath || typeof absPath !== 'string') {
77
+ throw createPerimeterError('Empty or non-string path supplied to assertSetupWritePath.', absPath);
78
+ }
79
+ // Reject any path with NUL bytes outright — catches accidental binary
80
+ // payloads and also POSIX path-canonicalization tricks.
81
+ if (absPath.includes('\0')) {
82
+ throw createPerimeterError('Path contains NUL byte.', absPath);
83
+ }
84
+ if (isSetupWritePathAllowed(absPath, manifest, options))
85
+ return;
86
+ const surfaces = manifest.surfaces ?? [];
87
+ throw createPerimeterError(`Setup write refused: path is outside the declared perimeter ` +
88
+ `(.productbrain/ + manifest.surfaces[${surfaces.join(', ')}]).`, resolve(absPath));
89
+ }
90
+ /**
91
+ * isSetupWritePathAllowed — non-throwing companion to assertSetupWritePath.
92
+ *
93
+ * Returns true iff `absPath` resolves inside the perimeter (.productbrain/ plus the
94
+ * manifest's declared surfaces). Use it to filter candidate paths BEFORE asserting —
95
+ * e.g. surface paths a workspace hasn't enabled — so excluded surfaces are skipped
96
+ * silently instead of throwing and being logged as a false warning on every run.
97
+ * Empty/non-string/NUL paths return false (the assert variant throws on those).
98
+ */
99
+ export function isSetupWritePathAllowed(absPath, manifest, options = {}) {
100
+ if (!absPath || typeof absPath !== 'string')
101
+ return false;
102
+ if (absPath.includes('\0'))
103
+ return false;
104
+ const resolvedTarget = resolve(absPath);
105
+ // WP-431 S3 review fix #5: prefer the explicit cwd argument so callers can
106
+ // validate against an absolute repo root without mutating global state via
107
+ // `process.chdir`. Falls back to `process.cwd()` for legacy adapter callers.
108
+ const cwd = options.cwd ?? process.cwd();
109
+ const allowedRoots = [resolveUnder(cwd, HARD_CODED_ALLOWED)];
110
+ const surfaces = manifest.surfaces ?? [];
111
+ for (const surface of surfaces) {
112
+ if (typeof surface !== 'string' || surface.length === 0)
113
+ continue;
114
+ allowedRoots.push(resolveUnder(cwd, surface));
115
+ }
116
+ return allowedRoots.some((root) => isWithin(root, resolvedTarget));
117
+ }
118
+ /**
119
+ * Build a tagged Error for a perimeter violation. The `code` field is the
120
+ * stable string tests assert against; the `message` carries human context.
121
+ */
122
+ function createPerimeterError(reason, path) {
123
+ const err = new Error(`${reason} [path=${String(path)}]`);
124
+ err.code = SETUP_PERIMETER_VIOLATION;
125
+ err.path = path;
126
+ return err;
127
+ }
128
+ //# sourceMappingURL=perimeter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"perimeter.js","sourceRoot":"","sources":["../../src/setup/perimeter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAWpC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,yBAAyB,GAAG,2BAAoC,CAAC;AAE9E;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAE3C;;;;GAIG;AACH,SAAS,YAAY,CAAC,IAAY,EAAE,QAAgB;IAClD,OAAO,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED;;;;;GAKG;AACH,SAAS,QAAQ,CAAC,IAAY,EAAE,SAAiB;IAC/C,IAAI,SAAS,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC;IAC3D,OAAO,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;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AAE,kBAAkB,CAAC,CAAC,CAAC;IAEvE,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,IAAI,EAAE,CAAC;IACzC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAClE,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,SAAS,oBAAoB,CAAC,MAAc,EAAE,IAAa;IACzD,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,MAAM,UAAU,MAAM,CAAC,IAAI,CAAC,GAAG,CAGvD,CAAC;IACF,GAAG,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACrC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;IAChB,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * WP-431 S2 — pb-setup state machine (DEC-988, DEC-993, DEC-994).
3
+ *
4
+ * Pure resolver: given a snapshot of the workspace + per-user activation inputs,
5
+ * returns the (phase, role, expectedAction) tuple the pb-setup skill consumes
6
+ * to drive its install-to-activation flow. No I/O, no Convex imports — testable
7
+ * in isolation.
8
+ *
9
+ * Phase grammar (DEC-988):
10
+ * 1. Surface declaration — manifest.surfaces empty → exit when >=1 surface.
11
+ * 2. Local sync — CLI surfaces only; exit when 0 unimported assets.
12
+ * 3. Catalog adoption — exit when >=1 catalog adoption (or skip).
13
+ * 4. Capture loop — exit when >=10 confirmed entries AND >=2 distinct
14
+ * collections AND retrieval-demo confirmed (BR-141).
15
+ * 5. Activation — final receipt write; exit on userActivated=true.
16
+ * settings — post-activation re-run sub-state.
17
+ *
18
+ * Role detection (DEC-988):
19
+ * - joiner: workspaceMaterialized=true AND userActivated=false
20
+ * - creator: otherwise
21
+ *
22
+ * Surface capability (DEC-993):
23
+ * - chat-only surfaces (Cursor Desktop / Claude Desktop) skip Phases 1+2;
24
+ * manifest.surfaces is upstream-stamped with ['mcp-only'] so Phase 3 entry
25
+ * condition (P2 done OR surface-skipped) is satisfied either way.
26
+ *
27
+ * Soft-gate (DEC-994):
28
+ * - confirmedEntryCount >= 10 but entriesAcrossCollections < 2 → stay in P4
29
+ * and emit the diversity-nudge expectedAction.
30
+ */
31
+ export type SetupPhase = 1 | 2 | 3 | 4 | 5;
32
+ export type SetupRole = 'creator' | 'joiner';
33
+ export type SurfaceCapability = 'cli' | 'chat-only';
34
+ export interface SetupStateInput {
35
+ manifest: {
36
+ surfaces: string[];
37
+ };
38
+ assetCounts: {
39
+ totalAssets: number;
40
+ totalUnimported: number;
41
+ hasMore: boolean;
42
+ };
43
+ catalogAdoptionCount: number;
44
+ confirmedEntryCount: number;
45
+ entriesAcrossCollections: number;
46
+ retrievalDemoConfirmed: boolean;
47
+ workspaceMaterialized: boolean;
48
+ userActivated: boolean;
49
+ surfaceCapability: SurfaceCapability;
50
+ }
51
+ export interface SetupStateOutput {
52
+ phase: SetupPhase | 'settings';
53
+ role: SetupRole;
54
+ expectedAction: string;
55
+ reasonForPhase: string;
56
+ isComplete: boolean;
57
+ /**
58
+ * WP-431 S3 review fix #1: surfaceCapability is surfaced as a structural
59
+ * field on the resolver output (was previously a string-grep on
60
+ * `reasonForPhase` strings the producer never emits — broken silently).
61
+ * The resolver passes the input value straight through; consumers
62
+ * (e.g. CLI `recordSetupInvocation`) read this directly.
63
+ */
64
+ surfaceCapability: SurfaceCapability;
65
+ }
66
+ export declare function resolveSetupState(input: SetupStateInput): SetupStateOutput;
67
+ //# sourceMappingURL=state-machine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-machine.d.ts","sourceRoot":"","sources":["../../src/setup/state-machine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC3C,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7C,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,WAAW,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE;QAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACjC,WAAW,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAChF,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wBAAwB,EAAE,MAAM,CAAC;IACjC,sBAAsB,EAAE,OAAO,CAAC;IAChC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,UAAU,GAAG,UAAU,CAAC;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAqBD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAoF1E"}
@@ -0,0 +1,124 @@
1
+ /**
2
+ * WP-431 S2 — pb-setup state machine (DEC-988, DEC-993, DEC-994).
3
+ *
4
+ * Pure resolver: given a snapshot of the workspace + per-user activation inputs,
5
+ * returns the (phase, role, expectedAction) tuple the pb-setup skill consumes
6
+ * to drive its install-to-activation flow. No I/O, no Convex imports — testable
7
+ * in isolation.
8
+ *
9
+ * Phase grammar (DEC-988):
10
+ * 1. Surface declaration — manifest.surfaces empty → exit when >=1 surface.
11
+ * 2. Local sync — CLI surfaces only; exit when 0 unimported assets.
12
+ * 3. Catalog adoption — exit when >=1 catalog adoption (or skip).
13
+ * 4. Capture loop — exit when >=10 confirmed entries AND >=2 distinct
14
+ * collections AND retrieval-demo confirmed (BR-141).
15
+ * 5. Activation — final receipt write; exit on userActivated=true.
16
+ * settings — post-activation re-run sub-state.
17
+ *
18
+ * Role detection (DEC-988):
19
+ * - joiner: workspaceMaterialized=true AND userActivated=false
20
+ * - creator: otherwise
21
+ *
22
+ * Surface capability (DEC-993):
23
+ * - chat-only surfaces (Cursor Desktop / Claude Desktop) skip Phases 1+2;
24
+ * manifest.surfaces is upstream-stamped with ['mcp-only'] so Phase 3 entry
25
+ * condition (P2 done OR surface-skipped) is satisfied either way.
26
+ *
27
+ * Soft-gate (DEC-994):
28
+ * - confirmedEntryCount >= 10 but entriesAcrossCollections < 2 → stay in P4
29
+ * and emit the diversity-nudge expectedAction.
30
+ */
31
+ const ACTIONS = {
32
+ settings: 'User has activated. Settings menu: (1) add/remove surface, (2) re-import drift, (3) browse catalog updates.',
33
+ phase1: 'Run pb connect to declare a surface (claude, cursor, codex, copilot, mcp-only). The state machine advances when manifest.surfaces[] is non-empty.',
34
+ phase2: 'Run pb setup ingest (or pb setup migrate) to import the local .productbrain/ assets that have not yet been mirrored into Convex. Phase exits at totalUnimported=0.',
35
+ phase3: 'Browse the catalog and adopt at least one platform-seeded asset (skill / rule / hook), or skip explicitly. Phase exits at catalogAdoptionCount>=1 or on skip.',
36
+ phase4: 'Capture entries with pb capture and commit them. Demonstrate retrieval with pb get / pb orient on your own entry. Phase exits at confirmedEntryCount>=10 AND entriesAcrossCollections>=2 AND retrievalDemoConfirmed=true.',
37
+ phase4Diversity: "You have 10 entries but they're all in one collection. Try one entry in a different collection (decision/tension/insight/etc.) before activation.",
38
+ phase4Retrieval: 'You have 10+ entries across 2+ collections. Run pb get <ID> or pb orient on one of your own entries to confirm retrieval, then activate.',
39
+ phase5: 'Activate your workspace by calling setup.recordActivationReceipt. The receipt closes the install-to-activation flow.',
40
+ };
41
+ export function resolveSetupState(input) {
42
+ const role = computeRole(input);
43
+ if (input.userActivated) {
44
+ return {
45
+ phase: 'settings',
46
+ role,
47
+ expectedAction: ACTIONS.settings,
48
+ reasonForPhase: 'userActivated=true → settings sub-state (post-activation re-run).',
49
+ isComplete: true,
50
+ surfaceCapability: input.surfaceCapability,
51
+ };
52
+ }
53
+ const surfaceSkipsP1P2 = input.surfaceCapability === 'chat-only';
54
+ const isJoiner = role === 'joiner';
55
+ const p1Done = input.manifest.surfaces.length >= 1 || surfaceSkipsP1P2;
56
+ if (!p1Done && !isJoiner) {
57
+ return {
58
+ phase: 1,
59
+ role,
60
+ expectedAction: ACTIONS.phase1,
61
+ reasonForPhase: 'manifest.surfaces empty AND surfaceCapability=cli → Phase 1.',
62
+ isComplete: false,
63
+ surfaceCapability: input.surfaceCapability,
64
+ };
65
+ }
66
+ const p2Skipped = surfaceSkipsP1P2;
67
+ const p2Done = p2Skipped || input.assetCounts.totalUnimported === 0;
68
+ if (!p2Done) {
69
+ return {
70
+ phase: 2,
71
+ role,
72
+ expectedAction: ACTIONS.phase2,
73
+ reasonForPhase: `Phase 1 done; assetCounts.totalUnimported=${input.assetCounts.totalUnimported} > 0 → Phase 2.`,
74
+ isComplete: false,
75
+ surfaceCapability: input.surfaceCapability,
76
+ };
77
+ }
78
+ const p3Skipped = isJoiner;
79
+ const p3Done = p3Skipped || input.catalogAdoptionCount >= 1;
80
+ if (!p3Done) {
81
+ return {
82
+ phase: 3,
83
+ role,
84
+ expectedAction: ACTIONS.phase3,
85
+ reasonForPhase: `Phase 2 done${surfaceSkipsP1P2 ? ' (surface-skipped per DEC-993)' : ''}; catalogAdoptionCount=0 → Phase 3.`,
86
+ isComplete: false,
87
+ surfaceCapability: input.surfaceCapability,
88
+ };
89
+ }
90
+ const enoughEntries = input.confirmedEntryCount >= 10;
91
+ const enoughDiversity = input.entriesAcrossCollections >= 2;
92
+ const p4Done = enoughEntries && enoughDiversity && input.retrievalDemoConfirmed;
93
+ if (!p4Done) {
94
+ let action = ACTIONS.phase4;
95
+ if (enoughEntries && !enoughDiversity) {
96
+ action = ACTIONS.phase4Diversity;
97
+ }
98
+ else if (enoughEntries && enoughDiversity && !input.retrievalDemoConfirmed) {
99
+ action = ACTIONS.phase4Retrieval;
100
+ }
101
+ return {
102
+ phase: 4,
103
+ role,
104
+ expectedAction: action,
105
+ reasonForPhase: `Phase 3 done${p3Skipped ? ' (joiner skip)' : ''}; confirmedEntryCount=${input.confirmedEntryCount} (>=10? ${enoughEntries}), entriesAcrossCollections=${input.entriesAcrossCollections} (>=2? ${enoughDiversity}), retrievalDemoConfirmed=${input.retrievalDemoConfirmed} → Phase 4.`,
106
+ isComplete: false,
107
+ surfaceCapability: input.surfaceCapability,
108
+ };
109
+ }
110
+ return {
111
+ phase: 5,
112
+ role,
113
+ expectedAction: ACTIONS.phase5,
114
+ reasonForPhase: 'Phase 4 exit conditions met (>=10 entries, >=2 collections, retrieval demo confirmed); userActivated=false → Phase 5.',
115
+ isComplete: false,
116
+ surfaceCapability: input.surfaceCapability,
117
+ };
118
+ }
119
+ function computeRole(input) {
120
+ if (input.workspaceMaterialized && !input.userActivated)
121
+ return 'joiner';
122
+ return 'creator';
123
+ }
124
+ //# sourceMappingURL=state-machine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-machine.js","sourceRoot":"","sources":["../../src/setup/state-machine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAkCH,MAAM,OAAO,GAAG;IACd,QAAQ,EACN,6GAA6G;IAC/G,MAAM,EACJ,mJAAmJ;IACrJ,MAAM,EACJ,oKAAoK;IACtK,MAAM,EACJ,+JAA+J;IACjK,MAAM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wB,UAAU,eAAe,6BAA6B,KAAK,CAAC,sBAAsB,aAAa;YACtS,UAAU,EAAE,KAAK;YACjB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IAED,OAAO;QACL,KAAK,EAAE,CAAC;QACR,IAAI;QACJ,cAAc,EAAE,OAAO,CAAC,MAAM;QAC9B,cAAc,EACZ,uHAAuH;QACzH,UAAU,EAAE,KAAK;QACjB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;KAC3C,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAsB;IACzC,IAAI,KAAK,CAAC,qBAAqB,IAAI,CAAC,KAAK,CAAC,aAAa;QAAE,OAAO,QAAQ,CAAC;IACzE,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=adapter.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.test.d.ts","sourceRoot":"","sources":["../../../src/surfaces/__tests__/adapter.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * SurfaceAdapter contract tests — WP-421 S2c (DEC-952).
3
+ *
4
+ * Verifies every adapter:
5
+ * - has identity, displayName, detect, paths, transform, goldens, canonicalPathFor.
6
+ * - has at least one golden fixture and transform(canonical) === expected.
7
+ * - canonicalPathFor returns null for paths not belonging to that surface.
8
+ */
9
+ import { describe, expect, it } from 'vitest';
10
+ import { SURFACE_ADAPTERS, SURFACE_ADAPTER_LIST } from '../registry.js';
11
+ import { claudeAdapter } from '../adapters/claude.js';
12
+ import { cursorAdapter } from '../adapters/cursor.js';
13
+ import { codexAdapter } from '../adapters/codex.js';
14
+ import { copilotAdapter } from '../adapters/copilot.js';
15
+ describe('SurfaceAdapter contract', () => {
16
+ it('registers all four adapters', () => {
17
+ expect(SURFACE_ADAPTER_LIST).toHaveLength(4);
18
+ expect(Object.keys(SURFACE_ADAPTERS).sort()).toEqual(['claude', 'codex', 'copilot', 'cursor']);
19
+ });
20
+ it.each(SURFACE_ADAPTER_LIST.map((a) => [a.name, a]))('%s adapter exposes the full interface', (_name, adapter) => {
21
+ expect(typeof adapter.name).toBe('string');
22
+ expect(typeof adapter.displayName).toBe('string');
23
+ expect(typeof adapter.detect).toBe('function');
24
+ expect(typeof adapter.paths).toBe('function');
25
+ expect(typeof adapter.transform).toBe('function');
26
+ expect(typeof adapter.canonicalPathFor).toBe('function');
27
+ expect(Array.isArray(adapter.goldens)).toBe(true);
28
+ expect(adapter.goldens.length).toBeGreaterThan(0);
29
+ });
30
+ it.each(SURFACE_ADAPTER_LIST.map((a) => [a.name, a]))('%s goldens round-trip transform === expected', (_name, adapter) => {
31
+ for (const golden of adapter.goldens) {
32
+ const out = adapter.transform({ canonical: golden.canonical });
33
+ expect(out).toBe(golden.expected);
34
+ }
35
+ });
36
+ });
37
+ describe('canonicalPathFor — per-surface mapping', () => {
38
+ it('claude maps .claude/rules/foo.md → .productbrain/rules/foo.md', () => {
39
+ expect(claudeAdapter.canonicalPathFor('.claude/rules/foo.md')).toBe('.productbrain/rules/foo.md');
40
+ });
41
+ it('claude maps .claude/skills/orient.md → .productbrain/skills/orient.md', () => {
42
+ expect(claudeAdapter.canonicalPathFor('.claude/skills/orient.md')).toBe('.productbrain/skills/orient.md');
43
+ });
44
+ it('claude returns null for non-claude paths', () => {
45
+ expect(claudeAdapter.canonicalPathFor('.cursor/rules/foo.mdc')).toBeNull();
46
+ expect(claudeAdapter.canonicalPathFor('.github/copilot-instructions.md')).toBeNull();
47
+ expect(claudeAdapter.canonicalPathFor('AGENTS.md')).toBeNull();
48
+ });
49
+ it('cursor flips .mdc → .md (the headline cursor signature)', () => {
50
+ expect(cursorAdapter.canonicalPathFor('.cursor/rules/foo.mdc')).toBe('.productbrain/rules/foo.md');
51
+ });
52
+ it('cursor maps .cursor/skills/<name>/SKILL.md → .productbrain/skills/<name>.md', () => {
53
+ expect(cursorAdapter.canonicalPathFor('.cursor/skills/sample/SKILL.md')).toBe('.productbrain/skills/sample.md');
54
+ });
55
+ it('cursor returns null for non-cursor paths and the wrong extension', () => {
56
+ expect(cursorAdapter.canonicalPathFor('.cursor/rules/foo.md')).toBeNull();
57
+ expect(cursorAdapter.canonicalPathFor('.claude/rules/foo.md')).toBeNull();
58
+ });
59
+ it('codex maps .codex/skills/orient.md → .productbrain/skills/orient.md', () => {
60
+ expect(codexAdapter.canonicalPathFor('.codex/skills/orient.md')).toBe('.productbrain/skills/orient.md');
61
+ });
62
+ it('codex returns null for AGENTS.md and non-codex paths', () => {
63
+ expect(codexAdapter.canonicalPathFor('AGENTS.md')).toBeNull();
64
+ expect(codexAdapter.canonicalPathFor('.cursor/rules/foo.mdc')).toBeNull();
65
+ });
66
+ it('copilot returns null for its aggregate file (no defensible 1:1 reverse map)', () => {
67
+ expect(copilotAdapter.canonicalPathFor('.github/copilot-instructions.md')).toBeNull();
68
+ expect(copilotAdapter.canonicalPathFor('.claude/rules/foo.md')).toBeNull();
69
+ });
70
+ });
71
+ describe('canonicalPathFor — forward project then reverse map round-trips', () => {
72
+ it.each([
73
+ [claudeAdapter, 'rule', 'foo'],
74
+ [claudeAdapter, 'skill', 'orient'],
75
+ [cursorAdapter, 'rule', 'foo'],
76
+ [cursorAdapter, 'skill', 'sample'],
77
+ [codexAdapter, 'skill', 'orient'],
78
+ ])('%s adapter %s "%s" projects forward then reverse-maps back to .productbrain', (adapter, kind, basename) => {
79
+ const projection = adapter.paths({ kind, basename }).projectionPath;
80
+ const reverse = adapter.canonicalPathFor(projection);
81
+ const expected = `.productbrain/${kind === 'rule' ? 'rules' : 'skills'}/${basename}.md`;
82
+ expect(reverse).toBe(expected);
83
+ });
84
+ it('copilot forward-projects to the aggregate file but reverse-maps to null (telemetry fallback)', () => {
85
+ const projection = copilotAdapter.paths({ kind: 'rule', basename: 'foo' }).projectionPath;
86
+ expect(projection).toBe('.github/copilot-instructions.md');
87
+ expect(copilotAdapter.canonicalPathFor(projection)).toBeNull();
88
+ });
89
+ });
90
+ //# sourceMappingURL=adapter.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.test.js","sourceRoot":"","sources":["../../../src/surfaces/__tests__/adapter.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACrC,MAAM,CAAC,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAC7C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAClD,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CACzC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CACnD,uCAAuC,EACvC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACjB,MAAM,CAAC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,MAAM,CAAC,OAAO,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CA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AAiB,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,KAAK,CAAC;QACxF,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC,CACF,CAAC;IAEF,EAAE,CAAC,8FAA8F,EAAE,GAAG,EAAE;QACtG,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,cAAc,CAAC;QAC1F,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;QAC3D,MAAM,CAAC,cAAc,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=pb-setup-passthrough.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pb-setup-passthrough.test.d.ts","sourceRoot":"","sources":["../../../src/surfaces/__tests__/pb-setup-passthrough.test.ts"],"names":[],"mappings":""}