@deepseek-harness-tui/dsh-tui 0.17.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/README.md +43 -16
  2. package/bin/dsh-tui.js +46 -3
  3. package/cli/adapters/dsh/index.mjs +2 -2
  4. package/guide/dsh-tui-guide/cli.en.md +1 -1
  5. package/guide/dsh-tui-guide/cli.md +1 -1
  6. package/guide/dsh-tui-guide/codex-backend.en.md +2 -2
  7. package/guide/dsh-tui-guide/codex-backend.md +2 -2
  8. package/guide/dsh-tui-guide/configuration.en.md +8 -2
  9. package/guide/dsh-tui-guide/configuration.md +8 -2
  10. package/guide/dsh-tui-guide/getting-started.en.md +174 -6
  11. package/guide/dsh-tui-guide/getting-started.md +125 -15
  12. package/guide/dsh-tui-guide/interaction.en.md +30 -8
  13. package/guide/dsh-tui-guide/interaction.md +18 -5
  14. package/guide/dsh-tui-guide/plugins.en.md +28 -7
  15. package/guide/dsh-tui-guide/plugins.md +18 -5
  16. package/guide/dsh-tui-guide/user-guide.en.md +32 -17
  17. package/guide/dsh-tui-guide/user-guide.md +23 -12
  18. package/lib/settings.json +3 -3
  19. package/lib/types/adapter/channel/ui-policy.d.ts +1 -0
  20. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  21. package/lib/types/adapter/channel/ui-policy.js +1 -0
  22. package/lib/types/adapter/ports/channel-ui.d.ts +10 -2
  23. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  24. package/lib/types/adapter/ports/channel-view.d.ts +31 -5
  25. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  26. package/lib/types/adapter/standard/grants.d.ts +60 -0
  27. package/lib/types/adapter/standard/grants.d.ts.map +1 -1
  28. package/lib/types/adapter/standard/grants.js +74 -0
  29. package/lib/types/agent/events.d.ts +16 -3
  30. package/lib/types/agent/events.d.ts.map +1 -1
  31. package/lib/types/agent/session.d.ts +5 -0
  32. package/lib/types/agent/session.d.ts.map +1 -1
  33. package/lib/types/backends/claude/translate/core.d.ts +2 -2
  34. package/lib/types/backends/claude/translate/core.d.ts.map +1 -1
  35. package/lib/types/backends/claude/translate/core.js +10 -6
  36. package/lib/types/backends/codex/session/commands.d.ts +2 -0
  37. package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
  38. package/lib/types/backends/codex/session/commands.js +8 -4
  39. package/lib/types/backends/codex/session/input.d.ts +11 -7
  40. package/lib/types/backends/codex/session/input.d.ts.map +1 -1
  41. package/lib/types/backends/codex/session/input.js +68 -15
  42. package/lib/types/backends/codex/session/session.d.ts.map +1 -1
  43. package/lib/types/backends/codex/session/session.js +2 -3
  44. package/lib/types/channel/projection.d.ts.map +1 -1
  45. package/lib/types/channel/projection.js +78 -10
  46. package/lib/types/channel/questions.d.ts +19 -3
  47. package/lib/types/channel/questions.d.ts.map +1 -1
  48. package/lib/types/channel/sanitize.d.ts.map +1 -1
  49. package/lib/types/channel/sanitize.js +8 -4
  50. package/lib/types/channel/subagent-failure.d.ts +49 -0
  51. package/lib/types/channel/subagent-failure.d.ts.map +1 -0
  52. package/lib/types/channel/subagent-failure.js +59 -0
  53. package/lib/types/channel/transcript.d.ts +17 -0
  54. package/lib/types/channel/transcript.d.ts.map +1 -1
  55. package/lib/types/channel/transcript.js +35 -0
  56. package/lib/types/commands.js +2 -2
  57. package/lib/types/components/GoalTodoPanel.d.ts +71 -6
  58. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
  59. package/lib/types/components/GoalTodoPanel.js +165 -17
  60. package/lib/types/components/MessageList.d.ts.map +1 -1
  61. package/lib/types/components/MessageList.js +14 -9
  62. package/lib/types/components/PluginGrantList.d.ts +45 -0
  63. package/lib/types/components/PluginGrantList.d.ts.map +1 -0
  64. package/lib/types/components/PluginGrantList.js +126 -0
  65. package/lib/types/components/PluginInstallPane.d.ts.map +1 -1
  66. package/lib/types/components/PluginInstallPane.js +35 -6
  67. package/lib/types/components/PluginManagePane.d.ts.map +1 -1
  68. package/lib/types/components/PluginManagePane.js +65 -8
  69. package/lib/types/components/PromptInput.d.ts.map +1 -1
  70. package/lib/types/components/PromptInput.js +63 -8
  71. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  72. package/lib/types/components/SubagentDashboard.js +17 -1
  73. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  74. package/lib/types/components/SubagentDetailScene.js +12 -0
  75. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -1
  76. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  77. package/lib/types/components/messages/AssistantToolUseMessage.js +16 -7
  78. package/lib/types/components/onboardingModel.d.ts +2 -2
  79. package/lib/types/components/onboardingModel.js +3 -3
  80. package/lib/types/components/onboardingProviderPlan.d.ts +110 -0
  81. package/lib/types/components/onboardingProviderPlan.d.ts.map +1 -0
  82. package/lib/types/components/onboardingProviderPlan.js +78 -0
  83. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +5 -8
  84. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  85. package/lib/types/components/questions/AskUserQuestionPanel.js +7 -4
  86. package/lib/types/components/questions/PlanReviewPanel.d.ts +3 -6
  87. package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
  88. package/lib/types/components/revealScope.d.ts +15 -0
  89. package/lib/types/components/revealScope.d.ts.map +1 -0
  90. package/lib/types/components/revealScope.js +17 -0
  91. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +41 -1
  92. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
  93. package/lib/types/components/sidePanel/btw/BtwComposer.js +123 -6
  94. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
  95. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +9 -2
  96. package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +7 -1
  97. package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
  98. package/lib/types/components/sidePanel/btw/BtwThreadScene.js +9 -2
  99. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts +30 -0
  100. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts.map +1 -0
  101. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.js +94 -0
  102. package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
  103. package/lib/types/components/sidePanel/builtinPanels.js +14 -2
  104. package/lib/types/components/sidePanel/types.d.ts +2 -0
  105. package/lib/types/components/sidePanel/types.d.ts.map +1 -1
  106. package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
  107. package/lib/types/components/sidePanel/useSidePanel.js +15 -1
  108. package/lib/types/components/smoothReveal.d.ts +36 -6
  109. package/lib/types/components/smoothReveal.d.ts.map +1 -1
  110. package/lib/types/components/smoothReveal.js +92 -21
  111. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +4 -14
  112. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
  113. package/lib/types/components/workspaces/HomeWorkspaceRow.js +26 -17
  114. package/lib/types/dsh-adapter/backend/session.d.ts +7 -1
  115. package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -1
  116. package/lib/types/dsh-adapter/backend/session.js +74 -6
  117. package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
  118. package/lib/types/dsh-adapter/backend/translate.js +15 -6
  119. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +1 -1
  120. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
  121. package/lib/types/dsh-adapter/channel/agent-view-projection.js +3 -1
  122. package/lib/types/dsh-adapter/channel/attached-context.d.ts +15 -2
  123. package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -1
  124. package/lib/types/dsh-adapter/channel/attached-context.js +26 -3
  125. package/lib/types/dsh-adapter/channel/binding-events.d.ts +3 -0
  126. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  127. package/lib/types/dsh-adapter/channel/binding-events.js +43 -2
  128. package/lib/types/dsh-adapter/channel/composer-images.d.ts +2 -0
  129. package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
  130. package/lib/types/dsh-adapter/channel/composer-images.js +10 -2
  131. package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -1
  132. package/lib/types/dsh-adapter/channel/composer-mentions.js +22 -7
  133. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +3 -7
  134. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
  135. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +16 -6
  136. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +6 -0
  137. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
  138. package/lib/types/dsh-adapter/channel/core/binding-feed.js +35 -1
  139. package/lib/types/dsh-adapter/channel/core/compose.d.ts +3 -7
  140. package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
  141. package/lib/types/dsh-adapter/channel/core/compose.js +6 -1
  142. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
  143. package/lib/types/dsh-adapter/channel/core/local-actions.js +3 -26
  144. package/lib/types/dsh-adapter/channel/emitter.js +1 -1
  145. package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
  146. package/lib/types/dsh-adapter/channel/extensions.js +8 -0
  147. package/lib/types/dsh-adapter/channel/input-actions.d.ts +4 -4
  148. package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
  149. package/lib/types/dsh-adapter/channel/input-actions.js +59 -5
  150. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +3 -7
  151. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  152. package/lib/types/dsh-adapter/channel/input-delivery.js +21 -8
  153. package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
  154. package/lib/types/dsh-adapter/channel/mentions.js +21 -7
  155. package/lib/types/dsh-adapter/channel/model-actions.d.ts +4 -1
  156. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
  157. package/lib/types/dsh-adapter/channel/model-actions.js +26 -9
  158. package/lib/types/dsh-adapter/channel/model-selection.d.ts +27 -2
  159. package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
  160. package/lib/types/dsh-adapter/channel/model-selection.js +81 -37
  161. package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -1
  162. package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
  163. package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
  164. package/lib/types/dsh-adapter/channel/paths.js +11 -9
  165. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +1 -1
  166. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
  167. package/lib/types/dsh-adapter/channel/session-live-adoption.js +6 -1
  168. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
  169. package/lib/types/dsh-adapter/channel/session-reset.js +3 -1
  170. package/lib/types/dsh-adapter/channel/session-resume.d.ts +1 -1
  171. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
  172. package/lib/types/dsh-adapter/channel/session-resume.js +10 -3
  173. package/lib/types/dsh-adapter/channel/session-rewind.d.ts +1 -1
  174. package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
  175. package/lib/types/dsh-adapter/channel/session-rewind.js +9 -3
  176. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +1 -1
  177. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
  178. package/lib/types/dsh-adapter/channel/session-tree-actions.js +11 -5
  179. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  180. package/lib/types/dsh-adapter/channel/settings-host.js +6 -3
  181. package/lib/types/dsh-adapter/channel/transcript.d.ts +3 -2
  182. package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
  183. package/lib/types/dsh-adapter/channel/transcript.js +13 -4
  184. package/lib/types/dsh-adapter/channel/types.d.ts +11 -2
  185. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  186. package/lib/types/dsh-adapter/contract.d.ts +27 -3
  187. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  188. package/lib/types/dsh-adapter/contract.js +47 -5
  189. package/lib/types/dsh-adapter/entry-slot.d.ts +6 -0
  190. package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -1
  191. package/lib/types/dsh-adapter/experimental-bundles.d.ts +3 -0
  192. package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -1
  193. package/lib/types/dsh-adapter/experimental-bundles.js +4 -0
  194. package/lib/types/dsh-adapter/fresh-agent.d.ts +1 -1
  195. package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -1
  196. package/lib/types/dsh-adapter/fresh-agent.js +60 -11
  197. package/lib/types/dsh-adapter/grant-file.d.ts +70 -0
  198. package/lib/types/dsh-adapter/grant-file.d.ts.map +1 -0
  199. package/lib/types/dsh-adapter/grant-file.js +178 -0
  200. package/lib/types/dsh-adapter/host-access.d.ts +4 -0
  201. package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
  202. package/lib/types/dsh-adapter/host-access.js +114 -15
  203. package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
  204. package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -1
  205. package/lib/types/dsh-adapter/host-contract.js +5 -3
  206. package/lib/types/dsh-adapter/host-dsh.d.ts +0 -8
  207. package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -1
  208. package/lib/types/dsh-adapter/host-dsh.js +27 -6
  209. package/lib/types/dsh-adapter/host-entry.js +4 -0
  210. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  211. package/lib/types/dsh-adapter/index.js +8 -5
  212. package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
  213. package/lib/types/dsh-adapter/oauth/profiles.js +14 -1
  214. package/lib/types/dsh-adapter/panels.d.ts +7 -1
  215. package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
  216. package/lib/types/dsh-adapter/plugin-declaration.d.ts +28 -0
  217. package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -1
  218. package/lib/types/dsh-adapter/plugin-declaration.js +43 -1
  219. package/lib/types/dsh-adapter/plugin-install.d.ts +28 -1
  220. package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -1
  221. package/lib/types/dsh-adapter/plugin-install.js +160 -13
  222. package/lib/types/dsh-adapter/plugin-manage.d.ts +53 -10
  223. package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -1
  224. package/lib/types/dsh-adapter/plugin-manage.js +240 -51
  225. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  226. package/lib/types/dsh-adapter/plugin.js +203 -58
  227. package/lib/types/dsh-adapter/plugins-info.d.ts +6 -7
  228. package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
  229. package/lib/types/dsh-adapter/plugins-info.js +34 -21
  230. package/lib/types/dsh-adapter/presets.d.ts +41 -10
  231. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  232. package/lib/types/dsh-adapter/presets.js +59 -12
  233. package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
  234. package/lib/types/dsh-adapter/process-exit.js +1 -1
  235. package/lib/types/dsh-adapter/providerWizard.d.ts +2 -0
  236. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
  237. package/lib/types/dsh-adapter/providerWizard.js +11 -5
  238. package/lib/types/dsh-adapter/questions.d.ts +3 -4
  239. package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
  240. package/lib/types/dsh-adapter/questions.js +1 -1
  241. package/lib/types/dsh-adapter/row-attachment.d.ts +30 -0
  242. package/lib/types/dsh-adapter/row-attachment.d.ts.map +1 -0
  243. package/lib/types/dsh-adapter/row-attachment.js +29 -0
  244. package/lib/types/dsh-adapter/session-list-metadata.js +2 -2
  245. package/lib/types/dsh-adapter/subagents.d.ts +5 -0
  246. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  247. package/lib/types/dsh-adapter/subagents.js +22 -1
  248. package/lib/types/dsh-adapter/team-mode.d.ts +17 -10
  249. package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
  250. package/lib/types/dsh-adapter/team-mode.js +19 -12
  251. package/lib/types/dsh-adapter/tool-scope.d.ts +24 -0
  252. package/lib/types/dsh-adapter/tool-scope.d.ts.map +1 -0
  253. package/lib/types/dsh-adapter/tool-scope.js +127 -0
  254. package/lib/types/dsh-adapter/types.d.ts +2 -1
  255. package/lib/types/dsh-adapter/types.d.ts.map +1 -1
  256. package/lib/types/dsh-adapter/worktree-tool.d.ts +27 -0
  257. package/lib/types/dsh-adapter/worktree-tool.d.ts.map +1 -0
  258. package/lib/types/dsh-adapter/worktree-tool.js +87 -0
  259. package/lib/types/heldInputs.d.ts +75 -0
  260. package/lib/types/heldInputs.d.ts.map +1 -0
  261. package/lib/types/heldInputs.js +409 -0
  262. package/lib/types/i18n.d.ts +577 -34
  263. package/lib/types/i18n.d.ts.map +1 -1
  264. package/lib/types/i18n.js +230 -22
  265. package/lib/types/ink/components/App.d.ts +2 -0
  266. package/lib/types/ink/components/App.d.ts.map +1 -1
  267. package/lib/types/ink/components/App.js +8 -0
  268. package/lib/types/ink/events/input-event.d.ts.map +1 -1
  269. package/lib/types/ink/events/input-event.js +7 -6
  270. package/lib/types/ink/hit-test.d.ts +2 -0
  271. package/lib/types/ink/hit-test.d.ts.map +1 -1
  272. package/lib/types/ink/hit-test.js +10 -0
  273. package/lib/types/ink/hooks/use-program-status.d.ts +1 -1
  274. package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -1
  275. package/lib/types/ink/hooks/use-program-status.js +3 -2
  276. package/lib/types/ink/ink.d.ts +1 -0
  277. package/lib/types/ink/ink.d.ts.map +1 -1
  278. package/lib/types/ink/ink.js +5 -2
  279. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  280. package/lib/types/ink/parse-keypress.js +25 -0
  281. package/lib/types/ink/terminal.d.ts +13 -2
  282. package/lib/types/ink/terminal.d.ts.map +1 -1
  283. package/lib/types/ink/terminal.js +29 -5
  284. package/lib/types/onboardingDraft.d.ts +143 -0
  285. package/lib/types/onboardingDraft.d.ts.map +1 -0
  286. package/lib/types/onboardingDraft.js +71 -0
  287. package/lib/types/screens/Chat.d.ts.map +1 -1
  288. package/lib/types/screens/Chat.js +133 -32
  289. package/lib/types/screens/Onboarding.d.ts +22 -3
  290. package/lib/types/screens/Onboarding.d.ts.map +1 -1
  291. package/lib/types/screens/Onboarding.js +606 -36
  292. package/lib/types/screens/SessionSupervisor.d.ts +3 -6
  293. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  294. package/lib/types/screens/SessionSupervisor.js +5 -8
  295. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +1 -2
  296. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
  297. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +2 -2
  298. package/lib/types/screens/sessionSupervisor/model.d.ts +1 -1
  299. package/lib/types/screens/sessionSupervisor/model.js +1 -1
  300. package/lib/types/sessionMounts.d.ts +12 -5
  301. package/lib/types/sessionMounts.d.ts.map +1 -1
  302. package/lib/types/sessionMounts.js +33 -6
  303. package/lib/types/settings/definitions.js +2 -2
  304. package/lib/types/update.d.ts +412 -20
  305. package/lib/types/update.d.ts.map +1 -1
  306. package/lib/types/update.js +2094 -193
  307. package/lib/types/updateHost.d.ts +198 -0
  308. package/lib/types/updateHost.d.ts.map +1 -0
  309. package/lib/types/updateHost.js +608 -0
  310. package/lib/types/utils/paths.d.ts +15 -0
  311. package/lib/types/utils/paths.d.ts.map +1 -1
  312. package/lib/types/utils/paths.js +25 -0
  313. package/lib/types/utils/processName.d.ts +16 -0
  314. package/lib/types/utils/processName.d.ts.map +1 -0
  315. package/lib/types/utils/processName.js +27 -0
  316. package/package.json +114 -108
  317. package/tui-profile/feed/README.md +1 -1
  318. package/tui-profile/feed/first-party.json +1 -1
@@ -34,14 +34,20 @@
34
34
  * either way, so closing the pane does not stop it.
35
35
  */
36
36
  import { existsSync } from 'node:fs';
37
+ import { join } from 'node:path';
38
+ import { readGrantStore } from '../adapter/standard/grants.js';
39
+ import { adapterRuntimeFor } from '../adapter/kernel/runtime-context.js';
37
40
  import { t } from '../i18n.js';
38
41
  import { resolveDshProfileName } from '../update.js';
39
42
  import { backendDataDir, DATA_DIR } from '../utils/paths.js';
40
- import { COMPOSITION_PACKAGE, declaredBackendsOf, pluginDeclarationOf } from './plugin-declaration.js';
43
+ import { applyGrantMutation, grantFailureText, grantsFilePath, planGrants } from './grant-file.js';
44
+ import { COMPOSITION_PACKAGE, declaredBackendsOf, declaredGrantsOf, pluginDeclarationOf } from './plugin-declaration.js';
45
+ import { getHostGrantStore } from './host-grants.js';
41
46
  import { failureReasonOf } from './plugin-install.js';
42
47
  import { HOST_BUNDLE, pluginGuardVerdict, } from './plugin-guard.js';
43
48
  import { pluginManagerOf } from './plugin-manager.js';
44
- import { cell, parsePluginArgs, pluginFootprintContains } from './plugins-info.js';
49
+ import { cell, parsePluginArgs, pluginFootprintPaths, pluginFootprintSourcesOf } from './plugins-info.js';
50
+ import { storageFileName } from './plugin-storage.js';
45
51
  import { TEAM_BUNDLE } from './team-roster.js';
46
52
  const NO_TEAM_MEMBERS = { active: 0, unseen: 0 };
47
53
  /**
@@ -144,6 +150,10 @@ export function createPluginManageFlow(options) {
144
150
  let target;
145
151
  /** What the report calls it: its own name, never the argument text. */
146
152
  let label = '';
153
+ /** The bundle's declaration, captured while the package is still installed. */
154
+ let declaration;
155
+ /** The plan for that declaration's permissions; `undefined` when unreadable. */
156
+ let grantPlan;
147
157
  /** Whether the session that asked is still bound; false drops every write. */
148
158
  const live = () => options.binding() === bindingAtStart;
149
159
  const emit = (lines) => {
@@ -187,6 +197,13 @@ export function createPluginManageFlow(options) {
187
197
  if (bundle !== undefined) {
188
198
  target = bundleTarget(options.action, bundle);
189
199
  label = cell(bundle.name);
200
+ // Read once, before the write, for every bundle action: a removal can no
201
+ // longer read the declaration afterwards, and enable/disable need the
202
+ // same id and permissions.
203
+ declaration = captureDeclaration(bundle.name);
204
+ grantPlan = declaration?.kind === 'declared' && declaration.grants !== undefined && options.grants !== undefined
205
+ ? planGrants(options.grants, declaration.grants)
206
+ : undefined;
190
207
  return await guardThenDecide(bundleGuardTarget(bundle), () => ask(hostRowIdsOf(bundles)));
191
208
  }
192
209
  let plugin = plugins.find(candidate => candidate.entryId === wanted)
@@ -242,16 +259,120 @@ export function createPluginManageFlow(options) {
242
259
  const resolved = target;
243
260
  if (resolved === undefined)
244
261
  return { kind: 'done' };
262
+ const grants = resolved.kind === 'bundle' ? grantPlan : undefined;
245
263
  if (options.action === 'remove')
246
- return { kind: 'confirm', target: resolved, question: { kind: 'remove' } };
264
+ return { kind: 'confirm', target: resolved, question: { kind: 'remove' }, grants };
247
265
  if (options.action === 'disable') {
248
266
  const hostRow = resolved.kind === 'row' && resolved.patchId !== undefined && hostRowIds.has(resolved.patchId);
249
267
  if (hostRow)
250
- return { kind: 'confirm', target: resolved, question: { kind: 'host-row' } };
268
+ return { kind: 'confirm', target: resolved, question: { kind: 'host-row' }, grants };
251
269
  const { active, unseen } = resolved.kind === 'bundle' && resolved.name === TEAM_BUNDLE ? options.teamActiveMembers?.() ?? NO_TEAM_MEMBERS : NO_TEAM_MEMBERS;
252
- return active + unseen > 0 ? { kind: 'confirm', target: resolved, question: { kind: 'team-active', members: active, unseen } } : run();
270
+ return active + unseen > 0 ? { kind: 'confirm', target: resolved, question: { kind: 'team-active', members: active, unseen }, grants } : run();
253
271
  }
254
- return { kind: 'confirm', target: resolved, question: { kind: 'trust' } };
272
+ return { kind: 'confirm', target: resolved, question: { kind: 'trust' }, grants };
273
+ }
274
+ /**
275
+ * Read one bundle's declaration before the write. A resolver that throws is
276
+ * treated exactly like an unreadable declaration: the action goes on, and
277
+ * this flow reports that it cannot name the component rather than guessing
278
+ * an id.
279
+ */
280
+ function captureDeclaration(name) {
281
+ try {
282
+ return options.declarationOf?.(name);
283
+ }
284
+ catch {
285
+ return { kind: 'unreadable' };
286
+ }
287
+ }
288
+ /** The declared permission names a revoke acts on, de-duplicated, in order. */
289
+ function declaredNames(declared) {
290
+ return [...new Set(declared.permissions.map(permission => permission.name))];
291
+ }
292
+ /** What every grant write here hands the file layer. */
293
+ function grantWriteOptions() {
294
+ return {
295
+ dataDir: options.grantsDataDir,
296
+ knownPermissions: options.grants?.knownPermissions(),
297
+ };
298
+ }
299
+ /** Grant a bundle's declared permissions before its code is loaded (enable). */
300
+ async function ensureDeclared(plan) {
301
+ if (options.grants === undefined)
302
+ return undefined;
303
+ const write = await applyGrantMutation({ kind: 'ensure', id: plan.id, permissions: plan.entries }, grantWriteOptions());
304
+ if (!write.ok) {
305
+ emit([t('plugins-grant-write-refused', {
306
+ file: cell(grantsFilePath(options.grantsDataDir)),
307
+ reason: grantFailureText(write),
308
+ })]);
309
+ return undefined;
310
+ }
311
+ if (plan.unknown.length > 0) {
312
+ emit([t('plugins-grant-unknown-skipped', { names: cell(plan.unknown.join(', ')) })]);
313
+ }
314
+ if (write.changed) {
315
+ emit([t('plugins-manage-grant-granted', {
316
+ count: String(plan.entries.length),
317
+ id: cell(plan.id),
318
+ })]);
319
+ }
320
+ const store = options.grants;
321
+ if (store !== undefined) {
322
+ const unapplied = plan.entries.filter(entry => !store.allows({ componentId: plan.id }, entry.name, entry.scope));
323
+ if (unapplied.length > 0) {
324
+ emit([t('plugins-grant-unapplied', {
325
+ scopes: cell(unapplied.map(entry => `${entry.name}@${entry.scope}`).join(', ')),
326
+ })]);
327
+ }
328
+ }
329
+ return write;
330
+ }
331
+ /** Revoke the declared permission names after the code is unloaded (disable). */
332
+ async function revokeDeclared(declared) {
333
+ if (options.grants === undefined)
334
+ return;
335
+ const names = declaredNames(declared);
336
+ if (names.length === 0)
337
+ return;
338
+ const write = await applyGrantMutation({ kind: 'revoke', id: declared.id, names }, grantWriteOptions());
339
+ if (!write.ok) {
340
+ emit([t('plugins-manage-grant-revoke-failed', {
341
+ reason: grantFailureText(write),
342
+ id: cell(declared.id),
343
+ file: cell(grantsFilePath(options.grantsDataDir)),
344
+ })]);
345
+ return;
346
+ }
347
+ if (write.changed) {
348
+ emit([t('plugins-manage-grant-revoked', { count: String(names.length), id: cell(declared.id) })]);
349
+ }
350
+ }
351
+ /** Delete the component's grant entries after its package left (remove). */
352
+ async function forgetDeclared(declared) {
353
+ if (options.grants === undefined)
354
+ return;
355
+ const write = await applyGrantMutation({ kind: 'forget', id: declared.id }, grantWriteOptions());
356
+ if (!write.ok) {
357
+ // The one path that leaves an inheritance risk behind: a package reusing
358
+ // this component id would inherit these rules. Say so, with the id and
359
+ // the file, instead of a quiet warning.
360
+ emit([t('plugins-manage-grant-forget-failed', {
361
+ reason: grantFailureText(write),
362
+ id: cell(declared.id),
363
+ file: cell(grantsFilePath(options.grantsDataDir)),
364
+ })]);
365
+ return;
366
+ }
367
+ if (write.changed)
368
+ emit([t('plugins-manage-grant-forgotten', { id: cell(declared.id) })]);
369
+ }
370
+ /** An enable whose write failed: put the grant back, or say why not. */
371
+ async function rollbackGrant(write) {
372
+ if (write === undefined || !write.changed)
373
+ return;
374
+ const restored = await write.undo();
375
+ emit([t(restored ? 'plugins-grant-rolled-back' : 'plugins-grant-rollback-failed')]);
255
376
  }
256
377
  /** Write through the service, then turn its result into the next step. */
257
378
  async function run() {
@@ -263,16 +384,19 @@ export function createPluginManageFlow(options) {
263
384
  const refused = refuseWhileBusy();
264
385
  if (refused !== undefined)
265
386
  return refused;
266
- let residue;
267
- if (current.kind === 'bundle' && current.action === 'remove') {
268
- try {
269
- // The declaration is inside the package that the write removes.
270
- residue = options.residueOf?.(current.name);
271
- }
272
- catch {
273
- // An unreadable declaration leaves the removal's residue unjudged.
274
- }
387
+ // The declaration was captured in `decide()`, before the write: a removal
388
+ // can no longer read the package afterwards. A declaration that exists but
389
+ // cannot be read is reported here, with no id guessed.
390
+ if (current.kind === 'bundle' && declaration !== undefined
391
+ && (declaration.kind === 'unreadable' || declaration.grants === undefined)) {
392
+ emit([t('plugins-manage-grant-unhandled', { target: label })]);
275
393
  }
394
+ const declared = current.kind === 'bundle' && declaration?.kind === 'declared' ? declaration.grants : undefined;
395
+ const plan = current.kind === 'bundle' ? grantPlan : undefined;
396
+ // Grant before the write that loads the code; revoke and forget after the
397
+ // write that unloads it (grant lifecycle plan §6.2). A failed enable puts
398
+ // the grant back; the other two act only on a successful write.
399
+ const grantWrite = current.action === 'enable' && plan !== undefined ? await ensureDeclared(plan) : undefined;
276
400
  let result;
277
401
  try {
278
402
  result = await write(current);
@@ -281,13 +405,24 @@ export function createPluginManageFlow(options) {
281
405
  // The service folds its failures in-band; only a lock or a disposal error
282
406
  // rejects, and that still has to leave a readable line behind.
283
407
  emit([t('plugins-manage-failed', { reason: cell(error instanceof Error ? error.message : String(error)) })]);
408
+ if (current.action === 'enable')
409
+ await rollbackGrant(grantWrite);
284
410
  return { kind: 'done' };
285
411
  }
286
412
  // None of these three offers a cancellation; a service that reports one
287
413
  // anyway has already been reported by whatever stopped it.
288
- if (result.application === 'cancelled')
414
+ if (result.application === 'cancelled') {
415
+ if (current.action === 'enable')
416
+ await rollbackGrant(grantWrite);
289
417
  return { kind: 'done' };
418
+ }
290
419
  if (result.application === 'failed') {
420
+ // The profile's own files decide whether the enable landed: a reload
421
+ // failure after the selection was saved keeps the grant (the next start
422
+ // enables the bundle with its declaration), while a failed save puts it
423
+ // back. `application` alone cannot tell the two apart.
424
+ if (current.action === 'enable' && !result.changed)
425
+ await rollbackGrant(grantWrite);
291
426
  const incompatible = result.error?.code === 'incompatible-version' ? result.error.incompatible ?? [] : [];
292
427
  emit([
293
428
  t('plugins-manage-failed', { reason: failureReasonOf(result) }),
@@ -301,12 +436,26 @@ export function createPluginManageFlow(options) {
301
436
  }),
302
437
  t('plugins-install-rescue'),
303
438
  ]);
439
+ if (current.action === 'enable' && result.changed)
440
+ emit([t('plugins-manage-enable-persisted')]);
304
441
  return { kind: 'done' };
305
442
  }
443
+ // The write landed (or the profile was already in that state): a disable is
444
+ // still "off and revoked", and a removal still forgets the component. The
445
+ // declaration was read before the write, which is the only moment it could
446
+ // be read.
447
+ if (declared !== undefined) {
448
+ if (current.action === 'remove')
449
+ await forgetDeclared(declared);
450
+ else if (current.action === 'disable')
451
+ await revokeDeclared(declared);
452
+ }
306
453
  // A disk no-op says nothing about higher-priority overrides or a pending
307
454
  // restart. Only an applied no-op is already in the requested state.
308
455
  if (!result.changed && result.application === 'applied') {
309
456
  emit([t('plugins-manage-unchanged', { target: label })]);
457
+ if (current.kind === 'bundle' && current.action === 'remove')
458
+ reportResidue(current.name, declaration);
310
459
  return { kind: 'done' };
311
460
  }
312
461
  const stateKey = result.application === 'restart-required'
@@ -317,7 +466,7 @@ export function createPluginManageFlow(options) {
317
466
  ...result.application === 'restart-required' ? [t('plugins-install-restart-hint')] : [],
318
467
  ]);
319
468
  if (current.kind === 'bundle' && current.action === 'remove')
320
- reportResidue(current.name, residue);
469
+ reportResidue(current.name, declaration);
321
470
  return { kind: 'done' };
322
471
  }
323
472
  /** The service call one action makes, with the id shape the service takes. */
@@ -332,15 +481,22 @@ export function createPluginManageFlow(options) {
332
481
  }
333
482
  /**
334
483
  * What one removal left in this profile. The service rolls the profile's own
335
- * files back; everything under `~/.dsh-tui` — a backend's data directory, its
336
- * grants, its storage namespaces — is the person's own data and stays.
337
- * Reported once, deleted by nobody but them (decision D). Silent when the
338
- * watch judged the removal and found nothing: an "all clean" line on every
339
- * removal would be noise, and for a bundle that never had a backend it would
340
- * also answer a question nobody asked.
484
+ * files back; everything under `~/.dsh-tui` — a backend's data directory, the
485
+ * effect ledger, storage namespaces — is the person's own data and stays.
486
+ * The component's **grant entries** are the one exception: they are deleted
487
+ * with the component, because a later package reusing its id would inherit
488
+ * them (grant lifecycle plan D-3). Reported by source (D-5), once. Silent
489
+ * when the declaration was read and nothing is left.
341
490
  */
342
- function reportResidue(name, watch) {
491
+ function reportResidue(name, declaration) {
492
+ if (declaration === undefined || declaration.kind === 'unreadable') {
493
+ emit([t('plugins-manage-residue-unjudged', { target: cell(name) })]);
494
+ return;
495
+ }
496
+ const watch = declaration.residue;
343
497
  if (watch === undefined) {
498
+ // The declaration named no identity this check could look for. The old
499
+ // residue watch answered the same way: not judged, never "clean".
344
500
  emit([t('plugins-manage-residue-unjudged', { target: cell(name) })]);
345
501
  return;
346
502
  }
@@ -380,11 +536,11 @@ export function createPluginManageFlow(options) {
380
536
  * through (the screen then runs the read-only report, which is where the CLI
381
537
  * route is printed).
382
538
  *
383
- * This is the one place that knows how a removal is wired to the running
384
- * composition, and the only place that touches the person's own data. The
385
- * residue watch is built here, **while the bundle is still installed**: the
386
- * declaration that names its data directory and its plugin identity is a file
387
- * inside the package, so it is unreadable once the bundle has left.
539
+ * This is the one place that knows how a lifecycle action is wired to the
540
+ * running composition, and the only place that touches the person's own data.
541
+ * The bundle's declaration is read here, **while it is still installed**: its
542
+ * grants and the residue watch both come from a file inside the package, so
543
+ * both are unreadable once the bundle has left.
388
544
  */
389
545
  export function createPluginManageEntry(ctx, options = {}) {
390
546
  return (args, sink) => {
@@ -396,6 +552,9 @@ export function createPluginManageEntry(ctx, options = {}) {
396
552
  const manager = pluginManagerOf(ctx);
397
553
  if (manager === undefined)
398
554
  return undefined;
555
+ // The same live store the /plugin report and the plugin-host row use.
556
+ const grants = getHostGrantStore(ctx.get('tuiPluginHost'))
557
+ ?? readGrantStore(undefined, undefined, adapterRuntimeFor(ctx));
399
558
  return createPluginManageFlow({
400
559
  manager,
401
560
  action: parsed.kind,
@@ -405,9 +564,8 @@ export function createPluginManageEntry(ctx, options = {}) {
405
564
  onLines: sink.onLines,
406
565
  teamActiveMembers: sink.teamActiveMembers,
407
566
  profileName: options.profileName ?? resolveDshProfileName(),
408
- // Only a removal has anything to leave behind, and only a removal has a
409
- // package to read the declaration from.
410
- residueOf: parsed.kind === 'remove' ? name => residueWatchOf(ctx, name) : undefined,
567
+ grants,
568
+ declarationOf: name => bundleDeclarationOf(ctx, name),
411
569
  });
412
570
  };
413
571
  }
@@ -426,6 +584,22 @@ export function createPluginManageEntry(ctx, options = {}) {
426
584
  * is not evidence of a clean removal, only of an unanswerable question.
427
585
  */
428
586
  export function residueWatchOf(ctx, name, dataRoot = DATA_DIR) {
587
+ const declaration = bundleDeclarationOf(ctx, name, dataRoot);
588
+ return declaration?.kind === 'declared' ? declaration.residue : undefined;
589
+ }
590
+ /**
591
+ * Read one installed bundle's declaration once, before any lifecycle write.
592
+ *
593
+ * The declaration is the package's own file, so it has to be read while the
594
+ * package is still there: after a removal it is gone, and after an enable or
595
+ * disable the grants half still has to name the component id. The raw parse
596
+ * feeds both answers — the residue watch (which trusts the declaration's own
597
+ * `id`/Backend ids, as before) and the grants reader (which applies the same
598
+ * parse/projection gates every other consumer does). A file that exists but
599
+ * cannot be read is `unreadable`, never "no declaration": the two lead to
600
+ * different reports.
601
+ */
602
+ export function bundleDeclarationOf(ctx, name, dataRoot = DATA_DIR) {
429
603
  const declaration = pluginDeclarationOf(ctx, name);
430
604
  if (declaration === undefined)
431
605
  return undefined;
@@ -434,27 +608,42 @@ export function residueWatchOf(ctx, name, dataRoot = DATA_DIR) {
434
608
  parsed = JSON.parse(declaration.source);
435
609
  }
436
610
  catch {
437
- return undefined;
611
+ return { kind: 'unreadable' };
438
612
  }
439
- const record = parsed !== null && typeof parsed === 'object' ? parsed : undefined;
440
- const componentId = typeof record?.id === 'string' && record.id !== '' ? record.id : undefined;
613
+ if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed))
614
+ return { kind: 'unreadable' };
615
+ const record = parsed;
616
+ const componentId = typeof record.id === 'string' && record.id !== '' ? record.id : undefined;
441
617
  const backendIds = backendIdsIn(record);
442
- if (componentId === undefined && backendIds.length === 0)
443
- return undefined;
444
- return () => {
445
- const left = [];
446
- for (const backendId of backendIds) {
447
- const dir = backendDataDir(backendId, dataRoot);
448
- if (existsSync(dir))
449
- left.push(dir);
450
- }
451
- // The three footprint sources the grant matrix unions, asked through the
452
- // same reader that drew it — never by a second one that could disagree.
453
- if (componentId !== undefined && pluginFootprintContains(componentId, { dataDir: dataRoot })) {
454
- left.push(t('plugins-manage-residue-footprint', { id: cell(componentId) }));
455
- }
456
- return left;
457
- };
618
+ const grants = declaredGrantsOf(record);
619
+ const residue = componentId === undefined && backendIds.length === 0
620
+ ? undefined
621
+ : () => {
622
+ const left = [];
623
+ for (const backendId of backendIds) {
624
+ const dir = backendDataDir(backendId, dataRoot);
625
+ if (existsSync(dir))
626
+ left.push(dir);
627
+ }
628
+ if (componentId !== undefined) {
629
+ // One source per line (D-5): the grants entry was deleted with the
630
+ // component, so what remains here is the audit ledger and the person's
631
+ // storage namespace, each named by its own path.
632
+ const sources = pluginFootprintSourcesOf(componentId, { dataDir: dataRoot });
633
+ const paths = pluginFootprintPaths({ dataDir: dataRoot });
634
+ const id = cell(componentId);
635
+ if (sources.ledger)
636
+ left.push(t('plugins-manage-residue-ledger', { id, file: cell(paths.ledgerFile) }));
637
+ if (sources.storage) {
638
+ left.push(t('plugins-manage-residue-storage', {
639
+ id,
640
+ file: cell(join(paths.storageDir, `${storageFileName(componentId)}.json`)),
641
+ }));
642
+ }
643
+ }
644
+ return left;
645
+ };
646
+ return { kind: 'declared', grants, residue };
458
647
  }
459
648
  /**
460
649
  * The backend ids a declaration contributes. Only a `Backend` entry names one,
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAA;AAGhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAA+D,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAsBtH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