@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.
- package/README.md +247 -2
- package/dist/HistoryRoom.d.ts +98 -0
- package/dist/HistoryRoom.js +440 -0
- package/dist/TranscriptReader.d.ts +22 -0
- package/dist/TranscriptReader.js +72 -0
- package/dist/components/ColdStart.d.ts +4 -0
- package/dist/components/ColdStart.js +5 -0
- package/dist/components/FilterChips.d.ts +4 -0
- package/dist/components/FilterChips.js +5 -0
- package/dist/components/HostAct.d.ts +9 -0
- package/dist/components/HostAct.js +16 -0
- package/dist/components/HostMenu.d.ts +41 -0
- package/dist/components/HostMenu.js +216 -0
- package/dist/components/IngestStatus.d.ts +4 -0
- package/dist/components/IngestStatus.js +20 -0
- package/dist/components/ListActivityNotice.d.ts +5 -0
- package/dist/components/ListActivityNotice.js +4 -0
- package/dist/components/ListSections.d.ts +20 -0
- package/dist/components/ListSections.js +39 -0
- package/dist/components/RenameHeading.d.ts +9 -0
- package/dist/components/RenameHeading.js +75 -0
- package/dist/components/SearchStrip.d.ts +5 -0
- package/dist/components/SearchStrip.js +8 -0
- package/dist/components/SummaryMetrics.d.ts +13 -0
- package/dist/components/SummaryMetrics.js +9 -0
- package/dist/components/SummaryPanels.d.ts +35 -0
- package/dist/components/SummaryPanels.js +117 -0
- package/dist/components/Transcript.d.ts +46 -0
- package/dist/components/Transcript.js +358 -0
- package/dist/components/charts/ActivityChartDetail.d.ts +13 -0
- package/dist/components/charts/ActivityChartDetail.js +78 -0
- package/dist/components/charts/CalendarHeatmap.d.ts +16 -0
- package/dist/components/charts/CalendarHeatmap.js +55 -0
- package/dist/components/charts/DayActivityChart.d.ts +8 -0
- package/dist/components/charts/DayActivityChart.js +71 -0
- package/dist/components/charts/ModelsChartDetail.d.ts +7 -0
- package/dist/components/charts/ModelsChartDetail.js +19 -0
- package/dist/components/charts/ProjectChartDialog.d.ts +19 -0
- package/dist/components/charts/ProjectChartDialog.js +39 -0
- package/dist/components/charts/Streamgraph.d.ts +16 -0
- package/dist/components/charts/Streamgraph.js +94 -0
- package/dist/components/charts/Treemap.d.ts +26 -0
- package/dist/components/charts/Treemap.js +81 -0
- package/dist/components/charts/index.d.ts +9 -0
- package/dist/components/charts/index.js +4 -0
- package/dist/components/charts/streamgraph-layout.d.ts +23 -0
- package/dist/components/charts/streamgraph-layout.js +114 -0
- package/dist/components/charts/treemap-layout.d.ts +32 -0
- package/dist/components/charts/treemap-layout.js +140 -0
- package/dist/components/charts/types.d.ts +65 -0
- package/dist/components/charts/types.js +8 -0
- package/dist/components/file-viewer/FileViewerBrowsers.d.ts +10 -0
- package/dist/components/file-viewer/FileViewerBrowsers.js +65 -0
- package/dist/components/file-viewer/FileViewerDialog.d.ts +33 -0
- package/dist/components/file-viewer/FileViewerDialog.js +82 -0
- package/dist/components/file-viewer/FileViewerHeader.d.ts +26 -0
- package/dist/components/file-viewer/FileViewerHeader.js +17 -0
- package/dist/components/file-viewer/ImageGalleryDialog.d.ts +14 -0
- package/dist/components/file-viewer/ImageGalleryDialog.js +98 -0
- package/dist/components/file-viewer/diff/index.d.ts +2 -0
- package/dist/components/file-viewer/diff/index.js +2 -0
- package/dist/components/file-viewer/diff/parse.d.ts +2 -0
- package/dist/components/file-viewer/diff/parse.js +164 -0
- package/dist/components/file-viewer/diff/types.d.ts +44 -0
- package/dist/components/file-viewer/diff/types.js +7 -0
- package/dist/components/file-viewer/gallery-source.d.ts +11 -0
- package/dist/components/file-viewer/gallery-source.js +75 -0
- package/dist/components/file-viewer/image-resource.d.ts +19 -0
- package/dist/components/file-viewer/image-resource.js +60 -0
- package/dist/components/file-viewer/index.d.ts +5 -0
- package/dist/components/file-viewer/index.js +8 -0
- package/dist/components/file-viewer/markdown/blocks.d.ts +2 -0
- package/dist/components/file-viewer/markdown/blocks.js +277 -0
- package/dist/components/file-viewer/markdown/index.d.ts +4 -0
- package/dist/components/file-viewer/markdown/index.js +35 -0
- package/dist/components/file-viewer/markdown/inline.d.ts +10 -0
- package/dist/components/file-viewer/markdown/inline.js +178 -0
- package/dist/components/file-viewer/markdown/render.d.ts +9 -0
- package/dist/components/file-viewer/markdown/render.js +78 -0
- package/dist/components/file-viewer/markdown/types.d.ts +57 -0
- package/dist/components/file-viewer/markdown/types.js +11 -0
- package/dist/components/file-viewer/minimap/CodeMinimap.d.ts +10 -0
- package/dist/components/file-viewer/minimap/CodeMinimap.js +296 -0
- package/dist/components/file-viewer/minimap/layout.d.ts +60 -0
- package/dist/components/file-viewer/minimap/layout.js +117 -0
- package/dist/components/file-viewer/minimap/palette.d.ts +2 -0
- package/dist/components/file-viewer/minimap/palette.js +73 -0
- package/dist/components/file-viewer/minimap/raster.d.ts +19 -0
- package/dist/components/file-viewer/minimap/raster.js +122 -0
- package/dist/components/file-viewer/registry.d.ts +25 -0
- package/dist/components/file-viewer/registry.js +182 -0
- package/dist/components/file-viewer/syntax/grammars.d.ts +16 -0
- package/dist/components/file-viewer/syntax/grammars.js +221 -0
- package/dist/components/file-viewer/syntax/index.d.ts +8 -0
- package/dist/components/file-viewer/syntax/index.js +9 -0
- package/dist/components/file-viewer/syntax/languages.d.ts +14 -0
- package/dist/components/file-viewer/syntax/languages.js +115 -0
- package/dist/components/file-viewer/syntax/tokenize-config.d.ts +2 -0
- package/dist/components/file-viewer/syntax/tokenize-config.js +132 -0
- package/dist/components/file-viewer/syntax/tokenize-css.d.ts +2 -0
- package/dist/components/file-viewer/syntax/tokenize-css.js +169 -0
- package/dist/components/file-viewer/syntax/tokenize-markup.d.ts +2 -0
- package/dist/components/file-viewer/syntax/tokenize-markup.js +124 -0
- package/dist/components/file-viewer/syntax/tokenize.d.ts +9 -0
- package/dist/components/file-viewer/syntax/tokenize.js +289 -0
- package/dist/components/file-viewer/syntax/types.d.ts +74 -0
- package/dist/components/file-viewer/syntax/types.js +13 -0
- package/dist/components/file-viewer/types.d.ts +111 -0
- package/dist/components/file-viewer/types.js +8 -0
- package/dist/components/file-viewer/use-file-content.d.ts +26 -0
- package/dist/components/file-viewer/use-file-content.js +144 -0
- package/dist/components/file-viewer/views/BinaryView.d.ts +2 -0
- package/dist/components/file-viewer/views/BinaryView.js +34 -0
- package/dist/components/file-viewer/views/CodeView.d.ts +2 -0
- package/dist/components/file-viewer/views/CodeView.js +46 -0
- package/dist/components/file-viewer/views/DiffBody.d.ts +7 -0
- package/dist/components/file-viewer/views/DiffBody.js +77 -0
- package/dist/components/file-viewer/views/DiffView.d.ts +2 -0
- package/dist/components/file-viewer/views/DiffView.js +11 -0
- package/dist/components/file-viewer/views/ImageView.d.ts +9 -0
- package/dist/components/file-viewer/views/ImageView.js +28 -0
- package/dist/components/file-viewer/views/MarkdownView.d.ts +9 -0
- package/dist/components/file-viewer/views/MarkdownView.js +20 -0
- package/dist/components/file-viewer/views/SvgView.d.ts +9 -0
- package/dist/components/file-viewer/views/SvgView.js +10 -0
- package/dist/components/git/ChangeTree.d.ts +20 -0
- package/dist/components/git/ChangeTree.js +35 -0
- package/dist/components/git/CommitViewer.d.ts +12 -0
- package/dist/components/git/CommitViewer.js +85 -0
- package/dist/components/git/GitChanges.d.ts +17 -0
- package/dist/components/git/GitChanges.js +70 -0
- package/dist/components/git/GitHistory.d.ts +9 -0
- package/dist/components/git/GitHistory.js +58 -0
- package/dist/components/git/co-author.d.ts +14 -0
- package/dist/components/git/co-author.js +55 -0
- package/dist/components/git/git-file-source.d.ts +18 -0
- package/dist/components/git/git-file-source.js +53 -0
- package/dist/components/git/git-host.d.ts +24 -0
- package/dist/components/git/git-host.js +130 -0
- package/dist/components/git/index.d.ts +10 -0
- package/dist/components/git/index.js +12 -0
- package/dist/components/git/path-tree.d.ts +23 -0
- package/dist/components/git/path-tree.js +73 -0
- package/dist/components/git/session-files.d.ts +9 -0
- package/dist/components/git/session-files.js +50 -0
- package/dist/components/git/types.d.ts +92 -0
- package/dist/components/git/types.js +9 -0
- package/dist/components/projects/ProjectActivitySparkline.d.ts +6 -0
- package/dist/components/projects/ProjectActivitySparkline.js +12 -0
- package/dist/components/projects/ProjectList.d.ts +25 -0
- package/dist/components/projects/ProjectList.js +43 -0
- package/dist/components/projects/ProjectListItem.d.ts +19 -0
- package/dist/components/projects/ProjectListItem.js +78 -0
- package/dist/components/projects/ProjectsColumn.d.ts +19 -0
- package/dist/components/projects/ProjectsColumn.js +36 -0
- package/dist/components/projects/index.d.ts +8 -0
- package/dist/components/projects/index.js +4 -0
- package/dist/components/search/MatchStepper.d.ts +9 -0
- package/dist/components/search/MatchStepper.js +14 -0
- package/dist/components/search/SearchLauncher.d.ts +12 -0
- package/dist/components/search/SearchLauncher.js +13 -0
- package/dist/components/search/SearchSheet.d.ts +29 -0
- package/dist/components/search/SearchSheet.js +230 -0
- package/dist/components/search/index.d.ts +8 -0
- package/dist/components/search/index.js +4 -0
- package/dist/components/search/shortcut.d.ts +25 -0
- package/dist/components/search/shortcut.js +32 -0
- package/dist/components/sessions/SessionList.d.ts +24 -0
- package/dist/components/sessions/SessionList.js +76 -0
- package/dist/components/sessions/SessionListItem.d.ts +13 -0
- package/dist/components/sessions/SessionListItem.js +58 -0
- package/dist/components/sessions/SessionsColumn.d.ts +26 -0
- package/dist/components/sessions/SessionsColumn.js +32 -0
- package/dist/components/sessions/index.d.ts +9 -0
- package/dist/components/sessions/index.js +4 -0
- package/dist/components/sessions/session-display.d.ts +8 -0
- package/dist/components/sessions/session-display.js +18 -0
- package/dist/components/sessions/types.d.ts +7 -0
- package/dist/components/sessions/types.js +1 -0
- package/dist/components/transcript/Activity.d.ts +45 -0
- package/dist/components/transcript/Activity.js +75 -0
- package/dist/components/transcript/Anchor.d.ts +8 -0
- package/dist/components/transcript/Anchor.js +23 -0
- package/dist/components/transcript/Attachments.d.ts +21 -0
- package/dist/components/transcript/Attachments.js +138 -0
- package/dist/components/transcript/AuthoredMessage.d.ts +19 -0
- package/dist/components/transcript/AuthoredMessage.js +17 -0
- package/dist/components/transcript/Compaction.d.ts +9 -0
- package/dist/components/transcript/Compaction.js +50 -0
- package/dist/components/transcript/DayPill.d.ts +38 -0
- package/dist/components/transcript/DayPill.js +68 -0
- package/dist/components/transcript/Document.d.ts +32 -0
- package/dist/components/transcript/Document.js +503 -0
- package/dist/components/transcript/Favicon.d.ts +32 -0
- package/dist/components/transcript/Favicon.js +71 -0
- package/dist/components/transcript/HeadOfDocument.d.ts +19 -0
- package/dist/components/transcript/HeadOfDocument.js +44 -0
- package/dist/components/transcript/Ledger.d.ts +53 -0
- package/dist/components/transcript/Ledger.js +182 -0
- package/dist/components/transcript/LineDetail.d.ts +24 -0
- package/dist/components/transcript/LineDetail.js +81 -0
- package/dist/components/transcript/Marker.d.ts +33 -0
- package/dist/components/transcript/Marker.js +21 -0
- package/dist/components/transcript/MessagePreview.d.ts +12 -0
- package/dist/components/transcript/MessagePreview.js +58 -0
- package/dist/components/transcript/Prompt.d.ts +20 -0
- package/dist/components/transcript/Prompt.js +55 -0
- package/dist/components/transcript/Prose.d.ts +19 -0
- package/dist/components/transcript/Prose.js +109 -0
- package/dist/components/transcript/ReceiptPill.d.ts +10 -0
- package/dist/components/transcript/ReceiptPill.js +10 -0
- package/dist/components/transcript/ResponseHead.d.ts +9 -0
- package/dist/components/transcript/ResponseHead.js +36 -0
- package/dist/components/transcript/Subthread.d.ts +19 -0
- package/dist/components/transcript/Subthread.js +96 -0
- package/dist/components/transcript/Team.d.ts +53 -0
- package/dist/components/transcript/Team.js +185 -0
- package/dist/components/transcript/Thinking.d.ts +24 -0
- package/dist/components/transcript/Thinking.js +50 -0
- package/dist/components/transcript/TimelineMeta.d.ts +9 -0
- package/dist/components/transcript/TimelineMeta.js +161 -0
- package/dist/components/transcript/TranscriptLoading.d.ts +10 -0
- package/dist/components/transcript/TranscriptLoading.js +10 -0
- package/dist/components/transcript/WebDetail.d.ts +8 -0
- package/dist/components/transcript/WebDetail.js +29 -0
- package/dist/components/transcript/Workflow.d.ts +12 -0
- package/dist/components/transcript/Workflow.js +208 -0
- package/dist/components/transcript/activity-plan.d.ts +84 -0
- package/dist/components/transcript/activity-plan.js +209 -0
- package/dist/components/transcript/attachment-file-source.d.ts +23 -0
- package/dist/components/transcript/attachment-file-source.js +103 -0
- package/dist/components/transcript/attachment-gallery.d.ts +12 -0
- package/dist/components/transcript/attachment-gallery.js +33 -0
- package/dist/components/transcript/detail-parts.d.ts +50 -0
- package/dist/components/transcript/detail-parts.js +295 -0
- package/dist/components/transcript/disclosure-state.d.ts +6 -0
- package/dist/components/transcript/disclosure-state.js +32 -0
- package/dist/components/transcript/disclosure-store.d.ts +8 -0
- package/dist/components/transcript/disclosure-store.js +31 -0
- package/dist/components/transcript/document-model.d.ts +15 -0
- package/dist/components/transcript/document-model.js +104 -0
- package/dist/components/transcript/document-plan.d.ts +28 -0
- package/dist/components/transcript/document-plan.js +145 -0
- package/dist/components/transcript/fold-preference.d.ts +17 -0
- package/dist/components/transcript/fold-preference.js +63 -0
- package/dist/components/transcript/glyphs.d.ts +15 -0
- package/dist/components/transcript/glyphs.js +47 -0
- package/dist/components/transcript/index.d.ts +23 -0
- package/dist/components/transcript/index.js +22 -0
- package/dist/components/transcript/message-file-source.d.ts +15 -0
- package/dist/components/transcript/message-file-source.js +31 -0
- package/dist/components/transcript/message-preview.d.ts +9 -0
- package/dist/components/transcript/message-preview.js +46 -0
- package/dist/components/transcript/read-file-source.d.ts +7 -0
- package/dist/components/transcript/read-file-source.js +34 -0
- package/dist/components/transcript/reader-context.d.ts +13 -0
- package/dist/components/transcript/reader-context.js +55 -0
- package/dist/components/transcript/reading-identity.d.ts +2 -0
- package/dist/components/transcript/reading-identity.js +52 -0
- package/dist/components/transcript/scroll-to-row.d.ts +2 -0
- package/dist/components/transcript/scroll-to-row.js +13 -0
- package/dist/components/transcript/thread-index.d.ts +14 -0
- package/dist/components/transcript/thread-index.js +40 -0
- package/dist/components/transcript/thread-navigation.d.ts +5 -0
- package/dist/components/transcript/thread-navigation.js +3 -0
- package/dist/components/transcript/timeline-meta-file-source.d.ts +6 -0
- package/dist/components/transcript/timeline-meta-file-source.js +55 -0
- package/dist/components/transcript/timeline-meta-state.d.ts +12 -0
- package/dist/components/transcript/timeline-meta-state.js +24 -0
- package/dist/components/ui/ColumnHeading.d.ts +27 -0
- package/dist/components/ui/ColumnHeading.js +7 -0
- package/dist/components/ui/ConfirmDialog.d.ts +14 -0
- package/dist/components/ui/ConfirmDialog.js +22 -0
- package/dist/components/ui/DialogShell.d.ts +18 -0
- package/dist/components/ui/DialogShell.js +40 -0
- package/dist/components/ui/EmptyState.d.ts +10 -0
- package/dist/components/ui/EmptyState.js +6 -0
- package/dist/components/ui/ListSummaryHeader.d.ts +9 -0
- package/dist/components/ui/ListSummaryHeader.js +6 -0
- package/dist/components/ui/ListToolbar.d.ts +6 -0
- package/dist/components/ui/ListToolbar.js +5 -0
- package/dist/components/ui/ResultGroupHeader.d.ts +9 -0
- package/dist/components/ui/ResultGroupHeader.js +5 -0
- package/dist/components/ui/SegmentedControl.d.ts +16 -0
- package/dist/components/ui/SegmentedControl.js +9 -0
- package/dist/components/ui/SummaryMetric.d.ts +13 -0
- package/dist/components/ui/SummaryMetric.js +10 -0
- package/dist/components/ui/Veil.d.ts +7 -0
- package/dist/components/ui/Veil.js +5 -0
- package/dist/components/ui/index.d.ts +20 -0
- package/dist/components/ui/index.js +10 -0
- package/dist/components/worktree/WorktreeColumn.d.ts +22 -0
- package/dist/components/worktree/WorktreeColumn.js +170 -0
- package/dist/components/worktree/WorktreeFileTree.d.ts +19 -0
- package/dist/components/worktree/WorktreeFileTree.js +60 -0
- package/dist/components/worktree/WorktreeHeader.d.ts +32 -0
- package/dist/components/worktree/WorktreeHeader.js +81 -0
- package/dist/components/worktree/WorktreeList.d.ts +8 -0
- package/dist/components/worktree/WorktreeList.js +12 -0
- package/dist/components/worktree/index.d.ts +12 -0
- package/dist/components/worktree/index.js +7 -0
- package/dist/components/worktree/types.d.ts +17 -0
- package/dist/components/worktree/types.js +3 -0
- package/dist/components/worktree/use-worktree-guest.d.ts +21 -0
- package/dist/components/worktree/use-worktree-guest.js +92 -0
- package/dist/components/worktree/worktree-file-commands.d.ts +19 -0
- package/dist/components/worktree/worktree-file-commands.js +112 -0
- package/dist/components/worktree/worktree-file-source.d.ts +15 -0
- package/dist/components/worktree/worktree-file-source.js +75 -0
- package/dist/components/worktree/worktree-host.d.ts +31 -0
- package/dist/components/worktree/worktree-host.js +242 -0
- package/dist/fixtures/index.d.ts +24 -0
- package/dist/fixtures/index.js +292 -0
- package/dist/host-inputs.d.ts +231 -0
- package/dist/host-inputs.js +35 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +14 -0
- package/dist/lib/activity-details.d.ts +23 -0
- package/dist/lib/activity-details.js +78 -0
- package/dist/lib/activity-order.d.ts +32 -0
- package/dist/lib/activity-order.js +86 -0
- package/dist/lib/agent-paths.d.ts +6 -0
- package/dist/lib/agent-paths.js +19 -0
- package/dist/lib/agents.d.ts +15 -0
- package/dist/lib/agents.js +60 -0
- package/dist/lib/catalog-status.d.ts +3 -0
- package/dist/lib/catalog-status.js +10 -0
- package/dist/lib/chart-data.d.ts +14 -0
- package/dist/lib/chart-data.js +151 -0
- package/dist/lib/day-activity.d.ts +21 -0
- package/dist/lib/day-activity.js +56 -0
- package/dist/lib/format.d.ts +24 -0
- package/dist/lib/format.js +116 -0
- package/dist/lib/hooks.d.ts +118 -0
- package/dist/lib/hooks.js +608 -0
- package/dist/lib/icons.d.ts +21 -0
- package/dist/lib/icons.js +49 -0
- package/dist/lib/image-media.d.ts +6 -0
- package/dist/lib/image-media.js +30 -0
- package/dist/lib/ingest-activity.d.ts +50 -0
- package/dist/lib/ingest-activity.js +151 -0
- package/dist/lib/ingest.d.ts +25 -0
- package/dist/lib/ingest.js +70 -0
- package/dist/lib/model-labels.d.ts +5 -0
- package/dist/lib/model-labels.js +28 -0
- package/dist/lib/model.d.ts +73 -0
- package/dist/lib/model.js +141 -0
- package/dist/lib/motion.d.ts +13 -0
- package/dist/lib/motion.js +80 -0
- package/dist/lib/room-storage.d.ts +13 -0
- package/dist/lib/room-storage.js +40 -0
- package/dist/lib/search-results.d.ts +27 -0
- package/dist/lib/search-results.js +83 -0
- package/dist/lib/search-sheet.d.ts +119 -0
- package/dist/lib/search-sheet.js +282 -0
- package/dist/lib/sections.d.ts +19 -0
- package/dist/lib/sections.js +36 -0
- package/dist/lib/session-activity.d.ts +5 -0
- package/dist/lib/session-activity.js +15 -0
- package/dist/lib/session-leases.d.ts +15 -0
- package/dist/lib/session-leases.js +61 -0
- package/dist/lib/spend.d.ts +42 -0
- package/dist/lib/spend.js +112 -0
- package/dist/lib/tint.d.ts +9 -0
- package/dist/lib/tint.js +53 -0
- package/dist/lib/transcript/collaboration.d.ts +97 -0
- package/dist/lib/transcript/collaboration.js +423 -0
- package/dist/lib/transcript/families.d.ts +212 -0
- package/dist/lib/transcript/families.js +906 -0
- package/dist/lib/transcript/favicons.d.ts +54 -0
- package/dist/lib/transcript/favicons.js +183 -0
- package/dist/lib/transcript/head-of-document.d.ts +27 -0
- package/dist/lib/transcript/head-of-document.js +274 -0
- package/dist/lib/transcript/head-state.d.ts +182 -0
- package/dist/lib/transcript/head-state.js +305 -0
- package/dist/lib/transcript/history-window.d.ts +13 -0
- package/dist/lib/transcript/history-window.js +52 -0
- package/dist/lib/transcript/images.d.ts +8 -0
- package/dist/lib/transcript/images.js +60 -0
- package/dist/lib/transcript/index.d.ts +15 -0
- package/dist/lib/transcript/index.js +8 -0
- package/dist/lib/transcript/ledger.d.ts +143 -0
- package/dist/lib/transcript/ledger.js +513 -0
- package/dist/lib/transcript/protocol.d.ts +23 -0
- package/dist/lib/transcript/protocol.js +1 -0
- package/dist/lib/transcript/sittings.d.ts +75 -0
- package/dist/lib/transcript/sittings.js +147 -0
- package/dist/lib/transcript/tail-scroll.d.ts +36 -0
- package/dist/lib/transcript/tail-scroll.js +167 -0
- package/dist/lib/transcript/tail-state.d.ts +17 -0
- package/dist/lib/transcript/tail-state.js +30 -0
- package/dist/lib/transcript/turns.d.ts +192 -0
- package/dist/lib/transcript/turns.js +576 -0
- package/dist/lib/transcript/use-transcript-opening.d.ts +12 -0
- package/dist/lib/transcript/use-transcript-opening.js +31 -0
- package/dist/lib/transcript/use-transcript-tail.d.ts +25 -0
- package/dist/lib/transcript/use-transcript-tail.js +158 -0
- package/dist/lib/transcript/vocabulary.d.ts +119 -0
- package/dist/lib/transcript/vocabulary.js +293 -0
- package/dist/lib/transcript/web-address.d.ts +6 -0
- package/dist/lib/transcript/web-address.js +18 -0
- package/dist/lib/transcript/workflow.d.ts +31 -0
- package/dist/lib/transcript/workflow.js +133 -0
- package/dist/lib/use-activity-order.d.ts +2 -0
- package/dist/lib/use-activity-order.js +23 -0
- package/dist/lib/use-day-usage.d.ts +8 -0
- package/dist/lib/use-day-usage.js +31 -0
- package/dist/lib/use-deferred-list-order.d.ts +26 -0
- package/dist/lib/use-deferred-list-order.js +142 -0
- package/dist/lib/use-ingest-activity.d.ts +2 -0
- package/dist/lib/use-ingest-activity.js +49 -0
- package/dist/lib/use-list-motion.d.ts +4 -0
- package/dist/lib/use-list-motion.js +67 -0
- package/dist/ports.d.ts +222 -0
- package/dist/ports.js +3 -0
- package/dist/room-context.d.ts +60 -0
- package/dist/room-context.js +87 -0
- package/dist/styles/activity-chart.css +127 -0
- package/dist/styles/attachments.css +29 -0
- package/dist/styles/favicon.css +73 -0
- package/dist/styles/history-room.css +18 -0
- package/dist/styles/host-inputs.css +250 -0
- package/dist/styles/image-gallery.css +30 -0
- package/dist/styles/ingest.css +51 -0
- package/dist/styles/message-preview.css +34 -0
- package/dist/styles/models-chart.css +66 -0
- package/dist/styles/project-chart.css +19 -0
- package/dist/styles/reader.css +33 -0
- package/dist/styles/room.css +1411 -0
- package/dist/styles/search.css +252 -0
- package/dist/styles/transcript-activity.css +70 -0
- package/dist/styles/transcript-head.css +220 -0
- package/dist/styles/transcript-loading.css +57 -0
- package/dist/styles/transcript.css +1226 -0
- package/package.json +61 -4
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { TimelineEntry } from "@vibefield/rosetta-protocol";
|
|
2
|
+
/** A silence this long or longer means the reader left and came back. */
|
|
3
|
+
export declare const SITTING_PAUSE_MS: number;
|
|
4
|
+
/** Adjacent successful setting commands inside this window may share one
|
|
5
|
+
* compact configuration group. Conversational prompts never use this rule. */
|
|
6
|
+
export declare const PROMPT_CLUSTER_MS: number;
|
|
7
|
+
/**
|
|
8
|
+
* The viewer-local day a timestamp falls in, as `YYYY-MM-DD`. The same form
|
|
9
|
+
* `lib/model.ts`'s `getCalendarDayKey` buckets the heatmap in — copied rather
|
|
10
|
+
* than imported because that module pulls in JSX through the agent marks, and
|
|
11
|
+
* this one must stay importable by a plain node test.
|
|
12
|
+
*/
|
|
13
|
+
export declare function calendarDayKey(timestamp: number): string;
|
|
14
|
+
/**
|
|
15
|
+
* Precision follows distance, in the words the session list already uses:
|
|
16
|
+
* `Today`, `Yesterday`, `Mon 24 Aug` — and the year only when it is not this
|
|
17
|
+
* one. `lib/format.ts`'s `dayLabel` is canonical for the first three; this adds
|
|
18
|
+
* §07's year rule on top of it so the pill and the session list never disagree.
|
|
19
|
+
*/
|
|
20
|
+
export declare function sittingDayLabel(timestamp: number, now: number): string;
|
|
21
|
+
export interface Sitting {
|
|
22
|
+
/** Stable across renders: the first row's `timeline_id`. */
|
|
23
|
+
readonly key: string;
|
|
24
|
+
/** `YYYY-MM-DD`, viewer-local. Null when no row in the sitting is stamped. */
|
|
25
|
+
readonly dayKey: string | null;
|
|
26
|
+
/** `Today` · `Yesterday` · `Mon 31 Aug` · `24 Aug 2025`. */
|
|
27
|
+
readonly dayLabel: string | null;
|
|
28
|
+
/** The pill's time, drawn only when the reader actually came back: null for
|
|
29
|
+
* the first sitting and for a day that turned without a pause. */
|
|
30
|
+
readonly resumedAt: number | null;
|
|
31
|
+
/** The silence before this sitting. Null when the cut was a day change with
|
|
32
|
+
* no pause of fifteen minutes or more. */
|
|
33
|
+
readonly pauseMs: number | null;
|
|
34
|
+
/** The cut crossed a calendar day, so the pill names it. True for the first
|
|
35
|
+
* sitting, whose pill is the day alone. */
|
|
36
|
+
readonly dayChanged: boolean;
|
|
37
|
+
readonly isFirst: boolean;
|
|
38
|
+
readonly startedAt: number | null;
|
|
39
|
+
readonly endedAt: number | null;
|
|
40
|
+
readonly rows: readonly TimelineEntry[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Fold ordered entries into sittings: open a new one before any entry whose
|
|
44
|
+
* calendar day differs from the previous stamped entry's, or whose gap from it
|
|
45
|
+
* is SITTING_PAUSE_MS or more.
|
|
46
|
+
*
|
|
47
|
+
* A row with `at: null` NEVER cuts — a missing stamp is not evidence that the
|
|
48
|
+
* reader left. Nor does a stamp that runs backwards: real transcripts carry
|
|
49
|
+
* out-of-order stamps (a compaction summary lands before the command that
|
|
50
|
+
* caused it), and a negative gap is a record artefact, not a silence.
|
|
51
|
+
*/
|
|
52
|
+
export declare function sittings(rows: readonly TimelineEntry[], now?: number): Sitting[];
|
|
53
|
+
/** One row of the pill's menu: `Mon 31 Aug · 1 sitting`. */
|
|
54
|
+
export interface DayEntry {
|
|
55
|
+
readonly dayKey: string;
|
|
56
|
+
readonly dayLabel: string;
|
|
57
|
+
readonly sittingCount: number;
|
|
58
|
+
/** Pressing the row lands the transcript on this sitting's first row. */
|
|
59
|
+
readonly firstSittingKey: string;
|
|
60
|
+
readonly startedAt: number | null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The day list the pill opens into, in document order. A sitting that could
|
|
64
|
+
* not name its day is left out rather than filed under a guess.
|
|
65
|
+
*/
|
|
66
|
+
export declare function dayList(list: readonly Sitting[]): DayEntry[];
|
|
67
|
+
/** `3 sittings` on the session row — the same count, from the same threshold. */
|
|
68
|
+
export declare function sittingCount(rows: readonly TimelineEntry[], now?: number): number;
|
|
69
|
+
/**
|
|
70
|
+
* The time half of the setting-group rule. Whether both rows are successful
|
|
71
|
+
* human setting commands, or a response stood between them, is the document's
|
|
72
|
+
* business; `turns.ts` owns those checks and sets
|
|
73
|
+
* `Turn.clusteredWithPrevious`.
|
|
74
|
+
*/
|
|
75
|
+
export declare function withinPromptCluster(previousAt: number | null, currentAt: number | null): boolean;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { dayLabel } from "../format.js";
|
|
2
|
+
/** A silence this long or longer means the reader left and came back. */
|
|
3
|
+
export const SITTING_PAUSE_MS = 15 * 60_000;
|
|
4
|
+
/** Adjacent successful setting commands inside this window may share one
|
|
5
|
+
* compact configuration group. Conversational prompts never use this rule. */
|
|
6
|
+
export const PROMPT_CLUSTER_MS = 5 * 60_000;
|
|
7
|
+
const MINUTES_TO_MS = 60_000;
|
|
8
|
+
/** The viewer's offset, minutes east of UTC. */
|
|
9
|
+
function viewerUtcOffsetMinutes() {
|
|
10
|
+
return -new Date().getTimezoneOffset();
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The viewer-local day a timestamp falls in, as `YYYY-MM-DD`. The same form
|
|
14
|
+
* `lib/model.ts`'s `getCalendarDayKey` buckets the heatmap in — copied rather
|
|
15
|
+
* than imported because that module pulls in JSX through the agent marks, and
|
|
16
|
+
* this one must stay importable by a plain node test.
|
|
17
|
+
*/
|
|
18
|
+
export function calendarDayKey(timestamp) {
|
|
19
|
+
const date = new Date(timestamp + viewerUtcOffsetMinutes() * MINUTES_TO_MS);
|
|
20
|
+
const month = String(date.getUTCMonth() + 1).padStart(2, "0");
|
|
21
|
+
const day = String(date.getUTCDate()).padStart(2, "0");
|
|
22
|
+
return `${date.getUTCFullYear()}-${month}-${day}`;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Precision follows distance, in the words the session list already uses:
|
|
26
|
+
* `Today`, `Yesterday`, `Mon 24 Aug` — and the year only when it is not this
|
|
27
|
+
* one. `lib/format.ts`'s `dayLabel` is canonical for the first three; this adds
|
|
28
|
+
* §07's year rule on top of it so the pill and the session list never disagree.
|
|
29
|
+
*/
|
|
30
|
+
export function sittingDayLabel(timestamp, now) {
|
|
31
|
+
const then = new Date(timestamp);
|
|
32
|
+
if (then.getFullYear() !== new Date(now).getFullYear()) {
|
|
33
|
+
return then.toLocaleDateString("en-GB", {
|
|
34
|
+
day: "numeric",
|
|
35
|
+
month: "short",
|
|
36
|
+
year: "numeric",
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return dayLabel(timestamp, now);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Fold ordered entries into sittings: open a new one before any entry whose
|
|
43
|
+
* calendar day differs from the previous stamped entry's, or whose gap from it
|
|
44
|
+
* is SITTING_PAUSE_MS or more.
|
|
45
|
+
*
|
|
46
|
+
* A row with `at: null` NEVER cuts — a missing stamp is not evidence that the
|
|
47
|
+
* reader left. Nor does a stamp that runs backwards: real transcripts carry
|
|
48
|
+
* out-of-order stamps (a compaction summary lands before the command that
|
|
49
|
+
* caused it), and a negative gap is a record artefact, not a silence.
|
|
50
|
+
*/
|
|
51
|
+
export function sittings(rows, now = Date.now()) {
|
|
52
|
+
const open = [];
|
|
53
|
+
let previousAt = null;
|
|
54
|
+
for (const row of rows) {
|
|
55
|
+
const at = row.at;
|
|
56
|
+
const current = open.at(-1);
|
|
57
|
+
if (current === undefined) {
|
|
58
|
+
open.push({ rows: [row], resumedAt: null, pauseMs: null, dayChanged: true });
|
|
59
|
+
if (at !== null)
|
|
60
|
+
previousAt = at;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (at === null || previousAt === null) {
|
|
64
|
+
current.rows.push(row);
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
const gap = at - previousAt;
|
|
68
|
+
const pauseMs = gap >= SITTING_PAUSE_MS ? gap : null;
|
|
69
|
+
const dayChanged = calendarDayKey(at) !== calendarDayKey(previousAt);
|
|
70
|
+
if (pauseMs === null && !dayChanged) {
|
|
71
|
+
current.rows.push(row);
|
|
72
|
+
previousAt = at;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
open.push({
|
|
76
|
+
rows: [row],
|
|
77
|
+
// The time is what the reader resumed at, so it is drawn only when there
|
|
78
|
+
// was something to resume from.
|
|
79
|
+
resumedAt: pauseMs === null ? null : at,
|
|
80
|
+
pauseMs,
|
|
81
|
+
dayChanged,
|
|
82
|
+
});
|
|
83
|
+
previousAt = at;
|
|
84
|
+
}
|
|
85
|
+
return open.map((sitting, index) => {
|
|
86
|
+
const stamps = sitting.rows
|
|
87
|
+
.map((row) => row.at)
|
|
88
|
+
.filter((value) => value !== null);
|
|
89
|
+
const startedAt = stamps.length === 0 ? null : Math.min(...stamps);
|
|
90
|
+
const endedAt = stamps.length === 0 ? null : Math.max(...stamps);
|
|
91
|
+
return {
|
|
92
|
+
key: sitting.rows[0].timeline_id,
|
|
93
|
+
dayKey: startedAt === null ? null : calendarDayKey(startedAt),
|
|
94
|
+
dayLabel: startedAt === null ? null : sittingDayLabel(startedAt, now),
|
|
95
|
+
resumedAt: sitting.resumedAt,
|
|
96
|
+
pauseMs: sitting.pauseMs,
|
|
97
|
+
dayChanged: sitting.dayChanged,
|
|
98
|
+
isFirst: index === 0,
|
|
99
|
+
startedAt,
|
|
100
|
+
endedAt,
|
|
101
|
+
rows: sitting.rows,
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The day list the pill opens into, in document order. A sitting that could
|
|
107
|
+
* not name its day is left out rather than filed under a guess.
|
|
108
|
+
*/
|
|
109
|
+
export function dayList(list) {
|
|
110
|
+
const days = [];
|
|
111
|
+
const byKey = new Map();
|
|
112
|
+
for (const sitting of list) {
|
|
113
|
+
if (sitting.dayKey === null || sitting.dayLabel === null)
|
|
114
|
+
continue;
|
|
115
|
+
const seen = byKey.get(sitting.dayKey);
|
|
116
|
+
if (seen === undefined) {
|
|
117
|
+
byKey.set(sitting.dayKey, days.length);
|
|
118
|
+
days.push({
|
|
119
|
+
dayKey: sitting.dayKey,
|
|
120
|
+
dayLabel: sitting.dayLabel,
|
|
121
|
+
sittingCount: 1,
|
|
122
|
+
firstSittingKey: sitting.key,
|
|
123
|
+
startedAt: sitting.startedAt,
|
|
124
|
+
});
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
const existing = days[seen];
|
|
128
|
+
days[seen] = { ...existing, sittingCount: existing.sittingCount + 1 };
|
|
129
|
+
}
|
|
130
|
+
return days;
|
|
131
|
+
}
|
|
132
|
+
/** `3 sittings` on the session row — the same count, from the same threshold. */
|
|
133
|
+
export function sittingCount(rows, now = Date.now()) {
|
|
134
|
+
return sittings(rows, now).length;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The time half of the setting-group rule. Whether both rows are successful
|
|
138
|
+
* human setting commands, or a response stood between them, is the document's
|
|
139
|
+
* business; `turns.ts` owns those checks and sets
|
|
140
|
+
* `Turn.clusteredWithPrevious`.
|
|
141
|
+
*/
|
|
142
|
+
export function withinPromptCluster(previousAt, currentAt) {
|
|
143
|
+
if (previousAt === null || currentAt === null)
|
|
144
|
+
return false;
|
|
145
|
+
const gap = currentAt - previousAt;
|
|
146
|
+
return gap >= 0 && gap <= PROMPT_CLUSTER_MS;
|
|
147
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface TailState {
|
|
2
|
+
readonly away: boolean;
|
|
3
|
+
readonly unseen: number;
|
|
4
|
+
}
|
|
5
|
+
/** One owner for live-follow and its animation. DOM scroll events observe
|
|
6
|
+
* positions; wheel/touch/key intent can interrupt before the next frame. */
|
|
7
|
+
export declare class TailScroll {
|
|
8
|
+
private following;
|
|
9
|
+
private ready;
|
|
10
|
+
private landed;
|
|
11
|
+
private opening;
|
|
12
|
+
private unseen;
|
|
13
|
+
private frame;
|
|
14
|
+
private previousTime;
|
|
15
|
+
private returningToLatest;
|
|
16
|
+
private writtenTop;
|
|
17
|
+
private state;
|
|
18
|
+
private readonly element;
|
|
19
|
+
private readonly publish;
|
|
20
|
+
private readonly reduced;
|
|
21
|
+
constructor(element: HTMLElement, publish: (state: TailState) => void, reduced: () => boolean);
|
|
22
|
+
get isFollowing(): boolean;
|
|
23
|
+
get isAnimating(): boolean;
|
|
24
|
+
private bottom;
|
|
25
|
+
private setFollowing;
|
|
26
|
+
private emit;
|
|
27
|
+
private write;
|
|
28
|
+
private stop;
|
|
29
|
+
pause: () => void;
|
|
30
|
+
onScroll: () => void;
|
|
31
|
+
update(ready: boolean, arrivals: number, opening?: boolean): void;
|
|
32
|
+
resize: () => void;
|
|
33
|
+
private tick;
|
|
34
|
+
latest: () => void;
|
|
35
|
+
dispose(): void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { tailStep } from "./tail-state.js";
|
|
2
|
+
/** One owner for live-follow and its animation. DOM scroll events observe
|
|
3
|
+
* positions; wheel/touch/key intent can interrupt before the next frame. */
|
|
4
|
+
export class TailScroll {
|
|
5
|
+
following = true;
|
|
6
|
+
ready = false;
|
|
7
|
+
landed = false;
|
|
8
|
+
opening = false;
|
|
9
|
+
unseen = 0;
|
|
10
|
+
frame = null;
|
|
11
|
+
previousTime = 0;
|
|
12
|
+
returningToLatest = false;
|
|
13
|
+
writtenTop;
|
|
14
|
+
state = { away: false, unseen: 0 };
|
|
15
|
+
element;
|
|
16
|
+
publish;
|
|
17
|
+
reduced;
|
|
18
|
+
constructor(element, publish, reduced) {
|
|
19
|
+
this.element = element;
|
|
20
|
+
this.publish = publish;
|
|
21
|
+
this.reduced = reduced;
|
|
22
|
+
this.writtenTop = element.scrollTop;
|
|
23
|
+
this.setFollowing(true);
|
|
24
|
+
}
|
|
25
|
+
get isFollowing() {
|
|
26
|
+
return this.following;
|
|
27
|
+
}
|
|
28
|
+
get isAnimating() {
|
|
29
|
+
return this.frame !== null;
|
|
30
|
+
}
|
|
31
|
+
bottom() {
|
|
32
|
+
return Math.max(0, this.element.scrollHeight - this.element.clientHeight);
|
|
33
|
+
}
|
|
34
|
+
setFollowing(value) {
|
|
35
|
+
this.following = value;
|
|
36
|
+
this.element.toggleAttribute("data-following", value);
|
|
37
|
+
}
|
|
38
|
+
emit() {
|
|
39
|
+
const away = this.ready &&
|
|
40
|
+
!this.following &&
|
|
41
|
+
(this.bottom() - this.element.scrollTop > 32 || this.unseen > 0);
|
|
42
|
+
const unseen = this.following ? 0 : this.unseen;
|
|
43
|
+
if (away === this.state.away && unseen === this.state.unseen)
|
|
44
|
+
return;
|
|
45
|
+
this.state = { away, unseen };
|
|
46
|
+
this.publish(this.state);
|
|
47
|
+
}
|
|
48
|
+
write(top) {
|
|
49
|
+
this.element.scrollTop = top;
|
|
50
|
+
this.writtenTop = this.element.scrollTop;
|
|
51
|
+
}
|
|
52
|
+
stop() {
|
|
53
|
+
if (this.frame !== null)
|
|
54
|
+
cancelAnimationFrame(this.frame);
|
|
55
|
+
this.frame = null;
|
|
56
|
+
this.returningToLatest = false;
|
|
57
|
+
}
|
|
58
|
+
pause = () => {
|
|
59
|
+
this.stop();
|
|
60
|
+
this.setFollowing(false);
|
|
61
|
+
this.emit();
|
|
62
|
+
};
|
|
63
|
+
onScroll = () => {
|
|
64
|
+
if (!this.ready)
|
|
65
|
+
return;
|
|
66
|
+
const top = this.element.scrollTop;
|
|
67
|
+
// During an explicit return, native PageUp/anchor easing may keep sending
|
|
68
|
+
// positions for several frames. Fresh input and focus own interrupts;
|
|
69
|
+
// those stale position events must not cancel the reader's latest click.
|
|
70
|
+
if (!this.returningToLatest && Math.abs(top - this.writtenTop) > 1) {
|
|
71
|
+
this.stop();
|
|
72
|
+
this.setFollowing(false);
|
|
73
|
+
}
|
|
74
|
+
this.writtenTop = top;
|
|
75
|
+
if (this.bottom() - top <= 8) {
|
|
76
|
+
this.setFollowing(true);
|
|
77
|
+
this.unseen = 0;
|
|
78
|
+
}
|
|
79
|
+
this.emit();
|
|
80
|
+
};
|
|
81
|
+
update(ready, arrivals, opening = false) {
|
|
82
|
+
this.opening = opening;
|
|
83
|
+
this.ready = ready;
|
|
84
|
+
if (!ready) {
|
|
85
|
+
this.stop();
|
|
86
|
+
this.emit();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
this.unseen += arrivals;
|
|
90
|
+
if (!this.landed) {
|
|
91
|
+
this.landed = true;
|
|
92
|
+
// Open a session at its latest message before paint. Search anchors
|
|
93
|
+
// pause follow before reaching here and retain their own landing.
|
|
94
|
+
if (this.following)
|
|
95
|
+
this.write(this.bottom());
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
this.resize();
|
|
99
|
+
}
|
|
100
|
+
this.emit();
|
|
101
|
+
}
|
|
102
|
+
resize = () => {
|
|
103
|
+
if (!this.ready)
|
|
104
|
+
return;
|
|
105
|
+
if (!this.following) {
|
|
106
|
+
this.emit();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (this.opening || this.reduced()) {
|
|
110
|
+
this.stop();
|
|
111
|
+
this.write(this.bottom());
|
|
112
|
+
this.unseen = 0;
|
|
113
|
+
this.emit();
|
|
114
|
+
}
|
|
115
|
+
else if (Math.abs(this.bottom() - this.element.scrollTop) <= 0.5) {
|
|
116
|
+
this.stop();
|
|
117
|
+
this.unseen = 0;
|
|
118
|
+
this.emit();
|
|
119
|
+
}
|
|
120
|
+
else if (this.frame === null) {
|
|
121
|
+
this.previousTime = performance.now();
|
|
122
|
+
this.frame = requestAnimationFrame(this.tick);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
tick = (time) => {
|
|
126
|
+
this.frame = null;
|
|
127
|
+
if (!this.following || !this.ready)
|
|
128
|
+
return;
|
|
129
|
+
const target = this.bottom();
|
|
130
|
+
const before = this.element.scrollTop;
|
|
131
|
+
this.write(this.reduced() ? target : tailStep(before, target, time - this.previousTime));
|
|
132
|
+
// Browsers quantize scrollTop to device pixels. At high refresh rates a
|
|
133
|
+
// subpixel step can round back to the same position forever. Make one
|
|
134
|
+
// pixel of progress when that happens, bounded by the remaining distance.
|
|
135
|
+
if (this.element.scrollTop === before && target !== before) {
|
|
136
|
+
this.write(before + Math.sign(target - before) * Math.min(1, Math.abs(target - before)));
|
|
137
|
+
}
|
|
138
|
+
this.previousTime = time;
|
|
139
|
+
if (Math.abs(target - this.element.scrollTop) <= 1) {
|
|
140
|
+
this.write(target);
|
|
141
|
+
this.returningToLatest = false;
|
|
142
|
+
this.unseen = 0;
|
|
143
|
+
this.emit();
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
this.frame = requestAnimationFrame(this.tick);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
latest = () => {
|
|
150
|
+
this.stop();
|
|
151
|
+
// PageUp/PageDown and anchor navigation can leave a native smooth scroll
|
|
152
|
+
// in flight. Cancel it now, before its queued scroll event can interrupt
|
|
153
|
+
// the first frame of this explicitly requested return to latest.
|
|
154
|
+
this.element.scrollTo({ top: this.element.scrollTop, behavior: "instant" });
|
|
155
|
+
this.writtenTop = this.element.scrollTop;
|
|
156
|
+
this.returningToLatest = true;
|
|
157
|
+
this.setFollowing(true);
|
|
158
|
+
this.resize();
|
|
159
|
+
if (this.bottom() - this.element.scrollTop <= 8)
|
|
160
|
+
this.unseen = 0;
|
|
161
|
+
this.emit();
|
|
162
|
+
};
|
|
163
|
+
dispose() {
|
|
164
|
+
this.stop();
|
|
165
|
+
this.element.removeAttribute("data-following");
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Ordinals belong to sessions, not the merged team chronology. New sources
|
|
2
|
+
* start with a baseline; history, patches and replay cannot inflate the count. */
|
|
3
|
+
export interface TailRow {
|
|
4
|
+
readonly session_id: string;
|
|
5
|
+
readonly timeline_id: string;
|
|
6
|
+
readonly ordinal: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class TailArrivals {
|
|
9
|
+
private maxima;
|
|
10
|
+
update<T extends TailRow>(rows: readonly T[]): T[];
|
|
11
|
+
/** Even an empty initial snapshot establishes this session's live tail. */
|
|
12
|
+
prime(sessionId: string): void;
|
|
13
|
+
reset(): void;
|
|
14
|
+
}
|
|
15
|
+
/** Time-based easing stays equally smooth on 60 Hz and 120 Hz displays.
|
|
16
|
+
* Retargeting never restarts a browser smooth-scroll on each streamed token. */
|
|
17
|
+
export declare function tailStep(current: number, target: number, elapsed: number): number;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export class TailArrivals {
|
|
2
|
+
maxima = new Map();
|
|
3
|
+
update(rows) {
|
|
4
|
+
const fresh = [];
|
|
5
|
+
const next = new Map(this.maxima);
|
|
6
|
+
for (const row of rows) {
|
|
7
|
+
const previous = this.maxima.get(row.session_id);
|
|
8
|
+
if (previous !== undefined && row.ordinal > previous)
|
|
9
|
+
fresh.push(row);
|
|
10
|
+
next.set(row.session_id, Math.max(next.get(row.session_id) ?? -1, row.ordinal));
|
|
11
|
+
}
|
|
12
|
+
this.maxima = next;
|
|
13
|
+
return fresh;
|
|
14
|
+
}
|
|
15
|
+
/** Even an empty initial snapshot establishes this session's live tail. */
|
|
16
|
+
prime(sessionId) {
|
|
17
|
+
if (!this.maxima.has(sessionId))
|
|
18
|
+
this.maxima.set(sessionId, -1);
|
|
19
|
+
}
|
|
20
|
+
reset() {
|
|
21
|
+
this.maxima.clear();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/** Time-based easing stays equally smooth on 60 Hz and 120 Hz displays.
|
|
25
|
+
* Retargeting never restarts a browser smooth-scroll on each streamed token. */
|
|
26
|
+
export function tailStep(current, target, elapsed) {
|
|
27
|
+
if (Math.abs(target - current) <= 0.5)
|
|
28
|
+
return target;
|
|
29
|
+
return current + (target - current) * (1 - Math.exp(-Math.min(elapsed, 64) / 70));
|
|
30
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type { AttachmentKind, AttachmentRef, CanonicalText, CitationRef, CollaborationEvent, Notice, SummaryPurpose, TimelineEntry } from "@vibefield/rosetta-protocol";
|
|
2
|
+
import type { LedgerLine, RunSummary } from "./ledger.js";
|
|
3
|
+
import type { LedgerContext } from "./vocabulary.js";
|
|
4
|
+
/** One image/attachment occurrence, including unavailable bytes. */
|
|
5
|
+
export interface AttachmentFact {
|
|
6
|
+
readonly key: string;
|
|
7
|
+
readonly kind: AttachmentKind;
|
|
8
|
+
readonly name: string | null;
|
|
9
|
+
readonly mediaType: string | null;
|
|
10
|
+
readonly byteLen: number | null;
|
|
11
|
+
readonly width: number | null;
|
|
12
|
+
readonly height: number | null;
|
|
13
|
+
readonly missing: boolean;
|
|
14
|
+
readonly ref: AttachmentRef | null;
|
|
15
|
+
readonly caption: string;
|
|
16
|
+
}
|
|
17
|
+
/** Native wrappers and image grammar belong to adapters, never the renderer. */
|
|
18
|
+
export declare function readAttachments(text: string | null, refs: readonly AttachmentRef[]): {
|
|
19
|
+
text: string | null;
|
|
20
|
+
attachments: AttachmentFact[];
|
|
21
|
+
};
|
|
22
|
+
export interface AttachmentMention {
|
|
23
|
+
readonly start: number;
|
|
24
|
+
readonly end: number;
|
|
25
|
+
readonly target: AttachmentFact;
|
|
26
|
+
}
|
|
27
|
+
/** Exact canonical Unicode-scalar spans, converted once to JS string offsets.
|
|
28
|
+
* Missing images retain their link; undocumented numbering stays plain text. */
|
|
29
|
+
export declare function attachmentMentions(text: string, attachments: readonly AttachmentFact[]): readonly AttachmentMention[];
|
|
30
|
+
export interface LocalSetting {
|
|
31
|
+
readonly kind: "model" | "effort";
|
|
32
|
+
readonly label: "Model" | "Effort";
|
|
33
|
+
readonly value: string;
|
|
34
|
+
}
|
|
35
|
+
export interface Prompt {
|
|
36
|
+
readonly key: string;
|
|
37
|
+
readonly row: TimelineEntry;
|
|
38
|
+
/** The prompt row plus an absorbed `command_output` notice — the pair is one
|
|
39
|
+
* object (§03 H), so the marker never draws twice. */
|
|
40
|
+
readonly rows: readonly TimelineEntry[];
|
|
41
|
+
readonly at: number | null;
|
|
42
|
+
readonly text: string | null;
|
|
43
|
+
readonly attachments: readonly AttachmentFact[];
|
|
44
|
+
/** Draw a pill, not a panel: this prompt is a local command. */
|
|
45
|
+
readonly isCommand: boolean;
|
|
46
|
+
readonly command: string | null;
|
|
47
|
+
/** The command's reply, riding beside the pill in the caption ramp. */
|
|
48
|
+
readonly commandOutput: string | null;
|
|
49
|
+
readonly commandOutputRow: TimelineEntry | null;
|
|
50
|
+
/** A successful local setting change, reduced to label + canonical value. */
|
|
51
|
+
readonly setting: LocalSetting | null;
|
|
52
|
+
/** The parent session sent this, not a person (`parent_invocation`). */
|
|
53
|
+
readonly fromParent: boolean;
|
|
54
|
+
/** Machine-delivered context has prompt semantics but never human styling. */
|
|
55
|
+
readonly machine: MachinePrompt | null;
|
|
56
|
+
}
|
|
57
|
+
export interface MachinePrompt {
|
|
58
|
+
readonly label: string;
|
|
59
|
+
readonly sender: string | null;
|
|
60
|
+
}
|
|
61
|
+
/** Project a normalized setting value into the two words the reader needs.
|
|
62
|
+
* Diagnostics deliberately fail this predicate and retain the generic command
|
|
63
|
+
* treatment, so compact presentation never conceals a rejected command. */
|
|
64
|
+
export declare function localSetting(command: string | null, output: string | null): LocalSetting | null;
|
|
65
|
+
export type Segment = {
|
|
66
|
+
readonly kind: "prose";
|
|
67
|
+
readonly key: string;
|
|
68
|
+
readonly row: TimelineEntry;
|
|
69
|
+
readonly at: number | null;
|
|
70
|
+
readonly text: string | null;
|
|
71
|
+
readonly attachments: readonly AttachmentFact[];
|
|
72
|
+
readonly citations: readonly CitationRef[];
|
|
73
|
+
readonly citationLabels: readonly string[];
|
|
74
|
+
} | {
|
|
75
|
+
readonly kind: "thinking";
|
|
76
|
+
readonly key: string;
|
|
77
|
+
readonly row: TimelineEntry;
|
|
78
|
+
readonly at: number | null;
|
|
79
|
+
readonly text: string;
|
|
80
|
+
/** From adjacent stamps — what `more · reasoning, 12s` states. */
|
|
81
|
+
readonly spanMs: number | null;
|
|
82
|
+
} | {
|
|
83
|
+
readonly kind: "ledger";
|
|
84
|
+
readonly key: string;
|
|
85
|
+
readonly at: number | null;
|
|
86
|
+
/** Every row in the run, in order: the tool rows and the thoughts,
|
|
87
|
+
* notices and summaries between them (R-1). */
|
|
88
|
+
readonly rows: readonly TimelineEntry[];
|
|
89
|
+
/** The tool lines, folded (T-3) — what the sentence counts and what the
|
|
90
|
+
* worker subthreads hang from. */
|
|
91
|
+
readonly lines: readonly LedgerLine[];
|
|
92
|
+
/** The ladder, in order. */
|
|
93
|
+
readonly members: readonly LedgerMember[];
|
|
94
|
+
readonly summary: RunSummary;
|
|
95
|
+
} | {
|
|
96
|
+
readonly kind: "marker";
|
|
97
|
+
readonly key: string;
|
|
98
|
+
readonly row: TimelineEntry;
|
|
99
|
+
readonly at: number | null;
|
|
100
|
+
readonly notice: Notice;
|
|
101
|
+
readonly text: string;
|
|
102
|
+
/** A runtime error takes red TEXT — still a line, never a filled alarm. */
|
|
103
|
+
readonly tone: "plain" | "failed";
|
|
104
|
+
} | {
|
|
105
|
+
readonly kind: "summary";
|
|
106
|
+
readonly key: string;
|
|
107
|
+
readonly row: TimelineEntry;
|
|
108
|
+
readonly at: number | null;
|
|
109
|
+
readonly purpose: SummaryPurpose;
|
|
110
|
+
readonly text: string;
|
|
111
|
+
} | {
|
|
112
|
+
readonly kind: "compaction";
|
|
113
|
+
readonly key: string;
|
|
114
|
+
readonly row: TimelineEntry;
|
|
115
|
+
/** The summary and, when proven, its neighboring boundary, in order. */
|
|
116
|
+
readonly rows: readonly TimelineEntry[];
|
|
117
|
+
readonly at: number | null;
|
|
118
|
+
readonly text: CanonicalText;
|
|
119
|
+
} | {
|
|
120
|
+
readonly kind: "collaboration";
|
|
121
|
+
readonly key: string;
|
|
122
|
+
readonly row: TimelineEntry;
|
|
123
|
+
readonly at: number | null;
|
|
124
|
+
readonly event: CollaborationEvent;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* One drawn member of a run's ladder: a tool line, or the thought, notice or
|
|
128
|
+
* summary that happened between two lines. Inside the ladder each keeps the
|
|
129
|
+
* form it had as a segment; only the run's head is new (transcript-fold).
|
|
130
|
+
*/
|
|
131
|
+
export type LedgerMember = {
|
|
132
|
+
readonly kind: "line";
|
|
133
|
+
readonly key: string;
|
|
134
|
+
readonly line: LedgerLine;
|
|
135
|
+
} | Extract<Segment, {
|
|
136
|
+
kind: "thinking" | "marker" | "summary";
|
|
137
|
+
}>;
|
|
138
|
+
/** A reply's list-price cost (§4.1.3). `microUsd` is null when nothing in the
|
|
139
|
+
* reply could be priced; `partial` when some of its usage could not be. */
|
|
140
|
+
export interface ResponseCost {
|
|
141
|
+
readonly microUsd: number | null;
|
|
142
|
+
readonly partial: boolean;
|
|
143
|
+
}
|
|
144
|
+
export interface ResponseHead {
|
|
145
|
+
/** The model the reply opened with. A mid-reply change is a `model_changed`
|
|
146
|
+
* marker in the segments, never a second head (§05 draws exactly that). */
|
|
147
|
+
readonly model: string | null;
|
|
148
|
+
readonly effort: string | null;
|
|
149
|
+
/** Reported tokens across the reply's response groups. Null means the agent
|
|
150
|
+
* never reported any, which must never be coerced to zero. */
|
|
151
|
+
readonly tokens: number | null;
|
|
152
|
+
/** List-price cost of the reply's usage; null when it carried none. */
|
|
153
|
+
readonly cost: ResponseCost | null;
|
|
154
|
+
readonly startedAt: number | null;
|
|
155
|
+
readonly endedAt: number | null;
|
|
156
|
+
readonly spanMs: number | null;
|
|
157
|
+
}
|
|
158
|
+
export interface Turn {
|
|
159
|
+
/** Stable across renders: the prompt's `timeline_id`, else the first row's. */
|
|
160
|
+
readonly key: string;
|
|
161
|
+
readonly prompt: Prompt | null;
|
|
162
|
+
/** One head per reply (T-4). Null when nothing agent-authored answered. */
|
|
163
|
+
readonly head: ResponseHead | null;
|
|
164
|
+
readonly segments: readonly Segment[];
|
|
165
|
+
/** Where the eyebrow belongs: the index of the first agent-authored segment,
|
|
166
|
+
* so a leading marker is not drawn under a head it does not belong to. */
|
|
167
|
+
readonly headIndex: number;
|
|
168
|
+
/** Every row in the turn, in order — anchors, focus landing, watermark. */
|
|
169
|
+
readonly rows: readonly TimelineEntry[];
|
|
170
|
+
readonly at: number | null;
|
|
171
|
+
/** §07: this successful human setting command joins the previous setting
|
|
172
|
+
* command's compact group. Conversational and parent-agent prompts are
|
|
173
|
+
* always standalone turns. */
|
|
174
|
+
readonly clusteredWithPrevious: boolean;
|
|
175
|
+
}
|
|
176
|
+
export interface DocumentOptions {
|
|
177
|
+
/** Paths draw relative to the session's own cwd, then home-relative. */
|
|
178
|
+
readonly context?: LedgerContext;
|
|
179
|
+
/** Team child rows interleaved into their parent's shared chronology. Their
|
|
180
|
+
* native parent-invocation group must not masquerade as a human turn here. */
|
|
181
|
+
readonly sharedCollaborationSessionIds?: ReadonlySet<string>;
|
|
182
|
+
/** Rows that begin a new sitting (§07). A run never straddles a pill, so it
|
|
183
|
+
* is cut before each of these; `document-model.ts` supplies them. */
|
|
184
|
+
readonly cutBefore?: ReadonlySet<string>;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Fold an ordered timeline into turns. Pure: no clock, no IO. The rows behind
|
|
188
|
+
* every prompt, segment and ledger line stay reachable, so the anchors, the
|
|
189
|
+
* focus landing and the live watermark all keep working off `timeline_id` and
|
|
190
|
+
* `ordinal` exactly as they do today.
|
|
191
|
+
*/
|
|
192
|
+
export declare function documentTurns(rows: readonly TimelineEntry[], options?: DocumentOptions): Turn[];
|