From 7c78e010eb3a5e74f5857ac86cb1c64f71406c75 Mon Sep 17 00:00:00 2001 From: mike-inkeep Date: Wed, 3 Jun 2026 20:53:32 -0400 Subject: [PATCH 1/2] feat(open-knowledge): rename gbrain starter pack to Entity vault (GBrain-compatible) (#1593) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(open-knowledge): rename gbrain starter pack to Entity vault (GBrain-compatible) Reposition the former `gbrain` starter pack as a human cockpit for GBrain-style Markdown brains rather than a GBrain reimplementation. - Breaking pre-release rename: canonical pack id is now `entity-vault` with no `gbrain` alias (`ok seed --pack gbrain` no longer resolves). - Display name "Entity vault (GBrain-compatible)" across pack picker, seed dialog, toast, and CLI list; PackId type mirrors + icon map updated. - Tighten dossier templates for GBrain-compatible parsing: document-level `title:`, explicit `--- timeline ---` sentinel, parseable `- **YYYY-MM-DD** | source | @author — … Confidence: …` bullets, and path-qualified `[[folder/slug|Label]]` links. - Rewrite workflow doc and move route `/workflows/gbrain` → `/workflows/entity-vault` (no redirect); update cross-links. - Add interop contract + power-user demo path; honest Markdown+Git interop, no deep GBrain integration implied. - Spec, report, evidence, and changeset included. * chore(open-knowledge): address PR review on entity-vault rename - Pin `original`/`transcript` template types in starter.test.ts expectedTypes (the `type: idea`→`type: original` change was previously untested). - Rename file-local `GBRAIN_*` consts → `ENTITY_VAULT_*` to match the pack id and sibling packs' `_FOLDERS` naming (no behavior change). - Fix the entity-vault pack SKILL.md guidance contract: it no longer claims the convention is never repeated in document bodies (templates carry short inline reminders at point-of-use); the skill stays the canonical reference. - Add the `--- timeline ---` sentinel to the docs Compatibility details list. Declined (respecting prior decisions): keep the docs "Naming note" (D6) and no `/workflows/gbrain` redirect (D2); OkPackId 3-file dedup is pre-existing/out of scope. --------- GitOrigin-RevId: 31559509c8574fe24c7c66d322be46c53f76e560 --- .../entity-vault-gbrain-compatible-rename.md | 9 + docs/content/reference/core-concepts.md | 2 +- docs/content/workflows/entity-vault.mdx | 182 +++++++++++ docs/content/workflows/gbrain.mdx | 309 ------------------ docs/content/workflows/karpathy-llm-wiki.mdx | 4 +- docs/content/workflows/meta.json | 2 +- docs/src/components/overview-blocks.tsx | 1 + docs/src/lib/og-card.tsx | 3 +- docs/src/lib/share-splash.ts | 1 + packages/app/playwright.a11y.config.ts | 1 + packages/app/playwright.config.ts | 1 + packages/app/playwright.visual.config.ts | 1 + packages/app/src/App.test.ts | 2 + packages/app/src/build/app-version.ts | 3 +- .../app/src/build/electron-mode-class.test.ts | 1 + .../src/components/ActivityModeContent.tsx | 5 + .../app/src/components/AuthModal.dom.test.tsx | 1 + packages/app/src/components/AuthModal.tsx | 10 +- .../AutoSyncOnboardingDialog.test.ts | 1 + .../components/AutoSyncOnboardingDialog.tsx | 5 +- packages/app/src/components/BetaBadge.test.ts | 1 + packages/app/src/components/BetaBadge.tsx | 1 + .../src/components/CloneDialog.dom.test.tsx | 1 + packages/app/src/components/ConsentDialog.tsx | 1 + ...ojectDialog.cascade-staleness.dom.test.tsx | 1 + .../src/components/CreateProjectDialog.tsx | 4 +- .../components/CreateProjectMenuTrigger.tsx | 1 + .../components/DeleteConfirmationDialog.tsx | 4 +- .../app/src/components/DiffViewBoundary.tsx | 3 +- .../src/components/DocumentBoundary.test.ts | 4 +- .../app/src/components/DocumentBoundary.tsx | 1 + .../components/DocumentErrorBoundary.test.ts | 1 + .../src/components/EditorActivityPool.test.ts | 2 + .../app/src/components/EditorActivityPool.tsx | 1 + ...torActivityPool.warm-skeleton.dom.test.tsx | 5 + .../app/src/components/EditorArea.test.ts | 1 + .../src/components/EditorBreadcrumb.test.ts | 1 + .../app/src/components/EditorHeader.test.ts | 1 + .../app/src/components/EditorPane.test.ts | 1 + .../app/src/components/EditorTabs.test.ts | 2 + packages/app/src/components/EditorTabs.tsx | 7 +- .../app/src/components/EditorToolbar.test.ts | 1 + .../src/components/EmptyEditorState.test.ts | 1 + .../app/src/components/EmptyEditorState.tsx | 3 +- .../app/src/components/FileSidebar.test.ts | 5 + .../FileTree.selection-mirror.test.ts | 1 + .../FileTree.showall-truncation.dom.test.tsx | 1 + packages/app/src/components/FileTree.test.ts | 4 + packages/app/src/components/FileTree.tsx | 18 +- .../app/src/components/FrontmatterRow.tsx | 1 + .../GraphPanel.fullscreen-safe-area.test.ts | 2 + packages/app/src/components/GraphPanel.tsx | 3 +- .../InstallInClaudeDesktopDialog.tsx | 1 + .../src/components/InteractionPropPanel.tsx | 1 + .../app/src/components/McpConsentDialog.tsx | 1 + .../src/components/McpConsentDialogBody.tsx | 1 + .../src/components/MountStalledAffordance.tsx | 1 + packages/app/src/components/NavigatorApp.tsx | 1 + .../app/src/components/NewItemDialog.test.ts | 1 + .../app/src/components/PackCardGrid.test.ts | 3 +- packages/app/src/components/PackCardGrid.tsx | 2 +- packages/app/src/components/PageHeader.tsx | 1 + .../app/src/components/PageHeaderWidgets.tsx | 1 + .../app/src/components/ProjectSwitcher.tsx | 1 + .../app/src/components/PropertyPanel.test.tsx | 3 +- packages/app/src/components/PropertyPanel.tsx | 1 + .../components/PublishToGitHubDialog.test.ts | 1 + .../src/components/PublishToGitHubDialog.tsx | 1 + .../app/src/components/SeedDialog.test.ts | 1 + .../app/src/components/SettingsButton.test.ts | 1 + .../app/src/components/SettingsButton.tsx | 1 + .../ShareBranchSwitchDialog.dom.test.tsx | 1 + .../ShareBranchSwitchDialog.test.ts | 1 + .../components/ShareBranchSwitchDialog.tsx | 1 + .../app/src/components/ShareButton.test.ts | 2 + packages/app/src/components/ShareButton.tsx | 1 + .../src/components/ShareReceiveDialog.test.ts | 1 + .../src/components/SidebarSearchBar.test.ts | 2 + .../app/src/components/SidebarSearchBar.tsx | 1 + .../app/src/components/SyncStatusBadge.tsx | 5 + packages/app/src/components/TextViewer.tsx | 1 + packages/app/src/components/TimelinePanel.tsx | 12 +- .../src/components/TrashFailureModal.test.ts | 1 + .../app/src/components/TrashFailureModal.tsx | 2 + .../src/components/UpdateNotices.shared.ts | 1 + .../app/src/components/UpdateNotices.test.ts | 8 + .../command-palette-flicker.test.ts | 2 + .../command-palette-tag-search.test.ts | 1 + .../components/command-palette-tag-search.ts | 1 + .../app/src/components/editor-area-overlay.ts | 1 + .../editor/SelectionAnnouncer.test.ts | 1 + .../components/editor/SelectionAnnouncer.tsx | 1 + .../empty-state/AgentHandoffGrid.test.ts | 1 + .../empty-state/EmptyStateHeader.test.ts | 1 + .../src/components/extension-picker-utils.ts | 1 + .../src/components/file-tree-adapter.test.ts | 1 + .../file-tree-extension-badge.dom.test.tsx | 1 + .../components/file-tree-extension-badge.ts | 1 + .../app/src/components/file-tree-merge.ts | 1 + .../src/components/file-tree-okignore.test.ts | 1 + .../file-tree-rename-chip.dom.test.tsx | 1 + .../src/components/file-tree-rename-chip.ts | 1 + .../components/file-tree-rename-validation.ts | 1 + .../app/src/components/file-tree-reveal.ts | 1 + .../app/src/components/file-tree-scroll.ts | 1 + .../components/file-tree-trash-copy.test.ts | 1 + .../src/components/file-tree-trash-copy.ts | 1 + .../app/src/components/file-tree-utils.ts | 1 + packages/app/src/components/graph-colors.ts | 1 + .../app/src/components/graph-label-utils.ts | 1 + .../handoff/OpenInAgentContextSubmenu.test.ts | 1 + .../handoff/OpenInAgentContextSubmenu.tsx | 1 + .../OpenInAgentEmptySpaceSubmenu.test.ts | 1 + .../handoff/OpenInAgentEmptySpaceSubmenu.tsx | 1 + .../handoff/OpenInAgentMenu.test.ts | 1 + .../components/handoff/OpenInAgentMenu.tsx | 1 + .../handoff/OpenInAgentMenuItem.test.ts | 1 + .../handoff/OpenInAgentMenuItem.tsx | 1 + .../dispatch-single-entry-point.test.ts | 1 + .../handoff/useHandoffDispatch.test.ts | 1 + .../components/handoff/useHandoffDispatch.ts | 1 + .../handoff/useInstalledAgents.test.ts | 1 + .../components/handoff/useInstalledAgents.ts | 1 + .../src/components/page-header-utils.test.ts | 2 + .../app/src/components/page-header-utils.ts | 1 + .../app/src/components/prewarm-correlation.ts | 1 + .../components/resolve-conflict-dispatch.ts | 4 +- .../settings/AccountSection.dom.test.tsx | 1 + .../settings/OkignoreSection.test.ts | 1 + .../settings/SettingsDialogBody.test.ts | 2 + .../settings/SettingsDialogBodyLazy.ts | 1 + .../settings/SettingsDialogErrorBoundary.tsx | 1 + .../settings/SettingsDialogShell.dom.test.tsx | 1 + .../settings/SettingsDialogShell.test.ts | 1 + .../components/settings/SharingSection.tsx | 1 + .../components/settings/okignore-doc.test.ts | 1 + .../src/components/settings/okignore-doc.ts | 1 + .../components/settings/okignore-preview.ts | 1 + .../components/settings/okignore-warnings.ts | 1 + .../components/settings/schema-walker.test.ts | 1 + .../src/components/settings/schema-walker.ts | 2 + .../settings/use-config-form.test.ts | 5 + .../components/settings/use-config-form.ts | 2 + .../src/components/share-metadata-rows.tsx | 1 + .../src/components/sidebar-hover-prewarm.ts | 1 + .../src/components/template-picker-utils.ts | 1 + .../app/src/components/ui/command.test.ts | 1 + packages/app/src/components/ui/command.tsx | 1 + .../src/components/ui/context-menu.test.ts | 1 + packages/app/src/components/ui/dialog.test.ts | 1 + .../src/components/ui/dropdown-menu.test.ts | 1 + packages/app/src/components/ui/form.test.ts | 1 + .../app/src/components/ui/popover.test.ts | 1 + packages/app/src/components/ui/select.test.ts | 1 + packages/app/src/components/ui/sheet.test.ts | 1 + .../app/src/components/ui/sidebar.test.ts | 1 + .../src/components/ui/tag-pill-input.test.ts | 1 + .../app/src/components/ui/tooltip.test.ts | 1 + packages/app/src/editor/DocumentContext.tsx | 3 +- packages/app/src/editor/SourceEditor.tsx | 1 + packages/app/src/editor/TiptapEditor.tsx | 1 + packages/app/src/editor/active-editor.ts | 1 + .../src/editor/asset-dispatch/dispatcher.ts | 1 + .../app/src/editor/asset-dispatch/index.ts | 1 + .../app/src/editor/asset-dispatch/registry.ts | 1 + .../app/src/editor/asset-dispatch/types.ts | 1 + .../app/src/editor/block-ux/keyboard-nav.ts | 1 + .../src/editor/branch-invalidation.test.ts | 1 + .../app/src/editor/branch-invalidation.ts | 1 + .../src/editor/bubble-menu/BubbleMenuBar.tsx | 3 +- .../EditWithAiBubbleButton.dom.test.tsx | 1 + .../bubble-menu/EditWithAiBubbleButton.tsx | 1 + .../editor/bubble-menu/FileBubbleButtons.tsx | 1 + .../bubble-menu/ImageAlignButtons.test.ts | 1 + .../editor/bubble-menu/ImageAlignButtons.tsx | 1 + .../app/src/editor/client-persistence.test.ts | 4 +- packages/app/src/editor/client-persistence.ts | 1 + .../clipboard/clipboard-sanitize.test.ts | 2 + .../editor/clipboard/clipboard-sanitize.ts | 3 + .../clipboard-walker-fallback-palette.test.ts | 2 + .../clipboard-walker-fallback-palette.ts | 1 + .../editor/clipboard/clipboard-walker.test.ts | 5 + .../src/editor/clipboard/clipboard-walker.ts | 4 + .../editor/clipboard/detect-source.test.ts | 1 + .../app/src/editor/clipboard/detect-source.ts | 1 + .../src/editor/clipboard/handle-drop.test.ts | 1 + .../src/editor/clipboard/handle-paste.test.ts | 1 + .../app/src/editor/clipboard/handle-paste.ts | 1 + packages/app/src/editor/clipboard/index.ts | 1 + .../src/editor/clipboard/instrument.test.ts | 1 + .../app/src/editor/clipboard/instrument.ts | 1 + .../src/editor/clipboard/is-markdown.test.ts | 1 + .../app/src/editor/clipboard/is-markdown.ts | 1 + ...on-portable-render-source-fallback.test.ts | 1 + .../non-portable-render-source-fallback.ts | 1 + .../clipboard/paste-failure-toast.test.ts | 1 + .../editor/clipboard/paste-failure-toast.ts | 1 + .../src/editor/clipboard/serialize.test.ts | 5 + .../app/src/editor/clipboard/serialize.ts | 1 + .../editor/clipboard/shift-tracker.test.ts | 1 + .../app/src/editor/clipboard/shift-tracker.ts | 1 + .../source-clipboard-recovery.test.ts | 1 + .../editor/clipboard/source-clipboard.test.ts | 1 + .../clipboard/wysiwyg-stop-rule.test.ts | 1 + .../src/editor/components/Accordion.test.tsx | 1 + .../app/src/editor/components/Accordion.tsx | 1 + packages/app/src/editor/components/Audio.tsx | 1 + .../src/editor/components/Callout.test.tsx | 1 + .../app/src/editor/components/Callout.tsx | 1 + .../CodePreviewEditModal.dom.test.tsx | 1 + .../components/CodePreviewEditModal.tsx | 5 +- packages/app/src/editor/components/Embed.tsx | 1 + .../app/src/editor/components/File.test.tsx | 1 + packages/app/src/editor/components/File.tsx | 1 + packages/app/src/editor/components/Image.tsx | 1 + .../app/src/editor/components/Math.test.tsx | 1 + packages/app/src/editor/components/Math.tsx | 1 + .../src/editor/components/Mermaid.test.tsx | 1 + .../app/src/editor/components/Mermaid.tsx | 1 + packages/app/src/editor/components/Mirror.tsx | 2 + .../src/editor/components/MirrorSource.tsx | 1 + packages/app/src/editor/components/Pdf.tsx | 7 +- .../src/editor/components/PropPanel.test.tsx | 7 + .../app/src/editor/components/PropPanel.tsx | 7 +- .../src/editor/components/ResizeHandles.tsx | 1 + .../app/src/editor/components/Tab.test.tsx | 1 + packages/app/src/editor/components/Tab.tsx | 1 + packages/app/src/editor/components/Tabs.tsx | 1 + .../src/editor/components/TagDialog.test.tsx | 1 + .../app/src/editor/components/TagDialog.tsx | 1 + .../src/editor/components/TagView.test.tsx | 1 + .../app/src/editor/components/TagView.tsx | 1 + packages/app/src/editor/components/Video.tsx | 1 + .../editor/components/jsx-host-context.tsx | 1 + .../src/editor/components/pdf-layout.test.ts | 1 + .../app/src/editor/components/pdf-layout.ts | 1 + .../components/use-mirror-source.test.ts | 1 + .../editor/components/use-mirror-source.ts | 2 + .../src/editor/edit-with-ai-selection.test.ts | 1 + .../app/src/editor/edit-with-ai-selection.ts | 1 + packages/app/src/editor/editor-cache.test.ts | 45 ++- packages/app/src/editor/editor-cache.ts | 14 +- packages/app/src/editor/editor-tabs.test.ts | 1 + .../extensions/CodeBlockView.dom.test.tsx | 1 + .../src/editor/extensions/CodeBlockView.tsx | 7 +- .../editor/extensions/ImageInlineZoomView.tsx | 1 + .../extensions/InternalLinkPropPanel.tsx | 1 + .../extensions/JsxComponentView.test.ts | 3 + .../editor/extensions/JsxComponentView.tsx | 3 + .../editor/extensions/LinkPropPanelCopy.tsx | 7 +- .../src/editor/extensions/MathInlineView.tsx | 1 + .../extensions/RawMdxFallbackCMView.test.ts | 3 + .../extensions/RawMdxFallbackCMView.tsx | 1 + .../editor/extensions/WikiLinkPropPanel.tsx | 3 + .../src/editor/extensions/block-mover.test.ts | 3 + .../extensions/bridge-id-plugin.test.ts | 3 + .../src/editor/extensions/bridge-id-plugin.ts | 1 + .../chunk-wrapper-decoration.test.ts | 2 + .../extensions/chunk-wrapper-decoration.ts | 1 + .../editor/extensions/code-block-languages.ts | 1 + .../extensions/code-block-lowlight-plugin.ts | 1 + .../src/editor/extensions/code-block-meta.ts | 1 + .../extensions/code-block-preview-csp.test.ts | 1 + .../app/src/editor/extensions/code-block.ts | 2 + .../extensions/link-edit-autoopen.test.ts | 1 + .../link-resolution-decoration.test.ts | 8 + .../extensions/link-resolution-decoration.ts | 1 + .../editor/extensions/link-resolution.test.ts | 1 + .../src/editor/extensions/link-resolution.ts | 1 + .../mark-identity-decoration.test.ts | 5 + .../extensions/mark-identity-decoration.ts | 1 + .../editor/extensions/mark-identity.test.ts | 6 + .../src/editor/extensions/mark-identity.ts | 4 + .../mark-interaction-bridge.test.tsx | 9 +- .../extensions/mark-interaction-bridge.ts | 5 + .../editor/extensions/nested-cm-extensions.ts | 1 + .../extensions/raw-mdx-fallback.test.ts | 3 + .../editor/extensions/raw-mdx-nav-event.ts | 1 + .../extensions/selection-state-plugin.test.ts | 11 +- .../extensions/selection-state-plugin.ts | 9 +- .../extensions/source-dirty-observer.ts | 1 + .../extensions/table-insert-commands.ts | 1 + .../extensions/table-insert-controls.ts | 1 + .../src/editor/extensions/tag-click-plugin.ts | 1 + .../editor/extensions/tag-suggestion.test.ts | 6 +- .../src/editor/extensions/tag-suggestion.ts | 1 + .../extensions/wiki-link-icon.dom.test.tsx | 1 + .../src/editor/hooks/use-block-selection.ts | 1 + packages/app/src/editor/http-client.ts | 1 + .../editor/image-upload/current-doc-name.ts | 1 + .../media-drop-shape-invariant.test.ts | 1 + .../app/src/editor/interaction-layer-host.ts | 1 + .../app/src/editor/interaction-layer.test.ts | 12 +- packages/app/src/editor/interaction-layer.tsx | 8 + packages/app/src/editor/is-system-doc.ts | 1 + packages/app/src/editor/mount-promise.test.ts | 54 ++- packages/app/src/editor/mount-promise.ts | 15 +- packages/app/src/editor/observer-sync.test.ts | 1 + packages/app/src/editor/observers.test.ts | 17 +- packages/app/src/editor/observers.ts | 9 +- packages/app/src/editor/page-list-cache.ts | 1 + .../src/editor/plugins/agent-flash-source.ts | 3 +- .../editor/plugins/asset-context-menu.test.ts | 1 + .../src/editor/plugins/asset-context-menu.ts | 1 + .../app/src/editor/plugins/md-link-source.ts | 7 +- .../editor/plugins/wiki-link-source.test.ts | 1 + .../src/editor/plugins/wiki-link-source.ts | 9 +- packages/app/src/editor/provider-pool.test.ts | 7 +- packages/app/src/editor/provider-pool.ts | 9 +- .../resolve-descriptor-placeholder.test.ts | 1 + .../app/src/editor/safe-navigation-url.ts | 1 + packages/app/src/editor/selection-stats.ts | 1 + .../src/editor/selection/entry-label.test.ts | 1 + .../app/src/editor/selection/entry-label.ts | 1 + .../slash-command/auto-open-flag.test.ts | 1 + .../slash-command/component-items.test.ts | 2 + .../editor/slash-command/component-items.tsx | 1 + .../slash-command/embed-starter-items.test.ts | 1 + .../slash-command/embed-starter-items.tsx | 1 + .../editor/source-polish/view-plugin.test.ts | 1 + packages/app/src/editor/sync-promise.test.ts | 7 +- packages/app/src/editor/sync-promise.ts | 2 + packages/app/src/editor/tab-identity.ts | 1 + .../table-controls/TableCellHandles.tsx | 1 + .../tag-suggestion/TagSuggestionMenu.tsx | 1 + .../app/src/editor/typing-burst-detector.ts | 1 + .../app/src/editor/use-editor-mode.test.ts | 7 + packages/app/src/editor/use-editor-mode.ts | 3 +- .../editor/utils/animate-align-change.test.ts | 1 + .../src/editor/utils/animate-align-change.ts | 1 + .../app/src/editor/utils/editor-strings.ts | 1 + .../app/src/editor/utils/sanitize-url.test.ts | 3 +- packages/app/src/editor/utils/sanitize-url.ts | 1 + packages/app/src/editor/utils/severity.ts | 1 + .../src/editor/utils/validate-css-length.ts | 1 + .../editor/utils/validate-media-url.test.ts | 4 + .../src/editor/utils/validate-media-url.ts | 1 + packages/app/src/globals.alpha-aware.test.ts | 1 + .../app/src/globals.image-zoom-dark.test.ts | 1 + .../src/globals.reduced-transparency.test.ts | 1 + packages/app/src/hooks/use-folder-config.ts | 1 + packages/app/src/hooks/use-git-sync-status.ts | 1 + .../app/src/hooks/use-theme-bridge.test.ts | 1 + .../app/src/hooks/use-update-channel.test.ts | 1 + packages/app/src/lib/api-config.ts | 1 + packages/app/src/lib/cc1.ts | 1 + packages/app/src/lib/client-fetch.test.ts | 4 +- .../lib/config-ignore-nested-error-events.ts | 1 + packages/app/src/lib/config-provider.test.tsx | 2 + .../config-provider.user-synced.dom.test.tsx | 1 + .../app/src/lib/config-validation-events.ts | 1 + packages/app/src/lib/consent-store.ts | 1 + packages/app/src/lib/create-file-events.ts | 1 + packages/app/src/lib/current-branch-store.ts | 3 +- packages/app/src/lib/desktop-bridge-types.ts | 6 +- .../src/lib/dispatch-open-in-terminal.test.ts | 1 + packages/app/src/lib/doc-panel-width-store.ts | 3 +- packages/app/src/lib/error-state.ts | 1 + .../lib/file-menu-target-resolvers.test.ts | 1 + .../app/src/lib/file-menu-target-resolvers.ts | 1 + .../lib/file-tree-menu-action-events.test.ts | 1 + .../src/lib/file-tree-menu-action-events.ts | 1 + packages/app/src/lib/folder-config-api.ts | 1 + packages/app/src/lib/folder-config-paths.ts | 1 + .../lib/handoff/cowork-skill-install.test.ts | 1 + .../src/lib/handoff/cowork-skill-install.ts | 1 + packages/app/src/lib/handoff/dispatch.ts | 1 + .../app/src/lib/handoff/install-detect.ts | 1 + packages/app/src/lib/handoff/open-external.ts | 1 + .../src/lib/handoff/skill-installer.test.ts | 1 + .../app/src/lib/handoff/skill-installer.ts | 4 +- packages/app/src/lib/handoff/targets.ts | 1 + packages/app/src/lib/handoff/telemetry.ts | 1 + .../use-claude-desktop-integration.test.ts | 2 + .../handoff/use-claude-desktop-integration.ts | 1 + .../lib/install-client-log-forwarder.test.ts | 1 + .../src/lib/install-client-log-forwarder.ts | 10 +- .../app/src/lib/install-deep-link-listener.ts | 1 + .../app/src/lib/install-onboarding-toast.ts | 1 + .../src/lib/install-server-drift-listener.ts | 1 + .../app/src/lib/lazy-with-preload.test.ts | 1 + packages/app/src/lib/lazy-with-preload.ts | 1 + packages/app/src/lib/mcp-consent-store.ts | 1 + packages/app/src/lib/parse-api-error.test.ts | 1 + packages/app/src/lib/parse-api-error.ts | 1 + .../app/src/lib/parse-server-response.test.ts | 1 + packages/app/src/lib/parse-server-response.ts | 1 + .../perf/cold-mount-instrumentation.test.ts | 11 +- .../lib/perf/cold-mount-instrumentation.ts | 7 +- packages/app/src/lib/perf/collector.ts | 1 + .../app/src/lib/perf/env-override.test.ts | 1 + packages/app/src/lib/perf/env-override.ts | 1 + .../app/src/lib/perf/get-pm-stats.test.ts | 8 + packages/app/src/lib/perf/get-pm-stats.ts | 1 + packages/app/src/lib/perf/hdr-histogram.ts | 1 + packages/app/src/lib/perf/index.ts | 1 + packages/app/src/lib/perf/mark.test.ts | 3 +- packages/app/src/lib/perf/mark.ts | 4 +- .../src/lib/perf/profiler-boundary.test.tsx | 1 + .../app/src/lib/perf/profiler-boundary.tsx | 1 + .../lib/perf/scheduler-polyfill-shim.test.ts | 1 + .../src/lib/perf/scheduler-polyfill-shim.ts | 1 + packages/app/src/lib/perf/types.ts | 1 + packages/app/src/lib/perf/web-vitals.ts | 1 + packages/app/src/lib/project-paths.ts | 1 + .../app/src/lib/server-info-refresh.test.ts | 1 + packages/app/src/lib/server-info-refresh.ts | 4 +- packages/app/src/lib/server-instance-store.ts | 1 + .../app/src/lib/share/branch-switch-flow.ts | 1 + .../src/lib/share/clipboard-adapter.test.ts | 1 + .../app/src/lib/share/clipboard-adapter.ts | 1 + .../app/src/lib/share/clone-controller.ts | 1 + packages/app/src/lib/share/consent-flow.ts | 1 + .../app/src/lib/share/publish-wizard.test.ts | 2 + packages/app/src/lib/share/publish-wizard.ts | 4 + packages/app/src/lib/share/receive-flow.ts | 1 + packages/app/src/lib/share/receive-store.ts | 1 + .../src/lib/share/run-share-action.test.ts | 1 + packages/app/src/lib/show-all-stream.ts | 1 + packages/app/src/lib/sidebar-pin-store.ts | 3 +- .../transports/auth-query-transport.test.ts | 1 + .../lib/transports/auth-query-transport.ts | 7 +- .../app/src/lib/transports/auth-transport.ts | 4 +- .../transports/buffered-async-stream.test.ts | 3 +- .../lib/transports/buffered-async-stream.ts | 1 + .../lib/transports/clone-transport.test.ts | 1 + .../app/src/lib/transports/clone-transport.ts | 4 +- .../app/src/lib/update-notices-store.test.ts | 1 + packages/app/src/lib/update-notices-store.ts | 1 + .../app/src/lib/use-activity-panel.test.ts | 1 + packages/app/src/lib/use-activity-panel.ts | 4 + .../app/src/lib/use-settings-route.test.ts | 1 + packages/app/src/lib/use-settings-route.ts | 1 + packages/app/src/lib/workspace-paths.ts | 1 + .../PresenceBar-avatar-click.test.tsx | 1 + packages/app/src/presence/PresenceBar.test.ts | 1 + packages/app/src/presence/identity.ts | 1 + packages/app/src/presence/use-presence.ts | 1 + packages/app/src/server/agent-sim.ts | 9 +- packages/app/src/server/api-config-handler.ts | 1 + packages/app/src/server/hocuspocus-plugin.ts | 12 +- packages/app/src/telemetry-impl.ts | 3 +- .../app/tests/a11y/component-blocks.e2e.ts | 8 + .../conversion/conversion-fidelity.test.ts | 8 + packages/app/tests/fidelity/arbitraries.ts | 7 + .../bridge-observer-conversion.test.ts | 14 + .../tests/fidelity/corpus-commonmark.test.ts | 1 + .../app/tests/fidelity/corpus-gfm.test.ts | 1 + .../fidelity/deferred-bug-pinning.test.ts | 1 + .../tests/fidelity/fixtures-isolation.test.ts | 1 + .../fidelity/frontmatter-malformed.test.ts | 1 + packages/app/tests/fidelity/helpers.ts | 1 + .../invariant-backslash-idempotence.test.ts | 1 + .../invariant-emphasis-cumulation.test.ts | 1 + .../invariant-html-block-edge.test.ts | 1 + .../app/tests/fidelity/invariant-i1.test.ts | 1 + .../app/tests/fidelity/invariant-i10.test.ts | 1 + .../app/tests/fidelity/invariant-i13.test.ts | 1 + .../app/tests/fidelity/invariant-i14.test.ts | 1 + .../app/tests/fidelity/invariant-i15.test.ts | 1 + .../app/tests/fidelity/invariant-i16.test.ts | 1 + .../app/tests/fidelity/invariant-i17.test.ts | 1 + .../app/tests/fidelity/invariant-i18.test.ts | 2 + .../app/tests/fidelity/invariant-i19.test.ts | 1 + .../app/tests/fidelity/invariant-i2.test.ts | 1 + .../invariant-i20-walker-adversarial.test.ts | 1 + .../app/tests/fidelity/invariant-i20.test.ts | 1 + .../invariant-i21-byte-preservation.test.ts | 1 + .../app/tests/fidelity/invariant-i21.test.ts | 1 + .../app/tests/fidelity/invariant-i3.test.ts | 1 + .../app/tests/fidelity/invariant-i4.test.ts | 1 + .../app/tests/fidelity/invariant-i5.test.ts | 1 + .../app/tests/fidelity/invariant-i6.test.ts | 1 + .../app/tests/fidelity/invariant-i7.test.ts | 1 + .../app/tests/fidelity/invariant-i8.test.ts | 1 + .../app/tests/fidelity/invariant-i9.test.ts | 1 + .../fidelity/invariant-image-edge.test.ts | 1 + .../invariant-image-relative-src.test.ts | 1 + .../fidelity/invariant-link-edge.test.ts | 1 + .../fidelity/invariant-list-nesting.test.ts | 1 + ...variant-wiki-link-embed-conversion.test.ts | 1 + .../m2-project-markdown-health.test.ts | 1 + packages/app/tests/fidelity/ng-pinned.test.ts | 1 + .../tests/fidelity/p0-entity-escape.test.ts | 4 + .../_fixtures/init-load-byte-stable-corpus.ts | 1 + .../init-load-byte-stable-snapshot.ts | 1 + .../app/tests/integration/agent-undo.test.ts | 1 + .../api-error-envelope/agent-activity.test.ts | 1 + .../agent-burst-diff.test.ts | 1 + .../api-error-envelope/agent-patch.test.ts | 1 + .../api-error-envelope/agent-undo.test.ts | 1 + .../api-error-envelope/agent-write-md.test.ts | 1 + .../api-error-envelope/agent-write.test.ts | 1 + .../auth-query-transport-signout.test.ts | 1 + .../backlink-counts.test.ts | 1 + .../api-error-envelope/backlinks.test.ts | 1 + .../api-error-envelope/create-folder.test.ts | 1 + .../api-error-envelope/create-page.test.ts | 1 + .../api-error-envelope/dead-links.test.ts | 1 + .../api-error-envelope/delete-path.test.ts | 1 + .../api-error-envelope/diff.test.ts | 1 + .../api-error-envelope/document-list.test.ts | 1 + .../api-error-envelope/document-read.test.ts | 1 + .../api-error-envelope/folder-config.test.ts | 1 + .../api-error-envelope/forward-links.test.ts | 1 + .../history-version.test.ts | 1 + .../api-error-envelope/history.test.ts | 1 + .../api-error-envelope/hubs.test.ts | 1 + .../installed-agents.test.ts | 1 + .../api-error-envelope/link-graph.test.ts | 1 + .../local-op-auth-identity.test.ts | 1 + .../local-op-auth-login.test.ts | 1 + .../local-op-auth-pat.test.ts | 1 + .../local-op-auth-repos.test.ts | 1 + .../local-op-auth-set-identity.test.ts | 1 + .../local-op-auth-signout.test.ts | 1 + .../local-op-auth-status.test.ts | 1 + .../api-error-envelope/local-op-clone.test.ts | 1 + .../api-error-envelope/local-op-open.test.ts | 1 + .../metrics-agent-presence.test.ts | 1 + .../metrics-parse-health.test.ts | 1 + .../metrics-reconciliation.test.ts | 1 + .../api-error-envelope/orphans.test.ts | 1 + .../api-error-envelope/page-headings.test.ts | 1 + .../api-error-envelope/pages.test.ts | 1 + .../api-error-envelope/principal.test.ts | 1 + .../api-error-envelope/rename-path.test.ts | 1 + .../api-error-envelope/rescue-get.test.ts | 1 + .../api-error-envelope/rescue-list.test.ts | 1 + .../api-error-envelope/rollback.test.ts | 1 + .../api-error-envelope/save-version.test.ts | 1 + .../api-error-envelope/search.test.ts | 1 + .../api-error-envelope/seed-apply.test.ts | 1 + .../api-error-envelope/seed-plan.test.ts | 1 + .../api-error-envelope/server-info.test.ts | 1 + .../skill-install-state.test.ts | 1 + .../api-error-envelope/suggest-links.test.ts | 1 + .../sync-abort-merge.test.ts | 1 + .../sync-conflict-content.test.ts | 1 + .../api-error-envelope/sync-conflicts.test.ts | 1 + .../sync-resolve-conflict.test.ts | 1 + .../api-error-envelope/sync-status.test.ts | 1 + .../api-error-envelope/sync-trigger.test.ts | 1 + .../api-error-envelope/tags-for-name.test.ts | 1 + .../api-error-envelope/tags-list.test.ts | 1 + .../api-error-envelope/template.test.ts | 1 + .../api-error-envelope/templates-list.test.ts | 1 + .../test-rescan-backlinks.test.ts | 1 + .../test-rescan-files.test.ts | 1 + .../api-error-envelope/test-reset.test.ts | 1 + .../unmatched-route.test.ts | 1 + .../api-error-envelope/upload-asset.test.ts | 1 + .../api-error-envelope/workspace.test.ts | 1 + .../asset-move-rerenders-embeds.test.ts | 8 +- ...itched-with-stale-embed-resolution.test.ts | 5 +- .../bridge-cold-load-corpus.test.ts | 4 + .../bridge-convergence-regression.test.ts | 1 + .../tests/integration/bridge-matrix.test.ts | 12 + .../bridge-watchdog-multi-peer-drain.test.ts | 1 + .../bug-a-mechanism-isolation.test.ts | 3 + .../bug-c-real-reachability.test.ts | 3 + ...agent-undo-under-concurrent-typing.test.ts | 4 + .../integration/c1-concurrent-wysiwyg.test.ts | 1 + .../integration/c10-server-restart.test.ts | 1 + .../integration/c2-concurrent-source.test.ts | 1 + .../tests/integration/c3-mixed-mode.test.ts | 1 + .../integration/c4-agent-plus-wysiwyg.test.ts | 1 + .../integration/c5-agent-plus-source.test.ts | 1 + .../c6-mode-switch-mid-debounce.test.ts | 1 + .../c7-disconnect-reconnect-burst.test.ts | 1 + .../integration/c8-triple-concurrent.test.ts | 2 + .../integration/c9-join-mid-debounce.test.ts | 1 + .../tests/integration/cc1-broadcast.test.ts | 4 +- .../integration/client-logs-endpoint.test.ts | 1 + ...lipboard-cross-app-sanitizer-proxy.test.ts | 4 + .../clipboard-dispatcher-reorder.test.ts | 1 + .../clipboard-walker-integration.test.ts | 1 + ...onfig-doc-server-instance-recovery.test.ts | 1 + .../conflict-aware-write-surfaces.test.ts | 3 +- .../conflict-resolution-delete-modify.test.ts | 13 +- .../app/tests/integration/create-page.test.ts | 1 + .../integration/cross-doc-stale-cache.test.ts | 1 + .../dom-test-filename-stop-rule.test.ts | 1 + .../tests/integration/e2e-stop-rules.test.ts | 1 + .../empty-folder-visibility.test.ts | 3 + .../error-envelope-coverage.test.ts | 1 + ...lscreen-overlay-safe-area-coverage.test.ts | 6 +- .../idle-shutdown-multi-client.test.ts | 1 + .../integration/init-load-byte-stable.test.ts | 6 + .../ipc-exhaustiveness-coverage.test.ts | 1 + .../integration/ipc-log-coverage.test.ts | 1 + .../jsx-schema-narrowing-safety.test.ts | 1 + .../keyboard-nav-catch-contract.test.ts | 1 + .../integration/link-graph-metadata.test.ts | 1 + .../local-op-auth-login-cancel-reopen.test.ts | 1 + .../managed-rename-crash-recovery.test.ts | 1 + .../integration/mcp-session-identity.test.ts | 1 + .../integration/microcopy-ellipsis.test.ts | 1 + .../integration/multi-agent-presence.test.ts | 1 + .../app/tests/integration/network-control.ts | 2 + .../no-sync-set-enabled-references.test.ts | 1 + .../no-unportaled-editor-content.test.ts | 1 + .../integration/per-session-um-perf.test.ts | 1 + ...istence-failure-surfacing-handlers.test.ts | 1 + .../integration/persistence-fan-out.test.ts | 1 + .../integration/presence-multi-tab.test.ts | 4 +- .../integration/principal-endpoint.test.ts | 1 + .../provider-pool-buffer-replay.test.ts | 1 + ...provider-pool-multi-client-restart.test.ts | 4 +- .../provider-pool-reconnect.test.ts | 4 +- .../raw-mdx-fallback-multi-client.test.ts | 3 + .../removal-phantom-resurrection.test.ts | 4 + .../restart-with-embed-doc.test.ts | 2 + .../tests/integration/selection-state.test.ts | 3 + .../server-observer-feedback-loop.test.ts | 1 + .../tests/integration/session-cleanup.test.ts | 1 + .../sidebar-show-all-files.test.ts | 1 + .../slash-command-extension.test.ts | 1 + .../source-mode-byte-preservation.test.ts | 1 + .../tests/integration/symlink-alias.test.ts | 9 + .../integration/test-harness-origins.test.ts | 4 +- .../tests/integration/test-harness.test.ts | 1 + .../app/tests/integration/test-harness.ts | 36 +- .../test-script-invariants.test.ts | 1 + .../urn-ipc-registry-coverage.test.ts | 1 + .../integration/vite-dedupe-parity.test.ts | 1 + .../vite-worker-cachedir-isolation.test.ts | 1 + .../integration/workspace-endpoint.test.ts | 1 + .../tests/integration/worktree-boot.test.ts | 1 + ...worktree-cleanup-and-stale-pointer.test.ts | 1 + .../integration/worktree-concurrent.test.ts | 4 +- .../tests/integration/worktree-init.test.ts | 1 + .../integration/worktree-test-harness.ts | 1 + .../y-prosemirror-import-coverage.test.ts | 1 + ...y-tiptap-schema-throw-substitution.test.ts | 1 + packages/app/tests/lingui-macro-preload.ts | 1 + packages/app/tests/lingui-macro-shim.tsx | 3 + .../no-raw-html-interactive-element.test.ts | 1 + .../meta/substrate-vocabulary-drift.test.ts | 1 + .../cache-regime-rotation/asymmetric.ts | 1 + .../fixtures/cache-regime-rotation/broad.ts | 1 + .../cache-regime-rotation/generator.ts | 1 + .../fixtures/cache-regime-rotation/index.ts | 1 + .../fixtures/cache-regime-rotation/tight.ts | 1 + .../fixtures/cache-regime-rotation/types.ts | 1 + .../fixtures/cache-regime-rotation/vault.ts | 1 + .../generate-view-count-fixtures.test.ts | 1 + .../fixtures/generate-view-count-fixtures.ts | 7 + packages/app/tests/perf/lib/bootstrap.ts | 2 + packages/app/tests/perf/lib/bundle-check.ts | 1 + .../app/tests/perf/lib/cdp-tracer.test.ts | 1 + packages/app/tests/perf/lib/cdp-tracer.ts | 8 + .../tests/perf/lib/cell-measurement.test.ts | 6 + .../app/tests/perf/lib/cell-measurement.ts | 7 + .../perf/lib/correlate-longtasks.test.ts | 1 + .../app/tests/perf/lib/correlate-longtasks.ts | 1 + .../app/tests/perf/lib/define-sweep.test.ts | 3 +- packages/app/tests/perf/lib/define-sweep.ts | 1 + packages/app/tests/perf/lib/doc-markers.ts | 1 + packages/app/tests/perf/lib/kneedle.test.ts | 1 + packages/app/tests/perf/lib/kneedle.ts | 2 + .../tests/perf/lib/longtask-observer.test.ts | 1 + .../app/tests/perf/lib/longtask-observer.ts | 4 +- .../app/tests/perf/lib/macos-pressure.test.ts | 1 + packages/app/tests/perf/lib/macos-pressure.ts | 1 + .../perf/lib/node-peer-simulator.test.ts | 1 + .../app/tests/perf/lib/node-peer-simulator.ts | 7 +- .../app/tests/perf/lib/perf-compare.test.ts | 1 + packages/app/tests/perf/lib/scenario.ts | 3 + .../app/tests/perf/lib/sweep-runner.test.ts | 1 + packages/app/tests/perf/lib/sweep-runner.ts | 5 + packages/app/tests/perf/lib/tempo-client.ts | 5 + .../tests/perf/lib/with-checkpoint.test.ts | 3 +- .../app/tests/perf/lib/with-checkpoint.ts | 2 + .../perf/probes/tiptap-destroy-leak.test.ts | 1 + .../tests/perf/probes/tiptap-destroy-leak.ts | 11 +- packages/app/tests/perf/profile.test.ts | 1 + packages/app/tests/perf/profile.ts | 9 +- .../perf/scenarios/activity-mount-sweep.ts | 3 +- .../tests/perf/scenarios/cold-load-big-doc.ts | 1 + .../tests/perf/scenarios/cold-pool-warm.ts | 1 + .../scenarios/g4-profile-decomposition.ts | 4 +- .../perf/scenarios/m2-cache-hit-reparent.ts | 1 + .../perf/scenarios/m3-defer-mount-sweep.ts | 1 + .../tests/perf/scenarios/memory-per-editor.ts | 4 +- .../app/tests/perf/scenarios/mode-toggle.ts | 1 + .../tests/perf/scenarios/outline-polling.ts | 1 + .../scenarios/server-bridge-spans-canary.ts | 1 + .../sweep-cache-regime.smoke.test.ts | 4 + .../perf/scenarios/sweep-cache-regime.ts | 5 + ...nvention-cap-graduation-real-cycle.test.ts | 1 + ...ep-convention-cap-graduation.smoke.test.ts | 13 + .../sweep-convention-cap-graduation.ts | 21 +- .../scenarios/sweep-pool-warm-back-canary.ts | 1 + .../perf/scenarios/warm-switch-cached.ts | 1 + .../app/tests/perf/scenarios/warm-switch.ts | 1 + .../app/tests/stress/_helpers/clipboard.ts | 1 + .../app/tests/stress/_helpers/editor-state.ts | 1 + .../tests/stress/_helpers/error-filters.ts | 1 + .../app/tests/stress/_helpers/fixtures.ts | 7 +- packages/app/tests/stress/_helpers/graph.ts | 1 + packages/app/tests/stress/_helpers/index.ts | 1 + .../app/tests/stress/_helpers/provider.ts | 1 + .../tests/stress/_helpers/server-process.ts | 1 + packages/app/tests/stress/_helpers/sidebar.ts | 1 + .../app/tests/stress/_helpers/slash-menu.ts | 1 + .../tests/stress/_helpers/upload-fixtures.ts | 1 + .../tests/stress/agent-activity-panel.e2e.ts | 1 + .../tests/stress/asset-click-dispatch.e2e.ts | 2 + .../tests/stress/asset-embed-advanced.e2e.ts | 1 + .../stress/asset-embed-real-fidelity.e2e.ts | 1 + packages/app/tests/stress/asset-embed.e2e.ts | 1 + .../stress/bridge-convergence.fuzz.test.ts | 34 +- .../stress/chip-popover-positioning.e2e.ts | 3 + ...pboard-relative-url-source-fallback.e2e.ts | 1 + .../stress/cm6-list-hanging-indent.e2e.ts | 1 + .../stress/command-palette-flicker.e2e.ts | 1 + .../stress/component-blocks.perf.test.ts | 4 + packages/app/tests/stress/crdt-stress.e2e.ts | 1 + .../stress/docs-open-scroll-restore.e2e.ts | 1 + packages/app/tests/stress/docs-open.e2e.ts | 5 + .../stress/drop-pipeline-auto-open.e2e.ts | 3 + packages/app/tests/stress/edit-with-ai.e2e.ts | 1 + .../stress/editor-area-viewport-resize.e2e.ts | 1 + .../editor-mode-flip-cross-doc-bleed.e2e.ts | 1 + .../stress/editor-mode-persistence.e2e.ts | 7 +- packages/app/tests/stress/find-replace.e2e.ts | 1 + .../tests/stress/fixtures/handoff-mocks.ts | 13 +- .../fr-7a-disconnect-source-mode.e2e.ts | 1 + .../app/tests/stress/frontmatter-edit.e2e.ts | 1 + .../tests/stress/grip-click-nodeselect.e2e.ts | 4 + packages/app/tests/stress/handoff.e2e.ts | 1 + .../tests/stress/init-load-byte-stable.e2e.ts | 5 + .../tests/stress/jsx-backspace-delete.e2e.ts | 8 + .../tests/stress/jsx-halo-semantics.e2e.ts | 8 + .../tests/stress/jsx-image-body-click.e2e.ts | 1 + .../stress/jsx-prop-panel-placeholder.e2e.ts | 4 + .../stress/jsx-range-encompass-halo.e2e.ts | 4 + .../tests/stress/jsx-wildcard-convert.e2e.ts | 2 + packages/app/tests/stress/list-keymap.e2e.ts | 1 + .../app/tests/stress/mid-type-recovery.e2e.ts | 1 + .../tests/stress/multi-agent-presence.e2e.ts | 2 + .../stress/new-file-cross-doc-bleed.e2e.ts | 1 + .../stress/ng7-rapid-nav-coherence.e2e.ts | 29 +- .../stress/observer-a-multi-client.e2e.ts | 1 + .../app/tests/stress/okignore-settings.e2e.ts | 14 +- .../tests/stress/outline-navigation.e2e.ts | 1 + .../stress/outline-toolbar-occlusion.e2e.ts | 1 + .../app/tests/stress/paste-fidelity.e2e.ts | 18 + packages/app/tests/stress/prop-upload.e2e.ts | 5 + .../tests/stress/qa-sidebar-responsive.e2e.ts | 4 +- .../raw-mdx-fallback-onblur-upgrade.e2e.ts | 3 + .../stress/rename-content-preservation.e2e.ts | 1 + .../tests/stress/rename-noext-probe.e2e.ts | 1 + .../tests/stress/selection-indicator.e2e.ts | 27 ++ .../server-authoritative-stress.test.ts | 6 + .../tests/stress/sidebar-search-pill.e2e.ts | 1 + .../stress/slash-command-auto-open.e2e.ts | 3 + .../app/tests/stress/slash-command.e2e.ts | 8 + .../app/tests/stress/source-polish.e2e.ts | 9 + packages/app/tests/stress/stress-api.ts | 5 + packages/app/tests/stress/synthetic.ts | 1 + .../stress/timeline-diff-sidepane.e2e.ts | 2 + .../app/tests/stress/ux-interactions.e2e.ts | 3 + .../tests/stress/yjs-no-dual-import.e2e.ts | 1 + .../app/tests/visual/component-parity.e2e.ts | 8 + packages/app/vite.react-babel.ts | 1 + packages/cli/src/auth/gh-detect.ts | 3 +- packages/cli/src/auth/resolve-auth.test.ts | 5 + packages/cli/src/auth/token-store.test.ts | 6 + packages/cli/src/auth/token-store.ts | 13 +- packages/cli/src/cli.ts | 1 + .../src/commands/auth/git-credential.test.ts | 2 + packages/cli/src/commands/auth/login.ts | 3 +- .../cli/src/commands/bug-report-redact.ts | 1 + packages/cli/src/commands/clean.ts | 1 + packages/cli/src/commands/clone.ts | 3 + packages/cli/src/commands/config.test.ts | 4 +- packages/cli/src/commands/config.ts | 1 + packages/cli/src/commands/desktop-dispatch.ts | 1 + .../cli/src/commands/diagnose-bundle.test.ts | 8 + .../diagnose-health-checks/bun.test.ts | 1 + .../commands/diagnose-health-checks/bun.ts | 1 + .../config-yaml.test.ts | 1 + .../diagnose-health-checks/config-yaml.ts | 1 + .../content-dir.test.ts | 1 + .../diagnose-health-checks/content-dir.ts | 1 + .../diagnose-health-checks/git.test.ts | 1 + .../commands/diagnose-health-checks/git.ts | 1 + .../commands/diagnose-health-checks/index.ts | 1 + .../macos-codesig.test.ts | 1 + .../diagnose-health-checks/macos-codesig.ts | 1 + .../commands/diagnose-health-checks/names.ts | 1 + .../diagnose-health-checks/runner.test.ts | 5 +- .../commands/diagnose-health-checks/runner.ts | 4 +- .../server-lock.test.ts | 1 + .../diagnose-health-checks/server-lock.ts | 1 + .../shadow-repo.test.ts | 1 + .../diagnose-health-checks/shadow-repo.ts | 1 + .../commands/diagnose-health-checks/types.ts | 1 + .../cli/src/commands/diagnose-health.test.ts | 5 +- packages/cli/src/commands/diagnose-health.ts | 1 + packages/cli/src/commands/diagnose.test.ts | 4 + packages/cli/src/commands/diagnose.ts | 16 +- packages/cli/src/commands/init.test.ts | 16 + packages/cli/src/commands/init.ts | 15 +- .../cli/src/commands/install-skill.test.ts | 1 + packages/cli/src/commands/install-skill.ts | 1 + packages/cli/src/commands/lock-state.ts | 1 + .../src/commands/mcp-chain-validation.test.ts | 3 + .../cli/src/commands/mcp-migrate-event.ts | 1 + packages/cli/src/commands/mcp.ts | 1 + packages/cli/src/commands/ps.test.ts | 12 + packages/cli/src/commands/ps.ts | 7 + .../cli/src/commands/repair-skills.test.ts | 6 +- packages/cli/src/commands/seed.ts | 1 + packages/cli/src/commands/self-spawn.ts | 1 + packages/cli/src/commands/share/index.ts | 1 + .../cli/src/commands/share/name-check.test.ts | 1 + packages/cli/src/commands/share/name-check.ts | 1 + .../cli/src/commands/share/owners.test.ts | 1 + packages/cli/src/commands/share/owners.ts | 1 + .../cli/src/commands/share/publish.test.ts | 5 + packages/cli/src/commands/share/publish.ts | 10 +- packages/cli/src/commands/sharing/index.ts | 1 + packages/cli/src/commands/sharing/share.ts | 1 + .../cli/src/commands/sharing/sharing.test.ts | 1 + packages/cli/src/commands/sharing/status.ts | 1 + packages/cli/src/commands/sharing/unshare.ts | 1 + packages/cli/src/commands/start.test.ts | 14 +- packages/cli/src/commands/start.ts | 6 +- packages/cli/src/commands/status.ts | 1 + packages/cli/src/commands/stop.test.ts | 1 + packages/cli/src/commands/stop.ts | 1 + packages/cli/src/commands/sync.test.ts | 1 + packages/cli/src/commands/ui-proxy.ts | 27 +- packages/cli/src/commands/ui.test.ts | 1 + packages/cli/src/commands/ui.ts | 15 +- packages/cli/src/config/loader.test.ts | 5 + packages/cli/src/config/paths.ts | 1 + packages/cli/src/config/schema.test.ts | 2 + packages/cli/src/config/schema.ts | 1 + .../cli/src/diagnose/bundle-redact.test.ts | 4 + packages/cli/src/diagnose/bundle-redact.ts | 1 + packages/cli/src/diagnose/bundle.test.ts | 10 + packages/cli/src/diagnose/bundle.ts | 12 + packages/cli/src/diagnose/path-parity.test.ts | 1 + packages/cli/src/github/folder-validator.ts | 1 + packages/cli/src/github/visibility.ts | 1 + packages/cli/src/index.ts | 1 + .../project-integration-writers.test.ts | 3 + .../project-integration-writers.ts | 3 + .../src/integrations/resolve-project-root.ts | 1 + .../write-project-ai-integrations.test.ts | 1 + .../write-project-ai-integrations.ts | 1 + .../src/integrations/write-project-skill.ts | 2 + packages/cli/src/mcp/bundle-identity.test.ts | 2 + packages/cli/src/mcp/bundle-identity.ts | 1 + packages/cli/src/mcp/host-liveness.ts | 1 + .../src/mcp/keepalive-orphan-reaping.test.ts | 7 +- packages/cli/src/mcp/lifecycle-logging.ts | 4 +- packages/cli/src/mcp/server.ts | 1 + packages/cli/src/mcp/shim.test.ts | 3 + packages/cli/src/mcp/shim.ts | 3 +- packages/cli/src/sharing/git-exclude.ts | 5 +- .../cli/src/tsdown-bundle-coverage.test.ts | 1 + packages/cli/src/utils/frontmatter.ts | 4 +- packages/cli/src/utils/process-scan.ts | 1 + .../_helpers/config-race-worker.ts | 1 + .../tests/integration/_helpers/lock-worker.ts | 6 +- .../detached-spawn-lifetime.test.ts | 3 +- .../integration/mcp-host-config-race.test.ts | 4 +- .../integration/multi-project-locks.test.ts | 10 +- packages/core/scripts/dump-schema.ts | 1 + .../src/bridge/bind-frontmatter-doc.test.ts | 1 + .../core/src/bridge/bind-frontmatter-doc.ts | 1 + packages/core/src/bridge/bridge-invariant.ts | 1 + .../src/bridge/frontmatter-region.test.ts | 2 + .../core/src/bridge/merge-three-way.test.ts | 1 + packages/core/src/bridge/merge-three-way.ts | 1 + packages/core/src/bridge/normalize.test.ts | 4 + packages/core/src/bridge/normalize.ts | 1 + packages/core/src/burst-grouping.ts | 1 + packages/core/src/config/bind-config-doc.ts | 1 + packages/core/src/config/bind-okignore-doc.ts | 1 + .../core/src/config/inspect-config-paths.ts | 1 + .../core/src/config/merge-layered.test.ts | 1 + packages/core/src/config/merge-layered.ts | 1 + .../core/src/config/read-config-safely.ts | 1 + packages/core/src/config/schema-leaf.test.ts | 2 + packages/core/src/config/schema-leaf.ts | 1 + packages/core/src/config/source-locator.ts | 1 + .../core/src/config/validate-patch-scopes.ts | 1 + .../core/src/config/write-config-patch.ts | 1 + packages/core/src/config/yaml-patch.ts | 1 + packages/core/src/constants/lifecycle.ts | 1 + .../src/constants/preview-embed-starters.ts | 1 + .../src/constants/preview-theme-tokens.ts | 1 + packages/core/src/constants/upload.test.ts | 1 + packages/core/src/constants/upload.ts | 1 + packages/core/src/desktop-bridge.ts | 2 +- .../src/extensions/blockquote-fidelity.ts | 1 + .../src/extensions/code-block-fidelity.ts | 1 + .../core/src/extensions/code-mark-fidelity.ts | 1 + packages/core/src/extensions/comment-block.ts | 1 + packages/core/src/extensions/comment-mark.ts | 1 + .../src/extensions/emphasis-fidelity.test.ts | 1 + .../core/src/extensions/emphasis-fidelity.ts | 1 + packages/core/src/extensions/escape-mark.ts | 1 + .../src/extensions/footnote-definition.ts | 1 + .../core/src/extensions/footnote-reference.ts | 1 + packages/core/src/extensions/frontmatter.ts | 1 + .../src/extensions/hard-break-fidelity.ts | 1 + .../core/src/extensions/heading-fidelity.ts | 1 + .../src/extensions/html-block-fidelity.ts | 1 + .../extensions/image-reference-fidelity.ts | 1 + .../core/src/extensions/image-src-fidelity.ts | 1 + .../core/src/extensions/link-fidelity.test.ts | 1 + packages/core/src/extensions/link-fidelity.ts | 1 + .../src/extensions/link-ref-def-fidelity.ts | 1 + packages/core/src/extensions/list.test.ts | 1 + packages/core/src/extensions/list.ts | 4 + .../extensions/source-literal-mark.test.ts | 1 + .../src/extensions/source-literal-mark.ts | 1 + .../core/src/extensions/table-fidelity.ts | 1 + packages/core/src/extensions/tag.ts | 1 + .../thematic-break-fidelity.test.ts | 1 + .../src/extensions/thematic-break-fidelity.ts | 1 + packages/core/src/frontmatter/tags.ts | 1 + packages/core/src/git/worktree-list-parser.ts | 1 + packages/core/src/handoff/index.ts | 1 + .../core/src/handoff/prompt-composer.test.ts | 2 + packages/core/src/handoff/types.ts | 1 + .../core/src/handoff/urn-ipc-registry.test.ts | 1 + packages/core/src/handoff/urn-ipc-registry.ts | 1 + packages/core/src/index.ts | 265 +++++++-------- packages/core/src/keepalive/keepalive.test.ts | 2 + packages/core/src/keepalive/keepalive.ts | 7 +- packages/core/src/logging/renderer-log.ts | 1 + ...tolink-void-html-guard.consistency.test.ts | 1 + ...autolink-void-html-guard.precision.test.ts | 1 + .../markdown/autolink-void-html-guard.test.ts | 1 + .../markdown/backslash-escape-guard.test.ts | 1 + .../core/src/markdown/callout-transformer.ts | 1 + .../callout-type-expansion.precision.test.ts | 1 + .../comment-promoter.precision.test.ts | 2 + .../core/src/markdown/comment-promoter.ts | 1 + .../markdown/details-accordion-promoter.ts | 1 + .../src/markdown/entity-ref-guard.test.ts | 1 + packages/core/src/markdown/fence-regions.ts | 1 + packages/core/src/markdown/fixtures/index.ts | 5 + .../src/markdown/fixtures/perf/generate.ts | 5 + .../src/markdown/footnote.precision.test.ts | 1 + .../core/src/markdown/handlers.mdx.test.ts | 2 + packages/core/src/markdown/handlers.test.ts | 1 + .../highlight-promoter.precision.test.ts | 3 + .../core/src/markdown/highlight-promoter.ts | 1 + .../core/src/markdown/html-to-mdast.test.ts | 1 + packages/core/src/markdown/html-to-mdast.ts | 4 +- packages/core/src/markdown/image-promoter.ts | 1 + packages/core/src/markdown/index.ts | 9 + .../math-block-guard.precision.test.ts | 2 + packages/core/src/markdown/math-promoter.ts | 1 + .../markdown/mdast-to-hast-handlers.test.ts | 2 + .../src/markdown/mdast-to-hast-handlers.ts | 1 + .../core/src/markdown/mdast-to-html.test.ts | 2 + packages/core/src/markdown/mdast-to-html.ts | 1 + .../markdown/mdx-jsx-mdast-promotion.test.ts | 1 + .../core/src/markdown/merged-walker.test.ts | 1 + packages/core/src/markdown/merged-walker.ts | 1 + .../markdown/mermaid-fence.precision.test.ts | 1 + .../core/src/markdown/mermaid-promoter.ts | 1 + .../src/markdown/parse-with-fallback.test.ts | 5 + .../core/src/markdown/parse-with-fallback.ts | 5 + .../src/markdown/pdf-embed.precision.test.ts | 1 + packages/core/src/markdown/pipeline.ts | 1 + .../core/src/markdown/position-aware-join.ts | 1 + .../core/src/markdown/position-slice.test.ts | 1 + packages/core/src/markdown/position-slice.ts | 4 +- .../markdown/promoted-mdast-coverage.test.ts | 1 + .../markdown/pua-codepoint-uniqueness.test.ts | 1 + .../raw-mdx-fallback-mdast-promotion.test.ts | 1 + .../skip-notion-whitespace.test.ts | 1 + .../rehype-plugins/skip-notion-whitespace.ts | 1 + .../rehype-plugins/strip-cocoa-meta.test.ts | 1 + .../rehype-plugins/strip-cocoa-meta.ts | 1 + .../strip-gdocs-wrapper.test.ts | 1 + .../rehype-plugins/strip-gdocs-wrapper.ts | 1 + .../strip-github-hovercard.test.ts | 1 + .../rehype-plugins/strip-github-hovercard.ts | 1 + .../strip-gmail-classes.test.ts | 1 + .../rehype-plugins/strip-gmail-classes.ts | 1 + .../strip-gsheets-wrapper.test.ts | 1 + .../rehype-plugins/strip-gsheets-wrapper.ts | 1 + .../rehype-plugins/strip-mso-styles.test.ts | 1 + .../rehype-plugins/strip-mso-styles.ts | 1 + .../strip-slack-classes.test.ts | 1 + .../rehype-plugins/strip-slack-classes.ts | 1 + .../rehype-plugins/strip-vscode-spans.test.ts | 1 + .../rehype-plugins/strip-vscode-spans.ts | 1 + .../core/src/markdown/resolve-image-url.ts | 1 + packages/core/src/markdown/safe-url.test.ts | 1 + packages/core/src/markdown/safe-url.ts | 1 + .../core/src/markdown/serialize-helpers.ts | 1 + .../markdown/single-dollar-math-promoter.ts | 1 + .../core/src/markdown/tag.precision.test.ts | 1 + .../core/src/markdown/to-markdown-handlers.ts | 1 + .../core/src/markdown/unknown-mdast-guard.ts | 1 + .../wiki-link-mdast-promotion.test.ts | 1 + .../src/markdown/wiki-link-micromark.test.ts | 1 + .../core/src/markdown/wiki-link-micromark.ts | 3 + .../src/markdown/wrap-as-inline-code.test.ts | 1 + packages/core/src/metrics/parse-health.ts | 1 + packages/core/src/registry/built-ins.ts | 8 + .../src/registry/canonical-compat.test.ts | 2 + packages/core/src/registry/index.ts | 1 + packages/core/src/registry/projection.test.ts | 1 + packages/core/src/registry/projection.ts | 1 + packages/core/src/registry/types.ts | 4 + .../src/registry/wiki-embed-compat.test.ts | 3 + packages/core/src/schema-invariant.test.ts | 4 + packages/core/src/schemas/api.type-tests.ts | 6 + .../core/src/schemas/api/_envelope.test.ts | 2 + packages/core/src/schemas/api/_envelope.ts | 3 + packages/core/src/schemas/api/_shared.ts | 1 + .../core/src/schemas/api/agent-write.test.ts | 1 + packages/core/src/schemas/api/agent-write.ts | 1 + packages/core/src/schemas/api/client-logs.ts | 1 + .../src/schemas/api/document-read.test.ts | 1 + .../core/src/schemas/api/document-read.ts | 1 + packages/core/src/schemas/api/embed-detect.ts | 1 + packages/core/src/schemas/api/history.ts | 1 + packages/core/src/schemas/api/index.ts | 1 + .../src/schemas/api/links-orphans.test.ts | 1 + .../core/src/schemas/api/links-orphans.ts | 1 + .../core/src/schemas/api/local-op.test.ts | 1 + packages/core/src/schemas/api/local-op.ts | 1 + packages/core/src/schemas/api/metrics.test.ts | 1 + packages/core/src/schemas/api/metrics.ts | 1 + packages/core/src/schemas/api/pages.test.ts | 1 + packages/core/src/schemas/api/pages.ts | 1 + packages/core/src/schemas/api/share.ts | 5 + packages/core/src/schemas/api/sync-seed.ts | 1 + .../core/src/schemas/api/tags-search.test.ts | 1 + packages/core/src/schemas/api/tags-search.ts | 2 + packages/core/src/schemas/cc1.ts | 1 + packages/core/src/server.ts | 1 + packages/core/src/shadow-repo-layout.test.ts | 12 +- packages/core/src/shadow-repo-layout.ts | 7 +- .../core/src/sharing/candidate-selection.ts | 1 + packages/core/src/sharing/receive-flow.ts | 1 + packages/core/src/sharing/share-url.ts | 1 + packages/core/src/skill-state/schema.ts | 1 + packages/core/src/util/atomic-yaml-write.ts | 19 +- packages/core/src/util/file-lock.ts | 22 +- .../core/src/utils/chunked-insert.test.ts | 1 + packages/core/src/utils/chunked-insert.ts | 1 + packages/core/src/utils/file-size.test.ts | 1 + packages/core/src/utils/identity.test.ts | 1 + packages/core/src/utils/identity.ts | 7 +- packages/core/src/utils/loom-embed.ts | 1 + packages/core/src/utils/path-resolve.ts | 1 + packages/core/src/utils/pdf-anchor.ts | 1 + packages/core/src/utils/tag-rollup.ts | 1 + packages/core/src/utils/vimeo-embed.ts | 1 + packages/core/src/utils/youtube-embed.test.ts | 4 + packages/core/src/utils/youtube-embed.ts | 1 + packages/core/src/y-prosemirror-patch.test.ts | 7 +- .../tests/health/parse-health-gate.test.ts | 1 + .../core/tests/health/parse-health-gate.ts | 11 +- .../core/tests/perf/markdown-bench.test.ts | 7 + .../core/tests/perf/regression-gate.test.ts | 2 + packages/core/tests/perf/regression-gate.ts | 6 + .../core/tests/perf/run-regression-gate.ts | 1 + packages/desktop/electron.vite.config.ts | 1 + packages/desktop/playwright.config.ts | 1 + packages/desktop/scripts/afterPack.mjs | 1 + packages/desktop/scripts/afterSign.mjs | 1 + .../desktop/src/main/append-okignore.test.ts | 3 +- packages/desktop/src/main/asset-allowlist.ts | 1 + packages/desktop/src/main/asset-menu.ts | 1 + packages/desktop/src/main/asset-safety-net.ts | 1 + packages/desktop/src/main/auto-updater.ts | 9 + packages/desktop/src/main/bootstrap.ts | 1 + .../desktop/src/main/branch-info-proxy.ts | 1 + .../src/main/bundle-replace-detector.ts | 1 + .../desktop/src/main/check-target-exists.ts | 1 + packages/desktop/src/main/consent-dialog.ts | 1 + .../src/main/create-new-project.test.ts | 4 +- .../desktop/src/main/create-new-project.ts | 2 + packages/desktop/src/main/debug-ipc.ts | 1 + packages/desktop/src/main/dialog-helpers.ts | 1 + .../src/main/driver-boot-smoke.test.ts | 1 + .../desktop/src/main/driver-boot-smoke.ts | 1 + packages/desktop/src/main/embed-referer.ts | 1 + .../desktop/src/main/folder-admission.test.ts | 2 + .../main/git-preflight-handler-otel.test.ts | 1 + .../src/main/git-preflight-handler.test.ts | 5 +- .../desktop/src/main/git-preflight-handler.ts | 1 + packages/desktop/src/main/git-remote.test.ts | 3 +- packages/desktop/src/main/git-remote.ts | 1 + packages/desktop/src/main/index.ts | 15 +- packages/desktop/src/main/ipc-handlers.ts | 9 +- packages/desktop/src/main/ipc-log.test.ts | 1 + packages/desktop/src/main/ipc-log.ts | 1 + .../desktop/src/main/ipc/install-skill.ts | 1 + .../local-op-auth-idempotent-start.test.ts | 1 + packages/desktop/src/main/ipc/local-op.ts | 1 + packages/desktop/src/main/ipc/seed.ts | 1 + packages/desktop/src/main/ipc/sharing.test.ts | 1 + packages/desktop/src/main/ipc/sharing.ts | 1 + packages/desktop/src/main/keepalive.ts | 1 + .../desktop/src/main/list-git-worktrees.ts | 1 + packages/desktop/src/main/mcp-wiring.ts | 11 +- packages/desktop/src/main/menu.ts | 1 + packages/desktop/src/main/navigator-window.ts | 1 + packages/desktop/src/main/ok-init.test.ts | 1 + packages/desktop/src/main/ok-init.ts | 1 + .../desktop/src/main/onboarding-telemetry.ts | 1 + .../src/main/process-safety-net.test.ts | 1 + .../desktop/src/main/process-safety-net.ts | 1 + .../desktop/src/main/project-mcp-reclaim.ts | 1 + .../desktop/src/main/read-git-dir-kind.ts | 1 + packages/desktop/src/main/read-head-branch.ts | 1 + .../src/main/reduced-transparency-handler.ts | 1 + .../src/main/remove-git-folder.test.ts | 4 +- .../desktop/src/main/remove-git-folder.ts | 1 + .../src/main/renderer-console-capture.ts | 4 +- .../desktop/src/main/resolve-share-target.ts | 1 + packages/desktop/src/main/shell-allowlist.ts | 1 + packages/desktop/src/main/show-gate.ts | 1 + .../desktop/src/main/skill-reclaim.test.ts | 3 +- packages/desktop/src/main/skill-reclaim.ts | 6 +- packages/desktop/src/main/state-store.ts | 4 +- .../desktop/src/main/theme-applied-handler.ts | 1 + packages/desktop/src/main/theme-handler.ts | 1 + packages/desktop/src/main/url-scheme.test.ts | 1 + packages/desktop/src/main/url-scheme.ts | 1 + .../desktop/src/main/utility-fork-env.test.ts | 1 + packages/desktop/src/main/utility-fork-env.ts | 1 + packages/desktop/src/main/window-manager.ts | 12 +- .../desktop/src/main/window-min-size.test.ts | 1 + packages/desktop/src/preload/index.ts | 1 + .../desktop/src/shared/bridge-contract.ts | 1 + packages/desktop/src/shared/entry-point.ts | 1 + packages/desktop/src/shared/ipc-channels.ts | 1 + packages/desktop/src/shared/ipc-events.ts | 1 + packages/desktop/src/shared/ipc-handler.ts | 1 + packages/desktop/src/shared/ipc-invoke.ts | 1 + packages/desktop/src/shared/ipc-send.ts | 1 + packages/desktop/src/shared/labels.ts | 1 + packages/desktop/src/utility/keyring-smoke.ts | 4 +- packages/desktop/src/utility/server-entry.ts | 1 + .../tests/integration/asset-open-ipc.test.ts | 1 + .../tests/integration/auto-updater.test.ts | 28 ++ .../integration/detached-lifecycle.test.ts | 7 +- .../tests/integration/dock-visibility.test.ts | 2 + .../tests/integration/handoff-ipc.test.ts | 4 +- .../ipc-channel-count-ratchet.test.ts | 1 + .../tests/integration/m1-smoke.test.ts | 4 +- .../no-loosely-typed-webcontents-ipc.test.ts | 1 + .../no-resolved-value-theme-source.test.ts | 1 + .../packaged-helper-runs-as-node.test.ts | 1 + .../playwright-topass-budget.test.ts | 1 + .../integration/smoke-mock-update.test.ts | 1 + .../desktop/tests/main/asset-menu.test.ts | 1 + .../tests/main/asset-open-handlers.test.ts | 1 + .../tests/main/asset-safety-net.test.ts | 1 + packages/desktop/tests/main/bootstrap.test.ts | 1 + .../main/bundle-replace-detector.test.ts | 1 + .../main/git-config-parser-parity.test.ts | 1 + .../tests/main/install-skill-ipc.test.ts | 1 + .../desktop/tests/main/ipc-handlers.test.ts | 1 + packages/desktop/tests/main/menu.test.ts | 1 + .../tests/main/navigator-window.test.ts | 1 + packages/desktop/tests/main/show-gate.test.ts | 1 + .../tests/main/theme-applied-handler.test.ts | 1 + .../desktop/tests/main/theme-handler.test.ts | 1 + .../tests/main/update-state-handlers.test.ts | 1 + .../tests/main/url-scheme-handler.test.ts | 1 + .../desktop/tests/main/window-manager.test.ts | 2 + packages/desktop/tests/preload/bridge.test.ts | 1 + .../tests/preload/update-listeners.test.ts | 1 + .../smoke/_helpers/electron-cleanup.test.ts | 3 +- .../tests/smoke/_helpers/electron-cleanup.ts | 4 +- .../tests/smoke/_helpers/electron-stderr.ts | 1 + .../_helpers/no-unbounded-app-close.test.ts | 1 + .../smoke/_helpers/parse-timeouts.test.ts | 4 +- .../tests/smoke/_helpers/parse-timeouts.ts | 1 + .../tests/smoke/_helpers/smoke-test.ts | 4 +- .../tests/smoke/_helpers/stale-build-guard.ts | 1 + .../tests/smoke/_nav-empty-840x600.e2e.ts | 4 +- .../tests/smoke/_nav-size-screenshots.e2e.ts | 4 +- .../smoke/agent-patch-divergence-probe.e2e.ts | 3 + .../desktop/tests/smoke/calibration.test.ts | 1 + .../desktop/tests/smoke/consent-dialog.e2e.ts | 4 +- .../tests/smoke/create-new-project.e2e.ts | 4 +- packages/desktop/tests/smoke/deep-link.e2e.ts | 4 +- .../desktop/tests/smoke/external-link.e2e.ts | 1 + .../desktop/tests/smoke/mcp-wiring.e2e.ts | 13 +- .../smoke/navigator-close-on-open.e2e.ts | 1 + .../tests/smoke/qa-create-new-extended.e2e.ts | 4 +- .../smoke/rename-divergence-probe.e2e.ts | 7 +- .../smoke/share-receive-multi-worktree.e2e.ts | 2 + .../smoke/sidebar-pill-lockstep-fade.e2e.ts | 1 + .../desktop/tests/smoke/theme-sync.e2e.ts | 1 + .../tests/smoke/window-min-size.e2e.ts | 1 + .../unit/auto-updater-apply-channel.test.ts | 1 + .../tests/unit/bridge-contract-types.test.ts | 1 + .../electron-builder-cli-native-deps.test.ts | 1 + .../unit/electron-builder-cli-pkgjson.test.ts | 1 + ...ectron-builder-parcel-watcher-deps.test.ts | 7 +- .../unit/electron-cleanup-bounded.test.ts | 1 + .../unit/entitlements-helper-split.test.ts | 1 + .../unit/helper-bundle-info-plist.test.ts | 1 + .../unit/helper-bundle-name-agreement.test.ts | 1 + .../desktop/tests/unit/ok-wrapper.test.ts | 1 + ...ke-test-fixture-attach-conditional.test.ts | 1 + .../unit/state-store-channel-fields.test.ts | 1 + .../tests/unit/state-store-m3-fields.test.ts | 1 + .../tests/utility/server-entry.test.ts | 2 + .../assets/skills/packs/entity-vault/SKILL.md | 48 +++ .../assets/skills/packs/gbrain/SKILL.md | 44 --- .../scripts/build-skill-bundles.test.ts | 5 +- packages/server/src/activity-log.ts | 1 + packages/server/src/agent-activity.test.ts | 4 + packages/server/src/agent-activity.ts | 4 + packages/server/src/agent-presence.test.ts | 1 + packages/server/src/agent-sessions.ts | 1 + ...ent-write-replace-crdt-convergence.test.ts | 1 + packages/server/src/agent-write-summary.ts | 1 + packages/server/src/api-create-page.test.ts | 7 +- .../src/api-document-list-ready-gate.test.ts | 1 + packages/server/src/api-extension.ts | 55 +++- .../src/api-rename-rollback-summary.test.ts | 2 + .../server/src/apply-managed-rename.test.ts | 1 + ...asset-serve-middleware.integration.test.ts | 1 + .../server/src/asset-serve-middleware.test.ts | 1 + packages/server/src/asset-serve-middleware.ts | 1 + packages/server/src/asset-walk.ts | 1 + packages/server/src/backlink-index.test.ts | 3 + packages/server/src/bash/index.ts | 1 + packages/server/src/bash/mtime-scan.ts | 3 +- packages/server/src/bash/parse-command.ts | 1 + .../server/src/boot-conflict-restore.test.ts | 4 +- packages/server/src/boot.test.ts | 3 + packages/server/src/boot.ts | 9 +- .../server/src/bridge-no-wallclock.test.ts | 1 + packages/server/src/bridge-quiescence.test.ts | 1 + packages/server/src/bridge-quiescence.ts | 1 + packages/server/src/bridge-watchdog.test.ts | 6 + packages/server/src/bridge-watchdog.ts | 4 + packages/server/src/build-skill-zip.test.ts | 1 + packages/server/src/build-skill-zip.ts | 1 + .../server/src/collab-message-limit.test.ts | 3 +- .../server/src/config-file-watcher.test.ts | 9 +- packages/server/src/config-file-watcher.ts | 4 +- .../server/src/config-persistence.test.ts | 7 +- packages/server/src/config-persistence.ts | 4 +- packages/server/src/config-telemetry.test.ts | 3 +- packages/server/src/config/paths.ts | 1 + packages/server/src/config/schema.test.ts | 2 + packages/server/src/config/schema.ts | 1 + packages/server/src/conflict-errors.test.ts | 1 + packages/server/src/conflict-errors.ts | 1 + .../server/src/conflict-lifecycle-seed.ts | 1 + packages/server/src/conflict-storage.test.ts | 4 + packages/server/src/conflict-storage.ts | 5 + packages/server/src/content-filter.test.ts | 1 + packages/server/src/content-filter.ts | 4 +- packages/server/src/content/enrichment.ts | 3 +- .../server/src/content/folder-rule-write.ts | 4 +- .../server/src/content/frontmatter-merge.ts | 1 + .../server/src/content/nested-folder-rules.ts | 1 + packages/server/src/content/substitution.ts | 1 + .../server/src/content/templates-resolver.ts | 1 + .../server/src/content/templates-write.ts | 10 +- packages/server/src/contributor-tracker.ts | 1 + packages/server/src/document-list.test.ts | 2 + packages/server/src/embed-probe.test.ts | 10 +- packages/server/src/embed-probe.ts | 3 + packages/server/src/error-classification.ts | 9 + packages/server/src/external-change.ts | 1 + packages/server/src/file-watcher.test.ts | 5 + packages/server/src/file-watcher.ts | 12 + .../server/src/frontmatter-malformed-error.ts | 1 + packages/server/src/fs-traced.ts | 3 + packages/server/src/fs/find-git-root.ts | 1 + packages/server/src/fs/find-project-root.ts | 1 + packages/server/src/git-branch-info.ts | 1 + packages/server/src/git-checkout.ts | 1 + packages/server/src/git-dirty.ts | 1 + packages/server/src/git-handle.ts | 3 + packages/server/src/git-identity.test.ts | 3 + packages/server/src/git-identity.ts | 5 + .../server/src/git-identity.worktree.test.ts | 3 + packages/server/src/git-mutex.ts | 1 + .../server/src/git-preflight-boot.test.ts | 9 +- .../server/src/git-preflight-spawn.test.ts | 1 + .../src/git-preflight-telemetry.test.ts | 1 + .../server/src/git-preflight-telemetry.ts | 1 + packages/server/src/git-preflight.test.ts | 12 + packages/server/src/git-preflight.ts | 9 + .../server/src/github-permissions.test.ts | 5 + packages/server/src/github-permissions.ts | 2 + packages/server/src/handoff-api.test.ts | 1 + packages/server/src/handoff-api.ts | 4 +- .../server/src/handoff-dispatch-api.test.ts | 1 + packages/server/src/handoff-dispatch-api.ts | 1 + packages/server/src/head-watcher.ts | 8 +- .../server/src/http/error-response.test.ts | 1 + packages/server/src/http/error-response.ts | 1 + .../src/http/request-validation.test.ts | 4 +- .../server/src/http/request-validation.ts | 1 + .../server/src/http/success-response.test.ts | 1 + packages/server/src/http/success-response.ts | 1 + packages/server/src/hub-candidates.ts | 1 + packages/server/src/idle-shutdown.test.ts | 2 + packages/server/src/idle-shutdown.ts | 1 + packages/server/src/init-project.ts | 1 + .../src/keepalive-presence-bootstrap.test.ts | 3 +- .../src/keepalive-presence-cleanup.test.ts | 3 +- packages/server/src/local-op-security.test.ts | 10 + packages/server/src/local-op-security.ts | 5 + packages/server/src/local-ops/auth-flow.ts | 1 + packages/server/src/local-ops/auth-query.ts | 1 + .../local-ops/clone-error-classify.test.ts | 1 + .../src/local-ops/clone-error-classify.ts | 1 + .../server/src/local-ops/clone-flow.test.ts | 1 + packages/server/src/local-ops/clone-flow.ts | 1 + packages/server/src/local-ops/subprocess.ts | 4 +- packages/server/src/local-ops/types.ts | 1 + packages/server/src/local-sink-resolver.ts | 1 + packages/server/src/logger.ts | 2 + .../server/src/managed-rename-rewrite.test.ts | 1 + packages/server/src/mcp-http.test.ts | 7 +- packages/server/src/mcp-mount.ts | 4 +- packages/server/src/mcp/agent-identity.ts | 1 + packages/server/src/mcp/logger.ts | 3 + packages/server/src/mcp/tools/consolidate.ts | 1 + .../server/src/mcp/tools/discover-body.ts | 1 + .../server/src/mcp/tools/discover.test.ts | 1 + packages/server/src/mcp/tools/discover.ts | 1 + .../server/src/mcp/tools/edit-document.ts | 1 + .../server/src/mcp/tools/edit-frontmatter.ts | 9 +- packages/server/src/mcp/tools/exec.test.ts | 1 + .../server/src/mcp/tools/folder-config.ts | 1 + .../mcp/tools/get-authoring-palette.test.ts | 1 + .../src/mcp/tools/get-authoring-palette.ts | 1 + .../src/mcp/tools/get-components.test.ts | 1 + .../server/src/mcp/tools/get-components.ts | 1 + packages/server/src/mcp/tools/get-config.ts | 1 + .../src/mcp/tools/get-conflict-content.ts | 1 + .../src/mcp/tools/get-preview-url.test.ts | 1 + .../server/src/mcp/tools/get-preview-url.ts | 4 +- packages/server/src/mcp/tools/index.ts | 1 + packages/server/src/mcp/tools/ingest.test.ts | 1 + packages/server/src/mcp/tools/ingest.ts | 1 + packages/server/src/mcp/tools/links.ts | 1 + .../server/src/mcp/tools/list-conflicts.ts | 1 + .../tools/output-schema-strictness.test.ts | 5 +- .../src/mcp/tools/preview-url-test-helpers.ts | 1 + packages/server/src/mcp/tools/rename.ts | 1 + packages/server/src/mcp/tools/research.ts | 1 + .../server/src/mcp/tools/resolve-conflict.ts | 1 + packages/server/src/mcp/tools/search.test.ts | 1 + packages/server/src/mcp/tools/search.ts | 1 + packages/server/src/mcp/tools/shared.test.ts | 5 + packages/server/src/mcp/tools/shared.ts | 3 + .../tools/templates-input-strictness.test.ts | 1 + packages/server/src/metrics.ts | 1 + .../server/src/missing-ok-config-error.ts | 1 + packages/server/src/package-exports.test.ts | 1 + .../src/paired-write-enforcement.test.ts | 3 + .../server/src/paired-write-origin.test.ts | 5 +- packages/server/src/pane-target.ts | 4 +- packages/server/src/perf-measurement.test.ts | 1 + packages/server/src/perf-measurement.ts | 1 + .../src/persistence-deferred-store.test.ts | 6 +- .../server/src/persistence-fan-out.test.ts | 2 + .../src/persistence-phantom-doc-guard.test.ts | 1 + .../src/persistence-ytext-truth.test.ts | 5 + packages/server/src/persistence.test.ts | 3 + packages/server/src/persistence.ts | 14 +- packages/server/src/process-lock.ts | 10 +- packages/server/src/recently-removed-docs.ts | 1 + packages/server/src/reconciliation.test.ts | 4 + packages/server/src/reconciliation.ts | 7 + .../server/src/removal-redirect-guard.test.ts | 13 +- packages/server/src/removal-redirect-guard.ts | 1 + packages/server/src/rename-log.test.ts | 1 + packages/server/src/rename-log.ts | 17 +- .../server/src/resolve-package-version.ts | 3 +- packages/server/src/save-version.test.ts | 5 +- packages/server/src/seed/index.ts | 1 + .../src/seed/install-pack-skill.test.ts | 6 +- .../server/src/seed/install-pack-skill.ts | 4 +- packages/server/src/seed/path-safety.ts | 1 + packages/server/src/seed/starter.test.ts | 71 +++- packages/server/src/seed/starter.ts | 133 +++++--- packages/server/src/seed/types.ts | 1 + .../server/src/serialize-doc-ytext.test.ts | 2 + packages/server/src/server-factory.test.ts | 8 + packages/server/src/server-factory.ts | 20 +- packages/server/src/server-lock.ts | 1 + packages/server/src/server-observers.test.ts | 6 + packages/server/src/server-observers.ts | 5 + packages/server/src/shadow-branch-gc.ts | 10 +- packages/server/src/shadow-lock.ts | 4 +- packages/server/src/shadow-repo.test.ts | 1 + packages/server/src/shadow-repo.ts | 59 +++- packages/server/src/share/construct-url.ts | 1 + packages/server/src/share/git-context.ts | 1 + .../src/share/publish.integration.test.ts | 4 + packages/server/src/share/publish.test.ts | 1 + packages/server/src/share/publish.ts | 11 +- .../server/src/skill-install-events.test.ts | 1 + packages/server/src/skill-install-events.ts | 1 + packages/server/src/skill-install.test.ts | 5 +- packages/server/src/skill-install.ts | 13 +- packages/server/src/skill-state.test.ts | 1 + packages/server/src/skill-state.ts | 1 + packages/server/src/spawn-cursor-api.test.ts | 1 + packages/server/src/spawn-cursor-api.ts | 1 + packages/server/src/spawn-detached.test.ts | 1 + packages/server/src/spawn-detached.ts | 4 +- packages/server/src/sync-engine.test.ts | 21 +- packages/server/src/sync-engine.ts | 36 +- packages/server/src/sync-timing.test.ts | 1 + packages/server/src/sync-timing.ts | 1 + packages/server/src/tag-index.ts | 1 + packages/server/src/telemetry-file-sink.ts | 14 +- packages/server/src/telemetry.test.ts | 1 + packages/server/src/timeline-query.ts | 19 +- .../server/src/tsdown-bundle-coverage.test.ts | 1 + packages/server/src/ui-lock.ts | 1 + packages/server/src/upload-errors.test.ts | 3 + packages/server/src/upload-errors.ts | 1 + packages/server/src/upload-streaming.test.ts | 1 + packages/server/src/upload-streaming.ts | 9 +- packages/server/src/version-constants.ts | 3 +- 1441 files changed, 3858 insertions(+), 960 deletions(-) create mode 100644 .changeset/entity-vault-gbrain-compatible-rename.md create mode 100644 docs/content/workflows/entity-vault.mdx delete mode 100644 docs/content/workflows/gbrain.mdx create mode 100644 packages/server/assets/skills/packs/entity-vault/SKILL.md delete mode 100644 packages/server/assets/skills/packs/gbrain/SKILL.md diff --git a/.changeset/entity-vault-gbrain-compatible-rename.md b/.changeset/entity-vault-gbrain-compatible-rename.md new file mode 100644 index 00000000..dcba9f91 --- /dev/null +++ b/.changeset/entity-vault-gbrain-compatible-rename.md @@ -0,0 +1,9 @@ +--- +"@inkeep/open-knowledge": patch +"@inkeep/open-knowledge-core": patch +"@inkeep/open-knowledge-server": patch +"@inkeep/open-knowledge-app": patch +"@inkeep/open-knowledge-desktop": patch +--- + +Rename the `gbrain` starter pack to **Entity vault (GBrain-compatible)** and reposition it as a human cockpit for GBrain-style Markdown brains rather than a GBrain reimplementation. This is a breaking pre-release rename: the canonical pack ID is now `entity-vault` with no `gbrain` alias, so `ok seed --pack gbrain` no longer resolves — use `ok seed --pack entity-vault`. The pack picker, seed dialog, toast, and CLI list now show "Entity vault (GBrain-compatible)". Generated dossier templates are tightened for GBrain-compatible parsing — document-level `title:` frontmatter, an explicit `--- timeline ---` sentinel, and parseable `- **YYYY-MM-DD** | source | @author — … Confidence: …` timeline bullets with path-qualified `[[folder/slug|Label]]` links. The workflow doc moved from `/workflows/gbrain` to `/workflows/entity-vault`. OK edits and reviews the Markdown; Garry Tan's `gbrain`, if installed, can still import/sync the same vault — interop is Markdown + Git, with no deep integration implied. diff --git a/docs/content/reference/core-concepts.md b/docs/content/reference/core-concepts.md index 473c4bd5..461764c4 100644 --- a/docs/content/reference/core-concepts.md +++ b/docs/content/reference/core-concepts.md @@ -72,7 +72,7 @@ Agents use these to repair and densify the graph as they work, instead of lettin ### Closed-loop grounding -Every factual claim should trace back to a source **inside** the knowledge base. External material is pulled in and cited locally rather than linked off to the open web, so the knowledge base stays self-contained and auditable. This is the backbone of the source-grounded workflows: see [Karpathy's LLM wiki workflow](../workflows/karpathy-llm-wiki.mdx) and the [Gbrain workflow](../workflows/gbrain.mdx). +Every factual claim should trace back to a source **inside** the knowledge base. External material is pulled in and cited locally rather than linked off to the open web, so the knowledge base stays self-contained and auditable. This is the backbone of the source-grounded workflows: see [Karpathy's LLM wiki workflow](../workflows/karpathy-llm-wiki.mdx) and the [Entity vault (GBrain-compatible) workflow](../workflows/entity-vault.mdx). Open Knowledge is unopinionated about which workflow you adopt; these are supported patterns, not requirements. Grounding, backlinks, and the graph tools work the same regardless of how you choose to organize. diff --git a/docs/content/workflows/entity-vault.mdx b/docs/content/workflows/entity-vault.mdx new file mode 100644 index 00000000..15813697 --- /dev/null +++ b/docs/content/workflows/entity-vault.mdx @@ -0,0 +1,182 @@ +--- +title: Entity vault (GBrain-compatible) workflow +description: A GBrain-compatible Markdown workflow for people, companies, meetings, and concepts. Open Knowledge is the cockpit/editor/review layer; Garry Tan's gbrain can import or sync the same vault for indexing and automation. +--- + +An **Entity vault (GBrain-compatible Markdown)** is a Markdown brain organized around typed dossiers: people, companies, meetings, concepts, originals, and media. Each durable dossier has two zones: + +1. **Compiled truth** — the current synthesis, rewritten as evidence changes. +2. **Timeline** — append-only evidence bullets, dated and attributable. + +Open Knowledge scaffolds and edits that Markdown. Garry Tan's [`gbrain`](https://github.com/garrytan/gbrain), if you install it, can import/sync the same vault and add its DB-backed retrieval, graph extraction, embedding, and automation. OK does **not** replace `gbrain`; it gives GBrain-style Markdown brains a human cockpit for review, correction, attribution, and Git-visible edits. + +## Who this is for + +- You want a second brain that tracks **people, companies, meetings, and concepts**, not just source documents. +- You want agents to maintain dossiers while you keep final editorial control. +- You already use `gbrain` and want a visual/editor layer over the Markdown files it indexes. +- You do not use `gbrain` yet, but want a portable GBrain-compatible Markdown shape you can adopt later. + +## The division of labor + +| Layer | Open Knowledge | Garry Tan's `gbrain` | +| --- | --- | --- | +| Markdown files | Creates, edits, reviews, templates, folder guidance | Imports/syncs as source material | +| Human correction | WYSIWYG/source editor, activity attribution, version checkpoints | Sees corrections after import/sync | +| Agent writes | OK MCP tools (`write_document`, `edit_document`, `links`, `version`, `search`, `exec`) | GBrain MCP/skills if you choose to run them separately | +| Search/retrieval | OK project search and graph tooling | PGLite/Postgres, embeddings, hybrid retrieval, graph/index automation | +| Interop contract | Plain Markdown + Git | `gbrain import` / `gbrain sync --repo` | + +## What the pack creates + +Pick **Entity vault (GBrain-compatible)** in the starter-pack picker, or run: + +```bash +ok seed --pack entity-vault +``` + +By default the pack suggests a `vault/` subfolder and creates: + +```txt +your-project/ +└── vault/ + ├── USER.md + ├── SOUL.md + ├── ACCESS_POLICY.md + ├── HEARTBEAT.md + ├── log.md + ├── people/ + ├── companies/ + ├── meetings/ + ├── concepts/ + ├── originals/ + └── media/ +``` + +Each folder includes an `.ok/frontmatter.yml` description that agents see during file listings/searches, plus templates under `.ok/templates/`. + +## Markdown shape + +A person dossier generated from the pack starts in a GBrain-compatible shape: + +```markdown +--- +type: person +title: Jane Founder +created: 2026-05-12 +author: mike +tags: [person, founder] +--- + +## Compiled truth + +Co-founder and CEO of [[companies/jane-co|Jane Co]]. Met through +[[people/alex-seed-investor|Alex Seed Investor]]. Strong on cost-per-token +economics; go-to-market is still developing. + +--- timeline --- + +## Timeline + +- **2026-05-12** | [[meetings/2026-05-12-jane-founder-coffee|coffee meeting]] | @mike — Jane described Jane Co's agent-runtime observability wedge. Confidence: direct note. +- **2026-05-13** | agent enrichment | @agent — Public GitHub profile confirms prior OSS profiler work. Confidence: external profile. +``` + +Compatibility details: + +- Use document frontmatter `title:` and `type:`. +- Prefer path-qualified wikilinks where identity matters: `[[people/jane-founder|Jane Founder]]`, `[[companies/jane-co|Jane Co]]`. +- Keep the compiled-truth section rewritable. +- Separate compiled truth from the timeline with a `--- timeline ---` sentinel line. +- Keep timeline entries append-only and dated: `- **YYYY-MM-DD** | source | @author — event. Confidence: ...`. + +## Worked loop: meeting → dossiers → human correction + +1. Create `meetings/2026-05-12-jane-founder-coffee.md` from the meeting template. +2. Write raw notes with path-qualified links: + +```markdown +--- +type: meeting +title: Jane Founder coffee +date: 2026-05-12 +attendees: [Jane Founder] +tags: [meeting, ai-infra] +--- + +## Notes + +Jane runs [[companies/jane-co|Jane Co]], a stealth AI infra company focused on +[[concepts/agent-runtime-observability|agent-runtime observability]]. +Introduced by [[people/alex-seed-investor|Alex Seed Investor]]. + +Quote: "the agent runtime is the new kernel." +``` + +3. Ask your MCP-capable agent: + +```txt +From meetings/2026-05-12-jane-founder-coffee.md, create or update the +referenced person, company, and concept dossiers using the Entity vault (GBrain-compatible Markdown) templates. Append dated timeline bullets. Do not rewrite existing timeline entries. +``` + +4. Review the agent edits in OK. If the agent inferred something wrong, correct it in the editor. +5. Save a version checkpoint before any risky enrichment pass. +6. Commit the Markdown changes. + +The core value is the correction loop: the durable memory is not hidden in a model context window or database row. It is a file you can inspect, edit, diff, and roll back. + +## Interop with Garry Tan's `gbrain` + +If you also run `gbrain`, point it at the same Markdown vault after OK has written the files: + +```bash +gbrain import ~/your-ok-vault --no-embed +gbrain embed --stale +gbrain sync --repo ~/your-ok-vault +``` + +Recommended operating model: + +- Use `gbrain import ... --no-embed` for the first bulk load when you want to avoid embedding during the scan. +- Run `gbrain embed --stale` after import or after any no-embed sync. +- Commit OK changes, then run `gbrain sync --repo ~/your-ok-vault` for incremental refresh. +- Keep OK as the place where humans inspect/correct the Markdown. +- Keep `gbrain` as the engine that indexes, searches, extracts graph/timeline data, and runs its own automation. + +No file collision is required: OK writes Markdown; `gbrain` reads/imports/syncs that Markdown into its own configured storage. If you wire separate GBrain skills or cron jobs, treat that as a separate integration choice rather than something the Entity vault (GBrain-compatible Markdown) pack does by itself. + +## Power-user demo path + +For a GBrain-literate reviewer, the demo target is not "OK replaces GBrain." It is: + +1. Open a GBrain-style Markdown vault in OK. +2. Let an agent write/update a dossier through OK MCP. +3. Watch the edit land live with attribution. +4. Correct a wrong claim by hand in OK. +5. Save a checkpoint and commit. +6. Run `gbrain sync --repo `. +7. Query/search in `gbrain` and see the corrected fact. + +Aha moment: **GBrain makes agent memory useful; OK makes the Markdown memory inspectable, correctable, and collaborative.** + +## Routine + +| Cadence | What | +| --- | --- | +| After each meeting | Drop raw notes into `meetings/-.md`; link mentioned people/companies/concepts. | +| End of day | Ask an agent to create/update dossiers and append timeline bullets from new meetings. | +| Weekly | Run OK's dead-link audit; triage new entities vs typos vs intentional placeholders. | +| Monthly | Audit stale dossiers, empty timelines, and compiled truth that conflicts with recent evidence. | +| When using `gbrain` | Commit OK edits, then run `gbrain sync --repo ` and `gbrain embed --stale` as needed. | + +## Naming note + +The pack is presented as **Entity vault (GBrain-compatible)**, not **GBrain Entity Vault**. "Entity vault" names the portable Markdown workflow OK scaffolds. "GBrain-compatible" describes the interop contract with Garry Tan's `gbrain` without claiming ownership of his project or implying OK is a replacement engine. + +## Further reading + +- **[Garry Tan's gbrain](https://github.com/garrytan/gbrain).** Optional engine/index/automation layer for the same Markdown vault. +- **[Karpathy LLM wiki workflow](./karpathy-llm-wiki.mdx).** Source-grounded counterpart to the entity-vault posture. +- **[Agent activity](../features/agent-activity.mdx).** How OK attributes human and agent edits. +- **[Claude Code](../integrations/claude-code.mdx)**, **[Cursor](../integrations/cursor.mdx)**, **[Codex](../integrations/codex.mdx).** MCP-capable agent hosts. diff --git a/docs/content/workflows/gbrain.mdx b/docs/content/workflows/gbrain.mdx deleted file mode 100644 index c4655882..00000000 --- a/docs/content/workflows/gbrain.mdx +++ /dev/null @@ -1,309 +0,0 @@ ---- -title: Gbrain workflow -description: Entity-grounded second brain in Open Knowledge. Typed dossiers for people, companies, meetings, concepts. The Gbrain starter pack scaffolds the full layout in one click. Pattern inspired by Garry Tan's gbrain. ---- - -An entity-grounded second brain: typed dossiers for every person you meet, every company you track, every meeting you sit through. Each dossier has a top section your agent rewrites as new evidence arrives ("compiled truth") and an append-only timeline below ("evidence trail"). Open Knowledge ships this layout as the **Gbrain starter pack**: one click in the pack picker and you have the folder structure, the templates, and the agent-readable folder frontmatter in place. The pattern is inspired by Garry Tan's [gbrain](https://github.com/garrytan/gbrain); OK ships its own implementation of the layout. - -The point of this guide is to show how **Open Knowledge's features compose** to make this pattern feel native: the starter-pack picker scaffolds the entire layout in one click; per-folder templates + agent-readable folder frontmatter teach the LLM the conventions without you writing a schema doc; the WYSIWYG editor lets you hand-curate without thinking about markdown syntax; the agent activity panel attributes every edit (yours and the agent's); the `links` and `version` tools, plus the standard MCP tools (`write_document`, `edit_document`, `search`, `exec`), compose into routines that take ten minutes a week instead of an hour. Every step below uses three or four of these together. That's the product. - -## Who this is for - -- **You want a brain that knows people, companies, and your relationships**, not just a stack of source documents. -- **You're new to LLM-curated PKM** and the entity-tracking posture matches how you think. - -## Before you begin - -- **The Open Knowledge desktop app.** Install it from the [Quickstart](../get-started/quickstart.mdx). The desktop app is macOS-only today; Linux and Windows desktop builds are deferred. -- **An MCP-capable agent assistant.** [Claude Code](../integrations/claude-code.mdx), [Cursor](../integrations/cursor.mdx), or [Codex](../integrations/codex.mdx). The OK desktop app's first-launch flow detects them and wires them up. - -That's the whole toolchain. Everything below uses OK's MCP server + your agent; no other software required. - -## The scenario - -You meet a founder over coffee on Tuesday. By Wednesday morning, your agent knows who they are, what they're building, who their co-founders are, that you previously met their seed investor, and every concrete thing they said yesterday, in their words, with the date. You walk into Wednesday's calls already briefed. Zero post-meeting research. - -## What's in your vault after one Tuesday - -``` -your-vault/ -├── USER.md ← your profile (created by the pack) -├── SOUL.md ← agent identity / values -├── ACCESS_POLICY.md ← what the agent may surface -├── HEARTBEAT.md ← cadence cues -├── log.md ← append-only audit trail -├── people/ -│ ├── jane-founder.md ← compiled truth + timeline -│ └── alex-seed-investor.md ← (previously created) -├── companies/ -│ └── jane-co.md -├── meetings/ -│ └── 2026-05-12-jane-founder-coffee.md -├── concepts/ -├── originals/ ← your own thinking -└── media/ ← transcripts, voice notes -``` - -A typical `people/jane-founder.md` after the meeting + one enrichment pass: - -```markdown ---- -title: Jane Founder -type: person -tags: [founder, ai-infra] ---- - -## Compiled truth - -Co-founder + CEO of [[Jane Co]], stealth AI infra play. Met through -[[Alex Seed Investor]]. Sharp on cost-per-token economics; less developed -on go-to-market. - ---- - -## Timeline - -2026-05-12: Coffee meeting (see [[2026-05-12-jane-founder-coffee]]). -2026-05-13: Agent enrichment. LinkedIn confirms 4y at hyperscaler; OSS profiler at 5.1k stars. -``` - -Compiled truth is rewritable as evidence arrives. Timeline is append-only. The split is what makes the workflow trustworthy. - -## Setup - -### 1. Pick the Gbrain pack (one click) - -Launch the OK desktop app, drag-and-drop or open a project folder, then click the empty-state **Pick a starter pack** → select **Gbrain** → confirm a subfolder if you want it nested (default `vault/`). Apply. - -You get six folders (`people/`, `companies/`, `meetings/`, `concepts/`, `originals/`, `media/`), six templates (`person`, `company`, `meeting`, `concept`, `original`, `transcript`), agent-readable folder descriptions in each `.ok/frontmatter.yml`, and five root files (`USER.md`, `SOUL.md`, `ACCESS_POLICY.md`, `HEARTBEAT.md`, `log.md`). - -The starter-pack picker is idempotent (safe to re-run on the same project). - -### 2. Fill in `USER.md` (60 seconds) - -Open `USER.md` in the editor. Add your name, role, focus areas. That's enough for every future agent prompt to know who you are. `SOUL.md`, `ACCESS_POLICY.md`, and `HEARTBEAT.md` are stubs to grow into. - -### Do you need to install `gbrain` itself? No, but here's what it adds if you do - -**You don't need it.** The pack + OK's MCP tools (`write_document`, `edit_document`, `links`, `version`, `search`, `exec`) + your agent assistant cover every workflow in this guide. Most users stop here. - -If you want a few capabilities OK doesn't ship, Garry Tan's [`gbrain`](https://github.com/garrytan/gbrain) installs alongside OK and points at the same vault directory. It adds: - -- **Scheduled `dream` cycle.** 11 phases run on a cron: `lint → backlinks → sync → synthesize → extract → patterns → recompute_emotional_weight → consolidate → embed → orphans → purge`. Operates in Postgres. -- **`voice-note-ingest` skill.** Captures voice memos verbatim and routes content into pack folders (`originals/` / `concepts/` / `people/` / `companies/`) plus gbrain-native folders it creates as needed (`ideas/` / `personal/` / `voice-notes/`) based on content classification. -- **Vector retrieval.** pgvector with HNSW cosine search; runs on PGLite (default, embedded) or Postgres. Sits on top of OK's BM25 + literal search (`exec`'s `grep`). -- **34 skills total.** Person enrichment tiers, meeting ingestion, briefing generation, archive crawling, soul-audit, and more. - -Setup if you want it: - -```bash -git clone https://github.com/garrytan/gbrain && cd gbrain && bun install && bun link -gbrain init # user-level; creates ~/.gbrain/ only -``` - -`gbrain init` is entirely user-level. It creates `~/.gbrain/` (config + PGLite database + gbrain's own identity stubs) and doesn't touch your OK vault. To bulk-load your vault into gbrain's Postgres, then keep it in sync: - -```bash -gbrain import ~/your-ok-vault --no-embed # first-time bulk load (re-scans every time) -gbrain embed --stale # generate embeddings for the new content - -gbrain sync --repo ~/your-ok-vault # daily incremental sync (uses git history) -gbrain sync --repo ~/your-ok-vault --watch # active-editing session -gbrain sync --install-cron # scheduled -``` - -Both gbrain's MCP server and OK's register with your agent assistant. The pack-only path stays fully supported; gbrain is purely additive. - -**Compatibility:** gbrain operates entirely from `~/.gbrain/` (config, Postgres database, gbrain's own user-level identity files all live there). `gbrain import` / `sync` read your OK vault one-way into Postgres; gbrain doesn't write canonical dossiers back. The pack's templates + OK's MCP tools + your agent are how new dossiers land in the vault. No file collision; install in either order. - -## A worked example, end to end - -Tuesday 10am through Wednesday 5pm. Everything below uses the OK desktop app + your agent assistant (or any MCP-capable host). - -### Tuesday 10:00, in the cafe - -Open OK on your laptop. New file in the sidebar: `meetings/2026-05-12-jane-founder-coffee.md`. The pack's `meeting` template lands the right frontmatter automatically: - -```markdown ---- -title: Jane Founder coffee -type: meeting -date: 2026-05-12 -attendees: [Jane Founder] -tags: [meeting, ai-infra] ---- - -## Notes - -Jane runs [[Jane Co]]: stealth AI infra play, 6 months in, three people, -agent-runtime observability. Background: 4 years at a hyperscaler, shipped -an OSS profiler. Pulled in by [[Alex Seed Investor]]. - -Pitch: cost-per-token telemetry for multi-agent systems. Sharp on unit -economics; go-to-market less developed. - -Quote: "the agent runtime is the new kernel." - -## Action items - -- [ ] Intro to two design partners next week. -``` - -The `[[Jane Co]]` and `[[Alex Seed Investor]]` wikilinks render as redlinks for now; their dossiers don't exist yet. The CRDT flushes the file to disk in under a second. - -### Tuesday 10:45, walking to the next call - -Open your agent assistant on your phone (or back at your desk): - -``` -> from meetings/2026-05-12-jane-founder-coffee.md, create or update -> dossiers for everyone mentioned, using the gbrain pack's person and -> company templates. Don't enrich yet; just extract the entities and -> seed the timeline entries. -``` - -The agent calls `mcp__open-knowledge__write_document` with the `person` template for `people/jane-founder.md`, the `company` template for `companies/jane-co.md`, and `edit_document` to append a timeline entry to the existing `people/alex-seed-investor.md` (*"2026-05-12: Introduced Jane Founder to me. See [[2026-05-12-jane-founder-coffee]]."*). - -OK's activity panel shows three fresh agent edits. The wikilinks in your meeting note are no longer redlinks. - -### Tuesday 9:00 PM, agent-driven enrichment - -``` -> enrich people/jane-founder.md and companies/jane-co.md from public -> sources (LinkedIn, GitHub, recent press). Rewrite the compiled-truth -> section if you find load-bearing facts; append timeline entries citing -> what you found. Don't touch existing timeline entries. -``` - -The agent uses its web-fetch capability plus the pack's frontmatter rules (it reads the folder descriptions on each `exec` directory listing, so it knows compiled-truth-above / timeline-below discipline). Edits land via `mcp__open-knowledge__edit_document`. The OK editor renders the diff in real time; the activity panel logs each write. - -### Wednesday 7:00 AM, briefing - -``` -> morning briefing: today's calendar plus per-attendee context from -> people/ and companies/, with talking points -``` - -The agent reads the dossiers and returns a brief. You scan it, spot that the agent inferred Alex was Jane's seed lead (he wasn't; he just made the intro). You open `people/jane-founder.md` in the OK editor and fix that line in WYSIWYG. The activity panel logs your edit alongside the agent's; both attributions stack cleanly. - -Save a checkpoint (`mcp__open-knowledge__version`, `action: save`) so a later enrichment pass doesn't quietly overwrite your correction. - -### Wednesday 5:00 PM, your own thinking lands in `originals/` - -Post-call, you have a take. Open `originals/2026-05-13-jane-co-thoughts.md` in the OK editor; the pack's `original` template kicks in: - -```markdown ---- -title: Jane Co, first read -type: idea -date: 2026-05-13 -tags: [original, ai-infra, jane-co] ---- - -After Alex this morning + the meeting yesterday with [[Jane Founder]]: -[[Jane Co]]'s cost-per-token framing is sharp but they're under-baking -GTM. The OSS profiler is the wedge nobody's mentioned in pitch. Three -things to watch: hiring a GTM lead in Q3, profiler-community acceptance -of the runtime-cost taxonomy, Alex's read on the team. -``` - -OK's CRDT flushes. The agent picks this up on the next maintenance pass: the wikilinks become inbound backlinks on both dossiers, and the substantive claim becomes timeline material. - -Two days, end-to-end. No clipboard copy. No external sync. - -**What just composed.** The 48-hour arc above used: the **Gbrain pack** (folder structure + templates + folder frontmatter), the **WYSIWYG editor** (visual editing without markdown syntax), **CRDT auto-flush** (your edits land on disk in under a second), **agent activity attribution** (every write traceable to a human or an agent), `mcp__open-knowledge__write_document` (typed dossier creation), `mcp__open-knowledge__edit_document` (surgical compiled-truth + timeline updates), `mcp__open-knowledge__version` (snapshot before risky enrichment), and the **wikilink graph + folder frontmatter** that lets the agent operate on the entity layer without you re-explaining the conventions per prompt. The same vault. One product. - -## Second worked example: dead links → triage → WYSIWYG - -Entity vaults accumulate redlinks fast: a typed `[[Jane Co]]` before the dossier existed, a typo `[[Alex Investo]]`, a placeholder `[[2026-Q3 Plan]]` for a doc you'll write later. OK's `links` dead-link audit + your agent + the WYSIWYG editor close the loop in about 10 minutes a week. - -### 1. Audit - -``` -> find every dead link across the vault and group results by missing target -``` - -`mcp__open-knowledge__links` with `kind: dead` returns a map of each missing target plus the source docs pointing at it. - -### 2. Agent triage - -``` -> for each dead target, read the source line and decide: -> (a) new entity → create a dossier with the right pack template, -> (b) typo → propose the corrected wikilink, -> (c) intentional placeholder → leave it; add to originals/_intentional-redlinks.md -> show me the plan before you act. -``` - -The agent reads source lines, greps `people/` / `companies/` for closest-name matches, returns a plan: - -- `[[Jane Co]]` → (a) new company. Create `companies/jane-co.md` from the `company` template; initial timeline entries from the two source backlinks; enrich from public sources. -- `[[Alex Investo]]` → (b) typo. Closest match: `Alex Investor`. Fix the source line. -- `[[2026-Q3 Plan]]` → (c) placeholder. One-line entry in `originals/_intentional-redlinks.md`. - -You approve. - -### 3. Execute + WYSIWYG correction - -The agent runs `write_document`, `edit_document` for the typo, and a follow-up enrichment pass on the new dossier. - -Open `companies/jane-co.md` in the OK editor. The agent's compiled-truth sentence reads: - -> Stealth AI infra play. Public profile shows seed round (undisclosed amount) led by [[Alex Investor]] (April 2026). Three people. No press beyond the announce post. - -You know something the agent doesn't: Jane mentioned a fourth hire starting next month. You append in WYSIWYG: - -> Three people. Fourth hire (eng) starts June 2026. - -Your edit is attributed in the activity panel as a human write, stacked next to the agent's earlier edits. The mid-paragraph insertion lands without you touching frontmatter or markdown syntax. - -### 4. Confirm clean - -``` -> find the dead links again; confirm the three resolved -``` - -The audit returns one remaining redlink (`[[2026-Q3 Plan]]`, intentional) plus the placeholder index entry. Graph is whole. - -### Why this loop matters - -Five OK features compose into the routine: - -- `links` (the dead-link audit) finds structural breakage at vault scale in one call. -- The agent triages: reads source context via `exec`, classifies each dead link, routes to the right tool. -- The pack's `/.ok/templates/` mean every dossier the agent creates starts in the right shape, with the right body convention; the `/.ok/frontmatter.yml` descriptions tell the agent what each folder is for — no per-prompt reminders. -- The WYSIWYG editor + CRDT auto-flush make hand-curation a 5-second mid-paragraph insertion, attributed correctly in the activity panel. -- `version` (save + rollback) gives you cheap insurance against a future enrichment pass overwriting human-curated facts. - -Ten minutes weekly instead of an hour of cleanup. None of it requires anything beyond OK + your agent host. - -## Routine - -A maintenance cadence that scales. None of it requires anything beyond OK + your agent. - -| Cadence | What | -|---|---| -| **After each meeting** | Drop raw notes into `meetings/-.md`. The `meeting` template handles frontmatter. | -| **End of day** | Ask the agent: *"process today's meeting notes; update or create dossiers for everyone mentioned. Append timeline entries; don't rewrite compiled truth unless you have clear new evidence."* | -| **Weekly** | Run the dead-link audit above. Also: *"find entities whose compiled-truth is contradicted by recent timeline entries; propose rewrites for me to review."* | -| **Monthly** | *"audit `people/` and `companies/`: dossiers untouched in 90+ days, dossiers with empty timelines, dossiers whose wikilinks have decayed."* | - -You're orchestrating, not implementing. The OK MCP tools (`exec`, `search`, `edit_document`, `links`, `version`) cover every step. - -## Tips - -- **Wikilinks are the graph.** Every `[[Jane Co]]` mention creates a backlink. The graph self-wires. -- **Never rewrite the timeline.** Append-only is what makes compiled-truth rewrites trustworthy. -- **`version` (save) before risky enrichment.** Snapshot + rollback are first-class: cheap insurance for hand-curated facts. - -## Looking for source-grounded knowledge instead? - -This guide is the **entity-grounded** posture. If what you want is a citation-traceable wiki (*"what do we know about X, with evidence?"*), see the [Karpathy LLM wiki workflow](./karpathy-llm-wiki.mdx). Different pattern, same Open Knowledge editor. - -## Further reading - -- **[Agent activity](../features/agent-activity.mdx).** How every agent edit lands in the shadow repo with attribution. -- **[Claude Code](../integrations/claude-code.mdx)**, **[Cursor](../integrations/cursor.mdx)**, **[Codex](../integrations/codex.mdx).** Agent-assistant integrations. -- **[`STARTER_PACKS` registry](https://github.com/inkeep/open-knowledge-legacy/blob/main/packages/server/src/seed/starter.ts).** Canonical source for the Gbrain pack content. -- **[Garry Tan's gbrain](https://github.com/garrytan/gbrain).** The pattern this layout is inspired by. -- **[Karpathy LLM wiki workflow](./karpathy-llm-wiki.mdx).** Source-grounded counterpart. diff --git a/docs/content/workflows/karpathy-llm-wiki.mdx b/docs/content/workflows/karpathy-llm-wiki.mdx index c4d4e32d..22fa1358 100644 --- a/docs/content/workflows/karpathy-llm-wiki.mdx +++ b/docs/content/workflows/karpathy-llm-wiki.mdx @@ -215,7 +215,7 @@ The compounding move: end each ingest session with one synthesis query. The answ ## Looking for entity tracking instead? -This guide is the **source-grounded** posture: bring sources, the LLM curates the wiki. If what you actually want is to track *people, companies, and meetings* (who's in your network, what was said, what changes over time), the [Gbrain workflow guide](./gbrain.mdx) is the better starting point. Different pattern, same Open Knowledge editor. +This guide is the **source-grounded** posture: bring sources, the LLM curates the wiki. If what you actually want is to track *people, companies, and meetings* (who's in your network, what was said, what changes over time), the [Entity vault (GBrain-compatible) workflow guide](./entity-vault.mdx) is the better starting point. Different pattern, same Open Knowledge editor. ## Further reading @@ -231,4 +231,4 @@ This guide is the **source-grounded** posture: bring sources, the LLM curates th ### Adjacent OK workflow -- **[Gbrain workflow in Open Knowledge](./gbrain.mdx).** Entity-vault counterpart, if the source-grounded posture isn't your fit. +- **[Entity vault (GBrain-compatible) workflow in Open Knowledge](./entity-vault.mdx).** Entity-vault counterpart, if the source-grounded posture isn't your fit. diff --git a/docs/content/workflows/meta.json b/docs/content/workflows/meta.json index b856cbc9..7a8fe1e3 100644 --- a/docs/content/workflows/meta.json +++ b/docs/content/workflows/meta.json @@ -1,5 +1,5 @@ { "title": "Workflows", "icon": "LuWorkflow", - "pages": ["karpathy-llm-wiki", "gbrain"] + "pages": ["karpathy-llm-wiki", "entity-vault"] } diff --git a/docs/src/components/overview-blocks.tsx b/docs/src/components/overview-blocks.tsx index 16820cb7..24332d9a 100644 --- a/docs/src/components/overview-blocks.tsx +++ b/docs/src/components/overview-blocks.tsx @@ -1,6 +1,7 @@ import { ArrowRight, Bot, Database, type LucideIcon, NotebookPen } from 'lucide-react'; import type { ReactNode } from 'react'; + interface Layer { k: string; Icon: LucideIcon; diff --git a/docs/src/lib/og-card.tsx b/docs/src/lib/og-card.tsx index 535f6b1a..17b2db0b 100644 --- a/docs/src/lib/og-card.tsx +++ b/docs/src/lib/og-card.tsx @@ -41,7 +41,8 @@ const wordmarkDataUrl = (() => { try { const bytes = readFileSync(candidate); return `data:image/svg+xml;base64,${bytes.toString('base64')}`; - } catch {} + } catch { + } } return FALLBACK_LOGO; })(); diff --git a/docs/src/lib/share-splash.ts b/docs/src/lib/share-splash.ts index 65434d14..44db3790 100644 --- a/docs/src/lib/share-splash.ts +++ b/docs/src/lib/share-splash.ts @@ -1,3 +1,4 @@ + const SHARE_URL_VERSION_V1 = 0x01; interface DecodedShare { diff --git a/packages/app/playwright.a11y.config.ts b/packages/app/playwright.a11y.config.ts index b7a2a09b..b9061eca 100644 --- a/packages/app/playwright.a11y.config.ts +++ b/packages/app/playwright.a11y.config.ts @@ -1,5 +1,6 @@ import { defineConfig } from '@playwright/test'; + const isCI = !!process.env.CI; export default defineConfig({ diff --git a/packages/app/playwright.config.ts b/packages/app/playwright.config.ts index 8fa2c19a..b6291362 100644 --- a/packages/app/playwright.config.ts +++ b/packages/app/playwright.config.ts @@ -1,5 +1,6 @@ import { defineConfig } from '@playwright/test'; + const isCI = !!process.env.CI; export default defineConfig({ diff --git a/packages/app/playwright.visual.config.ts b/packages/app/playwright.visual.config.ts index e9f60626..c522418a 100644 --- a/packages/app/playwright.visual.config.ts +++ b/packages/app/playwright.visual.config.ts @@ -1,5 +1,6 @@ import { defineConfig } from '@playwright/test'; + const isCI = !!process.env.CI; export default defineConfig({ diff --git a/packages/app/src/App.test.ts b/packages/app/src/App.test.ts index 634feebb..617a350e 100644 --- a/packages/app/src/App.test.ts +++ b/packages/app/src/App.test.ts @@ -81,6 +81,7 @@ describe('PaneTargetLanding wiring (R7)', () => { }); }); + const DRAG_LITERAL = '[-webkit-app-region:drag]'; function hasIsElectronHostGatedDrag(appSrc: string): boolean { @@ -158,6 +159,7 @@ describe('Editor BrowserWindow — wrapper-strip drag region contract', () => { }); }); + describe('ActiveTargetBridgePush — renderer→main push for File menu', () => { test('declares an ActiveTargetBridgePush component and mounts it inside the App tree', () => { expect(src).toMatch(/function\s+ActiveTargetBridgePush\s*\(/); diff --git a/packages/app/src/build/app-version.ts b/packages/app/src/build/app-version.ts index 8de3d072..9c69e05d 100644 --- a/packages/app/src/build/app-version.ts +++ b/packages/app/src/build/app-version.ts @@ -12,7 +12,8 @@ export function resolveAppVersion(): string { if (typeof pkg.version === 'string' && pkg.version.length > 0) { return pkg.version; } - } catch {} + } catch { + } return '0.0.0-unknown'; } diff --git a/packages/app/src/build/electron-mode-class.test.ts b/packages/app/src/build/electron-mode-class.test.ts index d3e9a169..c13d9303 100644 --- a/packages/app/src/build/electron-mode-class.test.ts +++ b/packages/app/src/build/electron-mode-class.test.ts @@ -1,3 +1,4 @@ + import { describe, expect, test } from 'bun:test'; import { readFileSync } from 'node:fs'; import { join } from 'node:path'; diff --git a/packages/app/src/components/ActivityModeContent.tsx b/packages/app/src/components/ActivityModeContent.tsx index 44e04f34..7f8d8801 100644 --- a/packages/app/src/components/ActivityModeContent.tsx +++ b/packages/app/src/components/ActivityModeContent.tsx @@ -12,6 +12,7 @@ import { AgentIcon } from './icons/AgentIcon'; import { Button } from './ui/button'; import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip'; + async function postAgentUndo(body: { connectionId: string; docName: string; @@ -31,6 +32,7 @@ async function postAgentUndo(body: { } } + function hashFromDocName(docName: string): string { return `#/${docName .split('/') @@ -43,6 +45,7 @@ function navigateToDoc(docName: string): void { window.location.hash = hashFromDocName(docName); } + function LoadingState(): React.JSX.Element { return (
['data']; status: ReturnType['status']; @@ -304,6 +308,7 @@ function ActivityModeBody({ ); } + export function ActivityModeContent({ showBackButton = true, }: { diff --git a/packages/app/src/components/AuthModal.dom.test.tsx b/packages/app/src/components/AuthModal.dom.test.tsx index bfa5538b..ad9b4a9e 100644 --- a/packages/app/src/components/AuthModal.dom.test.tsx +++ b/packages/app/src/components/AuthModal.dom.test.tsx @@ -1,3 +1,4 @@ + import { afterEach, describe, expect, jest, test } from 'bun:test'; import { act, cleanup, render, screen } from '@testing-library/react'; import type { OkLocalOpAuthEvent, OkLocalOpAuthStatusResponse } from '@/lib/desktop-bridge-types'; diff --git a/packages/app/src/components/AuthModal.tsx b/packages/app/src/components/AuthModal.tsx index 67ddcf0f..1b87a0f9 100644 --- a/packages/app/src/components/AuthModal.tsx +++ b/packages/app/src/components/AuthModal.tsx @@ -19,10 +19,12 @@ import { } from './ui/dialog'; import { Input } from './ui/input'; + async function copyToClipboard(text: string): Promise { try { await navigator.clipboard.writeText(text); - } catch {} + } catch { + } } interface AuthSuccessResult { @@ -42,6 +44,7 @@ interface AuthModalProps { queryTransport?: AuthQueryTransport; } + interface DeviceFlowPanelProps { onSuccess: (result: AuthSuccessResult) => void; transport: AuthTransport; @@ -202,6 +205,7 @@ function DeviceFlowPanel({ onSuccess, transport }: DeviceFlowPanelProps) { ); } + interface IdentityBodyProps { login: string; name: string; @@ -237,6 +241,7 @@ function IdentityBody({ login, name, onNameChange, email, onEmailChange }: Ident ); } + type AuthStep = 'checking' | 'auth' | 'identity' | 'done'; const IDENTITY_PROBE_TIMEOUT_MS = 10_000; @@ -323,7 +328,8 @@ export function AuthModal({ method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ name, email }), - }).catch(() => {}); + }).catch(() => { + }); const result = { ...(authResult ?? { login: '' }), name, email }; setStep('done'); diff --git a/packages/app/src/components/AutoSyncOnboardingDialog.test.ts b/packages/app/src/components/AutoSyncOnboardingDialog.test.ts index 56b33685..a131121d 100644 --- a/packages/app/src/components/AutoSyncOnboardingDialog.test.ts +++ b/packages/app/src/components/AutoSyncOnboardingDialog.test.ts @@ -1,3 +1,4 @@ + import { describe, expect, test } from 'bun:test'; import SRC from './AutoSyncOnboardingDialog?raw'; diff --git a/packages/app/src/components/AutoSyncOnboardingDialog.tsx b/packages/app/src/components/AutoSyncOnboardingDialog.tsx index 80215913..fcce67ea 100644 --- a/packages/app/src/components/AutoSyncOnboardingDialog.tsx +++ b/packages/app/src/components/AutoSyncOnboardingDialog.tsx @@ -42,7 +42,10 @@ export function AutoSyncOnboardingDialog({ open, onResolved }: AutoSyncOnboardin } return ( - {}}> + {}} + > diff --git a/packages/app/src/components/BetaBadge.test.ts b/packages/app/src/components/BetaBadge.test.ts index 985feff6..0732bd7d 100644 --- a/packages/app/src/components/BetaBadge.test.ts +++ b/packages/app/src/components/BetaBadge.test.ts @@ -1,3 +1,4 @@ + import { describe, expect, test } from 'bun:test'; import SRC from './BetaBadge?raw'; diff --git a/packages/app/src/components/BetaBadge.tsx b/packages/app/src/components/BetaBadge.tsx index 9c227d08..3dd7f5b6 100644 --- a/packages/app/src/components/BetaBadge.tsx +++ b/packages/app/src/components/BetaBadge.tsx @@ -1,3 +1,4 @@ + import { Trans, useLingui } from '@lingui/react/macro'; import { useUpdateChannel } from '@/hooks/use-update-channel'; import { Badge } from './ui/badge'; diff --git a/packages/app/src/components/CloneDialog.dom.test.tsx b/packages/app/src/components/CloneDialog.dom.test.tsx index ed5bcb30..fe93c4b0 100644 --- a/packages/app/src/components/CloneDialog.dom.test.tsx +++ b/packages/app/src/components/CloneDialog.dom.test.tsx @@ -1,3 +1,4 @@ + import { afterEach, beforeEach, describe, expect, test } from 'bun:test'; import { cleanup, render, screen } from '@testing-library/react'; import { getLastKnownSignedIn, setLastKnownSignedIn } from '@/lib/auth-state-cache'; diff --git a/packages/app/src/components/ConsentDialog.tsx b/packages/app/src/components/ConsentDialog.tsx index 204a576c..037a8205 100644 --- a/packages/app/src/components/ConsentDialog.tsx +++ b/packages/app/src/components/ConsentDialog.tsx @@ -1,3 +1,4 @@ + import { lazy, Suspense, useSyncExternalStore } from 'react'; import { consentStore } from '@/lib/consent-store'; diff --git a/packages/app/src/components/CreateProjectDialog.cascade-staleness.dom.test.tsx b/packages/app/src/components/CreateProjectDialog.cascade-staleness.dom.test.tsx index dc173a96..4ff788e2 100644 --- a/packages/app/src/components/CreateProjectDialog.cascade-staleness.dom.test.tsx +++ b/packages/app/src/components/CreateProjectDialog.cascade-staleness.dom.test.tsx @@ -558,6 +558,7 @@ describe('CreateProjectDialog cascade staleness (Tier-3 mount)', () => { }); test('PRD-6649: 5 s polling skips probeNonce bump while a probe is in-flight (race-prevention gate)', async () => { + const stub = makeStubBridge(FIRST_GIT_RESULT, TARGET); const setIntervalSpy = spyOn(globalThis, 'setInterval'); diff --git a/packages/app/src/components/CreateProjectDialog.tsx b/packages/app/src/components/CreateProjectDialog.tsx index 66e4e483..fed8977f 100644 --- a/packages/app/src/components/CreateProjectDialog.tsx +++ b/packages/app/src/components/CreateProjectDialog.tsx @@ -1,3 +1,4 @@ + import { ALL_EDITOR_IDS, CREATE_NEW_PROJECT_FAILURE_REASONS, @@ -327,7 +328,8 @@ export function CreateProjectDialog({ open, onOpenChange, bridge }: CreateProjec if (banner === null) return; if (firedBanners.current.has(banner)) return; firedBanners.current.add(banner); - bridge.project.recordCreateNewBannerShown(banner).catch(() => {}); + bridge.project.recordCreateNewBannerShown(banner).catch(() => { + }); }, [open, cascade, bridge]); const subfolderTrimmed = subfolderName.trim(); diff --git a/packages/app/src/components/CreateProjectMenuTrigger.tsx b/packages/app/src/components/CreateProjectMenuTrigger.tsx index a4eb9e25..eb105d7f 100644 --- a/packages/app/src/components/CreateProjectMenuTrigger.tsx +++ b/packages/app/src/components/CreateProjectMenuTrigger.tsx @@ -1,3 +1,4 @@ + import { useEffect, useState } from 'react'; import { CreateProjectDialog } from '@/components/CreateProjectDialog'; import type { OkDesktopBridge } from '@/lib/desktop-bridge-types'; diff --git a/packages/app/src/components/DeleteConfirmationDialog.tsx b/packages/app/src/components/DeleteConfirmationDialog.tsx index 0230fda1..75730d65 100644 --- a/packages/app/src/components/DeleteConfirmationDialog.tsx +++ b/packages/app/src/components/DeleteConfirmationDialog.tsx @@ -43,7 +43,9 @@ export function DeleteConfirmationDialog({ {customTitle ?? t`Delete ${itemName}`} - + {customDescription ?? t`Are you sure you want to delete ${itemName}? This action cannot be undone.`} diff --git a/packages/app/src/components/DiffViewBoundary.tsx b/packages/app/src/components/DiffViewBoundary.tsx index 5a95e4ca..f1329e9a 100644 --- a/packages/app/src/components/DiffViewBoundary.tsx +++ b/packages/app/src/components/DiffViewBoundary.tsx @@ -38,7 +38,8 @@ async function fetchConflictSides(file: string): Promise { const payload = (await res.json()) as { detail?: unknown; title?: unknown }; if (typeof payload.detail === 'string') detail = payload.detail; else if (typeof payload.title === 'string') detail = payload.title; - } catch {} + } catch { + } console.warn( JSON.stringify({ event: 'conflict-content-fetch-failed', diff --git a/packages/app/src/components/DocumentBoundary.test.ts b/packages/app/src/components/DocumentBoundary.test.ts index 776e5aa0..35f25d18 100644 --- a/packages/app/src/components/DocumentBoundary.test.ts +++ b/packages/app/src/components/DocumentBoundary.test.ts @@ -1,3 +1,4 @@ + import { afterEach, beforeEach, describe, expect, test } from 'bun:test'; import { HocuspocusProvider } from '@hocuspocus/provider'; import { __resetSyncPromiseCache, syncPromise } from '@/editor/sync-promise'; @@ -25,7 +26,8 @@ afterEach(() => { for (const p of providers) { try { p.destroy(); - } catch {} + } catch { + } } providers = []; }); diff --git a/packages/app/src/components/DocumentBoundary.tsx b/packages/app/src/components/DocumentBoundary.tsx index cfdb81f0..eaea173e 100644 --- a/packages/app/src/components/DocumentBoundary.tsx +++ b/packages/app/src/components/DocumentBoundary.tsx @@ -1,3 +1,4 @@ + import type { HocuspocusProvider } from '@hocuspocus/provider'; import { type ReactNode, use } from 'react'; import { syncPromise } from '@/editor/sync-promise'; diff --git a/packages/app/src/components/DocumentErrorBoundary.test.ts b/packages/app/src/components/DocumentErrorBoundary.test.ts index 0374eeb9..227ebb82 100644 --- a/packages/app/src/components/DocumentErrorBoundary.test.ts +++ b/packages/app/src/components/DocumentErrorBoundary.test.ts @@ -1,3 +1,4 @@ + import { describe, expect, test } from 'bun:test'; import { MountAbortError } from '@/editor/mount-promise'; import { diff --git a/packages/app/src/components/EditorActivityPool.test.ts b/packages/app/src/components/EditorActivityPool.test.ts index be046da8..d110f573 100644 --- a/packages/app/src/components/EditorActivityPool.test.ts +++ b/packages/app/src/components/EditorActivityPool.test.ts @@ -1,3 +1,4 @@ + import { describe, expect, test } from 'bun:test'; import { SYSTEM_DOC_NAME } from '@inkeep/open-knowledge-core'; import { @@ -367,6 +368,7 @@ describe('computeEditorMountGate — invariant: at least one editor rendered', ( }); }); + describe('shouldEmitFirstToggle — first-toggle mark gate', () => { test('large doc, both editors rendering, not yet emitted → emit', () => { expect( diff --git a/packages/app/src/components/EditorActivityPool.tsx b/packages/app/src/components/EditorActivityPool.tsx index 4cd719ed..511fa60f 100644 --- a/packages/app/src/components/EditorActivityPool.tsx +++ b/packages/app/src/components/EditorActivityPool.tsx @@ -555,6 +555,7 @@ function ActivityEntry({ const [warmSnapshot] = useState(() => peekRenameSnapshot(entry.docName)); const warmHtml = warmSnapshot?.html ?? null; + const [hasEmittedFirstToggle, setHasEmittedFirstToggle] = useState(false); useEffect(() => { if ( diff --git a/packages/app/src/components/EditorActivityPool.warm-skeleton.dom.test.tsx b/packages/app/src/components/EditorActivityPool.warm-skeleton.dom.test.tsx index 5fa2c882..a44813f1 100644 --- a/packages/app/src/components/EditorActivityPool.warm-skeleton.dom.test.tsx +++ b/packages/app/src/components/EditorActivityPool.warm-skeleton.dom.test.tsx @@ -11,6 +11,7 @@ import { storeRenameSnapshot, } from '@/editor/editor-cache'; + function WarmContentFallbackReplica({ html }: { html: string }) { return (