@agent-native/core 0.90.1 → 0.90.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +26 -0
- package/corpus/core/docs/content/agent-native-toolkit.mdx +87 -80
- package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +89 -80
- package/corpus/core/docs/content/toolkit-agent-ux.mdx +43 -0
- package/corpus/core/docs/content/toolkit-app-adapters.mdx +9 -0
- package/corpus/core/docs/content/toolkit-collaboration-ui.mdx +12 -0
- package/corpus/core/docs/content/toolkit-collaboration.mdx +74 -0
- package/corpus/core/docs/content/toolkit-command-navigation.mdx +106 -0
- package/corpus/core/docs/content/toolkit-comments-review.mdx +98 -0
- package/corpus/core/docs/content/toolkit-history.mdx +95 -0
- package/corpus/core/docs/content/toolkit-observability.mdx +41 -0
- package/corpus/core/docs/content/toolkit-org-team.mdx +80 -0
- package/corpus/core/docs/content/toolkit-resources.mdx +57 -0
- package/corpus/core/docs/content/toolkit-settings.mdx +65 -0
- package/corpus/core/docs/content/toolkit-setup-connections.mdx +109 -0
- package/corpus/core/docs/content/toolkit-sharing-ui.mdx +18 -6
- package/corpus/core/docs/content/toolkit-sharing.mdx +81 -0
- package/corpus/core/docs/content/toolkit-shell-hooks.mdx +9 -0
- package/corpus/core/docs/content/toolkit-ui.mdx +9 -0
- package/corpus/core/package.json +35 -1
- package/corpus/core/src/agent/engine/ai-sdk-engine.ts +19 -1
- package/corpus/core/src/agent/engine/anthropic-engine.ts +25 -1
- package/corpus/core/src/agent/engine/registry.ts +23 -16
- package/corpus/core/src/agent/production-agent.ts +37 -6
- package/corpus/core/src/client/AgentPanel.tsx +1 -1
- package/corpus/core/src/client/command-navigation/index.ts +15 -0
- package/corpus/core/src/client/comments-review/index.ts +1 -0
- package/corpus/core/src/client/history/VersionHistoryPanel.tsx +145 -0
- package/corpus/core/src/client/history/index.ts +18 -0
- package/corpus/core/src/client/history/use-history.ts +86 -0
- package/corpus/core/src/client/index.ts +76 -9
- package/corpus/core/src/client/org/OrgSwitcher.tsx +6 -6
- package/corpus/core/src/client/org/RequireActiveOrg.tsx +2 -2
- package/corpus/core/src/client/org/TeamPage.tsx +3 -3
- package/corpus/core/src/client/org/hooks.ts +32 -0
- package/corpus/core/src/client/org/index.ts +30 -1
- package/corpus/core/src/client/org-team/index.ts +1 -0
- package/corpus/core/src/client/review/ReviewStatusBadge.tsx +39 -0
- package/corpus/core/src/client/review/ReviewThreadPanel.tsx +278 -0
- package/corpus/core/src/client/review/index.ts +25 -0
- package/corpus/core/src/client/review/use-review.ts +114 -0
- package/corpus/core/src/client/rich-markdown-editor/useCollabReconcile.ts +11 -6
- package/corpus/core/src/client/settings/index.ts +11 -1
- package/corpus/core/src/client/setup-connections/BuilderConnectCard.tsx +94 -0
- package/corpus/core/src/client/setup-connections/ProviderReadinessBadge.tsx +73 -0
- package/corpus/core/src/client/setup-connections/SetupConnectionsPage.tsx +94 -0
- package/corpus/core/src/client/setup-connections/index.ts +46 -0
- package/corpus/core/src/client/sharing/ShareButton.tsx +20 -14
- package/corpus/core/src/client/sharing/ShareDialog.tsx +3 -3
- package/corpus/core/src/client/use-action.ts +39 -2
- package/corpus/core/src/client/use-db-sync.ts +44 -18
- package/corpus/core/src/command-navigation/actions.ts +100 -0
- package/corpus/core/src/command-navigation/index.ts +12 -0
- package/corpus/core/src/comments-review/index.ts +1 -0
- package/corpus/core/src/db/create-get-db.ts +32 -2
- package/corpus/core/src/file-upload/builder.ts +24 -3
- package/corpus/core/src/file-upload/types.ts +3 -1
- package/corpus/core/src/history/actions/create-resource-version.ts +89 -0
- package/corpus/core/src/history/actions/get-resource-version.ts +60 -0
- package/corpus/core/src/history/actions/list-resource-history.ts +53 -0
- package/corpus/core/src/history/actions/list-resource-versions.ts +43 -0
- package/corpus/core/src/history/actions/restore-resource-version.ts +96 -0
- package/corpus/core/src/history/index.ts +27 -0
- package/corpus/core/src/history/registry.ts +99 -0
- package/corpus/core/src/history/store.ts +348 -0
- package/corpus/core/src/history/types.ts +69 -0
- package/corpus/core/src/index.ts +10 -0
- package/corpus/core/src/navigation/index.ts +170 -0
- package/corpus/core/src/org/index.ts +8 -0
- package/corpus/core/src/org/permissions.ts +30 -0
- package/corpus/core/src/org-team/index.ts +1 -0
- package/corpus/core/src/private-blob/registry.ts +1 -0
- package/corpus/core/src/review/actions/consume-review-feedback.ts +38 -0
- package/corpus/core/src/review/actions/create-review-comment.ts +107 -0
- package/corpus/core/src/review/actions/delete-review-comment.ts +55 -0
- package/corpus/core/src/review/actions/get-review-feedback.ts +54 -0
- package/corpus/core/src/review/actions/list-review-comments.ts +53 -0
- package/corpus/core/src/review/actions/reply-review-comment.ts +107 -0
- package/corpus/core/src/review/actions/resolve-review-thread.ts +60 -0
- package/corpus/core/src/review/actions/set-review-status.ts +58 -0
- package/corpus/core/src/review/index.ts +36 -0
- package/corpus/core/src/review/mentions.ts +44 -0
- package/corpus/core/src/review/registry.ts +99 -0
- package/corpus/core/src/review/store.ts +687 -0
- package/corpus/core/src/review/types.ts +97 -0
- package/corpus/core/src/server/action-discovery.ts +54 -0
- package/corpus/core/src/server/agent-engine-api-key-route.ts +5 -0
- package/corpus/core/src/server/credential-provider.ts +108 -0
- package/corpus/core/src/server/framework-request-handler.ts +52 -4
- package/corpus/core/src/setup-connections/index.ts +89 -0
- package/corpus/core/src/setup-connections/onboarding.ts +47 -0
- package/corpus/core/src/transcription/builder-transcription.ts +9 -2
- package/corpus/core/src/vite/action-types-plugin.ts +52 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +2 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +2 -2
- package/corpus/templates/analytics/app/global.css +22 -10
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +6 -1
- package/corpus/templates/analytics/app/i18n-data.ts +81 -13
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +2 -2
- package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +2 -2
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +528 -108
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +466 -183
- package/corpus/templates/analytics/changelog/2026-07-07-session-replays-load-sooner-show-clearer-activity-timelines-.md +6 -0
- package/corpus/templates/assets/.agents/skills/asset-generation/SKILL.md +5 -0
- package/corpus/templates/assets/.agents/skills/logo-composite/SKILL.md +34 -6
- package/corpus/templates/assets/AGENTS.md +23 -4
- package/corpus/templates/assets/actions/_generation-preset-settings.ts +48 -0
- package/corpus/templates/assets/actions/_helpers.ts +8 -1
- package/corpus/templates/assets/actions/_preset-skeleton-validation.ts +64 -0
- package/corpus/templates/assets/actions/create-generation-preset.ts +11 -3
- package/corpus/templates/assets/actions/generate-image-batch.ts +7 -2
- package/corpus/templates/assets/actions/generate-image.ts +342 -25
- package/corpus/templates/assets/actions/get-library.ts +4 -3
- package/corpus/templates/assets/actions/navigate.ts +2 -1
- package/corpus/templates/assets/actions/refresh-generation-run.ts +5 -1
- package/corpus/templates/assets/actions/update-asset.ts +1 -0
- package/corpus/templates/assets/actions/update-generation-preset.ts +8 -1
- package/corpus/templates/assets/actions/view-screen.ts +8 -1
- package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +9 -1
- package/corpus/templates/assets/app/hooks/use-image-model-menu.ts +1 -0
- package/corpus/templates/assets/app/hooks/use-navigation-state.ts +11 -0
- package/corpus/templates/assets/app/i18n/zh-TW.ts +64 -0
- package/corpus/templates/assets/app/i18n-data.ts +650 -0
- package/corpus/templates/assets/app/routes/asset.$id.tsx +2 -1
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +44 -33
- package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +1474 -0
- package/corpus/templates/assets/app/routes/library.tsx +43 -1
- package/corpus/templates/assets/server/lib/generation.ts +366 -44
- package/corpus/templates/assets/server/lib/image-processing.ts +252 -0
- package/corpus/templates/assets/server/lib/preset-skeleton.ts +137 -0
- package/corpus/templates/assets/shared/api.ts +47 -0
- package/corpus/templates/brain/app/routes/settings.tsx +2 -2
- package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +32 -6
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +120 -40
- package/corpus/templates/calendar/app/hooks/use-people.ts +55 -0
- package/corpus/templates/calendar/changelog/2026-07-07-guest-suggestions-now-find-coworkers-from-your-google-worksp.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-07-zoom-stays-selected-after-connecting-it-from-a-draft-event.md +6 -0
- package/corpus/templates/clips/actions/create-recording.ts +5 -1
- package/corpus/templates/clips/actions/finalize-recording.ts +140 -1
- package/corpus/templates/clips/actions/import-loom-recording.ts +1 -0
- package/corpus/templates/clips/actions/lib/ensure-seekable-video.ts +1 -0
- package/corpus/templates/clips/actions/request-transcript.ts +31 -0
- package/corpus/templates/clips/actions/set-thumbnail.ts +2 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +7 -2
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +2 -2
- package/corpus/templates/clips/app/components/library/sort-menu.tsx +1 -1
- package/corpus/templates/clips/app/components/player/scrubber-position.ts +9 -0
- package/corpus/templates/clips/app/components/player/scrubber.tsx +5 -2
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +69 -41
- package/corpus/templates/clips/app/components/player/video-player.tsx +38 -1
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +114 -33
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +3 -3
- package/corpus/templates/clips/app/components/sharing/slack-share-hint.tsx +9 -19
- package/corpus/templates/clips/app/routes/_app.library._index.tsx +27 -1
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +9 -3
- package/corpus/templates/clips/app/routes/record.tsx +178 -80
- package/corpus/templates/clips/changelog/2026-07-02-recordings-now-wait-for-storage-media-to-serve-before-finishing.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-a-pending-app-update-no-longer-blocks-screen-recording-updat.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-chrome-extension-recordings-keep-audio-after-refreshing-tab.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-clip-playback-progress-now-starts-and-finishes-at-the-right-times.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-07-sharing-public-clips-now-stays-focused-on-the-normal-link-wi.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/background.ts +18 -0
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +23 -8
- package/corpus/templates/clips/desktop/src/app.tsx +40 -3
- package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +19 -7
- package/corpus/templates/clips/desktop/src/lib/permissions.ts +2 -0
- package/corpus/templates/clips/desktop/src/lib/updater.ts +25 -2
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +7 -0
- package/corpus/templates/clips/server/routes/api/recordings/[recordingId]/thumbnail.post.ts +1 -0
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +23 -6
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +28 -3
- package/corpus/templates/clips/server/routes/api/video/[recordingId].get.ts +13 -6
- package/corpus/templates/clips/shared/finalize-recovery.ts +35 -3
- package/corpus/templates/content/AGENTS.md +52 -52
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +188 -8
- package/corpus/templates/content/actions/_builder-docs-client.ts +41 -3
- package/corpus/templates/content/actions/_database-source-utils.ts +998 -160
- package/corpus/templates/content/actions/_database-utils.ts +44 -4
- package/corpus/templates/content/actions/_notion-action-utils.ts +6 -2
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +23 -1
- package/corpus/templates/content/actions/attach-content-database-source.ts +85 -12
- package/corpus/templates/content/actions/change-content-database-source-role.ts +9 -1
- package/corpus/templates/content/actions/delete-content-database.ts +1 -0
- package/corpus/templates/content/actions/delete-document.ts +337 -52
- package/corpus/templates/content/actions/get-document.ts +11 -2
- package/corpus/templates/content/actions/list-content-databases.ts +57 -9
- package/corpus/templates/content/actions/prepare-builder-source-review.ts +23 -6
- package/corpus/templates/content/actions/refresh-content-database-source.ts +26 -3
- package/corpus/templates/content/actions/restore-content-database.ts +1 -0
- package/corpus/templates/content/actions/update-document.ts +43 -0
- package/corpus/templates/content/app/components/editor/BuilderBodySyncingNotice.tsx +21 -0
- package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +0 -1
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +70 -28
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +69 -17
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +4 -4
- package/corpus/templates/content/app/components/editor/body-hydration.ts +112 -0
- package/corpus/templates/content/app/components/editor/builder-body-hydration-pump.ts +52 -0
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +9076 -2876
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +41 -1
- package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +36 -11
- package/corpus/templates/content/app/components/editor/previewDocumentSaveController.ts +21 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +11 -1
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +11 -8
- package/corpus/templates/content/app/global.css +41 -0
- package/corpus/templates/content/app/hooks/use-content-database.ts +346 -42
- package/corpus/templates/content/app/hooks/use-db-sync.ts +9 -0
- package/corpus/templates/content/app/hooks/use-documents.ts +47 -0
- package/corpus/templates/content/app/hooks/use-notion.ts +12 -10
- package/corpus/templates/content/app/i18n/zh-TW.ts +35 -0
- package/corpus/templates/content/app/i18n-data.ts +355 -0
- package/corpus/templates/content/app/root.tsx +22 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-database-sources-keep-loading-rows-in-the-background.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-source-attach-starts-with-usable-rows.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-source-attachment-now-stays-connected-after-large.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-builder-source-refreshes-now-show-progress-for-large-docs-blog.md +6 -0
- package/corpus/templates/content/changelog/2026-07-01-database-pages-now-delete-to-trash-without-route-errors.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-builder-source-refreshes-recover-from-stalled-background-row.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-builder-sourced-rows-open-with-sync-protection.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-database-rows-and-pages-open-faster-from-recently-loaded-dat.md +6 -0
- package/corpus/templates/content/changelog/2026-07-02-preview-panels-close-reliably-narrow-sidebar-row-actions-sta.md +6 -0
- package/corpus/templates/content/changelog/2026-07-06-builder-sync-progress-no-longer-shows-continue.md +6 -0
- package/corpus/templates/content/changelog/2026-07-07-permanently-deleting-trashed-databases-now-finishes-reliably.md +6 -0
- package/corpus/templates/content/shared/api.ts +13 -0
- package/corpus/templates/content/shared/builder-mdx.ts +16 -3
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +23 -13
- package/corpus/templates/design/.agents/skills/responsive-breakpoints/SKILL.md +98 -0
- package/corpus/templates/design/.agents/skills/shader-fills/SKILL.md +162 -0
- package/corpus/templates/design/AGENTS.md +9 -2
- package/corpus/templates/design/actions/add-breakpoint.ts +6 -3
- package/corpus/templates/design/actions/apply-a11y-fix.ts +57 -37
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +41 -20
- package/corpus/templates/design/actions/apply-motion-edit.ts +251 -38
- package/corpus/templates/design/actions/apply-shader-fill.ts +90 -66
- package/corpus/templates/design/actions/apply-visual-edit.ts +282 -55
- package/corpus/templates/design/actions/create-component.ts +29 -60
- package/corpus/templates/design/actions/create-file.ts +9 -2
- package/corpus/templates/design/actions/duplicate-design.ts +31 -2
- package/corpus/templates/design/actions/edit-design.ts +36 -38
- package/corpus/templates/design/actions/generate-design-title.ts +87 -0
- package/corpus/templates/design/actions/generate-design.ts +53 -18
- package/corpus/templates/design/actions/generate-screens.ts +108 -4
- package/corpus/templates/design/actions/get-motion-timeline.ts +35 -7
- package/corpus/templates/design/actions/insert-asset.ts +34 -29
- package/corpus/templates/design/actions/insert-design-native-asset.ts +129 -32
- package/corpus/templates/design/actions/insert-figma-library-asset.ts +35 -30
- package/corpus/templates/design/actions/present-design-variants.ts +7 -2
- package/corpus/templates/design/actions/remove-motion-timeline.ts +31 -36
- package/corpus/templates/design/actions/update-file.ts +190 -75
- package/corpus/templates/design/app/components/design/BreakpointBar.tsx +403 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +469 -222
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +708 -53
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +83 -3
- package/corpus/templates/design/app/components/design/EditPanel.tsx +1091 -6948
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +419 -85
- package/corpus/templates/design/app/components/design/MotionDock.tsx +1124 -103
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +2610 -1398
- package/corpus/templates/design/app/components/design/ReadOnlyDesignBanner.tsx +22 -0
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +2182 -235
- package/corpus/templates/design/app/components/design/bridge/motion-preview.bridge.ts +187 -11
- package/corpus/templates/design/app/components/design/bridge/shader-fill-preview.bridge.ts +376 -1
- package/corpus/templates/design/app/components/design/bridge/shader-runtime.bridge.ts +746 -0
- package/corpus/templates/design/app/components/design/canvas-primitive-style.ts +17 -0
- package/corpus/templates/design/app/components/design/code-workbench/SideBar.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +1 -3
- package/corpus/templates/design/app/components/design/code-workbench/quickinput/QuickInput.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +518 -0
- package/corpus/templates/design/app/components/design/edit-panel/code-inspect-helpers.tsx +562 -0
- package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +763 -0
- package/corpus/templates/design/app/components/design/edit-panel/document-colors.ts +94 -0
- package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +780 -0
- package/corpus/templates/design/app/components/design/edit-panel/element-classification.ts +446 -0
- package/corpus/templates/design/app/components/design/edit-panel/element-identity.ts +79 -0
- package/corpus/templates/design/app/components/design/edit-panel/field-primitives.tsx +315 -0
- package/corpus/templates/design/app/components/design/edit-panel/fill-gradient-helpers.ts +344 -0
- package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +594 -0
- package/corpus/templates/design/app/components/design/edit-panel/frame-presets-panel.tsx +119 -0
- package/corpus/templates/design/app/components/design/edit-panel/inspector-controls.tsx +248 -0
- package/corpus/templates/design/app/components/design/edit-panel/interaction-state-helpers.ts +45 -0
- package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +693 -0
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +724 -0
- package/corpus/templates/design/app/components/design/edit-panel/position-helpers.ts +207 -0
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +628 -0
- package/corpus/templates/design/app/components/design/edit-panel/selection-helpers.ts +91 -0
- package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +649 -0
- package/corpus/templates/design/app/components/design/edit-panel/style-change-types.ts +118 -0
- package/corpus/templates/design/app/components/design/edit-panel/style-options.ts +88 -0
- package/corpus/templates/design/app/components/design/edit-panel/transform-helpers.ts +100 -0
- package/corpus/templates/design/app/components/design/edit-panel/typography-helpers.ts +117 -0
- package/corpus/templates/design/app/components/design/edit-panel/typography-properties.tsx +501 -0
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +91 -40
- package/corpus/templates/design/app/components/design/inspector/BreakpointOverrideIndicator.tsx +82 -0
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +189 -87
- package/corpus/templates/design/app/components/design/inspector/GlslShaderPanel.tsx +1097 -0
- package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +44 -0
- package/corpus/templates/design/app/components/design/inspector/InteractionStatePanel.tsx +258 -0
- package/corpus/templates/design/app/components/design/inspector/MotionKeyframeDiamond.tsx +144 -0
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +99 -9
- package/corpus/templates/design/app/components/design/inspector/frame-size-presets.ts +116 -0
- package/corpus/templates/design/app/components/design/inspector/index.ts +26 -0
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +29 -0
- package/corpus/templates/design/app/components/design/multi-screen/alt-hover-measurement.ts +171 -0
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +220 -0
- package/corpus/templates/design/app/components/design/multi-screen/chrome-transitions.ts +35 -0
- package/corpus/templates/design/app/components/design/multi-screen/cross-screen-drop.ts +134 -0
- package/corpus/templates/design/app/components/design/multi-screen/culling.ts +185 -0
- package/corpus/templates/design/app/components/design/multi-screen/gradient-overlay-geometry.ts +120 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +892 -0
- package/corpus/templates/design/app/components/design/multi-screen/vector-edit-geometry.ts +21 -0
- package/corpus/templates/design/app/components/design/types.ts +15 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +109 -5
- package/corpus/templates/design/app/global.css +8 -8
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +259 -2
- package/corpus/templates/design/app/i18n/zh-TW.ts +163 -9
- package/corpus/templates/design/app/i18n-breakpoints.ts +205 -0
- package/corpus/templates/design/app/i18n-data.ts +1664 -152
- package/corpus/templates/design/app/i18n-motion.ts +563 -0
- package/corpus/templates/design/app/lib/design-import.ts +73 -0
- package/corpus/templates/design/app/pages/Index.tsx +41 -22
- package/corpus/templates/design/changelog/2026-06-29-design-inspector-controls-now-match-figmas-softer-dark-chrome.md +1 -1
- package/corpus/templates/design/changelog/2026-06-30-design-now-has-a-figma-style-left-rail-for-file-agent-assets.md +1 -1
- package/corpus/templates/design/changelog/2026-06-30-design-tools-now-use-a-quieter-figma-style-list-layout.md +1 -1
- package/corpus/templates/design/changelog/2026-06-30-multi-select-outlines-now-stay-consistent-across-all-screens.md +1 -1
- package/corpus/templates/design/changelog/2026-07-03-canvas-interactions-now-match-figma-rotation-aware-resizing-.md +1 -1
- package/corpus/templates/design/changelog/2026-07-03-layers-panel-matches-figma-top-layer-on-top-drag-with-auto-s.md +1 -1
- package/corpus/templates/design/changelog/2026-07-05-designs-get-ai-generated-names-from-your-prompt.md +6 -0
- package/corpus/templates/design/changelog/2026-07-05-local-code-screens-keep-their-connection-when-duplicated-and.md +6 -0
- package/corpus/templates/design/changelog/2026-07-05-press-a-to-draw-screens-on-the-canvas-inside-a-screen-it-dr.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-3d-rotation-and-perspective-controls-on-every-element.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-ai-generated-and-duplicated-screens-now-get-their-editor-sel.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-applying-shaders-and-fills-in-quick-succession-can-no-longer.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-breakpoint-frames-in-the-overview-now-support-click-to-selec.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-breakpoint-segments-in-the-inspector-now-show-a-device-icon-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-breakpoint-targeting-now-lives-in-one-compact-control-in-the.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-canvas-edits-can-no-longer-be-overwritten-by-stale-collabora.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-canvas-edits-inside-screens-save-reliably-again.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-cleaner-inspector-removed-the-ask-ai-box-from-the-design-tab.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-clicking-empty-canvas-space-now-deselects-an-element-inside-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-dragging-an-element-onto-a-rectangle-now-nests-it-inside-wit.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-dragging-screens-and-objects-on-the-canvas-is-now-much-smoot.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-drawing-a-shape-or-text-on-the-canvas-no-longer-flashes-away.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-dropping-an-element-between-two-others-inside-a-screen-now-s.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-duplicating-a-screen-now-places-the-copy-exactly-where-you-d.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-edit-gradients-directly-on-elements-inside-screens-scale-str.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-edits-from-collaborators-and-the-agent-now-update-the-canvas.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-a-bug-where-most-style-position-and-text-edits-briefly.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-a-confusing-raw-error-message-when-a-file-upload-fails.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-a-rare-case-where-an-edit-could-be-silently-overwritte.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-inserted-assets-sometimes-disappearing-reappearing-or-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-inspector-value-scrubbing-producing-erratic-numbers-an.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-padding-gap-and-min-max-size-scrubbing-not-updating-th.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-text-stroke-color-turning-black-and-glyphs-disappearin.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-the-collapsed-effects-and-stroke-inspector-sections-sh.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-the-new-design-dialog-closing-unexpectedly-when-using-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-fixed-the-typography-section-missing-when-selecting-text-nes.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-full-view-no-longer-flashes-back-to-the-overview-on-entry-no.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-keyframe-animation-timeline-per-property-keyframes-easing-cu.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-moving-restyling-and-scrubbing-values-on-elements-in-ai-gene.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-padding-and-corner-radius-value-scrubbing-now-snaps-to-whole.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-padding-handles-now-only-resize-on-the-handle-line-itself-sh.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-preview-and-edit-hover-focus-and-pressed-states-with-real-cs.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-promoting-an-element-to-a-component-now-works-correctly-for-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-reduced-url-history-churn-and-selection-overlay-flicker-whil.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-removed-the-decorative-dot-before-screen-names-in-the-overvi.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-responsive-breakpoints-edit-at-any-width-with-cascading-over.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-screen-labels-no-longer-turn-blue-when-you-hover-inside-the-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-scrolling-a-screen-with-an-element-selected-stays-smooth-on-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-selecting-multiple-elements-and-dragging-now-moves-the-whole.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-selection-borders-handles-and-value-readouts-now-stay-the-sa.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-selection-handles-and-editing-chrome-now-stay-a-constant-siz.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-shader-fills-and-effects-ai-authored-or-preset-glsl-shaders-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-text-drawn-on-the-canvas-now-defaults-to-white-and-inter-in-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-text-dropped-into-a-shape-now-stays-readable-instead-of-disa.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-add-tweak-controls-prompt-no-longer-jumps-to-the-corner-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-padding-value-readout-now-stays-visible-while-you-hover-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-selected-element-attachment-now-clears-from-the-chat-com.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-the-zoom-menu-is-more-compact-with-tight-rows-and-right-alig.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-undo-and-redo-no-longer-flash-the-screen-changes-now-apply-i.md +6 -0
- package/corpus/templates/design/changelog/2026-07-06-zoom-presets-like-zoom-to-50-now-stay-on-the-focused-screen-.md +6 -0
- package/corpus/templates/design/server/lib/import-design-files.ts +11 -2
- package/corpus/templates/design/server/source-workspace.ts +139 -59
- package/corpus/templates/design/shared/board-file.ts +11 -2
- package/corpus/templates/design/shared/breakpoint-media.ts +543 -0
- package/corpus/templates/design/shared/canvas-math.ts +354 -35
- package/corpus/templates/design/shared/code-layer.ts +277 -8
- package/corpus/templates/design/shared/design-state.ts +11 -4
- package/corpus/templates/design/shared/interaction-states.ts +548 -0
- package/corpus/templates/design/shared/motion-compiler.ts +186 -23
- package/corpus/templates/design/shared/motion-easing.ts +294 -0
- package/corpus/templates/design/shared/motion-timeline.ts +400 -34
- package/corpus/templates/design/shared/prompt-title.ts +95 -0
- package/corpus/templates/design/shared/responsive-classes.ts +448 -10
- package/corpus/templates/design/shared/screen-annotation.ts +46 -0
- package/corpus/templates/design/shared/shader-fills.ts +1009 -0
- package/corpus/templates/design/shared/shader-presets.ts +852 -4
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +15 -2
- package/corpus/templates/slides/app/components/editor/ImportButton.tsx +10 -1
- package/corpus/templates/slides/app/lib/upload-response.ts +71 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +2 -2
- package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.js +15 -1
- package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
- package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
- package/dist/agent/engine/anthropic-engine.js +20 -1
- package/dist/agent/engine/anthropic-engine.js.map +1 -1
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +22 -14
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +27 -7
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/client/AgentPanel.js +1 -1
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/command-navigation/index.d.ts +4 -0
- package/dist/client/command-navigation/index.d.ts.map +1 -0
- package/dist/client/command-navigation/index.js +4 -0
- package/dist/client/command-navigation/index.js.map +1 -0
- package/dist/client/comments-review/index.d.ts +2 -0
- package/dist/client/comments-review/index.d.ts.map +1 -0
- package/dist/client/comments-review/index.js +2 -0
- package/dist/client/comments-review/index.js.map +1 -0
- package/dist/client/history/VersionHistoryPanel.d.ts +18 -0
- package/dist/client/history/VersionHistoryPanel.d.ts.map +1 -0
- package/dist/client/history/VersionHistoryPanel.js +24 -0
- package/dist/client/history/VersionHistoryPanel.js.map +1 -0
- package/dist/client/history/index.d.ts +3 -0
- package/dist/client/history/index.d.ts.map +1 -0
- package/dist/client/history/index.js +3 -0
- package/dist/client/history/index.js.map +1 -0
- package/dist/client/history/use-history.d.ts +46 -0
- package/dist/client/history/use-history.d.ts.map +1 -0
- package/dist/client/history/use-history.js +18 -0
- package/dist/client/history/use-history.js.map +1 -0
- package/dist/client/index.d.ts +6 -4
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +6 -4
- package/dist/client/index.js.map +1 -1
- package/dist/client/org/OrgSwitcher.js +5 -5
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/RequireActiveOrg.js +2 -2
- package/dist/client/org/RequireActiveOrg.js.map +1 -1
- package/dist/client/org/TeamPage.js +3 -3
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/org/hooks.d.ts +12 -1
- package/dist/client/org/hooks.d.ts.map +1 -1
- package/dist/client/org/hooks.js +15 -0
- package/dist/client/org/hooks.js.map +1 -1
- package/dist/client/org/index.d.ts +4 -2
- package/dist/client/org/index.d.ts.map +1 -1
- package/dist/client/org/index.js +3 -1
- package/dist/client/org/index.js.map +1 -1
- package/dist/client/org-team/index.d.ts +2 -0
- package/dist/client/org-team/index.d.ts.map +1 -0
- package/dist/client/org-team/index.js +2 -0
- package/dist/client/org-team/index.js.map +1 -0
- package/dist/client/review/ReviewStatusBadge.d.ts +7 -0
- package/dist/client/review/ReviewStatusBadge.d.ts.map +1 -0
- package/dist/client/review/ReviewStatusBadge.js +19 -0
- package/dist/client/review/ReviewStatusBadge.js.map +1 -0
- package/dist/client/review/ReviewThreadPanel.d.ts +20 -0
- package/dist/client/review/ReviewThreadPanel.d.ts.map +1 -0
- package/dist/client/review/ReviewThreadPanel.js +84 -0
- package/dist/client/review/ReviewThreadPanel.js.map +1 -0
- package/dist/client/review/index.d.ts +4 -0
- package/dist/client/review/index.d.ts.map +1 -0
- package/dist/client/review/index.js +4 -0
- package/dist/client/review/index.js.map +1 -0
- package/dist/client/review/use-review.d.ts +68 -0
- package/dist/client/review/use-review.d.ts.map +1 -0
- package/dist/client/review/use-review.js +22 -0
- package/dist/client/review/use-review.js.map +1 -0
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.js +11 -6
- package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +1 -1
- package/dist/client/settings/index.d.ts +1 -1
- package/dist/client/settings/index.d.ts.map +1 -1
- package/dist/client/settings/index.js +1 -1
- package/dist/client/settings/index.js.map +1 -1
- package/dist/client/setup-connections/BuilderConnectCard.d.ts +9 -0
- package/dist/client/setup-connections/BuilderConnectCard.d.ts.map +1 -0
- package/dist/client/setup-connections/BuilderConnectCard.js +25 -0
- package/dist/client/setup-connections/BuilderConnectCard.js.map +1 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.d.ts +8 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.d.ts.map +1 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.js +32 -0
- package/dist/client/setup-connections/ProviderReadinessBadge.js.map +1 -0
- package/dist/client/setup-connections/SetupConnectionsPage.d.ts +17 -0
- package/dist/client/setup-connections/SetupConnectionsPage.d.ts.map +1 -0
- package/dist/client/setup-connections/SetupConnectionsPage.js +10 -0
- package/dist/client/setup-connections/SetupConnectionsPage.js.map +1 -0
- package/dist/client/setup-connections/index.d.ts +7 -0
- package/dist/client/setup-connections/index.d.ts.map +1 -0
- package/dist/client/setup-connections/index.js +7 -0
- package/dist/client/setup-connections/index.js.map +1 -0
- package/dist/client/sharing/ShareButton.d.ts +4 -4
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +13 -7
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/sharing/ShareDialog.js +3 -3
- package/dist/client/sharing/ShareDialog.js.map +1 -1
- package/dist/client/use-action.d.ts +3 -0
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +34 -3
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/use-db-sync.d.ts +4 -0
- package/dist/client/use-db-sync.d.ts.map +1 -1
- package/dist/client/use-db-sync.js +37 -18
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/command-navigation/actions.d.ts +25 -0
- package/dist/command-navigation/actions.d.ts.map +1 -0
- package/dist/command-navigation/actions.js +64 -0
- package/dist/command-navigation/actions.js.map +1 -0
- package/dist/command-navigation/index.d.ts +4 -0
- package/dist/command-navigation/index.d.ts.map +1 -0
- package/dist/command-navigation/index.js +4 -0
- package/dist/command-navigation/index.js.map +1 -0
- package/dist/comments-review/index.d.ts +2 -0
- package/dist/comments-review/index.d.ts.map +1 -0
- package/dist/comments-review/index.js +2 -0
- package/dist/comments-review/index.js.map +1 -0
- package/dist/db/create-get-db.d.ts +25 -0
- package/dist/db/create-get-db.d.ts.map +1 -1
- package/dist/db/create-get-db.js +25 -2
- package/dist/db/create-get-db.js.map +1 -1
- package/dist/file-upload/builder.d.ts.map +1 -1
- package/dist/file-upload/builder.js +18 -2
- package/dist/file-upload/builder.js.map +1 -1
- package/dist/file-upload/types.d.ts +3 -0
- package/dist/file-upload/types.d.ts.map +1 -1
- package/dist/file-upload/types.js.map +1 -1
- package/dist/history/actions/create-resource-version.d.ts +10 -0
- package/dist/history/actions/create-resource-version.d.ts.map +1 -0
- package/dist/history/actions/create-resource-version.js +65 -0
- package/dist/history/actions/create-resource-version.js.map +1 -0
- package/dist/history/actions/get-resource-version.d.ts +10 -0
- package/dist/history/actions/get-resource-version.d.ts.map +1 -0
- package/dist/history/actions/get-resource-version.js +38 -0
- package/dist/history/actions/get-resource-version.js.map +1 -0
- package/dist/history/actions/list-resource-history.d.ts +10 -0
- package/dist/history/actions/list-resource-history.d.ts.map +1 -0
- package/dist/history/actions/list-resource-history.js +45 -0
- package/dist/history/actions/list-resource-history.js.map +1 -0
- package/dist/history/actions/list-resource-versions.d.ts +10 -0
- package/dist/history/actions/list-resource-versions.d.ts.map +1 -0
- package/dist/history/actions/list-resource-versions.js +35 -0
- package/dist/history/actions/list-resource-versions.js.map +1 -0
- package/dist/history/actions/restore-resource-version.d.ts +11 -0
- package/dist/history/actions/restore-resource-version.d.ts.map +1 -0
- package/dist/history/actions/restore-resource-version.js +59 -0
- package/dist/history/actions/restore-resource-version.js.map +1 -0
- package/dist/history/index.d.ts +4 -0
- package/dist/history/index.d.ts.map +1 -0
- package/dist/history/index.js +3 -0
- package/dist/history/index.js.map +1 -0
- package/dist/history/registry.d.ts +10 -0
- package/dist/history/registry.d.ts.map +1 -0
- package/dist/history/registry.js +61 -0
- package/dist/history/registry.js.map +1 -0
- package/dist/history/store.d.ts +34 -0
- package/dist/history/store.d.ts.map +1 -0
- package/dist/history/store.js +265 -0
- package/dist/history/store.js.map +1 -0
- package/dist/history/types.d.ts +55 -0
- package/dist/history/types.d.ts.map +1 -0
- package/dist/history/types.js +2 -0
- package/dist/history/types.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/navigation/index.d.ts +53 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +105 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/observability/routes.d.ts +3 -3
- package/dist/org/index.d.ts +1 -0
- package/dist/org/index.d.ts.map +1 -1
- package/dist/org/index.js +1 -0
- package/dist/org/index.js.map +1 -1
- package/dist/org/permissions.d.ts +7 -0
- package/dist/org/permissions.d.ts.map +1 -0
- package/dist/org/permissions.js +21 -0
- package/dist/org/permissions.js.map +1 -0
- package/dist/org-team/index.d.ts +2 -0
- package/dist/org-team/index.d.ts.map +1 -0
- package/dist/org-team/index.js +2 -0
- package/dist/org-team/index.js.map +1 -0
- package/dist/private-blob/registry.d.ts.map +1 -1
- package/dist/private-blob/registry.js +1 -0
- package/dist/private-blob/registry.js.map +1 -1
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/review/actions/consume-review-feedback.d.ts +9 -0
- package/dist/review/actions/consume-review-feedback.d.ts.map +1 -0
- package/dist/review/actions/consume-review-feedback.js +29 -0
- package/dist/review/actions/consume-review-feedback.js.map +1 -0
- package/dist/review/actions/create-review-comment.d.ts +18 -0
- package/dist/review/actions/create-review-comment.d.ts.map +1 -0
- package/dist/review/actions/create-review-comment.js +81 -0
- package/dist/review/actions/create-review-comment.js.map +1 -0
- package/dist/review/actions/delete-review-comment.d.ts +10 -0
- package/dist/review/actions/delete-review-comment.d.ts.map +1 -0
- package/dist/review/actions/delete-review-comment.js +45 -0
- package/dist/review/actions/delete-review-comment.js.map +1 -0
- package/dist/review/actions/get-review-feedback.d.ts +10 -0
- package/dist/review/actions/get-review-feedback.d.ts.map +1 -0
- package/dist/review/actions/get-review-feedback.js +45 -0
- package/dist/review/actions/get-review-feedback.js.map +1 -0
- package/dist/review/actions/list-review-comments.d.ts +13 -0
- package/dist/review/actions/list-review-comments.d.ts.map +1 -0
- package/dist/review/actions/list-review-comments.js +44 -0
- package/dist/review/actions/list-review-comments.js.map +1 -0
- package/dist/review/actions/reply-review-comment.d.ts +16 -0
- package/dist/review/actions/reply-review-comment.d.ts.map +1 -0
- package/dist/review/actions/reply-review-comment.js +84 -0
- package/dist/review/actions/reply-review-comment.js.map +1 -0
- package/dist/review/actions/resolve-review-thread.d.ts +11 -0
- package/dist/review/actions/resolve-review-thread.d.ts.map +1 -0
- package/dist/review/actions/resolve-review-thread.js +46 -0
- package/dist/review/actions/resolve-review-thread.js.map +1 -0
- package/dist/review/actions/set-review-status.d.ts +9 -0
- package/dist/review/actions/set-review-status.d.ts.map +1 -0
- package/dist/review/actions/set-review-status.js +43 -0
- package/dist/review/actions/set-review-status.js.map +1 -0
- package/dist/review/index.d.ts +5 -0
- package/dist/review/index.d.ts.map +1 -0
- package/dist/review/index.js +4 -0
- package/dist/review/index.js.map +1 -0
- package/dist/review/mentions.d.ts +4 -0
- package/dist/review/mentions.d.ts.map +1 -0
- package/dist/review/mentions.js +39 -0
- package/dist/review/mentions.js.map +1 -0
- package/dist/review/registry.d.ts +10 -0
- package/dist/review/registry.d.ts.map +1 -0
- package/dist/review/registry.js +61 -0
- package/dist/review/registry.js.map +1 -0
- package/dist/review/store.d.ts +63 -0
- package/dist/review/store.d.ts.map +1 -0
- package/dist/review/store.js +558 -0
- package/dist/review/store.js.map +1 -0
- package/dist/review/types.d.ts +77 -0
- package/dist/review/types.d.ts.map +1 -0
- package/dist/review/types.js +2 -0
- package/dist/review/types.js.map +1 -0
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +54 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts.map +1 -1
- package/dist/server/agent-engine-api-key-route.js +5 -0
- package/dist/server/agent-engine-api-key-route.js.map +1 -1
- package/dist/server/credential-provider.d.ts +26 -0
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +82 -0
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +37 -1
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/setup-connections/index.d.ts +6 -0
- package/dist/setup-connections/index.d.ts.map +1 -0
- package/dist/setup-connections/index.js +6 -0
- package/dist/setup-connections/index.js.map +1 -0
- package/dist/setup-connections/onboarding.d.ts +14 -0
- package/dist/setup-connections/onboarding.d.ts.map +1 -0
- package/dist/setup-connections/onboarding.js +23 -0
- package/dist/setup-connections/onboarding.js.map +1 -0
- package/dist/transcription/builder-transcription.d.ts +1 -0
- package/dist/transcription/builder-transcription.d.ts.map +1 -1
- package/dist/transcription/builder-transcription.js +5 -2
- package/dist/transcription/builder-transcription.js.map +1 -1
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +52 -0
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/docs/content/agent-native-toolkit.mdx +87 -80
- package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/de-DE/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/es-ES/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +89 -80
- package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +89 -80
- package/docs/content/toolkit-agent-ux.mdx +43 -0
- package/docs/content/toolkit-app-adapters.mdx +9 -0
- package/docs/content/toolkit-collaboration-ui.mdx +12 -0
- package/docs/content/toolkit-collaboration.mdx +74 -0
- package/docs/content/toolkit-command-navigation.mdx +106 -0
- package/docs/content/toolkit-comments-review.mdx +98 -0
- package/docs/content/toolkit-history.mdx +95 -0
- package/docs/content/toolkit-observability.mdx +41 -0
- package/docs/content/toolkit-org-team.mdx +80 -0
- package/docs/content/toolkit-resources.mdx +57 -0
- package/docs/content/toolkit-settings.mdx +65 -0
- package/docs/content/toolkit-setup-connections.mdx +109 -0
- package/docs/content/toolkit-sharing-ui.mdx +18 -6
- package/docs/content/toolkit-sharing.mdx +81 -0
- package/docs/content/toolkit-shell-hooks.mdx +9 -0
- package/docs/content/toolkit-ui.mdx +9 -0
- package/package.json +36 -2
- package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +0 -153
- package/corpus/templates/design/app/hooks/useAgentEditRequest.ts +0 -133
- package/corpus/templates/design/app/pages/DesignEditor.tsx +0 -22924
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
import { IntegrationsPanel } from "../integrations/IntegrationsPanel.js";
|
|
4
|
+
import { OnboardingPanel } from "../onboarding/OnboardingPanel.js";
|
|
5
|
+
import { SecretsSection } from "../settings/SecretsSection.js";
|
|
6
|
+
import { cn } from "../utils.js";
|
|
7
|
+
import { BuilderConnectCard } from "./BuilderConnectCard.js";
|
|
8
|
+
|
|
9
|
+
export interface SetupConnectionsPageProps {
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
onboardingTitle?: string;
|
|
13
|
+
focusSecretKey?: string;
|
|
14
|
+
providerReadiness?: ReactNode;
|
|
15
|
+
workspaceConnections?: ReactNode;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
showOnboarding?: boolean;
|
|
18
|
+
showBuilderConnect?: boolean;
|
|
19
|
+
showSecrets?: boolean;
|
|
20
|
+
showIntegrations?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function SetupConnectionsPage({
|
|
25
|
+
title = "Setup & connections",
|
|
26
|
+
description = "Manage setup status, Builder connect, app secrets, and workspace connections from one standard surface.",
|
|
27
|
+
onboardingTitle = "Setup checklist",
|
|
28
|
+
focusSecretKey,
|
|
29
|
+
providerReadiness,
|
|
30
|
+
workspaceConnections,
|
|
31
|
+
children,
|
|
32
|
+
showOnboarding = true,
|
|
33
|
+
showBuilderConnect = true,
|
|
34
|
+
showSecrets = true,
|
|
35
|
+
showIntegrations = false,
|
|
36
|
+
className,
|
|
37
|
+
}: SetupConnectionsPageProps) {
|
|
38
|
+
return (
|
|
39
|
+
<div className={cn("min-h-full bg-background p-4 sm:p-6", className)}>
|
|
40
|
+
<div className="mx-auto flex w-full max-w-6xl flex-col gap-5">
|
|
41
|
+
<header className="space-y-1">
|
|
42
|
+
<h1 className="text-2xl font-semibold tracking-normal text-foreground">
|
|
43
|
+
{title}
|
|
44
|
+
</h1>
|
|
45
|
+
<p className="max-w-3xl text-sm leading-6 text-muted-foreground">
|
|
46
|
+
{description}
|
|
47
|
+
</p>
|
|
48
|
+
</header>
|
|
49
|
+
|
|
50
|
+
<div className="grid gap-4 lg:grid-cols-[minmax(0,1fr)_360px]">
|
|
51
|
+
<main className="flex min-w-0 flex-col gap-4">
|
|
52
|
+
{showOnboarding ? (
|
|
53
|
+
<OnboardingPanel title={onboardingTitle} />
|
|
54
|
+
) : null}
|
|
55
|
+
{workspaceConnections ? (
|
|
56
|
+
<section className="rounded-lg border border-border bg-background p-4 shadow-sm">
|
|
57
|
+
{workspaceConnections}
|
|
58
|
+
</section>
|
|
59
|
+
) : null}
|
|
60
|
+
{providerReadiness ? (
|
|
61
|
+
<section className="rounded-lg border border-border bg-background p-4 shadow-sm">
|
|
62
|
+
{providerReadiness}
|
|
63
|
+
</section>
|
|
64
|
+
) : null}
|
|
65
|
+
{children}
|
|
66
|
+
</main>
|
|
67
|
+
|
|
68
|
+
<aside className="flex min-w-0 flex-col gap-4">
|
|
69
|
+
{showBuilderConnect ? <BuilderConnectCard /> : null}
|
|
70
|
+
{showSecrets ? (
|
|
71
|
+
<section className="rounded-lg border border-border bg-background p-4 shadow-sm">
|
|
72
|
+
<div className="mb-3">
|
|
73
|
+
<h2 className="text-sm font-semibold text-foreground">
|
|
74
|
+
Secrets
|
|
75
|
+
</h2>
|
|
76
|
+
<p className="mt-1 text-xs leading-5 text-muted-foreground">
|
|
77
|
+
Registered keys and OAuth credentials are stored in the
|
|
78
|
+
scoped secrets store.
|
|
79
|
+
</p>
|
|
80
|
+
</div>
|
|
81
|
+
<SecretsSection focusKey={focusSecretKey} />
|
|
82
|
+
</section>
|
|
83
|
+
) : null}
|
|
84
|
+
{showIntegrations ? (
|
|
85
|
+
<section className="rounded-lg border border-border bg-background p-4 shadow-sm">
|
|
86
|
+
<IntegrationsPanel />
|
|
87
|
+
</section>
|
|
88
|
+
) : null}
|
|
89
|
+
</aside>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export {
|
|
2
|
+
BuilderConnectCard,
|
|
3
|
+
type BuilderConnectCardProps,
|
|
4
|
+
} from "./BuilderConnectCard.js";
|
|
5
|
+
export {
|
|
6
|
+
ProviderReadinessBadge,
|
|
7
|
+
type ProviderReadinessBadgeProps,
|
|
8
|
+
} from "./ProviderReadinessBadge.js";
|
|
9
|
+
export {
|
|
10
|
+
SetupConnectionsPage,
|
|
11
|
+
type SetupConnectionsPageProps,
|
|
12
|
+
} from "./SetupConnectionsPage.js";
|
|
13
|
+
export {
|
|
14
|
+
OnboardingBanner,
|
|
15
|
+
OnboardingPanel,
|
|
16
|
+
SetupButton,
|
|
17
|
+
useOnboarding,
|
|
18
|
+
useOnboardingPreviewMode,
|
|
19
|
+
type OnboardingFormField,
|
|
20
|
+
type OnboardingMethod,
|
|
21
|
+
type OnboardingMethodBadge,
|
|
22
|
+
type OnboardingStep,
|
|
23
|
+
type OnboardingStepStatus,
|
|
24
|
+
type UseOnboardingResult,
|
|
25
|
+
} from "../onboarding/index.js";
|
|
26
|
+
export {
|
|
27
|
+
SecretsSection,
|
|
28
|
+
SettingsPanel,
|
|
29
|
+
SettingsTabsPage,
|
|
30
|
+
openBuilderConnectPopup,
|
|
31
|
+
useBuilderConnectFlow,
|
|
32
|
+
useBuilderStatus,
|
|
33
|
+
type BuilderConnectFlow,
|
|
34
|
+
type BuilderConnectFlowOptions,
|
|
35
|
+
type BuilderStatus,
|
|
36
|
+
type OpenBuilderConnectPopupOptions,
|
|
37
|
+
type SecretsSectionProps,
|
|
38
|
+
type SettingsPanelProps,
|
|
39
|
+
type SettingsTabItem,
|
|
40
|
+
type SettingsTabsPageProps,
|
|
41
|
+
} from "../settings/index.js";
|
|
42
|
+
export {
|
|
43
|
+
IntegrationsPanel,
|
|
44
|
+
useIntegrationStatus,
|
|
45
|
+
type IntegrationStatus,
|
|
46
|
+
} from "../integrations/index.js";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as Select from "@radix-ui/react-select";
|
|
2
2
|
import {
|
|
3
3
|
IconLock,
|
|
4
|
-
IconBuilding,
|
|
5
4
|
IconWorld,
|
|
6
5
|
IconTrash,
|
|
7
6
|
IconCheck,
|
|
@@ -11,6 +10,7 @@ import {
|
|
|
11
10
|
IconSearch,
|
|
12
11
|
IconSearchOff,
|
|
13
12
|
IconShare3,
|
|
13
|
+
IconUsersGroup,
|
|
14
14
|
} from "@tabler/icons-react";
|
|
15
15
|
import { useQueryClient } from "@tanstack/react-query";
|
|
16
16
|
import {
|
|
@@ -46,11 +46,11 @@ export interface ShareButtonProps {
|
|
|
46
46
|
/** @deprecated No longer affects rendering — trigger always says
|
|
47
47
|
* "Share". Kept for callsite compatibility. */
|
|
48
48
|
variant?: "compact" | "label";
|
|
49
|
-
/** Optional trigger style. Defaults to the Google-Docs-style "Share" label
|
|
50
|
-
*
|
|
51
|
-
*
|
|
49
|
+
/** Optional trigger style. Defaults to the Google-Docs-style "Share" label
|
|
50
|
+
* with a leading visibility icon. "label-icon" is kept for callsites that
|
|
51
|
+
* want to explicitly opt into icon+label parity; "icon" is icon-only. */
|
|
52
52
|
trigger?: "label" | "icon" | "label-icon";
|
|
53
|
-
/** @deprecated
|
|
53
|
+
/** @deprecated No longer affects rendering — triggers show visibility state. */
|
|
54
54
|
hideTriggerIcon?: boolean;
|
|
55
55
|
/** Optional className applied to the trigger button. */
|
|
56
56
|
triggerClassName?: string;
|
|
@@ -197,7 +197,7 @@ const VIS_META: Record<
|
|
|
197
197
|
org: {
|
|
198
198
|
label: "Organization",
|
|
199
199
|
description: "Anyone in your organization can view",
|
|
200
|
-
Icon:
|
|
200
|
+
Icon: IconUsersGroup,
|
|
201
201
|
},
|
|
202
202
|
public: {
|
|
203
203
|
label: "Public",
|
|
@@ -356,10 +356,17 @@ export function ShareButton(props: ShareButtonProps) {
|
|
|
356
356
|
});
|
|
357
357
|
};
|
|
358
358
|
|
|
359
|
-
|
|
360
|
-
|
|
359
|
+
const triggerVisibility =
|
|
360
|
+
pendingVisibility ??
|
|
361
|
+
(sharesQuery.data
|
|
362
|
+
? ((sharesQuery.data.visibility as Visibility | null) ?? "private")
|
|
363
|
+
: null);
|
|
364
|
+
const triggerMeta = triggerVisibility
|
|
365
|
+
? visibilityMeta(triggerVisibility, props.visibilityCopy)
|
|
366
|
+
: null;
|
|
367
|
+
const TriggerIcon = triggerMeta?.Icon ?? IconShare3;
|
|
368
|
+
const triggerLabel = triggerMeta ? `Share (${triggerMeta.label})` : "Share";
|
|
361
369
|
const iconOnly = props.trigger === "icon";
|
|
362
|
-
const showLabelIcon = props.trigger === "label-icon";
|
|
363
370
|
|
|
364
371
|
return (
|
|
365
372
|
<Popover open={open} onOpenChange={handleOpenChange}>
|
|
@@ -370,11 +377,10 @@ export function ShareButton(props: ShareButtonProps) {
|
|
|
370
377
|
iconOnly ? BUTTON_GHOST_ICON : BUTTON_OUTLINE_SM,
|
|
371
378
|
props.triggerClassName,
|
|
372
379
|
)}
|
|
373
|
-
aria-label={
|
|
380
|
+
aria-label={triggerLabel}
|
|
381
|
+
title={triggerLabel}
|
|
374
382
|
>
|
|
375
|
-
{
|
|
376
|
-
<IconShare3 size={16} strokeWidth={1.75} />
|
|
377
|
-
) : null}
|
|
383
|
+
<TriggerIcon size={16} strokeWidth={1.75} />
|
|
378
384
|
{!iconOnly && <span>Share</span>}
|
|
379
385
|
</button>
|
|
380
386
|
</PopoverTrigger>
|
|
@@ -1663,7 +1669,7 @@ function Avatar({ label, org }: { label: string; org?: boolean }) {
|
|
|
1663
1669
|
aria-hidden
|
|
1664
1670
|
className="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-[11px] font-semibold text-muted-foreground"
|
|
1665
1671
|
>
|
|
1666
|
-
{org ? <
|
|
1672
|
+
{org ? <IconUsersGroup size={14} strokeWidth={1.75} /> : initials(label)}
|
|
1667
1673
|
</span>
|
|
1668
1674
|
);
|
|
1669
1675
|
}
|
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
IconX,
|
|
4
4
|
IconTrash,
|
|
5
5
|
IconLock,
|
|
6
|
-
IconBuilding,
|
|
7
6
|
IconWorld,
|
|
8
7
|
IconCheck,
|
|
9
8
|
IconCopy,
|
|
@@ -11,6 +10,7 @@ import {
|
|
|
11
10
|
IconMail,
|
|
12
11
|
IconCode,
|
|
13
12
|
IconChevronDown,
|
|
13
|
+
IconUsersGroup,
|
|
14
14
|
} from "@tabler/icons-react";
|
|
15
15
|
import { useEffect, useState, type ReactNode } from "react";
|
|
16
16
|
import { createPortal } from "react-dom";
|
|
@@ -117,7 +117,7 @@ const BUTTON_GHOST_ICON = cn(
|
|
|
117
117
|
|
|
118
118
|
const VIS_ICONS: Record<Visibility, typeof IconLock> = {
|
|
119
119
|
private: IconLock,
|
|
120
|
-
org:
|
|
120
|
+
org: IconUsersGroup,
|
|
121
121
|
public: IconWorld,
|
|
122
122
|
};
|
|
123
123
|
|
|
@@ -824,7 +824,7 @@ function Avatar({ label, org }: { label: string; org?: boolean }) {
|
|
|
824
824
|
className="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-[11px] font-semibold text-muted-foreground"
|
|
825
825
|
>
|
|
826
826
|
{org ? (
|
|
827
|
-
<
|
|
827
|
+
<IconUsersGroup size={14} strokeWidth={1.75} />
|
|
828
828
|
) : (
|
|
829
829
|
(label.split("@")[0]?.[0] ?? label[0] ?? "?").toUpperCase()
|
|
830
830
|
)}
|
|
@@ -68,9 +68,41 @@ export function defaultActionQueryRetry(
|
|
|
68
68
|
// A timeout already made the user wait the full timeout window once;
|
|
69
69
|
// silently retrying would multiply that wait. Surface it instead.
|
|
70
70
|
if (isActionTimeout(error)) return false;
|
|
71
|
+
if (isBrowserResourceExhaustion(error)) return false;
|
|
72
|
+
// Network-level failures never carry an HTTP `status` (actionFetch only
|
|
73
|
+
// sets it after a response arrives). Chrome reports connection-pool
|
|
74
|
+
// exhaustion (net::ERR_INSUFFICIENT_RESOURCES) as a generic "Failed to
|
|
75
|
+
// fetch", indistinguishable from a transient blip — allow one retry, not
|
|
76
|
+
// three, so an exhausted tab cannot sustain its own fetch storm.
|
|
77
|
+
if (isNetworkLevelFailure(error)) return failureCount < 1;
|
|
71
78
|
return failureCount < 3;
|
|
72
79
|
}
|
|
73
80
|
|
|
81
|
+
/** @internal alias kept for existing specs. */
|
|
82
|
+
export const shouldRetryActionQueryForError = defaultActionQueryRetry;
|
|
83
|
+
|
|
84
|
+
function isBrowserResourceExhaustion(error: unknown): boolean {
|
|
85
|
+
const message =
|
|
86
|
+
error instanceof Error
|
|
87
|
+
? error.message
|
|
88
|
+
: typeof error === "string"
|
|
89
|
+
? error
|
|
90
|
+
: "";
|
|
91
|
+
return /ERR_INSUFFICIENT_RESOURCES|insufficient resources/i.test(message);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function isNetworkLevelFailure(error: unknown): boolean {
|
|
95
|
+
// Match the exact shape actionFetch produces for fetch-level failures (its
|
|
96
|
+
// catch wraps the cause as "Action <name> failed: <cause>" and never sets a
|
|
97
|
+
// status). Other status-less errors (test doubles, transport internals)
|
|
98
|
+
// keep the standard three-retry policy.
|
|
99
|
+
return (
|
|
100
|
+
error instanceof Error &&
|
|
101
|
+
(error as { status?: unknown }).status === undefined &&
|
|
102
|
+
/^Action .+ failed: /.test(error.message)
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
74
106
|
/**
|
|
75
107
|
* Default retry backoff for action queries. React Query's stock retryDelay
|
|
76
108
|
* (1s → 2s → 4s) makes a failing query sit on a spinner for ~7s before the
|
|
@@ -436,12 +468,14 @@ export function useActionMutation<
|
|
|
436
468
|
"mutationFn"
|
|
437
469
|
> & {
|
|
438
470
|
method?: "POST" | "PUT" | "DELETE";
|
|
471
|
+
skipActionQueryInvalidation?: boolean;
|
|
439
472
|
},
|
|
440
473
|
) {
|
|
441
474
|
const queryClient = useQueryClient();
|
|
442
475
|
const {
|
|
443
476
|
method: methodOpt,
|
|
444
477
|
onSuccess,
|
|
478
|
+
skipActionQueryInvalidation = false,
|
|
445
479
|
...restOptions
|
|
446
480
|
} = options ?? ({} as any);
|
|
447
481
|
const method = methodOpt ?? "POST";
|
|
@@ -454,8 +488,11 @@ export function useActionMutation<
|
|
|
454
488
|
mutationFn: (params) =>
|
|
455
489
|
actionFetch<D>(actionName, method, params as Record<string, any>),
|
|
456
490
|
onSuccess: (...args: [any, any, any]) => {
|
|
457
|
-
//
|
|
458
|
-
|
|
491
|
+
// Most mutations change app data broadly. High-volume background
|
|
492
|
+
// mutations can opt out and perform narrower invalidation in onSuccess.
|
|
493
|
+
if (!skipActionQueryInvalidation) {
|
|
494
|
+
queryClient.invalidateQueries({ queryKey: ["action"] });
|
|
495
|
+
}
|
|
459
496
|
(onSuccess as Function)?.(...args);
|
|
460
497
|
},
|
|
461
498
|
});
|
|
@@ -561,6 +561,9 @@ export function subscribeSyncEvents(
|
|
|
561
561
|
* compatibility invalidate triggered by `action` events. Use this to keep
|
|
562
562
|
* expensive active queries on explicit-refresh semantics while still letting
|
|
563
563
|
* normal source-versioned queries react through `useChangeVersion`.
|
|
564
|
+
* @param options.suppressActionInvalidationFor - Action names whose sync events
|
|
565
|
+
* should not invalidate all action queries. Use only for high-volume
|
|
566
|
+
* background actions that perform their own narrow client invalidation.
|
|
564
567
|
*/
|
|
565
568
|
export function useDbSync(
|
|
566
569
|
options: {
|
|
@@ -576,6 +579,7 @@ export function useDbSync(
|
|
|
576
579
|
pauseWhenHidden?: boolean;
|
|
577
580
|
ignoreSource?: string;
|
|
578
581
|
actionInvalidatePredicate?: (query: Query) => boolean;
|
|
582
|
+
suppressActionInvalidationFor?: string[];
|
|
579
583
|
} = {},
|
|
580
584
|
): void {
|
|
581
585
|
const {
|
|
@@ -599,6 +603,11 @@ export function useDbSync(
|
|
|
599
603
|
options.actionInvalidatePredicate,
|
|
600
604
|
);
|
|
601
605
|
actionInvalidatePredicateRef.current = options.actionInvalidatePredicate;
|
|
606
|
+
const suppressActionInvalidationForRef = useRef(
|
|
607
|
+
options.suppressActionInvalidationFor,
|
|
608
|
+
);
|
|
609
|
+
suppressActionInvalidationForRef.current =
|
|
610
|
+
options.suppressActionInvalidationFor;
|
|
602
611
|
|
|
603
612
|
useEffect(() => {
|
|
604
613
|
const id = Symbol("useDbSync");
|
|
@@ -621,6 +630,18 @@ export function useDbSync(
|
|
|
621
630
|
const relevant = ignore
|
|
622
631
|
? events.filter((e) => e.requestSource !== ignore)
|
|
623
632
|
: events;
|
|
633
|
+
const suppressedActions = new Set(
|
|
634
|
+
suppressActionInvalidationForRef.current ?? [],
|
|
635
|
+
);
|
|
636
|
+
const isSuppressedActionEvent = (evt: SyncEvent) =>
|
|
637
|
+
evt.source === "action" &&
|
|
638
|
+
typeof evt.key === "string" &&
|
|
639
|
+
suppressedActions.has(evt.key);
|
|
640
|
+
const nonAwareness = relevant.filter((e) => e.source !== "awareness");
|
|
641
|
+
const suppressesWholeBatch =
|
|
642
|
+
nonAwareness.length > 0 &&
|
|
643
|
+
nonAwareness.every((evt) => evt.source === "action") &&
|
|
644
|
+
nonAwareness.every(isSuppressedActionEvent);
|
|
624
645
|
|
|
625
646
|
// Bump per-source change counters. Components that read these via
|
|
626
647
|
// `useChangeVersion(source)` and fold the value into a React Query
|
|
@@ -642,7 +663,7 @@ export function useDbSync(
|
|
|
642
663
|
|
|
643
664
|
if (invalidating.length > 0 && queryClient) {
|
|
644
665
|
const hasActionEvent = invalidating.some(
|
|
645
|
-
(evt) => evt.source === "action",
|
|
666
|
+
(evt) => evt.source === "action" && !isSuppressedActionEvent(evt),
|
|
646
667
|
);
|
|
647
668
|
if (hasActionEvent) {
|
|
648
669
|
// Custom apps frequently start with raw `useQuery` calls before
|
|
@@ -661,23 +682,28 @@ export function useDbSync(
|
|
|
661
682
|
// etc.). Templates' own data queries do NOT live here — they react
|
|
662
683
|
// through `useChangeVersion(source)` in their query keys instead, so
|
|
663
684
|
// a single change event doesn't fan out into "refetch everything".
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
queryClient.invalidateQueries({ queryKey: ["
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
685
|
+
// Suppressed-action-only batches skip this whole list (their
|
|
686
|
+
// mutations perform their own narrow invalidation) — but events must
|
|
687
|
+
// STILL reach the onEvent forwarding below, so guard, don't return.
|
|
688
|
+
if (!suppressesWholeBatch) {
|
|
689
|
+
queryClient.invalidateQueries({ queryKey: ["action"] });
|
|
690
|
+
queryClient.invalidateQueries({ queryKey: ["extension"] });
|
|
691
|
+
queryClient.invalidateQueries({ queryKey: ["extensions"] });
|
|
692
|
+
queryClient.invalidateQueries({ queryKey: ["extension-slots"] });
|
|
693
|
+
queryClient.invalidateQueries({ queryKey: ["slot-installs"] });
|
|
694
|
+
queryClient.invalidateQueries({ queryKey: ["slot-available"] });
|
|
695
|
+
queryClient.invalidateQueries({ queryKey: ["tool"] });
|
|
696
|
+
queryClient.invalidateQueries({ queryKey: ["tools"] });
|
|
697
|
+
queryClient.invalidateQueries({ queryKey: ["app-state"] });
|
|
698
|
+
if (hasAppStateEvent(invalidating, "navigate")) {
|
|
699
|
+
queryClient.invalidateQueries({ queryKey: ["navigate-command"] });
|
|
700
|
+
}
|
|
701
|
+
if (hasAppStateEvent(invalidating, "show-questions")) {
|
|
702
|
+
queryClient.invalidateQueries({ queryKey: ["show-questions"] });
|
|
703
|
+
}
|
|
704
|
+
if (hasAppStateEvent(invalidating, "__set_url__")) {
|
|
705
|
+
queryClient.invalidateQueries({ queryKey: ["__set_url__"] });
|
|
706
|
+
}
|
|
681
707
|
}
|
|
682
708
|
}
|
|
683
709
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
import { defineAction } from "../action.js";
|
|
4
|
+
import { readAppState, writeAppState } from "../application-state/index.js";
|
|
5
|
+
|
|
6
|
+
const navigateSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
view: z.string().optional().describe("View name to navigate to"),
|
|
9
|
+
path: z.string().optional().describe("URL path to navigate to"),
|
|
10
|
+
})
|
|
11
|
+
.passthrough();
|
|
12
|
+
|
|
13
|
+
export interface CreateNavigateActionOptions {
|
|
14
|
+
description?: string;
|
|
15
|
+
stateKey?: string;
|
|
16
|
+
normalize?: (
|
|
17
|
+
args: z.infer<typeof navigateSchema>,
|
|
18
|
+
) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
19
|
+
describeResult?: (
|
|
20
|
+
navigation: Record<string, unknown>,
|
|
21
|
+
args: z.infer<typeof navigateSchema>,
|
|
22
|
+
) => string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CreateViewScreenActionOptions {
|
|
26
|
+
description?: string;
|
|
27
|
+
navigationStateKey?: string;
|
|
28
|
+
extraStateKeys?: string[];
|
|
29
|
+
describeResult?: (
|
|
30
|
+
screen: Record<string, unknown>,
|
|
31
|
+
) =>
|
|
32
|
+
| Record<string, unknown>
|
|
33
|
+
| string
|
|
34
|
+
| Promise<Record<string, unknown> | string>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function writeId(): string {
|
|
38
|
+
return `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function createNavigateAction(
|
|
42
|
+
options: CreateNavigateActionOptions = {},
|
|
43
|
+
) {
|
|
44
|
+
const stateKey = options.stateKey ?? "navigate";
|
|
45
|
+
return defineAction({
|
|
46
|
+
description:
|
|
47
|
+
options.description ??
|
|
48
|
+
"Navigate the UI to a specific view or path. Writes a navigate command to application state which the UI reads and auto-deletes.",
|
|
49
|
+
schema: navigateSchema,
|
|
50
|
+
http: false,
|
|
51
|
+
run: async (args) => {
|
|
52
|
+
if (!args.view && !args.path) {
|
|
53
|
+
throw new Error("At least --view or --path is required.");
|
|
54
|
+
}
|
|
55
|
+
const navigation = options.normalize
|
|
56
|
+
? await options.normalize(args)
|
|
57
|
+
: ({
|
|
58
|
+
...(args.view ? { view: args.view } : null),
|
|
59
|
+
...(args.path ? { path: args.path } : null),
|
|
60
|
+
} as Record<string, unknown>);
|
|
61
|
+
navigation._writeId = writeId();
|
|
62
|
+
await writeAppState(stateKey, navigation);
|
|
63
|
+
return (
|
|
64
|
+
options.describeResult?.(navigation, args) ??
|
|
65
|
+
`Navigating to ${String(args.view || args.path)}`
|
|
66
|
+
);
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function createViewScreenAction(
|
|
72
|
+
options: CreateViewScreenActionOptions = {},
|
|
73
|
+
) {
|
|
74
|
+
const navigationStateKey = options.navigationStateKey ?? "navigation";
|
|
75
|
+
return defineAction({
|
|
76
|
+
description:
|
|
77
|
+
options.description ??
|
|
78
|
+
"See what the user is currently looking at on screen. Returns the current navigation state.",
|
|
79
|
+
schema: z.object({}),
|
|
80
|
+
http: false,
|
|
81
|
+
readOnly: true,
|
|
82
|
+
run: async () => {
|
|
83
|
+
const screen: Record<string, unknown> = {};
|
|
84
|
+
const navigation = await readAppState(navigationStateKey);
|
|
85
|
+
if (navigation) screen.navigation = navigation;
|
|
86
|
+
|
|
87
|
+
for (const key of options.extraStateKeys ?? []) {
|
|
88
|
+
const value = await readAppState(key);
|
|
89
|
+
if (value !== null && value !== undefined) screen[key] = value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (Object.keys(screen).length === 0) {
|
|
93
|
+
return "No application state found. Is the app running?";
|
|
94
|
+
}
|
|
95
|
+
return options.describeResult
|
|
96
|
+
? await options.describeResult(screen)
|
|
97
|
+
: screen;
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "../navigation/index.js";
|
|
2
|
+
export * from "./actions.js";
|
|
3
|
+
export {
|
|
4
|
+
buildDeepLink,
|
|
5
|
+
toAbsoluteOpenUrl,
|
|
6
|
+
toDesktopOpenUrl,
|
|
7
|
+
toVsCodeOpenUrl,
|
|
8
|
+
DESKTOP_OPEN_URL,
|
|
9
|
+
OPEN_ROUTE_SUBPATH,
|
|
10
|
+
VSCODE_OPEN_URL,
|
|
11
|
+
type DeepLinkInput,
|
|
12
|
+
} from "../server/deep-link.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../review/index.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
|
|
1
3
|
import { drizzle as drizzleD1 } from "drizzle-orm/d1";
|
|
2
4
|
import type { LibSQLDatabase } from "drizzle-orm/libsql";
|
|
3
5
|
|
|
@@ -320,15 +322,26 @@ function getBetterSqliteDrizzle() {
|
|
|
320
322
|
* The patched transaction also patches the tx object it passes to the callback
|
|
321
323
|
* so that nested async calls (tx.transaction(async …)) work recursively.
|
|
322
324
|
*/
|
|
323
|
-
|
|
325
|
+
/** @internal exported for the async-tx concurrency spec */
|
|
326
|
+
export function patchBetterSqliteTransactions<
|
|
324
327
|
DB extends { transaction: (...args: any[]) => any; session: any },
|
|
325
328
|
>(db: DB, sqlite: { inTransaction: boolean; exec: (sql: string) => void }): DB {
|
|
326
329
|
let savepointSeq = 0;
|
|
330
|
+
// Concurrent TOP-LEVEL async transactions on the single better-sqlite3
|
|
331
|
+
// connection must not interleave: a second transaction starting while the
|
|
332
|
+
// first is open would see `inTransaction` and open a savepoint INSIDE the
|
|
333
|
+
// first transaction, which then commits out from under it ("no such
|
|
334
|
+
// savepoint"). Serialize top-level transactions through a promise chain;
|
|
335
|
+
// genuine same-task nesting (tx.transaction or db.transaction inside an
|
|
336
|
+
// open callback) is detected via AsyncLocalStorage and keeps the direct
|
|
337
|
+
// savepoint path so it cannot deadlock on the queue.
|
|
338
|
+
const txContext = new AsyncLocalStorage<boolean>();
|
|
339
|
+
let txChain: Promise<unknown> = Promise.resolve();
|
|
327
340
|
|
|
328
341
|
function makeAsyncTransaction(
|
|
329
342
|
originalTransaction: (...args: any[]) => any,
|
|
330
343
|
): (...args: any[]) => Promise<unknown> {
|
|
331
|
-
|
|
344
|
+
async function runTransactionBody(
|
|
332
345
|
cb: (tx: unknown) => unknown,
|
|
333
346
|
): Promise<unknown> {
|
|
334
347
|
// Extract the drizzle tx proxy synchronously — call the original with a
|
|
@@ -392,6 +405,23 @@ function patchBetterSqliteTransactions<
|
|
|
392
405
|
}
|
|
393
406
|
throw err;
|
|
394
407
|
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
return function asyncTransaction(
|
|
411
|
+
cb: (tx: unknown) => unknown,
|
|
412
|
+
): Promise<unknown> {
|
|
413
|
+
if (txContext.getStore()) {
|
|
414
|
+
// Same-task nesting: run directly (savepoint path inside the open
|
|
415
|
+
// transaction). Queueing here would deadlock behind the outer tx.
|
|
416
|
+
return runTransactionBody(cb);
|
|
417
|
+
}
|
|
418
|
+
const run = () => txContext.run(true, () => runTransactionBody(cb));
|
|
419
|
+
const next = txChain.then(run, run);
|
|
420
|
+
txChain = next.then(
|
|
421
|
+
() => undefined,
|
|
422
|
+
() => undefined,
|
|
423
|
+
);
|
|
424
|
+
return next;
|
|
395
425
|
};
|
|
396
426
|
}
|
|
397
427
|
|