@hirey/hi-mcp-server 0.1.14 → 0.1.15

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,CAkDrC;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"}
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 hasConcreteReplyTarget = !!(explicit.to
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
- const openClawSupportedDisplayChannel = explicit.channel === 'last' || explicit.channel === 'imessage';
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
- && !openClawSupportedDisplayChannel) {
44
+ && !openClawSupportedReplyChannel) {
28
45
  return {
29
46
  channel: 'last',
30
47
  to: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hirey/hi-mcp-server",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/server.js",