@oscharko-dev/keiko 1.1.6 → 1.1.8

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 (300) hide show
  1. package/dist/ui/csp-hashes.json +7 -7
  2. package/dist/ui/static/404.html +1 -1
  3. package/dist/ui/static/__next.__PAGE__.txt +11 -11
  4. package/dist/ui/static/__next._full.txt +13 -13
  5. package/dist/ui/static/__next._tree.txt +2 -2
  6. package/dist/ui/static/_next/static/chunks/02i0eppipph7e.js +1 -0
  7. package/dist/ui/static/_next/static/chunks/09jwu8wa22c1d.js +1 -0
  8. package/dist/ui/static/_next/static/chunks/0hc828_gdkyek.js +3 -0
  9. package/dist/ui/static/_next/static/chunks/0n5hz6kjgs-3-.js +1 -0
  10. package/dist/ui/static/_next/static/chunks/{2l0gyhe4jpu23.css → 0qv7j1mski9o8.css} +1 -1
  11. package/dist/ui/static/_next/static/chunks/{0xq716cs1taxh.js → 0vtnpcijh-jqw.js} +1 -1
  12. package/dist/ui/static/_next/static/chunks/15wj80h_5chl0.js +1 -0
  13. package/dist/ui/static/_next/static/chunks/{0ak5o5brryicl.js → 18grpx4tuavds.js} +1 -1
  14. package/dist/ui/static/_next/static/chunks/1be0-x1mk56wu.js +1 -0
  15. package/dist/ui/static/_next/static/chunks/{0bbv42deftomm.js → 1c1gbfapof8m0.js} +1 -1
  16. package/dist/ui/static/_next/static/chunks/1dwc7p2rl-hs6.js +1 -0
  17. package/dist/ui/static/_next/static/chunks/{1piodmepoegnw.js → 1fgcho9v65crw.js} +1 -1
  18. package/dist/ui/static/_next/static/chunks/{3d-10944zk2o9.js → 1lj5se4u-t-e9.js} +1 -1
  19. package/dist/ui/static/_next/static/chunks/{1th8j9weqwhgx.js → 1o2cihsnxhmh6.js} +1 -1
  20. package/dist/ui/static/_next/static/chunks/22x3pxeia7hk_.js +1 -0
  21. package/dist/ui/static/_next/static/chunks/{0e6em7dg4gr6q.js → 25lgzefdnbdh6.js} +1 -1
  22. package/dist/ui/static/_next/static/chunks/{2t2wftn5liinr.js → 2iz4lys7fa5a6.js} +1 -1
  23. package/dist/ui/static/_next/static/chunks/{21t1klb1thn76.js → 306ima8lxo17-.js} +1 -1
  24. package/dist/ui/static/_next/static/chunks/{2dpxapmdvqlh1.js → 36-tv3y56oau8.js} +1 -1
  25. package/dist/ui/static/_next/static/chunks/{182b4sf3i-krz.js → 39w0xj7fyy7sp.js} +1 -1
  26. package/dist/ui/static/_next/static/chunks/{0ks_l2sa4nfn0.js → 3aizxizjzdddj.js} +1 -1
  27. package/dist/ui/static/_next/static/chunks/3bl12pe7lsanc.js +1 -0
  28. package/dist/ui/static/_next/static/chunks/3k6g7nzn589fs.js +1 -0
  29. package/dist/ui/static/_next/static/chunks/{1j_9b-l0n6u-t.js → 3kmozkq6tgqnz.js} +1 -1
  30. package/dist/ui/static/_next/static/chunks/3q_kn20qriqd7.js +1 -0
  31. package/dist/ui/static/_next/static/chunks/3r4fz572q3l7s.js +1 -0
  32. package/dist/ui/static/_next/static/chunks/{1lb8ju8qa0d9m.js → 40g2_9ovqiuiu.js} +1 -1
  33. package/dist/ui/static/_next/static/chunks/413lmui4la1xe.js +1 -0
  34. package/dist/ui/static/_next/static/chunks/{turbopack-2w1ixcff5kx3x.js → turbopack-2fb3mn6go2p-t.js} +1 -1
  35. package/dist/ui/static/_not-found/__next._full.txt +9 -9
  36. package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +8 -8
  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 +9 -9
  40. package/dist/ui/static/atlassian-connectors/__next._full.txt +13 -13
  41. package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
  42. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +10 -10
  43. package/dist/ui/static/atlassian-connectors.html +1 -1
  44. package/dist/ui/static/atlassian-connectors.txt +13 -13
  45. package/dist/ui/static/index.html +1 -1
  46. package/dist/ui/static/index.txt +13 -13
  47. package/dist/ui/static/launch/__next._full.txt +13 -13
  48. package/dist/ui/static/launch/__next._tree.txt +2 -2
  49. package/dist/ui/static/launch/__next.launch.__PAGE__.txt +11 -11
  50. package/dist/ui/static/launch.html +1 -1
  51. package/dist/ui/static/launch.txt +13 -13
  52. package/dist/ui/static/local-knowledge/__next._full.txt +13 -13
  53. package/dist/ui/static/local-knowledge/__next._tree.txt +2 -2
  54. package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +11 -11
  55. package/dist/ui/static/local-knowledge/capsule/__next._full.txt +13 -13
  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 +10 -10
  58. package/dist/ui/static/local-knowledge/capsule.html +1 -1
  59. package/dist/ui/static/local-knowledge/capsule.txt +13 -13
  60. package/dist/ui/static/local-knowledge.html +1 -1
  61. package/dist/ui/static/local-knowledge.txt +13 -13
  62. package/node_modules/@oscharko-dev/keiko-cli/package.json +14 -14
  63. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.d.ts +1 -1
  64. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.js +1 -1
  65. package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
  66. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts +55 -15
  67. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts.map +1 -1
  68. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.js +108 -12
  69. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts +924 -33
  70. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts.map +1 -1
  71. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.js +1249 -142
  72. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts +7 -2
  73. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts.map +1 -1
  74. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api-validation.d.ts.map +1 -1
  75. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api-validation.js +14 -4
  76. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-constants.d.ts +1 -1
  77. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-constants.d.ts.map +1 -1
  78. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime.d.ts +7 -0
  79. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime.d.ts.map +1 -1
  80. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts +1 -1
  81. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts.map +1 -1
  82. package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.d.ts +3 -0
  83. package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.d.ts.map +1 -1
  84. package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.js +20 -4
  85. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +1 -1
  86. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
  87. package/node_modules/@oscharko-dev/keiko-contracts/dist/verified-commit.d.ts +1 -1
  88. package/node_modules/@oscharko-dev/keiko-contracts/dist/verified-commit.d.ts.map +1 -1
  89. package/node_modules/@oscharko-dev/keiko-contracts/dist/verified-commit.js +8 -1
  90. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +2 -2
  91. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +2 -2
  92. package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
  93. package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
  94. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
  95. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
  96. package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
  97. package/node_modules/@oscharko-dev/keiko-git/dist/version.d.ts +1 -1
  98. package/node_modules/@oscharko-dev/keiko-git/dist/version.js +1 -1
  99. package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
  100. package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
  101. package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
  102. package/node_modules/@oscharko-dev/keiko-harness/package.json +7 -7
  103. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
  104. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
  105. package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
  106. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
  107. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
  108. package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
  109. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
  110. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
  111. package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
  112. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
  113. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
  114. package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
  115. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
  116. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
  117. package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
  118. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
  119. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
  120. package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
  121. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.d.ts.map +1 -1
  122. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.js +4 -1
  123. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts.map +1 -1
  124. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.js +136 -24
  125. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts +1 -0
  126. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts.map +1 -1
  127. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.js +1 -0
  128. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts.map +1 -1
  129. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.js +38 -4
  130. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts.map +1 -1
  131. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.js +12 -3
  132. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/realtime-voice-adapter.d.ts.map +1 -1
  133. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/realtime-voice-adapter.js +3 -1
  134. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/rerank-adapter.d.ts.map +1 -1
  135. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/rerank-adapter.js +4 -1
  136. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +9 -1
  137. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts.map +1 -1
  138. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.js +87 -5
  139. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.d.ts +1 -0
  140. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.d.ts.map +1 -1
  141. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.js +158 -10
  142. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/text-to-speech-adapter.d.ts.map +1 -1
  143. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/text-to-speech-adapter.js +176 -12
  144. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
  145. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
  146. package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +4 -4
  147. package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
  148. package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
  149. package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
  150. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts +11 -1
  151. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts.map +1 -1
  152. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.js +33 -0
  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/coding-runtime/codingRuntimeControlPlane.d.ts +3 -0
  157. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.d.ts.map +1 -1
  158. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.d.ts +0 -1
  159. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.d.ts.map +1 -1
  160. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.js +44 -13
  161. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.d.ts +1 -1
  162. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.d.ts.map +1 -1
  163. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.js +9 -4
  164. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts.map +1 -1
  165. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.js +3 -3
  166. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts +2 -1
  167. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts.map +1 -1
  168. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.d.ts.map +1 -1
  169. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.js +3 -2
  170. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts.map +1 -1
  171. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.js +143 -32
  172. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.d.ts +7 -0
  173. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.d.ts.map +1 -1
  174. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.js +29 -8
  175. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts +16 -0
  176. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts.map +1 -1
  177. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts +6 -2
  178. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts.map +1 -1
  179. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.js +5 -2
  180. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.d.ts +14 -0
  181. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.d.ts.map +1 -1
  182. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.js +201 -43
  183. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts +13 -1
  184. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts.map +1 -1
  185. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.js +24 -0
  186. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.d.ts +12 -0
  187. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.d.ts.map +1 -1
  188. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.js +31 -0
  189. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.js +35 -13
  190. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts +16 -4
  191. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts.map +1 -1
  192. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.js +74 -14
  193. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.d.ts +33 -2
  194. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.d.ts.map +1 -1
  195. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.js +277 -44
  196. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionAuxiliaryPorts.d.ts +6 -0
  197. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionAuxiliaryPorts.d.ts.map +1 -1
  198. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionAuxiliaryPorts.js +4 -2
  199. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionDraftDeliveryRuntime.d.ts.map +1 -1
  200. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionDraftDeliveryRuntime.js +3 -0
  201. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.d.ts.map +1 -1
  202. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.js +72 -26
  203. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitRuntime.d.ts.map +1 -1
  204. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitRuntime.js +6 -0
  205. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/researchApprovalIssuance.d.ts.map +1 -1
  206. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/researchApprovalIssuance.js +2 -0
  207. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts +30 -0
  208. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts.map +1 -1
  209. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.js +476 -143
  210. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-tool-facade.d.ts.map +1 -1
  211. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-tool-facade.js +32 -5
  212. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +16 -0
  213. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
  214. package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +2 -23
  215. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +5 -1
  216. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
  217. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.js +11 -0
  218. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts +24 -2
  219. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts.map +1 -1
  220. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.js +215 -38
  221. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.d.ts +6 -0
  222. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.d.ts.map +1 -0
  223. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.js +27 -0
  224. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts +33 -0
  225. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
  226. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +256 -25
  227. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.d.ts +2 -1
  228. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.d.ts.map +1 -1
  229. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.js +11 -4
  230. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.d.ts +2 -1
  231. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.d.ts.map +1 -1
  232. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.js +221 -38
  233. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.d.ts.map +1 -1
  234. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.js +29 -4
  235. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitTypes.d.ts +2 -1
  236. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitTypes.d.ts.map +1 -1
  237. package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.d.ts.map +1 -1
  238. package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.js +1 -0
  239. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.d.ts.map +1 -1
  240. package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.js +48 -3
  241. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.d.ts.map +1 -1
  242. package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.js +54 -8
  243. package/node_modules/@oscharko-dev/keiko-server/package.json +22 -22
  244. package/node_modules/@oscharko-dev/keiko-tool-catalog/package.json +3 -3
  245. package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
  246. package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
  247. package/node_modules/@oscharko-dev/keiko-tools/package.json +7 -7
  248. package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
  249. package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
  250. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
  251. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
  252. package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
  253. package/package.json +29 -29
  254. package/release-impact.catalog.json +135 -23
  255. package/vendor/{oscharko-dev-keiko-cli-1.1.6.tgz → oscharko-dev-keiko-cli-1.1.8.tgz} +0 -0
  256. package/vendor/{oscharko-dev-keiko-connectors-1.1.6.tgz → oscharko-dev-keiko-connectors-1.1.8.tgz} +0 -0
  257. package/vendor/oscharko-dev-keiko-contracts-1.1.8.tgz +0 -0
  258. package/vendor/{oscharko-dev-keiko-evaluations-1.1.6.tgz → oscharko-dev-keiko-evaluations-1.1.8.tgz} +0 -0
  259. package/vendor/{oscharko-dev-keiko-evidence-1.1.6.tgz → oscharko-dev-keiko-evidence-1.1.8.tgz} +0 -0
  260. package/vendor/oscharko-dev-keiko-git-1.1.8.tgz +0 -0
  261. package/vendor/{oscharko-dev-keiko-harness-1.1.6.tgz → oscharko-dev-keiko-harness-1.1.8.tgz} +0 -0
  262. package/vendor/{oscharko-dev-keiko-local-knowledge-1.1.6.tgz → oscharko-dev-keiko-local-knowledge-1.1.8.tgz} +0 -0
  263. package/vendor/{oscharko-dev-keiko-memory-capture-1.1.6.tgz → oscharko-dev-keiko-memory-capture-1.1.8.tgz} +0 -0
  264. package/vendor/oscharko-dev-keiko-memory-consolidation-1.1.8.tgz +0 -0
  265. package/vendor/{oscharko-dev-keiko-memory-governance-1.1.6.tgz → oscharko-dev-keiko-memory-governance-1.1.8.tgz} +0 -0
  266. package/vendor/{oscharko-dev-keiko-memory-retrieval-1.1.6.tgz → oscharko-dev-keiko-memory-retrieval-1.1.8.tgz} +0 -0
  267. package/vendor/{oscharko-dev-keiko-memory-vault-1.1.6.tgz → oscharko-dev-keiko-memory-vault-1.1.8.tgz} +0 -0
  268. package/vendor/oscharko-dev-keiko-model-gateway-1.1.8.tgz +0 -0
  269. package/vendor/{oscharko-dev-keiko-quality-intelligence-1.1.6.tgz → oscharko-dev-keiko-quality-intelligence-1.1.8.tgz} +0 -0
  270. package/vendor/{oscharko-dev-keiko-sandbox-1.1.6.tgz → oscharko-dev-keiko-sandbox-1.1.8.tgz} +0 -0
  271. package/vendor/{oscharko-dev-keiko-sdk-1.1.6.tgz → oscharko-dev-keiko-sdk-1.1.8.tgz} +0 -0
  272. package/vendor/oscharko-dev-keiko-security-1.1.8.tgz +0 -0
  273. package/vendor/oscharko-dev-keiko-server-1.1.8.tgz +0 -0
  274. package/vendor/{oscharko-dev-keiko-tool-catalog-1.1.6.tgz → oscharko-dev-keiko-tool-catalog-1.1.8.tgz} +0 -0
  275. package/vendor/{oscharko-dev-keiko-tools-1.1.6.tgz → oscharko-dev-keiko-tools-1.1.8.tgz} +0 -0
  276. package/vendor/{oscharko-dev-keiko-verification-1.1.6.tgz → oscharko-dev-keiko-verification-1.1.8.tgz} +0 -0
  277. package/vendor/{oscharko-dev-keiko-workflows-1.1.6.tgz → oscharko-dev-keiko-workflows-1.1.8.tgz} +0 -0
  278. package/vendor/{oscharko-dev-keiko-workspace-1.1.6.tgz → oscharko-dev-keiko-workspace-1.1.8.tgz} +0 -0
  279. package/dist/ui/static/_next/static/chunks/0c3w2ubla6ek6.js +0 -1
  280. package/dist/ui/static/_next/static/chunks/0gnizm29lk3ll.js +0 -1
  281. package/dist/ui/static/_next/static/chunks/0psckgz_yhen3.js +0 -1
  282. package/dist/ui/static/_next/static/chunks/19fesd0w1gjhp.js +0 -3
  283. package/dist/ui/static/_next/static/chunks/1gb6os129fico.js +0 -1
  284. package/dist/ui/static/_next/static/chunks/1k6f6m-u2q69-.js +0 -1
  285. package/dist/ui/static/_next/static/chunks/1pze64zkvx8vt.js +0 -1
  286. package/dist/ui/static/_next/static/chunks/28mbnwl9g65al.js +0 -1
  287. package/dist/ui/static/_next/static/chunks/2bm60h9zwhm3v.js +0 -1
  288. package/dist/ui/static/_next/static/chunks/2h_zvmb272ozs.js +0 -1
  289. package/dist/ui/static/_next/static/chunks/3-5_wuwrev-8c.js +0 -1
  290. package/dist/ui/static/_next/static/chunks/3-l-8qt163_y6.js +0 -1
  291. package/dist/ui/static/_next/static/chunks/3doin5vaz4zjs.js +0 -1
  292. package/vendor/oscharko-dev-keiko-contracts-1.1.6.tgz +0 -0
  293. package/vendor/oscharko-dev-keiko-git-1.1.6.tgz +0 -0
  294. package/vendor/oscharko-dev-keiko-memory-consolidation-1.1.6.tgz +0 -0
  295. package/vendor/oscharko-dev-keiko-model-gateway-1.1.6.tgz +0 -0
  296. package/vendor/oscharko-dev-keiko-security-1.1.6.tgz +0 -0
  297. package/vendor/oscharko-dev-keiko-server-1.1.6.tgz +0 -0
  298. /package/dist/ui/static/_next/static/{ytpWXc-OicMB-rH2zX5b3 → xFln0tD9J1Dx0Nlv71fAF}/_buildManifest.js +0 -0
  299. /package/dist/ui/static/_next/static/{ytpWXc-OicMB-rH2zX5b3 → xFln0tD9J1Dx0Nlv71fAF}/_clientMiddlewareManifest.js +0 -0
  300. /package/dist/ui/static/_next/static/{ytpWXc-OicMB-rH2zX5b3 → xFln0tD9J1Dx0Nlv71fAF}/_ssgManifest.js +0 -0
@@ -1,2 +1,2 @@
1
- export declare const KEIKO_MEMORY_GOVERNANCE_VERSION: "1.1.6";
1
+ export declare const KEIKO_MEMORY_GOVERNANCE_VERSION: "1.1.8";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- export const KEIKO_MEMORY_GOVERNANCE_VERSION = "1.1.6";
1
+ export const KEIKO_MEMORY_GOVERNANCE_VERSION = "1.1.8";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oscharko-dev/keiko-memory-governance",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "MemoriaViva — Internal memory-governance package (Epic #204 child #209): pure-function envelope builders for user-driven corrections, conflict resolution, selective forgetting, expiration, pinning and archiving over Governed Enterprise Memory Vault records. Every public function returns a contracts-validated operation envelope (MemoryProposal / MemorySupersession / MemoryUpdate / MemoryForget / MemoryPin / MemoryUnpin / MemoryArchive) or a StatusTransition; the caller (vault #206, audit #214, MemoriaViva UI #211, retrieval #210) materialises the persistence side. Pinned memories cannot be silently selected for forget. No IO, no clock, no randomness (caller supplies nowMs). ADR-0019 direction rule 3i (governance may depend only on keiko-contracts and keiko-security). Not published independently.",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "private": true,
23
23
  "peerDependencies": {
24
- "@oscharko-dev/keiko-contracts": "1.1.6",
25
- "@oscharko-dev/keiko-security": "1.1.6"
24
+ "@oscharko-dev/keiko-contracts": "1.1.8",
25
+ "@oscharko-dev/keiko-security": "1.1.8"
26
26
  }
27
27
  }
@@ -1,2 +1,2 @@
1
- export declare const KEIKO_MEMORY_RETRIEVAL_VERSION: "1.1.6";
1
+ export declare const KEIKO_MEMORY_RETRIEVAL_VERSION: "1.1.8";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Single source of truth for the package version. Pinned as a literal so consumers can
2
2
  // import it for telemetry or evidence persistence without parsing package.json at runtime.
3
3
  // Bump in lockstep with package.json on every release.
4
- export const KEIKO_MEMORY_RETRIEVAL_VERSION = "1.1.6";
4
+ export const KEIKO_MEMORY_RETRIEVAL_VERSION = "1.1.8";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oscharko-dev/keiko-memory-retrieval",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "MemoriaViva — Internal memory-retrieval package (Epic #204 child #210): pure-function scoped retrieval + hybrid ranking + token-budgeted context assembly over Governed Enterprise Memory Vault records. Caller supplies a MemoryQueryPort (no keiko-memory-vault import) so the vault remains injectable and this layer stays pure (no IO, no clock, no randomness; caller supplies nowMs). Ranking combines deterministic lexical relevance, recency decay, provenance confidence, pinned boost, correction boost, and graph proximity into a weighted sum. The context block carries inclusion/omission reasons per memory so downstream callers (Conversation Center #212, workflow agents #213) and audit (#214) can render fully explainable surfaces. Suppression check is duplicated inline (synced with @oscharko-dev/keiko-memory-governance/suppression.ts) to keep the dep graph on contracts+security only. ADR-0019 direction rule 3j enforces this scope. Not published independently.",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "private": true,
23
23
  "peerDependencies": {
24
- "@oscharko-dev/keiko-contracts": "1.1.6",
25
- "@oscharko-dev/keiko-security": "1.1.6"
24
+ "@oscharko-dev/keiko-contracts": "1.1.8",
25
+ "@oscharko-dev/keiko-security": "1.1.8"
26
26
  }
27
27
  }
@@ -1,2 +1,2 @@
1
- export declare const KEIKO_MEMORY_VAULT_VERSION: "1.1.6";
1
+ export declare const KEIKO_MEMORY_VAULT_VERSION: "1.1.8";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- export const KEIKO_MEMORY_VAULT_VERSION = "1.1.6";
1
+ export const KEIKO_MEMORY_VAULT_VERSION = "1.1.8";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oscharko-dev/keiko-memory-vault",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "MemoriaViva — Internal memory-vault package: governed enterprise memory storage (node:sqlite). Scope-isolated CRUD, edges, embeddings, tombstones, validator-gated boundary, redaction-aware writes (ADR-0019 + Epic #204). Not published independently.",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "private": true,
23
23
  "peerDependencies": {
24
- "@oscharko-dev/keiko-contracts": "1.1.6",
25
- "@oscharko-dev/keiko-security": "1.1.6"
24
+ "@oscharko-dev/keiko-contracts": "1.1.8",
25
+ "@oscharko-dev/keiko-security": "1.1.8"
26
26
  }
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AASA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAIL,8BAA8B,EAG/B,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEzF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EACV,oBAAoB,EAIpB,aAAa,EAGb,eAAe,EAIf,mBAAmB,EAGnB,wBAAwB,EAQzB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,mCAAmC,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM,CAWzF;AAWD,eAAO,MAAM,yBAAyB,QAAuD,CAAC;AAC9F,eAAO,MAAM,mBAAmB,QAAiD,CAAC;AAClF,eAAO,MAAM,wBAAwB,QAAqD,CAAC;AAC3F,eAAO,MAAM,8BAA8B;aACzC,gBAAgB;aAChB,UAAU;aACV,cAAc;CACN,CAAC;AACX,eAAO,MAAM,2BAA2B,kBAAkB,CAAC;AAC3D,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,8BAA8B,EAAE,CAAC;AAG1C,eA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AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,SAAc,GAClB,wBAAwB,GAAG,SAAS,CAMtC;AAGD,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,iBAAiB,CA2BrE"}
@@ -24,7 +24,10 @@ export function toolCallingConfigurationFingerprint(provider) {
24
24
  ];
25
25
  return sha256Hex(canonicalise(binding));
26
26
  }
27
- const DEFAULT_TIMEOUT_MS = 30_000;
27
+ // #3591: raised from 30s so an unconfigured provider's default already tolerates the field
28
+ // customer's slow LiteLLM/vLLM proxy instead of relying solely on the gateway's own silence/budget
29
+ // floors (resilience.ts) to compensate for a too-short default.
30
+ const DEFAULT_TIMEOUT_MS = 120_000;
28
31
  const DEFAULT_MAX_RETRIES = 3;
29
32
  const DEFAULT_RETRY_BASE_DELAY_MS = 500;
30
33
  // KEIKO-0572: exported so gateway-setup.ts / grounded-retrieval-eval.ts can import the shared
@@ -1 +1 @@
1
- {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../src/gateway.ts"],"names":[],"mappings":"AAsBA,OAAO,EAOL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAkC,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAUjG,OAAO,KAAK,EACV,KAAK,EACL,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,eAAe,EAEf,kBAAkB,EAClB,eAAe,EAEf,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,0FAA0F;AAC1F,MAAM,WAAW,kBAAkB;IACjC,OAAO,CACL,UAAU,EAAE,eAAe,EAC3B,OAAO,EAAE,kBAAkB,EAC3B,aAAa,EAAE,MAAM,GACpB,uBAAuB,CAAC;CAC5B;AAED,MAAM,WAAW,uBAAuB;IACtC,gGAAgG;IAChG,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI,CAAC;CA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,CAA8B;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA2B;IACrD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA2C;IACrE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqC;IAC9D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAsB;IAC1C,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAqB;IAEhE,YACmB,MAAM,EAAE,aAAa,EACtC,IAAI,GAAE,WAAgB,EAWvB;IAED,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,iBAAiB;IA0BnB,IAAI,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAmDnE;YAEa,qBAAqB;IAkCnC,OAAO,CAAC,+BAA+B;IAkCvC,OAAO,CAAC,mBAAmB;IAoCpB,UAAU,CAAC,OAAO,EAAE,kBAAkB,GAAG,cAAc,CAAC,kBAAkB,CAAC,CA4DjF;IAED,OAAO,CAAC,UAAU;IAuBlB,OAAO,CAAC,cAAc;IAgDtB,OAAO,CAAC,aAAa;IAoBrB,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,kBAAkB;IAsB1B,OAAO,CAAC,eAAe;IAkCvB,OAAO,CAAC,gBAAgB;YAwBT,UAAU;IAsCzB,OAAO,CAAC,MAAM;IAiBd,OAAO,CAAC,UAAU;IASlB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,CAUnD;YAEa,MAAM;IAoCpB,OAAO,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,KAAK;IAoBb,OAAO,CAAC,YAAY;IAYpB,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,UAAU;CAcnB"}
@@ -5,14 +5,14 @@
5
5
  import { randomUUID } from "node:crypto";
6
6
  import { activityLogEvent, defineActivityLogOperation, } from "@oscharko-dev/keiko-contracts/runtime/observability";
7
7
  import { canonicalise, sha256Hex } from "@oscharko-dev/keiko-security/hashing";
8
- import { CancelledError, ConfigInvalidError, ContextOverflowError, GatewayError, TransportError, UnknownModelError, } from "@oscharko-dev/keiko-security/errors/gateway";
8
+ import { CancelledError, ConfigInvalidError, ContextOverflowError, GatewayError, MalformedToolCallError, ProviderEmptyAnswerError, ProviderOutputExhaustedError, TransportError, UnknownModelError, } from "@oscharko-dev/keiko-security/errors/gateway";
9
9
  import { deriveContextProfileFromCapability } from "@oscharko-dev/keiko-contracts/runtime/context-engineering";
10
10
  import { findConfiguredCapability } from "./model-selection.js";
11
11
  import { activityLogErrorKind, logEndpointHost, logLevelEnabled, logModelId, logTimer, resolveLogSink, } from "./observability.js";
12
- import { OpenAiAdapter, ResponseRedactionError } from "./openai-adapter.js";
12
+ import { OpenAiAdapter } from "./openai-adapter.js";
13
13
  import { countGatewayPromptTokens } from "./prompt-token-accounting.js";
14
14
  import { createGatewayToolCatalogBridge, GatewayToolCatalogError } from "./toolCatalogBridge.js";
15
- import { CircuitBreaker, codingWorkbenchProviderTimeoutMs, executeWithRetry, providerRequestBudgetMs, providerRetryConfig, systemClock, } from "./resilience.js";
15
+ import { CircuitBreaker, codingWorkbenchProviderTimeoutMs, executeWithRetry, GATEWAY_BUFFERED_BUDGET_FLOOR_MS, GATEWAY_SILENCE_FLOOR_MS, providerRequestBudgetMs, providerRetryConfig, streamRequestBudgetMs, systemClock, } from "./resilience.js";
16
16
  import { assertValidGatewaySamplingParameters } from "./types.js";
17
17
  function callIds(requestId, request) {
18
18
  return { requestId, correlationId: request.logContext?.correlationId ?? requestId };
@@ -184,6 +184,17 @@ const GATEWAY_CHAT_FAILED_OPERATION = defineActivityLogOperation({
184
184
  dataClass: "closed-enum",
185
185
  required: true,
186
186
  },
187
+ // #3591: true only for a ProviderOutputExhaustedError — an HTTP 200 answer that spent its
188
+ // whole output budget on reasoning before any content — so an operator can tell that apart
189
+ // from an ordinary empty/failed provider answer without reaching for the sidecar's own record.
190
+ // `required: false` (PR #3602 review): emitted on every failure line since this field's
191
+ // introduction, but a record written by 1.1.6, before it existed, lacks it — a missing
192
+ // REQUIRED field reads as an incomplete record to the analyzer, which this field is not.
193
+ outputExhausted: {
194
+ type: "boolean",
195
+ dataClass: "closed-enum",
196
+ required: false,
197
+ },
187
198
  },
188
199
  causal: "correlation",
189
200
  lifecycle: "failure",
@@ -277,6 +288,13 @@ const GATEWAY_STREAM_FAILED_OPERATION = defineActivityLogOperation({
277
288
  dataClass: "closed-enum",
278
289
  required: true,
279
290
  },
291
+ // #3591: see gateway.chat.failed's identical field; `required: false` for the same reason
292
+ // (PR #3602 review).
293
+ outputExhausted: {
294
+ type: "boolean",
295
+ dataClass: "closed-enum",
296
+ required: false,
297
+ },
280
298
  },
281
299
  causal: "correlation",
282
300
  lifecycle: "failure",
@@ -389,35 +407,103 @@ function attachGatewayRequestId(error, requestId) {
389
407
  }
390
408
  }
391
409
  // Faults that never indicate the PROVIDER is unhealthy: a client-initiated cancel, our own invalid
392
- // configuration, or the gateway's own redaction pass refusing to walk a pathologically deep
393
- // response body (review finding on PR #3394 — an untyped RangeError from that last case used to
394
- // slip past this list and trip the breaker for an otherwise healthy model; ResponseRedactionError
395
- // is now thrown instead, see openai-adapter.ts's redactUnknown). A named, extensible list rather
396
- // than a growing chain of `&&` conditions, so the next non-provider fault is one array entry away.
397
- const NON_PROVIDER_FAULTS = [CancelledError, ConfigInvalidError, ResponseRedactionError];
410
+ // configuration, the gateway's own redaction pass refusing to walk a pathologically deep response
411
+ // body (review finding on PR #3394 — an untyped RangeError from that last case used to slip past
412
+ // this list and trip the breaker for an otherwise healthy model; ResponseRedactionError is now
413
+ // thrown instead, see openai-adapter.ts's redactUnknown), or a ProviderOutputExhaustedError (an
414
+ // HTTP 200 with `finish_reason: "length"` and no content — the model answered, it just spent its
415
+ // budget on reasoning; that is a caller-fixable budget problem, not evidence the provider is
416
+ // failing), or a ProviderEmptyAnswerError (#3610: an HTTP 200 answer that completed with neither
417
+ // content nor a tool call — the provider answered, the model produced nothing usable; counting it
418
+ // let three such answers lock every caller of a healthy model out), or a MalformedToolCallError
419
+ // (the model's own tool call did not parse or did not match the tool's schema: the gateway retries
420
+ // it, and the provider answered every time; a lab run of 1.1.8 behind a LiteLLM hosted_vllm route
421
+ // opened the breaker after five such calls and failed the run on CircuitOpenError). It covers the
422
+ // redaction-depth refusal (ResponseRedactionError) and the catalog's schema rejection
423
+ // (GatewayToolCatalogError), both of which extend it. A named, extensible list rather than a
424
+ // growing chain of `&&` conditions, so the next non-provider fault is one array entry away.
425
+ //
426
+ // TimeoutError is deliberately NOT here (review finding on PR #3602 — it was, briefly, during
427
+ // #3591's development). Excluding every timeout disabled the breaker's own outage guard: an
428
+ // upstream that never responds at all would cost every caller a full (multi-minute, with the new
429
+ // floors) attempt before failing, and the breaker would never open for it, no matter how many
430
+ // callers piled up. With `GATEWAY_SILENCE_FLOOR_MS`/`GATEWAY_BUFFERED_BUDGET_FLOOR_MS` this
431
+ // generous, a `TimeoutError` means the provider produced nothing for minutes — an outage-class
432
+ // signal, not the noise of a slow-but-alive gateway (which stays inside the floor and never times
433
+ // out at all) — so it counts as a provider failure again, exactly as it did before this PR.
434
+ const NON_PROVIDER_FAULTS = [
435
+ CancelledError,
436
+ ConfigInvalidError,
437
+ MalformedToolCallError,
438
+ ProviderOutputExhaustedError,
439
+ ProviderEmptyAnswerError,
440
+ ];
398
441
  function isNonProviderFault(error) {
399
442
  return NON_PROVIDER_FAULTS.some((errorClass) => error instanceof errorClass);
400
443
  }
444
+ // A half-open probe that ends in a non-provider fault must still release the probe slot it
445
+ // claimed — `CircuitBreaker.recordNonProviderFault()` does exactly that, without counting the call
446
+ // as either a success or a failure (review finding on PR #3602: leaving the slot claimed forever
447
+ // stuck the breaker half-open, rejecting every later call once every probe slot was in this state).
401
448
  function recordProviderFailure(breaker, error, correlationId) {
402
- if (!isNonProviderFault(error)) {
403
- breaker.recordFailure(correlationId);
449
+ if (isNonProviderFault(error)) {
450
+ breaker.recordNonProviderFault();
451
+ return;
404
452
  }
453
+ breaker.recordFailure(correlationId);
405
454
  }
406
455
  // Whether a buffered call reads each attempt's answer over the provider's stream (ADR-0003): the
407
456
  // route's capability streams and the adapter can read a stream.
408
457
  function readsOverStream(route, adapter) {
409
458
  return route.capability.streaming && adapter.callStream !== undefined;
410
459
  }
411
- // The bounds of one attempt's streamed read: the attempt's `timeoutMs` bounds the provider's
412
- // silence and what is left of the call's budget bounds the read, so a long generation that keeps
413
- // producing is not cut off at `timeoutMs` and generated again (coding run 30).
414
- function streamedReadBounds(attempt, silenceMs, remainingBudgetMs) {
460
+ // The bounds of one attempt's streamed read: its SILENCE bound comes from the route's own provider
461
+ // config (`effectiveSilenceMs`), never from the retry loop's per-attempt `timeoutMs` — the two
462
+ // diverge on purpose (see resilience.ts's buffered-vs-stream rule): the loop's attempt bound now
463
+ // floors to the much larger buffered-answer floor so a WHOLE-BODY attempt is not cut off early
464
+ // (#3591, PR #3602 review), but a read that can observe progress must still be watched for silence
465
+ // at the shorter floor. What is left of the call's budget bounds the read's total duration, so a
466
+ // long generation that keeps producing is not cut off at a fixed timeout and generated again
467
+ // (coding run 30).
468
+ function streamedReadBounds(attempt, remainingBudgetMs) {
415
469
  if (!readsOverStream(attempt.route, attempt.adapter))
416
470
  return undefined;
417
471
  const budgetMs = remainingBudgetMs !== undefined && Number.isFinite(remainingBudgetMs)
418
- ? remainingBudgetMs
472
+ ? Math.max(1, Math.floor(remainingBudgetMs))
419
473
  : providerRequestBudgetMs(attempt.route.provider);
420
- return { silenceMs, budgetMs: Math.max(silenceMs, Math.floor(budgetMs)) };
474
+ // The silence bound never grants more than what is left of the call's budget: a retry that
475
+ // starts with 120 s left is watched for 120 s, not for the 300 s floor, so the call can never
476
+ // overrun the `requestBudgetMs` its own lines report (PR #3602 review).
477
+ const silenceMs = Math.min(effectiveSilenceMs(attempt.route.provider), budgetMs);
478
+ return { silenceMs, budgetMs };
479
+ }
480
+ // The effective silence bound a read that can observe progress runs under (#3591): the provider's
481
+ // configured `timeoutMs`, floored so a slow-but-alive gateway is never treated as wedged before it
482
+ // has had a fair chance to answer. Used for `Gateway.chatStream()`'s native read and, inside
483
+ // `streamedReadBounds`, for a buffered `chat()` attempt that happens to read over the provider's
484
+ // own stream.
485
+ function effectiveSilenceMs(provider) {
486
+ return Math.max(provider.timeoutMs, GATEWAY_SILENCE_FLOOR_MS);
487
+ }
488
+ // The effective bound a WHOLE-BODY (unobservable) read runs under (#3591, PR #3602 review): the
489
+ // provider's configured `timeoutMs`, floored to the buffered-answer floor rather than the shorter
490
+ // silence floor, because a read that cannot observe progress has no "silence" to watch — the one
491
+ // number that bounds it must already cover the longest legitimate generation. Used for a buffered
492
+ // `chat()` attempt against a non-streaming adapter (mirrors resilience.ts's private
493
+ // `chatAttemptTimeoutMs`, which floors the SAME value for the retry loop's own bookkeeping) and for
494
+ // `chatStream()`'s buffered fallback, which degrades to the identical whole-body read.
495
+ function effectiveBufferedAttemptMs(provider) {
496
+ return Math.max(provider.timeoutMs, GATEWAY_BUFFERED_BUDGET_FLOOR_MS);
497
+ }
498
+ // The bounds of the ONE, unretried read `chatStream()` performs (ADR-0003): floored the same way
499
+ // every interactive gateway surface is (#3591) — a slow gateway is not a broken gateway. Unlike
500
+ // `streamedReadBounds` (the buffered `chat()` path's per-attempt bound), there is no retry budget
501
+ // to derive a total from, so both bounds come straight from the provider's own (possibly
502
+ // Coding-Workbench-raised) `timeoutMs`: the silence bound floored to the silence floor, the budget
503
+ // through `streamRequestBudgetMs` — the one derivation the route deadline behind a streamed call
504
+ // shares (PR #3602 review).
505
+ function chatStreamBounds(provider) {
506
+ return { silenceMs: effectiveSilenceMs(provider), budgetMs: streamRequestBudgetMs(provider) };
421
507
  }
422
508
  // One attempt's answer: over the provider's stream when the attempt has read bounds, whole
423
509
  // otherwise.
@@ -612,7 +698,7 @@ export class Gateway {
612
698
  ...(attemptTimeoutMs === undefined ? {} : { timeoutMs: attemptTimeoutMs }),
613
699
  };
614
700
  try {
615
- return await this.invoke(attempt.breaker, attempt.adapter, attempt.state.request, attempt.route.capability, attempt.correlationId, provider, streamedReadBounds(attempt, provider.timeoutMs, remainingBudgetMs));
701
+ return await this.invoke(attempt.breaker, attempt.adapter, attempt.state.request, attempt.route.capability, attempt.correlationId, provider, streamedReadBounds(attempt, remainingBudgetMs));
616
702
  }
617
703
  catch (error) {
618
704
  if (attempt.state.attemptNumber <= attempt.route.provider.maxRetries) {
@@ -677,7 +763,10 @@ export class Gateway {
677
763
  const start = this.clock.now();
678
764
  const elapsed = logTimer();
679
765
  const adapter = this.adapterFor(ids.requestId, route, ids.correlationId);
680
- this.logCallStarted(ids, route, true, request.reasoningEffort);
766
+ // streamFrom degrades to its buffered fallback without a native stream (#3591, PR #3602
767
+ // review); the started line must report the bound that branch actually applies.
768
+ const usesNativeStream = adapter.callStream !== undefined;
769
+ this.logCallStarted(ids, route, true, request.reasoningEffort, usesNativeStream);
681
770
  let reservation;
682
771
  let chunkCount = 0;
683
772
  // The moment the caller saw its first actual content, timed off the same `elapsed()` as every
@@ -733,7 +822,10 @@ export class Gateway {
733
822
  // and no failure, so without this the gateway is silent for exactly the window an operator is
734
823
  // trying to diagnose. `timeoutMs` and `maxRetries` are on it because the pair bounds how long
735
824
  // this silence can legitimately last: an attempt line whose deadline has already passed with no
736
- // outcome is a wedge, not a slow provider.
825
+ // outcome is a wedge, not a slow provider. `timeoutMs` reports the bound THIS call's transport
826
+ // actually applies (PR #3602 review) — the silence floor for a call that reads incrementally
827
+ // (`upstreamStreaming`), the larger buffered floor for a whole-body read or `chatStream()`'s
828
+ // degraded fallback, never a value the transport itself does not honour.
737
829
  logCallStarted(ids, route, streaming, reasoningEffort, upstreamStreaming = false) {
738
830
  if (!logLevelEnabled(this.log, "info"))
739
831
  return;
@@ -744,7 +836,12 @@ export class Gateway {
744
836
  modelId: logModelId(route.provider.modelId),
745
837
  ...(endpointDigest === undefined ? {} : { endpointDigest }),
746
838
  costClass: route.capability.costClass,
747
- timeoutMs: route.provider.timeoutMs,
839
+ // The bound this call's transport actually applies: the silence floor when it reads
840
+ // incrementally (each chunk proves the provider alive), the buffered floor for a whole-body
841
+ // read or `chatStream()`'s degraded fallback for a non-streaming adapter.
842
+ timeoutMs: upstreamStreaming
843
+ ? effectiveSilenceMs(route.provider)
844
+ : effectiveBufferedAttemptMs(route.provider),
748
845
  maxRetries: route.provider.maxRetries,
749
846
  ...(reasoningEffort === undefined ? {} : { reasoningEffort }),
750
847
  };
@@ -765,7 +862,12 @@ export class Gateway {
765
862
  correlationId: ids.correlationId,
766
863
  durationMs,
767
864
  errorKind: activityLogErrorKind(error),
768
- }, { ...callIdFields(ids), modelId: logModelId(route.provider.modelId), streaming: false }));
865
+ }, {
866
+ ...callIdFields(ids),
867
+ modelId: logModelId(route.provider.modelId),
868
+ streaming: false,
869
+ outputExhausted: error instanceof ProviderOutputExhaustedError,
870
+ }));
769
871
  }
770
872
  logStreamCompleted(ids, route, chunkCount, durationMs, firstTokenMs, usage) {
771
873
  this.log.write(activityLogEvent(GATEWAY_STREAM_COMPLETED_OPERATION, { level: "info", correlationId: ids.correlationId, durationMs }, {
@@ -805,6 +907,7 @@ export class Gateway {
805
907
  // A mid-stream failure has already handed tokens to the caller and cannot be retried
806
908
  // (chatStream is deliberately outside executeWithRetry); the count is how far it got.
807
909
  afterFirstChunk: chunkCount > 0,
910
+ outputExhausted: error instanceof ProviderOutputExhaustedError,
808
911
  }));
809
912
  }
810
913
  // Buffered completions only: the streaming path has its own outcome lines with their own fields
@@ -825,7 +928,7 @@ export class Gateway {
825
928
  }
826
929
  async *streamFrom(adapter, request, provider, ids) {
827
930
  if (adapter.callStream !== undefined) {
828
- yield* adapter.callStream(request, provider);
931
+ yield* adapter.callStream(request, provider, chatStreamBounds(provider));
829
932
  return;
830
933
  }
831
934
  // Degradation: this adapter has no streaming variant, so the caller gets ONE synthetic delta
@@ -836,7 +939,16 @@ export class Gateway {
836
939
  modelId: logModelId(provider.modelId),
837
940
  reason: "adapter-has-no-stream",
838
941
  }));
839
- const response = await adapter.call(request, provider);
942
+ // This read is whole-body and cannot observe progress, exactly like a non-streaming-capable
943
+ // buffered chat() attempt, so it gets the SAME buffered floor rather than the (configured, or
944
+ // silence-floored) `provider.timeoutMs` the fallback used to pass through unbounded (PR #3602
945
+ // review): a healthy 45 s answer through a 30 s-configured provider was cut off while the
946
+ // started line above already claimed a 300 s effective timeout.
947
+ const bufferedProvider = {
948
+ ...provider,
949
+ timeoutMs: effectiveBufferedAttemptMs(provider),
950
+ };
951
+ const response = await adapter.call(request, bufferedProvider);
840
952
  yield { type: "delta", token: response.content };
841
953
  yield { type: "done", response };
842
954
  }
@@ -26,5 +26,6 @@ export type { QualityIntelligenceDispatcherArgs, QualityIntelligenceDispatcherRe
26
26
  export * as PromptEnhancer from "./promptEnhancer/index.js";
27
27
  export * as PrDescription from "./prDescription/index.js";
28
28
  export { createGatewayToolCatalogBridge, GatewayToolCatalogError } from "./toolCatalogBridge.js";
29
+ export { ResponseRedactionError } from "./openai-adapter.js";
29
30
  export type { GatewayToolCatalogBridge } from "./toolCatalogBridge.js";
30
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,cAAc,EACd,cAAc,EACd,WAAW,EACX,WAAW,EACX,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb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M,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,sBAAsB,GAC5B,MAAM,6CAA6C,CAAC;AAKrD,OAAO,KAAK,mBAAmB,MAAM,gCAAgC,CAAC;AAGtE,OAAO,EACL,qCAAqC,EACrC,yBAAyB,EACzB,oBAAoB,EACpB,kCAAkC,EAClC,WAAW,EACX,KAAK,8BAA8B,EACnC,KAAK,qCAAqC,EAC1C,KAAK,kCAAkC,EACvC,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,GACtC,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,iCAAiC,EACjC,mCAAmC,GACpC,MAAM,qCAAqC,CAAC;AAM7C,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjG,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -61,3 +61,4 @@ export { QualityIntelligenceSafeErrorException, createInMemoryReplayCache, deriv
61
61
  export * as PromptEnhancer from "./promptEnhancer/index.js";
62
62
  export * as PrDescription from "./prDescription/index.js";
63
63
  export { createGatewayToolCatalogBridge, GatewayToolCatalogError } from "./toolCatalogBridge.js";
64
+ export { ResponseRedactionError } from "./openai-adapter.js";
@@ -1 +1 @@
1
- {"version":3,"file":"openai-adapter.d.ts","sourceRoot":"","sources":["../src/openai-adapter.ts"],"names":[],"mappings":"AAUA,OAAO,EAOL,sBA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AAsB,QAAS,CAAC;AAqK7C,qBAAa,sBAAuB,SAAQ,sBAAsB;CAAG;AAyfrE,qBAAa,aAAc,YAAW,eAAe;IAIvC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAHjC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IACnC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAsB;IAE1C,YAA6B,IAAI,EAAE,WAAW,EAM7C;IAED,IAAI,YACO,cAAc,UACf,mBAAmB,KAC1B,OAAO,CAAC,kBAAkB,CAAC,CA4B5B;IASF,UAAU,SACF,aAAa,WACV,cAAc,UACf,mBAAmB,WAClB,gBAAgB,KACxB,cAAc,CAAC,kBAAkB,CAAC,CAuCnC;YAOa,YAAY;YAuCZ,cAAc;YAkBd,eAAe;IAoB9B,OAAO,CAAC,aAAa;IA0BrB,OAAO,CAAC,gBAAgB;IAyBxB,OAAO,CAAC,aAAa;IA8BrB,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,cAAc;YA2BR,QAAQ;YAwCR,wBAAwB;YAgCxB,iBAAiB;YA0BjB,4BAA4B;IAgC1C,OAAO,CAAC,yBAAyB;IAmBjC,OAAO,CAAC,gBAAgB;YAmBV,QAAQ;YAgBR,aAAa;CAe5B"}
@@ -3,7 +3,7 @@
3
3
  // with no network I/O and no real time. The raw provider body is never echoed into
4
4
  // an error; only a redacted, status-level summary is surfaced.
5
5
  import { ACTIVITY_LOG_UNKNOWN_CORRELATION_ID, activityLogEvent, defineActivityLogOperation, } from "@oscharko-dev/keiko-contracts/runtime/observability";
6
- import { AuthenticationError, CancelledError, ContextOverflowError, ERROR_CODES, GatewayEgressError, GatewayError, MalformedToolCallError, ModelRefusalError, ProviderError, RateLimitError, TimeoutError, TransportError, } from "@oscharko-dev/keiko-security/errors/gateway";
6
+ import { AuthenticationError, CancelledError, ContextOverflowError, ERROR_CODES, GatewayEgressError, GatewayError, MalformedToolCallError, ModelRefusalError, ProviderEmptyAnswerError, ProviderError, ProviderOutputExhaustedError, RateLimitError, TimeoutError, TransportError, } from "@oscharko-dev/keiko-security/errors/gateway";
7
7
  import { sha256Hex } from "@oscharko-dev/keiko-security/hashing";
8
8
  import { apiKeyHeaderValue, DEFAULT_API_KEY_HEADER_NAME, MAX_TIMER_DELAY_MS, trimTrailingSlash, } from "./config.js";
9
9
  import { gatewayFetch, OutboundHttpEgressError, readJsonCapped, readSseStream, SseIdleTimeoutError, } from "./http.js";
@@ -41,6 +41,12 @@ const CHAT_REQUEST_DISPATCH_OPERATION = defineActivityLogOperation({
41
41
  // Historical chat.request.dispatch lines predate this diagnostic; old bundles remain readable.
42
42
  toolCount: { type: "integer", dataClass: "count", required: false },
43
43
  readBudgetMs: { type: "number", dataClass: "duration", required: false },
44
+ // #3591: the output-token budget actually sent on the wire (as `max_tokens` or
45
+ // `max_completion_tokens`, per providerOutputTokenLimit) — absent when the request declared
46
+ // none, in which case the provider's own default governs. Lets an operator tell "the model
47
+ // spent a small budget on reasoning" (finish_reason "length", ProviderOutputExhaustedError)
48
+ // apart from "no budget was ever declared".
49
+ maxOutputTokens: { type: "integer", dataClass: "count", required: false },
44
50
  },
45
51
  causal: "correlation",
46
52
  lifecycle: "start",
@@ -125,6 +131,16 @@ const CHAT_RESPONSE_STREAMED_OPERATION = defineActivityLogOperation({
125
131
  silenceMs: { type: "number", dataClass: "duration", required: true },
126
132
  readBudgetMs: { type: "number", dataClass: "duration", required: false },
127
133
  silentForMs: { type: "number", dataClass: "duration", required: false },
134
+ // #3591: true only when this read failed on a ProviderOutputExhaustedError — an HTTP 200
135
+ // answer that spent its whole output budget on reasoning before any content — false on every
136
+ // other outcome, including a genuine success. `required: false` (PR #3602 review): a record
137
+ // written before this field existed (1.1.6) lacks it, and a missing REQUIRED field reads as an
138
+ // incomplete record to the analyzer, which this one is not.
139
+ outputExhausted: {
140
+ type: "boolean",
141
+ dataClass: "closed-enum",
142
+ required: false,
143
+ },
128
144
  },
129
145
  causal: "correlation",
130
146
  lifecycle: "end",
@@ -161,7 +177,16 @@ function logChatDispatch(log, fields) {
161
177
  const correlationId = logCorrelationId(log);
162
178
  log.write(activityLogEvent(CHAT_REQUEST_DISPATCH_OPERATION, { level: "info", ...(correlationId === undefined ? {} : { correlationId }) }, fields));
163
179
  }
180
+ // The output-token budget actually placed on the wire, whichever of `max_tokens` /
181
+ // `max_completion_tokens` `providerOutputTokenLimit` chose for this provider — the single source
182
+ // both `buildBody`/`buildStreamBody` and this dispatch line derive from, so the two can never drift
183
+ // (#3591).
184
+ function dispatchedMaxOutputTokens(request, config) {
185
+ const limit = providerOutputTokenLimit(request.maxOutputTokens, config);
186
+ return limit.max_tokens ?? limit.max_completion_tokens;
187
+ }
164
188
  function chatDispatchFields(url, request, config, body, stream, includeUsage, bounds) {
189
+ const maxOutputTokens = dispatchedMaxOutputTokens(request, config);
165
190
  return {
166
191
  endpointDigest: sha256Hex(logEndpointHost(url) ?? "invalid-endpoint"),
167
192
  modelId: logModelId(config.modelId),
@@ -172,6 +197,7 @@ function chatDispatchFields(url, request, config, body, stream, includeUsage, bo
172
197
  ...(stream ? { streamUsageRequested: includeUsage } : {}),
173
198
  toolCount: request.tools?.length ?? 0,
174
199
  ...(bounds === undefined ? {} : { readBudgetMs: bounds.budgetMs }),
200
+ ...(maxOutputTokens === undefined ? {} : { maxOutputTokens }),
175
201
  };
176
202
  }
177
203
  function cancellationWasDeadline(signal) {
@@ -411,8 +437,10 @@ function isRecord(value) {
411
437
  return typeof value === "object" && value !== null && !Array.isArray(value);
412
438
  }
413
439
  // Locally defined (not in @oscharko-dev/keiko-security's gateway error taxonomy) for the same
414
- // reason GatewayToolCatalogError lives in toolCatalogBridge.ts rather than there: it is
415
- // gateway-internal, thrown and caught entirely within this package. Never the provider's fault —
440
+ // reason GatewayToolCatalogError lives in toolCatalogBridge.ts rather than there: it is thrown only
441
+ // within this package. Exported like that sibling, so a caller can name it apart from a malformed
442
+ // tool call: the coding sidecar gateway reports it as a rejected turn (PR #3617 review). Never the
443
+ // provider's fault —
416
444
  // the gateway's OWN redaction pass refused to keep walking a pathologically deep response body —
417
445
  // so recordProviderFailure (gateway.ts) excludes it from circuit breaker accounting the same way
418
446
  // it already excludes CancelledError/ConfigInvalidError (review findings on PR #3394 against
@@ -502,7 +530,12 @@ function assertUsableAssistantResponse(response, modelId, secrets) {
502
530
  if (response.content.trim().length > 0 || response.toolCalls.length > 0) {
503
531
  return;
504
532
  }
505
- throw new ProviderError(`provider returned an empty assistant response for '${modelId}'`, PROVIDER_EMPTY_ASSISTANT_STATUS, secrets);
533
+ // The budget ran out before any content: a reasoning model spent it on reasoning (#3591).
534
+ if (response.finishReason === "length") {
535
+ throw new ProviderOutputExhaustedError(modelId, secrets);
536
+ }
537
+ // The answer completed with nothing usable in it: the model's result, not a broken stream (#3610).
538
+ throw new ProviderEmptyAnswerError(modelId, secrets);
506
539
  }
507
540
  function errorSignal(payload) {
508
541
  const error = isRecord(payload) && isRecord(payload.error) ? payload.error : payload;
@@ -933,6 +966,7 @@ export class OpenAiAdapter {
933
966
  }, {
934
967
  ...streamReadFields(read, report, outcome),
935
968
  ...(settled ? {} : { silentForMs: durationMs - report.lastDataMs }),
969
+ outputExhausted: error instanceof ProviderOutputExhaustedError,
936
970
  }));
937
971
  }
938
972
  // Retain the usage the stream had already accumulated (counts only, never
@@ -1 +1 @@
1
- {"version":3,"file":"openai-embedding-adapter.d.ts","sourceRoot":"","sources":["../src/openai-embedding-adapter.ts"],"names":[],"mappings":"AAkBA,OAAO,EAQL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA8YlF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC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AQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAMzB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,sBAAsB,EAAE,CAAC;CACtD,CAAC;AAEN,MAAM,MAAM,sBAAsB,GAC9B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAA;CAAE,GAC7D;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9F,MAAM,MAAM,wBAAwB,GAChC,cAAc,GACd,cAAc,GACd,mBAAmB,GACnB,SAAS,GACT,WAAW,GACX,WAAW,GAIX,YAAY,GACZ,mBAAmB,GACnB,qBAAqB,GACrB,qBAAqB,GACrB,yBAAyB,GACzB,gBAAgB,GAChB,kBAAkB,CAAC;AA0PvB,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,sBAAsB,CAAC,CAuBjC;AAmDD,wBAAgB,8BAA8B,IAAI,IAAI,CAIrD;AA4VD,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,2BAA2B,CAAC,CAUtC;AAuMD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE1F"}
@@ -6,10 +6,19 @@ import { sha256Hex } from "@oscharko-dev/keiko-security/hashing";
6
6
  import { apiKeyHeaderValue, trimTrailingSlash } from "./config.js";
7
7
  import { gatewayFetch, OutboundHttpEgressError, readJsonCapped, } from "./http.js";
8
8
  import { logCorrelationId, logEndpointHost, logLevelEnabled, logModelId, logTimer, resolveLogSink, withCorrelationId, } from "./observability.js";
9
+ import { GATEWAY_RETRIEVAL_TIMEOUT_FLOOR_MS } from "./resilience.js";
9
10
  // The wire default for one embedding request, shared by the scalar path, the array path, the
10
11
  // per-item fallback and the ladder budget. Named rather than repeated so the attempt line's
11
12
  // `timeoutMs` cannot report a deadline the request is not actually running under.
12
13
  const DEFAULT_EMBEDDING_TIMEOUT_MS = 30_000;
14
+ // #3591: the per-call floor a single outbound embedding HTTP request's deadline may never go
15
+ // below, regardless of a smaller configured value — a slow gateway is not a broken gateway.
16
+ // Deliberately NOT applied inside `ladderDeadlineMs` / `perItemTimeoutMs`: the scalar-fallback
17
+ // ladder's own bookkeeping deadline must stay driven by exactly what the caller configured
18
+ // (including an intentionally exhausted budget of 0), or the ladder could never expire.
19
+ function effectiveEmbeddingTimeoutMs(timeoutMs) {
20
+ return Math.max(timeoutMs ?? DEFAULT_EMBEDDING_TIMEOUT_MS, GATEWAY_RETRIEVAL_TIMEOUT_FLOOR_MS);
21
+ }
13
22
  const EMBEDDING_OPERATION_BASE = {
14
23
  contractKind: "activity-log-operation",
15
24
  schemaVersion: 1,
@@ -478,7 +487,7 @@ function buildEmbeddingRequest(request, input, minimalShape) {
478
487
  ...(minimalShape ? {} : { encoding_format: "float" }),
479
488
  ...(request.dimensions !== undefined ? { dimensions: request.dimensions } : {}),
480
489
  });
481
- const timeoutSignal = AbortSignal.timeout(request.timeoutMs ?? DEFAULT_EMBEDDING_TIMEOUT_MS);
490
+ const timeoutSignal = AbortSignal.timeout(effectiveEmbeddingTimeoutMs(request.timeoutMs));
482
491
  const signal = request.signal !== undefined ? AbortSignal.any([timeoutSignal, request.signal]) : timeoutSignal;
483
492
  return {
484
493
  url: joinUrl(request),
@@ -502,7 +511,7 @@ function logScalarDispatch(log, request, built, minimalShape) {
502
511
  modelId: logModelId(request.modelId),
503
512
  inputCount: 1,
504
513
  bodyBytes: Buffer.byteLength(built.body, "utf8"),
505
- timeoutMs: request.timeoutMs ?? DEFAULT_EMBEDDING_TIMEOUT_MS,
514
+ timeoutMs: effectiveEmbeddingTimeoutMs(request.timeoutMs),
506
515
  minimalShape,
507
516
  };
508
517
  log.write(activityLogEvent(EMBEDDING_REQUEST_DISPATCH_OPERATION, embeddingEnvelope(log, "info"), fields));
@@ -681,7 +690,7 @@ function logBatchDispatch(log, request, built, minimalShape) {
681
690
  modelId: logModelId(request.modelId),
682
691
  inputCount: request.inputs.length,
683
692
  bodyBytes: Buffer.byteLength(built.body, "utf8"),
684
- timeoutMs: request.timeoutMs ?? DEFAULT_EMBEDDING_TIMEOUT_MS,
693
+ timeoutMs: effectiveEmbeddingTimeoutMs(request.timeoutMs),
685
694
  minimalShape,
686
695
  };
687
696
  log.write(activityLogEvent(EMBEDDING_BATCH_DISPATCH_OPERATION, embeddingEnvelope(log, "info"), fields));