@botbotgo/agent-harness 0.0.308 → 0.0.310
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 +17 -1
- package/README.zh.md +17 -1
- package/dist/acp.d.ts +1 -116
- package/dist/acp.js +1 -310
- package/dist/api.d.ts +4 -2
- package/dist/api.js +4 -1
- package/dist/cli/chat-interactive.d.ts +24 -0
- package/dist/cli/chat-interactive.js +244 -0
- package/dist/cli/chat-rendering.d.ts +9 -0
- package/dist/cli/chat-rendering.js +102 -0
- package/dist/cli/chat-stream.d.ts +23 -0
- package/dist/cli/chat-stream.js +330 -0
- package/dist/cli/chat-ui.d.ts +20 -0
- package/dist/cli/chat-ui.js +198 -0
- package/dist/cli/chat-workspace.d.ts +15 -0
- package/dist/cli/chat-workspace.js +205 -0
- package/dist/cli/main.d.ts +52 -0
- package/dist/cli/main.js +323 -0
- package/dist/cli/managed-service-commands.d.ts +23 -0
- package/dist/cli/managed-service-commands.js +63 -0
- package/dist/cli/managed-service.d.ts +27 -0
- package/dist/cli/managed-service.js +61 -0
- package/dist/cli/options-init-chat.d.ts +16 -0
- package/dist/cli/options-init-chat.js +108 -0
- package/dist/cli/options-runtime.d.ts +27 -0
- package/dist/cli/options-runtime.js +158 -0
- package/dist/cli/options-serve.d.ts +24 -0
- package/dist/cli/options-serve.js +166 -0
- package/dist/cli/options.d.ts +5 -0
- package/dist/cli/options.js +47 -0
- package/dist/cli/process-guards.d.ts +14 -0
- package/dist/cli/process-guards.js +139 -0
- package/dist/cli/request-tree.d.ts +12 -0
- package/dist/cli/request-tree.js +296 -0
- package/dist/cli/runtime-commands.d.ts +15 -0
- package/dist/cli/runtime-commands.js +247 -0
- package/dist/cli/runtime-output.d.ts +5 -0
- package/dist/cli/runtime-output.js +124 -0
- package/dist/cli/server-commands.d.ts +36 -0
- package/dist/cli/server-commands.js +250 -0
- package/dist/cli/workspace.d.ts +6 -0
- package/dist/cli/workspace.js +71 -0
- package/dist/cli.d.ts +1 -67
- package/dist/cli.js +2 -2734
- package/dist/client/acp.d.ts +1 -50
- package/dist/client/acp.js +1 -219
- package/dist/client/in-process.d.ts +5 -5
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +1 -1
- package/dist/contracts/runtime-evaluation.d.ts +103 -0
- package/dist/contracts/runtime-evaluation.js +1 -0
- package/dist/contracts/runtime-memory.d.ts +162 -0
- package/dist/contracts/runtime-memory.js +1 -0
- package/dist/contracts/runtime-observability.d.ts +248 -0
- package/dist/contracts/runtime-observability.js +1 -0
- package/dist/contracts/runtime-requests.d.ts +342 -0
- package/dist/contracts/runtime-requests.js +1 -0
- package/dist/contracts/runtime-scheduling.d.ts +146 -0
- package/dist/contracts/runtime-scheduling.js +1 -0
- package/dist/contracts/runtime.d.ts +5 -1042
- package/dist/contracts/runtime.js +27 -1
- package/dist/flow/build-flow-graph.js +4 -875
- package/dist/flow/flow-graph-normalization.d.ts +56 -0
- package/dist/flow/flow-graph-normalization.js +214 -0
- package/dist/flow/flow-graph-runtime.d.ts +8 -0
- package/dist/flow/flow-graph-runtime.js +107 -0
- package/dist/flow/flow-graph-upstream.d.ts +18 -0
- package/dist/flow/flow-graph-upstream.js +498 -0
- package/dist/flow/types.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/init-project.d.ts +1 -12
- package/dist/init-project.js +1 -651
- package/dist/{procedural → knowledge/procedural}/manager.d.ts +3 -3
- package/dist/{procedural → knowledge/procedural}/manager.js +6 -6
- package/dist/mcp.d.ts +2 -62
- package/dist/mcp.js +2 -253
- package/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/persistence/file-store.js +1 -1
- package/dist/persistence/sqlite-runtime.d.ts +19 -0
- package/dist/persistence/sqlite-runtime.js +86 -0
- package/dist/persistence/sqlite-store.js +11 -99
- package/dist/{request-events.d.ts → projections/request-events.d.ts} +1 -1
- package/dist/{upstream-events.js → projections/upstream-events.js} +1 -1
- package/dist/protocol/a2a/http-discovery.d.ts +39 -0
- package/dist/protocol/a2a/http-discovery.js +178 -0
- package/dist/protocol/a2a/http-rpc.d.ts +28 -0
- package/dist/protocol/a2a/http-rpc.js +623 -0
- package/dist/protocol/a2a/http.d.ts +72 -1
- package/dist/protocol/a2a/http.js +14 -1124
- package/dist/protocol/a2a/task-state.d.ts +29 -0
- package/dist/protocol/a2a/task-state.js +317 -0
- package/dist/protocol/acp/client.js +1 -1
- package/dist/protocol/acp/harness-client.d.ts +50 -0
- package/dist/protocol/acp/harness-client.js +219 -0
- package/dist/protocol/acp/server.d.ts +116 -0
- package/dist/protocol/acp/server.js +310 -0
- package/dist/protocol/ag-ui/http.js +1 -1
- package/dist/protocol/mcp/server.d.ts +76 -0
- package/dist/protocol/mcp/server.js +428 -0
- package/dist/resource/backend/workspace-scoped-backend.d.ts +40 -0
- package/dist/resource/backend/workspace-scoped-backend.js +296 -0
- package/dist/resource/mcp/tool-support.d.ts +35 -0
- package/dist/resource/mcp/tool-support.js +296 -0
- package/dist/resource/mcp-tool-support.d.ts +2 -35
- package/dist/resource/mcp-tool-support.js +2 -296
- package/dist/resource/providers/resource-provider.d.ts +22 -0
- package/dist/resource/providers/resource-provider.js +215 -0
- package/dist/resource/resource-impl.d.ts +3 -33
- package/dist/resource/resource-impl.js +2 -808
- package/dist/resource/resource-types.d.ts +33 -0
- package/dist/resource/resource-types.js +1 -0
- package/dist/resource/tools/function-tool-resolver.d.ts +2 -0
- package/dist/resource/tools/function-tool-resolver.js +306 -0
- package/dist/runtime/adapter/middleware-assembly.js +1 -1
- package/dist/runtime/adapter/model/invocation-request.js +2 -2
- package/dist/runtime/adapter/model/message-assembly.js +1 -1
- package/dist/runtime/agent-runtime-adapter.d.ts +3 -63
- package/dist/runtime/agent-runtime-adapter.js +5 -233
- package/dist/runtime/agent-runtime-assembly.d.ts +67 -0
- package/dist/runtime/agent-runtime-assembly.js +211 -0
- package/dist/runtime/harness/background-runtime.d.ts +1 -1
- package/dist/runtime/harness/events/event-sink.js +1 -1
- package/dist/runtime/harness/events/runtime-event-operations.d.ts +1 -1
- package/dist/runtime/harness/events/streaming.js +1 -1
- package/dist/runtime/harness/public-shapes.d.ts +43 -0
- package/dist/runtime/harness/public-shapes.js +186 -0
- package/dist/runtime/harness/run/inspection.js +2 -2
- package/dist/runtime/harness/run/resources.js +1 -1
- package/dist/runtime/harness/run/surface-semantics.js +1 -1
- package/dist/runtime/harness/system/inventory.d.ts +1 -1
- package/dist/runtime/harness/system/inventory.js +2 -2
- package/dist/runtime/harness/system/policy-engine.js +1 -1
- package/dist/runtime/harness/system/runtime-memory-manager.js +1 -1
- package/dist/runtime/harness/system/skill-requirements.d.ts +1 -1
- package/dist/runtime/harness/system/skill-requirements.js +1 -1
- package/dist/runtime/harness.d.ts +3 -2
- package/dist/runtime/harness.js +11 -191
- package/dist/runtime/maintenance/checkpoint-maintenance.js +1 -1
- package/dist/runtime/maintenance/runtime-record-maintenance.js +1 -1
- package/dist/runtime/parsing/output-content.d.ts +11 -0
- package/dist/runtime/parsing/output-content.js +442 -0
- package/dist/runtime/parsing/output-parsing.d.ts +3 -29
- package/dist/runtime/parsing/output-parsing.js +3 -806
- package/dist/runtime/parsing/output-recovery.d.ts +14 -0
- package/dist/runtime/parsing/output-recovery.js +288 -0
- package/dist/runtime/parsing/output-tool-args.d.ts +4 -0
- package/dist/runtime/parsing/output-tool-args.js +120 -0
- package/dist/runtime/support/runtime-factories.js +1 -1
- package/dist/scaffold/init-project.d.ts +12 -0
- package/dist/scaffold/init-project.js +651 -0
- package/dist/{extensions.d.ts → tooling/extensions.d.ts} +1 -1
- package/dist/{extensions.js → tooling/extensions.js} +3 -3
- package/dist/{tool-modules.d.ts → tooling/module-loader.d.ts} +1 -1
- package/dist/{tool-modules.js → tooling/module-loader.js} +2 -2
- package/dist/workspace/agent-binding-compiler.js +2 -2
- package/dist/workspace/compile.js +2 -2
- package/dist/workspace/object-loader-paths.d.ts +11 -0
- package/dist/workspace/object-loader-paths.js +75 -0
- package/dist/workspace/object-loader-readers.d.ts +21 -0
- package/dist/workspace/object-loader-readers.js +187 -0
- package/dist/workspace/object-loader.d.ts +0 -1
- package/dist/workspace/object-loader.js +6 -260
- package/dist/workspace/resource-compilers.js +1 -1
- package/dist/workspace/support/discovery.js +1 -1
- package/package.json +1 -1
- package/dist/runtime/adapter/index.d.ts +0 -13
- package/dist/runtime/adapter/index.js +0 -13
- package/dist/runtime/harness/index.d.ts +0 -19
- package/dist/runtime/harness/index.js +0 -19
- package/dist/runtime/maintenance/index.d.ts +0 -4
- package/dist/runtime/maintenance/index.js +0 -4
- package/dist/runtime/parsing/index.d.ts +0 -2
- package/dist/runtime/parsing/index.js +0 -2
- package/dist/runtime/support/index.d.ts +0 -4
- package/dist/runtime/support/index.js +0 -4
- package/dist/workspace/support/index.d.ts +0 -2
- package/dist/workspace/support/index.js +0 -2
- /package/dist/{procedural → knowledge/procedural}/config.d.ts +0 -0
- /package/dist/{procedural → knowledge/procedural}/config.js +0 -0
- /package/dist/{procedural → knowledge/procedural}/index.d.ts +0 -0
- /package/dist/{procedural → knowledge/procedural}/index.js +0 -0
- /package/dist/{presentation.d.ts → projections/presentation.d.ts} +0 -0
- /package/dist/{presentation.js → projections/presentation.js} +0 -0
- /package/dist/{request-events.js → projections/request-events.js} +0 -0
- /package/dist/{upstream-events.d.ts → projections/upstream-events.d.ts} +0 -0
- /package/dist/runtime/{support → env}/runtime-env.d.ts +0 -0
- /package/dist/runtime/{support → env}/runtime-env.js +0 -0
- /package/dist/runtime/{support → layout}/runtime-layout.d.ts +0 -0
- /package/dist/runtime/{support → layout}/runtime-layout.js +0 -0
- /package/dist/runtime/{support → prompts}/runtime-prompts.d.ts +0 -0
- /package/dist/runtime/{support → prompts}/runtime-prompts.js +0 -0
- /package/dist/runtime/{support → skills}/skill-metadata.d.ts +0 -0
- /package/dist/runtime/{support → skills}/skill-metadata.js +0 -0
package/dist/mcp.d.ts
CHANGED
|
@@ -1,62 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type ToolMcpServerOptions = {
|
|
4
|
-
agentId: string;
|
|
5
|
-
serverInfo?: {
|
|
6
|
-
name?: string;
|
|
7
|
-
version?: string;
|
|
8
|
-
};
|
|
9
|
-
includeToolNames?: string[];
|
|
10
|
-
};
|
|
11
|
-
export type ToolMcpServerTool = {
|
|
12
|
-
compiledTool: CompiledTool;
|
|
13
|
-
resolvedTool: unknown;
|
|
14
|
-
sourceTool?: ParsedToolObject;
|
|
15
|
-
};
|
|
16
|
-
export type RuntimeMcpServerOptions = {
|
|
17
|
-
serverInfo?: {
|
|
18
|
-
name?: string;
|
|
19
|
-
version?: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
type RuntimeMcpRuntime = {
|
|
23
|
-
listSessions: (filter?: {
|
|
24
|
-
agentId?: string;
|
|
25
|
-
}) => Promise<SessionSummary[]>;
|
|
26
|
-
getSessionRecord: (sessionId: string) => Promise<SessionRecord | null>;
|
|
27
|
-
listRequests: (filter?: {
|
|
28
|
-
agentId?: string;
|
|
29
|
-
sessionId?: string;
|
|
30
|
-
state?: RequestState;
|
|
31
|
-
}) => Promise<RequestSummary[]>;
|
|
32
|
-
getRequest: (requestId: string) => Promise<RequestRecord | null>;
|
|
33
|
-
listApprovals: (filter?: {
|
|
34
|
-
status?: ApprovalRecord["status"];
|
|
35
|
-
sessionId?: string;
|
|
36
|
-
requestId?: string;
|
|
37
|
-
}) => Promise<ApprovalRecord[]>;
|
|
38
|
-
getApproval: (approvalId: string) => Promise<ApprovalRecord | null>;
|
|
39
|
-
resume: (options: {
|
|
40
|
-
approvalId?: string;
|
|
41
|
-
sessionId?: string;
|
|
42
|
-
requestId?: string;
|
|
43
|
-
decision?: "approve" | "edit" | "reject";
|
|
44
|
-
editedInput?: Record<string, unknown>;
|
|
45
|
-
}) => Promise<RequestResult>;
|
|
46
|
-
listRequestArtifacts: (sessionId: string, requestId: string) => Promise<ArtifactListing>;
|
|
47
|
-
readRequestArtifact: (sessionId: string, requestId: string, artifactPath: string) => Promise<unknown>;
|
|
48
|
-
listRequestEvents: (sessionId: string, requestId: string) => Promise<HarnessEvent[]>;
|
|
49
|
-
exportRequestPackage: (input: {
|
|
50
|
-
sessionId: string;
|
|
51
|
-
requestId: string;
|
|
52
|
-
includeArtifacts?: boolean;
|
|
53
|
-
includeArtifactContents?: boolean;
|
|
54
|
-
includeRuntimeHealth?: boolean;
|
|
55
|
-
}) => Promise<unknown>;
|
|
56
|
-
exportSessionPackage: (input: RuntimeSessionPackageInput) => Promise<RuntimeSessionPackage>;
|
|
57
|
-
};
|
|
58
|
-
export declare function createToolMcpServerFromTools(tools: ToolMcpServerTool[], options: ToolMcpServerOptions): Promise<McpServer>;
|
|
59
|
-
export declare function serveToolsOverStdioFromHarness(tools: ToolMcpServerTool[], options: ToolMcpServerOptions): Promise<McpServer>;
|
|
60
|
-
export declare function createRuntimeMcpServer(runtime: RuntimeMcpRuntime, options?: RuntimeMcpServerOptions): Promise<McpServer>;
|
|
61
|
-
export declare function serveRuntimeMcpOverStdio(runtime: RuntimeMcpRuntime, options?: RuntimeMcpServerOptions): Promise<McpServer>;
|
|
62
|
-
export {};
|
|
1
|
+
export { AGENT_HARNESS_VERSION } from "./package-version.js";
|
|
2
|
+
export * from "./protocol/mcp/server.js";
|
package/dist/mcp.js
CHANGED
|
@@ -1,253 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
import { AGENT_HARNESS_VERSION } from "./package-version.js";
|
|
6
|
-
import { loadToolModuleDefinition } from "./tool-modules.js";
|
|
7
|
-
function asResolvedTool(value) {
|
|
8
|
-
return typeof value === "object" && value !== null ? value : null;
|
|
9
|
-
}
|
|
10
|
-
async function buildRawShapeForTool(sourceTool, resolvedTool) {
|
|
11
|
-
if (!sourceTool) {
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
14
|
-
if (sourceTool.type === "function") {
|
|
15
|
-
const imported = await import(pathToFileURL(sourceTool.sourcePath).href);
|
|
16
|
-
const definition = loadToolModuleDefinition(imported, sourceTool.implementationName ?? sourceTool.id);
|
|
17
|
-
return typeof definition.schema.shape === "object" && definition.schema.shape !== null
|
|
18
|
-
? definition.schema.shape
|
|
19
|
-
: undefined;
|
|
20
|
-
}
|
|
21
|
-
const typedResolvedTool = asResolvedTool(resolvedTool);
|
|
22
|
-
if (!typedResolvedTool?.inputSchemaPromise) {
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
return jsonSchemaObjectToRawShape(await typedResolvedTool.inputSchemaPromise);
|
|
26
|
-
}
|
|
27
|
-
async function invokeResolvedTool(resolvedTool, input) {
|
|
28
|
-
const typed = asResolvedTool(resolvedTool);
|
|
29
|
-
if (!typed) {
|
|
30
|
-
throw new Error("Resolved tool is not invokable.");
|
|
31
|
-
}
|
|
32
|
-
if (typeof typed.invoke === "function") {
|
|
33
|
-
return typed.invoke(input);
|
|
34
|
-
}
|
|
35
|
-
if (typeof typed.call === "function") {
|
|
36
|
-
return typed.call(input);
|
|
37
|
-
}
|
|
38
|
-
if (typeof typed.func === "function") {
|
|
39
|
-
return typed.func(input);
|
|
40
|
-
}
|
|
41
|
-
throw new Error("Resolved tool does not expose invoke, call, or func.");
|
|
42
|
-
}
|
|
43
|
-
function renderToolOutput(output) {
|
|
44
|
-
if (typeof output === "string") {
|
|
45
|
-
return output;
|
|
46
|
-
}
|
|
47
|
-
return JSON.stringify(output, null, 2);
|
|
48
|
-
}
|
|
49
|
-
function jsonSchemaObjectToRawShape(schema) {
|
|
50
|
-
if (!schema || schema.type !== "object") {
|
|
51
|
-
return undefined;
|
|
52
|
-
}
|
|
53
|
-
const properties = typeof schema.properties === "object" && schema.properties
|
|
54
|
-
? schema.properties
|
|
55
|
-
: {};
|
|
56
|
-
const required = Array.isArray(schema.required)
|
|
57
|
-
? new Set(schema.required.filter((item) => typeof item === "string"))
|
|
58
|
-
: new Set();
|
|
59
|
-
const shape = {};
|
|
60
|
-
for (const [key, propertySchema] of Object.entries(properties)) {
|
|
61
|
-
const built = jsonSchemaToZod(propertySchema);
|
|
62
|
-
shape[key] = required.has(key) ? built : built.optional();
|
|
63
|
-
}
|
|
64
|
-
return shape;
|
|
65
|
-
}
|
|
66
|
-
function jsonSchemaToZod(schema) {
|
|
67
|
-
switch (schema?.type) {
|
|
68
|
-
case "string":
|
|
69
|
-
return z.string();
|
|
70
|
-
case "number":
|
|
71
|
-
return z.number();
|
|
72
|
-
case "integer":
|
|
73
|
-
return z.number().int();
|
|
74
|
-
case "boolean":
|
|
75
|
-
return z.boolean();
|
|
76
|
-
case "array":
|
|
77
|
-
return z.array(jsonSchemaToZod(typeof schema.items === "object" && schema.items ? schema.items : undefined));
|
|
78
|
-
case "object": {
|
|
79
|
-
const shape = jsonSchemaObjectToRawShape(schema);
|
|
80
|
-
return z.object(shape ?? {}).passthrough();
|
|
81
|
-
}
|
|
82
|
-
default:
|
|
83
|
-
return z.any();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
export async function createToolMcpServerFromTools(tools, options) {
|
|
87
|
-
const server = new McpServer({
|
|
88
|
-
name: options.serverInfo?.name ?? `agent-harness-${options.agentId}`,
|
|
89
|
-
version: options.serverInfo?.version ?? AGENT_HARNESS_VERSION,
|
|
90
|
-
});
|
|
91
|
-
const allowedNames = options.includeToolNames ? new Set(options.includeToolNames) : null;
|
|
92
|
-
for (const { compiledTool, resolvedTool, sourceTool } of tools) {
|
|
93
|
-
if (allowedNames && !allowedNames.has(compiledTool.name)) {
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
const rawShape = await buildRawShapeForTool(sourceTool, resolvedTool);
|
|
97
|
-
server.tool(compiledTool.name, compiledTool.description, rawShape ?? {}, async (input) => ({
|
|
98
|
-
content: [
|
|
99
|
-
{
|
|
100
|
-
type: "text",
|
|
101
|
-
text: renderToolOutput(await invokeResolvedTool(resolvedTool, input)),
|
|
102
|
-
},
|
|
103
|
-
],
|
|
104
|
-
}));
|
|
105
|
-
}
|
|
106
|
-
return server;
|
|
107
|
-
}
|
|
108
|
-
export async function serveToolsOverStdioFromHarness(tools, options) {
|
|
109
|
-
const server = await createToolMcpServerFromTools(tools, options);
|
|
110
|
-
await server.connect(new StdioServerTransport());
|
|
111
|
-
return server;
|
|
112
|
-
}
|
|
113
|
-
export async function createRuntimeMcpServer(runtime, options = {}) {
|
|
114
|
-
const server = new McpServer({
|
|
115
|
-
name: options.serverInfo?.name ?? "agent-harness-runtime",
|
|
116
|
-
version: options.serverInfo?.version ?? AGENT_HARNESS_VERSION,
|
|
117
|
-
});
|
|
118
|
-
server.tool("list_sessions", "List persisted runtime sessions.", {
|
|
119
|
-
agentId: z.string().optional(),
|
|
120
|
-
}, async (input) => ({
|
|
121
|
-
content: [{
|
|
122
|
-
type: "text",
|
|
123
|
-
text: renderToolOutput(await runtime.listSessions(input.agentId ? { agentId: input.agentId } : undefined)),
|
|
124
|
-
}],
|
|
125
|
-
}));
|
|
126
|
-
server.tool("get_session", "Get one persisted runtime session by id.", {
|
|
127
|
-
sessionId: z.string(),
|
|
128
|
-
}, async (input) => ({
|
|
129
|
-
content: [{
|
|
130
|
-
type: "text",
|
|
131
|
-
text: renderToolOutput(await runtime.getSessionRecord(input.sessionId)),
|
|
132
|
-
}],
|
|
133
|
-
}));
|
|
134
|
-
server.tool("list_requests", "List persisted runtime requests.", {
|
|
135
|
-
agentId: z.string().optional(),
|
|
136
|
-
sessionId: z.string().optional(),
|
|
137
|
-
state: z.enum(["queued", "running", "waiting_for_approval", "completed", "failed", "cancelled"]).optional(),
|
|
138
|
-
}, async (input) => ({
|
|
139
|
-
content: [{
|
|
140
|
-
type: "text",
|
|
141
|
-
text: renderToolOutput(await runtime.listRequests({
|
|
142
|
-
...(input.agentId ? { agentId: input.agentId } : {}),
|
|
143
|
-
...(input.sessionId ? { sessionId: input.sessionId } : {}),
|
|
144
|
-
...(input.state ? { state: input.state } : {}),
|
|
145
|
-
})),
|
|
146
|
-
}],
|
|
147
|
-
}));
|
|
148
|
-
server.tool("get_request", "Get one persisted runtime request by id.", {
|
|
149
|
-
requestId: z.string(),
|
|
150
|
-
}, async (input) => ({
|
|
151
|
-
content: [{
|
|
152
|
-
type: "text",
|
|
153
|
-
text: renderToolOutput(await runtime.getRequest(input.requestId)),
|
|
154
|
-
}],
|
|
155
|
-
}));
|
|
156
|
-
server.tool("list_approvals", "List runtime approvals.", {
|
|
157
|
-
status: z.enum(["pending", "approved", "edited", "rejected", "expired"]).optional(),
|
|
158
|
-
sessionId: z.string().optional(),
|
|
159
|
-
requestId: z.string().optional(),
|
|
160
|
-
}, async (input) => ({
|
|
161
|
-
content: [{
|
|
162
|
-
type: "text",
|
|
163
|
-
text: renderToolOutput(await runtime.listApprovals({
|
|
164
|
-
...(input.status ? { status: input.status } : {}),
|
|
165
|
-
...(input.sessionId ? { sessionId: input.sessionId } : {}),
|
|
166
|
-
...(input.requestId ? { requestId: input.requestId } : {}),
|
|
167
|
-
})),
|
|
168
|
-
}],
|
|
169
|
-
}));
|
|
170
|
-
server.tool("get_approval", "Get one runtime approval by id.", {
|
|
171
|
-
approvalId: z.string(),
|
|
172
|
-
}, async (input) => ({
|
|
173
|
-
content: [{
|
|
174
|
-
type: "text",
|
|
175
|
-
text: renderToolOutput(await runtime.getApproval(input.approvalId)),
|
|
176
|
-
}],
|
|
177
|
-
}));
|
|
178
|
-
server.tool("resolve_approval", "Resolve one runtime approval.", {
|
|
179
|
-
approvalId: z.string(),
|
|
180
|
-
decision: z.enum(["approve", "edit", "reject"]),
|
|
181
|
-
sessionId: z.string().optional(),
|
|
182
|
-
requestId: z.string().optional(),
|
|
183
|
-
editedInput: z.record(z.string(), z.any()).optional(),
|
|
184
|
-
}, async (input) => ({
|
|
185
|
-
content: [{
|
|
186
|
-
type: "text",
|
|
187
|
-
text: renderToolOutput(await runtime.resume({
|
|
188
|
-
approvalId: input.approvalId,
|
|
189
|
-
decision: input.decision,
|
|
190
|
-
...(input.sessionId ? { sessionId: input.sessionId } : {}),
|
|
191
|
-
...(input.requestId ? { requestId: input.requestId } : {}),
|
|
192
|
-
...(input.editedInput ? { editedInput: input.editedInput } : {}),
|
|
193
|
-
})),
|
|
194
|
-
}],
|
|
195
|
-
}));
|
|
196
|
-
server.tool("list_artifacts", "List artifacts for one runtime request.", {
|
|
197
|
-
sessionId: z.string(),
|
|
198
|
-
requestId: z.string(),
|
|
199
|
-
}, async (input) => ({
|
|
200
|
-
content: [{
|
|
201
|
-
type: "text",
|
|
202
|
-
text: renderToolOutput(await runtime.listRequestArtifacts(input.sessionId, input.requestId)),
|
|
203
|
-
}],
|
|
204
|
-
}));
|
|
205
|
-
server.tool("read_artifact", "Read one runtime artifact.", {
|
|
206
|
-
sessionId: z.string(),
|
|
207
|
-
requestId: z.string(),
|
|
208
|
-
artifactPath: z.string(),
|
|
209
|
-
}, async (input) => ({
|
|
210
|
-
content: [{
|
|
211
|
-
type: "text",
|
|
212
|
-
text: renderToolOutput(await runtime.readRequestArtifact(input.sessionId, input.requestId, input.artifactPath)),
|
|
213
|
-
}],
|
|
214
|
-
}));
|
|
215
|
-
server.tool("list_request_events", "List persisted runtime events for one request.", {
|
|
216
|
-
sessionId: z.string(),
|
|
217
|
-
requestId: z.string(),
|
|
218
|
-
}, async (input) => ({
|
|
219
|
-
content: [{
|
|
220
|
-
type: "text",
|
|
221
|
-
text: renderToolOutput(await runtime.listRequestEvents(input.sessionId, input.requestId)),
|
|
222
|
-
}],
|
|
223
|
-
}));
|
|
224
|
-
server.tool("export_request_package", "Export a stable runtime request package for one request.", {
|
|
225
|
-
sessionId: z.string(),
|
|
226
|
-
requestId: z.string(),
|
|
227
|
-
includeArtifacts: z.boolean().optional(),
|
|
228
|
-
includeArtifactContents: z.boolean().optional(),
|
|
229
|
-
includeRuntimeHealth: z.boolean().optional(),
|
|
230
|
-
}, async (input) => ({
|
|
231
|
-
content: [{
|
|
232
|
-
type: "text",
|
|
233
|
-
text: renderToolOutput(await runtime.exportRequestPackage(input)),
|
|
234
|
-
}],
|
|
235
|
-
}));
|
|
236
|
-
server.tool("export_session_package", "Export a stable runtime session package.", {
|
|
237
|
-
sessionId: z.string(),
|
|
238
|
-
includeArtifacts: z.boolean().optional(),
|
|
239
|
-
includeArtifactContents: z.boolean().optional(),
|
|
240
|
-
includeRuntimeHealth: z.boolean().optional(),
|
|
241
|
-
}, async (input) => ({
|
|
242
|
-
content: [{
|
|
243
|
-
type: "text",
|
|
244
|
-
text: renderToolOutput(await runtime.exportSessionPackage(input)),
|
|
245
|
-
}],
|
|
246
|
-
}));
|
|
247
|
-
return server;
|
|
248
|
-
}
|
|
249
|
-
export async function serveRuntimeMcpOverStdio(runtime, options = {}) {
|
|
250
|
-
const server = await createRuntimeMcpServer(runtime, options);
|
|
251
|
-
await server.connect(new StdioServerTransport());
|
|
252
|
-
return server;
|
|
253
|
-
}
|
|
1
|
+
export { AGENT_HARNESS_VERSION } from "./package-version.js";
|
|
2
|
+
export * from "./protocol/mcp/server.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.309";
|
package/dist/package-version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.309";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { appendFile, readFile, readdir, rm, writeFile } from "node:fs/promises";
|
|
3
3
|
import { ensureDir, fileExists, readJson, writeJson } from "../utils/fs.js";
|
|
4
|
-
import { resolveRuntimeArtifactsRoot } from "../runtime/
|
|
4
|
+
import { resolveRuntimeArtifactsRoot } from "../runtime/layout/runtime-layout.js";
|
|
5
5
|
function nowIso() {
|
|
6
6
|
return new Date(Date.now()).toISOString();
|
|
7
7
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Client, InValue } from "@libsql/client";
|
|
2
|
+
export type SqlRow = Record<string, unknown>;
|
|
3
|
+
export declare const SQLITE_BUSY_RETRY_ATTEMPTS = 30;
|
|
4
|
+
export declare const SQLITE_BUSY_RETRY_DELAY_MS = 100;
|
|
5
|
+
export declare function asRow(value: unknown): SqlRow;
|
|
6
|
+
export declare function asString(value: unknown): string;
|
|
7
|
+
export declare function asNullableString(value: unknown): string | null;
|
|
8
|
+
export declare function asBoolean(value: unknown): boolean;
|
|
9
|
+
export declare function parseJson<T>(value: unknown): T;
|
|
10
|
+
export declare function toSqliteUrl(filePath: string): string;
|
|
11
|
+
export declare function nowIso(): string;
|
|
12
|
+
export declare function throwWrappedRuntimeSqliteError(dbPath: string, sql: string | undefined, error: unknown): never;
|
|
13
|
+
export declare function isSqliteBusyError(error: unknown): boolean;
|
|
14
|
+
export declare function sleep(ms: number): Promise<void>;
|
|
15
|
+
export declare function executeWithBusyRetry<T>(client: Client, dbPath: string, sql: string, args: InValue[] | undefined, run: () => Promise<T>): Promise<T>;
|
|
16
|
+
export declare function buildWhereClause(filters: Array<[sql: string, value: InValue | undefined]>): {
|
|
17
|
+
clause: string;
|
|
18
|
+
args: InValue[];
|
|
19
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export const SQLITE_BUSY_RETRY_ATTEMPTS = 30;
|
|
2
|
+
export const SQLITE_BUSY_RETRY_DELAY_MS = 100;
|
|
3
|
+
export function asRow(value) {
|
|
4
|
+
return value;
|
|
5
|
+
}
|
|
6
|
+
export function asString(value) {
|
|
7
|
+
return typeof value === "string" ? value : String(value ?? "");
|
|
8
|
+
}
|
|
9
|
+
export function asNullableString(value) {
|
|
10
|
+
return value == null ? null : asString(value);
|
|
11
|
+
}
|
|
12
|
+
export function asBoolean(value) {
|
|
13
|
+
return value === true || value === 1 || value === "1";
|
|
14
|
+
}
|
|
15
|
+
export function parseJson(value) {
|
|
16
|
+
return JSON.parse(asString(value));
|
|
17
|
+
}
|
|
18
|
+
export function toSqliteUrl(filePath) {
|
|
19
|
+
return `file:${filePath}`;
|
|
20
|
+
}
|
|
21
|
+
export function nowIso() {
|
|
22
|
+
return new Date(Date.now()).toISOString();
|
|
23
|
+
}
|
|
24
|
+
function runtimeSqliteErrorShouldIncludeSql(baseMessage) {
|
|
25
|
+
if (process.env.AGENT_HARNESS_RUNTIME_SQLITE_DEBUG === "1") {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
return /SQLITE_CONSTRAINT|FOREIGN KEY|UNIQUE constraint|NOT NULL/i.test(baseMessage);
|
|
29
|
+
}
|
|
30
|
+
function formatRuntimeSqliteErrorMessage(dbPath, sql, baseMessage) {
|
|
31
|
+
let detail = `agent-harness runtime SQLite (${dbPath}): ${baseMessage}`;
|
|
32
|
+
if (sql && runtimeSqliteErrorShouldIncludeSql(baseMessage)) {
|
|
33
|
+
const sqlPreview = sql.replace(/\s+/g, " ").trim();
|
|
34
|
+
const truncated = sqlPreview.length > 220 ? `${sqlPreview.slice(0, 220)}…` : sqlPreview;
|
|
35
|
+
detail += ` [sql=${truncated}]`;
|
|
36
|
+
}
|
|
37
|
+
return detail;
|
|
38
|
+
}
|
|
39
|
+
export function throwWrappedRuntimeSqliteError(dbPath, sql, error) {
|
|
40
|
+
const base = error instanceof Error ? error.message : String(error);
|
|
41
|
+
const wrapped = new Error(formatRuntimeSqliteErrorMessage(dbPath, sql, base));
|
|
42
|
+
wrapped.cause = error;
|
|
43
|
+
throw wrapped;
|
|
44
|
+
}
|
|
45
|
+
function collectErrorMessages(error) {
|
|
46
|
+
const messages = [];
|
|
47
|
+
let current = error;
|
|
48
|
+
while (current instanceof Error) {
|
|
49
|
+
messages.push(current.message);
|
|
50
|
+
current = current.cause;
|
|
51
|
+
}
|
|
52
|
+
if (typeof current === "string" && current.length > 0) {
|
|
53
|
+
messages.push(current);
|
|
54
|
+
}
|
|
55
|
+
return messages;
|
|
56
|
+
}
|
|
57
|
+
export function isSqliteBusyError(error) {
|
|
58
|
+
return collectErrorMessages(error).some((message) => /SQLITE_BUSY|database is locked/i.test(message));
|
|
59
|
+
}
|
|
60
|
+
export function sleep(ms) {
|
|
61
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
62
|
+
}
|
|
63
|
+
export async function executeWithBusyRetry(client, dbPath, sql, args, run) {
|
|
64
|
+
void client;
|
|
65
|
+
for (let attempt = 0;; attempt += 1) {
|
|
66
|
+
try {
|
|
67
|
+
return await run();
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
if (!isSqliteBusyError(error) || attempt >= SQLITE_BUSY_RETRY_ATTEMPTS) {
|
|
71
|
+
throwWrappedRuntimeSqliteError(dbPath, sql, error);
|
|
72
|
+
}
|
|
73
|
+
await sleep(Math.min(SQLITE_BUSY_RETRY_DELAY_MS * (attempt + 1), 1_000));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export function buildWhereClause(filters) {
|
|
78
|
+
const active = filters.filter(([, value]) => value !== undefined);
|
|
79
|
+
if (active.length === 0) {
|
|
80
|
+
return { clause: "", args: [] };
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
clause: ` WHERE ${active.map(([sql]) => sql).join(" AND ")}`,
|
|
84
|
+
args: active.map(([, value]) => value),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -2,7 +2,8 @@ import path from "node:path";
|
|
|
2
2
|
import { mkdir, rm } from "node:fs/promises";
|
|
3
3
|
import { createClient } from "@libsql/client";
|
|
4
4
|
import { fileExists, readJson, writeJson } from "../utils/fs.js";
|
|
5
|
-
import { resolveRuntimeRoot, resolveRuntimeSqlitePath } from "../runtime/
|
|
5
|
+
import { resolveRuntimeRoot, resolveRuntimeSqlitePath } from "../runtime/layout/runtime-layout.js";
|
|
6
|
+
import { asBoolean, asNullableString, asRow, asString, buildWhereClause, executeWithBusyRetry, nowIso, parseJson, throwWrappedRuntimeSqliteError, toSqliteUrl, } from "./sqlite-runtime.js";
|
|
6
7
|
import { SqliteRequestContextStore } from "./sqlite-request-context-store.js";
|
|
7
8
|
import { SqliteRequestQueueStore } from "./sqlite-request-queue-store.js";
|
|
8
9
|
const RUNTIME_SQLITE_SCHEMA_VERSION = 7;
|
|
@@ -15,78 +16,6 @@ const ACTIVE_REQUEST_STATES = new Set([
|
|
|
15
16
|
"resuming",
|
|
16
17
|
"cancelling",
|
|
17
18
|
]);
|
|
18
|
-
function asRow(value) {
|
|
19
|
-
return value;
|
|
20
|
-
}
|
|
21
|
-
function asString(value) {
|
|
22
|
-
return typeof value === "string" ? value : String(value ?? "");
|
|
23
|
-
}
|
|
24
|
-
function asNullableString(value) {
|
|
25
|
-
return value == null ? null : asString(value);
|
|
26
|
-
}
|
|
27
|
-
function asBoolean(value) {
|
|
28
|
-
return value === true || value === 1 || value === "1";
|
|
29
|
-
}
|
|
30
|
-
function parseJson(value) {
|
|
31
|
-
return JSON.parse(asString(value));
|
|
32
|
-
}
|
|
33
|
-
function toSqliteUrl(filePath) {
|
|
34
|
-
return `file:${filePath}`;
|
|
35
|
-
}
|
|
36
|
-
const SQLITE_BUSY_RETRY_ATTEMPTS = 30;
|
|
37
|
-
const SQLITE_BUSY_RETRY_DELAY_MS = 100;
|
|
38
|
-
function nowIso() {
|
|
39
|
-
return new Date(Date.now()).toISOString();
|
|
40
|
-
}
|
|
41
|
-
function runtimeSqliteErrorShouldIncludeSql(baseMessage) {
|
|
42
|
-
if (process.env.AGENT_HARNESS_RUNTIME_SQLITE_DEBUG === "1") {
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
return /SQLITE_CONSTRAINT|FOREIGN KEY|UNIQUE constraint|NOT NULL/i.test(baseMessage);
|
|
46
|
-
}
|
|
47
|
-
function formatRuntimeSqliteErrorMessage(dbPath, sql, baseMessage) {
|
|
48
|
-
let detail = `agent-harness runtime SQLite (${dbPath}): ${baseMessage}`;
|
|
49
|
-
if (sql && runtimeSqliteErrorShouldIncludeSql(baseMessage)) {
|
|
50
|
-
const sqlPreview = sql.replace(/\s+/g, " ").trim();
|
|
51
|
-
const truncated = sqlPreview.length > 220 ? `${sqlPreview.slice(0, 220)}…` : sqlPreview;
|
|
52
|
-
detail += ` [sql=${truncated}]`;
|
|
53
|
-
}
|
|
54
|
-
return detail;
|
|
55
|
-
}
|
|
56
|
-
function throwWrappedRuntimeSqliteError(dbPath, sql, error) {
|
|
57
|
-
const base = error instanceof Error ? error.message : String(error);
|
|
58
|
-
const wrapped = new Error(formatRuntimeSqliteErrorMessage(dbPath, sql, base));
|
|
59
|
-
wrapped.cause = error;
|
|
60
|
-
throw wrapped;
|
|
61
|
-
}
|
|
62
|
-
function collectErrorMessages(error) {
|
|
63
|
-
const messages = [];
|
|
64
|
-
let current = error;
|
|
65
|
-
while (current instanceof Error) {
|
|
66
|
-
messages.push(current.message);
|
|
67
|
-
current = current.cause;
|
|
68
|
-
}
|
|
69
|
-
if (typeof current === "string" && current.length > 0) {
|
|
70
|
-
messages.push(current);
|
|
71
|
-
}
|
|
72
|
-
return messages;
|
|
73
|
-
}
|
|
74
|
-
function isSqliteBusyError(error) {
|
|
75
|
-
return collectErrorMessages(error).some((message) => /SQLITE_BUSY|database is locked/i.test(message));
|
|
76
|
-
}
|
|
77
|
-
function sleep(ms) {
|
|
78
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
79
|
-
}
|
|
80
|
-
function buildWhereClause(filters) {
|
|
81
|
-
const active = filters.filter(([, value]) => value !== undefined);
|
|
82
|
-
if (active.length === 0) {
|
|
83
|
-
return { clause: "", args: [] };
|
|
84
|
-
}
|
|
85
|
-
return {
|
|
86
|
-
clause: ` WHERE ${active.map(([sql]) => sql).join(" AND ")}`,
|
|
87
|
-
args: active.map(([, value]) => value),
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
19
|
async function selectProtectedSessionIds(dbPath) {
|
|
91
20
|
if (!(await fileExists(dbPath))) {
|
|
92
21
|
return [];
|
|
@@ -141,37 +70,20 @@ export class SqlitePersistence {
|
|
|
141
70
|
}
|
|
142
71
|
async rawExecute(sql, args) {
|
|
143
72
|
const client = await this.getClient();
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
await client.execute(sql, args);
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
await client.execute(sql);
|
|
73
|
+
await executeWithBusyRetry(client, this.dbPath, sql, args, async () => {
|
|
74
|
+
if (args) {
|
|
75
|
+
await client.execute(sql, args);
|
|
151
76
|
return;
|
|
152
77
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
throwWrappedRuntimeSqliteError(this.dbPath, sql, error);
|
|
156
|
-
}
|
|
157
|
-
await sleep(Math.min(SQLITE_BUSY_RETRY_DELAY_MS * (attempt + 1), 1_000));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
78
|
+
await client.execute(sql);
|
|
79
|
+
});
|
|
160
80
|
}
|
|
161
81
|
async rawSelectAll(sql, args) {
|
|
162
82
|
const client = await this.getClient();
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
catch (error) {
|
|
169
|
-
if (!isSqliteBusyError(error) || attempt >= SQLITE_BUSY_RETRY_ATTEMPTS) {
|
|
170
|
-
throwWrappedRuntimeSqliteError(this.dbPath, sql, error);
|
|
171
|
-
}
|
|
172
|
-
await sleep(Math.min(SQLITE_BUSY_RETRY_DELAY_MS * (attempt + 1), 1_000));
|
|
173
|
-
}
|
|
174
|
-
}
|
|
83
|
+
return executeWithBusyRetry(client, this.dbPath, sql, args, async () => {
|
|
84
|
+
const result = args ? await client.execute(sql, args) : await client.execute(sql);
|
|
85
|
+
return result.rows.map((row) => asRow(row));
|
|
86
|
+
});
|
|
175
87
|
}
|
|
176
88
|
async ensureInitialized() {
|
|
177
89
|
if (this.initialized) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HarnessEvent, RequestDataEvent, RequestEventSnapshot, RequestExecutionStep, RequestPlanState, RequestResult, RuntimeSurfaceItem, UpstreamRuntimeEvent } from "
|
|
1
|
+
import type { HarnessEvent, RequestDataEvent, RequestEventSnapshot, RequestExecutionStep, RequestPlanState, RequestResult, RuntimeSurfaceItem, UpstreamRuntimeEvent } from "../contracts/types.js";
|
|
2
2
|
type StreamEventItem = {
|
|
3
3
|
type: "event";
|
|
4
4
|
event: HarnessEvent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractInterruptPayload, extractReasoningStreamOutput, extractToolResult } from "
|
|
1
|
+
import { extractInterruptPayload, extractReasoningStreamOutput, extractToolResult } from "../runtime/parsing/stream-event-parsing.js";
|
|
2
2
|
function asObject(value) {
|
|
3
3
|
return typeof value === "object" && value !== null ? value : null;
|
|
4
4
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { AgentHarnessRuntime } from "../../runtime/harness.js";
|
|
3
|
+
import type { A2aAgentCard, A2aExtendedAgentCard, A2aHttpServerOptions } from "./http.js";
|
|
4
|
+
export declare const SUPPORTED_A2A_VERSIONS: readonly ["1.0", "0.3"];
|
|
5
|
+
export type A2aServiceParameters = {
|
|
6
|
+
version: string;
|
|
7
|
+
extensions: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare function normalizePath(value: string | undefined, fallback: string): string;
|
|
10
|
+
export declare function writeJson(response: ServerResponse, statusCode: number, payload: unknown): void;
|
|
11
|
+
export declare function writeA2aDiscoveryHeaders(response: ServerResponse): void;
|
|
12
|
+
export declare function writeOptionalAgentCardIntegrityHeaders(response: ServerResponse, options: {
|
|
13
|
+
registryUrls?: string[];
|
|
14
|
+
agentCardSignature?: A2aHttpServerOptions["agentCardSignature"];
|
|
15
|
+
}): void;
|
|
16
|
+
export declare function parseA2aServiceParameters(requestUrl: URL, request: IncomingMessage): A2aServiceParameters | null;
|
|
17
|
+
export declare function acceptsSse(request: IncomingMessage): boolean;
|
|
18
|
+
export declare function buildAgentCard(runtime: AgentHarnessRuntime, options: Required<Pick<A2aHttpServerOptions, "agentName" | "agentDescription">> & {
|
|
19
|
+
rpcUrl: string;
|
|
20
|
+
documentationUrl?: string;
|
|
21
|
+
provider?: {
|
|
22
|
+
organization?: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
};
|
|
25
|
+
defaultAgentId?: string;
|
|
26
|
+
registryUrls?: string[];
|
|
27
|
+
agentCardSignature?: A2aHttpServerOptions["agentCardSignature"];
|
|
28
|
+
}): A2aAgentCard;
|
|
29
|
+
export declare function buildExtendedAgentCard(runtime: AgentHarnessRuntime, options: Required<Pick<A2aHttpServerOptions, "agentName" | "agentDescription">> & {
|
|
30
|
+
rpcUrl: string;
|
|
31
|
+
documentationUrl?: string;
|
|
32
|
+
provider?: {
|
|
33
|
+
organization?: string;
|
|
34
|
+
url?: string;
|
|
35
|
+
};
|
|
36
|
+
defaultAgentId?: string;
|
|
37
|
+
registryUrls?: string[];
|
|
38
|
+
agentCardSignature?: A2aHttpServerOptions["agentCardSignature"];
|
|
39
|
+
}): A2aExtendedAgentCard;
|