@deepseek-harness-tui/dsh-tui 0.8.5 → 0.8.6

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 (175) hide show
  1. package/bin/dsh-tui.js +0 -0
  2. package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -13
  3. package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -59
  4. package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -15
  5. package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -32
  6. package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -59
  7. package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -166
  8. package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -42
  9. package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -143
  10. package/dsh-ecosystem-spec/registry/README.md +14 -14
  11. package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -56
  12. package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -13
  13. package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -149
  14. package/lib/types/cc/figures.d.ts +7 -0
  15. package/lib/types/cc/figures.d.ts.map +1 -1
  16. package/lib/types/cc/figures.js +23 -0
  17. package/lib/types/cc/markdown.d.ts.map +1 -1
  18. package/lib/types/cc/markdown.js +47 -14
  19. package/lib/types/cc/syntaxTheme.d.ts +12 -0
  20. package/lib/types/cc/syntaxTheme.d.ts.map +1 -0
  21. package/lib/types/cc/syntaxTheme.js +76 -0
  22. package/lib/types/components/EffortChargeGlyph.d.ts +26 -0
  23. package/lib/types/components/EffortChargeGlyph.d.ts.map +1 -0
  24. package/lib/types/components/EffortChargeGlyph.js +70 -0
  25. package/lib/types/components/EffortInputBorder.d.ts +36 -0
  26. package/lib/types/components/EffortInputBorder.d.ts.map +1 -0
  27. package/lib/types/components/EffortInputBorder.js +73 -0
  28. package/lib/types/components/EffortTierBadge.d.ts +26 -0
  29. package/lib/types/components/EffortTierBadge.d.ts.map +1 -0
  30. package/lib/types/components/EffortTierBadge.js +97 -0
  31. package/lib/types/components/LoadedContextPanel.js +1 -1
  32. package/lib/types/components/MessageList.d.ts.map +1 -1
  33. package/lib/types/components/MessageList.js +5 -7
  34. package/lib/types/components/PromptInput.d.ts.map +1 -1
  35. package/lib/types/components/PromptInput.js +8 -3
  36. package/lib/types/components/SplitDiffView.d.ts +1 -4
  37. package/lib/types/components/SplitDiffView.d.ts.map +1 -1
  38. package/lib/types/components/SplitDiffView.js +6 -60
  39. package/lib/types/components/StreamingMarkdown.js +1 -1
  40. package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -1
  41. package/lib/types/components/design-system/ThemedBox.js +4 -1
  42. package/lib/types/components/design-system/ThemedText.js +2 -2
  43. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +12 -6
  44. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
  45. package/lib/types/components/messages/AssistantThinkingMessage.js +25 -9
  46. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  47. package/lib/types/components/messages/AssistantToolUseMessage.js +35 -18
  48. package/lib/types/components/messages/UserPromptMessage.d.ts +4 -6
  49. package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
  50. package/lib/types/components/messages/UserPromptMessage.js +5 -9
  51. package/lib/types/dsh-adapter/channel.d.ts +5 -0
  52. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  53. package/lib/types/dsh-adapter/channel.js +43 -0
  54. package/lib/types/screens/Chat.js +1 -2
  55. package/lib/types/theme.d.ts +12 -0
  56. package/lib/types/theme.d.ts.map +1 -1
  57. package/lib/types/theme.js +51 -21
  58. package/lib/types/trajectory/effortIgnition.d.ts +66 -0
  59. package/lib/types/trajectory/effortIgnition.d.ts.map +1 -0
  60. package/lib/types/trajectory/effortIgnition.js +142 -0
  61. package/node_modules/@dsh-std/command/CHANGELOG.md +8 -8
  62. package/node_modules/@dsh-std/command/LICENSE +21 -21
  63. package/node_modules/@dsh-std/command/README.md +26 -26
  64. package/node_modules/@dsh-std/command/README.zh.md +28 -28
  65. package/node_modules/@dsh-std/command/lib/index.js.map +1 -1
  66. package/node_modules/@dsh-std/command/package.json +22 -22
  67. package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  68. package/node_modules/@dsh-std/connection/LICENSE +21 -21
  69. package/node_modules/@dsh-std/connection/README.md +42 -42
  70. package/node_modules/@dsh-std/connection/README.zh.md +42 -42
  71. package/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  72. package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  73. package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  74. package/node_modules/@dsh-std/connection/package.json +20 -20
  75. package/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  76. package/node_modules/@dsh-std/core/LICENSE +21 -21
  77. package/node_modules/@dsh-std/core/README.md +13 -13
  78. package/node_modules/@dsh-std/core/README.zh.md +13 -13
  79. package/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  80. package/node_modules/@dsh-std/core/package.json +21 -21
  81. package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
  82. package/node_modules/@dsh-std/manifest/LICENSE +21 -21
  83. package/node_modules/@dsh-std/manifest/README.md +5 -5
  84. package/node_modules/@dsh-std/manifest/README.zh.md +5 -5
  85. package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
  86. package/node_modules/@dsh-std/manifest/package.json +20 -20
  87. package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
  88. package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -8
  89. package/node_modules/@dsh-std/messages/LICENSE +21 -21
  90. package/node_modules/@dsh-std/messages/README.md +5 -5
  91. package/node_modules/@dsh-std/messages/README.zh.md +7 -7
  92. package/node_modules/@dsh-std/messages/lib/index.js.map +1 -1
  93. package/node_modules/@dsh-std/messages/package.json +20 -20
  94. package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -54
  95. package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
  96. package/node_modules/@dsh-std/presentation/LICENSE +21 -21
  97. package/node_modules/@dsh-std/presentation/README.md +27 -27
  98. package/node_modules/@dsh-std/presentation/README.zh.md +29 -29
  99. package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
  100. package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
  101. package/node_modules/@dsh-std/presentation/package.json +25 -25
  102. package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -8
  103. package/node_modules/@dsh-std/storage/LICENSE +21 -21
  104. package/node_modules/@dsh-std/storage/README.md +5 -5
  105. package/node_modules/@dsh-std/storage/README.zh.md +7 -7
  106. package/node_modules/@dsh-std/storage/lib/index.js.map +1 -1
  107. package/node_modules/@dsh-std/storage/package.json +20 -20
  108. package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -56
  109. package/package.json +1 -1
  110. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  111. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -21
  112. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -42
  113. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -42
  114. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  115. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  116. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  117. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -20
  118. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  119. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -21
  120. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -13
  121. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -13
  122. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  123. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -21
  124. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
  125. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -21
  126. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -5
  127. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -5
  128. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
  129. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -20
  130. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
  131. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
  132. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -21
  133. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -27
  134. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -29
  135. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
  136. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
  137. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -25
  138. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  139. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -21
  140. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -13
  141. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -13
  142. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  143. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -21
  144. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  145. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -21
  146. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -13
  147. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -13
  148. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  149. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -21
  150. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  151. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -21
  152. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -13
  153. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -13
  154. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  155. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -21
  156. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  157. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -21
  158. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -42
  159. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -42
  160. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  161. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  162. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  163. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -20
  164. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  165. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -21
  166. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -13
  167. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -13
  168. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  169. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -21
  170. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  171. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -21
  172. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -13
  173. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -13
  174. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  175. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -21
@@ -58,6 +58,8 @@ const darkTheme = {
58
58
  autoAccept: rgb('#B3A0D4'), // Soft violet
59
59
  bashBorder: rgb('#D194AE'), // Mist rose
60
60
  claude: rgb('#7DA1DE'), // Accent Soft — mist brand blue
61
+ toolNameMutate: rgb('#E5C07B'), // soft gold — Edit/Write (warm accent)
62
+ toolNameExec: rgb('#56B6C2'), // mist cyan — Bash/exec tools
61
63
  claudeShimmer: rgb('#ABC2EC'), // Border Blue for shimmer effect
62
64
  claudeBlue_FOR_SYSTEM_SPINNER: rgb('#7DA1DE'),
63
65
  claudeBlueShimmer_FOR_SYSTEM_SPINNER: rgb('#ABC2EC'),
@@ -93,16 +95,16 @@ const darkTheme = {
93
95
  toolDotWrite: rgb('#B3A0D4'), // soft violet — edit/write
94
96
  toolDotWeb: rgb('#7DA1DE'), // mist blue — web search/fetch
95
97
  toolDotTask: rgb('#D194AE'), // mist rose — subagent/jobs
96
- syntaxKeyword: rgb('#8FA8E8'), // mist blue
97
- syntaxString: rgb('#9FBF8F'), // soft sage
98
+ syntaxKeyword: rgb('#82AAFF'), // vivid blue (theme anchor)
99
+ syntaxString: rgb('#E5C07B'), // gold - echoes the user-message gold accent
98
100
  syntaxComment: rgb('#6B7280'), // neutral grey
99
- syntaxNumber: rgb('#D9A97E'), // warm tan
100
- syntaxFunction: rgb('#82B8C7'), // cyan blue
101
- syntaxType: rgb('#B39DDB'), // soft violet
101
+ syntaxNumber: rgb('#D19A66'), // warm orange
102
+ syntaxFunction: rgb('#56B6C2'), // vivid cyan
103
+ syntaxType: rgb('#C678DD'), // vivid violet
102
104
  syntaxVariable: rgb('#C9D1D9'), // near-text
103
105
  syntaxOperator: rgb('#93A1B0'), // blue grey
104
106
  syntaxPunctuation: rgb('#7A8694'), // dim blue grey
105
- syntaxConstant: rgb('#D98C9B'), // soft rose
107
+ syntaxConstant: rgb('#E48A9B'), // soft rose
106
108
  red_FOR_SUBAGENTS_ONLY: rgb('#D4685E'),
107
109
  blue_FOR_SUBAGENTS_ONLY: rgb('#7496D6'),
108
110
  green_FOR_SUBAGENTS_ONLY: rgb('#66B285'),
@@ -115,8 +117,8 @@ const darkTheme = {
115
117
  chromeYellow: rgb('#D8B270'),
116
118
  clawd_body: rgb('#D98A63'), // Warm mascot orange
117
119
  clawd_background: rgb('#000000'),
118
- userMessageBackground: rgb('#292D36'),
119
- userMessageBackgroundHover: rgb('#343945'),
120
+ userMessageBackground: '', // user turn: no fill, gold bold text only (Kimi style)
121
+ userMessageBackgroundHover: rgb('#3B5BDB'), // hover/expand: blue block with gold text
120
122
  messageActionsBackground: rgb('#2E333D'),
121
123
  selectionBg: rgb('#3B4A66'), // Mist-blue tint on dark
122
124
  bashMessageBackgroundColor: rgb('#2C3038'),
@@ -125,7 +127,7 @@ const darkTheme = {
125
127
  rate_limit_empty: rgb('#3C414B'),
126
128
  fastMode: rgb('#E09A58'),
127
129
  fastModeShimmer: rgb('#EAB478'),
128
- briefLabelYou: rgb('#ABC2EC'),
130
+ briefLabelYou: rgb('#FFDF80'),
129
131
  briefLabelClaude: rgb('#7DA1DE'),
130
132
  rainbow_red: rgb('#D98F8A'),
131
133
  rainbow_orange: rgb('#D9A97E'),
@@ -152,6 +154,8 @@ const lightTheme = {
152
154
  autoAccept: rgb('#9B86B8'), // Muted violet (from surface-alt pink-mist)
153
155
  bashBorder: rgb('#C07A93'), // Muted rose (from surface-alt pink-mist)
154
156
  claude: rgb('#3F6CC4'), // Primary Blue — brand
157
+ toolNameMutate: rgb('#8A6A00'), // deep gold - Edit/Write (warm accent)
158
+ toolNameExec: rgb('#0F7A8A'), // deep cyan - Bash/exec tools
155
159
  claudeShimmer: rgb('#5E88CC'), // Accent Blue for shimmer effect
156
160
  claudeBlue_FOR_SYSTEM_SPINNER: rgb('#3F6CC4'),
157
161
  claudeBlueShimmer_FOR_SYSTEM_SPINNER: rgb('#5E88CC'),
@@ -187,16 +191,16 @@ const lightTheme = {
187
191
  toolDotWrite: rgb('#7A5CA8'),
188
192
  toolDotWeb: rgb('#4A63A8'),
189
193
  toolDotTask: rgb('#B04A5A'),
190
- syntaxKeyword: rgb('#4A63A8'),
191
- syntaxString: rgb('#4E7A4E'),
194
+ syntaxKeyword: rgb('#2557C7'),
195
+ syntaxString: rgb('#8A6A00'),
192
196
  syntaxComment: rgb('#8A8F98'),
193
- syntaxNumber: rgb('#A96B32'),
194
- syntaxFunction: rgb('#3F7E8F'),
195
- syntaxType: rgb('#7A5CA8'),
197
+ syntaxNumber: rgb('#B25E1E'),
198
+ syntaxFunction: rgb('#0F7A8A'),
199
+ syntaxType: rgb('#8A3FC7'),
196
200
  syntaxVariable: rgb('#343945'),
197
201
  syntaxOperator: rgb('#5B6672'),
198
202
  syntaxPunctuation: rgb('#9AA0A8'),
199
- syntaxConstant: rgb('#B04A5A'),
203
+ syntaxConstant: rgb('#C2186B'),
200
204
  red_FOR_SUBAGENTS_ONLY: rgb('#BE5A52'),
201
205
  blue_FOR_SUBAGENTS_ONLY: rgb('#3F6CC4'),
202
206
  green_FOR_SUBAGENTS_ONLY: rgb('#4E9675'),
@@ -209,8 +213,8 @@ const lightTheme = {
209
213
  chromeYellow: rgb('#C99A3F'),
210
214
  clawd_body: rgb('#D98A63'), // Warm mascot orange
211
215
  clawd_background: rgb('#F6F3ED'),
212
- userMessageBackground: rgb('#EEE5D2'), // Surface
213
- userMessageBackgroundHover: rgb('#E4D9E5'), // Surface Alt
216
+ userMessageBackground: '', // user turn: no fill in light mode, gold text only
217
+ userMessageBackgroundHover: rgb('#DCE4FB'), // subtle blue tint on hover/expand
214
218
  messageActionsBackground: rgb('#E4D9E5'),
215
219
  selectionBg: rgb('#D5DEF2'), // Mist-blue tint on warm white
216
220
  bashMessageBackgroundColor: rgb('#EAE1D3'),
@@ -219,7 +223,7 @@ const lightTheme = {
219
223
  rate_limit_empty: rgb('#DDD5C7'),
220
224
  fastMode: rgb('#D98E4A'),
221
225
  fastModeShimmer: rgb('#E2A465'),
222
- briefLabelYou: rgb('#5E88CC'),
226
+ briefLabelYou: rgb('#A67600'),
223
227
  briefLabelClaude: rgb('#3F6CC4'),
224
228
  rainbow_red: rgb('#D98888'),
225
229
  rainbow_orange: rgb('#D9A276'),
@@ -248,6 +252,8 @@ const darkAnsiTheme = {
248
252
  autoAccept: 'ansi:magentaBright',
249
253
  bashBorder: 'ansi:magentaBright',
250
254
  claude: 'ansi:blueBright',
255
+ toolNameMutate: 'ansi:yellowBright',
256
+ toolNameExec: 'ansi:cyanBright',
251
257
  claudeShimmer: 'ansi:blueBright',
252
258
  claudeBlue_FOR_SYSTEM_SPINNER: 'ansi:blueBright',
253
259
  claudeBlueShimmer_FOR_SYSTEM_SPINNER: 'ansi:blueBright',
@@ -305,8 +311,8 @@ const darkAnsiTheme = {
305
311
  chromeYellow: 'ansi:yellowBright',
306
312
  clawd_body: 'ansi:redBright',
307
313
  clawd_background: 'ansi:black',
308
- userMessageBackground: 'ansi:blackBright',
309
- userMessageBackgroundHover: 'ansi:white',
314
+ userMessageBackground: '',
315
+ userMessageBackgroundHover: 'ansi:blue',
310
316
  messageActionsBackground: 'ansi:blackBright',
311
317
  selectionBg: 'ansi:blue',
312
318
  bashMessageBackgroundColor: 'ansi:black',
@@ -315,7 +321,7 @@ const darkAnsiTheme = {
315
321
  rate_limit_empty: 'ansi:white',
316
322
  fastMode: 'ansi:redBright',
317
323
  fastModeShimmer: 'ansi:redBright',
318
- briefLabelYou: 'ansi:blueBright',
324
+ briefLabelYou: 'ansi:yellowBright',
319
325
  briefLabelClaude: 'ansi:blueBright',
320
326
  rainbow_red: 'ansi:red',
321
327
  rainbow_orange: 'ansi:redBright',
@@ -363,6 +369,30 @@ export function getTheme(themeName) {
363
369
  * (markdown inline code) resolves user themes through getActiveTheme().
364
370
  */
365
371
  let customThemeResolver;
372
+ /**
373
+ * Whether the active theme's RESOLVED palette renders on a light background.
374
+ * Keyed off the resolved palette's IDENTITY for the built-ins (auto resolves
375
+ * to the shared light/dark instance, so this covers auto-with-light-terminal
376
+ * that theme-NAME comparisons miss) and off the ink-text luminance for
377
+ * custom themes (light palettes pair with dark ink). The palette's
378
+ * `background` field is a badge fill, not the terminal background — never a
379
+ * lightness signal. Colour-pair variants (effort ignition hues) consume this.
380
+ */
381
+ export function isLightThemeActive(themeName) {
382
+ const theme = getTheme(themeName);
383
+ if (theme === lightTheme)
384
+ return true;
385
+ if (theme === darkTheme || theme === darkAnsiTheme)
386
+ return false;
387
+ // 自定义主题:按文本墨色亮度判定——浅底配深墨(ink)、深底配亮墨。
388
+ // 调色板的 background 字段是徽标填充色而非终端背景,不能作判据。
389
+ const ink = theme.text;
390
+ const rgb = /^rgb\((\d+),(\d+),(\d+)\)$/.exec(ink);
391
+ if (rgb === null)
392
+ return false;
393
+ const [r, g, b] = [Number(rgb[1]), Number(rgb[2]), Number(rgb[3])];
394
+ return 0.299 * r + 0.587 * g + 0.114 * b < 140;
395
+ }
366
396
  /**
367
397
  * Register the custom-theme resolver. Called once by ThemeProvider; the
368
398
  * resolver must return `undefined` for names it does not know so getTheme
@@ -0,0 +1,66 @@
1
+ /** 三幕时间轴(ms):扫光全长、字样启动(波至中段)、字样渐亮、渐隐起止。边框扫光与输入行字样徽标共用。 */
2
+ export declare const IGNITION_TIMELINE: {
3
+ readonly sweepMs: 1000;
4
+ readonly labelStartMs: 600;
5
+ readonly labelBrightenMs: 160;
6
+ readonly fadeStartMs: 1500;
7
+ readonly fadeEndMs: 2000;
8
+ };
9
+ /**
10
+ * Effort ignition motion math — pure functions, zero dependencies.
11
+ *
12
+ * Waveform semantics ported from Codex CLI's effort_ignition(_styles).rs
13
+ * (openai/codex PR #34365) and revalidated in a dsh-TUI integration: a
14
+ * cosine-bell travelling wave produces per-column colours only — a renderer
15
+ * that keeps glyphs constant and changes colours per frame stays SGR-only
16
+ * by construction.
17
+ *
18
+ * Consumers ride the FOREGROUND channel (a constant block glyph under a
19
+ * varying fg colour): pure-background cells never reached the terminal in
20
+ * the fullscreen log-update pipeline, while foreground is the channel every
21
+ * live element already rides.
22
+ */
23
+ import type { RGBColor } from '../components/Spinner/spinnerUtils.js';
24
+ /** 扫光全长(ms),仅用于把墙钟时间折算成动画秒数,不创建任何定时器。 */
25
+ export declare const SWEEP_TOTAL_MS = 1000;
26
+ export declare function ignitionHues(onLight: boolean): readonly [RGBColor, RGBColor, RGBColor];
27
+ /**
28
+ * 充能色对(前缀强调用):从带底色调暗端到全值,与波共用 hues[0]。
29
+ */
30
+ export declare function accentRamp(onLight: boolean): {
31
+ dim: RGBColor;
32
+ full: RGBColor;
33
+ };
34
+ /** 余弦钟形:`crest(0)=1`、`crest(±1)=0`、之外为 0(负距离同样静默——
35
+ * 现有调用方都传 `Math.abs`,这里兜底防未来调用方拿到全强度)。 */
36
+ export declare function crest(distance: number): number;
37
+ /** ease-out cubic:`1-(1-p)³`,两端 clamp。 */
38
+ export declare function easeOutCubic(progress: number): number;
39
+ /** ease-in-out cubic:前半 `4p³`、后半镜像,两端 clamp。 */
40
+ export declare function easeInOutCubic(progress: number): number;
41
+ /** 线性混色(t=0 → a,t=1 → b,不 clamp)。 */
42
+ export declare function blend(a: RGBColor, b: RGBColor, t: number): RGBColor;
43
+ /**
44
+ * 扫光某一时刻的整行颜色。
45
+ *
46
+ * @param options.elapsedMs - 距触发的时间;达到 {@link SWEEP_TOTAL_MS}
47
+ * 后整行返回空数组(无波,行恢复本底)。
48
+ * @param options.width - 行列数(终端宽)。
49
+ * @param options.onLight - 浅色主题时用浅底色板与浅带底色。
50
+ * @returns 逐列颜色(`rgb(r,g,b)` 字符串);无波的列为 `undefined`,
51
+ * 渲染层应输出本底色,保持行宽恒定。
52
+ */
53
+ export declare function ignitionLineColors(options: {
54
+ elapsedMs: number;
55
+ width: number;
56
+ onLight: boolean;
57
+ }): ReadonlyArray<string | undefined>;
58
+ /**
59
+ * 顶档切入判定:从「已有档位」变为「另一档位」且新档位是档位表末位
60
+ * 最高档。冷启动恢复偏好、单档表、档位表未知都不触发。
61
+ */
62
+ export declare function entersTopTier(previous: string | undefined, current: string | undefined, levels: readonly string[] | undefined): boolean;
63
+ /** 充能时长(ms)与充能进度(钳 [0,1],负 elapsed 钳 0)。 */
64
+ export declare const CHARGE_MS = 150;
65
+ export declare function chargeProgress(elapsedMs: number): number;
66
+ //# sourceMappingURL=effortIgnition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effortIgnition.d.ts","sourceRoot":"","sources":["../../../src/trajectory/effortIgnition.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,eAAO,MAAM,iBAAiB;;;;;;CAMpB,CAAA;AAEV;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAA;AAGrE,yCAAyC;AACzC,eAAO,MAAM,cAAc,OAAO,CAAA;AA8BlC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAEtF;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG;IAAE,GAAG,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAG9E;AAED;0CAC0C;AAC1C,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED,0CAA0C;AAC1C,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED,gDAAgD;AAChD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKvD;AAaD,qCAAqC;AACrC,wBAAgB,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ,CAMnE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,CA0BpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACpC,OAAO,CAST;AAED,4CAA4C;AAC5C,eAAO,MAAM,SAAS,MAAM,CAAA;AAE5B,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGxD"}
@@ -0,0 +1,142 @@
1
+ /** 三幕时间轴(ms):扫光全长、字样启动(波至中段)、字样渐亮、渐隐起止。边框扫光与输入行字样徽标共用。 */
2
+ export const IGNITION_TIMELINE = {
3
+ sweepMs: 1000,
4
+ labelStartMs: 600,
5
+ labelBrightenMs: 160,
6
+ fadeStartMs: 1500,
7
+ fadeEndMs: 2000,
8
+ };
9
+ import { rgbString } from './motion.js';
10
+ /** 扫光全长(ms),仅用于把墙钟时间折算成动画秒数,不创建任何定时器。 */
11
+ export const SWEEP_TOTAL_MS = 1000;
12
+ /** 波形宽度参数(列)。 */
13
+ const WAVE_HALF_WIDTH = 14;
14
+ /** 波形参数:`[launch, travel]`(秒)——扫光在何时启动、多久行至右缘。 */
15
+ const BAND = [0.1, 0.75];
16
+ /**
17
+ * 高亮彩色色板:亮蓝/亮青/亮紫三 hue(浅色背景用加深变体——浅底上
18
+ * 亮色没有对比度)。波只点亮 hues[0],前两个 hue 留给未来的多带风格。
19
+ */
20
+ const HUES_DARK = [
21
+ { r: 130, g: 185, b: 255 },
22
+ { r: 140, g: 252, b: 248 },
23
+ { r: 195, g: 172, b: 255 },
24
+ ];
25
+ const HUES_LIGHT = [
26
+ { r: 30, g: 95, b: 235 },
27
+ { r: 10, g: 160, b: 200 },
28
+ { r: 120, g: 80, b: 235 },
29
+ ];
30
+ /**
31
+ * 带底色(波向终端本底淡入的目标色)。近似值:取主题深/浅背景的典
32
+ * 型值而非逐主题读取——波只存活一秒,色差在低 alpha 下不可辨。
33
+ */
34
+ const BAND_DARK = { r: 27, g: 30, b: 40 };
35
+ const BAND_LIGHT = { r: 240, g: 240, b: 242 };
36
+ export function ignitionHues(onLight) {
37
+ return onLight ? HUES_LIGHT : HUES_DARK;
38
+ }
39
+ /**
40
+ * 充能色对(前缀强调用):从带底色调暗端到全值,与波共用 hues[0]。
41
+ */
42
+ export function accentRamp(onLight) {
43
+ const band = onLight ? BAND_LIGHT : BAND_DARK;
44
+ return { dim: blend(band, ignitionHues(onLight)[0], 0.45), full: ignitionHues(onLight)[0] };
45
+ }
46
+ /** 余弦钟形:`crest(0)=1`、`crest(±1)=0`、之外为 0(负距离同样静默——
47
+ * 现有调用方都传 `Math.abs`,这里兜底防未来调用方拿到全强度)。 */
48
+ export function crest(distance) {
49
+ if (distance >= 1 || distance <= -1)
50
+ return 0;
51
+ return 0.5 * (1 + Math.cos(Math.PI * distance));
52
+ }
53
+ /** ease-out cubic:`1-(1-p)³`,两端 clamp。 */
54
+ export function easeOutCubic(progress) {
55
+ const p = Math.min(1, Math.max(0, progress));
56
+ const inverse = 1 - p;
57
+ return 1 - inverse * inverse * inverse;
58
+ }
59
+ /** ease-in-out cubic:前半 `4p³`、后半镜像,两端 clamp。 */
60
+ export function easeInOutCubic(progress) {
61
+ const p = Math.min(1, Math.max(0, progress));
62
+ if (p < 0.5)
63
+ return 4 * p * p * p;
64
+ const inverse = -2 * p + 2;
65
+ return 1 - (inverse * inverse * inverse) / 2;
66
+ }
67
+ /** 单列对波带的采样:三 hue 权重(未归一;单波形只点亮 hue[0])。 */
68
+ function sampleColumn(elapsed, column, width) {
69
+ const weights = [0, 0, 0];
70
+ const [launch, travel] = BAND;
71
+ const progress = (elapsed - launch) / travel;
72
+ if (progress < 0 || progress > 1)
73
+ return weights;
74
+ const center = easeInOutCubic(progress) * (width + 2 * WAVE_HALF_WIDTH) - WAVE_HALF_WIDTH;
75
+ weights[0] = crest(Math.abs(column - center) / WAVE_HALF_WIDTH);
76
+ return weights;
77
+ }
78
+ /** 线性混色(t=0 → a,t=1 → b,不 clamp)。 */
79
+ export function blend(a, b, t) {
80
+ return {
81
+ r: Math.round(a.r + (b.r - a.r) * t),
82
+ g: Math.round(a.g + (b.g - a.g) * t),
83
+ b: Math.round(a.b + (b.b - a.b) * t),
84
+ };
85
+ }
86
+ /**
87
+ * 扫光某一时刻的整行颜色。
88
+ *
89
+ * @param options.elapsedMs - 距触发的时间;达到 {@link SWEEP_TOTAL_MS}
90
+ * 后整行返回空数组(无波,行恢复本底)。
91
+ * @param options.width - 行列数(终端宽)。
92
+ * @param options.onLight - 浅色主题时用浅底色板与浅带底色。
93
+ * @returns 逐列颜色(`rgb(r,g,b)` 字符串);无波的列为 `undefined`,
94
+ * 渲染层应输出本底色,保持行宽恒定。
95
+ */
96
+ export function ignitionLineColors(options) {
97
+ const { elapsedMs, width, onLight } = options;
98
+ const elapsed = elapsedMs / 1000;
99
+ const total = SWEEP_TOTAL_MS / 1000;
100
+ if (width <= 0 || !Number.isFinite(elapsed) || elapsed <= 0 || elapsed >= total)
101
+ return [];
102
+ const hue = ignitionHues(onLight)[0];
103
+ const band = onLight ? BAND_LIGHT : BAND_DARK;
104
+ const colors = new Array(width);
105
+ for (let column = 0; column < width; column++) {
106
+ const weight = sampleColumn(elapsed, column, width)[0];
107
+ if (weight <= 0.01) {
108
+ colors[column] = undefined;
109
+ continue;
110
+ }
111
+ // 波按强度淡入带底色:alpha=1 是纯 hue,alpha→0 收敛回本底;高亮
112
+ // 度档满强度纯 hue 直出。输出前通道量化到 8 步长——渐变列因此能
113
+ // 合并成长段(渲染层 RLE 段数降一个数量级),8/256 的色差在终端
114
+ // cell 分辨率下不可辨。
115
+ const tinted = blend(band, hue, Math.min(weight, 1));
116
+ colors[column] = rgbString({
117
+ r: Math.round(tinted.r / 8) * 8,
118
+ g: Math.round(tinted.g / 8) * 8,
119
+ b: Math.round(tinted.b / 8) * 8,
120
+ });
121
+ }
122
+ return colors;
123
+ }
124
+ /**
125
+ * 顶档切入判定:从「已有档位」变为「另一档位」且新档位是档位表末位
126
+ * 最高档。冷启动恢复偏好、单档表、档位表未知都不触发。
127
+ */
128
+ export function entersTopTier(previous, current, levels) {
129
+ return (current !== undefined &&
130
+ previous !== undefined &&
131
+ current !== previous &&
132
+ levels !== undefined &&
133
+ levels.length > 1 &&
134
+ current === levels[levels.length - 1]);
135
+ }
136
+ /** 充能时长(ms)与充能进度(钳 [0,1],负 elapsed 钳 0)。 */
137
+ export const CHARGE_MS = 150;
138
+ export function chargeProgress(elapsedMs) {
139
+ if (!Number.isFinite(elapsedMs))
140
+ return 0;
141
+ return Math.min(1, Math.max(0, Math.max(0, elapsedMs) / CHARGE_MS));
142
+ }
@@ -1,8 +1,8 @@
1
- # Changelog
2
-
3
- Changes to `@dsh-std/command` are recorded here.
4
-
5
- ## 0.1.0 (draft)
6
-
7
- - Defined portable command trees, arguments, options, catalogs, and invocation.
8
- - Added owner-aware command resource and runtime capability definitions.
1
+ # Changelog
2
+
3
+ Changes to `@dsh-std/command` are recorded here.
4
+
5
+ ## 0.1.0 (draft)
6
+
7
+ - Defined portable command trees, arguments, options, catalogs, and invocation.
8
+ - Added owner-aware command resource and runtime capability definitions.
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 DSH Standard contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DSH Standard contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,26 +1,26 @@
1
- # @dsh-std/command
2
-
3
- English | [中文](README.zh.md)
4
-
5
- Named human-command resources and their shared callable Runtime dispatcher.
6
-
7
- ## Contract
8
-
9
- A `Command` resource describes one root command and its nested subcommands. Nodes provide a title, localized titles, description, aliases, positional arguments, options, and child nodes. Arguments may be required, variadic, or restricted to documented values. Options declare every literal spelling and may accept one value.
10
-
11
- `CommandRuntime` defines the generic `catalog` and `execute` operations once for every command extension. A runtime adapter joins extensions published by active facets with its authoritative command registry and implements that capability. The execution context id remains opaque to the standard; a DSH adapter maps it to a session. Results contain only the command outcome. Invocation-scoped UI work uses typed clients from `@dsh-std/presentation`.
12
-
13
- `commandRuntime()` wraps a consumer-scoped `CapabilityClient` with typed methods, and `commandRuntimeImplementation()` builds the operation dispatcher for an adapter. Consumers and adapters do not repeat operation strings or payload validation.
14
-
15
- Presentation clients can build completion trees and forms without importing the owning component. A component such as dsh-codex declares `Command/codex`; its selected facet publishes the handler in its local runtime and never defines a connection-specific method.
16
-
17
- Names and aliases are single tokens. Sibling names and aliases, argument names, option spellings, and enumerated values must be unique. A variadic argument must be last.
18
-
19
- ## Extension points
20
-
21
- Fields prefixed with `x-` may carry experimental metadata. Portable clients ignore extensions they do not understand. Incompatible command semantics require a new contract major version rather than redefining an existing field.
22
-
23
- ## Known Limitations and Deferred Work
24
-
25
- - The contract does not define a command-line parser or quoting rules.
26
- - Dynamic completion is not part of `v1alpha1`; declared values are static.
1
+ # @dsh-std/command
2
+
3
+ English | [中文](README.zh.md)
4
+
5
+ Named human-command resources and their shared callable Runtime dispatcher.
6
+
7
+ ## Contract
8
+
9
+ A `Command` resource describes one root command and its nested subcommands. Nodes provide a title, localized titles, description, aliases, positional arguments, options, and child nodes. Arguments may be required, variadic, or restricted to documented values. Options declare every literal spelling and may accept one value.
10
+
11
+ `CommandRuntime` defines the generic `catalog` and `execute` operations once for every command extension. A runtime adapter joins extensions published by active facets with its authoritative command registry and implements that capability. The execution context id remains opaque to the standard; a DSH adapter maps it to a session. Results contain only the command outcome. Invocation-scoped UI work uses typed clients from `@dsh-std/presentation`.
12
+
13
+ `commandRuntime()` wraps a consumer-scoped `CapabilityClient` with typed methods, and `commandRuntimeImplementation()` builds the operation dispatcher for an adapter. Consumers and adapters do not repeat operation strings or payload validation.
14
+
15
+ Presentation clients can build completion trees and forms without importing the owning component. A component such as dsh-codex declares `Command/codex`; its selected facet publishes the handler in its local runtime and never defines a connection-specific method.
16
+
17
+ Names and aliases are single tokens. Sibling names and aliases, argument names, option spellings, and enumerated values must be unique. A variadic argument must be last.
18
+
19
+ ## Extension points
20
+
21
+ Fields prefixed with `x-` may carry experimental metadata. Portable clients ignore extensions they do not understand. Incompatible command semantics require a new contract major version rather than redefining an existing field.
22
+
23
+ ## Known Limitations and Deferred Work
24
+
25
+ - The contract does not define a command-line parser or quoting rules.
26
+ - Dynamic completion is not part of `v1alpha1`; declared values are static.
@@ -1,28 +1,28 @@
1
- # @dsh-std/command
2
-
3
- [English](README.md) | 中文
4
-
5
- 拟议设计见 [Command Resources and Runtime](../../docs/proposals/command.zh.md)。
6
-
7
- 具名用户命令资源及其共享的可调用 Runtime 分派器。
8
-
9
- ## 协议
10
-
11
- 一项 `Command` 资源描述一个根命令及其嵌套子命令。节点可以提供标题、本地化标题、说明、别名、位置参数、选项和子节点。参数可以是必需、可变长或受已声明值限制;选项声明全部字面拼写,并可接收一个值。
12
-
13
- `CommandRuntime` 为全部命令 extension 统一定义 `catalog` 与 `execute` 操作。运行时适配器把 active facets 发布的 extension 与自身权威命令注册表关联,并实现该能力。执行上下文 id 对标准保持不透明;DSH 适配器将其映射为会话。结果只包含命令结果;调用作用域内的 UI 操作使用 `@dsh-std/presentation` 的类型化 client。
14
-
15
- `commandRuntime()` 用类型化方法包装按消费方隔离的 `CapabilityClient`,`commandRuntimeImplementation()` 为适配器创建操作分派器。消费方与适配器都无需重复操作字符串或载荷校验。
16
-
17
- 表现客户端无需导入所属 component,即可构建补全树和表单。dsh-codex 之类的 component 声明 `Command/codex`,由选中的 facet 在本地运行时发布 handler;它不定义 connection 专用方法。
18
-
19
- 名称与别名必须是单个 token。同级名称与别名、参数名、选项拼写和枚举值必须唯一。可变长参数必须位于末尾。
20
-
21
- ## 扩展点
22
-
23
- 以 `x-` 开头的字段可以承载实验性元数据。可移植客户端忽略无法理解的扩展。不兼容的命令语义需要新的协议主版本,不能重新定义现有字段。
24
-
25
- ## 已知限制与暂缓事项
26
-
27
- - 协议不定义命令行解析器或引号规则。
28
- - `v1alpha1` 不包含动态补全;已声明值是静态的。
1
+ # @dsh-std/command
2
+
3
+ [English](README.md) | 中文
4
+
5
+ 拟议设计见 [Command Resources and Runtime](../../docs/proposals/command.zh.md)。
6
+
7
+ 具名用户命令资源及其共享的可调用 Runtime 分派器。
8
+
9
+ ## 协议
10
+
11
+ 一项 `Command` 资源描述一个根命令及其嵌套子命令。节点可以提供标题、本地化标题、说明、别名、位置参数、选项和子节点。参数可以是必需、可变长或受已声明值限制;选项声明全部字面拼写,并可接收一个值。
12
+
13
+ `CommandRuntime` 为全部命令 extension 统一定义 `catalog` 与 `execute` 操作。运行时适配器把 active facets 发布的 extension 与自身权威命令注册表关联,并实现该能力。执行上下文 id 对标准保持不透明;DSH 适配器将其映射为会话。结果只包含命令结果;调用作用域内的 UI 操作使用 `@dsh-std/presentation` 的类型化 client。
14
+
15
+ `commandRuntime()` 用类型化方法包装按消费方隔离的 `CapabilityClient`,`commandRuntimeImplementation()` 为适配器创建操作分派器。消费方与适配器都无需重复操作字符串或载荷校验。
16
+
17
+ 表现客户端无需导入所属 component,即可构建补全树和表单。dsh-codex 之类的 component 声明 `Command/codex`,由选中的 facet 在本地运行时发布 handler;它不定义 connection 专用方法。
18
+
19
+ 名称与别名必须是单个 token。同级名称与别名、参数名、选项拼写和枚举值必须唯一。可变长参数必须位于末尾。
20
+
21
+ ## 扩展点
22
+
23
+ 以 `x-` 开头的字段可以承载实验性元数据。可移植客户端忽略无法理解的扩展。不兼容的命令语义需要新的协议主版本,不能重新定义现有字段。
24
+
25
+ ## 已知限制与暂缓事项
26
+
27
+ - 协议不定义命令行解析器或引号规则。
28
+ - `v1alpha1` 不包含动态补全;已声明值是静态的。