@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,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical workspace path resolver — shared between the read surface and
|
|
3
|
+
* the sandbox-gated mutate surface.
|
|
4
|
+
*
|
|
5
|
+
* One module that maps agent-supplied paths to physical workspace-tree
|
|
6
|
+
* locations under the frame-aware path model (see the harness-workspace-tools spec):
|
|
7
|
+
*
|
|
8
|
+
* - A **relative** path resolves against the caller's `workingDir` (the
|
|
9
|
+
* agent's writable working directory; the analysis root when omitted, as
|
|
10
|
+
* for the conversation agent). Frame-local.
|
|
11
|
+
* - An **absolute `/{analysisId}/...`** path resolves against the analysis
|
|
12
|
+
* root regardless of `workingDir`. Frame-independent — the canonical
|
|
13
|
+
* interchange form for paths crossing an agent or frame boundary.
|
|
14
|
+
*
|
|
15
|
+
* The analysis root itself comes from the embedder through the
|
|
16
|
+
* {@link ResolveWorkspaceRoot} seam — the harness owns the layout *inside*
|
|
17
|
+
* the root, the embedder owns *where* the root lives. Host paths carry no
|
|
18
|
+
* `{resourceId}` segment (the resolved root already identifies the resource);
|
|
19
|
+
* the `/{resourceId}/…` form survives only as the container-side view, which
|
|
20
|
+
* bind mounts keep independent of the host location.
|
|
21
|
+
*
|
|
22
|
+
* Both surfaces share this resolver, so a file a step writes is read back at
|
|
23
|
+
* the identical path — agreement is structural, not re-implemented per tool.
|
|
24
|
+
* `resolveForWrite` adds confinement: a resolved path outside `workingDir`
|
|
25
|
+
* comes back `out_of_prefix` (the read surface skips that — it roams the tree
|
|
26
|
+
* read-only).
|
|
27
|
+
*/
|
|
28
|
+
import { relative as relativePath, resolve as resolvePath, sep } from "node:path";
|
|
29
|
+
/**
|
|
30
|
+
* Resolve an agent-supplied path against the analysis tree under the
|
|
31
|
+
* frame-aware model.
|
|
32
|
+
*
|
|
33
|
+
* - **Relative** (no leading slash) → resolved against `workingDir`
|
|
34
|
+
* (defaults to the analysis root). E.g. with `workingDir` =
|
|
35
|
+
* `…/runs/{runId}/{stepId}`, `"output/x.csv"` → that step's output dir.
|
|
36
|
+
* - **Absolute `/{analysisId}/...`** → resolved against the analysis root,
|
|
37
|
+
* ignoring `workingDir`. Frame-independent.
|
|
38
|
+
*
|
|
39
|
+
* The returned `relative` is always **analysis-root-relative** (used to build
|
|
40
|
+
* the in-sandbox `/{analysisId}/…` path). Returns `out_of_scope` for any input
|
|
41
|
+
* that escapes the resolved workspace root (`..` traversal, absolute host
|
|
42
|
+
* paths outside the tree, `/{otherAnalysisId}/...`).
|
|
43
|
+
*/
|
|
44
|
+
export function resolveWorkspacePath(args) {
|
|
45
|
+
const { workspaceRoot, analysisId, path } = args;
|
|
46
|
+
if (path.length === 0 || path.includes("\0"))
|
|
47
|
+
return { kind: "out_of_scope" };
|
|
48
|
+
const analysisRoot = resolvePath(workspaceRoot);
|
|
49
|
+
let absolute;
|
|
50
|
+
if (path.startsWith("/")) {
|
|
51
|
+
const stripped = stripAnalysisRoot(path, analysisId);
|
|
52
|
+
if (stripped === null)
|
|
53
|
+
return { kind: "out_of_scope" };
|
|
54
|
+
absolute = resolvePath(analysisRoot, stripped);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
const base = args.workingDir ?? analysisRoot;
|
|
58
|
+
absolute = resolvePath(base, path);
|
|
59
|
+
}
|
|
60
|
+
if (absolute !== analysisRoot && !absolute.startsWith(analysisRoot + sep)) {
|
|
61
|
+
return { kind: "out_of_scope" };
|
|
62
|
+
}
|
|
63
|
+
const relative = absolute === analysisRoot ? "" : absolute.slice(analysisRoot.length + 1);
|
|
64
|
+
return { kind: "ok", absolute, relative };
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Resolve a path for a write: same frame-aware resolution as
|
|
68
|
+
* `resolveWorkspacePath` (relative → `workingDir`, absolute → analysis root),
|
|
69
|
+
* then confine the result to `workingDir`. A `..` escape from the tree is
|
|
70
|
+
* `out_of_scope`; an in-tree path outside the working directory is
|
|
71
|
+
* `out_of_prefix`. A path equal to `workingDir` itself is in-prefix.
|
|
72
|
+
*
|
|
73
|
+
* `workingDir` is the absolute host path of the agent's writable working
|
|
74
|
+
* directory (for a plannable step, `stepWritePrefix(...)`).
|
|
75
|
+
*/
|
|
76
|
+
export function resolveForWrite(args) {
|
|
77
|
+
const resolved = resolveWorkspacePath(args);
|
|
78
|
+
if (resolved.kind === "out_of_scope")
|
|
79
|
+
return { kind: "out_of_scope" };
|
|
80
|
+
const prefix = resolvePath(args.workingDir);
|
|
81
|
+
if (resolved.absolute !== prefix && !resolved.absolute.startsWith(prefix + sep)) {
|
|
82
|
+
return { kind: "out_of_prefix" };
|
|
83
|
+
}
|
|
84
|
+
return { kind: "ok", absolute: resolved.absolute, relative: resolved.relative };
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Derive the canonical writable-prefix absolute path for a sandbox step.
|
|
88
|
+
* Single source of truth — the agent does NOT supply this; it is computed
|
|
89
|
+
* from the workspace root + run/step coordinates the workflow owns.
|
|
90
|
+
*/
|
|
91
|
+
export function stepWritePrefix(args) {
|
|
92
|
+
// `stepId` originates in an LLM-authored plan; validate before it becomes a
|
|
93
|
+
// host directory path (this prefix is the mkdir target and the docker bind
|
|
94
|
+
// source) so a crafted `..`/`/` segment cannot widen or escape the mount.
|
|
95
|
+
assertSafeId(args.runId, "runId");
|
|
96
|
+
assertSafeId(args.stepId, "stepId");
|
|
97
|
+
return resolvePath(args.workspaceRoot, "runs", args.runId, args.stepId);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Map a host-side absolute path within an analysis's workspace tree to its
|
|
101
|
+
* in-sandbox absolute path. The tree is bind-mounted at `/{resourceId}`, so
|
|
102
|
+
* the sandbox path is the resource id plus the root-relative tail — the host
|
|
103
|
+
* location of the root never leaks into the container. Single source of truth
|
|
104
|
+
* for the `execute_command` / `write_file` cwd and the `{{WORKING_DIR}}`
|
|
105
|
+
* prompt substitution (see the harness-workspace-tools spec).
|
|
106
|
+
*/
|
|
107
|
+
export function toSandboxPath(workspaceRoot, resourceId, hostAbsPath) {
|
|
108
|
+
const tail = relativePath(workspaceRoot, hostAbsPath).split(sep).join("/");
|
|
109
|
+
// A `..`-leading tail means `hostAbsPath` is not under `workspaceRoot`; every
|
|
110
|
+
// current caller passes an in-tree path (a step write prefix), so this is a
|
|
111
|
+
// guard against a future miswire producing `/{resourceId}/../…`, not a
|
|
112
|
+
// reachable case today.
|
|
113
|
+
if (tail === ".." || tail.startsWith("../")) {
|
|
114
|
+
throw new Error(`toSandboxPath: host path escapes the workspace root: ${hostAbsPath}`);
|
|
115
|
+
}
|
|
116
|
+
return tail === "" ? `/${resourceId}` : `/${resourceId}/${tail}`;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Parent of every preview, workspace-root-relative. Callers that enumerate
|
|
120
|
+
* previews join this; callers that address one join {@link previewDir}. Both
|
|
121
|
+
* spell the segment through this constant so the tree has one owner.
|
|
122
|
+
*/
|
|
123
|
+
export const PREVIEWS_ROOT = "previews";
|
|
124
|
+
/**
|
|
125
|
+
* Versioned preview directory, workspace-root-relative. Previews live inside
|
|
126
|
+
* the analysis tree (`previews/{previewId}/v{N}`); the content-token `res`
|
|
127
|
+
* claim keeps the separate `previews/{analysisId}/{previewId}` formula in
|
|
128
|
+
* `contracts/content-url.ts` — that is URL space, not a filesystem sub-path,
|
|
129
|
+
* and hosts that serve previews map one onto the other themselves.
|
|
130
|
+
*/
|
|
131
|
+
export function previewVersionDir(previewId, version) {
|
|
132
|
+
return `${previewDir(previewId)}/v${version}`;
|
|
133
|
+
}
|
|
134
|
+
/** Preview root for a specific preview (all versions), workspace-root-relative. */
|
|
135
|
+
export function previewDir(previewId) {
|
|
136
|
+
assertSafeId(previewId, "previewId");
|
|
137
|
+
return `${PREVIEWS_ROOT}/${previewId}`;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Find the highest version number from a list of version directory names.
|
|
141
|
+
* Expects names like "v1", "v2", etc. Returns 0 if no versions found.
|
|
142
|
+
*/
|
|
143
|
+
export function latestPreviewVersion(dirNames) {
|
|
144
|
+
let max = 0;
|
|
145
|
+
for (const name of dirNames) {
|
|
146
|
+
const match = name.match(/^v(\d+)$/);
|
|
147
|
+
if (match) {
|
|
148
|
+
const n = parseInt(match[1], 10);
|
|
149
|
+
if (n > max)
|
|
150
|
+
max = n;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return max;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* For an analysis-rooted input (`/{analysisId}/...`), strip the leading
|
|
157
|
+
* `/{analysisId}/` segment so it can be resolved relative to the analysis
|
|
158
|
+
* root. Returns `null` if the first segment does not match `analysisId` —
|
|
159
|
+
* paths under a different analysis or system paths like `/etc/passwd` are
|
|
160
|
+
* rejected here.
|
|
161
|
+
*/
|
|
162
|
+
function stripAnalysisRoot(path, analysisId) {
|
|
163
|
+
const withoutLead = path.slice(1);
|
|
164
|
+
const slashIdx = withoutLead.indexOf("/");
|
|
165
|
+
const firstSegment = slashIdx === -1 ? withoutLead : withoutLead.slice(0, slashIdx);
|
|
166
|
+
if (firstSegment !== analysisId)
|
|
167
|
+
return null;
|
|
168
|
+
return slashIdx === -1 ? "" : withoutLead.slice(slashIdx + 1);
|
|
169
|
+
}
|
|
170
|
+
const SAFE_ID = /^[\w.-]+$/;
|
|
171
|
+
/**
|
|
172
|
+
* True when `value` is a safe single path segment: the `SAFE_ID` charset (word
|
|
173
|
+
* chars, `.`, `-` — no slash, NUL, or shell-hostile char) AND not a pure-dot
|
|
174
|
+
* segment (`.`/`..`), which the charset otherwise admits and which `resolve`/`join`
|
|
175
|
+
* would treat as the current/parent directory and use to climb the tree. The one
|
|
176
|
+
* definition of "safe id", shared by the throwing {@link assertSafeId} at path
|
|
177
|
+
* builders and the plan validator (`validate-plan.ts`), so a stepId is judged the
|
|
178
|
+
* same at plan time and at mount time.
|
|
179
|
+
*/
|
|
180
|
+
export function isSafeId(value) {
|
|
181
|
+
return SAFE_ID.test(value) && value !== "." && value !== "..";
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Throwing form of {@link isSafeId} for the mount/host-path builders. Ids are
|
|
185
|
+
* harness-minted UUIDs on every trusted path, but `stepId` reaches these builders
|
|
186
|
+
* straight from an LLM-authored plan, so this is the boundary that keeps a crafted
|
|
187
|
+
* id from re-rooting a mount or a host write. Exported so the mount-plan builders
|
|
188
|
+
* (the container-path source of truth) validate the same way.
|
|
189
|
+
*/
|
|
190
|
+
export function assertSafeId(value, label) {
|
|
191
|
+
if (!isSafeId(value)) {
|
|
192
|
+
throw new Error(`Invalid ${label}: ${value}`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/** Root directory for a specific workflow run, workspace-root-relative. */
|
|
196
|
+
export function runDir(runId) {
|
|
197
|
+
assertSafeId(runId, "runId");
|
|
198
|
+
return `runs/${runId}`;
|
|
199
|
+
}
|
|
200
|
+
/** Step directory within a run, workspace-root-relative. */
|
|
201
|
+
export function runStepDir(runId, stepId) {
|
|
202
|
+
assertSafeId(runId, "runId");
|
|
203
|
+
assertSafeId(stepId, "stepId");
|
|
204
|
+
return `runs/${runId}/${stepId}`;
|
|
205
|
+
}
|
|
206
|
+
export function stepSubdir(stepBase, type) {
|
|
207
|
+
return `${stepBase}/${type}`;
|
|
208
|
+
}
|
|
209
|
+
/** Report output directory, workspace-root-relative. */
|
|
210
|
+
export function reportDir(reportId) {
|
|
211
|
+
assertSafeId(reportId, "reportId");
|
|
212
|
+
return `reports/${reportId}`;
|
|
213
|
+
}
|
|
214
|
+
/** All standard subdirectory types for a step. */
|
|
215
|
+
export const STEP_SUBDIRS = ["scripts", "output", "figures", "logs", "notebooks"];
|
|
216
|
+
/** Get all subdirectory paths for a step. */
|
|
217
|
+
export function allStepSubdirs(stepBase) {
|
|
218
|
+
return STEP_SUBDIRS.map((type) => stepSubdir(stepBase, type));
|
|
219
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provenance collector seam — the mutate surface records a SHA-256 content
|
|
3
|
+
* snapshot at each write. Construction-time dependency (see the harness-durable-runtime spec): the
|
|
4
|
+
* composition root builds a `ProvenanceCollector` and passes it to the
|
|
5
|
+
* mutate tool factories.
|
|
6
|
+
*
|
|
7
|
+
* Captured here are *harness-side* writes (`write_file`, `edit_file`). The
|
|
8
|
+
* harness does NOT hash in-sandbox writes produced by `execute_command`'s
|
|
9
|
+
* arbitrary commands — sandbox-server emits its own provenance frames per
|
|
10
|
+
* `sandbox-provenance-tracking` and artifact registration reconciles them.
|
|
11
|
+
*
|
|
12
|
+
* `recordSnapshot` is best-effort metadata: collector failures SHALL NOT
|
|
13
|
+
* fail the write. The mutate tools catch and log internally; this contract
|
|
14
|
+
* does not require the collector to be non-throwing.
|
|
15
|
+
*/
|
|
16
|
+
export interface ProvenanceSnapshot {
|
|
17
|
+
readonly analysisId: string;
|
|
18
|
+
readonly runId: string;
|
|
19
|
+
readonly stepId: string;
|
|
20
|
+
/**
|
|
21
|
+
* The resolved workspace path of the written file — the sandbox-visible
|
|
22
|
+
* path (e.g. `/{analysisId}/runs/{runId}/{stepId}/output/x.csv`), which is
|
|
23
|
+
* the same path the read surface uses.
|
|
24
|
+
*/
|
|
25
|
+
readonly path: string;
|
|
26
|
+
/** Lowercase hex SHA-256 of the *written* content (post-edit for edit_file). */
|
|
27
|
+
readonly sha256: string;
|
|
28
|
+
readonly bytes: number;
|
|
29
|
+
/** Unix milliseconds at the time of recording. */
|
|
30
|
+
readonly timestamp: number;
|
|
31
|
+
}
|
|
32
|
+
export interface ProvenanceCollector {
|
|
33
|
+
recordSnapshot(snapshot: ProvenanceSnapshot): Promise<void>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provenance collector seam — the mutate surface records a SHA-256 content
|
|
3
|
+
* snapshot at each write. Construction-time dependency (see the harness-durable-runtime spec): the
|
|
4
|
+
* composition root builds a `ProvenanceCollector` and passes it to the
|
|
5
|
+
* mutate tool factories.
|
|
6
|
+
*
|
|
7
|
+
* Captured here are *harness-side* writes (`write_file`, `edit_file`). The
|
|
8
|
+
* harness does NOT hash in-sandbox writes produced by `execute_command`'s
|
|
9
|
+
* arbitrary commands — sandbox-server emits its own provenance frames per
|
|
10
|
+
* `sandbox-provenance-tracking` and artifact registration reconciles them.
|
|
11
|
+
*
|
|
12
|
+
* `recordSnapshot` is best-effort metadata: collector failures SHALL NOT
|
|
13
|
+
* fail the write. The mutate tools catch and log internally; this contract
|
|
14
|
+
* does not require the collector to be non-throwing.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared search configuration — vector index naming and creation.
|
|
3
|
+
*
|
|
4
|
+
* Used by both write-time workspaces (sandbox, data-profile) and
|
|
5
|
+
* read-time workspaces (chat, workflow agents) so they share the
|
|
6
|
+
* same persistent per-analysis pgvector index.
|
|
7
|
+
*/
|
|
8
|
+
import type { Pool } from "pg";
|
|
9
|
+
/** Derive the vector index name for an analysis. */
|
|
10
|
+
export declare function searchIndexName(resourceId: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Ensure the per-analysis pgvector index exists and has an HNSW index
|
|
13
|
+
* attached. Idempotent across the process lifetime and across concurrent
|
|
14
|
+
* replicas (`CREATE … IF NOT EXISTS`).
|
|
15
|
+
*
|
|
16
|
+
* `dimensions` is the wired `EmbeddingProvider.dimensions` — the provider is
|
|
17
|
+
* the single source of the vector width, so indexes created here always match
|
|
18
|
+
* what the write-side embedder emits. A pre-existing index created at another
|
|
19
|
+
* width is left as-is (`IF NOT EXISTS`); the mismatch surfaces at the vector
|
|
20
|
+
* upsert. Per-analysis dimension tracking / re-embedding on a provider switch
|
|
21
|
+
* is a deliberate non-feature for now.
|
|
22
|
+
*/
|
|
23
|
+
export declare function ensureSearchIndex(pool: Pool, resourceId: string, dimensions: number): Promise<void>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared search configuration — vector index naming and creation.
|
|
3
|
+
*
|
|
4
|
+
* Used by both write-time workspaces (sandbox, data-profile) and
|
|
5
|
+
* read-time workspaces (chat, workflow agents) so they share the
|
|
6
|
+
* same persistent per-analysis pgvector index.
|
|
7
|
+
*/
|
|
8
|
+
import { createVectorStore } from "../state/vector-store.js";
|
|
9
|
+
import { unwrapOrThrow } from "../lib/result.js";
|
|
10
|
+
/** Derive the vector index name for an analysis. */
|
|
11
|
+
export function searchIndexName(resourceId) {
|
|
12
|
+
return `search_${resourceId.replace(/-/g, "_")}`;
|
|
13
|
+
}
|
|
14
|
+
const _ensuredIndexes = new Set();
|
|
15
|
+
/**
|
|
16
|
+
* Ensure the per-analysis pgvector index exists and has an HNSW index
|
|
17
|
+
* attached. Idempotent across the process lifetime and across concurrent
|
|
18
|
+
* replicas (`CREATE … IF NOT EXISTS`).
|
|
19
|
+
*
|
|
20
|
+
* `dimensions` is the wired `EmbeddingProvider.dimensions` — the provider is
|
|
21
|
+
* the single source of the vector width, so indexes created here always match
|
|
22
|
+
* what the write-side embedder emits. A pre-existing index created at another
|
|
23
|
+
* width is left as-is (`IF NOT EXISTS`); the mismatch surfaces at the vector
|
|
24
|
+
* upsert. Per-analysis dimension tracking / re-embedding on a provider switch
|
|
25
|
+
* is a deliberate non-feature for now.
|
|
26
|
+
*/
|
|
27
|
+
export async function ensureSearchIndex(pool, resourceId, dimensions) {
|
|
28
|
+
const name = searchIndexName(resourceId);
|
|
29
|
+
if (_ensuredIndexes.has(name))
|
|
30
|
+
return;
|
|
31
|
+
const store = createVectorStore(pool);
|
|
32
|
+
unwrapOrThrow(await store.createIndex({
|
|
33
|
+
indexName: name,
|
|
34
|
+
dimension: dimensions,
|
|
35
|
+
metric: "cosine",
|
|
36
|
+
}));
|
|
37
|
+
unwrapOrThrow(await store.buildIndex({
|
|
38
|
+
indexName: name,
|
|
39
|
+
metric: "cosine",
|
|
40
|
+
indexConfig: { type: "hnsw" },
|
|
41
|
+
}));
|
|
42
|
+
_ensuredIndexes.add(name);
|
|
43
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace paths — single source of truth for all agent-visible paths.
|
|
3
|
+
*
|
|
4
|
+
* Composes mount points (buildMountPaths()) with step subdirectory types
|
|
5
|
+
* (STEP_SUBDIRS) into the full paths that agents use in workspace tools.
|
|
6
|
+
*
|
|
7
|
+
* Import from here — not from mount-strategy or paths directly — when
|
|
8
|
+
* you need paths that agents will see.
|
|
9
|
+
*/
|
|
10
|
+
import { buildMountPaths } from "./mount-strategy.js";
|
|
11
|
+
import { STEP_SUBDIRS, type StepSubdirType } from "./paths.js";
|
|
12
|
+
export { buildMountPaths };
|
|
13
|
+
export { STEP_SUBDIRS, type StepSubdirType };
|
|
14
|
+
/**
|
|
15
|
+
* Build artifact subdirectory paths for a step using canonical mount paths.
|
|
16
|
+
* Agents see these paths in workspace tools and prompts.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildArtifactDirs(resourceId: string, runId: string, stepId: string): {
|
|
19
|
+
readonly OUTPUT: `/${string}/output`;
|
|
20
|
+
readonly SCRIPTS: `/${string}/scripts`;
|
|
21
|
+
readonly FIGURES: `/${string}/figures`;
|
|
22
|
+
readonly LOGS: `/${string}/logs`;
|
|
23
|
+
readonly NOTEBOOKS: `/${string}/notebooks`;
|
|
24
|
+
};
|
|
25
|
+
/** Resolved sessions base path. */
|
|
26
|
+
export declare function sessionsBasePath(sessionsBasePath: string): string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace paths — single source of truth for all agent-visible paths.
|
|
3
|
+
*
|
|
4
|
+
* Composes mount points (buildMountPaths()) with step subdirectory types
|
|
5
|
+
* (STEP_SUBDIRS) into the full paths that agents use in workspace tools.
|
|
6
|
+
*
|
|
7
|
+
* Import from here — not from mount-strategy or paths directly — when
|
|
8
|
+
* you need paths that agents will see.
|
|
9
|
+
*/
|
|
10
|
+
import { buildMountPaths } from "./mount-strategy.js";
|
|
11
|
+
import { STEP_SUBDIRS } from "./paths.js";
|
|
12
|
+
export { buildMountPaths };
|
|
13
|
+
export { STEP_SUBDIRS };
|
|
14
|
+
/**
|
|
15
|
+
* Build artifact subdirectory paths for a step using canonical mount paths.
|
|
16
|
+
* Agents see these paths in workspace tools and prompts.
|
|
17
|
+
*/
|
|
18
|
+
export function buildArtifactDirs(resourceId, runId, stepId) {
|
|
19
|
+
const mp = buildMountPaths(resourceId, runId, stepId);
|
|
20
|
+
return {
|
|
21
|
+
OUTPUT: `${mp.ARTIFACTS}/output`,
|
|
22
|
+
SCRIPTS: `${mp.ARTIFACTS}/scripts`,
|
|
23
|
+
FIGURES: `${mp.ARTIFACTS}/figures`,
|
|
24
|
+
LOGS: `${mp.ARTIFACTS}/logs`,
|
|
25
|
+
NOTEBOOKS: `${mp.ARTIFACTS}/notebooks`,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** Resolved sessions base path. */
|
|
29
|
+
export function sessionsBasePath(sessionsBasePath) {
|
|
30
|
+
return sessionsBasePath;
|
|
31
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@inflexa-ai/harness",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Host-agnostic bioinformatics agent harness — hand-rolled agent loop, DBOS-durable workflows, sandboxed compute.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./*.js": {
|
|
15
|
+
"types": "./dist/*.d.ts",
|
|
16
|
+
"import": "./dist/*.js"
|
|
17
|
+
},
|
|
18
|
+
"./*": {
|
|
19
|
+
"types": "./dist/*.d.ts",
|
|
20
|
+
"import": "./dist/*.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"NOTICE"
|
|
26
|
+
],
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=24"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/inflexa-ai/inflexa.git",
|
|
33
|
+
"directory": "harness"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsc -p tsconfig.json",
|
|
37
|
+
"format": "prettier --write src/",
|
|
38
|
+
"format:file": "prettier --write",
|
|
39
|
+
"lint": "eslint .",
|
|
40
|
+
"prepare": "tsc -p tsconfig.json",
|
|
41
|
+
"prepublishOnly": "bun run build && bun run smoke",
|
|
42
|
+
"smoke": "node scripts/smoke.mjs",
|
|
43
|
+
"typecheck": "tsc --noEmit"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@ai-sdk/anthropic": "^4.0.5",
|
|
47
|
+
"@ai-sdk/openai-compatible": "^3.0.3",
|
|
48
|
+
"@ai-sdk/provider": "^4.0.1",
|
|
49
|
+
"@anthropic-ai/sdk": "^0.107.0",
|
|
50
|
+
"@dbos-inc/dbos-sdk": "^4.23.0",
|
|
51
|
+
"@kubernetes/client-node": "^1.0.0",
|
|
52
|
+
"@opentelemetry/api": "^1.9.1",
|
|
53
|
+
"@opentelemetry/core": "^2.8.0",
|
|
54
|
+
"@opentelemetry/exporter-metrics-otlp-http": "^0.219.0",
|
|
55
|
+
"@opentelemetry/exporter-trace-otlp-proto": "^0.219.0",
|
|
56
|
+
"@opentelemetry/resources": "^2.8.0",
|
|
57
|
+
"@opentelemetry/sdk-metrics": "^2.8.0",
|
|
58
|
+
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
59
|
+
"@opentelemetry/sdk-trace-node": "^2.8.0",
|
|
60
|
+
"@opentelemetry/semantic-conventions": "^1.41.1",
|
|
61
|
+
"ai": "^7.0.11",
|
|
62
|
+
"cheerio": "^1.0.0",
|
|
63
|
+
"dockerode": "^4.0.0",
|
|
64
|
+
"fast-xml-parser": "^5.7.0",
|
|
65
|
+
"hono": "^4.0.0",
|
|
66
|
+
"js-tiktoken": "^1.0.0",
|
|
67
|
+
"mime": "^4.0.0",
|
|
68
|
+
"nanoid": "^5.0.0",
|
|
69
|
+
"neverthrow": "^8.2.0",
|
|
70
|
+
"nunjucks": "^3.2.4",
|
|
71
|
+
"openai": "^4.77.0",
|
|
72
|
+
"pdf-parse": "^2.4.0",
|
|
73
|
+
"pg": "^8.13.0",
|
|
74
|
+
"pino": "^10.3.1",
|
|
75
|
+
"puppeteer-core": "^23.0.0",
|
|
76
|
+
"zod": "^4.4.3"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@eslint/js": "^10.0.1",
|
|
80
|
+
"@types/bun": "latest",
|
|
81
|
+
"@types/dockerode": "^3.3.0",
|
|
82
|
+
"@types/node": "^24.0.0",
|
|
83
|
+
"@types/nunjucks": "^3.2.6",
|
|
84
|
+
"@types/pdf-parse": "^1.1.4",
|
|
85
|
+
"@types/pg": "^8.11.0",
|
|
86
|
+
"eslint": "^10.4.1",
|
|
87
|
+
"eslint-plugin-neverthrow": "^1.1.4",
|
|
88
|
+
"globals": "^17.6.0",
|
|
89
|
+
"prettier": "^3.8.1",
|
|
90
|
+
"testcontainers": "^10.0.0",
|
|
91
|
+
"typescript": "^6.0.3",
|
|
92
|
+
"typescript-eslint": "^8.61.0"
|
|
93
|
+
},
|
|
94
|
+
"publishConfig": {
|
|
95
|
+
"access": "public",
|
|
96
|
+
"registry": "https://registry.npmjs.org"
|
|
97
|
+
},
|
|
98
|
+
"patchedDependencies": {
|
|
99
|
+
"eslint-plugin-neverthrow@1.1.4": "patches/eslint-plugin-neverthrow@1.1.4.patch"
|
|
100
|
+
}
|
|
101
|
+
}
|