@oscharko-dev/keiko 1.2.7 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (973) hide show
  1. package/README.md +10 -1
  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 +29 -29
  5. package/dist/ui/static/__next._full.txt +39 -37
  6. package/dist/ui/static/__next._tree.txt +4 -3
  7. package/dist/ui/static/_next/static/chunks/0-vpa4wvwcpe-.js +1 -0
  8. package/dist/ui/static/_next/static/chunks/00r78wq51vv7p.js +1 -0
  9. package/dist/ui/static/_next/static/chunks/00yei-8muakqk.js +1 -0
  10. package/dist/ui/static/_next/static/chunks/013_eu8kl0gb5.js +2 -0
  11. package/dist/ui/static/_next/static/chunks/{2-ayearhfgxi5.js → 01q9wnshe_-rz.js} +1 -1
  12. package/dist/ui/static/_next/static/chunks/02ex3k089apnn.js +1 -0
  13. package/dist/ui/static/_next/static/chunks/036rtd09k8_ad.js +115 -0
  14. package/dist/ui/static/_next/static/chunks/048ovhn3wu_bu.js +1 -0
  15. package/dist/ui/static/_next/static/chunks/{13k6ykgg16pc4.js → 04k2mahro7j92.js} +1 -1
  16. package/dist/ui/static/_next/static/chunks/{06hwq8_gunvuo.js → 07957vlppntmk.js} +1 -1
  17. package/dist/ui/static/_next/static/chunks/08db-gqjr8owi.js +1 -0
  18. package/dist/ui/static/_next/static/chunks/08x7pi746hdjg.js +86 -0
  19. package/dist/ui/static/_next/static/chunks/0_avx_tl-uxim.js +1 -0
  20. package/dist/ui/static/_next/static/chunks/0bn9_5u9n-9b9.js +1 -0
  21. package/dist/ui/static/_next/static/chunks/0cpk4khbn9_uw.js +1 -0
  22. package/dist/ui/static/_next/static/chunks/0cvtkiw2nnx5u.js +1 -0
  23. package/dist/ui/static/_next/static/chunks/0e-mzde0wr44_.js +1 -0
  24. package/dist/ui/static/_next/static/chunks/0em5-43ag74be.js +1 -0
  25. package/dist/ui/static/_next/static/chunks/0eub6ctk-lx6x.js +1 -0
  26. package/dist/ui/static/_next/static/chunks/0f5a0vl40n41q.js +93 -0
  27. package/dist/ui/static/_next/static/chunks/0frmhx04k4f8m.js +1 -0
  28. package/dist/ui/static/_next/static/chunks/0h-upsn6lazz9.js +1 -0
  29. package/dist/ui/static/_next/static/chunks/{1nqe0rzxqwjkw.js → 0kx828qnu1y09.js} +2 -2
  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/{40_mgil0e17bk.js → 1d_810phvbt-v.js} +1 -1
  60. package/dist/ui/static/_next/static/chunks/{30vnoxh_uxkfo.js → 1e9f1ex2uq29r.js} +1 -1
  61. package/dist/ui/static/_next/static/chunks/1i7xk_bpdb206.js +1 -0
  62. package/dist/ui/static/_next/static/chunks/1isrybhkr_cy_.js +82 -0
  63. package/dist/ui/static/_next/static/chunks/{1wxgm93nd75ns.js → 1k7tt8btcpb6z.js} +1 -1
  64. package/dist/ui/static/_next/static/chunks/1k_nzgb93nxr8.js +226 -0
  65. package/dist/ui/static/_next/static/chunks/{1wq7gotrl8jek.css → 1kbra771vsw0c.css} +1 -1
  66. package/dist/ui/static/_next/static/chunks/1mjmyr3-5-6-7.js +15 -0
  67. package/dist/ui/static/_next/static/chunks/1n4mmvvatk3mn.js +1 -0
  68. package/dist/ui/static/_next/static/chunks/1pw2mt5mwtr9t.js +1 -0
  69. package/dist/ui/static/_next/static/chunks/1r5gxo360o3td.js +153 -0
  70. package/dist/ui/static/_next/static/chunks/{2dhtqq8a83t27.css → 1rhvew72iz-n3.css} +14 -9
  71. package/dist/ui/static/_next/static/chunks/{09v8w4wuj4m1_.js → 1sjvzpa27mjxc.js} +1 -1
  72. package/dist/ui/static/_next/static/chunks/{2ql8dczlqzd4u.js → 1t64aljha95yf.js} +1 -1
  73. package/dist/ui/static/_next/static/chunks/1tw5oyzju-ijp.js +23 -0
  74. package/dist/ui/static/_next/static/chunks/1tyghneva-hiy.js +1 -0
  75. package/dist/ui/static/_next/static/chunks/1uxz_w63vj11u.js +79 -0
  76. package/dist/ui/static/_next/static/chunks/{0_wcaciq9-s_c.js → 1uy2itzuap01l.js} +1 -1
  77. package/dist/ui/static/_next/static/chunks/1veg_qtra_2-d.js +41 -0
  78. package/dist/ui/static/_next/static/chunks/{1_6h8vxxlkwg1.js → 1z8n7lj5wgp4m.js} +1 -1
  79. package/dist/ui/static/_next/static/chunks/20eou_wcxpx1s.js +1 -0
  80. package/dist/ui/static/_next/static/chunks/{35eygftv-qu-q.js → 21yx7habl0roe.js} +1 -1
  81. package/dist/ui/static/_next/static/chunks/226y24czlj0wp.js +1 -0
  82. package/dist/ui/static/_next/static/chunks/{3i5xyx-alljjx.js → 24fnfy1y6n4og.js} +1 -1
  83. package/dist/ui/static/_next/static/chunks/250of-fyd3fhr.js +1 -0
  84. package/dist/ui/static/_next/static/chunks/26dysjhfplkru.js +1 -0
  85. package/dist/ui/static/_next/static/chunks/2_c97y2pecrx2.js +1 -0
  86. package/dist/ui/static/_next/static/chunks/2_uz2tn-uwusm.js +1 -0
  87. package/dist/ui/static/_next/static/chunks/2ajmg9bm0a9y0.js +32 -0
  88. package/dist/ui/static/_next/static/chunks/2ayjltgsne_71.js +90 -0
  89. package/dist/ui/static/_next/static/chunks/2bm_bps837c8s.js +1 -0
  90. package/dist/ui/static/_next/static/chunks/2db5ooma2i4yx.js +1 -0
  91. package/dist/ui/static/_next/static/chunks/2dsu6hwhp85it.js +1 -0
  92. package/dist/ui/static/_next/static/chunks/2dwa2hysai57e.js +1 -0
  93. package/dist/ui/static/_next/static/chunks/2ek5ny0z29n-_.js +201 -0
  94. package/dist/ui/static/_next/static/chunks/{2fr8bahvq9eg9.js → 2he22glqm5s22.js} +1 -1
  95. package/dist/ui/static/_next/static/chunks/2ie6v7cdqe406.js +62 -0
  96. package/dist/ui/static/_next/static/chunks/2img0w643cwi4.js +1 -0
  97. package/dist/ui/static/_next/static/chunks/2kqjvq-p_chx9.js +1 -0
  98. package/dist/ui/static/_next/static/chunks/2lfji5sgej4v4.js +1 -0
  99. package/dist/ui/static/_next/static/chunks/2mcajqb-umr1q.css +4 -0
  100. package/dist/ui/static/_next/static/chunks/2mk8qovgc1zl-.js +2 -0
  101. package/dist/ui/static/_next/static/chunks/{2206mw-z43vyo.js → 2ni4tm0tqgcdk.js} +1 -1
  102. package/dist/ui/static/_next/static/chunks/{0mde4a5qgo7cd.js → 2nzruc7wyn8dr.js} +1 -1
  103. package/dist/ui/static/_next/static/chunks/2o7tp9zv8u7tw.js +1 -0
  104. package/dist/ui/static/_next/static/chunks/2o9fq12slgfa0.js +1 -0
  105. package/dist/ui/static/_next/static/chunks/2o9mtyaa7p_se.js +1 -0
  106. package/dist/ui/static/_next/static/chunks/{34w7t_j7upvnc.js → 2rxwfcn3g_xcj.js} +1 -1
  107. package/dist/ui/static/_next/static/chunks/2sff-cr7dn-6k.js +1 -0
  108. package/dist/ui/static/_next/static/chunks/2werku_ws_bu6.js +1 -0
  109. package/dist/ui/static/_next/static/chunks/{3kftpmlf_wvd3.js → 2x_kyz5ial_41.js} +1 -1
  110. package/dist/ui/static/_next/static/chunks/2xudunn-lg4q1.js +1 -0
  111. package/dist/ui/static/_next/static/chunks/2yk59ik12pbte.js +1 -0
  112. package/dist/ui/static/_next/static/chunks/2yzeyiuh6hiyi.js +1 -0
  113. package/dist/ui/static/_next/static/chunks/2yzl8qiydb5e5.js +4 -0
  114. package/dist/ui/static/_next/static/chunks/{1w7td7s2ds1r4.js → 30jm7s-paox4s.js} +3 -3
  115. package/dist/ui/static/_next/static/chunks/33iwa_n3mi3c1.js +1 -0
  116. package/dist/ui/static/_next/static/chunks/{2_52lwqeijscc.js → 33jglfz6y49ka.js} +1 -1
  117. package/dist/ui/static/_next/static/chunks/{2chlwgzo2fo43.js → 34ey1sc6cg1jb.js} +1 -1
  118. package/dist/ui/static/_next/static/chunks/34xq7t6q8xscy.js +38 -0
  119. package/dist/ui/static/_next/static/chunks/{403kjiu_bjumv.js → 35oxd7_mv6yx-.js} +1 -1
  120. package/dist/ui/static/_next/static/chunks/374l27tamvcx2.js +1 -0
  121. package/dist/ui/static/_next/static/chunks/{35amvhf88zprh.js → 37nl28rjnj-un.js} +1 -1
  122. package/dist/ui/static/_next/static/chunks/38x98fr04cv7f.js +61 -0
  123. package/dist/ui/static/_next/static/chunks/395aita-ystfu.js +1 -0
  124. package/dist/ui/static/_next/static/chunks/39thlt_b984p5.js +1 -0
  125. package/dist/ui/static/_next/static/chunks/3_32gobpn9eea.js +1 -0
  126. package/dist/ui/static/_next/static/chunks/{2h3yq6o4kg_kb.js → 3_qhvykv4ncye.js} +1 -1
  127. package/dist/ui/static/_next/static/chunks/3ca17qj3ru209.js +1 -0
  128. package/dist/ui/static/_next/static/chunks/3e39amxssw159.js +1 -0
  129. package/dist/ui/static/_next/static/chunks/{2ty81249w2gdw.js → 3e_kp81r43l1p.js} +1 -1
  130. package/dist/ui/static/_next/static/chunks/3g9t_w1rxvy9k.js +1 -0
  131. package/dist/ui/static/_next/static/chunks/{2na7t_nmk3z_c.js → 3he4t7yk0v9z5.js} +1 -1
  132. package/dist/ui/static/_next/static/chunks/3hxvi-06cjs9x.js +1 -0
  133. package/dist/ui/static/_next/static/chunks/3hykczegwyd5i.js +36 -0
  134. package/dist/ui/static/_next/static/chunks/{2r8nyeo1ifl95.js → 3jc_y1tnauj-z.js} +1 -1
  135. package/dist/ui/static/_next/static/chunks/3jvw3i_osp8l_.js +64 -0
  136. package/dist/ui/static/_next/static/chunks/3k-z30ov7etov.js +1 -0
  137. package/dist/ui/static/_next/static/chunks/{302c7ueozi8kb.js → 3ksimuw0ad9zn.js} +1 -1
  138. package/dist/ui/static/_next/static/chunks/3l4xc7b94iz9e.css +1 -0
  139. package/dist/ui/static/_next/static/chunks/3l6l7qzd411sc.js +1 -0
  140. package/dist/ui/static/_next/static/chunks/3lmi87qw7ehxj.js +15 -0
  141. package/dist/ui/static/_next/static/chunks/3lyh88nxnumm7.js +1 -0
  142. package/dist/ui/static/_next/static/chunks/3m4bd79015ouy.js +1 -0
  143. package/dist/ui/static/_next/static/chunks/{09lp4q0mk16fc.js → 3mqrq9fc15u8f.js} +1 -1
  144. package/dist/ui/static/_next/static/chunks/3ndfyq6sdfacc.js +24 -0
  145. package/dist/ui/static/_next/static/chunks/{3_fsw1lkt1_wh.js → 3nir0q_tbd635.js} +1 -1
  146. package/dist/ui/static/_next/static/chunks/{13sm61rx0q9m9.js → 3owd_yj0kssh5.js} +1 -1
  147. package/dist/ui/static/_next/static/chunks/3owvaep851hrg.js +1 -0
  148. package/dist/ui/static/_next/static/chunks/3q-qr3yas3rmr.js +1 -0
  149. package/dist/ui/static/_next/static/chunks/{1d4ot7_nywn7m.js → 3qabgkg9agmqc.js} +1 -1
  150. package/dist/ui/static/_next/static/chunks/3qkwuc11h025w.js +15 -0
  151. package/dist/ui/static/_next/static/chunks/3qqqcf3iyho8i.js +62 -0
  152. package/dist/ui/static/_next/static/chunks/3r1y5u63no3t6.js +1 -0
  153. package/dist/ui/static/_next/static/chunks/3snum7xpnvwx_.js +1 -0
  154. package/dist/ui/static/_next/static/chunks/3tl76hukh2-pb.js +1 -0
  155. package/dist/ui/static/_next/static/chunks/3u1g6632-f7ay.js +15 -0
  156. package/dist/ui/static/_next/static/chunks/3w0ad9bnfy9s8.js +1 -0
  157. package/dist/ui/static/_next/static/chunks/3yr06bc-tr_ms.js +1 -0
  158. package/dist/ui/static/_next/static/chunks/3zt236vwq5bnr.js +1 -0
  159. package/dist/ui/static/_next/static/chunks/40rspfo2bz_p3.js +1 -0
  160. package/dist/ui/static/_next/static/chunks/41s-b40scg1v9.js +1 -0
  161. package/dist/ui/static/_next/static/chunks/{0_mnz9imy_h8n.js → 43ke4vyo6p4wu.js} +1 -1
  162. package/dist/ui/static/_next/static/chunks/43p3o8p9_gmdm.js +1 -0
  163. package/dist/ui/static/_next/static/chunks/43qb7fm2lvzfr.js +1 -0
  164. package/dist/ui/static/_next/static/chunks/{11cv_1ipmnwdr.js → 447_k7yqc6i7k.js} +3 -3
  165. package/dist/ui/static/_next/static/chunks/44jjws0h08uog.js +24 -0
  166. package/dist/ui/static/_not-found/__next._full.txt +28 -25
  167. package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +6 -5
  168. package/dist/ui/static/_not-found/__next._tree.txt +3 -2
  169. package/dist/ui/static/_not-found.html +1 -1
  170. package/dist/ui/static/_not-found.txt +28 -25
  171. package/dist/ui/static/atlassian-connectors/__next._full.txt +27 -25
  172. package/dist/ui/static/atlassian-connectors/__next._tree.txt +3 -2
  173. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +11 -10
  174. package/dist/ui/static/atlassian-connectors.html +1 -1
  175. package/dist/ui/static/atlassian-connectors.txt +27 -25
  176. package/dist/ui/static/index.html +1 -1
  177. package/dist/ui/static/index.txt +39 -37
  178. package/dist/ui/static/launch/__next._full.txt +43 -41
  179. package/dist/ui/static/launch/__next._tree.txt +4 -3
  180. package/dist/ui/static/launch/__next.launch.__PAGE__.txt +29 -29
  181. package/dist/ui/static/launch.html +1 -1
  182. package/dist/ui/static/launch.txt +43 -41
  183. package/dist/ui/static/local-knowledge/__next._full.txt +21 -20
  184. package/dist/ui/static/local-knowledge/__next._tree.txt +4 -3
  185. package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +29 -29
  186. package/dist/ui/static/local-knowledge/capsule/__next._full.txt +28 -26
  187. package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +3 -2
  188. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +9 -8
  189. package/dist/ui/static/local-knowledge/capsule.html +1 -1
  190. package/dist/ui/static/local-knowledge/capsule.txt +28 -26
  191. package/dist/ui/static/local-knowledge.html +1 -1
  192. package/dist/ui/static/local-knowledge.txt +21 -20
  193. package/node_modules/@oscharko-dev/keiko-activity-log/dist/activity-log-compatibility-3558.fixture.json +4 -0
  194. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory-data.generated.json +3844 -0
  195. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts +5 -0
  196. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts.map +1 -1
  197. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.js +10 -3703
  198. package/node_modules/@oscharko-dev/keiko-activity-log/package.json +3 -3
  199. package/node_modules/@oscharko-dev/keiko-cli/dist/portable-maintenance.d.ts.map +1 -1
  200. package/node_modules/@oscharko-dev/keiko-cli/dist/portable-maintenance.js +4 -0
  201. package/node_modules/@oscharko-dev/keiko-cli/package.json +15 -15
  202. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.d.ts +1 -1
  203. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.js +1 -1
  204. package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
  205. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-diagnostic-fields.d.ts +18 -0
  206. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-diagnostic-fields.d.ts.map +1 -0
  207. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-diagnostic-fields.js +17 -0
  208. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts +443 -43
  209. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts.map +1 -1
  210. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.js +760 -77
  211. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-coverage.generated.json +45847 -0
  212. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-identity.generated.d.ts +6 -0
  213. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-identity.generated.d.ts.map +1 -0
  214. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-identity.generated.js +15 -0
  215. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operation-surfaces.generated.json +592 -0
  216. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts +3162 -370
  217. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts.map +1 -1
  218. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.js +3737 -498
  219. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry-metadata.d.ts +43 -0
  220. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry-metadata.d.ts.map +1 -0
  221. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry-metadata.js +1 -0
  222. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts +2 -34384
  223. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts.map +1 -1
  224. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.js +2 -42955
  225. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-runtime-metadata.generated.d.ts +5 -0
  226. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-runtime-metadata.generated.d.ts.map +1 -0
  227. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-runtime-metadata.generated.js +6 -0
  228. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts +95 -0
  229. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts.map +1 -1
  230. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.js +23 -0
  231. package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.d.ts +1 -1
  232. package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.d.ts.map +1 -1
  233. package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.js +1 -0
  234. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-runtime-git.d.ts +30 -1
  235. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-runtime-git.d.ts.map +1 -1
  236. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-runtime-git.js +31 -9
  237. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-evidence.d.ts.map +1 -1
  238. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-evidence.js +12 -1
  239. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.d.ts +386 -1
  240. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.d.ts.map +1 -1
  241. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.js +623 -18
  242. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-approval-review.d.ts +13 -0
  243. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-approval-review.d.ts.map +1 -1
  244. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-approval-review.js +28 -1
  245. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-validation.d.ts.map +1 -1
  246. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-validation.js +17 -0
  247. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts +28 -1
  248. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts.map +1 -1
  249. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.js +30 -5
  250. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts +40 -3
  251. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts.map +1 -1
  252. package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.js +14 -0
  253. package/node_modules/@oscharko-dev/keiko-contracts/dist/governed-tool-bridge.d.ts +56 -0
  254. package/node_modules/@oscharko-dev/keiko-contracts/dist/governed-tool-bridge.d.ts.map +1 -1
  255. package/node_modules/@oscharko-dev/keiko-contracts/dist/governed-tool-bridge.js +120 -1
  256. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +8 -7
  257. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
  258. package/node_modules/@oscharko-dev/keiko-contracts/dist/mcp-servers.d.ts +121 -0
  259. package/node_modules/@oscharko-dev/keiko-contracts/dist/mcp-servers.d.ts.map +1 -0
  260. package/node_modules/@oscharko-dev/keiko-contracts/dist/mcp-servers.js +415 -0
  261. package/node_modules/@oscharko-dev/keiko-contracts/dist/sensitive-path-patterns.d.ts +10 -0
  262. package/node_modules/@oscharko-dev/keiko-contracts/dist/sensitive-path-patterns.d.ts.map +1 -0
  263. package/node_modules/@oscharko-dev/keiko-contracts/dist/sensitive-path-patterns.js +117 -0
  264. package/node_modules/@oscharko-dev/keiko-contracts/dist/task-workspace.d.ts +6 -0
  265. package/node_modules/@oscharko-dev/keiko-contracts/dist/task-workspace.d.ts.map +1 -1
  266. package/node_modules/@oscharko-dev/keiko-contracts/dist/task-workspace.js +21 -0
  267. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +2 -2
  268. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +2 -2
  269. package/node_modules/@oscharko-dev/keiko-contracts/package.json +12 -4
  270. package/node_modules/@oscharko-dev/keiko-evaluations/dist/local-knowledge/runner.d.ts.map +1 -1
  271. package/node_modules/@oscharko-dev/keiko-evaluations/dist/local-knowledge/runner.js +12 -9
  272. package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
  273. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
  274. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
  275. package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
  276. package/node_modules/@oscharko-dev/keiko-git/dist/version.d.ts +1 -1
  277. package/node_modules/@oscharko-dev/keiko-git/dist/version.js +1 -1
  278. package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
  279. package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
  280. package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
  281. package/node_modules/@oscharko-dev/keiko-harness/package.json +7 -7
  282. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.d.ts.map +1 -1
  283. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.js +4 -17
  284. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
  285. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
  286. package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
  287. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
  288. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
  289. package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
  290. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
  291. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
  292. package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
  293. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
  294. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
  295. package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
  296. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/diversity.d.ts +1 -0
  297. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/diversity.d.ts.map +1 -1
  298. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/diversity.js +2 -2
  299. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/index.d.ts +1 -1
  300. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/index.d.ts.map +1 -1
  301. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/index.js +1 -1
  302. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
  303. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
  304. package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
  305. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
  306. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
  307. package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
  308. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.d.ts.map +1 -1
  309. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.js +12 -0
  310. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts.map +1 -1
  311. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.js +69 -4
  312. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts +1 -0
  313. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts.map +1 -1
  314. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.js +1 -0
  315. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/model-selection.d.ts +2 -0
  316. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/model-selection.d.ts.map +1 -1
  317. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/model-selection.js +12 -2
  318. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-admission.d.ts.map +1 -1
  319. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-admission.js +14 -5
  320. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-token-accounting.d.ts +10 -1
  321. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-token-accounting.d.ts.map +1 -1
  322. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-token-accounting.js +14 -7
  323. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +1 -0
  324. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts.map +1 -1
  325. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.js +42 -64
  326. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/toolCatalogBridge.d.ts.map +1 -1
  327. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/toolCatalogBridge.js +70 -6
  328. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/types.d.ts +10 -1
  329. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/types.d.ts.map +1 -1
  330. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
  331. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
  332. package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +4 -4
  333. package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
  334. package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.d.ts +2 -2
  335. package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.d.ts.map +1 -1
  336. package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.js +49 -3
  337. package/node_modules/@oscharko-dev/keiko-sandbox/dist/index.d.ts +4 -1
  338. package/node_modules/@oscharko-dev/keiko-sandbox/dist/index.d.ts.map +1 -1
  339. package/node_modules/@oscharko-dev/keiko-sandbox/dist/index.js +3 -0
  340. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-linked-files.d.ts +28 -0
  341. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-linked-files.d.ts.map +1 -0
  342. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-linked-files.js +117 -0
  343. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-toolchain-roots.d.ts +15 -0
  344. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-toolchain-roots.d.ts.map +1 -0
  345. package/node_modules/@oscharko-dev/keiko-sandbox/dist/native-toolchain-roots.js +248 -0
  346. package/node_modules/@oscharko-dev/keiko-sandbox/dist/plan.d.ts.map +1 -1
  347. package/node_modules/@oscharko-dev/keiko-sandbox/dist/plan.js +16 -3
  348. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-gateway.d.ts +11 -2
  349. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-gateway.d.ts.map +1 -1
  350. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-gateway.js +77 -21
  351. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-service.d.ts +21 -0
  352. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-service.d.ts.map +1 -0
  353. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-service.js +248 -0
  354. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime.d.ts.map +1 -1
  355. package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime.js +51 -23
  356. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-credential-paths.d.ts +6 -0
  357. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-credential-paths.d.ts.map +1 -0
  358. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-credential-paths.js +60 -0
  359. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-execution-root.d.ts +27 -0
  360. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-execution-root.d.ts.map +1 -1
  361. package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-execution-root.js +289 -6
  362. package/node_modules/@oscharko-dev/keiko-sandbox/dist/types.d.ts +64 -2
  363. package/node_modules/@oscharko-dev/keiko-sandbox/dist/types.d.ts.map +1 -1
  364. package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
  365. package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
  366. package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts +1 -0
  367. package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts.map +1 -1
  368. package/node_modules/@oscharko-dev/keiko-security/dist/index.js +1 -0
  369. package/node_modules/@oscharko-dev/keiko-security/dist/redaction-spelling.d.ts +24 -0
  370. package/node_modules/@oscharko-dev/keiko-security/dist/redaction-spelling.d.ts.map +1 -0
  371. package/node_modules/@oscharko-dev/keiko-security/dist/redaction-spelling.js +354 -0
  372. package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
  373. package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
  374. package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
  375. package/node_modules/@oscharko-dev/keiko-server/dist/agent-run-governance.d.ts +2 -0
  376. package/node_modules/@oscharko-dev/keiko-server/dist/agent-run-governance.d.ts.map +1 -1
  377. package/node_modules/@oscharko-dev/keiko-server/dist/agent-run-governance.js +22 -5
  378. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryRoutes.d.ts +13 -1
  379. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryRoutes.d.ts.map +1 -1
  380. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryRoutes.js +133 -1
  381. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryTransferLog.d.ts +100 -0
  382. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryTransferLog.d.ts.map +1 -0
  383. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryTransferLog.js +64 -0
  384. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.d.ts +38 -10
  385. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.d.ts.map +1 -1
  386. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.js +13 -6
  387. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairController.d.ts.map +1 -1
  388. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairController.js +3 -1
  389. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.d.ts +4 -1
  390. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.d.ts.map +1 -1
  391. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.js +7 -3
  392. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeGitIpc.d.ts +14 -3
  393. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeGitIpc.d.ts.map +1 -1
  394. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeGitIpc.js +14 -6
  395. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.d.ts +33 -1
  396. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.d.ts.map +1 -1
  397. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.js +117 -11
  398. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInbox.d.ts +42 -0
  399. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInbox.d.ts.map +1 -0
  400. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInbox.js +47 -0
  401. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInstructionSources.d.ts +57 -0
  402. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInstructionSources.d.ts.map +1 -0
  403. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeInstructionSources.js +296 -0
  404. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.d.ts +25 -4
  405. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.d.ts.map +1 -1
  406. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.js +112 -124
  407. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOperationCoordinator.d.ts +62 -2
  408. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOperationCoordinator.d.ts.map +1 -1
  409. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOperationCoordinator.js +364 -26
  410. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts +68 -1
  411. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts.map +1 -1
  412. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.js +266 -23
  413. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts +25 -2
  414. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts.map +1 -1
  415. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryConfig.d.ts +37 -0
  416. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryConfig.d.ts.map +1 -0
  417. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryConfig.js +178 -0
  418. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryInstructions.d.ts +49 -4
  419. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryInstructions.d.ts.map +1 -1
  420. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryInstructions.js +267 -13
  421. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItemSanitizer.d.ts +62 -0
  422. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItemSanitizer.d.ts.map +1 -0
  423. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItemSanitizer.js +572 -0
  424. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItems.d.ts +64 -0
  425. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItems.d.ts.map +1 -0
  426. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryItems.js +560 -0
  427. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRevert.d.ts +39 -0
  428. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRevert.d.ts.map +1 -0
  429. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRevert.js +47 -0
  430. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.d.ts +55 -0
  431. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.d.ts.map +1 -1
  432. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.js +263 -54
  433. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeUndoWindow.d.ts +60 -0
  434. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeUndoWindow.d.ts.map +1 -0
  435. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeUndoWindow.js +188 -0
  436. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts +8 -1
  437. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts.map +1 -1
  438. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSessionContinuity.d.ts +116 -0
  439. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSessionContinuity.d.ts.map +1 -0
  440. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSessionContinuity.js +237 -0
  441. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSidecarEventParser.d.ts +6 -0
  442. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSidecarEventParser.d.ts.map +1 -1
  443. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSidecarEventParser.js +24 -0
  444. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskExport.d.ts +52 -0
  445. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskExport.d.ts.map +1 -0
  446. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskExport.js +347 -0
  447. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskImport.d.ts +64 -0
  448. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskImport.d.ts.map +1 -0
  449. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingTaskImport.js +332 -0
  450. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolApprovalBridge.d.ts +9 -2
  451. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolApprovalBridge.d.ts.map +1 -1
  452. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolApprovalBridge.js +5 -2
  453. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.d.ts +3 -1
  454. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.d.ts.map +1 -1
  455. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.js +74 -26
  456. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.d.ts.map +1 -1
  457. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.js +8 -2
  458. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts +120 -1
  459. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts.map +1 -1
  460. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts.map +1 -1
  461. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.js +24 -2
  462. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolNativeEffect.d.ts +54 -0
  463. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolNativeEffect.d.ts.map +1 -0
  464. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolNativeEffect.js +217 -0
  465. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinProcessTable.d.ts +35 -0
  466. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinProcessTable.d.ts.map +1 -0
  467. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinProcessTable.js +108 -0
  468. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinRuntimeDescendants.d.ts +183 -0
  469. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinRuntimeDescendants.d.ts.map +1 -0
  470. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinRuntimeDescendants.js +220 -0
  471. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinSandboxMembership.d.ts +42 -0
  472. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinSandboxMembership.d.ts.map +1 -0
  473. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/darwinSandboxMembership.js +210 -0
  474. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLanePortableCodingRuntime.d.ts +15 -1
  475. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLanePortableCodingRuntime.d.ts.map +1 -1
  476. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLanePortableCodingRuntime.js +87 -19
  477. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.d.ts +12 -1
  478. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.d.ts.map +1 -1
  479. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.js +164 -42
  480. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/governedSyncHeads.d.ts +28 -0
  481. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/governedSyncHeads.d.ts.map +1 -0
  482. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/governedSyncHeads.js +17 -0
  483. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts +21 -1
  484. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts.map +1 -1
  485. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.js +36 -0
  486. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeWebSearch.d.ts +221 -0
  487. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeWebSearch.d.ts.map +1 -0
  488. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeWebSearch.js +345 -0
  489. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/npmLaneRuntimeApprovals.d.ts.map +1 -1
  490. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/npmLaneRuntimeApprovals.js +28 -14
  491. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeAgents.d.ts +22 -0
  492. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeAgents.d.ts.map +1 -0
  493. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeAgents.js +28 -0
  494. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeCommands.d.ts +124 -0
  495. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeCommands.d.ts.map +1 -0
  496. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeCommands.js +398 -0
  497. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeConfigDocuments.d.ts +33 -0
  498. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeConfigDocuments.d.ts.map +1 -0
  499. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeConfigDocuments.js +91 -0
  500. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeHttpClient.d.ts.map +1 -1
  501. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeHttpClient.js +6 -0
  502. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeInbox.d.ts +83 -0
  503. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeInbox.d.ts.map +1 -0
  504. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeInbox.js +258 -0
  505. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.d.ts +110 -2
  506. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.d.ts.map +1 -1
  507. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.js +286 -35
  508. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeAgentModels.d.ts +36 -0
  509. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeAgentModels.d.ts.map +1 -0
  510. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeAgentModels.js +61 -0
  511. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeContext.d.ts +21 -6
  512. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeContext.d.ts.map +1 -1
  513. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeContext.js +33 -7
  514. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeDeliveryTools.d.ts +28 -0
  515. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeDeliveryTools.d.ts.map +1 -0
  516. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeDeliveryTools.js +41 -0
  517. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeEgress.d.ts +9 -0
  518. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeEgress.d.ts.map +1 -0
  519. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeEgress.js +8 -0
  520. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeExternalRoots.d.ts +38 -0
  521. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeExternalRoots.d.ts.map +1 -0
  522. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeExternalRoots.js +119 -0
  523. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeFormatter.d.ts +67 -0
  524. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeFormatter.d.ts.map +1 -0
  525. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeFormatter.js +181 -0
  526. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeGitMetadata.d.ts +25 -0
  527. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeGitMetadata.d.ts.map +1 -0
  528. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeGitMetadata.js +66 -0
  529. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeLinkedFiles.d.ts +12 -0
  530. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeLinkedFiles.d.ts.map +1 -0
  531. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeLinkedFiles.js +81 -0
  532. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcp.d.ts +76 -0
  533. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcp.d.ts.map +1 -0
  534. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcp.js +136 -0
  535. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpAuthorization.d.ts +51 -0
  536. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpAuthorization.d.ts.map +1 -0
  537. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpAuthorization.js +263 -0
  538. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpCredentials.d.ts +38 -0
  539. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpCredentials.d.ts.map +1 -0
  540. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpCredentials.js +171 -0
  541. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpRelay.d.ts +29 -0
  542. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpRelay.d.ts.map +1 -0
  543. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMcpRelay.js +47 -0
  544. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMessageId.d.ts +13 -0
  545. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMessageId.d.ts.map +1 -0
  546. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeMessageId.js +59 -0
  547. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePluginReadiness.d.ts +42 -0
  548. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePluginReadiness.d.ts.map +1 -0
  549. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePluginReadiness.js +90 -0
  550. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicy.d.ts +321 -0
  551. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicy.d.ts.map +1 -0
  552. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicy.js +1296 -0
  553. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicyPlugin.d.ts +43 -0
  554. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicyPlugin.d.ts.map +1 -0
  555. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicyPlugin.js +195 -0
  556. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeQuestions.d.ts +50 -0
  557. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeQuestions.d.ts.map +1 -0
  558. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeQuestions.js +265 -0
  559. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeSessionTree.d.ts +117 -0
  560. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeSessionTree.d.ts.map +1 -0
  561. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeSessionTree.js +281 -0
  562. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeTools.d.ts +81 -0
  563. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeTools.d.ts.map +1 -0
  564. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeTools.js +149 -0
  565. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeWorktree.d.ts +58 -0
  566. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeWorktree.d.ts.map +1 -0
  567. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeWorktree.js +71 -0
  568. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPluginPackage.d.ts +38 -0
  569. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPluginPackage.d.ts.map +1 -0
  570. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPluginPackage.js +87 -0
  571. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPlugins.d.ts +105 -0
  572. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPlugins.d.ts.map +1 -0
  573. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeOperatorPlugins.js +386 -0
  574. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePersistenceContract.d.ts +17 -0
  575. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePersistenceContract.d.ts.map +1 -0
  576. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePersistenceContract.js +142 -0
  577. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePromptInputs.d.ts +236 -0
  578. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePromptInputs.d.ts.map +1 -0
  579. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodePromptInputs.js +719 -0
  580. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocol.d.ts +14 -1
  581. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocol.d.ts.map +1 -1
  582. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocol.js +52 -12
  583. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocolSurface.d.ts +8 -1
  584. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocolSurface.d.ts.map +1 -1
  585. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeProtocolSurface.js +36 -2
  586. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeReconciler.d.ts +2 -0
  587. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeReconciler.d.ts.map +1 -1
  588. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeReconciler.js +19 -3
  589. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRemoteSkills.d.ts +79 -0
  590. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRemoteSkills.d.ts.map +1 -0
  591. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRemoteSkills.js +361 -0
  592. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRevert.d.ts +95 -0
  593. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRevert.d.ts.map +1 -0
  594. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRevert.js +458 -0
  595. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRipgrepLaunch.d.ts +84 -0
  596. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRipgrepLaunch.d.ts.map +1 -0
  597. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRipgrepLaunch.js +236 -0
  598. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.d.ts +32 -6
  599. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.d.ts.map +1 -1
  600. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.js +248 -78
  601. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts +174 -34
  602. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts.map +1 -1
  603. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.js +1498 -430
  604. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeVersions.d.ts +28 -0
  605. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeVersions.d.ts.map +1 -0
  606. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeVersions.js +31 -0
  607. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSafeActivity.d.ts +24 -0
  608. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSafeActivity.d.ts.map +1 -1
  609. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSafeActivity.js +28 -7
  610. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceInventory.d.ts +197 -0
  611. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceInventory.d.ts.map +1 -0
  612. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceInventory.js +793 -0
  613. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionContinuation.d.ts +96 -0
  614. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionContinuation.d.ts.map +1 -0
  615. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionContinuation.js +346 -0
  616. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionRetention.d.ts +141 -0
  617. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionRetention.d.ts.map +1 -0
  618. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeSessionRetention.js +580 -0
  619. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.d.ts +438 -10
  620. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.d.ts.map +1 -1
  621. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.js +83 -10
  622. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.d.ts +11 -0
  623. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.d.ts.map +1 -1
  624. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.js +18 -0
  625. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.d.ts +22 -0
  626. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.d.ts.map +1 -1
  627. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.js +320 -145
  628. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.d.ts +304 -2
  629. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.d.ts.map +1 -1
  630. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.js +578 -25
  631. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2LiveText.d.ts +2 -1
  632. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2LiveText.d.ts.map +1 -1
  633. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2LiveText.js +5 -4
  634. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2Questions.d.ts.map +1 -1
  635. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2Questions.js +12 -1
  636. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeHost.d.ts +110 -0
  637. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeHost.d.ts.map +1 -1
  638. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimePorts.d.ts +68 -3
  639. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimePorts.d.ts.map +1 -1
  640. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimePorts.js +353 -13
  641. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeResolver.d.ts.map +1 -1
  642. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeResolver.js +71 -6
  643. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.d.ts +1 -1
  644. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.d.ts.map +1 -1
  645. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.js +124 -103
  646. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.d.ts +14 -1
  647. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.d.ts.map +1 -1
  648. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.js +106 -6
  649. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.d.ts +66 -3
  650. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.d.ts.map +1 -1
  651. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/nativeToolTranscript.d.ts +7 -0
  652. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/nativeToolTranscript.d.ts.map +1 -0
  653. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/nativeToolTranscript.js +43 -0
  654. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/repositorySearchProof.d.ts.map +1 -1
  655. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/repositorySearchProof.js +44 -48
  656. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/skillDiscoveryProof.d.ts +7 -3
  657. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/skillDiscoveryProof.d.ts.map +1 -1
  658. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/skillDiscoveryProof.js +37 -43
  659. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.js +365 -37
  660. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionReadOnlyChildRunner.js +7 -1
  661. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionRuntimeWorkspaceAuthority.d.ts +3 -0
  662. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionRuntimeWorkspaceAuthority.d.ts.map +1 -1
  663. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionRuntimeWorkspaceAuthority.js +11 -0
  664. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitRuntime.d.ts +3 -0
  665. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitRuntime.d.ts.map +1 -1
  666. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitRuntime.js +4 -2
  667. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/ripgrepRuntime.d.ts +198 -0
  668. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/ripgrepRuntime.d.ts.map +1 -0
  669. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/ripgrepRuntime.js +357 -0
  670. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeGatewayProcessSandbox.d.ts.map +1 -1
  671. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeGatewayProcessSandbox.js +17 -3
  672. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextRead.d.ts +7 -0
  673. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextRead.d.ts.map +1 -1
  674. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextRead.js +16 -6
  675. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadArtifact.d.ts +9 -1
  676. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadArtifact.d.ts.map +1 -1
  677. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadArtifact.js +14 -0
  678. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadPortable.d.ts.map +1 -1
  679. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadPortable.js +2 -1
  680. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/supervisedCodingPolicy.js +2 -1
  681. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-data-url.d.ts +27 -0
  682. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-data-url.d.ts.map +1 -0
  683. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-data-url.js +44 -0
  684. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-document-parts.d.ts +43 -0
  685. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-document-parts.d.ts.map +1 -0
  686. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-document-parts.js +106 -0
  687. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts +7 -2
  688. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts.map +1 -1
  689. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.js +449 -70
  690. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-image-parts.d.ts +48 -0
  691. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-image-parts.d.ts.map +1 -0
  692. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-image-parts.js +92 -0
  693. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-mcp-relay.d.ts +5 -0
  694. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-mcp-relay.d.ts.map +1 -0
  695. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-mcp-relay.js +19 -0
  696. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +39 -1
  697. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
  698. package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +142 -28
  699. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +1 -1
  700. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
  701. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.js +6 -0
  702. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.d.ts +1 -0
  703. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.d.ts.map +1 -1
  704. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.js +3 -0
  705. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.d.ts +1 -0
  706. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.d.ts.map +1 -1
  707. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.js +3 -2
  708. package/node_modules/@oscharko-dev/keiko-server/dist/embedding-provider-identity.d.ts +3 -0
  709. package/node_modules/@oscharko-dev/keiko-server/dist/embedding-provider-identity.d.ts.map +1 -0
  710. package/node_modules/@oscharko-dev/keiko-server/dist/embedding-provider-identity.js +14 -0
  711. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-deployment-identity.d.ts +33 -0
  712. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-deployment-identity.d.ts.map +1 -0
  713. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-deployment-identity.js +33 -0
  714. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts +9 -0
  715. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts.map +1 -1
  716. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.js +16 -0
  717. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
  718. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +114 -26
  719. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup-activity.d.ts +3 -0
  720. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup-activity.d.ts.map +1 -1
  721. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup-activity.js +10 -0
  722. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/execution.d.ts +8 -0
  723. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/execution.d.ts.map +1 -1
  724. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/execution.js +10 -0
  725. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionPreparation.js +1 -1
  726. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/proposalId.d.ts +4 -3
  727. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/proposalId.d.ts.map +1 -1
  728. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/proposalId.js +4 -3
  729. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runBoundAuthority.d.ts +19 -0
  730. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runBoundAuthority.d.ts.map +1 -1
  731. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runBoundAuthority.js +24 -13
  732. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitRead.d.ts +9 -2
  733. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitRead.d.ts.map +1 -1
  734. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitRead.js +21 -6
  735. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitService.d.ts +15 -4
  736. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitService.d.ts.map +1 -1
  737. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/runtimeGitService.js +216 -17
  738. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncEvidence.d.ts +17 -1
  739. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncEvidence.d.ts.map +1 -1
  740. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncEvidence.js +24 -0
  741. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncRoutes.d.ts.map +1 -1
  742. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncRoutes.js +9 -28
  743. package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.d.ts.map +1 -1
  744. package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.js +11 -9
  745. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-document-evidence.js +1 -1
  746. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.d.ts +1 -2
  747. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.d.ts.map +1 -1
  748. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.js +56 -112
  749. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.d.ts +1 -1
  750. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.d.ts.map +1 -1
  751. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.js +2 -12
  752. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-admission.d.ts +24 -0
  753. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-admission.d.ts.map +1 -1
  754. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-admission.js +68 -7
  755. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-log.d.ts +17 -0
  756. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-log.d.ts.map +1 -1
  757. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-log.js +60 -0
  758. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-prompt.d.ts +7 -1
  759. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-prompt.d.ts.map +1 -1
  760. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-prompt.js +30 -0
  761. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpCredentialRelay.d.ts +104 -0
  762. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpCredentialRelay.d.ts.map +1 -0
  763. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpCredentialRelay.js +442 -0
  764. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthAuthorizationUrl.d.ts +16 -0
  765. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthAuthorizationUrl.d.ts.map +1 -0
  766. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthAuthorizationUrl.js +56 -0
  767. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthCredentialStore.d.ts +27 -0
  768. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthCredentialStore.d.ts.map +1 -0
  769. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthCredentialStore.js +70 -0
  770. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthIssuer.d.ts +54 -0
  771. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthIssuer.d.ts.map +1 -0
  772. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpOAuthIssuer.js +191 -0
  773. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpServerRegistry.d.ts +29 -0
  774. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpServerRegistry.d.ts.map +1 -0
  775. package/node_modules/@oscharko-dev/keiko-server/dist/mcp/mcpServerRegistry.js +127 -0
  776. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding-identity.d.ts +5 -0
  777. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding-identity.d.ts.map +1 -0
  778. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding-identity.js +18 -0
  779. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.d.ts +1 -2
  780. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.d.ts.map +1 -1
  781. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.js +17 -83
  782. package/node_modules/@oscharko-dev/keiko-server/dist/memory-retrieval-signals.d.ts.map +1 -1
  783. package/node_modules/@oscharko-dev/keiko-server/dist/memory-retrieval-signals.js +1 -18
  784. package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.d.ts.map +1 -1
  785. package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.js +4 -0
  786. package/node_modules/@oscharko-dev/keiko-server/dist/operatorRegistryJson.d.ts +10 -0
  787. package/node_modules/@oscharko-dev/keiko-server/dist/operatorRegistryJson.d.ts.map +1 -0
  788. package/node_modules/@oscharko-dev/keiko-server/dist/operatorRegistryJson.js +15 -0
  789. package/node_modules/@oscharko-dev/keiko-server/dist/ownerPrivateStateFile.d.ts +16 -0
  790. package/node_modules/@oscharko-dev/keiko-server/dist/ownerPrivateStateFile.d.ts.map +1 -0
  791. package/node_modules/@oscharko-dev/keiko-server/dist/ownerPrivateStateFile.js +55 -0
  792. package/node_modules/@oscharko-dev/keiko-server/dist/read-handlers.d.ts.map +1 -1
  793. package/node_modules/@oscharko-dev/keiko-server/dist/read-handlers.js +8 -1
  794. package/node_modules/@oscharko-dev/keiko-server/dist/routes.d.ts.map +1 -1
  795. package/node_modules/@oscharko-dev/keiko-server/dist/routes.js +17 -0
  796. package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.d.ts +3 -1
  797. package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.d.ts.map +1 -1
  798. package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.js +88 -12
  799. package/node_modules/@oscharko-dev/keiko-server/dist/run-handlers.d.ts.map +1 -1
  800. package/node_modules/@oscharko-dev/keiko-server/dist/run-handlers.js +93 -1
  801. package/node_modules/@oscharko-dev/keiko-server/dist/run-request.d.ts +2 -0
  802. package/node_modules/@oscharko-dev/keiko-server/dist/run-request.d.ts.map +1 -1
  803. package/node_modules/@oscharko-dev/keiko-server/dist/run-request.js +36 -2
  804. package/node_modules/@oscharko-dev/keiko-server/dist/runs.d.ts +7 -0
  805. package/node_modules/@oscharko-dev/keiko-server/dist/runs.d.ts.map +1 -1
  806. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.d.ts +76 -0
  807. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.d.ts.map +1 -1
  808. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.js +145 -6
  809. package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/routes.d.ts.map +1 -1
  810. package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/routes.js +14 -5
  811. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.d.ts.map +1 -1
  812. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.js +12 -3
  813. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.d.ts +0 -3
  814. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.d.ts.map +1 -1
  815. package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.js +15 -22
  816. package/node_modules/@oscharko-dev/keiko-server/dist/voice-live-dictation.d.ts.map +1 -1
  817. package/node_modules/@oscharko-dev/keiko-server/dist/voice-live-dictation.js +6 -54
  818. package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.d.ts.map +1 -1
  819. package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.js +8 -75
  820. package/node_modules/@oscharko-dev/keiko-server/dist/voice-transport.d.ts +17 -0
  821. package/node_modules/@oscharko-dev/keiko-server/dist/voice-transport.d.ts.map +1 -0
  822. package/node_modules/@oscharko-dev/keiko-server/dist/voice-transport.js +54 -0
  823. package/node_modules/@oscharko-dev/keiko-server/package.json +23 -23
  824. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/dialect.d.ts.map +1 -1
  825. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/dialect.js +1 -1
  826. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/index.d.ts +2 -2
  827. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/index.d.ts.map +1 -1
  828. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/index.js +1 -1
  829. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/json.d.ts.map +1 -1
  830. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/json.js +4 -1
  831. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.d.ts +8 -1
  832. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.d.ts.map +1 -1
  833. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.js +38 -9
  834. package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/profile.js +1 -1
  835. package/node_modules/@oscharko-dev/keiko-tool-catalog/package.json +3 -3
  836. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-adapter.d.ts +2 -0
  837. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-adapter.d.ts.map +1 -1
  838. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-node.d.ts.map +1 -1
  839. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-node.js +29 -9
  840. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-orchestrator.d.ts +1 -0
  841. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-orchestrator.d.ts.map +1 -1
  842. package/node_modules/@oscharko-dev/keiko-tools/dist/git-mutation-orchestrator.js +4 -1
  843. package/node_modules/@oscharko-dev/keiko-tools/dist/git-stage-node.d.ts +8 -1
  844. package/node_modules/@oscharko-dev/keiko-tools/dist/git-stage-node.d.ts.map +1 -1
  845. package/node_modules/@oscharko-dev/keiko-tools/dist/git-stage-node.js +22 -1
  846. package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
  847. package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
  848. package/node_modules/@oscharko-dev/keiko-tools/package.json +7 -7
  849. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.d.ts +12 -1
  850. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.d.ts.map +1 -1
  851. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.js +12 -1
  852. package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.d.ts +1 -0
  853. package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.d.ts.map +1 -1
  854. package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.js +1 -0
  855. package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
  856. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/model-loop.d.ts +7 -1
  857. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/model-loop.d.ts.map +1 -1
  858. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/model-loop.js +17 -0
  859. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/types.d.ts +5 -0
  860. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/types.d.ts.map +1 -1
  861. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/workflow.d.ts.map +1 -1
  862. package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/workflow.js +6 -2
  863. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/model-loop.d.ts +7 -1
  864. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/model-loop.d.ts.map +1 -1
  865. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/model-loop.js +22 -1
  866. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/types.d.ts +6 -0
  867. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/types.d.ts.map +1 -1
  868. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/workflow.d.ts.map +1 -1
  869. package/node_modules/@oscharko-dev/keiko-workflows/dist/unit-tests/workflow.js +6 -2
  870. package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
  871. package/node_modules/@oscharko-dev/keiko-workspace/dist/fs.d.ts +6 -0
  872. package/node_modules/@oscharko-dev/keiko-workspace/dist/fs.d.ts.map +1 -1
  873. package/node_modules/@oscharko-dev/keiko-workspace/dist/fs.js +6 -1
  874. package/node_modules/@oscharko-dev/keiko-workspace/dist/ignore.d.ts +2 -0
  875. package/node_modules/@oscharko-dev/keiko-workspace/dist/ignore.d.ts.map +1 -1
  876. package/node_modules/@oscharko-dev/keiko-workspace/dist/ignore.js +30 -94
  877. package/node_modules/@oscharko-dev/keiko-workspace/dist/index.d.ts +1 -1
  878. package/node_modules/@oscharko-dev/keiko-workspace/dist/index.d.ts.map +1 -1
  879. package/node_modules/@oscharko-dev/keiko-workspace/dist/index.js +1 -1
  880. package/node_modules/@oscharko-dev/keiko-workspace/dist/sourceRedaction.d.ts +7 -1
  881. package/node_modules/@oscharko-dev/keiko-workspace/dist/sourceRedaction.d.ts.map +1 -1
  882. package/node_modules/@oscharko-dev/keiko-workspace/dist/sourceRedaction.js +7 -1
  883. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
  884. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
  885. package/node_modules/@oscharko-dev/keiko-workspace/package.json +7 -3
  886. package/package.json +40 -37
  887. package/release-impact.catalog.json +75 -0
  888. package/vendor/oscharko-dev-keiko-activity-log-1.3.0.tgz +0 -0
  889. package/vendor/oscharko-dev-keiko-cli-1.3.0.tgz +0 -0
  890. package/vendor/{oscharko-dev-keiko-connectors-1.2.7.tgz → oscharko-dev-keiko-connectors-1.3.0.tgz} +0 -0
  891. package/vendor/oscharko-dev-keiko-contracts-1.3.0.tgz +0 -0
  892. package/vendor/oscharko-dev-keiko-evaluations-1.3.0.tgz +0 -0
  893. package/vendor/{oscharko-dev-keiko-evidence-1.2.7.tgz → oscharko-dev-keiko-evidence-1.3.0.tgz} +0 -0
  894. package/vendor/{oscharko-dev-keiko-git-1.2.7.tgz → oscharko-dev-keiko-git-1.3.0.tgz} +0 -0
  895. package/vendor/{oscharko-dev-keiko-harness-1.2.7.tgz → oscharko-dev-keiko-harness-1.3.0.tgz} +0 -0
  896. package/vendor/oscharko-dev-keiko-local-knowledge-1.3.0.tgz +0 -0
  897. package/vendor/{oscharko-dev-keiko-memory-capture-1.2.7.tgz → oscharko-dev-keiko-memory-capture-1.3.0.tgz} +0 -0
  898. package/vendor/oscharko-dev-keiko-memory-consolidation-1.3.0.tgz +0 -0
  899. package/vendor/{oscharko-dev-keiko-memory-governance-1.2.7.tgz → oscharko-dev-keiko-memory-governance-1.3.0.tgz} +0 -0
  900. package/vendor/oscharko-dev-keiko-memory-retrieval-1.3.0.tgz +0 -0
  901. package/vendor/{oscharko-dev-keiko-memory-vault-1.2.7.tgz → oscharko-dev-keiko-memory-vault-1.3.0.tgz} +0 -0
  902. package/vendor/oscharko-dev-keiko-model-gateway-1.3.0.tgz +0 -0
  903. package/vendor/{oscharko-dev-keiko-quality-intelligence-1.2.7.tgz → oscharko-dev-keiko-quality-intelligence-1.3.0.tgz} +0 -0
  904. package/vendor/oscharko-dev-keiko-sandbox-1.3.0.tgz +0 -0
  905. package/vendor/oscharko-dev-keiko-sdk-1.3.0.tgz +0 -0
  906. package/vendor/oscharko-dev-keiko-security-1.3.0.tgz +0 -0
  907. package/vendor/oscharko-dev-keiko-server-1.3.0.tgz +0 -0
  908. package/vendor/oscharko-dev-keiko-tool-catalog-1.3.0.tgz +0 -0
  909. package/vendor/oscharko-dev-keiko-tools-1.3.0.tgz +0 -0
  910. package/vendor/oscharko-dev-keiko-verification-1.3.0.tgz +0 -0
  911. package/vendor/oscharko-dev-keiko-workflows-1.3.0.tgz +0 -0
  912. package/vendor/oscharko-dev-keiko-workspace-1.3.0.tgz +0 -0
  913. package/dist/ui/static/_next/static/chunks/0-u520yf_wb_j.js +0 -1
  914. package/dist/ui/static/_next/static/chunks/04n_hxe12wdv3.js +0 -1
  915. package/dist/ui/static/_next/static/chunks/0891-mvb901op.js +0 -1
  916. package/dist/ui/static/_next/static/chunks/0alcm0tnx-n8-.js +0 -1
  917. package/dist/ui/static/_next/static/chunks/0e6yt02qckkgg.js +0 -1
  918. package/dist/ui/static/_next/static/chunks/0qeb8v4j-hvxn.js +0 -1
  919. package/dist/ui/static/_next/static/chunks/0squn2lq5smnf.js +0 -1
  920. package/dist/ui/static/_next/static/chunks/11186fkh5coce.js +0 -2
  921. package/dist/ui/static/_next/static/chunks/1daa_1zod-ndb.js +0 -1
  922. package/dist/ui/static/_next/static/chunks/1eg67od6go7bm.js +0 -1
  923. package/dist/ui/static/_next/static/chunks/1enud1-bc9hju.js +0 -1
  924. package/dist/ui/static/_next/static/chunks/1fwlq_j3who0_.js +0 -1
  925. package/dist/ui/static/_next/static/chunks/1heusut-vh7z0.js +0 -1
  926. package/dist/ui/static/_next/static/chunks/1te8076xiv1_f.css +0 -3
  927. package/dist/ui/static/_next/static/chunks/1v92406tlxfiq.js +0 -1
  928. package/dist/ui/static/_next/static/chunks/1wj7exxi550gi.css +0 -1
  929. package/dist/ui/static/_next/static/chunks/1wsoxouji7eb9.js +0 -1
  930. package/dist/ui/static/_next/static/chunks/22or338lout8-.js +0 -1
  931. package/dist/ui/static/_next/static/chunks/22pvivewswjat.js +0 -1
  932. package/dist/ui/static/_next/static/chunks/24418_x2or4rl.js +0 -1
  933. package/dist/ui/static/_next/static/chunks/24_0lv80gez9c.js +0 -1
  934. package/dist/ui/static/_next/static/chunks/2az51zfcfe4w7.js +0 -1
  935. package/dist/ui/static/_next/static/chunks/2ckbk_cxw04nr.js +0 -1
  936. package/dist/ui/static/_next/static/chunks/2n8v0d0jxc0vm.js +0 -1
  937. package/dist/ui/static/_next/static/chunks/2nxhnrgae6nij.js +0 -1
  938. package/dist/ui/static/_next/static/chunks/2prq37rl7-s0l.js +0 -1
  939. package/dist/ui/static/_next/static/chunks/3-xsabbhsq0xh.js +0 -1
  940. package/dist/ui/static/_next/static/chunks/37h-dtpel_wcw.js +0 -1
  941. package/dist/ui/static/_next/static/chunks/37kujq-6rc3ey.js +0 -1
  942. package/dist/ui/static/_next/static/chunks/3cr7wi4udns8d.js +0 -1
  943. package/dist/ui/static/_next/static/chunks/3e4qdou22wwph.js +0 -1
  944. package/dist/ui/static/_next/static/chunks/3i3kblvx52ywv.js +0 -1
  945. package/dist/ui/static/_next/static/chunks/3n0xbx7qq5429.js +0 -1
  946. package/dist/ui/static/_next/static/chunks/3nydk_onn2xx2.css +0 -1
  947. package/dist/ui/static/_next/static/chunks/3vqr94foc1i2t.js +0 -1
  948. package/node_modules/@oscharko-dev/keiko-contracts/dist/opencode-service-host.d.ts +0 -42
  949. package/node_modules/@oscharko-dev/keiko-contracts/dist/opencode-service-host.d.ts.map +0 -1
  950. package/node_modules/@oscharko-dev/keiko-contracts/dist/opencode-service-host.js +0 -151
  951. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceHostArtifact.d.ts +0 -79
  952. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceHostArtifact.d.ts.map +0 -1
  953. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceHostArtifact.js +0 -176
  954. package/vendor/oscharko-dev-keiko-activity-log-1.2.7.tgz +0 -0
  955. package/vendor/oscharko-dev-keiko-cli-1.2.7.tgz +0 -0
  956. package/vendor/oscharko-dev-keiko-contracts-1.2.7.tgz +0 -0
  957. package/vendor/oscharko-dev-keiko-evaluations-1.2.7.tgz +0 -0
  958. package/vendor/oscharko-dev-keiko-local-knowledge-1.2.7.tgz +0 -0
  959. package/vendor/oscharko-dev-keiko-memory-consolidation-1.2.7.tgz +0 -0
  960. package/vendor/oscharko-dev-keiko-memory-retrieval-1.2.7.tgz +0 -0
  961. package/vendor/oscharko-dev-keiko-model-gateway-1.2.7.tgz +0 -0
  962. package/vendor/oscharko-dev-keiko-sandbox-1.2.7.tgz +0 -0
  963. package/vendor/oscharko-dev-keiko-sdk-1.2.7.tgz +0 -0
  964. package/vendor/oscharko-dev-keiko-security-1.2.7.tgz +0 -0
  965. package/vendor/oscharko-dev-keiko-server-1.2.7.tgz +0 -0
  966. package/vendor/oscharko-dev-keiko-tool-catalog-1.2.7.tgz +0 -0
  967. package/vendor/oscharko-dev-keiko-tools-1.2.7.tgz +0 -0
  968. package/vendor/oscharko-dev-keiko-verification-1.2.7.tgz +0 -0
  969. package/vendor/oscharko-dev-keiko-workflows-1.2.7.tgz +0 -0
  970. package/vendor/oscharko-dev-keiko-workspace-1.2.7.tgz +0 -0
  971. /package/dist/ui/static/_next/static/{H3xxDPi4xvbxoz-xJSbax → 6pkGWU1F8PM1C3Cb4rVAo}/_buildManifest.js +0 -0
  972. /package/dist/ui/static/_next/static/{H3xxDPi4xvbxoz-xJSbax → 6pkGWU1F8PM1C3Cb4rVAo}/_clientMiddlewareManifest.js +0 -0
  973. /package/dist/ui/static/_next/static/{H3xxDPi4xvbxoz-xJSbax → 6pkGWU1F8PM1C3Cb4rVAo}/_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,61 +281,340 @@ 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),
127
371
  };
128
372
  }
129
- function createSubmitTask(readyRun, diagnostics, activityLog) {
130
- return async (runId, text, initialContext) => {
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;
384
+ };
385
+ }
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);
154
435
  };
155
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));
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) }));
617
+ }
156
618
  function createReplyPermission(readyRun, diagnostics, approvals) {
157
619
  return async (runId, requestId, reply) => {
158
620
  const run = readyRun(runId);
@@ -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),
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({
1099
+ runId: request.runId,
1100
+ discoveryRoot: openCodeConfigDirectory(runRoot),
504
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, {
505
1124
  runId: request.runId,
506
- configDigest,
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,7 +1240,7 @@ 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) {
531
1244
  return {
532
1245
  runId,
533
1246
  runRoot,
@@ -535,9 +1248,72 @@ function preparedRun(runId, runRoot, workspaceRoot, password, configDigest, veri
535
1248
  password,
536
1249
  configDigest,
537
1250
  verification,
1251
+ mode,
1252
+ launchMode: mode,
538
1253
  observedPermissionIds: new Set(),
1254
+ commandPresentation: createOpenCodeCommandPresentation(),
539
1255
  initialTurnBaselineStable: false,
540
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
+ /** Native exit evidence is settled above, outside the closed display-signal schema. */
1285
+ function displayActivitySignal(signal) {
1286
+ if (signal.kind !== "tool")
1287
+ return signal;
1288
+ const display = { ...signal };
1289
+ delete display.exitCode;
1290
+ delete display.exitStatusCheck;
1291
+ return display;
1292
+ }
1293
+ /** The native tools whose completed call wrote the files its edit check named. */
1294
+ const NATIVE_FILE_WRITE_TOOLS = new Set(["edit", "write", "patch"]);
1295
+ function nativeToolSettlementObserver(input, run) {
1296
+ const settlement = input.toolProfile === "native" ? input.toolFacade.nativeSettlement : undefined;
1297
+ if (settlement === undefined)
1298
+ return undefined;
1299
+ return (signal) => {
1300
+ if (signal.kind !== "tool" || signal.messageId === undefined)
1301
+ return;
1302
+ if (signal.state !== "succeeded" && signal.state !== "failed")
1303
+ return;
1304
+ if (signal.state === "succeeded" && NATIVE_FILE_WRITE_TOOLS.has(signal.tool ?? "")) {
1305
+ const key = openCodeNativeCallKey(signal.messageId, signal.callId);
1306
+ recordOpenCodeEditSettled(run, key, input.activityLog);
1307
+ }
1308
+ settlement.settled({
1309
+ messageId: signal.messageId,
1310
+ callId: signal.callId,
1311
+ tool: signal.tool,
1312
+ state: signal.state,
1313
+ ...planNoteSettlement(run, signal.messageId, signal.callId),
1314
+ ...(signal.exitCode === undefined ? {} : { exitCode: signal.exitCode }),
1315
+ ...(signal.exitStatusCheck === undefined ? {} : { exitStatusCheck: signal.exitStatusCheck }),
1316
+ });
541
1317
  };
542
1318
  }
543
1319
  // eslint-disable-next-line max-lines-per-function -- handshake keeps attested client/adapter binding atomic.
@@ -545,8 +1321,6 @@ async function handshake(input, bridge, runs, request) {
545
1321
  const run = runs.get(request.runId);
546
1322
  if (run === undefined)
547
1323
  return { ok: false, reason: "preparation-missing" };
548
- if (run.serviceHostPrepared === true)
549
- return { ok: false, reason: "host-readiness-unqualified" };
550
1324
  run.onPermission = request.onPermission;
551
1325
  try {
552
1326
  const endpoint = parseOpenCodeV2ChildEndpoint(await request.startupOutput.nextLine(request.signal));
@@ -565,18 +1339,14 @@ async function handshake(input, bridge, runs, request) {
565
1339
  ...(input.activityLog === undefined ? {} : { activityLog: input.activityLog }),
566
1340
  readiness: readinessV2Ports(input, bridge, run, client, endpoint, request),
567
1341
  governedSink: input.governedEventSink,
568
- ...(input.safeActivity
569
- ? {
570
- safeActivitySink: {
571
- ingest: input.safeActivity.ingest,
572
- recordDrops: input.safeActivity.recordDrops,
573
- },
574
- }
575
- : {}),
1342
+ ...adapterSafeActivitySink(input, run),
576
1343
  control: {
577
- status: async (sessionId, signal) => {
578
- return (await v2SessionIsTerminal(client, sessionId, signal)) ? "terminal" : "activity";
579
- },
1344
+ status: createNativeTreeStatusPort({
1345
+ runId: run.runId,
1346
+ client,
1347
+ tree: (sessionId) => nativeSessionTree(run, sessionId),
1348
+ activityLog: input.activityLog,
1349
+ }),
580
1350
  },
581
1351
  safety: {
582
1352
  revokeAudiences: () => undefined,
@@ -595,10 +1365,14 @@ async function handshake(input, bridge, runs, request) {
595
1365
  await adapter.close();
596
1366
  return { ok: false, reason: "preparation-missing" };
597
1367
  }
1368
+ // #3903 AC3: a kept MCP credential reaches the attested runtime before its first turn.
1369
+ if (input.mcpCredentials !== undefined)
1370
+ await seedMcpCredentials(run, client, input.mcpCredentials, input.activityLog);
598
1371
  run.runtimeAdapter = adapter;
599
1372
  run.client = client;
600
1373
  run.sessionId = result.sessionId;
601
1374
  run.ready = true;
1375
+ run.revertReady = true;
602
1376
  return { ok: true };
603
1377
  }
604
1378
  catch {
@@ -618,6 +1392,7 @@ function readinessV2Ports(input, bridge, run, client, endpoint, request) {
618
1392
  runId: run.runId,
619
1393
  activityLog: input.activityLog,
620
1394
  captureMessages: input.safeActivity?.captureMessages,
1395
+ userMessageDisplay: run.commandPresentation.displayFor,
621
1396
  takeMergedEventCount: () => {
622
1397
  const merged = mergedEvents;
623
1398
  mergedEvents = 0;
@@ -629,9 +1404,10 @@ function readinessV2Ports(input, bridge, run, client, endpoint, request) {
629
1404
  verifiedTarget: {
630
1405
  executable: join(input.portable.resourceRoot, run.verification.executablePath),
631
1406
  attestationDigest: run.verification.protocolHandshakeDigest,
1407
+ version: run.verification.summary.upstreamVersion,
632
1408
  },
633
1409
  configDigest: run.configDigest,
634
- nativeContextConfigured: true,
1410
+ nativeContextProfile: input.toolProfile === "native" ? "native" : "mapped",
635
1411
  verifyTargetAttestation: () => Promise.resolve(true),
636
1412
  materialize: () => Promise.resolve(configMaterialized(run.runRoot)),
637
1413
  startupLine: () => {
@@ -642,12 +1418,17 @@ function readinessV2Ports(input, bridge, run, client, endpoint, request) {
642
1418
  ? authenticatedV2Health(client)
643
1419
  : unauthenticatedV2Health(input.fetch, endpoint, request.signal),
644
1420
  openApiDigest: async () => projectOpenCodeV2ProtocolSurface(await client.document()).digest,
1421
+ ...(input.toolProfile === "native"
1422
+ ? {
1423
+ policyPluginActive: () => awaitOpenCodeNativePlugins((signal) => client.plugins(signal), join(openCodeConfigDirectory(run.runRoot), "plugins"), request.signal),
1424
+ }
1425
+ : {}),
645
1426
  gatewayChallenge: () => challengeV2Gateway(input, run, client, fixedSessionId, request, startupRead),
646
1427
  toolFacadeChallenge: () => challengeToolFacade(input, bridge),
647
1428
  subscribe: async function* (signal) {
648
1429
  // A reconnect opens another event stream for the same run, not another sidecar session.
649
1430
  // Keep the creation promise so concurrent subscriptions cannot create competing sessions.
650
- sessionCreation ??= createAndEchoV2Session(client, run.workspaceRoot, request.signal);
1431
+ sessionCreation ??= bindRunSession(input, run, client, request.signal);
651
1432
  fixedSessionId = await sessionCreation;
652
1433
  streamCount += 1;
653
1434
  if (fixedSessionId !== "")
@@ -679,7 +1460,11 @@ function readinessV2Ports(input, bridge, run, client, endpoint, request) {
679
1460
  let messages = [];
680
1461
  try {
681
1462
  messages = await client.messages(fixedSessionId, signal);
682
- const events = history.project(fixedSessionId, messages, checkpoints[fixedSessionId]);
1463
+ // A continued session already holds the messages of earlier runs, which Coding History has
1464
+ // and the timeline must not show again: the projection starts after them.
1465
+ const ownMessages = withoutBaseline(messages, run.continuation?.baselineIds);
1466
+ const events = history.project(fixedSessionId, ownMessages, checkpoints[fixedSessionId]);
1467
+ observeNativeStepChanges(input, run, ownMessages);
683
1468
  staged.clear();
684
1469
  for (const event of events) {
685
1470
  const safe = history.takeSignal(event);
@@ -714,6 +1499,9 @@ function readinessV2Ports(input, bridge, run, client, endpoint, request) {
714
1499
  function v2ExecutionState(type) {
715
1500
  if (type === "session.execution.started")
716
1501
  return "activity";
1502
+ // The runtime ends a turn this way when a human refuses a question: no idle message follows.
1503
+ if (type === "session.execution.interrupted")
1504
+ return "interrupted";
717
1505
  if (type === "session.execution.succeeded" ||
718
1506
  type === "session.execution.failed" ||
719
1507
  type === "session.execution.cancelled")
@@ -850,7 +1638,7 @@ function pullSyncHint(pump) {
850
1638
  };
851
1639
  void pump.source.next().then(onNext).then(undefined, settle);
852
1640
  }
853
- function v2SyncHint(event, fixedSessionId, onQuestionObserved) {
1641
+ export function v2SyncHint(event, fixedSessionId, onQuestionObserved) {
854
1642
  const data = v2Record(event.data);
855
1643
  if (event.type === "form.created" &&
856
1644
  typeof event.id === "string" &&
@@ -903,6 +1691,71 @@ function recordOpenCodeV2HistoryFailure(diagnostics, runId, error) {
903
1691
  ...(detail.causeChain === undefined ? {} : { causeChain: detail.causeChain }),
904
1692
  });
905
1693
  }
1694
+ /**
1695
+ * The session a run works in: its own new one, or, when its database was seeded from a task's
1696
+ * retained entry, the retained session resumed or forked (`bindContinuedSession`). A continued
1697
+ * session that cannot be bound to this run's workspace fails the run's readiness: it is never
1698
+ * replaced by a fresh one inside a database that still holds the other.
1699
+ */
1700
+ async function bindRunSession(input, run, client, signal) {
1701
+ const continuation = run.continuation;
1702
+ const context = continuationContext(input);
1703
+ if (continuation === undefined || context === undefined) {
1704
+ return createAndEchoV2Session(client, run.workspaceRoot, signal);
1705
+ }
1706
+ const line = continuedSessionLine(context, run, continuation);
1707
+ let bound;
1708
+ try {
1709
+ bound = await bindContinuedSession(client, continuation, run.workspaceRoot, signal);
1710
+ }
1711
+ catch (error) {
1712
+ // Not a refusal (the runtime could not be asked, or the run was cancelled): the readiness fails
1713
+ // with the error itself, and the continuity line says the session was never bound.
1714
+ recordSessionContinuity(input.activityLog, {
1715
+ ...line,
1716
+ outcome: "failed",
1717
+ reason: "session-mismatch",
1718
+ error,
1719
+ });
1720
+ throw error;
1721
+ }
1722
+ const forked = continuation.intent.kind === "fork";
1723
+ if (!bound.ok) {
1724
+ // An entry the runtime does not see the way its manifest says can never be used again.
1725
+ if (bound.reason === "session-mismatch")
1726
+ context.service.store?.remove(continuation.taskId);
1727
+ recordSessionContinuity(input.activityLog, {
1728
+ ...line,
1729
+ outcome: "failed",
1730
+ reason: bound.reason,
1731
+ ...(bound.error === undefined ? {} : { error: bound.error }),
1732
+ });
1733
+ return "";
1734
+ }
1735
+ continuation.baselineIds = bound.baselineIds;
1736
+ context.service.settle(run.runId, { kind: forked ? "forked" : "resumed" });
1737
+ recordSessionContinuity(input.activityLog, {
1738
+ ...line,
1739
+ outcome: forked ? "forked" : "resumed",
1740
+ databaseBytes: continuation.databaseBytes,
1741
+ messageCount: bound.baselineIds.size,
1742
+ ageMs: continuation.ageMs,
1743
+ });
1744
+ return bound.sessionId;
1745
+ }
1746
+ function continuedSessionLine(context, run, continuation) {
1747
+ const intent = continuation.intent;
1748
+ const taskId = intent.kind === "resume" ? intent.taskId : context.service.taskOfRun(run.runId);
1749
+ return {
1750
+ runId: run.runId,
1751
+ action: intent.kind,
1752
+ ...(taskId === undefined ? {} : { taskId }),
1753
+ ...(intent.kind === "fork"
1754
+ ? { sourceTaskId: intent.sourceTaskId, boundary: intent.boundary.kind }
1755
+ : {}),
1756
+ ...(continuation.sourceDirectory === undefined ? {} : { relocated: true }),
1757
+ };
1758
+ }
906
1759
  async function createAndEchoV2Session(client, directory, signal) {
907
1760
  const created = await client.createSession(directory, signal);
908
1761
  const id = created.id;
@@ -956,6 +1809,41 @@ async function challengeV2Gateway(input, run, client, sessionId, request, startu
956
1809
  return false;
957
1810
  }
958
1811
  const signal = request.signal ?? AbortSignal.timeout(request.timeoutMs);
1812
+ if (run.continuation === undefined) {
1813
+ return runGatewayChallenge(input, run, client, sessionId, signal);
1814
+ }
1815
+ return challengeInScratchSession(input, run, client, signal);
1816
+ }
1817
+ /**
1818
+ * The gateway recognises its readiness probe only as a request that holds nothing but the probe, so
1819
+ * a continued run, whose session holds a conversation, proves the route in a scratch session of its
1820
+ * own database and removes it again: the continued session never carries a handshake turn, and the
1821
+ * run's database ends up with exactly the one session the run works in.
1822
+ */
1823
+ async function challengeInScratchSession(input, run, client, signal) {
1824
+ let scratchId;
1825
+ try {
1826
+ const created = await client.createSession(run.workspaceRoot, signal);
1827
+ if (!validCreatedSession(created.id, created.location, run.workspaceRoot)) {
1828
+ throw new Error("opencode-v2-session-invalid");
1829
+ }
1830
+ scratchId = created.id;
1831
+ }
1832
+ catch {
1833
+ recordGatewayChallengeFailure(input.diagnostics, run.runId, "scratch-session-failed");
1834
+ return false;
1835
+ }
1836
+ const verified = await runGatewayChallenge(input, run, client, scratchId, signal);
1837
+ try {
1838
+ await client.removeSession(scratchId, signal);
1839
+ return verified;
1840
+ }
1841
+ catch {
1842
+ recordGatewayChallengeFailure(input.diagnostics, run.runId, "scratch-session-failed");
1843
+ return false;
1844
+ }
1845
+ }
1846
+ async function runGatewayChallenge(input, run, client, sessionId, signal) {
959
1847
  const observed = input.gatewayReadiness.waitForObservedRequest(run.runId, signal);
960
1848
  let verified = false;
961
1849
  try {
@@ -1040,14 +1928,16 @@ async function challengeToolFacade(input, bridge) {
1040
1928
  }
1041
1929
  }
1042
1930
  function verifiedProtocol(candidate, trusted) {
1931
+ // The discovered runtime's approved version selects its own producer-derived digests (#3908).
1932
+ const pin = openCodeRuntimeVersionPin(candidate.summary.upstreamVersion);
1043
1933
  return (candidate === trusted &&
1044
1934
  candidate.summary.status === "verified" &&
1045
- candidate.summary.upstreamVersion === OPENCODE_PINNED_VERSION &&
1935
+ pin !== undefined &&
1046
1936
  candidate.availability.protocolSchemaVerified &&
1047
- candidate.protocolSchemaRawSha256 === PINNED_RAW_SCHEMA_SHA256 &&
1937
+ candidate.protocolSchemaRawSha256 === pin.rawSchemaSha256 &&
1048
1938
  runtimeField(candidate, "protocolHandshakeAlgorithm") ===
1049
1939
  OPEN_CODE_V2_PROTOCOL_SURFACE_ALGORITHM &&
1050
- DIGEST.test(candidate.protocolHandshakeDigest));
1940
+ candidate.protocolHandshakeDigest === pin.protocolSurfaceSha256);
1051
1941
  }
1052
1942
  function runtimeField(value, key) {
1053
1943
  return typeof value === "object" && value !== null
@@ -1067,16 +1957,19 @@ function createPrivateState(runRoot) {
1067
1957
  mkdirSync(path, { recursive: true, mode: 0o700 });
1068
1958
  chmodSync(path, 0o700);
1069
1959
  }
1960
+ // The plan directory exists before launch: its kernel rule keeps the directories above it
1961
+ // from being created or replaced while the run is alive.
1070
1962
  for (const path of [
1071
- join(runRoot, "config", "opencode"),
1072
- join(runRoot, "config", "opencode", "plugins"),
1963
+ openCodeConfigDirectory(runRoot),
1964
+ join(openCodeConfigDirectory(runRoot), "plugins"),
1965
+ openCodePlanDirectory(runRoot),
1073
1966
  ]) {
1074
1967
  mkdirSync(path, { recursive: true, mode: 0o700 });
1075
1968
  chmodSync(path, 0o700);
1076
1969
  }
1077
1970
  }
1078
1971
  function materialize(runRoot, config, pluginSources) {
1079
- const discoveryRoot = join(runRoot, "config", "opencode");
1972
+ const discoveryRoot = openCodeConfigDirectory(runRoot);
1080
1973
  writePrivateFile(join(discoveryRoot, "opencode.json"), config);
1081
1974
  for (const [name, source] of Object.entries(pluginSources)) {
1082
1975
  writePrivateFile(join(discoveryRoot, "plugins", `${name}.ts`), source);
@@ -1088,8 +1981,8 @@ function writePrivateFile(path, value) {
1088
1981
  }
1089
1982
  function configMaterialized(runRoot) {
1090
1983
  try {
1091
- return (statSync(join(runRoot, "config", "opencode", "opencode.json")).isFile() &&
1092
- readFileSync(join(runRoot, "config", "opencode", "opencode.json"), "utf8").length > 0);
1984
+ return (statSync(join(openCodeConfigDirectory(runRoot), "opencode.json")).isFile() &&
1985
+ readFileSync(join(openCodeConfigDirectory(runRoot), "opencode.json"), "utf8").length > 0);
1093
1986
  }
1094
1987
  catch {
1095
1988
  return false;
@@ -1417,19 +2310,425 @@ function handleDirectToolRequest(active, deps, gate, input, context) {
1417
2310
  const read = nativeReadTransportValue(input.body);
1418
2311
  if (read !== undefined)
1419
2312
  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
2313
  const permission = parseV2PermissionRequest(input.body);
1424
2314
  if (permission !== undefined) {
1425
2315
  return handleV2PermissionRequest(permission, input.signal, deps, approvals, runs);
1426
2316
  }
2317
+ const nativePolicy = parseNativePolicyBody(input.body);
2318
+ if (nativePolicy !== undefined) {
2319
+ return handleNativePolicyRequest(nativePolicy, input.signal, deps, approvals, runs);
2320
+ }
2321
+ const webSearch = nativeWebSearchTransportValue(input.body);
2322
+ if (webSearch !== undefined) {
2323
+ const run = runs.get(webSearch.runId);
2324
+ return answerNativeWebSearch(deps.nativeWebSearch, webSearch, run?.ready === true && run.mode === "autonomous-delivery", input.signal);
2325
+ }
1427
2326
  const admission = gate.admit(toolBridgeRequestDeadlineMs(gate.limits.requestDeadlineMs, input.body));
1428
2327
  if (admission === undefined)
1429
2328
  return Promise.resolve({ status: 429, body: "" });
1430
2329
  const detachExternalAbort = bindExternalAbort(input.signal, admission);
1431
2330
  return executeToolRequest(deps, input.headers, input.body, admission).finally(detachExternalAbort);
1432
2331
  }
2332
+ function parseNativePolicyBody(body) {
2333
+ if (!validJson(body))
2334
+ return undefined;
2335
+ const parsed = JSON.parse(body);
2336
+ return v2Record(parsed)?.action === OPENCODE_NATIVE_POLICY_ACTION
2337
+ ? parseOpenCodeNativePolicyRequest(parsed)
2338
+ : undefined;
2339
+ }
2340
+ /**
2341
+ * The native permission hook's question (#3897): what is the final effect of this evaluated
2342
+ * OpenCode action for this run? The server-owned policy answers allow or deny at once, or puts the
2343
+ * action to the human through the run's approval lane and answers with the decision. Every answer
2344
+ * leaves a body-free line; an unready run, a foreign session or a malformed ask is refused.
2345
+ */
2346
+ async function handleNativePolicyRequest(request, signal, deps, approvals, runs) {
2347
+ const run = runs.get(request.runId);
2348
+ const sessionRelation = run?.ready === true
2349
+ ? await nativeSessionRelation(run, request.sessionID, signal, deps.diagnostics)
2350
+ : undefined;
2351
+ if (run?.ready !== true || sessionRelation === undefined) {
2352
+ return { status: 403, body: "", rejection: "approval-unavailable" };
2353
+ }
2354
+ const decided = decideOpenCodeNativePolicy({
2355
+ mode: run.mode,
2356
+ workspaceRoot: run.workspaceRoot,
2357
+ planRoot: openCodePlanDirectory(run.runRoot),
2358
+ request,
2359
+ nowMs: Date.now(),
2360
+ ...(run.mcp === undefined ? {} : { mcp: run.mcp }),
2361
+ ...(deps.externalReadRoots === undefined ? {} : { externalRoots: deps.externalReadRoots }),
2362
+ webSearch: deps.nativeWebSearch?.admitted === true,
2363
+ });
2364
+ const decision = admittedSessionMove(run, request, decided);
2365
+ const settled = await settleNativePolicyOutcome(run, decision, request, signal, deps, {
2366
+ approvals,
2367
+ sessionRelation,
2368
+ });
2369
+ return answerNativePolicy(run, request, decision, { ...settled, sessionRelation }, deps);
2370
+ }
2371
+ // #3903 AC3: the provider may search exactly the query the policy just allowed for this run.
2372
+ function grantAllowedWebSearch(run, request, outcome, deps) {
2373
+ const [query] = request.resources;
2374
+ if (request.permission === "websearch" && outcome === "allowed" && query !== undefined)
2375
+ deps.nativeWebSearch?.grant(run.runId, query);
2376
+ }
2377
+ // The settled decision becomes the hook's answer and its one body-free line; an approved
2378
+ // `worktree_create` is answered with the managed owner's result instead (#3903 AC4).
2379
+ async function answerNativePolicy(run, request, decision, settled, deps) {
2380
+ const { outcome } = settled;
2381
+ grantAllowedWebSearch(run, request, outcome, deps);
2382
+ const worktree = await nativeWorktreeOutcome(run, request, outcome, deps);
2383
+ if ((outcome !== "allowed" && outcome !== "approved") || worktree !== undefined)
2384
+ noteNativeCallRefused(deps, request);
2385
+ recordOpenCodeNativePolicyDecision(deps.activityLog, run.runId, {
2386
+ mode: run.mode,
2387
+ request,
2388
+ decision,
2389
+ outcome,
2390
+ sessionRelation: settled.sessionRelation,
2391
+ ...(settled.authority === undefined ? {} : { authority: settled.authority }),
2392
+ ...(worktree === undefined ? {} : { worktree: worktree.disposition }),
2393
+ });
2394
+ return worktree === undefined
2395
+ ? nativePolicyResult(outcome, decision)
2396
+ : nativePolicyResponse("deny", worktree.message);
2397
+ }
2398
+ /**
2399
+ * An approved Code Mode `worktree_create` is provisioned by Keiko's managed task-workspace owner
2400
+ * (#3903 AC4); the producer's own unmanaged worktree call is always blocked, and the model reads
2401
+ * the managed result as its message. `undefined` for every other action and for a refused one.
2402
+ */
2403
+ async function nativeWorktreeOutcome(run, request, outcome, deps) {
2404
+ if (request.permission !== OPENCODE_CODE_MODE_WORKTREE_CREATE)
2405
+ return undefined;
2406
+ if (outcome !== "allowed" && outcome !== "approved")
2407
+ return undefined;
2408
+ const [name] = request.resources;
2409
+ const port = deps.nativeWorktrees;
2410
+ return nativeWorktreeAnswer(port === undefined || name === undefined
2411
+ ? { ok: false, reason: "unavailable" }
2412
+ : await provisionedWorktree(port, run, name, deps.diagnostics));
2413
+ }
2414
+ // The managed owner records its classified failures itself; an unclassified one is recorded here,
2415
+ // body-free under the run's correlation, and still refuses the request.
2416
+ async function provisionedWorktree(port, run, name, diagnostics) {
2417
+ try {
2418
+ return await port.provision({
2419
+ runId: run.runId,
2420
+ workspaceRoot: run.workspaceRoot,
2421
+ name,
2422
+ correlationId: run.runId,
2423
+ });
2424
+ }
2425
+ catch (error) {
2426
+ emitServerDiagnostic(diagnostics, {
2427
+ correlationId: run.runId,
2428
+ timestamp: new Date().toISOString(),
2429
+ operation: "coding-runtime.tool-bridge",
2430
+ source: "opencode-runtime-composition.native-worktree",
2431
+ errorClass: contentFreeErrorClass(error),
2432
+ message: "native-worktree-provision-failed",
2433
+ });
2434
+ return { ok: false, reason: "provision-failed" };
2435
+ }
2436
+ }
2437
+ // A refused call ends as a failed tool in the runtime's history; the run's effort evidence reads it
2438
+ // as a refusal rather than a failure of the tool itself.
2439
+ function noteNativeCallRefused(deps, request) {
2440
+ if (request.source === undefined)
2441
+ return;
2442
+ deps.facade.nativeSettlement?.refused({
2443
+ messageId: request.source.messageID,
2444
+ callId: request.source.id,
2445
+ });
2446
+ }
2447
+ function nativePolicyResult(outcome, decision) {
2448
+ if (outcome === "allowed" || outcome === "approved")
2449
+ return nativePolicyResponse("allow");
2450
+ if (outcome === "authority-refused" || outcome === "cancelled")
2451
+ return nativePolicyResponse("deny", NATIVE_AUTHORITY_REFUSED_MESSAGE);
2452
+ if (decision.effect === "deny")
2453
+ return nativePolicyResponse("deny", decision.message);
2454
+ return nativePolicyResponse("deny", humanDecisionFeedback(outcome === "denied" ? "denied" : "expired"));
2455
+ }
2456
+ const NATIVE_AUTHORITY_REFUSED_MESSAGE = "Keiko refused this action: the run's authority is no longer valid or its budget is exhausted.";
2457
+ /**
2458
+ * The policy's answer, revalidated against live authority before an effect is released (#3897
2459
+ * review): an already-aborted ask is cancelled, and an allowed or human-approved action is
2460
+ * admitted through the facade's native-effect owner, which authenticates the capability, requires
2461
+ * the run to be running on its tree binding, checks the envelope's action classes and charges the
2462
+ * run's tool-call budget once per original tool invocation, reads included. A wiring without that
2463
+ * owner refuses every effect.
2464
+ */
2465
+ async function settleNativePolicyOutcome(run, decision, request, signal, deps, context) {
2466
+ const { approvals, sessionRelation } = context;
2467
+ if (signal?.aborted === true)
2468
+ return { outcome: "cancelled" };
2469
+ if (decision.effect === "deny")
2470
+ return { outcome: decision.reason };
2471
+ const outcome = decision.effect === "ask"
2472
+ ? await nativePolicyHumanDecision(run, decision, signal, deps, approvals)
2473
+ : "allowed";
2474
+ noteDeniedVerification(deps, request, outcome);
2475
+ if (outcome !== "allowed" && outcome !== "approved")
2476
+ return { outcome };
2477
+ const admission = nativeEffectAdmission(deps, decision.classification.actionClass, request, signal);
2478
+ if (!admission.ok)
2479
+ return { outcome: "authority-refused", authority: { reason: admission.reason } };
2480
+ noteAdmittedEditTargets(run, request);
2481
+ noteAdmittedEditEvidence(run, request, decision.classification, { deps, sessionRelation });
2482
+ noteAdmittedVerification(run, deps, request);
2483
+ return { outcome, authority: { charge: admission.charge } };
2484
+ }
2485
+ /** A human refused a project check: the run's verification is blocked, as for the governed one. */
2486
+ function noteDeniedVerification(deps, request, outcome) {
2487
+ if (outcome === "denied" && nativeVerificationKind(request) !== undefined)
2488
+ deps.facade.nativeSettlement?.verificationDenied?.();
2489
+ }
2490
+ /** The project check an admitted native shell call runs, if it is one (#3901). */
2491
+ function nativeVerificationKind(request) {
2492
+ return request.permission === "shell"
2493
+ ? openCodeNativeVerificationKind(request.resources)
2494
+ : undefined;
2495
+ }
2496
+ /** An admitted verification command, so its exit status can become the run's evidence (#3901). */
2497
+ function noteAdmittedVerification(run, deps, request) {
2498
+ const kind = nativeVerificationKind(request);
2499
+ if (kind === undefined || request.source === undefined)
2500
+ return;
2501
+ run.verificationCalls ??= new Set();
2502
+ rememberKey(run.verificationCalls, openCodeNativeCallKey(request.source.messageID, request.source.id));
2503
+ deps.facade.nativeSettlement?.verificationAdmitted?.({ messageId: request.source.messageID, callId: request.source.id }, kind);
2504
+ }
2505
+ /** The most admitted plan-note edits a run remembers until the runtime reports them settled. */
2506
+ const PLAN_NOTE_EDITS_MAX = 256;
2507
+ /**
2508
+ * What an admitted native edit means for the run's verification evidence (#3901). The plan agent's
2509
+ * notes in the run's private plan directory are planning: the policy classifies that edit as a
2510
+ * read, and its settlement does not count as a workspace edit. A workspace edit of a child session
2511
+ * is settled on the child, whose history the run does not read, so it counts from its admission.
2512
+ */
2513
+ function noteAdmittedEditEvidence(run, request, classification, context) {
2514
+ if (request.permission !== "edit" || request.source === undefined)
2515
+ return;
2516
+ if (classification.actionClass === "workspace-read") {
2517
+ rememberPlanNoteEdit(run, openCodeNativeCallKey(request.source.messageID, request.source.id));
2518
+ return;
2519
+ }
2520
+ if (context.sessionRelation === "child")
2521
+ context.deps.facade.nativeSettlement?.unsettledEdit?.();
2522
+ }
2523
+ function rememberPlanNoteEdit(run, key) {
2524
+ run.planNoteEdits ??= new Set();
2525
+ const notes = run.planNoteEdits;
2526
+ notes.add(key);
2527
+ if (notes.size > PLAN_NOTE_EDITS_MAX)
2528
+ notes.delete(notes.values().next().value ?? "");
2529
+ }
2530
+ /** A settled plan-note edit is no workspace edit; every other call keeps its tool's meaning. */
2531
+ function planNoteSettlement(run, messageId, callId) {
2532
+ return run.planNoteEdits?.delete(openCodeNativeCallKey(messageId, callId)) === true
2533
+ ? { workspaceEdit: false }
2534
+ : {};
2535
+ }
2536
+ /** An admitted native edit's targets, so its settlement can record what the turn itself wrote. */
2537
+ function noteAdmittedEditTargets(run, request) {
2538
+ if (request.source === undefined)
2539
+ return;
2540
+ const key = openCodeNativeCallKey(request.source.messageID, request.source.id);
2541
+ const files = openCodeNativeEditFiles(request, run.workspaceRoot);
2542
+ noteOpenCodeEditTargets(run, key, files);
2543
+ if (files.length === 0)
2544
+ return;
2545
+ run.editTargetsByCall ??= new Map();
2546
+ const targets = run.editTargetsByCall;
2547
+ targets.delete(key);
2548
+ targets.set(key, files);
2549
+ if (targets.size > STEP_EVIDENCE_MAX)
2550
+ targets.delete(targets.keys().next().value ?? "");
2551
+ }
2552
+ /** The most call and step facts a run remembers for its verification evidence. */
2553
+ const STEP_EVIDENCE_MAX = 1024;
2554
+ function rememberKey(keys, key) {
2555
+ keys.delete(key);
2556
+ keys.add(key);
2557
+ if (keys.size > STEP_EVIDENCE_MAX)
2558
+ keys.delete(keys.values().next().value ?? "");
2559
+ }
2560
+ /**
2561
+ * The workspace files a finished native step changed, weighed against the run's verification
2562
+ * evidence once per step (#3901). A file a native edit of the same step named is that edit's, which
2563
+ * its own settlement already counted; anything else (a shell command's or a child session's writes)
2564
+ * is a change no settlement reported, so it is the run's edit and a check must follow it. A step of
2565
+ * project checks alone changed only what the checks themselves write. The step is weighed when the
2566
+ * history shows it finished, before that read's tool settlements reach the ledger, so a check in a
2567
+ * later step still proves it.
2568
+ */
2569
+ function observeNativeStepChanges(input, run, messages) {
2570
+ const settlement = input.toolProfile === "native" ? input.toolFacade.nativeSettlement : undefined;
2571
+ if (settlement?.unsettledEdit === undefined)
2572
+ return;
2573
+ run.seenStepChanges ??= new Set();
2574
+ const seen = run.seenStepChanges;
2575
+ for (const change of openCodeV2StepChanges(messages)) {
2576
+ if (seen.has(change.messageId))
2577
+ continue;
2578
+ rememberKey(seen, change.messageId);
2579
+ const weighed = weighStepChange(run, change);
2580
+ if (weighed.outcome === "counted")
2581
+ settlement.unsettledEdit();
2582
+ recordNativeStepChanged(input.activityLog, run.runId, change, weighed);
2583
+ }
2584
+ }
2585
+ function weighStepChange(run, change) {
2586
+ const keys = change.callIds.map((callId) => openCodeNativeCallKey(change.messageId, callId));
2587
+ if (keys.length > 0 && keys.every((key) => run.verificationCalls?.has(key) === true))
2588
+ return { outcome: "verification-only", uncoveredCount: 0 };
2589
+ const covered = new Set(keys.flatMap((key) => run.editTargetsByCall?.get(key) ?? []));
2590
+ const uncoveredCount = change.files.filter((file) => !covered.has(file)).length + (change.truncated ? 1 : 0);
2591
+ return { outcome: uncoveredCount > 0 ? "counted" : "covered", uncoveredCount };
2592
+ }
2593
+ const NATIVE_STEP_CHANGED_OPERATION = defineActivityLogOperation({
2594
+ contractKind: "activity-log-operation",
2595
+ schemaVersion: 1,
2596
+ op: "coding-runtime.native-step.changed",
2597
+ category: "process",
2598
+ owner: "keiko-server",
2599
+ emitter: "coding-runtime.opencodeRuntimeComposition.recordNativeStepChanged",
2600
+ fields: {
2601
+ runId: { type: "string", dataClass: "opaque-id", required: true, maxLength: 128 },
2602
+ outcome: {
2603
+ type: "string",
2604
+ dataClass: "closed-enum",
2605
+ required: true,
2606
+ values: ["counted", "covered", "verification-only"],
2607
+ },
2608
+ fileCount: { type: "integer", dataClass: "count", required: true },
2609
+ uncoveredCount: { type: "integer", dataClass: "count", required: true },
2610
+ callCount: { type: "integer", dataClass: "count", required: true },
2611
+ fileList: {
2612
+ type: "string",
2613
+ dataClass: "closed-enum",
2614
+ required: true,
2615
+ values: ["complete", "truncated"],
2616
+ },
2617
+ },
2618
+ causal: "correlation",
2619
+ lifecycle: "state",
2620
+ analyzerProjection: "timeline",
2621
+ failureClasses: ["coding-runtime-native-policy"],
2622
+ proofIds: ["coding-runtime.native-step.changed.emitted-line"],
2623
+ releaseImpact: "patch",
2624
+ });
2625
+ /** One body-free line per weighed step: what it changed and whether it counts as the run's edit. */
2626
+ function recordNativeStepChanged(activityLog, runId, change, weighed) {
2627
+ (activityLog ?? processServerLogSink()).write(activityLogEvent(NATIVE_STEP_CHANGED_OPERATION, { correlationId: runId }, {
2628
+ runId,
2629
+ outcome: weighed.outcome,
2630
+ fileCount: change.files.length,
2631
+ uncoveredCount: weighed.uncoveredCount,
2632
+ callCount: change.callIds.length,
2633
+ fileList: change.truncated ? "truncated" : "complete",
2634
+ }));
2635
+ }
2636
+ function nativeEffectAdmission(deps, actionClass, request, signal) {
2637
+ if (signal?.aborted === true)
2638
+ return { ok: false, reason: "unavailable" };
2639
+ const { source, patchBytes } = request;
2640
+ return (deps.facade.nativeEffect?.admit({
2641
+ capability: deps.capability,
2642
+ actionClass,
2643
+ ...(patchBytes === undefined ? {} : { patchBytes }),
2644
+ ...(source === undefined
2645
+ ? {}
2646
+ : {
2647
+ invocation: {
2648
+ sessionId: request.sessionID,
2649
+ messageId: source.messageID,
2650
+ callId: source.id,
2651
+ },
2652
+ }),
2653
+ }) ?? { ok: false, reason: "unavailable" });
2654
+ }
2655
+ /**
2656
+ * Which native session asked: the run's own session, or a child session the original runtime
2657
+ * created under it (a subagent, #3897 review). The run's session tree decides
2658
+ * (`opencodeNativeSessionTree.ts`): a child is admitted once its `parentID` chain reaches the run's
2659
+ * session within a bounded depth and every session on the chain is located in the run's workspace;
2660
+ * the proof is read from the runtime's own session list and cached. Any other session, a failed
2661
+ * read or a full cache refuses the ask.
2662
+ */
2663
+ async function nativeSessionRelation(run, sessionID, signal, diagnostics) {
2664
+ if (run.sessionId === undefined || run.client === undefined)
2665
+ return undefined;
2666
+ try {
2667
+ return await classifyNativeSession(run.client, nativeSessionTree(run, run.sessionId), sessionID, signal);
2668
+ }
2669
+ catch (error) {
2670
+ // A failed read proves no ancestry, so the ask is refused; the failure itself is recorded
2671
+ // body-free under the run's correlation.
2672
+ emitServerDiagnostic(diagnostics, {
2673
+ correlationId: run.runId,
2674
+ timestamp: new Date().toISOString(),
2675
+ operation: "coding-runtime.tool-bridge",
2676
+ source: "opencode-runtime-composition.native-session-ancestry",
2677
+ errorClass: contentFreeErrorClass(error),
2678
+ message: "native-session-ancestry-failed",
2679
+ });
2680
+ return undefined;
2681
+ }
2682
+ }
2683
+ /** The run's session tree, sharing the run's admission cache of proven children. */
2684
+ function nativeSessionTree(run, sessionId) {
2685
+ run.childSessionIds ??= new Set();
2686
+ run.sessionLocations ??= new Set();
2687
+ return {
2688
+ sessionId,
2689
+ workspaceRoot: run.workspaceRoot,
2690
+ children: run.childSessionIds,
2691
+ locations: run.sessionLocations,
2692
+ };
2693
+ }
2694
+ // An allowed session move widens the run's tree to its directory before the move happens, so the
2695
+ // session's later children and jobs stay the run's (#3903 AC4); a tree at its bound refuses it.
2696
+ function admittedSessionMove(run, request, decision) {
2697
+ const directory = request.resources[0];
2698
+ if (decision.effect !== "allow" || request.permission !== OPENCODE_CODE_MODE_SESSION_MOVE)
2699
+ return decision;
2700
+ if (directory !== undefined &&
2701
+ run.sessionId !== undefined &&
2702
+ admitNativeSessionLocation(nativeSessionTree(run, run.sessionId), directory))
2703
+ return decision;
2704
+ return {
2705
+ effect: "deny",
2706
+ reason: "unsupported-action",
2707
+ message: "Keiko refused this action: the run already follows its bound of working directories. Keep working in one of them.",
2708
+ };
2709
+ }
2710
+ export { nativeSessionDescendsFromRun } from "./opencodeNativeSessionTree.js";
2711
+ // The ask goes to the human through the run's existing approval lane; the tool call it ends is
2712
+ // settled with the human's verdict like a governed ask (#3612).
2713
+ async function nativePolicyHumanDecision(run, decision, signal, deps, approvals) {
2714
+ if (run.onPermission === undefined || signal?.aborted === true)
2715
+ return "unavailable";
2716
+ const human = await approvals.requestNative({
2717
+ runId: run.runId,
2718
+ event: decision.event,
2719
+ actionId: decision.actionId,
2720
+ onPermission: run.onPermission,
2721
+ signal: signal ?? new AbortController().signal,
2722
+ });
2723
+ settleDecidedTool(deps.settleTool, human);
2724
+ return human.outcome;
2725
+ }
2726
+ function nativePolicyResponse(effect, message) {
2727
+ return {
2728
+ status: 200,
2729
+ body: JSON.stringify(message === undefined ? { effect } : { effect, message }),
2730
+ };
2731
+ }
1433
2732
  function parseV2PermissionRequest(body) {
1434
2733
  if (!validJson(body))
1435
2734
  return undefined;
@@ -1976,6 +3275,9 @@ async function executeBridgeInitialization(deps, producer, initialize, admission
1976
3275
  return { ok: false, reason: "initialization-failed" };
1977
3276
  }
1978
3277
  }
3278
+ function nativeWebSearchTransportValue(body) {
3279
+ return validJson(body) ? parseNativeWebSearchRequest(JSON.parse(body)) : undefined;
3280
+ }
1979
3281
  function nativeReadTransportValue(body) {
1980
3282
  if (!validJson(body))
1981
3283
  return undefined;
@@ -2094,20 +3396,20 @@ function nativeReadRangeForPhase(phase, range) {
2094
3396
  async function handleNativeReadTransport(value, signal, deps, runs, producer) {
2095
3397
  const packet = copyNativeReadTransportPacket(value);
2096
3398
  if (packet === undefined)
2097
- return nativeInitializationRefusal("invalid-request", 400);
3399
+ return nativeTransportRefusal("invalid-request", 400);
2098
3400
  const run = runs.get(packet.runId);
2099
3401
  try {
2100
3402
  if (producer?.fileIO === undefined || !nativeReadRunCurrent(deps, run))
2101
- return nativeInitializationRefusal("dispatch-refused");
3403
+ return nativeTransportRefusal("dispatch-refused");
2102
3404
  if (signal?.aborted === true)
2103
- return nativeInitializationRefusal("cancelled");
3405
+ return nativeTransportRefusal("cancelled");
2104
3406
  return await dispatchNativeReadTransport(packet, run, producer, signal, deps);
2105
3407
  }
2106
3408
  catch (error) {
2107
3409
  if (producer !== undefined && packet.phase !== "begin")
2108
3410
  void producer.close(packet.identity, "cancelled");
2109
3411
  emitFacadeFailureDiagnostic(deps.diagnostics, nativeReadPacketActionId(packet), error);
2110
- return nativeInitializationRefusal("dispatch-refused", 502);
3412
+ return nativeTransportRefusal("dispatch-refused", 502);
2111
3413
  }
2112
3414
  }
2113
3415
  function nativeReadPacketActionId(packet) {
@@ -2125,7 +3427,7 @@ function nativeReadRunCurrent(deps, run) {
2125
3427
  }
2126
3428
  async function beginNativeReadTransport(packet, run, producer, signal, deps) {
2127
3429
  if (packet.context.sessionID !== run.sessionId)
2128
- return nativeInitializationRefusal("dispatch-refused");
3430
+ return nativeTransportRefusal("dispatch-refused");
2129
3431
  const body = JSON.stringify({
2130
3432
  action: "read",
2131
3433
  relativePath: packet.relativePath,
@@ -2141,11 +3443,11 @@ async function beginNativeReadTransport(packet, run, producer, signal, deps) {
2141
3443
  ...(packet.limit === undefined ? {} : { limit: packet.limit }),
2142
3444
  });
2143
3445
  if (!result.ok)
2144
- return nativeInitializationRefusal(result.reason);
3446
+ return nativeTransportRefusal(result.reason);
2145
3447
  let delivered = false;
2146
3448
  try {
2147
3449
  if (!nativeReadBeginCurrent(packet, run, producer, result.identity, signal, deps))
2148
- return nativeInitializationRefusal("dispatch-refused");
3450
+ return nativeTransportRefusal("dispatch-refused");
2149
3451
  delivered = true;
2150
3452
  return {
2151
3453
  status: 200,
@@ -2170,7 +3472,7 @@ async function closeNativeReadTransport(packet, run, producer, signal, deps) {
2170
3472
  const ok = await producer.close(packet.identity, packet.outcome);
2171
3473
  return nativeReadRunCurrent(deps, run) && signal?.aborted !== true
2172
3474
  ? { status: 200, body: JSON.stringify({ ok }), nativeResult: true }
2173
- : nativeInitializationRefusal("dispatch-refused");
3475
+ : nativeTransportRefusal("dispatch-refused");
2174
3476
  }
2175
3477
  finally {
2176
3478
  detach();
@@ -2191,7 +3493,7 @@ function bindNativeReadDisconnect(signal, producer, identity) {
2191
3493
  async function nativeReadTransportIO(packet, run, producer, signal, deps) {
2192
3494
  const io = producer.fileIO;
2193
3495
  if (io === undefined)
2194
- return nativeInitializationRefusal("dispatch-refused");
3496
+ return nativeTransportRefusal("dispatch-refused");
2195
3497
  const detach = bindNativeReadDisconnect(signal, producer, packet.identity);
2196
3498
  const work = io[packet.phase](packet.identity, packet.input);
2197
3499
  void work.then((late) => {
@@ -2203,14 +3505,14 @@ async function nativeReadTransportIO(packet, run, producer, signal, deps) {
2203
3505
  if (signal?.aborted === true || !nativeReadIOCurrent(deps, run, result)) {
2204
3506
  wipeNativeIOBytes(result);
2205
3507
  void producer.close(packet.identity, "cancelled");
2206
- return nativeInitializationRefusal("dispatch-refused");
3508
+ return nativeTransportRefusal("dispatch-refused");
2207
3509
  }
2208
3510
  return nativeFileIOResponse(result);
2209
3511
  }
2210
3512
  catch (error) {
2211
3513
  if (signal?.aborted !== true)
2212
3514
  throw error;
2213
- return nativeInitializationRefusal("cancelled");
3515
+ return nativeTransportRefusal("cancelled");
2214
3516
  }
2215
3517
  finally {
2216
3518
  detach();
@@ -2231,36 +3533,6 @@ function wipeNativeIOBytes(result) {
2231
3533
  if (result.ok && "bytes" in result)
2232
3534
  result.bytes.fill(0);
2233
3535
  }
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
3536
  function initializationData(value) {
2265
3537
  if (typeof value !== "object" || value === null || Array.isArray(value))
2266
3538
  return undefined;
@@ -2280,27 +3552,6 @@ function initializationData(value) {
2280
3552
  function initialFields(record, keys) {
2281
3553
  return (Object.keys(record).length === keys.length && keys.every((key) => Object.hasOwn(record, key)));
2282
3554
  }
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
3555
  function copyInitializationRange(record, keys) {
2305
3556
  if (!Object.hasOwn(record, "range"))
2306
3557
  return initialFields(record, keys) ? undefined : false;
@@ -2313,113 +3564,13 @@ function copyInitializationRange(record, keys) {
2313
3564
  return false;
2314
3565
  return Object.freeze({ offset: range.offset, length: range.length });
2315
3566
  }
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
3567
  function initializationRootCurrent(deps, run) {
2335
3568
  const root = deps.resolveWorkspaceRootAccess?.();
2336
3569
  return root?.canonicalRoot === run.workspaceRoot;
2337
3570
  }
2338
- function nativeInitializationRefusal(reason, status = 409) {
3571
+ function nativeTransportRefusal(reason, status = 409) {
2339
3572
  return { status, body: JSON.stringify({ ok: false, reason }), nativeResult: true };
2340
3573
  }
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
3574
  function nativeFileIOResponse(result) {
2424
3575
  if (!result.ok) {
2425
3576
  if (result.reason === "wrong-kind")
@@ -2431,7 +3582,7 @@ function nativeFileIOResponse(result) {
2431
3582
  info: result.info,
2432
3583
  }),
2433
3584
  };
2434
- return nativeInitializationRefusal(result.reason);
3585
+ return nativeTransportRefusal(result.reason);
2435
3586
  }
2436
3587
  const bytes = nativeFileIOResultBytes(result);
2437
3588
  try {
@@ -2452,86 +3603,3 @@ function nativeFileIOResultBytes(result) {
2452
3603
  return encodeSecureWorkspaceNativeDirectory(result.entries);
2453
3604
  return new Uint8Array();
2454
3605
  }
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
- }