@openrig/cli 0.3.1 → 0.3.3-rc.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 (358) hide show
  1. package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +1 -1
  2. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +8 -8
  3. package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
  4. package/daemon/dist/adapters/cmux-transport.js +51 -9
  5. package/daemon/dist/adapters/cmux-transport.js.map +1 -1
  6. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  7. package/daemon/dist/adapters/codex-runtime-adapter.js +34 -5
  8. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  9. package/daemon/dist/adapters/tmux.d.ts +68 -1
  10. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  11. package/daemon/dist/adapters/tmux.js +141 -2
  12. package/daemon/dist/adapters/tmux.js.map +1 -1
  13. package/daemon/dist/db/migrations/037_mission_control_actions.d.ts +5 -1
  14. package/daemon/dist/db/migrations/037_mission_control_actions.d.ts.map +1 -1
  15. package/daemon/dist/db/migrations/037_mission_control_actions.js +5 -1
  16. package/daemon/dist/db/migrations/037_mission_control_actions.js.map +1 -1
  17. package/daemon/dist/db/migrations/041_rig_policy.d.ts +32 -0
  18. package/daemon/dist/db/migrations/041_rig_policy.d.ts.map +1 -0
  19. package/daemon/dist/db/migrations/041_rig_policy.js +47 -0
  20. package/daemon/dist/db/migrations/041_rig_policy.js.map +1 -0
  21. package/daemon/dist/db/migrations/042_rig_archive.d.ts +16 -0
  22. package/daemon/dist/db/migrations/042_rig_archive.d.ts.map +1 -0
  23. package/daemon/dist/db/migrations/042_rig_archive.js +21 -0
  24. package/daemon/dist/db/migrations/042_rig_archive.js.map +1 -0
  25. package/daemon/dist/domain/agent-images/resume-token-discovery.js +1 -1
  26. package/daemon/dist/domain/agent-images/resume-token-discovery.js.map +1 -1
  27. package/daemon/dist/domain/agent-images/snapshot-capturer.d.ts.map +1 -1
  28. package/daemon/dist/domain/agent-images/snapshot-capturer.js +2 -1
  29. package/daemon/dist/domain/agent-images/snapshot-capturer.js.map +1 -1
  30. package/daemon/dist/domain/agent-manifest.js +27 -0
  31. package/daemon/dist/domain/agent-manifest.js.map +1 -1
  32. package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
  33. package/daemon/dist/domain/bootstrap-orchestrator.js +86 -6
  34. package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  35. package/daemon/dist/domain/bundle-agent-images-router.d.ts +95 -0
  36. package/daemon/dist/domain/bundle-agent-images-router.d.ts.map +1 -0
  37. package/daemon/dist/domain/bundle-agent-images-router.js +140 -0
  38. package/daemon/dist/domain/bundle-agent-images-router.js.map +1 -0
  39. package/daemon/dist/domain/bundle-assembler.d.ts +18 -1
  40. package/daemon/dist/domain/bundle-assembler.d.ts.map +1 -1
  41. package/daemon/dist/domain/bundle-assembler.js +11 -1
  42. package/daemon/dist/domain/bundle-assembler.js.map +1 -1
  43. package/daemon/dist/domain/bundle-audit.d.ts +89 -0
  44. package/daemon/dist/domain/bundle-audit.d.ts.map +1 -0
  45. package/daemon/dist/domain/bundle-audit.js +87 -0
  46. package/daemon/dist/domain/bundle-audit.js.map +1 -0
  47. package/daemon/dist/domain/bundle-conflict-detector.d.ts +57 -0
  48. package/daemon/dist/domain/bundle-conflict-detector.d.ts.map +1 -0
  49. package/daemon/dist/domain/bundle-conflict-detector.js +49 -0
  50. package/daemon/dist/domain/bundle-conflict-detector.js.map +1 -0
  51. package/daemon/dist/domain/bundle-context-packs-router.d.ts +100 -0
  52. package/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -0
  53. package/daemon/dist/domain/bundle-context-packs-router.js +158 -0
  54. package/daemon/dist/domain/bundle-context-packs-router.js.map +1 -0
  55. package/daemon/dist/domain/bundle-plugins-router.d.ts +69 -0
  56. package/daemon/dist/domain/bundle-plugins-router.d.ts.map +1 -0
  57. package/daemon/dist/domain/bundle-plugins-router.js +87 -0
  58. package/daemon/dist/domain/bundle-plugins-router.js.map +1 -0
  59. package/daemon/dist/domain/bundle-skills-router.d.ts +62 -0
  60. package/daemon/dist/domain/bundle-skills-router.d.ts.map +1 -0
  61. package/daemon/dist/domain/bundle-skills-router.js +90 -0
  62. package/daemon/dist/domain/bundle-skills-router.js.map +1 -0
  63. package/daemon/dist/domain/bundle-types.d.ts +106 -0
  64. package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
  65. package/daemon/dist/domain/bundle-types.js +375 -0
  66. package/daemon/dist/domain/bundle-types.js.map +1 -1
  67. package/daemon/dist/domain/bundle-workflow-specs-router.d.ts +94 -0
  68. package/daemon/dist/domain/bundle-workflow-specs-router.d.ts.map +1 -0
  69. package/daemon/dist/domain/bundle-workflow-specs-router.js +144 -0
  70. package/daemon/dist/domain/bundle-workflow-specs-router.js.map +1 -0
  71. package/daemon/dist/domain/context-monitor.d.ts +5 -1
  72. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  73. package/daemon/dist/domain/context-monitor.js +28 -15
  74. package/daemon/dist/domain/context-monitor.js.map +1 -1
  75. package/daemon/dist/domain/graph-projection.d.ts +6 -0
  76. package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
  77. package/daemon/dist/domain/graph-projection.js +6 -0
  78. package/daemon/dist/domain/graph-projection.js.map +1 -1
  79. package/daemon/dist/domain/native-resume-probe.js +7 -7
  80. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  81. package/daemon/dist/domain/node-inventory.d.ts +18 -0
  82. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  83. package/daemon/dist/domain/node-inventory.js +98 -0
  84. package/daemon/dist/domain/node-inventory.js.map +1 -1
  85. package/daemon/dist/domain/node-launcher.d.ts +12 -0
  86. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  87. package/daemon/dist/domain/node-launcher.js +25 -1
  88. package/daemon/dist/domain/node-launcher.js.map +1 -1
  89. package/daemon/dist/domain/pod-bundle-assembler.d.ts +16 -1
  90. package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
  91. package/daemon/dist/domain/pod-bundle-assembler.js +11 -1
  92. package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
  93. package/daemon/dist/domain/profile-resolver.d.ts +10 -0
  94. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  95. package/daemon/dist/domain/profile-resolver.js +4 -0
  96. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  97. package/daemon/dist/domain/ps-projection.d.ts +28 -1
  98. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  99. package/daemon/dist/domain/ps-projection.js +67 -1
  100. package/daemon/dist/domain/ps-projection.js.map +1 -1
  101. package/daemon/dist/domain/queue-repository.d.ts +37 -1
  102. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  103. package/daemon/dist/domain/queue-repository.js +99 -2
  104. package/daemon/dist/domain/queue-repository.js.map +1 -1
  105. package/daemon/dist/domain/restore-check-service.d.ts +4 -0
  106. package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
  107. package/daemon/dist/domain/restore-check-service.js +16 -7
  108. package/daemon/dist/domain/restore-check-service.js.map +1 -1
  109. package/daemon/dist/domain/rig-expansion-service.d.ts +1 -1
  110. package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
  111. package/daemon/dist/domain/rig-expansion-service.js +12 -10
  112. package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
  113. package/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts +48 -0
  114. package/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts.map +1 -0
  115. package/daemon/dist/domain/rig-policy/rig-policy-defaults.js +96 -0
  116. package/daemon/dist/domain/rig-policy/rig-policy-defaults.js.map +1 -0
  117. package/daemon/dist/domain/rig-policy/rig-policy-store.d.ts +46 -0
  118. package/daemon/dist/domain/rig-policy/rig-policy-store.d.ts.map +1 -0
  119. package/daemon/dist/domain/rig-policy/rig-policy-store.js +171 -0
  120. package/daemon/dist/domain/rig-policy/rig-policy-store.js.map +1 -0
  121. package/daemon/dist/domain/rig-policy/rig-policy-types.d.ts +145 -0
  122. package/daemon/dist/domain/rig-policy/rig-policy-types.d.ts.map +1 -0
  123. package/daemon/dist/domain/rig-policy/rig-policy-types.js +52 -0
  124. package/daemon/dist/domain/rig-policy/rig-policy-types.js.map +1 -0
  125. package/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts +58 -0
  126. package/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts.map +1 -0
  127. package/daemon/dist/domain/rig-policy/rig-policy-validator.js +211 -0
  128. package/daemon/dist/domain/rig-policy/rig-policy-validator.js.map +1 -0
  129. package/daemon/dist/domain/rig-repository.d.ts +28 -2
  130. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  131. package/daemon/dist/domain/rig-repository.js +40 -3
  132. package/daemon/dist/domain/rig-repository.js.map +1 -1
  133. package/daemon/dist/domain/rigspec-instantiator.d.ts +177 -1
  134. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  135. package/daemon/dist/domain/rigspec-instantiator.js +414 -55
  136. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  137. package/daemon/dist/domain/rigspec-preflight.d.ts +19 -1
  138. package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  139. package/daemon/dist/domain/rigspec-preflight.js +30 -12
  140. package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  141. package/daemon/dist/domain/rigspec-schema.d.ts +1 -0
  142. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  143. package/daemon/dist/domain/rigspec-schema.js +4 -1
  144. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  145. package/daemon/dist/domain/seat-activity-service.d.ts +79 -0
  146. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -0
  147. package/daemon/dist/domain/seat-activity-service.js +123 -0
  148. package/daemon/dist/domain/seat-activity-service.js.map +1 -0
  149. package/daemon/dist/domain/session-transport.d.ts +15 -0
  150. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  151. package/daemon/dist/domain/session-transport.js +8 -3
  152. package/daemon/dist/domain/session-transport.js.map +1 -1
  153. package/daemon/dist/domain/slices/slice-indexer.d.ts +12 -0
  154. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  155. package/daemon/dist/domain/slices/slice-indexer.js +23 -0
  156. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  157. package/daemon/dist/domain/spec-library-service.d.ts.map +1 -1
  158. package/daemon/dist/domain/spec-library-service.js +19 -0
  159. package/daemon/dist/domain/spec-library-service.js.map +1 -1
  160. package/daemon/dist/domain/topology-converge.d.ts +97 -0
  161. package/daemon/dist/domain/topology-converge.d.ts.map +1 -0
  162. package/daemon/dist/domain/topology-converge.js +70 -0
  163. package/daemon/dist/domain/topology-converge.js.map +1 -0
  164. package/daemon/dist/domain/types.d.ts +85 -3
  165. package/daemon/dist/domain/types.d.ts.map +1 -1
  166. package/daemon/dist/domain/types.js.map +1 -1
  167. package/daemon/dist/domain/whoami-service.d.ts +8 -0
  168. package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
  169. package/daemon/dist/domain/whoami-service.js +1 -0
  170. package/daemon/dist/domain/whoami-service.js.map +1 -1
  171. package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  172. package/daemon/dist/domain/workflow-runtime.js +9 -1
  173. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  174. package/daemon/dist/domain/workflow-spec-cache.d.ts +41 -0
  175. package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  176. package/daemon/dist/domain/workflow-spec-cache.js +63 -0
  177. package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  178. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts +7 -0
  179. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
  180. package/daemon/dist/domain/workspace/default-workspace-scaffold.js +156 -3
  181. package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  182. package/daemon/dist/domain/workspace/workspace-doctor.d.ts +197 -0
  183. package/daemon/dist/domain/workspace/workspace-doctor.d.ts.map +1 -0
  184. package/daemon/dist/domain/workspace/workspace-doctor.js +448 -0
  185. package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -0
  186. package/daemon/dist/index.d.ts.map +1 -1
  187. package/daemon/dist/index.js +11 -0
  188. package/daemon/dist/index.js.map +1 -1
  189. package/daemon/dist/routes/bundles.d.ts.map +1 -1
  190. package/daemon/dist/routes/bundles.js +966 -7
  191. package/daemon/dist/routes/bundles.js.map +1 -1
  192. package/daemon/dist/routes/config.d.ts.map +1 -1
  193. package/daemon/dist/routes/config.js +19 -2
  194. package/daemon/dist/routes/config.js.map +1 -1
  195. package/daemon/dist/routes/info.d.ts +3 -0
  196. package/daemon/dist/routes/info.d.ts.map +1 -0
  197. package/daemon/dist/routes/info.js +20 -0
  198. package/daemon/dist/routes/info.js.map +1 -0
  199. package/daemon/dist/routes/ps.js +4 -1
  200. package/daemon/dist/routes/ps.js.map +1 -1
  201. package/daemon/dist/routes/queue.d.ts +18 -0
  202. package/daemon/dist/routes/queue.d.ts.map +1 -1
  203. package/daemon/dist/routes/queue.js +97 -5
  204. package/daemon/dist/routes/queue.js.map +1 -1
  205. package/daemon/dist/routes/rig-policy.d.ts +9 -0
  206. package/daemon/dist/routes/rig-policy.d.ts.map +1 -0
  207. package/daemon/dist/routes/rig-policy.js +174 -0
  208. package/daemon/dist/routes/rig-policy.js.map +1 -0
  209. package/daemon/dist/routes/rigs.d.ts.map +1 -1
  210. package/daemon/dist/routes/rigs.js +134 -4
  211. package/daemon/dist/routes/rigs.js.map +1 -1
  212. package/daemon/dist/routes/sessions.d.ts.map +1 -1
  213. package/daemon/dist/routes/sessions.js +26 -3
  214. package/daemon/dist/routes/sessions.js.map +1 -1
  215. package/daemon/dist/routes/up.d.ts +25 -0
  216. package/daemon/dist/routes/up.d.ts.map +1 -1
  217. package/daemon/dist/routes/up.js +70 -3
  218. package/daemon/dist/routes/up.js.map +1 -1
  219. package/daemon/dist/routes/workspace.d.ts.map +1 -1
  220. package/daemon/dist/routes/workspace.js +80 -1
  221. package/daemon/dist/routes/workspace.js.map +1 -1
  222. package/daemon/dist/server.d.ts +10 -0
  223. package/daemon/dist/server.d.ts.map +1 -1
  224. package/daemon/dist/server.js +11 -0
  225. package/daemon/dist/server.js.map +1 -1
  226. package/daemon/dist/startup.d.ts.map +1 -1
  227. package/daemon/dist/startup.js +46 -4
  228. package/daemon/dist/startup.js.map +1 -1
  229. package/daemon/docs/reference/getting-started.md +69 -0
  230. package/daemon/specs/agents/orchestration/orchestrator/guidance/role.md +28 -4
  231. package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +361 -15
  232. package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +2 -2
  233. package/daemon/specs/rigs/launch/conveyor/rig.yaml +1 -1
  234. package/dist/client.d.ts +3 -0
  235. package/dist/client.d.ts.map +1 -1
  236. package/dist/client.js +13 -1
  237. package/dist/client.js.map +1 -1
  238. package/dist/commands/add.d.ts +4 -0
  239. package/dist/commands/add.d.ts.map +1 -0
  240. package/dist/commands/add.js +115 -0
  241. package/dist/commands/add.js.map +1 -0
  242. package/dist/commands/archive.d.ts +10 -0
  243. package/dist/commands/archive.d.ts.map +1 -0
  244. package/dist/commands/archive.js +68 -0
  245. package/dist/commands/archive.js.map +1 -0
  246. package/dist/commands/bootstrap.js +2 -2
  247. package/dist/commands/bootstrap.js.map +1 -1
  248. package/dist/commands/bundle.d.ts.map +1 -1
  249. package/dist/commands/bundle.js +123 -2
  250. package/dist/commands/bundle.js.map +1 -1
  251. package/dist/commands/config-init-workspace.d.ts.map +1 -1
  252. package/dist/commands/config-init-workspace.js +40 -5
  253. package/dist/commands/config-init-workspace.js.map +1 -1
  254. package/dist/commands/discover.js +2 -2
  255. package/dist/commands/discover.js.map +1 -1
  256. package/dist/commands/down.d.ts +1 -1
  257. package/dist/commands/down.d.ts.map +1 -1
  258. package/dist/commands/down.js +91 -3
  259. package/dist/commands/down.js.map +1 -1
  260. package/dist/commands/ps.d.ts.map +1 -1
  261. package/dist/commands/ps.js +72 -10
  262. package/dist/commands/ps.js.map +1 -1
  263. package/dist/commands/queue.d.ts +6 -0
  264. package/dist/commands/queue.d.ts.map +1 -1
  265. package/dist/commands/queue.js +103 -5
  266. package/dist/commands/queue.js.map +1 -1
  267. package/dist/commands/rig-policy.d.ts +48 -0
  268. package/dist/commands/rig-policy.d.ts.map +1 -0
  269. package/dist/commands/rig-policy.js +429 -0
  270. package/dist/commands/rig-policy.js.map +1 -0
  271. package/dist/commands/scope.d.ts +6 -0
  272. package/dist/commands/scope.d.ts.map +1 -0
  273. package/dist/commands/scope.js +659 -0
  274. package/dist/commands/scope.js.map +1 -0
  275. package/dist/commands/send.d.ts.map +1 -1
  276. package/dist/commands/send.js +11 -0
  277. package/dist/commands/send.js.map +1 -1
  278. package/dist/commands/setup.d.ts +7 -0
  279. package/dist/commands/setup.d.ts.map +1 -1
  280. package/dist/commands/setup.js +28 -1
  281. package/dist/commands/setup.js.map +1 -1
  282. package/dist/commands/status.d.ts.map +1 -1
  283. package/dist/commands/status.js +35 -2
  284. package/dist/commands/status.js.map +1 -1
  285. package/dist/commands/unarchive.d.ts +10 -0
  286. package/dist/commands/unarchive.d.ts.map +1 -0
  287. package/dist/commands/unarchive.js +53 -0
  288. package/dist/commands/unarchive.js.map +1 -0
  289. package/dist/commands/up.d.ts.map +1 -1
  290. package/dist/commands/up.js +97 -0
  291. package/dist/commands/up.js.map +1 -1
  292. package/dist/commands/whoami.d.ts.map +1 -1
  293. package/dist/commands/whoami.js +4 -1
  294. package/dist/commands/whoami.js.map +1 -1
  295. package/dist/commands/workflow.d.ts +9 -0
  296. package/dist/commands/workflow.d.ts.map +1 -1
  297. package/dist/commands/workflow.js +141 -4
  298. package/dist/commands/workflow.js.map +1 -1
  299. package/dist/commands/workspace.d.ts +20 -0
  300. package/dist/commands/workspace.d.ts.map +1 -1
  301. package/dist/commands/workspace.js +140 -10
  302. package/dist/commands/workspace.js.map +1 -1
  303. package/dist/daemon-lifecycle.d.ts +48 -1
  304. package/dist/daemon-lifecycle.d.ts.map +1 -1
  305. package/dist/daemon-lifecycle.js +57 -2
  306. package/dist/daemon-lifecycle.js.map +1 -1
  307. package/dist/index.d.ts +5 -0
  308. package/dist/index.d.ts.map +1 -1
  309. package/dist/index.js +12 -0
  310. package/dist/index.js.map +1 -1
  311. package/dist/lib/scope/dot-id.d.ts +43 -0
  312. package/dist/lib/scope/dot-id.d.ts.map +1 -0
  313. package/dist/lib/scope/dot-id.js +165 -0
  314. package/dist/lib/scope/dot-id.js.map +1 -0
  315. package/dist/lib/scope/scope-fs.d.ts +79 -0
  316. package/dist/lib/scope/scope-fs.d.ts.map +1 -0
  317. package/dist/lib/scope/scope-fs.js +468 -0
  318. package/dist/lib/scope/scope-fs.js.map +1 -0
  319. package/dist/lib/scope/templates.d.ts +38 -0
  320. package/dist/lib/scope/templates.d.ts.map +1 -0
  321. package/dist/lib/scope/templates.js +109 -0
  322. package/dist/lib/scope/templates.js.map +1 -0
  323. package/dist/lib/scope/types.d.ts +61 -0
  324. package/dist/lib/scope/types.d.ts.map +1 -0
  325. package/dist/lib/scope/types.js +38 -0
  326. package/dist/lib/scope/types.js.map +1 -0
  327. package/dist/lib/scope-templates/backlog-deprecation.md +26 -0
  328. package/dist/lib/scope-templates/backlog-tech-debt.md +22 -0
  329. package/dist/lib/scope-templates/bug-fix.md +30 -0
  330. package/dist/lib/scope-templates/mission-notes.md +97 -0
  331. package/dist/lib/scope-templates/mission-placeholder.md +20 -0
  332. package/dist/lib/scope-templates/mission-release.md +25 -0
  333. package/dist/lib/scope-templates/placeholder.md +30 -0
  334. package/dist/lib/scope-templates/release-feature.md +26 -0
  335. package/dist/lib/scope-templates/research.md +22 -0
  336. package/dist/mcp-server.d.ts.map +1 -1
  337. package/dist/mcp-server.js +29 -0
  338. package/dist/mcp-server.js.map +1 -1
  339. package/dist/release-surface/affected-skills.d.ts +49 -0
  340. package/dist/release-surface/affected-skills.d.ts.map +1 -0
  341. package/dist/release-surface/affected-skills.js +153 -0
  342. package/dist/release-surface/affected-skills.js.map +1 -0
  343. package/dist/release-surface/extract-surface.d.ts +23 -0
  344. package/dist/release-surface/extract-surface.d.ts.map +1 -0
  345. package/dist/release-surface/extract-surface.js +193 -0
  346. package/dist/release-surface/extract-surface.js.map +1 -0
  347. package/dist/release-surface/generate.d.ts +2 -0
  348. package/dist/release-surface/generate.d.ts.map +1 -0
  349. package/dist/release-surface/generate.js +51 -0
  350. package/dist/release-surface/generate.js.map +1 -0
  351. package/dist/release-surface/surface-diff.d.ts +40 -0
  352. package/dist/release-surface/surface-diff.d.ts.map +1 -0
  353. package/dist/release-surface/surface-diff.js +212 -0
  354. package/dist/release-surface/surface-diff.js.map +1 -0
  355. package/package.json +2 -2
  356. package/ui/dist/assets/index-CrJgCmkX.js +552 -0
  357. package/ui/dist/index.html +1 -1
  358. package/ui/dist/assets/index-Rl3ZBrUg.js +0 -547
@@ -0,0 +1,43 @@
1
+ import type { DotId } from "./types.js";
2
+ /** Default project prefix for the OpenRig single-project workspace.
3
+ * Multi-project work waits for a real second project (convention §1). */
4
+ export declare const DEFAULT_PROJECT_PREFIX = "OPR";
5
+ /** Parse a dot-ID string into structured parts; returns null when the
6
+ * string doesn't conform to the §1 positional grammar. When `tier`
7
+ * is supplied, the trailing segments are peeled off into `n` (slice)
8
+ * or `n` + `m` (sub-slice). With no tier, all numeric segments are
9
+ * returned as `version` for backwards compatibility. */
10
+ export declare function parseDotId(raw: string, tier?: "mission" | "slice" | "sub-slice"): DotId | null;
11
+ /** Depth-based tier discriminator. Per §1 the positional grammar
12
+ * is fixed:
13
+ * mission = <PFX>.<ver> (ver = 2-3 numeric segments;
14
+ * escape band is exactly 99.0.n)
15
+ * slice = <PFX>.<ver>.<n> (3-4 numeric segments)
16
+ * sub-slice = <PFX>.<ver>.<n>.<m> (4-5 numeric segments)
17
+ * Where a mission shape OVERLAPS with a slice shape (e.g. release
18
+ * X.Y mission has 2 segments; release X.Y.Z mission has 3 segments
19
+ * which is also the slice shape for release X.Y missions) the tier
20
+ * is resolved by depth: mission caps at 3 numeric segments; slice
21
+ * always has 3-4; sub-slice has 4-5. Escape band is fully unambiguous
22
+ * because §1 fixes both the 99 marker AND the 0 segment that follows. */
23
+ export declare function isMissionDotId(raw: unknown): boolean;
24
+ export declare function isSliceDotId(raw: unknown): boolean;
25
+ /** Render a DotId back to its canonical dot-string. */
26
+ export declare function formatDotId(id: DotId): string;
27
+ /** Compose a slice ID by appending an ordinal to a parent mission ID. */
28
+ export declare function sliceIdFromMission(missionId: string, n: number): string;
29
+ /** Infer the (project, version) pair from a mission folder name when
30
+ * no explicit id is supplied. Release missions use their semver; any
31
+ * other name falls into the escape band where the caller supplies the
32
+ * next ordinal via the second arg. */
33
+ export declare function inferMissionDotId(missionFolderName: string, escapeBandOrdinal: number | null, projectPrefix?: string): string;
34
+ /** Pick the next escape-band ordinal by scanning peer mission IDs.
35
+ * Looks for `<PFX>.99.0.<m>` shapes and returns max(m)+1, starting
36
+ * at 1 when no peer exists. */
37
+ export declare function nextEscapeBandOrdinal(existingIds: ReadonlyArray<string | null>, projectPrefix?: string): number;
38
+ /** Does this candidate string parse as a valid §1 dot-ID at ANY
39
+ * tier? Prefer the tier-specific isMissionDotId/isSliceDotId at use
40
+ * sites where the tier is known — depth alone doesn't disambiguate
41
+ * mission vs slice for release IDs with overlapping shapes. */
42
+ export declare function isConformantDotId(raw: unknown): boolean;
43
+ //# sourceMappingURL=dot-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dot-id.d.ts","sourceRoot":"","sources":["../../../src/lib/scope/dot-id.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGxC;0EAC0E;AAC1E,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAS5C;;;;yDAIyD;AACzD,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,WAAW,GACvC,KAAK,GAAG,IAAI,CAyBd;AAkBD;;;;;;;;;;;0EAW0E;AAC1E,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAKpD;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAQlD;AAED,uDAAuD;AACvD,wBAAgB,WAAW,CAAC,EAAE,EAAE,KAAK,GAAG,MAAM,CAK7C;AAED,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED;;;uCAGuC;AACvC,wBAAgB,iBAAiB,CAC/B,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,aAAa,GAAE,MAA+B,GAC7C,MAAM,CAaR;AAED;;gCAEgC;AAChC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC,EACzC,aAAa,GAAE,MAA+B,GAC7C,MAAM,CAWR;AAED;;;gEAGgE;AAChE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEvD"}
@@ -0,0 +1,165 @@
1
+ // release-0.3.2 slice 12 — dot-ID grammar per
2
+ // `openrig-work/conventions/scope-and-versioning/README.md` §1.
3
+ //
4
+ // Grammar (v0 single-project):
5
+ // project = <PFX> (2-3 letter; v0 hardcodes "OPR")
6
+ // mission = <PFX>.<ver>
7
+ // slice = <PFX>.<ver>.<n>
8
+ // sub = <PFX>.<ver>.<n>.<m>
9
+ //
10
+ // Version inference from mission folder name:
11
+ // release-X.Y[.Z] → "X.Y[.Z]" (release train)
12
+ // anything else → "99.0.<m>" escape band (uniform-numeric;
13
+ // NO alpha — convention §1 explicit)
14
+ //
15
+ // The escape-band <m> is assigned by scanning peer non-release missions
16
+ // for an existing id and picking max+1. Releases keep their semver.
17
+ import { ScopeCliError } from "./types.js";
18
+ /** Default project prefix for the OpenRig single-project workspace.
19
+ * Multi-project work waits for a real second project (convention §1). */
20
+ export const DEFAULT_PROJECT_PREFIX = "OPR";
21
+ const RELEASE_NAME_RE = /^release-(\d+\.\d+(?:\.\d+)?)$/;
22
+ // Strict positional grammar: every segment is a number except for the
23
+ // 2-3 letter project prefix at position 0. Accepts 2-5 numeric
24
+ // segments after the prefix (mission has 2-3, slice has 3-4, sub-slice
25
+ // has 4-5). Tier-aware parse helpers below split version/n/m correctly.
26
+ const DOT_ID_RE = /^([A-Z]{2,3})\.(\d+(?:\.\d+){1,4})$/;
27
+ /** Parse a dot-ID string into structured parts; returns null when the
28
+ * string doesn't conform to the §1 positional grammar. When `tier`
29
+ * is supplied, the trailing segments are peeled off into `n` (slice)
30
+ * or `n` + `m` (sub-slice). With no tier, all numeric segments are
31
+ * returned as `version` for backwards compatibility. */
32
+ export function parseDotId(raw, tier) {
33
+ if (typeof raw !== "string")
34
+ return null;
35
+ const trimmed = raw.trim();
36
+ const m = DOT_ID_RE.exec(trimmed);
37
+ if (!m)
38
+ return null;
39
+ const project = m[1];
40
+ const segments = m[2].split(".");
41
+ if (!tier) {
42
+ return { project, version: segments.join("."), n: undefined, m: undefined };
43
+ }
44
+ if (tier === "mission") {
45
+ return { project, version: segments.join("."), n: undefined, m: undefined };
46
+ }
47
+ if (tier === "slice") {
48
+ if (segments.length < 3)
49
+ return null; // slice = ver(>=2) + n
50
+ const verSegs = segments.slice(0, -1);
51
+ const nSeg = segments[segments.length - 1];
52
+ return { project, version: verSegs.join("."), n: Number(nSeg), m: undefined };
53
+ }
54
+ // sub-slice
55
+ if (segments.length < 4)
56
+ return null;
57
+ const verSegs = segments.slice(0, -2);
58
+ const nSeg = segments[segments.length - 2];
59
+ const mSeg = segments[segments.length - 1];
60
+ return { project, version: verSegs.join("."), n: Number(nSeg), m: Number(mSeg) };
61
+ }
62
+ /** Validate a mission-ver segments array against the §1 escape-band
63
+ * rule. The convention defines the non-release escape band as
64
+ * `<PFX>.99.0.<n>` — the `0` after `99` is FIXED. A version like
65
+ * `99.7.8` does NOT conform. Shared between isMissionDotId and the
66
+ * parent-version check inside isSliceDotId so both surfaces stay in
67
+ * lockstep. */
68
+ function isValidMissionVerSegments(segs) {
69
+ if (segs.length < 2 || segs.length > 3)
70
+ return false;
71
+ if (segs[0] === "99") {
72
+ // Escape band: exactly [99, "0", "<ordinal>"]. The `0` segment is
73
+ // fixed; `<ordinal>` must be a non-empty numeric string.
74
+ return segs.length === 3 && segs[1] === "0" && /^\d+$/.test(segs[2] ?? "");
75
+ }
76
+ return true;
77
+ }
78
+ /** Depth-based tier discriminator. Per §1 the positional grammar
79
+ * is fixed:
80
+ * mission = <PFX>.<ver> (ver = 2-3 numeric segments;
81
+ * escape band is exactly 99.0.n)
82
+ * slice = <PFX>.<ver>.<n> (3-4 numeric segments)
83
+ * sub-slice = <PFX>.<ver>.<n>.<m> (4-5 numeric segments)
84
+ * Where a mission shape OVERLAPS with a slice shape (e.g. release
85
+ * X.Y mission has 2 segments; release X.Y.Z mission has 3 segments
86
+ * which is also the slice shape for release X.Y missions) the tier
87
+ * is resolved by depth: mission caps at 3 numeric segments; slice
88
+ * always has 3-4; sub-slice has 4-5. Escape band is fully unambiguous
89
+ * because §1 fixes both the 99 marker AND the 0 segment that follows. */
90
+ export function isMissionDotId(raw) {
91
+ if (typeof raw !== "string")
92
+ return false;
93
+ const parsed = parseDotId(raw, "mission");
94
+ if (!parsed)
95
+ return false;
96
+ return isValidMissionVerSegments(parsed.version.split("."));
97
+ }
98
+ export function isSliceDotId(raw) {
99
+ if (typeof raw !== "string")
100
+ return false;
101
+ const parsed = parseDotId(raw, "slice");
102
+ if (!parsed)
103
+ return false;
104
+ // Slice = mission-ver + 1 ordinal. Parent ver must itself be a
105
+ // valid mission shape (including the escape-band exact-[99.0.n]
106
+ // rule — a parent like 99.7.8 is not a real mission).
107
+ return isValidMissionVerSegments(parsed.version.split("."));
108
+ }
109
+ /** Render a DotId back to its canonical dot-string. */
110
+ export function formatDotId(id) {
111
+ const parts = [id.project, id.version];
112
+ if (id.n !== undefined)
113
+ parts.push(String(id.n));
114
+ if (id.m !== undefined)
115
+ parts.push(String(id.m));
116
+ return parts.join(".");
117
+ }
118
+ /** Compose a slice ID by appending an ordinal to a parent mission ID. */
119
+ export function sliceIdFromMission(missionId, n) {
120
+ return `${missionId}.${n}`;
121
+ }
122
+ /** Infer the (project, version) pair from a mission folder name when
123
+ * no explicit id is supplied. Release missions use their semver; any
124
+ * other name falls into the escape band where the caller supplies the
125
+ * next ordinal via the second arg. */
126
+ export function inferMissionDotId(missionFolderName, escapeBandOrdinal, projectPrefix = DEFAULT_PROJECT_PREFIX) {
127
+ const releaseMatch = RELEASE_NAME_RE.exec(missionFolderName);
128
+ if (releaseMatch) {
129
+ return `${projectPrefix}.${releaseMatch[1]}`;
130
+ }
131
+ if (escapeBandOrdinal === null) {
132
+ throw new ScopeCliError({
133
+ fact: `Mission "${missionFolderName}" doesn't match the release-X.Y[.Z] pattern and no escape-band ordinal was supplied.`,
134
+ consequence: "No dot-ID could be inferred for this mission.",
135
+ action: "Pass an explicit ordinal, or rename the mission to release-X.Y.Z, or supply --id on the CLI.",
136
+ });
137
+ }
138
+ return `${projectPrefix}.99.0.${escapeBandOrdinal}`;
139
+ }
140
+ /** Pick the next escape-band ordinal by scanning peer mission IDs.
141
+ * Looks for `<PFX>.99.0.<m>` shapes and returns max(m)+1, starting
142
+ * at 1 when no peer exists. */
143
+ export function nextEscapeBandOrdinal(existingIds, projectPrefix = DEFAULT_PROJECT_PREFIX) {
144
+ let max = 0;
145
+ const re = new RegExp(`^${projectPrefix}\\.99\\.0\\.(\\d+)$`);
146
+ for (const id of existingIds) {
147
+ if (!id)
148
+ continue;
149
+ const m = re.exec(id);
150
+ if (!m)
151
+ continue;
152
+ const n = Number(m[1]);
153
+ if (Number.isFinite(n) && n > max)
154
+ max = n;
155
+ }
156
+ return max + 1;
157
+ }
158
+ /** Does this candidate string parse as a valid §1 dot-ID at ANY
159
+ * tier? Prefer the tier-specific isMissionDotId/isSliceDotId at use
160
+ * sites where the tier is known — depth alone doesn't disambiguate
161
+ * mission vs slice for release IDs with overlapping shapes. */
162
+ export function isConformantDotId(raw) {
163
+ return typeof raw === "string" && parseDotId(raw) !== null;
164
+ }
165
+ //# sourceMappingURL=dot-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dot-id.js","sourceRoot":"","sources":["../../../src/lib/scope/dot-id.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,gEAAgE;AAChE,EAAE;AACF,+BAA+B;AAC/B,iEAAiE;AACjE,2BAA2B;AAC3B,+BAA+B;AAC/B,mCAAmC;AACnC,EAAE;AACF,8CAA8C;AAC9C,4DAA4D;AAC5D,mEAAmE;AACnE,8DAA8D;AAC9D,EAAE;AACF,wEAAwE;AACxE,oEAAoE;AAGpE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;0EAC0E;AAC1E,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAE5C,MAAM,eAAe,GAAG,gCAAgC,CAAC;AACzD,sEAAsE;AACtE,+DAA+D;AAC/D,uEAAuE;AACvE,wEAAwE;AACxE,MAAM,SAAS,GAAG,qCAAqC,CAAC;AAExD;;;;yDAIyD;AACzD,MAAM,UAAU,UAAU,CACxB,GAAW,EACX,IAAwC;IAExC,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACzC,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,MAAM,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAClC,IAAI,CAAC,CAAC;QAAE,OAAO,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AC;IACD,OAAO,GAAG,aAAa,SAAS,iBAAiB,EAAE,CAAC;AACtD,CAAC;AAED;;gCAEgC;AAChC,MAAM,UAAU,qBAAqB,CACnC,WAAyC,EACzC,gBAAwB,sBAAsB;IAE9C,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,IAAI,aAAa,qBAAqB,CAAC,CAAC;IAC9D,KAAK,MAAM,EAAE,IAAI,WAAW,EAAE,CAAC;QAC7B,IAAI,CAAC,EAAE;YAAE,SAAS;QAClB,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACtB,IAAI,CAAC,CAAC;YAAE,SAAS;QACjB,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG;YAAE,GAAG,GAAG,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,GAAG,GAAG,CAAC,CAAC;AACjB,CAAC;AAED;;;gEAGgE;AAChE,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC5C,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,UAAU,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,79 @@
1
+ import type { MissionInfo, SliceInfo, SliceState } from "./types.js";
2
+ import { DEFAULT_PROJECT_PREFIX } from "./dot-id.js";
3
+ /** Split a markdown file into [frontmatter, body]. Returns `[{}, content]`
4
+ * when no frontmatter delimiter is present. */
5
+ export declare function splitFrontmatter(content: string): {
6
+ frontmatter: Record<string, unknown>;
7
+ body: string;
8
+ };
9
+ /** Re-stitch frontmatter + body into a single markdown string. */
10
+ export declare function joinFrontmatter(frontmatter: Record<string, unknown>, body: string): string;
11
+ /** Read + parse frontmatter from a markdown file. Returns `{}` if the
12
+ * file is missing OR has no frontmatter (graceful for placeholder
13
+ * missions that pre-date the convention). */
14
+ export declare function readFrontmatter(absPath: string): Record<string, unknown>;
15
+ /** Update specific keys in a markdown file's frontmatter. Existing
16
+ * unknown keys are preserved. Generates minimal frontmatter when
17
+ * absent. */
18
+ export declare function updateFrontmatter(absPath: string, updates: Record<string, unknown>): void;
19
+ /** Locate the missions root for the working substrate. Resolution
20
+ * order:
21
+ * 1. Explicit override (env or arg)
22
+ * 2. $OPENRIG_WORK_ROOT/missions
23
+ * 3. Search up from cwd for a `missions/` folder
24
+ */
25
+ export declare function resolveMissionsRoot(opts?: {
26
+ override?: string | null;
27
+ cwd?: string;
28
+ }): string;
29
+ /** List mission folders under the missions root. A mission is any
30
+ * top-level folder containing a README.md (per IMPLEMENTATION-PRD
31
+ * §2.1 / HG-8). Directories without a README.md are skipped — they
32
+ * represent scratch/junk, not declared missions. */
33
+ export declare function listMissions(missionsRoot: string): MissionInfo[];
34
+ /** Resolve a mission by name OR path relative to the missions root.
35
+ * Throws ScopeCliError on miss OR when the directory exists but
36
+ * lacks a README.md (consistent with listMissions' README gate per
37
+ * PRD §2.1 / HG-8 — README-less dirs are scratch/junk, not declared
38
+ * missions, so mutation commands must not silently target them). */
39
+ export declare function findMission(missionsRoot: string, identifier: string): MissionInfo;
40
+ export declare function listSlices(mission: MissionInfo, state: SliceState): SliceInfo[];
41
+ /** Resolve a slice path (absolute, relative-to-substrate, or
42
+ * relative-to-mission) into a SliceInfo. */
43
+ export declare function findSlice(missionsRoot: string, slicePath: string, hintMission?: string | null): SliceInfo;
44
+ /** Find the next available NN for a mission's slices/ folder. Scans
45
+ * BOTH slices/ AND closed/ so numbers are never reused (§3.2). */
46
+ export declare function nextSliceNN(missionAbsPath: string): number;
47
+ /** Mint or read the dot-ID for a mission. If the mission's README has
48
+ * an `id:` field, return it. Otherwise infer from the folder name
49
+ * (release-X.Y.Z → OPR.X.Y.Z; otherwise escape band). */
50
+ export declare function ensureMissionId(mission: MissionInfo, missionsRoot: string): string;
51
+ /** Same as ensureMissionId, but ALSO writes the inferred id back into
52
+ * the mission's README frontmatter when it was absent. Use this at
53
+ * every site that mints a child id (slice create / ship / move target)
54
+ * — per the convention's lazy-adoption rule: when a child is created
55
+ * under a pre-existing parent with no id, assign the parent's id
56
+ * on-demand at the same time. Narrow, single-parent, create-triggered;
57
+ * never mass-migration. */
58
+ export declare function ensureMissionIdPersisted(mission: MissionInfo, missionsRoot: string): string;
59
+ /** Return the git toplevel for a path, or null if not inside a repo. */
60
+ export declare function gitTopLevel(absPath: string): string | null;
61
+ /** Refuse to move a path with uncommitted local changes. Catches the
62
+ * "dirty working tree" risk in §11.1 / §3.4 — `git mv` would silently
63
+ * carry along the user's in-progress edits. */
64
+ export declare function assertCleanWorkingTree(repoRoot: string, relPath: string): void;
65
+ /** Move a directory using `git mv` when inside a repo; fall back to
66
+ * `fs.renameSync` with a warning when not. Returns true if git was
67
+ * used. */
68
+ export declare function moveSlice(srcAbs: string, destAbs: string, opts?: {
69
+ /** Stage the move (default true). git mv stages by default; we
70
+ * preserve that semantic. */
71
+ commit?: boolean;
72
+ }): {
73
+ usedGit: boolean;
74
+ repoRoot: string | null;
75
+ };
76
+ export declare function todayDateISO(): string;
77
+ export declare function pad2(n: number): string;
78
+ export { DEFAULT_PROJECT_PREFIX };
79
+ //# sourceMappingURL=scope-fs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope-fs.d.ts","sourceRoot":"","sources":["../../../src/lib/scope/scope-fs.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACX,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AASrB;gDACgD;AAChD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG;IACjD,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;CACd,CAgBA;AAaD,kEAAkE;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