@botbotgo/agent-harness 0.0.23 → 0.0.24
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 +2 -0
- package/dist/mcp.js +2 -1
- package/dist/package-version.d.ts +1 -0
- package/dist/package-version.js +1 -0
- package/dist/resource/resource-impl.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -195,6 +195,8 @@ const server = await createToolMcpServer(harness, { agentId: "orchestra" });
|
|
|
195
195
|
await serveToolsOverStdio(harness, { agentId: "orchestra" });
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
+
If you omit `serverInfo`, the harness uses `agent-harness-<agentId>` as the MCP server name and the current package version as the server version.
|
|
199
|
+
|
|
198
200
|
### Read Back Thread State
|
|
199
201
|
|
|
200
202
|
```ts
|
package/dist/mcp.js
CHANGED
|
@@ -2,6 +2,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
+
import { AGENT_HARNESS_VERSION } from "./package-version.js";
|
|
5
6
|
import { loadToolModuleDefinition } from "./tool-modules.js";
|
|
6
7
|
function asResolvedTool(value) {
|
|
7
8
|
return typeof value === "object" && value !== null ? value : null;
|
|
@@ -86,7 +87,7 @@ function jsonSchemaToZod(schema) {
|
|
|
86
87
|
export async function createToolMcpServerFromHarness(harness, options) {
|
|
87
88
|
const server = new McpServer({
|
|
88
89
|
name: options.serverInfo?.name ?? `agent-harness-${options.agentId}`,
|
|
89
|
-
version: options.serverInfo?.version ??
|
|
90
|
+
version: options.serverInfo?.version ?? AGENT_HARNESS_VERSION,
|
|
90
91
|
});
|
|
91
92
|
const allowedNames = options.includeToolNames ? new Set(options.includeToolNames) : null;
|
|
92
93
|
for (const { compiledTool, resolvedTool } of harness.resolveAgentTools(options.agentId)) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.23";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.23";
|
|
@@ -9,6 +9,7 @@ import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
|
9
9
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
10
10
|
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
11
11
|
import { WebSocketClientTransport } from "@modelcontextprotocol/sdk/client/websocket.js";
|
|
12
|
+
import { AGENT_HARNESS_VERSION } from "../package-version.js";
|
|
12
13
|
import { isSupportedToolModulePath, loadToolModuleDefinition } from "../tool-modules.js";
|
|
13
14
|
import { resolveIsolatedResourceModulePath } from "./isolation.js";
|
|
14
15
|
import { ensureExternalResourceSource, ensureExternalSource, isExternalSourceLocator, parseExternalSourceLocator } from "./sources.js";
|
|
@@ -176,7 +177,7 @@ export async function getOrCreateMcpClient(config) {
|
|
|
176
177
|
const loading = (async () => {
|
|
177
178
|
const client = new Client({
|
|
178
179
|
name: "agent-harness",
|
|
179
|
-
version:
|
|
180
|
+
version: AGENT_HARNESS_VERSION,
|
|
180
181
|
});
|
|
181
182
|
const headers = {
|
|
182
183
|
...(config.headers ?? {}),
|