@oscharko-dev/keiko-server 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -0
- package/dist/assistant-response.d.ts +6 -0
- package/dist/assistant-response.d.ts.map +1 -0
- package/dist/assistant-response.js +12 -0
- package/dist/browser.d.ts +11 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +245 -0
- package/dist/chat-handlers.d.ts +48 -0
- package/dist/chat-handlers.d.ts.map +1 -0
- package/dist/chat-handlers.js +821 -0
- package/dist/chat-stream-handlers.d.ts +4 -0
- package/dist/chat-stream-handlers.d.ts.map +1 -0
- package/dist/chat-stream-handlers.js +136 -0
- package/dist/conversation-prompt.d.ts +8 -0
- package/dist/conversation-prompt.d.ts.map +1 -0
- package/dist/conversation-prompt.js +36 -0
- package/dist/conversation-validation.d.ts +26 -0
- package/dist/conversation-validation.d.ts.map +1 -0
- package/dist/conversation-validation.js +125 -0
- package/dist/credentialPersistence.d.ts +23 -0
- package/dist/credentialPersistence.d.ts.map +1 -0
- package/dist/credentialPersistence.js +93 -0
- package/dist/credentialVault.d.ts +30 -0
- package/dist/credentialVault.d.ts.map +1 -0
- package/dist/credentialVault.js +206 -0
- package/dist/csp.d.ts +3 -0
- package/dist/csp.d.ts.map +1 -0
- package/dist/csp.js +75 -0
- package/dist/deps.d.ts +78 -0
- package/dist/deps.d.ts.map +1 -0
- package/dist/deps.js +457 -0
- package/dist/editor/agentRoutes.d.ts +7 -0
- package/dist/editor/agentRoutes.d.ts.map +1 -0
- package/dist/editor/agentRoutes.js +197 -0
- package/dist/editor/assuredGateRunner.d.ts +36 -0
- package/dist/editor/assuredGateRunner.d.ts.map +1 -0
- package/dist/editor/assuredGateRunner.js +100 -0
- package/dist/editor/assuredPreFilter.d.ts +34 -0
- package/dist/editor/assuredPreFilter.d.ts.map +1 -0
- package/dist/editor/assuredPreFilter.js +134 -0
- package/dist/editor/assuredPreFilterRunner.d.ts +31 -0
- package/dist/editor/assuredPreFilterRunner.d.ts.map +1 -0
- package/dist/editor/assuredPreFilterRunner.js +312 -0
- package/dist/editor/builtinLanguageProviders.d.ts +6 -0
- package/dist/editor/builtinLanguageProviders.d.ts.map +1 -0
- package/dist/editor/builtinLanguageProviders.js +221 -0
- package/dist/editor/codingContext.d.ts +12 -0
- package/dist/editor/codingContext.d.ts.map +1 -0
- package/dist/editor/codingContext.js +121 -0
- package/dist/editor/codingContextEvidence.d.ts +7 -0
- package/dist/editor/codingContextEvidence.d.ts.map +1 -0
- package/dist/editor/codingContextEvidence.js +52 -0
- package/dist/editor/codingContextProviders.d.ts +36 -0
- package/dist/editor/codingContextProviders.d.ts.map +1 -0
- package/dist/editor/codingContextProviders.js +348 -0
- package/dist/editor/completionModelEvidence.d.ts +16 -0
- package/dist/editor/completionModelEvidence.d.ts.map +1 -0
- package/dist/editor/completionModelEvidence.js +50 -0
- package/dist/editor/completionRoutes.d.ts +37 -0
- package/dist/editor/completionRoutes.d.ts.map +1 -0
- package/dist/editor/completionRoutes.js +411 -0
- package/dist/editor/contextRoutes.d.ts +6 -0
- package/dist/editor/contextRoutes.d.ts.map +1 -0
- package/dist/editor/contextRoutes.js +411 -0
- package/dist/editor/disposableAssuredExecution.d.ts +22 -0
- package/dist/editor/disposableAssuredExecution.d.ts.map +1 -0
- package/dist/editor/disposableAssuredExecution.js +57 -0
- package/dist/editor/editorCompletionModel.d.ts +47 -0
- package/dist/editor/editorCompletionModel.d.ts.map +1 -0
- package/dist/editor/editorCompletionModel.js +156 -0
- package/dist/editor/editorInlineCompletionModel.d.ts +34 -0
- package/dist/editor/editorInlineCompletionModel.d.ts.map +1 -0
- package/dist/editor/editorInlineCompletionModel.js +112 -0
- package/dist/editor/editorModelTokenBudget.d.ts +46 -0
- package/dist/editor/editorModelTokenBudget.d.ts.map +1 -0
- package/dist/editor/editorModelTokenBudget.js +121 -0
- package/dist/editor/inlineCompletionRateLimiter.d.ts +19 -0
- package/dist/editor/inlineCompletionRateLimiter.d.ts.map +1 -0
- package/dist/editor/inlineCompletionRateLimiter.js +46 -0
- package/dist/editor/inlineCompletionRoutes.d.ts +26 -0
- package/dist/editor/inlineCompletionRoutes.d.ts.map +1 -0
- package/dist/editor/inlineCompletionRoutes.js +404 -0
- package/dist/editor/inlineCompletionTelemetryEvidence.d.ts +5 -0
- package/dist/editor/inlineCompletionTelemetryEvidence.d.ts.map +1 -0
- package/dist/editor/inlineCompletionTelemetryEvidence.js +42 -0
- package/dist/editor/languageCancellation.d.ts +19 -0
- package/dist/editor/languageCancellation.d.ts.map +1 -0
- package/dist/editor/languageCancellation.js +48 -0
- package/dist/editor/languageProvider.d.ts +39 -0
- package/dist/editor/languageProvider.d.ts.map +1 -0
- package/dist/editor/languageProvider.js +11 -0
- package/dist/editor/languageRoutes.d.ts +15 -0
- package/dist/editor/languageRoutes.d.ts.map +1 -0
- package/dist/editor/languageRoutes.js +106 -0
- package/dist/editor/languageSanitize.d.ts +8 -0
- package/dist/editor/languageSanitize.d.ts.map +1 -0
- package/dist/editor/languageSanitize.js +101 -0
- package/dist/editor/languageService.d.ts +36 -0
- package/dist/editor/languageService.d.ts.map +1 -0
- package/dist/editor/languageService.js +93 -0
- package/dist/editor/languageServiceHost.d.ts +14 -0
- package/dist/editor/languageServiceHost.d.ts.map +1 -0
- package/dist/editor/languageServiceHost.js +242 -0
- package/dist/editor/localKnowledgeRetrieval.d.ts +21 -0
- package/dist/editor/localKnowledgeRetrieval.d.ts.map +1 -0
- package/dist/editor/localKnowledgeRetrieval.js +44 -0
- package/dist/editor/patchApplyEvidence.d.ts +21 -0
- package/dist/editor/patchApplyEvidence.d.ts.map +1 -0
- package/dist/editor/patchApplyEvidence.js +87 -0
- package/dist/editor/patchApplyRoutes.d.ts +16 -0
- package/dist/editor/patchApplyRoutes.d.ts.map +1 -0
- package/dist/editor/patchApplyRoutes.js +307 -0
- package/dist/editor/postApplyVerification.d.ts +42 -0
- package/dist/editor/postApplyVerification.d.ts.map +1 -0
- package/dist/editor/postApplyVerification.js +177 -0
- package/dist/editor/testGenerationEvidence.d.ts +6 -0
- package/dist/editor/testGenerationEvidence.d.ts.map +1 -0
- package/dist/editor/testGenerationEvidence.js +72 -0
- package/dist/editor/testGenerationPatch.d.ts +10 -0
- package/dist/editor/testGenerationPatch.d.ts.map +1 -0
- package/dist/editor/testGenerationPatch.js +66 -0
- package/dist/editor/testGenerationRoutes.d.ts +21 -0
- package/dist/editor/testGenerationRoutes.d.ts.map +1 -0
- package/dist/editor/testGenerationRoutes.js +254 -0
- package/dist/editor/testGenerationRunner.d.ts +23 -0
- package/dist/editor/testGenerationRunner.d.ts.map +1 -0
- package/dist/editor/testGenerationRunner.js +120 -0
- package/dist/editor/textOffsets.d.ts +6 -0
- package/dist/editor/textOffsets.d.ts.map +1 -0
- package/dist/editor/textOffsets.js +82 -0
- package/dist/editor/typescriptLanguageProvider.d.ts +3 -0
- package/dist/editor/typescriptLanguageProvider.d.ts.map +1 -0
- package/dist/editor/typescriptLanguageProvider.js +217 -0
- package/dist/evidence.d.ts +28 -0
- package/dist/evidence.d.ts.map +1 -0
- package/dist/evidence.js +145 -0
- package/dist/files-deny.d.ts +3 -0
- package/dist/files-deny.d.ts.map +1 -0
- package/dist/files-deny.js +12 -0
- package/dist/files.d.ts +97 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +733 -0
- package/dist/gateway-setup.d.ts +10 -0
- package/dist/gateway-setup.d.ts.map +1 -0
- package/dist/gateway-setup.js +896 -0
- package/dist/governed-workflow.d.ts +17 -0
- package/dist/governed-workflow.d.ts.map +1 -0
- package/dist/governed-workflow.js +147 -0
- package/dist/grounded-answer.d.ts +12 -0
- package/dist/grounded-answer.d.ts.map +1 -0
- package/dist/grounded-answer.js +69 -0
- package/dist/grounded-context-index.d.ts +25 -0
- package/dist/grounded-context-index.d.ts.map +1 -0
- package/dist/grounded-context-index.js +169 -0
- package/dist/grounded-document-evidence.d.ts +28 -0
- package/dist/grounded-document-evidence.d.ts.map +1 -0
- package/dist/grounded-document-evidence.js +430 -0
- package/dist/grounded-handoff.d.ts +4 -0
- package/dist/grounded-handoff.d.ts.map +1 -0
- package/dist/grounded-handoff.js +445 -0
- package/dist/grounded-orchestrator.d.ts +43 -0
- package/dist/grounded-orchestrator.d.ts.map +1 -0
- package/dist/grounded-orchestrator.js +1445 -0
- package/dist/grounded-prompt.d.ts +2 -0
- package/dist/grounded-prompt.d.ts.map +1 -0
- package/dist/grounded-prompt.js +17 -0
- package/dist/grounded-qa-hybrid.d.ts +36 -0
- package/dist/grounded-qa-hybrid.d.ts.map +1 -0
- package/dist/grounded-qa-hybrid.js +762 -0
- package/dist/grounded-qa-multi-source.d.ts +38 -0
- package/dist/grounded-qa-multi-source.d.ts.map +1 -0
- package/dist/grounded-qa-multi-source.js +461 -0
- package/dist/grounded-qa.d.ts +45 -0
- package/dist/grounded-qa.d.ts.map +1 -0
- package/dist/grounded-qa.js +877 -0
- package/dist/grounded-rerank.d.ts +26 -0
- package/dist/grounded-rerank.d.ts.map +1 -0
- package/dist/grounded-rerank.js +72 -0
- package/dist/grounded-turn-registry.d.ts +23 -0
- package/dist/grounded-turn-registry.d.ts.map +1 -0
- package/dist/grounded-turn-registry.js +102 -0
- package/dist/headers.d.ts +3 -0
- package/dist/headers.d.ts.map +1 -0
- package/dist/headers.js +22 -0
- package/dist/host-check.d.ts +3 -0
- package/dist/host-check.d.ts.map +1 -0
- package/dist/host-check.js +58 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/load-csp.d.ts +3 -0
- package/dist/load-csp.d.ts.map +1 -0
- package/dist/load-csp.js +100 -0
- package/dist/local-knowledge-grounded-qa.d.ts +42 -0
- package/dist/local-knowledge-grounded-qa.d.ts.map +1 -0
- package/dist/local-knowledge-grounded-qa.js +678 -0
- package/dist/local-knowledge-handlers.d.ts +24 -0
- package/dist/local-knowledge-handlers.d.ts.map +1 -0
- package/dist/local-knowledge-handlers.js +1285 -0
- package/dist/local-knowledge-indexing-registry.d.ts +13 -0
- package/dist/local-knowledge-indexing-registry.d.ts.map +1 -0
- package/dist/local-knowledge-indexing-registry.js +53 -0
- package/dist/localKnowledgeKeyProvider.d.ts +11 -0
- package/dist/localKnowledgeKeyProvider.d.ts.map +1 -0
- package/dist/localKnowledgeKeyProvider.js +48 -0
- package/dist/memory-audit-event-builders.d.ts +21 -0
- package/dist/memory-audit-event-builders.d.ts.map +1 -0
- package/dist/memory-audit-event-builders.js +187 -0
- package/dist/memory-audit-handler.d.ts +23 -0
- package/dist/memory-audit-handler.d.ts.map +1 -0
- package/dist/memory-audit-handler.js +191 -0
- package/dist/memory-capture-policy.d.ts +10 -0
- package/dist/memory-capture-policy.d.ts.map +1 -0
- package/dist/memory-capture-policy.js +44 -0
- package/dist/memory-consolidation-handlers.d.ts +6 -0
- package/dist/memory-consolidation-handlers.d.ts.map +1 -0
- package/dist/memory-consolidation-handlers.js +491 -0
- package/dist/memory-consolidation-registry.d.ts +47 -0
- package/dist/memory-consolidation-registry.d.ts.map +1 -0
- package/dist/memory-consolidation-registry.js +106 -0
- package/dist/memory-conv-handlers.d.ts +8 -0
- package/dist/memory-conv-handlers.d.ts.map +1 -0
- package/dist/memory-conv-handlers.js +369 -0
- package/dist/memory-conversation-context.d.ts +13 -0
- package/dist/memory-conversation-context.d.ts.map +1 -0
- package/dist/memory-conversation-context.js +22 -0
- package/dist/memory-diagnostics.d.ts +29 -0
- package/dist/memory-diagnostics.d.ts.map +1 -0
- package/dist/memory-diagnostics.js +122 -0
- package/dist/memory-embedding.d.ts +21 -0
- package/dist/memory-embedding.d.ts.map +1 -0
- package/dist/memory-embedding.js +264 -0
- package/dist/memory-handlers.d.ts +19 -0
- package/dist/memory-handlers.d.ts.map +1 -0
- package/dist/memory-handlers.js +1204 -0
- package/dist/memory-maintenance-handlers.d.ts +35 -0
- package/dist/memory-maintenance-handlers.d.ts.map +1 -0
- package/dist/memory-maintenance-handlers.js +219 -0
- package/dist/memory-record-builders.d.ts +4 -0
- package/dist/memory-record-builders.d.ts.map +1 -0
- package/dist/memory-record-builders.js +19 -0
- package/dist/memory-retention.d.ts +31 -0
- package/dist/memory-retention.d.ts.map +1 -0
- package/dist/memory-retention.js +151 -0
- package/dist/memory-retrieval-signals.d.ts +12 -0
- package/dist/memory-retrieval-signals.d.ts.map +1 -0
- package/dist/memory-retrieval-signals.js +100 -0
- package/dist/memory-salience.d.ts +12 -0
- package/dist/memory-salience.d.ts.map +1 -0
- package/dist/memory-salience.js +154 -0
- package/dist/memory-scope-sanitizer.d.ts +6 -0
- package/dist/memory-scope-sanitizer.d.ts.map +1 -0
- package/dist/memory-scope-sanitizer.js +106 -0
- package/dist/memory-target-resolver.d.ts +4 -0
- package/dist/memory-target-resolver.d.ts.map +1 -0
- package/dist/memory-target-resolver.js +73 -0
- package/dist/memory-workflow-port.d.ts +14 -0
- package/dist/memory-workflow-port.d.ts.map +1 -0
- package/dist/memory-workflow-port.js +186 -0
- package/dist/private-json.d.ts +3 -0
- package/dist/private-json.d.ts.map +1 -0
- package/dist/private-json.js +62 -0
- package/dist/promptEnhancer/index.d.ts +3 -0
- package/dist/promptEnhancer/index.d.ts.map +1 -0
- package/dist/promptEnhancer/index.js +5 -0
- package/dist/promptEnhancer/orchestrate.d.ts +2 -0
- package/dist/promptEnhancer/orchestrate.d.ts.map +1 -0
- package/dist/promptEnhancer/orchestrate.js +5 -0
- package/dist/promptEnhancer/routes.d.ts +9 -0
- package/dist/promptEnhancer/routes.d.ts.map +1 -0
- package/dist/promptEnhancer/routes.js +205 -0
- package/dist/qualityIntelligence/capsuleAdapter.d.ts +27 -0
- package/dist/qualityIntelligence/capsuleAdapter.d.ts.map +1 -0
- package/dist/qualityIntelligence/capsuleAdapter.js +57 -0
- package/dist/qualityIntelligence/connectorAuthorization.d.ts +22 -0
- package/dist/qualityIntelligence/connectorAuthorization.d.ts.map +1 -0
- package/dist/qualityIntelligence/connectorAuthorization.js +35 -0
- package/dist/qualityIntelligence/connectorErrors.d.ts +16 -0
- package/dist/qualityIntelligence/connectorErrors.d.ts.map +1 -0
- package/dist/qualityIntelligence/connectorErrors.js +56 -0
- package/dist/qualityIntelligence/connectorRoutes.d.ts +7 -0
- package/dist/qualityIntelligence/connectorRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/connectorRoutes.js +167 -0
- package/dist/qualityIntelligence/editRoutes.d.ts +5 -0
- package/dist/qualityIntelligence/editRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/editRoutes.js +293 -0
- package/dist/qualityIntelligence/exportAssembly.d.ts +22 -0
- package/dist/qualityIntelligence/exportAssembly.d.ts.map +1 -0
- package/dist/qualityIntelligence/exportAssembly.js +352 -0
- package/dist/qualityIntelligence/exportRoutes.d.ts +5 -0
- package/dist/qualityIntelligence/exportRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/exportRoutes.js +320 -0
- package/dist/qualityIntelligence/figma/figmaConcurrency.d.ts +8 -0
- package/dist/qualityIntelligence/figma/figmaConcurrency.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaConcurrency.js +34 -0
- package/dist/qualityIntelligence/figma/figmaConnector.d.ts +65 -0
- package/dist/qualityIntelligence/figma/figmaConnector.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaConnector.js +184 -0
- package/dist/qualityIntelligence/figma/figmaConnectorAudit.d.ts +52 -0
- package/dist/qualityIntelligence/figma/figmaConnectorAudit.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaConnectorAudit.js +63 -0
- package/dist/qualityIntelligence/figma/figmaConnectorErrors.d.ts +31 -0
- package/dist/qualityIntelligence/figma/figmaConnectorErrors.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaConnectorErrors.js +220 -0
- package/dist/qualityIntelligence/figma/figmaConnectorMetrics.d.ts +44 -0
- package/dist/qualityIntelligence/figma/figmaConnectorMetrics.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaConnectorMetrics.js +49 -0
- package/dist/qualityIntelligence/figma/figmaConsent.d.ts +39 -0
- package/dist/qualityIntelligence/figma/figmaConsent.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaConsent.js +62 -0
- package/dist/qualityIntelligence/figma/figmaHttpPort.d.ts +28 -0
- package/dist/qualityIntelligence/figma/figmaHttpPort.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaHttpPort.js +70 -0
- package/dist/qualityIntelligence/figma/figmaObservedActions.d.ts +49 -0
- package/dist/qualityIntelligence/figma/figmaObservedActions.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaObservedActions.js +89 -0
- package/dist/qualityIntelligence/figma/figmaReadiness.d.ts +32 -0
- package/dist/qualityIntelligence/figma/figmaReadiness.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaReadiness.js +67 -0
- package/dist/qualityIntelligence/figma/figmaRenderPort.d.ts +29 -0
- package/dist/qualityIntelligence/figma/figmaRenderPort.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaRenderPort.js +93 -0
- package/dist/qualityIntelligence/figma/figmaResnapshot.d.ts +28 -0
- package/dist/qualityIntelligence/figma/figmaResnapshot.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaResnapshot.js +38 -0
- package/dist/qualityIntelligence/figma/figmaRetry.d.ts +31 -0
- package/dist/qualityIntelligence/figma/figmaRetry.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaRetry.js +62 -0
- package/dist/qualityIntelligence/figma/figmaScopeRef.d.ts +9 -0
- package/dist/qualityIntelligence/figma/figmaScopeRef.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaScopeRef.js +18 -0
- package/dist/qualityIntelligence/figma/figmaScopedPagination.d.ts +86 -0
- package/dist/qualityIntelligence/figma/figmaScopedPagination.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaScopedPagination.js +308 -0
- package/dist/qualityIntelligence/figma/figmaSnapshotBuilder.d.ts +31 -0
- package/dist/qualityIntelligence/figma/figmaSnapshotBuilder.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaSnapshotBuilder.js +314 -0
- package/dist/qualityIntelligence/figma/figmaSnapshotHash.d.ts +18 -0
- package/dist/qualityIntelligence/figma/figmaSnapshotHash.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaSnapshotHash.js +63 -0
- package/dist/qualityIntelligence/figma/figmaSnapshotTypes.d.ts +65 -0
- package/dist/qualityIntelligence/figma/figmaSnapshotTypes.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaSnapshotTypes.js +13 -0
- package/dist/qualityIntelligence/figma/figmaTokenSource.d.ts +9 -0
- package/dist/qualityIntelligence/figma/figmaTokenSource.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaTokenSource.js +61 -0
- package/dist/qualityIntelligence/figma/figmaTokenStore.d.ts +19 -0
- package/dist/qualityIntelligence/figma/figmaTokenStore.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaTokenStore.js +156 -0
- package/dist/qualityIntelligence/figma/figmaUrl.d.ts +6 -0
- package/dist/qualityIntelligence/figma/figmaUrl.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/figmaUrl.js +36 -0
- package/dist/qualityIntelligence/figma/index.d.ts +20 -0
- package/dist/qualityIntelligence/figma/index.d.ts.map +1 -0
- package/dist/qualityIntelligence/figma/index.js +26 -0
- package/dist/qualityIntelligence/figmaCodegenRoutes.d.ts +28 -0
- package/dist/qualityIntelligence/figmaCodegenRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/figmaCodegenRoutes.js +165 -0
- package/dist/qualityIntelligence/figmaSnapshotAdapter.d.ts +55 -0
- package/dist/qualityIntelligence/figmaSnapshotAdapter.d.ts.map +1 -0
- package/dist/qualityIntelligence/figmaSnapshotAdapter.js +219 -0
- package/dist/qualityIntelligence/figmaSnapshotOrchestration.d.ts +64 -0
- package/dist/qualityIntelligence/figmaSnapshotOrchestration.d.ts.map +1 -0
- package/dist/qualityIntelligence/figmaSnapshotOrchestration.js +203 -0
- package/dist/qualityIntelligence/figmaSnapshotRoutes.d.ts +112 -0
- package/dist/qualityIntelligence/figmaSnapshotRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/figmaSnapshotRoutes.js +1063 -0
- package/dist/qualityIntelligence/figmaSnapshotScreenIds.d.ts +19 -0
- package/dist/qualityIntelligence/figmaSnapshotScreenIds.d.ts.map +1 -0
- package/dist/qualityIntelligence/figmaSnapshotScreenIds.js +75 -0
- package/dist/qualityIntelligence/generationPort.d.ts +15 -0
- package/dist/qualityIntelligence/generationPort.d.ts.map +1 -0
- package/dist/qualityIntelligence/generationPort.js +185 -0
- package/dist/qualityIntelligence/handoffErrors.d.ts +9 -0
- package/dist/qualityIntelligence/handoffErrors.d.ts.map +1 -0
- package/dist/qualityIntelligence/handoffErrors.js +21 -0
- package/dist/qualityIntelligence/handoffRoutes.d.ts +15 -0
- package/dist/qualityIntelligence/handoffRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/handoffRoutes.js +341 -0
- package/dist/qualityIntelligence/index.d.ts +17 -0
- package/dist/qualityIntelligence/index.d.ts.map +1 -0
- package/dist/qualityIntelligence/index.js +36 -0
- package/dist/qualityIntelligence/judgePort.d.ts +30 -0
- package/dist/qualityIntelligence/judgePort.d.ts.map +1 -0
- package/dist/qualityIntelligence/judgePort.js +326 -0
- package/dist/qualityIntelligence/modelSelection.d.ts +58 -0
- package/dist/qualityIntelligence/modelSelection.d.ts.map +1 -0
- package/dist/qualityIntelligence/modelSelection.js +148 -0
- package/dist/qualityIntelligence/reCheckRoutes.d.ts +6 -0
- package/dist/qualityIntelligence/reCheckRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/reCheckRoutes.js +1157 -0
- package/dist/qualityIntelligence/retentionEnforcement.d.ts +13 -0
- package/dist/qualityIntelligence/retentionEnforcement.d.ts.map +1 -0
- package/dist/qualityIntelligence/retentionEnforcement.js +47 -0
- package/dist/qualityIntelligence/retentionRoutes.d.ts +8 -0
- package/dist/qualityIntelligence/retentionRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/retentionRoutes.js +74 -0
- package/dist/qualityIntelligence/reviewRoutes.d.ts +5 -0
- package/dist/qualityIntelligence/reviewRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/reviewRoutes.js +145 -0
- package/dist/qualityIntelligence/reviewStore.d.ts +75 -0
- package/dist/qualityIntelligence/reviewStore.d.ts.map +1 -0
- package/dist/qualityIntelligence/reviewStore.js +170 -0
- package/dist/qualityIntelligence/runExecution.d.ts +36 -0
- package/dist/qualityIntelligence/runExecution.d.ts.map +1 -0
- package/dist/qualityIntelligence/runExecution.js +180 -0
- package/dist/qualityIntelligence/runIngestion.d.ts +70 -0
- package/dist/qualityIntelligence/runIngestion.d.ts.map +1 -0
- package/dist/qualityIntelligence/runIngestion.js +1235 -0
- package/dist/qualityIntelligence/runRegistry.d.ts +31 -0
- package/dist/qualityIntelligence/runRegistry.d.ts.map +1 -0
- package/dist/qualityIntelligence/runRegistry.js +66 -0
- package/dist/qualityIntelligence/runRoutes.d.ts +16 -0
- package/dist/qualityIntelligence/runRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/runRoutes.js +357 -0
- package/dist/qualityIntelligence/traceabilityRoutes.d.ts +5 -0
- package/dist/qualityIntelligence/traceabilityRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/traceabilityRoutes.js +173 -0
- package/dist/qualityIntelligence/uiRoutes.d.ts +7 -0
- package/dist/qualityIntelligence/uiRoutes.d.ts.map +1 -0
- package/dist/qualityIntelligence/uiRoutes.js +336 -0
- package/dist/read-handlers.d.ts +9 -0
- package/dist/read-handlers.d.ts.map +1 -0
- package/dist/read-handlers.js +265 -0
- package/dist/relationship-handlers.d.ts +191 -0
- package/dist/relationship-handlers.d.ts.map +1 -0
- package/dist/relationship-handlers.js +0 -0
- package/dist/routes.d.ts +37 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +507 -0
- package/dist/run-engine.d.ts +25 -0
- package/dist/run-engine.d.ts.map +1 -0
- package/dist/run-engine.js +385 -0
- package/dist/run-handlers.d.ts +9 -0
- package/dist/run-handlers.d.ts.map +1 -0
- package/dist/run-handlers.js +465 -0
- package/dist/run-request.d.ts +17 -0
- package/dist/run-request.d.ts.map +1 -0
- package/dist/run-request.js +219 -0
- package/dist/runs.d.ts +47 -0
- package/dist/runs.d.ts.map +1 -0
- package/dist/runs.js +100 -0
- package/dist/server.d.ts +13 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +152 -0
- package/dist/sink.d.ts +28 -0
- package/dist/sink.d.ts.map +1 -0
- package/dist/sink.js +80 -0
- package/dist/sse-write.d.ts +9 -0
- package/dist/sse-write.d.ts.map +1 -0
- package/dist/sse-write.js +26 -0
- package/dist/sse.d.ts +8 -0
- package/dist/sse.d.ts.map +1 -0
- package/dist/sse.js +27 -0
- package/dist/static.d.ts +5 -0
- package/dist/static.d.ts.map +1 -0
- package/dist/static.js +76 -0
- package/dist/store/chats.d.ts +17 -0
- package/dist/store/chats.d.ts.map +1 -0
- package/dist/store/chats.js +624 -0
- package/dist/store/db.d.ts +11 -0
- package/dist/store/db.d.ts.map +1 -0
- package/dist/store/db.js +203 -0
- package/dist/store/errors.d.ts +13 -0
- package/dist/store/errors.d.ts.map +1 -0
- package/dist/store/errors.js +30 -0
- package/dist/store/index.d.ts +7 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +6 -0
- package/dist/store/messages.d.ts +8 -0
- package/dist/store/messages.d.ts.map +1 -0
- package/dist/store/messages.js +149 -0
- package/dist/store/paths.d.ts +5 -0
- package/dist/store/paths.d.ts.map +1 -0
- package/dist/store/paths.js +84 -0
- package/dist/store/projects.d.ts +8 -0
- package/dist/store/projects.d.ts.map +1 -0
- package/dist/store/projects.js +59 -0
- package/dist/store/relationship-audit.d.ts +42 -0
- package/dist/store/relationship-audit.d.ts.map +1 -0
- package/dist/store/relationship-audit.js +155 -0
- package/dist/store/relationships.d.ts +191 -0
- package/dist/store/relationships.d.ts.map +1 -0
- package/dist/store/relationships.js +724 -0
- package/dist/store/schema.d.ts +4 -0
- package/dist/store/schema.d.ts.map +1 -0
- package/dist/store/schema.js +220 -0
- package/dist/store/types.d.ts +29 -0
- package/dist/store/types.d.ts.map +1 -0
- package/dist/store/types.js +8 -0
- package/dist/store/validation.d.ts +7 -0
- package/dist/store/validation.d.ts.map +1 -0
- package/dist/store/validation.js +117 -0
- package/dist/store-handlers.d.ts +17 -0
- package/dist/store-handlers.d.ts.map +1 -0
- package/dist/store-handlers.js +872 -0
- package/dist/terminal-errors.d.ts +22 -0
- package/dist/terminal-errors.d.ts.map +1 -0
- package/dist/terminal-errors.js +45 -0
- package/dist/terminal-evidence.d.ts +21 -0
- package/dist/terminal-evidence.d.ts.map +1 -0
- package/dist/terminal-evidence.js +65 -0
- package/dist/terminal-routes.d.ts +10 -0
- package/dist/terminal-routes.d.ts.map +1 -0
- package/dist/terminal-routes.js +219 -0
- package/dist/terminal.d.ts +68 -0
- package/dist/terminal.d.ts.map +1 -0
- package/dist/terminal.js +855 -0
- package/package.json +52 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiRoutes.d.ts","sourceRoot":"","sources":["../../src/qualityIntelligence/uiRoutes.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAOhD,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAC7C,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAoSzC,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAkDpF;AAMD,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAmClF"}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
// Quality Intelligence read-only UI BFF routes (Issue #280, Epic #270).
|
|
2
|
+
//
|
|
3
|
+
// Two additive HTTP handlers under `/api/quality-intelligence/runs*`:
|
|
4
|
+
// * GET /api/quality-intelligence/runs — list run summaries
|
|
5
|
+
// * GET /api/quality-intelligence/runs/:id — single run detail
|
|
6
|
+
//
|
|
7
|
+
// Hard constraints:
|
|
8
|
+
// * No raw prompts, model outputs, credentials, or unsafe markdown in responses.
|
|
9
|
+
// * Only refs, counts, and redacted summaries reach the browser.
|
|
10
|
+
// * Error JSON NEVER contains sensitive field values — only safe error codes.
|
|
11
|
+
// * No provider SDK imports; no outbound network calls from these handlers.
|
|
12
|
+
// * listQualityIntelligenceRuns / loadQualityIntelligenceRun are composed from
|
|
13
|
+
// keiko-evidence UNCHANGED (ADR-0023 D8).
|
|
14
|
+
import { listQualityIntelligenceRuns, loadQualityIntelligenceRun, loadQualityIntelligenceCandidates, } from "@oscharko-dev/keiko-evidence";
|
|
15
|
+
import { loadRunReviewState, candidateReviewStateOf, runReviewStateOf } from "./reviewStore.js";
|
|
16
|
+
import { qiRunRegistry } from "./runRegistry.js";
|
|
17
|
+
// Issue #646 — bound manifest loading on the run-list path. Default 100 keeps the local BFF
|
|
18
|
+
// responsive on large evidence stores; the max cap of 500 mirrors the QI run-detail budget so
|
|
19
|
+
// the UI cannot ask for an unbounded scan even with an explicit query parameter.
|
|
20
|
+
export const QI_RUN_LIST_DEFAULT_LIMIT = 100;
|
|
21
|
+
export const QI_RUN_LIST_MAX_LIMIT = 500;
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
// Evidence-dir resolution — mirrors the pattern from read-handlers.ts (no new logic)
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
function resolveEvidenceDir(deps) {
|
|
26
|
+
return deps.evidenceDir;
|
|
27
|
+
}
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
// Projection helpers — build browser-safe wire shapes from manifest data.
|
|
30
|
+
// NEVER include raw prompt, raw source content, credentials, or unsafe markdown.
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
function projectRunSummary(manifest, reviewState) {
|
|
33
|
+
if (manifest === undefined)
|
|
34
|
+
return null;
|
|
35
|
+
return {
|
|
36
|
+
id: manifest.runId,
|
|
37
|
+
status: manifest.status,
|
|
38
|
+
requestedAt: manifest.planAt,
|
|
39
|
+
completedAt: manifest.completedAt ?? null,
|
|
40
|
+
totals: {
|
|
41
|
+
candidates: manifest.totals.candidates,
|
|
42
|
+
findings: manifest.totals.findings,
|
|
43
|
+
exports: manifest.totals.exports,
|
|
44
|
+
},
|
|
45
|
+
reviewState,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
// FIX A11y-2 (Issue #282) — resolve the run's overall review state for the list item so the hub list
|
|
49
|
+
// can show a per-run lifecycle badge (AC1). Loads the small `.review.json` companion per listed run;
|
|
50
|
+
// this is acceptable because the list path already loads a per-run manifest and the list is bounded
|
|
51
|
+
// by the route limit. Defaults to "open" when no companion exists or no evidence dir is configured.
|
|
52
|
+
function listReviewStateFor(runId, evidenceDir) {
|
|
53
|
+
if (evidenceDir === undefined)
|
|
54
|
+
return "open";
|
|
55
|
+
return runReviewStateOf(loadRunReviewState(runId, evidenceDir));
|
|
56
|
+
}
|
|
57
|
+
const CANDIDATE_TEXT_LIMITS = {
|
|
58
|
+
title: 240,
|
|
59
|
+
preconditions: 1_000,
|
|
60
|
+
steps: 1_000,
|
|
61
|
+
expectedResults: 1_000,
|
|
62
|
+
tags: 120,
|
|
63
|
+
};
|
|
64
|
+
const CANDIDATE_LIST_LIMITS = {
|
|
65
|
+
preconditions: 20,
|
|
66
|
+
steps: 50,
|
|
67
|
+
expectedResults: 50,
|
|
68
|
+
tags: 30,
|
|
69
|
+
};
|
|
70
|
+
function truncateTextForUi(value, limit) {
|
|
71
|
+
if (value.length <= limit)
|
|
72
|
+
return { value, truncated: false };
|
|
73
|
+
return { value: `${value.slice(0, Math.max(0, limit - 3))}...`, truncated: true };
|
|
74
|
+
}
|
|
75
|
+
function truncateListForUi(values, field) {
|
|
76
|
+
const maxItems = CANDIDATE_LIST_LIMITS[field];
|
|
77
|
+
const maxChars = CANDIDATE_TEXT_LIMITS[field];
|
|
78
|
+
const items = values.slice(0, maxItems);
|
|
79
|
+
let truncated = values.length > maxItems;
|
|
80
|
+
const projected = items.map((item) => {
|
|
81
|
+
const next = truncateTextForUi(item, maxChars);
|
|
82
|
+
if (next.truncated)
|
|
83
|
+
truncated = true;
|
|
84
|
+
return next.value;
|
|
85
|
+
});
|
|
86
|
+
return { value: projected, truncated };
|
|
87
|
+
}
|
|
88
|
+
function addTruncatedField(fields, field) {
|
|
89
|
+
if (!fields.includes(field))
|
|
90
|
+
fields.push(field);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Build a candidateId → weak-test flag map from the persisted test-quality findings (Epic #736).
|
|
94
|
+
* Only findings of kind "test-quality" that carry a candidateId contribute; the first finding wins
|
|
95
|
+
* per candidate (the judge emits at most one test-quality finding per candidate).
|
|
96
|
+
*/
|
|
97
|
+
function buildWeakTestFlags(manifest) {
|
|
98
|
+
const flags = new Map();
|
|
99
|
+
for (const f of manifest.findings) {
|
|
100
|
+
if (f.kind !== "test-quality" || f.candidateId === undefined)
|
|
101
|
+
continue;
|
|
102
|
+
if (flags.has(f.candidateId))
|
|
103
|
+
continue;
|
|
104
|
+
flags.set(f.candidateId, { severity: f.severity, rationale: f.summaryRedacted });
|
|
105
|
+
}
|
|
106
|
+
return flags;
|
|
107
|
+
}
|
|
108
|
+
function projectCandidate(row, reviewArtifact, weakTestFlags) {
|
|
109
|
+
const weakTestFlag = weakTestFlags.get(row.id);
|
|
110
|
+
const title = truncateTextForUi(row.title, CANDIDATE_TEXT_LIMITS.title);
|
|
111
|
+
const preconditions = truncateListForUi(row.preconditions, "preconditions");
|
|
112
|
+
const steps = truncateListForUi(row.steps, "steps");
|
|
113
|
+
const expectedResults = truncateListForUi(row.expectedResults, "expectedResults");
|
|
114
|
+
const tags = truncateListForUi(row.tags, "tags");
|
|
115
|
+
const qualityVerdict = row.qualityVerdict;
|
|
116
|
+
const truncatedFields = [];
|
|
117
|
+
if (title.truncated)
|
|
118
|
+
addTruncatedField(truncatedFields, "title");
|
|
119
|
+
if (preconditions.truncated)
|
|
120
|
+
addTruncatedField(truncatedFields, "preconditions");
|
|
121
|
+
if (steps.truncated)
|
|
122
|
+
addTruncatedField(truncatedFields, "steps");
|
|
123
|
+
if (expectedResults.truncated)
|
|
124
|
+
addTruncatedField(truncatedFields, "expectedResults");
|
|
125
|
+
if (tags.truncated)
|
|
126
|
+
addTruncatedField(truncatedFields, "tags");
|
|
127
|
+
const projected = {
|
|
128
|
+
id: row.id,
|
|
129
|
+
title: title.value,
|
|
130
|
+
preconditions: preconditions.value,
|
|
131
|
+
steps: steps.value,
|
|
132
|
+
expectedResults: expectedResults.value,
|
|
133
|
+
priority: row.priority,
|
|
134
|
+
riskClass: row.riskClass,
|
|
135
|
+
tags: tags.value,
|
|
136
|
+
status: row.status,
|
|
137
|
+
reviewState: candidateReviewStateOf(reviewArtifact, row.id),
|
|
138
|
+
derivedFromAtomIds: row.derivedFromAtomIds,
|
|
139
|
+
...(qualityVerdict !== undefined ? { qualityVerdict } : {}),
|
|
140
|
+
...(weakTestFlag !== undefined ? { weakTestFlag } : {}),
|
|
141
|
+
...(truncatedFields.length > 0 ? { truncatedFields } : {}),
|
|
142
|
+
};
|
|
143
|
+
return projected;
|
|
144
|
+
}
|
|
145
|
+
function projectCoverageByAtom(manifest) {
|
|
146
|
+
if (manifest.coverageMatrix === undefined)
|
|
147
|
+
return Object.freeze([]);
|
|
148
|
+
return Object.freeze(manifest.coverageMatrix.map((row) => ({
|
|
149
|
+
atomId: row.atomId,
|
|
150
|
+
status: row.status,
|
|
151
|
+
confidence: row.confidence,
|
|
152
|
+
// Optional redacted excerpt (#790); absent on runs recorded before it existed.
|
|
153
|
+
...(row.requirementExcerptRedacted !== undefined
|
|
154
|
+
? { requirementExcerptRedacted: row.requirementExcerptRedacted }
|
|
155
|
+
: {}),
|
|
156
|
+
})));
|
|
157
|
+
}
|
|
158
|
+
function computeCoveragePercentage(coverageByAtom) {
|
|
159
|
+
if (coverageByAtom.length === 0)
|
|
160
|
+
return 0;
|
|
161
|
+
const covered = coverageByAtom.filter((r) => r.status === "covered").length;
|
|
162
|
+
return (covered / coverageByAtom.length) * 100;
|
|
163
|
+
}
|
|
164
|
+
function projectDriftMetadata(manifest, candidateRows) {
|
|
165
|
+
const sourceFingerprintCount = manifest.sourceFingerprints?.length ?? 0;
|
|
166
|
+
const atomFingerprintCount = manifest.atomFingerprints?.length ?? 0;
|
|
167
|
+
const supported = sourceFingerprintCount > 0 && candidateRows.length > 0;
|
|
168
|
+
return {
|
|
169
|
+
status: supported ? "not-checked" : "unavailable",
|
|
170
|
+
sourceFingerprintCount,
|
|
171
|
+
atomFingerprintCount,
|
|
172
|
+
reCheckSupported: supported,
|
|
173
|
+
regenerateStaleSupported: supported,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function projectRunDetail(inputs) {
|
|
177
|
+
const { manifest, candidateRows, reviewArtifact } = inputs;
|
|
178
|
+
const findingRefs = manifest.findings.map((f) => ({
|
|
179
|
+
id: f.id,
|
|
180
|
+
kind: f.kind,
|
|
181
|
+
severity: f.severity,
|
|
182
|
+
summaryRedacted: f.summaryRedacted,
|
|
183
|
+
}));
|
|
184
|
+
const weakTestFlags = buildWeakTestFlags(manifest);
|
|
185
|
+
const candidates = candidateRows.map((row) => projectCandidate(row, reviewArtifact, weakTestFlags));
|
|
186
|
+
const candidateIds = candidates.length > 0 ? candidates.map((c) => c.id) : [...manifest.provenanceRefs.envelopeIds];
|
|
187
|
+
const evidenceRefs = manifest.evidenceRefs.map((r) => ({
|
|
188
|
+
envelopeId: r.envelopeId,
|
|
189
|
+
atomId: r.atomId,
|
|
190
|
+
}));
|
|
191
|
+
const coverageByAtom = projectCoverageByAtom(manifest);
|
|
192
|
+
return {
|
|
193
|
+
id: manifest.runId,
|
|
194
|
+
status: manifest.status,
|
|
195
|
+
requestedAt: manifest.planAt,
|
|
196
|
+
completedAt: manifest.completedAt ?? null,
|
|
197
|
+
totals: {
|
|
198
|
+
candidates: manifest.totals.candidates,
|
|
199
|
+
findings: manifest.totals.findings,
|
|
200
|
+
exports: manifest.totals.exports,
|
|
201
|
+
},
|
|
202
|
+
findingRefs,
|
|
203
|
+
candidateIds,
|
|
204
|
+
candidates,
|
|
205
|
+
evidenceRefs,
|
|
206
|
+
reviewState: runReviewStateOf(reviewArtifact),
|
|
207
|
+
manifestSchemaVersion: manifest.qiEvidenceSchemaVersion,
|
|
208
|
+
coveragePercentage: computeCoveragePercentage(coverageByAtom),
|
|
209
|
+
coverageByAtom,
|
|
210
|
+
qualityScore: manifest.qualityScore ?? null,
|
|
211
|
+
drift: projectDriftMetadata(manifest, candidateRows),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function parseLimitParam(ctx) {
|
|
215
|
+
const raw = ctx.url.searchParams.get("limit");
|
|
216
|
+
if (raw === null) {
|
|
217
|
+
return { ok: true, limit: QI_RUN_LIST_DEFAULT_LIMIT };
|
|
218
|
+
}
|
|
219
|
+
// Strict integer parse: reject empty, leading zeros, signs, decimals, scientific notation,
|
|
220
|
+
// whitespace, NaN/Infinity. Anything that isn't a bare decimal positive integer 400s.
|
|
221
|
+
if (!/^[1-9]\d*$/.test(raw)) {
|
|
222
|
+
return {
|
|
223
|
+
ok: false,
|
|
224
|
+
response: {
|
|
225
|
+
status: 400,
|
|
226
|
+
body: { error: { code: "BAD_REQUEST", message: "limit must be a positive integer" } },
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
const value = Number(raw);
|
|
231
|
+
if (!Number.isInteger(value) || value < 1) {
|
|
232
|
+
return {
|
|
233
|
+
ok: false,
|
|
234
|
+
response: {
|
|
235
|
+
status: 400,
|
|
236
|
+
body: { error: { code: "BAD_REQUEST", message: "limit must be a positive integer" } },
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
return { ok: true, limit: Math.min(value, QI_RUN_LIST_MAX_LIMIT) };
|
|
241
|
+
}
|
|
242
|
+
export function handleListQiRuns(ctx, deps) {
|
|
243
|
+
const limitOutcome = parseLimitParam(ctx);
|
|
244
|
+
if (!limitOutcome.ok)
|
|
245
|
+
return limitOutcome.response;
|
|
246
|
+
const limit = limitOutcome.limit;
|
|
247
|
+
const evidenceDir = resolveEvidenceDir(deps);
|
|
248
|
+
try {
|
|
249
|
+
// In-flight runs (not yet persisted to evidence) appear first so a running run is visible
|
|
250
|
+
// immediately. Completed runs come from evidence (restart-safe).
|
|
251
|
+
const active = qiRunRegistry.listActiveSummaries();
|
|
252
|
+
const activeIds = new Set(active.map((r) => r.id));
|
|
253
|
+
const runIds = listQualityIntelligenceRuns({ evidenceDir }).filter((id) => !activeIds.has(id));
|
|
254
|
+
const totalRunIds = active.length + runIds.length;
|
|
255
|
+
const truncated = totalRunIds > limit;
|
|
256
|
+
const runs = [];
|
|
257
|
+
for (const summary of active) {
|
|
258
|
+
if (runs.length >= limit)
|
|
259
|
+
break;
|
|
260
|
+
runs.push(summary);
|
|
261
|
+
}
|
|
262
|
+
// Issue #646: stop iterating as soon as the bounded slice is full so we never load more
|
|
263
|
+
// manifests than the route promised. A single corrupt manifest still skips its slot, but
|
|
264
|
+
// we do NOT advance past `limit` to refill it — the goal is bounded work per request.
|
|
265
|
+
for (const id of runIds) {
|
|
266
|
+
if (runs.length >= limit)
|
|
267
|
+
break;
|
|
268
|
+
try {
|
|
269
|
+
const manifest = loadQualityIntelligenceRun(id, { evidenceDir });
|
|
270
|
+
const summary = projectRunSummary(manifest, listReviewStateFor(id, evidenceDir));
|
|
271
|
+
if (summary !== null)
|
|
272
|
+
runs.push(summary);
|
|
273
|
+
}
|
|
274
|
+
catch {
|
|
275
|
+
// A single corrupt manifest must not prevent listing other runs: skip and continue. The
|
|
276
|
+
// store fails closed on a corrupt manifest (EvidenceReadError) so nothing unsafe is
|
|
277
|
+
// surfaced. Quarantine (`quarantineCorruptQualityIntelligenceManifest`) is a SEPARATE,
|
|
278
|
+
// explicitly-invoked maintenance step — it is intentionally NOT run from this read path
|
|
279
|
+
// (a GET must not rename files); its wiring is deferred with the retention orchestrator
|
|
280
|
+
// (Issue #274 follow-up).
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
const body = { runs, limit, totalRunIds, truncated };
|
|
284
|
+
return { status: 200, body };
|
|
285
|
+
// Static codes only — never echo OS fs error text (CWE-209).
|
|
286
|
+
}
|
|
287
|
+
catch {
|
|
288
|
+
return {
|
|
289
|
+
status: 500,
|
|
290
|
+
body: {
|
|
291
|
+
error: {
|
|
292
|
+
code: "LIST_FAILED",
|
|
293
|
+
message: "Failed to list Quality Intelligence runs",
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
// ---------------------------------------------------------------------------
|
|
300
|
+
// GET /api/quality-intelligence/runs/:id
|
|
301
|
+
// ---------------------------------------------------------------------------
|
|
302
|
+
export function handleGetQiRun(ctx, deps) {
|
|
303
|
+
const { id } = ctx.params;
|
|
304
|
+
if (id === undefined || id.trim().length === 0) {
|
|
305
|
+
return { status: 400, body: { error: { code: "BAD_REQUEST", message: "Run id is required" } } };
|
|
306
|
+
}
|
|
307
|
+
const evidenceDir = resolveEvidenceDir(deps);
|
|
308
|
+
try {
|
|
309
|
+
const manifest = loadQualityIntelligenceRun(id, { evidenceDir });
|
|
310
|
+
if (manifest === undefined) {
|
|
311
|
+
return {
|
|
312
|
+
status: 404,
|
|
313
|
+
body: { error: { code: "NOT_FOUND", message: "Quality Intelligence run not found" } },
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
const candidatesArtifact = evidenceDir === undefined
|
|
317
|
+
? undefined
|
|
318
|
+
: loadQualityIntelligenceCandidates(id, { evidenceDir });
|
|
319
|
+
const reviewArtifact = evidenceDir === undefined ? undefined : loadRunReviewState(id, evidenceDir);
|
|
320
|
+
const detail = projectRunDetail({
|
|
321
|
+
manifest,
|
|
322
|
+
candidateRows: candidatesArtifact?.candidates ?? [],
|
|
323
|
+
reviewArtifact,
|
|
324
|
+
});
|
|
325
|
+
return { status: 200, body: detail };
|
|
326
|
+
// Static codes only — never echo OS fs error text (CWE-209).
|
|
327
|
+
}
|
|
328
|
+
catch {
|
|
329
|
+
return {
|
|
330
|
+
status: 500,
|
|
331
|
+
body: {
|
|
332
|
+
error: { code: "INTERNAL", message: "Failed to load Quality Intelligence run" },
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RouteContext, RouteResult } from "./routes.js";
|
|
2
|
+
import type { UiHandlerDeps } from "./deps.js";
|
|
3
|
+
export declare function handleConfig(_ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
|
|
4
|
+
export declare function handleModels(_ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
|
|
5
|
+
export declare function handleWorkflows(): RouteResult;
|
|
6
|
+
export declare function handleWorkspace(ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
|
|
7
|
+
export declare function handleEvidenceList(ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
|
|
8
|
+
export declare function handleEvidenceDetail(ctx: RouteContext, deps: UiHandlerDeps): RouteResult;
|
|
9
|
+
//# sourceMappingURL=read-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-handlers.d.ts","sourceRoot":"","sources":["../src/read-handlers.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAW/C,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAUjF;AAID,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAIjF;AAKD,wBAAgB,eAAe,IAAI,WAAW,CAyC7C;AAuID,wBAAgB,eAAe,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAUnF;AA+CD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAMtF;AAKD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CA2BxF"}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
// The six read-only BFF endpoints (ADR-0011 D5 routes 2,3,4,10,11,12). Each returns a redacted JSON
|
|
2
|
+
// projection of already-safe data: config via `toSafeObject` (strips apiKey), configured model
|
|
3
|
+
// capabilities, the workflow launch-form descriptors, the workspace summary built from the workspace
|
|
4
|
+
// layer, and evidence list/detail served straight from the store (manifests are redacted-by-
|
|
5
|
+
// construction on disk, served as-is per D9). No secret reaches any response; the config route
|
|
6
|
+
// never leaks the config path even on a load failure (handled upstream in deps.ts, which yields
|
|
7
|
+
// `config: undefined` rather than throwing).
|
|
8
|
+
import { toSafeObject, listConfiguredCapabilities } from "@oscharko-dev/keiko-model-gateway";
|
|
9
|
+
import { UNIT_TEST_WORKFLOW_DESCRIPTOR, BUG_INVESTIGATION_WORKFLOW_DESCRIPTOR, } from "@oscharko-dev/keiko-workflows";
|
|
10
|
+
import { DEFAULT_LIMITS } from "@oscharko-dev/keiko-harness";
|
|
11
|
+
import { listEvidence, loadEvidence, assertValidRunId, EvidenceReadError, EvidenceSchemaError, InvalidRunIdError, } from "@oscharko-dev/keiko-evidence";
|
|
12
|
+
import { buildContextPackFromFiles, buildWorkspaceSummary, DEFAULT_CONTEXT_REQUEST, detectWorkspace, discoverWithStats, WORKSPACE_CODES, WorkspaceError, } from "@oscharko-dev/keiko-workspace";
|
|
13
|
+
import { errorBody } from "./routes.js";
|
|
14
|
+
import { currentGatewayConfig, currentGatewayConfigPresent, currentGroundingLimits, } from "./deps.js";
|
|
15
|
+
import { validateProjectPath } from "./store/validation.js";
|
|
16
|
+
// Route 2 — resolved config (SafeGatewayConfig, never apiKey/baseUrl) or null when no config was resolved.
|
|
17
|
+
// effectiveGroundingLimits carries the runtime-resolved limits (file config + env) so the UI can
|
|
18
|
+
// surface caps without a separate API call.
|
|
19
|
+
export function handleConfig(_ctx, deps) {
|
|
20
|
+
const config = currentGatewayConfig(deps);
|
|
21
|
+
return {
|
|
22
|
+
status: 200,
|
|
23
|
+
body: {
|
|
24
|
+
config: config === undefined ? null : toSafeObject(config),
|
|
25
|
+
configPresent: currentGatewayConfigPresent(deps),
|
|
26
|
+
effectiveGroundingLimits: currentGroundingLimits(deps),
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
// Route 3 — models published by the resolved UI gateway config. If no config is resolved, no
|
|
31
|
+
// model-backed run can start, so the endpoint returns an empty list.
|
|
32
|
+
export function handleModels(_ctx, deps) {
|
|
33
|
+
const config = currentGatewayConfig(deps);
|
|
34
|
+
const models = config === undefined ? [] : listConfiguredCapabilities(config);
|
|
35
|
+
return { status: 200, body: { models } };
|
|
36
|
+
}
|
|
37
|
+
// Route 4 — launch-form metadata: the workflow descriptors plus the synthesized explain-plan and
|
|
38
|
+
// verify inputs (both are harness tasks with no workflow descriptor — verify is BFF-only and runs
|
|
39
|
+
// the deterministic verification orchestrator).
|
|
40
|
+
export function handleWorkflows() {
|
|
41
|
+
return {
|
|
42
|
+
status: 200,
|
|
43
|
+
body: {
|
|
44
|
+
descriptors: [UNIT_TEST_WORKFLOW_DESCRIPTOR, BUG_INVESTIGATION_WORKFLOW_DESCRIPTOR],
|
|
45
|
+
explainPlan: {
|
|
46
|
+
inputs: [
|
|
47
|
+
{
|
|
48
|
+
name: "filePath",
|
|
49
|
+
type: "string",
|
|
50
|
+
required: true,
|
|
51
|
+
description: "Path to the file to explain (read-only task).",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "question",
|
|
55
|
+
type: "string",
|
|
56
|
+
required: false,
|
|
57
|
+
description: "Optional focusing question for the explanation.",
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
defaultLimits: DEFAULT_LIMITS,
|
|
61
|
+
},
|
|
62
|
+
verify: {
|
|
63
|
+
inputs: [
|
|
64
|
+
{
|
|
65
|
+
name: "workspaceRoot",
|
|
66
|
+
type: "string",
|
|
67
|
+
required: true,
|
|
68
|
+
description: "Project root to verify.",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "targetFiles",
|
|
72
|
+
type: "string[]",
|
|
73
|
+
required: false,
|
|
74
|
+
description: "Optional file subset to target tests for.",
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
defaultLimits: DEFAULT_LIMITS,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function parsePositiveBudget(value) {
|
|
83
|
+
if (value === null) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
if (!/^[1-9][0-9]*$/u.test(value)) {
|
|
87
|
+
throw new Error("invalid budget");
|
|
88
|
+
}
|
|
89
|
+
const parsed = Number.parseInt(value, 10);
|
|
90
|
+
if (!Number.isSafeInteger(parsed)) {
|
|
91
|
+
throw new Error("invalid budget");
|
|
92
|
+
}
|
|
93
|
+
return parsed;
|
|
94
|
+
}
|
|
95
|
+
function workspaceErrorResult(error) {
|
|
96
|
+
const status = error.code === WORKSPACE_CODES.NOT_FOUND
|
|
97
|
+
? 404
|
|
98
|
+
: error.code === WORKSPACE_CODES.FILE_TOO_LARGE || error.code === WORKSPACE_CODES.READ_FAILED
|
|
99
|
+
? 422
|
|
100
|
+
: 400;
|
|
101
|
+
return { status, body: errorBody(error.code, workspaceErrorMessage(error.code)) };
|
|
102
|
+
}
|
|
103
|
+
const WORKSPACE_ERROR_MESSAGES = {
|
|
104
|
+
[WORKSPACE_CODES.PATH_ESCAPE]: "The workspace path is outside the registered project.",
|
|
105
|
+
[WORKSPACE_CODES.PATH_DENIED]: "The workspace path is denied by policy.",
|
|
106
|
+
[WORKSPACE_CODES.NOT_FOUND]: "The workspace could not be found.",
|
|
107
|
+
[WORKSPACE_CODES.FILE_TOO_LARGE]: "The workspace file is too large.",
|
|
108
|
+
[WORKSPACE_CODES.READ_FAILED]: "The workspace could not be read.",
|
|
109
|
+
[WORKSPACE_CODES.REPO_SEARCH_INVALID_QUERY]: "The repository search query is invalid.",
|
|
110
|
+
[WORKSPACE_CODES.REPO_SEARCH_INVALID_RANGE]: "The repository search range or scope path is invalid.",
|
|
111
|
+
[WORKSPACE_CODES.REPO_SEARCH_UNSUPPORTED_FILE]: "The repository search does not support this file.",
|
|
112
|
+
};
|
|
113
|
+
function workspaceErrorMessage(code) {
|
|
114
|
+
return WORKSPACE_ERROR_MESSAGES[code];
|
|
115
|
+
}
|
|
116
|
+
function readWorkspaceRequest(q) {
|
|
117
|
+
let budget;
|
|
118
|
+
try {
|
|
119
|
+
budget = parsePositiveBudget(q.get("budget"));
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
return {
|
|
123
|
+
status: 400,
|
|
124
|
+
body: errorBody("BAD_REQUEST", "The budget query parameter must be a positive integer."),
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const dir = q.get("dir");
|
|
128
|
+
if (dir === null) {
|
|
129
|
+
return {
|
|
130
|
+
status: 400,
|
|
131
|
+
body: errorBody("BAD_REQUEST", "The dir query parameter is required."),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
return { dir, task: q.get("task") ?? undefined, budget };
|
|
135
|
+
}
|
|
136
|
+
function workspaceNotRegisteredResult() {
|
|
137
|
+
return {
|
|
138
|
+
status: 403,
|
|
139
|
+
body: errorBody("WORKSPACE_NOT_REGISTERED", "The workspace directory is not a registered project."),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function resolveRegisteredWorkspace(rawDir, deps) {
|
|
143
|
+
let normalized;
|
|
144
|
+
try {
|
|
145
|
+
normalized = validateProjectPath(rawDir, { mustExist: false });
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return {
|
|
149
|
+
status: 400,
|
|
150
|
+
body: errorBody("BAD_REQUEST", "The dir query parameter must be a valid local project path."),
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
const registered = deps.store.listProjects().some((project) => project.path === normalized);
|
|
154
|
+
if (!registered) {
|
|
155
|
+
return workspaceNotRegisteredResult();
|
|
156
|
+
}
|
|
157
|
+
return { normalized };
|
|
158
|
+
}
|
|
159
|
+
function workspaceSummaryResult(request, registeredRoot, deps) {
|
|
160
|
+
try {
|
|
161
|
+
const workspace = detectWorkspace(registeredRoot);
|
|
162
|
+
if (workspace.root !== registeredRoot) {
|
|
163
|
+
return workspaceNotRegisteredResult();
|
|
164
|
+
}
|
|
165
|
+
const { files, stats } = discoverWithStats(workspace, DEFAULT_CONTEXT_REQUEST.discovery);
|
|
166
|
+
const wantsContext = request.task !== undefined || request.budget !== undefined;
|
|
167
|
+
const pack = wantsContext
|
|
168
|
+
? buildContextPackFromFiles(workspace, {
|
|
169
|
+
...DEFAULT_CONTEXT_REQUEST,
|
|
170
|
+
task: request.task,
|
|
171
|
+
budgetBytes: request.budget ?? DEFAULT_CONTEXT_REQUEST.budgetBytes,
|
|
172
|
+
}, files)
|
|
173
|
+
: undefined;
|
|
174
|
+
const summary = buildWorkspaceSummary(workspace, pack, stats);
|
|
175
|
+
const body = deps.redactor({ summary });
|
|
176
|
+
return { status: 200, body };
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
if (error instanceof WorkspaceError) {
|
|
180
|
+
const result = workspaceErrorResult(error);
|
|
181
|
+
return { status: result.status, body: deps.redactor(result.body) };
|
|
182
|
+
}
|
|
183
|
+
throw error;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// Route 12 — workspace summary and optional context pack, built by the safe workspace layer.
|
|
187
|
+
export function handleWorkspace(ctx, deps) {
|
|
188
|
+
const request = readWorkspaceRequest(ctx.url.searchParams);
|
|
189
|
+
if ("status" in request) {
|
|
190
|
+
return request;
|
|
191
|
+
}
|
|
192
|
+
const registered = resolveRegisteredWorkspace(request.dir, deps);
|
|
193
|
+
if ("status" in registered) {
|
|
194
|
+
return registered;
|
|
195
|
+
}
|
|
196
|
+
return workspaceSummaryResult(request, registered.normalized, deps);
|
|
197
|
+
}
|
|
198
|
+
function readFilters(url) {
|
|
199
|
+
const q = url.searchParams;
|
|
200
|
+
return {
|
|
201
|
+
workspace: q.get("workspace") ?? undefined,
|
|
202
|
+
date: q.get("date") ?? undefined,
|
|
203
|
+
workflow: q.get("workflow") ?? undefined,
|
|
204
|
+
model: q.get("model") ?? undefined,
|
|
205
|
+
outcome: q.get("outcome") ?? undefined,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
// `EvidenceListEntry.startedAt` is epoch ms; the `date` filter matches the started-at calendar day
|
|
209
|
+
// (UTC `YYYY-MM-DD`). `workspace` is a substring match to support path-fragment filtering, while
|
|
210
|
+
// `model` is an exact model-id match.
|
|
211
|
+
function matchesOptionalFilter(value, filter) {
|
|
212
|
+
return filter === undefined || value === filter;
|
|
213
|
+
}
|
|
214
|
+
function matchesDateFilter(entry, date) {
|
|
215
|
+
return date === undefined || new Date(entry.startedAt).toISOString().slice(0, 10) === date;
|
|
216
|
+
}
|
|
217
|
+
function matchesWorkspaceFilter(entry, workspace) {
|
|
218
|
+
return workspace === undefined || entry.workspaceRoot?.includes(workspace) === true;
|
|
219
|
+
}
|
|
220
|
+
function matchesFilters(entry, filters) {
|
|
221
|
+
return (matchesOptionalFilter(entry.taskType, filters.workflow) &&
|
|
222
|
+
matchesOptionalFilter(entry.outcome, filters.outcome) &&
|
|
223
|
+
matchesDateFilter(entry, filters.date) &&
|
|
224
|
+
matchesOptionalFilter(entry.modelId, filters.model) &&
|
|
225
|
+
matchesWorkspaceFilter(entry, filters.workspace));
|
|
226
|
+
}
|
|
227
|
+
// Route 10 — evidence list header projection, filtered server-side.
|
|
228
|
+
export function handleEvidenceList(ctx, deps) {
|
|
229
|
+
const filters = readFilters(ctx.url);
|
|
230
|
+
const entries = listEvidence(deps.evidenceStore).filter((entry) => matchesFilters(entry, filters));
|
|
231
|
+
return { status: 200, body: { entries } };
|
|
232
|
+
}
|
|
233
|
+
// Route 11 — a single evidence manifest, served as-is (already redacted on disk). Invalid runId →
|
|
234
|
+
// 400; absent → 404; an EvidenceSchemaError → 422; an EvidenceReadError → 422 (safe, pre-redacted
|
|
235
|
+
// `.message`).
|
|
236
|
+
export function handleEvidenceDetail(ctx, deps) {
|
|
237
|
+
const runId = ctx.params.runId ?? "";
|
|
238
|
+
try {
|
|
239
|
+
assertValidRunId(runId);
|
|
240
|
+
}
|
|
241
|
+
catch {
|
|
242
|
+
return { status: 400, body: errorBody("BAD_REQUEST", "The run id is not valid.") };
|
|
243
|
+
}
|
|
244
|
+
try {
|
|
245
|
+
const manifest = loadEvidence(deps.evidenceStore, runId);
|
|
246
|
+
if (manifest === undefined) {
|
|
247
|
+
return { status: 404, body: errorBody("NOT_FOUND", "No evidence for that run id.") };
|
|
248
|
+
}
|
|
249
|
+
return { status: 200, body: { manifest } };
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
// Issue #622 — an over-long runId is rejected by the store with a static, path-free
|
|
253
|
+
// InvalidRunIdError before any fs read; surface it as a 400 (not a generic 500).
|
|
254
|
+
if (error instanceof InvalidRunIdError) {
|
|
255
|
+
return { status: 400, body: errorBody("BAD_REQUEST", error.message) };
|
|
256
|
+
}
|
|
257
|
+
if (error instanceof EvidenceSchemaError) {
|
|
258
|
+
return { status: 422, body: errorBody("EVIDENCE_SCHEMA", error.message) };
|
|
259
|
+
}
|
|
260
|
+
if (error instanceof EvidenceReadError) {
|
|
261
|
+
return { status: 422, body: errorBody("EVIDENCE_READ", error.message) };
|
|
262
|
+
}
|
|
263
|
+
throw error;
|
|
264
|
+
}
|
|
265
|
+
}
|