@oscharko-dev/keiko 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/dist/ui/csp-hashes.json +7 -7
- package/dist/ui/static/404.html +1 -1
- package/dist/ui/static/__next.__PAGE__.txt +12 -12
- package/dist/ui/static/__next._full.txt +23 -22
- package/dist/ui/static/__next._tree.txt +2 -2
- package/dist/ui/static/_next/static/chunks/014h2nyfet3kr.js +1 -0
- package/dist/ui/static/_next/static/chunks/02ahxxpsbao7z.js +1 -0
- package/dist/ui/static/_next/static/chunks/0851fl0j1ja4e.js +1 -0
- package/dist/ui/static/_next/static/chunks/08896ukd2zxg6.js +1 -0
- package/dist/ui/static/_next/static/chunks/08nml2svyd9vv.js +4 -0
- package/dist/ui/static/_next/static/chunks/08tg5xjyy073b.js +1 -0
- package/dist/ui/static/_next/static/chunks/09p2ty64ellxo.js +1 -0
- package/dist/ui/static/_next/static/chunks/0b7xat6jxvrmr.js +1 -0
- package/dist/ui/static/_next/static/chunks/{196257vfyrtgu.js → 0d3a8-uxb000v.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{388eokaf_2t9k.js → 0jjhji-e9mg99.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0jtp8te-03j1-.js +1 -0
- package/dist/ui/static/_next/static/chunks/0lw_ax6yn_z8w.js +1 -0
- package/dist/ui/static/_next/static/chunks/0oocu54xdbxf3.js +2 -0
- package/dist/ui/static/_next/static/chunks/{3h-rh_lx0l8_3.js → 0pf5ot48kepng.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0rs9egrg2q85w.js +1 -0
- package/dist/ui/static/_next/static/chunks/{3hclt6m3ok4n9.js → 0rsutf6da798_.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0rw0et8bt6w-b.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2b_t95bbpmtej.js → 0su17ctiaqfp0.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0wok-g3ndtvch.js +1 -0
- package/dist/ui/static/_next/static/chunks/0y3402xorco2c.js +1 -0
- package/dist/ui/static/_next/static/chunks/10p1rdlk7n_9w.js +1 -0
- package/dist/ui/static/_next/static/chunks/12aem44im45f-.js +1 -0
- package/dist/ui/static/_next/static/chunks/18kcx5kpyxr16.js +1 -0
- package/dist/ui/static/_next/static/chunks/1ggcq_lho062y.js +1 -0
- package/dist/ui/static/_next/static/chunks/1o-own3kgpojf.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0l72usw6suk0h.js → 1osovjtjgxmbl.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1uu9slkxpbe4y.js +1 -0
- package/dist/ui/static/_next/static/chunks/1vy80v9kp_rqv.js +1 -0
- package/dist/ui/static/_next/static/chunks/1x-sfb1_rl15-.js +1 -0
- package/dist/ui/static/_next/static/chunks/1zqfkyeqq5cl8.js +1 -0
- package/dist/ui/static/_next/static/chunks/{3603jy78awb1p.js → 1zw11x_e-3fzu.js} +1 -1
- package/dist/ui/static/_next/static/chunks/20-u8pg5ve_cz.js +1 -0
- package/dist/ui/static/_next/static/chunks/22zxuap4am9bs.js +1 -0
- package/dist/ui/static/_next/static/chunks/23lstlpeh2rb-.js +1 -0
- package/dist/ui/static/_next/static/chunks/261euyxjrb0lv.js +1 -0
- package/dist/ui/static/_next/static/chunks/2astwwmbb8e53.js +1 -0
- package/dist/ui/static/_next/static/chunks/2duxlo7cg_s7_.js +3 -0
- package/dist/ui/static/_next/static/chunks/2dwrkrp-gqyej.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1m-9yzfpcm7wc.js → 2ef4l5re80dgi.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2g_pljoa8f0e-.js +1 -0
- package/dist/ui/static/_next/static/chunks/{09zc5hgtb7s-z.js → 2h4vqb2rt3mr1.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{3qjkuhjy_-_br.js → 2imh4llefx9d1.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2jsnrkl0syr4y.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0--s8pmsbkf62.js → 2ta3jr_uw2j0x.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2y98z-sun8_ew.js → 2u5_pu1uc6seh.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2xd3_a4jlxum2.css +1 -0
- package/dist/ui/static/_next/static/chunks/{0mjsj7bp-ukgh.css → 2yuvdrio9ki3a.css} +26 -9
- package/dist/ui/static/_next/static/chunks/3-pcgkdsv7x4z.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0yzmg9aoglud6.js → 3007ncr8g751a.js} +1 -1
- package/dist/ui/static/_next/static/chunks/307xuhrdmetj7.js +1 -0
- package/dist/ui/static/_next/static/chunks/30og31pxg8wrp.js +1 -0
- package/dist/ui/static/_next/static/chunks/32jgtvf2y-f54.js +1 -0
- package/dist/ui/static/_next/static/chunks/35ivnhnxr9dmz.js +1 -0
- package/dist/ui/static/_next/static/chunks/363iuc3t94rie.js +1 -0
- package/dist/ui/static/_next/static/chunks/37qsy798-g74f.js +1 -0
- package/dist/ui/static/_next/static/chunks/37v998g0cm36x.js +1 -0
- package/dist/ui/static/_next/static/chunks/3b05n-007vc3e.js +1 -0
- package/dist/ui/static/_next/static/chunks/3cpuzx4fetu6y.js +1 -0
- package/dist/ui/static/_next/static/chunks/3d27ozm1boe_5.js +3 -0
- package/dist/ui/static/_next/static/chunks/{1a6ri-sriyu-m.js → 3ftqojkan-5cl.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3fwt6-8rc2mya.js +1 -0
- package/dist/ui/static/_next/static/chunks/{196x_tfexoucg.js → 3g4px251sg85e.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3hjs3gk92eave.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1n3b0bhd9q0p6.js → 3l3xw2fmr7pct.js} +3 -3
- package/dist/ui/static/_next/static/chunks/3neoxf-shnu-d.js +1 -0
- package/dist/ui/static/_next/static/chunks/3payvp5ps2fne.css +3 -0
- package/dist/ui/static/_next/static/chunks/3q-93bizla3k1.js +1 -0
- package/dist/ui/static/_next/static/chunks/{3eduf6vevclfm.js → 3qbbcm9fuk494.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2ta3xj9td_qot.js → 3rhep1yhgo6a7.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{0bpexy600ffpg.js → 3ty06iqiblqi4.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{0iu3dyqe7m7_7.js → 3wz98o059mhtf.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2kylv1kq1_4p1.js → 3x2p8mgrihuet.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3xi3iilmw9_vy.js +5 -0
- package/dist/ui/static/_next/static/chunks/3zxbqudoeow_a.js +1 -0
- package/dist/ui/static/_next/static/chunks/3zxwlxhzm5swe.js +1 -0
- package/dist/ui/static/_next/static/chunks/{24u-5fslcj3n9.js → 405vbzo164i84.js} +2 -2
- package/dist/ui/static/_next/static/chunks/42pls95xys34g.js +1 -0
- package/dist/ui/static/_next/static/chunks/43z5mfwx4lk4w.js +1 -0
- package/dist/ui/static/_next/static/chunks/{turbopack-2rwr7ign9ynaa.js → turbopack-34k8wgx0iwdzg.js} +1 -1
- package/dist/ui/static/_not-found/__next._full.txt +21 -20
- package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +9 -9
- package/dist/ui/static/_not-found/__next._tree.txt +1 -1
- package/dist/ui/static/_not-found.html +1 -1
- package/dist/ui/static/_not-found.txt +21 -20
- package/dist/ui/static/atlassian-connectors/__next._full.txt +23 -22
- package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +11 -11
- package/dist/ui/static/atlassian-connectors.html +1 -1
- package/dist/ui/static/atlassian-connectors.txt +23 -22
- package/dist/ui/static/index.html +1 -1
- package/dist/ui/static/index.txt +23 -22
- package/dist/ui/static/launch/__next._full.txt +26 -25
- package/dist/ui/static/launch/__next._tree.txt +2 -2
- package/dist/ui/static/launch/__next.launch.__PAGE__.txt +12 -12
- package/dist/ui/static/launch.html +1 -1
- package/dist/ui/static/launch.txt +26 -25
- package/dist/ui/static/local-knowledge/__next._full.txt +26 -25
- package/dist/ui/static/local-knowledge/__next._tree.txt +2 -2
- package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +12 -12
- package/dist/ui/static/local-knowledge/capsule/__next._full.txt +11 -11
- package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +11 -11
- package/dist/ui/static/local-knowledge/capsule.html +1 -1
- package/dist/ui/static/local-knowledge/capsule.txt +11 -11
- package/dist/ui/static/local-knowledge.html +1 -1
- package/dist/ui/static/local-knowledge.txt +26 -25
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-analyze.d.ts +5 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-analyze.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-analyze.js +26 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.js +112 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.d.ts +12 -5
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.js +14 -6
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-retrieval-miss.d.ts +13 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-retrieval-miss.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-retrieval-miss.js +363 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-cli/dist/init.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/init.js +1 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/lifecycle-browser-activity.d.ts +22 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/lifecycle-browser-activity.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/lifecycle-browser-activity.js +50 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/lifecycle.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/lifecycle.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/lifecycle.js +137 -32
- package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.d.ts +24 -3
- package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.js +126 -5
- package/node_modules/@oscharko-dev/keiko-cli/dist/ui-browser-handoff.d.ts +15 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/ui-browser-handoff.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/ui-browser-handoff.js +91 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/ui.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/ui.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/ui.js +31 -3
- package/node_modules/@oscharko-dev/keiko-cli/package.json +15 -15
- package/node_modules/@oscharko-dev/keiko-connectors/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-connectors/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts +229 -49
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.js +313 -24
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts +2406 -98
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.js +2924 -183
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts +2489 -206
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.js +2867 -35
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts +35 -5
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.js +63 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-app-session-pairing.d.ts +37 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-app-session-pairing.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-app-session-pairing.js +67 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-app-session.d.ts +2 -35
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-app-session.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-app-session.js +1 -62
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-repository-search.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-repository-search.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-repository-search.js +12 -9
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-safe-activity.d.ts +38 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-safe-activity.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-safe-activity.js +94 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api-validation.d.ts +3 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api-validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api-validation.js +64 -17
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.d.ts +8 -4
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api.js +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-constants.d.ts +17 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-constants.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-constants.js +13 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime.js +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-validation.js +27 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts +28 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.js +27 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-context.d.ts +28 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-context.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-context.js +60 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/contract-validation-primitives.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/contract-validation-primitives.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/contract-validation-primitives.js +12 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts +70 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.js +266 -5
- package/node_modules/@oscharko-dev/keiko-contracts/dist/evidence.d.ts +11 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/evidence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts +57 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.js +4 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/governed-tool-catalog.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/governed-tool-catalog.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/grounded-assessment.d.ts +10 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/grounded-assessment.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/grounded-assessment.js +52 -12
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +5 -5
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/no-evidence-answer.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/no-evidence-answer.js +29 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/opencode-service-host.d.ts +42 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/opencode-service-host.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/opencode-service-host.js +151 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report.d.ts +36 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report.js +11 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/tools.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +2 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace.d.ts +41 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace.js +18 -0
- package/node_modules/@oscharko-dev/keiko-contracts/package.json +9 -1
- package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
- package/node_modules/@oscharko-dev/keiko-evidence/dist/connected-context-evidence.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-evidence/dist/connected-context-evidence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/connected-context-evidence.js +23 -3
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
- package/node_modules/@oscharko-dev/keiko-git/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-git/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/package.json +7 -7
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/conversation/grounded-answer-runner.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/conversation/grounded-answer-runner.js +3 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/parsers/_internal.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/parsers/_internal.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/parsers/_internal.js +2 -33
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/parsers/html-parser.js +5 -4
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/index.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/index.js +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/retrieval-runner.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/retrieval-runner.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/retrieval-runner.js +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/scoped-vector-search.d.ts +9 -2
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/scoped-vector-search.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/scoped-vector-search.js +18 -10
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.js +103 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/embedding.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/embedding.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/embedding.js +2 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway-attempt-admission.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway-attempt-admission.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway-attempt-admission.js +44 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts +89 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.js +617 -129
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.js +28 -3
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts +3 -2
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.js +2 -2
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/model-selection.d.ts +23 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/model-selection.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/model-selection.js +50 -5
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/normalize.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/normalize.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/normalize.js +54 -2
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.js +2 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts +11 -3
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.js +262 -58
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/readiness-probe.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/readiness-probe.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/readiness-probe.js +1 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +143 -3
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.js +361 -39
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/toolCatalogBridge.d.ts +9 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/toolCatalogBridge.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/toolCatalogBridge.js +62 -16
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/types.d.ts +15 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +4 -4
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.js +30 -15
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/plan.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/plan.js +24 -3
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-gateway.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/runtime-gateway.js +31 -6
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-execution-root.d.ts +11 -0
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-execution-root.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/seatbelt-execution-root.js +141 -0
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/select.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/select.js +2 -0
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/types.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
- package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
- package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts +10 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.js +25 -2
- package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/portable-tree-attestation.d.ts +14 -0
- package/node_modules/@oscharko-dev/keiko-security/dist/portable-tree-attestation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/portable-tree-attestation.js +183 -25
- package/node_modules/@oscharko-dev/keiko-security/dist/redaction.d.ts +9 -0
- package/node_modules/@oscharko-dev/keiko-security/dist/redaction.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/redaction.js +16 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-activity.d.ts +9 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-activity.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-activity.js +47 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.js +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.js +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.js +274 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/ciRepairPromptReservation.d.ts +11 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/ciRepairPromptReservation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/ciRepairPromptReservation.js +21 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.d.ts +50 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeActivityOperations.js +25 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairController.d.ts +14 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairController.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeCiRepairController.js +33 -26
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.d.ts +46 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.js +33 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeEventHub.d.ts +51 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeEventHub.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeEventHub.js +97 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.d.ts +8 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.js +265 -29
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts +37 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.js +416 -34
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorState.d.ts +5 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorState.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorState.js +14 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts +21 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRefusalEscalation.d.ts +79 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRefusalEscalation.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRefusalEscalation.js +305 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryInstructions.d.ts +100 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryInstructions.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRepositoryInstructions.js +363 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.js +13 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRunEffort.d.ts +71 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRunEffort.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRunEffort.js +294 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeTerminalCause.d.ts +47 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeTerminalCause.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeTerminalCause.js +65 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeVerificationContinuation.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeVerificationContinuation.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeVerificationContinuation.js +79 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts +18 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.js +201 -42
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.d.ts +6 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolAuthorityPort.js +733 -17
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.d.ts +5 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.js +262 -57
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts +185 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.js +57 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolGovernedDelegate.d.ts +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolGovernedDelegate.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolGovernedDelegate.js +14 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolInvocationRegistry.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolInvocationRegistry.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolInvocationRegistry.js +50 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts +21 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.js +143 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.d.ts +63 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.js +710 -170
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReplacementEdits.d.ts +108 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReplacementEdits.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReplacementEdits.js +477 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLanePortableCodingRuntime.d.ts +2 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLanePortableCodingRuntime.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLanePortableCodingRuntime.js +53 -46
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/devLaneRuntimeProcessBackend.js +51 -52
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/governedToolModelContent.d.ts +48 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/governedToolModelContent.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/governedToolModelContent.js +179 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/materializedPatchRegistry.d.ts +60 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/materializedPatchRegistry.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/materializedPatchRegistry.js +61 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeRuntimeProcessBackend.d.ts +7 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeRuntimeProcessBackend.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeRuntimeProcessBackend.js +48 -15
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeRuntimeProcessPaths.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeRuntimeProcessPaths.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeRuntimeProcessPaths.js +14 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeRuntimeProcessProtocol.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/nativeRuntimeProcessProtocol.js +11 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/npmLaneRuntimeApprovals.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/npmLaneRuntimeApprovals.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/npmLaneRuntimeApprovals.js +28 -14
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.js +48 -20
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.d.ts +5 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeLaunchProfile.js +11 -12
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeContext.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeContext.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeNativeContext.js +27 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeReconciler.d.ts +6 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeReconciler.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeReconciler.js +15 -15
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.d.ts +17 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.js +198 -43
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts +97 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.js +1334 -103
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceHostArtifact.d.ts +79 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceHostArtifact.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeServiceHostArtifact.js +176 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.d.ts +177 -25
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeToolSchemas.js +131 -38
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.d.ts +18 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2History.js +298 -32
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2HttpClient.js +14 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2LiveText.d.ts +33 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2LiveText.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2LiveText.js +213 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionAuxiliaryPorts.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionAuxiliaryPorts.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionAuxiliaryPorts.js +2 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCiRepairRuntime.js +15 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeHost.js +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeResolver.d.ts +25 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeResolver.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionCodingRuntimeResolver.js +227 -40
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.d.ts +20 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.js +217 -12
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.d.ts +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeActivation.js +20 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.d.ts +8 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/repositorySearchProof.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/repositorySearchProof.js +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/skillDiscoveryProof.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.functional/skillDiscoveryProof.js +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.js +262 -60
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionRuntimeWorkspaceAuthority.d.ts +18 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionRuntimeWorkspaceAuthority.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionRuntimeWorkspaceAuthority.js +43 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeAuthorityService.d.ts +38 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeAuthorityService.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeAuthorityService.js +115 -16
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeGatewayProcessSandbox.d.ts +20 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeGatewayProcessSandbox.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeGatewayProcessSandbox.js +48 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeProcessSupervisor.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeProcessSupervisor.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/runtimeProcessSupervisor.js +5 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextRead.d.ts +100 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextRead.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextRead.js +435 -25
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadAbsence.d.ts +61 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadAbsence.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadAbsence.js +123 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadArtifact.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadArtifact.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadArtifact.js +26 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadNodeProcess.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadNodeProcess.js +10 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadProcess.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadProcess.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadProcess.js +17 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadProtocol.d.ts +69 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadProtocol.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/secureWorkspaceTextReadProtocol.js +266 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts +14 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.js +761 -122
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-tool-facade.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-tool-facade.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-tool-facade.js +139 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/command-runner.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/command-runner.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/command-runner.js +176 -19
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-readiness-admission.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-readiness-admission.js +72 -13
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-readiness-log.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-readiness-log.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-readiness-log.js +48 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/correlation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/correlation.js +8 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/credentialVault.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/credentialVault.js +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +39 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +234 -77
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.js +6 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentAuthorityRegistry.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentAuthorityRegistry.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentAuthorityRegistry.js +16 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentRootBoundary.d.ts +5 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentRootBoundary.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentRootBoundary.js +60 -12
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentRoutes.d.ts +13 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentRoutes.js +131 -18
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/bufferSafetyTargets.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/bufferSafetyTargets.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/bufferSafetyTargets.js +44 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/changesetLineBreakProvenance.d.ts +26 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/changesetLineBreakProvenance.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/changesetLineBreakProvenance.js +87 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/codingContextProviders.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/codingContextProviders.js +0 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.js +62 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecutionLog.d.ts +128 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecutionLog.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecutionLog.js +213 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRunner.js +68 -24
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRuntimeTarget.d.ts +13 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRuntimeTarget.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationRuntimeTarget.js +121 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts +10 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.js +280 -88
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.js +11 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts +15 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +445 -45
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup-activity.d.ts +31 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup-activity.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup-activity.js +74 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-startup.js +282 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.js +7 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.js +7 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/gitPorcelainStatus.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gitPorcelainStatus.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitPorcelainStatus.js +46 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-activity.d.ts +19 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-activity.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-activity.js +177 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-assessment.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-assessment.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-assessment.js +69 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-evidence.d.ts +11 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-evidence.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-evidence.js +53 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-repair.d.ts +25 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-repair.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer-repair.js +120 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer.d.ts +56 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer.js +194 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-assistant-referents.d.ts +16 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-assistant-referents.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-assistant-referents.js +133 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-candidate-ordering.d.ts +16 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-candidate-ordering.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-candidate-ordering.js +103 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-capability.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-capability.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-capability.js +79 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-log.d.ts +22 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-log.js +112 -11
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-repair.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-repair.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-repair.js +117 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-context-pack-reranker.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-context-pack-reranker.js +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-contextual-fallback.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-contextual-fallback.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-contextual-fallback.js +41 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-conversation-continuity.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-conversation-continuity.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-conversation-continuity.js +54 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-diagnostic-references.d.ts +42 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-diagnostic-references.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-diagnostic-references.js +91 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-document-evidence.d.ts +6 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-document-evidence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-document-evidence.js +61 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-eval-support.d.ts +28 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-eval-support.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-eval-support.js +140 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-evidence-selection.d.ts +9 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-evidence-selection.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-evidence-selection.js +40 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-explicit-paths.d.ts +44 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-explicit-paths.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-explicit-paths.js +385 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-faithfulness-eval.d.ts +5 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-faithfulness-eval.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-faithfulness-eval.js +91 -39
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-faithfulness.d.ts +43 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-faithfulness.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-faithfulness.js +247 -34
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-follow-up.d.ts +27 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-follow-up.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-follow-up.js +198 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-latency-eval.d.ts +16 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-latency-eval.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-latency-eval.js +69 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.d.ts +106 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.js +2618 -376
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-plural-synthesis.d.ts +27 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-plural-synthesis.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-plural-synthesis.js +74 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-preselection-reranker.d.ts +25 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-preselection-reranker.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-preselection-reranker.js +93 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt-context.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt-context.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt.js +26 -13
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts +23 -9
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.js +403 -90
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts +31 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.js +485 -99
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts +24 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.js +395 -90
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-repo-semantic-search.d.ts +32 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-repo-semantic-search.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-repo-semantic-search.js +370 -48
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank-facade.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank-facade.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank-facade.js +22 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank.js +5 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-retrieval-eval.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-retrieval-eval.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-retrieval-eval.js +25 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-selection-quality.d.ts +19 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-selection-quality.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-selection-quality.js +55 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-semantic-request.d.ts +31 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-semantic-request.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-semantic-request.js +55 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-symbol-trace-cycles.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-symbol-trace-cycles.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-symbol-trace-cycles.js +90 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-symbol-trace.d.ts +44 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-symbol-trace.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-symbol-trace.js +1053 -83
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-worktree-recency.d.ts +34 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-worktree-recency.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-worktree-recency.js +190 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-worktree-request.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-worktree-request.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-worktree-request.js +19 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.js +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/read-handlers.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/read-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/read-handlers.js +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/server.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/server.js +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/chats.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/chats.js +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/legacySchemaTestFixture.js +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/store/schema.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/schema.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/schema.js +159 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-routes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-routes.js +4 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/routes.js +3 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolDispatch.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolDispatch.js +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.d.ts +20 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.js +96 -20
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolPorts.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolPorts.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolRuntimeAuthority.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolRuntimeAuthority.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolRuntimeAuthority.js +47 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-staging-verification.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-staging-verification.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-staging-verification.js +23 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-sidecar-verification.js +12 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/workspace-index-provider.js +4 -4
- package/node_modules/@oscharko-dev/keiko-server/package.json +23 -23
- package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.d.ts +9 -25
- package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/opencode.js +207 -112
- package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/profile.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-tool-catalog/dist/profile.js +15 -2
- package/node_modules/@oscharko-dev/keiko-tool-catalog/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-tools/dist/exec.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/exec.js +44 -5
- package/node_modules/@oscharko-dev/keiko-tools/dist/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/patch-content.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/patch-content.js +142 -49
- package/node_modules/@oscharko-dev/keiko-tools/dist/patch-parse.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/patch-parse.js +14 -3
- package/node_modules/@oscharko-dev/keiko-tools/dist/patch.d.ts +15 -0
- package/node_modules/@oscharko-dev/keiko-tools/dist/patch.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/patch.js +24 -9
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/package.json +7 -7
- package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.d.ts +16 -4
- package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-verification/dist/dependencies.js +198 -25
- package/node_modules/@oscharko-dev/keiko-verification/dist/failure-location.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-verification/dist/failure-location.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-verification/dist/failure-location.js +34 -17
- package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.js +32 -2
- package/node_modules/@oscharko-dev/keiko-verification/dist/plan.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-verification/dist/plan.js +25 -16
- package/node_modules/@oscharko-dev/keiko-verification/dist/targeted-project.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-verification/dist/targeted-project.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-verification/dist/targeted-project.js +37 -0
- package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/failure-parse.d.ts +10 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/failure-parse.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/failure-parse.js +93 -15
- package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/bug-investigation/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/contextpack/assemble.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/contextpack/assemble.js +16 -16
- package/node_modules/@oscharko-dev/keiko-workflows/dist/contextpack/reranker.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/contextpack/reranker.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/anchors.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/anchors.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/anchors.js +296 -15
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/governor.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/index.d.ts +3 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/index.js +1 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/intent.d.ts +7 -2
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/intent.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/intent.js +85 -5
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/plan.d.ts +11 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/plan.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/plan.js +507 -32
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/references.d.ts +19 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/references.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/references.js +159 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/filter.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/filter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/filter.js +13 -16
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/index.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/index.js +2 -2
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/rank.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/rank.js +21 -4
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/scoring.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/scoring.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/scoring.js +44 -29
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/signals.d.ts +5 -2
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/signals.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/signals.js +141 -45
- package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
- package/node_modules/@oscharko-dev/keiko-workspace/dist/binaryDetect.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/binaryDetect.js +91 -15
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligence.d.ts +22 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligence.js +661 -106
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligenceSurface.d.ts +3 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligenceSurface.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligenceSurface.js +3 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.d.ts +24 -4
- package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.js +89 -26
- package/node_modules/@oscharko-dev/keiko-workspace/dist/endpointContractAdapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/endpointContractAdapter.js +31 -9
- package/node_modules/@oscharko-dev/keiko-workspace/dist/endpointContractGraph.d.ts +3 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/endpointContractGraph.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/endpointContractGraph.js +35 -5
- package/node_modules/@oscharko-dev/keiko-workspace/dist/endpointContractSource.d.ts +7 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/endpointContractSource.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/endpointContractSource.js +40 -7
- package/node_modules/@oscharko-dev/keiko-workspace/dist/endpointContractTypes.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/endpointContractTypes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/importGraphEdges.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/importGraphEdges.js +11 -5
- package/node_modules/@oscharko-dev/keiko-workspace/dist/index.d.ts +8 -3
- package/node_modules/@oscharko-dev/keiko-workspace/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/index.js +7 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.d.ts +26 -5
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.js +418 -35
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchHtml.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchHtml.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchHtml.js +21 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchLineSelection.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchLineSelection.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchLineSelection.js +5 -3
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchMatchers.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchMatchers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchMatchers.js +32 -4
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchPolicy.d.ts +5 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchPolicy.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchPolicy.js +41 -22
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchQueryTerms.d.ts +14 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchQueryTerms.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchQueryTerms.js +97 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchRoutes.d.ts +11 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchRoutes.js +154 -18
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.d.ts +6 -5
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.js +88 -24
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchStream.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchStream.js +21 -14
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralAdapterRequestContext.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralAdapterRequestContext.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralAdapterRequestContext.js +205 -14
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralAdapters.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralAdapters.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralAdapters.js +17 -13
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralExecution.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralExecution.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralExecution.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/symbolGraphLexing.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/symbolGraphLexing.js +13 -7
- package/node_modules/@oscharko-dev/keiko-workspace/dist/testSourcePairing.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/types.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/types.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndex.d.ts +13 -5
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndex.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndex.js +112 -42
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndexQueryMatch.d.ts +11 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndexQueryMatch.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndexQueryMatch.js +71 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndexStreaming.d.ts +47 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndexStreaming.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndexStreaming.js +231 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspacePathDiscovery.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspacePathDiscovery.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspacePathDiscovery.js +178 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/xmlEntities.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/xmlEntities.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/xmlEntities.js +34 -0
- package/node_modules/@oscharko-dev/keiko-workspace/package.json +4 -3
- package/package.json +28 -27
- package/release-impact.catalog.json +100 -0
- package/vendor/oscharko-dev-keiko-activity-log-1.2.1.tgz +0 -0
- package/vendor/oscharko-dev-keiko-cli-1.2.1.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-connectors-1.2.0.tgz → oscharko-dev-keiko-connectors-1.2.1.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-contracts-1.2.1.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-evaluations-1.2.0.tgz → oscharko-dev-keiko-evaluations-1.2.1.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-evidence-1.2.1.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-git-1.2.0.tgz → oscharko-dev-keiko-git-1.2.1.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-harness-1.2.0.tgz → oscharko-dev-keiko-harness-1.2.1.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-local-knowledge-1.2.1.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-memory-capture-1.2.0.tgz → oscharko-dev-keiko-memory-capture-1.2.1.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-consolidation-1.2.0.tgz → oscharko-dev-keiko-memory-consolidation-1.2.1.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-governance-1.2.0.tgz → oscharko-dev-keiko-memory-governance-1.2.1.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-retrieval-1.2.0.tgz → oscharko-dev-keiko-memory-retrieval-1.2.1.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-vault-1.2.0.tgz → oscharko-dev-keiko-memory-vault-1.2.1.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-1.2.1.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-quality-intelligence-1.2.0.tgz → oscharko-dev-keiko-quality-intelligence-1.2.1.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-sandbox-1.2.1.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-sdk-1.2.0.tgz → oscharko-dev-keiko-sdk-1.2.1.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-security-1.2.1.tgz +0 -0
- package/vendor/oscharko-dev-keiko-server-1.2.1.tgz +0 -0
- package/vendor/oscharko-dev-keiko-tool-catalog-1.2.1.tgz +0 -0
- package/vendor/oscharko-dev-keiko-tools-1.2.1.tgz +0 -0
- package/vendor/oscharko-dev-keiko-verification-1.2.1.tgz +0 -0
- package/vendor/oscharko-dev-keiko-workflows-1.2.1.tgz +0 -0
- package/vendor/oscharko-dev-keiko-workspace-1.2.1.tgz +0 -0
- package/dist/ui/static/_next/static/chunks/07skh7tlpfo1v.js +0 -1
- package/dist/ui/static/_next/static/chunks/09i_8713x46yr.js +0 -1
- package/dist/ui/static/_next/static/chunks/0a6ri2ug5xf10.js +0 -1
- package/dist/ui/static/_next/static/chunks/0bbrrvuzilpy5.js +0 -1
- package/dist/ui/static/_next/static/chunks/0bg7uh6tq8-dx.js +0 -1
- package/dist/ui/static/_next/static/chunks/0cwy6mtvshbuo.js +0 -1
- package/dist/ui/static/_next/static/chunks/0fpbvpzg-omn0.js +0 -1
- package/dist/ui/static/_next/static/chunks/0fz9qig_5p73f.js +0 -1
- package/dist/ui/static/_next/static/chunks/0hvxxuef1gw9p.js +0 -1
- package/dist/ui/static/_next/static/chunks/0ktvc8fs3spkb.js +0 -1
- package/dist/ui/static/_next/static/chunks/0kvy_ru-kodgv.js +0 -1
- package/dist/ui/static/_next/static/chunks/0parm4c86umwk.js +0 -1
- package/dist/ui/static/_next/static/chunks/0q_08tk2d3m2n.js +0 -1
- package/dist/ui/static/_next/static/chunks/0r2lwkgws6jm8.js +0 -1
- package/dist/ui/static/_next/static/chunks/0t73kckx3olud.js +0 -1
- package/dist/ui/static/_next/static/chunks/0u7vyqk91gjb8.js +0 -1
- package/dist/ui/static/_next/static/chunks/0weojtwxo6qw7.js +0 -1
- package/dist/ui/static/_next/static/chunks/0x-r45yl06rdn.js +0 -1
- package/dist/ui/static/_next/static/chunks/0zlw46qz0crxg.css +0 -1
- package/dist/ui/static/_next/static/chunks/0zuaq_9l5pma_.js +0 -1
- package/dist/ui/static/_next/static/chunks/10kb8j7vggfwk.js +0 -1
- package/dist/ui/static/_next/static/chunks/14qdwomthzucj.js +0 -1
- package/dist/ui/static/_next/static/chunks/1a7ko-_7t4wjo.js +0 -1
- package/dist/ui/static/_next/static/chunks/1czgn62g6km38.js +0 -3
- package/dist/ui/static/_next/static/chunks/1juiifi_xnx68.js +0 -1
- package/dist/ui/static/_next/static/chunks/1wg1s3jm779ro.js +0 -3
- package/dist/ui/static/_next/static/chunks/224bbe_3ksnlw.js +0 -1
- package/dist/ui/static/_next/static/chunks/263_uck8el32f.js +0 -1
- package/dist/ui/static/_next/static/chunks/26gmn1z4oegqh.js +0 -1
- package/dist/ui/static/_next/static/chunks/28ylcw-leje_k.js +0 -1
- package/dist/ui/static/_next/static/chunks/2937s9os9u2tn.js +0 -1
- package/dist/ui/static/_next/static/chunks/29rlw6dih8owf.js +0 -1
- package/dist/ui/static/_next/static/chunks/2hq0zlnvfqol9.js +0 -1
- package/dist/ui/static/_next/static/chunks/2o584howfzzak.js +0 -3
- package/dist/ui/static/_next/static/chunks/2p66e_a0j23r8.js +0 -1
- package/dist/ui/static/_next/static/chunks/2r4vn_6anv2cw.js +0 -5
- package/dist/ui/static/_next/static/chunks/2ribv7pn1hr-l.js +0 -1
- package/dist/ui/static/_next/static/chunks/2tb2nt2wvu643.js +0 -1
- package/dist/ui/static/_next/static/chunks/2yot6vshhc19p.css +0 -1
- package/dist/ui/static/_next/static/chunks/30j8jo5v60ga1.js +0 -2
- package/dist/ui/static/_next/static/chunks/30q9b_aw8driv.js +0 -1
- package/dist/ui/static/_next/static/chunks/387k5c-bf1b2e.js +0 -1
- package/dist/ui/static/_next/static/chunks/3_alxp77ewgk_.js +0 -1
- package/dist/ui/static/_next/static/chunks/3_ycy0h8pq58a.js +0 -1
- package/dist/ui/static/_next/static/chunks/3ho1f5n8lir4r.js +0 -1
- package/dist/ui/static/_next/static/chunks/3kgc_j74tblcn.js +0 -1
- package/dist/ui/static/_next/static/chunks/3mxpjroefk8ou.js +0 -1
- package/dist/ui/static/_next/static/chunks/3q5jidle0lb3-.js +0 -1
- package/dist/ui/static/_next/static/chunks/3ua7si017r4dg.js +0 -1
- package/dist/ui/static/_next/static/chunks/3v2iluxqnsug9.css +0 -15
- package/dist/ui/static/_next/static/chunks/3z5f2s7yd35cu.js +0 -1
- package/dist/ui/static/_next/static/chunks/40co1uetczqcs.js +0 -1
- package/vendor/oscharko-dev-keiko-activity-log-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-cli-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-contracts-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-evidence-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-local-knowledge-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-sandbox-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-security-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-server-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-tool-catalog-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-tools-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-verification-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-workflows-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-workspace-1.2.0.tgz +0 -0
- /package/dist/ui/static/_next/static/{LNCY1B2FJBOe2AHFXpzB- → FS1LLJ_p3joZhfRkXBRhf}/_buildManifest.js +0 -0
- /package/dist/ui/static/_next/static/{LNCY1B2FJBOe2AHFXpzB- → FS1LLJ_p3joZhfRkXBRhf}/_clientMiddlewareManifest.js +0 -0
- /package/dist/ui/static/_next/static/{LNCY1B2FJBOe2AHFXpzB- → FS1LLJ_p3joZhfRkXBRhf}/_ssgManifest.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { gatewaySpendRejectionReason } from "./gateway-spend-budget.js";
|
|
2
2
|
import { CodingRuntimeLaunchRejectedError } from "./coding-runtime/launchFailure.js";
|
|
3
|
-
import {
|
|
3
|
+
import { CancelledError, CircuitOpenError, ContextOverflowError, CallerAttemptAdmissionError, GatewayError, MalformedToolCallError, ModelRefusalError, ProviderEmptyAnswerError, ProviderError, ProviderOutputExhaustedError, RateLimitError, TimeoutError, TransportError, } from "@oscharko-dev/keiko-security/errors/gateway";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
5
|
import { findConfiguredCapability, resolveCodingSafeSidecarGatewayProfile, ResponseRedactionError, } from "@oscharko-dev/keiko-model-gateway";
|
|
6
6
|
import { countGatewayPromptTokens, } from "@oscharko-dev/keiko-model-gateway/internal/prompt-token-accounting";
|
|
@@ -9,9 +9,9 @@ import { compareStrings } from "@oscharko-dev/keiko-contracts/runtime/comparator
|
|
|
9
9
|
import { CODING_WORKBENCH_MINIMUM_CODING_CONTEXT_PROMPT_TOKENS } from "@oscharko-dev/keiko-contracts/runtime/coding-workbench";
|
|
10
10
|
import { activityLogEvent, defineActivityLogOperation, } from "@oscharko-dev/keiko-contracts/runtime/observability";
|
|
11
11
|
import { MODEL_REASONING_EFFORTS, validateGatewaySamplingParameters, } from "@oscharko-dev/keiko-contracts/runtime/gateway";
|
|
12
|
-
import { currentGateway, currentGatewayConfig, currentGatewayVerification, } from "./deps.js";
|
|
12
|
+
import { currentGateway, currentGatewayConfig, currentGatewayVerification, currentConversationReadinessObservation, } from "./deps.js";
|
|
13
13
|
import { OPENCODE_RUNTIME_MODEL_ALIAS, OPENCODE_RUNTIME_READINESS_PROMPT, } from "./coding-runtime/opencodeLaunchProfile.js";
|
|
14
|
-
import { createOpenCodeGatewayToolCatalogAdvertisement, opencodeGatewayOfferLifetimeMs, hasExactOpenCodeVisibleToolContract,
|
|
14
|
+
import { createOpenCodeGatewayToolCatalogAdvertisement, opencodeGatewayOfferLifetimeMs, hasExactOpenCodeVisibleToolContract, openCodeVisibleToolNames, } from "./coding-runtime/opencodeToolSchemas.js";
|
|
15
15
|
import { correlationIdOrUnknown, UNKNOWN_CORRELATION_ID } from "./correlation.js";
|
|
16
16
|
import { describeError, emitServerDiagnostic, serverDiagnosticFromError, } from "./diagnostics-log.js";
|
|
17
17
|
import { readJsonObject } from "./files.js";
|
|
@@ -63,13 +63,23 @@ function observedPromptSettlement(outcome, selected, unverified) {
|
|
|
63
63
|
* may settle defensively from more than one exit path. Absent `settlePromptTokens` on the injected
|
|
64
64
|
* authenticator (not every deployment wires it) is a silent no-op, never a failure.
|
|
65
65
|
*/
|
|
66
|
-
function settlePromptTokenReservation(deps, reservation, actualPromptTokens) {
|
|
66
|
+
function settlePromptTokenReservation(deps, reservation, actualPromptTokens, discardedPromptTokens = 0) {
|
|
67
67
|
const providerReported = actualPromptTokens !== undefined && actualPromptTokens > 0;
|
|
68
68
|
return applyPromptTokenSettlement(deps, reservation, {
|
|
69
|
-
promptTokens: providerReported ? actualPromptTokens : reservation.reservedPromptTokens
|
|
69
|
+
promptTokens: (providerReported ? actualPromptTokens : reservation.reservedPromptTokens) +
|
|
70
|
+
discardedPromptTokens,
|
|
70
71
|
source: providerReported ? "provider-reported" : "reserved-estimate",
|
|
71
72
|
});
|
|
72
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* The prompt tokens of the attempts the gateway discarded on its way to this answer (#3873 review):
|
|
76
|
+
* a steered repair's first answer, a catalog-rejected tool call, a stream that failed after its
|
|
77
|
+
* usage arrived. The provider processed them, so the run's prompt allowance (ADR-0137 D2, the only
|
|
78
|
+
* default per-run token bound) counts them beside the answer's own prompt.
|
|
79
|
+
*/
|
|
80
|
+
function discardedPromptTokens(response) {
|
|
81
|
+
return response.discardedAttemptUsage?.promptTokens ?? 0;
|
|
82
|
+
}
|
|
73
83
|
/**
|
|
74
84
|
* Releases a reservation whose provider call never ran — the client would not take the opening
|
|
75
85
|
* SSE frame, so the buffered path never called the chat factory and the streamed path never pulled
|
|
@@ -102,14 +112,16 @@ function applyPromptTokenSettlement(deps, reservation, usage) {
|
|
|
102
112
|
reservation.settlement = { ...selected, status: "not-wired" };
|
|
103
113
|
return reservation.settlement;
|
|
104
114
|
}
|
|
105
|
-
const outcome =
|
|
115
|
+
const outcome = reservation.modelCallId === undefined
|
|
116
|
+
? authenticator.settlePromptTokens(reservation.capability, reservation.reservedPromptTokens, usage.promptTokens)
|
|
117
|
+
: authenticator.settlePromptTokens(reservation.capability, reservation.reservedPromptTokens, usage.promptTokens, reservation.modelCallId);
|
|
106
118
|
reservation.settlement = observedPromptSettlement(outcome, selected, unverified);
|
|
107
119
|
return reservation.settlement;
|
|
108
120
|
}
|
|
109
121
|
const CODING_SIDECAR_GATEWAY_ERROR_CODE = "CODING_SIDECAR_UNAVAILABLE";
|
|
110
122
|
const CODING_SIDECAR_GATEWAY_ROUTE = "POST /api/coding-sidecar/gateway/chat/completions";
|
|
111
123
|
const CODING_SAFE_SIDECAR_GATEWAY_PROFILE_ID = "coding-safe-openai-compatible";
|
|
112
|
-
const
|
|
124
|
+
const SIDECAR_SSE_HEARTBEAT_MS = 5_000;
|
|
113
125
|
const OUTPUT_BYTES_PER_TOKEN_LIMIT = 4;
|
|
114
126
|
// The #2680 live-probe fingerprint (many model requests, zero keiko_* facade calls) becomes
|
|
115
127
|
// judgeable once the replayed history holds the two system messages, the task prompt, and three
|
|
@@ -136,6 +148,12 @@ const CODING_SIDECAR_GATEWAY_REQUEST_VALIDATED_OPERATION = defineActivityLogOper
|
|
|
136
148
|
// remains after the prompt — the value an output-exhausted turn has to be read against.
|
|
137
149
|
maxOutputTokens: { type: "integer", dataClass: "count", required: false },
|
|
138
150
|
inputMessageCount: { type: "integer", dataClass: "count", required: true },
|
|
151
|
+
offeredToolCount: { type: "integer", dataClass: "count", required: false },
|
|
152
|
+
// #3873 (F23): how many prior assistant messages carried nothing but the reasoning of a turn that
|
|
153
|
+
// already ran and were dropped before the gateway request was built, so the estimate above and
|
|
154
|
+
// `inputMessageCount` describe what is actually sent upstream. A count; the reasoning is never
|
|
155
|
+
// recorded. `required: false` only because a record written before this field existed lacks it.
|
|
156
|
+
droppedReasoningMessageCount: { type: "integer", dataClass: "count", required: false },
|
|
139
157
|
completeness: { type: "string", dataClass: "completeness-state", required: true },
|
|
140
158
|
loss: { type: "string", dataClass: "loss-state", required: true },
|
|
141
159
|
},
|
|
@@ -163,8 +181,15 @@ const CODING_SIDECAR_GATEWAY_READINESS_INSUFFICIENT_OPERATION = defineActivityLo
|
|
|
163
181
|
"no-tool-calling",
|
|
164
182
|
"tool-calling-unverified",
|
|
165
183
|
"model-verification-pending",
|
|
184
|
+
"conversation-not-ready",
|
|
166
185
|
],
|
|
167
186
|
},
|
|
187
|
+
storedReason: {
|
|
188
|
+
type: "string",
|
|
189
|
+
dataClass: "closed-enum",
|
|
190
|
+
required: false,
|
|
191
|
+
values: ["model-context-window-insufficient", "no-tool-calling", "tool-calling-unverified"],
|
|
192
|
+
},
|
|
168
193
|
inputTokenLimit: { type: "integer", dataClass: "count", required: false },
|
|
169
194
|
availablePromptTokens: { type: "integer", dataClass: "count", required: false },
|
|
170
195
|
maxPromptTokens: { type: "integer", dataClass: "count", required: false },
|
|
@@ -289,6 +314,24 @@ const CODING_SIDECAR_GATEWAY_REJECTED_OPERATION = defineActivityLogOperation({
|
|
|
289
314
|
proofIds: ["coding-sidecar.gateway.rejected.line"],
|
|
290
315
|
releaseImpact: "patch",
|
|
291
316
|
});
|
|
317
|
+
// #3873 (F17, F23): the gateway's one steered repair of an answer the model could not use — one that
|
|
318
|
+
// exhausted its output budget, or ended after reasoning without a tool call or any text — on every
|
|
319
|
+
// settlement line of a turn: whether it ran, and how the repaired attempt ended, so an
|
|
320
|
+
// `output-exhausted` or `empty-answer` turn the runtime may not retry names its cause, and a
|
|
321
|
+
// recovered turn shows the repair that saved it. `exhausted-again` and `empty-again` name how the
|
|
322
|
+
// repaired attempt ended (the whole budget spent once more; no text or tool call once more),
|
|
323
|
+
// whichever failure triggered the repair; `gateway.retry.scheduled` names that trigger. `required:
|
|
324
|
+
// false` only because a record written before these fields existed lacks them; every line written
|
|
325
|
+
// since carries `repairAttempted`, and `repairOutcome` whenever a repair ran.
|
|
326
|
+
const OUTPUT_REPAIR_FIELDS = {
|
|
327
|
+
repairAttempted: { type: "boolean", dataClass: "closed-enum", required: false },
|
|
328
|
+
repairOutcome: {
|
|
329
|
+
type: "string",
|
|
330
|
+
dataClass: "closed-enum",
|
|
331
|
+
required: false,
|
|
332
|
+
values: ["recovered", "exhausted-again", "empty-again", "failed"],
|
|
333
|
+
},
|
|
334
|
+
};
|
|
292
335
|
const CODING_SIDECAR_GATEWAY_TURN_FAILED_OPERATION = defineActivityLogOperation({
|
|
293
336
|
contractKind: "activity-log-operation",
|
|
294
337
|
schemaVersion: 1,
|
|
@@ -333,13 +376,22 @@ const CODING_SIDECAR_GATEWAY_TURN_FAILED_OPERATION = defineActivityLogOperation(
|
|
|
333
376
|
],
|
|
334
377
|
},
|
|
335
378
|
// Whether the answer to the runtime lets it retry the turn: `refused` for a provider rejection
|
|
336
|
-
// no retry can change, which the runtime reads as final (lab 2026-09-26)
|
|
379
|
+
// no retry can change, which the runtime reads as final (lab 2026-09-26), and for an exhausted
|
|
380
|
+
// or empty answer whose one steered repair failed the same way again (#3873, F17, F23).
|
|
337
381
|
runtimeRetry: {
|
|
338
382
|
type: "string",
|
|
339
383
|
dataClass: "closed-enum",
|
|
340
384
|
required: true,
|
|
341
385
|
values: ["allowed", "refused"],
|
|
342
386
|
},
|
|
387
|
+
// #3873 review (PR #3876): `provider-failed` names a provider that rejected the turn and one that
|
|
388
|
+
// stayed unavailable alike. `true` marks the second — a retryable provider status (408, 429,
|
|
389
|
+
// 5xx), a rate limit or an open breaker that outlasted the gateway's outage window — so a run
|
|
390
|
+
// that ends on this failure settles `provider-unavailable` and the log shows why. Absent for
|
|
391
|
+
// every other failure; `required: false` because a line written before this field existed
|
|
392
|
+
// lacks it.
|
|
393
|
+
providerUnavailable: { type: "boolean", dataClass: "closed-enum", required: false },
|
|
394
|
+
...OUTPUT_REPAIR_FIELDS,
|
|
343
395
|
// The Keiko-code frames and cause classes of the failure, when the turn failed on an error
|
|
344
396
|
// (PR #3617 review): a model-answer failure writes no error-level diagnostic, so this line is
|
|
345
397
|
// where its frames live.
|
|
@@ -367,6 +419,85 @@ const CODING_SIDECAR_GATEWAY_TURN_FAILED_OPERATION = defineActivityLogOperation(
|
|
|
367
419
|
proofIds: ["coding-sidecar.gateway.turn-failed.emitted-line"],
|
|
368
420
|
releaseImpact: "patch",
|
|
369
421
|
});
|
|
422
|
+
// #3873 review: while the gateway rides out a provider outage the turn waits silently, and the
|
|
423
|
+
// Workbench's run status read "Waiting for the model" for the whole window. The first retry of an
|
|
424
|
+
// unavailable provider, or the first wait of a call's admission behind the circuit breaker or a
|
|
425
|
+
// provider cooldown, is published to the run's event replay as `model-gateway-retrying` (again when
|
|
426
|
+
// a later frame of the run superseded it while the call kept retrying, which ends the phase on the
|
|
427
|
+
// client), the answer that ends the outage as `model-gateway-recovered`, and a call the run
|
|
428
|
+
// cancelled before either as `model-gateway-retry-stopped`. This line records each publication and
|
|
429
|
+
// whether it reached the replay, so the status the operator saw can be rebuilt from the log. Counts
|
|
430
|
+
// and closed words only: the provider attempt that was retried and the policy it ran under, or the
|
|
431
|
+
// reason the admission was held.
|
|
432
|
+
const CODING_SIDECAR_GATEWAY_RETRY_SURFACED_OPERATION = defineActivityLogOperation({
|
|
433
|
+
contractKind: "activity-log-operation",
|
|
434
|
+
schemaVersion: 1,
|
|
435
|
+
op: "coding-sidecar.gateway.retry-surfaced",
|
|
436
|
+
category: "gateway",
|
|
437
|
+
owner: "keiko-server",
|
|
438
|
+
emitter: "coding-sidecar-gateway.surfaceGatewayRetry",
|
|
439
|
+
fields: {
|
|
440
|
+
runId: { type: "string", dataClass: "opaque-id", required: true, maxLength: 128 },
|
|
441
|
+
revision: { type: "integer", dataClass: "count", required: true },
|
|
442
|
+
state: {
|
|
443
|
+
type: "string",
|
|
444
|
+
dataClass: "closed-enum",
|
|
445
|
+
required: true,
|
|
446
|
+
values: ["running", "paused"],
|
|
447
|
+
},
|
|
448
|
+
// `retry-stopped`: the call was retried or held and ended with neither an answer nor a
|
|
449
|
+
// turn-failure frame, because the run cancelled it (a client that went away, a transport that
|
|
450
|
+
// was cut, the route deadline); no answer recovered the outage and nothing is retrying it now.
|
|
451
|
+
fact: {
|
|
452
|
+
type: "string",
|
|
453
|
+
dataClass: "closed-enum",
|
|
454
|
+
required: true,
|
|
455
|
+
values: ["retrying", "recovered", "retry-stopped"],
|
|
456
|
+
},
|
|
457
|
+
// What the `retrying` fact followed, and the policy the call ran under; only on a `retrying`
|
|
458
|
+
// fact. A retry carries the failed PROVIDER `attempt` it followed, counted from 1: the call's
|
|
459
|
+
// steered repair is not a provider attempt and is not counted, so after a repair this is lower
|
|
460
|
+
// than the `attempt` of the `gateway.retry.scheduled` line of the same retry, which counts every
|
|
461
|
+
// attempt of the call and joins this line on the same correlation id. A call whose admission
|
|
462
|
+
// waited before any attempt of its own carries the `waitReason` that held it instead — the
|
|
463
|
+
// closed reason of the `gateway.circuit.wait` line it joins on — and no attempt.
|
|
464
|
+
attempt: { type: "integer", dataClass: "count", required: false },
|
|
465
|
+
waitReason: {
|
|
466
|
+
type: "string",
|
|
467
|
+
dataClass: "closed-enum",
|
|
468
|
+
required: false,
|
|
469
|
+
values: ["provider-cooldown", "circuit-cooldown", "probe-saturated"],
|
|
470
|
+
},
|
|
471
|
+
retryPolicy: {
|
|
472
|
+
type: "string",
|
|
473
|
+
dataClass: "closed-enum",
|
|
474
|
+
required: false,
|
|
475
|
+
values: ["attempts", "outage-window"],
|
|
476
|
+
},
|
|
477
|
+
published: { type: "boolean", dataClass: "closed-enum", required: true },
|
|
478
|
+
publicationReason: {
|
|
479
|
+
type: "string",
|
|
480
|
+
dataClass: "closed-enum",
|
|
481
|
+
required: true,
|
|
482
|
+
values: [
|
|
483
|
+
"published",
|
|
484
|
+
"event-hub-unavailable",
|
|
485
|
+
"terminal-run",
|
|
486
|
+
"invalid-event",
|
|
487
|
+
"sequence-exhausted",
|
|
488
|
+
"capacity-pressure",
|
|
489
|
+
],
|
|
490
|
+
},
|
|
491
|
+
completeness: { type: "string", dataClass: "completeness-state", required: true },
|
|
492
|
+
loss: { type: "string", dataClass: "loss-state", required: true },
|
|
493
|
+
},
|
|
494
|
+
causal: "correlation",
|
|
495
|
+
lifecycle: "state",
|
|
496
|
+
analyzerProjection: "timeline",
|
|
497
|
+
failureClasses: ["coding-sidecar-gateway-retry"],
|
|
498
|
+
proofIds: ["coding-sidecar.gateway.retry-surfaced.emitted-line"],
|
|
499
|
+
releaseImpact: "patch",
|
|
500
|
+
});
|
|
370
501
|
const CODING_SIDECAR_GATEWAY_USAGE_SETTLED_OPERATION = defineActivityLogOperation({
|
|
371
502
|
contractKind: "activity-log-operation",
|
|
372
503
|
schemaVersion: 1,
|
|
@@ -398,6 +529,22 @@ const CODING_SIDECAR_GATEWAY_USAGE_SETTLED_OPERATION = defineActivityLogOperatio
|
|
|
398
529
|
required: true,
|
|
399
530
|
values: ["provider-reported", "streamed-byte-estimate", "output-byte-estimate"],
|
|
400
531
|
},
|
|
532
|
+
// #3878: the turn's share of visible text and model reasoning, as counts beside `outputBytes`
|
|
533
|
+
// (answer text, tool calls and structured output together): the UTF-8 size of the answer text,
|
|
534
|
+
// of the reasoning the provider returned (also when it was not forwarded), and the provider's
|
|
535
|
+
// own reasoning-token count when it reports one, never an estimate. Never the text itself.
|
|
536
|
+
// `required: false`: lines written before these fields existed lack them.
|
|
537
|
+
contentBytes: { type: "integer", dataClass: "count", required: false },
|
|
538
|
+
reasoningBytes: { type: "integer", dataClass: "count", required: false },
|
|
539
|
+
reasoningTokens: { type: "integer", dataClass: "count", required: false },
|
|
540
|
+
// #3873 review: the attempts of this turn the gateway discarded on its way to the answer (a
|
|
541
|
+
// steered repair's first answer, a catalog-rejected tool call, a stream that failed after its
|
|
542
|
+
// usage arrived), with their provider-reported tokens. `promptTokens` above already includes
|
|
543
|
+
// the discarded prompt tokens, because the run's allowance counts every prompt the provider
|
|
544
|
+
// processed. Absent when no attempt was discarded with reported usage.
|
|
545
|
+
discardedAttemptCount: { type: "integer", dataClass: "count", required: false },
|
|
546
|
+
discardedPromptTokens: { type: "integer", dataClass: "count", required: false },
|
|
547
|
+
discardedCompletionTokens: { type: "integer", dataClass: "count", required: false },
|
|
401
548
|
completeness: { type: "string", dataClass: "completeness-state", required: true },
|
|
402
549
|
loss: { type: "string", dataClass: "loss-state", required: true },
|
|
403
550
|
},
|
|
@@ -425,6 +572,23 @@ const CODING_SIDECAR_GATEWAY_OUTCOME_OPERATION = defineActivityLogOperation({
|
|
|
425
572
|
},
|
|
426
573
|
completionTokens: { type: "integer", dataClass: "count", required: true },
|
|
427
574
|
outputBytes: { type: "integer", dataClass: "count", required: true },
|
|
575
|
+
// #3878: the frames (or the one buffered answer) that carried model reasoning to the coding
|
|
576
|
+
// runtime; 0 when the answer had none or the reasoning display is off. A count only.
|
|
577
|
+
reasoningFrames: { type: "integer", dataClass: "count", required: false },
|
|
578
|
+
// #3873 review: the UTF-8 bytes of model reasoning the runtime actually received, beside the
|
|
579
|
+
// frames that carried them. `required: false`: lines written before this field existed lack it.
|
|
580
|
+
forwardedReasoningBytes: { type: "integer", dataClass: "count", required: false },
|
|
581
|
+
// #3873 review: on an `output-limit` turn, which byte bound ended it — the answer's or the
|
|
582
|
+
// forwarded reasoning's — so a support analysis can tell the two cuts apart.
|
|
583
|
+
limit: {
|
|
584
|
+
type: "string",
|
|
585
|
+
dataClass: "closed-enum",
|
|
586
|
+
required: false,
|
|
587
|
+
values: ["answer", "reasoning"],
|
|
588
|
+
},
|
|
589
|
+
// #3873 review: a complete buffered answer whose reasoning exceeded the reasoning byte bound is
|
|
590
|
+
// delivered without it rather than refused; `true` says the reasoning was withheld.
|
|
591
|
+
reasoningWithheld: { type: "boolean", dataClass: "closed-enum", required: false },
|
|
428
592
|
// The route backstop armed for this turn (#3602 review); absent on lines written before 1.1.7.
|
|
429
593
|
deadlineMs: { type: "integer", dataClass: "duration", required: false },
|
|
430
594
|
// On a cancelled outcome only: which armed abort source ended the turn, so a stall that ran into
|
|
@@ -435,6 +599,7 @@ const CODING_SIDECAR_GATEWAY_OUTCOME_OPERATION = defineActivityLogOperation({
|
|
|
435
599
|
required: false,
|
|
436
600
|
values: ["client-disconnect", "route-deadline", "backpressure-killed", "run-stopped"],
|
|
437
601
|
},
|
|
602
|
+
...OUTPUT_REPAIR_FIELDS,
|
|
438
603
|
completeness: { type: "string", dataClass: "completeness-state", required: true },
|
|
439
604
|
loss: { type: "string", dataClass: "loss-state", required: true },
|
|
440
605
|
},
|
|
@@ -564,7 +729,8 @@ function pendingChallengeWait(runId, signal, armed, waiters) {
|
|
|
564
729
|
signal.addEventListener("abort", abort, { once: true });
|
|
565
730
|
});
|
|
566
731
|
}
|
|
567
|
-
export function createOpenCodeGatewayReadinessRegistry() {
|
|
732
|
+
export function createOpenCodeGatewayReadinessRegistry(toolProfile = "direct") {
|
|
733
|
+
openCodeVisibleToolNames(toolProfile);
|
|
568
734
|
const observed = new Set();
|
|
569
735
|
const armed = new Set();
|
|
570
736
|
const adoptionGapDiagnosed = new Set();
|
|
@@ -573,7 +739,8 @@ export function createOpenCodeGatewayReadinessRegistry() {
|
|
|
573
739
|
observed.add(runId);
|
|
574
740
|
waiters.get(runId)?.(true);
|
|
575
741
|
};
|
|
576
|
-
return {
|
|
742
|
+
return Object.freeze({
|
|
743
|
+
toolProfile,
|
|
577
744
|
claim: (runId) => {
|
|
578
745
|
if (!armed.delete(runId))
|
|
579
746
|
return false;
|
|
@@ -609,7 +776,7 @@ export function createOpenCodeGatewayReadinessRegistry() {
|
|
|
609
776
|
adoptionGapDiagnosed.delete(runId);
|
|
610
777
|
waiters.get(runId)?.(false);
|
|
611
778
|
},
|
|
612
|
-
};
|
|
779
|
+
});
|
|
613
780
|
}
|
|
614
781
|
function envEnabled(value) {
|
|
615
782
|
return value !== undefined && ENABLE_TOKENS.has(value.trim().toLowerCase());
|
|
@@ -626,14 +793,27 @@ function isCodingSidecarGatewayChatRole(value) {
|
|
|
626
793
|
function chatFactoryFor(deps, gateway) {
|
|
627
794
|
return deps.codingSidecarGatewayChatFactory ?? defaultChatFactoryFor(gateway);
|
|
628
795
|
}
|
|
796
|
+
// How every model call of a coding turn reaches the gateway, buffered or streamed: under the
|
|
797
|
+
// coding-workbench timeout floors (#3591), the explicit outage policy (#3873), which rides out a
|
|
798
|
+
// gateway overload for the configured `codingOutageWindowMs` instead of failing the autonomous run,
|
|
799
|
+
// and the explicit reasoning delivery (#3878, #3873 F23), which hands the model's reasoning to the
|
|
800
|
+
// Workbench. This route is the only one that sets the last two: an interactive surface that borrows
|
|
801
|
+
// the latency profile for its timeout floors (the commit draft) keeps the fail-fast attempt count
|
|
802
|
+
// and receives its answer without the model's reasoning.
|
|
803
|
+
const CODING_TURN_GATEWAY_POLICY = {
|
|
804
|
+
latencyProfile: "coding-workbench",
|
|
805
|
+
outagePolicy: "outage-window",
|
|
806
|
+
reasoningDelivery: "forward",
|
|
807
|
+
answerRepair: "steered",
|
|
808
|
+
};
|
|
629
809
|
function defaultChatFactoryFor(gateway) {
|
|
630
810
|
return (_config, modelId) => {
|
|
631
|
-
return (request) => gateway.chat({ ...request, modelId,
|
|
811
|
+
return (request) => gateway.chat({ ...request, modelId, ...CODING_TURN_GATEWAY_POLICY });
|
|
632
812
|
};
|
|
633
813
|
}
|
|
634
814
|
function defaultChatStreamFactoryFor(gateway) {
|
|
635
815
|
return (_config, modelId) => {
|
|
636
|
-
return (request) => gateway.chatStream({ ...request, modelId,
|
|
816
|
+
return (request) => gateway.chatStream({ ...request, modelId, ...CODING_TURN_GATEWAY_POLICY });
|
|
637
817
|
};
|
|
638
818
|
}
|
|
639
819
|
function chatStreamFactoryFor(deps, gateway) {
|
|
@@ -755,19 +935,67 @@ function parseContinuationToolCall(value) {
|
|
|
755
935
|
return undefined;
|
|
756
936
|
}
|
|
757
937
|
}
|
|
938
|
+
// The fields an OpenAI-compatible message carries a model's reasoning in. The gateway reads the same
|
|
939
|
+
// two names off a provider's answer (`reasoningText`, keiko-model-gateway normalize.ts), and the
|
|
940
|
+
// sidecar hands reasoning to the runtime as `reasoning_content` (#3878), so a client that echoes an
|
|
941
|
+
// earlier assistant turn's reasoning back sends it under one of them.
|
|
942
|
+
const REASONING_MESSAGE_FIELDS = ["reasoning_content", "reasoning"];
|
|
943
|
+
function carriesReasoning(entry) {
|
|
944
|
+
return REASONING_MESSAGE_FIELDS.some((field) => {
|
|
945
|
+
const reasoning = entry[field];
|
|
946
|
+
return typeof reasoning === "string" && reasoning.length > 0;
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
// No answer text: absent, null, blank, or a list of nothing but blank text parts. A part of any other
|
|
950
|
+
// kind is not "no text" — it is left to the content parser, which rejects what it does not accept.
|
|
951
|
+
function hasNoAnswerText(content) {
|
|
952
|
+
if (content === undefined || content === null)
|
|
953
|
+
return true;
|
|
954
|
+
if (typeof content === "string")
|
|
955
|
+
return content.trim().length === 0;
|
|
956
|
+
return (Array.isArray(content) &&
|
|
957
|
+
content.every((part) => isTextContentPart(part) && part.text.trim().length === 0));
|
|
958
|
+
}
|
|
959
|
+
function hasNoToolCalls(toolCalls) {
|
|
960
|
+
return (toolCalls === undefined ||
|
|
961
|
+
toolCalls === null ||
|
|
962
|
+
(Array.isArray(toolCalls) && toolCalls.length === 0));
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* An assistant message that carries nothing but the reasoning of a turn that already ran (#3873,
|
|
966
|
+
* F23): a reasoning field, no answer text and no tool call. The runtime keeps the reasoning the
|
|
967
|
+
* sidecar forwarded for a turn that then failed in its history and sends that history back with
|
|
968
|
+
* every later request (the live F23 run: about 6,200 prompt tokens and two messages more per failed
|
|
969
|
+
* attempt). Prior reasoning is never resent upstream, so such a message is dropped; the reasoning of
|
|
970
|
+
* a message that also carries text or a tool call is dropped with it by the parser, which copies no
|
|
971
|
+
* reasoning field.
|
|
972
|
+
*/
|
|
973
|
+
function isReasoningOnlyAssistantMessage(entry) {
|
|
974
|
+
return (isRecord(entry) &&
|
|
975
|
+
entry.role === "assistant" &&
|
|
976
|
+
carriesReasoning(entry) &&
|
|
977
|
+
hasNoAnswerText(entry.content) &&
|
|
978
|
+
hasNoToolCalls(entry.tool_calls));
|
|
979
|
+
}
|
|
758
980
|
/**
|
|
759
981
|
* Distinguishes the two 400 reasons an unusable `messages` array can hand back (#3390): `undefined`
|
|
760
982
|
* for the array being missing/empty (`body-empty-messages`), a `RouteResult` when entries were
|
|
761
983
|
* present but at least one was unparsable — `content-part-unsupported` for a recognized-but-closed
|
|
762
984
|
* content part, `message-shape-invalid` (carrying only the total entry COUNT, never any entry's
|
|
763
|
-
* content) for every other malformed shape.
|
|
985
|
+
* content) for every other malformed shape. Reasoning-only assistant messages are dropped and
|
|
986
|
+
* counted (#3873, F23); a history that was nothing else is an empty one.
|
|
764
987
|
*/
|
|
765
988
|
function parseMessages(value) {
|
|
766
989
|
if (!Array.isArray(value) || value.length === 0) {
|
|
767
990
|
return undefined;
|
|
768
991
|
}
|
|
769
992
|
const messages = [];
|
|
993
|
+
let droppedReasoningMessageCount = 0;
|
|
770
994
|
for (const entry of value) {
|
|
995
|
+
if (isReasoningOnlyAssistantMessage(entry)) {
|
|
996
|
+
droppedReasoningMessageCount += 1;
|
|
997
|
+
continue;
|
|
998
|
+
}
|
|
771
999
|
const parsed = parseMessageEntry(entry);
|
|
772
1000
|
if (parsed.kind === "content-part-unsupported") {
|
|
773
1001
|
return badRequest("Request body message content included an unsupported content part.");
|
|
@@ -777,7 +1005,7 @@ function parseMessages(value) {
|
|
|
777
1005
|
}
|
|
778
1006
|
messages.push(parsed.value);
|
|
779
1007
|
}
|
|
780
|
-
return messages;
|
|
1008
|
+
return messages.length === 0 ? undefined : { messages, droppedReasoningMessageCount };
|
|
781
1009
|
}
|
|
782
1010
|
function badRequest(message) {
|
|
783
1011
|
return { status: 400, body: errorBody("BAD_REQUEST", message) };
|
|
@@ -816,8 +1044,8 @@ function isMatchingModelAlias(model, modelAlias, runtimeAuthenticated) {
|
|
|
816
1044
|
: model === undefined || model === modelAlias;
|
|
817
1045
|
}
|
|
818
1046
|
function toolCatalogFor(tools, offer) {
|
|
819
|
-
return isExactManagedToolSet(tools)
|
|
820
|
-
? createOpenCodeGatewayToolCatalogAdvertisement(Date.now(), offer.coverage, offer.offerLifetimeMs)
|
|
1047
|
+
return isExactManagedToolSet(tools, offer.toolProfile)
|
|
1048
|
+
? createOpenCodeGatewayToolCatalogAdvertisement(Date.now(), offer.coverage, offer.offerLifetimeMs, offer.toolProfile)
|
|
821
1049
|
: undefined;
|
|
822
1050
|
}
|
|
823
1051
|
function toolRequestFields(parsed, offer) {
|
|
@@ -856,7 +1084,7 @@ function resolveToolCatalogHandlerCoverage(deps, runId, correlationId) {
|
|
|
856
1084
|
const offeredOptionalTools = [...OPENCODE_OPTIONAL_TOOL_NAMES]
|
|
857
1085
|
.filter((name) => !unavailable.has(name))
|
|
858
1086
|
.sort(compareStrings);
|
|
859
|
-
const coverage = createCanonicalOpenCodeHandlerCoverage(unavailable);
|
|
1087
|
+
const coverage = createCanonicalOpenCodeHandlerCoverage(unavailable, gatewayReadinessRegistry(deps)?.toolProfile ?? "direct");
|
|
860
1088
|
getServerLogger().info(activityLogEvent(CODING_SIDECAR_GATEWAY_TOOL_AVAILABILITY_OPERATION, { correlationId: correlationIdOrUnknown(correlationId) }, {
|
|
861
1089
|
runId,
|
|
862
1090
|
handlerSetDigest: coverage.handlerSetDigest,
|
|
@@ -883,12 +1111,12 @@ function buildChatRequest(parsed, modelAlias, cancellationSignal, maxOutputToken
|
|
|
883
1111
|
};
|
|
884
1112
|
}
|
|
885
1113
|
function parseChatRequest(body) {
|
|
886
|
-
const
|
|
887
|
-
if (
|
|
1114
|
+
const parsedMessages = parseMessages(body.messages);
|
|
1115
|
+
if (parsedMessages === undefined) {
|
|
888
1116
|
return undefined;
|
|
889
1117
|
}
|
|
890
|
-
if (isRouteResult(
|
|
891
|
-
return
|
|
1118
|
+
if (isRouteResult(parsedMessages)) {
|
|
1119
|
+
return parsedMessages;
|
|
892
1120
|
}
|
|
893
1121
|
const tools = parseTools(body.tools);
|
|
894
1122
|
if (isRouteResult(tools)) {
|
|
@@ -896,7 +1124,8 @@ function parseChatRequest(body) {
|
|
|
896
1124
|
}
|
|
897
1125
|
return {
|
|
898
1126
|
...(typeof body.model === "string" && body.model.length > 0 ? { model: body.model } : {}),
|
|
899
|
-
messages,
|
|
1127
|
+
messages: parsedMessages.messages,
|
|
1128
|
+
droppedReasoningMessageCount: parsedMessages.droppedReasoningMessageCount,
|
|
900
1129
|
...(tools === undefined ? {} : { tools }),
|
|
901
1130
|
...(typeof body.stream === "boolean" ? { stream: body.stream } : {}),
|
|
902
1131
|
...(typeof body.temperature === "number" ? { temperature: body.temperature } : {}),
|
|
@@ -917,6 +1146,8 @@ function openAiResponse(modelId, response) {
|
|
|
917
1146
|
message: {
|
|
918
1147
|
role: "assistant",
|
|
919
1148
|
content: response.content,
|
|
1149
|
+
// #3878: the field OpenCode's OpenAI-compatible provider reads as a reasoning part.
|
|
1150
|
+
...(response.reasoning === undefined ? {} : { reasoning_content: response.reasoning }),
|
|
920
1151
|
...(response.toolCalls.length === 0
|
|
921
1152
|
? {}
|
|
922
1153
|
: { tool_calls: openAiToolCalls(response.toolCalls) }),
|
|
@@ -995,14 +1226,45 @@ function gatewayOutcomeCancellationCause(cancellation, outcome) {
|
|
|
995
1226
|
return undefined;
|
|
996
1227
|
return { cancellationCause: cancellation.cause() ?? "client-disconnect" };
|
|
997
1228
|
}
|
|
998
|
-
|
|
1229
|
+
const NO_GATEWAY_OUTPUT = {
|
|
1230
|
+
completionTokens: 0,
|
|
1231
|
+
outputBytes: 0,
|
|
1232
|
+
reasoningFrames: 0,
|
|
1233
|
+
forwardedReasoningBytes: 0,
|
|
1234
|
+
};
|
|
1235
|
+
const REPAIR_NOT_SETTLED = { settled: false };
|
|
1236
|
+
function settledRepair(outcome) {
|
|
1237
|
+
return { settled: true, outcome };
|
|
1238
|
+
}
|
|
1239
|
+
// The gateway's one steered repair of an exhausted or empty answer (#3873, F17, F23), read off what
|
|
1240
|
+
// the call settled with: `recovered` rides on the response (`NormalizedResponse.outputRepair`), the
|
|
1241
|
+
// failures on the error the repaired attempt surfaced. Absent when no repair ran.
|
|
1242
|
+
function outputRepairOf(error) {
|
|
1243
|
+
return error instanceof GatewayError ? error.outputRepair : undefined;
|
|
1244
|
+
}
|
|
1245
|
+
function repairEvidence(evidence) {
|
|
1246
|
+
if (!evidence.settled)
|
|
1247
|
+
return {};
|
|
1248
|
+
const { outcome } = evidence;
|
|
1249
|
+
return {
|
|
1250
|
+
repairAttempted: outcome !== undefined,
|
|
1251
|
+
...(outcome === undefined ? {} : { repairOutcome: outcome }),
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
function recordGatewayOutcome(ctx, deps, runId, cancellation, outcome, metrics, repair) {
|
|
1255
|
+
const { completionTokens, outputBytes } = metrics;
|
|
999
1256
|
getServerLogger().info(activityLogEvent(CODING_SIDECAR_GATEWAY_OUTCOME_OPERATION, { correlationId: correlationIdOrUnknown(ctx.correlationId), parentCorrelationId: runId }, {
|
|
1000
1257
|
runId,
|
|
1001
1258
|
outcome,
|
|
1002
1259
|
completionTokens,
|
|
1003
1260
|
outputBytes,
|
|
1261
|
+
reasoningFrames: metrics.reasoningFrames,
|
|
1262
|
+
forwardedReasoningBytes: metrics.forwardedReasoningBytes,
|
|
1263
|
+
...(metrics.limit === undefined ? {} : { limit: metrics.limit }),
|
|
1264
|
+
...(metrics.reasoningWithheld === undefined ? {} : { reasoningWithheld: true }),
|
|
1004
1265
|
deadlineMs: cancellation.deadlineMs,
|
|
1005
1266
|
...gatewayOutcomeCancellationCause(cancellation, outcome),
|
|
1267
|
+
...repairEvidence(repair),
|
|
1006
1268
|
completeness: "complete",
|
|
1007
1269
|
loss: "none",
|
|
1008
1270
|
}));
|
|
@@ -1136,7 +1398,10 @@ function gatewayDiagnosticCorrelation(ctx, runId) {
|
|
|
1136
1398
|
// ran out, or a tool call that never parsed or matched its schema -- is the model's answer, not a
|
|
1137
1399
|
// server fault: the warn-level turn-failed line names it. An error-level diagnostic opened a support
|
|
1138
1400
|
// incident for every such turn; a lab run of the 1.1.8 candidate behind a LiteLLM hosted_vllm route
|
|
1139
|
-
// opened one on its first empty answer.
|
|
1401
|
+
// opened one on its first empty answer. The runtime may retry these, with one exception: an
|
|
1402
|
+
// exhausted or empty answer whose steered gateway repair failed the same way again is answered as
|
|
1403
|
+
// final (`runtimeRetryFor`, #3873 F17, F23) — the identical turn ran away identically, and a third
|
|
1404
|
+
// attempt would only burn the envelope's duration.
|
|
1140
1405
|
const MODEL_ANSWER_FAILURES = new Set([
|
|
1141
1406
|
"output-exhausted",
|
|
1142
1407
|
"empty-answer",
|
|
@@ -1170,9 +1435,10 @@ function reportGatewayTurnFailure(ctx, deps, runId, failure) {
|
|
|
1170
1435
|
const snapshot = deps.codingRuntimeOrchestrator?.getSnapshot(runId);
|
|
1171
1436
|
if (snapshot?.state !== "running" && snapshot?.state !== "paused")
|
|
1172
1437
|
return false;
|
|
1173
|
-
const
|
|
1438
|
+
const providerUnavailable = failureCode === "provider-failed" && providerUnavailableFault(error);
|
|
1439
|
+
const publicationReason = gatewayTurnFailurePublication(deps, runId, snapshot, failureCode, providerUnavailable);
|
|
1174
1440
|
const run = { revision: snapshot.revision, state: snapshot.state };
|
|
1175
|
-
logGatewayTurnFailure(ctx, runId, run, failureCode, { publicationReason, runtimeRetry }, error);
|
|
1441
|
+
logGatewayTurnFailure(ctx, runId, run, failureCode, { publicationReason, runtimeRetry, providerUnavailable }, error);
|
|
1176
1442
|
return true;
|
|
1177
1443
|
}
|
|
1178
1444
|
/** A turn the gateway refused itself, with no error: its answer's status decides the retry. */
|
|
@@ -1182,12 +1448,117 @@ function reportGatewayTurnRejection(ctx, deps, runId, answer) {
|
|
|
1182
1448
|
runtimeRetry: runtimeRetryForStatus(answer.status),
|
|
1183
1449
|
});
|
|
1184
1450
|
}
|
|
1185
|
-
function gatewayTurnFailurePublication(deps, runId, snapshot, failureCode) {
|
|
1186
|
-
const publication = deps.codingRuntimeEventHub?.publishTurnFailure(runId, snapshot.state, snapshot.revision, failureCode);
|
|
1451
|
+
function gatewayTurnFailurePublication(deps, runId, snapshot, failureCode, providerUnavailable) {
|
|
1452
|
+
const publication = deps.codingRuntimeEventHub?.publishTurnFailure(runId, snapshot.state, snapshot.revision, failureCode, { providerUnavailable });
|
|
1187
1453
|
const publicationReason = publication?.ok === true ? "published" : (publication?.reason ?? "event-hub-unavailable");
|
|
1188
1454
|
return publicationReason;
|
|
1189
1455
|
}
|
|
1190
|
-
function
|
|
1456
|
+
function gatewayRetryTrace(ctx, deps, runId) {
|
|
1457
|
+
// True from the moment this call's `retrying` fact reached the replay until its answer or its end
|
|
1458
|
+
// closes it. A failed call stays open: its turn-failure frame, or `end`, decides what closes it.
|
|
1459
|
+
let open = false;
|
|
1460
|
+
const retryingShown = () => deps.codingRuntimeEventHub?.modelGatewayRetrying(runId) === true;
|
|
1461
|
+
const hear = (notice) => {
|
|
1462
|
+
if (notice.kind === "settled") {
|
|
1463
|
+
if (open && notice.outcome === "answered") {
|
|
1464
|
+
open = false;
|
|
1465
|
+
surfaceGatewayRetry(ctx, deps, runId, "recovered");
|
|
1466
|
+
}
|
|
1467
|
+
return;
|
|
1468
|
+
}
|
|
1469
|
+
if (open && retryingShown())
|
|
1470
|
+
return;
|
|
1471
|
+
if (surfaceGatewayRetry(ctx, deps, runId, "retrying", notice))
|
|
1472
|
+
open = true;
|
|
1473
|
+
};
|
|
1474
|
+
const finish = () => {
|
|
1475
|
+
if (!open)
|
|
1476
|
+
return;
|
|
1477
|
+
open = false;
|
|
1478
|
+
if (retryingShown())
|
|
1479
|
+
surfaceGatewayRetry(ctx, deps, runId, "retry-stopped");
|
|
1480
|
+
};
|
|
1481
|
+
return {
|
|
1482
|
+
observer: (notice) => {
|
|
1483
|
+
runRetryTraceStep(ctx, deps, runId, () => {
|
|
1484
|
+
hear(notice);
|
|
1485
|
+
});
|
|
1486
|
+
},
|
|
1487
|
+
end: () => {
|
|
1488
|
+
runRetryTraceStep(ctx, deps, runId, finish);
|
|
1489
|
+
},
|
|
1490
|
+
};
|
|
1491
|
+
}
|
|
1492
|
+
// Runs one step of the trace; a failure of the step goes to the operator diagnostic and nowhere else.
|
|
1493
|
+
function runRetryTraceStep(ctx, deps, runId, step) {
|
|
1494
|
+
try {
|
|
1495
|
+
step();
|
|
1496
|
+
}
|
|
1497
|
+
catch (error) {
|
|
1498
|
+
emitServerDiagnostic(deps.diagnostics, serverDiagnosticFromError({
|
|
1499
|
+
...gatewayDiagnosticCorrelation(ctx, runId),
|
|
1500
|
+
operation: CODING_SIDECAR_GATEWAY_ROUTE,
|
|
1501
|
+
source: "coding-sidecar-gateway.retry-observer",
|
|
1502
|
+
error,
|
|
1503
|
+
redact: (message) => String(deps.redactor(message)),
|
|
1504
|
+
}));
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
// The event kind each fact is published as.
|
|
1508
|
+
const GATEWAY_FACT_EVENT_KINDS = {
|
|
1509
|
+
retrying: "model-gateway-retrying",
|
|
1510
|
+
recovered: "model-gateway-recovered",
|
|
1511
|
+
"retry-stopped": "model-gateway-retry-stopped",
|
|
1512
|
+
};
|
|
1513
|
+
// The run's state while it can still show a status: running or paused. Any other run (stopping,
|
|
1514
|
+
// settled, unknown) has none, and the gateway's own retry line is its record.
|
|
1515
|
+
function liveRunSnapshot(deps, runId) {
|
|
1516
|
+
const snapshot = deps.codingRuntimeOrchestrator?.getSnapshot(runId);
|
|
1517
|
+
if (snapshot?.state !== "running" && snapshot?.state !== "paused")
|
|
1518
|
+
return undefined;
|
|
1519
|
+
return { state: snapshot.state, revision: snapshot.revision };
|
|
1520
|
+
}
|
|
1521
|
+
function publishGatewayRetryFact(deps, runId, run, fact) {
|
|
1522
|
+
const publication = deps.codingRuntimeEventHub?.publishModelGatewayFact(runId, run.state, run.revision, GATEWAY_FACT_EVENT_KINDS[fact]);
|
|
1523
|
+
return publication?.ok === true ? "published" : (publication?.reason ?? "event-hub-unavailable");
|
|
1524
|
+
}
|
|
1525
|
+
// The body-free fields the fact's line records for its cause: the failed attempt of a retry, or the
|
|
1526
|
+
// reason an admission was held, and the policy the call ran under either way.
|
|
1527
|
+
function gatewayRetryCauseFields(cause) {
|
|
1528
|
+
return cause.kind === "scheduled"
|
|
1529
|
+
? { attempt: cause.attempt, retryPolicy: cause.retryPolicy }
|
|
1530
|
+
: { waitReason: cause.reason, retryPolicy: cause.retryPolicy };
|
|
1531
|
+
}
|
|
1532
|
+
// Publishes the fact to the run's event replay and records the publication. True when the replay
|
|
1533
|
+
// took the frame; a run that has no status to show (not live) and a refused publication are both
|
|
1534
|
+
// false, so the caller never counts a fact the Workbench cannot see as shown.
|
|
1535
|
+
function surfaceGatewayRetry(ctx, deps, runId, fact, cause) {
|
|
1536
|
+
const run = liveRunSnapshot(deps, runId);
|
|
1537
|
+
if (run === undefined)
|
|
1538
|
+
return false;
|
|
1539
|
+
const publicationReason = publishGatewayRetryFact(deps, runId, run, fact);
|
|
1540
|
+
const published = publicationReason === "published";
|
|
1541
|
+
const event = activityLogEvent(CODING_SIDECAR_GATEWAY_RETRY_SURFACED_OPERATION, {
|
|
1542
|
+
...gatewayDiagnosticCorrelation(ctx, runId),
|
|
1543
|
+
...(published ? {} : { errorKind: "unavailable" }),
|
|
1544
|
+
}, {
|
|
1545
|
+
runId,
|
|
1546
|
+
revision: run.revision,
|
|
1547
|
+
state: run.state,
|
|
1548
|
+
fact,
|
|
1549
|
+
...(cause === undefined ? {} : gatewayRetryCauseFields(cause)),
|
|
1550
|
+
published,
|
|
1551
|
+
publicationReason,
|
|
1552
|
+
completeness: "complete",
|
|
1553
|
+
loss: "none",
|
|
1554
|
+
});
|
|
1555
|
+
if (published)
|
|
1556
|
+
getServerLogger().info(event);
|
|
1557
|
+
else
|
|
1558
|
+
getServerLogger().warn(event);
|
|
1559
|
+
return published;
|
|
1560
|
+
}
|
|
1561
|
+
function logGatewayTurnFailure(ctx, runId, { revision, state }, failureCode, { publicationReason, runtimeRetry, providerUnavailable, }, error) {
|
|
1191
1562
|
const { frames, causeChain } = describeError(error);
|
|
1192
1563
|
getServerLogger().warn(activityLogEvent(CODING_SIDECAR_GATEWAY_TURN_FAILED_OPERATION, {
|
|
1193
1564
|
...gatewayDiagnosticCorrelation(ctx, runId),
|
|
@@ -1200,6 +1571,11 @@ function logGatewayTurnFailure(ctx, runId, { revision, state }, failureCode, { p
|
|
|
1200
1571
|
published: publicationReason === "published",
|
|
1201
1572
|
publicationReason,
|
|
1202
1573
|
runtimeRetry,
|
|
1574
|
+
// Present only when the provider could not serve the call (a retryable status, a rate limit,
|
|
1575
|
+
// an open breaker): the fact a run that ends on this failure settles `provider-unavailable`.
|
|
1576
|
+
...(providerUnavailable ? { providerUnavailable } : {}),
|
|
1577
|
+
// The turn failed with a settled gateway error, which says whether a repair ran.
|
|
1578
|
+
...repairEvidence(settledRepair(outputRepairOf(error))),
|
|
1203
1579
|
...(error === undefined || frames === undefined ? {} : { frames }),
|
|
1204
1580
|
...(error === undefined || causeChain === undefined ? {} : { causeChain }),
|
|
1205
1581
|
completeness: "complete",
|
|
@@ -1214,6 +1590,7 @@ function modelTurnFailureCode(error) {
|
|
|
1214
1590
|
// its error-level diagnostic (PR #3617 review). It extends MalformedToolCallError, so it is named
|
|
1215
1591
|
// before that check.
|
|
1216
1592
|
if (error instanceof ContextOverflowError ||
|
|
1593
|
+
error instanceof CallerAttemptAdmissionError ||
|
|
1217
1594
|
error instanceof ModelRefusalError ||
|
|
1218
1595
|
error instanceof ResponseRedactionError)
|
|
1219
1596
|
return "turn-rejected";
|
|
@@ -1225,28 +1602,46 @@ function modelTurnFailureCode(error) {
|
|
|
1225
1602
|
return "invalid-tool-call";
|
|
1226
1603
|
return undefined;
|
|
1227
1604
|
}
|
|
1605
|
+
// A gateway error that says the call stopped answering rather than that it was refused: a timeout, a
|
|
1606
|
+
// refused or dropped connection, a stream that ended without its terminal answer (HTTP 200).
|
|
1607
|
+
function isStreamInterruption(error) {
|
|
1608
|
+
return (error instanceof TimeoutError ||
|
|
1609
|
+
error instanceof TransportError ||
|
|
1610
|
+
(error instanceof ProviderError && error.httpStatus === 200));
|
|
1611
|
+
}
|
|
1228
1612
|
function gatewayTurnFailureCode(error) {
|
|
1229
1613
|
const modelCause = modelTurnFailureCode(error);
|
|
1230
1614
|
if (modelCause !== undefined)
|
|
1231
1615
|
return modelCause;
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1616
|
+
return isStreamInterruption(error) ? "stream-incomplete" : "provider-failed";
|
|
1617
|
+
}
|
|
1618
|
+
// The streamed path names `stream-incomplete` only for a call that stopped answering: an
|
|
1619
|
+
// interruption, or a failure that is no gateway error at all (a decoder or socket fault inside the
|
|
1620
|
+
// stream). Every other gateway error — a refused credential, a configuration or egress refusal, an
|
|
1621
|
+
// unknown model, a provider status — is named `provider-failed`, as the buffered path always named
|
|
1622
|
+
// it. Before (#3873 review, PR #3876) the default bucket was `stream-incomplete`, so a configuration
|
|
1623
|
+
// or egress error that reached the stream settled the whole run `provider-unavailable`: "nothing was
|
|
1624
|
+
// rejected, check that the gateway is running".
|
|
1238
1625
|
function gatewayStreamFailureCode(error) {
|
|
1239
1626
|
if (gatewaySpendRejectionReason(error) !== undefined)
|
|
1240
1627
|
return "turn-rejected";
|
|
1241
1628
|
const modelCause = modelTurnFailureCode(error);
|
|
1242
1629
|
if (modelCause !== undefined)
|
|
1243
1630
|
return modelCause;
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1631
|
+
return error instanceof GatewayError && !isStreamInterruption(error)
|
|
1632
|
+
? "provider-failed"
|
|
1633
|
+
: "stream-incomplete";
|
|
1634
|
+
}
|
|
1635
|
+
// Whether the provider could not serve the call, as opposed to rejecting it: a retryable provider
|
|
1636
|
+
// status (408, 429, 5xx), a rate limit or an open breaker. `provider-failed` names both alike, and
|
|
1637
|
+
// the gateway has by now retried through its outage window, so such a failure means the provider
|
|
1638
|
+
// stayed unavailable (#3873 review, F10). Positively identified from the error, never inferred from
|
|
1639
|
+
// the turn-failure bucket; an output-exhausted or empty answer is an HTTP 200 and never one.
|
|
1640
|
+
function providerUnavailableFault(error) {
|
|
1641
|
+
if (error instanceof RateLimitError || error instanceof CircuitOpenError)
|
|
1642
|
+
return true;
|
|
1643
|
+
return (error instanceof ProviderError &&
|
|
1644
|
+
(error.httpStatus === 408 || error.httpStatus === 429 || error.httpStatus >= 500));
|
|
1250
1645
|
}
|
|
1251
1646
|
// A rejection no retry can change — a provider 4xx other than 408/409/429, a refused credential, an
|
|
1252
1647
|
// invalid configuration, an exhausted spend budget — which the gateway's own retry policy already
|
|
@@ -1256,13 +1651,36 @@ function gatewayStreamFailureCode(error) {
|
|
|
1256
1651
|
function runtimeRetryFor(error, failureCode) {
|
|
1257
1652
|
if (gatewaySpendRejectionReason(error) !== undefined)
|
|
1258
1653
|
return "refused";
|
|
1259
|
-
|
|
1654
|
+
if (repairFailedAgain(error, failureCode))
|
|
1655
|
+
return "refused";
|
|
1656
|
+
// The gateway already owns bounded schema/transport correction. Repeating the identical
|
|
1657
|
+
// malformed turn in OpenCode adds no correction and can loop without an attempt limit.
|
|
1658
|
+
if (failureCode === "invalid-tool-call")
|
|
1659
|
+
return "refused";
|
|
1660
|
+
return isFinalProviderRejection(error, failureCode) ? "refused" : "allowed";
|
|
1661
|
+
}
|
|
1662
|
+
// How the repaired attempt of each model-answer failure ends when the model fails that way again.
|
|
1663
|
+
const REPAIRED_ANSWER_FAILED_AGAIN = new Map([
|
|
1664
|
+
["output-exhausted", "exhausted-again"],
|
|
1665
|
+
["empty-answer", "empty-again"],
|
|
1666
|
+
]);
|
|
1667
|
+
// #3873 (F17, F23): the gateway already steered the one repair an exhausted or empty answer gets,
|
|
1668
|
+
// and the model failed the same way again. A runtime retry of the identical turn would run away
|
|
1669
|
+
// identically (run 324076066246415201273338647160811469441: three seven-minute attempts, no
|
|
1670
|
+
// progress; run 74202984158312182524609898190850427735: seven attempts that each ended empty after
|
|
1671
|
+
// reasoning), so the turn is final. A first failure the call's budget could not repair, and a
|
|
1672
|
+
// repair that failed for another reason, stay retryable.
|
|
1673
|
+
function repairFailedAgain(error, failureCode) {
|
|
1674
|
+
const again = REPAIRED_ANSWER_FAILED_AGAIN.get(failureCode);
|
|
1675
|
+
return again !== undefined && outputRepairOf(error) === again;
|
|
1676
|
+
}
|
|
1677
|
+
function isFinalProviderRejection(error, failureCode) {
|
|
1678
|
+
return (failureCode === "provider-failed" &&
|
|
1260
1679
|
error instanceof GatewayError &&
|
|
1261
1680
|
!error.retryable &&
|
|
1262
1681
|
!(error instanceof CircuitOpenError) &&
|
|
1263
1682
|
!(error instanceof CancelledError) &&
|
|
1264
|
-
!(error instanceof ProviderError && runtimeRetriesStatus(error.httpStatus));
|
|
1265
|
-
return final ? "refused" : "allowed";
|
|
1683
|
+
!(error instanceof ProviderError && runtimeRetriesStatus(error.httpStatus)));
|
|
1266
1684
|
}
|
|
1267
1685
|
// The provider statuses OpenCode 2.0.10 retries on its own (408, 409, 429, 5xx): a rejection with one
|
|
1268
1686
|
// of them is no verdict on the turn, whatever Keiko's own retry policy did with it (PR #3625 review:
|
|
@@ -1343,6 +1761,15 @@ function promptReservationRunId(value) {
|
|
|
1343
1761
|
return undefined;
|
|
1344
1762
|
return typeof value.runId === "string" && value.runId.length > 0 ? value.runId : undefined;
|
|
1345
1763
|
}
|
|
1764
|
+
// The identity an admitted reservation answers beside its run, when it answers one: a safe integer
|
|
1765
|
+
// the settlement hands back verbatim. Anything else is no identity, and the call is then untracked.
|
|
1766
|
+
function promptReservationModelCallId(value) {
|
|
1767
|
+
if (!isRecord(value) || value.ok !== true)
|
|
1768
|
+
return undefined;
|
|
1769
|
+
return typeof value.modelCallId === "number" && Number.isSafeInteger(value.modelCallId)
|
|
1770
|
+
? value.modelCallId
|
|
1771
|
+
: undefined;
|
|
1772
|
+
}
|
|
1346
1773
|
function gatewayReadinessRegistry(deps) {
|
|
1347
1774
|
return deps.openCodeGatewayReadinessRegistry;
|
|
1348
1775
|
}
|
|
@@ -1356,11 +1783,12 @@ function bearerCapability(ctx) {
|
|
|
1356
1783
|
const capability = value.slice("Bearer ".length);
|
|
1357
1784
|
return capability.length > 0 ? capability : undefined;
|
|
1358
1785
|
}
|
|
1359
|
-
function isExactManagedToolSet(tools) {
|
|
1360
|
-
return hasExactOpenCodeVisibleToolContract(tools);
|
|
1786
|
+
function isExactManagedToolSet(tools, profile = "direct") {
|
|
1787
|
+
return hasExactOpenCodeVisibleToolContract(tools, profile);
|
|
1361
1788
|
}
|
|
1362
1789
|
function isAdmittedManagedToolSet(tools, registry, runId) {
|
|
1363
|
-
return (isExactManagedToolSet(tools
|
|
1790
|
+
return (isExactManagedToolSet(tools, registry?.toolProfile ?? "direct") ||
|
|
1791
|
+
(tools === undefined && registry?.isVerified(runId) === true));
|
|
1364
1792
|
}
|
|
1365
1793
|
function isRuntimeReadinessProbe(parsed) {
|
|
1366
1794
|
const readiness = parsed.messages.at(-1);
|
|
@@ -1388,8 +1816,8 @@ function toolNameSetDigest(names) {
|
|
|
1388
1816
|
hash.update(`${String(name.length)}:${name}`);
|
|
1389
1817
|
return hash.digest("hex");
|
|
1390
1818
|
}
|
|
1391
|
-
function toolContractMismatch(tools) {
|
|
1392
|
-
const expected = new Set(
|
|
1819
|
+
function toolContractMismatch(tools, profile) {
|
|
1820
|
+
const expected = new Set(openCodeVisibleToolNames(profile));
|
|
1393
1821
|
const received = new Set(tools?.map((tool) => tool.name) ?? []);
|
|
1394
1822
|
const unexpected = [...received].filter((name) => !expected.has(name));
|
|
1395
1823
|
const missing = [...expected].filter((name) => !received.has(name));
|
|
@@ -1415,7 +1843,7 @@ function refuseGatewayToolContract(ctx, deps, runId, parsed) {
|
|
|
1415
1843
|
code,
|
|
1416
1844
|
});
|
|
1417
1845
|
const answer = forbiddenGatewayRequest();
|
|
1418
|
-
logGatewayRejection(ctx, runId, answer.status, reason, toolContractMismatch(tools));
|
|
1846
|
+
logGatewayRejection(ctx, runId, answer.status, reason, toolContractMismatch(tools, gatewayReadinessRegistry(deps)?.toolProfile ?? "direct"));
|
|
1419
1847
|
refuseReadinessChallenge(deps, runId, parsed);
|
|
1420
1848
|
reportGatewayTurnRejection(ctx, deps, runId, answer);
|
|
1421
1849
|
return answer;
|
|
@@ -1527,9 +1955,15 @@ function isRuntimeTransportProfileId(modelProfileId) {
|
|
|
1527
1955
|
}
|
|
1528
1956
|
function reserveGatewayPromptBudget(deps, capability, runId, reservedPromptTokens) {
|
|
1529
1957
|
const reserved = runtimeCapabilityAuthenticator(deps)?.reservePromptTokens?.(capability, reservedPromptTokens);
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1958
|
+
if (promptReservationRunId(reserved) !== runId)
|
|
1959
|
+
return undefined;
|
|
1960
|
+
const modelCallId = promptReservationModelCallId(reserved);
|
|
1961
|
+
return {
|
|
1962
|
+
capability,
|
|
1963
|
+
reservedPromptTokens,
|
|
1964
|
+
...(modelCallId === undefined ? {} : { modelCallId }),
|
|
1965
|
+
settled: false,
|
|
1966
|
+
};
|
|
1533
1967
|
}
|
|
1534
1968
|
function isAvailableGatewayProfile(resolved) {
|
|
1535
1969
|
return (resolved.result.status === "available" &&
|
|
@@ -1612,8 +2046,9 @@ function gatewayCancellationCause(signal, sources) {
|
|
|
1612
2046
|
// run (coding run 23, 2026-09-11).
|
|
1613
2047
|
export function codingSidecarGatewayRequestDeadlineMs(config, modelId) {
|
|
1614
2048
|
// The sidecar reaches the gateway both ways — a buffered `chat()` answer or a `chatStream()`
|
|
1615
|
-
// read — so its backstop sits behind the longer of the two budgets
|
|
1616
|
-
|
|
2049
|
+
// read — so its backstop sits behind the longer of the two budgets, each extended by the outage
|
|
2050
|
+
// window these calls ride out (#3873 review): the route must not cut the configured window short.
|
|
2051
|
+
return gatewayRouteDeadlineMs(config, modelId, ["buffered", "streamed"], CODING_TURN_GATEWAY_POLICY.outagePolicy);
|
|
1617
2052
|
}
|
|
1618
2053
|
function gatewayRequestCancellation(ctx, deps, config, modelId, runId) {
|
|
1619
2054
|
const client = new AbortController();
|
|
@@ -1640,8 +2075,15 @@ function gatewayRequestCancellation(ctx, deps, config, modelId, runId) {
|
|
|
1640
2075
|
},
|
|
1641
2076
|
};
|
|
1642
2077
|
}
|
|
1643
|
-
function requestForGatewayDelivery(ctx, parsed, delivery, signal) {
|
|
1644
|
-
return
|
|
2078
|
+
function requestForGatewayDelivery(ctx, parsed, delivery, signal, retryObserver) {
|
|
2079
|
+
return {
|
|
2080
|
+
...buildChatRequest(parsed, delivery.modelAlias, signal, delivery.maxOutputTokens, ctx.correlationId, delivery.reasoningEffort, {
|
|
2081
|
+
coverage: delivery.toolCatalogCoverage,
|
|
2082
|
+
offerLifetimeMs: delivery.offerLifetimeMs,
|
|
2083
|
+
toolProfile: delivery.toolProfile,
|
|
2084
|
+
}),
|
|
2085
|
+
retryObserver,
|
|
2086
|
+
};
|
|
1645
2087
|
}
|
|
1646
2088
|
async function executeGatewayChat(ctx, deps, binding, parsed, runId, delivery) {
|
|
1647
2089
|
const cancellation = gatewayRequestCancellation(ctx, deps, binding.config, delivery.modelAlias, runId);
|
|
@@ -1655,7 +2097,8 @@ async function executeGatewayChat(ctx, deps, binding, parsed, runId, delivery) {
|
|
|
1655
2097
|
// Extracted so `executeGatewayChat` stays under AGENTS.md §6's 50-line ceiling.
|
|
1656
2098
|
async function dispatchGatewayChat(ctx, deps, binding, parsed, runId, delivery, cancellation) {
|
|
1657
2099
|
const { modelAlias, upstreamStreamingSupported } = delivery;
|
|
1658
|
-
const
|
|
2100
|
+
const retries = gatewayRetryTrace(ctx, deps, runId);
|
|
2101
|
+
const request = requestForGatewayDelivery(ctx, parsed, delivery, cancellation.signal, retries.observer);
|
|
1659
2102
|
const dispatch = {
|
|
1660
2103
|
deps,
|
|
1661
2104
|
binding,
|
|
@@ -1680,13 +2123,19 @@ async function dispatchGatewayChat(ctx, deps, binding, parsed, runId, delivery,
|
|
|
1680
2123
|
catch (error) {
|
|
1681
2124
|
return settleFailedGatewayChat(ctx, deps, runId, cancellation, error, delivery, bufferedStream);
|
|
1682
2125
|
}
|
|
2126
|
+
finally {
|
|
2127
|
+
// After the answer, or the failure frame, has been settled: what is still the newest frame is
|
|
2128
|
+
// a retrying fact nothing closed.
|
|
2129
|
+
retries.end();
|
|
2130
|
+
}
|
|
1683
2131
|
}
|
|
1684
2132
|
// The opening frame never reached the client — the shared path killed the stream, or the response
|
|
1685
2133
|
// was already gone — so no provider call is started for an answer nobody can receive, exactly as
|
|
1686
2134
|
// `beginGatewayStream` ends the streamed path (#3602 review). The outcome names the abort source.
|
|
1687
2135
|
function settleUndeliverableBufferedStream(ctx, dispatch) {
|
|
1688
2136
|
const { deps, runId, cancellation, promptTokenReservation } = dispatch;
|
|
1689
|
-
|
|
2137
|
+
// No provider call was started, so no repair can have run.
|
|
2138
|
+
recordGatewayOutcome(ctx, deps, runId, cancellation, "cancelled", NO_GATEWAY_OUTPUT, settledRepair(undefined));
|
|
1690
2139
|
releaseUndispatchedPromptBudget(ctx, deps, runId, promptTokenReservation);
|
|
1691
2140
|
return STREAMING;
|
|
1692
2141
|
}
|
|
@@ -1695,12 +2144,12 @@ function settleUndeliverableBufferedStream(ctx, dispatch) {
|
|
|
1695
2144
|
// `released-unspent`) so the ledger movement is reconstructible from the log.
|
|
1696
2145
|
function releaseUndispatchedPromptBudget(ctx, deps, runId, reservation) {
|
|
1697
2146
|
const settlement = releasePromptTokenReservation(deps, reservation);
|
|
1698
|
-
logGatewayCompletionUsage(ctx, runId, { completionTokens: 0, outputBytes: 0 }, "output-byte-estimate", settlement);
|
|
2147
|
+
logGatewayCompletionUsage(ctx, runId, { completionTokens: 0, outputBytes: 0, contentBytes: 0, reasoningBytes: 0 }, "output-byte-estimate", settlement);
|
|
1699
2148
|
}
|
|
1700
2149
|
// Extracted so `executeGatewayChat` stays under AGENTS.md §6's 50-line ceiling.
|
|
1701
2150
|
function settleFailedGatewayChat(ctx, deps, runId, cancellation, error, delivery, bufferedStream) {
|
|
1702
2151
|
const cancelled = cancellation.signal.aborted;
|
|
1703
|
-
recordGatewayOutcome(ctx, deps, runId, cancellation, cancelled ? "cancelled" : "failed",
|
|
2152
|
+
recordGatewayOutcome(ctx, deps, runId, cancellation, cancelled ? "cancelled" : "failed", NO_GATEWAY_OUTPUT, settledRepair(outputRepairOf(error)));
|
|
1704
2153
|
const spendReason = gatewaySpendRejectionReason(error);
|
|
1705
2154
|
const failureCode = spendReason === undefined ? gatewayTurnFailureCode(error) : "turn-rejected";
|
|
1706
2155
|
const runtimeRetry = runtimeRetryFor(error, failureCode);
|
|
@@ -1721,7 +2170,7 @@ function settleFailedGatewayChat(ctx, deps, runId, cancellation, error, delivery
|
|
|
1721
2170
|
async function executeBufferedGatewayChat(ctx, dispatch, stream) {
|
|
1722
2171
|
const { deps, binding, modelAlias, request, runId, cancellation, promptTokenReservation } = dispatch;
|
|
1723
2172
|
const response = await chatFactoryFor(deps, binding.gateway)(binding.config, modelAlias)(request);
|
|
1724
|
-
const promptSettlement = settlePromptTokenReservation(deps, promptTokenReservation, response.usage.promptTokens);
|
|
2173
|
+
const promptSettlement = settlePromptTokenReservation(deps, promptTokenReservation, response.usage.promptTokens, discardedPromptTokens(response));
|
|
1725
2174
|
const output = outputMetrics(response);
|
|
1726
2175
|
const usage = completionUsage(response, output.outputBytes, 0);
|
|
1727
2176
|
const metrics = { ...output, completionTokens: usage.completionTokens };
|
|
@@ -1729,31 +2178,55 @@ async function executeBufferedGatewayChat(ctx, dispatch, stream) {
|
|
|
1729
2178
|
...response,
|
|
1730
2179
|
usage: { ...response.usage, completionTokens: usage.completionTokens },
|
|
1731
2180
|
};
|
|
1732
|
-
logGatewayCompletionUsage(ctx, runId, metrics, usage.source, promptSettlement);
|
|
1733
|
-
const record = (
|
|
1734
|
-
recordGatewayOutcome(ctx, deps, runId, cancellation, outcome, metrics.completionTokens, metrics.outputBytes);
|
|
1735
|
-
};
|
|
2181
|
+
logGatewayCompletionUsage(ctx, runId, { ...metrics, ...answerShares(response) }, usage.source, promptSettlement);
|
|
2182
|
+
const record = bufferedOutcomeRecorder(ctx, dispatch, metrics, response);
|
|
1736
2183
|
if (cancellation.signal.aborted) {
|
|
1737
2184
|
record("cancelled");
|
|
1738
2185
|
return stream === undefined
|
|
1739
2186
|
? unavailableError()
|
|
1740
2187
|
: settleBufferedOpenAiStreamError(stream, "error");
|
|
1741
2188
|
}
|
|
1742
|
-
|
|
1743
|
-
|
|
2189
|
+
const maxOutputTokens = request.maxOutputTokens ?? 1;
|
|
2190
|
+
if (exceedsOutputBudget(metrics, maxOutputTokens)) {
|
|
2191
|
+
record("output-limit", { limit: "answer" });
|
|
1744
2192
|
return stream === undefined
|
|
1745
2193
|
? unavailableError()
|
|
1746
2194
|
: settleBufferedOpenAiStreamError(stream, "length");
|
|
1747
2195
|
}
|
|
1748
|
-
return deliverBufferedGatewayAnswer(ctx, modelAlias, stream, settledResponse, record);
|
|
2196
|
+
return deliverBufferedGatewayAnswer(ctx, modelAlias, stream, withinReasoningBudget(settledResponse, maxOutputTokens), record);
|
|
2197
|
+
}
|
|
2198
|
+
// The outcome line of a buffered turn: the answer's counts, the reasoning it carried to the
|
|
2199
|
+
// runtime (#3878) or withheld, and — from the settled answer — the gateway's steered repair (#3873).
|
|
2200
|
+
function bufferedOutcomeRecorder(ctx, dispatch, metrics, response) {
|
|
2201
|
+
const { deps, runId, cancellation } = dispatch;
|
|
2202
|
+
return (outcome, delivery = {}) => {
|
|
2203
|
+
recordGatewayOutcome(ctx, deps, runId, cancellation, outcome, { reasoningFrames: 0, forwardedReasoningBytes: 0, ...metrics, ...delivery }, settledRepair(response.outputRepair));
|
|
2204
|
+
};
|
|
1749
2205
|
}
|
|
1750
|
-
|
|
2206
|
+
// A buffered answer is complete when it arrives: its own output bound decides whether it may be
|
|
2207
|
+
// delivered, never the size of the reasoning beside it (#3873 review). A reasoning over the byte
|
|
2208
|
+
// bound of one model attempt is withheld from the runtime — display-only text — and the answer is
|
|
2209
|
+
// delivered without it; the outcome line says so (`reasoningWithheld`).
|
|
2210
|
+
function withinReasoningBudget(response, maxOutputTokens) {
|
|
2211
|
+
if (!exceedsReasoningBudget(response, maxOutputTokens))
|
|
2212
|
+
return { response, withheld: false };
|
|
2213
|
+
const { reasoning: _withheld, ...withoutReasoning } = response;
|
|
2214
|
+
return { response: withoutReasoning, withheld: true };
|
|
2215
|
+
}
|
|
2216
|
+
function deliverBufferedGatewayAnswer(ctx, modelAlias, stream, answer, record) {
|
|
2217
|
+
const { response } = answer;
|
|
2218
|
+
const delivery = {
|
|
2219
|
+
reasoningFrames: response.reasoning === undefined ? 0 : 1,
|
|
2220
|
+
forwardedReasoningBytes: response.reasoning === undefined ? 0 : Buffer.byteLength(response.reasoning, "utf8"),
|
|
2221
|
+
...(answer.withheld ? { reasoningWithheld: true } : {}),
|
|
2222
|
+
};
|
|
1751
2223
|
if (stream === undefined) {
|
|
1752
|
-
record("accepted");
|
|
2224
|
+
record("accepted", delivery);
|
|
1753
2225
|
return openAiResponse(modelAlias, response);
|
|
1754
2226
|
}
|
|
1755
2227
|
completeBufferedOpenAiStream(stream, response);
|
|
1756
|
-
|
|
2228
|
+
const delivered = ctx.res.writableEnded && !ctx.res.destroyed;
|
|
2229
|
+
record(delivered ? "accepted" : "cancelled", delivered ? delivery : {});
|
|
1757
2230
|
return STREAMING;
|
|
1758
2231
|
}
|
|
1759
2232
|
// Closed stream state machine keeps iterator, cancellation, and SSE backpressure transitions together.
|
|
@@ -1764,7 +2237,7 @@ async function streamGatewayChat(ctx, dispatch) {
|
|
|
1764
2237
|
iterator = chatStreamFactoryFor(deps, binding.gateway)(binding.config, modelAlias)(request)[Symbol.asyncIterator]();
|
|
1765
2238
|
}
|
|
1766
2239
|
catch (error) {
|
|
1767
|
-
recordGatewayOutcome(ctx, deps, runId, dispatch.cancellation, "failed",
|
|
2240
|
+
recordGatewayOutcome(ctx, deps, runId, dispatch.cancellation, "failed", NO_GATEWAY_OUTPUT, settledRepair(outputRepairOf(error)));
|
|
1768
2241
|
const failureCode = gatewayTurnFailureCode(error);
|
|
1769
2242
|
const runtimeRetry = runtimeRetryFor(error, failureCode);
|
|
1770
2243
|
const turnFailureRecorded = reportGatewayTurnFailure(ctx, deps, runId, {
|
|
@@ -1802,6 +2275,10 @@ async function pumpGatewayStreamWithCancellation(deps, session) {
|
|
|
1802
2275
|
void iterator.return?.();
|
|
1803
2276
|
};
|
|
1804
2277
|
cancellationSignal.addEventListener("abort", cancelIterator, { once: true });
|
|
2278
|
+
// A live turn keeps the same keep-alive the buffered answer always had (lab ledger F2): a model
|
|
2279
|
+
// that thinks before its first token, or generates a tool call the sidecar forwards only once it
|
|
2280
|
+
// is whole, leaves the runtime's connection silent for as long as that takes.
|
|
2281
|
+
const stopHeartbeat = sidecarSseHeartbeat(session.ctx, cancellation.transport);
|
|
1805
2282
|
try {
|
|
1806
2283
|
await pumpGatewayStream(session);
|
|
1807
2284
|
}
|
|
@@ -1815,9 +2292,10 @@ async function pumpGatewayStreamWithCancellation(deps, session) {
|
|
|
1815
2292
|
error,
|
|
1816
2293
|
});
|
|
1817
2294
|
emitGatewayStreamFailureDiagnostic(session.ctx, deps, error, session.runId, turnFailureRecorded);
|
|
1818
|
-
settleGatewayStreamError(session, runtimeRetry);
|
|
2295
|
+
settleGatewayStreamError(session, runtimeRetry, outputRepairOf(error));
|
|
1819
2296
|
}
|
|
1820
2297
|
finally {
|
|
2298
|
+
stopHeartbeat();
|
|
1821
2299
|
cancellationSignal.removeEventListener("abort", cancelIterator);
|
|
1822
2300
|
}
|
|
1823
2301
|
}
|
|
@@ -1839,6 +2317,9 @@ function createGatewayStreamSession(ctx, dispatch, iterator) {
|
|
|
1839
2317
|
promptTokens: 0,
|
|
1840
2318
|
outputBytes: 0,
|
|
1841
2319
|
previousDeltaEndedWithHighSurrogate: false,
|
|
2320
|
+
reasoningFrames: 0,
|
|
2321
|
+
forwardedReasoningBytes: 0,
|
|
2322
|
+
previousReasoningEndedWithHighSurrogate: false,
|
|
1842
2323
|
},
|
|
1843
2324
|
};
|
|
1844
2325
|
}
|
|
@@ -1853,14 +2334,21 @@ function beginGatewayStream(session) {
|
|
|
1853
2334
|
const opened = writeOpenAiSse(ctx, openAiStreamChunk(id, created, modelId, { role: "assistant" }, null), session.cancellation.transport);
|
|
1854
2335
|
if (!opened) {
|
|
1855
2336
|
ctx.res.destroy();
|
|
1856
|
-
|
|
2337
|
+
// The gateway's generator was never pulled: no provider call, so no repair can have run.
|
|
2338
|
+
recordSessionOutcome(session, "cancelled", settledRepair(undefined));
|
|
1857
2339
|
return false;
|
|
1858
2340
|
}
|
|
1859
2341
|
return true;
|
|
1860
2342
|
}
|
|
1861
|
-
function recordSessionOutcome(session, outcome) {
|
|
2343
|
+
function recordSessionOutcome(session, outcome, repair, limit) {
|
|
1862
2344
|
const { ctx, deps, runId, cancellation, metrics } = session;
|
|
1863
|
-
recordGatewayOutcome(ctx, deps, runId, cancellation, outcome,
|
|
2345
|
+
recordGatewayOutcome(ctx, deps, runId, cancellation, outcome, {
|
|
2346
|
+
completionTokens: metrics.completionTokens,
|
|
2347
|
+
outputBytes: metrics.outputBytes,
|
|
2348
|
+
reasoningFrames: metrics.reasoningFrames,
|
|
2349
|
+
forwardedReasoningBytes: metrics.forwardedReasoningBytes,
|
|
2350
|
+
...(limit === undefined ? {} : { limit }),
|
|
2351
|
+
}, repair);
|
|
1864
2352
|
}
|
|
1865
2353
|
function writeSessionTerminal(session, finishReason) {
|
|
1866
2354
|
const { ctx, id, created, modelId, metrics, cancellation } = session;
|
|
@@ -1872,19 +2360,19 @@ async function pumpGatewayStream(session) {
|
|
|
1872
2360
|
for (;;) {
|
|
1873
2361
|
if (isGatewayRequestCancelled(cancellationSignal)) {
|
|
1874
2362
|
await iterator.return?.();
|
|
1875
|
-
recordSessionOutcome(session, "cancelled");
|
|
2363
|
+
recordSessionOutcome(session, "cancelled", REPAIR_NOT_SETTLED);
|
|
1876
2364
|
return;
|
|
1877
2365
|
}
|
|
1878
2366
|
const next = await iterator.next();
|
|
1879
2367
|
if (cancellationSignal.aborted) {
|
|
1880
|
-
recordSessionOutcome(session, "cancelled");
|
|
2368
|
+
recordSessionOutcome(session, "cancelled", REPAIR_NOT_SETTLED);
|
|
1881
2369
|
return;
|
|
1882
2370
|
}
|
|
1883
2371
|
if (next.done)
|
|
1884
2372
|
break;
|
|
1885
2373
|
const chunk = next.value;
|
|
1886
|
-
if (chunk.type
|
|
1887
|
-
if (await
|
|
2374
|
+
if (chunk.type !== "done") {
|
|
2375
|
+
if (await streamGatewayText(session, chunk))
|
|
1888
2376
|
continue;
|
|
1889
2377
|
return;
|
|
1890
2378
|
}
|
|
@@ -1895,24 +2383,63 @@ async function pumpGatewayStream(session) {
|
|
|
1895
2383
|
throw new ProviderError("provider stream ended without a terminal response", 200);
|
|
1896
2384
|
}
|
|
1897
2385
|
/** Returns true when the stream may continue with the next chunk. */
|
|
1898
|
-
|
|
1899
|
-
|
|
2386
|
+
function streamGatewayText(session, chunk) {
|
|
2387
|
+
return chunk.type === "delta"
|
|
2388
|
+
? streamGatewayDelta(session, chunk.token)
|
|
2389
|
+
: streamGatewayReasoning(session, chunk.token);
|
|
2390
|
+
}
|
|
2391
|
+
/** Returns true when the stream may continue with the next chunk. */
|
|
2392
|
+
function streamGatewayDelta(session, token) {
|
|
2393
|
+
const { request, metrics } = session;
|
|
1900
2394
|
const deltaMetrics = incrementalUtf8ByteCount(token, metrics.previousDeltaEndedWithHighSurrogate);
|
|
1901
2395
|
metrics.outputBytes += deltaMetrics.bytes;
|
|
1902
2396
|
metrics.previousDeltaEndedWithHighSurrogate = deltaMetrics.endsWithHighSurrogate;
|
|
1903
2397
|
metrics.completionTokens = Math.ceil(metrics.outputBytes / OUTPUT_BYTES_PER_TOKEN_LIMIT);
|
|
1904
2398
|
const budget = { completionTokens: metrics.completionTokens, outputBytes: metrics.outputBytes };
|
|
1905
|
-
|
|
2399
|
+
const overBudget = exceedsOutputBudget(budget, request.maxOutputTokens ?? 1);
|
|
2400
|
+
return forwardStreamText(session, { content: token }, overBudget ? "answer" : undefined);
|
|
2401
|
+
}
|
|
2402
|
+
// The reasoning passages one turn may carry: the first attempt that forwards reasoning and the
|
|
2403
|
+
// gateway's one steered repair (#3873 F17, F23, option iii). The gateway forwards no further
|
|
2404
|
+
// passage — a provider retry after forwarded reasoning streams its reasoning undelivered — so the
|
|
2405
|
+
// second passage is the repair working, not an overgrown reasoning.
|
|
2406
|
+
const REASONING_PASSAGES_PER_TURN = 2;
|
|
2407
|
+
// #3878: the model's reasoning reaches the coding runtime as `delta.reasoning_content`, the field
|
|
2408
|
+
// OpenCode's OpenAI-compatible provider turns into a reasoning part, as it arrives. It is bounded
|
|
2409
|
+
// apart from the answer, by the same byte allowance per model attempt for the attempts a turn may
|
|
2410
|
+
// carry, so a reasoning model keeps its whole answer budget and a provider that ignores its output
|
|
2411
|
+
// limit still cannot stream without end.
|
|
2412
|
+
async function streamGatewayReasoning(session, token) {
|
|
2413
|
+
const { request, metrics } = session;
|
|
2414
|
+
const counted = incrementalUtf8ByteCount(token, metrics.previousReasoningEndedWithHighSurrogate);
|
|
2415
|
+
const total = metrics.forwardedReasoningBytes + counted.bytes;
|
|
2416
|
+
const overBudget = total > outputByteBudget(request.maxOutputTokens ?? 1) * REASONING_PASSAGES_PER_TURN;
|
|
2417
|
+
const forwarded = await forwardStreamText(session, { reasoning_content: token }, overBudget ? "reasoning" : undefined);
|
|
2418
|
+
if (forwarded) {
|
|
2419
|
+
// Only bytes the runtime actually received count as forwarded (#3873 review).
|
|
2420
|
+
metrics.forwardedReasoningBytes = total;
|
|
2421
|
+
metrics.previousReasoningEndedWithHighSurrogate = counted.endsWithHighSurrogate;
|
|
2422
|
+
metrics.reasoningFrames += 1;
|
|
2423
|
+
}
|
|
2424
|
+
return forwarded;
|
|
2425
|
+
}
|
|
2426
|
+
// One text frame of a live turn, or its end: past a byte bound (`limit`: the answer's or the
|
|
2427
|
+
// forwarded reasoning's) the turn ends with `length`, and a frame that no longer reaches the client
|
|
2428
|
+
// ends it as cancelled. The gateway call has not settled at either point, so neither line can say
|
|
2429
|
+
// whether a steered repair ran. Returns true when the stream may continue with the next chunk.
|
|
2430
|
+
async function forwardStreamText(session, delta, limit) {
|
|
2431
|
+
const { ctx, id, created, modelId, iterator } = session;
|
|
2432
|
+
if (limit !== undefined) {
|
|
1906
2433
|
await iterator.return?.();
|
|
1907
|
-
recordSessionOutcome(session, "output-limit");
|
|
2434
|
+
recordSessionOutcome(session, "output-limit", REPAIR_NOT_SETTLED, limit);
|
|
1908
2435
|
writeSessionTerminal(session, "length");
|
|
1909
2436
|
return false;
|
|
1910
2437
|
}
|
|
1911
|
-
const wrote = writeOpenAiSse(ctx, openAiStreamChunk(id, created, modelId,
|
|
2438
|
+
const wrote = writeOpenAiSse(ctx, openAiStreamChunk(id, created, modelId, delta, null), session.cancellation.transport);
|
|
1912
2439
|
if (!wrote) {
|
|
1913
2440
|
ctx.res.destroy();
|
|
1914
2441
|
await iterator.return?.();
|
|
1915
|
-
recordSessionOutcome(session, "cancelled");
|
|
2442
|
+
recordSessionOutcome(session, "cancelled", REPAIR_NOT_SETTLED);
|
|
1916
2443
|
return false;
|
|
1917
2444
|
}
|
|
1918
2445
|
return true;
|
|
@@ -1922,11 +2449,11 @@ async function streamGatewayResponse(session, response) {
|
|
|
1922
2449
|
const outcome = outputMetrics(response);
|
|
1923
2450
|
metrics.outputBytes = Math.max(outcome.outputBytes, metrics.outputBytes);
|
|
1924
2451
|
metrics.promptTokens = response.usage.promptTokens;
|
|
1925
|
-
const promptSettlement = settlePromptTokenReservation(session.deps, promptTokenReservation, response.usage.promptTokens);
|
|
2452
|
+
const promptSettlement = settlePromptTokenReservation(session.deps, promptTokenReservation, response.usage.promptTokens, discardedPromptTokens(response));
|
|
1926
2453
|
settleStreamCompletionUsage(session, response, outcome, promptSettlement);
|
|
1927
2454
|
if (exceedsOutputBudget(metrics, request.maxOutputTokens ?? 1)) {
|
|
1928
2455
|
await iterator.return?.();
|
|
1929
|
-
recordSessionOutcome(session, "output-limit");
|
|
2456
|
+
recordSessionOutcome(session, "output-limit", settledRepair(response.outputRepair), "answer");
|
|
1930
2457
|
writeSessionTerminal(session, "length");
|
|
1931
2458
|
return;
|
|
1932
2459
|
}
|
|
@@ -1935,12 +2462,12 @@ async function streamGatewayResponse(session, response) {
|
|
|
1935
2462
|
if (!wrote) {
|
|
1936
2463
|
ctx.res.destroy();
|
|
1937
2464
|
await iterator.return?.();
|
|
1938
|
-
recordSessionOutcome(session, "cancelled");
|
|
2465
|
+
recordSessionOutcome(session, "cancelled", settledRepair(response.outputRepair));
|
|
1939
2466
|
return;
|
|
1940
2467
|
}
|
|
1941
2468
|
}
|
|
1942
2469
|
writeSessionTerminal(session, response.finishReason);
|
|
1943
|
-
recordSessionOutcome(session, ctx.res.writableEnded && !ctx.res.destroyed ? "accepted" : "cancelled");
|
|
2470
|
+
recordSessionOutcome(session, ctx.res.writableEnded && !ctx.res.destroyed ? "accepted" : "cancelled", settledRepair(response.outputRepair));
|
|
1944
2471
|
}
|
|
1945
2472
|
function settleStreamCompletionUsage(session, response, outcome, promptSettlement) {
|
|
1946
2473
|
const { metrics, ctx, runId } = session;
|
|
@@ -1949,6 +2476,7 @@ function settleStreamCompletionUsage(session, response, outcome, promptSettlemen
|
|
|
1949
2476
|
logGatewayCompletionUsage(ctx, runId, {
|
|
1950
2477
|
completionTokens: metrics.completionTokens,
|
|
1951
2478
|
outputBytes: Math.max(outcome.outputBytes, metrics.outputBytes),
|
|
2479
|
+
...answerShares(response),
|
|
1952
2480
|
}, usage.source, promptSettlement);
|
|
1953
2481
|
}
|
|
1954
2482
|
function completionUsage(response, outputBytes, streamedCompletionTokens) {
|
|
@@ -1970,6 +2498,36 @@ function completionUsage(response, outputBytes, streamedCompletionTokens) {
|
|
|
1970
2498
|
source: "output-byte-estimate",
|
|
1971
2499
|
};
|
|
1972
2500
|
}
|
|
2501
|
+
function answerShares(response) {
|
|
2502
|
+
const { reasoningBytes, reasoningTokens } = response.usage;
|
|
2503
|
+
const discarded = response.discardedAttemptUsage;
|
|
2504
|
+
return {
|
|
2505
|
+
contentBytes: Buffer.byteLength(response.content, "utf8"),
|
|
2506
|
+
reasoningBytes: reasoningBytes ?? 0,
|
|
2507
|
+
...(reasoningTokens === undefined ? {} : { reasoningTokens }),
|
|
2508
|
+
...(discarded === undefined
|
|
2509
|
+
? {}
|
|
2510
|
+
: {
|
|
2511
|
+
discardedAttemptCount: discarded.attemptCount,
|
|
2512
|
+
discardedPromptTokens: discarded.promptTokens,
|
|
2513
|
+
discardedCompletionTokens: discarded.completionTokens,
|
|
2514
|
+
}),
|
|
2515
|
+
};
|
|
2516
|
+
}
|
|
2517
|
+
// A forwarded reasoning is bounded by the turn's output allowance in bytes, apart from the answer.
|
|
2518
|
+
function exceedsReasoningBudget(response, maxOutputTokens) {
|
|
2519
|
+
return (response.reasoning !== undefined &&
|
|
2520
|
+
Buffer.byteLength(response.reasoning, "utf8") > outputByteBudget(maxOutputTokens));
|
|
2521
|
+
}
|
|
2522
|
+
function discardedAttemptFields(shares) {
|
|
2523
|
+
const { discardedAttemptCount, discardedPromptTokens, discardedCompletionTokens } = shares;
|
|
2524
|
+
if (discardedAttemptCount === undefined ||
|
|
2525
|
+
discardedPromptTokens === undefined ||
|
|
2526
|
+
discardedCompletionTokens === undefined) {
|
|
2527
|
+
return {};
|
|
2528
|
+
}
|
|
2529
|
+
return { discardedAttemptCount, discardedPromptTokens, discardedCompletionTokens };
|
|
2530
|
+
}
|
|
1973
2531
|
function logGatewayCompletionUsage(ctx, runId, metrics, source, promptSettlement) {
|
|
1974
2532
|
getServerLogger().info(activityLogEvent(CODING_SIDECAR_GATEWAY_USAGE_SETTLED_OPERATION, { correlationId: correlationIdOrUnknown(ctx.correlationId), parentCorrelationId: runId }, {
|
|
1975
2533
|
runId,
|
|
@@ -1979,16 +2537,22 @@ function logGatewayCompletionUsage(ctx, runId, metrics, source, promptSettlement
|
|
|
1979
2537
|
promptSettlementStatus: promptSettlement.status,
|
|
1980
2538
|
outputBytes: metrics.outputBytes,
|
|
1981
2539
|
source,
|
|
2540
|
+
contentBytes: metrics.contentBytes,
|
|
2541
|
+
reasoningBytes: metrics.reasoningBytes,
|
|
2542
|
+
...(metrics.reasoningTokens === undefined
|
|
2543
|
+
? {}
|
|
2544
|
+
: { reasoningTokens: metrics.reasoningTokens }),
|
|
2545
|
+
...discardedAttemptFields(metrics),
|
|
1982
2546
|
completeness: "complete",
|
|
1983
2547
|
loss: "none",
|
|
1984
2548
|
}));
|
|
1985
2549
|
}
|
|
1986
|
-
function settleGatewayStreamError(session, runtimeRetry) {
|
|
2550
|
+
function settleGatewayStreamError(session, runtimeRetry, repair) {
|
|
1987
2551
|
if (session.cancellation.signal.aborted) {
|
|
1988
|
-
recordSessionOutcome(session, "cancelled");
|
|
2552
|
+
recordSessionOutcome(session, "cancelled", settledRepair(repair));
|
|
1989
2553
|
return;
|
|
1990
2554
|
}
|
|
1991
|
-
recordSessionOutcome(session, "failed");
|
|
2555
|
+
recordSessionOutcome(session, "failed", settledRepair(repair));
|
|
1992
2556
|
if (runtimeRetry === "refused") {
|
|
1993
2557
|
const { ctx, id, created, modelId, cancellation } = session;
|
|
1994
2558
|
writeStreamRejection({ ctx, id, created, modelId, transport: cancellation.transport });
|
|
@@ -2020,23 +2584,25 @@ function beginBufferedOpenAiStream(ctx, modelId, transport) {
|
|
|
2020
2584
|
created,
|
|
2021
2585
|
modelId,
|
|
2022
2586
|
transport,
|
|
2023
|
-
stopHeartbeat:
|
|
2024
|
-
controller: transport.backpressure,
|
|
2025
|
-
onBackpressure: transport.onBackpressure,
|
|
2026
|
-
correlationId: transport.correlationId,
|
|
2027
|
-
}),
|
|
2587
|
+
stopHeartbeat: sidecarSseHeartbeat(ctx, transport),
|
|
2028
2588
|
};
|
|
2029
2589
|
}
|
|
2590
|
+
// SSE comments that keep the runtime's connection alive while the model is silent, written through
|
|
2591
|
+
// the shared protective path so a client that stops draining kills the stream like any frame.
|
|
2592
|
+
function sidecarSseHeartbeat(ctx, transport) {
|
|
2593
|
+
return startSseHeartbeat(ctx.res, SIDECAR_SSE_HEARTBEAT_MS, undefined, {
|
|
2594
|
+
controller: transport.backpressure,
|
|
2595
|
+
onBackpressure: transport.onBackpressure,
|
|
2596
|
+
correlationId: transport.correlationId,
|
|
2597
|
+
});
|
|
2598
|
+
}
|
|
2030
2599
|
function completeBufferedOpenAiStream(session, response) {
|
|
2031
2600
|
const { ctx, id, created, modelId, transport, stopHeartbeat } = session;
|
|
2032
2601
|
stopHeartbeat();
|
|
2033
|
-
if (response.content.length > 0 ||
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
? {}
|
|
2038
|
-
: { tool_calls: openAiToolCalls(response.toolCalls) }),
|
|
2039
|
-
}, null), transport);
|
|
2602
|
+
if (response.content.length > 0 ||
|
|
2603
|
+
response.toolCalls.length > 0 ||
|
|
2604
|
+
response.reasoning !== undefined) {
|
|
2605
|
+
const wrote = writeOpenAiSse(ctx, openAiStreamChunk(id, created, modelId, bufferedAnswerDelta(response), null), transport);
|
|
2040
2606
|
if (!wrote) {
|
|
2041
2607
|
ctx.res.destroy();
|
|
2042
2608
|
return STREAMING;
|
|
@@ -2045,6 +2611,15 @@ function completeBufferedOpenAiStream(session, response) {
|
|
|
2045
2611
|
writeStreamTerminal(session, response.finishReason, response.usage.promptTokens, response.usage.completionTokens);
|
|
2046
2612
|
return STREAMING;
|
|
2047
2613
|
}
|
|
2614
|
+
// The whole buffered answer as one streamed delta: the model's reasoning (#3878), then the answer
|
|
2615
|
+
// and its tool calls, the order in which the runtime shows them.
|
|
2616
|
+
function bufferedAnswerDelta(response) {
|
|
2617
|
+
return {
|
|
2618
|
+
...(response.reasoning === undefined ? {} : { reasoning_content: response.reasoning }),
|
|
2619
|
+
...(response.content.length === 0 ? {} : { content: response.content }),
|
|
2620
|
+
...(response.toolCalls.length === 0 ? {} : { tool_calls: openAiToolCalls(response.toolCalls) }),
|
|
2621
|
+
};
|
|
2622
|
+
}
|
|
2048
2623
|
function settleBufferedOpenAiStreamError(session, finishReason) {
|
|
2049
2624
|
session.stopHeartbeat();
|
|
2050
2625
|
writeStreamTerminal(session, finishReason, 0, 0);
|
|
@@ -2102,6 +2677,54 @@ function openAiStreamChunk(id, created, model, delta, finishReason) {
|
|
|
2102
2677
|
choices: [{ index: 0, delta, finish_reason: finishReason }],
|
|
2103
2678
|
};
|
|
2104
2679
|
}
|
|
2680
|
+
function configuredConversationSubset(config, holder, freshOnly) {
|
|
2681
|
+
const providers = config.providers.filter((provider) => {
|
|
2682
|
+
const readiness = holder?.current() === config
|
|
2683
|
+
? currentConversationReadinessObservation({ gatewayConfig: holder }, provider.modelId)
|
|
2684
|
+
: undefined;
|
|
2685
|
+
return freshOnly ? readiness === true : readiness !== false;
|
|
2686
|
+
});
|
|
2687
|
+
const ids = new Set(providers.map((provider) => provider.modelId));
|
|
2688
|
+
return {
|
|
2689
|
+
...config,
|
|
2690
|
+
providers,
|
|
2691
|
+
...(config.capabilities === undefined
|
|
2692
|
+
? {}
|
|
2693
|
+
: { capabilities: config.capabilities.filter((model) => ids.has(model.id)) }),
|
|
2694
|
+
};
|
|
2695
|
+
}
|
|
2696
|
+
/** New admissions and passive readiness share the original selector over fresh serving evidence. */
|
|
2697
|
+
function resolveFreshCodingProfile(config, holder, options) {
|
|
2698
|
+
const configured = resolveCodingSafeSidecarGatewayProfile(config, options);
|
|
2699
|
+
if (configured.status !== "available" || config === undefined)
|
|
2700
|
+
return configured;
|
|
2701
|
+
const fresh = resolveCodingSafeSidecarGatewayProfile(configuredConversationSubset(config, holder, true), options);
|
|
2702
|
+
if (fresh.status === "available")
|
|
2703
|
+
return fresh;
|
|
2704
|
+
// Preserve a structural window refusal; an untested connection cannot repair that shortfall.
|
|
2705
|
+
if (!codingContextFits(configured))
|
|
2706
|
+
return configured;
|
|
2707
|
+
const unknown = resolveCodingSafeSidecarGatewayProfile(configuredConversationSubset(config, holder, false), options);
|
|
2708
|
+
return {
|
|
2709
|
+
status: "unavailable",
|
|
2710
|
+
reason: unknown.status === "available" ? "model-verification-pending" : "conversation-not-ready",
|
|
2711
|
+
};
|
|
2712
|
+
}
|
|
2713
|
+
function passiveCodingProfile(deps) {
|
|
2714
|
+
return resolveFreshCodingProfile(currentGatewayConfig(deps), deps.gatewayConfig, {
|
|
2715
|
+
deploymentPolicyDisabled: sidecarPolicyDisabled(deps),
|
|
2716
|
+
modelSource: currentModelSource(deps),
|
|
2717
|
+
gatewayVerification: currentGatewayVerification(deps),
|
|
2718
|
+
});
|
|
2719
|
+
}
|
|
2720
|
+
function conversationShortfall(result) {
|
|
2721
|
+
if (result.status === "available")
|
|
2722
|
+
return undefined;
|
|
2723
|
+
return result.reason === "model-verification-pending" ||
|
|
2724
|
+
result.reason === "conversation-not-ready"
|
|
2725
|
+
? result.reason
|
|
2726
|
+
: undefined;
|
|
2727
|
+
}
|
|
2105
2728
|
/**
|
|
2106
2729
|
* Readiness dimension (#3390 closeout): a profile can be "available" per the stored config and
|
|
2107
2730
|
* probe yet still be unusable — its `runMetadata.maxPromptTokens` (derived from the capability via
|
|
@@ -2112,9 +2735,14 @@ function openAiStreamChunk(id, created, model, delta, finishReason) {
|
|
|
2112
2735
|
* requests keep failing exactly as before, unchanged by this readiness-only check.
|
|
2113
2736
|
*/
|
|
2114
2737
|
function gatewayReadinessProjection(ctx, deps) {
|
|
2115
|
-
const result =
|
|
2738
|
+
const result = passiveCodingProfile(deps);
|
|
2116
2739
|
if (codingContextFits(result))
|
|
2117
2740
|
return result;
|
|
2741
|
+
const conversation = conversationShortfall(result);
|
|
2742
|
+
if (conversation !== undefined) {
|
|
2743
|
+
logReadinessShortfall(ctx, result, conversation, conversation === "model-verification-pending");
|
|
2744
|
+
return result;
|
|
2745
|
+
}
|
|
2118
2746
|
const shortfall = result.status === "available" ? "model-context-window-insufficient" : result.reason;
|
|
2119
2747
|
if (shortfall !== "model-context-window-insufficient" &&
|
|
2120
2748
|
shortfall !== "no-tool-calling" &&
|
|
@@ -2122,11 +2750,11 @@ function gatewayReadinessProjection(ctx, deps) {
|
|
|
2122
2750
|
return result;
|
|
2123
2751
|
// #3591 (1.1.7): while the automatic probe is still running against a slow gateway the shortfall
|
|
2124
2752
|
// is not a verdict. The profile says so, and the Workbench re-reads it instead of refusing.
|
|
2125
|
-
const pending = readinessProbePending(deps, result
|
|
2753
|
+
const pending = readinessProbePending(deps, result);
|
|
2126
2754
|
const reason = pending
|
|
2127
2755
|
? "model-verification-pending"
|
|
2128
2756
|
: shortfall;
|
|
2129
|
-
logReadinessShortfall(ctx, result, reason, pending);
|
|
2757
|
+
logReadinessShortfall(ctx, result, reason, pending, shortfall);
|
|
2130
2758
|
// An open verification replaces the stored shortfall for an unavailable projection too (an
|
|
2131
2759
|
// unverified tool-calling proof whose probe is still running), or the Workbench would stop
|
|
2132
2760
|
// reading and keep the refusal until an unrelated refresh.
|
|
@@ -2157,9 +2785,11 @@ export function codingContextShortfall(config, result) {
|
|
|
2157
2785
|
* model the gateway does not admit right now is a typed refusal that names the sidecar's reason
|
|
2158
2786
|
* (#3565 Observation 17), never a bare Error the orchestrator can only report as
|
|
2159
2787
|
* `authority-resolution-failed`; so is a model whose window cannot hold the run's prompt (#3603).
|
|
2788
|
+
* Only a fresh basic-chat success in the same current runtime holder admits a new run; already
|
|
2789
|
+
* admitted F73 requests keep their captured profile and never use this new-run guard.
|
|
2160
2790
|
*/
|
|
2161
|
-
export function admitCodingRunModel(config, modelId, reasoningEffort) {
|
|
2162
|
-
const resolved =
|
|
2791
|
+
export function admitCodingRunModel(config, modelId, reasoningEffort, holder) {
|
|
2792
|
+
const resolved = resolveFreshCodingProfile(config, holder, {
|
|
2163
2793
|
...(modelId === undefined ? {} : { modelId }),
|
|
2164
2794
|
});
|
|
2165
2795
|
if (resolved.status !== "available" || config === undefined) {
|
|
@@ -2183,9 +2813,7 @@ function admittedReasoningEffort(config, modelAlias, reasoningEffort) {
|
|
|
2183
2813
|
}
|
|
2184
2814
|
return { reasoningEffort };
|
|
2185
2815
|
}
|
|
2186
|
-
function readinessProbePending(deps, result
|
|
2187
|
-
if (shortfall === "no-tool-calling")
|
|
2188
|
-
return false;
|
|
2816
|
+
function readinessProbePending(deps, result) {
|
|
2189
2817
|
const config = currentGatewayConfig(deps);
|
|
2190
2818
|
if (config === undefined)
|
|
2191
2819
|
return false;
|
|
@@ -2195,12 +2823,13 @@ function readinessProbePending(deps, result, shortfall) {
|
|
|
2195
2823
|
? isCodingWorkbenchProbePending(config, result.modelAlias)
|
|
2196
2824
|
: isAnyCodingWorkbenchProbePending(config);
|
|
2197
2825
|
}
|
|
2198
|
-
function logReadinessShortfall(ctx, result, reason, pending) {
|
|
2826
|
+
function logReadinessShortfall(ctx, result, reason, pending, storedReason) {
|
|
2199
2827
|
getServerLogger().warn(activityLogEvent(CODING_SIDECAR_GATEWAY_READINESS_INSUFFICIENT_OPERATION, {
|
|
2200
2828
|
correlationId: correlationIdOrUnknown(ctx.correlationId),
|
|
2201
2829
|
errorKind: "unavailable",
|
|
2202
2830
|
}, {
|
|
2203
2831
|
reason,
|
|
2832
|
+
...(pending && storedReason !== undefined ? { storedReason } : {}),
|
|
2204
2833
|
probeMode: pending ? "pending" : "passive",
|
|
2205
2834
|
...(result.status === "available"
|
|
2206
2835
|
? {
|
|
@@ -2244,8 +2873,15 @@ function boundedProfileWait() {
|
|
|
2244
2873
|
timer.unref();
|
|
2245
2874
|
});
|
|
2246
2875
|
}
|
|
2876
|
+
// Lab ledger F2 (#3873): a streamed request is answered live wherever the resolved profile streams
|
|
2877
|
+
// (the model's capability streams and `codingStreaming` is not "off"), so the coding runtime sees
|
|
2878
|
+
// the answer as the provider produces it instead of only once it exists. An injected stream seam
|
|
2879
|
+
// streams; an injected buffered seam alone stands in for the whole gateway, which then has no
|
|
2880
|
+
// stream to read.
|
|
2247
2881
|
function upstreamGatewayStreamingSupported(deps, advertisedSupport) {
|
|
2248
|
-
|
|
2882
|
+
if (deps.codingSidecarGatewayChatStreamFactory !== undefined)
|
|
2883
|
+
return true;
|
|
2884
|
+
return advertisedSupport && deps.codingSidecarGatewayChatFactory === undefined;
|
|
2249
2885
|
}
|
|
2250
2886
|
/** The unmanaged-tool-contract rejection applies before authentication is even known, so it stays
|
|
2251
2887
|
* its own check: extracting it keeps `runtimeGatewayAdmissionResponse` and
|
|
@@ -2253,7 +2889,8 @@ function upstreamGatewayStreamingSupported(deps, advertisedSupport) {
|
|
|
2253
2889
|
* carrying every branch. */
|
|
2254
2890
|
function rejectUnmanagedGatewayToolContract(ctx, deps, parsed, authentication) {
|
|
2255
2891
|
const declaresTools = parsed.tools !== undefined && parsed.tools.length > 0;
|
|
2256
|
-
if (!declaresTools ||
|
|
2892
|
+
if (!declaresTools ||
|
|
2893
|
+
isExactManagedToolSet(parsed.tools, gatewayReadinessRegistry(deps)?.toolProfile ?? "direct"))
|
|
2257
2894
|
return undefined;
|
|
2258
2895
|
return refuseGatewayToolContract(ctx, deps, authentication.runId, parsed);
|
|
2259
2896
|
}
|
|
@@ -2267,21 +2904,20 @@ function runtimeGatewayAdmissionResponse(ctx, deps, parsed, authentication, mode
|
|
|
2267
2904
|
}
|
|
2268
2905
|
function authenticatedGatewayAdmission(ctx, deps, parsed, authentication, modelAlias) {
|
|
2269
2906
|
const registry = gatewayReadinessRegistry(deps);
|
|
2907
|
+
const exact = isExactManagedToolSet(parsed.tools, registry?.toolProfile ?? "direct");
|
|
2270
2908
|
if (!isAdmittedManagedToolSet(parsed.tools, registry, authentication.runId)) {
|
|
2271
2909
|
return {
|
|
2272
2910
|
kind: "handled",
|
|
2273
2911
|
result: refuseGatewayToolContract(ctx, deps, authentication.runId, parsed),
|
|
2274
2912
|
};
|
|
2275
2913
|
}
|
|
2276
|
-
if (
|
|
2277
|
-
isRuntimeReadinessProbe(parsed) &&
|
|
2278
|
-
registry?.claim(authentication.runId) === true) {
|
|
2914
|
+
if (exact && isRuntimeReadinessProbe(parsed) && registry?.claim(authentication.runId) === true) {
|
|
2279
2915
|
return {
|
|
2280
2916
|
kind: "handled",
|
|
2281
2917
|
result: fixedReadinessResponse(ctx, deps, modelAlias, parsed.stream === true),
|
|
2282
2918
|
};
|
|
2283
2919
|
}
|
|
2284
|
-
if (
|
|
2920
|
+
if (exact)
|
|
2285
2921
|
registry?.verifyObserved(authentication.runId);
|
|
2286
2922
|
noteToolAdoptionGap(ctx, deps, authentication.runId, parsed.messages);
|
|
2287
2923
|
return { kind: "proceed" };
|
|
@@ -2405,6 +3041,8 @@ function logValidatedRequestBounds(ctx, runId, request, bounds, estimatedPromptT
|
|
|
2405
3041
|
estimatedPromptTokens,
|
|
2406
3042
|
maxOutputTokens: admittedOutputTokens(bounds, estimatedPromptTokens),
|
|
2407
3043
|
inputMessageCount: request.messages.length,
|
|
3044
|
+
offeredToolCount: request.tools?.length ?? 0,
|
|
3045
|
+
droppedReasoningMessageCount: request.droppedReasoningMessageCount,
|
|
2408
3046
|
completeness: "complete",
|
|
2409
3047
|
loss: "none",
|
|
2410
3048
|
}));
|
|
@@ -2420,6 +3058,7 @@ function executeBudgetedGatewayChat(ctx, deps, binding, parsed, authentication,
|
|
|
2420
3058
|
return executeGatewayChat(ctx, deps, binding, parsed, authentication.runId, {
|
|
2421
3059
|
...profile,
|
|
2422
3060
|
promptTokenReservation,
|
|
3061
|
+
toolProfile: gatewayReadinessRegistry(deps)?.toolProfile ?? "direct",
|
|
2423
3062
|
toolCatalogCoverage: resolveToolCatalogHandlerCoverage(deps, authentication.runId, ctx.correlationId),
|
|
2424
3063
|
offerLifetimeMs: opencodeGatewayOfferLifetimeMs(codingSidecarGatewayRequestDeadlineMs(binding.config, profile.modelAlias)),
|
|
2425
3064
|
});
|