openplanr 1.25.3 → 2.0.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 (1738) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/CONTRIBUTING.md +33 -0
  3. package/README.md +154 -131
  4. package/dist/cli/commands/artifact.d.ts.map +1 -1
  5. package/dist/cli/commands/artifact.js +214 -30
  6. package/dist/cli/commands/artifact.js.map +1 -1
  7. package/dist/cli/commands/backlog.d.ts +1 -21
  8. package/dist/cli/commands/backlog.d.ts.map +1 -1
  9. package/dist/cli/commands/backlog.js +1 -428
  10. package/dist/cli/commands/backlog.js.map +1 -1
  11. package/dist/cli/commands/company.d.ts +3 -0
  12. package/dist/cli/commands/company.d.ts.map +1 -0
  13. package/dist/cli/commands/company.js +173 -0
  14. package/dist/cli/commands/company.js.map +1 -0
  15. package/dist/cli/commands/config-deterministic.d.ts +3 -0
  16. package/dist/cli/commands/config-deterministic.d.ts.map +1 -0
  17. package/dist/cli/commands/config-deterministic.js +88 -0
  18. package/dist/cli/commands/config-deterministic.js.map +1 -0
  19. package/dist/cli/commands/dashboard.d.ts +3 -0
  20. package/dist/cli/commands/dashboard.d.ts.map +1 -0
  21. package/dist/cli/commands/dashboard.js +36 -0
  22. package/dist/cli/commands/dashboard.js.map +1 -0
  23. package/dist/cli/commands/diagram/index.d.ts +3 -0
  24. package/dist/cli/commands/diagram/index.d.ts.map +1 -0
  25. package/dist/cli/commands/diagram/index.js +73 -0
  26. package/dist/cli/commands/diagram/index.js.map +1 -0
  27. package/dist/cli/commands/diagram/presentation.d.ts +4 -0
  28. package/dist/cli/commands/diagram/presentation.d.ts.map +1 -0
  29. package/dist/cli/commands/diagram/presentation.js +38 -0
  30. package/dist/cli/commands/diagram/presentation.js.map +1 -0
  31. package/dist/cli/commands/doctor.d.ts.map +1 -1
  32. package/dist/cli/commands/doctor.js +1 -11
  33. package/dist/cli/commands/doctor.js.map +1 -1
  34. package/dist/cli/commands/epic.d.ts +1 -9
  35. package/dist/cli/commands/epic.d.ts.map +1 -1
  36. package/dist/cli/commands/epic.js +1 -259
  37. package/dist/cli/commands/epic.js.map +1 -1
  38. package/dist/cli/commands/feature.d.ts +1 -8
  39. package/dist/cli/commands/feature.d.ts.map +1 -1
  40. package/dist/cli/commands/feature.js +1 -220
  41. package/dist/cli/commands/feature.js.map +1 -1
  42. package/dist/cli/commands/groups/delivery.d.ts +3 -0
  43. package/dist/cli/commands/groups/delivery.d.ts.map +1 -0
  44. package/dist/cli/commands/groups/delivery.js +13 -0
  45. package/dist/cli/commands/groups/delivery.js.map +1 -0
  46. package/dist/cli/commands/groups/foundation.d.ts +3 -0
  47. package/dist/cli/commands/groups/foundation.d.ts.map +1 -0
  48. package/dist/cli/commands/groups/foundation.js +11 -0
  49. package/dist/cli/commands/groups/foundation.js.map +1 -0
  50. package/dist/cli/commands/groups/intelligence.d.ts +3 -0
  51. package/dist/cli/commands/groups/intelligence.d.ts.map +1 -0
  52. package/dist/cli/commands/groups/intelligence.js +19 -0
  53. package/dist/cli/commands/groups/intelligence.js.map +1 -0
  54. package/dist/cli/commands/groups/operations.d.ts +3 -0
  55. package/dist/cli/commands/groups/operations.d.ts.map +1 -0
  56. package/dist/cli/commands/groups/operations.js +17 -0
  57. package/dist/cli/commands/groups/operations.js.map +1 -0
  58. package/dist/cli/commands/groups/planning.d.ts +3 -0
  59. package/dist/cli/commands/groups/planning.d.ts.map +1 -0
  60. package/dist/cli/commands/groups/planning.js +25 -0
  61. package/dist/cli/commands/groups/planning.js.map +1 -0
  62. package/dist/cli/commands/index.d.ts +4 -0
  63. package/dist/cli/commands/index.d.ts.map +1 -0
  64. package/dist/cli/commands/index.js +14 -0
  65. package/dist/cli/commands/index.js.map +1 -0
  66. package/dist/cli/commands/init-deterministic.d.ts +3 -0
  67. package/dist/cli/commands/init-deterministic.d.ts.map +1 -0
  68. package/dist/cli/commands/init-deterministic.js +40 -0
  69. package/dist/cli/commands/init-deterministic.js.map +1 -0
  70. package/dist/cli/commands/land.d.ts +15 -0
  71. package/dist/cli/commands/land.d.ts.map +1 -0
  72. package/dist/cli/commands/land.js +176 -0
  73. package/dist/cli/commands/land.js.map +1 -0
  74. package/dist/cli/commands/operate/input.d.ts +54 -0
  75. package/dist/cli/commands/operate/input.d.ts.map +1 -0
  76. package/dist/cli/commands/operate/input.js +98 -0
  77. package/dist/cli/commands/operate/input.js.map +1 -0
  78. package/dist/cli/commands/operate/registrars/assignments.d.ts +5 -0
  79. package/dist/cli/commands/operate/registrars/assignments.d.ts.map +1 -0
  80. package/dist/cli/commands/operate/registrars/assignments.js +167 -0
  81. package/dist/cli/commands/operate/registrars/assignments.js.map +1 -0
  82. package/dist/cli/commands/operate/registrars/catalog.d.ts +4 -0
  83. package/dist/cli/commands/operate/registrars/catalog.d.ts.map +1 -0
  84. package/dist/cli/commands/operate/registrars/catalog.js +12 -0
  85. package/dist/cli/commands/operate/registrars/catalog.js.map +1 -0
  86. package/dist/cli/commands/operate/registrars/contracts.d.ts +41 -0
  87. package/dist/cli/commands/operate/registrars/contracts.d.ts.map +1 -0
  88. package/dist/cli/commands/operate/registrars/contracts.js +2 -0
  89. package/dist/cli/commands/operate/registrars/contracts.js.map +1 -0
  90. package/dist/cli/commands/operate/registrars/dashboard.d.ts +4 -0
  91. package/dist/cli/commands/operate/registrars/dashboard.d.ts.map +1 -0
  92. package/dist/cli/commands/operate/registrars/dashboard.js +26 -0
  93. package/dist/cli/commands/operate/registrars/dashboard.js.map +1 -0
  94. package/dist/cli/commands/operate/registrars/dispatch.d.ts +7 -0
  95. package/dist/cli/commands/operate/registrars/dispatch.d.ts.map +1 -0
  96. package/dist/cli/commands/operate/registrars/dispatch.js +55 -0
  97. package/dist/cli/commands/operate/registrars/dispatch.js.map +1 -0
  98. package/dist/cli/commands/operate/registrars/experience.d.ts +4 -0
  99. package/dist/cli/commands/operate/registrars/experience.d.ts.map +1 -0
  100. package/dist/cli/commands/operate/registrars/experience.js +93 -0
  101. package/dist/cli/commands/operate/registrars/experience.js.map +1 -0
  102. package/dist/cli/commands/operate/registrars/index.d.ts +5 -0
  103. package/dist/cli/commands/operate/registrars/index.d.ts.map +1 -0
  104. package/dist/cli/commands/operate/registrars/index.js +28 -0
  105. package/dist/cli/commands/operate/registrars/index.js.map +1 -0
  106. package/dist/cli/commands/operate/registrars/lifecycle.d.ts +4 -0
  107. package/dist/cli/commands/operate/registrars/lifecycle.d.ts.map +1 -0
  108. package/dist/cli/commands/operate/registrars/lifecycle.js +46 -0
  109. package/dist/cli/commands/operate/registrars/lifecycle.js.map +1 -0
  110. package/dist/cli/commands/operate/registrars/measurement.d.ts +4 -0
  111. package/dist/cli/commands/operate/registrars/measurement.d.ts.map +1 -0
  112. package/dist/cli/commands/operate/registrars/measurement.js +122 -0
  113. package/dist/cli/commands/operate/registrars/measurement.js.map +1 -0
  114. package/dist/cli/commands/operate/registrars/note-validation.d.ts +6 -0
  115. package/dist/cli/commands/operate/registrars/note-validation.d.ts.map +1 -0
  116. package/dist/cli/commands/operate/registrars/note-validation.js +103 -0
  117. package/dist/cli/commands/operate/registrars/note-validation.js.map +1 -0
  118. package/dist/cli/commands/operate/registrars/planning.d.ts +4 -0
  119. package/dist/cli/commands/operate/registrars/planning.d.ts.map +1 -0
  120. package/dist/cli/commands/operate/registrars/planning.js +41 -0
  121. package/dist/cli/commands/operate/registrars/planning.js.map +1 -0
  122. package/dist/cli/commands/operate/registrars/recovery.d.ts +4 -0
  123. package/dist/cli/commands/operate/registrars/recovery.d.ts.map +1 -0
  124. package/dist/cli/commands/operate/registrars/recovery.js +65 -0
  125. package/dist/cli/commands/operate/registrars/recovery.js.map +1 -0
  126. package/dist/cli/commands/operate/registrars/reviews.d.ts +4 -0
  127. package/dist/cli/commands/operate/registrars/reviews.d.ts.map +1 -0
  128. package/dist/cli/commands/operate/registrars/reviews.js +83 -0
  129. package/dist/cli/commands/operate/registrars/reviews.js.map +1 -0
  130. package/dist/cli/commands/operate/registration.d.ts +4 -0
  131. package/dist/cli/commands/operate/registration.d.ts.map +1 -0
  132. package/dist/cli/commands/operate/registration.js +3 -0
  133. package/dist/cli/commands/operate/registration.js.map +1 -0
  134. package/dist/cli/commands/operate/render.d.ts +19 -0
  135. package/dist/cli/commands/operate/render.d.ts.map +1 -0
  136. package/dist/cli/commands/operate/render.js +201 -0
  137. package/dist/cli/commands/operate/render.js.map +1 -0
  138. package/dist/cli/commands/operate.d.ts +58 -13
  139. package/dist/cli/commands/operate.d.ts.map +1 -1
  140. package/dist/cli/commands/operate.js +169 -984
  141. package/dist/cli/commands/operate.js.map +1 -1
  142. package/dist/cli/commands/planning-artifacts.d.ts +10 -0
  143. package/dist/cli/commands/planning-artifacts.d.ts.map +1 -0
  144. package/dist/cli/commands/planning-artifacts.js +350 -0
  145. package/dist/cli/commands/planning-artifacts.js.map +1 -0
  146. package/dist/cli/commands/quick/interaction.d.ts +8 -0
  147. package/dist/cli/commands/quick/interaction.d.ts.map +1 -0
  148. package/dist/cli/commands/quick/interaction.js +8 -0
  149. package/dist/cli/commands/quick/interaction.js.map +1 -0
  150. package/dist/cli/commands/quick/project.d.ts +8 -0
  151. package/dist/cli/commands/quick/project.d.ts.map +1 -0
  152. package/dist/cli/commands/quick/project.js +8 -0
  153. package/dist/cli/commands/quick/project.js.map +1 -0
  154. package/dist/cli/commands/quick.d.ts +1 -29
  155. package/dist/cli/commands/quick.d.ts.map +1 -1
  156. package/dist/cli/commands/quick.js +1 -337
  157. package/dist/cli/commands/quick.js.map +1 -1
  158. package/dist/cli/commands/rules.js +1 -1
  159. package/dist/cli/commands/rules.js.map +1 -1
  160. package/dist/cli/commands/setup.d.ts.map +1 -1
  161. package/dist/cli/commands/setup.js +40 -18
  162. package/dist/cli/commands/setup.js.map +1 -1
  163. package/dist/cli/commands/spec.d.ts +6 -4
  164. package/dist/cli/commands/spec.d.ts.map +1 -1
  165. package/dist/cli/commands/spec.js +166 -174
  166. package/dist/cli/commands/spec.js.map +1 -1
  167. package/dist/cli/commands/sprint.d.ts +1 -8
  168. package/dist/cli/commands/sprint.d.ts.map +1 -1
  169. package/dist/cli/commands/sprint.js +1 -522
  170. package/dist/cli/commands/sprint.js.map +1 -1
  171. package/dist/cli/commands/story/interaction.d.ts +7 -0
  172. package/dist/cli/commands/story/interaction.d.ts.map +1 -0
  173. package/dist/cli/commands/story/interaction.js +7 -0
  174. package/dist/cli/commands/story/interaction.js.map +1 -0
  175. package/dist/cli/commands/story/project.d.ts +10 -0
  176. package/dist/cli/commands/story/project.d.ts.map +1 -0
  177. package/dist/cli/commands/story/project.js +10 -0
  178. package/dist/cli/commands/story/project.js.map +1 -0
  179. package/dist/cli/commands/story.d.ts +1 -8
  180. package/dist/cli/commands/story.d.ts.map +1 -1
  181. package/dist/cli/commands/story.js +1 -358
  182. package/dist/cli/commands/story.js.map +1 -1
  183. package/dist/cli/commands/task.d.ts +1 -9
  184. package/dist/cli/commands/task.d.ts.map +1 -1
  185. package/dist/cli/commands/task.js +1 -351
  186. package/dist/cli/commands/task.js.map +1 -1
  187. package/dist/cli/error-boundary.d.ts +29 -0
  188. package/dist/cli/error-boundary.d.ts.map +1 -0
  189. package/dist/cli/error-boundary.js +103 -0
  190. package/dist/cli/error-boundary.js.map +1 -0
  191. package/dist/cli/helpers/bulk-checkbox-update.d.ts +1 -1
  192. package/dist/cli/helpers/bulk-checkbox-update.js +1 -1
  193. package/dist/cli/index.js +38 -113
  194. package/dist/cli/index.js.map +1 -1
  195. package/dist/dashboard/.vite/manifest.json +68 -0
  196. package/dist/dashboard/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  197. package/dist/dashboard/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  198. package/dist/dashboard/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  199. package/dist/dashboard/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  200. package/dist/dashboard/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
  201. package/dist/dashboard/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
  202. package/dist/dashboard/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
  203. package/dist/dashboard/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
  204. package/dist/dashboard/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
  205. package/dist/dashboard/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
  206. package/dist/dashboard/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  207. package/dist/dashboard/assets/index-Bk8DyO_2.css +1 -0
  208. package/dist/dashboard/assets/index-zeygL5iu.js +557 -0
  209. package/dist/dashboard/assets/index-zeygL5iu.js.map +1 -0
  210. package/dist/dashboard/dashboard-manifest.json +84 -0
  211. package/dist/dashboard/index.html +13 -0
  212. package/dist/generators/base-generator.d.ts +2 -0
  213. package/dist/generators/base-generator.d.ts.map +1 -1
  214. package/dist/generators/base-generator.js +8 -0
  215. package/dist/generators/base-generator.js.map +1 -1
  216. package/dist/generators/claude-generator.d.ts.map +1 -1
  217. package/dist/generators/claude-generator.js +12 -14
  218. package/dist/generators/claude-generator.js.map +1 -1
  219. package/dist/generators/codex-generator.d.ts.map +1 -1
  220. package/dist/generators/codex-generator.js +7 -7
  221. package/dist/generators/codex-generator.js.map +1 -1
  222. package/dist/generators/cursor-generator.d.ts.map +1 -1
  223. package/dist/generators/cursor-generator.js +11 -30
  224. package/dist/generators/cursor-generator.js.map +1 -1
  225. package/dist/models/schema.d.ts +0 -23
  226. package/dist/models/schema.d.ts.map +1 -1
  227. package/dist/models/schema.js +0 -7
  228. package/dist/models/schema.js.map +1 -1
  229. package/dist/models/types.d.ts +3 -14
  230. package/dist/models/types.d.ts.map +1 -1
  231. package/dist/services/artifact-pipeline-service.d.ts +99 -1
  232. package/dist/services/artifact-pipeline-service.d.ts.map +1 -1
  233. package/dist/services/artifact-pipeline-service.js +681 -4
  234. package/dist/services/artifact-pipeline-service.js.map +1 -1
  235. package/dist/services/canonical-json.d.ts +3 -0
  236. package/dist/services/canonical-json.d.ts.map +1 -0
  237. package/dist/services/canonical-json.js +71 -0
  238. package/dist/services/canonical-json.js.map +1 -0
  239. package/dist/services/claude-plugin-service.d.ts +6 -1
  240. package/dist/services/claude-plugin-service.d.ts.map +1 -1
  241. package/dist/services/claude-plugin-service.js +184 -12
  242. package/dist/services/claude-plugin-service.js.map +1 -1
  243. package/dist/services/codex-plugin-service.d.ts +30 -0
  244. package/dist/services/codex-plugin-service.d.ts.map +1 -0
  245. package/dist/services/codex-plugin-service.js +195 -0
  246. package/dist/services/codex-plugin-service.js.map +1 -0
  247. package/dist/services/company-auth-service.d.ts +70 -0
  248. package/dist/services/company-auth-service.d.ts.map +1 -0
  249. package/dist/services/company-auth-service.js +720 -0
  250. package/dist/services/company-auth-service.js.map +1 -0
  251. package/dist/services/company-auth-store.d.ts +22 -0
  252. package/dist/services/company-auth-store.d.ts.map +1 -0
  253. package/dist/services/company-auth-store.js +158 -0
  254. package/dist/services/company-auth-store.js.map +1 -0
  255. package/dist/services/company-common.d.ts +9 -0
  256. package/dist/services/company-common.d.ts.map +1 -0
  257. package/dist/services/company-common.js +35 -0
  258. package/dist/services/company-common.js.map +1 -0
  259. package/dist/services/company-sync-service.d.ts +214 -0
  260. package/dist/services/company-sync-service.d.ts.map +1 -0
  261. package/dist/services/company-sync-service.js +1299 -0
  262. package/dist/services/company-sync-service.js.map +1 -0
  263. package/dist/services/connectors/adapters/business-metrics.d.ts +5 -0
  264. package/dist/services/connectors/adapters/business-metrics.d.ts.map +1 -0
  265. package/dist/services/connectors/adapters/business-metrics.js +41 -0
  266. package/dist/services/connectors/adapters/business-metrics.js.map +1 -0
  267. package/dist/services/connectors/adapters/deployment-health.d.ts +18 -0
  268. package/dist/services/connectors/adapters/deployment-health.d.ts.map +1 -0
  269. package/dist/services/connectors/adapters/deployment-health.js +67 -0
  270. package/dist/services/connectors/adapters/deployment-health.js.map +1 -0
  271. package/dist/services/connectors/adapters/github.d.ts +5 -0
  272. package/dist/services/connectors/adapters/github.d.ts.map +1 -0
  273. package/dist/services/connectors/adapters/github.js +31 -0
  274. package/dist/services/connectors/adapters/github.js.map +1 -0
  275. package/dist/services/connectors/adapters/linear-jira.d.ts +5 -0
  276. package/dist/services/connectors/adapters/linear-jira.d.ts.map +1 -0
  277. package/dist/services/connectors/adapters/linear-jira.js +26 -0
  278. package/dist/services/connectors/adapters/linear-jira.js.map +1 -0
  279. package/dist/services/connectors/adapters/posthog.d.ts +5 -0
  280. package/dist/services/connectors/adapters/posthog.d.ts.map +1 -0
  281. package/dist/services/connectors/adapters/posthog.js +31 -0
  282. package/dist/services/connectors/adapters/posthog.js.map +1 -0
  283. package/dist/services/connectors/adapters/sentry.d.ts +5 -0
  284. package/dist/services/connectors/adapters/sentry.d.ts.map +1 -0
  285. package/dist/services/connectors/adapters/sentry.js +31 -0
  286. package/dist/services/connectors/adapters/sentry.js.map +1 -0
  287. package/dist/services/connectors/checkpoint-custody.d.ts +45 -0
  288. package/dist/services/connectors/checkpoint-custody.d.ts.map +1 -0
  289. package/dist/services/connectors/checkpoint-custody.js +496 -0
  290. package/dist/services/connectors/checkpoint-custody.js.map +1 -0
  291. package/dist/services/connectors/connector-registry.d.ts +144 -0
  292. package/dist/services/connectors/connector-registry.d.ts.map +1 -0
  293. package/dist/services/connectors/connector-registry.js +423 -0
  294. package/dist/services/connectors/connector-registry.js.map +1 -0
  295. package/dist/services/connectors/connector-runtime.d.ts +200 -0
  296. package/dist/services/connectors/connector-runtime.d.ts.map +1 -0
  297. package/dist/services/connectors/connector-runtime.js +1297 -0
  298. package/dist/services/connectors/connector-runtime.js.map +1 -0
  299. package/dist/services/connectors/credential-custody.d.ts +96 -0
  300. package/dist/services/connectors/credential-custody.d.ts.map +1 -0
  301. package/dist/services/connectors/credential-custody.js +390 -0
  302. package/dist/services/connectors/credential-custody.js.map +1 -0
  303. package/dist/services/credential-backends.d.ts +11 -1
  304. package/dist/services/credential-backends.d.ts.map +1 -1
  305. package/dist/services/credential-backends.js +104 -21
  306. package/dist/services/credential-backends.js.map +1 -1
  307. package/dist/services/credential-write-lock.d.ts +8 -0
  308. package/dist/services/credential-write-lock.d.ts.map +1 -0
  309. package/dist/services/credential-write-lock.js +104 -0
  310. package/dist/services/credential-write-lock.js.map +1 -0
  311. package/dist/services/credentials-service.d.ts +8 -2
  312. package/dist/services/credentials-service.d.ts.map +1 -1
  313. package/dist/services/credentials-service.js +66 -21
  314. package/dist/services/credentials-service.js.map +1 -1
  315. package/dist/services/deprecation-notices.d.ts +2 -2
  316. package/dist/services/deprecation-notices.d.ts.map +1 -1
  317. package/dist/services/deprecation-notices.js +2 -2
  318. package/dist/services/deprecation-notices.js.map +1 -1
  319. package/dist/services/design-artifact-service.d.ts +37 -0
  320. package/dist/services/design-artifact-service.d.ts.map +1 -0
  321. package/dist/services/design-artifact-service.js +94 -0
  322. package/dist/services/design-artifact-service.js.map +1 -0
  323. package/dist/services/diagram-artifact-service.d.ts +12 -0
  324. package/dist/services/diagram-artifact-service.d.ts.map +1 -0
  325. package/dist/services/diagram-artifact-service.js +41 -0
  326. package/dist/services/diagram-artifact-service.js.map +1 -0
  327. package/dist/services/diagram-pipeline-service.d.ts +125 -0
  328. package/dist/services/diagram-pipeline-service.d.ts.map +1 -0
  329. package/dist/services/diagram-pipeline-service.js +329 -0
  330. package/dist/services/diagram-pipeline-service.js.map +1 -0
  331. package/dist/services/gherkin-service.d.ts +3 -0
  332. package/dist/services/gherkin-service.d.ts.map +1 -0
  333. package/dist/services/gherkin-service.js +9 -0
  334. package/dist/services/gherkin-service.js.map +1 -0
  335. package/dist/services/graph-service.d.ts.map +1 -1
  336. package/dist/services/graph-service.js +6 -4
  337. package/dist/services/graph-service.js.map +1 -1
  338. package/dist/services/landing/landing-service.d.ts +42 -0
  339. package/dist/services/landing/landing-service.d.ts.map +1 -0
  340. package/dist/services/landing/landing-service.js +197 -0
  341. package/dist/services/landing/landing-service.js.map +1 -0
  342. package/dist/services/landing/operation-registry.d.ts +56 -0
  343. package/dist/services/landing/operation-registry.d.ts.map +1 -0
  344. package/dist/services/landing/operation-registry.js +165 -0
  345. package/dist/services/landing/operation-registry.js.map +1 -0
  346. package/dist/services/landing/receipt-custody.d.ts +48 -0
  347. package/dist/services/landing/receipt-custody.d.ts.map +1 -0
  348. package/dist/services/landing/receipt-custody.js +375 -0
  349. package/dist/services/landing/receipt-custody.js.map +1 -0
  350. package/dist/services/linear/constants.d.ts.map +1 -1
  351. package/dist/services/linear/constants.js +2 -6
  352. package/dist/services/linear/constants.js.map +1 -1
  353. package/dist/services/linear/task-status-aggregation.d.ts +1 -1
  354. package/dist/services/linear/task-status-aggregation.js +1 -1
  355. package/dist/services/linear-pull-service.d.ts.map +1 -1
  356. package/dist/services/linear-pull-service.js +7 -30
  357. package/dist/services/linear-pull-service.js.map +1 -1
  358. package/dist/services/linear-push-service.d.ts.map +1 -1
  359. package/dist/services/linear-push-service.js +4 -5
  360. package/dist/services/linear-push-service.js.map +1 -1
  361. package/dist/services/migration-registry.d.ts +0 -19
  362. package/dist/services/migration-registry.d.ts.map +1 -1
  363. package/dist/services/migration-registry.js +18 -32
  364. package/dist/services/migration-registry.js.map +1 -1
  365. package/dist/services/operate/assignment-lifecycle-service.d.ts +135 -0
  366. package/dist/services/operate/assignment-lifecycle-service.d.ts.map +1 -0
  367. package/dist/services/operate/assignment-lifecycle-service.js +113 -0
  368. package/dist/services/operate/assignment-lifecycle-service.js.map +1 -0
  369. package/dist/services/operate/assignment-packet-service.d.ts +79 -0
  370. package/dist/services/operate/assignment-packet-service.d.ts.map +1 -0
  371. package/dist/services/operate/assignment-packet-service.js +1030 -0
  372. package/dist/services/operate/assignment-packet-service.js.map +1 -0
  373. package/dist/services/operate/client/governance.d.ts +4 -0
  374. package/dist/services/operate/client/governance.d.ts.map +1 -0
  375. package/dist/services/operate/client/governance.js +3 -0
  376. package/dist/services/operate/client/governance.js.map +1 -0
  377. package/dist/services/operate/client/lifecycle.d.ts +18 -0
  378. package/dist/services/operate/client/lifecycle.d.ts.map +1 -0
  379. package/dist/services/operate/client/lifecycle.js +15 -0
  380. package/dist/services/operate/client/lifecycle.js.map +1 -0
  381. package/dist/services/operate/client/runtime.d.ts +13 -0
  382. package/dist/services/operate/client/runtime.d.ts.map +1 -0
  383. package/dist/services/operate/client/runtime.js +11 -0
  384. package/dist/services/operate/client/runtime.js.map +1 -0
  385. package/dist/services/operate/client-error.d.ts +9 -0
  386. package/dist/services/operate/client-error.d.ts.map +1 -0
  387. package/dist/services/operate/client-error.js +14 -0
  388. package/dist/services/operate/client-error.js.map +1 -0
  389. package/dist/services/operate/client.d.ts +415 -0
  390. package/dist/services/operate/client.d.ts.map +1 -0
  391. package/dist/services/operate/client.js +2432 -0
  392. package/dist/services/operate/client.js.map +1 -0
  393. package/dist/services/operate/command-gateway.d.ts +152 -0
  394. package/dist/services/operate/command-gateway.d.ts.map +1 -0
  395. package/dist/services/operate/command-gateway.js +883 -0
  396. package/dist/services/operate/command-gateway.js.map +1 -0
  397. package/dist/services/operate/composition.d.ts +421 -0
  398. package/dist/services/operate/composition.d.ts.map +1 -0
  399. package/dist/services/operate/composition.js +394 -0
  400. package/dist/services/operate/composition.js.map +1 -0
  401. package/dist/services/operate/cycle-lifecycle-service.d.ts +35 -0
  402. package/dist/services/operate/cycle-lifecycle-service.d.ts.map +1 -0
  403. package/dist/services/operate/cycle-lifecycle-service.js +427 -0
  404. package/dist/services/operate/cycle-lifecycle-service.js.map +1 -0
  405. package/dist/services/operate/delivery-evidence.d.ts +34 -0
  406. package/dist/services/operate/delivery-evidence.d.ts.map +1 -0
  407. package/dist/services/operate/delivery-evidence.js +666 -0
  408. package/dist/services/operate/delivery-evidence.js.map +1 -0
  409. package/dist/services/operate/domain-catalog-service.d.ts +24 -0
  410. package/dist/services/operate/domain-catalog-service.d.ts.map +1 -0
  411. package/dist/services/operate/domain-catalog-service.js +99 -0
  412. package/dist/services/operate/domain-catalog-service.js.map +1 -0
  413. package/dist/services/operate/experience-read-service.d.ts +64 -0
  414. package/dist/services/operate/experience-read-service.d.ts.map +1 -0
  415. package/dist/services/operate/experience-read-service.js +109 -0
  416. package/dist/services/operate/experience-read-service.js.map +1 -0
  417. package/dist/services/operate/governed-action-service.d.ts +80 -0
  418. package/dist/services/operate/governed-action-service.d.ts.map +1 -0
  419. package/dist/services/operate/governed-action-service.js +497 -0
  420. package/dist/services/operate/governed-action-service.js.map +1 -0
  421. package/dist/services/operate/identity-contract.d.ts +3 -0
  422. package/dist/services/operate/identity-contract.d.ts.map +1 -0
  423. package/dist/services/operate/identity-contract.js +6 -0
  424. package/dist/services/operate/identity-contract.js.map +1 -0
  425. package/dist/services/operate/measurement-schedule-service.d.ts +81 -0
  426. package/dist/services/operate/measurement-schedule-service.d.ts.map +1 -0
  427. package/dist/services/operate/measurement-schedule-service.js +461 -0
  428. package/dist/services/operate/measurement-schedule-service.js.map +1 -0
  429. package/dist/services/operate/path-custody.d.ts +16 -0
  430. package/dist/services/operate/path-custody.d.ts.map +1 -0
  431. package/dist/services/operate/path-custody.js +120 -0
  432. package/dist/services/operate/path-custody.js.map +1 -0
  433. package/dist/services/operate/pinned-legacy-replay-runner.d.ts +9 -0
  434. package/dist/services/operate/pinned-legacy-replay-runner.d.ts.map +1 -0
  435. package/dist/services/operate/pinned-legacy-replay-runner.js +441 -0
  436. package/dist/services/operate/pinned-legacy-replay-runner.js.map +1 -0
  437. package/dist/services/operate/planning-bridge.d.ts +28 -0
  438. package/dist/services/operate/planning-bridge.d.ts.map +1 -0
  439. package/dist/services/operate/planning-bridge.js +341 -0
  440. package/dist/services/operate/planning-bridge.js.map +1 -0
  441. package/dist/services/operate/planning-handoff-gateway.d.ts +47 -0
  442. package/dist/services/operate/planning-handoff-gateway.d.ts.map +1 -0
  443. package/dist/services/operate/planning-handoff-gateway.js +169 -0
  444. package/dist/services/operate/planning-handoff-gateway.js.map +1 -0
  445. package/dist/services/operate/planning-handoff-service.d.ts +38 -0
  446. package/dist/services/operate/planning-handoff-service.d.ts.map +1 -0
  447. package/dist/services/operate/planning-handoff-service.js +304 -0
  448. package/dist/services/operate/planning-handoff-service.js.map +1 -0
  449. package/dist/services/operate/project-transaction-lock.d.ts +6 -0
  450. package/dist/services/operate/project-transaction-lock.d.ts.map +1 -0
  451. package/dist/services/operate/project-transaction-lock.js +146 -0
  452. package/dist/services/operate/project-transaction-lock.js.map +1 -0
  453. package/dist/services/operate/recovery-service.d.ts +16 -0
  454. package/dist/services/operate/recovery-service.d.ts.map +1 -0
  455. package/dist/services/operate/recovery-service.js +59 -0
  456. package/dist/services/operate/recovery-service.js.map +1 -0
  457. package/dist/services/operate/replay-safe-retry-service.d.ts +21 -0
  458. package/dist/services/operate/replay-safe-retry-service.d.ts.map +1 -0
  459. package/dist/services/operate/replay-safe-retry-service.js +66 -0
  460. package/dist/services/operate/replay-safe-retry-service.js.map +1 -0
  461. package/dist/services/operate/repository-read-service.d.ts +13 -0
  462. package/dist/services/operate/repository-read-service.d.ts.map +1 -0
  463. package/dist/services/operate/repository-read-service.js +153 -0
  464. package/dist/services/operate/repository-read-service.js.map +1 -0
  465. package/dist/services/operate/review-lifecycle-service.d.ts +50 -0
  466. package/dist/services/operate/review-lifecycle-service.d.ts.map +1 -0
  467. package/dist/services/operate/review-lifecycle-service.js +63 -0
  468. package/dist/services/operate/review-lifecycle-service.js.map +1 -0
  469. package/dist/services/operate/review-read-gateway.d.ts +21 -0
  470. package/dist/services/operate/review-read-gateway.d.ts.map +1 -0
  471. package/dist/services/operate/review-read-gateway.js +119 -0
  472. package/dist/services/operate/review-read-gateway.js.map +1 -0
  473. package/dist/services/operate/screened-evidence-service.d.ts +24 -0
  474. package/dist/services/operate/screened-evidence-service.d.ts.map +1 -0
  475. package/dist/services/operate/screened-evidence-service.js +186 -0
  476. package/dist/services/operate/screened-evidence-service.js.map +1 -0
  477. package/dist/services/operate/search-hit-contract.d.ts +11 -0
  478. package/dist/services/operate/search-hit-contract.d.ts.map +1 -0
  479. package/dist/services/operate/search-hit-contract.js +29 -0
  480. package/dist/services/operate/search-hit-contract.js.map +1 -0
  481. package/dist/services/operate/session-capability.d.ts +61 -0
  482. package/dist/services/operate/session-capability.d.ts.map +1 -0
  483. package/dist/services/operate/session-capability.js +124 -0
  484. package/dist/services/operate/session-capability.js.map +1 -0
  485. package/dist/services/operate/spec-operating-origin-service.d.ts +60 -0
  486. package/dist/services/operate/spec-operating-origin-service.d.ts.map +1 -0
  487. package/dist/services/operate/spec-operating-origin-service.js +401 -0
  488. package/dist/services/operate/spec-operating-origin-service.js.map +1 -0
  489. package/dist/services/operate/storage-layout.d.ts +82 -0
  490. package/dist/services/operate/storage-layout.d.ts.map +1 -0
  491. package/dist/services/operate/storage-layout.js +1244 -0
  492. package/dist/services/operate/storage-layout.js.map +1 -0
  493. package/dist/services/operate/storage-migration-service.d.ts +15 -0
  494. package/dist/services/operate/storage-migration-service.d.ts.map +1 -0
  495. package/dist/services/operate/storage-migration-service.js +27 -0
  496. package/dist/services/operate/storage-migration-service.js.map +1 -0
  497. package/dist/services/operate/store.d.ts +132 -0
  498. package/dist/services/operate/store.d.ts.map +1 -0
  499. package/dist/services/operate/store.js +1344 -0
  500. package/dist/services/operate/store.js.map +1 -0
  501. package/dist/services/pipeline-package-service.d.ts +93 -2
  502. package/dist/services/pipeline-package-service.d.ts.map +1 -1
  503. package/dist/services/pipeline-package-service.js +867 -7
  504. package/dist/services/pipeline-package-service.js.map +1 -1
  505. package/dist/services/planning-id-service.d.ts +8 -0
  506. package/dist/services/planning-id-service.d.ts.map +1 -0
  507. package/dist/services/planning-id-service.js +114 -0
  508. package/dist/services/planning-id-service.js.map +1 -0
  509. package/dist/services/provenance-service.d.ts +33 -1
  510. package/dist/services/provenance-service.d.ts.map +1 -1
  511. package/dist/services/provenance-service.js +104 -8
  512. package/dist/services/provenance-service.js.map +1 -1
  513. package/dist/services/runtime-manager/doctor.d.ts +22 -0
  514. package/dist/services/runtime-manager/doctor.d.ts.map +1 -0
  515. package/dist/services/runtime-manager/doctor.js +74 -0
  516. package/dist/services/runtime-manager/doctor.js.map +1 -0
  517. package/dist/services/runtime-manager/global-state.d.ts +47 -0
  518. package/dist/services/runtime-manager/global-state.d.ts.map +1 -0
  519. package/dist/services/runtime-manager/global-state.js +59 -0
  520. package/dist/services/runtime-manager/global-state.js.map +1 -0
  521. package/dist/services/runtime-manager/install-plan.d.ts +37 -0
  522. package/dist/services/runtime-manager/install-plan.d.ts.map +1 -0
  523. package/dist/services/runtime-manager/install-plan.js +91 -0
  524. package/dist/services/runtime-manager/install-plan.js.map +1 -0
  525. package/dist/services/runtime-manager/inventory.d.ts +29 -0
  526. package/dist/services/runtime-manager/inventory.d.ts.map +1 -0
  527. package/dist/services/runtime-manager/inventory.js +46 -0
  528. package/dist/services/runtime-manager/inventory.js.map +1 -0
  529. package/dist/services/runtime-manager-service.d.ts +16 -71
  530. package/dist/services/runtime-manager-service.d.ts.map +1 -1
  531. package/dist/services/runtime-manager-service.js +1288 -505
  532. package/dist/services/runtime-manager-service.js.map +1 -1
  533. package/dist/services/spec-service.d.ts +213 -39
  534. package/dist/services/spec-service.d.ts.map +1 -1
  535. package/dist/services/spec-service.js +938 -171
  536. package/dist/services/spec-service.js.map +1 -1
  537. package/dist/services/template-service.d.ts.map +1 -1
  538. package/dist/services/template-service.js +1 -0
  539. package/dist/services/template-service.js.map +1 -1
  540. package/dist/templates/quick/quick-task.md.hbs +6 -0
  541. package/dist/templates/rules/claude/CLAUDE.md.hbs +3 -111
  542. package/dist/templates/rules/codex/AGENTS.md.hbs +2 -92
  543. package/dist/templates/rules/cursor/create-task-list.mdc.hbs +1 -1
  544. package/dist/templates/rules/cursor/implement-task-list.mdc.hbs +5 -83
  545. package/dist/templates/rules/cursor/openplanr.mdc.hbs +12 -0
  546. package/dist/templates/rules/shared/host-native-guidance.md.hbs +12 -0
  547. package/dist/templates/rules/shared/implementation-guidance.md.hbs +44 -0
  548. package/dist/templates/spec/spec-shaped.md.hbs +66 -22
  549. package/dist/templates/spec/spec.md.hbs +46 -23
  550. package/dist/templates/spec/story.md.hbs +15 -4
  551. package/dist/templates/spec/task.md.hbs +53 -5
  552. package/dist/utils/constants.d.ts +1 -1
  553. package/dist/utils/constants.js +1 -1
  554. package/dist/utils/logger.d.ts +0 -3
  555. package/dist/utils/logger.d.ts.map +1 -1
  556. package/dist/utils/logger.js +0 -6
  557. package/dist/utils/logger.js.map +1 -1
  558. package/docs/ARTIFACT_REVIEW.md +110 -0
  559. package/docs/CLI.md +1216 -0
  560. package/docs/CROSS_RUNTIME_SETUP.md +168 -0
  561. package/docs/TROUBLESHOOTING.md +227 -0
  562. package/lib/dashboard-verifier.d.mts +29 -0
  563. package/lib/dashboard-verifier.mjs +307 -0
  564. package/lib/host-packages/adapter-registry.json +44 -0
  565. package/lib/host-packages/claude/.claude-plugin/marketplace.json +20 -0
  566. package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +9 -0
  567. package/lib/host-packages/claude/openplanr/.openplanr-content.json +1179 -0
  568. package/lib/host-packages/claude/openplanr/agents/planr-backend.md +66 -0
  569. package/lib/host-packages/claude/openplanr/agents/planr-database.md +165 -0
  570. package/lib/host-packages/claude/openplanr/agents/planr-designer.md +57 -0
  571. package/lib/host-packages/claude/openplanr/agents/planr-devops.md +57 -0
  572. package/lib/host-packages/claude/openplanr/agents/planr-documentation.md +63 -0
  573. package/lib/host-packages/claude/openplanr/agents/planr-entity-scaffold.md +29 -0
  574. package/lib/host-packages/claude/openplanr/agents/planr-frontend.md +69 -0
  575. package/lib/host-packages/claude/openplanr/agents/planr-qa.md +162 -0
  576. package/lib/host-packages/claude/openplanr/agents/planr-specification.md +124 -0
  577. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/backend.md +93 -0
  578. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/designer.md +90 -0
  579. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/devops.md +55 -0
  580. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/doc-gen.md +67 -0
  581. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/frontend.md +94 -0
  582. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/qa.md +17 -0
  583. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/specification.md +111 -0
  584. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/contract-create-modify-preserve.md +17 -0
  585. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/design-craft-rubric.md +51 -0
  586. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/design-principles.md +43 -0
  587. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/design-spec-template.md +88 -0
  588. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/task-context-resolution.md +60 -0
  589. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/verification-and-recovery-backend.md +26 -0
  590. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/verification-and-recovery-frontend.md +27 -0
  591. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/backend.md +96 -0
  592. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/designer.md +83 -0
  593. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/devops.md +55 -0
  594. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/doc-gen.md +67 -0
  595. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/frontend.md +96 -0
  596. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/qa.md +17 -0
  597. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/specification.md +112 -0
  598. package/lib/host-packages/claude/openplanr/references/pipeline/stacks/backend/nestjs.md +130 -0
  599. package/lib/host-packages/claude/openplanr/references/pipeline/stacks/database/mongodb.md +122 -0
  600. package/lib/host-packages/claude/openplanr/references/pipeline/stacks/database/prisma.md +155 -0
  601. package/lib/host-packages/claude/openplanr/references/pipeline/stacks/devops/docker-compose.md +140 -0
  602. package/lib/host-packages/claude/openplanr/references/pipeline/stacks/frontend/nextjs.md +123 -0
  603. package/lib/host-packages/claude/openplanr/skills/artifact/SKILL.md +54 -0
  604. package/lib/host-packages/claude/openplanr/skills/artifact/openplanr.skill.json +48 -0
  605. package/lib/host-packages/claude/openplanr/skills/artifact/references/company-review.md +18 -0
  606. package/lib/host-packages/claude/openplanr/skills/artifact/references/design-sharing.md +51 -0
  607. package/lib/host-packages/claude/openplanr/skills/browser-qa/SKILL.md +34 -0
  608. package/lib/host-packages/claude/openplanr/skills/browser-qa/openplanr.skill.json +26 -0
  609. package/lib/host-packages/claude/openplanr/skills/ceo-review/SKILL.md +47 -0
  610. package/lib/host-packages/claude/openplanr/skills/ceo-review/openplanr.skill.json +81 -0
  611. package/lib/host-packages/claude/openplanr/skills/ceo-review/references/operate-advisor-contract.md +111 -0
  612. package/lib/host-packages/claude/openplanr/skills/ceo-review/scripts/errors.mjs +8 -0
  613. package/lib/host-packages/claude/openplanr/skills/ceo-review/scripts/operate-review-contract.mjs +438 -0
  614. package/lib/host-packages/claude/openplanr/skills/ceo-review/scripts/operate-review-note.mjs +595 -0
  615. package/lib/host-packages/claude/openplanr/skills/ceo-review/scripts/validate-note.mjs +31 -0
  616. package/lib/host-packages/claude/openplanr/skills/chair-review/SKILL.md +101 -0
  617. package/lib/host-packages/claude/openplanr/skills/chair-review/openplanr.skill.json +70 -0
  618. package/lib/host-packages/claude/openplanr/skills/chair-review/scripts/errors.mjs +8 -0
  619. package/lib/host-packages/claude/openplanr/skills/chair-review/scripts/operate-review-contract.mjs +438 -0
  620. package/lib/host-packages/claude/openplanr/skills/chair-review/scripts/operate-review-note.mjs +595 -0
  621. package/lib/host-packages/claude/openplanr/skills/chair-review/scripts/validate-note.mjs +31 -0
  622. package/lib/host-packages/claude/openplanr/skills/challenger-review/SKILL.md +86 -0
  623. package/lib/host-packages/claude/openplanr/skills/challenger-review/openplanr.skill.json +70 -0
  624. package/lib/host-packages/claude/openplanr/skills/challenger-review/scripts/errors.mjs +8 -0
  625. package/lib/host-packages/claude/openplanr/skills/challenger-review/scripts/operate-review-contract.mjs +438 -0
  626. package/lib/host-packages/claude/openplanr/skills/challenger-review/scripts/operate-review-note.mjs +595 -0
  627. package/lib/host-packages/claude/openplanr/skills/challenger-review/scripts/validate-note.mjs +31 -0
  628. package/lib/host-packages/claude/openplanr/skills/cmo-review/SKILL.md +46 -0
  629. package/lib/host-packages/claude/openplanr/skills/cmo-review/openplanr.skill.json +81 -0
  630. package/lib/host-packages/claude/openplanr/skills/cmo-review/references/operate-advisor-contract.md +111 -0
  631. package/lib/host-packages/claude/openplanr/skills/cmo-review/scripts/errors.mjs +8 -0
  632. package/lib/host-packages/claude/openplanr/skills/cmo-review/scripts/operate-review-contract.mjs +438 -0
  633. package/lib/host-packages/claude/openplanr/skills/cmo-review/scripts/operate-review-note.mjs +595 -0
  634. package/lib/host-packages/claude/openplanr/skills/cmo-review/scripts/validate-note.mjs +31 -0
  635. package/lib/host-packages/claude/openplanr/skills/coo-review/SKILL.md +45 -0
  636. package/lib/host-packages/claude/openplanr/skills/coo-review/openplanr.skill.json +81 -0
  637. package/lib/host-packages/claude/openplanr/skills/coo-review/references/operate-advisor-contract.md +111 -0
  638. package/lib/host-packages/claude/openplanr/skills/coo-review/scripts/errors.mjs +8 -0
  639. package/lib/host-packages/claude/openplanr/skills/coo-review/scripts/operate-review-contract.mjs +438 -0
  640. package/lib/host-packages/claude/openplanr/skills/coo-review/scripts/operate-review-note.mjs +595 -0
  641. package/lib/host-packages/claude/openplanr/skills/coo-review/scripts/validate-note.mjs +31 -0
  642. package/lib/host-packages/claude/openplanr/skills/cpo-review/SKILL.md +48 -0
  643. package/lib/host-packages/claude/openplanr/skills/cpo-review/openplanr.skill.json +81 -0
  644. package/lib/host-packages/claude/openplanr/skills/cpo-review/references/operate-advisor-contract.md +111 -0
  645. package/lib/host-packages/claude/openplanr/skills/cpo-review/scripts/errors.mjs +8 -0
  646. package/lib/host-packages/claude/openplanr/skills/cpo-review/scripts/operate-review-contract.mjs +438 -0
  647. package/lib/host-packages/claude/openplanr/skills/cpo-review/scripts/operate-review-note.mjs +595 -0
  648. package/lib/host-packages/claude/openplanr/skills/cpo-review/scripts/validate-note.mjs +31 -0
  649. package/lib/host-packages/claude/openplanr/skills/cto-review/SKILL.md +47 -0
  650. package/lib/host-packages/claude/openplanr/skills/cto-review/openplanr.skill.json +81 -0
  651. package/lib/host-packages/claude/openplanr/skills/cto-review/references/operate-advisor-contract.md +111 -0
  652. package/lib/host-packages/claude/openplanr/skills/cto-review/scripts/errors.mjs +8 -0
  653. package/lib/host-packages/claude/openplanr/skills/cto-review/scripts/operate-review-contract.mjs +438 -0
  654. package/lib/host-packages/claude/openplanr/skills/cto-review/scripts/operate-review-note.mjs +595 -0
  655. package/lib/host-packages/claude/openplanr/skills/cto-review/scripts/validate-note.mjs +31 -0
  656. package/lib/host-packages/claude/openplanr/skills/dashboard/SKILL.md +20 -0
  657. package/lib/host-packages/claude/openplanr/skills/dashboard/openplanr.skill.json +26 -0
  658. package/lib/host-packages/claude/openplanr/skills/design/SKILL.md +73 -0
  659. package/lib/host-packages/claude/openplanr/skills/design/openplanr.skill.json +466 -0
  660. package/lib/host-packages/claude/openplanr/skills/design/references/craft.md +68 -0
  661. package/lib/host-packages/claude/openplanr/skills/design/references/design-spec-template.md +88 -0
  662. package/lib/host-packages/claude/openplanr/skills/design/references/design-system.md +33 -0
  663. package/lib/host-packages/claude/openplanr/skills/design/references/discovery.md +53 -0
  664. package/lib/host-packages/claude/openplanr/skills/design/references/generation.md +105 -0
  665. package/lib/host-packages/claude/openplanr/skills/design/references/handoff.md +47 -0
  666. package/lib/host-packages/claude/openplanr/skills/design/references/review.md +88 -0
  667. package/lib/host-packages/claude/openplanr/skills/design/references/team-review.md +131 -0
  668. package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +93 -0
  669. package/lib/host-packages/claude/openplanr/skills/design/schemas/design-document.schema.json +306 -0
  670. package/lib/host-packages/claude/openplanr/skills/design/schemas/design-review-context.schema.json +191 -0
  671. package/lib/host-packages/claude/openplanr/skills/design/schemas/design-review-handoff.schema.json +407 -0
  672. package/lib/host-packages/claude/openplanr/skills/design/scripts/design.mjs +17323 -0
  673. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/notices/entities.txt +13 -0
  674. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/notices/parse5.txt +21 -0
  675. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  676. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  677. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  678. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  679. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  680. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  681. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  682. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/package.json +115 -0
  683. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  684. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  685. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  686. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  687. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  688. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  689. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  690. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  691. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  692. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  693. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  694. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  695. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  696. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  697. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  698. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  699. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  700. package/lib/host-packages/claude/openplanr/skills/design-loop/SKILL.md +58 -0
  701. package/lib/host-packages/claude/openplanr/skills/design-loop/openplanr.skill.json +466 -0
  702. package/lib/host-packages/claude/openplanr/skills/design-loop/references/craft.md +68 -0
  703. package/lib/host-packages/claude/openplanr/skills/design-loop/references/design-spec-template.md +88 -0
  704. package/lib/host-packages/claude/openplanr/skills/design-loop/references/design-system.md +33 -0
  705. package/lib/host-packages/claude/openplanr/skills/design-loop/references/discovery.md +53 -0
  706. package/lib/host-packages/claude/openplanr/skills/design-loop/references/generation.md +105 -0
  707. package/lib/host-packages/claude/openplanr/skills/design-loop/references/handoff.md +47 -0
  708. package/lib/host-packages/claude/openplanr/skills/design-loop/references/review.md +88 -0
  709. package/lib/host-packages/claude/openplanr/skills/design-loop/references/team-review.md +131 -0
  710. package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +93 -0
  711. package/lib/host-packages/claude/openplanr/skills/design-loop/schemas/design-document.schema.json +306 -0
  712. package/lib/host-packages/claude/openplanr/skills/design-loop/schemas/design-review-context.schema.json +191 -0
  713. package/lib/host-packages/claude/openplanr/skills/design-loop/schemas/design-review-handoff.schema.json +407 -0
  714. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/design.mjs +17323 -0
  715. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/notices/entities.txt +13 -0
  716. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/notices/parse5.txt +21 -0
  717. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  718. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  719. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  720. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  721. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  722. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  723. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  724. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/package.json +115 -0
  725. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  726. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  727. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  728. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  729. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  730. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  731. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  732. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  733. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  734. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  735. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  736. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  737. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  738. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  739. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  740. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  741. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  742. package/lib/host-packages/claude/openplanr/skills/design-review/SKILL.md +54 -0
  743. package/lib/host-packages/claude/openplanr/skills/design-review/openplanr.skill.json +466 -0
  744. package/lib/host-packages/claude/openplanr/skills/design-review/references/craft.md +68 -0
  745. package/lib/host-packages/claude/openplanr/skills/design-review/references/design-spec-template.md +88 -0
  746. package/lib/host-packages/claude/openplanr/skills/design-review/references/design-system.md +33 -0
  747. package/lib/host-packages/claude/openplanr/skills/design-review/references/discovery.md +53 -0
  748. package/lib/host-packages/claude/openplanr/skills/design-review/references/generation.md +105 -0
  749. package/lib/host-packages/claude/openplanr/skills/design-review/references/handoff.md +47 -0
  750. package/lib/host-packages/claude/openplanr/skills/design-review/references/review.md +88 -0
  751. package/lib/host-packages/claude/openplanr/skills/design-review/references/team-review.md +131 -0
  752. package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +93 -0
  753. package/lib/host-packages/claude/openplanr/skills/design-review/schemas/design-document.schema.json +306 -0
  754. package/lib/host-packages/claude/openplanr/skills/design-review/schemas/design-review-context.schema.json +191 -0
  755. package/lib/host-packages/claude/openplanr/skills/design-review/schemas/design-review-handoff.schema.json +407 -0
  756. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/design.mjs +17323 -0
  757. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/notices/entities.txt +13 -0
  758. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/notices/parse5.txt +21 -0
  759. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  760. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  761. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  762. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  763. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  764. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  765. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  766. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/package.json +115 -0
  767. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  768. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  769. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  770. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  771. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  772. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  773. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  774. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  775. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  776. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  777. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  778. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  779. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  780. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  781. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  782. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  783. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  784. package/lib/host-packages/claude/openplanr/skills/diagram/SKILL.md +65 -0
  785. package/lib/host-packages/claude/openplanr/skills/diagram/openplanr.skill.json +59 -0
  786. package/lib/host-packages/claude/openplanr/skills/diagram/references/diagram-document.md +86 -0
  787. package/lib/host-packages/claude/openplanr/skills/diagram/references/diagram-fidelity.md +19 -0
  788. package/lib/host-packages/claude/openplanr/skills/diagram/references/diagram-intent-to-ir.md +22 -0
  789. package/lib/host-packages/claude/openplanr/skills/doctor/SKILL.md +40 -0
  790. package/lib/host-packages/claude/openplanr/skills/doctor/openplanr.skill.json +37 -0
  791. package/lib/host-packages/claude/openplanr/skills/doctor/references/upgrade.md +106 -0
  792. package/lib/host-packages/claude/openplanr/skills/investigate/SKILL.md +31 -0
  793. package/lib/host-packages/claude/openplanr/skills/investigate/openplanr.skill.json +26 -0
  794. package/lib/host-packages/claude/openplanr/skills/land/SKILL.md +33 -0
  795. package/lib/host-packages/claude/openplanr/skills/land/openplanr.skill.json +26 -0
  796. package/lib/host-packages/claude/openplanr/skills/operate/SKILL.md +181 -0
  797. package/lib/host-packages/claude/openplanr/skills/operate/openplanr.skill.json +70 -0
  798. package/lib/host-packages/claude/openplanr/skills/operate/scripts/errors.mjs +8 -0
  799. package/lib/host-packages/claude/openplanr/skills/operate/scripts/operate-review-contract.mjs +438 -0
  800. package/lib/host-packages/claude/openplanr/skills/operate/scripts/operate-review-note.mjs +595 -0
  801. package/lib/host-packages/claude/openplanr/skills/operate/scripts/validate-note.mjs +31 -0
  802. package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +106 -0
  803. package/lib/host-packages/claude/openplanr/skills/plan/openplanr.skill.json +389 -0
  804. package/lib/host-packages/claude/openplanr/skills/plan/references/artifact-contract.md +39 -0
  805. package/lib/host-packages/claude/openplanr/skills/plan/schemas/design-document.schema.json +306 -0
  806. package/lib/host-packages/claude/openplanr/skills/plan/schemas/design-review-context.schema.json +191 -0
  807. package/lib/host-packages/claude/openplanr/skills/plan/schemas/design-review-handoff.schema.json +407 -0
  808. package/lib/host-packages/claude/openplanr/skills/plan/scripts/design.mjs +17323 -0
  809. package/lib/host-packages/claude/openplanr/skills/plan/scripts/planning-ids.mjs +120 -0
  810. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/notices/entities.txt +13 -0
  811. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/notices/parse5.txt +21 -0
  812. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  813. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  814. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  815. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  816. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  817. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  818. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  819. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/package.json +115 -0
  820. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  821. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  822. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  823. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  824. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  825. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  826. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  827. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  828. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  829. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  830. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  831. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  832. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  833. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  834. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  835. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  836. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  837. package/lib/host-packages/claude/openplanr/skills/plan-review/SKILL.md +39 -0
  838. package/lib/host-packages/claude/openplanr/skills/plan-review/openplanr.skill.json +26 -0
  839. package/lib/host-packages/claude/openplanr/skills/release/SKILL.md +180 -0
  840. package/lib/host-packages/claude/openplanr/skills/release/assets/changelog-template.md +18 -0
  841. package/lib/host-packages/claude/openplanr/skills/release/assets/profile-template.md +45 -0
  842. package/lib/host-packages/claude/openplanr/skills/release/openplanr.skill.json +92 -0
  843. package/lib/host-packages/claude/openplanr/skills/release/references/cadence.md +92 -0
  844. package/lib/host-packages/claude/openplanr/skills/release/references/release-notes.md +127 -0
  845. package/lib/host-packages/claude/openplanr/skills/release/references/schemes.md +103 -0
  846. package/lib/host-packages/claude/openplanr/skills/release/scripts/collect_changes.sh +85 -0
  847. package/lib/host-packages/claude/openplanr/skills/ship/SKILL.md +80 -0
  848. package/lib/host-packages/claude/openplanr/skills/ship/openplanr.skill.json +48 -0
  849. package/lib/host-packages/claude/openplanr/skills/ship/references/result-contract.md +14 -0
  850. package/lib/host-packages/claude/openplanr/skills/ship/scripts/discover-verification.mjs +107 -0
  851. package/lib/host-packages/claude/openplanr/skills/spec/SKILL.md +53 -0
  852. package/lib/host-packages/claude/openplanr/skills/spec/openplanr.skill.json +37 -0
  853. package/lib/host-packages/claude/openplanr/skills/spec/references/specification-contract.md +32 -0
  854. package/lib/host-packages/claude/openplanr/skills/status/SKILL.md +21 -0
  855. package/lib/host-packages/claude/openplanr/skills/status/openplanr.skill.json +26 -0
  856. package/lib/host-packages/claude/openplanr/skills/sync/SKILL.md +30 -0
  857. package/lib/host-packages/claude/openplanr/skills/sync/openplanr.skill.json +37 -0
  858. package/lib/host-packages/claude/openplanr/skills/sync/scripts/sync.mjs +230 -0
  859. package/lib/host-packages/cursor/openplanr/.openplanr-content.json +939 -0
  860. package/lib/host-packages/cursor/openplanr/manifest.json +32 -0
  861. package/lib/host-packages/cursor/openplanr/rules/planr-artifact/references/company-review.md +18 -0
  862. package/lib/host-packages/cursor/openplanr/rules/planr-artifact/references/design-sharing.md +51 -0
  863. package/lib/host-packages/cursor/openplanr/rules/planr-artifact.mdc +53 -0
  864. package/lib/host-packages/cursor/openplanr/rules/planr-browser-qa.mdc +34 -0
  865. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/references/operate-advisor-contract.md +111 -0
  866. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/scripts/errors.mjs +8 -0
  867. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/scripts/operate-review-contract.mjs +438 -0
  868. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/scripts/operate-review-note.mjs +595 -0
  869. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/scripts/validate-note.mjs +31 -0
  870. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review.mdc +45 -0
  871. package/lib/host-packages/cursor/openplanr/rules/planr-chair-review/scripts/errors.mjs +8 -0
  872. package/lib/host-packages/cursor/openplanr/rules/planr-chair-review/scripts/operate-review-contract.mjs +438 -0
  873. package/lib/host-packages/cursor/openplanr/rules/planr-chair-review/scripts/operate-review-note.mjs +595 -0
  874. package/lib/host-packages/cursor/openplanr/rules/planr-chair-review/scripts/validate-note.mjs +31 -0
  875. package/lib/host-packages/cursor/openplanr/rules/planr-chair-review.mdc +99 -0
  876. package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review/scripts/errors.mjs +8 -0
  877. package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review/scripts/operate-review-contract.mjs +438 -0
  878. package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review/scripts/operate-review-note.mjs +595 -0
  879. package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review/scripts/validate-note.mjs +31 -0
  880. package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review.mdc +84 -0
  881. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/references/operate-advisor-contract.md +111 -0
  882. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/scripts/errors.mjs +8 -0
  883. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/scripts/operate-review-contract.mjs +438 -0
  884. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/scripts/operate-review-note.mjs +595 -0
  885. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/scripts/validate-note.mjs +31 -0
  886. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review.mdc +44 -0
  887. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/references/operate-advisor-contract.md +111 -0
  888. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/scripts/errors.mjs +8 -0
  889. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/scripts/operate-review-contract.mjs +438 -0
  890. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/scripts/operate-review-note.mjs +595 -0
  891. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/scripts/validate-note.mjs +31 -0
  892. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review.mdc +43 -0
  893. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/references/operate-advisor-contract.md +111 -0
  894. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/scripts/errors.mjs +8 -0
  895. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/scripts/operate-review-contract.mjs +438 -0
  896. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/scripts/operate-review-note.mjs +595 -0
  897. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/scripts/validate-note.mjs +31 -0
  898. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review.mdc +46 -0
  899. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/references/operate-advisor-contract.md +111 -0
  900. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/scripts/errors.mjs +8 -0
  901. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/scripts/operate-review-contract.mjs +438 -0
  902. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/scripts/operate-review-note.mjs +595 -0
  903. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/scripts/validate-note.mjs +31 -0
  904. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review.mdc +45 -0
  905. package/lib/host-packages/cursor/openplanr/rules/planr-dashboard.mdc +19 -0
  906. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/craft.md +68 -0
  907. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/design-spec-template.md +88 -0
  908. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/design-system.md +33 -0
  909. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/discovery.md +53 -0
  910. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/generation.md +105 -0
  911. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/handoff.md +47 -0
  912. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/review.md +88 -0
  913. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/team-review.md +131 -0
  914. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +93 -0
  915. package/lib/host-packages/cursor/openplanr/rules/planr-design/schemas/design-document.schema.json +306 -0
  916. package/lib/host-packages/cursor/openplanr/rules/planr-design/schemas/design-review-context.schema.json +191 -0
  917. package/lib/host-packages/cursor/openplanr/rules/planr-design/schemas/design-review-handoff.schema.json +407 -0
  918. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/design.mjs +17323 -0
  919. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/notices/entities.txt +13 -0
  920. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/notices/parse5.txt +21 -0
  921. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  922. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  923. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  924. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  925. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  926. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  927. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  928. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/package.json +115 -0
  929. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  930. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  931. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  932. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  933. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  934. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  935. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  936. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  937. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  938. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  939. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  940. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  941. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  942. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  943. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  944. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  945. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  946. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/craft.md +68 -0
  947. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/design-spec-template.md +88 -0
  948. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/design-system.md +33 -0
  949. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/discovery.md +53 -0
  950. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/generation.md +105 -0
  951. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/handoff.md +47 -0
  952. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/review.md +88 -0
  953. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/team-review.md +131 -0
  954. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +93 -0
  955. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/schemas/design-document.schema.json +306 -0
  956. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/schemas/design-review-context.schema.json +191 -0
  957. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/schemas/design-review-handoff.schema.json +407 -0
  958. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/design.mjs +17323 -0
  959. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/notices/entities.txt +13 -0
  960. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/notices/parse5.txt +21 -0
  961. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  962. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  963. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  964. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  965. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  966. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  967. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  968. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/package.json +115 -0
  969. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  970. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  971. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  972. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  973. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  974. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  975. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  976. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  977. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  978. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  979. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  980. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  981. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  982. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  983. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  984. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  985. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  986. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop.mdc +57 -0
  987. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/craft.md +68 -0
  988. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/design-spec-template.md +88 -0
  989. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/design-system.md +33 -0
  990. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/discovery.md +53 -0
  991. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/generation.md +105 -0
  992. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/handoff.md +47 -0
  993. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/review.md +88 -0
  994. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/team-review.md +131 -0
  995. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +93 -0
  996. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/schemas/design-document.schema.json +306 -0
  997. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/schemas/design-review-context.schema.json +191 -0
  998. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/schemas/design-review-handoff.schema.json +407 -0
  999. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/design.mjs +17323 -0
  1000. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/notices/entities.txt +13 -0
  1001. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/notices/parse5.txt +21 -0
  1002. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1003. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1004. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1005. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1006. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1007. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1008. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1009. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/package.json +115 -0
  1010. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1011. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1012. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1013. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1014. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1015. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1016. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1017. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1018. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1019. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1020. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1021. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1022. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1023. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1024. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1025. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1026. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1027. package/lib/host-packages/cursor/openplanr/rules/planr-design-review.mdc +53 -0
  1028. package/lib/host-packages/cursor/openplanr/rules/planr-design.mdc +72 -0
  1029. package/lib/host-packages/cursor/openplanr/rules/planr-diagram/references/diagram-document.md +86 -0
  1030. package/lib/host-packages/cursor/openplanr/rules/planr-diagram/references/diagram-fidelity.md +19 -0
  1031. package/lib/host-packages/cursor/openplanr/rules/planr-diagram/references/diagram-intent-to-ir.md +22 -0
  1032. package/lib/host-packages/cursor/openplanr/rules/planr-diagram.mdc +64 -0
  1033. package/lib/host-packages/cursor/openplanr/rules/planr-doctor/references/upgrade.md +106 -0
  1034. package/lib/host-packages/cursor/openplanr/rules/planr-doctor.mdc +39 -0
  1035. package/lib/host-packages/cursor/openplanr/rules/planr-investigate.mdc +31 -0
  1036. package/lib/host-packages/cursor/openplanr/rules/planr-land.mdc +32 -0
  1037. package/lib/host-packages/cursor/openplanr/rules/planr-operate/scripts/errors.mjs +8 -0
  1038. package/lib/host-packages/cursor/openplanr/rules/planr-operate/scripts/operate-review-contract.mjs +438 -0
  1039. package/lib/host-packages/cursor/openplanr/rules/planr-operate/scripts/operate-review-note.mjs +595 -0
  1040. package/lib/host-packages/cursor/openplanr/rules/planr-operate/scripts/validate-note.mjs +31 -0
  1041. package/lib/host-packages/cursor/openplanr/rules/planr-operate.mdc +180 -0
  1042. package/lib/host-packages/cursor/openplanr/rules/planr-plan/references/artifact-contract.md +39 -0
  1043. package/lib/host-packages/cursor/openplanr/rules/planr-plan/schemas/design-document.schema.json +306 -0
  1044. package/lib/host-packages/cursor/openplanr/rules/planr-plan/schemas/design-review-context.schema.json +191 -0
  1045. package/lib/host-packages/cursor/openplanr/rules/planr-plan/schemas/design-review-handoff.schema.json +407 -0
  1046. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/design.mjs +17323 -0
  1047. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/planning-ids.mjs +120 -0
  1048. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/notices/entities.txt +13 -0
  1049. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/notices/parse5.txt +21 -0
  1050. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1051. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1052. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1053. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1054. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1055. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1056. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1057. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/package.json +115 -0
  1058. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1059. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1060. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1061. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1062. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1063. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1064. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1065. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1066. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1067. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1068. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1069. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1070. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1071. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1072. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1073. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1074. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1075. package/lib/host-packages/cursor/openplanr/rules/planr-plan-review.mdc +38 -0
  1076. package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +105 -0
  1077. package/lib/host-packages/cursor/openplanr/rules/planr-release/assets/changelog-template.md +18 -0
  1078. package/lib/host-packages/cursor/openplanr/rules/planr-release/assets/profile-template.md +45 -0
  1079. package/lib/host-packages/cursor/openplanr/rules/planr-release/references/cadence.md +92 -0
  1080. package/lib/host-packages/cursor/openplanr/rules/planr-release/references/release-notes.md +127 -0
  1081. package/lib/host-packages/cursor/openplanr/rules/planr-release/references/schemes.md +103 -0
  1082. package/lib/host-packages/cursor/openplanr/rules/planr-release/scripts/collect_changes.sh +85 -0
  1083. package/lib/host-packages/cursor/openplanr/rules/planr-release.mdc +179 -0
  1084. package/lib/host-packages/cursor/openplanr/rules/planr-ship/references/result-contract.md +14 -0
  1085. package/lib/host-packages/cursor/openplanr/rules/planr-ship/scripts/discover-verification.mjs +107 -0
  1086. package/lib/host-packages/cursor/openplanr/rules/planr-ship.mdc +79 -0
  1087. package/lib/host-packages/cursor/openplanr/rules/planr-spec/references/specification-contract.md +32 -0
  1088. package/lib/host-packages/cursor/openplanr/rules/planr-spec.mdc +52 -0
  1089. package/lib/host-packages/cursor/openplanr/rules/planr-status.mdc +20 -0
  1090. package/lib/host-packages/cursor/openplanr/rules/planr-sync/scripts/sync.mjs +230 -0
  1091. package/lib/host-packages/cursor/openplanr/rules/planr-sync.mdc +29 -0
  1092. package/lib/host-packages/openai/.claude-plugin/marketplace.json +19 -0
  1093. package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +10 -0
  1094. package/lib/host-packages/openai/openplanr/.openplanr-content.json +1139 -0
  1095. package/lib/host-packages/openai/openplanr/skills/artifact/SKILL.md +54 -0
  1096. package/lib/host-packages/openai/openplanr/skills/artifact/agents/openai.yaml +6 -0
  1097. package/lib/host-packages/openai/openplanr/skills/artifact/openplanr.skill.json +48 -0
  1098. package/lib/host-packages/openai/openplanr/skills/artifact/references/company-review.md +18 -0
  1099. package/lib/host-packages/openai/openplanr/skills/artifact/references/design-sharing.md +51 -0
  1100. package/lib/host-packages/openai/openplanr/skills/browser-qa/SKILL.md +34 -0
  1101. package/lib/host-packages/openai/openplanr/skills/browser-qa/agents/openai.yaml +6 -0
  1102. package/lib/host-packages/openai/openplanr/skills/browser-qa/openplanr.skill.json +26 -0
  1103. package/lib/host-packages/openai/openplanr/skills/ceo-review/SKILL.md +47 -0
  1104. package/lib/host-packages/openai/openplanr/skills/ceo-review/agents/openai.yaml +6 -0
  1105. package/lib/host-packages/openai/openplanr/skills/ceo-review/openplanr.skill.json +81 -0
  1106. package/lib/host-packages/openai/openplanr/skills/ceo-review/references/operate-advisor-contract.md +111 -0
  1107. package/lib/host-packages/openai/openplanr/skills/ceo-review/scripts/errors.mjs +8 -0
  1108. package/lib/host-packages/openai/openplanr/skills/ceo-review/scripts/operate-review-contract.mjs +438 -0
  1109. package/lib/host-packages/openai/openplanr/skills/ceo-review/scripts/operate-review-note.mjs +595 -0
  1110. package/lib/host-packages/openai/openplanr/skills/ceo-review/scripts/validate-note.mjs +31 -0
  1111. package/lib/host-packages/openai/openplanr/skills/chair-review/SKILL.md +101 -0
  1112. package/lib/host-packages/openai/openplanr/skills/chair-review/agents/openai.yaml +6 -0
  1113. package/lib/host-packages/openai/openplanr/skills/chair-review/openplanr.skill.json +70 -0
  1114. package/lib/host-packages/openai/openplanr/skills/chair-review/scripts/errors.mjs +8 -0
  1115. package/lib/host-packages/openai/openplanr/skills/chair-review/scripts/operate-review-contract.mjs +438 -0
  1116. package/lib/host-packages/openai/openplanr/skills/chair-review/scripts/operate-review-note.mjs +595 -0
  1117. package/lib/host-packages/openai/openplanr/skills/chair-review/scripts/validate-note.mjs +31 -0
  1118. package/lib/host-packages/openai/openplanr/skills/challenger-review/SKILL.md +86 -0
  1119. package/lib/host-packages/openai/openplanr/skills/challenger-review/agents/openai.yaml +6 -0
  1120. package/lib/host-packages/openai/openplanr/skills/challenger-review/openplanr.skill.json +70 -0
  1121. package/lib/host-packages/openai/openplanr/skills/challenger-review/scripts/errors.mjs +8 -0
  1122. package/lib/host-packages/openai/openplanr/skills/challenger-review/scripts/operate-review-contract.mjs +438 -0
  1123. package/lib/host-packages/openai/openplanr/skills/challenger-review/scripts/operate-review-note.mjs +595 -0
  1124. package/lib/host-packages/openai/openplanr/skills/challenger-review/scripts/validate-note.mjs +31 -0
  1125. package/lib/host-packages/openai/openplanr/skills/cmo-review/SKILL.md +46 -0
  1126. package/lib/host-packages/openai/openplanr/skills/cmo-review/agents/openai.yaml +6 -0
  1127. package/lib/host-packages/openai/openplanr/skills/cmo-review/openplanr.skill.json +81 -0
  1128. package/lib/host-packages/openai/openplanr/skills/cmo-review/references/operate-advisor-contract.md +111 -0
  1129. package/lib/host-packages/openai/openplanr/skills/cmo-review/scripts/errors.mjs +8 -0
  1130. package/lib/host-packages/openai/openplanr/skills/cmo-review/scripts/operate-review-contract.mjs +438 -0
  1131. package/lib/host-packages/openai/openplanr/skills/cmo-review/scripts/operate-review-note.mjs +595 -0
  1132. package/lib/host-packages/openai/openplanr/skills/cmo-review/scripts/validate-note.mjs +31 -0
  1133. package/lib/host-packages/openai/openplanr/skills/coo-review/SKILL.md +45 -0
  1134. package/lib/host-packages/openai/openplanr/skills/coo-review/agents/openai.yaml +6 -0
  1135. package/lib/host-packages/openai/openplanr/skills/coo-review/openplanr.skill.json +81 -0
  1136. package/lib/host-packages/openai/openplanr/skills/coo-review/references/operate-advisor-contract.md +111 -0
  1137. package/lib/host-packages/openai/openplanr/skills/coo-review/scripts/errors.mjs +8 -0
  1138. package/lib/host-packages/openai/openplanr/skills/coo-review/scripts/operate-review-contract.mjs +438 -0
  1139. package/lib/host-packages/openai/openplanr/skills/coo-review/scripts/operate-review-note.mjs +595 -0
  1140. package/lib/host-packages/openai/openplanr/skills/coo-review/scripts/validate-note.mjs +31 -0
  1141. package/lib/host-packages/openai/openplanr/skills/cpo-review/SKILL.md +48 -0
  1142. package/lib/host-packages/openai/openplanr/skills/cpo-review/agents/openai.yaml +6 -0
  1143. package/lib/host-packages/openai/openplanr/skills/cpo-review/openplanr.skill.json +81 -0
  1144. package/lib/host-packages/openai/openplanr/skills/cpo-review/references/operate-advisor-contract.md +111 -0
  1145. package/lib/host-packages/openai/openplanr/skills/cpo-review/scripts/errors.mjs +8 -0
  1146. package/lib/host-packages/openai/openplanr/skills/cpo-review/scripts/operate-review-contract.mjs +438 -0
  1147. package/lib/host-packages/openai/openplanr/skills/cpo-review/scripts/operate-review-note.mjs +595 -0
  1148. package/lib/host-packages/openai/openplanr/skills/cpo-review/scripts/validate-note.mjs +31 -0
  1149. package/lib/host-packages/openai/openplanr/skills/cto-review/SKILL.md +47 -0
  1150. package/lib/host-packages/openai/openplanr/skills/cto-review/agents/openai.yaml +6 -0
  1151. package/lib/host-packages/openai/openplanr/skills/cto-review/openplanr.skill.json +81 -0
  1152. package/lib/host-packages/openai/openplanr/skills/cto-review/references/operate-advisor-contract.md +111 -0
  1153. package/lib/host-packages/openai/openplanr/skills/cto-review/scripts/errors.mjs +8 -0
  1154. package/lib/host-packages/openai/openplanr/skills/cto-review/scripts/operate-review-contract.mjs +438 -0
  1155. package/lib/host-packages/openai/openplanr/skills/cto-review/scripts/operate-review-note.mjs +595 -0
  1156. package/lib/host-packages/openai/openplanr/skills/cto-review/scripts/validate-note.mjs +31 -0
  1157. package/lib/host-packages/openai/openplanr/skills/dashboard/SKILL.md +20 -0
  1158. package/lib/host-packages/openai/openplanr/skills/dashboard/agents/openai.yaml +6 -0
  1159. package/lib/host-packages/openai/openplanr/skills/dashboard/openplanr.skill.json +26 -0
  1160. package/lib/host-packages/openai/openplanr/skills/design/SKILL.md +73 -0
  1161. package/lib/host-packages/openai/openplanr/skills/design/agents/openai.yaml +6 -0
  1162. package/lib/host-packages/openai/openplanr/skills/design/openplanr.skill.json +466 -0
  1163. package/lib/host-packages/openai/openplanr/skills/design/references/craft.md +68 -0
  1164. package/lib/host-packages/openai/openplanr/skills/design/references/design-spec-template.md +88 -0
  1165. package/lib/host-packages/openai/openplanr/skills/design/references/design-system.md +33 -0
  1166. package/lib/host-packages/openai/openplanr/skills/design/references/discovery.md +53 -0
  1167. package/lib/host-packages/openai/openplanr/skills/design/references/generation.md +105 -0
  1168. package/lib/host-packages/openai/openplanr/skills/design/references/handoff.md +47 -0
  1169. package/lib/host-packages/openai/openplanr/skills/design/references/review.md +88 -0
  1170. package/lib/host-packages/openai/openplanr/skills/design/references/team-review.md +131 -0
  1171. package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +93 -0
  1172. package/lib/host-packages/openai/openplanr/skills/design/schemas/design-document.schema.json +306 -0
  1173. package/lib/host-packages/openai/openplanr/skills/design/schemas/design-review-context.schema.json +191 -0
  1174. package/lib/host-packages/openai/openplanr/skills/design/schemas/design-review-handoff.schema.json +407 -0
  1175. package/lib/host-packages/openai/openplanr/skills/design/scripts/design.mjs +17323 -0
  1176. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/notices/entities.txt +13 -0
  1177. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/notices/parse5.txt +21 -0
  1178. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1179. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1180. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1181. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1182. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1183. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1184. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1185. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/package.json +115 -0
  1186. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1187. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1188. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1189. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1190. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1191. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1192. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1193. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1194. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1195. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1196. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1197. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1198. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1199. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1200. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1201. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1202. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1203. package/lib/host-packages/openai/openplanr/skills/design-loop/SKILL.md +58 -0
  1204. package/lib/host-packages/openai/openplanr/skills/design-loop/agents/openai.yaml +6 -0
  1205. package/lib/host-packages/openai/openplanr/skills/design-loop/openplanr.skill.json +466 -0
  1206. package/lib/host-packages/openai/openplanr/skills/design-loop/references/craft.md +68 -0
  1207. package/lib/host-packages/openai/openplanr/skills/design-loop/references/design-spec-template.md +88 -0
  1208. package/lib/host-packages/openai/openplanr/skills/design-loop/references/design-system.md +33 -0
  1209. package/lib/host-packages/openai/openplanr/skills/design-loop/references/discovery.md +53 -0
  1210. package/lib/host-packages/openai/openplanr/skills/design-loop/references/generation.md +105 -0
  1211. package/lib/host-packages/openai/openplanr/skills/design-loop/references/handoff.md +47 -0
  1212. package/lib/host-packages/openai/openplanr/skills/design-loop/references/review.md +88 -0
  1213. package/lib/host-packages/openai/openplanr/skills/design-loop/references/team-review.md +131 -0
  1214. package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +93 -0
  1215. package/lib/host-packages/openai/openplanr/skills/design-loop/schemas/design-document.schema.json +306 -0
  1216. package/lib/host-packages/openai/openplanr/skills/design-loop/schemas/design-review-context.schema.json +191 -0
  1217. package/lib/host-packages/openai/openplanr/skills/design-loop/schemas/design-review-handoff.schema.json +407 -0
  1218. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/design.mjs +17323 -0
  1219. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/notices/entities.txt +13 -0
  1220. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/notices/parse5.txt +21 -0
  1221. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1222. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1223. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1224. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1225. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1226. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1227. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1228. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/package.json +115 -0
  1229. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1230. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1231. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1232. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1233. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1234. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1235. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1236. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1237. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1238. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1239. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1240. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1241. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1242. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1243. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1244. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1245. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1246. package/lib/host-packages/openai/openplanr/skills/design-review/SKILL.md +54 -0
  1247. package/lib/host-packages/openai/openplanr/skills/design-review/agents/openai.yaml +6 -0
  1248. package/lib/host-packages/openai/openplanr/skills/design-review/openplanr.skill.json +466 -0
  1249. package/lib/host-packages/openai/openplanr/skills/design-review/references/craft.md +68 -0
  1250. package/lib/host-packages/openai/openplanr/skills/design-review/references/design-spec-template.md +88 -0
  1251. package/lib/host-packages/openai/openplanr/skills/design-review/references/design-system.md +33 -0
  1252. package/lib/host-packages/openai/openplanr/skills/design-review/references/discovery.md +53 -0
  1253. package/lib/host-packages/openai/openplanr/skills/design-review/references/generation.md +105 -0
  1254. package/lib/host-packages/openai/openplanr/skills/design-review/references/handoff.md +47 -0
  1255. package/lib/host-packages/openai/openplanr/skills/design-review/references/review.md +88 -0
  1256. package/lib/host-packages/openai/openplanr/skills/design-review/references/team-review.md +131 -0
  1257. package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +93 -0
  1258. package/lib/host-packages/openai/openplanr/skills/design-review/schemas/design-document.schema.json +306 -0
  1259. package/lib/host-packages/openai/openplanr/skills/design-review/schemas/design-review-context.schema.json +191 -0
  1260. package/lib/host-packages/openai/openplanr/skills/design-review/schemas/design-review-handoff.schema.json +407 -0
  1261. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/design.mjs +17323 -0
  1262. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/notices/entities.txt +13 -0
  1263. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/notices/parse5.txt +21 -0
  1264. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1265. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1266. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1267. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1268. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1269. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1270. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1271. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/package.json +115 -0
  1272. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1273. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1274. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1275. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1276. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1277. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1278. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1279. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1280. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1281. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1282. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1283. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1284. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1285. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1286. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1287. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1288. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1289. package/lib/host-packages/openai/openplanr/skills/diagram/SKILL.md +65 -0
  1290. package/lib/host-packages/openai/openplanr/skills/diagram/agents/openai.yaml +6 -0
  1291. package/lib/host-packages/openai/openplanr/skills/diagram/openplanr.skill.json +59 -0
  1292. package/lib/host-packages/openai/openplanr/skills/diagram/references/diagram-document.md +86 -0
  1293. package/lib/host-packages/openai/openplanr/skills/diagram/references/diagram-fidelity.md +19 -0
  1294. package/lib/host-packages/openai/openplanr/skills/diagram/references/diagram-intent-to-ir.md +22 -0
  1295. package/lib/host-packages/openai/openplanr/skills/doctor/SKILL.md +40 -0
  1296. package/lib/host-packages/openai/openplanr/skills/doctor/agents/openai.yaml +6 -0
  1297. package/lib/host-packages/openai/openplanr/skills/doctor/openplanr.skill.json +37 -0
  1298. package/lib/host-packages/openai/openplanr/skills/doctor/references/upgrade.md +106 -0
  1299. package/lib/host-packages/openai/openplanr/skills/investigate/SKILL.md +31 -0
  1300. package/lib/host-packages/openai/openplanr/skills/investigate/agents/openai.yaml +6 -0
  1301. package/lib/host-packages/openai/openplanr/skills/investigate/openplanr.skill.json +26 -0
  1302. package/lib/host-packages/openai/openplanr/skills/land/SKILL.md +33 -0
  1303. package/lib/host-packages/openai/openplanr/skills/land/agents/openai.yaml +6 -0
  1304. package/lib/host-packages/openai/openplanr/skills/land/openplanr.skill.json +26 -0
  1305. package/lib/host-packages/openai/openplanr/skills/operate/SKILL.md +181 -0
  1306. package/lib/host-packages/openai/openplanr/skills/operate/agents/openai.yaml +6 -0
  1307. package/lib/host-packages/openai/openplanr/skills/operate/openplanr.skill.json +70 -0
  1308. package/lib/host-packages/openai/openplanr/skills/operate/scripts/errors.mjs +8 -0
  1309. package/lib/host-packages/openai/openplanr/skills/operate/scripts/operate-review-contract.mjs +438 -0
  1310. package/lib/host-packages/openai/openplanr/skills/operate/scripts/operate-review-note.mjs +595 -0
  1311. package/lib/host-packages/openai/openplanr/skills/operate/scripts/validate-note.mjs +31 -0
  1312. package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +106 -0
  1313. package/lib/host-packages/openai/openplanr/skills/plan/agents/openai.yaml +6 -0
  1314. package/lib/host-packages/openai/openplanr/skills/plan/openplanr.skill.json +389 -0
  1315. package/lib/host-packages/openai/openplanr/skills/plan/references/artifact-contract.md +39 -0
  1316. package/lib/host-packages/openai/openplanr/skills/plan/schemas/design-document.schema.json +306 -0
  1317. package/lib/host-packages/openai/openplanr/skills/plan/schemas/design-review-context.schema.json +191 -0
  1318. package/lib/host-packages/openai/openplanr/skills/plan/schemas/design-review-handoff.schema.json +407 -0
  1319. package/lib/host-packages/openai/openplanr/skills/plan/scripts/design.mjs +17323 -0
  1320. package/lib/host-packages/openai/openplanr/skills/plan/scripts/planning-ids.mjs +120 -0
  1321. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/notices/entities.txt +13 -0
  1322. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/notices/parse5.txt +21 -0
  1323. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1324. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1325. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1326. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1327. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1328. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1329. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1330. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/package.json +115 -0
  1331. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1332. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1333. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1334. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1335. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1336. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1337. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1338. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1339. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1340. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1341. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1342. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1343. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1344. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1345. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1346. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1347. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1348. package/lib/host-packages/openai/openplanr/skills/plan-review/SKILL.md +39 -0
  1349. package/lib/host-packages/openai/openplanr/skills/plan-review/agents/openai.yaml +6 -0
  1350. package/lib/host-packages/openai/openplanr/skills/plan-review/openplanr.skill.json +26 -0
  1351. package/lib/host-packages/openai/openplanr/skills/release/SKILL.md +180 -0
  1352. package/lib/host-packages/openai/openplanr/skills/release/agents/openai.yaml +6 -0
  1353. package/lib/host-packages/openai/openplanr/skills/release/assets/changelog-template.md +18 -0
  1354. package/lib/host-packages/openai/openplanr/skills/release/assets/profile-template.md +45 -0
  1355. package/lib/host-packages/openai/openplanr/skills/release/openplanr.skill.json +92 -0
  1356. package/lib/host-packages/openai/openplanr/skills/release/references/cadence.md +92 -0
  1357. package/lib/host-packages/openai/openplanr/skills/release/references/release-notes.md +127 -0
  1358. package/lib/host-packages/openai/openplanr/skills/release/references/schemes.md +103 -0
  1359. package/lib/host-packages/openai/openplanr/skills/release/scripts/collect_changes.sh +85 -0
  1360. package/lib/host-packages/openai/openplanr/skills/ship/SKILL.md +80 -0
  1361. package/lib/host-packages/openai/openplanr/skills/ship/agents/openai.yaml +6 -0
  1362. package/lib/host-packages/openai/openplanr/skills/ship/openplanr.skill.json +48 -0
  1363. package/lib/host-packages/openai/openplanr/skills/ship/references/result-contract.md +14 -0
  1364. package/lib/host-packages/openai/openplanr/skills/ship/scripts/discover-verification.mjs +107 -0
  1365. package/lib/host-packages/openai/openplanr/skills/spec/SKILL.md +53 -0
  1366. package/lib/host-packages/openai/openplanr/skills/spec/agents/openai.yaml +6 -0
  1367. package/lib/host-packages/openai/openplanr/skills/spec/openplanr.skill.json +37 -0
  1368. package/lib/host-packages/openai/openplanr/skills/spec/references/specification-contract.md +32 -0
  1369. package/lib/host-packages/openai/openplanr/skills/status/SKILL.md +21 -0
  1370. package/lib/host-packages/openai/openplanr/skills/status/agents/openai.yaml +6 -0
  1371. package/lib/host-packages/openai/openplanr/skills/status/openplanr.skill.json +26 -0
  1372. package/lib/host-packages/openai/openplanr/skills/sync/SKILL.md +30 -0
  1373. package/lib/host-packages/openai/openplanr/skills/sync/agents/openai.yaml +6 -0
  1374. package/lib/host-packages/openai/openplanr/skills/sync/openplanr.skill.json +37 -0
  1375. package/lib/host-packages/openai/openplanr/skills/sync/scripts/sync.mjs +230 -0
  1376. package/lib/integrations.d.mts +43 -0
  1377. package/lib/integrations.mjs +230 -0
  1378. package/lib/skill-runtime/errors.mjs +8 -0
  1379. package/lib/skill-runtime/operate-review-contract.mjs +438 -0
  1380. package/lib/skill-runtime/operate-review-note.mjs +595 -0
  1381. package/package.json +56 -18
  1382. package/dist/ai/codebase/context-builder.d.ts +0 -50
  1383. package/dist/ai/codebase/context-builder.d.ts.map +0 -1
  1384. package/dist/ai/codebase/context-builder.js +0 -281
  1385. package/dist/ai/codebase/context-builder.js.map +0 -1
  1386. package/dist/ai/codebase/file-reader.d.ts +0 -22
  1387. package/dist/ai/codebase/file-reader.d.ts.map +0 -1
  1388. package/dist/ai/codebase/file-reader.js +0 -144
  1389. package/dist/ai/codebase/file-reader.js.map +0 -1
  1390. package/dist/ai/codebase/index.d.ts +0 -7
  1391. package/dist/ai/codebase/index.d.ts.map +0 -1
  1392. package/dist/ai/codebase/index.js +0 -7
  1393. package/dist/ai/codebase/index.js.map +0 -1
  1394. package/dist/ai/codebase/pattern-rules.d.ts +0 -28
  1395. package/dist/ai/codebase/pattern-rules.d.ts.map +0 -1
  1396. package/dist/ai/codebase/pattern-rules.js +0 -186
  1397. package/dist/ai/codebase/pattern-rules.js.map +0 -1
  1398. package/dist/ai/codebase/rules-reader.d.ts +0 -14
  1399. package/dist/ai/codebase/rules-reader.d.ts.map +0 -1
  1400. package/dist/ai/codebase/rules-reader.js +0 -25
  1401. package/dist/ai/codebase/rules-reader.js.map +0 -1
  1402. package/dist/ai/codebase/stack-detector.d.ts +0 -18
  1403. package/dist/ai/codebase/stack-detector.d.ts.map +0 -1
  1404. package/dist/ai/codebase/stack-detector.js +0 -173
  1405. package/dist/ai/codebase/stack-detector.js.map +0 -1
  1406. package/dist/ai/codebase/tree-generator.d.ts +0 -8
  1407. package/dist/ai/codebase/tree-generator.d.ts.map +0 -1
  1408. package/dist/ai/codebase/tree-generator.js +0 -84
  1409. package/dist/ai/codebase/tree-generator.js.map +0 -1
  1410. package/dist/ai/errors.d.ts +0 -22
  1411. package/dist/ai/errors.d.ts.map +0 -1
  1412. package/dist/ai/errors.js +0 -72
  1413. package/dist/ai/errors.js.map +0 -1
  1414. package/dist/ai/index.d.ts +0 -11
  1415. package/dist/ai/index.d.ts.map +0 -1
  1416. package/dist/ai/index.js +0 -10
  1417. package/dist/ai/index.js.map +0 -1
  1418. package/dist/ai/prompts/prompt-builder.d.ts +0 -134
  1419. package/dist/ai/prompts/prompt-builder.d.ts.map +0 -1
  1420. package/dist/ai/prompts/prompt-builder.js +0 -295
  1421. package/dist/ai/prompts/prompt-builder.js.map +0 -1
  1422. package/dist/ai/prompts/system-prompts.d.ts +0 -41
  1423. package/dist/ai/prompts/system-prompts.d.ts.map +0 -1
  1424. package/dist/ai/prompts/system-prompts.js +0 -512
  1425. package/dist/ai/prompts/system-prompts.js.map +0 -1
  1426. package/dist/ai/provider-factory.d.ts +0 -10
  1427. package/dist/ai/provider-factory.d.ts.map +0 -1
  1428. package/dist/ai/provider-factory.js +0 -49
  1429. package/dist/ai/provider-factory.js.map +0 -1
  1430. package/dist/ai/providers/anthropic-provider.d.ts +0 -24
  1431. package/dist/ai/providers/anthropic-provider.d.ts.map +0 -1
  1432. package/dist/ai/providers/anthropic-provider.js +0 -97
  1433. package/dist/ai/providers/anthropic-provider.js.map +0 -1
  1434. package/dist/ai/providers/ollama-provider.d.ts +0 -13
  1435. package/dist/ai/providers/ollama-provider.d.ts.map +0 -1
  1436. package/dist/ai/providers/ollama-provider.js +0 -16
  1437. package/dist/ai/providers/ollama-provider.js.map +0 -1
  1438. package/dist/ai/providers/openai-provider.d.ts +0 -19
  1439. package/dist/ai/providers/openai-provider.d.ts.map +0 -1
  1440. package/dist/ai/providers/openai-provider.js +0 -84
  1441. package/dist/ai/providers/openai-provider.js.map +0 -1
  1442. package/dist/ai/schemas/ai-response-schemas.d.ts +0 -340
  1443. package/dist/ai/schemas/ai-response-schemas.d.ts.map +0 -1
  1444. package/dist/ai/schemas/ai-response-schemas.js +0 -278
  1445. package/dist/ai/schemas/ai-response-schemas.js.map +0 -1
  1446. package/dist/ai/types.d.ts +0 -76
  1447. package/dist/ai/types.d.ts.map +0 -1
  1448. package/dist/ai/types.js +0 -49
  1449. package/dist/ai/types.js.map +0 -1
  1450. package/dist/ai/validation/index.d.ts +0 -2
  1451. package/dist/ai/validation/index.d.ts.map +0 -1
  1452. package/dist/ai/validation/index.js +0 -2
  1453. package/dist/ai/validation/index.js.map +0 -1
  1454. package/dist/ai/validation/task-validator.d.ts +0 -37
  1455. package/dist/ai/validation/task-validator.d.ts.map +0 -1
  1456. package/dist/ai/validation/task-validator.js +0 -81
  1457. package/dist/ai/validation/task-validator.js.map +0 -1
  1458. package/dist/cli/commands/config.d.ts +0 -8
  1459. package/dist/cli/commands/config.d.ts.map +0 -1
  1460. package/dist/cli/commands/config.js +0 -224
  1461. package/dist/cli/commands/config.js.map +0 -1
  1462. package/dist/cli/commands/estimate.d.ts +0 -3
  1463. package/dist/cli/commands/estimate.d.ts.map +0 -1
  1464. package/dist/cli/commands/estimate.js +0 -368
  1465. package/dist/cli/commands/estimate.js.map +0 -1
  1466. package/dist/cli/commands/init.d.ts +0 -9
  1467. package/dist/cli/commands/init.d.ts.map +0 -1
  1468. package/dist/cli/commands/init.js +0 -166
  1469. package/dist/cli/commands/init.js.map +0 -1
  1470. package/dist/cli/commands/pipeline.d.ts +0 -3
  1471. package/dist/cli/commands/pipeline.d.ts.map +0 -1
  1472. package/dist/cli/commands/pipeline.js +0 -59
  1473. package/dist/cli/commands/pipeline.js.map +0 -1
  1474. package/dist/cli/commands/plan.d.ts +0 -15
  1475. package/dist/cli/commands/plan.d.ts.map +0 -1
  1476. package/dist/cli/commands/plan.js +0 -444
  1477. package/dist/cli/commands/plan.js.map +0 -1
  1478. package/dist/cli/commands/refine.d.ts +0 -10
  1479. package/dist/cli/commands/refine.d.ts.map +0 -1
  1480. package/dist/cli/commands/refine.js +0 -226
  1481. package/dist/cli/commands/refine.js.map +0 -1
  1482. package/dist/cli/commands/revise.d.ts +0 -24
  1483. package/dist/cli/commands/revise.d.ts.map +0 -1
  1484. package/dist/cli/commands/revise.js +0 -572
  1485. package/dist/cli/commands/revise.js.map +0 -1
  1486. package/dist/cli/helpers/task-creation.d.ts +0 -89
  1487. package/dist/cli/helpers/task-creation.d.ts.map +0 -1
  1488. package/dist/cli/helpers/task-creation.js +0 -139
  1489. package/dist/cli/helpers/task-creation.js.map +0 -1
  1490. package/dist/services/ai-service.d.ts +0 -77
  1491. package/dist/services/ai-service.d.ts.map +0 -1
  1492. package/dist/services/ai-service.js +0 -241
  1493. package/dist/services/ai-service.js.map +0 -1
  1494. package/dist/services/artifact-gathering.d.ts +0 -55
  1495. package/dist/services/artifact-gathering.d.ts.map +0 -1
  1496. package/dist/services/artifact-gathering.js +0 -147
  1497. package/dist/services/artifact-gathering.js.map +0 -1
  1498. package/dist/services/operate/advisors.d.ts +0 -625
  1499. package/dist/services/operate/advisors.d.ts.map +0 -1
  1500. package/dist/services/operate/advisors.js +0 -1545
  1501. package/dist/services/operate/advisors.js.map +0 -1
  1502. package/dist/services/operate/artifact-route-generation.d.ts +0 -111
  1503. package/dist/services/operate/artifact-route-generation.d.ts.map +0 -1
  1504. package/dist/services/operate/artifact-route-generation.js +0 -460
  1505. package/dist/services/operate/artifact-route-generation.js.map +0 -1
  1506. package/dist/services/operate/artifacts.d.ts +0 -66
  1507. package/dist/services/operate/artifacts.d.ts.map +0 -1
  1508. package/dist/services/operate/artifacts.js +0 -336
  1509. package/dist/services/operate/artifacts.js.map +0 -1
  1510. package/dist/services/operate/cadence.d.ts +0 -50
  1511. package/dist/services/operate/cadence.d.ts.map +0 -1
  1512. package/dist/services/operate/cadence.js +0 -56
  1513. package/dist/services/operate/cadence.js.map +0 -1
  1514. package/dist/services/operate/canonical.d.ts +0 -18
  1515. package/dist/services/operate/canonical.d.ts.map +0 -1
  1516. package/dist/services/operate/canonical.js +0 -157
  1517. package/dist/services/operate/canonical.js.map +0 -1
  1518. package/dist/services/operate/citation-resolution.d.ts +0 -161
  1519. package/dist/services/operate/citation-resolution.d.ts.map +0 -1
  1520. package/dist/services/operate/citation-resolution.js +0 -593
  1521. package/dist/services/operate/citation-resolution.js.map +0 -1
  1522. package/dist/services/operate/completion.d.ts +0 -80
  1523. package/dist/services/operate/completion.d.ts.map +0 -1
  1524. package/dist/services/operate/completion.js +0 -279
  1525. package/dist/services/operate/completion.js.map +0 -1
  1526. package/dist/services/operate/config.d.ts +0 -154
  1527. package/dist/services/operate/config.d.ts.map +0 -1
  1528. package/dist/services/operate/config.js +0 -791
  1529. package/dist/services/operate/config.js.map +0 -1
  1530. package/dist/services/operate/consolidation.d.ts +0 -18
  1531. package/dist/services/operate/consolidation.d.ts.map +0 -1
  1532. package/dist/services/operate/consolidation.js +0 -539
  1533. package/dist/services/operate/consolidation.js.map +0 -1
  1534. package/dist/services/operate/context-research.d.ts +0 -84
  1535. package/dist/services/operate/context-research.d.ts.map +0 -1
  1536. package/dist/services/operate/context-research.js +0 -448
  1537. package/dist/services/operate/context-research.js.map +0 -1
  1538. package/dist/services/operate/decision-brief.d.ts +0 -237
  1539. package/dist/services/operate/decision-brief.d.ts.map +0 -1
  1540. package/dist/services/operate/decision-brief.js +0 -368
  1541. package/dist/services/operate/decision-brief.js.map +0 -1
  1542. package/dist/services/operate/doctor.d.ts +0 -85
  1543. package/dist/services/operate/doctor.d.ts.map +0 -1
  1544. package/dist/services/operate/doctor.js +0 -1070
  1545. package/dist/services/operate/doctor.js.map +0 -1
  1546. package/dist/services/operate/drafts.d.ts +0 -48
  1547. package/dist/services/operate/drafts.d.ts.map +0 -1
  1548. package/dist/services/operate/drafts.js +0 -398
  1549. package/dist/services/operate/drafts.js.map +0 -1
  1550. package/dist/services/operate/engine.d.ts +0 -151
  1551. package/dist/services/operate/engine.d.ts.map +0 -1
  1552. package/dist/services/operate/engine.js +0 -1896
  1553. package/dist/services/operate/engine.js.map +0 -1
  1554. package/dist/services/operate/event-store.d.ts +0 -113
  1555. package/dist/services/operate/event-store.d.ts.map +0 -1
  1556. package/dist/services/operate/event-store.js +0 -384
  1557. package/dist/services/operate/event-store.js.map +0 -1
  1558. package/dist/services/operate/evidence-cache.d.ts +0 -41
  1559. package/dist/services/operate/evidence-cache.d.ts.map +0 -1
  1560. package/dist/services/operate/evidence-cache.js +0 -193
  1561. package/dist/services/operate/evidence-cache.js.map +0 -1
  1562. package/dist/services/operate/evidence-import.d.ts +0 -40
  1563. package/dist/services/operate/evidence-import.d.ts.map +0 -1
  1564. package/dist/services/operate/evidence-import.js +0 -340
  1565. package/dist/services/operate/evidence-import.js.map +0 -1
  1566. package/dist/services/operate/evidence.d.ts +0 -21
  1567. package/dist/services/operate/evidence.d.ts.map +0 -1
  1568. package/dist/services/operate/evidence.js +0 -20
  1569. package/dist/services/operate/evidence.js.map +0 -1
  1570. package/dist/services/operate/ids.d.ts +0 -7
  1571. package/dist/services/operate/ids.d.ts.map +0 -1
  1572. package/dist/services/operate/ids.js +0 -23
  1573. package/dist/services/operate/ids.js.map +0 -1
  1574. package/dist/services/operate/index.d.ts +0 -16
  1575. package/dist/services/operate/index.d.ts.map +0 -1
  1576. package/dist/services/operate/index.js +0 -1864
  1577. package/dist/services/operate/index.js.map +0 -1
  1578. package/dist/services/operate/integrity.d.ts +0 -81
  1579. package/dist/services/operate/integrity.d.ts.map +0 -1
  1580. package/dist/services/operate/integrity.js +0 -152
  1581. package/dist/services/operate/integrity.js.map +0 -1
  1582. package/dist/services/operate/interaction/action-service.d.ts +0 -34
  1583. package/dist/services/operate/interaction/action-service.d.ts.map +0 -1
  1584. package/dist/services/operate/interaction/action-service.js +0 -103
  1585. package/dist/services/operate/interaction/action-service.js.map +0 -1
  1586. package/dist/services/operate/interaction/answer-service.d.ts +0 -40
  1587. package/dist/services/operate/interaction/answer-service.d.ts.map +0 -1
  1588. package/dist/services/operate/interaction/answer-service.js +0 -317
  1589. package/dist/services/operate/interaction/answer-service.js.map +0 -1
  1590. package/dist/services/operate/interaction/charter-suggestions.d.ts +0 -29
  1591. package/dist/services/operate/interaction/charter-suggestions.d.ts.map +0 -1
  1592. package/dist/services/operate/interaction/charter-suggestions.js +0 -104
  1593. package/dist/services/operate/interaction/charter-suggestions.js.map +0 -1
  1594. package/dist/services/operate/interaction/confirmation-service.d.ts +0 -30
  1595. package/dist/services/operate/interaction/confirmation-service.d.ts.map +0 -1
  1596. package/dist/services/operate/interaction/confirmation-service.js +0 -78
  1597. package/dist/services/operate/interaction/confirmation-service.js.map +0 -1
  1598. package/dist/services/operate/interaction/initialization-replay.d.ts +0 -9
  1599. package/dist/services/operate/interaction/initialization-replay.d.ts.map +0 -1
  1600. package/dist/services/operate/interaction/initialization-replay.js +0 -64
  1601. package/dist/services/operate/interaction/initialization-replay.js.map +0 -1
  1602. package/dist/services/operate/interaction/question-engine.d.ts +0 -41
  1603. package/dist/services/operate/interaction/question-engine.d.ts.map +0 -1
  1604. package/dist/services/operate/interaction/question-engine.js +0 -434
  1605. package/dist/services/operate/interaction/question-engine.js.map +0 -1
  1606. package/dist/services/operate/interaction/question-registry.d.ts +0 -52
  1607. package/dist/services/operate/interaction/question-registry.d.ts.map +0 -1
  1608. package/dist/services/operate/interaction/question-registry.js +0 -305
  1609. package/dist/services/operate/interaction/question-registry.js.map +0 -1
  1610. package/dist/services/operate/interaction/session-service.d.ts +0 -55
  1611. package/dist/services/operate/interaction/session-service.d.ts.map +0 -1
  1612. package/dist/services/operate/interaction/session-service.js +0 -304
  1613. package/dist/services/operate/interaction/session-service.js.map +0 -1
  1614. package/dist/services/operate/interaction/terminal-renderer.d.ts +0 -19
  1615. package/dist/services/operate/interaction/terminal-renderer.d.ts.map +0 -1
  1616. package/dist/services/operate/interaction/terminal-renderer.js +0 -124
  1617. package/dist/services/operate/interaction/terminal-renderer.js.map +0 -1
  1618. package/dist/services/operate/journal.d.ts +0 -34
  1619. package/dist/services/operate/journal.d.ts.map +0 -1
  1620. package/dist/services/operate/journal.js +0 -235
  1621. package/dist/services/operate/journal.js.map +0 -1
  1622. package/dist/services/operate/legacy-import-service.d.ts +0 -58
  1623. package/dist/services/operate/legacy-import-service.d.ts.map +0 -1
  1624. package/dist/services/operate/legacy-import-service.js +0 -922
  1625. package/dist/services/operate/legacy-import-service.js.map +0 -1
  1626. package/dist/services/operate/lifecycle-driver.d.ts +0 -309
  1627. package/dist/services/operate/lifecycle-driver.d.ts.map +0 -1
  1628. package/dist/services/operate/lifecycle-driver.js +0 -434
  1629. package/dist/services/operate/lifecycle-driver.js.map +0 -1
  1630. package/dist/services/operate/lifecycle.d.ts +0 -96
  1631. package/dist/services/operate/lifecycle.d.ts.map +0 -1
  1632. package/dist/services/operate/lifecycle.js +0 -596
  1633. package/dist/services/operate/lifecycle.js.map +0 -1
  1634. package/dist/services/operate/lock-service.d.ts +0 -37
  1635. package/dist/services/operate/lock-service.d.ts.map +0 -1
  1636. package/dist/services/operate/lock-service.js +0 -215
  1637. package/dist/services/operate/lock-service.js.map +0 -1
  1638. package/dist/services/operate/maintenance.d.ts +0 -139
  1639. package/dist/services/operate/maintenance.d.ts.map +0 -1
  1640. package/dist/services/operate/maintenance.js +0 -2200
  1641. package/dist/services/operate/maintenance.js.map +0 -1
  1642. package/dist/services/operate/migration.d.ts +0 -68
  1643. package/dist/services/operate/migration.d.ts.map +0 -1
  1644. package/dist/services/operate/migration.js +0 -243
  1645. package/dist/services/operate/migration.js.map +0 -1
  1646. package/dist/services/operate/mission-dispatch.d.ts +0 -271
  1647. package/dist/services/operate/mission-dispatch.d.ts.map +0 -1
  1648. package/dist/services/operate/mission-dispatch.js +0 -590
  1649. package/dist/services/operate/mission-dispatch.js.map +0 -1
  1650. package/dist/services/operate/outcomes.d.ts +0 -48
  1651. package/dist/services/operate/outcomes.d.ts.map +0 -1
  1652. package/dist/services/operate/outcomes.js +0 -312
  1653. package/dist/services/operate/outcomes.js.map +0 -1
  1654. package/dist/services/operate/pipeline-handoff.d.ts +0 -138
  1655. package/dist/services/operate/pipeline-handoff.d.ts.map +0 -1
  1656. package/dist/services/operate/pipeline-handoff.js +0 -175
  1657. package/dist/services/operate/pipeline-handoff.js.map +0 -1
  1658. package/dist/services/operate/profile-migration.d.ts +0 -69
  1659. package/dist/services/operate/profile-migration.d.ts.map +0 -1
  1660. package/dist/services/operate/profile-migration.js +0 -462
  1661. package/dist/services/operate/profile-migration.js.map +0 -1
  1662. package/dist/services/operate/projection-persistence.d.ts +0 -126
  1663. package/dist/services/operate/projection-persistence.d.ts.map +0 -1
  1664. package/dist/services/operate/projection-persistence.js +0 -752
  1665. package/dist/services/operate/projection-persistence.js.map +0 -1
  1666. package/dist/services/operate/projection.d.ts +0 -37
  1667. package/dist/services/operate/projection.d.ts.map +0 -1
  1668. package/dist/services/operate/projection.js +0 -209
  1669. package/dist/services/operate/projection.js.map +0 -1
  1670. package/dist/services/operate/protocol.d.ts +0 -86
  1671. package/dist/services/operate/protocol.d.ts.map +0 -1
  1672. package/dist/services/operate/protocol.js +0 -76
  1673. package/dist/services/operate/protocol.js.map +0 -1
  1674. package/dist/services/operate/read-only-providers.d.ts +0 -76
  1675. package/dist/services/operate/read-only-providers.d.ts.map +0 -1
  1676. package/dist/services/operate/read-only-providers.js +0 -421
  1677. package/dist/services/operate/read-only-providers.js.map +0 -1
  1678. package/dist/services/operate/redaction.d.ts +0 -74
  1679. package/dist/services/operate/redaction.d.ts.map +0 -1
  1680. package/dist/services/operate/redaction.js +0 -406
  1681. package/dist/services/operate/redaction.js.map +0 -1
  1682. package/dist/services/operate/reducer.d.ts +0 -10
  1683. package/dist/services/operate/reducer.d.ts.map +0 -1
  1684. package/dist/services/operate/reducer.js +0 -11
  1685. package/dist/services/operate/reducer.js.map +0 -1
  1686. package/dist/services/operate/report-html.d.ts +0 -32
  1687. package/dist/services/operate/report-html.d.ts.map +0 -1
  1688. package/dist/services/operate/report-html.js +0 -289
  1689. package/dist/services/operate/report-html.js.map +0 -1
  1690. package/dist/services/operate/reports.d.ts +0 -72
  1691. package/dist/services/operate/reports.d.ts.map +0 -1
  1692. package/dist/services/operate/reports.js +0 -481
  1693. package/dist/services/operate/reports.js.map +0 -1
  1694. package/dist/services/operate/routes.d.ts +0 -133
  1695. package/dist/services/operate/routes.d.ts.map +0 -1
  1696. package/dist/services/operate/routes.js +0 -1577
  1697. package/dist/services/operate/routes.js.map +0 -1
  1698. package/dist/services/operate/scratch.d.ts +0 -81
  1699. package/dist/services/operate/scratch.d.ts.map +0 -1
  1700. package/dist/services/operate/scratch.js +0 -190
  1701. package/dist/services/operate/scratch.js.map +0 -1
  1702. package/dist/services/operate/shipment-observer.d.ts +0 -14
  1703. package/dist/services/operate/shipment-observer.d.ts.map +0 -1
  1704. package/dist/services/operate/shipment-observer.js +0 -320
  1705. package/dist/services/operate/shipment-observer.js.map +0 -1
  1706. package/dist/services/operate/stalled-item-service.d.ts +0 -18
  1707. package/dist/services/operate/stalled-item-service.d.ts.map +0 -1
  1708. package/dist/services/operate/stalled-item-service.js +0 -121
  1709. package/dist/services/operate/stalled-item-service.js.map +0 -1
  1710. package/dist/services/operate/subprocess-env.d.ts +0 -4
  1711. package/dist/services/operate/subprocess-env.d.ts.map +0 -1
  1712. package/dist/services/operate/subprocess-env.js +0 -45
  1713. package/dist/services/operate/subprocess-env.js.map +0 -1
  1714. package/dist/services/operate/types.d.ts +0 -1064
  1715. package/dist/services/operate/types.d.ts.map +0 -1
  1716. package/dist/services/operate/types.js +0 -27
  1717. package/dist/services/operate/types.js.map +0 -1
  1718. package/dist/services/operate/workspace.d.ts +0 -76
  1719. package/dist/services/operate/workspace.d.ts.map +0 -1
  1720. package/dist/services/operate/workspace.js +0 -350
  1721. package/dist/services/operate/workspace.js.map +0 -1
  1722. package/dist/services/revise-service.d.ts +0 -115
  1723. package/dist/services/revise-service.d.ts.map +0 -1
  1724. package/dist/services/revise-service.js +0 -294
  1725. package/dist/services/revise-service.js.map +0 -1
  1726. package/dist/templates/rules/claude/planr-pipeline.md.hbs +0 -69
  1727. package/dist/templates/rules/codex/_pipeline-section.md.hbs +0 -154
  1728. package/dist/templates/rules/cursor/agents/backend-agent.md +0 -299
  1729. package/dist/templates/rules/cursor/agents/db-agent.md +0 -163
  1730. package/dist/templates/rules/cursor/agents/designer-agent.md +0 -219
  1731. package/dist/templates/rules/cursor/agents/devops-agent.md +0 -197
  1732. package/dist/templates/rules/cursor/agents/doc-gen-agent.md +0 -203
  1733. package/dist/templates/rules/cursor/agents/frontend-agent.md +0 -220
  1734. package/dist/templates/rules/cursor/agents/qa-agent.md +0 -170
  1735. package/dist/templates/rules/cursor/agents/specification-agent.md +0 -282
  1736. package/dist/templates/rules/cursor/planr-pipeline-plan.mdc.hbs +0 -196
  1737. package/dist/templates/rules/cursor/planr-pipeline-ship.mdc.hbs +0 -246
  1738. package/dist/templates/rules/cursor/planr-pipeline.mdc.hbs +0 -134
@@ -0,0 +1,1297 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { lookup } from 'node:dns/promises';
3
+ import { isIP } from 'node:net';
4
+ import { sha256CanonicalJson } from '../canonical-json.js';
5
+ import { ConnectorCheckpointCustodyError } from './checkpoint-custody.js';
6
+ import { readConnectorAdapterResultBytesV2 } from './connector-registry.js';
7
+ import { ConnectorCredentialCustodyError } from './credential-custody.js';
8
+ const HASH = /^sha256:[a-f0-9]{64}$/u;
9
+ const ID = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u;
10
+ const TEXT_ID = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u;
11
+ const VERSION = /^(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)$/u;
12
+ const PRIVATE_VALUE = /(?:^|[\s"'`(])\/(?:Users|home|private|var|etc|tmp)\/|(?:^|[\s"'`(])[A-Za-z]:[\\/][^\s]+|-----BEGIN [A-Z ]*PRIVATE KEY-----|\b(?:Bearer|Basic)\s+[A-Za-z0-9+/=._-]+|\b(?:api[-_ ]?key|access[-_ ]?token|client[-_ ]?secret|credential(?:Value)?|password|passwd|secret|token)\s*[:=]\s*[^\s]+/iu;
13
+ const SENSITIVE_KEY = /(?:authorization|proxy-authorization|cookie|set-cookie|password|passwd|secret|token|api[-_]?key|client[-_]?secret|credentialValue|private[-_]?key)/iu;
14
+ const RESULT_EFFECTS = Object.freeze([
15
+ 'provider-call',
16
+ 'operate-assignment-submit',
17
+ 'evidence-materialization',
18
+ ]);
19
+ export class ConnectorRuntimeErrorV2 extends Error {
20
+ code;
21
+ constructor(code, message) {
22
+ super(message);
23
+ this.code = code;
24
+ this.name = code;
25
+ }
26
+ }
27
+ function fail(code, message) {
28
+ throw new ConnectorRuntimeErrorV2(code, message);
29
+ }
30
+ function exactKeys(value, expected, label) {
31
+ if (JSON.stringify(Object.keys(value).sort()) !== JSON.stringify([...expected].sort())) {
32
+ fail('E_LIVE_EVIDENCE_REQUEST_INVALID', `${label} contains missing or unsupported fields.`);
33
+ }
34
+ }
35
+ function record(value, label) {
36
+ if (value === null || typeof value !== 'object' || Array.isArray(value)) {
37
+ fail('E_LIVE_EVIDENCE_REQUEST_INVALID', `${label} must be one closed object.`);
38
+ }
39
+ return value;
40
+ }
41
+ function safePortable(value, key = '', seen = new Set()) {
42
+ if (SENSITIVE_KEY.test(key)) {
43
+ fail('E_LIVE_EVIDENCE_PRIVATE_DATA', 'Live-evidence input contains restricted content.');
44
+ }
45
+ if (typeof value === 'string') {
46
+ if (value.length > 2_048 || PRIVATE_VALUE.test(value) || value.includes('\u0000')) {
47
+ fail('E_LIVE_EVIDENCE_PRIVATE_DATA', 'Live-evidence input contains restricted content.');
48
+ }
49
+ return;
50
+ }
51
+ if (value === null || typeof value !== 'object')
52
+ return;
53
+ if (seen.has(value))
54
+ fail('E_LIVE_EVIDENCE_REQUEST_INVALID', 'Live-evidence input contains a cycle.');
55
+ seen.add(value);
56
+ try {
57
+ if (Array.isArray(value)) {
58
+ for (const entry of value)
59
+ safePortable(entry, key, seen);
60
+ }
61
+ else {
62
+ for (const [nestedKey, nested] of Object.entries(value)) {
63
+ safePortable(nested, nestedKey, seen);
64
+ }
65
+ }
66
+ }
67
+ finally {
68
+ seen.delete(value);
69
+ }
70
+ }
71
+ function sortedUnique(values, label) {
72
+ if (values.length < 1 ||
73
+ values.length > 32 ||
74
+ values.some((value) => !TEXT_ID.test(value)) ||
75
+ new Set(values).size !== values.length ||
76
+ values.some((value, index) => index > 0 && value.localeCompare(values[index - 1]) <= 0)) {
77
+ fail('E_LIVE_EVIDENCE_REQUEST_INVALID', `${label} must be unique and canonically ordered.`);
78
+ }
79
+ }
80
+ export function assertConnectorEvidenceRequestV2(value) {
81
+ const input = record(value, 'Live-evidence request');
82
+ exactKeys(input, [
83
+ 'accountIdentityHash',
84
+ 'actor',
85
+ 'adapterVersion',
86
+ 'assignmentId',
87
+ 'bounds',
88
+ 'claim',
89
+ 'classification',
90
+ 'consentExpiresAt',
91
+ 'consentRecordId',
92
+ 'kind',
93
+ 'logicalCredentialRef',
94
+ 'operation',
95
+ 'ownerActorId',
96
+ 'provider',
97
+ 'purpose',
98
+ 'queryHash',
99
+ 'schemaVersion',
100
+ 'scope',
101
+ 'scopes',
102
+ 'selectors',
103
+ 'sensitivity',
104
+ 'sourceContract',
105
+ 'submissionId',
106
+ 'window',
107
+ ], 'Live-evidence request');
108
+ const actor = record(input.actor, 'Actor');
109
+ const provider = record(input.provider, 'Provider');
110
+ const sourceContract = record(input.sourceContract, 'Source contract');
111
+ const scope = record(input.scope, 'Scope');
112
+ const window = record(input.window, 'Window');
113
+ const bounds = record(input.bounds, 'Bounds');
114
+ const claim = record(input.claim, 'Claim');
115
+ exactKeys(actor, ['actorId', 'kind', 'runtime'], 'Actor');
116
+ exactKeys(provider, ['id', 'version'], 'Provider');
117
+ exactKeys(sourceContract, ['id', 'version'], 'Source contract');
118
+ exactKeys(scope, ['domainId', 'domainVersion', 'scopeId'], 'Scope');
119
+ exactKeys(window, ['from', 'to'], 'Window');
120
+ exactKeys(bounds, ['maxBytes', 'maxCalls', 'maxPages', 'maxRecords'], 'Bounds');
121
+ exactKeys(claim, ['confidence', 'localClaimId', 'relation'], 'Claim');
122
+ safePortable(input);
123
+ if (input.kind !== 'openplanr-live-evidence-request' ||
124
+ input.schemaVersion !== '1.0.0' ||
125
+ typeof input.assignmentId !== 'string' ||
126
+ !/^asg_[A-Za-z0-9][A-Za-z0-9._-]{7,127}$/u.test(input.assignmentId) ||
127
+ typeof input.submissionId !== 'string' ||
128
+ !/^sub_[A-Za-z0-9][A-Za-z0-9._-]{7,127}$/u.test(input.submissionId) ||
129
+ typeof actor.actorId !== 'string' ||
130
+ !TEXT_ID.test(actor.actorId) ||
131
+ !['agent', 'human'].includes(String(actor.kind)) ||
132
+ typeof actor.runtime !== 'string' ||
133
+ !TEXT_ID.test(actor.runtime) ||
134
+ typeof input.ownerActorId !== 'string' ||
135
+ !TEXT_ID.test(input.ownerActorId) ||
136
+ typeof provider.id !== 'string' ||
137
+ !ID.test(provider.id) ||
138
+ typeof provider.version !== 'string' ||
139
+ !VERSION.test(provider.version) ||
140
+ typeof input.adapterVersion !== 'string' ||
141
+ !VERSION.test(input.adapterVersion) ||
142
+ typeof input.operation !== 'string' ||
143
+ !ID.test(input.operation) ||
144
+ typeof sourceContract.id !== 'string' ||
145
+ !ID.test(sourceContract.id) ||
146
+ sourceContract.version !== '1.0.0' ||
147
+ typeof scope.scopeId !== 'string' ||
148
+ !TEXT_ID.test(scope.scopeId) ||
149
+ typeof scope.domainId !== 'string' ||
150
+ !ID.test(scope.domainId) ||
151
+ typeof scope.domainVersion !== 'string' ||
152
+ !VERSION.test(scope.domainVersion) ||
153
+ typeof input.logicalCredentialRef !== 'string' ||
154
+ !TEXT_ID.test(input.logicalCredentialRef) ||
155
+ typeof input.consentRecordId !== 'string' ||
156
+ !/^lcon_[A-Za-z0-9][A-Za-z0-9._-]{7,127}$/u.test(input.consentRecordId) ||
157
+ typeof input.accountIdentityHash !== 'string' ||
158
+ !HASH.test(input.accountIdentityHash) ||
159
+ typeof input.queryHash !== 'string' ||
160
+ !HASH.test(input.queryHash) ||
161
+ typeof input.purpose !== 'string' ||
162
+ input.purpose.length < 1 ||
163
+ input.purpose.length > 512 ||
164
+ !['public', 'internal', 'confidential', 'restricted'].includes(String(input.classification)) ||
165
+ !['public', 'internal', 'confidential', 'restricted'].includes(String(input.sensitivity)) ||
166
+ typeof window.from !== 'string' ||
167
+ typeof window.to !== 'string' ||
168
+ !Number.isFinite(Date.parse(window.from)) ||
169
+ !Number.isFinite(Date.parse(window.to)) ||
170
+ Date.parse(window.from) >= Date.parse(window.to) ||
171
+ typeof input.consentExpiresAt !== 'string' ||
172
+ !Number.isFinite(Date.parse(input.consentExpiresAt)) ||
173
+ Date.parse(window.to) >= Date.parse(input.consentExpiresAt) ||
174
+ typeof claim.localClaimId !== 'string' ||
175
+ !TEXT_ID.test(claim.localClaimId) ||
176
+ !['supportedBy', 'contradictedBy'].includes(String(claim.relation)) ||
177
+ typeof claim.confidence !== 'number' ||
178
+ !Number.isFinite(claim.confidence) ||
179
+ claim.confidence < 0 ||
180
+ claim.confidence > 1) {
181
+ fail('E_LIVE_EVIDENCE_REQUEST_INVALID', 'Live-evidence request fields are invalid.');
182
+ }
183
+ const maxima = { maxCalls: 100, maxPages: 100, maxRecords: 10_000, maxBytes: 10_485_760 };
184
+ for (const [key, maximum] of Object.entries(maxima)) {
185
+ const bound = bounds[key];
186
+ if (!Number.isSafeInteger(bound) || bound < 1 || bound > maximum) {
187
+ fail('E_LIVE_EVIDENCE_REQUEST_INVALID', 'Live-evidence request bounds are invalid.');
188
+ }
189
+ }
190
+ if (!Array.isArray(input.selectors) || !Array.isArray(input.scopes)) {
191
+ fail('E_LIVE_EVIDENCE_REQUEST_INVALID', 'Live-evidence selectors and scopes are invalid.');
192
+ }
193
+ sortedUnique(input.selectors, 'selectors');
194
+ sortedUnique(input.scopes, 'scopes');
195
+ return Object.freeze(structuredClone(input));
196
+ }
197
+ function effects(executed = new Set()) {
198
+ return Object.freeze(RESULT_EFFECTS.map((id) => Object.freeze({ id, executed: executed.has(id) })));
199
+ }
200
+ function ok(operation, data, executed, nextAction) {
201
+ return Object.freeze({
202
+ ok: true,
203
+ operation,
204
+ effects: effects(executed),
205
+ authorityRequired: operation === 'evidence.preview',
206
+ ownerActionRequired: false,
207
+ nextAction,
208
+ data: Object.freeze(structuredClone(data)),
209
+ });
210
+ }
211
+ function failed(operation, code, problem, executed, options = {}) {
212
+ return Object.freeze({
213
+ ok: false,
214
+ operation,
215
+ effects: effects(executed),
216
+ authorityRequired: code.includes('AUTHORITY') || code.includes('CONSENT') || code.includes('OWNER_CONFIRMATION'),
217
+ ownerActionRequired: options.ownerActionRequired ?? false,
218
+ nextAction: options.nextAction ??
219
+ 'Inspect the bounded failure and retry only after correcting its cause.',
220
+ error: Object.freeze({ code, problem }),
221
+ });
222
+ }
223
+ function digestId(prefix, value) {
224
+ return `${prefix}_${sha256CanonicalJson(value).slice('sha256:'.length, 38)}`;
225
+ }
226
+ function protocolDocket(request) {
227
+ return Object.freeze({
228
+ provider: Object.freeze(structuredClone(request.provider)),
229
+ adapterVersion: request.adapterVersion,
230
+ accountIdentityHash: request.accountIdentityHash,
231
+ selectors: Object.freeze([...request.selectors]),
232
+ effect: 'provider-call',
233
+ scopes: Object.freeze([...request.scopes]),
234
+ queryHash: request.queryHash,
235
+ window: Object.freeze(structuredClone(request.window)),
236
+ ceilings: Object.freeze(structuredClone(request.bounds)),
237
+ classification: request.classification,
238
+ sensitivity: request.sensitivity,
239
+ purpose: request.purpose,
240
+ expiresAt: request.consentExpiresAt,
241
+ changedRecordDiffHash: null,
242
+ consequences: Object.freeze(['The provider receives one bounded read-only evidence query.']),
243
+ authorityBoundary: 'consent-is-not-access-authority',
244
+ choices: Object.freeze(['approve', 'cancel']),
245
+ defaultChoice: null,
246
+ cancelEffect: 'none',
247
+ });
248
+ }
249
+ function consentRecord(request, docket, issuedAt) {
250
+ const body = {
251
+ kind: 'operating-live-evidence-consent-record',
252
+ schemaVersion: '1.0.0',
253
+ protocolVersion: '2.0.0',
254
+ consentRecordId: request.consentRecordId,
255
+ authority: 'none',
256
+ decision: 'approved',
257
+ docket,
258
+ docketHash: sha256CanonicalJson(docket),
259
+ actor: { actorId: request.ownerActorId, kind: 'human' },
260
+ provider: request.provider,
261
+ adapterVersion: request.adapterVersion,
262
+ accountIdentityHash: request.accountIdentityHash,
263
+ selectors: request.selectors,
264
+ scopes: request.scopes,
265
+ queryHash: request.queryHash,
266
+ window: request.window,
267
+ ceilings: request.bounds,
268
+ classification: request.classification,
269
+ purpose: request.purpose,
270
+ issuedAt,
271
+ expiresAt: request.consentExpiresAt,
272
+ };
273
+ return Object.freeze({ ...body, consentHash: sha256CanonicalJson(body) });
274
+ }
275
+ function exactConsentForRequest(value, request, docket) {
276
+ return (value.consentRecordId === request.consentRecordId &&
277
+ value.authority === 'none' &&
278
+ value.decision === 'approved' &&
279
+ sha256CanonicalJson(value.docket) === sha256CanonicalJson(docket) &&
280
+ sha256CanonicalJson(value.provider) === sha256CanonicalJson(request.provider) &&
281
+ value.adapterVersion === request.adapterVersion &&
282
+ value.accountIdentityHash === request.accountIdentityHash &&
283
+ sha256CanonicalJson(value.selectors) === sha256CanonicalJson(request.selectors) &&
284
+ sha256CanonicalJson(value.scopes) === sha256CanonicalJson(request.scopes) &&
285
+ value.queryHash === request.queryHash &&
286
+ sha256CanonicalJson(value.window) === sha256CanonicalJson(request.window) &&
287
+ sha256CanonicalJson(value.ceilings) === sha256CanonicalJson(request.bounds) &&
288
+ value.classification === request.classification &&
289
+ value.purpose === request.purpose &&
290
+ value.expiresAt === request.consentExpiresAt);
291
+ }
292
+ function selfHashed(body, field) {
293
+ return Object.freeze({ ...body, [field]: sha256CanonicalJson(body) });
294
+ }
295
+ function checkpointEvent(checkpoint, type, at, patch) {
296
+ const body = {
297
+ eventId: digestId('lcev', {
298
+ checkpointId: checkpoint.checkpointId,
299
+ generation: checkpoint.generation,
300
+ type,
301
+ patch,
302
+ }),
303
+ type,
304
+ expectedGeneration: checkpoint.generation,
305
+ expectedCheckpointHash: checkpoint.checkpointHash,
306
+ at,
307
+ patch,
308
+ };
309
+ return Object.freeze({ ...body, eventHash: sha256CanonicalJson(body) });
310
+ }
311
+ function findBaseRecord(records, identity, fields, label) {
312
+ const matches = records.filter((entry) => fields.every((field) => entry[field] === identity[field]));
313
+ if (matches.length !== 1)
314
+ fail('E_LIVE_EVIDENCE_PACKAGE_INVALID', `${label} is not uniquely available.`);
315
+ return matches[0];
316
+ }
317
+ function asHash(value, label) {
318
+ if (typeof value !== 'string' || !HASH.test(value)) {
319
+ fail('E_LIVE_EVIDENCE_PACKAGE_INVALID', `${label} is invalid.`);
320
+ }
321
+ return value;
322
+ }
323
+ function sha256Bytes(bytes) {
324
+ return `sha256:${createHash('sha256').update(bytes).digest('hex')}`;
325
+ }
326
+ export class ConnectorRuntimeV2 {
327
+ #registry;
328
+ #credentials;
329
+ #checkpoints;
330
+ #contracts;
331
+ #evidenceRegistry;
332
+ #operate;
333
+ #transport;
334
+ #now;
335
+ constructor(input) {
336
+ this.#registry = input.registry;
337
+ this.#credentials = input.credentials;
338
+ this.#checkpoints = input.checkpoints;
339
+ this.#contracts = input.contracts;
340
+ this.#evidenceRegistry = input.evidenceRegistry;
341
+ this.#operate = input.operate;
342
+ this.#transport = input.transport;
343
+ this.#now = input.now ?? Date.now;
344
+ }
345
+ async providers() {
346
+ const providers = this.#registry.list().map(({ registration, adapter }) => ({
347
+ provider: adapter.definition.provider,
348
+ adapterVersion: adapter.definition.adapterVersion,
349
+ category: adapter.definition.category,
350
+ operations: adapter.definition.operations.map(({ operation, sourceContracts }) => ({
351
+ operation,
352
+ sourceContracts,
353
+ })),
354
+ registrationHash: registration.registrationHash,
355
+ }));
356
+ return ok('evidence.providers', { providers }, new Set(), 'Preview one exact provider request before collecting evidence.');
357
+ }
358
+ async preview(value) {
359
+ const request = assertConnectorEvidenceRequestV2(value);
360
+ const selected = this.#registry.resolve({
361
+ providerId: request.provider.id,
362
+ providerVersion: request.provider.version,
363
+ adapterVersion: request.adapterVersion,
364
+ operation: request.operation,
365
+ sourceContractId: request.sourceContract.id,
366
+ domainId: request.scope.domainId,
367
+ });
368
+ const docket = protocolDocket(request);
369
+ return Object.freeze({
370
+ ok: true,
371
+ operation: 'evidence.preview',
372
+ effects: effects(),
373
+ authorityRequired: true,
374
+ ownerActionRequired: true,
375
+ nextAction: 'Ask the named owner to choose approve or cancel on this exact neutral docket.',
376
+ data: Object.freeze({
377
+ provider: request.provider,
378
+ adapterVersion: request.adapterVersion,
379
+ category: selected.adapter.definition.category,
380
+ logicalCredentialRef: request.logicalCredentialRef,
381
+ docket,
382
+ protocolDocketHash: sha256CanonicalJson(docket),
383
+ }),
384
+ });
385
+ }
386
+ async status(value) {
387
+ if (typeof value === 'string') {
388
+ const snapshot = await this.#checkpoints.readByIdentity(value);
389
+ const checkpoint = snapshot.checkpoint;
390
+ return ok('evidence.status', {
391
+ checkpointId: checkpoint.checkpointId,
392
+ requestId: checkpoint.requestId,
393
+ state: checkpoint.state,
394
+ generation: checkpoint.generation,
395
+ requestHash: checkpoint.requestHash,
396
+ artifactId: checkpoint.artifactId,
397
+ artifactHash: checkpoint.artifactHash,
398
+ updatedAt: checkpoint.updatedAt,
399
+ }, new Set(), checkpoint.state === 'committed'
400
+ ? 'Use the accepted Evidence through normal Operate reads.'
401
+ : 'Resume only the exact bound collection request.');
402
+ }
403
+ const request = assertConnectorEvidenceRequestV2(value);
404
+ const docket = protocolDocket(request);
405
+ const protocolBinding = Object.freeze({
406
+ actorId: request.ownerActorId,
407
+ credentialRef: request.logicalCredentialRef,
408
+ consentRecordId: request.consentRecordId,
409
+ protocolDocketHash: sha256CanonicalJson(docket),
410
+ provider: request.provider,
411
+ adapterVersion: request.adapterVersion,
412
+ accountIdentityHash: request.accountIdentityHash,
413
+ });
414
+ try {
415
+ const consent = await this.#credentials.validatedConsent({
416
+ ...protocolBinding,
417
+ requestHash: 'sha256:0000000000000000000000000000000000000000000000000000000000000000',
418
+ });
419
+ if (!exactConsentForRequest(consent, request, docket)) {
420
+ fail('E_LIVE_EVIDENCE_CONSENT_INVALID', 'Stored consent does not match this exact request.');
421
+ }
422
+ const protocolBindingHash = await this.#credentials.protocolBindingHash(protocolBinding);
423
+ const selected = this.#registry.resolve({
424
+ providerId: request.provider.id,
425
+ providerVersion: request.provider.version,
426
+ adapterVersion: request.adapterVersion,
427
+ operation: request.operation,
428
+ sourceContractId: request.sourceContract.id,
429
+ domainId: request.scope.domainId,
430
+ });
431
+ const preparation = await this.#operate.prepareLiveEvidenceSubmission({
432
+ assignmentId: request.assignmentId,
433
+ submissionId: request.submissionId,
434
+ actor: request.actor,
435
+ });
436
+ const baseEvidenceProvider = findBaseRecord(this.#evidenceRegistry.providers, record(selected.registration.baseEvidenceProvider, 'Provider base reference'), ['providerId', 'providerVersion'], 'Base evidence-provider registration');
437
+ const baseResolver = findBaseRecord(this.#evidenceRegistry.resolvers, record(selected.registration.baseResolver, 'Resolver base reference'), ['resolverId', 'resolverVersion'], 'Base evidence-resolver registration');
438
+ const checkpointId = digestId('lchk', { request, protocolBindingHash });
439
+ const snapshot = await this.#checkpoints.readByIdentity(checkpointId);
440
+ const context = this.#checkpointContext({
441
+ request,
442
+ preparation,
443
+ registration: selected.registration,
444
+ baseEvidenceProvider,
445
+ baseResolver,
446
+ consent,
447
+ protocolBindingHash,
448
+ health: record(snapshot.checkpoint.health, 'Stored provider health'),
449
+ });
450
+ const checkpoint = snapshot.checkpoint;
451
+ this.#assertCheckpointContext(context, checkpoint);
452
+ return ok('evidence.status', {
453
+ checkpointId: context.checkpointId,
454
+ state: checkpoint.state,
455
+ generation: checkpoint.generation,
456
+ requestHash: checkpoint.requestHash,
457
+ artifactId: checkpoint.artifactId,
458
+ artifactHash: checkpoint.artifactHash,
459
+ updatedAt: checkpoint.updatedAt,
460
+ }, new Set(), checkpoint.state === 'committed'
461
+ ? 'Use the accepted Evidence through normal Operate reads.'
462
+ : 'Resume the exact collection request; changed inputs will conflict.');
463
+ }
464
+ catch (error) {
465
+ if (error instanceof ConnectorCheckpointCustodyError &&
466
+ error.code === 'LIVE_EVIDENCE_CHECKPOINT_NOT_FOUND') {
467
+ return failed('evidence.status', error.code, 'No checkpoint exists for this exact request.', new Set(), { nextAction: 'Preview the request before choosing whether to collect.' });
468
+ }
469
+ throw error;
470
+ }
471
+ }
472
+ #checkpointContext(input) {
473
+ const { request, preparation, registration, baseEvidenceProvider, baseResolver, consent, protocolBindingHash, health, } = input;
474
+ const sourceIdentityHash = sha256CanonicalJson({
475
+ provider: request.provider,
476
+ adapterVersion: request.adapterVersion,
477
+ accountIdentityHash: request.accountIdentityHash,
478
+ selectors: request.selectors,
479
+ sourceContract: request.sourceContract,
480
+ });
481
+ const checkpointId = digestId('lchk', { request, protocolBindingHash });
482
+ const requestId = digestId('lreq', { request, protocolBindingHash });
483
+ const createdAt = String(consent.issuedAt);
484
+ const immutable = {
485
+ kind: 'operating-connector-checkpoint',
486
+ schemaVersion: '1.0.0',
487
+ protocolVersion: '2.0.0',
488
+ checkpointId,
489
+ requestId,
490
+ effect: 'provider-call',
491
+ provider: request.provider,
492
+ providerRegistrationHash: registration.registrationHash,
493
+ adapterVersion: request.adapterVersion,
494
+ sourceIdentityHash,
495
+ credentialRefHash: sha256CanonicalJson({
496
+ logicalCredentialRef: request.logicalCredentialRef,
497
+ protocolDocket: protocolDocket(request),
498
+ }),
499
+ boundsHash: sha256CanonicalJson(request.bounds),
500
+ queryHash: request.queryHash,
501
+ windowHash: sha256CanonicalJson(request.window),
502
+ health,
503
+ redactionVersion: '1.0.0',
504
+ createdAt,
505
+ };
506
+ const provisionalRequesting = selfHashed({
507
+ ...immutable,
508
+ generation: 1,
509
+ lastEventId: digestId('lcev', { checkpointId, type: 'request' }),
510
+ lastEventHash: sha256CanonicalJson({ checkpointId, type: 'request' }),
511
+ state: 'requesting',
512
+ requestHash: 'sha256:0000000000000000000000000000000000000000000000000000000000000000',
513
+ consentRecordId: consent.consentRecordId,
514
+ consentRecordHash: consent.consentHash,
515
+ consentExpiresAt: consent.expiresAt,
516
+ runtimeCapabilityHash: protocolBindingHash,
517
+ predecessorDigest: 'sha256:0000000000000000000000000000000000000000000000000000000000000000',
518
+ watermarkDigest: null,
519
+ artifactId: null,
520
+ artifactHash: null,
521
+ absenceDigest: null,
522
+ updatedAt: createdAt,
523
+ }, 'checkpointHash');
524
+ this.#contracts.assertOperatingConnectorCheckpointV2(provisionalRequesting);
525
+ const requestHash = this.#contracts.deriveOperatingLiveEvidenceRequestHashV2({
526
+ assignment: preparation.assignment,
527
+ consentRecord: consent,
528
+ connectorCheckpoint: provisionalRequesting,
529
+ liveProviderRegistration: registration,
530
+ baseEvidenceProvider,
531
+ baseResolver,
532
+ sourceContract: request.sourceContract,
533
+ classification: request.classification,
534
+ });
535
+ const prepared = this.#contracts.assertOperatingConnectorCheckpointV2(selfHashed({
536
+ ...immutable,
537
+ generation: 0,
538
+ lastEventId: null,
539
+ lastEventHash: null,
540
+ state: 'prepared',
541
+ requestHash,
542
+ consentRecordId: null,
543
+ consentRecordHash: null,
544
+ consentExpiresAt: null,
545
+ runtimeCapabilityHash: null,
546
+ predecessorDigest: null,
547
+ watermarkDigest: null,
548
+ artifactId: null,
549
+ artifactHash: null,
550
+ absenceDigest: null,
551
+ updatedAt: createdAt,
552
+ }, 'checkpointHash'));
553
+ return Object.freeze({
554
+ checkpointId,
555
+ requestId,
556
+ requestHash,
557
+ sourceIdentityHash,
558
+ health,
559
+ prepared,
560
+ });
561
+ }
562
+ #assertCheckpointContext(context, checkpoint) {
563
+ const immutableFields = [
564
+ 'kind',
565
+ 'schemaVersion',
566
+ 'protocolVersion',
567
+ 'checkpointId',
568
+ 'requestId',
569
+ 'effect',
570
+ 'provider',
571
+ 'providerRegistrationHash',
572
+ 'adapterVersion',
573
+ 'sourceIdentityHash',
574
+ 'credentialRefHash',
575
+ 'boundsHash',
576
+ 'queryHash',
577
+ 'windowHash',
578
+ 'health',
579
+ 'redactionVersion',
580
+ 'createdAt',
581
+ 'requestHash',
582
+ ];
583
+ if (immutableFields.some((field) => sha256CanonicalJson(checkpoint[field]) !== sha256CanonicalJson(context.prepared[field]))) {
584
+ fail('E_LIVE_EVIDENCE_CHECKPOINT_CONFLICT', 'Stored checkpoint custody does not match the exact request.');
585
+ }
586
+ }
587
+ #assertPreflightHealth(health) {
588
+ if (health.status !== 'available' ||
589
+ !HASH.test(health.proofDigest) ||
590
+ !Number.isFinite(Date.parse(health.checkedAt)) ||
591
+ !Number.isFinite(Date.parse(health.freshUntil)) ||
592
+ Date.parse(health.checkedAt) >= Date.parse(health.freshUntil) ||
593
+ this.#now() >= Date.parse(health.freshUntil)) {
594
+ fail('E_LIVE_EVIDENCE_PROVIDER_UNHEALTHY', 'The provider lacks one current trusted available-health proof.');
595
+ }
596
+ }
597
+ async collect(value, options = {}) {
598
+ const operation = 'evidence.collect';
599
+ const executed = new Set();
600
+ const request = assertConnectorEvidenceRequestV2(value);
601
+ const selected = this.#registry.resolve({
602
+ providerId: request.provider.id,
603
+ providerVersion: request.provider.version,
604
+ adapterVersion: request.adapterVersion,
605
+ operation: request.operation,
606
+ sourceContractId: request.sourceContract.id,
607
+ domainId: request.scope.domainId,
608
+ });
609
+ const registration = selected.registration;
610
+ const operationDefinition = selected.adapter.definition.operations.find((candidate) => candidate.operation === request.operation);
611
+ if (!operationDefinition) {
612
+ fail('E_LIVE_EVIDENCE_PROVIDER_INCOMPATIBLE', 'The exact provider operation is unavailable.');
613
+ }
614
+ const registrationBounds = record(registration.bounds, 'Registration bounds');
615
+ for (const key of ['maxCalls', 'maxPages', 'maxRecords', 'maxBytes']) {
616
+ if (request.bounds[key] > Number(registrationBounds[key])) {
617
+ return failed(operation, 'E_LIVE_EVIDENCE_SCOPE_EXPANSION', 'The request exceeds the frozen provider bounds.', executed, {
618
+ ownerActionRequired: true,
619
+ nextAction: 'Ask the owner to approve a separately registered bounded provider scope.',
620
+ });
621
+ }
622
+ }
623
+ if (!selected.adapter.definition.scopes.every((scope) => request.scopes.includes(scope)) ||
624
+ !request.scopes.every((scope) => selected.adapter.definition.scopes.includes(scope))) {
625
+ return failed(operation, 'E_LIVE_EVIDENCE_SCOPE_EXPANSION', 'The request scopes differ from the frozen adapter scopes.', executed, {
626
+ ownerActionRequired: true,
627
+ nextAction: 'Ask the owner to approve a separately registered exact scope.',
628
+ });
629
+ }
630
+ const docket = protocolDocket(request);
631
+ const protocolDocketHash = sha256CanonicalJson(docket);
632
+ const protocolBinding = Object.freeze({
633
+ actorId: request.ownerActorId,
634
+ credentialRef: request.logicalCredentialRef,
635
+ consentRecordId: request.consentRecordId,
636
+ protocolDocketHash,
637
+ provider: request.provider,
638
+ adapterVersion: request.adapterVersion,
639
+ accountIdentityHash: request.accountIdentityHash,
640
+ });
641
+ const proposedConsent = this.#contracts.assertOperatingLiveEvidenceConsentRecordV2(consentRecord(request, docket, new Date(this.#now()).toISOString()));
642
+ let currentConsent = null;
643
+ try {
644
+ currentConsent = await this.#credentials.validatedConsent({
645
+ ...protocolBinding,
646
+ requestHash: 'sha256:0000000000000000000000000000000000000000000000000000000000000000',
647
+ });
648
+ }
649
+ catch (error) {
650
+ if (!(error instanceof ConnectorCredentialCustodyError) ||
651
+ !['LIVE_EVIDENCE_CONSENT_INVALID', 'LIVE_EVIDENCE_CONSENT_EXPIRED'].includes(error.code)) {
652
+ throw error;
653
+ }
654
+ }
655
+ if (currentConsent && !exactConsentForRequest(currentConsent, request, docket)) {
656
+ currentConsent = null;
657
+ }
658
+ if (!currentConsent && !options.allowOwnerConfirmation) {
659
+ return failed(operation, 'E_LIVE_EVIDENCE_OWNER_CONFIRMATION_REQUIRED', 'The exact current owner consent grant is unavailable or changed.', executed, {
660
+ ownerActionRequired: true,
661
+ nextAction: 'Ask the named owner to review the exact neutral consent docket.',
662
+ });
663
+ }
664
+ const preparation = await this.#operate.prepareLiveEvidenceSubmission({
665
+ assignmentId: request.assignmentId,
666
+ submissionId: request.submissionId,
667
+ actor: request.actor,
668
+ });
669
+ const baseEvidenceProvider = findBaseRecord(this.#evidenceRegistry.providers, record(registration.baseEvidenceProvider, 'Provider base reference'), ['providerId', 'providerVersion'], 'Base evidence-provider registration');
670
+ const baseResolver = findBaseRecord(this.#evidenceRegistry.resolvers, record(registration.baseResolver, 'Resolver base reference'), ['resolverId', 'resolverVersion'], 'Base evidence-resolver registration');
671
+ const consent = currentConsent ?? proposedConsent;
672
+ const protocolBindingHash = currentConsent
673
+ ? await this.#credentials.protocolBindingHash(protocolBinding)
674
+ : sha256CanonicalJson({
675
+ domain: 'openplanr-local-live-evidence-capability-binding-v2',
676
+ authority: 'none',
677
+ bindingHash: sha256CanonicalJson(protocolBinding),
678
+ consentHash: proposedConsent.consentHash,
679
+ });
680
+ const checkpointId = digestId('lchk', { request, protocolBindingHash });
681
+ let snapshot;
682
+ let activeContext;
683
+ try {
684
+ snapshot = await this.#checkpoints.readByIdentity(checkpointId);
685
+ activeContext = this.#checkpointContext({
686
+ request,
687
+ preparation,
688
+ registration,
689
+ baseEvidenceProvider,
690
+ baseResolver,
691
+ consent,
692
+ protocolBindingHash,
693
+ health: record(snapshot.checkpoint.health, 'Stored provider health'),
694
+ });
695
+ this.#assertCheckpointContext(activeContext, snapshot.checkpoint);
696
+ }
697
+ catch (error) {
698
+ if (!(error instanceof ConnectorCheckpointCustodyError) ||
699
+ error.code !== 'LIVE_EVIDENCE_CHECKPOINT_NOT_FOUND') {
700
+ throw error;
701
+ }
702
+ const preflightHealth = this.#transport.health({ request, registration });
703
+ this.#assertPreflightHealth(preflightHealth);
704
+ activeContext = this.#checkpointContext({
705
+ request,
706
+ preparation,
707
+ registration,
708
+ baseEvidenceProvider,
709
+ baseResolver,
710
+ consent,
711
+ protocolBindingHash,
712
+ health: preflightHealth,
713
+ });
714
+ }
715
+ const credentialBinding = Object.freeze({
716
+ ...protocolBinding,
717
+ requestHash: activeContext.requestHash,
718
+ });
719
+ let confirmedCapability;
720
+ if (!currentConsent) {
721
+ const confirmation = await this.#credentials.issueOwnerConfirmation({
722
+ binding: credentialBinding,
723
+ proposedConsentRecord: proposedConsent,
724
+ });
725
+ confirmedCapability = await this.#credentials.issueCapability({
726
+ binding: credentialBinding,
727
+ ownerConfirmation: confirmation,
728
+ });
729
+ currentConsent = await this.#credentials.validatedConsent(credentialBinding);
730
+ if (!exactConsentForRequest(currentConsent, request, docket)) {
731
+ fail('E_LIVE_EVIDENCE_CONSENT_INVALID', 'Confirmed consent does not match the exact request.');
732
+ }
733
+ const persistedBindingHash = await this.#credentials.protocolBindingHash(protocolBinding);
734
+ if (persistedBindingHash !== protocolBindingHash) {
735
+ fail('E_LIVE_EVIDENCE_CONSENT_INVALID', 'Confirmed consent changed its protocol binding.');
736
+ }
737
+ }
738
+ if (!snapshot) {
739
+ snapshot = await this.#checkpoints.initialize(activeContext.prepared);
740
+ }
741
+ const { sourceIdentityHash } = activeContext;
742
+ let checkpoint = snapshot.checkpoint;
743
+ if (checkpoint.state === 'committed') {
744
+ return ok(operation, this.#acceptedSummary(checkpoint, snapshot.evidence?.bytes), executed, 'Use the existing accepted Evidence; no provider or Store effect was repeated.');
745
+ }
746
+ if (checkpoint.state === 'materialized') {
747
+ return this.#completeMaterialized(request, preparation, registration, baseEvidenceProvider, baseResolver, consent, checkpoint, snapshot.evidence?.bytes, executed, snapshot.checkpointHistory);
748
+ }
749
+ this.#assertPreflightHealth(checkpoint.health);
750
+ const capability = confirmedCapability ??
751
+ (await this.#credentials.issueCapability({ binding: credentialBinding }));
752
+ if (checkpoint.state === 'prepared') {
753
+ const requestedAt = new Date(this.#now()).toISOString();
754
+ snapshot = await this.#checkpoints.transition({
755
+ checkpointId,
756
+ event: checkpointEvent(checkpoint, 'request', requestedAt, {
757
+ consentRecordId: consent.consentRecordId,
758
+ consentRecordHash: consent.consentHash,
759
+ consentExpiresAt: consent.expiresAt,
760
+ runtimeCapabilityHash: protocolBindingHash,
761
+ health: checkpoint.health,
762
+ }),
763
+ });
764
+ checkpoint = snapshot.checkpoint;
765
+ }
766
+ if (checkpoint.state !== 'requesting') {
767
+ return failed(operation, 'E_LIVE_EVIDENCE_CHECKPOINT_TERMINAL', 'The exact request already reached a non-materialized terminal checkpoint.', executed, { nextAction: 'Inspect the typed absence or uncertainty before creating a new request.' });
768
+ }
769
+ let providerResult;
770
+ try {
771
+ providerResult = await this.#credentials.withResolvedCredential(capability, credentialBinding, async (credential) => {
772
+ executed.add('provider-call');
773
+ return this.#transport.execute({
774
+ request,
775
+ registration,
776
+ collection: operationDefinition.collection,
777
+ credential,
778
+ expectedHealth: checkpoint.health,
779
+ });
780
+ });
781
+ }
782
+ catch (error) {
783
+ if (error instanceof ConnectorCredentialCustodyError)
784
+ throw error;
785
+ const observedAt = new Date(this.#now()).toISOString();
786
+ providerResult = {
787
+ status: 'uncertain',
788
+ requestedAt: String(checkpoint.updatedAt),
789
+ capturedAt: observedAt,
790
+ freshUntil: new Date(this.#now() + 60_000).toISOString(),
791
+ health: {
792
+ status: 'unavailable',
793
+ checkedAt: observedAt,
794
+ freshUntil: new Date(this.#now() + 60_000).toISOString(),
795
+ proofDigest: sha256CanonicalJson({
796
+ domain: 'openplanr-live-evidence-provider-unavailable-v2',
797
+ provider: request.provider,
798
+ requestHash: checkpoint.requestHash,
799
+ observedAt,
800
+ }),
801
+ },
802
+ payload: {},
803
+ absence: {
804
+ kind: 'provider-unavailable',
805
+ reasonCode: 'PROVIDER_UNAVAILABLE',
806
+ required: true,
807
+ observedAt,
808
+ details: { retryable: false },
809
+ },
810
+ };
811
+ }
812
+ if (providerResult.status === 'materialized' &&
813
+ (providerResult.health.status !== 'available' ||
814
+ sha256CanonicalJson(providerResult.health) !== sha256CanonicalJson(checkpoint.health))) {
815
+ const observedAt = providerResult.capturedAt;
816
+ providerResult = {
817
+ ...providerResult,
818
+ status: 'uncertain',
819
+ payload: {},
820
+ absence: {
821
+ kind: 'unhealthy',
822
+ reasonCode: 'PROVIDER_HEALTH_DIVERGED',
823
+ required: true,
824
+ observedAt,
825
+ details: { expectedProofDigest: checkpoint.health.proofDigest },
826
+ },
827
+ };
828
+ }
829
+ const adapterResult = selected.adapter.normalize({
830
+ operation: request.operation,
831
+ sourceContract: request.sourceContract,
832
+ requestHash: asHash(checkpoint.requestHash, 'Checkpoint request hash'),
833
+ sourceIdentityHash,
834
+ classification: request.classification,
835
+ status: providerResult.status,
836
+ requestedAt: providerResult.requestedAt,
837
+ capturedAt: providerResult.capturedAt,
838
+ freshUntil: providerResult.freshUntil,
839
+ health: providerResult.health,
840
+ bounds: request.bounds,
841
+ payload: providerResult.payload,
842
+ ...(providerResult.absence ? { absence: providerResult.absence } : {}),
843
+ });
844
+ if (adapterResult.status !== 'materialized') {
845
+ const absence = adapterResult.absences[0];
846
+ const terminalType = adapterResult.status === 'uncertain' ? 'uncertain' : 'absent';
847
+ await this.#checkpoints.transition({
848
+ checkpointId,
849
+ event: checkpointEvent(checkpoint, terminalType, adapterResult.sourceTiming.capturedAt, {
850
+ absenceDigest: absence.detailsHash,
851
+ health: adapterResult.health,
852
+ }),
853
+ ...(providerResult.providerCursor ? { providerCursor: providerResult.providerCursor } : {}),
854
+ });
855
+ return failed(operation, absence.reasonCode, 'The exact provider returned a typed absence or uncertain result.', executed, { nextAction: 'Resolve the declared provider condition or create a new bounded request.' });
856
+ }
857
+ const redactedBytes = readConnectorAdapterResultBytesV2(adapterResult);
858
+ if (sha256Bytes(redactedBytes) !== adapterResult.redactedBytesDigest) {
859
+ fail('E_LIVE_EVIDENCE_RESPONSE_INVALID', 'Redacted adapter bytes changed after validation.');
860
+ }
861
+ const ingestion = this.#buildIngestion({
862
+ request,
863
+ preparation,
864
+ registration,
865
+ baseResolver,
866
+ consent,
867
+ checkpoint,
868
+ adapterResult,
869
+ });
870
+ const ingestionBytes = Buffer.from(JSON.stringify(ingestion), 'utf8');
871
+ snapshot = await this.#checkpoints.transition({
872
+ checkpointId,
873
+ event: checkpointEvent(checkpoint, 'materialize', adapterResult.sourceTiming.capturedAt, {
874
+ artifactId: preparation.artifactId,
875
+ artifactHash: sha256CanonicalJson(ingestion),
876
+ watermarkDigest: providerResult.providerCursor
877
+ ? sha256Bytes(providerResult.providerCursor)
878
+ : null,
879
+ health: adapterResult.health,
880
+ }),
881
+ evidenceBytes: ingestionBytes,
882
+ evidenceFreshness: {
883
+ capturedAt: adapterResult.sourceTiming.capturedAt,
884
+ freshUntil: adapterResult.sourceTiming.freshUntil,
885
+ },
886
+ ...(providerResult.providerCursor ? { providerCursor: providerResult.providerCursor } : {}),
887
+ });
888
+ return this.#completeMaterialized(request, preparation, registration, baseEvidenceProvider, baseResolver, consent, snapshot.checkpoint, snapshot.evidence?.bytes, executed, snapshot.checkpointHistory);
889
+ }
890
+ #buildIngestion(input) {
891
+ const { request, preparation, registration, consent, checkpoint, adapterResult } = input;
892
+ const assignment = preparation.assignment;
893
+ const candidate = {
894
+ kind: 'operating-evidence-candidate',
895
+ schemaVersion: '1.0.0',
896
+ protocolVersion: '2.0.0',
897
+ candidateId: preparation.candidateId,
898
+ scopeId: request.scope.scopeId,
899
+ domainId: request.scope.domainId,
900
+ domainVersion: request.scope.domainVersion,
901
+ sourceArtifactId: preparation.artifactId,
902
+ evidenceKind: 'operate-artifact',
903
+ locator: {
904
+ artifactId: preparation.artifactId,
905
+ expectedArtifactType: 'live-evidence-ingestion',
906
+ expectedSchemaId: 'operating-live-evidence-ingestion',
907
+ expectedSchemaVersion: '2.0.0',
908
+ },
909
+ provider: {
910
+ id: registration.baseEvidenceProvider.providerId,
911
+ version: registration.baseEvidenceProvider.providerVersion,
912
+ },
913
+ resolver: {
914
+ id: registration.baseResolver.resolverId,
915
+ version: registration.baseResolver.resolverVersion,
916
+ },
917
+ };
918
+ const body = {
919
+ kind: 'operating-live-evidence-ingestion',
920
+ schemaVersion: '1.0.0',
921
+ protocolVersion: '2.0.0',
922
+ ingestionId: preparation.ingestionId,
923
+ requestId: checkpoint.requestId,
924
+ requestHash: checkpoint.requestHash,
925
+ assignment: {
926
+ assignmentId: assignment.assignmentId,
927
+ assignmentRevision: 1,
928
+ assignmentHash: sha256CanonicalJson(assignment),
929
+ requestHash: checkpoint.requestHash,
930
+ assignmentKind: 'verification',
931
+ outputContract: {
932
+ schemaId: 'operating-live-evidence-ingestion',
933
+ schemaVersion: '2.0.0',
934
+ },
935
+ },
936
+ submission: {
937
+ operation: 'operate.assignment.submit',
938
+ submissionId: preparation.submissionId,
939
+ submittedEventId: preparation.acceptanceEventIds.submitted,
940
+ artifactCreatedEventId: preparation.acceptanceEventIds.artifactCreated,
941
+ validatedEventId: preparation.acceptanceEventIds.validated,
942
+ artifactId: preparation.artifactId,
943
+ evidenceRefId: preparation.evidenceRefId,
944
+ },
945
+ provider: request.provider,
946
+ providerRegistration: registration.baseEvidenceProvider,
947
+ providerRegistrationHash: registration.registrationHash,
948
+ resolverRegistration: registration.baseResolver,
949
+ resolverRegistrationHash: registration.baseResolver.recordDigest,
950
+ adapterVersion: request.adapterVersion,
951
+ status: 'materialized',
952
+ consentRecordHash: consent.consentHash,
953
+ runtimeCapabilityHash: checkpoint.runtimeCapabilityHash,
954
+ checkpoint: {
955
+ checkpointId: checkpoint.checkpointId,
956
+ predecessorDigest: checkpoint.predecessorDigest,
957
+ checkpointHash: checkpoint.checkpointHash,
958
+ },
959
+ health: adapterResult.health,
960
+ boundsHash: sha256CanonicalJson(request.bounds),
961
+ classification: request.classification,
962
+ sourceContract: request.sourceContract,
963
+ sourceTiming: adapterResult.sourceTiming,
964
+ records: adapterResult.records,
965
+ absences: [],
966
+ evidenceCandidates: [candidate],
967
+ evidenceClaimLinks: [
968
+ {
969
+ candidateId: preparation.candidateId,
970
+ sourceArtifactId: preparation.artifactId,
971
+ localClaimId: request.claim.localClaimId,
972
+ relation: request.claim.relation,
973
+ confidence: request.claim.confidence,
974
+ },
975
+ ],
976
+ materialization: {
977
+ artifactId: preparation.artifactId,
978
+ artifactCreatedEventId: preparation.acceptanceEventIds.artifactCreated,
979
+ evidenceRefId: preparation.evidenceRefId,
980
+ contentDigest: 'sha256:0000000000000000000000000000000000000000000000000000000000000000',
981
+ redactionVersion: '1.0.0',
982
+ },
983
+ };
984
+ body.materialization.contentDigest =
985
+ this.#contracts.deriveOperatingLiveEvidenceContentDigestV2(body);
986
+ body.ingestionHash = sha256CanonicalJson(body);
987
+ return Object.freeze(body);
988
+ }
989
+ #acceptedSummary(checkpoint, bytes) {
990
+ if (!bytes)
991
+ fail('E_LIVE_EVIDENCE_CHECKPOINT_INVALID', 'Accepted evidence custody is unavailable.');
992
+ let ingestion;
993
+ try {
994
+ ingestion = record(JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes)), 'Accepted ingestion');
995
+ }
996
+ catch {
997
+ fail('E_LIVE_EVIDENCE_CHECKPOINT_INVALID', 'Accepted evidence custody is invalid.');
998
+ }
999
+ const submission = record(ingestion.submission, 'Accepted submission');
1000
+ return Object.freeze({
1001
+ checkpointId: checkpoint.checkpointId,
1002
+ state: checkpoint.state,
1003
+ requestHash: checkpoint.requestHash,
1004
+ artifactId: checkpoint.artifactId,
1005
+ artifactHash: checkpoint.artifactHash,
1006
+ evidenceRefId: submission.evidenceRefId,
1007
+ ingestionId: ingestion.ingestionId,
1008
+ replayed: true,
1009
+ });
1010
+ }
1011
+ async #completeMaterialized(request, preparation, registration, baseEvidenceProvider, baseResolver, consent, checkpoint, bytes, executed, checkpointHistory = []) {
1012
+ if (!bytes)
1013
+ fail('E_LIVE_EVIDENCE_CHECKPOINT_INVALID', 'Materialized evidence bytes are unavailable.');
1014
+ const ingestion = record(JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes)), 'Materialized ingestion');
1015
+ const requestingCheckpoints = checkpointHistory.filter((candidate) => candidate.state === 'requesting');
1016
+ if (requestingCheckpoints.length !== 1) {
1017
+ fail('E_LIVE_EVIDENCE_CHECKPOINT_INVALID', 'Materialized evidence does not retain one exact requesting checkpoint.');
1018
+ }
1019
+ const requestingCheckpoint = requestingCheckpoints[0];
1020
+ this.#contracts.assertOperatingLiveEvidenceIngestionV2(ingestion, {
1021
+ liveProviderRegistration: registration,
1022
+ baseEvidenceProvider,
1023
+ baseResolver,
1024
+ assignment: preparation.assignment,
1025
+ consentRecord: consent,
1026
+ connectorCheckpoint: requestingCheckpoint,
1027
+ });
1028
+ const result = await this.#operate.acceptLiveEvidenceSubmission({
1029
+ assignmentId: request.assignmentId,
1030
+ submissionId: request.submissionId,
1031
+ actor: request.actor,
1032
+ preparationHash: preparation.preparationHash,
1033
+ contentBase64: Buffer.from(bytes).toString('base64'),
1034
+ custody: {
1035
+ issuedAssignment: preparation.assignment,
1036
+ liveProviderRegistration: registration,
1037
+ baseEvidenceProvider,
1038
+ baseResolver,
1039
+ consentRecord: consent,
1040
+ connectorCheckpoint: requestingCheckpoint,
1041
+ resultCheckpoint: checkpoint,
1042
+ checkpointHistory: [],
1043
+ },
1044
+ });
1045
+ executed.add('operate-assignment-submit');
1046
+ executed.add('evidence-materialization');
1047
+ const committedAt = new Date(this.#now()).toISOString();
1048
+ const committed = await this.#checkpoints.transition({
1049
+ checkpointId: String(checkpoint.checkpointId),
1050
+ event: checkpointEvent(checkpoint, 'commit', committedAt, {
1051
+ watermarkDigest: checkpoint.watermarkDigest,
1052
+ }),
1053
+ });
1054
+ return ok('evidence.collect', {
1055
+ checkpointId: committed.checkpoint.checkpointId,
1056
+ state: committed.checkpoint.state,
1057
+ requestHash: committed.checkpoint.requestHash,
1058
+ artifactId: result.artifactId,
1059
+ artifactHash: result.artifactHash,
1060
+ evidenceRefId: result.evidenceRefId,
1061
+ evidenceArtifactId: result.evidenceArtifactId,
1062
+ resolutionId: result.resolutionId,
1063
+ replayed: result.replayed,
1064
+ }, executed, 'Use the accepted Evidence through normal Operate reads.');
1065
+ }
1066
+ }
1067
+ export function createConnectorRuntimeV2(input) {
1068
+ return new ConnectorRuntimeV2(input);
1069
+ }
1070
+ function privateAddress(address) {
1071
+ if (address.includes(':')) {
1072
+ const value = address.toLowerCase();
1073
+ const dotted = /^::ffff:(\d{1,3}(?:\.\d{1,3}){3})$/u.exec(value)?.[1];
1074
+ const words = /^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/u.exec(value);
1075
+ if (dotted)
1076
+ return privateAddress(dotted);
1077
+ if (words) {
1078
+ const high = Number.parseInt(words[1], 16);
1079
+ const low = Number.parseInt(words[2], 16);
1080
+ return privateAddress(`${high >>> 8}.${high & 0xff}.${low >>> 8}.${low & 0xff}`);
1081
+ }
1082
+ return (value === '::' ||
1083
+ value === '::1' ||
1084
+ value.startsWith('fc') ||
1085
+ value.startsWith('fd') ||
1086
+ /^fe[89ab]/u.test(value) ||
1087
+ value.startsWith('ff'));
1088
+ }
1089
+ const parts = address.split('.').map(Number);
1090
+ return (parts[0] === 0 ||
1091
+ parts[0] === 10 ||
1092
+ parts[0] === 127 ||
1093
+ (parts[0] === 169 && parts[1] === 254) ||
1094
+ (parts[0] === 172 && parts[1] >= 16 && parts[1] <= 31) ||
1095
+ (parts[0] === 192 && parts[1] === 168) ||
1096
+ (parts[0] === 100 && parts[1] >= 64 && parts[1] <= 127) ||
1097
+ parts[0] >= 224);
1098
+ }
1099
+ async function assertTransportTarget(url, allowLoopback, resolveHost) {
1100
+ const exactLoopback = url.hostname === '127.0.0.1' || url.hostname === '[::1]';
1101
+ if (url.username ||
1102
+ url.password ||
1103
+ url.search ||
1104
+ url.hash ||
1105
+ (url.protocol !== 'https:' && !(allowLoopback && exactLoopback && url.protocol === 'http:'))) {
1106
+ fail('E_LIVE_EVIDENCE_TRANSPORT_FORBIDDEN', 'Provider transport target is not allowed.');
1107
+ }
1108
+ const addresses = isIP(url.hostname.replace(/^\[|\]$/gu, ''))
1109
+ ? [{ address: url.hostname.replace(/^\[|\]$/gu, '') }]
1110
+ : await resolveHost(url.hostname);
1111
+ if (addresses.length === 0 ||
1112
+ addresses.some(({ address }) => privateAddress(address) && !(allowLoopback && exactLoopback))) {
1113
+ fail('E_LIVE_EVIDENCE_TRANSPORT_FORBIDDEN', 'Provider address is not allowed.');
1114
+ }
1115
+ return Object.freeze(addresses.map(({ address }) => address.toLowerCase()).sort());
1116
+ }
1117
+ async function boundedResponseBytes(response, maxBytes) {
1118
+ const declared = response.headers.get('content-length');
1119
+ if (declared && Number(declared) > maxBytes) {
1120
+ fail('E_LIVE_EVIDENCE_RESPONSE_TOO_LARGE', 'Provider response exceeds the exact byte ceiling.');
1121
+ }
1122
+ if (!response.body)
1123
+ fail('E_LIVE_EVIDENCE_RESPONSE_INVALID', 'Provider response body is unavailable.');
1124
+ const reader = response.body.getReader();
1125
+ const chunks = [];
1126
+ let total = 0;
1127
+ try {
1128
+ while (true) {
1129
+ const { done, value } = await reader.read();
1130
+ if (done)
1131
+ break;
1132
+ total += value.byteLength;
1133
+ if (total > maxBytes) {
1134
+ await reader.cancel();
1135
+ fail('E_LIVE_EVIDENCE_RESPONSE_TOO_LARGE', 'Provider response exceeds the exact byte ceiling.');
1136
+ }
1137
+ chunks.push(value);
1138
+ }
1139
+ }
1140
+ finally {
1141
+ reader.releaseLock();
1142
+ }
1143
+ const output = new Uint8Array(total);
1144
+ let offset = 0;
1145
+ for (const chunk of chunks) {
1146
+ output.set(chunk, offset);
1147
+ offset += chunk.byteLength;
1148
+ }
1149
+ return output;
1150
+ }
1151
+ function csvPayload(text, collection, observedAt) {
1152
+ const rows = text.trim().split(/\r?\n/u);
1153
+ if (rows.length < 2)
1154
+ fail('E_LIVE_EVIDENCE_RESPONSE_INVALID', 'CSV response is empty.');
1155
+ const headings = rows[0].split(',').map((value) => value.trim());
1156
+ if (headings.some((value) => !TEXT_ID.test(value))) {
1157
+ fail('E_LIVE_EVIDENCE_RESPONSE_INVALID', 'CSV headings are invalid.');
1158
+ }
1159
+ return {
1160
+ [collection]: rows.slice(1).map((row, index) => {
1161
+ const values = row.split(',').map((value) => value.trim());
1162
+ if (values.length !== headings.length) {
1163
+ fail('E_LIVE_EVIDENCE_RESPONSE_INVALID', 'CSV row shape changed.');
1164
+ }
1165
+ return {
1166
+ id: `row-${index + 1}`,
1167
+ observedAt,
1168
+ data: Object.fromEntries(headings.map((heading, position) => [heading, values[position]])),
1169
+ };
1170
+ }),
1171
+ };
1172
+ }
1173
+ export function createBoundedFetchConnectorTransportV2(input) {
1174
+ const policies = new Map(input.policies.map((policy) => [policy.providerId, policy]));
1175
+ if (policies.size !== input.policies.length) {
1176
+ fail('E_LIVE_EVIDENCE_TRANSPORT_CONFIG_INVALID', 'Provider transport policy is duplicated.');
1177
+ }
1178
+ const fetchImpl = input.fetchImpl ?? fetch;
1179
+ const now = input.now ?? Date.now;
1180
+ const resolveHost = input.resolveHost ??
1181
+ (async (hostname) => lookup(hostname, { all: true, verbatim: true }));
1182
+ return Object.freeze({
1183
+ health({ request }) {
1184
+ const policy = policies.get(request.provider.id);
1185
+ if (!policy)
1186
+ fail('E_LIVE_EVIDENCE_TRANSPORT_CONFIG_INVALID', 'Provider policy is unavailable.');
1187
+ const checkedAt = new Date(now()).toISOString();
1188
+ const freshUntil = new Date(now() + Math.min(policy.timeoutMs * 2, 300_000)).toISOString();
1189
+ return Object.freeze({
1190
+ status: 'available',
1191
+ checkedAt,
1192
+ freshUntil,
1193
+ proofDigest: sha256CanonicalJson({
1194
+ domain: 'openplanr-live-evidence-transport-health-v2',
1195
+ provider: request.provider,
1196
+ origin: policy.origin,
1197
+ checkedAt,
1198
+ freshUntil,
1199
+ }),
1200
+ });
1201
+ },
1202
+ async execute({ request, collection, credential, expectedHealth }) {
1203
+ const policy = policies.get(request.provider.id);
1204
+ if (!policy)
1205
+ fail('E_LIVE_EVIDENCE_TRANSPORT_CONFIG_INVALID', 'Provider policy is unavailable.');
1206
+ const pathname = policy.pathnameByOperation[request.operation];
1207
+ if (typeof pathname !== 'string' || !pathname.startsWith('/') || pathname.includes('?')) {
1208
+ fail('E_LIVE_EVIDENCE_TRANSPORT_CONFIG_INVALID', 'Provider operation path is unavailable.');
1209
+ }
1210
+ const origin = new URL(policy.origin);
1211
+ const beforeAddresses = await assertTransportTarget(origin, policy.allowLoopback, resolveHost);
1212
+ const target = new URL(pathname, origin);
1213
+ if (target.origin !== origin.origin) {
1214
+ fail('E_LIVE_EVIDENCE_TRANSPORT_FORBIDDEN', 'Provider operation escaped its allowed origin.');
1215
+ }
1216
+ const requestedAt = new Date(now()).toISOString();
1217
+ const controller = new AbortController();
1218
+ const timeout = setTimeout(() => controller.abort(), policy.timeoutMs);
1219
+ let response;
1220
+ try {
1221
+ response = await fetchImpl(target, {
1222
+ method: 'GET',
1223
+ redirect: 'manual',
1224
+ headers: {
1225
+ accept: 'application/json, text/csv',
1226
+ authorization: `${policy.authorizationScheme} ${Buffer.from(credential).toString('utf8')}`,
1227
+ },
1228
+ signal: controller.signal,
1229
+ });
1230
+ }
1231
+ finally {
1232
+ clearTimeout(timeout);
1233
+ }
1234
+ const afterAddresses = await assertTransportTarget(origin, policy.allowLoopback, resolveHost);
1235
+ if (JSON.stringify(afterAddresses) !== JSON.stringify(beforeAddresses)) {
1236
+ fail('E_LIVE_EVIDENCE_DNS_REBINDING', 'Provider address resolution changed during the bounded request.');
1237
+ }
1238
+ if (response.status >= 300 && response.status < 400) {
1239
+ fail('E_LIVE_EVIDENCE_REDIRECT_FORBIDDEN', 'Provider redirects are not followed.');
1240
+ }
1241
+ const capturedAt = new Date(now()).toISOString();
1242
+ const health = Object.freeze({
1243
+ status: response.ok ? 'available' : 'unavailable',
1244
+ checkedAt: capturedAt,
1245
+ freshUntil: new Date(now() + 60_000).toISOString(),
1246
+ proofDigest: sha256CanonicalJson({
1247
+ domain: 'openplanr-live-evidence-http-health-v2',
1248
+ provider: request.provider,
1249
+ status: response.status,
1250
+ capturedAt,
1251
+ }),
1252
+ });
1253
+ if (!response.ok) {
1254
+ return {
1255
+ status: 'absent',
1256
+ requestedAt,
1257
+ capturedAt,
1258
+ freshUntil: health.freshUntil,
1259
+ health,
1260
+ payload: {},
1261
+ absence: {
1262
+ kind: response.status === 429 ? 'rate-limited' : 'provider-unavailable',
1263
+ reasonCode: response.status === 429 ? 'RATE_LIMITED' : 'PROVIDER_UNAVAILABLE',
1264
+ required: true,
1265
+ observedAt: capturedAt,
1266
+ details: { statusClass: `${Math.floor(response.status / 100)}xx` },
1267
+ },
1268
+ };
1269
+ }
1270
+ const mediaType = response.headers.get('content-type')?.split(';', 1)[0]?.trim();
1271
+ if (mediaType !== 'application/json' && mediaType !== 'text/csv') {
1272
+ fail('E_LIVE_EVIDENCE_RESPONSE_INVALID', 'Provider response media type is unsupported.');
1273
+ }
1274
+ const bytes = await boundedResponseBytes(response, request.bounds.maxBytes);
1275
+ const text = new TextDecoder('utf-8', { fatal: true }).decode(bytes);
1276
+ let payload;
1277
+ try {
1278
+ payload =
1279
+ mediaType === 'text/csv' ? csvPayload(text, collection, capturedAt) : JSON.parse(text);
1280
+ }
1281
+ catch (cause) {
1282
+ if (cause instanceof ConnectorRuntimeErrorV2)
1283
+ throw cause;
1284
+ fail('E_LIVE_EVIDENCE_RESPONSE_INVALID', 'Provider response is invalid UTF-8 data.');
1285
+ }
1286
+ return {
1287
+ status: 'materialized',
1288
+ requestedAt,
1289
+ capturedAt,
1290
+ freshUntil: new Date(now() + 300_000).toISOString(),
1291
+ health: expectedHealth,
1292
+ payload,
1293
+ };
1294
+ },
1295
+ });
1296
+ }
1297
+ //# sourceMappingURL=connector-runtime.js.map