@hirey/hi-mcp-server 0.1.14 → 0.1.16
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultReplyRoute.d.ts","sourceRoot":"","sources":["../src/defaultReplyRoute.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,wBAAgB,yCAAyC,CAAC,IAAI,EAAE;IAC9D,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,GAAG,2BAA2B,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"defaultReplyRoute.d.ts","sourceRoot":"","sources":["../src/defaultReplyRoute.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,wBAAgB,yCAAyC,CAAC,IAAI,EAAE;IAC9D,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,GAAG,2BAA2B,GAAG,IAAI,CAqErC;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE;IACrD,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACpD,GAAG;IACF,EAAE,EAAE,IAAI,CAAC;IACT,kBAAkB,EAAE,MAAM,CAAC;CAC5B,GAAG;IACF,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,sCAAsC,CAAC;CAC/C,CAcA"}
|
|
@@ -13,10 +13,27 @@ export function resolveInstallDefaultReplyDeliveryContext(args) {
|
|
|
13
13
|
|| explicit.account_id
|
|
14
14
|
|| explicit.thread_id);
|
|
15
15
|
if (hasExplicit) {
|
|
16
|
-
const
|
|
16
|
+
const openClawSupportedReplyChannel = explicit.channel === 'last' || explicit.channel === 'imessage';
|
|
17
|
+
// OpenClaw may expose the current TUI chat as `webchat` with `to=heartbeat`.
|
|
18
|
+
// `heartbeat` is host bookkeeping noise, not a durable reply target, so this
|
|
19
|
+
// shape still needs to collapse to the canonical `last` continuation lane.
|
|
20
|
+
const openClawDisplayOnlyTarget = (args.hostKind === 'openclaw'
|
|
21
|
+
&& args.hasSessionKey
|
|
22
|
+
&& explicit.to === 'heartbeat'
|
|
23
|
+
&& !explicit.account_id
|
|
24
|
+
&& !explicit.thread_id
|
|
25
|
+
&& !openClawSupportedReplyChannel);
|
|
26
|
+
const hasConcreteReplyTarget = !!((explicit.to && !openClawDisplayOnlyTarget)
|
|
17
27
|
|| explicit.account_id
|
|
18
28
|
|| explicit.thread_id);
|
|
19
|
-
|
|
29
|
+
if (openClawDisplayOnlyTarget) {
|
|
30
|
+
return {
|
|
31
|
+
channel: 'last',
|
|
32
|
+
to: null,
|
|
33
|
+
account_id: null,
|
|
34
|
+
thread_id: null,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
20
37
|
// OpenClaw may surface the current chat as a display-only channel like `webchat`
|
|
21
38
|
// without any concrete target fields. In that case the durable continuation lane
|
|
22
39
|
// is still `last`, not the display channel value.
|
|
@@ -24,7 +41,7 @@ export function resolveInstallDefaultReplyDeliveryContext(args) {
|
|
|
24
41
|
&& args.hasSessionKey
|
|
25
42
|
&& explicit.channel
|
|
26
43
|
&& !hasConcreteReplyTarget
|
|
27
|
-
&& !
|
|
44
|
+
&& !openClawSupportedReplyChannel) {
|
|
28
45
|
return {
|
|
29
46
|
channel: 'last',
|
|
30
47
|
to: null,
|
package/dist/server.js
CHANGED
|
@@ -77,7 +77,7 @@ function normalizeCommandArgv(input) {
|
|
|
77
77
|
.filter(Boolean);
|
|
78
78
|
}
|
|
79
79
|
function controlTools() {
|
|
80
|
-
// control tools 只映射
|
|
80
|
+
// control tools 只映射 install/runtime 控制面;Hi 的正式业务面仍是 listing、matching、collaboration、meeting。
|
|
81
81
|
return [
|
|
82
82
|
{
|
|
83
83
|
name: 'hi_agent_status',
|
|
@@ -699,7 +699,7 @@ function buildReceiverConfig(args) {
|
|
|
699
699
|
},
|
|
700
700
|
// OpenClaw 本地消息的展示前缀需要稳定,避免安装后又冒出第二套文案。
|
|
701
701
|
config: {
|
|
702
|
-
name:
|
|
702
|
+
name: 'Hirey Hi',
|
|
703
703
|
agent_id: 'main',
|
|
704
704
|
message_prefix: '[Hi Event]',
|
|
705
705
|
session_key: normalizeText(defaultReplyRoute?.session_key) || null,
|
|
@@ -1732,7 +1732,7 @@ function createMcpServer() {
|
|
|
1732
1732
|
capabilities: {
|
|
1733
1733
|
tools: {},
|
|
1734
1734
|
},
|
|
1735
|
-
instructions: 'Hi MCP adapter: control-plane tools
|
|
1735
|
+
instructions: 'Hi MCP adapter: control-plane tools cover install/runtime state, while business tools mirror Hi public capabilities for listings, matching, collaboration, and meetings.',
|
|
1736
1736
|
});
|
|
1737
1737
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
1738
1738
|
return {
|