@oscharko-dev/keiko 1.1.12 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -5
- 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 +3 -3
- package/dist/ui/static/_next/static/chunks/0--s8pmsbkf62.js +1 -0
- package/dist/ui/static/_next/static/chunks/00_o0v2hokzqm.js +1 -0
- package/dist/ui/static/_next/static/chunks/0339vdalk0q6h.js +3 -0
- package/dist/ui/static/_next/static/chunks/{13fx5sqcncq4_.js → 05k2u3763ih_i.js} +1 -1
- package/dist/ui/static/_next/static/chunks/07f-n_9zq-s8q.js +1 -0
- package/dist/ui/static/_next/static/chunks/07l0sfn1-mid2.js +1 -0
- package/dist/ui/static/_next/static/chunks/07skh7tlpfo1v.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2cn33khz2ae-h.js → 08v-jyhi2uk8t.js} +1 -1
- package/dist/ui/static/_next/static/chunks/09i_8713x46yr.js +1 -0
- package/dist/ui/static/_next/static/chunks/09zc5hgtb7s-z.js +1 -0
- package/dist/ui/static/_next/static/chunks/0_p-xs8nu7pby.js +1 -0
- package/dist/ui/static/_next/static/chunks/0_yx8_bs1t-27.js +1 -0
- package/dist/ui/static/_next/static/chunks/0a6ri2ug5xf10.js +1 -0
- package/dist/ui/static/_next/static/chunks/0bbrrvuzilpy5.js +1 -0
- package/dist/ui/static/_next/static/chunks/0bg7uh6tq8-dx.js +1 -0
- package/dist/ui/static/_next/static/chunks/0bpexy600ffpg.js +1 -0
- package/dist/ui/static/_next/static/chunks/0bz731buimrpv.js +1 -0
- package/dist/ui/static/_next/static/chunks/0cwy6mtvshbuo.js +1 -0
- package/dist/ui/static/_next/static/chunks/0fpbvpzg-omn0.js +1 -0
- package/dist/ui/static/_next/static/chunks/0fz9qig_5p73f.js +1 -0
- package/dist/ui/static/_next/static/chunks/0gf88p0jy1g5w.js +1 -0
- package/dist/ui/static/_next/static/chunks/0hvxxuef1gw9p.js +1 -0
- package/dist/ui/static/_next/static/chunks/0iu3dyqe7m7_7.js +1 -0
- package/dist/ui/static/_next/static/chunks/0ktvc8fs3spkb.js +1 -0
- package/dist/ui/static/_next/static/chunks/0kvy_ru-kodgv.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0xhrzm-zp_lsx.js → 0l72usw6suk0h.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0mcg_spbohpl3.css +1 -0
- package/dist/ui/static/_next/static/chunks/{3jb5u4g15g__m.css → 0mjsj7bp-ukgh.css} +17 -18
- package/dist/ui/static/_next/static/chunks/0parm4c86umwk.js +1 -0
- package/dist/ui/static/_next/static/chunks/0q_08tk2d3m2n.js +1 -0
- package/dist/ui/static/_next/static/chunks/0r2lwkgws6jm8.js +1 -0
- package/dist/ui/static/_next/static/chunks/0t73kckx3olud.js +1 -0
- package/dist/ui/static/_next/static/chunks/0w2fp3hjrfx32.js +1 -0
- package/dist/ui/static/_next/static/chunks/0wdn9qetndtsj.js +1 -0
- package/dist/ui/static/_next/static/chunks/0weojtwxo6qw7.js +1 -0
- package/dist/ui/static/_next/static/chunks/0x-r45yl06rdn.js +1 -0
- package/dist/ui/static/_next/static/chunks/0x42c1na2ia6m.js +1 -0
- package/dist/ui/static/_next/static/chunks/0xu2rnpdr4kzd.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0o_lmzxpjfeky.js → 0yzmg9aoglud6.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0zuaq_9l5pma_.js +1 -0
- package/dist/ui/static/_next/static/chunks/10kb8j7vggfwk.js +1 -0
- package/dist/ui/static/_next/static/chunks/14qdwomthzucj.js +1 -0
- package/dist/ui/static/_next/static/chunks/196257vfyrtgu.js +1 -0
- package/dist/ui/static/_next/static/chunks/{3kmozkq6tgqnz.js → 196x_tfexoucg.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{17jlhx5dll_r6.js → 1_bezidc0febq.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1a6ri-sriyu-m.js +1 -0
- package/dist/ui/static/_next/static/chunks/1a7ko-_7t4wjo.js +1 -0
- package/dist/ui/static/_next/static/chunks/1aivbuztyv67o.js +10 -0
- package/dist/ui/static/_next/static/chunks/1c0u0qq0vwkc4.js +1 -0
- package/dist/ui/static/_next/static/chunks/1czgn62g6km38.js +3 -0
- package/dist/ui/static/_next/static/chunks/1f05h21irrvbs.js +1 -0
- package/dist/ui/static/_next/static/chunks/1juiifi_xnx68.js +1 -0
- package/dist/ui/static/_next/static/chunks/1m-9yzfpcm7wc.js +1 -0
- package/dist/ui/static/_next/static/chunks/{36-tv3y56oau8.js → 1qh0x9_258ol2.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2kh0qihno0n1w.js → 1rp_smu1jjw45.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1wg1s3jm779ro.js +3 -0
- package/dist/ui/static/_next/static/chunks/{0l7cc8q83migz.css → 1wj7exxi550gi.css} +1 -1
- package/dist/ui/static/_next/static/chunks/1zczte6xkwvcl.js +1 -0
- package/dist/ui/static/_next/static/chunks/1zudszthinjcb.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1kacubgk0y2ki.js → 21-6b7rkmtvg8.js} +1 -1
- package/dist/ui/static/_next/static/chunks/224bbe_3ksnlw.js +1 -0
- package/dist/ui/static/_next/static/chunks/{3chx0gpjqrhod.js → 24u-5fslcj3n9.js} +3 -3
- package/dist/ui/static/_next/static/chunks/25x9hf4wdlde7.js +1 -0
- package/dist/ui/static/_next/static/chunks/263_uck8el32f.js +1 -0
- package/dist/ui/static/_next/static/chunks/26gmn1z4oegqh.js +1 -0
- package/dist/ui/static/_next/static/chunks/28ylcw-leje_k.js +1 -0
- package/dist/ui/static/_next/static/chunks/2937s9os9u2tn.js +1 -0
- package/dist/ui/static/_next/static/chunks/29rlw6dih8owf.js +1 -0
- package/dist/ui/static/_next/static/chunks/2b_t95bbpmtej.js +1 -0
- package/dist/ui/static/_next/static/chunks/2hq0zlnvfqol9.js +1 -0
- package/dist/ui/static/_next/static/chunks/{25j7z89g58y1-.css → 2hu5w89yy7_s-.css} +2 -2
- package/dist/ui/static/_next/static/chunks/2kylv1kq1_4p1.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0m1163red7mw7.js → 2nlmtsm3kjmbh.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2o584howfzzak.js +3 -0
- package/dist/ui/static/_next/static/chunks/{1c1gbfapof8m0.js → 2oq1uk07ft9l0.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2ov72plu69iiv.js +1 -0
- package/dist/ui/static/_next/static/chunks/2p66e_a0j23r8.js +1 -0
- package/dist/ui/static/_next/static/chunks/2r4vn_6anv2cw.js +5 -0
- package/dist/ui/static/_next/static/chunks/2ribv7pn1hr-l.js +1 -0
- package/dist/ui/static/_next/static/chunks/2ta3xj9td_qot.js +1 -0
- package/dist/ui/static/_next/static/chunks/2tb2nt2wvu643.js +1 -0
- package/dist/ui/static/_next/static/chunks/2wuj7qxm6mleh.js +1 -0
- package/dist/ui/static/_next/static/chunks/2xynqzhclj1u-.js +27 -0
- package/dist/ui/static/_next/static/chunks/2y98z-sun8_ew.js +1 -0
- package/dist/ui/static/_next/static/chunks/2yot6vshhc19p.css +1 -0
- package/dist/ui/static/_next/static/chunks/2z5c2glupanq_.js +1 -0
- package/dist/ui/static/_next/static/chunks/3-7tka4cib69h.js +1 -0
- package/dist/ui/static/_next/static/chunks/3-dorttkhs3i2.js +1 -0
- package/dist/ui/static/_next/static/chunks/30j8jo5v60ga1.js +2 -0
- package/dist/ui/static/_next/static/chunks/30q9b_aw8driv.js +1 -0
- package/dist/ui/static/_next/static/chunks/{18qu5m_in_h3x.js → 3603jy78awb1p.js} +1 -1
- package/dist/ui/static/_next/static/chunks/36c8jty3kllje.js +1 -0
- package/dist/ui/static/_next/static/chunks/387k5c-bf1b2e.js +1 -0
- package/dist/ui/static/_next/static/chunks/388eokaf_2t9k.js +1 -0
- package/dist/ui/static/_next/static/chunks/389bs_l5-yv4y.css +1 -0
- package/dist/ui/static/_next/static/chunks/3946_dfcd9xr-.js +1 -0
- package/dist/ui/static/_next/static/chunks/39nyg25pqs1kv.js +1 -0
- package/dist/ui/static/_next/static/chunks/3_alxp77ewgk_.js +1 -0
- package/dist/ui/static/_next/static/chunks/3_ycy0h8pq58a.js +1 -0
- package/dist/ui/static/_next/static/chunks/3eduf6vevclfm.js +1 -0
- package/dist/ui/static/_next/static/chunks/3eg8pcox5copv.js +1 -0
- package/dist/ui/static/_next/static/chunks/3gyetohi_flhb.js +1 -0
- package/dist/ui/static/_next/static/chunks/{39w0xj7fyy7sp.js → 3h-rh_lx0l8_3.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1o2cihsnxhmh6.js → 3hclt6m3ok4n9.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3ho1f5n8lir4r.js +1 -0
- package/dist/ui/static/_next/static/chunks/3kgc_j74tblcn.js +1 -0
- package/dist/ui/static/_next/static/chunks/3ksbq-nwkgwob.js +1 -0
- package/dist/ui/static/_next/static/chunks/3mxpjroefk8ou.js +1 -0
- package/dist/ui/static/_next/static/chunks/3or_0c84ozskx.js +1 -0
- package/dist/ui/static/_next/static/chunks/3q5jidle0lb3-.js +1 -0
- package/dist/ui/static/_next/static/chunks/3qjkuhjy_-_br.js +1 -0
- package/dist/ui/static/_next/static/chunks/3sgbsntbbci5y.js +1 -0
- package/dist/ui/static/_next/static/chunks/3tcw3qy3rrkyf.js +1 -0
- package/dist/ui/static/_next/static/chunks/3tqd6avtamgd5.js +1 -0
- package/dist/ui/static/_next/static/chunks/3ua7si017r4dg.js +1 -0
- package/dist/ui/static/_next/static/chunks/3v2iluxqnsug9.css +15 -0
- package/dist/ui/static/_next/static/chunks/{1ydfda18zlx4w.js → 3vjm30f1if00s.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3z5edm1fpkcuq.js +1 -0
- package/dist/ui/static/_next/static/chunks/3z5f2s7yd35cu.js +1 -0
- package/dist/ui/static/_next/static/chunks/40co1uetczqcs.js +1 -0
- package/dist/ui/static/_next/static/chunks/43kutp14mqi-j.js +1 -0
- package/dist/ui/static/_next/static/chunks/43y3xn64quyo2.js +1 -0
- package/dist/ui/static/_next/static/chunks/{turbopack-2fb3mn6go2p-t.js → turbopack-2rwr7ign9ynaa.js} +1 -1
- package/dist/ui/static/_not-found/__next._full.txt +13 -13
- package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +9 -9
- package/dist/ui/static/_not-found/__next._tree.txt +2 -2
- package/dist/ui/static/_not-found.html +1 -1
- package/dist/ui/static/_not-found.txt +13 -13
- package/dist/ui/static/atlassian-connectors/__next._full.txt +15 -15
- package/dist/ui/static/atlassian-connectors/__next._tree.txt +2 -2
- 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 +15 -15
- package/dist/ui/static/index.html +1 -1
- package/dist/ui/static/index.txt +23 -22
- package/dist/ui/static/launch/__next._full.txt +16 -16
- package/dist/ui/static/launch/__next._tree.txt +3 -3
- 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 +16 -16
- package/dist/ui/static/local-knowledge/__next._full.txt +16 -16
- package/dist/ui/static/local-knowledge/__next._tree.txt +3 -3
- package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +12 -12
- package/dist/ui/static/local-knowledge/capsule/__next._full.txt +25 -24
- package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +2 -2
- 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 +25 -24
- package/dist/ui/static/local-knowledge.html +1 -1
- package/dist/ui/static/local-knowledge.txt +16 -16
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/activity-log-store.d.ts +6 -2
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/activity-log-store.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/activity-log-store.js +54 -8
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/defect-fingerprint.d.ts +35 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/defect-fingerprint.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/defect-fingerprint.js +66 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/index.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/index.js +2 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/log-redaction.d.ts +13 -2
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/log-redaction.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/log-redaction.js +67 -126
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/index.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/index.js +4 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-analyze-sufficiency.d.ts +10 -2
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-analyze-sufficiency.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-analyze-sufficiency.js +59 -46
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-analyze.d.ts +13 -2
- 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 +150 -52
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts +30 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-code-inventory.generated.js +3539 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-desktop-report-attribution.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-desktop-report-attribution.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-desktop-report-attribution.js +74 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-desktop-report.d.ts +25 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-desktop-report.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-desktop-report.js +184 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-incident-resolution.d.ts +33 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-incident-resolution.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-incident-resolution.js +195 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-lifetime.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-lifetime.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-lifetime.js +19 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-local-query.d.ts +11 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-local-query.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-local-query.js +20 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-query.d.ts +6 -2
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-query.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-query.js +442 -60
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.d.ts +38 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry-history.generated.js +45 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry.d.ts +27 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-registry.js +46 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-report-json.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-report-json.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-report-json.js +5 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-report-privacy.d.ts +12 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-report-privacy.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-report-privacy.js +226 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-report.d.ts +41 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-report.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-report.js +672 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-segment-manifest.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-segment-manifest.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-segment-manifest.js +17 -5
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-segment-scan.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-segment-scan.js +16 -9
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/server-log.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/server-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/server-log.js +20 -11
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/support-incident-retention.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/support-incident-retention.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/support-incident-retention.js +21 -0
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/support-incident-store.d.ts +11 -3
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/support-incident-store.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/support-incident-store.js +142 -23
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/support-incident.d.ts +25 -22
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/support-incident.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/support-incident.js +694 -198
- package/node_modules/@oscharko-dev/keiko-activity-log/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-cli/dist/cli-control-state.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/cli-control-state.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/cli-control-state.js +25 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/investigate.js +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/process-activity-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/process-activity-log.js +3 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/repair.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/repair.js +1 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/runner.js +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.d.ts +1 -1
- 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 +19 -8
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.d.ts +16 -113
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.js +71 -358
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-incident.d.ts +1 -21
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-incident.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-incident.js +14 -112
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-cli.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-cli.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-cli.js +6 -18
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-evidence.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-evidence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-query-evidence.js +2 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-report-cli.d.ts +23 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-report-cli.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-report-cli.js +521 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-report-evidence.d.ts +647 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-report-evidence.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-report-evidence.js +338 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-selective-export.d.ts +3 -5
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-selective-export.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-selective-export.js +6 -42
- package/node_modules/@oscharko-dev/keiko-cli/dist/support.d.ts +0 -18
- package/node_modules/@oscharko-dev/keiko-cli/dist/support.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/support.js +118 -1276
- 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.d.ts.map +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 +326 -106
- 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 +534 -97
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-label-policy.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-label-policy.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-label-policy.js +123 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts +29497 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-operations.generated.js +32895 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts +8749 -31976
- 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 +3997 -29458
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts +155 -0
- 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 +40 -15
- package/node_modules/@oscharko-dev/keiko-contracts/dist/citation-markers.d.ts +49 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/citation-markers.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/citation-markers.js +380 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/client-defect-signature.d.ts +12 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/client-defect-signature.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/client-defect-signature.js +63 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-repository-search.d.ts +24 -5
- 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 +16 -5
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-context.d.ts +12 -6
- 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 +171 -100
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-search-abstention.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-search-abstention.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-search-abstention.js +14 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering-compaction-validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering-compaction-validation.js +34 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering-validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering-validation.js +8 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.d.ts +24 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.js +20 -6
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts +131 -4
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.js +573 -11
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-agent.d.ts +17 -12
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-agent.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-agent.js +76 -36
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-m7.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-m7.js +24 -10
- package/node_modules/@oscharko-dev/keiko-contracts/dist/evidence.d.ts +4 -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 +35 -6
- package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.js +50 -8
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository.js +13 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/grounded-assessment.d.ts +27 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/grounded-assessment.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/grounded-assessment.js +85 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +4 -4
- 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 +15 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/no-evidence-answer.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/no-evidence-answer.js +359 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.d.ts +26 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.js +109 -6
- package/node_modules/@oscharko-dev/keiko-contracts/dist/store-fingerprint.d.ts +5 -6
- package/node_modules/@oscharko-dev/keiko-contracts/dist/store-fingerprint.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/store-fingerprint.js +16 -16
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-incident.d.ts +33 -17
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-incident.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-incident.js +230 -26
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report-json.d.ts +13 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report-json.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report-json.js +206 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report-policy.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report-policy.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report-policy.js +11 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report-producer.d.ts +26 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report-producer.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report-producer.js +107 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report.d.ts +118 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/support-report.js +63 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +6 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +71 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-contract-primitives.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-contract-primitives.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-contract-primitives.js +2 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/package.json +17 -1
- package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
- package/node_modules/@oscharko-dev/keiko-evidence/dist/compaction-evidence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/compaction-evidence.js +16 -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 +7 -4
- package/node_modules/@oscharko-dev/keiko-evidence/dist/context-assembly-redaction.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/context-assembly-redaction.js +1 -0
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts.map +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.d.ts.map +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.d.ts.map +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/citation-attacher.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/conversation/citation-attacher.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/conversation/citation-attacher.js +49 -38
- 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 +61 -25
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/conversation/types.d.ts +14 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/conversation/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-activity-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-activity-log.js +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator-activity-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator-activity-log.js +6 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.d.ts +0 -2
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.js +0 -11
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.d.ts +0 -11
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.js +9 -78
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts.map +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.d.ts.map +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/consolidate.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/consolidate.js +3 -0
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts.map +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.d.ts.map +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.d.ts.map +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/cipher.d.ts +0 -12
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/cipher.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/cipher.js +0 -32
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/db.d.ts +2 -11
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/db.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/db.js +10 -144
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/index.d.ts +1 -2
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/index.js +7 -14
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/paths.d.ts +3 -2
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/paths.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/paths.js +17 -48
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault-log.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts.map +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/capabilities.d.ts +9 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/capabilities.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/capabilities.js +24 -10
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.d.ts +1 -0
- 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 +100 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts +24 -0
- 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 +104 -34
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts +3 -3
- 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.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/model-selection.js +33 -5
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts +6 -0
- 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 +115 -19
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.js +3 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prDescription/generate.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prDescription/generate.js +4 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-admission.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/prompt-admission.js +5 -2
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/readiness-probe.d.ts +17 -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 +48 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +27 -2
- 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 +300 -65
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/types.d.ts +10 -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.d.ts.map +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.map +1 -1
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/backends.js +14 -3
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/index.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/index.js +1 -0
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/local-docker-endpoint.d.ts +16 -0
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/local-docker-endpoint.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/local-docker-endpoint.js +128 -0
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/plan.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-sandbox/dist/plan.js +25 -4
- 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 +8 -2
- 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 +15 -5
- package/node_modules/@oscharko-dev/keiko-security/dist/fs-hardening.d.ts +85 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/fs-hardening.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/fs-hardening.js +128 -3
- package/node_modules/@oscharko-dev/keiko-security/dist/redaction.d.ts +3 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/redaction.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/redaction.js +49 -14
- package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts.map +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/bounded-concurrency.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/bounded-concurrency.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/bounded-concurrency.js +84 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.d.ts +13 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.js +14 -25
- 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 +17 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-evidence.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-evidence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-evidence.js +4 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-model-call.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-model-call.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-model-call.js +29 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-model-summary.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-model-summary.js +108 -59
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-resurfacing.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-resurfacing.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-resurfacing.js +65 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-thresholds.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-thresholds.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-thresholds.js +8 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-breakdown.d.ts +25 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-breakdown.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-breakdown.js +111 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-log.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-log.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-log.js +196 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-status.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-status.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-context-status.js +316 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-continuity-log.d.ts +23 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-continuity-log.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-continuity-log.js +124 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-grounding.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-grounding.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-grounding.js +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts +9 -6
- 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 +322 -154
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-rehydration.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-rehydration.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-rehydration.js +137 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-snapshot.d.ts +41 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-snapshot.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-history-snapshot.js +193 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-diagnostics.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-diagnostics.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget-diagnostics.js +15 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget.d.ts +12 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-budget.js +107 -20
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-compaction.d.ts +13 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-compaction.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-prompt-compaction.js +163 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-scope-update-log.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-scope-update-log.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-scope-update-log.js +51 -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 +87 -29
- 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 +604 -27
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/appSessionReadAuthority.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/appSessionReadAuthority.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/appSessionReadAuthority.js +112 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingAppSessionRoutes.d.ts +4 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingAppSessionRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/codingAppSessionRoutes.js +31 -17
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionChannel.d.ts +6 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionChannel.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionChannel.js +10 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionCookie.d.ts +9 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionCookie.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionCookie.js +13 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionRegistry.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionRegistry.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-app-session/sessionRegistry.js +59 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/githubIssueReaderAuthorization.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/githubIssueReaderAuthorization.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingHistoryRoutes.js +8 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRepositorySearchHandler.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRepositorySearchHandler.js +85 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts +5 -0
- 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/opencodeLaunchProfile.d.ts +1 -1
- 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 +6 -4
- 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 +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionWorkspaceHeadReader.js +23 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts +1 -1
- 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 +31 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.d.ts +6 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-compaction.js +181 -52
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-gateway.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-gateway.js +5 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +27 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +128 -20
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +15 -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 +102 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentAuthorityRegistry.d.ts +1 -3
- 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 +5 -94
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentProducerRoute.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentProducerRoute.js +1 -0
- 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 +50 -57
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentSessionRegistry.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentSessionRegistry.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/agentSessionRegistry.js +81 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/bufferSafetyEvidence.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/bufferSafetyEvidence.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/bufferSafetyEvidence.js +35 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/verificationExecution.d.ts +1 -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 +29 -8
- 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 +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/watch/workspaceWatchEvidence.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/watch/workspaceWatchEvidence.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/watch/workspaceWatchEvidence.js +75 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/watch/workspaceWatchRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/watch/workspaceWatchRoutes.js +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/watch/workspaceWatchService.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/watch/workspaceWatchService.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/watch/workspaceWatchService.js +230 -34
- package/node_modules/@oscharko-dev/keiko-server/dist/files-deny.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/files-deny.js +3 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/files.d.ts +2 -25
- package/node_modules/@oscharko-dev/keiko-server/dist/files.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/files.js +76 -35
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-context-window.d.ts +56 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-context-window.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-context-window.js +432 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-discovery-log.d.ts +15 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-discovery-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-discovery-log.js +59 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-instance-cache.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-instance-cache.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-instance-cache.js +16 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts +18 -1
- 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 +319 -46
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-reranker-probe.d.ts +16 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-reranker-probe.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-reranker-probe.js +30 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts +24 -3
- 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 +985 -229
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-spend-budget.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-spend-budget.js +6 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.d.ts +1 -1
- 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 +5 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitChangeRoutes.js +30 -11
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/ciObservationService.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/ciObservationService.js +17 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitDraftQuality.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitDraftQuality.js +5 -2
- 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 +4 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/journeyObservationService.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/journeyObservationService.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/journeyRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/journeyRoutes.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionProjection.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/prDescriptionProjection.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.js +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRepositoryRoutes.d.ts +5 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRepositoryRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRepositoryRoutes.js +68 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.js +57 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-answer.d.ts +2 -0
- 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 +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-log.d.ts +39 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-log.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-citation-log.js +196 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-context-diagnostics.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-context-diagnostics.js +25 -11
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-context-pack-reranker.d.ts +2 -2
- 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 +35 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-conversation-continuity.d.ts +18 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-conversation-continuity.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-conversation-continuity.js +175 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-directory-iteration.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-directory-iteration.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-directory-iteration.js +60 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-document-evidence.d.ts +1 -1
- 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 +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-stage.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-stage.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-stage.js +61 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-evidence-selection.d.ts +11 -2
- 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 +78 -52
- 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 +33 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-faithfulness.d.ts +37 -6
- 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 +444 -101
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-metadata-retention.d.ts +34 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-metadata-retention.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-metadata-retention.js +123 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-multi-source-budget.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-multi-source-budget.js +6 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.d.ts +24 -3
- 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 +2338 -629
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-overview-fallback.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-overview-fallback.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-overview-fallback.js +81 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-pack-validation.d.ts +22 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-pack-validation.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-pack-validation.js +87 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt-context.d.ts +19 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt-context.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-prompt-context.js +33 -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 +11 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts +18 -2
- 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 +351 -164
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts +15 -3
- 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 +242 -88
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts +29 -4
- 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 +463 -122
- 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 +16 -14
- 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 +36 -2
- 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 +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-scope-context.d.ts +32 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-scope-context.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-scope-context.js +75 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-symbol-diagnostics.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-symbol-diagnostics.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-symbol-diagnostics.js +109 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-symbol-trace.d.ts +3 -3
- 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 +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/index.d.ts +1 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/index.js +8 -13
- package/node_modules/@oscharko-dev/keiko-server/dist/knowledge-prompt-window.d.ts +44 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/knowledge-prompt-window.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/knowledge-prompt-window.js +136 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts +2 -1
- 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 +232 -66
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.js +19 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-consolidation-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-consolidation-handlers.js +11 -9
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-conv-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-conv-handlers.js +11 -9
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-handlers.js +43 -32
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.js +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaSnapshotBuilder.js +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/handoffRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/handoffRoutes.js +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelPolicyRoutes.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelPolicyRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelPolicyRoutes.js +36 -14
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.js +4 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/routes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/routes.js +11 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/chat-grounding-scope-identity.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/chat-grounding-scope-identity.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/chat-grounding-scope-identity.js +21 -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 +19 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistoryIsolation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistoryIsolation.js +8 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts +0 -13
- package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/db.js +31 -130
- package/node_modules/@oscharko-dev/keiko-server/dist/store/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/legacySchemaTestFixture.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/legacySchemaTestFixture.js +10 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.js +53 -82
- package/node_modules/@oscharko-dev/keiko-server/dist/store/paths.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/paths.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/paths.js +26 -42
- 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 +30 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.js +141 -14
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-download.d.ts +13 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-download.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-download.js +239 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-evidence.d.ts +19 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-evidence.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-evidence.js +347 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-job.d.ts +31 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-job.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-job.js +169 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-routes.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-routes.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-routes.js +152 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-worker.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-worker.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/support-report-worker.js +43 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/local-checkout.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/local-checkout.js +37 -4
- 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 +8 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolSettlement.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolSettlement.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolSettlement.js +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-registry.d.ts +1 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-registry.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/update-preflight-registry.js +3 -35
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-speech-text.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-speech-text.js +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/workspace-root-denial-log.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/workspace-root-denial-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/workspace-root-denial-log.js +76 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/workspace-state-handlers.d.ts +3 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/workspace-state-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/workspace-state-handlers.js +3 -100
- package/node_modules/@oscharko-dev/keiko-server/package.json +23 -23
- 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 +3 -1
- 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 +36 -5
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts.map +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/orchestrator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-verification/dist/orchestrator.js +3 -1
- package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-workflows/dist/context-budget/index.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/context-budget/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/context-budget/index.js +2 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/context-budget/rehydration.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/context-budget/rehydration.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/context-budget/rehydration.js +2 -2
- package/node_modules/@oscharko-dev/keiko-workflows/dist/context-budget/structured-digest.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/context-budget/structured-digest.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/context-budget/structured-digest.js +91 -27
- package/node_modules/@oscharko-dev/keiko-workflows/dist/contextpack/assemble.d.ts +10 -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 +327 -45
- package/node_modules/@oscharko-dev/keiko-workflows/dist/contextpack/compaction.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/contextpack/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/contextpack/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/contextpack/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/anchors.d.ts +4 -0
- 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 +83 -32
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/governor.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/index.d.ts +2 -2
- 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 -1
- 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 +40 -3
- package/node_modules/@oscharko-dev/keiko-workflows/dist/planner/plan.d.ts +14 -1
- 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 +209 -68
- package/node_modules/@oscharko-dev/keiko-workflows/dist/ranking/filter.d.ts +2 -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 +8 -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 +7 -60
- package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
- package/node_modules/@oscharko-dev/keiko-workspace/dist/_memfs.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/_memfs.js +7 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/binaryDetect.d.ts +5 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/binaryDetect.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/binaryDetect.js +159 -38
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligence.js +2 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligenceSurface.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligenceSurface.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codeIntelligenceSurface.js +2 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codingRepositorySearch.d.ts +5 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codingRepositorySearch.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codingRepositorySearch.js +140 -57
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codingRepositorySearchResult.d.ts +1 -4
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codingRepositorySearchResult.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codingRepositorySearchResult.js +0 -15
- package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.d.ts +14 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/discovery.js +235 -10
- package/node_modules/@oscharko-dev/keiko-workspace/dist/fs.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/fs.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/fs.js +48 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/ignore.js +2 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/importGraphEdges.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/index.d.ts +3 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/index.js +3 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.d.ts +31 -3
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearch.js +459 -137
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchEntries.d.ts +8 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchEntries.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchEntries.js +29 -24
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchExcerptWindow.d.ts +16 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchExcerptWindow.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchExcerptWindow.js +189 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchLineSelection.d.ts +3 -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 +45 -18
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchMatchers.d.ts +5 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchMatchers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchMatchers.js +89 -30
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchPolicy.d.ts +21 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchPolicy.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchPolicy.js +29 -5
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchRetention.d.ts +15 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchRetention.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchRetention.js +70 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.d.ts +14 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchScan.js +178 -45
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchSemantic.d.ts +14 -2
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchSemantic.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchSemantic.js +63 -5
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchSourceInspection.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchSourceInspection.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchSourceInspection.js +37 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchStream.d.ts +30 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchStream.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/repoSearchStream.js +466 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralAdapterRequestContext.d.ts +6 -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 +32 -6
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralAdapters.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralExecution.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralExecution.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/structuralExecution.js +60 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/testSourcePairing.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/testing.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/testing.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/testing.js +4 -0
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts.map +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 +2 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndex.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/workspaceIndex.js +8 -1
- package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
- package/package.json +40 -33
- package/release-impact.catalog.json +198 -23
- package/scripts/lib/local-state-audit.mjs +26 -11
- 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-connectors-1.1.12.tgz → oscharko-dev-keiko-connectors-1.2.0.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-contracts-1.2.0.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-evaluations-1.1.12.tgz → oscharko-dev-keiko-evaluations-1.2.0.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-evidence-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-git-1.2.0.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-harness-1.1.12.tgz → oscharko-dev-keiko-harness-1.2.0.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-local-knowledge-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-capture-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-consolidation-1.2.0.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-memory-governance-1.1.12.tgz → oscharko-dev-keiko-memory-governance-1.2.0.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-memory-retrieval-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-vault-1.2.0.tgz +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-1.2.0.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-quality-intelligence-1.1.12.tgz → oscharko-dev-keiko-quality-intelligence-1.2.0.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-sandbox-1.2.0.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-sdk-1.1.12.tgz → oscharko-dev-keiko-sdk-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/chunks/000t9p2ysi3dv.css +0 -1
- package/dist/ui/static/_next/static/chunks/00dd_gyzi9unw.js +0 -1
- package/dist/ui/static/_next/static/chunks/00n029ow-5_tt.js +0 -3
- package/dist/ui/static/_next/static/chunks/06yzmh78cidsr.js +0 -1
- package/dist/ui/static/_next/static/chunks/08kdz_q929mef.js +0 -1
- package/dist/ui/static/_next/static/chunks/0_7ry-vzqryfq.js +0 -1
- package/dist/ui/static/_next/static/chunks/0_p1naz51ki9i.js +0 -1
- package/dist/ui/static/_next/static/chunks/0cksy9u2ysiuy.js +0 -1
- package/dist/ui/static/_next/static/chunks/0elflgy2cg1jb.js +0 -1
- package/dist/ui/static/_next/static/chunks/0k931k8qwqyft.js +0 -1
- package/dist/ui/static/_next/static/chunks/0kmepj4rmkj19.js +0 -1
- package/dist/ui/static/_next/static/chunks/0l46-80gche_i.js +0 -1
- package/dist/ui/static/_next/static/chunks/0mkhgmj9-jvu-.js +0 -1
- package/dist/ui/static/_next/static/chunks/0ojvvjnsf38bk.js +0 -1
- package/dist/ui/static/_next/static/chunks/0qt-w4yzb50ov.js +0 -1
- package/dist/ui/static/_next/static/chunks/0v9jkxfma7fks.js +0 -1
- package/dist/ui/static/_next/static/chunks/0z5be09yla9lp.js +0 -1
- package/dist/ui/static/_next/static/chunks/115f9zt0f5hm4.js +0 -1
- package/dist/ui/static/_next/static/chunks/117xhn896fsmt.js +0 -1
- package/dist/ui/static/_next/static/chunks/14rs31u4u36yy.js +0 -1
- package/dist/ui/static/_next/static/chunks/159szpr5ffygs.js +0 -1
- package/dist/ui/static/_next/static/chunks/15orau2hhjb1f.js +0 -1
- package/dist/ui/static/_next/static/chunks/1b7ig6f2t71i_.js +0 -1
- package/dist/ui/static/_next/static/chunks/1be0-x1mk56wu.js +0 -1
- package/dist/ui/static/_next/static/chunks/1cjmlpaxzl17x.js +0 -1
- package/dist/ui/static/_next/static/chunks/1cluynrv3wmyz.js +0 -1
- package/dist/ui/static/_next/static/chunks/1dwc7p2rl-hs6.js +0 -1
- package/dist/ui/static/_next/static/chunks/1hk335vrug1rc.js +0 -1
- package/dist/ui/static/_next/static/chunks/1hnficrb11m9x.js +0 -1
- package/dist/ui/static/_next/static/chunks/1jfpuw9-h8iaq.js +0 -1
- package/dist/ui/static/_next/static/chunks/1kxhf3ld28pzk.js +0 -1
- package/dist/ui/static/_next/static/chunks/1lrj3d157kay1.js +0 -5
- package/dist/ui/static/_next/static/chunks/1nie2fvj8iyvq.js +0 -1
- package/dist/ui/static/_next/static/chunks/1oe16odh9-wem.js +0 -1
- package/dist/ui/static/_next/static/chunks/1pnysuel-a2r1.js +0 -1
- package/dist/ui/static/_next/static/chunks/1rrylkj4wfhla.js +0 -1
- package/dist/ui/static/_next/static/chunks/1uetvnnpa5z22.js +0 -1
- package/dist/ui/static/_next/static/chunks/1uigiy7xdzirs.js +0 -1
- package/dist/ui/static/_next/static/chunks/1uulmf99vtuyt.js +0 -1
- package/dist/ui/static/_next/static/chunks/1uxrq3q9n5v4y.js +0 -1
- package/dist/ui/static/_next/static/chunks/1x5aw_ayly-sh.js +0 -1
- package/dist/ui/static/_next/static/chunks/1xzxhtenb7_sx.css +0 -1
- package/dist/ui/static/_next/static/chunks/1yiiigw5l63v1.js +0 -36
- package/dist/ui/static/_next/static/chunks/2-h3ow6f6ywtk.js +0 -1
- package/dist/ui/static/_next/static/chunks/202kx3p8axlmr.js +0 -1
- package/dist/ui/static/_next/static/chunks/20b456jf1ggzu.css +0 -1
- package/dist/ui/static/_next/static/chunks/22tu2ta5xr5wj.js +0 -1
- package/dist/ui/static/_next/static/chunks/22x3pxeia7hk_.js +0 -1
- package/dist/ui/static/_next/static/chunks/22yars17p-i_a.js +0 -1
- package/dist/ui/static/_next/static/chunks/233j_pai87f3k.js +0 -2
- package/dist/ui/static/_next/static/chunks/252wybdcea74g.js +0 -1
- package/dist/ui/static/_next/static/chunks/25lgzefdnbdh6.js +0 -1
- package/dist/ui/static/_next/static/chunks/27490erridyaz.js +0 -1
- package/dist/ui/static/_next/static/chunks/2_o61-akoq549.js +0 -1
- package/dist/ui/static/_next/static/chunks/2b78j2josay3e.js +0 -1
- package/dist/ui/static/_next/static/chunks/2e4prtd3wmn0a.js +0 -1
- package/dist/ui/static/_next/static/chunks/2iatd917svh3o.js +0 -1
- package/dist/ui/static/_next/static/chunks/2iehfums033xv.css +0 -3
- package/dist/ui/static/_next/static/chunks/2j16o4ghz4iqx.js +0 -1
- package/dist/ui/static/_next/static/chunks/2oxvgl3qb19wf.js +0 -1
- package/dist/ui/static/_next/static/chunks/2s9-91g2jic6u.js +0 -1
- package/dist/ui/static/_next/static/chunks/2tcon4aj5dc5t.js +0 -1
- package/dist/ui/static/_next/static/chunks/2uewj5n3jrohk.js +0 -1
- package/dist/ui/static/_next/static/chunks/2vcovdwo6s3-l.js +0 -1
- package/dist/ui/static/_next/static/chunks/2wtsqscjch4bx.js +0 -1
- package/dist/ui/static/_next/static/chunks/2xpud5k1hwfvf.js +0 -1
- package/dist/ui/static/_next/static/chunks/2ywqac8g8us1n.css +0 -1
- package/dist/ui/static/_next/static/chunks/306ima8lxo17-.js +0 -1
- package/dist/ui/static/_next/static/chunks/32tief1094icq.js +0 -1
- package/dist/ui/static/_next/static/chunks/351uy__m9eafa.js +0 -1
- package/dist/ui/static/_next/static/chunks/365nk-5mmf_8c.js +0 -1
- package/dist/ui/static/_next/static/chunks/36afhcug0i5mm.js +0 -1
- package/dist/ui/static/_next/static/chunks/36t-jmpwnypy0.js +0 -1
- package/dist/ui/static/_next/static/chunks/37f_o8ne61ty2.js +0 -1
- package/dist/ui/static/_next/static/chunks/37mtn-h7j8ygx.js +0 -1
- package/dist/ui/static/_next/static/chunks/3_cgafsc6hy1_.js +0 -1
- package/dist/ui/static/_next/static/chunks/3_exo95bp9tt2.js +0 -1
- package/dist/ui/static/_next/static/chunks/3_rof9w-g14_v.js +0 -3
- package/dist/ui/static/_next/static/chunks/3_u5w33et675r.js +0 -1
- package/dist/ui/static/_next/static/chunks/3aizxizjzdddj.js +0 -1
- package/dist/ui/static/_next/static/chunks/3aqtjd-a1ygis.js +0 -1
- package/dist/ui/static/_next/static/chunks/3bl12pe7lsanc.js +0 -1
- package/dist/ui/static/_next/static/chunks/3f6svr_pokw6j.js +0 -1
- package/dist/ui/static/_next/static/chunks/3hft62celuigp.js +0 -1
- package/dist/ui/static/_next/static/chunks/3ibevys2o09xx.js +0 -1
- package/dist/ui/static/_next/static/chunks/3iv5llh4xg-7v.js +0 -1
- package/dist/ui/static/_next/static/chunks/3jtbes4v4ouyw.js +0 -1
- package/dist/ui/static/_next/static/chunks/3lq5zd1qvhcfw.js +0 -1
- package/dist/ui/static/_next/static/chunks/3n4gsbv-im5ia.js +0 -1
- package/dist/ui/static/_next/static/chunks/3r4fz572q3l7s.js +0 -1
- package/dist/ui/static/_next/static/chunks/3uovpxgynmdkk.js +0 -1
- package/dist/ui/static/_next/static/chunks/3vnb2msty1ab4.js +0 -1
- package/dist/ui/static/_next/static/chunks/3yqrxwndy9_f3.js +0 -1
- package/dist/ui/static/_next/static/chunks/3zd1y0ze7hnsy.js +0 -1
- package/dist/ui/static/_next/static/chunks/40g2_9ovqiuiu.js +0 -1
- package/dist/ui/static/_next/static/chunks/412pf48_r8im3.js +0 -1
- package/dist/ui/static/_next/static/chunks/413lmui4la1xe.js +0 -1
- package/dist/ui/static/_next/static/chunks/41ca6l5ikqt65.js +0 -1
- package/dist/ui/static/_next/static/chunks/434km55nqikg-.js +0 -7
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-selective-export.d.ts +0 -29
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-selective-export.d.ts.map +0 -1
- package/node_modules/@oscharko-dev/keiko-activity-log/dist/reader/support-selective-export.js +0 -30
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaConcurrency.d.ts +0 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaConcurrency.d.ts.map +0 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/figmaConcurrency.js +0 -34
- package/node_modules/@oscharko-dev/keiko-server/dist/store-fingerprints.d.ts +0 -29
- package/node_modules/@oscharko-dev/keiko-server/dist/store-fingerprints.d.ts.map +0 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store-fingerprints.js +0 -135
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codingRepositorySearchInventory.d.ts +0 -7
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codingRepositorySearchInventory.d.ts.map +0 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/codingRepositorySearchInventory.js +0 -24
- package/vendor/oscharko-dev-keiko-activity-log-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-cli-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-contracts-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-evidence-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-git-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-local-knowledge-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-capture-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-consolidation-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-retrieval-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-vault-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-sandbox-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-security-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-server-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-tool-catalog-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-tools-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-verification-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-workflows-1.1.12.tgz +0 -0
- package/vendor/oscharko-dev-keiko-workspace-1.1.12.tgz +0 -0
- /package/dist/ui/static/_next/static/{__kGQcCW6ht5xSodXZZBj → LNCY1B2FJBOe2AHFXpzB-}/_buildManifest.js +0 -0
- /package/dist/ui/static/_next/static/{__kGQcCW6ht5xSodXZZBj → LNCY1B2FJBOe2AHFXpzB-}/_clientMiddlewareManifest.js +0 -0
- /package/dist/ui/static/_next/static/{__kGQcCW6ht5xSodXZZBj → LNCY1B2FJBOe2AHFXpzB-}/_ssgManifest.js +0 -0
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { logAliasIntersection } from "./gateway-discovery-log.js";
|
|
1
|
+
import { logAliasIntersection, logRerankerSetupResolution, } from "./gateway-discovery-log.js";
|
|
2
2
|
import { gatewaySpendBudgetForEnv, reserveGatewaySpendForAttempt } from "./gateway-spend-budget.js";
|
|
3
3
|
// First-run gateway setup for non-technical UI users. The browser provides a base URL, API token,
|
|
4
4
|
// and optionally a Figma PAT; the loopback BFF builds the local provider config, performs a real
|
|
5
5
|
// chat-completions smoke call, stores the resulting config on disk with private permissions, and
|
|
6
6
|
// updates the in-memory runtime config without exposing credentials back to the browser.
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
|
+
import { causeChain, keikoStackFrames } from "@oscharko-dev/keiko-activity-log";
|
|
9
|
+
import { createRequestCancellation } from "./request-cancellation.js";
|
|
8
10
|
import { existsSync, readFileSync } from "node:fs";
|
|
9
11
|
import { resolveEvidenceDir } from "@oscharko-dev/keiko-evidence";
|
|
10
12
|
import { apiKeyHeaderValue, ConfigInvalidError, DEFAULT_API_KEY_HEADER_NAME, ERROR_CODES, Gateway, GATEWAY_CONFIG_SCHEMA_VERSION, createDefaultChatCapability, createDefaultEmbeddingCapability, findConfiguredCapability, GatewayError, MODEL_REASONING_EFFORTS, isLikelyEmbeddingModelId, isVoiceCapability, isCompleteRealtimeVoiceCapability, listConfiguredCapabilities, loadConfigFromFile, modelSupportsRealtimeVoice, modelSupportsSpeechInput, modelSupportsSpeechOutput, normalizeApiKeyHeaderName, parseGatewayConfig, requestOpenAIEmbedding, selectRealtimeVoiceModel, selectSpeechOutputModel, selectSpeechToTextModel, toSafeObject, validateBaseUrl, PROVIDER_ENDPOINT_STYLES, REALTIME_AUTH_MODES, toolCallingConfigurationFingerprint, VOICE_PROVIDER_LOCALITIES,
|
|
11
13
|
// KEIKO-0572: shared circuitBreaker defaults; hoisted into this import block instead of the
|
|
12
14
|
// separate `import { DEFAULT_CIRCUIT_BREAKER_CONFIG } from ...` line Sonar S3863 flagged.
|
|
13
15
|
DEFAULT_CIRCUIT_BREAKER_CONFIG, } from "@oscharko-dev/keiko-model-gateway";
|
|
14
|
-
import { boundedUnsupportedReason, isChatCompatibleDeclaredMode, modelKindForDeclaredMode, } from "@oscharko-dev/keiko-contracts/runtime/gateway";
|
|
16
|
+
import { boundedUnsupportedReason, isChatCompatibleDeclaredMode, isLikelyRerankModelId, modelKindForDeclaredMode, } from "@oscharko-dev/keiko-contracts/runtime/gateway";
|
|
15
17
|
import { GATEWAY_SETUP_AUDIT_SCHEMA_VERSION, validateGatewaySetupAuditRecord, } from "@oscharko-dev/keiko-contracts/runtime/gateway-setup-audit";
|
|
16
18
|
import { activityLogEvent, defineActivityLogOperation, } from "@oscharko-dev/keiko-contracts/runtime/observability";
|
|
17
19
|
import { classifyOutboundHost, gatewayFetch, readJsonCapped, } from "@oscharko-dev/keiko-model-gateway/internal/http";
|
|
@@ -27,6 +29,7 @@ import { buildQiJudgePreflightRequest, tryParseJudgeVerdict, } from "./qualityIn
|
|
|
27
29
|
import { persistSealedGatewayConfig } from "./credentialPersistence.js";
|
|
28
30
|
import { bindSecurityLogCorrelation } from "@oscharko-dev/keiko-security";
|
|
29
31
|
import { probeGatewayToolCalling, transientGatewayStatus } from "./gateway-tool-calling-probe.js";
|
|
32
|
+
import { requestRerankerProbe, rerankerProbePassed } from "./gateway-reranker-probe.js";
|
|
30
33
|
const MODEL_REASONING_EFFORT_SET = new Set(MODEL_REASONING_EFFORTS);
|
|
31
34
|
function isModelReasoningEffort(value) {
|
|
32
35
|
return MODEL_REASONING_EFFORT_SET.has(value);
|
|
@@ -49,6 +52,8 @@ const MISTRAL_TOOL_CALLING_LIMITATION = "Tool calling is disabled by default for
|
|
|
49
52
|
// exact value instead of restating it (Issue #144 precedent — see `MAX_DISCOVERED_MODELS`).
|
|
50
53
|
export const DISCOVERED_MODEL_SMOKE_TIMEOUT_MS = 120_000;
|
|
51
54
|
const DEPLOYMENT_SMOKE_TIMEOUT_MS = 30_000;
|
|
55
|
+
const DISCOVERY_TIMEOUT_MS = 30_000;
|
|
56
|
+
const DISCOVERY_FALLBACK_RESERVE_MS = 5_000;
|
|
52
57
|
// The whole discovery smoke ROUND's own patience budget — distinct from the per-candidate ceiling
|
|
53
58
|
// above. Past this deadline no further candidate probe is even started: the remaining candidates
|
|
54
59
|
// are retained unverified without being called, so a large discovery batch of temporarily-transient
|
|
@@ -109,6 +114,97 @@ const GATEWAY_VOICE_SETUP_OPERATION = defineActivityLogOperation({
|
|
|
109
114
|
proofIds: ["gateway.voice.setup.resolved.line"],
|
|
110
115
|
releaseImpact: "minor",
|
|
111
116
|
});
|
|
117
|
+
const DISCOVERY_ROUTE_OUTCOME_FIELD = {
|
|
118
|
+
type: "string",
|
|
119
|
+
dataClass: "closed-enum",
|
|
120
|
+
required: true,
|
|
121
|
+
values: [
|
|
122
|
+
"not-attempted",
|
|
123
|
+
"available",
|
|
124
|
+
"timeout",
|
|
125
|
+
"http-error",
|
|
126
|
+
"unusable",
|
|
127
|
+
"transport-error",
|
|
128
|
+
"cancelled",
|
|
129
|
+
"failed",
|
|
130
|
+
],
|
|
131
|
+
};
|
|
132
|
+
function createSetupDiscoveryTrace() {
|
|
133
|
+
return {
|
|
134
|
+
discoverySource: "custom",
|
|
135
|
+
modelInfoOutcome: "not-attempted",
|
|
136
|
+
modelGroupInfoOutcome: "not-attempted",
|
|
137
|
+
modelListOutcome: "not-attempted",
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
const GATEWAY_SETUP_METADATA_OPERATION = defineActivityLogOperation({
|
|
141
|
+
contractKind: "activity-log-operation",
|
|
142
|
+
schemaVersion: 1,
|
|
143
|
+
op: "gateway.setup.metadata.resolved",
|
|
144
|
+
category: "gateway",
|
|
145
|
+
owner: "keiko-server",
|
|
146
|
+
emitter: "gateway-setup.logSetupMetadataOutcome",
|
|
147
|
+
fields: {
|
|
148
|
+
outcome: {
|
|
149
|
+
type: "string",
|
|
150
|
+
dataClass: "closed-enum",
|
|
151
|
+
required: true,
|
|
152
|
+
values: ["available", "unavailable", "cancelled", "failed"],
|
|
153
|
+
},
|
|
154
|
+
discoverySource: {
|
|
155
|
+
type: "string",
|
|
156
|
+
dataClass: "closed-enum",
|
|
157
|
+
required: true,
|
|
158
|
+
values: ["custom", "model-info", "model-group-info", "model-list"],
|
|
159
|
+
},
|
|
160
|
+
modelInfoOutcome: DISCOVERY_ROUTE_OUTCOME_FIELD,
|
|
161
|
+
modelGroupInfoOutcome: DISCOVERY_ROUTE_OUTCOME_FIELD,
|
|
162
|
+
modelListOutcome: DISCOVERY_ROUTE_OUTCOME_FIELD,
|
|
163
|
+
elapsedMs: { type: "integer", dataClass: "duration", required: true },
|
|
164
|
+
selectedModelCount: { type: "integer", dataClass: "count", required: false },
|
|
165
|
+
metadataEnrichedModelCount: { type: "integer", dataClass: "count", required: false },
|
|
166
|
+
roleMismatchModelCount: { type: "integer", dataClass: "count", required: false },
|
|
167
|
+
notDiscoveredModelCount: { type: "integer", dataClass: "count", required: false },
|
|
168
|
+
httpStatus: { type: "integer", dataClass: "count", required: false },
|
|
169
|
+
frames: {
|
|
170
|
+
type: "string-array",
|
|
171
|
+
dataClass: "safe-platform-class",
|
|
172
|
+
required: false,
|
|
173
|
+
maxItems: 8,
|
|
174
|
+
maxLength: 512,
|
|
175
|
+
},
|
|
176
|
+
causeChain: {
|
|
177
|
+
type: "string-array",
|
|
178
|
+
dataClass: "error-kind",
|
|
179
|
+
required: false,
|
|
180
|
+
maxItems: 5,
|
|
181
|
+
maxLength: 128,
|
|
182
|
+
},
|
|
183
|
+
completeness: { type: "string", dataClass: "completeness-state", required: true },
|
|
184
|
+
loss: { type: "string", dataClass: "loss-state", required: true },
|
|
185
|
+
},
|
|
186
|
+
causal: "correlation",
|
|
187
|
+
lifecycle: "state",
|
|
188
|
+
analyzerProjection: "timeline",
|
|
189
|
+
failureClasses: ["gateway-setup-metadata"],
|
|
190
|
+
proofIds: ["gateway.setup.metadata.resolved.line"],
|
|
191
|
+
releaseImpact: "patch",
|
|
192
|
+
});
|
|
193
|
+
function logSetupMetadataOutcome(input, trace, startedAt, correlationId) {
|
|
194
|
+
const failure = input.outcome === "available" ? undefined : input.failure;
|
|
195
|
+
processServerLogSink().write(activityLogEvent(GATEWAY_SETUP_METADATA_OPERATION, {
|
|
196
|
+
correlationId: correlationIdOrUnknown(correlationId),
|
|
197
|
+
...(failure === undefined ? {} : { errorKind: failure.errorKind }),
|
|
198
|
+
}, {
|
|
199
|
+
outcome: input.outcome,
|
|
200
|
+
...trace,
|
|
201
|
+
elapsedMs: Math.max(0, Date.now() - startedAt),
|
|
202
|
+
completeness: "complete",
|
|
203
|
+
loss: "none",
|
|
204
|
+
...input.selectionCounts,
|
|
205
|
+
...failure?.evidence,
|
|
206
|
+
}));
|
|
207
|
+
}
|
|
112
208
|
const FIGMA_CREDENTIAL_SMOKE_TIMEOUT_MS = 15_000;
|
|
113
209
|
const FIGMA_CREDENTIAL_SMOKE_RESPONSE_BYTES = 64_000;
|
|
114
210
|
const SETUP_SMOKE_CONCURRENCY = 4;
|
|
@@ -379,6 +475,9 @@ function discoveredCapabilityFields(discovered) {
|
|
|
379
475
|
// Keiko's forced tool call. Keep it out of toolCalling: only the live probe can enable tools.
|
|
380
476
|
return {
|
|
381
477
|
...(discovered?.contextWindow === undefined ? {} : { contextWindow: discovered.contextWindow }),
|
|
478
|
+
...(discovered?.maxInputTokens === undefined
|
|
479
|
+
? {}
|
|
480
|
+
: { maxInputTokens: discovered.maxInputTokens }),
|
|
382
481
|
...(discovered?.maxOutputTokens === undefined
|
|
383
482
|
? {}
|
|
384
483
|
: { maxOutputTokens: discovered.maxOutputTokens }),
|
|
@@ -403,6 +502,16 @@ function workflowCapabilityFields(modelId, baseCapability, existing, workflowEli
|
|
|
403
502
|
preferredUseCases: codingUseCases(existing ?? baseCapability),
|
|
404
503
|
};
|
|
405
504
|
}
|
|
505
|
+
function declaresContextWindow(discovered) {
|
|
506
|
+
return discovered?.contextWindow !== undefined && discovered.contextWindowUndeclared !== true;
|
|
507
|
+
}
|
|
508
|
+
// Only declared context geometry replaces a stored optional input ceiling; a degraded list preserves it.
|
|
509
|
+
function refreshedSetupCapability(existing, discovered) {
|
|
510
|
+
if (existing === undefined || !declaresContextWindow(discovered))
|
|
511
|
+
return existing;
|
|
512
|
+
const { maxInputTokens, ...retained } = existing;
|
|
513
|
+
return retained;
|
|
514
|
+
}
|
|
406
515
|
function createDefaultSetupCapability(modelId, baseUrl, embeddingModelIds, options) {
|
|
407
516
|
const baseCapability = embeddingModelIds?.includes(modelId) === true
|
|
408
517
|
? createDefaultEmbeddingCapability(modelId)
|
|
@@ -421,9 +530,9 @@ function createDefaultSetupCapability(modelId, baseUrl, embeddingModelIds, optio
|
|
|
421
530
|
// fields (contextWindow, maxOutputTokens) belong to the wrong kind — a chat capability with an
|
|
422
531
|
// embedding's contextWindow: 0 fails config-parse under KEIKO-0520. Treat existing as absent
|
|
423
532
|
// when its kind no longer matches so the flow restarts from baseCapability's defaults.
|
|
424
|
-
const existing = rawExisting?.kind === baseCapability.kind ? rawExisting : undefined;
|
|
425
533
|
const discovered = options.modelMetadata?.[modelId];
|
|
426
|
-
const
|
|
534
|
+
const existing = refreshedSetupCapability(rawExisting?.kind === baseCapability.kind ? rawExisting : undefined, discovered);
|
|
535
|
+
const capability = withContextWindowProvenance(existing, discovered, {
|
|
427
536
|
...baseCapability,
|
|
428
537
|
// The endpoint-move restriction is PRESERVE semantics: a fresh replacement deliberately
|
|
429
538
|
// treats stored capabilities as absent, like every stored list on this route (review
|
|
@@ -436,9 +545,28 @@ function createDefaultSetupCapability(modelId, baseUrl, embeddingModelIds, optio
|
|
|
436
545
|
id: modelId,
|
|
437
546
|
kind: baseCapability.kind,
|
|
438
547
|
...workflowCapabilityFields(modelId, baseCapability, existing, options.workflowEligibleModelIds),
|
|
439
|
-
};
|
|
548
|
+
});
|
|
440
549
|
return capability;
|
|
441
550
|
}
|
|
551
|
+
/** The capability without its window provenance flags (assumed / provider-reported). */
|
|
552
|
+
export function withoutAssumedContextWindow(capability) {
|
|
553
|
+
const { contextWindowAssumed, contextWindowReported, ...measured } = capability;
|
|
554
|
+
return contextWindowAssumed === true || contextWindowReported === true ? measured : capability;
|
|
555
|
+
}
|
|
556
|
+
// A window is assumed only while nobody has stated it: a discovered declaration ends the
|
|
557
|
+
// assumption, a stored capability keeps its own provenance (a probed or provider-reported window
|
|
558
|
+
// survives a rediscovery that declares nothing), and a brand-new chat model starts assumed.
|
|
559
|
+
function withContextWindowProvenance(existing, discovered, capability) {
|
|
560
|
+
const measured = withoutAssumedContextWindow(capability);
|
|
561
|
+
if (capability.kind !== "chat" || declaresContextWindow(discovered))
|
|
562
|
+
return measured;
|
|
563
|
+
if (existing === undefined || existing.contextWindowAssumed === true) {
|
|
564
|
+
return { ...measured, contextWindowAssumed: true };
|
|
565
|
+
}
|
|
566
|
+
return existing.contextWindowReported === true
|
|
567
|
+
? { ...measured, contextWindowReported: true }
|
|
568
|
+
: measured;
|
|
569
|
+
}
|
|
442
570
|
// The generic endpoint protocol persists VERBATIM — absent fields stay absent so the runtime
|
|
443
571
|
// default layering is unchanged (#3042).
|
|
444
572
|
function genericEndpointProtocolRaw(options) {
|
|
@@ -593,9 +721,21 @@ function reasoningEffortsFromDiscoveryRecords(records) {
|
|
|
593
721
|
? [...new Set(stringListFieldFromRecords(records, fields).filter(isModelReasoningEffort))]
|
|
594
722
|
: undefined;
|
|
595
723
|
}
|
|
724
|
+
// Explicit total-window declarations are distinct from LiteLLM's prompt-input ceiling.
|
|
725
|
+
// All declarations of the same constraint intersect; replicas cannot widen a smaller bound.
|
|
726
|
+
const DECLARED_CONTEXT_WINDOW_FIELDS = [
|
|
727
|
+
"max_model_len",
|
|
728
|
+
"context_length",
|
|
729
|
+
"context_window",
|
|
730
|
+
];
|
|
731
|
+
function declaredContextWindow(records) {
|
|
732
|
+
return (numberFieldFromRecords(records, DECLARED_CONTEXT_WINDOW_FIELDS) ??
|
|
733
|
+
numberFieldFromRecords(records, ["max_input_tokens"]));
|
|
734
|
+
}
|
|
596
735
|
function metadataFromDiscoveryItem(item) {
|
|
597
736
|
const records = discoveryRecords(item);
|
|
598
|
-
const contextWindow =
|
|
737
|
+
const contextWindow = declaredContextWindow(records);
|
|
738
|
+
const maxInputTokens = numberFieldFromRecords(records, ["max_input_tokens"]);
|
|
599
739
|
const maxOutputTokens = numberFieldFromRecords(records, ["max_output_tokens", "max_tokens"]);
|
|
600
740
|
const toolCalling = optionalBooleanFieldFromRecords(records, [
|
|
601
741
|
"supports_function_calling",
|
|
@@ -609,6 +749,7 @@ function metadataFromDiscoveryItem(item) {
|
|
|
609
749
|
const chatModeDeclared = declaresChatCompatibleMode(mode);
|
|
610
750
|
return {
|
|
611
751
|
...(contextWindow === undefined ? {} : { contextWindow }),
|
|
752
|
+
...(maxInputTokens === undefined ? {} : { maxInputTokens }),
|
|
612
753
|
...(maxOutputTokens === undefined ? {} : { maxOutputTokens }),
|
|
613
754
|
...(toolCalling === undefined ? {} : { toolCalling }),
|
|
614
755
|
...(reasoningEfforts === undefined ? {} : { reasoningEfforts }),
|
|
@@ -787,6 +928,15 @@ export function rawConfigFromCurrent(config, figmaAccessToken, timeoutMs) {
|
|
|
787
928
|
...(config.grounding === undefined ? {} : { grounding: config.grounding }),
|
|
788
929
|
...(config.reranker === undefined ? {} : { reranker: config.reranker }),
|
|
789
930
|
...(figmaAccessToken === undefined ? {} : { figma: { accessToken: figmaAccessToken } }),
|
|
931
|
+
...operatorPolicyBlocks(config),
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
// Operator-declared blocks no setup step produces: they survive every rebuild verbatim, so a
|
|
935
|
+
// capability update never drops the grounded-answer policy or the PR branding (PR #3678).
|
|
936
|
+
function operatorPolicyBlocks(config) {
|
|
937
|
+
return {
|
|
938
|
+
...(config?.groundedAnswers === undefined ? {} : { groundedAnswers: config.groundedAnswers }),
|
|
939
|
+
...(config?.branding === undefined ? {} : { branding: config.branding }),
|
|
790
940
|
};
|
|
791
941
|
}
|
|
792
942
|
function rawCapabilityIsVoice(value) {
|
|
@@ -955,11 +1105,40 @@ export function isExplicitlyNonChatModel(item) {
|
|
|
955
1105
|
function isUnsupportedEntry(entry) {
|
|
956
1106
|
return entry.kind === "unsupported" && entry.reason !== undefined;
|
|
957
1107
|
}
|
|
1108
|
+
// A rerank engine is recognised and REPORTED here, never configured as chat or embedding. Setup
|
|
1109
|
+
// wires it as the retrieval reranker afterwards, and only when a live probe answers — the entry
|
|
1110
|
+
// stays in the unsupported list until then, and after it whenever the operator already owns one.
|
|
1111
|
+
function rerankDiscoveryModel(id, metadata, declared) {
|
|
1112
|
+
return {
|
|
1113
|
+
id,
|
|
1114
|
+
kind: "unsupported",
|
|
1115
|
+
...(declared ? { declaredNonChat: true } : {}),
|
|
1116
|
+
supportsImageInput: false,
|
|
1117
|
+
metadata,
|
|
1118
|
+
reason: "rerank",
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
958
1121
|
// Classification WITHOUT a declaration: the id heuristic is all a `/models`-only gateway gives us.
|
|
1122
|
+
// A name that says "reranker" is decided FIRST — "bge-reranker-v2-m3" carries the "bge" embedding
|
|
1123
|
+
// family prefix and must never be claimed as an embedding model. `capabilities.chat_completion ===
|
|
1124
|
+
// false` states what the model is NOT, which is not a role: an embedding model legitimately carries
|
|
1125
|
+
// it, so the id heuristic still decides and cannot fall through to "chat".
|
|
959
1126
|
function classifyUndeclaredDiscoveryItem(item, id, metadata) {
|
|
1127
|
+
if (isLikelyRerankModelId(id))
|
|
1128
|
+
return rerankDiscoveryModel(id, metadata, false);
|
|
960
1129
|
if (isLikelyEmbeddingModelId(id)) {
|
|
961
1130
|
return { id, kind: "embedding", supportsImageInput: false, metadata };
|
|
962
1131
|
}
|
|
1132
|
+
if (isExplicitlyNonChatModel(item)) {
|
|
1133
|
+
return {
|
|
1134
|
+
id,
|
|
1135
|
+
kind: "unsupported",
|
|
1136
|
+
supportsImageInput: false,
|
|
1137
|
+
metadata,
|
|
1138
|
+
reason: "not-chat-capable",
|
|
1139
|
+
declaredNonChat: true,
|
|
1140
|
+
};
|
|
1141
|
+
}
|
|
963
1142
|
return {
|
|
964
1143
|
id,
|
|
965
1144
|
kind: "chat",
|
|
@@ -982,52 +1161,38 @@ function classifyDiscoveryItem(item) {
|
|
|
982
1161
|
}
|
|
983
1162
|
const metadata = metadataFromDiscoveryItem(item);
|
|
984
1163
|
const declaredMode = modelModeFromDiscoveryItem(item);
|
|
985
|
-
if (declaredMode
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
declaredNonChat: true,
|
|
1000
|
-
supportsImageInput: false,
|
|
1001
|
-
metadata,
|
|
1002
|
-
reason,
|
|
1003
|
-
};
|
|
1004
|
-
}
|
|
1005
|
-
if (role === "embedding") {
|
|
1006
|
-
return { id, kind: "embedding", supportsImageInput: false, metadata };
|
|
1007
|
-
}
|
|
1164
|
+
if (declaredMode === undefined)
|
|
1165
|
+
return classifyUndeclaredDiscoveryItem(item, id, metadata);
|
|
1166
|
+
const voiceRole = voiceRoleForDeclaredMode(declaredMode);
|
|
1167
|
+
if (voiceRole !== undefined) {
|
|
1168
|
+
return { id, kind: "voice", voiceRole, supportsImageInput: false, metadata };
|
|
1169
|
+
}
|
|
1170
|
+
const role = modelKindForDeclaredMode(declaredMode);
|
|
1171
|
+
if (role === "rerank")
|
|
1172
|
+
return rerankDiscoveryModel(id, metadata, true);
|
|
1173
|
+
if (role === "unsupported") {
|
|
1174
|
+
// The reason is drawn from a CLOSED vocabulary. A declared mode is gateway-controlled text of
|
|
1175
|
+
// unbounded shape; echoing it verbatim would put foreign strings into the diagnostic channel
|
|
1176
|
+
// and the setup response, which the redaction rules forbid.
|
|
1177
|
+
const reason = boundedUnsupportedReason(declaredMode);
|
|
1008
1178
|
return {
|
|
1009
1179
|
id,
|
|
1010
|
-
kind: "
|
|
1011
|
-
|
|
1180
|
+
kind: "unsupported",
|
|
1181
|
+
declaredNonChat: true,
|
|
1182
|
+
supportsImageInput: false,
|
|
1012
1183
|
metadata,
|
|
1184
|
+
reason,
|
|
1013
1185
|
};
|
|
1014
1186
|
}
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
// exactly as before — it just cannot fall through to "chat".
|
|
1018
|
-
if (isExplicitlyNonChatModel(item)) {
|
|
1019
|
-
return isLikelyEmbeddingModelId(id)
|
|
1020
|
-
? { id, kind: "embedding", supportsImageInput: false, metadata }
|
|
1021
|
-
: {
|
|
1022
|
-
id,
|
|
1023
|
-
kind: "unsupported",
|
|
1024
|
-
supportsImageInput: false,
|
|
1025
|
-
metadata,
|
|
1026
|
-
reason: "not-chat-capable",
|
|
1027
|
-
declaredNonChat: true,
|
|
1028
|
-
};
|
|
1187
|
+
if (role === "embedding") {
|
|
1188
|
+
return { id, kind: "embedding", declaredRole: true, supportsImageInput: false, metadata };
|
|
1029
1189
|
}
|
|
1030
|
-
return
|
|
1190
|
+
return {
|
|
1191
|
+
id,
|
|
1192
|
+
kind: "chat",
|
|
1193
|
+
supportsImageInput: supportsImageInputFromDiscoveryItem(item, id),
|
|
1194
|
+
metadata,
|
|
1195
|
+
};
|
|
1031
1196
|
}
|
|
1032
1197
|
function voiceRoleForDeclaredMode(mode) {
|
|
1033
1198
|
if (mode === "audio_transcription")
|
|
@@ -1102,38 +1267,55 @@ function mergeDiscoveryDeployment(existing, incoming) {
|
|
|
1102
1267
|
return incoming;
|
|
1103
1268
|
if (existing.deploymentConflict === true)
|
|
1104
1269
|
return existing;
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
};
|
|
1112
|
-
}
|
|
1270
|
+
// Load-balanced replicas of one declared non-chat role (two `mode: "rerank"` entries of one
|
|
1271
|
+
// alias) are one engine; only an alias that MIXES roles is a conflict.
|
|
1272
|
+
if (isSameRoleUnsupportedReplica(existing, incoming))
|
|
1273
|
+
return mergedReplica(existing, incoming);
|
|
1274
|
+
if (hasDeclaredNonChatDeployment(existing, incoming))
|
|
1275
|
+
return conflictingDeployment(existing);
|
|
1113
1276
|
if (existing.kind === "unsupported")
|
|
1114
1277
|
return incoming;
|
|
1115
1278
|
if (incoming.kind === "unsupported")
|
|
1116
1279
|
return existing;
|
|
1117
1280
|
if (existing.kind !== incoming.kind || existing.voiceRole !== incoming.voiceRole) {
|
|
1118
|
-
return
|
|
1119
|
-
...existing,
|
|
1120
|
-
kind: "unsupported",
|
|
1121
|
-
deploymentConflict: true,
|
|
1122
|
-
reason: "not-chat-capable",
|
|
1123
|
-
};
|
|
1281
|
+
return conflictingDeployment(existing);
|
|
1124
1282
|
}
|
|
1283
|
+
return mergedReplica(existing, incoming);
|
|
1284
|
+
}
|
|
1285
|
+
function isSameRoleUnsupportedReplica(existing, incoming) {
|
|
1286
|
+
return (existing.kind === "unsupported" &&
|
|
1287
|
+
incoming.kind === "unsupported" &&
|
|
1288
|
+
existing.reason === incoming.reason);
|
|
1289
|
+
}
|
|
1290
|
+
function mergedReplica(existing, incoming) {
|
|
1125
1291
|
return {
|
|
1126
1292
|
...existing,
|
|
1293
|
+
...(existing.declaredNonChat === true || incoming.declaredNonChat === true
|
|
1294
|
+
? { declaredNonChat: true }
|
|
1295
|
+
: {}),
|
|
1296
|
+
// One declared replica is a declaration for the alias, whichever the gateway listed first.
|
|
1297
|
+
...(existing.declaredRole === true || incoming.declaredRole === true
|
|
1298
|
+
? { declaredRole: true }
|
|
1299
|
+
: {}),
|
|
1127
1300
|
supportsImageInput: existing.supportsImageInput && incoming.supportsImageInput,
|
|
1128
1301
|
metadata: intersectDeploymentMetadata(existing.metadata, incoming.metadata),
|
|
1129
1302
|
};
|
|
1130
1303
|
}
|
|
1304
|
+
function conflictingDeployment(existing) {
|
|
1305
|
+
return {
|
|
1306
|
+
...existing,
|
|
1307
|
+
kind: "unsupported",
|
|
1308
|
+
deploymentConflict: true,
|
|
1309
|
+
reason: "not-chat-capable",
|
|
1310
|
+
};
|
|
1311
|
+
}
|
|
1131
1312
|
function hasDeclaredNonChatDeployment(left, right) {
|
|
1132
1313
|
return left.declaredNonChat === true || right.declaredNonChat === true;
|
|
1133
1314
|
}
|
|
1134
1315
|
function intersectDeploymentMetadata(left, right) {
|
|
1135
1316
|
return {
|
|
1136
1317
|
...intersectContextWindow(left, right),
|
|
1318
|
+
...intersectInputLimit(left, right),
|
|
1137
1319
|
...commonTokenCounter(left, right),
|
|
1138
1320
|
maxOutputTokens: Math.min(left.maxOutputTokens ?? 0, right.maxOutputTokens ?? 0),
|
|
1139
1321
|
toolCalling: left.toolCalling === true && right.toolCalling === true,
|
|
@@ -1143,6 +1325,10 @@ function intersectDeploymentMetadata(left, right) {
|
|
|
1143
1325
|
: {}),
|
|
1144
1326
|
};
|
|
1145
1327
|
}
|
|
1328
|
+
function intersectInputLimit(left, right) {
|
|
1329
|
+
const limits = [left.maxInputTokens, right.maxInputTokens].filter((limit) => limit !== undefined);
|
|
1330
|
+
return limits.length === 0 ? {} : { maxInputTokens: Math.min(...limits) };
|
|
1331
|
+
}
|
|
1146
1332
|
function intersectContextWindow(left, right) {
|
|
1147
1333
|
if (left.contextWindow === undefined && right.contextWindow === undefined)
|
|
1148
1334
|
return {};
|
|
@@ -1161,9 +1347,7 @@ function discoveredModelLists(usable, boundedVoice, unsupported, wasTruncated) {
|
|
|
1161
1347
|
return {
|
|
1162
1348
|
modelIds: usable.map((entry) => entry.id),
|
|
1163
1349
|
chatModelIds: usable.filter((entry) => entry.kind === "chat").map((entry) => entry.id),
|
|
1164
|
-
embeddingModelIds: usable
|
|
1165
|
-
.filter((entry) => entry.kind === "embedding")
|
|
1166
|
-
.map((entry) => entry.id),
|
|
1350
|
+
embeddingModelIds: declaredThenIdOrder(usable.filter((entry) => entry.kind === "embedding")),
|
|
1167
1351
|
voiceSpeechInputModelIds: boundedVoice
|
|
1168
1352
|
.filter((entry) => entry.voiceRole === "speech-input")
|
|
1169
1353
|
.map((entry) => entry.id),
|
|
@@ -1176,7 +1360,7 @@ function discoveredModelLists(usable, boundedVoice, unsupported, wasTruncated) {
|
|
|
1176
1360
|
imageInputModelIds: usable
|
|
1177
1361
|
.filter((entry) => entry.kind === "chat" && entry.supportsImageInput)
|
|
1178
1362
|
.map((entry) => entry.id),
|
|
1179
|
-
modelMetadata: Object.fromEntries(usable.map((entry) => [entry.id, entry
|
|
1363
|
+
modelMetadata: Object.fromEntries(usable.map((entry) => [entry.id, discoveredMetadata(entry)])),
|
|
1180
1364
|
...(unsupported.length > 0
|
|
1181
1365
|
? {
|
|
1182
1366
|
unsupportedModels: unsupported.map((entry) => ({
|
|
@@ -1185,9 +1369,35 @@ function discoveredModelLists(usable, boundedVoice, unsupported, wasTruncated) {
|
|
|
1185
1369
|
})),
|
|
1186
1370
|
}
|
|
1187
1371
|
: {}),
|
|
1372
|
+
...rerankCandidateList(unsupported),
|
|
1188
1373
|
...(wasTruncated ? { truncated: true } : {}),
|
|
1189
1374
|
};
|
|
1190
1375
|
}
|
|
1376
|
+
// A replica set in which one deployment declared no window merges to the conservative fallback;
|
|
1377
|
+
// the metadata says so, so setup keeps that window assumed instead of treating 4,096 as declared.
|
|
1378
|
+
function discoveredMetadata(entry) {
|
|
1379
|
+
return entry.undeclaredContext === true && entry.metadata.contextWindow !== undefined
|
|
1380
|
+
? { ...entry.metadata, contextWindowUndeclared: true }
|
|
1381
|
+
: entry.metadata;
|
|
1382
|
+
}
|
|
1383
|
+
// Declared before name-inferred, then by id. Two lanes are ORDERED, not merely listed — the rerank
|
|
1384
|
+
// candidates (setup probes only the first few) and the embedding candidates (the first one becomes
|
|
1385
|
+
// the default new Knowledge Pods bind) — and neither may depend on how the gateway happens to list
|
|
1386
|
+
// its models: a restart that lists them in another order must not change what is probed or bound.
|
|
1387
|
+
// A role the gateway stated in a `mode` outranks one Keiko only inferred from the id.
|
|
1388
|
+
function declaredThenIdOrder(entries) {
|
|
1389
|
+
const declared = (entry) => Number(entry.declaredNonChat === true || entry.declaredRole === true);
|
|
1390
|
+
return [...entries]
|
|
1391
|
+
.sort((left, right) => declared(right) - declared(left) || left.id.localeCompare(right.id, "en"))
|
|
1392
|
+
.map((entry) => entry.id);
|
|
1393
|
+
}
|
|
1394
|
+
// The rerank engines among the recognised-but-unconfigured models. They are partitioned out of the
|
|
1395
|
+
// same pre-cap entry list as every other role, so a gateway listing dozens of chat aliases ahead of
|
|
1396
|
+
// its reranker cannot push the reranker out of reach.
|
|
1397
|
+
function rerankCandidateList(unsupported) {
|
|
1398
|
+
const rerankModelIds = declaredThenIdOrder(unsupported.filter((entry) => entry.reason === "rerank"));
|
|
1399
|
+
return rerankModelIds.length === 0 ? {} : { rerankModelIds };
|
|
1400
|
+
}
|
|
1191
1401
|
function assertDiscoveryYieldedUsableModels(usable, unsupported) {
|
|
1192
1402
|
if (usable.length > 0)
|
|
1193
1403
|
return;
|
|
@@ -1216,18 +1426,11 @@ export function normalizeDiscoveryPayload(payload) {
|
|
|
1216
1426
|
export function normalizeDiscoveryPayloadForSetup(payload) {
|
|
1217
1427
|
return parseModelDiscovery(payload);
|
|
1218
1428
|
}
|
|
1219
|
-
async function fetchDiscoveryJson(url, apiKey, apiKeyHeaderName, egress) {
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
headers: apiKeyHeaders(apiKey, apiKeyHeaderName),
|
|
1223
|
-
signal: AbortSignal.timeout(30_000),
|
|
1224
|
-
...(egress !== undefined ? { egress } : {}),
|
|
1225
|
-
});
|
|
1429
|
+
async function fetchDiscoveryJson(url, apiKey, apiKeyHeaderName, egress, signal = AbortSignal.timeout(DISCOVERY_TIMEOUT_MS)) {
|
|
1430
|
+
signal.throwIfAborted();
|
|
1431
|
+
const response = await fetchDiscoveryResponse(url, apiKey, apiKeyHeaderName, egress, signal);
|
|
1226
1432
|
if (!response.ok) {
|
|
1227
|
-
|
|
1228
|
-
// property; carrying it only inside the message left a 401/403 discovery — a wrong or
|
|
1229
|
-
// model-restricted proxy key — as the generic body-free 502 (LiteLLM production audit).
|
|
1230
|
-
throw Object.assign(new Error(`model discovery returned HTTP ${String(response.status)}`), {
|
|
1433
|
+
throw Object.assign(new Error("model discovery returned an error status"), {
|
|
1231
1434
|
httpStatus: response.status,
|
|
1232
1435
|
});
|
|
1233
1436
|
}
|
|
@@ -1235,7 +1438,24 @@ async function fetchDiscoveryJson(url, apiKey, apiKeyHeaderName, egress) {
|
|
|
1235
1438
|
return await readJsonCapped(response);
|
|
1236
1439
|
}
|
|
1237
1440
|
catch {
|
|
1238
|
-
|
|
1441
|
+
signal.throwIfAborted();
|
|
1442
|
+
throw discoveryTerminal("model discovery response was not readable JSON", "DISCOVERY_INVALID_RESPONSE");
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
async function fetchDiscoveryResponse(url, apiKey, apiKeyHeaderName, egress, signal) {
|
|
1446
|
+
try {
|
|
1447
|
+
return await gatewayFetch(url, {
|
|
1448
|
+
method: "GET",
|
|
1449
|
+
headers: apiKeyHeaders(apiKey, apiKeyHeaderName),
|
|
1450
|
+
signal,
|
|
1451
|
+
...(egress !== undefined ? { egress } : {}),
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
catch (cause) {
|
|
1455
|
+
signal.throwIfAborted();
|
|
1456
|
+
if (cause instanceof TypeError)
|
|
1457
|
+
throw new Error("Model metadata transport was unavailable.", { cause });
|
|
1458
|
+
throw cause;
|
|
1239
1459
|
}
|
|
1240
1460
|
}
|
|
1241
1461
|
// `/model/info` is a LiteLLM management route. Plenty of healthy deployments refuse it — an
|
|
@@ -1252,10 +1472,14 @@ function modelInfoAnswerIsUnusable(cause) {
|
|
|
1252
1472
|
return (cause?.discoveryCode ===
|
|
1253
1473
|
"DISCOVERY_ALL_ENTRIES_UNSUPPORTED");
|
|
1254
1474
|
}
|
|
1255
|
-
async function discoverLiteLlmModelInfo(baseUrl, apiKey, apiKeyHeaderName, egress, correlationId) {
|
|
1256
|
-
|
|
1475
|
+
async function discoverLiteLlmModelInfo(baseUrl, apiKey, apiKeyHeaderName, egress, correlationId, { signal, deadlineAt, trace, }) {
|
|
1476
|
+
const endpoints = modelInfoEndpointCandidates(baseUrl);
|
|
1477
|
+
for (const [index, endpoint] of endpoints.entries()) {
|
|
1478
|
+
trace.discoverySource = index === 0 ? "model-info" : "model-group-info";
|
|
1479
|
+
const outcomeKey = index === 0 ? "modelInfoOutcome" : "modelGroupInfoOutcome";
|
|
1257
1480
|
try {
|
|
1258
|
-
const discovered = parseModelDiscovery(await fetchDiscoveryJson(endpoint, apiKey, apiKeyHeaderName, egress), correlationId);
|
|
1481
|
+
const discovered = parseModelDiscovery(await fetchDiscoveryJson(endpoint, apiKey, apiKeyHeaderName, egress, discoveryManagementSignal(signal, deadlineAt, endpoints.length - index)), correlationId);
|
|
1482
|
+
trace[outcomeKey] = "available";
|
|
1259
1483
|
return {
|
|
1260
1484
|
...discovered,
|
|
1261
1485
|
modelMetadata: Object.fromEntries(discovered.modelIds.map((id) => [
|
|
@@ -1265,18 +1489,47 @@ async function discoverLiteLlmModelInfo(baseUrl, apiKey, apiKeyHeaderName, egres
|
|
|
1265
1489
|
};
|
|
1266
1490
|
}
|
|
1267
1491
|
catch (cause) {
|
|
1492
|
+
trace[outcomeKey] = discoveryRouteOutcome(cause, signal);
|
|
1493
|
+
signal.throwIfAborted();
|
|
1494
|
+
if (discoveryProgrammingFailure(cause))
|
|
1495
|
+
throw cause;
|
|
1268
1496
|
if (modelInfoAnswerIsUnusable(cause) && cause instanceof Error)
|
|
1269
1497
|
throw cause;
|
|
1270
1498
|
}
|
|
1271
1499
|
}
|
|
1272
1500
|
return undefined;
|
|
1273
1501
|
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1502
|
+
// Let the primary management route use the shared budget while retaining a short fallback window.
|
|
1503
|
+
function discoveryManagementSignal(signal, deadlineAt, routesLeft) {
|
|
1504
|
+
signal.throwIfAborted();
|
|
1505
|
+
const remaining = Math.max(1, deadlineAt - Date.now());
|
|
1506
|
+
return AbortSignal.any([
|
|
1507
|
+
signal,
|
|
1508
|
+
AbortSignal.timeout(Math.max(1, remaining - routesLeft * DISCOVERY_FALLBACK_RESERVE_MS)),
|
|
1509
|
+
]);
|
|
1510
|
+
}
|
|
1511
|
+
async function defaultGatewayModelDiscovery(baseUrl, apiKey, requestedApiKeyHeaderName, egress, correlationId, trace, callerSignal) {
|
|
1512
|
+
const apiKeyHeaderName = requestedApiKeyHeaderName ?? DEFAULT_API_KEY_HEADER_NAME;
|
|
1513
|
+
// One existing discovery budget covers the management fallbacks and model list together.
|
|
1514
|
+
const deadlineAt = Date.now() + DISCOVERY_TIMEOUT_MS;
|
|
1515
|
+
const signal = AbortSignal.any([
|
|
1516
|
+
AbortSignal.timeout(DISCOVERY_TIMEOUT_MS),
|
|
1517
|
+
...(callerSignal === undefined ? [] : [callerSignal]),
|
|
1518
|
+
]);
|
|
1519
|
+
const litellmModels = await discoverLiteLlmModelInfo(baseUrl, apiKey, apiKeyHeaderName, egress, correlationId, { signal, deadlineAt, trace });
|
|
1276
1520
|
if (litellmModels !== undefined) {
|
|
1277
1521
|
return litellmModels;
|
|
1278
1522
|
}
|
|
1279
|
-
|
|
1523
|
+
trace.discoverySource = "model-list";
|
|
1524
|
+
try {
|
|
1525
|
+
const discovered = parseModelDiscovery(await fetchDiscoveryJson(modelsEndpoint(baseUrl), apiKey, apiKeyHeaderName, egress, signal), correlationId);
|
|
1526
|
+
trace.modelListOutcome = "available";
|
|
1527
|
+
return discovered;
|
|
1528
|
+
}
|
|
1529
|
+
catch (cause) {
|
|
1530
|
+
trace.modelListOutcome = discoveryRouteOutcome(cause, signal);
|
|
1531
|
+
throw cause;
|
|
1532
|
+
}
|
|
1280
1533
|
}
|
|
1281
1534
|
function deploymentNameValues(value) {
|
|
1282
1535
|
if (typeof value === "string") {
|
|
@@ -1470,31 +1723,41 @@ function mostSevereProbeFailure(failures) {
|
|
|
1470
1723
|
}
|
|
1471
1724
|
return worst;
|
|
1472
1725
|
}
|
|
1473
|
-
async function
|
|
1474
|
-
const tested = new Array(candidates.length).fill(undefined);
|
|
1726
|
+
async function runBoundedWorkers(items, concurrency, process, signal) {
|
|
1475
1727
|
let next = 0;
|
|
1476
1728
|
async function worker() {
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1729
|
+
signal?.throwIfAborted();
|
|
1730
|
+
const index = next;
|
|
1731
|
+
next += 1;
|
|
1732
|
+
if (index >= items.length)
|
|
1733
|
+
return;
|
|
1734
|
+
const item = items[index];
|
|
1735
|
+
if (item !== undefined)
|
|
1736
|
+
await process(item, index);
|
|
1737
|
+
// Yield before recursion so sparse input cannot grow the call stack.
|
|
1738
|
+
await Promise.resolve();
|
|
1739
|
+
await worker();
|
|
1740
|
+
}
|
|
1741
|
+
const workerCount = Math.max(1, Math.min(concurrency, items.length));
|
|
1742
|
+
await Promise.all(Array.from({ length: workerCount }, () => worker()));
|
|
1743
|
+
}
|
|
1744
|
+
async function passingCandidates(candidates, probe, concurrency, failures, signal) {
|
|
1745
|
+
const tested = new Array(candidates.length).fill(undefined);
|
|
1746
|
+
async function worker(modelId, index) {
|
|
1747
|
+
try {
|
|
1748
|
+
await probe(modelId);
|
|
1749
|
+
signal?.throwIfAborted();
|
|
1750
|
+
tested[index] = modelId;
|
|
1751
|
+
}
|
|
1752
|
+
catch (error) {
|
|
1753
|
+
signal?.throwIfAborted();
|
|
1754
|
+
// Probe rejection is the documented signal that this candidate is not
|
|
1755
|
+
// chat-callable. We drop it silently so healthy peers still surface — capturing only
|
|
1756
|
+
// the classification code/status as evidence for the all-rejected aggregate.
|
|
1757
|
+
failures?.push({ code: setupErrorCode(error), httpStatus: setupHttpStatus(error) });
|
|
1494
1758
|
}
|
|
1495
1759
|
}
|
|
1496
|
-
|
|
1497
|
-
await Promise.all(Array.from({ length: workerCount }, () => worker()));
|
|
1760
|
+
await runBoundedWorkers(candidates, concurrency, worker, signal);
|
|
1498
1761
|
return tested.filter((modelId) => modelId !== undefined);
|
|
1499
1762
|
}
|
|
1500
1763
|
// The aggregate keeps the exact historic message; additionally it carries the most severe
|
|
@@ -1585,7 +1848,7 @@ function recordChatSmokeFailure(modelId, error, deps, correlationId, accumulator
|
|
|
1585
1848
|
// rules over an injected `probe`/`now`, and exercising them through the full HTTP-mocked
|
|
1586
1849
|
// `handleGatewaySetup` route would need either a real multi-minute wait or an intrusive global
|
|
1587
1850
|
// `AbortSignal.timeout`/clock stub for every scenario (PR #3602 review).
|
|
1588
|
-
export async function admitChatSmokeCandidates(candidates, probe, concurrency, deps, correlationId, now = Date.now) {
|
|
1851
|
+
export async function admitChatSmokeCandidates(candidates, probe, concurrency, deps, correlationId, now = Date.now, signal) {
|
|
1589
1852
|
const tested = new Array(candidates.length).fill(undefined);
|
|
1590
1853
|
const accumulators = {
|
|
1591
1854
|
unverifiedKept: [],
|
|
@@ -1594,30 +1857,22 @@ export async function admitChatSmokeCandidates(candidates, probe, concurrency, d
|
|
|
1594
1857
|
skippedByDeadline: [],
|
|
1595
1858
|
};
|
|
1596
1859
|
const roundDeadlineAt = now() + CHAT_SMOKE_ROUND_DEADLINE_MS;
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
const modelId = candidates[index];
|
|
1603
|
-
if (modelId === undefined)
|
|
1604
|
-
continue;
|
|
1605
|
-
if (now() >= roundDeadlineAt) {
|
|
1606
|
-
accumulators.unverifiedKept.push(modelId);
|
|
1607
|
-
accumulators.skippedByDeadline.push(modelId);
|
|
1608
|
-
continue;
|
|
1609
|
-
}
|
|
1610
|
-
try {
|
|
1611
|
-
await probe(modelId);
|
|
1612
|
-
tested[index] = modelId;
|
|
1613
|
-
}
|
|
1614
|
-
catch (error) {
|
|
1615
|
-
recordChatSmokeFailure(modelId, error, deps, correlationId, accumulators);
|
|
1616
|
-
}
|
|
1860
|
+
await runBoundedWorkers(candidates, concurrency, async (modelId, index) => {
|
|
1861
|
+
if (now() >= roundDeadlineAt) {
|
|
1862
|
+
accumulators.unverifiedKept.push(modelId);
|
|
1863
|
+
accumulators.skippedByDeadline.push(modelId);
|
|
1864
|
+
return;
|
|
1617
1865
|
}
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1866
|
+
try {
|
|
1867
|
+
await probe(modelId);
|
|
1868
|
+
signal?.throwIfAborted();
|
|
1869
|
+
tested[index] = modelId;
|
|
1870
|
+
}
|
|
1871
|
+
catch (error) {
|
|
1872
|
+
signal?.throwIfAborted();
|
|
1873
|
+
recordChatSmokeFailure(modelId, error, deps, correlationId, accumulators);
|
|
1874
|
+
}
|
|
1875
|
+
}, signal);
|
|
1621
1876
|
return {
|
|
1622
1877
|
tested: tested.filter((modelId) => modelId !== undefined),
|
|
1623
1878
|
...accumulators,
|
|
@@ -1626,19 +1881,20 @@ export async function admitChatSmokeCandidates(candidates, probe, concurrency, d
|
|
|
1626
1881
|
// The response-format and tool-calling verification rounds, run only over VERIFIED candidates
|
|
1627
1882
|
// (`chatSmoke.tested`) — extracted so `defaultGatewaySetupTester` stays under the repository's
|
|
1628
1883
|
// per-function line ceiling (AGENTS.md §6).
|
|
1629
|
-
async function verifyTestedChatCandidates(gateway, config, testedModelIds, correlationId, deps) {
|
|
1884
|
+
async function verifyTestedChatCandidates(gateway, config, testedModelIds, correlationId, deps, signal) {
|
|
1630
1885
|
const responseFormatModelIds = await passingCandidates(testedModelIds, async (modelId) => {
|
|
1631
1886
|
const response = await gateway.chat({
|
|
1632
1887
|
...buildQiJudgePreflightRequest(modelId),
|
|
1633
1888
|
logContext: { correlationId },
|
|
1889
|
+
cancellationSignal: candidateSmokeCancellationSignal(config, modelId, signal),
|
|
1634
1890
|
});
|
|
1635
1891
|
if (tryParseJudgeVerdict(response.content) === null) {
|
|
1636
1892
|
throw new Error("response format unsupported");
|
|
1637
1893
|
}
|
|
1638
|
-
}, SETUP_SMOKE_CONCURRENCY);
|
|
1894
|
+
}, SETUP_SMOKE_CONCURRENCY, undefined, signal);
|
|
1639
1895
|
// Both probe rounds independently use the endpoint-wide concurrency budget. Keep them
|
|
1640
1896
|
// sequential so setup never doubles the operator-approved in-flight request ceiling.
|
|
1641
|
-
const toolCallingObservations = await setupToolCallingObservations(config, testedModelIds, correlationId, deps);
|
|
1897
|
+
const toolCallingObservations = await setupToolCallingObservations(config, testedModelIds, correlationId, deps, signal);
|
|
1642
1898
|
return { responseFormatModelIds, toolCallingObservations };
|
|
1643
1899
|
}
|
|
1644
1900
|
// The deadline that actually bounds ONE candidate's smoke call (PR #3602 review): `Gateway.chat()`
|
|
@@ -1649,8 +1905,9 @@ async function verifyTestedChatCandidates(gateway, config, testedModelIds, corre
|
|
|
1649
1905
|
// `DEPLOYMENT_SMOKE_TIMEOUT_MS` for a manually entered deployment) rather than a hardcoded literal,
|
|
1650
1906
|
// so both smoke paths stay bounded at the timeout each already advertises; the discovery constant
|
|
1651
1907
|
// is only the defensive fallback for a candidate somehow missing its own provider entry.
|
|
1652
|
-
function candidateSmokeCancellationSignal(config, modelId) {
|
|
1653
|
-
|
|
1908
|
+
function candidateSmokeCancellationSignal(config, modelId, signal) {
|
|
1909
|
+
const deadline = AbortSignal.timeout(candidateSmokeDeadlineMs(config, modelId));
|
|
1910
|
+
return signal === undefined ? deadline : AbortSignal.any([deadline, signal]);
|
|
1654
1911
|
}
|
|
1655
1912
|
// Never below the discovery smoke floor: a manually entered deployment keeps its shorter configured
|
|
1656
1913
|
// timeout for later calls, but a setup probe that gave up at 30 s on a gateway that answers in 45 s
|
|
@@ -1662,7 +1919,7 @@ export function candidateSmokeDeadlineMs(config, modelId) {
|
|
|
1662
1919
|
// Extracted so `defaultGatewaySetupTester` stays under the repository's per-function line ceiling
|
|
1663
1920
|
// (AGENTS.md §6) — the probe itself is the one line that matters: a fixed "reply OK" chat call,
|
|
1664
1921
|
// bounded by this candidate's own smoke deadline.
|
|
1665
|
-
function chatSmokeProbe(gateway, config, correlationId) {
|
|
1922
|
+
function chatSmokeProbe(gateway, config, correlationId, signal) {
|
|
1666
1923
|
return async (modelId) => {
|
|
1667
1924
|
await gateway.chat({
|
|
1668
1925
|
modelId,
|
|
@@ -1671,11 +1928,11 @@ function chatSmokeProbe(gateway, config, correlationId) {
|
|
|
1671
1928
|
{ role: "user", content: "Reply with exactly: OK" },
|
|
1672
1929
|
],
|
|
1673
1930
|
logContext: { correlationId },
|
|
1674
|
-
cancellationSignal: candidateSmokeCancellationSignal(config, modelId),
|
|
1931
|
+
cancellationSignal: candidateSmokeCancellationSignal(config, modelId, signal),
|
|
1675
1932
|
});
|
|
1676
1933
|
};
|
|
1677
1934
|
}
|
|
1678
|
-
async function defaultGatewaySetupTester(config, candidateModelIds, correlationId, deps) {
|
|
1935
|
+
async function defaultGatewaySetupTester(config, candidateModelIds, correlationId, deps, signal) {
|
|
1679
1936
|
// Wired to the process activity log: first-run setup is where an operator's endpoint is wrong
|
|
1680
1937
|
// in a way no UI message can name (a proxy that blocks CONNECT, a provider that answers 404 for
|
|
1681
1938
|
// every model). Without the sink the smoke loop's retries and rejections are invisible.
|
|
@@ -1683,7 +1940,7 @@ async function defaultGatewaySetupTester(config, candidateModelIds, correlationI
|
|
|
1683
1940
|
log: processServerLogSink(),
|
|
1684
1941
|
spendBudget: gatewaySpendBudgetForEnv(deps.env),
|
|
1685
1942
|
});
|
|
1686
|
-
const chatSmoke = await admitChatSmokeCandidates(candidateModelIds, chatSmokeProbe(gateway, config, correlationId), SETUP_SMOKE_CONCURRENCY, deps, correlationId);
|
|
1943
|
+
const chatSmoke = await admitChatSmokeCandidates(candidateModelIds, chatSmokeProbe(gateway, config, correlationId, signal), SETUP_SMOKE_CONCURRENCY, deps, correlationId, Date.now, signal);
|
|
1687
1944
|
// Nothing was verified: the historic "no discovered model accepted the chat-completions smoke
|
|
1688
1945
|
// test" case, thrown exactly as `smokeTestCandidates` always did — even when some candidates were
|
|
1689
1946
|
// merely kept unverified rather than dropped, because `verifyAndSaveGatewaySetup`'s multi-base-URL
|
|
@@ -1695,7 +1952,7 @@ async function defaultGatewaySetupTester(config, candidateModelIds, correlationI
|
|
|
1695
1952
|
throw allProbesFailedError(chatSmoke.allFailures);
|
|
1696
1953
|
}
|
|
1697
1954
|
const testedModelIds = chatSmoke.tested;
|
|
1698
|
-
const { responseFormatModelIds, toolCallingObservations } = await verifyTestedChatCandidates(gateway, config, testedModelIds, correlationId, deps);
|
|
1955
|
+
const { responseFormatModelIds, toolCallingObservations } = await verifyTestedChatCandidates(gateway, config, testedModelIds, correlationId, deps, signal);
|
|
1699
1956
|
return {
|
|
1700
1957
|
testedModelIds,
|
|
1701
1958
|
responseFormatModelIds,
|
|
@@ -1723,44 +1980,32 @@ function unverifiedKeptToolCallingObservations(config, unverifiedKept, correlati
|
|
|
1723
1980
|
return { modelId, status: "unverified", checkedAt };
|
|
1724
1981
|
});
|
|
1725
1982
|
}
|
|
1726
|
-
async function setupToolCallingObservations(config, testedModelIds, correlationId, deps) {
|
|
1983
|
+
async function setupToolCallingObservations(config, testedModelIds, correlationId, deps, signal) {
|
|
1727
1984
|
const checkedAt = new Date().toISOString();
|
|
1728
1985
|
const observations = new Array(testedModelIds.length);
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
// line stays exactly "verified" | "unsupported" | "unverified" (PR #3602 review).
|
|
1753
|
-
const status = probeStatus === "transient" ? "unverified" : probeStatus;
|
|
1754
|
-
observations[index] = {
|
|
1755
|
-
modelId,
|
|
1756
|
-
status,
|
|
1757
|
-
checkedAt,
|
|
1758
|
-
};
|
|
1759
|
-
logToolCallingVerification(config, modelId, status, correlationId ?? UNKNOWN_CORRELATION_ID);
|
|
1760
|
-
}
|
|
1761
|
-
}
|
|
1762
|
-
const workerCount = Math.max(1, Math.min(SETUP_SMOKE_CONCURRENCY, testedModelIds.length));
|
|
1763
|
-
await Promise.all(Array.from({ length: workerCount }, () => worker()));
|
|
1986
|
+
await runBoundedWorkers(testedModelIds, SETUP_SMOKE_CONCURRENCY, async (modelId, index) => {
|
|
1987
|
+
const provider = config.providers.find((candidate) => candidate.modelId === modelId);
|
|
1988
|
+
// A model without a provider stays unverified; that conclusion takes the same log line below
|
|
1989
|
+
// as every probe result instead of being recorded silently.
|
|
1990
|
+
const probeStatus = provider === undefined
|
|
1991
|
+
? "unverified"
|
|
1992
|
+
: await probeGatewayToolCalling(config, provider, undefined, (error) => {
|
|
1993
|
+
signal?.throwIfAborted();
|
|
1994
|
+
reportSetupVerificationFailure(deps, error, correlationId, "gateway.setup.tool-calling-probe");
|
|
1995
|
+
}, {
|
|
1996
|
+
env: deps.env,
|
|
1997
|
+
capability: findConfiguredCapability(config, modelId),
|
|
1998
|
+
correlationId: correlationId ?? UNKNOWN_CORRELATION_ID,
|
|
1999
|
+
}, signal);
|
|
2000
|
+
// A `transient` probe answer (408/429/5xx-except-501, `transientGatewayStatus`) proves
|
|
2001
|
+
// nothing about the model either way and must never be stored or logged as a verdict: the
|
|
2002
|
+
// closed status vocabulary here and on the `gateway.tool-calling.verification` activity-log
|
|
2003
|
+
// line stays exactly "verified" | "unsupported" | "unverified" (PR #3602 review).
|
|
2004
|
+
signal?.throwIfAborted();
|
|
2005
|
+
const status = probeStatus === "transient" ? "unverified" : probeStatus;
|
|
2006
|
+
observations[index] = { modelId, status, checkedAt };
|
|
2007
|
+
logToolCallingVerification(config, modelId, status, correlationId ?? UNKNOWN_CORRELATION_ID);
|
|
2008
|
+
}, signal);
|
|
1764
2009
|
return observations;
|
|
1765
2010
|
}
|
|
1766
2011
|
// Field incident (LiteLLM customer, 2026-08): chat models were smoke-tested, embedding models were
|
|
@@ -1773,7 +2018,8 @@ const EMBEDDING_PROBE_INPUT = "Keiko embedding setup probe";
|
|
|
1773
2018
|
// One embedding request against the model, using the SAME endpoint protocol the provider will
|
|
1774
2019
|
// persist with — an Azure deployment path must not be probed at the OpenAI-compatible URL, or the
|
|
1775
2020
|
// probe measures a 404 that production would never see.
|
|
1776
|
-
async function embedOnceForProbe(config, provider, modelId, env, correlationId) {
|
|
2021
|
+
async function embedOnceForProbe(config, provider, modelId, env, correlationId, signal) {
|
|
2022
|
+
signal?.throwIfAborted();
|
|
1777
2023
|
const reservation = reserveGatewaySpendForAttempt(env, findConfiguredCapability(config, modelId), {
|
|
1778
2024
|
modelId,
|
|
1779
2025
|
messages: [{ role: "user", content: "Gateway embedding setup probe." }],
|
|
@@ -1792,6 +2038,7 @@ async function embedOnceForProbe(config, provider, modelId, env, correlationId)
|
|
|
1792
2038
|
modelId,
|
|
1793
2039
|
input: EMBEDDING_PROBE_INPUT,
|
|
1794
2040
|
timeoutMs: provider.timeoutMs,
|
|
2041
|
+
...(signal === undefined ? {} : { signal }),
|
|
1795
2042
|
// The probe exists because an embedding model used to be persisted on a classification alone.
|
|
1796
2043
|
// The sink is what turns a rejected probe into a line naming the status and the error kind,
|
|
1797
2044
|
// rather than a model that silently fails to make the candidate list.
|
|
@@ -1813,15 +2060,16 @@ const RETRYABLE_PROBE_KINDS = new Set([
|
|
|
1813
2060
|
// An immediate retry against a gateway that just answered 429 answers 429 again, so it would burn a
|
|
1814
2061
|
// request and change nothing. One short pause, matching the chat lane's backoff base.
|
|
1815
2062
|
const EMBEDDING_PROBE_RETRY_DELAY_MS = 500;
|
|
1816
|
-
export async function defaultGatewayEmbeddingProbe(config, candidateModelIds, env, correlationId) {
|
|
2063
|
+
export async function defaultGatewayEmbeddingProbe(config, candidateModelIds, env, correlationId, signal) {
|
|
1817
2064
|
return passingCandidates(candidateModelIds, async (modelId) => {
|
|
1818
2065
|
const provider = config.providers.find((entry) => entry.modelId === modelId);
|
|
1819
2066
|
if (provider === undefined)
|
|
1820
2067
|
throw new Error("embedding candidate has no provider entry");
|
|
1821
|
-
let outcome = await embedOnceForProbe(config, provider, modelId, env, correlationId);
|
|
2068
|
+
let outcome = await embedOnceForProbe(config, provider, modelId, env, correlationId, signal);
|
|
2069
|
+
signal?.throwIfAborted();
|
|
1822
2070
|
if (!outcome.ok && RETRYABLE_PROBE_KINDS.has(outcome.kind)) {
|
|
1823
|
-
await new Promise((resolve) => setTimeout(resolve, EMBEDDING_PROBE_RETRY_DELAY_MS));
|
|
1824
|
-
outcome = await embedOnceForProbe(config, provider, modelId, env, correlationId);
|
|
2071
|
+
await awaitSetupOperation(new Promise((resolve) => setTimeout(resolve, EMBEDDING_PROBE_RETRY_DELAY_MS)), signal);
|
|
2072
|
+
outcome = await embedOnceForProbe(config, provider, modelId, env, correlationId, signal);
|
|
1825
2073
|
}
|
|
1826
2074
|
// The per-model verdict is what the operator acts on, and it travels in
|
|
1827
2075
|
// droppedEmbeddingModelIds / unverifiedEmbeddingModelIds. passingCandidates drops the
|
|
@@ -1829,23 +2077,66 @@ export async function defaultGatewayEmbeddingProbe(config, candidateModelIds, en
|
|
|
1829
2077
|
if (!outcome.ok || outcome.value.vector.length === 0) {
|
|
1830
2078
|
throw new Error("embedding probe returned no usable vector");
|
|
1831
2079
|
}
|
|
1832
|
-
}, SETUP_SMOKE_CONCURRENCY);
|
|
2080
|
+
}, SETUP_SMOKE_CONCURRENCY, undefined, signal);
|
|
1833
2081
|
}
|
|
1834
|
-
function gatewayEmbeddingProbe(deps, correlationId) {
|
|
2082
|
+
function gatewayEmbeddingProbe(deps, correlationId, signal) {
|
|
1835
2083
|
const override = deps.gatewayEmbeddingProbe;
|
|
1836
2084
|
if (override !== undefined)
|
|
1837
2085
|
return override;
|
|
1838
|
-
return (config, candidateModelIds) => defaultGatewayEmbeddingProbe(config, candidateModelIds, deps.env, correlationId ?? UNKNOWN_CORRELATION_ID);
|
|
2086
|
+
return (config, candidateModelIds) => defaultGatewayEmbeddingProbe(config, candidateModelIds, deps.env, correlationId ?? UNKNOWN_CORRELATION_ID, signal);
|
|
2087
|
+
}
|
|
2088
|
+
// A rerank probe answers two short documents; a healthy engine takes a moment, an unreachable one
|
|
2089
|
+
// must not hold the setup response for the adapter's multi-minute retrieval floor. The caller
|
|
2090
|
+
// signal is what bounds it (the adapter takes the SHORTER of its own deadline and the signal).
|
|
2091
|
+
const RERANKER_SETUP_PROBE_DEADLINE_MS = 30_000;
|
|
2092
|
+
// ...and one setup request has ONE budget for all of them. Per-probe deadlines alone stack: a
|
|
2093
|
+
// gateway listing several rerank aliases behind an unreachable route held the response for
|
|
2094
|
+
// 3 x 30 s per candidate URL, and the candidate-URL loop repeats the whole sequence. The budget
|
|
2095
|
+
// starts at the first probe of the request and is shared by every engine and every candidate URL.
|
|
2096
|
+
const RERANKER_SETUP_TOTAL_BUDGET_MS = 45_000;
|
|
2097
|
+
// The reranker block's own default when the request states no provider timeout (the config parser
|
|
2098
|
+
// applies the same value to a stored block that omits it).
|
|
2099
|
+
const DEFAULT_RERANKER_TIMEOUT_MS = 120_000;
|
|
2100
|
+
// The same two-document probe gateway readiness runs, over the request's own dependencies: the
|
|
2101
|
+
// egress policy, spend guard and activity-log line all apply to a discovered engine exactly as
|
|
2102
|
+
// they do to a configured one. Any failure — a refused request, a wrong ranking, a thrown
|
|
2103
|
+
// transport error, an exhausted request budget — is "not admitted", never a failed setup.
|
|
2104
|
+
function gatewayRerankerProbe(deps, correlationId, signal) {
|
|
2105
|
+
let budgetEndsAt;
|
|
2106
|
+
return async (config) => {
|
|
2107
|
+
signal?.throwIfAborted();
|
|
2108
|
+
budgetEndsAt ??= Date.now() + RERANKER_SETUP_TOTAL_BUDGET_MS;
|
|
2109
|
+
const remainingMs = budgetEndsAt - Date.now();
|
|
2110
|
+
if (remainingMs <= 0)
|
|
2111
|
+
return false;
|
|
2112
|
+
try {
|
|
2113
|
+
const selection = await requestRerankerProbe({
|
|
2114
|
+
deps,
|
|
2115
|
+
config,
|
|
2116
|
+
correlationId: correlationId ?? UNKNOWN_CORRELATION_ID,
|
|
2117
|
+
signal: AbortSignal.any([
|
|
2118
|
+
AbortSignal.timeout(Math.min(RERANKER_SETUP_PROBE_DEADLINE_MS, remainingMs)),
|
|
2119
|
+
...(signal === undefined ? [] : [signal]),
|
|
2120
|
+
]),
|
|
2121
|
+
});
|
|
2122
|
+
return rerankerProbePassed(selection);
|
|
2123
|
+
}
|
|
2124
|
+
catch (error) {
|
|
2125
|
+
signal?.throwIfAborted();
|
|
2126
|
+
reportSetupVerificationFailure(deps, error, correlationId, "gateway.setup.reranker-probe");
|
|
2127
|
+
return false;
|
|
2128
|
+
}
|
|
2129
|
+
};
|
|
1839
2130
|
}
|
|
1840
2131
|
// The seam type (UiHandlerDeps["gatewaySetupTester"]) is a fixed 2-arg shape shared by every
|
|
1841
2132
|
// test override, so the request-scoped correlation id is closed over here rather than added as a
|
|
1842
2133
|
// 3rd seam parameter — the override contract stays untouched while the real tester still stamps
|
|
1843
2134
|
// GatewayCallRequest.logContext (ADR-0173 D5).
|
|
1844
|
-
function gatewaySetupTester(deps, correlationId) {
|
|
2135
|
+
function gatewaySetupTester(deps, correlationId, signal) {
|
|
1845
2136
|
const override = deps.gatewaySetupTester;
|
|
1846
2137
|
if (override !== undefined)
|
|
1847
2138
|
return override;
|
|
1848
|
-
return (config, candidateModelIds) => defaultGatewaySetupTester(config, candidateModelIds, correlationId, deps);
|
|
2139
|
+
return (config, candidateModelIds) => defaultGatewaySetupTester(config, candidateModelIds, correlationId, deps, signal);
|
|
1849
2140
|
}
|
|
1850
2141
|
const FIGMA_ME_ENDPOINT = "https://api.figma.com/v1/me";
|
|
1851
2142
|
function figmaReason(body) {
|
|
@@ -3339,41 +3630,249 @@ function normalizeDiscoveryResult(result) {
|
|
|
3339
3630
|
...(result.unsupportedModels !== undefined
|
|
3340
3631
|
? { unsupportedModels: result.unsupportedModels }
|
|
3341
3632
|
: {}),
|
|
3633
|
+
...(result.rerankModelIds !== undefined ? { rerankModelIds: result.rerankModelIds } : {}),
|
|
3342
3634
|
};
|
|
3343
3635
|
}
|
|
3344
3636
|
return normalizeLegacyDiscoveryResult(result);
|
|
3345
3637
|
}
|
|
3346
|
-
function candidateModelsFromDeploymentNames(deploymentNames,
|
|
3638
|
+
function candidateModelsFromDeploymentNames(deploymentNames, roles) {
|
|
3347
3639
|
// Stored kinds win over the name heuristic: a preserve-mode rebuild must not chat-probe a
|
|
3348
3640
|
// verified embedding or OCR deployment out of the config (review findings on #3031). Stored
|
|
3349
3641
|
// OCR and dedicated-endpoint embedding providers leave the candidate set entirely — they are
|
|
3350
3642
|
// restored verbatim afterwards.
|
|
3351
|
-
const restoredSet = new Set(restoredVerbatimModelIds);
|
|
3643
|
+
const restoredSet = new Set(roles.restoredVerbatimModelIds);
|
|
3352
3644
|
const candidateNames = deploymentNames.filter((modelId) => !restoredSet.has(modelId));
|
|
3353
|
-
const storedEmbeddingSet = new Set(storedEmbeddingModelIds);
|
|
3354
|
-
const
|
|
3645
|
+
const storedEmbeddingSet = new Set(roles.storedEmbeddingModelIds);
|
|
3646
|
+
const submittedEmbeddingSet = new Set(roles.submittedEmbeddingModelIds);
|
|
3647
|
+
// A STORED embedding id that names a rerank engine is not an asserted role: field incident
|
|
3648
|
+
// (LiteLLM customer, 2026-08) — a declared `rerank` endpoint was filed as the gateway's embedding
|
|
3649
|
+
// model, and treating every stored id as asserted kept it there through every later save. It is
|
|
3650
|
+
// re-classified as a rerank candidate (probed, and wired only when nobody owns a reranker). A
|
|
3651
|
+
// client-submitted embedding id stays an explicit assertion.
|
|
3652
|
+
const rerankModelIds = candidateNames.filter((modelId) => storedEmbeddingSet.has(modelId) &&
|
|
3653
|
+
!submittedEmbeddingSet.has(modelId) &&
|
|
3654
|
+
isLikelyRerankModelId(modelId));
|
|
3655
|
+
const rerankSet = new Set(rerankModelIds);
|
|
3656
|
+
const modelIds = candidateNames.filter((modelId) => !rerankSet.has(modelId));
|
|
3657
|
+
const embeddingModelIds = modelIds.filter((modelId) => storedEmbeddingSet.has(modelId) ||
|
|
3658
|
+
submittedEmbeddingSet.has(modelId) ||
|
|
3659
|
+
isLikelyEmbeddingModelId(modelId));
|
|
3355
3660
|
const embeddingSet = new Set(embeddingModelIds);
|
|
3356
3661
|
return {
|
|
3357
|
-
modelIds
|
|
3358
|
-
chatModelIds:
|
|
3662
|
+
modelIds,
|
|
3663
|
+
chatModelIds: modelIds.filter((modelId) => !embeddingSet.has(modelId)),
|
|
3359
3664
|
embeddingModelIds,
|
|
3360
3665
|
imageInputModelIds: [],
|
|
3361
3666
|
modelMetadata: {},
|
|
3667
|
+
...(rerankModelIds.length === 0
|
|
3668
|
+
? {}
|
|
3669
|
+
: {
|
|
3670
|
+
rerankModelIds,
|
|
3671
|
+
unsupportedModels: rerankModelIds.map((id) => ({ id, reason: "rerank" })),
|
|
3672
|
+
}),
|
|
3673
|
+
};
|
|
3674
|
+
}
|
|
3675
|
+
// The embedding a previous configuration led with stays first: the default new Knowledge Pods bind
|
|
3676
|
+
// is the first embedding provider, and a re-discovery — a key rotation, a gateway that now lists
|
|
3677
|
+
// another engine ahead of it — must not rebind them silently. Everything new follows in discovery's
|
|
3678
|
+
// own order (declared before name-inferred, then by id).
|
|
3679
|
+
function withStoredEmbeddingOrder(discovered, stored) {
|
|
3680
|
+
const present = new Set(discovered.embeddingModelIds);
|
|
3681
|
+
const kept = currentEmbeddingModelIds(stored).filter((modelId) => present.has(modelId));
|
|
3682
|
+
if (kept.length === 0)
|
|
3683
|
+
return discovered;
|
|
3684
|
+
const keptSet = new Set(kept);
|
|
3685
|
+
return {
|
|
3686
|
+
...discovered,
|
|
3687
|
+
embeddingModelIds: [
|
|
3688
|
+
...kept,
|
|
3689
|
+
...discovered.embeddingModelIds.filter((modelId) => !keptSet.has(modelId)),
|
|
3690
|
+
],
|
|
3362
3691
|
};
|
|
3363
3692
|
}
|
|
3364
3693
|
async function candidateModelIdsForSetup(input, validationConfig) {
|
|
3365
3694
|
if (input.deploymentNames.length > 0) {
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3695
|
+
const selected = candidateModelsFromDeploymentNames(input.deploymentNames, {
|
|
3696
|
+
storedEmbeddingModelIds: input.storedEmbeddingModelIds,
|
|
3697
|
+
submittedEmbeddingModelIds: input.submittedEmbeddingModelIds,
|
|
3698
|
+
restoredVerbatimModelIds: [
|
|
3699
|
+
...input.storedOcrModelIds,
|
|
3700
|
+
...input.storedDedicatedEmbeddingModelIds,
|
|
3701
|
+
// Voice ids leave the candidate set too, but applyVoiceProviders restores them — they
|
|
3702
|
+
// must not join the verbatim-restore list below.
|
|
3703
|
+
...input.storedVoiceModelIds,
|
|
3704
|
+
],
|
|
3705
|
+
});
|
|
3706
|
+
return enrichSelectedDeploymentMetadata(input, validationConfig, selected);
|
|
3707
|
+
}
|
|
3708
|
+
return withStoredEmbeddingOrder(await discoverSetupModels(input, validationConfig), input.stored);
|
|
3709
|
+
}
|
|
3710
|
+
async function awaitSetupOperation(operation, signal) {
|
|
3711
|
+
if (signal === undefined)
|
|
3712
|
+
return operation;
|
|
3713
|
+
signal.throwIfAborted();
|
|
3714
|
+
let onAbort;
|
|
3715
|
+
const aborted = new Promise((_resolve, reject) => {
|
|
3716
|
+
onAbort = () => {
|
|
3717
|
+
reject(new DOMException("Gateway setup cancelled.", "AbortError"));
|
|
3718
|
+
};
|
|
3719
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
3720
|
+
});
|
|
3721
|
+
try {
|
|
3722
|
+
return await Promise.race([operation, aborted]);
|
|
3723
|
+
}
|
|
3724
|
+
finally {
|
|
3725
|
+
if (onAbort !== undefined)
|
|
3726
|
+
signal.removeEventListener("abort", onAbort);
|
|
3373
3727
|
}
|
|
3374
|
-
return normalizeDiscoveryResult(await input.discovery(input.baseUrl, input.apiKey, input.apiKeyHeaderName, validationConfig.egress, input.correlationId));
|
|
3375
3728
|
}
|
|
3376
|
-
function
|
|
3729
|
+
function discoveryProgrammingFailure(cause) {
|
|
3730
|
+
return (cause instanceof TypeError || cause instanceof ReferenceError || cause instanceof RangeError);
|
|
3731
|
+
}
|
|
3732
|
+
function discoveryHttpStatus(cause) {
|
|
3733
|
+
const value = cause !== null && typeof cause === "object" && "httpStatus" in cause
|
|
3734
|
+
? cause.httpStatus
|
|
3735
|
+
: undefined;
|
|
3736
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 100 && value <= 599
|
|
3737
|
+
? value
|
|
3738
|
+
: undefined;
|
|
3739
|
+
}
|
|
3740
|
+
function discoveryTimedOut(cause) {
|
|
3741
|
+
return ((cause instanceof Error && cause.name === "TimeoutError") ||
|
|
3742
|
+
(cause instanceof GatewayError && cause.code === ERROR_CODES.TIMEOUT));
|
|
3743
|
+
}
|
|
3744
|
+
function discoveryAnswerIsUnusable(cause) {
|
|
3745
|
+
if (cause === null || typeof cause !== "object" || !("discoveryCode" in cause))
|
|
3746
|
+
return false;
|
|
3747
|
+
return (cause.discoveryCode === "DISCOVERY_EMPTY" ||
|
|
3748
|
+
cause.discoveryCode === "DISCOVERY_ALL_ENTRIES_UNSUPPORTED" ||
|
|
3749
|
+
cause.discoveryCode === "DISCOVERY_INVALID_RESPONSE");
|
|
3750
|
+
}
|
|
3751
|
+
function discoveryRouteOutcome(cause, signal) {
|
|
3752
|
+
if (discoveryTimedOut(cause))
|
|
3753
|
+
return "timeout";
|
|
3754
|
+
if (signal.aborted)
|
|
3755
|
+
return "cancelled";
|
|
3756
|
+
if (discoveryHttpStatus(cause) !== undefined)
|
|
3757
|
+
return "http-error";
|
|
3758
|
+
if (discoveryAnswerIsUnusable(cause))
|
|
3759
|
+
return "unusable";
|
|
3760
|
+
return discoveryProgrammingFailure(cause) ? "failed" : "transport-error";
|
|
3761
|
+
}
|
|
3762
|
+
function discoveryFailureKind(cause, status) {
|
|
3763
|
+
if (discoveryAnswerIsUnusable(cause))
|
|
3764
|
+
return "validation-failed";
|
|
3765
|
+
if (status === 401 || status === 403)
|
|
3766
|
+
return "permission-denied";
|
|
3767
|
+
if (status === 429)
|
|
3768
|
+
return "rate-limited";
|
|
3769
|
+
if (discoveryTimedOut(cause))
|
|
3770
|
+
return "timeout";
|
|
3771
|
+
return discoveryProgrammingFailure(cause) ? "internal" : "unavailable";
|
|
3772
|
+
}
|
|
3773
|
+
function discoveryFailureDetail(cause, cancelled) {
|
|
3774
|
+
const httpStatus = discoveryHttpStatus(cause);
|
|
3775
|
+
return {
|
|
3776
|
+
errorKind: cancelled ? "cancelled" : discoveryFailureKind(cause, httpStatus),
|
|
3777
|
+
evidence: {
|
|
3778
|
+
...(httpStatus === undefined ? {} : { httpStatus }),
|
|
3779
|
+
frames: keikoStackFrames(cause),
|
|
3780
|
+
causeChain: causeChain(cause),
|
|
3781
|
+
},
|
|
3782
|
+
};
|
|
3783
|
+
}
|
|
3784
|
+
function metadataFailureOutcome(cause, signal) {
|
|
3785
|
+
if (signal?.aborted === true)
|
|
3786
|
+
return "cancelled";
|
|
3787
|
+
return discoveryProgrammingFailure(cause) ? "failed" : "unavailable";
|
|
3788
|
+
}
|
|
3789
|
+
async function discoverSetupModels(input, validationConfig, selected) {
|
|
3790
|
+
const startedAt = Date.now();
|
|
3791
|
+
const trace = createSetupDiscoveryTrace();
|
|
3792
|
+
const selectedModelCount = selectedModelCountOf(selected);
|
|
3793
|
+
try {
|
|
3794
|
+
input.signal?.throwIfAborted();
|
|
3795
|
+
const result = await awaitSetupOperation(input.discovery(input.baseUrl, input.apiKey, input.apiKeyHeaderName, validationConfig.egress, input.correlationId, trace), input.signal);
|
|
3796
|
+
input.signal?.throwIfAborted();
|
|
3797
|
+
const normalized = normalizeDiscoveryResult(result);
|
|
3798
|
+
logSetupMetadataOutcome({
|
|
3799
|
+
outcome: "available",
|
|
3800
|
+
...(selected === undefined
|
|
3801
|
+
? {}
|
|
3802
|
+
: { selectionCounts: selectedMetadataCounts(selected, normalized) }),
|
|
3803
|
+
}, trace, startedAt, input.correlationId);
|
|
3804
|
+
return normalized;
|
|
3805
|
+
}
|
|
3806
|
+
catch (cause) {
|
|
3807
|
+
const outcome = metadataFailureOutcome(cause, input.signal);
|
|
3808
|
+
logSetupMetadataOutcome({
|
|
3809
|
+
outcome,
|
|
3810
|
+
...(selectedModelCount === undefined ? {} : { selectionCounts: { selectedModelCount } }),
|
|
3811
|
+
failure: discoveryFailureDetail(cause, outcome === "cancelled"),
|
|
3812
|
+
}, trace, startedAt, input.correlationId);
|
|
3813
|
+
throw cause;
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
function selectedDeploymentMetadata(selected, discovered) {
|
|
3817
|
+
const chat = new Set(discovered.chatModelIds);
|
|
3818
|
+
const embedding = new Set(discovered.embeddingModelIds);
|
|
3819
|
+
const compatible = [
|
|
3820
|
+
...selected.chatModelIds.filter((id) => chat.has(id)),
|
|
3821
|
+
...selected.embeddingModelIds.filter((id) => embedding.has(id)),
|
|
3822
|
+
];
|
|
3823
|
+
return Object.fromEntries(compatible.flatMap((id) => {
|
|
3824
|
+
const metadata = discovered.modelMetadata[id];
|
|
3825
|
+
return metadata === undefined ? [] : [[id, metadata]];
|
|
3826
|
+
}));
|
|
3827
|
+
}
|
|
3828
|
+
function selectedModelCountOf(selected) {
|
|
3829
|
+
return selected === undefined
|
|
3830
|
+
? undefined
|
|
3831
|
+
: selected.chatModelIds.length + selected.embeddingModelIds.length;
|
|
3832
|
+
}
|
|
3833
|
+
function selectedMetadataCounts(selected, discovered) {
|
|
3834
|
+
const allDiscovered = new Set(discovered.modelIds);
|
|
3835
|
+
let metadataEnrichedModelCount = 0;
|
|
3836
|
+
let roleMismatchModelCount = 0;
|
|
3837
|
+
let notDiscoveredModelCount = 0;
|
|
3838
|
+
const groups = [
|
|
3839
|
+
[selected.chatModelIds, discovered.chatModelIds],
|
|
3840
|
+
[selected.embeddingModelIds, discovered.embeddingModelIds],
|
|
3841
|
+
];
|
|
3842
|
+
for (const [selectedIds, discoveredIds] of groups) {
|
|
3843
|
+
const compatible = new Set(discoveredIds);
|
|
3844
|
+
for (const id of selectedIds) {
|
|
3845
|
+
if (!allDiscovered.has(id))
|
|
3846
|
+
notDiscoveredModelCount++;
|
|
3847
|
+
else if (!compatible.has(id))
|
|
3848
|
+
roleMismatchModelCount++;
|
|
3849
|
+
else if (Object.keys(discovered.modelMetadata[id] ?? {}).length > 0)
|
|
3850
|
+
metadataEnrichedModelCount++;
|
|
3851
|
+
}
|
|
3852
|
+
}
|
|
3853
|
+
return {
|
|
3854
|
+
selectedModelCount: selectedModelCountOf(selected),
|
|
3855
|
+
metadataEnrichedModelCount,
|
|
3856
|
+
roleMismatchModelCount,
|
|
3857
|
+
notDiscoveredModelCount,
|
|
3858
|
+
};
|
|
3859
|
+
}
|
|
3860
|
+
async function enrichSelectedDeploymentMetadata(input, validationConfig, selected) {
|
|
3861
|
+
try {
|
|
3862
|
+
const discovered = await discoverSetupModels(input, validationConfig, selected);
|
|
3863
|
+
reportDiscoveryTruncation(input.diagnostics, input.correlationId, discovered);
|
|
3864
|
+
return { ...selected, modelMetadata: selectedDeploymentMetadata(selected, discovered) };
|
|
3865
|
+
}
|
|
3866
|
+
catch (cause) {
|
|
3867
|
+
input.signal?.throwIfAborted();
|
|
3868
|
+
if (discoveryProgrammingFailure(cause))
|
|
3869
|
+
throw cause;
|
|
3870
|
+
// Explicit deployments remain usable on gateways without a discovery endpoint. Their
|
|
3871
|
+
// existing smoke probes validate credentials and callable roles; discovery cannot add ids.
|
|
3872
|
+
return selected;
|
|
3873
|
+
}
|
|
3874
|
+
}
|
|
3875
|
+
function finalRawConfigForSetup(input, testedModelIds, embeddingModelIds, imageInputModelIds, responseFormatModelIds, modelMetadata, admittedModels) {
|
|
3377
3876
|
const configuredModelIds = mergeChatAndEmbeddingModelIds(testedModelIds, embeddingModelIds);
|
|
3378
3877
|
const rawConfig = buildRawConfig(input.baseUrl, input.apiKey, configuredModelIds, {
|
|
3379
3878
|
preserveExisting: input.preserveExisting,
|
|
@@ -3395,16 +3894,17 @@ function finalRawConfigForSetup(input, testedModelIds, embeddingModelIds, imageI
|
|
|
3395
3894
|
// configuration — a reranker or egress topology must not vanish because an unrelated
|
|
3396
3895
|
// capability was updated (review finding on #3031).
|
|
3397
3896
|
...(input.current?.grounding === undefined ? {} : { grounding: input.current.grounding }),
|
|
3398
|
-
...(
|
|
3897
|
+
...rerankerBlockForSetup(admittedModels),
|
|
3399
3898
|
...(input.current?.egress === undefined ? {} : { egress: input.current.egress }),
|
|
3400
3899
|
...(input.figmaAccessToken === undefined
|
|
3401
3900
|
? {}
|
|
3402
3901
|
: { figma: { accessToken: input.figmaAccessToken } }),
|
|
3902
|
+
...operatorPolicyBlocks(input.current),
|
|
3403
3903
|
};
|
|
3404
3904
|
// Verbatim restoration reads the DURABLE stored view: restored values are what the FILE
|
|
3405
3905
|
// holds, so a transient per-model env override neither hides a sharing relationship nor gets
|
|
3406
3906
|
// baked into the rebuilt persisted config (review finding on #3037).
|
|
3407
|
-
const voiceProviders = discoveredVoiceProvidersForSetup(input,
|
|
3907
|
+
const voiceProviders = discoveredVoiceProvidersForSetup(input, admittedModels);
|
|
3408
3908
|
return applyStoredDedicatedProviders(applyVoiceProviders(rawConfigWithOptionalBlocks, voiceProviders), input.stored, [...input.storedOcrModelIds, ...input.storedDedicatedEmbeddingModelIds], {
|
|
3409
3909
|
baseUrl: input.baseUrl,
|
|
3410
3910
|
apiKey: input.apiKey,
|
|
@@ -3413,6 +3913,15 @@ function finalRawConfigForSetup(input, testedModelIds, embeddingModelIds, imageI
|
|
|
3413
3913
|
apiVersion: input.apiVersion,
|
|
3414
3914
|
});
|
|
3415
3915
|
}
|
|
3916
|
+
// The rebuild's reranker block is whatever `admitRerankerCandidates` decided: the reranker an
|
|
3917
|
+
// operator (or an earlier setup) owns — rebased onto the setup connection when it rode the gateway,
|
|
3918
|
+
// and verified there first when that connection moved to a new endpoint — or, only when nobody owns
|
|
3919
|
+
// one, a discovered engine that passed its live probe. The plaintext key here is sealed into the
|
|
3920
|
+
// credential vault by the same persistence step that seals every provider key; it never reaches the
|
|
3921
|
+
// file or the response.
|
|
3922
|
+
function rerankerBlockForSetup(admittedModels) {
|
|
3923
|
+
return admittedModels.reranker === undefined ? {} : { reranker: admittedModels.reranker };
|
|
3924
|
+
}
|
|
3416
3925
|
function discoveredVoiceProvidersForSetup(input, discovered) {
|
|
3417
3926
|
const configured = input.voiceProviders.length > 0
|
|
3418
3927
|
? input.voiceProviders
|
|
@@ -3719,6 +4228,113 @@ async function admitEmbeddingCandidates(input, probeConfig, candidates) {
|
|
|
3719
4228
|
droppedUnverified: failed.filter((id) => !asserted.has(id)),
|
|
3720
4229
|
};
|
|
3721
4230
|
}
|
|
4231
|
+
// A discovered rerank engine becomes the retrieval reranker only when nobody owns one and a live
|
|
4232
|
+
// two-document probe answers — the same gate embedding candidates pass. A model the gateway DECLARED
|
|
4233
|
+
// as `rerank` is still verified: a declaration says what the model is, not that its route works.
|
|
4234
|
+
// Probing is bounded (a handful of candidates, sequentially, in discovery's declared-first order,
|
|
4235
|
+
// inside one request-wide time budget) so a gateway that lists many rerank aliases cannot stretch
|
|
4236
|
+
// setup, and the first engine that ranks wins.
|
|
4237
|
+
const MAX_RERANKER_PROBES = 3;
|
|
4238
|
+
// Stored or current: either view means an operator (or an earlier setup) already chose a reranker,
|
|
4239
|
+
// and a discovered engine must never displace that choice. The runtime view wins; a reranker only
|
|
4240
|
+
// the durable file names still survives the rewrite.
|
|
4241
|
+
function ownedReranker(input) {
|
|
4242
|
+
return input.current?.reranker ?? input.stored?.reranker;
|
|
4243
|
+
}
|
|
4244
|
+
// A reranker that rode the stored gateway connection (same endpoint AND credential — exactly what a
|
|
4245
|
+
// discovered one does) follows a credential rotation or endpoint move like every other provider
|
|
4246
|
+
// that shared it: left behind, it would keep sending a dead token and silently degrade retrieval.
|
|
4247
|
+
// One with its own endpoint or credential keeps both — the freshly verified connection details
|
|
4248
|
+
// never travel to a connection they were not tested against.
|
|
4249
|
+
function rebasedReranker(input, reranker) {
|
|
4250
|
+
if (!sharesStoredGatewayConnection(reranker, storedPrimaryGatewayProvider(input.stored))) {
|
|
4251
|
+
return reranker;
|
|
4252
|
+
}
|
|
4253
|
+
return {
|
|
4254
|
+
...reranker,
|
|
4255
|
+
baseUrl: input.baseUrl,
|
|
4256
|
+
apiKey: input.apiKey,
|
|
4257
|
+
apiKeyHeaderName: input.apiKeyHeaderName,
|
|
4258
|
+
};
|
|
4259
|
+
}
|
|
4260
|
+
// The reranker block a discovered engine persists: the verified setup connection, nothing else.
|
|
4261
|
+
function discoveredRerankerBlockFor(input, modelId) {
|
|
4262
|
+
return {
|
|
4263
|
+
modelId,
|
|
4264
|
+
baseUrl: input.baseUrl,
|
|
4265
|
+
apiKey: input.apiKey,
|
|
4266
|
+
apiKeyHeaderName: input.apiKeyHeaderName,
|
|
4267
|
+
timeoutMs: input.timeoutMs ?? DEFAULT_RERANKER_TIMEOUT_MS,
|
|
4268
|
+
};
|
|
4269
|
+
}
|
|
4270
|
+
// The config a reranker is probed under: its own block on the verified setup connection, and the
|
|
4271
|
+
// egress policy the request validated under unless the block states its own.
|
|
4272
|
+
function withProbeEgress(input, reranker) {
|
|
4273
|
+
return reranker.egress === undefined && input.egress !== undefined
|
|
4274
|
+
? { ...reranker, egress: input.egress }
|
|
4275
|
+
: reranker;
|
|
4276
|
+
}
|
|
4277
|
+
function probeRerankerOn(input, validationConfig, reranker) {
|
|
4278
|
+
return input.rerankerProbe({ ...validationConfig, reranker: withProbeEgress(input, reranker) });
|
|
4279
|
+
}
|
|
4280
|
+
async function admitRerankerCandidates(input, validationConfig, candidates) {
|
|
4281
|
+
const owned = ownedReranker(input);
|
|
4282
|
+
if (owned === undefined)
|
|
4283
|
+
return admitDiscoveredRerankers(input, validationConfig, candidates, 0);
|
|
4284
|
+
const carried = rebasedReranker(input, owned);
|
|
4285
|
+
const candidateCount = candidates.length;
|
|
4286
|
+
if (sameBaseUrlIdentity(owned.baseUrl, carried.baseUrl)) {
|
|
4287
|
+
// Its own connection, or the gateway's endpoint unchanged (a credential rotation): nothing new
|
|
4288
|
+
// to verify — the model is hosted where it always was.
|
|
4289
|
+
return {
|
|
4290
|
+
reranker: carried,
|
|
4291
|
+
...(candidateCount === 0
|
|
4292
|
+
? {}
|
|
4293
|
+
: { resolution: { outcome: "kept-existing", candidateCount, probedCount: 0 } }),
|
|
4294
|
+
};
|
|
4295
|
+
}
|
|
4296
|
+
// It rode the gateway to a NEW endpoint. Nothing says that gateway hosts this model, so it is
|
|
4297
|
+
// verified there before it is repointed; when it does not answer it is no longer owned, and
|
|
4298
|
+
// discovery on the new gateway decides.
|
|
4299
|
+
if (await probeRerankerOn(input, validationConfig, carried)) {
|
|
4300
|
+
return {
|
|
4301
|
+
reranker: carried,
|
|
4302
|
+
resolution: { outcome: "kept-existing", candidateCount, probedCount: 1 },
|
|
4303
|
+
};
|
|
4304
|
+
}
|
|
4305
|
+
return admitDiscoveredRerankers(input, validationConfig, candidates, 1);
|
|
4306
|
+
}
|
|
4307
|
+
async function admitDiscoveredRerankers(input, validationConfig, candidates, alreadyProbed) {
|
|
4308
|
+
const candidateCount = candidates.length;
|
|
4309
|
+
if (candidateCount === 0 && alreadyProbed === 0)
|
|
4310
|
+
return {};
|
|
4311
|
+
let probedCount = alreadyProbed;
|
|
4312
|
+
for (const modelId of candidates.slice(0, MAX_RERANKER_PROBES)) {
|
|
4313
|
+
probedCount += 1;
|
|
4314
|
+
const block = discoveredRerankerBlockFor(input, modelId);
|
|
4315
|
+
if (await probeRerankerOn(input, validationConfig, block)) {
|
|
4316
|
+
return {
|
|
4317
|
+
reranker: block,
|
|
4318
|
+
admittedModelId: modelId,
|
|
4319
|
+
resolution: { outcome: "wired", wiredModelId: modelId, candidateCount, probedCount },
|
|
4320
|
+
};
|
|
4321
|
+
}
|
|
4322
|
+
}
|
|
4323
|
+
return { resolution: { outcome: "probe-failed", candidateCount, probedCount } };
|
|
4324
|
+
}
|
|
4325
|
+
// The admitted view of the candidates: the reranker decision travels with it, and the engine that
|
|
4326
|
+
// passed its probe leaves the "unsupported" report — the operator sees what Keiko did NOT configure.
|
|
4327
|
+
function withRerankerAdmission(candidateModels, admission) {
|
|
4328
|
+
const { admittedModelId } = admission;
|
|
4329
|
+
const { unsupportedModels, rerankModelIds: _candidates, ...admitted } = candidateModels;
|
|
4330
|
+
const stillUnsupported = (unsupportedModels ?? []).filter((entry) => entry.id !== admittedModelId);
|
|
4331
|
+
return {
|
|
4332
|
+
...admitted,
|
|
4333
|
+
...(admission.reranker === undefined ? {} : { reranker: admission.reranker }),
|
|
4334
|
+
...(admission.resolution === undefined ? {} : { rerankerResolution: admission.resolution }),
|
|
4335
|
+
...(stillUnsupported.length === 0 ? {} : { unsupportedModels: stillUnsupported }),
|
|
4336
|
+
};
|
|
4337
|
+
}
|
|
3722
4338
|
// Body-free counterpart to reportDiscoveryTruncation: counts and reason codes only, never a model
|
|
3723
4339
|
// id or an endpoint. Ids belong in the setup RESPONSE, which the operator sees; the diagnostic
|
|
3724
4340
|
// channel stays free of gateway inventory.
|
|
@@ -3795,7 +4411,7 @@ async function admitChatCandidatesOrDefer(input, candidateModels, admittedModels
|
|
|
3795
4411
|
catch (error) {
|
|
3796
4412
|
if (!temporaryGatewaySetupFailure(error))
|
|
3797
4413
|
throw error;
|
|
3798
|
-
throw new DeferredTemporaryChatAdmission(error, () => verifiedSetupFromChatAdmission(input,
|
|
4414
|
+
throw new DeferredTemporaryChatAdmission(error, () => verifiedSetupFromChatAdmission(input, admittedModels, candidateConfig, embeddingAdmission, temporaryChatAdmission(input, candidateModels, candidateConfig)));
|
|
3799
4415
|
}
|
|
3800
4416
|
}
|
|
3801
4417
|
async function verifySetupCandidate(input) {
|
|
@@ -3805,38 +4421,41 @@ async function verifySetupCandidate(input) {
|
|
|
3805
4421
|
reportLoopbackTargetAccepted(input.diagnostics, input.correlationId, input.baseUrl);
|
|
3806
4422
|
const validationConfig = validationConfigForSetup(input);
|
|
3807
4423
|
const candidateModels = await candidateModelIdsForSetup(input, validationConfig);
|
|
4424
|
+
input.signal?.throwIfAborted();
|
|
3808
4425
|
reportDiscoveryTruncation(input.diagnostics, input.correlationId, candidateModels);
|
|
3809
4426
|
const smokeTimeoutMs = input.deploymentNames.length > 0
|
|
3810
4427
|
? DEPLOYMENT_SMOKE_TIMEOUT_MS
|
|
3811
4428
|
: DISCOVERED_MODEL_SMOKE_TIMEOUT_MS;
|
|
3812
4429
|
const candidateConfig = probeConfigForModels(input, candidateModels.chatModelIds, smokeTimeoutMs);
|
|
3813
4430
|
const embeddingAdmission = await admitEmbeddingCandidates(input, embeddingProbeConfigFor(input, candidateModels, smokeTimeoutMs, candidateConfig), candidateModels.embeddingModelIds);
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
};
|
|
4431
|
+
input.signal?.throwIfAborted();
|
|
4432
|
+
const rerankerAdmission = await admitRerankerCandidates(input, validationConfig, candidateModels.rerankModelIds ?? []);
|
|
4433
|
+
const admittedModels = withRerankerAdmission({ ...candidateModels, embeddingModelIds: embeddingAdmission.admitted }, rerankerAdmission);
|
|
3818
4434
|
// Emitted BEFORE the chat smoke test: the tester throws on an all-rejected gateway, and the
|
|
3819
4435
|
// record of what discovery refused is most valuable for exactly that failed attempt.
|
|
3820
|
-
reportUnusableDiscoveredModels(input.diagnostics, input.correlationId,
|
|
4436
|
+
reportUnusableDiscoveredModels(input.diagnostics, input.correlationId, admittedModels.unsupportedModels ?? [], embeddingAdmission);
|
|
4437
|
+
input.signal?.throwIfAborted();
|
|
3821
4438
|
const chatAdmission = await admitChatCandidatesOrDefer(input, candidateModels, admittedModels, candidateConfig, embeddingAdmission);
|
|
3822
4439
|
reportChatSmokeAdmission(input.diagnostics, input.correlationId, chatAdmission);
|
|
3823
|
-
return verifiedSetupFromChatAdmission(input,
|
|
4440
|
+
return verifiedSetupFromChatAdmission(input, admittedModels, candidateConfig, embeddingAdmission, chatAdmission);
|
|
3824
4441
|
}
|
|
3825
|
-
function verifiedSetupFromChatAdmission(input,
|
|
4442
|
+
function verifiedSetupFromChatAdmission(input, admittedModels, candidateConfig, embeddingAdmission, chatAdmission) {
|
|
3826
4443
|
const { testResult } = chatAdmission;
|
|
3827
|
-
|
|
4444
|
+
if (input.imageInputModelIdsProvided) {
|
|
4445
|
+
assertImageInputModelsWereTested(input.imageInputModelIds, chatAdmission.configuredModelIds);
|
|
4446
|
+
}
|
|
3828
4447
|
const rawConfigWithOptionalBlocks = finalRawConfigForTestedSetup(input, testResult, admittedModels, chatAdmission.configuredModelIds);
|
|
3829
4448
|
const parsedConfig = parsedSetupConfigWithToolCallingProvenance(input, rawConfigWithOptionalBlocks, candidateConfig, testResult.toolCallingObservations ?? []);
|
|
3830
|
-
return verifiedSetupResult(parsedConfig.rawConfig, parsedConfig.config, testResult,
|
|
4449
|
+
return verifiedSetupResult(parsedConfig.rawConfig, parsedConfig.config, testResult, admittedModels, embeddingAdmission, chatAdmission);
|
|
3831
4450
|
}
|
|
3832
|
-
function verifiedSetupResult(rawConfig, config, testResult,
|
|
4451
|
+
function verifiedSetupResult(rawConfig, config, testResult, admittedModels, embeddingAdmission, chatAdmission) {
|
|
3833
4452
|
return {
|
|
3834
4453
|
rawConfig,
|
|
3835
4454
|
config,
|
|
3836
4455
|
testedModelIds: testResult.testedModelIds,
|
|
3837
|
-
skippedModelIds: skippedModelIdsForSetup(
|
|
3838
|
-
...(
|
|
3839
|
-
? { unsupportedModels:
|
|
4456
|
+
skippedModelIds: skippedModelIdsForSetup(admittedModels.modelIds, chatAdmission.configuredModelIds, embeddingAdmission.admitted),
|
|
4457
|
+
...(admittedModels.unsupportedModels !== undefined
|
|
4458
|
+
? { unsupportedModels: admittedModels.unsupportedModels }
|
|
3840
4459
|
: {}),
|
|
3841
4460
|
...(embeddingAdmission.retainedUnverified.length > 0
|
|
3842
4461
|
? { unverifiedEmbeddingModelIds: embeddingAdmission.retainedUnverified }
|
|
@@ -3850,6 +4469,9 @@ function verifiedSetupResult(rawConfig, config, testResult, candidateModels, emb
|
|
|
3850
4469
|
...(chatAdmission.droppedModelIds.length > 0
|
|
3851
4470
|
? { droppedChatModelIds: chatAdmission.droppedModelIds }
|
|
3852
4471
|
: {}),
|
|
4472
|
+
...(admittedModels.rerankerResolution !== undefined
|
|
4473
|
+
? { rerankerResolution: admittedModels.rerankerResolution }
|
|
4474
|
+
: {}),
|
|
3853
4475
|
};
|
|
3854
4476
|
}
|
|
3855
4477
|
// KEIKO-0497 (#2901): configuring the gateway points the product at an outbound endpoint and can
|
|
@@ -3896,7 +4518,7 @@ function recordGatewaySetupAudit(deps, request, config, outcome) {
|
|
|
3896
4518
|
// by both diagnostics below, so a minted UUID here would key the persisted audit evidence and
|
|
3897
4519
|
// its failure diagnostics to a different identity than the loopback/discovery diagnostics this
|
|
3898
4520
|
// same request emits under UNKNOWN_CORRELATION_ID — one request, two correlation identities,
|
|
3899
|
-
// unjoinable in a support
|
|
4521
|
+
// unjoinable in a support report. (The randomUUID below is an evidence-store KEY, not a
|
|
3900
4522
|
// correlation id, and is correct.)
|
|
3901
4523
|
correlationId: request.correlationId ?? UNKNOWN_CORRELATION_ID,
|
|
3902
4524
|
targetClass: gatewaySetupTargetClass(request.baseUrl),
|
|
@@ -4147,10 +4769,34 @@ function gatewayUnavailableResult() {
|
|
|
4147
4769
|
body: errorBody("GATEWAY_SETUP_UNAVAILABLE", "Gateway setup is unavailable."),
|
|
4148
4770
|
};
|
|
4149
4771
|
}
|
|
4772
|
+
// One resolution per committed setup request. A probe that failed leaves reranking off with nothing
|
|
4773
|
+
// else on screen, so besides the (warn-level) resolution line it leaves one body-free diagnostic:
|
|
4774
|
+
// a fixed code, never a model id, an endpoint or a credential — the engine is named in the setup
|
|
4775
|
+
// response the operator reads.
|
|
4776
|
+
function reportRerankerResolution(deps, resolution, correlationId) {
|
|
4777
|
+
if (resolution === undefined)
|
|
4778
|
+
return;
|
|
4779
|
+
logRerankerSetupResolution(resolution, correlationId);
|
|
4780
|
+
if (resolution.outcome !== "probe-failed")
|
|
4781
|
+
return;
|
|
4782
|
+
emitServerDiagnostic(deps.diagnostics, {
|
|
4783
|
+
correlationId: correlationId ?? UNKNOWN_CORRELATION_ID,
|
|
4784
|
+
timestamp: new Date().toISOString(),
|
|
4785
|
+
operation: "POST /api/gateway/setup",
|
|
4786
|
+
source: "gateway.setup.reranker-probe",
|
|
4787
|
+
errorClass: "GatewayRerankerProbeFailed",
|
|
4788
|
+
message: "Provider verification failed without exposing upstream response details.",
|
|
4789
|
+
code: "GATEWAY_RERANKER_PROBE_FAILED",
|
|
4790
|
+
});
|
|
4791
|
+
}
|
|
4150
4792
|
function finalizeVerifiedCandidate(verified, current, deps, gatewayConfig, request) {
|
|
4151
4793
|
persistGatewayConfig(withDiskGatewayEgress(verified.rawConfig, gatewayConfig.storagePath, deps, current === undefined, request.correlationId), gatewayConfig.storagePath, deps, request.correlationId);
|
|
4152
|
-
gatewayConfig.set(verified.config, true);
|
|
4794
|
+
gatewayConfig.set(verified.config, true, request.correlationId);
|
|
4795
|
+
for (const modelId of verified.testedModelIds) {
|
|
4796
|
+
gatewayConfig.recordVerifiedCapability(modelId, { conversationReady: true }, new Date().toISOString(), gatewayConfig.generation());
|
|
4797
|
+
}
|
|
4153
4798
|
logVoiceSetupResolution(verified.config, request.correlationId);
|
|
4799
|
+
reportRerankerResolution(deps, verified.rerankerResolution, request.correlationId);
|
|
4154
4800
|
recordGatewaySetupAudit(deps, request, verified.config, "candidate-accepted");
|
|
4155
4801
|
return setupSuccessResult(verified.config, verified.testedModelIds, verified.skippedModelIds, {
|
|
4156
4802
|
...(verified.unsupportedModels !== undefined
|
|
@@ -4171,8 +4817,11 @@ function finalizeVerifiedCandidate(verified, current, deps, gatewayConfig, reque
|
|
|
4171
4817
|
});
|
|
4172
4818
|
}
|
|
4173
4819
|
async function trySetupCandidate(baseUrl, request, deps, gatewayConfig, seams, current) {
|
|
4820
|
+
request.signal?.throwIfAborted();
|
|
4174
4821
|
const verified = await verifySetupCandidate({
|
|
4822
|
+
...(request.signal === undefined ? {} : { signal: request.signal }),
|
|
4175
4823
|
embeddingProbe: seams.embeddingProbe,
|
|
4824
|
+
rerankerProbe: seams.rerankerProbe,
|
|
4176
4825
|
preserveExisting: request.preserveExisting,
|
|
4177
4826
|
baseUrl,
|
|
4178
4827
|
apiKey: request.apiKey,
|
|
@@ -4202,6 +4851,7 @@ async function trySetupCandidate(baseUrl, request, deps, gatewayConfig, seams, c
|
|
|
4202
4851
|
diagnostics: deps.diagnostics,
|
|
4203
4852
|
correlationId: request.correlationId,
|
|
4204
4853
|
});
|
|
4854
|
+
request.signal?.throwIfAborted();
|
|
4205
4855
|
const workflowEligibilityError = validateWorkflowEligibleModelIds(request, verified.config);
|
|
4206
4856
|
if (workflowEligibilityError !== undefined)
|
|
4207
4857
|
return workflowEligibilityError;
|
|
@@ -4425,7 +5075,7 @@ function saveExistingConfigUpdate(request, current, deps, gatewayConfig) {
|
|
|
4425
5075
|
const persistedRawConfig = withPersistedGatewayEgress(rawConfig, gatewayConfig.storagePath, deps);
|
|
4426
5076
|
const config = parseGatewayConfig(withInheritedEgress(persistedRawConfig, currentGatewayEgressConfig(deps)), deps.env, linkLocalGatewayOverrideOptions(deps.env));
|
|
4427
5077
|
persistGatewayConfig(persistedRawConfig, gatewayConfig.storagePath, deps, request.correlationId);
|
|
4428
|
-
gatewayConfig.set(config, true);
|
|
5078
|
+
gatewayConfig.set(config, true, request.correlationId);
|
|
4429
5079
|
logVoiceSetupResolution(config, request.correlationId);
|
|
4430
5080
|
recordGatewaySetupAudit(deps, request, config, "existing-config-updated");
|
|
4431
5081
|
return setupSuccessResult(config, config.providers.map((provider) => provider.modelId), []);
|
|
@@ -4435,6 +5085,7 @@ async function verifyAndSaveExistingConfigUpdate(request, current, deps, gateway
|
|
|
4435
5085
|
if (figmaFailure !== undefined) {
|
|
4436
5086
|
return figmaFailure;
|
|
4437
5087
|
}
|
|
5088
|
+
request.signal?.throwIfAborted();
|
|
4438
5089
|
return saveExistingConfigUpdate(request, current, deps, gatewayConfig);
|
|
4439
5090
|
}
|
|
4440
5091
|
function shouldRequireDeploymentNames(request, baseUrlCandidates, env) {
|
|
@@ -4452,9 +5103,11 @@ function shouldRequireDeploymentNames(request, baseUrlCandidates, env) {
|
|
|
4452
5103
|
}
|
|
4453
5104
|
async function verifyAndSaveGatewaySetup(request, current, deps, gatewayConfig) {
|
|
4454
5105
|
const seams = {
|
|
4455
|
-
tester: gatewaySetupTester(deps, request.correlationId),
|
|
4456
|
-
embeddingProbe: gatewayEmbeddingProbe(deps, request.correlationId),
|
|
4457
|
-
|
|
5106
|
+
tester: gatewaySetupTester(deps, request.correlationId, request.signal),
|
|
5107
|
+
embeddingProbe: gatewayEmbeddingProbe(deps, request.correlationId, request.signal),
|
|
5108
|
+
rerankerProbe: gatewayRerankerProbe(deps, request.correlationId, request.signal),
|
|
5109
|
+
discovery: deps.gatewayModelDiscovery ??
|
|
5110
|
+
((...args) => defaultGatewayModelDiscovery(...args, request.signal)),
|
|
4458
5111
|
};
|
|
4459
5112
|
const figmaFailure = await verifySubmittedFigmaCredential(request, deps);
|
|
4460
5113
|
if (figmaFailure !== undefined) {
|
|
@@ -4489,6 +5142,8 @@ async function attemptSetupCandidates(baseUrlCandidates, request, deps, gatewayC
|
|
|
4489
5142
|
return { failures, result };
|
|
4490
5143
|
}
|
|
4491
5144
|
catch (error) {
|
|
5145
|
+
if (request.signal?.aborted === true)
|
|
5146
|
+
return { failures: [...failures, { baseUrl, error }] };
|
|
4492
5147
|
reportSetupVerificationFailure(deps, originalSetupVerificationError(error), request.correlationId, "gateway.setup.provider-verify");
|
|
4493
5148
|
failures.push({
|
|
4494
5149
|
baseUrl,
|
|
@@ -4497,11 +5152,15 @@ async function attemptSetupCandidates(baseUrlCandidates, request, deps, gatewayC
|
|
|
4497
5152
|
? { resumeTemporaryAdmission: error.resume }
|
|
4498
5153
|
: {}),
|
|
4499
5154
|
});
|
|
5155
|
+
if (discoveryProgrammingFailure(error))
|
|
5156
|
+
return { failures };
|
|
4500
5157
|
}
|
|
4501
5158
|
}
|
|
4502
5159
|
return { failures };
|
|
4503
5160
|
}
|
|
4504
5161
|
function temporaryAdmissionOrFailure(failures, request, deps, gatewayConfig, current) {
|
|
5162
|
+
if (request.signal?.aborted === true)
|
|
5163
|
+
return setupFailureResult(candidateFailureMessages(failures), request.correlationId);
|
|
4505
5164
|
const temporary = failures.find((failure) => temporaryGatewaySetupFailure(failure.error) && failure.resumeTemporaryAdmission !== undefined);
|
|
4506
5165
|
const resume = temporary?.resumeTemporaryAdmission;
|
|
4507
5166
|
if (resume !== undefined &&
|
|
@@ -4538,10 +5197,17 @@ export async function handleGatewaySetup(ctx, deps) {
|
|
|
4538
5197
|
if ("status" in request) {
|
|
4539
5198
|
return request;
|
|
4540
5199
|
}
|
|
4541
|
-
|
|
4542
|
-
|
|
5200
|
+
const cancellation = createRequestCancellation(ctx, "Gateway setup client disconnected.");
|
|
5201
|
+
const cancellableRequest = { ...request, signal: cancellation.signal };
|
|
5202
|
+
try {
|
|
5203
|
+
if (!request.verifyGateway && current !== undefined) {
|
|
5204
|
+
return await verifyAndSaveExistingConfigUpdate(cancellableRequest, current, deps, gatewayConfig);
|
|
5205
|
+
}
|
|
5206
|
+
return await verifyAndSaveGatewaySetup(cancellableRequest, current, deps, gatewayConfig);
|
|
5207
|
+
}
|
|
5208
|
+
finally {
|
|
5209
|
+
cancellation.dispose();
|
|
4543
5210
|
}
|
|
4544
|
-
return verifyAndSaveGatewaySetup(request, current, deps, gatewayConfig);
|
|
4545
5211
|
}
|
|
4546
5212
|
const VERIFIED_CAPABILITY_FIELDS = new Set([
|
|
4547
5213
|
"streaming",
|
|
@@ -4619,7 +5285,10 @@ function replaceModelCapability(config, modelId, fields, checkedAt = new Date().
|
|
|
4619
5285
|
const replacement = {
|
|
4620
5286
|
...current,
|
|
4621
5287
|
...fields,
|
|
4622
|
-
// The long-context probe proves a lower bound, so it may raise a stored window, never shrink
|
|
5288
|
+
// The long-context probe proves a lower bound, so it may raise a stored window, never shrink
|
|
5289
|
+
// it. It does not end an assumed or provider-reported window: only the provider's own
|
|
5290
|
+
// statement does (gateway-context-window.ts), so conversations keep planning the assumption and
|
|
5291
|
+
// the window probe keeps running, while the Coding Workbench reads the proven floor.
|
|
4623
5292
|
...(fields.contextWindow === undefined
|
|
4624
5293
|
? {}
|
|
4625
5294
|
: { contextWindow: Math.max(current.contextWindow, fields.contextWindow) }),
|
|
@@ -4710,13 +5379,13 @@ function persistVerifiedCapabilityUpdate(gatewayConfig, deps, modelId, generatio
|
|
|
4710
5379
|
// Continuing to route tool calls on the old in-memory proof would widen authority exactly when
|
|
4711
5380
|
// the latest provider observation says it is no longer justified.
|
|
4712
5381
|
if (!consumeObservation) {
|
|
4713
|
-
applyVerifiedCapabilityUpdate(gatewayConfig, modelId, generation, updated, false);
|
|
5382
|
+
applyVerifiedCapabilityUpdate(gatewayConfig, modelId, generation, updated, false, correlationId);
|
|
4714
5383
|
}
|
|
4715
5384
|
throw error;
|
|
4716
5385
|
}
|
|
4717
|
-
return applyVerifiedCapabilityUpdate(gatewayConfig, modelId, generation, updated, consumeObservation);
|
|
5386
|
+
return applyVerifiedCapabilityUpdate(gatewayConfig, modelId, generation, updated, consumeObservation, correlationId);
|
|
4718
5387
|
}
|
|
4719
|
-
function applyVerifiedCapabilityUpdate(gatewayConfig, modelId, generation, updated, consumeObservation = true) {
|
|
5388
|
+
function applyVerifiedCapabilityUpdate(gatewayConfig, modelId, generation, updated, consumeObservation = true, correlationId) {
|
|
4720
5389
|
// Persistence is synchronous, so no configuration mutation can interleave between the
|
|
4721
5390
|
// generation check in the handler and this consumption. Keep the live observation available
|
|
4722
5391
|
// when durable storage fails, allowing the operator to retry the exact verified update.
|
|
@@ -4742,7 +5411,7 @@ function applyVerifiedCapabilityUpdate(gatewayConfig, modelId, generation, updat
|
|
|
4742
5411
|
if (consumeObservation && !gatewayConfig.clearVerifiedCapability(modelId, generation)) {
|
|
4743
5412
|
return staleCapabilityObservationResult();
|
|
4744
5413
|
}
|
|
4745
|
-
gatewayConfig.set(updated, true);
|
|
5414
|
+
gatewayConfig.set(updated, true, correlationId);
|
|
4746
5415
|
for (const entry of observations) {
|
|
4747
5416
|
gatewayConfig.recordVerifiedCapability(entry.modelId, entry.fields, entry.observation?.checkedAt ?? new Date().toISOString());
|
|
4748
5417
|
}
|
|
@@ -4794,13 +5463,94 @@ export function reconcileGatewayContextWindowReadiness(deps, report, observedGen
|
|
|
4794
5463
|
if (reconciliation === undefined)
|
|
4795
5464
|
return;
|
|
4796
5465
|
const stored = findConfiguredCapability(reconciliation.current, report.modelId);
|
|
4797
|
-
if (stored?.kind !== "chat"
|
|
5466
|
+
if (stored?.kind !== "chat")
|
|
5467
|
+
return;
|
|
5468
|
+
if (stored.contextWindowAssumed !== true && stored.contextWindow >= verified)
|
|
4798
5469
|
return;
|
|
4799
5470
|
const updated = replaceModelCapability(reconciliation.current, report.modelId, { contextWindow: verified }, report.checkedAt);
|
|
4800
5471
|
if (updated === undefined)
|
|
4801
5472
|
return;
|
|
4802
5473
|
persistVerifiedCapabilityUpdate(reconciliation.gatewayConfig, deps, report.modelId, reconciliation.gatewayConfig.generation(), updated, false, correlationId);
|
|
4803
5474
|
}
|
|
5475
|
+
// A window the operator declared is the operator's cap: the provider may lower it (the deployment
|
|
5476
|
+
// cannot take more than it says) but never raise it. An assumed window and one a provider already
|
|
5477
|
+
// reported are learned values and follow the provider in either direction.
|
|
5478
|
+
function providerStatementLeavesWindow(stored, tokens) {
|
|
5479
|
+
if (stored.contextWindowAssumed === true)
|
|
5480
|
+
return false;
|
|
5481
|
+
if (stored.contextWindow === tokens)
|
|
5482
|
+
return true;
|
|
5483
|
+
return stored.contextWindowReported !== true && tokens > stored.contextWindow;
|
|
5484
|
+
}
|
|
5485
|
+
/**
|
|
5486
|
+
* Adopts the total context window a provider stated itself — in its overflow answer or in answer to
|
|
5487
|
+
* the startup context-window probe. Unlike the long-context probe's lower bound this is the
|
|
5488
|
+
* deployment's exact limit, so it ends an assumed window and replaces a learned one in either
|
|
5489
|
+
* direction; a declared window is only ever lowered. It is applied as a refinement: the
|
|
5490
|
+
* configuration generation stays, so a turn already admitted (the one whose overflow reported the
|
|
5491
|
+
* window) can re-plan and retry, while every later lookup plans the model with the real window. The
|
|
5492
|
+
* refinement is applied before the durable write, so an unwritable configuration file never keeps
|
|
5493
|
+
* the window unlearned: the write failure is reported as a diagnostic and the window applies in
|
|
5494
|
+
* memory until the next restart.
|
|
5495
|
+
*/
|
|
5496
|
+
export function persistAdoptedContextWindow(deps, modelId, contextWindowTokens, correlationId) {
|
|
5497
|
+
const reconciliation = currentToolCallingReconciliation(deps, undefined);
|
|
5498
|
+
if (reconciliation === undefined)
|
|
5499
|
+
return { state: "unconfigured" };
|
|
5500
|
+
const stored = findConfiguredCapability(reconciliation.current, modelId);
|
|
5501
|
+
if (stored?.kind !== "chat")
|
|
5502
|
+
return { state: "not-chat" };
|
|
5503
|
+
if (providerStatementLeavesWindow(stored, contextWindowTokens))
|
|
5504
|
+
return { state: "unchanged" };
|
|
5505
|
+
const updated = replaceCapabilityContextWindow(reconciliation.current, stored, contextWindowTokens);
|
|
5506
|
+
applyContextWindowRefinement(reconciliation.gatewayConfig, deps, modelId, updated, correlationId);
|
|
5507
|
+
return {
|
|
5508
|
+
state: "adopted",
|
|
5509
|
+
previousContextWindow: stored.contextWindow,
|
|
5510
|
+
wasAssumed: stored.contextWindowAssumed === true,
|
|
5511
|
+
};
|
|
5512
|
+
}
|
|
5513
|
+
function applyContextWindowRefinement(gatewayConfig, deps, modelId, updated, correlationId) {
|
|
5514
|
+
try {
|
|
5515
|
+
if (gatewayConfig.refine === undefined) {
|
|
5516
|
+
// Applies in memory even when the durable write fails, then rethrows the write failure.
|
|
5517
|
+
persistVerifiedCapabilityUpdate(gatewayConfig, deps, modelId, gatewayConfig.generation(), updated, false, correlationId);
|
|
5518
|
+
return;
|
|
5519
|
+
}
|
|
5520
|
+
gatewayConfig.refine(updated, correlationId);
|
|
5521
|
+
const raw = rawConfigForVerifiedCapabilityUpdate(updated, gatewayConfig.storagePath, deps);
|
|
5522
|
+
persistGatewayConfig(raw, gatewayConfig.storagePath, deps, correlationId);
|
|
5523
|
+
}
|
|
5524
|
+
catch (error) {
|
|
5525
|
+
emitServerDiagnostic(deps.diagnostics, serverDiagnosticFromError({
|
|
5526
|
+
correlationId,
|
|
5527
|
+
operation: "gateway.context-window",
|
|
5528
|
+
source: "gateway-setup.adopted-context-window",
|
|
5529
|
+
error,
|
|
5530
|
+
summary: "The verified gateway context window could not be persisted.",
|
|
5531
|
+
redact: (message) => String(deps.redactor(message)),
|
|
5532
|
+
}));
|
|
5533
|
+
}
|
|
5534
|
+
}
|
|
5535
|
+
// A declared window the provider lowered stays declared: the lowered value is the operator's cap
|
|
5536
|
+
// from now on, so a later statement can lower it further but never raise it past the ceiling the
|
|
5537
|
+
// operator set — not in this process and not after a restart (PR #3678 review, P1). Only an assumed
|
|
5538
|
+
// or already learned window becomes a reported one that follows the provider either way.
|
|
5539
|
+
function replaceCapabilityContextWindow(config, stored, contextWindow) {
|
|
5540
|
+
const declared = stored.contextWindowAssumed !== true && stored.contextWindowReported !== true;
|
|
5541
|
+
const replacement = {
|
|
5542
|
+
...withoutAssumedContextWindow(stored),
|
|
5543
|
+
contextWindow,
|
|
5544
|
+
...(declared ? {} : { contextWindowReported: true }),
|
|
5545
|
+
};
|
|
5546
|
+
const capabilities = [...(config.capabilities ?? [])];
|
|
5547
|
+
const index = capabilities.findIndex((capability) => capability.id === stored.id);
|
|
5548
|
+
if (index === -1)
|
|
5549
|
+
capabilities.push(replacement);
|
|
5550
|
+
else
|
|
5551
|
+
capabilities[index] = replacement;
|
|
5552
|
+
return { ...config, capabilities };
|
|
5553
|
+
}
|
|
4804
5554
|
function currentToolCallingReconciliation(deps, observedGeneration) {
|
|
4805
5555
|
const gatewayConfig = deps.gatewayConfig;
|
|
4806
5556
|
const current = gatewayConfig?.current();
|
|
@@ -4884,6 +5634,7 @@ function modelTokenCounterMetadata(options, modelId) {
|
|
|
4884
5634
|
function logDiscoveryMerge(merged, correlationId) {
|
|
4885
5635
|
logAliasIntersection({
|
|
4886
5636
|
alias: merged.id,
|
|
5637
|
+
role: discoveryRoleOf(merged),
|
|
4887
5638
|
contextWindow: merged.metadata.contextWindow ?? 0,
|
|
4888
5639
|
undeclaredLimit: merged.undeclaredContext === true,
|
|
4889
5640
|
deploymentCount: merged.deploymentCount ?? 1,
|
|
@@ -4893,6 +5644,11 @@ function logDiscoveryMerge(merged, correlationId) {
|
|
|
4893
5644
|
reasoningOptionCount: merged.metadata.reasoningEfforts?.length ?? 0,
|
|
4894
5645
|
}, correlationId);
|
|
4895
5646
|
}
|
|
5647
|
+
// The rerank engines travel as `unsupported` entries with the reason "rerank" until setup admits one,
|
|
5648
|
+
// but their role is "rerank": that is what an operator reading the log needs to see.
|
|
5649
|
+
function discoveryRoleOf(merged) {
|
|
5650
|
+
return merged.kind === "unsupported" && merged.reason === "rerank" ? "rerank" : merged.kind;
|
|
5651
|
+
}
|
|
4896
5652
|
function discoveryMergeState(merged) {
|
|
4897
5653
|
if (merged.deploymentConflict === true)
|
|
4898
5654
|
return "conflicting";
|