@oscharko-dev/keiko 1.1.5 → 1.1.7

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 (243) hide show
  1. package/dist/ui/csp-hashes.json +6 -6
  2. package/dist/ui/static/404.html +1 -1
  3. package/dist/ui/static/__next.__PAGE__.txt +10 -10
  4. package/dist/ui/static/__next._full.txt +12 -12
  5. package/dist/ui/static/__next._tree.txt +1 -1
  6. package/dist/ui/static/_next/static/chunks/{1gb6os129fico.js → 01rp_j2a-73pp.js} +1 -1
  7. package/dist/ui/static/_next/static/chunks/02i0eppipph7e.js +1 -0
  8. package/dist/ui/static/_next/static/chunks/0hc828_gdkyek.js +3 -0
  9. package/dist/ui/static/_next/static/chunks/0hq0i12hw0ypm.js +1 -0
  10. package/dist/ui/static/_next/static/chunks/{0xqxs7rppw_o5.css → 0xxx56s32tn9r.css} +1 -1
  11. package/dist/ui/static/_next/static/chunks/{0ak5o5brryicl.js → 18grpx4tuavds.js} +1 -1
  12. package/dist/ui/static/_next/static/chunks/1be0-x1mk56wu.js +1 -0
  13. package/dist/ui/static/_next/static/chunks/{0bbv42deftomm.js → 1c1gbfapof8m0.js} +1 -1
  14. package/dist/ui/static/_next/static/chunks/{3d-10944zk2o9.js → 1lj5se4u-t-e9.js} +1 -1
  15. package/dist/ui/static/_next/static/chunks/{1th8j9weqwhgx.js → 1o2cihsnxhmh6.js} +1 -1
  16. package/dist/ui/static/_next/static/chunks/22x3pxeia7hk_.js +1 -0
  17. package/dist/ui/static/_next/static/chunks/{0e6em7dg4gr6q.js → 25lgzefdnbdh6.js} +1 -1
  18. package/dist/ui/static/_next/static/chunks/{3pfnjbbr6jydb.js → 29p86cxry0h-l.js} +1 -1
  19. package/dist/ui/static/_next/static/chunks/2ctd04x-fzbwc.js +1 -0
  20. package/dist/ui/static/_next/static/chunks/2jfg687n_mvf8.js +1 -0
  21. package/dist/ui/static/_next/static/chunks/{1r6n6x3-e27ud.js → 2mnldrncbucm0.js} +1 -1
  22. package/dist/ui/static/_next/static/chunks/{21t1klb1thn76.js → 306ima8lxo17-.js} +1 -1
  23. package/dist/ui/static/_next/static/chunks/{2dpxapmdvqlh1.js → 36-tv3y56oau8.js} +1 -1
  24. package/dist/ui/static/_next/static/chunks/{0ks_l2sa4nfn0.js → 3aizxizjzdddj.js} +1 -1
  25. package/dist/ui/static/_next/static/chunks/3fuqgie3p2068.js +1 -0
  26. package/dist/ui/static/_next/static/chunks/3k6g7nzn589fs.js +1 -0
  27. package/dist/ui/static/_next/static/chunks/3r4fz572q3l7s.js +1 -0
  28. package/dist/ui/static/_next/static/chunks/{1lb8ju8qa0d9m.js → 40g2_9ovqiuiu.js} +1 -1
  29. package/dist/ui/static/_not-found/__next._full.txt +9 -9
  30. package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +8 -8
  31. package/dist/ui/static/_not-found/__next._tree.txt +1 -1
  32. package/dist/ui/static/_not-found.html +1 -1
  33. package/dist/ui/static/_not-found.txt +9 -9
  34. package/dist/ui/static/atlassian-connectors/__next._full.txt +13 -13
  35. package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
  36. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +10 -10
  37. package/dist/ui/static/atlassian-connectors.html +1 -1
  38. package/dist/ui/static/atlassian-connectors.txt +13 -13
  39. package/dist/ui/static/index.html +1 -1
  40. package/dist/ui/static/index.txt +12 -12
  41. package/dist/ui/static/launch/__next._full.txt +12 -12
  42. package/dist/ui/static/launch/__next._tree.txt +1 -1
  43. package/dist/ui/static/launch/__next.launch.__PAGE__.txt +10 -10
  44. package/dist/ui/static/launch.html +1 -1
  45. package/dist/ui/static/launch.txt +12 -12
  46. package/dist/ui/static/local-knowledge/__next._full.txt +12 -12
  47. package/dist/ui/static/local-knowledge/__next._tree.txt +1 -1
  48. package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +10 -10
  49. package/dist/ui/static/local-knowledge/capsule/__next._full.txt +13 -13
  50. package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
  51. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +10 -10
  52. package/dist/ui/static/local-knowledge/capsule.html +1 -1
  53. package/dist/ui/static/local-knowledge/capsule.txt +13 -13
  54. package/dist/ui/static/local-knowledge.html +1 -1
  55. package/dist/ui/static/local-knowledge.txt +12 -12
  56. package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze.d.ts.map +1 -1
  57. package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze.js +52 -11
  58. package/node_modules/@oscharko-dev/keiko-cli/package.json +14 -14
  59. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.d.ts +1 -1
  60. package/node_modules/@oscharko-dev/keiko-connectors/dist/version.js +1 -1
  61. package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
  62. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts +71 -11
  63. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts.map +1 -1
  64. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.js +133 -11
  65. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts +1098 -21
  66. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts.map +1 -1
  67. package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.js +1314 -20
  68. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts +7 -2
  69. package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts.map +1 -1
  70. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api-validation.d.ts.map +1 -1
  71. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api-validation.js +15 -8
  72. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.d.ts +3 -1
  73. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.d.ts.map +1 -1
  74. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-constants.d.ts +2 -0
  75. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-constants.d.ts.map +1 -1
  76. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts +1 -1
  77. package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts.map +1 -1
  78. package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.d.ts +3 -0
  79. package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.d.ts.map +1 -1
  80. package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.js +20 -4
  81. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +2 -2
  82. package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +2 -2
  83. package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
  84. package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
  85. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
  86. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
  87. package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
  88. package/node_modules/@oscharko-dev/keiko-git/dist/version.d.ts +1 -1
  89. package/node_modules/@oscharko-dev/keiko-git/dist/version.js +1 -1
  90. package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
  91. package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
  92. package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
  93. package/node_modules/@oscharko-dev/keiko-harness/package.json +7 -7
  94. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
  95. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
  96. package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
  97. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
  98. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
  99. package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
  100. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
  101. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
  102. package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
  103. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
  104. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
  105. package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
  106. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
  107. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
  108. package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
  109. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
  110. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
  111. package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
  112. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.d.ts.map +1 -1
  113. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.js +4 -1
  114. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts +3 -0
  115. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts.map +1 -1
  116. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.js +147 -30
  117. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts +1 -1
  118. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts.map +1 -1
  119. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.js +7 -6
  120. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.d.ts.map +1 -1
  121. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.js +1 -0
  122. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts +7 -0
  123. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts.map +1 -1
  124. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.js +285 -19
  125. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts.map +1 -1
  126. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.js +12 -3
  127. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/realtime-voice-adapter.d.ts.map +1 -1
  128. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/realtime-voice-adapter.js +3 -1
  129. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/rerank-adapter.d.ts.map +1 -1
  130. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/rerank-adapter.js +4 -1
  131. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +10 -0
  132. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts.map +1 -1
  133. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.js +89 -3
  134. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.d.ts +1 -0
  135. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.d.ts.map +1 -1
  136. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.js +158 -10
  137. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/text-to-speech-adapter.d.ts.map +1 -1
  138. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/text-to-speech-adapter.js +176 -12
  139. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
  140. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
  141. package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +4 -4
  142. package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
  143. package/node_modules/@oscharko-dev/keiko-sandbox/dist/darwin-git.d.ts +3 -0
  144. package/node_modules/@oscharko-dev/keiko-sandbox/dist/darwin-git.d.ts.map +1 -1
  145. package/node_modules/@oscharko-dev/keiko-sandbox/dist/darwin-git.js +30 -6
  146. package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
  147. package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
  148. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts +7 -1
  149. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts.map +1 -1
  150. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.js +21 -0
  151. package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
  152. package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
  153. package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
  154. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.d.ts +24 -0
  155. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.d.ts.map +1 -1
  156. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.js +22 -0
  157. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeEventHub.d.ts +8 -1
  158. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeEventHub.d.ts.map +1 -1
  159. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeEventHub.js +28 -1
  160. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.d.ts.map +1 -1
  161. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.js +39 -13
  162. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.d.ts +1 -0
  163. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.d.ts.map +1 -1
  164. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.js +59 -8
  165. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts +6 -0
  166. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts.map +1 -1
  167. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.js +592 -119
  168. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +15 -0
  169. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
  170. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +5 -1
  171. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
  172. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.js +11 -0
  173. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts +24 -2
  174. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts.map +1 -1
  175. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.js +215 -38
  176. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.d.ts +6 -0
  177. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.d.ts.map +1 -0
  178. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.js +27 -0
  179. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts +33 -0
  180. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
  181. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +256 -25
  182. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.d.ts +2 -1
  183. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.d.ts.map +1 -1
  184. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.js +11 -4
  185. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.d.ts +2 -1
  186. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.d.ts.map +1 -1
  187. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.js +221 -38
  188. package/node_modules/@oscharko-dev/keiko-server/package.json +22 -22
  189. package/node_modules/@oscharko-dev/keiko-tool-catalog/package.json +3 -3
  190. package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
  191. package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
  192. package/node_modules/@oscharko-dev/keiko-tools/package.json +7 -7
  193. package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
  194. package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
  195. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
  196. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
  197. package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
  198. package/package.json +27 -26
  199. package/release-impact.catalog.json +129 -23
  200. package/vendor/oscharko-dev-keiko-cli-1.1.7.tgz +0 -0
  201. package/vendor/{oscharko-dev-keiko-connectors-1.1.5.tgz → oscharko-dev-keiko-connectors-1.1.7.tgz} +0 -0
  202. package/vendor/oscharko-dev-keiko-contracts-1.1.7.tgz +0 -0
  203. package/vendor/{oscharko-dev-keiko-evaluations-1.1.5.tgz → oscharko-dev-keiko-evaluations-1.1.7.tgz} +0 -0
  204. package/vendor/{oscharko-dev-keiko-evidence-1.1.5.tgz → oscharko-dev-keiko-evidence-1.1.7.tgz} +0 -0
  205. package/vendor/{oscharko-dev-keiko-git-1.1.5.tgz → oscharko-dev-keiko-git-1.1.7.tgz} +0 -0
  206. package/vendor/{oscharko-dev-keiko-harness-1.1.5.tgz → oscharko-dev-keiko-harness-1.1.7.tgz} +0 -0
  207. package/vendor/{oscharko-dev-keiko-local-knowledge-1.1.5.tgz → oscharko-dev-keiko-local-knowledge-1.1.7.tgz} +0 -0
  208. package/vendor/{oscharko-dev-keiko-memory-capture-1.1.5.tgz → oscharko-dev-keiko-memory-capture-1.1.7.tgz} +0 -0
  209. package/vendor/{oscharko-dev-keiko-memory-consolidation-1.1.5.tgz → oscharko-dev-keiko-memory-consolidation-1.1.7.tgz} +0 -0
  210. package/vendor/{oscharko-dev-keiko-memory-governance-1.1.5.tgz → oscharko-dev-keiko-memory-governance-1.1.7.tgz} +0 -0
  211. package/vendor/{oscharko-dev-keiko-memory-retrieval-1.1.5.tgz → oscharko-dev-keiko-memory-retrieval-1.1.7.tgz} +0 -0
  212. package/vendor/{oscharko-dev-keiko-memory-vault-1.1.5.tgz → oscharko-dev-keiko-memory-vault-1.1.7.tgz} +0 -0
  213. package/vendor/oscharko-dev-keiko-model-gateway-1.1.7.tgz +0 -0
  214. package/vendor/{oscharko-dev-keiko-quality-intelligence-1.1.5.tgz → oscharko-dev-keiko-quality-intelligence-1.1.7.tgz} +0 -0
  215. package/vendor/oscharko-dev-keiko-sandbox-1.1.7.tgz +0 -0
  216. package/vendor/oscharko-dev-keiko-sdk-1.1.7.tgz +0 -0
  217. package/vendor/oscharko-dev-keiko-security-1.1.7.tgz +0 -0
  218. package/vendor/oscharko-dev-keiko-server-1.1.7.tgz +0 -0
  219. package/vendor/{oscharko-dev-keiko-tool-catalog-1.1.5.tgz → oscharko-dev-keiko-tool-catalog-1.1.7.tgz} +0 -0
  220. package/vendor/{oscharko-dev-keiko-tools-1.1.5.tgz → oscharko-dev-keiko-tools-1.1.7.tgz} +0 -0
  221. package/vendor/{oscharko-dev-keiko-verification-1.1.5.tgz → oscharko-dev-keiko-verification-1.1.7.tgz} +0 -0
  222. package/vendor/{oscharko-dev-keiko-workflows-1.1.5.tgz → oscharko-dev-keiko-workflows-1.1.7.tgz} +0 -0
  223. package/vendor/{oscharko-dev-keiko-workspace-1.1.5.tgz → oscharko-dev-keiko-workspace-1.1.7.tgz} +0 -0
  224. package/dist/ui/static/_next/static/chunks/0c3w2ubla6ek6.js +0 -1
  225. package/dist/ui/static/_next/static/chunks/0fbt5i1tfqbr3.js +0 -1
  226. package/dist/ui/static/_next/static/chunks/0gnizm29lk3ll.js +0 -1
  227. package/dist/ui/static/_next/static/chunks/0nmcnzva3p40l.js +0 -1
  228. package/dist/ui/static/_next/static/chunks/19fesd0w1gjhp.js +0 -3
  229. package/dist/ui/static/_next/static/chunks/1pze64zkvx8vt.js +0 -1
  230. package/dist/ui/static/_next/static/chunks/2h_zvmb272ozs.js +0 -1
  231. package/dist/ui/static/_next/static/chunks/2onl4czrdod2d.js +0 -1
  232. package/dist/ui/static/_next/static/chunks/2thq7sr8sysu-.js +0 -1
  233. package/dist/ui/static/_next/static/chunks/3-l-8qt163_y6.js +0 -1
  234. package/vendor/oscharko-dev-keiko-cli-1.1.5.tgz +0 -0
  235. package/vendor/oscharko-dev-keiko-contracts-1.1.5.tgz +0 -0
  236. package/vendor/oscharko-dev-keiko-model-gateway-1.1.5.tgz +0 -0
  237. package/vendor/oscharko-dev-keiko-sandbox-1.1.5.tgz +0 -0
  238. package/vendor/oscharko-dev-keiko-sdk-1.1.5.tgz +0 -0
  239. package/vendor/oscharko-dev-keiko-security-1.1.5.tgz +0 -0
  240. package/vendor/oscharko-dev-keiko-server-1.1.5.tgz +0 -0
  241. /package/dist/ui/static/_next/static/{IH07azjG4tKvS8qRk-uMI → nXnJJ05BP_rtUCiZsedfT}/_buildManifest.js +0 -0
  242. /package/dist/ui/static/_next/static/{IH07azjG4tKvS8qRk-uMI → nXnJJ05BP_rtUCiZsedfT}/_clientMiddlewareManifest.js +0 -0
  243. /package/dist/ui/static/_next/static/{IH07azjG4tKvS8qRk-uMI → nXnJJ05BP_rtUCiZsedfT}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.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MAAM,CAAC;IAC/B,YAAY,aAAa,EAAE,MAAM,EAIhC;CACF;AA+ID,wBAAuB,aAAa,CAClC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,GAAE,MAA2B,EACrC,aAAa,CAAC,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,WAAW,EACpB,MAAM,CAAC,EAAE,MAAM,IAAI,GAClB,cAAc,CAahB"}
@@ -1500,11 +1500,12 @@ async function nextRead(reader, idleTimeoutMs, deadline, signal) {
1500
1500
  throw read === ABORTED_MARKER ? abortReason(signal) : new SseIdleTimeoutError(idleTimeoutMs ?? 0);
1501
1501
  }
1502
1502
  // The data payloads of complete SSE lines, up to `data: [DONE]`, which sets `ended.done`.
1503
- function* dataPayloads(lines, ended) {
1503
+ function* dataPayloads(lines, ended, onDone) {
1504
1504
  for (const line of lines) {
1505
1505
  const result = parseSseLine(line);
1506
1506
  if (result.kind === "done") {
1507
1507
  ended.done = true;
1508
+ onDone?.();
1508
1509
  return;
1509
1510
  }
1510
1511
  if (result.kind === "value")
@@ -1517,7 +1518,7 @@ function dataDeadlineFor(idleTimeoutMs) {
1517
1518
  // The payloads of one SSE read, up to `data: [DONE]` or the end of the body. Incomplete lines are
1518
1519
  // buffered across reads, cumulative bytes are capped exactly like readJsonCapped, and the wait for
1519
1520
  // each data event is bounded. readSseStream owns the reader and releases it.
1520
- async function* ssePayloads(reader, maxBytes, idleTimeoutMs, signal) {
1521
+ async function* ssePayloads(reader, maxBytes, idleTimeoutMs, signal, onDone) {
1521
1522
  const decoder = new TextDecoder();
1522
1523
  const deadline = dataDeadlineFor(idleTimeoutMs);
1523
1524
  const ended = { done: false };
@@ -1539,26 +1540,26 @@ async function* ssePayloads(reader, maxBytes, idleTimeoutMs, signal) {
1539
1540
  buffer += decoder.decode(value, { stream: true });
1540
1541
  const { lines, rest } = splitSseBuffer(buffer);
1541
1542
  buffer = rest;
1542
- for (const payload of dataPayloads(lines, ended)) {
1543
+ for (const payload of dataPayloads(lines, ended, onDone)) {
1543
1544
  yield payload;
1544
1545
  deadline?.restart();
1545
1546
  }
1546
1547
  if (ended.done)
1547
1548
  return;
1548
1549
  }
1549
- yield* dataPayloads([buffer + decoder.decode()], ended);
1550
+ yield* dataPayloads([buffer + decoder.decode()], ended, onDone);
1550
1551
  }
1551
1552
  // Reads a Server-Sent-Events response as a stream of parsed JSON `data:` payloads. Incomplete lines
1552
1553
  // are buffered across reads; `data: [DONE]` terminates; cumulative bytes are capped exactly like
1553
1554
  // readJsonCapped. A null body yields nothing. `idleTimeoutMs` bounds the wait for each data event;
1554
1555
  // `signal` ends the read the moment it aborts, with its reason.
1555
- export async function* readSseStream(response, maxBytes = MAX_RESPONSE_BYTES, idleTimeoutMs, signal) {
1556
+ export async function* readSseStream(response, maxBytes = MAX_RESPONSE_BYTES, idleTimeoutMs, signal, onDone) {
1556
1557
  if (response.body === null) {
1557
1558
  return;
1558
1559
  }
1559
1560
  const reader = response.body.getReader();
1560
1561
  try {
1561
- yield* ssePayloads(reader, maxBytes, idleTimeoutMs, signal);
1562
+ yield* ssePayloads(reader, maxBytes, idleTimeoutMs, signal, onDone);
1562
1563
  }
1563
1564
  finally {
1564
1565
  // Every exit releases the body: the end of the stream, a failure, and a consumer that stops
@@ -1 +1 @@
1
- {"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../src/observability.ts"],"names":[],"mappings":"AAwBA,OAAO,EAML,KAAK,oBAAoB,EAC1B,MAAM,qDAAqD,CAAC;AAG7D,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAIvE,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;AAEvE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAClD,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM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AM,GAAG,SAAS,CAAC;IAgB5C,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,oBAAoB,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;CAC3E;AAKD,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAE/F;AAKD,eAAO,MAAM,uBAAuB,EAAE,mBAQpC,CAAC;AASH,wBAAgB,cAAc,CAAC,IAAI,EAAE,mBAAmB,GAAG,SAAS,GAAG,mBAAmB,CAEzF;AA0GD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C;AAiBD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,mBAAmB,EACzB,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,mBAAmB,CAarB;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,CAE9E;AAUD,wBAAgB,QAAQ,IAAI,MAAM,MAAM,CAGvC;AA8BD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAKnD;AAoBD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAIzE;AAOD,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAElD;AAKD,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAUjF"}
@@ -216,6 +216,7 @@ const ACTIVITY_LOG_ERROR_KIND_RULES = [
216
216
  { pattern: /cancel|abort/u, result: "cancelled" },
217
217
  { pattern: /rate|^429$/u, result: "rate-limited" },
218
218
  { pattern: /valid|schema/u, result: "validation-failed" },
219
+ { pattern: /model[_-]?refusal|content[_-]?filter/u, result: "permission-denied" },
219
220
  {
220
221
  pattern: /(?:^|[._-])auth(?:entication)?(?:[._-]|$)|permission|forbidden|blocked/u,
221
222
  result: "permission-denied",
@@ -1,10 +1,13 @@
1
1
  import { MalformedToolCallError } from "@oscharko-dev/keiko-security/errors/gateway";
2
2
  import { type ModelGatewayLogContext, type ModelGatewayLogSink } from "./observability.js";
3
3
  import type { CostClass, GatewayRequest, GatewayStreamChunk, ModelProviderConfig, NormalizedResponse, ProviderAdapter, StreamReadBounds } from "./types.js";
4
+ export declare function resetChatCompatibilityMemoForTests(): void;
4
5
  export interface AdapterDeps {
5
6
  readonly fetchImpl?: typeof fetch | undefined;
6
7
  readonly requestId: string;
7
8
  readonly costClass: CostClass;
9
+ /** Stable, credential-scoped provider identity before per-call timeout copies are made. */
10
+ readonly compatibilityMemoScope?: object | undefined;
8
11
  readonly now?: (() => number) | undefined;
9
12
  readonly log?: ModelGatewayLogSink | undefined;
10
13
  readonly logContext?: ModelGatewayLogContext | undefined;
@@ -28,6 +31,10 @@ export declare class OpenAiAdapter implements ProviderAdapter {
28
31
  private withPartialUsage;
29
32
  private mapStreamError;
30
33
  private dispatch;
34
+ private dispatchCompatibleStream;
35
+ private retryWithoutUsage;
36
+ private retryWithoutStreamingIfNamed;
37
+ private logChatCompatibilityRetry;
31
38
  private mapDispatchError;
32
39
  private readBody;
33
40
  private readErrorBody;
@@ -1 +1 @@
1
- {"version":3,"file":"openai-adapter.d.ts","sourceRoot":"","sources":["../src/openai-adapter.ts"],"names":[],"mappings":"AAUA,OAAO,EAOL,sBAAsB,EAOvB,MAAM,6CAA6C,CAAC;AA6BrD,OAAO,EASL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,SAAS,EAET,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAElB,eAAe,EACf,gBAAgB,EAEjB,MAAM,YAAY,CAAC;AA6EpB,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,O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B,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, 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";
@@ -33,7 +33,20 @@ const CHAT_REQUEST_DISPATCH_OPERATION = defineActivityLogOperation({
33
33
  dataClass: "closed-enum",
34
34
  required: true,
35
35
  },
36
+ streamUsageRequested: {
37
+ type: "boolean",
38
+ dataClass: "closed-enum",
39
+ required: false,
40
+ },
41
+ // Historical chat.request.dispatch lines predate this diagnostic; old bundles remain readable.
42
+ toolCount: { type: "integer", dataClass: "count", required: false },
36
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 },
37
50
  },
38
51
  causal: "correlation",
39
52
  lifecycle: "start",
@@ -42,6 +55,61 @@ const CHAT_REQUEST_DISPATCH_OPERATION = defineActivityLogOperation({
42
55
  proofIds: ["chat.request.dispatch.emitted-line"],
43
56
  releaseImpact: "patch",
44
57
  });
58
+ const CHAT_REQUEST_COMPATIBILITY_RETRY_OPERATION = defineActivityLogOperation({
59
+ contractKind: "activity-log-operation",
60
+ schemaVersion: 1,
61
+ op: "chat.request.compatibility-retry",
62
+ category: "gateway",
63
+ owner: "keiko-model-gateway",
64
+ emitter: "openai-adapter.dispatchCompatibleStream",
65
+ fields: {
66
+ endpointDigest: { type: "string", dataClass: "digest", required: true, maxLength: 64 },
67
+ modelId: { type: "string", dataClass: "opaque-id", required: true, maxLength: 256 },
68
+ omittedField: {
69
+ type: "string",
70
+ dataClass: "closed-enum",
71
+ required: true,
72
+ values: ["stream_options", "stream"],
73
+ },
74
+ },
75
+ causal: "correlation",
76
+ lifecycle: "state",
77
+ analyzerProjection: "timeline",
78
+ failureClasses: ["gateway-chat-provider-call"],
79
+ proofIds: ["chat.request.compatibility-retry.emitted-line"],
80
+ releaseImpact: "patch",
81
+ });
82
+ let chatCompatibilityEndpoints = new WeakMap();
83
+ const MAX_STRICT_STREAM_OPTIONS_ENDPOINTS = 256;
84
+ const STRICT_STREAM_OPTIONS_REPROBE_MS = 15 * 60_000;
85
+ function chatCompatibilityMode(scope, url, now) {
86
+ const endpoints = chatCompatibilityEndpoints.get(scope);
87
+ const memo = endpoints?.get(url);
88
+ if (memo === undefined)
89
+ return undefined;
90
+ if (memo.expiresAt > now())
91
+ return memo.mode;
92
+ endpoints?.delete(url);
93
+ return undefined;
94
+ }
95
+ function rememberChatCompatibility(scope, url, mode, now) {
96
+ let endpoints = chatCompatibilityEndpoints.get(scope);
97
+ if (endpoints === undefined) {
98
+ endpoints = new Map();
99
+ chatCompatibilityEndpoints.set(scope, endpoints);
100
+ }
101
+ if (endpoints.has(url))
102
+ endpoints.delete(url);
103
+ if (endpoints.size >= MAX_STRICT_STREAM_OPTIONS_ENDPOINTS) {
104
+ const oldest = endpoints.keys().next().value;
105
+ if (oldest !== undefined)
106
+ endpoints.delete(oldest);
107
+ }
108
+ endpoints.set(url, { mode, expiresAt: now + STRICT_STREAM_OPTIONS_REPROBE_MS });
109
+ }
110
+ export function resetChatCompatibilityMemoForTests() {
111
+ chatCompatibilityEndpoints = new WeakMap();
112
+ }
45
113
  const CHAT_RESPONSE_STREAMED_OPERATION = defineActivityLogOperation({
46
114
  contractKind: "activity-log-operation",
47
115
  schemaVersion: 1,
@@ -63,6 +131,16 @@ const CHAT_RESPONSE_STREAMED_OPERATION = defineActivityLogOperation({
63
131
  silenceMs: { type: "number", dataClass: "duration", required: true },
64
132
  readBudgetMs: { type: "number", dataClass: "duration", required: false },
65
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
+ },
66
144
  },
67
145
  causal: "correlation",
68
146
  lifecycle: "end",
@@ -99,6 +177,29 @@ function logChatDispatch(log, fields) {
99
177
  const correlationId = logCorrelationId(log);
100
178
  log.write(activityLogEvent(CHAT_REQUEST_DISPATCH_OPERATION, { level: "info", ...(correlationId === undefined ? {} : { correlationId }) }, fields));
101
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
+ }
188
+ function chatDispatchFields(url, request, config, body, stream, includeUsage, bounds) {
189
+ const maxOutputTokens = dispatchedMaxOutputTokens(request, config);
190
+ return {
191
+ endpointDigest: sha256Hex(logEndpointHost(url) ?? "invalid-endpoint"),
192
+ modelId: logModelId(config.modelId),
193
+ messageCount: request.messages.length,
194
+ bodyBytes: Buffer.byteLength(body, "utf8"),
195
+ timeoutMs: bounds?.silenceMs ?? config.timeoutMs,
196
+ stream,
197
+ ...(stream ? { streamUsageRequested: includeUsage } : {}),
198
+ toolCount: request.tools?.length ?? 0,
199
+ ...(bounds === undefined ? {} : { readBudgetMs: bounds.budgetMs }),
200
+ ...(maxOutputTokens === undefined ? {} : { maxOutputTokens }),
201
+ };
202
+ }
102
203
  function cancellationWasDeadline(signal) {
103
204
  return (signal?.aborted === true &&
104
205
  signal.reason instanceof DOMException &&
@@ -127,6 +228,15 @@ function timedAbort(ms, message) {
127
228
  },
128
229
  };
129
230
  }
231
+ // The bounds one dispatched request runs under. A buffered (`stream: false`) answer sends nothing,
232
+ // headers included, until its generation ends, so only the read budget bounds when it starts; the
233
+ // silence bound belongs to a streamed read, whose provider proves it is alive as it goes (PR #3600
234
+ // review).
235
+ function dispatchedReadBounds(stream, bounds) {
236
+ return stream || bounds === undefined
237
+ ? bounds
238
+ : { silenceMs: bounds.budgetMs, budgetMs: bounds.budgetMs };
239
+ }
130
240
  function requestDeadline(timeoutMs, bounds, cancel) {
131
241
  const withCancel = (signals) => AbortSignal.any(cancel === undefined ? [...signals] : [...signals, cancel]);
132
242
  if (bounds === undefined) {
@@ -209,11 +319,11 @@ function buildBody(request, config) {
209
319
  // uses its own silence bound instead (ADR-0003). Exported for tests.
210
320
  export const STREAM_IDLE_TIMEOUT_MS = 60_000;
211
321
  // `include_usage` requests a final usage-only chunk so token accounting survives.
212
- function buildStreamBody(request, config) {
322
+ function buildStreamBody(request, config, includeUsage) {
213
323
  return {
214
324
  ...buildBody(request, config),
215
325
  stream: true,
216
- stream_options: { include_usage: true },
326
+ ...(includeUsage ? { stream_options: { include_usage: true } } : {}),
217
327
  };
218
328
  }
219
329
  const FINISH_REASONS = new Set([
@@ -418,6 +528,10 @@ function assertUsableAssistantResponse(response, modelId, secrets) {
418
528
  if (response.content.trim().length > 0 || response.toolCalls.length > 0) {
419
529
  return;
420
530
  }
531
+ // The budget ran out before any content: a reasoning model spent it on reasoning (#3591).
532
+ if (response.finishReason === "length") {
533
+ throw new ProviderOutputExhaustedError(modelId, secrets);
534
+ }
421
535
  throw new ProviderError(`provider returned an empty assistant response for '${modelId}'`, PROVIDER_EMPTY_ASSISTANT_STATUS, secrets);
422
536
  }
423
537
  function errorSignal(payload) {
@@ -437,8 +551,80 @@ function isContextOverflow(status, payload) {
437
551
  }
438
552
  return CONTEXT_OVERFLOW_SIGNAL.test(errorSignal(payload));
439
553
  }
554
+ const MODEL_REFUSAL_SIGNAL = /content[_ -]?filter|refus|safety|policy/;
440
555
  function isModelRefusal(payload) {
441
- return /content[_ -]?filter|refus|safety|policy/.test(errorSignal(payload));
556
+ return MODEL_REFUSAL_SIGNAL.test(errorSignal(payload));
557
+ }
558
+ function isOptionalStreamFieldRejection(payload) {
559
+ const error = isRecord(payload) && isRecord(payload.error) ? payload.error : payload;
560
+ if (!isRecord(error))
561
+ return false;
562
+ const field = /stream[_ -]?options|include[_ -]?usage/;
563
+ if (typeof error.param === "string" && field.test(error.param.toLowerCase()))
564
+ return true;
565
+ if (error.code === "unsupported_parameter" || error.type === "unsupported_parameter")
566
+ return true;
567
+ const message = typeof error.message === "string" ? error.message.toLowerCase() : "";
568
+ return (/(?:stream[_ -]?options|include[_ -]?usage).{0,48}(?:disabled|unsupported|not supported|not allowed|not permitted|unrecognized|unknown|invalid|prohibited|rejected)/.test(message) ||
569
+ /(?:unsupported|unknown|unrecognized|invalid|prohibited|rejected).{0,48}(?:stream[_ -]?options|include[_ -]?usage)/.test(message));
570
+ }
571
+ function isNamedStreamFieldRejection(payload) {
572
+ const error = isRecord(payload) && isRecord(payload.error) ? payload.error : payload;
573
+ if (!isRecord(error) || !isOptionalStreamFieldRejection(payload))
574
+ return false;
575
+ const field = /stream[_ -]?options|include[_ -]?usage/;
576
+ return ((typeof error.param === "string" && field.test(error.param.toLowerCase())) ||
577
+ (typeof error.message === "string" && field.test(error.message.toLowerCase())));
578
+ }
579
+ function hasNonStreamErrorParameter(payload) {
580
+ const error = isRecord(payload) && isRecord(payload.error) ? payload.error : payload;
581
+ if (!isRecord(error))
582
+ return false;
583
+ if (typeof error.param === "string" && isNonStreamField(error.param))
584
+ return true;
585
+ return typeof error.message === "string" && namesDifferentUnsupportedField(error.message);
586
+ }
587
+ function isNonStreamField(field) {
588
+ const normalized = field.trim().toLowerCase();
589
+ return (normalized.length > 0 &&
590
+ !/^(?:stream[_ -]?options(?:\.[a-z][a-z0-9_]*)*|include[_ -]?usage)$/.test(normalized));
591
+ }
592
+ function namesDifferentUnsupportedField(message) {
593
+ const patterns = [
594
+ /\b([a-z][a-z0-9_]*)\s+(?:parameter|field)\s+(?:is\s+)?(?:unsupported|not supported|invalid|rejected)\b/g,
595
+ /\b(?:unsupported|unknown|unrecognized|invalid|rejected)\s+(?:parameter|field)\s*:\s*[`"']?([a-z][a-z0-9_]*)/g,
596
+ /\b(?:parameter|field)\s+[`"']([a-z][a-z0-9_]*)[`"']\s+(?:is\s+)?(?:unsupported|not supported|invalid|rejected)\b/g,
597
+ ];
598
+ return patterns.some((pattern) => [...message.toLowerCase().matchAll(pattern)].some((match) => match[1] !== undefined && isNonStreamField(match[1])));
599
+ }
600
+ function isStructuredModelRefusal(payload) {
601
+ const error = isRecord(payload) && isRecord(payload.error) ? payload.error : payload;
602
+ if (!isRecord(error))
603
+ return false;
604
+ return [error.code, error.type].some((value) => typeof value === "string" && MODEL_REFUSAL_SIGNAL.test(value.toLowerCase()));
605
+ }
606
+ function isContentRefusalMessage(payload) {
607
+ const error = isRecord(payload) && isRecord(payload.error) ? payload.error : payload;
608
+ if (!isRecord(error) || typeof error.message !== "string")
609
+ return false;
610
+ // A refusal can quote the request field without rejecting that field's shape.
611
+ return /\bprompt\b|content[_ -]?filter|\bsafety\b|\brefus(?:al|ed|es|ing)\b/.test(error.message.toLowerCase());
612
+ }
613
+ function isStrictChatShapeRejection(status) {
614
+ return status === 400 || status === 422;
615
+ }
616
+ function shouldPreserveProviderRejection(status, payload) {
617
+ return (isContextOverflow(status, payload) ||
618
+ hasNonStreamErrorParameter(payload) ||
619
+ (isModelRefusal(payload) &&
620
+ (isStructuredModelRefusal(payload) || isContentRefusalMessage(payload))) ||
621
+ !isOptionalStreamFieldRejection(payload));
622
+ }
623
+ function remainingCompatibilityBudgetMs(bounds, startedAt, now, config, secrets) {
624
+ const budgetMs = (bounds?.budgetMs ?? config.timeoutMs) - Math.max(0, now() - startedAt);
625
+ if (budgetMs <= 0)
626
+ throw new TimeoutError(`provider retry budget expired for '${config.modelId}'`, secrets);
627
+ return budgetMs;
442
628
  }
443
629
  function mapHttpError(response, modelId, secrets, payload) {
444
630
  mapProviderFailure(response.status, retryAfterMs(response), modelId, secrets, payload, false);
@@ -522,6 +708,7 @@ function newStreamAccumulator() {
522
708
  content: "",
523
709
  refusal: "",
524
710
  finishReason: "stop",
711
+ sawFinishReason: false,
525
712
  prompt: 0,
526
713
  completion: 0,
527
714
  usage: undefined,
@@ -582,8 +769,10 @@ function streamReadFields(read, report, outcome) {
582
769
  // in-flight response accumulator, when present.
583
770
  function applyChunkMetadata(chunk, acc) {
584
771
  const finish = finishReasonFromChunk(chunk);
585
- if (finish !== undefined)
772
+ if (finish !== undefined) {
586
773
  acc.finishReason = finish;
774
+ acc.sawFinishReason = true;
775
+ }
587
776
  const usage = usageFromChunk(chunk);
588
777
  if (usage !== undefined && isRecord(chunk) && isRecord(chunk.usage)) {
589
778
  acc.prompt = usage.prompt;
@@ -645,7 +834,7 @@ export class OpenAiAdapter {
645
834
  }
646
835
  const start = this.now();
647
836
  const catalog = createGatewayToolCatalogBridge(request, this.now, this.log);
648
- const dispatched = await this.dispatch({ ...request, tools: catalog.tools.length === 0 ? undefined : catalog.tools }, config, secrets, true, bounds);
837
+ const dispatched = await this.dispatchCompatibleStream({ ...request, tools: catalog.tools.length === 0 ? undefined : catalog.tools }, config, secrets, bounds);
649
838
  try {
650
839
  const { response } = dispatched;
651
840
  if (!response.ok) {
@@ -678,8 +867,11 @@ export class OpenAiAdapter {
678
867
  const buffer = { pending: "" };
679
868
  const activeSecrets = configuredSecrets(read.secrets);
680
869
  const silenceMs = read.bounds?.silenceMs ?? STREAM_IDLE_TIMEOUT_MS;
870
+ const completion = { sawDone: false };
681
871
  try {
682
- for await (const chunk of readSseStream(response, undefined, silenceMs, read.signal)) {
872
+ for await (const chunk of readSseStream(response, undefined, silenceMs, read.signal, () => {
873
+ completion.sawDone = true;
874
+ })) {
683
875
  recordDataEvent(report);
684
876
  throwOnStreamedFailure(chunk, read.config.modelId, read.secrets);
685
877
  const content = deltaFromChunk(chunk);
@@ -688,6 +880,10 @@ export class OpenAiAdapter {
688
880
  }
689
881
  applyChunkMetadata(chunk, acc);
690
882
  }
883
+ // An explicit provider refusal must retain its refusal class even if the stream then closes.
884
+ if (!completion.sawDone && !acc.sawFinishReason && acc.refusal.length === 0) {
885
+ throw new ProviderError("provider stream ended without a terminal frame", PROVIDER_EMPTY_ASSISTANT_STATUS, read.secrets);
886
+ }
691
887
  yield* flushPendingBuffer(buffer, read.secrets);
692
888
  }
693
889
  catch (error) {
@@ -767,6 +963,7 @@ export class OpenAiAdapter {
767
963
  }, {
768
964
  ...streamReadFields(read, report, outcome),
769
965
  ...(settled ? {} : { silentForMs: durationMs - report.lastDataMs }),
966
+ outputExhausted: error instanceof ProviderOutputExhaustedError,
770
967
  }));
771
968
  }
772
969
  // Retain the usage the stream had already accumulated (counts only, never
@@ -801,23 +998,16 @@ export class OpenAiAdapter {
801
998
  }
802
999
  return new TransportError(`stream read failed for '${config.modelId}'`, secrets);
803
1000
  }
804
- async dispatch(request, config, secrets, stream = false, bounds) {
1001
+ async dispatch(request, config, secrets, stream = false, bounds, includeUsage = true) {
805
1002
  const url = chatCompletionsUrl(config);
806
- const body = JSON.stringify(stream ? buildStreamBody(request, config) : buildBody(request, config));
1003
+ const body = JSON.stringify(stream ? buildStreamBody(request, config, includeUsage) : buildBody(request, config));
807
1004
  const headers = {
808
1005
  "content-type": "application/json",
809
1006
  ...apiKeyHeaders(config),
810
1007
  };
811
- logChatDispatch(this.log, {
812
- endpointDigest: sha256Hex(logEndpointHost(url) ?? "invalid-endpoint"),
813
- modelId: logModelId(config.modelId),
814
- messageCount: request.messages.length,
815
- bodyBytes: Buffer.byteLength(body, "utf8"),
816
- timeoutMs: bounds?.silenceMs ?? config.timeoutMs,
817
- stream,
818
- ...(bounds === undefined ? {} : { readBudgetMs: bounds.budgetMs }),
819
- });
820
- const deadline = requestDeadline(config.timeoutMs, bounds, request.cancellationSignal);
1008
+ const readBounds = dispatchedReadBounds(stream, bounds);
1009
+ logChatDispatch(this.log, chatDispatchFields(url, request, config, body, stream, includeUsage, readBounds));
1010
+ const deadline = requestDeadline(config.timeoutMs, readBounds, request.cancellationSignal);
821
1011
  try {
822
1012
  const response = await gatewayFetch(url, {
823
1013
  method: "POST",
@@ -836,6 +1026,82 @@ export class OpenAiAdapter {
836
1026
  throw this.mapDispatchError(error, config, deadline.signal, secrets);
837
1027
  }
838
1028
  }
1029
+ async dispatchCompatibleStream(request, config, secrets, bounds) {
1030
+ const url = chatCompletionsUrl(config);
1031
+ const startedAt = Date.now();
1032
+ const memoScope = this.deps.compatibilityMemoScope ?? config;
1033
+ const context = {
1034
+ request,
1035
+ config,
1036
+ secrets,
1037
+ bounds,
1038
+ startedAt,
1039
+ memoScope,
1040
+ url,
1041
+ };
1042
+ const mode = chatCompatibilityMode(memoScope, url, this.now);
1043
+ if (mode === "whole-body")
1044
+ return this.dispatch(request, config, secrets, false, bounds);
1045
+ const includeUsage = mode !== "omit-usage";
1046
+ const first = await this.dispatch(request, config, secrets, true, bounds, includeUsage);
1047
+ if (first.response.ok || !isStrictChatShapeRejection(first.response.status))
1048
+ return first;
1049
+ if (!includeUsage)
1050
+ return this.retryWithoutStreamingIfNamed(first, context);
1051
+ const retry = await this.retryWithoutUsage(first, context);
1052
+ if (retry.response.ok) {
1053
+ rememberChatCompatibility(memoScope, url, "omit-usage", this.now());
1054
+ return retry;
1055
+ }
1056
+ return this.retryWithoutStreamingIfNamed(retry, context);
1057
+ }
1058
+ async retryWithoutUsage(failed, context) {
1059
+ const { request, config, secrets, bounds, startedAt, url } = context;
1060
+ try {
1061
+ const payload = await this.readErrorBody(failed.response, config, secrets, failed.signal);
1062
+ if (shouldPreserveProviderRejection(failed.response.status, payload)) {
1063
+ mapHttpError(failed.response, config.modelId, secrets, payload);
1064
+ }
1065
+ }
1066
+ finally {
1067
+ failed.dispose();
1068
+ }
1069
+ const remainingMs = remainingCompatibilityBudgetMs(bounds, startedAt, Date.now, config, secrets);
1070
+ const retryBounds = bounds === undefined ? undefined : { ...bounds, budgetMs: remainingMs };
1071
+ const retryConfig = bounds === undefined ? { ...config, timeoutMs: remainingMs } : config;
1072
+ this.logChatCompatibilityRetry(url, config, failed.response.status, "stream_options");
1073
+ return this.dispatch(request, retryConfig, secrets, true, retryBounds, false);
1074
+ }
1075
+ async retryWithoutStreamingIfNamed(failed, context) {
1076
+ const { request, config, secrets, bounds, startedAt, memoScope, url } = context;
1077
+ if (!isStrictChatShapeRejection(failed.response.status))
1078
+ return failed;
1079
+ try {
1080
+ const payload = await this.readErrorBody(failed.response, config, secrets, failed.signal);
1081
+ if (shouldPreserveProviderRejection(failed.response.status, payload) ||
1082
+ !isNamedStreamFieldRejection(payload)) {
1083
+ mapHttpError(failed.response, config.modelId, secrets, payload);
1084
+ }
1085
+ }
1086
+ finally {
1087
+ failed.dispose();
1088
+ }
1089
+ const remainingMs = remainingCompatibilityBudgetMs(bounds, startedAt, Date.now, config, secrets);
1090
+ const retryBounds = bounds === undefined ? undefined : { ...bounds, budgetMs: remainingMs };
1091
+ const retryConfig = bounds === undefined ? { ...config, timeoutMs: remainingMs } : config;
1092
+ this.logChatCompatibilityRetry(url, config, failed.response.status, "stream");
1093
+ const retry = await this.dispatch(request, retryConfig, secrets, false, retryBounds);
1094
+ if (retry.response.ok)
1095
+ rememberChatCompatibility(memoScope, url, "whole-body", this.now());
1096
+ return retry;
1097
+ }
1098
+ logChatCompatibilityRetry(url, config, status, omittedField) {
1099
+ this.log.write(activityLogEvent(CHAT_REQUEST_COMPATIBILITY_RETRY_OPERATION, { level: "warn", status, correlationId: logCorrelationId(this.log) }, {
1100
+ endpointDigest: sha256Hex(logEndpointHost(url) ?? "invalid-endpoint"),
1101
+ modelId: logModelId(config.modelId),
1102
+ omittedField,
1103
+ }));
1104
+ }
839
1105
  mapDispatchError(error, config, signal, secrets) {
840
1106
  if (signal.aborted) {
841
1107
  return requestAbortError(signal, config.modelId, secrets);
@@ -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,Q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AE,SAAS,sBAAsB,EAAE,CAAA;CAAE,GACxE;IACE,QAAQ,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));
@@ -1 +1 @@
1
- {"version":3,"file":"realtime-voice-adapter.d.ts","sourceRoot":"","sources":["../src/realtime-voice-adapter.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAW7E,eAAO,MAAM,aAAa,SAAU,CAAC;AAKrC,8FAA8F;AAC9F,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAC3E,+FAA+F;AAC/F,eAAO,MAAM,8CAA8C,yBAAyB,CAAC;AACrF,qGAAqG;AACrG,eAAO,MAAM,eAAe,YAC1B,OAAO,EACP,KAAK,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,SAAS,EACT,OAAO,CACC,CAAC;AACX,qGAAqG;AACrG,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAC7D,qGAAqG;AACrG,eAAO,MAAM,sBAAsB,EAAE,aAAuB,CAAC;AAE7D,qGAAqG;AACrG,wBAA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