@inflexa-ai/harness 0.18.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/report-session-agent.d.ts +72 -0
- package/dist/agents/report-session-agent.js +87 -0
- package/dist/app/report-session-runtime.d.ts +72 -0
- package/dist/app/report-session-runtime.js +183 -0
- package/dist/app/spawn-report-session.d.ts +32 -5
- package/dist/app/spawn-report-session.js +19 -0
- package/dist/config/environment-stores.d.ts +12 -7
- package/dist/config/resource-limits.d.ts +6 -10
- package/dist/config/resource-limits.js +6 -44
- package/dist/contracts/report-reference.d.ts +4 -0
- package/dist/contracts/report-reference.js +3 -0
- package/dist/index.d.ts +2 -1
- package/dist/lib/chrome.d.ts +14 -0
- package/dist/lib/chrome.js +7 -0
- package/dist/lib/page-capture.d.ts +47 -0
- package/dist/lib/page-capture.js +83 -0
- package/dist/loop/run-agent.js +104 -15
- package/dist/memory/ai-sdk-message-storage.d.ts +9 -4
- package/dist/memory/ai-sdk-message-storage.js +9 -4
- package/dist/memory/count-tokens.js +34 -5
- package/dist/memory/thread-store.d.ts +4 -4
- package/dist/memory/thread-store.js +18 -9
- package/dist/prompts/report-session.d.ts +1 -0
- package/dist/prompts/report-session.js +110 -0
- package/dist/providers/ai-sdk.d.ts +158 -3
- package/dist/providers/ai-sdk.js +234 -23
- package/dist/providers/errors.d.ts +14 -0
- package/dist/providers/errors.js +103 -18
- package/dist/providers/types.d.ts +33 -0
- package/dist/providers/types.js +10 -1
- package/dist/report-model/assert-rules.d.ts +44 -0
- package/dist/report-model/assert-rules.js +97 -0
- package/dist/report-model/draft-hash.d.ts +14 -0
- package/dist/report-model/draft-hash.js +36 -0
- package/dist/report-model/fixture-resolver.js +2 -71
- package/dist/report-model/{mint-snapshot.d.ts → pin-snapshot.d.ts} +7 -7
- package/dist/report-model/{mint-snapshot.js → pin-snapshot.js} +7 -7
- package/dist/report-model/production-resolver.d.ts +124 -0
- package/dist/report-model/production-resolver.js +801 -0
- package/dist/report-model/reference-resolver.d.ts +7 -1
- package/dist/report-model/validate.d.ts +34 -2
- package/dist/report-model/validate.js +37 -17
- package/dist/report-render/page.d.ts +23 -0
- package/dist/report-render/page.js +36 -3
- package/dist/report-render/value-bridge.d.ts +62 -0
- package/dist/report-render/value-bridge.js +82 -0
- package/dist/runtime/assemble.d.ts +39 -0
- package/dist/runtime/assemble.js +67 -6
- package/dist/sandbox/mount-plan.d.ts +7 -0
- package/dist/sandbox/mount-plan.js +7 -2
- package/dist/state/init.js +36 -0
- package/dist/state/purge-analysis.js +1 -0
- package/dist/state/report-session-state.d.ts +139 -0
- package/dist/state/report-session-state.js +177 -0
- package/dist/state/report-versions.d.ts +3 -6
- package/dist/state/report-versions.js +11 -38
- package/dist/state/snapshot-parse.d.ts +34 -0
- package/dist/state/snapshot-parse.js +82 -0
- package/dist/tasks/extract-values-script.d.ts +64 -0
- package/dist/tasks/extract-values-script.js +180 -0
- package/dist/tasks/extract-values.d.ts +124 -0
- package/dist/tasks/extract-values.js +193 -0
- package/dist/tools/ad-hoc-router.d.ts +7 -2
- package/dist/tools/ad-hoc-router.js +2 -1
- package/dist/tools/define-tool.d.ts +29 -0
- package/dist/tools/define-tool.js +26 -0
- package/dist/tools/report/preview-snapshot.d.ts +1 -1
- package/dist/tools/report/preview-snapshot.js +11 -50
- package/dist/tools/report-authoring/authoring-tools.d.ts +181 -24
- package/dist/tools/report-authoring/authoring-tools.js +152 -44
- package/dist/tools/report-session/examine-page.d.ts +90 -0
- package/dist/tools/report-session/examine-page.js +136 -0
- package/dist/tools/report-session/index.d.ts +10 -0
- package/dist/tools/report-session/index.js +10 -0
- package/dist/tools/report-session/preview-report.d.ts +105 -0
- package/dist/tools/report-session/preview-report.js +269 -0
- package/dist/tools/report-session/record-version.d.ts +102 -0
- package/dist/tools/report-session/record-version.js +139 -0
- package/dist/tools/research/generate-plan.js +4 -2
- package/dist/tools/sandbox/list-available-packages.js +2 -1
- package/dist/tools/sandbox/list-available-refs.d.ts +5 -1
- package/dist/tools/sandbox/list-available-refs.js +13 -6
- package/package.json +10 -8
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
* it at — read where it lives, render where the caller will open it. Reading it
|
|
15
15
|
* host-side is what lets a planner ask what reference data exists before any
|
|
16
16
|
* sandbox is created; a step agent asking mid-run sees the same store, because
|
|
17
|
-
* the mount and this path are the same bytes.
|
|
17
|
+
* the mount and this path are the same bytes. An omitted `refStorePath` falls
|
|
18
|
+
* back to that same container path — where a host that mounts the store into its
|
|
19
|
+
* own process (a K8s pod holding the ref-store PVC) already sees it. The fallback
|
|
20
|
+
* is stat-verified like any other root, so a host with nothing mounted there
|
|
21
|
+
* still reports the store as unavailable.
|
|
18
22
|
*
|
|
19
23
|
* The scan reports paths; meaning is joined on afterwards from the install
|
|
20
24
|
* receipt and the catalog it names (organism, format, and each file's internal
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
* it at — read where it lives, render where the caller will open it. Reading it
|
|
15
15
|
* host-side is what lets a planner ask what reference data exists before any
|
|
16
16
|
* sandbox is created; a step agent asking mid-run sees the same store, because
|
|
17
|
-
* the mount and this path are the same bytes.
|
|
17
|
+
* the mount and this path are the same bytes. An omitted `refStorePath` falls
|
|
18
|
+
* back to that same container path — where a host that mounts the store into its
|
|
19
|
+
* own process (a K8s pod holding the ref-store PVC) already sees it. The fallback
|
|
20
|
+
* is stat-verified like any other root, so a host with nothing mounted there
|
|
21
|
+
* still reports the store as unavailable.
|
|
18
22
|
*
|
|
19
23
|
* The scan reports paths; meaning is joined on afterwards from the install
|
|
20
24
|
* receipt and the catalog it names (organism, format, and each file's internal
|
|
@@ -30,9 +34,13 @@ import { z } from "zod";
|
|
|
30
34
|
import { capCodePoints, DETAIL_MAX_LENGTH, DETAIL_NEEDLE_MAX_LENGTH } from "../../loop/tool-detail.js";
|
|
31
35
|
import { REFERENCE_DATA_CATALOG } from "../../reference-data/catalog.js";
|
|
32
36
|
import { parseReferenceInstallReceipt } from "../../reference-data/receipt.js";
|
|
37
|
+
import { REFS_CONTAINER_PATH } from "../../sandbox/mount-plan.js";
|
|
33
38
|
import { defineTool } from "../define-tool.js";
|
|
34
|
-
/**
|
|
35
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Container path the ref store is mounted at: every reported path is rendered
|
|
41
|
+
* under it, and it is the read root when the embedder supplies none.
|
|
42
|
+
*/
|
|
43
|
+
const REFS_ROOT = REFS_CONTAINER_PATH;
|
|
36
44
|
const MAX_ENTRIES = 200;
|
|
37
45
|
const MAX_SCANNED_ENTRIES = 2_000;
|
|
38
46
|
const MAX_PATH_BYTES = 40_000;
|
|
@@ -283,8 +291,6 @@ async function collectFiles(directory, relative, budget) {
|
|
|
283
291
|
*/
|
|
284
292
|
async function scanStore(root, relative, recursive = false) {
|
|
285
293
|
const empty = () => ({ entries: [], scannedEntries: 0, truncated: false });
|
|
286
|
-
if (!root)
|
|
287
|
-
return { state: "unavailable", ...empty() };
|
|
288
294
|
try {
|
|
289
295
|
if (!(await lstat(root)).isDirectory())
|
|
290
296
|
return { state: "unavailable", ...empty() };
|
|
@@ -494,6 +500,7 @@ function renderContent(path, scan, entries) {
|
|
|
494
500
|
}
|
|
495
501
|
/** Create reference discovery over the host-visible reference store. */
|
|
496
502
|
export function createListAvailableRefsTool(deps) {
|
|
503
|
+
const storeRoot = deps.refStorePath ?? REFS_ROOT;
|
|
497
504
|
return defineTool({
|
|
498
505
|
id: "list_available_refs",
|
|
499
506
|
description: "Resolve reference data you need into a real path. Reports the reference data provisioned for this environment right now — the only reference data an analysis script can open. " +
|
|
@@ -570,7 +577,7 @@ export function createListAvailableRefsTool(deps) {
|
|
|
570
577
|
// recursive pass a search from the store root only ever sees directories,
|
|
571
578
|
// which carry no dataset labels, so "find me a regulon network" finds nothing.
|
|
572
579
|
const needleGiven = (query?.trim() ?? "") !== "";
|
|
573
|
-
const raw = await scanStore(
|
|
580
|
+
const raw = await scanStore(storeRoot, posixPath.relative(REFS_ROOT, requested.path) || ".", needleGiven);
|
|
574
581
|
const enriched = enrichEntries(raw.entries, raw);
|
|
575
582
|
const categories = collectCategories(enriched);
|
|
576
583
|
const needle = query?.trim().toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inflexa-ai/harness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "Host-agnostic bioinformatics agent harness \u2014 hand-rolled agent loop, DBOS-durable workflows, sandboxed compute.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -44,11 +44,12 @@
|
|
|
44
44
|
"typecheck": "tsc --noEmit"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@ai-sdk/anthropic": "^4.0.
|
|
48
|
-
"@ai-sdk/openai
|
|
49
|
-
"@ai-sdk/
|
|
50
|
-
"@ai-sdk/provider
|
|
51
|
-
"@
|
|
47
|
+
"@ai-sdk/anthropic": "^4.0.38",
|
|
48
|
+
"@ai-sdk/openai": "^4.0.39",
|
|
49
|
+
"@ai-sdk/openai-compatible": "^3.0.30",
|
|
50
|
+
"@ai-sdk/provider": "^4.0.7",
|
|
51
|
+
"@ai-sdk/provider-utils": "5.0.27",
|
|
52
|
+
"@anthropic-ai/sdk": "^0.116.0",
|
|
52
53
|
"@dbos-inc/dbos-sdk": "^4.23.6",
|
|
53
54
|
"@kubernetes/client-node": "^1.4.0",
|
|
54
55
|
"@opentelemetry/api": "^1.9.1",
|
|
@@ -60,17 +61,18 @@
|
|
|
60
61
|
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
61
62
|
"@opentelemetry/sdk-trace-node": "^2.9.0",
|
|
62
63
|
"@opentelemetry/semantic-conventions": "^1.43.0",
|
|
63
|
-
"ai": "^7.0.
|
|
64
|
+
"ai": "^7.0.61",
|
|
64
65
|
"cheerio": "^1.2.0",
|
|
65
66
|
"dockerode": "^4.0.12",
|
|
66
67
|
"fast-xml-parser": "^5.10.0",
|
|
67
68
|
"hono": "^4.12.30",
|
|
69
|
+
"hyparquet": "^1.28.1",
|
|
68
70
|
"js-tiktoken": "^1.0.21",
|
|
69
71
|
"mime": "^4.1.0",
|
|
70
72
|
"nanoid": "^5.1.16",
|
|
71
73
|
"neverthrow": "^8.2.0",
|
|
72
74
|
"nunjucks": "^3.2.4",
|
|
73
|
-
"openai": "^4.
|
|
75
|
+
"openai": "^7.4.0",
|
|
74
76
|
"p-queue": "^9.3.3",
|
|
75
77
|
"pdf-parse": "^2.4.5",
|
|
76
78
|
"pg": "^8.22.0",
|