@inflexa-ai/harness 0.38.0 → 0.39.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 (38) hide show
  1. package/dist/agents/system-prompt.d.ts +3 -4
  2. package/dist/agents/system-prompt.js +1 -1
  3. package/dist/billing/cached-resolver.d.ts +11 -7
  4. package/dist/billing/cached-resolver.js +17 -11
  5. package/dist/execution/step-summary.js +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/dist/loop/metrics.js +1 -1
  8. package/dist/loop/run-agent.d.ts +2 -2
  9. package/dist/loop/run-agent.js +6 -8
  10. package/dist/loop/types.d.ts +1 -1
  11. package/dist/prompts/SOUL.d.ts +3 -3
  12. package/dist/prompts/SOUL.js +2 -16
  13. package/dist/prompts/conversation.d.ts +1 -1
  14. package/dist/prompts/conversation.js +14 -24
  15. package/dist/prompts/execute-analysis/step-summary.js +3 -4
  16. package/dist/prompts/planner.js +44 -45
  17. package/dist/prompts/sandbox/scientific-executor.d.ts +1 -1
  18. package/dist/prompts/sandbox/scientific-executor.js +5 -6
  19. package/dist/prompts/sandbox-standards.d.ts +1 -1
  20. package/dist/prompts/sandbox-standards.js +6 -7
  21. package/dist/prompts/synthesis-agent.d.ts +1 -1
  22. package/dist/prompts/synthesis-agent.js +9 -13
  23. package/dist/providers/types.d.ts +5 -4
  24. package/dist/sandbox/types.d.ts +5 -1
  25. package/dist/tools/ad-hoc-router.js +2 -1
  26. package/dist/tools/execute-analysis.js +7 -9
  27. package/dist/tools/report-session/examine-page.d.ts +6 -3
  28. package/dist/tools/report-session/examine-page.js +16 -8
  29. package/dist/tools/report-session/index.d.ts +1 -1
  30. package/dist/tools/report-session/preview-report.js +11 -9
  31. package/dist/tools/report-session/session-page-publisher.d.ts +17 -21
  32. package/dist/tools/report-session/session-page-publisher.js +5 -7
  33. package/dist/tools/research/generate-analogy-report.js +2 -4
  34. package/dist/tools/research/generate-plan.js +7 -8
  35. package/dist/tools/sandbox/link-packages.d.ts +8 -0
  36. package/dist/tools/sandbox/link-packages.js +19 -9
  37. package/dist/tools/sandbox/list-available-refs.js +1 -2
  38. package/package.json +1 -1
@@ -34,6 +34,19 @@ function describeParseError(entry, error) {
34
34
  return `"${entry}" pins with the specifier "${error.specifier}", which this tool cannot honor — pass a bare name, or name==version with one exact version`;
35
35
  }
36
36
  }
37
+ /**
38
+ * Call the seam, and give the outcomes or the one reason that the call gave
39
+ * no answer. An `err` and a rejected realization each give that reason, thus
40
+ * no call site sees a throw.
41
+ */
42
+ export async function callExtendAnalysisFarm(extendAnalysisFarm, analysisId, queries) {
43
+ try {
44
+ return (await extendAnalysisFarm(analysisId, queries)).mapErr((failure) => failure.reason);
45
+ }
46
+ catch (cause) {
47
+ return err(cause instanceof Error ? cause.message : String(cause));
48
+ }
49
+ }
37
50
  export function createLinkPackagesTool(deps) {
38
51
  return defineTool({
39
52
  id: "link_packages",
@@ -67,17 +80,14 @@ export function createLinkPackagesTool(deps) {
67
80
  }
68
81
  queries.push(parsed.value);
69
82
  }
70
- // A realization throw reads as `unavailable` per query. The loop
71
- // would render the throw as a raw tool error, and a raw driver
72
- // message teaches the agent nothing that `reason` does not.
73
- try {
74
- const outcomes = await deps.extendAnalysisFarm(deps.analysisId, queries);
75
- return ok({ outcomes });
76
- }
77
- catch (cause) {
78
- const reason = cause instanceof Error ? cause.message : String(cause);
83
+ // A call that gave no answer reads as `unavailable` per query. A
84
+ // raw tool error teaches the agent nothing that `reason` does not.
85
+ const linked = await callExtendAnalysisFarm(deps.extendAnalysisFarm, deps.analysisId, queries);
86
+ if (linked.isErr()) {
87
+ const reason = linked.error;
79
88
  return ok({ outcomes: queries.map((query) => ({ kind: "unavailable", spelling: query.spelling, reason })) });
80
89
  }
90
+ return ok({ outcomes: linked.value });
81
91
  },
82
92
  });
83
93
  }
@@ -515,8 +515,7 @@ export function createListAvailableRefsTool(deps) {
515
515
  '`category` is shorthand for a top-level group (e.g. "pathways", "regulatory-networks"), and the groups present come back in `categories`; ' +
516
516
  "`limit` caps the entries returned. The response carries `returned`, `total`, and `hasMore`, so truncation is never silent. " +
517
517
  "An empty result means the dataset is absent right now — not that it is unobtainable. Say so; never guess a path, and never silently substitute a different dataset. " +
518
- "The store is provisioned by the host and is NOT frozen: datasets can be added through the host's own provisioning path, and whatever is added shows up on a later call. " +
519
- "So before you report a gap as permanent, check whether any tool you hold reaches that provisioning path — offer that route if one exists, and call the gap permanent only when none does.",
518
+ "The store is provisioned by the host and is NOT frozen: datasets can be added through the host's own provisioning path, and whatever is added shows up on a later call.",
520
519
  inputSchema: ListAvailableRefsInputSchema,
521
520
  // `execute` resolves `path ?? category` for the subtree it inspects, and
522
521
  // it ignores `category` when `path` is present. `query` is an ADDITIVE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inflexa-ai/harness",
3
- "version": "0.38.0",
3
+ "version": "0.39.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",