@inflexa-ai/harness 0.1.1
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/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +58 -0
- package/dist/agents/conversation-agent.d.ts +105 -0
- package/dist/agents/conversation-agent.js +140 -0
- package/dist/agents/report-builder.d.ts +32 -0
- package/dist/agents/report-builder.js +31 -0
- package/dist/agents/sandbox/__fixtures__/deps.d.ts +23 -0
- package/dist/agents/sandbox/__fixtures__/deps.js +96 -0
- package/dist/agents/sandbox/bulk-transcriptomics-agent.d.ts +8 -0
- package/dist/agents/sandbox/bulk-transcriptomics-agent.js +22 -0
- package/dist/agents/sandbox/cheminformatics-agent.d.ts +9 -0
- package/dist/agents/sandbox/cheminformatics-agent.js +62 -0
- package/dist/agents/sandbox/chromatin-agent.d.ts +8 -0
- package/dist/agents/sandbox/chromatin-agent.js +24 -0
- package/dist/agents/sandbox/data-profiler.d.ts +10 -0
- package/dist/agents/sandbox/data-profiler.js +24 -0
- package/dist/agents/sandbox/dna-methylation-agent.d.ts +8 -0
- package/dist/agents/sandbox/dna-methylation-agent.js +24 -0
- package/dist/agents/sandbox/drug-repurposing-agent.d.ts +8 -0
- package/dist/agents/sandbox/drug-repurposing-agent.js +54 -0
- package/dist/agents/sandbox/enrichment-agent.d.ts +8 -0
- package/dist/agents/sandbox/enrichment-agent.js +24 -0
- package/dist/agents/sandbox/ephemeral-executor.d.ts +9 -0
- package/dist/agents/sandbox/ephemeral-executor.js +29 -0
- package/dist/agents/sandbox/genomic-variant-agent.d.ts +8 -0
- package/dist/agents/sandbox/genomic-variant-agent.js +27 -0
- package/dist/agents/sandbox/immune-profiling-agent.d.ts +8 -0
- package/dist/agents/sandbox/immune-profiling-agent.js +43 -0
- package/dist/agents/sandbox/index.d.ts +31 -0
- package/dist/agents/sandbox/index.js +96 -0
- package/dist/agents/sandbox/metabolomics-agent.d.ts +8 -0
- package/dist/agents/sandbox/metabolomics-agent.js +15 -0
- package/dist/agents/sandbox/microbiome-agent.d.ts +8 -0
- package/dist/agents/sandbox/microbiome-agent.js +15 -0
- package/dist/agents/sandbox/multi-omics-integration-agent.d.ts +8 -0
- package/dist/agents/sandbox/multi-omics-integration-agent.js +33 -0
- package/dist/agents/sandbox/multimodal-sc-agent.d.ts +8 -0
- package/dist/agents/sandbox/multimodal-sc-agent.js +15 -0
- package/dist/agents/sandbox/network-agent.d.ts +8 -0
- package/dist/agents/sandbox/network-agent.js +25 -0
- package/dist/agents/sandbox/pkpd-clinical-response-agent.d.ts +8 -0
- package/dist/agents/sandbox/pkpd-clinical-response-agent.js +59 -0
- package/dist/agents/sandbox/proteomics-agent.d.ts +8 -0
- package/dist/agents/sandbox/proteomics-agent.js +15 -0
- package/dist/agents/sandbox/scientific-executor.d.ts +9 -0
- package/dist/agents/sandbox/scientific-executor.js +56 -0
- package/dist/agents/sandbox/shared.d.ts +100 -0
- package/dist/agents/sandbox/shared.js +195 -0
- package/dist/agents/sandbox/single-cell-agent.d.ts +8 -0
- package/dist/agents/sandbox/single-cell-agent.js +25 -0
- package/dist/agents/sandbox/spatial-omics-agent.d.ts +8 -0
- package/dist/agents/sandbox/spatial-omics-agent.js +15 -0
- package/dist/agents/sandbox/statistical-modeling-agent.d.ts +8 -0
- package/dist/agents/sandbox/statistical-modeling-agent.js +37 -0
- package/dist/agents/sandbox/translational-safety-agent.d.ts +8 -0
- package/dist/agents/sandbox/translational-safety-agent.js +59 -0
- package/dist/agents/sandbox/types.d.ts +34 -0
- package/dist/agents/sandbox/types.js +15 -0
- package/dist/agents/sandbox/validate-skills.d.ts +18 -0
- package/dist/agents/sandbox/validate-skills.js +40 -0
- package/dist/agents/sandbox-catalog.d.ts +33 -0
- package/dist/agents/sandbox-catalog.js +44 -0
- package/dist/agents/system-prompt.d.ts +25 -0
- package/dist/agents/system-prompt.js +23 -0
- package/dist/app/chat-turn.d.ts +35 -0
- package/dist/app/chat-turn.js +64 -0
- package/dist/app/data-profile-policy.d.ts +36 -0
- package/dist/app/data-profile-policy.js +37 -0
- package/dist/app/message-assembly.d.ts +65 -0
- package/dist/app/message-assembly.js +61 -0
- package/dist/app/synthesize-run.d.ts +57 -0
- package/dist/app/synthesize-run.js +103 -0
- package/dist/auth/local-auth-context.d.ts +19 -0
- package/dist/auth/local-auth-context.js +20 -0
- package/dist/auth/local-run-authorizer.d.ts +10 -0
- package/dist/auth/local-run-authorizer.js +23 -0
- package/dist/auth/types.d.ts +166 -0
- package/dist/auth/types.js +61 -0
- package/dist/billing/cached-resolver.d.ts +23 -0
- package/dist/billing/cached-resolver.js +61 -0
- package/dist/billing/noop-resolver.d.ts +6 -0
- package/dist/billing/noop-resolver.js +7 -0
- package/dist/billing/noop-run-charge.d.ts +6 -0
- package/dist/billing/noop-run-charge.js +10 -0
- package/dist/billing/resolver.d.ts +64 -0
- package/dist/billing/resolver.js +24 -0
- package/dist/billing/run-charge.d.ts +24 -0
- package/dist/billing/run-charge.js +9 -0
- package/dist/config/resource-limits.d.ts +76 -0
- package/dist/config/resource-limits.js +116 -0
- package/dist/contracts/analogy-report.d.ts +120 -0
- package/dist/contracts/analogy-report.js +50 -0
- package/dist/contracts/chat-events.d.ts +61 -0
- package/dist/contracts/chat-events.js +13 -0
- package/dist/contracts/chat-parts.d.ts +308 -0
- package/dist/contracts/chat-parts.js +13 -0
- package/dist/contracts/content-url.d.ts +49 -0
- package/dist/contracts/content-url.js +56 -0
- package/dist/contracts/index.d.ts +12 -0
- package/dist/contracts/index.js +5 -0
- package/dist/contracts/message.d.ts +36 -0
- package/dist/contracts/message.js +9 -0
- package/dist/contracts/part-registry.d.ts +18 -0
- package/dist/contracts/part-registry.js +28 -0
- package/dist/contracts/schemas/chat-events.d.ts +90 -0
- package/dist/contracts/schemas/chat-events.js +43 -0
- package/dist/contracts/schemas/chat-parts.d.ts +683 -0
- package/dist/contracts/schemas/chat-parts.js +295 -0
- package/dist/contracts/schemas/index.d.ts +2 -0
- package/dist/contracts/schemas/index.js +2 -0
- package/dist/contracts/target-assessment-row.d.ts +85 -0
- package/dist/contracts/target-assessment-row.js +37 -0
- package/dist/contracts/target-dossier.d.ts +16720 -0
- package/dist/contracts/target-dossier.js +1339 -0
- package/dist/data/clinical-benchmarks.json +108 -0
- package/dist/data/protein-family-modality.json +101 -0
- package/dist/data/safety-panel-schema.d.ts +64 -0
- package/dist/data/safety-panel-schema.js +34 -0
- package/dist/data/safety-panel.json +436 -0
- package/dist/execution/artifact-metadata.d.ts +74 -0
- package/dist/execution/artifact-metadata.js +203 -0
- package/dist/execution/artifact-record.d.ts +19 -0
- package/dist/execution/artifact-record.js +7 -0
- package/dist/execution/artifact-registration.d.ts +36 -0
- package/dist/execution/artifact-registration.js +61 -0
- package/dist/execution/artifact-registry.d.ts +82 -0
- package/dist/execution/artifact-registry.js +17 -0
- package/dist/execution/dbos-run-launcher.d.ts +7 -0
- package/dist/execution/dbos-run-launcher.js +38 -0
- package/dist/execution/ephemeral-runner.d.ts +81 -0
- package/dist/execution/ephemeral-runner.js +161 -0
- package/dist/execution/filesystem-artifact-registry.d.ts +57 -0
- package/dist/execution/filesystem-artifact-registry.js +92 -0
- package/dist/execution/noop-artifact-registry.d.ts +11 -0
- package/dist/execution/noop-artifact-registry.js +17 -0
- package/dist/execution/post-step-pipeline.d.ts +70 -0
- package/dist/execution/post-step-pipeline.js +207 -0
- package/dist/execution/post-step.d.ts +20 -0
- package/dist/execution/post-step.js +65 -0
- package/dist/execution/reconcile-manifest.d.ts +25 -0
- package/dist/execution/reconcile-manifest.js +132 -0
- package/dist/execution/report-render.d.ts +39 -0
- package/dist/execution/report-render.js +98 -0
- package/dist/execution/report-runner.d.ts +87 -0
- package/dist/execution/report-runner.js +227 -0
- package/dist/execution/run-authorizer.d.ts +43 -0
- package/dist/execution/run-authorizer.js +17 -0
- package/dist/execution/run-launcher.d.ts +36 -0
- package/dist/execution/run-launcher.js +15 -0
- package/dist/execution/run-synthesis.d.ts +107 -0
- package/dist/execution/run-synthesis.js +329 -0
- package/dist/execution/staged-input.d.ts +41 -0
- package/dist/execution/staged-input.js +15 -0
- package/dist/execution/step-summary-metrics.d.ts +10 -0
- package/dist/execution/step-summary-metrics.js +22 -0
- package/dist/execution/step-summary.d.ts +55 -0
- package/dist/execution/step-summary.js +106 -0
- package/dist/execution/topo-sort.d.ts +33 -0
- package/dist/execution/topo-sort.js +99 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.js +157 -0
- package/dist/input-sanitization.d.ts +22 -0
- package/dist/input-sanitization.js +64 -0
- package/dist/lib/async-utils.d.ts +10 -0
- package/dist/lib/async-utils.js +24 -0
- package/dist/lib/chrome.d.ts +15 -0
- package/dist/lib/chrome.js +95 -0
- package/dist/lib/db-result.d.ts +93 -0
- package/dist/lib/db-result.js +197 -0
- package/dist/lib/fs-helpers.d.ts +74 -0
- package/dist/lib/fs-helpers.js +119 -0
- package/dist/lib/fs-result.d.ts +98 -0
- package/dist/lib/fs-result.js +137 -0
- package/dist/lib/host-concurrency.d.ts +16 -0
- package/dist/lib/host-concurrency.js +60 -0
- package/dist/lib/identifiers.d.ts +8 -0
- package/dist/lib/identifiers.js +10 -0
- package/dist/lib/metrics.d.ts +7 -0
- package/dist/lib/metrics.js +12 -0
- package/dist/lib/mime-detect.d.ts +17 -0
- package/dist/lib/mime-detect.js +29 -0
- package/dist/lib/otel.d.ts +30 -0
- package/dist/lib/otel.js +102 -0
- package/dist/lib/regulatory-corpus/fetch-fda-guidance.d.ts +35 -0
- package/dist/lib/regulatory-corpus/fetch-fda-guidance.js +107 -0
- package/dist/lib/regulatory-corpus/fetch-ich.d.ts +46 -0
- package/dist/lib/regulatory-corpus/fetch-ich.js +173 -0
- package/dist/lib/regulatory-corpus.d.ts +88 -0
- package/dist/lib/regulatory-corpus.js +141 -0
- package/dist/lib/result.d.ts +87 -0
- package/dist/lib/result.js +103 -0
- package/dist/lib/storage.d.ts +29 -0
- package/dist/lib/storage.js +37 -0
- package/dist/lib/streamed-download.d.ts +28 -0
- package/dist/lib/streamed-download.js +111 -0
- package/dist/lib/trace-context.d.ts +11 -0
- package/dist/lib/trace-context.js +49 -0
- package/dist/loop/__fixtures__/scripted-provider.d.ts +31 -0
- package/dist/loop/__fixtures__/scripted-provider.js +57 -0
- package/dist/loop/budget-exceeded.d.ts +22 -0
- package/dist/loop/budget-exceeded.js +41 -0
- package/dist/loop/metrics.d.ts +25 -0
- package/dist/loop/metrics.js +46 -0
- package/dist/loop/run-agent.d.ts +28 -0
- package/dist/loop/run-agent.js +204 -0
- package/dist/loop/run-step.d.ts +29 -0
- package/dist/loop/run-step.js +34 -0
- package/dist/loop/run-to-terminal.d.ts +46 -0
- package/dist/loop/run-to-terminal.js +51 -0
- package/dist/loop/types.d.ts +95 -0
- package/dist/loop/types.js +10 -0
- package/dist/memory/ai-sdk-message-storage.d.ts +20 -0
- package/dist/memory/ai-sdk-message-storage.js +114 -0
- package/dist/memory/card-builders.d.ts +114 -0
- package/dist/memory/card-builders.js +231 -0
- package/dist/memory/content-to-cortex.d.ts +42 -0
- package/dist/memory/content-to-cortex.js +85 -0
- package/dist/memory/count-tokens.d.ts +18 -0
- package/dist/memory/count-tokens.js +64 -0
- package/dist/memory/derive-thread-title.d.ts +14 -0
- package/dist/memory/derive-thread-title.js +26 -0
- package/dist/memory/message-backfill.d.ts +2 -0
- package/dist/memory/message-backfill.js +38 -0
- package/dist/memory/reconstruct-cards.d.ts +23 -0
- package/dist/memory/reconstruct-cards.js +64 -0
- package/dist/memory/thread-history.d.ts +80 -0
- package/dist/memory/thread-history.js +187 -0
- package/dist/memory/thread-store.d.ts +66 -0
- package/dist/memory/thread-store.js +88 -0
- package/dist/memory/working-memory.d.ts +135 -0
- package/dist/memory/working-memory.js +185 -0
- package/dist/prompts/SOUL.d.ts +17 -0
- package/dist/prompts/SOUL.js +173 -0
- package/dist/prompts/analogical-reasoner.d.ts +1 -0
- package/dist/prompts/analogical-reasoner.js +170 -0
- package/dist/prompts/conversation.d.ts +1 -0
- package/dist/prompts/conversation.js +697 -0
- package/dist/prompts/execute-analysis/step-summary.d.ts +1 -0
- package/dist/prompts/execute-analysis/step-summary.js +38 -0
- package/dist/prompts/literature-reviewer.d.ts +1 -0
- package/dist/prompts/literature-reviewer.js +107 -0
- package/dist/prompts/planner.d.ts +2 -0
- package/dist/prompts/planner.js +259 -0
- package/dist/prompts/report-builder.d.ts +1 -0
- package/dist/prompts/report-builder.js +127 -0
- package/dist/prompts/sandbox/bulk-transcriptomics-agent.d.ts +1 -0
- package/dist/prompts/sandbox/bulk-transcriptomics-agent.js +78 -0
- package/dist/prompts/sandbox/cheminformatics-agent.d.ts +1 -0
- package/dist/prompts/sandbox/cheminformatics-agent.js +224 -0
- package/dist/prompts/sandbox/chromatin-agent.d.ts +1 -0
- package/dist/prompts/sandbox/chromatin-agent.js +100 -0
- package/dist/prompts/sandbox/data-profiler.d.ts +1 -0
- package/dist/prompts/sandbox/data-profiler.js +291 -0
- package/dist/prompts/sandbox/dna-methylation-agent.d.ts +1 -0
- package/dist/prompts/sandbox/dna-methylation-agent.js +96 -0
- package/dist/prompts/sandbox/drug-repurposing-agent.d.ts +1 -0
- package/dist/prompts/sandbox/drug-repurposing-agent.js +144 -0
- package/dist/prompts/sandbox/enrichment-agent.d.ts +1 -0
- package/dist/prompts/sandbox/enrichment-agent.js +89 -0
- package/dist/prompts/sandbox/ephemeral-executor.d.ts +1 -0
- package/dist/prompts/sandbox/ephemeral-executor.js +66 -0
- package/dist/prompts/sandbox/genomic-variant-agent.d.ts +1 -0
- package/dist/prompts/sandbox/genomic-variant-agent.js +83 -0
- package/dist/prompts/sandbox/immune-profiling-agent.d.ts +1 -0
- package/dist/prompts/sandbox/immune-profiling-agent.js +101 -0
- package/dist/prompts/sandbox/metabolomics-agent.d.ts +1 -0
- package/dist/prompts/sandbox/metabolomics-agent.js +89 -0
- package/dist/prompts/sandbox/microbiome-agent.d.ts +1 -0
- package/dist/prompts/sandbox/microbiome-agent.js +109 -0
- package/dist/prompts/sandbox/multi-omics-integration-agent.d.ts +1 -0
- package/dist/prompts/sandbox/multi-omics-integration-agent.js +122 -0
- package/dist/prompts/sandbox/multimodal-sc-agent.d.ts +1 -0
- package/dist/prompts/sandbox/multimodal-sc-agent.js +90 -0
- package/dist/prompts/sandbox/network-agent.d.ts +1 -0
- package/dist/prompts/sandbox/network-agent.js +95 -0
- package/dist/prompts/sandbox/pkpd-clinical-response-agent.d.ts +1 -0
- package/dist/prompts/sandbox/pkpd-clinical-response-agent.js +71 -0
- package/dist/prompts/sandbox/proteomics-agent.d.ts +1 -0
- package/dist/prompts/sandbox/proteomics-agent.js +93 -0
- package/dist/prompts/sandbox/scientific-executor.d.ts +1 -0
- package/dist/prompts/sandbox/scientific-executor.js +68 -0
- package/dist/prompts/sandbox/single-cell-agent.d.ts +1 -0
- package/dist/prompts/sandbox/single-cell-agent.js +129 -0
- package/dist/prompts/sandbox/spatial-omics-agent.d.ts +1 -0
- package/dist/prompts/sandbox/spatial-omics-agent.js +94 -0
- package/dist/prompts/sandbox/statistical-modeling-agent.d.ts +1 -0
- package/dist/prompts/sandbox/statistical-modeling-agent.js +112 -0
- package/dist/prompts/sandbox/translational-safety-agent.d.ts +1 -0
- package/dist/prompts/sandbox/translational-safety-agent.js +105 -0
- package/dist/prompts/sandbox-standards.d.ts +18 -0
- package/dist/prompts/sandbox-standards.js +358 -0
- package/dist/prompts/synthesis-agent.d.ts +1 -0
- package/dist/prompts/synthesis-agent.js +289 -0
- package/dist/prompts/target-assessment/briefs/executive-recommendation.d.ts +1 -0
- package/dist/prompts/target-assessment/briefs/executive-recommendation.js +85 -0
- package/dist/prompts/target-assessment/briefs/index.d.ts +4 -0
- package/dist/prompts/target-assessment/briefs/index.js +4 -0
- package/dist/prompts/target-assessment/briefs/liability-bullets.d.ts +1 -0
- package/dist/prompts/target-assessment/briefs/liability-bullets.js +114 -0
- package/dist/prompts/target-assessment/briefs/target-organ-liabilities.d.ts +1 -0
- package/dist/prompts/target-assessment/briefs/target-organ-liabilities.js +29 -0
- package/dist/prompts/target-assessment/briefs/translational-commentary.d.ts +1 -0
- package/dist/prompts/target-assessment/briefs/translational-commentary.js +23 -0
- package/dist/prompts/target-assessment/drugs-in-class.d.ts +1 -0
- package/dist/prompts/target-assessment/drugs-in-class.js +29 -0
- package/dist/prompts/target-assessment/modulator-triage.d.ts +1 -0
- package/dist/prompts/target-assessment/modulator-triage.js +31 -0
- package/dist/prompts/target-assessment/off-target-annotator.d.ts +1 -0
- package/dist/prompts/target-assessment/off-target-annotator.js +28 -0
- package/dist/prompts/target-assessment/tox-voice/core.d.ts +1 -0
- package/dist/prompts/target-assessment/tox-voice/core.js +74 -0
- package/dist/prompts/target-assessment/tox-voice/critique.d.ts +7 -0
- package/dist/prompts/target-assessment/tox-voice/critique.js +109 -0
- package/dist/prompts/target-assessment/tox-voice/exemplars.d.ts +8 -0
- package/dist/prompts/target-assessment/tox-voice/exemplars.js +24 -0
- package/dist/prompts/target-assessment/tox-voice/index.d.ts +4 -0
- package/dist/prompts/target-assessment/tox-voice/index.js +4 -0
- package/dist/prompts/target-assessment/tox-voice/vocabulary.d.ts +15 -0
- package/dist/prompts/target-assessment/tox-voice/vocabulary.js +72 -0
- package/dist/provenance/collector.d.ts +148 -0
- package/dist/provenance/collector.js +296 -0
- package/dist/provenance/exec-frame.d.ts +36 -0
- package/dist/provenance/exec-frame.js +49 -0
- package/dist/provenance/types.d.ts +95 -0
- package/dist/provenance/types.js +64 -0
- package/dist/providers/__fixtures__/session.d.ts +16 -0
- package/dist/providers/__fixtures__/session.js +20 -0
- package/dist/providers/ai-sdk.d.ts +47 -0
- package/dist/providers/ai-sdk.js +142 -0
- package/dist/providers/anthropic.d.ts +22 -0
- package/dist/providers/anthropic.js +26 -0
- package/dist/providers/embedding.d.ts +32 -0
- package/dist/providers/embedding.js +42 -0
- package/dist/providers/errors.d.ts +80 -0
- package/dist/providers/errors.js +137 -0
- package/dist/providers/llm-capabilities.d.ts +33 -0
- package/dist/providers/llm-capabilities.js +58 -0
- package/dist/providers/streaming-chat.d.ts +23 -0
- package/dist/providers/streaming-chat.js +61 -0
- package/dist/providers/types.d.ts +59 -0
- package/dist/providers/types.js +8 -0
- package/dist/runtime/assemble.d.ts +68 -0
- package/dist/runtime/assemble.js +46 -0
- package/dist/runtime/boot.d.ts +73 -0
- package/dist/runtime/boot.js +65 -0
- package/dist/runtime/connection-budget.d.ts +48 -0
- package/dist/runtime/connection-budget.js +57 -0
- package/dist/runtime/dbos.d.ts +94 -0
- package/dist/runtime/dbos.js +160 -0
- package/dist/runtime/lifecycle.d.ts +12 -0
- package/dist/runtime/lifecycle.js +19 -0
- package/dist/runtime/pools.d.ts +25 -0
- package/dist/runtime/pools.js +30 -0
- package/dist/runtime/shutdown.d.ts +33 -0
- package/dist/runtime/shutdown.js +39 -0
- package/dist/sandbox/await-exec.d.ts +143 -0
- package/dist/sandbox/await-exec.js +406 -0
- package/dist/sandbox/client.d.ts +82 -0
- package/dist/sandbox/client.js +23 -0
- package/dist/sandbox/create-sandbox.d.ts +105 -0
- package/dist/sandbox/create-sandbox.js +132 -0
- package/dist/sandbox/deliver-exec-event.d.ts +25 -0
- package/dist/sandbox/deliver-exec-event.js +29 -0
- package/dist/sandbox/docker-client.d.ts +75 -0
- package/dist/sandbox/docker-client.js +315 -0
- package/dist/sandbox/estimate-data-profile-resources.d.ts +5 -0
- package/dist/sandbox/estimate-data-profile-resources.js +73 -0
- package/dist/sandbox/exec-id.d.ts +12 -0
- package/dist/sandbox/exec-id.js +20 -0
- package/dist/sandbox/execution-id.d.ts +30 -0
- package/dist/sandbox/execution-id.js +47 -0
- package/dist/sandbox/hmac.d.ts +54 -0
- package/dist/sandbox/hmac.js +67 -0
- package/dist/sandbox/identity.d.ts +15 -0
- package/dist/sandbox/identity.js +22 -0
- package/dist/sandbox/ignored-dirs.d.ts +7 -0
- package/dist/sandbox/ignored-dirs.js +7 -0
- package/dist/sandbox/k8s-client.d.ts +71 -0
- package/dist/sandbox/k8s-client.js +488 -0
- package/dist/sandbox/liveness.d.ts +60 -0
- package/dist/sandbox/liveness.js +82 -0
- package/dist/sandbox/mount-plan.d.ts +77 -0
- package/dist/sandbox/mount-plan.js +84 -0
- package/dist/sandbox/notification-sweep.d.ts +42 -0
- package/dist/sandbox/notification-sweep.js +74 -0
- package/dist/sandbox/reaper.d.ts +70 -0
- package/dist/sandbox/reaper.js +124 -0
- package/dist/sandbox/sandbox-error.d.ts +105 -0
- package/dist/sandbox/sandbox-error.js +92 -0
- package/dist/sandbox/sandbox-step-translate.d.ts +35 -0
- package/dist/sandbox/sandbox-step-translate.js +76 -0
- package/dist/sandbox/submit-exec.d.ts +33 -0
- package/dist/sandbox/submit-exec.js +68 -0
- package/dist/sandbox/types.d.ts +277 -0
- package/dist/sandbox/types.js +147 -0
- package/dist/sandbox/watchdog.d.ts +71 -0
- package/dist/sandbox/watchdog.js +150 -0
- package/dist/schemas/artifact-manifest.d.ts +34 -0
- package/dist/schemas/artifact-manifest.js +36 -0
- package/dist/schemas/data-profile-schemas.d.ts +92 -0
- package/dist/schemas/data-profile-schemas.js +89 -0
- package/dist/schemas/file-metadata.d.ts +51 -0
- package/dist/schemas/file-metadata.js +39 -0
- package/dist/schemas/plan-schemas.d.ts +110 -0
- package/dist/schemas/plan-schemas.js +50 -0
- package/dist/schemas/render-step-prompt.d.ts +32 -0
- package/dist/schemas/render-step-prompt.js +76 -0
- package/dist/schemas/run-synthesis.d.ts +148 -0
- package/dist/schemas/run-synthesis.js +87 -0
- package/dist/schemas/step-summary.d.ts +18 -0
- package/dist/schemas/step-summary.js +20 -0
- package/dist/schemas/validate-plan.d.ts +39 -0
- package/dist/schemas/validate-plan.js +120 -0
- package/dist/schemas/workflow-state.d.ts +314 -0
- package/dist/schemas/workflow-state.js +139 -0
- package/dist/state/active-sandboxes.d.ts +58 -0
- package/dist/state/active-sandboxes.js +100 -0
- package/dist/state/analyses-metrics.d.ts +21 -0
- package/dist/state/analyses-metrics.js +59 -0
- package/dist/state/analyses.d.ts +58 -0
- package/dist/state/analyses.js +132 -0
- package/dist/state/artifacts.d.ts +53 -0
- package/dist/state/artifacts.js +175 -0
- package/dist/state/data-profile.d.ts +176 -0
- package/dist/state/data-profile.js +284 -0
- package/dist/state/db.d.ts +10 -0
- package/dist/state/db.js +9 -0
- package/dist/state/index.d.ts +29 -0
- package/dist/state/index.js +20 -0
- package/dist/state/init.d.ts +14 -0
- package/dist/state/init.js +406 -0
- package/dist/state/plans.d.ts +56 -0
- package/dist/state/plans.js +117 -0
- package/dist/state/runs.d.ts +69 -0
- package/dist/state/runs.js +206 -0
- package/dist/state/schema.d.ts +150 -0
- package/dist/state/schema.js +100 -0
- package/dist/state/step-executions.d.ts +77 -0
- package/dist/state/step-executions.js +175 -0
- package/dist/state/target-assessments.d.ts +68 -0
- package/dist/state/target-assessments.js +222 -0
- package/dist/state/vector-store.d.ts +53 -0
- package/dist/state/vector-store.js +89 -0
- package/dist/tasks/data-profile.d.ts +171 -0
- package/dist/tasks/data-profile.js +461 -0
- package/dist/tasks/refresh-regulatory-corpus.d.ts +59 -0
- package/dist/tasks/refresh-regulatory-corpus.js +146 -0
- package/dist/tasks/regulatory-corpus-boot-refresh.d.ts +55 -0
- package/dist/tasks/regulatory-corpus-boot-refresh.js +149 -0
- package/dist/tools/__fixtures__/tool-context.d.ts +13 -0
- package/dist/tools/__fixtures__/tool-context.js +18 -0
- package/dist/tools/bio/check-safety-panel.d.ts +35 -0
- package/dist/tools/bio/check-safety-panel.js +76 -0
- package/dist/tools/bio/find-approval-precedent.d.ts +32 -0
- package/dist/tools/bio/find-approval-precedent.js +72 -0
- package/dist/tools/bio/get-article-details.d.ts +11 -0
- package/dist/tools/bio/get-article-details.js +20 -0
- package/dist/tools/bio/get-article-full-text.d.ts +19 -0
- package/dist/tools/bio/get-article-full-text.js +32 -0
- package/dist/tools/bio/get-bioactivity.d.ts +11 -0
- package/dist/tools/bio/get-bioactivity.js +23 -0
- package/dist/tools/bio/get-drug-info.d.ts +9 -0
- package/dist/tools/bio/get-drug-info.js +22 -0
- package/dist/tools/bio/get-impc-ko-profile.d.ts +9 -0
- package/dist/tools/bio/get-impc-ko-profile.js +20 -0
- package/dist/tools/bio/get-mechanism.d.ts +8 -0
- package/dist/tools/bio/get-mechanism.js +18 -0
- package/dist/tools/bio/get-pubchem-assays.d.ts +22 -0
- package/dist/tools/bio/get-pubchem-assays.js +107 -0
- package/dist/tools/bio/get-pubchem-cross-refs.d.ts +15 -0
- package/dist/tools/bio/get-pubchem-cross-refs.js +68 -0
- package/dist/tools/bio/get-target-safety.d.ts +18 -0
- package/dist/tools/bio/get-target-safety.js +26 -0
- package/dist/tools/bio/index.d.ts +41 -0
- package/dist/tools/bio/index.js +48 -0
- package/dist/tools/bio/keys.d.ts +31 -0
- package/dist/tools/bio/keys.js +30 -0
- package/dist/tools/bio/lookup-go-term.d.ts +31 -0
- package/dist/tools/bio/lookup-go-term.js +116 -0
- package/dist/tools/bio/search-bgee-expression.d.ts +10 -0
- package/dist/tools/bio/search-bgee-expression.js +24 -0
- package/dist/tools/bio/search-clinical-trials.d.ts +12 -0
- package/dist/tools/bio/search-clinical-trials.js +21 -0
- package/dist/tools/bio/search-clinvar.d.ts +13 -0
- package/dist/tools/bio/search-clinvar.js +28 -0
- package/dist/tools/bio/search-compounds.d.ts +22 -0
- package/dist/tools/bio/search-compounds.js +160 -0
- package/dist/tools/bio/search-ctx-chemical.d.ts +50 -0
- package/dist/tools/bio/search-ctx-chemical.js +130 -0
- package/dist/tools/bio/search-ctx-exposure.d.ts +55 -0
- package/dist/tools/bio/search-ctx-exposure.js +176 -0
- package/dist/tools/bio/search-ctx-hazard.d.ts +111 -0
- package/dist/tools/bio/search-ctx-hazard.js +178 -0
- package/dist/tools/bio/search-dgidb.d.ts +43 -0
- package/dist/tools/bio/search-dgidb.js +199 -0
- package/dist/tools/bio/search-disgenet.d.ts +30 -0
- package/dist/tools/bio/search-disgenet.js +84 -0
- package/dist/tools/bio/search-drugbank.d.ts +38 -0
- package/dist/tools/bio/search-drugbank.js +109 -0
- package/dist/tools/bio/search-faers.d.ts +11 -0
- package/dist/tools/bio/search-faers.js +23 -0
- package/dist/tools/bio/search-gene.d.ts +11 -0
- package/dist/tools/bio/search-gene.js +19 -0
- package/dist/tools/bio/search-geo-datasets.d.ts +20 -0
- package/dist/tools/bio/search-geo-datasets.js +86 -0
- package/dist/tools/bio/search-gwas-catalog.d.ts +33 -0
- package/dist/tools/bio/search-gwas-catalog.js +172 -0
- package/dist/tools/bio/search-interactions.d.ts +17 -0
- package/dist/tools/bio/search-interactions.js +31 -0
- package/dist/tools/bio/search-opentargets.d.ts +11 -0
- package/dist/tools/bio/search-opentargets.js +25 -0
- package/dist/tools/bio/search-pathway.d.ts +12 -0
- package/dist/tools/bio/search-pathway.js +32 -0
- package/dist/tools/bio/search-pharmgkb.d.ts +17 -0
- package/dist/tools/bio/search-pharmgkb.js +46 -0
- package/dist/tools/bio/search-pubchem-compound.d.ts +26 -0
- package/dist/tools/bio/search-pubchem-compound.js +110 -0
- package/dist/tools/bio/search-pubmed.d.ts +17 -0
- package/dist/tools/bio/search-pubmed.js +31 -0
- package/dist/tools/bio/search-targets.d.ts +9 -0
- package/dist/tools/bio/search-targets.js +20 -0
- package/dist/tools/bio/search-toxcast.d.ts +36 -0
- package/dist/tools/bio/search-toxcast.js +141 -0
- package/dist/tools/define-tool.d.ts +80 -0
- package/dist/tools/define-tool.js +48 -0
- package/dist/tools/display/index.d.ts +4 -0
- package/dist/tools/display/index.js +4 -0
- package/dist/tools/display/show-user.d.ts +33 -0
- package/dist/tools/display/show-user.js +67 -0
- package/dist/tools/execute-plan.d.ts +64 -0
- package/dist/tools/execute-plan.js +208 -0
- package/dist/tools/iterate-report.d.ts +172 -0
- package/dist/tools/iterate-report.js +521 -0
- package/dist/tools/lib/api-utils.d.ts +80 -0
- package/dist/tools/lib/api-utils.js +128 -0
- package/dist/tools/lib/bgee-client.d.ts +36 -0
- package/dist/tools/lib/bgee-client.js +150 -0
- package/dist/tools/lib/cbioportal-client.d.ts +34 -0
- package/dist/tools/lib/cbioportal-client.js +159 -0
- package/dist/tools/lib/chembl-client.d.ts +123 -0
- package/dist/tools/lib/chembl-client.js +458 -0
- package/dist/tools/lib/chembl-config.d.ts +5 -0
- package/dist/tools/lib/chembl-config.js +3 -0
- package/dist/tools/lib/clinical-benchmarks-client.d.ts +33 -0
- package/dist/tools/lib/clinical-benchmarks-client.js +54 -0
- package/dist/tools/lib/clinical-trials-client.d.ts +216 -0
- package/dist/tools/lib/clinical-trials-client.js +339 -0
- package/dist/tools/lib/clinicaltrials-config.d.ts +4 -0
- package/dist/tools/lib/clinicaltrials-config.js +2 -0
- package/dist/tools/lib/clinvar-client.d.ts +25 -0
- package/dist/tools/lib/clinvar-client.js +126 -0
- package/dist/tools/lib/disgenet-config.d.ts +2 -0
- package/dist/tools/lib/disgenet-config.js +11 -0
- package/dist/tools/lib/drugbank-config.d.ts +2 -0
- package/dist/tools/lib/drugbank-config.js +12 -0
- package/dist/tools/lib/ema-client.d.ts +45 -0
- package/dist/tools/lib/ema-client.js +127 -0
- package/dist/tools/lib/ema-config.d.ts +7 -0
- package/dist/tools/lib/ema-config.js +7 -0
- package/dist/tools/lib/ensembl-client.d.ts +27 -0
- package/dist/tools/lib/ensembl-client.js +82 -0
- package/dist/tools/lib/gwas-catalog-config.d.ts +4 -0
- package/dist/tools/lib/gwas-catalog-config.js +2 -0
- package/dist/tools/lib/identifier-resolver.d.ts +85 -0
- package/dist/tools/lib/identifier-resolver.js +333 -0
- package/dist/tools/lib/impc-client.d.ts +44 -0
- package/dist/tools/lib/impc-client.js +239 -0
- package/dist/tools/lib/iuphar-client.d.ts +75 -0
- package/dist/tools/lib/iuphar-client.js +230 -0
- package/dist/tools/lib/iuphar-config.d.ts +5 -0
- package/dist/tools/lib/iuphar-config.js +3 -0
- package/dist/tools/lib/ncbi-utils.d.ts +58 -0
- package/dist/tools/lib/ncbi-utils.js +286 -0
- package/dist/tools/lib/openfda-client.d.ts +53 -0
- package/dist/tools/lib/openfda-client.js +192 -0
- package/dist/tools/lib/openfda-config.d.ts +2 -0
- package/dist/tools/lib/openfda-config.js +2 -0
- package/dist/tools/lib/opentargets-client.d.ts +64 -0
- package/dist/tools/lib/opentargets-client.js +290 -0
- package/dist/tools/lib/opentargets-config.d.ts +5 -0
- package/dist/tools/lib/opentargets-config.js +5 -0
- package/dist/tools/lib/path-validation.d.ts +14 -0
- package/dist/tools/lib/path-validation.js +26 -0
- package/dist/tools/lib/pathway-client.d.ts +27 -0
- package/dist/tools/lib/pathway-client.js +149 -0
- package/dist/tools/lib/pharmgkb-config.d.ts +4 -0
- package/dist/tools/lib/pharmgkb-config.js +2 -0
- package/dist/tools/lib/preview-lock.d.ts +20 -0
- package/dist/tools/lib/preview-lock.js +35 -0
- package/dist/tools/lib/protein-family-modality.d.ts +16 -0
- package/dist/tools/lib/protein-family-modality.js +42 -0
- package/dist/tools/lib/protein-family-normalize.d.ts +12 -0
- package/dist/tools/lib/protein-family-normalize.js +46 -0
- package/dist/tools/lib/pubchem-client.d.ts +40 -0
- package/dist/tools/lib/pubchem-client.js +128 -0
- package/dist/tools/lib/pubchem-config.d.ts +5 -0
- package/dist/tools/lib/pubchem-config.js +3 -0
- package/dist/tools/lib/pubmed-client.d.ts +28 -0
- package/dist/tools/lib/pubmed-client.js +91 -0
- package/dist/tools/lib/report-preflight.d.ts +39 -0
- package/dist/tools/lib/report-preflight.js +283 -0
- package/dist/tools/lib/string-client.d.ts +33 -0
- package/dist/tools/lib/string-client.js +93 -0
- package/dist/tools/lib/toxcast-config.d.ts +2 -0
- package/dist/tools/lib/toxcast-config.js +11 -0
- package/dist/tools/lib/uniprot-client.d.ts +28 -0
- package/dist/tools/lib/uniprot-client.js +103 -0
- package/dist/tools/lib/uniprot-config.d.ts +5 -0
- package/dist/tools/lib/uniprot-config.js +3 -0
- package/dist/tools/memory/index.d.ts +4 -0
- package/dist/tools/memory/index.js +4 -0
- package/dist/tools/memory/update-working-memory.d.ts +25 -0
- package/dist/tools/memory/update-working-memory.js +112 -0
- package/dist/tools/registry.d.ts +15 -0
- package/dist/tools/registry.js +26 -0
- package/dist/tools/report/build-report.d.ts +13 -0
- package/dist/tools/report/build-report.js +26 -0
- package/dist/tools/report/index.d.ts +14 -0
- package/dist/tools/report/index.js +14 -0
- package/dist/tools/report/mint-preview-url.d.ts +26 -0
- package/dist/tools/report/mint-preview-url.js +44 -0
- package/dist/tools/report/preview-publisher.d.ts +37 -0
- package/dist/tools/report/preview-publisher.js +25 -0
- package/dist/tools/report/preview-snapshot.d.ts +26 -0
- package/dist/tools/report/preview-snapshot.js +121 -0
- package/dist/tools/report/submit-report.d.ts +25 -0
- package/dist/tools/report/submit-report.js +126 -0
- package/dist/tools/report/version-fs.d.ts +15 -0
- package/dist/tools/report/version-fs.js +154 -0
- package/dist/tools/research/context7-docs.d.ts +31 -0
- package/dist/tools/research/context7-docs.js +61 -0
- package/dist/tools/research/generate-analogy-report.d.ts +60 -0
- package/dist/tools/research/generate-analogy-report.js +288 -0
- package/dist/tools/research/generate-plan.d.ts +39 -0
- package/dist/tools/research/generate-plan.js +393 -0
- package/dist/tools/research/index.d.ts +15 -0
- package/dist/tools/research/index.js +15 -0
- package/dist/tools/research/inspect-run.d.ts +54 -0
- package/dist/tools/research/inspect-run.js +85 -0
- package/dist/tools/research/literature-reviewer.d.ts +29 -0
- package/dist/tools/research/literature-reviewer.js +84 -0
- package/dist/tools/research/search-arxiv.d.ts +32 -0
- package/dist/tools/research/search-arxiv.js +123 -0
- package/dist/tools/research/search-github-repos.d.ts +32 -0
- package/dist/tools/research/search-github-repos.js +86 -0
- package/dist/tools/research/search-semantic-scholar.d.ts +33 -0
- package/dist/tools/research/search-semantic-scholar.js +93 -0
- package/dist/tools/run-ephemeral.d.ts +33 -0
- package/dist/tools/run-ephemeral.js +65 -0
- package/dist/tools/sandbox/index.d.ts +7 -0
- package/dist/tools/sandbox/index.js +7 -0
- package/dist/tools/sandbox/list-available-packages.d.ts +7 -0
- package/dist/tools/sandbox/list-available-packages.js +27 -0
- package/dist/tools/sandbox/list-available-refs.d.ts +7 -0
- package/dist/tools/sandbox/list-available-refs.js +147 -0
- package/dist/tools/sandbox/report-blocker.d.ts +23 -0
- package/dist/tools/sandbox/report-blocker.js +39 -0
- package/dist/tools/sandbox/skills.d.ts +72 -0
- package/dist/tools/sandbox/skills.js +144 -0
- package/dist/tools/workspace/edit-file.d.ts +46 -0
- package/dist/tools/workspace/edit-file.js +100 -0
- package/dist/tools/workspace/execute-command.d.ts +80 -0
- package/dist/tools/workspace/execute-command.js +95 -0
- package/dist/tools/workspace/file-stat.d.ts +24 -0
- package/dist/tools/workspace/file-stat.js +37 -0
- package/dist/tools/workspace/grep.d.ts +57 -0
- package/dist/tools/workspace/grep.js +154 -0
- package/dist/tools/workspace/index.d.ts +26 -0
- package/dist/tools/workspace/index.js +27 -0
- package/dist/tools/workspace/list-files.d.ts +24 -0
- package/dist/tools/workspace/list-files.js +38 -0
- package/dist/tools/workspace/mutator.d.ts +83 -0
- package/dist/tools/workspace/mutator.js +81 -0
- package/dist/tools/workspace/read-file.d.ts +39 -0
- package/dist/tools/workspace/read-file.js +93 -0
- package/dist/tools/workspace/result-bounds.d.ts +42 -0
- package/dist/tools/workspace/result-bounds.js +50 -0
- package/dist/tools/workspace/run-exec.d.ts +32 -0
- package/dist/tools/workspace/run-exec.js +34 -0
- package/dist/tools/workspace/show-file.d.ts +37 -0
- package/dist/tools/workspace/show-file.js +54 -0
- package/dist/tools/workspace/show-plan.d.ts +23 -0
- package/dist/tools/workspace/show-plan.js +44 -0
- package/dist/tools/workspace/workspace-search.d.ts +25 -0
- package/dist/tools/workspace/workspace-search.js +78 -0
- package/dist/tools/workspace/write-file.d.ts +16 -0
- package/dist/tools/workspace/write-file.js +33 -0
- package/dist/workflows/execute-analysis-scheduler.d.ts +94 -0
- package/dist/workflows/execute-analysis-scheduler.js +186 -0
- package/dist/workflows/execute-analysis.d.ts +271 -0
- package/dist/workflows/execute-analysis.js +746 -0
- package/dist/workflows/execute-target-assessment.d.ts +101 -0
- package/dist/workflows/execute-target-assessment.js +528 -0
- package/dist/workflows/metrics.d.ts +37 -0
- package/dist/workflows/metrics.js +55 -0
- package/dist/workflows/plan/level.d.ts +12 -0
- package/dist/workflows/plan/level.js +12 -0
- package/dist/workflows/register-workflows.d.ts +51 -0
- package/dist/workflows/register-workflows.js +48 -0
- package/dist/workflows/resume-execute-analysis.d.ts +70 -0
- package/dist/workflows/resume-execute-analysis.js +80 -0
- package/dist/workflows/sandbox-step.d.ts +243 -0
- package/dist/workflows/sandbox-step.js +573 -0
- package/dist/workflows/target-assessment/assemblers/index.d.ts +5 -0
- package/dist/workflows/target-assessment/assemblers/index.js +4 -0
- package/dist/workflows/target-assessment/assemblers/literature.d.ts +299 -0
- package/dist/workflows/target-assessment/assemblers/literature.js +987 -0
- package/dist/workflows/target-assessment/assemblers/orchestrator.d.ts +109 -0
- package/dist/workflows/target-assessment/assemblers/orchestrator.js +835 -0
- package/dist/workflows/target-assessment/assemblers/safety.d.ts +352 -0
- package/dist/workflows/target-assessment/assemblers/safety.js +985 -0
- package/dist/workflows/target-assessment/assemblers/trials.d.ts +30 -0
- package/dist/workflows/target-assessment/assemblers/trials.js +75 -0
- package/dist/workflows/target-assessment/collectors/index.d.ts +105 -0
- package/dist/workflows/target-assessment/collectors/index.js +468 -0
- package/dist/workflows/target-assessment/correction-loop.d.ts +45 -0
- package/dist/workflows/target-assessment/correction-loop.js +62 -0
- package/dist/workflows/target-assessment/coverage.d.ts +81 -0
- package/dist/workflows/target-assessment/coverage.js +82 -0
- package/dist/workflows/target-assessment/decisions/index.d.ts +86 -0
- package/dist/workflows/target-assessment/decisions/index.js +127 -0
- package/dist/workflows/target-assessment/fanout/index.d.ts +31 -0
- package/dist/workflows/target-assessment/fanout/index.js +155 -0
- package/dist/workflows/target-assessment/lib/approval-precedents.d.ts +52 -0
- package/dist/workflows/target-assessment/lib/approval-precedents.js +119 -0
- package/dist/workflows/target-assessment/lib/citation-validator.d.ts +46 -0
- package/dist/workflows/target-assessment/lib/citation-validator.js +316 -0
- package/dist/workflows/target-assessment/lib/clinical-consequence-annotator.d.ts +62 -0
- package/dist/workflows/target-assessment/lib/clinical-consequence-annotator.js +172 -0
- package/dist/workflows/target-assessment/lib/clinical-evidence-attribution.d.ts +45 -0
- package/dist/workflows/target-assessment/lib/clinical-evidence-attribution.js +156 -0
- package/dist/workflows/target-assessment/lib/compute-derived.d.ts +19 -0
- package/dist/workflows/target-assessment/lib/compute-derived.js +252 -0
- package/dist/workflows/target-assessment/lib/compute-selectivity.d.ts +15 -0
- package/dist/workflows/target-assessment/lib/compute-selectivity.js +18 -0
- package/dist/workflows/target-assessment/lib/dedup-modulators.d.ts +37 -0
- package/dist/workflows/target-assessment/lib/dedup-modulators.js +157 -0
- package/dist/workflows/target-assessment/lib/evidence-conflict-detector.d.ts +17 -0
- package/dist/workflows/target-assessment/lib/evidence-conflict-detector.js +100 -0
- package/dist/workflows/target-assessment/lib/expression-constants.d.ts +21 -0
- package/dist/workflows/target-assessment/lib/expression-constants.js +21 -0
- package/dist/workflows/target-assessment/lib/family-complex-supplement.d.ts +21 -0
- package/dist/workflows/target-assessment/lib/family-complex-supplement.js +37 -0
- package/dist/workflows/target-assessment/lib/heterodimer-filter.d.ts +39 -0
- package/dist/workflows/target-assessment/lib/heterodimer-filter.js +54 -0
- package/dist/workflows/target-assessment/lib/intended-polypharm-filter.d.ts +4 -0
- package/dist/workflows/target-assessment/lib/intended-polypharm-filter.js +24 -0
- package/dist/workflows/target-assessment/lib/llm-step.d.ts +77 -0
- package/dist/workflows/target-assessment/lib/llm-step.js +99 -0
- package/dist/workflows/target-assessment/lib/meddra-organ-map.d.ts +30 -0
- package/dist/workflows/target-assessment/lib/meddra-organ-map.js +126 -0
- package/dist/workflows/target-assessment/lib/recommendation-quality-gates.d.ts +17 -0
- package/dist/workflows/target-assessment/lib/recommendation-quality-gates.js +99 -0
- package/dist/workflows/target-assessment/lib/recommendation-sanitizer.d.ts +2 -0
- package/dist/workflows/target-assessment/lib/recommendation-sanitizer.js +51 -0
- package/dist/workflows/target-assessment/lib/regulatory-actions.d.ts +26 -0
- package/dist/workflows/target-assessment/lib/regulatory-actions.js +147 -0
- package/dist/workflows/target-assessment/lib/structured-llm.d.ts +58 -0
- package/dist/workflows/target-assessment/lib/structured-llm.js +101 -0
- package/dist/workflows/target-assessment/lib/target-identity-filter.d.ts +60 -0
- package/dist/workflows/target-assessment/lib/target-identity-filter.js +86 -0
- package/dist/workflows/target-assessment/lib/therapeutic-programs.d.ts +20 -0
- package/dist/workflows/target-assessment/lib/therapeutic-programs.js +68 -0
- package/dist/workflows/target-assessment/metrics.d.ts +21 -0
- package/dist/workflows/target-assessment/metrics.js +42 -0
- package/dist/workflows/target-assessment/phase4-assemble.d.ts +1841 -0
- package/dist/workflows/target-assessment/phase4-assemble.js +39 -0
- package/dist/workflows/target-assessment/phase5-persist.d.ts +57 -0
- package/dist/workflows/target-assessment/phase5-persist.js +461 -0
- package/dist/workflows/target-assessment/progress.d.ts +38 -0
- package/dist/workflows/target-assessment/progress.js +76 -0
- package/dist/workflows/target-assessment/schemas.d.ts +931 -0
- package/dist/workflows/target-assessment/schemas.js +293 -0
- package/dist/workflows/target-assessment/steps/collectors/pathways.d.ts +15 -0
- package/dist/workflows/target-assessment/steps/collectors/pathways.js +58 -0
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-class-drug-step.d.ts +34 -0
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-class-drug-step.js +31 -0
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-trial-step.d.ts +57 -0
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-trial-step.js +54 -0
- package/dist/workflows/target-assessment/steps/fanout/faers-for-one-modulator-step.d.ts +35 -0
- package/dist/workflows/target-assessment/steps/fanout/faers-for-one-modulator-step.js +32 -0
- package/dist/workflows/target-assessment/steps/fanout/index.d.ts +14 -0
- package/dist/workflows/target-assessment/steps/fanout/index.js +10 -0
- package/dist/workflows/target-assessment/steps/fanout/polypharm-for-one-modulator-step.d.ts +28 -0
- package/dist/workflows/target-assessment/steps/fanout/polypharm-for-one-modulator-step.js +27 -0
- package/dist/workflows/target-assessment/steps/phase0-resolve.d.ts +71 -0
- package/dist/workflows/target-assessment/steps/phase0-resolve.js +21 -0
- package/dist/workflows/target-assessment/steps/phase1-aggregate.d.ts +1018 -0
- package/dist/workflows/target-assessment/steps/phase1-aggregate.js +25 -0
- package/dist/workflows/target-assessment/steps/phase2-aggregate.d.ts +696 -0
- package/dist/workflows/target-assessment/steps/phase2-aggregate.js +38 -0
- package/dist/workflows/target-assessment/steps/phase3-aggregate.d.ts +936 -0
- package/dist/workflows/target-assessment/steps/phase3-aggregate.js +22 -0
- package/dist/workflows/target-assessment/steps/synthesis/diagnostics.d.ts +34 -0
- package/dist/workflows/target-assessment/steps/synthesis/diagnostics.js +45 -0
- package/dist/workflows/target-assessment/sub-workflows/index.d.ts +15 -0
- package/dist/workflows/target-assessment/sub-workflows/index.js +11 -0
- package/dist/workflows/target-assessment/sub-workflows/per-class-drug-aes.d.ts +41 -0
- package/dist/workflows/target-assessment/sub-workflows/per-class-drug-aes.js +12 -0
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-faers.d.ts +41 -0
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-faers.js +12 -0
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-polypharm.d.ts +36 -0
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-polypharm.js +12 -0
- package/dist/workflows/target-assessment/sub-workflows/per-trial-aes.d.ts +66 -0
- package/dist/workflows/target-assessment/sub-workflows/per-trial-aes.js +12 -0
- package/dist/workflows/target-assessment/synthesis/index.d.ts +560 -0
- package/dist/workflows/target-assessment/synthesis/index.js +351 -0
- package/dist/workflows/target-assessment/synthesis-probes.d.ts +56 -0
- package/dist/workflows/target-assessment/synthesis-probes.js +320 -0
- package/dist/workspace/filesystem.d.ts +117 -0
- package/dist/workspace/filesystem.js +304 -0
- package/dist/workspace/mount-strategy.d.ts +50 -0
- package/dist/workspace/mount-strategy.js +67 -0
- package/dist/workspace/paths.d.ts +185 -0
- package/dist/workspace/paths.js +219 -0
- package/dist/workspace/provenance-collector.d.ts +34 -0
- package/dist/workspace/provenance-collector.js +16 -0
- package/dist/workspace/search-config.d.ts +23 -0
- package/dist/workspace/search-config.js +43 -0
- package/dist/workspace/workspace-paths.d.ts +26 -0
- package/dist/workspace/workspace-paths.js +31 -0
- package/package.json +101 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cortex-native chat-stream events — the harness wire vocabulary.
|
|
3
|
+
*
|
|
4
|
+
* Distinct from the 15 `data-*` chat parts (`chat-parts.ts`): those are UI
|
|
5
|
+
* presentation payloads a tool emits; these are the agent-loop stream events
|
|
6
|
+
* the harness chat route frames as Cortex-native SSE. Together they are the
|
|
7
|
+
* sole Cortex↔frontend wire contract — there is no AI SDK UI Message Stream
|
|
8
|
+
* Protocol and no translation layer.
|
|
9
|
+
*
|
|
10
|
+
* Every event carries `source` — the agent call chain at the point of
|
|
11
|
+
* emission, derived from the harness `Session.callPath`.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Provenance stamped on every chat-stream event: the emitting agent and the
|
|
15
|
+
* call chain that reached it (e.g. `["conversation-agent"]`, or
|
|
16
|
+
* `["conversation-agent", "literature-reviewer"]` for a sub-agent).
|
|
17
|
+
*/
|
|
18
|
+
export interface EventSource {
|
|
19
|
+
agentId: string;
|
|
20
|
+
callPath: string[];
|
|
21
|
+
}
|
|
22
|
+
/** A run of assistant text. Deltas accumulate into the turn's reply. */
|
|
23
|
+
export interface TextDeltaEvent {
|
|
24
|
+
type: "text-delta";
|
|
25
|
+
text: string;
|
|
26
|
+
source: EventSource;
|
|
27
|
+
}
|
|
28
|
+
/** A tool call has been dispatched. */
|
|
29
|
+
export interface ToolStartedEvent {
|
|
30
|
+
type: "tool-started";
|
|
31
|
+
/** The Anthropic `tool_use` block id — pairs with `tool-finished`. */
|
|
32
|
+
toolUseId: string;
|
|
33
|
+
/** The tool name. */
|
|
34
|
+
name: string;
|
|
35
|
+
source: EventSource;
|
|
36
|
+
}
|
|
37
|
+
/** A tool call has resolved. */
|
|
38
|
+
export interface ToolFinishedEvent {
|
|
39
|
+
type: "tool-finished";
|
|
40
|
+
toolUseId: string;
|
|
41
|
+
name: string;
|
|
42
|
+
/** True when the tool produced an `is_error` result. */
|
|
43
|
+
isError: boolean;
|
|
44
|
+
source: EventSource;
|
|
45
|
+
}
|
|
46
|
+
/** The agent loop produced its terminal reply — the turn is complete. */
|
|
47
|
+
export interface FinishEvent {
|
|
48
|
+
type: "finish";
|
|
49
|
+
source: EventSource;
|
|
50
|
+
}
|
|
51
|
+
/** The turn failed. `reason` is a machine-readable code when one applies. */
|
|
52
|
+
export interface ChatErrorEvent {
|
|
53
|
+
type: "error";
|
|
54
|
+
/** Human-readable, scrubbed error message. */
|
|
55
|
+
message: string;
|
|
56
|
+
/** Machine-readable failure code, e.g. `"budget_exceeded"`. */
|
|
57
|
+
reason?: string;
|
|
58
|
+
source: EventSource;
|
|
59
|
+
}
|
|
60
|
+
/** The discriminated union of all Cortex-native chat-stream events. */
|
|
61
|
+
export type CortexChatEvent = TextDeltaEvent | ToolStartedEvent | ToolFinishedEvent | FinishEvent | ChatErrorEvent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cortex-native chat-stream events — the harness wire vocabulary.
|
|
3
|
+
*
|
|
4
|
+
* Distinct from the 15 `data-*` chat parts (`chat-parts.ts`): those are UI
|
|
5
|
+
* presentation payloads a tool emits; these are the agent-loop stream events
|
|
6
|
+
* the harness chat route frames as Cortex-native SSE. Together they are the
|
|
7
|
+
* sole Cortex↔frontend wire contract — there is no AI SDK UI Message Stream
|
|
8
|
+
* Protocol and no translation layer.
|
|
9
|
+
*
|
|
10
|
+
* Every event carries `source` — the agent call chain at the point of
|
|
11
|
+
* emission, derived from the harness `Session.callPath`.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cortex chat data parts — custom parts emitted via writer.write() / writer.custom()
|
|
3
|
+
* that flow through the chat stream and are rendered by the frontend.
|
|
4
|
+
*
|
|
5
|
+
* 15 part types across four categories:
|
|
6
|
+
* Presentation: data-presentation (agent-synthesized content),
|
|
7
|
+
* data-plan (plan by id), data-file-reference (files by path)
|
|
8
|
+
* Run lifecycle: run-started, dag-state, run-completed, run-failed, run-synthesis,
|
|
9
|
+
* synthesis-progress
|
|
10
|
+
* Per-step live: step-activity, step-file-tree
|
|
11
|
+
* Per-step final: step-output, step-summary
|
|
12
|
+
*/
|
|
13
|
+
export interface PlanStep {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
agent: string;
|
|
17
|
+
question: string;
|
|
18
|
+
depends_on: string[];
|
|
19
|
+
resources?: {
|
|
20
|
+
cpu: number;
|
|
21
|
+
memoryGb: number;
|
|
22
|
+
};
|
|
23
|
+
maxSteps: number;
|
|
24
|
+
}
|
|
25
|
+
export type PresentationContent =
|
|
26
|
+
/** `dataPath` (optional): an analysis-rooted CSV artifact path the host loads and injects as the
|
|
27
|
+
* chart's `dataset.source` at render time — the data never rides through the context window. */
|
|
28
|
+
{
|
|
29
|
+
kind: "echart";
|
|
30
|
+
spec: Record<string, unknown>;
|
|
31
|
+
dataPath?: string;
|
|
32
|
+
} | {
|
|
33
|
+
kind: "markdown";
|
|
34
|
+
body: string;
|
|
35
|
+
} | {
|
|
36
|
+
kind: "code";
|
|
37
|
+
code: string;
|
|
38
|
+
language: string;
|
|
39
|
+
} | {
|
|
40
|
+
kind: "svg";
|
|
41
|
+
markup: string;
|
|
42
|
+
} | {
|
|
43
|
+
kind: "table";
|
|
44
|
+
headers: string[];
|
|
45
|
+
rows: string[][];
|
|
46
|
+
caption?: string;
|
|
47
|
+
};
|
|
48
|
+
export interface PresentationPart {
|
|
49
|
+
type: "data-presentation";
|
|
50
|
+
id: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
content: PresentationContent;
|
|
53
|
+
}
|
|
54
|
+
export interface PlanPart {
|
|
55
|
+
type: "data-plan";
|
|
56
|
+
id: string;
|
|
57
|
+
planId: string;
|
|
58
|
+
title?: string;
|
|
59
|
+
steps?: PlanStep[];
|
|
60
|
+
analytical_narrative?: string;
|
|
61
|
+
omicsType?: string;
|
|
62
|
+
omicsSubtype?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface RunCardPart {
|
|
65
|
+
type: "data-run-card";
|
|
66
|
+
id: string;
|
|
67
|
+
runId: string;
|
|
68
|
+
planId: string;
|
|
69
|
+
title: string;
|
|
70
|
+
stepCount: number;
|
|
71
|
+
}
|
|
72
|
+
export interface FileReferenceEntry {
|
|
73
|
+
path: string;
|
|
74
|
+
runId?: string;
|
|
75
|
+
caption?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface FileReferencePart {
|
|
78
|
+
type: "data-file-reference";
|
|
79
|
+
id: string;
|
|
80
|
+
title?: string;
|
|
81
|
+
files: FileReferenceEntry[];
|
|
82
|
+
}
|
|
83
|
+
export interface RunStartedPart {
|
|
84
|
+
type: "data-run-started";
|
|
85
|
+
runId: string;
|
|
86
|
+
planSummary: string;
|
|
87
|
+
stepCount: number;
|
|
88
|
+
}
|
|
89
|
+
/** `"pending"` = waiting on dependencies; `"queued"` = dependencies satisfied,
|
|
90
|
+
* held until in-flight steps free machine-budget capacity. */
|
|
91
|
+
export type StepStatus = "pending" | "queued" | "running" | "completed" | "failed";
|
|
92
|
+
export interface DagStepState {
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
agent: string;
|
|
96
|
+
status: StepStatus;
|
|
97
|
+
/**
|
|
98
|
+
* Topological depth from DAG sources (level 0 = no deps; level N = max(level(deps)) + 1).
|
|
99
|
+
* Layout-only — does NOT gate execution. Two steps at the same level may run or
|
|
100
|
+
* complete in any order.
|
|
101
|
+
*/
|
|
102
|
+
level: number;
|
|
103
|
+
dependsOn: string[];
|
|
104
|
+
/** Duration in ms (set on completion). */
|
|
105
|
+
durationMs?: number;
|
|
106
|
+
/** Artifact count (set on completion). */
|
|
107
|
+
artifactCount?: number;
|
|
108
|
+
/** Brief summary (set on completion). */
|
|
109
|
+
summary?: string;
|
|
110
|
+
/** Error message (set on failure). */
|
|
111
|
+
error?: string;
|
|
112
|
+
}
|
|
113
|
+
export interface DagStatePart {
|
|
114
|
+
type: "data-dag-state";
|
|
115
|
+
/** Stable ID for reconciliation — same across all updates for a run. */
|
|
116
|
+
id: string;
|
|
117
|
+
runId: string;
|
|
118
|
+
steps: DagStepState[];
|
|
119
|
+
}
|
|
120
|
+
export type StepPhase = "sandbox-init" | "executing" | "generating-metadata" | "generating-summary" | "indexing"
|
|
121
|
+
/** Step bytes are uploading to the artifact store inline (per-step sync). */
|
|
122
|
+
| "persisting" | "complete" | "failed"
|
|
123
|
+
/** Step is being retried after a classified-transient failure. */
|
|
124
|
+
| "retrying"
|
|
125
|
+
/** Non-fatal warning emitted during step execution (e.g., maxSteps hit). */
|
|
126
|
+
| "warning";
|
|
127
|
+
export interface StepActivityPart {
|
|
128
|
+
type: "data-step-activity";
|
|
129
|
+
/** Stable ID for reconciliation — unique per step within a run. */
|
|
130
|
+
id: string;
|
|
131
|
+
runId: string;
|
|
132
|
+
stepId: string;
|
|
133
|
+
/** Current execution phase. */
|
|
134
|
+
phase: StepPhase;
|
|
135
|
+
/** Human-readable activity description (e.g., "Running DESeq2 analysis"). */
|
|
136
|
+
activity: string;
|
|
137
|
+
}
|
|
138
|
+
export interface FileTreeEntry {
|
|
139
|
+
path: string;
|
|
140
|
+
size?: number;
|
|
141
|
+
type: "file" | "directory";
|
|
142
|
+
}
|
|
143
|
+
export interface StepFileTreePart {
|
|
144
|
+
type: "data-step-file-tree";
|
|
145
|
+
/** Stable ID for reconciliation — unique per step within a run. */
|
|
146
|
+
id: string;
|
|
147
|
+
runId: string;
|
|
148
|
+
stepId: string;
|
|
149
|
+
/** Current file tree snapshot. May be empty if sandbox hasn't written to disk yet. */
|
|
150
|
+
files: FileTreeEntry[];
|
|
151
|
+
}
|
|
152
|
+
export interface StepOutputFile {
|
|
153
|
+
path: string;
|
|
154
|
+
size: number;
|
|
155
|
+
/** File category for grouping/icons. */
|
|
156
|
+
fileType: "script" | "output" | "figure" | "log" | "notebook" | "summary";
|
|
157
|
+
/** LLM-generated description of the file contents. */
|
|
158
|
+
description: string;
|
|
159
|
+
}
|
|
160
|
+
export interface StepOutputPart {
|
|
161
|
+
type: "data-step-output";
|
|
162
|
+
id: string;
|
|
163
|
+
runId: string;
|
|
164
|
+
stepId: string;
|
|
165
|
+
agentId: string;
|
|
166
|
+
files: StepOutputFile[];
|
|
167
|
+
artifactCount: number;
|
|
168
|
+
durationMs: number;
|
|
169
|
+
/** Agent-stream finish reason ("stop", "tool-calls", "length", ...). Absent on rescued-from-failure outputs. */
|
|
170
|
+
finishReason?: string;
|
|
171
|
+
/** True when the agent exhausted its maxSteps turn budget. */
|
|
172
|
+
hitMaxSteps?: boolean;
|
|
173
|
+
}
|
|
174
|
+
/** Step summary — free-form markdown body, rendered verbatim by the UI. */
|
|
175
|
+
export interface StepSummaryPart {
|
|
176
|
+
type: "data-step-summary";
|
|
177
|
+
id: string;
|
|
178
|
+
runId: string;
|
|
179
|
+
stepId: string;
|
|
180
|
+
agentId: string;
|
|
181
|
+
/** Free-form markdown body. Render with a markdown renderer. */
|
|
182
|
+
markdown: string;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Emitted when a step agent declares it cannot fulfil its step via
|
|
186
|
+
* `report_blocker` (see the harness-sandbox-agents spec). A blocked step has no deliverables; the
|
|
187
|
+
* reason surfaces in the run side panel.
|
|
188
|
+
*/
|
|
189
|
+
export interface StepBlockedPart {
|
|
190
|
+
type: "data-step-blocked";
|
|
191
|
+
id: string;
|
|
192
|
+
runId: string;
|
|
193
|
+
stepId: string;
|
|
194
|
+
agentId: string;
|
|
195
|
+
/** Agent-declared reason the step could not be fulfilled. */
|
|
196
|
+
reason: string;
|
|
197
|
+
}
|
|
198
|
+
export interface RunCompletedFinding {
|
|
199
|
+
title: string;
|
|
200
|
+
confidence: "high" | "medium" | "low";
|
|
201
|
+
}
|
|
202
|
+
export interface RunCompletedPart {
|
|
203
|
+
type: "data-run-completed";
|
|
204
|
+
runId: string;
|
|
205
|
+
status: "completed" | "partial";
|
|
206
|
+
completedSteps: number;
|
|
207
|
+
totalSteps: number;
|
|
208
|
+
artifactCount: number;
|
|
209
|
+
/** Top findings for quick display. */
|
|
210
|
+
findings: RunCompletedFinding[];
|
|
211
|
+
/**
|
|
212
|
+
* Optional human-readable explanation — present when `status === "partial"`
|
|
213
|
+
* to explain why (e.g., synthesis failed but step summaries are available).
|
|
214
|
+
*/
|
|
215
|
+
note?: string;
|
|
216
|
+
}
|
|
217
|
+
export interface SynthesizedFinding {
|
|
218
|
+
stepId: string;
|
|
219
|
+
title: string;
|
|
220
|
+
description: string;
|
|
221
|
+
confidence: "high" | "medium" | "low";
|
|
222
|
+
noveltyStatus: "novel" | "confirmed" | "partially_confirmed" | "contradicted" | "expected";
|
|
223
|
+
literatureInterpretation: string;
|
|
224
|
+
}
|
|
225
|
+
export interface BiologicalTheme {
|
|
226
|
+
name: string;
|
|
227
|
+
findings: {
|
|
228
|
+
stepId: string;
|
|
229
|
+
title: string;
|
|
230
|
+
}[];
|
|
231
|
+
narrative: string;
|
|
232
|
+
}
|
|
233
|
+
export interface RunSynthesisPart {
|
|
234
|
+
type: "data-run-synthesis";
|
|
235
|
+
id: string;
|
|
236
|
+
runId: string;
|
|
237
|
+
overview: string;
|
|
238
|
+
conclusions?: string;
|
|
239
|
+
findings: SynthesizedFinding[];
|
|
240
|
+
themes: BiologicalTheme[];
|
|
241
|
+
limitations?: string[];
|
|
242
|
+
keyReferences: {
|
|
243
|
+
pmid: string;
|
|
244
|
+
citation: string;
|
|
245
|
+
description: string;
|
|
246
|
+
}[];
|
|
247
|
+
}
|
|
248
|
+
export type SynthesisPhase = "starting" | "researching" | "drafting" | "validating" | "refining" | "indexing" | "persisting" | "complete"
|
|
249
|
+
/**
|
|
250
|
+
* Synthesizer chose to skip (e.g., technical-only run, summaries with no
|
|
251
|
+
* findings worth surfacing). Distinct from `failed` — this is an
|
|
252
|
+
* intentional outcome, not a breakage.
|
|
253
|
+
*/
|
|
254
|
+
| "skipped" | "failed";
|
|
255
|
+
export interface SynthesisProgressPart {
|
|
256
|
+
type: "data-synthesis-progress";
|
|
257
|
+
/** Stable ID for reconciliation — `synthesis-progress-{runId}`. */
|
|
258
|
+
id: string;
|
|
259
|
+
runId: string;
|
|
260
|
+
phase: SynthesisPhase;
|
|
261
|
+
/** Human-readable activity description. */
|
|
262
|
+
activity: string;
|
|
263
|
+
/** Number of literature-reviewer delegations started so far. */
|
|
264
|
+
delegationCount?: number;
|
|
265
|
+
/** Number of times the synthesizer's submit_synthesis call was rejected. */
|
|
266
|
+
validationAttempts?: number;
|
|
267
|
+
/** Agent-provided reason — set when phase === "skipped". */
|
|
268
|
+
reason?: string;
|
|
269
|
+
/** Error message — set when phase === "failed". */
|
|
270
|
+
error?: string;
|
|
271
|
+
}
|
|
272
|
+
export interface RunFailedPart {
|
|
273
|
+
type: "data-run-failed";
|
|
274
|
+
runId: string;
|
|
275
|
+
/** Scrubbed error message (no internal details). */
|
|
276
|
+
error: string;
|
|
277
|
+
/** Machine-readable failure reason (e.g., "budget_exceeded"). */
|
|
278
|
+
reason?: string;
|
|
279
|
+
}
|
|
280
|
+
export interface PreviewPart {
|
|
281
|
+
type: "data-report-preview";
|
|
282
|
+
/** Unique per emission (UUID). */
|
|
283
|
+
id: string;
|
|
284
|
+
/** Groups all versions of the same preview. */
|
|
285
|
+
previewId: string;
|
|
286
|
+
/** Version number (1, 2, 3, ...). */
|
|
287
|
+
version: number;
|
|
288
|
+
/** Report title. */
|
|
289
|
+
title: string;
|
|
290
|
+
/** Version-relative path (e.g., "v1/index.html"). */
|
|
291
|
+
previewPath: string;
|
|
292
|
+
/** Report format. */
|
|
293
|
+
format: "html" | "pdf";
|
|
294
|
+
}
|
|
295
|
+
export interface DataPreviewFailedPart {
|
|
296
|
+
type: "data-report-preview-failed";
|
|
297
|
+
/** Unique per emission (UUID). */
|
|
298
|
+
id: string;
|
|
299
|
+
/** Groups all versions of the same preview. */
|
|
300
|
+
previewId: string;
|
|
301
|
+
/** Attempted version number that failed. */
|
|
302
|
+
version: number;
|
|
303
|
+
/** Human-readable failure reason. */
|
|
304
|
+
reason: string;
|
|
305
|
+
/** Optional taxonomy of failure kinds. */
|
|
306
|
+
errorKind?: "render" | "submit" | "build" | "timeout" | "internal";
|
|
307
|
+
}
|
|
308
|
+
export type CortexChatPart = PresentationPart | PlanPart | RunCardPart | FileReferencePart | RunStartedPart | DagStatePart | StepActivityPart | StepFileTreePart | StepOutputPart | StepSummaryPart | StepBlockedPart | RunSynthesisPart | SynthesisProgressPart | RunCompletedPart | RunFailedPart | PreviewPart | DataPreviewFailedPart;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cortex chat data parts — custom parts emitted via writer.write() / writer.custom()
|
|
3
|
+
* that flow through the chat stream and are rendered by the frontend.
|
|
4
|
+
*
|
|
5
|
+
* 15 part types across four categories:
|
|
6
|
+
* Presentation: data-presentation (agent-synthesized content),
|
|
7
|
+
* data-plan (plan by id), data-file-reference (files by path)
|
|
8
|
+
* Run lifecycle: run-started, dag-state, run-completed, run-failed, run-synthesis,
|
|
9
|
+
* synthesis-progress
|
|
10
|
+
* Per-step live: step-activity, step-file-tree
|
|
11
|
+
* Per-step final: step-output, step-summary
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content URL construction — shared between the frontend and Cortex.
|
|
3
|
+
*
|
|
4
|
+
* The `res` claim formula and URL shape are the canonical TypeScript contract
|
|
5
|
+
* for the content-token preview flow. The storage backend mirrors the formula in Go; both
|
|
6
|
+
* sides are locked by the shared test vector at
|
|
7
|
+
* `src/__tests__/fixtures/preview-res.json`.
|
|
8
|
+
*
|
|
9
|
+
* End-to-end contract:
|
|
10
|
+
* token res claim : "previews/{analysisId}/{previewId}"
|
|
11
|
+
* URL : {contentBaseUrl}/previews/{analysisId}/{previewId}/{previewPath}?t={token}
|
|
12
|
+
* Caddy predicate : request.path.startsWith("/" + res + "/")
|
|
13
|
+
*
|
|
14
|
+
* This is URL space only. On disk a preview lives inside its analysis's workspace tree, at
|
|
15
|
+
* `{resolveWorkspaceRoot(analysisId)}/previews/{previewId}/{previewPath}` (the workspace-layout
|
|
16
|
+
* spec) — the `res` claim carries the analysis id because the URL needs an authorization
|
|
17
|
+
* boundary, whereas the resolved root already identifies the analysis and so does not repeat it.
|
|
18
|
+
* A host that serves previews owns the map between the two.
|
|
19
|
+
*
|
|
20
|
+
* The harness's contracts module owns this TS implementation so both the harness and
|
|
21
|
+
* react-client consume one canonical formula.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Canonical `res` claim formula for a preview. Returns the literal string
|
|
25
|
+
* `previews/{analysisId}/{previewId}` with no leading or trailing slash.
|
|
26
|
+
*
|
|
27
|
+
* This is the URL sub-path served by the content-server (Caddy) and the token's
|
|
28
|
+
* authorization boundary — NOT a filesystem sub-path; see the module doc.
|
|
29
|
+
*
|
|
30
|
+
* MUST match `fmt.Sprintf("previews/%s/%s", analysisID, previewID)` in
|
|
31
|
+
* the storage backend's Go preview-access implementation. Drift is caught by the shared test
|
|
32
|
+
* vector at `src/__tests__/fixtures/preview-res.json`.
|
|
33
|
+
*/
|
|
34
|
+
export declare function previewResourceId(analysisId: string, previewId: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Build a content-token preview URL for an iframe src.
|
|
37
|
+
*
|
|
38
|
+
* Produces `{contentBaseUrl}/{res}/{previewPath}?t={token}` where `res` is
|
|
39
|
+
* the output of `previewResourceId(analysisId, previewId)`. The query parameter
|
|
40
|
+
* name is `t` (matching Caddy's `from_query t` directive). The token is
|
|
41
|
+
* URL-encoded.
|
|
42
|
+
*
|
|
43
|
+
* @param contentBaseUrl - Content server base URL (trailing slash tolerated)
|
|
44
|
+
* @param analysisId - The analysis ID (authorization boundary)
|
|
45
|
+
* @param previewId - The preview ID (groups all versions)
|
|
46
|
+
* @param previewPath - Version-relative path (e.g., "v1/index.html"). Leading slash tolerated.
|
|
47
|
+
* @param token - Short-lived content token minted by the storage backend (required)
|
|
48
|
+
*/
|
|
49
|
+
export declare function buildPreviewUrl(contentBaseUrl: string, analysisId: string, previewId: string, previewPath: string, token: string): string;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content URL construction — shared between the frontend and Cortex.
|
|
3
|
+
*
|
|
4
|
+
* The `res` claim formula and URL shape are the canonical TypeScript contract
|
|
5
|
+
* for the content-token preview flow. The storage backend mirrors the formula in Go; both
|
|
6
|
+
* sides are locked by the shared test vector at
|
|
7
|
+
* `src/__tests__/fixtures/preview-res.json`.
|
|
8
|
+
*
|
|
9
|
+
* End-to-end contract:
|
|
10
|
+
* token res claim : "previews/{analysisId}/{previewId}"
|
|
11
|
+
* URL : {contentBaseUrl}/previews/{analysisId}/{previewId}/{previewPath}?t={token}
|
|
12
|
+
* Caddy predicate : request.path.startsWith("/" + res + "/")
|
|
13
|
+
*
|
|
14
|
+
* This is URL space only. On disk a preview lives inside its analysis's workspace tree, at
|
|
15
|
+
* `{resolveWorkspaceRoot(analysisId)}/previews/{previewId}/{previewPath}` (the workspace-layout
|
|
16
|
+
* spec) — the `res` claim carries the analysis id because the URL needs an authorization
|
|
17
|
+
* boundary, whereas the resolved root already identifies the analysis and so does not repeat it.
|
|
18
|
+
* A host that serves previews owns the map between the two.
|
|
19
|
+
*
|
|
20
|
+
* The harness's contracts module owns this TS implementation so both the harness and
|
|
21
|
+
* react-client consume one canonical formula.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Canonical `res` claim formula for a preview. Returns the literal string
|
|
25
|
+
* `previews/{analysisId}/{previewId}` with no leading or trailing slash.
|
|
26
|
+
*
|
|
27
|
+
* This is the URL sub-path served by the content-server (Caddy) and the token's
|
|
28
|
+
* authorization boundary — NOT a filesystem sub-path; see the module doc.
|
|
29
|
+
*
|
|
30
|
+
* MUST match `fmt.Sprintf("previews/%s/%s", analysisID, previewID)` in
|
|
31
|
+
* the storage backend's Go preview-access implementation. Drift is caught by the shared test
|
|
32
|
+
* vector at `src/__tests__/fixtures/preview-res.json`.
|
|
33
|
+
*/
|
|
34
|
+
export function previewResourceId(analysisId, previewId) {
|
|
35
|
+
return `previews/${analysisId}/${previewId}`;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Build a content-token preview URL for an iframe src.
|
|
39
|
+
*
|
|
40
|
+
* Produces `{contentBaseUrl}/{res}/{previewPath}?t={token}` where `res` is
|
|
41
|
+
* the output of `previewResourceId(analysisId, previewId)`. The query parameter
|
|
42
|
+
* name is `t` (matching Caddy's `from_query t` directive). The token is
|
|
43
|
+
* URL-encoded.
|
|
44
|
+
*
|
|
45
|
+
* @param contentBaseUrl - Content server base URL (trailing slash tolerated)
|
|
46
|
+
* @param analysisId - The analysis ID (authorization boundary)
|
|
47
|
+
* @param previewId - The preview ID (groups all versions)
|
|
48
|
+
* @param previewPath - Version-relative path (e.g., "v1/index.html"). Leading slash tolerated.
|
|
49
|
+
* @param token - Short-lived content token minted by the storage backend (required)
|
|
50
|
+
*/
|
|
51
|
+
export function buildPreviewUrl(contentBaseUrl, analysisId, previewId, previewPath, token) {
|
|
52
|
+
const base = contentBaseUrl.replace(/\/+$/, "");
|
|
53
|
+
const path = previewPath.replace(/^\/+/, "");
|
|
54
|
+
const res = previewResourceId(analysisId, previewId);
|
|
55
|
+
return `${base}/${res}/${path}?t=${encodeURIComponent(token)}`;
|
|
56
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type { PlanStep, PresentationContent, PresentationPart, PlanPart, RunCardPart, FileReferenceEntry, FileReferencePart, RunStartedPart, StepStatus, DagStepState, DagStatePart, StepPhase, StepActivityPart, FileTreeEntry, StepFileTreePart, StepOutputFile, StepOutputPart, StepSummaryPart, StepBlockedPart, SynthesizedFinding, BiologicalTheme, RunSynthesisPart, SynthesisPhase, SynthesisProgressPart, RunCompletedFinding, RunCompletedPart, RunFailedPart, PreviewPart, DataPreviewFailedPart, CortexChatPart, } from "./chat-parts.js";
|
|
2
|
+
export type { EventSource, TextDeltaEvent, ToolStartedEvent, ToolFinishedEvent, FinishEvent, ChatErrorEvent, CortexChatEvent } from "./chat-events.js";
|
|
3
|
+
export type { TextPart, ToolCallPart, CortexPart, CortexMessage } from "./message.js";
|
|
4
|
+
export { PART_REGISTRY, isTransient, isReconciling, isSidebarPart } from "./part-registry.js";
|
|
5
|
+
export type { CortexChatPartType, PartDescriptor, PartEmitter, PartConsumer } from "./part-registry.js";
|
|
6
|
+
export { AnalogyCoverageSchema, AnalogyReportSchema, AnalogyReportErrorSchema, AnalogicalReasonerOutputSchema } from "./analogy-report.js";
|
|
7
|
+
export type { AnalogyCoverage, AnalogyReport, AnalogyReportError, AnalogicalReasonerOutput } from "./analogy-report.js";
|
|
8
|
+
export { CoverageSchema, EntitySchema, SummarySchema, LiabilitySummarySchema, TractabilitySchema, IndicationsSchema, DrugInteractionsSchema, ClinicalDevelopmentSchema, SafetyProfileSchema, OffTissueRiskSchema, EvidenceConflictsSchema, EvidenceTimelineSchema, TranslationalChainSchema, AdditionalEvidenceSchema, DiscoveryTrialsSchema, DossierSchema, DossierSchemaV3Legacy, DossierV4Schema, DossierV5Schema, DossierV5BodySchema, ClinicalTrialAttributionV5Schema, ClinicalDevelopmentV5Schema, RegulatoryActionRowV5Schema, QualityGateStatusSchema, QualityGatesSchema, LiabilitySummaryV4Schema, ClinicalDevelopmentV4Schema, SafetyProfileV4Schema, OrganRiskRowV4Schema, ReferenceBiologyV4Shape, isDossier, dossierJsonSchema, SECTION_BLURBS, TargetAssessmentPhaseSchema, TargetAssessmentProgressEventSchema, } from "./target-dossier.js";
|
|
9
|
+
export type { Coverage, Entity, Summary, LiabilitySummary, TractabilitySection, EvidenceItem, Dossier, DossierV4, DossierV5, DossierV5Body, ClinicalTrialAttributionV5, ClinicalTrialRowV5, FailedTrialRowV5, TrialOutcomeRowV5, RegulatoryActionRowV5, QualityGateStatus, QualityGates, SectionBlurbKey, TargetAssessmentPhase, TargetAssessmentProgressEvent, } from "./target-dossier.js";
|
|
10
|
+
export { TargetAssessmentStatusSchema, TargetAssessmentErrorSchema, TargetAssessmentListRowSchema, TargetAssessmentRowSchema, } from "./target-assessment-row.js";
|
|
11
|
+
export type { TargetAssessmentStatus, TargetAssessmentError, TargetAssessmentListRow, TargetAssessmentRow } from "./target-assessment-row.js";
|
|
12
|
+
export { buildPreviewUrl, previewResourceId } from "./content-url.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { PART_REGISTRY, isTransient, isReconciling, isSidebarPart } from "./part-registry.js";
|
|
2
|
+
export { AnalogyCoverageSchema, AnalogyReportSchema, AnalogyReportErrorSchema, AnalogicalReasonerOutputSchema } from "./analogy-report.js";
|
|
3
|
+
export { CoverageSchema, EntitySchema, SummarySchema, LiabilitySummarySchema, TractabilitySchema, IndicationsSchema, DrugInteractionsSchema, ClinicalDevelopmentSchema, SafetyProfileSchema, OffTissueRiskSchema, EvidenceConflictsSchema, EvidenceTimelineSchema, TranslationalChainSchema, AdditionalEvidenceSchema, DiscoveryTrialsSchema, DossierSchema, DossierSchemaV3Legacy, DossierV4Schema, DossierV5Schema, DossierV5BodySchema, ClinicalTrialAttributionV5Schema, ClinicalDevelopmentV5Schema, RegulatoryActionRowV5Schema, QualityGateStatusSchema, QualityGatesSchema, LiabilitySummaryV4Schema, ClinicalDevelopmentV4Schema, SafetyProfileV4Schema, OrganRiskRowV4Schema, ReferenceBiologyV4Shape, isDossier, dossierJsonSchema, SECTION_BLURBS, TargetAssessmentPhaseSchema, TargetAssessmentProgressEventSchema, } from "./target-dossier.js";
|
|
4
|
+
export { TargetAssessmentStatusSchema, TargetAssessmentErrorSchema, TargetAssessmentListRowSchema, TargetAssessmentRowSchema, } from "./target-assessment-row.js";
|
|
5
|
+
export { buildPreviewUrl, previewResourceId } from "./content-url.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cortex-owned chat message types — the wire shape, the in-memory shape,
|
|
3
|
+
* and the public API for everything the chat path exchanges.
|
|
4
|
+
*
|
|
5
|
+
* No AI SDK types appear here or anywhere else in the package. The
|
|
6
|
+
* discriminant is `type`, so `switch (part.type) { case "data-report-preview": ... }`
|
|
7
|
+
* narrows the union member without any `as` cast.
|
|
8
|
+
*/
|
|
9
|
+
import type { CortexChatPart } from "./chat-parts.js";
|
|
10
|
+
/** A plain assistant/user text run. */
|
|
11
|
+
export interface TextPart {
|
|
12
|
+
type: "text";
|
|
13
|
+
text: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A tool call observed during the turn (or replayed from history).
|
|
17
|
+
*
|
|
18
|
+
* Live frames collapse a `tool-started`+`tool-finished` pair into a single
|
|
19
|
+
* part keyed by `toolCallId`. History-replayed calls always arrive with
|
|
20
|
+
* `status: "finished"`.
|
|
21
|
+
*/
|
|
22
|
+
export interface ToolCallPart {
|
|
23
|
+
type: "tool-call";
|
|
24
|
+
toolCallId: string;
|
|
25
|
+
toolName: string;
|
|
26
|
+
status: "started" | "finished";
|
|
27
|
+
isError?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** The discriminated union of every part the chat path can carry. */
|
|
30
|
+
export type CortexPart = TextPart | ToolCallPart | CortexChatPart;
|
|
31
|
+
/** A single chat message — user, assistant, or system. */
|
|
32
|
+
export interface CortexMessage {
|
|
33
|
+
id: string;
|
|
34
|
+
role: "user" | "assistant" | "system";
|
|
35
|
+
parts: CortexPart[];
|
|
36
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cortex-owned chat message types — the wire shape, the in-memory shape,
|
|
3
|
+
* and the public API for everything the chat path exchanges.
|
|
4
|
+
*
|
|
5
|
+
* No AI SDK types appear here or anywhere else in the package. The
|
|
6
|
+
* discriminant is `type`, so `switch (part.type) { case "data-report-preview": ... }`
|
|
7
|
+
* narrows the union member without any `as` cast.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CortexChatPart } from "./chat-parts.js";
|
|
2
|
+
export type CortexChatPartType = CortexChatPart["type"];
|
|
3
|
+
export type PartEmitter = "workflow" | "conversation";
|
|
4
|
+
export type PartConsumer = "sidebar" | "conversation";
|
|
5
|
+
export interface PartDescriptor {
|
|
6
|
+
/** Which layer emits this part. */
|
|
7
|
+
emitter: PartEmitter;
|
|
8
|
+
/** Which UI surface consumes this part. */
|
|
9
|
+
consumer: PartConsumer;
|
|
10
|
+
/** If true, only useful during live streaming — not accumulated in workflow state. */
|
|
11
|
+
transient: boolean;
|
|
12
|
+
/** If true, multiple emissions share the same id — latest wins. */
|
|
13
|
+
reconciling: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const PART_REGISTRY: Record<CortexChatPartType, PartDescriptor>;
|
|
16
|
+
export declare function isTransient(type: CortexChatPartType): boolean;
|
|
17
|
+
export declare function isReconciling(type: CortexChatPartType): boolean;
|
|
18
|
+
export declare function isSidebarPart(type: CortexChatPartType): boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const PART_REGISTRY = {
|
|
2
|
+
"data-presentation": { emitter: "conversation", consumer: "conversation", transient: false, reconciling: false },
|
|
3
|
+
"data-plan": { emitter: "conversation", consumer: "conversation", transient: false, reconciling: false },
|
|
4
|
+
"data-run-card": { emitter: "conversation", consumer: "conversation", transient: false, reconciling: false },
|
|
5
|
+
"data-file-reference": { emitter: "conversation", consumer: "conversation", transient: false, reconciling: false },
|
|
6
|
+
"data-run-started": { emitter: "workflow", consumer: "sidebar", transient: true, reconciling: false },
|
|
7
|
+
"data-dag-state": { emitter: "workflow", consumer: "sidebar", transient: false, reconciling: true },
|
|
8
|
+
"data-step-activity": { emitter: "workflow", consumer: "sidebar", transient: true, reconciling: true },
|
|
9
|
+
"data-step-file-tree": { emitter: "workflow", consumer: "sidebar", transient: true, reconciling: true },
|
|
10
|
+
"data-step-output": { emitter: "workflow", consumer: "sidebar", transient: false, reconciling: false },
|
|
11
|
+
"data-step-summary": { emitter: "workflow", consumer: "sidebar", transient: false, reconciling: false },
|
|
12
|
+
"data-step-blocked": { emitter: "workflow", consumer: "sidebar", transient: false, reconciling: false },
|
|
13
|
+
"data-run-synthesis": { emitter: "workflow", consumer: "sidebar", transient: false, reconciling: false },
|
|
14
|
+
"data-synthesis-progress": { emitter: "workflow", consumer: "sidebar", transient: false, reconciling: true },
|
|
15
|
+
"data-run-completed": { emitter: "workflow", consumer: "sidebar", transient: false, reconciling: false },
|
|
16
|
+
"data-run-failed": { emitter: "workflow", consumer: "sidebar", transient: false, reconciling: false },
|
|
17
|
+
"data-report-preview": { emitter: "conversation", consumer: "conversation", transient: false, reconciling: false },
|
|
18
|
+
"data-report-preview-failed": { emitter: "conversation", consumer: "conversation", transient: false, reconciling: false },
|
|
19
|
+
};
|
|
20
|
+
export function isTransient(type) {
|
|
21
|
+
return PART_REGISTRY[type].transient;
|
|
22
|
+
}
|
|
23
|
+
export function isReconciling(type) {
|
|
24
|
+
return PART_REGISTRY[type].reconciling;
|
|
25
|
+
}
|
|
26
|
+
export function isSidebarPart(type) {
|
|
27
|
+
return PART_REGISTRY[type].consumer === "sidebar";
|
|
28
|
+
}
|