@oscharko-dev/keiko 1.0.5 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (930) hide show
  1. package/README.md +11 -1
  2. package/dist/ui/csp-hashes.json +6 -6
  3. package/dist/ui/static/404.html +1 -1
  4. package/dist/ui/static/__next.__PAGE__.txt +16 -14
  5. package/dist/ui/static/__next._full.txt +21 -20
  6. package/dist/ui/static/__next._tree.txt +2 -2
  7. package/dist/ui/static/_next/static/chunks/000t9p2ysi3dv.css +1 -0
  8. package/dist/ui/static/_next/static/chunks/01_gc9m97_vw5.js +1 -0
  9. package/dist/ui/static/_next/static/chunks/02p2_qr2a9511.js +1 -0
  10. package/dist/ui/static/_next/static/chunks/02ug3u_si269z.js +1 -0
  11. package/dist/ui/static/_next/static/chunks/03deeo56ud39g.js +1 -0
  12. package/dist/ui/static/_next/static/chunks/0_8kv51rrhcg-.js +1 -0
  13. package/dist/ui/static/_next/static/chunks/0ahpt93l7-z9f.js +1 -0
  14. package/dist/ui/static/_next/static/chunks/0bbv42deftomm.js +1 -0
  15. package/dist/ui/static/_next/static/chunks/0c3w2ubla6ek6.js +1 -0
  16. package/dist/ui/static/_next/static/chunks/0e6em7dg4gr6q.js +1 -0
  17. package/dist/ui/static/_next/static/chunks/0gnizm29lk3ll.js +1 -0
  18. package/dist/ui/static/_next/static/chunks/0m0w3hleoejwg.js +1 -0
  19. package/dist/ui/static/_next/static/chunks/{2nubqp1hwandv.js → 0ojvvjnsf38bk.js} +1 -1
  20. package/dist/ui/static/_next/static/chunks/0we68cbpsgepq.css +1 -0
  21. package/dist/ui/static/_next/static/chunks/0xqxs7rppw_o5.css +5 -0
  22. package/dist/ui/static/_next/static/chunks/0z5be09yla9lp.js +1 -0
  23. package/dist/ui/static/_next/static/chunks/14aztwc0_78th.js +1 -0
  24. package/dist/ui/static/_next/static/chunks/18-rkk8vbltb8.js +1 -0
  25. package/dist/ui/static/_next/static/chunks/187yy--dlljjz.js +1 -0
  26. package/dist/ui/static/_next/static/chunks/1ep9f2fjv7oh7.js +1 -0
  27. package/dist/ui/static/_next/static/chunks/1hk335vrug1rc.js +1 -0
  28. package/dist/ui/static/_next/static/chunks/1kacubgk0y2ki.js +1 -0
  29. package/dist/ui/static/_next/static/chunks/1kxhf3ld28pzk.js +1 -0
  30. package/dist/ui/static/_next/static/chunks/1lb8ju8qa0d9m.js +1 -0
  31. package/dist/ui/static/_next/static/chunks/1lrj3d157kay1.js +5 -0
  32. package/dist/ui/static/_next/static/chunks/1mcajwmbse068.js +7 -0
  33. package/dist/ui/static/_next/static/chunks/{2l9r80s3qje3v.js → 1piodmepoegnw.js} +1 -1
  34. package/dist/ui/static/_next/static/chunks/1qsl7dx87n-af.js +1 -0
  35. package/dist/ui/static/_next/static/chunks/{0vywz1p6au4ri.js → 1uetvnnpa5z22.js} +1 -1
  36. package/dist/ui/static/_next/static/chunks/1uulmf99vtuyt.js +1 -0
  37. package/dist/ui/static/_next/static/chunks/202kx3p8axlmr.js +1 -0
  38. package/dist/ui/static/_next/static/chunks/{0hn7lj400e79p.js → 2179tism08tgt.js} +1 -1
  39. package/dist/ui/static/_next/static/chunks/21t1klb1thn76.js +1 -0
  40. package/dist/ui/static/_next/static/chunks/29nzymeooaepv.js +1 -0
  41. package/dist/ui/static/_next/static/chunks/2_o61-akoq549.js +1 -0
  42. package/dist/ui/static/_next/static/chunks/{064diuwddstj6.js → 2cn33khz2ae-h.js} +1 -1
  43. package/dist/ui/static/_next/static/chunks/{0b3klia_y6i3z.js → 2dbr8ufwv1hwn.js} +1 -1
  44. package/dist/ui/static/_next/static/chunks/2dpxapmdvqlh1.js +1 -0
  45. package/dist/ui/static/_next/static/chunks/2e4prtd3wmn0a.js +1 -0
  46. package/dist/ui/static/_next/static/chunks/2h_zvmb272ozs.js +1 -0
  47. package/dist/ui/static/_next/static/chunks/{3qtph5seqciux.css → 2l0gyhe4jpu23.css} +5 -5
  48. package/dist/ui/static/_next/static/chunks/2l9ens2l3tayx.js +1 -0
  49. package/dist/ui/static/_next/static/chunks/2oxvgl3qb19wf.js +1 -0
  50. package/dist/ui/static/_next/static/chunks/2s9-91g2jic6u.js +1 -0
  51. package/dist/ui/static/_next/static/chunks/2uoxlx30y60nf.js +1 -0
  52. package/dist/ui/static/_next/static/chunks/2vhgpp_064_st.js +1 -0
  53. package/dist/ui/static/_next/static/chunks/2xpud5k1hwfvf.js +1 -0
  54. package/dist/ui/static/_next/static/chunks/2ywqac8g8us1n.css +1 -0
  55. package/dist/ui/static/_next/static/chunks/3-htoy7v6gx51.js +1 -0
  56. package/dist/ui/static/_next/static/chunks/3-l-8qt163_y6.js +1 -0
  57. package/dist/ui/static/_next/static/chunks/3_rof9w-g14_v.js +3 -0
  58. package/dist/ui/static/_next/static/chunks/3aqtjd-a1ygis.js +1 -0
  59. package/dist/ui/static/_next/static/chunks/3d-10944zk2o9.js +1 -0
  60. package/dist/ui/static/_next/static/chunks/3f6svr_pokw6j.js +1 -0
  61. package/dist/ui/static/_next/static/chunks/3ibevys2o09xx.js +1 -0
  62. package/dist/ui/static/_next/static/chunks/3iv5llh4xg-7v.js +1 -0
  63. package/dist/ui/static/_next/static/chunks/3ly6-f_52vfie.js +1 -0
  64. package/dist/ui/static/_next/static/chunks/3pm8eiwwesd47.js +1 -0
  65. package/dist/ui/static/_next/static/chunks/3tr04kks52pjw.js +1 -0
  66. package/dist/ui/static/_next/static/chunks/3wwyidrm300kk.js +1 -0
  67. package/dist/ui/static/_next/static/chunks/3xw9gh9d5ngza.js +1 -0
  68. package/dist/ui/static/_next/static/chunks/3zbk4r-6rxn7j.css +2 -0
  69. package/dist/ui/static/_next/static/chunks/42y02tbxkub8f.js +1 -0
  70. package/dist/ui/static/_not-found/__next._full.txt +20 -18
  71. package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +13 -11
  72. package/dist/ui/static/_not-found/__next._tree.txt +1 -1
  73. package/dist/ui/static/_not-found.html +1 -1
  74. package/dist/ui/static/_not-found.txt +20 -18
  75. package/dist/ui/static/atlassian-connectors/__next._full.txt +22 -20
  76. package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
  77. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +15 -13
  78. package/dist/ui/static/atlassian-connectors.html +1 -1
  79. package/dist/ui/static/atlassian-connectors.txt +22 -20
  80. package/dist/ui/static/index.html +1 -1
  81. package/dist/ui/static/index.txt +21 -20
  82. package/dist/ui/static/launch/__next._full.txt +25 -23
  83. package/dist/ui/static/launch/__next._tree.txt +2 -2
  84. package/dist/ui/static/launch/__next.launch.__PAGE__.txt +16 -14
  85. package/dist/ui/static/launch.html +1 -1
  86. package/dist/ui/static/launch.txt +25 -23
  87. package/dist/ui/static/local-knowledge/__next._full.txt +25 -23
  88. package/dist/ui/static/local-knowledge/__next._tree.txt +2 -2
  89. package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +16 -14
  90. package/dist/ui/static/local-knowledge/capsule/__next._full.txt +23 -21
  91. package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
  92. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +15 -13
  93. package/dist/ui/static/local-knowledge/capsule.html +1 -1
  94. package/dist/ui/static/local-knowledge/capsule.txt +23 -21
  95. package/dist/ui/static/local-knowledge.html +1 -1
  96. package/dist/ui/static/local-knowledge.txt +25 -23
  97. package/node_modules/@oscharko-dev/keiko-cli/dist/activity-log-line-reader.d.ts +30 -0
  98. package/node_modules/@oscharko-dev/keiko-cli/dist/activity-log-line-reader.d.ts.map +1 -0
  99. package/node_modules/@oscharko-dev/keiko-cli/dist/activity-log-line-reader.js +114 -0
  100. package/node_modules/@oscharko-dev/keiko-cli/dist/audit.d.ts.map +1 -1
  101. package/node_modules/@oscharko-dev/keiko-cli/dist/audit.js +108 -39
  102. package/node_modules/@oscharko-dev/keiko-cli/dist/cli-activity-log.d.ts +3 -0
  103. package/node_modules/@oscharko-dev/keiko-cli/dist/cli-activity-log.d.ts.map +1 -0
  104. package/node_modules/@oscharko-dev/keiko-cli/dist/cli-activity-log.js +14 -0
  105. package/node_modules/@oscharko-dev/keiko-cli/dist/cli-control-state.d.ts +1 -1
  106. package/node_modules/@oscharko-dev/keiko-cli/dist/cli-control-state.d.ts.map +1 -1
  107. package/node_modules/@oscharko-dev/keiko-cli/dist/cli-control-state.js +7 -4
  108. package/node_modules/@oscharko-dev/keiko-cli/dist/cli-model-resolution.d.ts.map +1 -1
  109. package/node_modules/@oscharko-dev/keiko-cli/dist/cli-model-resolution.js +3 -1
  110. package/node_modules/@oscharko-dev/keiko-cli/dist/evaluate.d.ts.map +1 -1
  111. package/node_modules/@oscharko-dev/keiko-cli/dist/evaluate.js +4 -2
  112. package/node_modules/@oscharko-dev/keiko-cli/dist/install-layout.d.ts +60 -7
  113. package/node_modules/@oscharko-dev/keiko-cli/dist/install-layout.d.ts.map +1 -1
  114. package/node_modules/@oscharko-dev/keiko-cli/dist/install-layout.js +32 -10
  115. package/node_modules/@oscharko-dev/keiko-cli/dist/launcher-state.js +1 -1
  116. package/node_modules/@oscharko-dev/keiko-cli/dist/lifecycle.d.ts.map +1 -1
  117. package/node_modules/@oscharko-dev/keiko-cli/dist/lifecycle.js +82 -103
  118. package/node_modules/@oscharko-dev/keiko-cli/dist/memory.d.ts.map +1 -1
  119. package/node_modules/@oscharko-dev/keiko-cli/dist/memory.js +14 -7
  120. package/node_modules/@oscharko-dev/keiko-cli/dist/portable-launch-notifier.d.ts.map +1 -1
  121. package/node_modules/@oscharko-dev/keiko-cli/dist/portable-launch-notifier.js +30 -7
  122. package/node_modules/@oscharko-dev/keiko-cli/dist/process-activity-log.d.ts +197 -0
  123. package/node_modules/@oscharko-dev/keiko-cli/dist/process-activity-log.d.ts.map +1 -0
  124. package/node_modules/@oscharko-dev/keiko-cli/dist/process-activity-log.js +147 -0
  125. package/node_modules/@oscharko-dev/keiko-cli/dist/process-guards.d.ts +3 -2
  126. package/node_modules/@oscharko-dev/keiko-cli/dist/process-guards.d.ts.map +1 -1
  127. package/node_modules/@oscharko-dev/keiko-cli/dist/process-guards.js +49 -36
  128. package/node_modules/@oscharko-dev/keiko-cli/dist/prompt-enhancer.d.ts.map +1 -1
  129. package/node_modules/@oscharko-dev/keiko-cli/dist/prompt-enhancer.js +9 -7
  130. package/node_modules/@oscharko-dev/keiko-cli/dist/repair.d.ts.map +1 -1
  131. package/node_modules/@oscharko-dev/keiko-cli/dist/repair.js +8 -3
  132. package/node_modules/@oscharko-dev/keiko-cli/dist/run.d.ts.map +1 -1
  133. package/node_modules/@oscharko-dev/keiko-cli/dist/run.js +3 -1
  134. package/node_modules/@oscharko-dev/keiko-cli/dist/runner.d.ts.map +1 -1
  135. package/node_modules/@oscharko-dev/keiko-cli/dist/runner.js +58 -18
  136. package/node_modules/@oscharko-dev/keiko-cli/dist/security-log.d.ts.map +1 -1
  137. package/node_modules/@oscharko-dev/keiko-cli/dist/security-log.js +126 -57
  138. package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.d.ts +1 -1
  139. package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.d.ts.map +1 -1
  140. package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.js +29 -6
  141. package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze-sufficiency.d.ts +52 -0
  142. package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze-sufficiency.d.ts.map +1 -0
  143. package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze-sufficiency.js +249 -0
  144. package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze.d.ts +85 -0
  145. package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze.d.ts.map +1 -1
  146. package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze.js +498 -56
  147. package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.d.ts +12 -8
  148. package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.d.ts.map +1 -1
  149. package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.js +147 -99
  150. package/node_modules/@oscharko-dev/keiko-cli/dist/support-incident.d.ts +50 -0
  151. package/node_modules/@oscharko-dev/keiko-cli/dist/support-incident.d.ts.map +1 -0
  152. package/node_modules/@oscharko-dev/keiko-cli/dist/support-incident.js +317 -0
  153. package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-cli.d.ts +80 -0
  154. package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-cli.d.ts.map +1 -0
  155. package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-cli.js +462 -0
  156. package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-evidence.d.ts +480 -0
  157. package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-evidence.d.ts.map +1 -0
  158. package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-evidence.js +191 -0
  159. package/node_modules/@oscharko-dev/keiko-cli/dist/support-query.d.ts +169 -0
  160. package/node_modules/@oscharko-dev/keiko-cli/dist/support-query.d.ts.map +1 -0
  161. package/node_modules/@oscharko-dev/keiko-cli/dist/support-query.js +709 -0
  162. package/node_modules/@oscharko-dev/keiko-cli/dist/support-segment-manifest-names.d.ts +6 -0
  163. package/node_modules/@oscharko-dev/keiko-cli/dist/support-segment-manifest-names.d.ts.map +1 -0
  164. package/node_modules/@oscharko-dev/keiko-cli/dist/support-segment-manifest-names.js +27 -0
  165. package/node_modules/@oscharko-dev/keiko-cli/dist/support-segment-manifest.d.ts +164 -0
  166. package/node_modules/@oscharko-dev/keiko-cli/dist/support-segment-manifest.d.ts.map +1 -0
  167. package/node_modules/@oscharko-dev/keiko-cli/dist/support-segment-manifest.js +688 -0
  168. package/node_modules/@oscharko-dev/keiko-cli/dist/support-segment-scan.d.ts +78 -0
  169. package/node_modules/@oscharko-dev/keiko-cli/dist/support-segment-scan.d.ts.map +1 -0
  170. package/node_modules/@oscharko-dev/keiko-cli/dist/support-segment-scan.js +252 -0
  171. package/node_modules/@oscharko-dev/keiko-cli/dist/support-selective-export.d.ts +43 -0
  172. package/node_modules/@oscharko-dev/keiko-cli/dist/support-selective-export.d.ts.map +1 -0
  173. package/node_modules/@oscharko-dev/keiko-cli/dist/support-selective-export.js +115 -0
  174. package/node_modules/@oscharko-dev/keiko-cli/dist/support-tool-catalog.d.ts.map +1 -1
  175. package/node_modules/@oscharko-dev/keiko-cli/dist/support-tool-catalog.js +118 -4
  176. package/node_modules/@oscharko-dev/keiko-cli/dist/support.d.ts +21 -2
  177. package/node_modules/@oscharko-dev/keiko-cli/dist/support.d.ts.map +1 -1
  178. package/node_modules/@oscharko-dev/keiko-cli/dist/support.js +885 -177
  179. package/node_modules/@oscharko-dev/keiko-cli/dist/ui-process-stop.d.ts.map +1 -1
  180. package/node_modules/@oscharko-dev/keiko-cli/dist/ui-process-stop.js +95 -24
  181. package/node_modules/@oscharko-dev/keiko-cli/dist/ui.d.ts +13 -4
  182. package/node_modules/@oscharko-dev/keiko-cli/dist/ui.d.ts.map +1 -1
  183. package/node_modules/@oscharko-dev/keiko-cli/dist/ui.js +364 -109
  184. package/node_modules/@oscharko-dev/keiko-cli/dist/uninstall.d.ts.map +1 -1
  185. package/node_modules/@oscharko-dev/keiko-cli/dist/uninstall.js +123 -51
  186. package/node_modules/@oscharko-dev/keiko-cli/package.json +14 -14
  187. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.d.ts +1 -1
  188. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.js +1 -1
  189. package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
  190. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts +6322 -0
  191. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts.map +1 -0
  192. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.js +8278 -0
  193. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-files.d.ts +54 -0
  194. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-files.d.ts.map +1 -0
  195. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-files.js +215 -0
  196. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-loss.d.ts +16 -0
  197. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-loss.d.ts.map +1 -0
  198. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-loss.js +82 -0
  199. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts +50926 -0
  200. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts.map +1 -0
  201. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.js +60264 -0
  202. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts +19 -0
  203. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts.map +1 -1
  204. package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.d.ts +2 -2
  205. package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.d.ts.map +1 -1
  206. package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.js +1 -2
  207. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.d.ts +5 -0
  208. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.d.ts.map +1 -1
  209. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.js +15 -0
  210. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts +145 -1
  211. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts.map +1 -1
  212. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.js +532 -6
  213. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts +1 -1
  214. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts.map +1 -1
  215. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.js +1 -0
  216. package/node_modules/@oscharko-dev/keiko-contracts/dist/governed-tool-catalog.d.ts +1 -1
  217. package/node_modules/@oscharko-dev/keiko-contracts/dist/governed-tool-catalog.d.ts.map +1 -1
  218. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +1 -1
  219. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
  220. package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.d.ts +235 -0
  221. package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.d.ts.map +1 -1
  222. package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.js +743 -0
  223. package/node_modules/@oscharko-dev/keiko-contracts/dist/support-incident.d.ts +216 -0
  224. package/node_modules/@oscharko-dev/keiko-contracts/dist/support-incident.d.ts.map +1 -0
  225. package/node_modules/@oscharko-dev/keiko-contracts/dist/support-incident.js +403 -0
  226. package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.d.ts +3 -0
  227. package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.d.ts.map +1 -1
  228. package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.js +18 -1
  229. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +2 -2
  230. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +2 -2
  231. package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
  232. package/node_modules/@oscharko-dev/keiko-evaluations/dist/model-provider.d.ts +2 -1
  233. package/node_modules/@oscharko-dev/keiko-evaluations/dist/model-provider.d.ts.map +1 -1
  234. package/node_modules/@oscharko-dev/keiko-evaluations/dist/model-provider.js +1 -1
  235. package/node_modules/@oscharko-dev/keiko-evaluations/dist/runner.d.ts +2 -1
  236. package/node_modules/@oscharko-dev/keiko-evaluations/dist/runner.d.ts.map +1 -1
  237. package/node_modules/@oscharko-dev/keiko-evaluations/dist/runner.js +2 -1
  238. package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
  239. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
  240. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
  241. package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
  242. package/node_modules/@oscharko-dev/keiko-git/dist/types.d.ts +20 -0
  243. package/node_modules/@oscharko-dev/keiko-git/dist/types.d.ts.map +1 -1
  244. package/node_modules/@oscharko-dev/keiko-git/dist/version.d.ts +1 -1
  245. package/node_modules/@oscharko-dev/keiko-git/dist/version.js +1 -1
  246. package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
  247. package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
  248. package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
  249. package/node_modules/@oscharko-dev/keiko-harness/package.json +7 -7
  250. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-activity-log.d.ts +68 -0
  251. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-activity-log.d.ts.map +1 -0
  252. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-activity-log.js +532 -0
  253. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.d.ts.map +1 -1
  254. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.js +93 -76
  255. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator-activity-log.d.ts +120 -0
  256. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator-activity-log.d.ts.map +1 -0
  257. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator-activity-log.js +686 -0
  258. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator.d.ts.map +1 -1
  259. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator.js +150 -207
  260. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/preflight-activity-log.d.ts +36 -0
  261. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/preflight-activity-log.d.ts.map +1 -0
  262. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/preflight-activity-log.js +264 -0
  263. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/types.d.ts.map +1 -1
  264. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.d.ts +1 -0
  265. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.d.ts.map +1 -1
  266. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.js +44 -12
  267. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/repository-pod.d.ts.map +1 -1
  268. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/repository-pod.js +30 -13
  269. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/local-vector-index-port.d.ts.map +1 -1
  270. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/local-vector-index-port.js +25 -6
  271. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/usearch-ann-index.d.ts.map +1 -1
  272. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/usearch-ann-index.js +46 -10
  273. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.d.ts.map +1 -1
  274. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.js +71 -20
  275. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.d.ts.map +1 -1
  276. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.js +54 -17
  277. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
  278. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
  279. package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
  280. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
  281. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
  282. package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
  283. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/consolidate.d.ts.map +1 -1
  284. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/consolidate.js +24 -5
  285. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/log-port.d.ts.map +1 -1
  286. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/log-port.js +35 -12
  287. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
  288. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
  289. package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
  290. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
  291. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
  292. package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
  293. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
  294. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
  295. package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
  296. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/db.d.ts.map +1 -1
  297. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/db.js +25 -7
  298. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/migrate-encrypt.d.ts +4 -2
  299. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/migrate-encrypt.d.ts.map +1 -1
  300. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/migrate-encrypt.js +37 -12
  301. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/schema.d.ts.map +1 -1
  302. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/schema.js +34 -10
  303. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault-log.d.ts +3 -2
  304. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault-log.d.ts.map +1 -1
  305. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault-log.js +35 -12
  306. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault.d.ts.map +1 -1
  307. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault.js +24 -6
  308. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
  309. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
  310. package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
  311. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts.map +1 -1
  312. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.js +408 -40
  313. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts.map +1 -1
  314. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.js +237 -61
  315. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.d.ts +5 -0
  316. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.d.ts.map +1 -1
  317. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.js +72 -12
  318. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts.map +1 -1
  319. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.js +75 -17
  320. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts.map +1 -1
  321. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.js +404 -116
  322. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prDescription/generate.d.ts.map +1 -1
  323. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prDescription/generate.js +313 -92
  324. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +2 -3
  325. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts.map +1 -1
  326. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.js +260 -54
  327. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.d.ts.map +1 -1
  328. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.js +31 -11
  329. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/text-to-speech-adapter.d.ts.map +1 -1
  330. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/text-to-speech-adapter.js +147 -21
  331. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/toolCatalogBridge.d.ts.map +1 -1
  332. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/toolCatalogBridge.js +190 -44
  333. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
  334. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
  335. package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +4 -4
  336. package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
  337. package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
  338. package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
  339. package/node_modules/@oscharko-dev/keiko-security/dist/fs-atomic-rename.d.ts.map +1 -1
  340. package/node_modules/@oscharko-dev/keiko-security/dist/fs-atomic-rename.js +39 -14
  341. package/node_modules/@oscharko-dev/keiko-security/dist/fs-hardening.d.ts +107 -0
  342. package/node_modules/@oscharko-dev/keiko-security/dist/fs-hardening.d.ts.map +1 -1
  343. package/node_modules/@oscharko-dev/keiko-security/dist/fs-hardening.js +1998 -1
  344. package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts +2 -1
  345. package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts.map +1 -1
  346. package/node_modules/@oscharko-dev/keiko-security/dist/index.js +1 -3
  347. package/node_modules/@oscharko-dev/keiko-security/dist/log-port.d.ts.map +1 -1
  348. package/node_modules/@oscharko-dev/keiko-security/dist/log-port.js +36 -13
  349. package/node_modules/@oscharko-dev/keiko-security/dist/macos-keychain.d.ts.map +1 -1
  350. package/node_modules/@oscharko-dev/keiko-security/dist/macos-keychain.js +31 -15
  351. package/node_modules/@oscharko-dev/keiko-security/dist/portable-tree-attestation.d.ts +2 -1
  352. package/node_modules/@oscharko-dev/keiko-security/dist/portable-tree-attestation.d.ts.map +1 -1
  353. package/node_modules/@oscharko-dev/keiko-security/dist/portable-tree-attestation.js +46 -15
  354. package/node_modules/@oscharko-dev/keiko-security/dist/safe-artifact-directory-mutation-protocol.d.ts +23 -0
  355. package/node_modules/@oscharko-dev/keiko-security/dist/safe-artifact-directory-mutation-protocol.d.ts.map +1 -0
  356. package/node_modules/@oscharko-dev/keiko-security/dist/safe-artifact-directory-mutation-protocol.js +11 -0
  357. package/node_modules/@oscharko-dev/keiko-security/dist/safe-artifact-directory-mutation-runtime.d.ts +9 -0
  358. package/node_modules/@oscharko-dev/keiko-security/dist/safe-artifact-directory-mutation-runtime.d.ts.map +1 -0
  359. package/node_modules/@oscharko-dev/keiko-security/dist/safe-artifact-directory-mutation-runtime.js +115 -0
  360. package/node_modules/@oscharko-dev/keiko-security/dist/safe-artifact-directory-mutation.d.ts +2 -0
  361. package/node_modules/@oscharko-dev/keiko-security/dist/safe-artifact-directory-mutation.d.ts.map +1 -0
  362. package/node_modules/@oscharko-dev/keiko-security/dist/safe-artifact-directory-mutation.js +50 -0
  363. package/node_modules/@oscharko-dev/keiko-security/dist/secret-vault.d.ts.map +1 -1
  364. package/node_modules/@oscharko-dev/keiko-security/dist/secret-vault.js +260 -50
  365. package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
  366. package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
  367. package/node_modules/@oscharko-dev/keiko-security/dist/windows-local-volume.d.ts.map +1 -1
  368. package/node_modules/@oscharko-dev/keiko-security/dist/windows-local-volume.js +32 -7
  369. package/node_modules/@oscharko-dev/keiko-security/dist/windows-shortcuts.d.ts.map +1 -1
  370. package/node_modules/@oscharko-dev/keiko-security/dist/windows-shortcuts.js +38 -14
  371. package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
  372. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/credentialRoutes.d.ts.map +1 -1
  373. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/credentialRoutes.js +47 -5
  374. package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.d.ts.map +1 -1
  375. package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.js +160 -37
  376. package/node_modules/@oscharko-dev/keiko-server/dist/chat-activity.d.ts +48 -0
  377. package/node_modules/@oscharko-dev/keiko-server/dist/chat-activity.d.ts.map +1 -0
  378. package/node_modules/@oscharko-dev/keiko-server/dist/chat-activity.js +336 -0
  379. package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-model-summary.d.ts.map +1 -1
  380. package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-model-summary.js +28 -10
  381. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts +5 -5
  382. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts.map +1 -1
  383. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.js +49 -66
  384. package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.d.ts.map +1 -1
  385. package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.js +5 -1
  386. package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.d.ts +9 -1
  387. package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.d.ts.map +1 -1
  388. package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.js +1202 -50
  389. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingAppSessionRoutes.d.ts.map +1 -1
  390. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingAppSessionRoutes.js +98 -35
  391. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/activity-log.d.ts +22 -0
  392. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/activity-log.d.ts.map +1 -0
  393. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/activity-log.js +83 -0
  394. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/codeContextConnector.d.ts.map +1 -1
  395. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/codeContextConnector.js +10 -15
  396. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/codingRuntimeIssueIntake.d.ts.map +1 -1
  397. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/codingRuntimeIssueIntake.js +45 -23
  398. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/githubAuthorizationRoutes.d.ts.map +1 -1
  399. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/githubAuthorizationRoutes.js +21 -6
  400. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/githubCodeContextPort.d.ts.map +1 -1
  401. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/githubCodeContextPort.js +90 -12
  402. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/githubIssueReaderAuthorization.d.ts.map +1 -1
  403. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/githubIssueReaderAuthorization.js +85 -27
  404. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/githubIssueResolution.d.ts +2 -0
  405. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/githubIssueResolution.d.ts.map +1 -1
  406. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/githubIssueResolution.js +118 -14
  407. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/issuePreviewRoutes.d.ts.map +1 -1
  408. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/issuePreviewRoutes.js +53 -9
  409. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryRoutes.d.ts +7 -0
  410. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryRoutes.d.ts.map +1 -0
  411. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryRoutes.js +78 -0
  412. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRepositorySearchHandler.d.ts.map +1 -1
  413. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRepositorySearchHandler.js +126 -27
  414. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.d.ts +857 -0
  415. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.d.ts.map +1 -0
  416. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.js +411 -0
  417. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairBudgetStore.d.ts.map +1 -1
  418. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairBudgetStore.js +49 -44
  419. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairBudgetTypes.d.ts +2 -0
  420. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairBudgetTypes.d.ts.map +1 -1
  421. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairBudgetTypes.js +17 -0
  422. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairController.d.ts +9 -1
  423. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairController.d.ts.map +1 -1
  424. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairController.js +38 -20
  425. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.d.ts +2 -0
  426. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.d.ts.map +1 -1
  427. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.js +4 -0
  428. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.d.ts +40 -0
  429. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.d.ts.map +1 -0
  430. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.js +372 -0
  431. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeIssueIntake.d.ts +2 -0
  432. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeIssueIntake.d.ts.map +1 -1
  433. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeIssueIntake.js +104 -20
  434. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.d.ts.map +1 -1
  435. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.js +0 -1
  436. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOperationCoordinator.d.ts.map +1 -1
  437. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOperationCoordinator.js +183 -27
  438. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts +12 -3
  439. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts.map +1 -1
  440. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.js +963 -223
  441. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts +3 -0
  442. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts.map +1 -1
  443. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.d.ts.map +1 -1
  444. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.js +123 -14
  445. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeSnapshotStore.d.ts +2 -0
  446. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeSnapshotStore.d.ts.map +1 -1
  447. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeSnapshotStore.js +33 -16
  448. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeVerifiedCommitAuthorityStore.d.ts.map +1 -1
  449. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeVerifiedCommitAuthorityStore.js +23 -9
  450. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts +1 -1
  451. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts.map +1 -1
  452. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.js +66 -19
  453. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.d.ts.map +1 -1
  454. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.js +46 -5
  455. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.d.ts.map +1 -1
  456. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.js +13 -1
  457. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolGovernedDelegate.d.ts.map +1 -1
  458. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolGovernedDelegate.js +6 -5
  459. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts +8 -2
  460. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts.map +1 -1
  461. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.d.ts.map +1 -1
  462. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.js +130 -31
  463. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLanePortableCodingRuntime.js +3 -3
  464. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.d.ts +1 -1
  465. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.d.ts.map +1 -1
  466. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.js +54 -47
  467. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeRuntimeProcessBackend.d.ts +1 -1
  468. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeRuntimeProcessBackend.d.ts.map +1 -1
  469. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeRuntimeProcessBackend.js +13 -16
  470. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.d.ts +5 -2
  471. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.d.ts.map +1 -1
  472. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.js +56 -4
  473. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocolSurface.d.ts +4 -1
  474. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocolSurface.d.ts.map +1 -1
  475. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocolSurface.js +24 -4
  476. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.d.ts +10 -1
  477. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.d.ts.map +1 -1
  478. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.js +244 -61
  479. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts +2 -1
  480. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts.map +1 -1
  481. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.js +268 -368
  482. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.d.ts +5 -13
  483. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.d.ts.map +1 -1
  484. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.js +15 -44
  485. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.d.ts +16 -0
  486. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.d.ts.map +1 -0
  487. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.js +86 -0
  488. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.d.ts +22 -0
  489. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.d.ts.map +1 -0
  490. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.js +438 -0
  491. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.d.ts +30 -0
  492. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.d.ts.map +1 -0
  493. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.js +251 -0
  494. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2Questions.d.ts +7 -0
  495. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2Questions.d.ts.map +1 -0
  496. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2Questions.js +125 -0
  497. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionAuxiliaryPorts.d.ts.map +1 -1
  498. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionAuxiliaryPorts.js +42 -14
  499. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCiRepairRuntime.d.ts.map +1 -1
  500. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCiRepairRuntime.js +65 -36
  501. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimePorts.d.ts.map +1 -1
  502. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimePorts.js +109 -21
  503. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeQuestionPort.d.ts.map +1 -1
  504. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeQuestionPort.js +3 -6
  505. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeResolver.d.ts +1 -1
  506. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeResolver.d.ts.map +1 -1
  507. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeResolver.js +18 -8
  508. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionDraftDeliveryDependencies.d.ts.map +1 -1
  509. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionDraftDeliveryDependencies.js +160 -46
  510. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.d.ts.map +1 -1
  511. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.js +423 -106
  512. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.d.ts +2 -0
  513. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.d.ts.map +1 -1
  514. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.js +100 -18
  515. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.d.ts +6 -1
  516. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.d.ts.map +1 -1
  517. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.js +43 -16
  518. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionRuntimeGitPreparation.d.ts.map +1 -1
  519. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionRuntimeGitPreparation.js +51 -7
  520. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitDependencies.d.ts.map +1 -1
  521. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitDependencies.js +32 -9
  522. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/readOnlyChildOrchestrator.d.ts +1 -1
  523. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/readOnlyChildOrchestrator.d.ts.map +1 -1
  524. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/readOnlyChildOrchestrator.js +155 -22
  525. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeAuthorityService.d.ts +1 -1
  526. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeAuthorityService.d.ts.map +1 -1
  527. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeAuthorityService.js +300 -61
  528. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/windowsPortableAuthenticode.d.ts.map +1 -1
  529. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/windowsPortableAuthenticode.js +30 -11
  530. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts.map +1 -1
  531. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.js +240 -61
  532. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-tool-facade.d.ts.map +1 -1
  533. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-tool-facade.js +45 -8
  534. package/node_modules/@oscharko-dev/keiko-server/dist/deps-activity.d.ts +40 -0
  535. package/node_modules/@oscharko-dev/keiko-server/dist/deps-activity.d.ts.map +1 -0
  536. package/node_modules/@oscharko-dev/keiko-server/dist/deps-activity.js +207 -0
  537. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +7 -1
  538. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
  539. package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +69 -58
  540. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +1 -1
  541. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
  542. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.js +194 -26
  543. package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentProducerRoute.d.ts.map +1 -1
  544. package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentProducerRoute.js +113 -17
  545. package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentRoutes.d.ts.map +1 -1
  546. package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentRoutes.js +7 -1
  547. package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/debugLaunchPlan.d.ts.map +1 -1
  548. package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/debugLaunchPlan.js +35 -11
  549. package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryCapture.d.ts +1 -1
  550. package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryCapture.d.ts.map +1 -1
  551. package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryCapture.js +56 -15
  552. package/node_modules/@oscharko-dev/keiko-server/dist/editor/lsp/lspNodeAdapter.d.ts.map +1 -1
  553. package/node_modules/@oscharko-dev/keiko-server/dist/editor/lsp/lspNodeAdapter.js +201 -37
  554. package/node_modules/@oscharko-dev/keiko-server/dist/editor/lsp/lspProcessManager.d.ts.map +1 -1
  555. package/node_modules/@oscharko-dev/keiko-server/dist/editor/lsp/lspProcessManager.js +51 -11
  556. package/node_modules/@oscharko-dev/keiko-server/dist/editor/lsp/providers/javaProvider.d.ts.map +1 -1
  557. package/node_modules/@oscharko-dev/keiko-server/dist/editor/lsp/providers/javaProvider.js +78 -11
  558. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.d.ts +4 -1
  559. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.d.ts.map +1 -1
  560. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.js +55 -0
  561. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.d.ts.map +1 -1
  562. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.js +211 -65
  563. package/node_modules/@oscharko-dev/keiko-server/dist/editor/watch/workspaceWatchRoutes.d.ts.map +1 -1
  564. package/node_modules/@oscharko-dev/keiko-server/dist/editor/watch/workspaceWatchRoutes.js +33 -6
  565. package/node_modules/@oscharko-dev/keiko-server/dist/evidence-retention-log.d.ts.map +1 -1
  566. package/node_modules/@oscharko-dev/keiko-server/dist/evidence-retention-log.js +36 -6
  567. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-instance-cache.d.ts.map +1 -1
  568. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-instance-cache.js +97 -22
  569. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts +5 -3
  570. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts.map +1 -1
  571. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.js +220 -39
  572. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
  573. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +283 -68
  574. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-spend-budget.d.ts.map +1 -1
  575. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-spend-budget.js +138 -45
  576. package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeChatContext.d.ts.map +1 -1
  577. package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeChatContext.js +97 -13
  578. package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeRoutes.d.ts +5 -0
  579. package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeRoutes.d.ts.map +1 -1
  580. package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeRoutes.js +146 -30
  581. package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeSnapshotReader.d.ts.map +1 -1
  582. package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeSnapshotReader.js +13 -1
  583. package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeSnapshotRegistry.d.ts.map +1 -1
  584. package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeSnapshotRegistry.js +122 -32
  585. package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeSnapshotService.d.ts.map +1 -1
  586. package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeSnapshotService.js +140 -24
  587. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/approvalEvents.d.ts +6 -2
  588. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/approvalEvents.d.ts.map +1 -1
  589. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/approvalEvents.js +192 -8
  590. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/ciObservationService.d.ts.map +1 -1
  591. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/ciObservationService.js +154 -26
  592. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.d.ts +2 -2
  593. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.d.ts.map +1 -1
  594. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.js +100 -46
  595. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryChecks.d.ts +21 -0
  596. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryChecks.d.ts.map +1 -1
  597. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryChecks.js +108 -13
  598. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryChecksRefresh.d.ts.map +1 -1
  599. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryChecksRefresh.js +23 -20
  600. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryFacts.d.ts.map +1 -1
  601. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryFacts.js +93 -18
  602. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryLedger.d.ts +28 -0
  603. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryLedger.d.ts.map +1 -1
  604. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryLedger.js +123 -33
  605. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryService.d.ts.map +1 -1
  606. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryService.js +33 -33
  607. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryTemplate.d.ts.map +1 -1
  608. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftDeliveryTemplate.js +97 -24
  609. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftRelatedIssuesActivity.d.ts +150 -0
  610. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftRelatedIssuesActivity.d.ts.map +1 -0
  611. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/draftRelatedIssuesActivity.js +64 -0
  612. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/execution.d.ts +226 -1
  613. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/execution.d.ts.map +1 -1
  614. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/execution.js +344 -70
  615. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/journeyObservationService.d.ts +25 -0
  616. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/journeyObservationService.d.ts.map +1 -1
  617. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/journeyObservationService.js +159 -26
  618. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/journeyRoutes.d.ts.map +1 -1
  619. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/journeyRoutes.js +238 -59
  620. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/localMutationRoutes.d.ts.map +1 -1
  621. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/localMutationRoutes.js +2 -9
  622. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/mergeExecution.d.ts.map +1 -1
  623. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/mergeExecution.js +79 -13
  624. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionPreparation.d.ts.map +1 -1
  625. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionPreparation.js +6 -2
  626. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionProjection.d.ts.map +1 -1
  627. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionProjection.js +133 -16
  628. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionReceiptStore.d.ts.map +1 -1
  629. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionReceiptStore.js +73 -19
  630. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionRoutes.d.ts.map +1 -1
  631. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionRoutes.js +147 -50
  632. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionService.d.ts.map +1 -1
  633. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionService.js +4 -3
  634. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionTypes.d.ts +12 -4
  635. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionTypes.d.ts.map +1 -1
  636. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prMarkReadyExecution.d.ts +1 -1
  637. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prMarkReadyExecution.d.ts.map +1 -1
  638. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prMarkReadyExecution.js +138 -42
  639. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/repositoryInitializationRoutes.d.ts.map +1 -1
  640. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/repositoryInitializationRoutes.js +51 -7
  641. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/requestPreparation.d.ts +4 -0
  642. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/requestPreparation.d.ts.map +1 -1
  643. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/requestPreparation.js +145 -26
  644. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitRead.d.ts.map +1 -1
  645. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitRead.js +43 -13
  646. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitService.d.ts.map +1 -1
  647. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitService.js +122 -11
  648. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncRoutes.d.ts.map +1 -1
  649. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncRoutes.js +4 -15
  650. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.d.ts.map +1 -1
  651. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.js +194 -11
  652. package/node_modules/@oscharko-dev/keiko-server/dist/gitProcessActivity.d.ts +5 -2
  653. package/node_modules/@oscharko-dev/keiko-server/dist/gitProcessActivity.d.ts.map +1 -1
  654. package/node_modules/@oscharko-dev/keiko-server/dist/gitProcessActivity.js +157 -31
  655. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.d.ts.map +1 -1
  656. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.js +514 -74
  657. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts.map +1 -1
  658. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.js +7 -2
  659. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank-facade.d.ts.map +1 -1
  660. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank-facade.js +84 -20
  661. package/node_modules/@oscharko-dev/keiko-server/dist/harness-context-compactor.d.ts.map +1 -1
  662. package/node_modules/@oscharko-dev/keiko-server/dist/harness-context-compactor.js +30 -9
  663. package/node_modules/@oscharko-dev/keiko-server/dist/index.d.ts +7 -0
  664. package/node_modules/@oscharko-dev/keiko-server/dist/index.d.ts.map +1 -1
  665. package/node_modules/@oscharko-dev/keiko-server/dist/index.js +20 -0
  666. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.d.ts.map +1 -1
  667. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.js +287 -68
  668. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.d.ts.map +1 -1
  669. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.js +219 -65
  670. package/node_modules/@oscharko-dev/keiko-server/dist/native-file-dialog/route.d.ts.map +1 -1
  671. package/node_modules/@oscharko-dev/keiko-server/dist/native-file-dialog/route.js +30 -10
  672. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-loss-summary.d.ts +233 -0
  673. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-loss-summary.d.ts.map +1 -0
  674. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-loss-summary.js +124 -0
  675. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-persistence.d.ts +8 -0
  676. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-persistence.d.ts.map +1 -0
  677. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-persistence.js +25 -0
  678. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-readiness.d.ts +34 -0
  679. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-readiness.d.ts.map +1 -0
  680. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-readiness.js +301 -0
  681. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-store.d.ts +215 -0
  682. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-store.d.ts.map +1 -0
  683. package/node_modules/@oscharko-dev/keiko-server/dist/observability/activity-log-store.js +755 -0
  684. package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.d.ts +4 -0
  685. package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.d.ts.map +1 -1
  686. package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.js +6 -2
  687. package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.d.ts.map +1 -1
  688. package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.js +25 -14
  689. package/node_modules/@oscharko-dev/keiko-server/dist/observability/model-id-evidence.d.ts +17 -0
  690. package/node_modules/@oscharko-dev/keiko-server/dist/observability/model-id-evidence.d.ts.map +1 -0
  691. package/node_modules/@oscharko-dev/keiko-server/dist/observability/model-id-evidence.js +35 -0
  692. package/node_modules/@oscharko-dev/keiko-server/dist/observability/runtime-state-dir.d.ts +6 -0
  693. package/node_modules/@oscharko-dev/keiko-server/dist/observability/runtime-state-dir.d.ts.map +1 -0
  694. package/node_modules/@oscharko-dev/keiko-server/dist/observability/runtime-state-dir.js +23 -0
  695. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.d.ts +106 -6
  696. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.d.ts.map +1 -1
  697. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.js +2504 -481
  698. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.d.ts +38 -2
  699. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.d.ts.map +1 -1
  700. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.js +187 -39
  701. package/node_modules/@oscharko-dev/keiko-server/dist/observability/support-incident-store.d.ts +44 -0
  702. package/node_modules/@oscharko-dev/keiko-server/dist/observability/support-incident-store.d.ts.map +1 -0
  703. package/node_modules/@oscharko-dev/keiko-server/dist/observability/support-incident-store.js +255 -0
  704. package/node_modules/@oscharko-dev/keiko-server/dist/observability/support-incident.d.ts +107 -0
  705. package/node_modules/@oscharko-dev/keiko-server/dist/observability/support-incident.d.ts.map +1 -0
  706. package/node_modules/@oscharko-dev/keiko-server/dist/observability/support-incident.js +1052 -0
  707. package/node_modules/@oscharko-dev/keiko-server/dist/process-log-sink.d.ts.map +1 -1
  708. package/node_modules/@oscharko-dev/keiko-server/dist/process-log-sink.js +66 -17
  709. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/capsuleAdapter.d.ts +3 -2
  710. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/capsuleAdapter.d.ts.map +1 -1
  711. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/capsuleAdapter.js +35 -5
  712. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotRoutes.d.ts.map +1 -1
  713. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotRoutes.js +3 -1
  714. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/handoffRoutes.d.ts.map +1 -1
  715. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/handoffRoutes.js +7 -6
  716. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/reCheckRoutes.d.ts.map +1 -1
  717. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/reCheckRoutes.js +7 -2
  718. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.d.ts.map +1 -1
  719. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.js +7 -2
  720. package/node_modules/@oscharko-dev/keiko-server/dist/reference-id.d.ts +16 -0
  721. package/node_modules/@oscharko-dev/keiko-server/dist/reference-id.d.ts.map +1 -0
  722. package/node_modules/@oscharko-dev/keiko-server/dist/reference-id.js +90 -0
  723. package/node_modules/@oscharko-dev/keiko-server/dist/routes.d.ts.map +1 -1
  724. package/node_modules/@oscharko-dev/keiko-server/dist/routes.js +12 -7
  725. package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.d.ts.map +1 -1
  726. package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.js +3 -3
  727. package/node_modules/@oscharko-dev/keiko-server/dist/run-handlers.d.ts.map +1 -1
  728. package/node_modules/@oscharko-dev/keiko-server/dist/run-handlers.js +33 -9
  729. package/node_modules/@oscharko-dev/keiko-server/dist/server.d.ts.map +1 -1
  730. package/node_modules/@oscharko-dev/keiko-server/dist/server.js +50 -10
  731. package/node_modules/@oscharko-dev/keiko-server/dist/sse-write.d.ts.map +1 -1
  732. package/node_modules/@oscharko-dev/keiko-server/dist/sse-write.js +37 -9
  733. package/node_modules/@oscharko-dev/keiko-server/dist/store/chats.d.ts.map +1 -1
  734. package/node_modules/@oscharko-dev/keiko-server/dist/store/chats.js +3 -2
  735. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.d.ts +36 -0
  736. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.d.ts.map +1 -0
  737. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.js +191 -0
  738. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistoryIsolation.d.ts +5 -0
  739. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistoryIsolation.d.ts.map +1 -0
  740. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistoryIsolation.js +44 -0
  741. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts +1 -1
  742. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts.map +1 -1
  743. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.js +61 -37
  744. package/node_modules/@oscharko-dev/keiko-server/dist/store/journeyOutcomeMigration.d.ts.map +1 -1
  745. package/node_modules/@oscharko-dev/keiko-server/dist/store/journeyOutcomeMigration.js +26 -5
  746. package/node_modules/@oscharko-dev/keiko-server/dist/store/legacySchemaTestFixture.d.ts.map +1 -1
  747. package/node_modules/@oscharko-dev/keiko-server/dist/store/legacySchemaTestFixture.js +9 -1
  748. package/node_modules/@oscharko-dev/keiko-server/dist/store/schema.d.ts +1 -1
  749. package/node_modules/@oscharko-dev/keiko-server/dist/store/schema.d.ts.map +1 -1
  750. package/node_modules/@oscharko-dev/keiko-server/dist/store/schema.js +31 -1
  751. package/node_modules/@oscharko-dev/keiko-server/dist/store/transaction.d.ts +4 -0
  752. package/node_modules/@oscharko-dev/keiko-server/dist/store/transaction.d.ts.map +1 -0
  753. package/node_modules/@oscharko-dev/keiko-server/dist/store/transaction.js +19 -0
  754. package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts +6 -1
  755. package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts.map +1 -1
  756. package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.d.ts.map +1 -1
  757. package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.js +34 -8
  758. package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/activity-log.d.ts.map +1 -1
  759. package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/activity-log.js +212 -13
  760. package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/workspace-root-access.d.ts.map +1 -1
  761. package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/workspace-root-access.js +31 -28
  762. package/node_modules/@oscharko-dev/keiko-server/dist/terminal-routes.d.ts.map +1 -1
  763. package/node_modules/@oscharko-dev/keiko-server/dist/terminal-routes.js +6 -10
  764. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolBinder.d.ts.map +1 -1
  765. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolBinder.js +18 -9
  766. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.d.ts.map +1 -1
  767. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.js +41 -5
  768. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolLifecycle.d.ts.map +1 -1
  769. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolLifecycle.js +401 -17
  770. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolSettlement.d.ts.map +1 -1
  771. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolSettlement.js +1 -2
  772. package/node_modules/@oscharko-dev/keiko-server/dist/update-candidate-authority.d.ts +1 -1
  773. package/node_modules/@oscharko-dev/keiko-server/dist/update-candidate-authority.d.ts.map +1 -1
  774. package/node_modules/@oscharko-dev/keiko-server/dist/update-candidate-authority.js +170 -39
  775. package/node_modules/@oscharko-dev/keiko-server/dist/update-legacy-audit-import.d.ts.map +1 -1
  776. package/node_modules/@oscharko-dev/keiko-server/dist/update-legacy-audit-import.js +94 -66
  777. package/node_modules/@oscharko-dev/keiko-server/dist/update-local-state.d.ts +1 -1
  778. package/node_modules/@oscharko-dev/keiko-server/dist/update-local-state.d.ts.map +1 -1
  779. package/node_modules/@oscharko-dev/keiko-server/dist/update-local-state.js +70 -20
  780. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-normal-startup.d.ts.map +1 -1
  781. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-normal-startup.js +87 -13
  782. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.d.ts +2 -2
  783. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.d.ts.map +1 -1
  784. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.js +7 -7
  785. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-staging.d.ts.map +1 -1
  786. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-staging.js +4 -4
  787. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-activity.d.ts +16 -0
  788. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-activity.d.ts.map +1 -0
  789. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-activity.js +182 -0
  790. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-portable-assets.d.ts +1 -1
  791. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-portable-assets.d.ts.map +1 -1
  792. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-portable-assets.js +5 -15
  793. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-portable-evidence.d.ts +1 -1
  794. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-portable-evidence.d.ts.map +1 -1
  795. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-portable-evidence.js +21 -47
  796. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-routes.d.ts +5 -5
  797. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-routes.d.ts.map +1 -1
  798. package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-routes.js +21 -15
  799. package/node_modules/@oscharko-dev/keiko-server/dist/update-runtime-activity.d.ts +39 -0
  800. package/node_modules/@oscharko-dev/keiko-server/dist/update-runtime-activity.d.ts.map +1 -0
  801. package/node_modules/@oscharko-dev/keiko-server/dist/update-runtime-activity.js +266 -0
  802. package/node_modules/@oscharko-dev/keiko-server/dist/update-session.d.ts.map +1 -1
  803. package/node_modules/@oscharko-dev/keiko-server/dist/update-session.js +138 -20
  804. package/node_modules/@oscharko-dev/keiko-server/dist/voice-handlers.d.ts.map +1 -1
  805. package/node_modules/@oscharko-dev/keiko-server/dist/voice-handlers.js +5 -0
  806. package/node_modules/@oscharko-dev/keiko-server/dist/voice-live-dictation.d.ts.map +1 -1
  807. package/node_modules/@oscharko-dev/keiko-server/dist/voice-live-dictation.js +41 -11
  808. package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.d.ts.map +1 -1
  809. package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.js +70 -17
  810. package/node_modules/@oscharko-dev/keiko-server/dist/workspace-root-denial-log.d.ts +11 -1
  811. package/node_modules/@oscharko-dev/keiko-server/dist/workspace-root-denial-log.d.ts.map +1 -1
  812. package/node_modules/@oscharko-dev/keiko-server/dist/workspace-root-denial-log.js +81 -26
  813. package/node_modules/@oscharko-dev/keiko-server/dist/workspace-script-trust.d.ts +2 -2
  814. package/node_modules/@oscharko-dev/keiko-server/dist/workspace-script-trust.d.ts.map +1 -1
  815. package/node_modules/@oscharko-dev/keiko-server/dist/workspace-script-trust.js +135 -37
  816. package/node_modules/@oscharko-dev/keiko-server/package.json +22 -22
  817. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/dialect.d.ts.map +1 -1
  818. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/dialect.js +4 -6
  819. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.d.ts +2 -2
  820. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.d.ts.map +1 -1
  821. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.js +30 -70
  822. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/profile.d.ts.map +1 -1
  823. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/profile.js +1 -1
  824. package/node_modules/@oscharko-dev/keiko-tool-catalog/package.json +3 -3
  825. package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
  826. package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
  827. package/node_modules/@oscharko-dev/keiko-tools/package.json +7 -7
  828. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.d.ts +7 -3
  829. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.d.ts.map +1 -1
  830. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.js +192 -14
  831. package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.d.ts +2 -0
  832. package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.d.ts.map +1 -1
  833. package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.js +6 -2
  834. package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
  835. package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
  836. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
  837. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
  838. package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
  839. package/package.json +29 -26
  840. package/release-impact.catalog.json +74 -0
  841. package/scripts/lib/local-state-audit.mjs +94 -0
  842. package/vendor/oscharko-dev-keiko-cli-1.1.0.tgz +0 -0
  843. package/vendor/{oscharko-dev-keiko-connectors-1.0.5.tgz → oscharko-dev-keiko-connectors-1.1.0.tgz} +0 -0
  844. package/vendor/oscharko-dev-keiko-contracts-1.1.0.tgz +0 -0
  845. package/vendor/oscharko-dev-keiko-evaluations-1.1.0.tgz +0 -0
  846. package/vendor/{oscharko-dev-keiko-evidence-1.0.5.tgz → oscharko-dev-keiko-evidence-1.1.0.tgz} +0 -0
  847. package/vendor/oscharko-dev-keiko-git-1.1.0.tgz +0 -0
  848. package/vendor/{oscharko-dev-keiko-harness-1.0.5.tgz → oscharko-dev-keiko-harness-1.1.0.tgz} +0 -0
  849. package/vendor/oscharko-dev-keiko-local-knowledge-1.1.0.tgz +0 -0
  850. package/vendor/{oscharko-dev-keiko-memory-capture-1.0.5.tgz → oscharko-dev-keiko-memory-capture-1.1.0.tgz} +0 -0
  851. package/vendor/oscharko-dev-keiko-memory-consolidation-1.1.0.tgz +0 -0
  852. package/vendor/{oscharko-dev-keiko-memory-governance-1.0.5.tgz → oscharko-dev-keiko-memory-governance-1.1.0.tgz} +0 -0
  853. package/vendor/{oscharko-dev-keiko-memory-retrieval-1.0.5.tgz → oscharko-dev-keiko-memory-retrieval-1.1.0.tgz} +0 -0
  854. package/vendor/oscharko-dev-keiko-memory-vault-1.1.0.tgz +0 -0
  855. package/vendor/oscharko-dev-keiko-model-gateway-1.1.0.tgz +0 -0
  856. package/vendor/{oscharko-dev-keiko-quality-intelligence-1.0.5.tgz → oscharko-dev-keiko-quality-intelligence-1.1.0.tgz} +0 -0
  857. package/vendor/oscharko-dev-keiko-sandbox-1.1.0.tgz +0 -0
  858. package/vendor/oscharko-dev-keiko-sdk-1.1.0.tgz +0 -0
  859. package/vendor/oscharko-dev-keiko-security-1.1.0.tgz +0 -0
  860. package/vendor/oscharko-dev-keiko-server-1.1.0.tgz +0 -0
  861. package/vendor/oscharko-dev-keiko-tool-catalog-1.1.0.tgz +0 -0
  862. package/vendor/{oscharko-dev-keiko-tools-1.0.5.tgz → oscharko-dev-keiko-tools-1.1.0.tgz} +0 -0
  863. package/vendor/oscharko-dev-keiko-verification-1.1.0.tgz +0 -0
  864. package/vendor/{oscharko-dev-keiko-workflows-1.0.5.tgz → oscharko-dev-keiko-workflows-1.1.0.tgz} +0 -0
  865. package/vendor/{oscharko-dev-keiko-workspace-1.0.5.tgz → oscharko-dev-keiko-workspace-1.1.0.tgz} +0 -0
  866. package/dist/ui/static/_next/static/chunks/0-tss9mlvjuz4.js +0 -1
  867. package/dist/ui/static/_next/static/chunks/04lb-38e89aw8.js +0 -1
  868. package/dist/ui/static/_next/static/chunks/04t-d0js_hvfr.js +0 -1
  869. package/dist/ui/static/_next/static/chunks/086jxcgou7s_5.js +0 -1
  870. package/dist/ui/static/_next/static/chunks/08pxrik1lm06d.js +0 -5
  871. package/dist/ui/static/_next/static/chunks/093r62_9c_psx.js +0 -1
  872. package/dist/ui/static/_next/static/chunks/0_u5vd-_66bpj.js +0 -1
  873. package/dist/ui/static/_next/static/chunks/0gsb-naamu9g1.js +0 -1
  874. package/dist/ui/static/_next/static/chunks/0ix9hk8cnb0as.js +0 -1
  875. package/dist/ui/static/_next/static/chunks/0n9uef9g17pxd.js +0 -1
  876. package/dist/ui/static/_next/static/chunks/0o131urxtkbxj.js +0 -1
  877. package/dist/ui/static/_next/static/chunks/0pac-465ukeam.js +0 -1
  878. package/dist/ui/static/_next/static/chunks/0qzzopo8q0m1e.js +0 -1
  879. package/dist/ui/static/_next/static/chunks/0vvfq-eocx502.js +0 -1
  880. package/dist/ui/static/_next/static/chunks/15wh9-75zvro2.js +0 -1
  881. package/dist/ui/static/_next/static/chunks/160x2go4zkjhx.js +0 -1
  882. package/dist/ui/static/_next/static/chunks/17yrtbw7mk5py.css +0 -2
  883. package/dist/ui/static/_next/static/chunks/1kgbe4la7mty5.js +0 -1
  884. package/dist/ui/static/_next/static/chunks/1peg9ve597086.js +0 -1
  885. package/dist/ui/static/_next/static/chunks/1q6j3gd8d86-v.css +0 -2
  886. package/dist/ui/static/_next/static/chunks/1t_6hc_5pxuqd.js +0 -1
  887. package/dist/ui/static/_next/static/chunks/1v4mpk8t6w8_7.js +0 -1
  888. package/dist/ui/static/_next/static/chunks/1yj6x688jjk-a.js +0 -1
  889. package/dist/ui/static/_next/static/chunks/21djhsnzx069x.js +0 -1
  890. package/dist/ui/static/_next/static/chunks/23e-psiwdsaxk.js +0 -1
  891. package/dist/ui/static/_next/static/chunks/289h3-vke8o67.js +0 -1
  892. package/dist/ui/static/_next/static/chunks/2dxo0g3208ag1.js +0 -1
  893. package/dist/ui/static/_next/static/chunks/2jadbwshuwe_n.js +0 -1
  894. package/dist/ui/static/_next/static/chunks/2u9u5i8o6vd-w.js +0 -1
  895. package/dist/ui/static/_next/static/chunks/2vj6gqk9lh7yv.js +0 -1
  896. package/dist/ui/static/_next/static/chunks/3-k1y9vbxcms8.js +0 -3
  897. package/dist/ui/static/_next/static/chunks/3137i2nt475lq.js +0 -1
  898. package/dist/ui/static/_next/static/chunks/3_jzs5uvplshk.js +0 -1
  899. package/dist/ui/static/_next/static/chunks/3d-jscai6hb55.js +0 -1
  900. package/dist/ui/static/_next/static/chunks/3dkw81rui6ry8.js +0 -1
  901. package/dist/ui/static/_next/static/chunks/3f3ici8rsavir.js +0 -1
  902. package/dist/ui/static/_next/static/chunks/3f_-h2lm9ml4b.js +0 -1
  903. package/dist/ui/static/_next/static/chunks/3frfm_q9cqdtg.js +0 -1
  904. package/dist/ui/static/_next/static/chunks/3irz7sn3e2ix3.js +0 -1
  905. package/dist/ui/static/_next/static/chunks/3j1p83q4cv4cv.js +0 -1
  906. package/dist/ui/static/_next/static/chunks/3kgmrssgqwg_h.js +0 -1
  907. package/dist/ui/static/_next/static/chunks/3lc67g1jowxt_.js +0 -1
  908. package/dist/ui/static/_next/static/chunks/3pgmij812w0aa.css +0 -1
  909. package/dist/ui/static/_next/static/chunks/3q3ds5x5j4w7j.js +0 -1
  910. package/dist/ui/static/_next/static/chunks/3r2v5s5l7jkoj.js +0 -1
  911. package/dist/ui/static/_next/static/chunks/3w9c58yrtr4oj.js +0 -1
  912. package/dist/ui/static/_next/static/chunks/3wxm1wke5887n.js +0 -7
  913. package/dist/ui/static/_next/static/chunks/3ymz8bp4uzhhh.js +0 -1
  914. package/vendor/oscharko-dev-keiko-cli-1.0.5.tgz +0 -0
  915. package/vendor/oscharko-dev-keiko-contracts-1.0.5.tgz +0 -0
  916. package/vendor/oscharko-dev-keiko-evaluations-1.0.5.tgz +0 -0
  917. package/vendor/oscharko-dev-keiko-git-1.0.5.tgz +0 -0
  918. package/vendor/oscharko-dev-keiko-local-knowledge-1.0.5.tgz +0 -0
  919. package/vendor/oscharko-dev-keiko-memory-consolidation-1.0.5.tgz +0 -0
  920. package/vendor/oscharko-dev-keiko-memory-vault-1.0.5.tgz +0 -0
  921. package/vendor/oscharko-dev-keiko-model-gateway-1.0.5.tgz +0 -0
  922. package/vendor/oscharko-dev-keiko-sandbox-1.0.5.tgz +0 -0
  923. package/vendor/oscharko-dev-keiko-sdk-1.0.5.tgz +0 -0
  924. package/vendor/oscharko-dev-keiko-security-1.0.5.tgz +0 -0
  925. package/vendor/oscharko-dev-keiko-server-1.0.5.tgz +0 -0
  926. package/vendor/oscharko-dev-keiko-tool-catalog-1.0.5.tgz +0 -0
  927. package/vendor/oscharko-dev-keiko-verification-1.0.5.tgz +0 -0
  928. /package/dist/ui/static/_next/static/{IaAMlj5CIiO4E3RPp1TWn → pnaCuBv6v6k-xKyv71Bct}/_buildManifest.js +0 -0
  929. /package/dist/ui/static/_next/static/{IaAMlj5CIiO4E3RPp1TWn → pnaCuBv6v6k-xKyv71Bct}/_clientMiddlewareManifest.js +0 -0
  930. /package/dist/ui/static/_next/static/{IaAMlj5CIiO4E3RPp1TWn → pnaCuBv6v6k-xKyv71Bct}/_ssgManifest.js +0 -0
@@ -0,0 +1,1052 @@
1
+ // SupportIncident candidates (#3533): the two triggers, the candidate policy, the defectFingerprint
2
+ // hash, deduplication, quotas, the incident-window pin, expiry, dismissal, and the body-free
3
+ // lifecycle evidence. The descriptor contract itself lives in keiko-contracts (support-incident.ts);
4
+ // the store I/O lives in ./support-incident-store.ts.
5
+ //
6
+ // Nothing here transfers data anywhere. A candidate is a small local record plus an Activity Log
7
+ // retention pin over a bounded time window around the incident; reporting, acknowledging, and
8
+ // dismissing stay explicit human actions.
9
+ //
10
+ // CANDIDATE POLICY (registered-failure trigger). An event is a candidate only when the generated
11
+ // registry declares its operation with the `failure` lifecycle and at least one failure class the
12
+ // registry reports as supported, and the event was emitted at level `error` (a `warn` failure is
13
+ // an expected refusal, not a defect). Eligibility is therefore derived from the registry alone —
14
+ // there is no UI- or caller-side list. This module's own operations are never candidates.
15
+ //
16
+ // DEDUPLICATION. At most one open registered-failure candidate exists per defectFingerprint,
17
+ // enforced atomically across every process sharing stateDir by an exclusive-create claim file keyed
18
+ // by the fingerprint (#3533 review 4050606506): a recurrence of the same defect is evidenced as
19
+ // `support.incident.deduplicated` on the existing incident instead of pinning a second window. A
20
+ // process additionally suppresses re-evaluating a fingerprint for SUPPORT_INCIDENT_SUPPRESSION_MS
21
+ // so a failure storm costs no filesystem work. User reports are never merged: each explicit "Report
22
+ // a problem" is its own occurrence.
23
+ //
24
+ // QUOTAS AND EXPIRY. The store holds at most MAX_SUPPORT_INCIDENTS records (each at most
25
+ // MAX_SUPPORT_INCIDENT_RECORD_BYTES), of which registered-failure candidates may occupy at most
26
+ // MAX_REGISTERED_FAILURE_INCIDENTS so a failure flood can never block an explicit user report. Both
27
+ // bounds hold atomically across processes too: every candidate claims one of a bounded pool of
28
+ // exclusive-create quota-slot files before its record is written (automatics from slot 0 up,
29
+ // reserving the top slots for user reports, exactly as the count-based reserve always intended). A
30
+ // full store rejects the new candidate with body-free loss evidence; it never evicts a candidate the
31
+ // user has not seen. Every candidate expires SUPPORT_INCIDENT_TTL_MS after creation; its pin expires
32
+ // at the same instant, and its fingerprint and slot claims release with it, so an unreported incident
33
+ // releases its evidence and its claims predictably.
34
+ import { createHash, randomBytes, randomUUID } from "node:crypto";
35
+ import { join } from "node:path";
36
+ import { ACTIVITY_LOG_DIRECTORY_NAME, ACTIVITY_LOG_FAILURE_CLASS_COVERAGE, ACTIVITY_LOG_OPERATION_SURFACES, DEFECT_FINGERPRINT_ALGORITHM_VERSION, MAX_SUPPORT_INCIDENT_CHILD_CORRELATIONS, SUPPORT_INCIDENT_SCHEMA_VERSION, SUPPORT_INCIDENT_SLOT_COUNT, UNATTRIBUTED_DEFECT_FINGERPRINT_INPUT, activityLogErrorKindOr, activityLogEvent, activityLogOperationSchema, defectFingerprintPreimage, defineActivityLogOperation, isActivityLogCorrelationId, normalizeKeikoFrameSignature, recordActivityLogLoss, supportIncidentBuild, } from "@oscharko-dev/keiko-contracts/runtime/observability";
37
+ import { activityLogPinCovers, isActivityLogSegmentEntry, listActivityLogDirectory, } from "./activity-log-store.js";
38
+ import { createFileServerLogSink, pinActivityLogWindow, releaseActivityLogPin, reportServerLogFailure, serverLogProcessIdentity, } from "./server-log.js";
39
+ import { activityLogTestWriterInstalled } from "./server-logger.js";
40
+ import { FRAME_SHAPE_PATTERN } from "./stack-frames.js";
41
+ import { claimSupportIncidentFingerprint, claimSupportIncidentSlot, ensureSupportIncidentDirectory, listSupportIncidentClaims, listSupportIncidentEntries, readSupportIncidentFingerprintClaim, readSupportIncidentRecord, releaseSupportIncidentFingerprintClaim, releaseSupportIncidentSlot, removeSupportIncidentClaimFile, removeSupportIncidentRecord, serializeSupportIncidentRecord, supportIncidentDirectory, writeSupportIncidentRecord, } from "./support-incident-store.js";
42
+ const MINUTE_MS = 60_000;
43
+ const DAY_MS = 24 * 60 * MINUTE_MS;
44
+ /** An unreported candidate (and its pin) expires this long after creation. */
45
+ export const SUPPORT_INCIDENT_TTL_MS = 14 * DAY_MS;
46
+ /** The pinned window reaches this far before the incident … */
47
+ export const SUPPORT_INCIDENT_WINDOW_BEFORE_MS = 15 * MINUTE_MS;
48
+ /** … and this far after it, so segments sealed after the incident are retained too. */
49
+ export const SUPPORT_INCIDENT_WINDOW_AFTER_MS = 5 * MINUTE_MS;
50
+ /** Records the store holds at most (count quota); also the quota-slot claim file grammar's bound. */
51
+ export const MAX_SUPPORT_INCIDENTS = SUPPORT_INCIDENT_SLOT_COUNT;
52
+ /** Of those, registered-failure candidates may occupy at most this many. */
53
+ export const MAX_REGISTERED_FAILURE_INCIDENTS = 24;
54
+ /** A process re-evaluates one defectFingerprint at most this often. */
55
+ export const SUPPORT_INCIDENT_SUPPRESSION_MS = MINUTE_MS;
56
+ /**
57
+ * A store file younger than this may still be mid-publication by another process: a record or a
58
+ * claim is exclusive-created before its bytes are written, and a claim exists before the record it
59
+ * names. Only an older file has lost its writer (a crash in that gap), so only an older torn
60
+ * record, or an older claim whose record is missing, is ever removed or taken over (#3533 review
61
+ * 4050606506). A younger claim is honored as held.
62
+ */
63
+ export const SUPPORT_INCIDENT_IN_FLIGHT_GRACE_MS = MINUTE_MS;
64
+ // The wall clock against the file's own mtime, never an injected `nowMs`: a file's age is a
65
+ // filesystem fact. A file from the future (the clock stepped back) stays in flight until the clock
66
+ // passes it.
67
+ function abandonedStoreFile(modifiedAtMs) {
68
+ return Date.now() - modifiedAtMs >= SUPPORT_INCIDENT_IN_FLIGHT_GRACE_MS;
69
+ }
70
+ // ─── Lifecycle operations ──────────────────────────────────────────────────────────────────────
71
+ const INCIDENT_ID_FIELD = {
72
+ type: "string",
73
+ dataClass: "opaque-id",
74
+ required: true,
75
+ maxLength: 32,
76
+ };
77
+ const FINGERPRINT_FIELD = {
78
+ type: "string",
79
+ dataClass: "digest",
80
+ required: true,
81
+ maxLength: 64,
82
+ };
83
+ const ALGORITHM_FIELD = { type: "integer", dataClass: "safe-version", required: true };
84
+ const TRIGGER_FIELD = {
85
+ type: "string",
86
+ dataClass: "closed-enum",
87
+ required: true,
88
+ values: ["registered-failure", "user-report"],
89
+ };
90
+ const OPEN_COUNT_FIELD = { type: "integer", dataClass: "count", required: true };
91
+ const SUPPORT_INCIDENT_CREATED_OPERATION = defineActivityLogOperation({
92
+ contractKind: "activity-log-operation",
93
+ schemaVersion: 1,
94
+ op: "support.incident.created",
95
+ category: "diagnostic",
96
+ owner: "keiko-server",
97
+ emitter: "observability/support-incident.createdEvidence",
98
+ fields: {
99
+ incidentId: INCIDENT_ID_FIELD,
100
+ defectFingerprint: FINGERPRINT_FIELD,
101
+ fingerprintAlgorithm: ALGORITHM_FIELD,
102
+ descriptorSchemaVersion: { type: "integer", dataClass: "safe-version", required: true },
103
+ trigger: TRIGGER_FIELD,
104
+ frameCount: { type: "integer", dataClass: "count", required: true },
105
+ pinStatus: {
106
+ type: "string",
107
+ dataClass: "closed-enum",
108
+ required: true,
109
+ values: ["pinned", "quota-exceeded", "rejected"],
110
+ },
111
+ pinnedSegmentCount: { type: "integer", dataClass: "count", required: true },
112
+ pinnedBytes: { type: "integer", dataClass: "count", required: true },
113
+ // True when a sealed segment inside the window, visible just before the pin was published, was
114
+ // already gone by the time the pin actually covered it (a maintenance pass raced the gap): the
115
+ // window is then never reported as a clean "pinned" even though `pinStatus` says "pinned".
116
+ evidenceLostBeforePin: { type: "boolean", dataClass: "closed-enum", required: true },
117
+ windowSeconds: { type: "integer", dataClass: "count", required: true },
118
+ expiresInSeconds: { type: "integer", dataClass: "count", required: true },
119
+ openIncidentCount: OPEN_COUNT_FIELD,
120
+ },
121
+ causal: "correlation",
122
+ lifecycle: "start",
123
+ analyzerProjection: "timeline",
124
+ failureClasses: ["support-incident"],
125
+ proofIds: ["support.incident.created.emitted-line"],
126
+ releaseImpact: "minor",
127
+ });
128
+ const SUPPORT_INCIDENT_DEDUPLICATED_OPERATION = defineActivityLogOperation({
129
+ contractKind: "activity-log-operation",
130
+ schemaVersion: 1,
131
+ op: "support.incident.deduplicated",
132
+ category: "diagnostic",
133
+ owner: "keiko-server",
134
+ emitter: "observability/support-incident.deduplicatedEvidence",
135
+ fields: {
136
+ incidentId: INCIDENT_ID_FIELD,
137
+ defectFingerprint: FINGERPRINT_FIELD,
138
+ fingerprintAlgorithm: ALGORITHM_FIELD,
139
+ trigger: TRIGGER_FIELD,
140
+ openIncidentCount: OPEN_COUNT_FIELD,
141
+ },
142
+ causal: "correlation",
143
+ lifecycle: "state",
144
+ analyzerProjection: "timeline",
145
+ failureClasses: ["support-incident"],
146
+ proofIds: ["support.incident.deduplicated.emitted-line"],
147
+ releaseImpact: "minor",
148
+ });
149
+ const SUPPORT_INCIDENT_REJECTED_OPERATION = defineActivityLogOperation({
150
+ contractKind: "activity-log-operation",
151
+ schemaVersion: 1,
152
+ op: "support.incident.rejected",
153
+ category: "diagnostic",
154
+ owner: "keiko-server",
155
+ emitter: "observability/support-incident.rejectedEvidence",
156
+ fields: {
157
+ rejectionReason: {
158
+ type: "string",
159
+ dataClass: "closed-enum",
160
+ required: true,
161
+ values: [
162
+ "quota-exhausted",
163
+ "store-unavailable",
164
+ "record-too-large",
165
+ "evaluation-rate-limited",
166
+ ],
167
+ },
168
+ defectFingerprint: { ...FINGERPRINT_FIELD, required: false },
169
+ fingerprintAlgorithm: ALGORITHM_FIELD,
170
+ trigger: TRIGGER_FIELD,
171
+ openIncidentCount: OPEN_COUNT_FIELD,
172
+ },
173
+ causal: "correlation",
174
+ lifecycle: "loss",
175
+ analyzerProjection: "failure-cluster",
176
+ failureClasses: ["support-incident"],
177
+ proofIds: ["support.incident.rejected.emitted-line"],
178
+ releaseImpact: "minor",
179
+ });
180
+ const SUPPORT_INCIDENT_DISMISSED_OPERATION = defineActivityLogOperation({
181
+ contractKind: "activity-log-operation",
182
+ schemaVersion: 1,
183
+ op: "support.incident.dismissed",
184
+ category: "diagnostic",
185
+ owner: "keiko-server",
186
+ emitter: "observability/support-incident.dismissedEvidence",
187
+ fields: {
188
+ incidentId: INCIDENT_ID_FIELD,
189
+ defectFingerprint: FINGERPRINT_FIELD,
190
+ fingerprintAlgorithm: ALGORITHM_FIELD,
191
+ trigger: TRIGGER_FIELD,
192
+ incidentState: {
193
+ type: "string",
194
+ dataClass: "closed-enum",
195
+ required: true,
196
+ values: ["candidate", "acknowledged", "reported"],
197
+ },
198
+ pinRelease: {
199
+ type: "string",
200
+ dataClass: "closed-enum",
201
+ required: true,
202
+ values: ["released", "not-pinned", "rejected"],
203
+ },
204
+ openIncidentCount: OPEN_COUNT_FIELD,
205
+ },
206
+ causal: "correlation",
207
+ lifecycle: "end",
208
+ analyzerProjection: "timeline",
209
+ failureClasses: ["support-incident"],
210
+ proofIds: ["support.incident.dismissed.emitted-line"],
211
+ releaseImpact: "minor",
212
+ });
213
+ const SUPPORT_INCIDENT_EXPIRED_OPERATION = defineActivityLogOperation({
214
+ contractKind: "activity-log-operation",
215
+ schemaVersion: 1,
216
+ op: "support.incident.expired",
217
+ category: "diagnostic",
218
+ owner: "keiko-server",
219
+ emitter: "observability/support-incident.expiredEvidence",
220
+ fields: {
221
+ incidentId: INCIDENT_ID_FIELD,
222
+ expiryReason: {
223
+ type: "string",
224
+ dataClass: "closed-enum",
225
+ required: true,
226
+ values: ["expired", "invalid-record"],
227
+ },
228
+ removalStatus: {
229
+ type: "string",
230
+ dataClass: "closed-enum",
231
+ required: true,
232
+ values: ["removed", "failed"],
233
+ },
234
+ defectFingerprint: { ...FINGERPRINT_FIELD, required: false },
235
+ openIncidentCount: OPEN_COUNT_FIELD,
236
+ },
237
+ causal: "correlation",
238
+ lifecycle: "end",
239
+ analyzerProjection: "timeline",
240
+ failureClasses: ["support-incident"],
241
+ proofIds: ["support.incident.expired.emitted-line"],
242
+ releaseImpact: "minor",
243
+ });
244
+ /** This module's own operations: never incident candidates themselves. */
245
+ export const SUPPORT_INCIDENT_OPERATIONS = new Set([
246
+ SUPPORT_INCIDENT_CREATED_OPERATION.op,
247
+ SUPPORT_INCIDENT_DEDUPLICATED_OPERATION.op,
248
+ SUPPORT_INCIDENT_REJECTED_OPERATION.op,
249
+ SUPPORT_INCIDENT_DISMISSED_OPERATION.op,
250
+ SUPPORT_INCIDENT_EXPIRED_OPERATION.op,
251
+ ]);
252
+ // Lifecycle evidence is mandatory: it passes every level threshold, like the process slot's sink.
253
+ function writeEvidence(stateDir, event) {
254
+ createFileServerLogSink(stateDir, { level: "debug" }).write(event);
255
+ }
256
+ function createdEvidence(stateDir, record, correlationId, openIncidentCount) {
257
+ writeEvidence(stateDir, activityLogEvent(SUPPORT_INCIDENT_CREATED_OPERATION, { correlationId }, {
258
+ incidentId: record.incidentId,
259
+ defectFingerprint: record.fingerprint.defectFingerprint,
260
+ fingerprintAlgorithm: record.fingerprint.algorithm,
261
+ descriptorSchemaVersion: record.schemaVersion,
262
+ trigger: record.trigger,
263
+ frameCount: record.fingerprint.frameCount,
264
+ pinStatus: record.pin.status,
265
+ pinnedSegmentCount: record.pin.pinnedSegmentCount,
266
+ pinnedBytes: record.pin.pinnedBytes,
267
+ evidenceLostBeforePin: record.pin.evidenceLostBeforePin,
268
+ windowSeconds: Math.ceil((record.window.toMs - record.window.fromMs) / 1000),
269
+ expiresInSeconds: Math.ceil((record.expiresAtMs - record.createdAtMs) / 1000),
270
+ openIncidentCount,
271
+ completeness: record.pin.status === "pinned" && !record.pin.evidenceLostBeforePin
272
+ ? "complete"
273
+ : "partial",
274
+ }));
275
+ }
276
+ function deduplicatedEvidence(stateDir, target, correlationId, openIncidentCount) {
277
+ writeEvidence(stateDir, activityLogEvent(SUPPORT_INCIDENT_DEDUPLICATED_OPERATION, { correlationId }, {
278
+ incidentId: target.incidentId,
279
+ defectFingerprint: target.defectFingerprint,
280
+ fingerprintAlgorithm: target.fingerprintAlgorithm,
281
+ trigger: target.trigger,
282
+ openIncidentCount,
283
+ }));
284
+ }
285
+ function rejectedEvidence(stateDir, facts) {
286
+ writeEvidence(stateDir, activityLogEvent(SUPPORT_INCIDENT_REJECTED_OPERATION, {
287
+ level: "warn",
288
+ correlationId: facts.correlationId,
289
+ errorKind: rejectionErrorKind(facts.reason),
290
+ }, {
291
+ rejectionReason: facts.reason,
292
+ ...(facts.defectFingerprint === undefined
293
+ ? {}
294
+ : { defectFingerprint: facts.defectFingerprint }),
295
+ fingerprintAlgorithm: DEFECT_FINGERPRINT_ALGORITHM_VERSION,
296
+ trigger: facts.trigger,
297
+ openIncidentCount: facts.openIncidentCount,
298
+ completeness: "partial",
299
+ loss: "event-dropped",
300
+ }));
301
+ }
302
+ function rejectionErrorKind(reason) {
303
+ if (reason === "quota-exhausted" || reason === "evaluation-rate-limited")
304
+ return "rate-limited";
305
+ return reason === "store-unavailable" ? "unavailable" : "validation-failed";
306
+ }
307
+ function dismissedEvidence(stateDir, record, facts) {
308
+ writeEvidence(stateDir, activityLogEvent(SUPPORT_INCIDENT_DISMISSED_OPERATION, { correlationId: facts.correlationId }, {
309
+ incidentId: record.incidentId,
310
+ defectFingerprint: record.fingerprint.defectFingerprint,
311
+ fingerprintAlgorithm: record.fingerprint.algorithm,
312
+ trigger: record.trigger,
313
+ incidentState: record.state,
314
+ pinRelease: facts.pinRelease,
315
+ openIncidentCount: facts.openIncidentCount,
316
+ ...(facts.pinRelease === "rejected" ? { completeness: "partial" } : {}),
317
+ }));
318
+ }
319
+ function expiredEvidence(stateDir, facts) {
320
+ const record = facts.entry.record;
321
+ writeEvidence(stateDir, activityLogEvent(SUPPORT_INCIDENT_EXPIRED_OPERATION, { correlationId: facts.correlationId }, {
322
+ incidentId: facts.entry.incidentId,
323
+ expiryReason: record === undefined ? "invalid-record" : "expired",
324
+ removalStatus: facts.removed ? "removed" : "failed",
325
+ ...(record === undefined
326
+ ? {}
327
+ : { defectFingerprint: record.fingerprint.defectFingerprint }),
328
+ openIncidentCount: facts.openIncidentCount,
329
+ ...(facts.removed ? {} : { completeness: "partial" }),
330
+ }));
331
+ }
332
+ // ─── Fingerprint and candidate policy ──────────────────────────────────────────────────────────
333
+ /** The deterministic, versioned defectFingerprint: SHA-256 over the canonical contract preimage. */
334
+ export function computeDefectFingerprint(input) {
335
+ return createHash("sha256").update(defectFingerprintPreimage(input), "utf8").digest("hex");
336
+ }
337
+ let supportedFailureClasses;
338
+ function supportedFailureClassSet() {
339
+ supportedFailureClasses ??= new Set(ACTIVITY_LOG_FAILURE_CLASS_COVERAGE.classes.map((entry) => entry.failureClass));
340
+ return supportedFailureClasses;
341
+ }
342
+ /**
343
+ * True when the registry declares `op` as a failure operation of at least one supported failure
344
+ * class — the only source of report eligibility (no caller-side list).
345
+ */
346
+ export function supportIncidentEligibleOperation(op) {
347
+ if (SUPPORT_INCIDENT_OPERATIONS.has(op))
348
+ return false;
349
+ const registration = activityLogOperationSchema(op);
350
+ if (registration?.lifecycle !== "failure")
351
+ return false;
352
+ const supported = supportedFailureClassSet();
353
+ return registration.failureClasses.some((failureClass) => supported.has(failureClass));
354
+ }
355
+ function keikoFrames(frames) {
356
+ if (frames === undefined)
357
+ return [];
358
+ return frames.filter((frame) => typeof frame === "string" && FRAME_SHAPE_PATTERN.test(frame));
359
+ }
360
+ function failureFingerprintInput(evidence) {
361
+ return {
362
+ surface: ACTIVITY_LOG_OPERATION_SURFACES[evidence.op] ?? "unattributed",
363
+ op: evidence.op,
364
+ errorKind: activityLogErrorKindOr(evidence.errorKind, "unknown"),
365
+ frames: keikoFrames(evidence.frames),
366
+ };
367
+ }
368
+ function failureCorrelation(evidence) {
369
+ const own = isActivityLogCorrelationId(evidence.correlationId)
370
+ ? evidence.correlationId
371
+ : undefined;
372
+ const parent = isActivityLogCorrelationId(evidence.parentCorrelationId)
373
+ ? evidence.parentCorrelationId
374
+ : undefined;
375
+ const root = parent ?? own;
376
+ const children = parent !== undefined && own !== undefined && own !== parent ? [own] : [];
377
+ return {
378
+ ...(root === undefined ? {} : { rootCorrelationId: root }),
379
+ childCorrelationIds: children.slice(0, MAX_SUPPORT_INCIDENT_CHILD_CORRELATIONS),
380
+ };
381
+ }
382
+ function incidentWindow(nowMs) {
383
+ return {
384
+ fromMs: Math.max(0, nowMs - SUPPORT_INCIDENT_WINDOW_BEFORE_MS),
385
+ incidentAtMs: nowMs,
386
+ toMs: nowMs + SUPPORT_INCIDENT_WINDOW_AFTER_MS,
387
+ };
388
+ }
389
+ function pinFromResult(result) {
390
+ if (result.status === "rejected") {
391
+ return {
392
+ status: "rejected",
393
+ pinnedSegmentCount: 0,
394
+ pinnedBytes: 0,
395
+ evidenceLostBeforePin: false,
396
+ };
397
+ }
398
+ return {
399
+ status: result.quotaStatus === "within-quota" ? "pinned" : "quota-exceeded",
400
+ pinId: result.pinId,
401
+ pinnedSegmentCount: result.pinnedSegmentCount,
402
+ pinnedBytes: result.pinnedBytes,
403
+ evidenceLostBeforePin: false,
404
+ };
405
+ }
406
+ // A synthetic pin record used only to reuse `activityLogPinCovers`'s coverage rule (the same rule
407
+ // retention and the pin API apply) for a window that may not have a real, or not yet a final, pin
408
+ // id. Only `scope` is ever read by that rule; the other fields are structural filler.
409
+ function windowCoverageRecord(window, pinId) {
410
+ return {
411
+ schemaVersion: 1,
412
+ pinId: pinId ?? "0".repeat(24),
413
+ reason: "incident",
414
+ createdAtMs: window.incidentAtMs,
415
+ expiresAtMs: window.incidentAtMs + 1,
416
+ scope: { kind: "window", fromMs: window.fromMs, toMs: window.toMs },
417
+ };
418
+ }
419
+ // The sealed segments the Activity Log directory currently shows overlapping `window`. Sealed
420
+ // only: an active segment is never a retention target (`deletable` in activity-log-store.ts
421
+ // excludes it), so only a sealed name can meaningfully disappear between two snapshots.
422
+ function overlappingSealedSegmentNames(stateDir, window, correlationId) {
423
+ const coverage = windowCoverageRecord(window, undefined);
424
+ try {
425
+ return new Set(listActivityLogDirectory(join(stateDir, ACTIVITY_LOG_DIRECTORY_NAME))
426
+ .files.filter(isActivityLogSegmentEntry)
427
+ .filter((entry) => entry.file.kind === "sealed" && activityLogPinCovers(coverage, entry))
428
+ .map((entry) => entry.file.name));
429
+ }
430
+ catch (error) {
431
+ // Best-effort: an unreadable directory here only skips the evidenceLostBeforePin check below.
432
+ // The pin request itself still runs its own, separately reported, directory read.
433
+ reportServerLogFailure(error, { op: SUPPORT_INCIDENT_CREATED_OPERATION.op, correlationId });
434
+ return new Set();
435
+ }
436
+ }
437
+ function buildRecord(draft, context, pin, incidentId, slotIndex) {
438
+ const identity = serverLogProcessIdentity();
439
+ return {
440
+ schemaVersion: SUPPORT_INCIDENT_SCHEMA_VERSION,
441
+ incidentId,
442
+ trigger: draft.trigger,
443
+ state: "candidate",
444
+ fingerprint: {
445
+ algorithm: DEFECT_FINGERPRINT_ALGORITHM_VERSION,
446
+ defectFingerprint: context.defectFingerprint,
447
+ surface: draft.input.surface,
448
+ op: draft.input.op,
449
+ errorKind: draft.input.errorKind,
450
+ frameCount: normalizeKeikoFrameSignature(draft.input.frames).length,
451
+ },
452
+ correlation: draft.correlation,
453
+ build: supportIncidentBuild(identity.productVersion, identity.platformClass),
454
+ window: incidentWindow(context.nowMs),
455
+ pin,
456
+ slotIndex,
457
+ createdAtMs: context.nowMs,
458
+ expiresAtMs: context.nowMs + SUPPORT_INCIDENT_TTL_MS,
459
+ };
460
+ }
461
+ // Automatics claim ascending from slot 0 (0..MAX_REGISTERED_FAILURE_INCIDENTS-1); user reports
462
+ // claim descending from the top (MAX_SUPPORT_INCIDENTS-1..0). Automatics never touch the top
463
+ // MAX_SUPPORT_INCIDENTS-MAX_REGISTERED_FAILURE_INCIDENTS slots, so those stay available to a user
464
+ // report even when automatics hold their full share -- reproducing quotaAllows's old count-based
465
+ // reserve atomically, one exclusive-create attempt at a time instead of one racy directory count.
466
+ function slotSearchOrder(trigger) {
467
+ if (trigger === "user-report") {
468
+ return Array.from({ length: MAX_SUPPORT_INCIDENTS }, (_, index) => MAX_SUPPORT_INCIDENTS - 1 - index);
469
+ }
470
+ return Array.from({ length: MAX_REGISTERED_FAILURE_INCIDENTS }, (_, index) => index);
471
+ }
472
+ /**
473
+ * Atomically claims one quota slot for `incidentId`, or `undefined` when every slot this trigger
474
+ * may use is already held -- the store (or, for a registered failure, its 24-slot share) is full.
475
+ * Each attempt is one exclusive-create (#3533 review 4050606506): two processes racing the same
476
+ * free slot can never both win it, unlike a count read from a directory listing.
477
+ */
478
+ function claimQuotaSlot(stateDir, trigger, incidentId) {
479
+ for (const slotIndex of slotSearchOrder(trigger)) {
480
+ if (claimSupportIncidentSlot(stateDir, slotIndex, incidentId))
481
+ return slotIndex;
482
+ }
483
+ return undefined;
484
+ }
485
+ // Releases a window pin a draft already published before dedup or quota was decided (the
486
+ // registered-failure trigger always pre-pins; see observeSupportIncidentTrigger). Nothing will
487
+ // reference it once the candidate is rejected or turns out to be a duplicate, so it must not sit
488
+ // and hold its segments for no reason until its own TTL. Never throws: `releaseWindowPin` mirrors
489
+ // `releaseActivityLogPin`'s own closed, evidenced-rejection contract.
490
+ function releasePrePinned(context, draft) {
491
+ if (draft.prePinned === undefined)
492
+ return;
493
+ releaseWindowPin(context.stateDir, draft.prePinned.pinId, {
494
+ correlationId: draft.evidenceCorrelationId,
495
+ env: context.env,
496
+ });
497
+ }
498
+ function reject(context, draft, reason, openIncidentCount) {
499
+ releasePrePinned(context, draft);
500
+ rejectedEvidence(context.stateDir, {
501
+ reason,
502
+ trigger: draft.trigger,
503
+ defectFingerprint: context.defectFingerprint,
504
+ correlationId: draft.evidenceCorrelationId,
505
+ openIncidentCount,
506
+ });
507
+ return { status: "rejected", reason };
508
+ }
509
+ const REJECTED_PIN = {
510
+ status: "rejected",
511
+ pinnedSegmentCount: 0,
512
+ pinnedBytes: 0,
513
+ evidenceLostBeforePin: false,
514
+ };
515
+ /**
516
+ * Publishes the Activity Log retention pin for the incident window and seals the caller's own
517
+ * active segment as part of that request (#3530). Also detects the residual race a synchronous
518
+ * caller cannot fully close on its own: a sealed segment inside the window, visible in the
519
+ * directory just before this call, that is already gone by the time the pin actually covers it —
520
+ * for example another process sharing `stateDir` running retention in the same narrow gap. That
521
+ * loss is reported as `evidenceLostBeforePin` instead of a silent, clean `pinned`. A failed pin
522
+ * never blocks the candidate: it is recorded as `rejected`, so sufficiency can say so.
523
+ */
524
+ function pinIncidentWindow(stateDir, nowMs, correlationId, env) {
525
+ const window = incidentWindow(nowMs);
526
+ const before = overlappingSealedSegmentNames(stateDir, window, correlationId);
527
+ try {
528
+ const pin = pinFromResult(pinActivityLogWindow(stateDir, {
529
+ scope: { kind: "window", fromMs: window.fromMs, toMs: window.toMs },
530
+ expiresAtMs: nowMs + SUPPORT_INCIDENT_TTL_MS,
531
+ reason: "incident",
532
+ correlationId,
533
+ }, env));
534
+ if (pin.status === "rejected" || before.size === 0)
535
+ return pin;
536
+ const after = overlappingSealedSegmentNames(stateDir, window, correlationId);
537
+ const evidenceLostBeforePin = [...before].some((name) => !after.has(name));
538
+ return { ...pin, evidenceLostBeforePin };
539
+ }
540
+ catch (error) {
541
+ reportServerLogFailure(error, { op: SUPPORT_INCIDENT_CREATED_OPERATION.op, correlationId });
542
+ return REJECTED_PIN;
543
+ }
544
+ }
545
+ function publishCandidate(draft, context, entries, incidentId, slotIndex) {
546
+ const pin = draft.prePinned ??
547
+ pinIncidentWindow(context.stateDir, context.nowMs, draft.evidenceCorrelationId, context.env);
548
+ const record = buildRecord(draft, context, pin, incidentId, slotIndex);
549
+ const payload = serializeSupportIncidentRecord(record);
550
+ if (payload === undefined)
551
+ return reject(context, draft, "record-too-large", entries.length);
552
+ try {
553
+ writeSupportIncidentRecord(supportIncidentDirectory(context.stateDir), payload, record.incidentId);
554
+ }
555
+ catch (error) {
556
+ reportServerLogFailure(error, {
557
+ op: SUPPORT_INCIDENT_REJECTED_OPERATION.op,
558
+ correlationId: draft.evidenceCorrelationId,
559
+ });
560
+ // The pin (if any) still expires with the candidate's TTL; nothing is left unbounded.
561
+ return reject(context, draft, "store-unavailable", entries.length);
562
+ }
563
+ createdEvidence(context.stateDir, record, draft.evidenceCorrelationId, entries.length + 1);
564
+ return { status: "created", incidentId: record.incidentId, record };
565
+ }
566
+ // What a fingerprint claim another occurrence holds means for this one. Its record exists: a plain
567
+ // duplicate. Its record is missing but the claim is younger than the in-flight grace: the holder
568
+ // is still publishing, so this occurrence is its duplicate, or, when the holder has not written its
569
+ // id yet, the claim is read again. An older claim has lost its holder; removing it is the sweep's
570
+ // job, which ran just before, so one still here could not be removed.
571
+ function classifyHeldClaim(stateDir, holder) {
572
+ if (holder === undefined)
573
+ return { kind: "read-again" }; // released since the claim attempt
574
+ const { incidentId } = holder;
575
+ const record = incidentId === undefined ? undefined : readSupportIncidentRecord(stateDir, incidentId);
576
+ if (incidentId !== undefined && record !== undefined) {
577
+ return { kind: "duplicate", incidentId, record };
578
+ }
579
+ if (abandonedStoreFile(holder.claimedAtMs))
580
+ return { kind: "abandoned" };
581
+ return incidentId === undefined
582
+ ? { kind: "read-again" }
583
+ : { kind: "duplicate", incidentId, record: undefined };
584
+ }
585
+ /**
586
+ * Atomically decides "is this fingerprint already open" (#3533 review 4050606506): exclusive-
587
+ * create on the fingerprint's own claim file can succeed for only one caller, so two processes
588
+ * racing the identical registered failure can never both believe they are first -- the exclusive
589
+ * create on the incident record's own random-id file name alone never protected the fingerprint
590
+ * itself, only the filename. The loser deduplicates onto the id the winner's claim names, even
591
+ * while the winner is still writing its record. A claim torn mid-write is read once more. An
592
+ * abandoned claim the sweep could not remove, or a claim still torn on the second read, makes this
593
+ * occurrence give up as unavailable rather than risk a second, indistinguishable publish.
594
+ */
595
+ function claimOrFindDuplicate(stateDir, defectFingerprint, incidentId, correlationId) {
596
+ for (let attempt = 0; attempt < 2; attempt += 1) {
597
+ try {
598
+ if (claimSupportIncidentFingerprint(stateDir, defectFingerprint, incidentId)) {
599
+ return { status: "claimed" };
600
+ }
601
+ const held = classifyHeldClaim(stateDir, readSupportIncidentFingerprintClaim(stateDir, defectFingerprint));
602
+ if (held.kind === "duplicate") {
603
+ return { status: "duplicate", incidentId: held.incidentId, record: held.record };
604
+ }
605
+ if (held.kind === "abandoned")
606
+ return { status: "unavailable" };
607
+ }
608
+ catch (error) {
609
+ reportServerLogFailure(error, { op: SUPPORT_INCIDENT_CREATED_OPERATION.op, correlationId });
610
+ return { status: "unavailable" };
611
+ }
612
+ }
613
+ return { status: "unavailable" };
614
+ }
615
+ function sweptEntriesOrReject(stateDir, context, draft) {
616
+ try {
617
+ ensureSupportIncidentDirectory(stateDir);
618
+ const entries = sweepExpiredEntries(stateDir, context.nowMs, draft.evidenceCorrelationId);
619
+ return { ok: true, entries };
620
+ }
621
+ catch (error) {
622
+ reportServerLogFailure(error, {
623
+ op: SUPPORT_INCIDENT_REJECTED_OPERATION.op,
624
+ correlationId: draft.evidenceCorrelationId,
625
+ });
626
+ return { ok: false, result: reject(context, draft, "store-unavailable", 0) };
627
+ }
628
+ }
629
+ function deduplicationTarget(incidentId, record, context, draft) {
630
+ return record === undefined
631
+ ? {
632
+ incidentId,
633
+ defectFingerprint: context.defectFingerprint,
634
+ fingerprintAlgorithm: DEFECT_FINGERPRINT_ALGORITHM_VERSION,
635
+ trigger: draft.trigger,
636
+ }
637
+ : {
638
+ incidentId,
639
+ defectFingerprint: record.fingerprint.defectFingerprint,
640
+ fingerprintAlgorithm: record.fingerprint.algorithm,
641
+ trigger: record.trigger,
642
+ };
643
+ }
644
+ // Handles the two outcomes that end candidate creation before quota or publish is even reached;
645
+ // "claimed" (the common case) falls through and lets createCandidate proceed.
646
+ function handleDedup(stateDir, context, draft, dedupFingerprint, incidentId, openIncidentCount) {
647
+ const dedup = claimOrFindDuplicate(stateDir, dedupFingerprint, incidentId, draft.evidenceCorrelationId);
648
+ if (dedup.status === "unavailable") {
649
+ return { done: true, result: reject(context, draft, "store-unavailable", openIncidentCount) };
650
+ }
651
+ if (dedup.status === "duplicate") {
652
+ releasePrePinned(context, draft);
653
+ deduplicatedEvidence(stateDir, deduplicationTarget(dedup.incidentId, dedup.record, context, draft), draft.evidenceCorrelationId, openIncidentCount);
654
+ return {
655
+ done: true,
656
+ result: { status: "deduplicated", incidentId: dedup.incidentId, record: dedup.record },
657
+ };
658
+ }
659
+ return { done: false };
660
+ }
661
+ function createCandidate(stateDir, draft, options) {
662
+ const context = {
663
+ stateDir,
664
+ nowMs: options.nowMs ?? Date.now(),
665
+ env: options.env ?? process.env,
666
+ defectFingerprint: computeDefectFingerprint(draft.input),
667
+ };
668
+ const swept = sweptEntriesOrReject(stateDir, context, draft);
669
+ if (!swept.ok)
670
+ return swept.result;
671
+ const entries = swept.entries;
672
+ const incidentId = randomBytes(16).toString("hex");
673
+ const dedupFingerprint = draft.trigger === "registered-failure" ? context.defectFingerprint : undefined;
674
+ if (dedupFingerprint !== undefined) {
675
+ const handled = handleDedup(stateDir, context, draft, dedupFingerprint, incidentId, entries.length);
676
+ if (handled.done)
677
+ return handled.result;
678
+ }
679
+ const slotIndex = claimQuotaSlot(stateDir, draft.trigger, incidentId);
680
+ if (slotIndex === undefined) {
681
+ if (dedupFingerprint !== undefined) {
682
+ releaseSupportIncidentFingerprintClaim(stateDir, dedupFingerprint);
683
+ }
684
+ return reject(context, draft, "quota-exhausted", entries.length);
685
+ }
686
+ const created = publishCandidate(draft, context, entries, incidentId, slotIndex);
687
+ if (created.status !== "created")
688
+ releaseClaims(stateDir, dedupFingerprint, slotIndex);
689
+ return created;
690
+ }
691
+ function registeredFailureDraft(evidence) {
692
+ const correlation = failureCorrelation(evidence);
693
+ return {
694
+ trigger: "registered-failure",
695
+ input: failureFingerprintInput(evidence),
696
+ correlation,
697
+ // The failing operation's own correlation (validated), so the candidate's lines join it.
698
+ evidenceCorrelationId: correlation.childCorrelationIds[0] ?? correlation.rootCorrelationId ?? randomUUID(),
699
+ };
700
+ }
701
+ /**
702
+ * Records a candidate for one registered failure event (the automatic trigger). Returns
703
+ * `undefined` without any filesystem work when the operation is not eligible.
704
+ */
705
+ export function recordRegisteredFailureIncident(stateDir, evidence, options = {}) {
706
+ if (!supportIncidentEligibleOperation(evidence.op))
707
+ return undefined;
708
+ return createCandidate(stateDir, registeredFailureDraft(evidence), options);
709
+ }
710
+ /**
711
+ * Records a candidate for an explicit user "Report a problem" action. It needs no failure event:
712
+ * its fingerprint uses the fixed unattributed inputs, and its sufficiency is computed later from
713
+ * the pinned window, where a missing registered failure is a closed instrumentation-gap reason.
714
+ */
715
+ export function recordUserReportedIncident(stateDir, options = {}) {
716
+ const correlationId = isActivityLogCorrelationId(options.correlationId)
717
+ ? options.correlationId
718
+ : randomUUID();
719
+ return createCandidate(stateDir, {
720
+ trigger: "user-report",
721
+ input: UNATTRIBUTED_DEFECT_FINGERPRINT_INPUT,
722
+ correlation: { rootCorrelationId: correlationId, childCorrelationIds: [] },
723
+ evidenceCorrelationId: correlationId,
724
+ }, options);
725
+ }
726
+ // ─── Reading, expiry, dismissal ────────────────────────────────────────────────────────────────
727
+ function openEntry(entry, nowMs) {
728
+ return entry.record !== undefined && entry.record.expiresAtMs > nowMs;
729
+ }
730
+ // An expired record, or an unreadable one whose writer is gone. An unreadable record younger than
731
+ // the in-flight grace may still be mid-write by another process: it is neither open nor removed.
732
+ function removableEntry(entry, nowMs) {
733
+ return entry.record === undefined
734
+ ? abandonedStoreFile(entry.modifiedAtMs)
735
+ : entry.record.expiresAtMs <= nowMs;
736
+ }
737
+ // Releases the quota-slot claim, and (for a registered failure) the fingerprint claim, that a
738
+ // record's own existence depends on. Shared by dismissal and by the expiry sweep below, and by
739
+ // createCandidate's own rollback when a claimed slot's record write ultimately fails.
740
+ function releaseClaims(stateDir, defectFingerprint, slotIndex) {
741
+ if (defectFingerprint !== undefined) {
742
+ releaseSupportIncidentFingerprintClaim(stateDir, defectFingerprint);
743
+ }
744
+ releaseSupportIncidentSlot(stateDir, slotIndex);
745
+ }
746
+ function releaseRecordClaims(stateDir, record) {
747
+ releaseClaims(stateDir, record.trigger === "registered-failure" ? record.fingerprint.defectFingerprint : undefined, record.slotIndex);
748
+ }
749
+ function removeEntry(stateDir, entry) {
750
+ try {
751
+ removeSupportIncidentRecord(stateDir, entry.incidentId);
752
+ }
753
+ catch (error) {
754
+ reportServerLogFailure(error, { op: SUPPORT_INCIDENT_EXPIRED_OPERATION.op });
755
+ return false;
756
+ }
757
+ if (entry.record !== undefined)
758
+ releaseRecordClaims(stateDir, entry.record);
759
+ return true;
760
+ }
761
+ // A claim whose referenced incidentId names no record right now is an orphan once it is older than
762
+ // the in-flight grace: a crash between claiming and writing that record, or a record already
763
+ // removed by the loop above in this same pass. A younger claim may belong to an occurrence still
764
+ // publishing its record in another process, so it is left alone (#3533 review 4050606506).
765
+ // Checks each claim against a FRESH read, never a pre-computed "open" set: entries/open is
766
+ // a snapshot taken earlier in this same sweep, and a claim (with its record) can legitimately be
767
+ // published by another process in the gap between that snapshot and this loop -- reusing the
768
+ // stale snapshot here would delete a brand-new, perfectly live claim out from under its owner,
769
+ // silently reopening the exact cross-process race this whole scheme exists to close. Best-effort
770
+ // per claim (#3533 review 4050606506) so one bad removal never blocks the rest.
771
+ function sweepOrphanedClaims(stateDir) {
772
+ let claims;
773
+ try {
774
+ claims = listSupportIncidentClaims(stateDir);
775
+ }
776
+ catch (error) {
777
+ reportServerLogFailure(error, { op: SUPPORT_INCIDENT_EXPIRED_OPERATION.op });
778
+ return;
779
+ }
780
+ for (const claim of claims) {
781
+ if (!abandonedStoreFile(claim.claimedAtMs))
782
+ continue;
783
+ if (claim.incidentId !== undefined &&
784
+ readSupportIncidentRecord(stateDir, claim.incidentId) !== undefined) {
785
+ continue;
786
+ }
787
+ try {
788
+ removeSupportIncidentClaimFile(stateDir, claim.fileName);
789
+ }
790
+ catch (error) {
791
+ reportServerLogFailure(error, { op: SUPPORT_INCIDENT_EXPIRED_OPERATION.op });
792
+ }
793
+ }
794
+ }
795
+ /**
796
+ * Removes every expired record and every unreadable one whose writer is gone (predictable expiry
797
+ * and torn-record recovery), emits one `support.incident.expired` line per removal, sweeps orphaned
798
+ * dedup/quota claims, and returns the records that remain open. A file still inside the in-flight
799
+ * grace is left to the process publishing it.
800
+ */
801
+ function sweepExpiredEntries(stateDir, nowMs, correlationId) {
802
+ const entries = listSupportIncidentEntries(stateDir);
803
+ const open = entries.filter((entry) => openEntry(entry, nowMs));
804
+ for (const entry of entries) {
805
+ if (!removableEntry(entry, nowMs))
806
+ continue;
807
+ const removed = removeEntry(stateDir, entry);
808
+ expiredEvidence(stateDir, { entry, removed, correlationId, openIncidentCount: open.length });
809
+ }
810
+ sweepOrphanedClaims(stateDir);
811
+ return open;
812
+ }
813
+ /** The open (unexpired, readable) incident records, oldest first. Expires stale records first. */
814
+ export function listSupportIncidents(stateDir, options = {}) {
815
+ const correlationId = options.correlationId ?? randomUUID();
816
+ return sweepExpiredEntries(stateDir, options.nowMs ?? Date.now(), correlationId).flatMap((entry) => (entry.record === undefined ? [] : [entry.record]));
817
+ }
818
+ /**
819
+ * One open incident record by id: `undefined` when the id is malformed, unknown, expired, or its
820
+ * record is unreadable. Read-only — expiry removal happens in `listSupportIncidents`.
821
+ */
822
+ export function readSupportIncident(stateDir, incidentId, options = {}) {
823
+ const record = readSupportIncidentRecord(stateDir, incidentId);
824
+ return record !== undefined && record.expiresAtMs > (options.nowMs ?? Date.now())
825
+ ? record
826
+ : undefined;
827
+ }
828
+ /**
829
+ * The Activity Log segments the incident window covers now, in logical-log order, selected by the
830
+ * retention pin's own coverage rule (#3530) so the resolver and retention can never disagree. A
831
+ * window pin also covers segments sealed after the incident, so this set can grow until the window
832
+ * closes. Legacy daily files predate segments and are never selected.
833
+ */
834
+ export function supportIncidentSegmentFiles(stateDir, record) {
835
+ const coverage = windowCoverageRecord(record.window, record.pin.pinId);
836
+ return listActivityLogDirectory(join(stateDir, ACTIVITY_LOG_DIRECTORY_NAME))
837
+ .files.filter(isActivityLogSegmentEntry)
838
+ .filter((entry) => activityLogPinCovers(coverage, entry))
839
+ .map((entry) => ({
840
+ segmentId: entry.file.segmentId,
841
+ state: entry.file.kind,
842
+ sizeBytes: entry.sizeBytes,
843
+ path: entry.path,
844
+ }));
845
+ }
846
+ // Shared by dismissal (an existing record's own pin) and by a candidate outcome other than
847
+ // "created" that must release a pin it published pre-emptively (releasePrePinned above). Never
848
+ // throws: an absent pin id is `not-pinned`, and `releaseActivityLogPin` closes every other outcome
849
+ // into `released` or a rejection on its own.
850
+ function releaseWindowPin(stateDir, pinId, context) {
851
+ if (pinId === undefined)
852
+ return "not-pinned";
853
+ const result = releaseActivityLogPin(stateDir, { pinId, correlationId: context.correlationId }, context.env);
854
+ return result.status === "released" ? "released" : "rejected";
855
+ }
856
+ function releaseIncidentPin(stateDir, record, context) {
857
+ return releaseWindowPin(stateDir, record.pin.pinId, context);
858
+ }
859
+ /**
860
+ * Explicit human dismissal: removes the record and releases its Activity Log pin, so the window
861
+ * returns to ordinary retention. A pin that cannot be released still lapses at its bounded expiry.
862
+ */
863
+ export function dismissSupportIncident(stateDir, incidentId, options = {}) {
864
+ const correlationId = options.correlationId ?? randomUUID();
865
+ const open = sweepExpiredEntries(stateDir, options.nowMs ?? Date.now(), correlationId);
866
+ const record = open.find((entry) => entry.incidentId === incidentId)?.record;
867
+ if (record === undefined)
868
+ return "not-found";
869
+ try {
870
+ removeSupportIncidentRecord(stateDir, incidentId);
871
+ }
872
+ catch (error) {
873
+ reportServerLogFailure(error, { op: SUPPORT_INCIDENT_DISMISSED_OPERATION.op, correlationId });
874
+ return "failed";
875
+ }
876
+ releaseRecordClaims(stateDir, record);
877
+ const pinRelease = releaseIncidentPin(stateDir, record, {
878
+ correlationId,
879
+ env: options.env ?? process.env,
880
+ });
881
+ dismissedEvidence(stateDir, record, {
882
+ correlationId,
883
+ openIncidentCount: open.length - 1,
884
+ pinRelease,
885
+ });
886
+ return "dismissed";
887
+ }
888
+ // ─── The registered-failure trigger ────────────────────────────────────────────────────────────
889
+ //
890
+ // The Activity Log file sink calls `observeSupportIncidentTrigger` for every persisted line. The
891
+ // hook computes eligibility and, for an admitted failure, publishes the Activity Log retention pin
892
+ // for its window SYNCHRONOUSLY, in the same turn as the triggering write: the window must be
893
+ // protected before any later maintenance pass -- this process's own next segment admission, or a
894
+ // second process sharing the same stateDir -- can run against it (a `setImmediate` deferral here
895
+ // previously left exactly that gap; #3533 review). Only the rest of candidate creation (the
896
+ // directory sweep, deduplication, the quota check, and the record write) runs outside the sink's
897
+ // write path, on the next turn of the event loop, and synchronously on process exit so a failure
898
+ // that ends the process still becomes a candidate. A duplicate or a rejected candidate releases the
899
+ // pin the trigger already published (releasePrePinned) instead of leaving it to its own TTL.
900
+ /** A process evaluates at most this many new candidates per rolling minute (all fingerprints). */
901
+ export const MAX_SUPPORT_INCIDENT_EVALUATIONS_PER_MINUTE = 6;
902
+ const MAX_REMEMBERED_FINGERPRINTS = 128;
903
+ let triggerDepth = 0;
904
+ let triggerOverride;
905
+ let drainScheduled = false;
906
+ let exitFlushInstalled = false;
907
+ const recentFingerprints = new Map();
908
+ const recentEvaluations = [];
909
+ const pendingCandidates = [];
910
+ // The last time a rate-limited evaluation was evidenced (#3533 audit): throttled by the same
911
+ // SUPPORT_INCIDENT_SUPPRESSION_MS window as everything else here, so a storm that keeps hitting
912
+ // the per-minute cap reports it once per window instead of flooding the log with one line per
913
+ // dropped evaluation.
914
+ let lastRateLimitEvidenceAtMs;
915
+ /** Test seam: force the automatic trigger on or off; `undefined` restores the default. */
916
+ export function setSupportIncidentTriggerForTests(enabled) {
917
+ triggerOverride = enabled;
918
+ recentFingerprints.clear();
919
+ recentEvaluations.length = 0;
920
+ pendingCandidates.length = 0;
921
+ lastRateLimitEvidenceAtMs = undefined;
922
+ }
923
+ function triggerEnabled() {
924
+ return triggerOverride ?? !activityLogTestWriterInstalled();
925
+ }
926
+ // Bounds the cost a failure storm can add: one fingerprint is re-evaluated at most once per
927
+ // SUPPORT_INCIDENT_SUPPRESSION_MS ("suppressed"), and all fingerprints together at most
928
+ // MAX_SUPPORT_INCIDENT_EVALUATIONS_PER_MINUTE times ("rate-limited"). A suppressed recurrence
929
+ // loses no evidence -- the failure line itself is always persisted, and the first occurrence's
930
+ // pinned window and the Activity Log's own retention already cover it -- but a rate-limited
931
+ // evaluation can be a defect Keiko has never seen before, dropped purely because the shared cap was
932
+ // already spent; the caller evidences that case explicitly (#3533 audit).
933
+ function admitEvaluation(fingerprint, nowMs) {
934
+ const last = recentFingerprints.get(fingerprint);
935
+ if (last !== undefined && nowMs - last < SUPPORT_INCIDENT_SUPPRESSION_MS)
936
+ return "suppressed";
937
+ while (recentEvaluations.length > 0 && nowMs - (recentEvaluations[0] ?? nowMs) >= MINUTE_MS) {
938
+ recentEvaluations.shift();
939
+ }
940
+ if (recentEvaluations.length >= MAX_SUPPORT_INCIDENT_EVALUATIONS_PER_MINUTE)
941
+ return "rate-limited";
942
+ recentEvaluations.push(nowMs);
943
+ if (recentFingerprints.size >= MAX_REMEMBERED_FINGERPRINTS)
944
+ recentFingerprints.clear();
945
+ recentFingerprints.set(fingerprint, nowMs);
946
+ return "admitted";
947
+ }
948
+ function eventFrames(event) {
949
+ const frames = event.extra?.frames;
950
+ return Array.isArray(frames) ? [...frames] : undefined;
951
+ }
952
+ function admittedEvidence(event) {
953
+ if (!supportIncidentEligibleOperation(event.op))
954
+ return { status: "ineligible" };
955
+ const evidence = {
956
+ op: event.op,
957
+ errorKind: event.errorKind,
958
+ correlationId: event.correlationId,
959
+ parentCorrelationId: event.parentCorrelationId,
960
+ frames: eventFrames(event),
961
+ };
962
+ const defectFingerprint = computeDefectFingerprint(failureFingerprintInput(evidence));
963
+ const admission = admitEvaluation(defectFingerprint, Date.now());
964
+ if (admission === "admitted")
965
+ return { status: "admitted", evidence };
966
+ return admission === "rate-limited"
967
+ ? { status: "rate-limited", defectFingerprint }
968
+ : { status: "suppressed" };
969
+ }
970
+ // At most one `support.incident.rejected` line per suppression window (see
971
+ // lastRateLimitEvidenceAtMs above), so a sustained storm costs one evidenced line per minute, not
972
+ // one per dropped evaluation. openIncidentCount is a plain listing, never the full expiry sweep:
973
+ // this path exists specifically to stay cheap under a storm.
974
+ function reportRateLimitedEvaluation(stateDir, defectFingerprint, correlationId) {
975
+ const nowMs = Date.now();
976
+ if (lastRateLimitEvidenceAtMs !== undefined &&
977
+ nowMs - lastRateLimitEvidenceAtMs < SUPPORT_INCIDENT_SUPPRESSION_MS) {
978
+ return;
979
+ }
980
+ lastRateLimitEvidenceAtMs = nowMs;
981
+ rejectedEvidence(stateDir, {
982
+ reason: "evaluation-rate-limited",
983
+ trigger: "registered-failure",
984
+ defectFingerprint,
985
+ correlationId: correlationId ?? randomUUID(),
986
+ openIncidentCount: listSupportIncidentEntries(stateDir).length,
987
+ });
988
+ }
989
+ function reportLostCandidate(error, correlationId) {
990
+ // The failure line itself is already persisted; only the candidate is lost, and says so.
991
+ recordActivityLogLoss("persistence-failed");
992
+ reportServerLogFailure(error, {
993
+ op: SUPPORT_INCIDENT_REJECTED_OPERATION.op,
994
+ correlationId,
995
+ loss: "event-dropped",
996
+ });
997
+ }
998
+ function createQueuedCandidate(pending) {
999
+ triggerDepth += 1;
1000
+ try {
1001
+ createCandidate(pending.stateDir, pending.draft, { nowMs: pending.nowMs });
1002
+ }
1003
+ catch (error) {
1004
+ reportLostCandidate(error, pending.draft.evidenceCorrelationId);
1005
+ }
1006
+ finally {
1007
+ triggerDepth -= 1;
1008
+ }
1009
+ }
1010
+ /** Creates every queued candidate now: the deferred drain, and the synchronous exit flush. */
1011
+ export function drainSupportIncidentCandidates() {
1012
+ drainScheduled = false;
1013
+ for (const pending of pendingCandidates.splice(0))
1014
+ createQueuedCandidate(pending);
1015
+ }
1016
+ function scheduleDrain() {
1017
+ if (!exitFlushInstalled) {
1018
+ exitFlushInstalled = true;
1019
+ process.once("exit", drainSupportIncidentCandidates);
1020
+ }
1021
+ if (drainScheduled)
1022
+ return;
1023
+ drainScheduled = true;
1024
+ setImmediate(drainSupportIncidentCandidates);
1025
+ }
1026
+ /**
1027
+ * Called by the Activity Log file sink after it persisted `event`. For an eligible, admitted
1028
+ * failure, publishes the incident window's retention pin right now (before returning) and queues
1029
+ * the rest of candidate creation; never throws. An ineligible or suppressed event does no
1030
+ * filesystem work at all.
1031
+ */
1032
+ export function observeSupportIncidentTrigger(stateDir, event) {
1033
+ if (triggerDepth > 0 || event.level !== "error" || !triggerEnabled())
1034
+ return;
1035
+ try {
1036
+ const admission = admittedEvidence(event);
1037
+ if (admission.status === "rate-limited") {
1038
+ reportRateLimitedEvaluation(stateDir, admission.defectFingerprint, event.correlationId);
1039
+ return;
1040
+ }
1041
+ if (admission.status !== "admitted")
1042
+ return;
1043
+ const nowMs = Date.now();
1044
+ const draft = registeredFailureDraft(admission.evidence);
1045
+ const pin = pinIncidentWindow(stateDir, nowMs, draft.evidenceCorrelationId, process.env);
1046
+ pendingCandidates.push({ stateDir, draft: { ...draft, prePinned: pin }, nowMs });
1047
+ scheduleDrain();
1048
+ }
1049
+ catch (error) {
1050
+ reportLostCandidate(error, event.correlationId);
1051
+ }
1052
+ }