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,88 @@
1
+ /**
2
+ * Change command parser.
3
+ *
4
+ * Supported formats — text replacement:
5
+ * replace "X" with "Y" in <file>
6
+ * patch <file> search="X" replace="Y"
7
+ *
8
+ * Supported formats — filesystem operations:
9
+ * create (folder|directory) <path>
10
+ * create file <path>
11
+ * rename <path> to <newPath>
12
+ * (delete|remove) (file|folder|directory)? <path>
13
+ *
14
+ * Returns null for any other input shape.
15
+ */
16
+ import { normalizeIntent, intentToChange } from "./intent.js";
17
+ // ─── Text replacement patterns ────────────────────────────────────────────────
18
+ const REPLACE_PATTERN = /^\s*replace\s+"([^"]+)"\s+with\s+"([^"]+)"\s+in\s+(\S+)/i;
19
+ const PATCH_PATTERN = /^\s*patch\s+(\S+)\s+search="([^"]+)"\s+replace="([^"]+)"/i;
20
+ // ─── Filesystem operation patterns ───────────────────────────────────────────
21
+ // create (folder|directory) <path>
22
+ const CREATE_DIR_PATTERN = /^\s*create\s+(?:folder|directory)\s+(\S+)/i;
23
+ // create file <path>
24
+ const CREATE_FILE_PATTERN = /^\s*create\s+file\s+(\S+)/i;
25
+ // rename <path> to <newPath>
26
+ const RENAME_PATTERN = /^\s*rename\s+(\S+)\s+to\s+(\S+)/i;
27
+ // (delete|remove) file|folder|directory <path> — explicit keyword, any path token
28
+ const DELETE_WITH_KEYWORD_PATTERN = /^\s*(?:delete|remove)\s+(?:file|folder|directory)\s+(\S+)/i;
29
+ // (delete|remove) <path> — bare path must contain a slash or extension
30
+ // Intentionally rejects bare nouns ("delete cache", "delete everything")
31
+ // to match the normalizer's looksLikePath constraint.
32
+ const DELETE_BARE_PATTERN = /^\s*(?:delete|remove)\s+((?:\S+\/\S+|\S+\.\S+))/i;
33
+ // ─── Parser ───────────────────────────────────────────────────────────────────
34
+ export function parseChange(input) {
35
+ // ── 1. Deterministic NL normalization (handles natural-language variants) ──
36
+ // This runs before strict patterns so "create a test folder" and
37
+ // "make a folder called components" are recognized without silent skip.
38
+ const intent = normalizeIntent(input.trim());
39
+ if (intent !== null)
40
+ return intentToChange(intent);
41
+ // ── 2. Strict patterns (canonical exact-match formats) ────────────────────
42
+ // Text replacement (existing)
43
+ const replaceMatch = REPLACE_PATTERN.exec(input);
44
+ if (replaceMatch !== null) {
45
+ const fp = replaceMatch[3];
46
+ return {
47
+ oldValue: replaceMatch[1],
48
+ newValue: replaceMatch[2],
49
+ ...(fp !== undefined ? { filePath: fp } : {}),
50
+ };
51
+ }
52
+ const patchMatch = PATCH_PATTERN.exec(input);
53
+ if (patchMatch !== null) {
54
+ const fp = patchMatch[1];
55
+ return {
56
+ oldValue: patchMatch[2],
57
+ newValue: patchMatch[3],
58
+ ...(fp !== undefined ? { filePath: fp } : {}),
59
+ };
60
+ }
61
+ // Filesystem operations (new)
62
+ const createDirMatch = CREATE_DIR_PATTERN.exec(input);
63
+ if (createDirMatch !== null) {
64
+ return { operationType: "create_dir", dirPath: createDirMatch[1] };
65
+ }
66
+ const createFileMatch = CREATE_FILE_PATTERN.exec(input);
67
+ if (createFileMatch !== null) {
68
+ return { operationType: "write_file", filePath: createFileMatch[1], content: "" };
69
+ }
70
+ const renameMatch = RENAME_PATTERN.exec(input);
71
+ if (renameMatch !== null) {
72
+ return { operationType: "rename", filePath: renameMatch[1], newPath: renameMatch[2] };
73
+ }
74
+ const deleteKwMatch = DELETE_WITH_KEYWORD_PATTERN.exec(input);
75
+ if (deleteKwMatch !== null) {
76
+ return { operationType: "delete_file", filePath: deleteKwMatch[1] };
77
+ }
78
+ const deleteBareMatch = DELETE_BARE_PATTERN.exec(input);
79
+ if (deleteBareMatch !== null) {
80
+ return { operationType: "delete_file", filePath: deleteBareMatch[1] };
81
+ }
82
+ return null;
83
+ }
84
+ /** Extract the filename from a path without importing node:path. */
85
+ export function basename(filePath) {
86
+ return filePath.split(/[/\\]/).pop() ?? filePath;
87
+ }
88
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../src/understand/interpretation/parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE9D,iFAAiF;AAEjF,MAAM,eAAe,GACnB,0DAA0D,CAAC;AAE7D,MAAM,aAAa,GACjB,2DAA2D,CAAC;AAE9D,gFAAgF;AAEhF,mCAAmC;AACnC,MAAM,kBAAkB,GACtB,4CAA4C,CAAC;AAE/C,qBAAqB;AACrB,MAAM,mBAAmB,GACvB,4BAA4B,CAAC;AAE/B,6BAA6B;AAC7B,MAAM,cAAc,GAClB,kCA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QAAgB;IACvC,OAAO,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,QAAQ,CAAC;AACnD,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Interpretation rules — v1.
3
+ *
4
+ * Three categories are implemented:
5
+ * 1. Tailwind color change (priority 10) — most specific, deterministic
6
+ * 2. CSS color change (priority 20) — hex / rgb / hsl / CSS property
7
+ * 3. Config value change (priority 30) — config files or value patterns
8
+ * 4. Text literal change (priority 40) — human-readable UI copy
9
+ *
10
+ * Priority order matters: a Tailwind class could also look like a text literal
11
+ * if rule ordering were reversed. The most specific rule must run first.
12
+ */
13
+ import type { InterpretationRule } from "./types.js";
14
+ export declare const tailwindColorRule: InterpretationRule;
15
+ export declare const cssColorRule: InterpretationRule;
16
+ export declare const configValueRule: InterpretationRule;
17
+ export declare const textLiteralRule: InterpretationRule;
18
+ export declare const ALL_INTERPRETATION_RULES: ReadonlyArray<InterpretationRule>;
19
+ //# sourceMappingURL=rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/understand/interpretation/rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAwB,kBAAkB,EAAiB,MAAM,YAAY,CAAC;AA0H1F,eAAO,MAAM,iBAAiB,EAAE,kBAgC/B,CAAC;AAOF,eAAO,MAAM,YAAY,EAAE,kBA6B1B,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,kBAyC7B,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,kBAwB7B,CAAC;AAIF,eAAO,MAAM,wBAAwB,EAAE,aAAa,CAAC,kBAAkB,CAK9B,CAAC"}
@@ -0,0 +1,222 @@
1
+ /**
2
+ * Interpretation rules — v1.
3
+ *
4
+ * Three categories are implemented:
5
+ * 1. Tailwind color change (priority 10) — most specific, deterministic
6
+ * 2. CSS color change (priority 20) — hex / rgb / hsl / CSS property
7
+ * 3. Config value change (priority 30) — config files or value patterns
8
+ * 4. Text literal change (priority 40) — human-readable UI copy
9
+ *
10
+ * Priority order matters: a Tailwind class could also look like a text literal
11
+ * if rule ordering were reversed. The most specific rule must run first.
12
+ */
13
+ import { basename } from "./parser.js";
14
+ // ─── Utilities ────────────────────────────────────────────────────────────────
15
+ const TAILWIND_COLOR_NAMES = "slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|" +
16
+ "teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|white|black|" +
17
+ "transparent|current|inherit";
18
+ const TAILWIND_PREFIXES = "bg|text|border|ring|from|to|via|fill|stroke|shadow|outline|caret|accent";
19
+ const TAILWIND_COLOR_RE = new RegExp(`\\b(?:${TAILWIND_PREFIXES})-(?:${TAILWIND_COLOR_NAMES})(?:-\\d+)?\\b`, "i");
20
+ const TAILWIND_PREFIX_LABELS = {
21
+ bg: "background color",
22
+ text: "text color",
23
+ border: "border color",
24
+ ring: "ring / focus color",
25
+ from: "gradient start color",
26
+ to: "gradient end color",
27
+ via: "gradient midpoint color",
28
+ fill: "fill color",
29
+ stroke: "stroke color",
30
+ shadow: "shadow color",
31
+ outline: "outline color",
32
+ caret: "caret color",
33
+ accent: "accent color",
34
+ };
35
+ function tailwindColorClass(value) {
36
+ return TAILWIND_COLOR_RE.exec(value)?.[0] ?? null;
37
+ }
38
+ function tailwindPrefix(cls) {
39
+ const prefix = /^([a-z]+)-/i.exec(cls)?.[1]?.toLowerCase();
40
+ return prefix !== undefined
41
+ ? (TAILWIND_PREFIX_LABELS[prefix] ?? "color")
42
+ : "color";
43
+ }
44
+ // CSS color patterns
45
+ const CSS_COLOR_VALUE_RE = /#[0-9a-fA-F]{3,8}\b|rgb\s*\(|rgba\s*\(|hsl\s*\(|hsla\s*\(/i;
46
+ const CSS_NAMED_COLOR_RE = /\b(?:red|blue|green|yellow|white|black|orange|purple|pink|gray|grey|cyan|magenta|lime|coral|teal|navy|maroon|olive|silver|gold)\b/i;
47
+ const CSS_PROPERTY_RE = /\b(?:color|background-color|background|border-color|fill|stroke)\s*:/i;
48
+ const CSS_FILE_RE = /\.(css|scss|sass|less|styl)$/i;
49
+ function isCssColor(value) {
50
+ return (CSS_COLOR_VALUE_RE.test(value) ||
51
+ CSS_NAMED_COLOR_RE.test(value) ||
52
+ CSS_PROPERTY_RE.test(value));
53
+ }
54
+ // Config file / value patterns
55
+ const CONFIG_FILE_RE = /\.(json|yaml|yml|toml|env|ini|properties|conf|config)$/i;
56
+ const CONFIG_FILE_NAME_RE = /(?:config|settings|env|rc)\.[a-z]+$/i;
57
+ const CONFIG_VALUE_RE = /^\d+$|^https?:\/\/|^(true|false)$/i;
58
+ function isConfigFile(filePath) {
59
+ if (filePath === undefined)
60
+ return false;
61
+ return CONFIG_FILE_RE.test(filePath) || CONFIG_FILE_NAME_RE.test(filePath);
62
+ }
63
+ function isConfigValue(value) {
64
+ return CONFIG_VALUE_RE.test(value);
65
+ }
66
+ // Text literal heuristic
67
+ const TEXT_LITERAL_RE = /^[a-zA-Z][a-zA-Z0-9\s.,!?:;'\-/()\[\]]*$/;
68
+ const CODE_NOISE_RE = /[{}<>@#$%^&*=_\\|`~]/;
69
+ // Matches all-lowercase single tokens — utility classes, state names, event names,
70
+ // design tokens, CSS property identifiers. These are code, not human UI copy.
71
+ // Examples: flex, block, hidden, submit, disabled, primary, error, bg-cover, text-sm
72
+ const LOWERCASE_TOKEN_RE = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
73
+ // Tailwind/CSS fraction utilities: w-1/2, h-2/3, inset-1/2
74
+ // The "/" between numbers is a strong code token indicator.
75
+ const CSS_FRACTION_RE = /^[a-z-]*\d+\/\d+$/i;
76
+ // CSS property declarations: "margin: 16px", "font-size: 14px", "z-index: 10"
77
+ // A word (possibly hyphenated) followed by a colon is a CSS property, not UI text.
78
+ const CSS_PROPERTY_DECL_RE = /^[a-z][a-z-]*\s*:/i;
79
+ function isTextLiteral(value) {
80
+ if (!TEXT_LITERAL_RE.test(value))
81
+ return false;
82
+ if (CODE_NOISE_RE.test(value))
83
+ return false;
84
+ if (value.length < 2 || value.length > 120)
85
+ return false;
86
+ // Exclude lowercase-only tokens — code identifiers, not human UI copy.
87
+ // Text literals must either start uppercase OR be multi-word phrases.
88
+ if (LOWERCASE_TOKEN_RE.test(value))
89
+ return false;
90
+ // Exclude Tailwind/CSS fractional utilities like w-1/2, h-2/3.
91
+ if (CSS_FRACTION_RE.test(value))
92
+ return false;
93
+ // Exclude CSS property declarations like "margin: 16px", "font-size: 14px".
94
+ if (CSS_PROPERTY_DECL_RE.test(value))
95
+ return false;
96
+ return true;
97
+ }
98
+ // ─── Rule 1: Tailwind color change ────────────────────────────────────────────
99
+ export const tailwindColorRule = {
100
+ id: "tailwind_color_change",
101
+ priority: 10,
102
+ matches(parsed) {
103
+ return (tailwindColorClass(parsed.oldValue) !== null ||
104
+ tailwindColorClass(parsed.newValue) !== null);
105
+ },
106
+ interpret(parsed) {
107
+ const oldCls = tailwindColorClass(parsed.oldValue);
108
+ const newCls = tailwindColorClass(parsed.newValue);
109
+ if (oldCls === null && newCls === null)
110
+ return null;
111
+ const property = tailwindPrefix(oldCls ?? newCls ?? "");
112
+ const fileLabel = parsed.filePath !== undefined
113
+ ? ` in ${basename(parsed.filePath)}`
114
+ : "";
115
+ return {
116
+ category: "tailwind_color_change",
117
+ summary: `Changes ${property} from '${parsed.oldValue}' to '${parsed.newValue}'${fileLabel}.`,
118
+ impact: [
119
+ "Visual change only — no logic, data, or behavior impact.",
120
+ `Affects rendered ${property}.`,
121
+ "Verify in browser after applying.",
122
+ ],
123
+ confidence: "high",
124
+ };
125
+ },
126
+ };
127
+ // ─── Rule 2: CSS color change ─────────────────────────────────────────────────
128
+ // NOTE: File extension alone is NOT sufficient — .css files contain many non-color
129
+ // properties (width, margin, font-size, z-index, etc.). We only fire when the
130
+ // old or new value actually contains color-indicating content.
131
+ export const cssColorRule = {
132
+ id: "css_color_change",
133
+ priority: 20,
134
+ matches(parsed) {
135
+ return isCssColor(parsed.oldValue) || isCssColor(parsed.newValue);
136
+ },
137
+ interpret(parsed) {
138
+ // Determine confidence: high if CSS property declaration is present,
139
+ // medium if only a color value or file-extension match.
140
+ const hasPropertyDecl = CSS_PROPERTY_RE.test(parsed.oldValue) ||
141
+ CSS_PROPERTY_RE.test(parsed.newValue);
142
+ const fileLabel = parsed.filePath !== undefined
143
+ ? ` in ${basename(parsed.filePath)}`
144
+ : "";
145
+ return {
146
+ category: "css_color_change",
147
+ summary: `Changes CSS color value from '${parsed.oldValue}' to '${parsed.newValue}'${fileLabel}.`,
148
+ impact: [
149
+ "Visual change only — no logic, data, or behavior impact.",
150
+ "Verify rendered result in browser after applying.",
151
+ ],
152
+ confidence: hasPropertyDecl ? "high" : "medium",
153
+ };
154
+ },
155
+ };
156
+ // ─── Rule 3: Config value change ──────────────────────────────────────────────
157
+ export const configValueRule = {
158
+ id: "config_value_change",
159
+ priority: 30,
160
+ matches(parsed) {
161
+ return (isConfigFile(parsed.filePath) ||
162
+ (isConfigValue(parsed.oldValue) && isConfigValue(parsed.newValue)));
163
+ },
164
+ interpret(parsed) {
165
+ const fileLabel = parsed.filePath !== undefined
166
+ ? ` in ${basename(parsed.filePath)}`
167
+ : "";
168
+ // Produce tailored impact hints for known value shapes.
169
+ const impact = [
170
+ `Configuration change: '${parsed.oldValue}' → '${parsed.newValue}'.`,
171
+ ];
172
+ if (/^\d+$/.test(parsed.oldValue) && /^\d+$/.test(parsed.newValue)) {
173
+ // "may affect port, timeout, or limit" removed — too speculative without key context
174
+ impact.push("Numeric value change — verify all usages of this value have been updated.");
175
+ }
176
+ else if (/^https?:\/\//.test(parsed.oldValue) ||
177
+ /^https?:\/\//.test(parsed.newValue)) {
178
+ // "endpoint" removed — implies API server without proof
179
+ impact.push("URL value change — verify the new address is correct and reachable.");
180
+ }
181
+ else if (/^(true|false)$/i.test(parsed.oldValue)) {
182
+ impact.push("Boolean flag change — may toggle a feature or mode.");
183
+ }
184
+ return {
185
+ category: "config_value_change",
186
+ summary: `Changes configuration value from '${parsed.oldValue}' to '${parsed.newValue}'${fileLabel}.`,
187
+ impact,
188
+ confidence: isConfigFile(parsed.filePath) ? "high" : "medium",
189
+ };
190
+ },
191
+ };
192
+ // ─── Rule 4: Text literal change ──────────────────────────────────────────────
193
+ export const textLiteralRule = {
194
+ id: "text_literal_change",
195
+ priority: 40,
196
+ matches(parsed) {
197
+ return isTextLiteral(parsed.oldValue) || isTextLiteral(parsed.newValue);
198
+ },
199
+ interpret(parsed) {
200
+ const fileLabel = parsed.filePath !== undefined
201
+ ? ` in ${basename(parsed.filePath)}`
202
+ : "";
203
+ return {
204
+ category: "text_literal_change",
205
+ summary: `Changes text '${parsed.oldValue}' to '${parsed.newValue}'${fileLabel}.`,
206
+ impact: [
207
+ "User-visible text change.",
208
+ "No logic, data, or behavior impact.",
209
+ "Review for consistency with other UI copy if this label appears elsewhere.",
210
+ ],
211
+ confidence: "medium",
212
+ };
213
+ },
214
+ };
215
+ // ─── Ordered registry ─────────────────────────────────────────────────────────
216
+ export const ALL_INTERPRETATION_RULES = [
217
+ tailwindColorRule,
218
+ cssColorRule,
219
+ configValueRule,
220
+ textLiteralRule,
221
+ ].sort((a, b) => a.priority - b.priority);
222
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/understand/interpretation/rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,iFAAiF;AAEjF,MAAM,oBAAoB,GACxB,2EAA2E;IAC3E,wEAAwE;IACxE,6BAA6B,CAAC;AAEhC,MAAM,iBAAiB,GACrB,yEAAyE,CAAC;AAE5E,MAAM,iBAAiB,GAAG,IAAI,MAAM,CAClC,SAAS,iBAAiB,QAAQ,oBAAoB,gBAAgB,EACtE,GAAG,CACJ,CAAC;AAEF,MAAM,sBAA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ACd,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,KAAK,SAAS;YAC7C,CAAC,CAAC,OAAO,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;YACpC,CAAC,CAAC,EAAE,CAAC;QAEP,OAAO;YACL,QAAQ,EAAI,qBAAqB;YACjC,OAAO,EAAK,iBAAiB,MAAM,CAAC,QAAQ,SAAS,MAAM,CAAC,QAAQ,IAAI,SAAS,GAAG;YACpF,MAAM,EAAM;gBACV,2BAA2B;gBAC3B,qCAAqC;gBACrC,4EAA4E;aAC7E;YACD,UAAU,EAAE,QAAQ;SACrB,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,iFAAiF;AAEjF,MAAM,CAAC,MAAM,wBAAwB,GAAsC;IACzE,iBAAiB;IACjB,YAAY;IACZ,eAAe;IACf,eAAe;CAChB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Change Interpretation types.
3
+ *
4
+ * ── Scope (v1) ────────────────────────────────────────────────────────────────
5
+ * 1. Tailwind / CSS color changes
6
+ * 2. Text literal changes (button labels, headings, UI copy)
7
+ * 3. Simple config value changes (port, URL, boolean, key-value)
8
+ *
9
+ * ── Role of interpretation ────────────────────────────────────────────────────
10
+ * Interpretation is ADVISORY.
11
+ * It does not change the execute/guide/refuse decision — that is locked
12
+ * before interpretation runs.
13
+ * It describes WHAT the human will experience from the change, not WHETHER
14
+ * the change is allowed.
15
+ *
16
+ * ── ParsedChange ──────────────────────────────────────────────────────────────
17
+ * All interpretation operates on a parsed representation of a structured
18
+ * change command (replace "X" with "Y" in file, or patch file search="X" replace="Y").
19
+ * Interpretation returns null for any input that cannot be parsed into this form.
20
+ *
21
+ * ── InterpretationRule ────────────────────────────────────────────────────────
22
+ * Registry-driven, priority-ordered, deterministic.
23
+ * Same shape as Safety and Completion rules — ownership, priority, traceability.
24
+ */
25
+ export type InterpretationCategory = "tailwind_color_change" | "css_color_change" | "text_literal_change" | "config_value_change";
26
+ export type InterpretationResult = {
27
+ readonly summary: string;
28
+ readonly impact: readonly string[];
29
+ readonly confidence: "high" | "medium" | "low";
30
+ readonly category: InterpretationCategory;
31
+ };
32
+ /**
33
+ * Parsed representation of a text replacement command.
34
+ * Both `replace "X" with "Y" in <file>` and `patch <file> search="X" replace="Y"`
35
+ * reduce to this shape.
36
+ */
37
+ export type ReplaceChange = {
38
+ readonly oldValue: string;
39
+ readonly newValue: string;
40
+ readonly filePath?: string;
41
+ };
42
+ /**
43
+ * Filesystem operation — deterministic primitives that bypass the intake pipeline.
44
+ *
45
+ * These are explicit operations with no ambiguity — the user states exactly what
46
+ * to do. They do not go through safety/completeness intake; they go straight to
47
+ * human approval and then execution.
48
+ */
49
+ export type FsChange = {
50
+ readonly operationType: "create_dir";
51
+ readonly dirPath: string;
52
+ } | {
53
+ readonly operationType: "write_file";
54
+ readonly filePath: string;
55
+ readonly content: string;
56
+ } | {
57
+ readonly operationType: "rename";
58
+ readonly filePath: string;
59
+ readonly newPath: string;
60
+ } | {
61
+ readonly operationType: "delete_file";
62
+ readonly filePath: string;
63
+ };
64
+ /**
65
+ * Parsed representation of any structured command — replacement or filesystem op.
66
+ */
67
+ export type ParsedChange = ReplaceChange | FsChange;
68
+ /** Type guard: true when pc is a filesystem operation (not a text replacement). */
69
+ export declare function isFsChange(pc: ParsedChange): pc is FsChange;
70
+ /**
71
+ * An InterpretationRule classifies a ReplaceChange into a category and produces
72
+ * a human-readable description.
73
+ *
74
+ * Rules MUST:
75
+ * - Be deterministic (same parsed input → same output)
76
+ * - Return null if the change is outside their scope
77
+ * - Never infer intent beyond what the old/new values demonstrate
78
+ *
79
+ * Priority: lower number = runs first.
80
+ *
81
+ * Note: rules only apply to ReplaceChange. FsChange operations have no
82
+ * interpretation rules — their intent is fully explicit in the operation type.
83
+ */
84
+ export type InterpretationRule = {
85
+ readonly id: string;
86
+ readonly priority: number;
87
+ matches(parsed: ReplaceChange): boolean;
88
+ interpret(parsed: ReplaceChange): InterpretationResult | null;
89
+ };
90
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/understand/interpretation/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,MAAM,sBAAsB,GAC9B,uBAAuB,GACvB,kBAAkB,GAClB,qBAAqB,GACrB,qBAAqB,CAAC;AAE1B,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC;CAC3C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAChB;IAAE,QAAQ,CAAC,aAAa,EAAE,YAAY,CAAC;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACnE;IAAE,QAAQ,CAAC,aAAa,EAAE,YAAY,CAAC;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC9F;IAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC;IAAM,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC9F;IAAE,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,QAAQ,CAAC;AAEpD,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,EAAE,EAAE,YAAY,GAAG,EAAE,IAAI,QAAQ,CAE3D;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC;IACxC,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,oBAAoB,GAAG,IAAI,CAAC;CAC/D,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Change Interpretation types.
3
+ *
4
+ * ── Scope (v1) ────────────────────────────────────────────────────────────────
5
+ * 1. Tailwind / CSS color changes
6
+ * 2. Text literal changes (button labels, headings, UI copy)
7
+ * 3. Simple config value changes (port, URL, boolean, key-value)
8
+ *
9
+ * ── Role of interpretation ────────────────────────────────────────────────────
10
+ * Interpretation is ADVISORY.
11
+ * It does not change the execute/guide/refuse decision — that is locked
12
+ * before interpretation runs.
13
+ * It describes WHAT the human will experience from the change, not WHETHER
14
+ * the change is allowed.
15
+ *
16
+ * ── ParsedChange ──────────────────────────────────────────────────────────────
17
+ * All interpretation operates on a parsed representation of a structured
18
+ * change command (replace "X" with "Y" in file, or patch file search="X" replace="Y").
19
+ * Interpretation returns null for any input that cannot be parsed into this form.
20
+ *
21
+ * ── InterpretationRule ────────────────────────────────────────────────────────
22
+ * Registry-driven, priority-ordered, deterministic.
23
+ * Same shape as Safety and Completion rules — ownership, priority, traceability.
24
+ */
25
+ /** Type guard: true when pc is a filesystem operation (not a text replacement). */
26
+ export function isFsChange(pc) {
27
+ return "operationType" in pc;
28
+ }
29
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/understand/interpretation/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA4CH,mFAAmF;AACnF,MAAM,UAAU,UAAU,CAAC,EAAgB;IACzC,OAAO,eAAe,IAAI,EAAE,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Shared types for the Understand layer.
3
+ *
4
+ * The Understand layer is ADVISORY, not authoritative.
5
+ * It reports on what it observes; it does not decide what happens.
6
+ * The Response Planner makes all decisions.
7
+ */
8
+ export type UnderstandContext = {
9
+ readonly hasPriorSession: boolean;
10
+ readonly lastInput?: string;
11
+ readonly lastResult?: string;
12
+ };
13
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/understand/shared/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Shared types for the Understand layer.
3
+ *
4
+ * The Understand layer is ADVISORY, not authoritative.
5
+ * It reports on what it observes; it does not decide what happens.
6
+ * The Response Planner makes all decisions.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/understand/shared/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,4 @@
1
+ export type { SilentGuidanceMode } from "./types.js";
2
+ export { selectSilentGuidanceMode } from "./selector.js";
3
+ export { getSilentGuidanceSteps } from "./templates.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/understand/silent-guidance/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAO,eAAe,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAS,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { selectSilentGuidanceMode } from "./selector.js";
2
+ export { getSilentGuidanceSteps } from "./templates.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/understand/silent-guidance/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAO,eAAe,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAS,gBAAgB,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Silent Guidance Mode Selector.
3
+ *
4
+ * Inspects the raw input for shape-level signals and returns the most
5
+ * appropriate guidance template mode.
6
+ *
7
+ * ── Contracts ────────────────────────────────────────────────────────────────
8
+ *
9
+ * 1. Only called when bridgeSilenceReason === "no_interpreter_claimed".
10
+ * 2. Deterministic: same input → same mode, always.
11
+ * 3. Returns a mode — never null. "unknown" is the safe fallback.
12
+ * 4. Does NOT classify intent. Does NOT produce category/confidence.
13
+ * 5. Does NOT guess tools, services, file paths, or values.
14
+ * 6. Does NOT affect mode, signal, intentState, or any decision.
15
+ * 7. Regex match priority: investigation → operation → content_iteration → unknown.
16
+ * First match wins. This ordering prevents cross-domain false positives.
17
+ *
18
+ * ── Pattern philosophy ────────────────────────────────────────────────────────
19
+ *
20
+ * Patterns are narrow, not broad. Better to fall through to "unknown"
21
+ * (which still shows improved guidance over the old code-patch default)
22
+ * than to claim a mode incorrectly.
23
+ *
24
+ * Each pattern targets high-signal, low-ambiguity tokens:
25
+ * - "debug" is always QA; "deploy" is always ops; "tagline" is always content.
26
+ * - Ambiguous terms like "improve", "fix", "check" are deliberately excluded
27
+ * unless combined with a domain-specific qualifier.
28
+ */
29
+ import type { SilentGuidanceMode } from "./types.js";
30
+ /**
31
+ * Select the appropriate silent guidance template mode for a bridge-silent flow.
32
+ *
33
+ * Priority (first match wins):
34
+ * 1. investigation — QA / debugging signals
35
+ * 2. operation — infra / schema / pipeline signals
36
+ * 3. content_iteration — copy / UX / product signals
37
+ * 4. unknown — safe fallback (still better than code-patch default)
38
+ *
39
+ * "code_patch" is never returned here; it applies only when an interpreter
40
+ * already fired (bridgeFired === true), meaning the request is already
41
+ * enriched and needs no silent mode template.
42
+ */
43
+ export declare function selectSilentGuidanceMode(input: string): SilentGuidanceMode;
44
+ //# sourceMappingURL=selector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selector.d.ts","sourceRoot":"","sources":["../../../../src/understand/silent-guidance/selector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAqHrD;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAK1E"}