@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,292 @@
|
|
|
1
|
+
import { advanceActivityOrder } from "../lib/activity-order.js";
|
|
2
|
+
import { buildProjectViewModel, getActivityGridStartTimestamp, getCalendarDayKey } from "../lib/model.js";
|
|
3
|
+
import { createTintDealer } from "../lib/tint.js";
|
|
4
|
+
const MINUTE = 60_000;
|
|
5
|
+
const HOUR = 60 * MINUTE;
|
|
6
|
+
const DAY = 24 * HOUR;
|
|
7
|
+
/* ── the rows ───────────────────────────────────────────────────────────── */
|
|
8
|
+
const RUNTIMES = [["claude", "claude-code"], ["codex", "codex"]];
|
|
9
|
+
/** [name, lifetime cost in USD, a scale for its daily tokens]. */
|
|
10
|
+
const PROJECTS = [
|
|
11
|
+
["vibe-field", 2840, 1_700_000],
|
|
12
|
+
["rosetta", 1120, 850_000],
|
|
13
|
+
["puppeteer", 760, 566_000],
|
|
14
|
+
["infinite-canvas-engine", 690, 425_000],
|
|
15
|
+
["ghosttea", 310, 340_000],
|
|
16
|
+
["truffle", 120, 283_000],
|
|
17
|
+
];
|
|
18
|
+
/** [project, title, hours ago, runtime, tokens, messages, cost in USD]. */
|
|
19
|
+
const SESSIONS = [
|
|
20
|
+
[0, "One frame for four views", 0.4, "claude", 8.2e6, 184, 21.4],
|
|
21
|
+
[0, "Godview's deck as a sheet", 2.2, "claude", 21e6, 512, 58.9],
|
|
22
|
+
[0, "DS landing fix-ups", 5.5, "codex", 4.1e6, 96, 9.8],
|
|
23
|
+
[0, "Spawn bloom review", 8.1, "claude", 13e6, 330, 33.1],
|
|
24
|
+
[0, "Chrome on the mat", 25, "claude", 18e6, 421, 47.5],
|
|
25
|
+
[0, "Edge tray notch and drawer", 28, "claude", 9.6e6, 207, 24.2],
|
|
26
|
+
[0, "Mesh board reader backoff", 31, "codex", 3.3e6, 75, 7.9],
|
|
27
|
+
[0, "Session glyphs, pass two", 34, "claude", 6.1e6, 140, 15.6],
|
|
28
|
+
[1, "The room as a package", 1.5, "claude", 5.2e6, 120, 13.0],
|
|
29
|
+
[1, "Grants on the direct plane", 50, "codex", 2.8e6, 64, 6.1],
|
|
30
|
+
[2, "Views behind injected ports", 72, "claude", 4.4e6, 98, 11.2],
|
|
31
|
+
];
|
|
32
|
+
const PROVENANCE = { agent_version: null, src_cursor: null, src_offset: null };
|
|
33
|
+
const NO_USAGE = {
|
|
34
|
+
input: null, output: null, cache_read: null, cache_write: null, thinking: null, cache_write_1h: null,
|
|
35
|
+
web_searches: null, service_tier: null, route: null, billed_pico_usd: null, scope: "request", requests: null,
|
|
36
|
+
};
|
|
37
|
+
/** A 64-hex digest, the same for the same seed (FNV-1a over the whole seed,
|
|
38
|
+
* eight rounds). Not a content hash: the demo's members have no bytes. */
|
|
39
|
+
function digestOf(seed) {
|
|
40
|
+
let hex = "";
|
|
41
|
+
for (let round = 0; hex.length < 64; round += 1) {
|
|
42
|
+
let hash = (0x811c9dc5 ^ round) >>> 0;
|
|
43
|
+
for (let i = 0; i < seed.length; i += 1) {
|
|
44
|
+
hash ^= seed.charCodeAt(i);
|
|
45
|
+
hash = Math.imul(hash, 0x01000193) >>> 0;
|
|
46
|
+
}
|
|
47
|
+
hex += hash.toString(16).padStart(8, "0");
|
|
48
|
+
}
|
|
49
|
+
return hex.slice(0, 64);
|
|
50
|
+
}
|
|
51
|
+
function member(seed) {
|
|
52
|
+
const digest = digestOf(seed);
|
|
53
|
+
return { url: `/api/assets/${digest}.webp`, digest, media_type: "image/webp", byte_len: 2048 };
|
|
54
|
+
}
|
|
55
|
+
/** An optimized image the room will draw: a member and its four renditions. */
|
|
56
|
+
function image(id, seed, name, width, height) {
|
|
57
|
+
const full = member(seed);
|
|
58
|
+
return {
|
|
59
|
+
id, kind: "image", label: `[Image #${id}]`, name, media_type: "image/webp", byte_len: full.byte_len,
|
|
60
|
+
source: { type: "asset", asset: { ...full, image_variants: {
|
|
61
|
+
rail: member(`${seed}:rail`), tile: member(`${seed}:tile`), tile2x: member(`${seed}:tile2x`), preview: member(`${seed}:preview`),
|
|
62
|
+
} } },
|
|
63
|
+
dimensions: { width, height }, message_ranges: [],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function transcript(sessionId, startedAt) {
|
|
67
|
+
const rows = [];
|
|
68
|
+
const add = (body, kind, model = null) => {
|
|
69
|
+
const ordinal = rows.length + 1;
|
|
70
|
+
rows.push({
|
|
71
|
+
timeline_id: `${sessionId}-t${ordinal}`, session_id: sessionId, ordinal,
|
|
72
|
+
group: { id: `${sessionId}-g${ordinal}`, kind, derivation: "native" },
|
|
73
|
+
response: null, block_index: null, native_id: null, parent_native_id: null,
|
|
74
|
+
at: startedAt + ordinal * 40_000, model, effort: null, body, parent_tool_native_id: null,
|
|
75
|
+
usage: NO_USAGE, provenance: PROVENANCE,
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
rows,
|
|
80
|
+
user: (text, attachments = []) => add({ type: "user", text: { type: "inline", text }, attachments }, "human_turn"),
|
|
81
|
+
agent: (text) => add({ type: "agent", text: { type: "inline", text }, attachments: [], citations: [] }, "agent_cycle", "claude-opus-5-5"),
|
|
82
|
+
tool: (name, action, status = "succeeded") => add({ type: "tool_use", tool: {
|
|
83
|
+
correlation: { key: `${sessionId}-k${rows.length + 1}`, derivation: "native_id" },
|
|
84
|
+
native: { id: null, namespace: null, name, provider: null },
|
|
85
|
+
status: { value: status, basis: "native_state" },
|
|
86
|
+
action, attachments: [], failure: null, timing: null,
|
|
87
|
+
} }, "agent_cycle"),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
const read = (path) => ({
|
|
91
|
+
type: "file_read", targets: [{ resource: { type: "file", path, resolved: true }, range: null, media_kind: null }],
|
|
92
|
+
outcome: { truncated: false },
|
|
93
|
+
});
|
|
94
|
+
const shell = (command, finished = true) => ({
|
|
95
|
+
type: "shell", command: { type: "inline", text: command }, source_truncated: false, cwd: null, timeout_ms: null,
|
|
96
|
+
background: false, outcome: finished ? { exit_code: 0, signal: null, process_id: null } : null,
|
|
97
|
+
});
|
|
98
|
+
/* ── the demo ───────────────────────────────────────────────────────────── */
|
|
99
|
+
export function createRoomDemo(now = Date.now()) {
|
|
100
|
+
const runtimes = RUNTIMES.map(([id, kind]) => ({
|
|
101
|
+
id, kind, data_root: `~/.${id}`, enabled: true, account: null, config: null, skills: null,
|
|
102
|
+
versions_seen: null, discovered_at: now - 400 * DAY,
|
|
103
|
+
}));
|
|
104
|
+
const projects = PROJECTS.map(([name], i) => ({
|
|
105
|
+
id: `p${i}`, name, root_paths: [`/Users/demo/Projects/${name}`], git_repo: i < 4 ? `github.com/demo/${name}` : null,
|
|
106
|
+
}));
|
|
107
|
+
const sessions = SESSIONS.map(([project, title, hoursAgo, runtime], i) => {
|
|
108
|
+
const last = now - hoursAgo * HOUR;
|
|
109
|
+
return {
|
|
110
|
+
id: `s${i}`, native_session_id: `native-${runtime}-${i}`, runtime_id: runtime, project_id: `p${project}`,
|
|
111
|
+
cwd: `/Users/demo/Projects/${PROJECTS[project][0]}`, parent_session_id: null, delegation: null,
|
|
112
|
+
root_session_id: `s${i}`, role: "main", title, summary: null, started_at: last - 50 * MINUTE,
|
|
113
|
+
updated_at: last, activity: { first_at: last - 50 * MINUTE, last_at: last }, stream_state: "indexed",
|
|
114
|
+
};
|
|
115
|
+
});
|
|
116
|
+
// The figures: a year of days, quiet long ago and busy lately, per project.
|
|
117
|
+
const start = getActivityGridStartTimestamp(now);
|
|
118
|
+
const stats = new Map();
|
|
119
|
+
const usage = new Map();
|
|
120
|
+
PROJECTS.forEach(([, usd, scale], i) => {
|
|
121
|
+
const heat = [];
|
|
122
|
+
for (let d = 0, at = start; at <= now; d += 1, at += DAY) {
|
|
123
|
+
const seed = i * 3 + 1;
|
|
124
|
+
const tokens = Math.round(at > now - 40 * DAY ? ((d * 7 + seed) % 5 === 0 ? 0 : (8 + ((d * 13 + seed) % 23)) * scale)
|
|
125
|
+
: at > now - 120 * DAY ? ((d + seed) % 3 === 0 ? (2 + ((d * 5 + seed) % 9)) * scale * 0.6 : 0)
|
|
126
|
+
: (d + seed) % 11 === 0 ? (1 + (d % 5)) * scale * 0.3 : 0);
|
|
127
|
+
heat.push({ day: getCalendarDayKey(at + DAY / 2), tokens, cost_micro_usd: Math.round(tokens * 2.4),
|
|
128
|
+
billed_micro_usd: null, unpriced_tokens: 0, unrecorded_output: 0, reported_cost_adjustment_micro_usd: 0 });
|
|
129
|
+
}
|
|
130
|
+
const contribution = SESSIONS.flatMap(([project, , , , tokens, messages, cost], s) => project !== i ? [] : [{ session_id: `s${s}`, project_id: `p${i}`, tokens, commits: 0, edits: 0, loc: 0, messages,
|
|
131
|
+
cost_micro_usd: Math.round(cost * 1e6), billed_micro_usd: null, unpriced_tokens: 0, unrecorded_output: 0,
|
|
132
|
+
reported_cost_adjustment_micro_usd: 0 }]);
|
|
133
|
+
stats.set(`p${i}`, { heat, contribution });
|
|
134
|
+
const spend = (tokens) => ({ cost_micro_usd: Math.round(tokens * 2.4), billed_micro_usd: null,
|
|
135
|
+
unpriced_tokens: 0, unrecorded_output: 0, reported_cost_adjustment_micro_usd: 0 });
|
|
136
|
+
const models = heat.filter((day) => day.tokens > 0).slice(-30).flatMap((day, k) => [
|
|
137
|
+
{ day: day.day, model: "claude-opus-5-5", tokens: Math.round(day.tokens * 0.7), ...spend(day.tokens * 0.7) },
|
|
138
|
+
{ day: day.day, model: k % 3 === 0 ? "gpt-5.4" : "claude-sonnet-4-5", tokens: Math.round(day.tokens * 0.3), ...spend(day.tokens * 0.3) },
|
|
139
|
+
]);
|
|
140
|
+
const hours = [1, 10, 15, 16, 23].map((hour, k) => {
|
|
141
|
+
const tokens = Math.round((k + 2) * 4e6 * (usd / 2840));
|
|
142
|
+
return { hour, tokens, ...spend(tokens) };
|
|
143
|
+
});
|
|
144
|
+
usage.set(`p${i}`, { models, hours });
|
|
145
|
+
});
|
|
146
|
+
// Two transcripts: the conversation first, its activity one press away.
|
|
147
|
+
const timelines = new Map();
|
|
148
|
+
const one = transcript("s0", sessions[0].started_at);
|
|
149
|
+
one.user("Port the latest Godview look and rosetta's History view into the four-views frame, and fix the old flaws while we're there: the keys in the file pill, and the two plus buttons in the composer line.", [image("1", "frame-before", "frame-before.png", 1440, 900), image("2", "frame-after", "frame-after.png", 900, 1200)]);
|
|
150
|
+
one.agent("I'll read DESIGN.md and the composer record first, then capture Godview from the catalog and History from rosetta's own components, so the page shows each view as it really looks.");
|
|
151
|
+
one.tool("Read", read("DESIGN.md"));
|
|
152
|
+
one.tool("Read", read("draft/composer/compact.md"));
|
|
153
|
+
one.tool("WebSearch", { type: "web_search", query: "react context injected ports", allowed_domains: [], blocked_domains: [], outcome: { sources: [
|
|
154
|
+
{ url: "https://github.com/facebook/react", title: "facebook/react" },
|
|
155
|
+
{ url: "https://developer.mozilla.org/en-US/docs/Web/API", title: "Web APIs | MDN" },
|
|
156
|
+
], total_count: 2 } });
|
|
157
|
+
one.tool("Bash", shell("pnpm exec vite --mode design"));
|
|
158
|
+
one.tool("Bash", shell("node capture.mjs --view godview --theme dark"));
|
|
159
|
+
one.agent("The frame has five places: the head, the line, the two edges and the corner. Every view keeps its interior. When you switch views, only the head's contents and the stage change.");
|
|
160
|
+
one.user("Show me the line with one plus.");
|
|
161
|
+
one.agent("The attach button retires. @ puts anything into the message, agents and things alike, and the clipboard notch stays the store. The create act is the view's own, and only Canvas draws it as a plus.");
|
|
162
|
+
one.tool("Bash", shell("node verify.mjs --states all", false), "running");
|
|
163
|
+
timelines.set("s0", one.rows);
|
|
164
|
+
const two = transcript("s8", sessions[8].started_at);
|
|
165
|
+
two.user("Extract the room into a package that dials nothing.");
|
|
166
|
+
two.agent("The room reads four ports now: the catalog, one session's body, the desktop and the asset source.");
|
|
167
|
+
two.agent("rosetta's own app is the first host, over its one client.");
|
|
168
|
+
timelines.set("s8", two.rows);
|
|
169
|
+
const status = {
|
|
170
|
+
canonicalReady: true, searchReadiness: "ready", searchProgress: null,
|
|
171
|
+
ingest: { phase: "live", runtimes: [], projects: [] }, startedAt: now - 6 * HOUR, uptimeMs: 6 * HOUR,
|
|
172
|
+
};
|
|
173
|
+
return { now, meta: { runtimes, projects, sessions }, status, stats, usage, timelines };
|
|
174
|
+
}
|
|
175
|
+
/* ── its ports ──────────────────────────────────────────────────────────── */
|
|
176
|
+
const EMPTY_META = { tasks: [], workflows: [], plans: [], artifacts: [] };
|
|
177
|
+
function textOf(row) {
|
|
178
|
+
return (row.body.type === "user" || row.body.type === "agent") && row.body.text?.type === "inline" ? row.body.text.text : "";
|
|
179
|
+
}
|
|
180
|
+
/** A tile drawn from the digest, so each image has its own colour. */
|
|
181
|
+
function placeholderSvg(digest) {
|
|
182
|
+
const hue = Number.parseInt(digest.slice(0, 2), 16) * 1.4;
|
|
183
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 10"><rect width="16" height="10" fill="hsl(${hue.toFixed(0)} 55% 55%)"/><circle cx="11" cy="3.5" r="1.6" fill="hsl(${hue.toFixed(0)} 60% 85%)"/><path d="M0 10 6 4l4 4 2-2 4 4z" fill="hsl(${hue.toFixed(0)} 45% 35%)"/></svg>`;
|
|
184
|
+
}
|
|
185
|
+
/** The demo's addresses: every stored image is a drawn tile, inline. */
|
|
186
|
+
export function demoAssets() {
|
|
187
|
+
return {
|
|
188
|
+
imageAssetUrl: (asset) => `data:image/svg+xml,${encodeURIComponent(placeholderSvg(asset.digest))}`,
|
|
189
|
+
attachmentAssetUrl: (asset) => asset.url,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function demoSessionClient(demo) {
|
|
193
|
+
const rowsOf = (sessionId) => demo.timelines.get(sessionId) ?? [];
|
|
194
|
+
const never = () => Promise.reject(new Error("The demo keeps no recorded file"));
|
|
195
|
+
return {
|
|
196
|
+
subscribeSession(sessionId, handlers) {
|
|
197
|
+
const rows = [...rowsOf(sessionId)];
|
|
198
|
+
let open = true;
|
|
199
|
+
queueMicrotask(() => {
|
|
200
|
+
if (!open)
|
|
201
|
+
return;
|
|
202
|
+
handlers.onStatus?.("live");
|
|
203
|
+
handlers.onSnapshot?.({ entries: rows, cursor: null, watermark: "1" });
|
|
204
|
+
handlers.onChange?.(rows);
|
|
205
|
+
handlers.onTimelineMetaChange?.(EMPTY_META);
|
|
206
|
+
});
|
|
207
|
+
return {
|
|
208
|
+
entries: () => rows,
|
|
209
|
+
fetchPage: async () => ({ entries: [], cursor: null, watermark: "1" }),
|
|
210
|
+
reveal: () => { },
|
|
211
|
+
loadEntry: async (timelineId) => rows.some((row) => row.timeline_id === timelineId),
|
|
212
|
+
close: () => {
|
|
213
|
+
open = false;
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
},
|
|
217
|
+
subscribeCollaboration: () => ({ close() { }, restart() { } }),
|
|
218
|
+
timelineEntry: async (sessionId, timelineId) => {
|
|
219
|
+
const row = rowsOf(sessionId).find((entry) => entry.timeline_id === timelineId);
|
|
220
|
+
if (row === undefined)
|
|
221
|
+
throw new Error("That message is not in the demo");
|
|
222
|
+
return row;
|
|
223
|
+
},
|
|
224
|
+
reportWork: async () => [],
|
|
225
|
+
command: async () => ({ command: "" }),
|
|
226
|
+
readFileTarget: never,
|
|
227
|
+
readPlan: never,
|
|
228
|
+
readTextAsset: never,
|
|
229
|
+
readAsset: async (asset) => new TextEncoder().encode(placeholderSvg(asset.digest)),
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
/** The demo's catalog: rows on subscribe, figures by project, and a search
|
|
233
|
+
* over the demo's own words. No boost: nothing here is still queued. */
|
|
234
|
+
function demoCatalog(demo) {
|
|
235
|
+
return {
|
|
236
|
+
subscribeMeta(handlers) {
|
|
237
|
+
let open = true;
|
|
238
|
+
queueMicrotask(() => {
|
|
239
|
+
if (!open)
|
|
240
|
+
return;
|
|
241
|
+
handlers.onStatus?.("live");
|
|
242
|
+
handlers.onChange?.(demo.meta, "snapshot");
|
|
243
|
+
});
|
|
244
|
+
return {
|
|
245
|
+
close: () => {
|
|
246
|
+
open = false;
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
},
|
|
250
|
+
status: async () => demo.status,
|
|
251
|
+
projectStats: async (projectId) => demo.stats.get(projectId) ?? { heat: [], contribution: [] },
|
|
252
|
+
usage: async (projectId) => demo.usage.get(projectId) ?? { models: [], hours: [] },
|
|
253
|
+
dayUsage: async (projectId, day) => ({
|
|
254
|
+
day,
|
|
255
|
+
models: (demo.usage.get(projectId)?.models ?? []).filter((model) => model.day === day).flatMap((model) => [9, 14, 16, 22].map((hour) => ({ hour, model: model.model, tokens: Math.round(model.tokens / 4) }))),
|
|
256
|
+
}),
|
|
257
|
+
search: async (request) => {
|
|
258
|
+
const q = request.q.trim().toLowerCase();
|
|
259
|
+
const hits = [];
|
|
260
|
+
for (const [sessionId, rows] of demo.timelines) {
|
|
261
|
+
for (const row of rows) {
|
|
262
|
+
const text = textOf(row);
|
|
263
|
+
const at = text.toLowerCase().indexOf(q);
|
|
264
|
+
if (q === "" || at < 0 || hits.length >= request.limit)
|
|
265
|
+
continue;
|
|
266
|
+
hits.push({ timeline_id: row.timeline_id, session_id: sessionId, kind: row.body.type, at: row.at,
|
|
267
|
+
snippet: `${text.slice(Math.max(0, at - 40), at)}[${text.slice(at, at + q.length)}]${text.slice(at + q.length, at + q.length + 60)}`,
|
|
268
|
+
score: 1 });
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return { state: { readiness: "ready", progress: null, projection_epoch: null, revision: null }, hits };
|
|
272
|
+
},
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
/** Ports over the demo: a catalog, sessions and asset addresses. No host —
|
|
276
|
+
* a host that is a desktop adds its own `HostPort`. */
|
|
277
|
+
export function createDemoPorts(demo = createRoomDemo()) {
|
|
278
|
+
const client = demoSessionClient(demo);
|
|
279
|
+
const sessions = { open: () => client, close: () => { } };
|
|
280
|
+
return { catalog: demoCatalog(demo), sessions, assets: demoAssets() };
|
|
281
|
+
}
|
|
282
|
+
/** The demo's projects as the room's columns draw them, for a harness that
|
|
283
|
+
* mounts a column on its own. */
|
|
284
|
+
export function demoProjectViewModels(demo = createRoomDemo()) {
|
|
285
|
+
const kinds = new Map(demo.meta.runtimes.map((runtime) => [runtime.id, runtime.kind]));
|
|
286
|
+
const tints = createTintDealer(null);
|
|
287
|
+
return demo.meta.projects.map((project) => buildProjectViewModel(project, demo.meta.sessions, demo.stats.get(project.id), (id) => kinds.get(id) ?? id, demo.now, tints.projectTint));
|
|
288
|
+
}
|
|
289
|
+
/** The order the projects and sessions column would settle on for the demo. */
|
|
290
|
+
export function demoActivityOrder(demo = createRoomDemo()) {
|
|
291
|
+
return advanceActivityOrder(null, demo.meta.sessions, { now: demo.now, live: false, bootstrapping: false });
|
|
292
|
+
}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { SessionRow } from "@vibefield/rosetta-protocol";
|
|
3
|
+
/** One row of a menu the room draws for its host. */
|
|
4
|
+
export interface RoomMenuItem {
|
|
5
|
+
readonly key: string;
|
|
6
|
+
/** What leads the row — a mark the host draws. Never interactive. */
|
|
7
|
+
readonly mark?: ReactNode;
|
|
8
|
+
readonly label: ReactNode;
|
|
9
|
+
/** A second line under the label (a path, "asleep · 2 h"). */
|
|
10
|
+
readonly detail?: ReactNode;
|
|
11
|
+
/** At the row's right end ("here", a count, "last used"). */
|
|
12
|
+
readonly aside?: ReactNode;
|
|
13
|
+
/** The chosen one: drawn with the check. */
|
|
14
|
+
readonly checked?: boolean | undefined;
|
|
15
|
+
/** Drawn, not choosable; its `detail` says why. */
|
|
16
|
+
readonly disabled?: boolean | undefined;
|
|
17
|
+
/** One step in, under the row above it (a worktree under its checkout). */
|
|
18
|
+
readonly depth?: 0 | 1 | undefined;
|
|
19
|
+
/** The words a menu's filter matches. Absent: the row always shows. */
|
|
20
|
+
readonly filterText?: string | undefined;
|
|
21
|
+
readonly onSelect?: (() => void) | undefined;
|
|
22
|
+
/** The row's own act, drawn beside it (→ reaches it from the row): pressed,
|
|
23
|
+
* never a menu, and the rows close after it. */
|
|
24
|
+
readonly act?: RoomAct | undefined;
|
|
25
|
+
}
|
|
26
|
+
export interface RoomMenuGroup {
|
|
27
|
+
readonly key: string;
|
|
28
|
+
/** The group's head ("Starts in", a desktop's mark and name). */
|
|
29
|
+
readonly title?: ReactNode;
|
|
30
|
+
readonly items: readonly RoomMenuItem[];
|
|
31
|
+
}
|
|
32
|
+
/** A menu: groups of rows. The room opens it under the control that owns it,
|
|
33
|
+
* closes it on a choice, a press outside or Escape, and moves through its
|
|
34
|
+
* rows with the arrow keys while it is open. */
|
|
35
|
+
export interface RoomMenu {
|
|
36
|
+
/** Its accessible name. */
|
|
37
|
+
readonly label: string;
|
|
38
|
+
readonly groups: readonly RoomMenuGroup[];
|
|
39
|
+
/** Past this many rows a filter heads the menu; its placeholder is
|
|
40
|
+
* `filterPlaceholder` ("Filter 34 folders"). Absent: never. */
|
|
41
|
+
readonly filterAfter?: number | undefined;
|
|
42
|
+
readonly filterPlaceholder?: string | undefined;
|
|
43
|
+
/** What the menu says with no rows to show. */
|
|
44
|
+
readonly empty?: ReactNode;
|
|
45
|
+
}
|
|
46
|
+
/** A host act, drawn as one of the room's own buttons in the slot that holds
|
|
47
|
+
* it. The room presses it and draws nothing about what it means. */
|
|
48
|
+
export interface RoomAct {
|
|
49
|
+
readonly key: string;
|
|
50
|
+
/** Its accessible name and its tooltip. */
|
|
51
|
+
readonly label: string;
|
|
52
|
+
/** What the button shows: the host's glyph, its word, or both. */
|
|
53
|
+
readonly content: ReactNode;
|
|
54
|
+
/** The slot's one primary act, on the room's primary fill (② head only). */
|
|
55
|
+
readonly primary?: boolean | undefined;
|
|
56
|
+
readonly disabled?: boolean | undefined;
|
|
57
|
+
readonly onPress?: (() => void) | undefined;
|
|
58
|
+
/** The act opens these rows instead of pressing, wherever it sits (a
|
|
59
|
+
* menu row's own act excepted): drawn over the columns, so a row's act may
|
|
60
|
+
* open them as well as a head's. */
|
|
61
|
+
readonly menu?: RoomMenu | undefined;
|
|
62
|
+
}
|
|
63
|
+
/** A project row's host decorations (R2). None of them is interactive: the
|
|
64
|
+
* row is one button. */
|
|
65
|
+
export interface RoomProjectRow {
|
|
66
|
+
/** Drawn at the start of the path line, before the path (a desktop's marks). */
|
|
67
|
+
readonly marks?: ReactNode;
|
|
68
|
+
/** A second line under the path (a disambiguation, "3 sessions on Studio"). */
|
|
69
|
+
readonly line?: ReactNode;
|
|
70
|
+
/** How many of the project's sessions are live now: above zero, the row's
|
|
71
|
+
* time slot says "n live" in the room's live ink. */
|
|
72
|
+
readonly live?: number | undefined;
|
|
73
|
+
/** H4 — an act at the row's end, before its time (pin, hide), or its rows.
|
|
74
|
+
* The row stays the selection: it becomes a box under one covering button,
|
|
75
|
+
* the act above it. */
|
|
76
|
+
readonly act?: RoomAct | undefined;
|
|
77
|
+
}
|
|
78
|
+
/** A section of a list (R3). Given a list's sections, the room draws them in
|
|
79
|
+
* the order given; a row two sections name is drawn in the first, and a row
|
|
80
|
+
* no section names is drawn in the section without `ids` — or nowhere, when
|
|
81
|
+
* every section names its rows (which is how a host filter hides rows). */
|
|
82
|
+
export interface RoomSection {
|
|
83
|
+
readonly key: string;
|
|
84
|
+
/** Its head, in the host's words ("Live now"). Absent: no head. */
|
|
85
|
+
readonly title?: ReactNode;
|
|
86
|
+
/** Its rows. Absent: every row no other section names. */
|
|
87
|
+
readonly ids?: readonly string[] | undefined;
|
|
88
|
+
/** Whose order the rows keep. `host` (the default when `ids` is given): as
|
|
89
|
+
* `ids` lists them. `room`: the room's own — the ledger's rank switch, or a
|
|
90
|
+
* session list's days, with the day heads. A section without `ids` always
|
|
91
|
+
* keeps the room's. */
|
|
92
|
+
readonly order?: "host" | "room" | undefined;
|
|
93
|
+
/** A foot section: drawn folded, as one line of the host's words and the
|
|
94
|
+
* section's count, ending in `act` ("Show older"); the line opens and
|
|
95
|
+
* closes it. A folded section holding the selected row opens. */
|
|
96
|
+
readonly fold?: {
|
|
97
|
+
readonly label: ReactNode;
|
|
98
|
+
readonly act: string;
|
|
99
|
+
/** Absent: how many rows the section holds. */
|
|
100
|
+
readonly count?: number | undefined;
|
|
101
|
+
} | undefined;
|
|
102
|
+
}
|
|
103
|
+
/** A filter chip in a list's bar (R7): drawn as a button that opens its
|
|
104
|
+
* rows. The host filters — through the list's sections — and says what is
|
|
105
|
+
* chosen with `label`, `set` and a checked row. */
|
|
106
|
+
export interface RoomFilter {
|
|
107
|
+
readonly key: string;
|
|
108
|
+
/** The chip at rest ("any desktop", or the chosen one's mark and name). */
|
|
109
|
+
readonly label: ReactNode;
|
|
110
|
+
/** Its accessible name ("Filter by desktop"). */
|
|
111
|
+
readonly accessibleLabel: string;
|
|
112
|
+
/** A choice is made: the chip wears the room's set look. */
|
|
113
|
+
readonly set?: boolean | undefined;
|
|
114
|
+
readonly menu: RoomMenu;
|
|
115
|
+
}
|
|
116
|
+
/** A session row's host decorations. */
|
|
117
|
+
export interface RoomSessionRow {
|
|
118
|
+
/** The host's own key for the session. The room never reads it: it rides
|
|
119
|
+
* the selection (`RoomSelection.hostKey`) back out, untouched. */
|
|
120
|
+
readonly hostKey?: string | undefined;
|
|
121
|
+
/** Drawn in the row's id slot in place of the native id (the host's mark
|
|
122
|
+
* and the folder's path). Never interactive. */
|
|
123
|
+
readonly id?: ReactNode;
|
|
124
|
+
/** The id slot's tooltip. Absent with `id`: none. */
|
|
125
|
+
readonly idTitle?: string | undefined;
|
|
126
|
+
/** At the row's right end, before its time (Resume, Jump to): pressed, or
|
|
127
|
+
* opening its rows; the row itself stays the selection. */
|
|
128
|
+
readonly act?: RoomAct | undefined;
|
|
129
|
+
/** Where the act would be, when there is none: the reason, quiet. */
|
|
130
|
+
readonly reason?: ReactNode;
|
|
131
|
+
}
|
|
132
|
+
/** What ② knows when it asks for its head's acts. */
|
|
133
|
+
export interface RoomProjectContext {
|
|
134
|
+
/** The folder ③ shows, by the host's key (R6), or null. */
|
|
135
|
+
readonly folder: string | null;
|
|
136
|
+
}
|
|
137
|
+
/** ④'s head: the host's acts, before the room's activity act, or the reason
|
|
138
|
+
* after the range. */
|
|
139
|
+
export interface RoomHeadActs {
|
|
140
|
+
readonly acts?: readonly RoomAct[] | undefined;
|
|
141
|
+
readonly reason?: ReactNode;
|
|
142
|
+
}
|
|
143
|
+
/** One folder the host offers ③. */
|
|
144
|
+
export interface RoomFolder {
|
|
145
|
+
/** The host's key — never a path: two machines spell paths alike. */
|
|
146
|
+
readonly key: string;
|
|
147
|
+
/** The folder: what the head names and what the worktree opens. */
|
|
148
|
+
readonly path: string;
|
|
149
|
+
/** In front of the path, in the head and in its row. */
|
|
150
|
+
readonly mark?: ReactNode;
|
|
151
|
+
/** Its row's words. Absent: the path, home-abbreviated. */
|
|
152
|
+
readonly label?: ReactNode;
|
|
153
|
+
/** Its row's second line (the branch, who works there). */
|
|
154
|
+
readonly detail?: ReactNode;
|
|
155
|
+
readonly aside?: ReactNode;
|
|
156
|
+
/** One step in, under the folder above it (a linked worktree). */
|
|
157
|
+
readonly depth?: 0 | 1 | undefined;
|
|
158
|
+
/** The head's caption while it is shown ("Studio · main"). Absent: git's. */
|
|
159
|
+
readonly caption?: string | undefined;
|
|
160
|
+
/** This folder cannot be opened here: ③ draws this, the host's honest
|
|
161
|
+
* state, instead of opening it. */
|
|
162
|
+
readonly elsewhere?: ReactNode;
|
|
163
|
+
/** H4 — an act on the folder's row, beside it ("Not part of this project"):
|
|
164
|
+
* pressed, never a menu; the list closes after it. */
|
|
165
|
+
readonly act?: RoomAct | undefined;
|
|
166
|
+
}
|
|
167
|
+
export interface RoomFolderGroup {
|
|
168
|
+
readonly key: string;
|
|
169
|
+
readonly title?: ReactNode;
|
|
170
|
+
readonly folders: readonly RoomFolder[];
|
|
171
|
+
}
|
|
172
|
+
/** ③'s folder list for one project: its head becomes the dropdown. */
|
|
173
|
+
export interface RoomFolders {
|
|
174
|
+
readonly groups: readonly RoomFolderGroup[];
|
|
175
|
+
/** The folder ③ opens on while no session is chosen (the usual place).
|
|
176
|
+
* Absent: the room's own root. */
|
|
177
|
+
readonly initial?: string | undefined;
|
|
178
|
+
/** The folder a session ran in: ③ follows it when the session is chosen.
|
|
179
|
+
* Absent, or null for a session: the room's own root for its folder. */
|
|
180
|
+
readonly of?: ((session: SessionRow) => string | null | undefined) | undefined;
|
|
181
|
+
/** Past this many folders a filter heads the list. */
|
|
182
|
+
readonly filterAfter?: number | undefined;
|
|
183
|
+
readonly filterPlaceholder?: string | undefined;
|
|
184
|
+
/** ③ shows this folder now — the reader's pick or the session followed;
|
|
185
|
+
* null when it shows none of the host's. */
|
|
186
|
+
readonly onShow?: ((key: string | null) => void) | undefined;
|
|
187
|
+
}
|
|
188
|
+
/** ②'s head name, editable in place. */
|
|
189
|
+
export interface RoomRename {
|
|
190
|
+
/** Commit a new name (trimmed, changed, not empty). A rejection keeps the
|
|
191
|
+
* field open and says why, in the error's own words. */
|
|
192
|
+
onRename(name: string): void | PromiseLike<void>;
|
|
193
|
+
/** The name's accessible name and tooltip as a control. Default: "Rename". */
|
|
194
|
+
readonly label?: string | undefined;
|
|
195
|
+
}
|
|
196
|
+
export interface RoomHostInputs {
|
|
197
|
+
/** R1 — a project's colour (any CSS colour). Absent, or null for a
|
|
198
|
+
* project: the room's own dealt tint. */
|
|
199
|
+
readonly projectTint?: ((projectId: string) => string | null | undefined) | undefined;
|
|
200
|
+
/** R2 — a project row's decorations. */
|
|
201
|
+
readonly projectRow?: ((projectId: string) => RoomProjectRow | null | undefined) | undefined;
|
|
202
|
+
/** R3 — ①'s sections. */
|
|
203
|
+
readonly projectSections?: readonly RoomSection[] | undefined;
|
|
204
|
+
/** R3 — ②'s sections, per project. */
|
|
205
|
+
readonly sessionSections?: ((projectId: string) => readonly RoomSection[] | null | undefined) | undefined;
|
|
206
|
+
/** R4 — a session row's decorations and host key. */
|
|
207
|
+
readonly sessionRow?: ((session: SessionRow) => RoomSessionRow | null | undefined) | undefined;
|
|
208
|
+
/** R5 — ②'s head acts, after the room's own; one may be `primary`. */
|
|
209
|
+
readonly projectActs?: ((projectId: string, context: RoomProjectContext) => readonly RoomAct[] | null | undefined) | undefined;
|
|
210
|
+
/** H4 — ②'s head name becomes editable on press: Enter commits, Escape (or
|
|
211
|
+
* leaving it) cancels, a failure is said where the name is. */
|
|
212
|
+
readonly projectRename?: ((projectId: string) => RoomRename | null | undefined) | undefined;
|
|
213
|
+
/** R5 — a card under ②'s head, above its list (suggestions). */
|
|
214
|
+
readonly projectCard?: ((projectId: string) => ReactNode) | undefined;
|
|
215
|
+
/** R5 — ④'s head, for the session it names. */
|
|
216
|
+
readonly sessionActs?: ((session: SessionRow) => RoomHeadActs | null | undefined) | undefined;
|
|
217
|
+
/** R6 — ③'s folders, per project. */
|
|
218
|
+
readonly folders?: ((projectId: string) => RoomFolders | null | undefined) | undefined;
|
|
219
|
+
/** R7 — ①'s chips, before the rank switch. */
|
|
220
|
+
readonly projectFilters?: readonly RoomFilter[] | undefined;
|
|
221
|
+
/** R7 — ②'s chips, per project. */
|
|
222
|
+
readonly sessionFilters?: ((projectId: string) => readonly RoomFilter[] | null | undefined) | undefined;
|
|
223
|
+
/** R9 — the address ②'s repository act opens. Absent, or undefined for a
|
|
224
|
+
* project: the room's own reading of `git_repo`; null: no act. */
|
|
225
|
+
readonly repositoryUrl?: ((projectId: string) => string | null | undefined) | undefined;
|
|
226
|
+
}
|
|
227
|
+
/** Only the host's inputs, picked out of the room's props. */
|
|
228
|
+
export declare function hostInputsOf(props: RoomHostInputs): RoomHostInputs;
|
|
229
|
+
export declare const HostInputsProvider: import("react").Provider<RoomHostInputs>;
|
|
230
|
+
/** The host's inputs, as the room's parts read them; none outside a room. */
|
|
231
|
+
export declare function useHostInputs(): RoomHostInputs;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// What a host may hand the room beyond its ports: its own colours, marks,
|
|
2
|
+
// sections, acts, folders and filters, which the room DRAWS in its own
|
|
3
|
+
// vocabulary and never interprets. Every one is optional, and with none of
|
|
4
|
+
// them the room is exactly what rosetta's app shows — the reference host
|
|
5
|
+
// passes none. The room stays unaware of what a host means by them: a host
|
|
6
|
+
// key is passed through untouched, a host mark is drawn where it is put, and
|
|
7
|
+
// a host act is pressed, never second-guessed.
|
|
8
|
+
//
|
|
9
|
+
// Ids are the room's own: a project's `ProjectRow.id`, a session's
|
|
10
|
+
// `SessionRow.id`, as the host's catalog handed them in.
|
|
11
|
+
import { createContext, useContext } from "react";
|
|
12
|
+
/** Only the host's inputs, picked out of the room's props. */
|
|
13
|
+
export function hostInputsOf(props) {
|
|
14
|
+
return {
|
|
15
|
+
projectTint: props.projectTint,
|
|
16
|
+
projectRow: props.projectRow,
|
|
17
|
+
projectSections: props.projectSections,
|
|
18
|
+
sessionSections: props.sessionSections,
|
|
19
|
+
sessionRow: props.sessionRow,
|
|
20
|
+
projectActs: props.projectActs,
|
|
21
|
+
projectCard: props.projectCard,
|
|
22
|
+
projectRename: props.projectRename,
|
|
23
|
+
sessionActs: props.sessionActs,
|
|
24
|
+
folders: props.folders,
|
|
25
|
+
projectFilters: props.projectFilters,
|
|
26
|
+
sessionFilters: props.sessionFilters,
|
|
27
|
+
repositoryUrl: props.repositoryUrl,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const HostInputsContext = createContext({});
|
|
31
|
+
export const HostInputsProvider = HostInputsContext.Provider;
|
|
32
|
+
/** The host's inputs, as the room's parts read them; none outside a room. */
|
|
33
|
+
export function useHostInputs() {
|
|
34
|
+
return useContext(HostInputsContext);
|
|
35
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { HistoryRoom } from "./HistoryRoom.js";
|
|
2
|
+
export type { HistoryRoomHandle, HistoryRoomProps, HistoryRoomSearch, RoomInset, RoomSelection, RoomTarget, } from "./HistoryRoom.js";
|
|
3
|
+
/** What a host may hand the room beyond its ports (all optional). */
|
|
4
|
+
export type { RoomAct, RoomFilter, RoomFolder, RoomFolderGroup, RoomFolders, RoomHeadActs, RoomHostInputs, RoomMenu, RoomMenuGroup, RoomMenuItem, RoomProjectContext, RoomProjectRow, RoomRename, RoomSection, RoomSessionRow, } from "./host-inputs.js";
|
|
5
|
+
/** The reader (PK3): one session's transcript, read-only, at a line. */
|
|
6
|
+
export { TranscriptReader } from "./TranscriptReader.js";
|
|
7
|
+
export type { ReaderAddress, TranscriptReaderProps } from "./TranscriptReader.js";
|
|
8
|
+
export type { AssetSource, AssetUrl, CatalogPort, CatalogSearch, CatalogStatus, Closable, CollaborationFeed, FigureWindow, GitFacts, GitWorktree, HostPort, InstalledBrowser, RoomPorts, SessionClient, SessionFeed, SessionPort, WorktreeFileActionRequest, WorktreeFileActionResult, WorktreeHostEvent, WorktreeHostPort, WorktreeOpenResult, } from "./ports.js";
|
|
9
|
+
export type { SummaryTab } from "./room-context.js";
|
|
10
|
+
export type { ProjectStats } from "./lib/model.js";
|
|
11
|
+
export type { KeyValueStore } from "./lib/room-storage.js";
|
|
12
|
+
export { DEFAULT_STORAGE_PREFIX } from "./lib/room-storage.js";
|
|
13
|
+
/** A host that holds rosetta's own StatusResponse reads it with this. */
|
|
14
|
+
export { catalogStatusOf } from "./lib/catalog-status.js";
|
|
15
|
+
export { AgentMark, agentLabel } from "./lib/agents.js";
|
|
16
|
+
export { lastActive } from "./lib/format.js";
|
|
17
|
+
export { hasPrimaryModifier, shortcutLabel } from "./components/search/shortcut.js";
|
|
18
|
+
export { MoonGlyph, SunGlyph } from "./lib/icons.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @vibefield/rosetta-room — rosetta's History room behind injected ports. A host hands
|
|
2
|
+
// it a catalog, a way to open one session's body, an asset source and, on a
|
|
3
|
+
// desktop, a host port; the room dials nothing itself. See README.md.
|
|
4
|
+
export { HistoryRoom } from "./HistoryRoom.js";
|
|
5
|
+
/** The reader (PK3): one session's transcript, read-only, at a line. */
|
|
6
|
+
export { TranscriptReader } from "./TranscriptReader.js";
|
|
7
|
+
export { DEFAULT_STORAGE_PREFIX } from "./lib/room-storage.js";
|
|
8
|
+
/** A host that holds rosetta's own StatusResponse reads it with this. */
|
|
9
|
+
export { catalogStatusOf } from "./lib/catalog-status.js";
|
|
10
|
+
// Parts a host's own shell may reuse, so it reads like the room it holds.
|
|
11
|
+
export { AgentMark, agentLabel } from "./lib/agents.js";
|
|
12
|
+
export { lastActive } from "./lib/format.js";
|
|
13
|
+
export { hasPrimaryModifier, shortcutLabel } from "./components/search/shortcut.js";
|
|
14
|
+
export { MoonGlyph, SunGlyph } from "./lib/icons.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CalendarHeatmapCellData, CalendarHeatmapData } from "../components/charts/types.js";
|
|
2
|
+
export interface ActivityRun {
|
|
3
|
+
readonly start: string;
|
|
4
|
+
readonly end: string;
|
|
5
|
+
readonly length: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ActivityDetails {
|
|
8
|
+
readonly calendar: CalendarHeatmapData;
|
|
9
|
+
readonly days: readonly CalendarHeatmapCellData[];
|
|
10
|
+
readonly start: string;
|
|
11
|
+
readonly end: string;
|
|
12
|
+
readonly total: number | null;
|
|
13
|
+
readonly recordedDayCount: number;
|
|
14
|
+
readonly activeDayCount: number;
|
|
15
|
+
readonly longestStreak: number;
|
|
16
|
+
readonly busiestDay: CalendarHeatmapCellData | null;
|
|
17
|
+
readonly runs: readonly ActivityRun[];
|
|
18
|
+
readonly bestRun: ActivityRun | null;
|
|
19
|
+
readonly currentRun: ActivityRun | null;
|
|
20
|
+
}
|
|
21
|
+
/** The full available history uses the same daily cells as the small calendar.
|
|
22
|
+
* Missing/future days never become measured zeroes or average denominators. */
|
|
23
|
+
export declare function createActivityDetails(data: CalendarHeatmapData, today: string): ActivityDetails;
|