@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
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
export interface ScreenMemoryConfig {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
paused: boolean;
|
|
4
|
+
retentionHours: number;
|
|
5
|
+
maxBytes: number;
|
|
6
|
+
segmentSeconds: number;
|
|
7
|
+
sampleIntervalSeconds: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ScreenMemoryStatus {
|
|
11
|
+
feature: "screen-memory";
|
|
12
|
+
localOnly: true;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
paused: boolean;
|
|
15
|
+
state: "disabled" | "paused" | "ready" | "empty" | "unavailable";
|
|
16
|
+
config: ScreenMemoryConfig;
|
|
17
|
+
configPath: string | null;
|
|
18
|
+
configSource: "feature-config" | "standalone" | "default";
|
|
19
|
+
dataDirs: string[];
|
|
20
|
+
contextFiles: string[];
|
|
21
|
+
captureCount: number;
|
|
22
|
+
storageBytes: number;
|
|
23
|
+
oldestCaptureAt: string | null;
|
|
24
|
+
newestCaptureAt: string | null;
|
|
25
|
+
note: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface ScreenMemoryContextItem {
|
|
29
|
+
capturedAt: string | null;
|
|
30
|
+
appName: string | null;
|
|
31
|
+
windowTitle: string | null;
|
|
32
|
+
bundleId: string | null;
|
|
33
|
+
url: string | null;
|
|
34
|
+
title: string | null;
|
|
35
|
+
source: string | null;
|
|
36
|
+
text: string;
|
|
37
|
+
sourceFile: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface ScreenMemoryQueryResult {
|
|
41
|
+
feature: "screen-memory";
|
|
42
|
+
localOnly: true;
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
paused: boolean;
|
|
45
|
+
query: string | null;
|
|
46
|
+
sinceMinutes: number | null;
|
|
47
|
+
count: number;
|
|
48
|
+
items: ScreenMemoryContextItem[];
|
|
49
|
+
contextFiles: string[];
|
|
50
|
+
note: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ScreenMemoryLocalOptions {
|
|
54
|
+
env?: NodeJS.ProcessEnv;
|
|
55
|
+
platform?: NodeJS.Platform;
|
|
56
|
+
homeDir?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const DEFAULT_CONFIG: ScreenMemoryConfig = {
|
|
60
|
+
enabled: false,
|
|
61
|
+
paused: false,
|
|
62
|
+
retentionHours: 24,
|
|
63
|
+
maxBytes: 20 * 1024 * 1024 * 1024,
|
|
64
|
+
segmentSeconds: 5 * 60,
|
|
65
|
+
sampleIntervalSeconds: 10,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const JSONL_NAMES = [
|
|
69
|
+
"context.jsonl",
|
|
70
|
+
"events.jsonl",
|
|
71
|
+
"snapshots.jsonl",
|
|
72
|
+
"screen-memory.jsonl",
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
function asRecord(value: unknown): Record<string, unknown> | null {
|
|
76
|
+
return value && typeof value === "object" && !Array.isArray(value)
|
|
77
|
+
? (value as Record<string, unknown>)
|
|
78
|
+
: null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function positiveNumber(value: unknown, fallback: number): number {
|
|
82
|
+
const parsed = typeof value === "number" ? value : Number(value);
|
|
83
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function booleanValue(value: unknown, fallback: boolean): boolean {
|
|
87
|
+
return typeof value === "boolean" ? value : fallback;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function normalizeConfig(value: unknown): ScreenMemoryConfig {
|
|
91
|
+
const raw = asRecord(value) ?? {};
|
|
92
|
+
return {
|
|
93
|
+
enabled: booleanValue(raw.enabled, DEFAULT_CONFIG.enabled),
|
|
94
|
+
paused: booleanValue(raw.paused, DEFAULT_CONFIG.paused),
|
|
95
|
+
retentionHours: positiveNumber(
|
|
96
|
+
raw.retentionHours,
|
|
97
|
+
DEFAULT_CONFIG.retentionHours,
|
|
98
|
+
),
|
|
99
|
+
maxBytes: positiveNumber(raw.maxBytes, DEFAULT_CONFIG.maxBytes),
|
|
100
|
+
segmentSeconds: positiveNumber(
|
|
101
|
+
raw.segmentSeconds,
|
|
102
|
+
DEFAULT_CONFIG.segmentSeconds,
|
|
103
|
+
),
|
|
104
|
+
sampleIntervalSeconds: positiveNumber(
|
|
105
|
+
raw.sampleIntervalSeconds,
|
|
106
|
+
DEFAULT_CONFIG.sampleIntervalSeconds,
|
|
107
|
+
),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async function nodeModules() {
|
|
112
|
+
const [fs, path, os] = await Promise.all([
|
|
113
|
+
import("node:fs/promises"),
|
|
114
|
+
import("node:path"),
|
|
115
|
+
import("node:os"),
|
|
116
|
+
]);
|
|
117
|
+
return { fs, path, os };
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async function exists(pathname: string): Promise<boolean> {
|
|
121
|
+
const { fs } = await nodeModules();
|
|
122
|
+
try {
|
|
123
|
+
await fs.stat(pathname);
|
|
124
|
+
return true;
|
|
125
|
+
} catch {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async function readJson(pathname: string): Promise<unknown | null> {
|
|
131
|
+
const { fs } = await nodeModules();
|
|
132
|
+
try {
|
|
133
|
+
return JSON.parse(await fs.readFile(pathname, "utf8"));
|
|
134
|
+
} catch {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
async function writeJson(pathname: string, value: unknown): Promise<void> {
|
|
140
|
+
const { fs, path } = await nodeModules();
|
|
141
|
+
await fs.mkdir(path.dirname(pathname), { recursive: true });
|
|
142
|
+
await fs.writeFile(pathname, `${JSON.stringify(value, null, 2)}\n`, "utf8");
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
async function resolvePaths(options: ScreenMemoryLocalOptions = {}): Promise<{
|
|
146
|
+
featureConfigPaths: string[];
|
|
147
|
+
standaloneConfigPath: string;
|
|
148
|
+
dataDirs: string[];
|
|
149
|
+
}> {
|
|
150
|
+
const { path, os } = await nodeModules();
|
|
151
|
+
const env = options.env ?? process.env;
|
|
152
|
+
const platform = options.platform ?? process.platform;
|
|
153
|
+
const home = options.homeDir ?? os.homedir();
|
|
154
|
+
|
|
155
|
+
const appDataBase =
|
|
156
|
+
platform === "darwin"
|
|
157
|
+
? path.join(home, "Library", "Application Support")
|
|
158
|
+
: platform === "win32"
|
|
159
|
+
? env.APPDATA || path.join(home, "AppData", "Roaming")
|
|
160
|
+
: env.XDG_DATA_HOME || path.join(home, ".local", "share");
|
|
161
|
+
const appConfigBase =
|
|
162
|
+
platform === "darwin" || platform === "win32"
|
|
163
|
+
? appDataBase
|
|
164
|
+
: env.XDG_CONFIG_HOME || path.join(home, ".config");
|
|
165
|
+
const clipsDataDir = path.join(appDataBase, "com.clips.tray");
|
|
166
|
+
const clipsConfigDir = path.join(appConfigBase, "com.clips.tray");
|
|
167
|
+
const fallbackDir = path.join(home, ".agent-native", "screen-memory");
|
|
168
|
+
const envDir =
|
|
169
|
+
env.AGENT_NATIVE_SCREEN_MEMORY_DIR ?? env.CLIPS_SCREEN_MEMORY_DIR;
|
|
170
|
+
const envConfig = env.AGENT_NATIVE_SCREEN_MEMORY_CONFIG;
|
|
171
|
+
|
|
172
|
+
const dataDirs = [
|
|
173
|
+
...(envDir ? [envDir] : []),
|
|
174
|
+
path.join(clipsDataDir, "screen-memory"),
|
|
175
|
+
...(clipsConfigDir === clipsDataDir
|
|
176
|
+
? []
|
|
177
|
+
: [path.join(clipsConfigDir, "screen-memory")]),
|
|
178
|
+
fallbackDir,
|
|
179
|
+
];
|
|
180
|
+
|
|
181
|
+
return {
|
|
182
|
+
featureConfigPaths: [
|
|
183
|
+
...(envConfig ? [envConfig] : []),
|
|
184
|
+
path.join(clipsDataDir, "feature-config.json"),
|
|
185
|
+
...(clipsConfigDir === clipsDataDir
|
|
186
|
+
? []
|
|
187
|
+
: [path.join(clipsConfigDir, "feature-config.json")]),
|
|
188
|
+
],
|
|
189
|
+
standaloneConfigPath: path.join(fallbackDir, "config.json"),
|
|
190
|
+
dataDirs,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
async function readConfigInfo(options: ScreenMemoryLocalOptions = {}): Promise<{
|
|
195
|
+
config: ScreenMemoryConfig;
|
|
196
|
+
path: string | null;
|
|
197
|
+
source: ScreenMemoryStatus["configSource"];
|
|
198
|
+
raw: Record<string, unknown> | null;
|
|
199
|
+
nested: boolean;
|
|
200
|
+
}> {
|
|
201
|
+
const paths = await resolvePaths(options);
|
|
202
|
+
for (const pathname of paths.featureConfigPaths) {
|
|
203
|
+
const raw = asRecord(await readJson(pathname));
|
|
204
|
+
if (!raw) continue;
|
|
205
|
+
const nested = asRecord(raw.screenMemory);
|
|
206
|
+
if (nested) {
|
|
207
|
+
return {
|
|
208
|
+
config: normalizeConfig(nested),
|
|
209
|
+
path: pathname,
|
|
210
|
+
source: "feature-config",
|
|
211
|
+
raw,
|
|
212
|
+
nested: true,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
if (
|
|
216
|
+
"enabled" in raw ||
|
|
217
|
+
"paused" in raw ||
|
|
218
|
+
"retentionHours" in raw ||
|
|
219
|
+
"maxBytes" in raw
|
|
220
|
+
) {
|
|
221
|
+
return {
|
|
222
|
+
config: normalizeConfig(raw),
|
|
223
|
+
path: pathname,
|
|
224
|
+
source: "standalone",
|
|
225
|
+
raw,
|
|
226
|
+
nested: false,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const standalone = asRecord(await readJson(paths.standaloneConfigPath));
|
|
232
|
+
if (standalone) {
|
|
233
|
+
return {
|
|
234
|
+
config: normalizeConfig(standalone),
|
|
235
|
+
path: paths.standaloneConfigPath,
|
|
236
|
+
source: "standalone",
|
|
237
|
+
raw: standalone,
|
|
238
|
+
nested: false,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return {
|
|
243
|
+
config: { ...DEFAULT_CONFIG },
|
|
244
|
+
path: null,
|
|
245
|
+
source: "default",
|
|
246
|
+
raw: null,
|
|
247
|
+
nested: false,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export async function configureScreenMemory(
|
|
252
|
+
patch: Partial<ScreenMemoryConfig>,
|
|
253
|
+
options: ScreenMemoryLocalOptions = {},
|
|
254
|
+
): Promise<ScreenMemoryStatus> {
|
|
255
|
+
const info = await readConfigInfo(options);
|
|
256
|
+
const paths = await resolvePaths(options);
|
|
257
|
+
const next = normalizeConfig({ ...info.config, ...patch });
|
|
258
|
+
const targetPath = info.path ?? paths.standaloneConfigPath;
|
|
259
|
+
|
|
260
|
+
if (info.raw && info.nested) {
|
|
261
|
+
await writeJson(targetPath, { ...info.raw, screenMemory: next });
|
|
262
|
+
} else {
|
|
263
|
+
await writeJson(targetPath, next);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
return readScreenMemoryStatus(options);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
async function contextFilesFor(
|
|
270
|
+
dataDirs: string[],
|
|
271
|
+
): Promise<{ files: string[]; storageBytes: number }> {
|
|
272
|
+
const { fs, path } = await nodeModules();
|
|
273
|
+
const files: string[] = [];
|
|
274
|
+
let storageBytes = 0;
|
|
275
|
+
|
|
276
|
+
for (const dir of dataDirs) {
|
|
277
|
+
if (!(await exists(dir))) continue;
|
|
278
|
+
for (const name of JSONL_NAMES) {
|
|
279
|
+
const candidate = path.join(dir, name);
|
|
280
|
+
try {
|
|
281
|
+
const stat = await fs.stat(candidate);
|
|
282
|
+
if (stat.isFile()) {
|
|
283
|
+
files.push(candidate);
|
|
284
|
+
storageBytes += stat.size;
|
|
285
|
+
}
|
|
286
|
+
} catch {
|
|
287
|
+
// ignore missing candidate files
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
return { files, storageBytes };
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function firstString(
|
|
296
|
+
raw: Record<string, unknown>,
|
|
297
|
+
keys: string[],
|
|
298
|
+
): string | null {
|
|
299
|
+
for (const key of keys) {
|
|
300
|
+
const value = raw[key];
|
|
301
|
+
if (typeof value === "string" && value.trim()) return value;
|
|
302
|
+
}
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
function normalizeContextItem(
|
|
307
|
+
value: unknown,
|
|
308
|
+
sourceFile: string,
|
|
309
|
+
): ScreenMemoryContextItem | null {
|
|
310
|
+
const raw = asRecord(value);
|
|
311
|
+
if (!raw) return null;
|
|
312
|
+
const text =
|
|
313
|
+
firstString(raw, [
|
|
314
|
+
"text",
|
|
315
|
+
"ocrText",
|
|
316
|
+
"visibleText",
|
|
317
|
+
"summary",
|
|
318
|
+
"caption",
|
|
319
|
+
]) ?? "";
|
|
320
|
+
const capturedAt = firstString(raw, [
|
|
321
|
+
"capturedAt",
|
|
322
|
+
"timestamp",
|
|
323
|
+
"time",
|
|
324
|
+
"createdAt",
|
|
325
|
+
]);
|
|
326
|
+
return {
|
|
327
|
+
capturedAt,
|
|
328
|
+
appName: firstString(raw, ["appName", "application", "bundleName"]),
|
|
329
|
+
windowTitle: firstString(raw, ["windowTitle", "window", "activeWindow"]),
|
|
330
|
+
bundleId: firstString(raw, ["bundleId", "appBundleId"]),
|
|
331
|
+
url: firstString(raw, ["url", "pageUrl"]),
|
|
332
|
+
title: firstString(raw, ["title", "pageTitle"]),
|
|
333
|
+
source: firstString(raw, ["source", "kind"]),
|
|
334
|
+
text,
|
|
335
|
+
sourceFile,
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
function itemTime(item: ScreenMemoryContextItem): number {
|
|
340
|
+
if (!item.capturedAt) return 0;
|
|
341
|
+
const parsed = Date.parse(item.capturedAt);
|
|
342
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
async function readItems(files: string[]): Promise<ScreenMemoryContextItem[]> {
|
|
346
|
+
const { fs } = await nodeModules();
|
|
347
|
+
const items: ScreenMemoryContextItem[] = [];
|
|
348
|
+
|
|
349
|
+
for (const file of files) {
|
|
350
|
+
let text = "";
|
|
351
|
+
try {
|
|
352
|
+
text = await fs.readFile(file, "utf8");
|
|
353
|
+
} catch {
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
const lines = text.split(/\r?\n/).filter(Boolean).slice(-10_000);
|
|
357
|
+
for (const line of lines) {
|
|
358
|
+
try {
|
|
359
|
+
const item = normalizeContextItem(JSON.parse(line), file);
|
|
360
|
+
if (item) items.push(item);
|
|
361
|
+
} catch {
|
|
362
|
+
// Keep one malformed row from hiding the rest of the local context.
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
return items.sort((a, b) => itemTime(b) - itemTime(a));
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export async function queryScreenMemoryContext(
|
|
371
|
+
args: {
|
|
372
|
+
query?: string | null;
|
|
373
|
+
limit?: number | null;
|
|
374
|
+
sinceMinutes?: number | null;
|
|
375
|
+
} = {},
|
|
376
|
+
options: ScreenMemoryLocalOptions = {},
|
|
377
|
+
): Promise<ScreenMemoryQueryResult> {
|
|
378
|
+
const info = await readConfigInfo(options);
|
|
379
|
+
const paths = await resolvePaths(options);
|
|
380
|
+
const { files } = await contextFilesFor(paths.dataDirs);
|
|
381
|
+
const query = args.query?.trim() || null;
|
|
382
|
+
const limit = Math.min(Math.max(Math.trunc(args.limit ?? 10), 1), 50);
|
|
383
|
+
const sinceMinutes =
|
|
384
|
+
typeof args.sinceMinutes === "number" && Number.isFinite(args.sinceMinutes)
|
|
385
|
+
? Math.max(args.sinceMinutes, 0)
|
|
386
|
+
: null;
|
|
387
|
+
const cutoff =
|
|
388
|
+
sinceMinutes === null ? null : Date.now() - sinceMinutes * 60 * 1000;
|
|
389
|
+
|
|
390
|
+
const needle = query?.toLowerCase() ?? null;
|
|
391
|
+
const items = (await readItems(files)).filter((item) => {
|
|
392
|
+
if (cutoff !== null) {
|
|
393
|
+
const time = itemTime(item);
|
|
394
|
+
if (!time || time < cutoff) return false;
|
|
395
|
+
}
|
|
396
|
+
if (!needle) return true;
|
|
397
|
+
return JSON.stringify(item).toLowerCase().includes(needle);
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
return {
|
|
401
|
+
feature: "screen-memory",
|
|
402
|
+
localOnly: true,
|
|
403
|
+
enabled: info.config.enabled,
|
|
404
|
+
paused: info.config.paused,
|
|
405
|
+
query,
|
|
406
|
+
sinceMinutes,
|
|
407
|
+
count: items.length,
|
|
408
|
+
items: items.slice(0, limit),
|
|
409
|
+
contextFiles: files,
|
|
410
|
+
note:
|
|
411
|
+
files.length === 0
|
|
412
|
+
? "No local Screen Memory context files were found. Enable Screen Memory in Clips desktop and keep the local MCP capability connected."
|
|
413
|
+
: "Local Screen Memory context only. Do not treat this as shared, hosted, or exhaustive.",
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export async function readScreenMemoryStatus(
|
|
418
|
+
options: ScreenMemoryLocalOptions = {},
|
|
419
|
+
): Promise<ScreenMemoryStatus> {
|
|
420
|
+
const info = await readConfigInfo(options);
|
|
421
|
+
const paths = await resolvePaths(options);
|
|
422
|
+
const { files, storageBytes } = await contextFilesFor(paths.dataDirs);
|
|
423
|
+
const items = await readItems(files);
|
|
424
|
+
const times = items.map(itemTime).filter(Boolean);
|
|
425
|
+
const oldest = times.length
|
|
426
|
+
? new Date(Math.min(...times)).toISOString()
|
|
427
|
+
: null;
|
|
428
|
+
const newest = times.length
|
|
429
|
+
? new Date(Math.max(...times)).toISOString()
|
|
430
|
+
: null;
|
|
431
|
+
const state = !info.config.enabled
|
|
432
|
+
? "disabled"
|
|
433
|
+
: info.config.paused
|
|
434
|
+
? "paused"
|
|
435
|
+
: files.length === 0
|
|
436
|
+
? "empty"
|
|
437
|
+
: "ready";
|
|
438
|
+
|
|
439
|
+
return {
|
|
440
|
+
feature: "screen-memory",
|
|
441
|
+
localOnly: true,
|
|
442
|
+
enabled: info.config.enabled,
|
|
443
|
+
paused: info.config.paused,
|
|
444
|
+
state,
|
|
445
|
+
config: info.config,
|
|
446
|
+
configPath: info.path,
|
|
447
|
+
configSource: info.source,
|
|
448
|
+
dataDirs: paths.dataDirs,
|
|
449
|
+
contextFiles: files,
|
|
450
|
+
captureCount: items.length,
|
|
451
|
+
storageBytes,
|
|
452
|
+
oldestCaptureAt: oldest,
|
|
453
|
+
newestCaptureAt: newest,
|
|
454
|
+
note:
|
|
455
|
+
state === "disabled"
|
|
456
|
+
? "Screen Memory is disabled by default. Turn it on from Clips desktop Settings before agents can use recent screen context."
|
|
457
|
+
: state === "empty"
|
|
458
|
+
? "Screen Memory is enabled, but no local context files were found yet."
|
|
459
|
+
: "Screen Memory status is local to this machine.",
|
|
460
|
+
};
|
|
461
|
+
}
|
|
@@ -40,6 +40,13 @@ export type OnboardingMethod =
|
|
|
40
40
|
payload: {
|
|
41
41
|
fields: OnboardingFormField[];
|
|
42
42
|
writeScope?: "workspace" | "app";
|
|
43
|
+
/**
|
|
44
|
+
* Defaults to the compatibility env-vars route, which accepts
|
|
45
|
+
* framework/template-declared keys and stores them as scoped secrets.
|
|
46
|
+
* Use "scoped-secrets" for template-specific ad-hoc keys.
|
|
47
|
+
*/
|
|
48
|
+
saveTo?: "env-vars" | "scoped-secrets";
|
|
49
|
+
secretDescription?: string;
|
|
43
50
|
};
|
|
44
51
|
})
|
|
45
52
|
| (OnboardingMethodBase & {
|
|
@@ -6491,6 +6491,31 @@ Non-code requests are still fine on this surface: read data, navigate the UI, su
|
|
|
6491
6491
|
}> = [];
|
|
6492
6492
|
const seenNames = new Set<string>();
|
|
6493
6493
|
|
|
6494
|
+
// Bundled template skills are available in production via the
|
|
6495
|
+
// virtual agents bundle, not the runtime filesystem. Surface them in
|
|
6496
|
+
// the slash/skill picker so production users can explicitly invoke
|
|
6497
|
+
// the same skills that are present in the prompt and docs-search.
|
|
6498
|
+
try {
|
|
6499
|
+
const { loadAgentsBundle, getRuntimeSkills } =
|
|
6500
|
+
await import("./agents-bundle.js");
|
|
6501
|
+
const bundle = await loadAgentsBundle();
|
|
6502
|
+
for (const skill of getRuntimeSkills(bundle)) {
|
|
6503
|
+
const fm = parseSkillFrontmatter(skill.content);
|
|
6504
|
+
if (fm.userInvocable === false) continue;
|
|
6505
|
+
const skillName = skill.meta.name || fm.name;
|
|
6506
|
+
if (!skillName || seenNames.has(skillName)) continue;
|
|
6507
|
+
seenNames.add(skillName);
|
|
6508
|
+
skills.push({
|
|
6509
|
+
name: skillName,
|
|
6510
|
+
description: skill.meta.description || fm.description,
|
|
6511
|
+
path: `${skill.dir}/SKILL.md`,
|
|
6512
|
+
source: "codebase",
|
|
6513
|
+
});
|
|
6514
|
+
}
|
|
6515
|
+
} catch {
|
|
6516
|
+
// Bundle unavailable — fall back to dev filesystem/resources below.
|
|
6517
|
+
}
|
|
6518
|
+
|
|
6494
6519
|
// In dev mode, scan .agents/skills/ plus legacy .agent/skills/.
|
|
6495
6520
|
if (currentDevMode) {
|
|
6496
6521
|
try {
|
|
@@ -397,7 +397,18 @@ export function getDevelopmentSkills(bundle: AgentsBundle): Skill[] {
|
|
|
397
397
|
);
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
function
|
|
400
|
+
function skillDocsSlug(name: string): string {
|
|
401
|
+
return `skill-${name
|
|
402
|
+
.trim()
|
|
403
|
+
.toLowerCase()
|
|
404
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
405
|
+
.replace(/^-+|-+$/g, "")}`;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function generateSkillsPromptBlockForEntries(
|
|
409
|
+
entries: Skill[],
|
|
410
|
+
mode: "runtime" | "development",
|
|
411
|
+
): string {
|
|
401
412
|
if (entries.length === 0) return "";
|
|
402
413
|
|
|
403
414
|
const lines = entries.map((s) => {
|
|
@@ -405,15 +416,26 @@ function generateSkillsPromptBlockForEntries(entries: Skill[]): string {
|
|
|
405
416
|
s.extraFiles.length > 0
|
|
406
417
|
? ` (also contains: ${s.extraFiles.join(", ")})`
|
|
407
418
|
: "";
|
|
408
|
-
|
|
419
|
+
const runtimeHint =
|
|
420
|
+
mode === "runtime"
|
|
421
|
+
? ` Read with \`docs-search --slug "${skillDocsSlug(s.meta.name)}"\` before starting a task it applies to.`
|
|
422
|
+
: "";
|
|
423
|
+
return `- \`${s.meta.name}\` at \`${s.dir}/\` — ${s.meta.description || "(no description)"}${extras}${runtimeHint}`;
|
|
409
424
|
});
|
|
410
425
|
|
|
426
|
+
const readHint =
|
|
427
|
+
mode === "runtime"
|
|
428
|
+
? `To read a skill in the in-app runtime agent:
|
|
429
|
+
\`docs-search --slug "skill-<skill-name>"\`
|
|
430
|
+
\`docs-search --query "<topic>"\` to discover matching docs/skills`
|
|
431
|
+
: `To read a skill in dev mode (when you have bash access):
|
|
432
|
+
\`bash(command="cat <skill-dir>/SKILL.md")\`
|
|
433
|
+
\`bash(command="ls <skill-dir>/")\` to see all files in the folder`;
|
|
434
|
+
|
|
411
435
|
return `<skills>
|
|
412
436
|
The following skills live in the repo, usually at \`.agents/skills/<name>/\` (legacy \`.agent/skills/<name>/\` is also supported). Each skill is a folder containing a \`SKILL.md\` entry file and sometimes supporting files. Read a skill BEFORE starting a task it applies to.
|
|
413
437
|
|
|
414
|
-
|
|
415
|
-
\`bash(command="cat <skill-dir>/SKILL.md")\`
|
|
416
|
-
\`bash(command="ls <skill-dir>/")\` to see all files in the folder
|
|
438
|
+
${readHint}
|
|
417
439
|
|
|
418
440
|
Available skills:
|
|
419
441
|
${lines.join("\n")}
|
|
@@ -421,13 +443,19 @@ ${lines.join("\n")}
|
|
|
421
443
|
}
|
|
422
444
|
|
|
423
445
|
export function generateSkillsPromptBlock(bundle: AgentsBundle): string {
|
|
424
|
-
return generateSkillsPromptBlockForEntries(
|
|
446
|
+
return generateSkillsPromptBlockForEntries(
|
|
447
|
+
getRuntimeSkills(bundle),
|
|
448
|
+
"runtime",
|
|
449
|
+
);
|
|
425
450
|
}
|
|
426
451
|
|
|
427
452
|
export function generateDevelopmentSkillsPromptBlock(
|
|
428
453
|
bundle: AgentsBundle,
|
|
429
454
|
): string {
|
|
430
|
-
return generateSkillsPromptBlockForEntries(
|
|
455
|
+
return generateSkillsPromptBlockForEntries(
|
|
456
|
+
getDevelopmentSkills(bundle),
|
|
457
|
+
"development",
|
|
458
|
+
);
|
|
431
459
|
}
|
|
432
460
|
|
|
433
461
|
/** For tests — reset the module cache. */
|
|
@@ -155,6 +155,7 @@
|
|
|
155
155
|
.agent-sidebar-main-surface {
|
|
156
156
|
position: relative;
|
|
157
157
|
z-index: 1;
|
|
158
|
+
container: agent-native-main / inline-size;
|
|
158
159
|
background: var(--agent-native-raised-surface);
|
|
159
160
|
transition:
|
|
160
161
|
border-radius 260ms cubic-bezier(0.32, 0.72, 0, 1),
|
|
@@ -162,6 +163,10 @@
|
|
|
162
163
|
box-shadow 260ms cubic-bezier(0.32, 0.72, 0, 1);
|
|
163
164
|
}
|
|
164
165
|
|
|
166
|
+
.agent-native-app-main {
|
|
167
|
+
container: agent-native-main / inline-size;
|
|
168
|
+
}
|
|
169
|
+
|
|
165
170
|
.agent-layout-main-surface::before,
|
|
166
171
|
.agent-sidebar-main-surface::before {
|
|
167
172
|
content: "";
|
|
@@ -8,63 +8,63 @@
|
|
|
8
8
|
|
|
9
9
|
:root {
|
|
10
10
|
--background: 0 0% 100%;
|
|
11
|
-
--foreground:
|
|
11
|
+
--foreground: 0 0% 10%;
|
|
12
12
|
--card: 0 0% 100%;
|
|
13
|
-
--card-foreground:
|
|
13
|
+
--card-foreground: 0 0% 10%;
|
|
14
14
|
--popover: 0 0% 100%;
|
|
15
|
-
--popover-foreground:
|
|
16
|
-
--primary:
|
|
15
|
+
--popover-foreground: 0 0% 10%;
|
|
16
|
+
--primary: 0 0% 15%;
|
|
17
17
|
--primary-foreground: 0 0% 100%;
|
|
18
|
-
--secondary:
|
|
19
|
-
--secondary-foreground:
|
|
20
|
-
--muted:
|
|
21
|
-
--muted-foreground:
|
|
22
|
-
--accent:
|
|
23
|
-
--accent-foreground:
|
|
18
|
+
--secondary: 0 0% 95%;
|
|
19
|
+
--secondary-foreground: 0 0% 15%;
|
|
20
|
+
--muted: 0 0% 95%;
|
|
21
|
+
--muted-foreground: 0 0% 45%;
|
|
22
|
+
--accent: 0 0% 95%;
|
|
23
|
+
--accent-foreground: 0 0% 15%;
|
|
24
24
|
--destructive: 0 84% 60%;
|
|
25
25
|
--destructive-foreground: 0 0% 98%;
|
|
26
|
-
--border:
|
|
27
|
-
--input:
|
|
28
|
-
--ring:
|
|
26
|
+
--border: 0 0% 90%;
|
|
27
|
+
--input: 0 0% 90%;
|
|
28
|
+
--ring: 0 0% 40%;
|
|
29
29
|
--radius: 0.5rem;
|
|
30
|
-
--sidebar-background:
|
|
31
|
-
--sidebar-foreground:
|
|
32
|
-
--sidebar-primary:
|
|
30
|
+
--sidebar-background: 0 0% 97%;
|
|
31
|
+
--sidebar-foreground: 0 0% 45%;
|
|
32
|
+
--sidebar-primary: 0 0% 15%;
|
|
33
33
|
--sidebar-primary-foreground: 0 0% 100%;
|
|
34
|
-
--sidebar-accent:
|
|
35
|
-
--sidebar-accent-foreground:
|
|
36
|
-
--sidebar-border:
|
|
37
|
-
--sidebar-ring:
|
|
34
|
+
--sidebar-accent: 0 0% 95%;
|
|
35
|
+
--sidebar-accent-foreground: 0 0% 15%;
|
|
36
|
+
--sidebar-border: 0 0% 90%;
|
|
37
|
+
--sidebar-ring: 0 0% 40%;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.dark {
|
|
41
|
-
--background:
|
|
41
|
+
--background: 0 0% 13%;
|
|
42
42
|
--foreground: 0 0% 90%;
|
|
43
|
-
--card:
|
|
43
|
+
--card: 0 0% 15%;
|
|
44
44
|
--card-foreground: 0 0% 90%;
|
|
45
|
-
--popover:
|
|
45
|
+
--popover: 0 0% 15%;
|
|
46
46
|
--popover-foreground: 0 0% 90%;
|
|
47
47
|
--primary: 0 0% 75%;
|
|
48
|
-
--primary-foreground:
|
|
49
|
-
--secondary:
|
|
48
|
+
--primary-foreground: 0 0% 10%;
|
|
49
|
+
--secondary: 0 0% 18%;
|
|
50
50
|
--secondary-foreground: 0 0% 90%;
|
|
51
|
-
--muted:
|
|
52
|
-
--muted-foreground:
|
|
53
|
-
--accent:
|
|
51
|
+
--muted: 0 0% 16%;
|
|
52
|
+
--muted-foreground: 0 0% 60%;
|
|
53
|
+
--accent: 0 0% 18%;
|
|
54
54
|
--accent-foreground: 0 0% 90%;
|
|
55
55
|
--destructive: 0 63% 51%;
|
|
56
56
|
--destructive-foreground: 0 0% 98%;
|
|
57
|
-
--border:
|
|
58
|
-
--input:
|
|
57
|
+
--border: 0 0% 24%;
|
|
58
|
+
--input: 0 0% 24%;
|
|
59
59
|
--ring: 0 0% 60%;
|
|
60
60
|
--radius: 0.5rem;
|
|
61
|
-
--sidebar-background:
|
|
62
|
-
--sidebar-foreground:
|
|
61
|
+
--sidebar-background: 0 0% 10%;
|
|
62
|
+
--sidebar-foreground: 0 0% 60%;
|
|
63
63
|
--sidebar-primary: 0 0% 75%;
|
|
64
|
-
--sidebar-primary-foreground:
|
|
65
|
-
--sidebar-accent:
|
|
64
|
+
--sidebar-primary-foreground: 0 0% 10%;
|
|
65
|
+
--sidebar-accent: 0 0% 16%;
|
|
66
66
|
--sidebar-accent-foreground: 0 0% 90%;
|
|
67
|
-
--sidebar-border:
|
|
67
|
+
--sidebar-border: 0 0% 20%;
|
|
68
68
|
--sidebar-ring: 0 0% 60%;
|
|
69
69
|
}
|
|
70
70
|
|