@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
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
// diff-backed commit draft has its own explicit endpoint, so the read-only preview never hides model
|
|
21
21
|
// latency, cost, or an unavailable model behind ordinary staging changes.
|
|
22
22
|
import { selectConfiguredModel, } from "@oscharko-dev/keiko-model-gateway";
|
|
23
|
+
import { ProviderOutputExhaustedError, TimeoutError } from "@oscharko-dev/keiko-security";
|
|
23
24
|
import { analyzeGitCommitIntent } from "@oscharko-dev/keiko-contracts/runtime/git-commit-intent";
|
|
24
25
|
import { evaluateGitDeliveryEffectivePolicy, evaluateGitPolicy, } from "@oscharko-dev/keiko-contracts/runtime/git-delivery-policy";
|
|
25
26
|
import { gitDeliveryRiskClassForInputs } from "@oscharko-dev/keiko-contracts/runtime/git-delivery";
|
|
@@ -27,6 +28,7 @@ import { validateGitCommitMessage } from "@oscharko-dev/keiko-contracts/runtime/
|
|
|
27
28
|
import { activityLogEvent, defineActivityLogOperation, } from "@oscharko-dev/keiko-contracts/runtime/observability";
|
|
28
29
|
import { evaluateGitPreflight, summarizeStagedChangeset, } from "@oscharko-dev/keiko-tools";
|
|
29
30
|
import { correlationIdOrUnknown, UNKNOWN_CORRELATION_ID } from "../correlation.js";
|
|
31
|
+
import { gatewayRouteDeadlineMs } from "../gateway-route-deadline.js";
|
|
30
32
|
import { emitServerDiagnostic, serverDiagnosticFromError } from "../diagnostics-log.js";
|
|
31
33
|
import { processServerLogSink } from "../process-log-sink.js";
|
|
32
34
|
import { requiresConfiguredManagedWorkspaceAuthority } from "../task-workspace/workspace-root-access.js";
|
|
@@ -72,9 +74,13 @@ const COMMIT_DRAFT_COMPLETED_OPERATION = defineActivityLogOperation({
|
|
|
72
74
|
owner: "keiko-server",
|
|
73
75
|
emitter: "gitDelivery/commitRoutes.logCommitDraft",
|
|
74
76
|
fields: {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
// The staged changeset's counts, present once the route has read it. A client that
|
|
78
|
+
// disconnects before that read ends the draft as `GIT_DELIVERY_COMMIT_DRAFT_CANCELLED` with
|
|
79
|
+
// the counts absent, never invented (PR #3602 review): an absent count means "not observed",
|
|
80
|
+
// a zero means "observed and empty".
|
|
81
|
+
stagedFileCount: { type: "integer", dataClass: "count", required: false },
|
|
82
|
+
areaCount: { type: "integer", dataClass: "count", required: false },
|
|
83
|
+
touchesTests: { type: "boolean", dataClass: "closed-enum", required: false },
|
|
78
84
|
outcome: {
|
|
79
85
|
type: "string",
|
|
80
86
|
dataClass: "closed-enum",
|
|
@@ -91,12 +97,21 @@ const COMMIT_DRAFT_COMPLETED_OPERATION = defineActivityLogOperation({
|
|
|
91
97
|
"GIT_DELIVERY_COMMIT_FORBIDDEN_PAYLOAD",
|
|
92
98
|
"GIT_DELIVERY_COMMIT_DRAFT_FAILED",
|
|
93
99
|
"GIT_DELIVERY_COMMIT_DRAFT_INVALID_OUTPUT",
|
|
100
|
+
"GIT_DELIVERY_COMMIT_DRAFT_OUTPUT_EXHAUSTED",
|
|
101
|
+
"GIT_DELIVERY_COMMIT_DRAFT_TIMED_OUT",
|
|
102
|
+
"GIT_DELIVERY_COMMIT_DRAFT_CANCELLED",
|
|
94
103
|
"GIT_DELIVERY_COMMIT_DRAFT_MODEL_UNAVAILABLE",
|
|
95
104
|
"GIT_DELIVERY_COMMIT_DRAFT_NO_CHANGES",
|
|
96
105
|
"GIT_DELIVERY_COMMIT_UNKNOWN_PROJECT",
|
|
97
106
|
"GIT_DELIVERY_COMMIT_WORKTREE_UNAVAILABLE",
|
|
98
107
|
],
|
|
99
108
|
},
|
|
109
|
+
// #3591 (1.1.7): the bounds the model call ran under, present once a model was resolved — the
|
|
110
|
+
// output allowance sent (the raised draft budget, clamped to the model's declared limit) and
|
|
111
|
+
// the route's own deadline behind the gateway's floors — so an exhausted or timed-out draft
|
|
112
|
+
// can be reconstructed from this line alone.
|
|
113
|
+
maxOutputTokens: { type: "integer", dataClass: "count", required: false },
|
|
114
|
+
deadlineMs: { type: "integer", dataClass: "duration", required: false },
|
|
100
115
|
},
|
|
101
116
|
causal: "correlation",
|
|
102
117
|
lifecycle: "end",
|
|
@@ -105,11 +120,21 @@ const COMMIT_DRAFT_COMPLETED_OPERATION = defineActivityLogOperation({
|
|
|
105
120
|
proofIds: ["git.commit.draft.completed.emitted-line"],
|
|
106
121
|
releaseImpact: "patch",
|
|
107
122
|
});
|
|
123
|
+
// #3591: an output-exhausted answer is not shape-invalid (the model simply spent its whole budget
|
|
124
|
+
// before finishing), but it is just as unusable as a malformed one, so it shares the
|
|
125
|
+
// "validation-failed" errorKind with GIT_DELIVERY_COMMIT_DRAFT_INVALID_OUTPUT — the precise class
|
|
126
|
+
// still survives on the record via the `failureCode` field below.
|
|
108
127
|
function commitDraftErrorKind(code) {
|
|
109
128
|
if (code === "GIT_DELIVERY_COMMIT_DRAFT_MODEL_UNAVAILABLE")
|
|
110
129
|
return "unavailable";
|
|
111
|
-
if (code === "
|
|
130
|
+
if (code === "GIT_DELIVERY_COMMIT_DRAFT_TIMED_OUT")
|
|
131
|
+
return "timeout";
|
|
132
|
+
if (code === "GIT_DELIVERY_COMMIT_DRAFT_CANCELLED")
|
|
133
|
+
return "cancelled";
|
|
134
|
+
if (code === "GIT_DELIVERY_COMMIT_DRAFT_INVALID_OUTPUT" ||
|
|
135
|
+
code === "GIT_DELIVERY_COMMIT_DRAFT_OUTPUT_EXHAUSTED") {
|
|
112
136
|
return "validation-failed";
|
|
137
|
+
}
|
|
113
138
|
if (code === "GIT_DELIVERY_COMMIT_DRAFT_NO_CHANGES")
|
|
114
139
|
return "conflict";
|
|
115
140
|
return "internal";
|
|
@@ -119,7 +144,10 @@ const SAFE_MESSAGES = {
|
|
|
119
144
|
GIT_DELIVERY_COMMIT_PAYLOAD_TOO_LARGE: "The governed commit request exceeds the maximum size.",
|
|
120
145
|
GIT_DELIVERY_COMMIT_FORBIDDEN_PAYLOAD: "The request contained a forbidden field. Requests may not carry credentials, headers, or URLs.",
|
|
121
146
|
GIT_DELIVERY_COMMIT_DRAFT_FAILED: "Keiko could not generate a commit draft from the staged diff.",
|
|
147
|
+
GIT_DELIVERY_COMMIT_DRAFT_CANCELLED: "The commit draft was cancelled because the client disconnected before it was ready.",
|
|
122
148
|
GIT_DELIVERY_COMMIT_DRAFT_INVALID_OUTPUT: "Keiko generated a commit draft that did not pass validation.",
|
|
149
|
+
GIT_DELIVERY_COMMIT_DRAFT_OUTPUT_EXHAUSTED: "Keiko's model spent its whole output budget reasoning about the change and produced no draft. Retry, or write the commit message yourself.",
|
|
150
|
+
GIT_DELIVERY_COMMIT_DRAFT_TIMED_OUT: "The gateway did not answer in time; the draft was not generated. Retry, or write the message yourself.",
|
|
123
151
|
GIT_DELIVERY_COMMIT_DRAFT_MODEL_UNAVAILABLE: "No compatible model is available for commit draft generation.",
|
|
124
152
|
GIT_DELIVERY_COMMIT_DRAFT_NO_CHANGES: "Stage one or more changes before asking Keiko to draft a commit message.",
|
|
125
153
|
GIT_DELIVERY_COMMIT_UNKNOWN_PROJECT: "The requested project is not a known workspace.",
|
|
@@ -133,8 +161,19 @@ const UTF8 = new TextEncoder();
|
|
|
133
161
|
const KEIKO_GENERATED_FOOTER = "🤖 Generated with [Keiko](https://github.com/oscharko-dev/Keiko)";
|
|
134
162
|
const COMMIT_DRAFT_DIFF_MAX_CHARS = 90_000;
|
|
135
163
|
const COMMIT_DRAFT_INSTRUCTION_MAX_CHARS = 1_500;
|
|
136
|
-
|
|
137
|
-
|
|
164
|
+
// #3591 (1.1.7): a LiteLLM-fronted vLLM gateway at peak load can take 30-120s or longer to answer.
|
|
165
|
+
// The flat 30s AbortSignal this route used to pass as `cancellationSignal` capped the WHOLE buffered
|
|
166
|
+
// gateway call -- including the gateway's own internal retries -- so a healthy but slow answer was
|
|
167
|
+
// reported as GIT_DELIVERY_COMMIT_DRAFT_FAILED, indistinguishable from a real outage.
|
|
168
|
+
// `latencyProfile: "coding-workbench"` on the built request (buildCommitDraftModelRequest) asks the
|
|
169
|
+
// gateway to apply the coding-workbench PER-ATTEMPT floor; the route's own backstop is derived from
|
|
170
|
+
// that same retry budget (`gatewayRouteDeadlineMs`, shared with the Coding Workbench route) so it
|
|
171
|
+
// always sits BEHIND the gateway's clock and never becomes the shorter, primary timeout.
|
|
172
|
+
// A reasoning model (gpt-oss / gemma thinking) spends output tokens on its reasoning trace before
|
|
173
|
+
// its first answer token. 700 was tight enough that the whole budget was consumed by reasoning,
|
|
174
|
+
// leaving `finish_reason: "length"` and no usable content (#3591). 4,000 gives a reasoning model
|
|
175
|
+
// room to think AND still answer.
|
|
176
|
+
export const COMMIT_DRAFT_MAX_OUTPUT_TOKENS = 4_000;
|
|
138
177
|
const LOCAL_USER_COMMIT_AUTHORITY = {
|
|
139
178
|
runId: "local-user-git-widget",
|
|
140
179
|
envelopeDigest: "0".repeat(64),
|
|
@@ -391,7 +430,23 @@ function resolveCommitDraftModel(deps) {
|
|
|
391
430
|
const model = deps.modelPortFactory(modelId);
|
|
392
431
|
if (model === undefined)
|
|
393
432
|
return undefined;
|
|
394
|
-
return {
|
|
433
|
+
return {
|
|
434
|
+
model,
|
|
435
|
+
modelId,
|
|
436
|
+
useResponseFormat: structuredModelId !== undefined,
|
|
437
|
+
maxOutputTokens: commitDraftOutputTokens(config.capabilities ?? [], modelId),
|
|
438
|
+
// The draft only buffers, so its backstop follows the buffered budget alone (PR #3602 review).
|
|
439
|
+
deadlineMs: gatewayRouteDeadlineMs(config, modelId, ["buffered"]),
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
// #3591 review: the raised draft budget must not exceed what the model declares. The spend-budget
|
|
443
|
+
// port refuses a request above `capability.maxOutputTokens` before any provider call, and a
|
|
444
|
+
// provider would reject it; a model that declares no limit (0) keeps the full draft budget.
|
|
445
|
+
function commitDraftOutputTokens(capabilities, modelId) {
|
|
446
|
+
const declared = capabilities.find((capability) => capability.id === modelId)?.maxOutputTokens;
|
|
447
|
+
return declared !== undefined && declared > 0
|
|
448
|
+
? Math.min(COMMIT_DRAFT_MAX_OUTPUT_TOKENS, declared)
|
|
449
|
+
: COMMIT_DRAFT_MAX_OUTPUT_TOKENS;
|
|
395
450
|
}
|
|
396
451
|
function boundedStagedDiff(diff) {
|
|
397
452
|
if (diff.length <= COMMIT_DRAFT_DIFF_MAX_CHARS)
|
|
@@ -427,10 +482,13 @@ function buildCommitDraftModelRequest(input) {
|
|
|
427
482
|
{ role: "user", content: commitDraftEvidence(input) },
|
|
428
483
|
],
|
|
429
484
|
...(input.useResponseFormat ? { responseFormat: COMMIT_DRAFT_RESPONSE_FORMAT } : {}),
|
|
430
|
-
maxOutputTokens:
|
|
485
|
+
maxOutputTokens: input.maxOutputTokens,
|
|
431
486
|
temperature: 0.2,
|
|
432
487
|
stream: false,
|
|
433
488
|
logContext: { correlationId: input.correlationId },
|
|
489
|
+
// Applies the gateway's coding-workbench provider-timeout floor (#3591) — see
|
|
490
|
+
// COMMIT_DRAFT_MODEL_DEADLINE_MS above for why this route no longer sets its own flat cap.
|
|
491
|
+
latencyProfile: "coding-workbench",
|
|
434
492
|
};
|
|
435
493
|
}
|
|
436
494
|
function unfencedJson(text) {
|
|
@@ -462,73 +520,153 @@ function draftTextField(record, field) {
|
|
|
462
520
|
return normalized.length > 0 ? normalized : undefined;
|
|
463
521
|
}
|
|
464
522
|
function modelCommitMessage(response, policy) {
|
|
465
|
-
|
|
466
|
-
|
|
523
|
+
// A reasoning model that spends its whole output budget before answering ends with
|
|
524
|
+
// `finish_reason: "length"`; whatever content survived to that point is a mid-thought fragment,
|
|
525
|
+
// never a complete, trustworthy commit message (#3591). Checked BEFORE parsing so a fragment that
|
|
526
|
+
// happens to close as valid JSON at the truncation boundary is never mistaken for a real answer.
|
|
527
|
+
if (response.finishReason === "length")
|
|
528
|
+
return { ok: false, reason: "output-exhausted" };
|
|
529
|
+
if (response.finishReason !== "stop" || response.toolCalls.length !== 0) {
|
|
530
|
+
return { ok: false, reason: "invalid-output" };
|
|
531
|
+
}
|
|
467
532
|
const candidate = draftCandidate(response);
|
|
468
533
|
if (!isPlainObject(candidate))
|
|
469
|
-
return
|
|
534
|
+
return { ok: false, reason: "invalid-output" };
|
|
470
535
|
const subject = draftTextField(candidate, "subject");
|
|
471
536
|
const body = draftTextField(candidate, "body");
|
|
472
537
|
if (subject === undefined || body === undefined)
|
|
473
|
-
return
|
|
538
|
+
return { ok: false, reason: "invalid-output" };
|
|
474
539
|
const message = appendKeikoGeneratedFooter(`${subject}\n\n${body}`);
|
|
475
|
-
return validateGitCommitMessage(message, policy).ok
|
|
476
|
-
}
|
|
477
|
-
|
|
540
|
+
return validateGitCommitMessage(message, policy).ok
|
|
541
|
+
? { ok: true, message }
|
|
542
|
+
: { ok: false, reason: "invalid-output" };
|
|
543
|
+
}
|
|
544
|
+
// #3591: classifies a failed model call into the three failure classes the UI must tell apart — a
|
|
545
|
+
// provider that never answered in time, a provider that answered but exhausted its output budget on
|
|
546
|
+
// reasoning, and a provider that answered completely but produced something unusable. `signal` is
|
|
547
|
+
// the caller's own cancellation (route deadline + client disconnect, see commitDraftCancellation
|
|
548
|
+
// below); this function no longer builds its own.
|
|
549
|
+
function classifyCommitDraftModelFailure(error, signal) {
|
|
550
|
+
if (error instanceof ProviderOutputExhaustedError) {
|
|
551
|
+
return "GIT_DELIVERY_COMMIT_DRAFT_OUTPUT_EXHAUSTED";
|
|
552
|
+
}
|
|
553
|
+
if (error instanceof TimeoutError || routeDeadlineFired(signal)) {
|
|
554
|
+
return "GIT_DELIVERY_COMMIT_DRAFT_TIMED_OUT";
|
|
555
|
+
}
|
|
556
|
+
// The composed signal aborted without the deadline: the client left during the model call.
|
|
557
|
+
if (signal.aborted)
|
|
558
|
+
return "GIT_DELIVERY_COMMIT_DRAFT_CANCELLED";
|
|
559
|
+
return "GIT_DELIVERY_COMMIT_DRAFT_FAILED";
|
|
560
|
+
}
|
|
561
|
+
// The route deadline firing while the gateway sleeps before a retry surfaces as the gateway's
|
|
562
|
+
// CancelledError, not as TimeoutError; the composed signal's reason still names the deadline
|
|
563
|
+
// (#3591 review). A client disconnect aborts without that reason and stays a generic failure.
|
|
564
|
+
function routeDeadlineFired(signal) {
|
|
565
|
+
const reason = signal.reason;
|
|
566
|
+
return signal.aborted && reason instanceof DOMException && reason.name === "TimeoutError";
|
|
567
|
+
}
|
|
568
|
+
async function generateModelCommitMessage(deps, input, signal) {
|
|
478
569
|
const resolved = resolveCommitDraftModel(deps);
|
|
479
570
|
if (resolved === undefined) {
|
|
480
571
|
return { ok: false, code: "GIT_DELIVERY_COMMIT_DRAFT_MODEL_UNAVAILABLE" };
|
|
481
572
|
}
|
|
482
|
-
const
|
|
573
|
+
const bounds = {
|
|
574
|
+
maxOutputTokens: resolved.maxOutputTokens,
|
|
575
|
+
deadlineMs: resolved.deadlineMs,
|
|
576
|
+
};
|
|
577
|
+
// The route deadline is armed only now, for THIS model's budget, and composed with the client
|
|
578
|
+
// disconnect signal; its reason (a TimeoutError DOMException) tells the two apart below.
|
|
579
|
+
const callSignal = AbortSignal.any([signal, AbortSignal.timeout(resolved.deadlineMs)]);
|
|
483
580
|
try {
|
|
484
581
|
const response = await resolved.model.call(buildCommitDraftModelRequest({
|
|
485
582
|
...input,
|
|
486
583
|
modelId: resolved.modelId,
|
|
487
584
|
useResponseFormat: resolved.useResponseFormat,
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
585
|
+
maxOutputTokens: resolved.maxOutputTokens,
|
|
586
|
+
}), callSignal);
|
|
587
|
+
const validated = modelCommitMessage(response, input.policy);
|
|
588
|
+
if (validated.ok)
|
|
589
|
+
return { ok: true, message: validated.message, bounds };
|
|
590
|
+
const code = validated.reason === "output-exhausted"
|
|
591
|
+
? "GIT_DELIVERY_COMMIT_DRAFT_OUTPUT_EXHAUSTED"
|
|
592
|
+
: "GIT_DELIVERY_COMMIT_DRAFT_INVALID_OUTPUT";
|
|
593
|
+
return { ok: false, code, bounds };
|
|
493
594
|
}
|
|
494
595
|
catch (error) {
|
|
495
|
-
return { ok: false, code:
|
|
596
|
+
return { ok: false, code: classifyCommitDraftModelFailure(error, callSignal), error, bounds };
|
|
496
597
|
}
|
|
497
598
|
}
|
|
498
|
-
|
|
599
|
+
// `summary` is undefined only when the draft ended before the staged changeset was read (a client
|
|
600
|
+
// disconnect during the policy lookup): the counts are then absent from the line, never invented.
|
|
601
|
+
function logCommitDraft(log, correlationId, summary, status, failureCode, bounds) {
|
|
499
602
|
log.write(activityLogEvent(COMMIT_DRAFT_COMPLETED_OPERATION, {
|
|
500
603
|
correlationId,
|
|
501
604
|
status,
|
|
502
605
|
...(failureCode === undefined ? {} : { errorKind: commitDraftErrorKind(failureCode) }),
|
|
503
606
|
}, {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
607
|
+
...(summary === undefined
|
|
608
|
+
? {}
|
|
609
|
+
: {
|
|
610
|
+
stagedFileCount: summary.stagedFileCount,
|
|
611
|
+
areaCount: summary.areaCount,
|
|
612
|
+
touchesTests: summary.touchesTests,
|
|
613
|
+
}),
|
|
507
614
|
outcome: status === 200 ? "succeeded" : "failed",
|
|
508
615
|
...(failureCode === undefined ? {} : { failureCode }),
|
|
616
|
+
...bounds,
|
|
509
617
|
}));
|
|
510
618
|
}
|
|
511
|
-
function draftFailureResult(log, correlationId, summary, status, code) {
|
|
512
|
-
logCommitDraft(log, correlationId, summary, status, code);
|
|
619
|
+
function draftFailureResult(log, correlationId, summary, status, code, bounds) {
|
|
620
|
+
logCommitDraft(log, correlationId, summary, status, code, bounds);
|
|
513
621
|
return errResult(status, code);
|
|
514
622
|
}
|
|
623
|
+
// Read through a call so the abort state is looked at afresh after each await: a property read
|
|
624
|
+
// narrows to `false` after the first guard and would make every later guard dead code to the
|
|
625
|
+
// compiler, although the signal can flip between two awaits.
|
|
626
|
+
function clientLeft(signal) {
|
|
627
|
+
return signal.aborted;
|
|
628
|
+
}
|
|
629
|
+
// A client that leaves while the draft is still being prepared ends it as cancelled — no further
|
|
630
|
+
// worktree read, no model call — with whatever the route had observed by then (PR #3602 review).
|
|
631
|
+
function draftCancelled(log, correlationId, summary) {
|
|
632
|
+
return draftFailureResult(log, correlationId, summary, commitDraftFailureStatus("GIT_DELIVERY_COMMIT_DRAFT_CANCELLED"), "GIT_DELIVERY_COMMIT_DRAFT_CANCELLED");
|
|
633
|
+
}
|
|
634
|
+
// S7776: a Set, not `.includes()` on a constant array.
|
|
635
|
+
const COMMIT_DRAFT_BAD_GATEWAY_CODES = new Set([
|
|
636
|
+
"GIT_DELIVERY_COMMIT_DRAFT_INVALID_OUTPUT",
|
|
637
|
+
"GIT_DELIVERY_COMMIT_DRAFT_OUTPUT_EXHAUSTED",
|
|
638
|
+
]);
|
|
515
639
|
function commitDraftFailureStatus(code) {
|
|
516
|
-
|
|
640
|
+
// Matches repositoryInitializationRoutes.ts / gitRepositoryRoutes.ts: a bounded operation that
|
|
641
|
+
// did not finish in time reports 504, never the generic 503 an unavailable model reports; a
|
|
642
|
+
// client that left reports 499 like the chat stream and grounded routes do.
|
|
643
|
+
if (code === "GIT_DELIVERY_COMMIT_DRAFT_TIMED_OUT")
|
|
644
|
+
return 504;
|
|
645
|
+
if (code === "GIT_DELIVERY_COMMIT_DRAFT_CANCELLED")
|
|
646
|
+
return 499;
|
|
647
|
+
return COMMIT_DRAFT_BAD_GATEWAY_CODES.has(code) ? 502 : 503;
|
|
517
648
|
}
|
|
518
649
|
function modelDraftFailureResult(deps, log, correlationId, summary, suggested) {
|
|
519
650
|
if (suggested.error !== undefined) {
|
|
520
651
|
reportCommitDraftModelFailure(deps, correlationId, suggested.error);
|
|
521
652
|
}
|
|
522
|
-
return draftFailureResult(log, correlationId, summary, commitDraftFailureStatus(suggested.code), suggested.code);
|
|
653
|
+
return draftFailureResult(log, correlationId, summary, commitDraftFailureStatus(suggested.code), suggested.code, suggested.bounds);
|
|
523
654
|
}
|
|
524
|
-
async function computeModelCommitDraft(deps, workspace, req, policy, seams, now,
|
|
655
|
+
async function computeModelCommitDraft(deps, workspace, req, policy, seams, now, run) {
|
|
656
|
+
const { correlationId, signal } = run;
|
|
525
657
|
const log = seams.activityLog ?? processServerLogSink();
|
|
526
658
|
const stagedPaths = await readStagedPathsFor(workspace, seams, now, correlationId);
|
|
527
659
|
const summary = summarizeStagedChangeset(stagedPaths);
|
|
660
|
+
// Re-checked after every await that can outlast a disconnect (PR #3602 review): a client that
|
|
661
|
+
// left while a worktree read was pending gets no further read and no model call.
|
|
662
|
+
if (clientLeft(signal))
|
|
663
|
+
return draftCancelled(log, correlationId, summary);
|
|
528
664
|
if (summary.stagedFileCount === 0 || stagedPaths.length === 0) {
|
|
529
665
|
return draftFailureResult(log, correlationId, summary, 409, "GIT_DELIVERY_COMMIT_DRAFT_NO_CHANGES");
|
|
530
666
|
}
|
|
531
667
|
const stagedDiff = await readStagedDiffFor(workspace, seams, now, correlationId);
|
|
668
|
+
if (clientLeft(signal))
|
|
669
|
+
return draftCancelled(log, correlationId, summary);
|
|
532
670
|
const suggested = await generateModelCommitMessage(deps, {
|
|
533
671
|
policy,
|
|
534
672
|
stagedPaths,
|
|
@@ -536,11 +674,11 @@ async function computeModelCommitDraft(deps, workspace, req, policy, seams, now,
|
|
|
536
674
|
stagedDiff,
|
|
537
675
|
instruction: req.instruction,
|
|
538
676
|
correlationId,
|
|
539
|
-
});
|
|
677
|
+
}, signal);
|
|
540
678
|
if (!suggested.ok) {
|
|
541
679
|
return modelDraftFailureResult(deps, log, correlationId, summary, suggested);
|
|
542
680
|
}
|
|
543
|
-
logCommitDraft(log, correlationId, summary, 200);
|
|
681
|
+
logCommitDraft(log, correlationId, summary, 200, undefined, suggested.bounds);
|
|
544
682
|
const body = {
|
|
545
683
|
schemaVersion: "1",
|
|
546
684
|
status: "succeeded",
|
|
@@ -550,6 +688,31 @@ async function computeModelCommitDraft(deps, workspace, req, policy, seams, now,
|
|
|
550
688
|
};
|
|
551
689
|
return { status: 200, body: deps.redactor(body) };
|
|
552
690
|
}
|
|
691
|
+
// Bounds the model call by COMMIT_DRAFT_MODEL_DEADLINE_MS AND aborts it the moment the client goes
|
|
692
|
+
// away — mirrors coding-sidecar-gateway.ts's `gatewayRequestCancellation` /
|
|
693
|
+
// coding-sidecar-tool-facade.ts's `bindRouteDisconnect`, the established "abort-on-close" pattern in
|
|
694
|
+
// this server (#3591), applied here to the one long-latency call this route makes.
|
|
695
|
+
function commitDraftCancellation(ctx) {
|
|
696
|
+
const controller = new AbortController();
|
|
697
|
+
const onDisconnect = () => {
|
|
698
|
+
controller.abort();
|
|
699
|
+
};
|
|
700
|
+
const onResponseClosed = () => {
|
|
701
|
+
if (!ctx.res.writableFinished)
|
|
702
|
+
onDisconnect();
|
|
703
|
+
};
|
|
704
|
+
ctx.req.once("aborted", onDisconnect);
|
|
705
|
+
ctx.res.once("close", onResponseClosed);
|
|
706
|
+
// The route deadline itself is armed per model, behind that model's gateway budget, where the
|
|
707
|
+
// model is resolved (`generateModelCommitMessage`); this signal only carries the disconnect.
|
|
708
|
+
return {
|
|
709
|
+
signal: controller.signal,
|
|
710
|
+
dispose: () => {
|
|
711
|
+
ctx.req.removeListener("aborted", onDisconnect);
|
|
712
|
+
ctx.res.removeListener("close", onResponseClosed);
|
|
713
|
+
},
|
|
714
|
+
};
|
|
715
|
+
}
|
|
553
716
|
export const createHandleCommitDraft = (options = {}) => {
|
|
554
717
|
const activityLog = options.execution?.activityLog ?? options.activityLog ?? processServerLogSink();
|
|
555
718
|
const seams = { ...options.execution, activityLog };
|
|
@@ -568,16 +731,36 @@ export const createHandleCommitDraft = (options = {}) => {
|
|
|
568
731
|
const workspace = resolveProjectWorkspace(deps, req.projectId);
|
|
569
732
|
if (workspace === undefined)
|
|
570
733
|
return errResult(404, "GIT_DELIVERY_COMMIT_UNKNOWN_PROJECT");
|
|
571
|
-
|
|
734
|
+
// Armed BEFORE the policy lookup: a client that leaves while the policy is still being resolved
|
|
735
|
+
// is already recorded on the signal the model call arms, so that call is never made for nobody
|
|
736
|
+
// (PR #3602 review). Disposed once both the lookup and the call have settled, however they end.
|
|
737
|
+
const cancellation = commitDraftCancellation(ctx);
|
|
572
738
|
try {
|
|
573
|
-
|
|
739
|
+
const policy = await resolveGovernedCommitMessagePolicy(deps, workspace.root, options.messagePolicy);
|
|
740
|
+
// Nothing has been read yet, so the completion line carries no staged counts.
|
|
741
|
+
if (cancellation.signal.aborted)
|
|
742
|
+
return draftCancelled(activityLog, correlationId, undefined);
|
|
743
|
+
return await draftWithModel(deps, workspace, req, policy, seams, now, {
|
|
744
|
+
correlationId,
|
|
745
|
+
signal: cancellation.signal,
|
|
746
|
+
});
|
|
574
747
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
return errResult(409, "GIT_DELIVERY_COMMIT_WORKTREE_UNAVAILABLE");
|
|
748
|
+
finally {
|
|
749
|
+
cancellation.dispose();
|
|
578
750
|
}
|
|
579
751
|
};
|
|
580
752
|
};
|
|
753
|
+
// The model call's own failure envelope: a worktree that cannot be read for the staged diff is a
|
|
754
|
+
// 409, never a 500, and it is reported once with the request's correlation id.
|
|
755
|
+
async function draftWithModel(deps, workspace, req, policy, seams, now, run) {
|
|
756
|
+
try {
|
|
757
|
+
return await computeModelCommitDraft(deps, workspace, req, policy, seams, now, run);
|
|
758
|
+
}
|
|
759
|
+
catch (error) {
|
|
760
|
+
reportDraftWorktreeFailure(deps, run.correlationId, error);
|
|
761
|
+
return errResult(409, "GIT_DELIVERY_COMMIT_WORKTREE_UNAVAILABLE");
|
|
762
|
+
}
|
|
763
|
+
}
|
|
581
764
|
// ─── Execute (governed, with message-policy gate) ───────────────────────────────────────────────
|
|
582
765
|
const EXECUTE_KEYS = new Set([
|
|
583
766
|
"schemaVersion",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "Internal server package: local loopback BFF runtime (HTTP/SSE/WebSocket router, CSP, host check, CSRF gate, terminal, browser, files, run engine, SQLite-backed UI store) that mediates the browser presentation tier and the Node-side domain packages (ADR-0019). Not published independently.",
|
|
@@ -55,26 +55,26 @@
|
|
|
55
55
|
},
|
|
56
56
|
"private": true,
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@oscharko-dev/keiko-connectors": "1.1.
|
|
59
|
-
"@oscharko-dev/keiko-contracts": "1.1.
|
|
60
|
-
"@oscharko-dev/keiko-evidence": "1.1.
|
|
61
|
-
"@oscharko-dev/keiko-git": "1.1.
|
|
62
|
-
"@oscharko-dev/keiko-harness": "1.1.
|
|
63
|
-
"@oscharko-dev/keiko-local-knowledge": "1.1.
|
|
64
|
-
"@oscharko-dev/keiko-memory-capture": "1.1.
|
|
65
|
-
"@oscharko-dev/keiko-memory-consolidation": "1.1.
|
|
66
|
-
"@oscharko-dev/keiko-memory-governance": "1.1.
|
|
67
|
-
"@oscharko-dev/keiko-memory-retrieval": "1.1.
|
|
68
|
-
"@oscharko-dev/keiko-memory-vault": "1.1.
|
|
69
|
-
"@oscharko-dev/keiko-model-gateway": "1.1.
|
|
70
|
-
"@oscharko-dev/keiko-quality-intelligence": "1.1.
|
|
71
|
-
"@oscharko-dev/keiko-sandbox": "1.1.
|
|
72
|
-
"@oscharko-dev/keiko-sdk": "1.1.
|
|
73
|
-
"@oscharko-dev/keiko-security": "1.1.
|
|
74
|
-
"@oscharko-dev/keiko-tool-catalog": "1.1.
|
|
75
|
-
"@oscharko-dev/keiko-tools": "1.1.
|
|
76
|
-
"@oscharko-dev/keiko-verification": "1.1.
|
|
77
|
-
"@oscharko-dev/keiko-workflows": "1.1.
|
|
78
|
-
"@oscharko-dev/keiko-workspace": "1.1.
|
|
58
|
+
"@oscharko-dev/keiko-connectors": "1.1.7",
|
|
59
|
+
"@oscharko-dev/keiko-contracts": "1.1.7",
|
|
60
|
+
"@oscharko-dev/keiko-evidence": "1.1.7",
|
|
61
|
+
"@oscharko-dev/keiko-git": "1.1.7",
|
|
62
|
+
"@oscharko-dev/keiko-harness": "1.1.7",
|
|
63
|
+
"@oscharko-dev/keiko-local-knowledge": "1.1.7",
|
|
64
|
+
"@oscharko-dev/keiko-memory-capture": "1.1.7",
|
|
65
|
+
"@oscharko-dev/keiko-memory-consolidation": "1.1.7",
|
|
66
|
+
"@oscharko-dev/keiko-memory-governance": "1.1.7",
|
|
67
|
+
"@oscharko-dev/keiko-memory-retrieval": "1.1.7",
|
|
68
|
+
"@oscharko-dev/keiko-memory-vault": "1.1.7",
|
|
69
|
+
"@oscharko-dev/keiko-model-gateway": "1.1.7",
|
|
70
|
+
"@oscharko-dev/keiko-quality-intelligence": "1.1.7",
|
|
71
|
+
"@oscharko-dev/keiko-sandbox": "1.1.7",
|
|
72
|
+
"@oscharko-dev/keiko-sdk": "1.1.7",
|
|
73
|
+
"@oscharko-dev/keiko-security": "1.1.7",
|
|
74
|
+
"@oscharko-dev/keiko-tool-catalog": "1.1.7",
|
|
75
|
+
"@oscharko-dev/keiko-tools": "1.1.7",
|
|
76
|
+
"@oscharko-dev/keiko-verification": "1.1.7",
|
|
77
|
+
"@oscharko-dev/keiko-workflows": "1.1.7",
|
|
78
|
+
"@oscharko-dev/keiko-workspace": "1.1.7"
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-tool-catalog",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "Internal pure governed-tool descriptors, schema projections, compatibility, and catalog identities.",
|
|
@@ -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_TOOLS_VERSION: "1.1.
|
|
1
|
+
export declare const KEIKO_TOOLS_VERSION: "1.1.7";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-tools",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "Internal tools package: Keiko safe tool-execution layer — terminal-policy command allowlist, env-isolated no-shell spawn, atomic patch workflow, browser CDP adapter, and the WorkspaceWriter boundary (ADR-0006 / ADR-0017). Not published independently.",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
},
|
|
41
41
|
"private": true,
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@oscharko-dev/keiko-contracts": "1.1.
|
|
44
|
-
"@oscharko-dev/keiko-git": "1.1.
|
|
45
|
-
"@oscharko-dev/keiko-sandbox": "1.1.
|
|
46
|
-
"@oscharko-dev/keiko-security": "1.1.
|
|
47
|
-
"@oscharko-dev/keiko-workspace": "1.1.
|
|
48
|
-
"@oscharko-dev/keiko-tool-catalog": "1.1.
|
|
43
|
+
"@oscharko-dev/keiko-contracts": "1.1.7",
|
|
44
|
+
"@oscharko-dev/keiko-git": "1.1.7",
|
|
45
|
+
"@oscharko-dev/keiko-sandbox": "1.1.7",
|
|
46
|
+
"@oscharko-dev/keiko-security": "1.1.7",
|
|
47
|
+
"@oscharko-dev/keiko-workspace": "1.1.7",
|
|
48
|
+
"@oscharko-dev/keiko-tool-catalog": "1.1.7"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-verification",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "Internal verification package: deterministic verification orchestrator — plan construction, resource-limit policy, best-effort memory monitoring, command classification, and audit/Markdown summaries (ADR-0007, ADR-0019). Not published independently.",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@oscharko-dev/keiko-contracts": "1.1.
|
|
25
|
-
"@oscharko-dev/keiko-security": "1.1.
|
|
26
|
-
"@oscharko-dev/keiko-tools": "1.1.
|
|
27
|
-
"@oscharko-dev/keiko-workspace": "1.1.
|
|
24
|
+
"@oscharko-dev/keiko-contracts": "1.1.7",
|
|
25
|
+
"@oscharko-dev/keiko-security": "1.1.7",
|
|
26
|
+
"@oscharko-dev/keiko-tools": "1.1.7",
|
|
27
|
+
"@oscharko-dev/keiko-workspace": "1.1.7"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-workflows",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "Internal workflows package: reviewable developer-assist workflows (unit-test generation, bug investigation), prompts/parsers/guards/report rendering, apply-mode verification gating, and UI descriptors (ADR-0008 + ADR-0009 + ADR-0019). Not published independently.",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
},
|
|
26
26
|
"private": true,
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@oscharko-dev/keiko-contracts": "1.1.
|
|
29
|
-
"@oscharko-dev/keiko-security": "1.1.
|
|
30
|
-
"@oscharko-dev/keiko-model-gateway": "1.1.
|
|
31
|
-
"@oscharko-dev/keiko-workspace": "1.1.
|
|
32
|
-
"@oscharko-dev/keiko-tools": "1.1.
|
|
33
|
-
"@oscharko-dev/keiko-evidence": "1.1.
|
|
34
|
-
"@oscharko-dev/keiko-verification": "1.1.
|
|
35
|
-
"@oscharko-dev/keiko-harness": "1.1.
|
|
36
|
-
"@oscharko-dev/keiko-quality-intelligence": "1.1.
|
|
28
|
+
"@oscharko-dev/keiko-contracts": "1.1.7",
|
|
29
|
+
"@oscharko-dev/keiko-security": "1.1.7",
|
|
30
|
+
"@oscharko-dev/keiko-model-gateway": "1.1.7",
|
|
31
|
+
"@oscharko-dev/keiko-workspace": "1.1.7",
|
|
32
|
+
"@oscharko-dev/keiko-tools": "1.1.7",
|
|
33
|
+
"@oscharko-dev/keiko-evidence": "1.1.7",
|
|
34
|
+
"@oscharko-dev/keiko-verification": "1.1.7",
|
|
35
|
+
"@oscharko-dev/keiko-harness": "1.1.7",
|
|
36
|
+
"@oscharko-dev/keiko-quality-intelligence": "1.1.7"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const KEIKO_WORKSPACE_VERSION: "1.1.
|
|
1
|
+
export declare const KEIKO_WORKSPACE_VERSION: "1.1.7";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Version identifier for the workspace package. Pattern matches keiko-contracts /
|
|
2
2
|
// keiko-security / keiko-model-gateway: keep the literal type via `as const` so
|
|
3
3
|
// downstream assertions can pin on the exact string.
|
|
4
|
-
export const KEIKO_WORKSPACE_VERSION = "1.1.
|
|
4
|
+
export const KEIKO_WORKSPACE_VERSION = "1.1.7";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oscharko-dev/keiko-workspace",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "Internal workspace package: Keiko repository context and workspace access — detection, safe reads, path containment, deny/ignore rules, context packs, retrieval, and summaries. Not published independently.",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
"private": true,
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@oscharko-dev/keiko-contracts": "1.1.
|
|
72
|
-
"@oscharko-dev/keiko-security": "1.1.
|
|
71
|
+
"@oscharko-dev/keiko-contracts": "1.1.7",
|
|
72
|
+
"@oscharko-dev/keiko-security": "1.1.7"
|
|
73
73
|
}
|
|
74
74
|
}
|