@oscharko-dev/keiko 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/README.md +27 -5
  2. package/dist/ui/csp-hashes.json +6 -6
  3. package/dist/ui/static/404.html +1 -1
  4. package/dist/ui/static/__next.__PAGE__.txt +8 -8
  5. package/dist/ui/static/__next._full.txt +8 -8
  6. package/dist/ui/static/__next._tree.txt +1 -1
  7. package/dist/ui/static/_next/static/chunks/{1layk925byvud.js → 0-o73vcl81gxp.js} +1 -1
  8. package/dist/ui/static/_next/static/chunks/{1na0aypin6kwh.js → 01nzk47fvnp1t.js} +1 -1
  9. package/dist/ui/static/_next/static/chunks/{0kx828qnu1y09.js → 02jl1lf3a8dud.js} +5 -5
  10. package/dist/ui/static/_next/static/chunks/05ckjqpq5fs4j.js +1 -0
  11. package/dist/ui/static/_next/static/chunks/0h-d1ht-slu-w.js +1 -0
  12. package/dist/ui/static/_next/static/chunks/0l2m0uaca7i0k.js +1 -0
  13. package/dist/ui/static/_next/static/chunks/1cvzxvmhd8k9g.js +1 -0
  14. package/dist/ui/static/_next/static/chunks/{0cpk4khbn9_uw.js → 1jh83l6i471hs.js} +1 -1
  15. package/dist/ui/static/_next/static/chunks/1ka7n7_t88nku.js +29 -0
  16. package/dist/ui/static/_next/static/chunks/{2dge_j5c5fie5.js → 1mvumqxojg5gz.js} +1 -1
  17. package/dist/ui/static/_next/static/chunks/1n5zoyzs4szlj.js +1 -0
  18. package/dist/ui/static/_next/static/chunks/1nz7wziy2b21i.js +1 -0
  19. package/dist/ui/static/_next/static/chunks/1ps1c2k2b450f.js +1 -0
  20. package/dist/ui/static/_next/static/chunks/1ufe9d586c16n.js +1 -0
  21. package/dist/ui/static/_next/static/chunks/{2mcajqb-umr1q.css → 1xyltb603pg9u.css} +1 -1
  22. package/dist/ui/static/_next/static/chunks/2ajat_rv2v0wp.js +1 -0
  23. package/dist/ui/static/_next/static/chunks/{272m__6w4ehe1.css → 2ayb5cby-2fpy.css} +9 -8
  24. package/dist/ui/static/_next/static/chunks/2gxdz5i19sf2x.js +1 -0
  25. package/dist/ui/static/_next/static/chunks/2l0_e_qyhvve_.js +1 -0
  26. package/dist/ui/static/_next/static/chunks/{0e-mzde0wr44_.js → 2ulu3p0ddze30.js} +1 -1
  27. package/dist/ui/static/_next/static/chunks/{2vmw7uw9qfxtm.js → 3-vp5mbiz_k0a.js} +1 -1
  28. package/dist/ui/static/_next/static/chunks/{1jychynbljt3y.js → 37k03e11rps3i.js} +1 -1
  29. package/dist/ui/static/_next/static/chunks/{2_c97y2pecrx2.js → 3_10vm9g45_8y.js} +1 -1
  30. package/dist/ui/static/_next/static/chunks/{2mk8qovgc1zl-.js → 3dgn8o9f1kc8m.js} +1 -1
  31. package/dist/ui/static/_next/static/chunks/{0bn9_5u9n-9b9.js → 3e-3pvlfnqvhc.js} +1 -1
  32. package/dist/ui/static/_next/static/chunks/{2ni4tm0tqgcdk.js → 3xsa-ukczporu.js} +1 -1
  33. package/dist/ui/static/_next/static/chunks/4598s2z_w_1la.js +1 -0
  34. package/dist/ui/static/_next/static/chunks/{turbopack-3-2dc0s_e9msx.js → turbopack-2n-b6-g15qsj4.js} +1 -1
  35. package/dist/ui/static/_not-found/__next._full.txt +3 -3
  36. package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +3 -3
  37. package/dist/ui/static/_not-found/__next._tree.txt +1 -1
  38. package/dist/ui/static/_not-found.html +1 -1
  39. package/dist/ui/static/_not-found.txt +3 -3
  40. package/dist/ui/static/atlassian-connectors/__next._full.txt +3 -3
  41. package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
  42. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +3 -3
  43. package/dist/ui/static/atlassian-connectors.html +1 -1
  44. package/dist/ui/static/atlassian-connectors.txt +3 -3
  45. package/dist/ui/static/index.html +1 -1
  46. package/dist/ui/static/index.txt +8 -8
  47. package/dist/ui/static/launch/__next._full.txt +8 -8
  48. package/dist/ui/static/launch/__next._tree.txt +1 -1
  49. package/dist/ui/static/launch/__next.launch.__PAGE__.txt +8 -8
  50. package/dist/ui/static/launch.html +1 -1
  51. package/dist/ui/static/launch.txt +8 -8
  52. package/dist/ui/static/local-knowledge/__next._full.txt +8 -8
  53. package/dist/ui/static/local-knowledge/__next._tree.txt +1 -1
  54. package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +8 -8
  55. package/dist/ui/static/local-knowledge/capsule/__next._full.txt +3 -3
  56. package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
  57. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +3 -3
  58. package/dist/ui/static/local-knowledge/capsule.html +1 -1
  59. package/dist/ui/static/local-knowledge/capsule.txt +3 -3
  60. package/dist/ui/static/local-knowledge.html +1 -1
  61. package/dist/ui/static/local-knowledge.txt +8 -8
  62. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory-data.generated.json +6 -3
  63. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts +5 -0
  64. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts.map +1 -1
  65. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.js +6 -0
  66. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.d.ts +7 -0
  67. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.d.ts.map +1 -1
  68. package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.js +9 -1
  69. package/node_modules/@oscharko-dev/keiko-activity-log/package.json +3 -3
  70. package/node_modules/@oscharko-dev/keiko-cli/dist/doctor.d.ts.map +1 -1
  71. package/node_modules/@oscharko-dev/keiko-cli/dist/doctor.js +28 -3
  72. package/node_modules/@oscharko-dev/keiko-cli/package.json +15 -15
  73. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.d.ts +1 -1
  74. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.js +1 -1
  75. package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
  76. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts +61 -1
  77. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts.map +1 -1
  78. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.js +70 -1
  79. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-coverage.generated.json +239 -4
  80. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-identity.generated.d.ts +1 -1
  81. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-identity.generated.js +1 -1
  82. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operation-surfaces.generated.json +3 -0
  83. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts +174 -4
  84. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts.map +1 -1
  85. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.js +218 -2
  86. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-safe-activity.d.ts +2 -0
  87. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-safe-activity.d.ts.map +1 -1
  88. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-safe-activity.js +3 -0
  89. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts +34 -0
  90. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts.map +1 -1
  91. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.js +81 -1
  92. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +2 -2
  93. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
  94. package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.d.ts +8 -0
  95. package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.d.ts.map +1 -1
  96. package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.js +26 -0
  97. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +2 -2
  98. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +2 -2
  99. package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace.d.ts +19 -1
  100. package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace.d.ts.map +1 -1
  101. package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
  102. package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
  103. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
  104. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
  105. package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
  106. package/node_modules/@oscharko-dev/keiko-git/dist/version.d.ts +1 -1
  107. package/node_modules/@oscharko-dev/keiko-git/dist/version.js +1 -1
  108. package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
  109. package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
  110. package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
  111. package/node_modules/@oscharko-dev/keiko-harness/package.json +7 -7
  112. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
  113. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
  114. package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
  115. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
  116. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
  117. package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
  118. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
  119. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
  120. package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
  121. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
  122. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
  123. package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
  124. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
  125. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
  126. package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
  127. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
  128. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
  129. package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
  130. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts +10 -0
  131. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts.map +1 -1
  132. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts.map +1 -1
  133. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.js +26 -11
  134. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
  135. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
  136. package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +4 -4
  137. package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
  138. package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.d.ts.map +1 -1
  139. package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.js +22 -3
  140. package/node_modules/@oscharko-dev/keiko-sandbox/dist/types.d.ts +6 -0
  141. package/node_modules/@oscharko-dev/keiko-sandbox/dist/types.d.ts.map +1 -1
  142. package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
  143. package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
  144. package/node_modules/@oscharko-dev/keiko-security/dist/content-redaction.d.ts +27 -0
  145. package/node_modules/@oscharko-dev/keiko-security/dist/content-redaction.d.ts.map +1 -0
  146. package/node_modules/@oscharko-dev/keiko-security/dist/content-redaction.js +32 -0
  147. package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts +2 -1
  148. package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts.map +1 -1
  149. package/node_modules/@oscharko-dev/keiko-security/dist/index.js +2 -1
  150. package/node_modules/@oscharko-dev/keiko-security/dist/redaction.d.ts +8 -0
  151. package/node_modules/@oscharko-dev/keiko-security/dist/redaction.d.ts.map +1 -1
  152. package/node_modules/@oscharko-dev/keiko-security/dist/redaction.js +36 -7
  153. package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
  154. package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
  155. package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
  156. package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-status.d.ts.map +1 -1
  157. package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-status.js +9 -2
  158. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts.map +1 -1
  159. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.js +12 -10
  160. package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-rehydration.d.ts +2 -1
  161. package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-rehydration.d.ts.map +1 -1
  162. package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-rehydration.js +22 -9
  163. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-diagnostics.d.ts +2 -1
  164. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-diagnostics.d.ts.map +1 -1
  165. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-token-summary.d.ts +2 -1
  166. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-token-summary.d.ts.map +1 -1
  167. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-token-summary.js +2 -2
  168. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget.d.ts +2 -1
  169. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget.d.ts.map +1 -1
  170. package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget.js +9 -6
  171. package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.d.ts.map +1 -1
  172. package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.js +5 -3
  173. package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.d.ts.map +1 -1
  174. package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.js +71 -11
  175. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/appSessionReadAuthority.d.ts +1 -1
  176. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/appSessionReadAuthority.d.ts.map +1 -1
  177. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/appSessionReadAuthority.js +8 -1
  178. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingAppSessionRoutes.d.ts +2 -1
  179. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingAppSessionRoutes.d.ts.map +1 -1
  180. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingAppSessionRoutes.js +53 -18
  181. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingRunSessionLease.d.ts +22 -0
  182. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingRunSessionLease.d.ts.map +1 -0
  183. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingRunSessionLease.js +182 -0
  184. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionChannel.d.ts +8 -0
  185. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionChannel.d.ts.map +1 -1
  186. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionChannel.js +31 -16
  187. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionStreamWriter.d.ts +34 -8
  188. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionStreamWriter.d.ts.map +1 -1
  189. package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionStreamWriter.js +157 -53
  190. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.d.ts.map +1 -1
  191. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.js +8 -1
  192. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts +6 -1
  193. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts.map +1 -1
  194. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.d.ts.map +1 -1
  195. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.js +12 -1
  196. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.d.ts.map +1 -1
  197. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.js +2 -1
  198. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts +20 -2
  199. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts.map +1 -1
  200. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts +1 -1
  201. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts.map +1 -1
  202. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolNativeEffect.js +23 -11
  203. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicy.d.ts +12 -0
  204. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicy.d.ts.map +1 -1
  205. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativePolicy.js +96 -0
  206. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts.map +1 -1
  207. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.js +18 -5
  208. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.d.ts.map +1 -1
  209. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.js +29 -5
  210. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.d.ts.map +1 -1
  211. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.js +106 -6
  212. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts.map +1 -1
  213. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.js +5 -0
  214. package/node_modules/@oscharko-dev/keiko-server/dist/content-redactor.d.ts +13 -0
  215. package/node_modules/@oscharko-dev/keiko-server/dist/content-redactor.d.ts.map +1 -0
  216. package/node_modules/@oscharko-dev/keiko-server/dist/content-redactor.js +33 -0
  217. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.d.ts +3 -1
  218. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.d.ts.map +1 -1
  219. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.js +1 -1
  220. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-gateway.d.ts +2 -2
  221. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-gateway.d.ts.map +1 -1
  222. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-gateway.js +3 -3
  223. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-prompt.d.ts +3 -1
  224. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-prompt.d.ts.map +1 -1
  225. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-prompt.js +10 -0
  226. package/node_modules/@oscharko-dev/keiko-server/dist/deps-activity.d.ts +4 -0
  227. package/node_modules/@oscharko-dev/keiko-server/dist/deps-activity.d.ts.map +1 -1
  228. package/node_modules/@oscharko-dev/keiko-server/dist/deps-activity.js +38 -0
  229. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +11 -1
  230. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
  231. package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +69 -26
  232. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +1 -1
  233. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
  234. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.js +0 -4
  235. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.d.ts.map +1 -1
  236. package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.js +11 -0
  237. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
  238. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +26 -13
  239. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionRoutes.d.ts.map +1 -1
  240. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionRoutes.js +7 -2
  241. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.d.ts.map +1 -1
  242. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.js +24 -6
  243. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-context-pack-reranker.d.ts.map +1 -1
  244. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-context-pack-reranker.js +2 -1
  245. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-conversation-continuity.d.ts.map +1 -1
  246. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-conversation-continuity.js +7 -5
  247. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-document-evidence.d.ts.map +1 -1
  248. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-document-evidence.js +4 -2
  249. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-eval-support.d.ts +1 -0
  250. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-eval-support.d.ts.map +1 -1
  251. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-eval-support.js +3 -0
  252. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.d.ts +3 -1
  253. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.d.ts.map +1 -1
  254. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.js +14 -1
  255. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt.d.ts +2 -1
  256. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt.d.ts.map +1 -1
  257. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt.js +10 -4
  258. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts.map +1 -1
  259. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.js +23 -21
  260. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts.map +1 -1
  261. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.js +17 -10
  262. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts +3 -1
  263. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts.map +1 -1
  264. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.js +30 -17
  265. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-repo-semantic-search.d.ts +6 -1
  266. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-repo-semantic-search.d.ts.map +1 -1
  267. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-repo-semantic-search.js +8 -1
  268. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-semantic-request.d.ts.map +1 -1
  269. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-semantic-request.js +6 -1
  270. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts.map +1 -1
  271. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.js +4 -3
  272. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-authority.d.ts.map +1 -1
  273. package/node_modules/@oscharko-dev/keiko-server/dist/markdown-skill-authority.js +7 -3
  274. package/node_modules/@oscharko-dev/keiko-server/dist/memory-salience.d.ts.map +1 -1
  275. package/node_modules/@oscharko-dev/keiko-server/dist/memory-salience.js +10 -1
  276. package/node_modules/@oscharko-dev/keiko-server/dist/request-deps-root.d.ts +8 -0
  277. package/node_modules/@oscharko-dev/keiko-server/dist/request-deps-root.d.ts.map +1 -0
  278. package/node_modules/@oscharko-dev/keiko-server/dist/request-deps-root.js +22 -0
  279. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts.map +1 -1
  280. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.js +12 -8
  281. package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.d.ts +2 -2
  282. package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.d.ts.map +1 -1
  283. package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.js +3 -3
  284. package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts +1 -0
  285. package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts.map +1 -1
  286. package/node_modules/@oscharko-dev/keiko-server/package.json +23 -23
  287. package/node_modules/@oscharko-dev/keiko-tool-catalog/package.json +3 -3
  288. package/node_modules/@oscharko-dev/keiko-tools/dist/exec.d.ts.map +1 -1
  289. package/node_modules/@oscharko-dev/keiko-tools/dist/exec.js +61 -12
  290. package/node_modules/@oscharko-dev/keiko-tools/dist/git-pr-node.d.ts.map +1 -1
  291. package/node_modules/@oscharko-dev/keiko-tools/dist/git-pr-node.js +22 -2
  292. package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
  293. package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
  294. package/node_modules/@oscharko-dev/keiko-tools/package.json +7 -7
  295. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.d.ts +2 -2
  296. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.d.ts.map +1 -1
  297. package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.js +20 -5
  298. package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
  299. package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
  300. package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.d.ts +8 -0
  301. package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.d.ts.map +1 -1
  302. package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.js +14 -3
  303. package/node_modules/@oscharko-dev/keiko-workspace/dist/importGraphEdges.d.ts.map +1 -1
  304. package/node_modules/@oscharko-dev/keiko-workspace/dist/importGraphEdges.js +4 -2
  305. package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.d.ts.map +1 -1
  306. package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.js +7 -5
  307. package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.d.ts.map +1 -1
  308. package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.js +4 -2
  309. package/node_modules/@oscharko-dev/keiko-workspace/dist/sourceRedaction.d.ts +5 -1
  310. package/node_modules/@oscharko-dev/keiko-workspace/dist/sourceRedaction.d.ts.map +1 -1
  311. package/node_modules/@oscharko-dev/keiko-workspace/dist/sourceRedaction.js +14 -6
  312. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
  313. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
  314. package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndex.d.ts +1 -0
  315. package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndex.d.ts.map +1 -1
  316. package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndex.js +4 -0
  317. package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
  318. package/package.json +28 -28
  319. package/release-impact.catalog.json +82 -0
  320. package/vendor/oscharko-dev-keiko-activity-log-1.3.1.tgz +0 -0
  321. package/vendor/oscharko-dev-keiko-cli-1.3.1.tgz +0 -0
  322. package/vendor/{oscharko-dev-keiko-connectors-1.3.0.tgz → oscharko-dev-keiko-connectors-1.3.1.tgz} +0 -0
  323. package/vendor/oscharko-dev-keiko-contracts-1.3.1.tgz +0 -0
  324. package/vendor/{oscharko-dev-keiko-evaluations-1.3.0.tgz → oscharko-dev-keiko-evaluations-1.3.1.tgz} +0 -0
  325. package/vendor/{oscharko-dev-keiko-evidence-1.3.0.tgz → oscharko-dev-keiko-evidence-1.3.1.tgz} +0 -0
  326. package/vendor/{oscharko-dev-keiko-git-1.3.0.tgz → oscharko-dev-keiko-git-1.3.1.tgz} +0 -0
  327. package/vendor/{oscharko-dev-keiko-harness-1.3.0.tgz → oscharko-dev-keiko-harness-1.3.1.tgz} +0 -0
  328. package/vendor/{oscharko-dev-keiko-local-knowledge-1.3.0.tgz → oscharko-dev-keiko-local-knowledge-1.3.1.tgz} +0 -0
  329. package/vendor/{oscharko-dev-keiko-memory-capture-1.3.0.tgz → oscharko-dev-keiko-memory-capture-1.3.1.tgz} +0 -0
  330. package/vendor/oscharko-dev-keiko-memory-consolidation-1.3.1.tgz +0 -0
  331. package/vendor/{oscharko-dev-keiko-memory-governance-1.3.0.tgz → oscharko-dev-keiko-memory-governance-1.3.1.tgz} +0 -0
  332. package/vendor/oscharko-dev-keiko-memory-retrieval-1.3.1.tgz +0 -0
  333. package/vendor/{oscharko-dev-keiko-memory-vault-1.3.0.tgz → oscharko-dev-keiko-memory-vault-1.3.1.tgz} +0 -0
  334. package/vendor/oscharko-dev-keiko-model-gateway-1.3.1.tgz +0 -0
  335. package/vendor/{oscharko-dev-keiko-quality-intelligence-1.3.0.tgz → oscharko-dev-keiko-quality-intelligence-1.3.1.tgz} +0 -0
  336. package/vendor/oscharko-dev-keiko-sandbox-1.3.1.tgz +0 -0
  337. package/vendor/oscharko-dev-keiko-sdk-1.3.1.tgz +0 -0
  338. package/vendor/oscharko-dev-keiko-security-1.3.1.tgz +0 -0
  339. package/vendor/oscharko-dev-keiko-server-1.3.1.tgz +0 -0
  340. package/vendor/oscharko-dev-keiko-tool-catalog-1.3.1.tgz +0 -0
  341. package/vendor/oscharko-dev-keiko-tools-1.3.1.tgz +0 -0
  342. package/vendor/oscharko-dev-keiko-verification-1.3.1.tgz +0 -0
  343. package/vendor/{oscharko-dev-keiko-workflows-1.3.0.tgz → oscharko-dev-keiko-workflows-1.3.1.tgz} +0 -0
  344. package/vendor/oscharko-dev-keiko-workspace-1.3.1.tgz +0 -0
  345. package/dist/ui/static/_next/static/chunks/04k2mahro7j92.js +0 -1
  346. package/dist/ui/static/_next/static/chunks/05822ttahyz33.js +0 -1
  347. package/dist/ui/static/_next/static/chunks/07957vlppntmk.js +0 -29
  348. package/dist/ui/static/_next/static/chunks/0unrefuwohxkf.js +0 -1
  349. package/dist/ui/static/_next/static/chunks/270j9fwgnu94m.js +0 -1
  350. package/dist/ui/static/_next/static/chunks/2he22glqm5s22.js +0 -1
  351. package/dist/ui/static/_next/static/chunks/2kqjvq-p_chx9.js +0 -1
  352. package/dist/ui/static/_next/static/chunks/2ym2gl1kulqav.js +0 -1
  353. package/dist/ui/static/_next/static/chunks/3e_kp81r43l1p.js +0 -1
  354. package/dist/ui/static/_next/static/chunks/3s1wb0rz0bdep.js +0 -1
  355. package/dist/ui/static/_next/static/chunks/3ucjnrrnoloze.js +0 -1
  356. package/dist/ui/static/_next/static/chunks/3w0ad9bnfy9s8.js +0 -1
  357. package/dist/ui/static/_next/static/chunks/43qb7fm2lvzfr.js +0 -1
  358. package/vendor/oscharko-dev-keiko-activity-log-1.3.0.tgz +0 -0
  359. package/vendor/oscharko-dev-keiko-cli-1.3.0.tgz +0 -0
  360. package/vendor/oscharko-dev-keiko-contracts-1.3.0.tgz +0 -0
  361. package/vendor/oscharko-dev-keiko-memory-consolidation-1.3.0.tgz +0 -0
  362. package/vendor/oscharko-dev-keiko-memory-retrieval-1.3.0.tgz +0 -0
  363. package/vendor/oscharko-dev-keiko-model-gateway-1.3.0.tgz +0 -0
  364. package/vendor/oscharko-dev-keiko-sandbox-1.3.0.tgz +0 -0
  365. package/vendor/oscharko-dev-keiko-sdk-1.3.0.tgz +0 -0
  366. package/vendor/oscharko-dev-keiko-security-1.3.0.tgz +0 -0
  367. package/vendor/oscharko-dev-keiko-server-1.3.0.tgz +0 -0
  368. package/vendor/oscharko-dev-keiko-tool-catalog-1.3.0.tgz +0 -0
  369. package/vendor/oscharko-dev-keiko-tools-1.3.0.tgz +0 -0
  370. package/vendor/oscharko-dev-keiko-verification-1.3.0.tgz +0 -0
  371. package/vendor/oscharko-dev-keiko-workspace-1.3.0.tgz +0 -0
  372. /package/dist/ui/static/_next/static/{6pkGWU1F8PM1C3Cb4rVAo → UsrqVgAeCxovpV7C_di1N}/_buildManifest.js +0 -0
  373. /package/dist/ui/static/_next/static/{6pkGWU1F8PM1C3Cb4rVAo → UsrqVgAeCxovpV7C_di1N}/_clientMiddlewareManifest.js +0 -0
  374. /package/dist/ui/static/_next/static/{6pkGWU1F8PM1C3Cb4rVAo → UsrqVgAeCxovpV7C_di1N}/_ssgManifest.js +0 -0
@@ -84,6 +84,7 @@ function inactiveSubscription(snapshot) {
84
84
  live: false,
85
85
  stop: () => undefined,
86
86
  detach: () => undefined,
87
+ reportBackpressure: () => undefined,
87
88
  };
88
89
  }
89
90
  function rejectedSourceSubscription(source, detach, snapshot) {
@@ -108,25 +109,30 @@ function makeDetach(lifecycle, admission) {
108
109
  admission.release();
109
110
  };
110
111
  }
111
- function makePublish(lifecycle, validity, listener, detach, diagnostics, correlationId, deferAdmissionReleaseOnBackpressure) {
112
+ function makeBackpressureReport(lifecycle, detach, diagnostics, correlationId, deferAdmissionReleaseOnBackpressure) {
113
+ return () => {
114
+ if (!lifecycle.active)
115
+ return;
116
+ // KEIKO-0225: previously a stream that dropped for backpressure detached with nothing to
117
+ // diagnose. Report it once so operators can see a stream that dropped.
118
+ recordSseFailure(diagnostics, correlationId, "sse-backpressure", "Error");
119
+ if (deferAdmissionReleaseOnBackpressure)
120
+ stopLiveSource(lifecycle);
121
+ else
122
+ detach();
123
+ };
124
+ }
125
+ function makePublish(lifecycle, validity, listener, detach, reportBackpressure, diagnostics, correlationId) {
112
126
  return (content) => {
113
127
  if (!lifecycle.active)
114
128
  return;
115
129
  const valid = validity();
116
130
  try {
117
131
  const accepted = listener(valid ? snapshotForContent(content) : contentFreeCodingAppSessionChannelSnapshot());
118
- if (!valid) {
132
+ if (!valid)
119
133
  detach();
120
- }
121
- else if (!accepted) {
122
- // KEIKO-0225: previously a listener returning `false` silently detached with nothing to
123
- // diagnose. Report backpressure once so operators can see a stream that dropped.
124
- recordSseFailure(diagnostics, correlationId, "sse-backpressure", "Error");
125
- if (deferAdmissionReleaseOnBackpressure)
126
- stopLiveSource(lifecycle);
127
- else
128
- detach();
129
- }
134
+ else if (!accepted)
135
+ reportBackpressure();
130
136
  }
131
137
  catch (error) {
132
138
  recordSseFailure(diagnostics, correlationId, "sse-listener-failed", contentFreeErrorClass(error));
@@ -134,8 +140,16 @@ function makePublish(lifecycle, validity, listener, detach, diagnostics, correla
134
140
  }
135
141
  };
136
142
  }
143
+ // The publish path and its backpressure report share one lifecycle: a refused write and a stall
144
+ // reported by the stream writer end the subscription the same way.
145
+ function livePublisher(input, lifecycle, detach, validity) {
146
+ const { diagnostics, correlationId } = input;
147
+ const reportBackpressure = makeBackpressureReport(lifecycle, detach, diagnostics, correlationId, input.deferAdmissionReleaseOnBackpressure);
148
+ const publish = makePublish(lifecycle, validity, input.listener, detach, reportBackpressure, diagnostics, correlationId);
149
+ return { publish, reportBackpressure };
150
+ }
137
151
  function liveSubscription(input) {
138
- const { registry, contentSource, cookieToken, snapshot, listener, admission, diagnostics, correlationId, deferAdmissionReleaseOnBackpressure, } = input;
152
+ const { registry, contentSource, cookieToken, snapshot, admission } = input;
139
153
  if (!admission.acquire())
140
154
  return inactiveSubscription(snapshot);
141
155
  const lifecycle = {
@@ -148,13 +162,13 @@ function liveSubscription(input) {
148
162
  stopLiveSource(lifecycle);
149
163
  };
150
164
  const validity = () => registry.inspect(cookieToken) !== undefined;
151
- const publish = makePublish(lifecycle, validity, listener, detach, diagnostics, correlationId, deferAdmissionReleaseOnBackpressure);
165
+ const { publish, reportBackpressure } = livePublisher(input, lifecycle, detach, validity);
152
166
  const sourceSubscription = contentSource.subscribeContent?.(publish);
153
167
  if (!sourceSubscription?.admitted)
154
168
  return rejectedSourceSubscription(sourceSubscription, detach, snapshot);
155
169
  if (!lifecycle.active) {
156
170
  sourceSubscription.detach();
157
- return { snapshot, live: false, stop, detach };
171
+ return { snapshot, live: false, stop, detach, reportBackpressure };
158
172
  }
159
173
  lifecycle.sourceDetach = sourceSubscription.detach;
160
174
  lifecycle.expiryTimer = setInterval(() => {
@@ -162,7 +176,7 @@ function liveSubscription(input) {
162
176
  publish(null);
163
177
  }, 1_000);
164
178
  lifecycle.expiryTimer.unref();
165
- return { snapshot, live: true, stop, detach };
179
+ return { snapshot, live: true, stop, detach, reportBackpressure };
166
180
  }
167
181
  function makeLiveSubscriptionAdmission() {
168
182
  let liveSubscriptions = 0;
@@ -241,6 +255,7 @@ export function createCodingAppSessionChannel(deps) {
241
255
  sessionCount: () => registry.sessionCount(),
242
256
  verifySession: (cookieToken) => registry.verify(cookieToken),
243
257
  inspectOperationCount: (cookieToken) => registry.inspectOperationCount(cookieToken),
258
+ isSessionLive: (sessionId) => registry.inspectSession(sessionId) !== undefined,
244
259
  beginOperation: (cookieToken) => registry.beginOperation(cookieToken),
245
260
  subscribe: (cookieToken, listener, options) => subscribeToContent(registry, contentSource, cookieToken, listener, admission, diagnostics, options?.deferAdmissionReleaseOnBackpressure ?? false),
246
261
  };
@@ -1,15 +1,41 @@
1
1
  import type { ServerResponse } from "node:http";
2
2
  import { type ServerDiagnosticSink } from "../diagnostics-log.js";
3
3
  import type { CodingAppSessionChannelSnapshot } from "./channelContract.js";
4
- /** The existing SSE counter records counts and termination, never authenticated frame content. */
5
- export declare function writeSessionStreamFrame(res: ServerResponse, frame: string, correlationId?: string, destroyOnBackpressure?: boolean): boolean;
6
- export declare function createSessionStreamWriter(res: ServerResponse, close: () => void, correlationId: string | undefined): {
4
+ /**
5
+ * How long one buffered app-session frame may wait for its peer to drain it, and how long a closing
6
+ * stream may take to flush. `res.write()` returning `false` only says that Node's buffer is above its
7
+ * high-water mark — Node 24 answers so for any single write of 64 KiB or more, even to an idle local
8
+ * browser — so a frame that drains within this bound is ordinary flow, not a stalled client.
9
+ */
10
+ export declare const CODING_APP_SESSION_STREAM_DRAIN_TIMEOUT_MS = 1000;
11
+ /** Body-free counts of the stream's flow control, for its `coding-app-session.channel.closed` line. */
12
+ export interface SessionStreamFlowCounts {
13
+ /** Writes that left the buffer above its high-water mark and then waited for `drain`. */
14
+ readonly drainWaitCount: number;
15
+ /** Snapshots replaced by a newer one while a frame drained; the newest is the one written. */
16
+ readonly coalescedSnapshotCount: number;
17
+ }
18
+ export interface SessionStreamWriter {
7
19
  readonly isClosing: () => boolean;
20
+ /** The channel listener. It only answers `false` after the response itself rejected the write. */
8
21
  readonly publish: (snapshot: CodingAppSessionChannelSnapshot) => boolean;
9
- };
10
- /** Initial writes and timer callbacks have no publishing channel to catch their transport errors. */
11
- export declare function createSessionStreamTransport(res: ServerResponse, correlationId: string | undefined, diagnostics: ServerDiagnosticSink | undefined): {
12
- readonly write: (snapshot: CodingAppSessionChannelSnapshot) => boolean;
22
+ /** Writes the subscription's first snapshot; `false` only when the transport failed outright. */
23
+ readonly writeInitial: (snapshot: CodingAppSessionChannelSnapshot) => boolean;
13
24
  readonly heartbeat: () => void;
14
- };
25
+ readonly flowCounts: () => SessionStreamFlowCounts;
26
+ }
27
+ export interface SessionStreamWriterInput {
28
+ readonly res: ServerResponse;
29
+ readonly correlationId: string | undefined;
30
+ readonly diagnostics: ServerDiagnosticSink | undefined;
31
+ /** Ends the stream; the route flushes and bounds what is still buffered. */
32
+ readonly close: () => void;
33
+ /** The peer did not drain a frame within the bound: report it once and stop publishing. */
34
+ readonly onStalled: () => void;
35
+ }
36
+ /** The existing SSE counter records counts and termination, never authenticated frame content. */
37
+ export declare function writeSessionStreamFrame(res: ServerResponse, frame: string, correlationId?: string): boolean;
38
+ /** A stream without a composed channel serves one content-free snapshot and ends. */
39
+ export declare function writeContentFreeSessionStream(res: ServerResponse, snapshot: CodingAppSessionChannelSnapshot, correlationId: string | undefined, diagnostics: ServerDiagnosticSink | undefined): void;
40
+ export declare function createSessionStreamWriter(input: SessionStreamWriterInput): SessionStreamWriter;
15
41
  //# sourceMappingURL=sessionStreamWriter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sessionStreamWriter.d.ts","sourceRoot":"","sources":["../../src/coding-app-session/sessionStreamWriter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AAE5E,kGAAkG;AAClG,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,MAAM,EACb,aAAa,GAAE,MAA+B,EAC9C,qBAAqB,UAAO,GAC3B,OAAO,CAcT;AAED,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,MAAM,IAAI,EACjB,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC;IACD,QAAQ,CAAC,SAAS,EAAE,MAAM,OAAO,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,+BA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,EAAE,cAAc,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACvD,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;IAC3B,2FAA2F;IAC3F,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC;CAChC;AAED,kGAAkG;AAClG,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,MAAM,EACb,aAAa,GAAE,MAA+B,GAC7C,OAAO,CAST;AA4BD,qFAAqF;AACrF,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,+BAA+B,EACzC,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,WAAW,EAAE,oBAAoB,GAAG,SAAS,GAC5C,IAAI,CAON;AAkJD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,wBAAwB,GAAG,mBAAmB,CAE9F"}
@@ -1,17 +1,18 @@
1
1
  import { emitServerDiagnostic, serverDiagnosticFromError, } from "../diagnostics-log.js";
2
2
  import { UNKNOWN_CORRELATION_ID } from "../correlation.js";
3
3
  import { markSseStreamBackpressureKilled, markSseStreamServerErrored, recordSseStreamFrame, } from "../sse-write.js";
4
+ /**
5
+ * How long one buffered app-session frame may wait for its peer to drain it, and how long a closing
6
+ * stream may take to flush. `res.write()` returning `false` only says that Node's buffer is above its
7
+ * high-water mark — Node 24 answers so for any single write of 64 KiB or more, even to an idle local
8
+ * browser — so a frame that drains within this bound is ordinary flow, not a stalled client.
9
+ */
10
+ export const CODING_APP_SESSION_STREAM_DRAIN_TIMEOUT_MS = 1_000;
4
11
  /** The existing SSE counter records counts and termination, never authenticated frame content. */
5
- export function writeSessionStreamFrame(res, frame, correlationId = UNKNOWN_CORRELATION_ID, destroyOnBackpressure = true) {
12
+ export function writeSessionStreamFrame(res, frame, correlationId = UNKNOWN_CORRELATION_ID) {
6
13
  recordSseStreamFrame(res, frame, correlationId);
7
14
  try {
8
- const accepted = res.write(frame);
9
- if (!accepted) {
10
- markSseStreamBackpressureKilled(res);
11
- if (destroyOnBackpressure)
12
- res.destroy();
13
- }
14
- return accepted;
15
+ return res.write(frame);
15
16
  }
16
17
  catch (error) {
17
18
  markSseStreamServerErrored(res);
@@ -19,61 +20,164 @@ export function writeSessionStreamFrame(res, frame, correlationId = UNKNOWN_CORR
19
20
  throw error;
20
21
  }
21
22
  }
22
- export function createSessionStreamWriter(res, close, correlationId) {
23
- let closing = false;
24
- const finish = () => {
25
- closing = true;
26
- queueMicrotask(close);
27
- };
28
- return {
29
- isClosing: () => closing,
30
- publish: (snapshot) => {
31
- if (closing)
32
- return true;
33
- if (res.destroyed || res.writableEnded) {
34
- finish();
35
- return true;
36
- }
37
- try {
38
- const frame = `event: snapshot\ndata: ${JSON.stringify(snapshot)}\n\n`;
39
- // Node has already accepted this single frame into its bounded buffer. The publisher
40
- // detaches on `false`; its queued close can therefore flush the frame without accepting
41
- // any more channel content or turning transient pressure into a client network error.
42
- const accepted = writeSessionStreamFrame(res, frame, correlationId, false);
43
- if (!accepted || snapshot.content === null)
44
- finish();
45
- // A successfully written content-free terminal frame is not transport backpressure.
46
- return accepted;
47
- }
48
- catch (error) {
49
- finish();
50
- // The existing channel owner records the structured, body-free listener diagnostic.
51
- throw error;
52
- }
53
- },
54
- };
23
+ function snapshotFrame(snapshot) {
24
+ return `event: snapshot\ndata: ${JSON.stringify(snapshot)}\n\n`;
55
25
  }
56
- function guardedSessionStreamFrame(res, frame, correlationId, diagnostics, source) {
26
+ function guardedSessionStreamFrame(input, frame, source) {
57
27
  try {
58
- return writeSessionStreamFrame(res, frame, correlationId);
28
+ return writeSessionStreamFrame(input.res, frame, input.correlationId);
59
29
  }
60
30
  catch (error) {
61
- emitServerDiagnostic(diagnostics, serverDiagnosticFromError({
62
- correlationId: correlationId ?? UNKNOWN_CORRELATION_ID,
31
+ emitServerDiagnostic(input.diagnostics, serverDiagnosticFromError({
32
+ correlationId: input.correlationId ?? UNKNOWN_CORRELATION_ID,
63
33
  operation: "coding-app-session.channel.subscribe",
64
34
  source,
65
35
  error,
66
36
  redact: () => "sse-listener-failed",
67
37
  }));
68
- return false;
38
+ return "failed";
69
39
  }
70
40
  }
71
- /** Initial writes and timer callbacks have no publishing channel to catch their transport errors. */
72
- export function createSessionStreamTransport(res, correlationId, diagnostics) {
73
- return {
74
- write: (snapshot) => guardedSessionStreamFrame(res, `event: snapshot\ndata: ${JSON.stringify(snapshot)}\n\n`, correlationId, diagnostics, "coding-app-session.session-channel.initial"),
75
- heartbeat: () => {
76
- guardedSessionStreamFrame(res, ": heartbeat\n\n", correlationId, diagnostics, "coding-app-session.session-channel.heartbeat");
77
- },
41
+ /** A stream without a composed channel serves one content-free snapshot and ends. */
42
+ export function writeContentFreeSessionStream(res, snapshot, correlationId, diagnostics) {
43
+ guardedSessionStreamFrame({ res, correlationId, diagnostics }, snapshotFrame(snapshot), "coding-app-session.session-channel.initial");
44
+ if (!res.writableEnded && !res.destroyed)
45
+ res.end();
46
+ }
47
+ /**
48
+ * The app-session stream's one writer. A snapshot is the complete current projection, so while one
49
+ * frame drains only the newest pending snapshot is kept and written on `drain` (latest wins). A peer
50
+ * that does not drain within {@link CODING_APP_SESSION_STREAM_DRAIN_TIMEOUT_MS} is the stalled client
51
+ * KEIKO-0225 reports: the stream stops publishing and closes; the route keeps that close bounded.
52
+ */
53
+ class AppSessionStreamWriter {
54
+ input;
55
+ closing = false;
56
+ draining = false;
57
+ // The frame being drained was the channel's content-free terminal frame.
58
+ terminalDraining = false;
59
+ pending;
60
+ stallTimer;
61
+ drainWaitCount = 0;
62
+ coalescedSnapshotCount = 0;
63
+ onDrain = () => {
64
+ this.drained();
65
+ };
66
+ onStall = () => {
67
+ this.stalled();
68
+ };
69
+ constructor(input) {
70
+ this.input = input;
71
+ input.res.once("close", () => {
72
+ this.stopWaiting();
73
+ });
74
+ }
75
+ isClosing = () => this.closing;
76
+ publish = (snapshot) => {
77
+ const { res } = this.input;
78
+ if (this.closing)
79
+ return true;
80
+ if (res.destroyed || res.writableEnded) {
81
+ this.finish();
82
+ return true;
83
+ }
84
+ if (this.draining) {
85
+ if (this.pending !== undefined)
86
+ this.coalescedSnapshotCount += 1;
87
+ this.pending = snapshot;
88
+ return true;
89
+ }
90
+ try {
91
+ const accepted = writeSessionStreamFrame(res, snapshotFrame(snapshot), this.input.correlationId);
92
+ this.settleWrite(accepted ? "sent" : "queued", snapshot);
93
+ return true;
94
+ }
95
+ catch (error) {
96
+ this.finish();
97
+ // The existing channel owner records the structured, body-free listener diagnostic.
98
+ throw error;
99
+ }
78
100
  };
101
+ writeInitial = (snapshot) => {
102
+ const written = guardedSessionStreamFrame(this.input, snapshotFrame(snapshot), "coding-app-session.session-channel.initial");
103
+ if (written === "failed")
104
+ return false;
105
+ if (!written)
106
+ this.awaitDrain(false);
107
+ return true;
108
+ };
109
+ heartbeat = () => {
110
+ // A frame still draining already proves the stream is alive; nothing is queued behind it.
111
+ if (this.closing || this.draining)
112
+ return;
113
+ const written = guardedSessionStreamFrame(this.input, ": heartbeat\n\n", "coding-app-session.session-channel.heartbeat");
114
+ if (written === "failed")
115
+ this.finish();
116
+ else if (!written)
117
+ this.awaitDrain(false);
118
+ };
119
+ flowCounts = () => ({
120
+ drainWaitCount: this.drainWaitCount,
121
+ coalescedSnapshotCount: this.coalescedSnapshotCount,
122
+ });
123
+ // A written frame either went out, waits for its drain, or ends the stream when it was terminal.
124
+ settleWrite(outcome, snapshot) {
125
+ const terminal = snapshot.content === null;
126
+ if (outcome === "queued")
127
+ this.awaitDrain(terminal);
128
+ else if (terminal)
129
+ this.finish();
130
+ }
131
+ awaitDrain(terminal) {
132
+ this.draining = true;
133
+ this.terminalDraining = terminal;
134
+ this.drainWaitCount += 1;
135
+ this.input.res.once("drain", this.onDrain);
136
+ this.stallTimer = setTimeout(this.onStall, CODING_APP_SESSION_STREAM_DRAIN_TIMEOUT_MS);
137
+ this.stallTimer.unref();
138
+ }
139
+ stopWaiting() {
140
+ this.draining = false;
141
+ this.pending = undefined;
142
+ this.input.res.off("drain", this.onDrain);
143
+ if (this.stallTimer !== undefined)
144
+ clearTimeout(this.stallTimer);
145
+ this.stallTimer = undefined;
146
+ }
147
+ drained() {
148
+ const next = this.pending;
149
+ const terminal = this.terminalDraining;
150
+ this.stopWaiting();
151
+ if (this.closing)
152
+ return;
153
+ if (terminal) {
154
+ this.finish();
155
+ return;
156
+ }
157
+ if (next === undefined)
158
+ return;
159
+ const written = guardedSessionStreamFrame(this.input, snapshotFrame(next), "coding-app-session.session-channel.drain");
160
+ if (written === "failed")
161
+ this.finish();
162
+ else
163
+ this.settleWrite(written ? "sent" : "queued", next);
164
+ }
165
+ stalled() {
166
+ this.stopWaiting();
167
+ if (this.closing)
168
+ return;
169
+ markSseStreamBackpressureKilled(this.input.res);
170
+ this.input.onStalled();
171
+ this.finish();
172
+ }
173
+ finish() {
174
+ if (this.closing)
175
+ return;
176
+ this.closing = true;
177
+ this.stopWaiting();
178
+ queueMicrotask(this.input.close);
179
+ }
180
+ }
181
+ export function createSessionStreamWriter(input) {
182
+ return new AppSessionStreamWriter(input);
79
183
  }
@@ -1 +1 @@
1
- {"version":3,"file":"codingRuntimeRoutes.d.ts","sourceRoot":"","sources":["../../src/coding-runtime/codingRuntimeRoutes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAsCjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAybxE,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,YAAY,E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
11
  import { unpairedCodingWorkbenchRuntimeResearchChannelPayload } from "@oscharko-dev/keiko-contracts/runtime/coding-workbench-runtime-research";
12
12
  import { activityLogEvent, defineActivityLogOperation, } from "@oscharko-dev/keiko-contracts/runtime/observability";
13
13
  import { resolveAppSessionReadAuthority } from "../coding-app-session/appSessionReadAuthority.js";
14
+ import { holdAppSessionForCodingRun } from "../coding-app-session/codingRunSessionLease.js";
14
15
  import { UNKNOWN_CORRELATION_ID } from "../correlation.js";
15
16
  import { processServerLogSink } from "../process-log-sink.js";
16
17
  import { errorBody, STREAMING, } from "../routes.js";
@@ -312,6 +313,12 @@ function requireMutationAuthority(ctx, deps, runId, concealment) {
312
313
  }
313
314
  : notFound(ctx.correlationId);
314
315
  }
316
+ // An admitted mutation that leaves its run active keeps the requesting session active for the run
317
+ // (ADR-0141 D5): a quiet model turn must not unpair the window that started it.
318
+ function admittedMutation(deps, ctx, orchestrator, snapshot) {
319
+ holdAppSessionForCodingRun(deps, ctx.req, snapshot, (id) => orchestrator.getSnapshot(id)?.state);
320
+ return { status: 200, body: snapshot };
321
+ }
315
322
  async function mutation(ctx, deps, runId, operationName, invoke, concealment) {
316
323
  const denied = requireMutationAuthority(ctx, deps, runId, concealment);
317
324
  if (denied !== undefined) {
@@ -335,7 +342,7 @@ async function mutation(ctx, deps, runId, operationName, invoke, concealment) {
335
342
  }
336
343
  const result = await invoke(required.orchestrator, body, ctx.correlationId);
337
344
  if (result.ok)
338
- return { status: 200, body: result.snapshot };
345
+ return admittedMutation(deps, ctx, required.orchestrator, result.snapshot);
339
346
  // The refusal line names the run the refusal happened under, so this request-scoped line joins
340
347
  // the run-scoped lines that carry the cause (see CodingRuntimeOrchestratorResult.runId). The
341
348
  // result's run id comes first: a refused start or retry minted a NEW run before it was refused,
@@ -43,13 +43,18 @@ export type CodingSafeActivitySignal = (SignalBase & {
43
43
  readonly tool?: string | undefined;
44
44
  readonly state: CodingSafeActivityToolState;
45
45
  readonly presentation?: CodingSafeActivityToolPresentation;
46
- /** A finished native `shell` call's exit status: run evidence only, never projected. */
46
+ /**
47
+ * A finished native `shell` call's exit status for run evidence; the composition removes it
48
+ * here and the timeline receives the number alone as `presentation.exitCode`.
49
+ */
47
50
  readonly exitCode?: number | undefined;
48
51
  /**
49
52
  * The project check that exit status speaks for, read from the finished call's whole command
50
53
  * line; absent when the line is no check or another command could decide its status.
51
54
  */
52
55
  readonly exitStatusCheck?: VerificationKind | undefined;
56
+ /** The finished call ran in a working directory it named itself, not the session's. */
57
+ readonly ownWorkdir?: boolean | undefined;
53
58
  }) | (SignalBase & {
54
59
  readonly kind: "plan";
55
60
  readonly anchorMessageId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"codingSafeActivityProjection.d.ts","sourceRoot":"","sources":["../../src/coding-runtime/codingSafeActivityProjection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,6BAA6B,EAC7B,+BAA+B,EAG/B,2BAA2B,EAE3B,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAkBL,KAAK,kCAAkC,EAExC,MAAM,4DAA4D,CAAC;AACpE,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,wDAAwD,CAAC;AAOhE,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAUtE;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,oBAAoB,EAAE,MAAM,GAAG,MAAM,CAE5E;AAyFD,UAAU,UAAU;IAClB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED,2FAA2F;AAC3F,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,+BAA+B,C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gBAAgB,CAoClB;AA+SD;;;;GAIG;AACH,wBAAgB,mCAAmC,CACjD,SAAS,EAAE,gCAAgC,EAC3C,OAAO,EAAE,OAAO,CAAC,uBAAuB,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAAC,GACzE,OAAO,CAYT"}
@@ -501,7 +501,8 @@ function additionalPolicyAllowed(envelope, request, approvalVerified) {
501
501
  return (internetPolicyAllowed(envelope, approvalVerified) &&
502
502
  connectorAllowed(envelope, request.scope));
503
503
  case "egress":
504
- return internetPolicyAllowed(envelope, approvalVerified) && networkAllowed(envelope);
504
+ return (networkAllowed(envelope) &&
505
+ (internetPolicyAllowed(envelope, approvalVerified) || researchGrantGoverned(envelope)));
505
506
  case "skill":
506
507
  case "skill-discover":
507
508
  case "child-agent":
@@ -656,6 +657,16 @@ function deliveryAllowed(envelope, intent) {
656
657
  hasClasses(authority.actionClasses, ["network-egress"]) &&
657
658
  hasScope(authority.networkPolicy.connectorScopes, "source-control.write");
658
659
  }
660
+ // #2387: below Full access the mode asks before internet use, and research is the only egress a
661
+ // deployment opens there, through the `governed-egress` policy. Its one delegate is the research
662
+ // port, which fetches only under a human-approved grant bound to the exact request line and, when
663
+ // none covers the request, raises that approval and fails the call closed. The grant is the
664
+ // per-action approval, so the facade hands the request on instead of demanding a proof egress
665
+ // cannot carry. Narrowing keeps this policy only for an envelope that was already minted with it;
666
+ // a broad envelope narrowed below Full access drops to deny-all.
667
+ function researchGrantGoverned(envelope) {
668
+ return envelope.authority.networkPolicy.mode === "governed-egress";
669
+ }
659
670
  function networkAllowed(envelope) {
660
671
  return envelope.authority.networkPolicy.mode !== "deny-all";
661
672
  }
@@ -1 +1 @@
1
- {"version":3,"file":"codingToolFacade.d.ts","sourceRoot":"","sources":["../../src/coding-runtime/codingToolFacade.ts"],"names":[],"mappings":"AA8BA,OAAO,EAGL,KAAK,kCAAkC,EACxC,MAAM,4DAA4D,CAAC;AAWpE,OAAO,EAgBL,KAAK,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AK,uBAAuB,EAC5B,KAAK,qBAAqB,EAG3B,MAAM,4BAA4B,CAAC;AAapC,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,CAEzD,CAAC;AAUF,QAAA,MAAM,kCAAkC,YACtC,gCAAgC,EAChC,mCAAmC,EACnC,qBAAqB,EACrB,wBAAwB,EACxB,gCAAgC,EAChC,sBAAsB,CACd,CAAC;AACX,MAAM,MAAM,8BAA8B,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC;AA0CjG,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAM/F,MAAM,WAAW,6BAA8B,SAAQ,uBAAuB;IAC5E;;gGAE4F;IAC5F,QAAQ,CAAC,aAAa,CAAC,EAAE,4BAA4B,GAAG,SAAS,CAAC;CACnE;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,qBAAqB,EAC5B,OAAO,GAAE,6BAAkC,GAC1C,gBAAgB,CAelB;AAiJD,oGAAoG;AACpG,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,gBAAgB,GACvB,kCAAkC,CAapC;AAoqBD,kGAAkG;AAClG,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAE3E;AAED,gGAAgG;AAChG,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,QAAQ,GAAG,SAAS,GAAG,gBAAgB,CAMvF"}
@@ -542,7 +542,7 @@ const GOVERNED_FAILURE_GUIDANCE = {
542
542
  // F74 (Coding Workbench run 24): a verifier with nothing to run answered a bare code, and the
543
543
  // model picked another verifier at once without knowing why. A run cancelled after a passing
544
544
  // step still checked something, so the guidance claims no more than the named steps (PR #3452).
545
- VERIFICATION_NOT_RUN: "Not every verification step ran; where the detail names a step, it says why. A missing script means package.json defines no script for that verifier: choose a verifier the repository defines, or add the script as part of your change. Dependencies that did not install, a policy denial or a cancellation are blockers to report. Do not retry the same verifier unchanged.",
545
+ VERIFICATION_NOT_RUN: "Not every verification step ran; where the detail names a step, it says why. A missing script means package.json defines no script for that verifier: choose a verifier the repository defines, or add the script as part of your change. A step to run in your own shell cannot run in the isolated verifier on this host: run the repository's own command for that check (its package script, or the tool itself) in your shell, where its result counts as that verification. Dependencies that did not install, a policy denial or a cancellation are blockers to report. Do not retry the same verifier unchanged.",
546
546
  },
547
547
  git: {
548
548
  "git-proposal-unknown": "This proposal id cannot be redeemed: it was never proposed in this run, was already redeemed, or has expired. Propose the change again with the proposing tool and redeem the new id promptly.",
@@ -558,6 +558,7 @@ function governedFailureCoaching(request, reasonCode) {
558
558
  const NOT_RUN_WORDS = {
559
559
  "script-missing": "no such script in package.json",
560
560
  "dependencies-unavailable": "dependencies did not install",
561
+ "native-shell-required": "the isolated verifier cannot install dependencies for this host; run this check in your own shell",
561
562
  denied: "denied by policy",
562
563
  cancelled: "cancelled",
563
564
  skipped: "skipped",
@@ -301,6 +301,11 @@ export interface CodingToolNativeSettlementInput extends CodingToolNativeCall {
301
301
  * when another command of the line could have decided it (`npm test; cd .`).
302
302
  */
303
303
  readonly exitStatusCheck?: VerificationKind | undefined;
304
+ /**
305
+ * The call ran in a working directory it named itself (`workdir`), not the session's: the
306
+ * package.json read at its admission need not be the one its scripts ran from.
307
+ */
308
+ readonly ownWorkdir?: boolean | undefined;
304
309
  /**
305
310
  * Whether the call wrote the task workspace, as its admission named it (#3901): `false` for an
306
311
  * edit of the run's private plan notes, which is planning, not a change a check must cover.
@@ -317,6 +322,11 @@ export interface CodingToolNativeVerificationResult {
317
322
  readonly durationMs: number;
318
323
  /** The run's admission observer captured with the command; told only after it executed. */
319
324
  readonly executed: CodingVerificationExecutedObserver | undefined;
325
+ /**
326
+ * The check whose passing line also proved this one (`openCodeNativeCreditedKinds`); absent for
327
+ * the check the line's exit status is named for.
328
+ */
329
+ readonly creditedBy?: VerificationKind | undefined;
320
330
  }
321
331
  /**
322
332
  * The run's verification owner as native verification commands reach it (#3897 review, #3901):
@@ -328,6 +338,11 @@ export interface CodingToolNativeVerificationHooks {
328
338
  readonly admitted?: (() => CodingVerificationExecutedObserver | undefined) | undefined;
329
339
  readonly blocked?: ((reason: CodingVerificationBlockedReason, targetDigest?: string) => void) | undefined;
330
340
  readonly publish: (result: CodingToolNativeVerificationResult) => void;
341
+ /**
342
+ * The other checks an admitted line proves when it passes (`openCodeNativeCreditedKinds`), with
343
+ * or without reading the workspace's package scripts.
344
+ */
345
+ readonly credited?: ((resources: readonly string[], readScripts: boolean) => readonly VerificationKind[]) | undefined;
331
346
  }
332
347
  /**
333
348
  * `counted` reached the run's effort roll-up; `duplicate` was already counted: the same call seen
@@ -344,8 +359,11 @@ export interface CodingToolNativeSettlementFacet {
344
359
  /** The policy refused or a human denied this call: its terminal failure is a refusal. */
345
360
  readonly refused: (call: CodingToolNativeCall) => void;
346
361
  readonly settled: (input: CodingToolNativeSettlementInput) => CodingToolNativeSettlement;
347
- /** The policy admitted this call as a verification command (`openCodeNativeVerificationKind`). */
348
- readonly verificationAdmitted?: ((call: CodingToolNativeCall, kind: VerificationKind) => void) | undefined;
362
+ /**
363
+ * The policy admitted this call as a verification command (`openCodeNativeVerificationKind`);
364
+ * `resources` are its admitted command line, from which a pass also credits the other checks it ran.
365
+ */
366
+ readonly verificationAdmitted?: ((call: CodingToolNativeCall, kind: VerificationKind, resources?: readonly string[]) => void) | undefined;
349
367
  /** A human refused a native verification command: no later pass of an older one clears it. */
350
368
  readonly verificationDenied?: (() => void) | undefined;
351
369
  /**