@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.
Files changed (83) hide show
  1. package/dist/agents/report-session-agent.d.ts +72 -0
  2. package/dist/agents/report-session-agent.js +87 -0
  3. package/dist/app/report-session-runtime.d.ts +72 -0
  4. package/dist/app/report-session-runtime.js +183 -0
  5. package/dist/app/spawn-report-session.d.ts +32 -5
  6. package/dist/app/spawn-report-session.js +19 -0
  7. package/dist/config/environment-stores.d.ts +12 -7
  8. package/dist/config/resource-limits.d.ts +6 -10
  9. package/dist/config/resource-limits.js +6 -44
  10. package/dist/contracts/report-reference.d.ts +4 -0
  11. package/dist/contracts/report-reference.js +3 -0
  12. package/dist/index.d.ts +2 -1
  13. package/dist/lib/chrome.d.ts +14 -0
  14. package/dist/lib/chrome.js +7 -0
  15. package/dist/lib/page-capture.d.ts +47 -0
  16. package/dist/lib/page-capture.js +83 -0
  17. package/dist/loop/run-agent.js +104 -15
  18. package/dist/memory/ai-sdk-message-storage.d.ts +9 -4
  19. package/dist/memory/ai-sdk-message-storage.js +9 -4
  20. package/dist/memory/count-tokens.js +34 -5
  21. package/dist/memory/thread-store.d.ts +4 -4
  22. package/dist/memory/thread-store.js +18 -9
  23. package/dist/prompts/report-session.d.ts +1 -0
  24. package/dist/prompts/report-session.js +110 -0
  25. package/dist/providers/ai-sdk.d.ts +158 -3
  26. package/dist/providers/ai-sdk.js +234 -23
  27. package/dist/providers/errors.d.ts +14 -0
  28. package/dist/providers/errors.js +103 -18
  29. package/dist/providers/types.d.ts +33 -0
  30. package/dist/providers/types.js +10 -1
  31. package/dist/report-model/assert-rules.d.ts +44 -0
  32. package/dist/report-model/assert-rules.js +97 -0
  33. package/dist/report-model/draft-hash.d.ts +14 -0
  34. package/dist/report-model/draft-hash.js +36 -0
  35. package/dist/report-model/fixture-resolver.js +2 -71
  36. package/dist/report-model/{mint-snapshot.d.ts → pin-snapshot.d.ts} +7 -7
  37. package/dist/report-model/{mint-snapshot.js → pin-snapshot.js} +7 -7
  38. package/dist/report-model/production-resolver.d.ts +124 -0
  39. package/dist/report-model/production-resolver.js +801 -0
  40. package/dist/report-model/reference-resolver.d.ts +7 -1
  41. package/dist/report-model/validate.d.ts +34 -2
  42. package/dist/report-model/validate.js +37 -17
  43. package/dist/report-render/page.d.ts +23 -0
  44. package/dist/report-render/page.js +36 -3
  45. package/dist/report-render/value-bridge.d.ts +62 -0
  46. package/dist/report-render/value-bridge.js +82 -0
  47. package/dist/runtime/assemble.d.ts +39 -0
  48. package/dist/runtime/assemble.js +67 -6
  49. package/dist/sandbox/mount-plan.d.ts +7 -0
  50. package/dist/sandbox/mount-plan.js +7 -2
  51. package/dist/state/init.js +36 -0
  52. package/dist/state/purge-analysis.js +1 -0
  53. package/dist/state/report-session-state.d.ts +139 -0
  54. package/dist/state/report-session-state.js +177 -0
  55. package/dist/state/report-versions.d.ts +3 -6
  56. package/dist/state/report-versions.js +11 -38
  57. package/dist/state/snapshot-parse.d.ts +34 -0
  58. package/dist/state/snapshot-parse.js +82 -0
  59. package/dist/tasks/extract-values-script.d.ts +64 -0
  60. package/dist/tasks/extract-values-script.js +180 -0
  61. package/dist/tasks/extract-values.d.ts +124 -0
  62. package/dist/tasks/extract-values.js +193 -0
  63. package/dist/tools/ad-hoc-router.d.ts +7 -2
  64. package/dist/tools/ad-hoc-router.js +2 -1
  65. package/dist/tools/define-tool.d.ts +29 -0
  66. package/dist/tools/define-tool.js +26 -0
  67. package/dist/tools/report/preview-snapshot.d.ts +1 -1
  68. package/dist/tools/report/preview-snapshot.js +11 -50
  69. package/dist/tools/report-authoring/authoring-tools.d.ts +181 -24
  70. package/dist/tools/report-authoring/authoring-tools.js +152 -44
  71. package/dist/tools/report-session/examine-page.d.ts +90 -0
  72. package/dist/tools/report-session/examine-page.js +136 -0
  73. package/dist/tools/report-session/index.d.ts +10 -0
  74. package/dist/tools/report-session/index.js +10 -0
  75. package/dist/tools/report-session/preview-report.d.ts +105 -0
  76. package/dist/tools/report-session/preview-report.js +269 -0
  77. package/dist/tools/report-session/record-version.d.ts +102 -0
  78. package/dist/tools/report-session/record-version.js +139 -0
  79. package/dist/tools/research/generate-plan.js +4 -2
  80. package/dist/tools/sandbox/list-available-packages.js +2 -1
  81. package/dist/tools/sandbox/list-available-refs.d.ts +5 -1
  82. package/dist/tools/sandbox/list-available-refs.js +13 -6
  83. 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
- /** Container path the ref store is mounted at; every reported path is rendered under it. */
35
- const REFS_ROOT = "/mnt/refs";
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(deps.refStorePath, posixPath.relative(REFS_ROOT, requested.path) || ".", needleGiven);
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.18.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.20",
48
- "@ai-sdk/openai-compatible": "^3.0.10",
49
- "@ai-sdk/provider": "^4.0.3",
50
- "@ai-sdk/provider-utils": "5.0.10",
51
- "@anthropic-ai/sdk": "^0.107.0",
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.28",
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.104.0",
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",