@inflexa-ai/harness 0.29.0 → 0.30.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.
Files changed (93) hide show
  1. package/dist/agents/conversation-agent.js +7 -4
  2. package/dist/agents/report-session-agent.js +1 -1
  3. package/dist/agents/sandbox/data-profiler.js +0 -1
  4. package/dist/agents/sandbox/immune-profiling-agent.js +3 -1
  5. package/dist/agents/sandbox/network-agent.js +0 -1
  6. package/dist/agents/sandbox/types.d.ts +1 -1
  7. package/dist/agents/sandbox/types.js +1 -1
  8. package/dist/config/resource-limits.d.ts +1 -1
  9. package/dist/config/resource-limits.js +1 -1
  10. package/dist/contracts/schemas/chat-parts.d.ts +12 -12
  11. package/dist/contracts/severity.d.ts +2 -2
  12. package/dist/contracts/target-dossier.d.ts +70 -70
  13. package/dist/data/safety-panel-schema.d.ts +4 -4
  14. package/dist/index.d.ts +2 -1
  15. package/dist/index.js +9 -0
  16. package/dist/loop/run-agent.d.ts +14 -1
  17. package/dist/loop/run-agent.js +6 -1
  18. package/dist/prompts/SOUL.d.ts +2 -2
  19. package/dist/prompts/SOUL.js +17 -1
  20. package/dist/prompts/conversation.d.ts +1 -1
  21. package/dist/prompts/conversation.js +43 -71
  22. package/dist/prompts/planner.js +57 -10
  23. package/dist/prompts/sandbox/bulk-transcriptomics-agent.d.ts +1 -1
  24. package/dist/prompts/sandbox/bulk-transcriptomics-agent.js +3 -1
  25. package/dist/prompts/sandbox/dna-methylation-agent.d.ts +1 -1
  26. package/dist/prompts/sandbox/dna-methylation-agent.js +18 -12
  27. package/dist/prompts/sandbox/immune-profiling-agent.d.ts +1 -1
  28. package/dist/prompts/sandbox/immune-profiling-agent.js +6 -2
  29. package/dist/prompts/sandbox/metabolomics-agent.d.ts +1 -1
  30. package/dist/prompts/sandbox/metabolomics-agent.js +8 -4
  31. package/dist/prompts/sandbox/microbiome-agent.d.ts +1 -1
  32. package/dist/prompts/sandbox/microbiome-agent.js +12 -6
  33. package/dist/prompts/sandbox/network-agent.d.ts +1 -1
  34. package/dist/prompts/sandbox/network-agent.js +9 -6
  35. package/dist/prompts/sandbox/spatial-omics-agent.d.ts +1 -1
  36. package/dist/prompts/sandbox/spatial-omics-agent.js +4 -2
  37. package/dist/providers/ai-sdk.js +4 -0
  38. package/dist/providers/reasoning.d.ts +35 -0
  39. package/dist/providers/reasoning.js +34 -0
  40. package/dist/providers/types.d.ts +26 -0
  41. package/dist/schemas/data-profile-schemas.d.ts +4 -4
  42. package/dist/schemas/run-synthesis.d.ts +4 -4
  43. package/dist/tools/bio/chembl.d.ts +1 -1
  44. package/dist/tools/bio/chembl.js +15 -10
  45. package/dist/tools/bio/comptox.js +5 -1
  46. package/dist/tools/bio/drug-gene-interactions.js +5 -2
  47. package/dist/tools/bio/gene-disease-evidence.d.ts +19 -9
  48. package/dist/tools/bio/gene-disease-evidence.js +78 -22
  49. package/dist/tools/bio/gene-preclinical-profile.d.ts +33 -13
  50. package/dist/tools/bio/gene-preclinical-profile.js +63 -22
  51. package/dist/tools/bio/lookup-annotation.d.ts +1 -0
  52. package/dist/tools/bio/lookup-annotation.js +28 -10
  53. package/dist/tools/bio/opentargets.d.ts +10 -2
  54. package/dist/tools/bio/opentargets.js +42 -13
  55. package/dist/tools/bio/pubchem.js +5 -2
  56. package/dist/tools/bio/pubmed.js +9 -3
  57. package/dist/tools/bio/search-clinical-trials.d.ts +25 -25
  58. package/dist/tools/bio/search-clinical-trials.js +56 -18
  59. package/dist/tools/bio/search-faers.d.ts +26 -6
  60. package/dist/tools/bio/search-faers.js +70 -18
  61. package/dist/tools/bio/search-gene.d.ts +19 -3
  62. package/dist/tools/bio/search-gene.js +69 -12
  63. package/dist/tools/bio/search-geo-datasets.js +4 -1
  64. package/dist/tools/bio/search-interactions.js +6 -2
  65. package/dist/tools/bio/target-safety.d.ts +2 -2
  66. package/dist/tools/bio/target-safety.js +3 -2
  67. package/dist/tools/lib/cbioportal-client.js +25 -6
  68. package/dist/tools/lib/chembl-client.d.ts +3 -1
  69. package/dist/tools/lib/chembl-client.js +6 -1
  70. package/dist/tools/lib/gwas-catalog-client.d.ts +7 -6
  71. package/dist/tools/lib/gwas-catalog-client.js +18 -6
  72. package/dist/tools/lib/openfda-client.d.ts +7 -5
  73. package/dist/tools/lib/openfda-client.js +17 -9
  74. package/dist/tools/lib/opentargets-client.d.ts +20 -0
  75. package/dist/tools/lib/opentargets-client.js +45 -0
  76. package/dist/tools/lib/pathway-client.d.ts +7 -0
  77. package/dist/tools/lib/pathway-client.js +68 -1
  78. package/dist/tools/research/context7-docs.js +3 -3
  79. package/dist/tools/research/generate-analogy-report.js +2 -2
  80. package/dist/tools/research/generate-plan.d.ts +3 -0
  81. package/dist/tools/research/generate-plan.js +64 -5
  82. package/dist/tools/research/resolve-citation.js +8 -3
  83. package/dist/tools/research/search-arxiv.js +8 -3
  84. package/dist/tools/research/search-semantic-scholar.js +10 -4
  85. package/dist/workflows/sandbox-step.d.ts +6 -0
  86. package/dist/workflows/sandbox-step.js +31 -14
  87. package/dist/workflows/target-assessment/assemblers/safety.d.ts +1 -1
  88. package/dist/workflows/target-assessment/phase4-assemble.d.ts +17 -17
  89. package/dist/workflows/target-assessment/schemas.d.ts +12 -12
  90. package/dist/workflows/target-assessment/steps/phase2-aggregate.d.ts +6 -6
  91. package/dist/workflows/target-assessment/steps/phase3-aggregate.d.ts +6 -6
  92. package/dist/workflows/target-assessment/synthesis/index.d.ts +12 -12
  93. package/package.json +1 -1
@@ -27,7 +27,7 @@ import { composeSystemPrompt } from "./system-prompt.js";
27
27
  import { searchGeneTool, lookupAnnotationTool, searchInteractionsTool, chemblTool, pubchemTool, openTargetsTool, searchFaersTool, searchClinicalTrialsTool, searchGeoDatasetsTool, genePreclinicalProfileTool, targetSafetyTool, } from "../tools/bio/index.js";
28
28
  import { createNcbiTools, createChemDbTools } from "../tools/bio/keys.js";
29
29
  // Dependency-bearing tool factories.
30
- import { createGeneratePlanTool, createLiteratureReviewerTool, createInspectRunTool, createInspectDataProfileTool, createGenerateAnalogyReportTool, } from "../tools/research/index.js";
30
+ import { createGeneratePlanTool, createInspectRunTool, createInspectDataProfileTool, createGenerateAnalogyReportTool, createSearchSemanticScholarTool, searchArxivTool, } from "../tools/research/index.js";
31
31
  import { createFileStatTool, createGrepTool, createListFilesTool, createReadFileTool, createShowPlanTool, createWorkspaceSearchTool, showFileTool, } from "../tools/workspace/index.js";
32
32
  import { showUserTool } from "../tools/display/index.js";
33
33
  import { createUpdateWorkingMemoryTool } from "../tools/memory/index.js";
@@ -39,7 +39,7 @@ import { createResolveCitationTool } from "../tools/research/resolve-citation.js
39
39
  /** Canonical agent id — the single source of truth. */
40
40
  export const CONVERSATION_AGENT_ID = "conversation-agent";
41
41
  /** Runaway guard — heavy tool-driving turns need generous headroom. */
42
- const CONVERSATION_MAX_ITERATIONS = 50;
42
+ const CONVERSATION_MAX_ITERATIONS = 200;
43
43
  /** Build the conversation `AgentDefinition` with every tool fully dep-bound. */
44
44
  export function createConversationAgent(deps) {
45
45
  const { provider, pool, embedding, workspaceFs, model, utilityProvider, utilityModel, executeAnalysisWorkflow, runAuthorizer, runLauncher, bioKeys, chrome, resourcePolicy, hostTools, refStorePath, packagesFile, usageRecorder, citationResolver, } = deps;
@@ -57,6 +57,10 @@ export function createConversationAgent(deps) {
57
57
  ncbi.pubmed,
58
58
  // Verification of one caller-supplied citation (distinct from discovery).
59
59
  createResolveCitationTool(citationResolver),
60
+ // Literature outside PubMed. A question about a method, a model or a
61
+ // preprint has no MEDLINE record, thus PubMed alone cannot answer it.
62
+ createSearchSemanticScholarTool({ ...(bioKeys.semanticScholar === undefined ? {} : { apiKey: bioKeys.semanticScholar }) }),
63
+ searchArxivTool,
60
64
  // ChEMBL (compounds / drug / mechanism / bioactivity / targets behind one action).
61
65
  chemblTool,
62
66
  // PubChem (compound / crossrefs / assays behind one action).
@@ -95,6 +99,7 @@ export function createConversationAgent(deps) {
95
99
  pool,
96
100
  resourcePolicy,
97
101
  usageRecorder,
102
+ bioKeys,
98
103
  ...(refStorePath ? { refStorePath } : {}),
99
104
  ...(packagesFile ? { packagesFile } : {}),
100
105
  ...(deps.logger ? { logger: deps.logger } : {}),
@@ -123,8 +128,6 @@ export function createConversationAgent(deps) {
123
128
  showUserTool,
124
129
  createShowPlanTool(pool),
125
130
  showFileTool,
126
- // Batch literature/biology research (sub-agent as a loop-driving tool).
127
- createLiteratureReviewerTool({ provider, model, bioKeys, citationResolver, usageRecorder }),
128
131
  // Cross-domain analogy generation (sub-agent as a loop-driving tool).
129
132
  createGenerateAnalogyReportTool({ provider, model, bioKeys, usageRecorder }),
130
133
  // Workspace semantic search + raw read/grep over the read seam.
@@ -35,7 +35,7 @@ export const REPORT_SESSION_AGENT_ID = "report-session";
35
35
  * look, record — drives more small tool calls than a conversation turn, thus it
36
36
  * gets the headroom of the report runner (REPORT_AGENT_MAX_STEPS).
37
37
  */
38
- const REPORT_SESSION_MAX_ITERATIONS = 75;
38
+ const REPORT_SESSION_MAX_ITERATIONS = 200;
39
39
  /** Build the report `AgentDefinition` with every tool bound to its deps. */
40
40
  export function createReportSessionAgent(deps) {
41
41
  const { model, pool, embedding, workspaceFs, gateway, resolveWorkspaceRoot, store, threads, chrome, eyes, makeResolver, resolvePageAsset, logger } = deps;
@@ -15,7 +15,6 @@ export const meta = {
15
15
  // differently. Declared rather than bolted on, so the resolved roster stays
16
16
  // `meta.tools` plus the always-on set.
17
17
  tools: [...BASE_SANDBOX_TOOLS, "scanInputs"],
18
- defaultMaxSteps: 85,
19
18
  plannable: false,
20
19
  };
21
20
  export function createDataProfilerAgent(deps) {
@@ -26,7 +26,9 @@ export const meta = {
26
26
  // `single-cell` carries the scirpy reference, which is the route from 10x
27
27
  // VDJ / AIRR files to called clonotypes — the input every repertoire metric
28
28
  // in `immune-profiling` assumes it already has.
29
- skills: ["immune-profiling", "single-cell", "shared/omics-general"],
29
+ // `statistical-modeling` carries the survival-cutpoint correction and the
30
+ // multiplicity rules that the immune-clinical correlation work demands.
31
+ skills: ["immune-profiling", "single-cell", "statistical-modeling", "shared/omics-general"],
30
32
  tools: [...BASE_SANDBOX_TOOLS, "pubmed", "searchGene", "lookupAnnotation", "searchInteractions", "searchGeoDatasets", "opentargets"],
31
33
  };
32
34
  export function createImmuneProfilingAgent(deps) {
@@ -9,7 +9,6 @@ export const meta = {
9
9
  suitableFor: ["expression-matrices", "correlation-matrices", "general-omics"],
10
10
  skills: ["network-regulatory", "shared/omics-general"],
11
11
  tools: [...BASE_SANDBOX_TOOLS, "pubmed", "searchGene", "lookupAnnotation", "searchInteractions"],
12
- defaultMaxSteps: 35,
13
12
  };
14
13
  export function createNetworkAgent(deps) {
15
14
  return createSandboxAgent(deps, meta, networkAgentPrompt);
@@ -31,4 +31,4 @@ export interface AgentMeta {
31
31
  readonly plannable?: boolean;
32
32
  }
33
33
  /** Default runaway-guard for sandbox agents. */
34
- export declare const SANDBOX_AGENT_DEFAULT_MAX_ITERATIONS = 50;
34
+ export declare const SANDBOX_AGENT_DEFAULT_MAX_ITERATIONS = 200;
@@ -12,4 +12,4 @@
12
12
  * in the tool's `perSource` report; the rest of the call still answers.
13
13
  */
14
14
  /** Default runaway-guard for sandbox agents. */
15
- export const SANDBOX_AGENT_DEFAULT_MAX_ITERATIONS = 50;
15
+ export const SANDBOX_AGENT_DEFAULT_MAX_ITERATIONS = 200;
@@ -46,7 +46,7 @@ export type ResourcePolicy = z.infer<typeof ResourcePolicySchema>;
46
46
  /** Default LLM-turn budget for a sandbox agent step. Covers simple,
47
47
  * standard, and complex analyses — extra headroom on simple steps is
48
48
  * cheaper than truncating complex ones. */
49
- export declare const DEFAULT_SANDBOX_MAX_STEPS = 75;
49
+ export declare const DEFAULT_SANDBOX_MAX_STEPS = 200;
50
50
  export declare class ResourceLimitsConfigError extends Error {
51
51
  constructor(message: string);
52
52
  }
@@ -33,7 +33,7 @@ export const ResourcePolicySchema = z.object({
33
33
  /** Default LLM-turn budget for a sandbox agent step. Covers simple,
34
34
  * standard, and complex analyses — extra headroom on simple steps is
35
35
  * cheaper than truncating complex ones. */
36
- export const DEFAULT_SANDBOX_MAX_STEPS = 75;
36
+ export const DEFAULT_SANDBOX_MAX_STEPS = 200;
37
37
  // ── Error ───────────────────────────────────────────────────────────
38
38
  export class ResourceLimitsConfigError extends Error {
39
39
  constructor(message) {
@@ -305,9 +305,9 @@ export declare const StepBlockedPartSchema: z.ZodObject<{
305
305
  export declare const RunCompletedFindingSchema: z.ZodObject<{
306
306
  title: z.ZodString;
307
307
  confidence: z.ZodEnum<{
308
- high: "high";
309
- medium: "medium";
310
308
  low: "low";
309
+ medium: "medium";
310
+ high: "high";
311
311
  }>;
312
312
  }, z.core.$strip>;
313
313
  export declare const RunCompletedPartSchema: z.ZodObject<{
@@ -323,9 +323,9 @@ export declare const RunCompletedPartSchema: z.ZodObject<{
323
323
  findings: z.ZodArray<z.ZodObject<{
324
324
  title: z.ZodString;
325
325
  confidence: z.ZodEnum<{
326
- high: "high";
327
- medium: "medium";
328
326
  low: "low";
327
+ medium: "medium";
328
+ high: "high";
329
329
  }>;
330
330
  }, z.core.$strip>>;
331
331
  note: z.ZodOptional<z.ZodString>;
@@ -342,9 +342,9 @@ export declare const SynthesizedFindingSchema: z.ZodObject<{
342
342
  title: z.ZodString;
343
343
  description: z.ZodString;
344
344
  confidence: z.ZodEnum<{
345
- high: "high";
346
- medium: "medium";
347
345
  low: "low";
346
+ medium: "medium";
347
+ high: "high";
348
348
  }>;
349
349
  noveltyStatus: z.ZodEnum<{
350
350
  expected: "expected";
@@ -374,9 +374,9 @@ export declare const RunSynthesisPartSchema: z.ZodObject<{
374
374
  title: z.ZodString;
375
375
  description: z.ZodString;
376
376
  confidence: z.ZodEnum<{
377
- high: "high";
378
- medium: "medium";
379
377
  low: "low";
378
+ medium: "medium";
379
+ high: "high";
380
380
  }>;
381
381
  noveltyStatus: z.ZodEnum<{
382
382
  expected: "expected";
@@ -647,9 +647,9 @@ export declare const CortexChatPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
647
647
  title: z.ZodString;
648
648
  description: z.ZodString;
649
649
  confidence: z.ZodEnum<{
650
- high: "high";
651
- medium: "medium";
652
650
  low: "low";
651
+ medium: "medium";
652
+ high: "high";
653
653
  }>;
654
654
  noveltyStatus: z.ZodEnum<{
655
655
  expected: "expected";
@@ -707,9 +707,9 @@ export declare const CortexChatPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
707
707
  findings: z.ZodArray<z.ZodObject<{
708
708
  title: z.ZodString;
709
709
  confidence: z.ZodEnum<{
710
- high: "high";
711
- medium: "medium";
712
710
  low: "low";
711
+ medium: "medium";
712
+ high: "high";
713
713
  }>;
714
714
  }, z.core.$strip>>;
715
715
  note: z.ZodOptional<z.ZodString>;
@@ -8,8 +8,8 @@
8
8
  import { z } from "zod";
9
9
  export declare const SEVERITIES: readonly ["high", "medium", "low"];
10
10
  export declare const SeveritySchema: z.ZodEnum<{
11
- high: "high";
12
- medium: "medium";
13
11
  low: "low";
12
+ medium: "medium";
13
+ high: "high";
14
14
  }>;
15
15
  export type Severity = (typeof SEVERITIES)[number];
@@ -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>>;
@@ -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>>;
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, ReasoningPolicy, } from "./providers/types.js";
71
71
  export { DEFAULT_PROMPT_CACHE, promptCacheProviderOptions } from "./providers/prompt-cache.js";
72
+ export { DEFAULT_REASONING } 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";
package/dist/index.js CHANGED
@@ -104,6 +104,15 @@ 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 name for how deep a
108
+ // model reasons; a composition root sets it per run through
109
+ // `RunAgentOptions.reasoning`. It defaults to `DEFAULT_REASONING` — `xhigh` —
110
+ // because an agent loop drives tools over many iterations, and a shallow turn
111
+ // there wastes more calls than the deeper turn costs in tokens. The provider
112
+ // package resolves the name for the model that it is bound to, thus a model
113
+ // that accepts no `xhigh` gets the nearest name that it accepts. A host on a
114
+ // model with no reasoning support passes `"provider-default"`.
115
+ export { DEFAULT_REASONING } from "./providers/reasoning.js";
107
116
  // Provider error channel. `ProviderError` is the value `chat`/`embed` fail
108
117
  // with; `toProviderError` is its sole constructor. Exposed so an embedder
109
118
  // realizing its own `ChatProvider`/`EmbeddingProvider` fails with the exact