@linxin666/dsh-remote-bridge 0.4.8 → 0.4.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.
Files changed (55) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +50 -17
  3. package/README.zh.md +50 -17
  4. package/lib/client.js +274 -253
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +6690 -2277
  7. package/lib/types/client/PairEntry.d.ts +2 -2
  8. package/lib/types/client/PairPanel.d.ts +10 -2
  9. package/lib/types/client/icons.d.ts +5 -13
  10. package/lib/types/client/locales.d.ts +10 -14
  11. package/lib/types/client/semantic.d.ts +9 -5
  12. package/lib/types/core/commands.d.ts +59 -0
  13. package/lib/types/core/connection.d.ts +68 -0
  14. package/lib/types/core/devices.d.ts +98 -2
  15. package/lib/types/core/hub.d.ts +65 -15
  16. package/lib/types/core/liveactivity.d.ts +324 -0
  17. package/lib/types/core/protocol.d.ts +260 -1
  18. package/lib/types/core/push.d.ts +178 -0
  19. package/lib/types/core/questions.d.ts +61 -9
  20. package/lib/types/core/session-meta.d.ts +55 -1
  21. package/lib/types/core/squads.d.ts +130 -0
  22. package/lib/types/core/usage-stats.d.ts +160 -0
  23. package/lib/types/core/usage.d.ts +294 -0
  24. package/lib/types/host/apns.d.ts +151 -0
  25. package/lib/types/host/squads-ledger.d.ts +39 -0
  26. package/lib/types/host/squads.d.ts +77 -0
  27. package/lib/types/host/usage-stats.d.ts +75 -0
  28. package/lib/types/host/watchers.d.ts +88 -0
  29. package/lib/types/index.d.ts +18 -2
  30. package/package.json +13 -13
  31. package/src/client/PairEntry.tsx +58 -31
  32. package/src/client/PairPanel.tsx +181 -97
  33. package/src/client/icons.tsx +17 -60
  34. package/src/client/locales.ts +15 -23
  35. package/src/client/panel.module.css +239 -186
  36. package/src/client/semantic.ts +10 -6
  37. package/src/core/commands.ts +95 -0
  38. package/src/core/connection.ts +646 -10
  39. package/src/core/devices.ts +221 -3
  40. package/src/core/hub.ts +362 -42
  41. package/src/core/liveactivity.ts +833 -0
  42. package/src/core/protocol.ts +294 -1
  43. package/src/core/push.ts +354 -0
  44. package/src/core/questions.ts +81 -10
  45. package/src/core/session-meta.ts +73 -1
  46. package/src/core/squads.ts +345 -0
  47. package/src/core/usage-stats.ts +424 -0
  48. package/src/core/usage.ts +937 -0
  49. package/src/core/wire.ts +8 -0
  50. package/src/host/apns.ts +320 -0
  51. package/src/host/squads-ledger.ts +105 -0
  52. package/src/host/squads.ts +206 -0
  53. package/src/host/usage-stats.ts +155 -0
  54. package/src/host/watchers.ts +272 -0
  55. package/src/index.ts +257 -8
@@ -20,12 +20,30 @@ export const METHOD_SESSION_MODELS = 'session.models'
20
20
  export const METHOD_SESSION_SET_MODEL = 'session.setModel'
21
21
  export const METHOD_SESSION_CREATE = 'session.create'
22
22
  export const METHOD_SESSION_FORK = 'session.fork'
23
+ export const METHOD_SESSION_COMMANDS = 'session.commands'
24
+ export const METHOD_SESSION_COMMAND = 'session.command'
25
+ export const METHOD_SESSION_RENAME = 'session.rename'
26
+ export const METHOD_SESSION_PIN = 'session.pin'
27
+ export const METHOD_SESSION_UNPIN = 'session.unpin'
28
+ export const METHOD_SESSION_ARCHIVE = 'session.archive'
29
+ export const METHOD_SESSION_UNARCHIVE = 'session.unarchive'
30
+ export const METHOD_WORKSPACE_LIST = 'workspace.list'
23
31
  export const METHOD_PRESETS_LIST = 'presets.list'
24
32
  export const METHOD_PAIR_BEGIN = 'pair.begin'
25
33
  export const METHOD_PAIR_FINISH = 'pair.finish'
26
34
  export const METHOD_APPROVAL_RESOLVE = 'approval.resolve'
27
35
  export const METHOD_QUESTION_ANSWER = 'question.answer'
36
+ export const METHOD_QUESTION_LIST = 'question.list'
28
37
  export const METHOD_JOBS_LIST = 'jobs.list'
38
+ export const METHOD_SQUADS_STATE = 'squads.state'
39
+ export const METHOD_SQUADS_LIST = 'squads.list'
40
+ export const METHOD_SQUADS_RUNS = 'squads.runs'
41
+ export const METHOD_SQUADS_RUN_MEMBER = 'squads.runMember'
42
+ export const METHOD_SQUADS_RUN_SQUAD = 'squads.runSquad'
43
+ export const METHOD_PUSH_REGISTER = 'push.register'
44
+ export const METHOD_USAGE_SESSION = 'usage.session'
45
+ export const METHOD_USAGE_BALANCE = 'usage.balance'
46
+ export const METHOD_USAGE_STATS = 'usage.stats'
29
47
 
30
48
  /** Server-pushed topics of protocol v1. */
31
49
  export const TOPIC_SESSION_DELTA = 'session.delta'
@@ -83,6 +101,23 @@ export const CAP_SESSION_SNAPSHOT_SINCE = 'session.snapshot.since.v1'
83
101
  */
84
102
  export const CAP_QUESTIONS = 'questions.v1'
85
103
 
104
+ /**
105
+ * Capability a client declares in `hello`'s `cap` array to learn that this
106
+ * bridge can list the user questions it is still holding.
107
+ *
108
+ * An announcement rather than a switch, the same shape as
109
+ * {@link CAP_SESSION_DEEP_HISTORY}: `question.list` is reachable from every
110
+ * client that declared {@link CAP_QUESTIONS}, exactly as `question.answer` is,
111
+ * so a client written before this name existed loses nothing by declaring it
112
+ * and nothing by never calling the method. What the name buys is a way to tell
113
+ * a bridge that serves the method from one that does not: a host built before
114
+ * it answers `unknown-method`, so a client that does not find this name in
115
+ * `hello`'s `capabilities` keeps the retirement rule it had — a card is over
116
+ * when `question.request` says `settled` — instead of reaping cards on an
117
+ * answer it cannot trust.
118
+ */
119
+ export const CAP_QUESTION_LIST = 'questions.list.v1'
120
+
86
121
  /**
87
122
  * Capability a client declares in `hello`'s `cap` array to be handed the
88
123
  * approval questions this bridge is already holding for it.
@@ -145,6 +180,75 @@ export const CAP_JOBS = 'jobs.v1'
145
180
  */
146
181
  export const CAP_AGENTS = 'agents.v1'
147
182
 
183
+ /**
184
+ * Capability a client declares in `hello`'s `cap` array to read the host's
185
+ * agent squads and to drive them.
186
+ *
187
+ * Declaring it is what makes `squads.state`, `squads.list`, `squads.runs`,
188
+ * `squads.runMember` and `squads.runSquad` part of that client's protocol at
189
+ * all: a client that does not declare it — including every client written before
190
+ * this channel existed — is refused each as an unknown method, exactly as those
191
+ * frames were refused before. No command is called on a connection's behalf
192
+ * either, so a client that never asks sends the host no request.
193
+ *
194
+ * The channel is additive beside {@link CAP_AGENTS} rather than a replacement:
195
+ * a phone that predates the squad model keeps the preset roster and session
196
+ * creation it was written against, and a phone that reads this name reads the
197
+ * squad domain instead of deriving agents from anything else.
198
+ */
199
+ export const CAP_SQUADS = 'squads.v1'
200
+
201
+ /**
202
+ * Capability a client declares in `hello`'s `cap` array to register the APNs
203
+ * token this device wants to be notified on.
204
+ *
205
+ * Declaring it is what makes `push.register` part of that client's protocol at
206
+ * all: a client that does not declare it — including every client written before
207
+ * this channel existed — is refused that frame as an unknown method, and no
208
+ * device row is written on its behalf.
209
+ *
210
+ * The name announces that this bridge can REMEMBER a token, not that it will
211
+ * send anything. Whether a notification ever leaves the process is a deployment
212
+ * fact (is an APNs signing key configured?) that the wire deliberately cannot
213
+ * express: a bridge with no key answers `ok:true` exactly like one with a key,
214
+ * because a client has no second code path to keep for the difference. Every
215
+ * notification this channel produces is an outbound APNs request and nothing
216
+ * else — no topic, no frame and no state is added to `/ios/v1` (see the
217
+ * protocol's §28).
218
+ */
219
+ export const CAP_PUSH = 'push.v1'
220
+
221
+ /**
222
+ * 客户端在 `hello` 的 `cap` 数组里宣告它要读本桥自己的用量读数。
223
+ *
224
+ * 宣告它是 `usage.session` 与 `usage.balance` 进入这个客户端协议的唯一前提:
225
+ * 不宣告的客户端——包括这个通道出现之前写下的每一个客户端——收到的是与从前
226
+ * 逐字一样的 `unknown-method`,本桥也不会替它读一条会话、更不会替它打一次
227
+ * 上游余额端点。
228
+ *
229
+ * 一个能力名带两个方法,因为它们读的是同一件事的两面:一条会话下一次请求由
230
+ * 什么组成(上下文窗口取宿主自己广播的值,组成由本桥按文本长度估算并恒标
231
+ * `estimated: true`),以及某条 provider 路由背后账户的余额(DeepSeek 官方
232
+ * 口径,只在路由确实指向 `api.deepseek.com` 且凭据拿得到时才查官方端点,宿主
233
+ * 侧同一 provider + 凭据 60 秒最多一次上游请求)。
234
+ */
235
+ export const CAP_USAGE = 'usage.v1'
236
+
237
+ /**
238
+ * 客户端在 `hello` 的 `cap` 数组里宣告它要读宿主自己的用量台账聚合。
239
+ *
240
+ * 与 {@link CAP_USAGE} 平级、独立声明:宣告它是 `usage.stats` 进入这个客户端
241
+ * 协议的唯一前提,不宣告的客户端——包括 `usage.v1` 出现之后、这个能力出现之前
242
+ * 写下的每一个客户端——收到的仍是 `unknown-method`,本桥也不会替它去读宿主
243
+ * 上 `dsh-usage` 插件的任何一条路由。
244
+ *
245
+ * 拆成独立能力而不是塞进 `usage.v1`,是因为它读的是另一件事:那两半读的是本
246
+ * 进程自己的事实(一个会话、一条路由的账户),这一半读的是另一个插件挂在这个
247
+ * 宿主上的 HTTP 路由,而那个插件可能根本没装。老客户端忽略这个未知名字即可,
248
+ * 它看到的能力表里多一项、别的什么都没有变。
249
+ */
250
+ export const CAP_USAGE_STATS = 'usage.stats.v1'
251
+
148
252
  /**
149
253
  * Capability a client declares in `hello`'s `cap` array to be answered with
150
254
  * byte-level increments instead of the whole roster or the whole board.
@@ -218,6 +322,66 @@ export const CAP_SESSION_DEEP_HISTORY = 'session.deep-history.v1'
218
322
  */
219
323
  export const CAP_SESSION_FORK = 'session.fork.v1'
220
324
 
325
+ /**
326
+ * Capability a client declares in `hello`'s `cap` array to list a session's
327
+ * slash commands and skills and to run one of them.
328
+ *
329
+ * Declaring it is what makes `session.commands` and `session.command` part of
330
+ * that client's protocol at all: a client that does not declare it — including
331
+ * every client written before this channel existed — is refused both as unknown
332
+ * methods, exactly as those frames were refused before. Neither method is called
333
+ * on a connection's behalf either, so a client that never asks costs the host no
334
+ * registry read and no skill catalog read.
335
+ *
336
+ * The channel holds no events and no cache: a directory is read live on every
337
+ * call, so a command a plugin registered a moment ago and a skill withdrawn from
338
+ * one Agent preset are both reflected in the answer that follows.
339
+ */
340
+ export const CAP_COMMANDS = 'commands.v1'
341
+
342
+ /**
343
+ * Capability a client declares in `hello`'s `cap` array to read the host's
344
+ * workspaces and its two registry-global session sets.
345
+ *
346
+ * Declaring it is what makes `workspace.list` part of that client's protocol at
347
+ * all: a client that does not declare it — including every client written before
348
+ * this channel existed — is refused that frame as an unknown method, and no
349
+ * registry is read on its behalf. Behind the name the answer is the host's own
350
+ * synchronous projection: one row per registered workspace in registry order,
351
+ * plus the complete archive and pin sets.
352
+ *
353
+ * The method is a read and nothing is cached, so a pin or an archive followed by
354
+ * another list reads the set the write left behind. That pair of calls is the
355
+ * whole refresh story of the session-admin channel: see {@link CAP_SESSION_ADMIN}.
356
+ */
357
+ export const CAP_WORKSPACE = 'workspace.v1'
358
+
359
+ /**
360
+ * Capability a client declares in `hello`'s `cap` array to rename, pin,
361
+ * unpin, archive and unarchive a session.
362
+ *
363
+ * Declaring it is what makes those five methods part of that client's protocol
364
+ * at all: a client that does not declare it — including every client written
365
+ * before this channel existed — is refused each as an unknown method, and no
366
+ * write is asked of the host on its behalf.
367
+ *
368
+ * Every one of the five is forwarded one-to-one to the endpoint that already
369
+ * owns the semantics, so nothing about a title, a pin or an archive is modelled
370
+ * or re-derived here: a rename reaches `session/rename` — the endpoint that
371
+ * restores a cold session before it writes, which is why a client needs no
372
+ * resume path of its own — and the four set mutations reach
373
+ * `workspace/pinSession`, `workspace/unpinSession`, `workspace/archiveSession`
374
+ * and `workspace/unarchiveSession`. A host refusal crosses with its own code
375
+ * and text, `workspace/session-active` included.
376
+ *
377
+ * The channel publishes no event, because the host announces none of these
378
+ * writes as a cordis event a connection could fold into a delta: a rename
379
+ * appends one `session/title` log record and nothing else. A client re-reads
380
+ * after a write instead — the pin set through {@link CAP_WORKSPACE}, the roster
381
+ * through `session.list` — which is why one branch serves both capabilities.
382
+ */
383
+ export const CAP_SESSION_ADMIN = 'session.admin.v1'
384
+
221
385
  /**
222
386
  * Capability a client declares in `hello`'s `cap` array to be sent frames
223
387
  * compressed instead of as plain text.
@@ -264,16 +428,42 @@ export const KNOWN_METHODS: ReadonlySet<string> = new Set([
264
428
  METHOD_PAIR_FINISH,
265
429
  METHOD_APPROVAL_RESOLVE,
266
430
  METHOD_QUESTION_ANSWER,
431
+ METHOD_QUESTION_LIST,
267
432
  METHOD_JOBS_LIST,
268
433
  METHOD_PRESETS_LIST,
269
434
  METHOD_SESSION_CREATE,
270
435
  METHOD_SESSION_FORK,
436
+ METHOD_SESSION_COMMANDS,
437
+ METHOD_SESSION_COMMAND,
438
+ METHOD_SESSION_RENAME,
439
+ METHOD_SESSION_PIN,
440
+ METHOD_SESSION_UNPIN,
441
+ METHOD_SESSION_ARCHIVE,
442
+ METHOD_SESSION_UNARCHIVE,
443
+ METHOD_WORKSPACE_LIST,
444
+ METHOD_SQUADS_STATE,
445
+ METHOD_SQUADS_LIST,
446
+ METHOD_SQUADS_RUNS,
447
+ METHOD_SQUADS_RUN_MEMBER,
448
+ METHOD_SQUADS_RUN_SQUAD,
449
+ METHOD_PUSH_REGISTER,
450
+ METHOD_USAGE_SESSION,
451
+ METHOD_USAGE_BALANCE,
452
+ METHOD_USAGE_STATS,
271
453
  ])
272
454
 
273
455
  /** Refusal codes the bridge itself raises (DSH failures cross as their own code). */
274
456
  export const CODE_UNPAIRED = 'unpaired'
275
457
  export const CODE_UNKNOWN_METHOD = 'unknown-method'
276
458
  export const CODE_INVALID_ARGS = 'invalid-args'
459
+ /**
460
+ * `usage.session` 点名的会话在这个宿主上不存在:宿主自己的会话名册里没有它,
461
+ * 活会话存储里没有它,本进程也从未观察过它的任何事件。它与「会话存在但两项
462
+ * 读数都取不到」是两个答案,后者回的是空对象——一条刚刚开始、还什么都没广播
463
+ * 的会话,以及一条在桥重载前就存在的会话,都在那个状态里:存在而没读数,不是
464
+ * 不存在。
465
+ */
466
+ export const CODE_UNKNOWN_SESSION = 'unknown-session'
277
467
  export const CODE_PROTO_UNSUPPORTED = 'proto-unsupported'
278
468
  export const CODE_TOKEN_INVALID = 'token-invalid'
279
469
  export const CODE_NONCE_INVALID = 'nonce-invalid'
@@ -285,6 +475,13 @@ export const CODE_APPROVAL_UNKNOWN = 'approval-unknown'
285
475
  * failures crossing this method keep their own codes instead.
286
476
  */
287
477
  export const CODE_QUESTION_UNKNOWN = 'question-unknown'
478
+ /**
479
+ * The bridge could not read the questions it is holding, so it cannot say which
480
+ * ones are still live. The answer is deliberately not an empty list: a client
481
+ * retires every card a COMPLETE list does not carry, and a read that failed is
482
+ * not a complete one — it is a bridge that cannot answer this question today.
483
+ */
484
+ export const CODE_QUESTION_LIST_UNAVAILABLE = 'question-list-unavailable'
288
485
  /**
289
486
  * The named session is a delegated child whose durable parent is not a session
290
487
  * this connection may read. The bridge follows an addressable child and refuses
@@ -298,6 +495,32 @@ export const CODE_SNAPSHOT_UNAVAILABLE = 'snapshot-unavailable'
298
495
  * what a particular host mounts — and only a call that needs the registry fails.
299
496
  */
300
497
  export const CODE_JOBS_UNAVAILABLE = 'jobs-unavailable'
498
+ /**
499
+ * This host serves no endpoint behind the command channel: no `commands/list`,
500
+ * no `commands/execute` or no `skills/list`, which the gateway itself reports
501
+ * as an endpoint nothing exports. The capability stays advertised — it is a fact
502
+ * about this bridge, not about what a particular host mounts — and only a call
503
+ * that needs those endpoints fails.
504
+ */
505
+ export const CODE_COMMANDS_UNAVAILABLE = 'commands-unavailable'
506
+ /**
507
+ * This host serves no squad domain this bridge can reach: no answer to the
508
+ * plugin's state route over loopback, no readable ledger beside it, or a body
509
+ * this build cannot read as one squad domain. The capability stays advertised —
510
+ * it is a fact about this bridge, not about what a particular host mounts — and
511
+ * only a call that needs the domain fails. A refusal the `dsh-agents` plugin
512
+ * itself raised crosses with the plugin's own code instead (`team-not-found`,
513
+ * `member-not-found`, `preset-unknown`, `workspace-required` and their
514
+ * neighbours).
515
+ */
516
+ export const CODE_SQUADS_UNAVAILABLE = 'squads-unavailable'
517
+ /**
518
+ * The definitions are readable but the two run commands cannot be served: this
519
+ * host answered no run route over loopback, and the read-only ledger fallback
520
+ * cannot launch anything. Failing closed is the point — a client is told the
521
+ * capability is not served here rather than shown a run that never started.
522
+ */
523
+ export const CODE_SQUADS_RUN_UNAVAILABLE = 'squads-run-unavailable'
301
524
  export const CODE_SNAPSHOT_TOO_LARGE = 'snapshot-too-large'
302
525
  export const CODE_INTERNAL = 'internal'
303
526
 
@@ -306,6 +529,68 @@ export const PROTO = 1
306
529
  /**
307
530
  * Minor version this package speaks.
308
531
  *
532
+ * 20 when the usage stats channel shipped: behind {@link CAP_USAGE_STATS} a
533
+ * client may call {@link METHOD_USAGE_STATS} and read the host's own usage
534
+ * ledger — today, this month and one row per local day — and behind the same
535
+ * {@link CAP_USAGE} this bridge now also answers `usage.session` with a
536
+ * `modelContextWindow` when the model catalog of the session's route declares
537
+ * one, so a client reads one new reply body and one new optional key off the
538
+ * wire and has to read the name before it asks. The stats half is independent
539
+ * of {@link CAP_USAGE} on purpose: it reads another plugin's HTTP routes, which
540
+ * a host may not mount at all, so a client written before this name existed
541
+ * keeps the two readings it had and the bridge reads no route on its behalf.
542
+ * No frame, no topic, no existing method and no existing key changes shape.
543
+ * 19 when the usage channel shipped: behind {@link CAP_USAGE} a client may call
544
+ * {@link METHOD_USAGE_SESSION} and read one session's context window and its
545
+ * request's estimated composition, and {@link METHOD_USAGE_BALANCE} and read the
546
+ * account behind one provider route, so it reads two new reply bodies off the
547
+ * wire and has to read the name before it asks — a bridge below this one answers
548
+ * `unknown-method` for both. No frame, no topic and no existing method changes
549
+ * shape.
550
+ * 18 when one card learned to lay out several sessions (§30 of
551
+ * `docs/protocol-v1.md` in the iphone_remote_use_dsh repository): `content-state`
552
+ * gains the optional `rows` key, so a phone reads up to three sessions off one
553
+ * lock-screen card instead of having to hold one card per session. It is a pure
554
+ * addition — no new method, no new capability name, no existing key or topic
555
+ * changes shape — so the minor counts the key alone, and a client that reads 18
556
+ * knows the order of the rows it is handed is the bridge's rather than one it
557
+ * has to derive.
558
+ * 17 when the live-activity channel shipped (§29.2): this bridge now sends the
559
+ * lock-screen card a suspended app cannot update itself, addressed to the
560
+ * per-card APNs tokens {@link METHOD_PUSH_REGISTER} already carries and projected
561
+ * per session rather than per bridge. It is a pure addition — no new method, no
562
+ * new capability name, and no existing frame, field or topic changes shape — so
563
+ * the minor counts it alone: a client that wants a card has to read 17 before it
564
+ * registers one, because a bridge below this one has no sending path at all and
565
+ * would answer `ok:true` to a registration it can never use.
566
+ * 16 when the push channel shipped: behind {@link CAP_PUSH} a client may call
567
+ * {@link METHOD_PUSH_REGISTER} and have the device table remember an APNs token,
568
+ * so a phone learns a turn ended — or that a question is waiting — while its
569
+ * socket is not open. No frame, no topic and no existing method changes shape;
570
+ * the minor is raised because a new reply body and a new announcement appear on
571
+ * the wire, and because a client has to read the name before it registers.
572
+ * 15 when the squads channel shipped: behind {@link CAP_SQUADS} a client may
573
+ * call {@link METHOD_SQUADS_STATE}, {@link METHOD_SQUADS_LIST},
574
+ * {@link METHOD_SQUADS_RUNS}, {@link METHOD_SQUADS_RUN_MEMBER} and
575
+ * {@link METHOD_SQUADS_RUN_SQUAD}, so it reads five new reply bodies off the wire
576
+ * and drives the squad domain instead of deriving its agents from anything else.
577
+ * 14 when the session-admin channel shipped: behind {@link CAP_WORKSPACE} a
578
+ * client may call {@link METHOD_WORKSPACE_LIST} and read the host's workspaces
579
+ * with both registry-global session sets, and behind {@link CAP_SESSION_ADMIN}
580
+ * it may call {@link METHOD_SESSION_RENAME}, {@link METHOD_SESSION_PIN},
581
+ * {@link METHOD_SESSION_UNPIN}, {@link METHOD_SESSION_ARCHIVE} and
582
+ * {@link METHOD_SESSION_UNARCHIVE}, so a phone long-presses a roster row for the
583
+ * same five actions the desktop offers it.
584
+ * 13 when the question list shipped: behind {@link CAP_QUESTION_LIST} a client
585
+ * may call {@link METHOD_QUESTION_LIST} and be answered the questions this
586
+ * bridge is still holding, so it reads a new reply body off the wire and the
587
+ * number rises with it. It is what lets a phone stop trusting a card it holds:
588
+ * the one retirement signal before it was `question.request` with
589
+ * `state: "settled"`, which a phone that was disconnected when the last client
590
+ * left never receives.
591
+ * 12 when the command channel shipped: behind {@link CAP_COMMANDS} a client may
592
+ * call {@link METHOD_SESSION_COMMANDS} and {@link METHOD_SESSION_COMMAND}, so it
593
+ * reads a new reply body off the wire and the number rises with it.
309
594
  * 11 when the fork channel shipped: behind {@link CAP_SESSION_FORK} a client may
310
595
  * call {@link METHOD_SESSION_FORK} and receive the host's own fork answer, so a
311
596
  * phone branches a session that inherits the context of the one it forked. This
@@ -348,7 +633,7 @@ export const PROTO = 1
348
633
  * declares the capability that plugin requires. No addition changed the major
349
634
  * version, a frozen field, or an existing method or topic name.
350
635
  */
351
- export const MINOR = 11
636
+ export const MINOR = 20
352
637
 
353
638
  /**
354
639
  * The capabilities this bridge itself serves, as `hello` advertises them.
@@ -361,6 +646,7 @@ export const SERVED_CAPABILITIES: readonly string[] = [
361
646
  CAP_SESSION_SNAPSHOT_TRIM,
362
647
  CAP_SESSION_SNAPSHOT_PAGE,
363
648
  CAP_QUESTIONS,
649
+ CAP_QUESTION_LIST,
364
650
  CAP_SUBAGENT_THREAD,
365
651
  CAP_JOBS,
366
652
  CAP_AGENTS,
@@ -371,6 +657,13 @@ export const SERVED_CAPABILITIES: readonly string[] = [
371
657
  CAP_ROSTER_COMPACT,
372
658
  CAP_SESSION_SNAPSHOT_SINCE,
373
659
  CAP_SESSION_FORK,
660
+ CAP_COMMANDS,
661
+ CAP_WORKSPACE,
662
+ CAP_SESSION_ADMIN,
663
+ CAP_SQUADS,
664
+ CAP_PUSH,
665
+ CAP_USAGE,
666
+ CAP_USAGE_STATS,
374
667
  ]
375
668
  /** `server` field of the hello response. */
376
669
  export const SERVER_ID = 'dsh-remote-bridge'