@botbotgo/agent-harness 0.0.297 → 0.0.299
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 +77 -37
- package/README.zh.md +79 -30
- package/dist/acp.d.ts +3 -0
- package/dist/acp.js +10 -2
- package/dist/api.d.ts +14 -2
- package/dist/api.js +19 -3
- package/dist/cli.d.ts +18 -1
- package/dist/cli.js +1408 -319
- package/dist/client/acp.d.ts +9 -3
- package/dist/client/acp.js +55 -1
- package/dist/client/in-process.d.ts +5 -2
- package/dist/client/in-process.js +4 -6
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.d.ts +6 -5
- package/dist/config/agents/direct.yaml +7 -17
- package/dist/config/agents/orchestra.yaml +9 -65
- package/dist/config/catalogs/embedding-models.yaml +1 -1
- package/dist/config/catalogs/stores.yaml +1 -1
- package/dist/config/knowledge/knowledge-runtime.yaml +36 -2
- package/dist/config/knowledge/procedural-memory-runtime.yaml +78 -0
- package/dist/config/{catalogs/models.yaml → models.yaml} +2 -2
- package/dist/config/prompts/direct-system.md +16 -0
- package/dist/config/prompts/orchestra-system.md +62 -0
- package/dist/config/prompts/routing-system.md +14 -0
- package/dist/config/runtime/runtime-memory.yaml +39 -5
- package/dist/config/runtime/workspace.yaml +7 -16
- package/dist/contracts/runtime.d.ts +242 -1
- package/dist/contracts/workspace.d.ts +2 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +2 -1
- package/dist/init-project.js +178 -33
- package/dist/knowledge/contracts.d.ts +5 -0
- package/dist/knowledge/module.d.ts +5 -0
- package/dist/knowledge/module.js +340 -18
- package/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/persistence/file-store.d.ts +5 -1
- package/dist/persistence/file-store.js +16 -0
- package/dist/persistence/sqlite-store.d.ts +4 -1
- package/dist/persistence/sqlite-store.js +88 -14
- package/dist/persistence/types.d.ts +4 -1
- package/dist/procedural/config.d.ts +63 -0
- package/dist/procedural/config.js +125 -0
- package/dist/procedural/index.d.ts +2 -0
- package/dist/procedural/index.js +1 -0
- package/dist/protocol/ag-ui/http.d.ts +3 -0
- package/dist/protocol/ag-ui/http.js +10 -0
- package/dist/request-events.d.ts +63 -0
- package/dist/request-events.js +400 -0
- package/dist/resource/isolation.js +11 -0
- package/dist/resource/resource-impl.d.ts +1 -0
- package/dist/resource/resource-impl.js +103 -12
- package/dist/resources/init-templates/agent-context/deep-research.md +5 -0
- package/dist/resources/init-templates/prompts/research-analyst-basic.md +1 -0
- package/dist/resources/init-templates/prompts/research-analyst-web-search.md +1 -0
- package/dist/resources/init-templates/prompts/research-host-deep-research-basic.md +1 -0
- package/dist/resources/init-templates/prompts/research-host-deep-research-web-search.md +1 -0
- package/dist/resources/init-templates/prompts/research-host-single-agent-basic.md +1 -0
- package/dist/resources/init-templates/prompts/research-host-single-agent-web-search.md +1 -0
- package/dist/resources/prompts/runtime/browser-capability-disclaimer-recovery.md +1 -0
- package/dist/resources/prompts/runtime/default-subagent.md +2 -0
- package/dist/resources/prompts/runtime/durable-memory-context.md +7 -0
- package/dist/resources/prompts/runtime/execution-with-tool-evidence-retry.md +1 -0
- package/dist/resources/prompts/runtime/execution-with-tool-evidence.md +1 -0
- package/dist/resources/prompts/runtime/invalid-tool-selection-recovery.md +1 -0
- package/dist/resources/prompts/runtime/memory-manager.md +31 -0
- package/dist/resources/prompts/runtime/memory-mutation-reconciliation.md +22 -0
- package/dist/resources/prompts/runtime/slash-command-skill.md +6 -0
- package/dist/resources/prompts/runtime/strict-tool-json.md +1 -0
- package/dist/resources/prompts/runtime/workspace-boundary-guidance.md +3 -0
- package/dist/resources/prompts/runtime/workspace-relative-path.md +1 -0
- package/dist/resources/prompts/runtime/write-todos-descriptive-content.md +1 -0
- package/dist/resources/prompts/runtime/write-todos-full-entry.md +1 -0
- package/dist/resources/prompts/runtime/write-todos-non-empty-initial-list.md +1 -0
- package/dist/resources/tools/_runtime_tool_helpers.mjs +152 -0
- package/dist/resources/tools/cancel_request.mjs +21 -0
- package/dist/resources/tools/fetch_url.mjs +23 -0
- package/dist/resources/tools/http_request.mjs +30 -0
- package/dist/resources/tools/inspect_approvals.mjs +27 -0
- package/dist/resources/tools/inspect_artifacts.mjs +21 -0
- package/dist/resources/tools/inspect_events.mjs +21 -0
- package/dist/resources/tools/inspect_requests.mjs +27 -0
- package/dist/resources/tools/inspect_sessions.mjs +21 -0
- package/dist/resources/tools/list_files.mjs +27 -0
- package/dist/resources/tools/read_artifact.mjs +22 -0
- package/dist/resources/tools/request_approval.mjs +27 -0
- package/dist/resources/tools/run_command.mjs +21 -0
- package/dist/resources/tools/schedule_task.mjs +76 -0
- package/dist/resources/tools/search_files.mjs +47 -0
- package/dist/resources/tools/send_message.mjs +23 -0
- package/dist/runtime/adapter/direct-builtin-utility.d.ts +1 -0
- package/dist/runtime/adapter/direct-builtin-utility.js +90 -0
- package/dist/runtime/adapter/flow/execution-context.d.ts +1 -1
- package/dist/runtime/adapter/flow/execution-context.js +1 -1
- package/dist/runtime/adapter/flow/invocation-flow.d.ts +1 -0
- package/dist/runtime/adapter/flow/invocation-flow.js +9 -1
- package/dist/runtime/adapter/flow/invoke-runtime.d.ts +1 -1
- package/dist/runtime/adapter/flow/stream-runtime.d.ts +5 -1
- package/dist/runtime/adapter/flow/stream-runtime.js +556 -35
- package/dist/runtime/adapter/invocation-result.js +3 -2
- package/dist/runtime/adapter/local-tool-invocation.d.ts +1 -1
- package/dist/runtime/adapter/local-tool-invocation.js +28 -4
- package/dist/runtime/adapter/middleware-assembly.js +3 -1
- package/dist/runtime/adapter/model/invocation-request.d.ts +4 -1
- package/dist/runtime/adapter/model/invocation-request.js +138 -16
- package/dist/runtime/adapter/model/message-assembly.js +2 -6
- package/dist/runtime/adapter/model/model-providers.js +103 -5
- package/dist/runtime/adapter/resilience.js +17 -2
- package/dist/runtime/adapter/runtime-adapter-support.d.ts +11 -7
- package/dist/runtime/adapter/runtime-adapter-support.js +39 -5
- package/dist/runtime/adapter/tool/builtin-middleware-tools.d.ts +63 -1
- package/dist/runtime/adapter/tool/builtin-middleware-tools.js +193 -21
- package/dist/runtime/adapter/tool/tool-arguments.d.ts +3 -1
- package/dist/runtime/adapter/tool/tool-arguments.js +52 -17
- package/dist/runtime/adapter/tool-resolution.d.ts +1 -0
- package/dist/runtime/adapter/tool-resolution.js +4 -2
- package/dist/runtime/agent-runtime-adapter.d.ts +27 -0
- package/dist/runtime/agent-runtime-adapter.js +163 -11
- package/dist/runtime/harness/events/event-bus.d.ts +1 -0
- package/dist/runtime/harness/events/event-bus.js +3 -0
- package/dist/runtime/harness/events/event-sink.d.ts +3 -0
- package/dist/runtime/harness/events/event-sink.js +16 -7
- package/dist/runtime/harness/events/streaming.d.ts +18 -1
- package/dist/runtime/harness/events/streaming.js +23 -10
- package/dist/runtime/harness/run/inspection.js +26 -5
- package/dist/runtime/harness/run/stream-run.d.ts +13 -4
- package/dist/runtime/harness/run/stream-run.js +448 -4
- package/dist/runtime/harness/run/surface-semantics.js +7 -34
- package/dist/runtime/harness/system/runtime-memory-manager.d.ts +3 -0
- package/dist/runtime/harness/system/runtime-memory-manager.js +384 -69
- package/dist/runtime/harness/system/runtime-memory-policy.d.ts +20 -1
- package/dist/runtime/harness/system/runtime-memory-policy.js +65 -17
- package/dist/runtime/harness/system/runtime-memory-records.js +100 -0
- package/dist/runtime/harness/system/runtime-memory-sync.js +2 -2
- package/dist/runtime/harness/system/store.d.ts +4 -0
- package/dist/runtime/harness/system/store.js +153 -0
- package/dist/runtime/harness.d.ts +9 -1
- package/dist/runtime/harness.js +141 -7
- package/dist/runtime/maintenance/sqlite-checkpoint-saver.d.ts +8 -3
- package/dist/runtime/maintenance/sqlite-checkpoint-saver.js +152 -53
- package/dist/runtime/parsing/output-parsing.d.ts +10 -2
- package/dist/runtime/parsing/output-parsing.js +223 -16
- package/dist/runtime/parsing/stream-event-parsing.d.ts +7 -0
- package/dist/runtime/parsing/stream-event-parsing.js +51 -1
- package/dist/runtime/scheduling/system-schedule-manager.d.ts +41 -0
- package/dist/runtime/scheduling/system-schedule-manager.js +532 -0
- package/dist/runtime/support/embedding-models.d.ts +1 -1
- package/dist/runtime/support/embedding-models.js +5 -2
- package/dist/runtime/support/runtime-factories.js +1 -1
- package/dist/runtime/support/runtime-layout.d.ts +3 -0
- package/dist/runtime/support/runtime-layout.js +10 -1
- package/dist/runtime/support/runtime-prompts.d.ts +30 -0
- package/dist/runtime/support/runtime-prompts.js +55 -0
- package/dist/runtime/support/vector-stores.d.ts +1 -1
- package/dist/runtime/support/vector-stores.js +5 -2
- package/dist/upstream-events.js +8 -7
- package/dist/utils/bundled-text.d.ts +3 -0
- package/dist/utils/bundled-text.js +25 -0
- package/dist/utils/id.js +3 -2
- package/dist/workspace/agent-binding-compiler.js +53 -13
- package/dist/workspace/object-loader.js +64 -2
- package/dist/workspace/support/workspace-ref-utils.d.ts +2 -1
- package/dist/workspace/support/workspace-ref-utils.js +24 -5
- package/dist/workspace/yaml-object-reader.d.ts +1 -0
- package/dist/workspace/yaml-object-reader.js +95 -17
- package/package.json +13 -6
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { tool } from "@botbotgo/agent-harness/tools";
|
|
2
|
+
import {
|
|
3
|
+
defineSchema,
|
|
4
|
+
formatGrepResult,
|
|
5
|
+
formatListEntries,
|
|
6
|
+
getBackend,
|
|
7
|
+
normalizeGrepMatches,
|
|
8
|
+
normalizeWorkspacePath,
|
|
9
|
+
optionalString,
|
|
10
|
+
} from "./_runtime_tool_helpers.mjs";
|
|
11
|
+
|
|
12
|
+
export const search_files = tool({
|
|
13
|
+
description: "Search workspace files by content or path glob.",
|
|
14
|
+
schema: defineSchema({
|
|
15
|
+
query: (value) => optionalString(value, ""),
|
|
16
|
+
path: (value) => optionalString(value, "."),
|
|
17
|
+
glob: (value) => optionalString(value, undefined),
|
|
18
|
+
search_type: (value) => (optionalString(value, "content") === "path" ? "path" : "content"),
|
|
19
|
+
}),
|
|
20
|
+
async invoke(input, context = {}) {
|
|
21
|
+
const backend = getBackend(context);
|
|
22
|
+
const targetPath = normalizeWorkspacePath(context, input.path, ".");
|
|
23
|
+
if (input.search_type === "path") {
|
|
24
|
+
const legacyInfos = typeof backend.globInfo === "function" ? await backend.globInfo(input.query, targetPath) : [];
|
|
25
|
+
const infos = legacyInfos.length > 0
|
|
26
|
+
? legacyInfos
|
|
27
|
+
: typeof backend.glob === "function"
|
|
28
|
+
? ((await backend.glob(input.query, targetPath))?.files ?? [])
|
|
29
|
+
: [];
|
|
30
|
+
return formatListEntries(
|
|
31
|
+
infos.map((item) => item.path),
|
|
32
|
+
`No files found matching pattern '${input.query}'`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const rawMatches = typeof backend.grepRaw === "function"
|
|
37
|
+
? await backend.grepRaw(input.query, targetPath, input.glob ?? null)
|
|
38
|
+
: undefined;
|
|
39
|
+
if (typeof rawMatches === "string") {
|
|
40
|
+
return rawMatches;
|
|
41
|
+
}
|
|
42
|
+
const structuredMatches = typeof backend.grep === "function"
|
|
43
|
+
? normalizeGrepMatches((await backend.grep(input.query, targetPath, input.glob ?? null))?.matches ?? [])
|
|
44
|
+
: [];
|
|
45
|
+
return formatGrepResult(input.query, rawMatches ?? structuredMatches);
|
|
46
|
+
},
|
|
47
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { tool } from "@botbotgo/agent-harness/tools";
|
|
2
|
+
import { defineSchema, getBackend, notAvailable, optionalObject, optionalString } from "./_runtime_tool_helpers.mjs";
|
|
3
|
+
|
|
4
|
+
export const send_message = tool({
|
|
5
|
+
description: "Send a message through the configured runtime backend.",
|
|
6
|
+
schema: defineSchema({
|
|
7
|
+
destination: (value) => optionalString(value, ""),
|
|
8
|
+
message: (value) => optionalString(value, ""),
|
|
9
|
+
subject: (value) => optionalString(value, undefined),
|
|
10
|
+
metadata: (value) => optionalObject(value),
|
|
11
|
+
}),
|
|
12
|
+
async invoke(input, context = {}) {
|
|
13
|
+
const backend = getBackend(context);
|
|
14
|
+
if (typeof backend.sendMessage !== "function") {
|
|
15
|
+
return notAvailable("send_message", "message delivery");
|
|
16
|
+
}
|
|
17
|
+
const result = await backend.sendMessage(input);
|
|
18
|
+
if (typeof result === "string") {
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
return result?.error ?? `Message sent to '${input.destination}'${result?.id ? ` (id: ${result.id})` : ""}.`;
|
|
22
|
+
},
|
|
23
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function summarizeAssistantText(text: string): string;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
const GENERIC_ASSISTANT_SUMMARY_MAX_CHARS = 180;
|
|
2
|
+
const GENERIC_ASSISTANT_SUMMARY_MAX_LINES = 6;
|
|
3
|
+
function parseListingEntry(line) {
|
|
4
|
+
const trimmed = line.trim();
|
|
5
|
+
if (!trimmed || trimmed === "...[truncated]" || trimmed === "... [truncated]") {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
const match = trimmed.match(/^(\/.+?)(?:\s+\((\d+)\s+bytes\))?$/);
|
|
9
|
+
if (!match) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
const path = match[1];
|
|
13
|
+
return {
|
|
14
|
+
path,
|
|
15
|
+
isDirectory: path.endsWith("/"),
|
|
16
|
+
...(match[2] ? { sizeBytes: Number(match[2]) } : {}),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function parseListingEntries(text) {
|
|
20
|
+
const normalized = text.trim();
|
|
21
|
+
if (!normalized) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
const lines = normalized.split(/\r?\n/);
|
|
25
|
+
const entries = lines
|
|
26
|
+
.map((line) => parseListingEntry(line))
|
|
27
|
+
.filter((entry) => entry !== null);
|
|
28
|
+
if (entries.length < 4) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
return entries.length >= Math.ceil(lines.length * 0.7) ? entries : [];
|
|
32
|
+
}
|
|
33
|
+
function buildListingSummary(entries) {
|
|
34
|
+
const directories = entries.filter((entry) => entry.isDirectory);
|
|
35
|
+
const files = entries.filter((entry) => !entry.isDirectory);
|
|
36
|
+
return {
|
|
37
|
+
totalEntries: entries.length,
|
|
38
|
+
directoryCount: directories.length,
|
|
39
|
+
fileCount: files.length,
|
|
40
|
+
sampleDirectories: directories.slice(0, 8).map((entry) => entry.path),
|
|
41
|
+
sampleFiles: files.slice(0, 8).map((entry) => entry.path),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function summarizeGenericAssistantResponse(text) {
|
|
45
|
+
const normalized = text.trim();
|
|
46
|
+
if (!normalized) {
|
|
47
|
+
return normalized;
|
|
48
|
+
}
|
|
49
|
+
const summaryLines = normalized
|
|
50
|
+
.split(/\r?\n/)
|
|
51
|
+
.map((line) => line.trim())
|
|
52
|
+
.filter((line) => line.length > 0)
|
|
53
|
+
.filter((line) => line !== "Prior assistant response summary:")
|
|
54
|
+
.map((line) => line.replace(/^(?:[#>*-]+|\d+\.)\s*/u, "").trim())
|
|
55
|
+
.map((line) => line.replace(/^Earlier assistant answer covered:\s*/u, "").trim())
|
|
56
|
+
.filter((line) => line.length > 0);
|
|
57
|
+
const selected = summaryLines
|
|
58
|
+
.filter((line, index, items) => items.indexOf(line) === index)
|
|
59
|
+
.slice(0, GENERIC_ASSISTANT_SUMMARY_MAX_LINES)
|
|
60
|
+
.map((line) => line.length > GENERIC_ASSISTANT_SUMMARY_MAX_CHARS ? `${line.slice(0, GENERIC_ASSISTANT_SUMMARY_MAX_CHARS - 1)}…` : line);
|
|
61
|
+
if (selected.length === 0) {
|
|
62
|
+
return normalized.length > 240 ? `${normalized.slice(0, 239)}…` : normalized;
|
|
63
|
+
}
|
|
64
|
+
return selected.join("; ");
|
|
65
|
+
}
|
|
66
|
+
export function summarizeAssistantText(text) {
|
|
67
|
+
const normalized = text.trim();
|
|
68
|
+
if (!normalized) {
|
|
69
|
+
return normalized;
|
|
70
|
+
}
|
|
71
|
+
if (/^(?:Prior assistant response summary:|Earlier assistant answer covered:)/m.test(normalized)) {
|
|
72
|
+
return summarizeGenericAssistantResponse(normalized);
|
|
73
|
+
}
|
|
74
|
+
const entries = parseListingEntries(normalized);
|
|
75
|
+
if (entries.length > 0) {
|
|
76
|
+
const summary = buildListingSummary(entries);
|
|
77
|
+
return [
|
|
78
|
+
`Prior assistant output listed ${summary.totalEntries} workspace entries.`,
|
|
79
|
+
`Directories: ${summary.directoryCount}`,
|
|
80
|
+
`Files: ${summary.fileCount}`,
|
|
81
|
+
summary.sampleDirectories.length > 0 ? `Sample directories: ${summary.sampleDirectories.join(", ")}` : undefined,
|
|
82
|
+
summary.sampleFiles.length > 0 ? `Sample files: ${summary.sampleFiles.join(", ")}` : undefined,
|
|
83
|
+
].filter((part) => Boolean(part)).join("\n");
|
|
84
|
+
}
|
|
85
|
+
const lineCount = normalized.split(/\r?\n/).length;
|
|
86
|
+
if (normalized.length <= 500 && lineCount <= 8) {
|
|
87
|
+
return normalized;
|
|
88
|
+
}
|
|
89
|
+
return summarizeGenericAssistantResponse(normalized);
|
|
90
|
+
}
|
|
@@ -12,7 +12,7 @@ export declare function buildBindingToolExecutionContext(input: {
|
|
|
12
12
|
binding: CompiledAgentBinding;
|
|
13
13
|
resolveTools: (tools: CompiledTool[], binding?: CompiledAgentBinding) => unknown[];
|
|
14
14
|
getToolNameMapping: (binding: CompiledAgentBinding) => ToolNameMapping;
|
|
15
|
-
|
|
15
|
+
toolConfig?: Record<string, unknown>;
|
|
16
16
|
}): {
|
|
17
17
|
primaryTools: CompiledTool[];
|
|
18
18
|
resolvedTools: unknown[];
|
|
@@ -13,6 +13,7 @@ export declare function executeRequestInvocation(options: {
|
|
|
13
13
|
state?: Record<string, unknown>;
|
|
14
14
|
files?: Record<string, unknown>;
|
|
15
15
|
memoryContext?: string;
|
|
16
|
+
toolRuntimeContext?: Record<string, unknown>;
|
|
16
17
|
};
|
|
17
18
|
resolveTools: (tools: CompiledTool[], binding?: CompiledAgentBinding) => unknown[];
|
|
18
19
|
getToolNameMapping: (binding: CompiledAgentBinding) => ToolNameMapping;
|
|
@@ -3,6 +3,7 @@ import { buildBindingToolExecutionContext } from "./execution-context.js";
|
|
|
3
3
|
import { finalizeRequestResult } from "../invocation-result.js";
|
|
4
4
|
import { invokeRuntimeWithLocalTools } from "./invoke-runtime.js";
|
|
5
5
|
import { buildInvocationRequest } from "../model/invocation-request.js";
|
|
6
|
+
import { UPSTREAM_REQUEST_CONFIG_KEY, UPSTREAM_SESSION_CONFIG_KEY } from "../upstream-configurable-keys.js";
|
|
6
7
|
export async function executeRequestInvocation(options) {
|
|
7
8
|
const history = options.history ?? [];
|
|
8
9
|
const invokeOptions = options.invokeOptions ?? {};
|
|
@@ -13,7 +14,14 @@ export async function executeRequestInvocation(options) {
|
|
|
13
14
|
binding: options.binding,
|
|
14
15
|
resolveTools: options.resolveTools,
|
|
15
16
|
getToolNameMapping: options.getToolNameMapping,
|
|
16
|
-
|
|
17
|
+
toolConfig: {
|
|
18
|
+
...(invokeOptions.context ? { context: invokeOptions.context } : {}),
|
|
19
|
+
configurable: {
|
|
20
|
+
[UPSTREAM_SESSION_CONFIG_KEY]: options.sessionId,
|
|
21
|
+
[UPSTREAM_REQUEST_CONFIG_KEY]: options.requestId,
|
|
22
|
+
},
|
|
23
|
+
...(options.invokeOptions?.toolRuntimeContext ? { toolRuntimeContext: options.invokeOptions.toolRuntimeContext } : {}),
|
|
24
|
+
},
|
|
17
25
|
});
|
|
18
26
|
const builtinExecutableTools = await options.resolveBuiltinMiddlewareTools(options.binding, invokeOptions);
|
|
19
27
|
const localOrUpstreamInvocation = await invokeRuntimeWithLocalTools({
|
|
@@ -4,7 +4,7 @@ import type { ToolNameMapping } from "../tool/tool-name-mapping.js";
|
|
|
4
4
|
export type ExecutableTool = {
|
|
5
5
|
name: string;
|
|
6
6
|
schema: unknown;
|
|
7
|
-
invoke: (input: unknown) => Promise<unknown>;
|
|
7
|
+
invoke: (input: unknown, config?: Record<string, unknown>) => Promise<unknown>;
|
|
8
8
|
};
|
|
9
9
|
export declare function invokeRuntimeWithLocalTools(options: {
|
|
10
10
|
binding: CompiledAgentBinding;
|
|
@@ -16,6 +16,8 @@ export declare function streamRuntimeExecution(options: {
|
|
|
16
16
|
files?: Record<string, unknown>;
|
|
17
17
|
requestId?: string;
|
|
18
18
|
memoryContext?: string;
|
|
19
|
+
profiling?: boolean;
|
|
20
|
+
toolRuntimeContext?: Record<string, unknown>;
|
|
19
21
|
};
|
|
20
22
|
primaryTools: CompiledTool[];
|
|
21
23
|
toolNameMapping: ToolNameMapping;
|
|
@@ -35,14 +37,16 @@ export declare function streamRuntimeExecution(options: {
|
|
|
35
37
|
state?: Record<string, unknown>;
|
|
36
38
|
files?: Record<string, unknown>;
|
|
37
39
|
memoryContext?: string;
|
|
40
|
+
toolRuntimeContext?: Record<string, unknown>;
|
|
38
41
|
}) => Promise<{
|
|
39
42
|
output: string;
|
|
40
43
|
metadata?: Record<string, unknown>;
|
|
41
44
|
}>;
|
|
42
45
|
applyToolRecoveryInstruction: (binding: CompiledAgentBinding, instruction: string) => CompiledAgentBinding;
|
|
46
|
+
isRetryableProviderError?: (binding: CompiledAgentBinding, error: unknown) => boolean;
|
|
43
47
|
getSystemPrompt: (binding: CompiledAgentBinding) => string | undefined;
|
|
44
48
|
isLangChainBinding: (binding: CompiledAgentBinding) => boolean;
|
|
45
49
|
isDeepAgentBinding: (binding: CompiledAgentBinding) => boolean;
|
|
46
50
|
countConfiguredTools: (binding: CompiledAgentBinding) => number;
|
|
47
|
-
}): AsyncGenerator<RuntimeStreamChunk
|
|
51
|
+
}): AsyncGenerator<RuntimeStreamChunk>;
|
|
48
52
|
export {};
|