@inflexa-ai/harness 0.35.8 → 0.36.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 (198) hide show
  1. package/dist/auth/types.d.ts +5 -14
  2. package/dist/auth/types.js +3 -10
  3. package/dist/billing/usage-recorder.d.ts +1 -1
  4. package/dist/contracts/analogy-report.d.ts +1 -1
  5. package/dist/contracts/analogy-report.js +1 -1
  6. package/dist/contracts/chat-parts.d.ts +2 -3
  7. package/dist/contracts/index.d.ts +0 -4
  8. package/dist/contracts/index.js +0 -2
  9. package/dist/index.d.ts +0 -7
  10. package/dist/index.js +0 -21
  11. package/dist/lib/metrics.d.ts +1 -1
  12. package/dist/lib/otel-spans.d.ts +0 -2
  13. package/dist/lib/otel-spans.js +0 -2
  14. package/dist/loop/genai-spans.d.ts +14 -0
  15. package/dist/loop/genai-spans.js +35 -0
  16. package/dist/loop/run-agent.d.ts +1 -1
  17. package/dist/loop/run-agent.js +37 -4
  18. package/dist/runtime/assemble.d.ts +0 -3
  19. package/dist/runtime/assemble.js +0 -3
  20. package/dist/state/index.d.ts +0 -2
  21. package/dist/state/index.js +0 -1
  22. package/dist/state/init.js +1 -60
  23. package/dist/state/purge-analysis.d.ts +1 -2
  24. package/dist/state/purge-analysis.js +1 -2
  25. package/dist/tasks/regulatory-corpus-boot-refresh.js +1 -1
  26. package/dist/tools/bio/gene-preclinical-profile.d.ts +1 -3
  27. package/dist/tools/bio/gene-preclinical-profile.js +1 -3
  28. package/dist/tools/lib/chembl-client.d.ts +1 -4
  29. package/dist/tools/lib/chembl-client.js +1 -4
  30. package/dist/tools/lib/clinical-benchmarks-client.d.ts +1 -1
  31. package/dist/tools/lib/clinical-benchmarks-client.js +1 -1
  32. package/dist/tools/lib/clinical-trials-client.d.ts +0 -3
  33. package/dist/tools/lib/clinical-trials-client.js +0 -3
  34. package/dist/tools/lib/identifier-resolver.d.ts +5 -7
  35. package/dist/tools/lib/identifier-resolver.js +5 -7
  36. package/dist/tools/lib/iuphar-client.d.ts +1 -3
  37. package/dist/tools/lib/iuphar-client.js +1 -3
  38. package/dist/tools/lib/opentargets-client.d.ts +1 -1
  39. package/dist/tools/lib/opentargets-client.js +1 -1
  40. package/dist/tools/lib/protein-family-normalize.d.ts +5 -7
  41. package/dist/tools/lib/protein-family-normalize.js +5 -7
  42. package/dist/tools/lib/uniprot-client.d.ts +0 -7
  43. package/dist/tools/lib/uniprot-client.js +2 -9
  44. package/package.json +1 -1
  45. package/dist/contracts/target-assessment-row.d.ts +0 -85
  46. package/dist/contracts/target-assessment-row.js +0 -37
  47. package/dist/contracts/target-dossier.d.ts +0 -12423
  48. package/dist/contracts/target-dossier.js +0 -1282
  49. package/dist/prompts/target-assessment/briefs/executive-recommendation.d.ts +0 -1
  50. package/dist/prompts/target-assessment/briefs/executive-recommendation.js +0 -85
  51. package/dist/prompts/target-assessment/briefs/index.d.ts +0 -4
  52. package/dist/prompts/target-assessment/briefs/index.js +0 -4
  53. package/dist/prompts/target-assessment/briefs/liability-bullets.d.ts +0 -1
  54. package/dist/prompts/target-assessment/briefs/liability-bullets.js +0 -114
  55. package/dist/prompts/target-assessment/briefs/target-organ-liabilities.d.ts +0 -1
  56. package/dist/prompts/target-assessment/briefs/target-organ-liabilities.js +0 -37
  57. package/dist/prompts/target-assessment/briefs/translational-commentary.d.ts +0 -1
  58. package/dist/prompts/target-assessment/briefs/translational-commentary.js +0 -23
  59. package/dist/prompts/target-assessment/drugs-in-class.d.ts +0 -1
  60. package/dist/prompts/target-assessment/drugs-in-class.js +0 -29
  61. package/dist/prompts/target-assessment/investigation/adversarial-critique.d.ts +0 -1
  62. package/dist/prompts/target-assessment/investigation/adversarial-critique.js +0 -67
  63. package/dist/prompts/target-assessment/investigation/claim-reverification.d.ts +0 -1
  64. package/dist/prompts/target-assessment/investigation/claim-reverification.js +0 -49
  65. package/dist/prompts/target-assessment/investigation/index.d.ts +0 -3
  66. package/dist/prompts/target-assessment/investigation/index.js +0 -3
  67. package/dist/prompts/target-assessment/investigation/mechanism-proposal.d.ts +0 -1
  68. package/dist/prompts/target-assessment/investigation/mechanism-proposal.js +0 -49
  69. package/dist/prompts/target-assessment/modulator-triage.d.ts +0 -1
  70. package/dist/prompts/target-assessment/modulator-triage.js +0 -31
  71. package/dist/prompts/target-assessment/off-target-annotator.d.ts +0 -1
  72. package/dist/prompts/target-assessment/off-target-annotator.js +0 -28
  73. package/dist/prompts/target-assessment/tox-voice/core.d.ts +0 -1
  74. package/dist/prompts/target-assessment/tox-voice/core.js +0 -74
  75. package/dist/prompts/target-assessment/tox-voice/critique.d.ts +0 -7
  76. package/dist/prompts/target-assessment/tox-voice/critique.js +0 -109
  77. package/dist/prompts/target-assessment/tox-voice/exemplars.d.ts +0 -8
  78. package/dist/prompts/target-assessment/tox-voice/exemplars.js +0 -24
  79. package/dist/prompts/target-assessment/tox-voice/index.d.ts +0 -4
  80. package/dist/prompts/target-assessment/tox-voice/index.js +0 -4
  81. package/dist/prompts/target-assessment/tox-voice/vocabulary.d.ts +0 -18
  82. package/dist/prompts/target-assessment/tox-voice/vocabulary.js +0 -61
  83. package/dist/state/target-assessments.d.ts +0 -68
  84. package/dist/state/target-assessments.js +0 -222
  85. package/dist/workflows/execute-target-assessment.d.ts +0 -118
  86. package/dist/workflows/execute-target-assessment.js +0 -631
  87. package/dist/workflows/target-assessment/assemblers/index.d.ts +0 -5
  88. package/dist/workflows/target-assessment/assemblers/index.js +0 -4
  89. package/dist/workflows/target-assessment/assemblers/literature.d.ts +0 -281
  90. package/dist/workflows/target-assessment/assemblers/literature.js +0 -971
  91. package/dist/workflows/target-assessment/assemblers/orchestrator.d.ts +0 -118
  92. package/dist/workflows/target-assessment/assemblers/orchestrator.js +0 -945
  93. package/dist/workflows/target-assessment/assemblers/safety.d.ts +0 -374
  94. package/dist/workflows/target-assessment/assemblers/safety.js +0 -1068
  95. package/dist/workflows/target-assessment/assemblers/trials.d.ts +0 -30
  96. package/dist/workflows/target-assessment/assemblers/trials.js +0 -75
  97. package/dist/workflows/target-assessment/collectors/index.d.ts +0 -114
  98. package/dist/workflows/target-assessment/collectors/index.js +0 -538
  99. package/dist/workflows/target-assessment/coverage.d.ts +0 -97
  100. package/dist/workflows/target-assessment/coverage.js +0 -86
  101. package/dist/workflows/target-assessment/decisions/index.d.ts +0 -86
  102. package/dist/workflows/target-assessment/decisions/index.js +0 -127
  103. package/dist/workflows/target-assessment/fanout/index.d.ts +0 -32
  104. package/dist/workflows/target-assessment/fanout/index.js +0 -156
  105. package/dist/workflows/target-assessment/investigation/index.d.ts +0 -97
  106. package/dist/workflows/target-assessment/investigation/index.js +0 -419
  107. package/dist/workflows/target-assessment/lib/approval-precedents.d.ts +0 -73
  108. package/dist/workflows/target-assessment/lib/approval-precedents.js +0 -185
  109. package/dist/workflows/target-assessment/lib/citation-validator.d.ts +0 -46
  110. package/dist/workflows/target-assessment/lib/citation-validator.js +0 -316
  111. package/dist/workflows/target-assessment/lib/clinical-consequence-annotator.d.ts +0 -65
  112. package/dist/workflows/target-assessment/lib/clinical-consequence-annotator.js +0 -174
  113. package/dist/workflows/target-assessment/lib/clinical-evidence-attribution.d.ts +0 -44
  114. package/dist/workflows/target-assessment/lib/clinical-evidence-attribution.js +0 -152
  115. package/dist/workflows/target-assessment/lib/compute-derived.d.ts +0 -20
  116. package/dist/workflows/target-assessment/lib/compute-derived.js +0 -261
  117. package/dist/workflows/target-assessment/lib/compute-selectivity.d.ts +0 -15
  118. package/dist/workflows/target-assessment/lib/compute-selectivity.js +0 -18
  119. package/dist/workflows/target-assessment/lib/dedup-modulators.d.ts +0 -37
  120. package/dist/workflows/target-assessment/lib/dedup-modulators.js +0 -157
  121. package/dist/workflows/target-assessment/lib/evidence-conflict-detector.d.ts +0 -17
  122. package/dist/workflows/target-assessment/lib/evidence-conflict-detector.js +0 -100
  123. package/dist/workflows/target-assessment/lib/expression-constants.d.ts +0 -21
  124. package/dist/workflows/target-assessment/lib/expression-constants.js +0 -21
  125. package/dist/workflows/target-assessment/lib/family-complex-supplement.d.ts +0 -20
  126. package/dist/workflows/target-assessment/lib/family-complex-supplement.js +0 -36
  127. package/dist/workflows/target-assessment/lib/fda-label-safety.d.ts +0 -72
  128. package/dist/workflows/target-assessment/lib/fda-label-safety.js +0 -166
  129. package/dist/workflows/target-assessment/lib/heterodimer-filter.d.ts +0 -30
  130. package/dist/workflows/target-assessment/lib/heterodimer-filter.js +0 -44
  131. package/dist/workflows/target-assessment/lib/hpo-organ-map.d.ts +0 -34
  132. package/dist/workflows/target-assessment/lib/hpo-organ-map.js +0 -63
  133. package/dist/workflows/target-assessment/lib/impc-organ-map.d.ts +0 -19
  134. package/dist/workflows/target-assessment/lib/impc-organ-map.js +0 -39
  135. package/dist/workflows/target-assessment/lib/intended-polypharm-filter.d.ts +0 -4
  136. package/dist/workflows/target-assessment/lib/intended-polypharm-filter.js +0 -24
  137. package/dist/workflows/target-assessment/lib/llm-step.d.ts +0 -80
  138. package/dist/workflows/target-assessment/lib/llm-step.js +0 -101
  139. package/dist/workflows/target-assessment/lib/meddra-organ-map.d.ts +0 -40
  140. package/dist/workflows/target-assessment/lib/meddra-organ-map.js +0 -138
  141. package/dist/workflows/target-assessment/lib/recommendation-quality-gates.d.ts +0 -17
  142. package/dist/workflows/target-assessment/lib/recommendation-quality-gates.js +0 -99
  143. package/dist/workflows/target-assessment/lib/recommendation-sanitizer.d.ts +0 -2
  144. package/dist/workflows/target-assessment/lib/recommendation-sanitizer.js +0 -51
  145. package/dist/workflows/target-assessment/lib/regulatory-actions.d.ts +0 -25
  146. package/dist/workflows/target-assessment/lib/regulatory-actions.js +0 -176
  147. package/dist/workflows/target-assessment/lib/safety-corroboration.d.ts +0 -44
  148. package/dist/workflows/target-assessment/lib/safety-corroboration.js +0 -273
  149. package/dist/workflows/target-assessment/lib/structured-llm.d.ts +0 -61
  150. package/dist/workflows/target-assessment/lib/structured-llm.js +0 -102
  151. package/dist/workflows/target-assessment/lib/target-identity-filter.d.ts +0 -59
  152. package/dist/workflows/target-assessment/lib/target-identity-filter.js +0 -95
  153. package/dist/workflows/target-assessment/lib/therapeutic-programs.d.ts +0 -20
  154. package/dist/workflows/target-assessment/lib/therapeutic-programs.js +0 -68
  155. package/dist/workflows/target-assessment/metrics.d.ts +0 -16
  156. package/dist/workflows/target-assessment/metrics.js +0 -30
  157. package/dist/workflows/target-assessment/phase4-assemble.d.ts +0 -3182
  158. package/dist/workflows/target-assessment/phase4-assemble.js +0 -39
  159. package/dist/workflows/target-assessment/phase5-persist.d.ts +0 -59
  160. package/dist/workflows/target-assessment/phase5-persist.js +0 -349
  161. package/dist/workflows/target-assessment/progress-stream.d.ts +0 -75
  162. package/dist/workflows/target-assessment/progress-stream.js +0 -110
  163. package/dist/workflows/target-assessment/progress.d.ts +0 -39
  164. package/dist/workflows/target-assessment/progress.js +0 -77
  165. package/dist/workflows/target-assessment/schemas.d.ts +0 -970
  166. package/dist/workflows/target-assessment/schemas.js +0 -318
  167. package/dist/workflows/target-assessment/steps/collectors/pathways.d.ts +0 -15
  168. package/dist/workflows/target-assessment/steps/collectors/pathways.js +0 -58
  169. package/dist/workflows/target-assessment/steps/fanout/aes-for-one-class-drug-step.d.ts +0 -34
  170. package/dist/workflows/target-assessment/steps/fanout/aes-for-one-class-drug-step.js +0 -31
  171. package/dist/workflows/target-assessment/steps/fanout/aes-for-one-trial-step.d.ts +0 -57
  172. package/dist/workflows/target-assessment/steps/fanout/aes-for-one-trial-step.js +0 -54
  173. package/dist/workflows/target-assessment/steps/fanout/faers-for-one-modulator-step.d.ts +0 -35
  174. package/dist/workflows/target-assessment/steps/fanout/faers-for-one-modulator-step.js +0 -32
  175. package/dist/workflows/target-assessment/steps/fanout/index.d.ts +0 -14
  176. package/dist/workflows/target-assessment/steps/fanout/index.js +0 -10
  177. package/dist/workflows/target-assessment/steps/fanout/polypharm-for-one-modulator-step.d.ts +0 -29
  178. package/dist/workflows/target-assessment/steps/fanout/polypharm-for-one-modulator-step.js +0 -29
  179. package/dist/workflows/target-assessment/steps/phase2-aggregate.d.ts +0 -657
  180. package/dist/workflows/target-assessment/steps/phase2-aggregate.js +0 -34
  181. package/dist/workflows/target-assessment/steps/phase3-aggregate.d.ts +0 -806
  182. package/dist/workflows/target-assessment/steps/phase3-aggregate.js +0 -16
  183. package/dist/workflows/target-assessment/steps/synthesis/diagnostics.d.ts +0 -28
  184. package/dist/workflows/target-assessment/steps/synthesis/diagnostics.js +0 -27
  185. package/dist/workflows/target-assessment/sub-workflows/index.d.ts +0 -15
  186. package/dist/workflows/target-assessment/sub-workflows/index.js +0 -11
  187. package/dist/workflows/target-assessment/sub-workflows/per-class-drug-aes.d.ts +0 -41
  188. package/dist/workflows/target-assessment/sub-workflows/per-class-drug-aes.js +0 -12
  189. package/dist/workflows/target-assessment/sub-workflows/per-modulator-faers.d.ts +0 -41
  190. package/dist/workflows/target-assessment/sub-workflows/per-modulator-faers.js +0 -12
  191. package/dist/workflows/target-assessment/sub-workflows/per-modulator-polypharm.d.ts +0 -37
  192. package/dist/workflows/target-assessment/sub-workflows/per-modulator-polypharm.js +0 -12
  193. package/dist/workflows/target-assessment/sub-workflows/per-trial-aes.d.ts +0 -66
  194. package/dist/workflows/target-assessment/sub-workflows/per-trial-aes.js +0 -12
  195. package/dist/workflows/target-assessment/synthesis/index.d.ts +0 -607
  196. package/dist/workflows/target-assessment/synthesis/index.js +0 -354
  197. package/dist/workflows/target-assessment/synthesis-probes.d.ts +0 -56
  198. package/dist/workflows/target-assessment/synthesis-probes.js +0 -320
@@ -47,7 +47,7 @@ export function getBenchmarks(therapeuticArea) {
47
47
  transitions: dataset.phase_transitions[ta],
48
48
  };
49
49
  }
50
- /** Return the dataset's metadata for transparency in the dossier. */
50
+ /** Return the dataset's metadata for transparency. */
51
51
  export function getDatasetAttribution() {
52
52
  const ds = loadDataset();
53
53
  return {
@@ -1,9 +1,6 @@
1
1
  /**
2
2
  * Pure async client functions for the ClinicalTrials.gov v2 API.
3
3
  *
4
- * Used by target-assessment workflow steps for §2.5 (clinical record),
5
- * §2.6.3 (trial AEs), §2.5 (failed trials), and §6.5 (discovery trials).
6
- *
7
4
  * Absence policy: the API omits the key of an absent value, and its OpenAPI
8
5
  * document marks nothing as nullable. Thus a maybe-absent field carries
9
6
  * `.optional()`, not `.nullable()`.
@@ -1,9 +1,6 @@
1
1
  /**
2
2
  * Pure async client functions for the ClinicalTrials.gov v2 API.
3
3
  *
4
- * Used by target-assessment workflow steps for §2.5 (clinical record),
5
- * §2.6.3 (trial AEs), §2.5 (failed trials), and §6.5 (discovery trials).
6
- *
7
4
  * Absence policy: the API omits the key of an absent value, and its OpenAPI
8
5
  * document marks nothing as nullable. Thus a maybe-absent field carries
9
6
  * `.optional()`, not `.nullable()`.
@@ -2,10 +2,9 @@
2
2
  * Identifier resolver — combines HGNC, UniProt, Ensembl, and ChEMBL gene-name
3
3
  * fields into a single canonical entity payload with synonyms.
4
4
  *
5
- * Used by Phase 0 of the target-assessment workflow to resolve a user-
6
- * supplied target string (gene symbol, alias, UniProt accession, Ensembl
7
- * id, ChEMBL target id) to a canonical entity that downstream collectors
8
- * can key off.
5
+ * Resolves a user-supplied target string (gene symbol, alias, UniProt
6
+ * accession, Ensembl id, ChEMBL target id) to a canonical entity that a
7
+ * caller can key off.
9
8
  *
10
9
  * Resolution order:
11
10
  * 1. If the input matches a known id pattern (ENSG, UniProt 6-char,
@@ -84,9 +83,8 @@ export interface AutocompleteCandidate {
84
83
  /**
85
84
  * Resolve a single gene-symbol query for the autocomplete UI by fanning
86
85
  * out HGNC + UniProt + Ensembl in parallel and merging into one canonical
87
- * candidate. Per `target-assessment/spec.md` "Autocomplete returns
88
- * canonical identifiers" — three identifiers populated on one row, not
89
- * three separate rows.
86
+ * candidate: three identifiers populated on one row, not three separate
87
+ * rows.
90
88
  *
91
89
  * Returns `null` when none of the upstream sources find a match. Throws
92
90
  * never — failures of individual sources degrade to `null` for that field.
@@ -2,10 +2,9 @@
2
2
  * Identifier resolver — combines HGNC, UniProt, Ensembl, and ChEMBL gene-name
3
3
  * fields into a single canonical entity payload with synonyms.
4
4
  *
5
- * Used by Phase 0 of the target-assessment workflow to resolve a user-
6
- * supplied target string (gene symbol, alias, UniProt accession, Ensembl
7
- * id, ChEMBL target id) to a canonical entity that downstream collectors
8
- * can key off.
5
+ * Resolves a user-supplied target string (gene symbol, alias, UniProt
6
+ * accession, Ensembl id, ChEMBL target id) to a canonical entity that a
7
+ * caller can key off.
9
8
  *
10
9
  * Resolution order:
11
10
  * 1. If the input matches a known id pattern (ENSG, UniProt 6-char,
@@ -272,9 +271,8 @@ export async function resolveTarget(input, logger) {
272
271
  /**
273
272
  * Resolve a single gene-symbol query for the autocomplete UI by fanning
274
273
  * out HGNC + UniProt + Ensembl in parallel and merging into one canonical
275
- * candidate. Per `target-assessment/spec.md` "Autocomplete returns
276
- * canonical identifiers" — three identifiers populated on one row, not
277
- * three separate rows.
274
+ * candidate: three identifiers populated on one row, not three separate
275
+ * rows.
278
276
  *
279
277
  * Returns `null` when none of the upstream sources find a match. Throws
280
278
  * never — failures of individual sources degrade to `null` for that field.
@@ -5,9 +5,7 @@
5
5
  * Used to discover, for any HGNC target or UniProt accession, the obligate
6
6
  * heterodimer complexes that share the same primary protein (e.g., AMY1/
7
7
  * AMY2/AMY3 amylin receptors share the CT receptor protein with the
8
- * calcitonin receptor and differ only by their RAMP accessory). Powers
9
- * data-driven heterodimer filtering in target-assessment so off-target
10
- * panels never list a sibling receptor-complex as a developable hit.
8
+ * calcitonin receptor and differ only by their RAMP accessory).
11
9
  */
12
10
  import { z } from "zod";
13
11
  import type { Logger } from "../../lib/logger.js";
@@ -5,9 +5,7 @@
5
5
  * Used to discover, for any HGNC target or UniProt accession, the obligate
6
6
  * heterodimer complexes that share the same primary protein (e.g., AMY1/
7
7
  * AMY2/AMY3 amylin receptors share the CT receptor protein with the
8
- * calcitonin receptor and differ only by their RAMP accessory). Powers
9
- * data-driven heterodimer filtering in target-assessment so off-target
10
- * panels never list a sibling receptor-complex as a developable hit.
8
+ * calcitonin receptor and differ only by their RAMP accessory).
11
9
  */
12
10
  import { z } from "zod";
13
11
  import { createNoopLogger } from "../../lib/console-logger.js";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Pure async client functions for the Open Targets Platform GraphQL API.
3
3
  *
4
- * Used directly by target-assessment workflow steps and by tool wrappers.
4
+ * Used by tool wrappers.
5
5
  *
6
6
  * Absence policy: the nullability of the GraphQL SDL encodes an absent value.
7
7
  * Open Targets answers each requested field with a key and an explicit `null`,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Pure async client functions for the Open Targets Platform GraphQL API.
3
3
  *
4
- * Used directly by target-assessment workflow steps and by tool wrappers.
4
+ * Used by tool wrappers.
5
5
  *
6
6
  * Absence policy: the nullability of the GraphQL SDL encodes an absent value.
7
7
  * Open Targets answers each requested field with a key and an explicit `null`,
@@ -1,12 +1,10 @@
1
1
  /**
2
2
  * Map free-text protein-family descriptors (UniProt keywords, HGNC names,
3
- * GraphQL labels) to a single canonical lowercase form so the modality lookup
4
- * in `protein-family-modality.json` has one pattern set to match against.
3
+ * GraphQL labels) to a single canonical lowercase form, so a consumer has one
4
+ * form to match against.
5
5
  *
6
- * Why this exists: UniProt keyword text and the modality-JSON patterns
7
- * disagreed on hyphenation ("G-protein coupled receptor" vs
8
- * "G protein-coupled receptor"), causing every GPCR target whose UniProt
9
- * keyword used the hyphenated variant to fall through to the dataset default
10
- * modality. See review of dossier 9ad29ba5 (GLP1R) — 2026-05-13.
6
+ * Why this exists: UniProt keyword text varies in hyphenation
7
+ * ("G-protein coupled receptor" vs "G protein-coupled receptor"), thus an
8
+ * exact match on the raw text misses one of the two spellings.
11
9
  */
12
10
  export declare function normalizeProteinFamily(input: string | null): string | null;
@@ -1,13 +1,11 @@
1
1
  /**
2
2
  * Map free-text protein-family descriptors (UniProt keywords, HGNC names,
3
- * GraphQL labels) to a single canonical lowercase form so the modality lookup
4
- * in `protein-family-modality.json` has one pattern set to match against.
3
+ * GraphQL labels) to a single canonical lowercase form, so a consumer has one
4
+ * form to match against.
5
5
  *
6
- * Why this exists: UniProt keyword text and the modality-JSON patterns
7
- * disagreed on hyphenation ("G-protein coupled receptor" vs
8
- * "G protein-coupled receptor"), causing every GPCR target whose UniProt
9
- * keyword used the hyphenated variant to fall through to the dataset default
10
- * modality. See review of dossier 9ad29ba5 (GLP1R) — 2026-05-13.
6
+ * Why this exists: UniProt keyword text varies in hyphenation
7
+ * ("G-protein coupled receptor" vs "G protein-coupled receptor"), thus an
8
+ * exact match on the raw text misses one of the two spellings.
11
9
  */
12
10
  const FAMILIES = [
13
11
  {
@@ -2,13 +2,6 @@
2
2
  * Pure async client functions for the UniProt REST API
3
3
  * (https://rest.uniprot.org/uniprotkb/).
4
4
  *
5
- * Used by target-assessment as the source of truth for:
6
- * - ChEMBL cross-references — every ChEMBL target id linked to a UniProt
7
- * accession (replaces the hand-curated ALTERNATE_CHEMBL_IDS map).
8
- * - Protein family text — used together with IUPHAR family-target
9
- * resolution to identify sibling receptors in the same pharmacological
10
- * family (replaces the hand-curated RELATED_FAMILY_UNIPROTS map).
11
- *
12
5
  * Absence policy: the OpenAPI document of UniProt marks no field as required,
13
6
  * and the API omits the key of an absent value. Thus a maybe-absent field
14
7
  * carries `.optional()`, not `.nullable()`.
@@ -2,13 +2,6 @@
2
2
  * Pure async client functions for the UniProt REST API
3
3
  * (https://rest.uniprot.org/uniprotkb/).
4
4
  *
5
- * Used by target-assessment as the source of truth for:
6
- * - ChEMBL cross-references — every ChEMBL target id linked to a UniProt
7
- * accession (replaces the hand-curated ALTERNATE_CHEMBL_IDS map).
8
- * - Protein family text — used together with IUPHAR family-target
9
- * resolution to identify sibling receptors in the same pharmacological
10
- * family (replaces the hand-curated RELATED_FAMILY_UNIPROTS map).
11
- *
12
5
  * Absence policy: the OpenAPI document of UniProt marks no field as required,
13
6
  * and the API omits the key of an absent value. Thus a maybe-absent field
14
7
  * carries `.optional()`, not `.nullable()`.
@@ -107,8 +100,8 @@ export async function getReactomePathwaysByUniProt(accession) {
107
100
  }
108
101
  /**
109
102
  * The field list of the search. It is separate from `FIELDS` on purpose:
110
- * `FIELDS` feeds `getUniProtRecord` and the target-assessment dossier, thus a
111
- * widening of it would change what that workflow reads.
103
+ * `FIELDS` feeds `getUniProtRecord`, thus a widening of it would change what
104
+ * that function reads.
112
105
  */
113
106
  const SEARCH_FIELDS = ["accession", "id", "protein_name", "gene_names", "length", "cc_function", "cc_subcellular_location"].join(",");
114
107
  /** A FUNCTION comment runs to several hundred words; this is what one answer carries. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inflexa-ai/harness",
3
- "version": "0.35.8",
3
+ "version": "0.36.1",
4
4
  "description": "Host-agnostic bioinformatics agent harness — hand-rolled agent loop, DBOS-durable workflows, sandboxed compute.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,85 +0,0 @@
1
- /**
2
- * Zod schemas for the `cortex_target_assessments` row shape.
3
- *
4
- * Single source of truth for both Cortex (DB row mappers, HTTP routes) and
5
- * downstream consumers that need to validate the row shape at runtime.
6
- *
7
- * The HTTP API response types in `../api/types.ts` are TypeScript-only
8
- * interfaces tailored to the frontend render path; these Zod schemas describe
9
- * the full DB row including DBOS workflow tracking fields.
10
- */
11
- import { z } from "zod";
12
- export declare const TargetAssessmentStatusSchema: z.ZodEnum<{
13
- running: "running";
14
- completed: "completed";
15
- failed: "failed";
16
- suspended_insufficient_funds: "suspended_insufficient_funds";
17
- queued: "queued";
18
- deleted: "deleted";
19
- }>;
20
- export type TargetAssessmentStatus = z.infer<typeof TargetAssessmentStatusSchema>;
21
- export declare const TargetAssessmentErrorSchema: z.ZodObject<{
22
- kind: z.ZodString;
23
- message: z.ZodString;
24
- details: z.ZodOptional<z.ZodUnknown>;
25
- }, z.core.$strip>;
26
- export type TargetAssessmentError = z.infer<typeof TargetAssessmentErrorSchema>;
27
- export declare const TargetAssessmentListRowSchema: z.ZodObject<{
28
- id: z.ZodString;
29
- organizationId: z.ZodString;
30
- targetId: z.ZodString;
31
- targetLabel: z.ZodString;
32
- goal: z.ZodNullable<z.ZodString>;
33
- status: z.ZodEnum<{
34
- running: "running";
35
- completed: "completed";
36
- failed: "failed";
37
- suspended_insufficient_funds: "suspended_insufficient_funds";
38
- queued: "queued";
39
- deleted: "deleted";
40
- }>;
41
- progress: z.ZodNullable<z.ZodString>;
42
- billingContextId: z.ZodString;
43
- error: z.ZodNullable<z.ZodObject<{
44
- kind: z.ZodString;
45
- message: z.ZodString;
46
- details: z.ZodOptional<z.ZodUnknown>;
47
- }, z.core.$strip>>;
48
- requestedBy: z.ZodString;
49
- workflowRunId: z.ZodNullable<z.ZodString>;
50
- workflowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
- createdAt: z.ZodString;
52
- updatedAt: z.ZodString;
53
- completedAt: z.ZodNullable<z.ZodString>;
54
- }, z.core.$strip>;
55
- export type TargetAssessmentListRow = z.infer<typeof TargetAssessmentListRowSchema>;
56
- export declare const TargetAssessmentRowSchema: z.ZodObject<{
57
- id: z.ZodString;
58
- organizationId: z.ZodString;
59
- targetId: z.ZodString;
60
- targetLabel: z.ZodString;
61
- goal: z.ZodNullable<z.ZodString>;
62
- status: z.ZodEnum<{
63
- running: "running";
64
- completed: "completed";
65
- failed: "failed";
66
- suspended_insufficient_funds: "suspended_insufficient_funds";
67
- queued: "queued";
68
- deleted: "deleted";
69
- }>;
70
- progress: z.ZodNullable<z.ZodString>;
71
- billingContextId: z.ZodString;
72
- error: z.ZodNullable<z.ZodObject<{
73
- kind: z.ZodString;
74
- message: z.ZodString;
75
- details: z.ZodOptional<z.ZodUnknown>;
76
- }, z.core.$strip>>;
77
- requestedBy: z.ZodString;
78
- workflowRunId: z.ZodNullable<z.ZodString>;
79
- workflowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
- createdAt: z.ZodString;
81
- updatedAt: z.ZodString;
82
- completedAt: z.ZodNullable<z.ZodString>;
83
- dossier: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
84
- }, z.core.$strip>;
85
- export type TargetAssessmentRow = z.infer<typeof TargetAssessmentRowSchema>;
@@ -1,37 +0,0 @@
1
- /**
2
- * Zod schemas for the `cortex_target_assessments` row shape.
3
- *
4
- * Single source of truth for both Cortex (DB row mappers, HTTP routes) and
5
- * downstream consumers that need to validate the row shape at runtime.
6
- *
7
- * The HTTP API response types in `../api/types.ts` are TypeScript-only
8
- * interfaces tailored to the frontend render path; these Zod schemas describe
9
- * the full DB row including DBOS workflow tracking fields.
10
- */
11
- import { z } from "zod";
12
- export const TargetAssessmentStatusSchema = z.enum(["queued", "running", "completed", "failed", "deleted", "suspended_insufficient_funds"]);
13
- export const TargetAssessmentErrorSchema = z.object({
14
- kind: z.string(),
15
- message: z.string(),
16
- details: z.unknown().optional(),
17
- });
18
- export const TargetAssessmentListRowSchema = z.object({
19
- id: z.string().uuid(),
20
- organizationId: z.string(),
21
- targetId: z.string(),
22
- targetLabel: z.string(),
23
- goal: z.string().nullable(),
24
- status: TargetAssessmentStatusSchema,
25
- progress: z.string().nullable(),
26
- billingContextId: z.string(),
27
- error: TargetAssessmentErrorSchema.nullable(),
28
- requestedBy: z.string(),
29
- workflowRunId: z.string().nullable(),
30
- workflowId: z.string().nullable().optional(),
31
- createdAt: z.string(),
32
- updatedAt: z.string(),
33
- completedAt: z.string().nullable(),
34
- });
35
- export const TargetAssessmentRowSchema = TargetAssessmentListRowSchema.extend({
36
- dossier: z.record(z.string(), z.unknown()).nullable(),
37
- });