@vibefield/rosetta-room 0.0.0-stage → 0.1.1
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,182 @@
|
|
|
1
|
+
import type { TimelineEntry } from "@vibefield/rosetta-protocol";
|
|
2
|
+
/** One backward page. The daemon's limit and the record's figure. */
|
|
3
|
+
export declare const EARLIER_PAGE_SIZE = 200;
|
|
4
|
+
/** "about two notches or one short flick" — §08. */
|
|
5
|
+
export declare const PULL_THRESHOLD_PX = 120;
|
|
6
|
+
/** The accumulator decays after half a second of stillness (§08). */
|
|
7
|
+
export declare const PULL_DECAY_MS = 500;
|
|
8
|
+
/** The receipt's dwell. The record's `land()` clears the pill at 1800ms. */
|
|
9
|
+
export declare const RECEIPT_MS = 1800;
|
|
10
|
+
/** `--frost` rises 0 → 1 over the first 24px of scroll (§08, the top fade). */
|
|
11
|
+
export declare const FROST_RANGE_PX = 24;
|
|
12
|
+
/** Muted, never red — nothing was destroyed. The retry lives in the line. */
|
|
13
|
+
export declare const EARLIER_FAILED_MESSAGE = "the daemon did not answer";
|
|
14
|
+
/** The protocol's 410, drawn on the data gap's dashed line. */
|
|
15
|
+
export declare const EARLIER_REWRITTEN_MESSAGE = "rewritten while you read \u00B7 reloading from the end";
|
|
16
|
+
/** What the head line offers the reader right now. */
|
|
17
|
+
export type EarlierState =
|
|
18
|
+
/** Nothing above: the cursor reached the top, or the session is short. */
|
|
19
|
+
{
|
|
20
|
+
readonly kind: "none";
|
|
21
|
+
}
|
|
22
|
+
/** History above, nothing fetched. Approaching the top starts a fetch. */
|
|
23
|
+
| {
|
|
24
|
+
readonly kind: "idle";
|
|
25
|
+
}
|
|
26
|
+
/** A page is in flight and will be held, not inserted. */
|
|
27
|
+
| {
|
|
28
|
+
readonly kind: "fetching";
|
|
29
|
+
}
|
|
30
|
+
/** A page is fetched and waiting beside the document. Weight = readiness. */
|
|
31
|
+
| {
|
|
32
|
+
readonly kind: "held";
|
|
33
|
+
readonly count: number;
|
|
34
|
+
}
|
|
35
|
+
/** The pull arrived before the page did; it lands on arrival. */
|
|
36
|
+
| {
|
|
37
|
+
readonly kind: "revealing";
|
|
38
|
+
}
|
|
39
|
+
/** The daemon did not answer. `retryEarlier()` tries again. */
|
|
40
|
+
| {
|
|
41
|
+
readonly kind: "failed";
|
|
42
|
+
readonly message: string;
|
|
43
|
+
};
|
|
44
|
+
/** The 410 sentence, surfaced once after the paged history is dropped. */
|
|
45
|
+
export interface EarlierNotice {
|
|
46
|
+
readonly kind: "rewritten";
|
|
47
|
+
readonly message: string;
|
|
48
|
+
/** Increments per notice so an effect can key on it. */
|
|
49
|
+
readonly seq: number;
|
|
50
|
+
}
|
|
51
|
+
/** The last landing — the receipt pill's figure and the scroll adjustment's key. */
|
|
52
|
+
export interface EarlierLanding {
|
|
53
|
+
/** Rows the document actually gained, deduplicated against what it had. */
|
|
54
|
+
readonly count: number;
|
|
55
|
+
/** Increments on every landing, including a landing of zero fresh rows. */
|
|
56
|
+
readonly seq: number;
|
|
57
|
+
}
|
|
58
|
+
export interface EarlierModel {
|
|
59
|
+
/** Page identities for reveal receipts. The subscription owns row values. */
|
|
60
|
+
readonly older: readonly TimelineEntry[];
|
|
61
|
+
/** `undefined` = untried · `null` = top of history · string = next page back. */
|
|
62
|
+
readonly cursor: string | null | undefined;
|
|
63
|
+
/** The fetched page waiting beside the document, and the cursor it carried. */
|
|
64
|
+
readonly held: readonly TimelineEntry[] | null;
|
|
65
|
+
readonly heldCursor: string | null | undefined;
|
|
66
|
+
/** Rows the held page would actually add — never the raw page length. */
|
|
67
|
+
readonly heldCount: number;
|
|
68
|
+
readonly phase: "rest" | "fetching" | "revealing" | "failed";
|
|
69
|
+
readonly failure: string | null;
|
|
70
|
+
readonly notice: EarlierNotice | null;
|
|
71
|
+
readonly landing: EarlierLanding | null;
|
|
72
|
+
/** Stamps the fetch in flight; a stale answer is dropped, never applied. */
|
|
73
|
+
readonly fetchSeq: number;
|
|
74
|
+
readonly landSeq: number;
|
|
75
|
+
readonly noticeSeq: number;
|
|
76
|
+
}
|
|
77
|
+
export declare function initialEarlierModel(): EarlierModel;
|
|
78
|
+
/** What the reducer needs from outside itself. */
|
|
79
|
+
export interface EarlierContext {
|
|
80
|
+
/** The live tail's ids. A page that repeats them added nothing. */
|
|
81
|
+
readonly tailIds: ReadonlySet<string>;
|
|
82
|
+
readonly pageSize: number;
|
|
83
|
+
}
|
|
84
|
+
export type EarlierAction =
|
|
85
|
+
/** The session changed: drop the paged history AND the held page. */
|
|
86
|
+
{
|
|
87
|
+
readonly type: "reset";
|
|
88
|
+
} | {
|
|
89
|
+
readonly type: "snapshot";
|
|
90
|
+
readonly cursor: string | null;
|
|
91
|
+
}
|
|
92
|
+
/** Fetch the page above and keep it aside. No-op unless idle or failed. */
|
|
93
|
+
| {
|
|
94
|
+
readonly type: "hold";
|
|
95
|
+
}
|
|
96
|
+
/** Spend the bar. Lands a held page now, or marks a fetch to land on arrival. */
|
|
97
|
+
| {
|
|
98
|
+
readonly type: "reveal";
|
|
99
|
+
}
|
|
100
|
+
/** A page came back. Dropped unless `seq` still stamps the fetch in flight. */
|
|
101
|
+
| {
|
|
102
|
+
readonly type: "page";
|
|
103
|
+
readonly seq: number;
|
|
104
|
+
readonly entries: readonly TimelineEntry[];
|
|
105
|
+
readonly cursor: string | null;
|
|
106
|
+
}
|
|
107
|
+
/** The daemon did not answer. */
|
|
108
|
+
| {
|
|
109
|
+
readonly type: "fail";
|
|
110
|
+
readonly seq: number;
|
|
111
|
+
readonly message: string;
|
|
112
|
+
}
|
|
113
|
+
/** The projection was rewritten underneath (HTTP 410). */
|
|
114
|
+
| {
|
|
115
|
+
readonly type: "expired";
|
|
116
|
+
readonly seq: number;
|
|
117
|
+
}
|
|
118
|
+
/** Dismiss the 410 sentence once it has been read. */
|
|
119
|
+
| {
|
|
120
|
+
readonly type: "clearNotice";
|
|
121
|
+
};
|
|
122
|
+
/** The public state, derived — never stored twice. */
|
|
123
|
+
export declare function earlierState(model: EarlierModel, ctx: EarlierContext): EarlierState;
|
|
124
|
+
export declare function reduceEarlier(model: EarlierModel, action: EarlierAction, ctx: EarlierContext): EarlierModel;
|
|
125
|
+
/** Rows still above the loaded document, when the session's total is known.
|
|
126
|
+
* Returns null when it is not — §08: "when it is not, the word stands alone." */
|
|
127
|
+
export declare function earlierAboveOf(total: number | null, loaded: number): number | null;
|
|
128
|
+
export interface PullModel {
|
|
129
|
+
/** Pixels of upward travel banked, clamped to the threshold. */
|
|
130
|
+
readonly travel: number;
|
|
131
|
+
/** When the last travel landed, for the decay. */
|
|
132
|
+
readonly at: number;
|
|
133
|
+
}
|
|
134
|
+
export declare const initialPull: PullModel;
|
|
135
|
+
export interface PullEvent {
|
|
136
|
+
/** Positive = toward earlier (wheel up, finger down). Negative = away. */
|
|
137
|
+
readonly travel: number;
|
|
138
|
+
readonly atTop: boolean;
|
|
139
|
+
readonly now: number;
|
|
140
|
+
}
|
|
141
|
+
export interface PullOptions {
|
|
142
|
+
readonly threshold?: number;
|
|
143
|
+
readonly decayMs?: number;
|
|
144
|
+
}
|
|
145
|
+
export interface PullResult {
|
|
146
|
+
readonly model: PullModel;
|
|
147
|
+
/** True on the frame the accumulator crosses the threshold. */
|
|
148
|
+
readonly fire: boolean;
|
|
149
|
+
}
|
|
150
|
+
export declare function advancePull(model: PullModel, event: PullEvent, options?: PullOptions): PullResult;
|
|
151
|
+
/** The bar's own reading: 0 at rest, 1 the instant before it fires. */
|
|
152
|
+
export declare function pullProgress(model: PullModel, threshold?: number): number;
|
|
153
|
+
/** `--frost`: 0 at rest, 1 by 24px of scroll. */
|
|
154
|
+
export declare function frostOf(scrollTop: number, range?: number): number;
|
|
155
|
+
export type HeadState = "rest" | "armed" | "fetching" | "held" | "loading" | "finding" | "start" | "error" | "rewritten";
|
|
156
|
+
export interface HeadView {
|
|
157
|
+
readonly state: HeadState;
|
|
158
|
+
/** Text before the figure. */
|
|
159
|
+
readonly lead: string;
|
|
160
|
+
/** The bold segment, or null when the line carries no figure. */
|
|
161
|
+
readonly figure: string | null;
|
|
162
|
+
/** Text after the figure. */
|
|
163
|
+
readonly trail: string;
|
|
164
|
+
/** Draw the retry act inside the line — a text act, never a filled button. */
|
|
165
|
+
readonly retry: boolean;
|
|
166
|
+
readonly bar: boolean;
|
|
167
|
+
/** Inline width for the fill, or null to let the stylesheet drive it. */
|
|
168
|
+
readonly fill: string | null;
|
|
169
|
+
}
|
|
170
|
+
export interface HeadInput {
|
|
171
|
+
readonly earlier: EarlierState;
|
|
172
|
+
/** Rows still above, or null when the session's total is unknown. */
|
|
173
|
+
readonly above: number | null;
|
|
174
|
+
/** The accumulator, 0..1. */
|
|
175
|
+
readonly pull: number;
|
|
176
|
+
/** The clock an anchor search is paging toward, when one is running. */
|
|
177
|
+
readonly finding?: string | null;
|
|
178
|
+
/** `Mon 31 Aug · 23:18:12` — the session's first second, already worded. */
|
|
179
|
+
readonly startLabel?: string | null;
|
|
180
|
+
readonly pageSize?: number;
|
|
181
|
+
}
|
|
182
|
+
export declare function describeHead(input: HeadInput): HeadView;
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/** One backward page. The daemon's limit and the record's figure. */
|
|
2
|
+
export const EARLIER_PAGE_SIZE = 200;
|
|
3
|
+
/** "about two notches or one short flick" — §08. */
|
|
4
|
+
export const PULL_THRESHOLD_PX = 120;
|
|
5
|
+
/** The accumulator decays after half a second of stillness (§08). */
|
|
6
|
+
export const PULL_DECAY_MS = 500;
|
|
7
|
+
/** The receipt's dwell. The record's `land()` clears the pill at 1800ms. */
|
|
8
|
+
export const RECEIPT_MS = 1_800;
|
|
9
|
+
/** `--frost` rises 0 → 1 over the first 24px of scroll (§08, the top fade). */
|
|
10
|
+
export const FROST_RANGE_PX = 24;
|
|
11
|
+
/** Muted, never red — nothing was destroyed. The retry lives in the line. */
|
|
12
|
+
export const EARLIER_FAILED_MESSAGE = "the daemon did not answer";
|
|
13
|
+
/** The protocol's 410, drawn on the data gap's dashed line. */
|
|
14
|
+
export const EARLIER_REWRITTEN_MESSAGE = "rewritten while you read · reloading from the end";
|
|
15
|
+
export function initialEarlierModel() {
|
|
16
|
+
return {
|
|
17
|
+
older: [],
|
|
18
|
+
cursor: undefined,
|
|
19
|
+
held: null,
|
|
20
|
+
heldCursor: undefined,
|
|
21
|
+
heldCount: 0,
|
|
22
|
+
phase: "rest",
|
|
23
|
+
failure: null,
|
|
24
|
+
notice: null,
|
|
25
|
+
landing: null,
|
|
26
|
+
fetchSeq: 0,
|
|
27
|
+
landSeq: 0,
|
|
28
|
+
noticeSeq: 0,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** True when there is provably history above what is loaded. */
|
|
32
|
+
function hasHistoryAbove(model, ctx) {
|
|
33
|
+
// An untried snapshot shorter than one page IS the whole session.
|
|
34
|
+
if (model.cursor === undefined)
|
|
35
|
+
return ctx.tailIds.size >= ctx.pageSize;
|
|
36
|
+
return model.cursor !== null;
|
|
37
|
+
}
|
|
38
|
+
/** The public state, derived — never stored twice. */
|
|
39
|
+
export function earlierState(model, ctx) {
|
|
40
|
+
if (model.phase === "failed") {
|
|
41
|
+
return { kind: "failed", message: model.failure ?? EARLIER_FAILED_MESSAGE };
|
|
42
|
+
}
|
|
43
|
+
if (model.phase === "revealing")
|
|
44
|
+
return { kind: "revealing" };
|
|
45
|
+
if (model.phase === "fetching")
|
|
46
|
+
return { kind: "fetching" };
|
|
47
|
+
if (model.held !== null)
|
|
48
|
+
return { kind: "held", count: model.heldCount };
|
|
49
|
+
return hasHistoryAbove(model, ctx) ? { kind: "idle" } : { kind: "none" };
|
|
50
|
+
}
|
|
51
|
+
/** Rows the page adds that the document does not already have. */
|
|
52
|
+
function freshCount(page, older, ctx) {
|
|
53
|
+
const seen = new Set(ctx.tailIds);
|
|
54
|
+
for (const row of older)
|
|
55
|
+
seen.add(row.timeline_id);
|
|
56
|
+
let fresh = 0;
|
|
57
|
+
for (const row of page) {
|
|
58
|
+
if (seen.has(row.timeline_id))
|
|
59
|
+
continue;
|
|
60
|
+
seen.add(row.timeline_id);
|
|
61
|
+
fresh += 1;
|
|
62
|
+
}
|
|
63
|
+
return fresh;
|
|
64
|
+
}
|
|
65
|
+
/** Prepend a held page and record the receipt. Landing never moves the reader —
|
|
66
|
+
* the hook adjusts scrollTop by the first old row's measured delta. */
|
|
67
|
+
function land(model, page, cursor, ctx) {
|
|
68
|
+
const seq = model.landSeq + 1;
|
|
69
|
+
return {
|
|
70
|
+
...model,
|
|
71
|
+
older: [...page, ...model.older],
|
|
72
|
+
cursor: cursor,
|
|
73
|
+
held: null,
|
|
74
|
+
heldCursor: undefined,
|
|
75
|
+
heldCount: 0,
|
|
76
|
+
phase: "rest",
|
|
77
|
+
failure: null,
|
|
78
|
+
// The daemon answered: the 410 sentence has done its work.
|
|
79
|
+
notice: null,
|
|
80
|
+
landing: { count: freshCount(page, model.older, ctx), seq },
|
|
81
|
+
landSeq: seq,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export function reduceEarlier(model, action, ctx) {
|
|
85
|
+
switch (action.type) {
|
|
86
|
+
case "snapshot": return { ...model, cursor: action.cursor };
|
|
87
|
+
case "reset": {
|
|
88
|
+
// A held page belongs to the session it was fetched for. It never
|
|
89
|
+
// survives the switch, and neither does a stale 410 sentence. Bumping
|
|
90
|
+
// the stamp orphans any answer still in flight.
|
|
91
|
+
const pristine = model.older.length === 0 &&
|
|
92
|
+
model.cursor === undefined &&
|
|
93
|
+
model.held === null &&
|
|
94
|
+
model.phase === "rest" &&
|
|
95
|
+
model.notice === null &&
|
|
96
|
+
model.landing === null;
|
|
97
|
+
if (pristine)
|
|
98
|
+
return model;
|
|
99
|
+
return { ...initialEarlierModel(), fetchSeq: model.fetchSeq + 1 };
|
|
100
|
+
}
|
|
101
|
+
case "hold": {
|
|
102
|
+
if (model.phase === "fetching" || model.phase === "revealing")
|
|
103
|
+
return model;
|
|
104
|
+
if (model.held !== null)
|
|
105
|
+
return model;
|
|
106
|
+
if (!hasHistoryAbove(model, ctx))
|
|
107
|
+
return model;
|
|
108
|
+
return {
|
|
109
|
+
...model,
|
|
110
|
+
phase: "fetching",
|
|
111
|
+
failure: null,
|
|
112
|
+
fetchSeq: model.fetchSeq + 1,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
case "reveal": {
|
|
116
|
+
if (model.held !== null)
|
|
117
|
+
return land(model, model.held, model.heldCursor, ctx);
|
|
118
|
+
// A second pull while one is in flight is ignored, not queued (§08).
|
|
119
|
+
if (model.phase === "fetching")
|
|
120
|
+
return { ...model, phase: "revealing" };
|
|
121
|
+
return model;
|
|
122
|
+
}
|
|
123
|
+
case "page": {
|
|
124
|
+
if (action.seq !== model.fetchSeq)
|
|
125
|
+
return model;
|
|
126
|
+
// The reader already asked: land it the instant it arrives.
|
|
127
|
+
if (model.phase === "revealing") {
|
|
128
|
+
return land(model, action.entries, action.cursor, ctx);
|
|
129
|
+
}
|
|
130
|
+
const fresh = freshCount(action.entries, model.older, ctx);
|
|
131
|
+
if (fresh === 0) {
|
|
132
|
+
// A page that adds nothing is not a page. The head page is exactly
|
|
133
|
+
// this: it repeats the subscription's snapshot to mint a cursor.
|
|
134
|
+
// Settle the cursor and stand down rather than hold empty weight.
|
|
135
|
+
return { ...model, phase: "rest", failure: null, notice: null, cursor: action.cursor };
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
...model,
|
|
139
|
+
phase: "rest",
|
|
140
|
+
failure: null,
|
|
141
|
+
// The daemon answered: the 410 sentence has done its work.
|
|
142
|
+
notice: null,
|
|
143
|
+
held: action.entries,
|
|
144
|
+
heldCursor: action.cursor,
|
|
145
|
+
heldCount: fresh,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
case "fail": {
|
|
149
|
+
if (action.seq !== model.fetchSeq)
|
|
150
|
+
return model;
|
|
151
|
+
return { ...model, phase: "failed", failure: action.message };
|
|
152
|
+
}
|
|
153
|
+
case "expired": {
|
|
154
|
+
if (action.seq !== model.fetchSeq)
|
|
155
|
+
return model;
|
|
156
|
+
// The projection rewrote underneath the reader: drop the paged history
|
|
157
|
+
// and the held page, start again from the head, and say so once.
|
|
158
|
+
const seq = model.noticeSeq + 1;
|
|
159
|
+
return {
|
|
160
|
+
...initialEarlierModel(),
|
|
161
|
+
fetchSeq: model.fetchSeq + 1,
|
|
162
|
+
notice: { kind: "rewritten", message: EARLIER_REWRITTEN_MESSAGE, seq },
|
|
163
|
+
noticeSeq: seq,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
case "clearNotice":
|
|
167
|
+
return model.notice === null ? model : { ...model, notice: null };
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/** Rows still above the loaded document, when the session's total is known.
|
|
171
|
+
* Returns null when it is not — §08: "when it is not, the word stands alone." */
|
|
172
|
+
export function earlierAboveOf(total, loaded) {
|
|
173
|
+
if (total === null || !Number.isFinite(total))
|
|
174
|
+
return null;
|
|
175
|
+
return Math.max(0, Math.trunc(total) - loaded);
|
|
176
|
+
}
|
|
177
|
+
export const initialPull = { travel: 0, at: 0 };
|
|
178
|
+
export function advancePull(model, event, options = {}) {
|
|
179
|
+
const threshold = options.threshold ?? PULL_THRESHOLD_PX;
|
|
180
|
+
const decayMs = options.decayMs ?? PULL_DECAY_MS;
|
|
181
|
+
// Leaving the top spends nothing and banks nothing.
|
|
182
|
+
if (!event.atTop)
|
|
183
|
+
return { model: initialPull, fire: false };
|
|
184
|
+
// Any downward travel resets — a flick past the top is not a pull.
|
|
185
|
+
if (event.travel <= 0)
|
|
186
|
+
return { model: initialPull, fire: false };
|
|
187
|
+
const decayed = event.now - model.at >= decayMs ? 0 : model.travel;
|
|
188
|
+
const travel = Math.min(threshold, decayed + event.travel);
|
|
189
|
+
if (travel >= threshold)
|
|
190
|
+
return { model: initialPull, fire: true };
|
|
191
|
+
return { model: { travel, at: event.now }, fire: false };
|
|
192
|
+
}
|
|
193
|
+
/** The bar's own reading: 0 at rest, 1 the instant before it fires. */
|
|
194
|
+
export function pullProgress(model, threshold = PULL_THRESHOLD_PX) {
|
|
195
|
+
if (threshold <= 0)
|
|
196
|
+
return 0;
|
|
197
|
+
return Math.min(1, Math.max(0, model.travel / threshold));
|
|
198
|
+
}
|
|
199
|
+
/** `--frost`: 0 at rest, 1 by 24px of scroll. */
|
|
200
|
+
export function frostOf(scrollTop, range = FROST_RANGE_PX) {
|
|
201
|
+
if (range <= 0)
|
|
202
|
+
return scrollTop > 0 ? 1 : 0;
|
|
203
|
+
return Math.min(1, Math.max(0, scrollTop / range));
|
|
204
|
+
}
|
|
205
|
+
function figureOf(above) {
|
|
206
|
+
return above === null ? "earlier" : `${above} earlier`;
|
|
207
|
+
}
|
|
208
|
+
export function describeHead(input) {
|
|
209
|
+
const { earlier, above } = input;
|
|
210
|
+
const pull = Math.min(1, Math.max(0, input.pull));
|
|
211
|
+
const pageSize = input.pageSize;
|
|
212
|
+
const finding = input.finding ?? null;
|
|
213
|
+
const startLabel = input.startLabel ?? null;
|
|
214
|
+
// Loading with a reason: a moving document always states its cause.
|
|
215
|
+
if (finding !== null) {
|
|
216
|
+
return {
|
|
217
|
+
state: "finding",
|
|
218
|
+
lead: "finding",
|
|
219
|
+
figure: finding,
|
|
220
|
+
trail: "· loading earlier",
|
|
221
|
+
retry: false,
|
|
222
|
+
bar: true,
|
|
223
|
+
fill: null,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
if (earlier.kind === "failed") {
|
|
227
|
+
return {
|
|
228
|
+
state: "error",
|
|
229
|
+
lead: `${earlier.message} ·`,
|
|
230
|
+
figure: null,
|
|
231
|
+
trail: "",
|
|
232
|
+
retry: true,
|
|
233
|
+
bar: false,
|
|
234
|
+
fill: null,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
// The start is a fact, drawn — and a pull here does nothing.
|
|
238
|
+
if (earlier.kind === "none") {
|
|
239
|
+
return {
|
|
240
|
+
state: "start",
|
|
241
|
+
lead: startLabel === null ? "session start" : "session start ·",
|
|
242
|
+
figure: startLabel,
|
|
243
|
+
trail: "",
|
|
244
|
+
retry: false,
|
|
245
|
+
bar: false,
|
|
246
|
+
fill: null,
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
if (earlier.kind === "revealing") {
|
|
250
|
+
return {
|
|
251
|
+
state: "loading",
|
|
252
|
+
lead: "loading",
|
|
253
|
+
figure: pageSize === undefined ? "earlier" : `${pageSize} earlier`,
|
|
254
|
+
trail: "",
|
|
255
|
+
retry: false,
|
|
256
|
+
bar: true,
|
|
257
|
+
fill: null,
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
if (pull > 0) {
|
|
261
|
+
// Held weight is spent by the pull; unheld weight is gathered by it.
|
|
262
|
+
const held = earlier.kind === "held";
|
|
263
|
+
const percent = Math.round(held ? 100 - 100 * pull : 100 * pull);
|
|
264
|
+
return {
|
|
265
|
+
state: "armed",
|
|
266
|
+
lead: "",
|
|
267
|
+
figure: figureOf(above),
|
|
268
|
+
trail: "· keep going",
|
|
269
|
+
retry: false,
|
|
270
|
+
bar: true,
|
|
271
|
+
fill: `${percent}%`,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
if (earlier.kind === "fetching") {
|
|
275
|
+
return {
|
|
276
|
+
state: "fetching",
|
|
277
|
+
lead: "",
|
|
278
|
+
figure: figureOf(above),
|
|
279
|
+
trail: "· pull to load",
|
|
280
|
+
retry: false,
|
|
281
|
+
bar: true,
|
|
282
|
+
fill: null,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
if (earlier.kind === "held") {
|
|
286
|
+
return {
|
|
287
|
+
state: "held",
|
|
288
|
+
lead: "",
|
|
289
|
+
figure: figureOf(above),
|
|
290
|
+
trail: "· pull to load",
|
|
291
|
+
retry: false,
|
|
292
|
+
bar: true,
|
|
293
|
+
fill: null,
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
return {
|
|
297
|
+
state: "rest",
|
|
298
|
+
lead: "",
|
|
299
|
+
figure: figureOf(above),
|
|
300
|
+
trail: "· pull to load",
|
|
301
|
+
retry: false,
|
|
302
|
+
bar: true,
|
|
303
|
+
fill: "0",
|
|
304
|
+
};
|
|
305
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TimelineEntry, TimelinePage } from "@vibefield/rosetta-protocol";
|
|
2
|
+
export declare function isPrimaryMessage(row: TimelineEntry): boolean;
|
|
3
|
+
/** A primary message is a safe start. If a bounded read contains only activity,
|
|
4
|
+
* show that activity honestly as incomplete rather than hiding the whole page. */
|
|
5
|
+
export declare function conversationStart(rows: readonly TimelineEntry[], hasEarlier: boolean): number | null;
|
|
6
|
+
/** Read enough for a useful conversation section, with a hard work bound for
|
|
7
|
+
* enormous tool/team runs. Each result is still held until the reader reveals it. */
|
|
8
|
+
export declare function readConversationPage(fetchPage: (cursor: string, limit: number) => Promise<TimelinePage>, cursor: string, pageSize?: number): Promise<TimelinePage>;
|
|
9
|
+
/** A shared event may enter only a covered gap in the parent chronology. An
|
|
10
|
+
* exact search anchor does not claim coverage of the missing rows beside it.
|
|
11
|
+
* Undated events wait for complete history because no partial window can place
|
|
12
|
+
* them reliably. Native parent order and delivery-id ownership remain intact. */
|
|
13
|
+
export declare function withinHistoryWindow(at: number | null, parents: readonly TimelineEntry[], hasEarlier: boolean): boolean;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { readAttachments } from "./turns.js";
|
|
2
|
+
import { canonicalText } from "./vocabulary.js";
|
|
3
|
+
export function isPrimaryMessage(row) {
|
|
4
|
+
if (row.body.type === "user")
|
|
5
|
+
return row.group.kind !== "parent_invocation";
|
|
6
|
+
if (row.body.type !== "agent")
|
|
7
|
+
return false;
|
|
8
|
+
const { text, attachments } = readAttachments(row.body.text === null ? null : canonicalText(row.body.text), row.body.attachments);
|
|
9
|
+
return text !== null || attachments.length > 0 || row.body.citations.length > 0;
|
|
10
|
+
}
|
|
11
|
+
/** A primary message is a safe start. If a bounded read contains only activity,
|
|
12
|
+
* show that activity honestly as incomplete rather than hiding the whole page. */
|
|
13
|
+
export function conversationStart(rows, hasEarlier) {
|
|
14
|
+
return (hasEarlier ? rows.find(isPrimaryMessage) ?? rows[0] : rows[0])?.ordinal ?? null;
|
|
15
|
+
}
|
|
16
|
+
/** Read enough for a useful conversation section, with a hard work bound for
|
|
17
|
+
* enormous tool/team runs. Each result is still held until the reader reveals it. */
|
|
18
|
+
export async function readConversationPage(fetchPage, cursor, pageSize = 200) {
|
|
19
|
+
const rows = new Map();
|
|
20
|
+
let next = cursor;
|
|
21
|
+
let watermark = "";
|
|
22
|
+
for (let pages = 0; pages < 5 && next !== null; pages += 1) {
|
|
23
|
+
const previous = next;
|
|
24
|
+
const page = await fetchPage(next, pageSize);
|
|
25
|
+
watermark = page.watermark;
|
|
26
|
+
for (const row of page.entries)
|
|
27
|
+
rows.set(row.timeline_id, row);
|
|
28
|
+
next = page.cursor;
|
|
29
|
+
if (next === previous)
|
|
30
|
+
throw new Error("History cursor did not advance");
|
|
31
|
+
if ([...rows.values()].filter(isPrimaryMessage).length >= 6)
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
return { entries: [...rows.values()].sort((a, b) => a.ordinal - b.ordinal), cursor: next, watermark };
|
|
35
|
+
}
|
|
36
|
+
/** A shared event may enter only a covered gap in the parent chronology. An
|
|
37
|
+
* exact search anchor does not claim coverage of the missing rows beside it.
|
|
38
|
+
* Undated events wait for complete history because no partial window can place
|
|
39
|
+
* them reliably. Native parent order and delivery-id ownership remain intact. */
|
|
40
|
+
export function withinHistoryWindow(at, parents, hasEarlier) {
|
|
41
|
+
if (parents.length === 0)
|
|
42
|
+
return !hasEarlier;
|
|
43
|
+
const hasGaps = parents.some((row, i) => i > 0 && row.ordinal > parents[i - 1].ordinal + 1);
|
|
44
|
+
if (at === null)
|
|
45
|
+
return !hasEarlier && !hasGaps;
|
|
46
|
+
const firstAt = parents.find(row => row.at !== null)?.at;
|
|
47
|
+
if (hasEarlier && (firstAt == null || at < firstAt))
|
|
48
|
+
return false;
|
|
49
|
+
const before = parents.findIndex(row => row.at !== null && row.at > at);
|
|
50
|
+
return before <= 0 || parents[before].ordinal === parents[before - 1].ordinal + 1 ||
|
|
51
|
+
at === parents[before - 1].at;
|
|
52
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TimelineEntry } from "@vibefield/rosetta-protocol";
|
|
2
|
+
import type { AttachmentFact, LedgerMember } from "./turns.js";
|
|
3
|
+
/** Keep occurrences in transcript order, including repeated reads of one image. */
|
|
4
|
+
export declare function activityImages(members: readonly LedgerMember[]): AttachmentFact[];
|
|
5
|
+
/** Attachment ids belong to a message, not to the whole transcript. */
|
|
6
|
+
export declare function messageAttachments(row: TimelineEntry): AttachmentFact[];
|
|
7
|
+
/** One rail for every image occurrence in the run, regardless of row type. */
|
|
8
|
+
export declare function timelineImages(rows: readonly TimelineEntry[]): AttachmentFact[];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { projectAction } from "./families.js";
|
|
2
|
+
import { readAttachments } from "./turns.js";
|
|
3
|
+
import { resourceLabel, splitPath } from "./vocabulary.js";
|
|
4
|
+
import { isOptimizedImageAsset } from "../image-media.js";
|
|
5
|
+
function resourcePath(resource) {
|
|
6
|
+
const label = resourceLabel(resource);
|
|
7
|
+
return { label, ...splitPath(label), resource };
|
|
8
|
+
}
|
|
9
|
+
function rowImages(row) {
|
|
10
|
+
if (row.body.type !== "tool_use")
|
|
11
|
+
return [];
|
|
12
|
+
const { action, native } = row.body.tool;
|
|
13
|
+
const recorded = messageAttachments(row).filter(fact => fact.kind === "image");
|
|
14
|
+
if (!["artifact", "workflow", "structured_output", "external"].includes(action.type))
|
|
15
|
+
return recorded;
|
|
16
|
+
const detail = projectAction(action, native, {}, { sessionId: row.session_id, timelineId: row.timeline_id }).detail;
|
|
17
|
+
const paths = detail.kind === "paths" ? detail.paths
|
|
18
|
+
: detail.kind === "workflow" ? [detail.workflow.script, ...detail.workflow.resources].filter((path) => path !== null)
|
|
19
|
+
: detail.kind === "fields" ? detail.resources
|
|
20
|
+
: detail.kind === "document" && detail.document.type === "inline" ? detail.document.resources.map(resourcePath)
|
|
21
|
+
: [];
|
|
22
|
+
return [...recorded, ...paths.flatMap((path, index) => {
|
|
23
|
+
const resource = path.resource;
|
|
24
|
+
if (resource.type !== "asset" || !isOptimizedImageAsset(resource.asset))
|
|
25
|
+
return [];
|
|
26
|
+
const asset = resource.asset;
|
|
27
|
+
const key = `${row.session_id}:${row.timeline_id}:resource:${index}`;
|
|
28
|
+
const ref = {
|
|
29
|
+
id: key, kind: "image", label: null, name: path.name || null,
|
|
30
|
+
media_type: asset.media_type, byte_len: asset.byte_len, dimensions: null, message_ranges: [],
|
|
31
|
+
source: { type: "asset", asset },
|
|
32
|
+
};
|
|
33
|
+
return readAttachments(null, [ref]).attachments;
|
|
34
|
+
})];
|
|
35
|
+
}
|
|
36
|
+
/** Keep occurrences in transcript order, including repeated reads of one image. */
|
|
37
|
+
export function activityImages(members) {
|
|
38
|
+
return members.flatMap(member => member.kind === "line" ? member.line.rows.flatMap(rowImages) : []);
|
|
39
|
+
}
|
|
40
|
+
/** Attachment ids belong to a message, not to the whole transcript. */
|
|
41
|
+
export function messageAttachments(row) {
|
|
42
|
+
const refs = row.body.type === "user" || row.body.type === "agent" ? row.body.attachments
|
|
43
|
+
: row.body.type === "tool_use" ? row.body.tool.attachments ?? []
|
|
44
|
+
: row.body.type === "collaboration" ? row.body.event.attachments ?? [] : [];
|
|
45
|
+
return readAttachments(null, refs).attachments.map(fact => ({
|
|
46
|
+
...fact, key: `${row.session_id}:${row.timeline_id}:attachment:${fact.key}`,
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
/** One rail for every image occurrence in the run, regardless of row type. */
|
|
50
|
+
export function timelineImages(rows) {
|
|
51
|
+
const seen = new Set();
|
|
52
|
+
return rows.flatMap(row => {
|
|
53
|
+
const identity = JSON.stringify([row.session_id, row.timeline_id]);
|
|
54
|
+
if (seen.has(identity))
|
|
55
|
+
return [];
|
|
56
|
+
seen.add(identity);
|
|
57
|
+
return row.body.type === "tool_use" ? rowImages(row)
|
|
58
|
+
: messageAttachments(row).filter(fact => fact.kind === "image");
|
|
59
|
+
});
|
|
60
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type { LedgerClass, LedgerContext, LedgerGlyph, ObjectPart, ObjectTone, ToolFamily, } from "./vocabulary.js";
|
|
2
|
+
export { FAMILY_CLASS, FAMILY_GLYPH, FAMILY_NOUN, FOLD_NOUN, attachmentLabel, basename, canonicalText, citationLabel, familyNoun, firstLine, noticeText, objectText, pathParts, resourceDisplay, resourceLabel, shortenPath, spanText, splitPath, urlHost, } from "./vocabulary.js";
|
|
3
|
+
export type { CommandFact, CommandDirectoryContext, DelegateFact, DetailKind, Diffstat, FamilyProjection, FetchFact, LedgerDetail, PathFact, SourceFact, TaskChange, WorkflowAction, WorkflowFact, } from "./families.js";
|
|
4
|
+
export { COMMAND_PREVIEW_CHARACTER_LIMIT, TASK_PREVIEW_LIMIT, commandDirectoryContext, commandPreviewText, diffstatText, projectAction, taskDisplayRows, } from "./families.js";
|
|
5
|
+
export type { LedgerLine, LedgerState, ResultTone, RunNoun, RunOther, RunSummary, } from "./ledger.js";
|
|
6
|
+
export { FOLD_NAME_LIMIT, RUN_FOLD_THRESHOLD, commandName, ledgerLine, ledgerLines, linkedChildSessionIds, runSummary, } from "./ledger.js";
|
|
7
|
+
export type { AttachmentFact, DocumentOptions, LedgerMember, LocalSetting, Prompt, ResponseHead, Segment, Turn, } from "./turns.js";
|
|
8
|
+
export { documentTurns, attachmentMentions, localSetting, readAttachments } from "./turns.js";
|
|
9
|
+
export type { DayEntry, Sitting } from "./sittings.js";
|
|
10
|
+
export { PROMPT_CLUSTER_MS, SITTING_PAUSE_MS, calendarDayKey, dayList, sittingCount, sittingDayLabel, sittings, withinPromptCluster, } from "./sittings.js";
|
|
11
|
+
export type { CollaborationStamp, CollaborationTimeBasis, RuntimeProfile, RuntimeProfileBasis, TeamMemberOperation, TeamMemberPresentation, TeamParticipantPresentation, TeamReportWork, TeamChronology, WorkerThreadLinks, } from "./collaboration.js";
|
|
12
|
+
export { isWorkflowOwnedSession, standaloneWorkerSessions, } from "./collaboration.js";
|
|
13
|
+
export type { WorkflowAttemptFact, WorkflowAttemptIndex, WorkflowRuntimeFact, } from "./workflow.js";
|
|
14
|
+
export { workflowAttemptIndex, workflowAttemptsFor, workflowRuntime, workflowWorkerState, } from "./workflow.js";
|
|
15
|
+
export { collaborationStamp, interleaveTeamCollaboration, participantPresentation, runtimeProfile, teamMemberPresentations, teamChronology, teamParticipants, taskBoundedReportWork, teamSessionIds, workerThreadLinks, } from "./collaboration.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { FAMILY_CLASS, FAMILY_GLYPH, FAMILY_NOUN, FOLD_NOUN, attachmentLabel, basename, canonicalText, citationLabel, familyNoun, firstLine, noticeText, objectText, pathParts, resourceDisplay, resourceLabel, shortenPath, spanText, splitPath, urlHost, } from "./vocabulary.js";
|
|
2
|
+
export { COMMAND_PREVIEW_CHARACTER_LIMIT, TASK_PREVIEW_LIMIT, commandDirectoryContext, commandPreviewText, diffstatText, projectAction, taskDisplayRows, } from "./families.js";
|
|
3
|
+
export { FOLD_NAME_LIMIT, RUN_FOLD_THRESHOLD, commandName, ledgerLine, ledgerLines, linkedChildSessionIds, runSummary, } from "./ledger.js";
|
|
4
|
+
export { documentTurns, attachmentMentions, localSetting, readAttachments } from "./turns.js";
|
|
5
|
+
export { PROMPT_CLUSTER_MS, SITTING_PAUSE_MS, calendarDayKey, dayList, sittingCount, sittingDayLabel, sittings, withinPromptCluster, } from "./sittings.js";
|
|
6
|
+
export { isWorkflowOwnedSession, standaloneWorkerSessions, } from "./collaboration.js";
|
|
7
|
+
export { workflowAttemptIndex, workflowAttemptsFor, workflowRuntime, workflowWorkerState, } from "./workflow.js";
|
|
8
|
+
export { collaborationStamp, interleaveTeamCollaboration, participantPresentation, runtimeProfile, teamMemberPresentations, teamChronology, teamParticipants, taskBoundedReportWork, teamSessionIds, workerThreadLinks, } from "./collaboration.js";
|