@inflexa-ai/harness 0.28.1 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/conversation-agent.js +7 -4
- package/dist/agents/report-session-agent.js +1 -1
- package/dist/agents/sandbox/data-profiler.js +0 -1
- package/dist/agents/sandbox/immune-profiling-agent.js +3 -1
- package/dist/agents/sandbox/network-agent.js +0 -1
- package/dist/agents/sandbox/types.d.ts +1 -1
- package/dist/agents/sandbox/types.js +1 -1
- package/dist/app/data-profile-orientation.d.ts +52 -27
- package/dist/app/data-profile-orientation.js +331 -92
- package/dist/app/data-profile-view.d.ts +70 -0
- package/dist/app/data-profile-view.js +123 -0
- package/dist/app/synthesize-run.js +1 -1
- package/dist/config/resource-limits.d.ts +1 -1
- package/dist/config/resource-limits.js +1 -1
- package/dist/contracts/data-profile.d.ts +276 -25
- package/dist/contracts/index.d.ts +3 -1
- package/dist/contracts/index.js +1 -0
- package/dist/contracts/profile-vocabulary.d.ts +103 -0
- package/dist/contracts/profile-vocabulary.js +449 -0
- package/dist/contracts/schemas/chat-parts.d.ts +12 -12
- package/dist/contracts/severity.d.ts +2 -2
- package/dist/contracts/target-dossier.d.ts +91 -91
- package/dist/data/safety-panel-schema.d.ts +4 -4
- package/dist/execution/input-signature.d.ts +16 -3
- package/dist/execution/input-signature.js +0 -0
- package/dist/execution/post-step-pipeline.js +1 -1
- package/dist/execution/staged-input.d.ts +4 -4
- package/dist/index.d.ts +7 -2
- package/dist/index.js +14 -0
- package/dist/input-scan/clustering.d.ts +63 -0
- package/dist/input-scan/clustering.js +208 -0
- package/dist/input-scan/companions.d.ts +30 -0
- package/dist/input-scan/companions.js +138 -0
- package/dist/input-scan/decoder/container_readout.py +171 -0
- package/dist/input-scan/detect-sets.d.ts +24 -0
- package/dist/input-scan/detect-sets.js +279 -0
- package/dist/input-scan/enrich.d.ts +62 -19
- package/dist/input-scan/enrich.js +132 -187
- package/dist/input-scan/formats.d.ts +13 -5
- package/dist/input-scan/formats.js +13 -5
- package/dist/input-scan/index.d.ts +10 -4
- package/dist/input-scan/index.js +7 -4
- package/dist/input-scan/markers.d.ts +21 -0
- package/dist/input-scan/markers.js +89 -0
- package/dist/input-scan/menu.d.ts +127 -0
- package/dist/input-scan/menu.js +0 -0
- package/dist/input-scan/quarantine.d.ts +17 -0
- package/dist/input-scan/quarantine.js +69 -0
- package/dist/input-scan/readout-budget.d.ts +32 -0
- package/dist/input-scan/readout-budget.js +61 -0
- package/dist/input-scan/readout.d.ts +33 -0
- package/dist/input-scan/readout.js +336 -0
- package/dist/input-scan/scan.d.ts +5 -4
- package/dist/input-scan/scan.js +5 -5
- package/dist/input-scan/set-types.d.ts +209 -0
- package/dist/input-scan/set-types.js +15 -0
- package/dist/input-scan/templates.d.ts +93 -0
- package/dist/input-scan/templates.js +369 -0
- package/dist/input-scan/tokens.d.ts +94 -0
- package/dist/input-scan/tokens.js +267 -0
- package/dist/input-scan/tuning.d.ts +55 -0
- package/dist/input-scan/tuning.js +55 -0
- package/dist/input-scan/types.d.ts +2 -2
- package/dist/loop/run-agent.d.ts +13 -1
- package/dist/loop/run-agent.js +2 -1
- package/dist/prompts/SOUL.d.ts +2 -2
- package/dist/prompts/SOUL.js +17 -1
- package/dist/prompts/conversation.d.ts +1 -1
- package/dist/prompts/conversation.js +45 -71
- package/dist/prompts/planner.js +57 -10
- package/dist/prompts/report-session.d.ts +1 -1
- package/dist/prompts/report-session.js +3 -2
- package/dist/prompts/sandbox/bulk-transcriptomics-agent.d.ts +1 -1
- package/dist/prompts/sandbox/bulk-transcriptomics-agent.js +3 -1
- package/dist/prompts/sandbox/data-profiler.d.ts +10 -1
- package/dist/prompts/sandbox/data-profiler.js +197 -53
- package/dist/prompts/sandbox/dna-methylation-agent.d.ts +1 -1
- package/dist/prompts/sandbox/dna-methylation-agent.js +18 -12
- package/dist/prompts/sandbox/immune-profiling-agent.d.ts +1 -1
- package/dist/prompts/sandbox/immune-profiling-agent.js +6 -2
- package/dist/prompts/sandbox/metabolomics-agent.d.ts +1 -1
- package/dist/prompts/sandbox/metabolomics-agent.js +8 -4
- package/dist/prompts/sandbox/microbiome-agent.d.ts +1 -1
- package/dist/prompts/sandbox/microbiome-agent.js +12 -6
- package/dist/prompts/sandbox/network-agent.d.ts +1 -1
- package/dist/prompts/sandbox/network-agent.js +9 -6
- package/dist/prompts/sandbox/spatial-omics-agent.d.ts +1 -1
- package/dist/prompts/sandbox/spatial-omics-agent.js +4 -2
- package/dist/prompts/sandbox-standards.d.ts +1 -1
- package/dist/prompts/sandbox-standards.js +10 -7
- package/dist/providers/ai-sdk.js +34 -1
- package/dist/providers/reasoning.d.ts +65 -0
- package/dist/providers/reasoning.js +81 -0
- package/dist/providers/types.d.ts +14 -0
- package/dist/schemas/data-profile-schemas.d.ts +947 -84
- package/dist/schemas/data-profile-schemas.js +300 -115
- package/dist/schemas/run-synthesis.d.ts +4 -4
- package/dist/state/data-profile.d.ts +1 -1
- package/dist/state/index.d.ts +1 -1
- package/dist/state/vector-store.d.ts +13 -0
- package/dist/state/vector-store.js +8 -0
- package/dist/tasks/data-profile-absorb.d.ts +78 -0
- package/dist/tasks/data-profile-absorb.js +285 -0
- package/dist/tasks/data-profile-index.d.ts +34 -25
- package/dist/tasks/data-profile-index.js +160 -59
- package/dist/tasks/data-profile-resolve.d.ts +72 -0
- package/dist/tasks/data-profile-resolve.js +639 -0
- package/dist/tasks/data-profile.d.ts +16 -5
- package/dist/tasks/data-profile.js +270 -131
- package/dist/tools/bio/chembl.d.ts +1 -1
- package/dist/tools/bio/chembl.js +15 -10
- package/dist/tools/bio/comptox.js +5 -1
- package/dist/tools/bio/drug-gene-interactions.js +5 -2
- package/dist/tools/bio/gene-disease-evidence.d.ts +19 -9
- package/dist/tools/bio/gene-disease-evidence.js +78 -22
- package/dist/tools/bio/gene-preclinical-profile.d.ts +33 -13
- package/dist/tools/bio/gene-preclinical-profile.js +63 -22
- package/dist/tools/bio/lookup-annotation.d.ts +1 -0
- package/dist/tools/bio/lookup-annotation.js +28 -10
- package/dist/tools/bio/opentargets.d.ts +10 -2
- package/dist/tools/bio/opentargets.js +42 -13
- package/dist/tools/bio/pubchem.js +5 -2
- package/dist/tools/bio/pubmed.js +9 -3
- package/dist/tools/bio/search-clinical-trials.d.ts +25 -25
- package/dist/tools/bio/search-clinical-trials.js +56 -18
- package/dist/tools/bio/search-faers.d.ts +26 -6
- package/dist/tools/bio/search-faers.js +70 -18
- package/dist/tools/bio/search-gene.d.ts +19 -3
- package/dist/tools/bio/search-gene.js +69 -12
- package/dist/tools/bio/search-geo-datasets.js +4 -1
- package/dist/tools/bio/search-interactions.js +6 -2
- package/dist/tools/bio/target-safety.d.ts +2 -2
- package/dist/tools/bio/target-safety.js +3 -2
- package/dist/tools/lib/cbioportal-client.js +25 -6
- package/dist/tools/lib/chembl-client.d.ts +3 -1
- package/dist/tools/lib/chembl-client.js +6 -1
- package/dist/tools/lib/gwas-catalog-client.d.ts +7 -6
- package/dist/tools/lib/gwas-catalog-client.js +18 -6
- package/dist/tools/lib/openfda-client.d.ts +7 -5
- package/dist/tools/lib/openfda-client.js +17 -9
- package/dist/tools/lib/opentargets-client.d.ts +20 -0
- package/dist/tools/lib/opentargets-client.js +45 -0
- package/dist/tools/lib/pathway-client.d.ts +7 -0
- package/dist/tools/lib/pathway-client.js +68 -1
- package/dist/tools/research/context7-docs.js +3 -3
- package/dist/tools/research/generate-analogy-report.js +2 -2
- package/dist/tools/research/generate-plan.d.ts +3 -0
- package/dist/tools/research/generate-plan.js +64 -5
- package/dist/tools/research/inspect-data-profile.d.ts +48 -22
- package/dist/tools/research/inspect-data-profile.js +73 -54
- package/dist/tools/research/resolve-citation.js +8 -3
- package/dist/tools/research/search-arxiv.js +8 -3
- package/dist/tools/research/search-semantic-scholar.js +10 -4
- package/dist/tools/workspace/scan-inputs.d.ts +4 -4
- package/dist/tools/workspace/scan-inputs.js +13 -14
- package/dist/tools/workspace/workspace-search.d.ts +11 -2
- package/dist/tools/workspace/workspace-search.js +44 -16
- package/dist/workflows/sandbox-step.d.ts +6 -0
- package/dist/workflows/sandbox-step.js +31 -14
- package/dist/workflows/target-assessment/assemblers/safety.d.ts +1 -1
- package/dist/workflows/target-assessment/phase4-assemble.d.ts +38 -38
- package/dist/workflows/target-assessment/schemas.d.ts +12 -12
- package/dist/workflows/target-assessment/steps/phase2-aggregate.d.ts +6 -6
- package/dist/workflows/target-assessment/steps/phase3-aggregate.d.ts +6 -6
- package/dist/workflows/target-assessment/synthesis/index.d.ts +12 -12
- package/package.json +5 -3
- package/dist/input-scan/coverage.d.ts +0 -22
- package/dist/input-scan/coverage.js +0 -85
|
@@ -611,9 +611,9 @@ export declare const ClinicalTrialRowSchema: z.ZodObject<{
|
|
|
611
611
|
start_date: z.ZodNullable<z.ZodString>;
|
|
612
612
|
completion_date: z.ZodNullable<z.ZodString>;
|
|
613
613
|
match_confidence: z.ZodEnum<{
|
|
614
|
-
high: "high";
|
|
615
|
-
medium: "medium";
|
|
616
614
|
low: "low";
|
|
615
|
+
medium: "medium";
|
|
616
|
+
high: "high";
|
|
617
617
|
off_target: "off_target";
|
|
618
618
|
}>;
|
|
619
619
|
attribution: z.ZodObject<{
|
|
@@ -821,9 +821,9 @@ export declare const ClinicalDevelopmentSchema: z.ZodObject<{
|
|
|
821
821
|
start_date: z.ZodNullable<z.ZodString>;
|
|
822
822
|
completion_date: z.ZodNullable<z.ZodString>;
|
|
823
823
|
match_confidence: z.ZodEnum<{
|
|
824
|
-
high: "high";
|
|
825
|
-
medium: "medium";
|
|
826
824
|
low: "low";
|
|
825
|
+
medium: "medium";
|
|
826
|
+
high: "high";
|
|
827
827
|
off_target: "off_target";
|
|
828
828
|
}>;
|
|
829
829
|
attribution: z.ZodObject<{
|
|
@@ -878,9 +878,9 @@ export declare const ClinicalDevelopmentSchema: z.ZodObject<{
|
|
|
878
878
|
start_date: z.ZodNullable<z.ZodString>;
|
|
879
879
|
completion_date: z.ZodNullable<z.ZodString>;
|
|
880
880
|
match_confidence: z.ZodEnum<{
|
|
881
|
-
high: "high";
|
|
882
|
-
medium: "medium";
|
|
883
881
|
low: "low";
|
|
882
|
+
medium: "medium";
|
|
883
|
+
high: "high";
|
|
884
884
|
off_target: "off_target";
|
|
885
885
|
}>;
|
|
886
886
|
attribution: z.ZodObject<{
|
|
@@ -1231,9 +1231,9 @@ export declare const OrganRiskRowSchema: z.ZodObject<{
|
|
|
1231
1231
|
oncology: "oncology";
|
|
1232
1232
|
}>;
|
|
1233
1233
|
risk_level: z.ZodEnum<{
|
|
1234
|
-
high: "high";
|
|
1235
|
-
medium: "medium";
|
|
1236
1234
|
low: "low";
|
|
1235
|
+
medium: "medium";
|
|
1236
|
+
high: "high";
|
|
1237
1237
|
}>;
|
|
1238
1238
|
signal_type_count: z.ZodNumber;
|
|
1239
1239
|
signals: z.ZodObject<{
|
|
@@ -1759,9 +1759,9 @@ export declare const SafetyFlagSchema: z.ZodObject<{
|
|
|
1759
1759
|
trail: z.ZodString;
|
|
1760
1760
|
mechanism_hypothesis: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1761
1761
|
severity: z.ZodEnum<{
|
|
1762
|
-
high: "high";
|
|
1763
|
-
medium: "medium";
|
|
1764
1762
|
low: "low";
|
|
1763
|
+
medium: "medium";
|
|
1764
|
+
high: "high";
|
|
1765
1765
|
}>;
|
|
1766
1766
|
support: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1767
1767
|
state: z.ZodLiteral<"scored">;
|
|
@@ -2008,9 +2008,9 @@ export declare const SafetyProfileSchema: z.ZodObject<{
|
|
|
2008
2008
|
oncology: "oncology";
|
|
2009
2009
|
}>;
|
|
2010
2010
|
risk_level: z.ZodEnum<{
|
|
2011
|
-
high: "high";
|
|
2012
|
-
medium: "medium";
|
|
2013
2011
|
low: "low";
|
|
2012
|
+
medium: "medium";
|
|
2013
|
+
high: "high";
|
|
2014
2014
|
}>;
|
|
2015
2015
|
signal_type_count: z.ZodNumber;
|
|
2016
2016
|
signals: z.ZodObject<{
|
|
@@ -2562,9 +2562,9 @@ export declare const SafetyProfileSchema: z.ZodObject<{
|
|
|
2562
2562
|
trail: z.ZodString;
|
|
2563
2563
|
mechanism_hypothesis: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2564
2564
|
severity: z.ZodEnum<{
|
|
2565
|
-
high: "high";
|
|
2566
|
-
medium: "medium";
|
|
2567
2565
|
low: "low";
|
|
2566
|
+
medium: "medium";
|
|
2567
|
+
high: "high";
|
|
2568
2568
|
}>;
|
|
2569
2569
|
support: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2570
2570
|
state: z.ZodLiteral<"scored">;
|
|
@@ -4112,11 +4112,11 @@ export declare const ExpressionHeatmapCellSchema: z.ZodObject<{
|
|
|
4112
4112
|
dog: "dog";
|
|
4113
4113
|
}>;
|
|
4114
4114
|
rank: z.ZodEnum<{
|
|
4115
|
+
low: "low";
|
|
4116
|
+
medium: "medium";
|
|
4117
|
+
high: "high";
|
|
4115
4118
|
no_data: "no_data";
|
|
4116
4119
|
absent: "absent";
|
|
4117
|
-
high: "high";
|
|
4118
|
-
medium: "medium";
|
|
4119
|
-
low: "low";
|
|
4120
4120
|
not_loaded: "not_loaded";
|
|
4121
4121
|
}>;
|
|
4122
4122
|
}, z.core.$strip>;
|
|
@@ -4131,11 +4131,11 @@ export declare const ExpressionHeatmapSchema: z.ZodObject<{
|
|
|
4131
4131
|
dog: "dog";
|
|
4132
4132
|
}>;
|
|
4133
4133
|
rank: z.ZodEnum<{
|
|
4134
|
+
low: "low";
|
|
4135
|
+
medium: "medium";
|
|
4136
|
+
high: "high";
|
|
4134
4137
|
no_data: "no_data";
|
|
4135
4138
|
absent: "absent";
|
|
4136
|
-
high: "high";
|
|
4137
|
-
medium: "medium";
|
|
4138
|
-
low: "low";
|
|
4139
4139
|
not_loaded: "not_loaded";
|
|
4140
4140
|
}>;
|
|
4141
4141
|
}, z.core.$strip>>;
|
|
@@ -4267,11 +4267,11 @@ export declare const PreclinicalProfileSchema: z.ZodObject<{
|
|
|
4267
4267
|
dog: "dog";
|
|
4268
4268
|
}>;
|
|
4269
4269
|
rank: z.ZodEnum<{
|
|
4270
|
+
low: "low";
|
|
4271
|
+
medium: "medium";
|
|
4272
|
+
high: "high";
|
|
4270
4273
|
no_data: "no_data";
|
|
4271
4274
|
absent: "absent";
|
|
4272
|
-
high: "high";
|
|
4273
|
-
medium: "medium";
|
|
4274
|
-
low: "low";
|
|
4275
4275
|
not_loaded: "not_loaded";
|
|
4276
4276
|
}>;
|
|
4277
4277
|
}, z.core.$strip>>;
|
|
@@ -4631,9 +4631,9 @@ export declare const DiscoveryTrialRowSchema: z.ZodObject<{
|
|
|
4631
4631
|
start_date: z.ZodOptional<z.ZodString>;
|
|
4632
4632
|
completion_date: z.ZodOptional<z.ZodString>;
|
|
4633
4633
|
match_confidence: z.ZodEnum<{
|
|
4634
|
-
high: "high";
|
|
4635
|
-
medium: "medium";
|
|
4636
4634
|
low: "low";
|
|
4635
|
+
medium: "medium";
|
|
4636
|
+
high: "high";
|
|
4637
4637
|
}>;
|
|
4638
4638
|
relevance_basis: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4639
4639
|
kind: z.ZodLiteral<"drug_in_class_match">;
|
|
@@ -4703,9 +4703,9 @@ export declare const DiscoveryTrialsSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
4703
4703
|
start_date: z.ZodOptional<z.ZodString>;
|
|
4704
4704
|
completion_date: z.ZodOptional<z.ZodString>;
|
|
4705
4705
|
match_confidence: z.ZodEnum<{
|
|
4706
|
-
high: "high";
|
|
4707
|
-
medium: "medium";
|
|
4708
4706
|
low: "low";
|
|
4707
|
+
medium: "medium";
|
|
4708
|
+
high: "high";
|
|
4709
4709
|
}>;
|
|
4710
4710
|
relevance_basis: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4711
4711
|
kind: z.ZodLiteral<"drug_in_class_match">;
|
|
@@ -4772,9 +4772,9 @@ export declare const DiscoveryTrialsSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
4772
4772
|
start_date: z.ZodOptional<z.ZodString>;
|
|
4773
4773
|
completion_date: z.ZodOptional<z.ZodString>;
|
|
4774
4774
|
match_confidence: z.ZodEnum<{
|
|
4775
|
-
high: "high";
|
|
4776
|
-
medium: "medium";
|
|
4777
4775
|
low: "low";
|
|
4776
|
+
medium: "medium";
|
|
4777
|
+
high: "high";
|
|
4778
4778
|
}>;
|
|
4779
4779
|
relevance_basis: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4780
4780
|
kind: z.ZodLiteral<"drug_in_class_match">;
|
|
@@ -4861,9 +4861,9 @@ export declare const ExecutiveRecommendationDataSchema: z.ZodObject<{
|
|
|
4861
4861
|
insufficient_evidence: "insufficient_evidence";
|
|
4862
4862
|
}>;
|
|
4863
4863
|
confidence: z.ZodEnum<{
|
|
4864
|
-
high: "high";
|
|
4865
|
-
medium: "medium";
|
|
4866
4864
|
low: "low";
|
|
4865
|
+
medium: "medium";
|
|
4866
|
+
high: "high";
|
|
4867
4867
|
}>;
|
|
4868
4868
|
rationale: z.ZodString;
|
|
4869
4869
|
key_strengths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -4899,9 +4899,9 @@ export declare const ExecutiveRecommendationSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
4899
4899
|
insufficient_evidence: "insufficient_evidence";
|
|
4900
4900
|
}>;
|
|
4901
4901
|
confidence: z.ZodEnum<{
|
|
4902
|
-
high: "high";
|
|
4903
|
-
medium: "medium";
|
|
4904
4902
|
low: "low";
|
|
4903
|
+
medium: "medium";
|
|
4904
|
+
high: "high";
|
|
4905
4905
|
}>;
|
|
4906
4906
|
rationale: z.ZodString;
|
|
4907
4907
|
key_strengths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -5713,11 +5713,11 @@ export declare const ReferenceBiologyShape: z.ZodObject<{
|
|
|
5713
5713
|
dog: "dog";
|
|
5714
5714
|
}>;
|
|
5715
5715
|
rank: z.ZodEnum<{
|
|
5716
|
+
low: "low";
|
|
5717
|
+
medium: "medium";
|
|
5718
|
+
high: "high";
|
|
5716
5719
|
no_data: "no_data";
|
|
5717
5720
|
absent: "absent";
|
|
5718
|
-
high: "high";
|
|
5719
|
-
medium: "medium";
|
|
5720
|
-
low: "low";
|
|
5721
5721
|
not_loaded: "not_loaded";
|
|
5722
5722
|
}>;
|
|
5723
5723
|
}, z.core.$strip>>;
|
|
@@ -6231,9 +6231,9 @@ export declare const DossierSchema: z.ZodObject<{
|
|
|
6231
6231
|
start_date: z.ZodNullable<z.ZodString>;
|
|
6232
6232
|
completion_date: z.ZodNullable<z.ZodString>;
|
|
6233
6233
|
match_confidence: z.ZodEnum<{
|
|
6234
|
-
high: "high";
|
|
6235
|
-
medium: "medium";
|
|
6236
6234
|
low: "low";
|
|
6235
|
+
medium: "medium";
|
|
6236
|
+
high: "high";
|
|
6237
6237
|
off_target: "off_target";
|
|
6238
6238
|
}>;
|
|
6239
6239
|
attribution: z.ZodObject<{
|
|
@@ -6288,9 +6288,9 @@ export declare const DossierSchema: z.ZodObject<{
|
|
|
6288
6288
|
start_date: z.ZodNullable<z.ZodString>;
|
|
6289
6289
|
completion_date: z.ZodNullable<z.ZodString>;
|
|
6290
6290
|
match_confidence: z.ZodEnum<{
|
|
6291
|
-
high: "high";
|
|
6292
|
-
medium: "medium";
|
|
6293
6291
|
low: "low";
|
|
6292
|
+
medium: "medium";
|
|
6293
|
+
high: "high";
|
|
6294
6294
|
off_target: "off_target";
|
|
6295
6295
|
}>;
|
|
6296
6296
|
attribution: z.ZodObject<{
|
|
@@ -6644,9 +6644,9 @@ export declare const DossierSchema: z.ZodObject<{
|
|
|
6644
6644
|
oncology: "oncology";
|
|
6645
6645
|
}>;
|
|
6646
6646
|
risk_level: z.ZodEnum<{
|
|
6647
|
-
high: "high";
|
|
6648
|
-
medium: "medium";
|
|
6649
6647
|
low: "low";
|
|
6648
|
+
medium: "medium";
|
|
6649
|
+
high: "high";
|
|
6650
6650
|
}>;
|
|
6651
6651
|
signal_type_count: z.ZodNumber;
|
|
6652
6652
|
signals: z.ZodObject<{
|
|
@@ -7198,9 +7198,9 @@ export declare const DossierSchema: z.ZodObject<{
|
|
|
7198
7198
|
trail: z.ZodString;
|
|
7199
7199
|
mechanism_hypothesis: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7200
7200
|
severity: z.ZodEnum<{
|
|
7201
|
-
high: "high";
|
|
7202
|
-
medium: "medium";
|
|
7203
7201
|
low: "low";
|
|
7202
|
+
medium: "medium";
|
|
7203
|
+
high: "high";
|
|
7204
7204
|
}>;
|
|
7205
7205
|
support: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7206
7206
|
state: z.ZodLiteral<"scored">;
|
|
@@ -8417,11 +8417,11 @@ export declare const DossierSchema: z.ZodObject<{
|
|
|
8417
8417
|
dog: "dog";
|
|
8418
8418
|
}>;
|
|
8419
8419
|
rank: z.ZodEnum<{
|
|
8420
|
+
low: "low";
|
|
8421
|
+
medium: "medium";
|
|
8422
|
+
high: "high";
|
|
8420
8423
|
no_data: "no_data";
|
|
8421
8424
|
absent: "absent";
|
|
8422
|
-
high: "high";
|
|
8423
|
-
medium: "medium";
|
|
8424
|
-
low: "low";
|
|
8425
8425
|
not_loaded: "not_loaded";
|
|
8426
8426
|
}>;
|
|
8427
8427
|
}, z.core.$strip>>;
|
|
@@ -8755,9 +8755,9 @@ export declare const DossierSchema: z.ZodObject<{
|
|
|
8755
8755
|
start_date: z.ZodOptional<z.ZodString>;
|
|
8756
8756
|
completion_date: z.ZodOptional<z.ZodString>;
|
|
8757
8757
|
match_confidence: z.ZodEnum<{
|
|
8758
|
-
high: "high";
|
|
8759
|
-
medium: "medium";
|
|
8760
8758
|
low: "low";
|
|
8759
|
+
medium: "medium";
|
|
8760
|
+
high: "high";
|
|
8761
8761
|
}>;
|
|
8762
8762
|
relevance_basis: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8763
8763
|
kind: z.ZodLiteral<"drug_in_class_match">;
|
|
@@ -8824,9 +8824,9 @@ export declare const DossierSchema: z.ZodObject<{
|
|
|
8824
8824
|
start_date: z.ZodOptional<z.ZodString>;
|
|
8825
8825
|
completion_date: z.ZodOptional<z.ZodString>;
|
|
8826
8826
|
match_confidence: z.ZodEnum<{
|
|
8827
|
-
high: "high";
|
|
8828
|
-
medium: "medium";
|
|
8829
8827
|
low: "low";
|
|
8828
|
+
medium: "medium";
|
|
8829
|
+
high: "high";
|
|
8830
8830
|
}>;
|
|
8831
8831
|
relevance_basis: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8832
8832
|
kind: z.ZodLiteral<"drug_in_class_match">;
|
|
@@ -9077,9 +9077,9 @@ export declare const DossierSchema: z.ZodObject<{
|
|
|
9077
9077
|
insufficient_evidence: "insufficient_evidence";
|
|
9078
9078
|
}>;
|
|
9079
9079
|
confidence: z.ZodEnum<{
|
|
9080
|
-
high: "high";
|
|
9081
|
-
medium: "medium";
|
|
9082
9080
|
low: "low";
|
|
9081
|
+
medium: "medium";
|
|
9082
|
+
high: "high";
|
|
9083
9083
|
}>;
|
|
9084
9084
|
rationale: z.ZodString;
|
|
9085
9085
|
key_strengths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -9342,6 +9342,27 @@ export declare const DossierBodySchema: z.ZodObject<{
|
|
|
9342
9342
|
coverage: z.ZodLiteral<"not_loaded">;
|
|
9343
9343
|
reason: z.ZodOptional<z.ZodString>;
|
|
9344
9344
|
}, z.core.$strip>], "coverage">;
|
|
9345
|
+
entity: z.ZodObject<{
|
|
9346
|
+
canonicalId: z.ZodString;
|
|
9347
|
+
symbol: z.ZodString;
|
|
9348
|
+
displayName: z.ZodString;
|
|
9349
|
+
entityType: z.ZodEnum<{
|
|
9350
|
+
gene: "gene";
|
|
9351
|
+
rna: "rna";
|
|
9352
|
+
protein: "protein";
|
|
9353
|
+
complex: "complex";
|
|
9354
|
+
}>;
|
|
9355
|
+
ontology: z.ZodString;
|
|
9356
|
+
identifiers: z.ZodObject<{
|
|
9357
|
+
hgnc: z.ZodOptional<z.ZodString>;
|
|
9358
|
+
ensembl: z.ZodOptional<z.ZodString>;
|
|
9359
|
+
uniprot: z.ZodOptional<z.ZodString>;
|
|
9360
|
+
chembl: z.ZodOptional<z.ZodString>;
|
|
9361
|
+
ncbiGene: z.ZodOptional<z.ZodString>;
|
|
9362
|
+
}, z.core.$strip>;
|
|
9363
|
+
synonyms: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
9364
|
+
proteinFamily: z.ZodOptional<z.ZodString>;
|
|
9365
|
+
}, z.core.$strip>;
|
|
9345
9366
|
off_target_panel: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9346
9367
|
coverage: z.ZodLiteral<"available">;
|
|
9347
9368
|
data: z.ZodObject<{
|
|
@@ -9565,27 +9586,6 @@ export declare const DossierBodySchema: z.ZodObject<{
|
|
|
9565
9586
|
inferred_therapeutic_area: z.ZodNullable<z.ZodString>;
|
|
9566
9587
|
no_liabilities_disclosure: z.ZodOptional<z.ZodString>;
|
|
9567
9588
|
}, z.core.$strict>;
|
|
9568
|
-
entity: z.ZodObject<{
|
|
9569
|
-
canonicalId: z.ZodString;
|
|
9570
|
-
symbol: z.ZodString;
|
|
9571
|
-
displayName: z.ZodString;
|
|
9572
|
-
entityType: z.ZodEnum<{
|
|
9573
|
-
gene: "gene";
|
|
9574
|
-
rna: "rna";
|
|
9575
|
-
protein: "protein";
|
|
9576
|
-
complex: "complex";
|
|
9577
|
-
}>;
|
|
9578
|
-
ontology: z.ZodString;
|
|
9579
|
-
identifiers: z.ZodObject<{
|
|
9580
|
-
hgnc: z.ZodOptional<z.ZodString>;
|
|
9581
|
-
ensembl: z.ZodOptional<z.ZodString>;
|
|
9582
|
-
uniprot: z.ZodOptional<z.ZodString>;
|
|
9583
|
-
chembl: z.ZodOptional<z.ZodString>;
|
|
9584
|
-
ncbiGene: z.ZodOptional<z.ZodString>;
|
|
9585
|
-
}, z.core.$strip>;
|
|
9586
|
-
synonyms: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
9587
|
-
proteinFamily: z.ZodOptional<z.ZodString>;
|
|
9588
|
-
}, z.core.$strip>;
|
|
9589
9589
|
indications: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9590
9590
|
coverage: z.ZodLiteral<"available">;
|
|
9591
9591
|
data: z.ZodObject<{
|
|
@@ -9660,9 +9660,9 @@ export declare const DossierBodySchema: z.ZodObject<{
|
|
|
9660
9660
|
start_date: z.ZodNullable<z.ZodString>;
|
|
9661
9661
|
completion_date: z.ZodNullable<z.ZodString>;
|
|
9662
9662
|
match_confidence: z.ZodEnum<{
|
|
9663
|
-
high: "high";
|
|
9664
|
-
medium: "medium";
|
|
9665
9663
|
low: "low";
|
|
9664
|
+
medium: "medium";
|
|
9665
|
+
high: "high";
|
|
9666
9666
|
off_target: "off_target";
|
|
9667
9667
|
}>;
|
|
9668
9668
|
attribution: z.ZodObject<{
|
|
@@ -9717,9 +9717,9 @@ export declare const DossierBodySchema: z.ZodObject<{
|
|
|
9717
9717
|
start_date: z.ZodNullable<z.ZodString>;
|
|
9718
9718
|
completion_date: z.ZodNullable<z.ZodString>;
|
|
9719
9719
|
match_confidence: z.ZodEnum<{
|
|
9720
|
-
high: "high";
|
|
9721
|
-
medium: "medium";
|
|
9722
9720
|
low: "low";
|
|
9721
|
+
medium: "medium";
|
|
9722
|
+
high: "high";
|
|
9723
9723
|
off_target: "off_target";
|
|
9724
9724
|
}>;
|
|
9725
9725
|
attribution: z.ZodObject<{
|
|
@@ -10073,9 +10073,9 @@ export declare const DossierBodySchema: z.ZodObject<{
|
|
|
10073
10073
|
oncology: "oncology";
|
|
10074
10074
|
}>;
|
|
10075
10075
|
risk_level: z.ZodEnum<{
|
|
10076
|
-
high: "high";
|
|
10077
|
-
medium: "medium";
|
|
10078
10076
|
low: "low";
|
|
10077
|
+
medium: "medium";
|
|
10078
|
+
high: "high";
|
|
10079
10079
|
}>;
|
|
10080
10080
|
signal_type_count: z.ZodNumber;
|
|
10081
10081
|
signals: z.ZodObject<{
|
|
@@ -10627,9 +10627,9 @@ export declare const DossierBodySchema: z.ZodObject<{
|
|
|
10627
10627
|
trail: z.ZodString;
|
|
10628
10628
|
mechanism_hypothesis: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10629
10629
|
severity: z.ZodEnum<{
|
|
10630
|
-
high: "high";
|
|
10631
|
-
medium: "medium";
|
|
10632
10630
|
low: "low";
|
|
10631
|
+
medium: "medium";
|
|
10632
|
+
high: "high";
|
|
10633
10633
|
}>;
|
|
10634
10634
|
support: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
10635
10635
|
state: z.ZodLiteral<"scored">;
|
|
@@ -11680,11 +11680,11 @@ export declare const DossierBodySchema: z.ZodObject<{
|
|
|
11680
11680
|
dog: "dog";
|
|
11681
11681
|
}>;
|
|
11682
11682
|
rank: z.ZodEnum<{
|
|
11683
|
+
low: "low";
|
|
11684
|
+
medium: "medium";
|
|
11685
|
+
high: "high";
|
|
11683
11686
|
no_data: "no_data";
|
|
11684
11687
|
absent: "absent";
|
|
11685
|
-
high: "high";
|
|
11686
|
-
medium: "medium";
|
|
11687
|
-
low: "low";
|
|
11688
11688
|
not_loaded: "not_loaded";
|
|
11689
11689
|
}>;
|
|
11690
11690
|
}, z.core.$strip>>;
|
|
@@ -12018,9 +12018,9 @@ export declare const DossierBodySchema: z.ZodObject<{
|
|
|
12018
12018
|
start_date: z.ZodOptional<z.ZodString>;
|
|
12019
12019
|
completion_date: z.ZodOptional<z.ZodString>;
|
|
12020
12020
|
match_confidence: z.ZodEnum<{
|
|
12021
|
-
high: "high";
|
|
12022
|
-
medium: "medium";
|
|
12023
12021
|
low: "low";
|
|
12022
|
+
medium: "medium";
|
|
12023
|
+
high: "high";
|
|
12024
12024
|
}>;
|
|
12025
12025
|
relevance_basis: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12026
12026
|
kind: z.ZodLiteral<"drug_in_class_match">;
|
|
@@ -12087,9 +12087,9 @@ export declare const DossierBodySchema: z.ZodObject<{
|
|
|
12087
12087
|
start_date: z.ZodOptional<z.ZodString>;
|
|
12088
12088
|
completion_date: z.ZodOptional<z.ZodString>;
|
|
12089
12089
|
match_confidence: z.ZodEnum<{
|
|
12090
|
-
high: "high";
|
|
12091
|
-
medium: "medium";
|
|
12092
12090
|
low: "low";
|
|
12091
|
+
medium: "medium";
|
|
12092
|
+
high: "high";
|
|
12093
12093
|
}>;
|
|
12094
12094
|
relevance_basis: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12095
12095
|
kind: z.ZodLiteral<"drug_in_class_match">;
|
|
@@ -12340,9 +12340,9 @@ export declare const DossierBodySchema: z.ZodObject<{
|
|
|
12340
12340
|
insufficient_evidence: "insufficient_evidence";
|
|
12341
12341
|
}>;
|
|
12342
12342
|
confidence: z.ZodEnum<{
|
|
12343
|
-
high: "high";
|
|
12344
|
-
medium: "medium";
|
|
12345
12343
|
low: "low";
|
|
12344
|
+
medium: "medium";
|
|
12345
|
+
high: "high";
|
|
12346
12346
|
}>;
|
|
12347
12347
|
rationale: z.ZodString;
|
|
12348
12348
|
key_strengths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -29,9 +29,9 @@ export declare const SafetyTargetSchema: z.ZodObject<{
|
|
|
29
29
|
}>;
|
|
30
30
|
clinical_consequence: z.ZodString;
|
|
31
31
|
severity: z.ZodEnum<{
|
|
32
|
-
high: "high";
|
|
33
|
-
medium: "medium";
|
|
34
32
|
low: "low";
|
|
33
|
+
medium: "medium";
|
|
34
|
+
high: "high";
|
|
35
35
|
}>;
|
|
36
36
|
references: z.ZodArray<z.ZodString>;
|
|
37
37
|
}, z.core.$strip>;
|
|
@@ -68,9 +68,9 @@ export declare const SafetyPanelFileSchema: z.ZodObject<{
|
|
|
68
68
|
}>;
|
|
69
69
|
clinical_consequence: z.ZodString;
|
|
70
70
|
severity: z.ZodEnum<{
|
|
71
|
-
high: "high";
|
|
72
|
-
medium: "medium";
|
|
73
71
|
low: "low";
|
|
72
|
+
medium: "medium";
|
|
73
|
+
high: "high";
|
|
74
74
|
}>;
|
|
75
75
|
references: z.ZodArray<z.ZodString>;
|
|
76
76
|
}, z.core.$strip>>;
|
|
@@ -2,14 +2,21 @@
|
|
|
2
2
|
* The input signature — the fixed-width comparand a completed profile persists in
|
|
3
3
|
* place of a per-file identity list.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* several thousand identifiers
|
|
5
|
+
* A per-file identity list would have exactly one consumer, the staleness comparison —
|
|
6
|
+
* several thousand identifiers persisted, detoasted on every read of the row, and
|
|
7
7
|
* compared element-wise to answer a question 40 bytes answer. The signature covers
|
|
8
8
|
* `size` and `mtimeMs` as well, so it also notices that the bytes behind a path
|
|
9
9
|
* changed — a `fileId` is a path identity and survives an in-place edit unchanged.
|
|
10
10
|
*
|
|
11
11
|
* Order independence is a property of the digest, not of the caller: entries are
|
|
12
12
|
* sorted canonically before hashing, so two enumerations of the same set agree.
|
|
13
|
+
*
|
|
14
|
+
* It digests KEPT files only — quarantine runs before the digest, on both sides of the
|
|
15
|
+
* comparison. A partial-download twin or an OS droppings file was never part of what was
|
|
16
|
+
* profiled, so its appearance, edit, or removal is not drift, and a profile that
|
|
17
|
+
* re-triggered on it would re-run on churn nobody caused. A change to the quarantine rules
|
|
18
|
+
* themselves recomputes every signature once on the next scan, which is the correct
|
|
19
|
+
* consequence: the definition of "kept" changed.
|
|
13
20
|
*/
|
|
14
21
|
import type { DataProfileInputSignature } from "../state/data-profile.js";
|
|
15
22
|
import type { StagedInput } from "./staged-input.js";
|
|
@@ -18,9 +25,15 @@ export interface SignableInput {
|
|
|
18
25
|
readonly fileId: string;
|
|
19
26
|
readonly size: number;
|
|
20
27
|
readonly mtimeMs?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Path relative to the data dir — what quarantine reads. An entry carrying none is
|
|
30
|
+
* always kept: a caller that cannot name a path cannot be asked to prove its file is
|
|
31
|
+
* not junk, and dropping it would be the one outcome worse than including it.
|
|
32
|
+
*/
|
|
33
|
+
readonly relativePath?: string;
|
|
21
34
|
}
|
|
22
35
|
/**
|
|
23
|
-
* Digest a staged input set.
|
|
36
|
+
* Digest a staged input set, quarantine first.
|
|
24
37
|
*
|
|
25
38
|
* A workflow input persisted before `StagedInput.mtimeMs` existed deserializes without
|
|
26
39
|
* it despite the compile-time type; such an entry contributes `-` in the mtime field
|
|
Binary file
|
|
@@ -212,7 +212,7 @@ export async function vectorIndexStepOutputs(deps, postCtx, artifacts) {
|
|
|
212
212
|
let indexed = 0;
|
|
213
213
|
let failed = 0;
|
|
214
214
|
for (const entry of liveMetadata) {
|
|
215
|
-
const ok = await indexOne(`/${input.analysisId}/${entry.dbPath}`, entry.description, { text: entry.description, type: "output", ...entry.metadata });
|
|
215
|
+
const ok = await indexOne(`/${input.analysisId}/${entry.dbPath}`, entry.description, { text: entry.description, type: "output", ...entry.metadata, path: entry.dbPath });
|
|
216
216
|
if (ok)
|
|
217
217
|
indexed++;
|
|
218
218
|
else
|
|
@@ -26,10 +26,10 @@ export interface StagedInput {
|
|
|
26
26
|
readonly hash: string;
|
|
27
27
|
readonly size: number;
|
|
28
28
|
/**
|
|
29
|
-
* Last-modification time in epoch milliseconds. With `size` and `fileId` it
|
|
30
|
-
* the
|
|
31
|
-
*
|
|
32
|
-
*
|
|
29
|
+
* Last-modification time in epoch milliseconds. With `size` and `fileId` it feeds
|
|
30
|
+
* the kept-files `inputSignature` a completed profile persists — what lets a
|
|
31
|
+
* consumer notice the bytes behind a path changed, since a `fileId` is a path
|
|
32
|
+
* identity and survives an in-place content edit unchanged.
|
|
33
33
|
*
|
|
34
34
|
* Embedder-supplied and opaque: the CLI reads it from the same `stat` that yields
|
|
35
35
|
* `size`; a managed service supplies its object store's last-modified epoch. The
|
package/dist/index.d.ts
CHANGED
|
@@ -67,8 +67,9 @@ export { createConfiguredAiSdkProvider, DEFAULT_MAX_OUTPUT_TOKENS } from "./prov
|
|
|
67
67
|
export type { AiSdkProviderConfig, ConfiguredAiSdkProviderDeps } from "./providers/ai-sdk.js";
|
|
68
68
|
export { createEmbeddingProvider } from "./providers/embedding.js";
|
|
69
69
|
export type { EmbeddingProviderDeps } from "./providers/embedding.js";
|
|
70
|
-
export type { AgentChat, ChatProvider, EmbeddingProvider, ChatRequest, ChatResponse, ChatStreamEvent, ChatUsage, ModelMessage, PromptCachePolicy, } from "./providers/types.js";
|
|
70
|
+
export type { AgentChat, ChatProvider, EmbeddingProvider, ChatRequest, ChatResponse, ChatStreamEvent, ChatUsage, ModelMessage, PromptCachePolicy, ReasoningEffort, ReasoningPolicy, } from "./providers/types.js";
|
|
71
71
|
export { DEFAULT_PROMPT_CACHE, promptCacheProviderOptions } from "./providers/prompt-cache.js";
|
|
72
|
+
export { DEFAULT_REASONING, reasoningProviderOptions } from "./providers/reasoning.js";
|
|
72
73
|
export { toProviderError, isProviderError } from "./providers/errors.js";
|
|
73
74
|
export type { ProviderError } from "./providers/errors.js";
|
|
74
75
|
export { createStreamingChat } from "./providers/streaming-chat.js";
|
|
@@ -115,8 +116,12 @@ export { DATA_PROFILE_RUN_LITERAL } from "./contracts/data-profile.js";
|
|
|
115
116
|
export { initCortexState } from "./state/init.js";
|
|
116
117
|
export { upsertAnalysis } from "./state/analyses.js";
|
|
117
118
|
export { clearDataProfile, loadDataProfileStatus, tryRetryDataProfile, reconcileOrphanedDataProfile } from "./state/data-profile.js";
|
|
118
|
-
export type { DataProfileAxis, DataProfileCoverage, DataProfileFile,
|
|
119
|
+
export type { DataProfileAxis, DataProfileChecked, DataProfileCompanionCompleteness, DataProfileCoverage, DataProfileDimension, DataProfileFile, DataProfileGroup, DataProfileGroupSlot, DataProfileInputSignature, DataProfileKind, DataProfileLifecycleStatus, DataProfileMemberAnnotation, DataProfileObservation, DataProfileOrganism, DataProfilePartition, DataProfileProbeReport, DataProfileQualityAssessment, DataProfileQuarantine, DataProfileRecipeStep, DataProfileResult, DataProfileSubjectSource, } from "./contracts/data-profile.js";
|
|
119
120
|
export type { DataProfileStatus } from "./state/data-profile.js";
|
|
121
|
+
export { DIMENSION_CATEGORIES, DIMENSION_CATEGORY_IDS, DIMENSION_PROBES, DIMENSION_PROBE_IDS, GROUP_CATEGORIES, GROUP_CATEGORY_IDS, GROUP_ROLES, GROUP_ROLE_IDS, PROBE_OUTCOME_IDS, dimensionCategoryEntry, dimensionScope, groupCategoryEntry, } from "./contracts/profile-vocabulary.js";
|
|
122
|
+
export type { DimensionCategory, DimensionCategoryEntry, DimensionProbe, DimensionProbeEntry, DimensionScope, DimensionTreatment, GroupCategory, GroupCategoryEntry, GroupRole, GroupRoleEntry, ProbeOutcome, } from "./contracts/profile-vocabulary.js";
|
|
123
|
+
export { dimensionCardinalities, profileCaveats, profileDatasetFileCount, profileDimensions, profileFileRecords, profileGroups, } from "./app/data-profile-view.js";
|
|
124
|
+
export type { ProfileDimensionView, ProfileGroupView } from "./app/data-profile-view.js";
|
|
120
125
|
export { createAnalysisPurge } from "./state/purge-analysis.js";
|
|
121
126
|
export type { AnalysisPurge, AnalysisPurgeDeps, AnalysisPurgeOutcome } from "./state/purge-analysis.js";
|
|
122
127
|
export type { StagedInput } from "./execution/staged-input.js";
|
package/dist/index.js
CHANGED
|
@@ -104,6 +104,13 @@ export { createEmbeddingProvider } from "./providers/embedding.js";
|
|
|
104
104
|
// `"off"`; the `cortex.harness.agent.cache_*_tokens` metrics show which case a
|
|
105
105
|
// deployment is actually in.
|
|
106
106
|
export { DEFAULT_PROMPT_CACHE, promptCacheProviderOptions } from "./providers/prompt-cache.js";
|
|
107
|
+
// Reasoning depth. `ReasoningPolicy` is the vendor-neutral directive for how
|
|
108
|
+
// deep a model reasons; a composition root sets it per run through
|
|
109
|
+
// `RunAgentOptions.reasoning`. It defaults to `DEFAULT_REASONING` — adaptive
|
|
110
|
+
// thinking at the `xhigh` effort — because an agent loop drives tools over many
|
|
111
|
+
// iterations, and a shallow turn there wastes more calls than the deeper turn
|
|
112
|
+
// costs in tokens. A host on a model with no reasoning support passes `"off"`.
|
|
113
|
+
export { DEFAULT_REASONING, reasoningProviderOptions } from "./providers/reasoning.js";
|
|
107
114
|
// Provider error channel. `ProviderError` is the value `chat`/`embed` fail
|
|
108
115
|
// with; `toProviderError` is its sole constructor. Exposed so an embedder
|
|
109
116
|
// realizing its own `ChatProvider`/`EmbeddingProvider` fails with the exact
|
|
@@ -204,6 +211,13 @@ export { upsertAnalysis } from "./state/analyses.js";
|
|
|
204
211
|
// analysis's input set empties (deferring on a running workflow), so the UI
|
|
205
212
|
// stops advertising a profile that describes files the analysis no longer has.
|
|
206
213
|
export { clearDataProfile, loadDataProfileStatus, tryRetryDataProfile, reconcileOrphanedDataProfile } from "./state/data-profile.js";
|
|
214
|
+
// The controlled vocabulary the profiler draws from, as data. A consumer rendering a
|
|
215
|
+
// stored group needs the category's meaning, and the package owns the catalogue — a host
|
|
216
|
+
// does not extend it.
|
|
217
|
+
export { DIMENSION_CATEGORIES, DIMENSION_CATEGORY_IDS, DIMENSION_PROBES, DIMENSION_PROBE_IDS, GROUP_CATEGORIES, GROUP_CATEGORY_IDS, GROUP_ROLES, GROUP_ROLE_IDS, PROBE_OUTCOME_IDS, dimensionCategoryEntry, dimensionScope, groupCategoryEntry, } from "./contracts/profile-vocabulary.js";
|
|
218
|
+
// Reading a persisted profile of either era through one shape — the projection every
|
|
219
|
+
// consumer uses so that a row written before groups existed still renders.
|
|
220
|
+
export { dimensionCardinalities, profileCaveats, profileDatasetFileCount, profileDimensions, profileFileRecords, profileGroups, } from "./app/data-profile-view.js";
|
|
207
221
|
// Analysis reclamation — `purgeAnalysis` reclaims an analysis's whole Postgres
|
|
208
222
|
// footprint from its id alone; workspace files stay the embedder's to dispose of.
|
|
209
223
|
export { createAnalysisPurge } from "./state/purge-analysis.js";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stage 2 — sibling directories that agree become one template.
|
|
3
|
+
*
|
|
4
|
+
* A tree whose per-entity variation is expressed as one directory per entity is
|
|
5
|
+
* structure, not the absence of it: grouping within a directory sees one entity at a
|
|
6
|
+
* time and reports thousands of unrelated observations. Sibling directories whose
|
|
7
|
+
* contents agree on name template and format census cluster into instances of one
|
|
8
|
+
* template, and the directory segment becomes a slot like any other.
|
|
9
|
+
*
|
|
10
|
+
* Agreement is judged on three channels, strongest first: the masked name templates
|
|
11
|
+
* beneath each directory, the format census when the directory names are already
|
|
12
|
+
* skeleton-kin, and the immediate subdirectory layout. Content-schema agreement is a
|
|
13
|
+
* fourth channel this pipeline cannot read, so it is injected — see
|
|
14
|
+
* {@link ContentSimilarity}.
|
|
15
|
+
*/
|
|
16
|
+
import type { MemberFile } from "./set-types.js";
|
|
17
|
+
export interface DirectoryNode {
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly children: Map<string, DirectoryNode>;
|
|
20
|
+
readonly files: MemberFile[];
|
|
21
|
+
readonly fineSignature: Set<string>;
|
|
22
|
+
readonly coarseSignature: Set<string>;
|
|
23
|
+
readonly childNames: Set<string>;
|
|
24
|
+
}
|
|
25
|
+
/** One concrete directory, carrying the values of the template positions above it. */
|
|
26
|
+
export interface DirectoryEntry {
|
|
27
|
+
readonly node: DirectoryNode;
|
|
28
|
+
readonly varValues: readonly string[];
|
|
29
|
+
}
|
|
30
|
+
/** What a content-schema comparison would be given to judge two candidate clusters by. */
|
|
31
|
+
export interface ClusterEvidence {
|
|
32
|
+
readonly names: readonly string[];
|
|
33
|
+
readonly files: readonly MemberFile[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Similarity from file contents — header fields, delimiters, column names.
|
|
37
|
+
*
|
|
38
|
+
* The extension point for read-based evidence: this pipeline is pure over paths and
|
|
39
|
+
* sizes, so a host that has header readouts injects the comparison rather than the
|
|
40
|
+
* pipeline reaching for a decoder. Returning `undefined` means "no opinion".
|
|
41
|
+
*/
|
|
42
|
+
export type ContentSimilarity = (a: ClusterEvidence, b: ClusterEvidence) => number | undefined;
|
|
43
|
+
export declare function buildTree(files: readonly MemberFile[]): DirectoryNode;
|
|
44
|
+
/**
|
|
45
|
+
* Postorder masked-template signatures: the fine one keys on name skeletons, the
|
|
46
|
+
* coarse one only on extensions. Both are capped — a wide directory needs no more
|
|
47
|
+
* keys than the cap to be compared by.
|
|
48
|
+
*/
|
|
49
|
+
export declare function computeSignatures(node: DirectoryNode): DirectoryNode;
|
|
50
|
+
/**
|
|
51
|
+
* Cluster the child directories of a set of template-equivalent parents.
|
|
52
|
+
*
|
|
53
|
+
* Same-named children are one candidate by construction — they already occupy the same
|
|
54
|
+
* template position. Candidates then merge by agreement, majority first: the largest
|
|
55
|
+
* seeds a cluster, which is the rule that keeps a lone odd directory outside rather
|
|
56
|
+
* than dragging the cluster toward it. A second agglomerative pass merges whole
|
|
57
|
+
* clusters to a fixpoint, because the largest candidate can fail against each sibling
|
|
58
|
+
* individually while the siblings agree with each other.
|
|
59
|
+
*/
|
|
60
|
+
export declare function clusterChildren(entries: readonly DirectoryEntry[], contentSimilarity?: ContentSimilarity): {
|
|
61
|
+
names: string[];
|
|
62
|
+
entries: DirectoryEntry[];
|
|
63
|
+
}[];
|