@duke-dsh-plugins/dsh-remote-control 1.1.7 → 1.1.9

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/client.js CHANGED
@@ -9,6 +9,10 @@
9
9
  * - the actions: save the relay address, rotate the pairing key and
10
10
  * hide / show the pairing.
11
11
  *
12
+ * The nav glyph of that section comes from the `settings.section.icon` slot
13
+ * (DSH 0.2.2-rc.1+): we register our whale under the same id as the section,
14
+ * so the shell draws it instead of the generic gear.
15
+ *
12
16
  * The phone pairing flow is unchanged: the QR still encodes the same
13
17
  * `dshrc://pair?…` URI as before (contract §3.5) — only the entry point moved
14
18
  * from the `/remote-pairing` command into this settings page (v1.1.x).
@@ -80,52 +84,45 @@ const CLIENT_ICON_MASK_URI =
80
84
  .rc-spinner{width:16px;height:16px;border-radius:50%;border:2px solid var(--dsw-alias-border-l1);border-top-color:var(--dsw-alias-brand-primary);animation:rc-spin .8s linear infinite;flex:none}
81
85
  @keyframes rc-spin{to{transform:rotate(360deg)}}
82
86
 
83
- /* Settings nav icon: DSH 0.1.x settings.section only projects id/order/label,
84
- and the settings shell paints a generic gear for every external section
85
- (client-ui-settings-general's navIcon()). registerSettingsNavIcon marks our
86
- own nav row; hide the shell's gear and draw this package's whale glyph as a
87
- currentColor mask so it follows the native nav hover/active colors.
88
- 20px (2026-10-24 user feedback): the mask viewBox is cropped tight to the
89
- whale+wave, so at 16px the glyph itself rendered only ~9px — too small next
90
- to the section labels; 20px restores legibility. */
91
- [data-dsh-remote-control-settings-nav]>svg:first-child{display:none}
92
- [data-dsh-remote-control-settings-nav]::before{content:'';flex:none;width:20px;height:20px;background:currentColor;-webkit-mask:url("__ICON_MASK__") center/contain no-repeat;mask:url("__ICON_MASK__") center/contain no-repeat}
87
+ /* Settings nav icon (DSH 0.2.2-rc.1+): the shell wraps every nav row's glyph in
88
+ <span.navIcon> and takes the glyph from the "settings.section.icon" slot, so we
89
+ contribute our whale there (see NavIcon) instead of patching the shell's DOM.
90
+ This rule only draws the mask — the shell owns the box, the button and the
91
+ label. The mask viewBox is cropped tight to the whale+wave, so the ink covers
92
+ ~84% of the box and lands on the same optical size as the shell's own 16px
93
+ glyphs (the old hack hardcoded a 20px box and read as too wide next to the
94
+ other sections). */
95
+ .rc-nav-icon{display:block;flex:none;background:currentColor;-webkit-mask:url("__ICON_MASK__") center/contain no-repeat;mask:url("__ICON_MASK__") center/contain no-repeat}
93
96
  `;
94
97
 
95
- // ---- Settings nav icon --------------------------------------------------
96
- // DSH 0.1.x does not yet carry an icon through the settings.section
97
- // registration contract: its shell projects only id/order/label and paints
98
- // a generic gear for every external section. Mark only this plugin's
99
- // localized nav row so the CSS above can replace the fallback gear; the
100
- // disposer clears the marker for HMR / plugin disable.
98
+ // ---- Settings section identity + nav icon --------------------------------
99
+ // DSH 0.2.2-rc.1 gave the settings shell a `settings.section.icon` slot:
100
+ // register an icon component under the **same id** as the section and the
101
+ // shell draws it instead of the generic gear (the component receives
102
+ // { size in pixels, active }; the shell owns button, label and the
103
+ // decorative wrapper). Before 0.2.2 that slot did not exist, so this
104
+ // package patched the shell's DOM instead (mark our nav row, hide the gear
105
+ // with `button > svg:first-child`, paint the whale with ::before). 0.2.2
106
+ // wrapped the glyph in <span.navIcon>, so that selector stopped matching:
107
+ // the gear was no longer hidden and BOTH the gear and the whale showed up
108
+ // (2026-11-04). The DOM hack is gone now — we use the native slot, and on
109
+ // pre-0.2.2 hosts the row simply falls back to the default gear.
101
110
  const SETTINGS_LABEL = "DSH Pocket";
102
- const SETTINGS_NAV_MARKER = "data-dsh-remote-control-settings-nav";
111
+ const SETTINGS_SECTION_ID = "remote-control";
103
112
 
104
- function registerSettingsNavIcon(label) {
105
- let disposed = false;
106
- const sync = function () {
107
- if (disposed) return;
108
- const currentLabel = String(label).trim();
109
- const buttons = document.querySelectorAll('[role="dialog"] nav button');
110
- for (let i = 0; i < buttons.length; i++) {
111
- const button = buttons[i];
112
- const text = button.textContent ? button.textContent.trim() : "";
113
- if (currentLabel.length > 0 && text === currentLabel) {
114
- button.setAttribute(SETTINGS_NAV_MARKER, "");
115
- } else {
116
- button.removeAttribute(SETTINGS_NAV_MARKER);
117
- }
118
- }
119
- };
120
- sync();
121
- const observer = new MutationObserver(sync);
122
- observer.observe(document.body, { childList: true, subtree: true, characterData: true });
123
- return function () {
124
- disposed = true;
125
- observer.disconnect();
126
- const marked = document.querySelectorAll("[" + SETTINGS_NAV_MARKER + "]");
127
- for (let i = 0; i < marked.length; i++) marked[i].removeAttribute(SETTINGS_NAV_MARKER);
128
- };
113
+ // Nav glyph for our settings section: this package's whale, drawn as a
114
+ // currentColor mask (see the .rc-nav-icon rule above) so it follows the
115
+ // shell's nav colors. `size` comes from the shell (16px, the same size it
116
+ // asks of its own glyphs) — honour it instead of hardcoding a width, so the
117
+ // row stays aligned with the other sections.
118
+ function NavIcon(props) {
119
+ const requested = props ? Number(props.size) : NaN;
120
+ const size = Number.isFinite(requested) && requested > 0 ? requested : 16;
121
+ return React.createElement("span", {
122
+ className: "rc-nav-icon",
123
+ style: { width: size + "px", height: size + "px" },
124
+ "aria-hidden": "true",
125
+ });
129
126
  }
130
127
 
131
128
  // ---- Client Remote contribution ----------------------------------------
@@ -348,13 +345,9 @@ const CLIENT_ICON_MASK_URI =
348
345
  /* cosmetic only */
349
346
  }
350
347
 
351
- // Mark our settings-nav row so the CSS above replaces the shell's
352
- // fallback gear (no icon field exists in settings.section yet).
353
- try {
354
- ctx.effect(() => registerSettingsNavIcon(SETTINGS_LABEL));
355
- } catch (e) {
356
- /* cosmetic only */
357
- }
348
+ // The nav glyph is contributed through the `settings.section.icon` slot
349
+ // (registered next to the section itself, further down) — no DOM
350
+ // patching of the shell's nav rows any more.
358
351
 
359
352
  function PairingPage() {
360
353
  const [state, setState] = React.useState({ loading: true, value: null, error: "", hint: "", hintKind: "" });
@@ -726,7 +719,7 @@ const CLIENT_ICON_MASK_URI =
726
719
  try {
727
720
  ctx.slots.inject("settings.section", () =>
728
721
  ctx.slots.register(
729
- { name: "settings.section", id: "remote-control", order: 40, label: () => SETTINGS_LABEL },
722
+ { name: "settings.section", id: SETTINGS_SECTION_ID, order: 40, label: () => SETTINGS_LABEL },
730
723
  PairingPage,
731
724
  ),
732
725
  );
@@ -737,6 +730,24 @@ const CLIENT_ICON_MASK_URI =
737
730
  e,
738
731
  );
739
732
  }
733
+
734
+ // Nav glyph for our section (DSH 0.2.2-rc.1+). The registration id must
735
+ // equal the section id — the shell renders the matching contribution and
736
+ // keeps its default gear for every id without one.
737
+ try {
738
+ ctx.slots.inject("settings.section.icon", () =>
739
+ ctx.slots.register(
740
+ { name: "settings.section.icon", id: SETTINGS_SECTION_ID, order: 40 },
741
+ NavIcon,
742
+ ),
743
+ );
744
+ } catch (e) {
745
+ // eslint-disable-next-line no-console
746
+ (typeof console !== "undefined" && console.warn ? console.warn : () => {})(
747
+ "[dsh-remote-control] settings.section.icon registration failed:",
748
+ e,
749
+ );
750
+ }
740
751
  }
741
752
 
742
753
  exports.apply = apply;
@@ -788,6 +788,32 @@ export function mapModelSelection(data) {
788
788
  return parseModelSelection(data);
789
789
  }
790
790
 
791
+ /**
792
+ * 契约 §5.1:会话历史读取地址(宿主 0.2.2+ 的 durable address)。
793
+ *
794
+ * 宿主对**普通会话**与**子代理会话**用两种地址:
795
+ * - 普通会话:{kind:'session', sessionId}
796
+ * - 子代理:{kind:'subagent', parentSessionId, childSessionId, mode:'unknown'}
797
+ * (子代理会话用 kind:'session' 会被宿主拒为 session/agent-busy)
798
+ *
799
+ * mode 固定 'unknown':宿主在 mode==='unknown' 时跳过 mode 比对,
800
+ * 免得我们还得额外读一次子代理目录去确认 one-shot/continuable。
801
+ * @param {string} sessionId
802
+ * @param {string} [parentSessionId] 子代理的父会话 id(普通会话留空)
803
+ * @returns {{kind:string,sessionId?:string,parentSessionId?:string,childSessionId?:string,mode?:string}}
804
+ */
805
+ export function historyAddress(sessionId, parentSessionId = "") {
806
+ if (parentSessionId !== "") {
807
+ return {
808
+ kind: "subagent",
809
+ parentSessionId,
810
+ childSessionId: sessionId,
811
+ mode: "unknown",
812
+ };
813
+ }
814
+ return { kind: "session", sessionId };
815
+ }
816
+
791
817
  /**
792
818
  * 契约 §5.9 归档:宿主错误的「原样」回传。
793
819
  * 优先用宿主的错误码(RemoteError.code,如 "workspace/active-session"),
@@ -1973,9 +1999,14 @@ export class HostBridge {
1973
1999
  }
1974
2000
 
1975
2001
  /** 契约 §5.1 session.history:向后翻页的历史消息页(v1.0.4)。
1976
- * throughSeq(宿主实证)必须是日志中真实存在的末尾 seq——直接传
1977
- * MAX_SAFE_INTEGER 会被宿主 bad-request 拒绝(past cursor),-1 只用于空日志;
1978
- * 故先 inspect 冷读拿日志尾 seq 作为切点,再 page 取消息对齐的一页。
2002
+ *
2003
+ * 宿主 API 分代(DSH 0.2.2-rc.1 起换了历史入口):
2004
+ * - 新宿主:sessionController.events({address, throughSeq?, beforeSeq?, maxMessages?})。
2005
+ * **省略 throughSeq 即取当前日志末尾**(宿主自己算 observation.cursor),
2006
+ * 所以不再需要先 inspect() 拿尾 seq——旧宿主那套 inspect()+page() 在新宿主上
2007
+ * 会直接抛 "sc.inspect is not a function",手机端表现为「历史消息加载不了」。
2008
+ * - 旧宿主:只有 inspect()(拿日志尾 seq + subagent 身份)与 page(),保留原路径。
2009
+ *
1979
2010
  * 向前翻页:客户端回传上一页的 oldestSeq 作 beforeSeq(开区间)。 */
1980
2011
  async #rSessionHistory(m) {
1981
2012
  const p = m.payload ?? {};
@@ -1994,34 +2025,7 @@ export class HostBridge {
1994
2025
  const sc = this.#sc();
1995
2026
  // v1.1.1(§5.10.2):交付物图片作为**独立**的历史消息(两条回包路径都要带上)
1996
2027
  const delivered = await this.#deliveredHistoryMessages(sessionId);
1997
- let cursor = -1;
1998
- let address = { kind: "session", sessionId };
1999
- try {
2000
- const inspected = await sc.inspect(sessionId, signal);
2001
- const events = inspected?.events;
2002
- if (Array.isArray(events) && events.length > 0) {
2003
- const lastSeq = Number(events[events.length - 1]?.seq);
2004
- if (Number.isSafeInteger(lastSeq) && lastSeq >= 0) cursor = lastSeq;
2005
- }
2006
- // subagent 会话必须走 durable subagent 地址(宿主校验:kind:'session' 会被拒)
2007
- const header = inspected?.meta;
2008
- const parent = typeof header?.parentSession === "string" ? header.parentSession : "";
2009
- if (header?.origin === "subagent" && parent !== "") {
2010
- address = { kind: "subagent", parentSessionId: parent, childSessionId: sessionId, mode: "unknown" };
2011
- }
2012
- } catch (e) {
2013
- // inspect 失败(会话不存在等)→ 直接把错误回给手机端
2014
- throw e;
2015
- }
2016
- if (cursor < 0) {
2017
- // 空会话(无任何事件):直接回空页,不折腾 page
2018
- // (交付物图片仍要带上——它们不在宿主的会话日志里)
2019
- this.#reply(m, resultOf(m, { messages: delivered, steps: [], hasMore: false, oldestSeq: 0 }));
2020
- return;
2021
- }
2022
- const request = { address, throughSeq: cursor, maxMessages };
2023
- if (beforeSeq !== undefined) request.beforeSeq = beforeSeq;
2024
- const page = await sc.page(request, signal);
2028
+ const page = await this.#readHistoryPage(sc, sessionId, maxMessages, beforeSeq, signal);
2025
2029
  const messages = [];
2026
2030
  let oldestSeq = Number.MAX_SAFE_INTEGER;
2027
2031
  let oldestEventSeq = Number.MAX_SAFE_INTEGER;
@@ -2079,6 +2083,137 @@ export class HostBridge {
2079
2083
  }
2080
2084
  }
2081
2085
 
2086
+ /**
2087
+ * 读一页会话历史(宿主 API 分代适配层)。
2088
+ *
2089
+ * 新宿主(DSH 0.2.2-rc.1+):走 events()。
2090
+ * - **不传 throughSeq**:宿主会自己取当前日志末尾作为切点
2091
+ * (resolveHistoryRequest 允许省略;history() 用 observation.cursor,
2092
+ * 它就是日志最后一条事件的 seq —— 与旧路径 inspect() 算出的 cursor 等价)。
2093
+ * - 向前翻页只传 beforeSeq(开区间),宿主自己与末尾取交集。
2094
+ * 旧宿主(0.2.1 及更早):先 inspect() 冷读拿日志尾 seq(throughSeq 必须是真实
2095
+ * 存在的 seq,传 MAX_SAFE_INTEGER 会被 bad-request 拒为 past cursor),再 page()。
2096
+ *
2097
+ * 版本判据(实测 0.2.1-rc.5 无 events()、有 inspect();0.2.2-rc.1 有 events()、
2098
+ * 无 inspect()):**以 events() 的存在与否分流**,不靠版本号猜。
2099
+ *
2100
+ * @param {any} sc sessionController
2101
+ * @param {string} sessionId
2102
+ * @param {number} maxMessages
2103
+ * @param {number|undefined} beforeSeq
2104
+ * @param {AbortSignal} signal
2105
+ * @returns {Promise<{records:any[],hasMore:boolean}>}
2106
+ */
2107
+ async #readHistoryPage(sc, sessionId, maxMessages, beforeSeq, signal) {
2108
+ if (typeof sc.events === "function") {
2109
+ const address = await this.#historyAddress(sc, sessionId, signal);
2110
+ const request = { address, maxMessages };
2111
+ if (beforeSeq !== undefined) request.beforeSeq = beforeSeq;
2112
+ const page = await sc.events(request, signal);
2113
+ return { records: page?.records ?? [], hasMore: page?.hasMore === true };
2114
+ }
2115
+ // 旧宿主:inspect + page。
2116
+ const inspected = await sc.inspect(sessionId, signal);
2117
+ const events = inspected?.events;
2118
+ let cursor = -1;
2119
+ let address = historyAddress(sessionId);
2120
+ if (Array.isArray(events) && events.length > 0) {
2121
+ const lastSeq = Number(events[events.length - 1]?.seq);
2122
+ if (Number.isSafeInteger(lastSeq) && lastSeq >= 0) cursor = lastSeq;
2123
+ }
2124
+ // subagent 会话必须走 durable subagent 地址(宿主校验:kind:'session' 会被拒)
2125
+ const header = inspected?.meta;
2126
+ const parent = typeof header?.parentSession === "string" ? header.parentSession : "";
2127
+ if (header?.origin === "subagent" && parent !== "") {
2128
+ address = historyAddress(sessionId, parent);
2129
+ }
2130
+ if (cursor < 0) {
2131
+ // 空会话(无任何事件):直接回空页,不折腾 page
2132
+ // (交付物图片仍要带上——它们不在宿主的会话日志里)
2133
+ return { records: [], hasMore: false };
2134
+ }
2135
+ const request = { address, throughSeq: cursor, maxMessages };
2136
+ if (beforeSeq !== undefined) request.beforeSeq = beforeSeq;
2137
+ const page = await sc.page(request, signal);
2138
+ return { records: page?.records ?? [], hasMore: page?.hasMore === true };
2139
+ }
2140
+
2141
+ /**
2142
+ * 解析会话历史的宿主地址(新宿主路径)。
2143
+ *
2144
+ * 子代理会话必须用 durable subagent 地址;它的父会话 id 从**冷读**的
2145
+ * sessionController.list() 里取(list 不激活 Agent)。
2146
+ * list() 拿不到(例如会话已不在可见列表里)→ 退回普通会话地址,
2147
+ * 由宿主自己判定(子代理用 kind:'session' 会被拒为 session/agent-busy,
2148
+ * 错误原样回给手机端,不静默吞掉)。
2149
+ * @param {any} sc sessionController
2150
+ * @param {string} sessionId
2151
+ * @param {AbortSignal} signal
2152
+ * @returns {Promise<{kind:string,sessionId?:string,parentSessionId?:string,childSessionId?:string,mode?:string}>}
2153
+ */
2154
+ async #historyAddress(sc, sessionId, signal) {
2155
+ try {
2156
+ const listed = await sc.list({}, signal);
2157
+ for (const raw of listed?.items ?? []) {
2158
+ if (String(raw?.sessionId ?? "") !== sessionId) continue;
2159
+ const parent = typeof raw?.parentSessionId === "string" ? raw.parentSessionId : "";
2160
+ if (raw?.origin === "subagent" && parent !== "") {
2161
+ return historyAddress(sessionId, parent);
2162
+ }
2163
+ return historyAddress(sessionId);
2164
+ }
2165
+ } catch (e) {
2166
+ this.#log("warn", "history address lookup failed; using plain session address", {
2167
+ sessionId,
2168
+ error: errText(e),
2169
+ });
2170
+ }
2171
+ return historyAddress(sessionId);
2172
+ }
2173
+
2174
+ /**
2175
+ * 冷读判定一个会话是不是子代理(**绝不激活 Agent**)。
2176
+ *
2177
+ * 新宿主没有 inspect() 了 → 用 list() 的 origin/parentSessionId 字段
2178
+ * (宿主 listFields(header) 直接带出这两个字段,与旧宿主 inspect().meta 同源)。
2179
+ * 旧宿主仍走 inspect()(更快,且不必列举全部会话)。
2180
+ *
2181
+ * 用途:权限查询的 live 降级前必须先判身份——子代理绝不能为了显示权限
2182
+ * 而 resolveAgent 激活它(v1.1.7 规则)。
2183
+ * @param {any} sc sessionController
2184
+ * @param {string} sessionId
2185
+ * @param {AbortSignal} signal
2186
+ * @returns {Promise<boolean>}
2187
+ */
2188
+ async #isSubagentSession(sc, sessionId, signal) {
2189
+ try {
2190
+ if (typeof sc.inspect === "function") {
2191
+ const inspected = await sc.inspect(sessionId, signal);
2192
+ const meta = inspected?.meta;
2193
+ return (
2194
+ meta?.origin === "subagent" ||
2195
+ (typeof meta?.parentSession === "string" && meta.parentSession !== "") ||
2196
+ (typeof meta?.parentSessionId === "string" && meta.parentSessionId !== "")
2197
+ );
2198
+ }
2199
+ const listed = await sc.list({}, signal);
2200
+ for (const raw of listed?.items ?? []) {
2201
+ if (String(raw?.sessionId ?? "") !== sessionId) continue;
2202
+ if (raw?.origin === "subagent") return true;
2203
+ return typeof raw?.parentSessionId === "string" && raw.parentSessionId !== "";
2204
+ }
2205
+ return false;
2206
+ } catch (e) {
2207
+ this.#log("warn", "subagent identity cold read unavailable", {
2208
+ sessionId,
2209
+ error: errText(e),
2210
+ });
2211
+ // 判不出来 → 按“不是子代理”处理(宿主对普通会话的权限查询是安全的);
2212
+ // 真子代理会走 resolveAgent 路径,但那是宿主的既有行为,不是我们引入的。
2213
+ return false;
2214
+ }
2215
+ }
2216
+
2082
2217
  /** 契约 §5.1 session.subagents(v1.0.5):父会话直接子代理目录。
2083
2218
  * 数据组合:父会话 subagentCatalog 持久投影(mode/label/createdAt/顺序,
2084
2219
  * 经 sessionController.projections 冷读,无 Agent 激活)+ list 全量行
@@ -2611,24 +2746,13 @@ export class HostBridge {
2611
2746
  }
2612
2747
 
2613
2748
  // 旧宿主没有 permissions 投影时,live Session 的 current() 仍是有效值权威来源。
2614
- // 但 subagent 查询绝不能为了兜底而激活 Agent:先用 inspect 冷读身份,命中即只回内存态。
2749
+ // 但 subagent 查询绝不能为了兜底而激活 Agent:先冷读身份,命中即只回内存态。
2750
+ // 新宿主(0.2.2-rc.1+)没有 inspect() 了 → 冷读改走 list() 的 origin/parentSessionId
2751
+ // (同样不激活 Agent),否则会误把子代理 resolveAgent 起来(违反 v1.1.7)。
2615
2752
  try {
2616
2753
  const svc = this.#service("permissionPresets");
2617
2754
  const sc = this.#sc();
2618
- let coldSubagent = false;
2619
- if (typeof sc.inspect === "function") {
2620
- try {
2621
- const inspected = await sc.inspect(sessionId, this.#signal(10_000));
2622
- const meta = inspected?.meta;
2623
- coldSubagent = meta?.origin === "subagent" ||
2624
- (typeof meta?.parentSessionId === "string" && meta.parentSessionId !== "");
2625
- } catch (e) {
2626
- this.#log("warn", "permission subagent identity inspect unavailable", {
2627
- sessionId,
2628
- error: errText(e),
2629
- });
2630
- }
2631
- }
2755
+ const coldSubagent = await this.#isSubagentSession(sc, sessionId, this.#signal(10_000));
2632
2756
  if (!coldSubagent && svc && typeof svc.current === "function" && typeof sc.resolveAgent === "function") {
2633
2757
  const agentRes = await sc.resolveAgent(sessionId);
2634
2758
  const session = agentRes?.agent?.session ?? agentRes?.session ?? null;
package/market/index.json CHANGED
@@ -69,6 +69,26 @@
69
69
  "sortKeys": {}
70
70
  },
71
71
  "versions": [
72
+ {
73
+ "version": "1.1.9",
74
+ "publishTimestamp": 1793924339,
75
+ "source": {
76
+ "type": "npm"
77
+ },
78
+ "engines": {
79
+ "dsh": "^0.1.5-rc.3 || ^0.2.0-rc.1 || ^0.2.1-rc.0"
80
+ }
81
+ },
82
+ {
83
+ "version": "1.1.8",
84
+ "publishTimestamp": 1793807705,
85
+ "source": {
86
+ "type": "npm"
87
+ },
88
+ "engines": {
89
+ "dsh": "^0.1.5-rc.3 || ^0.2.0-rc.1 || ^0.2.1-rc.0"
90
+ }
91
+ },
72
92
  {
73
93
  "version": "1.1.7",
74
94
  "publishTimestamp": 1793320998,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duke-dsh-plugins/dsh-remote-control",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "Remote-control bridge for DeepSeek Harness: pairs a HarmonyOS phone app with the desktop Host over an end-to-end-encrypted public relay (WebSocket). Lets the phone list/create/switch sessions, send prompts, watch streamed replies, cancel turns, and answer approval and ask-user-question requests from anywhere; pushes Huawei Push Kit notifications (gracefully disabled when AGC is unconfigured) for approvals, questions, and turn completion. The pairing QR lives in the DSH settings panel (\"DSH Pocket\"). Fail-open by design: any relay timeout or fault hands the request back to the desktop answerer.",
5
5
  "type": "module",
6
6
  "main": "index.js",