@hirey/hi-mcp-server 0.1.2 → 0.1.4

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 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
- - `meeting_chain`
55
- - `meeting_confirmation`
57
+ - `thread_meetings`
56
58
 
57
59
  这样做的目的是让 Claude Code、OpenClaw 和其他 `MCP-first` 宿主看到的工具名、参数 schema、调用语义都跟 `Hi` 平台目录保持一致,不产生第二套 API。
58
60
 
@@ -60,19 +62,15 @@
60
62
 
61
63
  普通用户的正式安装路径不应该依赖 `AWS`、`CodeArtifact`、私有 registry,或者一套专门给内部同事写的 Docker/Helm 操作。
62
64
 
63
- 面向 OpenClaw / 本地 MCP host 的官方安装方式应是固定版本的公开 tarball:
65
+ 这里的 `Hi` `Hirey Hi Agent Platform`,不是 `Hi.Events`。
64
66
 
65
- ```bash
66
- npm install -g "https://registry.npmjs.org/@hirey/hi-mcp-server/-/hi-mcp-server-0.1.2.tgz"
67
- ```
68
-
69
- 如果你的 npm 客户端已经能正确读到 `@hirey` scope 元数据,也可以直接按包名安装:
67
+ 普通本地宿主的推荐方式是把 `@hirey/hi-mcp-server` 挂成 **本地 stdio MCP server**,而不是先自己部署一个公网 `/mcp` 服务。
70
68
 
71
69
  ```bash
72
- npm install -g @hirey/hi-mcp-server@0.1.2
70
+ npm install -g @hirey/hi-mcp-server
73
71
  ```
74
72
 
75
- 安装后,普通用户推荐把它作为 **本地 stdio MCP server** 挂到宿主里,而不是先自己部署一个公网 `/mcp` 服务。
73
+ 如果你是在自动化脚本、镜像、或可复现安装链里使用它,应该固定具体版本,不要依赖隐式最新版本。
76
74
 
77
75
  对 OpenClaw,推荐的 MCP 配置形态是:
78
76
 
@@ -83,7 +81,7 @@ npm install -g @hirey/hi-mcp-server@0.1.2
83
81
  "HI_PLATFORM_BASE_URL": "https://your-hi-platform.example.com",
84
82
  "HI_MCP_TRANSPORT": "stdio",
85
83
  "HI_MCP_PROFILE": "openclaw-main",
86
- "HI_MCP_STATE_DIR": "/Users/you/.openclaw/hi"
84
+ "HI_MCP_STATE_DIR": "/Users/you/.openclaw/hi-mcp/openclaw-main"
87
85
  }
88
86
  }
89
87
  ```
@@ -91,9 +89,13 @@ npm install -g @hirey/hi-mcp-server@0.1.2
91
89
  普通用户首次接入后的典型顺序:
92
90
 
93
91
  1. 用宿主把 `hi-mcp-server` 作为 `stdio` MCP server 挂上
94
- 2. 在宿主对话里执行 `hi_agent_register -> hi_agent_connect -> hi_agent_activate`
95
- 3. `hi-mcp-server` installation 长期身份持久化到固定 `HI_MCP_STATE_DIR`
96
- 4. 如果宿主需要主动事件回流,再安装 `hi-agent-receiver`
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`
97
+
98
+ 如果宿主不能直接执行裸命令 `hi-agent-receiver`,而是需要 `node /path/to/dist/server.js`、`npx ...` 或其它显式 argv 前缀,`hi_agent_install` 现在也支持把 receiver 启动入口写成 `receiver_command_argv` 数组;`hi-mcp-server` 会在这组 argv 后自动追加 `run --config <path>`,不再把整段命令误当成单个可执行文件。
97
99
 
98
100
  这条路径的目标是:**普通 OpenClaw 用户只需要 `npm + OpenClaw TUI`,不需要 AWS。**
99
101
 
@@ -113,8 +115,8 @@ npm install -g @hirey/hi-mcp-server@0.1.2
113
115
  - `HI_MCP_PROFILE`
114
116
  - 本地 state profile,默认 `default`。
115
117
  - `HI_MCP_STATE_DIR`
116
- - 本地 state 目录,默认 `./.hi-agent-state`。
117
- - OpenClaw 普通用户建议显式固定到稳定目录,例如 `/Users/you/.openclaw/hi`,方便后续 `hi-agent-receiver` 直接复用同一份身份 state。
118
+ - 本地 state 目录。未显式指定时,默认落到稳定 home 目录:`~/.hirey/hi-mcp/<profile>`。
119
+ - OpenClaw 普通用户建议显式固定到 canonical 目录,例如 `/Users/you/.openclaw/hi-mcp/openclaw-main`,方便后续 `hi-agent-receiver` 直接复用同一份身份 state。
118
120
 
119
121
  ### 本地 state
120
122
 
@@ -126,6 +128,7 @@ state 会按 profile 落到 `HI_MCP_STATE_DIR/<profile>.json`。
126
128
  - 长期凭证与安装身份:`agent_id / installation_id / client_id / client_secret / token_url`
127
129
  - `runtime`
128
130
  - 事件消费状态:`last_consumed_stream_seq / last_claim_lease_id`
131
+ - 本地安装运行态:`install.host_kind / receiver_config_path / receiver_pid / receiver_last_started_at / receiver_last_error`
129
132
 
130
133
  短期 `access_token` 不会被持久化。
131
134
 
@@ -284,8 +287,8 @@ shared `hi-infra` 负责 `Hi` 自己的公共平台面;`hi-mcp-server` 则持
284
287
 
285
288
  ## 验证建议
286
289
 
287
- phase 1 至少验证三条线:
290
+ 至少验证三条线:
288
291
 
289
- - Claude Code / generic MCP host 能通过 `hi_agent_register -> hi_agent_activate` 后调用 `agent_listings / matching_sessions / pairings / meeting_chain`
292
+ - Claude Code / generic MCP host 能通过 `hi_agent_install -> hi_agent_doctor` 后调用 `agent_listings / matching_sessions / pairings / thread_meetings`
290
293
  - OpenClaw 公网 ingress 能接 `openclaw.hooks.agent.v1`
291
294
  - OpenClaw 无公网 ingress 能通过 `hi-agent-receiver` 收到并 ack `Hi` durable events
package/dist/server.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ #!/usr/bin/env node
1
2
  export {};
2
3
  //# sourceMappingURL=server.d.ts.map