@inflexa-ai/harness 0.35.7 → 0.36.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/auth/types.d.ts +5 -14
- package/dist/auth/types.js +3 -10
- package/dist/billing/usage-recorder.d.ts +1 -1
- package/dist/contracts/analogy-report.d.ts +1 -1
- package/dist/contracts/analogy-report.js +1 -1
- package/dist/contracts/chat-parts.d.ts +2 -3
- package/dist/contracts/index.d.ts +0 -4
- package/dist/contracts/index.js +0 -2
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -21
- package/dist/lib/metrics.d.ts +1 -1
- package/dist/lib/otel-spans.d.ts +0 -2
- package/dist/lib/otel-spans.js +0 -2
- package/dist/loop/genai-spans.d.ts +20 -0
- package/dist/loop/genai-spans.js +53 -0
- package/dist/loop/run-agent.d.ts +1 -1
- package/dist/loop/run-agent.js +9 -4
- package/dist/providers/ai-sdk.js +8 -0
- package/dist/runtime/assemble.d.ts +0 -3
- package/dist/runtime/assemble.js +0 -3
- package/dist/state/index.d.ts +0 -2
- package/dist/state/index.js +0 -1
- package/dist/state/init.js +1 -60
- package/dist/state/purge-analysis.d.ts +1 -2
- package/dist/state/purge-analysis.js +1 -2
- package/dist/tasks/regulatory-corpus-boot-refresh.js +1 -1
- package/dist/tools/bio/gene-preclinical-profile.d.ts +1 -3
- package/dist/tools/bio/gene-preclinical-profile.js +1 -3
- package/dist/tools/lib/chembl-client.d.ts +1 -4
- package/dist/tools/lib/chembl-client.js +1 -4
- package/dist/tools/lib/clinical-benchmarks-client.d.ts +1 -1
- package/dist/tools/lib/clinical-benchmarks-client.js +1 -1
- package/dist/tools/lib/clinical-trials-client.d.ts +0 -3
- package/dist/tools/lib/clinical-trials-client.js +0 -3
- package/dist/tools/lib/identifier-resolver.d.ts +5 -7
- package/dist/tools/lib/identifier-resolver.js +5 -7
- package/dist/tools/lib/iuphar-client.d.ts +1 -3
- package/dist/tools/lib/iuphar-client.js +1 -3
- package/dist/tools/lib/opentargets-client.d.ts +1 -1
- package/dist/tools/lib/opentargets-client.js +1 -1
- package/dist/tools/lib/protein-family-normalize.d.ts +5 -7
- package/dist/tools/lib/protein-family-normalize.js +5 -7
- package/dist/tools/lib/uniprot-client.d.ts +0 -7
- package/dist/tools/lib/uniprot-client.js +2 -9
- package/package.json +9 -8
- package/dist/contracts/target-assessment-row.d.ts +0 -85
- package/dist/contracts/target-assessment-row.js +0 -37
- package/dist/contracts/target-dossier.d.ts +0 -12423
- package/dist/contracts/target-dossier.js +0 -1282
- package/dist/prompts/target-assessment/briefs/executive-recommendation.d.ts +0 -1
- package/dist/prompts/target-assessment/briefs/executive-recommendation.js +0 -85
- package/dist/prompts/target-assessment/briefs/index.d.ts +0 -4
- package/dist/prompts/target-assessment/briefs/index.js +0 -4
- package/dist/prompts/target-assessment/briefs/liability-bullets.d.ts +0 -1
- package/dist/prompts/target-assessment/briefs/liability-bullets.js +0 -114
- package/dist/prompts/target-assessment/briefs/target-organ-liabilities.d.ts +0 -1
- package/dist/prompts/target-assessment/briefs/target-organ-liabilities.js +0 -37
- package/dist/prompts/target-assessment/briefs/translational-commentary.d.ts +0 -1
- package/dist/prompts/target-assessment/briefs/translational-commentary.js +0 -23
- package/dist/prompts/target-assessment/drugs-in-class.d.ts +0 -1
- package/dist/prompts/target-assessment/drugs-in-class.js +0 -29
- package/dist/prompts/target-assessment/investigation/adversarial-critique.d.ts +0 -1
- package/dist/prompts/target-assessment/investigation/adversarial-critique.js +0 -67
- package/dist/prompts/target-assessment/investigation/claim-reverification.d.ts +0 -1
- package/dist/prompts/target-assessment/investigation/claim-reverification.js +0 -49
- package/dist/prompts/target-assessment/investigation/index.d.ts +0 -3
- package/dist/prompts/target-assessment/investigation/index.js +0 -3
- package/dist/prompts/target-assessment/investigation/mechanism-proposal.d.ts +0 -1
- package/dist/prompts/target-assessment/investigation/mechanism-proposal.js +0 -49
- package/dist/prompts/target-assessment/modulator-triage.d.ts +0 -1
- package/dist/prompts/target-assessment/modulator-triage.js +0 -31
- package/dist/prompts/target-assessment/off-target-annotator.d.ts +0 -1
- package/dist/prompts/target-assessment/off-target-annotator.js +0 -28
- package/dist/prompts/target-assessment/tox-voice/core.d.ts +0 -1
- package/dist/prompts/target-assessment/tox-voice/core.js +0 -74
- package/dist/prompts/target-assessment/tox-voice/critique.d.ts +0 -7
- package/dist/prompts/target-assessment/tox-voice/critique.js +0 -109
- package/dist/prompts/target-assessment/tox-voice/exemplars.d.ts +0 -8
- package/dist/prompts/target-assessment/tox-voice/exemplars.js +0 -24
- package/dist/prompts/target-assessment/tox-voice/index.d.ts +0 -4
- package/dist/prompts/target-assessment/tox-voice/index.js +0 -4
- package/dist/prompts/target-assessment/tox-voice/vocabulary.d.ts +0 -18
- package/dist/prompts/target-assessment/tox-voice/vocabulary.js +0 -61
- package/dist/state/target-assessments.d.ts +0 -68
- package/dist/state/target-assessments.js +0 -222
- package/dist/workflows/execute-target-assessment.d.ts +0 -118
- package/dist/workflows/execute-target-assessment.js +0 -631
- package/dist/workflows/target-assessment/assemblers/index.d.ts +0 -5
- package/dist/workflows/target-assessment/assemblers/index.js +0 -4
- package/dist/workflows/target-assessment/assemblers/literature.d.ts +0 -281
- package/dist/workflows/target-assessment/assemblers/literature.js +0 -971
- package/dist/workflows/target-assessment/assemblers/orchestrator.d.ts +0 -118
- package/dist/workflows/target-assessment/assemblers/orchestrator.js +0 -945
- package/dist/workflows/target-assessment/assemblers/safety.d.ts +0 -374
- package/dist/workflows/target-assessment/assemblers/safety.js +0 -1068
- package/dist/workflows/target-assessment/assemblers/trials.d.ts +0 -30
- package/dist/workflows/target-assessment/assemblers/trials.js +0 -75
- package/dist/workflows/target-assessment/collectors/index.d.ts +0 -114
- package/dist/workflows/target-assessment/collectors/index.js +0 -538
- package/dist/workflows/target-assessment/coverage.d.ts +0 -97
- package/dist/workflows/target-assessment/coverage.js +0 -86
- package/dist/workflows/target-assessment/decisions/index.d.ts +0 -86
- package/dist/workflows/target-assessment/decisions/index.js +0 -127
- package/dist/workflows/target-assessment/fanout/index.d.ts +0 -32
- package/dist/workflows/target-assessment/fanout/index.js +0 -156
- package/dist/workflows/target-assessment/investigation/index.d.ts +0 -97
- package/dist/workflows/target-assessment/investigation/index.js +0 -419
- package/dist/workflows/target-assessment/lib/approval-precedents.d.ts +0 -73
- package/dist/workflows/target-assessment/lib/approval-precedents.js +0 -185
- package/dist/workflows/target-assessment/lib/citation-validator.d.ts +0 -46
- package/dist/workflows/target-assessment/lib/citation-validator.js +0 -316
- package/dist/workflows/target-assessment/lib/clinical-consequence-annotator.d.ts +0 -65
- package/dist/workflows/target-assessment/lib/clinical-consequence-annotator.js +0 -174
- package/dist/workflows/target-assessment/lib/clinical-evidence-attribution.d.ts +0 -44
- package/dist/workflows/target-assessment/lib/clinical-evidence-attribution.js +0 -152
- package/dist/workflows/target-assessment/lib/compute-derived.d.ts +0 -20
- package/dist/workflows/target-assessment/lib/compute-derived.js +0 -261
- package/dist/workflows/target-assessment/lib/compute-selectivity.d.ts +0 -15
- package/dist/workflows/target-assessment/lib/compute-selectivity.js +0 -18
- package/dist/workflows/target-assessment/lib/dedup-modulators.d.ts +0 -37
- package/dist/workflows/target-assessment/lib/dedup-modulators.js +0 -157
- package/dist/workflows/target-assessment/lib/evidence-conflict-detector.d.ts +0 -17
- package/dist/workflows/target-assessment/lib/evidence-conflict-detector.js +0 -100
- package/dist/workflows/target-assessment/lib/expression-constants.d.ts +0 -21
- package/dist/workflows/target-assessment/lib/expression-constants.js +0 -21
- package/dist/workflows/target-assessment/lib/family-complex-supplement.d.ts +0 -20
- package/dist/workflows/target-assessment/lib/family-complex-supplement.js +0 -36
- package/dist/workflows/target-assessment/lib/fda-label-safety.d.ts +0 -72
- package/dist/workflows/target-assessment/lib/fda-label-safety.js +0 -166
- package/dist/workflows/target-assessment/lib/heterodimer-filter.d.ts +0 -30
- package/dist/workflows/target-assessment/lib/heterodimer-filter.js +0 -44
- package/dist/workflows/target-assessment/lib/hpo-organ-map.d.ts +0 -34
- package/dist/workflows/target-assessment/lib/hpo-organ-map.js +0 -63
- package/dist/workflows/target-assessment/lib/impc-organ-map.d.ts +0 -19
- package/dist/workflows/target-assessment/lib/impc-organ-map.js +0 -39
- package/dist/workflows/target-assessment/lib/intended-polypharm-filter.d.ts +0 -4
- package/dist/workflows/target-assessment/lib/intended-polypharm-filter.js +0 -24
- package/dist/workflows/target-assessment/lib/llm-step.d.ts +0 -80
- package/dist/workflows/target-assessment/lib/llm-step.js +0 -101
- package/dist/workflows/target-assessment/lib/meddra-organ-map.d.ts +0 -40
- package/dist/workflows/target-assessment/lib/meddra-organ-map.js +0 -138
- package/dist/workflows/target-assessment/lib/recommendation-quality-gates.d.ts +0 -17
- package/dist/workflows/target-assessment/lib/recommendation-quality-gates.js +0 -99
- package/dist/workflows/target-assessment/lib/recommendation-sanitizer.d.ts +0 -2
- package/dist/workflows/target-assessment/lib/recommendation-sanitizer.js +0 -51
- package/dist/workflows/target-assessment/lib/regulatory-actions.d.ts +0 -25
- package/dist/workflows/target-assessment/lib/regulatory-actions.js +0 -176
- package/dist/workflows/target-assessment/lib/safety-corroboration.d.ts +0 -44
- package/dist/workflows/target-assessment/lib/safety-corroboration.js +0 -273
- package/dist/workflows/target-assessment/lib/structured-llm.d.ts +0 -61
- package/dist/workflows/target-assessment/lib/structured-llm.js +0 -102
- package/dist/workflows/target-assessment/lib/target-identity-filter.d.ts +0 -59
- package/dist/workflows/target-assessment/lib/target-identity-filter.js +0 -95
- package/dist/workflows/target-assessment/lib/therapeutic-programs.d.ts +0 -20
- package/dist/workflows/target-assessment/lib/therapeutic-programs.js +0 -68
- package/dist/workflows/target-assessment/metrics.d.ts +0 -16
- package/dist/workflows/target-assessment/metrics.js +0 -30
- package/dist/workflows/target-assessment/phase4-assemble.d.ts +0 -3182
- package/dist/workflows/target-assessment/phase4-assemble.js +0 -39
- package/dist/workflows/target-assessment/phase5-persist.d.ts +0 -59
- package/dist/workflows/target-assessment/phase5-persist.js +0 -349
- package/dist/workflows/target-assessment/progress-stream.d.ts +0 -75
- package/dist/workflows/target-assessment/progress-stream.js +0 -110
- package/dist/workflows/target-assessment/progress.d.ts +0 -39
- package/dist/workflows/target-assessment/progress.js +0 -77
- package/dist/workflows/target-assessment/schemas.d.ts +0 -970
- package/dist/workflows/target-assessment/schemas.js +0 -318
- package/dist/workflows/target-assessment/steps/collectors/pathways.d.ts +0 -15
- package/dist/workflows/target-assessment/steps/collectors/pathways.js +0 -58
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-class-drug-step.d.ts +0 -34
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-class-drug-step.js +0 -31
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-trial-step.d.ts +0 -57
- package/dist/workflows/target-assessment/steps/fanout/aes-for-one-trial-step.js +0 -54
- package/dist/workflows/target-assessment/steps/fanout/faers-for-one-modulator-step.d.ts +0 -35
- package/dist/workflows/target-assessment/steps/fanout/faers-for-one-modulator-step.js +0 -32
- package/dist/workflows/target-assessment/steps/fanout/index.d.ts +0 -14
- package/dist/workflows/target-assessment/steps/fanout/index.js +0 -10
- package/dist/workflows/target-assessment/steps/fanout/polypharm-for-one-modulator-step.d.ts +0 -29
- package/dist/workflows/target-assessment/steps/fanout/polypharm-for-one-modulator-step.js +0 -29
- package/dist/workflows/target-assessment/steps/phase2-aggregate.d.ts +0 -657
- package/dist/workflows/target-assessment/steps/phase2-aggregate.js +0 -34
- package/dist/workflows/target-assessment/steps/phase3-aggregate.d.ts +0 -806
- package/dist/workflows/target-assessment/steps/phase3-aggregate.js +0 -16
- package/dist/workflows/target-assessment/steps/synthesis/diagnostics.d.ts +0 -28
- package/dist/workflows/target-assessment/steps/synthesis/diagnostics.js +0 -27
- package/dist/workflows/target-assessment/sub-workflows/index.d.ts +0 -15
- package/dist/workflows/target-assessment/sub-workflows/index.js +0 -11
- package/dist/workflows/target-assessment/sub-workflows/per-class-drug-aes.d.ts +0 -41
- package/dist/workflows/target-assessment/sub-workflows/per-class-drug-aes.js +0 -12
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-faers.d.ts +0 -41
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-faers.js +0 -12
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-polypharm.d.ts +0 -37
- package/dist/workflows/target-assessment/sub-workflows/per-modulator-polypharm.js +0 -12
- package/dist/workflows/target-assessment/sub-workflows/per-trial-aes.d.ts +0 -66
- package/dist/workflows/target-assessment/sub-workflows/per-trial-aes.js +0 -12
- package/dist/workflows/target-assessment/synthesis/index.d.ts +0 -607
- package/dist/workflows/target-assessment/synthesis/index.js +0 -354
- package/dist/workflows/target-assessment/synthesis-probes.d.ts +0 -56
- 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
|
|
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
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
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
|
|
88
|
-
*
|
|
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
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
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
|
|
276
|
-
*
|
|
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).
|
|
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).
|
|
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
|
|
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
|
|
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
|
|
4
|
-
*
|
|
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
|
|
7
|
-
*
|
|
8
|
-
*
|
|
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
|
|
4
|
-
*
|
|
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
|
|
7
|
-
*
|
|
8
|
-
*
|
|
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
|
|
111
|
-
*
|
|
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.
|
|
3
|
+
"version": "0.36.0",
|
|
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",
|
|
@@ -47,11 +47,12 @@
|
|
|
47
47
|
"typecheck": "tsc --noEmit"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@ai-sdk/anthropic": "^4.0.
|
|
51
|
-
"@ai-sdk/openai": "^4.0.
|
|
52
|
-
"@ai-sdk/openai-compatible": "^3.0.
|
|
53
|
-
"@ai-sdk/
|
|
54
|
-
"@ai-sdk/provider
|
|
50
|
+
"@ai-sdk/anthropic": "^4.0.53",
|
|
51
|
+
"@ai-sdk/openai": "^4.0.66",
|
|
52
|
+
"@ai-sdk/openai-compatible": "^3.0.48",
|
|
53
|
+
"@ai-sdk/otel": "^1.0.99",
|
|
54
|
+
"@ai-sdk/provider": "^4.0.14",
|
|
55
|
+
"@ai-sdk/provider-utils": "5.0.40",
|
|
55
56
|
"@anthropic-ai/sdk": "^0.116.0",
|
|
56
57
|
"@dbos-inc/dbos-sdk": "^4.23.6",
|
|
57
58
|
"@fontsource-variable/space-grotesk": "5.1.1",
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
"@opentelemetry/sdk-trace-node": "^2.9.0",
|
|
69
70
|
"@opentelemetry/semantic-conventions": "^1.43.0",
|
|
70
71
|
"ag-grid-community": "36.1.0",
|
|
71
|
-
"ai": "^7.0.
|
|
72
|
+
"ai": "^7.0.99",
|
|
72
73
|
"cheerio": "^1.2.0",
|
|
73
74
|
"dockerode": "^4.0.12",
|
|
74
75
|
"echarts": "6.1.0",
|
|
@@ -94,7 +95,7 @@
|
|
|
94
95
|
"uuid": "^11.1.1"
|
|
95
96
|
},
|
|
96
97
|
"devDependencies": {
|
|
97
|
-
"@ai-sdk/amazon-bedrock": "^5.0.
|
|
98
|
+
"@ai-sdk/amazon-bedrock": "^5.0.82",
|
|
98
99
|
"@eslint/js": "^10.0.1",
|
|
99
100
|
"@types/bun": "latest",
|
|
100
101
|
"@types/dockerode": "^3.3.47",
|
|
@@ -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
|
-
});
|