@agentdeck/bridge 1.0.24 → 1.2.0

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 (184) hide show
  1. package/README.md +14 -6
  2. package/assets/fonts/NOTICE-PocketSansWorld.md +10 -0
  3. package/assets/fonts/OFL-PocketSansWorld.txt +93 -0
  4. package/assets/fonts/PocketSansWorld_12.cpfont +0 -0
  5. package/assets/fonts/pocket-sans-world.manifest.json +49 -0
  6. package/assets/learning/LICENSE-CC-BY-SA-4.0.txt +10 -0
  7. package/assets/learning/NOTICE.md +33 -0
  8. package/assets/learning/jp-n3-ko.manifest.json +27 -0
  9. package/assets/learning/jp-n3-ko.pdl +0 -0
  10. package/dist/adapters/openclaw.d.ts +74 -4
  11. package/dist/adapters/openclaw.d.ts.map +1 -1
  12. package/dist/adapters/openclaw.js +235 -43
  13. package/dist/adapters/openclaw.js.map +1 -1
  14. package/dist/agent-cli-diagnostics.d.ts +20 -0
  15. package/dist/agent-cli-diagnostics.d.ts.map +1 -0
  16. package/dist/agent-cli-diagnostics.js +100 -0
  17. package/dist/agent-cli-diagnostics.js.map +1 -0
  18. package/dist/apme/adapters/openclaw-hook.d.ts +38 -10
  19. package/dist/apme/adapters/openclaw-hook.d.ts.map +1 -1
  20. package/dist/apme/adapters/openclaw-hook.js +181 -37
  21. package/dist/apme/adapters/openclaw-hook.js.map +1 -1
  22. package/dist/apme/collector.d.ts +55 -2
  23. package/dist/apme/collector.d.ts.map +1 -1
  24. package/dist/apme/collector.js +324 -37
  25. package/dist/apme/collector.js.map +1 -1
  26. package/dist/apme/dashboard-html.d.ts.map +1 -1
  27. package/dist/apme/dashboard-html.js +275 -35
  28. package/dist/apme/dashboard-html.js.map +1 -1
  29. package/dist/apme/http.d.ts.map +1 -1
  30. package/dist/apme/http.js +33 -5
  31. package/dist/apme/http.js.map +1 -1
  32. package/dist/apme/index.d.ts.map +1 -1
  33. package/dist/apme/index.js +6 -2
  34. package/dist/apme/index.js.map +1 -1
  35. package/dist/apme/pareto.d.ts +2 -1
  36. package/dist/apme/pareto.d.ts.map +1 -1
  37. package/dist/apme/pareto.js +15 -4
  38. package/dist/apme/pareto.js.map +1 -1
  39. package/dist/apme/recommend.d.ts +24 -1
  40. package/dist/apme/recommend.d.ts.map +1 -1
  41. package/dist/apme/recommend.js +43 -7
  42. package/dist/apme/recommend.js.map +1 -1
  43. package/dist/apme/store.d.ts +47 -1
  44. package/dist/apme/store.d.ts.map +1 -1
  45. package/dist/apme/store.js +397 -99
  46. package/dist/apme/store.js.map +1 -1
  47. package/dist/bridge-core.d.ts +25 -1
  48. package/dist/bridge-core.d.ts.map +1 -1
  49. package/dist/bridge-core.js +50 -9
  50. package/dist/bridge-core.js.map +1 -1
  51. package/dist/card-feed.d.ts +46 -1
  52. package/dist/card-feed.d.ts.map +1 -1
  53. package/dist/card-feed.js +166 -6
  54. package/dist/card-feed.js.map +1 -1
  55. package/dist/cli.d.ts +56 -0
  56. package/dist/cli.d.ts.map +1 -1
  57. package/dist/cli.js +442 -34
  58. package/dist/cli.js.map +1 -1
  59. package/dist/codex-rate-limits-live.d.ts +180 -10
  60. package/dist/codex-rate-limits-live.d.ts.map +1 -1
  61. package/dist/codex-rate-limits-live.js +475 -22
  62. package/dist/codex-rate-limits-live.js.map +1 -1
  63. package/dist/daemon-build-identity.d.ts +124 -0
  64. package/dist/daemon-build-identity.d.ts.map +1 -0
  65. package/dist/daemon-build-identity.js +310 -0
  66. package/dist/daemon-build-identity.js.map +1 -0
  67. package/dist/daemon-server.d.ts +34 -6
  68. package/dist/daemon-server.d.ts.map +1 -1
  69. package/dist/daemon-server.js +876 -109
  70. package/dist/daemon-server.js.map +1 -1
  71. package/dist/daemon-takeover.d.ts +11 -0
  72. package/dist/daemon-takeover.d.ts.map +1 -1
  73. package/dist/daemon-takeover.js +62 -17
  74. package/dist/daemon-takeover.js.map +1 -1
  75. package/dist/daemon-ws-client.d.ts +1 -0
  76. package/dist/daemon-ws-client.d.ts.map +1 -1
  77. package/dist/daemon-ws-client.js +25 -16
  78. package/dist/daemon-ws-client.js.map +1 -1
  79. package/dist/daemon.js +1 -1
  80. package/dist/daemon.js.map +1 -1
  81. package/dist/esp32-serial.d.ts +18 -0
  82. package/dist/esp32-serial.d.ts.map +1 -1
  83. package/dist/esp32-serial.js +23 -1
  84. package/dist/esp32-serial.js.map +1 -1
  85. package/dist/font-pack.d.ts +15 -0
  86. package/dist/font-pack.d.ts.map +1 -0
  87. package/dist/font-pack.js +75 -0
  88. package/dist/font-pack.js.map +1 -0
  89. package/dist/glance-frame.d.ts.map +1 -1
  90. package/dist/glance-frame.js +5 -1
  91. package/dist/glance-frame.js.map +1 -1
  92. package/dist/hook-codex-sessions.d.ts +3 -1
  93. package/dist/hook-codex-sessions.d.ts.map +1 -1
  94. package/dist/hook-codex-sessions.js +27 -7
  95. package/dist/hook-codex-sessions.js.map +1 -1
  96. package/dist/http-auth-gate.d.ts.map +1 -1
  97. package/dist/http-auth-gate.js +9 -1
  98. package/dist/http-auth-gate.js.map +1 -1
  99. package/dist/index.js +2 -2
  100. package/dist/index.js.map +1 -1
  101. package/dist/learning-pack.d.ts +24 -0
  102. package/dist/learning-pack.d.ts.map +1 -0
  103. package/dist/learning-pack.js +125 -0
  104. package/dist/learning-pack.js.map +1 -0
  105. package/dist/legacy-rearm-ledger.d.ts +56 -0
  106. package/dist/legacy-rearm-ledger.d.ts.map +1 -0
  107. package/dist/legacy-rearm-ledger.js +66 -0
  108. package/dist/legacy-rearm-ledger.js.map +1 -0
  109. package/dist/mdns.d.ts +33 -0
  110. package/dist/mdns.d.ts.map +1 -1
  111. package/dist/mdns.js +92 -3
  112. package/dist/mdns.js.map +1 -1
  113. package/dist/openclaw-session.d.ts.map +1 -1
  114. package/dist/openclaw-session.js +13 -0
  115. package/dist/openclaw-session.js.map +1 -1
  116. package/dist/openclaw-timeline-feed.d.ts +84 -0
  117. package/dist/openclaw-timeline-feed.d.ts.map +1 -0
  118. package/dist/openclaw-timeline-feed.js +162 -0
  119. package/dist/openclaw-timeline-feed.js.map +1 -0
  120. package/dist/openclaw-transcript-timeline.d.ts +103 -0
  121. package/dist/openclaw-transcript-timeline.d.ts.map +1 -0
  122. package/dist/openclaw-transcript-timeline.js +328 -0
  123. package/dist/openclaw-transcript-timeline.js.map +1 -0
  124. package/dist/pairing-knocks.d.ts +80 -0
  125. package/dist/pairing-knocks.d.ts.map +1 -0
  126. package/dist/pairing-knocks.js +312 -0
  127. package/dist/pairing-knocks.js.map +1 -0
  128. package/dist/passive-observer.d.ts +21 -1
  129. package/dist/passive-observer.d.ts.map +1 -1
  130. package/dist/passive-observer.js +37 -3
  131. package/dist/passive-observer.js.map +1 -1
  132. package/dist/pixoo/micro-glyphs.d.ts +4 -0
  133. package/dist/pixoo/micro-glyphs.d.ts.map +1 -1
  134. package/dist/pixoo/micro-glyphs.js +29 -0
  135. package/dist/pixoo/micro-glyphs.js.map +1 -1
  136. package/dist/pixoo/pixoo-font.d.ts.map +1 -1
  137. package/dist/pixoo/pixoo-font.js +3 -1
  138. package/dist/pixoo/pixoo-font.js.map +1 -1
  139. package/dist/pixoo/pixoo-renderer.d.ts +1 -1
  140. package/dist/pixoo/pixoo-renderer.d.ts.map +1 -1
  141. package/dist/pixoo/pixoo-renderer.js +17 -2
  142. package/dist/pixoo/pixoo-renderer.js.map +1 -1
  143. package/dist/pty-manager.d.ts +9 -0
  144. package/dist/pty-manager.d.ts.map +1 -1
  145. package/dist/pty-manager.js +63 -4
  146. package/dist/pty-manager.js.map +1 -1
  147. package/dist/relayed-usage.d.ts +98 -0
  148. package/dist/relayed-usage.d.ts.map +1 -0
  149. package/dist/relayed-usage.js +103 -0
  150. package/dist/relayed-usage.js.map +1 -0
  151. package/dist/session-aggregator.d.ts +3 -0
  152. package/dist/session-aggregator.d.ts.map +1 -1
  153. package/dist/session-aggregator.js.map +1 -1
  154. package/dist/session-registry.d.ts +1 -0
  155. package/dist/session-registry.d.ts.map +1 -1
  156. package/dist/surface-protocol.d.ts +84 -0
  157. package/dist/surface-protocol.d.ts.map +1 -0
  158. package/dist/surface-protocol.js +237 -0
  159. package/dist/surface-protocol.js.map +1 -0
  160. package/dist/timeline-store.d.ts +1 -1
  161. package/dist/timeline-store.d.ts.map +1 -1
  162. package/dist/timeline-store.js +16 -1
  163. package/dist/timeline-store.js.map +1 -1
  164. package/dist/tui/dashboard.d.ts.map +1 -1
  165. package/dist/tui/dashboard.js +8 -1
  166. package/dist/tui/dashboard.js.map +1 -1
  167. package/dist/tui/renderer.d.ts.map +1 -1
  168. package/dist/tui/renderer.js +35 -0
  169. package/dist/tui/renderer.js.map +1 -1
  170. package/dist/weather-config.d.ts +17 -0
  171. package/dist/weather-config.d.ts.map +1 -0
  172. package/dist/weather-config.js +54 -0
  173. package/dist/weather-config.js.map +1 -0
  174. package/dist/weather.d.ts +44 -4
  175. package/dist/weather.d.ts.map +1 -1
  176. package/dist/weather.js +223 -15
  177. package/dist/weather.js.map +1 -1
  178. package/dist/ws-server.d.ts +18 -0
  179. package/dist/ws-server.d.ts.map +1 -1
  180. package/dist/ws-server.js +95 -7
  181. package/dist/ws-server.js.map +1 -1
  182. package/fm-helper/AgentDeckFMHelper.swift +51 -5
  183. package/package.json +4 -3
  184. package/src/timebox/sync_ble.py +35 -16
package/README.md CHANGED
@@ -17,17 +17,25 @@ npm install -g @agentdeck/bridge
17
17
  ## Usage
18
18
 
19
19
  ```bash
20
- agentdeck claude # run Claude Code inside an AgentDeck session bridge
21
- agentdeck codex # same for Codex
22
- agentdeck opencode # same for OpenCode
23
- agentdeck monitor # terminal dashboard
24
- agentdeck daemon start # start the daemon hub (port 9120)
20
+ agentdeck daemon install # install hooks and start the daemon on login
21
+ claude # or: codex / opencode
22
+ agentdeck dashboard # terminal dashboard
23
+ agentdeck daemon start # start the daemon hub manually (port 9120)
25
24
  agentdeck devices # list connected display devices
26
25
  agentdeck qr # pairing QR for the iOS/Android companion apps
27
26
  agentdeck --help # full command reference
28
27
  ```
29
28
 
30
- The daemon is the hub every dashboard client talks to; session bridges wrap your agent CLI in a PTY, report state via lifecycle hooks, and let paired devices steer the session (answer prompts, approve tools, switch modes).
29
+ The daemon is the hub every dashboard client talks to. Normal agent commands
30
+ report through lifecycle hooks or native event channels and can be steered where
31
+ the observed session exposes a real delivery path.
32
+
33
+ The legacy `agentdeck claude|codex|opencode|monitor` per-session bridges remain
34
+ functional compatibility paths with no removal date. Prefer daemon-first for
35
+ ordinary local sessions, but keep managed-only workflows working while
36
+ [Discussion #278](https://github.com/puritysb/AgentDeck/discussions/278) and
37
+ [#273](https://github.com/puritysb/AgentDeck/issues/273) define and validate
38
+ replacements.
31
39
 
32
40
  Full CLI reference: https://github.com/puritysb/AgentDeck/blob/master/docs/cli.md
33
41
 
@@ -0,0 +1,10 @@
1
+ # PocketSansWorld font pack notice
2
+
3
+ PocketSansWorld is an SD-paged binary font bundle generated for Pocket Daily.
4
+ It combines glyphs from Noto Sans KR, Noto Sans JP, Noto Sans SC, Noto Sans
5
+ Hebrew, and Noto Sans. The original fonts and this redistributed derivative
6
+ are licensed under the SIL Open Font License 1.1. See
7
+ `OFL-PocketSansWorld.txt`.
8
+
9
+ The provider validates the immutable pack size, MD5, SHA-256, cpfont format,
10
+ source ledger, and licence before advertising it.
@@ -0,0 +1,93 @@
1
+ Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,49 @@
1
+ {
2
+ "fontPack": {
3
+ "id": "pocket-sans-world",
4
+ "version": 1,
5
+ "format": 4,
6
+ "size": 10903872,
7
+ "md5": "a6844503c142be1a62e4bac8be7c7802",
8
+ "sha256": "a1a15a6e9cdccd114cbaf34adb29fce08ad67d3dcd52b7970a77ab89db9ee753",
9
+ "licenseSpdx": "OFL-1.1"
10
+ },
11
+ "attribution": "PocketSansWorld is built from Noto Sans KR, JP, SC, Hebrew, and Noto Sans under the SIL Open Font License 1.1.",
12
+ "sources": [
13
+ {
14
+ "name": "Noto Sans KR",
15
+ "url": "https://github.com/google/fonts/tree/ec626514f79f831f1ab848a82114a0ce7e2d6372/ofl/notosanskr",
16
+ "revision": "ec626514f79f831f1ab848a82114a0ce7e2d6372",
17
+ "licenseSpdx": "OFL-1.1",
18
+ "attribution": "Noto Sans KR contributors"
19
+ },
20
+ {
21
+ "name": "Noto Sans SC",
22
+ "url": "https://github.com/google/fonts/tree/ec626514f79f831f1ab848a82114a0ce7e2d6372/ofl/notosanssc",
23
+ "revision": "ec626514f79f831f1ab848a82114a0ce7e2d6372",
24
+ "licenseSpdx": "OFL-1.1",
25
+ "attribution": "Noto Sans SC contributors"
26
+ },
27
+ {
28
+ "name": "Noto Sans JP",
29
+ "url": "https://github.com/google/fonts/tree/295d98a7a0c17c68f1341eaeea354e7960ea70d3/ofl/notosansjp",
30
+ "revision": "295d98a7a0c17c68f1341eaeea354e7960ea70d3",
31
+ "licenseSpdx": "OFL-1.1",
32
+ "attribution": "Noto Sans JP contributors"
33
+ },
34
+ {
35
+ "name": "Noto Sans",
36
+ "url": "https://github.com/notofonts/latin-greek-cyrillic",
37
+ "revision": "crosspoint-bundled-source",
38
+ "licenseSpdx": "OFL-1.1",
39
+ "attribution": "Noto Sans contributors"
40
+ },
41
+ {
42
+ "name": "Noto Sans Hebrew",
43
+ "url": "https://github.com/crosspoint-reader/crosspoint-reader/tree/94c0ba466cbb225a07f653d1c27f2a7261f1fb08/lib/EpdFont/builtinFonts/source/NotoSansHebrew",
44
+ "revision": "94c0ba466cbb225a07f653d1c27f2a7261f1fb08",
45
+ "licenseSpdx": "OFL-1.1",
46
+ "attribution": "The Noto Project Authors"
47
+ }
48
+ ]
49
+ }
@@ -0,0 +1,10 @@
1
+ Pocket Daily Japanese learning content
2
+ Copyright (c) 2026 Pocket Daily contributors
3
+
4
+ This learning content is licensed under the Creative Commons
5
+ Attribution-ShareAlike 4.0 International License.
6
+
7
+ License text and terms:
8
+ https://creativecommons.org/licenses/by-sa/4.0/legalcode
9
+
10
+ Attribution: Original Korean study content by Pocket Daily contributors.
@@ -0,0 +1,33 @@
1
+ # Pocket Daily learning data — source and modification notice
2
+
3
+ The `jp-n3-ko` dataset is an adapted subset of **OpenJLPT**, pinned at commit
4
+ `c42fd9fa3777bfc1775446f7c418d549dfd6e4cf`. OpenJLPT distributes its dataset
5
+ under **CC BY-SA 4.0** and records the following upstream sources:
6
+
7
+ - **JMdict / EDICT and KANJIDIC2**, Electronic Dictionary Research and
8
+ Development Group (EDRDG): vocabulary and kanji readings and English
9
+ glosses; CC BY-SA 4.0. <https://www.edrdg.org/>
10
+ - **Jonathan Waller's JLPT Resources**: unofficial N5–N1 level assignments;
11
+ CC BY according to the pinned OpenJLPT notice.
12
+ <https://www.tanos.co.uk/jlpt/>
13
+ - **Tatoeba**: Japanese example sentences; CC BY 2.0 FR.
14
+ <https://tatoeba.org/>
15
+
16
+ OpenJLPT and its full notice are available at
17
+ <https://github.com/evanclan/OpenJLPT/tree/c42fd9fa3777bfc1775446f7c418d549dfd6e4cf>.
18
+
19
+ Pocket Daily modifications are distributed under **CC BY-SA 4.0**:
20
+
21
+ - retained the cumulative N5, N4, and N3 kanji subset (612 unique characters);
22
+ - selected one compact representative word and Japanese example per character;
23
+ - added Korean kanji glosses, word meanings, and example translations;
24
+ - normalized the data into the fixed-record PDLP format for bounded SD reads.
25
+
26
+ The Korean adaptations are by Pocket Daily contributors. Automated assistance
27
+ was used to draft translations; field alignment, required Korean text, record
28
+ counts, byte bounds, source pinning, and package checksums are validated before
29
+ distribution. Corrections remain welcome and must be shared under CC BY-SA 4.0.
30
+
31
+ The JLPT organization does not publish an official current vocabulary or kanji
32
+ list. The level labels are therefore **unofficial N3-oriented study curation**,
33
+ not a claim about the undisclosed contents of a particular examination.
@@ -0,0 +1,27 @@
1
+ {
2
+ "learningPack": {
3
+ "id": "jp-n3-ko",
4
+ "version": 3,
5
+ "format": 1,
6
+ "size": 568324,
7
+ "md5": "34681b78b5a1d65bc787dc57e863cba7",
8
+ "licenseSpdx": "CC-BY-SA-4.0"
9
+ },
10
+ "attribution": "OpenJLPT/EDRDG/Waller/Tatoeba 기반; Pocket Daily 한국어 각색; CC BY-SA 4.0",
11
+ "sources": [
12
+ {
13
+ "name": "OpenJLPT cumulative N5-N3 dataset",
14
+ "url": "https://github.com/evanclan/OpenJLPT",
15
+ "revision": "c42fd9fa3777bfc1775446f7c418d549dfd6e4cf",
16
+ "licenseSpdx": "CC-BY-SA-4.0",
17
+ "attribution": "OpenJLPT; upstream EDRDG KANJIDIC2/JMdict, Jonathan Waller JLPT resources, and Tatoeba"
18
+ },
19
+ {
20
+ "name": "Pocket Daily Korean adaptations",
21
+ "url": "https://github.com/puritysb/pocket-daily-reader",
22
+ "revision": "pocket-ko-2026-08-29",
23
+ "licenseSpdx": "CC-BY-SA-4.0",
24
+ "attribution": "Korean meanings and translations by Pocket Daily contributors"
25
+ }
26
+ ]
27
+ }
Binary file
@@ -58,10 +58,29 @@ export declare class OpenClawAdapter extends EventEmitter implements AgentAdapte
58
58
  private apmeSessionId;
59
59
  private apmeTraceId;
60
60
  private apmeCwdHint;
61
- /** Idle-gap timer fires the `task_boundary` (idle_gap) span when the
62
- * user hasn't sent a new `chat.send` for OPENCLAW_IDLE_GAP_MS after the
63
- * last `chat.final`. Reset on every new send, cleared on session end. */
64
- private apmeIdleTimer;
61
+ /** Opens (or returns) the APME run for one Gateway session key. Supplied by
62
+ * the daemon, which owns the collector. */
63
+ private apmeRunFor;
64
+ /** Per-Gateway-session-key APME state.
65
+ *
66
+ * **Why this is keyed by session key and not by connection.** One Gateway
67
+ * connection sees every session the agent has: the chat the user is looking
68
+ * at (`agent:main:main`), each cron job (`agent:main:cron:<id>`), and one
69
+ * fresh key per model-eval run (`agent:main:eval-…__r2` — a suite opens six
70
+ * in three hours). A run scoped to the connection therefore interleaves all
71
+ * of them into one trajectory under one `model_id`, and the idle-gap
72
+ * boundary is computed across traffic from conversations that have nothing
73
+ * to do with each other. Turn ordering, per-task cost and every judge
74
+ * verdict derived from them describe a conversation that never happened.
75
+ *
76
+ * Each entry owns its own idle-gap timer for the same reason: a cron
77
+ * heartbeat firing every few minutes would otherwise keep resetting the
78
+ * timer for a user chat that ended half an hour ago, and that task would
79
+ * never close — a task that never closes is never evaluated. */
80
+ private apmeBySessionKey;
81
+ /** Idle-gap timer for frames that arrive without a session key (the
82
+ * connection-scoped fallback run). */
83
+ private apmeFallbackIdleTimer;
65
84
  /** Reconnect delay (doubles on each failure, max 30s) */
66
85
  private reconnectDelay;
67
86
  private static readonly MAX_RECONNECT_DELAY;
@@ -70,17 +89,52 @@ export declare class OpenClawAdapter extends EventEmitter implements AgentAdapte
70
89
  /** Bind the adapter to an APME session id so Gateway events can be
71
90
  * ingested as TelemetrySpans. No-op when APME isn't initialized. */
72
91
  setApmeSession(sessionId: string, cwd?: string): void;
92
+ /** Install the per-session-key run opener. The daemon owns the collector, so
93
+ * the adapter asks it for the APME session id belonging to a Gateway
94
+ * session key and caches the answer. Returning `null` (APME disabled, or
95
+ * `openRun` threw) makes that key fall back to the connection-scoped id,
96
+ * which is the pre-split behaviour rather than silence. */
97
+ setApmeRunResolver(resolve: (sessionKey: string) => string | null): void;
98
+ /** APME session ids this adapter has opened, so the daemon can close them
99
+ * all when the Gateway link drops. */
100
+ apmeSessionIds(): string[];
73
101
  /** True when this adapter pipes Gateway events into the APME collector
74
102
  * itself — the bridge must then NOT also convert its timeline entries to
75
103
  * spans, or every turn and tool would be counted twice. */
76
104
  hasDirectApmeIngestion(): boolean;
105
+ /** Resolve the APME context for a Gateway session key.
106
+ *
107
+ * A frame with no session key falls back to the connection-scoped id — that
108
+ * is what the adapter had before the split, and dropping such a frame would
109
+ * trade a mis-scoped record for no record at all. */
77
110
  private buildApmeCtx;
111
+ /** Get-or-create the per-session-key entry — WITHOUT opening its APME run.
112
+ *
113
+ * Opening the run here is what a first version did, and it manufactured
114
+ * exactly the noise this whole split exists to remove: a context is built
115
+ * for every frame, including ones that parse to zero spans, so a real
116
+ * `agent:main:main:heartbeat` key opened a run holding 0 turns, 0 steps and
117
+ * 0 events (measured on live traffic 2026-08-23). The Gateway filters
118
+ * heartbeat message pairs out of `session.message`, so such a key can emit
119
+ * frames that carry nothing to record. A run is opened on the first span
120
+ * that is actually ingested. */
121
+ private apmeEntryFor;
122
+ /** The APME session id for a key, opening its run on first use. */
123
+ private apmeSessionIdFor;
124
+ /** Ingest spans against the run belonging to `sessionKey`.
125
+ *
126
+ * The target must be re-resolved from the key, never read off
127
+ * `this.apmeSessionId` — reading that field here is what would silently
128
+ * re-collapse every per-key run back into one. Returns early on an empty
129
+ * span list so no run is opened for a frame that records nothing. */
78
130
  private ingestApmeSpans;
79
131
  /** Reset (or start) the idle-gap timer. Fires
80
132
  * `openclawIdleGapTaskBoundary` after OPENCLAW_IDLE_GAP_MS of silence
81
133
  * (no new `chat.send`) following the last `chat.final`. */
82
134
  private armIdleGapTimer;
83
135
  private clearIdleGapTimer;
136
+ /** Clear every per-key timer (shutdown). */
137
+ private clearAllIdleGapTimers;
84
138
  start(options: AdapterStartOptions & {
85
139
  externalServer?: Server;
86
140
  }): Promise<void>;
@@ -162,6 +216,22 @@ export declare class OpenClawAdapter extends EventEmitter implements AgentAdapte
162
216
  * Called when Gateway sends `connect.challenge` event with nonce.
163
217
  */
164
218
  private sendConnectRequest;
219
+ /** Join the Gateway's session event stream (`sessions.subscribe`, scope
220
+ * `operator.read`).
221
+ *
222
+ * The Gateway's recipient set for `session.message` is
223
+ * `sessionEventSubscribers ∪ sessionMessageSubscribers`, and the former is
224
+ * unioned in unconditionally — so this one no-param call delivers the
225
+ * messages of EVERY session, which is what we want: AgentDeck observes the
226
+ * whole agent, not one chat. `sessions.messages.subscribe` is the per-key
227
+ * alternative and would need a subscribe/unsubscribe cycle for every
228
+ * session key the store mints (an eval suite opens a fresh one per run), so
229
+ * it is the wrong shape here.
230
+ *
231
+ * Failure is non-fatal and stays visible: without the subscription the
232
+ * adapter degrades to exactly its previous behaviour (chat + approvals
233
+ * only), which is a smaller timeline, not a broken one. */
234
+ private subscribeSessionEvents;
165
235
  /** Fetch sessions and set the most recently updated one as active. */
166
236
  private fetchSessions;
167
237
  /** Fetch model catalog via CLI and emit events.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