@oscharko-dev/keiko 1.2.7 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1132) hide show
  1. package/README.md +36 -5
  2. package/dist/ui/csp-hashes.json +7 -7
  3. package/dist/ui/static/404.html +1 -1
  4. package/dist/ui/static/__next.__PAGE__.txt +31 -31
  5. package/dist/ui/static/__next._full.txt +40 -38
  6. package/dist/ui/static/__next._tree.txt +4 -3
  7. package/dist/ui/static/_next/static/chunks/{1layk925byvud.js → 0-o73vcl81gxp.js} +1 -1
  8. package/dist/ui/static/_next/static/chunks/0-vpa4wvwcpe-.js +1 -0
  9. package/dist/ui/static/_next/static/chunks/00r78wq51vv7p.js +1 -0
  10. package/dist/ui/static/_next/static/chunks/00yei-8muakqk.js +1 -0
  11. package/dist/ui/static/_next/static/chunks/013_eu8kl0gb5.js +2 -0
  12. package/dist/ui/static/_next/static/chunks/{1na0aypin6kwh.js → 01nzk47fvnp1t.js} +1 -1
  13. package/dist/ui/static/_next/static/chunks/{2-ayearhfgxi5.js → 01q9wnshe_-rz.js} +1 -1
  14. package/dist/ui/static/_next/static/chunks/02ex3k089apnn.js +1 -0
  15. package/dist/ui/static/_next/static/chunks/{1nqe0rzxqwjkw.js → 02jl1lf3a8dud.js} +5 -5
  16. package/dist/ui/static/_next/static/chunks/036rtd09k8_ad.js +115 -0
  17. package/dist/ui/static/_next/static/chunks/048ovhn3wu_bu.js +1 -0
  18. package/dist/ui/static/_next/static/chunks/05ckjqpq5fs4j.js +1 -0
  19. package/dist/ui/static/_next/static/chunks/08db-gqjr8owi.js +1 -0
  20. package/dist/ui/static/_next/static/chunks/08x7pi746hdjg.js +86 -0
  21. package/dist/ui/static/_next/static/chunks/0_avx_tl-uxim.js +1 -0
  22. package/dist/ui/static/_next/static/chunks/0cvtkiw2nnx5u.js +1 -0
  23. package/dist/ui/static/_next/static/chunks/0em5-43ag74be.js +1 -0
  24. package/dist/ui/static/_next/static/chunks/0eub6ctk-lx6x.js +1 -0
  25. package/dist/ui/static/_next/static/chunks/0f5a0vl40n41q.js +93 -0
  26. package/dist/ui/static/_next/static/chunks/0frmhx04k4f8m.js +1 -0
  27. package/dist/ui/static/_next/static/chunks/0h-d1ht-slu-w.js +1 -0
  28. package/dist/ui/static/_next/static/chunks/0h-upsn6lazz9.js +1 -0
  29. package/dist/ui/static/_next/static/chunks/0l2m0uaca7i0k.js +1 -0
  30. package/dist/ui/static/_next/static/chunks/{1lo51t4ykvotu.js → 0ld3t8oea9hy4.js} +1 -1
  31. package/dist/ui/static/_next/static/chunks/0lkj6sqxq86nj.js +1 -0
  32. package/dist/ui/static/_next/static/chunks/0lmsmxjl20gd_.js +1 -0
  33. package/dist/ui/static/_next/static/chunks/{2r-ixexb6tw-l.js → 0o0r6txb3s4ga.js} +1 -1
  34. package/dist/ui/static/_next/static/chunks/0q093f1wzrxjc.js +10 -0
  35. package/dist/ui/static/_next/static/chunks/{2--bm_kzfgi53.js → 0ru_y22on6q7e.js} +1 -1
  36. package/dist/ui/static/_next/static/chunks/0sbsupp6l3fhs.js +122 -0
  37. package/dist/ui/static/_next/static/chunks/0sjpthhqiy35-.js +77 -0
  38. package/dist/ui/static/_next/static/chunks/0u0_dl0v9_1iu.js +1 -0
  39. package/dist/ui/static/_next/static/chunks/0u1yu4bee1lua.js +148 -0
  40. package/dist/ui/static/_next/static/chunks/0ulgtntj_ouhr.js +94 -0
  41. package/dist/ui/static/_next/static/chunks/{2a9l_04_160z1.js → 0vculqg2ywydc.js} +2 -2
  42. package/dist/ui/static/_next/static/chunks/{1tmw16_b-qann.js → 0vm0za6c--wqd.js} +1 -1
  43. package/dist/ui/static/_next/static/chunks/{242ju-8-y2a2m.js → 0z-0fcs2vq9p8.js} +1 -1
  44. package/dist/ui/static/_next/static/chunks/0zf356goly5qa.js +1 -0
  45. package/dist/ui/static/_next/static/chunks/1073luadh4b0t.js +34 -0
  46. package/dist/ui/static/_next/static/chunks/13f6ivzqgnbw1.js +287 -0
  47. package/dist/ui/static/_next/static/chunks/14a82wtay44g0.js +1 -0
  48. package/dist/ui/static/_next/static/chunks/165pcl4xl06au.js +1 -0
  49. package/dist/ui/static/_next/static/chunks/18lchth-3hzrj.js +158 -0
  50. package/dist/ui/static/_next/static/chunks/19wc3w-pyquvj.js +1 -0
  51. package/dist/ui/static/_next/static/chunks/1a1e0t6lmbu2t.js +22 -0
  52. package/dist/ui/static/_next/static/chunks/1a6xpyv7wp8mw.css +6 -0
  53. package/dist/ui/static/_next/static/chunks/1at-eg4pjyhhv.js +124 -0
  54. package/dist/ui/static/_next/static/chunks/1attgz5m1f9pb.js +104 -0
  55. package/dist/ui/static/_next/static/chunks/1b2674hlxp05d.js +1 -0
  56. package/dist/ui/static/_next/static/chunks/1b_3is6j9lo7s.js +27 -0
  57. package/dist/ui/static/_next/static/chunks/1bexndskkpb-l.js +1 -0
  58. package/dist/ui/static/_next/static/chunks/{0kjv5jpoy_3wx.js → 1c_pss23_wycd.js} +1 -1
  59. package/dist/ui/static/_next/static/chunks/1cvzxvmhd8k9g.js +1 -0
  60. package/dist/ui/static/_next/static/chunks/{40_mgil0e17bk.js → 1d_810phvbt-v.js} +1 -1
  61. package/dist/ui/static/_next/static/chunks/{30vnoxh_uxkfo.js → 1e9f1ex2uq29r.js} +1 -1
  62. package/dist/ui/static/_next/static/chunks/1i7xk_bpdb206.js +1 -0
  63. package/dist/ui/static/_next/static/chunks/1isrybhkr_cy_.js +82 -0
  64. package/dist/ui/static/_next/static/chunks/1jh83l6i471hs.js +1 -0
  65. package/dist/ui/static/_next/static/chunks/{1wxgm93nd75ns.js → 1k7tt8btcpb6z.js} +1 -1
  66. package/dist/ui/static/_next/static/chunks/1k_nzgb93nxr8.js +226 -0
  67. package/dist/ui/static/_next/static/chunks/1ka7n7_t88nku.js +29 -0
  68. package/dist/ui/static/_next/static/chunks/{1wq7gotrl8jek.css → 1kbra771vsw0c.css} +1 -1
  69. package/dist/ui/static/_next/static/chunks/1mjmyr3-5-6-7.js +15 -0
  70. package/dist/ui/static/_next/static/chunks/{2dge_j5c5fie5.js → 1mvumqxojg5gz.js} +1 -1
  71. package/dist/ui/static/_next/static/chunks/1n4mmvvatk3mn.js +1 -0
  72. package/dist/ui/static/_next/static/chunks/1n5zoyzs4szlj.js +1 -0
  73. package/dist/ui/static/_next/static/chunks/1nz7wziy2b21i.js +1 -0
  74. package/dist/ui/static/_next/static/chunks/1ps1c2k2b450f.js +1 -0
  75. package/dist/ui/static/_next/static/chunks/1pw2mt5mwtr9t.js +1 -0
  76. package/dist/ui/static/_next/static/chunks/1r5gxo360o3td.js +153 -0
  77. package/dist/ui/static/_next/static/chunks/{2dhtqq8a83t27.css → 1rhvew72iz-n3.css} +14 -9
  78. package/dist/ui/static/_next/static/chunks/{09v8w4wuj4m1_.js → 1sjvzpa27mjxc.js} +1 -1
  79. package/dist/ui/static/_next/static/chunks/{2ql8dczlqzd4u.js → 1t64aljha95yf.js} +1 -1
  80. package/dist/ui/static/_next/static/chunks/1tw5oyzju-ijp.js +23 -0
  81. package/dist/ui/static/_next/static/chunks/1tyghneva-hiy.js +1 -0
  82. package/dist/ui/static/_next/static/chunks/1ufe9d586c16n.js +1 -0
  83. package/dist/ui/static/_next/static/chunks/1uxz_w63vj11u.js +79 -0
  84. package/dist/ui/static/_next/static/chunks/{0_wcaciq9-s_c.js → 1uy2itzuap01l.js} +1 -1
  85. package/dist/ui/static/_next/static/chunks/1veg_qtra_2-d.js +41 -0
  86. package/dist/ui/static/_next/static/chunks/1xyltb603pg9u.css +4 -0
  87. package/dist/ui/static/_next/static/chunks/{1_6h8vxxlkwg1.js → 1z8n7lj5wgp4m.js} +1 -1
  88. package/dist/ui/static/_next/static/chunks/20eou_wcxpx1s.js +1 -0
  89. package/dist/ui/static/_next/static/chunks/{35eygftv-qu-q.js → 21yx7habl0roe.js} +1 -1
  90. package/dist/ui/static/_next/static/chunks/226y24czlj0wp.js +1 -0
  91. package/dist/ui/static/_next/static/chunks/{3i5xyx-alljjx.js → 24fnfy1y6n4og.js} +1 -1
  92. package/dist/ui/static/_next/static/chunks/250of-fyd3fhr.js +1 -0
  93. package/dist/ui/static/_next/static/chunks/26dysjhfplkru.js +1 -0
  94. package/dist/ui/static/_next/static/chunks/2_uz2tn-uwusm.js +1 -0
  95. package/dist/ui/static/_next/static/chunks/2ajat_rv2v0wp.js +1 -0
  96. package/dist/ui/static/_next/static/chunks/2ajmg9bm0a9y0.js +32 -0
  97. package/dist/ui/static/_next/static/chunks/{272m__6w4ehe1.css → 2ayb5cby-2fpy.css} +9 -8
  98. package/dist/ui/static/_next/static/chunks/2ayjltgsne_71.js +90 -0
  99. package/dist/ui/static/_next/static/chunks/2bm_bps837c8s.js +1 -0
  100. package/dist/ui/static/_next/static/chunks/2db5ooma2i4yx.js +1 -0
  101. package/dist/ui/static/_next/static/chunks/2dsu6hwhp85it.js +1 -0
  102. package/dist/ui/static/_next/static/chunks/2dwa2hysai57e.js +1 -0
  103. package/dist/ui/static/_next/static/chunks/2ek5ny0z29n-_.js +201 -0
  104. package/dist/ui/static/_next/static/chunks/2gxdz5i19sf2x.js +1 -0
  105. package/dist/ui/static/_next/static/chunks/2ie6v7cdqe406.js +62 -0
  106. package/dist/ui/static/_next/static/chunks/2img0w643cwi4.js +1 -0
  107. package/dist/ui/static/_next/static/chunks/2l0_e_qyhvve_.js +1 -0
  108. package/dist/ui/static/_next/static/chunks/2lfji5sgej4v4.js +1 -0
  109. package/dist/ui/static/_next/static/chunks/{0mde4a5qgo7cd.js → 2nzruc7wyn8dr.js} +1 -1
  110. package/dist/ui/static/_next/static/chunks/2o7tp9zv8u7tw.js +1 -0
  111. package/dist/ui/static/_next/static/chunks/2o9fq12slgfa0.js +1 -0
  112. package/dist/ui/static/_next/static/chunks/2o9mtyaa7p_se.js +1 -0
  113. package/dist/ui/static/_next/static/chunks/{34w7t_j7upvnc.js → 2rxwfcn3g_xcj.js} +1 -1
  114. package/dist/ui/static/_next/static/chunks/2sff-cr7dn-6k.js +1 -0
  115. package/dist/ui/static/_next/static/chunks/2ulu3p0ddze30.js +1 -0
  116. package/dist/ui/static/_next/static/chunks/2werku_ws_bu6.js +1 -0
  117. package/dist/ui/static/_next/static/chunks/{3kftpmlf_wvd3.js → 2x_kyz5ial_41.js} +1 -1
  118. package/dist/ui/static/_next/static/chunks/2xudunn-lg4q1.js +1 -0
  119. package/dist/ui/static/_next/static/chunks/2yk59ik12pbte.js +1 -0
  120. package/dist/ui/static/_next/static/chunks/2yzeyiuh6hiyi.js +1 -0
  121. package/dist/ui/static/_next/static/chunks/2yzl8qiydb5e5.js +4 -0
  122. package/dist/ui/static/_next/static/chunks/{2vmw7uw9qfxtm.js → 3-vp5mbiz_k0a.js} +1 -1
  123. package/dist/ui/static/_next/static/chunks/{1w7td7s2ds1r4.js → 30jm7s-paox4s.js} +3 -3
  124. package/dist/ui/static/_next/static/chunks/33iwa_n3mi3c1.js +1 -0
  125. package/dist/ui/static/_next/static/chunks/{2_52lwqeijscc.js → 33jglfz6y49ka.js} +1 -1
  126. package/dist/ui/static/_next/static/chunks/{2chlwgzo2fo43.js → 34ey1sc6cg1jb.js} +1 -1
  127. package/dist/ui/static/_next/static/chunks/34xq7t6q8xscy.js +38 -0
  128. package/dist/ui/static/_next/static/chunks/{403kjiu_bjumv.js → 35oxd7_mv6yx-.js} +1 -1
  129. package/dist/ui/static/_next/static/chunks/374l27tamvcx2.js +1 -0
  130. package/dist/ui/static/_next/static/chunks/{1jychynbljt3y.js → 37k03e11rps3i.js} +1 -1
  131. package/dist/ui/static/_next/static/chunks/{35amvhf88zprh.js → 37nl28rjnj-un.js} +1 -1
  132. package/dist/ui/static/_next/static/chunks/38x98fr04cv7f.js +61 -0
  133. package/dist/ui/static/_next/static/chunks/395aita-ystfu.js +1 -0
  134. package/dist/ui/static/_next/static/chunks/39thlt_b984p5.js +1 -0
  135. package/dist/ui/static/_next/static/chunks/3_10vm9g45_8y.js +1 -0
  136. package/dist/ui/static/_next/static/chunks/3_32gobpn9eea.js +1 -0
  137. package/dist/ui/static/_next/static/chunks/{2h3yq6o4kg_kb.js → 3_qhvykv4ncye.js} +1 -1
  138. package/dist/ui/static/_next/static/chunks/3ca17qj3ru209.js +1 -0
  139. package/dist/ui/static/_next/static/chunks/3dgn8o9f1kc8m.js +2 -0
  140. package/dist/ui/static/_next/static/chunks/3e-3pvlfnqvhc.js +1 -0
  141. package/dist/ui/static/_next/static/chunks/3e39amxssw159.js +1 -0
  142. package/dist/ui/static/_next/static/chunks/3g9t_w1rxvy9k.js +1 -0
  143. package/dist/ui/static/_next/static/chunks/{2na7t_nmk3z_c.js → 3he4t7yk0v9z5.js} +1 -1
  144. package/dist/ui/static/_next/static/chunks/3hxvi-06cjs9x.js +1 -0
  145. package/dist/ui/static/_next/static/chunks/3hykczegwyd5i.js +36 -0
  146. package/dist/ui/static/_next/static/chunks/{2r8nyeo1ifl95.js → 3jc_y1tnauj-z.js} +1 -1
  147. package/dist/ui/static/_next/static/chunks/3jvw3i_osp8l_.js +64 -0
  148. package/dist/ui/static/_next/static/chunks/3k-z30ov7etov.js +1 -0
  149. package/dist/ui/static/_next/static/chunks/{302c7ueozi8kb.js → 3ksimuw0ad9zn.js} +1 -1
  150. package/dist/ui/static/_next/static/chunks/3l4xc7b94iz9e.css +1 -0
  151. package/dist/ui/static/_next/static/chunks/3l6l7qzd411sc.js +1 -0
  152. package/dist/ui/static/_next/static/chunks/3lmi87qw7ehxj.js +15 -0
  153. package/dist/ui/static/_next/static/chunks/3lyh88nxnumm7.js +1 -0
  154. package/dist/ui/static/_next/static/chunks/3m4bd79015ouy.js +1 -0
  155. package/dist/ui/static/_next/static/chunks/{09lp4q0mk16fc.js → 3mqrq9fc15u8f.js} +1 -1
  156. package/dist/ui/static/_next/static/chunks/3ndfyq6sdfacc.js +24 -0
  157. package/dist/ui/static/_next/static/chunks/{3_fsw1lkt1_wh.js → 3nir0q_tbd635.js} +1 -1
  158. package/dist/ui/static/_next/static/chunks/{13sm61rx0q9m9.js → 3owd_yj0kssh5.js} +1 -1
  159. package/dist/ui/static/_next/static/chunks/3owvaep851hrg.js +1 -0
  160. package/dist/ui/static/_next/static/chunks/3q-qr3yas3rmr.js +1 -0
  161. package/dist/ui/static/_next/static/chunks/{1d4ot7_nywn7m.js → 3qabgkg9agmqc.js} +1 -1
  162. package/dist/ui/static/_next/static/chunks/3qkwuc11h025w.js +15 -0
  163. package/dist/ui/static/_next/static/chunks/3qqqcf3iyho8i.js +62 -0
  164. package/dist/ui/static/_next/static/chunks/3r1y5u63no3t6.js +1 -0
  165. package/dist/ui/static/_next/static/chunks/3snum7xpnvwx_.js +1 -0
  166. package/dist/ui/static/_next/static/chunks/3tl76hukh2-pb.js +1 -0
  167. package/dist/ui/static/_next/static/chunks/3u1g6632-f7ay.js +15 -0
  168. package/dist/ui/static/_next/static/chunks/{2206mw-z43vyo.js → 3xsa-ukczporu.js} +1 -1
  169. package/dist/ui/static/_next/static/chunks/3yr06bc-tr_ms.js +1 -0
  170. package/dist/ui/static/_next/static/chunks/3zt236vwq5bnr.js +1 -0
  171. package/dist/ui/static/_next/static/chunks/40rspfo2bz_p3.js +1 -0
  172. package/dist/ui/static/_next/static/chunks/41s-b40scg1v9.js +1 -0
  173. package/dist/ui/static/_next/static/chunks/{0_mnz9imy_h8n.js → 43ke4vyo6p4wu.js} +1 -1
  174. package/dist/ui/static/_next/static/chunks/43p3o8p9_gmdm.js +1 -0
  175. package/dist/ui/static/_next/static/chunks/{11cv_1ipmnwdr.js → 447_k7yqc6i7k.js} +3 -3
  176. package/dist/ui/static/_next/static/chunks/44jjws0h08uog.js +24 -0
  177. package/dist/ui/static/_next/static/chunks/4598s2z_w_1la.js +1 -0
  178. package/dist/ui/static/_next/static/chunks/{turbopack-3-2dc0s_e9msx.js → turbopack-2n-b6-g15qsj4.js} +1 -1
  179. package/dist/ui/static/_not-found/__next._full.txt +29 -26
  180. package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +7 -6
  181. package/dist/ui/static/_not-found/__next._tree.txt +3 -2
  182. package/dist/ui/static/_not-found.html +1 -1
  183. package/dist/ui/static/_not-found.txt +29 -26
  184. package/dist/ui/static/atlassian-connectors/__next._full.txt +28 -26
  185. package/dist/ui/static/atlassian-connectors/__next._tree.txt +3 -2
  186. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +12 -11
  187. package/dist/ui/static/atlassian-connectors.html +1 -1
  188. package/dist/ui/static/atlassian-connectors.txt +28 -26
  189. package/dist/ui/static/index.html +1 -1
  190. package/dist/ui/static/index.txt +40 -38
  191. package/dist/ui/static/launch/__next._full.txt +44 -42
  192. package/dist/ui/static/launch/__next._tree.txt +4 -3
  193. package/dist/ui/static/launch/__next.launch.__PAGE__.txt +31 -31
  194. package/dist/ui/static/launch.html +1 -1
  195. package/dist/ui/static/launch.txt +44 -42
  196. package/dist/ui/static/local-knowledge/__next._full.txt +22 -21
  197. package/dist/ui/static/local-knowledge/__next._tree.txt +4 -3
  198. package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +31 -31
  199. package/dist/ui/static/local-knowledge/capsule/__next._full.txt +29 -27
  200. package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +3 -2
  201. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +10 -9
  202. package/dist/ui/static/local-knowledge/capsule.html +1 -1
  203. package/dist/ui/static/local-knowledge/capsule.txt +29 -27
  204. package/dist/ui/static/local-knowledge.html +1 -1
  205. package/dist/ui/static/local-knowledge.txt +22 -21
  206. package/node_modules/@oscharko-dev/keiko-activity-log/dist/activity-log-compatibility-3558.fixture.json +4 -0
  207. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory-data.generated.json +3847 -0
  208. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts +10 -0
  209. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts.map +1 -1
  210. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.js +16 -3703
  211. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.d.ts +7 -0
  212. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.d.ts.map +1 -1
  213. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.js +9 -1
  214. package/node_modules/@oscharko-dev/keiko-activity-log/package.json +3 -3
  215. package/node_modules/@oscharko-dev/keiko-cli/dist/doctor.d.ts.map +1 -1
  216. package/node_modules/@oscharko-dev/keiko-cli/dist/doctor.js +28 -3
  217. package/node_modules/@oscharko-dev/keiko-cli/dist/portable-maintenance.d.ts.map +1 -1
  218. package/node_modules/@oscharko-dev/keiko-cli/dist/portable-maintenance.js +4 -0
  219. package/node_modules/@oscharko-dev/keiko-cli/package.json +15 -15
  220. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.d.ts +1 -1
  221. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.js +1 -1
  222. package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
  223. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-diagnostic-fields.d.ts +18 -0
  224. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-diagnostic-fields.d.ts.map +1 -0
  225. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-diagnostic-fields.js +17 -0
  226. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts +504 -44
  227. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts.map +1 -1
  228. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.js +823 -71
  229. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-coverage.generated.json +46082 -0
  230. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-identity.generated.d.ts +6 -0
  231. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-identity.generated.d.ts.map +1 -0
  232. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-identity.generated.js +15 -0
  233. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operation-surfaces.generated.json +595 -0
  234. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts +3352 -390
  235. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts.map +1 -1
  236. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.js +3991 -536
  237. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry-metadata.d.ts +43 -0
  238. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry-metadata.d.ts.map +1 -0
  239. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry-metadata.js +1 -0
  240. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts +2 -34384
  241. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts.map +1 -1
  242. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.js +2 -42955
  243. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-runtime-metadata.generated.d.ts +5 -0
  244. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-runtime-metadata.generated.d.ts.map +1 -0
  245. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-runtime-metadata.generated.js +6 -0
  246. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts +95 -0
  247. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts.map +1 -1
  248. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.js +23 -0
  249. package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.d.ts +1 -1
  250. package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.d.ts.map +1 -1
  251. package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.js +1 -0
  252. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-runtime-git.d.ts +30 -1
  253. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-runtime-git.d.ts.map +1 -1
  254. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-runtime-git.js +31 -9
  255. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-safe-activity.d.ts +2 -0
  256. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-safe-activity.d.ts.map +1 -1
  257. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-safe-activity.js +3 -0
  258. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-evidence.d.ts.map +1 -1
  259. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-evidence.js +12 -1
  260. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.d.ts +386 -1
  261. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.d.ts.map +1 -1
  262. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.js +623 -18
  263. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-approval-review.d.ts +13 -0
  264. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-approval-review.d.ts.map +1 -1
  265. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-approval-review.js +28 -1
  266. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-validation.d.ts.map +1 -1
  267. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-validation.js +17 -0
  268. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts +28 -1
  269. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts.map +1 -1
  270. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.js +30 -5
  271. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts +34 -0
  272. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts.map +1 -1
  273. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.js +81 -1
  274. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts +40 -3
  275. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts.map +1 -1
  276. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.js +14 -0
  277. package/node_modules/@oscharko-dev/keiko-contracts/dist/governed-tool-bridge.d.ts +56 -0
  278. package/node_modules/@oscharko-dev/keiko-contracts/dist/governed-tool-bridge.d.ts.map +1 -1
  279. package/node_modules/@oscharko-dev/keiko-contracts/dist/governed-tool-bridge.js +120 -1
  280. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +10 -9
  281. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
  282. package/node_modules/@oscharko-dev/keiko-contracts/dist/mcp-servers.d.ts +121 -0
  283. package/node_modules/@oscharko-dev/keiko-contracts/dist/mcp-servers.d.ts.map +1 -0
  284. package/node_modules/@oscharko-dev/keiko-contracts/dist/mcp-servers.js +415 -0
  285. package/node_modules/@oscharko-dev/keiko-contracts/dist/sensitive-path-patterns.d.ts +10 -0
  286. package/node_modules/@oscharko-dev/keiko-contracts/dist/sensitive-path-patterns.d.ts.map +1 -0
  287. package/node_modules/@oscharko-dev/keiko-contracts/dist/sensitive-path-patterns.js +117 -0
  288. package/node_modules/@oscharko-dev/keiko-contracts/dist/task-workspace.d.ts +6 -0
  289. package/node_modules/@oscharko-dev/keiko-contracts/dist/task-workspace.d.ts.map +1 -1
  290. package/node_modules/@oscharko-dev/keiko-contracts/dist/task-workspace.js +21 -0
  291. package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.d.ts +8 -0
  292. package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.d.ts.map +1 -1
  293. package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.js +26 -0
  294. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +2 -2
  295. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +2 -2
  296. package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace.d.ts +19 -1
  297. package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace.d.ts.map +1 -1
  298. package/node_modules/@oscharko-dev/keiko-contracts/package.json +12 -4
  299. package/node_modules/@oscharko-dev/keiko-evaluations/dist/local-knowledge/runner.d.ts.map +1 -1
  300. package/node_modules/@oscharko-dev/keiko-evaluations/dist/local-knowledge/runner.js +12 -9
  301. package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
  302. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
  303. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
  304. package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
  305. package/node_modules/@oscharko-dev/keiko-git/dist/version.d.ts +1 -1
  306. package/node_modules/@oscharko-dev/keiko-git/dist/version.js +1 -1
  307. package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
  308. package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
  309. package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
  310. package/node_modules/@oscharko-dev/keiko-harness/package.json +7 -7
  311. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.d.ts.map +1 -1
  312. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.js +4 -17
  313. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
  314. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
  315. package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
  316. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
  317. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
  318. package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
  319. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
  320. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
  321. package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
  322. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
  323. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
  324. package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
  325. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/diversity.d.ts +1 -0
  326. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/diversity.d.ts.map +1 -1
  327. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/diversity.js +2 -2
  328. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/index.d.ts +1 -1
  329. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/index.d.ts.map +1 -1
  330. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/index.js +1 -1
  331. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
  332. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
  333. package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
  334. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
  335. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
  336. package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
  337. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.d.ts.map +1 -1
  338. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.js +12 -0
  339. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts +10 -0
  340. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts.map +1 -1
  341. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts.map +1 -1
  342. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.js +69 -4
  343. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts +1 -0
  344. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts.map +1 -1
  345. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.js +1 -0
  346. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/model-selection.d.ts +2 -0
  347. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/model-selection.d.ts.map +1 -1
  348. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/model-selection.js +12 -2
  349. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts.map +1 -1
  350. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.js +26 -11
  351. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-admission.d.ts.map +1 -1
  352. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-admission.js +14 -5
  353. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-token-accounting.d.ts +10 -1
  354. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-token-accounting.d.ts.map +1 -1
  355. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-token-accounting.js +14 -7
  356. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +1 -0
  357. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts.map +1 -1
  358. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.js +42 -64
  359. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/toolCatalogBridge.d.ts.map +1 -1
  360. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/toolCatalogBridge.js +70 -6
  361. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/types.d.ts +10 -1
  362. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/types.d.ts.map +1 -1
  363. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
  364. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
  365. package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +4 -4
  366. package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
  367. package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.d.ts +2 -2
  368. package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.d.ts.map +1 -1
  369. package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.js +71 -6
  370. package/node_modules/@oscharko-dev/keiko-sandbox/dist/index.d.ts +4 -1
  371. package/node_modules/@oscharko-dev/keiko-sandbox/dist/index.d.ts.map +1 -1
  372. package/node_modules/@oscharko-dev/keiko-sandbox/dist/index.js +3 -0
  373. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-linked-files.d.ts +28 -0
  374. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-linked-files.d.ts.map +1 -0
  375. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-linked-files.js +117 -0
  376. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-toolchain-roots.d.ts +15 -0
  377. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-toolchain-roots.d.ts.map +1 -0
  378. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-toolchain-roots.js +248 -0
  379. package/node_modules/@oscharko-dev/keiko-sandbox/dist/plan.d.ts.map +1 -1
  380. package/node_modules/@oscharko-dev/keiko-sandbox/dist/plan.js +16 -3
  381. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-gateway.d.ts +11 -2
  382. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-gateway.d.ts.map +1 -1
  383. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-gateway.js +77 -21
  384. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-service.d.ts +21 -0
  385. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-service.d.ts.map +1 -0
  386. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-service.js +248 -0
  387. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime.d.ts.map +1 -1
  388. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime.js +51 -23
  389. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-credential-paths.d.ts +6 -0
  390. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-credential-paths.d.ts.map +1 -0
  391. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-credential-paths.js +60 -0
  392. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-execution-root.d.ts +27 -0
  393. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-execution-root.d.ts.map +1 -1
  394. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-execution-root.js +289 -6
  395. package/node_modules/@oscharko-dev/keiko-sandbox/dist/types.d.ts +70 -2
  396. package/node_modules/@oscharko-dev/keiko-sandbox/dist/types.d.ts.map +1 -1
  397. package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
  398. package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
  399. package/node_modules/@oscharko-dev/keiko-security/dist/content-redaction.d.ts +27 -0
  400. package/node_modules/@oscharko-dev/keiko-security/dist/content-redaction.d.ts.map +1 -0
  401. package/node_modules/@oscharko-dev/keiko-security/dist/content-redaction.js +32 -0
  402. package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts +3 -1
  403. package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts.map +1 -1
  404. package/node_modules/@oscharko-dev/keiko-security/dist/index.js +3 -1
  405. package/node_modules/@oscharko-dev/keiko-security/dist/redaction-spelling.d.ts +24 -0
  406. package/node_modules/@oscharko-dev/keiko-security/dist/redaction-spelling.d.ts.map +1 -0
  407. package/node_modules/@oscharko-dev/keiko-security/dist/redaction-spelling.js +354 -0
  408. package/node_modules/@oscharko-dev/keiko-security/dist/redaction.d.ts +8 -0
  409. package/node_modules/@oscharko-dev/keiko-security/dist/redaction.d.ts.map +1 -1
  410. package/node_modules/@oscharko-dev/keiko-security/dist/redaction.js +36 -7
  411. package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
  412. package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
  413. package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
  414. package/node_modules/@oscharko-dev/keiko-server/dist/agent-run-governance.d.ts +2 -0
  415. package/node_modules/@oscharko-dev/keiko-server/dist/agent-run-governance.d.ts.map +1 -1
  416. package/node_modules/@oscharko-dev/keiko-server/dist/agent-run-governance.js +22 -5
  417. package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-status.d.ts.map +1 -1
  418. package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-status.js +9 -2
  419. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts.map +1 -1
  420. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.js +12 -10
  421. package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-rehydration.d.ts +2 -1
  422. package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-rehydration.d.ts.map +1 -1
  423. package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-rehydration.js +22 -9
  424. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-diagnostics.d.ts +2 -1
  425. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-diagnostics.d.ts.map +1 -1
  426. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-token-summary.d.ts +2 -1
  427. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-token-summary.d.ts.map +1 -1
  428. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-token-summary.js +2 -2
  429. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget.d.ts +2 -1
  430. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget.d.ts.map +1 -1
  431. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget.js +9 -6
  432. package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.d.ts.map +1 -1
  433. package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.js +5 -3
  434. package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.d.ts.map +1 -1
  435. package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.js +71 -11
  436. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/appSessionReadAuthority.d.ts +1 -1
  437. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/appSessionReadAuthority.d.ts.map +1 -1
  438. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/appSessionReadAuthority.js +8 -1
  439. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingAppSessionRoutes.d.ts +2 -1
  440. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingAppSessionRoutes.d.ts.map +1 -1
  441. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingAppSessionRoutes.js +53 -18
  442. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingRunSessionLease.d.ts +22 -0
  443. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingRunSessionLease.d.ts.map +1 -0
  444. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingRunSessionLease.js +182 -0
  445. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionChannel.d.ts +8 -0
  446. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionChannel.d.ts.map +1 -1
  447. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionChannel.js +31 -16
  448. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionStreamWriter.d.ts +34 -8
  449. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionStreamWriter.d.ts.map +1 -1
  450. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionStreamWriter.js +157 -53
  451. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryRoutes.d.ts +13 -1
  452. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryRoutes.d.ts.map +1 -1
  453. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryRoutes.js +133 -1
  454. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryTransferLog.d.ts +100 -0
  455. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryTransferLog.d.ts.map +1 -0
  456. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryTransferLog.js +64 -0
  457. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.d.ts +38 -10
  458. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.d.ts.map +1 -1
  459. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.js +13 -6
  460. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairController.d.ts.map +1 -1
  461. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairController.js +3 -1
  462. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.d.ts +4 -1
  463. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.d.ts.map +1 -1
  464. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.js +7 -3
  465. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeGitIpc.d.ts +14 -3
  466. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeGitIpc.d.ts.map +1 -1
  467. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeGitIpc.js +14 -6
  468. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.d.ts +33 -1
  469. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.d.ts.map +1 -1
  470. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.js +117 -11
  471. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInbox.d.ts +42 -0
  472. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInbox.d.ts.map +1 -0
  473. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInbox.js +47 -0
  474. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInstructionSources.d.ts +57 -0
  475. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInstructionSources.d.ts.map +1 -0
  476. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInstructionSources.js +296 -0
  477. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.d.ts +25 -4
  478. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.d.ts.map +1 -1
  479. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.js +112 -124
  480. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOperationCoordinator.d.ts +62 -2
  481. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOperationCoordinator.d.ts.map +1 -1
  482. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOperationCoordinator.js +364 -26
  483. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts +68 -1
  484. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts.map +1 -1
  485. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.js +266 -23
  486. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts +25 -2
  487. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts.map +1 -1
  488. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryConfig.d.ts +37 -0
  489. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryConfig.d.ts.map +1 -0
  490. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryConfig.js +178 -0
  491. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryInstructions.d.ts +49 -4
  492. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryInstructions.d.ts.map +1 -1
  493. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryInstructions.js +267 -13
  494. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItemSanitizer.d.ts +62 -0
  495. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItemSanitizer.d.ts.map +1 -0
  496. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItemSanitizer.js +572 -0
  497. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItems.d.ts +64 -0
  498. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItems.d.ts.map +1 -0
  499. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItems.js +560 -0
  500. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRevert.d.ts +39 -0
  501. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRevert.d.ts.map +1 -0
  502. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRevert.js +47 -0
  503. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.d.ts +55 -0
  504. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.d.ts.map +1 -1
  505. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.js +271 -55
  506. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeUndoWindow.d.ts +60 -0
  507. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeUndoWindow.d.ts.map +1 -0
  508. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeUndoWindow.js +188 -0
  509. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts +13 -1
  510. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts.map +1 -1
  511. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSessionContinuity.d.ts +116 -0
  512. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSessionContinuity.d.ts.map +1 -0
  513. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSessionContinuity.js +237 -0
  514. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSidecarEventParser.d.ts +6 -0
  515. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSidecarEventParser.d.ts.map +1 -1
  516. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSidecarEventParser.js +24 -0
  517. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskExport.d.ts +52 -0
  518. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskExport.d.ts.map +1 -0
  519. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskExport.js +347 -0
  520. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskImport.d.ts +64 -0
  521. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskImport.d.ts.map +1 -0
  522. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskImport.js +332 -0
  523. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolApprovalBridge.d.ts +9 -2
  524. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolApprovalBridge.d.ts.map +1 -1
  525. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolApprovalBridge.js +5 -2
  526. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.d.ts +3 -1
  527. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.d.ts.map +1 -1
  528. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.js +86 -27
  529. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.d.ts.map +1 -1
  530. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.js +10 -3
  531. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts +138 -1
  532. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts.map +1 -1
  533. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts +1 -1
  534. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts.map +1 -1
  535. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.js +24 -2
  536. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolNativeEffect.d.ts +54 -0
  537. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolNativeEffect.d.ts.map +1 -0
  538. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolNativeEffect.js +229 -0
  539. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinProcessTable.d.ts +35 -0
  540. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinProcessTable.d.ts.map +1 -0
  541. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinProcessTable.js +108 -0
  542. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinRuntimeDescendants.d.ts +183 -0
  543. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinRuntimeDescendants.d.ts.map +1 -0
  544. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinRuntimeDescendants.js +220 -0
  545. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinSandboxMembership.d.ts +42 -0
  546. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinSandboxMembership.d.ts.map +1 -0
  547. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinSandboxMembership.js +210 -0
  548. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLanePortableCodingRuntime.d.ts +15 -1
  549. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLanePortableCodingRuntime.d.ts.map +1 -1
  550. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLanePortableCodingRuntime.js +87 -19
  551. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.d.ts +12 -1
  552. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.d.ts.map +1 -1
  553. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.js +164 -42
  554. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/governedSyncHeads.d.ts +28 -0
  555. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/governedSyncHeads.d.ts.map +1 -0
  556. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/governedSyncHeads.js +17 -0
  557. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts +21 -1
  558. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts.map +1 -1
  559. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.js +36 -0
  560. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeWebSearch.d.ts +221 -0
  561. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeWebSearch.d.ts.map +1 -0
  562. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeWebSearch.js +345 -0
  563. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/npmLaneRuntimeApprovals.d.ts.map +1 -1
  564. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/npmLaneRuntimeApprovals.js +28 -14
  565. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeAgents.d.ts +22 -0
  566. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeAgents.d.ts.map +1 -0
  567. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeAgents.js +28 -0
  568. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeCommands.d.ts +124 -0
  569. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeCommands.d.ts.map +1 -0
  570. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeCommands.js +398 -0
  571. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeConfigDocuments.d.ts +33 -0
  572. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeConfigDocuments.d.ts.map +1 -0
  573. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeConfigDocuments.js +91 -0
  574. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeHttpClient.d.ts.map +1 -1
  575. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeHttpClient.js +6 -0
  576. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeInbox.d.ts +83 -0
  577. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeInbox.d.ts.map +1 -0
  578. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeInbox.js +258 -0
  579. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.d.ts +110 -2
  580. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.d.ts.map +1 -1
  581. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.js +286 -35
  582. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeAgentModels.d.ts +36 -0
  583. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeAgentModels.d.ts.map +1 -0
  584. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeAgentModels.js +61 -0
  585. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeContext.d.ts +21 -6
  586. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeContext.d.ts.map +1 -1
  587. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeContext.js +33 -7
  588. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeDeliveryTools.d.ts +28 -0
  589. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeDeliveryTools.d.ts.map +1 -0
  590. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeDeliveryTools.js +41 -0
  591. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeEgress.d.ts +9 -0
  592. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeEgress.d.ts.map +1 -0
  593. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeEgress.js +8 -0
  594. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeExternalRoots.d.ts +38 -0
  595. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeExternalRoots.d.ts.map +1 -0
  596. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeExternalRoots.js +119 -0
  597. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeFormatter.d.ts +67 -0
  598. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeFormatter.d.ts.map +1 -0
  599. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeFormatter.js +181 -0
  600. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeGitMetadata.d.ts +25 -0
  601. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeGitMetadata.d.ts.map +1 -0
  602. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeGitMetadata.js +66 -0
  603. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeLinkedFiles.d.ts +12 -0
  604. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeLinkedFiles.d.ts.map +1 -0
  605. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeLinkedFiles.js +81 -0
  606. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcp.d.ts +76 -0
  607. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcp.d.ts.map +1 -0
  608. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcp.js +136 -0
  609. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpAuthorization.d.ts +51 -0
  610. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpAuthorization.d.ts.map +1 -0
  611. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpAuthorization.js +263 -0
  612. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpCredentials.d.ts +38 -0
  613. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpCredentials.d.ts.map +1 -0
  614. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpCredentials.js +171 -0
  615. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpRelay.d.ts +29 -0
  616. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpRelay.d.ts.map +1 -0
  617. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpRelay.js +47 -0
  618. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMessageId.d.ts +13 -0
  619. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMessageId.d.ts.map +1 -0
  620. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMessageId.js +59 -0
  621. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePluginReadiness.d.ts +42 -0
  622. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePluginReadiness.d.ts.map +1 -0
  623. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePluginReadiness.js +90 -0
  624. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicy.d.ts +333 -0
  625. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicy.d.ts.map +1 -0
  626. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicy.js +1392 -0
  627. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicyPlugin.d.ts +43 -0
  628. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicyPlugin.d.ts.map +1 -0
  629. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicyPlugin.js +195 -0
  630. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeQuestions.d.ts +50 -0
  631. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeQuestions.d.ts.map +1 -0
  632. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeQuestions.js +265 -0
  633. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeSessionTree.d.ts +117 -0
  634. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeSessionTree.d.ts.map +1 -0
  635. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeSessionTree.js +281 -0
  636. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeTools.d.ts +81 -0
  637. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeTools.d.ts.map +1 -0
  638. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeTools.js +149 -0
  639. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeWorktree.d.ts +58 -0
  640. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeWorktree.d.ts.map +1 -0
  641. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeWorktree.js +71 -0
  642. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPluginPackage.d.ts +38 -0
  643. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPluginPackage.d.ts.map +1 -0
  644. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPluginPackage.js +87 -0
  645. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPlugins.d.ts +105 -0
  646. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPlugins.d.ts.map +1 -0
  647. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPlugins.js +386 -0
  648. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePersistenceContract.d.ts +17 -0
  649. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePersistenceContract.d.ts.map +1 -0
  650. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePersistenceContract.js +142 -0
  651. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePromptInputs.d.ts +236 -0
  652. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePromptInputs.d.ts.map +1 -0
  653. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePromptInputs.js +719 -0
  654. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocol.d.ts +14 -1
  655. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocol.d.ts.map +1 -1
  656. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocol.js +52 -12
  657. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocolSurface.d.ts +8 -1
  658. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocolSurface.d.ts.map +1 -1
  659. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocolSurface.js +36 -2
  660. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeReconciler.d.ts +2 -0
  661. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeReconciler.d.ts.map +1 -1
  662. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeReconciler.js +19 -3
  663. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRemoteSkills.d.ts +79 -0
  664. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRemoteSkills.d.ts.map +1 -0
  665. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRemoteSkills.js +361 -0
  666. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRevert.d.ts +95 -0
  667. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRevert.d.ts.map +1 -0
  668. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRevert.js +458 -0
  669. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRipgrepLaunch.d.ts +84 -0
  670. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRipgrepLaunch.d.ts.map +1 -0
  671. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRipgrepLaunch.js +236 -0
  672. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.d.ts +32 -6
  673. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.d.ts.map +1 -1
  674. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.js +248 -78
  675. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts +174 -34
  676. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts.map +1 -1
  677. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.js +1520 -439
  678. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeVersions.d.ts +28 -0
  679. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeVersions.d.ts.map +1 -0
  680. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeVersions.js +31 -0
  681. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSafeActivity.d.ts +24 -0
  682. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSafeActivity.d.ts.map +1 -1
  683. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSafeActivity.js +28 -7
  684. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceInventory.d.ts +197 -0
  685. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceInventory.d.ts.map +1 -0
  686. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceInventory.js +793 -0
  687. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionContinuation.d.ts +96 -0
  688. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionContinuation.d.ts.map +1 -0
  689. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionContinuation.js +346 -0
  690. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionRetention.d.ts +141 -0
  691. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionRetention.d.ts.map +1 -0
  692. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionRetention.js +580 -0
  693. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.d.ts +438 -10
  694. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.d.ts.map +1 -1
  695. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.js +83 -10
  696. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.d.ts +11 -0
  697. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.d.ts.map +1 -1
  698. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.js +18 -0
  699. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.d.ts +22 -0
  700. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.d.ts.map +1 -1
  701. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.js +344 -145
  702. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.d.ts +304 -2
  703. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.d.ts.map +1 -1
  704. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.js +578 -25
  705. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2LiveText.d.ts +2 -1
  706. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2LiveText.d.ts.map +1 -1
  707. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2LiveText.js +5 -4
  708. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2Questions.d.ts.map +1 -1
  709. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2Questions.js +12 -1
  710. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeHost.d.ts +110 -0
  711. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeHost.d.ts.map +1 -1
  712. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimePorts.d.ts +68 -3
  713. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimePorts.d.ts.map +1 -1
  714. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimePorts.js +353 -13
  715. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeResolver.d.ts.map +1 -1
  716. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeResolver.js +71 -6
  717. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.d.ts +1 -1
  718. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.d.ts.map +1 -1
  719. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.js +230 -109
  720. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.d.ts +14 -1
  721. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.d.ts.map +1 -1
  722. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.js +106 -6
  723. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.d.ts +66 -3
  724. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.d.ts.map +1 -1
  725. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/nativeToolTranscript.d.ts +7 -0
  726. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/nativeToolTranscript.d.ts.map +1 -0
  727. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/nativeToolTranscript.js +43 -0
  728. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/repositorySearchProof.d.ts.map +1 -1
  729. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/repositorySearchProof.js +44 -48
  730. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/skillDiscoveryProof.d.ts +7 -3
  731. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/skillDiscoveryProof.d.ts.map +1 -1
  732. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/skillDiscoveryProof.js +37 -43
  733. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.js +365 -37
  734. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionReadOnlyChildRunner.js +7 -1
  735. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionRuntimeWorkspaceAuthority.d.ts +3 -0
  736. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionRuntimeWorkspaceAuthority.d.ts.map +1 -1
  737. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionRuntimeWorkspaceAuthority.js +11 -0
  738. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitRuntime.d.ts +3 -0
  739. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitRuntime.d.ts.map +1 -1
  740. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitRuntime.js +4 -2
  741. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/ripgrepRuntime.d.ts +198 -0
  742. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/ripgrepRuntime.d.ts.map +1 -0
  743. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/ripgrepRuntime.js +357 -0
  744. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeGatewayProcessSandbox.d.ts.map +1 -1
  745. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeGatewayProcessSandbox.js +17 -3
  746. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextRead.d.ts +7 -0
  747. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextRead.d.ts.map +1 -1
  748. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextRead.js +16 -6
  749. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadArtifact.d.ts +9 -1
  750. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadArtifact.d.ts.map +1 -1
  751. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadArtifact.js +14 -0
  752. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadPortable.d.ts.map +1 -1
  753. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadPortable.js +2 -1
  754. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/supervisedCodingPolicy.js +2 -1
  755. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-data-url.d.ts +27 -0
  756. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-data-url.d.ts.map +1 -0
  757. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-data-url.js +44 -0
  758. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-document-parts.d.ts +43 -0
  759. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-document-parts.d.ts.map +1 -0
  760. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-document-parts.js +106 -0
  761. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts +7 -2
  762. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts.map +1 -1
  763. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.js +454 -70
  764. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-image-parts.d.ts +48 -0
  765. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-image-parts.d.ts.map +1 -0
  766. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-image-parts.js +92 -0
  767. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-mcp-relay.d.ts +5 -0
  768. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-mcp-relay.d.ts.map +1 -0
  769. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-mcp-relay.js +19 -0
  770. package/node_modules/@oscharko-dev/keiko-server/dist/content-redactor.d.ts +13 -0
  771. package/node_modules/@oscharko-dev/keiko-server/dist/content-redactor.d.ts.map +1 -0
  772. package/node_modules/@oscharko-dev/keiko-server/dist/content-redactor.js +33 -0
  773. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.d.ts +3 -1
  774. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.d.ts.map +1 -1
  775. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.js +1 -1
  776. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-gateway.d.ts +2 -2
  777. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-gateway.d.ts.map +1 -1
  778. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-gateway.js +3 -3
  779. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-prompt.d.ts +3 -1
  780. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-prompt.d.ts.map +1 -1
  781. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-prompt.js +10 -0
  782. package/node_modules/@oscharko-dev/keiko-server/dist/deps-activity.d.ts +4 -0
  783. package/node_modules/@oscharko-dev/keiko-server/dist/deps-activity.d.ts.map +1 -1
  784. package/node_modules/@oscharko-dev/keiko-server/dist/deps-activity.js +38 -0
  785. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +49 -1
  786. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
  787. package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +211 -54
  788. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +1 -1
  789. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
  790. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.js +6 -4
  791. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.d.ts +1 -0
  792. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.d.ts.map +1 -1
  793. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.js +3 -0
  794. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.d.ts +1 -0
  795. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.d.ts.map +1 -1
  796. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.js +14 -2
  797. package/node_modules/@oscharko-dev/keiko-server/dist/embedding-provider-identity.d.ts +3 -0
  798. package/node_modules/@oscharko-dev/keiko-server/dist/embedding-provider-identity.d.ts.map +1 -0
  799. package/node_modules/@oscharko-dev/keiko-server/dist/embedding-provider-identity.js +14 -0
  800. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-deployment-identity.d.ts +33 -0
  801. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-deployment-identity.d.ts.map +1 -0
  802. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-deployment-identity.js +33 -0
  803. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts +9 -0
  804. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts.map +1 -1
  805. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.js +16 -0
  806. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
  807. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +140 -39
  808. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup-activity.d.ts +3 -0
  809. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup-activity.d.ts.map +1 -1
  810. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup-activity.js +10 -0
  811. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/execution.d.ts +8 -0
  812. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/execution.d.ts.map +1 -1
  813. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/execution.js +10 -0
  814. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionPreparation.js +1 -1
  815. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionRoutes.d.ts.map +1 -1
  816. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionRoutes.js +7 -2
  817. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/proposalId.d.ts +4 -3
  818. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/proposalId.d.ts.map +1 -1
  819. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/proposalId.js +4 -3
  820. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runBoundAuthority.d.ts +19 -0
  821. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runBoundAuthority.d.ts.map +1 -1
  822. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runBoundAuthority.js +24 -13
  823. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitRead.d.ts +9 -2
  824. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitRead.d.ts.map +1 -1
  825. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitRead.js +21 -6
  826. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitService.d.ts +15 -4
  827. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitService.d.ts.map +1 -1
  828. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitService.js +216 -17
  829. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncEvidence.d.ts +17 -1
  830. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncEvidence.d.ts.map +1 -1
  831. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncEvidence.js +24 -0
  832. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncRoutes.d.ts.map +1 -1
  833. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncRoutes.js +9 -28
  834. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.d.ts.map +1 -1
  835. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.js +24 -6
  836. package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.d.ts.map +1 -1
  837. package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.js +11 -9
  838. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-context-pack-reranker.d.ts.map +1 -1
  839. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-context-pack-reranker.js +2 -1
  840. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-conversation-continuity.d.ts.map +1 -1
  841. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-conversation-continuity.js +7 -5
  842. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-document-evidence.d.ts.map +1 -1
  843. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-document-evidence.js +5 -3
  844. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-eval-support.d.ts +1 -0
  845. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-eval-support.d.ts.map +1 -1
  846. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-eval-support.js +3 -0
  847. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.d.ts +3 -1
  848. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.d.ts.map +1 -1
  849. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.js +14 -1
  850. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt.d.ts +2 -1
  851. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt.d.ts.map +1 -1
  852. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt.js +10 -4
  853. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts.map +1 -1
  854. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.js +23 -21
  855. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts.map +1 -1
  856. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.js +17 -10
  857. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts +3 -1
  858. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts.map +1 -1
  859. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.js +30 -17
  860. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-repo-semantic-search.d.ts +6 -1
  861. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-repo-semantic-search.d.ts.map +1 -1
  862. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-repo-semantic-search.js +8 -1
  863. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-semantic-request.d.ts.map +1 -1
  864. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-semantic-request.js +6 -1
  865. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts.map +1 -1
  866. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.js +4 -3
  867. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.d.ts +1 -2
  868. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.d.ts.map +1 -1
  869. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.js +56 -112
  870. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.d.ts +1 -1
  871. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.d.ts.map +1 -1
  872. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.js +2 -12
  873. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-admission.d.ts +24 -0
  874. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-admission.d.ts.map +1 -1
  875. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-admission.js +68 -7
  876. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-authority.d.ts.map +1 -1
  877. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-authority.js +7 -3
  878. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-log.d.ts +17 -0
  879. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-log.d.ts.map +1 -1
  880. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-log.js +60 -0
  881. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-prompt.d.ts +7 -1
  882. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-prompt.d.ts.map +1 -1
  883. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-prompt.js +30 -0
  884. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpCredentialRelay.d.ts +104 -0
  885. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpCredentialRelay.d.ts.map +1 -0
  886. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpCredentialRelay.js +442 -0
  887. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthAuthorizationUrl.d.ts +16 -0
  888. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthAuthorizationUrl.d.ts.map +1 -0
  889. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthAuthorizationUrl.js +56 -0
  890. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthCredentialStore.d.ts +27 -0
  891. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthCredentialStore.d.ts.map +1 -0
  892. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthCredentialStore.js +70 -0
  893. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthIssuer.d.ts +54 -0
  894. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthIssuer.d.ts.map +1 -0
  895. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthIssuer.js +191 -0
  896. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpServerRegistry.d.ts +29 -0
  897. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpServerRegistry.d.ts.map +1 -0
  898. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpServerRegistry.js +127 -0
  899. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding-identity.d.ts +5 -0
  900. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding-identity.d.ts.map +1 -0
  901. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding-identity.js +18 -0
  902. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.d.ts +1 -2
  903. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.d.ts.map +1 -1
  904. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.js +17 -83
  905. package/node_modules/@oscharko-dev/keiko-server/dist/memory-retrieval-signals.d.ts.map +1 -1
  906. package/node_modules/@oscharko-dev/keiko-server/dist/memory-retrieval-signals.js +1 -18
  907. package/node_modules/@oscharko-dev/keiko-server/dist/memory-salience.d.ts.map +1 -1
  908. package/node_modules/@oscharko-dev/keiko-server/dist/memory-salience.js +10 -1
  909. package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.d.ts.map +1 -1
  910. package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.js +4 -0
  911. package/node_modules/@oscharko-dev/keiko-server/dist/operatorRegistryJson.d.ts +10 -0
  912. package/node_modules/@oscharko-dev/keiko-server/dist/operatorRegistryJson.d.ts.map +1 -0
  913. package/node_modules/@oscharko-dev/keiko-server/dist/operatorRegistryJson.js +15 -0
  914. package/node_modules/@oscharko-dev/keiko-server/dist/ownerPrivateStateFile.d.ts +16 -0
  915. package/node_modules/@oscharko-dev/keiko-server/dist/ownerPrivateStateFile.d.ts.map +1 -0
  916. package/node_modules/@oscharko-dev/keiko-server/dist/ownerPrivateStateFile.js +55 -0
  917. package/node_modules/@oscharko-dev/keiko-server/dist/read-handlers.d.ts.map +1 -1
  918. package/node_modules/@oscharko-dev/keiko-server/dist/read-handlers.js +8 -1
  919. package/node_modules/@oscharko-dev/keiko-server/dist/request-deps-root.d.ts +8 -0
  920. package/node_modules/@oscharko-dev/keiko-server/dist/request-deps-root.d.ts.map +1 -0
  921. package/node_modules/@oscharko-dev/keiko-server/dist/request-deps-root.js +22 -0
  922. package/node_modules/@oscharko-dev/keiko-server/dist/routes.d.ts.map +1 -1
  923. package/node_modules/@oscharko-dev/keiko-server/dist/routes.js +17 -0
  924. package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.d.ts +3 -1
  925. package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.d.ts.map +1 -1
  926. package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.js +88 -12
  927. package/node_modules/@oscharko-dev/keiko-server/dist/run-handlers.d.ts.map +1 -1
  928. package/node_modules/@oscharko-dev/keiko-server/dist/run-handlers.js +93 -1
  929. package/node_modules/@oscharko-dev/keiko-server/dist/run-request.d.ts +2 -0
  930. package/node_modules/@oscharko-dev/keiko-server/dist/run-request.d.ts.map +1 -1
  931. package/node_modules/@oscharko-dev/keiko-server/dist/run-request.js +36 -2
  932. package/node_modules/@oscharko-dev/keiko-server/dist/runs.d.ts +7 -0
  933. package/node_modules/@oscharko-dev/keiko-server/dist/runs.d.ts.map +1 -1
  934. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.d.ts +76 -0
  935. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.d.ts.map +1 -1
  936. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.js +145 -6
  937. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts.map +1 -1
  938. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.js +12 -8
  939. package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.d.ts +2 -2
  940. package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.d.ts.map +1 -1
  941. package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.js +3 -3
  942. package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts +1 -0
  943. package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts.map +1 -1
  944. package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/routes.d.ts.map +1 -1
  945. package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/routes.js +14 -5
  946. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.d.ts.map +1 -1
  947. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.js +12 -3
  948. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.d.ts +0 -3
  949. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.d.ts.map +1 -1
  950. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.js +15 -22
  951. package/node_modules/@oscharko-dev/keiko-server/dist/voice-live-dictation.d.ts.map +1 -1
  952. package/node_modules/@oscharko-dev/keiko-server/dist/voice-live-dictation.js +6 -54
  953. package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.d.ts.map +1 -1
  954. package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.js +8 -75
  955. package/node_modules/@oscharko-dev/keiko-server/dist/voice-transport.d.ts +17 -0
  956. package/node_modules/@oscharko-dev/keiko-server/dist/voice-transport.d.ts.map +1 -0
  957. package/node_modules/@oscharko-dev/keiko-server/dist/voice-transport.js +54 -0
  958. package/node_modules/@oscharko-dev/keiko-server/package.json +23 -23
  959. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/dialect.d.ts.map +1 -1
  960. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/dialect.js +1 -1
  961. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/index.d.ts +2 -2
  962. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/index.d.ts.map +1 -1
  963. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/index.js +1 -1
  964. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/json.d.ts.map +1 -1
  965. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/json.js +4 -1
  966. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.d.ts +8 -1
  967. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.d.ts.map +1 -1
  968. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.js +38 -9
  969. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/profile.js +1 -1
  970. package/node_modules/@oscharko-dev/keiko-tool-catalog/package.json +3 -3
  971. package/node_modules/@oscharko-dev/keiko-tools/dist/exec.d.ts.map +1 -1
  972. package/node_modules/@oscharko-dev/keiko-tools/dist/exec.js +61 -12
  973. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-adapter.d.ts +2 -0
  974. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-adapter.d.ts.map +1 -1
  975. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-node.d.ts.map +1 -1
  976. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-node.js +29 -9
  977. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-orchestrator.d.ts +1 -0
  978. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-orchestrator.d.ts.map +1 -1
  979. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-orchestrator.js +4 -1
  980. package/node_modules/@oscharko-dev/keiko-tools/dist/git-pr-node.d.ts.map +1 -1
  981. package/node_modules/@oscharko-dev/keiko-tools/dist/git-pr-node.js +22 -2
  982. package/node_modules/@oscharko-dev/keiko-tools/dist/git-stage-node.d.ts +8 -1
  983. package/node_modules/@oscharko-dev/keiko-tools/dist/git-stage-node.d.ts.map +1 -1
  984. package/node_modules/@oscharko-dev/keiko-tools/dist/git-stage-node.js +22 -1
  985. package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
  986. package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
  987. package/node_modules/@oscharko-dev/keiko-tools/package.json +7 -7
  988. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.d.ts +13 -2
  989. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.d.ts.map +1 -1
  990. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.js +32 -6
  991. package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.d.ts +1 -0
  992. package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.d.ts.map +1 -1
  993. package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.js +1 -0
  994. package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
  995. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/model-loop.d.ts +7 -1
  996. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/model-loop.d.ts.map +1 -1
  997. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/model-loop.js +17 -0
  998. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/types.d.ts +5 -0
  999. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/types.d.ts.map +1 -1
  1000. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/workflow.d.ts.map +1 -1
  1001. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/workflow.js +6 -2
  1002. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/model-loop.d.ts +7 -1
  1003. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/model-loop.d.ts.map +1 -1
  1004. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/model-loop.js +22 -1
  1005. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/types.d.ts +6 -0
  1006. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/types.d.ts.map +1 -1
  1007. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/workflow.d.ts.map +1 -1
  1008. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/workflow.js +6 -2
  1009. package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
  1010. package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.d.ts +8 -0
  1011. package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.d.ts.map +1 -1
  1012. package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.js +14 -3
  1013. package/node_modules/@oscharko-dev/keiko-workspace/dist/fs.d.ts +6 -0
  1014. package/node_modules/@oscharko-dev/keiko-workspace/dist/fs.d.ts.map +1 -1
  1015. package/node_modules/@oscharko-dev/keiko-workspace/dist/fs.js +6 -1
  1016. package/node_modules/@oscharko-dev/keiko-workspace/dist/ignore.d.ts +2 -0
  1017. package/node_modules/@oscharko-dev/keiko-workspace/dist/ignore.d.ts.map +1 -1
  1018. package/node_modules/@oscharko-dev/keiko-workspace/dist/ignore.js +30 -94
  1019. package/node_modules/@oscharko-dev/keiko-workspace/dist/importGraphEdges.d.ts.map +1 -1
  1020. package/node_modules/@oscharko-dev/keiko-workspace/dist/importGraphEdges.js +4 -2
  1021. package/node_modules/@oscharko-dev/keiko-workspace/dist/index.d.ts +1 -1
  1022. package/node_modules/@oscharko-dev/keiko-workspace/dist/index.d.ts.map +1 -1
  1023. package/node_modules/@oscharko-dev/keiko-workspace/dist/index.js +1 -1
  1024. package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.d.ts.map +1 -1
  1025. package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.js +7 -5
  1026. package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.d.ts.map +1 -1
  1027. package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.js +4 -2
  1028. package/node_modules/@oscharko-dev/keiko-workspace/dist/sourceRedaction.d.ts +12 -2
  1029. package/node_modules/@oscharko-dev/keiko-workspace/dist/sourceRedaction.d.ts.map +1 -1
  1030. package/node_modules/@oscharko-dev/keiko-workspace/dist/sourceRedaction.js +21 -7
  1031. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
  1032. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
  1033. package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndex.d.ts +1 -0
  1034. package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndex.d.ts.map +1 -1
  1035. package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndex.js +4 -0
  1036. package/node_modules/@oscharko-dev/keiko-workspace/package.json +7 -3
  1037. package/package.json +41 -38
  1038. package/release-impact.catalog.json +157 -0
  1039. package/vendor/oscharko-dev-keiko-activity-log-1.3.1.tgz +0 -0
  1040. package/vendor/oscharko-dev-keiko-cli-1.3.1.tgz +0 -0
  1041. package/vendor/{oscharko-dev-keiko-connectors-1.2.7.tgz → oscharko-dev-keiko-connectors-1.3.1.tgz} +0 -0
  1042. package/vendor/oscharko-dev-keiko-contracts-1.3.1.tgz +0 -0
  1043. package/vendor/oscharko-dev-keiko-evaluations-1.3.1.tgz +0 -0
  1044. package/vendor/{oscharko-dev-keiko-evidence-1.2.7.tgz → oscharko-dev-keiko-evidence-1.3.1.tgz} +0 -0
  1045. package/vendor/{oscharko-dev-keiko-git-1.2.7.tgz → oscharko-dev-keiko-git-1.3.1.tgz} +0 -0
  1046. package/vendor/{oscharko-dev-keiko-harness-1.2.7.tgz → oscharko-dev-keiko-harness-1.3.1.tgz} +0 -0
  1047. package/vendor/oscharko-dev-keiko-local-knowledge-1.3.1.tgz +0 -0
  1048. package/vendor/{oscharko-dev-keiko-memory-capture-1.2.7.tgz → oscharko-dev-keiko-memory-capture-1.3.1.tgz} +0 -0
  1049. package/vendor/{oscharko-dev-keiko-memory-consolidation-1.2.7.tgz → oscharko-dev-keiko-memory-consolidation-1.3.1.tgz} +0 -0
  1050. package/vendor/{oscharko-dev-keiko-memory-governance-1.2.7.tgz → oscharko-dev-keiko-memory-governance-1.3.1.tgz} +0 -0
  1051. package/vendor/oscharko-dev-keiko-memory-retrieval-1.3.1.tgz +0 -0
  1052. package/vendor/{oscharko-dev-keiko-memory-vault-1.2.7.tgz → oscharko-dev-keiko-memory-vault-1.3.1.tgz} +0 -0
  1053. package/vendor/oscharko-dev-keiko-model-gateway-1.3.1.tgz +0 -0
  1054. package/vendor/{oscharko-dev-keiko-quality-intelligence-1.2.7.tgz → oscharko-dev-keiko-quality-intelligence-1.3.1.tgz} +0 -0
  1055. package/vendor/oscharko-dev-keiko-sandbox-1.3.1.tgz +0 -0
  1056. package/vendor/{oscharko-dev-keiko-sdk-1.2.7.tgz → oscharko-dev-keiko-sdk-1.3.1.tgz} +0 -0
  1057. package/vendor/oscharko-dev-keiko-security-1.3.1.tgz +0 -0
  1058. package/vendor/oscharko-dev-keiko-server-1.3.1.tgz +0 -0
  1059. package/vendor/oscharko-dev-keiko-tool-catalog-1.3.1.tgz +0 -0
  1060. package/vendor/oscharko-dev-keiko-tools-1.3.1.tgz +0 -0
  1061. package/vendor/oscharko-dev-keiko-verification-1.3.1.tgz +0 -0
  1062. package/vendor/oscharko-dev-keiko-workflows-1.3.1.tgz +0 -0
  1063. package/vendor/oscharko-dev-keiko-workspace-1.3.1.tgz +0 -0
  1064. package/dist/ui/static/_next/static/chunks/0-u520yf_wb_j.js +0 -1
  1065. package/dist/ui/static/_next/static/chunks/04n_hxe12wdv3.js +0 -1
  1066. package/dist/ui/static/_next/static/chunks/05822ttahyz33.js +0 -1
  1067. package/dist/ui/static/_next/static/chunks/06hwq8_gunvuo.js +0 -29
  1068. package/dist/ui/static/_next/static/chunks/0891-mvb901op.js +0 -1
  1069. package/dist/ui/static/_next/static/chunks/0alcm0tnx-n8-.js +0 -1
  1070. package/dist/ui/static/_next/static/chunks/0e6yt02qckkgg.js +0 -1
  1071. package/dist/ui/static/_next/static/chunks/0qeb8v4j-hvxn.js +0 -1
  1072. package/dist/ui/static/_next/static/chunks/0squn2lq5smnf.js +0 -1
  1073. package/dist/ui/static/_next/static/chunks/0unrefuwohxkf.js +0 -1
  1074. package/dist/ui/static/_next/static/chunks/11186fkh5coce.js +0 -2
  1075. package/dist/ui/static/_next/static/chunks/13k6ykgg16pc4.js +0 -1
  1076. package/dist/ui/static/_next/static/chunks/1daa_1zod-ndb.js +0 -1
  1077. package/dist/ui/static/_next/static/chunks/1eg67od6go7bm.js +0 -1
  1078. package/dist/ui/static/_next/static/chunks/1enud1-bc9hju.js +0 -1
  1079. package/dist/ui/static/_next/static/chunks/1fwlq_j3who0_.js +0 -1
  1080. package/dist/ui/static/_next/static/chunks/1heusut-vh7z0.js +0 -1
  1081. package/dist/ui/static/_next/static/chunks/1te8076xiv1_f.css +0 -3
  1082. package/dist/ui/static/_next/static/chunks/1v92406tlxfiq.js +0 -1
  1083. package/dist/ui/static/_next/static/chunks/1wj7exxi550gi.css +0 -1
  1084. package/dist/ui/static/_next/static/chunks/1wsoxouji7eb9.js +0 -1
  1085. package/dist/ui/static/_next/static/chunks/22or338lout8-.js +0 -1
  1086. package/dist/ui/static/_next/static/chunks/22pvivewswjat.js +0 -1
  1087. package/dist/ui/static/_next/static/chunks/24418_x2or4rl.js +0 -1
  1088. package/dist/ui/static/_next/static/chunks/24_0lv80gez9c.js +0 -1
  1089. package/dist/ui/static/_next/static/chunks/270j9fwgnu94m.js +0 -1
  1090. package/dist/ui/static/_next/static/chunks/2az51zfcfe4w7.js +0 -1
  1091. package/dist/ui/static/_next/static/chunks/2ckbk_cxw04nr.js +0 -1
  1092. package/dist/ui/static/_next/static/chunks/2fr8bahvq9eg9.js +0 -1
  1093. package/dist/ui/static/_next/static/chunks/2n8v0d0jxc0vm.js +0 -1
  1094. package/dist/ui/static/_next/static/chunks/2nxhnrgae6nij.js +0 -1
  1095. package/dist/ui/static/_next/static/chunks/2prq37rl7-s0l.js +0 -1
  1096. package/dist/ui/static/_next/static/chunks/2ty81249w2gdw.js +0 -1
  1097. package/dist/ui/static/_next/static/chunks/2ym2gl1kulqav.js +0 -1
  1098. package/dist/ui/static/_next/static/chunks/3-xsabbhsq0xh.js +0 -1
  1099. package/dist/ui/static/_next/static/chunks/37h-dtpel_wcw.js +0 -1
  1100. package/dist/ui/static/_next/static/chunks/37kujq-6rc3ey.js +0 -1
  1101. package/dist/ui/static/_next/static/chunks/3cr7wi4udns8d.js +0 -1
  1102. package/dist/ui/static/_next/static/chunks/3e4qdou22wwph.js +0 -1
  1103. package/dist/ui/static/_next/static/chunks/3i3kblvx52ywv.js +0 -1
  1104. package/dist/ui/static/_next/static/chunks/3n0xbx7qq5429.js +0 -1
  1105. package/dist/ui/static/_next/static/chunks/3nydk_onn2xx2.css +0 -1
  1106. package/dist/ui/static/_next/static/chunks/3s1wb0rz0bdep.js +0 -1
  1107. package/dist/ui/static/_next/static/chunks/3ucjnrrnoloze.js +0 -1
  1108. package/dist/ui/static/_next/static/chunks/3vqr94foc1i2t.js +0 -1
  1109. package/node_modules/@oscharko-dev/keiko-contracts/dist/opencode-service-host.d.ts +0 -42
  1110. package/node_modules/@oscharko-dev/keiko-contracts/dist/opencode-service-host.d.ts.map +0 -1
  1111. package/node_modules/@oscharko-dev/keiko-contracts/dist/opencode-service-host.js +0 -151
  1112. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceHostArtifact.d.ts +0 -79
  1113. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceHostArtifact.d.ts.map +0 -1
  1114. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceHostArtifact.js +0 -176
  1115. package/vendor/oscharko-dev-keiko-activity-log-1.2.7.tgz +0 -0
  1116. package/vendor/oscharko-dev-keiko-cli-1.2.7.tgz +0 -0
  1117. package/vendor/oscharko-dev-keiko-contracts-1.2.7.tgz +0 -0
  1118. package/vendor/oscharko-dev-keiko-evaluations-1.2.7.tgz +0 -0
  1119. package/vendor/oscharko-dev-keiko-local-knowledge-1.2.7.tgz +0 -0
  1120. package/vendor/oscharko-dev-keiko-memory-retrieval-1.2.7.tgz +0 -0
  1121. package/vendor/oscharko-dev-keiko-model-gateway-1.2.7.tgz +0 -0
  1122. package/vendor/oscharko-dev-keiko-sandbox-1.2.7.tgz +0 -0
  1123. package/vendor/oscharko-dev-keiko-security-1.2.7.tgz +0 -0
  1124. package/vendor/oscharko-dev-keiko-server-1.2.7.tgz +0 -0
  1125. package/vendor/oscharko-dev-keiko-tool-catalog-1.2.7.tgz +0 -0
  1126. package/vendor/oscharko-dev-keiko-tools-1.2.7.tgz +0 -0
  1127. package/vendor/oscharko-dev-keiko-verification-1.2.7.tgz +0 -0
  1128. package/vendor/oscharko-dev-keiko-workflows-1.2.7.tgz +0 -0
  1129. package/vendor/oscharko-dev-keiko-workspace-1.2.7.tgz +0 -0
  1130. /package/dist/ui/static/_next/static/{H3xxDPi4xvbxoz-xJSbax → UsrqVgAeCxovpV7C_di1N}/_buildManifest.js +0 -0
  1131. /package/dist/ui/static/_next/static/{H3xxDPi4xvbxoz-xJSbax → UsrqVgAeCxovpV7C_di1N}/_clientMiddlewareManifest.js +0 -0
  1132. /package/dist/ui/static/_next/static/{H3xxDPi4xvbxoz-xJSbax → UsrqVgAeCxovpV7C_di1N}/_ssgManifest.js +0 -0
@@ -1,4 +1,6 @@
1
- import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
1
+ import { answerNativeWebSearch, parseNativeWebSearchRequest, } from "./nativeWebSearch.js";
2
+ import { createHash, timingSafeEqual } from "node:crypto";
3
+ import { openCodeAgentModelBinding, } from "./opencodeNativeAgentModels.js";
2
4
  import { DEFAULT_SANDBOX_POLICY, GOVERNED_TOOL_SETTLEMENT_GRACE_MS, } from "@oscharko-dev/keiko-contracts/runtime/tools";
3
5
  import { chmodSync, existsSync, mkdirSync, readFileSync, rmSync, statSync, writeFileSync, } from "node:fs";
4
6
  import {} from "node:http";
@@ -13,19 +15,39 @@ import { codingToolEditPresentation, humanDecisionFeedback, humanDecisionToolRes
13
15
  import { isDenied } from "@oscharko-dev/keiko-workspace";
14
16
  import { isSecureWorkspaceNativeRelativePath, isSecureWorkspaceNativeRange, } from "./secureWorkspaceTextRead.js";
15
17
  import { isCodingSafeActivityPresentationPath, } from "@oscharko-dev/keiko-contracts/runtime/coding-safe-activity";
16
- import { createOpenCodeV2HttpClient, parseOpenCodeV2ChildEndpoint, } from "./opencodeV2HttpClient.js";
17
- import { createOpenCodeV2HistoryProjection, OpenCodeV2HistoryError } from "./opencodeV2History.js";
18
+ import { classifyOpenCodeV2PromptFailure, createOpenCodeV2HttpClient, parseOpenCodeV2ChildEndpoint, } from "./opencodeV2HttpClient.js";
19
+ import { createOpenCodeNativeMessageIdMinter } from "./opencodeNativeMessageId.js";
20
+ import { createOpenCodeV2HistoryProjection, OpenCodeV2HistoryError, openCodeV2StepChanges, } from "./opencodeV2History.js";
18
21
  import { recordContextPresentation } from "./codingRuntimeHistory.js";
22
+ import { recordSessionContinuity, } from "./codingSessionContinuity.js";
23
+ import { bindContinuedSession, retainSettledRun, runtimeDatabasePath, seedContinuation, withoutBaseline, } from "./opencodeSessionContinuation.js";
24
+ import { isAgentAdmitted, openCodeSelectableAgents } from "./opencodeAgents.js";
25
+ import { acceptPromptInputs, createOpenCodePromptInputsRunPort, recordPromptInputs, releasePromptInputs, reservePromptInputs, runtimePromptInputs, openCodePromptInputs, } from "./opencodePromptInputs.js";
26
+ import { createOpenCodeInboxRunPort } from "./opencodeInbox.js";
27
+ import { commandDisplayText, createOpenCodeCommandPresentation, createOpenCodeCommandsRunPort, recordCommandPostRefused, } from "./opencodeCommands.js";
28
+ import { beginOpenCodeTurnImages, createOpenCodeRevertRunPort, noteOpenCodeEditTargets, openCodeNativeCallKey, openCodeRevertBlocksTurn, recordOpenCodeEditSettled, recordOpenCodeTurnImage, recordRevertTurnBlocked, } from "./opencodeRevert.js";
29
+ import { DEFAULT_CODING_WORKBENCH_AGENT, isCodingWorkbenchBuiltInAgent, } from "@oscharko-dev/keiko-contracts/runtime/coding-workbench-runtime-api";
19
30
  import { createOpenCodeV2ApprovalRequests, } from "./opencodeV2ApprovalRequests.js";
20
- import { answerOpenCodeV2Form, projectOpenCodeV2Form, v2FormId } from "./opencodeV2Questions.js";
21
- import { buildOpenCodeLaunchProfile, OPENCODE_RUNTIME_READINESS_PROMPT, } from "./opencodeLaunchProfile.js";
31
+ import { openCodeRuntimeVersionPin } from "./opencodeRuntimeVersions.js";
32
+ import { decideOpenCodeNativePolicy, openCodeNativeEditFiles, openCodeNativeVerificationKind, parseOpenCodeNativePolicyRequest, recordOpenCodeNativePolicyDecision, } from "./opencodeNativePolicy.js";
33
+ import { mcpServersNeedingIssuerValidation, openCodeNativeMcpAdmission, } from "./opencodeNativeMcp.js";
34
+ import { bindNativeMcpRelays } from "./opencodeNativeMcpRelay.js";
35
+ import { harvestMcpCredentials, seedMcpCredentials } from "./opencodeNativeMcpCredentials.js";
36
+ import { createOpenCodeMcpAuthorizationRunPort, } from "./opencodeNativeMcpAuthorization.js";
37
+ import { OPENCODE_CODE_MODE_SESSION_MOVE, OPENCODE_CODE_MODE_WORKTREE_CREATE, OPENCODE_NATIVE_POLICY_ACTION, } from "./opencodeNativePolicyPlugin.js";
38
+ import { nativeWorktreeAnswer, } from "./opencodeNativeWorktree.js";
39
+ import { awaitOpenCodeNativePlugins } from "./opencodeNativePluginReadiness.js";
40
+ import { createNativeQuestionPort } from "./opencodeNativeQuestions.js";
41
+ import { admitNativeSessionLocation, classifyNativeSession, createNativeTreeStatusPort, interruptNativeTree, } from "./opencodeNativeSessionTree.js";
42
+ import { openCodeNativeEgress } from "./opencodeNativeEgress.js";
43
+ import { OPENCODE_NATIVE_FORMATTER_DISPOSITIONS, } from "./opencodeNativeFormatter.js";
44
+ import { buildOpenCodeLaunchProfile, OPENCODE_GATEWAY_PROVIDER_POLICIES, OPENCODE_RUNTIME_READINESS_PROMPT, openCodeConfigDirectory, openCodePlanDirectory, openCodeRepositoryInstructionsPath, } from "./opencodeLaunchProfile.js";
22
45
  import { createGeneratedOpenCodeV2Plugins, createOpenCodeRuntimeAdapter, } from "./opencodeRuntimeAdapter.js";
23
46
  import { OPENCODE_HISTORY_RESPONSE_MAX_BYTES, projectOpenCodePermissionRequestId, } from "./opencodeProtocol.js";
24
47
  import { OPEN_CODE_V2_PROTOCOL_SURFACE_ALGORITHM, projectOpenCodeV2ProtocolSurface, } from "./opencodeProtocolSurface.js";
25
- import { openCodeVisibleToolNames, OPENCODE_PINNED_VERSION, } from "./opencodeToolSchemas.js";
48
+ import { openCodeVisibleToolNames } from "./opencodeToolSchemas.js";
26
49
  import { recordGovernedToolModelContent } from "./governedToolModelContent.js";
27
50
  import { processServerLogSink } from "../process-log-sink.js";
28
- import { CodingRuntimeQuestionAnswerRejectedError } from "./codingRuntimeQuestionPort.js";
29
51
  import { openCodeCatalogAliasFor, openCodeCatalogSettlementBudgetMs, } from "../tool-catalog/catalogToolFacadeBridge.js";
30
52
  import { activityLogEvent, defineActivityLogOperation, } from "@oscharko-dev/keiko-contracts/runtime/observability";
31
53
  const SIDECAR_SESSION_BOUND_OPERATION = defineActivityLogOperation({
@@ -52,17 +74,158 @@ const SIDECAR_SESSION_BOUND_OPERATION = defineActivityLogOperation({
52
74
  proofIds: ["coding-runtime.sidecar-session.bound.emitted-line"],
53
75
  releaseImpact: "patch",
54
76
  });
77
+ // A custom primary agent (#3903 AC1) is recorded by its kind, never by its repository-authored name.
78
+ const CODING_WORKBENCH_AGENT_VALUES = ["build", "plan", "custom"];
79
+ const CODING_WORKBENCH_MODE_VALUES = [
80
+ "governed-assist",
81
+ "supervised-coding",
82
+ "autonomous-delivery",
83
+ ];
84
+ const NATIVE_NARROWING_REFUSED_OPERATION = defineActivityLogOperation({
85
+ contractKind: "activity-log-operation",
86
+ schemaVersion: 1,
87
+ op: "coding-runtime.native-narrowing.refused",
88
+ category: "process",
89
+ owner: "keiko-server",
90
+ emitter: "coding-runtime.opencodeRuntimeComposition.recordNativeNarrowingRefused",
91
+ fields: {
92
+ runId: { type: "string", dataClass: "opaque-id", required: true, maxLength: 128 },
93
+ launchMode: {
94
+ type: "string",
95
+ dataClass: "closed-enum",
96
+ required: true,
97
+ values: ["autonomous-delivery", "unknown"],
98
+ },
99
+ requestedMode: {
100
+ type: "string",
101
+ dataClass: "closed-enum",
102
+ required: true,
103
+ values: CODING_WORKBENCH_MODE_VALUES,
104
+ },
105
+ },
106
+ causal: "correlation",
107
+ lifecycle: "state",
108
+ analyzerProjection: "timeline",
109
+ failureClasses: ["coding-runtime-native-policy"],
110
+ proofIds: ["coding-runtime.native-narrowing.refused.emitted-line"],
111
+ releaseImpact: "patch",
112
+ });
113
+ const NATIVE_FORMATTER_BOUND_OPERATION = defineActivityLogOperation({
114
+ contractKind: "activity-log-operation",
115
+ schemaVersion: 1,
116
+ op: "coding-runtime.native-formatter.bound",
117
+ category: "process",
118
+ owner: "keiko-server",
119
+ emitter: "coding-runtime.opencodeRuntimeComposition.recordNativeFormatterBound",
120
+ fields: {
121
+ runId: { type: "string", dataClass: "opaque-id", required: true, maxLength: 128 },
122
+ disposition: {
123
+ type: "string",
124
+ dataClass: "closed-enum",
125
+ required: true,
126
+ values: OPENCODE_NATIVE_FORMATTER_DISPOSITIONS,
127
+ },
128
+ launchMode: {
129
+ type: "string",
130
+ dataClass: "closed-enum",
131
+ required: true,
132
+ values: [...CODING_WORKBENCH_MODE_VALUES, "unknown"],
133
+ },
134
+ // #3900 AC4: the configured formatter entries the binding carries, and those refused.
135
+ configuredEntryCount: { type: "integer", dataClass: "count", required: false },
136
+ refusedEntryCount: { type: "integer", dataClass: "count", required: false },
137
+ },
138
+ causal: "correlation",
139
+ lifecycle: "state",
140
+ analyzerProjection: "timeline",
141
+ failureClasses: ["coding-runtime-native-policy"],
142
+ proofIds: ["coding-runtime.native-formatter.bound.emitted-line"],
143
+ releaseImpact: "patch",
144
+ });
145
+ const PROVIDER_POLICY_BOUND_OPERATION = defineActivityLogOperation({
146
+ contractKind: "activity-log-operation",
147
+ schemaVersion: 1,
148
+ op: "coding-runtime.provider-policy.bound",
149
+ category: "process",
150
+ owner: "keiko-server",
151
+ emitter: "coding-runtime.opencodeRuntimeComposition.recordProviderPolicyBound",
152
+ fields: {
153
+ runId: { type: "string", dataClass: "opaque-id", required: true, maxLength: 128 },
154
+ providerPolicy: {
155
+ type: "string",
156
+ dataClass: "closed-enum",
157
+ required: true,
158
+ values: ["gateway-only", "absent"],
159
+ },
160
+ freeModels: {
161
+ type: "string",
162
+ dataClass: "closed-enum",
163
+ required: true,
164
+ values: ["disabled", "enabled"],
165
+ },
166
+ modelsFetch: {
167
+ type: "string",
168
+ dataClass: "closed-enum",
169
+ required: true,
170
+ values: ["disabled", "enabled"],
171
+ },
172
+ jvmTemporaryScope: {
173
+ type: "string",
174
+ dataClass: "closed-enum",
175
+ required: true,
176
+ values: ["run-private"],
177
+ },
178
+ toolProfile: {
179
+ type: "string",
180
+ dataClass: "closed-enum",
181
+ required: true,
182
+ values: ["native", "direct", "code-mode"],
183
+ },
184
+ },
185
+ causal: "correlation",
186
+ lifecycle: "state",
187
+ analyzerProjection: "timeline",
188
+ failureClasses: ["coding-runtime-native-policy"],
189
+ proofIds: ["coding-runtime.provider-policy.bound.emitted-line"],
190
+ releaseImpact: "patch",
191
+ });
192
+ const AGENT_SELECTED_OPERATION = defineActivityLogOperation({
193
+ contractKind: "activity-log-operation",
194
+ schemaVersion: 1,
195
+ op: "coding-runtime.agent.selected",
196
+ category: "process",
197
+ owner: "keiko-server",
198
+ emitter: "coding-runtime.opencodeRuntimeComposition.recordAgentSelected",
199
+ fields: {
200
+ runId: { type: "string", dataClass: "opaque-id", required: true, maxLength: 128 },
201
+ agent: {
202
+ type: "string",
203
+ dataClass: "closed-enum",
204
+ required: true,
205
+ values: CODING_WORKBENCH_AGENT_VALUES,
206
+ },
207
+ previousAgent: {
208
+ type: "string",
209
+ dataClass: "closed-enum",
210
+ required: true,
211
+ values: CODING_WORKBENCH_AGENT_VALUES,
212
+ },
213
+ },
214
+ causal: "correlation",
215
+ lifecycle: "state",
216
+ analyzerProjection: "timeline",
217
+ failureClasses: ["coding-runtime-agent-selection"],
218
+ proofIds: ["coding-runtime.agent.selected.emitted-line"],
219
+ releaseImpact: "patch",
220
+ });
55
221
  function v2Record(value) {
56
222
  return typeof value === "object" && value !== null && !Array.isArray(value)
57
223
  ? value
58
224
  : undefined;
59
225
  }
60
- const PINNED_RAW_SCHEMA_SHA256 = "1362671d8cfdcb925b3a9fd61eaa20152e4c587746445a0b03504674b25c88ec";
61
- const DIGEST = /^[a-f0-9]{64}$/u;
62
226
  const ABORT_SETTLEMENT_TIMEOUT_MS = 30_000;
63
227
  const INITIAL_TURN_BASELINE_STABILIZATION_MS = 500;
64
228
  const HISTORY_SYNC_MIN_INTERVAL_MS = 100;
65
- import { prepareOpenCodeServiceHostLaunch, } from "./opencodeServiceHostArtifact.js";
66
229
  export function createOpenCodeRuntimeComposition(configured) {
67
230
  const captured = { ...configured };
68
231
  const toolProfile = captured.toolProfile ?? "direct";
@@ -79,11 +242,31 @@ export function createOpenCodeRuntimeComposition(configured) {
79
242
  renderedResults: renderedResultLog(input),
80
243
  resolveWorkspaceRootAccess: input.resolveWorkspaceRootAccess,
81
244
  activityLog: input.activityLog ?? processServerLogSink(),
245
+ ...(input.nativeWorktrees === undefined ? {} : { nativeWorktrees: input.nativeWorktrees }),
246
+ ...(input.externalReadRoots === undefined
247
+ ? {}
248
+ : { externalReadRoots: input.externalReadRoots }),
249
+ ...(input.nativeWebSearch === undefined ? {} : { nativeWebSearch: input.nativeWebSearch }),
82
250
  }, input.toolBridge, input.toolFacadeOrigin, { approvals, runs });
83
251
  const lifecycle = lifecycleAdapter(input, bridge, runs);
84
- const manager = createCodingRuntimeManager({
252
+ const manager = withNativeModeNarrowing(runs, compositionManager(input, lifecycle), toolProfile === "native", input.activityLog);
253
+ return {
254
+ manager,
255
+ toolBridge: bridge.publicPort,
256
+ runPort: createRunPort(runs, input.diagnostics, input.activityLog, approvals, {
257
+ selectableAgents: openCodeSelectableAgents(toolProfile),
258
+ snapshots: toolProfile === "native",
259
+ mcpAuthorization: toolProfile === "native",
260
+ mcpCredentials: input.mcpCredentials,
261
+ promptInputs: openCodePromptInputs(toolProfile),
262
+ refreshInstructions: (run) => refreshRepositoryInstructions(input, run.runId, run.runRoot, undefined),
263
+ }),
264
+ };
265
+ }
266
+ function compositionManager(input, lifecycle) {
267
+ return createCodingRuntimeManager({
85
268
  supervisor: input.supervisor,
86
- processEnv: {},
269
+ processEnv: input.processEnv ?? {},
87
270
  diagnostics: input.diagnostics,
88
271
  openCodeLifecycleAdapter: lifecycle,
89
272
  portableRuntimeResolver: () => input.portable,
@@ -98,60 +281,339 @@ export function createOpenCodeRuntimeComposition(configured) {
98
281
  : { codingToolApprovals: input.codingToolApprovals }),
99
282
  ...input.authorityLifecycle,
100
283
  });
284
+ }
285
+ /**
286
+ * A resume may narrow the run's mode (Supervised workspace to Ask for approval, say); the manager
287
+ * records it, and the native policy must decide with it from the next action on, not with the launch
288
+ * mode. Widening is refused by the manager itself. A native tree launched in Full access keeps the
289
+ * inherited egress the kernel bound at launch, which no later policy can take back (a shell or a
290
+ * Code Mode `fetch` would keep Internet access), so a resume that narrows it below Full access is
291
+ * refused instead of acknowledged with authority the tree still holds (#3897 review).
292
+ */
293
+ function withNativeModeNarrowing(runs, manager, native, activityLog) {
294
+ const resume = manager.resume.bind(manager);
295
+ manager.resume = (runId, requestedMode) => {
296
+ const run = runs.get(runId);
297
+ if (native && run !== undefined && narrowsLaunchEgress(run.launchMode, requestedMode)) {
298
+ recordNativeNarrowingRefused(activityLog, runId, run.launchMode, requestedMode);
299
+ return { ok: false, failureCode: "authority-resolution-failed", retryable: false };
300
+ }
301
+ const result = resume(runId, requestedMode);
302
+ if (result.ok && result.effectiveMode !== undefined && run !== undefined)
303
+ run.mode = result.effectiveMode;
304
+ return result;
305
+ };
306
+ return manager;
307
+ }
308
+ function narrowsLaunchEgress(launchMode, requestedMode) {
309
+ return (requestedMode !== undefined &&
310
+ openCodeNativeEgress(launchMode) === "inherited" &&
311
+ openCodeNativeEgress(requestedMode) !== "inherited");
312
+ }
313
+ function recordNativeNarrowingRefused(activityLog, runId, launchMode, requestedMode) {
314
+ (activityLog ?? processServerLogSink()).write(activityLogEvent(NATIVE_NARROWING_REFUSED_OPERATION, { level: "warn", correlationId: runId }, {
315
+ runId,
316
+ launchMode: launchMode === "autonomous-delivery" ? launchMode : "unknown",
317
+ requestedMode,
318
+ }));
319
+ }
320
+ // #3903 AC3: a native run's MCP authorization; a completed one keeps its credential at once.
321
+ function nativeMcpAuthorization(readyRun, activityLog, profile) {
322
+ if (!profile.mcpAuthorization)
323
+ return {};
101
324
  return {
102
- prepareServiceHost: (request, receipt) => prepare(input, bridge, runs, request, receipt),
103
- manager,
104
- toolBridge: bridge.publicPort,
105
- runPort: createRunPort(runs, input.diagnostics, input.activityLog, approvals),
325
+ mcpAuthorization: createOpenCodeMcpAuthorizationRunPort({
326
+ readyRun,
327
+ activityLog,
328
+ onAuthorized: (authorized) => {
329
+ const run = readyRun(authorized.runId);
330
+ if (run === undefined)
331
+ return;
332
+ const database = runtimeDatabasePath(run.runRoot);
333
+ harvestMcpCredentials(run, database, profile.mcpCredentials, activityLog, false);
334
+ },
335
+ }),
106
336
  };
107
337
  }
108
- function createRunPort(runs, diagnostics, activityLog, approvals) {
338
+ function createRunPort(runs, diagnostics, activityLog, approvals, profile) {
339
+ const { selectableAgents, snapshots, promptInputs, refreshInstructions } = profile;
109
340
  const readyRun = (runId) => {
110
341
  const run = runs.get(runId);
111
342
  return isReadyRun(run) ? run : undefined;
112
343
  };
344
+ const revertRun = revertReadyRun(runs);
345
+ const { ports: deliveryPorts, withdrawPendingInbox } = createDeliveryPorts(readyRun, promptInputs, diagnostics, activityLog);
346
+ const abortTask = createAbortTask(readyRun, activityLog, withdrawPendingInbox);
113
347
  return {
114
- submitTask: createSubmitTask(readyRun, diagnostics, activityLog),
115
- abortTask: createAbortTask(readyRun),
348
+ submitTask: createSubmitTask(readyRun, { diagnostics, activityLog, refreshInstructions }, selectableAgents),
349
+ selectableAgents,
350
+ ...createOpenCodeCommandsRunPort({ readyRun, capabilities: promptInputs, activityLog }),
351
+ ...nativeMcpAuthorization(readyRun, activityLog, profile),
352
+ ...deliveryPorts,
353
+ abortTask,
354
+ ...(snapshots
355
+ ? createOpenCodeRevertRunPort({ readyRun: revertRun, abortTask, activityLog })
356
+ : {}),
116
357
  waitForTerminal: async (runId, signal) => {
117
358
  const run = readyRun(runId);
118
359
  if (run === undefined)
119
360
  return false;
120
361
  const outcome = await run.runtimeAdapter.waitForTerminal(signal);
121
- if (!outcome && !signal.aborted)
362
+ if (outcome === false && !signal.aborted)
122
363
  recordOpenCodeTurnFailure(diagnostics, run, "terminal");
364
+ // What an undo of this turn must find unchanged, recorded as the turn settled.
365
+ if (snapshots)
366
+ recordOpenCodeTurnImage(run, activityLog);
123
367
  return outcome;
124
368
  },
125
369
  replyPermission: createReplyPermission(readyRun, diagnostics, approvals),
126
- ...createQuestionRunPort(readyRun, diagnostics),
370
+ ...createQuestionRunPort(readyRun, diagnostics, activityLog),
371
+ };
372
+ }
373
+ /**
374
+ * The messages an operator sends into a running turn: their admission and delivery
375
+ * (`opencodePromptInputs.ts`) and the list the Workbench shows of the ones the runtime has not taken
376
+ * yet (`opencodeInbox.ts`), both over the one delivery ledger. The interrupt's withdrawal of what is
377
+ * still pending is returned separately: it belongs to the abort, not to the run port's surface.
378
+ */
379
+ // The run an undo may act on: its client is bound and its turn images are recorded.
380
+ function revertReadyRun(runs) {
381
+ return (runId) => {
382
+ const run = runs.get(runId);
383
+ return run?.revertReady === true && hasRunClient(run) ? run : undefined;
127
384
  };
128
385
  }
129
- function createSubmitTask(readyRun, diagnostics, activityLog) {
130
- return async (runId, text, initialContext) => {
386
+ function createDeliveryPorts(readyRun, promptInputs, diagnostics, activityLog) {
387
+ const { nativeInput, withdrawNativeInput, ...prompts } = createOpenCodePromptInputsRunPort({
388
+ readyRun,
389
+ capabilities: promptInputs,
390
+ activityLog,
391
+ recordPostFailure: (runId, error) => {
392
+ // The message was not accepted; the turn it was meant to join is untouched and keeps running.
393
+ const run = readyRun(runId);
394
+ if (run !== undefined)
395
+ recordOpenCodeTurnFailure(diagnostics, run, "submit", error);
396
+ },
397
+ });
398
+ const { withdrawPendingInbox, ...inbox } = createOpenCodeInboxRunPort({
399
+ readyRun,
400
+ capabilities: promptInputs,
401
+ activityLog,
402
+ nativeInput,
403
+ withdrawNativeInput,
404
+ });
405
+ return { ports: { ...prompts, ...inbox }, withdrawPendingInbox };
406
+ }
407
+ function createSubmitTask(readyRun, sinks, selectableAgents) {
408
+ const { diagnostics, activityLog } = sinks;
409
+ return async (runId, text, initialContext, agent, inputs, origin) => {
131
410
  const run = readyRun(runId);
132
- if (run === undefined)
133
- return false;
134
- if (!(await synchronizeTurnBaseline(run)))
411
+ // A delivery joins the turn in flight (`deliverPrompt`); it never starts or arms one.
412
+ if (run === undefined || inputs?.delivery !== undefined)
135
413
  return false;
136
- if (!run.runtimeAdapter.armTurn())
414
+ // A staged undo is finalized by the runtime on the next prompt, which rewrites the history the
415
+ // reconciliation reads append-only; the human restores the undo or stops the run first.
416
+ if (openCodeRevertBlocksTurn(run)) {
417
+ recordRevertTurnBlocked(activityLog, runId);
137
418
  return false;
138
- try {
139
- await run.client.prompt(run.sessionId, initialContext === undefined ? text : `${initialContext}\n\n${text}`, undefined, initialContext === undefined
140
- ? undefined
141
- : {
142
- displayText: text,
143
- hiddenContextSha256: createHash("sha256").update(initialContext).digest("hex"),
144
- });
145
- if (initialContext !== undefined)
146
- recordContextPresentation(activityLog, runId);
147
- return run.ready;
148
419
  }
149
- catch (error) {
150
- recordOpenCodeTurnFailure(diagnostics, run, "submit", error);
151
- run.runtimeAdapter.cancelTurn();
420
+ // Before the baseline is read and the turn armed: a refused agent leaves nothing to undo, and
421
+ // the switch message the runtime records is part of the baseline the turn is measured from.
422
+ if (!(await selectPrimaryAgent(run, agent, selectableAgents, diagnostics, activityLog))) {
152
423
  return false;
153
424
  }
425
+ if (!(await synchronizeTurnBaseline(run)))
426
+ return false;
427
+ await refreshedInstructions(run, sinks.refreshInstructions);
428
+ if (!run.runtimeAdapter.armTurn())
429
+ return false;
430
+ // A new turn: what an undo must find unchanged is recorded afresh from here on. Keiko's own
431
+ // continuation of the human's request keeps that request's images: its undo reaches back to it.
432
+ if (origin === undefined)
433
+ beginOpenCodeTurnImages(run);
434
+ return postTurnPrompt(run, text, initialContext, inputs, diagnostics, activityLog, origin);
435
+ };
436
+ }
437
+ /**
438
+ * Runs the turn as one of the runtime's slash commands (`POST /api/session/{sessionID}/command`).
439
+ * The runtime expands its own template around `text` and keeps no caller-supplied message id, and
440
+ * the command body has no field to hide a context in: a command turn is dispatched without an initial
441
+ * context (the orchestrator builds none for it). Its effects pass the run's native policy like any
442
+ * other turn's.
443
+ */
444
+ async function postTurnCommand(run, name, text, inputs, diagnostics, activityLog) {
445
+ if (!reserveTurnInputs(run, inputs, activityLog))
446
+ return false;
447
+ run.commandPresentation.arm(commandDisplayText(name, text));
448
+ try {
449
+ await run.client.command(run.sessionId, name, text, undefined, runtimePromptInputs(inputs));
450
+ acceptPromptInputs(activityLog, run, inputs);
451
+ return run.ready;
452
+ }
453
+ catch (error) {
454
+ releaseUnsentTurnInputs(run, inputs, 1, error);
455
+ run.commandPresentation.disarm();
456
+ recordOpenCodeTurnFailure(diagnostics, run, "submit", error);
457
+ recordCommandPostRefused(activityLog, run.runId, inputs, error);
458
+ run.runtimeAdapter.cancelTurn();
459
+ return false;
460
+ }
461
+ }
462
+ /**
463
+ * Charges the turn's files to the run before its prompt is sent: once the request has left, the
464
+ * producer may hold them whether or not the acknowledgement arrives (#4064 review). A prompt admitted
465
+ * meanwhile can have left too little of the budget; this turn is then refused, with one body-free
466
+ * line, and cancelled like any other turn whose prompt was not sent.
467
+ */
468
+ function reserveTurnInputs(run, inputs, activityLog) {
469
+ if (inputs === undefined || reservePromptInputs(run, inputs))
470
+ return true;
471
+ recordPromptInputs(activityLog, run.runId, inputs, {
472
+ outcome: "refused",
473
+ reason: "references-run-budget",
474
+ });
475
+ run.runtimeAdapter.cancelTurn();
476
+ return false;
477
+ }
478
+ /**
479
+ * Returns the reservation only when the failure proves the producer holds nothing: its first and
480
+ * only attempt was refused before it was taken. A refusal of a resent attempt may follow one that
481
+ * was stored, so the files stay charged.
482
+ */
483
+ function releaseUnsentTurnInputs(run, inputs, attempts, error) {
484
+ if (inputs === undefined || attempts !== 1)
485
+ return;
486
+ if (classifyOpenCodeV2PromptFailure(error) === "not-submitted")
487
+ releasePromptInputs(run, inputs);
488
+ }
489
+ // What separates a turn's hidden context from the operator's own text in the sent prompt.
490
+ const PROMPT_CONTEXT_SEPARATOR = "\n\n";
491
+ /** The sent turn's own id, origin and inputs; a hidden context moves the mentions by its length. */
492
+ function turnPromptInputs(id, inputs, initialContext, origin) {
493
+ const offset = initialContext === undefined ? 0 : initialContext.length + PROMPT_CONTEXT_SEPARATOR.length;
494
+ return {
495
+ id,
496
+ ...(origin === undefined ? {} : { origin }),
497
+ ...runtimePromptInputs(inputs, offset),
498
+ };
499
+ }
500
+ async function postTurnPrompt(run, text, initialContext, inputs, diagnostics, activityLog, origin) {
501
+ // A turn that is not a command must never take a command's presentation.
502
+ run.commandPresentation.disarm();
503
+ if (inputs?.command !== undefined) {
504
+ return postTurnCommand(run, inputs.command.name, text, inputs, diagnostics, activityLog);
505
+ }
506
+ if (!reserveTurnInputs(run, inputs, activityLog))
507
+ return false;
508
+ // One id for the turn's input: a resend after a lost acknowledgement is the same input, never a
509
+ // second one, so a lost reply does not end a turn the runtime already started (#3897 review).
510
+ const id = mintTurnMessageId();
511
+ let attempts = 0;
512
+ const post = () => {
513
+ attempts += 1;
514
+ return run.client.prompt(run.sessionId, initialContext === undefined ? text : `${initialContext}${PROMPT_CONTEXT_SEPARATOR}${text}`, undefined, initialContext === undefined
515
+ ? undefined
516
+ : {
517
+ displayText: text,
518
+ hiddenContextSha256: createHash("sha256").update(initialContext).digest("hex"),
519
+ }, turnPromptInputs(id, inputs, initialContext, origin));
154
520
  };
521
+ try {
522
+ await postOnceMore(post, diagnostics, run);
523
+ if (initialContext !== undefined)
524
+ recordContextPresentation(activityLog, run.runId);
525
+ if (inputs !== undefined)
526
+ acceptPromptInputs(activityLog, run, inputs);
527
+ return run.ready;
528
+ }
529
+ catch (error) {
530
+ releaseUnsentTurnInputs(run, inputs, attempts, error);
531
+ recordOpenCodeTurnFailure(diagnostics, run, "submit", error);
532
+ run.runtimeAdapter.cancelTurn();
533
+ return false;
534
+ }
535
+ }
536
+ /** The turn prompts' ascending native ids, shared by every run of this process. */
537
+ const mintTurnMessageId = createOpenCodeNativeMessageIdMinter();
538
+ /**
539
+ * Posts a turn's prompt; a failure after which the runtime may hold the input is resent once with
540
+ * the same id, which the runtime answers with the receipt it holds. A receipt under another id
541
+ * means the input is held under that one: the turn runs. A definite refusal fails the turn.
542
+ */
543
+ async function postOnceMore(post, diagnostics, run) {
544
+ try {
545
+ await post();
546
+ return;
547
+ }
548
+ catch (error) {
549
+ const failure = classifyOpenCodeV2PromptFailure(error);
550
+ if (failure === "not-submitted")
551
+ throw error;
552
+ if (failure === "receipt-mismatch")
553
+ return;
554
+ recordOpenCodeTurnFailure(diagnostics, run, "submit-resent", error);
555
+ }
556
+ try {
557
+ await post();
558
+ }
559
+ catch (error) {
560
+ if (classifyOpenCodeV2PromptFailure(error) !== "receipt-mismatch")
561
+ throw error;
562
+ }
563
+ }
564
+ /**
565
+ * Makes the session run the requested primary agent (#3897). `true` means the next prompt runs under
566
+ * it, or that none was asked for. An agent this composition cannot honour (`plan` on a mapped
567
+ * profile) or a switch the runtime refuses returns `false` with a body-free diagnostic, never a
568
+ * silent fallback to the default: a read-only request must not run as an editing agent. The agent
569
+ * is remembered only after the runtime confirmed the switch, so a failed one is simply re-sent.
570
+ */
571
+ async function selectPrimaryAgent(run, requested, selectableAgents, diagnostics, activityLog) {
572
+ if (!isAgentAdmitted(selectableAgents, requested)) {
573
+ recordOpenCodeTurnFailure(diagnostics, run, "agent-unsupported");
574
+ return false;
575
+ }
576
+ const current = run.agent ?? DEFAULT_CODING_WORKBENCH_AGENT;
577
+ if (requested === undefined || requested === current)
578
+ return true;
579
+ if (!(await customAgentListed(run, requested, diagnostics)))
580
+ return false;
581
+ try {
582
+ await run.client.switchAgent(run.sessionId, requested);
583
+ }
584
+ catch (error) {
585
+ recordOpenCodeTurnFailure(diagnostics, run, "agent", error);
586
+ return false;
587
+ }
588
+ run.agent = requested;
589
+ recordAgentSelected(activityLog, run.runId, requested, current);
590
+ return true;
591
+ }
592
+ /**
593
+ * A built-in agent needs no listing. A custom primary agent must be one the runtime lists for the
594
+ * run's workspace right now (#3903 AC1): the runtime would switch to any name it is given, so this
595
+ * is what keeps an unlisted or since-removed agent out. A listing that fails refuses the switch.
596
+ */
597
+ async function customAgentListed(run, requested, diagnostics) {
598
+ if (isCodingWorkbenchBuiltInAgent(requested))
599
+ return true;
600
+ try {
601
+ const listed = await run.client.primaryAgents(run.workspaceRoot);
602
+ if (listed.some((agent) => agent.name === requested))
603
+ return true;
604
+ recordOpenCodeTurnFailure(diagnostics, run, "agent-unsupported");
605
+ return false;
606
+ }
607
+ catch (error) {
608
+ recordOpenCodeTurnFailure(diagnostics, run, "agent", error);
609
+ return false;
610
+ }
611
+ }
612
+ function agentKind(agent) {
613
+ return isCodingWorkbenchBuiltInAgent(agent) ? agent : "custom";
614
+ }
615
+ function recordAgentSelected(activityLog, runId, agent, previousAgent) {
616
+ activityLog?.write(activityLogEvent(AGENT_SELECTED_OPERATION, { correlationId: runId }, { runId, agent: agentKind(agent), previousAgent: agentKind(previousAgent) }));
155
617
  }
156
618
  function createReplyPermission(readyRun, diagnostics, approvals) {
157
619
  return async (runId, requestId, reply) => {
@@ -262,21 +724,30 @@ async function synchronizeTurnBaseline(run) {
262
724
  run.initialTurnBaselineStable = true;
263
725
  return true;
264
726
  }
265
- function createAbortTask(readyRun) {
727
+ function createAbortTask(readyRun, activityLog, withdrawPendingInbox) {
266
728
  return async (runId) => {
267
729
  const run = readyRun(runId);
268
730
  if (run === undefined)
269
731
  return false;
270
732
  try {
271
- await run.client.interrupt(run.sessionId);
272
- const settled = await fixedV2SessionIsTerminal(run.client, run.sessionId, AbortSignal.timeout(ABORT_SETTLEMENT_TIMEOUT_MS));
273
- if (settled) {
733
+ // The whole native session tree: a background child keeps running when only the parent is
734
+ // interrupted, and its end would start another turn of the parent (`interruptNativeTree`).
735
+ const stopped = await interruptNativeTree(run.client, nativeSessionTree(run, run.sessionId), {
736
+ signal: AbortSignal.timeout(ABORT_SETTLEMENT_TIMEOUT_MS),
737
+ pause: readinessPollDelay,
738
+ runId: run.runId,
739
+ activityLog,
740
+ });
741
+ if (stopped.settled) {
274
742
  await run.runtimeAdapter.waitForTerminal(AbortSignal.timeout(ABORT_SETTLEMENT_TIMEOUT_MS));
743
+ // The runtime keeps the messages it had not taken through an interrupt and would hand them
744
+ // to the model with the next prompt, a turn the operator never meant them for.
745
+ await withdrawPendingInbox(runId, undefined, AbortSignal.timeout(ABORT_SETTLEMENT_TIMEOUT_MS));
275
746
  }
276
747
  else {
277
748
  run.runtimeAdapter.cancelTurn();
278
749
  }
279
- return settled && run.ready;
750
+ return stopped.settled && run.ready;
280
751
  }
281
752
  catch {
282
753
  run.runtimeAdapter.cancelTurn();
@@ -284,82 +755,42 @@ function createAbortTask(readyRun) {
284
755
  }
285
756
  };
286
757
  }
287
- function createQuestionRunPort(readyRun, diagnostics) {
758
+ function createQuestionRunPort(readyRun, diagnostics, activityLog) {
759
+ // The run's questions are its own session's and its owned children's (`opencodeNativeQuestions.ts`).
760
+ const portOf = (run) => {
761
+ run.questionList ??= {};
762
+ return createNativeQuestionPort({
763
+ runId: run.runId,
764
+ client: run.client,
765
+ tree: nativeSessionTree(run, run.sessionId),
766
+ open: () => run.ready,
767
+ activityLog,
768
+ onFailure: (error) => {
769
+ recordOpenCodeTurnFailure(diagnostics, run, "question", error);
770
+ },
771
+ listed: run.questionList,
772
+ });
773
+ };
288
774
  return {
289
775
  listQuestions: async (runId) => {
290
776
  const run = readyRun(runId);
291
- if (run === undefined)
292
- return [];
293
- try {
294
- return (await run.client.forms())
295
- .filter((form) => form.sessionID === run.sessionId)
296
- .map(projectOpenCodeV2Form);
297
- }
298
- catch (error) {
299
- recordOpenCodeTurnFailure(diagnostics, run, "question", error);
300
- throw error;
301
- }
777
+ return run === undefined ? [] : portOf(run).list();
302
778
  },
303
779
  answerQuestion: async (runId, requestId, answers) => {
304
780
  const run = readyRun(runId);
305
- if (run === undefined)
306
- return false;
307
- try {
308
- const formId = v2FormId(requestId);
309
- const pending = (await run.client.forms()).find((form) => form.id === formId && form.sessionID === run.sessionId);
310
- if (pending === undefined || !run.ready)
311
- return false;
312
- const question = projectOpenCodeV2Form(pending);
313
- if (!answersMatchQuestions(question, answers))
314
- throw new CodingRuntimeQuestionAnswerRejectedError();
315
- await run.client.replyForm(run.sessionId, String(pending.id), answerOpenCodeV2Form(pending, answers));
316
- return run.ready;
317
- }
318
- catch (error) {
319
- if (error instanceof CodingRuntimeQuestionAnswerRejectedError)
320
- throw error;
321
- recordOpenCodeTurnFailure(diagnostics, run, "question", error);
322
- throw error;
323
- }
781
+ return run === undefined ? false : portOf(run).answer(requestId, answers);
782
+ },
783
+ rejectQuestion: async (runId, requestId) => {
784
+ const run = readyRun(runId);
785
+ return run === undefined ? false : portOf(run).reject(requestId);
324
786
  },
325
- rejectQuestion: createRejectQuestion(readyRun, diagnostics),
326
- };
327
- }
328
- function createRejectQuestion(readyRun, diagnostics) {
329
- return async (runId, requestId) => {
330
- const run = readyRun(runId);
331
- if (run === undefined)
332
- return false;
333
- try {
334
- const formId = v2FormId(requestId);
335
- const owned = (await run.client.forms()).some((form) => form.id === formId && form.sessionID === run.sessionId);
336
- if (!owned || formId === undefined)
337
- return false;
338
- await run.client.cancelForm(run.sessionId, formId);
339
- return run.ready;
340
- }
341
- catch (error) {
342
- recordOpenCodeTurnFailure(diagnostics, run, "question", error);
343
- throw error;
344
- }
345
787
  };
346
788
  }
347
- function answersMatchQuestions(request, answers) {
348
- if (answers.length !== request.questions.length)
349
- return false;
350
- return answers.every((answer, index) => {
351
- const question = request.questions[index];
352
- if (question === undefined || (question.multiple !== true && answer.length > 1))
353
- return false;
354
- const labels = new Set(question.options.map((option) => option.label));
355
- return answer.every((selection) => question.custom === true || labels.has(selection));
356
- });
357
- }
358
789
  function isReadyRun(run) {
359
- return (run?.ready === true &&
360
- run.client !== undefined &&
361
- run.runtimeAdapter !== undefined &&
362
- run.sessionId !== undefined);
790
+ return run?.ready === true && hasRunClient(run);
791
+ }
792
+ function hasRunClient(run) {
793
+ return (run.client !== undefined && run.runtimeAdapter !== undefined && run.sessionId !== undefined);
363
794
  }
364
795
  function lifecycleAdapter(input, bridge, runs) {
365
796
  return {
@@ -367,26 +798,37 @@ function lifecycleAdapter(input, bridge, runs) {
367
798
  handshake: (request) => handshake(input, bridge, runs, request),
368
799
  monitor: ({ runId, onFailure }) => {
369
800
  const run = runs.get(runId);
370
- const dispose = run?.runtimeAdapter?.monitor(onFailure);
801
+ if (run === undefined)
802
+ return undefined;
803
+ const dispose = run.runtimeAdapter?.monitor(() => {
804
+ run.ready = false;
805
+ run.revertReady = false;
806
+ onFailure();
807
+ });
371
808
  return dispose === undefined
372
809
  ? undefined
373
810
  : () => {
374
- if (run !== undefined)
375
- run.ready = false;
811
+ // Holding a completed run quiesces productive work, retaining only its qualified
812
+ // operator revert client. Failure and disposal invalidate that client separately.
813
+ run.ready = false;
376
814
  dispose();
377
815
  };
378
816
  },
379
- dispose: (runId, signal) => disposeRun(input, bridge, runs, runId, signal),
817
+ dispose: (runId, signal, settlement) => disposeRun(input, bridge, runs, runId, signal, settlement),
380
818
  };
381
819
  }
382
- async function disposeRun(input, bridge, runs, runId, signal) {
820
+ async function disposeRun(input, bridge, runs, runId, signal, settlement) {
383
821
  const run = runs.get(runId);
384
- if (run !== undefined)
822
+ if (run !== undefined) {
385
823
  run.ready = false;
824
+ run.revertReady = false;
825
+ }
386
826
  try {
387
827
  const drained = bridge.close(signal);
388
828
  input.safeActivity?.clear();
389
829
  input.gatewayReadiness.clear(runId);
830
+ // The run's relayed MCP exchanges end with it, before its runtime is reaped.
831
+ input.mcpRelay?.relay.releaseRun(runId);
390
832
  if (!(await drained))
391
833
  return false;
392
834
  if (run === undefined)
@@ -396,6 +838,8 @@ async function disposeRun(input, bridge, runs, runId, signal) {
396
838
  await run.runtimeAdapter?.close();
397
839
  if (!currentDisposal(runs, run, signal))
398
840
  return false;
841
+ keepMcpCredentials(input, run);
842
+ retainOnDispose(input, run, settlement);
399
843
  rmSync(run.runRoot, { recursive: true, force: true });
400
844
  runs.delete(runId);
401
845
  return true;
@@ -405,6 +849,29 @@ async function disposeRun(input, bridge, runs, runId, signal) {
405
849
  return false;
406
850
  }
407
851
  }
852
+ // The reaped runtime's MCP credentials are kept and removed before its database is retained.
853
+ function keepMcpCredentials(input, run) {
854
+ if ((run.mcpOAuth?.size ?? 0) === 0)
855
+ return;
856
+ const database = runtimeDatabasePath(run.runRoot);
857
+ harvestMcpCredentials(run, database, input.mcpCredentials, input.activityLog, true);
858
+ }
859
+ /**
860
+ * The runtime is reaped, so its database is quiescent. A run that settled normally leaves it as its
861
+ * task's retained entry before the private state is removed (`retainSettledRun`); any other run
862
+ * removes the task's now-stale entry. Never throws.
863
+ */
864
+ function retainOnDispose(input, run, settlement) {
865
+ const context = continuationContext(input);
866
+ if (context === undefined)
867
+ return;
868
+ retainSettledRun(context, {
869
+ runId: run.runId,
870
+ runRoot: run.runRoot,
871
+ workspaceRoot: run.workspaceRoot,
872
+ sessionId: run.sessionId,
873
+ }, settlement?.terminalStatus);
874
+ }
408
875
  function disposalCancelled(signal) {
409
876
  return signal?.aborted === true;
410
877
  }
@@ -451,65 +918,311 @@ async function disposeFailedPrepare(bridge, runRoot, runId, diagnostics, signal)
451
918
  recordCompositionDisposalFailure(diagnostics, runId, "prepare-run-root-remove", error);
452
919
  }
453
920
  }
454
- async function materializePrepare(input, bridge, runs, request, runRoot, serviceHost) {
921
+ async function materializePrepare(input, bridge, runs, request, runRoot) {
455
922
  createPrivateState(runRoot);
923
+ const continuation = seedRun(input, request, runRoot);
456
924
  await bridge.start();
925
+ const mcpChecks = await nativeMcpChecks(input, request);
926
+ const documents = input.toolProfile === "native"
927
+ ? await input.configDocuments?.({ runId: request.runId, signal: request.signal })
928
+ : undefined;
929
+ const agentModels = nativeAgentModels(input, documents);
930
+ const { profile, mcp } = runLaunchProfile(input, request, runRoot, mcpChecks, {
931
+ documents,
932
+ agentModels,
933
+ });
934
+ const config = profile.config;
935
+ materialize(runRoot, config, createGeneratedOpenCodeV2Plugins(input.toolProfile));
936
+ await admitRepositoryItems(input, request, runRoot);
937
+ await admitOperatorPlugins(input, request, runRoot);
938
+ await admitRemoteSkills(input, request, runRoot);
939
+ await refreshRepositoryInstructions(input, request.runId, runRoot, request.signal);
940
+ const password = profile.env.OPENCODE_SERVER_PASSWORD;
941
+ if (password === undefined)
942
+ throw new Error("password-missing");
943
+ const configDigest = createHash("sha256").update(config, "utf8").digest("hex");
944
+ const result = preparedLaunch(input, bridge, preparedEnvironment(profile.env, request.env, runRoot));
945
+ persistPreparedRun(runs, request, runRoot, password, configDigest, {
946
+ continuation,
947
+ mcp,
948
+ media: promptMedia(input),
949
+ });
950
+ recordNativeFormatterBound(input.activityLog, request, profile.formatter, profile.formatterEntries);
951
+ recordAgentModelsBound(input.activityLog, request, agentModels);
952
+ recordProviderPolicyBound(input.activityLog, request, profile, input.toolProfile ?? "direct");
953
+ return result;
954
+ }
955
+ /** The run's launch profile, with the MCP servers the operator's registry admits for it. */
956
+ function runLaunchProfile(input, request, runRoot, mcpChecks, configured) {
957
+ const mcp = nativeMcpAdmission(input, request, runRoot, mcpChecks);
457
958
  const profile = buildOpenCodeLaunchProfile({
458
959
  executable: request.executablePath,
459
960
  stateRoot: runRoot,
460
961
  contextGeometry: input.contextGeometry,
461
962
  toolProfile: input.toolProfile,
963
+ mode: request.env.KEIKO_CODING_MODE,
964
+ ...(configured.documents === undefined ? {} : { formatterDocuments: configured.documents }),
965
+ ...(configured.agentModels === undefined ? {} : { agentModels: configured.agentModels }),
966
+ ...(mcp === undefined ? {} : { mcp: mcp.config }),
967
+ ...(input.toolProfile === "native" && input.externalReadRoots !== undefined
968
+ ? { externalReadRoots: input.externalReadRoots }
969
+ : {}),
462
970
  });
463
971
  if (!profile.ok)
464
972
  throw new Error("profile-invalid");
465
- const config = profile.config;
466
- materialize(runRoot, config, createGeneratedOpenCodeV2Plugins(input.toolProfile));
467
- const password = profile.env.OPENCODE_SERVER_PASSWORD;
468
- if (password === undefined)
469
- throw new Error("password-missing");
470
- const configDigest = createHash("sha256").update(config, "utf8").digest("hex");
471
- const result = {
973
+ return { profile, mcp };
974
+ }
975
+ /** A native run's MCP servers from the operator's registry; none for a mapped profile. */
976
+ function nativeMcpAdmission(input, request, runRoot, checks) {
977
+ if (input.toolProfile !== "native" || input.mcpServers === undefined)
978
+ return undefined;
979
+ return openCodeNativeMcpAdmission({
980
+ servers: input.mcpServers(request.runId),
981
+ mode: request.env.KEIKO_CODING_MODE,
982
+ home: join(runRoot, "home"),
983
+ validations: checks.validations,
984
+ relays: checks.relays,
985
+ });
986
+ }
987
+ async function nativeMcpChecks(input, request) {
988
+ return {
989
+ validations: await mcpIssuerValidations(input, request),
990
+ relays: nativeMcpRelays(input, request),
991
+ };
992
+ }
993
+ /** The relays a native run's servers with credential headers are reached through. */
994
+ function nativeMcpRelays(input, request) {
995
+ if (input.toolProfile !== "native" || input.mcpServers === undefined)
996
+ return new Map();
997
+ return bindNativeMcpRelays({
998
+ servers: input.mcpServers(request.runId),
999
+ mode: request.env.KEIKO_CODING_MODE,
1000
+ runId: request.runId,
1001
+ relay: input.mcpRelay,
1002
+ activityLog: input.activityLog,
1003
+ });
1004
+ }
1005
+ /**
1006
+ * The issuer of every remote server the run would use with OAuth, validated before the launch
1007
+ * (#3903 AC3). The checks run concurrently and each records its own lines; a server whose issuer
1008
+ * did not validate, or that no validator could check, is left out of the binding.
1009
+ */
1010
+ async function mcpIssuerValidations(input, request) {
1011
+ if (input.toolProfile !== "native" || input.mcpServers === undefined)
1012
+ return new Map();
1013
+ const validate = input.mcpOAuthIssuer;
1014
+ const servers = mcpServersNeedingIssuerValidation(input.mcpServers(request.runId), request.env.KEIKO_CODING_MODE);
1015
+ if (validate === undefined || servers.length === 0)
1016
+ return new Map();
1017
+ const checked = await Promise.all(servers.map(async (server) => [
1018
+ server.name,
1019
+ await validate(server.name, server.transport.oauth, request.runId, request.signal),
1020
+ ]));
1021
+ return new Map(checked);
1022
+ }
1023
+ /** JVMs on Darwin ignore TMPDIR for their OS-derived default. Keep their temp files inside the
1024
+ * already-created private state without widening the process's writable roots. */
1025
+ function preparedEnvironment(profile, inherited, runRoot) {
1026
+ const temporary = join(runRoot, "tmp");
1027
+ // These are JVM environment-option quotes, not a shell command; retain literal path characters.
1028
+ const javaTemporary = "'-Djava.io.tmpdir=" + temporary.replaceAll("'", "'\"'\"'") + "'";
1029
+ return {
1030
+ ...profile,
1031
+ JAVA_TOOL_OPTIONS: [inherited.JAVA_TOOL_OPTIONS, javaTemporary].filter(Boolean).join(" "),
1032
+ };
1033
+ }
1034
+ /** The prepared launch: the profile's environment plus the run's two capabilities. */
1035
+ function preparedLaunch(input, bridge, env) {
1036
+ return {
472
1037
  ok: true,
473
1038
  parentLifetime: "stdin-eof",
474
1039
  env: {
475
- ...profile.env,
1040
+ ...env,
476
1041
  KEIKO_MODEL_GATEWAY_CAPABILITY: input.capabilities.modelGatewayCapability,
477
1042
  KEIKO_TOOL_FACADE_URL: bridge.publicPort.url,
478
1043
  KEIKO_TOOL_FACADE_CAPABILITY: input.capabilities.toolFacadeCapability,
479
1044
  },
480
1045
  };
481
- const program = serviceHost === undefined
482
- ? undefined
483
- : prepareCompositionServiceHost(serviceHost, request, runRoot, configDigest, result.env, input.toolProfile ?? "direct");
484
- if (serviceHost !== undefined && program === undefined)
485
- throw new Error("host-preparation-invalid");
486
- persistPreparedRun(runs, request, runRoot, password, configDigest, program);
487
- return { ...result, ...(program === undefined ? {} : { serviceHost: program }) };
488
- }
489
- function persistPreparedRun(runs, request, runRoot, password, configDigest, program) {
490
- const run = preparedRun(request.runId, runRoot, request.env.KEIKO_CODING_WORKSPACE_ROOT ?? "", password, configDigest, request.verification);
491
- if (program !== undefined)
492
- run.serviceHostPrepared = true;
493
- runs.set(request.runId, run);
494
1046
  }
495
- function prepareCompositionServiceHost(receipt, request, stateRoot, configDigest, env, toolProfile) {
496
- return prepareOpenCodeServiceHostLaunch(receipt, {
497
- workspace: request.env.KEIKO_CODING_WORKSPACE_ROOT,
498
- stateRoot,
499
- password: env.OPENCODE_SERVER_PASSWORD,
500
- providerURL: `${request.env.KEIKO_MODEL_GATEWAY_URL ?? ""}/chat/completions`,
501
- providerCapability: env.KEIKO_MODEL_GATEWAY_CAPABILITY,
502
- facadeURL: env.KEIKO_TOOL_FACADE_URL,
503
- facadeCapability: env.KEIKO_TOOL_FACADE_CAPABILITY,
1047
+ /**
1048
+ * Keiko's bounded copy of the workspace's AGENTS.md in the producer's own global instruction slot
1049
+ * (#3900 AC3): before the launch, and again before each turn so an edit, a new file (`/init`) or a
1050
+ * removal reaches the next turn. The producer's instruction plugin watches that path from launch;
1051
+ * after a change the turn waits out its 100 ms debounce, so the change is loaded before the prompt.
1052
+ */
1053
+ async function refreshRepositoryInstructions(input, runId, runRoot, signal) {
1054
+ if (input.toolProfile !== "native" || input.repositoryInstructions === undefined)
1055
+ return false;
1056
+ return input.repositoryInstructions.materializeForRun({
1057
+ runId,
1058
+ targetPath: openCodeRepositoryInstructionsPath(runRoot),
1059
+ ...(signal === undefined ? {} : { signal }),
1060
+ });
1061
+ }
1062
+ const REPOSITORY_INSTRUCTIONS_REFRESH_MS = 250;
1063
+ /** Refreshes the copy before a turn and, after a change, waits out the producer's file watcher. */
1064
+ async function refreshedInstructions(run, refresh) {
1065
+ if (!(await refresh(run)))
1066
+ return;
1067
+ await new Promise((resolve) => {
1068
+ setTimeout(resolve, REPOSITORY_INSTRUCTIONS_REFRESH_MS);
1069
+ });
1070
+ }
1071
+ // The copies join the discovery directory before the first launch, so the config digest stays the
1072
+ // digest of Keiko's own generated document; the admission line carries the copies' own. The port
1073
+ // never rejects: a run starts without the repository's items rather than failing because of them.
1074
+ async function admitRepositoryItems(input, request, runRoot) {
1075
+ if (input.toolProfile !== "native")
1076
+ return;
1077
+ await input.repositoryItems?.admitForRun({
1078
+ runId: request.runId,
1079
+ discoveryRoot: openCodeConfigDirectory(runRoot),
1080
+ ...(request.signal === undefined ? {} : { signal: request.signal }),
1081
+ });
1082
+ }
1083
+ // After the repository's items, so a repository skill keeps its name (#3903 AC3).
1084
+ async function admitRemoteSkills(input, request, runRoot) {
1085
+ if (input.toolProfile !== "native")
1086
+ return;
1087
+ await input.remoteSkills?.admitForRun({
1088
+ runId: request.runId,
1089
+ discoveryRoot: openCodeConfigDirectory(runRoot),
504
1090
  mode: request.env.KEIKO_CODING_MODE,
1091
+ ...(request.signal === undefined ? {} : { signal: request.signal }),
1092
+ });
1093
+ }
1094
+ // The launch mode decides: only a run launched in Full access loads operator code (#3903 AC2).
1095
+ async function admitOperatorPlugins(input, request, runRoot) {
1096
+ if (input.toolProfile !== "native")
1097
+ return;
1098
+ await input.operatorPlugins?.admitForRun({
505
1099
  runId: request.runId,
506
- configDigest,
1100
+ discoveryRoot: openCodeConfigDirectory(runRoot),
1101
+ mode: request.env.KEIKO_CODING_MODE,
1102
+ ...(request.signal === undefined ? {} : { signal: request.signal }),
1103
+ });
1104
+ }
1105
+ function continuationContext(input) {
1106
+ const continuity = input.sessionContinuity;
1107
+ if (continuity === undefined)
1108
+ return undefined;
1109
+ return {
1110
+ service: continuity.service,
1111
+ workspaceId: continuity.workspaceId,
1112
+ runtimeVersion: input.portable.verification.summary.upstreamVersion,
1113
+ maxInputTokens: input.contextGeometry.maxInputTokens,
1114
+ activityLog: input.activityLog,
1115
+ ...(continuity.forkSource === undefined ? {} : { forkSource: continuity.forkSource }),
1116
+ };
1117
+ }
1118
+ /** Seeds the run's private runtime database when the run asked to continue a task's session. */
1119
+ function seedRun(input, request, runRoot) {
1120
+ const context = continuationContext(input);
1121
+ if (context === undefined)
1122
+ return undefined;
1123
+ return seedContinuation(context, {
1124
+ runId: request.runId,
1125
+ runRoot,
1126
+ workspaceRoot: request.env.KEIKO_CODING_WORKSPACE_ROOT ?? "",
1127
+ });
1128
+ }
1129
+ /** A native run's built-in formatter decision, once per prepared run (parity row C07). */
1130
+ /** The run's further gateway models and per-agent overrides (#3903 AC1); none off the native profile. */
1131
+ function nativeAgentModels(input, documents) {
1132
+ if (input.toolProfile !== "native")
1133
+ return undefined;
1134
+ const catalog = input.agentModelCatalog?.();
1135
+ return catalog === undefined ? undefined : openCodeAgentModelBinding(documents ?? [], catalog);
1136
+ }
1137
+ const AGENT_MODELS_BOUND_OPERATION = defineActivityLogOperation({
1138
+ contractKind: "activity-log-operation",
1139
+ schemaVersion: 1,
1140
+ op: "coding-runtime.agent-models.bound",
1141
+ category: "process",
1142
+ owner: "keiko-server",
1143
+ emitter: "coding-runtime.opencodeRuntimeComposition.recordAgentModelsBound",
1144
+ fields: {
1145
+ runId: { type: "string", dataClass: "opaque-id", required: true, maxLength: 128 },
1146
+ // The gateway models the provider declares beside the run's own, and the configured overrides.
1147
+ offeredModelCount: { type: "integer", dataClass: "count", required: true },
1148
+ configuredAgentCount: { type: "integer", dataClass: "count", required: true },
1149
+ refusedAgentCount: { type: "integer", dataClass: "count", required: true },
1150
+ },
1151
+ causal: "correlation",
1152
+ lifecycle: "state",
1153
+ analyzerProjection: "timeline",
1154
+ failureClasses: ["coding-runtime-agent-selection"],
1155
+ proofIds: ["coding-runtime.agent-models.bound.emitted-line"],
1156
+ releaseImpact: "patch",
1157
+ });
1158
+ /** One body-free line per prepared native run: counts only, never a model or an agent name. */
1159
+ function recordAgentModelsBound(activityLog, request, binding) {
1160
+ if (binding === undefined)
1161
+ return;
1162
+ (activityLog ?? processServerLogSink()).write(activityLogEvent(AGENT_MODELS_BOUND_OPERATION, { correlationId: request.runId }, {
1163
+ runId: request.runId,
1164
+ offeredModelCount: Object.keys(binding.models).length,
1165
+ configuredAgentCount: binding.admittedCount,
1166
+ refusedAgentCount: binding.refusedCount,
1167
+ }));
1168
+ }
1169
+ function recordNativeFormatterBound(activityLog, request, disposition, entries) {
1170
+ if (disposition === undefined)
1171
+ return;
1172
+ const mode = CODING_WORKBENCH_MODE_VALUES.find((value) => value === request.env.KEIKO_CODING_MODE);
1173
+ (activityLog ?? processServerLogSink()).write(activityLogEvent(NATIVE_FORMATTER_BOUND_OPERATION, { correlationId: request.runId }, {
1174
+ runId: request.runId,
1175
+ disposition,
1176
+ launchMode: mode ?? "unknown",
1177
+ ...(entries === undefined
1178
+ ? {}
1179
+ : { configuredEntryCount: entries.admitted, refusedEntryCount: entries.refused }),
1180
+ }));
1181
+ }
1182
+ /**
1183
+ * Whether the prepared run admits only the gateway-bound provider, keeps OpenCode's hosted free
1184
+ * models off and never fetches the models.dev catalog (parity row S11), read from the launch
1185
+ * configuration and environment it was given.
1186
+ */
1187
+ function recordProviderPolicyBound(activityLog, request, profile, toolProfile) {
1188
+ const gatewayOnly = JSON.stringify(profile.configValue.policies) ===
1189
+ JSON.stringify(OPENCODE_GATEWAY_PROVIDER_POLICIES);
1190
+ (activityLog ?? processServerLogSink()).write(activityLogEvent(PROVIDER_POLICY_BOUND_OPERATION, { correlationId: request.runId }, {
1191
+ runId: request.runId,
1192
+ providerPolicy: gatewayOnly ? "gateway-only" : "absent",
1193
+ freeModels: profile.env.OPENCODE_DISABLE_FREE_MODELS === "1" ? "disabled" : "enabled",
1194
+ modelsFetch: profile.env.OPENCODE_DISABLE_MODELS_FETCH === "1" ? "disabled" : "enabled",
1195
+ jvmTemporaryScope: "run-private",
507
1196
  toolProfile,
508
- }, env);
1197
+ }));
1198
+ }
1199
+ function persistPreparedRun(runs, request, runRoot, password, configDigest, extras = {}) {
1200
+ const { continuation, mcp, media } = extras;
1201
+ const run = preparedRun(request.runId, runRoot, request.env.KEIKO_CODING_WORKSPACE_ROOT ?? "", password, configDigest, request.verification, request.env.KEIKO_CODING_MODE);
1202
+ if (continuation !== undefined)
1203
+ run.continuation = continuation;
1204
+ if (mcp !== undefined) {
1205
+ run.mcp = mcp.grants;
1206
+ run.mcpOAuth = mcp.oauth;
1207
+ }
1208
+ if (media !== undefined)
1209
+ run.media = media;
1210
+ runs.set(request.runId, run);
1211
+ }
1212
+ /**
1213
+ * The media a native run's prompt may attach: exactly what its launch profile declares to the
1214
+ * runtime (`fixedOpenCodeV2Provider`), so a reference the model cannot receive is refused before it
1215
+ * is sent. A mapped profile takes no reference at all.
1216
+ */
1217
+ function promptMedia(input) {
1218
+ if (input.toolProfile !== "native")
1219
+ return undefined;
1220
+ return {
1221
+ image: input.contextGeometry.imageInput === true,
1222
+ pdf: input.contextGeometry.documentInput === true,
1223
+ };
509
1224
  }
510
- async function prepare(input, bridge, runs, request, serviceHost) {
511
- if (serviceHost !== undefined && runs.has(request.runId))
512
- return { ok: false, reason: "host-preparation-unqualified" };
1225
+ async function prepare(input, bridge, runs, request) {
513
1226
  if (!verifiedProtocol(request.verification, input.portable.verification)) {
514
1227
  return { ok: false, reason: "target-attestation-failed" };
515
1228
  }
@@ -518,7 +1231,7 @@ async function prepare(input, bridge, runs, request, serviceHost) {
518
1231
  }
519
1232
  const runRoot = join(input.stateBaseRoot, request.runId);
520
1233
  try {
521
- return await materializePrepare(input, bridge, runs, request, runRoot, serviceHost);
1234
+ return await materializePrepare(input, bridge, runs, request, runRoot);
522
1235
  }
523
1236
  catch {
524
1237
  await disposeFailedPrepare(bridge, runRoot, request.runId, input.diagnostics, request.signal === undefined
@@ -527,17 +1240,93 @@ async function prepare(input, bridge, runs, request, serviceHost) {
527
1240
  return { ok: false, reason: "config-materialization-failed" };
528
1241
  }
529
1242
  }
530
- function preparedRun(runId, runRoot, workspaceRoot, password, configDigest, verification) {
1243
+ function preparedRun(runId, runRoot, workspaceRoot, password, configDigest, verification, mode) {
1244
+ return {
1245
+ runId,
1246
+ runRoot,
1247
+ workspaceRoot,
1248
+ password,
1249
+ configDigest,
1250
+ verification,
1251
+ mode,
1252
+ launchMode: mode,
1253
+ observedPermissionIds: new Set(),
1254
+ commandPresentation: createOpenCodeCommandPresentation(),
1255
+ initialTurnBaselineStable: false,
1256
+ ready: false,
1257
+ revertReady: false,
1258
+ };
1259
+ }
1260
+ /**
1261
+ * The adapter ingests each fresh, committed history signal once. The native profile's tools execute
1262
+ * in the original runtime, outside the facade, so its terminal tool signals are also the run's tool
1263
+ * evidence (#3873, #3897 review): they reach the facade's native settlement owner, which counts each
1264
+ * call once by its identity. Counted whether or not the safe-activity projection accepts the
1265
+ * signal; approval never reaches here, only the runtime's own completed or failed call.
1266
+ */
1267
+ function adapterSafeActivitySink(input, run) {
1268
+ const settle = nativeToolSettlementObserver(input, run);
1269
+ const activity = input.safeActivity;
1270
+ if (activity === undefined && settle === undefined)
1271
+ return {};
1272
+ return {
1273
+ safeActivitySink: {
1274
+ ingest: (signal) => {
1275
+ settle?.(signal);
1276
+ return activity?.ingest(displayActivitySignal(signal)) ?? true;
1277
+ },
1278
+ recordDrops: (count) => {
1279
+ activity?.recordDrops(count);
1280
+ },
1281
+ },
1282
+ };
1283
+ }
1284
+ /**
1285
+ * Native exit evidence is settled above, outside the closed display-signal schema. The timeline
1286
+ * keeps only the exit status, as a presentation fact, so a failed command says why it failed.
1287
+ */
1288
+ function displayActivitySignal(signal) {
1289
+ if (signal.kind !== "tool")
1290
+ return signal;
1291
+ const display = { ...signal };
1292
+ delete display.exitCode;
1293
+ delete display.exitStatusCheck;
1294
+ delete display.ownWorkdir;
1295
+ if (signal.exitCode === undefined)
1296
+ return display;
1297
+ return { ...display, presentation: { ...display.presentation, exitCode: signal.exitCode } };
1298
+ }
1299
+ /** The native tools whose completed call wrote the files its edit check named. */
1300
+ const NATIVE_FILE_WRITE_TOOLS = new Set(["edit", "write", "patch"]);
1301
+ function nativeToolSettlementObserver(input, run) {
1302
+ const settlement = input.toolProfile === "native" ? input.toolFacade.nativeSettlement : undefined;
1303
+ if (settlement === undefined)
1304
+ return undefined;
1305
+ return (signal) => {
1306
+ if (signal.kind !== "tool" || signal.messageId === undefined)
1307
+ return;
1308
+ if (signal.state !== "succeeded" && signal.state !== "failed")
1309
+ return;
1310
+ if (signal.state === "succeeded" && NATIVE_FILE_WRITE_TOOLS.has(signal.tool ?? "")) {
1311
+ const key = openCodeNativeCallKey(signal.messageId, signal.callId);
1312
+ recordOpenCodeEditSettled(run, key, input.activityLog);
1313
+ }
1314
+ settlement.settled({
1315
+ messageId: signal.messageId,
1316
+ callId: signal.callId,
1317
+ tool: signal.tool,
1318
+ state: signal.state,
1319
+ ...planNoteSettlement(run, signal.messageId, signal.callId),
1320
+ ...nativeExitEvidence(signal),
1321
+ });
1322
+ };
1323
+ }
1324
+ /** A finished shell call's exit status, the check it speaks for and where it ran (#3901). */
1325
+ function nativeExitEvidence(signal) {
531
1326
  return {
532
- runId,
533
- runRoot,
534
- workspaceRoot,
535
- password,
536
- configDigest,
537
- verification,
538
- observedPermissionIds: new Set(),
539
- initialTurnBaselineStable: false,
540
- ready: false,
1327
+ ...(signal.exitCode === undefined ? {} : { exitCode: signal.exitCode }),
1328
+ ...(signal.exitStatusCheck === undefined ? {} : { exitStatusCheck: signal.exitStatusCheck }),
1329
+ ...(signal.ownWorkdir === undefined ? {} : { ownWorkdir: signal.ownWorkdir }),
541
1330
  };
542
1331
  }
543
1332
  // eslint-disable-next-line max-lines-per-function -- handshake keeps attested client/adapter binding atomic.
@@ -545,8 +1334,6 @@ async function handshake(input, bridge, runs, request) {
545
1334
  const run = runs.get(request.runId);
546
1335
  if (run === undefined)
547
1336
  return { ok: false, reason: "preparation-missing" };
548
- if (run.serviceHostPrepared === true)
549
- return { ok: false, reason: "host-readiness-unqualified" };
550
1337
  run.onPermission = request.onPermission;
551
1338
  try {
552
1339
  const endpoint = parseOpenCodeV2ChildEndpoint(await request.startupOutput.nextLine(request.signal));
@@ -565,18 +1352,14 @@ async function handshake(input, bridge, runs, request) {
565
1352
  ...(input.activityLog === undefined ? {} : { activityLog: input.activityLog }),
566
1353
  readiness: readinessV2Ports(input, bridge, run, client, endpoint, request),
567
1354
  governedSink: input.governedEventSink,
568
- ...(input.safeActivity
569
- ? {
570
- safeActivitySink: {
571
- ingest: input.safeActivity.ingest,
572
- recordDrops: input.safeActivity.recordDrops,
573
- },
574
- }
575
- : {}),
1355
+ ...adapterSafeActivitySink(input, run),
576
1356
  control: {
577
- status: async (sessionId, signal) => {
578
- return (await v2SessionIsTerminal(client, sessionId, signal)) ? "terminal" : "activity";
579
- },
1357
+ status: createNativeTreeStatusPort({
1358
+ runId: run.runId,
1359
+ client,
1360
+ tree: (sessionId) => nativeSessionTree(run, sessionId),
1361
+ activityLog: input.activityLog,
1362
+ }),
580
1363
  },
581
1364
  safety: {
582
1365
  revokeAudiences: () => undefined,
@@ -595,10 +1378,14 @@ async function handshake(input, bridge, runs, request) {
595
1378
  await adapter.close();
596
1379
  return { ok: false, reason: "preparation-missing" };
597
1380
  }
1381
+ // #3903 AC3: a kept MCP credential reaches the attested runtime before its first turn.
1382
+ if (input.mcpCredentials !== undefined)
1383
+ await seedMcpCredentials(run, client, input.mcpCredentials, input.activityLog);
598
1384
  run.runtimeAdapter = adapter;
599
1385
  run.client = client;
600
1386
  run.sessionId = result.sessionId;
601
1387
  run.ready = true;
1388
+ run.revertReady = true;
602
1389
  return { ok: true };
603
1390
  }
604
1391
  catch {
@@ -618,6 +1405,7 @@ function readinessV2Ports(input, bridge, run, client, endpoint, request) {
618
1405
  runId: run.runId,
619
1406
  activityLog: input.activityLog,
620
1407
  captureMessages: input.safeActivity?.captureMessages,
1408
+ userMessageDisplay: run.commandPresentation.displayFor,
621
1409
  takeMergedEventCount: () => {
622
1410
  const merged = mergedEvents;
623
1411
  mergedEvents = 0;
@@ -629,9 +1417,10 @@ function readinessV2Ports(input, bridge, run, client, endpoint, request) {
629
1417
  verifiedTarget: {
630
1418
  executable: join(input.portable.resourceRoot, run.verification.executablePath),
631
1419
  attestationDigest: run.verification.protocolHandshakeDigest,
1420
+ version: run.verification.summary.upstreamVersion,
632
1421
  },
633
1422
  configDigest: run.configDigest,
634
- nativeContextConfigured: true,
1423
+ nativeContextProfile: input.toolProfile === "native" ? "native" : "mapped",
635
1424
  verifyTargetAttestation: () => Promise.resolve(true),
636
1425
  materialize: () => Promise.resolve(configMaterialized(run.runRoot)),
637
1426
  startupLine: () => {
@@ -642,12 +1431,17 @@ function readinessV2Ports(input, bridge, run, client, endpoint, request) {
642
1431
  ? authenticatedV2Health(client)
643
1432
  : unauthenticatedV2Health(input.fetch, endpoint, request.signal),
644
1433
  openApiDigest: async () => projectOpenCodeV2ProtocolSurface(await client.document()).digest,
1434
+ ...(input.toolProfile === "native"
1435
+ ? {
1436
+ policyPluginActive: () => awaitOpenCodeNativePlugins((signal) => client.plugins(signal), join(openCodeConfigDirectory(run.runRoot), "plugins"), request.signal),
1437
+ }
1438
+ : {}),
645
1439
  gatewayChallenge: () => challengeV2Gateway(input, run, client, fixedSessionId, request, startupRead),
646
1440
  toolFacadeChallenge: () => challengeToolFacade(input, bridge),
647
1441
  subscribe: async function* (signal) {
648
1442
  // A reconnect opens another event stream for the same run, not another sidecar session.
649
1443
  // Keep the creation promise so concurrent subscriptions cannot create competing sessions.
650
- sessionCreation ??= createAndEchoV2Session(client, run.workspaceRoot, request.signal);
1444
+ sessionCreation ??= bindRunSession(input, run, client, request.signal);
651
1445
  fixedSessionId = await sessionCreation;
652
1446
  streamCount += 1;
653
1447
  if (fixedSessionId !== "")
@@ -679,7 +1473,11 @@ function readinessV2Ports(input, bridge, run, client, endpoint, request) {
679
1473
  let messages = [];
680
1474
  try {
681
1475
  messages = await client.messages(fixedSessionId, signal);
682
- const events = history.project(fixedSessionId, messages, checkpoints[fixedSessionId]);
1476
+ // A continued session already holds the messages of earlier runs, which Coding History has
1477
+ // and the timeline must not show again: the projection starts after them.
1478
+ const ownMessages = withoutBaseline(messages, run.continuation?.baselineIds);
1479
+ const events = history.project(fixedSessionId, ownMessages, checkpoints[fixedSessionId]);
1480
+ observeNativeStepChanges(input, run, ownMessages);
683
1481
  staged.clear();
684
1482
  for (const event of events) {
685
1483
  const safe = history.takeSignal(event);
@@ -714,6 +1512,9 @@ function readinessV2Ports(input, bridge, run, client, endpoint, request) {
714
1512
  function v2ExecutionState(type) {
715
1513
  if (type === "session.execution.started")
716
1514
  return "activity";
1515
+ // The runtime ends a turn this way when a human refuses a question: no idle message follows.
1516
+ if (type === "session.execution.interrupted")
1517
+ return "interrupted";
717
1518
  if (type === "session.execution.succeeded" ||
718
1519
  type === "session.execution.failed" ||
719
1520
  type === "session.execution.cancelled")
@@ -850,7 +1651,7 @@ function pullSyncHint(pump) {
850
1651
  };
851
1652
  void pump.source.next().then(onNext).then(undefined, settle);
852
1653
  }
853
- function v2SyncHint(event, fixedSessionId, onQuestionObserved) {
1654
+ export function v2SyncHint(event, fixedSessionId, onQuestionObserved) {
854
1655
  const data = v2Record(event.data);
855
1656
  if (event.type === "form.created" &&
856
1657
  typeof event.id === "string" &&
@@ -903,6 +1704,71 @@ function recordOpenCodeV2HistoryFailure(diagnostics, runId, error) {
903
1704
  ...(detail.causeChain === undefined ? {} : { causeChain: detail.causeChain }),
904
1705
  });
905
1706
  }
1707
+ /**
1708
+ * The session a run works in: its own new one, or, when its database was seeded from a task's
1709
+ * retained entry, the retained session resumed or forked (`bindContinuedSession`). A continued
1710
+ * session that cannot be bound to this run's workspace fails the run's readiness: it is never
1711
+ * replaced by a fresh one inside a database that still holds the other.
1712
+ */
1713
+ async function bindRunSession(input, run, client, signal) {
1714
+ const continuation = run.continuation;
1715
+ const context = continuationContext(input);
1716
+ if (continuation === undefined || context === undefined) {
1717
+ return createAndEchoV2Session(client, run.workspaceRoot, signal);
1718
+ }
1719
+ const line = continuedSessionLine(context, run, continuation);
1720
+ let bound;
1721
+ try {
1722
+ bound = await bindContinuedSession(client, continuation, run.workspaceRoot, signal);
1723
+ }
1724
+ catch (error) {
1725
+ // Not a refusal (the runtime could not be asked, or the run was cancelled): the readiness fails
1726
+ // with the error itself, and the continuity line says the session was never bound.
1727
+ recordSessionContinuity(input.activityLog, {
1728
+ ...line,
1729
+ outcome: "failed",
1730
+ reason: "session-mismatch",
1731
+ error,
1732
+ });
1733
+ throw error;
1734
+ }
1735
+ const forked = continuation.intent.kind === "fork";
1736
+ if (!bound.ok) {
1737
+ // An entry the runtime does not see the way its manifest says can never be used again.
1738
+ if (bound.reason === "session-mismatch")
1739
+ context.service.store?.remove(continuation.taskId);
1740
+ recordSessionContinuity(input.activityLog, {
1741
+ ...line,
1742
+ outcome: "failed",
1743
+ reason: bound.reason,
1744
+ ...(bound.error === undefined ? {} : { error: bound.error }),
1745
+ });
1746
+ return "";
1747
+ }
1748
+ continuation.baselineIds = bound.baselineIds;
1749
+ context.service.settle(run.runId, { kind: forked ? "forked" : "resumed" });
1750
+ recordSessionContinuity(input.activityLog, {
1751
+ ...line,
1752
+ outcome: forked ? "forked" : "resumed",
1753
+ databaseBytes: continuation.databaseBytes,
1754
+ messageCount: bound.baselineIds.size,
1755
+ ageMs: continuation.ageMs,
1756
+ });
1757
+ return bound.sessionId;
1758
+ }
1759
+ function continuedSessionLine(context, run, continuation) {
1760
+ const intent = continuation.intent;
1761
+ const taskId = intent.kind === "resume" ? intent.taskId : context.service.taskOfRun(run.runId);
1762
+ return {
1763
+ runId: run.runId,
1764
+ action: intent.kind,
1765
+ ...(taskId === undefined ? {} : { taskId }),
1766
+ ...(intent.kind === "fork"
1767
+ ? { sourceTaskId: intent.sourceTaskId, boundary: intent.boundary.kind }
1768
+ : {}),
1769
+ ...(continuation.sourceDirectory === undefined ? {} : { relocated: true }),
1770
+ };
1771
+ }
906
1772
  async function createAndEchoV2Session(client, directory, signal) {
907
1773
  const created = await client.createSession(directory, signal);
908
1774
  const id = created.id;
@@ -956,6 +1822,41 @@ async function challengeV2Gateway(input, run, client, sessionId, request, startu
956
1822
  return false;
957
1823
  }
958
1824
  const signal = request.signal ?? AbortSignal.timeout(request.timeoutMs);
1825
+ if (run.continuation === undefined) {
1826
+ return runGatewayChallenge(input, run, client, sessionId, signal);
1827
+ }
1828
+ return challengeInScratchSession(input, run, client, signal);
1829
+ }
1830
+ /**
1831
+ * The gateway recognises its readiness probe only as a request that holds nothing but the probe, so
1832
+ * a continued run, whose session holds a conversation, proves the route in a scratch session of its
1833
+ * own database and removes it again: the continued session never carries a handshake turn, and the
1834
+ * run's database ends up with exactly the one session the run works in.
1835
+ */
1836
+ async function challengeInScratchSession(input, run, client, signal) {
1837
+ let scratchId;
1838
+ try {
1839
+ const created = await client.createSession(run.workspaceRoot, signal);
1840
+ if (!validCreatedSession(created.id, created.location, run.workspaceRoot)) {
1841
+ throw new Error("opencode-v2-session-invalid");
1842
+ }
1843
+ scratchId = created.id;
1844
+ }
1845
+ catch {
1846
+ recordGatewayChallengeFailure(input.diagnostics, run.runId, "scratch-session-failed");
1847
+ return false;
1848
+ }
1849
+ const verified = await runGatewayChallenge(input, run, client, scratchId, signal);
1850
+ try {
1851
+ await client.removeSession(scratchId, signal);
1852
+ return verified;
1853
+ }
1854
+ catch {
1855
+ recordGatewayChallengeFailure(input.diagnostics, run.runId, "scratch-session-failed");
1856
+ return false;
1857
+ }
1858
+ }
1859
+ async function runGatewayChallenge(input, run, client, sessionId, signal) {
959
1860
  const observed = input.gatewayReadiness.waitForObservedRequest(run.runId, signal);
960
1861
  let verified = false;
961
1862
  try {
@@ -1040,14 +1941,16 @@ async function challengeToolFacade(input, bridge) {
1040
1941
  }
1041
1942
  }
1042
1943
  function verifiedProtocol(candidate, trusted) {
1944
+ // The discovered runtime's approved version selects its own producer-derived digests (#3908).
1945
+ const pin = openCodeRuntimeVersionPin(candidate.summary.upstreamVersion);
1043
1946
  return (candidate === trusted &&
1044
1947
  candidate.summary.status === "verified" &&
1045
- candidate.summary.upstreamVersion === OPENCODE_PINNED_VERSION &&
1948
+ pin !== undefined &&
1046
1949
  candidate.availability.protocolSchemaVerified &&
1047
- candidate.protocolSchemaRawSha256 === PINNED_RAW_SCHEMA_SHA256 &&
1950
+ candidate.protocolSchemaRawSha256 === pin.rawSchemaSha256 &&
1048
1951
  runtimeField(candidate, "protocolHandshakeAlgorithm") ===
1049
1952
  OPEN_CODE_V2_PROTOCOL_SURFACE_ALGORITHM &&
1050
- DIGEST.test(candidate.protocolHandshakeDigest));
1953
+ candidate.protocolHandshakeDigest === pin.protocolSurfaceSha256);
1051
1954
  }
1052
1955
  function runtimeField(value, key) {
1053
1956
  return typeof value === "object" && value !== null
@@ -1067,16 +1970,19 @@ function createPrivateState(runRoot) {
1067
1970
  mkdirSync(path, { recursive: true, mode: 0o700 });
1068
1971
  chmodSync(path, 0o700);
1069
1972
  }
1973
+ // The plan directory exists before launch: its kernel rule keeps the directories above it
1974
+ // from being created or replaced while the run is alive.
1070
1975
  for (const path of [
1071
- join(runRoot, "config", "opencode"),
1072
- join(runRoot, "config", "opencode", "plugins"),
1976
+ openCodeConfigDirectory(runRoot),
1977
+ join(openCodeConfigDirectory(runRoot), "plugins"),
1978
+ openCodePlanDirectory(runRoot),
1073
1979
  ]) {
1074
1980
  mkdirSync(path, { recursive: true, mode: 0o700 });
1075
1981
  chmodSync(path, 0o700);
1076
1982
  }
1077
1983
  }
1078
1984
  function materialize(runRoot, config, pluginSources) {
1079
- const discoveryRoot = join(runRoot, "config", "opencode");
1985
+ const discoveryRoot = openCodeConfigDirectory(runRoot);
1080
1986
  writePrivateFile(join(discoveryRoot, "opencode.json"), config);
1081
1987
  for (const [name, source] of Object.entries(pluginSources)) {
1082
1988
  writePrivateFile(join(discoveryRoot, "plugins", `${name}.ts`), source);
@@ -1088,8 +1994,8 @@ function writePrivateFile(path, value) {
1088
1994
  }
1089
1995
  function configMaterialized(runRoot) {
1090
1996
  try {
1091
- return (statSync(join(runRoot, "config", "opencode", "opencode.json")).isFile() &&
1092
- readFileSync(join(runRoot, "config", "opencode", "opencode.json"), "utf8").length > 0);
1997
+ return (statSync(join(openCodeConfigDirectory(runRoot), "opencode.json")).isFile() &&
1998
+ readFileSync(join(openCodeConfigDirectory(runRoot), "opencode.json"), "utf8").length > 0);
1093
1999
  }
1094
2000
  catch {
1095
2001
  return false;
@@ -1417,19 +2323,425 @@ function handleDirectToolRequest(active, deps, gate, input, context) {
1417
2323
  const read = nativeReadTransportValue(input.body);
1418
2324
  if (read !== undefined)
1419
2325
  return handleNativeReadTransport(read, input.signal, deps, runs, nativeRead);
1420
- const native = nativeInitializationValue(input.body);
1421
- if (native !== undefined)
1422
- return handleNativeInitialization(native, input.signal, deps, gate, runs);
1423
2326
  const permission = parseV2PermissionRequest(input.body);
1424
2327
  if (permission !== undefined) {
1425
2328
  return handleV2PermissionRequest(permission, input.signal, deps, approvals, runs);
1426
2329
  }
2330
+ const nativePolicy = parseNativePolicyBody(input.body);
2331
+ if (nativePolicy !== undefined) {
2332
+ return handleNativePolicyRequest(nativePolicy, input.signal, deps, approvals, runs);
2333
+ }
2334
+ const webSearch = nativeWebSearchTransportValue(input.body);
2335
+ if (webSearch !== undefined) {
2336
+ const run = runs.get(webSearch.runId);
2337
+ return answerNativeWebSearch(deps.nativeWebSearch, webSearch, run?.ready === true && run.mode === "autonomous-delivery", input.signal);
2338
+ }
1427
2339
  const admission = gate.admit(toolBridgeRequestDeadlineMs(gate.limits.requestDeadlineMs, input.body));
1428
2340
  if (admission === undefined)
1429
2341
  return Promise.resolve({ status: 429, body: "" });
1430
2342
  const detachExternalAbort = bindExternalAbort(input.signal, admission);
1431
2343
  return executeToolRequest(deps, input.headers, input.body, admission).finally(detachExternalAbort);
1432
2344
  }
2345
+ function parseNativePolicyBody(body) {
2346
+ if (!validJson(body))
2347
+ return undefined;
2348
+ const parsed = JSON.parse(body);
2349
+ return v2Record(parsed)?.action === OPENCODE_NATIVE_POLICY_ACTION
2350
+ ? parseOpenCodeNativePolicyRequest(parsed)
2351
+ : undefined;
2352
+ }
2353
+ /**
2354
+ * The native permission hook's question (#3897): what is the final effect of this evaluated
2355
+ * OpenCode action for this run? The server-owned policy answers allow or deny at once, or puts the
2356
+ * action to the human through the run's approval lane and answers with the decision. Every answer
2357
+ * leaves a body-free line; an unready run, a foreign session or a malformed ask is refused.
2358
+ */
2359
+ async function handleNativePolicyRequest(request, signal, deps, approvals, runs) {
2360
+ const run = runs.get(request.runId);
2361
+ const sessionRelation = run?.ready === true
2362
+ ? await nativeSessionRelation(run, request.sessionID, signal, deps.diagnostics)
2363
+ : undefined;
2364
+ if (run?.ready !== true || sessionRelation === undefined) {
2365
+ return { status: 403, body: "", rejection: "approval-unavailable" };
2366
+ }
2367
+ const decided = decideOpenCodeNativePolicy({
2368
+ mode: run.mode,
2369
+ workspaceRoot: run.workspaceRoot,
2370
+ planRoot: openCodePlanDirectory(run.runRoot),
2371
+ request,
2372
+ nowMs: Date.now(),
2373
+ ...(run.mcp === undefined ? {} : { mcp: run.mcp }),
2374
+ ...(deps.externalReadRoots === undefined ? {} : { externalRoots: deps.externalReadRoots }),
2375
+ webSearch: deps.nativeWebSearch?.admitted === true,
2376
+ });
2377
+ const decision = admittedSessionMove(run, request, decided);
2378
+ const settled = await settleNativePolicyOutcome(run, decision, request, signal, deps, {
2379
+ approvals,
2380
+ sessionRelation,
2381
+ });
2382
+ return answerNativePolicy(run, request, decision, { ...settled, sessionRelation }, deps);
2383
+ }
2384
+ // #3903 AC3: the provider may search exactly the query the policy just allowed for this run.
2385
+ function grantAllowedWebSearch(run, request, outcome, deps) {
2386
+ const [query] = request.resources;
2387
+ if (request.permission === "websearch" && outcome === "allowed" && query !== undefined)
2388
+ deps.nativeWebSearch?.grant(run.runId, query);
2389
+ }
2390
+ // The settled decision becomes the hook's answer and its one body-free line; an approved
2391
+ // `worktree_create` is answered with the managed owner's result instead (#3903 AC4).
2392
+ async function answerNativePolicy(run, request, decision, settled, deps) {
2393
+ const { outcome } = settled;
2394
+ grantAllowedWebSearch(run, request, outcome, deps);
2395
+ const worktree = await nativeWorktreeOutcome(run, request, outcome, deps);
2396
+ if ((outcome !== "allowed" && outcome !== "approved") || worktree !== undefined)
2397
+ noteNativeCallRefused(deps, request);
2398
+ recordOpenCodeNativePolicyDecision(deps.activityLog, run.runId, {
2399
+ mode: run.mode,
2400
+ request,
2401
+ decision,
2402
+ outcome,
2403
+ sessionRelation: settled.sessionRelation,
2404
+ ...(settled.authority === undefined ? {} : { authority: settled.authority }),
2405
+ ...(worktree === undefined ? {} : { worktree: worktree.disposition }),
2406
+ });
2407
+ return worktree === undefined
2408
+ ? nativePolicyResult(outcome, decision)
2409
+ : nativePolicyResponse("deny", worktree.message);
2410
+ }
2411
+ /**
2412
+ * An approved Code Mode `worktree_create` is provisioned by Keiko's managed task-workspace owner
2413
+ * (#3903 AC4); the producer's own unmanaged worktree call is always blocked, and the model reads
2414
+ * the managed result as its message. `undefined` for every other action and for a refused one.
2415
+ */
2416
+ async function nativeWorktreeOutcome(run, request, outcome, deps) {
2417
+ if (request.permission !== OPENCODE_CODE_MODE_WORKTREE_CREATE)
2418
+ return undefined;
2419
+ if (outcome !== "allowed" && outcome !== "approved")
2420
+ return undefined;
2421
+ const [name] = request.resources;
2422
+ const port = deps.nativeWorktrees;
2423
+ return nativeWorktreeAnswer(port === undefined || name === undefined
2424
+ ? { ok: false, reason: "unavailable" }
2425
+ : await provisionedWorktree(port, run, name, deps.diagnostics));
2426
+ }
2427
+ // The managed owner records its classified failures itself; an unclassified one is recorded here,
2428
+ // body-free under the run's correlation, and still refuses the request.
2429
+ async function provisionedWorktree(port, run, name, diagnostics) {
2430
+ try {
2431
+ return await port.provision({
2432
+ runId: run.runId,
2433
+ workspaceRoot: run.workspaceRoot,
2434
+ name,
2435
+ correlationId: run.runId,
2436
+ });
2437
+ }
2438
+ catch (error) {
2439
+ emitServerDiagnostic(diagnostics, {
2440
+ correlationId: run.runId,
2441
+ timestamp: new Date().toISOString(),
2442
+ operation: "coding-runtime.tool-bridge",
2443
+ source: "opencode-runtime-composition.native-worktree",
2444
+ errorClass: contentFreeErrorClass(error),
2445
+ message: "native-worktree-provision-failed",
2446
+ });
2447
+ return { ok: false, reason: "provision-failed" };
2448
+ }
2449
+ }
2450
+ // A refused call ends as a failed tool in the runtime's history; the run's effort evidence reads it
2451
+ // as a refusal rather than a failure of the tool itself.
2452
+ function noteNativeCallRefused(deps, request) {
2453
+ if (request.source === undefined)
2454
+ return;
2455
+ deps.facade.nativeSettlement?.refused({
2456
+ messageId: request.source.messageID,
2457
+ callId: request.source.id,
2458
+ });
2459
+ }
2460
+ function nativePolicyResult(outcome, decision) {
2461
+ if (outcome === "allowed" || outcome === "approved")
2462
+ return nativePolicyResponse("allow");
2463
+ if (outcome === "authority-refused" || outcome === "cancelled")
2464
+ return nativePolicyResponse("deny", NATIVE_AUTHORITY_REFUSED_MESSAGE);
2465
+ if (decision.effect === "deny")
2466
+ return nativePolicyResponse("deny", decision.message);
2467
+ return nativePolicyResponse("deny", humanDecisionFeedback(outcome === "denied" ? "denied" : "expired"));
2468
+ }
2469
+ const NATIVE_AUTHORITY_REFUSED_MESSAGE = "Keiko refused this action: the run's authority is no longer valid or its budget is exhausted.";
2470
+ /**
2471
+ * The policy's answer, revalidated against live authority before an effect is released (#3897
2472
+ * review): an already-aborted ask is cancelled, and an allowed or human-approved action is
2473
+ * admitted through the facade's native-effect owner, which authenticates the capability, requires
2474
+ * the run to be running on its tree binding, checks the envelope's action classes and charges the
2475
+ * run's tool-call budget once per original tool invocation, reads included. A wiring without that
2476
+ * owner refuses every effect.
2477
+ */
2478
+ async function settleNativePolicyOutcome(run, decision, request, signal, deps, context) {
2479
+ const { approvals, sessionRelation } = context;
2480
+ if (signal?.aborted === true)
2481
+ return { outcome: "cancelled" };
2482
+ if (decision.effect === "deny")
2483
+ return { outcome: decision.reason };
2484
+ const outcome = decision.effect === "ask"
2485
+ ? await nativePolicyHumanDecision(run, decision, signal, deps, approvals)
2486
+ : "allowed";
2487
+ noteDeniedVerification(deps, request, outcome);
2488
+ if (outcome !== "allowed" && outcome !== "approved")
2489
+ return { outcome };
2490
+ const admission = nativeEffectAdmission(deps, decision.classification.actionClass, request, signal);
2491
+ if (!admission.ok)
2492
+ return { outcome: "authority-refused", authority: { reason: admission.reason } };
2493
+ noteAdmittedEditTargets(run, request);
2494
+ noteAdmittedEditEvidence(run, request, decision.classification, { deps, sessionRelation });
2495
+ noteAdmittedVerification(run, deps, request);
2496
+ return { outcome, authority: { charge: admission.charge } };
2497
+ }
2498
+ /** A human refused a project check: the run's verification is blocked, as for the governed one. */
2499
+ function noteDeniedVerification(deps, request, outcome) {
2500
+ if (outcome === "denied" && nativeVerificationKind(request) !== undefined)
2501
+ deps.facade.nativeSettlement?.verificationDenied?.();
2502
+ }
2503
+ /** The project check an admitted native shell call runs, if it is one (#3901). */
2504
+ function nativeVerificationKind(request) {
2505
+ return request.permission === "shell"
2506
+ ? openCodeNativeVerificationKind(request.resources)
2507
+ : undefined;
2508
+ }
2509
+ /** An admitted verification command, so its exit status can become the run's evidence (#3901). */
2510
+ function noteAdmittedVerification(run, deps, request) {
2511
+ const kind = nativeVerificationKind(request);
2512
+ if (kind === undefined || request.source === undefined)
2513
+ return;
2514
+ run.verificationCalls ??= new Set();
2515
+ rememberKey(run.verificationCalls, openCodeNativeCallKey(request.source.messageID, request.source.id));
2516
+ deps.facade.nativeSettlement?.verificationAdmitted?.({ messageId: request.source.messageID, callId: request.source.id }, kind, request.resources);
2517
+ }
2518
+ /** The most admitted plan-note edits a run remembers until the runtime reports them settled. */
2519
+ const PLAN_NOTE_EDITS_MAX = 256;
2520
+ /**
2521
+ * What an admitted native edit means for the run's verification evidence (#3901). The plan agent's
2522
+ * notes in the run's private plan directory are planning: the policy classifies that edit as a
2523
+ * read, and its settlement does not count as a workspace edit. A workspace edit of a child session
2524
+ * is settled on the child, whose history the run does not read, so it counts from its admission.
2525
+ */
2526
+ function noteAdmittedEditEvidence(run, request, classification, context) {
2527
+ if (request.permission !== "edit" || request.source === undefined)
2528
+ return;
2529
+ if (classification.actionClass === "workspace-read") {
2530
+ rememberPlanNoteEdit(run, openCodeNativeCallKey(request.source.messageID, request.source.id));
2531
+ return;
2532
+ }
2533
+ if (context.sessionRelation === "child")
2534
+ context.deps.facade.nativeSettlement?.unsettledEdit?.();
2535
+ }
2536
+ function rememberPlanNoteEdit(run, key) {
2537
+ run.planNoteEdits ??= new Set();
2538
+ const notes = run.planNoteEdits;
2539
+ notes.add(key);
2540
+ if (notes.size > PLAN_NOTE_EDITS_MAX)
2541
+ notes.delete(notes.values().next().value ?? "");
2542
+ }
2543
+ /** A settled plan-note edit is no workspace edit; every other call keeps its tool's meaning. */
2544
+ function planNoteSettlement(run, messageId, callId) {
2545
+ return run.planNoteEdits?.delete(openCodeNativeCallKey(messageId, callId)) === true
2546
+ ? { workspaceEdit: false }
2547
+ : {};
2548
+ }
2549
+ /** An admitted native edit's targets, so its settlement can record what the turn itself wrote. */
2550
+ function noteAdmittedEditTargets(run, request) {
2551
+ if (request.source === undefined)
2552
+ return;
2553
+ const key = openCodeNativeCallKey(request.source.messageID, request.source.id);
2554
+ const files = openCodeNativeEditFiles(request, run.workspaceRoot);
2555
+ noteOpenCodeEditTargets(run, key, files);
2556
+ if (files.length === 0)
2557
+ return;
2558
+ run.editTargetsByCall ??= new Map();
2559
+ const targets = run.editTargetsByCall;
2560
+ targets.delete(key);
2561
+ targets.set(key, files);
2562
+ if (targets.size > STEP_EVIDENCE_MAX)
2563
+ targets.delete(targets.keys().next().value ?? "");
2564
+ }
2565
+ /** The most call and step facts a run remembers for its verification evidence. */
2566
+ const STEP_EVIDENCE_MAX = 1024;
2567
+ function rememberKey(keys, key) {
2568
+ keys.delete(key);
2569
+ keys.add(key);
2570
+ if (keys.size > STEP_EVIDENCE_MAX)
2571
+ keys.delete(keys.values().next().value ?? "");
2572
+ }
2573
+ /**
2574
+ * The workspace files a finished native step changed, weighed against the run's verification
2575
+ * evidence once per step (#3901). A file a native edit of the same step named is that edit's, which
2576
+ * its own settlement already counted; anything else (a shell command's or a child session's writes)
2577
+ * is a change no settlement reported, so it is the run's edit and a check must follow it. A step of
2578
+ * project checks alone changed only what the checks themselves write. The step is weighed when the
2579
+ * history shows it finished, before that read's tool settlements reach the ledger, so a check in a
2580
+ * later step still proves it.
2581
+ */
2582
+ function observeNativeStepChanges(input, run, messages) {
2583
+ const settlement = input.toolProfile === "native" ? input.toolFacade.nativeSettlement : undefined;
2584
+ if (settlement?.unsettledEdit === undefined)
2585
+ return;
2586
+ run.seenStepChanges ??= new Set();
2587
+ const seen = run.seenStepChanges;
2588
+ for (const change of openCodeV2StepChanges(messages)) {
2589
+ if (seen.has(change.messageId))
2590
+ continue;
2591
+ rememberKey(seen, change.messageId);
2592
+ const weighed = weighStepChange(run, change);
2593
+ if (weighed.outcome === "counted")
2594
+ settlement.unsettledEdit();
2595
+ recordNativeStepChanged(input.activityLog, run.runId, change, weighed);
2596
+ }
2597
+ }
2598
+ function weighStepChange(run, change) {
2599
+ const keys = change.callIds.map((callId) => openCodeNativeCallKey(change.messageId, callId));
2600
+ if (keys.length > 0 && keys.every((key) => run.verificationCalls?.has(key) === true))
2601
+ return { outcome: "verification-only", uncoveredCount: 0 };
2602
+ const covered = new Set(keys.flatMap((key) => run.editTargetsByCall?.get(key) ?? []));
2603
+ const uncoveredCount = change.files.filter((file) => !covered.has(file)).length + (change.truncated ? 1 : 0);
2604
+ return { outcome: uncoveredCount > 0 ? "counted" : "covered", uncoveredCount };
2605
+ }
2606
+ const NATIVE_STEP_CHANGED_OPERATION = defineActivityLogOperation({
2607
+ contractKind: "activity-log-operation",
2608
+ schemaVersion: 1,
2609
+ op: "coding-runtime.native-step.changed",
2610
+ category: "process",
2611
+ owner: "keiko-server",
2612
+ emitter: "coding-runtime.opencodeRuntimeComposition.recordNativeStepChanged",
2613
+ fields: {
2614
+ runId: { type: "string", dataClass: "opaque-id", required: true, maxLength: 128 },
2615
+ outcome: {
2616
+ type: "string",
2617
+ dataClass: "closed-enum",
2618
+ required: true,
2619
+ values: ["counted", "covered", "verification-only"],
2620
+ },
2621
+ fileCount: { type: "integer", dataClass: "count", required: true },
2622
+ uncoveredCount: { type: "integer", dataClass: "count", required: true },
2623
+ callCount: { type: "integer", dataClass: "count", required: true },
2624
+ fileList: {
2625
+ type: "string",
2626
+ dataClass: "closed-enum",
2627
+ required: true,
2628
+ values: ["complete", "truncated"],
2629
+ },
2630
+ },
2631
+ causal: "correlation",
2632
+ lifecycle: "state",
2633
+ analyzerProjection: "timeline",
2634
+ failureClasses: ["coding-runtime-native-policy"],
2635
+ proofIds: ["coding-runtime.native-step.changed.emitted-line"],
2636
+ releaseImpact: "patch",
2637
+ });
2638
+ /** One body-free line per weighed step: what it changed and whether it counts as the run's edit. */
2639
+ function recordNativeStepChanged(activityLog, runId, change, weighed) {
2640
+ (activityLog ?? processServerLogSink()).write(activityLogEvent(NATIVE_STEP_CHANGED_OPERATION, { correlationId: runId }, {
2641
+ runId,
2642
+ outcome: weighed.outcome,
2643
+ fileCount: change.files.length,
2644
+ uncoveredCount: weighed.uncoveredCount,
2645
+ callCount: change.callIds.length,
2646
+ fileList: change.truncated ? "truncated" : "complete",
2647
+ }));
2648
+ }
2649
+ function nativeEffectAdmission(deps, actionClass, request, signal) {
2650
+ if (signal?.aborted === true)
2651
+ return { ok: false, reason: "unavailable" };
2652
+ const { source, patchBytes } = request;
2653
+ return (deps.facade.nativeEffect?.admit({
2654
+ capability: deps.capability,
2655
+ actionClass,
2656
+ ...(patchBytes === undefined ? {} : { patchBytes }),
2657
+ ...(source === undefined
2658
+ ? {}
2659
+ : {
2660
+ invocation: {
2661
+ sessionId: request.sessionID,
2662
+ messageId: source.messageID,
2663
+ callId: source.id,
2664
+ },
2665
+ }),
2666
+ }) ?? { ok: false, reason: "unavailable" });
2667
+ }
2668
+ /**
2669
+ * Which native session asked: the run's own session, or a child session the original runtime
2670
+ * created under it (a subagent, #3897 review). The run's session tree decides
2671
+ * (`opencodeNativeSessionTree.ts`): a child is admitted once its `parentID` chain reaches the run's
2672
+ * session within a bounded depth and every session on the chain is located in the run's workspace;
2673
+ * the proof is read from the runtime's own session list and cached. Any other session, a failed
2674
+ * read or a full cache refuses the ask.
2675
+ */
2676
+ async function nativeSessionRelation(run, sessionID, signal, diagnostics) {
2677
+ if (run.sessionId === undefined || run.client === undefined)
2678
+ return undefined;
2679
+ try {
2680
+ return await classifyNativeSession(run.client, nativeSessionTree(run, run.sessionId), sessionID, signal);
2681
+ }
2682
+ catch (error) {
2683
+ // A failed read proves no ancestry, so the ask is refused; the failure itself is recorded
2684
+ // body-free under the run's correlation.
2685
+ emitServerDiagnostic(diagnostics, {
2686
+ correlationId: run.runId,
2687
+ timestamp: new Date().toISOString(),
2688
+ operation: "coding-runtime.tool-bridge",
2689
+ source: "opencode-runtime-composition.native-session-ancestry",
2690
+ errorClass: contentFreeErrorClass(error),
2691
+ message: "native-session-ancestry-failed",
2692
+ });
2693
+ return undefined;
2694
+ }
2695
+ }
2696
+ /** The run's session tree, sharing the run's admission cache of proven children. */
2697
+ function nativeSessionTree(run, sessionId) {
2698
+ run.childSessionIds ??= new Set();
2699
+ run.sessionLocations ??= new Set();
2700
+ return {
2701
+ sessionId,
2702
+ workspaceRoot: run.workspaceRoot,
2703
+ children: run.childSessionIds,
2704
+ locations: run.sessionLocations,
2705
+ };
2706
+ }
2707
+ // An allowed session move widens the run's tree to its directory before the move happens, so the
2708
+ // session's later children and jobs stay the run's (#3903 AC4); a tree at its bound refuses it.
2709
+ function admittedSessionMove(run, request, decision) {
2710
+ const directory = request.resources[0];
2711
+ if (decision.effect !== "allow" || request.permission !== OPENCODE_CODE_MODE_SESSION_MOVE)
2712
+ return decision;
2713
+ if (directory !== undefined &&
2714
+ run.sessionId !== undefined &&
2715
+ admitNativeSessionLocation(nativeSessionTree(run, run.sessionId), directory))
2716
+ return decision;
2717
+ return {
2718
+ effect: "deny",
2719
+ reason: "unsupported-action",
2720
+ message: "Keiko refused this action: the run already follows its bound of working directories. Keep working in one of them.",
2721
+ };
2722
+ }
2723
+ export { nativeSessionDescendsFromRun } from "./opencodeNativeSessionTree.js";
2724
+ // The ask goes to the human through the run's existing approval lane; the tool call it ends is
2725
+ // settled with the human's verdict like a governed ask (#3612).
2726
+ async function nativePolicyHumanDecision(run, decision, signal, deps, approvals) {
2727
+ if (run.onPermission === undefined || signal?.aborted === true)
2728
+ return "unavailable";
2729
+ const human = await approvals.requestNative({
2730
+ runId: run.runId,
2731
+ event: decision.event,
2732
+ actionId: decision.actionId,
2733
+ onPermission: run.onPermission,
2734
+ signal: signal ?? new AbortController().signal,
2735
+ });
2736
+ settleDecidedTool(deps.settleTool, human);
2737
+ return human.outcome;
2738
+ }
2739
+ function nativePolicyResponse(effect, message) {
2740
+ return {
2741
+ status: 200,
2742
+ body: JSON.stringify(message === undefined ? { effect } : { effect, message }),
2743
+ };
2744
+ }
1433
2745
  function parseV2PermissionRequest(body) {
1434
2746
  if (!validJson(body))
1435
2747
  return undefined;
@@ -1976,6 +3288,9 @@ async function executeBridgeInitialization(deps, producer, initialize, admission
1976
3288
  return { ok: false, reason: "initialization-failed" };
1977
3289
  }
1978
3290
  }
3291
+ function nativeWebSearchTransportValue(body) {
3292
+ return validJson(body) ? parseNativeWebSearchRequest(JSON.parse(body)) : undefined;
3293
+ }
1979
3294
  function nativeReadTransportValue(body) {
1980
3295
  if (!validJson(body))
1981
3296
  return undefined;
@@ -2094,20 +3409,20 @@ function nativeReadRangeForPhase(phase, range) {
2094
3409
  async function handleNativeReadTransport(value, signal, deps, runs, producer) {
2095
3410
  const packet = copyNativeReadTransportPacket(value);
2096
3411
  if (packet === undefined)
2097
- return nativeInitializationRefusal("invalid-request", 400);
3412
+ return nativeTransportRefusal("invalid-request", 400);
2098
3413
  const run = runs.get(packet.runId);
2099
3414
  try {
2100
3415
  if (producer?.fileIO === undefined || !nativeReadRunCurrent(deps, run))
2101
- return nativeInitializationRefusal("dispatch-refused");
3416
+ return nativeTransportRefusal("dispatch-refused");
2102
3417
  if (signal?.aborted === true)
2103
- return nativeInitializationRefusal("cancelled");
3418
+ return nativeTransportRefusal("cancelled");
2104
3419
  return await dispatchNativeReadTransport(packet, run, producer, signal, deps);
2105
3420
  }
2106
3421
  catch (error) {
2107
3422
  if (producer !== undefined && packet.phase !== "begin")
2108
3423
  void producer.close(packet.identity, "cancelled");
2109
3424
  emitFacadeFailureDiagnostic(deps.diagnostics, nativeReadPacketActionId(packet), error);
2110
- return nativeInitializationRefusal("dispatch-refused", 502);
3425
+ return nativeTransportRefusal("dispatch-refused", 502);
2111
3426
  }
2112
3427
  }
2113
3428
  function nativeReadPacketActionId(packet) {
@@ -2125,7 +3440,7 @@ function nativeReadRunCurrent(deps, run) {
2125
3440
  }
2126
3441
  async function beginNativeReadTransport(packet, run, producer, signal, deps) {
2127
3442
  if (packet.context.sessionID !== run.sessionId)
2128
- return nativeInitializationRefusal("dispatch-refused");
3443
+ return nativeTransportRefusal("dispatch-refused");
2129
3444
  const body = JSON.stringify({
2130
3445
  action: "read",
2131
3446
  relativePath: packet.relativePath,
@@ -2141,11 +3456,11 @@ async function beginNativeReadTransport(packet, run, producer, signal, deps) {
2141
3456
  ...(packet.limit === undefined ? {} : { limit: packet.limit }),
2142
3457
  });
2143
3458
  if (!result.ok)
2144
- return nativeInitializationRefusal(result.reason);
3459
+ return nativeTransportRefusal(result.reason);
2145
3460
  let delivered = false;
2146
3461
  try {
2147
3462
  if (!nativeReadBeginCurrent(packet, run, producer, result.identity, signal, deps))
2148
- return nativeInitializationRefusal("dispatch-refused");
3463
+ return nativeTransportRefusal("dispatch-refused");
2149
3464
  delivered = true;
2150
3465
  return {
2151
3466
  status: 200,
@@ -2170,7 +3485,7 @@ async function closeNativeReadTransport(packet, run, producer, signal, deps) {
2170
3485
  const ok = await producer.close(packet.identity, packet.outcome);
2171
3486
  return nativeReadRunCurrent(deps, run) && signal?.aborted !== true
2172
3487
  ? { status: 200, body: JSON.stringify({ ok }), nativeResult: true }
2173
- : nativeInitializationRefusal("dispatch-refused");
3488
+ : nativeTransportRefusal("dispatch-refused");
2174
3489
  }
2175
3490
  finally {
2176
3491
  detach();
@@ -2191,7 +3506,7 @@ function bindNativeReadDisconnect(signal, producer, identity) {
2191
3506
  async function nativeReadTransportIO(packet, run, producer, signal, deps) {
2192
3507
  const io = producer.fileIO;
2193
3508
  if (io === undefined)
2194
- return nativeInitializationRefusal("dispatch-refused");
3509
+ return nativeTransportRefusal("dispatch-refused");
2195
3510
  const detach = bindNativeReadDisconnect(signal, producer, packet.identity);
2196
3511
  const work = io[packet.phase](packet.identity, packet.input);
2197
3512
  void work.then((late) => {
@@ -2203,14 +3518,14 @@ async function nativeReadTransportIO(packet, run, producer, signal, deps) {
2203
3518
  if (signal?.aborted === true || !nativeReadIOCurrent(deps, run, result)) {
2204
3519
  wipeNativeIOBytes(result);
2205
3520
  void producer.close(packet.identity, "cancelled");
2206
- return nativeInitializationRefusal("dispatch-refused");
3521
+ return nativeTransportRefusal("dispatch-refused");
2207
3522
  }
2208
3523
  return nativeFileIOResponse(result);
2209
3524
  }
2210
3525
  catch (error) {
2211
3526
  if (signal?.aborted !== true)
2212
3527
  throw error;
2213
- return nativeInitializationRefusal("cancelled");
3528
+ return nativeTransportRefusal("cancelled");
2214
3529
  }
2215
3530
  finally {
2216
3531
  detach();
@@ -2231,36 +3546,6 @@ function wipeNativeIOBytes(result) {
2231
3546
  if (result.ok && "bytes" in result)
2232
3547
  result.bytes.fill(0);
2233
3548
  }
2234
- function nativeInitializationValue(body) {
2235
- if (!validJson(body))
2236
- return undefined;
2237
- const value = JSON.parse(body);
2238
- return v2Record(value)?.action === "native-initialization" ? value : undefined;
2239
- }
2240
- /** Owned data only; transport never supplies authority, workspace root, purpose, or executable. */
2241
- export function copyNativeInitializationPacket(value) {
2242
- const record = initializationData(value);
2243
- if (record?.action !== "native-initialization" || typeof record.runId !== "string")
2244
- return undefined;
2245
- if (!/^[A-Za-z0-9_-]{1,256}$/u.test(record.runId))
2246
- return undefined;
2247
- return copyInitializationPhase(record, record.runId);
2248
- }
2249
- function copyInitializationPhase(record, runId) {
2250
- const action = "native-initialization";
2251
- if (record.phase === "begin")
2252
- return initialFields(record, ["action", "phase", "runId"])
2253
- ? Object.freeze({ action, phase: record.phase, runId })
2254
- : undefined;
2255
- if (typeof record.scopeId !== "string" || !/^[a-f0-9-]{36}$/u.test(record.scopeId))
2256
- return undefined;
2257
- const common = { action, runId, scopeId: record.scopeId };
2258
- if (record.phase === "end")
2259
- return initialFields(record, ["action", "phase", "runId", "scopeId"])
2260
- ? Object.freeze({ ...common, phase: record.phase })
2261
- : undefined;
2262
- return copyInitializationIO(record, common);
2263
- }
2264
3549
  function initializationData(value) {
2265
3550
  if (typeof value !== "object" || value === null || Array.isArray(value))
2266
3551
  return undefined;
@@ -2280,27 +3565,6 @@ function initializationData(value) {
2280
3565
  function initialFields(record, keys) {
2281
3566
  return (Object.keys(record).length === keys.length && keys.every((key) => Object.hasOwn(record, key)));
2282
3567
  }
2283
- function copyInitializationIO(record, common) {
2284
- if (typeof record.relativePath !== "string")
2285
- return undefined;
2286
- const keys = ["action", "phase", "runId", "scopeId", "relativePath"];
2287
- const path = record.relativePath;
2288
- if (record.phase === "stat" || record.phase === "list")
2289
- return initialFields(record, keys)
2290
- ? Object.freeze({ ...common, phase: record.phase, relativePath: path })
2291
- : undefined;
2292
- if (record.phase !== "readBytes")
2293
- return undefined;
2294
- const range = copyInitializationRange(record, keys);
2295
- if (range === false)
2296
- return undefined;
2297
- return Object.freeze({
2298
- ...common,
2299
- phase: record.phase,
2300
- relativePath: path,
2301
- ...(range === undefined ? {} : { range }),
2302
- });
2303
- }
2304
3568
  function copyInitializationRange(record, keys) {
2305
3569
  if (!Object.hasOwn(record, "range"))
2306
3570
  return initialFields(record, keys) ? undefined : false;
@@ -2313,113 +3577,13 @@ function copyInitializationRange(record, keys) {
2313
3577
  return false;
2314
3578
  return Object.freeze({ offset: range.offset, length: range.length });
2315
3579
  }
2316
- async function handleNativeInitialization(value, signal, deps, gate, runs) {
2317
- const packet = copyNativeInitializationPacket(value);
2318
- if (packet === undefined)
2319
- return nativeInitializationRefusal("invalid-request", 400);
2320
- const run = runs.get(packet.runId);
2321
- try {
2322
- if (run?.serviceHostPrepared !== true || run.ready || !initializationRootCurrent(deps, run))
2323
- return nativeInitializationRefusal("initialization-refused");
2324
- if (packet.phase === "begin")
2325
- return await beginNativeInitialization(run, signal, deps, gate);
2326
- return await continueNativeInitialization(packet, run, signal, deps);
2327
- }
2328
- catch (error) {
2329
- run?.nativeInitialization?.admission.controller.abort("initialization-failed");
2330
- emitFacadeFailureDiagnostic(deps.diagnostics, undefined, error);
2331
- return nativeInitializationRefusal("initialization-failed", 502);
2332
- }
2333
- }
2334
3580
  function initializationRootCurrent(deps, run) {
2335
3581
  const root = deps.resolveWorkspaceRootAccess?.();
2336
3582
  return root?.canonicalRoot === run.workspaceRoot;
2337
3583
  }
2338
- function nativeInitializationRefusal(reason, status = 409) {
3584
+ function nativeTransportRefusal(reason, status = 409) {
2339
3585
  return { status, body: JSON.stringify({ ok: false, reason }), nativeResult: true };
2340
3586
  }
2341
- async function beginNativeInitialization(run, signal, deps, gate) {
2342
- const facet = deps.facade.acceptedInitialization;
2343
- if (facet === undefined || run.nativeInitialization !== undefined)
2344
- return nativeInitializationRefusal("initialization-closed");
2345
- if (signal?.aborted === true)
2346
- return nativeInitializationRefusal("cancelled");
2347
- const admission = gate.admit(gate.limits.requestDeadlineMs);
2348
- if (admission === undefined)
2349
- return nativeInitializationRefusal("busy", 429);
2350
- const { state, ready } = createInitializationAttachment(deps, facet, admission, signal, run.runId);
2351
- run.nativeInitialization = state;
2352
- const result = state.result;
2353
- const entered = await Promise.race([ready.then(() => true), result.then(() => false)]);
2354
- if (!entered)
2355
- return initializationOutcome(await result);
2356
- if (!state.open || !initializationRootCurrent(deps, run)) {
2357
- admission.controller.abort("initialization-refused");
2358
- return nativeInitializationRefusal("initialization-refused");
2359
- }
2360
- recordNativeInitializationLifecycle(deps, run.runId, "begin", "accepted");
2361
- return { status: 200, body: JSON.stringify({ ok: true, scopeId: state.id }), nativeResult: true };
2362
- }
2363
- function initializationOutcome(result) {
2364
- return result.ok
2365
- ? { status: 200, body: '{"ok":true}', nativeResult: true }
2366
- : nativeInitializationRefusal(result.reason);
2367
- }
2368
- async function continueNativeInitialization(packet, run, signal, deps) {
2369
- const state = run.nativeInitialization;
2370
- if (state?.id !== packet.scopeId || !state.open || state.io === undefined)
2371
- return nativeInitializationRefusal("initialization-closed");
2372
- const detach = bindExternalAbort(signal, state.admission);
2373
- try {
2374
- if (packet.phase === "end") {
2375
- state.open = false;
2376
- state.end();
2377
- const result = await state.result;
2378
- return initializationRootCurrent(deps, run)
2379
- ? initializationOutcome(result)
2380
- : nativeInitializationRefusal("initialization-refused");
2381
- }
2382
- return await initialIOUnderCurrentScope(packet, run, state, state.io, deps);
2383
- }
2384
- finally {
2385
- detach();
2386
- }
2387
- }
2388
- async function initialIOUnderCurrentScope(packet, run, state, io, deps) {
2389
- const work = executeInitialIO(packet, io);
2390
- void work.then((late) => {
2391
- if (state.admission.controller.signal.aborted && late.ok && "bytes" in late)
2392
- late.bytes.fill(0);
2393
- }, (error) => {
2394
- if (state.admission.controller.signal.aborted)
2395
- emitFacadeFailureDiagnostic(deps.diagnostics, undefined, error);
2396
- });
2397
- let result;
2398
- try {
2399
- result = await raceAbort(work, state.admission.controller.signal);
2400
- }
2401
- catch (error) {
2402
- if (!state.admission.controller.signal.aborted)
2403
- throw error;
2404
- return nativeInitializationRefusal(abortReason(state.admission.controller.signal) === DEADLINE_ABORT ? "timeout" : "cancelled");
2405
- }
2406
- if (!state.open ||
2407
- state.admission.controller.signal.aborted ||
2408
- !initializationRootCurrent(deps, run)) {
2409
- if (result.ok && "bytes" in result)
2410
- result.bytes.fill(0);
2411
- state.admission.controller.abort("initialization-refused");
2412
- return nativeInitializationRefusal("initialization-refused");
2413
- }
2414
- return nativeFileIOResponse(result);
2415
- }
2416
- function executeInitialIO(packet, io) {
2417
- const request = {
2418
- relativePath: packet.relativePath,
2419
- ...(packet.phase === "readBytes" && packet.range !== undefined ? { range: packet.range } : {}),
2420
- };
2421
- return io[packet.phase](request);
2422
- }
2423
3587
  function nativeFileIOResponse(result) {
2424
3588
  if (!result.ok) {
2425
3589
  if (result.reason === "wrong-kind")
@@ -2431,7 +3595,7 @@ function nativeFileIOResponse(result) {
2431
3595
  info: result.info,
2432
3596
  }),
2433
3597
  };
2434
- return nativeInitializationRefusal(result.reason);
3598
+ return nativeTransportRefusal(result.reason);
2435
3599
  }
2436
3600
  const bytes = nativeFileIOResultBytes(result);
2437
3601
  try {
@@ -2452,86 +3616,3 @@ function nativeFileIOResultBytes(result) {
2452
3616
  return encodeSecureWorkspaceNativeDirectory(result.entries);
2453
3617
  return new Uint8Array();
2454
3618
  }
2455
- function createInitializationAttachment(deps, facet, admission, signal, runId) {
2456
- const acquired = initializationDeferred();
2457
- const done = initializationDeferred();
2458
- const completed = initializationDeferred();
2459
- const state = {
2460
- id: randomUUID(),
2461
- admission,
2462
- result: completed.promise,
2463
- end: () => {
2464
- done.resolve(undefined);
2465
- },
2466
- open: true,
2467
- };
2468
- const close = () => {
2469
- state.open = false;
2470
- state.end();
2471
- };
2472
- admission.controller.signal.addEventListener("abort", close, { once: true });
2473
- const detach = bindExternalAbort(signal, admission);
2474
- void executeBridgeInitialization(deps, facet.run.bind(facet), (io) => {
2475
- state.io = io;
2476
- acquired.resolve(undefined);
2477
- return done.promise;
2478
- }, admission).then((result) => {
2479
- close();
2480
- detach();
2481
- admission.controller.signal.removeEventListener("abort", close);
2482
- completed.resolve(recordInitializationCompletion(deps, runId, result));
2483
- });
2484
- return { state, ready: acquired.promise };
2485
- }
2486
- function recordInitializationCompletion(deps, runId, result) {
2487
- try {
2488
- recordNativeInitializationLifecycle(deps, runId, "end", result.ok ? "completed" : result.reason);
2489
- return result;
2490
- }
2491
- catch (error) {
2492
- emitFacadeFailureDiagnostic(deps.diagnostics, undefined, error);
2493
- return { ok: false, reason: "initialization-failed" };
2494
- }
2495
- }
2496
- const NATIVE_INITIALIZATION_LIFECYCLE_OPERATION = defineActivityLogOperation({
2497
- contractKind: "activity-log-operation",
2498
- schemaVersion: 1,
2499
- op: "coding-runtime.initialization-transport",
2500
- category: "process",
2501
- owner: "keiko-server",
2502
- emitter: "coding-runtime.opencodeRuntimeComposition.recordNativeInitializationLifecycle",
2503
- fields: {
2504
- stage: { type: "string", dataClass: "closed-enum", required: true, values: ["begin", "end"] },
2505
- outcome: {
2506
- type: "string",
2507
- dataClass: "closed-enum",
2508
- required: true,
2509
- values: [
2510
- "accepted",
2511
- "completed",
2512
- "initialization-closed",
2513
- "initialization-refused",
2514
- "initialization-failed",
2515
- "cancelled",
2516
- "timeout",
2517
- "busy",
2518
- ],
2519
- },
2520
- },
2521
- causal: "correlation",
2522
- lifecycle: "state",
2523
- analyzerProjection: "timeline",
2524
- failureClasses: ["coding-runtime-initialization-transport"],
2525
- proofIds: ["coding-runtime.initialization-transport.emitted-line"],
2526
- releaseImpact: "patch",
2527
- });
2528
- function recordNativeInitializationLifecycle(deps, runId, stage, outcome) {
2529
- deps.activityLog.write(activityLogEvent(NATIVE_INITIALIZATION_LIFECYCLE_OPERATION, { correlationId: runId }, { stage, outcome }));
2530
- }
2531
- function initializationDeferred() {
2532
- let resolve;
2533
- const promise = new Promise((done) => {
2534
- resolve = done;
2535
- });
2536
- return { promise, resolve };
2537
- }