@agent-native/core 0.80.8 → 0.80.10
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 +19 -0
- package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +6 -0
- package/corpus/core/docs/content/locales/de-DE/template-design.mdx +8 -0
- package/corpus/core/docs/content/locales/es-ES/template-design.mdx +10 -2
- package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +10 -2
- package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +7 -0
- package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +7 -0
- package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +7 -0
- package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +9 -2
- package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +6 -0
- package/corpus/core/docs/content/template-design.mdx +9 -2
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/design-connect.ts +28 -2
- package/corpus/core/src/cli/mcp.ts +10 -0
- package/corpus/core/src/cli/skills.ts +103 -36
- package/corpus/core/src/client/error-format.ts +25 -0
- package/corpus/core/src/client/extensions/ExtensionViewer.tsx +13 -11
- package/corpus/core/src/client/guided-questions.tsx +32 -4
- package/corpus/core/src/client/onboarding/OnboardingPanel.tsx +33 -1
- package/corpus/core/src/client/resources/BuiltinCapabilityDetail.tsx +8 -0
- package/corpus/core/src/client/resources/use-builtin-capabilities.ts +4 -2
- package/corpus/core/src/client/session-replay.ts +34 -0
- package/corpus/core/src/client/sharing/ShareButton.tsx +106 -21
- package/corpus/core/src/coding-tools/index.ts +1 -1
- package/corpus/core/src/mcp/index.ts +2 -0
- package/corpus/core/src/mcp/screen-memory-stdio.ts +290 -0
- package/corpus/core/src/mcp-client/builtin-capabilities.ts +13 -1
- package/corpus/core/src/mcp-client/index.ts +9 -0
- package/corpus/core/src/mcp-client/screen-memory-local.ts +461 -0
- package/corpus/core/src/onboarding/types.ts +7 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +25 -0
- package/corpus/core/src/server/agents-bundle.ts +35 -7
- package/corpus/core/src/styles/agent-native.css +5 -0
- package/corpus/core/src/templates/default/app/global.css +35 -35
- package/corpus/templates/analytics/AGENTS.md +6 -0
- package/corpus/templates/analytics/actions/github-repo-files.ts +9 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +4 -4
- package/corpus/templates/analytics/app/global.css +144 -40
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +4 -4
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +9 -9
- package/corpus/templates/analytics/changelog/2026-06-29-agents-can-search-and-read-connected-github-repositories-whe.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-sessions-and-explorer-layouts-adapt-when-the-agent-sidebar-is.md +6 -0
- package/corpus/templates/assets/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +1 -1
- package/corpus/templates/assets/app/global.css +99 -35
- package/corpus/templates/assets/app/routes/asset.$id.tsx +2 -2
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +4 -4
- package/corpus/templates/assets/app/routes/library.tsx +4 -4
- package/corpus/templates/assets/changelog/2026-06-29-asset-library-and-detail-layouts-adapt-when-the-agent-sidebar.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/brain/app/global.css +63 -35
- package/corpus/templates/brain/app/routes/search.tsx +1 -1
- package/corpus/templates/brain/app/routes/settings.tsx +1 -1
- package/corpus/templates/brain/app/routes/sources.tsx +2 -2
- package/corpus/templates/brain/changelog/2026-06-29-search-settings-and-source-layouts-adapt-when-the-agent-sidebar.md +6 -0
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +4 -4
- package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +3 -2
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +4 -2
- package/corpus/templates/calendar/app/global.css +69 -35
- package/corpus/templates/calendar/changelog/2026-06-29-event-and-find-time-layouts-adapt-when-the-agent-sidebar-is.md +6 -0
- package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/chat/app/global.css +35 -35
- package/corpus/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/clips/AGENTS.md +13 -0
- package/corpus/templates/clips/actions/get-screen-memory-status.ts +12 -0
- package/corpus/templates/clips/actions/query-screen-memory-context.ts +29 -0
- package/corpus/templates/clips/actions/view-screen.ts +2 -2
- package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
- package/corpus/templates/clips/app/global.css +47 -35
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +3 -3
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +45 -18
- package/corpus/templates/clips/changelog/2026-06-29-meeting-detail-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-29-screen-memory-keeps-a-local-rolling-screen-buffer-for-agent-context.md +5 -0
- package/corpus/templates/clips/changelog/2026-06-29-video-chat-is-easier-to-find-on-recording-pages-and-s3-setup.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/styles.css +39 -39
- package/corpus/templates/clips/desktop/src/app.tsx +290 -1
- package/corpus/templates/clips/desktop/src/shared/config.ts +83 -0
- package/corpus/templates/clips/desktop/src/styles.css +67 -52
- package/corpus/templates/clips/desktop/src-tauri/src/config.rs +50 -0
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +17 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +13 -13
- package/corpus/templates/clips/desktop/src-tauri/src/screen_memory.rs +990 -0
- package/corpus/templates/clips/server/plugins/onboarding.ts +2 -0
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +3 -3
- package/corpus/templates/content/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/content/app/global.css +29 -15
- package/corpus/templates/content/changelog/2026-06-29-database-gallery-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +25 -20
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +8 -0
- package/corpus/templates/design/.agents/skills/export-handoff/SKILL.md +8 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +13 -0
- package/corpus/templates/design/AGENTS.md +20 -12
- package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +1054 -0
- package/corpus/templates/design/DESIGN-STUDIO-PLAN.md +717 -0
- package/corpus/templates/design/actions/add-breakpoint.ts +143 -0
- package/corpus/templates/design/actions/add-localhost-screens.ts +5 -0
- package/corpus/templates/design/actions/apply-a11y-fix.ts +317 -0
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +433 -0
- package/corpus/templates/design/actions/apply-design-state.ts +200 -0
- package/corpus/templates/design/actions/apply-design-token-edit.ts +202 -0
- package/corpus/templates/design/actions/apply-motion-edit.ts +450 -0
- package/corpus/templates/design/actions/apply-shader-fill.ts +404 -0
- package/corpus/templates/design/actions/apply-visual-edit.ts +214 -8
- package/corpus/templates/design/actions/capture-design-state.ts +224 -0
- package/corpus/templates/design/actions/connect-builder-app.ts +162 -0
- package/corpus/templates/design/actions/create-component.ts +447 -0
- package/corpus/templates/design/actions/create-design-branch.ts +263 -0
- package/corpus/templates/design/actions/create-design-state.ts +162 -0
- package/corpus/templates/design/actions/delete-design-state.ts +55 -0
- package/corpus/templates/design/actions/deploy-design-preview.ts +275 -0
- package/corpus/templates/design/actions/export-coding-handoff.ts +12 -4
- package/corpus/templates/design/actions/generate-design.ts +6 -21
- package/corpus/templates/design/actions/generate-screens.ts +43 -2
- package/corpus/templates/design/actions/get-component-details.ts +242 -0
- package/corpus/templates/design/actions/get-design-branch-diff.ts +362 -0
- package/corpus/templates/design/actions/get-design-review.ts +314 -0
- package/corpus/templates/design/actions/get-design-surface-index.ts +582 -0
- package/corpus/templates/design/actions/get-design.ts +1 -0
- package/corpus/templates/design/actions/get-motion-timeline.ts +99 -0
- package/corpus/templates/design/actions/index-components.ts +258 -0
- package/corpus/templates/design/actions/index-design-tokens.ts +273 -0
- package/corpus/templates/design/actions/list-design-extensions.ts +309 -0
- package/corpus/templates/design/actions/list-design-source-capabilities.ts +153 -0
- package/corpus/templates/design/actions/list-design-states.ts +72 -0
- package/corpus/templates/design/actions/migrate-inline-design-to-app.ts +298 -0
- package/corpus/templates/design/actions/open-component-source.ts +237 -0
- package/corpus/templates/design/actions/present-design-variants.ts +355 -30
- package/corpus/templates/design/actions/preview-component-prop-edit.ts +254 -0
- package/corpus/templates/design/actions/preview-design-token-edit.ts +113 -0
- package/corpus/templates/design/actions/preview-shader-fill.ts +189 -0
- package/corpus/templates/design/actions/remove-breakpoint.ts +103 -0
- package/corpus/templates/design/actions/remove-motion-timeline.ts +196 -0
- package/corpus/templates/design/actions/run-design-audit.ts +421 -0
- package/corpus/templates/design/actions/run-design-extension-action.ts +284 -0
- package/corpus/templates/design/actions/set-active-breakpoint.ts +39 -0
- package/corpus/templates/design/actions/view-screen.ts +75 -31
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +1738 -135
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +1 -1
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +632 -43
- package/corpus/templates/design/app/components/design/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/components/design/EditPanel.tsx +1873 -132
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +384 -219
- package/corpus/templates/design/app/components/design/LocalSourceEditBanner.tsx +157 -0
- package/corpus/templates/design/app/components/design/MotionDock.tsx +1062 -0
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +2103 -295
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +83 -206
- package/corpus/templates/design/app/components/design/ReviewPanel.tsx +759 -0
- package/corpus/templates/design/app/components/design/StatesPanel.tsx +579 -0
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +573 -0
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design/canvas-primitive-style.ts +241 -0
- package/corpus/templates/design/app/components/design/index.ts +16 -1
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +238 -137
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +188 -14
- package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +24 -5
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +57 -1
- package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +145 -0
- package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +42 -12
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +37 -12
- package/corpus/templates/design/app/components/design/inspector/index.ts +1 -0
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +12 -5
- package/corpus/templates/design/app/components/design/types.ts +9 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +23 -5
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/global.css +77 -49
- package/corpus/templates/design/app/hooks/use-question-flow.ts +2 -2
- package/corpus/templates/design/app/hooks/useAgentEditRequest.ts +131 -0
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +11 -2
- package/corpus/templates/design/app/i18n/zh-TW.ts +34 -0
- package/corpus/templates/design/app/i18n-data.ts +314 -3
- package/corpus/templates/design/app/pages/DesignEditor.tsx +4929 -892
- package/corpus/templates/design/app/root.tsx +1 -1
- package/corpus/templates/design/changelog/2026-06-29-added-a-review-panel-in-the-design-editor-s-inspector-with-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-containers-no-longer-block-selecting-nested-elements-and-nor.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-copying-and-pasting-layers-no-longer-shows-success-notificat.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-agents-now-generate-and-refine-variants-from-stronger.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-inspector-controls-now-match-figmas-softer-dark-chrome.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-questions-now-appear-as-a-cleaner-canvas-intake-with-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-variant-directions-now-appear-as-board-screens-with-chat-buttons.md +5 -0
- package/corpus/templates/design/changelog/2026-06-29-device-presets-in-all-screens-view-resize-the-selected-previ.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-element-selection-no-longer-snaps-back-to-the-previous-layer.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-frame-resize-measurements-now-stay-beside-the-cursor-while-d.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-inspector-number-fields-have-cleaner-tooltips-and-draggable-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-and-canvas-drags-keep-the-layer-list-stable-while-chan.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-locking-layer-nesting-generated-question-intake-and-im.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-moves-can-be-undone-and-redone-without-flashing-the-ca.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-names-in-the-sidebar-can-scroll-horizontally-instead-o.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-nesting-in-the-sidebar-now-uses-tighter-spacing-so-nam.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layers-no-longer-repeat-document-wrapper-rows-when-a-screen-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-overview-previews-now-keep-element-hover-and-selection-tied-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-pressing-escape-now-cancels-a-stuck-screen-drag-in-the-overv.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-is-easier-to-find-and-named-screens-open-dir.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-only-highlights-screens-when-the-frame-or-ti.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-previews-now-resize-to-match-the-selected-de.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-selection-now-uses-a-pointer-cursor-instead-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-selection-outlines-now-stay-locked-to-the-se.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-zoom-now-reports-real-screen-scale-separatel.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-zooming-feels-smoother-and-selection-outline.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-zooming-now-stays-on-the-overview-canvas-ins.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-previews-use-a-single-blue-hover-border-in-all-screen.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-selected-containers-show-draggable-padding-and-gap-guides-on.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-selecting-a-nested-layer-from-all-screens-now-keeps-you-in-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-share-now-groups-link-sharing-exports-and-agent-handoff.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-design-editor-adds-a-studio-layer-with-tokens-respon.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-design-editor-loading-skeleton-now-uses-a-softer-charcoa.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-device-preview-menu-now-sits-next-to-the-preview-button-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-inspector-stays-read-only-while-an-empty-design-is-still.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-missing-design-view-now-matches-the-rest-of-the-editor-c.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-pen-tool-icon-and-tool-option-menus-better-match-the-edi.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-typography-controls-now-keep-the-font-name-visible-and-move-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-accessibility-findings-now-offer-a-one-click-fix.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-component-instances-now-have-editable-props-in-the-inspe.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-inspect-code-now-shows-the-elements-opening-tag-at-a-gla.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-shader-fill-presets-can-now-be-applied-to-an-element.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-motion-timeline-can-now-add-a-track-to-any-element-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-visual-editor-selection-layer-paint-and-drawing-controls-are-more-reliable.md +6 -0
- package/corpus/templates/design/e2e/README.md +3 -3
- package/corpus/templates/design/e2e/global-setup.ts +11 -22
- package/corpus/templates/design/e2e/helpers.ts +128 -11
- package/corpus/templates/design/playwright.config.ts +9 -3
- package/corpus/templates/design/server/db/schema.ts +123 -0
- package/corpus/templates/design/server/lib/coding-handoff.ts +126 -2
- package/corpus/templates/design/server/plugins/core-routes.ts +1 -2
- package/corpus/templates/design/server/plugins/db.ts +90 -0
- package/corpus/templates/design/server/routes/api/design-handoff/[id].zip.get.ts +86 -0
- package/corpus/templates/design/shared/builder-app.ts +297 -0
- package/corpus/templates/design/shared/capability-resolver.ts +123 -0
- package/corpus/templates/design/shared/capture-sanitize.ts +70 -0
- package/corpus/templates/design/shared/code-layer.ts +1141 -93
- package/corpus/templates/design/shared/component-model.ts +239 -0
- package/corpus/templates/design/shared/design-review.ts +275 -0
- package/corpus/templates/design/shared/design-source-capabilities.ts +286 -0
- package/corpus/templates/design/shared/design-state.ts +112 -0
- package/corpus/templates/design/shared/design-surface-index.ts +258 -0
- package/corpus/templates/design/shared/generation-session.ts +41 -0
- package/corpus/templates/design/shared/motion-compiler.ts +278 -0
- package/corpus/templates/design/shared/motion-timeline.ts +193 -0
- package/corpus/templates/design/shared/responsive-classes.ts +452 -0
- package/corpus/templates/design/shared/shader-fill.ts +323 -0
- package/corpus/templates/design/shared/source-mode.ts +245 -0
- package/corpus/templates/dispatch/app/global.css +79 -35
- package/corpus/templates/dispatch/app/routes/integrations.tsx +8 -7
- package/corpus/templates/dispatch/changelog/2026-06-29-integration-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/forms/app/components/layout/Layout.tsx +6 -2
- package/corpus/templates/forms/app/global.css +64 -35
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +2 -2
- package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +3 -3
- package/corpus/templates/forms/changelog/2026-06-29-form-list-and-insight-layouts-adapt-when-the-agent-sidebar.md +6 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +3 -1
- package/corpus/templates/macros/app/global.css +25 -9
- package/corpus/templates/macros/changelog/2026-06-29-macro-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +6 -2
- package/corpus/templates/mail/app/global.css +42 -36
- package/corpus/templates/mail/app/pages/InboxPage.tsx +1 -1
- package/corpus/templates/mail/changelog/2026-06-29-the-contact-panel-now-adapts-to-the-available-mail-pane-width.md +6 -0
- package/corpus/templates/plan/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +6 -2
- package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +6 -7
- package/corpus/templates/plan/app/global.css +74 -42
- package/corpus/templates/plan/changelog/2026-06-29-plan-canvases-open-without-an-initial-pan-and-zoom-flicker.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-29-plan-document-blocks-adapt-to-the-available-document-width.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-29-plan-titles-and-summaries-can-be-edited-inline-without-focus.md +6 -0
- package/corpus/templates/slides/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/slides/app/global.css +49 -33
- package/corpus/templates/slides/changelog/2026-06-29-slide-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/videos/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/videos/app/global.css +35 -35
- package/corpus/templates/videos/changelog/2026-06-29-video-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +28 -2
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/mcp.d.ts.map +1 -1
- package/dist/cli/mcp.js +10 -0
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +95 -33
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/error-format.d.ts.map +1 -1
- package/dist/client/error-format.js +17 -0
- package/dist/client/error-format.js.map +1 -1
- package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionViewer.js +3 -4
- package/dist/client/extensions/ExtensionViewer.js.map +1 -1
- package/dist/client/guided-questions.d.ts +4 -0
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +16 -7
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/onboarding/OnboardingPanel.js +26 -1
- package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
- package/dist/client/resources/BuiltinCapabilityDetail.d.ts.map +1 -1
- package/dist/client/resources/BuiltinCapabilityDetail.js +1 -1
- package/dist/client/resources/BuiltinCapabilityDetail.js.map +1 -1
- package/dist/client/resources/use-builtin-capabilities.d.ts +1 -1
- package/dist/client/resources/use-builtin-capabilities.d.ts.map +1 -1
- package/dist/client/resources/use-builtin-capabilities.js +2 -1
- package/dist/client/resources/use-builtin-capabilities.js.map +1 -1
- package/dist/client/session-replay.d.ts.map +1 -1
- package/dist/client/session-replay.js +31 -0
- package/dist/client/session-replay.js.map +1 -1
- package/dist/client/sharing/ShareButton.d.ts +14 -0
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +36 -7
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/coding-tools/index.js +1 -1
- package/dist/coding-tools/index.js.map +1 -1
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +6 -0
- package/dist/mcp/screen-memory-stdio.d.ts.map +1 -0
- package/dist/mcp/screen-memory-stdio.js +213 -0
- package/dist/mcp/screen-memory-stdio.js.map +1 -0
- package/dist/mcp-client/builtin-capabilities.d.ts +1 -1
- package/dist/mcp-client/builtin-capabilities.d.ts.map +1 -1
- package/dist/mcp-client/builtin-capabilities.js +10 -0
- package/dist/mcp-client/builtin-capabilities.js.map +1 -1
- package/dist/mcp-client/index.d.ts +1 -0
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +1 -0
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/mcp-client/screen-memory-local.d.ts +61 -0
- package/dist/mcp-client/screen-memory-local.d.ts.map +1 -0
- package/dist/mcp-client/screen-memory-local.js +336 -0
- package/dist/mcp-client/screen-memory-local.js.map +1 -0
- package/dist/observability/routes.d.ts +3 -3
- package/dist/onboarding/types.d.ts +7 -0
- package/dist/onboarding/types.d.ts.map +1 -1
- package/dist/onboarding/types.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +26 -0
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agents-bundle.d.ts.map +1 -1
- package/dist/server/agents-bundle.js +22 -7
- package/dist/server/agents-bundle.js.map +1 -1
- package/dist/styles/agent-native.css +5 -0
- package/dist/templates/default/app/global.css +35 -35
- package/docs/content/locales/ar-SA/template-design.mdx +6 -0
- package/docs/content/locales/de-DE/template-design.mdx +8 -0
- package/docs/content/locales/es-ES/template-design.mdx +10 -2
- package/docs/content/locales/fr-FR/template-design.mdx +10 -2
- package/docs/content/locales/hi-IN/template-design.mdx +7 -0
- package/docs/content/locales/ja-JP/template-design.mdx +7 -0
- package/docs/content/locales/ko-KR/template-design.mdx +7 -0
- package/docs/content/locales/pt-BR/template-design.mdx +9 -2
- package/docs/content/locales/zh-CN/template-design.mdx +6 -0
- package/docs/content/locales/zh-TW/template-design.mdx +6 -0
- package/docs/content/template-design.mdx +9 -2
- package/package.json +1 -1
- package/src/templates/default/app/global.css +35 -35
- package/corpus/templates/design/app/components/design/VariantGrid.tsx +0 -189
- package/corpus/templates/design/app/components/design/VariantHandoffCard.tsx +0 -115
- package/corpus/templates/design/app/hooks/use-variant-flow.ts +0 -342
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
IconArrowLeft,
|
|
3
3
|
IconArrowBackUp,
|
|
4
4
|
IconChevronRight,
|
|
5
|
-
|
|
5
|
+
IconDotsVertical,
|
|
6
6
|
IconHistory,
|
|
7
7
|
IconLoader2,
|
|
8
8
|
IconPencil,
|
|
@@ -33,7 +33,6 @@ import {
|
|
|
33
33
|
} from "../components/ui/tooltip.js";
|
|
34
34
|
import { PromptComposer } from "../composer/PromptComposer.js";
|
|
35
35
|
import { isEmbedMcpChatBridgeActive } from "../embed-auth.js";
|
|
36
|
-
import { NotificationsBell } from "../notifications/NotificationsBell.js";
|
|
37
36
|
import { ShareButton } from "../sharing/ShareButton.js";
|
|
38
37
|
import {
|
|
39
38
|
deleteOrHideExtension,
|
|
@@ -1162,6 +1161,17 @@ export function ExtensionViewer({ extensionId }: ExtensionViewerProps) {
|
|
|
1162
1161
|
extension={extension}
|
|
1163
1162
|
onOpenChange={onPopoverOpenChange}
|
|
1164
1163
|
/>
|
|
1164
|
+
</>
|
|
1165
|
+
)}
|
|
1166
|
+
<ToolMoreMenu
|
|
1167
|
+
extensionId={extensionId}
|
|
1168
|
+
toolName={extension.name}
|
|
1169
|
+
canDelete={extension.canDelete}
|
|
1170
|
+
sourceMode={extension.source?.mode}
|
|
1171
|
+
onOpenChange={onPopoverOpenChange}
|
|
1172
|
+
/>
|
|
1173
|
+
{!isLocalExtension && (
|
|
1174
|
+
<>
|
|
1165
1175
|
<ShareButton
|
|
1166
1176
|
resourceType="extension"
|
|
1167
1177
|
resourceId={extensionId}
|
|
@@ -1177,14 +1187,6 @@ export function ExtensionViewer({ extensionId }: ExtensionViewerProps) {
|
|
|
1177
1187
|
/>
|
|
1178
1188
|
</>
|
|
1179
1189
|
)}
|
|
1180
|
-
<ToolMoreMenu
|
|
1181
|
-
extensionId={extensionId}
|
|
1182
|
-
toolName={extension.name}
|
|
1183
|
-
canDelete={extension.canDelete}
|
|
1184
|
-
sourceMode={extension.source?.mode}
|
|
1185
|
-
onOpenChange={onPopoverOpenChange}
|
|
1186
|
-
/>
|
|
1187
|
-
<NotificationsBell onOpenChange={onPopoverOpenChange} />
|
|
1188
1190
|
<AgentToggleButton />
|
|
1189
1191
|
</div>
|
|
1190
1192
|
</div>
|
|
@@ -1320,7 +1322,7 @@ function ToolMoreMenu({
|
|
|
1320
1322
|
className="inline-flex items-center justify-center rounded-md h-8 w-8 text-muted-foreground hover:bg-accent hover:text-accent-foreground cursor-pointer"
|
|
1321
1323
|
aria-label="More options"
|
|
1322
1324
|
>
|
|
1323
|
-
<
|
|
1325
|
+
<IconDotsVertical className="h-4 w-4" />
|
|
1324
1326
|
</button>
|
|
1325
1327
|
</PopoverTrigger>
|
|
1326
1328
|
</TooltipTrigger>
|
|
@@ -50,6 +50,8 @@ export interface GuidedQuestion {
|
|
|
50
50
|
allowOther?: boolean;
|
|
51
51
|
includeExplore?: boolean;
|
|
52
52
|
includeDecide?: boolean;
|
|
53
|
+
/** Submit immediately when a single-select option is clicked. */
|
|
54
|
+
submitOnSelect?: boolean;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
export type GuidedQuestionAnswers = Record<string, unknown>;
|
|
@@ -60,6 +62,8 @@ export interface GuidedQuestionPayload {
|
|
|
60
62
|
description?: string;
|
|
61
63
|
skipLabel?: string;
|
|
62
64
|
submitLabel?: string;
|
|
65
|
+
submitMessage?: string;
|
|
66
|
+
skipMessage?: string;
|
|
63
67
|
/**
|
|
64
68
|
* @internal Set by {@link askUserQuestion} for client-initiated questions.
|
|
65
69
|
* When present, `useGuidedQuestionFlow` resolves the matching in-memory
|
|
@@ -374,6 +378,7 @@ export function guidedQuestionsFingerprint(
|
|
|
374
378
|
allowOther: question.allowOther ?? null,
|
|
375
379
|
includeExplore: question.includeExplore ?? null,
|
|
376
380
|
includeDecide: question.includeDecide ?? null,
|
|
381
|
+
submitOnSelect: question.submitOnSelect ?? false,
|
|
377
382
|
min: question.min ?? null,
|
|
378
383
|
max: question.max ?? null,
|
|
379
384
|
step: question.step ?? null,
|
|
@@ -447,6 +452,11 @@ export function GuidedQuestionFlow({
|
|
|
447
452
|
const setAnswer = useCallback((id: string, value: unknown) => {
|
|
448
453
|
setAnswers((prev) => ({ ...prev, [id]: value }));
|
|
449
454
|
}, []);
|
|
455
|
+
const submitAnswers = useCallback(
|
|
456
|
+
(nextAnswers: GuidedQuestionAnswers = answers) =>
|
|
457
|
+
onSubmit(normalizeGuidedAnswers(nextAnswers)),
|
|
458
|
+
[answers, onSubmit],
|
|
459
|
+
);
|
|
450
460
|
|
|
451
461
|
const allRequiredAnswered = questions
|
|
452
462
|
.filter((question) => question.required)
|
|
@@ -484,6 +494,9 @@ export function GuidedQuestionFlow({
|
|
|
484
494
|
question={question}
|
|
485
495
|
value={answers[question.id]}
|
|
486
496
|
onChange={(value) => setAnswer(question.id, value)}
|
|
497
|
+
onSubmitAnswer={(value) =>
|
|
498
|
+
submitAnswers({ ...answers, [question.id]: value })
|
|
499
|
+
}
|
|
487
500
|
/>
|
|
488
501
|
))}
|
|
489
502
|
</div>
|
|
@@ -512,7 +525,7 @@ export function GuidedQuestionFlow({
|
|
|
512
525
|
</button>
|
|
513
526
|
<button
|
|
514
527
|
type="button"
|
|
515
|
-
onClick={() =>
|
|
528
|
+
onClick={() => submitAnswers()}
|
|
516
529
|
disabled={!allRequiredAnswered}
|
|
517
530
|
className="inline-flex cursor-pointer items-center gap-2 rounded-md bg-primary px-3.5 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-45"
|
|
518
531
|
>
|
|
@@ -531,11 +544,13 @@ function QuestionCard({
|
|
|
531
544
|
question,
|
|
532
545
|
value,
|
|
533
546
|
onChange,
|
|
547
|
+
onSubmitAnswer,
|
|
534
548
|
}: {
|
|
535
549
|
index: number;
|
|
536
550
|
question: GuidedQuestion;
|
|
537
551
|
value: unknown;
|
|
538
552
|
onChange: (value: unknown) => void;
|
|
553
|
+
onSubmitAnswer: (value: unknown) => void;
|
|
539
554
|
}) {
|
|
540
555
|
return (
|
|
541
556
|
<section className="rounded-lg border border-border bg-card/65 p-4 shadow-sm">
|
|
@@ -564,7 +579,12 @@ function QuestionCard({
|
|
|
564
579
|
</div>
|
|
565
580
|
|
|
566
581
|
{question.type === "text-options" && (
|
|
567
|
-
<TextOptions
|
|
582
|
+
<TextOptions
|
|
583
|
+
question={question}
|
|
584
|
+
value={value}
|
|
585
|
+
onChange={onChange}
|
|
586
|
+
onSubmitAnswer={onSubmitAnswer}
|
|
587
|
+
/>
|
|
568
588
|
)}
|
|
569
589
|
{question.type === "color-options" && (
|
|
570
590
|
<ColorOptions question={question} value={value} onChange={onChange} />
|
|
@@ -591,10 +611,12 @@ function TextOptions({
|
|
|
591
611
|
question,
|
|
592
612
|
value,
|
|
593
613
|
onChange,
|
|
614
|
+
onSubmitAnswer,
|
|
594
615
|
}: {
|
|
595
616
|
question: GuidedQuestion;
|
|
596
617
|
value: unknown;
|
|
597
618
|
onChange: (value: unknown) => void;
|
|
619
|
+
onSubmitAnswer: (value: unknown) => void;
|
|
598
620
|
}) {
|
|
599
621
|
const options = useMemo(() => withDefaultOptions(question), [question]);
|
|
600
622
|
const multiSelect = question.multiSelect === true;
|
|
@@ -612,6 +634,7 @@ function TextOptions({
|
|
|
612
634
|
const toggleOption = (optionValue: string) => {
|
|
613
635
|
if (!multiSelect) {
|
|
614
636
|
onChange(optionValue);
|
|
637
|
+
if (question.submitOnSelect) onSubmitAnswer(optionValue);
|
|
615
638
|
return;
|
|
616
639
|
}
|
|
617
640
|
const next = selectedValues.includes(optionValue)
|
|
@@ -1060,6 +1083,7 @@ export function useGuidedQuestionFlow({
|
|
|
1060
1083
|
return;
|
|
1061
1084
|
}
|
|
1062
1085
|
const formattedAnswers = formatGuidedAnswersForAgent(answers);
|
|
1086
|
+
const resolvedSubmitMessage = payload?.submitMessage ?? submitMessage;
|
|
1063
1087
|
const context =
|
|
1064
1088
|
buildSubmitContext?.({ answers, formattedAnswers }) ??
|
|
1065
1089
|
[
|
|
@@ -1068,7 +1092,11 @@ export function useGuidedQuestionFlow({
|
|
|
1068
1092
|
"Answers:",
|
|
1069
1093
|
formattedAnswers,
|
|
1070
1094
|
].join("\n");
|
|
1071
|
-
sendToAgentChat({
|
|
1095
|
+
sendToAgentChat({
|
|
1096
|
+
message: resolvedSubmitMessage,
|
|
1097
|
+
context,
|
|
1098
|
+
submit: true,
|
|
1099
|
+
});
|
|
1072
1100
|
clear();
|
|
1073
1101
|
},
|
|
1074
1102
|
[buildSubmitContext, clear, payload, submitMessage],
|
|
@@ -1082,7 +1110,7 @@ export function useGuidedQuestionFlow({
|
|
|
1082
1110
|
return;
|
|
1083
1111
|
}
|
|
1084
1112
|
sendToAgentChat({
|
|
1085
|
-
message: skipMessage,
|
|
1113
|
+
message: payload?.skipMessage ?? skipMessage,
|
|
1086
1114
|
context: buildSkipContext?.(),
|
|
1087
1115
|
submit: true,
|
|
1088
1116
|
});
|
|
@@ -570,7 +570,7 @@ function FormMethod({
|
|
|
570
570
|
method: Extract<OnboardingMethod, { kind: "form" }>;
|
|
571
571
|
onCompleted: () => Promise<void>;
|
|
572
572
|
}) {
|
|
573
|
-
const { fields, writeScope } = method.payload;
|
|
573
|
+
const { fields, writeScope, saveTo, secretDescription } = method.payload;
|
|
574
574
|
const [values, setValues] = useState<Record<string, string>>({});
|
|
575
575
|
const [saving, setSaving] = useState(false);
|
|
576
576
|
const [err, setErr] = useState<string | null>(null);
|
|
@@ -587,6 +587,38 @@ function FormMethod({
|
|
|
587
587
|
setErr("Enter a value first.");
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
590
|
+
if (saveTo === "scoped-secrets") {
|
|
591
|
+
const secretScope =
|
|
592
|
+
writeScope === "workspace" || writeScope === "app"
|
|
593
|
+
? "workspace"
|
|
594
|
+
: "user";
|
|
595
|
+
for (const entry of vars) {
|
|
596
|
+
const res = await fetch(
|
|
597
|
+
agentNativePath("/_agent-native/secrets/adhoc"),
|
|
598
|
+
{
|
|
599
|
+
method: "POST",
|
|
600
|
+
headers: { "Content-Type": "application/json" },
|
|
601
|
+
body: JSON.stringify({
|
|
602
|
+
name: entry.key,
|
|
603
|
+
value: entry.value,
|
|
604
|
+
scope: secretScope,
|
|
605
|
+
description:
|
|
606
|
+
secretDescription ?? method.description ?? "Setup key",
|
|
607
|
+
}),
|
|
608
|
+
},
|
|
609
|
+
);
|
|
610
|
+
if (!res.ok) {
|
|
611
|
+
const data = await res.json().catch(() => ({}));
|
|
612
|
+
throw new Error(
|
|
613
|
+
(data as { error?: string }).error ??
|
|
614
|
+
`Save failed: ${res.status}`,
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
setValues({});
|
|
619
|
+
await onCompleted();
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
590
622
|
const res = await fetch(agentNativePath("/_agent-native/env-vars"), {
|
|
591
623
|
method: "POST",
|
|
592
624
|
headers: { "Content-Type": "application/json" },
|
|
@@ -151,6 +151,14 @@ export function BuiltinCapabilityDetail({
|
|
|
151
151
|
existing login.
|
|
152
152
|
</p>
|
|
153
153
|
)}
|
|
154
|
+
|
|
155
|
+
{capability.id === "screen-memory" && (
|
|
156
|
+
<p className="mt-6 rounded-md border border-border bg-muted/40 p-2.5 text-[11px] leading-relaxed text-muted-foreground">
|
|
157
|
+
Screen Memory only reads local Clips desktop context on this
|
|
158
|
+
machine. Turn it on from Clips desktop Settings before expecting
|
|
159
|
+
recent context results.
|
|
160
|
+
</p>
|
|
161
|
+
)}
|
|
154
162
|
</div>
|
|
155
163
|
</div>
|
|
156
164
|
);
|
|
@@ -6,7 +6,8 @@ import type { McpServerScope } from "./use-mcp-servers.js";
|
|
|
6
6
|
export type BuiltinCapabilityId =
|
|
7
7
|
| "browser-chrome-devtools"
|
|
8
8
|
| "browser-playwright"
|
|
9
|
-
| "computer-use"
|
|
9
|
+
| "computer-use"
|
|
10
|
+
| "screen-memory";
|
|
10
11
|
|
|
11
12
|
export interface BuiltinCapability {
|
|
12
13
|
id: BuiltinCapabilityId;
|
|
@@ -103,7 +104,8 @@ export function parseMcpBuiltinVirtualId(
|
|
|
103
104
|
if (
|
|
104
105
|
capabilityId !== "browser-chrome-devtools" &&
|
|
105
106
|
capabilityId !== "browser-playwright" &&
|
|
106
|
-
capabilityId !== "computer-use"
|
|
107
|
+
capabilityId !== "computer-use" &&
|
|
108
|
+
capabilityId !== "screen-memory"
|
|
107
109
|
) {
|
|
108
110
|
return null;
|
|
109
111
|
}
|
|
@@ -191,6 +191,7 @@ const DEFAULT_FLUSH_INTERVAL_MS = 5000;
|
|
|
191
191
|
const DEFAULT_MAX_DURATION_MS = 30 * 60 * 1000;
|
|
192
192
|
const DEFAULT_MAX_EVENTS_PER_BATCH = 50;
|
|
193
193
|
const DEFAULT_MAX_BATCH_BYTES = 256 * 1024;
|
|
194
|
+
const MAX_KEEPALIVE_REPLAY_UPLOAD_BYTES = 60 * 1024;
|
|
194
195
|
const URL_LIKE_KEYS = new Set([
|
|
195
196
|
"url",
|
|
196
197
|
"uri",
|
|
@@ -729,6 +730,24 @@ interface ReplayUploadBody {
|
|
|
729
730
|
compressed: boolean;
|
|
730
731
|
}
|
|
731
732
|
|
|
733
|
+
function isCrossOriginReplayEndpoint(endpoint: string): boolean {
|
|
734
|
+
if (typeof window === "undefined") return false;
|
|
735
|
+
try {
|
|
736
|
+
return (
|
|
737
|
+
new URL(endpoint, window.location.href).origin !== window.location.origin
|
|
738
|
+
);
|
|
739
|
+
} catch {
|
|
740
|
+
return false;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
function replayUploadByteLength(body: string): number {
|
|
745
|
+
if (typeof TextEncoder !== "undefined") {
|
|
746
|
+
return new TextEncoder().encode(body).byteLength;
|
|
747
|
+
}
|
|
748
|
+
return body.length;
|
|
749
|
+
}
|
|
750
|
+
|
|
732
751
|
async function gzipReplayBody(body: string): Promise<Blob | null> {
|
|
733
752
|
if (
|
|
734
753
|
typeof CompressionStream === "undefined" ||
|
|
@@ -773,6 +792,21 @@ async function sendReplayUpload(
|
|
|
773
792
|
options: NormalizedSessionReplayOptions,
|
|
774
793
|
body: string,
|
|
775
794
|
): Promise<void> {
|
|
795
|
+
if (isCrossOriginReplayEndpoint(options.endpoint)) {
|
|
796
|
+
if (navigator.sendBeacon) {
|
|
797
|
+
const sent = navigator.sendBeacon(options.endpoint, body);
|
|
798
|
+
if (sent) return;
|
|
799
|
+
}
|
|
800
|
+
await fetch(options.endpoint, {
|
|
801
|
+
method: "POST",
|
|
802
|
+
body,
|
|
803
|
+
keepalive:
|
|
804
|
+
replayUploadByteLength(body) <= MAX_KEEPALIVE_REPLAY_UPLOAD_BYTES,
|
|
805
|
+
headers: { "Content-Type": "text/plain;charset=UTF-8" },
|
|
806
|
+
}).catch(() => {});
|
|
807
|
+
return;
|
|
808
|
+
}
|
|
809
|
+
|
|
776
810
|
const upload = await buildReplayUploadBody(body);
|
|
777
811
|
if (!upload.compressed && navigator.sendBeacon) {
|
|
778
812
|
const sent = navigator.sendBeacon(options.endpoint, body);
|
|
@@ -109,6 +109,20 @@ export interface ShareButtonProps {
|
|
|
109
109
|
description?: ReactNode;
|
|
110
110
|
onCheckedChange: (checked: boolean) => void | Promise<void>;
|
|
111
111
|
};
|
|
112
|
+
/** Optional extra tabs rendered beside the default sharing/access panel. */
|
|
113
|
+
shareTabs?: {
|
|
114
|
+
shareLabel?: ReactNode;
|
|
115
|
+
defaultValue?: string;
|
|
116
|
+
tabs: Array<{
|
|
117
|
+
value: string;
|
|
118
|
+
label: ReactNode;
|
|
119
|
+
content: ReactNode;
|
|
120
|
+
disabled?: boolean;
|
|
121
|
+
}>;
|
|
122
|
+
onValueChange?: (value: string) => void;
|
|
123
|
+
};
|
|
124
|
+
/** Optional className for the popover content, useful for wider custom tabs. */
|
|
125
|
+
popoverClassName?: string;
|
|
112
126
|
}
|
|
113
127
|
|
|
114
128
|
type Visibility = "private" | "org" | "public";
|
|
@@ -213,6 +227,8 @@ const ROLE_OPTIONS: Array<{ value: Role; label: string; description: string }> =
|
|
|
213
227
|
*/
|
|
214
228
|
export function ShareButton(props: ShareButtonProps) {
|
|
215
229
|
const [open, setOpen] = useState(false);
|
|
230
|
+
const shareTabDefaultValue = props.shareTabs?.defaultValue ?? "share";
|
|
231
|
+
const [activeShareTab, setActiveShareTab] = useState(shareTabDefaultValue);
|
|
216
232
|
const [pendingVisibility, setPendingVisibility] = useState<Visibility | null>(
|
|
217
233
|
null,
|
|
218
234
|
);
|
|
@@ -238,7 +254,16 @@ export function ShareButton(props: ShareButtonProps) {
|
|
|
238
254
|
const handleOpenChange = (v: boolean) => {
|
|
239
255
|
setOpen(v);
|
|
240
256
|
props.onOpenChange?.(v);
|
|
241
|
-
if (v
|
|
257
|
+
if (v) {
|
|
258
|
+
setActiveShareTab(shareTabDefaultValue);
|
|
259
|
+
props.shareTabs?.onValueChange?.(shareTabDefaultValue);
|
|
260
|
+
if (pendingVisibility === null) sharesQuery.refetch();
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
const handleShareTabChange = (value: string) => {
|
|
265
|
+
setActiveShareTab(value);
|
|
266
|
+
props.shareTabs?.onValueChange?.(value);
|
|
242
267
|
};
|
|
243
268
|
|
|
244
269
|
useEffect(() => {
|
|
@@ -322,6 +347,7 @@ export function ShareButton(props: ShareButtonProps) {
|
|
|
322
347
|
className={cn(
|
|
323
348
|
"z-[2000] w-[min(460px,92vw)] rounded-lg p-4 shadow-lg",
|
|
324
349
|
SHARE_POPOVER_SURFACE,
|
|
350
|
+
props.popoverClassName,
|
|
325
351
|
)}
|
|
326
352
|
onOpenAutoFocus={(e) => e.preventDefault()}
|
|
327
353
|
>
|
|
@@ -331,6 +357,8 @@ export function ShareButton(props: ShareButtonProps) {
|
|
|
331
357
|
visibilityOverride={pendingVisibility}
|
|
332
358
|
onVisibilityChange={handleVisibilityChange}
|
|
333
359
|
onClose={() => handleOpenChange(false)}
|
|
360
|
+
activeTab={activeShareTab}
|
|
361
|
+
onTabChange={handleShareTabChange}
|
|
334
362
|
/>
|
|
335
363
|
</PopoverContent>
|
|
336
364
|
</Popover>
|
|
@@ -505,6 +533,8 @@ function SharePanel(
|
|
|
505
533
|
visibilityOverride: Visibility | null;
|
|
506
534
|
onVisibilityChange: (visibility: Visibility) => Promise<void>;
|
|
507
535
|
onClose: () => void;
|
|
536
|
+
activeTab: string;
|
|
537
|
+
onTabChange: (value: string) => void;
|
|
508
538
|
},
|
|
509
539
|
) {
|
|
510
540
|
const {
|
|
@@ -596,6 +626,9 @@ function SharePanel(
|
|
|
596
626
|
Boolean(props.shareUrlPlaceholder) ||
|
|
597
627
|
Boolean(props.secondaryShareUrl);
|
|
598
628
|
const shareUrlPlacement = props.shareUrlPlacement ?? "bottom";
|
|
629
|
+
const extraTabs = props.shareTabs?.tabs ?? [];
|
|
630
|
+
const hasTabs = extraTabs.length > 0;
|
|
631
|
+
const shareTabLabel = props.shareTabs?.shareLabel ?? "Share link";
|
|
599
632
|
|
|
600
633
|
const serverShares = data?.shares ?? [];
|
|
601
634
|
const shares: Share[] = [
|
|
@@ -773,34 +806,37 @@ function SharePanel(
|
|
|
773
806
|
? `Share "${resourceTitle}"`
|
|
774
807
|
: `Share ${resourceType}`;
|
|
775
808
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
809
|
+
const sharePanel = isLoading ? (
|
|
810
|
+
<div>
|
|
811
|
+
{!hasTabs ? (
|
|
779
812
|
<div
|
|
780
813
|
className="mb-3 truncate text-base font-semibold"
|
|
781
814
|
title={titleText}
|
|
782
815
|
>
|
|
783
816
|
{titleText}
|
|
784
817
|
</div>
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
</
|
|
818
|
+
) : null}
|
|
819
|
+
<div className="mb-4 h-9 rounded-md bg-muted animate-pulse" />
|
|
820
|
+
<div className="mb-2 text-sm font-semibold">{peopleAccessLabel}</div>
|
|
821
|
+
<div className="mb-4 h-7 rounded-md bg-muted animate-pulse" />
|
|
822
|
+
<div className="mb-2 text-sm font-semibold">{generalAccessLabel}</div>
|
|
823
|
+
<div className="mb-4 h-9 rounded-md bg-muted animate-pulse" />
|
|
824
|
+
<div className="mt-2 flex justify-end">
|
|
825
|
+
<button type="button" onClick={onClose} className={BUTTON_PRIMARY_SM}>
|
|
826
|
+
Done
|
|
827
|
+
</button>
|
|
795
828
|
</div>
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
return (
|
|
829
|
+
</div>
|
|
830
|
+
) : (
|
|
800
831
|
<div>
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
832
|
+
{!hasTabs ? (
|
|
833
|
+
<div
|
|
834
|
+
className="mb-3 truncate text-base font-semibold"
|
|
835
|
+
title={titleText}
|
|
836
|
+
>
|
|
837
|
+
{titleText}
|
|
838
|
+
</div>
|
|
839
|
+
) : null}
|
|
804
840
|
|
|
805
841
|
{showShareLinks && shareUrlPlacement === "top" ? shareLinks : null}
|
|
806
842
|
|
|
@@ -965,6 +1001,55 @@ function SharePanel(
|
|
|
965
1001
|
</div>
|
|
966
1002
|
</div>
|
|
967
1003
|
);
|
|
1004
|
+
|
|
1005
|
+
if (!hasTabs) return sharePanel;
|
|
1006
|
+
|
|
1007
|
+
const tabs = [
|
|
1008
|
+
{
|
|
1009
|
+
value: "share",
|
|
1010
|
+
label: shareTabLabel,
|
|
1011
|
+
content: sharePanel,
|
|
1012
|
+
disabled: false,
|
|
1013
|
+
},
|
|
1014
|
+
...extraTabs,
|
|
1015
|
+
];
|
|
1016
|
+
const activeTab = tabs.some((tab) => tab.value === props.activeTab)
|
|
1017
|
+
? props.activeTab
|
|
1018
|
+
: "share";
|
|
1019
|
+
|
|
1020
|
+
return (
|
|
1021
|
+
<div className="flex flex-col gap-4">
|
|
1022
|
+
<div
|
|
1023
|
+
role="tablist"
|
|
1024
|
+
aria-label="Share options"
|
|
1025
|
+
className="flex gap-1 rounded-xl bg-muted/70 p-1"
|
|
1026
|
+
>
|
|
1027
|
+
{tabs.map((tab) => {
|
|
1028
|
+
const active = tab.value === activeTab;
|
|
1029
|
+
return (
|
|
1030
|
+
<button
|
|
1031
|
+
key={tab.value}
|
|
1032
|
+
type="button"
|
|
1033
|
+
role="tab"
|
|
1034
|
+
aria-selected={active}
|
|
1035
|
+
disabled={tab.disabled}
|
|
1036
|
+
onClick={() => props.onTabChange(tab.value)}
|
|
1037
|
+
className={cn(
|
|
1038
|
+
"h-11 min-w-0 flex-1 rounded-lg px-3 text-sm font-medium text-muted-foreground transition-colors hover:bg-background/70 hover:text-foreground disabled:pointer-events-none disabled:opacity-50",
|
|
1039
|
+
active &&
|
|
1040
|
+
"bg-background text-foreground shadow-sm ring-2 ring-primary",
|
|
1041
|
+
)}
|
|
1042
|
+
>
|
|
1043
|
+
<span className="block truncate">{tab.label}</span>
|
|
1044
|
+
</button>
|
|
1045
|
+
);
|
|
1046
|
+
})}
|
|
1047
|
+
</div>
|
|
1048
|
+
<div role="tabpanel">
|
|
1049
|
+
{tabs.find((tab) => tab.value === activeTab)?.content}
|
|
1050
|
+
</div>
|
|
1051
|
+
</div>
|
|
1052
|
+
);
|
|
968
1053
|
}
|
|
969
1054
|
|
|
970
1055
|
function AdvancedAccessPopover({
|
|
@@ -481,7 +481,7 @@ export async function runCodingCommand(
|
|
|
481
481
|
else child.stdin?.end();
|
|
482
482
|
const code = await new Promise<number | null>((resolve, reject) => {
|
|
483
483
|
child.once("error", reject);
|
|
484
|
-
child.once("
|
|
484
|
+
child.once("close", resolve);
|
|
485
485
|
});
|
|
486
486
|
clearTimeout(timer);
|
|
487
487
|
return { code, stdout, stderr, timedOut, durationMs: Date.now() - startMs };
|
|
@@ -14,6 +14,8 @@ export type { MCPCallerIdentity, MCPRequestMeta } from "./build-server.js";
|
|
|
14
14
|
// stdio transport for `agent-native mcp serve` (Node-only).
|
|
15
15
|
export { runMCPStdio } from "./stdio.js";
|
|
16
16
|
export type { RunMCPStdioOptions } from "./stdio.js";
|
|
17
|
+
export { runScreenMemoryMCPStdio } from "./screen-memory-stdio.js";
|
|
18
|
+
export type { RunScreenMemoryMCPStdioOptions } from "./screen-memory-stdio.js";
|
|
17
19
|
|
|
18
20
|
// Generic cross-app builtin tools (merged into the registry, template wins).
|
|
19
21
|
export { getBuiltinCrossAppTools } from "./builtin-tools.js";
|