@vibefield/rosetta-room 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (435) hide show
  1. package/README.md +247 -2
  2. package/dist/HistoryRoom.d.ts +98 -0
  3. package/dist/HistoryRoom.js +440 -0
  4. package/dist/TranscriptReader.d.ts +22 -0
  5. package/dist/TranscriptReader.js +72 -0
  6. package/dist/components/ColdStart.d.ts +4 -0
  7. package/dist/components/ColdStart.js +5 -0
  8. package/dist/components/FilterChips.d.ts +4 -0
  9. package/dist/components/FilterChips.js +5 -0
  10. package/dist/components/HostAct.d.ts +9 -0
  11. package/dist/components/HostAct.js +16 -0
  12. package/dist/components/HostMenu.d.ts +41 -0
  13. package/dist/components/HostMenu.js +216 -0
  14. package/dist/components/IngestStatus.d.ts +4 -0
  15. package/dist/components/IngestStatus.js +20 -0
  16. package/dist/components/ListActivityNotice.d.ts +5 -0
  17. package/dist/components/ListActivityNotice.js +4 -0
  18. package/dist/components/ListSections.d.ts +20 -0
  19. package/dist/components/ListSections.js +39 -0
  20. package/dist/components/RenameHeading.d.ts +9 -0
  21. package/dist/components/RenameHeading.js +75 -0
  22. package/dist/components/SearchStrip.d.ts +5 -0
  23. package/dist/components/SearchStrip.js +8 -0
  24. package/dist/components/SummaryMetrics.d.ts +13 -0
  25. package/dist/components/SummaryMetrics.js +9 -0
  26. package/dist/components/SummaryPanels.d.ts +35 -0
  27. package/dist/components/SummaryPanels.js +117 -0
  28. package/dist/components/Transcript.d.ts +46 -0
  29. package/dist/components/Transcript.js +358 -0
  30. package/dist/components/charts/ActivityChartDetail.d.ts +13 -0
  31. package/dist/components/charts/ActivityChartDetail.js +78 -0
  32. package/dist/components/charts/CalendarHeatmap.d.ts +16 -0
  33. package/dist/components/charts/CalendarHeatmap.js +55 -0
  34. package/dist/components/charts/DayActivityChart.d.ts +8 -0
  35. package/dist/components/charts/DayActivityChart.js +71 -0
  36. package/dist/components/charts/ModelsChartDetail.d.ts +7 -0
  37. package/dist/components/charts/ModelsChartDetail.js +19 -0
  38. package/dist/components/charts/ProjectChartDialog.d.ts +19 -0
  39. package/dist/components/charts/ProjectChartDialog.js +39 -0
  40. package/dist/components/charts/Streamgraph.d.ts +16 -0
  41. package/dist/components/charts/Streamgraph.js +94 -0
  42. package/dist/components/charts/Treemap.d.ts +26 -0
  43. package/dist/components/charts/Treemap.js +81 -0
  44. package/dist/components/charts/index.d.ts +9 -0
  45. package/dist/components/charts/index.js +4 -0
  46. package/dist/components/charts/streamgraph-layout.d.ts +23 -0
  47. package/dist/components/charts/streamgraph-layout.js +114 -0
  48. package/dist/components/charts/treemap-layout.d.ts +32 -0
  49. package/dist/components/charts/treemap-layout.js +140 -0
  50. package/dist/components/charts/types.d.ts +65 -0
  51. package/dist/components/charts/types.js +8 -0
  52. package/dist/components/file-viewer/FileViewerBrowsers.d.ts +10 -0
  53. package/dist/components/file-viewer/FileViewerBrowsers.js +65 -0
  54. package/dist/components/file-viewer/FileViewerDialog.d.ts +33 -0
  55. package/dist/components/file-viewer/FileViewerDialog.js +82 -0
  56. package/dist/components/file-viewer/FileViewerHeader.d.ts +26 -0
  57. package/dist/components/file-viewer/FileViewerHeader.js +17 -0
  58. package/dist/components/file-viewer/ImageGalleryDialog.d.ts +14 -0
  59. package/dist/components/file-viewer/ImageGalleryDialog.js +98 -0
  60. package/dist/components/file-viewer/diff/index.d.ts +2 -0
  61. package/dist/components/file-viewer/diff/index.js +2 -0
  62. package/dist/components/file-viewer/diff/parse.d.ts +2 -0
  63. package/dist/components/file-viewer/diff/parse.js +164 -0
  64. package/dist/components/file-viewer/diff/types.d.ts +44 -0
  65. package/dist/components/file-viewer/diff/types.js +7 -0
  66. package/dist/components/file-viewer/gallery-source.d.ts +11 -0
  67. package/dist/components/file-viewer/gallery-source.js +75 -0
  68. package/dist/components/file-viewer/image-resource.d.ts +19 -0
  69. package/dist/components/file-viewer/image-resource.js +60 -0
  70. package/dist/components/file-viewer/index.d.ts +5 -0
  71. package/dist/components/file-viewer/index.js +8 -0
  72. package/dist/components/file-viewer/markdown/blocks.d.ts +2 -0
  73. package/dist/components/file-viewer/markdown/blocks.js +277 -0
  74. package/dist/components/file-viewer/markdown/index.d.ts +4 -0
  75. package/dist/components/file-viewer/markdown/index.js +35 -0
  76. package/dist/components/file-viewer/markdown/inline.d.ts +10 -0
  77. package/dist/components/file-viewer/markdown/inline.js +178 -0
  78. package/dist/components/file-viewer/markdown/render.d.ts +9 -0
  79. package/dist/components/file-viewer/markdown/render.js +78 -0
  80. package/dist/components/file-viewer/markdown/types.d.ts +57 -0
  81. package/dist/components/file-viewer/markdown/types.js +11 -0
  82. package/dist/components/file-viewer/minimap/CodeMinimap.d.ts +10 -0
  83. package/dist/components/file-viewer/minimap/CodeMinimap.js +296 -0
  84. package/dist/components/file-viewer/minimap/layout.d.ts +60 -0
  85. package/dist/components/file-viewer/minimap/layout.js +117 -0
  86. package/dist/components/file-viewer/minimap/palette.d.ts +2 -0
  87. package/dist/components/file-viewer/minimap/palette.js +73 -0
  88. package/dist/components/file-viewer/minimap/raster.d.ts +19 -0
  89. package/dist/components/file-viewer/minimap/raster.js +122 -0
  90. package/dist/components/file-viewer/registry.d.ts +25 -0
  91. package/dist/components/file-viewer/registry.js +182 -0
  92. package/dist/components/file-viewer/syntax/grammars.d.ts +16 -0
  93. package/dist/components/file-viewer/syntax/grammars.js +221 -0
  94. package/dist/components/file-viewer/syntax/index.d.ts +8 -0
  95. package/dist/components/file-viewer/syntax/index.js +9 -0
  96. package/dist/components/file-viewer/syntax/languages.d.ts +14 -0
  97. package/dist/components/file-viewer/syntax/languages.js +115 -0
  98. package/dist/components/file-viewer/syntax/tokenize-config.d.ts +2 -0
  99. package/dist/components/file-viewer/syntax/tokenize-config.js +132 -0
  100. package/dist/components/file-viewer/syntax/tokenize-css.d.ts +2 -0
  101. package/dist/components/file-viewer/syntax/tokenize-css.js +169 -0
  102. package/dist/components/file-viewer/syntax/tokenize-markup.d.ts +2 -0
  103. package/dist/components/file-viewer/syntax/tokenize-markup.js +124 -0
  104. package/dist/components/file-viewer/syntax/tokenize.d.ts +9 -0
  105. package/dist/components/file-viewer/syntax/tokenize.js +289 -0
  106. package/dist/components/file-viewer/syntax/types.d.ts +74 -0
  107. package/dist/components/file-viewer/syntax/types.js +13 -0
  108. package/dist/components/file-viewer/types.d.ts +111 -0
  109. package/dist/components/file-viewer/types.js +8 -0
  110. package/dist/components/file-viewer/use-file-content.d.ts +26 -0
  111. package/dist/components/file-viewer/use-file-content.js +144 -0
  112. package/dist/components/file-viewer/views/BinaryView.d.ts +2 -0
  113. package/dist/components/file-viewer/views/BinaryView.js +34 -0
  114. package/dist/components/file-viewer/views/CodeView.d.ts +2 -0
  115. package/dist/components/file-viewer/views/CodeView.js +46 -0
  116. package/dist/components/file-viewer/views/DiffBody.d.ts +7 -0
  117. package/dist/components/file-viewer/views/DiffBody.js +77 -0
  118. package/dist/components/file-viewer/views/DiffView.d.ts +2 -0
  119. package/dist/components/file-viewer/views/DiffView.js +11 -0
  120. package/dist/components/file-viewer/views/ImageView.d.ts +9 -0
  121. package/dist/components/file-viewer/views/ImageView.js +28 -0
  122. package/dist/components/file-viewer/views/MarkdownView.d.ts +9 -0
  123. package/dist/components/file-viewer/views/MarkdownView.js +20 -0
  124. package/dist/components/file-viewer/views/SvgView.d.ts +9 -0
  125. package/dist/components/file-viewer/views/SvgView.js +10 -0
  126. package/dist/components/git/ChangeTree.d.ts +20 -0
  127. package/dist/components/git/ChangeTree.js +35 -0
  128. package/dist/components/git/CommitViewer.d.ts +12 -0
  129. package/dist/components/git/CommitViewer.js +85 -0
  130. package/dist/components/git/GitChanges.d.ts +17 -0
  131. package/dist/components/git/GitChanges.js +70 -0
  132. package/dist/components/git/GitHistory.d.ts +9 -0
  133. package/dist/components/git/GitHistory.js +58 -0
  134. package/dist/components/git/co-author.d.ts +14 -0
  135. package/dist/components/git/co-author.js +55 -0
  136. package/dist/components/git/git-file-source.d.ts +18 -0
  137. package/dist/components/git/git-file-source.js +53 -0
  138. package/dist/components/git/git-host.d.ts +24 -0
  139. package/dist/components/git/git-host.js +130 -0
  140. package/dist/components/git/index.d.ts +10 -0
  141. package/dist/components/git/index.js +12 -0
  142. package/dist/components/git/path-tree.d.ts +23 -0
  143. package/dist/components/git/path-tree.js +73 -0
  144. package/dist/components/git/session-files.d.ts +9 -0
  145. package/dist/components/git/session-files.js +50 -0
  146. package/dist/components/git/types.d.ts +92 -0
  147. package/dist/components/git/types.js +9 -0
  148. package/dist/components/projects/ProjectActivitySparkline.d.ts +6 -0
  149. package/dist/components/projects/ProjectActivitySparkline.js +12 -0
  150. package/dist/components/projects/ProjectList.d.ts +25 -0
  151. package/dist/components/projects/ProjectList.js +43 -0
  152. package/dist/components/projects/ProjectListItem.d.ts +19 -0
  153. package/dist/components/projects/ProjectListItem.js +78 -0
  154. package/dist/components/projects/ProjectsColumn.d.ts +19 -0
  155. package/dist/components/projects/ProjectsColumn.js +36 -0
  156. package/dist/components/projects/index.d.ts +8 -0
  157. package/dist/components/projects/index.js +4 -0
  158. package/dist/components/search/MatchStepper.d.ts +9 -0
  159. package/dist/components/search/MatchStepper.js +14 -0
  160. package/dist/components/search/SearchLauncher.d.ts +12 -0
  161. package/dist/components/search/SearchLauncher.js +13 -0
  162. package/dist/components/search/SearchSheet.d.ts +29 -0
  163. package/dist/components/search/SearchSheet.js +230 -0
  164. package/dist/components/search/index.d.ts +8 -0
  165. package/dist/components/search/index.js +4 -0
  166. package/dist/components/search/shortcut.d.ts +25 -0
  167. package/dist/components/search/shortcut.js +32 -0
  168. package/dist/components/sessions/SessionList.d.ts +24 -0
  169. package/dist/components/sessions/SessionList.js +76 -0
  170. package/dist/components/sessions/SessionListItem.d.ts +13 -0
  171. package/dist/components/sessions/SessionListItem.js +58 -0
  172. package/dist/components/sessions/SessionsColumn.d.ts +26 -0
  173. package/dist/components/sessions/SessionsColumn.js +32 -0
  174. package/dist/components/sessions/index.d.ts +9 -0
  175. package/dist/components/sessions/index.js +4 -0
  176. package/dist/components/sessions/session-display.d.ts +8 -0
  177. package/dist/components/sessions/session-display.js +18 -0
  178. package/dist/components/sessions/types.d.ts +7 -0
  179. package/dist/components/sessions/types.js +1 -0
  180. package/dist/components/transcript/Activity.d.ts +45 -0
  181. package/dist/components/transcript/Activity.js +75 -0
  182. package/dist/components/transcript/Anchor.d.ts +8 -0
  183. package/dist/components/transcript/Anchor.js +23 -0
  184. package/dist/components/transcript/Attachments.d.ts +21 -0
  185. package/dist/components/transcript/Attachments.js +138 -0
  186. package/dist/components/transcript/AuthoredMessage.d.ts +19 -0
  187. package/dist/components/transcript/AuthoredMessage.js +17 -0
  188. package/dist/components/transcript/Compaction.d.ts +9 -0
  189. package/dist/components/transcript/Compaction.js +50 -0
  190. package/dist/components/transcript/DayPill.d.ts +38 -0
  191. package/dist/components/transcript/DayPill.js +68 -0
  192. package/dist/components/transcript/Document.d.ts +32 -0
  193. package/dist/components/transcript/Document.js +503 -0
  194. package/dist/components/transcript/Favicon.d.ts +32 -0
  195. package/dist/components/transcript/Favicon.js +71 -0
  196. package/dist/components/transcript/HeadOfDocument.d.ts +19 -0
  197. package/dist/components/transcript/HeadOfDocument.js +44 -0
  198. package/dist/components/transcript/Ledger.d.ts +53 -0
  199. package/dist/components/transcript/Ledger.js +182 -0
  200. package/dist/components/transcript/LineDetail.d.ts +24 -0
  201. package/dist/components/transcript/LineDetail.js +81 -0
  202. package/dist/components/transcript/Marker.d.ts +33 -0
  203. package/dist/components/transcript/Marker.js +21 -0
  204. package/dist/components/transcript/MessagePreview.d.ts +12 -0
  205. package/dist/components/transcript/MessagePreview.js +58 -0
  206. package/dist/components/transcript/Prompt.d.ts +20 -0
  207. package/dist/components/transcript/Prompt.js +55 -0
  208. package/dist/components/transcript/Prose.d.ts +19 -0
  209. package/dist/components/transcript/Prose.js +109 -0
  210. package/dist/components/transcript/ReceiptPill.d.ts +10 -0
  211. package/dist/components/transcript/ReceiptPill.js +10 -0
  212. package/dist/components/transcript/ResponseHead.d.ts +9 -0
  213. package/dist/components/transcript/ResponseHead.js +36 -0
  214. package/dist/components/transcript/Subthread.d.ts +19 -0
  215. package/dist/components/transcript/Subthread.js +96 -0
  216. package/dist/components/transcript/Team.d.ts +53 -0
  217. package/dist/components/transcript/Team.js +185 -0
  218. package/dist/components/transcript/Thinking.d.ts +24 -0
  219. package/dist/components/transcript/Thinking.js +50 -0
  220. package/dist/components/transcript/TimelineMeta.d.ts +9 -0
  221. package/dist/components/transcript/TimelineMeta.js +161 -0
  222. package/dist/components/transcript/TranscriptLoading.d.ts +10 -0
  223. package/dist/components/transcript/TranscriptLoading.js +10 -0
  224. package/dist/components/transcript/WebDetail.d.ts +8 -0
  225. package/dist/components/transcript/WebDetail.js +29 -0
  226. package/dist/components/transcript/Workflow.d.ts +12 -0
  227. package/dist/components/transcript/Workflow.js +208 -0
  228. package/dist/components/transcript/activity-plan.d.ts +84 -0
  229. package/dist/components/transcript/activity-plan.js +209 -0
  230. package/dist/components/transcript/attachment-file-source.d.ts +23 -0
  231. package/dist/components/transcript/attachment-file-source.js +103 -0
  232. package/dist/components/transcript/attachment-gallery.d.ts +12 -0
  233. package/dist/components/transcript/attachment-gallery.js +33 -0
  234. package/dist/components/transcript/detail-parts.d.ts +50 -0
  235. package/dist/components/transcript/detail-parts.js +295 -0
  236. package/dist/components/transcript/disclosure-state.d.ts +6 -0
  237. package/dist/components/transcript/disclosure-state.js +32 -0
  238. package/dist/components/transcript/disclosure-store.d.ts +8 -0
  239. package/dist/components/transcript/disclosure-store.js +31 -0
  240. package/dist/components/transcript/document-model.d.ts +15 -0
  241. package/dist/components/transcript/document-model.js +104 -0
  242. package/dist/components/transcript/document-plan.d.ts +28 -0
  243. package/dist/components/transcript/document-plan.js +145 -0
  244. package/dist/components/transcript/fold-preference.d.ts +17 -0
  245. package/dist/components/transcript/fold-preference.js +63 -0
  246. package/dist/components/transcript/glyphs.d.ts +15 -0
  247. package/dist/components/transcript/glyphs.js +47 -0
  248. package/dist/components/transcript/index.d.ts +23 -0
  249. package/dist/components/transcript/index.js +22 -0
  250. package/dist/components/transcript/message-file-source.d.ts +15 -0
  251. package/dist/components/transcript/message-file-source.js +31 -0
  252. package/dist/components/transcript/message-preview.d.ts +9 -0
  253. package/dist/components/transcript/message-preview.js +46 -0
  254. package/dist/components/transcript/read-file-source.d.ts +7 -0
  255. package/dist/components/transcript/read-file-source.js +34 -0
  256. package/dist/components/transcript/reader-context.d.ts +13 -0
  257. package/dist/components/transcript/reader-context.js +55 -0
  258. package/dist/components/transcript/reading-identity.d.ts +2 -0
  259. package/dist/components/transcript/reading-identity.js +52 -0
  260. package/dist/components/transcript/scroll-to-row.d.ts +2 -0
  261. package/dist/components/transcript/scroll-to-row.js +13 -0
  262. package/dist/components/transcript/thread-index.d.ts +14 -0
  263. package/dist/components/transcript/thread-index.js +40 -0
  264. package/dist/components/transcript/thread-navigation.d.ts +5 -0
  265. package/dist/components/transcript/thread-navigation.js +3 -0
  266. package/dist/components/transcript/timeline-meta-file-source.d.ts +6 -0
  267. package/dist/components/transcript/timeline-meta-file-source.js +55 -0
  268. package/dist/components/transcript/timeline-meta-state.d.ts +12 -0
  269. package/dist/components/transcript/timeline-meta-state.js +24 -0
  270. package/dist/components/ui/ColumnHeading.d.ts +27 -0
  271. package/dist/components/ui/ColumnHeading.js +7 -0
  272. package/dist/components/ui/ConfirmDialog.d.ts +14 -0
  273. package/dist/components/ui/ConfirmDialog.js +22 -0
  274. package/dist/components/ui/DialogShell.d.ts +18 -0
  275. package/dist/components/ui/DialogShell.js +40 -0
  276. package/dist/components/ui/EmptyState.d.ts +10 -0
  277. package/dist/components/ui/EmptyState.js +6 -0
  278. package/dist/components/ui/ListSummaryHeader.d.ts +9 -0
  279. package/dist/components/ui/ListSummaryHeader.js +6 -0
  280. package/dist/components/ui/ListToolbar.d.ts +6 -0
  281. package/dist/components/ui/ListToolbar.js +5 -0
  282. package/dist/components/ui/ResultGroupHeader.d.ts +9 -0
  283. package/dist/components/ui/ResultGroupHeader.js +5 -0
  284. package/dist/components/ui/SegmentedControl.d.ts +16 -0
  285. package/dist/components/ui/SegmentedControl.js +9 -0
  286. package/dist/components/ui/SummaryMetric.d.ts +13 -0
  287. package/dist/components/ui/SummaryMetric.js +10 -0
  288. package/dist/components/ui/Veil.d.ts +7 -0
  289. package/dist/components/ui/Veil.js +5 -0
  290. package/dist/components/ui/index.d.ts +20 -0
  291. package/dist/components/ui/index.js +10 -0
  292. package/dist/components/worktree/WorktreeColumn.d.ts +22 -0
  293. package/dist/components/worktree/WorktreeColumn.js +170 -0
  294. package/dist/components/worktree/WorktreeFileTree.d.ts +19 -0
  295. package/dist/components/worktree/WorktreeFileTree.js +60 -0
  296. package/dist/components/worktree/WorktreeHeader.d.ts +32 -0
  297. package/dist/components/worktree/WorktreeHeader.js +81 -0
  298. package/dist/components/worktree/WorktreeList.d.ts +8 -0
  299. package/dist/components/worktree/WorktreeList.js +12 -0
  300. package/dist/components/worktree/index.d.ts +12 -0
  301. package/dist/components/worktree/index.js +7 -0
  302. package/dist/components/worktree/types.d.ts +17 -0
  303. package/dist/components/worktree/types.js +3 -0
  304. package/dist/components/worktree/use-worktree-guest.d.ts +21 -0
  305. package/dist/components/worktree/use-worktree-guest.js +92 -0
  306. package/dist/components/worktree/worktree-file-commands.d.ts +19 -0
  307. package/dist/components/worktree/worktree-file-commands.js +112 -0
  308. package/dist/components/worktree/worktree-file-source.d.ts +15 -0
  309. package/dist/components/worktree/worktree-file-source.js +75 -0
  310. package/dist/components/worktree/worktree-host.d.ts +31 -0
  311. package/dist/components/worktree/worktree-host.js +242 -0
  312. package/dist/fixtures/index.d.ts +24 -0
  313. package/dist/fixtures/index.js +292 -0
  314. package/dist/host-inputs.d.ts +231 -0
  315. package/dist/host-inputs.js +35 -0
  316. package/dist/index.d.ts +18 -0
  317. package/dist/index.js +14 -0
  318. package/dist/lib/activity-details.d.ts +23 -0
  319. package/dist/lib/activity-details.js +78 -0
  320. package/dist/lib/activity-order.d.ts +32 -0
  321. package/dist/lib/activity-order.js +86 -0
  322. package/dist/lib/agent-paths.d.ts +6 -0
  323. package/dist/lib/agent-paths.js +19 -0
  324. package/dist/lib/agents.d.ts +15 -0
  325. package/dist/lib/agents.js +60 -0
  326. package/dist/lib/catalog-status.d.ts +3 -0
  327. package/dist/lib/catalog-status.js +10 -0
  328. package/dist/lib/chart-data.d.ts +14 -0
  329. package/dist/lib/chart-data.js +151 -0
  330. package/dist/lib/day-activity.d.ts +21 -0
  331. package/dist/lib/day-activity.js +56 -0
  332. package/dist/lib/format.d.ts +24 -0
  333. package/dist/lib/format.js +116 -0
  334. package/dist/lib/hooks.d.ts +118 -0
  335. package/dist/lib/hooks.js +608 -0
  336. package/dist/lib/icons.d.ts +21 -0
  337. package/dist/lib/icons.js +49 -0
  338. package/dist/lib/image-media.d.ts +6 -0
  339. package/dist/lib/image-media.js +30 -0
  340. package/dist/lib/ingest-activity.d.ts +50 -0
  341. package/dist/lib/ingest-activity.js +151 -0
  342. package/dist/lib/ingest.d.ts +25 -0
  343. package/dist/lib/ingest.js +70 -0
  344. package/dist/lib/model-labels.d.ts +5 -0
  345. package/dist/lib/model-labels.js +28 -0
  346. package/dist/lib/model.d.ts +73 -0
  347. package/dist/lib/model.js +141 -0
  348. package/dist/lib/motion.d.ts +13 -0
  349. package/dist/lib/motion.js +80 -0
  350. package/dist/lib/room-storage.d.ts +13 -0
  351. package/dist/lib/room-storage.js +40 -0
  352. package/dist/lib/search-results.d.ts +27 -0
  353. package/dist/lib/search-results.js +83 -0
  354. package/dist/lib/search-sheet.d.ts +119 -0
  355. package/dist/lib/search-sheet.js +282 -0
  356. package/dist/lib/sections.d.ts +19 -0
  357. package/dist/lib/sections.js +36 -0
  358. package/dist/lib/session-activity.d.ts +5 -0
  359. package/dist/lib/session-activity.js +15 -0
  360. package/dist/lib/session-leases.d.ts +15 -0
  361. package/dist/lib/session-leases.js +61 -0
  362. package/dist/lib/spend.d.ts +42 -0
  363. package/dist/lib/spend.js +112 -0
  364. package/dist/lib/tint.d.ts +9 -0
  365. package/dist/lib/tint.js +53 -0
  366. package/dist/lib/transcript/collaboration.d.ts +97 -0
  367. package/dist/lib/transcript/collaboration.js +423 -0
  368. package/dist/lib/transcript/families.d.ts +212 -0
  369. package/dist/lib/transcript/families.js +906 -0
  370. package/dist/lib/transcript/favicons.d.ts +54 -0
  371. package/dist/lib/transcript/favicons.js +183 -0
  372. package/dist/lib/transcript/head-of-document.d.ts +27 -0
  373. package/dist/lib/transcript/head-of-document.js +274 -0
  374. package/dist/lib/transcript/head-state.d.ts +182 -0
  375. package/dist/lib/transcript/head-state.js +305 -0
  376. package/dist/lib/transcript/history-window.d.ts +13 -0
  377. package/dist/lib/transcript/history-window.js +52 -0
  378. package/dist/lib/transcript/images.d.ts +8 -0
  379. package/dist/lib/transcript/images.js +60 -0
  380. package/dist/lib/transcript/index.d.ts +15 -0
  381. package/dist/lib/transcript/index.js +8 -0
  382. package/dist/lib/transcript/ledger.d.ts +143 -0
  383. package/dist/lib/transcript/ledger.js +513 -0
  384. package/dist/lib/transcript/protocol.d.ts +23 -0
  385. package/dist/lib/transcript/protocol.js +1 -0
  386. package/dist/lib/transcript/sittings.d.ts +75 -0
  387. package/dist/lib/transcript/sittings.js +147 -0
  388. package/dist/lib/transcript/tail-scroll.d.ts +36 -0
  389. package/dist/lib/transcript/tail-scroll.js +167 -0
  390. package/dist/lib/transcript/tail-state.d.ts +17 -0
  391. package/dist/lib/transcript/tail-state.js +30 -0
  392. package/dist/lib/transcript/turns.d.ts +192 -0
  393. package/dist/lib/transcript/turns.js +576 -0
  394. package/dist/lib/transcript/use-transcript-opening.d.ts +12 -0
  395. package/dist/lib/transcript/use-transcript-opening.js +31 -0
  396. package/dist/lib/transcript/use-transcript-tail.d.ts +25 -0
  397. package/dist/lib/transcript/use-transcript-tail.js +158 -0
  398. package/dist/lib/transcript/vocabulary.d.ts +119 -0
  399. package/dist/lib/transcript/vocabulary.js +293 -0
  400. package/dist/lib/transcript/web-address.d.ts +6 -0
  401. package/dist/lib/transcript/web-address.js +18 -0
  402. package/dist/lib/transcript/workflow.d.ts +31 -0
  403. package/dist/lib/transcript/workflow.js +133 -0
  404. package/dist/lib/use-activity-order.d.ts +2 -0
  405. package/dist/lib/use-activity-order.js +23 -0
  406. package/dist/lib/use-day-usage.d.ts +8 -0
  407. package/dist/lib/use-day-usage.js +31 -0
  408. package/dist/lib/use-deferred-list-order.d.ts +26 -0
  409. package/dist/lib/use-deferred-list-order.js +142 -0
  410. package/dist/lib/use-ingest-activity.d.ts +2 -0
  411. package/dist/lib/use-ingest-activity.js +49 -0
  412. package/dist/lib/use-list-motion.d.ts +4 -0
  413. package/dist/lib/use-list-motion.js +67 -0
  414. package/dist/ports.d.ts +222 -0
  415. package/dist/ports.js +3 -0
  416. package/dist/room-context.d.ts +60 -0
  417. package/dist/room-context.js +87 -0
  418. package/dist/styles/activity-chart.css +127 -0
  419. package/dist/styles/attachments.css +29 -0
  420. package/dist/styles/favicon.css +73 -0
  421. package/dist/styles/history-room.css +18 -0
  422. package/dist/styles/host-inputs.css +250 -0
  423. package/dist/styles/image-gallery.css +30 -0
  424. package/dist/styles/ingest.css +51 -0
  425. package/dist/styles/message-preview.css +34 -0
  426. package/dist/styles/models-chart.css +66 -0
  427. package/dist/styles/project-chart.css +19 -0
  428. package/dist/styles/reader.css +33 -0
  429. package/dist/styles/room.css +1411 -0
  430. package/dist/styles/search.css +252 -0
  431. package/dist/styles/transcript-activity.css +70 -0
  432. package/dist/styles/transcript-head.css +220 -0
  433. package/dist/styles/transcript-loading.css +57 -0
  434. package/dist/styles/transcript.css +1226 -0
  435. package/package.json +61 -4
@@ -0,0 +1,109 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ // §03 C/E — the reply's own words.
3
+ //
4
+ // T-1 says the reply is BARE: no fill, no border, primary ink at 14/1.55 on
5
+ // the 68ch measure. The markdown renderer is the one the file viewer already
6
+ // uses (a tree of React elements, never `dangerouslySetInnerHTML`); the only
7
+ // addition the record asks for is the code bar — the fence's language on the
8
+ // left, a copy act on the right.
9
+ //
10
+ // The fences are split out here rather than inside `MarkdownBlocks` because
11
+ // that renderer is shared with the file viewer, where a bar over every fence
12
+ // in a README would be chrome the reader did not ask for. A fence nested in a
13
+ // list or a quote keeps the plain rendering: the bar belongs to a block that
14
+ // owns the measure, and one that does not is not that.
15
+ import { useMemo, useState } from "react";
16
+ import { attachmentMentions } from "../../lib/transcript/index.js";
17
+ import { parseMarkdown } from "../file-viewer/markdown/index.js";
18
+ import { MarkdownBlocks } from "../file-viewer/markdown/render.js";
19
+ import { highlight, languageFor, PLAIN_TEXT } from "../file-viewer/syntax/index.js";
20
+ import { markTerms, useMatchTerms } from "./reader-context.js";
21
+ /** The hover acts. Today the room has exactly one honest act on a segment —
22
+ * copy — so that is what it draws; the record's chip and canvas belong to
23
+ * vibe-field, which this room is not. */
24
+ export function SegmentActs({ text, onReceipt, }) {
25
+ if (text.trim() === "")
26
+ return null;
27
+ return (_jsx("div", { className: "tr-acts", children: _jsx("button", { type: "button", onClick: () => {
28
+ navigator.clipboard
29
+ .writeText(text)
30
+ .then(() => onReceipt("Copied"))
31
+ .catch(() => onReceipt("The clipboard refused it"));
32
+ }, children: "copy" }) }));
33
+ }
34
+ function CodeBar({ language, text, onReceipt, excerpt = false, }) {
35
+ const [copied, setCopied] = useState(false);
36
+ const lines = useMemo(() => {
37
+ const resolved = language === null ? PLAIN_TEXT : (languageFor(`x.${language}`) ?? PLAIN_TEXT);
38
+ return highlight(text, resolved);
39
+ }, [language, text]);
40
+ return (_jsxs("div", { className: "tr-code", children: [_jsxs("div", { className: "tr-code__bar", children: [_jsx("span", { children: language ?? "text" }), !excerpt && _jsx("button", { type: "button", onClick: () => {
41
+ navigator.clipboard
42
+ .writeText(text)
43
+ .then(() => {
44
+ setCopied(true);
45
+ onReceipt("Copied");
46
+ window.setTimeout(() => setCopied(false), 1200);
47
+ })
48
+ .catch(() => onReceipt("The clipboard refused it"));
49
+ }, children: copied ? "copied" : "copy" })] }), _jsx("pre", { children: _jsx("code", { children: lines.map((line, row) => (_jsxs("span", { children: [row > 0 && "\n", line.map((token, at) => token.kind === "plain" ? (_jsx("span", { children: token.text }, at)) : (_jsx("span", { "data-t": token.kind, children: token.text }, at)))] }, row))) }) })] }));
50
+ }
51
+ /** Runs of ordinary blocks go to the shared renderer; a top-level fence gets
52
+ * the bar. Splitting rather than mapping keeps list spacing intact. */
53
+ function partition(blocks) {
54
+ const out = [];
55
+ let run = [];
56
+ for (const block of blocks) {
57
+ if (block.type === "code") {
58
+ if (run.length > 0) {
59
+ out.push(run);
60
+ run = [];
61
+ }
62
+ out.push(block);
63
+ continue;
64
+ }
65
+ run.push(block);
66
+ }
67
+ if (run.length > 0)
68
+ out.push(run);
69
+ return out;
70
+ }
71
+ function linkedAttachments(value, source, targets, onOpen) {
72
+ if (source === undefined)
73
+ return value;
74
+ const nodes = [];
75
+ let cursor = 0;
76
+ for (const target of targets) {
77
+ const start = source.indexOf(target.start);
78
+ const length = target.end - target.start;
79
+ // Only a complete, contiguous plain-text span can become a button. The
80
+ // parser never calls this for code or link labels; trims and escapes keep
81
+ // source positions instead of guessing from repeated rendered wording.
82
+ if (start < cursor || start + length > value.length || !source.slice(start, start + length).every((at, i) => at === target.start + i))
83
+ continue;
84
+ if (start > cursor)
85
+ nodes.push(value.slice(cursor, start));
86
+ const label = value.slice(start, start + length);
87
+ nodes.push(_jsx("button", { className: "tr-image-link", type: "button", "aria-label": `${label} — ${target.target.missing ? "image unavailable" : "open image"}`, "aria-haspopup": target.target.missing ? undefined : "dialog", title: `${target.target.missing ? "Image unavailable" : "Open image"}${target.target.name ? ` · ${target.target.name}` : ""}`, onClick: () => onOpen(target.target), children: label }, target.start));
88
+ cursor = start + length;
89
+ }
90
+ if (cursor === 0)
91
+ return value;
92
+ if (cursor < value.length)
93
+ nodes.push(value.slice(cursor));
94
+ return nodes;
95
+ }
96
+ export function Prose({ text, onReceipt, imageAttachments, imageMarkerSource = text, onOpenAttachment, excerpt = false, }) {
97
+ const trackSource = imageAttachments?.some(fact => fact.ref?.message_ranges?.length) ?? false;
98
+ const parts = useMemo(() => partition(parseMarkdown(text, trackSource)), [text, trackSource]);
99
+ const imageTargets = useMemo(() => attachmentMentions(imageMarkerSource, imageAttachments ?? []), [imageMarkerSource, imageAttachments]);
100
+ const linked = imageTargets.length > 0 && onOpenAttachment !== undefined
101
+ ? (value, source) => linkedAttachments(value, source, imageTargets, onOpenAttachment)
102
+ : undefined;
103
+ // A reader marks the words its search matched; anywhere else there are none.
104
+ const terms = useMatchTerms();
105
+ const renderText = terms.length === 0
106
+ ? linked
107
+ : (value, source) => markTerms(linked === undefined ? value : linked(value, source), terms);
108
+ return (_jsx(_Fragment, { children: parts.map((part, at) => Array.isArray(part) ? (_jsx(MarkdownBlocks, { blocks: part, renderText: renderText }, at)) : (_jsx(CodeBar, { language: part.language, text: part.text, onReceipt: onReceipt, excerpt: excerpt }, at))) }));
109
+ }
@@ -0,0 +1,10 @@
1
+ import "../../styles/transcript-head.css";
2
+ export interface ReceiptPillProps {
3
+ readonly receipt: {
4
+ readonly count: number;
5
+ readonly seq: number;
6
+ } | null;
7
+ /** Pixels from the frame's top. Clear the pinned day pill. */
8
+ readonly top?: number;
9
+ }
10
+ export declare function ReceiptPill({ receipt, top }: ReceiptPillProps): import("react").JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import "../../styles/transcript-head.css";
3
+ export function ReceiptPill({ receipt, top = 120 }) {
4
+ if (receipt === null || receipt.count <= 0)
5
+ return null;
6
+ return (
7
+ // Keyed on the landing so a second receipt inside the first one's dwell
8
+ // remounts, and the pop plays again rather than sliding a number.
9
+ _jsxs("div", { className: "tr-headpill", style: { "--tr-headpill-top": `${top}px` }, children: [_jsx("i", {}), receipt.count, " earlier loaded"] }, receipt.seq));
10
+ }
@@ -0,0 +1,9 @@
1
+ import type { ResponseHead as HeadModel } from "../../lib/transcript/index.js";
2
+ export interface ResponseHeadProps {
3
+ readonly head: HeadModel;
4
+ /** The session's runtime, e.g. `claude-code` — the mark and the name. */
5
+ readonly runtimeKind: string;
6
+ /** A live reply whose end has not landed reads `1m 12s → …` (§05). */
7
+ readonly open: boolean;
8
+ }
9
+ export declare function ResponseHead({ head, runtimeKind, open }: ResponseHeadProps): import("react").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // T-4 / §03 B — one head per response, never per message.
3
+ //
4
+ // Four CLAUDE-OPUS-5 eyebrows on one screen, each over one sentence, is the
5
+ // shipped column's loudest mistake. The eyebrow appears ONCE per reply: the
6
+ // agent's monochrome mark and name, the model and effort as a quiet caption,
7
+ // and at the right the span and the reported tokens.
8
+ //
9
+ // Tokens are the agent's own figure and are never coerced to zero — an agent
10
+ // that reported none says nothing here rather than claiming a total. The cost
11
+ // beside them is the list-price equivalent (§4.1.3), marked `+` when part of
12
+ // the reply has no list price.
13
+ import { AgentMark, agentLabel } from "../../lib/agents.js";
14
+ import { tokenText } from "../../lib/format.js";
15
+ import { usdExact, usdText } from "../../lib/spend.js";
16
+ import { spanText } from "../../lib/transcript/index.js";
17
+ export function ResponseHead({ head, runtimeKind, open }) {
18
+ const caption = [head.model, head.effort === null ? null : `${head.effort} effort`]
19
+ .filter((piece) => piece !== null && piece !== "")
20
+ .join(" · ");
21
+ const span = head.spanMs === null ? null : spanText(head.spanMs);
22
+ // A reply with usage but no priced part still says so (`n/p`), never
23
+ // nothing: an unpriced model must not read as free.
24
+ const cost = head.cost;
25
+ const costText = cost === null
26
+ ? null
27
+ : cost.microUsd === null
28
+ ? "n/p"
29
+ : `${usdText(cost.microUsd)}${cost.partial ? "+" : ""}`;
30
+ const costTitle = cost === null
31
+ ? undefined
32
+ : cost.microUsd === null
33
+ ? "No list price for this reply's model"
34
+ : `${usdExact(cost.microUsd)} at API list prices${cost.partial ? " · a lower bound: part of this reply has no list price or no recorded output" : ""}`;
35
+ return (_jsxs("div", { className: "tr-head", children: [_jsx("span", { className: "mark", children: _jsx(AgentMark, { kind: runtimeKind }) }), agentLabel(runtimeKind), caption !== "" && _jsx("span", { className: "model", children: caption }), (span !== null || head.tokens !== null) && (_jsxs("span", { className: "facts", children: [span !== null && (open ? `${span} → …` : span), span !== null && head.tokens !== null && " · ", head.tokens !== null && _jsx("b", { children: tokenText(head.tokens) }), head.tokens !== null && costText !== null && " · ", costText !== null && _jsx("b", { title: costTitle, children: costText })] }))] }));
36
+ }
@@ -0,0 +1,19 @@
1
+ import type { SessionRow } from "@vibefield/rosetta-protocol";
2
+ import type { AttachmentFact, PathFact } from "../../lib/transcript/index.js";
3
+ import type { ThreadFocus, ThreadIndex } from "./thread-index.js";
4
+ export interface SubthreadProps {
5
+ readonly session: SessionRow;
6
+ /** The link was proven, so this run sits under its own line rather than
7
+ * being interleaved by a start time nobody claimed causes anything. */
8
+ readonly anchored: boolean;
9
+ readonly duringBackfill: boolean;
10
+ readonly index: ThreadIndex;
11
+ readonly focus: ThreadFocus | null;
12
+ readonly onFocusConsumed: () => void;
13
+ readonly onReceipt: (text: string) => void;
14
+ readonly onOpenAttachment: (fact: AttachmentFact, row?: readonly AttachmentFact[]) => void;
15
+ readonly onOpenPath: (path: PathFact) => void;
16
+ readonly getRuntimeKind: (runtimeId: string) => string;
17
+ readonly homeDirectory: string | null;
18
+ }
19
+ export declare function Subthread(props: SubthreadProps): import("react").JSX.Element;
@@ -0,0 +1,96 @@
1
+ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ // §03 F — the delegate's child run, in place.
3
+ //
4
+ // A proven `child_session_id` opens under its own ledger line, the grammar
5
+ // one size down (13px), headed by the child's mark, name, role and range.
6
+ // At depth three, open the child's document at the column's full measure.
7
+ //
8
+ // It stays LAZY. The line it hangs from is closed until pressed, so a parent
9
+ // with nine delegations does not open nine websockets to draw nothing; the
10
+ // component mounts when the line opens, and that is the subscription.
11
+ import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
12
+ import { activityCuts } from "./activity-plan.js";
13
+ import { revealActivityTarget } from "./Activity.js";
14
+ import { clock } from "../../lib/format.js";
15
+ import { AgentMark, agentLabel } from "../../lib/agents.js";
16
+ import { useTimeline } from "../../lib/hooks.js";
17
+ import { ReadingSessionProvider, useRoom } from "../../room-context.js";
18
+ import { TranscriptDocument } from "./Document.js";
19
+ import { useTranscriptModel } from "./document-model.js";
20
+ import { messageDomId, sessionContains, subthreadTitle } from "./thread-index.js";
21
+ import { ThreadNavigationContext } from "./thread-navigation.js";
22
+ export function Subthread(props) {
23
+ const navigation = useContext(ThreadNavigationContext);
24
+ const detached = navigation.depth >= 3 && navigation.open !== null;
25
+ const onFocusPath = props.focus !== null && sessionContains(props.session.id, props.focus.sessionId, props.index.byId);
26
+ useEffect(() => {
27
+ if (detached && onFocusPath)
28
+ navigation.open?.(props.session.id);
29
+ }, [detached, onFocusPath, navigation.open, props.session.id]);
30
+ if (detached)
31
+ return _jsxs("button", { type: "button", className: "tr-child-link", onClick: () => navigation.open?.(props.session.id), children: ["Open child transcript ", _jsxs("span", { children: [subthreadTitle(props.session), " \u2197"] })] });
32
+ return _jsx(EmbeddedSubthread, { ...props });
33
+ }
34
+ function EmbeddedSubthread({ session, anchored, duringBackfill, index, focus, onFocusConsumed, onReceipt, onOpenAttachment, onOpenPath, getRuntimeKind, homeDirectory, }) {
35
+ const onFocusPath = focus !== null && sessionContains(session.id, focus.sessionId, index.byId);
36
+ // Anchored runs were revealed by pressing their own delegate line, so they
37
+ // open with it. A run placed only by its start time keeps a disclosure: a
38
+ // parent with nine of them must not open nine subscriptions to draw nothing.
39
+ const [open, setOpen] = useState(anchored || onFocusPath);
40
+ const shown = open || onFocusPath;
41
+ const { sessions } = useRoom();
42
+ const feed = useTimeline(sessions, shown ? session.id : null);
43
+ const cuts = useMemo(() => activityCuts(feed.rows, feed.watermark), [feed.rows, feed.watermark]);
44
+ const model = useTranscriptModel(feed.rows, session, homeDirectory, Date.now(), { cutBefore: cuts.cutBefore });
45
+ const [highlightedTimelineId, setHighlightedTimelineId] = useState(null);
46
+ const focusTries = useRef(0);
47
+ const displayedLayout = useRef(null);
48
+ const onTimelineLayout = useCallback((layout) => { displayedLayout.current = layout; }, []);
49
+ const targetTimelineId = focus?.sessionId === session.id ? focus.timelineId : null;
50
+ useEffect(() => {
51
+ if (onFocusPath)
52
+ setOpen(true);
53
+ }, [onFocusPath]);
54
+ useEffect(() => {
55
+ focusTries.current = 0;
56
+ // Consuming the focus nulls the target; clearing here would wipe the ring
57
+ // in the frame it was drawn.
58
+ if (targetTimelineId !== null)
59
+ setHighlightedTimelineId(null);
60
+ }, [targetTimelineId]);
61
+ useEffect(() => {
62
+ // The same rule the column keeps: a feed that has not delivered yet says
63
+ // nothing is above it, and that is not evidence of anything.
64
+ if (targetTimelineId === null ||
65
+ (feed.status !== "live" && feed.status !== "resyncing")) {
66
+ return;
67
+ }
68
+ const drawnBy = model.representatives.get(targetTimelineId) ?? null;
69
+ if (drawnBy !== null) {
70
+ const element = displayedLayout.current?.elementForAnchor?.(targetTimelineId)
71
+ ?? document.getElementById(messageDomId(session.id, drawnBy));
72
+ if (element) {
73
+ revealActivityTarget(element);
74
+ setHighlightedTimelineId(element.dataset.timelineId ?? drawnBy);
75
+ onFocusConsumed();
76
+ window.setTimeout(() => setHighlightedTimelineId(null), 1500);
77
+ }
78
+ return;
79
+ }
80
+ // The anchor search still pages blindly upward — `loadEarlier` exists for
81
+ // exactly this, and it is the one caller the deprecation keeps.
82
+ if (feed.earlier.kind !== "none" && focusTries.current < 8) {
83
+ focusTries.current += 1;
84
+ feed.loadEarlier();
85
+ }
86
+ else if (feed.earlier.kind === "none") {
87
+ onFocusConsumed();
88
+ onReceipt("That subthread message is older than the loaded history");
89
+ }
90
+ }, [targetTimelineId, session.id, feed, model, onFocusConsumed, onReceipt]);
91
+ const kind = getRuntimeKind(session.runtime_id);
92
+ const range = session.activity
93
+ ? `${clock(session.activity.first_at)} → ${clock(session.activity.last_at)}`
94
+ : "Activity time unknown";
95
+ return (_jsxs("div", { className: "tr-sub", "data-anchored": anchored || undefined, children: [_jsxs("button", { type: "button", className: "tr-sub__head", "aria-expanded": shown, onClick: () => setOpen((value) => !value), children: [_jsx("span", { className: "mark", children: _jsx(AgentMark, { kind: kind }) }), _jsxs("span", { className: "tr-sub__name", title: subthreadTitle(session), children: [subthreadTitle(session), _jsxs("span", { className: "tr-sub__role", children: [" · ", agentLabel(kind), session.role === "main" ? "" : ` · ${session.role}`] })] }), _jsx("span", { className: "when", children: range })] }), shown && (_jsx(ReadingSessionProvider, { value: session.id, children: _jsxs("div", { className: "tr", children: [!feed.snapshotReady && _jsx("p", { className: "tr-quiet", role: "status", children: "Loading messages\u2026" }), feed.snapshotReady && feed.earlier.kind !== "none" && _jsx("div", { className: "tr-activity__loading", role: "status", children: feed.earlier.kind === "fetching" || feed.earlier.kind === "revealing" ? "Loading earlier messages…" : _jsxs(_Fragment, { children: [_jsx("span", { children: feed.earlier.kind === "failed" ? "Could not load earlier messages." : "Earlier messages are not loaded." }), _jsx("button", { type: "button", onClick: feed.loadEarlier, children: feed.earlier.kind === "failed" ? "Retry" : "Load earlier messages" })] }) }), _jsx(TranscriptDocument, { session: session, model: model, feed: feed, duringBackfill: duringBackfill, index: index, focus: onFocusPath ? focus : null, highlightedTimelineId: highlightedTimelineId, onFocusConsumed: onFocusConsumed, onReceipt: onReceipt, onOpenAttachment: onOpenAttachment, onOpenPath: onOpenPath, getRuntimeKind: getRuntimeKind, homeDirectory: homeDirectory, onPillPress: null, onTimelineLayout: onTimelineLayout, nested: true })] }) }))] }));
96
+ }
@@ -0,0 +1,53 @@
1
+ import type { ReactNode } from "react";
2
+ import type { CollaborationEvent, ParticipantColor, ResponseRuntime, SessionRow, TimelineEntry } from "@vibefield/rosetta-protocol";
3
+ import type { AttachmentFact, CollaborationTimeBasis, RuntimeProfile, TeamMemberPresentation, TeamParticipantPresentation } from "../../lib/transcript/index.js";
4
+ export declare function TeamWorkthread({ name, color, runtime, startedAt, endedAt, children, }: {
5
+ readonly name: string | null;
6
+ readonly color: ParticipantColor | null;
7
+ readonly runtime: RuntimeProfile;
8
+ readonly startedAt: number | null;
9
+ readonly endedAt: number | null;
10
+ readonly children: ReactNode;
11
+ }): import("react").JSX.Element;
12
+ export interface TeamInvocationProps {
13
+ readonly members: readonly TeamMemberPresentation[];
14
+ readonly domIdOf: (timelineId: string) => string;
15
+ readonly highlightedTimelineId: string | null;
16
+ readonly focusTimelineId: string | null;
17
+ }
18
+ /** One proven initial burst, or the first safe view of an older team, becomes
19
+ * one roster line. Later add/resume operations keep their own chronological
20
+ * line and put the member's model/effort at the edge. */
21
+ export declare function TeamInvocation({ members, domIdOf, highlightedTimelineId, focusTimelineId, }: TeamInvocationProps): import("react").JSX.Element;
22
+ /** A page can begin after the creation calls while metadata still proves the
23
+ * current roster. State is shown without fabricating a historical “Started”. */
24
+ export declare function KnownTeamRoster({ sessions, rowsBySession, responseRuntimesBySession, historyReady, historyError, onRetry, }: {
25
+ readonly sessions: readonly SessionRow[];
26
+ readonly rowsBySession: ReadonlyMap<string, readonly TimelineEntry[]>;
27
+ readonly responseRuntimesBySession: ReadonlyMap<string, readonly ResponseRuntime[]>;
28
+ readonly historyReady: boolean;
29
+ readonly historyError: string | null;
30
+ readonly onRetry: () => void;
31
+ }): import("react").JSX.Element;
32
+ export interface TeamEventProps {
33
+ readonly event: CollaborationEvent;
34
+ readonly attachments: readonly AttachmentFact[];
35
+ readonly onOpenAttachment: (fact: AttachmentFact, row?: readonly AttachmentFact[]) => void;
36
+ readonly at: number | null;
37
+ readonly timeBasis: CollaborationTimeBasis;
38
+ readonly domId: string;
39
+ readonly timelineId: string;
40
+ readonly participant: TeamParticipantPresentation | null;
41
+ readonly recipientParticipant?: TeamParticipantPresentation | null;
42
+ readonly hit: boolean;
43
+ readonly forceOpen: boolean;
44
+ readonly reportWork?: TeamReportWorkPresentation | null;
45
+ readonly onReceipt: (message: string) => void;
46
+ }
47
+ export interface TeamReportWorkPresentation {
48
+ readonly content: ReactNode;
49
+ readonly actionCount: number | null;
50
+ readonly startedAt: number | null;
51
+ readonly endedAt: number | null;
52
+ }
53
+ export declare function TeamEvent({ event, attachments, onOpenAttachment, at, timeBasis, domId, timelineId, participant, recipientParticipant, hit, forceOpen, reportWork, onReceipt, }: TeamEventProps): import("react").JSX.Element;
@@ -0,0 +1,185 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ // Agent Teams — an addressable roster and shared boundary messages.
3
+ //
4
+ // Participant colour is intentionally confined to Claude Code's small mark.
5
+ // It identifies an @address; it never paints a rail, surface, status, or prose.
6
+ import { useEffect, useState } from "react";
7
+ import { AgentMark } from "../../lib/agents.js";
8
+ import { clock } from "../../lib/format.js";
9
+ import { canonicalText, firstLine, runtimeProfile, spanText } from "../../lib/transcript/index.js";
10
+ import { AuthoredMessage } from "./AuthoredMessage.js";
11
+ import { LineChevron } from "./glyphs.js";
12
+ import { ActivityEvent } from "./Activity.js";
13
+ import { useRowDisclosure } from "./disclosure-state.js";
14
+ function address(name) {
15
+ if (name === null || name.trim() === "")
16
+ return "teammate";
17
+ return name.startsWith("@") ? name : `@${name}`;
18
+ }
19
+ function speaker(name) {
20
+ return name === "coordinator" ? "Claude Code" : address(name);
21
+ }
22
+ function TeamAvatar({ color, name, }) {
23
+ return (_jsx("span", { className: "tm-avatar", "data-member-color": color ?? undefined, "aria-hidden": "true", children: _jsx(AgentMark, { kind: "claude-code", note: name === null ? "Agent Team member" : speaker(name) }) }));
24
+ }
25
+ export function TeamWorkthread({ name, color, runtime, startedAt, endedAt, children, }) {
26
+ const range = startedAt === null
27
+ ? endedAt === null
28
+ ? null
29
+ : clock(endedAt)
30
+ : endedAt === null || endedAt === startedAt
31
+ ? clock(startedAt)
32
+ : `${clock(startedAt)} → ${clock(endedAt)}`;
33
+ const duration = startedAt !== null && endedAt !== null && endedAt >= startedAt
34
+ ? spanText(endedAt - startedAt)
35
+ : null;
36
+ return (_jsxs("div", { className: "tr-sub tm-workthread", "data-anchored": "true", "data-member-color": color ?? undefined, role: "region", "aria-label": `Proven work behind ${address(name)} result`, children: [_jsxs("div", { className: "tr-sub__head", children: [_jsx(TeamAvatar, { color: color, name: name }), _jsxs("span", { children: [_jsx("span", { className: "tm-workthread__name", children: address(name) }), _jsx("span", { className: "tm-workthread__kind", children: " \u00B7 exact task-bounded work slice" })] }), range !== null && _jsx("span", { className: "when", children: range })] }), _jsxs("div", { className: "tr", children: [_jsxs("div", { className: "tr-head", children: [_jsx("span", { className: "mark", children: _jsx(TeamAvatar, { color: color, name: name }) }), _jsx("span", { className: "tm-workthread__name", children: address(name) }), _jsx("span", { className: "model", children: runtime.label }), duration !== null && _jsx("span", { className: "facts", children: duration })] }), children, _jsxs("div", { className: "tm-workthread__end", children: [_jsx("span", { children: "result rendered above \u00B7 nested delivery copy suppressed" }), endedAt !== null && _jsx("time", { children: clock(endedAt) })] })] })] }));
37
+ }
38
+ function TeamMention({ member }) {
39
+ return _jsx(AddressMention, { name: member.name, color: member.color });
40
+ }
41
+ function AddressMention({ name, color, }) {
42
+ return (_jsxs("span", { className: "tm-mention", "data-member-color": color ?? undefined, children: [_jsx(TeamAvatar, { color: color, name: name }), speaker(name)] }));
43
+ }
44
+ function invocationRange(members) {
45
+ const stamps = members
46
+ .map((member) => member.row.at)
47
+ .filter((value) => value !== null);
48
+ if (stamps.length === 0)
49
+ return null;
50
+ const first = Math.min(...stamps);
51
+ const last = Math.max(...stamps);
52
+ return first === last ? clock(first) : `${clock(first)}–${clock(last)}`;
53
+ }
54
+ /** One proven initial burst, or the first safe view of an older team, becomes
55
+ * one roster line. Later add/resume operations keep their own chronological
56
+ * line and put the member's model/effort at the edge. */
57
+ export function TeamInvocation({ members, domIdOf, highlightedTimelineId, focusTimelineId, }) {
58
+ const first = members[0];
59
+ const isRoster = first.operation === "start" || first.operation === "known";
60
+ const forceOpen = isRoster && members.some((member) => member.row.timeline_id === focusTimelineId || member.row.timeline_id === highlightedTimelineId);
61
+ const [open, setOpen] = useRowDisclosure(domIdOf(first.row.timeline_id));
62
+ useEffect(() => {
63
+ if (forceOpen)
64
+ setOpen(true);
65
+ }, [forceOpen]);
66
+ const expanded = isRoster && (open || forceOpen);
67
+ const range = invocationRange(members);
68
+ const hit = members.some((member) => member.row.timeline_id === highlightedTimelineId);
69
+ if (!isRoster) {
70
+ const verb = first.operation === "resume" ? "Resumed teammate" : "Added teammate";
71
+ return (_jsxs("div", { className: "tr-line tm-invocation", id: domIdOf(first.row.timeline_id), "data-timeline-id": first.row.timeline_id, "data-team-operation": first.operation, "data-member-color": first.color ?? undefined, "data-hit": hit || undefined, children: [_jsx("span", { className: "tr-line__g", children: _jsx(TeamAvatar, { color: first.color, name: first.name }) }), _jsx("span", { className: "tr-line__v", children: verb }), _jsxs("span", { className: "tr-line__o", title: first.objective, children: [_jsx(TeamMention, { member: first }), _jsxs("span", { className: "in", children: [" \u00B7 ", first.objective] })] }), _jsxs("span", { className: "tr-line__r", children: [_jsx("span", { className: "tm-runtime", children: first.runtime.label }), range !== null && _jsx("span", { className: "t", children: range })] })] }));
72
+ }
73
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "tr-line tm-invocation", id: domIdOf(first.row.timeline_id), "data-timeline-id": first.row.timeline_id, "data-team-operation": first.operation, "data-hit": hit || undefined, role: "button", tabIndex: 0, "aria-expanded": expanded, onClick: () => setOpen((value) => !value), onKeyDown: (event) => {
74
+ if (event.key !== "Enter" && event.key !== " ")
75
+ return;
76
+ event.preventDefault();
77
+ setOpen((value) => !value);
78
+ }, children: [_jsx("span", { className: "tr-line__g tm-avatar-stack", "aria-label": "Agent Team members", children: members.slice(0, 3).map((member) => (_jsx(TeamAvatar, { color: member.color, name: member.name }, member.row.timeline_id))) }), _jsx("span", { className: "tr-line__v", children: first.operation === "start" ? "Started team" : "Team active" }), _jsx("span", { className: "tr-line__o", children: first.team }), _jsxs("span", { className: "tr-line__r", children: [_jsxs("span", { children: [members.length, " ", first.operation === "known" ? "known " : "", members.length === 1 ? "teammate" : "teammates"] }), range !== null && _jsx("span", { className: "t", children: range }), _jsx("span", { className: "chev", children: _jsx(LineChevron, {}) })] })] }), expanded && (_jsxs("div", { className: "tm-roster", role: "region", "aria-label": `${first.team} roster`, children: [members.map((member, index) => (_jsxs("div", { className: "tm-roster__row", id: index === 0 ? undefined : domIdOf(member.row.timeline_id), "data-timeline-id": member.row.timeline_id, "data-member-color": member.color ?? undefined, "data-hit": member.row.timeline_id === highlightedTimelineId || undefined, children: [_jsx(TeamAvatar, { color: member.color, name: member.name }), _jsx("span", { className: "tm-roster__name", children: address(member.name) }), _jsx("span", { className: "tm-roster__job", title: member.objective, children: member.objective }), _jsx("span", { className: "tm-runtime", children: member.runtime.label })] }, member.row.timeline_id))), members.some((member) => member.color === null) && (_jsx("div", { className: "tm-note", children: "A missing native colour keeps the Claude mark neutral." })), first.operation === "known" && (_jsx("div", { className: "tm-note", children: "Team creation is above this page; this is the known roster, not a reconstructed start." }))] }))] }));
79
+ }
80
+ /** A page can begin after the creation calls while metadata still proves the
81
+ * current roster. State is shown without fabricating a historical “Started”. */
82
+ export function KnownTeamRoster({ sessions, rowsBySession, responseRuntimesBySession, historyReady, historyError, onRetry, }) {
83
+ const [open, setOpen] = useState(false);
84
+ const team = sessions.find((session) => session.delegation?.team != null)?.delegation?.team;
85
+ return (_jsxs("div", { className: "tr-ledger tm-known", children: [_jsxs("div", { className: "tr-line", role: "button", tabIndex: 0, "aria-expanded": open, onClick: () => setOpen((value) => !value), onKeyDown: (event) => {
86
+ if (event.key !== "Enter" && event.key !== " ")
87
+ return;
88
+ event.preventDefault();
89
+ setOpen((value) => !value);
90
+ }, children: [_jsx("span", { className: "tr-line__g tm-avatar-stack", children: sessions.slice(0, 3).map((session) => (_jsx(TeamAvatar, { color: session.delegation?.color ?? null, name: session.title }, session.id))) }), _jsx("span", { className: "tr-line__v", children: "Team active" }), _jsxs("span", { className: "tr-line__o", children: [team == null ? "Agent Team" : team, " \u00B7 ", sessions.length, " known ", sessions.length === 1 ? "teammate" : "teammates"] }), _jsx("span", { className: "tr-line__r", children: _jsx("span", { className: "chev", children: _jsx(LineChevron, {}) }) })] }), open && (_jsxs("div", { className: "tm-roster", role: "region", "aria-label": "Known Agent Team members", children: [sessions.map((session) => (_jsxs("div", { className: "tm-roster__row", children: [_jsx(TeamAvatar, { color: session.delegation?.color ?? null, name: session.title }), _jsx("span", { className: "tm-roster__name", children: address(session.title ?? session.native_session_id) }), _jsx("span", { className: "tm-roster__job", title: session.summary ?? undefined, children: session.summary ?? "objective not recorded on this page" }), _jsx("span", { className: "tm-runtime", children: runtimeProfile(rowsBySession.get(session.id) ?? [], session.delegation?.configured_model ?? null, responseRuntimesBySession.get(session.id) ?? []).label })] }, session.id))), _jsx("div", { className: "tm-note", children: historyError !== null ? _jsxs("span", { className: "tr-activity__loading", role: "status", children: ["Could not load team messages. ", _jsx("button", { type: "button", onClick: onRetry, children: "Retry" })] }) : historyReady
91
+ ? "Creation is above this page; no historical start time is inferred."
92
+ : "Loading complete delivered-message history; private teammate work stays closed." })] }))] }));
93
+ }
94
+ function eventBody(event) {
95
+ if (event.body !== null)
96
+ return canonicalText(event.body);
97
+ return event.summary;
98
+ }
99
+ function eventRoute(event) {
100
+ if (event.recipient !== null)
101
+ return `→ ${speaker(event.recipient)}`;
102
+ if (event.team !== null)
103
+ return `→ @${event.team}`;
104
+ return null;
105
+ }
106
+ function eventRuntime(participant) {
107
+ return participant?.runtime ?? {
108
+ basis: "unknown",
109
+ label: "runtime not recorded",
110
+ model: null,
111
+ effort: null,
112
+ profileCount: 0,
113
+ };
114
+ }
115
+ function TeamTime({ at, basis, className, }) {
116
+ if (at === null)
117
+ return null;
118
+ const arrivalFallback = basis === "observed_arrival";
119
+ return (_jsxs("time", { className: className, "data-time-basis": basis, title: arrivalFallback
120
+ ? "Delivery arrival time; native authored time was not recorded"
121
+ : "Native authored time", children: [clock(at), arrivalFallback && _jsx("span", { className: "tm-time-basis", children: " \u00B7 arrived" })] }));
122
+ }
123
+ function lifecycleText(event) {
124
+ const who = speaker(event.sender);
125
+ switch (event.kind) {
126
+ case "idle":
127
+ return event.status === "failed" ? `${who} is idle · failed` : `${who} is available`;
128
+ case "stop_requested":
129
+ return `stop requested by ${who}`;
130
+ case "stop_approved":
131
+ return `stop approved by ${who}`;
132
+ case "terminated":
133
+ return `${who} terminated`;
134
+ case "assignment":
135
+ case "message":
136
+ case "report":
137
+ return event.summary ?? event.kind;
138
+ }
139
+ }
140
+ function TeamReport({ event, attachments, onOpenAttachment, at, timeBasis, domId, timelineId, color, runtime, hit, forceOpen, work, onReceipt, }) {
141
+ const body = eventBody(event);
142
+ const [open, setOpen] = useRowDisclosure(domId);
143
+ const [workOpen, setWorkOpen] = useRowDisclosure(`${domId}:work`);
144
+ useEffect(() => {
145
+ if (forceOpen || hit)
146
+ setOpen(true);
147
+ }, [forceOpen, hit, setOpen]);
148
+ const pressable = true;
149
+ const expanded = pressable && (open || forceOpen);
150
+ const route = eventRoute(event);
151
+ const summary = event.summary ?? (body === null ? "result" : firstLine(body));
152
+ const workSpan = work?.startedAt !== null && work?.startedAt !== undefined && work.endedAt !== null
153
+ ? spanText(Math.max(0, work.endedAt - work.startedAt))
154
+ : null;
155
+ const workFacts = work === null
156
+ ? null
157
+ : [work.actionCount === null || work.actionCount === 0 ? "recorded work" : `${work.actionCount} ${work.actionCount === 1 ? "action" : "actions"}`, workSpan]
158
+ .filter((fact) => fact !== null)
159
+ .join(" · ");
160
+ return (_jsxs("div", { className: "tr-ledger tm-report", "data-member-color": color ?? undefined, children: [_jsxs("div", { className: "tr-line tm-report__line", id: domId, "data-timeline-id": timelineId, "data-hit": hit || undefined, role: pressable ? "button" : undefined, tabIndex: pressable ? 0 : undefined, "aria-expanded": pressable ? expanded : undefined, onClick: () => pressable && setOpen((value) => !value), onKeyDown: (keyboardEvent) => {
161
+ if (!pressable || (keyboardEvent.key !== "Enter" && keyboardEvent.key !== " "))
162
+ return;
163
+ keyboardEvent.preventDefault();
164
+ setOpen((value) => !value);
165
+ }, children: [_jsx("span", { className: "tr-line__g", children: _jsx(TeamAvatar, { color: color, name: event.sender }) }), _jsx("span", { className: "tr-line__v", children: "Reported" }), _jsxs("span", { className: "tr-line__o", title: summary, children: [address(event.sender), route === null ? "" : ` ${route}`, " ", _jsxs("span", { className: "in", children: ["\u00B7 ", summary] })] }), _jsxs("span", { className: "tr-line__r", children: [_jsx("span", { className: "tm-runtime", children: runtime.label }), _jsx(TeamTime, { at: at, basis: timeBasis, className: "t" }), pressable && _jsx("span", { className: "chev", children: _jsx(LineChevron, {}) })] })] }), expanded && (_jsxs("div", { className: "tr-detail tm-report__detail", role: "region", "aria-label": `Report from ${address(event.sender)}`, children: [_jsxs("div", { className: "tr-detail__bar", children: [_jsx("span", { className: "path", children: event.task_id === null ? "correlated team result" : `task result · ${event.task_id}` }), _jsx("span", { children: "one rendered delivery" })] }), body !== null ? (_jsx("div", { className: "tm-message__body tr-prose", children: _jsx(AuthoredMessage, { messageKey: domId, role: "agent", attachments: attachments, imagesOutside: true, onOpenAttachment: onOpenAttachment, matched: hit, title: `Team report from ${speaker(event.sender)}`, text: body, recordedText: event.body, onReceipt: onReceipt }) })) : _jsx("p", { className: "tr-quiet", children: "No message body recorded." }), work !== null && (_jsxs("div", { className: "tm-message__foot", children: [_jsxs("button", { className: "tm-work", type: "button", "aria-expanded": workOpen, onClick: () => setWorkOpen((value) => !value), children: [_jsx("span", { className: "chev", "aria-hidden": "true", children: _jsx(LineChevron, {}) }), _jsx("span", { children: "proven work behind this result" })] }), workFacts !== null && _jsx("span", { children: workFacts })] })), workOpen && work?.content] }))] }));
166
+ }
167
+ export function TeamEvent({ event, attachments, onOpenAttachment, at, timeBasis, domId, timelineId, participant, recipientParticipant = null, hit, forceOpen, reportWork = null, onReceipt, }) {
168
+ const color = event.color ?? participant?.color ?? null;
169
+ const runtime = eventRuntime(participant);
170
+ if (event.kind === "report") {
171
+ return (_jsx(TeamReport, { event: event, attachments: attachments, onOpenAttachment: onOpenAttachment, at: at, timeBasis: timeBasis, domId: domId, timelineId: timelineId, color: color, runtime: runtime, hit: hit, forceOpen: forceOpen, work: reportWork, onReceipt: onReceipt }));
172
+ }
173
+ if (!matchesMessage(event)) {
174
+ const failed = event.status === "failed";
175
+ return (_jsxs(ActivityEvent, { domId: domId, timelineId: timelineId, label: "Team update", summary: lifecycleText(event), at: at, hit: hit, forceOpen: forceOpen, failed: failed, glyph: _jsx(TeamAvatar, { color: color, name: event.sender }), children: [_jsx("p", { children: lifecycleText(event) }), _jsx(TeamTime, { at: at, basis: timeBasis }), eventBody(event) !== null && _jsx(AuthoredMessage, { messageKey: domId, role: "agent", title: "Team update", attachments: attachments, imagesOutside: true, onOpenAttachment: onOpenAttachment, matched: hit, text: eventBody(event) ?? "", recordedText: event.body, onReceipt: onReceipt })] }));
176
+ }
177
+ const body = eventBody(event);
178
+ const route = eventRoute(event);
179
+ const label = event.kind === "assignment" ? "Assignment" : event.channel === "peer" ? "Peer message"
180
+ : event.channel === "coordinator" ? "Coordinator follow-up" : "Team message";
181
+ return (_jsxs(ActivityEvent, { domId: domId, timelineId: timelineId, label: label, summary: `${speaker(event.sender)}${route === null ? "" : ` ${route}`}`, at: at, hit: hit, forceOpen: forceOpen, glyph: _jsx(TeamAvatar, { color: color, name: event.sender }), children: [_jsxs("header", { className: "tm-message__head", children: [_jsx("span", { className: "mark", children: _jsx(TeamAvatar, { color: color, name: event.sender }) }), _jsx("span", { className: "tm-message__who", children: speaker(event.sender) }), event.recipient !== null ? (_jsxs("span", { className: "tm-message__route", children: ["\u2192 ", _jsx(AddressMention, { name: event.recipient, color: recipientParticipant?.color ?? null })] })) : route !== null ? (_jsx("span", { className: "tm-message__route", children: route })) : null, _jsx("span", { className: "tm-message__kind", children: event.kind }), _jsx(TeamTime, { at: at, basis: timeBasis, className: "tm-message__time" })] }), event.summary !== null && event.body !== null && (_jsx("p", { className: "tm-message__subject", children: event.summary })), body !== null ? (_jsx("div", { className: "tm-message__body tr-prose", children: _jsx(AuthoredMessage, { messageKey: domId, role: "agent", attachments: attachments, imagesOutside: true, onOpenAttachment: onOpenAttachment, matched: hit, title: `${label} from ${speaker(event.sender)}`, text: body, recordedText: event.body, onReceipt: onReceipt }) })) : _jsx("p", { className: "tr-quiet", children: "No message body recorded." })] }));
182
+ }
183
+ function matchesMessage(event) {
184
+ return event.kind === "message" || event.kind === "assignment";
185
+ }
@@ -0,0 +1,24 @@
1
+ import type { ReactNode } from "react";
2
+ export interface ThinkingProps {
3
+ readonly text: string;
4
+ readonly spanMs: number | null;
5
+ readonly domId: string;
6
+ readonly timelineId: string;
7
+ readonly hit: boolean;
8
+ /** The margin anchor, drawn by the caller so every segment builds it once. */
9
+ readonly anchor: ReactNode;
10
+ }
11
+ export declare function Thinking({ text, spanMs, domId, timelineId, hit, anchor }: ThinkingProps): import("react").JSX.Element;
12
+ /**
13
+ * Q10 A (transcript-fold, 2026-09-08) — reasoning that stands alone between
14
+ * two paragraphs is a run of one, and a run of one is the line it already was:
15
+ * `Thought · its first words · the span`, on the ledger's rail, opening in
16
+ * place to the same muted prose the clamp holds. Inside a ladder `Thinking`
17
+ * keeps the clamp; this is the line form only. Q4 C moved one level down.
18
+ */
19
+ export declare function ThoughtLine({ text, spanMs, domId, timelineId, hit, anchor, forceOpen, embedded, }: ThinkingProps & {
20
+ /** A landing inside this thought opens it, as a landing inside a line does:
21
+ * the matched words must be on the page, not one press away. */
22
+ readonly forceOpen?: boolean;
23
+ readonly embedded?: boolean;
24
+ }): import("react").JSX.Element;