@deepseek-harness-tui/dsh-tui 0.8.0 → 0.8.2

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 (434) hide show
  1. package/README.md +32 -15
  2. package/cordis.patch.yml +21 -2
  3. package/cordis.yml +12 -1
  4. package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -0
  5. package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -0
  6. package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -0
  7. package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -0
  8. package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -0
  9. package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -0
  10. package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -0
  11. package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -0
  12. package/dsh-ecosystem-spec/registry/README.md +14 -0
  13. package/dsh-ecosystem-spec/registry/contracts/decision-events-v1alpha1.json +13 -0
  14. package/dsh-ecosystem-spec/registry/contracts/scene-v1alpha1.json +13 -0
  15. package/dsh-ecosystem-spec/registry/contracts/settings-section-v1alpha1.json +13 -0
  16. package/dsh-ecosystem-spec/registry/contracts/tui-channel-v1alpha1.json +30 -0
  17. package/dsh-ecosystem-spec/registry/contracts/workspace-provider-v1alpha1.json +6 -0
  18. package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -0
  19. package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -0
  20. package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -0
  21. package/dsh-ecosystem-spec/schemas/conformance-claim.schema.json +15 -0
  22. package/dsh-ecosystem-spec/schemas/effect-ledger-record.schema.json +16 -0
  23. package/dsh-ecosystem-spec/schemas/host-descriptor.schema.json +26 -0
  24. package/lib/types/cc/figures.d.ts +4 -0
  25. package/lib/types/cc/figures.d.ts.map +1 -1
  26. package/lib/types/cc/figures.js +4 -0
  27. package/lib/types/command-trees.d.ts +2 -1
  28. package/lib/types/command-trees.d.ts.map +1 -1
  29. package/lib/types/command-trees.js +1 -1
  30. package/lib/types/commands.d.ts.map +1 -1
  31. package/lib/types/commands.js +2 -0
  32. package/lib/types/components/ExtensionDialog.d.ts +40 -0
  33. package/lib/types/components/ExtensionDialog.d.ts.map +1 -0
  34. package/lib/types/components/ExtensionDialog.js +210 -0
  35. package/lib/types/components/HelpMenu.js +1 -1
  36. package/lib/types/components/LoadedContextPanel.d.ts +5 -5
  37. package/lib/types/components/LoadedContextPanel.js +6 -6
  38. package/lib/types/components/LogoV2.d.ts.map +1 -1
  39. package/lib/types/components/LogoV2.js +16 -8
  40. package/lib/types/components/Markdown.d.ts +13 -1
  41. package/lib/types/components/Markdown.d.ts.map +1 -1
  42. package/lib/types/components/Markdown.js +15 -1
  43. package/lib/types/components/MessageList.d.ts +3 -1
  44. package/lib/types/components/MessageList.d.ts.map +1 -1
  45. package/lib/types/components/MessageList.js +111 -6
  46. package/lib/types/components/PromptInput.d.ts.map +1 -1
  47. package/lib/types/components/PromptInput.js +26 -12
  48. package/lib/types/components/RewindPicker.d.ts +13 -1
  49. package/lib/types/components/RewindPicker.d.ts.map +1 -1
  50. package/lib/types/components/RewindPicker.js +26 -2
  51. package/lib/types/components/StreamingMarkdown.d.ts +2 -8
  52. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
  53. package/lib/types/components/StreamingMarkdown.js +51 -9
  54. package/lib/types/components/ToolUseLoader.d.ts +8 -3
  55. package/lib/types/components/ToolUseLoader.d.ts.map +1 -1
  56. package/lib/types/components/ToolUseLoader.js +43 -9
  57. package/lib/types/components/activityFrames.d.ts +1 -1
  58. package/lib/types/components/activityFrames.d.ts.map +1 -1
  59. package/lib/types/components/activityFrames.js +4 -1
  60. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +5 -1
  61. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
  62. package/lib/types/components/messages/AssistantThinkingMessage.js +26 -3
  63. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  64. package/lib/types/components/messages/AssistantToolUseMessage.js +13 -2
  65. package/lib/types/dsh-adapter/channel.d.ts +61 -11
  66. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  67. package/lib/types/dsh-adapter/channel.js +767 -120
  68. package/lib/types/dsh-adapter/childStderr.d.ts.map +1 -1
  69. package/lib/types/dsh-adapter/childStderr.js +10 -0
  70. package/lib/types/dsh-adapter/command-attribution.d.ts +51 -0
  71. package/lib/types/dsh-adapter/command-attribution.d.ts.map +1 -0
  72. package/lib/types/dsh-adapter/command-attribution.js +93 -0
  73. package/lib/types/dsh-adapter/command-errors.d.ts +42 -0
  74. package/lib/types/dsh-adapter/command-errors.d.ts.map +1 -0
  75. package/lib/types/dsh-adapter/command-errors.js +63 -0
  76. package/lib/types/dsh-adapter/command-trees.d.ts +7 -1
  77. package/lib/types/dsh-adapter/command-trees.d.ts.map +1 -1
  78. package/lib/types/dsh-adapter/command-trees.js +70 -20
  79. package/lib/types/dsh-adapter/component-identity.d.ts +33 -0
  80. package/lib/types/dsh-adapter/component-identity.d.ts.map +1 -0
  81. package/lib/types/dsh-adapter/component-identity.js +108 -0
  82. package/lib/types/dsh-adapter/contract.d.ts +1 -1
  83. package/lib/types/dsh-adapter/contract.js +2 -2
  84. package/lib/types/dsh-adapter/decision-guard.d.ts +84 -0
  85. package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -0
  86. package/lib/types/dsh-adapter/decision-guard.js +348 -0
  87. package/lib/types/dsh-adapter/dialogs.d.ts +145 -0
  88. package/lib/types/dsh-adapter/dialogs.d.ts.map +1 -0
  89. package/lib/types/dsh-adapter/dialogs.js +316 -0
  90. package/lib/types/dsh-adapter/effect-ledger.d.ts +91 -0
  91. package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -0
  92. package/lib/types/dsh-adapter/effect-ledger.js +251 -0
  93. package/lib/types/dsh-adapter/extension-events.d.ts +193 -0
  94. package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -0
  95. package/lib/types/dsh-adapter/extension-events.js +207 -0
  96. package/lib/types/dsh-adapter/extensions.d.ts +32 -0
  97. package/lib/types/dsh-adapter/extensions.d.ts.map +1 -0
  98. package/lib/types/dsh-adapter/extensions.js +42 -0
  99. package/lib/types/dsh-adapter/grants.d.ts +25 -0
  100. package/lib/types/dsh-adapter/grants.d.ts.map +1 -0
  101. package/lib/types/dsh-adapter/grants.js +213 -0
  102. package/lib/types/dsh-adapter/host-access.d.ts +37 -0
  103. package/lib/types/dsh-adapter/host-access.d.ts.map +1 -0
  104. package/lib/types/dsh-adapter/host-access.js +652 -0
  105. package/lib/types/dsh-adapter/host-descriptor.d.ts +24 -0
  106. package/lib/types/dsh-adapter/host-descriptor.d.ts.map +1 -0
  107. package/lib/types/dsh-adapter/host-descriptor.js +169 -0
  108. package/lib/types/dsh-adapter/index.d.ts +4 -0
  109. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  110. package/lib/types/dsh-adapter/index.js +1 -0
  111. package/lib/types/dsh-adapter/message-observer.d.ts +173 -0
  112. package/lib/types/dsh-adapter/message-observer.d.ts.map +1 -0
  113. package/lib/types/dsh-adapter/message-observer.js +553 -0
  114. package/lib/types/dsh-adapter/plugin-host.d.ts +136 -0
  115. package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -0
  116. package/lib/types/dsh-adapter/plugin-host.js +365 -0
  117. package/lib/types/dsh-adapter/plugin-storage.d.ts +108 -0
  118. package/lib/types/dsh-adapter/plugin-storage.d.ts.map +1 -0
  119. package/lib/types/dsh-adapter/plugin-storage.js +397 -0
  120. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  121. package/lib/types/dsh-adapter/plugin.js +124 -14
  122. package/lib/types/dsh-adapter/plugins-info.d.ts +43 -0
  123. package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -0
  124. package/lib/types/dsh-adapter/plugins-info.js +276 -0
  125. package/lib/types/dsh-adapter/promptDebug.d.ts +0 -6
  126. package/lib/types/dsh-adapter/promptDebug.d.ts.map +1 -1
  127. package/lib/types/dsh-adapter/promptDebug.js +13 -4
  128. package/lib/types/dsh-adapter/renderers.d.ts +57 -0
  129. package/lib/types/dsh-adapter/renderers.d.ts.map +1 -0
  130. package/lib/types/dsh-adapter/renderers.js +173 -0
  131. package/lib/types/dsh-adapter/sanitize.d.ts +36 -0
  132. package/lib/types/dsh-adapter/sanitize.d.ts.map +1 -0
  133. package/lib/types/dsh-adapter/sanitize.js +65 -0
  134. package/lib/types/dsh-adapter/scenes.d.ts +15 -5
  135. package/lib/types/dsh-adapter/scenes.d.ts.map +1 -1
  136. package/lib/types/dsh-adapter/scenes.js +149 -35
  137. package/lib/types/dsh-adapter/settings-sections.d.ts +7 -3
  138. package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
  139. package/lib/types/dsh-adapter/settings-sections.js +106 -26
  140. package/lib/types/dsh-adapter/shortcuts.d.ts +107 -0
  141. package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -0
  142. package/lib/types/dsh-adapter/shortcuts.js +340 -0
  143. package/lib/types/dsh-adapter/status.d.ts +74 -0
  144. package/lib/types/dsh-adapter/status.d.ts.map +1 -0
  145. package/lib/types/dsh-adapter/status.js +234 -0
  146. package/lib/types/dsh-adapter/workspaces.d.ts +16 -5
  147. package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -1
  148. package/lib/types/dsh-adapter/workspaces.js +287 -170
  149. package/lib/types/extensions.d.ts +13 -0
  150. package/lib/types/extensions.d.ts.map +1 -0
  151. package/lib/types/extensions.js +21 -0
  152. package/lib/types/force-production-react.d.ts +1 -0
  153. package/lib/types/force-production-react.d.ts.map +1 -0
  154. package/lib/types/force-production-react.js +12 -0
  155. package/lib/types/i18n.d.ts +174 -20
  156. package/lib/types/i18n.d.ts.map +1 -1
  157. package/lib/types/i18n.js +56 -6
  158. package/lib/types/index.d.ts +1 -0
  159. package/lib/types/index.d.ts.map +1 -1
  160. package/lib/types/index.js +1 -0
  161. package/lib/types/ink/components/App.d.ts +2 -0
  162. package/lib/types/ink/components/App.d.ts.map +1 -1
  163. package/lib/types/ink/components/App.js +4 -0
  164. package/lib/types/ink/ink.d.ts +31 -3
  165. package/lib/types/ink/ink.d.ts.map +1 -1
  166. package/lib/types/ink/ink.js +90 -5
  167. package/lib/types/ink/log-update.d.ts.map +1 -1
  168. package/lib/types/ink/log-update.js +225 -56
  169. package/lib/types/ink/output.d.ts +35 -2
  170. package/lib/types/ink/output.d.ts.map +1 -1
  171. package/lib/types/ink/output.js +281 -14
  172. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  173. package/lib/types/ink/render-node-to-output.js +14 -6
  174. package/lib/types/ink/screen.d.ts +39 -0
  175. package/lib/types/ink/screen.d.ts.map +1 -1
  176. package/lib/types/ink/screen.js +117 -0
  177. package/lib/types/ink/terminal.d.ts.map +1 -1
  178. package/lib/types/ink/terminal.js +26 -6
  179. package/lib/types/ink/wrapAnsi.d.ts +1 -1
  180. package/lib/types/ink/wrapAnsi.d.ts.map +1 -1
  181. package/lib/types/ink/wrapAnsi.js +29 -2
  182. package/lib/types/plugin-host.d.ts +15 -0
  183. package/lib/types/plugin-host.d.ts.map +1 -0
  184. package/lib/types/plugin-host.js +17 -0
  185. package/lib/types/plugin-spec/negotiate.d.ts +11 -0
  186. package/lib/types/plugin-spec/negotiate.d.ts.map +1 -0
  187. package/lib/types/plugin-spec/negotiate.js +97 -0
  188. package/lib/types/plugin-spec/permission-scope.d.ts +32 -0
  189. package/lib/types/plugin-spec/permission-scope.d.ts.map +1 -0
  190. package/lib/types/plugin-spec/permission-scope.js +90 -0
  191. package/lib/types/plugin-spec/registry.d.ts +23 -0
  192. package/lib/types/plugin-spec/registry.d.ts.map +1 -0
  193. package/lib/types/plugin-spec/registry.js +252 -0
  194. package/lib/types/plugin-spec/schema-check.d.ts +17 -0
  195. package/lib/types/plugin-spec/schema-check.d.ts.map +1 -0
  196. package/lib/types/plugin-spec/schema-check.js +165 -0
  197. package/lib/types/plugin-spec/tui-extension.d.ts +16 -0
  198. package/lib/types/plugin-spec/tui-extension.d.ts.map +1 -0
  199. package/lib/types/plugin-spec/tui-extension.js +79 -0
  200. package/lib/types/plugin-spec/types.d.ts +114 -0
  201. package/lib/types/plugin-spec/types.d.ts.map +1 -0
  202. package/lib/types/plugin-spec/types.js +10 -0
  203. package/lib/types/plugin-spec/validate.d.ts +21 -0
  204. package/lib/types/plugin-spec/validate.d.ts.map +1 -0
  205. package/lib/types/plugin-spec/validate.js +138 -0
  206. package/lib/types/scenes.d.ts +2 -1
  207. package/lib/types/scenes.d.ts.map +1 -1
  208. package/lib/types/scenes.js +1 -1
  209. package/lib/types/screens/Chat.d.ts +14 -1
  210. package/lib/types/screens/Chat.d.ts.map +1 -1
  211. package/lib/types/screens/Chat.js +173 -49
  212. package/lib/types/screens/SessionBrowser.d.ts.map +1 -1
  213. package/lib/types/screens/SessionBrowser.js +10 -3
  214. package/lib/types/sessions/view.d.ts +3 -2
  215. package/lib/types/sessions/view.d.ts.map +1 -1
  216. package/lib/types/sessions/view.js +18 -0
  217. package/lib/types/settings-sections.d.ts +2 -1
  218. package/lib/types/settings-sections.d.ts.map +1 -1
  219. package/lib/types/settings-sections.js +1 -1
  220. package/lib/types/theme.d.ts +5 -0
  221. package/lib/types/theme.d.ts.map +1 -1
  222. package/lib/types/theme.js +15 -0
  223. package/lib/types/update.d.ts +20 -0
  224. package/lib/types/update.d.ts.map +1 -1
  225. package/lib/types/update.js +54 -7
  226. package/lib/types/utils/execFileNoThrow.d.ts.map +1 -1
  227. package/lib/types/utils/execFileNoThrow.js +3 -0
  228. package/lib/types/utils/loaded-context.d.ts +8 -3
  229. package/lib/types/utils/loaded-context.d.ts.map +1 -1
  230. package/lib/types/utils/loaded-context.js +39 -3
  231. package/lib/types/utils/modifiers.d.ts.map +1 -1
  232. package/lib/types/utils/modifiers.js +3 -2
  233. package/lib/types/working-activity.d.ts +12 -0
  234. package/lib/types/working-activity.d.ts.map +1 -1
  235. package/lib/types/working-activity.js +13 -0
  236. package/lib/types/workspaces.d.ts +2 -1
  237. package/lib/types/workspaces.d.ts.map +1 -1
  238. package/lib/types/workspaces.js +1 -1
  239. package/node_modules/@dsh-std/command/CHANGELOG.md +8 -0
  240. package/node_modules/@dsh-std/command/LICENSE +21 -0
  241. package/node_modules/@dsh-std/command/README.md +26 -0
  242. package/node_modules/@dsh-std/command/README.zh.md +28 -0
  243. package/node_modules/@dsh-std/command/lib/index.d.ts +144 -0
  244. package/node_modules/@dsh-std/command/lib/index.d.ts.map +1 -0
  245. package/node_modules/@dsh-std/command/lib/index.js +252 -0
  246. package/node_modules/@dsh-std/command/lib/index.js.map +1 -0
  247. package/node_modules/@dsh-std/command/package.json +22 -0
  248. package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
  249. package/node_modules/@dsh-std/connection/LICENSE +21 -0
  250. package/node_modules/@dsh-std/connection/README.md +42 -0
  251. package/node_modules/@dsh-std/connection/README.zh.md +42 -0
  252. package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
  253. package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
  254. package/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
  255. package/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
  256. package/node_modules/@dsh-std/connection/lib/index.js +158 -0
  257. package/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
  258. package/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
  259. package/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
  260. package/node_modules/@dsh-std/connection/lib/memory.js +258 -0
  261. package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
  262. package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
  263. package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
  264. package/node_modules/@dsh-std/connection/package.json +20 -0
  265. package/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  266. package/node_modules/@dsh-std/core/LICENSE +21 -0
  267. package/node_modules/@dsh-std/core/README.md +13 -0
  268. package/node_modules/@dsh-std/core/README.zh.md +13 -0
  269. package/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  270. package/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  271. package/node_modules/@dsh-std/core/lib/index.js +424 -0
  272. package/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  273. package/node_modules/@dsh-std/core/package.json +21 -0
  274. package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -0
  275. package/node_modules/@dsh-std/manifest/LICENSE +21 -0
  276. package/node_modules/@dsh-std/manifest/README.md +5 -0
  277. package/node_modules/@dsh-std/manifest/README.zh.md +5 -0
  278. package/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
  279. package/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
  280. package/node_modules/@dsh-std/manifest/lib/index.js +625 -0
  281. package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
  282. package/node_modules/@dsh-std/manifest/package.json +20 -0
  283. package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
  284. package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -0
  285. package/node_modules/@dsh-std/messages/LICENSE +21 -0
  286. package/node_modules/@dsh-std/messages/README.md +5 -0
  287. package/node_modules/@dsh-std/messages/README.zh.md +7 -0
  288. package/node_modules/@dsh-std/messages/lib/index.d.ts +50 -0
  289. package/node_modules/@dsh-std/messages/lib/index.d.ts.map +1 -0
  290. package/node_modules/@dsh-std/messages/lib/index.js +151 -0
  291. package/node_modules/@dsh-std/messages/lib/index.js.map +1 -0
  292. package/node_modules/@dsh-std/messages/package.json +20 -0
  293. package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -0
  294. package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -0
  295. package/node_modules/@dsh-std/presentation/LICENSE +21 -0
  296. package/node_modules/@dsh-std/presentation/README.md +27 -0
  297. package/node_modules/@dsh-std/presentation/README.zh.md +29 -0
  298. package/node_modules/@dsh-std/presentation/lib/callback.d.ts +2 -0
  299. package/node_modules/@dsh-std/presentation/lib/callback.js +179 -0
  300. package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -0
  301. package/node_modules/@dsh-std/presentation/lib/index.d.ts +262 -0
  302. package/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
  303. package/node_modules/@dsh-std/presentation/lib/index.js +550 -0
  304. package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
  305. package/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
  306. package/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
  307. package/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
  308. package/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
  309. package/node_modules/@dsh-std/presentation/package.json +25 -0
  310. package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -0
  311. package/node_modules/@dsh-std/storage/LICENSE +21 -0
  312. package/node_modules/@dsh-std/storage/README.md +5 -0
  313. package/node_modules/@dsh-std/storage/README.zh.md +7 -0
  314. package/node_modules/@dsh-std/storage/lib/index.d.ts +48 -0
  315. package/node_modules/@dsh-std/storage/lib/index.d.ts.map +1 -0
  316. package/node_modules/@dsh-std/storage/lib/index.js +104 -0
  317. package/node_modules/@dsh-std/storage/lib/index.js.map +1 -0
  318. package/node_modules/@dsh-std/storage/package.json +20 -0
  319. package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -0
  320. package/package.json +110 -70
  321. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
  322. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -0
  323. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -0
  324. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -0
  325. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
  326. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
  327. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
  328. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
  329. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js +158 -0
  330. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
  331. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
  332. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
  333. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js +258 -0
  334. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
  335. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
  336. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
  337. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -0
  338. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  339. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -0
  340. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -0
  341. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -0
  342. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  343. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  344. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js +424 -0
  345. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  346. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -0
  347. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -0
  348. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -0
  349. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -0
  350. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -0
  351. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
  352. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
  353. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js +625 -0
  354. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
  355. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -0
  356. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
  357. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -0
  358. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -0
  359. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -0
  360. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -0
  361. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.d.ts +2 -0
  362. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js +179 -0
  363. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -0
  364. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts +262 -0
  365. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
  366. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js +550 -0
  367. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
  368. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
  369. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
  370. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
  371. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
  372. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -0
  373. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  374. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -0
  375. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -0
  376. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -0
  377. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  378. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  379. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js +424 -0
  380. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  381. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -0
  382. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  383. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -0
  384. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -0
  385. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -0
  386. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  387. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  388. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js +424 -0
  389. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  390. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -0
  391. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  392. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -0
  393. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -0
  394. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -0
  395. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  396. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  397. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js +424 -0
  398. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  399. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -0
  400. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
  401. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -0
  402. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -0
  403. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -0
  404. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
  405. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
  406. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
  407. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
  408. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js +158 -0
  409. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
  410. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
  411. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
  412. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js +258 -0
  413. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
  414. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
  415. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
  416. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -0
  417. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  418. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -0
  419. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -0
  420. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -0
  421. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  422. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  423. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js +424 -0
  424. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  425. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -0
  426. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  427. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -0
  428. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -0
  429. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -0
  430. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  431. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  432. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js +424 -0
  433. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  434. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -0
@@ -0,0 +1,252 @@
1
+ /** Load and verify the pinned dsh-TUI admission profile. */
2
+ import { createHash } from 'node:crypto';
3
+ import { existsSync, readFileSync } from 'node:fs';
4
+ import { dirname, join } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+ import { createAdmissionCatalog } from './tui-extension.js';
7
+ export const DSH_STD_REVISION = '614dfa1ac168db79fcf4577cf0ebb34e2e3b944b';
8
+ export const ECOSYSTEM_SPEC_REVISION = 'e1b902b0f95f4280a8e68d414ec7a4d25d6ce106';
9
+ const REGISTRY_FILE = join('registry', 'registry-0.15.json');
10
+ const EXPECTED_PROFILE_VERSION = 'tui-admission/0.15';
11
+ const EXPECTED_STD_REPOSITORY = 'https://github.com/Yan-Zero/dsh-std';
12
+ const EXPECTED_STD_SUBMODULE = 'vendor/dsh-std';
13
+ const EXPECTED_STD_MANIFEST_VERSION = '0.15';
14
+ const EXPECTED_PERMISSION_REGISTRY_VERSION = '0.1';
15
+ // The permission registry is policy, not merely input data. Keep the
16
+ // admission defaults and scopes pinned to the reviewed dsh-ecosystem-spec
17
+ // revision so a locally modified copy cannot silently widen a capability.
18
+ const EXPECTED_PERMISSIONS = Object.freeze([
19
+ { name: 'storage.local.read', default: 'deny', revocable: true, scope: 'plugin namespace' },
20
+ { name: 'storage.local.write', default: 'deny', revocable: true, scope: 'plugin namespace' },
21
+ { name: 'commands.invoke', default: 'allow', revocable: true, scope: 'declared command id' },
22
+ { name: 'messages.observe.read', default: 'deny', revocable: true, scope: 'message observation scope' },
23
+ { name: 'session.input.intercept', default: 'deny', revocable: true, scope: 'decision event subscription' },
24
+ { name: 'session.rewind.intercept', default: 'deny', revocable: true, scope: 'decision event subscription' },
25
+ { name: 'session.switch.intercept', default: 'deny', revocable: true, scope: 'decision event subscription' },
26
+ { name: 'session.compact.intercept', default: 'deny', revocable: true, scope: 'decision event subscription' },
27
+ ]);
28
+ export function locateSpecDir(start = dirname(fileURLToPath(import.meta.url))) {
29
+ let dir = start;
30
+ for (let index = 0; index < 8; index++) {
31
+ if (existsSync(join(dir, 'dsh-ecosystem-spec', REGISTRY_FILE)))
32
+ return join(dir, 'dsh-ecosystem-spec');
33
+ const parent = dirname(dir);
34
+ if (parent === dir)
35
+ return undefined;
36
+ dir = parent;
37
+ }
38
+ return undefined;
39
+ }
40
+ function loadJson(dir, relative) {
41
+ return JSON.parse(readFileSync(join(dir, relative), 'utf8'));
42
+ }
43
+ function isRecord(value) {
44
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
45
+ }
46
+ function soundEntry(value, privateDefinition) {
47
+ if (!isRecord(value) || typeof value.name !== 'string' || value.name === ''
48
+ || (value.kind !== 'capability' && value.kind !== 'event'))
49
+ return false;
50
+ if (!isRecord(value.coordinates)
51
+ || typeof value.coordinates.apiVersion !== 'string' || value.coordinates.apiVersion === ''
52
+ || typeof value.coordinates.kind !== 'string' || value.coordinates.kind === '')
53
+ return false;
54
+ if (!Array.isArray(value.permissions) || !value.permissions.every(permission => typeof permission === 'string'))
55
+ return false;
56
+ if (privateDefinition) {
57
+ return value.authority === 'dsh-tui'
58
+ && typeof value.profile === 'string'
59
+ && value.profile.length > 0
60
+ && typeof value.profileHash === 'string'
61
+ && /^sha256:[0-9a-f]{64}$/u.test(value.profileHash);
62
+ }
63
+ return typeof value.package === 'string' && /^@dsh-std\/[a-z0-9][a-z0-9-]*$/u.test(value.package);
64
+ }
65
+ function structurallySound(data) {
66
+ if (!isRecord(data.registry)
67
+ || data.registry.profileVersion !== EXPECTED_PROFILE_VERSION
68
+ || !isRecord(data.registry.std)
69
+ || data.registry.std.repository !== EXPECTED_STD_REPOSITORY
70
+ || data.registry.std.submodule !== EXPECTED_STD_SUBMODULE
71
+ || data.registry.std.manifestVersion !== EXPECTED_STD_MANIFEST_VERSION
72
+ || !Array.isArray(data.registry.imports)
73
+ || !Array.isArray(data.registry.definitions)
74
+ || !Array.isArray(data.registry.facetApiVersions)
75
+ || data.registry.facetApiVersions.length === 0
76
+ || !data.registry.facetApiVersions.every(version => typeof version === 'string'
77
+ && /^v[0-9]+(?:alpha[0-9]+|beta[0-9]+)?$/u.test(version)))
78
+ return false;
79
+ if (new Set(data.registry.facetApiVersions).size !== data.registry.facetApiVersions.length)
80
+ return false;
81
+ if (!data.registry.imports.every(entry => soundEntry(entry, false)))
82
+ return false;
83
+ if (!data.registry.definitions.every(entry => soundEntry(entry, true)))
84
+ return false;
85
+ const entries = [...data.registry.imports, ...data.registry.definitions];
86
+ const names = new Set();
87
+ const coordinates = new Set();
88
+ for (const entry of entries) {
89
+ if (names.has(entry.name))
90
+ return false;
91
+ names.add(entry.name);
92
+ const key = `${entry.coordinates.apiVersion}#${entry.coordinates.kind}`;
93
+ if (coordinates.has(key))
94
+ return false;
95
+ coordinates.add(key);
96
+ if ('authority' in entry && !entry.coordinates.apiVersion.startsWith('tui.dsh/'))
97
+ return false;
98
+ }
99
+ if (!isRecord(data.permissions)
100
+ || data.permissions.registryVersion !== EXPECTED_PERMISSION_REGISTRY_VERSION
101
+ || !Array.isArray(data.permissions.permissions)
102
+ || data.permissions.permissions.length !== EXPECTED_PERMISSIONS.length)
103
+ return false;
104
+ const expectedPermissions = new Map(EXPECTED_PERMISSIONS.map(permission => [permission.name, permission]));
105
+ const permissionNames = new Set();
106
+ for (const permission of data.permissions.permissions) {
107
+ if (!isRecord(permission) || typeof permission.name !== 'string'
108
+ || (permission.default !== 'allow' && permission.default !== 'deny')
109
+ || typeof permission.revocable !== 'boolean'
110
+ || typeof permission.scope !== 'string'
111
+ || permission.scope.trim() === '')
112
+ return false;
113
+ if (permissionNames.has(permission.name))
114
+ return false;
115
+ permissionNames.add(permission.name);
116
+ const expected = expectedPermissions.get(permission.name);
117
+ if (expected === undefined
118
+ || permission.default !== expected.default
119
+ || permission.revocable !== expected.revocable
120
+ || permission.scope !== expected.scope)
121
+ return false;
122
+ if ('rationale' in permission && permission.rationale !== undefined && typeof permission.rationale !== 'string')
123
+ return false;
124
+ }
125
+ if (permissionNames.size !== expectedPermissions.size)
126
+ return false;
127
+ const knownPermissions = new Set(expectedPermissions.keys());
128
+ if (!entries.every(entry => entry.permissions.every(permission => knownPermissions.has(permission))))
129
+ return false;
130
+ return Object.values(data.schemas).every(isRecord);
131
+ }
132
+ export function loadSpecData(dir = locateSpecDir()) {
133
+ if (dir === undefined)
134
+ return undefined;
135
+ try {
136
+ const data = {
137
+ dir,
138
+ registry: loadJson(dir, REGISTRY_FILE),
139
+ permissions: loadJson(dir, join('registry', 'permissions-0.1.json')),
140
+ schemas: {
141
+ host: loadJson(dir, join('schemas', 'host-descriptor.schema.json')),
142
+ ledger: loadJson(dir, join('schemas', 'effect-ledger-record.schema.json')),
143
+ claim: loadJson(dir, join('schemas', 'conformance-claim.schema.json')),
144
+ },
145
+ };
146
+ return structurallySound(data) ? data : undefined;
147
+ }
148
+ catch {
149
+ return undefined;
150
+ }
151
+ }
152
+ export function registryEntries(registry) {
153
+ return Array.isArray(registry.imports) && Array.isArray(registry.definitions)
154
+ ? [...registry.imports, ...registry.definitions]
155
+ : [];
156
+ }
157
+ export function digestFile(dir, relative) {
158
+ return `sha256:${createHash('sha256').update(readFileSync(join(dir, relative))).digest('hex')}`;
159
+ }
160
+ /** Verify definition availability and private profile digest pins. */
161
+ export function verifyRegistry(data) {
162
+ const failures = [];
163
+ const registry = data?.registry;
164
+ if (!isRecord(registry)
165
+ || !Array.isArray(registry.imports)
166
+ || !Array.isArray(registry.definitions)) {
167
+ return ['registry imports/definitions are malformed'];
168
+ }
169
+ const names = new Set();
170
+ const coordinates = new Set();
171
+ const { protocols } = createAdmissionCatalog();
172
+ for (const raw of [...registry.imports, ...registry.definitions]) {
173
+ const privateDefinition = registry.definitions.includes(raw);
174
+ if (!soundEntry(raw, privateDefinition)) {
175
+ failures.push('registry entry is malformed');
176
+ continue;
177
+ }
178
+ const entry = raw;
179
+ const key = `${entry.coordinates.apiVersion}#${entry.coordinates.kind}`;
180
+ if (names.has(entry.name))
181
+ failures.push(`${entry.name}: duplicate registry name`);
182
+ names.add(entry.name);
183
+ if (coordinates.has(key))
184
+ failures.push(`${key}: duplicate registry coordinate`);
185
+ coordinates.add(key);
186
+ if ('authority' in entry && !entry.coordinates.apiVersion.startsWith('tui.dsh/')) {
187
+ failures.push(`${key}: dsh-tui definition must use the private protocol group`);
188
+ }
189
+ if (!protocols.understands(entry.coordinates))
190
+ failures.push(`${key}: ProtocolCatalog definition unavailable`);
191
+ if ('profile' in entry) {
192
+ let actual;
193
+ try {
194
+ actual = digestFile(data.dir, entry.profile);
195
+ }
196
+ catch {
197
+ failures.push(`${entry.name}: private profile unreadable (${entry.profile})`);
198
+ continue;
199
+ }
200
+ if (actual !== entry.profileHash)
201
+ failures.push(`${entry.name}: profileHash drifted (registry ${entry.profileHash}, actual ${actual})`);
202
+ }
203
+ }
204
+ return failures;
205
+ }
206
+ /** Verify the TUI-owned definitions; public definitions live in dsh-std. */
207
+ export function verifyContractProfiles(data) {
208
+ const requiredKeys = [
209
+ 'name', 'version', 'kind', 'coordinates', 'caller', 'permissions',
210
+ 'errors', 'concurrency', 'timeout', 'cleanup', 'privacyClass', 'securityBoundary',
211
+ ];
212
+ const failures = [];
213
+ if (!isRecord(data?.registry)
214
+ || !Array.isArray(data.registry.definitions)) {
215
+ return ['registry definitions are malformed'];
216
+ }
217
+ for (const entry of data.registry.definitions) {
218
+ if (!soundEntry(entry, true)) {
219
+ failures.push('registry definition is malformed');
220
+ continue;
221
+ }
222
+ let profile;
223
+ try {
224
+ const loaded = loadJson(data.dir, entry.profile);
225
+ if (!isRecord(loaded)) {
226
+ failures.push(`${entry.name}: private profile is not an object (${entry.profile})`);
227
+ continue;
228
+ }
229
+ profile = loaded;
230
+ }
231
+ catch {
232
+ failures.push(`${entry.name}: private profile unreadable (${entry.profile})`);
233
+ continue;
234
+ }
235
+ for (const key of requiredKeys) {
236
+ if (!(key in profile))
237
+ failures.push(`${entry.name}: contract profile missing "${key}"`);
238
+ }
239
+ const coordinates = profile.coordinates;
240
+ if (coordinates?.apiVersion !== entry.coordinates.apiVersion || coordinates.kind !== entry.coordinates.kind) {
241
+ failures.push(`${entry.name}: profile/registry coordinates mismatch`);
242
+ }
243
+ const actualPermissions = [...(profile.permissions ?? [])].sort();
244
+ if (JSON.stringify(actualPermissions) !== JSON.stringify([...entry.permissions].sort())) {
245
+ failures.push(`${entry.name}: profile/registry permissions mismatch`);
246
+ }
247
+ if (!('operations' in profile) || profile.securityBoundary !== false) {
248
+ failures.push(`${entry.name}: capability boundary is incomplete`);
249
+ }
250
+ }
251
+ return failures;
252
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 零依赖 JSON Schema 校验器——上游 `conformance/tests/run.js` 的 check()
3
+ * 的保真 TS 移植。刻意只实现 vendored schemas 用到的子集:本地 $ref、
4
+ * oneOf(恰好一个匹配)、const/enum、object(required/additionalProperties:
5
+ * false/patternProperties)、array(min/maxItems/items/uniqueItems)、
6
+ * string(min/maxLength/pattern/format uri|date-time)、integer(minimum)、
7
+ * boolean。遇到子集之外的构件不静默放行——schema 更新引入新构件时这里
8
+ * 必须显式扩展(fixtures 矩阵会当场抓住)。
9
+ */
10
+ type JsonSchema = Record<string, unknown>;
11
+ /**
12
+ * Validate `value` against `schema`; throws an Error with the failing path
13
+ * (`$.a.b[0]: reason`) on the first violation.
14
+ */
15
+ export declare function check(value: unknown, schema: JsonSchema, rootSchema?: JsonSchema, where?: string): void;
16
+ export {};
17
+ //# sourceMappingURL=schema-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-check.d.ts","sourceRoot":"","sources":["../../../src/plugin-spec/schema-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAqCzC;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAE,UAAmB,EAAE,KAAK,SAAM,GAAG,IAAI,CA0G5G"}
@@ -0,0 +1,165 @@
1
+ /**
2
+ * 零依赖 JSON Schema 校验器——上游 `conformance/tests/run.js` 的 check()
3
+ * 的保真 TS 移植。刻意只实现 vendored schemas 用到的子集:本地 $ref、
4
+ * oneOf(恰好一个匹配)、const/enum、object(required/additionalProperties:
5
+ * false/patternProperties)、array(min/maxItems/items/uniqueItems)、
6
+ * string(min/maxLength/pattern/format uri|date-time)、integer(minimum)、
7
+ * boolean。遇到子集之外的构件不静默放行——schema 更新引入新构件时这里
8
+ * 必须显式扩展(fixtures 矩阵会当场抓住)。
9
+ */
10
+ /** Canonical JSON encoding for `uniqueItems`. JSON object member order is not
11
+ * semantically significant, while `JSON.stringify` preserves insertion order
12
+ * and therefore lets equivalent objects evade duplicate detection. */
13
+ function canonicalJson(value) {
14
+ if (value === null)
15
+ return 'null';
16
+ if (Array.isArray(value))
17
+ return `[${value.map(canonicalJson).join(',')}]`;
18
+ switch (typeof value) {
19
+ case 'object': {
20
+ const record = value;
21
+ return `{${Object.keys(record).sort().map(key => `${JSON.stringify(key)}:${canonicalJson(record[key])}`).join(',')}}`;
22
+ }
23
+ case 'string': return JSON.stringify(value);
24
+ case 'number': return JSON.stringify(value) ?? 'null';
25
+ case 'boolean': return value ? 'true' : 'false';
26
+ case 'undefined': return 'undefined';
27
+ default: return `${typeof value}:${String(value)}`;
28
+ }
29
+ }
30
+ function resolveRef(rootSchema, ref) {
31
+ if (!ref.startsWith('#/')) {
32
+ throw new Error(`external ref is not supported by the zero-dependency checker: ${ref}`);
33
+ }
34
+ return ref
35
+ .slice(2)
36
+ .split('/')
37
+ .reduce((value, key) => {
38
+ const child = value[key.replace(/~1/g, '/').replace(/~0/g, '~')];
39
+ if (child === null || typeof child !== 'object') {
40
+ throw new Error(`unresolvable $ref segment "${key}" in ${ref}`);
41
+ }
42
+ return child;
43
+ }, rootSchema);
44
+ }
45
+ /**
46
+ * Validate `value` against `schema`; throws an Error with the failing path
47
+ * (`$.a.b[0]: reason`) on the first violation.
48
+ */
49
+ export function check(value, schema, rootSchema = schema, where = '$') {
50
+ if (typeof schema.$ref === 'string') {
51
+ return check(value, resolveRef(rootSchema, schema.$ref), rootSchema, where);
52
+ }
53
+ // oneOf: exactly one variant must match (JSON Schema semantics). Variants
54
+ // are currently mutually exclusive by design; exact-one keeps future
55
+ // overlap from being silently accepted.
56
+ if (Array.isArray(schema.oneOf)) {
57
+ let matched = 0;
58
+ const errors = [];
59
+ for (const variant of schema.oneOf) {
60
+ try {
61
+ check(value, variant, rootSchema, where);
62
+ matched += 1;
63
+ }
64
+ catch (error) {
65
+ errors.push(error instanceof Error ? error.message : String(error));
66
+ }
67
+ }
68
+ if (matched !== 1) {
69
+ throw new Error(`${where}: expected exactly one oneOf match, got ${matched}: ${errors.join(' | ')}`);
70
+ }
71
+ return;
72
+ }
73
+ if (schema.const !== undefined && value !== schema.const) {
74
+ throw new Error(`${where}: expected ${JSON.stringify(schema.const)}`);
75
+ }
76
+ if (Array.isArray(schema.enum) && !schema.enum.includes(value)) {
77
+ throw new Error(`${where}: value is not in enum`);
78
+ }
79
+ if (schema.type === 'object') {
80
+ if (value === null || typeof value !== 'object' || Array.isArray(value)) {
81
+ throw new Error(`${where}: expected object`);
82
+ }
83
+ const record = value;
84
+ for (const key of schema.required ?? []) {
85
+ if (!(key in record))
86
+ throw new Error(`${where}.${key}: required`);
87
+ }
88
+ // draft-2020-12: additionalProperties consults properties AND
89
+ // patternProperties — a key matching a declared pattern is not
90
+ // "additional".
91
+ if (schema.additionalProperties === false) {
92
+ const patterns = Object.keys(schema.patternProperties ?? {});
93
+ for (const key of Object.keys(record)) {
94
+ const declared = schema.properties?.[key] !== undefined;
95
+ const patterned = patterns.some(pattern => new RegExp(pattern).test(key));
96
+ if (!declared && !patterned)
97
+ throw new Error(`${where}.${key}: additional property`);
98
+ }
99
+ }
100
+ for (const [key, child] of Object.entries(schema.properties ?? {})) {
101
+ if (key in record)
102
+ check(record[key], child, rootSchema, `${where}.${key}`);
103
+ }
104
+ if (schema.patternProperties !== undefined) {
105
+ for (const [pattern, child] of Object.entries(schema.patternProperties)) {
106
+ for (const name of Object.keys(record)) {
107
+ if (new RegExp(pattern).test(name))
108
+ check(record[name], child, rootSchema, `${where}.${name}`);
109
+ }
110
+ }
111
+ }
112
+ return;
113
+ }
114
+ if (schema.type === 'array') {
115
+ if (!Array.isArray(value))
116
+ throw new Error(`${where}: expected array`);
117
+ if (schema.minItems !== undefined && value.length < schema.minItems) {
118
+ throw new Error(`${where}: too few items`);
119
+ }
120
+ if (schema.maxItems !== undefined && value.length > schema.maxItems) {
121
+ throw new Error(`${where}: too many items`);
122
+ }
123
+ for (let i = 0; i < value.length; i++) {
124
+ check(value[i], schema.items, rootSchema, `${where}[${i}]`);
125
+ }
126
+ if (schema.uniqueItems === true) {
127
+ const encoded = value.map(canonicalJson);
128
+ if (new Set(encoded).size !== encoded.length)
129
+ throw new Error(`${where}: duplicate items`);
130
+ }
131
+ return;
132
+ }
133
+ if (schema.type === 'string') {
134
+ if (typeof value !== 'string')
135
+ throw new Error(`${where}: expected string`);
136
+ if (schema.minLength !== undefined && value.length < schema.minLength) {
137
+ throw new Error(`${where}: too short`);
138
+ }
139
+ if (schema.maxLength !== undefined && value.length > schema.maxLength) {
140
+ throw new Error(`${where}: too long`);
141
+ }
142
+ if (schema.pattern !== undefined && !new RegExp(schema.pattern).test(value)) {
143
+ throw new Error(`${where}: pattern mismatch`);
144
+ }
145
+ if (schema.format === 'uri' && !/^[A-Za-z][A-Za-z0-9+.-]*:\/\//.test(value)) {
146
+ throw new Error(`${where}: invalid URI`);
147
+ }
148
+ if (schema.format === 'date-time' && Number.isNaN(Date.parse(value))) {
149
+ throw new Error(`${where}: invalid date-time`);
150
+ }
151
+ return;
152
+ }
153
+ if (schema.type === 'integer') {
154
+ if (!Number.isInteger(value))
155
+ throw new Error(`${where}: expected integer`);
156
+ if (schema.minimum !== undefined && value < schema.minimum) {
157
+ throw new Error(`${where}: below minimum`);
158
+ }
159
+ return;
160
+ }
161
+ if (schema.type === 'boolean') {
162
+ if (typeof value !== 'boolean')
163
+ throw new Error(`${where}: expected boolean`);
164
+ }
165
+ }
@@ -0,0 +1,16 @@
1
+ /** dsh-TUI private protocol registration on the shared dsh-std catalog. */
2
+ import { ProtocolCatalog, type ProtocolDefinition } from '@dsh-std/core';
3
+ import { ManifestDefinitionCatalog } from '@dsh-std/manifest';
4
+ import type { ContractCoordinate } from './types.js';
5
+ export declare const TUI_EXTENSION_API_VERSION = "tui.dsh/v1alpha1";
6
+ export declare const DECISION_EVENTS_COORDINATE: Readonly<ContractCoordinate>;
7
+ export declare const TUI_DECISION_EVENT_NAMES: readonly ["tui/input", "tui/rewind-prompt", "tui/rewind-done", "tui/session-switch", "tui/session-switched", "tui/compact"];
8
+ export declare const TUI_EXTENSION_PERMISSION_NAMES: readonly ["session.input.intercept", "session.rewind.intercept", "session.switch.intercept", "session.compact.intercept"];
9
+ export declare const decisionEventsDefinition: ProtocolDefinition;
10
+ export interface AdmissionCatalog {
11
+ protocols: ProtocolCatalog;
12
+ manifests: ManifestDefinitionCatalog;
13
+ }
14
+ /** Register public and private definitions into one evaluator-owned catalog. */
15
+ export declare function createAdmissionCatalog(): AdmissionCatalog;
16
+ //# sourceMappingURL=tui-extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-extension.d.ts","sourceRoot":"","sources":["../../../src/plugin-spec/tui-extension.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAE3E,OAAO,EAAE,eAAe,EAAE,KAAK,kBAAkB,EAAsB,MAAM,eAAe,CAAA;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAM7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,eAAO,MAAM,yBAAyB,qBAAqB,CAAA;AAE3D,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,kBAAkB,CAGlE,CAAA;AAEF,eAAO,MAAM,wBAAwB,6HAO1B,CAAA;AAEX,eAAO,MAAM,8BAA8B,2HAKhC,CAAA;AAiBX,eAAO,MAAM,wBAAwB,EAAE,kBAsBrC,CAAA;AAEF,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,eAAe,CAAA;IAC1B,SAAS,EAAE,yBAAyB,CAAA;CACrC;AAED,gFAAgF;AAChF,wBAAgB,sBAAsB,IAAI,gBAAgB,CAUzD"}
@@ -0,0 +1,79 @@
1
+ /** dsh-TUI private protocol registration on the shared dsh-std catalog. */
2
+ import { ProtocolCatalog } from '@dsh-std/core';
3
+ import { ManifestDefinitionCatalog } from '@dsh-std/manifest';
4
+ import { register as registerCommand } from '@dsh-std/command';
5
+ import { register as registerMessages } from '@dsh-std/messages';
6
+ import { register as registerPresentation } from '@dsh-std/presentation';
7
+ import { register as registerStorage } from '@dsh-std/storage';
8
+ import { tuiChannelDefinition } from '#dsh-ecosystem-spec/tui-channel';
9
+ export const TUI_EXTENSION_API_VERSION = 'tui.dsh/v1alpha1';
10
+ export const DECISION_EVENTS_COORDINATE = Object.freeze({
11
+ apiVersion: TUI_EXTENSION_API_VERSION,
12
+ kind: 'DecisionEvents',
13
+ });
14
+ export const TUI_DECISION_EVENT_NAMES = Object.freeze([
15
+ 'tui/input',
16
+ 'tui/rewind-prompt',
17
+ 'tui/rewind-done',
18
+ 'tui/session-switch',
19
+ 'tui/session-switched',
20
+ 'tui/compact',
21
+ ]);
22
+ export const TUI_EXTENSION_PERMISSION_NAMES = Object.freeze([
23
+ 'session.input.intercept',
24
+ 'session.rewind.intercept',
25
+ 'session.switch.intercept',
26
+ 'session.compact.intercept',
27
+ ]);
28
+ function featureSupport(value) {
29
+ if (value === undefined)
30
+ return Object.freeze({ features: Object.freeze([]) });
31
+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {
32
+ throw new TypeError('DecisionEvents support spec must be an object');
33
+ }
34
+ const record = value;
35
+ const unknown = Object.keys(record).filter(key => key !== 'features' && !key.startsWith('x-'));
36
+ if (unknown.length > 0)
37
+ throw new TypeError(`DecisionEvents support spec contains unknown field ${JSON.stringify(unknown[0])}`);
38
+ if (record.features !== undefined && (!Array.isArray(record.features)
39
+ || record.features.some(feature => typeof feature !== 'string' || feature.trim() === ''))) {
40
+ throw new TypeError('DecisionEvents support spec.features must be an array of non-empty strings');
41
+ }
42
+ return Object.freeze({ features: Object.freeze([...(record.features ?? [])].sort()) });
43
+ }
44
+ export const decisionEventsDefinition = Object.freeze({
45
+ ...DECISION_EVENTS_COORDINATE,
46
+ validateRequirement(value) {
47
+ if (value !== undefined)
48
+ throw new TypeError('DecisionEvents requirement does not accept spec in manifest v0.15');
49
+ return undefined;
50
+ },
51
+ validateSupport: featureSupport,
52
+ negotiate(input) {
53
+ const providers = [...new Set(input.supports.map(row => row.participant))].sort();
54
+ const issues = input.requirements.flatMap(row => providers.length === 0
55
+ ? [{
56
+ code: row.requirement.optional === true ? 'optional-support-missing' : 'required-support-missing',
57
+ severity: row.requirement.optional === true ? 'warning' : 'error',
58
+ participant: row.participant,
59
+ message: 'DecisionEvents has no provider in this negotiation scope',
60
+ }]
61
+ : []);
62
+ return {
63
+ agreement: Object.freeze({ providers: Object.freeze(providers) }),
64
+ issues: Object.freeze(issues),
65
+ };
66
+ },
67
+ });
68
+ /** Register public and private definitions into one evaluator-owned catalog. */
69
+ export function createAdmissionCatalog() {
70
+ const protocols = new ProtocolCatalog({ name: 'dsh-tui-admission', version: '0.15' });
71
+ const manifests = new ManifestDefinitionCatalog();
72
+ registerCommand(protocols, manifests);
73
+ registerStorage(protocols);
74
+ registerMessages(protocols);
75
+ registerPresentation(protocols);
76
+ protocols.register(decisionEventsDefinition);
77
+ protocols.register(tuiChannelDefinition);
78
+ return { protocols, manifests };
79
+ }
@@ -0,0 +1,114 @@
1
+ /** Types shared by the dsh-std admission adapter and the TUI runtime. */
2
+ import type { PluginManifest as StandardPluginManifest } from '@dsh-std/manifest';
3
+ export interface ContractCoordinate {
4
+ apiVersion: string;
5
+ kind: string;
6
+ }
7
+ export interface ContractRef extends ContractCoordinate {
8
+ optional?: boolean;
9
+ fallback?: string;
10
+ }
11
+ export interface ManifestPermission {
12
+ name: string;
13
+ scope: string;
14
+ reason?: string;
15
+ }
16
+ export type SubscriptionRef = ContractCoordinate & {
17
+ scope?: string;
18
+ } | string;
19
+ /** Community v0.15 is parsed and frozen by @dsh-std/manifest. */
20
+ export type PluginManifest = StandardPluginManifest;
21
+ export type HostContractDefinition = {
22
+ source: 'dsh-std';
23
+ package: `@dsh-std/${string}`;
24
+ } | {
25
+ source: 'tui-profile';
26
+ profileHash: `sha256:${string}`;
27
+ };
28
+ export interface HostContract extends ContractCoordinate {
29
+ spec?: unknown;
30
+ definition: HostContractDefinition;
31
+ permissions: string[];
32
+ }
33
+ export interface HostDescriptor {
34
+ $schema: 'urn:dsh-tui:host-descriptor:0.15';
35
+ hostId: string;
36
+ hostVersion: string;
37
+ facetApiVersions: string[];
38
+ contracts: HostContract[];
39
+ runtime: {
40
+ location: 'local' | 'remote' | 'container';
41
+ generationId: string;
42
+ headless: boolean;
43
+ remoteAttach?: boolean;
44
+ };
45
+ trustLevel: 'trusted-in-process';
46
+ platform: {
47
+ os: string;
48
+ arch: string;
49
+ node?: string;
50
+ };
51
+ }
52
+ export type NegotiationDecision = {
53
+ decision: 'compatible';
54
+ } | {
55
+ decision: 'compatible_degraded';
56
+ missingOptional: string[];
57
+ } | {
58
+ decision: 'waiting_authorization';
59
+ reasonCode: string;
60
+ deniedPermissions: string[];
61
+ } | {
62
+ decision: 'rejected';
63
+ reasonCode: string;
64
+ missingRequired?: string[];
65
+ facetApiVersion?: string;
66
+ hostFacetApiVersions?: string[];
67
+ issues?: readonly unknown[];
68
+ } | {
69
+ decision: 'unknown';
70
+ reasonCode: string;
71
+ unknownContracts: string[];
72
+ };
73
+ export declare const NEGOTIATION_ERROR_CODES: readonly ["REQUIRED_PROTOCOL_UNAVAILABLE", "PROTOCOL_NEGOTIATION_FAILED", "FACET_API_VERSION_UNAVAILABLE", "PERMISSION_NOT_GRANTED", "UNKNOWN_PROTOCOL_VERSION", "DUPLICATE_CONTRIBUTION_ID", "INVALID_MANIFEST"];
74
+ export type NegotiationErrorCode = (typeof NEGOTIATION_ERROR_CODES)[number];
75
+ export interface PermissionEntry {
76
+ name: string;
77
+ default: 'allow' | 'deny';
78
+ revocable: boolean;
79
+ scope: string;
80
+ rationale?: string;
81
+ }
82
+ export interface PermissionRegistry {
83
+ registryVersion: string;
84
+ permissions: PermissionEntry[];
85
+ }
86
+ interface RegistryEntryBase {
87
+ name: string;
88
+ coordinates: ContractCoordinate;
89
+ kind: 'capability' | 'event';
90
+ permissions: string[];
91
+ eventEnvelope?: string;
92
+ }
93
+ export interface ImportedRegistryEntry extends RegistryEntryBase {
94
+ package: `@dsh-std/${string}`;
95
+ }
96
+ export interface PrivateRegistryEntry extends RegistryEntryBase {
97
+ authority: 'dsh-tui';
98
+ profile: string;
99
+ profileHash: `sha256:${string}`;
100
+ }
101
+ export type RegistryEntry = ImportedRegistryEntry | PrivateRegistryEntry;
102
+ export interface ContractRegistry {
103
+ profileVersion: string;
104
+ std: {
105
+ repository: string;
106
+ submodule: string;
107
+ manifestVersion: string;
108
+ };
109
+ imports: ImportedRegistryEntry[];
110
+ definitions: PrivateRegistryEntry[];
111
+ facetApiVersions: string[];
112
+ }
113
+ export {};
114
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugin-spec/types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,10 @@
1
+ /** Types shared by the dsh-std admission adapter and the TUI runtime. */
2
+ export const NEGOTIATION_ERROR_CODES = [
3
+ 'REQUIRED_PROTOCOL_UNAVAILABLE',
4
+ 'PROTOCOL_NEGOTIATION_FAILED',
5
+ 'FACET_API_VERSION_UNAVAILABLE',
6
+ 'PERMISSION_NOT_GRANTED',
7
+ 'UNKNOWN_PROTOCOL_VERSION',
8
+ 'DUPLICATE_CONTRIBUTION_ID',
9
+ 'INVALID_MANIFEST',
10
+ ];