@botbotgo/agent-harness 0.0.200 → 0.0.201
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.zh.md +13 -13
- package/dist/api.d.ts +4 -4
- package/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/runtime/harness.d.ts +4 -4
- package/package.json +2 -2
package/README.zh.md
CHANGED
|
@@ -79,14 +79,14 @@
|
|
|
79
79
|
|
|
80
80
|
## 当前公开能力面
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
如果你想先知道今天能直接用什么,可以先看这一节。`agent-harness` 已经提供完整的运行时能力,而不只是一个启动脚手架。
|
|
83
83
|
|
|
84
84
|
- **核心 runtime API:** `createAgentHarness`、`request`、`subscribe`、`resolveApproval`、各类 inspection helper,以及稳定持久化的 `requests`、`sessions`、`approvals`、`events` 和 artifacts 记录。
|
|
85
85
|
- **运行时 memory 与证据能力:** `memorize`、`recall`、`listMemories`、memory policy hooks、`listArtifacts`、`getArtifact`、`exportEvaluationBundle`、`replayEvaluationBundle`,以及 request / session 级证据导出 helper。
|
|
86
86
|
- **协议与传输接面:** `createAcpServer`、`serveAcpStdio`、`serveAcpHttp`、`serveA2aHttp`、`serveAgUiHttp`、以及 `createRuntimeMcpServer` / `serveRuntimeMcpOverStdio`。
|
|
87
87
|
- **受治理的工作区运行时:** 由 YAML 持有的路由、并发、维护、MCP 策略、runtime governance bundles,以及针对敏感 memory 或写类 MCP 副作用的默认审批门槛。
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
如果你的产品需要对接外部客户端,也可以从这里理解边界:`deepagents-acp` 是主要的外部协议方向,而持久化、恢复、审批和运行控制仍由 `agent-harness` 负责。
|
|
90
90
|
|
|
91
91
|
## 我们解决什么问题
|
|
92
92
|
|
|
@@ -198,7 +198,7 @@ AI 让 agent 逻辑、工具调用和工作流代码更容易生成,真正更
|
|
|
198
198
|
- `docs/long-term-memory.md`
|
|
199
199
|
- `docs/memory-policy-reference.md`
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
仓库里仍然保留了部分设计说明和边界讨论,但日常使用时不需要先读这些内容。
|
|
202
202
|
|
|
203
203
|
当外部工具需要标准运行时边界时,`deepagents-acp` 是必须遵循的外部协议方向。`agent-harness` 应在该边界上严格契合 `deepagents-acp` 语义,同时继续把运行时生命周期、持久化、恢复与治理保留在 harness 内部。
|
|
204
204
|
|
|
@@ -233,13 +233,13 @@ AI 让 agent 逻辑、工具调用和工作流代码更容易生成,真正更
|
|
|
233
233
|
|
|
234
234
|
## 先卖哪三类场景
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
如果你在评估落地场景,可以先从下面三类最直接的用法理解它。
|
|
237
237
|
|
|
238
238
|
- 企业内部 agent 运行时:审批、重启恢复、operator 证据链,以及由策略持有的 MCP 访问控制。
|
|
239
239
|
- 代码现代化运行时:长链路 coding flow、审批检查点、可恢复 runs,以及可导出的运行证据包。
|
|
240
240
|
- 协议桥接运行时:ACP、A2A、AG-UI 与 runtime MCP 共用一套稳定控制面,而不是每个对外接面各写一层胶水。
|
|
241
241
|
|
|
242
|
-
|
|
242
|
+
一套常见的 runtime 治理默认值大致如下:
|
|
243
243
|
|
|
244
244
|
```yaml
|
|
245
245
|
governance:
|
|
@@ -259,7 +259,7 @@ governance:
|
|
|
259
259
|
- 你希望用一个 workspace 形态的装配模型取代每个应用各写一套启动和运行时胶水
|
|
260
260
|
- 你想把 backend 的执行语义留在上游,同时把产品契约稳定下来
|
|
261
261
|
|
|
262
|
-
|
|
262
|
+
下面这些场景通常不需要优先选择它:
|
|
263
263
|
|
|
264
264
|
- 你只需要一次短生命周期的 agent 调用,不需要审批、持久化或运维控制面
|
|
265
265
|
- 你要的是工作流搭建器或低代码自动化画布
|
|
@@ -434,7 +434,7 @@ const result = await request(runtime, {
|
|
|
434
434
|
- `invocation.inputs`:结构化运行时输入
|
|
435
435
|
- `invocation.attachments`:当前后端可解释的类附件负载
|
|
436
436
|
|
|
437
|
-
可选地,runtime memory 还可以在 SQLite
|
|
437
|
+
可选地,runtime memory 还可以在 SQLite 持久化记忆之上叠加 `mem0` 语义召回增强,用于提升长期知识命中能力,同时不改变正式知识记录的接口。
|
|
438
438
|
|
|
439
439
|
### 写入与召回 durable runtime memory
|
|
440
440
|
|
|
@@ -882,7 +882,7 @@ spec:
|
|
|
882
882
|
middleware: []
|
|
883
883
|
```
|
|
884
884
|
|
|
885
|
-
后端相关选项优先直接写在 `spec.config`
|
|
885
|
+
后端相关选项优先直接写在 `spec.config` 中沿用上游概念。日常接入时,以开发者文档与 API 参考为准即可。
|
|
886
886
|
|
|
887
887
|
## 设计说明
|
|
888
888
|
|
|
@@ -948,13 +948,13 @@ Inspection 辅助工具:
|
|
|
948
948
|
ACP transport 说明:
|
|
949
949
|
|
|
950
950
|
- `serveAcpStdio(runtime)` 提供基于 stdio 的 newline-delimited JSON-RPC,适合本地 IDE、CLI 或子进程客户端。
|
|
951
|
-
- `serveAcpHttp(runtime)` 提供基于 HTTP 的 JSON-RPC 与 SSE runtime events
|
|
952
|
-
- `serveA2aHttp(runtime)` 提供 A2A HTTP JSON-RPC bridge 与 agent card discovery,同时兼容 `message/send` 这类旧方法,以及 `SendMessage`、`GetTask`、`ListTasks`、`CancelTask`、`SubscribeToTask` 这类更新的方法别名,并统一映射到现有 session/request
|
|
951
|
+
- `serveAcpHttp(runtime)` 提供基于 HTTP 的 JSON-RPC 与 SSE runtime events,适合远程界面或独立控制面接入。
|
|
952
|
+
- `serveA2aHttp(runtime)` 提供 A2A HTTP JSON-RPC bridge 与 agent card discovery,同时兼容 `message/send` 这类旧方法,以及 `SendMessage`、`GetTask`、`ListTasks`、`CancelTask`、`SubscribeToTask` 这类更新的方法别名,并统一映射到现有 session/request 运行记录。
|
|
953
953
|
- `serveAgUiHttp(runtime)` 提供 AG-UI HTTP SSE bridge,把 runtime 生命周期、文本输出、upstream thinking、step 进度与 tool call 投影成 `RUN_*`、`TEXT_MESSAGE_*`、`THINKING_TEXT_MESSAGE_*`、`STEP_*` 与 `TOOL_CALL_*` 事件,便于 UI 客户端直接接入。
|
|
954
954
|
- `createRuntimeMcpServer(runtime)` 与 `serveRuntimeMcpOverStdio(runtime)` 会把持久化 runtime 控制面本身暴露成 MCP tools,包括 sessions、requests、approvals、artifacts、events 与 package export helpers。
|
|
955
955
|
- `listRequestEvents(...)` 与 `exportRequestPackage(...)` 是 request-first 的检查 helper。
|
|
956
|
-
- `exportRequestPackage(...)` 与 `exportSessionPackage(...)` 可把稳定 runtime 记录、transcript、approvals、events 和 artifacts
|
|
956
|
+
- `exportRequestPackage(...)` 与 `exportSessionPackage(...)` 可把稳定 runtime 记录、transcript、approvals、events 和 artifacts 打包给管理工具,而不必直接访问 persistence 内部实现。
|
|
957
957
|
- `runtime/default.governance.remoteMcp` 现在可以按 MCP server 或 transport 做 allow/deny、审批升级,并把 transport 风险等级写进 runtime governance bundles。MCP server catalog 也可以声明 trust tier、access mode、tenant scope、approval policy、prompt-injection risk 与 OAuth scope 元数据,让治理快照能解释为什么某个远端工具被视为高风险。
|
|
958
|
-
- `runtime/default.observability.tracing` 现在可描述 OTLP endpoint 和 propagation mode 这类 exporter 元数据,使冻结的 runtime snapshot 在保留 trace correlation
|
|
959
|
-
- `agent-harness runtime overview`、`agent-harness runtime health`、`agent-harness runtime approvals list|watch` 与 `agent-harness runtime runs list|tail` 提供了一层轻量
|
|
958
|
+
- `runtime/default.observability.tracing` 现在可描述 OTLP endpoint 和 propagation mode 这类 exporter 元数据,使冻结的 runtime snapshot 在保留 trace correlation 的同时,也能保留有用的导出上下文,而不暴露 backend 私有 span 细节。
|
|
959
|
+
- `agent-harness runtime overview`、`agent-harness runtime health`、`agent-harness runtime approvals list|watch` 与 `agent-harness runtime runs list|tail` 提供了一层轻量 CLI,可直接查看 runtime health、queue pressure、governance risk、审批队列和运行状态。
|
|
960
960
|
- 更详细的 A2A 适配层开发说明见 [`docs/a2a-bridge.md`](docs/a2a-bridge.md)
|
package/dist/api.d.ts
CHANGED
|
@@ -182,7 +182,7 @@ export declare function cancelRun(runtime: AgentHarnessRuntime, options: CancelO
|
|
|
182
182
|
requestId?: string;
|
|
183
183
|
}): Promise<PublicRunResult>;
|
|
184
184
|
export declare function stop(runtime: AgentHarnessRuntime): Promise<void>;
|
|
185
|
-
export declare function createToolMcpServer(runtime: AgentHarnessRuntime, options: ToolMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp
|
|
186
|
-
export declare function serveToolsOverStdio(runtime: AgentHarnessRuntime, options: ToolMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp
|
|
187
|
-
export declare function createRuntimeMcpServer(runtime: AgentHarnessRuntime, options?: RuntimeMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp
|
|
188
|
-
export declare function serveRuntimeMcpOverStdio(runtime: AgentHarnessRuntime, options?: RuntimeMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp
|
|
185
|
+
export declare function createToolMcpServer(runtime: AgentHarnessRuntime, options: ToolMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp").McpServer>;
|
|
186
|
+
export declare function serveToolsOverStdio(runtime: AgentHarnessRuntime, options: ToolMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp").McpServer>;
|
|
187
|
+
export declare function createRuntimeMcpServer(runtime: AgentHarnessRuntime, options?: RuntimeMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp").McpServer>;
|
|
188
|
+
export declare function serveRuntimeMcpOverStdio(runtime: AgentHarnessRuntime, options?: RuntimeMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp").McpServer>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.200";
|
package/dist/package-version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.200";
|
|
@@ -115,10 +115,10 @@ export declare class AgentHarnessRuntime {
|
|
|
115
115
|
deleteSession(sessionId: string): Promise<boolean>;
|
|
116
116
|
deleteThread(threadId: string): Promise<boolean>;
|
|
117
117
|
deleteThreadLegacy(threadId: string): Promise<boolean>;
|
|
118
|
-
createToolMcpServer(options: ToolMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp
|
|
119
|
-
serveToolsOverStdio(options: ToolMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp
|
|
120
|
-
createRuntimeMcpServer(options?: RuntimeMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp
|
|
121
|
-
serveRuntimeMcpOverStdio(options?: RuntimeMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp
|
|
118
|
+
createToolMcpServer(options: ToolMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp").McpServer>;
|
|
119
|
+
serveToolsOverStdio(options: ToolMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp").McpServer>;
|
|
120
|
+
createRuntimeMcpServer(options?: RuntimeMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp").McpServer>;
|
|
121
|
+
serveRuntimeMcpOverStdio(options?: RuntimeMcpServerOptions): Promise<import("@modelcontextprotocol/sdk/server/mcp").McpServer>;
|
|
122
122
|
routeAgent(input: MessageContent, options?: {
|
|
123
123
|
threadId?: string;
|
|
124
124
|
}): Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botbotgo/agent-harness",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.201",
|
|
4
4
|
"description": "Workspace runtime for multi-agent applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"release:publish": "npm publish --access public --registry https://registry.npmjs.org/"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@types/node": "^
|
|
78
|
+
"@types/node": "^25.5.2",
|
|
79
79
|
"typescript": "^5.9.3",
|
|
80
80
|
"vite": "^7.3.2",
|
|
81
81
|
"vitest": "^3.2.4"
|