@agent-native/core 0.80.7 → 0.80.9
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 +18 -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/mcp.ts +10 -0
- package/corpus/core/src/cli/skills.ts +58 -12
- package/corpus/core/src/client/AssistantChat.tsx +70 -27
- package/corpus/core/src/client/analytics.ts +3 -1
- 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/DocumentEditor.tsx +69 -16
- 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/content/changelog/2026-06-29-read-only-pages-no-longer-try-to-autosave-or-open-editor-onl.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 +24 -14
- package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +1054 -0
- package/corpus/templates/design/actions/apply-visual-edit.ts +24 -4
- package/corpus/templates/design/actions/edit-design.ts +6 -3
- 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 +48 -5
- package/corpus/templates/design/actions/get-design.ts +1 -0
- package/corpus/templates/design/actions/present-design-variants.ts +355 -30
- package/corpus/templates/design/actions/update-design.ts +47 -10
- package/corpus/templates/design/actions/update-file.ts +33 -8
- package/corpus/templates/design/actions/view-screen.ts +89 -31
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +389 -71
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +1 -1
- package/corpus/templates/design/app/components/design/EditPanel.tsx +596 -95
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +428 -221
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +1197 -228
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +94 -217
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +28 -14
- package/corpus/templates/design/app/components/design/index.ts +0 -1
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +228 -170
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +140 -13
- package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +39 -8
- package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +4 -2
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +75 -5
- 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 +17 -4
- 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 +448 -259
- 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/useDesignHotkeys.ts +8 -1
- package/corpus/templates/design/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/design/app/i18n-data.ts +55 -3
- package/corpus/templates/design/app/pages/DesignEditor.tsx +2783 -658
- package/corpus/templates/design/app/root.tsx +1 -1
- package/corpus/templates/design/changelog/2026-06-29-agent-edits-to-a-design-are-no-longer-occasionally-dropped-o.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-box-shadow-and-gradient-colors-keep-named-css-colors-like-re.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-cut-cmd-ctrl-x-now-removes-the-selected-element-to-the-clipb.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-deleting-with-multiple-layers-selected-in-the-layers-panel-n.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-duplicating-a-screen-now-gives-the-copy-its-own-layer-ids-so.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-hiding-and-re-showing-a-gradient-fill-now-preserves-each-sto.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-locking-layer-nesting-generated-question-intake-and-im.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-picking-a-design-direction-now-submits-to-the-agent-right-aw.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-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-style-changes-that-set-several-properties-at-once-fixed-size.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-editor-no-longer-crashes-when-a-screen-ends-up-with-dupl.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/e2e/README.md +4 -3
- package/corpus/templates/design/e2e/global-setup.ts +24 -23
- package/corpus/templates/design/e2e/helpers.ts +122 -11
- package/corpus/templates/design/playwright.config.ts +19 -4
- 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/routes/api/design-handoff/[id].zip.get.ts +86 -0
- package/corpus/templates/design/shared/code-layer.ts +125 -22
- package/corpus/templates/design/shared/color-utils.ts +159 -0
- package/corpus/templates/design/shared/generation-session.ts +42 -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/DocumentArea.tsx +6 -7
- package/corpus/templates/plan/app/global.css +74 -42
- 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/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 +58 -12
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +54 -24
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +2 -1
- package/dist/client/analytics.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/collab/routes.d.ts +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/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/resources/handlers.d.ts +2 -2
- 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/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/server/transcribe-voice.d.ts +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 -258
|
@@ -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";
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
interface ScreenMemoryEvent {
|
|
6
|
+
capturedAt: string;
|
|
7
|
+
appName?: string | null;
|
|
8
|
+
windowTitle?: string | null;
|
|
9
|
+
bundleId?: string | null;
|
|
10
|
+
source: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface ScreenMemorySegment {
|
|
14
|
+
id: string;
|
|
15
|
+
startedAt: string;
|
|
16
|
+
endedAt: string;
|
|
17
|
+
path: string;
|
|
18
|
+
fileName?: string;
|
|
19
|
+
mimeType: string;
|
|
20
|
+
bytes: number;
|
|
21
|
+
durationMs: number;
|
|
22
|
+
corrupt?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface ScreenMemoryConfig {
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
paused?: boolean;
|
|
28
|
+
retentionHours?: number;
|
|
29
|
+
maxBytes?: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface RunScreenMemoryMCPStdioOptions {
|
|
33
|
+
storeDir?: string;
|
|
34
|
+
env?: NodeJS.ProcessEnv;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const EVENTS_JSONL = "events.jsonl";
|
|
38
|
+
|
|
39
|
+
function log(msg: string): void {
|
|
40
|
+
process.stderr.write(`[screen-memory-mcp] ${msg}\n`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function defaultAppDataDir(env: NodeJS.ProcessEnv): string {
|
|
44
|
+
const home = os.homedir();
|
|
45
|
+
if (process.platform === "darwin") {
|
|
46
|
+
return path.join(home, "Library", "Application Support", "com.clips.tray");
|
|
47
|
+
}
|
|
48
|
+
if (process.platform === "win32") {
|
|
49
|
+
return path.join(
|
|
50
|
+
env.APPDATA || path.join(home, "AppData", "Roaming"),
|
|
51
|
+
"com.clips.tray",
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
return path.join(
|
|
55
|
+
env.XDG_DATA_HOME || path.join(home, ".local", "share"),
|
|
56
|
+
"com.clips.tray",
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function defaultStoreDir(env: NodeJS.ProcessEnv): string {
|
|
61
|
+
const envDir =
|
|
62
|
+
env.AGENT_NATIVE_SCREEN_MEMORY_DIR ?? env.CLIPS_SCREEN_MEMORY_DIR;
|
|
63
|
+
if (envDir) return envDir;
|
|
64
|
+
return path.join(defaultAppDataDir(env), "screen-memory");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function readJsonl<T>(file: string): T[] {
|
|
68
|
+
let body = "";
|
|
69
|
+
try {
|
|
70
|
+
body = fs.readFileSync(file, "utf-8");
|
|
71
|
+
} catch {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
return body
|
|
75
|
+
.split(/\r?\n/)
|
|
76
|
+
.filter(Boolean)
|
|
77
|
+
.map((line) => {
|
|
78
|
+
try {
|
|
79
|
+
return JSON.parse(line) as T;
|
|
80
|
+
} catch {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
.filter((value): value is T => Boolean(value));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function readFeatureConfig(storeDir: string): ScreenMemoryConfig {
|
|
88
|
+
const configPath = path.join(path.dirname(storeDir), "feature-config.json");
|
|
89
|
+
try {
|
|
90
|
+
const parsed = JSON.parse(fs.readFileSync(configPath, "utf-8")) as {
|
|
91
|
+
screenMemory?: ScreenMemoryConfig;
|
|
92
|
+
};
|
|
93
|
+
return parsed.screenMemory ?? {};
|
|
94
|
+
} catch {
|
|
95
|
+
return {};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function cutoffFor(minutes: number): number {
|
|
100
|
+
return Date.now() - Math.max(1, Math.min(minutes, 24 * 60)) * 60_000;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function eventMatches(event: ScreenMemoryEvent, query: string): boolean {
|
|
104
|
+
const needle = query.trim().toLowerCase();
|
|
105
|
+
if (!needle) return true;
|
|
106
|
+
return [event.appName, event.windowTitle, event.bundleId, event.source].some(
|
|
107
|
+
(value) => value?.toLowerCase().includes(needle),
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function recentEvents(
|
|
112
|
+
storeDir: string,
|
|
113
|
+
args: { query?: string; minutes?: number; limit?: number },
|
|
114
|
+
): ScreenMemoryEvent[] {
|
|
115
|
+
const cutoff = cutoffFor(args.minutes ?? 30);
|
|
116
|
+
const limit = Math.max(1, Math.min(args.limit ?? 40, 200));
|
|
117
|
+
return readJsonl<ScreenMemoryEvent>(path.join(storeDir, EVENTS_JSONL))
|
|
118
|
+
.filter((event) => {
|
|
119
|
+
const capturedAt = Date.parse(event.capturedAt);
|
|
120
|
+
return Number.isFinite(capturedAt) && capturedAt >= cutoff;
|
|
121
|
+
})
|
|
122
|
+
.filter((event) => eventMatches(event, args.query ?? ""))
|
|
123
|
+
.sort((a, b) => b.capturedAt.localeCompare(a.capturedAt))
|
|
124
|
+
.slice(0, limit);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function readSegments(storeDir: string): ScreenMemorySegment[] {
|
|
128
|
+
let entries: string[] = [];
|
|
129
|
+
try {
|
|
130
|
+
entries = fs.readdirSync(storeDir);
|
|
131
|
+
} catch {
|
|
132
|
+
return [];
|
|
133
|
+
}
|
|
134
|
+
return entries
|
|
135
|
+
.filter((entry) => entry.endsWith(".json"))
|
|
136
|
+
.map((entry) => {
|
|
137
|
+
try {
|
|
138
|
+
return JSON.parse(
|
|
139
|
+
fs.readFileSync(path.join(storeDir, entry), "utf-8"),
|
|
140
|
+
) as ScreenMemorySegment;
|
|
141
|
+
} catch {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
.filter((segment): segment is ScreenMemorySegment => Boolean(segment));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function recentSegments(
|
|
149
|
+
storeDir: string,
|
|
150
|
+
minutes: number,
|
|
151
|
+
): ScreenMemorySegment[] {
|
|
152
|
+
const cutoff = cutoffFor(minutes);
|
|
153
|
+
return readSegments(storeDir)
|
|
154
|
+
.filter((segment) => {
|
|
155
|
+
const endedAt = Date.parse(segment.endedAt);
|
|
156
|
+
return (
|
|
157
|
+
Number.isFinite(endedAt) &&
|
|
158
|
+
endedAt >= cutoff &&
|
|
159
|
+
typeof segment.path === "string" &&
|
|
160
|
+
fs.existsSync(segment.path) &&
|
|
161
|
+
segment.corrupt !== true
|
|
162
|
+
);
|
|
163
|
+
})
|
|
164
|
+
.sort((a, b) => b.endedAt.localeCompare(a.endedAt));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function textResult(value: unknown) {
|
|
168
|
+
return {
|
|
169
|
+
content: [
|
|
170
|
+
{
|
|
171
|
+
type: "text" as const,
|
|
172
|
+
text:
|
|
173
|
+
typeof value === "string" ? value : JSON.stringify(value, null, 2),
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export async function runScreenMemoryMCPStdio(
|
|
180
|
+
opts: RunScreenMemoryMCPStdioOptions = {},
|
|
181
|
+
): Promise<void> {
|
|
182
|
+
const env = opts.env ?? process.env;
|
|
183
|
+
const storeDir = opts.storeDir ?? defaultStoreDir(env);
|
|
184
|
+
|
|
185
|
+
const { Server } = await import("@modelcontextprotocol/sdk/server/index.js");
|
|
186
|
+
const { StdioServerTransport } =
|
|
187
|
+
await import("@modelcontextprotocol/sdk/server/stdio.js");
|
|
188
|
+
const { CallToolRequestSchema, ListToolsRequestSchema } =
|
|
189
|
+
await import("@modelcontextprotocol/sdk/types.js");
|
|
190
|
+
|
|
191
|
+
const server = new Server(
|
|
192
|
+
{ name: "clips-screen-memory", version: "0.1.0" },
|
|
193
|
+
{ capabilities: { tools: {} } },
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
197
|
+
tools: [
|
|
198
|
+
{
|
|
199
|
+
name: "screen_memory_status",
|
|
200
|
+
description:
|
|
201
|
+
"Read local Clips Screen Memory status, retention, disk usage, and store path. Local-only.",
|
|
202
|
+
inputSchema: { type: "object", properties: {} },
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "screen_memory_recent_context",
|
|
206
|
+
description:
|
|
207
|
+
"Search recent local Screen Memory app/window context. Returns timestamps, app names, window titles, and bundle ids; does not return images.",
|
|
208
|
+
inputSchema: {
|
|
209
|
+
type: "object",
|
|
210
|
+
properties: {
|
|
211
|
+
query: {
|
|
212
|
+
type: "string",
|
|
213
|
+
description: "Optional case-insensitive text filter.",
|
|
214
|
+
},
|
|
215
|
+
minutes: {
|
|
216
|
+
type: "number",
|
|
217
|
+
description: "Lookback window in minutes. Defaults to 30.",
|
|
218
|
+
},
|
|
219
|
+
limit: {
|
|
220
|
+
type: "number",
|
|
221
|
+
description: "Maximum events to return. Defaults to 40.",
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: "screen_memory_recent_segments",
|
|
228
|
+
description:
|
|
229
|
+
"List recent local Screen Memory video segment file paths and timestamps. Use only when the user asks to inspect or export local context.",
|
|
230
|
+
inputSchema: {
|
|
231
|
+
type: "object",
|
|
232
|
+
properties: {
|
|
233
|
+
minutes: {
|
|
234
|
+
type: "number",
|
|
235
|
+
description: "Lookback window in minutes. Defaults to 30.",
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
}));
|
|
242
|
+
|
|
243
|
+
server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
|
|
244
|
+
const name = request.params?.name;
|
|
245
|
+
const args = (request.params?.arguments ?? {}) as Record<string, unknown>;
|
|
246
|
+
if (name === "screen_memory_status") {
|
|
247
|
+
const config = readFeatureConfig(storeDir);
|
|
248
|
+
const segments = recentSegments(storeDir, 24 * 60);
|
|
249
|
+
return textResult({
|
|
250
|
+
enabled: config.enabled === true,
|
|
251
|
+
paused: config.paused === true,
|
|
252
|
+
retentionHours: config.retentionHours ?? 24,
|
|
253
|
+
maxBytes: config.maxBytes ?? 20 * 1024 * 1024 * 1024,
|
|
254
|
+
segmentCount: segments.length,
|
|
255
|
+
totalBytes: segments.reduce(
|
|
256
|
+
(sum, segment) => sum + (segment.bytes || 0),
|
|
257
|
+
0,
|
|
258
|
+
),
|
|
259
|
+
storeDir,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
if (name === "screen_memory_recent_context") {
|
|
263
|
+
return textResult({
|
|
264
|
+
storeDir,
|
|
265
|
+
events: recentEvents(storeDir, {
|
|
266
|
+
query: typeof args.query === "string" ? args.query : undefined,
|
|
267
|
+
minutes: typeof args.minutes === "number" ? args.minutes : undefined,
|
|
268
|
+
limit: typeof args.limit === "number" ? args.limit : undefined,
|
|
269
|
+
}),
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
if (name === "screen_memory_recent_segments") {
|
|
273
|
+
const minutes = typeof args.minutes === "number" ? args.minutes : 30;
|
|
274
|
+
return textResult({
|
|
275
|
+
storeDir,
|
|
276
|
+
segments: recentSegments(storeDir, minutes),
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
throw new Error(`Unknown Screen Memory tool: ${name}`);
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
log(`Serving local Screen Memory from ${storeDir}`);
|
|
283
|
+
const transport = new StdioServerTransport();
|
|
284
|
+
await server.connect(transport);
|
|
285
|
+
await new Promise<void>((resolve) => {
|
|
286
|
+
transport.onclose = resolve;
|
|
287
|
+
process.once("SIGINT", resolve);
|
|
288
|
+
process.once("SIGTERM", resolve);
|
|
289
|
+
});
|
|
290
|
+
}
|
|
@@ -3,7 +3,8 @@ import type { McpStdioServerConfig } from "./config.js";
|
|
|
3
3
|
export type BuiltinMcpCapabilityId =
|
|
4
4
|
| "browser-chrome-devtools"
|
|
5
5
|
| "browser-playwright"
|
|
6
|
-
| "computer-use"
|
|
6
|
+
| "computer-use"
|
|
7
|
+
| "screen-memory";
|
|
7
8
|
|
|
8
9
|
export interface BuiltinMcpCapability {
|
|
9
10
|
id: BuiltinMcpCapabilityId;
|
|
@@ -53,6 +54,17 @@ export const BUILTIN_MCP_CAPABILITIES: BuiltinMcpCapability[] = [
|
|
|
53
54
|
args: ["-y", "computer-use-mcp@1.8.0"],
|
|
54
55
|
platforms: ["darwin"],
|
|
55
56
|
},
|
|
57
|
+
{
|
|
58
|
+
id: "screen-memory",
|
|
59
|
+
serverId: "screen-memory",
|
|
60
|
+
name: "Screen Memory",
|
|
61
|
+
description: "Query local Clips Screen Memory context from this machine.",
|
|
62
|
+
command: "agent-native",
|
|
63
|
+
args: ["mcp", "screen-memory"],
|
|
64
|
+
platforms: ["darwin"],
|
|
65
|
+
notes:
|
|
66
|
+
"Requires Clips desktop Screen Memory to be enabled. Local-only and disabled by default.",
|
|
67
|
+
},
|
|
56
68
|
];
|
|
57
69
|
|
|
58
70
|
const CAPABILITY_BY_ID = new Map(
|
|
@@ -81,6 +81,15 @@ export { fetchHubServers } from "./hub-client.js";
|
|
|
81
81
|
|
|
82
82
|
export { isMcpToolAllowedForRequest } from "./visibility.js";
|
|
83
83
|
import { isMcpToolAllowedForRequest } from "./visibility.js";
|
|
84
|
+
export {
|
|
85
|
+
configureScreenMemory,
|
|
86
|
+
queryScreenMemoryContext,
|
|
87
|
+
readScreenMemoryStatus,
|
|
88
|
+
type ScreenMemoryConfig,
|
|
89
|
+
type ScreenMemoryContextItem,
|
|
90
|
+
type ScreenMemoryQueryResult,
|
|
91
|
+
type ScreenMemoryStatus,
|
|
92
|
+
} from "./screen-memory-local.js";
|
|
84
93
|
export {
|
|
85
94
|
MCP_ACTION_RESULT_MARKER,
|
|
86
95
|
isMcpActionResult,
|