@av-pi-studio/workbench 0.0.0-stage → 0.0.117

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 (273) hide show
  1. package/README.md +157 -2
  2. package/dist/chunks/BinaryFallbackViewer-BN-9Yvel.js +19 -0
  3. package/dist/chunks/ChatPanel-CjPUJMEs.js +2493 -0
  4. package/dist/chunks/CodeView-6kJms_MF.js +143 -0
  5. package/dist/chunks/DiffView-BqDuT3CF.js +48 -0
  6. package/dist/chunks/FilePanel-B8IXG2bj.js +92 -0
  7. package/dist/chunks/HtmlViewer-DpuVFaDo.js +490 -0
  8. package/dist/chunks/ImageViewer-BBfyA5QN.js +27 -0
  9. package/dist/chunks/MarkdownFileViewer-DPFPDS7G.js +88 -0
  10. package/dist/chunks/ModelProvidersPanel-Dsezq7Ss.js +95 -0
  11. package/dist/chunks/MoleculeViewerPanel-DEEU6Zkx.js +191 -0
  12. package/dist/chunks/PdfViewer-BdacmAu_.js +300 -0
  13. package/dist/chunks/SaveFileButton-2rOu02Xx.js +33 -0
  14. package/dist/chunks/SettingsDialog-DO1tDhMW.js +471 -0
  15. package/dist/chunks/SkillsPanel-DZDia4Pw.js +833 -0
  16. package/dist/chunks/TerminalPanel-bphwCSyW.js +242 -0
  17. package/dist/chunks/TextViewer-CVGqN6yy.js +63 -0
  18. package/dist/chunks/VideoViewer-BkB9BoOr.js +20 -0
  19. package/dist/chunks/ViewersPanel-C2E9FLf7.js +50 -0
  20. package/dist/chunks/href-resolution-jv3tpRcp.js +25 -0
  21. package/dist/chunks/index-Dlz8mEKZ.js +6258 -0
  22. package/dist/chunks/markdown-B2OXhZ-_.js +353 -0
  23. package/dist/chunks/provider-auth-store-C1GaLTlw.js +34 -0
  24. package/dist/chunks/use-file-download-CogCqTvU.js +31 -0
  25. package/dist/chunks/use-file-watch-Bb_Xzbr-.js +55 -0
  26. package/dist/chunks/use-provider-auth-list-DTjIZycd.js +16 -0
  27. package/dist/features/agent-ui/AskCard.d.ts +62 -0
  28. package/dist/features/agent-ui/agent-ui-store.d.ts +84 -0
  29. package/dist/features/agent-ui/announce.d.ts +51 -0
  30. package/dist/features/agent-ui/ask-list.d.ts +53 -0
  31. package/dist/features/agent-ui/ask-placement.d.ts +47 -0
  32. package/dist/features/agent-ui/deadline.d.ts +27 -0
  33. package/dist/features/agent-ui/keyboard.d.ts +37 -0
  34. package/dist/features/agent-ui/notify-effect.d.ts +41 -0
  35. package/dist/features/agent-ui/option-layout.d.ts +24 -0
  36. package/dist/features/agent-ui/outcome-line.d.ts +38 -0
  37. package/dist/features/agent-ui/prompt-text.d.ts +24 -0
  38. package/dist/features/chat/Attachments.d.ts +20 -0
  39. package/dist/features/chat/ChatPanel.d.ts +12 -0
  40. package/dist/features/chat/CommandMenu.d.ts +41 -0
  41. package/dist/features/chat/Composer.d.ts +58 -0
  42. package/dist/features/chat/ForkDialog.d.ts +24 -0
  43. package/dist/features/chat/ModelMenu.d.ts +54 -0
  44. package/dist/features/chat/ThinkingMenu.d.ts +39 -0
  45. package/dist/features/chat/Timeline.d.ts +30 -0
  46. package/dist/features/chat/TurnProgressBar.d.ts +14 -0
  47. package/dist/features/chat/composer-busy.d.ts +22 -0
  48. package/dist/features/chat/composer-gate.d.ts +37 -0
  49. package/dist/features/chat/composer-path-drop.d.ts +75 -0
  50. package/dist/features/chat/fork-correlation.d.ts +39 -0
  51. package/dist/features/chat/fork-gate.d.ts +27 -0
  52. package/dist/features/chat/fork-picker-nav.d.ts +14 -0
  53. package/dist/features/chat/fork-result.d.ts +43 -0
  54. package/dist/features/chat/model-menu-sort.d.ts +30 -0
  55. package/dist/features/chat/onboarding-nudge.d.ts +18 -0
  56. package/dist/features/chat/rows/AssistantRow.d.ts +24 -0
  57. package/dist/features/chat/rows/CompactionRow.d.ts +16 -0
  58. package/dist/features/chat/rows/ErrorRow.d.ts +13 -0
  59. package/dist/features/chat/rows/ReasoningRow.d.ts +16 -0
  60. package/dist/features/chat/rows/RowShell.d.ts +37 -0
  61. package/dist/features/chat/rows/SystemRow.d.ts +11 -0
  62. package/dist/features/chat/rows/ToolCard.d.ts +30 -0
  63. package/dist/features/chat/rows/UserRow.d.ts +43 -0
  64. package/dist/features/chat/slash-commands.d.ts +81 -0
  65. package/dist/features/chat/thinking-level-source.d.ts +29 -0
  66. package/dist/features/chat/todos/TodoPanel.d.ts +11 -0
  67. package/dist/features/chat/todos/agent-todos-store.d.ts +35 -0
  68. package/dist/features/chat/todos/todo-collapse-codec.d.ts +12 -0
  69. package/dist/features/chat/todos/todo-panel-model.d.ts +37 -0
  70. package/dist/features/chat/use-bottom-anchor.d.ts +33 -0
  71. package/dist/features/chat/use-fork-action.d.ts +32 -0
  72. package/dist/features/connection/ConnectionBar.d.ts +18 -0
  73. package/dist/features/connection/connection-presentation.d.ts +70 -0
  74. package/dist/features/files/BinaryFallbackViewer.d.ts +9 -0
  75. package/dist/features/files/CodeView.d.ts +15 -0
  76. package/dist/features/files/DiffView.d.ts +18 -0
  77. package/dist/features/files/FileContextMenu.d.ts +13 -0
  78. package/dist/features/files/FileExplorer.d.ts +24 -0
  79. package/dist/features/files/FilePanel.d.ts +26 -0
  80. package/dist/features/files/HtmlViewer.d.ts +22 -0
  81. package/dist/features/files/ImageViewer.d.ts +8 -0
  82. package/dist/features/files/MarkdownFileViewer.d.ts +14 -0
  83. package/dist/features/files/MoleculeViewer.d.ts +60 -0
  84. package/dist/features/files/MoleculeViewerPanel.d.ts +9 -0
  85. package/dist/features/files/PdfViewer.d.ts +14 -0
  86. package/dist/features/files/RightSidebar.d.ts +9 -0
  87. package/dist/features/files/SaveFileButton.d.ts +9 -0
  88. package/dist/features/files/TextViewer.d.ts +23 -0
  89. package/dist/features/files/TreeDraftRow.d.ts +15 -0
  90. package/dist/features/files/TreeNode.d.ts +42 -0
  91. package/dist/features/files/TreeRenameRow.d.ts +19 -0
  92. package/dist/features/files/VideoViewer.d.ts +8 -0
  93. package/dist/features/files/create-entry.d.ts +23 -0
  94. package/dist/features/files/delete-entry.d.ts +17 -0
  95. package/dist/features/files/file-tree.d.ts +92 -0
  96. package/dist/features/files/git-status-index.d.ts +37 -0
  97. package/dist/features/files/html-asset-loader.d.ts +43 -0
  98. package/dist/features/files/html-assets.d.ts +97 -0
  99. package/dist/features/files/html-sandbox.d.ts +62 -0
  100. package/dist/features/files/molecule-reload.d.ts +20 -0
  101. package/dist/features/files/molecule-source.d.ts +10 -0
  102. package/dist/features/files/molecule-theme.d.ts +31 -0
  103. package/dist/features/files/move-entry.d.ts +10 -0
  104. package/dist/features/files/move-status.d.ts +10 -0
  105. package/dist/features/files/move-target.d.ts +31 -0
  106. package/dist/features/files/open-file-tab.d.ts +32 -0
  107. package/dist/features/files/pdf-layout.d.ts +28 -0
  108. package/dist/features/files/pdfjs-runtime.d.ts +30 -0
  109. package/dist/features/files/polymer-file.d.ts +33 -0
  110. package/dist/features/files/text-viewer-state.d.ts +53 -0
  111. package/dist/features/files/upload-sources.d.ts +20 -0
  112. package/dist/features/files/viewer-registry.d.ts +81 -0
  113. package/dist/features/files/write-file.d.ts +12 -0
  114. package/dist/features/git/ChangesPanel.d.ts +13 -0
  115. package/dist/features/provider-auth/LoginDialog.d.ts +21 -0
  116. package/dist/features/provider-auth/ModelProvidersPanel.d.ts +12 -0
  117. package/dist/features/provider-auth/QrCode.d.ts +26 -0
  118. package/dist/features/provider-auth/login-flow.d.ts +55 -0
  119. package/dist/features/provider-auth/provider-auth-presentation.d.ts +31 -0
  120. package/dist/features/provider-auth/provider-auth-store.d.ts +42 -0
  121. package/dist/features/sessions/SessionContextMenu.d.ts +11 -0
  122. package/dist/features/sessions/SessionItem.d.ts +22 -0
  123. package/dist/features/sessions/SessionList.d.ts +9 -0
  124. package/dist/features/sessions/WorkspaceContextMenu.d.ts +9 -0
  125. package/dist/features/sessions/WorkspaceGroupHeader.d.ts +26 -0
  126. package/dist/features/sessions/apply-agent-deep-link.d.ts +7 -0
  127. package/dist/features/sessions/open-chat-tab.d.ts +14 -0
  128. package/dist/features/sessions/open-workspace.d.ts +20 -0
  129. package/dist/features/sessions/session-actions.d.ts +18 -0
  130. package/dist/features/sessions/session-presentation.d.ts +47 -0
  131. package/dist/features/sessions/status-map.d.ts +10 -0
  132. package/dist/features/sessions/workspace-grouping.d.ts +30 -0
  133. package/dist/features/settings/SettingsDialog.d.ts +22 -0
  134. package/dist/features/settings/ViewersPanel.d.ts +18 -0
  135. package/dist/features/settings/settings-categories.d.ts +32 -0
  136. package/dist/features/skills/InstallSkillDialog.d.ts +21 -0
  137. package/dist/features/skills/SkillsPanel.d.ts +32 -0
  138. package/dist/features/skills/skills-presentation.d.ts +159 -0
  139. package/dist/features/skills/use-skills.d.ts +215 -0
  140. package/dist/features/terminal/TerminalPanel.d.ts +37 -0
  141. package/dist/features/terminal/terminal-font.d.ts +44 -0
  142. package/dist/features/terminal/terminal-size.d.ts +52 -0
  143. package/dist/features/workspace/ContextMeter.d.ts +15 -0
  144. package/dist/features/workspace/ContextMeterPopover.d.ts +16 -0
  145. package/dist/features/workspace/DropPreview.d.ts +23 -0
  146. package/dist/features/workspace/PaneDividers.d.ts +30 -0
  147. package/dist/features/workspace/StatusBar.d.ts +16 -0
  148. package/dist/features/workspace/TabContextMenu.d.ts +15 -0
  149. package/dist/features/workspace/TabPanelHost.d.ts +30 -0
  150. package/dist/features/workspace/TabStrip.d.ts +36 -0
  151. package/dist/features/workspace/compact-action.d.ts +21 -0
  152. package/dist/features/workspace/context-meter.d.ts +26 -0
  153. package/dist/features/workspace/external-drag.d.ts +99 -0
  154. package/dist/features/workspace/pane-dnd.d.ts +70 -0
  155. package/dist/features/workspace/pane-layout-view.d.ts +73 -0
  156. package/dist/features/workspace/pane-tree.d.ts +141 -0
  157. package/dist/features/workspace/panel-registry.d.ts +13 -0
  158. package/dist/features/workspace/reopen-client-tabs.d.ts +44 -0
  159. package/dist/features/workspace/restore-active-workspace.d.ts +30 -0
  160. package/dist/features/workspace/status-bar-format.d.ts +20 -0
  161. package/dist/features/workspace/tab-attention.d.ts +35 -0
  162. package/dist/features/workspace-picker/OpenWorkspaceDialog.d.ts +11 -0
  163. package/dist/fonts/CascadiaMono.woff2 +0 -0
  164. package/dist/fonts/CascadiaMonoNF.woff2 +0 -0
  165. package/dist/fonts/LICENSE-Cascadia.txt +97 -0
  166. package/dist/fonts.css +60 -0
  167. package/dist/hooks/agent-stream-events.d.ts +20 -0
  168. package/dist/hooks/file-text-state.d.ts +31 -0
  169. package/dist/hooks/file-transfer-instance.d.ts +10 -0
  170. package/dist/hooks/use-agent-commands.d.ts +18 -0
  171. package/dist/hooks/use-agent-deep-link-boot.d.ts +9 -0
  172. package/dist/hooks/use-agent-stream.d.ts +15 -0
  173. package/dist/hooks/use-agent-todos.d.ts +10 -0
  174. package/dist/hooks/use-checkout-status.d.ts +13 -0
  175. package/dist/hooks/use-connection.d.ts +27 -0
  176. package/dist/hooks/use-explorer-tree.d.ts +20 -0
  177. package/dist/hooks/use-explorer-watch.d.ts +39 -0
  178. package/dist/hooks/use-explorer.d.ts +21 -0
  179. package/dist/hooks/use-external-pane-drop.d.ts +47 -0
  180. package/dist/hooks/use-file-diff.d.ts +9 -0
  181. package/dist/hooks/use-file-download.d.ts +18 -0
  182. package/dist/hooks/use-file-live-refresh.d.ts +31 -0
  183. package/dist/hooks/use-file-read.d.ts +31 -0
  184. package/dist/hooks/use-file-source.d.ts +16 -0
  185. package/dist/hooks/use-file-text.d.ts +21 -0
  186. package/dist/hooks/use-file-transfer.d.ts +18 -0
  187. package/dist/hooks/use-file-watch.d.ts +36 -0
  188. package/dist/hooks/use-home-dir.d.ts +14 -0
  189. package/dist/hooks/use-inline-image.d.ts +37 -0
  190. package/dist/hooks/use-is-compacting.d.ts +9 -0
  191. package/dist/hooks/use-pane-drag.d.ts +40 -0
  192. package/dist/hooks/use-pane-layout.d.ts +40 -0
  193. package/dist/hooks/use-provider-auth-list.d.ts +19 -0
  194. package/dist/hooks/use-provider-models.d.ts +14 -0
  195. package/dist/hooks/use-session-restore.d.ts +44 -0
  196. package/dist/hooks/use-session-stats.d.ts +40 -0
  197. package/dist/hooks/use-shortcuts.d.ts +6 -0
  198. package/dist/hooks/use-terminal-exit-watch.d.ts +47 -0
  199. package/dist/hooks/use-terminal-restore.d.ts +38 -0
  200. package/dist/hooks/use-thinking-levels.d.ts +13 -0
  201. package/dist/hooks/use-timeline-reset-watch.d.ts +43 -0
  202. package/dist/hooks/use-viewer-settings.d.ts +17 -0
  203. package/dist/host/browser-clipboard.d.ts +9 -0
  204. package/dist/host/browser-connection.d.ts +13 -0
  205. package/dist/host/browser-files.d.ts +9 -0
  206. package/dist/host/browser-host.d.ts +14 -0
  207. package/dist/host/browser-launch.d.ts +19 -0
  208. package/dist/host/browser-worker-timers.d.ts +29 -0
  209. package/dist/host/external-link.d.ts +14 -0
  210. package/dist/host/index.d.ts +4 -0
  211. package/dist/host/install.d.ts +21 -0
  212. package/dist/host/types.d.ts +168 -0
  213. package/dist/index.d.ts +14 -0
  214. package/dist/index.js +18 -0
  215. package/dist/lib/agent-deep-link.d.ts +29 -0
  216. package/dist/lib/connection/connection-store.d.ts +49 -0
  217. package/dist/lib/connection/files-changed.d.ts +41 -0
  218. package/dist/lib/connection/live-file-transfer.d.ts +8 -0
  219. package/dist/lib/connection/normalize-url.d.ts +16 -0
  220. package/dist/lib/connection/query-client.d.ts +3 -0
  221. package/dist/lib/connection/resolve-connect-target.d.ts +10 -0
  222. package/dist/lib/connection/resume-action.d.ts +33 -0
  223. package/dist/lib/connection/resume-handler.d.ts +6 -0
  224. package/dist/lib/connection/rpc-keys.d.ts +39 -0
  225. package/dist/lib/drag-guard.d.ts +39 -0
  226. package/dist/lib/inline-image-cache.d.ts +34 -0
  227. package/dist/lib/pane-layout-persistence.d.ts +74 -0
  228. package/dist/lib/paths.d.ts +33 -0
  229. package/dist/lib/protocol/events.d.ts +19 -0
  230. package/dist/lib/protocol/timeline-paging.d.ts +29 -0
  231. package/dist/lib/random-id.d.ts +16 -0
  232. package/dist/shell/Workbench.d.ts +6 -0
  233. package/dist/shell/WorkbenchBoot.d.ts +4 -0
  234. package/dist/shell/WorkbenchProvider.d.ts +10 -0
  235. package/dist/shell/WorkspaceShell.d.ts +12 -0
  236. package/dist/shell/context.d.ts +8 -0
  237. package/dist/shell/hooks.d.ts +32 -0
  238. package/dist/shell/regions.d.ts +17 -0
  239. package/dist/stores/compaction-store.d.ts +45 -0
  240. package/dist/stores/deep-link-store.d.ts +15 -0
  241. package/dist/stores/draft-store.d.ts +45 -0
  242. package/dist/stores/explorer-store.d.ts +63 -0
  243. package/dist/stores/fork-store.d.ts +69 -0
  244. package/dist/stores/git-store.d.ts +59 -0
  245. package/dist/stores/layout-store.d.ts +137 -0
  246. package/dist/stores/materialize.d.ts +47 -0
  247. package/dist/stores/session-store.d.ts +76 -0
  248. package/dist/stores/stats-store.d.ts +48 -0
  249. package/dist/stores/tab-store.d.ts +145 -0
  250. package/dist/stores/ui-store.d.ts +85 -0
  251. package/dist/styles.css +1 -0
  252. package/dist/timeline/FileLink.d.ts +22 -0
  253. package/dist/timeline/InlineImage.d.ts +16 -0
  254. package/dist/timeline/bottom-anchor.d.ts +77 -0
  255. package/dist/timeline/compaction.d.ts +12 -0
  256. package/dist/timeline/file-link-src.d.ts +34 -0
  257. package/dist/timeline/file-open-target.d.ts +19 -0
  258. package/dist/timeline/format-meta-time.d.ts +10 -0
  259. package/dist/timeline/highlight.d.ts +9 -0
  260. package/dist/timeline/href-resolution.d.ts +34 -0
  261. package/dist/timeline/image-src.d.ts +32 -0
  262. package/dist/timeline/inline-image-view.d.ts +34 -0
  263. package/dist/timeline/live-tail.d.ts +5 -0
  264. package/dist/timeline/markdown.d.ts +35 -0
  265. package/dist/timeline/mermaid-theme.d.ts +23 -0
  266. package/dist/timeline/reducer.d.ts +38 -0
  267. package/dist/timeline/row-model.d.ts +154 -0
  268. package/dist/timeline/streaming-split.d.ts +42 -0
  269. package/dist/timeline/tool-mapping.d.ts +60 -0
  270. package/dist/viewer-plugins/viewer-settings-store.d.ts +55 -0
  271. package/dist/vite/index.d.ts +36 -0
  272. package/dist/vite/index.js +39 -0
  273. package/package.json +81 -4
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Pure slash-command logic for the composer's `/` picker (sprint-040 web-client half) — kept out
3
+ * of `Composer.tsx`/`CommandMenu.tsx` so it's unit-testable under the root vitest config (which
4
+ * only discovers `.test.ts` files under a node environment; `.tsx` component files are not
5
+ * picked up there, following `model-menu-sort.ts`'s precedent).
6
+ *
7
+ * Every function here works with Pi's own token grammar
8
+ * (`^\/([^\s]+)(?:\s+([\s\S]*))?$`, `node_modules/@earendil-works/pi-coding-agent/dist/core/
9
+ * prompt-templates.js:221-229`) and its exact, case-sensitive command-name matching
10
+ * (`dist/core/extensions/runner.js:436-438`), so `knownCommandSpan`'s highlight doubles as a live
11
+ * "Pi will recognize this" indicator rather than decoration.
12
+ */
13
+ import type { ComboboxOption } from "@av-pi-studio/ui-library";
14
+ /** The fields of an `agent_list_commands_response` entry this module needs. */
15
+ export interface SlashCommand {
16
+ name: string;
17
+ description?: string;
18
+ source?: string;
19
+ scope?: string;
20
+ }
21
+ /**
22
+ * Commands the web client runs itself, listed in the picker ahead of Pi's own. Pi's TUI built-ins
23
+ * (`/compact`, `/session`, …) are not in `get_commands` and the `prompt` RPC does not run them —
24
+ * typed into the composer they would reach the model as literal text — so a built-in with a real RPC
25
+ * equivalent is intercepted client-side instead (sprint-074: only `compact`). They shadow a Pi
26
+ * command of the same name, matching the TUI, which tries built-ins before extension commands.
27
+ */
28
+ export declare const CLIENT_BUILTIN_COMMANDS: readonly SlashCommand[];
29
+ /** A draft that invokes a client built-in; `args` is the trimmed remainder, `undefined` if none. */
30
+ export interface BuiltinInvocation {
31
+ name: "compact";
32
+ args: string | undefined;
33
+ }
34
+ /**
35
+ * `null` unless the whole draft is a built-in invocation under Pi's exact grammar
36
+ * (`^\/([^\s]+)(?:\s+([\s\S]*))?$`) and case-sensitive name match: `/compact` and
37
+ * `/compact focus on X` match; `/Compact`, `/compactx` and `/compact/x` do not.
38
+ */
39
+ export declare function parseBuiltinInvocation(text: string): BuiltinInvocation | null;
40
+ /** Leading `/token` of a composer draft; `end` is the index just past the token. */
41
+ export interface SlashToken {
42
+ name: string;
43
+ end: number;
44
+ hasArgs: boolean;
45
+ }
46
+ /** `null` unless the draft's first character is `/`. `name` excludes the slash. */
47
+ export declare function parseSlashToken(text: string): SlashToken | null;
48
+ /** True while the draft is still just a command name being typed: `/^\/[^\s]*$/`. */
49
+ export declare function shouldOpenMenu(text: string): boolean;
50
+ /**
51
+ * Menu rows in daemon order (no client-side sort — the daemon's order is Pi's order).
52
+ * `running` drops `source === "extension"` entries: Pi rejects extension commands on `steer`/
53
+ * `follow_up` (`agent-session.js` `_throwIfExtensionCommand`), which is the only send path while a
54
+ * turn is in flight, and that rejection is a swallowed `notify` response, i.e. silent.
55
+ * `CLIENT_BUILTIN_COMMANDS` come first (and drop any same-named Pi command); `builtinsDisabled`
56
+ * greys them out while they can't run (agent running, compacting, or not created yet).
57
+ */
58
+ export declare function commandOptions(commands: SlashCommand[], opts: {
59
+ running: boolean;
60
+ builtinsDisabled?: boolean;
61
+ }): {
62
+ options: ComboboxOption<string>[];
63
+ hiddenExtensionCount: number;
64
+ };
65
+ /** Wrapping highlight movement; returns 0 for an empty list. */
66
+ export declare function moveHighlight(current: number, delta: number, length: number): number;
67
+ /**
68
+ * Replace the draft's leading token with `/name`, keeping any args. With no args, append exactly
69
+ * one space (which also makes `shouldOpenMenu` false, closing the menu by itself). With no leading
70
+ * slash at all, prefix `/name ` to the existing text.
71
+ */
72
+ export declare function applyCommand(text: string, name: string): string;
73
+ /**
74
+ * The span to highlight in the textarea: the leading token only when it matches a known command
75
+ * name exactly and case-sensitively — the same test Pi applies, so the highlight doubles as "Pi
76
+ * will recognize this".
77
+ */
78
+ export declare function knownCommandSpan(text: string, names: readonly string[]): {
79
+ end: number;
80
+ } | null;
81
+ //# sourceMappingURL=slash-commands.d.ts.map
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Pure level-source selection for the composer's `ThinkingMenu` (sprint-070/task-005) — kept
3
+ * out of the `.tsx` file so it's unit-testable under the root vitest config (node environment;
4
+ * `.tsx` components are not picked up there, following `model-menu-sort.ts`'s precedent).
5
+ *
6
+ * Two sources, one decision: a LIVE session answers `agent_thinking_levels_request`
7
+ * (authoritative per Pi's current model); a draft answers from the already-cached
8
+ * `list_provider_models` catalogue (per-model `thinkingLevels`, derived server-side from Pi's
9
+ * `thinkingLevelMap`). The catalogue lookup falls back to Pi's full ladder whenever the model
10
+ * is missing from the list or carries no derivation — Pi clamps at apply time and the
11
+ * effective level comes back in the set response / `agent_update` broadcast, so offering too
12
+ * much is always safe; offering too little is not.
13
+ */
14
+ /** Pi's full thinking-level ladder (pi-ai `EXTENDED_THINKING_LEVELS`) — the fallback offered
15
+ * when no per-model derivation is available. Deliberately `string[]`, not a union: levels are
16
+ * dynamic per model/proxy (repo convention, protocol `messages.ts`). */
17
+ export declare const FALLBACK_THINKING_LEVELS: string[];
18
+ /** The per-model fields the draft-time lookup reads off the cached provider model list. */
19
+ export interface ModelThinkingInfo {
20
+ id: string;
21
+ thinkingLevels?: string[];
22
+ }
23
+ /**
24
+ * The levels a draft's `ThinkingMenu` should offer for `modelId`, reading ONLY the cached
25
+ * catalogue (no extra RPC): the model's own derived list when present and non-empty, else the
26
+ * full fallback ladder (model absent from the list, or a daemon too old to derive).
27
+ */
28
+ export declare function levelsForModel(modelId: string | undefined, models: ModelThinkingInfo[] | undefined): string[];
29
+ //# sourceMappingURL=thinking-level-source.d.ts.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * TodoPanel — the agent's todo list above the composer (swe/features/agent-todos-ui.md). Read-only:
3
+ * every decision (counts, summary, grouping, labels) is a pure function in `todo-panel-model.ts`;
4
+ * this file is markup, local expand state and one scroll effect. All text is rendered as React text
5
+ * nodes — never as HTML or markdown, so a subject like `<b>x</b>` stays literal.
6
+ */
7
+ export interface TodoPanelProps {
8
+ agentId: string | null;
9
+ }
10
+ export declare function TodoPanel({ agentId }: TodoPanelProps): import("react").JSX.Element | null;
11
+ //# sourceMappingURL=TodoPanel.d.ts.map
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Agent todos store (swe/features/agent-todos-ui.md). Holds every agent's last snapshot (through the
3
+ * SDK's pure reducer) and the per-agent collapse flag. One push subscription per connection lives in
4
+ * `hooks/use-agent-todos.ts`; panels only `track()` the agent they show.
5
+ *
6
+ * A failed list keeps whatever snapshot exists and says nothing: the panel is read-only context, so
7
+ * an error toast would be noise. The daemon restarts `seq` at 1, so a reconnect resets the tracked
8
+ * seq (`refetchTracked`) before listing again.
9
+ */
10
+ import { type StoreApi, type UseBoundStore } from "zustand";
11
+ import { type AgentTodosState, type PiStudioClient } from "@av-pi-studio/client";
12
+ import type { AgentTodosSnapshot } from "@av-pi-studio/protocol";
13
+ import { type KeyValueStore } from "@av-pi-studio/ui-library";
14
+ export declare const COLLAPSE_WRITE_DEBOUNCE_MS = 250;
15
+ export interface AgentTodosStoreState {
16
+ todos: AgentTodosState;
17
+ /** agentId -> number of panels showing it. */
18
+ tracked: Record<string, number>;
19
+ collapsed: ReadonlySet<string>;
20
+ /** Start showing `agentId`; the returned release stops it. Lists once per agent. */
21
+ track(agentId: string): () => void;
22
+ refetchTracked(): Promise<void>;
23
+ applyUpdate(snapshot: AgentTodosSnapshot): void;
24
+ clear(): void;
25
+ setCollapsed(agentId: string, collapsed: boolean): void;
26
+ }
27
+ export interface AgentTodosStoreDeps {
28
+ getClient: () => Pick<PiStudioClient, "hasAgentTodosCapability" | "listAgentTodos"> | null;
29
+ kv: KeyValueStore;
30
+ }
31
+ export declare function createAgentTodosStore(deps: AgentTodosStoreDeps): UseBoundStore<StoreApi<AgentTodosStoreState>>;
32
+ export declare const useAgentTodosStore: UseBoundStore<StoreApi<AgentTodosStoreState>>;
33
+ export declare function useAgentTodosSnapshot(agentId: string | null): AgentTodosSnapshot | undefined;
34
+ export declare function useTodoPanelCollapsed(agentId: string | null): boolean;
35
+ //# sourceMappingURL=agent-todos-store.d.ts.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Persisted collapse state for the agent todo panel. A sibling localStorage record (not part of the
3
+ * pane layout, which is keyed by tab identity): only COLLAPSED agent ids are stored, since expanded
4
+ * is the default. Pure so the store only does I/O.
5
+ */
6
+ export declare const TODO_COLLAPSE_STORAGE_KEY = "pi-studio-agent-todos-ui";
7
+ export declare const TODO_COLLAPSE_MAX_ENTRIES = 500;
8
+ /** Corrupt JSON, a wrong version or any non-string entry yields an empty set; never throws. */
9
+ export declare function parseCollapsed(raw: string | null): Set<string>;
10
+ /** Insertion order is age: past the cap the oldest ids are dropped. */
11
+ export declare function serializeCollapsed(collapsed: ReadonlySet<string>): string;
12
+ //# sourceMappingURL=todo-collapse-codec.d.ts.map
@@ -0,0 +1,37 @@
1
+ import type { AgentTodo } from "@av-pi-studio/protocol";
2
+ /**
3
+ * Pure decisions for the agent todo panel (swe/features/agent-todos-ui.md). No React, no I/O:
4
+ * web-client has no jsdom, so every branch lives here and is tested under Node.
5
+ */
6
+ export type TodoPanelRow = {
7
+ kind: "task";
8
+ task: AgentTodo;
9
+ key: string;
10
+ } | {
11
+ kind: "completed-group";
12
+ count: number;
13
+ tasks: AgentTodo[];
14
+ key: string;
15
+ };
16
+ /** More completed tasks than this collapse into one group row. */
17
+ export declare const COMPLETED_GROUP_THRESHOLD = 5;
18
+ /** Defensive order guarantee: stable sort by id (the wire already sends id order, no tombstones). */
19
+ export declare function visibleTasks(tasks: readonly AgentTodo[]): AgentTodo[];
20
+ export declare function counts(tasks: readonly AgentTodo[]): {
21
+ done: number;
22
+ total: number;
23
+ };
24
+ /** The first `in_progress` task by id. */
25
+ export declare function inProgress(tasks: readonly AgentTodo[]): AgentTodo | undefined;
26
+ /** `activeForm` while in progress (when present), otherwise the subject. */
27
+ export declare function rowText(task: AgentTodo): string;
28
+ export declare function collapsedSummary(tasks: readonly AgentTodo[]): string | undefined;
29
+ /** `blocked by #2, #5`; ids absent from the list still print. Never shown for completed tasks. */
30
+ export declare function blockedByLabel(task: AgentTodo): string | undefined;
31
+ export declare function isExpandable(task: AgentTodo): boolean;
32
+ /**
33
+ * Ordered render list. When more than `threshold` tasks are completed they collapse into one group
34
+ * at the first completed task's position. Keys use `(id, index)`, so duplicate ids never collide.
35
+ */
36
+ export declare function panelRows(tasks: readonly AgentTodo[], threshold?: number): TodoPanelRow[];
37
+ //# sourceMappingURL=todo-panel-model.d.ts.map
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Bottom-anchor controller for the chat timeline — the DOM half of `timeline/bottom-anchor.ts`
3
+ * (which owns every decision and is unit-tested on its own). This file only turns browser events
4
+ * into the four anchor events and executes the one side effect they can ask for: scroll the
5
+ * viewport to its very end.
6
+ *
7
+ * **Gesture window, not a suppression flag.** Detaching requires a user input, but `wheel`/
8
+ * `touchmove` do not carry their resulting `scroll` event with them, so a gesture is recorded as a
9
+ * timestamp and any scroll within `GESTURE_WINDOW_MS` of it counts as user-driven. The alternative
10
+ * — flagging our own programmatic scrolls and treating everything else as the user's — loses to a
11
+ * genuine race: a `display:none` tab restores its old `scrollTop` (and fires a scroll event) at
12
+ * the same layout tick in which it becomes measurable again, so "not ours" would mean "the user
13
+ * detached" exactly when the user did nothing. A gesture cannot be faked by the browser, so this
14
+ * direction has no race to lose.
15
+ *
16
+ * **Why a `ResizeObserver`, not a `visible` prop.** The controller must re-assert the bottom when
17
+ * the viewport becomes measurable again, and a hidden chat tab is only one way to get there —
18
+ * pane splits/divider drags, workspace switches, window resizes and the mobile keyboard all change
19
+ * the box the same way. Observing the scroller covers all of them locally, and keeps `PanelProps`
20
+ * (shared by every panel kind) out of a problem that belongs to this one scroller.
21
+ */
22
+ import { type RefObject } from "react";
23
+ import type { Virtualizer } from "@tanstack/react-virtual";
24
+ export interface BottomAnchor {
25
+ /** `false` once the user has scrolled away — render the jump-to-latest affordance. */
26
+ pinned: boolean;
27
+ /** Follow the tail if still pinned (rows appended, or a row's identity changed). */
28
+ followTail: () => void;
29
+ /** Pin and scroll to the end regardless of state (jump-to-latest, the user's own message). */
30
+ pinToBottom: () => void;
31
+ }
32
+ export declare function useBottomAnchor(virtualizer: Virtualizer<HTMLDivElement, Element>, scrollRef: RefObject<HTMLDivElement | null>): BottomAnchor;
33
+ //# sourceMappingURL=use-bottom-anchor.d.ts.map
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Fork affordance wiring (sprint-072/task-002/003) — combines the session-level visibility gate
3
+ * (`fork-gate.ts`), the per-row ordinal map, and the click handlers that call `forkMessages()`
4
+ * fresh every time (never cached — the list is only valid against the CURRENT branch) and
5
+ * correlate the result (`fork-correlation.ts`) into either a confirm-dialog target or a picker
6
+ * fallback. These hooks only commit the outcome into `fork-store.ts`; the dialog/picker
7
+ * components themselves render from that store (task-003's `ForkDialog`).
8
+ */
9
+ import type { SessionEntry } from "../../stores/session-store.js";
10
+ export interface ForkRowWiring {
11
+ /** Session-level gate — whether ANY row in this session can offer a fork button right now. */
12
+ canFork: boolean;
13
+ /** Confirmed user row id -> ordinal (transcript order among confirmed user rows). A row absent
14
+ * from this map (pending/failed, or `canFork` false) never renders a button. */
15
+ ordinalByRowId: ReadonlyMap<string, number>;
16
+ /** Click handler for a row's fork button — `ordinal` is its `ordinalByRowId` value. */
17
+ onForkFromRow: (ordinal: number) => void;
18
+ }
19
+ /** The session-level fork visibility gate alone — shared by `useForkAction` (row buttons) and
20
+ * `useForkMenu` (the "⋮" menu item), which must agree on the exact same predicate (task-003's
21
+ * "gated identically to the affordance... reuse that predicate, do not re-derive it"). */
22
+ export declare function useCanFork(session: SessionEntry | undefined): boolean;
23
+ export declare function useForkAction(session: SessionEntry): ForkRowWiring;
24
+ export interface ForkMenuWiring {
25
+ /** Same session-level gate as `useForkAction` — hide the whole "⋮" item, never disable it. */
26
+ canFork: boolean;
27
+ /** "Fork from…" menu item handler — always opens the picker step directly (task-003), unlike
28
+ * the row affordance which tries to correlate a specific message first. */
29
+ openForkPicker: () => void;
30
+ }
31
+ export declare function useForkMenu(session: SessionEntry | undefined): ForkMenuWiring;
32
+ //# sourceMappingURL=use-fork-action.d.ts.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * ConnectionBar — the app's top row: brand + version, the connection status pill, the url/password
3
+ * fields, the single primary connect/disconnect action, and the two panel toggles (design spec
4
+ * § 08; replaces the POC-era `Toolbar`/`ConnectionStatus` pair, POC_TO_APP_PLAN_UI.md §4.1).
5
+ *
6
+ * All state shape lives in `connection-presentation.ts` — this component only binds it to the
7
+ * stores and the DOM. What changes per state: a live connection collapses to one pill plus a
8
+ * trailing action; disconnected/connecting/error show the editable fields, with the pill and action
9
+ * communicating which of those three sub-states is active.
10
+ *
11
+ * The url field ALSO accepts a full pairing link (`pi-studio daemon pair`'s QR/link,
12
+ * architecture/relay-e2ee.md § Pairing) pasted verbatim — `connect()` detects it via
13
+ * `parsePairingUrl` and routes through the relay transport automatically; the password field is
14
+ * ignored in that case (the pairing link's key is itself the credential). The 220px field can't
15
+ * show that as placeholder text, so it lives in the field's `title` tooltip.
16
+ */
17
+ export declare function ConnectionBar(): import("react").JSX.Element;
18
+ //# sourceMappingURL=ConnectionBar.d.ts.map
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Turns the connection store's `{ status, error }` plus whatever is typed in the url field into the
3
+ * connection bar's presentation: state kind, status-pill text, whether the url/password fields are
4
+ * shown/frozen, and the primary action's label/variant/disabled state (design spec § 08).
5
+ *
6
+ * Pure — no React, no store access — so it is unit-testable in the node env, per project
7
+ * convention (the same split as `features/sessions/session-presentation.ts`).
8
+ */
9
+ import type { ConnectionState } from "@av-pi-studio/client";
10
+ import type { StatusDotInput } from "@av-pi-studio/ui-library";
11
+ /**
12
+ * The four states § 08 draws, plus `closing` — a real `ConnectionState` the spec doesn't cover,
13
+ * rendered as the connected shape with a disabled action rather than inventing a fifth visual.
14
+ */
15
+ export type ConnectionBarKind = "connected" | "connecting" | "disconnected" | "error" | "closing";
16
+ /**
17
+ * The pill's leading dot, as `StatusDot` input. Returns null for `connecting`, which § 08 draws as
18
+ * a `statusWarning` spinner instead — `StatusDot`'s own spinner is `accentBright` and keyed to an
19
+ * agent turn, so the bar composes `Spinner` directly for that one state.
20
+ *
21
+ * This is a connection-state→dot mapping, deliberately separate from `sessions/status-map.ts`
22
+ * (which stays the single *protocol* `AgentStatus`→dot translation point): a socket state is not
23
+ * an agent status, it only borrows the same three colors.
24
+ */
25
+ export declare function connectionDot(kind: ConnectionBarKind): StatusDotInput | null;
26
+ export interface ConnectionBarAction {
27
+ label: string;
28
+ /** `Button` primitive variant: filled `default` for connect/retry, `outline` for disconnect. */
29
+ variant: "default" | "outline";
30
+ disabled: boolean;
31
+ }
32
+ export interface ConnectionBarView {
33
+ kind: ConnectionBarKind;
34
+ /**
35
+ * The pill's trailing state text ("connected", "connecting…", the short failure reason). Kept
36
+ * separate from {@link hostLabel} so the host — and only the host — ellipsizes: one combined
37
+ * span would truncate the state word off the end instead.
38
+ */
39
+ statusLabel: string;
40
+ /** Host inside the connected pill; null whenever there is no live connection to name. */
41
+ hostLabel: string | null;
42
+ /** The url/password inputs exist only while there is no live connection. */
43
+ showFields: boolean;
44
+ /** Fields freeze (`readOnly`) mid-handshake so a click can't edit values in flight. */
45
+ fieldsFrozen: boolean;
46
+ action: ConnectionBarAction;
47
+ /** Full, never-truncated pill text for the native `title` tooltip. */
48
+ title: string;
49
+ }
50
+ /**
51
+ * Collapse a raw `Error.message` into the short, human reason § 08 wants in the pill ("connection
52
+ * refused", not a generic "error"). Falls back to the message's first line, length-capped.
53
+ */
54
+ export declare function shortConnectionReason(error: string): string;
55
+ /**
56
+ * Whether what the user typed resolves to something `connect()` can actually dial.
57
+ *
58
+ * Deliberately lenient about the scheme: § 08 says "invalid scheme (not `ws://`/`wss://`)", but
59
+ * this client accepts a bare `host[:port]`, `http(s)://`, AND a pasted pairing link, all of which
60
+ * `resolveConnectTarget` maps onto a real ws(s) URL. Validating the literal typed scheme would
61
+ * reject working input, so validity is "resolves to a dialable ws(s) URL with a hostname".
62
+ */
63
+ export declare function isDialableTarget(url: string): boolean;
64
+ export declare function connectionBarView(input: {
65
+ status: ConnectionState;
66
+ error: string | null;
67
+ /** Current contents of the url field (`ui-store`'s `host`). */
68
+ url: string;
69
+ }): ConnectionBarView;
70
+ //# sourceMappingURL=connection-presentation.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * BinaryFallbackViewer — the registry's catch-all for binary files with no dedicated viewer
3
+ * (archives, executables, unrecognized blobs). No preview is attempted eagerly; a manual
4
+ * "Download" action fetches the bytes on demand via `useFileDownload` and saves them locally
5
+ * (POC_TO_APP_PLAN_UI.md §4.5 follow-up: modular file preview).
6
+ */
7
+ import type { ViewerProps } from "./viewer-registry.js";
8
+ export declare function BinaryFallbackViewer({ path, workspaceCwd }: ViewerProps): import("react").JSX.Element;
9
+ //# sourceMappingURL=BinaryFallbackViewer.d.ts.map
@@ -0,0 +1,15 @@
1
+ /**
2
+ * CodeView — highlighted, read-only file body with a line-number gutter (POC `showFile`/
3
+ * `reloadFileInPanel`, chat.html ~line 812-828, POC_TO_APP_PLAN_UI.md §4.5). Built on CodeMirror 6
4
+ * (`@uiw/react-codemirror`) rather than a hand-rolled `<pre>` + separate gutter `<pre>`: the two
5
+ * previously drifted out of sync on scroll (independent scroll containers, no shared scroll
6
+ * anchor) whenever content was long enough to scroll or lines wrapped. CodeMirror owns a single
7
+ * scrollable viewport with gutter and content painted from the same layout pass, so this class of
8
+ * bug cannot recur.
9
+ */
10
+ export interface CodeViewProps {
11
+ path: string;
12
+ content: string;
13
+ }
14
+ export declare function CodeView({ path, content }: CodeViewProps): import("react").JSX.Element;
15
+ //# sourceMappingURL=CodeView.d.ts.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * DiffView — parsed unified-diff renderer (POC `renderDiffHtml`, chat.html ~line 959-971,
3
+ * POC_TO_APP_PLAN_UI.md §4.5). Ported into a typed `parseDiff` + a React component — no
4
+ * `dangerouslySetInnerHTML`/`innerHTML`, unlike the POC.
5
+ */
6
+ export type DiffRowKind = "hunk-header" | "add" | "del" | "ctx";
7
+ export interface DiffRow {
8
+ kind: DiffRowKind;
9
+ text: string;
10
+ lineNumber?: number;
11
+ }
12
+ /** Parse a unified-diff patch string into typed rows (POC `renderDiffHtml`, ported verbatim). */
13
+ export declare function parseDiff(patch: string): DiffRow[];
14
+ export interface DiffViewProps {
15
+ patch: string;
16
+ }
17
+ export declare function DiffView({ patch }: DiffViewProps): import("react").JSX.Element;
18
+ //# sourceMappingURL=DiffView.d.ts.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * File row context menu — Radix DropdownMenu anchored at cursor/button coordinates, mirroring
3
+ * `SessionContextMenu.tsx`'s pattern. Two variants share this one component/menu instance
4
+ * (`ui-store.ts`'s `fileMenu.background` flag):
5
+ * - Row menu (background: false): Open / Open in MolViewer (files only) / Open as Text (molecule
6
+ * files only — plain files already open that way) / New File / New Folder (directories only) /
7
+ * Copy Absolute Path / Copy Relative Path / Download (files only) / Rename / Delete.
8
+ * - Empty-space menu (background: true, opened by right-clicking below the last row): New File /
9
+ * New Folder / Copy Current Directory Path / Copy Current Directory Relative Path — no
10
+ * Open/Download/Rename/Delete, since there's no specific row under the cursor.
11
+ */
12
+ export declare function FileContextMenu(): import("react").JSX.Element | null;
13
+ //# sourceMappingURL=FileContextMenu.d.ts.map
@@ -0,0 +1,24 @@
1
+ /**
2
+ * FileExplorer — right-sidebar Files tab, tree view (POC `loadFiles`/`renderRightPanel`,
3
+ * chat.html ~line 1014-1053, POC_TO_APP_PLAN_UI.md §4.7 — superseded the original breadcrumb-
4
+ * style single-directory browser with a lazy-loading tree). Each expanded directory fetches its
5
+ * own listing (`useExplorerTree`, one `file_explorer_request` per expanded path); `file-tree.ts`
6
+ * flattens root + expansion set + per-path listings into the ordered row list rendered here
7
+ * through `@tanstack/react-virtual` (same virtualizer pattern as `Timeline.tsx`). The workspace
8
+ * root is the tree's own first row: a collapsible directory row naming the cwd, styled as a
9
+ * heading, not draggable, and wired to the *background* context-menu variant (New File/New
10
+ * Folder/Copy path — never Rename/Delete, which make no sense for the workspace root). It also
11
+ * carries no git tint or dot-ghosting, both of which would fire on almost every workspace.
12
+ * Directory click toggles expand/collapse in place; file click opens a file tab. Rows are drag
13
+ * sources for an internal move/rename (`file_move_request`, sprint-046) — dragging a row onto a
14
+ * directory (or file, which targets its parent) moves it there. Dragging files in from the OS
15
+ * uploads them into the hovered row's directory (same highlight + 700ms auto-expand as an
16
+ * internal move, `resolveUploadTarget` in move-target.ts) or the workspace root when dropped on
17
+ * empty space or the header's "Upload" button; `dataTransfer.types` — `"Files"` vs the internal
18
+ * `application/x-pi-studio-path` MIME — discriminates the two drag kinds before any per-row state
19
+ * is touched, so a stale internal-drag ref can never hijack an OS-file drop into the wrong
20
+ * directory (or vice versa). Each row can be saved back to disk via its "⋮" menu. Downloads ride
21
+ * the binary file-transfer frames (features/file-explorer-transfer.md).
22
+ */
23
+ export declare function FileExplorer(): import("react").JSX.Element;
24
+ //# sourceMappingURL=FileExplorer.d.ts.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * FilePanel — the file/diff view toggle panel (POC `buildFilePanel`/`buildDiffPanel` +
3
+ * `loadFileContent`/`loadDiffContent`, chat.html ~line 800-900, POC_TO_APP_PLAN_UI.md §4.5).
4
+ * `panel-registry.ts` mounts this component for BOTH `kind:"file"` and `kind:"diff"` tabs — a
5
+ * `kind:"file"` tab defaults to the File view, a `kind:"diff"` tab defaults to the Diff view.
6
+ * Both views stay toggleable within the same panel via local `viewMode` state (not tab-store
7
+ * state), matching the POC's per-panel `showFile`/`showDiff` toggle.
8
+ *
9
+ * The File view dispatches through the modular viewer registry (`viewer-registry.ts`):
10
+ * `resolveViewerKind` picks a viewer from the path's extension (and the viewer-settings gate),
11
+ * and `VIEWER_BY_KIND` resolves the (lazily-loaded) component — one registry entry per file type.
12
+ *
13
+ * Live updates come from the daemon's filesystem watcher via `useFileLiveRefresh` (not the
14
+ * debounced post-tool-call invalidation in `lib/connection/files-changed.ts`, which stays as the
15
+ * fallback for files nobody has open): only `text`/`markdown`/`image` kinds are watched — a video
16
+ * refetch would restart playback from zero, and the binary fallback fetches nothing eagerly, so
17
+ * there is nothing to refresh. Molecule tabs are deliberately NOT covered here — they mount
18
+ * `MoleculeViewerPanel` elsewhere, whose `MoleculeViewer` keeps its own `shouldApplyRefresh`
19
+ * unsaved-edits gate that this generic invalidation would bypass.
20
+ */
21
+ import type { Tab } from "../../stores/tab-store.js";
22
+ export interface FilePanelProps {
23
+ tab: Tab;
24
+ }
25
+ export declare function FilePanel({ tab }: FilePanelProps): import("react").JSX.Element;
26
+ //# sourceMappingURL=FilePanel.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * HtmlViewer — renders an `.html`/`.htm`/`.xhtml` file inside an isolated sandboxed iframe, with a
3
+ * Preview/Source toggle (mirroring `MarkdownFileViewer`), a "Block remote resources" switch, and a
4
+ * Reload action. See `html-sandbox.ts` for the two security invariants this component depends on
5
+ * (never `allow-same-origin`; the CSP is a network policy, not the isolation boundary) and the
6
+ * measured browser facts behind base-URL neutralization and the fragment-anchor fix.
7
+ *
8
+ * Source loading goes through the shared `use-file-source` ladder (sprint-063 task-002), so a
9
+ * report over the 5 MiB inline cap still previews via the streamed tier instead of failing
10
+ * outright — real coverage/benchmark HTML routinely exceeds it.
11
+ *
12
+ * Local asset inlining (`./style.css`, `./app.js`, relative images — sprint-064) resolves the
13
+ * document's local-asset refs (`html-assets.ts`), fetches and inlines them as `data:` URIs
14
+ * (`html-asset-loader.ts`) over the existing binary file-transfer path, and surfaces anything left
15
+ * un-inlined as a muted note. **Single-load rule:** while there is at least one local ref to
16
+ * inline, the loading state is held until the asset bundle settles — never an assetless
17
+ * intermediate `srcDoc` swapped for the inlined one, which would reload the document and re-run
18
+ * its scripts twice (see the asset-bundle query below).
19
+ */
20
+ import type { ViewerProps } from "./viewer-registry.js";
21
+ export declare function HtmlViewer({ path, workspaceCwd }: ViewerProps): import("react").JSX.Element | null;
22
+ //# sourceMappingURL=HtmlViewer.d.ts.map
@@ -0,0 +1,8 @@
1
+ /**
2
+ * ImageViewer — renders a binary image file by downloading it over the file-transfer binary
3
+ * frames (`useFileDownload`) and displaying the resulting object URL (POC_TO_APP_PLAN_UI.md §4.5
4
+ * follow-up: modular file preview). A checkerboard background shows through transparent PNGs.
5
+ */
6
+ import type { ViewerProps } from "./viewer-registry.js";
7
+ export declare function ImageViewer({ path, workspaceCwd }: ViewerProps): import("react").JSX.Element | null;
8
+ //# sourceMappingURL=ImageViewer.d.ts.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * MarkdownFileViewer — renders a `.md`/`.mdx` file's content through the app's sanitized
3
+ * Markdown renderer (`timeline/markdown.tsx`, react-markdown + remark-gfm — no
4
+ * `dangerouslySetInnerHTML` of user content), with a Preview/Source toggle since raw markdown is
5
+ * sometimes what you actually want to read (POC_TO_APP_PLAN_UI.md §4.5 follow-up: modular file
6
+ * preview).
7
+ *
8
+ * Source loading goes through the shared `use-file-source` ladder (task-002) instead of a bare
9
+ * inline read, so a file over the server's inline-read cap streams and previews — with the same
10
+ * muted "streamed" affordance `TextViewer` shows — instead of erroring with `file_too_large`.
11
+ */
12
+ import type { ViewerProps } from "./viewer-registry.js";
13
+ export declare function MarkdownFileViewer({ path, workspaceCwd }: ViewerProps): import("react").JSX.Element;
14
+ //# sourceMappingURL=MarkdownFileViewer.d.ts.map
@@ -0,0 +1,60 @@
1
+ /**
2
+ * MoleculeViewer — mounts `<MolViewer>` for both molecule-tab shapes: a file-backed tab (fetch
3
+ * the file, hand molviewer the bytes) and an empty ("+"-menu) tab (no source — molviewer's own
4
+ * drag-drop empty state, `ui.emptyState`'s `FirstRunCard`).
5
+ *
6
+ * Content is fetched through `useFileDownload` (chunked binary transfer, uncapped), not
7
+ * `useFileRead` (`file_read_request`, UTF-8 text, inline-size capped): molviewer wants raw bytes
8
+ * and the object URL that hook already produces is exactly molviewer's `{ url, name }` source
9
+ * shape — no decode step, no new fetch hook.
10
+ *
11
+ * Live reload (task-006/007): `useFileWatch` pushes a new `changedAt` whenever the daemon detects
12
+ * the file changed on disk. `shouldApplyRefresh` (kept in its own pure module, see
13
+ * `molecule-reload.ts`) gates the reaction on there being no unsaved in-viewer edits; when it
14
+ * clears, `download.refetch()` mints a fresh object URL, the `source` prop changes, and
15
+ * `MolViewer` reloads with `sourceMode="update"` — camera/selection survive. When it's gated by
16
+ * unsaved edits, a small stale-file indicator surfaces instead of silently diverging.
17
+ *
18
+ * Save (`onSave`, `@molviewer/core` 0.4.3+): only wired when `path` is non-null — a file-backed
19
+ * tab writes the viewer's current serialization straight back to that same absolute path via
20
+ * `file_write_request` (`write-file.ts`); the empty ("+"-menu) tab has nowhere to write and gets
21
+ * no Save button at all (passing `onSave` is what draws it). `e.saved()` is called only after the
22
+ * daemon confirms the write, which is what greys the button out and flips the viewer back to
23
+ * clean — a failed write leaves it live so the user can retry. Note `e.fileName` is molviewer's
24
+ * own load-time basename (`moleculeSource`'s `name`, extension only, no directory), not a usable
25
+ * write target — the absolute `path` prop already in scope is what gets written.
26
+ *
27
+ * Polymer build (`onPolymerBuild`, `@molviewer/core` 0.4.4+): file-backed tabs only, like `onSave`
28
+ * — but omitting it does NOT hide the Build button the way omitting `onSave` hides Save. With no
29
+ * handler molviewer downloads the .mol2 itself, which is the right answer for a `path`-null
30
+ * ("+"-menu) tab: there is no directory to write beside.
31
+ *
32
+ * Building deliberately does not change what is on screen — the monomer stays loaded and the
33
+ * polymer is a NEW structure — so this writes it beside the monomer and opens it in its own
34
+ * molecule tab, in the SAME pane this viewer lives in. See `writePolymer` below for the naming
35
+ * and rollback contract.
36
+ */
37
+ import "@molviewer/core/style.css";
38
+ export interface MoleculeViewerProps {
39
+ /** Absolute path of the file to render, or null for an empty ("New molecule view") tab. */
40
+ path: string | null;
41
+ /** Workspace this viewer's tab belongs to — needed to open the polymer's tab in the same
42
+ * workspace. Same normalized cwd the tab was minted with, never re-derived from the active
43
+ * session. */
44
+ workspaceCwd: string;
45
+ /** This viewer's own tab id, used to resolve which pane a built polymer's tab should join.
46
+ * Without it the polymer would land in the FOCUSED pane, which is not necessarily the one the
47
+ * monomer is being viewed in. */
48
+ tabId: string;
49
+ /** True when this viewer's tab is the visible one. Molstar's own `ResizeObserver` on its canvas
50
+ * container re-fits on becoming visible (verified in the installed bundle), so this is not
51
+ * currently used to drive a manual re-fit — kept as the escape hatch task-010's visual
52
+ * verification may still need. */
53
+ isActive?: boolean;
54
+ /** Mirrors `MolViewerProps.onModifiedChange` upward for a future parent-level consumer (e.g. a
55
+ * tab-strip "unsaved changes" mark) — independent of this component's own internal `modified`
56
+ * state below, which drives the live-reload gate. */
57
+ onModifiedChange?: (modified: boolean) => void;
58
+ }
59
+ export declare function MoleculeViewer({ path, workspaceCwd, tabId, isActive, onModifiedChange, }: MoleculeViewerProps): import("react").JSX.Element;
60
+ //# sourceMappingURL=MoleculeViewer.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * MoleculeViewerPanel — thin `PanelProps` adapter for a `kind: "molecule"` tab. No header, no
3
+ * File/Diff toggle (a molecule tab has neither — diffs come from the git Changes panel
4
+ * independently, `ChangesPanel.tsx`); it owns the panel-filling height chain and hands off to
5
+ * `MoleculeViewer` for everything else.
6
+ */
7
+ import type { PanelProps } from "../workspace/panel-registry.js";
8
+ export declare function MoleculeViewerPanel({ tab }: PanelProps): import("react").JSX.Element;
9
+ //# sourceMappingURL=MoleculeViewerPanel.d.ts.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * PdfViewer — renders a PDF in place with pdf.js's core API (swe/features/pdf-file-preview.md).
3
+ *
4
+ * Pages are a stack of pre-sized blocks; a block holds a canvas + selectable text layer only while
5
+ * it is near the viewport, so memory is bounded by the window, not the page count. A re-download
6
+ * (live refresh) loads the new document beside the old one and swaps them in one commit, so the
7
+ * scroll container never remounts and `scrollTop` survives.
8
+ *
9
+ * Deliberately no annotation/form/XFA/scripting layers: a PDF is untrusted input, and nothing in
10
+ * it may run code or open a URL.
11
+ */
12
+ import type { ViewerProps } from "./viewer-registry.js";
13
+ export declare function PdfViewer({ path }: ViewerProps): import("react").JSX.Element;
14
+ //# sourceMappingURL=PdfViewer.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * RightSidebar — Files/Changes tab bar + refresh button (POC `.sidebar-right`, chat.html
3
+ * ~line 364-374, POC_TO_APP_PLAN_UI.md §4.7). Imported by `routes/WorkspacePage.tsx`. Used to
4
+ * also host a Terminals tab (live PTY list + reattach/kill) — removed once the TabStrip's "+"
5
+ * menu (New chat / New terminal) made per-tab terminal creation directly discoverable, leaving
6
+ * the sidebar entry redundant (GitHub issue #8 follow-up).
7
+ */
8
+ export declare function RightSidebar(): import("react").JSX.Element;
9
+ //# sourceMappingURL=RightSidebar.d.ts.map