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

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,35 @@
1
+ /**
2
+ * react-markdown + remark-gfm rendering, replacing the POC's CDN `marked` + `innerHTML`
3
+ * (POC_TO_APP_PLAN_UI.md §4.8). Sanitized by default — react-markdown never injects raw HTML.
4
+ * Fenced code blocks highlight asynchronously via Shiki (`highlight.ts`), except `language-
5
+ * mermaid` blocks, which render as a live diagram via `MermaidBlock` below. LaTeX math
6
+ * (`remark-math` + `rehype-katex`, KaTeX's own CSS below) renders inline `$...$` and block
7
+ * `$$...$$`/`\[...\]` — rehype-katex builds real hast nodes, not a raw-HTML string, so it stays
8
+ * compatible with react-markdown's default sanitization.
9
+ *
10
+ * Two entry points, one parser: `Markdown` for text that can no longer change, and
11
+ * `StreamingMarkdown` for a row the model is still writing — same output, but block-by-block so
12
+ * the per-token-delta cost stays off the whole message (`streaming-split.ts`).
13
+ */
14
+ import "katex/dist/katex.min.css";
15
+ export interface MarkdownProps {
16
+ text: string;
17
+ assetBase?: string | null;
18
+ owningPaneId?: string | null;
19
+ workspaceCwd?: string | null;
20
+ }
21
+ /** Renders finalized assistant/tool markdown text — one parse of the whole thing. */
22
+ export declare function Markdown({ text, assetBase, owningPaneId, workspaceCwd }: MarkdownProps): import("react").JSX.Element;
23
+ /**
24
+ * Live markdown for a row that is still streaming. `splitStreamingMarkdown` separates the blocks
25
+ * that can no longer change from the one being written: each completed block is its own memoized
26
+ * `MarkdownBody` (parsed once, ever), and only the short tail re-parses per token delta — ~0.24ms
27
+ * against the ~9–27ms a full re-parse of a 3.5–10KB message costs (`streaming-split.ts`).
28
+ *
29
+ * `blocks` is append-only, so the array index is a stable identity.
30
+ *
31
+ * The caret is `markdown.module.css`'s `.streaming > :last-child::after` rather than an element,
32
+ * so it sits inline after the last rendered block instead of on a line of its own.
33
+ */
34
+ export declare function StreamingMarkdown({ text, assetBase, owningPaneId, workspaceCwd }: MarkdownProps): import("react").JSX.Element;
35
+ //# sourceMappingURL=markdown.d.ts.map
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Mermaid's `base` theme override for inline chat diagrams (`MermaidBlock` in `markdown.tsx`).
3
+ *
4
+ * Unlike `features/files/molecule-theme.ts`'s `<MolViewer>` override — where `var(--pi-color-*)`
5
+ * REFERENCES are handed to the component and the browser resolves them later through the normal
6
+ * CSS cascade — mermaid's theme engine (`khroma`) computes derived shades (lighten/darken,
7
+ * contrast text) from each color at render time, in JS, before any CSS reaches the DOM. It needs
8
+ * real resolvable color strings (hex/rgb/hsl), not `var()` references, which `khroma` cannot
9
+ * parse. So these are read from the live computed style instead of passed through as literals.
10
+ */
11
+ /**
12
+ * Pure: maps an already-read `{ cssVarName: value }` snapshot onto mermaid's `themeVariables`
13
+ * shape. Split out from `readMermaidThemeVariables` below so the mapping itself is unit-testable
14
+ * without touching `document` — same rationale as `molecule-source.ts`'s split from
15
+ * `@molviewer/core`.
16
+ */
17
+ export declare function resolveMermaidThemeVariables(cssVars: Record<string, string>): Record<string, string>;
18
+ /** Reads pi-studio's current theme off `document.documentElement`'s computed custom properties
19
+ * and resolves them into mermaid's `themeVariables` shape. Read once per diagram mount — a
20
+ * diagram rendered before a live theme switch does not retheme without remounting, the same
21
+ * trade-off already accepted for `RowShell`'s hover-reveal timestamp opacity. */
22
+ export declare function readMermaidThemeVariables(): Record<string, string>;
23
+ //# sourceMappingURL=mermaid-theme.d.ts.map
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Pure `(TimelineState, AgentStreamEvent) → TimelineState` reducer. Replaces the POC's
3
+ * imperative `handleAgentStream` DOM switch (POC_TO_APP_PLAN_UI.md §4.3). No DOM, no globals —
4
+ * fully unit-testable.
5
+ */
6
+ import type { AgentStreamEvent } from "@av-pi-studio/protocol";
7
+ import { EMPTY_TIMELINE, type TimelineRow, type TimelineState } from "./row-model.js";
8
+ /** Apply one `AgentStreamEvent` to timeline state. Pure — no mutation of the input. */
9
+ export declare function applyStreamEvent(state: TimelineState, event: AgentStreamEvent, timestamp?: string): TimelineState;
10
+ /** Replay a whole ordered event list (session restore / timeline hydration) into fresh state. */
11
+ export declare function replayEvents(events: readonly {
12
+ event: AgentStreamEvent;
13
+ timestamp?: string;
14
+ }[]): TimelineState;
15
+ /**
16
+ * Insert the local optimistic echo `Composer` renders synchronously on Send/Steer, before the
17
+ * daemon's `create_agent_request`/`send_agent_prompt`/`steer_agent_request` round trip resolves.
18
+ * Keyed by the same `clientMessageId` sent on the RPC — the eventual `user_message` broadcast
19
+ * (`onUserMessage` above) reconciles this row in place by matching `pending` + `clientMessageId`,
20
+ * so the row never duplicates once the server confirms it. `queued: true` marks a steered message
21
+ * (cleared later by `onQueueUpdate` above); a normal send never sets it.
22
+ */
23
+ export declare function addOptimisticUserMessage(state: TimelineState, clientMessageId: string, text: string, images?: Array<{
24
+ mimeType?: string;
25
+ data?: string;
26
+ }>, queued?: boolean, timestamp?: string): TimelineState;
27
+ /**
28
+ * Mark a still-pending optimistic row as failed — the RPC that was meant to confirm it
29
+ * (`createAgent`/`send`) rejected before any `user_message` broadcast arrived. No-op if the row
30
+ * was already reconciled (server confirmed it before the RPC promise settled — the RPC contract
31
+ * is "resolves after the whole turn", so a `user_message` broadcast can arrive, then the promise
32
+ * can still reject later from a failure elsewhere in that same turn; the row is already correct
33
+ * by then and must not be clobbered back into a failed state).
34
+ */
35
+ export declare function markUserMessageFailed(state: TimelineState, clientMessageId: string): TimelineState;
36
+ export { EMPTY_TIMELINE };
37
+ export type { TimelineState, TimelineRow };
38
+ //# sourceMappingURL=reducer.d.ts.map
@@ -0,0 +1,154 @@
1
+ /**
2
+ * TimelineRow — the render model streamed/replayed chat rows collapse into.
3
+ * Discriminated union mirrors the POC's per-kind DOM append logic
4
+ * (`handleAgentStream`, POC_TO_APP_PLAN_UI.md §4.3) without the DOM.
5
+ */
6
+ import type { ToolCallDetail } from "@av-pi-studio/protocol";
7
+ export type ToolCallStatus = "running" | "completed" | "error" | "canceled";
8
+ export interface UserRow {
9
+ kind: "user";
10
+ id: string;
11
+ text: string;
12
+ images?: Array<{
13
+ mimeType?: string;
14
+ data?: string;
15
+ }>;
16
+ /**
17
+ * Client-generated id passed as `clientMessageId` on `createAgent`/`send` (features/
18
+ * agent-sessions.md — the daemon echoes it back verbatim as the canonical `user_message`
19
+ * event's `messageId` since the live pi provider never mints its own). Lets the optimistic
20
+ * row inserted on Send reconcile against the server's broadcast instead of duplicating it.
21
+ * Undefined for rows sourced from session-restore hydration/replay, which had no local
22
+ * optimistic counterpart to reconcile against.
23
+ */
24
+ clientMessageId?: string;
25
+ /**
26
+ * True from the moment `Composer` inserts this row locally until the server's `user_message`
27
+ * broadcast for the same `clientMessageId` confirms it (see `reducer.ts`'s `onUserMessage`).
28
+ * Hydrated/replayed rows are never pending — they are already server-confirmed history.
29
+ */
30
+ pending?: boolean;
31
+ /**
32
+ * True when the RPC that was supposed to confirm this row (`createAgent`/`send`) rejected
33
+ * before any `user_message` broadcast arrived — e.g. a dropped connection. Never confirmed,
34
+ * never retried automatically; `pending` is cleared alongside it (see `reducer.ts`'s
35
+ * `markUserMessageFailed`) so the row stops showing a spinner and shows a failure indicator
36
+ * instead.
37
+ */
38
+ failed?: boolean;
39
+ /**
40
+ * True from the moment a steered message is optimistically inserted (`Composer`'s Steer path,
41
+ * `clientMessageId`/`queued: true` on `addOptimisticUserMessage`) until a `queue_update` stream
42
+ * event no longer lists this row's `text` in its `steering[]` array — i.e. Pi has handed the
43
+ * steering message to the LLM. Best-effort text correlation (`queue_update` carries strings, not
44
+ * ids — see `reducer.ts`'s `onQueueUpdate`). Never set on a normal (non-steered) send.
45
+ */
46
+ queued?: boolean;
47
+ /**
48
+ * Daemon-owned ISO-8601 timestamp of the row that introduced this message (the optimistic
49
+ * echo stamps `new Date().toISOString()` immediately on Send; the server's `user_message`
50
+ * broadcast overwrites it with the canonical value on confirmation). Undefined only if it
51
+ * arrived through a code path that predates this field (never happens for rows created going
52
+ * forward).
53
+ */
54
+ timestamp?: string;
55
+ }
56
+ export interface AssistantRow {
57
+ kind: "assistant";
58
+ id: string;
59
+ text: string;
60
+ /**
61
+ * True while more `assistant_message` deltas may still land in *this* row. Cleared as soon as
62
+ * the block closes (`assistant_message.final`, a following tool call, or a turn boundary) —
63
+ * that is the flag `AssistantRow` reads to switch from plain text to rendered markdown, so it
64
+ * must never outlive the block it describes.
65
+ */
66
+ streaming: boolean;
67
+ /** ISO-8601 timestamp of the row's first chunk (set once, at creation — never on later deltas). */
68
+ timestamp?: string;
69
+ }
70
+ export interface ReasoningRow {
71
+ kind: "reasoning";
72
+ id: string;
73
+ text: string;
74
+ /** Same contract as `AssistantRow.streaming`. */
75
+ streaming: boolean;
76
+ /** Same contract as `AssistantRow.timestamp`. */
77
+ timestamp?: string;
78
+ }
79
+ export interface ToolRow {
80
+ kind: "tool";
81
+ id: string;
82
+ /** Stable key used to upsert/dedupe: `callId` when present, else `${tool.kind}:${detail}`. */
83
+ callId: string;
84
+ tool: ToolCallDetail;
85
+ status: ToolCallStatus;
86
+ /**
87
+ * The wire's raw, free-form `tool_call.status` string (`messages.ts`'s `status: z.string()`),
88
+ * alongside the normalized `status` above. `status` still drives border/wash treatment; this
89
+ * carries provider-specific values (e.g. `"awaiting_approval"`) a card can render as plain text
90
+ * instead of collapsing them into `"running"`. Unset when no event for this row has carried one.
91
+ */
92
+ statusText?: string;
93
+ /**
94
+ * Daemon-owned ISO-8601 timestamp of the tool call's **start** — stamped once when the row is
95
+ * created and never touched by a later status update, so the row keeps a fixed position in time
96
+ * as the call progresses. `ask-placement.ts` relies on this: an extension dialog raised *during*
97
+ * a tool call sorts after the row that spawned it, and cannot be overtaken when the call
98
+ * completes. Same optionality contract as `UserRow.timestamp`.
99
+ */
100
+ timestamp?: string;
101
+ }
102
+ export interface ErrorRow {
103
+ kind: "error";
104
+ id: string;
105
+ text: string;
106
+ /** Same contract as `UserRow.timestamp`. */
107
+ timestamp?: string;
108
+ }
109
+ export interface SystemRow {
110
+ kind: "system";
111
+ id: string;
112
+ text: string;
113
+ /** Same contract as `UserRow.timestamp`. */
114
+ timestamp?: string;
115
+ }
116
+ /**
117
+ * One context compaction (manual or automatic), upserted in place by `compactionId` as the
118
+ * daemon's `compaction` stream events arrive (`started` → `completed`/`failed`/`canceled`). Every
119
+ * field except `compactionId`/`phase` is optional because a hydrated history carries only the
120
+ * terminal event — a lone `completed` is a legal first sight of the row.
121
+ */
122
+ export interface CompactionRow {
123
+ kind: "compaction";
124
+ id: string;
125
+ compactionId: string;
126
+ phase: "started" | "completed" | "failed" | "canceled";
127
+ reason?: "manual" | "threshold" | "overflow";
128
+ tokensBefore?: number;
129
+ /** Pi's own estimate of the context size after compaction — replaced by real stats on the next poll. */
130
+ estimatedTokensAfter?: number;
131
+ summary?: string;
132
+ error?: string;
133
+ /** An overflow compaction that will retry the failed turn once it finishes. */
134
+ willRetry?: boolean;
135
+ /** Same contract as `UserRow.timestamp`. */
136
+ timestamp?: string;
137
+ }
138
+ export type TimelineRow = UserRow | AssistantRow | ReasoningRow | ToolRow | ErrorRow | SystemRow | CompactionRow;
139
+ export interface TimelineState {
140
+ rows: TimelineRow[];
141
+ /** Index into `rows` of the in-progress assistant row, if any (fast tail lookup). */
142
+ streamingAssistantIndex: number | null;
143
+ /** Index into `rows` of the in-progress reasoning row, if any. */
144
+ streamingReasoningIndex: number | null;
145
+ /** callId → row index, for O(1) tool-call upsert. */
146
+ toolIndexByCallId: Record<string, number>;
147
+ }
148
+ export declare const EMPTY_TIMELINE: TimelineState;
149
+ export declare function nextRowId(): string;
150
+ /** Detail text extracted from a tool-call for display (POC `t.command || t.path || …`). */
151
+ export declare function toolDetailText(tool: ToolCallDetail): string;
152
+ /** Stable dedupe key for a tool call (POC `e.callId || (t.kind + ":" + detail)`). */
153
+ export declare function toolCallKey(callId: string | undefined, tool: ToolCallDetail): string;
154
+ //# sourceMappingURL=row-model.d.ts.map
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Splits a still-growing assistant/reasoning message into **immutable leading blocks** plus the
3
+ * **one block the model is currently writing** (`tail`), so a streaming row can render markdown
4
+ * live without re-parsing the whole message on every token delta.
5
+ *
6
+ * Why this exists: the daemon emits one `assistant_message` per Pi `text_delta`
7
+ * (`event-mapper.ts`), each one applied straight to the session store, so the streaming row
8
+ * re-renders per token. Parsing the full text through react-markdown + remark-gfm + remark-math +
9
+ * rehype-katex costs ~9ms at 3.5KB and ~27ms at 10KB (measured), which is several frame budgets
10
+ * per token. Every block *before* the one being written can no longer change, so it is parsed
11
+ * exactly once (`Markdown`'s memoized body, keyed on the block string) and the recurring per-token
12
+ * cost collapses to one short tail parse (~0.24ms).
13
+ *
14
+ * A boundary is only cut where re-parsing the two sides independently cannot change how either
15
+ * renders. The rules are deliberately conservative — a wrong cut is a visible mid-stream artifact:
16
+ *
17
+ * - **Blank line at fence depth 0.** Inside a ``` / ~~~ fence or a `$$` math block a blank line is
18
+ * content, not a separator — cutting there would hand a half-open fence to Shiki and a half-typed
19
+ * expression to KaTeX. Those constructs stay whole in the tail until they close.
20
+ * - **The next non-empty line must start in column 0.** An indented line after a blank line is a
21
+ * list item's second paragraph (or an indented code block); parsed on its own it would render as
22
+ * a gray code box.
23
+ * - **Never between two list blocks.** `- a\n\n- b` is one loose list; cutting it would render two
24
+ * `<ul>`s with different spacing.
25
+ * - **After a column-0 closing fence.** A fenced block is a leaf — nothing following it can change
26
+ * it — so a code block highlights the moment it closes instead of waiting for a blank line.
27
+ * - **The next block's first line must have arrived.** A trailing blank line alone never cuts: the
28
+ * next chunk could be an indented continuation, and committing the block early would strand that
29
+ * continuation as its own (code-block) block for the rest of the turn. The wait is one token.
30
+ *
31
+ * What is *not* preserved across a cut: link reference definitions (`[x]: url` in an earlier block
32
+ * used by the tail) and setext headings straddling a boundary. Both self-heal, because a finalized
33
+ * row leaves this path entirely and renders as one canonical parse of the whole text.
34
+ */
35
+ export interface StreamingMarkdownSplit {
36
+ /** Blocks that can no longer grow, in order. Append-only across deltas — index keys are stable. */
37
+ blocks: string[];
38
+ /** The block still being written (possibly empty). Never contains a completed block. */
39
+ tail: string;
40
+ }
41
+ export declare function splitStreamingMarkdown(text: string): StreamingMarkdownSplit;
42
+ //# sourceMappingURL=streaming-split.d.ts.map
@@ -0,0 +1,60 @@
1
+ /**
2
+ * tool.kind → display label + icon. Scoped to the protocol's `ToolCallDetail` union
3
+ * (shell/read/edit/write/search/fetch/task) — POC_TO_APP_PLAN_UI.md §3 `timeline/tool-mapping.ts`.
4
+ */
5
+ import type { ToolCallDetail } from "@av-pi-studio/protocol";
6
+ import { type LucideIcon } from "lucide-react";
7
+ import { toolDetailText } from "./row-model.js";
8
+ export declare function toolIcon(tool: ToolCallDetail): LucideIcon;
9
+ /** Human label for a tool card header, e.g. "shell", "edit". */
10
+ export declare function toolLabel(tool: ToolCallDetail): string;
11
+ /** One-line detail summary for a tool card (POC: `t.command || t.path || t.query || …`). */
12
+ export declare function toolSummary(tool: ToolCallDetail): string;
13
+ /** File path a tool touched, if any — used to target `filesChanged` invalidation (§4.5). */
14
+ export declare function toolFilePath(tool: ToolCallDetail): string | null;
15
+ /** True for tool kinds whose completion should invalidate open file/diff/explorer/git queries. */
16
+ export declare function toolMutatesFiles(tool: ToolCallDetail): boolean;
17
+ /**
18
+ * Expandable detail body for a tool card, as an ordered list of sections. `diff` renders as a
19
+ * `<DiffView>`; `code` renders in a monospace block. Order: input detail (command/path/query/…)
20
+ * first, then tool output (stdout, file content, etc.) if present. Empty array = header-only card
21
+ * with nothing worth expanding.
22
+ */
23
+ export type ToolBodySection = {
24
+ kind: "diff";
25
+ patch: string;
26
+ } | {
27
+ kind: "code";
28
+ text: string;
29
+ };
30
+ export declare function toolBody(tool: ToolCallDetail): ToolBodySection[];
31
+ /** Concise inline label shown in the collapsed header (basename for paths, first line for commands). */
32
+ export declare function toolInlineDetail(tool: ToolCallDetail): string;
33
+ /** Badge label + single tint token for a tool card header (design spec § 04's one-token recipe —
34
+ * text, background and border all derive from this one token via CSS `color-mix`, never split
35
+ * across token families). Keep this table and `ICON_BY_KIND` as separate exports keyed by the
36
+ * same union so the compiler flags a new protocol kind in both places. */
37
+ export type ToolBadge = {
38
+ label: string;
39
+ token: string;
40
+ };
41
+ /** Badge for a tool card header. Unrecognized/future kinds fall back to `task`'s treatment. */
42
+ export declare function toolBadge(tool: ToolCallDetail): ToolBadge;
43
+ /** Added/removed line counts from a unified diff, ignoring the `+++`/`---` file-header lines.
44
+ * Empty or absent diff → `{ added: 0, removed: 0 }`. */
45
+ export declare function toolDiffStats(diff: string | undefined): {
46
+ added: number;
47
+ removed: number;
48
+ };
49
+ /** Line count for a tool's output, for the `output · N lines` strip. A trailing newline is a
50
+ * terminator, not a phantom extra line (`"a\nb\n"` → 2); empty output → 0 (caller renders no
51
+ * strip); a single blank line (`"\n"`) → 1. */
52
+ export declare function toolOutputLineCount(output: string | undefined): number;
53
+ /**
54
+ * Full, untruncated primary field for the redesigned tool card header (full `path`/`command`/…,
55
+ * CSS-ellipsised rather than shortened to a basename/first line like `toolInlineDetail`). Re-export
56
+ * under an explicit name so components read intent instead of reaching past this module for
57
+ * `toolDetailText` directly.
58
+ */
59
+ export { toolDetailText as toolPrimaryField };
60
+ //# sourceMappingURL=tool-mapping.d.ts.map
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Viewer settings store — the single client-side answer to "is viewer X enabled?"
3
+ * (docs/MOLVIEWER_DECOUPLING.md § 5 phase 0 step 1). Holds the daemon's `viewer_settings_*`
4
+ * document, hydrated on connect and replaced wholesale by every `viewer_settings_update` push
5
+ * (`use-viewer-settings.ts`'s `useViewerSettingsBoot`).
6
+ *
7
+ * This directory is new: phase 1 of the decoupling plan fills it with the plugin contract; the
8
+ * store lands here first because it is the future plugin registry's enabled-filter, not a
9
+ * generic app store — `swe/architecture/viewer-plugin-system.md` § Prerequisite reads it.
10
+ *
11
+ * Deliberately NOT `localStorage`-backed like `appearance-store.ts`: this state lives on the
12
+ * daemon, and a second local copy would be a second source of truth that disagrees with the
13
+ * daemon the first time a phone toggles a viewer.
14
+ *
15
+ * Two decisions this shape encodes:
16
+ * - `isViewerEnabled(id) = viewers[id]?.enabled ?? true`. Absent row, an unhydrated store, and a
17
+ * capability-free daemon all mean *enabled* — the degrade direction always offers the viewer,
18
+ * never hides the user's file behind a daemon version.
19
+ * - `loaded` is a real field, not derived from `Object.keys(viewers).length`: an empty document
20
+ * is a legitimate hydrated state, and the layout replay (task-005) waits on this flag.
21
+ */
22
+ import type { ViewerSettings, ViewerSettingsEntry } from "@av-pi-studio/protocol";
23
+ import type { ViewerSettingsPatch } from "@av-pi-studio/client";
24
+ export interface ViewerSettingsState {
25
+ loaded: boolean;
26
+ /** True iff the daemon advertised the `viewerSettings` capability. */
27
+ capable: boolean;
28
+ viewers: Record<string, ViewerSettingsEntry>;
29
+ isViewerEnabled(id: string): boolean;
30
+ /** Fetches the current document and replaces local state. Never issues an RPC against a
31
+ * capability-free daemon; sets `loaded: true` unconditionally (including on RPC failure) so
32
+ * the layout replay — gated on this flag — never wedges against a stale or unreachable
33
+ * daemon. */
34
+ hydrate(): Promise<void>;
35
+ /** Wholesale replace from a `viewer_settings_update` push. The daemon's document is
36
+ * authoritative — a merge here would resurrect a row another client deleted. */
37
+ applyUpdate(settings: ViewerSettings): void;
38
+ /** Optimistic: flips the row locally first, then reconciles with the daemon's effective
39
+ * document, rolling back to the EXACT prior value (including "no row at all") on rejection. */
40
+ setEnabled(id: string, enabled: boolean): Promise<void>;
41
+ /** Same optimistic-then-reconcile posture as `setEnabled`, for the `config` field. */
42
+ setConfig(id: string, config: Record<string, unknown>): Promise<void>;
43
+ /** Back to the unhydrated state — called on disconnect so a stale document never survives past
44
+ * its daemon. */
45
+ reset(): void;
46
+ }
47
+ export declare const useViewerSettingsStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ViewerSettingsState>>;
48
+ /** Module-level read for non-React callers (e.g. `reopenClientTabs`'s injected predicate) that
49
+ * need a synchronous answer without a hook — the same value `useViewerSettingsStore((s) =>
50
+ * s.isViewerEnabled(id))` would give a component. */
51
+ export declare function isViewerEnabled(id: string): boolean;
52
+ /** Patch-entry type re-exported for convenience — the shape `setViewerSettings`/`setEnabled`/
53
+ * `setConfig` callers already reason in. */
54
+ export type { ViewerSettingsPatch };
55
+ //# sourceMappingURL=viewer-settings-store.d.ts.map
@@ -0,0 +1,36 @@
1
+ /**
2
+ * `@av-pi-studio/workbench/vite` — build-time helpers for an application that bundles the
3
+ * workbench with Vite. Node code: loaded by the consumer's `vite.config.ts`, never by the browser.
4
+ *
5
+ * `pdfjsAssetsPlugin()` serves (dev) and emits (build) pdf.js's runtime data directories under
6
+ * `<base>/pdfjs/<dir>/`. The workbench's PDF viewer loads them by URL on demand, from
7
+ * `host.pdf.assetBaseUrl` (the browser host passes `${import.meta.env.BASE_URL}pdfjs/`). Missing
8
+ * files do not fail loudly: pdf.js misrenders the affected PDFs, and behind an SPA fallback a 404
9
+ * would even come back as `index.html` with a 200.
10
+ */
11
+ import type { IncomingMessage, ServerResponse } from "node:http";
12
+ /**
13
+ * The slice of Vite's `Plugin` this plugin implements, declared here rather than imported so the
14
+ * package carries no type dependency on any particular `vite` copy: it is assignable to the
15
+ * consumer's own `Plugin` type, whichever Vite 5/6 that is.
16
+ */
17
+ export interface PdfjsAssetsPlugin {
18
+ name: string;
19
+ configureServer(server: {
20
+ middlewares: {
21
+ use(handler: (req: IncomingMessage, res: ServerResponse, next: () => void) => void): unknown;
22
+ };
23
+ }): void;
24
+ generateBundle(this: {
25
+ emitFile(file: {
26
+ type: "asset";
27
+ fileName: string;
28
+ source: Uint8Array;
29
+ }): string;
30
+ }): void;
31
+ }
32
+ /** A request is matched against the real directory listing, never joined onto a filesystem path,
33
+ * so only those directories' own files are reachable. `quickjs-eval.*` is pdf.js's
34
+ * PDF-JavaScript engine; the viewer never runs document scripts, so it is not shipped. */
35
+ export declare function pdfjsAssetsPlugin(): PdfjsAssetsPlugin;
36
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { readdirSync as p, readFileSync as d, createReadStream as f } from "node:fs";
2
+ import { createRequire as l } from "node:module";
3
+ import { dirname as u, resolve as i } from "node:path";
4
+ const S = ["cmaps", "standard_fonts", "wasm", "iccs"], n = u(l(import.meta.url).resolve("pdfjs-dist/package.json"));
5
+ function h() {
6
+ const o = new Map(
7
+ S.map((e) => [
8
+ e,
9
+ new Set(
10
+ p(i(n, e)).filter((t) => !t.startsWith("quickjs-eval."))
11
+ )
12
+ ])
13
+ );
14
+ return {
15
+ name: "pi-studio-pdfjs-assets",
16
+ configureServer(e) {
17
+ e.middlewares.use((t, s, m) => {
18
+ const c = /^\/pdfjs\/([^/]+)\/([^/?#]+)/.exec(t.url ?? ""), a = c?.[1], r = c?.[2];
19
+ if (!a || !r || !o.get(a)?.has(r)) return m();
20
+ s.setHeader(
21
+ "Content-Type",
22
+ r.endsWith(".wasm") ? "application/wasm" : "application/octet-stream"
23
+ ), f(i(n, a, r)).pipe(s);
24
+ });
25
+ },
26
+ generateBundle() {
27
+ for (const [e, t] of o)
28
+ for (const s of t)
29
+ this.emitFile({
30
+ type: "asset",
31
+ fileName: `pdfjs/${e}/${s}`,
32
+ source: d(i(n, e, s))
33
+ });
34
+ }
35
+ };
36
+ }
37
+ export {
38
+ h as pdfjsAssetsPlugin
39
+ };
package/package.json CHANGED
@@ -1,6 +1,83 @@
1
1
  {
2
2
  "name": "@av-pi-studio/workbench",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.118",
4
+ "description": "The Pi-Studio client application as a library: every feature, its stores and its shell regions, for web and desktop shells",
5
+ "license": "AGPL-3.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/avatsaev/pi-studio.git",
9
+ "directory": "packages/workbench"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "!dist/**/*.map",
14
+ "!dist/**/.tsbuildinfo"
15
+ ],
16
+ "type": "module",
17
+ "sideEffects": [
18
+ "**/*.css"
19
+ ],
20
+ "main": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/index.js"
26
+ },
27
+ "./styles.css": "./dist/styles.css",
28
+ "./fonts.css": "./dist/fonts.css",
29
+ "./vite": {
30
+ "types": "./dist/vite/index.d.ts",
31
+ "import": "./dist/vite/index.js"
32
+ },
33
+ "./package.json": "./package.json"
34
+ },
35
+ "scripts": {
36
+ "build": "vite build && tsc -b tsconfig.json tsconfig.vite.json && node scripts/check-dist.mjs",
37
+ "check-dist": "node scripts/check-dist.mjs",
38
+ "clean": "rm -rf dist *.tsbuildinfo"
39
+ },
40
+ "dependencies": {
41
+ "@av-pi-studio/client": "^0.0.118",
42
+ "@av-pi-studio/protocol": "^0.0.118",
43
+ "@av-pi-studio/ui-library": "^0.0.118",
44
+ "@codemirror/language": "^6.12.4",
45
+ "@codemirror/language-data": "^6.5.2",
46
+ "@codemirror/state": "^6.7.1",
47
+ "@codemirror/view": "^6.43.6",
48
+ "@dnd-kit/core": "^6.3.1",
49
+ "@dnd-kit/sortable": "^10.0.0",
50
+ "@dnd-kit/utilities": "^3.2.2",
51
+ "@molviewer/core": "^0.4.6",
52
+ "@radix-ui/react-dropdown-menu": "^2.1.19",
53
+ "@tanstack/react-query": "^5.101.2",
54
+ "@tanstack/react-virtual": "^3.14.5",
55
+ "@uiw/codemirror-theme-github": "^4.25.11",
56
+ "@uiw/react-codemirror": "^4.25.11",
57
+ "@xterm/addon-fit": "^0.10.0",
58
+ "@xterm/xterm": "^5.5.0",
59
+ "clsx": "^2.1.1",
60
+ "katex": "^0.18.4",
61
+ "lucide-react": "^0.475.0",
62
+ "mermaid": "^11.16.1",
63
+ "pdfjs-dist": "^6.4.299",
64
+ "qrcode": "^1.5.4",
65
+ "react-markdown": "^9.1.0",
66
+ "rehype-katex": "^7.0.1",
67
+ "remark-gfm": "^4.0.1",
68
+ "remark-math": "^6.0.0",
69
+ "shiki": "^1.29.2",
70
+ "zustand": "^5.0.14"
71
+ },
72
+ "devDependencies": {
73
+ "@types/qrcode": "^1.5.6",
74
+ "@types/react": "^19.2.17",
75
+ "@types/react-dom": "^19.2.3",
76
+ "tweetnacl": "^1.0.3",
77
+ "vite": "^6.4.3"
78
+ },
79
+ "peerDependencies": {
80
+ "react": "^19.0.0",
81
+ "react-dom": "^19.0.0"
82
+ }
83
+ }