@inflexa-ai/harness 0.46.0 → 0.47.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/README.md +1 -1
- package/dist/agents/conversation-agent.d.ts +3 -8
- package/dist/agents/conversation-agent.js +24 -4
- package/dist/agents/report-session-agent.d.ts +11 -14
- package/dist/agents/report-session-agent.js +30 -17
- package/dist/agents/sandbox/shared.d.ts +18 -13
- package/dist/agents/sandbox/shared.js +42 -27
- package/dist/agents/sandbox/types.d.ts +1 -1
- package/dist/agents/sandbox-catalog.d.ts +2 -0
- package/dist/agents/sandbox-catalog.js +30 -1
- package/dist/app/chat-turn-workflow.js +5 -6
- package/dist/app/synthesize-run.d.ts +10 -6
- package/dist/app/synthesize-run.js +4 -2
- package/dist/contracts/analogy-report.d.ts +46 -2
- package/dist/contracts/analogy-report.js +31 -25
- package/dist/contracts/chat-parts.d.ts +3 -14
- package/dist/contracts/report-reference.d.ts +2 -1
- package/dist/contracts/report-reference.js +2 -1
- package/dist/contracts/schemas/chat-parts.d.ts +0 -27
- package/dist/contracts/schemas/chat-parts.js +1 -3
- package/dist/execution/run-canceler.d.ts +2 -0
- package/dist/execution/run-canceler.js +9 -0
- package/dist/execution/run-synthesis.d.ts +36 -8
- package/dist/execution/run-synthesis.js +114 -32
- package/dist/index.d.ts +2 -5
- package/dist/index.js +3 -6
- package/dist/input-scan/enrich.d.ts +5 -10
- package/dist/input-scan/enrich.js +12 -8
- package/dist/lib/hooks.d.ts +9 -0
- package/dist/lib/hooks.js +6 -1
- package/dist/lib/markdown-pdf.d.ts +27 -0
- package/dist/lib/markdown-pdf.js +236 -0
- package/dist/lib/metrics.d.ts +31 -0
- package/dist/lib/metrics.js +64 -0
- package/dist/lib/pdf-text.d.ts +23 -0
- package/dist/lib/pdf-text.js +34 -0
- package/dist/lib/regulatory-corpus/fetch-fda-guidance.js +3 -5
- package/dist/lib/regulatory-corpus/fetch-ich.js +3 -5
- package/dist/loop/run-loop.d.ts +5 -0
- package/dist/loop/run-loop.js +30 -2
- package/dist/loop/sub-agent.js +5 -6
- package/dist/loop/tool-name-repair.d.ts +11 -0
- package/dist/loop/tool-name-repair.js +23 -0
- package/dist/loop/turn-credentials.d.ts +5 -0
- package/dist/loop/turn-credentials.js +17 -0
- package/dist/loop/types.d.ts +14 -0
- package/dist/memory/card-builders.d.ts +1 -1
- package/dist/prompts/SOUL.d.ts +6 -6
- package/dist/prompts/SOUL.js +22 -121
- package/dist/prompts/analogical-reasoner.d.ts +1 -1
- package/dist/prompts/analogical-reasoner.js +35 -101
- package/dist/prompts/briefing.d.ts +20 -11
- package/dist/prompts/briefing.js +36 -19
- package/dist/prompts/conversation.d.ts +1 -1
- package/dist/prompts/conversation.js +103 -383
- package/dist/prompts/planner.d.ts +1 -5
- package/dist/prompts/planner.js +45 -128
- package/dist/prompts/report-session.d.ts +1 -1
- package/dist/prompts/report-session.js +26 -57
- package/dist/prompts/sandbox/bulk-transcriptomics-agent.d.ts +1 -1
- package/dist/prompts/sandbox/bulk-transcriptomics-agent.js +3 -3
- package/dist/prompts/sandbox/cheminformatics-agent.d.ts +1 -1
- package/dist/prompts/sandbox/cheminformatics-agent.js +12 -47
- package/dist/prompts/sandbox/chromatin-agent.d.ts +1 -1
- package/dist/prompts/sandbox/chromatin-agent.js +4 -5
- package/dist/prompts/sandbox/data-profiler.js +11 -34
- package/dist/prompts/sandbox/dna-methylation-agent.d.ts +1 -1
- package/dist/prompts/sandbox/dna-methylation-agent.js +3 -1
- package/dist/prompts/sandbox/drug-repurposing-agent.d.ts +1 -1
- package/dist/prompts/sandbox/drug-repurposing-agent.js +23 -73
- package/dist/prompts/sandbox/enrichment-agent.d.ts +1 -1
- package/dist/prompts/sandbox/enrichment-agent.js +3 -1
- package/dist/prompts/sandbox/genomic-variant-agent.d.ts +1 -1
- package/dist/prompts/sandbox/genomic-variant-agent.js +3 -4
- package/dist/prompts/sandbox/immune-profiling-agent.d.ts +1 -1
- package/dist/prompts/sandbox/immune-profiling-agent.js +5 -4
- package/dist/prompts/sandbox/metabolomics-agent.d.ts +1 -1
- package/dist/prompts/sandbox/metabolomics-agent.js +3 -1
- package/dist/prompts/sandbox/microbiome-agent.d.ts +1 -1
- package/dist/prompts/sandbox/microbiome-agent.js +3 -1
- package/dist/prompts/sandbox/multi-omics-integration-agent.d.ts +1 -1
- package/dist/prompts/sandbox/multi-omics-integration-agent.js +3 -1
- package/dist/prompts/sandbox/multimodal-sc-agent.d.ts +1 -1
- package/dist/prompts/sandbox/multimodal-sc-agent.js +3 -1
- package/dist/prompts/sandbox/network-agent.d.ts +1 -1
- package/dist/prompts/sandbox/network-agent.js +3 -1
- package/dist/prompts/sandbox/pkpd-clinical-response-agent.d.ts +1 -1
- package/dist/prompts/sandbox/pkpd-clinical-response-agent.js +4 -7
- package/dist/prompts/sandbox/proteomics-agent.d.ts +1 -1
- package/dist/prompts/sandbox/proteomics-agent.js +3 -1
- package/dist/prompts/sandbox/scientific-executor.d.ts +1 -1
- package/dist/prompts/sandbox/scientific-executor.js +0 -12
- package/dist/prompts/sandbox/single-cell-agent.d.ts +1 -1
- package/dist/prompts/sandbox/single-cell-agent.js +3 -1
- package/dist/prompts/sandbox/spatial-omics-agent.d.ts +1 -1
- package/dist/prompts/sandbox/spatial-omics-agent.js +3 -1
- package/dist/prompts/sandbox/statistical-modeling-agent.d.ts +1 -1
- package/dist/prompts/sandbox/statistical-modeling-agent.js +4 -4
- package/dist/prompts/sandbox/translational-safety-agent.d.ts +1 -1
- package/dist/prompts/sandbox/translational-safety-agent.js +10 -29
- package/dist/prompts/sandbox-standards.d.ts +15 -18
- package/dist/prompts/sandbox-standards.js +96 -305
- package/dist/prompts/synthesis-agent.d.ts +1 -1
- package/dist/prompts/synthesis-agent.js +24 -90
- package/dist/provenance/collector.d.ts +2 -5
- package/dist/provenance/collector.js +2 -5
- package/dist/provenance/seam.d.ts +36 -1
- package/dist/provenance/workspace-reads.d.ts +36 -0
- package/dist/provenance/workspace-reads.js +33 -0
- package/dist/providers/request-headers.js +12 -3
- package/dist/report-model/production-resolver.d.ts +22 -52
- package/dist/report-model/production-resolver.js +43 -112
- package/dist/report-render/chart-export.d.ts +9 -0
- package/dist/report-render/chart-export.js +1 -1
- package/dist/report-render/views/chart-view.d.ts +1 -0
- package/dist/report-render/views/chart-view.js +1 -0
- package/dist/report-render/views/lineage.d.ts +1 -0
- package/dist/report-render/views/page-view.d.ts +1 -0
- package/dist/report-render/views/page-view.js +1 -0
- package/dist/report-render/views/prose.d.ts +1 -0
- package/dist/report-render/views/prose.js +1 -0
- package/dist/report-render/views/references-view.d.ts +1 -0
- package/dist/report-render/views/values.d.ts +1 -0
- package/dist/report-render/views/values.js +1 -0
- package/dist/runtime/assemble.d.ts +20 -9
- package/dist/runtime/assemble.js +47 -38
- package/dist/sandbox/client.d.ts +5 -3
- package/dist/sandbox/create-sandbox.d.ts +7 -12
- package/dist/sandbox/create-sandbox.js +15 -37
- package/dist/sandbox/docker-client.d.ts +1 -3
- package/dist/sandbox/docker-client.js +3 -5
- package/dist/sandbox/exec-outcome.d.ts +11 -11
- package/dist/sandbox/exec-outcome.js +22 -22
- package/dist/sandbox/exec.d.ts +5 -0
- package/dist/sandbox/exec.js +9 -1
- package/dist/sandbox/identity.d.ts +4 -16
- package/dist/sandbox/identity.js +5 -21
- package/dist/sandbox/k8s-client.d.ts +0 -1
- package/dist/sandbox/k8s-client.js +8 -13
- package/dist/sandbox/lease-names.d.ts +6 -0
- package/dist/sandbox/lease-names.js +12 -0
- package/dist/sandbox/leases.d.ts +105 -0
- package/dist/sandbox/leases.js +519 -0
- package/dist/sandbox/liveness.d.ts +5 -2
- package/dist/sandbox/mount-plan.d.ts +10 -1
- package/dist/sandbox/mount-plan.js +7 -1
- package/dist/sandbox/reconciler.d.ts +58 -0
- package/dist/sandbox/reconciler.js +153 -0
- package/dist/sandbox/sandbox-step-translate.d.ts +1 -1
- package/dist/sandbox/types.d.ts +25 -18
- package/dist/sandbox/types.js +10 -4
- package/dist/schemas/plan-schemas.d.ts +0 -21
- package/dist/schemas/plan-schemas.js +2 -3
- package/dist/schemas/run-synthesis.d.ts +2 -2
- package/dist/schemas/run-synthesis.js +3 -3
- package/dist/schemas/validate-plan.d.ts +1 -14
- package/dist/schemas/validate-plan.js +5 -24
- package/dist/schemas/workflow-state.d.ts +3 -32
- package/dist/schemas/workflow-state.js +4 -13
- package/dist/state/index.d.ts +0 -1
- package/dist/state/index.js +0 -1
- package/dist/state/migrations/20261030120000_lease_the_sandboxes.d.ts +7 -0
- package/dist/state/migrations/20261030120000_lease_the_sandboxes.js +34 -0
- package/dist/state/migrations/20261030120100_drop_the_report_derivations.d.ts +5 -0
- package/dist/state/migrations/20261030120100_drop_the_report_derivations.js +9 -0
- package/dist/state/migrations/20261030120200_keep_the_report_derivations.d.ts +6 -0
- package/dist/state/migrations/20261030120200_keep_the_report_derivations.js +10 -0
- package/dist/state/migrations/index.js +6 -0
- package/dist/state/purge-analysis.d.ts +4 -2
- package/dist/state/purge-analysis.js +22 -11
- package/dist/state/sandbox-leases.d.ts +81 -0
- package/dist/state/sandbox-leases.js +247 -0
- package/dist/state/schema.d.ts +1 -13
- package/dist/state/schema.js +1 -6
- package/dist/state/step-executions.d.ts +0 -2
- package/dist/state/step-executions.js +1 -4
- package/dist/tasks/data-profile.d.ts +40 -2
- package/dist/tasks/data-profile.js +89 -87
- package/dist/testing.d.ts +2 -0
- package/dist/testing.js +6 -1
- package/dist/tools/ad-hoc-router.d.ts +1 -6
- package/dist/tools/ad-hoc-router.js +5 -48
- package/dist/tools/bio/comptox.js +1 -1
- package/dist/tools/bio/drug-gene-interactions.js +1 -1
- package/dist/tools/bio/gene-disease-evidence.js +1 -1
- package/dist/tools/bio/keys.d.ts +1 -1
- package/dist/tools/bio/pubmed.js +31 -0
- package/dist/tools/bio/search-gene.js +17 -0
- package/dist/tools/bio/search-geo-datasets.js +13 -0
- package/dist/tools/bio/search-regulatory-approvals.js +1 -1
- package/dist/tools/define-tool.d.ts +25 -2
- package/dist/tools/define-tool.js +11 -1
- package/dist/tools/display/show-user.js +1 -1
- package/dist/tools/execute-analysis.d.ts +1 -3
- package/dist/tools/execute-analysis.js +5 -33
- package/dist/tools/report-session/index.d.ts +0 -1
- package/dist/tools/report-session/index.js +0 -1
- package/dist/tools/report-session/script-tools.d.ts +30 -0
- package/dist/tools/report-session/script-tools.js +177 -0
- package/dist/tools/research/generate-analogy-report.d.ts +16 -9
- package/dist/tools/research/generate-analogy-report.js +111 -49
- package/dist/tools/research/generate-plan.d.ts +102 -7
- package/dist/tools/research/generate-plan.js +74 -43
- package/dist/tools/research/index.d.ts +4 -3
- package/dist/tools/research/index.js +4 -3
- package/dist/tools/research/inspect-run.d.ts +0 -1
- package/dist/tools/research/inspect-run.js +5 -10
- package/dist/tools/research/search-arxiv.js +15 -0
- package/dist/tools/research/search-github-repos.js +13 -0
- package/dist/tools/research/search-semantic-scholar.js +16 -0
- package/dist/tools/research/synthesis-lookups.d.ts +21 -0
- package/dist/tools/research/synthesis-lookups.js +29 -0
- package/dist/tools/research/web-fetch.d.ts +1 -1
- package/dist/tools/research/web-fetch.js +14 -12
- package/dist/tools/sandbox/lease-tools.d.ts +32 -0
- package/dist/tools/sandbox/lease-tools.js +60 -0
- package/dist/tools/script/codemode-worker.d.ts +5 -0
- package/dist/tools/script/codemode-worker.js +5 -0
- package/dist/tools/script/file-tools.d.ts +100 -0
- package/dist/tools/script/file-tools.js +377 -0
- package/dist/tools/script/metrics.d.ts +21 -0
- package/dist/tools/script/metrics.js +38 -0
- package/dist/tools/script/quickjs.wasm +0 -0
- package/dist/tools/script/run-script.d.ts +76 -0
- package/dist/tools/script/run-script.js +326 -0
- package/dist/tools/script/scratch.d.ts +81 -0
- package/dist/tools/script/scratch.js +142 -0
- package/dist/tools/start-report-session.js +1 -1
- package/dist/tools/workspace/edit-file.js +2 -1
- package/dist/tools/workspace/execute-command.d.ts +9 -13
- package/dist/tools/workspace/execute-command.js +23 -19
- package/dist/tools/workspace/file-stat.js +1 -1
- package/dist/tools/workspace/grep.d.ts +5 -2
- package/dist/tools/workspace/grep.js +19 -10
- package/dist/tools/workspace/mutator.d.ts +48 -4
- package/dist/tools/workspace/mutator.js +43 -12
- package/dist/tools/workspace/read-file.d.ts +5 -2
- package/dist/tools/workspace/read-file.js +15 -11
- package/dist/tools/workspace/read-surface.d.ts +17 -0
- package/dist/tools/workspace/read-surface.js +17 -0
- package/dist/tools/workspace/result-bounds.d.ts +1 -0
- package/dist/tools/workspace/run-exec.d.ts +12 -13
- package/dist/tools/workspace/run-exec.js +13 -13
- package/dist/tools/workspace/scan-inputs.d.ts +2 -5
- package/dist/tools/workspace/scan-inputs.js +2 -3
- package/dist/tools/workspace/show-file.js +1 -1
- package/dist/tools/workspace/show-plan.js +4 -3
- package/dist/tools/workspace/write-file.js +2 -1
- package/dist/workflows/execute-analysis-scheduler.d.ts +0 -26
- package/dist/workflows/execute-analysis-scheduler.js +12 -32
- package/dist/workflows/execute-analysis.d.ts +17 -35
- package/dist/workflows/execute-analysis.js +13 -107
- package/dist/workflows/pause.js +29 -22
- package/dist/workflows/sandbox-step.d.ts +16 -31
- package/dist/workflows/sandbox-step.js +36 -71
- package/dist/workflows/test/sql-writes.d.ts +0 -1
- package/dist/workflows/test/sql-writes.js +0 -2
- package/dist/workspace/filesystem.d.ts +2 -2
- package/dist/workspace/filesystem.js +10 -5
- package/dist/workspace/paths.d.ts +19 -1
- package/dist/workspace/paths.js +22 -1
- package/package.json +6 -3
- package/dist/prompts/literature-reviewer.d.ts +0 -1
- package/dist/prompts/literature-reviewer.js +0 -114
- package/dist/sandbox/reaper.d.ts +0 -81
- package/dist/sandbox/reaper.js +0 -161
- package/dist/sandbox/step-sandbox.d.ts +0 -47
- package/dist/sandbox/step-sandbox.js +0 -53
- package/dist/state/active-sandboxes.d.ts +0 -33
- package/dist/state/active-sandboxes.js +0 -65
- package/dist/tasks/extract-values-script.d.ts +0 -64
- package/dist/tasks/extract-values-script.js +0 -180
- package/dist/tasks/extract-values.d.ts +0 -77
- package/dist/tasks/extract-values.js +0 -146
- package/dist/tools/report-session/derive-table.d.ts +0 -164
- package/dist/tools/report-session/derive-table.js +0 -419
- package/dist/tools/research/literature-reviewer.d.ts +0 -42
- package/dist/tools/research/literature-reviewer.js +0 -107
- package/dist/workflows/metrics.d.ts +0 -23
- package/dist/workflows/metrics.js +0 -38
|
@@ -106,8 +106,7 @@ export function createInspectRunTool(pool, clock = systemClock) {
|
|
|
106
106
|
"With a runId, returns the run, its steps, and an inspectionState: not_found; in_progress; paused (a step waits until the user resumes or stops the run, and pauses gives each cause); " +
|
|
107
107
|
"or terminal (run.status completed, partial, failed, or canceled). " +
|
|
108
108
|
"Output paths appear only on a terminal run: run.synthesisPath when synthesisStatus is produced, and the summaryPath of each step that ran. " +
|
|
109
|
-
"For a user-directed check, waitForTerminalSeconds can wait once for 1-30 seconds; if the cutoff returns in_progress, stop polling for that turn. " +
|
|
110
|
-
"A wait on the run that the caller itself runs inside returns at once with selfWaitPrevented. " +
|
|
109
|
+
"For a user-directed check, waitForTerminalSeconds can wait once for 1-30 seconds; if the cutoff returns in_progress, stop polling for that turn and tell the user that the run still runs. " +
|
|
111
110
|
"Default response is lightweight — pass includeDiagnostics:true to add error/duration/retry telemetry.",
|
|
112
111
|
inputSchema,
|
|
113
112
|
// The two calls do different work: one inspects a named run, the other
|
|
@@ -139,12 +138,11 @@ export function createInspectRunTool(pool, clock = systemClock) {
|
|
|
139
138
|
wait: waitSeconds === undefined ? undefined : { requestedSeconds: waitSeconds, cutoffReached: false },
|
|
140
139
|
});
|
|
141
140
|
}
|
|
142
|
-
const selfWait = waitSeconds !== undefined && ctx.session.runFrame?.runId === input.runId;
|
|
143
141
|
const runId = input.runId;
|
|
144
142
|
const pausesOf = async (status) => status === "running" ? unwrapOrThrow(await queryPausesOfWork(pool, resourceId, runId)) : [];
|
|
145
143
|
let pauses = await pausesOf(run.status);
|
|
146
144
|
let cutoffReached = false;
|
|
147
|
-
if (waitSeconds !== undefined && run.status === "running" && pauses.length === 0
|
|
145
|
+
if (waitSeconds !== undefined && run.status === "running" && pauses.length === 0) {
|
|
148
146
|
const deadline = clock.now() + waitSeconds * 1_000;
|
|
149
147
|
while (run.status === "running" && pauses.length === 0) {
|
|
150
148
|
const remaining = deadline - clock.now();
|
|
@@ -180,11 +178,9 @@ export function createInspectRunTool(pool, clock = systemClock) {
|
|
|
180
178
|
});
|
|
181
179
|
}
|
|
182
180
|
if (run.status === "running") {
|
|
183
|
-
const message =
|
|
184
|
-
? "This run is still in progress
|
|
185
|
-
:
|
|
186
|
-
? "This run is still in progress after the requested wait cutoff. Results are not ready; stop polling for this turn."
|
|
187
|
-
: "This run is in progress. Results are not ready.";
|
|
181
|
+
const message = cutoffReached
|
|
182
|
+
? "This run is still in progress after the requested wait cutoff. Results are not ready; stop polling for this turn."
|
|
183
|
+
: "This run is in progress. Results are not ready.";
|
|
188
184
|
return ok({
|
|
189
185
|
inspectionState: "in_progress",
|
|
190
186
|
message,
|
|
@@ -192,7 +188,6 @@ export function createInspectRunTool(pool, clock = systemClock) {
|
|
|
192
188
|
steps,
|
|
193
189
|
elapsedMs: Math.max(0, clock.now() - Date.parse(run.startedAt)),
|
|
194
190
|
...wait,
|
|
195
|
-
selfWaitPrevented: selfWait ? true : undefined,
|
|
196
191
|
});
|
|
197
192
|
}
|
|
198
193
|
return ok({
|
|
@@ -4,6 +4,20 @@ import { z } from "zod";
|
|
|
4
4
|
import { createArxivSource } from "../../literature/sources/arxiv.js";
|
|
5
5
|
import { defineTool } from "../define-tool.js";
|
|
6
6
|
export { parseArxivAtom } from "../../literature/sources/arxiv.js";
|
|
7
|
+
const SearchArxivOutputSchema = z.object({
|
|
8
|
+
success: z.boolean(),
|
|
9
|
+
error: z.string().optional().describe("Present when success is false: why the search failed."),
|
|
10
|
+
papers: z.array(z.object({
|
|
11
|
+
id: z.string(),
|
|
12
|
+
title: z.string(),
|
|
13
|
+
abstract: z.string(),
|
|
14
|
+
authors: z.array(z.string()),
|
|
15
|
+
published: z.string(),
|
|
16
|
+
categories: z.array(z.string()),
|
|
17
|
+
url: z.string(),
|
|
18
|
+
pdfUrl: z.string().optional(),
|
|
19
|
+
})),
|
|
20
|
+
});
|
|
7
21
|
const source = createArxivSource({ maxRetries: 3, retryDelayMs: 1_000, timeoutMs: 90_000 });
|
|
8
22
|
export const searchArxivTool = defineTool({
|
|
9
23
|
id: "search_arxiv",
|
|
@@ -15,6 +29,7 @@ export const searchArxivTool = defineTool({
|
|
|
15
29
|
"('2301.00001') also matches as free text.\n" +
|
|
16
30
|
"ABSENCE IS NORMAL: an empty papers array means arXiv holds nothing for the query, and `success: false` with an `error` string means the service " +
|
|
17
31
|
"could not be reached. Report either one and continue, do not retry unchanged.",
|
|
32
|
+
outputSchema: SearchArxivOutputSchema,
|
|
18
33
|
inputSchema: z.object({
|
|
19
34
|
query: z.string().describe('Free-text query. Example: "adaptive control feedback stabilization".'),
|
|
20
35
|
categories: z
|
|
@@ -16,6 +16,18 @@ import { apiFetchValidated, describeApiError } from "../lib/api-utils.js";
|
|
|
16
16
|
import { parseUnknownRecord } from "../../lib/unknown-containers.js";
|
|
17
17
|
import { isUnknownArray } from "../../lib/unknown-array.js";
|
|
18
18
|
const BASE_URL = "https://api.github.com/search/repositories";
|
|
19
|
+
const SearchGithubReposOutputSchema = z.object({
|
|
20
|
+
success: z.boolean(),
|
|
21
|
+
error: z.string().optional().describe("Present when success is false: why the search failed."),
|
|
22
|
+
repos: z.array(z.object({
|
|
23
|
+
url: z.string(),
|
|
24
|
+
fullName: z.string(),
|
|
25
|
+
description: z.string().optional(),
|
|
26
|
+
stars: z.number(),
|
|
27
|
+
language: z.string().optional(),
|
|
28
|
+
lastUpdated: z.string().optional(),
|
|
29
|
+
})),
|
|
30
|
+
});
|
|
19
31
|
// Raw GitHub search wire shape, validated at the fetch boundary. Every field is
|
|
20
32
|
// optional — `parseGithubReposResponse` already filters out items missing the
|
|
21
33
|
// fields it needs, so an over-strict schema would drop otherwise-usable pages.
|
|
@@ -73,6 +85,7 @@ export function createSearchGithubReposTool(deps) {
|
|
|
73
85
|
"and `success: false` with an `error` string means GitHub could not be " +
|
|
74
86
|
"reached or refused the request (the low unauthenticated rate limit " +
|
|
75
87
|
"lands here). Report either one and continue, do not retry unchanged.",
|
|
88
|
+
outputSchema: SearchGithubReposOutputSchema,
|
|
76
89
|
inputSchema: SearchGithubReposInputSchema,
|
|
77
90
|
describeCall: "none",
|
|
78
91
|
execute: async ({ query, language, limit }) => {
|
|
@@ -4,6 +4,21 @@ import { z } from "zod";
|
|
|
4
4
|
import { createSemanticScholarSource } from "../../literature/sources/semantic-scholar.js";
|
|
5
5
|
import { defineTool } from "../define-tool.js";
|
|
6
6
|
export { parseSemanticScholarResponse } from "../../literature/sources/semantic-scholar.js";
|
|
7
|
+
const SearchSemanticScholarOutputSchema = z.object({
|
|
8
|
+
success: z.boolean(),
|
|
9
|
+
error: z.string().optional().describe("Present when success is false: why the search failed."),
|
|
10
|
+
papers: z.array(z.object({
|
|
11
|
+
id: z.string(),
|
|
12
|
+
title: z.string(),
|
|
13
|
+
abstract: z.string().optional(),
|
|
14
|
+
year: z.number().optional(),
|
|
15
|
+
venue: z.string().optional(),
|
|
16
|
+
citationCount: z.number().optional(),
|
|
17
|
+
url: z.string().optional(),
|
|
18
|
+
authors: z.array(z.string()),
|
|
19
|
+
externalIds: z.record(z.string(), z.string()).optional().describe("For example DOI, ArXiv, PubMed, CorpusId."),
|
|
20
|
+
})),
|
|
21
|
+
});
|
|
7
22
|
export function createSearchSemanticScholarTool(options = {}) {
|
|
8
23
|
const source = createSemanticScholarSource({
|
|
9
24
|
maxRetries: 3,
|
|
@@ -23,6 +38,7 @@ export function createSearchSemanticScholarTool(options = {}) {
|
|
|
23
38
|
"back for a citation.\n" +
|
|
24
39
|
"ABSENCE IS NORMAL: an empty papers array means the corpus holds nothing for the query, and `success: false` with an `error` string means the " +
|
|
25
40
|
"service could not be reached (its unkeyed rate limit lands here). Report either one and continue, do not retry unchanged.",
|
|
41
|
+
outputSchema: SearchSemanticScholarOutputSchema,
|
|
26
42
|
inputSchema: z.object({
|
|
27
43
|
query: z
|
|
28
44
|
.string()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The lookups of the run synthesizer: the gene, protein, annotation,
|
|
3
|
+
* interaction, PubMed, citation, drug-gene, and preclinical-profile tools.
|
|
4
|
+
*
|
|
5
|
+
* The synthesizer calls them directly, thus each lookup result, and each PMID
|
|
6
|
+
* that the synthesis cites, is in the transcript of the synthesizer, where
|
|
7
|
+
* `submit_synthesis` can check it.
|
|
8
|
+
*/
|
|
9
|
+
import type { CitationResolver } from "../../citations/types.js";
|
|
10
|
+
import type { Logger } from "../../lib/logger.js";
|
|
11
|
+
import { type BioToolKeys } from "../bio/keys.js";
|
|
12
|
+
import type { Tool } from "../define-tool.js";
|
|
13
|
+
export type SynthesisLookupDeps = {
|
|
14
|
+
/** API keys for the bio/chem data sources of the lookups. */
|
|
15
|
+
readonly bioKeys: BioToolKeys;
|
|
16
|
+
/** Shared bibliographic verification service; all agent surfaces share its pacing/cache. */
|
|
17
|
+
readonly citationResolver: CitationResolver;
|
|
18
|
+
/** Operational logging; omitted falls back to no-op. */
|
|
19
|
+
readonly logger?: Logger;
|
|
20
|
+
};
|
|
21
|
+
export declare function createSynthesisLookupTools(deps: SynthesisLookupDeps): readonly Tool[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The lookups of the run synthesizer: the gene, protein, annotation,
|
|
3
|
+
* interaction, PubMed, citation, drug-gene, and preclinical-profile tools.
|
|
4
|
+
*
|
|
5
|
+
* The synthesizer calls them directly, thus each lookup result, and each PMID
|
|
6
|
+
* that the synthesis cites, is in the transcript of the synthesizer, where
|
|
7
|
+
* `submit_synthesis` can check it.
|
|
8
|
+
*/
|
|
9
|
+
import { genePreclinicalProfileTool } from "../bio/gene-preclinical-profile.js";
|
|
10
|
+
import { createChemDbTools, createNcbiTools } from "../bio/keys.js";
|
|
11
|
+
import { lookupAnnotationTool } from "../bio/lookup-annotation.js";
|
|
12
|
+
import { searchGeneTool } from "../bio/search-gene.js";
|
|
13
|
+
import { searchInteractionsTool } from "../bio/search-interactions.js";
|
|
14
|
+
import { searchProteinTool } from "../bio/search-protein.js";
|
|
15
|
+
import { createResolveCitationTool } from "./resolve-citation.js";
|
|
16
|
+
export function createSynthesisLookupTools(deps) {
|
|
17
|
+
const ncbi = createNcbiTools(deps.bioKeys);
|
|
18
|
+
const chemDb = createChemDbTools(deps.bioKeys, { logger: deps.logger });
|
|
19
|
+
return [
|
|
20
|
+
searchGeneTool,
|
|
21
|
+
searchProteinTool,
|
|
22
|
+
lookupAnnotationTool,
|
|
23
|
+
searchInteractionsTool,
|
|
24
|
+
ncbi.pubmed,
|
|
25
|
+
createResolveCitationTool(deps.citationResolver),
|
|
26
|
+
chemDb.drugGeneInteractions,
|
|
27
|
+
genePreclinicalProfileTool,
|
|
28
|
+
];
|
|
29
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* One URL in, extracted text out: HTML becomes Markdown (Readability over a
|
|
5
5
|
* `linkedom` DOM, then Turndown, with the body text as the fallback), a PDF
|
|
6
|
-
* becomes the text of its first 100 pages through `
|
|
6
|
+
* becomes the text of its first 100 pages through `unpdf`, and a text or
|
|
7
7
|
* JSON body passes through. A bad scheme, an internal address, an HTTP error, an
|
|
8
8
|
* oversized body, a redirect chain past the limit, and a body the tool cannot
|
|
9
9
|
* extract are all normal results on the ok channel — never a failure of the
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* One URL in, extracted text out: HTML becomes Markdown (Readability over a
|
|
5
5
|
* `linkedom` DOM, then Turndown, with the body text as the fallback), a PDF
|
|
6
|
-
* becomes the text of its first 100 pages through `
|
|
6
|
+
* becomes the text of its first 100 pages through `unpdf`, and a text or
|
|
7
7
|
* JSON body passes through. A bad scheme, an internal address, an HTTP error, an
|
|
8
8
|
* oversized body, a redirect chain past the limit, and a body the tool cannot
|
|
9
9
|
* extract are all normal results on the ok channel — never a failure of the
|
|
@@ -420,27 +420,29 @@ function htmlExtractionOf(body) {
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
let
|
|
423
|
+
let pdfTextModule;
|
|
424
424
|
async function extractBody(contentType, body) {
|
|
425
425
|
if (contentType === "text/html" || contentType === "application/xhtml+xml") {
|
|
426
426
|
return htmlExtractionOf(body);
|
|
427
427
|
}
|
|
428
428
|
if (contentType === "application/pdf") {
|
|
429
|
-
//
|
|
430
|
-
|
|
431
|
-
pdfParseModule ??= await import("pdf-parse");
|
|
432
|
-
const parser = new pdfParseModule.PDFParse({ data: body });
|
|
429
|
+
// PDF.js is a large module, thus the first PDF loads it, and a host that fetches no PDF never pays for it.
|
|
430
|
+
pdfTextModule ??= await import("../../lib/pdf-text.js");
|
|
433
431
|
try {
|
|
434
|
-
const result = await
|
|
435
|
-
const pdfCut = result.
|
|
436
|
-
return {
|
|
432
|
+
const result = await pdfTextModule.readPdfText(body, { first: 1, last: PDF_PAGE_CAP });
|
|
433
|
+
const pdfCut = result.totalPages > result.pages.length ? { totalPages: result.totalPages, pagesRead: result.pages.length } : undefined;
|
|
434
|
+
return {
|
|
435
|
+
kind: "text",
|
|
436
|
+
text: result.pages
|
|
437
|
+
.map((page) => page.text)
|
|
438
|
+
.join("\n\n")
|
|
439
|
+
.trim(),
|
|
440
|
+
pdfCut,
|
|
441
|
+
};
|
|
437
442
|
}
|
|
438
443
|
catch (error) {
|
|
439
444
|
return { kind: "unextractable", detail: `the PDF parser failed: ${errorMessageOf(error) ?? textOf(error)}` };
|
|
440
445
|
}
|
|
441
|
-
finally {
|
|
442
|
-
await parser.destroy();
|
|
443
|
-
}
|
|
444
446
|
}
|
|
445
447
|
if (contentType.startsWith("text/") || contentType === "application/json" || contentType.endsWith("+json")) {
|
|
446
448
|
return { kind: "text", text: body.toString("utf8") };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `acquire_sandbox` and `release_sandbox` (sandbox-leases spec): the agent holds its sandbox through a lease.
|
|
3
|
+
*
|
|
4
|
+
* Each tool gives the size, and nothing else. The bound lease carries the key (the id of the workflow of the agent),
|
|
5
|
+
* the session, and the spawn settings of the step, and the sandbox module owns the admission, the spawn, and the
|
|
6
|
+
* teardown. `acquire_sandbox` blocks until the machine is ready, also while the lease waits in the queue.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import type { BoundLease } from "../../sandbox/leases.js";
|
|
10
|
+
import { type Tool } from "../define-tool.js";
|
|
11
|
+
export declare const ACQUIRE_SANDBOX_TOOL_ID = "acquire_sandbox";
|
|
12
|
+
export declare const RELEASE_SANDBOX_TOOL_ID = "release_sandbox";
|
|
13
|
+
declare const AcquireSandboxInputSchema: z.ZodObject<{
|
|
14
|
+
cpu: z.ZodNumber;
|
|
15
|
+
memoryGb: z.ZodNumber;
|
|
16
|
+
gpuCount: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
type AcquireSandboxResult = {
|
|
19
|
+
readonly status: "granted";
|
|
20
|
+
readonly cpu: number;
|
|
21
|
+
readonly memoryGb: number;
|
|
22
|
+
readonly gpuCount: number;
|
|
23
|
+
readonly message: string;
|
|
24
|
+
};
|
|
25
|
+
declare const ReleaseSandboxInputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
26
|
+
type ReleaseSandboxResult = {
|
|
27
|
+
readonly status: "released";
|
|
28
|
+
readonly message: string;
|
|
29
|
+
};
|
|
30
|
+
export declare function createAcquireSandboxTool(lease: BoundLease): Tool<z.infer<typeof AcquireSandboxInputSchema>, AcquireSandboxResult>;
|
|
31
|
+
export declare function createReleaseSandboxTool(lease: BoundLease): Tool<z.infer<typeof ReleaseSandboxInputSchema>, ReleaseSandboxResult>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `acquire_sandbox` and `release_sandbox` (sandbox-leases spec): the agent holds its sandbox through a lease.
|
|
3
|
+
*
|
|
4
|
+
* Each tool gives the size, and nothing else. The bound lease carries the key (the id of the workflow of the agent),
|
|
5
|
+
* the session, and the spawn settings of the step, and the sandbox module owns the admission, the spawn, and the
|
|
6
|
+
* teardown. `acquire_sandbox` blocks until the machine is ready, also while the lease waits in the queue.
|
|
7
|
+
*/
|
|
8
|
+
import { err, ok } from "neverthrow";
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
import { defineTool } from "../define-tool.js";
|
|
11
|
+
export const ACQUIRE_SANDBOX_TOOL_ID = "acquire_sandbox";
|
|
12
|
+
export const RELEASE_SANDBOX_TOOL_ID = "release_sandbox";
|
|
13
|
+
const AcquireSandboxInputSchema = z.object({
|
|
14
|
+
cpu: z.number().positive().describe("CPU cores of the sandbox. A fraction is permitted, and the grant can be smaller than the request."),
|
|
15
|
+
memoryGb: z.number().positive().describe("Memory of the sandbox in GB. A command that uses more memory gets an out-of-memory kill."),
|
|
16
|
+
gpuCount: z.number().int().nonnegative().optional().describe("GPUs of the sandbox. Omit for none."),
|
|
17
|
+
});
|
|
18
|
+
const ReleaseSandboxInputSchema = z.object({});
|
|
19
|
+
export function createAcquireSandboxTool(lease) {
|
|
20
|
+
return defineTool({
|
|
21
|
+
id: ACQUIRE_SANDBOX_TOOL_ID,
|
|
22
|
+
description: "Get a sandbox of the given size for `execute_command`, and wait until it is ready. The call can wait for free " +
|
|
23
|
+
"capacity. The result gives the granted size, which can be smaller than the request. A call with a different " +
|
|
24
|
+
"size replaces your sandbox: the files of your working directory stay, and the next command runs on the new " +
|
|
25
|
+
"size. Your files and your outputs live in the workspace, not in the sandbox.",
|
|
26
|
+
inputSchema: AcquireSandboxInputSchema,
|
|
27
|
+
describeCall: ({ cpu, memoryGb }) => `Waiting for a sandbox (${cpu} CPU, ${memoryGb} GB)`,
|
|
28
|
+
execute: async ({ cpu, memoryGb, gpuCount }) => {
|
|
29
|
+
const size = gpuCount === undefined || gpuCount === 0 ? { cpu, memoryGb } : { cpu, memoryGb, gpu: { count: gpuCount } };
|
|
30
|
+
const outcome = await lease.acquire(size);
|
|
31
|
+
switch (outcome.kind) {
|
|
32
|
+
case "granted":
|
|
33
|
+
return ok({
|
|
34
|
+
status: "granted",
|
|
35
|
+
cpu: outcome.size.cpu,
|
|
36
|
+
memoryGb: outcome.size.memoryGb,
|
|
37
|
+
gpuCount: outcome.size.gpu?.count ?? 0,
|
|
38
|
+
message: "The sandbox is ready.",
|
|
39
|
+
});
|
|
40
|
+
case "refused":
|
|
41
|
+
return err({ error: `The host refused the sandbox: ${outcome.reason}.`, retryable: false });
|
|
42
|
+
case "failed":
|
|
43
|
+
return err({ error: `The sandbox did not start: ${outcome.detail}`, retryable: true });
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export function createReleaseSandboxTool(lease) {
|
|
49
|
+
return defineTool({
|
|
50
|
+
id: RELEASE_SANDBOX_TOOL_ID,
|
|
51
|
+
description: "Release your sandbox when your commands are done and you work only with files or research. The files stay. " +
|
|
52
|
+
"A later `execute_command` needs `acquire_sandbox` again.",
|
|
53
|
+
inputSchema: ReleaseSandboxInputSchema,
|
|
54
|
+
describeCall: () => "Releasing the sandbox",
|
|
55
|
+
execute: async () => {
|
|
56
|
+
await lease.release();
|
|
57
|
+
return ok({ status: "released", message: "The sandbox is released." });
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The entry of the worker thread of `run_script`. An embedder that bundles the harness, for example a Bun single-file
|
|
3
|
+
* binary, adds this module as an entry of its build, and gives its embedded path as `ScriptRuntime.workerUrl`.
|
|
4
|
+
*/
|
|
5
|
+
import "@earendil-works/pi-codemode/worker";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The entry of the worker thread of `run_script`. An embedder that bundles the harness, for example a Bun single-file
|
|
3
|
+
* binary, adds this module as an entry of its build, and gives its embedded path as `ScriptRuntime.workerUrl`.
|
|
4
|
+
*/
|
|
5
|
+
import "@earendil-works/pi-codemode/worker";
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The file tools of a script: `read_table`, `read_pdf`, `write_derived`, `render_chart`, and `export_pdf`.
|
|
3
|
+
*
|
|
4
|
+
* The VM of `run_script` has no file system. These tools are its only reach into the workspace, thus each one is
|
|
5
|
+
* the boundary. `read_table` reads through the read seam of the workspace, which confines a path to the analysis
|
|
6
|
+
* of the call and refuses a symbolic link. `write_derived` and `render_chart` write only into the `derived/`
|
|
7
|
+
* directory of the scratch of the session.
|
|
8
|
+
*
|
|
9
|
+
* A table read holds at most 16 MiB, and the parse runs on the host. A larger table, or a format with no parser
|
|
10
|
+
* here, is work for an analysis run, and the refusal says so.
|
|
11
|
+
*
|
|
12
|
+
* Each tool gives the files that it read or wrote as its call record. `run_script` collects the records of the
|
|
13
|
+
* calls of one script, thus the provenance of the script chains each derived file to the tables that it read.
|
|
14
|
+
*/
|
|
15
|
+
import { type Result } from "neverthrow";
|
|
16
|
+
import { z } from "zod";
|
|
17
|
+
import type { AgentSession } from "../../auth/types.js";
|
|
18
|
+
import { type Row } from "../../report-model/production-resolver.js";
|
|
19
|
+
import type { WorkspaceReadLineage } from "../../provenance/workspace-reads.js";
|
|
20
|
+
import type { WorkspaceFilesystem } from "../../workspace/filesystem.js";
|
|
21
|
+
import { type ResolveWorkspaceRoot } from "../../workspace/paths.js";
|
|
22
|
+
import { type Tool, type WithToolCallRecord } from "../define-tool.js";
|
|
23
|
+
import type { ScratchFile, ScriptRead, ScriptScratch } from "./scratch.js";
|
|
24
|
+
/** The cap of one table read. It matches the cap of the report path, which reads with the same parsers. */
|
|
25
|
+
export declare const TABLE_READ_CAP_BYTES: number;
|
|
26
|
+
/** What one call of a file tool did to files. `run_script` reads it from the call record of a nested call. */
|
|
27
|
+
export type ScriptFileEffect = {
|
|
28
|
+
readonly reads?: readonly ScriptRead[];
|
|
29
|
+
readonly writes?: readonly ScratchFile[];
|
|
30
|
+
};
|
|
31
|
+
export declare const ScriptFileEffectSchema: z.ZodObject<{
|
|
32
|
+
reads: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33
|
+
path: z.ZodString;
|
|
34
|
+
hash: z.ZodString;
|
|
35
|
+
}, z.core.$strip>>>;
|
|
36
|
+
writes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
|
+
path: z.ZodString;
|
|
38
|
+
hash: z.ZodString;
|
|
39
|
+
size: z.ZodNumber;
|
|
40
|
+
}, z.core.$strip>>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export type ScriptFileToolsDeps = {
|
|
43
|
+
readonly workspaceFs: WorkspaceFilesystem;
|
|
44
|
+
readonly resolveWorkspaceRoot: ResolveWorkspaceRoot;
|
|
45
|
+
readonly scratch: ScriptScratch;
|
|
46
|
+
};
|
|
47
|
+
/** The rows of one table, the bytes that they came from, and the columns that they keep. */
|
|
48
|
+
export type TableRows = {
|
|
49
|
+
readonly content: Buffer;
|
|
50
|
+
readonly columns: string[];
|
|
51
|
+
readonly rows: Row[];
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Read one table through the read seam, parse it on the host, and keep the named columns. A refusal is the line
|
|
55
|
+
* that the script reads. `tooLarge` names where a table over the cap goes instead.
|
|
56
|
+
*/
|
|
57
|
+
export declare function readTableRows(args: {
|
|
58
|
+
readonly workspaceFs: WorkspaceFilesystem;
|
|
59
|
+
readonly session: AgentSession;
|
|
60
|
+
readonly path: string;
|
|
61
|
+
readonly columns: readonly string[] | undefined;
|
|
62
|
+
readonly tooLarge: string;
|
|
63
|
+
}): Promise<Result<TableRows, string>>;
|
|
64
|
+
export declare const ReadTableOutputSchema: z.ZodObject<{
|
|
65
|
+
path: z.ZodString;
|
|
66
|
+
columns: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
67
|
+
rowCount: z.ZodNumber;
|
|
68
|
+
rows: z.ZodReadonly<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
declare const readPdfInput: z.ZodObject<{
|
|
71
|
+
path: z.ZodString;
|
|
72
|
+
firstPage: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
lastPage: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
declare const ReadPdfOutputSchema: z.ZodObject<{
|
|
76
|
+
path: z.ZodString;
|
|
77
|
+
totalPages: z.ZodNumber;
|
|
78
|
+
pages: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
79
|
+
page: z.ZodNumber;
|
|
80
|
+
text: z.ZodString;
|
|
81
|
+
}, z.core.$strip>>>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
type ReadPdfOutput = WithToolCallRecord<z.infer<typeof ReadPdfOutputSchema>, ScriptFileEffect>;
|
|
84
|
+
/** `lineage` records each read in the lineage of a step. */
|
|
85
|
+
export declare function createReadPdfTool(deps: Pick<ScriptFileToolsDeps, "workspaceFs" | "resolveWorkspaceRoot"> & {
|
|
86
|
+
readonly lineage?: WorkspaceReadLineage;
|
|
87
|
+
}): Tool<z.infer<typeof readPdfInput>, ReadPdfOutput>;
|
|
88
|
+
export type Cell = string | number | boolean | null;
|
|
89
|
+
/** The text of `rows` in the format that the extension of `name` names, or `undefined` for another extension. */
|
|
90
|
+
export declare function rowsText(name: string, rows: readonly Record<string, Cell>[]): string | undefined;
|
|
91
|
+
/** What the document tools of a script need. `imageScope` limits the images of a PDF to one directory of a session. */
|
|
92
|
+
export type DocumentToolsDeps = ScriptFileToolsDeps & {
|
|
93
|
+
readonly imageScope?: (session: AgentSession) => string | undefined;
|
|
94
|
+
};
|
|
95
|
+
export declare function createScriptFileTools(deps: ScriptFileToolsDeps): Tool[];
|
|
96
|
+
/** The script tools that read a table and a PDF of the workspace, and write nothing. */
|
|
97
|
+
export declare function createReadScriptTools(deps: Pick<ScriptFileToolsDeps, "workspaceFs" | "resolveWorkspaceRoot">): Tool[];
|
|
98
|
+
/** The tools that make a document in a script: a chart as an SVG file, and a PDF from markdown. */
|
|
99
|
+
export declare function createDocumentTools(deps: DocumentToolsDeps): Tool[];
|
|
100
|
+
export {};
|