@agent-native/core 0.82.0 → 0.84.0
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/README.md +2 -2
- package/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +34 -0
- package/corpus/core/README.md +2 -2
- package/corpus/core/docs/content/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/ar-SA/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/de-DE/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/faq.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +1 -1
- package/corpus/core/docs/content/template-chat.mdx +1 -1
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/engine/builtin.ts +1 -1
- package/corpus/core/src/agent/engine/output-tokens.ts +1 -1
- package/corpus/core/src/agent/harness/acp-adapter.ts +28 -4
- package/corpus/core/src/agent/harness/ai-sdk-adapter.ts +3 -0
- package/corpus/core/src/agent/harness/translate.ts +3 -0
- package/corpus/core/src/agent/harness/types.ts +1 -0
- package/corpus/core/src/agent/model-config.ts +34 -13
- package/corpus/core/src/agent/production-agent.ts +87 -10
- package/corpus/core/src/agent/thread-data-builder.ts +29 -4
- package/corpus/core/src/agent/tool-call-journal.ts +109 -48
- package/corpus/core/src/agent/types.ts +6 -1
- package/corpus/core/src/cli/design-connect.ts +106 -0
- package/corpus/core/src/cli/gateway-helpers.ts +17 -0
- package/corpus/core/src/cli/recap.ts +0 -2
- package/corpus/core/src/cli/skills.ts +54 -16
- package/corpus/core/src/cli/workspace-dev.ts +29 -5
- package/corpus/core/src/client/AssistantChat.tsx +89 -42
- package/corpus/core/src/client/CommandMenu.tsx +34 -12
- package/corpus/core/src/client/DefaultSpinner.tsx +8 -1
- package/corpus/core/src/client/chat/message-components.tsx +49 -1
- package/corpus/core/src/client/chat/repo-helpers.ts +71 -0
- package/corpus/core/src/client/chat/run-recovery.tsx +15 -5
- package/corpus/core/src/client/components/ApiKeySettings.tsx +8 -8
- package/corpus/core/src/client/components/CodeRequiredDialog.tsx +26 -15
- package/corpus/core/src/client/components/MissingKeyCard.tsx +13 -6
- package/corpus/core/src/client/composer/TiptapComposer.tsx +4 -3
- package/corpus/core/src/client/extensions/ExtensionsSidebarSection.tsx +0 -1
- package/corpus/core/src/client/guided-questions.tsx +21 -27
- package/corpus/core/src/client/integrations/IntegrationCard.tsx +1 -1
- package/corpus/core/src/client/integrations/IntegrationsPanel.tsx +1 -1
- package/corpus/core/src/client/onboarding/OnboardingBanner.tsx +2 -2
- package/corpus/core/src/client/onboarding/OnboardingPanel.tsx +23 -19
- package/corpus/core/src/client/resources/ResourceEditor.tsx +18 -10
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +5 -1
- package/corpus/core/src/client/settings/SettingsPanel.tsx +8 -3
- package/corpus/core/src/client/settings/useBuilderStatus.ts +8 -41
- package/corpus/core/src/client/useProductionAgent.ts +6 -2
- package/corpus/core/src/deploy/build.ts +1 -1
- package/corpus/core/src/observability/traces.ts +3 -3
- package/corpus/core/src/onboarding/default-steps.ts +1 -1
- package/corpus/core/src/scripts/agent-engines/manage-agent-engine.ts +1 -1
- package/corpus/core/src/scripts/agent-engines/set-agent-engine.ts +1 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +177 -81
- package/corpus/core/src/server/core-routes-plugin.ts +7 -1
- package/corpus/core/src/server/open-route.ts +59 -40
- package/corpus/core/src/shared/reasoning-effort.ts +2 -0
- package/corpus/core/src/sharing/access.ts +22 -2
- package/corpus/core/src/sharing/registry.ts +18 -0
- package/corpus/core/src/styles/agent-native.css +104 -20
- package/corpus/core/src/styles/rich-markdown-editor.css +11 -10
- package/corpus/templates/analytics/actions/hubspot-deals.ts +64 -4
- package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +10 -10
- package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +10 -10
- package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +6 -5
- package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +9 -9
- package/corpus/templates/analytics/app/global.css +4 -0
- package/corpus/templates/analytics/app/lib/chart-theme.ts +13 -0
- package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +22 -24
- package/corpus/templates/analytics/changelog/2026-06-30-dashboard-charts-now-use-theme-aware-tooltip-and-grid-colors.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-30-fixed-ask-composer-spacing-so-the-chat-field-has-a-comfortab.md +6 -0
- package/corpus/templates/calendar/AGENTS.md +4 -0
- package/corpus/templates/calendar/actions/connect-google-calendar.ts +80 -0
- package/corpus/templates/calendar/changelog/2026-06-30-calendar-now-gives-the-agent-a-safe-google-connection-link-i.md +6 -0
- package/corpus/templates/calendar/server/plugins/agent-chat.ts +4 -0
- package/corpus/templates/content/.env.local.example +6 -0
- package/corpus/templates/content/AGENTS.md +10 -1
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +14 -1
- package/corpus/templates/content/actions/_builder-cms-source-adapter.ts +43 -0
- package/corpus/templates/content/actions/_builder-cms-write-adapter.ts +79 -7
- package/corpus/templates/content/actions/_database-source-utils.ts +987 -22
- package/corpus/templates/content/actions/_database-utils.ts +41 -0
- package/corpus/templates/content/actions/_local-file-documents.ts +74 -1
- package/corpus/templates/content/actions/attach-content-database-source.ts +33 -8
- package/corpus/templates/content/actions/change-content-database-source-role.ts +14 -0
- package/corpus/templates/content/actions/disconnect-content-database-source.ts +3 -0
- package/corpus/templates/content/actions/execute-builder-source-execution.ts +71 -3
- package/corpus/templates/content/actions/list-content-databases.ts +41 -33
- package/corpus/templates/content/actions/process-builder-body-hydration.ts +47 -0
- package/corpus/templates/content/actions/update-document.ts +93 -0
- package/corpus/templates/content/app/blocks/SourceComponentBlock.tsx +277 -0
- package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +2 -0
- package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +5 -5
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +45 -4
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +5 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +92 -0
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +5 -3
- package/corpus/templates/content/app/components/editor/extensions/registryBlocks.ts +41 -0
- package/corpus/templates/content/app/components/editor/registrySlashItems.ts +4 -0
- package/corpus/templates/content/app/global.css +16 -8
- package/corpus/templates/content/app/hooks/use-content-database.ts +24 -0
- package/corpus/templates/content/app/i18n/zh-TW.ts +24 -0
- package/corpus/templates/content/app/i18n-data.ts +212 -0
- package/corpus/templates/content/app/lib/content-command-search.ts +64 -0
- package/corpus/templates/content/app/root.tsx +236 -8
- package/corpus/templates/content/changelog/2026-06-29-builder-cms-sources-now-sync-article-bodies-through-content.md +6 -0
- package/corpus/templates/content/changelog/2026-06-30-builder-article-media-now-render-as-images-and-embeds-when-r.md +6 -0
- package/corpus/templates/content/changelog/2026-06-30-builder-source-components-now-render-as-preserved-preview-bl.md +6 -0
- package/corpus/templates/content/changelog/2026-06-30-cmd-k-search-now-opens-from-the-editor-and-finds-real-content.md +6 -0
- package/corpus/templates/content/changelog/2026-06-30-editor-floating-toolbars-now-use-theme-aware-colors-in-light.md +6 -0
- package/corpus/templates/content/package.json +3 -1
- package/corpus/templates/content/scripts/check-native-deps.mjs +57 -0
- package/corpus/templates/content/scripts/dev-database.mjs +83 -0
- package/corpus/templates/content/scripts/seed-demo-user.mjs +107 -0
- package/corpus/templates/content/server/db/schema.ts +27 -0
- package/corpus/templates/content/server/plugins/db.ts +33 -0
- package/corpus/templates/content/shared/api.ts +45 -0
- package/corpus/templates/content/shared/builder-mdx.ts +905 -5
- package/corpus/templates/content/shared/nfm-registry.ts +2 -0
- package/corpus/templates/content/shared/source-component-block.ts +141 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +6 -1
- package/corpus/templates/design/actions/add-localhost-screens.ts +63 -8
- package/corpus/templates/design/actions/apply-motion-edit.ts +12 -46
- package/corpus/templates/design/actions/list-design-native-assets.ts +2 -1
- package/corpus/templates/design/actions/migrate-board-objects-to-file.ts +49 -1
- package/corpus/templates/design/actions/navigate.ts +3 -12
- package/corpus/templates/design/actions/open-visual-edit.ts +341 -0
- package/corpus/templates/design/actions/view-screen.ts +1 -1
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +1 -1
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +350 -15
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +71 -91
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +25 -27
- package/corpus/templates/design/app/components/design/DeviceFrame.tsx +1 -1
- package/corpus/templates/design/app/components/design/DrawOverlay.tsx +2 -2
- package/corpus/templates/design/app/components/design/EditPanel.tsx +1111 -570
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +162 -32
- package/corpus/templates/design/app/components/design/MotionDock.tsx +268 -240
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +1193 -207
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +1 -1
- package/corpus/templates/design/app/components/design/ReviewPanel.tsx +81 -102
- package/corpus/templates/design/app/components/design/StatesPanel.tsx +6 -6
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +11 -11
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +9 -7
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +1225 -154
- package/corpus/templates/design/app/components/design/bridge/hit-test.bridge.ts +130 -37
- package/corpus/templates/design/app/components/design/canvas-primitive-style.ts +24 -11
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +184 -162
- package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +137 -79
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +13 -13
- package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +8 -8
- package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +2 -2
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +4 -4
- package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +3 -3
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +13 -7
- package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +14 -11
- package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +4 -4
- package/corpus/templates/design/app/components/design/inspector/index.ts +2 -0
- package/corpus/templates/design/app/components/design/types.ts +19 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +61 -78
- package/corpus/templates/design/app/components/layout/Header.tsx +0 -1
- package/corpus/templates/design/app/components/layout/Layout.tsx +3 -2
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +0 -2
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +5 -4
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +2 -2
- package/corpus/templates/design/app/global.css +56 -0
- package/corpus/templates/design/app/hooks/use-agent-generating.ts +4 -5
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +6 -7
- package/corpus/templates/design/app/hooks/use-question-flow.ts +3 -2
- package/corpus/templates/design/app/hooks/useAgentEditRequest.ts +6 -4
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +6 -3
- package/corpus/templates/design/app/i18n/zh-TW.ts +5 -14
- package/corpus/templates/design/app/i18n-data.ts +63 -188
- package/corpus/templates/design/app/lib/agent-chat.ts +13 -0
- package/corpus/templates/design/app/pages/DesignEditor.tsx +1755 -401
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +9 -5
- package/corpus/templates/design/app/pages/DesignSystems.tsx +2 -2
- package/corpus/templates/design/app/pages/Index.tsx +49 -26
- package/corpus/templates/design/app/pages/NotFound.tsx +25 -8
- package/corpus/templates/design/app/pages/VisualEdit.tsx +17 -5
- package/corpus/templates/design/app/routes/examples.tsx +1 -7
- package/corpus/templates/design/app/routes/templates.tsx +7 -4
- package/corpus/templates/design/changelog/2026-06-30-board-shapes-and-auto-layout-controls-are-clearer.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-canvas-editing-now-keeps-undo-redo-and-cross-screen-layer-mo.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-component-selections-now-use-purple-component-chrome-and-sho.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-constraints-now-stay-tucked-into-a-compact-inspector-preview.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-creating-a-component-now-opens-in-a-compact-inspector-popove.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-cards-no-longer-show-legacy-project-type-badges.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-chat-now-keeps-new-turns-in-the-visible-design-agent-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-editor-panels-now-keep-their-compact-text-sizing-cons.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-no-longer-shows-the-connected-local-code-warning-bann.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-now-opens-to-the-files-panel-unless-a-generation-is-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-opens-with-a-cleaner-empty-canvas-and-loading-preview.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-tools-use-simpler-less-decorative-icons.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-dragging-absolute-elements-no-longer-shows-coordinate-labels.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-fixed-all-screens-opening-too-zoomed-in-by-default.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-fixed-the-public-design-assets-sidebar-so-native-components-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-fixed-the-screen-overview-board-so-empty-board-space-no-long.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-full-view-screens-can-now-scroll-while-remaining-editable.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-inspector-element-headers-show-the-selected-html-tag-and-the.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-inspector-inputs-stay-compact-across-desktop-breakpoints.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-layers-can-be-multi-selected-from-the-canvas-and-edited-toge.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-local-visual-edit-links-can-edit-localhost-frames-without-si.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-localhost-visual-edit-frames-can-now-be-selected-and-edited.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-marquee-selection-now-works-inside-screens-multi-selected-la.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-motion-is-now-available-from-the-persistent-left-rail-and-th.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-motion-timeline-collapse-and-reopen-animations-feel-smoother.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-multi-select-outlines-now-stay-consistent-across-all-screens.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-new-board-shapes-now-start-with-neutral-gray-styling.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-new-designs-open-into-a-steadier-loading-state-before-the-ed.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-new-designs-show-a-loading-state-during-handoff-and-keep-edi.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-public-visual-edit-design-links-now-open-directly-instead-of.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-removed-the-confusing-states-section-from-the-design-editor-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-removed-the-templates-gallery-from-design-navigation.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-share-stays-visible-as-soon-as-editable-designs-load.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-signed-out-save-and-share-controls-use-simpler-labels-and-op.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-text-added-on-the-canvas-now-focuses-cleanly-with-the-right-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-design-editor-loading-skeleton-is-simpler-and-its-bottom.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-design-editor-loading-skeleton-now-follows-the-current-t.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-design-inspector-no-longer-shows-child-layout-controls-o.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-design-inspector-no-longer-shows-the-ask-ai-section-abov.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-design-review-panel-no-longer-shows-a-separate-inline-au.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-empty-designs-page-now-focuses-on-a-single-primary-new-d.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-layers-panel-header-stays-as-layers-while-multiple-items.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-missing-design-screen-now-uses-a-neutral-back-button.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-motion-timeline-now-closes-without-squeezing-the-canvas-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-new-design-connect-ai-setup-now-lines-up-with-the-compos.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-screen-overview-board-now-blends-into-the-canvas-and-new.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-top-level-canvas-drops-now-show-screen-guides.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-top-level-canvas-layers-now-keep-a-transparent-backdrop-and-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-top-level-canvas-layers-now-select-reliably-from-all-screens.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-visual-edit-can-open-and-refresh-localhost-screens-in-one-au.md +6 -0
- package/corpus/templates/design/e2e/helpers.ts +15 -4
- package/corpus/templates/design/server/db/index.ts +52 -0
- package/corpus/templates/design/server/plugins/agent-chat.ts +5 -0
- package/corpus/templates/design/server/plugins/auth.ts +1 -0
- package/corpus/templates/design/server/plugins/core-routes.ts +4 -0
- package/corpus/templates/design/shared/board-file.ts +380 -5
- package/corpus/templates/design/shared/board-objects.ts +2 -2
- package/corpus/templates/design/shared/code-layer.ts +50 -6
- package/corpus/templates/design/shared/motion-compiler.ts +27 -0
- package/corpus/templates/macros/app/components/DailyProgress.tsx +41 -37
- package/corpus/templates/macros/app/components/ExerciseCard.tsx +2 -2
- package/corpus/templates/macros/app/components/MealCard.tsx +2 -2
- package/corpus/templates/macros/app/components/VoiceDictation.tsx +1 -1
- package/corpus/templates/macros/app/components/WeeklyCaloriesChart.tsx +1 -1
- package/corpus/templates/macros/app/components/WeightCard.tsx +2 -2
- package/corpus/templates/macros/app/components/WeightTracker.tsx +1 -1
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +1 -1
- package/corpus/templates/macros/app/routes/_index.tsx +5 -5
- package/corpus/templates/macros/app/routes/analytics.tsx +1 -1
- package/corpus/templates/macros/changelog/2026-06-30-dashboard-loading-and-chart-surfaces-now-use-theme-aware-col.md +6 -0
- package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +14 -11
- package/corpus/templates/mail/app/global.css +3 -2
- package/corpus/templates/mail/changelog/2026-06-30-compose-floating-toolbars-now-use-theme-aware-colors-in-ligh.md +6 -0
- package/corpus/templates/plan/app/pages/PlansPage.tsx +2 -2
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +3 -3
- package/corpus/templates/slides/app/global.css +10 -0
- package/corpus/templates/slides/app/pages/Index.tsx +55 -51
- package/corpus/templates/slides/changelog/2026-06-30-deck-thumbnails-collapse-cleanly-to-one-column-when-the-chat.md +6 -0
- package/dist/agent/engine/anthropic-engine.d.ts +2 -2
- package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts +2 -2
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builtin.js +1 -1
- package/dist/agent/engine/builtin.js.map +1 -1
- package/dist/agent/engine/output-tokens.js +1 -1
- package/dist/agent/engine/output-tokens.js.map +1 -1
- package/dist/agent/harness/acp-adapter.d.ts +4 -1
- package/dist/agent/harness/acp-adapter.d.ts.map +1 -1
- package/dist/agent/harness/acp-adapter.js +19 -2
- package/dist/agent/harness/acp-adapter.js.map +1 -1
- package/dist/agent/harness/ai-sdk-adapter.d.ts.map +1 -1
- package/dist/agent/harness/ai-sdk-adapter.js +3 -0
- package/dist/agent/harness/ai-sdk-adapter.js.map +1 -1
- package/dist/agent/harness/translate.d.ts.map +1 -1
- package/dist/agent/harness/translate.js +3 -0
- package/dist/agent/harness/translate.js.map +1 -1
- package/dist/agent/harness/types.d.ts +1 -0
- package/dist/agent/harness/types.d.ts.map +1 -1
- package/dist/agent/harness/types.js.map +1 -1
- package/dist/agent/model-config.d.ts +21 -20
- package/dist/agent/model-config.d.ts.map +1 -1
- package/dist/agent/model-config.js +31 -13
- package/dist/agent/model-config.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +85 -10
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +27 -6
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/agent/tool-call-journal.d.ts +11 -9
- package/dist/agent/tool-call-journal.d.ts.map +1 -1
- package/dist/agent/tool-call-journal.js +92 -40
- package/dist/agent/tool-call-journal.js.map +1 -1
- package/dist/agent/types.d.ts +5 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +84 -0
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/gateway-helpers.d.ts +4 -0
- package/dist/cli/gateway-helpers.d.ts.map +1 -1
- package/dist/cli/gateway-helpers.js +9 -0
- package/dist/cli/gateway-helpers.js.map +1 -1
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +0 -2
- package/dist/cli/recap.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +54 -16
- package/dist/cli/skills.js.map +1 -1
- package/dist/cli/workspace-dev.d.ts.map +1 -1
- package/dist/cli/workspace-dev.js +33 -6
- package/dist/cli/workspace-dev.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +72 -26
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/CommandMenu.d.ts +6 -2
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +25 -14
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/DefaultSpinner.d.ts.map +1 -1
- package/dist/client/DefaultSpinner.js +8 -1
- package/dist/client/DefaultSpinner.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +7 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +37 -1
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/repo-helpers.d.ts +1 -0
- package/dist/client/chat/repo-helpers.d.ts.map +1 -1
- package/dist/client/chat/repo-helpers.js +59 -0
- package/dist/client/chat/repo-helpers.js.map +1 -1
- package/dist/client/chat/run-recovery.d.ts.map +1 -1
- package/dist/client/chat/run-recovery.js +4 -4
- package/dist/client/chat/run-recovery.js.map +1 -1
- package/dist/client/components/ApiKeySettings.js +8 -8
- package/dist/client/components/ApiKeySettings.js.map +1 -1
- package/dist/client/components/CodeRequiredDialog.d.ts.map +1 -1
- package/dist/client/components/CodeRequiredDialog.js +24 -15
- package/dist/client/components/CodeRequiredDialog.js.map +1 -1
- package/dist/client/components/MissingKeyCard.d.ts.map +1 -1
- package/dist/client/components/MissingKeyCard.js +11 -6
- package/dist/client/components/MissingKeyCard.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +4 -3
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.js +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.js.map +1 -1
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +6 -6
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/integrations/IntegrationCard.js +1 -1
- package/dist/client/integrations/IntegrationCard.js.map +1 -1
- package/dist/client/integrations/IntegrationsPanel.js +1 -1
- package/dist/client/integrations/IntegrationsPanel.js.map +1 -1
- package/dist/client/onboarding/OnboardingBanner.js +2 -2
- package/dist/client/onboarding/OnboardingBanner.js.map +1 -1
- package/dist/client/onboarding/OnboardingPanel.js +23 -19
- package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
- package/dist/client/resources/ResourceEditor.d.ts.map +1 -1
- package/dist/client/resources/ResourceEditor.js +13 -10
- package/dist/client/resources/ResourceEditor.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +2 -1
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +8 -3
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js +6 -38
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/client/useProductionAgent.d.ts +2 -1
- package/dist/client/useProductionAgent.d.ts.map +1 -1
- package/dist/client/useProductionAgent.js.map +1 -1
- package/dist/deploy/build.js +1 -1
- package/dist/deploy/build.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +3 -3
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js.map +1 -1
- package/dist/onboarding/default-steps.js +1 -1
- package/dist/onboarding/default-steps.js.map +1 -1
- package/dist/scripts/agent-engines/manage-agent-engine.js +1 -1
- package/dist/scripts/agent-engines/manage-agent-engine.js.map +1 -1
- package/dist/scripts/agent-engines/set-agent-engine.js +1 -1
- package/dist/scripts/agent-engines/set-agent-engine.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +3 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +134 -72
- 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/core-routes-plugin.d.ts +3 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +4 -1
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/open-route.d.ts +9 -0
- package/dist/server/open-route.d.ts.map +1 -1
- package/dist/server/open-route.js +48 -38
- package/dist/server/open-route.js.map +1 -1
- package/dist/shared/reasoning-effort.js +3 -0
- package/dist/shared/reasoning-effort.js.map +1 -1
- package/dist/sharing/access.d.ts.map +1 -1
- package/dist/sharing/access.js +18 -2
- package/dist/sharing/access.js.map +1 -1
- package/dist/sharing/registry.d.ts +10 -0
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js.map +1 -1
- package/dist/styles/agent-native.css +104 -20
- package/dist/styles/rich-markdown-editor.css +11 -10
- package/docs/content/cloneable-saas.mdx +2 -2
- package/docs/content/faq.mdx +1 -1
- package/docs/content/locales/ar-SA/cloneable-saas.mdx +2 -2
- package/docs/content/locales/ar-SA/faq.mdx +1 -1
- package/docs/content/locales/ar-SA/template-chat.mdx +1 -1
- package/docs/content/locales/de-DE/cloneable-saas.mdx +2 -2
- package/docs/content/locales/de-DE/faq.mdx +1 -1
- package/docs/content/locales/de-DE/template-chat.mdx +1 -1
- package/docs/content/locales/es-ES/cloneable-saas.mdx +2 -2
- package/docs/content/locales/es-ES/faq.mdx +1 -1
- package/docs/content/locales/es-ES/template-chat.mdx +1 -1
- package/docs/content/locales/fr-FR/cloneable-saas.mdx +2 -2
- package/docs/content/locales/fr-FR/faq.mdx +1 -1
- package/docs/content/locales/fr-FR/template-chat.mdx +1 -1
- package/docs/content/locales/hi-IN/cloneable-saas.mdx +2 -2
- package/docs/content/locales/hi-IN/faq.mdx +1 -1
- package/docs/content/locales/hi-IN/template-chat.mdx +1 -1
- package/docs/content/locales/ja-JP/cloneable-saas.mdx +2 -2
- package/docs/content/locales/ja-JP/faq.mdx +1 -1
- package/docs/content/locales/ja-JP/template-chat.mdx +1 -1
- package/docs/content/locales/ko-KR/cloneable-saas.mdx +2 -2
- package/docs/content/locales/ko-KR/faq.mdx +1 -1
- package/docs/content/locales/ko-KR/template-chat.mdx +1 -1
- package/docs/content/locales/pt-BR/cloneable-saas.mdx +2 -2
- package/docs/content/locales/pt-BR/faq.mdx +1 -1
- package/docs/content/locales/pt-BR/template-chat.mdx +1 -1
- package/docs/content/locales/zh-CN/cloneable-saas.mdx +2 -2
- package/docs/content/locales/zh-CN/faq.mdx +1 -1
- package/docs/content/locales/zh-CN/template-chat.mdx +1 -1
- package/docs/content/locales/zh-TW/cloneable-saas.mdx +2 -2
- package/docs/content/locales/zh-TW/faq.mdx +1 -1
- package/docs/content/locales/zh-TW/template-chat.mdx +1 -1
- package/docs/content/template-chat.mdx +1 -1
- package/package.json +1 -1
- package/corpus/templates/design/app/components/design/LocalSourceEditBanner.tsx +0 -157
- package/corpus/templates/design/app/lib/design-templates.ts +0 -1305
- package/corpus/templates/design/app/pages/Templates.tsx +0 -279
|
@@ -24,6 +24,13 @@ import {
|
|
|
24
24
|
TooltipContent,
|
|
25
25
|
TooltipTrigger,
|
|
26
26
|
} from "@/components/ui/tooltip";
|
|
27
|
+
import {
|
|
28
|
+
chartAxisStroke,
|
|
29
|
+
chartGridStroke,
|
|
30
|
+
chartTooltipContentStyle,
|
|
31
|
+
chartTooltipCursorFill,
|
|
32
|
+
chartTooltipCursorStroke,
|
|
33
|
+
} from "@/lib/chart-theme";
|
|
27
34
|
|
|
28
35
|
import { formatDate } from "./format";
|
|
29
36
|
|
|
@@ -122,31 +129,28 @@ export function KpiChart({
|
|
|
122
129
|
<BarChart data={data}>
|
|
123
130
|
<CartesianGrid
|
|
124
131
|
strokeDasharray="3 3"
|
|
125
|
-
stroke=
|
|
132
|
+
stroke={chartGridStroke}
|
|
126
133
|
vertical={false}
|
|
127
134
|
/>
|
|
128
135
|
<XAxis
|
|
129
136
|
dataKey="period"
|
|
130
|
-
stroke=
|
|
137
|
+
stroke={chartAxisStroke}
|
|
131
138
|
fontSize={11}
|
|
132
139
|
tickLine={false}
|
|
133
140
|
axisLine={false}
|
|
134
141
|
tickFormatter={formatDate}
|
|
135
142
|
/>
|
|
136
143
|
<YAxis
|
|
137
|
-
stroke=
|
|
144
|
+
stroke={chartAxisStroke}
|
|
138
145
|
fontSize={11}
|
|
139
146
|
tickLine={false}
|
|
140
147
|
axisLine={false}
|
|
141
148
|
tickFormatter={formatY}
|
|
142
149
|
/>
|
|
143
150
|
<Tooltip
|
|
144
|
-
cursor={{ fill:
|
|
151
|
+
cursor={{ fill: chartTooltipCursorFill }}
|
|
145
152
|
contentStyle={{
|
|
146
|
-
|
|
147
|
-
border: "1px solid #27272a",
|
|
148
|
-
borderRadius: "8px",
|
|
149
|
-
color: "#fafafa",
|
|
153
|
+
...chartTooltipContentStyle,
|
|
150
154
|
fontSize: "12px",
|
|
151
155
|
}}
|
|
152
156
|
labelFormatter={formatDate}
|
|
@@ -172,31 +176,28 @@ export function KpiChart({
|
|
|
172
176
|
<LineChart data={data}>
|
|
173
177
|
<CartesianGrid
|
|
174
178
|
strokeDasharray="3 3"
|
|
175
|
-
stroke=
|
|
179
|
+
stroke={chartGridStroke}
|
|
176
180
|
vertical={false}
|
|
177
181
|
/>
|
|
178
182
|
<XAxis
|
|
179
183
|
dataKey="period"
|
|
180
|
-
stroke=
|
|
184
|
+
stroke={chartAxisStroke}
|
|
181
185
|
fontSize={11}
|
|
182
186
|
tickLine={false}
|
|
183
187
|
axisLine={false}
|
|
184
188
|
tickFormatter={formatDate}
|
|
185
189
|
/>
|
|
186
190
|
<YAxis
|
|
187
|
-
stroke=
|
|
191
|
+
stroke={chartAxisStroke}
|
|
188
192
|
fontSize={11}
|
|
189
193
|
tickLine={false}
|
|
190
194
|
axisLine={false}
|
|
191
195
|
tickFormatter={formatY}
|
|
192
196
|
/>
|
|
193
197
|
<Tooltip
|
|
194
|
-
cursor={{ stroke:
|
|
198
|
+
cursor={{ stroke: chartTooltipCursorStroke }}
|
|
195
199
|
contentStyle={{
|
|
196
|
-
|
|
197
|
-
border: "1px solid #27272a",
|
|
198
|
-
borderRadius: "8px",
|
|
199
|
-
color: "#fafafa",
|
|
200
|
+
...chartTooltipContentStyle,
|
|
200
201
|
fontSize: "12px",
|
|
201
202
|
}}
|
|
202
203
|
labelFormatter={formatDate}
|
|
@@ -240,31 +241,28 @@ export function KpiChart({
|
|
|
240
241
|
</defs>
|
|
241
242
|
<CartesianGrid
|
|
242
243
|
strokeDasharray="3 3"
|
|
243
|
-
stroke=
|
|
244
|
+
stroke={chartGridStroke}
|
|
244
245
|
vertical={false}
|
|
245
246
|
/>
|
|
246
247
|
<XAxis
|
|
247
248
|
dataKey="period"
|
|
248
|
-
stroke=
|
|
249
|
+
stroke={chartAxisStroke}
|
|
249
250
|
fontSize={11}
|
|
250
251
|
tickLine={false}
|
|
251
252
|
axisLine={false}
|
|
252
253
|
tickFormatter={formatDate}
|
|
253
254
|
/>
|
|
254
255
|
<YAxis
|
|
255
|
-
stroke=
|
|
256
|
+
stroke={chartAxisStroke}
|
|
256
257
|
fontSize={11}
|
|
257
258
|
tickLine={false}
|
|
258
259
|
axisLine={false}
|
|
259
260
|
tickFormatter={formatY}
|
|
260
261
|
/>
|
|
261
262
|
<Tooltip
|
|
262
|
-
cursor={{ stroke:
|
|
263
|
+
cursor={{ stroke: chartTooltipCursorStroke }}
|
|
263
264
|
contentStyle={{
|
|
264
|
-
|
|
265
|
-
border: "1px solid #27272a",
|
|
266
|
-
borderRadius: "8px",
|
|
267
|
-
color: "#fafafa",
|
|
265
|
+
...chartTooltipContentStyle,
|
|
268
266
|
fontSize: "12px",
|
|
269
267
|
}}
|
|
270
268
|
labelFormatter={formatDate}
|
|
@@ -12,6 +12,10 @@ Detailed event, availability, booking, storage, and UI rules live in
|
|
|
12
12
|
- Never hardcode API keys, tokens, webhook URLs, signing secrets, private Builder/internal data, customer data, or credential-looking literals. Use secrets/OAuth/runtime configuration and obvious placeholders in examples.
|
|
13
13
|
- Use actions for events, availability, booking links, settings, navigation,
|
|
14
14
|
Google Calendar connection, and sharing. Do not bypass app access checks.
|
|
15
|
+
- Use `connect-google-calendar` when the user asks to connect or reconnect
|
|
16
|
+
Google Calendar. Return its link to the user; do not `fetch`
|
|
17
|
+
`/_agent-native/google/auth-url` from the agent backend because that route
|
|
18
|
+
requires the signed-in browser session.
|
|
15
19
|
- In dev, call actions with `pnpm action <name>`; in production, use native
|
|
16
20
|
tools. The action schema is authoritative.
|
|
17
21
|
- Use the current date from runtime context, not a visible calendar date, when
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { getRequestUserEmail } from "@agent-native/core/server";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
const CONNECT_PATH = "/_agent-native/google/auth-url";
|
|
6
|
+
const ADD_ACCOUNT_PATH = "/_agent-native/google/add-account/auth-url";
|
|
7
|
+
|
|
8
|
+
function normalizeReturnPath(value: string | undefined): string | undefined {
|
|
9
|
+
if (!value) return undefined;
|
|
10
|
+
try {
|
|
11
|
+
const url = new URL(value, "https://calendar.agent-native.local");
|
|
12
|
+
if (url.origin !== "https://calendar.agent-native.local") {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
return `${url.pathname}${url.search}${url.hash}`;
|
|
16
|
+
} catch {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default defineAction({
|
|
22
|
+
description:
|
|
23
|
+
"Create a user-clickable Google Calendar OAuth link. Use this when the user asks to connect or reconnect Google Calendar. Do not fetch the returned URL as an API; the signed-in user must open it in their browser.",
|
|
24
|
+
schema: z.object({
|
|
25
|
+
addAccount: z
|
|
26
|
+
.boolean()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe(
|
|
29
|
+
"Use true only when adding another Google Calendar account to an already connected Calendar workspace.",
|
|
30
|
+
),
|
|
31
|
+
returnPath: z
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe(
|
|
35
|
+
"Optional same-origin Calendar path to return to after the Google OAuth flow.",
|
|
36
|
+
),
|
|
37
|
+
}),
|
|
38
|
+
http: { method: "GET" },
|
|
39
|
+
readOnly: true,
|
|
40
|
+
parallelSafe: true,
|
|
41
|
+
run: async (args) => {
|
|
42
|
+
const owner = getRequestUserEmail();
|
|
43
|
+
if (!owner) {
|
|
44
|
+
throw new Error("Sign in to Calendar before connecting Google Calendar.");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const path = args.addAccount ? ADD_ACCOUNT_PATH : CONNECT_PATH;
|
|
48
|
+
const params = new URLSearchParams({ redirect: "1" });
|
|
49
|
+
if (!args.addAccount) params.set("calendar", "1");
|
|
50
|
+
|
|
51
|
+
const returnPath = normalizeReturnPath(args.returnPath);
|
|
52
|
+
if (returnPath) params.set("return", returnPath);
|
|
53
|
+
|
|
54
|
+
const url = `${path}?${params.toString()}`;
|
|
55
|
+
const label = args.addAccount
|
|
56
|
+
? "Add Google Calendar account"
|
|
57
|
+
: "Connect Google Calendar";
|
|
58
|
+
return {
|
|
59
|
+
provider: "google_calendar",
|
|
60
|
+
url,
|
|
61
|
+
label,
|
|
62
|
+
markdown: `[${label}](${url})`,
|
|
63
|
+
message:
|
|
64
|
+
"Open this link in the signed-in Calendar browser session to connect Google Calendar. Do not fetch it from the agent backend.",
|
|
65
|
+
requiresUserGesture: true,
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
link: ({ result }) => {
|
|
69
|
+
const url =
|
|
70
|
+
result && typeof result === "object"
|
|
71
|
+
? (result as { url?: unknown }).url
|
|
72
|
+
: null;
|
|
73
|
+
if (typeof url !== "string" || !url) return null;
|
|
74
|
+
return {
|
|
75
|
+
url,
|
|
76
|
+
label: "Connect Google Calendar",
|
|
77
|
+
view: "settings",
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
});
|
|
@@ -70,6 +70,7 @@ const INITIAL_TOOL_NAMES = [
|
|
|
70
70
|
"find-a-time",
|
|
71
71
|
"search-people",
|
|
72
72
|
"navigate",
|
|
73
|
+
"connect-google-calendar",
|
|
73
74
|
"list-booking-links",
|
|
74
75
|
"create-booking-link",
|
|
75
76
|
"update-booking-link",
|
|
@@ -111,6 +112,7 @@ Provider-specific Calendar actions are shortcuts, not limits. If a first-class a
|
|
|
111
112
|
- \`pnpm action navigate --view=calendar --date=YYYY-MM-DD\` — Navigate to a specific date
|
|
112
113
|
- \`pnpm action navigate --view=availability\` — Show availability settings
|
|
113
114
|
- \`pnpm action navigate --view=booking-links\` — Show booking links
|
|
115
|
+
- \`pnpm action connect-google-calendar\` — Create a user-clickable Google Calendar OAuth link. Use this when the user asks to connect or reconnect Google Calendar. Do not fetch \`/_agent-native/google/auth-url\` yourself; OAuth must be opened by the signed-in user in their browser.
|
|
114
116
|
- \`pnpm action update-calendar-visual-preferences --colorMode multi\` — Color the local app UI by meeting type without modifying Google Calendar events
|
|
115
117
|
- \`pnpm action update-calendar-visual-preferences --colorMode single --singleColor '#5B9BD5'\` — Use one local display color for the user's Google events
|
|
116
118
|
- \`pnpm action check-availability --date YYYY-MM-DD --duration 60\` — Check free slots
|
|
@@ -125,6 +127,8 @@ Use \`create-event\` or \`update-event --colorId 1..11\` when the user wants one
|
|
|
125
127
|
## Google Connection Check
|
|
126
128
|
Before answering schedule questions, run view-screen first for context, then use list-events for the requested date range even if the user is currently on Settings, Booking Links, or another non-calendar page. Do not infer a Google Calendar connection problem just because the current page is Settings. Only ask the user to reconnect Google if list-events or the explicit Google status reports an auth/connection error.
|
|
127
129
|
|
|
130
|
+
When the user explicitly asks you to connect or reconnect Google Calendar, call \`connect-google-calendar\` and give them the returned link. Do not call raw HTTP/fetch/web-request against \`/_agent-native/google/auth-url\`; that route depends on the user's browser session and will return 401 from the agent backend.
|
|
131
|
+
|
|
128
132
|
For relationship-history or frequency questions such as "who have I met at Adobe?" or "how often do I meet with Mattel?", prefer the raw Google Calendar API through provider-api-request so you can choose the exact timeMin/timeMax, q, calendarId, maxResults, and pageToken behavior. Stage large paginated results before analysis. Do not conclude there are no recurring meetings from the visible range or from a convenience action alone.
|
|
129
133
|
|
|
130
134
|
## Context Awareness
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Local database-mode development for Builder/source testing.
|
|
2
|
+
# Copy to .env.local or run `pnpm dev:database` to generate one.
|
|
3
|
+
# These values are local-only. Do not use them for production deploys.
|
|
4
|
+
|
|
5
|
+
AGENT_NATIVE_MODE=database
|
|
6
|
+
BETTER_AUTH_SECRET=<generated-local-development-secret>
|
|
@@ -113,10 +113,11 @@ cd templates/content && pnpm action <name> [args]
|
|
|
113
113
|
| `attach-content-database-source` | `--databaseId <id>` or `--documentId <id> [--sourceType mock\|builder-cms] [--sourceName] [--sourceTable] [--relationshipMode items\|details] [--join <json>]` | Attach a source binding; use `items` to add more rows and `details` to match a source onto existing rows |
|
|
114
114
|
| `change-content-database-source-role` | `--databaseId <id>` or `--documentId <id> --sourceId <id> --relationshipMode items\|details [--join <json>]` | Change an attached source between adding rows and adding matched detail columns without removing the source |
|
|
115
115
|
| `refresh-content-database-source` | `--databaseId <id>` or `--documentId <id>` | Refresh the read-only source status envelope; Builder CMS reads live entries only when configured |
|
|
116
|
+
| `process-builder-body-hydration` | `--sourceId <id> [--documentId <id>] [--limit <n>]` | Hydrate queued Builder article bodies into readable Content markdown with preserved source-component markers |
|
|
116
117
|
| `set-content-database-source-write-mode` | `--databaseId <id>` or `--documentId <id> --liveWritesEnabled true\|false [--allowedWriteModes <json>]` | Enable/disable per-source Builder live writes; enabling is allowed only for `agent-native-blog-article-test` with explicit modes |
|
|
117
118
|
| `stage-builder-revision` | `--databaseId <id>` or `--documentId <id>` | Stage pending local Builder CMS changes as a local-only save-revision record; never calls Builder |
|
|
118
119
|
| `review-content-database-source-change-set` | `--databaseId <id>` or `--documentId <id> --changeSetId <id> --decision approve\|reject [--note]` | Approve or reject a local source change-set review record without provider writes |
|
|
119
|
-
| `prepare-builder-source-execution` | `--databaseId <id>` or `--documentId <id> --changeSetId <id> [--pushModeConfirmation autosave\|draft\|publish]` | Prepare a dry-run Builder execution gate with request semantics/idempotency key; never calls Builder
|
|
120
|
+
| `prepare-builder-source-execution` | `--databaseId <id>` or `--documentId <id> --changeSetId <id> [--pushModeConfirmation autosave\|draft\|publish]` | Prepare a dry-run Builder execution gate for approved field/body changes with request semantics/idempotency key; never calls Builder |
|
|
120
121
|
| `validate-builder-source-execution` | `--databaseId <id>` or `--documentId <id> --changeSetId <id> [--idempotencyKey <key>]` | Validate/replay a prepared Builder execution gate locally as a dry run; never calls Builder |
|
|
121
122
|
| `execute-builder-source-execution` | `--databaseId <id>` or `--documentId <id> --changeSetId <id> [--idempotencyKey <key>] [--pushModeConfirmation autosave\|draft\|publish]` | Execute a guarded live Builder write only when approved, validated, enabled, idempotent, and targeting `agent-native-blog-article-test` |
|
|
122
123
|
| `add-database-item` | `--databaseId <id> [--title <text>] [--propertyValues <json>]` | Add a page row to a database, optionally seeding property values |
|
|
@@ -208,6 +209,14 @@ Content has two file workflows:
|
|
|
208
209
|
Edit reusable symbol content in that emitted source file; do not retarget
|
|
209
210
|
`entry`, `model`, or `source` in the parent MDX unless a dedicated Builder
|
|
210
211
|
retargeting workflow is added.
|
|
212
|
+
- **Builder source components:** Builder CMS database body hydration renders
|
|
213
|
+
unsupported provider-native body blocks as `<SourceComponent ... />` markers.
|
|
214
|
+
Treat these as read-only preservation anchors, not editable local blocks.
|
|
215
|
+
Agents may edit surrounding prose, but must not delete, duplicate, move, or
|
|
216
|
+
rewrite `rawRef`, `rawHash`, or marker ids unless a dedicated provider
|
|
217
|
+
conversion workflow exists. Guarded Builder write-back refuses missing,
|
|
218
|
+
tampered, or structurally moved markers so source-native components are not
|
|
219
|
+
lost.
|
|
211
220
|
- **Picked folders and components:** browser-picked folders can be the
|
|
212
221
|
source of truth for `.md`/`.mdx` files, but the browser does not expose an
|
|
213
222
|
absolute path that Vite can compile. Component previews from a picked
|
|
@@ -5,6 +5,11 @@ import type {
|
|
|
5
5
|
BuilderCmsModelSummary,
|
|
6
6
|
BuilderCmsModelsResponse,
|
|
7
7
|
} from "../shared/api.js";
|
|
8
|
+
import {
|
|
9
|
+
builderBlocksHash,
|
|
10
|
+
builderEntryBlocks,
|
|
11
|
+
type BuilderContentEntry,
|
|
12
|
+
} from "../shared/builder-mdx.js";
|
|
8
13
|
import {
|
|
9
14
|
normalizeBuilderCmsApiEntry,
|
|
10
15
|
type BuilderCmsSourceEntry,
|
|
@@ -23,6 +28,7 @@ export interface BuilderCmsEntryLiveState {
|
|
|
23
28
|
exists: boolean;
|
|
24
29
|
published: "published" | "draft" | string | null;
|
|
25
30
|
lastUpdated: number | string | null;
|
|
31
|
+
blocksHash: string | null;
|
|
26
32
|
id: string | null;
|
|
27
33
|
}
|
|
28
34
|
|
|
@@ -42,7 +48,7 @@ const BUILDER_CMS_MAX_READ_LIMIT = 1000;
|
|
|
42
48
|
const BUILDER_CMS_PAGE_SIZE = 100;
|
|
43
49
|
const BUILDER_CMS_READ_RETRIES = 2;
|
|
44
50
|
const BUILDER_CMS_ENTRY_FIELDS =
|
|
45
|
-
"id,name,published,lastUpdated,createdDate,data.title,data.handle,data.url,data.slug,data.date,data.description,data.status,data.author,data.image";
|
|
51
|
+
"id,name,published,lastUpdated,createdDate,data.title,data.handle,data.url,data.slug,data.date,data.description,data.status,data.author,data.image,data.blocks,data.blocksString";
|
|
46
52
|
|
|
47
53
|
function builderContentApiHost() {
|
|
48
54
|
return (
|
|
@@ -76,6 +82,7 @@ function liveStateFromBuilderEntry(value: unknown): BuilderCmsEntryLiveState {
|
|
|
76
82
|
exists: false,
|
|
77
83
|
published: null,
|
|
78
84
|
lastUpdated: null,
|
|
85
|
+
blocksHash: null,
|
|
79
86
|
id: null,
|
|
80
87
|
};
|
|
81
88
|
}
|
|
@@ -84,6 +91,7 @@ function liveStateFromBuilderEntry(value: unknown): BuilderCmsEntryLiveState {
|
|
|
84
91
|
exists: false,
|
|
85
92
|
published: null,
|
|
86
93
|
lastUpdated: null,
|
|
94
|
+
blocksHash: null,
|
|
87
95
|
id: null,
|
|
88
96
|
};
|
|
89
97
|
}
|
|
@@ -97,6 +105,7 @@ function liveStateFromBuilderEntry(value: unknown): BuilderCmsEntryLiveState {
|
|
|
97
105
|
exists: false,
|
|
98
106
|
published: null,
|
|
99
107
|
lastUpdated: null,
|
|
108
|
+
blocksHash: null,
|
|
100
109
|
id: null,
|
|
101
110
|
};
|
|
102
111
|
}
|
|
@@ -116,10 +125,12 @@ function liveStateFromBuilderEntry(value: unknown): BuilderCmsEntryLiveState {
|
|
|
116
125
|
exists: false,
|
|
117
126
|
published: null,
|
|
118
127
|
lastUpdated: null,
|
|
128
|
+
blocksHash: null,
|
|
119
129
|
id: null,
|
|
120
130
|
};
|
|
121
131
|
}
|
|
122
132
|
|
|
133
|
+
const blocks = builderEntryBlocks(record as BuilderContentEntry);
|
|
123
134
|
return {
|
|
124
135
|
exists: true,
|
|
125
136
|
published:
|
|
@@ -129,6 +140,7 @@ function liveStateFromBuilderEntry(value: unknown): BuilderCmsEntryLiveState {
|
|
|
129
140
|
stringOrNumberFromUnknown(record.updatedDate) ??
|
|
130
141
|
stringOrNumberFromUnknown(record.updatedAt) ??
|
|
131
142
|
stringOrNumberFromUnknown(data.updatedAt),
|
|
143
|
+
blocksHash: blocks.length > 0 ? builderBlocksHash(blocks) : null,
|
|
132
144
|
id,
|
|
133
145
|
};
|
|
134
146
|
}
|
|
@@ -618,6 +630,7 @@ export async function readBuilderCmsEntryLiveState(args: {
|
|
|
618
630
|
exists: false,
|
|
619
631
|
published: null,
|
|
620
632
|
lastUpdated: null,
|
|
633
|
+
blocksHash: null,
|
|
621
634
|
id: null,
|
|
622
635
|
};
|
|
623
636
|
}
|
|
@@ -3,6 +3,21 @@ import type {
|
|
|
3
3
|
ContentDatabaseSourceFieldMapping,
|
|
4
4
|
DocumentPropertyValue,
|
|
5
5
|
} from "../shared/api.js";
|
|
6
|
+
import {
|
|
7
|
+
builderBlocksHash,
|
|
8
|
+
builderEntryBlocks,
|
|
9
|
+
normalizeRemoteUpdatedAt,
|
|
10
|
+
type BuilderContentEntry,
|
|
11
|
+
} from "../shared/builder-mdx.js";
|
|
12
|
+
|
|
13
|
+
export const BUILDER_CMS_BODY_CONTENT_KEY = "__builder.body.content";
|
|
14
|
+
export const BUILDER_CMS_BODY_BLOCKS_HASH_KEY = "__builder.body.blocksHash";
|
|
15
|
+
export const BUILDER_CMS_BODY_SIDECARS_KEY = "__builder.body.sidecarsJson";
|
|
16
|
+
export const BUILDER_CMS_BODY_LOSSLESS_CONTENT_KEY =
|
|
17
|
+
"__builder.body.losslessContent";
|
|
18
|
+
export const BUILDER_CMS_BODY_READABLE_MAP_KEY =
|
|
19
|
+
"__builder.body.readableMapJson";
|
|
20
|
+
export const BUILDER_CMS_BODY_BLOCK_COUNT_KEY = "__builder.body.blockCount";
|
|
6
21
|
|
|
7
22
|
export interface BuilderCmsSourceEntry {
|
|
8
23
|
id: string;
|
|
@@ -11,6 +26,7 @@ export interface BuilderCmsSourceEntry {
|
|
|
11
26
|
urlPath: string;
|
|
12
27
|
updatedAt: string;
|
|
13
28
|
sourceValues: Record<string, DocumentPropertyValue>;
|
|
29
|
+
rawEntry?: BuilderContentEntry;
|
|
14
30
|
}
|
|
15
31
|
|
|
16
32
|
export interface ExistingBuilderSourceRowIdentity {
|
|
@@ -291,6 +307,7 @@ function builderSourceValuesFromRecord(args: {
|
|
|
291
307
|
title: string;
|
|
292
308
|
urlPath: string;
|
|
293
309
|
updatedAt: string;
|
|
310
|
+
rawEntry: BuilderContentEntry;
|
|
294
311
|
}) {
|
|
295
312
|
const values: Record<string, DocumentPropertyValue> = {
|
|
296
313
|
"data.title": args.title,
|
|
@@ -298,6 +315,7 @@ function builderSourceValuesFromRecord(args: {
|
|
|
298
315
|
lastUpdated: args.updatedAt,
|
|
299
316
|
};
|
|
300
317
|
for (const [key, value] of Object.entries(args.data)) {
|
|
318
|
+
if (key === "blocks" || key === "blocksString") continue;
|
|
301
319
|
values[`data.${key}`] = sourceValueFromUnknown(value);
|
|
302
320
|
}
|
|
303
321
|
for (const key of ["published", "createdDate", "updatedDate", "updatedAt"]) {
|
|
@@ -305,6 +323,11 @@ function builderSourceValuesFromRecord(args: {
|
|
|
305
323
|
values[key] = sourceValueFromUnknown(args.record[key]);
|
|
306
324
|
}
|
|
307
325
|
}
|
|
326
|
+
const blocks = builderEntryBlocks(args.rawEntry);
|
|
327
|
+
if (blocks.length > 0) {
|
|
328
|
+
values[BUILDER_CMS_BODY_BLOCKS_HASH_KEY] = builderBlocksHash(blocks);
|
|
329
|
+
values[BUILDER_CMS_BODY_BLOCK_COUNT_KEY] = blocks.length;
|
|
330
|
+
}
|
|
308
331
|
return values;
|
|
309
332
|
}
|
|
310
333
|
|
|
@@ -342,6 +365,24 @@ export function normalizeBuilderCmsApiEntry(
|
|
|
342
365
|
]) ??
|
|
343
366
|
timestampStringFromRecord(data, ["updatedAt"]) ??
|
|
344
367
|
new Date().toISOString();
|
|
368
|
+
const rawEntry: BuilderContentEntry = {
|
|
369
|
+
...record,
|
|
370
|
+
id,
|
|
371
|
+
model,
|
|
372
|
+
name:
|
|
373
|
+
typeof record.name === "string" && record.name.trim()
|
|
374
|
+
? record.name.trim()
|
|
375
|
+
: title,
|
|
376
|
+
published:
|
|
377
|
+
typeof record.published === "string" ? record.published : undefined,
|
|
378
|
+
lastUpdated: normalizeRemoteUpdatedAt({
|
|
379
|
+
...record,
|
|
380
|
+
id,
|
|
381
|
+
model,
|
|
382
|
+
data,
|
|
383
|
+
} as BuilderContentEntry),
|
|
384
|
+
data,
|
|
385
|
+
};
|
|
345
386
|
|
|
346
387
|
return {
|
|
347
388
|
id,
|
|
@@ -355,6 +396,8 @@ export function normalizeBuilderCmsApiEntry(
|
|
|
355
396
|
title,
|
|
356
397
|
urlPath,
|
|
357
398
|
updatedAt,
|
|
399
|
+
rawEntry,
|
|
358
400
|
}),
|
|
401
|
+
rawEntry,
|
|
359
402
|
};
|
|
360
403
|
}
|
|
@@ -194,6 +194,70 @@ function nestedBuilderPatch(
|
|
|
194
194
|
return body;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
function mergeBuilderPatch(
|
|
198
|
+
base: Record<string, unknown>,
|
|
199
|
+
patch: Record<string, unknown>,
|
|
200
|
+
) {
|
|
201
|
+
const merged = { ...base };
|
|
202
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
203
|
+
if (
|
|
204
|
+
key === "data" &&
|
|
205
|
+
value &&
|
|
206
|
+
typeof value === "object" &&
|
|
207
|
+
!Array.isArray(value)
|
|
208
|
+
) {
|
|
209
|
+
merged.data = {
|
|
210
|
+
...((merged.data && typeof merged.data === "object"
|
|
211
|
+
? merged.data
|
|
212
|
+
: {}) as Record<string, unknown>),
|
|
213
|
+
...(value as Record<string, unknown>),
|
|
214
|
+
};
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
merged[key] = value;
|
|
218
|
+
}
|
|
219
|
+
return merged;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function builderBodyPatch(changeSet: ContentDatabaseSourceChangeSet) {
|
|
223
|
+
const bodyChange = changeSet.bodyChange;
|
|
224
|
+
const checks: string[] = [];
|
|
225
|
+
const blockers: string[] = [];
|
|
226
|
+
if (!bodyChange) {
|
|
227
|
+
return { patch: {}, checks, blockers, hasBodyOperation: false };
|
|
228
|
+
}
|
|
229
|
+
if (!bodyChange.proposedBlocksJson) {
|
|
230
|
+
blockers.push(
|
|
231
|
+
"Builder body diff could not be converted to Builder blocks.",
|
|
232
|
+
);
|
|
233
|
+
return { patch: {}, checks, blockers, hasBodyOperation: false };
|
|
234
|
+
}
|
|
235
|
+
try {
|
|
236
|
+
const blocks = JSON.parse(bodyChange.proposedBlocksJson) as unknown;
|
|
237
|
+
if (!Array.isArray(blocks)) {
|
|
238
|
+
blockers.push("Builder body diff did not produce a blocks array.");
|
|
239
|
+
return { patch: {}, checks, blockers, hasBodyOperation: false };
|
|
240
|
+
}
|
|
241
|
+
checks.push("Includes converted Builder body blocks.");
|
|
242
|
+
for (const warning of bodyChange.warnings ?? []) {
|
|
243
|
+
checks.push(`Body conversion warning: ${warning}`);
|
|
244
|
+
}
|
|
245
|
+
return {
|
|
246
|
+
patch: {
|
|
247
|
+
data: {
|
|
248
|
+
blocks,
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
checks,
|
|
252
|
+
blockers,
|
|
253
|
+
hasBodyOperation: true,
|
|
254
|
+
};
|
|
255
|
+
} catch {
|
|
256
|
+
blockers.push("Builder body diff contains invalid converted blocks JSON.");
|
|
257
|
+
return { patch: {}, checks, blockers, hasBodyOperation: false };
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
197
261
|
function builderRequestForEffect(args: {
|
|
198
262
|
effect: BuilderCmsWriteEffect;
|
|
199
263
|
model: string;
|
|
@@ -272,18 +336,19 @@ function builderSafetyChecks(args: {
|
|
|
272
336
|
entryId: string | null;
|
|
273
337
|
syntheticFixtureTarget: boolean;
|
|
274
338
|
operations: BuilderCmsExecutionOperation[];
|
|
339
|
+
hasBodyOperation: boolean;
|
|
340
|
+
bodyChecks: string[];
|
|
341
|
+
bodyBlockers: string[];
|
|
275
342
|
}) {
|
|
276
343
|
const checks = [
|
|
277
344
|
"Requires explicit approval before execution.",
|
|
278
345
|
"Uses the stored execution idempotency key.",
|
|
346
|
+
...args.bodyChecks,
|
|
279
347
|
];
|
|
280
|
-
const blockers: string[] = [];
|
|
348
|
+
const blockers: string[] = [...args.bodyBlockers];
|
|
281
349
|
|
|
282
|
-
if (args.operations.length === 0) {
|
|
283
|
-
blockers.push("No
|
|
284
|
-
}
|
|
285
|
-
if (args.changeSet.bodyChange) {
|
|
286
|
-
blockers.push("Builder body diffs are not executable in this slice.");
|
|
350
|
+
if (args.operations.length === 0 && !args.hasBodyOperation) {
|
|
351
|
+
blockers.push("No Builder operations are available for this change.");
|
|
287
352
|
}
|
|
288
353
|
if (args.effect === "autosave" || args.effect === "update_in_place") {
|
|
289
354
|
const label = args.effect === "autosave" ? "Autosave" : "Update in place";
|
|
@@ -418,7 +483,11 @@ export function buildBuilderCmsExecutionPlan(args: {
|
|
|
418
483
|
localFieldKey: field.localFieldKey,
|
|
419
484
|
value: field.proposedValue,
|
|
420
485
|
}));
|
|
421
|
-
const
|
|
486
|
+
const bodyDiffPatch = builderBodyPatch(args.changeSet);
|
|
487
|
+
const bodyPatch = mergeBuilderPatch(
|
|
488
|
+
nestedBuilderPatch(operations),
|
|
489
|
+
bodyDiffPatch.patch,
|
|
490
|
+
);
|
|
422
491
|
// State-preserving effects must not include `published` in the body. Builder
|
|
423
492
|
// PATCH preserves omitted publication state, so only transition/create effects
|
|
424
493
|
// are allowed to set it.
|
|
@@ -441,6 +510,9 @@ export function buildBuilderCmsExecutionPlan(args: {
|
|
|
441
510
|
args.source.sourceTable === SAFE_WRITE_MODEL &&
|
|
442
511
|
target?.isSyntheticFixture === true,
|
|
443
512
|
operations,
|
|
513
|
+
hasBodyOperation: bodyDiffPatch.hasBodyOperation,
|
|
514
|
+
bodyChecks: bodyDiffPatch.checks,
|
|
515
|
+
bodyBlockers: bodyDiffPatch.blockers,
|
|
444
516
|
});
|
|
445
517
|
const state: ContentDatabaseSourceExecutionState =
|
|
446
518
|
safety.blockers.length > 0
|