@hirey/hi-mcp-server 0.1.1 → 0.1.3
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 +20 -13
- package/dist/server.d.ts +1 -0
- package/dist/server.js +622 -17
- package/dist/state.d.ts +12 -0
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +46 -1
- package/node_modules/@hirey/hi-agent-contracts/README.md +21 -0
- package/node_modules/@hirey/hi-agent-contracts/dist/index.d.ts +535 -0
- package/node_modules/@hirey/hi-agent-contracts/dist/index.d.ts.map +1 -0
- package/node_modules/@hirey/hi-agent-contracts/dist/index.js +741 -0
- package/node_modules/@hirey/hi-agent-contracts/package.json +29 -0
- package/node_modules/@hirey/hi-agent-sdk/README.md +21 -0
- package/node_modules/@hirey/hi-agent-sdk/dist/client.d.ts +422 -0
- package/node_modules/@hirey/hi-agent-sdk/dist/client.d.ts.map +1 -0
- package/node_modules/@hirey/hi-agent-sdk/dist/client.js +190 -0
- package/node_modules/@hirey/hi-agent-sdk/dist/index.d.ts +3 -0
- package/node_modules/@hirey/hi-agent-sdk/dist/index.d.ts.map +1 -0
- package/node_modules/@hirey/hi-agent-sdk/dist/index.js +2 -0
- package/node_modules/@hirey/hi-agent-sdk/dist/sse.d.ts +18 -0
- package/node_modules/@hirey/hi-agent-sdk/dist/sse.d.ts.map +1 -0
- package/node_modules/@hirey/hi-agent-sdk/dist/sse.js +67 -0
- package/node_modules/@hirey/hi-agent-sdk/package.json +33 -0
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
这些工具都以 `hi_agent_*` 命名,保持和 gateway 控制面同一语义边界:
|
|
28
28
|
|
|
29
29
|
- `hi_agent_status`
|
|
30
|
+
- `hi_agent_install`
|
|
31
|
+
- `hi_agent_doctor`
|
|
32
|
+
- `hi_agent_reset`
|
|
30
33
|
- `hi_agent_register`
|
|
31
34
|
- `hi_agent_connect`
|
|
32
35
|
- `hi_agent_activate`
|
|
@@ -51,8 +54,7 @@
|
|
|
51
54
|
- `agent_listings`
|
|
52
55
|
- `matching_sessions`
|
|
53
56
|
- `pairings`
|
|
54
|
-
- `
|
|
55
|
-
- `meeting_confirmation`
|
|
57
|
+
- `thread_meetings`
|
|
56
58
|
|
|
57
59
|
这样做的目的是让 Claude Code、OpenClaw 和其他 `MCP-first` 宿主看到的工具名、参数 schema、调用语义都跟 `Hi` 平台目录保持一致,不产生第二套 API。
|
|
58
60
|
|
|
@@ -60,13 +62,15 @@
|
|
|
60
62
|
|
|
61
63
|
普通用户的正式安装路径不应该依赖 `AWS`、`CodeArtifact`、私有 registry,或者一套专门给内部同事写的 Docker/Helm 操作。
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
这里的 `Hi` 指 `Hirey Hi Agent Platform`,不是 `Hi.Events`。
|
|
66
|
+
|
|
67
|
+
普通本地宿主的推荐方式是把 `@hirey/hi-mcp-server` 挂成 **本地 stdio MCP server**,而不是先自己部署一个公网 `/mcp` 服务。
|
|
64
68
|
|
|
65
69
|
```bash
|
|
66
|
-
npm install -g @hirey/hi-mcp-server
|
|
70
|
+
npm install -g @hirey/hi-mcp-server
|
|
67
71
|
```
|
|
68
72
|
|
|
69
|
-
|
|
73
|
+
如果你是在自动化脚本、镜像、或可复现安装链里使用它,应该固定具体版本,不要依赖隐式最新版本。
|
|
70
74
|
|
|
71
75
|
对 OpenClaw,推荐的 MCP 配置形态是:
|
|
72
76
|
|
|
@@ -77,7 +81,7 @@ npm install -g @hirey/hi-mcp-server@0.1.1
|
|
|
77
81
|
"HI_PLATFORM_BASE_URL": "https://your-hi-platform.example.com",
|
|
78
82
|
"HI_MCP_TRANSPORT": "stdio",
|
|
79
83
|
"HI_MCP_PROFILE": "openclaw-main",
|
|
80
|
-
"HI_MCP_STATE_DIR": "/Users/you/.openclaw/hi"
|
|
84
|
+
"HI_MCP_STATE_DIR": "/Users/you/.openclaw/hi-mcp/openclaw-main"
|
|
81
85
|
}
|
|
82
86
|
}
|
|
83
87
|
```
|
|
@@ -85,9 +89,11 @@ npm install -g @hirey/hi-mcp-server@0.1.1
|
|
|
85
89
|
普通用户首次接入后的典型顺序:
|
|
86
90
|
|
|
87
91
|
1. 用宿主把 `hi-mcp-server` 作为 `stdio` MCP server 挂上
|
|
88
|
-
2.
|
|
89
|
-
3.
|
|
90
|
-
4.
|
|
92
|
+
2. 优先执行 `hi_agent_install`,而不是让用户手工走 `register -> connect -> activate`
|
|
93
|
+
3. `hi_agent_install` 会自动完成 register / activate、delivery capability 声明、默认订阅,以及在 OpenClaw 场景下的 receiver 配置
|
|
94
|
+
4. `agent_id` 可以省略;省略时由 gateway 正式生成 canonical `ag_...`,不需要用户手写
|
|
95
|
+
5. 完成后执行 `hi_agent_doctor`
|
|
96
|
+
6. 如果要 clean reinstall,先执行 `hi_agent_reset`
|
|
91
97
|
|
|
92
98
|
这条路径的目标是:**普通 OpenClaw 用户只需要 `npm + OpenClaw TUI`,不需要 AWS。**
|
|
93
99
|
|
|
@@ -107,8 +113,8 @@ npm install -g @hirey/hi-mcp-server@0.1.1
|
|
|
107
113
|
- `HI_MCP_PROFILE`
|
|
108
114
|
- 本地 state profile,默认 `default`。
|
|
109
115
|
- `HI_MCP_STATE_DIR`
|
|
110
|
-
- 本地 state
|
|
111
|
-
- OpenClaw
|
|
116
|
+
- 本地 state 目录。未显式指定时,默认落到稳定 home 目录:`~/.hirey/hi-mcp/<profile>`。
|
|
117
|
+
- OpenClaw 普通用户建议显式固定到 canonical 目录,例如 `/Users/you/.openclaw/hi-mcp/openclaw-main`,方便后续 `hi-agent-receiver` 直接复用同一份身份 state。
|
|
112
118
|
|
|
113
119
|
### 本地 state
|
|
114
120
|
|
|
@@ -120,6 +126,7 @@ state 会按 profile 落到 `HI_MCP_STATE_DIR/<profile>.json`。
|
|
|
120
126
|
- 长期凭证与安装身份:`agent_id / installation_id / client_id / client_secret / token_url`
|
|
121
127
|
- `runtime`
|
|
122
128
|
- 事件消费状态:`last_consumed_stream_seq / last_claim_lease_id`
|
|
129
|
+
- 本地安装运行态:`install.host_kind / receiver_config_path / receiver_pid / receiver_last_started_at / receiver_last_error`
|
|
123
130
|
|
|
124
131
|
短期 `access_token` 不会被持久化。
|
|
125
132
|
|
|
@@ -278,8 +285,8 @@ shared `hi-infra` 负责 `Hi` 自己的公共平台面;`hi-mcp-server` 则持
|
|
|
278
285
|
|
|
279
286
|
## 验证建议
|
|
280
287
|
|
|
281
|
-
|
|
288
|
+
至少验证三条线:
|
|
282
289
|
|
|
283
|
-
- Claude Code / generic MCP host 能通过 `
|
|
290
|
+
- Claude Code / generic MCP host 能通过 `hi_agent_install -> hi_agent_doctor` 后调用 `agent_listings / matching_sessions / pairings / thread_meetings`
|
|
284
291
|
- OpenClaw 公网 ingress 能接 `openclaw.hooks.agent.v1`
|
|
285
292
|
- OpenClaw 无公网 ingress 能通过 `hi-agent-receiver` 收到并 ack `Hi` durable events
|
package/dist/server.d.ts
CHANGED