@oscharko-dev/keiko 1.1.7 → 1.1.8
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 +6 -6
- package/dist/ui/static/404.html +1 -1
- package/dist/ui/static/__next.__PAGE__.txt +11 -11
- package/dist/ui/static/__next._full.txt +13 -13
- package/dist/ui/static/__next._tree.txt +2 -2
- package/dist/ui/static/_next/static/chunks/09jwu8wa22c1d.js +1 -0
- package/dist/ui/static/_next/static/chunks/0n5hz6kjgs-3-.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2l0gyhe4jpu23.css → 0qv7j1mski9o8.css} +1 -1
- package/dist/ui/static/_next/static/chunks/{0xq716cs1taxh.js → 0vtnpcijh-jqw.js} +1 -1
- package/dist/ui/static/_next/static/chunks/15wj80h_5chl0.js +1 -0
- package/dist/ui/static/_next/static/chunks/1dwc7p2rl-hs6.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1piodmepoegnw.js → 1fgcho9v65crw.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2mnldrncbucm0.js → 2iz4lys7fa5a6.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{29p86cxry0h-l.js → 39w0xj7fyy7sp.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3bl12pe7lsanc.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1j_9b-l0n6u-t.js → 3kmozkq6tgqnz.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3q_kn20qriqd7.js +1 -0
- package/dist/ui/static/_next/static/chunks/413lmui4la1xe.js +1 -0
- package/dist/ui/static/_next/static/chunks/{turbopack-2w1ixcff5kx3x.js → turbopack-2fb3mn6go2p-t.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 +12 -12
- 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 +12 -12
- package/dist/ui/static/index.html +1 -1
- package/dist/ui/static/index.txt +13 -13
- package/dist/ui/static/launch/__next._full.txt +13 -13
- package/dist/ui/static/launch/__next._tree.txt +2 -2
- package/dist/ui/static/launch/__next.launch.__PAGE__.txt +11 -11
- package/dist/ui/static/launch.html +1 -1
- package/dist/ui/static/launch.txt +13 -13
- package/dist/ui/static/local-knowledge/__next._full.txt +13 -13
- package/dist/ui/static/local-knowledge/__next._tree.txt +2 -2
- package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +11 -11
- package/dist/ui/static/local-knowledge/capsule/__next._full.txt +12 -12
- 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 +12 -12
- package/dist/ui/static/local-knowledge.html +1 -1
- package/dist/ui/static/local-knowledge.txt +13 -13
- 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 +12 -12
- 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 +29 -10
- package/node_modules/@oscharko-dev/keiko-contracts/dist/activity-log-registry.generated.d.ts +281 -17
- 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 +368 -13
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api-validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-api-validation.js +14 -5
- 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-runtime.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/verified-commit.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/verified-commit.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/verified-commit.js +8 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/version.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/version.js +2 -2
- package/node_modules/@oscharko-dev/keiko-contracts/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/gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.js +13 -5
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.js +1 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.js +7 -4
- 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 +4 -0
- 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 +12 -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-runtime/codingRuntimeControlPlane.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeControlPlane.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.d.ts +0 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeHistory.js +44 -13
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeManager.js +9 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.js +3 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestratorTypes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeRoutes.js +3 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingSafeActivityProjection.js +143 -32
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.d.ts +7 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacade.js +29 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts +16 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolFacadePorts.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts +6 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolIpc.js +5 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.d.ts +14 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.js +201 -43
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts +13 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.js +24 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.d.ts +12 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeFunctionalHarness/_governedTools.js +31 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.js +35 -13
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts +16 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.js +74 -14
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.d.ts +33 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeV2ApprovalRequests.js +277 -44
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionAuxiliaryPorts.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionAuxiliaryPorts.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionAuxiliaryPorts.js +4 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionDraftDeliveryRuntime.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionDraftDeliveryRuntime.js +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionManagedWorktreeTools.js +72 -26
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitRuntime.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionVerifiedCommitRuntime.js +6 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/researchApprovalIssuance.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/researchApprovalIssuance.js +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts +25 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.js +183 -45
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-tool-facade.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-tool-facade.js +32 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +2 -23
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitService.js +29 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitTypes.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/verifiedCommitTypes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/codingHistory.js +48 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/tool-catalog/catalogToolFacadeBridge.js +54 -8
- 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 +29 -29
- package/release-impact.catalog.json +57 -0
- package/vendor/{oscharko-dev-keiko-cli-1.1.7.tgz → oscharko-dev-keiko-cli-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-connectors-1.1.7.tgz → oscharko-dev-keiko-connectors-1.1.8.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-contracts-1.1.8.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-evaluations-1.1.7.tgz → oscharko-dev-keiko-evaluations-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-evidence-1.1.7.tgz → oscharko-dev-keiko-evidence-1.1.8.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-git-1.1.8.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-harness-1.1.7.tgz → oscharko-dev-keiko-harness-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-local-knowledge-1.1.7.tgz → oscharko-dev-keiko-local-knowledge-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-capture-1.1.7.tgz → oscharko-dev-keiko-memory-capture-1.1.8.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-memory-consolidation-1.1.8.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-memory-governance-1.1.7.tgz → oscharko-dev-keiko-memory-governance-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-retrieval-1.1.7.tgz → oscharko-dev-keiko-memory-retrieval-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-vault-1.1.7.tgz → oscharko-dev-keiko-memory-vault-1.1.8.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-1.1.8.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-quality-intelligence-1.1.7.tgz → oscharko-dev-keiko-quality-intelligence-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-sandbox-1.1.7.tgz → oscharko-dev-keiko-sandbox-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-sdk-1.1.7.tgz → oscharko-dev-keiko-sdk-1.1.8.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-security-1.1.8.tgz +0 -0
- package/vendor/oscharko-dev-keiko-server-1.1.8.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-tool-catalog-1.1.7.tgz → oscharko-dev-keiko-tool-catalog-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-tools-1.1.7.tgz → oscharko-dev-keiko-tools-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-verification-1.1.7.tgz → oscharko-dev-keiko-verification-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-workflows-1.1.7.tgz → oscharko-dev-keiko-workflows-1.1.8.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-workspace-1.1.7.tgz → oscharko-dev-keiko-workspace-1.1.8.tgz} +0 -0
- package/dist/ui/static/_next/static/chunks/01rp_j2a-73pp.js +0 -1
- package/dist/ui/static/_next/static/chunks/0hq0i12hw0ypm.js +0 -1
- package/dist/ui/static/_next/static/chunks/0psckgz_yhen3.js +0 -1
- package/dist/ui/static/_next/static/chunks/2bm60h9zwhm3v.js +0 -1
- package/dist/ui/static/_next/static/chunks/2ctd04x-fzbwc.js +0 -1
- package/dist/ui/static/_next/static/chunks/2jfg687n_mvf8.js +0 -1
- package/dist/ui/static/_next/static/chunks/3fuqgie3p2068.js +0 -1
- package/vendor/oscharko-dev-keiko-contracts-1.1.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-git-1.1.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-consolidation-1.1.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-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/dist/ui/static/_next/static/{nXnJJ05BP_rtUCiZsedfT → xFln0tD9J1Dx0Nlv71fAF}/_buildManifest.js +0 -0
- /package/dist/ui/static/_next/static/{nXnJJ05BP_rtUCiZsedfT → xFln0tD9J1Dx0Nlv71fAF}/_clientMiddlewareManifest.js +0 -0
- /package/dist/ui/static/_next/static/{nXnJJ05BP_rtUCiZsedfT → xFln0tD9J1Dx0Nlv71fAF}/_ssgManifest.js +0 -0
package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingToolReadEditPorts.js
CHANGED
|
@@ -4,7 +4,7 @@ import { activityLogEvent, defineActivityLogOperation, } from "@oscharko-dev/kei
|
|
|
4
4
|
import { detectWorkspaceAt, discoverWithStats, isDenied, } from "@oscharko-dev/keiko-workspace";
|
|
5
5
|
import { contentFreeErrorClass, emitServerDiagnostic, } from "../diagnostics-log.js";
|
|
6
6
|
import { correlationIdOrUnknown, isValidCorrelationId, UNKNOWN_CORRELATION_ID, } from "../correlation.js";
|
|
7
|
-
import { isExactEditorAgentChangeset } from "./codingToolIpc.js";
|
|
7
|
+
import { isExactEditorAgentChangeset, isGovernedReadPath, } from "./codingToolIpc.js";
|
|
8
8
|
import { causeChain, keikoStackFrames } from "../observability/stack-frames.js";
|
|
9
9
|
import { processServerLogSink } from "../process-log-sink.js";
|
|
10
10
|
const MAX_READ_BYTES = 65_536;
|
|
@@ -13,6 +13,7 @@ const RAW_SINGLE_FILE_PATCH = /^:[0-7]{6} [0-7]{6} [a-f0-9]{7,64} [a-f0-9]{7,64}
|
|
|
13
13
|
// (bindLiveEditorSession) never found one for this run's workspace — the model's edit was refused
|
|
14
14
|
// before it ever reached the editor route, so nothing was attempted against the tree.
|
|
15
15
|
export const NO_ACTIVE_SESSION_MESSAGE = "no Coding Workbench is connected for this workspace; keep the Workbench open and retry";
|
|
16
|
+
const NO_ACTIVE_SESSION_DETAIL = { message: NO_ACTIVE_SESSION_MESSAGE };
|
|
16
17
|
// The delays total 11.75 s. Together with seven worst-case 2 s session-list calls this remains
|
|
17
18
|
// below the production tool bridge's 30 s deadline, leaving the generated client its outer margin.
|
|
18
19
|
const EDITOR_SESSION_RETRY_DELAYS_MS = [250, 500, 1_000, 2_000, 3_000, 5_000];
|
|
@@ -252,6 +253,123 @@ const CODING_RUNTIME_EDITOR_MUTATION_SETTLED_OPERATION = defineActivityLogOperat
|
|
|
252
253
|
proofIds: ["coding-runtime.editor-mutation.settled.emitted-line"],
|
|
253
254
|
releaseImpact: "patch",
|
|
254
255
|
});
|
|
256
|
+
// #3610: a governed edit the editor route or this port refused is a decision, not a server
|
|
257
|
+
// failure — a stale base (CONTENT_HASH_MISMATCH), a policy denial, an invalid patch, no live
|
|
258
|
+
// Workbench. It rode the failure diagnostic at level error with errorKind internal, which also
|
|
259
|
+
// opened a support incident for every stale edit. The reason is the closed code the model receives;
|
|
260
|
+
// a client error's own code is free text, so it is recorded only as EDIT_CLIENT_ERROR. The first two
|
|
261
|
+
// groups are the editor-agent conflict and failure codes; the op catalog needs them as literals, and
|
|
262
|
+
// a test pins that every contract code is listed.
|
|
263
|
+
const EDIT_REFUSAL_REASONS = [
|
|
264
|
+
"DIRTY",
|
|
265
|
+
"VERSION_MISMATCH",
|
|
266
|
+
"CONTENT_HASH_MISMATCH",
|
|
267
|
+
"NO_ACTIVE_SESSION",
|
|
268
|
+
"NO_ACTIVE_BRIDGE",
|
|
269
|
+
"INVALID_EDITS",
|
|
270
|
+
"OUT_OF_SCOPE",
|
|
271
|
+
"DECOMPOSE_PER_ROOT",
|
|
272
|
+
"PRECONDITION_REQUIRED",
|
|
273
|
+
"POLICY_DENIED",
|
|
274
|
+
"APPROVAL_REQUIRED",
|
|
275
|
+
"TIMED_OUT",
|
|
276
|
+
"QUEUE_FULL",
|
|
277
|
+
"CANCELLED",
|
|
278
|
+
"PROVIDER_UNAVAILABLE",
|
|
279
|
+
"UNSUPPORTED_OPERATION",
|
|
280
|
+
"LIMIT_EXCEEDED",
|
|
281
|
+
"DUPLICATE_ACTION",
|
|
282
|
+
"MUTATION_IN_FLIGHT",
|
|
283
|
+
"EDIT_PREPARE_FAILED",
|
|
284
|
+
"WORKSPACE_ACCESS_LOST",
|
|
285
|
+
"EDIT_MUTATION_FAILED",
|
|
286
|
+
"EDIT_CLIENT_ERROR",
|
|
287
|
+
"UNCLASSIFIED",
|
|
288
|
+
];
|
|
289
|
+
const EDIT_REFUSAL_REASON_SET = new Set(EDIT_REFUSAL_REASONS);
|
|
290
|
+
const EDIT_PREPARE_CAUSES = [
|
|
291
|
+
"workspace-access-lost",
|
|
292
|
+
"cancelled",
|
|
293
|
+
"guard-denied",
|
|
294
|
+
"changeset-invalid",
|
|
295
|
+
"binding-unavailable",
|
|
296
|
+
"editor-context-unavailable",
|
|
297
|
+
"lease-unavailable",
|
|
298
|
+
];
|
|
299
|
+
const EDIT_PREPARE_ERROR_KINDS = {
|
|
300
|
+
"workspace-access-lost": "authority-denied",
|
|
301
|
+
cancelled: "cancelled",
|
|
302
|
+
"guard-denied": "authority-denied",
|
|
303
|
+
"changeset-invalid": "validation-failed",
|
|
304
|
+
"binding-unavailable": "authority-denied",
|
|
305
|
+
"editor-context-unavailable": "unavailable",
|
|
306
|
+
"lease-unavailable": "conflict",
|
|
307
|
+
};
|
|
308
|
+
const CODING_RUNTIME_EDIT_REFUSED_OPERATION = defineActivityLogOperation({
|
|
309
|
+
contractKind: "activity-log-operation",
|
|
310
|
+
schemaVersion: 1,
|
|
311
|
+
op: "coding-runtime.edit.refused",
|
|
312
|
+
category: "security",
|
|
313
|
+
owner: "keiko-server",
|
|
314
|
+
emitter: "coding-runtime.codingToolReadEditPorts.logEditRefused",
|
|
315
|
+
fields: {
|
|
316
|
+
reasonCode: {
|
|
317
|
+
type: "string",
|
|
318
|
+
dataClass: "closed-enum",
|
|
319
|
+
required: true,
|
|
320
|
+
values: [...EDIT_REFUSAL_REASONS],
|
|
321
|
+
},
|
|
322
|
+
// #3611 review: EDIT_PREPARE_FAILED covers several causes; this names which one refused the
|
|
323
|
+
// edit before it reached the editor route. The model-facing reason code stays the same.
|
|
324
|
+
prepareCause: {
|
|
325
|
+
type: "string",
|
|
326
|
+
dataClass: "closed-enum",
|
|
327
|
+
required: false,
|
|
328
|
+
values: [...EDIT_PREPARE_CAUSES],
|
|
329
|
+
},
|
|
330
|
+
completeness: { type: "string", dataClass: "completeness-state", required: true },
|
|
331
|
+
loss: { type: "string", dataClass: "loss-state", required: true },
|
|
332
|
+
},
|
|
333
|
+
causal: "correlation",
|
|
334
|
+
lifecycle: "failure",
|
|
335
|
+
analyzerProjection: "failure-cluster",
|
|
336
|
+
failureClasses: ["coding-editor-mutation"],
|
|
337
|
+
proofIds: ["coding-runtime.edit.refused.emitted-line"],
|
|
338
|
+
releaseImpact: "patch",
|
|
339
|
+
});
|
|
340
|
+
const EDIT_REFUSAL_ERROR_KINDS = {
|
|
341
|
+
DIRTY: "conflict",
|
|
342
|
+
VERSION_MISMATCH: "conflict",
|
|
343
|
+
CONTENT_HASH_MISMATCH: "conflict",
|
|
344
|
+
DUPLICATE_ACTION: "conflict",
|
|
345
|
+
MUTATION_IN_FLIGHT: "conflict",
|
|
346
|
+
NO_ACTIVE_SESSION: "unavailable",
|
|
347
|
+
NO_ACTIVE_BRIDGE: "unavailable",
|
|
348
|
+
QUEUE_FULL: "unavailable",
|
|
349
|
+
PROVIDER_UNAVAILABLE: "unavailable",
|
|
350
|
+
EDIT_CLIENT_ERROR: "unavailable",
|
|
351
|
+
INVALID_EDITS: "validation-failed",
|
|
352
|
+
DECOMPOSE_PER_ROOT: "validation-failed",
|
|
353
|
+
PRECONDITION_REQUIRED: "validation-failed",
|
|
354
|
+
UNSUPPORTED_OPERATION: "validation-failed",
|
|
355
|
+
LIMIT_EXCEEDED: "validation-failed",
|
|
356
|
+
EDIT_PREPARE_FAILED: "validation-failed",
|
|
357
|
+
OUT_OF_SCOPE: "authority-denied",
|
|
358
|
+
POLICY_DENIED: "authority-denied",
|
|
359
|
+
APPROVAL_REQUIRED: "authority-denied",
|
|
360
|
+
WORKSPACE_ACCESS_LOST: "authority-denied",
|
|
361
|
+
TIMED_OUT: "timeout",
|
|
362
|
+
CANCELLED: "cancelled",
|
|
363
|
+
EDIT_MUTATION_FAILED: "internal",
|
|
364
|
+
UNCLASSIFIED: "unknown",
|
|
365
|
+
};
|
|
366
|
+
function editRefusalReason(reasonCode) {
|
|
367
|
+
if (reasonCode === undefined)
|
|
368
|
+
return "UNCLASSIFIED";
|
|
369
|
+
return EDIT_REFUSAL_REASON_SET.has(reasonCode)
|
|
370
|
+
? reasonCode
|
|
371
|
+
: "EDIT_CLIENT_ERROR";
|
|
372
|
+
}
|
|
255
373
|
const WORKSPACE_READ_ERROR_KINDS = {
|
|
256
374
|
cancelled: "cancelled",
|
|
257
375
|
timeout: "timeout",
|
|
@@ -278,12 +396,31 @@ function completedRead(deps, binding, request, text) {
|
|
|
278
396
|
byteCount: Buffer.byteLength(window.text, "utf8"),
|
|
279
397
|
// The digest always covers the WHOLE file so a later changeset's expectedContentHash stays
|
|
280
398
|
// anchored to the governed read even when the model only saw a window of it.
|
|
281
|
-
digest:
|
|
399
|
+
digest: wholeFileDigest(text),
|
|
282
400
|
totalLines: window.totalLines,
|
|
283
401
|
...(window.nextStartLine === undefined ? {} : { nextStartLine: window.nextStartLine }),
|
|
284
402
|
},
|
|
285
403
|
};
|
|
286
404
|
}
|
|
405
|
+
// One formula for the digest a read reports and the pre-ask base check compares against (#3612).
|
|
406
|
+
function wholeFileDigest(text) {
|
|
407
|
+
return createHash("sha256").update(text, "utf8").digest("hex");
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* The digest a governed read of `relativePath` reports now, or undefined when that read would not
|
|
411
|
+
* return the whole file (denied path, missing file, over the read bound, read refused). The pre-ask
|
|
412
|
+
* base check of a changeset compares it with the model's `expectedContentHash` (#3612); only the
|
|
413
|
+
* comparison leaves the server, never the text. A denied path is never read, so the check cannot
|
|
414
|
+
* serve as a digest oracle for a file the model is not allowed to read.
|
|
415
|
+
*/
|
|
416
|
+
export async function governedWorkspaceFileDigest(read, relativePath, signal) {
|
|
417
|
+
if (!isGovernedReadPath(relativePath))
|
|
418
|
+
return undefined;
|
|
419
|
+
const result = await read.readText({ relativePath, signal });
|
|
420
|
+
return result.ok && Buffer.byteLength(result.text, "utf8") <= MAX_READ_BYTES
|
|
421
|
+
? wholeFileDigest(result.text)
|
|
422
|
+
: undefined;
|
|
423
|
+
}
|
|
287
424
|
function recordCompletedRead(deps, binding, request) {
|
|
288
425
|
(deps.activityLog ?? processServerLogSink()).write(activityLogEvent(CODING_RUNTIME_WORKSPACE_READ_OPERATION, { correlationId: correlationIdOrUnknown(binding?.runId) }, {
|
|
289
426
|
state: "completed",
|
|
@@ -292,6 +429,22 @@ function recordCompletedRead(deps, binding, request) {
|
|
|
292
429
|
maxLines: request.maxLines ?? 0,
|
|
293
430
|
}));
|
|
294
431
|
}
|
|
432
|
+
// The refusals the secure read gives for the model's own request, by closed code: a path the policy
|
|
433
|
+
// denies, a file that does not exist, is not text, or exceeds the helper's bound. They reach the
|
|
434
|
+
// model and let the catalog settle the call as a refusal, not as a handler fault (#3615). A fault
|
|
435
|
+
// stays bare -- including a port that returns more than the read bound, which is not the model's
|
|
436
|
+
// request but a port this server must not trust.
|
|
437
|
+
export const WORKSPACE_READ_REFUSAL_CODES = {
|
|
438
|
+
denied: "workspace-read-denied",
|
|
439
|
+
"not-found": "workspace-read-not-found",
|
|
440
|
+
"not-text": "workspace-read-not-text",
|
|
441
|
+
"too-large": "workspace-read-too-large",
|
|
442
|
+
};
|
|
443
|
+
function readRefusalCode(reason) {
|
|
444
|
+
return Object.hasOwn(WORKSPACE_READ_REFUSAL_CODES, reason)
|
|
445
|
+
? WORKSPACE_READ_REFUSAL_CODES[reason]
|
|
446
|
+
: undefined;
|
|
447
|
+
}
|
|
295
448
|
function failedRead(deps, binding, request, reason, error) {
|
|
296
449
|
const correlationId = correlationIdOrUnknown(binding?.runId);
|
|
297
450
|
(deps.activityLog ?? processServerLogSink()).write(activityLogEvent(CODING_RUNTIME_WORKSPACE_READ_OPERATION, { correlationId, level: "warn", errorKind: workspaceReadErrorKind(reason) }, {
|
|
@@ -304,7 +457,8 @@ function failedRead(deps, binding, request, reason, error) {
|
|
|
304
457
|
}));
|
|
305
458
|
if (error !== undefined)
|
|
306
459
|
emitReadFailureDiagnostic(deps.diagnostics, correlationId, error);
|
|
307
|
-
|
|
460
|
+
const reasonCode = readRefusalCode(reason);
|
|
461
|
+
return reasonCode === undefined ? { status: "failed" } : { status: "failed", reasonCode };
|
|
308
462
|
}
|
|
309
463
|
function emitReadFailureDiagnostic(diagnostics, correlationId, error) {
|
|
310
464
|
emitServerDiagnostic(diagnostics, {
|
|
@@ -391,15 +545,17 @@ function readPostflight(deps, result, binding, signal, mutationGuard) {
|
|
|
391
545
|
// failure and re-issued the edit while the log stayed empty (cursor review, PR #3381).
|
|
392
546
|
async function executeEdit(deps, request, signal, mutationGuard) {
|
|
393
547
|
const prepared = prepareEdit(deps, request, signal, mutationGuard);
|
|
394
|
-
if (
|
|
395
|
-
return editRefused(deps, editContextCorrelationId(deps), "EDIT_PREPARE_FAILED"
|
|
548
|
+
if ("refused" in prepared) {
|
|
549
|
+
return editRefused(deps, editContextCorrelationId(deps), "EDIT_PREPARE_FAILED", {
|
|
550
|
+
prepareCause: prepared.refused,
|
|
551
|
+
});
|
|
396
552
|
}
|
|
397
553
|
const correlationId = editCorrelationId(prepared.action);
|
|
398
554
|
try {
|
|
399
555
|
const action = await bindLiveEditorSession(deps.editorAgentClient, prepared.action, prepared.workspaceRoot, prepared.signal);
|
|
400
556
|
if (action === undefined) {
|
|
401
557
|
discardMutationLease(deps, prepared.leaseRequest);
|
|
402
|
-
return editRefused(deps, correlationId, "NO_ACTIVE_SESSION",
|
|
558
|
+
return editRefused(deps, correlationId, "NO_ACTIVE_SESSION", NO_ACTIVE_SESSION_DETAIL);
|
|
403
559
|
}
|
|
404
560
|
if (!hasLiveWorkspaceAccess(deps)) {
|
|
405
561
|
discardMutationLease(deps, prepared.leaseRequest);
|
|
@@ -414,7 +570,7 @@ async function executeEdit(deps, request, signal, mutationGuard) {
|
|
|
414
570
|
return await completedEdit(deps, correlationId, completion);
|
|
415
571
|
}
|
|
416
572
|
discardMutationLease(deps, prepared.leaseRequest);
|
|
417
|
-
return editRefused(deps, correlationId, editFailureReasonCode(result),
|
|
573
|
+
return editRefused(deps, correlationId, editFailureReasonCode(result), editFailureDetail(result));
|
|
418
574
|
}
|
|
419
575
|
catch (error) {
|
|
420
576
|
discardMutationLease(deps, prepared.leaseRequest);
|
|
@@ -437,10 +593,11 @@ async function completedEdit(deps, correlationId, completion) {
|
|
|
437
593
|
? { status: "completed" }
|
|
438
594
|
: editRefused(deps, correlationId, reasonCode);
|
|
439
595
|
}
|
|
440
|
-
function editRefused(deps, correlationId, reasonCode,
|
|
441
|
-
|
|
442
|
-
//
|
|
443
|
-
|
|
596
|
+
function editRefused(deps, correlationId, reasonCode, detail = {}) {
|
|
597
|
+
const { message, prepareCause } = detail;
|
|
598
|
+
// The refusal line stays reason-code-only (body-free, AGENTS.md §8) — `message` never reaches
|
|
599
|
+
// the activity log, only the outcome returned to the caller.
|
|
600
|
+
logEditRefused(deps, correlationId, reasonCode, prepareCause);
|
|
444
601
|
return message === undefined
|
|
445
602
|
? { status: "failed", reasonCode }
|
|
446
603
|
: { status: "failed", reasonCode, message };
|
|
@@ -461,11 +618,12 @@ function editFailureReasonCode(result) {
|
|
|
461
618
|
// model sees) and, like `message` above, never into the activity log. Without it the model saw the
|
|
462
619
|
// bare code and retried the same patch blind: the probe rehearsal of 2026-09-08 sent six
|
|
463
620
|
// INVALID_EDITS patches in a row and then gave up without delivering (#3390).
|
|
464
|
-
function
|
|
621
|
+
function editFailureDetail(result) {
|
|
465
622
|
if (!result.ok)
|
|
466
|
-
return
|
|
623
|
+
return {};
|
|
467
624
|
const outcome = result.value.result;
|
|
468
|
-
|
|
625
|
+
const message = outcome.conflict?.message ?? outcome.failure?.message;
|
|
626
|
+
return message === undefined ? {} : { message };
|
|
469
627
|
}
|
|
470
628
|
// The run id is the timeline an edit failure belongs to; the tool action id carries the sidecar's
|
|
471
629
|
// `session:call` shape, which the diagnostics sink rejects as a correlation id (it wrote
|
|
@@ -492,18 +650,20 @@ function emitEditFailureDiagnostic(diagnostics, correlationId, error) {
|
|
|
492
650
|
});
|
|
493
651
|
}
|
|
494
652
|
// A governed edit the editor route refused (a policy denial, a conflict, a failed apply) is a
|
|
495
|
-
// decision the activity log must be able to reconstruct: before
|
|
496
|
-
// in-memory audit feed, and a workbench run that could never edit a file left an empty log
|
|
497
|
-
//
|
|
498
|
-
function
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
653
|
+
// decision the activity log must be able to reconstruct: before 2026-09-03 the only trace was the
|
|
654
|
+
// in-memory audit feed, and a workbench run that could never edit a file left an empty log. The
|
|
655
|
+
// reason is the closed refusal vocabulary above, never content, at warn level (#3610).
|
|
656
|
+
function logEditRefused(deps, correlationId, reasonCode, prepareCause) {
|
|
657
|
+
const reason = editRefusalReason(reasonCode);
|
|
658
|
+
const errorKind = prepareCause === undefined
|
|
659
|
+
? EDIT_REFUSAL_ERROR_KINDS[reason]
|
|
660
|
+
: EDIT_PREPARE_ERROR_KINDS[prepareCause];
|
|
661
|
+
(deps.activityLog ?? processServerLogSink()).write(activityLogEvent(CODING_RUNTIME_EDIT_REFUSED_OPERATION, { level: "warn", correlationId, errorKind }, {
|
|
662
|
+
reasonCode: reason,
|
|
663
|
+
...(prepareCause === undefined ? {} : { prepareCause }),
|
|
664
|
+
completeness: "complete",
|
|
665
|
+
loss: "none",
|
|
666
|
+
}));
|
|
507
667
|
}
|
|
508
668
|
async function bindLiveEditorSession(client, action, workspaceRoot, signal) {
|
|
509
669
|
if (client.listSessions === undefined || workspaceRoot === undefined)
|
|
@@ -551,20 +711,18 @@ function waitForEditorSession(delayMs, signal) {
|
|
|
551
711
|
// binds the mutation authority to the commit boundary.
|
|
552
712
|
function prepareEdit(deps, request, signal, mutationGuard) {
|
|
553
713
|
const changeset = validatedChangeset(deps, request, signal, mutationGuard);
|
|
554
|
-
if (changeset ===
|
|
555
|
-
return
|
|
714
|
+
if (typeof changeset === "string")
|
|
715
|
+
return { refused: changeset };
|
|
556
716
|
const binding = mutationBinding(mutationGuard);
|
|
557
|
-
if (binding === null)
|
|
558
|
-
return
|
|
559
|
-
if (binding === undefined && deps.enforceProducerBinding === true)
|
|
560
|
-
return undefined;
|
|
717
|
+
if (binding === null || (binding === undefined && deps.enforceProducerBinding === true))
|
|
718
|
+
return { refused: "binding-unavailable" };
|
|
561
719
|
const context = resolveEditorContext(deps);
|
|
562
720
|
if (context === undefined || !editorContextMatches(context, binding))
|
|
563
|
-
return
|
|
721
|
+
return { refused: "editor-context-unavailable" };
|
|
564
722
|
const action = changesetAction(request, changeset, context);
|
|
565
723
|
const leaseRequest = registerMutationLease(deps, action, context, binding, mutationGuard);
|
|
566
724
|
if (binding !== undefined && leaseRequest === undefined)
|
|
567
|
-
return
|
|
725
|
+
return { refused: "lease-unavailable" };
|
|
568
726
|
return {
|
|
569
727
|
action,
|
|
570
728
|
leaseRequest,
|
|
@@ -586,15 +744,15 @@ function hasLiveWorkspaceAccess(deps) {
|
|
|
586
744
|
}
|
|
587
745
|
}
|
|
588
746
|
function validatedChangeset(deps, request, signal, mutationGuard) {
|
|
589
|
-
if (!hasLiveWorkspaceAccess(deps)
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
if (!isExactEditorAgentChangeset(request.changeset))
|
|
596
|
-
return
|
|
597
|
-
return normalizeRawSingleFilePatch(request.changeset);
|
|
747
|
+
if (!hasLiveWorkspaceAccess(deps))
|
|
748
|
+
return "workspace-access-lost";
|
|
749
|
+
if (isAborted(signal))
|
|
750
|
+
return "cancelled";
|
|
751
|
+
if (!checkGuard(mutationGuard))
|
|
752
|
+
return "guard-denied";
|
|
753
|
+
if (!("changeset" in request) || !isExactEditorAgentChangeset(request.changeset))
|
|
754
|
+
return "changeset-invalid";
|
|
755
|
+
return normalizeRawSingleFilePatch(request.changeset) ?? "changeset-invalid";
|
|
598
756
|
}
|
|
599
757
|
function normalizeRawSingleFilePatch(changeset) {
|
|
600
758
|
if (!changeset.patch.startsWith(":"))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodingWorkbenchRuntimeFailureCode } from "@oscharko-dev/keiko-contracts";
|
|
1
|
+
import type { CodingWorkbenchModelRefusalReason, CodingWorkbenchRuntimeFailureCode } from "@oscharko-dev/keiko-contracts";
|
|
2
2
|
import type { CodingRuntimeFailureCode } from "./codingRuntimeManager.js";
|
|
3
3
|
/** A launch refused by a runtime backend, carrying the manager's structured failure code. */
|
|
4
4
|
export declare class CodingRuntimeLaunchRejectedError extends Error {
|
|
@@ -23,10 +23,22 @@ export declare class CodingRuntimeLaunchResolutionError extends Error {
|
|
|
23
23
|
* sub-reason when the rejection carries one, or the model-selection reason. Never free text.
|
|
24
24
|
*/
|
|
25
25
|
export declare function launchRejectionDiagnosticReason(error: unknown): string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The two model refusals the Workbench names with a sentence of their own (#3603): the chosen
|
|
28
|
+
* model's window cannot hold a coding run's prompt, or the verification that could raise the
|
|
29
|
+
* window is still running. Every other model refusal keeps the generic model-unavailable sentence.
|
|
30
|
+
*/
|
|
31
|
+
export declare function launchModelRefusalReason(error: unknown): CodingWorkbenchModelRefusalReason | undefined;
|
|
26
32
|
/**
|
|
27
33
|
* Maps a thrown launch rejection to the wire-facing failure code. Anything this module does not
|
|
28
34
|
* recognize keeps the historical `authority-resolution-failed`: an unrecognized throw must not be
|
|
29
35
|
* reported as a specific, wrong cause, and must never be reported as success.
|
|
30
36
|
*/
|
|
31
37
|
export declare function classifyLaunchRejection(error: unknown): CodingWorkbenchRuntimeFailureCode;
|
|
38
|
+
/** The refused start a thrown launch rejection becomes: its wire code and any named model reason. */
|
|
39
|
+
export declare function refusedLaunch(error: unknown): {
|
|
40
|
+
readonly ok: false;
|
|
41
|
+
readonly failureCode: CodingWorkbenchRuntimeFailureCode;
|
|
42
|
+
readonly modelRefusalReason?: CodingWorkbenchModelRefusalReason;
|
|
43
|
+
};
|
|
32
44
|
//# sourceMappingURL=launchFailure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launchFailure.d.ts","sourceRoot":"","sources":["../../src/coding-runtime/launchFailure.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"launchFailure.d.ts","sourceRoot":"","sources":["../../src/coding-runtime/launchFailure.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,iCAAiC,EACjC,iCAAiC,EAClC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAE1E,6FAA6F;AAC7F,qBAAa,gCAAiC,SAAQ,KAAK;IACzD,SAAgB,WAAW,EAAE,wBAAwB,CAAC;IACtD,SAAgB,SAAS,EAAE,OAAO,CAAC;IACnC;;;;OAIG;IACH,SAAgB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3C,YAAmB,WAAW,EAAE,wBAAwB,EAAE,SAAS,UAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,EAW3F;CACF;AAID,MAAM,MAAM,0CAA0C,GAClD,uCAAuC,GACvC,mCAAmC,GACnC,oCAAoC,GACpC,yCAAyC,GACzC,2BAA2B,GAC3B,sCAAsC,CAAC;AAE3C,+FAA+F;AAC/F,qBAAa,kCAAmC,SAAQ,KAAK;IAC3D,SAAgB,MAAM,EAAE,0CAA0C,CAAC;IAEnE,YAAmB,MAAM,EAAE,0CAA0C,EAIpE;CACF;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAMlF;AAsBD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,GACb,iCAAiC,GAAG,SAAS,CAO/C;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,iCAAiC,CAGzF;AAED,qGAAqG;AACrG,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG;IAC7C,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,WAAW,EAAE,iCAAiC,CAAC;IACxD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,iCAAiC,CAAC;CACjE,CAOA"}
|
|
@@ -71,6 +71,21 @@ const LAUNCH_FAILURE_CODES = new Map([
|
|
|
71
71
|
["repository-unavailable", "workspace-unqualified"],
|
|
72
72
|
["workspace-unqualified", "workspace-unqualified"],
|
|
73
73
|
]);
|
|
74
|
+
/**
|
|
75
|
+
* The two model refusals the Workbench names with a sentence of their own (#3603): the chosen
|
|
76
|
+
* model's window cannot hold a coding run's prompt, or the verification that could raise the
|
|
77
|
+
* window is still running. Every other model refusal keeps the generic model-unavailable sentence.
|
|
78
|
+
*/
|
|
79
|
+
export function launchModelRefusalReason(error) {
|
|
80
|
+
if (!(error instanceof CodingRuntimeLaunchRejectedError))
|
|
81
|
+
return undefined;
|
|
82
|
+
if (error.failureCode !== "model-unavailable")
|
|
83
|
+
return undefined;
|
|
84
|
+
return error.reason === "model-context-window-insufficient" ||
|
|
85
|
+
error.reason === "model-verification-pending"
|
|
86
|
+
? error.reason
|
|
87
|
+
: undefined;
|
|
88
|
+
}
|
|
74
89
|
/**
|
|
75
90
|
* Maps a thrown launch rejection to the wire-facing failure code. Anything this module does not
|
|
76
91
|
* recognize keeps the historical `authority-resolution-failed`: an unrecognized throw must not be
|
|
@@ -81,3 +96,12 @@ export function classifyLaunchRejection(error) {
|
|
|
81
96
|
return "authority-resolution-failed";
|
|
82
97
|
return LAUNCH_FAILURE_CODES.get(error.failureCode) ?? "authority-resolution-failed";
|
|
83
98
|
}
|
|
99
|
+
/** The refused start a thrown launch rejection becomes: its wire code and any named model reason. */
|
|
100
|
+
export function refusedLaunch(error) {
|
|
101
|
+
const modelRefusalReason = launchModelRefusalReason(error);
|
|
102
|
+
return {
|
|
103
|
+
ok: false,
|
|
104
|
+
failureCode: classifyLaunchRejection(error),
|
|
105
|
+
...(modelRefusalReason === undefined ? {} : { modelRefusalReason }),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
@@ -11,6 +11,18 @@ export interface ScriptedToolPhase {
|
|
|
11
11
|
readonly tool: string;
|
|
12
12
|
readonly phase: "entered" | "ipc-requested" | "ipc-returned" | "completed" | "failed";
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* The governed ask the generated V2 plugin sends for one tool call (#3612), as its own source
|
|
16
|
+
* builds it: a fixture derived from the plugin, never a hand-written copy of its protocol. The
|
|
17
|
+
* capturing transport refuses the ask, so the tool call itself never runs.
|
|
18
|
+
*/
|
|
19
|
+
export declare function capturedGeneratedV2Ask(input: {
|
|
20
|
+
readonly runId: string;
|
|
21
|
+
readonly sessionId: string;
|
|
22
|
+
readonly callId: string;
|
|
23
|
+
readonly tool: string;
|
|
24
|
+
readonly args: Record<string, unknown>;
|
|
25
|
+
}): Promise<Record<string, unknown>>;
|
|
14
26
|
/** Only the fake upstream permission queue lives here; the real manager issues every approval. */
|
|
15
27
|
export declare class ScriptedGovernedTools {
|
|
16
28
|
private readonly input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_governedTools.d.ts","sourceRoot":"","sources":["../../../src/coding-runtime/opencodeFunctionalHarness/_governedTools.ts"],"names":[],"mappings":"AAmCA,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,aAAa,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAChF,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IACzC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC5D;AACD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,eAAe,GAAG,cAAc,GAAG,WAAW,GAAG,QAAQ,CAAC;CACvF;AAsHD,kGAAkG;AAClG,qBAAa,qBAAqB;IAGb,OAAO,CAAC,QAAQ,CAAC,KAAK;IAFzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwC;IAChE,OAAO,CAAC,QAAQ,CAAK;IACrB,YAAoC,KAAK,EAAE,0BAA0B,EAAI;IAElE,IA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Version) {
|
|
|
101
101
|
return "content" in result ? result.content : undefined;
|
|
102
102
|
return "output" in result ? result.output : undefined;
|
|
103
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* The governed ask the generated V2 plugin sends for one tool call (#3612), as its own source
|
|
106
|
+
* builds it: a fixture derived from the plugin, never a hand-written copy of its protocol. The
|
|
107
|
+
* capturing transport refuses the ask, so the tool call itself never runs.
|
|
108
|
+
*/
|
|
109
|
+
export async function capturedGeneratedV2Ask(input) {
|
|
110
|
+
const bodies = [];
|
|
111
|
+
const tools = new ScriptedGovernedTools({
|
|
112
|
+
env: {
|
|
113
|
+
KEIKO_CODING_MODE: "governed-assist",
|
|
114
|
+
KEIKO_TOOL_FACADE_URL: "http://127.0.0.1/api/coding-sidecar/tool",
|
|
115
|
+
KEIKO_TOOL_FACADE_CAPABILITY: "captured-ask",
|
|
116
|
+
KEIKO_CODING_RUN_ID: input.runId,
|
|
117
|
+
},
|
|
118
|
+
pluginVersion: "v2",
|
|
119
|
+
sessionId: input.sessionId,
|
|
120
|
+
broadcast: () => undefined,
|
|
121
|
+
fetch: (_url, init) => {
|
|
122
|
+
bodies.push(typeof init?.body === "string" ? JSON.parse(init.body) : undefined);
|
|
123
|
+
return Promise.resolve(new Response(null, { status: 403 }));
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
await Promise.allSettled([
|
|
127
|
+
tools.execute({ id: input.callId, name: input.tool, args: input.args }, new AbortController().signal),
|
|
128
|
+
]);
|
|
129
|
+
const [ask] = bodies;
|
|
130
|
+
if (bodies.length !== 1 || typeof ask !== "object" || ask === null) {
|
|
131
|
+
throw new Error("functional-generated-v2-ask-missing");
|
|
132
|
+
}
|
|
133
|
+
return ask;
|
|
134
|
+
}
|
|
104
135
|
/** Only the fake upstream permission queue lives here; the real manager issues every approval. */
|
|
105
136
|
export class ScriptedGovernedTools {
|
|
106
137
|
input;
|
package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeAdapter.js
CHANGED
|
@@ -1017,6 +1017,7 @@ function governedPermissionSource(version = "v1") {
|
|
|
1017
1017
|
String.raw ` const deletedLines = patch.split("\n").filter((line) => line.startsWith("-") && !line.startsWith("---")).length;`,
|
|
1018
1018
|
" return {",
|
|
1019
1019
|
" patterns,",
|
|
1020
|
+
" baseDigests: files.map((file) => ({ file: file.file, expectedContentHash: file.expectedContentHash })),",
|
|
1020
1021
|
' metadata: { kind: "workspace-write", actionClass: "workspace-write", reasonCode: "approval-required", actionKind: "file-edit", scopeLabel: "workspace-scope", risk: "medium", policyReason: "approval-required", targetPath: patterns[0], allowedRelativePaths: patterns, fileCount: patterns.length, addedLines, deletedLines },',
|
|
1021
1022
|
" };",
|
|
1022
1023
|
"}",
|
|
@@ -1040,19 +1041,35 @@ function governedPermissionSource(version = "v1") {
|
|
|
1040
1041
|
? [
|
|
1041
1042
|
" await context.ask({ permission: governedPermission, patterns: request.patterns, always: [], metadata });",
|
|
1042
1043
|
]
|
|
1043
|
-
:
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1044
|
+
: v2GovernedAskSource()),
|
|
1045
|
+
"}",
|
|
1046
|
+
];
|
|
1047
|
+
}
|
|
1048
|
+
// V2 plugin tools have no native ask API: the ask goes to Keiko's governed approval lane over the
|
|
1049
|
+
// tool facade transport, and a stale changeset base comes back as the edit's own refusal (#3612).
|
|
1050
|
+
function v2GovernedAskSource() {
|
|
1051
|
+
return [
|
|
1052
|
+
" const endpoint = process.env.KEIKO_TOOL_FACADE_URL;",
|
|
1053
|
+
" const capability = process.env.KEIKO_TOOL_FACADE_CAPABILITY;",
|
|
1054
|
+
" const runId = process.env.KEIKO_CODING_RUN_ID;",
|
|
1055
|
+
' if (!endpoint || !capability || !runId) throw new Error("keiko-tool-unavailable");',
|
|
1056
|
+
" const seed = `${context.sessionID}:${context.id}`;",
|
|
1057
|
+
' const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(seed));',
|
|
1058
|
+
' const id = "per_" + Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("").slice(0, 32);',
|
|
1059
|
+
// #3612: the ask names its tool call and, for an edit, the changeset's base digests, so the
|
|
1060
|
+
// server can settle the call with the decision and refuse a stale base before any human.
|
|
1061
|
+
" const bases = request.baseDigests ? { baseDigests: request.baseDigests } : {};",
|
|
1062
|
+
" const body = JSON.stringify({ action: 'permission-request', runId, actionId: seed, properties: { id, sessionID: context.sessionID, permission: governedPermission, patterns: request.patterns, always: [], metadata }, ...bases });",
|
|
1063
|
+
` const response = await fetch(endpoint, { method: "POST", redirect: "manual", signal: AbortSignal.timeout(${String(GOVERNED_TOOL_HUMAN_DECISION_WAIT_MS + GOVERNED_TOOL_SETTLEMENT_GRACE_MS)}), headers: { Authorization: "Bearer " + capability, "Content-Type": "application/json" }, body });`,
|
|
1064
|
+
" if (response.status === 409) return staleBaseResult(response);",
|
|
1065
|
+
' if (!response.ok || response.type === "opaqueredirect") throw new Error("keiko-tool-denied");',
|
|
1055
1066
|
"}",
|
|
1067
|
+
// The edit's own refusal result, which the tool returns in place of the call (#3612).
|
|
1068
|
+
"async function staleBaseResult(response) {",
|
|
1069
|
+
" const text = await response.text();",
|
|
1070
|
+
' if (text.length > MAX_RESPONSE_BYTES) throw new Error("keiko-tool-oversized");',
|
|
1071
|
+
' if (!validResult(JSON.parse(text))) throw new Error("keiko-tool-invalid");',
|
|
1072
|
+
" return text;",
|
|
1056
1073
|
];
|
|
1057
1074
|
}
|
|
1058
1075
|
// eslint-disable-next-line max-lines-per-function -- emitted dependency-free tool source keeps all transport gates visible.
|
|
@@ -1112,7 +1129,12 @@ function toolSource(action, schemas, name, version = "v1") {
|
|
|
1112
1129
|
" for (const name of argumentNames) delete request[name];",
|
|
1113
1130
|
" }",
|
|
1114
1131
|
" const approvalProof = await toolApprovalProof(request);",
|
|
1115
|
-
|
|
1132
|
+
...(version === "v1"
|
|
1133
|
+
? [" await askForGovernedPermission(args, context, approvalProof);"]
|
|
1134
|
+
: [
|
|
1135
|
+
" const refusal = await askForGovernedPermission(args, context, approvalProof);",
|
|
1136
|
+
" if (refusal !== undefined) return { content: refusal, metadata: {} };",
|
|
1137
|
+
]),
|
|
1116
1138
|
" if (approvalProof) request.approvalProof = { approvalId: approvalProof.approvalId, approvalDigest: approvalProof.approvalDigest };",
|
|
1117
1139
|
" const body = JSON.stringify(request);",
|
|
1118
1140
|
" const controller = new AbortController();",
|
package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { type CodingRuntimeManager, type CodingRuntimeManagerDeps } from "./codi
|
|
|
7
7
|
import type { CodingToolApprovalBridge } from "./codingToolApprovalBridge.js";
|
|
8
8
|
import type { CodingToolFacade } from "./codingToolFacadePorts.js";
|
|
9
9
|
import type { OpenCodeQuestionRequest } from "./opencodeHttpClient.js";
|
|
10
|
+
import { type ToolBridgeApprovalRejection } from "./opencodeV2ApprovalRequests.js";
|
|
10
11
|
import type { OpenCodeContextGeometry } from "./opencodeLaunchProfile.js";
|
|
11
12
|
import { type OpenCodeGovernedSinkReceipt } from "./opencodeRuntimeAdapter.js";
|
|
12
13
|
import type { OpenCodeReconciliationEvent } from "./opencodeReconciler.js";
|
|
@@ -99,10 +100,21 @@ export interface OpenCodeToolBridge {
|
|
|
99
100
|
* settle the SAME in-flight facade call through the one existing abort path.
|
|
100
101
|
*/
|
|
101
102
|
readonly signal?: AbortSignal;
|
|
102
|
-
}): Promise<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
}): Promise<OpenCodeToolBridgeResponse>;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* `rejection` is set only on a refused governed ask (#3610): the outcome of the human decision,
|
|
107
|
+
* carried beside the status so the route never reads that 403 as an origin refusal.
|
|
108
|
+
*/
|
|
109
|
+
export interface OpenCodeToolBridgeResponse {
|
|
110
|
+
readonly status: number;
|
|
111
|
+
readonly body: string;
|
|
112
|
+
readonly rejection?: ToolBridgeApprovalRejection;
|
|
113
|
+
/** The run and permission request a refused governed ask belongs to (PR #3617 review). */
|
|
114
|
+
readonly approval?: {
|
|
115
|
+
readonly runId: string;
|
|
116
|
+
readonly requestId: string;
|
|
117
|
+
} | undefined;
|
|
106
118
|
}
|
|
107
119
|
export interface OpenCodeRuntimeComposition {
|
|
108
120
|
readonly manager: CodingRuntimeManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencodeRuntimeComposition.d.ts","sourceRoot":"","sources":["../../src/coding-runtime/opencodeRuntimeComposition.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAI3E,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAEtF,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AACrG,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAK9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAO9E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"opencodeRuntimeComposition.d.ts","sourceRoot":"","sources":["../../src/coding-runtime/opencodeRuntimeComposition.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAI3E,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,+BAA+B,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