@rpamis/comet 0.3.8 → 0.4.0-beta.1

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 (627) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +381 -234
  3. package/assets/manifest.json +33 -12
  4. package/assets/skills/comet/SKILL.md +87 -102
  5. package/assets/skills/comet/reference/auto-transition.md +1 -1
  6. package/assets/skills/comet/reference/comet-yaml-fields.md +11 -4
  7. package/assets/skills/comet/reference/context-recovery.md +12 -2
  8. package/assets/skills/comet/reference/debug-gate.md +17 -1
  9. package/assets/skills/comet/reference/decision-point.md +13 -2
  10. package/assets/skills/comet/reference/dirty-worktree.md +59 -59
  11. package/assets/skills/comet/reference/intent-frame.md +74 -0
  12. package/assets/skills/comet/reference/scripts.md +69 -0
  13. package/assets/skills/comet/reference/subagent-dispatch.md +79 -23
  14. package/assets/skills/comet/rules/comet-phase-guard.en.md +43 -11
  15. package/assets/skills/comet/rules/comet-phase-guard.md +44 -11
  16. package/assets/skills/comet/runtime/classic/checks.yaml +6 -0
  17. package/assets/skills/comet/runtime/classic/guardrails.yaml +13 -0
  18. package/assets/skills/comet/runtime/classic/skill.yaml +122 -0
  19. package/assets/skills/comet/scripts/comet-archive.mjs +3 -0
  20. package/assets/skills/comet/scripts/comet-env.mjs +15 -0
  21. package/assets/skills/comet/scripts/comet-guard.mjs +3 -0
  22. package/assets/skills/comet/scripts/comet-handoff.mjs +3 -0
  23. package/assets/skills/comet/scripts/comet-hook-guard.mjs +3 -0
  24. package/assets/skills/comet/scripts/comet-intent.mjs +3 -0
  25. package/assets/skills/comet/scripts/comet-runtime.mjs +12857 -0
  26. package/assets/skills/comet/scripts/comet-state.mjs +3 -0
  27. package/assets/skills/comet/scripts/comet-yaml-validate.mjs +3 -0
  28. package/assets/skills/comet-any/SKILL.md +118 -0
  29. package/assets/skills/comet-any/reference/authored-zone-example.md +100 -0
  30. package/assets/skills/comet-any/reference/authoring-protocol.json +91 -0
  31. package/assets/skills/comet-any/reference/authoring-subagents.md +102 -0
  32. package/assets/skills/comet-any/reference/bundle-authoring.md +166 -0
  33. package/assets/skills/comet-any/reference/eval-provider.md +83 -0
  34. package/assets/skills/comet-any/reference/subagents/pause-points-author.md +75 -0
  35. package/assets/skills/comet-any/reference/subagents/reference-author.md +77 -0
  36. package/assets/skills/comet-any/reference/subagents/script-author.md +81 -0
  37. package/assets/skills/comet-any/reference/subagents/skill-core-author.md +129 -0
  38. package/assets/skills/comet-any/reference/subagents/skill-reviewer.md +124 -0
  39. package/assets/skills/comet-any/reference/subagents/workflow-entry-author.md +100 -0
  40. package/assets/skills/comet-archive/SKILL.md +25 -15
  41. package/assets/skills/comet-build/SKILL.md +51 -40
  42. package/assets/skills/comet-design/SKILL.md +14 -18
  43. package/assets/skills/comet-hotfix/SKILL.md +33 -43
  44. package/assets/skills/comet-open/SKILL.md +28 -21
  45. package/assets/skills/comet-tweak/SKILL.md +71 -65
  46. package/assets/skills/comet-verify/SKILL.md +31 -35
  47. package/assets/skills-zh/comet/SKILL.md +88 -102
  48. package/assets/skills-zh/comet/reference/auto-transition.md +3 -3
  49. package/assets/skills-zh/comet/reference/comet-yaml-fields.md +11 -4
  50. package/assets/skills-zh/comet/reference/context-recovery.md +12 -2
  51. package/assets/skills-zh/comet/reference/debug-gate.md +19 -3
  52. package/assets/skills-zh/comet/reference/decision-point.md +13 -2
  53. package/assets/skills-zh/comet/reference/dirty-worktree.md +59 -59
  54. package/assets/skills-zh/comet/reference/intent-frame.md +74 -0
  55. package/assets/skills-zh/comet/reference/scripts.md +69 -0
  56. package/assets/skills-zh/comet/reference/subagent-dispatch.md +79 -23
  57. package/assets/skills-zh/comet/runtime/classic/checks.yaml +6 -0
  58. package/assets/skills-zh/comet/runtime/classic/guardrails.yaml +13 -0
  59. package/assets/skills-zh/comet/runtime/classic/skill.yaml +122 -0
  60. package/assets/skills-zh/comet-any/SKILL.md +118 -0
  61. package/assets/skills-zh/comet-any/reference/authored-zone-example.md +100 -0
  62. package/assets/skills-zh/comet-any/reference/authoring-protocol.json +91 -0
  63. package/assets/skills-zh/comet-any/reference/authoring-subagents.md +107 -0
  64. package/assets/skills-zh/comet-any/reference/bundle-authoring.md +166 -0
  65. package/assets/skills-zh/comet-any/reference/eval-provider.md +66 -0
  66. package/assets/skills-zh/comet-any/reference/subagents/pause-points-author.md +79 -0
  67. package/assets/skills-zh/comet-any/reference/subagents/reference-author.md +81 -0
  68. package/assets/skills-zh/comet-any/reference/subagents/script-author.md +84 -0
  69. package/assets/skills-zh/comet-any/reference/subagents/skill-core-author.md +129 -0
  70. package/assets/skills-zh/comet-any/reference/subagents/skill-reviewer.md +124 -0
  71. package/assets/skills-zh/comet-any/reference/subagents/workflow-entry-author.md +98 -0
  72. package/assets/skills-zh/comet-archive/SKILL.md +25 -15
  73. package/assets/skills-zh/comet-build/SKILL.md +54 -43
  74. package/assets/skills-zh/comet-design/SKILL.md +16 -20
  75. package/assets/skills-zh/comet-hotfix/SKILL.md +37 -47
  76. package/assets/skills-zh/comet-open/SKILL.md +30 -23
  77. package/assets/skills-zh/comet-tweak/SKILL.md +70 -63
  78. package/assets/skills-zh/comet-verify/SKILL.md +30 -32
  79. package/bin/comet.js +1 -1
  80. package/dist/{cli → app/cli}/index.d.ts.map +1 -1
  81. package/dist/app/cli/index.js +430 -0
  82. package/dist/app/cli/index.js.map +1 -0
  83. package/dist/app/commands/bundle.d.ts +51 -0
  84. package/dist/app/commands/bundle.d.ts.map +1 -0
  85. package/dist/app/commands/bundle.js +387 -0
  86. package/dist/app/commands/bundle.js.map +1 -0
  87. package/dist/app/commands/creator.d.ts +14 -0
  88. package/dist/app/commands/creator.d.ts.map +1 -0
  89. package/dist/app/commands/creator.js +82 -0
  90. package/dist/app/commands/creator.js.map +1 -0
  91. package/dist/app/commands/dashboard.d.ts +16 -0
  92. package/dist/app/commands/dashboard.d.ts.map +1 -0
  93. package/dist/app/commands/dashboard.js +53 -0
  94. package/dist/app/commands/dashboard.js.map +1 -0
  95. package/dist/{commands → app/commands}/doctor.d.ts +1 -1
  96. package/dist/app/commands/doctor.d.ts.map +1 -0
  97. package/dist/{commands → app/commands}/doctor.js +114 -60
  98. package/dist/app/commands/doctor.js.map +1 -0
  99. package/dist/app/commands/eval.d.ts +17 -0
  100. package/dist/app/commands/eval.d.ts.map +1 -0
  101. package/dist/app/commands/eval.js +169 -0
  102. package/dist/app/commands/eval.js.map +1 -0
  103. package/dist/app/commands/i18n.d.ts +4 -0
  104. package/dist/app/commands/i18n.d.ts.map +1 -0
  105. package/dist/app/commands/i18n.js +174 -0
  106. package/dist/app/commands/i18n.js.map +1 -0
  107. package/dist/{commands → app/commands}/init.d.ts +6 -1
  108. package/dist/app/commands/init.d.ts.map +1 -0
  109. package/dist/app/commands/init.js +402 -0
  110. package/dist/app/commands/init.js.map +1 -0
  111. package/dist/app/commands/platform-select-prompt.d.ts +38 -0
  112. package/dist/app/commands/platform-select-prompt.d.ts.map +1 -0
  113. package/dist/app/commands/platform-select-prompt.js +141 -0
  114. package/dist/app/commands/platform-select-prompt.js.map +1 -0
  115. package/dist/app/commands/publish.d.ts +7 -0
  116. package/dist/app/commands/publish.d.ts.map +1 -0
  117. package/dist/app/commands/publish.js +14 -0
  118. package/dist/app/commands/publish.js.map +1 -0
  119. package/dist/app/commands/skill.d.ts +23 -0
  120. package/dist/app/commands/skill.d.ts.map +1 -0
  121. package/dist/app/commands/skill.js +208 -0
  122. package/dist/app/commands/skill.js.map +1 -0
  123. package/dist/app/commands/status.d.ts.map +1 -0
  124. package/dist/app/commands/status.js +159 -0
  125. package/dist/app/commands/status.js.map +1 -0
  126. package/dist/{commands → app/commands}/uninstall.d.ts +1 -1
  127. package/dist/app/commands/uninstall.d.ts.map +1 -0
  128. package/dist/{commands → app/commands}/uninstall.js +37 -18
  129. package/dist/app/commands/uninstall.js.map +1 -0
  130. package/dist/{commands → app/commands}/update.d.ts +6 -4
  131. package/dist/app/commands/update.d.ts.map +1 -0
  132. package/dist/{commands → app/commands}/update.js +77 -46
  133. package/dist/app/commands/update.js.map +1 -0
  134. package/dist/config/repository-layout.json +98 -0
  135. package/dist/domains/bundle/authoring.d.ts +82 -0
  136. package/dist/domains/bundle/authoring.d.ts.map +1 -0
  137. package/dist/domains/bundle/authoring.js +185 -0
  138. package/dist/domains/bundle/authoring.js.map +1 -0
  139. package/dist/domains/bundle/bundle-platform.d.ts +39 -0
  140. package/dist/domains/bundle/bundle-platform.d.ts.map +1 -0
  141. package/dist/domains/bundle/bundle-platform.js +287 -0
  142. package/dist/domains/bundle/bundle-platform.js.map +1 -0
  143. package/dist/domains/bundle/candidates.d.ts +29 -0
  144. package/dist/domains/bundle/candidates.d.ts.map +1 -0
  145. package/dist/domains/bundle/candidates.js +37 -0
  146. package/dist/domains/bundle/candidates.js.map +1 -0
  147. package/dist/domains/bundle/compatibility-benchmark.d.ts +12 -0
  148. package/dist/domains/bundle/compatibility-benchmark.d.ts.map +1 -0
  149. package/dist/domains/bundle/compatibility-benchmark.js +224 -0
  150. package/dist/domains/bundle/compatibility-benchmark.js.map +1 -0
  151. package/dist/domains/bundle/compiler.d.ts +5 -0
  152. package/dist/domains/bundle/compiler.d.ts.map +1 -0
  153. package/dist/domains/bundle/compiler.js +106 -0
  154. package/dist/domains/bundle/compiler.js.map +1 -0
  155. package/dist/domains/bundle/distribute.d.ts +33 -0
  156. package/dist/domains/bundle/distribute.d.ts.map +1 -0
  157. package/dist/domains/bundle/distribute.js +166 -0
  158. package/dist/domains/bundle/distribute.js.map +1 -0
  159. package/dist/domains/bundle/draft.d.ts +19 -0
  160. package/dist/domains/bundle/draft.d.ts.map +1 -0
  161. package/dist/domains/bundle/draft.js +82 -0
  162. package/dist/domains/bundle/draft.js.map +1 -0
  163. package/dist/domains/bundle/eval.d.ts +36 -0
  164. package/dist/domains/bundle/eval.d.ts.map +1 -0
  165. package/dist/domains/bundle/eval.js +501 -0
  166. package/dist/domains/bundle/eval.js.map +1 -0
  167. package/dist/domains/bundle/factory-compose.d.ts +12 -0
  168. package/dist/domains/bundle/factory-compose.d.ts.map +1 -0
  169. package/dist/domains/bundle/factory-compose.js +309 -0
  170. package/dist/domains/bundle/factory-compose.js.map +1 -0
  171. package/dist/domains/bundle/factory-guide.d.ts +37 -0
  172. package/dist/domains/bundle/factory-guide.d.ts.map +1 -0
  173. package/dist/domains/bundle/factory-guide.js +96 -0
  174. package/dist/domains/bundle/factory-guide.js.map +1 -0
  175. package/dist/domains/bundle/factory-plan.d.ts +48 -0
  176. package/dist/domains/bundle/factory-plan.d.ts.map +1 -0
  177. package/dist/domains/bundle/factory-plan.js +172 -0
  178. package/dist/domains/bundle/factory-plan.js.map +1 -0
  179. package/dist/domains/bundle/factory-proposal.d.ts +31 -0
  180. package/dist/domains/bundle/factory-proposal.d.ts.map +1 -0
  181. package/dist/domains/bundle/factory-proposal.js +225 -0
  182. package/dist/domains/bundle/factory-proposal.js.map +1 -0
  183. package/dist/domains/bundle/factory-resolve.d.ts +11 -0
  184. package/dist/domains/bundle/factory-resolve.d.ts.map +1 -0
  185. package/dist/domains/bundle/factory-resolve.js +121 -0
  186. package/dist/domains/bundle/factory-resolve.js.map +1 -0
  187. package/dist/domains/bundle/factory.d.ts +17 -0
  188. package/dist/domains/bundle/factory.d.ts.map +1 -0
  189. package/dist/domains/bundle/factory.js +511 -0
  190. package/dist/domains/bundle/factory.js.map +1 -0
  191. package/dist/domains/bundle/hash.d.ts +3 -0
  192. package/dist/domains/bundle/hash.d.ts.map +1 -0
  193. package/dist/domains/bundle/hash.js +72 -0
  194. package/dist/domains/bundle/hash.js.map +1 -0
  195. package/dist/domains/bundle/load.d.ts +4 -0
  196. package/dist/domains/bundle/load.d.ts.map +1 -0
  197. package/dist/domains/bundle/load.js +355 -0
  198. package/dist/domains/bundle/load.js.map +1 -0
  199. package/dist/domains/bundle/next-action.d.ts +37 -0
  200. package/dist/domains/bundle/next-action.d.ts.map +1 -0
  201. package/dist/domains/bundle/next-action.js +185 -0
  202. package/dist/domains/bundle/next-action.js.map +1 -0
  203. package/dist/domains/bundle/platform.d.ts +21 -0
  204. package/dist/domains/bundle/platform.d.ts.map +1 -0
  205. package/dist/domains/bundle/platform.js +170 -0
  206. package/dist/domains/bundle/platform.js.map +1 -0
  207. package/dist/domains/bundle/preferences.d.ts +11 -0
  208. package/dist/domains/bundle/preferences.d.ts.map +1 -0
  209. package/dist/domains/bundle/preferences.js +17 -0
  210. package/dist/domains/bundle/preferences.js.map +1 -0
  211. package/dist/domains/bundle/publish.d.ts +14 -0
  212. package/dist/domains/bundle/publish.d.ts.map +1 -0
  213. package/dist/domains/bundle/publish.js +159 -0
  214. package/dist/domains/bundle/publish.js.map +1 -0
  215. package/dist/domains/bundle/readiness-user-summary.d.ts +25 -0
  216. package/dist/domains/bundle/readiness-user-summary.d.ts.map +1 -0
  217. package/dist/domains/bundle/readiness-user-summary.js +186 -0
  218. package/dist/domains/bundle/readiness-user-summary.js.map +1 -0
  219. package/dist/domains/bundle/review-summary.d.ts +36 -0
  220. package/dist/domains/bundle/review-summary.d.ts.map +1 -0
  221. package/dist/domains/bundle/review-summary.js +348 -0
  222. package/dist/domains/bundle/review-summary.js.map +1 -0
  223. package/dist/domains/bundle/state.d.ts +7 -0
  224. package/dist/domains/bundle/state.d.ts.map +1 -0
  225. package/dist/domains/bundle/state.js +132 -0
  226. package/dist/domains/bundle/state.js.map +1 -0
  227. package/dist/domains/bundle/types.d.ts +347 -0
  228. package/dist/domains/bundle/types.d.ts.map +1 -0
  229. package/dist/domains/bundle/types.js.map +1 -0
  230. package/dist/domains/bundle/user-facing.d.ts +48 -0
  231. package/dist/domains/bundle/user-facing.d.ts.map +1 -0
  232. package/dist/domains/bundle/user-facing.js +73 -0
  233. package/dist/domains/bundle/user-facing.js.map +1 -0
  234. package/dist/domains/bundle/validate.d.ts +5 -0
  235. package/dist/domains/bundle/validate.d.ts.map +1 -0
  236. package/dist/domains/bundle/validate.js +292 -0
  237. package/dist/domains/bundle/validate.js.map +1 -0
  238. package/dist/domains/comet-classic/classic-archive-entry.d.ts +2 -0
  239. package/dist/domains/comet-classic/classic-archive-entry.d.ts.map +1 -0
  240. package/dist/domains/comet-classic/classic-archive-entry.js +4 -0
  241. package/dist/domains/comet-classic/classic-archive-entry.js.map +1 -0
  242. package/dist/domains/comet-classic/classic-archive.d.ts +3 -0
  243. package/dist/domains/comet-classic/classic-archive.d.ts.map +1 -0
  244. package/dist/domains/comet-classic/classic-archive.js +392 -0
  245. package/dist/domains/comet-classic/classic-archive.js.map +1 -0
  246. package/dist/domains/comet-classic/classic-cli.d.ts +15 -0
  247. package/dist/domains/comet-classic/classic-cli.d.ts.map +1 -0
  248. package/dist/domains/comet-classic/classic-cli.js +94 -0
  249. package/dist/domains/comet-classic/classic-cli.js.map +1 -0
  250. package/dist/domains/comet-classic/classic-diagnostics.d.ts +16 -0
  251. package/dist/domains/comet-classic/classic-diagnostics.d.ts.map +1 -0
  252. package/dist/domains/comet-classic/classic-diagnostics.js +57 -0
  253. package/dist/domains/comet-classic/classic-diagnostics.js.map +1 -0
  254. package/dist/domains/comet-classic/classic-evidence.d.ts +10 -0
  255. package/dist/domains/comet-classic/classic-evidence.d.ts.map +1 -0
  256. package/dist/domains/comet-classic/classic-evidence.js +114 -0
  257. package/dist/domains/comet-classic/classic-evidence.js.map +1 -0
  258. package/dist/domains/comet-classic/classic-guard-entry.d.ts +2 -0
  259. package/dist/domains/comet-classic/classic-guard-entry.d.ts.map +1 -0
  260. package/dist/domains/comet-classic/classic-guard-entry.js +4 -0
  261. package/dist/domains/comet-classic/classic-guard-entry.js.map +1 -0
  262. package/dist/domains/comet-classic/classic-guard.d.ts +3 -0
  263. package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -0
  264. package/dist/domains/comet-classic/classic-guard.js +833 -0
  265. package/dist/domains/comet-classic/classic-guard.js.map +1 -0
  266. package/dist/domains/comet-classic/classic-handoff-entry.d.ts +2 -0
  267. package/dist/domains/comet-classic/classic-handoff-entry.d.ts.map +1 -0
  268. package/dist/domains/comet-classic/classic-handoff-entry.js +4 -0
  269. package/dist/domains/comet-classic/classic-handoff-entry.js.map +1 -0
  270. package/dist/domains/comet-classic/classic-handoff.d.ts +3 -0
  271. package/dist/domains/comet-classic/classic-handoff.d.ts.map +1 -0
  272. package/dist/domains/comet-classic/classic-handoff.js +478 -0
  273. package/dist/domains/comet-classic/classic-handoff.js.map +1 -0
  274. package/dist/domains/comet-classic/classic-hook-guard-entry.d.ts +2 -0
  275. package/dist/domains/comet-classic/classic-hook-guard-entry.d.ts.map +1 -0
  276. package/dist/domains/comet-classic/classic-hook-guard-entry.js +4 -0
  277. package/dist/domains/comet-classic/classic-hook-guard-entry.js.map +1 -0
  278. package/dist/domains/comet-classic/classic-hook-guard.d.ts +3 -0
  279. package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -0
  280. package/dist/domains/comet-classic/classic-hook-guard.js +302 -0
  281. package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -0
  282. package/dist/domains/comet-classic/classic-intent-command.d.ts +3 -0
  283. package/dist/domains/comet-classic/classic-intent-command.d.ts.map +1 -0
  284. package/dist/domains/comet-classic/classic-intent-command.js +40 -0
  285. package/dist/domains/comet-classic/classic-intent-command.js.map +1 -0
  286. package/dist/domains/comet-classic/classic-intent-entry.d.ts +2 -0
  287. package/dist/domains/comet-classic/classic-intent-entry.d.ts.map +1 -0
  288. package/dist/domains/comet-classic/classic-intent-entry.js +4 -0
  289. package/dist/domains/comet-classic/classic-intent-entry.js.map +1 -0
  290. package/dist/domains/comet-classic/classic-intent.d.ts +79 -0
  291. package/dist/domains/comet-classic/classic-intent.d.ts.map +1 -0
  292. package/dist/domains/comet-classic/classic-intent.js +307 -0
  293. package/dist/domains/comet-classic/classic-intent.js.map +1 -0
  294. package/dist/domains/comet-classic/classic-migrate.d.ts +18 -0
  295. package/dist/domains/comet-classic/classic-migrate.d.ts.map +1 -0
  296. package/dist/domains/comet-classic/classic-migrate.js +184 -0
  297. package/dist/domains/comet-classic/classic-migrate.js.map +1 -0
  298. package/dist/domains/comet-classic/classic-paths.d.ts +8 -0
  299. package/dist/domains/comet-classic/classic-paths.d.ts.map +1 -0
  300. package/dist/domains/comet-classic/classic-paths.js +61 -0
  301. package/dist/domains/comet-classic/classic-paths.js.map +1 -0
  302. package/dist/domains/comet-classic/classic-resolver.d.ts +10 -0
  303. package/dist/domains/comet-classic/classic-resolver.d.ts.map +1 -0
  304. package/dist/domains/comet-classic/classic-resolver.js +89 -0
  305. package/dist/domains/comet-classic/classic-resolver.js.map +1 -0
  306. package/dist/domains/comet-classic/classic-runtime-evals.d.ts +9 -0
  307. package/dist/domains/comet-classic/classic-runtime-evals.d.ts.map +1 -0
  308. package/dist/domains/comet-classic/classic-runtime-evals.js +45 -0
  309. package/dist/domains/comet-classic/classic-runtime-evals.js.map +1 -0
  310. package/dist/domains/comet-classic/classic-runtime-run.d.ts +7 -0
  311. package/dist/domains/comet-classic/classic-runtime-run.d.ts.map +1 -0
  312. package/dist/domains/comet-classic/classic-runtime-run.js +105 -0
  313. package/dist/domains/comet-classic/classic-runtime-run.js.map +1 -0
  314. package/dist/domains/comet-classic/classic-script-entry.d.ts +3 -0
  315. package/dist/domains/comet-classic/classic-script-entry.d.ts.map +1 -0
  316. package/dist/domains/comet-classic/classic-script-entry.js +31 -0
  317. package/dist/domains/comet-classic/classic-script-entry.js.map +1 -0
  318. package/dist/domains/comet-classic/classic-state-command.d.ts +3 -0
  319. package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -0
  320. package/dist/domains/comet-classic/classic-state-command.js +984 -0
  321. package/dist/domains/comet-classic/classic-state-command.js.map +1 -0
  322. package/dist/domains/comet-classic/classic-state-entry.d.ts +2 -0
  323. package/dist/domains/comet-classic/classic-state-entry.d.ts.map +1 -0
  324. package/dist/domains/comet-classic/classic-state-entry.js +4 -0
  325. package/dist/domains/comet-classic/classic-state-entry.js.map +1 -0
  326. package/dist/domains/comet-classic/classic-state-events.d.ts +18 -0
  327. package/dist/domains/comet-classic/classic-state-events.d.ts.map +1 -0
  328. package/dist/domains/comet-classic/classic-state-events.js +15 -0
  329. package/dist/domains/comet-classic/classic-state-events.js.map +1 -0
  330. package/dist/domains/comet-classic/classic-state.d.ts +69 -0
  331. package/dist/domains/comet-classic/classic-state.d.ts.map +1 -0
  332. package/dist/domains/comet-classic/classic-state.js +238 -0
  333. package/dist/domains/comet-classic/classic-state.js.map +1 -0
  334. package/dist/domains/comet-classic/classic-store.d.ts +7 -0
  335. package/dist/domains/comet-classic/classic-store.d.ts.map +1 -0
  336. package/dist/domains/comet-classic/classic-store.js +127 -0
  337. package/dist/domains/comet-classic/classic-store.js.map +1 -0
  338. package/dist/domains/comet-classic/classic-transitions.d.ts +24 -0
  339. package/dist/domains/comet-classic/classic-transitions.d.ts.map +1 -0
  340. package/dist/domains/comet-classic/classic-transitions.js +124 -0
  341. package/dist/domains/comet-classic/classic-transitions.js.map +1 -0
  342. package/dist/domains/comet-classic/classic-validate-command.d.ts +3 -0
  343. package/dist/domains/comet-classic/classic-validate-command.d.ts.map +1 -0
  344. package/dist/domains/comet-classic/classic-validate-command.js +154 -0
  345. package/dist/domains/comet-classic/classic-validate-command.js.map +1 -0
  346. package/dist/domains/comet-classic/classic-validate-entry.d.ts +2 -0
  347. package/dist/domains/comet-classic/classic-validate-entry.d.ts.map +1 -0
  348. package/dist/domains/comet-classic/classic-validate-entry.js +4 -0
  349. package/dist/domains/comet-classic/classic-validate-entry.js.map +1 -0
  350. package/dist/domains/comet-classic/index.d.ts +20 -0
  351. package/dist/domains/comet-classic/index.d.ts.map +1 -0
  352. package/dist/domains/comet-classic/index.js +20 -0
  353. package/dist/domains/comet-classic/index.js.map +1 -0
  354. package/dist/domains/dashboard/collector.d.ts +12 -0
  355. package/dist/domains/dashboard/collector.d.ts.map +1 -0
  356. package/dist/domains/dashboard/collector.js +475 -0
  357. package/dist/domains/dashboard/collector.js.map +1 -0
  358. package/dist/domains/dashboard/git.d.ts +8 -0
  359. package/dist/domains/dashboard/git.d.ts.map +1 -0
  360. package/dist/domains/dashboard/git.js +69 -0
  361. package/dist/domains/dashboard/git.js.map +1 -0
  362. package/dist/domains/dashboard/next-action.d.ts +17 -0
  363. package/dist/domains/dashboard/next-action.d.ts.map +1 -0
  364. package/dist/domains/dashboard/next-action.js +83 -0
  365. package/dist/domains/dashboard/next-action.js.map +1 -0
  366. package/dist/domains/dashboard/open-browser.d.ts +9 -0
  367. package/dist/domains/dashboard/open-browser.d.ts.map +1 -0
  368. package/dist/domains/dashboard/open-browser.js +40 -0
  369. package/dist/domains/dashboard/open-browser.js.map +1 -0
  370. package/dist/domains/dashboard/risk.d.ts +24 -0
  371. package/dist/domains/dashboard/risk.d.ts.map +1 -0
  372. package/dist/domains/dashboard/risk.js +97 -0
  373. package/dist/domains/dashboard/risk.js.map +1 -0
  374. package/dist/domains/dashboard/server.d.ts +21 -0
  375. package/dist/domains/dashboard/server.d.ts.map +1 -0
  376. package/dist/domains/dashboard/server.js +149 -0
  377. package/dist/domains/dashboard/server.js.map +1 -0
  378. package/dist/domains/dashboard/task-parser.d.ts +13 -0
  379. package/dist/domains/dashboard/task-parser.d.ts.map +1 -0
  380. package/dist/domains/dashboard/task-parser.js +82 -0
  381. package/dist/domains/dashboard/task-parser.js.map +1 -0
  382. package/dist/domains/dashboard/types.d.ts +122 -0
  383. package/dist/domains/dashboard/types.d.ts.map +1 -0
  384. package/dist/domains/dashboard/types.js +10 -0
  385. package/dist/domains/dashboard/types.js.map +1 -0
  386. package/dist/domains/dashboard/verify-parser.d.ts +18 -0
  387. package/dist/domains/dashboard/verify-parser.d.ts.map +1 -0
  388. package/dist/domains/dashboard/verify-parser.js +94 -0
  389. package/dist/domains/dashboard/verify-parser.js.map +1 -0
  390. package/dist/domains/dashboard/web/assets/demo-DQyfozbi.js +1 -0
  391. package/dist/domains/dashboard/web/assets/index-BcO3_QlT.css +1 -0
  392. package/dist/domains/dashboard/web/assets/index-CjU3VXVu.js +22 -0
  393. package/dist/domains/dashboard/web/favicon.png +0 -0
  394. package/dist/domains/dashboard/web/index.html +16 -0
  395. package/dist/domains/dashboard/yaml.d.ts +13 -0
  396. package/dist/domains/dashboard/yaml.d.ts.map +1 -0
  397. package/dist/domains/dashboard/yaml.js +61 -0
  398. package/dist/domains/dashboard/yaml.js.map +1 -0
  399. package/dist/domains/engine/evals.d.ts +4 -0
  400. package/dist/domains/engine/evals.d.ts.map +1 -0
  401. package/dist/domains/engine/evals.js +25 -0
  402. package/dist/domains/engine/evals.js.map +1 -0
  403. package/dist/domains/engine/guardrails.d.ts +10 -0
  404. package/dist/domains/engine/guardrails.d.ts.map +1 -0
  405. package/dist/domains/engine/guardrails.js +25 -0
  406. package/dist/domains/engine/guardrails.js.map +1 -0
  407. package/dist/domains/engine/loop.d.ts +15 -0
  408. package/dist/domains/engine/loop.d.ts.map +1 -0
  409. package/dist/domains/engine/loop.js +126 -0
  410. package/dist/domains/engine/loop.js.map +1 -0
  411. package/dist/domains/engine/manual-run.d.ts +30 -0
  412. package/dist/domains/engine/manual-run.d.ts.map +1 -0
  413. package/dist/domains/engine/manual-run.js +184 -0
  414. package/dist/domains/engine/manual-run.js.map +1 -0
  415. package/dist/domains/engine/resolver.d.ts +20 -0
  416. package/dist/domains/engine/resolver.d.ts.map +1 -0
  417. package/dist/domains/engine/resolver.js +36 -0
  418. package/dist/domains/engine/resolver.js.map +1 -0
  419. package/dist/domains/engine/run-store.d.ts +13 -0
  420. package/dist/domains/engine/run-store.d.ts.map +1 -0
  421. package/dist/domains/engine/run-store.js +100 -0
  422. package/dist/domains/engine/run-store.js.map +1 -0
  423. package/dist/domains/engine/runtime-types.d.ts +11 -0
  424. package/dist/domains/engine/runtime-types.d.ts.map +1 -0
  425. package/dist/domains/engine/runtime-types.js +2 -0
  426. package/dist/domains/engine/runtime-types.js.map +1 -0
  427. package/dist/domains/engine/standalone-run.d.ts +13 -0
  428. package/dist/domains/engine/standalone-run.d.ts.map +1 -0
  429. package/dist/domains/engine/standalone-run.js +27 -0
  430. package/dist/domains/engine/standalone-run.js.map +1 -0
  431. package/dist/domains/engine/state.d.ts +10 -0
  432. package/dist/domains/engine/state.d.ts.map +1 -0
  433. package/dist/domains/engine/state.js +160 -0
  434. package/dist/domains/engine/state.js.map +1 -0
  435. package/dist/domains/engine/types.d.ts +51 -0
  436. package/dist/domains/engine/types.d.ts.map +1 -0
  437. package/dist/domains/engine/types.js +2 -0
  438. package/dist/domains/engine/types.js.map +1 -0
  439. package/dist/domains/eval/index.d.ts +7 -0
  440. package/dist/domains/eval/index.d.ts.map +1 -0
  441. package/dist/domains/eval/index.js +11 -0
  442. package/dist/domains/eval/index.js.map +1 -0
  443. package/dist/domains/eval/repository-benchmarks.d.ts +6 -0
  444. package/dist/domains/eval/repository-benchmarks.d.ts.map +1 -0
  445. package/dist/domains/eval/repository-benchmarks.js +10 -0
  446. package/dist/domains/eval/repository-benchmarks.js.map +1 -0
  447. package/dist/domains/factory/artifacts.d.ts +53 -0
  448. package/dist/domains/factory/artifacts.d.ts.map +1 -0
  449. package/dist/domains/factory/artifacts.js +8 -0
  450. package/dist/domains/factory/artifacts.js.map +1 -0
  451. package/dist/domains/factory/package.d.ts +7 -0
  452. package/dist/domains/factory/package.d.ts.map +1 -0
  453. package/dist/domains/factory/package.js +1511 -0
  454. package/dist/domains/factory/package.js.map +1 -0
  455. package/dist/domains/factory/types.d.ts +127 -0
  456. package/dist/domains/factory/types.d.ts.map +1 -0
  457. package/dist/domains/factory/types.js +2 -0
  458. package/dist/domains/factory/types.js.map +1 -0
  459. package/dist/domains/integrations/codegraph.d.ts +6 -0
  460. package/dist/domains/integrations/codegraph.d.ts.map +1 -0
  461. package/dist/domains/integrations/codegraph.js +118 -0
  462. package/dist/domains/integrations/codegraph.js.map +1 -0
  463. package/dist/domains/integrations/openspec.d.ts +18 -0
  464. package/dist/domains/integrations/openspec.d.ts.map +1 -0
  465. package/dist/{core → domains/integrations}/openspec.js +114 -31
  466. package/dist/domains/integrations/openspec.js.map +1 -0
  467. package/dist/domains/integrations/superpowers.d.ts +21 -0
  468. package/dist/domains/integrations/superpowers.d.ts.map +1 -0
  469. package/dist/{core → domains/integrations}/superpowers.js +63 -14
  470. package/dist/domains/integrations/superpowers.js.map +1 -0
  471. package/dist/domains/skill/discovery.d.ts +17 -0
  472. package/dist/domains/skill/discovery.d.ts.map +1 -0
  473. package/dist/domains/skill/discovery.js +80 -0
  474. package/dist/domains/skill/discovery.js.map +1 -0
  475. package/dist/domains/skill/find.d.ts +41 -0
  476. package/dist/domains/skill/find.d.ts.map +1 -0
  477. package/dist/domains/skill/find.js +251 -0
  478. package/dist/domains/skill/find.js.map +1 -0
  479. package/dist/domains/skill/install.d.ts +11 -0
  480. package/dist/domains/skill/install.d.ts.map +1 -0
  481. package/dist/domains/skill/install.js +82 -0
  482. package/dist/domains/skill/install.js.map +1 -0
  483. package/dist/domains/skill/inventory.d.ts +19 -0
  484. package/dist/domains/skill/inventory.d.ts.map +1 -0
  485. package/dist/domains/skill/inventory.js +64 -0
  486. package/dist/domains/skill/inventory.js.map +1 -0
  487. package/dist/domains/skill/languages.d.ts +19 -0
  488. package/dist/domains/skill/languages.d.ts.map +1 -0
  489. package/dist/domains/skill/languages.js +21 -0
  490. package/dist/domains/skill/languages.js.map +1 -0
  491. package/dist/domains/skill/load.d.ts +5 -0
  492. package/dist/domains/skill/load.d.ts.map +1 -0
  493. package/dist/domains/skill/load.js +313 -0
  494. package/dist/domains/skill/load.js.map +1 -0
  495. package/dist/domains/skill/platform-install.d.ts +87 -0
  496. package/dist/domains/skill/platform-install.d.ts.map +1 -0
  497. package/dist/{core/skills.js → domains/skill/platform-install.js} +242 -42
  498. package/dist/domains/skill/platform-install.js.map +1 -0
  499. package/dist/domains/skill/preferences.d.ts +42 -0
  500. package/dist/domains/skill/preferences.d.ts.map +1 -0
  501. package/dist/domains/skill/preferences.js +118 -0
  502. package/dist/domains/skill/preferences.js.map +1 -0
  503. package/dist/domains/skill/snapshot.d.ts +8 -0
  504. package/dist/domains/skill/snapshot.d.ts.map +1 -0
  505. package/dist/domains/skill/snapshot.js +184 -0
  506. package/dist/domains/skill/snapshot.js.map +1 -0
  507. package/dist/domains/skill/types.d.ts +85 -0
  508. package/dist/domains/skill/types.d.ts.map +1 -0
  509. package/dist/domains/skill/types.js +2 -0
  510. package/dist/{core → domains/skill}/types.js.map +1 -1
  511. package/dist/{core → domains/skill}/uninstall.d.ts +2 -18
  512. package/dist/domains/skill/uninstall.d.ts.map +1 -0
  513. package/dist/{core → domains/skill}/uninstall.js +15 -66
  514. package/dist/domains/skill/uninstall.js.map +1 -0
  515. package/dist/domains/skill/validate.d.ts +3 -0
  516. package/dist/domains/skill/validate.d.ts.map +1 -0
  517. package/dist/domains/skill/validate.js +81 -0
  518. package/dist/domains/skill/validate.js.map +1 -0
  519. package/dist/domains/workflow-contract/builtins.d.ts +8 -0
  520. package/dist/domains/workflow-contract/builtins.d.ts.map +1 -0
  521. package/dist/domains/workflow-contract/builtins.js +229 -0
  522. package/dist/domains/workflow-contract/builtins.js.map +1 -0
  523. package/dist/domains/workflow-contract/hash.d.ts +3 -0
  524. package/dist/domains/workflow-contract/hash.d.ts.map +1 -0
  525. package/dist/domains/workflow-contract/hash.js +16 -0
  526. package/dist/domains/workflow-contract/hash.js.map +1 -0
  527. package/dist/domains/workflow-contract/index.d.ts +6 -0
  528. package/dist/domains/workflow-contract/index.d.ts.map +1 -0
  529. package/dist/domains/workflow-contract/index.js +5 -0
  530. package/dist/domains/workflow-contract/index.js.map +1 -0
  531. package/dist/domains/workflow-contract/normalize.d.ts +3 -0
  532. package/dist/domains/workflow-contract/normalize.d.ts.map +1 -0
  533. package/dist/domains/workflow-contract/normalize.js +146 -0
  534. package/dist/domains/workflow-contract/normalize.js.map +1 -0
  535. package/dist/domains/workflow-contract/types.d.ts +128 -0
  536. package/dist/domains/workflow-contract/types.d.ts.map +1 -0
  537. package/dist/domains/workflow-contract/types.js +2 -0
  538. package/dist/domains/workflow-contract/types.js.map +1 -0
  539. package/dist/domains/workflow-contract/validation.d.ts +3 -0
  540. package/dist/domains/workflow-contract/validation.d.ts.map +1 -0
  541. package/dist/domains/workflow-contract/validation.js +180 -0
  542. package/dist/domains/workflow-contract/validation.js.map +1 -0
  543. package/dist/platform/fs/file-system.d.ts.map +1 -0
  544. package/dist/platform/fs/file-system.js.map +1 -0
  545. package/dist/{core → platform/install}/detect.d.ts +6 -1
  546. package/dist/platform/install/detect.d.ts.map +1 -0
  547. package/dist/{core → platform/install}/detect.js +32 -14
  548. package/dist/platform/install/detect.js.map +1 -0
  549. package/dist/platform/install/platforms.d.ts.map +1 -0
  550. package/dist/{core → platform/install}/platforms.js +41 -0
  551. package/dist/platform/install/platforms.js.map +1 -0
  552. package/dist/platform/install/types.d.ts +3 -0
  553. package/dist/platform/install/types.d.ts.map +1 -0
  554. package/dist/platform/install/types.js +2 -0
  555. package/dist/platform/install/types.js.map +1 -0
  556. package/dist/platform/paths/repository-layout.d.ts +22 -0
  557. package/dist/platform/paths/repository-layout.d.ts.map +1 -0
  558. package/dist/platform/paths/repository-layout.js +11 -0
  559. package/dist/platform/paths/repository-layout.js.map +1 -0
  560. package/dist/platform/process/command-error.d.ts.map +1 -0
  561. package/dist/platform/process/command-error.js.map +1 -0
  562. package/dist/platform/process/shell-quote.d.ts +22 -0
  563. package/dist/platform/process/shell-quote.d.ts.map +1 -0
  564. package/dist/platform/process/shell-quote.js +34 -0
  565. package/dist/platform/process/shell-quote.js.map +1 -0
  566. package/dist/platform/version/version.d.ts.map +1 -0
  567. package/dist/{core → platform/version}/version.js +16 -3
  568. package/dist/platform/version/version.js.map +1 -0
  569. package/package.json +40 -14
  570. package/assets/skills/comet/scripts/comet-archive.sh +0 -311
  571. package/assets/skills/comet/scripts/comet-env.sh +0 -110
  572. package/assets/skills/comet/scripts/comet-guard.sh +0 -752
  573. package/assets/skills/comet/scripts/comet-handoff.sh +0 -390
  574. package/assets/skills/comet/scripts/comet-hook-guard.sh +0 -260
  575. package/assets/skills/comet/scripts/comet-state.sh +0 -1245
  576. package/assets/skills/comet/scripts/comet-yaml-validate.sh +0 -223
  577. package/dist/cli/index.js +0 -83
  578. package/dist/cli/index.js.map +0 -1
  579. package/dist/commands/doctor.d.ts.map +0 -1
  580. package/dist/commands/doctor.js.map +0 -1
  581. package/dist/commands/init.d.ts.map +0 -1
  582. package/dist/commands/init.js +0 -300
  583. package/dist/commands/init.js.map +0 -1
  584. package/dist/commands/status.d.ts.map +0 -1
  585. package/dist/commands/status.js +0 -108
  586. package/dist/commands/status.js.map +0 -1
  587. package/dist/commands/uninstall.d.ts.map +0 -1
  588. package/dist/commands/uninstall.js.map +0 -1
  589. package/dist/commands/update.d.ts.map +0 -1
  590. package/dist/commands/update.js.map +0 -1
  591. package/dist/core/codegraph.d.ts +0 -4
  592. package/dist/core/codegraph.d.ts.map +0 -1
  593. package/dist/core/codegraph.js +0 -63
  594. package/dist/core/codegraph.js.map +0 -1
  595. package/dist/core/command-error.d.ts.map +0 -1
  596. package/dist/core/command-error.js.map +0 -1
  597. package/dist/core/detect.d.ts.map +0 -1
  598. package/dist/core/detect.js.map +0 -1
  599. package/dist/core/openspec.d.ts +0 -11
  600. package/dist/core/openspec.d.ts.map +0 -1
  601. package/dist/core/openspec.js.map +0 -1
  602. package/dist/core/platforms.d.ts.map +0 -1
  603. package/dist/core/platforms.js.map +0 -1
  604. package/dist/core/skills.d.ts +0 -58
  605. package/dist/core/skills.d.ts.map +0 -1
  606. package/dist/core/skills.js.map +0 -1
  607. package/dist/core/superpowers.d.ts +0 -13
  608. package/dist/core/superpowers.d.ts.map +0 -1
  609. package/dist/core/superpowers.js.map +0 -1
  610. package/dist/core/types.d.ts +0 -2
  611. package/dist/core/types.d.ts.map +0 -1
  612. package/dist/core/uninstall.d.ts.map +0 -1
  613. package/dist/core/uninstall.js.map +0 -1
  614. package/dist/core/version.d.ts.map +0 -1
  615. package/dist/core/version.js.map +0 -1
  616. package/dist/utils/file-system.d.ts.map +0 -1
  617. package/dist/utils/file-system.js.map +0 -1
  618. /package/dist/{cli → app/cli}/index.d.ts +0 -0
  619. /package/dist/{commands → app/commands}/status.d.ts +0 -0
  620. /package/dist/{core → domains/bundle}/types.js +0 -0
  621. /package/dist/{utils → platform/fs}/file-system.d.ts +0 -0
  622. /package/dist/{utils → platform/fs}/file-system.js +0 -0
  623. /package/dist/{core → platform/install}/platforms.d.ts +0 -0
  624. /package/dist/{core → platform/process}/command-error.d.ts +0 -0
  625. /package/dist/{core → platform/process}/command-error.js +0 -0
  626. /package/dist/{core → platform/version}/version.d.ts +0 -0
  627. /package/scripts/{postinstall.js → install/postinstall.js} +0 -0
@@ -0,0 +1,38 @@
1
+ import { type Theme } from '@inquirer/core';
2
+ import type { PartialDeep } from '@inquirer/type';
3
+ export type PlatformSelectChoice<Value extends string> = {
4
+ name: string;
5
+ summaryName?: string;
6
+ value: Value;
7
+ checked?: boolean;
8
+ };
9
+ type PlatformSelectTheme = {
10
+ icon: {
11
+ checked: string;
12
+ unchecked: string;
13
+ cursor: string;
14
+ };
15
+ style: {
16
+ selectedSummary: (text: string) => string;
17
+ keysHelpTip: (keys: [key: string, action: string][]) => string | undefined;
18
+ };
19
+ };
20
+ export type PlatformSelectPromptConfig<Value extends string> = {
21
+ message: string;
22
+ choices: readonly PlatformSelectChoice<Value>[];
23
+ selectedLabel: string;
24
+ emptyLabel: string;
25
+ requiredErrorLabel?: string;
26
+ required?: boolean;
27
+ pageSize?: number;
28
+ theme?: PartialDeep<Theme<PlatformSelectTheme>>;
29
+ };
30
+ export declare function getSelectedChoiceNames<Value extends string>(choices: readonly PlatformSelectChoice<Value>[]): string[];
31
+ export declare function formatSelectedSummary(selectedLabel: string, names: readonly string[], emptyLabel: string): string;
32
+ export declare function renderSelectedSummaryLine(selectedLabel: string, names: readonly string[], emptyLabel: string): string;
33
+ export declare function toggleChoice<Value extends string>(choices: readonly PlatformSelectChoice<Value>[], value: Value): PlatformSelectChoice<Value>[];
34
+ export declare function selectAllChoices<Value extends string>(choices: readonly PlatformSelectChoice<Value>[]): PlatformSelectChoice<Value>[];
35
+ export declare function invertChoices<Value extends string>(choices: readonly PlatformSelectChoice<Value>[]): PlatformSelectChoice<Value>[];
36
+ export declare function platformSelectPrompt<Value extends string>(config: PlatformSelectPromptConfig<Value>): Promise<Value[]>;
37
+ export {};
38
+ //# sourceMappingURL=platform-select-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-select-prompt.d.ts","sourceRoot":"","sources":["../../../app/commands/platform-select-prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAWL,KAAK,KAAK,EACX,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,MAAM,oBAAoB,CAAC,KAAK,SAAS,MAAM,IAAI;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;QAC1C,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,MAAM,GAAG,SAAS,CAAC;KAC5E,CAAC;CACH,CAAC;AAgCF,MAAM,MAAM,0BAA0B,CAAC,KAAK,SAAS,MAAM,IAAI;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,SAAS,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACn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{ createPrompt, isDownKey, isEnterKey, isSpaceKey, isUpKey, makeTheme, useKeypress, usePagination, usePrefix, useState, } from '@inquirer/core';
3
+ import figures from '@inquirer/figures';
4
+ import { styleText } from 'node:util';
5
+ const platformSelectTheme = {
6
+ prefix: {
7
+ idle: styleText('cyan', '?'),
8
+ done: styleText('green', '✔'),
9
+ },
10
+ spinner: {
11
+ interval: 80,
12
+ frames: ['-', '\\', '|', '/'],
13
+ },
14
+ style: {
15
+ answer: (text) => styleText('cyan', text),
16
+ message: (text) => styleText('bold', text),
17
+ error: (text) => styleText('red', text),
18
+ defaultAnswer: (text) => styleText('dim', text),
19
+ help: (text) => styleText('dim', text),
20
+ highlight: (text) => styleText('cyan', text),
21
+ key: (text) => styleText('cyan', text),
22
+ selectedSummary: (text) => text,
23
+ keysHelpTip: (keys) => keys
24
+ .map(([key, action]) => `${styleText('bold', key)} ${styleText('dim', action)}`)
25
+ .join(styleText('dim', ' • ')),
26
+ },
27
+ icon: {
28
+ checked: styleText('green', figures.circleFilled),
29
+ unchecked: figures.circle,
30
+ cursor: figures.pointer,
31
+ },
32
+ };
33
+ export function getSelectedChoiceNames(choices) {
34
+ return choices
35
+ .filter((choice) => choice.checked === true)
36
+ .map((choice) => choice.summaryName ?? choice.name);
37
+ }
38
+ export function formatSelectedSummary(selectedLabel, names, emptyLabel) {
39
+ return `${selectedLabel} ${names.length > 0 ? names.join(', ') : emptyLabel}`;
40
+ }
41
+ export function renderSelectedSummaryLine(selectedLabel, names, emptyLabel) {
42
+ return ` ${formatSelectedSummary(selectedLabel, names, emptyLabel)}`;
43
+ }
44
+ export function toggleChoice(choices, value) {
45
+ return choices.map((choice) => choice.value === value ? { ...choice, checked: choice.checked !== true } : choice);
46
+ }
47
+ export function selectAllChoices(choices) {
48
+ return choices.map((choice) => ({ ...choice, checked: true }));
49
+ }
50
+ export function invertChoices(choices) {
51
+ return choices.map((choice) => ({ ...choice, checked: choice.checked !== true }));
52
+ }
53
+ const platformSelectPromptBase = createPrompt((config, done) => {
54
+ const theme = makeTheme(platformSelectTheme, config.theme);
55
+ const { pageSize = 7, required = false } = config;
56
+ const [status, setStatus] = useState('idle');
57
+ const [items, setItems] = useState(config.choices.map((choice) => ({ ...choice, checked: choice.checked === true })));
58
+ const [active, setActive] = useState(0);
59
+ const [errorMsg, setError] = useState();
60
+ const prefix = usePrefix({ status, theme });
61
+ useKeypress((key) => {
62
+ if (isEnterKey(key)) {
63
+ const selected = items.filter((item) => item.checked === true);
64
+ if (required && selected.length === 0) {
65
+ setError(config.requiredErrorLabel ?? 'At least one choice must be selected');
66
+ return;
67
+ }
68
+ setStatus('done');
69
+ done(selected.map((item) => item.value));
70
+ return;
71
+ }
72
+ if (items.length === 0) {
73
+ return;
74
+ }
75
+ if (isUpKey(key) || isDownKey(key)) {
76
+ const offset = isUpKey(key) ? -1 : 1;
77
+ setActive((active + offset + items.length) % items.length);
78
+ setError(undefined);
79
+ return;
80
+ }
81
+ if (isSpaceKey(key)) {
82
+ const activeItem = items[active];
83
+ if (activeItem) {
84
+ setItems(toggleChoice(items, activeItem.value));
85
+ setError(undefined);
86
+ }
87
+ return;
88
+ }
89
+ if (key.name === 'a') {
90
+ const hasUnchecked = items.some((item) => item.checked !== true);
91
+ setItems(hasUnchecked
92
+ ? selectAllChoices(items)
93
+ : items.map((item) => ({ ...item, checked: false })));
94
+ setError(undefined);
95
+ return;
96
+ }
97
+ if (key.name === 'i') {
98
+ setItems(invertChoices(items));
99
+ setError(undefined);
100
+ }
101
+ });
102
+ const selectedNames = getSelectedChoiceNames(items);
103
+ const message = theme.style.message(config.message, status);
104
+ const page = usePagination({
105
+ items,
106
+ active,
107
+ pageSize,
108
+ loop: true,
109
+ renderItem({ item, isActive }) {
110
+ const cursor = isActive ? theme.icon.cursor : ' ';
111
+ const checkbox = item.checked === true ? theme.icon.checked : theme.icon.unchecked;
112
+ const line = `${cursor}${checkbox} ${item.name}`;
113
+ return isActive ? theme.style.highlight(line) : line;
114
+ },
115
+ });
116
+ if (status === 'done') {
117
+ return [prefix, message, theme.style.answer(selectedNames.join(', '))].join(' ');
118
+ }
119
+ const summary = theme.style.selectedSummary(renderSelectedSummaryLine(config.selectedLabel, selectedNames, config.emptyLabel));
120
+ const helpLine = theme.style.keysHelpTip([
121
+ ['↑↓', 'navigate'],
122
+ ['space', 'select'],
123
+ ['a', 'all'],
124
+ ['i', 'invert'],
125
+ ['⏎', 'submit'],
126
+ ]);
127
+ return `${[
128
+ [prefix, message].join(' '),
129
+ summary,
130
+ items.length > 0 ? page : '',
131
+ errorMsg ? theme.style.error(errorMsg) : '',
132
+ helpLine,
133
+ ]
134
+ .filter(Boolean)
135
+ .join('\n')
136
+ .trimEnd()}${cursorHide}`;
137
+ });
138
+ export async function platformSelectPrompt(config) {
139
+ return (await platformSelectPromptBase(config));
140
+ }
141
+ //# sourceMappingURL=platform-select-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-select-prompt.js","sourceRoot":"","sources":["../../../app/commands/platform-select-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,EACV,OAAO,EACP,SAAS,EACT,WAAW,EACX,aAAa,EACb,SAAS,EACT,QAAQ,GAET,MAAM,gBAAgB,CAAC;AACxB,OAAO,OAAO,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAqBtC,MAAM,mBAAmB,GAA+B;IACtD,MAAM,EAAE;QACN,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC;QAC5B,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC;KAC9B;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC;KAC9B;IACD,KAAK,EAAE;QACL,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KAAK,CAAC,eAAe,CACzC,yBAAyB,CAAC,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,MAAM,CAAC,UAAU,CAAC,CAClF,CAAC;IACF,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC;QACvC,CAAC,IAAI,EAAE,UAAU,CAAC;QAClB,CAAC,OAAO,EAAE,QAAQ,CAAC;QACnB,CAAC,GAAG,EAAE,KAAK,CAAC;QACZ,CAAC,GAAG,EAAE,QAAQ,CAAC;QACf,CAAC,GAAG,EAAE,QAAQ,CAAC;KAChB,CAAC,CAAC;IAEH,OAAO,GAAG;QACR,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC3B,OAAO;QACP,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QAC5B,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;QAC3C,QAAQ;KACT;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,IAAI,CAAC;SACV,OAAO,EAAE,GAAG,UAAU,EAAE,CAAC;AAC9B,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAyC;IAEzC,OAAO,CAAC,MAAM,wBAAwB,CAAC,MAA4C,CAAC,CAAY,CAAC;AACnG,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type BundleCommandOptions } from './bundle.js';
2
+ export type PublishCommandOptions = BundleCommandOptions;
3
+ export declare function publishReviewCommand(name: string, options?: PublishCommandOptions): Promise<void>;
4
+ export declare function publishApproveCommand(name: string, options?: PublishCommandOptions): Promise<void>;
5
+ export declare function publishRunCommand(name: string, options?: PublishCommandOptions): Promise<void>;
6
+ export declare function publishDistributeCommand(name: string, options?: PublishCommandOptions): Promise<void>;
7
+ //# sourceMappingURL=publish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../app/commands/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,oBAAoB,EAC1B,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;AAEzD,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,IAAI,CAAC,CAEf"}
@@ -0,0 +1,14 @@
1
+ import { bundleDistributeCommand, bundlePublishCommand, bundleReviewCommand, bundleReviewSummaryCommand, } from './bundle.js';
2
+ export async function publishReviewCommand(name, options = {}) {
3
+ await bundleReviewSummaryCommand(name, options);
4
+ }
5
+ export async function publishApproveCommand(name, options = {}) {
6
+ await bundleReviewCommand(name, { ...options, approve: true, reject: false });
7
+ }
8
+ export async function publishRunCommand(name, options = {}) {
9
+ await bundlePublishCommand(name, options);
10
+ }
11
+ export async function publishDistributeCommand(name, options = {}) {
12
+ await bundleDistributeCommand(name, options);
13
+ }
14
+ //# sourceMappingURL=publish.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../app/commands/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,GAE3B,MAAM,aAAa,CAAC;AAIrB,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,IAAY,EACZ,UAAiC,EAAE;IAEnC,MAAM,0BAA0B,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,IAAY,EACZ,UAAiC,EAAE;IAEnC,MAAM,mBAAmB,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAChF,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAAY,EACZ,UAAiC,EAAE;IAEnC,MAAM,oBAAoB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,IAAY,EACZ,UAAiC,EAAE;IAEnC,MAAM,uBAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,23 @@
1
+ interface SkillCommandOptions {
2
+ project?: string;
3
+ json?: boolean;
4
+ overwrite?: boolean;
5
+ change?: string;
6
+ runId?: string;
7
+ status?: 'succeeded' | 'failed';
8
+ summary?: string;
9
+ artifact?: string[];
10
+ state?: string[];
11
+ confirm?: string[];
12
+ upgrade?: string;
13
+ scope?: 'progress' | 'step' | 'completion';
14
+ }
15
+ export declare function skillValidateCommand(selector: string, options?: SkillCommandOptions): Promise<void>;
16
+ export declare function skillInspectCommand(selector: string, options?: SkillCommandOptions): Promise<void>;
17
+ export declare function skillShowCommand(selector: string, options?: SkillCommandOptions): Promise<void>;
18
+ export declare function skillInstallCommand(source: string, options?: SkillCommandOptions): Promise<void>;
19
+ export declare function skillRunCommand(selector: string, options?: SkillCommandOptions): Promise<void>;
20
+ export declare function skillResumeCommand(options?: SkillCommandOptions): Promise<void>;
21
+ export declare function skillCheckCommand(options?: SkillCommandOptions): Promise<void>;
22
+ export type { SkillCommandOptions };
23
+ //# s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O,CAAC,IAAI,CAAC,CAoDzF;AAED,wBAAsB,iBAAiB,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBxF;AAED,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,208 @@
1
+ import path from 'path';
2
+ import { evaluateManualRun, resumeManualRun, startManualRun, upgradeManualRun, } from '../../domains/engine/manual-run.js';
3
+ import { evaluateStandaloneRun, resumeStandaloneRun, startStandaloneRun, upgradeStandaloneRun, } from '../../domains/engine/standalone-run.js';
4
+ import { resolveSkill } from '../../domains/skill/discovery.js';
5
+ import { installProjectSkill } from '../../domains/skill/install.js';
6
+ function projectRoot(options) {
7
+ return path.resolve(options.project ?? '.');
8
+ }
9
+ function emit(value, json, text) {
10
+ console.log(json ? JSON.stringify(value, null, 2) : text);
11
+ }
12
+ function changeDir(options) {
13
+ if (!options.change)
14
+ throw new Error('--change is required');
15
+ return path.resolve(options.change);
16
+ }
17
+ function assertSingleRunTarget(options) {
18
+ if (Boolean(options.change) === Boolean(options.runId)) {
19
+ throw new Error('Pass exactly one of --change or --run-id');
20
+ }
21
+ }
22
+ function keyValuePairs(values, label) {
23
+ return Object.fromEntries((values ?? []).map((value) => {
24
+ const separator = value.indexOf('=');
25
+ if (separator <= 0 || separator === value.length - 1) {
26
+ throw new Error(`${label} must use key=value: ${value}`);
27
+ }
28
+ return [value.slice(0, separator), value.slice(separator + 1)];
29
+ }));
30
+ }
31
+ function hasValues(values) {
32
+ return Boolean(values && values.length > 0);
33
+ }
34
+ function runtimeChecks(evals) {
35
+ return evals.map((evaluation) => ({
36
+ checkId: evaluation.evalId,
37
+ passed: evaluation.passed,
38
+ ...(evaluation.evidence === undefined ? {} : { evidence: evaluation.evidence }),
39
+ }));
40
+ }
41
+ function runCommandResult(result) {
42
+ const { evals, ...rest } = result;
43
+ return {
44
+ ...rest,
45
+ checks: runtimeChecks(evals),
46
+ };
47
+ }
48
+ function runText(result) {
49
+ const next = result.action
50
+ ? 'Next: complete the pending action, then run comet skill continue'
51
+ : result.evals.some((evaluation) => !evaluation.passed)
52
+ ? 'Next: record the missing artifact/state and rerun comet skill check'
53
+ : 'Next: none';
54
+ return [
55
+ `Run: ${result.state.runId}`,
56
+ `Status: ${result.state.status}`,
57
+ `Current step: ${result.state.currentStep ?? '(complete)'}`,
58
+ result.action
59
+ ? `Pending action: ${result.action.id} (${result.action.type}, step ${result.action.stepId ?? 'adaptive'})`
60
+ : 'Pending action: none',
61
+ `Runtime checks: ${result.evals.length}`,
62
+ next,
63
+ ...(result.reason ? [`Reason: ${result.reason}`] : []),
64
+ ].join('\n');
65
+ }
66
+ function inspectResult(selector, options) {
67
+ return resolveSkill(selector, { projectRoot: projectRoot(options) }).then((resolved) => {
68
+ const { definition, guardrails, evals } = resolved.package;
69
+ return {
70
+ valid: true,
71
+ name: resolved.name,
72
+ version: resolved.version,
73
+ origin: resolved.origin,
74
+ root: resolved.root,
75
+ hash: resolved.hash,
76
+ description: definition.metadata.description,
77
+ goal: definition.goal,
78
+ orchestration: definition.orchestration,
79
+ skills: definition.skills,
80
+ agents: definition.agents,
81
+ tools: definition.tools,
82
+ guardrails,
83
+ checks: evals.map(({ id, ...evaluation }) => ({
84
+ checkId: id,
85
+ ...evaluation,
86
+ })),
87
+ };
88
+ });
89
+ }
90
+ export async function skillValidateCommand(selector, options = {}) {
91
+ const resolved = await resolveSkill(selector, { projectRoot: projectRoot(options) });
92
+ const result = {
93
+ valid: true,
94
+ name: resolved.name,
95
+ version: resolved.version,
96
+ origin: resolved.origin,
97
+ root: resolved.root,
98
+ hash: resolved.hash,
99
+ };
100
+ emit(result, options.json, `Valid Comet Skill: ${result.name}@${result.version} (${result.origin})\nHash: ${result.hash}\nRoot: ${result.root}`);
101
+ }
102
+ export async function skillInspectCommand(selector, options = {}) {
103
+ const result = await inspectResult(selector, options);
104
+ emit(result, options.json, [
105
+ `${result.name}@${result.version} (${result.origin})`,
106
+ result.description,
107
+ `Root: ${result.root}`,
108
+ `Hash: ${result.hash}`,
109
+ `Orchestration: ${result.orchestration.mode}`,
110
+ `Steps: ${result.orchestration.steps?.length ?? 0}`,
111
+ `Skills: ${result.skills.length}`,
112
+ `Agents: ${result.agents.length}`,
113
+ `Tools: ${result.tools.length}`,
114
+ `Runtime checks: ${result.checks.length}`,
115
+ ].join('\n'));
116
+ }
117
+ export async function skillShowCommand(selector, options = {}) {
118
+ const result = await inspectResult(selector, options);
119
+ emit(result, options.json, [
120
+ `Valid Comet Skill: ${result.name}@${result.version} (${result.origin})`,
121
+ result.description,
122
+ `Root: ${result.root}`,
123
+ `Hash: ${result.hash}`,
124
+ `Orchestration: ${result.orchestration.mode}`,
125
+ `Steps: ${result.orchestration.steps?.length ?? 0}`,
126
+ `Skills: ${result.skills.length}`,
127
+ `Agents: ${result.agents.length}`,
128
+ `Tools: ${result.tools.length}`,
129
+ `Runtime checks: ${result.checks.length}`,
130
+ ].join('\n'));
131
+ }
132
+ export async function skillInstallCommand(source, options = {}) {
133
+ const result = await installProjectSkill(source, projectRoot(options), {
134
+ overwrite: options.overwrite,
135
+ });
136
+ emit(result, options.json, `Installed ${result.name}@${result.version}\nHash: ${result.hash}\nDestination: ${result.destination}`);
137
+ }
138
+ export async function skillRunCommand(selector, options = {}) {
139
+ assertSingleRunTarget(options);
140
+ const resolved = await resolveSkill(selector, { projectRoot: projectRoot(options) });
141
+ const result = options.runId
142
+ ? await startStandaloneRun(resolved.package, {
143
+ projectRoot: projectRoot(options),
144
+ runId: options.runId,
145
+ confirmations: options.confirm ?? [],
146
+ })
147
+ : await startManualRun(resolved.package, changeDir(options), options.confirm ?? []);
148
+ emit(runCommandResult(result), options.json, runText(result));
149
+ }
150
+ export async function skillResumeCommand(options = {}) {
151
+ assertSingleRunTarget(options);
152
+ const root = projectRoot(options);
153
+ const target = options.runId ? null : changeDir(options);
154
+ if (options.upgrade) {
155
+ if (options.status ||
156
+ options.summary ||
157
+ hasValues(options.artifact) ||
158
+ hasValues(options.state)) {
159
+ throw new Error('--upgrade cannot be combined with outcome options');
160
+ }
161
+ const resolved = await resolveSkill(options.upgrade, {
162
+ projectRoot: root,
163
+ });
164
+ const result = options.runId
165
+ ? await upgradeStandaloneRun(root, options.runId, resolved.package)
166
+ : await upgradeManualRun(target, resolved.package);
167
+ emit(result, options.json, `${result.changed ? 'Upgraded' : 'Unchanged'} ${result.state.skill}@${result.state.skillVersion}\nHash: ${result.state.skillHash}`);
168
+ return;
169
+ }
170
+ const hasOutcomeOptions = Boolean(options.summary || hasValues(options.artifact) || hasValues(options.state));
171
+ if (!options.status && hasOutcomeOptions) {
172
+ throw new Error('--summary, --artifact, and --state require --status');
173
+ }
174
+ if (options.status && !options.summary) {
175
+ throw new Error('--summary is required when submitting an outcome');
176
+ }
177
+ const resumeOptions = {
178
+ confirmations: options.confirm ?? [],
179
+ outcome: options.status
180
+ ? {
181
+ status: options.status,
182
+ summary: options.summary,
183
+ artifacts: keyValuePairs(options.artifact, '--artifact'),
184
+ state: keyValuePairs(options.state, '--state'),
185
+ }
186
+ : undefined,
187
+ };
188
+ const result = options.runId
189
+ ? await resumeStandaloneRun(root, options.runId, resumeOptions)
190
+ : await resumeManualRun(target, resumeOptions);
191
+ emit(runCommandResult(result), options.json, runText(result));
192
+ }
193
+ export async function skillCheckCommand(options = {}) {
194
+ assertSingleRunTarget(options);
195
+ const result = options.runId
196
+ ? await evaluateStandaloneRun(projectRoot(options), options.runId, options.scope ?? 'progress')
197
+ : await evaluateManualRun(changeDir(options), options.scope ?? 'progress');
198
+ const failed = result.evals.filter((evaluation) => !evaluation.passed);
199
+ emit(runCommandResult(result), options.json, [
200
+ `Run: ${result.state.runId}`,
201
+ `Scope: ${result.scope}`,
202
+ ...result.evals.map((evaluation) => `${evaluation.passed ? 'PASS' : 'FAIL'} ${evaluation.evalId}: ${evaluation.evidence}`),
203
+ ...(failed.length > 0
204
+ ? ['Next: record the missing artifact/state and rerun comet skill check']
205
+ : []),
206
+ ].join('\n'));
207
+ }
208
+ //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import { promises as fs } from 'fs';
3
+ import { fileExists, readDir } from '../../platform/fs/file-system.js';
4
+ import { inspectClassicChange } from '../../domains/comet-classic/classic-diagnostics.js';
5
+ import { readClassicState } from '../../domains/comet-classic/classic-store.js';
6
+ async function countTasks(tasksPath) {
7
+ if (!(await fileExists(tasksPath)))
8
+ return { done: 0, total: 0 };
9
+ const content = await fs.readFile(tasksPath, 'utf-8');
10
+ const lines = content.split('\n');
11
+ const total = lines.filter((l) => /^\s*- \[[ x]\]/.test(l)).length;
12
+ const done = lines.filter((l) => /^\s*- \[x\]/i.test(l)).length;
13
+ return { done, total };
14
+ }
15
+ async function getActiveChanges(projectPath) {
16
+ const changesDir = path.join(projectPath, 'openspec', 'changes');
17
+ if (!(await fileExists(changesDir)))
18
+ return [];
19
+ const entries = await readDir(changesDir);
20
+ const changes = [];
21
+ for (const entry of entries) {
22
+ if (entry === 'archive')
23
+ continue;
24
+ const changeDir = path.join(changesDir, entry);
25
+ const stat = await fs.stat(changeDir);
26
+ if (!stat.isDirectory())
27
+ continue;
28
+ const yamlPath = path.join(changeDir, '.comet.yaml');
29
+ if (!(await fileExists(yamlPath)))
30
+ continue;
31
+ try {
32
+ const projection = await readClassicState(changeDir);
33
+ if (projection.classic?.archived)
34
+ continue;
35
+ const { done, total } = await countTasks(path.join(changeDir, 'tasks.md'));
36
+ const diagnostic = await inspectClassicChange(changeDir, entry);
37
+ if (diagnostic.valid && projection.classic) {
38
+ changes.push({
39
+ name: entry,
40
+ workflow: diagnostic.workflow,
41
+ phase: diagnostic.phase,
42
+ buildMode: projection.classic.buildMode ?? 'null',
43
+ isolation: projection.classic.isolation ?? 'null',
44
+ verifyMode: projection.classic.verifyMode ?? 'null',
45
+ verifyResult: projection.classic.verifyResult,
46
+ designDoc: projection.classic.designDoc,
47
+ plan: projection.classic.plan,
48
+ tasksCompleted: done,
49
+ tasksTotal: total,
50
+ nextCommand: diagnostic.nextCommand,
51
+ currentStep: diagnostic.currentStep,
52
+ runtimeMode: diagnostic.runtimeMode,
53
+ runtimeEval: diagnostic.runtimeEval,
54
+ });
55
+ continue;
56
+ }
57
+ changes.push({
58
+ name: entry,
59
+ workflow: diagnostic.workflow,
60
+ phase: diagnostic.phase,
61
+ buildMode: projection.classic?.buildMode ?? 'null',
62
+ isolation: projection.classic?.isolation ?? 'null',
63
+ verifyMode: projection.classic?.verifyMode ?? 'null',
64
+ verifyResult: projection.classic?.verifyResult ?? 'pending',
65
+ designDoc: projection.classic?.designDoc ?? null,
66
+ plan: projection.classic?.plan ?? null,
67
+ tasksCompleted: done,
68
+ tasksTotal: total,
69
+ nextCommand: diagnostic.nextCommand,
70
+ currentStep: diagnostic.currentStep,
71
+ runtimeMode: diagnostic.runtimeMode,
72
+ runtimeEval: diagnostic.runtimeEval,
73
+ error: diagnostic.error,
74
+ });
75
+ }
76
+ catch (error) {
77
+ changes.push({
78
+ name: entry,
79
+ workflow: 'unknown',
80
+ phase: 'invalid',
81
+ buildMode: 'null',
82
+ isolation: 'null',
83
+ verifyMode: 'null',
84
+ verifyResult: 'pending',
85
+ designDoc: null,
86
+ plan: null,
87
+ tasksCompleted: 0,
88
+ tasksTotal: 0,
89
+ nextCommand: null,
90
+ currentStep: null,
91
+ runtimeMode: 'invalid',
92
+ runtimeEval: null,
93
+ error: error instanceof Error ? error.message : String(error),
94
+ });
95
+ }
96
+ }
97
+ return changes;
98
+ }
99
+ function formatMissingEvidence(missingEvidence) {
100
+ return missingEvidence.join(', ');
101
+ }
102
+ function formatRuntimeCheckRecovery(nextCommand, missingEvidence) {
103
+ const missing = formatMissingEvidence(missingEvidence);
104
+ if (nextCommand) {
105
+ return `run ${nextCommand} or restore missing evidence (${missing}), then rerun comet doctor`;
106
+ }
107
+ return `restore missing evidence (${missing}) and rerun comet doctor`;
108
+ }
109
+ function displayStatus(changes) {
110
+ if (changes.length === 0) {
111
+ console.log('No active changes.\n');
112
+ return;
113
+ }
114
+ console.log('Active Changes:\n');
115
+ for (let i = 0; i < changes.length; i++) {
116
+ const c = changes[i];
117
+ const taskStr = c.tasksTotal > 0 ? ` [${c.tasksCompleted}/${c.tasksTotal} tasks]` : '';
118
+ console.log(` ${i + 1}. ${c.name} [phase: ${c.phase}${taskStr}]`);
119
+ if (c.error) {
120
+ console.log(` error: ${c.error}`);
121
+ console.log(' next: inspect .comet.yaml and rerun comet doctor');
122
+ console.log();
123
+ continue;
124
+ }
125
+ console.log(` workflow: ${c.workflow} | build_mode: ${c.buildMode}`);
126
+ if (c.currentStep)
127
+ console.log(` run_step: ${c.currentStep}`);
128
+ console.log(` runtime_mode: ${c.runtimeMode}`);
129
+ if (c.runtimeEval) {
130
+ const suffix = c.runtimeEval.passed
131
+ ? `(${c.runtimeEval.stepId})`
132
+ : `(${c.runtimeEval.stepId}; missing: ${formatMissingEvidence(c.runtimeEval.missingEvidence)})`;
133
+ console.log(` runtime_check: ${c.runtimeEval.passed ? 'pass' : 'fail'} ${suffix}`);
134
+ }
135
+ if (c.designDoc)
136
+ console.log(` design: ${c.designDoc}`);
137
+ if (c.plan)
138
+ console.log(` plan: ${c.plan}`);
139
+ if (c.phase === 'verify')
140
+ console.log(` verify_result: ${c.verifyResult}`);
141
+ if (c.runtimeEval && !c.runtimeEval.passed) {
142
+ console.log(` next: ${formatRuntimeCheckRecovery(c.nextCommand, c.runtimeEval.missingEvidence)}`);
143
+ }
144
+ else if (c.nextCommand) {
145
+ console.log(` next: ${c.nextCommand}`);
146
+ }
147
+ console.log();
148
+ }
149
+ }
150
+ export async function statusCommand(targetPath, options = {}) {
151
+ const projectPath = path.resolve(targetPath);
152
+ const changes = await getActiveChanges(projectPath);
153
+ if (options.json) {
154
+ console.log(JSON.stringify({ changes }, null, 2));
155
+ return;
156
+ }
157
+ displayStatus(changes);
158
+ }
159
+ //# sourceMappingURL=status.js.map