dsh-better-display 0.3.8 → 0.3.10

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 (190) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/DESIGN.md +43 -3
  3. package/README.en.md +10 -2
  4. package/README.md +10 -2
  5. package/compat/harness-rc2.json +17 -13
  6. package/docs/dependency-update-policy.md +9 -0
  7. package/docs/extension-points.md +172 -0
  8. package/docs/official-rendering-bridge.md +49 -20
  9. package/docs/openapi.yaml +147 -0
  10. package/docs/runbooks/blank-reader.md +39 -0
  11. package/lib/client.js +1802 -872
  12. package/lib/client.js.map +1 -1
  13. package/lib/dsh-better-display.js +376 -151
  14. package/lib/types/client/AssistantNode.d.ts +20 -0
  15. package/lib/types/client/AssistantNode.d.ts.map +1 -0
  16. package/lib/types/client/AssistantNode.js +46 -0
  17. package/lib/types/client/AssistantNode.js.map +1 -0
  18. package/lib/types/client/Blocks.d.ts.map +1 -1
  19. package/lib/types/client/Blocks.js +33 -10
  20. package/lib/types/client/Blocks.js.map +1 -1
  21. package/lib/types/client/ChoreographedFlow.d.ts.map +1 -1
  22. package/lib/types/client/ChoreographedFlow.js +2 -0
  23. package/lib/types/client/ChoreographedFlow.js.map +1 -1
  24. package/lib/types/client/ClosedProcessSummary.d.ts.map +1 -1
  25. package/lib/types/client/ClosedProcessSummary.js +3 -1
  26. package/lib/types/client/ClosedProcessSummary.js.map +1 -1
  27. package/lib/types/client/McpAppFrame.d.ts.map +1 -1
  28. package/lib/types/client/McpAppFrame.js +5 -11
  29. package/lib/types/client/McpAppFrame.js.map +1 -1
  30. package/lib/types/client/OfficialContent.d.ts +17 -3
  31. package/lib/types/client/OfficialContent.d.ts.map +1 -1
  32. package/lib/types/client/OfficialContent.js +37 -12
  33. package/lib/types/client/OfficialContent.js.map +1 -1
  34. package/lib/types/client/Reader.d.ts.map +1 -1
  35. package/lib/types/client/Reader.js +45 -77
  36. package/lib/types/client/Reader.js.map +1 -1
  37. package/lib/types/client/SettingsSection.d.ts.map +1 -1
  38. package/lib/types/client/SettingsSection.js +0 -5
  39. package/lib/types/client/SettingsSection.js.map +1 -1
  40. package/lib/types/client/StickyLane.d.ts +12 -0
  41. package/lib/types/client/StickyLane.d.ts.map +1 -1
  42. package/lib/types/client/StickyLane.js +78 -2
  43. package/lib/types/client/StickyLane.js.map +1 -1
  44. package/lib/types/client/ToolActivity.js.map +1 -1
  45. package/lib/types/client/index.d.ts +3 -1
  46. package/lib/types/client/index.d.ts.map +1 -1
  47. package/lib/types/client/index.js +6 -0
  48. package/lib/types/client/index.js.map +1 -1
  49. package/lib/types/client/live-turn.d.ts +17 -5
  50. package/lib/types/client/live-turn.d.ts.map +1 -1
  51. package/lib/types/client/live-turn.js +106 -76
  52. package/lib/types/client/live-turn.js.map +1 -1
  53. package/lib/types/client/motion.d.ts +26 -2
  54. package/lib/types/client/motion.d.ts.map +1 -1
  55. package/lib/types/client/motion.js +136 -10
  56. package/lib/types/client/motion.js.map +1 -1
  57. package/lib/types/client/official-slots.d.ts +24 -3
  58. package/lib/types/client/official-slots.d.ts.map +1 -1
  59. package/lib/types/client/official-slots.js +59 -11
  60. package/lib/types/client/official-slots.js.map +1 -1
  61. package/lib/types/client/primitive-labels.d.ts.map +1 -1
  62. package/lib/types/client/primitive-labels.js +1 -0
  63. package/lib/types/client/primitive-labels.js.map +1 -1
  64. package/lib/types/client/projection.d.ts +15 -2
  65. package/lib/types/client/projection.d.ts.map +1 -1
  66. package/lib/types/client/projection.js +16 -4
  67. package/lib/types/client/projection.js.map +1 -1
  68. package/lib/types/client/rewind-cut.d.ts +131 -0
  69. package/lib/types/client/rewind-cut.d.ts.map +1 -0
  70. package/lib/types/client/rewind-cut.js +321 -0
  71. package/lib/types/client/rewind-cut.js.map +1 -0
  72. package/lib/types/client/text-transform.d.ts +93 -0
  73. package/lib/types/client/text-transform.d.ts.map +1 -0
  74. package/lib/types/client/text-transform.js +183 -0
  75. package/lib/types/client/text-transform.js.map +1 -0
  76. package/lib/types/client/timeline.d.ts.map +1 -1
  77. package/lib/types/client/timeline.js.map +1 -1
  78. package/lib/types/client/tool-activity.d.ts +9 -2
  79. package/lib/types/client/tool-activity.d.ts.map +1 -1
  80. package/lib/types/client/tool-activity.js +42 -2
  81. package/lib/types/client/tool-activity.js.map +1 -1
  82. package/lib/types/client/turn-slots.d.ts +29 -0
  83. package/lib/types/client/turn-slots.d.ts.map +1 -0
  84. package/lib/types/client/turn-slots.js +62 -0
  85. package/lib/types/client/turn-slots.js.map +1 -0
  86. package/lib/types/client/types.d.ts +18 -0
  87. package/lib/types/client/types.d.ts.map +1 -1
  88. package/lib/types/dsh-better-display.d.ts +4 -1
  89. package/lib/types/dsh-better-display.d.ts.map +1 -1
  90. package/lib/types/dsh-better-display.js +56 -7
  91. package/lib/types/dsh-better-display.js.map +1 -1
  92. package/lib/types/flags.d.ts +7 -0
  93. package/lib/types/flags.d.ts.map +1 -0
  94. package/lib/types/flags.js +37 -0
  95. package/lib/types/flags.js.map +1 -0
  96. package/lib/types/log.d.ts +17 -0
  97. package/lib/types/log.d.ts.map +1 -0
  98. package/lib/types/log.js +122 -0
  99. package/lib/types/log.js.map +1 -0
  100. package/lib/types/metrics.d.ts +18 -0
  101. package/lib/types/metrics.d.ts.map +1 -0
  102. package/lib/types/metrics.js +35 -0
  103. package/lib/types/metrics.js.map +1 -0
  104. package/package.json +55 -23
  105. package/scripts/changelog.mjs +20 -0
  106. package/scripts/check-agents-md.mjs +67 -0
  107. package/scripts/check-bundle-size.mjs +38 -0
  108. package/scripts/check-dead-flags.mjs +55 -0
  109. package/scripts/check-harness-compat.mjs +4 -2
  110. package/scripts/check-todo-debt.mjs +69 -0
  111. package/scripts/link-harness-dependencies.mjs +48 -11
  112. package/scripts/security-audit-report.mjs +92 -0
  113. package/scripts/verify-commentary-visible.mjs +627 -0
  114. package/src/client/AssistantNode.tsx +72 -0
  115. package/src/client/Blocks.tsx +49 -10
  116. package/src/client/ChoreographedFlow.tsx +3 -1
  117. package/src/client/ClosedProcessSummary.tsx +3 -1
  118. package/src/client/McpAppFrame.tsx +5 -13
  119. package/src/client/OfficialContent.tsx +52 -14
  120. package/src/client/Reader.module.css +68 -18
  121. package/src/client/Reader.tsx +38 -82
  122. package/src/client/SettingsSection.tsx +1 -7
  123. package/src/client/StickyLane.tsx +81 -2
  124. package/src/client/ToolActivity.tsx +1 -1
  125. package/src/client/index.tsx +8 -1
  126. package/src/client/live-turn.ts +100 -69
  127. package/src/client/motion.tsx +135 -7
  128. package/src/client/official-slots.tsx +61 -12
  129. package/src/client/primitive-labels.ts +1 -0
  130. package/src/client/projection.ts +16 -4
  131. package/src/client/rewind-cut.ts +340 -0
  132. package/src/client/text-transform.ts +265 -0
  133. package/src/client/timeline.ts +0 -2
  134. package/src/client/tool-activity.ts +49 -2
  135. package/src/client/turn-slots.ts +80 -0
  136. package/src/client/types.ts +19 -0
  137. package/src/dsh-better-display.ts +58 -7
  138. package/src/flags.ts +40 -0
  139. package/src/log.ts +137 -0
  140. package/src/metrics.ts +50 -0
  141. package/tests/browser-commentary.tsx +191 -0
  142. package/tests/browser-official-bridge.tsx +2 -1
  143. package/tests/chat-flow-hook.test.ts +1 -1
  144. package/tests/cloud-gate.test.ts +1 -1
  145. package/tests/context-tool-update.test.ts +1 -1
  146. package/tests/conversation-scroll.test.ts +1 -1
  147. package/tests/deliverables.test.ts +1 -1
  148. package/tests/entry.test.ts +1 -1
  149. package/tests/fixtures/reader-lane-owners.tsx +46 -0
  150. package/tests/fixtures/reader-official-users.tsx +64 -0
  151. package/tests/fixtures/reader-theme-overlap.html +80 -0
  152. package/tests/fixtures/reader-user-bubble.tsx +244 -0
  153. package/tests/flags.test.ts +66 -0
  154. package/tests/fold-choreography.test.ts +32 -8
  155. package/tests/fold-intensity.test.ts +11 -6
  156. package/tests/footer-precedence.test.ts +1 -1
  157. package/tests/history-word-regression.test.ts +1 -1
  158. package/tests/live-turn.test.ts +125 -54
  159. package/tests/log.test.ts +99 -0
  160. package/tests/mcp-apps.test.ts +1 -1
  161. package/tests/message-chrome.test.ts +1 -1
  162. package/tests/metrics.test.ts +52 -0
  163. package/tests/official-slots.test.ts +41 -2
  164. package/tests/open-file.test.ts +1 -1
  165. package/tests/pending-submission.test.ts +12 -1
  166. package/tests/pinned-selection.test.ts +16 -0
  167. package/tests/platform-media.test.ts +1 -1
  168. package/tests/projection.test.ts +66 -3
  169. package/tests/reader-glass-css.test.ts +1 -1
  170. package/tests/reader-official-users.test.ts +11 -1
  171. package/tests/reader-sticky-surface.test.ts +377 -0
  172. package/tests/reader-theme-lanes.test.ts +54 -0
  173. package/tests/reader-theme-overlap.test.ts +151 -0
  174. package/tests/reader-user-bubble.test.ts +138 -0
  175. package/tests/reasoning-follow.test.ts +1 -1
  176. package/tests/retiring-content.test.ts +98 -6
  177. package/tests/reveal.test.ts +3 -3
  178. package/tests/rewind-cut.test.ts +1090 -0
  179. package/tests/settings-copy.test.ts +1 -1
  180. package/tests/skill-status.test.ts +1 -1
  181. package/tests/stock-install.test.ts +11 -7
  182. package/tests/stream-buffer.test.ts +1 -1
  183. package/tests/styles.test.ts +30 -3
  184. package/tests/terminal-input-preview.test.ts +1 -1
  185. package/tests/text-transform.test.ts +272 -0
  186. package/tests/timeline.test.ts +1 -1
  187. package/tests/tool-clock.test.ts +1 -1
  188. package/tests/tool-diff.test.ts +1 -1
  189. package/tests/waiting-clock.test.ts +1 -1
  190. package/tests/word-timeline.test.ts +1 -1
@@ -0,0 +1,147 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: dsh-better-display
4
+ version: 0.3.9
5
+ description: >
6
+ Exact routes registered by apply() in src/dsh-better-display.ts.
7
+ POST /better-display/reveal is createRevealHandler in src/reveal.ts.
8
+ GET /better-display/skill-status returns toPublicSkillStatus.
9
+ The host webServer mounts these paths. The handlers do not read an
10
+ Authorization header or any other credential.
11
+ servers:
12
+ - url: /
13
+ description: DeepSeek Harness host after this plugin has loaded.
14
+ paths:
15
+ /better-display/reveal:
16
+ post:
17
+ operationId: revealInFileManager
18
+ summary: Reveal a workspace file in the OS file manager
19
+ description: >
20
+ Any method other than POST returns 405 with an empty body and no
21
+ Content-Type. The JSON body is read to completion, then parsed.
22
+ An absolute path is used as-is and does not call the workspace root
23
+ lookup. A relative path must resolve to exactly one existing file
24
+ under the session cwd or the matching workspace registry roots.
25
+ Drive-relative and root-relative Windows paths are rejected.
26
+ On success the host spawns open -R, explorer.exe /select, or xdg-open.
27
+ requestBody:
28
+ required: true
29
+ content:
30
+ application/json:
31
+ schema:
32
+ type: object
33
+ required: [path]
34
+ properties:
35
+ path:
36
+ type: string
37
+ description: Trimmed. Empty or whitespace-only is 400.
38
+ sessionId:
39
+ type: string
40
+ description: Optional. Used only when path is not absolute.
41
+ examples:
42
+ relative:
43
+ value:
44
+ path: docs/report.md
45
+ sessionId: target
46
+ responses:
47
+ '200':
48
+ description: The file manager was spawned. Body is JSON.
49
+ content:
50
+ application/json:
51
+ schema:
52
+ type: object
53
+ required: [ok]
54
+ additionalProperties: false
55
+ properties:
56
+ ok:
57
+ type: boolean
58
+ enum: [true]
59
+ '400':
60
+ description: >
61
+ JSON.parse failed, path was empty, the path was not
62
+ workspace-relative, no root contained the file, or more than one
63
+ root contained it. error is String(err), so it includes the
64
+ Error prefix.
65
+ content:
66
+ application/json:
67
+ schema:
68
+ $ref: '#/components/schemas/ErrorBody'
69
+ '405':
70
+ description: req.method was not POST. Empty body. Content-Type is not set.
71
+ /better-display/skill-status:
72
+ get:
73
+ operationId: getGenerativeMcpappsSkillStatus
74
+ summary: Public generative-mcpapps install status
75
+ description: >
76
+ Any method other than GET returns 405 with an empty body and no
77
+ Content-Type. The optional cwd query selects which project roots are
78
+ scanned. The JSON body is toPublicSkillStatus, which always replaces
79
+ roots with the two conventional relative paths and drops packPath
80
+ and any host home absolute path.
81
+ parameters:
82
+ - in: query
83
+ name: cwd
84
+ required: false
85
+ schema:
86
+ type: string
87
+ description: Project directory passed to scanGenerativeMcpappsStatus. Omitted when the settings probe has no session cwd.
88
+ responses:
89
+ '200':
90
+ description: Public skill status. This body has no ok field.
91
+ content:
92
+ application/json:
93
+ schema:
94
+ $ref: '#/components/schemas/PublicSkillStatus'
95
+ '405':
96
+ description: req.method was not GET. Empty body. Content-Type is not set.
97
+ '500':
98
+ description: scanGenerativeMcpappsStatus threw. error is String(err).
99
+ content:
100
+ application/json:
101
+ schema:
102
+ $ref: '#/components/schemas/ErrorBody'
103
+ components:
104
+ schemas:
105
+ ErrorBody:
106
+ type: object
107
+ required: [ok, error]
108
+ additionalProperties: false
109
+ properties:
110
+ ok:
111
+ type: boolean
112
+ enum: [false]
113
+ error:
114
+ type: string
115
+ PublicSkillRoot:
116
+ type: object
117
+ required: [source, path]
118
+ additionalProperties: false
119
+ properties:
120
+ source:
121
+ type: string
122
+ enum: [conventional]
123
+ path:
124
+ type: string
125
+ enum: ['.dsh/skills', '.agents/skills']
126
+ PublicSkillStatus:
127
+ type: object
128
+ required: [name, installed, via, roots]
129
+ additionalProperties: false
130
+ properties:
131
+ name:
132
+ type: string
133
+ enum: [generative-mcpapps]
134
+ installed:
135
+ type: boolean
136
+ via:
137
+ type: string
138
+ nullable: true
139
+ enum: ['skills.list', 'skill-root', null]
140
+ description: skills.list when the host skills registry lists the skill, skill-root when a scanned root has it, otherwise null.
141
+ roots:
142
+ type: array
143
+ minItems: 2
144
+ maxItems: 2
145
+ items:
146
+ $ref: '#/components/schemas/PublicSkillRoot'
147
+ description: Always .dsh/skills then .agents/skills, source conventional. Not the scanned absolute roots.
@@ -0,0 +1,39 @@
1
+ # Blank reader, missing stylesheet, stuck fold
2
+
3
+ These three show up in CHANGELOG as real failures. There is no dashboard to open. Look at the host page and the versions below.
4
+
5
+ ## Blank reader
6
+
7
+ 0.3.8 (#60) re-injects the plugin stylesheet when a session switch clears it, because that clear left a blank page. `ensureStyles` in `src/client/styles.ts` remembers `style[data-plugin="dsh-better-display"][data-plugin-css]` and puts a missing tag back on `document.head`. The client entry calls it while the module loads (`src/client/index.tsx`), and `Reader` calls it again from `useInsertionEffect` before paint.
8
+
9
+ A page that never becomes the reading view is a different failure. 0.3.1 threw while booting because `conversation.chat.turnTail` had become a list slot, and the host stayed on “Failed to load plugins”. 0.3.7 shipped a host entry that imported `./skill-roots.ts`; the host died with `ERR_MODULE_NOT_FOUND` while the market still showed the plugin installed. 0.3.8 stops externalising those relative host imports. Reinstalling the broken 0.3.7 build does not fix that.
10
+
11
+ Check, in order:
12
+
13
+ 1. Reopen the Web Host and reload. The bundle is read at boot.
14
+ 2. If the host says “Failed to load plugins”, read that error. Do not toggle auto-fold. A slot mismatch or `ERR_MODULE_NOT_FOUND ./skill-roots.ts` means the installed build never reached `Reader`.
15
+ 3. In the document, look for `style[data-plugin="dsh-better-display"]`. If the reading column is mounted and those tags are missing, the stylesheet was cleared before `ensureStyles` had stored it. Reload so the client entry runs again.
16
+
17
+ ## Missing stylesheet
18
+
19
+ The same 0.3.8 note (#60) is the stylesheet case: the session switch removes the plugin style tags, the reading column is still there, and it paints without the reader sheet. `ensureStyles` can only restore tags it has already seen. If `document.head` has no `data-plugin-css` node for this plugin and the in-memory map is empty, there is nothing to put back until the entry runs again.
20
+
21
+ Confirm the host did not mount the plugin twice. A hand-written `cordis.patch.yml` insert plus `dsh plugin add` loads two copies. Reload after a single install. Do not add a second stylesheet link.
22
+
23
+ ## Stuck fold
24
+
25
+ 0.2.0: the fold choreography advanced only on animation promises and rendered frames. A cancelled animation rejects, and a hidden tab delivers no frames. The machine stayed in a non-idle phase, the frame source stayed on the shown snapshot, and the text reveal paused, so the turn looked stuck until the view remounted. Each phase now has a wall-clock deadline. In `src/client/fold-choreography.ts`, `watchdogSlack` is 240ms added to the phase duration (`collapse` 320, `count` 160, `settle` 80, `reveal` 180). `ChoreographedFlow` fires that deadline with `setTimeout` and moves the phase even when `onfinish` never runs.
26
+
27
+ The same release gave disclosures a deadline. `fill: 'both'` pins the opening keyframe, so a Web Animation that never reaches `onfinish` left the row at zero height and zero opacity. A click looked like nothing happened. Later deadlines in `motion.tsx` and `ReasoningCard.tsx` use the same 240ms slack on top of the animation length.
28
+
29
+ 0.3.5: a finished expand animation has to release back to the row’s natural height. Content that changed after expanding left blank space or clipped steps until refresh. The collapse animation stays until React removes the content, so it does not flash for one frame.
30
+
31
+ 0.3.8 (#60) adds a timeout fallback for retiring content animations so they complete instead of holding the row.
32
+
33
+ 0.3.0: turning auto-fold off, opening process detail, then turning it on again used to leave the process expanded. Turning it on restores the auto-fold rules. Text selection protection and a later manual expand still win. The switch is on the reading toolbar and in Settings. The root store key is `dsh.reader.v1`; `foldIntensity` 0 is off, 1 is the default fold, 2 folds process runs into a digest and does not fold prose.
34
+
35
+ Check, in order:
36
+
37
+ 1. Settings shows auto-fold on. Off means thinking and tools stay expanded. That is not a stuck animation.
38
+ 2. Wait out the phase plus 240ms. A row still at zero height after that should have been settled by the deadline. Reload the reading view once. The pre-0.2.0 recovery was a remount, and a deadline that did not run is the bug to report.
39
+ 3. Say whether the tab was in the background and whether `prefers-reduced-motion` is set. Do not restyle `Reader` to force the row open.