@oscharko-dev/keiko 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/csp-hashes.json +7 -7
- package/dist/ui/static/404.html +1 -1
- package/dist/ui/static/__next.__PAGE__.txt +10 -10
- package/dist/ui/static/__next._full.txt +12 -12
- package/dist/ui/static/__next._tree.txt +1 -1
- package/dist/ui/static/_next/static/chunks/{1gb6os129fico.js → 01rp_j2a-73pp.js} +1 -1
- package/dist/ui/static/_next/static/chunks/02i0eppipph7e.js +1 -0
- package/dist/ui/static/_next/static/chunks/0hc828_gdkyek.js +3 -0
- package/dist/ui/static/_next/static/chunks/0hq0i12hw0ypm.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0ak5o5brryicl.js → 18grpx4tuavds.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1be0-x1mk56wu.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0bbv42deftomm.js → 1c1gbfapof8m0.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{3d-10944zk2o9.js → 1lj5se4u-t-e9.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1th8j9weqwhgx.js → 1o2cihsnxhmh6.js} +1 -1
- package/dist/ui/static/_next/static/chunks/22x3pxeia7hk_.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0e6em7dg4gr6q.js → 25lgzefdnbdh6.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{182b4sf3i-krz.js → 29p86cxry0h-l.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{28mbnwl9g65al.js → 2ctd04x-fzbwc.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2jfg687n_mvf8.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2t2wftn5liinr.js → 2mnldrncbucm0.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{21t1klb1thn76.js → 306ima8lxo17-.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2dpxapmdvqlh1.js → 36-tv3y56oau8.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{0ks_l2sa4nfn0.js → 3aizxizjzdddj.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{3doin5vaz4zjs.js → 3fuqgie3p2068.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3k6g7nzn589fs.js +1 -0
- package/dist/ui/static/_next/static/chunks/3r4fz572q3l7s.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1lb8ju8qa0d9m.js → 40g2_9ovqiuiu.js} +1 -1
- package/dist/ui/static/_not-found/__next._full.txt +9 -9
- package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +8 -8
- package/dist/ui/static/_not-found/__next._tree.txt +1 -1
- package/dist/ui/static/_not-found.html +1 -1
- package/dist/ui/static/_not-found.txt +9 -9
- package/dist/ui/static/atlassian-connectors/__next._full.txt +13 -13
- package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +10 -10
- package/dist/ui/static/atlassian-connectors.html +1 -1
- package/dist/ui/static/atlassian-connectors.txt +13 -13
- package/dist/ui/static/index.html +1 -1
- package/dist/ui/static/index.txt +12 -12
- package/dist/ui/static/launch/__next._full.txt +12 -12
- package/dist/ui/static/launch/__next._tree.txt +1 -1
- package/dist/ui/static/launch/__next.launch.__PAGE__.txt +10 -10
- package/dist/ui/static/launch.html +1 -1
- package/dist/ui/static/launch.txt +12 -12
- package/dist/ui/static/local-knowledge/__next._full.txt +12 -12
- package/dist/ui/static/local-knowledge/__next._tree.txt +1 -1
- package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +10 -10
- package/dist/ui/static/local-knowledge/capsule/__next._full.txt +13 -13
- package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +10 -10
- package/dist/ui/static/local-knowledge/capsule.html +1 -1
- package/dist/ui/static/local-knowledge/capsule.txt +13 -13
- package/dist/ui/static/local-knowledge.html +1 -1
- package/dist/ui/static/local-knowledge.txt +12 -12
- package/node_modules/@oscharko-dev/keiko-cli/package.json +14 -14
- package/node_modules/@oscharko-dev/keiko-connectors/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-connectors/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-failure-class-contracts.d.ts +43 -3
- 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 +79 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts +645 -18
- 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 +768 -16
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts +7 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api-validation.js +2 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-constants.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-constants.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.d.ts +3 -0
- 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 -4
- package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +2 -2
- package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
- package/node_modules/@oscharko-dev/keiko-git/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-git/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/package.json +7 -7
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/config.js +4 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.js +127 -23
- 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 +32 -1
- 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 +12 -3
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/realtime-voice-adapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/realtime-voice-adapter.js +3 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/rerank-adapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/rerank-adapter.js +4 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +9 -1
- 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 +87 -5
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/speech-to-text-adapter.js +158 -10
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/text-to-speech-adapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/text-to-speech-adapter.js +176 -12
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +4 -4
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-sandbox/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 +7 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.js +21 -0
- package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts +6 -0
- 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 +299 -104
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +15 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +5 -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 +11 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts +24 -2
- 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 +215 -38
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-route-deadline.js +27 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts +33 -0
- 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 +256 -25
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-tool-calling-probe.d.ts +2 -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 +11 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/commitRoutes.d.ts +2 -1
- 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 +221 -38
- package/node_modules/@oscharko-dev/keiko-server/package.json +22 -22
- package/node_modules/@oscharko-dev/keiko-tool-catalog/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/package.json +7 -7
- package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
- package/package.json +26 -26
- package/release-impact.catalog.json +78 -23
- package/vendor/{oscharko-dev-keiko-cli-1.1.6.tgz → oscharko-dev-keiko-cli-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-connectors-1.1.6.tgz → oscharko-dev-keiko-connectors-1.1.7.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-contracts-1.1.7.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-evaluations-1.1.6.tgz → oscharko-dev-keiko-evaluations-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-evidence-1.1.6.tgz → oscharko-dev-keiko-evidence-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-git-1.1.6.tgz → oscharko-dev-keiko-git-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-harness-1.1.6.tgz → oscharko-dev-keiko-harness-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-local-knowledge-1.1.6.tgz → oscharko-dev-keiko-local-knowledge-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-capture-1.1.6.tgz → oscharko-dev-keiko-memory-capture-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-consolidation-1.1.6.tgz → oscharko-dev-keiko-memory-consolidation-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-governance-1.1.6.tgz → oscharko-dev-keiko-memory-governance-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-retrieval-1.1.6.tgz → oscharko-dev-keiko-memory-retrieval-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-vault-1.1.6.tgz → oscharko-dev-keiko-memory-vault-1.1.7.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-1.1.7.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-quality-intelligence-1.1.6.tgz → oscharko-dev-keiko-quality-intelligence-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-sandbox-1.1.6.tgz → oscharko-dev-keiko-sandbox-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-sdk-1.1.6.tgz → oscharko-dev-keiko-sdk-1.1.7.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-security-1.1.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-server-1.1.7.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-tool-catalog-1.1.6.tgz → oscharko-dev-keiko-tool-catalog-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-tools-1.1.6.tgz → oscharko-dev-keiko-tools-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-verification-1.1.6.tgz → oscharko-dev-keiko-verification-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-workflows-1.1.6.tgz → oscharko-dev-keiko-workflows-1.1.7.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-workspace-1.1.6.tgz → oscharko-dev-keiko-workspace-1.1.7.tgz} +0 -0
- package/dist/ui/static/_next/static/chunks/0c3w2ubla6ek6.js +0 -1
- package/dist/ui/static/_next/static/chunks/0gnizm29lk3ll.js +0 -1
- package/dist/ui/static/_next/static/chunks/19fesd0w1gjhp.js +0 -3
- package/dist/ui/static/_next/static/chunks/1k6f6m-u2q69-.js +0 -1
- package/dist/ui/static/_next/static/chunks/1pze64zkvx8vt.js +0 -1
- package/dist/ui/static/_next/static/chunks/2h_zvmb272ozs.js +0 -1
- package/dist/ui/static/_next/static/chunks/3-5_wuwrev-8c.js +0 -1
- package/dist/ui/static/_next/static/chunks/3-l-8qt163_y6.js +0 -1
- package/vendor/oscharko-dev-keiko-contracts-1.1.6.tgz +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-1.1.6.tgz +0 -0
- package/vendor/oscharko-dev-keiko-security-1.1.6.tgz +0 -0
- package/vendor/oscharko-dev-keiko-server-1.1.6.tgz +0 -0
- /package/dist/ui/static/_next/static/{ytpWXc-OicMB-rH2zX5b3 → nXnJJ05BP_rtUCiZsedfT}/_buildManifest.js +0 -0
- /package/dist/ui/static/_next/static/{ytpWXc-OicMB-rH2zX5b3 → nXnJJ05BP_rtUCiZsedfT}/_clientMiddlewareManifest.js +0 -0
- /package/dist/ui/static/_next/static/{ytpWXc-OicMB-rH2zX5b3 → nXnJJ05BP_rtUCiZsedfT}/_ssgManifest.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const KEIKO_MEMORY_CONSOLIDATION_VERSION: "1.1.
|
|
1
|
+
export declare const KEIKO_MEMORY_CONSOLIDATION_VERSION: "1.1.7";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const KEIKO_MEMORY_CONSOLIDATION_VERSION = "1.1.
|
|
1
|
+
export const KEIKO_MEMORY_CONSOLIDATION_VERSION = "1.1.7";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-memory-consolidation",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "MemoriaViva — Internal memory-consolidation package: pure-function engine that takes a bounded set of accepted MemoryRecords and returns proposed relationship edges, stale flags, and review items (multi-way duplicates and potential conflicts). The engine NEVER mutates accepted memories: every merge/supersession is routed through a ReviewItem so the caller (#211 MemoriaViva UI or a workflow) materializes the actual MemorySupersession envelope after explicit review. No IO, no clock, no randomness (caller supplies nowMs and id factories via ConsolidationOptions). ADR-0019 direction rule 3h (consolidation may depend only on keiko-contracts and keiko-security). Not published independently.",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@oscharko-dev/keiko-contracts": "1.1.
|
|
25
|
-
"@oscharko-dev/keiko-security": "1.1.
|
|
24
|
+
"@oscharko-dev/keiko-contracts": "1.1.7",
|
|
25
|
+
"@oscharko-dev/keiko-security": "1.1.7"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const KEIKO_MEMORY_GOVERNANCE_VERSION: "1.1.
|
|
1
|
+
export declare const KEIKO_MEMORY_GOVERNANCE_VERSION: "1.1.7";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const KEIKO_MEMORY_GOVERNANCE_VERSION = "1.1.
|
|
1
|
+
export const KEIKO_MEMORY_GOVERNANCE_VERSION = "1.1.7";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-memory-governance",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "MemoriaViva — Internal memory-governance package (Epic #204 child #209): pure-function envelope builders for user-driven corrections, conflict resolution, selective forgetting, expiration, pinning and archiving over Governed Enterprise Memory Vault records. Every public function returns a contracts-validated operation envelope (MemoryProposal / MemorySupersession / MemoryUpdate / MemoryForget / MemoryPin / MemoryUnpin / MemoryArchive) or a StatusTransition; the caller (vault #206, audit #214, MemoriaViva UI #211, retrieval #210) materialises the persistence side. Pinned memories cannot be silently selected for forget. No IO, no clock, no randomness (caller supplies nowMs). ADR-0019 direction rule 3i (governance may depend only on keiko-contracts and keiko-security). Not published independently.",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@oscharko-dev/keiko-contracts": "1.1.
|
|
25
|
-
"@oscharko-dev/keiko-security": "1.1.
|
|
24
|
+
"@oscharko-dev/keiko-contracts": "1.1.7",
|
|
25
|
+
"@oscharko-dev/keiko-security": "1.1.7"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const KEIKO_MEMORY_RETRIEVAL_VERSION: "1.1.
|
|
1
|
+
export declare const KEIKO_MEMORY_RETRIEVAL_VERSION: "1.1.7";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Single source of truth for the package version. Pinned as a literal so consumers can
|
|
2
2
|
// import it for telemetry or evidence persistence without parsing package.json at runtime.
|
|
3
3
|
// Bump in lockstep with package.json on every release.
|
|
4
|
-
export const KEIKO_MEMORY_RETRIEVAL_VERSION = "1.1.
|
|
4
|
+
export const KEIKO_MEMORY_RETRIEVAL_VERSION = "1.1.7";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-memory-retrieval",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "MemoriaViva — Internal memory-retrieval package (Epic #204 child #210): pure-function scoped retrieval + hybrid ranking + token-budgeted context assembly over Governed Enterprise Memory Vault records. Caller supplies a MemoryQueryPort (no keiko-memory-vault import) so the vault remains injectable and this layer stays pure (no IO, no clock, no randomness; caller supplies nowMs). Ranking combines deterministic lexical relevance, recency decay, provenance confidence, pinned boost, correction boost, and graph proximity into a weighted sum. The context block carries inclusion/omission reasons per memory so downstream callers (Conversation Center #212, workflow agents #213) and audit (#214) can render fully explainable surfaces. Suppression check is duplicated inline (synced with @oscharko-dev/keiko-memory-governance/suppression.ts) to keep the dep graph on contracts+security only. ADR-0019 direction rule 3j enforces this scope. Not published independently.",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@oscharko-dev/keiko-contracts": "1.1.
|
|
25
|
-
"@oscharko-dev/keiko-security": "1.1.
|
|
24
|
+
"@oscharko-dev/keiko-contracts": "1.1.7",
|
|
25
|
+
"@oscharko-dev/keiko-security": "1.1.7"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const KEIKO_MEMORY_VAULT_VERSION: "1.1.
|
|
1
|
+
export declare const KEIKO_MEMORY_VAULT_VERSION: "1.1.7";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const KEIKO_MEMORY_VAULT_VERSION = "1.1.
|
|
1
|
+
export const KEIKO_MEMORY_VAULT_VERSION = "1.1.7";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-memory-vault",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "MemoriaViva — Internal memory-vault package: governed enterprise memory storage (node:sqlite). Scope-isolated CRUD, edges, embeddings, tombstones, validator-gated boundary, redaction-aware writes (ADR-0019 + Epic #204). Not published independently.",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@oscharko-dev/keiko-contracts": "1.1.
|
|
25
|
-
"@oscharko-dev/keiko-security": "1.1.
|
|
24
|
+
"@oscharko-dev/keiko-contracts": "1.1.7",
|
|
25
|
+
"@oscharko-dev/keiko-security": "1.1.7"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AASA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAIL,8BAA8B,EAG/B,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEzF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EACV,oBAAoB,EAIpB,aAAa,EAGb,eAAe,EAIf,mBAAmB,EAGnB,wBAAwB,EAQzB,MAAM,YAAY,CAAC;AAEpB,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) {
|
|
|
24
24
|
];
|
|
25
25
|
return sha256Hex(canonicalise(binding));
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
// #3591: raised from 30s so an unconfigured provider's default already tolerates the field
|
|
28
|
+
// customer's slow LiteLLM/vLLM proxy instead of relying solely on the gateway's own silence/budget
|
|
29
|
+
// floors (resilience.ts) to compensate for a too-short default.
|
|
30
|
+
const DEFAULT_TIMEOUT_MS = 120_000;
|
|
28
31
|
const DEFAULT_MAX_RETRIES = 3;
|
|
29
32
|
const DEFAULT_RETRY_BASE_DELAY_MS = 500;
|
|
30
33
|
// KEIKO-0572: exported so gateway-setup.ts / grounded-retrieval-eval.ts can import the shared
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../src/gateway.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../src/gateway.ts"],"names":[],"mappings":"AAuBA,OAAO,EAOL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAkC,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAajG,OAAO,KAAK,EACV,KAAK,EACL,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,eAAe,EAEf,kBAAkB,EAClB,eAAe,EAEf,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,0FAA0F;AAC1F,MAAM,WAAW,kBAAkB;IACjC,OAAO,CACL,UAAU,EAAE,eAAe,EAC3B,OAAO,EAAE,kBAAkB,EAC3B,aAAa,EAAE,MAAM,GACpB,uBAAuB,CAAC;CAC5B;AAED,MAAM,WAAW,uBAAuB;IACtC,gGAAgG;IAChG,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI,CAAC;CAChD;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,GAAG,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IAED,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,iBAAiB;IA0BnB,IAAI,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAmDnE;YAEa,qBAAqB;IAkCnC,OAAO,CAAC,+BAA+B;IAkCvC,OAAO,CAAC,mBAAmB;IAoCpB,UAAU,CAAC,OAAO,EAAE,kBAAkB,GAAG,cAAc,CAAC,kBAAkB,CAAC,CA4DjF;IAED,OAAO,CAAC,UAAU;IAuBlB,OAAO,CAAC,cAAc;IAgDtB,OAAO,CAAC,aAAa;IAoBrB,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,kBAAkB;IAsB1B,OAAO,CAAC,eAAe;IAkCvB,OAAO,CAAC,gBAAgB;YAwBT,UAAU;IAsCzB,OAAO,CAAC,MAAM;IAiBd,OAAO,CAAC,UAAU;IASlB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,CAUnD;YAEa,MAAM;IAoCpB,OAAO,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,KAAK;IAoBb,OAAO,CAAC,YAAY;IAYpB,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,UAAU;CAcnB"}
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { activityLogEvent, defineActivityLogOperation, } from "@oscharko-dev/keiko-contracts/runtime/observability";
|
|
7
7
|
import { canonicalise, sha256Hex } from "@oscharko-dev/keiko-security/hashing";
|
|
8
|
-
import { CancelledError, ConfigInvalidError, ContextOverflowError, GatewayError, TransportError, UnknownModelError, } from "@oscharko-dev/keiko-security/errors/gateway";
|
|
8
|
+
import { CancelledError, ConfigInvalidError, ContextOverflowError, GatewayError, ProviderOutputExhaustedError, TransportError, UnknownModelError, } from "@oscharko-dev/keiko-security/errors/gateway";
|
|
9
9
|
import { deriveContextProfileFromCapability } from "@oscharko-dev/keiko-contracts/runtime/context-engineering";
|
|
10
10
|
import { findConfiguredCapability } from "./model-selection.js";
|
|
11
11
|
import { activityLogErrorKind, logEndpointHost, logLevelEnabled, logModelId, logTimer, resolveLogSink, } from "./observability.js";
|
|
12
12
|
import { OpenAiAdapter, ResponseRedactionError } from "./openai-adapter.js";
|
|
13
13
|
import { countGatewayPromptTokens } from "./prompt-token-accounting.js";
|
|
14
14
|
import { createGatewayToolCatalogBridge, GatewayToolCatalogError } from "./toolCatalogBridge.js";
|
|
15
|
-
import { CircuitBreaker, codingWorkbenchProviderTimeoutMs, executeWithRetry, providerRequestBudgetMs, providerRetryConfig, systemClock, } from "./resilience.js";
|
|
15
|
+
import { CircuitBreaker, codingWorkbenchProviderTimeoutMs, executeWithRetry, GATEWAY_BUFFERED_BUDGET_FLOOR_MS, GATEWAY_SILENCE_FLOOR_MS, providerRequestBudgetMs, providerRetryConfig, streamRequestBudgetMs, systemClock, } from "./resilience.js";
|
|
16
16
|
import { assertValidGatewaySamplingParameters } from "./types.js";
|
|
17
17
|
function callIds(requestId, request) {
|
|
18
18
|
return { requestId, correlationId: request.logContext?.correlationId ?? requestId };
|
|
@@ -184,6 +184,17 @@ const GATEWAY_CHAT_FAILED_OPERATION = defineActivityLogOperation({
|
|
|
184
184
|
dataClass: "closed-enum",
|
|
185
185
|
required: true,
|
|
186
186
|
},
|
|
187
|
+
// #3591: true only for a ProviderOutputExhaustedError — an HTTP 200 answer that spent its
|
|
188
|
+
// whole output budget on reasoning before any content — so an operator can tell that apart
|
|
189
|
+
// from an ordinary empty/failed provider answer without reaching for the sidecar's own record.
|
|
190
|
+
// `required: false` (PR #3602 review): emitted on every failure line since this field's
|
|
191
|
+
// introduction, but a record written by 1.1.6, before it existed, lacks it — a missing
|
|
192
|
+
// REQUIRED field reads as an incomplete record to the analyzer, which this field is not.
|
|
193
|
+
outputExhausted: {
|
|
194
|
+
type: "boolean",
|
|
195
|
+
dataClass: "closed-enum",
|
|
196
|
+
required: false,
|
|
197
|
+
},
|
|
187
198
|
},
|
|
188
199
|
causal: "correlation",
|
|
189
200
|
lifecycle: "failure",
|
|
@@ -277,6 +288,13 @@ const GATEWAY_STREAM_FAILED_OPERATION = defineActivityLogOperation({
|
|
|
277
288
|
dataClass: "closed-enum",
|
|
278
289
|
required: true,
|
|
279
290
|
},
|
|
291
|
+
// #3591: see gateway.chat.failed's identical field; `required: false` for the same reason
|
|
292
|
+
// (PR #3602 review).
|
|
293
|
+
outputExhausted: {
|
|
294
|
+
type: "boolean",
|
|
295
|
+
dataClass: "closed-enum",
|
|
296
|
+
required: false,
|
|
297
|
+
},
|
|
280
298
|
},
|
|
281
299
|
causal: "correlation",
|
|
282
300
|
lifecycle: "failure",
|
|
@@ -389,35 +407,95 @@ function attachGatewayRequestId(error, requestId) {
|
|
|
389
407
|
}
|
|
390
408
|
}
|
|
391
409
|
// Faults that never indicate the PROVIDER is unhealthy: a client-initiated cancel, our own invalid
|
|
392
|
-
// configuration,
|
|
393
|
-
//
|
|
394
|
-
//
|
|
395
|
-
//
|
|
396
|
-
//
|
|
397
|
-
|
|
410
|
+
// configuration, the gateway's own redaction pass refusing to walk a pathologically deep response
|
|
411
|
+
// body (review finding on PR #3394 — an untyped RangeError from that last case used to slip past
|
|
412
|
+
// this list and trip the breaker for an otherwise healthy model; ResponseRedactionError is now
|
|
413
|
+
// thrown instead, see openai-adapter.ts's redactUnknown), or a ProviderOutputExhaustedError (an
|
|
414
|
+
// HTTP 200 with `finish_reason: "length"` and no content — the model answered, it just spent its
|
|
415
|
+
// budget on reasoning; that is a caller-fixable budget problem, not evidence the provider is
|
|
416
|
+
// failing). A named, extensible list rather than a growing chain of `&&` conditions, so the next
|
|
417
|
+
// non-provider fault is one array entry away.
|
|
418
|
+
//
|
|
419
|
+
// TimeoutError is deliberately NOT here (review finding on PR #3602 — it was, briefly, during
|
|
420
|
+
// #3591's development). Excluding every timeout disabled the breaker's own outage guard: an
|
|
421
|
+
// upstream that never responds at all would cost every caller a full (multi-minute, with the new
|
|
422
|
+
// floors) attempt before failing, and the breaker would never open for it, no matter how many
|
|
423
|
+
// callers piled up. With `GATEWAY_SILENCE_FLOOR_MS`/`GATEWAY_BUFFERED_BUDGET_FLOOR_MS` this
|
|
424
|
+
// generous, a `TimeoutError` means the provider produced nothing for minutes — an outage-class
|
|
425
|
+
// signal, not the noise of a slow-but-alive gateway (which stays inside the floor and never times
|
|
426
|
+
// out at all) — so it counts as a provider failure again, exactly as it did before this PR.
|
|
427
|
+
const NON_PROVIDER_FAULTS = [
|
|
428
|
+
CancelledError,
|
|
429
|
+
ConfigInvalidError,
|
|
430
|
+
ResponseRedactionError,
|
|
431
|
+
ProviderOutputExhaustedError,
|
|
432
|
+
];
|
|
398
433
|
function isNonProviderFault(error) {
|
|
399
434
|
return NON_PROVIDER_FAULTS.some((errorClass) => error instanceof errorClass);
|
|
400
435
|
}
|
|
436
|
+
// A half-open probe that ends in a non-provider fault must still release the probe slot it
|
|
437
|
+
// claimed — `CircuitBreaker.recordNonProviderFault()` does exactly that, without counting the call
|
|
438
|
+
// as either a success or a failure (review finding on PR #3602: leaving the slot claimed forever
|
|
439
|
+
// stuck the breaker half-open, rejecting every later call once every probe slot was in this state).
|
|
401
440
|
function recordProviderFailure(breaker, error, correlationId) {
|
|
402
|
-
if (
|
|
403
|
-
breaker.
|
|
441
|
+
if (isNonProviderFault(error)) {
|
|
442
|
+
breaker.recordNonProviderFault();
|
|
443
|
+
return;
|
|
404
444
|
}
|
|
445
|
+
breaker.recordFailure(correlationId);
|
|
405
446
|
}
|
|
406
447
|
// Whether a buffered call reads each attempt's answer over the provider's stream (ADR-0003): the
|
|
407
448
|
// route's capability streams and the adapter can read a stream.
|
|
408
449
|
function readsOverStream(route, adapter) {
|
|
409
450
|
return route.capability.streaming && adapter.callStream !== undefined;
|
|
410
451
|
}
|
|
411
|
-
// The bounds of one attempt's streamed read:
|
|
412
|
-
//
|
|
413
|
-
//
|
|
414
|
-
|
|
452
|
+
// The bounds of one attempt's streamed read: its SILENCE bound comes from the route's own provider
|
|
453
|
+
// config (`effectiveSilenceMs`), never from the retry loop's per-attempt `timeoutMs` — the two
|
|
454
|
+
// diverge on purpose (see resilience.ts's buffered-vs-stream rule): the loop's attempt bound now
|
|
455
|
+
// floors to the much larger buffered-answer floor so a WHOLE-BODY attempt is not cut off early
|
|
456
|
+
// (#3591, PR #3602 review), but a read that can observe progress must still be watched for silence
|
|
457
|
+
// at the shorter floor. What is left of the call's budget bounds the read's total duration, so a
|
|
458
|
+
// long generation that keeps producing is not cut off at a fixed timeout and generated again
|
|
459
|
+
// (coding run 30).
|
|
460
|
+
function streamedReadBounds(attempt, remainingBudgetMs) {
|
|
415
461
|
if (!readsOverStream(attempt.route, attempt.adapter))
|
|
416
462
|
return undefined;
|
|
417
463
|
const budgetMs = remainingBudgetMs !== undefined && Number.isFinite(remainingBudgetMs)
|
|
418
|
-
? remainingBudgetMs
|
|
464
|
+
? Math.max(1, Math.floor(remainingBudgetMs))
|
|
419
465
|
: providerRequestBudgetMs(attempt.route.provider);
|
|
420
|
-
|
|
466
|
+
// The silence bound never grants more than what is left of the call's budget: a retry that
|
|
467
|
+
// starts with 120 s left is watched for 120 s, not for the 300 s floor, so the call can never
|
|
468
|
+
// overrun the `requestBudgetMs` its own lines report (PR #3602 review).
|
|
469
|
+
const silenceMs = Math.min(effectiveSilenceMs(attempt.route.provider), budgetMs);
|
|
470
|
+
return { silenceMs, budgetMs };
|
|
471
|
+
}
|
|
472
|
+
// The effective silence bound a read that can observe progress runs under (#3591): the provider's
|
|
473
|
+
// configured `timeoutMs`, floored so a slow-but-alive gateway is never treated as wedged before it
|
|
474
|
+
// has had a fair chance to answer. Used for `Gateway.chatStream()`'s native read and, inside
|
|
475
|
+
// `streamedReadBounds`, for a buffered `chat()` attempt that happens to read over the provider's
|
|
476
|
+
// own stream.
|
|
477
|
+
function effectiveSilenceMs(provider) {
|
|
478
|
+
return Math.max(provider.timeoutMs, GATEWAY_SILENCE_FLOOR_MS);
|
|
479
|
+
}
|
|
480
|
+
// The effective bound a WHOLE-BODY (unobservable) read runs under (#3591, PR #3602 review): the
|
|
481
|
+
// provider's configured `timeoutMs`, floored to the buffered-answer floor rather than the shorter
|
|
482
|
+
// silence floor, because a read that cannot observe progress has no "silence" to watch — the one
|
|
483
|
+
// number that bounds it must already cover the longest legitimate generation. Used for a buffered
|
|
484
|
+
// `chat()` attempt against a non-streaming adapter (mirrors resilience.ts's private
|
|
485
|
+
// `chatAttemptTimeoutMs`, which floors the SAME value for the retry loop's own bookkeeping) and for
|
|
486
|
+
// `chatStream()`'s buffered fallback, which degrades to the identical whole-body read.
|
|
487
|
+
function effectiveBufferedAttemptMs(provider) {
|
|
488
|
+
return Math.max(provider.timeoutMs, GATEWAY_BUFFERED_BUDGET_FLOOR_MS);
|
|
489
|
+
}
|
|
490
|
+
// The bounds of the ONE, unretried read `chatStream()` performs (ADR-0003): floored the same way
|
|
491
|
+
// every interactive gateway surface is (#3591) — a slow gateway is not a broken gateway. Unlike
|
|
492
|
+
// `streamedReadBounds` (the buffered `chat()` path's per-attempt bound), there is no retry budget
|
|
493
|
+
// to derive a total from, so both bounds come straight from the provider's own (possibly
|
|
494
|
+
// Coding-Workbench-raised) `timeoutMs`: the silence bound floored to the silence floor, the budget
|
|
495
|
+
// through `streamRequestBudgetMs` — the one derivation the route deadline behind a streamed call
|
|
496
|
+
// shares (PR #3602 review).
|
|
497
|
+
function chatStreamBounds(provider) {
|
|
498
|
+
return { silenceMs: effectiveSilenceMs(provider), budgetMs: streamRequestBudgetMs(provider) };
|
|
421
499
|
}
|
|
422
500
|
// One attempt's answer: over the provider's stream when the attempt has read bounds, whole
|
|
423
501
|
// otherwise.
|
|
@@ -612,7 +690,7 @@ export class Gateway {
|
|
|
612
690
|
...(attemptTimeoutMs === undefined ? {} : { timeoutMs: attemptTimeoutMs }),
|
|
613
691
|
};
|
|
614
692
|
try {
|
|
615
|
-
return await this.invoke(attempt.breaker, attempt.adapter, attempt.state.request, attempt.route.capability, attempt.correlationId, provider, streamedReadBounds(attempt,
|
|
693
|
+
return await this.invoke(attempt.breaker, attempt.adapter, attempt.state.request, attempt.route.capability, attempt.correlationId, provider, streamedReadBounds(attempt, remainingBudgetMs));
|
|
616
694
|
}
|
|
617
695
|
catch (error) {
|
|
618
696
|
if (attempt.state.attemptNumber <= attempt.route.provider.maxRetries) {
|
|
@@ -677,7 +755,10 @@ export class Gateway {
|
|
|
677
755
|
const start = this.clock.now();
|
|
678
756
|
const elapsed = logTimer();
|
|
679
757
|
const adapter = this.adapterFor(ids.requestId, route, ids.correlationId);
|
|
680
|
-
|
|
758
|
+
// streamFrom degrades to its buffered fallback without a native stream (#3591, PR #3602
|
|
759
|
+
// review); the started line must report the bound that branch actually applies.
|
|
760
|
+
const usesNativeStream = adapter.callStream !== undefined;
|
|
761
|
+
this.logCallStarted(ids, route, true, request.reasoningEffort, usesNativeStream);
|
|
681
762
|
let reservation;
|
|
682
763
|
let chunkCount = 0;
|
|
683
764
|
// The moment the caller saw its first actual content, timed off the same `elapsed()` as every
|
|
@@ -733,7 +814,10 @@ export class Gateway {
|
|
|
733
814
|
// and no failure, so without this the gateway is silent for exactly the window an operator is
|
|
734
815
|
// trying to diagnose. `timeoutMs` and `maxRetries` are on it because the pair bounds how long
|
|
735
816
|
// this silence can legitimately last: an attempt line whose deadline has already passed with no
|
|
736
|
-
// outcome is a wedge, not a slow provider.
|
|
817
|
+
// outcome is a wedge, not a slow provider. `timeoutMs` reports the bound THIS call's transport
|
|
818
|
+
// actually applies (PR #3602 review) — the silence floor for a call that reads incrementally
|
|
819
|
+
// (`upstreamStreaming`), the larger buffered floor for a whole-body read or `chatStream()`'s
|
|
820
|
+
// degraded fallback, never a value the transport itself does not honour.
|
|
737
821
|
logCallStarted(ids, route, streaming, reasoningEffort, upstreamStreaming = false) {
|
|
738
822
|
if (!logLevelEnabled(this.log, "info"))
|
|
739
823
|
return;
|
|
@@ -744,7 +828,12 @@ export class Gateway {
|
|
|
744
828
|
modelId: logModelId(route.provider.modelId),
|
|
745
829
|
...(endpointDigest === undefined ? {} : { endpointDigest }),
|
|
746
830
|
costClass: route.capability.costClass,
|
|
747
|
-
|
|
831
|
+
// The bound this call's transport actually applies: the silence floor when it reads
|
|
832
|
+
// incrementally (each chunk proves the provider alive), the buffered floor for a whole-body
|
|
833
|
+
// read or `chatStream()`'s degraded fallback for a non-streaming adapter.
|
|
834
|
+
timeoutMs: upstreamStreaming
|
|
835
|
+
? effectiveSilenceMs(route.provider)
|
|
836
|
+
: effectiveBufferedAttemptMs(route.provider),
|
|
748
837
|
maxRetries: route.provider.maxRetries,
|
|
749
838
|
...(reasoningEffort === undefined ? {} : { reasoningEffort }),
|
|
750
839
|
};
|
|
@@ -765,7 +854,12 @@ export class Gateway {
|
|
|
765
854
|
correlationId: ids.correlationId,
|
|
766
855
|
durationMs,
|
|
767
856
|
errorKind: activityLogErrorKind(error),
|
|
768
|
-
}, {
|
|
857
|
+
}, {
|
|
858
|
+
...callIdFields(ids),
|
|
859
|
+
modelId: logModelId(route.provider.modelId),
|
|
860
|
+
streaming: false,
|
|
861
|
+
outputExhausted: error instanceof ProviderOutputExhaustedError,
|
|
862
|
+
}));
|
|
769
863
|
}
|
|
770
864
|
logStreamCompleted(ids, route, chunkCount, durationMs, firstTokenMs, usage) {
|
|
771
865
|
this.log.write(activityLogEvent(GATEWAY_STREAM_COMPLETED_OPERATION, { level: "info", correlationId: ids.correlationId, durationMs }, {
|
|
@@ -805,6 +899,7 @@ export class Gateway {
|
|
|
805
899
|
// A mid-stream failure has already handed tokens to the caller and cannot be retried
|
|
806
900
|
// (chatStream is deliberately outside executeWithRetry); the count is how far it got.
|
|
807
901
|
afterFirstChunk: chunkCount > 0,
|
|
902
|
+
outputExhausted: error instanceof ProviderOutputExhaustedError,
|
|
808
903
|
}));
|
|
809
904
|
}
|
|
810
905
|
// Buffered completions only: the streaming path has its own outcome lines with their own fields
|
|
@@ -825,7 +920,7 @@ export class Gateway {
|
|
|
825
920
|
}
|
|
826
921
|
async *streamFrom(adapter, request, provider, ids) {
|
|
827
922
|
if (adapter.callStream !== undefined) {
|
|
828
|
-
yield* adapter.callStream(request, provider);
|
|
923
|
+
yield* adapter.callStream(request, provider, chatStreamBounds(provider));
|
|
829
924
|
return;
|
|
830
925
|
}
|
|
831
926
|
// Degradation: this adapter has no streaming variant, so the caller gets ONE synthetic delta
|
|
@@ -836,7 +931,16 @@ export class Gateway {
|
|
|
836
931
|
modelId: logModelId(provider.modelId),
|
|
837
932
|
reason: "adapter-has-no-stream",
|
|
838
933
|
}));
|
|
839
|
-
|
|
934
|
+
// This read is whole-body and cannot observe progress, exactly like a non-streaming-capable
|
|
935
|
+
// buffered chat() attempt, so it gets the SAME buffered floor rather than the (configured, or
|
|
936
|
+
// silence-floored) `provider.timeoutMs` the fallback used to pass through unbounded (PR #3602
|
|
937
|
+
// review): a healthy 45 s answer through a 30 s-configured provider was cut off while the
|
|
938
|
+
// started line above already claimed a 300 s effective timeout.
|
|
939
|
+
const bufferedProvider = {
|
|
940
|
+
...provider,
|
|
941
|
+
timeoutMs: effectiveBufferedAttemptMs(provider),
|
|
942
|
+
};
|
|
943
|
+
const response = await adapter.call(request, bufferedProvider);
|
|
840
944
|
yield { type: "delta", token: response.content };
|
|
841
945
|
yield { type: "done", response };
|
|
842
946
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-adapter.d.ts","sourceRoot":"","sources":["../src/openai-adapter.ts"],"names":[],"mappings":"AAUA,OAAO,EAOL,sBAAsB,
|
|
1
|
+
{"version":3,"file":"openai-adapter.d.ts","sourceRoot":"","sources":["../src/openai-adapter.ts"],"names":[],"mappings":"AAUA,OAAO,EAOL,sBAAsB,EAQvB,MAAM,6CAA6C,CAAC;AA6BrD,OAAO,EASL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,SAAS,EAET,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAElB,eAAe,E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YAgCxB,iBAAiB;YA0BjB,4BAA4B;IAgC1C,OAAO,CAAC,yBAAyB;IAmBjC,OAAO,CAAC,gBAAgB;YAmBV,QAAQ;YAgBR,aAAa;CAe5B"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// with no network I/O and no real time. The raw provider body is never echoed into
|
|
4
4
|
// an error; only a redacted, status-level summary is surfaced.
|
|
5
5
|
import { ACTIVITY_LOG_UNKNOWN_CORRELATION_ID, activityLogEvent, defineActivityLogOperation, } from "@oscharko-dev/keiko-contracts/runtime/observability";
|
|
6
|
-
import { AuthenticationError, CancelledError, ContextOverflowError, ERROR_CODES, GatewayEgressError, GatewayError, MalformedToolCallError, ModelRefusalError, ProviderError, RateLimitError, TimeoutError, TransportError, } from "@oscharko-dev/keiko-security/errors/gateway";
|
|
6
|
+
import { AuthenticationError, CancelledError, ContextOverflowError, ERROR_CODES, GatewayEgressError, GatewayError, MalformedToolCallError, ModelRefusalError, ProviderError, ProviderOutputExhaustedError, RateLimitError, TimeoutError, TransportError, } from "@oscharko-dev/keiko-security/errors/gateway";
|
|
7
7
|
import { sha256Hex } from "@oscharko-dev/keiko-security/hashing";
|
|
8
8
|
import { apiKeyHeaderValue, DEFAULT_API_KEY_HEADER_NAME, MAX_TIMER_DELAY_MS, trimTrailingSlash, } from "./config.js";
|
|
9
9
|
import { gatewayFetch, OutboundHttpEgressError, readJsonCapped, readSseStream, SseIdleTimeoutError, } from "./http.js";
|
|
@@ -41,6 +41,12 @@ const CHAT_REQUEST_DISPATCH_OPERATION = defineActivityLogOperation({
|
|
|
41
41
|
// Historical chat.request.dispatch lines predate this diagnostic; old bundles remain readable.
|
|
42
42
|
toolCount: { type: "integer", dataClass: "count", required: false },
|
|
43
43
|
readBudgetMs: { type: "number", dataClass: "duration", required: false },
|
|
44
|
+
// #3591: the output-token budget actually sent on the wire (as `max_tokens` or
|
|
45
|
+
// `max_completion_tokens`, per providerOutputTokenLimit) — absent when the request declared
|
|
46
|
+
// none, in which case the provider's own default governs. Lets an operator tell "the model
|
|
47
|
+
// spent a small budget on reasoning" (finish_reason "length", ProviderOutputExhaustedError)
|
|
48
|
+
// apart from "no budget was ever declared".
|
|
49
|
+
maxOutputTokens: { type: "integer", dataClass: "count", required: false },
|
|
44
50
|
},
|
|
45
51
|
causal: "correlation",
|
|
46
52
|
lifecycle: "start",
|
|
@@ -125,6 +131,16 @@ const CHAT_RESPONSE_STREAMED_OPERATION = defineActivityLogOperation({
|
|
|
125
131
|
silenceMs: { type: "number", dataClass: "duration", required: true },
|
|
126
132
|
readBudgetMs: { type: "number", dataClass: "duration", required: false },
|
|
127
133
|
silentForMs: { type: "number", dataClass: "duration", required: false },
|
|
134
|
+
// #3591: true only when this read failed on a ProviderOutputExhaustedError — an HTTP 200
|
|
135
|
+
// answer that spent its whole output budget on reasoning before any content — false on every
|
|
136
|
+
// other outcome, including a genuine success. `required: false` (PR #3602 review): a record
|
|
137
|
+
// written before this field existed (1.1.6) lacks it, and a missing REQUIRED field reads as an
|
|
138
|
+
// incomplete record to the analyzer, which this one is not.
|
|
139
|
+
outputExhausted: {
|
|
140
|
+
type: "boolean",
|
|
141
|
+
dataClass: "closed-enum",
|
|
142
|
+
required: false,
|
|
143
|
+
},
|
|
128
144
|
},
|
|
129
145
|
causal: "correlation",
|
|
130
146
|
lifecycle: "end",
|
|
@@ -161,7 +177,16 @@ function logChatDispatch(log, fields) {
|
|
|
161
177
|
const correlationId = logCorrelationId(log);
|
|
162
178
|
log.write(activityLogEvent(CHAT_REQUEST_DISPATCH_OPERATION, { level: "info", ...(correlationId === undefined ? {} : { correlationId }) }, fields));
|
|
163
179
|
}
|
|
180
|
+
// The output-token budget actually placed on the wire, whichever of `max_tokens` /
|
|
181
|
+
// `max_completion_tokens` `providerOutputTokenLimit` chose for this provider — the single source
|
|
182
|
+
// both `buildBody`/`buildStreamBody` and this dispatch line derive from, so the two can never drift
|
|
183
|
+
// (#3591).
|
|
184
|
+
function dispatchedMaxOutputTokens(request, config) {
|
|
185
|
+
const limit = providerOutputTokenLimit(request.maxOutputTokens, config);
|
|
186
|
+
return limit.max_tokens ?? limit.max_completion_tokens;
|
|
187
|
+
}
|
|
164
188
|
function chatDispatchFields(url, request, config, body, stream, includeUsage, bounds) {
|
|
189
|
+
const maxOutputTokens = dispatchedMaxOutputTokens(request, config);
|
|
165
190
|
return {
|
|
166
191
|
endpointDigest: sha256Hex(logEndpointHost(url) ?? "invalid-endpoint"),
|
|
167
192
|
modelId: logModelId(config.modelId),
|
|
@@ -172,6 +197,7 @@ function chatDispatchFields(url, request, config, body, stream, includeUsage, bo
|
|
|
172
197
|
...(stream ? { streamUsageRequested: includeUsage } : {}),
|
|
173
198
|
toolCount: request.tools?.length ?? 0,
|
|
174
199
|
...(bounds === undefined ? {} : { readBudgetMs: bounds.budgetMs }),
|
|
200
|
+
...(maxOutputTokens === undefined ? {} : { maxOutputTokens }),
|
|
175
201
|
};
|
|
176
202
|
}
|
|
177
203
|
function cancellationWasDeadline(signal) {
|
|
@@ -502,6 +528,10 @@ function assertUsableAssistantResponse(response, modelId, secrets) {
|
|
|
502
528
|
if (response.content.trim().length > 0 || response.toolCalls.length > 0) {
|
|
503
529
|
return;
|
|
504
530
|
}
|
|
531
|
+
// The budget ran out before any content: a reasoning model spent it on reasoning (#3591).
|
|
532
|
+
if (response.finishReason === "length") {
|
|
533
|
+
throw new ProviderOutputExhaustedError(modelId, secrets);
|
|
534
|
+
}
|
|
505
535
|
throw new ProviderError(`provider returned an empty assistant response for '${modelId}'`, PROVIDER_EMPTY_ASSISTANT_STATUS, secrets);
|
|
506
536
|
}
|
|
507
537
|
function errorSignal(payload) {
|
|
@@ -933,6 +963,7 @@ export class OpenAiAdapter {
|
|
|
933
963
|
}, {
|
|
934
964
|
...streamReadFields(read, report, outcome),
|
|
935
965
|
...(settled ? {} : { silentForMs: durationMs - report.lastDataMs }),
|
|
966
|
+
outputExhausted: error instanceof ProviderOutputExhaustedError,
|
|
936
967
|
}));
|
|
937
968
|
}
|
|
938
969
|
// Retain the usage the stream had already accumulated (counts only, never
|
package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-embedding-adapter.d.ts","sourceRoot":"","sources":["../src/openai-embedding-adapter.ts"],"names":[],"mappings":"AAkBA,OAAO,EAQL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"openai-embedding-adapter.d.ts","sourceRoot":"","sources":["../src/openai-embedding-adapter.ts"],"names":[],"mappings":"AAkBA,OAAO,EAQL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAuZlF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAIvD,QAAQ,CAAC,aAAa,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzC,QAAQ,CAAC,GAAG,C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AAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAMzB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,sBAAsB,EAAE,CAAC;CACtD,CAAC;AAEN,MAAM,MAAM,sBAAsB,GAC9B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAA;CAAE,GAC7D;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9F,MAAM,MAAM,wBAAwB,GAChC,cAAc,GACd,cAAc,GACd,mBAAmB,GACnB,SAAS,GACT,WAAW,GACX,WAAW,GAIX,YAAY,GACZ,mBAAmB,GACnB,qBAAqB,GACrB,qBAAqB,GACrB,yBAAyB,GACzB,gBAAgB,GAChB,kBAAkB,CAAC;AA0PvB,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,sBAAsB,CAAC,CAuBjC;AAmDD,wBAAgB,8BAA8B,IAAI,IAAI,CAIrD;AA4VD,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,2BAA2B,CAAC,CAUtC;AAuMD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE1F"}
|
|
@@ -6,10 +6,19 @@ import { sha256Hex } from "@oscharko-dev/keiko-security/hashing";
|
|
|
6
6
|
import { apiKeyHeaderValue, trimTrailingSlash } from "./config.js";
|
|
7
7
|
import { gatewayFetch, OutboundHttpEgressError, readJsonCapped, } from "./http.js";
|
|
8
8
|
import { logCorrelationId, logEndpointHost, logLevelEnabled, logModelId, logTimer, resolveLogSink, withCorrelationId, } from "./observability.js";
|
|
9
|
+
import { GATEWAY_RETRIEVAL_TIMEOUT_FLOOR_MS } from "./resilience.js";
|
|
9
10
|
// The wire default for one embedding request, shared by the scalar path, the array path, the
|
|
10
11
|
// per-item fallback and the ladder budget. Named rather than repeated so the attempt line's
|
|
11
12
|
// `timeoutMs` cannot report a deadline the request is not actually running under.
|
|
12
13
|
const DEFAULT_EMBEDDING_TIMEOUT_MS = 30_000;
|
|
14
|
+
// #3591: the per-call floor a single outbound embedding HTTP request's deadline may never go
|
|
15
|
+
// below, regardless of a smaller configured value — a slow gateway is not a broken gateway.
|
|
16
|
+
// Deliberately NOT applied inside `ladderDeadlineMs` / `perItemTimeoutMs`: the scalar-fallback
|
|
17
|
+
// ladder's own bookkeeping deadline must stay driven by exactly what the caller configured
|
|
18
|
+
// (including an intentionally exhausted budget of 0), or the ladder could never expire.
|
|
19
|
+
function effectiveEmbeddingTimeoutMs(timeoutMs) {
|
|
20
|
+
return Math.max(timeoutMs ?? DEFAULT_EMBEDDING_TIMEOUT_MS, GATEWAY_RETRIEVAL_TIMEOUT_FLOOR_MS);
|
|
21
|
+
}
|
|
13
22
|
const EMBEDDING_OPERATION_BASE = {
|
|
14
23
|
contractKind: "activity-log-operation",
|
|
15
24
|
schemaVersion: 1,
|
|
@@ -478,7 +487,7 @@ function buildEmbeddingRequest(request, input, minimalShape) {
|
|
|
478
487
|
...(minimalShape ? {} : { encoding_format: "float" }),
|
|
479
488
|
...(request.dimensions !== undefined ? { dimensions: request.dimensions } : {}),
|
|
480
489
|
});
|
|
481
|
-
const timeoutSignal = AbortSignal.timeout(request.timeoutMs
|
|
490
|
+
const timeoutSignal = AbortSignal.timeout(effectiveEmbeddingTimeoutMs(request.timeoutMs));
|
|
482
491
|
const signal = request.signal !== undefined ? AbortSignal.any([timeoutSignal, request.signal]) : timeoutSignal;
|
|
483
492
|
return {
|
|
484
493
|
url: joinUrl(request),
|
|
@@ -502,7 +511,7 @@ function logScalarDispatch(log, request, built, minimalShape) {
|
|
|
502
511
|
modelId: logModelId(request.modelId),
|
|
503
512
|
inputCount: 1,
|
|
504
513
|
bodyBytes: Buffer.byteLength(built.body, "utf8"),
|
|
505
|
-
timeoutMs: request.timeoutMs
|
|
514
|
+
timeoutMs: effectiveEmbeddingTimeoutMs(request.timeoutMs),
|
|
506
515
|
minimalShape,
|
|
507
516
|
};
|
|
508
517
|
log.write(activityLogEvent(EMBEDDING_REQUEST_DISPATCH_OPERATION, embeddingEnvelope(log, "info"), fields));
|
|
@@ -681,7 +690,7 @@ function logBatchDispatch(log, request, built, minimalShape) {
|
|
|
681
690
|
modelId: logModelId(request.modelId),
|
|
682
691
|
inputCount: request.inputs.length,
|
|
683
692
|
bodyBytes: Buffer.byteLength(built.body, "utf8"),
|
|
684
|
-
timeoutMs: request.timeoutMs
|
|
693
|
+
timeoutMs: effectiveEmbeddingTimeoutMs(request.timeoutMs),
|
|
685
694
|
minimalShape,
|
|
686
695
|
};
|
|
687
696
|
log.write(activityLogEvent(EMBEDDING_BATCH_DISPATCH_OPERATION, embeddingEnvelope(log, "info"), fields));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realtime-voice-adapter.d.ts","sourceRoot":"","sources":["../src/realtime-voice-adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"realtime-voice-adapter.d.ts","sourceRoot":"","sources":["../src/realtime-voice-adapter.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAW7E,eAAO,MAAM,aAAa,SAAU,CAAC;AAKrC,8FAA8F;AAC9F,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAC3E,+FAA+F;AAC/F,eAAO,MAAM,8CAA8C,yBAAyB,CAAC;AACrF,qGAAqG;AACrG,eAAO,MAAM,eAAe,YAC1B,OAAO,EACP,KAAK,EACL,QAAQ,E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ACX,mBAAmB,GACnB,qBAAqB,GACrB,qBAAqB,GACrB,yBAAyB,GACzB,gBAAgB,GAChB,kBAAkB,CAAC;AA4WvB,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,0BAA0B,CAAC,CAkBrC"}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// (voice-protocol.ts redaction class): they are never logged or persisted here.
|
|
20
20
|
import { apiKeyHeaderValue, trimTrailingSlash } from "./config.js";
|
|
21
21
|
import { randomUUID } from "node:crypto";
|
|
22
|
+
import { GATEWAY_VOICE_TIMEOUT_FLOOR_MS } from "./resilience.js";
|
|
22
23
|
import { gatewayFetch, OutboundHttpEgressError, readJsonCapped, } from "./http.js";
|
|
23
24
|
import { providerSpeechLanguage } from "./provider-language.js";
|
|
24
25
|
// #3409 AC6: a Realtime adapter that cannot represent tools must reject a caller-supplied `tools`
|
|
@@ -151,7 +152,8 @@ function buildRequest(request) {
|
|
|
151
152
|
"content-length": String(typeof body === "string" ? Buffer.byteLength(body, "utf8") : body.size),
|
|
152
153
|
[name]: apiKeyHeaderValue(name, request.apiKey),
|
|
153
154
|
};
|
|
154
|
-
|
|
155
|
+
// #3591: per-call floor — a slow gateway's voice call is not a broken one.
|
|
156
|
+
const timeoutSignal = AbortSignal.timeout(Math.max(request.timeoutMs ?? 30_000, GATEWAY_VOICE_TIMEOUT_FLOOR_MS));
|
|
155
157
|
const signal = request.signal !== undefined ? AbortSignal.any([timeoutSignal, request.signal]) : timeoutSignal;
|
|
156
158
|
return {
|
|
157
159
|
url: joinUrl(request.endpoint),
|