@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,423 @@
1
+ import { linkedChildSessionIds } from "./ledger.js";
2
+ import { canonicalText } from "./vocabulary.js";
3
+ import { withinHistoryWindow } from "./history-window.js";
4
+ /** Workflow workers belong to the workflow hierarchy even when pagination
5
+ * leaves their owning workflow row outside the loaded parent page. The title
6
+ * fallback keeps projections made before `workflow_run_id` was retained from
7
+ * leaking hundreds of legacy workflow workers into the parent timeline. */
8
+ export function isWorkflowOwnedSession(session) {
9
+ if ((session.delegation?.workflow_run_id?.trim().length ?? 0) > 0)
10
+ return true;
11
+ return session.delegation !== null
12
+ && session.title?.trim().toLowerCase() === "workflow-subagent";
13
+ }
14
+ /** Only genuinely standalone workers may use the timestamp-based fallback.
15
+ * Workflow workers wait for their owning run and mount under their exact
16
+ * phase/worker row through `workerThreadLinks`. */
17
+ export function standaloneWorkerSessions(children, links, indexedWorkflowChildren = new Set()) {
18
+ return children.filter((child) => !links.anchorRowByChild.has(child.id)
19
+ && !indexedWorkflowChildren.has(child.id)
20
+ && !isWorkflowOwnedSession(child));
21
+ }
22
+ const UNKNOWN_RUNTIME = {
23
+ basis: "unknown",
24
+ label: "runtime not recorded",
25
+ model: null,
26
+ effort: null,
27
+ profileCount: 0,
28
+ };
29
+ /** Response evidence wins over configuration. Split rows in one response are
30
+ * first joined by response id, then distinct model/effort pairs are counted. */
31
+ export function runtimeProfile(rows, configuredModel, responseRuntimes = []) {
32
+ const responses = new Map();
33
+ for (const runtime of responseRuntimes) {
34
+ const current = responses.get(runtime.response_id) ?? { model: null, effort: null };
35
+ responses.set(runtime.response_id, {
36
+ model: current.model ?? runtime.model,
37
+ effort: current.effort ?? runtime.effort,
38
+ });
39
+ }
40
+ for (const row of rows) {
41
+ if (row.response === null || (row.model === null && row.effort === null))
42
+ continue;
43
+ const current = responses.get(row.response.id) ?? { model: null, effort: null };
44
+ responses.set(row.response.id, {
45
+ model: current.model ?? row.model,
46
+ effort: current.effort ?? row.effort,
47
+ });
48
+ }
49
+ const profiles = [
50
+ ...new Map([...responses.values()].map((profile) => [
51
+ `${profile.model ?? ""}\u0000${profile.effort ?? ""}`,
52
+ profile,
53
+ ])).values(),
54
+ ];
55
+ if (profiles.length > 1) {
56
+ return {
57
+ basis: "varies",
58
+ label: `varies · ${profiles.length} response profiles`,
59
+ model: null,
60
+ effort: null,
61
+ profileCount: profiles.length,
62
+ };
63
+ }
64
+ const observed = profiles[0];
65
+ if (observed !== undefined) {
66
+ const model = observed.model ?? "model unknown";
67
+ const effort = observed.effort === null ? "effort unknown" : `${observed.effort} effort`;
68
+ return {
69
+ basis: "observed",
70
+ label: `${model} · ${effort}`,
71
+ model: observed.model,
72
+ effort: observed.effort,
73
+ profileCount: 1,
74
+ };
75
+ }
76
+ if (configuredModel !== null) {
77
+ return {
78
+ basis: "configured",
79
+ label: `configured ${configuredModel} · effort unknown`,
80
+ model: configuredModel,
81
+ effort: null,
82
+ profileCount: 0,
83
+ };
84
+ }
85
+ return UNKNOWN_RUNTIME;
86
+ }
87
+ /** Direct child sessions that native evidence identifies as team members. */
88
+ export function teamSessionIds(parentSessionId, directChildren, parentRows) {
89
+ const direct = new Map(directChildren
90
+ .filter((child) => child.parent_session_id === parentSessionId)
91
+ .map((child) => [child.id, child]));
92
+ const ids = new Set(directChildren
93
+ .filter((child) => child.parent_session_id === parentSessionId &&
94
+ (child.role === "team" || child.delegation?.team != null))
95
+ .map((child) => child.id));
96
+ for (const row of parentRows) {
97
+ if (row.body.type !== "tool_use")
98
+ continue;
99
+ const action = row.body.tool.action;
100
+ if (action.type !== "delegate" ||
101
+ action.team === null ||
102
+ action.child_session_id === null ||
103
+ !direct.has(action.child_session_id)) {
104
+ continue;
105
+ }
106
+ ids.add(action.child_session_id);
107
+ }
108
+ return [...ids].sort();
109
+ }
110
+ /** Roster facts and the start/add/resume operation for every proven team
111
+ * delegate row. The first observed member starts the team; subsequent rows add
112
+ * members unless the native request says resume. */
113
+ export function teamMemberPresentations(rows, sessions, rowsBySession, responseRuntimesBySession = new Map(), historyComplete = true) {
114
+ const out = new Map();
115
+ const seenTeams = new Set();
116
+ for (const row of rows) {
117
+ if (row.body.type !== "tool_use")
118
+ continue;
119
+ const action = row.body.tool.action;
120
+ if (action.type !== "delegate" || action.team === null)
121
+ continue;
122
+ const session = action.child_session_id === null ? null : (sessions.get(action.child_session_id) ?? null);
123
+ const operation = action.resume_id !== null
124
+ ? "resume"
125
+ : seenTeams.has(action.team)
126
+ ? "add"
127
+ : historyComplete
128
+ ? "start"
129
+ : "known";
130
+ seenTeams.add(action.team);
131
+ const name = action.name ?? session?.title ?? action.agent_kind ?? session?.native_session_id ?? "teammate";
132
+ const memberRows = action.child_session_id === null ? [] : (rowsBySession.get(action.child_session_id) ?? []);
133
+ out.set(row.timeline_id, {
134
+ row,
135
+ session,
136
+ operation,
137
+ team: action.team,
138
+ name,
139
+ color: action.color ?? session?.delegation?.color ?? null,
140
+ objective: canonicalText(action.objective),
141
+ configuredModel: action.model ?? session?.delegation?.configured_model ?? null,
142
+ runtime: runtimeProfile(memberRows, action.model ?? session?.delegation?.configured_model ?? null, action.child_session_id === null
143
+ ? []
144
+ : (responseRuntimesBySession.get(action.child_session_id) ?? [])),
145
+ });
146
+ }
147
+ return out;
148
+ }
149
+ function participantKey(value) {
150
+ return value.trim().replace(/^@/, "").toLocaleLowerCase();
151
+ }
152
+ /** Resolve message senders back to roster facts. Names are native addresses;
153
+ * no timestamp or prose matching participates in this join. */
154
+ export function teamParticipants(members, knownSessions = [], rowsBySession = new Map(), responseRuntimesBySession = new Map()) {
155
+ const out = new Map();
156
+ const bareTeam = new Map();
157
+ const ambiguous = new Set();
158
+ for (const member of members.values()) {
159
+ const presentation = {
160
+ color: member.color,
161
+ runtime: member.runtime,
162
+ sessionId: member.session?.id ?? null,
163
+ };
164
+ const names = [
165
+ member.name,
166
+ member.session?.title ?? null,
167
+ member.session?.native_session_id ?? null,
168
+ ];
169
+ for (const name of names) {
170
+ if (name === null || name.trim() === "")
171
+ continue;
172
+ const key = participantKey(name);
173
+ out.set(`${participantKey(member.team)}\u0000${key}`, presentation);
174
+ const previousTeam = bareTeam.get(key);
175
+ if (previousTeam === undefined && !ambiguous.has(key)) {
176
+ bareTeam.set(key, member.team);
177
+ out.set(key, presentation);
178
+ }
179
+ else if (previousTeam === member.team) {
180
+ out.set(key, presentation);
181
+ }
182
+ else {
183
+ bareTeam.delete(key);
184
+ ambiguous.add(key);
185
+ out.delete(key);
186
+ }
187
+ }
188
+ }
189
+ for (const session of knownSessions) {
190
+ const team = session.delegation?.team ?? null;
191
+ const name = session.title ?? session.native_session_id;
192
+ const presentation = {
193
+ color: session.delegation?.color ?? null,
194
+ runtime: runtimeProfile(rowsBySession.get(session.id) ?? [], session.delegation?.configured_model ?? null, responseRuntimesBySession.get(session.id) ?? []),
195
+ sessionId: session.id,
196
+ };
197
+ const key = participantKey(name);
198
+ if (team !== null)
199
+ out.set(`${participantKey(team)}\u0000${key}`, presentation);
200
+ if (!ambiguous.has(key)) {
201
+ const previousTeam = bareTeam.get(key);
202
+ const teamKey = team ?? "";
203
+ if (previousTeam === undefined || previousTeam === teamKey) {
204
+ bareTeam.set(key, teamKey);
205
+ out.set(key, presentation);
206
+ }
207
+ else {
208
+ bareTeam.delete(key);
209
+ ambiguous.add(key);
210
+ out.delete(key);
211
+ }
212
+ }
213
+ }
214
+ return out;
215
+ }
216
+ /** Native authored time is the shared-chronology stamp when present. The
217
+ * containing row time is an explicitly labelled observed-delivery fallback. */
218
+ export function collaborationStamp(row) {
219
+ if (row.body.type !== "collaboration") {
220
+ return { at: row.at, basis: row.at === null ? "unknown" : "observed_arrival" };
221
+ }
222
+ if (row.body.event.authored_at !== null) {
223
+ return { at: row.body.event.authored_at, basis: "authored" };
224
+ }
225
+ return {
226
+ at: row.at,
227
+ basis: row.at === null ? "unknown" : "observed_arrival",
228
+ };
229
+ }
230
+ /** Add only delivered boundary events from team-member transcripts to the
231
+ * parent's chronology. The member's initial coordinator assignment stays
232
+ * private; later coordinator follow-ups are addressable team conversation and
233
+ * do interleave. A delivery id is the only cross-session dedupe key we trust;
234
+ * similar prose is never silently collapsed. Parent row order remains
235
+ * canonical, while child events enter the gap selected by native authored
236
+ * time, or their explicitly labelled observed-arrival fallback. */
237
+ export function teamChronology(parentRows, rowsBySession, coverage) {
238
+ const seenTimelineIds = new Set(parentRows.map((row) => row.timeline_id));
239
+ const duplicateRepresentatives = new Map();
240
+ const candidates = [];
241
+ for (const rows of rowsBySession.values()) {
242
+ for (const row of rows) {
243
+ if (row.body.type !== "collaboration")
244
+ continue;
245
+ if (coverage !== undefined && (!coverage.ready ||
246
+ !withinHistoryWindow(collaborationStamp(row).at, parentRows, coverage.hasEarlier)))
247
+ continue;
248
+ if (row.body.event.channel === "coordinator" &&
249
+ row.body.event.kind === "assignment") {
250
+ continue;
251
+ }
252
+ if (seenTimelineIds.has(row.timeline_id))
253
+ continue;
254
+ seenTimelineIds.add(row.timeline_id);
255
+ candidates.push(row);
256
+ }
257
+ }
258
+ candidates.sort((left, right) => (collaborationStamp(left).at ?? Number.MAX_SAFE_INTEGER) -
259
+ (collaborationStamp(right).at ?? Number.MAX_SAFE_INTEGER) ||
260
+ left.session_id.localeCompare(right.session_id) ||
261
+ left.ordinal - right.ordinal ||
262
+ left.timeline_id.localeCompare(right.timeline_id));
263
+ // Delivered boundary evidence is the representative for a matching
264
+ // sender-side tool receipt. Parent boundary rows win over child copies;
265
+ // otherwise the earliest canonical child candidate wins. Text never participates.
266
+ const representativeByDelivery = new Map();
267
+ for (const row of [...parentRows, ...candidates]) {
268
+ if (row.body.type !== "collaboration")
269
+ continue;
270
+ const delivery = row.body.event.delivery_id;
271
+ if (delivery !== null && !representativeByDelivery.has(delivery)) {
272
+ representativeByDelivery.set(delivery, row);
273
+ }
274
+ }
275
+ const retainedParent = [];
276
+ for (const row of parentRows) {
277
+ const deliveryIds = row.body.type === "collaboration"
278
+ ? [row.body.event.delivery_id]
279
+ : row.body.type === "tool_use" && row.body.tool.action.type === "collaborate"
280
+ ? [
281
+ row.body.tool.action.delivery_id,
282
+ row.body.tool.correlation.key,
283
+ row.body.tool.native.id,
284
+ ]
285
+ : [];
286
+ const representative = deliveryIds
287
+ .filter((value) => value !== null)
288
+ .map((delivery) => representativeByDelivery.get(delivery))
289
+ .find((candidate) => candidate !== undefined);
290
+ if (representative !== undefined && representative.timeline_id !== row.timeline_id) {
291
+ duplicateRepresentatives.set(row.timeline_id, representative.timeline_id);
292
+ continue;
293
+ }
294
+ retainedParent.push(row);
295
+ }
296
+ const additions = [];
297
+ for (const row of candidates) {
298
+ const delivery = row.body.type === "collaboration" ? row.body.event.delivery_id : null;
299
+ const representative = delivery === null ? undefined : representativeByDelivery.get(delivery);
300
+ if (representative !== undefined && representative.timeline_id !== row.timeline_id) {
301
+ duplicateRepresentatives.set(row.timeline_id, representative.timeline_id);
302
+ continue;
303
+ }
304
+ additions.push(row);
305
+ }
306
+ if (additions.length === 0) {
307
+ return {
308
+ rows: retainedParent.length === parentRows.length ? parentRows : retainedParent,
309
+ duplicateRepresentatives,
310
+ };
311
+ }
312
+ const buckets = Array.from({ length: retainedParent.length + 1 }, () => []);
313
+ // One bucket before each retained parent row and one after the last, so
314
+ // every index from 0 to retainedParent.length names a bucket.
315
+ const bucketAt = (index) => buckets[index];
316
+ for (const row of additions) {
317
+ const at = collaborationStamp(row).at;
318
+ const before = at === null
319
+ ? -1
320
+ : retainedParent.findIndex((parent) => parent.at !== null && parent.at > at);
321
+ bucketAt(before === -1 ? retainedParent.length : before).push(row);
322
+ }
323
+ const merged = [];
324
+ for (const [at, parent] of retainedParent.entries()) {
325
+ merged.push(...bucketAt(at), parent);
326
+ }
327
+ merged.push(...bucketAt(retainedParent.length));
328
+ return { rows: merged, duplicateRepresentatives };
329
+ }
330
+ export function interleaveTeamCollaboration(parentRows, rowsBySession) {
331
+ return teamChronology(parentRows, rowsBySession).rows;
332
+ }
333
+ export function participantPresentation(participants, sender, team = null) {
334
+ if (sender === null)
335
+ return null;
336
+ const key = participantKey(sender);
337
+ return ((team === null ? undefined : participants.get(`${participantKey(team)}\u0000${key}`)) ??
338
+ participants.get(key) ??
339
+ null);
340
+ }
341
+ /** Give an ordinary Agent worker exactly one subthread. The earliest proven
342
+ * invocation owns it; subsequent delegate/resume rows are links back to that
343
+ * same disclosure. Team children are excluded because their delivered speech
344
+ * belongs to the shared parent chronology instead. */
345
+ export function workerThreadLinks(lines, parentSessionId, sessions, excludedSessionIds) {
346
+ const anchorRowByChild = new Map();
347
+ const childrenByRow = new Map();
348
+ const referencedChildIdsByRow = new Map();
349
+ for (const line of lines) {
350
+ const rowId = line.rows[0]?.timeline_id;
351
+ if (rowId === undefined)
352
+ continue;
353
+ const childIds = new Set(line.rows.flatMap((row) => linkedChildSessionIds(row)));
354
+ const nativeToolIds = new Set(line.rows.flatMap((row) => row.body.type === "tool_use"
355
+ ? [row.body.tool.correlation.key, row.body.tool.native.id].filter((value) => value !== null)
356
+ : []));
357
+ for (const child of sessions.values()) {
358
+ if (child.parent_session_id === parentSessionId &&
359
+ !excludedSessionIds.has(child.id) &&
360
+ child.delegation?.parent_tool_native_id != null &&
361
+ nativeToolIds.has(child.delegation.parent_tool_native_id)) {
362
+ childIds.add(child.id);
363
+ }
364
+ }
365
+ for (const childId of childIds) {
366
+ const child = sessions.get(childId);
367
+ if (child === undefined ||
368
+ child.parent_session_id !== parentSessionId ||
369
+ excludedSessionIds.has(child.id)) {
370
+ continue;
371
+ }
372
+ const anchor = anchorRowByChild.get(child.id);
373
+ if (anchor === undefined) {
374
+ anchorRowByChild.set(child.id, rowId);
375
+ const anchored = childrenByRow.get(rowId);
376
+ if (anchored === undefined)
377
+ childrenByRow.set(rowId, [child]);
378
+ else
379
+ anchored.push(child);
380
+ }
381
+ else if (anchor !== rowId) {
382
+ const references = referencedChildIdsByRow.get(rowId);
383
+ if (references === undefined)
384
+ referencedChildIdsByRow.set(rowId, [child.id]);
385
+ else if (!references.includes(child.id))
386
+ references.push(child.id);
387
+ }
388
+ }
389
+ }
390
+ return { anchorRowByChild, childrenByRow, referencedChildIdsByRow };
391
+ }
392
+ /** Recover report work only when canonical evidence names the exact source
393
+ * session and inclusive timeline bounds. A shared task id alone is not a
394
+ * safe range: teammates can overlap work on the same task. */
395
+ export function taskBoundedReportWork(reportRow, sourceRows) {
396
+ if (reportRow.body.type !== "collaboration" ||
397
+ reportRow.body.event.kind !== "report" ||
398
+ reportRow.body.event.source_session_id === null ||
399
+ reportRow.body.event.source_response_id === null ||
400
+ reportRow.body.event.work_start_timeline_id === null ||
401
+ reportRow.body.event.work_end_timeline_id === null) {
402
+ return null;
403
+ }
404
+ const event = reportRow.body.event;
405
+ const ordered = [...sourceRows].sort((left, right) => left.ordinal - right.ordinal || left.timeline_id.localeCompare(right.timeline_id));
406
+ if (ordered.length === 0 ||
407
+ ordered.some((row) => row.session_id !== event.source_session_id)) {
408
+ return null;
409
+ }
410
+ const startAt = ordered.findIndex((row) => row.timeline_id === event.work_start_timeline_id);
411
+ const endAt = ordered.findIndex((row) => row.timeline_id === event.work_end_timeline_id);
412
+ if (startAt === -1 || endAt < startAt)
413
+ return null;
414
+ const rows = ordered.slice(startAt, endAt + 1);
415
+ if (!rows.some((row) => row.response?.id === event.source_response_id))
416
+ return null;
417
+ return {
418
+ rows,
419
+ actionCount: rows.filter((row) => row.body.type === "tool_use").length,
420
+ startedAt: rows.find((row) => row.at !== null)?.at ?? null,
421
+ endedAt: [...rows].reverse().find((row) => row.at !== null)?.at ?? null,
422
+ };
423
+ }
@@ -0,0 +1,212 @@
1
+ import type { ParticipantColor, ResourceRef, TaskSnapshotItem, ToolAction } from "@vibefield/rosetta-protocol";
2
+ import type { CanonicalDocument, CollaboratorRef, DisplayField, FileDelta, FindingItem, NativeToolRef, SourceLocation, UserAnswer, UserQuestion } from "./protocol.js";
3
+ import type { LedgerContext, LedgerGlyph, ObjectPart, ToolFamily } from "./vocabulary.js";
4
+ /** One pressable path in a detail — pre-split so the list draws like a line. */
5
+ export interface PathFact {
6
+ readonly label: string;
7
+ readonly dir: string;
8
+ readonly name: string;
9
+ readonly resource: ResourceRef;
10
+ /** A read target's own source range, drawn beside that file in its detail. */
11
+ readonly range?: string;
12
+ /** Present only when this path is an exact file target of a canonical row.
13
+ * It is an address into that row, not a renderer-supplied filesystem path,
14
+ * so the daemon can reopen the recorded file without widening its read
15
+ * authority. */
16
+ readonly read?: {
17
+ readonly sessionId: string;
18
+ readonly timelineId: string;
19
+ readonly targetIndex: number;
20
+ };
21
+ }
22
+ /** A web result. The protocol keeps url and title only; the HOST is derived,
23
+ * and it is the key the renderer caches `https://<host>/favicon.ico` under. */
24
+ export interface SourceFact {
25
+ readonly url: string;
26
+ readonly title: string | null;
27
+ readonly host: string | null;
28
+ }
29
+ /** A fetch's honest triple: final url, title, status — never the body. */
30
+ export interface FetchFact {
31
+ readonly url: string | null;
32
+ readonly title: string | null;
33
+ readonly status: number | null;
34
+ readonly host: string | null;
35
+ }
36
+ /** One command inside a `command` or `code` detail. A fold carries several. */
37
+ export interface CommandFact {
38
+ readonly command: string;
39
+ readonly cwd: string | null;
40
+ /** Whether this command ran at the session's settled root. */
41
+ readonly cwdIsSessionRoot: boolean;
42
+ readonly language: string | null;
43
+ readonly background: boolean;
44
+ readonly sourceTruncated: boolean;
45
+ readonly sessionId: string | null;
46
+ readonly timelineId: string | null;
47
+ }
48
+ /** The command row is a glanceable label, not a second source viewer. Keep
49
+ * its omission marker inside the 42-character contract. `Array.from` counts
50
+ * Unicode code points, matching Rust's projection boundary. */
51
+ export declare const COMMAND_PREVIEW_CHARACTER_LIMIT = 42;
52
+ export declare function commandPreviewText(text: string, sourceTruncated: boolean): string;
53
+ export interface CommandDirectoryContext {
54
+ readonly label: string;
55
+ readonly title: string;
56
+ }
57
+ /** Directory context gets one compact badge on the detail frame. A mixed fold
58
+ * is named honestly rather than borrowing the first command's cwd for every
59
+ * member. */
60
+ export declare function commandDirectoryContext(commands: readonly CommandFact[]): CommandDirectoryContext | null;
61
+ /** `+18 −4` across however many files the one row changed. */
62
+ export interface Diffstat {
63
+ readonly added: number | null;
64
+ readonly removed: number | null;
65
+ readonly fileCount: number;
66
+ }
67
+ /** Everything the delegate line knows before the child session is resolved. */
68
+ export interface DelegateFact {
69
+ readonly childSessionId: string | null;
70
+ readonly agentKind: string | null;
71
+ readonly name: string | null;
72
+ readonly model: string | null;
73
+ /** Named only when native evidence proves persistent team membership. */
74
+ readonly team: string | null;
75
+ readonly color: ParticipantColor | null;
76
+ readonly resumeId: string | null;
77
+ readonly objective: string;
78
+ readonly background: boolean;
79
+ /** The child was never indexed; the record says draw its summary as prose. */
80
+ readonly orphanSummary: string | null;
81
+ }
82
+ export type WorkflowAction = Extract<ToolAction, {
83
+ readonly type: "workflow";
84
+ }>;
85
+ /** The durable Workflow document plus the exact file addresses exposed by
86
+ * the row. The first path, when present, is the workflow script; remaining
87
+ * paths are result resources discovered in the sidecar/callback. */
88
+ export interface WorkflowFact {
89
+ readonly action: WorkflowAction;
90
+ readonly objective: string | null;
91
+ readonly script: PathFact | null;
92
+ readonly resources: readonly PathFact[];
93
+ }
94
+ /** The one task mutation this historical board is explaining. */
95
+ export type TaskChange = "added" | "started" | "done" | "reopened" | "failed" | "cancelled" | "updated";
96
+ /** The open task row is a status glimpse first; the reader can disclose the
97
+ * complete recorded board without turning every task event into a wall. */
98
+ export declare const TASK_PREVIEW_LIMIT = 3;
99
+ /** Pin the task this event changed to the bottom, where the eye lands after
100
+ * reading the board. The compact form keeps its two nearest preceding peers
101
+ * above it (filling from following peers only at the start of a board); the
102
+ * full form retains every other recorded task in its original relative order. */
103
+ export declare function taskDisplayRows(tasks: readonly TaskSnapshotItem[], changedTaskId: string | null, full: boolean): TaskSnapshotItem[];
104
+ /**
105
+ * What a ledger line opens into (§04's last column). `none` means the line has
106
+ * nothing honest to show. A read keeps no content in SQLite but does retain
107
+ * its target addresses; an `unknown` row keeps nothing at all.
108
+ */
109
+ export type LedgerDetail = {
110
+ readonly kind: "none";
111
+ } | {
112
+ readonly kind: "paths";
113
+ readonly paths: readonly PathFact[];
114
+ readonly total: number;
115
+ readonly description?: string;
116
+ } | {
117
+ readonly kind: "locations";
118
+ readonly locations: readonly SourceLocation[];
119
+ readonly total: number;
120
+ } | {
121
+ readonly kind: "sources";
122
+ readonly sources: readonly SourceFact[];
123
+ readonly total: number | null;
124
+ } | {
125
+ readonly kind: "fetch";
126
+ readonly fetch: FetchFact;
127
+ } | {
128
+ readonly kind: "fetches";
129
+ readonly fetches: readonly FetchFact[];
130
+ } | {
131
+ readonly kind: "diff";
132
+ readonly deltas: readonly FileDelta[];
133
+ readonly diffstat: Diffstat;
134
+ } | {
135
+ readonly kind: "command";
136
+ readonly commands: readonly CommandFact[];
137
+ } | {
138
+ readonly kind: "code";
139
+ readonly commands: readonly CommandFact[];
140
+ } | {
141
+ readonly kind: "names";
142
+ readonly names: readonly string[];
143
+ readonly total: number;
144
+ } | {
145
+ readonly kind: "tasks";
146
+ readonly tasks: readonly TaskSnapshotItem[];
147
+ readonly total: number;
148
+ readonly changedTaskId: string | null;
149
+ readonly change: TaskChange | null;
150
+ } | {
151
+ readonly kind: "text";
152
+ readonly text: string;
153
+ } | {
154
+ readonly kind: "questions";
155
+ readonly questions: readonly UserQuestion[];
156
+ readonly answers: readonly UserAnswer[];
157
+ } | {
158
+ readonly kind: "findings";
159
+ readonly findings: readonly FindingItem[];
160
+ readonly total: number;
161
+ } | {
162
+ readonly kind: "document";
163
+ readonly document: CanonicalDocument;
164
+ } | {
165
+ readonly kind: "fields";
166
+ readonly fields: readonly DisplayField[];
167
+ readonly resources: readonly PathFact[];
168
+ } | {
169
+ readonly kind: "delegate";
170
+ readonly delegate: DelegateFact;
171
+ } | {
172
+ readonly kind: "workflow";
173
+ readonly workflow: WorkflowFact;
174
+ } | {
175
+ readonly kind: "participants";
176
+ readonly participants: readonly CollaboratorRef[];
177
+ readonly total: number;
178
+ readonly body: string | null;
179
+ } | {
180
+ readonly kind: "diagnostic";
181
+ readonly diagnostic: string;
182
+ };
183
+ export type DetailKind = LedgerDetail["kind"];
184
+ export interface FamilyProjection {
185
+ readonly family: ToolFamily;
186
+ readonly glyph: LedgerGlyph;
187
+ readonly verb: string;
188
+ readonly object: readonly ObjectPart[];
189
+ /** The family's own outcome sentence, before status and failure have their
190
+ * say. Null when the family has no outcome to state. */
191
+ readonly result: string | null;
192
+ /** `trace unavailable` and its kin: an outcome that IS the absence of one. */
193
+ readonly resultMuted: boolean;
194
+ readonly detail: LedgerDetail;
195
+ /** §04: a question, a finding and a structured document open by default —
196
+ * a question is conversation, and a finding is the point of the run. */
197
+ readonly openByDefault: boolean;
198
+ }
199
+ /**
200
+ * The §04 table as one function. `native` is only read by the `unknown` family,
201
+ * whose whole point is to name the tool the projector could not read.
202
+ */
203
+ export declare function projectAction(action: ToolAction, native: NativeToolRef, context?: LedgerContext, source?: {
204
+ readonly sessionId: string;
205
+ readonly timelineId: string;
206
+ } | null): FamilyProjection;
207
+ /**
208
+ * `+18 −4`, and `+412` when nothing was removed — the record never writes a
209
+ * zero it did not measure. Null when the source kept no counts at all, which
210
+ * the caller renders as `no diff recorded`.
211
+ */
212
+ export declare function diffstatText(added: number | null, removed: number | null): string | null;