usesteady 0.1.0-alpha.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 (665) hide show
  1. package/LICENSE +186 -0
  2. package/README.md +724 -0
  3. package/bin/use-steady.js +13 -0
  4. package/dist/server-store.d.ts +68 -0
  5. package/dist/server-store.d.ts.map +1 -0
  6. package/dist/server-store.js +133 -0
  7. package/dist/server-store.js.map +1 -0
  8. package/dist/server.d.ts +35 -0
  9. package/dist/server.d.ts.map +1 -0
  10. package/dist/server.js +569 -0
  11. package/dist/server.js.map +1 -0
  12. package/dist/src/claude/adapters/api-adapter.d.ts +99 -0
  13. package/dist/src/claude/adapters/api-adapter.d.ts.map +1 -0
  14. package/dist/src/claude/adapters/api-adapter.js +415 -0
  15. package/dist/src/claude/adapters/api-adapter.js.map +1 -0
  16. package/dist/src/claude/adapters/stub-adapter.d.ts +73 -0
  17. package/dist/src/claude/adapters/stub-adapter.d.ts.map +1 -0
  18. package/dist/src/claude/adapters/stub-adapter.js +114 -0
  19. package/dist/src/claude/adapters/stub-adapter.js.map +1 -0
  20. package/dist/src/claude/artifact-mapper.d.ts +85 -0
  21. package/dist/src/claude/artifact-mapper.d.ts.map +1 -0
  22. package/dist/src/claude/artifact-mapper.js +187 -0
  23. package/dist/src/claude/artifact-mapper.js.map +1 -0
  24. package/dist/src/claude/delivery-gate.d.ts +136 -0
  25. package/dist/src/claude/delivery-gate.d.ts.map +1 -0
  26. package/dist/src/claude/delivery-gate.js +231 -0
  27. package/dist/src/claude/delivery-gate.js.map +1 -0
  28. package/dist/src/claude/index.d.ts +24 -0
  29. package/dist/src/claude/index.d.ts.map +1 -0
  30. package/dist/src/claude/index.js +23 -0
  31. package/dist/src/claude/index.js.map +1 -0
  32. package/dist/src/claude/types.d.ts +223 -0
  33. package/dist/src/claude/types.d.ts.map +1 -0
  34. package/dist/src/claude/types.js +64 -0
  35. package/dist/src/claude/types.js.map +1 -0
  36. package/dist/src/control/compiler.d.ts +125 -0
  37. package/dist/src/control/compiler.d.ts.map +1 -0
  38. package/dist/src/control/compiler.js +179 -0
  39. package/dist/src/control/compiler.js.map +1 -0
  40. package/dist/src/control/constraints.d.ts +42 -0
  41. package/dist/src/control/constraints.d.ts.map +1 -0
  42. package/dist/src/control/constraints.js +116 -0
  43. package/dist/src/control/constraints.js.map +1 -0
  44. package/dist/src/control/drift-detector.d.ts +49 -0
  45. package/dist/src/control/drift-detector.d.ts.map +1 -0
  46. package/dist/src/control/drift-detector.js +115 -0
  47. package/dist/src/control/drift-detector.js.map +1 -0
  48. package/dist/src/control/index.d.ts +44 -0
  49. package/dist/src/control/index.d.ts.map +1 -0
  50. package/dist/src/control/index.js +40 -0
  51. package/dist/src/control/index.js.map +1 -0
  52. package/dist/src/control/types.d.ts +144 -0
  53. package/dist/src/control/types.d.ts.map +1 -0
  54. package/dist/src/control/types.js +57 -0
  55. package/dist/src/control/types.js.map +1 -0
  56. package/dist/src/cursor/adapters/inprocess-adapter.d.ts +78 -0
  57. package/dist/src/cursor/adapters/inprocess-adapter.d.ts.map +1 -0
  58. package/dist/src/cursor/adapters/inprocess-adapter.js +308 -0
  59. package/dist/src/cursor/adapters/inprocess-adapter.js.map +1 -0
  60. package/dist/src/cursor/adapters/stub-adapter.d.ts +75 -0
  61. package/dist/src/cursor/adapters/stub-adapter.d.ts.map +1 -0
  62. package/dist/src/cursor/adapters/stub-adapter.js +120 -0
  63. package/dist/src/cursor/adapters/stub-adapter.js.map +1 -0
  64. package/dist/src/cursor/artifact-mapper.d.ts +81 -0
  65. package/dist/src/cursor/artifact-mapper.d.ts.map +1 -0
  66. package/dist/src/cursor/artifact-mapper.js +203 -0
  67. package/dist/src/cursor/artifact-mapper.js.map +1 -0
  68. package/dist/src/cursor/delivery-gate.d.ts +144 -0
  69. package/dist/src/cursor/delivery-gate.d.ts.map +1 -0
  70. package/dist/src/cursor/delivery-gate.js +208 -0
  71. package/dist/src/cursor/delivery-gate.js.map +1 -0
  72. package/dist/src/cursor/glob-matcher.d.ts +30 -0
  73. package/dist/src/cursor/glob-matcher.d.ts.map +1 -0
  74. package/dist/src/cursor/glob-matcher.js +68 -0
  75. package/dist/src/cursor/glob-matcher.js.map +1 -0
  76. package/dist/src/cursor/index.d.ts +43 -0
  77. package/dist/src/cursor/index.d.ts.map +1 -0
  78. package/dist/src/cursor/index.js +44 -0
  79. package/dist/src/cursor/index.js.map +1 -0
  80. package/dist/src/cursor/ocd-evaluator.d.ts +89 -0
  81. package/dist/src/cursor/ocd-evaluator.d.ts.map +1 -0
  82. package/dist/src/cursor/ocd-evaluator.js +142 -0
  83. package/dist/src/cursor/ocd-evaluator.js.map +1 -0
  84. package/dist/src/cursor/types.d.ts +309 -0
  85. package/dist/src/cursor/types.d.ts.map +1 -0
  86. package/dist/src/cursor/types.js +48 -0
  87. package/dist/src/cursor/types.js.map +1 -0
  88. package/dist/src/execution/claude/claude-execution-coordinator.d.ts +164 -0
  89. package/dist/src/execution/claude/claude-execution-coordinator.d.ts.map +1 -0
  90. package/dist/src/execution/claude/claude-execution-coordinator.js +198 -0
  91. package/dist/src/execution/claude/claude-execution-coordinator.js.map +1 -0
  92. package/dist/src/execution/claude/index.d.ts +13 -0
  93. package/dist/src/execution/claude/index.d.ts.map +1 -0
  94. package/dist/src/execution/claude/index.js +12 -0
  95. package/dist/src/execution/claude/index.js.map +1 -0
  96. package/dist/src/execution/cursor/cursor-execution-coordinator.d.ts +216 -0
  97. package/dist/src/execution/cursor/cursor-execution-coordinator.d.ts.map +1 -0
  98. package/dist/src/execution/cursor/cursor-execution-coordinator.js +233 -0
  99. package/dist/src/execution/cursor/cursor-execution-coordinator.js.map +1 -0
  100. package/dist/src/execution/cursor/index.d.ts +20 -0
  101. package/dist/src/execution/cursor/index.d.ts.map +1 -0
  102. package/dist/src/execution/cursor/index.js +18 -0
  103. package/dist/src/execution/cursor/index.js.map +1 -0
  104. package/dist/src/execution/reminders/index.d.ts +11 -0
  105. package/dist/src/execution/reminders/index.d.ts.map +1 -0
  106. package/dist/src/execution/reminders/index.js +9 -0
  107. package/dist/src/execution/reminders/index.js.map +1 -0
  108. package/dist/src/execution/reminders/reminder-execution-coordinator.d.ts +125 -0
  109. package/dist/src/execution/reminders/reminder-execution-coordinator.d.ts.map +1 -0
  110. package/dist/src/execution/reminders/reminder-execution-coordinator.js +129 -0
  111. package/dist/src/execution/reminders/reminder-execution-coordinator.js.map +1 -0
  112. package/dist/src/execution/reminders/reminder-execution-types.d.ts +161 -0
  113. package/dist/src/execution/reminders/reminder-execution-types.d.ts.map +1 -0
  114. package/dist/src/execution/reminders/reminder-execution-types.js +39 -0
  115. package/dist/src/execution/reminders/reminder-execution-types.js.map +1 -0
  116. package/dist/src/execution/reminders/reminder-execution-validator.d.ts +45 -0
  117. package/dist/src/execution/reminders/reminder-execution-validator.d.ts.map +1 -0
  118. package/dist/src/execution/reminders/reminder-execution-validator.js +92 -0
  119. package/dist/src/execution/reminders/reminder-execution-validator.js.map +1 -0
  120. package/dist/src/execution/reminders/reminder-executor.d.ts +62 -0
  121. package/dist/src/execution/reminders/reminder-executor.d.ts.map +1 -0
  122. package/dist/src/execution/reminders/reminder-executor.js +113 -0
  123. package/dist/src/execution/reminders/reminder-executor.js.map +1 -0
  124. package/dist/src/execution/reminders/reminder-time-parser.d.ts +41 -0
  125. package/dist/src/execution/reminders/reminder-time-parser.d.ts.map +1 -0
  126. package/dist/src/execution/reminders/reminder-time-parser.js +113 -0
  127. package/dist/src/execution/reminders/reminder-time-parser.js.map +1 -0
  128. package/dist/src/friction/auto-capture.d.ts +38 -0
  129. package/dist/src/friction/auto-capture.d.ts.map +1 -0
  130. package/dist/src/friction/auto-capture.js +133 -0
  131. package/dist/src/friction/auto-capture.js.map +1 -0
  132. package/dist/src/friction/client.d.ts +39 -0
  133. package/dist/src/friction/client.d.ts.map +1 -0
  134. package/dist/src/friction/client.js +165 -0
  135. package/dist/src/friction/client.js.map +1 -0
  136. package/dist/src/friction/config.d.ts +16 -0
  137. package/dist/src/friction/config.d.ts.map +1 -0
  138. package/dist/src/friction/config.js +56 -0
  139. package/dist/src/friction/config.js.map +1 -0
  140. package/dist/src/friction/github-auth.d.ts +41 -0
  141. package/dist/src/friction/github-auth.d.ts.map +1 -0
  142. package/dist/src/friction/github-auth.js +155 -0
  143. package/dist/src/friction/github-auth.js.map +1 -0
  144. package/dist/src/friction/github-issues.d.ts +51 -0
  145. package/dist/src/friction/github-issues.d.ts.map +1 -0
  146. package/dist/src/friction/github-issues.js +118 -0
  147. package/dist/src/friction/github-issues.js.map +1 -0
  148. package/dist/src/friction/payout-ledger.d.ts +45 -0
  149. package/dist/src/friction/payout-ledger.d.ts.map +1 -0
  150. package/dist/src/friction/payout-ledger.js +111 -0
  151. package/dist/src/friction/payout-ledger.js.map +1 -0
  152. package/dist/src/friction/queue.d.ts +42 -0
  153. package/dist/src/friction/queue.d.ts.map +1 -0
  154. package/dist/src/friction/queue.js +179 -0
  155. package/dist/src/friction/queue.js.map +1 -0
  156. package/dist/src/friction/reviewer.d.ts +42 -0
  157. package/dist/src/friction/reviewer.d.ts.map +1 -0
  158. package/dist/src/friction/reviewer.js +269 -0
  159. package/dist/src/friction/reviewer.js.map +1 -0
  160. package/dist/src/friction/types.d.ts +63 -0
  161. package/dist/src/friction/types.d.ts.map +1 -0
  162. package/dist/src/friction/types.js +18 -0
  163. package/dist/src/friction/types.js.map +1 -0
  164. package/dist/src/history/index.d.ts +39 -0
  165. package/dist/src/history/index.d.ts.map +1 -0
  166. package/dist/src/history/index.js +41 -0
  167. package/dist/src/history/index.js.map +1 -0
  168. package/dist/src/history/session-chain.d.ts +36 -0
  169. package/dist/src/history/session-chain.d.ts.map +1 -0
  170. package/dist/src/history/session-chain.js +91 -0
  171. package/dist/src/history/session-chain.js.map +1 -0
  172. package/dist/src/history/types.d.ts +130 -0
  173. package/dist/src/history/types.d.ts.map +1 -0
  174. package/dist/src/history/types.js +32 -0
  175. package/dist/src/history/types.js.map +1 -0
  176. package/dist/src/history/workflow-history.d.ts +48 -0
  177. package/dist/src/history/workflow-history.d.ts.map +1 -0
  178. package/dist/src/history/workflow-history.js +116 -0
  179. package/dist/src/history/workflow-history.js.map +1 -0
  180. package/dist/src/index.d.ts +88 -0
  181. package/dist/src/index.d.ts.map +1 -0
  182. package/dist/src/index.js +58 -0
  183. package/dist/src/index.js.map +1 -0
  184. package/dist/src/intake/classify-intent-state.d.ts +20 -0
  185. package/dist/src/intake/classify-intent-state.d.ts.map +1 -0
  186. package/dist/src/intake/classify-intent-state.js +29 -0
  187. package/dist/src/intake/classify-intent-state.js.map +1 -0
  188. package/dist/src/intake/intake-service.d.ts +105 -0
  189. package/dist/src/intake/intake-service.d.ts.map +1 -0
  190. package/dist/src/intake/intake-service.js +407 -0
  191. package/dist/src/intake/intake-service.js.map +1 -0
  192. package/dist/src/intake/response-planner.d.ts +25 -0
  193. package/dist/src/intake/response-planner.d.ts.map +1 -0
  194. package/dist/src/intake/response-planner.js +52 -0
  195. package/dist/src/intake/response-planner.js.map +1 -0
  196. package/dist/src/intake/signal-extractor.d.ts +25 -0
  197. package/dist/src/intake/signal-extractor.d.ts.map +1 -0
  198. package/dist/src/intake/signal-extractor.js +42 -0
  199. package/dist/src/intake/signal-extractor.js.map +1 -0
  200. package/dist/src/intake/trace.d.ts +157 -0
  201. package/dist/src/intake/trace.d.ts.map +1 -0
  202. package/dist/src/intake/trace.js +38 -0
  203. package/dist/src/intake/trace.js.map +1 -0
  204. package/dist/src/intake/types.d.ts +70 -0
  205. package/dist/src/intake/types.d.ts.map +1 -0
  206. package/dist/src/intake/types.js +30 -0
  207. package/dist/src/intake/types.js.map +1 -0
  208. package/dist/src/interaction/defaults.d.ts +12 -0
  209. package/dist/src/interaction/defaults.d.ts.map +1 -0
  210. package/dist/src/interaction/defaults.js +26 -0
  211. package/dist/src/interaction/defaults.js.map +1 -0
  212. package/dist/src/interaction/guidance-order.d.ts +53 -0
  213. package/dist/src/interaction/guidance-order.d.ts.map +1 -0
  214. package/dist/src/interaction/guidance-order.js +131 -0
  215. package/dist/src/interaction/guidance-order.js.map +1 -0
  216. package/dist/src/interaction/observe.d.ts +57 -0
  217. package/dist/src/interaction/observe.d.ts.map +1 -0
  218. package/dist/src/interaction/observe.js +77 -0
  219. package/dist/src/interaction/observe.js.map +1 -0
  220. package/dist/src/interaction/selectors.d.ts +16 -0
  221. package/dist/src/interaction/selectors.d.ts.map +1 -0
  222. package/dist/src/interaction/selectors.js +23 -0
  223. package/dist/src/interaction/selectors.js.map +1 -0
  224. package/dist/src/interaction/types.d.ts +105 -0
  225. package/dist/src/interaction/types.d.ts.map +1 -0
  226. package/dist/src/interaction/types.js +48 -0
  227. package/dist/src/interaction/types.js.map +1 -0
  228. package/dist/src/interaction/updater.d.ts +22 -0
  229. package/dist/src/interaction/updater.d.ts.map +1 -0
  230. package/dist/src/interaction/updater.js +87 -0
  231. package/dist/src/interaction/updater.js.map +1 -0
  232. package/dist/src/present/boundary-explanation/boundary-explanation-detector.d.ts +48 -0
  233. package/dist/src/present/boundary-explanation/boundary-explanation-detector.d.ts.map +1 -0
  234. package/dist/src/present/boundary-explanation/boundary-explanation-detector.js +107 -0
  235. package/dist/src/present/boundary-explanation/boundary-explanation-detector.js.map +1 -0
  236. package/dist/src/present/boundary-explanation/boundary-explanation-types.d.ts +43 -0
  237. package/dist/src/present/boundary-explanation/boundary-explanation-types.d.ts.map +1 -0
  238. package/dist/src/present/boundary-explanation/boundary-explanation-types.js +20 -0
  239. package/dist/src/present/boundary-explanation/boundary-explanation-types.js.map +1 -0
  240. package/dist/src/present/boundary-explanation/index.d.ts +10 -0
  241. package/dist/src/present/boundary-explanation/index.d.ts.map +1 -0
  242. package/dist/src/present/boundary-explanation/index.js +2 -0
  243. package/dist/src/present/boundary-explanation/index.js.map +1 -0
  244. package/dist/src/present/control-visibility/control-visibility-assertions.d.ts +70 -0
  245. package/dist/src/present/control-visibility/control-visibility-assertions.d.ts.map +1 -0
  246. package/dist/src/present/control-visibility/control-visibility-assertions.js +138 -0
  247. package/dist/src/present/control-visibility/control-visibility-assertions.js.map +1 -0
  248. package/dist/src/present/control-visibility/control-visibility-evaluator.d.ts +67 -0
  249. package/dist/src/present/control-visibility/control-visibility-evaluator.d.ts.map +1 -0
  250. package/dist/src/present/control-visibility/control-visibility-evaluator.js +146 -0
  251. package/dist/src/present/control-visibility/control-visibility-evaluator.js.map +1 -0
  252. package/dist/src/present/control-visibility/control-visibility-types.d.ts +113 -0
  253. package/dist/src/present/control-visibility/control-visibility-types.d.ts.map +1 -0
  254. package/dist/src/present/control-visibility/control-visibility-types.js +24 -0
  255. package/dist/src/present/control-visibility/control-visibility-types.js.map +1 -0
  256. package/dist/src/present/control-visibility/index.d.ts +16 -0
  257. package/dist/src/present/control-visibility/index.d.ts.map +1 -0
  258. package/dist/src/present/control-visibility/index.js +15 -0
  259. package/dist/src/present/control-visibility/index.js.map +1 -0
  260. package/dist/src/present/format.d.ts +57 -0
  261. package/dist/src/present/format.d.ts.map +1 -0
  262. package/dist/src/present/format.js +150 -0
  263. package/dist/src/present/format.js.map +1 -0
  264. package/dist/src/present/present-coordinator.d.ts +153 -0
  265. package/dist/src/present/present-coordinator.d.ts.map +1 -0
  266. package/dist/src/present/present-coordinator.js +213 -0
  267. package/dist/src/present/present-coordinator.js.map +1 -0
  268. package/dist/src/present/reminders/index.d.ts +22 -0
  269. package/dist/src/present/reminders/index.d.ts.map +1 -0
  270. package/dist/src/present/reminders/index.js +22 -0
  271. package/dist/src/present/reminders/index.js.map +1 -0
  272. package/dist/src/present/reminders/reminder-presenter.d.ts +76 -0
  273. package/dist/src/present/reminders/reminder-presenter.d.ts.map +1 -0
  274. package/dist/src/present/reminders/reminder-presenter.js +359 -0
  275. package/dist/src/present/reminders/reminder-presenter.js.map +1 -0
  276. package/dist/src/present/reminders/reminder-renderer.d.ts +82 -0
  277. package/dist/src/present/reminders/reminder-renderer.d.ts.map +1 -0
  278. package/dist/src/present/reminders/reminder-renderer.js +136 -0
  279. package/dist/src/present/reminders/reminder-renderer.js.map +1 -0
  280. package/dist/src/present/reminders/reminder-types.d.ts +131 -0
  281. package/dist/src/present/reminders/reminder-types.d.ts.map +1 -0
  282. package/dist/src/present/reminders/reminder-types.js +29 -0
  283. package/dist/src/present/reminders/reminder-types.js.map +1 -0
  284. package/dist/src/present/types.d.ts +114 -0
  285. package/dist/src/present/types.d.ts.map +1 -0
  286. package/dist/src/present/types.js +18 -0
  287. package/dist/src/present/types.js.map +1 -0
  288. package/dist/src/product/claude-product-session.d.ts +146 -0
  289. package/dist/src/product/claude-product-session.d.ts.map +1 -0
  290. package/dist/src/product/claude-product-session.js +362 -0
  291. package/dist/src/product/claude-product-session.js.map +1 -0
  292. package/dist/src/product/cursor-product-session.d.ts +211 -0
  293. package/dist/src/product/cursor-product-session.d.ts.map +1 -0
  294. package/dist/src/product/cursor-product-session.js +390 -0
  295. package/dist/src/product/cursor-product-session.js.map +1 -0
  296. package/dist/src/product/index.d.ts +28 -0
  297. package/dist/src/product/index.d.ts.map +1 -0
  298. package/dist/src/product/index.js +22 -0
  299. package/dist/src/product/index.js.map +1 -0
  300. package/dist/src/product/session-resilience/index.d.ts +17 -0
  301. package/dist/src/product/session-resilience/index.d.ts.map +1 -0
  302. package/dist/src/product/session-resilience/index.js +15 -0
  303. package/dist/src/product/session-resilience/index.js.map +1 -0
  304. package/dist/src/product/session-resilience/session-serializer.d.ts +43 -0
  305. package/dist/src/product/session-resilience/session-serializer.d.ts.map +1 -0
  306. package/dist/src/product/session-resilience/session-serializer.js +84 -0
  307. package/dist/src/product/session-resilience/session-serializer.js.map +1 -0
  308. package/dist/src/product/session-resilience/session-snapshot-types.d.ts +35 -0
  309. package/dist/src/product/session-resilience/session-snapshot-types.d.ts.map +1 -0
  310. package/dist/src/product/session-resilience/session-snapshot-types.js +21 -0
  311. package/dist/src/product/session-resilience/session-snapshot-types.js.map +1 -0
  312. package/dist/src/product/session-resilience/session-staleness.d.ts +54 -0
  313. package/dist/src/product/session-resilience/session-staleness.d.ts.map +1 -0
  314. package/dist/src/product/session-resilience/session-staleness.js +62 -0
  315. package/dist/src/product/session-resilience/session-staleness.js.map +1 -0
  316. package/dist/src/product/session-resilience/session-summary.d.ts +40 -0
  317. package/dist/src/product/session-resilience/session-summary.d.ts.map +1 -0
  318. package/dist/src/product/session-resilience/session-summary.js +72 -0
  319. package/dist/src/product/session-resilience/session-summary.js.map +1 -0
  320. package/dist/src/prv/patterns.d.ts +32 -0
  321. package/dist/src/prv/patterns.d.ts.map +1 -0
  322. package/dist/src/prv/patterns.js +40 -0
  323. package/dist/src/prv/patterns.js.map +1 -0
  324. package/dist/src/prv/prv.d.ts +13 -0
  325. package/dist/src/prv/prv.d.ts.map +1 -0
  326. package/dist/src/prv/prv.js +22 -0
  327. package/dist/src/prv/prv.js.map +1 -0
  328. package/dist/src/prv/types.d.ts +26 -0
  329. package/dist/src/prv/types.d.ts.map +1 -0
  330. package/dist/src/prv/types.js +15 -0
  331. package/dist/src/prv/types.js.map +1 -0
  332. package/dist/src/safety/detectors/arbitrary-exec.detector.d.ts +3 -0
  333. package/dist/src/safety/detectors/arbitrary-exec.detector.d.ts.map +1 -0
  334. package/dist/src/safety/detectors/arbitrary-exec.detector.js +31 -0
  335. package/dist/src/safety/detectors/arbitrary-exec.detector.js.map +1 -0
  336. package/dist/src/safety/detectors/bulk-data-exfil.detector.d.ts +21 -0
  337. package/dist/src/safety/detectors/bulk-data-exfil.detector.d.ts.map +1 -0
  338. package/dist/src/safety/detectors/bulk-data-exfil.detector.js +90 -0
  339. package/dist/src/safety/detectors/bulk-data-exfil.detector.js.map +1 -0
  340. package/dist/src/safety/detectors/destructive.detector.d.ts +3 -0
  341. package/dist/src/safety/detectors/destructive.detector.d.ts.map +1 -0
  342. package/dist/src/safety/detectors/destructive.detector.js +28 -0
  343. package/dist/src/safety/detectors/destructive.detector.js.map +1 -0
  344. package/dist/src/safety/detectors/evasion.detector.d.ts +3 -0
  345. package/dist/src/safety/detectors/evasion.detector.d.ts.map +1 -0
  346. package/dist/src/safety/detectors/evasion.detector.js +28 -0
  347. package/dist/src/safety/detectors/evasion.detector.js.map +1 -0
  348. package/dist/src/safety/detectors/secret-access.detector.d.ts +31 -0
  349. package/dist/src/safety/detectors/secret-access.detector.d.ts.map +1 -0
  350. package/dist/src/safety/detectors/secret-access.detector.js +78 -0
  351. package/dist/src/safety/detectors/secret-access.detector.js.map +1 -0
  352. package/dist/src/safety/registry.d.ts +9 -0
  353. package/dist/src/safety/registry.d.ts.map +1 -0
  354. package/dist/src/safety/registry.js +22 -0
  355. package/dist/src/safety/registry.js.map +1 -0
  356. package/dist/src/safety/safety-gate.d.ts +16 -0
  357. package/dist/src/safety/safety-gate.d.ts.map +1 -0
  358. package/dist/src/safety/safety-gate.js +26 -0
  359. package/dist/src/safety/safety-gate.js.map +1 -0
  360. package/dist/src/safety/types.d.ts +35 -0
  361. package/dist/src/safety/types.d.ts.map +1 -0
  362. package/dist/src/safety/types.js +14 -0
  363. package/dist/src/safety/types.js.map +1 -0
  364. package/dist/src/shell/claude-shell.d.ts +63 -0
  365. package/dist/src/shell/claude-shell.d.ts.map +1 -0
  366. package/dist/src/shell/claude-shell.js +81 -0
  367. package/dist/src/shell/claude-shell.js.map +1 -0
  368. package/dist/src/shell/cli/friction-admin.d.ts +14 -0
  369. package/dist/src/shell/cli/friction-admin.d.ts.map +1 -0
  370. package/dist/src/shell/cli/friction-admin.js +276 -0
  371. package/dist/src/shell/cli/friction-admin.js.map +1 -0
  372. package/dist/src/shell/cli/friction-report.d.ts +16 -0
  373. package/dist/src/shell/cli/friction-report.d.ts.map +1 -0
  374. package/dist/src/shell/cli/friction-report.js +156 -0
  375. package/dist/src/shell/cli/friction-report.js.map +1 -0
  376. package/dist/src/shell/cli/main.d.ts +68 -0
  377. package/dist/src/shell/cli/main.d.ts.map +1 -0
  378. package/dist/src/shell/cli/main.js +488 -0
  379. package/dist/src/shell/cli/main.js.map +1 -0
  380. package/dist/src/shell/cli/use-steady.d.ts +26 -0
  381. package/dist/src/shell/cli/use-steady.d.ts.map +1 -0
  382. package/dist/src/shell/cli/use-steady.js +117 -0
  383. package/dist/src/shell/cli/use-steady.js.map +1 -0
  384. package/dist/src/shell/cursor-shell.d.ts +63 -0
  385. package/dist/src/shell/cursor-shell.d.ts.map +1 -0
  386. package/dist/src/shell/cursor-shell.js +88 -0
  387. package/dist/src/shell/cursor-shell.js.map +1 -0
  388. package/dist/src/shell/defaults.d.ts +51 -0
  389. package/dist/src/shell/defaults.d.ts.map +1 -0
  390. package/dist/src/shell/defaults.js +78 -0
  391. package/dist/src/shell/defaults.js.map +1 -0
  392. package/dist/src/shell/history-render.d.ts +56 -0
  393. package/dist/src/shell/history-render.d.ts.map +1 -0
  394. package/dist/src/shell/history-render.js +166 -0
  395. package/dist/src/shell/history-render.js.map +1 -0
  396. package/dist/src/shell/index.d.ts +43 -0
  397. package/dist/src/shell/index.d.ts.map +1 -0
  398. package/dist/src/shell/index.js +45 -0
  399. package/dist/src/shell/index.js.map +1 -0
  400. package/dist/src/shell/render.d.ts +42 -0
  401. package/dist/src/shell/render.d.ts.map +1 -0
  402. package/dist/src/shell/render.js +122 -0
  403. package/dist/src/shell/render.js.map +1 -0
  404. package/dist/src/shell/types.d.ts +46 -0
  405. package/dist/src/shell/types.d.ts.map +1 -0
  406. package/dist/src/shell/types.js +19 -0
  407. package/dist/src/shell/types.js.map +1 -0
  408. package/dist/src/shell/workflow-defaults.d.ts +23 -0
  409. package/dist/src/shell/workflow-defaults.d.ts.map +1 -0
  410. package/dist/src/shell/workflow-defaults.js +27 -0
  411. package/dist/src/shell/workflow-defaults.js.map +1 -0
  412. package/dist/src/shell/workflow-render.d.ts +54 -0
  413. package/dist/src/shell/workflow-render.d.ts.map +1 -0
  414. package/dist/src/shell/workflow-render.js +319 -0
  415. package/dist/src/shell/workflow-render.js.map +1 -0
  416. package/dist/src/shell/workflow-shell.d.ts +110 -0
  417. package/dist/src/shell/workflow-shell.d.ts.map +1 -0
  418. package/dist/src/shell/workflow-shell.js +180 -0
  419. package/dist/src/shell/workflow-shell.js.map +1 -0
  420. package/dist/src/skills/audit.d.ts +118 -0
  421. package/dist/src/skills/audit.d.ts.map +1 -0
  422. package/dist/src/skills/audit.js +147 -0
  423. package/dist/src/skills/audit.js.map +1 -0
  424. package/dist/src/skills/invocation.d.ts +131 -0
  425. package/dist/src/skills/invocation.d.ts.map +1 -0
  426. package/dist/src/skills/invocation.js +165 -0
  427. package/dist/src/skills/invocation.js.map +1 -0
  428. package/dist/src/skills/loader.d.ts +70 -0
  429. package/dist/src/skills/loader.d.ts.map +1 -0
  430. package/dist/src/skills/loader.js +220 -0
  431. package/dist/src/skills/loader.js.map +1 -0
  432. package/dist/src/skills/local-recovery-adapter.d.ts +49 -0
  433. package/dist/src/skills/local-recovery-adapter.d.ts.map +1 -0
  434. package/dist/src/skills/local-recovery-adapter.js +184 -0
  435. package/dist/src/skills/local-recovery-adapter.js.map +1 -0
  436. package/dist/src/skills/parser.d.ts +53 -0
  437. package/dist/src/skills/parser.d.ts.map +1 -0
  438. package/dist/src/skills/parser.js +336 -0
  439. package/dist/src/skills/parser.js.map +1 -0
  440. package/dist/src/skills/registry.d.ts +123 -0
  441. package/dist/src/skills/registry.d.ts.map +1 -0
  442. package/dist/src/skills/registry.js +144 -0
  443. package/dist/src/skills/registry.js.map +1 -0
  444. package/dist/src/skills/types.d.ts +242 -0
  445. package/dist/src/skills/types.d.ts.map +1 -0
  446. package/dist/src/skills/types.js +50 -0
  447. package/dist/src/skills/types.js.map +1 -0
  448. package/dist/src/skills/validator.d.ts +31 -0
  449. package/dist/src/skills/validator.d.ts.map +1 -0
  450. package/dist/src/skills/validator.js +366 -0
  451. package/dist/src/skills/validator.js.map +1 -0
  452. package/dist/src/ucp/envelope.d.ts +165 -0
  453. package/dist/src/ucp/envelope.d.ts.map +1 -0
  454. package/dist/src/ucp/envelope.js +241 -0
  455. package/dist/src/ucp/envelope.js.map +1 -0
  456. package/dist/src/ucp/hashes.d.ts +36 -0
  457. package/dist/src/ucp/hashes.d.ts.map +1 -0
  458. package/dist/src/ucp/hashes.js +59 -0
  459. package/dist/src/ucp/hashes.js.map +1 -0
  460. package/dist/src/ucp/mappers/map-artifact.d.ts +58 -0
  461. package/dist/src/ucp/mappers/map-artifact.d.ts.map +1 -0
  462. package/dist/src/ucp/mappers/map-artifact.js +51 -0
  463. package/dist/src/ucp/mappers/map-artifact.js.map +1 -0
  464. package/dist/src/ucp/mappers/map-change-interpretation.d.ts +12 -0
  465. package/dist/src/ucp/mappers/map-change-interpretation.d.ts.map +1 -0
  466. package/dist/src/ucp/mappers/map-change-interpretation.js +18 -0
  467. package/dist/src/ucp/mappers/map-change-interpretation.js.map +1 -0
  468. package/dist/src/ucp/mappers/map-completion.d.ts +10 -0
  469. package/dist/src/ucp/mappers/map-completion.d.ts.map +1 -0
  470. package/dist/src/ucp/mappers/map-completion.js +24 -0
  471. package/dist/src/ucp/mappers/map-completion.js.map +1 -0
  472. package/dist/src/ucp/mappers/map-context.d.ts +9 -0
  473. package/dist/src/ucp/mappers/map-context.d.ts.map +1 -0
  474. package/dist/src/ucp/mappers/map-context.js +13 -0
  475. package/dist/src/ucp/mappers/map-context.js.map +1 -0
  476. package/dist/src/ucp/mappers/map-debug-trace.d.ts +10 -0
  477. package/dist/src/ucp/mappers/map-debug-trace.d.ts.map +1 -0
  478. package/dist/src/ucp/mappers/map-debug-trace.js +18 -0
  479. package/dist/src/ucp/mappers/map-debug-trace.js.map +1 -0
  480. package/dist/src/ucp/mappers/map-disambiguation.d.ts +10 -0
  481. package/dist/src/ucp/mappers/map-disambiguation.d.ts.map +1 -0
  482. package/dist/src/ucp/mappers/map-disambiguation.js +21 -0
  483. package/dist/src/ucp/mappers/map-disambiguation.js.map +1 -0
  484. package/dist/src/ucp/mappers/map-execution-trace.d.ts +64 -0
  485. package/dist/src/ucp/mappers/map-execution-trace.d.ts.map +1 -0
  486. package/dist/src/ucp/mappers/map-execution-trace.js +57 -0
  487. package/dist/src/ucp/mappers/map-execution-trace.js.map +1 -0
  488. package/dist/src/ucp/mappers/map-intent-interpretation.d.ts +11 -0
  489. package/dist/src/ucp/mappers/map-intent-interpretation.d.ts.map +1 -0
  490. package/dist/src/ucp/mappers/map-intent-interpretation.js +17 -0
  491. package/dist/src/ucp/mappers/map-intent-interpretation.js.map +1 -0
  492. package/dist/src/ucp/mappers/map-intent.d.ts +9 -0
  493. package/dist/src/ucp/mappers/map-intent.d.ts.map +1 -0
  494. package/dist/src/ucp/mappers/map-intent.js +11 -0
  495. package/dist/src/ucp/mappers/map-intent.js.map +1 -0
  496. package/dist/src/ucp/mappers/map-prv.d.ts +10 -0
  497. package/dist/src/ucp/mappers/map-prv.d.ts.map +1 -0
  498. package/dist/src/ucp/mappers/map-prv.js +14 -0
  499. package/dist/src/ucp/mappers/map-prv.js.map +1 -0
  500. package/dist/src/ucp/mappers/map-reminder-execution.d.ts +57 -0
  501. package/dist/src/ucp/mappers/map-reminder-execution.d.ts.map +1 -0
  502. package/dist/src/ucp/mappers/map-reminder-execution.js +69 -0
  503. package/dist/src/ucp/mappers/map-reminder-execution.js.map +1 -0
  504. package/dist/src/ucp/mappers/map-replay-report.d.ts +81 -0
  505. package/dist/src/ucp/mappers/map-replay-report.d.ts.map +1 -0
  506. package/dist/src/ucp/mappers/map-replay-report.js +76 -0
  507. package/dist/src/ucp/mappers/map-replay-report.js.map +1 -0
  508. package/dist/src/ucp/mappers/map-response.d.ts +13 -0
  509. package/dist/src/ucp/mappers/map-response.d.ts.map +1 -0
  510. package/dist/src/ucp/mappers/map-response.js +25 -0
  511. package/dist/src/ucp/mappers/map-response.js.map +1 -0
  512. package/dist/src/ucp/mappers/map-safety.d.ts +14 -0
  513. package/dist/src/ucp/mappers/map-safety.d.ts.map +1 -0
  514. package/dist/src/ucp/mappers/map-safety.js +22 -0
  515. package/dist/src/ucp/mappers/map-safety.js.map +1 -0
  516. package/dist/src/ucp/persistence/index.d.ts +24 -0
  517. package/dist/src/ucp/persistence/index.d.ts.map +1 -0
  518. package/dist/src/ucp/persistence/index.js +22 -0
  519. package/dist/src/ucp/persistence/index.js.map +1 -0
  520. package/dist/src/ucp/persistence/query.d.ts +164 -0
  521. package/dist/src/ucp/persistence/query.d.ts.map +1 -0
  522. package/dist/src/ucp/persistence/query.js +240 -0
  523. package/dist/src/ucp/persistence/query.js.map +1 -0
  524. package/dist/src/ucp/persistence/reader.d.ts +43 -0
  525. package/dist/src/ucp/persistence/reader.d.ts.map +1 -0
  526. package/dist/src/ucp/persistence/reader.js +104 -0
  527. package/dist/src/ucp/persistence/reader.js.map +1 -0
  528. package/dist/src/ucp/persistence/store.d.ts +77 -0
  529. package/dist/src/ucp/persistence/store.d.ts.map +1 -0
  530. package/dist/src/ucp/persistence/store.js +177 -0
  531. package/dist/src/ucp/persistence/store.js.map +1 -0
  532. package/dist/src/ucp/persistence/write.d.ts +48 -0
  533. package/dist/src/ucp/persistence/write.d.ts.map +1 -0
  534. package/dist/src/ucp/persistence/write.js +59 -0
  535. package/dist/src/ucp/persistence/write.js.map +1 -0
  536. package/dist/src/ucp/projection.d.ts +146 -0
  537. package/dist/src/ucp/projection.d.ts.map +1 -0
  538. package/dist/src/ucp/projection.js +139 -0
  539. package/dist/src/ucp/projection.js.map +1 -0
  540. package/dist/src/ucp/types.d.ts +585 -0
  541. package/dist/src/ucp/types.d.ts.map +1 -0
  542. package/dist/src/ucp/types.js +57 -0
  543. package/dist/src/ucp/types.js.map +1 -0
  544. package/dist/src/understand/completion/completion.d.ts +26 -0
  545. package/dist/src/understand/completion/completion.d.ts.map +1 -0
  546. package/dist/src/understand/completion/completion.js +45 -0
  547. package/dist/src/understand/completion/completion.js.map +1 -0
  548. package/dist/src/understand/completion/rules.d.ts +61 -0
  549. package/dist/src/understand/completion/rules.d.ts.map +1 -0
  550. package/dist/src/understand/completion/rules.js +268 -0
  551. package/dist/src/understand/completion/rules.js.map +1 -0
  552. package/dist/src/understand/completion/types.d.ts +68 -0
  553. package/dist/src/understand/completion/types.d.ts.map +1 -0
  554. package/dist/src/understand/completion/types.js +34 -0
  555. package/dist/src/understand/completion/types.js.map +1 -0
  556. package/dist/src/understand/context/context-alignment.d.ts +18 -0
  557. package/dist/src/understand/context/context-alignment.d.ts.map +1 -0
  558. package/dist/src/understand/context/context-alignment.js +61 -0
  559. package/dist/src/understand/context/context-alignment.js.map +1 -0
  560. package/dist/src/understand/context/types.d.ts +20 -0
  561. package/dist/src/understand/context/types.d.ts.map +1 -0
  562. package/dist/src/understand/context/types.js +13 -0
  563. package/dist/src/understand/context/types.js.map +1 -0
  564. package/dist/src/understand/disambiguation/detectors/missing-context.detector.d.ts +12 -0
  565. package/dist/src/understand/disambiguation/detectors/missing-context.detector.d.ts.map +1 -0
  566. package/dist/src/understand/disambiguation/detectors/missing-context.detector.js +60 -0
  567. package/dist/src/understand/disambiguation/detectors/missing-context.detector.js.map +1 -0
  568. package/dist/src/understand/disambiguation/detectors/overloaded-term.detector.d.ts +13 -0
  569. package/dist/src/understand/disambiguation/detectors/overloaded-term.detector.d.ts.map +1 -0
  570. package/dist/src/understand/disambiguation/detectors/overloaded-term.detector.js +57 -0
  571. package/dist/src/understand/disambiguation/detectors/overloaded-term.detector.js.map +1 -0
  572. package/dist/src/understand/disambiguation/detectors/typo-adjacent.detector.d.ts +16 -0
  573. package/dist/src/understand/disambiguation/detectors/typo-adjacent.detector.d.ts.map +1 -0
  574. package/dist/src/understand/disambiguation/detectors/typo-adjacent.detector.js +56 -0
  575. package/dist/src/understand/disambiguation/detectors/typo-adjacent.detector.js.map +1 -0
  576. package/dist/src/understand/disambiguation/registry.d.ts +14 -0
  577. package/dist/src/understand/disambiguation/registry.d.ts.map +1 -0
  578. package/dist/src/understand/disambiguation/registry.js +27 -0
  579. package/dist/src/understand/disambiguation/registry.js.map +1 -0
  580. package/dist/src/understand/disambiguation/types.d.ts +34 -0
  581. package/dist/src/understand/disambiguation/types.d.ts.map +1 -0
  582. package/dist/src/understand/disambiguation/types.js +15 -0
  583. package/dist/src/understand/disambiguation/types.js.map +1 -0
  584. package/dist/src/understand/intent-interpretation/intent-interpretation.d.ts +86 -0
  585. package/dist/src/understand/intent-interpretation/intent-interpretation.d.ts.map +1 -0
  586. package/dist/src/understand/intent-interpretation/intent-interpretation.js +141 -0
  587. package/dist/src/understand/intent-interpretation/intent-interpretation.js.map +1 -0
  588. package/dist/src/understand/intent-interpretation/interpreters/color-intent.interpreter.d.ts +33 -0
  589. package/dist/src/understand/intent-interpretation/interpreters/color-intent.interpreter.d.ts.map +1 -0
  590. package/dist/src/understand/intent-interpretation/interpreters/color-intent.interpreter.js +66 -0
  591. package/dist/src/understand/intent-interpretation/interpreters/color-intent.interpreter.js.map +1 -0
  592. package/dist/src/understand/intent-interpretation/interpreters/config-intent.interpreter.d.ts +20 -0
  593. package/dist/src/understand/intent-interpretation/interpreters/config-intent.interpreter.d.ts.map +1 -0
  594. package/dist/src/understand/intent-interpretation/interpreters/config-intent.interpreter.js +80 -0
  595. package/dist/src/understand/intent-interpretation/interpreters/config-intent.interpreter.js.map +1 -0
  596. package/dist/src/understand/intent-interpretation/interpreters/text-intent.interpreter.d.ts +25 -0
  597. package/dist/src/understand/intent-interpretation/interpreters/text-intent.interpreter.d.ts.map +1 -0
  598. package/dist/src/understand/intent-interpretation/interpreters/text-intent.interpreter.js +47 -0
  599. package/dist/src/understand/intent-interpretation/interpreters/text-intent.interpreter.js.map +1 -0
  600. package/dist/src/understand/intent-interpretation/interpreters/workflow-intent.interpreter.d.ts +35 -0
  601. package/dist/src/understand/intent-interpretation/interpreters/workflow-intent.interpreter.d.ts.map +1 -0
  602. package/dist/src/understand/intent-interpretation/interpreters/workflow-intent.interpreter.js +89 -0
  603. package/dist/src/understand/intent-interpretation/interpreters/workflow-intent.interpreter.js.map +1 -0
  604. package/dist/src/understand/intent-interpretation/registry.d.ts +18 -0
  605. package/dist/src/understand/intent-interpretation/registry.d.ts.map +1 -0
  606. package/dist/src/understand/intent-interpretation/registry.js +26 -0
  607. package/dist/src/understand/intent-interpretation/registry.js.map +1 -0
  608. package/dist/src/understand/intent-interpretation/types.d.ts +83 -0
  609. package/dist/src/understand/intent-interpretation/types.d.ts.map +1 -0
  610. package/dist/src/understand/intent-interpretation/types.js +40 -0
  611. package/dist/src/understand/intent-interpretation/types.js.map +1 -0
  612. package/dist/src/understand/interpretation/intent.d.ts +72 -0
  613. package/dist/src/understand/interpretation/intent.d.ts.map +1 -0
  614. package/dist/src/understand/interpretation/intent.js +414 -0
  615. package/dist/src/understand/interpretation/intent.js.map +1 -0
  616. package/dist/src/understand/interpretation/interpretation.d.ts +26 -0
  617. package/dist/src/understand/interpretation/interpretation.d.ts.map +1 -0
  618. package/dist/src/understand/interpretation/interpretation.js +43 -0
  619. package/dist/src/understand/interpretation/interpretation.js.map +1 -0
  620. package/dist/src/understand/interpretation/parser.d.ts +20 -0
  621. package/dist/src/understand/interpretation/parser.d.ts.map +1 -0
  622. package/dist/src/understand/interpretation/parser.js +88 -0
  623. package/dist/src/understand/interpretation/parser.js.map +1 -0
  624. package/dist/src/understand/interpretation/rules.d.ts +19 -0
  625. package/dist/src/understand/interpretation/rules.d.ts.map +1 -0
  626. package/dist/src/understand/interpretation/rules.js +222 -0
  627. package/dist/src/understand/interpretation/rules.js.map +1 -0
  628. package/dist/src/understand/interpretation/types.d.ts +90 -0
  629. package/dist/src/understand/interpretation/types.d.ts.map +1 -0
  630. package/dist/src/understand/interpretation/types.js +29 -0
  631. package/dist/src/understand/interpretation/types.js.map +1 -0
  632. package/dist/src/understand/shared/types.d.ts +13 -0
  633. package/dist/src/understand/shared/types.d.ts.map +1 -0
  634. package/dist/src/understand/shared/types.js +9 -0
  635. package/dist/src/understand/shared/types.js.map +1 -0
  636. package/dist/src/understand/silent-guidance/index.d.ts +4 -0
  637. package/dist/src/understand/silent-guidance/index.d.ts.map +1 -0
  638. package/dist/src/understand/silent-guidance/index.js +3 -0
  639. package/dist/src/understand/silent-guidance/index.js.map +1 -0
  640. package/dist/src/understand/silent-guidance/selector.d.ts +44 -0
  641. package/dist/src/understand/silent-guidance/selector.d.ts.map +1 -0
  642. package/dist/src/understand/silent-guidance/selector.js +158 -0
  643. package/dist/src/understand/silent-guidance/selector.js.map +1 -0
  644. package/dist/src/understand/silent-guidance/templates.d.ts +31 -0
  645. package/dist/src/understand/silent-guidance/templates.d.ts.map +1 -0
  646. package/dist/src/understand/silent-guidance/templates.js +109 -0
  647. package/dist/src/understand/silent-guidance/templates.js.map +1 -0
  648. package/dist/src/understand/silent-guidance/types.d.ts +36 -0
  649. package/dist/src/understand/silent-guidance/types.d.ts.map +1 -0
  650. package/dist/src/understand/silent-guidance/types.js +2 -0
  651. package/dist/src/understand/silent-guidance/types.js.map +1 -0
  652. package/dist/src/workflow/coordinator.d.ts +197 -0
  653. package/dist/src/workflow/coordinator.d.ts.map +1 -0
  654. package/dist/src/workflow/coordinator.js +682 -0
  655. package/dist/src/workflow/coordinator.js.map +1 -0
  656. package/dist/src/workflow/index.d.ts +30 -0
  657. package/dist/src/workflow/index.d.ts.map +1 -0
  658. package/dist/src/workflow/index.js +30 -0
  659. package/dist/src/workflow/index.js.map +1 -0
  660. package/dist/src/workflow/types.d.ts +213 -0
  661. package/dist/src/workflow/types.d.ts.map +1 -0
  662. package/dist/src/workflow/types.js +27 -0
  663. package/dist/src/workflow/types.js.map +1 -0
  664. package/package.json +54 -0
  665. package/ui/README.md +73 -0
@@ -0,0 +1,336 @@
1
+ /**
2
+ * UseSteady Skills v1 — parser (file 2 of 8).
3
+ *
4
+ * Single responsibility: read a SKILL.md file from disk, split it into a YAML
5
+ * frontmatter block and a markdown body, parse the YAML with a zero-dependency
6
+ * minimal parser, and locate the five required body sections.
7
+ *
8
+ * This file does NOT validate. It only:
9
+ * - extracts and structures content
10
+ * - reports syntax errors (malformed YAML, missing delimiters)
11
+ *
12
+ * Type checking, spec compliance, and guardrail enforcement live in validator.ts.
13
+ *
14
+ * Throws:
15
+ * SkillLoadError (FILE_NOT_FOUND) — file cannot be read from disk
16
+ * ValidationError (invalid_markdown) — frontmatter delimiters missing/malformed
17
+ * ValidationError (invalid_yaml) — YAML block cannot be parsed
18
+ */
19
+ import { readFile } from 'node:fs/promises';
20
+ import { SkillLoadError, ValidationError, } from './types.js';
21
+ // ---------------------------------------------------------------------------
22
+ // Step 1 — frontmatter / body splitter
23
+ // ---------------------------------------------------------------------------
24
+ /**
25
+ * Split raw SKILL.md content into a YAML string and the markdown body.
26
+ *
27
+ * Rules enforced here (syntax only — not spec compliance):
28
+ * - File must start with `---` (after optional UTF-8 BOM)
29
+ * - A closing `---` on its own line must be present
30
+ * - The YAML block between the delimiters must be non-empty
31
+ *
32
+ * Only the first frontmatter block is processed. Any subsequent `---` lines
33
+ * in the body are treated as body content.
34
+ */
35
+ function extractFrontmatterAndBody(content, sourcePath) {
36
+ // Strip optional UTF-8 BOM so editors that add it don't break the parser.
37
+ const text = content.startsWith('\uFEFF') ? content.slice(1) : content;
38
+ if (!text.startsWith('---')) {
39
+ throw new ValidationError(`${sourcePath}: missing frontmatter opening delimiter`, [
40
+ {
41
+ type: 'invalid_markdown',
42
+ message: 'File does not begin with a --- frontmatter delimiter.',
43
+ },
44
+ ]);
45
+ }
46
+ // Everything after the three opening dashes.
47
+ const afterOpening = text.slice(3);
48
+ // Find the closing `---` on its own line.
49
+ // The `m` flag makes `^` and `$` match at line boundaries.
50
+ // `\s*` tolerates a trailing carriage return on Windows.
51
+ const closingMatch = /^---\s*$/m.exec(afterOpening);
52
+ if (closingMatch === null) {
53
+ throw new ValidationError(`${sourcePath}: missing frontmatter closing delimiter`, [
54
+ {
55
+ type: 'invalid_markdown',
56
+ message: 'No closing --- delimiter found; the frontmatter block is not terminated.',
57
+ },
58
+ ]);
59
+ }
60
+ const yaml = afterOpening.slice(0, closingMatch.index).trim();
61
+ if (yaml.length === 0) {
62
+ throw new ValidationError(`${sourcePath}: empty frontmatter block`, [
63
+ {
64
+ type: 'invalid_markdown',
65
+ message: 'The frontmatter block between --- delimiters is empty.',
66
+ },
67
+ ]);
68
+ }
69
+ // Skip past the closing --- line itself (index + matched length).
70
+ const body = afterOpening
71
+ .slice(closingMatch.index + closingMatch[0].length)
72
+ .trim();
73
+ return { yaml, body };
74
+ }
75
+ // ---------------------------------------------------------------------------
76
+ // Step 2 — minimal zero-dependency YAML parser
77
+ // ---------------------------------------------------------------------------
78
+ /**
79
+ * Parse a single scalar YAML value into a TypeScript primitive.
80
+ *
81
+ * Supported forms:
82
+ * true / false → boolean
83
+ * integers → number (via Number())
84
+ * "quoted" → string with quotes stripped
85
+ * 'quoted' → string with quotes stripped
86
+ * plain text → string as-is
87
+ *
88
+ * null / ~ is treated as an empty string so the validator can report it as a
89
+ * missing field rather than a type error.
90
+ */
91
+ function parseScalar(raw) {
92
+ if (raw === 'true')
93
+ return true;
94
+ if (raw === 'false')
95
+ return false;
96
+ if (raw === 'null' || raw === '~')
97
+ return '';
98
+ const asNumber = Number(raw);
99
+ if (raw !== '' && !Number.isNaN(asNumber))
100
+ return asNumber;
101
+ if ((raw.startsWith('"') && raw.endsWith('"') && raw.length >= 2) ||
102
+ (raw.startsWith("'") && raw.endsWith("'") && raw.length >= 2)) {
103
+ return raw.slice(1, -1);
104
+ }
105
+ return raw;
106
+ }
107
+ /**
108
+ * Parse the YAML subset used in SKILL.md frontmatter.
109
+ *
110
+ * Supported subset (deliberately minimal):
111
+ * key: scalar value
112
+ * key: ← introduces a block sequence
113
+ * - item ← sequence item (any indent before the dash)
114
+ *
115
+ * Explicitly rejected (fail-fast with invalid_yaml):
116
+ * nested objects { key: { nested: value } }
117
+ * flow sequences [a, b, c]
118
+ * block scalars key: | or key: >
119
+ * YAML anchors / aliases &anchor *ref
120
+ * indented non-sequence lines that are indented but not array items
121
+ *
122
+ * Returns a plain Record<string, unknown>; type checking is the
123
+ * validator's responsibility.
124
+ */
125
+ function parseMinimalYaml(text, sourcePath) {
126
+ const result = {};
127
+ const issues = [];
128
+ let state = { mode: 'idle' };
129
+ const lines = text.split('\n');
130
+ for (let i = 0; i < lines.length; i++) {
131
+ // trimEnd removes trailing \r on Windows; trimStart is intentionally absent
132
+ // so we can detect indentation.
133
+ const line = (lines[i] ?? '').trimEnd();
134
+ // Skip blank lines and full-line comments.
135
+ const trimmed = line.trim();
136
+ if (trimmed === '' || trimmed.startsWith('#'))
137
+ continue;
138
+ // ── Reject unsupported constructs early ──────────────────────────────────
139
+ // Flow sequences and flow mappings.
140
+ if (/^[\w][\w-]*\s*:\s*[\[{]/.test(line)) {
141
+ issues.push({
142
+ type: 'invalid_yaml',
143
+ message: `Line ${i + 1}: flow sequences and mappings are not supported: ${line}`,
144
+ });
145
+ continue;
146
+ }
147
+ // Block scalars (| or >).
148
+ if (/^[\w][\w-]*\s*:\s*[|>]/.test(line)) {
149
+ issues.push({
150
+ type: 'invalid_yaml',
151
+ message: `Line ${i + 1}: block scalars (| >) are not supported: ${line}`,
152
+ });
153
+ continue;
154
+ }
155
+ // Anchors and aliases.
156
+ if (/^[\w][\w-]*\s*:\s*[&*]/.test(line) || trimmed.startsWith('*')) {
157
+ issues.push({
158
+ type: 'invalid_yaml',
159
+ message: `Line ${i + 1}: anchors and aliases are not supported: ${line}`,
160
+ });
161
+ continue;
162
+ }
163
+ // ── Array item: leading whitespace + "- value" ───────────────────────────
164
+ const arrayItemMatch = /^[ \t]+-[ \t]+(.+)$/.exec(line);
165
+ if (arrayItemMatch !== null) {
166
+ if (state.mode !== 'array') {
167
+ issues.push({
168
+ type: 'invalid_yaml',
169
+ message: `Line ${i + 1}: array item found outside an array context: ${line}`,
170
+ });
171
+ continue;
172
+ }
173
+ const item = (arrayItemMatch[1] ?? '').trim();
174
+ const existing = result[state.key];
175
+ if (Array.isArray(existing)) {
176
+ existing.push(item);
177
+ }
178
+ continue;
179
+ }
180
+ // ── Indented line that is not an array item ──────────────────────────────
181
+ // This catches nested mappings and other unsupported indented constructs.
182
+ if (/^[ \t]+\S/.test(line)) {
183
+ issues.push({
184
+ type: 'invalid_yaml',
185
+ message: `Line ${i + 1}: unexpected indented content (nested objects are not supported): ${line}`,
186
+ });
187
+ continue;
188
+ }
189
+ // ── Key-value pair ───────────────────────────────────────────────────────
190
+ // Key names: word characters and hyphens (covers can_execute, risk_level…).
191
+ const kvMatch = /^([\w][\w-]*)\s*:\s*(.*)$/.exec(line);
192
+ if (kvMatch !== null) {
193
+ const key = kvMatch[1] ?? '';
194
+ const rawValue = (kvMatch[2] ?? '').trim();
195
+ if (key === '') {
196
+ // Guard: regex guarantees a non-empty group[1], but noUncheckedIndexedAccess
197
+ // requires an explicit check before use.
198
+ issues.push({
199
+ type: 'invalid_yaml',
200
+ message: `Line ${i + 1}: empty key`,
201
+ });
202
+ continue;
203
+ }
204
+ if (rawValue === '') {
205
+ // Empty value after colon → start of a block sequence.
206
+ result[key] = [];
207
+ state = { mode: 'array', key };
208
+ }
209
+ else {
210
+ result[key] = parseScalar(rawValue);
211
+ state = { mode: 'idle' };
212
+ }
213
+ continue;
214
+ }
215
+ // ── Unrecognised line ────────────────────────────────────────────────────
216
+ issues.push({
217
+ type: 'invalid_yaml',
218
+ message: `Line ${i + 1}: cannot parse line: ${line}`,
219
+ });
220
+ }
221
+ if (issues.length > 0) {
222
+ throw new ValidationError(`${sourcePath}: YAML parse failed with ${issues.length} issue(s)`, issues);
223
+ }
224
+ return result;
225
+ }
226
+ /**
227
+ * Locate all headings in the markdown body and extract the trimmed text
228
+ * content that belongs to each of the five required sections.
229
+ *
230
+ * Matching rules:
231
+ * - Any heading level is accepted (# through ######).
232
+ * - Matching is case-insensitive.
233
+ * - Section content runs from the line after the matched heading to just
234
+ * before the next heading at the SAME or HIGHER level (fewer `#` signs).
235
+ * Deeper subheadings (`###`, `####`, …) within a section are included
236
+ * in that section's content — they do not terminate it.
237
+ * - A section with no content (only whitespace) is treated as absent,
238
+ * the same as a completely missing section.
239
+ *
240
+ * Never throws — absent sections are simply omitted from the result object.
241
+ * The validator is responsible for reporting missing required sections.
242
+ *
243
+ * exactOptionalPropertyTypes compliance: absent sections are built with
244
+ * conditional spread so the key is physically absent, not set to undefined.
245
+ */
246
+ function extractSections(body) {
247
+ // Capture both the `#` sequence (for level) and the heading text.
248
+ const headingPattern = /^(#{1,6})[ \t]+(.+?)[ \t]*$/gm;
249
+ const headings = [];
250
+ let match;
251
+ while ((match = headingPattern.exec(body)) !== null) {
252
+ const hashes = match[1] ?? '';
253
+ const rawText = (match[2] ?? '').trim();
254
+ headings.push({
255
+ level: hashes.length,
256
+ normText: rawText.toLowerCase(),
257
+ lineStart: match.index,
258
+ contentStart: match.index + match[0].length,
259
+ });
260
+ }
261
+ /**
262
+ * Return trimmed content under the named section, or undefined if the
263
+ * heading is absent or the section has no non-whitespace content.
264
+ *
265
+ * The section boundary is the next heading at the same or higher level
266
+ * (level number ≤ this heading's level), NOT the first heading of any level.
267
+ * This allows `###` subheadings inside a `##` section without truncating it.
268
+ */
269
+ function getSection(normalisedName) {
270
+ const idx = headings.findIndex((h) => h.normText === normalisedName);
271
+ if (idx === -1)
272
+ return undefined;
273
+ const heading = headings[idx];
274
+ if (heading === undefined)
275
+ return undefined; // noUncheckedIndexedAccess guard
276
+ // Find the next heading at the same or higher level (= fewer `#` signs).
277
+ let end = body.length;
278
+ for (let j = idx + 1; j < headings.length; j++) {
279
+ const candidate = headings[j];
280
+ if (candidate !== undefined && candidate.level <= heading.level) {
281
+ end = candidate.lineStart;
282
+ break;
283
+ }
284
+ }
285
+ const content = body.slice(heading.contentStart, end).trim();
286
+ return content.length > 0 ? content : undefined;
287
+ }
288
+ // Resolve each section independently before building the result object.
289
+ const purpose = getSection('purpose');
290
+ const whenToUse = getSection('when to use');
291
+ const outputContract = getSection('output contract');
292
+ const guardrails = getSection('guardrails');
293
+ const examples = getSection('examples');
294
+ // Conditional spread ensures absent sections are physically omitted from the
295
+ // object (required by exactOptionalPropertyTypes: true).
296
+ // Pattern: (value !== undefined ? { key: value } : {})
297
+ return {
298
+ ...(purpose !== undefined ? { purpose } : {}),
299
+ ...(whenToUse !== undefined ? { whenToUse } : {}),
300
+ ...(outputContract !== undefined ? { outputContract } : {}),
301
+ ...(guardrails !== undefined ? { guardrails } : {}),
302
+ ...(examples !== undefined ? { examples } : {}),
303
+ };
304
+ }
305
+ // ---------------------------------------------------------------------------
306
+ // Public API
307
+ // ---------------------------------------------------------------------------
308
+ /**
309
+ * Read and parse a single SKILL.md file.
310
+ *
311
+ * Returns a `ParsedSkillFile` whose `frontmatter` field is an untyped object —
312
+ * all type checking and spec validation are deferred to the validator.
313
+ *
314
+ * Throws:
315
+ * SkillLoadError (FILE_NOT_FOUND) — path cannot be read
316
+ * ValidationError (invalid_markdown) — delimiter syntax errors
317
+ * ValidationError (invalid_yaml) — YAML parse errors
318
+ */
319
+ export async function parseSkillFile(filePath) {
320
+ // ── Read from disk ─────────────────────────────────────────────────────────
321
+ let content;
322
+ try {
323
+ content = await readFile(filePath, 'utf-8');
324
+ }
325
+ catch (cause) {
326
+ throw new SkillLoadError('FILE_NOT_FOUND', filePath, cause instanceof Error ? cause.message : String(cause));
327
+ }
328
+ // ── Split frontmatter from body ────────────────────────────────────────────
329
+ const { yaml, body } = extractFrontmatterAndBody(content, filePath);
330
+ // ── Parse YAML (zero dependencies) ────────────────────────────────────────
331
+ const frontmatter = parseMinimalYaml(yaml, filePath);
332
+ // ── Extract body sections (never throws) ──────────────────────────────────
333
+ const sections = extractSections(body);
334
+ return { frontmatter, body, sections };
335
+ }
336
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../src/skills/parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,eAAe,GAEhB,MAAM,YAAY,CAAC;AA8BpB,8EAA8E;AAC9E,uCAAuC;AACvC,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,SAAS,yBAAyB,CAChC,OAAe,EACf,UAAkB;IAElB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ACR,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACvD,CAAC;IACJ,CAAC;IAED,8EAA8E;IAC9E,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,yBAAyB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEpE,6EAA6E;IAC7E,MAAM,WAAW,GAAY,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE9D,6EAA6E;IAC7E,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAEvC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACzC,CAAC"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * UseSteady Skills v1 — registry (file 5 of 8).
3
+ *
4
+ * The public query API over a LoadedSkillRegistry.
5
+ *
6
+ * Everything here is read-only, synchronous, and has no side effects.
7
+ * The registry functions:
8
+ * - surface which skills are eligible for a given trigger context
9
+ * - encode the deterministic-first boundary in the function signatures
10
+ * - return skills in the pre-sorted order established by buildRegistry
11
+ * - never re-sort, never merge outputs, never interpret or decide intent
12
+ *
13
+ * Authority boundary (enforced structurally, not by convention):
14
+ * The registry can tell callers WHICH skills are eligible.
15
+ * It cannot and does not: validate execution, choose final intent,
16
+ * merge candidate outputs, decide approval, or evaluate policy.
17
+ */
18
+ import { type LoadedSkillRegistry, type Skill, type SkillKind, type TriggerReason } from './types.js';
19
+ /**
20
+ * Return all loaded skills of the given kind in their pre-sorted order
21
+ * (ascending priority, then source path as a stable tie-break).
22
+ *
23
+ * Implementation note — exhaustive switch over direct property access:
24
+ * `registry.byKind[kind]` where `kind: SkillKind` could be treated as an
25
+ * index-signature access by the TypeScript compiler under noUncheckedIndexedAccess,
26
+ * returning `readonly Skill[] | undefined`. The switch eliminates the variable
27
+ * key form entirely: each arm uses a specific known property (.interpretation,
28
+ * .workflow_generation, .recovery) whose type is unambiguously `readonly Skill[]`.
29
+ */
30
+ export declare function getSkillsByKind(registry: LoadedSkillRegistry, kind: SkillKind): readonly Skill[];
31
+ /**
32
+ * Return the skills eligible to be consulted for the given trigger context,
33
+ * in priority-ascending order.
34
+ *
35
+ * The boundary is encoded in the signature, not left to caller convention:
36
+ *
37
+ * TriggerReason.kind = 'interpretation'
38
+ * → interpretation skills only
39
+ * → only reaches this path after the deterministic parser returned null
40
+ *
41
+ * TriggerReason.kind = 'workflow_generation'
42
+ * → workflow_generation skills only
43
+ * → only reaches this path on explicit broad/multi-step requests
44
+ *
45
+ * TriggerReason.kind = 'recovery'
46
+ * → recovery skills only
47
+ * → only reaches this path after unsupported / blocked / failed outcomes
48
+ *
49
+ * A caller cannot ask for workflow_generation skills via an interpretation
50
+ * TriggerReason — they are different types. Cross-kind consultation requires
51
+ * constructing a second, explicitly typed TriggerReason.
52
+ *
53
+ * Returns the already-sorted slice from the registry. Callers MUST NOT
54
+ * re-sort the result — the established evaluation order is part of the contract.
55
+ */
56
+ export declare function getTriggerableSkills(registry: LoadedSkillRegistry, triggerReason: TriggerReason): readonly Skill[];
57
+ /**
58
+ * Guard helper: answers "are any skills of the needed kind loaded?"
59
+ *
60
+ * Callers should call this BEFORE constructing the trigger context and
61
+ * preparing to invoke skills, to short-circuit the overhead when no
62
+ * skills of the needed kind are installed.
63
+ *
64
+ * This function does NOT answer "would a suggestion actually help?" or
65
+ * "is the input plausibly actionable?" — those are caller-side judgements
66
+ * that require runtime context the registry does not and should not have.
67
+ * This function only checks presence: length > 0.
68
+ */
69
+ export declare function shouldConsultSkills(registry: LoadedSkillRegistry, triggerReason: TriggerReason): boolean;
70
+ /**
71
+ * The ordering of skills returned by getSkillsByKind and getTriggerableSkills
72
+ * is determined once by buildRegistry and must not be altered by callers.
73
+ *
74
+ * Order within each kind:
75
+ * 1. Ascending `priority` (lower number = evaluated first)
76
+ * 2. Source path, locale-insensitive alphabetical (stable tie-break)
77
+ *
78
+ * Skills with default priority (100) are sorted purely by path.
79
+ * A skill with priority 50 is always evaluated before one with priority 100.
80
+ *
81
+ * This object is provided for documentation and test reference — not as a
82
+ * runtime sort function (sorting happens in buildRegistry, not here).
83
+ */
84
+ export declare const ORDERING_CONTRACT: {
85
+ readonly primary: "priority ascending";
86
+ readonly tieBreaker: "source path alphabetical";
87
+ readonly setBy: "buildRegistry";
88
+ readonly mutableBy: "never — re-sorting the result is a contract violation";
89
+ };
90
+ /**
91
+ * A lightweight summary of a registry's contents.
92
+ * Safe to log, safe to include in audit records.
93
+ * Does not expose skill bodies or source paths.
94
+ */
95
+ export interface RegistryStats {
96
+ readonly total: number;
97
+ readonly byKind: {
98
+ readonly interpretation: number;
99
+ readonly workflow_generation: number;
100
+ readonly recovery: number;
101
+ };
102
+ readonly loadedAt: Date;
103
+ readonly hasAnySkills: boolean;
104
+ }
105
+ /**
106
+ * Return a lightweight stats snapshot of the registry.
107
+ *
108
+ * Intended for: startup logging, health checks, audit record metadata,
109
+ * and test assertions about the loaded state.
110
+ */
111
+ export declare function getRegistryStats(registry: LoadedSkillRegistry): RegistryStats;
112
+ /**
113
+ * Return the name and version of every skill in the registry, grouped by kind.
114
+ * Useful for startup logs without revealing skill bodies.
115
+ */
116
+ export interface SkillSummary {
117
+ readonly name: string;
118
+ readonly version: string;
119
+ readonly priority: number;
120
+ readonly sourcePath: string;
121
+ }
122
+ export declare function getSkillSummaries(registry: LoadedSkillRegistry): Readonly<Record<SkillKind, readonly SkillSummary[]>>;
123
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/skills/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,YAAY,CAAC;AAMpB;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,QA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UseSteady Skills v1 — registry (file 5 of 8).
3
+ *
4
+ * The public query API over a LoadedSkillRegistry.
5
+ *
6
+ * Everything here is read-only, synchronous, and has no side effects.
7
+ * The registry functions:
8
+ * - surface which skills are eligible for a given trigger context
9
+ * - encode the deterministic-first boundary in the function signatures
10
+ * - return skills in the pre-sorted order established by buildRegistry
11
+ * - never re-sort, never merge outputs, never interpret or decide intent
12
+ *
13
+ * Authority boundary (enforced structurally, not by convention):
14
+ * The registry can tell callers WHICH skills are eligible.
15
+ * It cannot and does not: validate execution, choose final intent,
16
+ * merge candidate outputs, decide approval, or evaluate policy.
17
+ */
18
+ // ---------------------------------------------------------------------------
19
+ // Kind-based lookup
20
+ // ---------------------------------------------------------------------------
21
+ /**
22
+ * Return all loaded skills of the given kind in their pre-sorted order
23
+ * (ascending priority, then source path as a stable tie-break).
24
+ *
25
+ * Implementation note — exhaustive switch over direct property access:
26
+ * `registry.byKind[kind]` where `kind: SkillKind` could be treated as an
27
+ * index-signature access by the TypeScript compiler under noUncheckedIndexedAccess,
28
+ * returning `readonly Skill[] | undefined`. The switch eliminates the variable
29
+ * key form entirely: each arm uses a specific known property (.interpretation,
30
+ * .workflow_generation, .recovery) whose type is unambiguously `readonly Skill[]`.
31
+ */
32
+ export function getSkillsByKind(registry, kind) {
33
+ switch (kind) {
34
+ case 'interpretation': return registry.byKind.interpretation;
35
+ case 'workflow_generation': return registry.byKind.workflow_generation;
36
+ case 'recovery': return registry.byKind.recovery;
37
+ }
38
+ }
39
+ // ---------------------------------------------------------------------------
40
+ // Deterministic-first boundary
41
+ // ---------------------------------------------------------------------------
42
+ /**
43
+ * Return the skills eligible to be consulted for the given trigger context,
44
+ * in priority-ascending order.
45
+ *
46
+ * The boundary is encoded in the signature, not left to caller convention:
47
+ *
48
+ * TriggerReason.kind = 'interpretation'
49
+ * → interpretation skills only
50
+ * → only reaches this path after the deterministic parser returned null
51
+ *
52
+ * TriggerReason.kind = 'workflow_generation'
53
+ * → workflow_generation skills only
54
+ * → only reaches this path on explicit broad/multi-step requests
55
+ *
56
+ * TriggerReason.kind = 'recovery'
57
+ * → recovery skills only
58
+ * → only reaches this path after unsupported / blocked / failed outcomes
59
+ *
60
+ * A caller cannot ask for workflow_generation skills via an interpretation
61
+ * TriggerReason — they are different types. Cross-kind consultation requires
62
+ * constructing a second, explicitly typed TriggerReason.
63
+ *
64
+ * Returns the already-sorted slice from the registry. Callers MUST NOT
65
+ * re-sort the result — the established evaluation order is part of the contract.
66
+ */
67
+ export function getTriggerableSkills(registry, triggerReason) {
68
+ // Route directly from the trigger's kind to the matching bucket.
69
+ // No additional filtering here — the caller chose the trigger context;
70
+ // the registry's only job is to return the right pre-sorted set.
71
+ return getSkillsByKind(registry, triggerReason.kind);
72
+ }
73
+ /**
74
+ * Guard helper: answers "are any skills of the needed kind loaded?"
75
+ *
76
+ * Callers should call this BEFORE constructing the trigger context and
77
+ * preparing to invoke skills, to short-circuit the overhead when no
78
+ * skills of the needed kind are installed.
79
+ *
80
+ * This function does NOT answer "would a suggestion actually help?" or
81
+ * "is the input plausibly actionable?" — those are caller-side judgements
82
+ * that require runtime context the registry does not and should not have.
83
+ * This function only checks presence: length > 0.
84
+ */
85
+ export function shouldConsultSkills(registry, triggerReason) {
86
+ return getSkillsByKind(registry, triggerReason.kind).length > 0;
87
+ }
88
+ // ---------------------------------------------------------------------------
89
+ // Ordering guarantee (documented, not enforced by runtime — callers must read)
90
+ // ---------------------------------------------------------------------------
91
+ /**
92
+ * The ordering of skills returned by getSkillsByKind and getTriggerableSkills
93
+ * is determined once by buildRegistry and must not be altered by callers.
94
+ *
95
+ * Order within each kind:
96
+ * 1. Ascending `priority` (lower number = evaluated first)
97
+ * 2. Source path, locale-insensitive alphabetical (stable tie-break)
98
+ *
99
+ * Skills with default priority (100) are sorted purely by path.
100
+ * A skill with priority 50 is always evaluated before one with priority 100.
101
+ *
102
+ * This object is provided for documentation and test reference — not as a
103
+ * runtime sort function (sorting happens in buildRegistry, not here).
104
+ */
105
+ export const ORDERING_CONTRACT = {
106
+ primary: 'priority ascending',
107
+ tieBreaker: 'source path alphabetical',
108
+ setBy: 'buildRegistry',
109
+ mutableBy: 'never — re-sorting the result is a contract violation',
110
+ };
111
+ /**
112
+ * Return a lightweight stats snapshot of the registry.
113
+ *
114
+ * Intended for: startup logging, health checks, audit record metadata,
115
+ * and test assertions about the loaded state.
116
+ */
117
+ export function getRegistryStats(registry) {
118
+ return {
119
+ total: registry.all.length,
120
+ byKind: {
121
+ interpretation: registry.byKind.interpretation.length,
122
+ workflow_generation: registry.byKind.workflow_generation.length,
123
+ recovery: registry.byKind.recovery.length,
124
+ },
125
+ loadedAt: registry.loadedAt,
126
+ hasAnySkills: registry.all.length > 0,
127
+ };
128
+ }
129
+ export function getSkillSummaries(registry) {
130
+ function toSummary(skill) {
131
+ return {
132
+ name: skill.metadata.name,
133
+ version: skill.metadata.version,
134
+ priority: skill.metadata.priority,
135
+ sourcePath: skill.sourcePath,
136
+ };
137
+ }
138
+ return {
139
+ interpretation: registry.byKind.interpretation.map(toSummary),
140
+ workflow_generation: registry.byKind.workflow_generation.map(toSummary),
141
+ recovery: registry.byKind.recovery.map(toSummary),
142
+ };
143
+ }
144
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/skills/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AASH,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAC7B,QAA6B,EAC7B,IAAe;IAEf,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,gBAAgB,CAAC,CAAM,OAAO,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC;QAClE,KAAK,qBAAqB,CAAC,CAAC,OAAO,QAAQ,CAAC,MAAM,CAAC,mBAAmB,CAAC;QACvE,KAAK,UAAU,CAAC,CAAY,OAAO,QAAQ,CAAC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