@agent-native/core 0.91.1 → 0.92.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/blueprints/action/crud.md +1 -1
- package/blueprints/channel/discord.md +1 -1
- package/blueprints/provider/stripe.md +1 -1
- package/blueprints/sandbox/docker.md +1 -1
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +31 -0
- package/corpus/core/blueprints/action/crud.md +1 -1
- package/corpus/core/blueprints/channel/discord.md +1 -1
- package/corpus/core/blueprints/provider/stripe.md +1 -1
- package/corpus/core/blueprints/sandbox/docker.md +1 -1
- package/corpus/core/docs/content/faq.mdx +17 -0
- package/corpus/core/docs/content/notifications.mdx +12 -6
- package/corpus/core/package.json +6 -5
- package/corpus/core/src/agent/production-agent.ts +140 -46
- package/corpus/core/src/agent/run-manager.ts +23 -2
- package/corpus/core/src/agent/run-store.ts +2 -2
- package/corpus/core/src/agent/tool-search.ts +71 -4
- package/corpus/core/src/cli/add.ts +1 -1
- package/corpus/core/src/cli/create.ts +8 -3
- package/corpus/core/src/cli/index.ts +25 -4
- package/corpus/core/src/cli/upgrade.ts +798 -0
- package/corpus/core/src/client/AssistantChat.tsx +1 -1
- package/corpus/core/src/client/HighlightedCodeBlock.tsx +20 -3
- package/corpus/core/src/client/agent-chat-adapter.ts +31 -6
- package/corpus/core/src/client/chat/message-components.tsx +85 -8
- package/corpus/core/src/client/chat/tool-call-display.tsx +355 -144
- package/corpus/core/src/client/code-agent-chat-adapter.ts +2 -9
- package/corpus/core/src/client/extensions/ExtensionSlot.tsx +7 -0
- package/corpus/core/src/client/settings/SettingsPanel.tsx +533 -389
- package/corpus/core/src/client/settings/SettingsSection.tsx +154 -17
- package/corpus/core/src/client/sse-event-processor.ts +29 -2
- package/corpus/core/src/extensions/actions.ts +113 -5
- package/corpus/core/src/jobs/scheduler.ts +30 -1
- package/corpus/core/src/localization/default-messages.ts +21 -0
- package/corpus/core/src/notifications/channels.ts +88 -25
- package/corpus/core/src/notifications/registry.ts +17 -3
- package/corpus/core/src/notifications/types.ts +4 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +7 -3
- package/corpus/core/src/server/request-context.ts +7 -0
- package/corpus/core/src/styles/agent-conversation.css +1 -1
- package/corpus/core/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/core/src/templates/default/AGENTS.md +10 -3
- package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/de-DE.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/en-US.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/es-ES.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +19 -0
- package/corpus/core/src/templates/default/package.json +4 -3
- package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/core/src/templates/headless/AGENTS.md +9 -3
- package/corpus/core/src/templates/headless/package.json +4 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/core/src/templates/workspace-core/package.json +6 -6
- package/corpus/core/src/templates/workspace-root/AGENTS.md +10 -4
- package/corpus/core/src/templates/workspace-root/package.json +3 -2
- package/corpus/core/src/triggers/dispatcher.ts +30 -2
- package/corpus/core/src/vite/client.ts +96 -1
- package/corpus/templates/analytics/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +20 -2
- package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/analytics/AGENTS.md +7 -5
- package/corpus/templates/analytics/actions/save-monitor.ts +14 -0
- package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +41 -6
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +122 -11
- package/corpus/templates/analytics/app/global.css +26 -10
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/analytics/app/i18n-data.ts +25 -0
- package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +8 -2
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +151 -32
- package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +17 -2
- package/corpus/templates/analytics/app/pages/monitoring/uptime/types.ts +4 -0
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +461 -286
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +285 -294
- package/corpus/templates/analytics/changelog/2026-07-08-console-details-expand-inline-under-each-row-and-the-event-t.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-dashboard-tables-keep-their-size-while-loading.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-monitoring-uptime-and-errors-tabs-now-clearly-show-which-view-is-active.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-session-replay-keeps-a-usable-stage-when-dev-tools-is-open-a.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-session-replay-resumes-after-scrubbing-and-expands-console-r.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-session-replay-uses-stock-rrweb-sizing-again-so-recorded.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-session-replays-wait-for-full-load-keep-a-normal-viewport-an.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-sidebar-dashboard-menus-now-open-above-the-dashboard-canvas.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-uptime-alerting-clarifies-in-app-inbox-vs-email-and-lets-you-paste-slack-or-webhook-urls-per-monitor.md +6 -0
- package/corpus/templates/analytics/docs/uptime-monitoring.md +13 -11
- package/corpus/templates/analytics/package.json +2 -2
- package/corpus/templates/analytics/server/db/schema-monitoring.ts +4 -0
- package/corpus/templates/analytics/server/lib/uptime-monitors.ts +60 -12
- package/corpus/templates/analytics/server/plugins/db.ts +10 -0
- package/corpus/templates/assets/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/assets/package.json +2 -2
- package/corpus/templates/brain/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/brain/package.json +2 -2
- package/corpus/templates/calendar/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/calendar/AGENTS.md +10 -0
- package/corpus/templates/calendar/actions/create-event.ts +5 -1
- package/corpus/templates/calendar/actions/event-action-helpers.ts +41 -0
- package/corpus/templates/calendar/actions/get-attendee-timezones.ts +28 -0
- package/corpus/templates/calendar/actions/set-attendee-timezone.ts +68 -0
- package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +150 -11
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +36 -1
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +32 -0
- package/corpus/templates/calendar/app/hooks/use-attendee-timezones.ts +24 -0
- package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/calendar/app/i18n-data.ts +20 -0
- package/corpus/templates/calendar/app/lib/attendee-local-time.ts +122 -0
- package/corpus/templates/calendar/changelog/2026-07-08-event-details-now-support-extension-widgets-and-you-can-see-.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-08-when-you-invite-guests-to-a-new-event-you-now-appear-in.md +6 -0
- package/corpus/templates/calendar/package.json +2 -2
- package/corpus/templates/calendar/server/handlers/events.ts +5 -1
- package/corpus/templates/calendar/shared/api.ts +6 -0
- package/corpus/templates/chat/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/chat/package.json +2 -2
- package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +6 -2
- package/corpus/templates/clips/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/clips/actions/create-meeting.ts +8 -3
- package/corpus/templates/clips/actions/list-meetings.ts +31 -3
- package/corpus/templates/clips/changelog/2026-07-08-after-finishing-a-desktop-recording-reopening-clips-restor.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-clips-now-pops-up-to-take-notes-when-you-join-an-adhoc-zoom-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-desktop-clip-recordings-are-louder-after-capture-mic-only.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-desktop-meeting-notes-stay-active-from-tray-and-shortcut-controls.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-desktop-meeting-popovers-can-start-notes-and-join-the-meetin.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-meeting-notes-keep-their-recording-state-when-the-desktop.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-meeting-reminder-dropdowns-now-expand-fully-instead-of-being.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-meeting-reminders-now-appear-1-minute-before-start-stay-unti.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-the-desktop-meetings-panel-has-room-for-its-drop-shadow-and-.md +6 -0
- package/corpus/templates/clips/chrome-extension/package.json +2 -2
- package/corpus/templates/clips/desktop/package.json +2 -2
- package/corpus/templates/clips/desktop/src/app.tsx +214 -37
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +30 -6
- package/corpus/templates/clips/desktop/src/lib/meeting-notification-timing.ts +83 -0
- package/corpus/templates/clips/desktop/src/lib/native-recording-warm.ts +21 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +98 -20
- package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +197 -50
- package/corpus/templates/clips/desktop/src/styles.css +150 -53
- package/corpus/templates/clips/desktop/src-tauri/src/adhoc_meetings_watcher.rs +362 -0
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +41 -7
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +9 -2
- package/corpus/templates/clips/desktop/src-tauri/src/meetings_watcher.rs +89 -11
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +71 -17
- package/corpus/templates/clips/desktop/src-tauri/src/native_speech.rs +36 -1
- package/corpus/templates/clips/desktop/src-tauri/src/notifications.rs +62 -10
- package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +3 -3
- package/corpus/templates/clips/desktop/src-tauri/src/silence_detector.rs +1 -25
- package/corpus/templates/clips/desktop/src-tauri/src/state.rs +5 -0
- package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +18 -6
- package/corpus/templates/clips/desktop/src-tauri/src/util.rs +36 -1
- package/corpus/templates/clips/package.json +2 -2
- package/corpus/templates/content/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/content/actions/_batch-utils.ts +8 -0
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +7 -5
- package/corpus/templates/content/actions/_content-database-personal-view.ts +80 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +776 -319
- package/corpus/templates/content/actions/_database-utils.ts +6 -1
- package/corpus/templates/content/actions/_property-utils.ts +168 -0
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +19 -12
- package/corpus/templates/content/actions/bind-content-database-source-field.ts +19 -12
- package/corpus/templates/content/actions/delete-document.ts +9 -13
- package/corpus/templates/content/actions/get-content-database-personal-view.ts +27 -0
- package/corpus/templates/content/actions/refresh-content-database-source.ts +5 -5
- package/corpus/templates/content/actions/update-content-database-personal-view.ts +31 -0
- package/corpus/templates/content/actions/update-content-database-view.ts +3 -0
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +1 -1
- package/corpus/templates/content/app/components/editor/body-hydration.ts +35 -11
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +2631 -551
- package/corpus/templates/content/app/components/editor/database/filter-sort.ts +220 -18
- package/corpus/templates/content/app/hooks/use-content-database.ts +32 -0
- package/corpus/templates/content/app/hooks/use-documents.ts +8 -2
- package/corpus/templates/content/app/i18n/zh-TW.ts +16 -0
- package/corpus/templates/content/app/i18n-data.ts +154 -0
- package/corpus/templates/content/changelog/2026-07-08-builder-source-sync-now-completes-reliably-on-hosted-databases.md +6 -0
- package/corpus/templates/content/changelog/2026-07-08-database-filters-now-support-notion-style-reset-save-for-eve.md +6 -0
- package/corpus/templates/content/changelog/2026-07-08-date-filters-can-now-target-a-between-range.md +6 -0
- package/corpus/templates/content/changelog/2026-07-08-fixed-builder-database-sync-so-large-sources-continue-past-t.md +6 -0
- package/corpus/templates/content/package.json +2 -2
- package/corpus/templates/content/parity/matrix.md +1 -1
- package/corpus/templates/content/parity/matrix.ts +2 -0
- package/corpus/templates/content/server/plugins/db.ts +19 -0
- package/corpus/templates/content/shared/api.ts +24 -0
- package/corpus/templates/design/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/design/package.json +2 -2
- package/corpus/templates/dispatch/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/dispatch/app/i18n/zh-TW.ts +34 -1
- package/corpus/templates/dispatch/app/i18n-data.ts +387 -10
- package/corpus/templates/dispatch/app/routes/automations.tsx +1 -0
- package/corpus/templates/dispatch/changelog/2026-07-08-added-an-automations-page-to-review-pause-and-create.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-08-destinations-now-shows-outbound-delivery-queue-health.md +6 -0
- package/corpus/templates/dispatch/package.json +2 -2
- package/corpus/templates/forms/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/forms/package.json +2 -2
- package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/macros/package.json +2 -2
- package/corpus/templates/mail/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/mail/app/hooks/use-emails.ts +56 -44
- package/corpus/templates/mail/app/lib/gmail-mutation-queue.ts +325 -0
- package/corpus/templates/mail/changelog/2026-07-08-rapid-archive-and-mark-read-now-batch-gmail-updates-so-the-i.md +6 -0
- package/corpus/templates/mail/package.json +2 -2
- package/corpus/templates/plan/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/plan/package.json +2 -2
- package/corpus/templates/slides/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +46 -29
- package/corpus/templates/slides/app/context/DeckContext.tsx +45 -18
- package/corpus/templates/slides/app/i18n/ar-SA.ts +4 -0
- package/corpus/templates/slides/app/i18n/de-DE.ts +4 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +4 -0
- package/corpus/templates/slides/app/i18n/es-ES.ts +4 -0
- package/corpus/templates/slides/app/i18n/fr-FR.ts +4 -0
- package/corpus/templates/slides/app/i18n/hi-IN.ts +4 -0
- package/corpus/templates/slides/app/i18n/ja-JP.ts +4 -0
- package/corpus/templates/slides/app/i18n/ko-KR.ts +4 -0
- package/corpus/templates/slides/app/i18n/pt-BR.ts +4 -0
- package/corpus/templates/slides/app/i18n/zh-CN.ts +4 -0
- package/corpus/templates/slides/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/slides/app/lib/image-drop-to-agent.ts +115 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +22 -13
- package/corpus/templates/slides/changelog/2026-07-08-dropping-an-image-onto-a-slide-and-sending-it-to-the-agent-w.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-08-undo-works-after-the-agent-edits-a-slide-so-you-can-reverse.md +6 -0
- package/corpus/templates/slides/package.json +2 -2
- package/corpus/templates/videos/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/voice/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/agent/production-agent.d.ts +5 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +112 -42
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +23 -2
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/run-store.js +2 -2
- package/dist/agent/run-store.js.map +1 -1
- package/dist/agent/tool-search.d.ts +2 -0
- package/dist/agent/tool-search.d.ts.map +1 -1
- package/dist/agent/tool-search.js +60 -4
- package/dist/agent/tool-search.js.map +1 -1
- package/dist/catalog.json +2 -2
- package/dist/cli/add.js +1 -1
- package/dist/cli/add.js.map +1 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +8 -3
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +24 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/upgrade.d.ts +100 -0
- package/dist/cli/upgrade.d.ts.map +1 -0
- package/dist/cli/upgrade.js +678 -0
- package/dist/cli/upgrade.js.map +1 -0
- package/dist/client/AssistantChat.js +1 -1
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/HighlightedCodeBlock.d.ts +2 -0
- package/dist/client/HighlightedCodeBlock.d.ts.map +1 -1
- package/dist/client/HighlightedCodeBlock.js +10 -1
- package/dist/client/HighlightedCodeBlock.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +32 -4
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +61 -8
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +12 -0
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +136 -42
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/code-agent-chat-adapter.js +2 -9
- package/dist/client/code-agent-chat-adapter.js.map +1 -1
- package/dist/client/extensions/ExtensionSlot.js +6 -0
- package/dist/client/extensions/ExtensionSlot.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +52 -19
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsSection.d.ts +19 -4
- package/dist/client/settings/SettingsSection.d.ts.map +1 -1
- package/dist/client/settings/SettingsSection.js +33 -4
- package/dist/client/settings/SettingsSection.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +9 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +20 -2
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +85 -5
- package/dist/extensions/actions.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/jobs/scheduler.js +26 -1
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/localization/default-messages.d.ts +19 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +19 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/channels.d.ts +8 -3
- package/dist/notifications/channels.d.ts.map +1 -1
- package/dist/notifications/channels.js +61 -22
- package/dist/notifications/channels.js.map +1 -1
- package/dist/notifications/registry.d.ts.map +1 -1
- package/dist/notifications/registry.js +14 -3
- package/dist/notifications/registry.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/notifications/types.d.ts +4 -1
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/notifications/types.js.map +1 -1
- package/dist/observability/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/server/agent-chat-plugin.d.ts +5 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +2 -2
- 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/request-context.d.ts +7 -0
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js.map +1 -1
- package/dist/styles/agent-conversation.css +1 -1
- package/dist/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/templates/default/AGENTS.md +10 -3
- package/dist/templates/default/app/i18n/ar-SA.ts +21 -0
- package/dist/templates/default/app/i18n/de-DE.ts +21 -0
- package/dist/templates/default/app/i18n/en-US.ts +21 -0
- package/dist/templates/default/app/i18n/es-ES.ts +21 -0
- package/dist/templates/default/app/i18n/fr-FR.ts +21 -0
- package/dist/templates/default/app/i18n/hi-IN.ts +20 -0
- package/dist/templates/default/app/i18n/ja-JP.ts +21 -0
- package/dist/templates/default/app/i18n/ko-KR.ts +20 -0
- package/dist/templates/default/app/i18n/pt-BR.ts +21 -0
- package/dist/templates/default/app/i18n/zh-CN.ts +20 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +19 -0
- package/dist/templates/default/package.json +4 -3
- package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/templates/headless/AGENTS.md +9 -3
- package/dist/templates/headless/package.json +4 -3
- package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/templates/workspace-core/package.json +6 -6
- package/dist/templates/workspace-root/AGENTS.md +10 -4
- package/dist/templates/workspace-root/package.json +3 -2
- package/dist/triggers/dispatcher.js +27 -2
- package/dist/triggers/dispatcher.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +70 -1
- package/dist/vite/client.js.map +1 -1
- package/docs/content/faq.mdx +17 -0
- package/docs/content/notifications.mdx +12 -6
- package/package.json +7 -6
- package/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/src/templates/default/AGENTS.md +10 -3
- package/src/templates/default/app/i18n/ar-SA.ts +21 -0
- package/src/templates/default/app/i18n/de-DE.ts +21 -0
- package/src/templates/default/app/i18n/en-US.ts +21 -0
- package/src/templates/default/app/i18n/es-ES.ts +21 -0
- package/src/templates/default/app/i18n/fr-FR.ts +21 -0
- package/src/templates/default/app/i18n/hi-IN.ts +20 -0
- package/src/templates/default/app/i18n/ja-JP.ts +21 -0
- package/src/templates/default/app/i18n/ko-KR.ts +20 -0
- package/src/templates/default/app/i18n/pt-BR.ts +21 -0
- package/src/templates/default/app/i18n/zh-CN.ts +20 -0
- package/src/templates/default/app/i18n/zh-TW.ts +19 -0
- package/src/templates/default/package.json +4 -3
- package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/src/templates/headless/AGENTS.md +9 -3
- package/src/templates/headless/package.json +4 -3
- package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/src/templates/workspace-core/package.json +6 -6
- package/src/templates/workspace-root/AGENTS.md +10 -4
- package/src/templates/workspace-root/package.json +3 -2
|
@@ -16,8 +16,8 @@ use crate::util::{
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
const MEETING_NOTIFICATION_LABEL: &str = "meeting-notif";
|
|
19
|
-
const NOTIFICATION_W_LOGICAL: u32 =
|
|
20
|
-
const NOTIFICATION_H_LOGICAL: u32 =
|
|
19
|
+
const NOTIFICATION_W_LOGICAL: u32 = 440;
|
|
20
|
+
const NOTIFICATION_H_LOGICAL: u32 = 120;
|
|
21
21
|
const NOTIFICATION_TOP_MARGIN_LOGICAL: u32 = 44;
|
|
22
22
|
const NOTIFICATION_RIGHT_MARGIN_LOGICAL: u32 = 24;
|
|
23
23
|
|
|
@@ -109,6 +109,38 @@ pub fn take_pending_meeting_notification(app: AppHandle) -> Result<Option<Value>
|
|
|
109
109
|
Ok(pending.take())
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
fn format_time_range_subtitle(
|
|
113
|
+
scheduled_start: Option<&str>,
|
|
114
|
+
scheduled_end: Option<&str>,
|
|
115
|
+
starts_in_secs: i64,
|
|
116
|
+
) -> String {
|
|
117
|
+
let Some(start_str) = scheduled_start else {
|
|
118
|
+
return fallback_starts_subtitle(starts_in_secs);
|
|
119
|
+
};
|
|
120
|
+
let Ok(start) = chrono::DateTime::parse_from_rfc3339(start_str) else {
|
|
121
|
+
return fallback_starts_subtitle(starts_in_secs);
|
|
122
|
+
};
|
|
123
|
+
let local_start = start.with_timezone(&chrono::Local);
|
|
124
|
+
let start_label = local_start.format("%-I:%M %p").to_string();
|
|
125
|
+
if let Some(end_str) = scheduled_end {
|
|
126
|
+
if let Ok(end) = chrono::DateTime::parse_from_rfc3339(end_str) {
|
|
127
|
+
let end_label = end.with_timezone(&chrono::Local).format("%-I:%M %p");
|
|
128
|
+
return format!("{start_label} - {end_label}");
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
start_label
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
fn fallback_starts_subtitle(starts_in_secs: i64) -> String {
|
|
135
|
+
if starts_in_secs <= 0 {
|
|
136
|
+
"Started".to_string()
|
|
137
|
+
} else if starts_in_secs < 90 {
|
|
138
|
+
format!("Starts in {}s", starts_in_secs)
|
|
139
|
+
} else {
|
|
140
|
+
format!("Starts in {} min", (starts_in_secs / 60).max(1))
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
112
144
|
#[tauri::command]
|
|
113
145
|
pub async fn notify_meeting_starting(
|
|
114
146
|
app: AppHandle,
|
|
@@ -116,18 +148,30 @@ pub async fn notify_meeting_starting(
|
|
|
116
148
|
title: String,
|
|
117
149
|
starts_in_secs: i64,
|
|
118
150
|
join_url: Option<String>,
|
|
151
|
+
scheduled_start: Option<String>,
|
|
152
|
+
scheduled_end: Option<String>,
|
|
153
|
+
platform: Option<String>,
|
|
119
154
|
auto_start: Option<bool>,
|
|
155
|
+
notification_type: Option<String>,
|
|
120
156
|
) -> Result<(), String> {
|
|
121
|
-
let
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
157
|
+
let kind = notification_type
|
|
158
|
+
.as_deref()
|
|
159
|
+
.map(str::trim)
|
|
160
|
+
.filter(|s| !s.is_empty())
|
|
161
|
+
.unwrap_or("calendar");
|
|
162
|
+
let is_adhoc = kind == "adhoc";
|
|
163
|
+
let body = if is_adhoc {
|
|
164
|
+
"Take notes?".to_string()
|
|
125
165
|
} else {
|
|
126
|
-
|
|
166
|
+
format_time_range_subtitle(
|
|
167
|
+
scheduled_start.as_deref(),
|
|
168
|
+
scheduled_end.as_deref(),
|
|
169
|
+
starts_in_secs,
|
|
170
|
+
)
|
|
127
171
|
};
|
|
128
|
-
let body = format!("Starts {}", pretty_in);
|
|
129
172
|
dlog!(
|
|
130
|
-
"[clips-tray] notify_meeting_starting id={} title={} body={}",
|
|
173
|
+
"[clips-tray] notify_meeting_starting type={} id={} title={} body={}",
|
|
174
|
+
kind,
|
|
131
175
|
meeting_id,
|
|
132
176
|
title,
|
|
133
177
|
body
|
|
@@ -136,15 +180,23 @@ pub async fn notify_meeting_starting(
|
|
|
136
180
|
// Keep the latest payload available for cold overlay windows, then emit
|
|
137
181
|
// for already-mounted listeners.
|
|
138
182
|
let payload = serde_json::json!({
|
|
139
|
-
"type":
|
|
183
|
+
"type": kind,
|
|
140
184
|
"title": title,
|
|
141
185
|
"subtitle": body,
|
|
142
186
|
"meetingId": meeting_id,
|
|
143
187
|
"joinUrl": join_url,
|
|
188
|
+
"platform": platform,
|
|
189
|
+
"scheduledStart": scheduled_start,
|
|
190
|
+
"scheduledEnd": scheduled_end,
|
|
144
191
|
"autoStart": auto_start.unwrap_or(false),
|
|
145
192
|
});
|
|
146
193
|
store_pending_meeting_notification(&app, &payload);
|
|
147
194
|
let _ = app.emit("meetings:show-notification", payload.clone());
|
|
148
195
|
|
|
196
|
+
// Ensure the overlay window exists / is visible for cold starts.
|
|
197
|
+
if let Err(err) = show_meeting_notification_window(&app) {
|
|
198
|
+
eprintln!("[clips-tray] show meeting notification failed: {err}");
|
|
199
|
+
}
|
|
200
|
+
|
|
149
201
|
Ok(())
|
|
150
202
|
}
|
|
@@ -10,8 +10,8 @@ use crate::clips::{remember_voice_target, toggle_popover};
|
|
|
10
10
|
use crate::dlog;
|
|
11
11
|
use crate::state::{DictationActive, VoiceWakePopover};
|
|
12
12
|
use crate::util::{
|
|
13
|
-
hide_voice_wake_popover, is_dictation_active,
|
|
14
|
-
show_without_activation,
|
|
13
|
+
hide_voice_wake_popover, is_dictation_active, is_meeting_active, is_recording_active,
|
|
14
|
+
set_dictation_active, show_without_activation,
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
fn escape_shortcut() -> Shortcut {
|
|
@@ -513,7 +513,7 @@ pub fn build_shortcut_plugin() -> tauri_plugin_global_shortcut::Builder<tauri::W
|
|
|
513
513
|
// global shortcut stops it rather than re-opening the
|
|
514
514
|
// popover. Keeps parity with the tray-icon click
|
|
515
515
|
// behaviour in `on_tray_icon_event`.
|
|
516
|
-
if is_recording_active(app) {
|
|
516
|
+
if is_recording_active(app) && !is_meeting_active(app) {
|
|
517
517
|
let _ = app.emit("clips:recorder-stop", ());
|
|
518
518
|
} else {
|
|
519
519
|
toggle_popover(app);
|
|
@@ -341,7 +341,7 @@ fn install_call_ended_watcher(app: &AppHandle, threshold_ms: u64) {
|
|
|
341
341
|
fired = false;
|
|
342
342
|
continue;
|
|
343
343
|
}
|
|
344
|
-
let front = frontmost_bundle_id();
|
|
344
|
+
let front = crate::util::frontmost_bundle_id();
|
|
345
345
|
let is_strong_vc = front
|
|
346
346
|
.as_ref()
|
|
347
347
|
.map(|b| strong_vc_bundles.iter().any(|k| k == b))
|
|
@@ -408,27 +408,3 @@ fn audio_recently_silent(state: &tauri::State<'_, DetectorState>, threshold_ms:
|
|
|
408
408
|
.unwrap_or(false);
|
|
409
409
|
mic_silent && system_silent
|
|
410
410
|
}
|
|
411
|
-
|
|
412
|
-
#[cfg(target_os = "macos")]
|
|
413
|
-
fn frontmost_bundle_id() -> Option<String> {
|
|
414
|
-
// Lightweight shell-out to avoid extra crates: AppleScript via `osascript`
|
|
415
|
-
// returns the bundle id of the frontmost app. This avoids pulling in a
|
|
416
|
-
// full objc2 dependency just for one read.
|
|
417
|
-
use std::process::Command;
|
|
418
|
-
let out = Command::new("osascript")
|
|
419
|
-
.args([
|
|
420
|
-
"-e",
|
|
421
|
-
"tell application \"System Events\" to get bundle identifier of (first process whose frontmost is true)",
|
|
422
|
-
])
|
|
423
|
-
.output()
|
|
424
|
-
.ok()?;
|
|
425
|
-
if !out.status.success() {
|
|
426
|
-
return None;
|
|
427
|
-
}
|
|
428
|
-
let s = String::from_utf8(out.stdout).ok()?.trim().to_string();
|
|
429
|
-
if s.is_empty() {
|
|
430
|
-
None
|
|
431
|
-
} else {
|
|
432
|
-
Some(s)
|
|
433
|
-
}
|
|
434
|
-
}
|
|
@@ -34,6 +34,11 @@ pub struct RecordingActive(pub Mutex<bool>);
|
|
|
34
34
|
#[derive(Default)]
|
|
35
35
|
pub struct MeetingActive(pub Mutex<bool>);
|
|
36
36
|
|
|
37
|
+
/// Active meeting id, when meeting notes are currently running. Kept separate
|
|
38
|
+
/// from `MeetingActive` so older boolean-only state checks stay simple.
|
|
39
|
+
#[derive(Default)]
|
|
40
|
+
pub struct ActiveMeetingId(pub Mutex<Option<String>>);
|
|
41
|
+
|
|
37
42
|
#[allow(dead_code)]
|
|
38
43
|
/// Whether dictation is toggled on.
|
|
39
44
|
#[derive(Default)]
|
|
@@ -8,7 +8,7 @@ use crate::clips::{force_show_popover, toggle_popover};
|
|
|
8
8
|
use crate::dlog;
|
|
9
9
|
use crate::state::{TrayAnchor, TrayMeetings};
|
|
10
10
|
use crate::tray_meetings::{build_meetings_section, handle_meeting_menu_click, MeetingItem};
|
|
11
|
-
use crate::util::is_recording_active;
|
|
11
|
+
use crate::util::{is_meeting_active, is_recording_active};
|
|
12
12
|
use crate::TRAY_PNG;
|
|
13
13
|
|
|
14
14
|
/// Build the full tray menu with the given upcoming-meetings list. Used both
|
|
@@ -22,15 +22,18 @@ fn build_menu_with_meetings(
|
|
|
22
22
|
let meetings_submenu = build_meetings_section(app, meetings)?;
|
|
23
23
|
let show_item = MenuItem::with_id(app, "show", "Show popover", true, None::<&str>)?;
|
|
24
24
|
let recording_active = is_recording_active(app);
|
|
25
|
+
let meeting_active = is_meeting_active(app);
|
|
25
26
|
let stop_item = MenuItem::with_id(
|
|
26
27
|
app,
|
|
27
28
|
"stop",
|
|
28
|
-
if
|
|
29
|
+
if meeting_active {
|
|
30
|
+
"Stop meeting notes"
|
|
31
|
+
} else if recording_active {
|
|
29
32
|
"Stop recording"
|
|
30
33
|
} else {
|
|
31
34
|
"No active recording"
|
|
32
35
|
},
|
|
33
|
-
recording_active,
|
|
36
|
+
recording_active || meeting_active,
|
|
34
37
|
None::<&str>,
|
|
35
38
|
)?;
|
|
36
39
|
let has_last_dictation = app
|
|
@@ -132,7 +135,11 @@ pub fn build_tray(app: &tauri::App) -> Result<(), Box<dyn std::error::Error>> {
|
|
|
132
135
|
match id_ref {
|
|
133
136
|
"show" => force_show_popover(app),
|
|
134
137
|
"stop" => {
|
|
135
|
-
|
|
138
|
+
if is_meeting_active(app) {
|
|
139
|
+
let _ = app.emit("clips:pill-stop", serde_json::json!({}));
|
|
140
|
+
} else {
|
|
141
|
+
let _ = app.emit("clips:recorder-stop", ());
|
|
142
|
+
}
|
|
136
143
|
}
|
|
137
144
|
"paste-last-dictation" => {
|
|
138
145
|
let app = app.clone();
|
|
@@ -213,8 +220,13 @@ pub fn build_tray(app: &tauri::App) -> Result<(), Box<dyn std::error::Error>> {
|
|
|
213
220
|
{
|
|
214
221
|
let app = tray.app_handle();
|
|
215
222
|
let active = is_recording_active(app);
|
|
216
|
-
|
|
217
|
-
|
|
223
|
+
let meeting_active = is_meeting_active(app);
|
|
224
|
+
dlog!(
|
|
225
|
+
"[clips-tray] tray click — is_recording_active={} is_meeting_active={}",
|
|
226
|
+
active,
|
|
227
|
+
meeting_active
|
|
228
|
+
);
|
|
229
|
+
if active && !meeting_active {
|
|
218
230
|
let _ = app.emit("clips:recorder-stop", ());
|
|
219
231
|
} else {
|
|
220
232
|
toggle_popover(app);
|
|
@@ -5,7 +5,7 @@ use crate::state::{
|
|
|
5
5
|
DictationActive, PopoverShownAt, RecordingActive, TrayAnchor, VoiceWakePopover,
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
-
const POPOVER_SHADOW_GUTTER_LOGICAL: f64 =
|
|
8
|
+
const POPOVER_SHADOW_GUTTER_LOGICAL: f64 = 24.0;
|
|
9
9
|
const POPOVER_DEFAULT_WIDTH_LOGICAL: f64 = 360.0;
|
|
10
10
|
const POPOVER_DEFAULT_HEIGHT_LOGICAL: f64 = 520.0;
|
|
11
11
|
|
|
@@ -425,6 +425,41 @@ pub fn is_recording_active(app: &AppHandle) -> bool {
|
|
|
425
425
|
.unwrap_or(false)
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
+
pub fn is_meeting_active(app: &AppHandle) -> bool {
|
|
429
|
+
use crate::state::MeetingActive;
|
|
430
|
+
app.try_state::<MeetingActive>()
|
|
431
|
+
.and_then(|s| s.0.lock().ok().map(|g| *g))
|
|
432
|
+
.unwrap_or(false)
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/// Bundle id of the frontmost macOS app, or `None` on failure / non-macOS.
|
|
436
|
+
/// Uses a lightweight `osascript` shell-out so callers don't need objc2.
|
|
437
|
+
#[cfg(target_os = "macos")]
|
|
438
|
+
pub fn frontmost_bundle_id() -> Option<String> {
|
|
439
|
+
use std::process::Command;
|
|
440
|
+
let out = Command::new("osascript")
|
|
441
|
+
.args([
|
|
442
|
+
"-e",
|
|
443
|
+
"tell application \"System Events\" to get bundle identifier of (first process whose frontmost is true)",
|
|
444
|
+
])
|
|
445
|
+
.output()
|
|
446
|
+
.ok()?;
|
|
447
|
+
if !out.status.success() {
|
|
448
|
+
return None;
|
|
449
|
+
}
|
|
450
|
+
let s = String::from_utf8(out.stdout).ok()?.trim().to_string();
|
|
451
|
+
if s.is_empty() {
|
|
452
|
+
None
|
|
453
|
+
} else {
|
|
454
|
+
Some(s)
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
#[cfg(not(target_os = "macos"))]
|
|
459
|
+
pub fn frontmost_bundle_id() -> Option<String> {
|
|
460
|
+
None
|
|
461
|
+
}
|
|
462
|
+
|
|
428
463
|
pub fn set_dictation_active(app: &AppHandle, active: bool) {
|
|
429
464
|
if let Some(state) = app.try_state::<DictationActive>() {
|
|
430
465
|
if let Ok(mut g) = state.0.lock() {
|
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
"@types/node": "^24.2.1",
|
|
72
72
|
"@types/react": "catalog:",
|
|
73
73
|
"@types/react-dom": "catalog:",
|
|
74
|
-
"@typescript/native-preview": "catalog:",
|
|
75
74
|
"@xterm/addon-fit": "^0.11.0",
|
|
76
75
|
"@xterm/addon-web-links": "^0.12.0",
|
|
77
76
|
"@xterm/xterm": "^6.0.0",
|
|
@@ -93,7 +92,8 @@
|
|
|
93
92
|
"tailwind-merge": "^3.5.0",
|
|
94
93
|
"tailwindcss": "catalog:",
|
|
95
94
|
"tsx": "^4.20.3",
|
|
96
|
-
"typescript": "
|
|
95
|
+
"typescript": "catalog:",
|
|
96
|
+
"typescript-7": "catalog:",
|
|
97
97
|
"vaul": "^1.1.2",
|
|
98
98
|
"vite": "catalog:",
|
|
99
99
|
"vitest": "catalog:"
|
|
@@ -28,7 +28,19 @@ Not all modifications are equal. Use this to decide what level of care is needed
|
|
|
28
28
|
| 1: Data | Files in `data/` | JSON state, generated content, markdown | Nothing — these are routine |
|
|
29
29
|
| 2: Source | App code | Components, routes, styles, scripts | Run `pnpm typecheck && pnpm lint` |
|
|
30
30
|
| 3: Config | Project config | `package.json`, `tsconfig.json`, `vite.config.*` | Ask for explicit approval first |
|
|
31
|
-
| 4: Off limits | Secrets and framework | `.env`, `@agent-native
|
|
31
|
+
| 4: Off limits | Secrets and framework | `.env`, `@agent-native/*` packages & overrides | Never modify these |
|
|
32
|
+
|
|
33
|
+
Tier 4 includes **all** of the following — not only editing package source:
|
|
34
|
+
|
|
35
|
+
- Files under `node_modules/@agent-native/*` (core, dispatch, scheduling, …)
|
|
36
|
+
- `pnpm.overrides`, `overrides`, `resolutions`, or `patchedDependencies` that
|
|
37
|
+
target any `@agent-native/*` package
|
|
38
|
+
- Local patches, vendored copies, or invented "dispatch/core behavior"
|
|
39
|
+
shims meant to paper over a version skew or failed upgrade
|
|
40
|
+
|
|
41
|
+
When an older branch needs current packages, use **`agent-native upgrade`**
|
|
42
|
+
(see the `upgrade-agent-native` skill). If upgrade or typecheck fails, fix
|
|
43
|
+
**app** code or stop and ask — do not patch the framework.
|
|
32
44
|
|
|
33
45
|
## Git Checkpoint Pattern
|
|
34
46
|
|
|
@@ -74,13 +86,19 @@ inline strings in components.
|
|
|
74
86
|
## Don't
|
|
75
87
|
|
|
76
88
|
- Don't modify `.env` files or files containing secrets
|
|
77
|
-
- Don't modify `@agent-native/core
|
|
89
|
+
- Don't modify `@agent-native/core`, `@agent-native/dispatch`, or other
|
|
90
|
+
`@agent-native/*` package internals (including under `node_modules`)
|
|
91
|
+
- Don't add `pnpm.overrides` / `patchedDependencies` / `resolutions` for
|
|
92
|
+
`@agent-native/*` to "make the app run" after a version bump
|
|
93
|
+
- Don't invent local dispatch/core behavior overrides when upgrade fails —
|
|
94
|
+
run `npx @agent-native/core@latest upgrade`, then fix app-level errors only
|
|
78
95
|
- Don't modify `.agents/skills/` or `AGENTS.md` unless explicitly requested
|
|
79
96
|
- Don't skip the typecheck/lint step after editing source code
|
|
80
97
|
- Don't make source changes without a git checkpoint to roll back to
|
|
81
98
|
|
|
82
99
|
## Related Skills
|
|
83
100
|
|
|
101
|
+
- **upgrade-agent-native** — supported path to bring an older app/workspace current
|
|
84
102
|
- **storing-data** — Tier 1 modifications (data files) are the safest and most common
|
|
85
103
|
- **actions** — The agent can create or modify actions to add new capabilities
|
|
86
104
|
- **delegate-to-agent** — Self-modification requests come through the agent chat
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: upgrade-agent-native
|
|
3
|
+
description: >-
|
|
4
|
+
Bring an older Agent Native app or workspace current. Use when updating
|
|
5
|
+
@agent-native/core, fixing a broken upgrade, or when tempted to patch or
|
|
6
|
+
override core/dispatch packages to make an old branch run.
|
|
7
|
+
scope: dev
|
|
8
|
+
metadata:
|
|
9
|
+
internal: true
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Upgrade Agent Native
|
|
13
|
+
|
|
14
|
+
## Rule
|
|
15
|
+
|
|
16
|
+
When an older Agent Native app/branch needs to run on current packages, use
|
|
17
|
+
`agent-native upgrade`. Never "fix" upgrade breakage with
|
|
18
|
+
`pnpm.overrides`, `patchedDependencies`, `resolutions`, local patches, or
|
|
19
|
+
edits under `node_modules/@agent-native/*` — especially not against
|
|
20
|
+
`@agent-native/core` or `@agent-native/dispatch`.
|
|
21
|
+
|
|
22
|
+
## Why
|
|
23
|
+
|
|
24
|
+
Agents often respond to a failed core bump by inventing framework patches and
|
|
25
|
+
dispatch behavior overrides. That hides the real app-level break, drifts from
|
|
26
|
+
upstream, and makes the next upgrade worse. The supported path is bump →
|
|
27
|
+
install → refresh scaffold skills → verify, then fix **app** code only.
|
|
28
|
+
|
|
29
|
+
## How
|
|
30
|
+
|
|
31
|
+
1. **Doctor first (optional but recommended)**
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx @agent-native/core@latest upgrade check
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This reports framework overrides/patches and pending `@agent-native/*`
|
|
38
|
+
bumps. If overrides/patches are present, remove them before continuing.
|
|
39
|
+
|
|
40
|
+
2. **Run the upgrade**
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx @agent-native/core@latest upgrade
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Or from an already-installed CLI: `pnpm exec agent-native upgrade` /
|
|
47
|
+
`agent-native upgrade`.
|
|
48
|
+
|
|
49
|
+
What it does:
|
|
50
|
+
|
|
51
|
+
- Blocks (unless `--force`) when `@agent-native/*` overrides/patches exist
|
|
52
|
+
- Rewrites non-local `@agent-native/*` dependency pins to `latest`
|
|
53
|
+
- Runs the package manager install
|
|
54
|
+
- Runs `skills update scaffold --project`
|
|
55
|
+
- Runs `typecheck` when the project has that script
|
|
56
|
+
|
|
57
|
+
3. **If upgrade or typecheck fails**
|
|
58
|
+
|
|
59
|
+
- Read the concrete error
|
|
60
|
+
- Fix **app** source, actions, config, or env — not framework packages
|
|
61
|
+
- Re-run `agent-native upgrade` or `pnpm typecheck`
|
|
62
|
+
- Stop and ask the user if you cannot fix the app-level error
|
|
63
|
+
|
|
64
|
+
4. **Dry-run / partial runs**
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
agent-native upgrade --dry-run
|
|
68
|
+
agent-native upgrade --skip-verify
|
|
69
|
+
agent-native upgrade --skip-install # package.json bumps only
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Don't
|
|
73
|
+
|
|
74
|
+
- Don't add `pnpm.overrides`, `overrides`, `resolutions`, or
|
|
75
|
+
`patchedDependencies` for any `@agent-native/*` package
|
|
76
|
+
- Don't edit `node_modules/@agent-native/core` or
|
|
77
|
+
`node_modules/@agent-native/dispatch`
|
|
78
|
+
- Don't invent local "dispatch behavior" shims to paper over version skew
|
|
79
|
+
- Don't keep iterating with more framework patches after a failed install
|
|
80
|
+
- Don't skip `skills update scaffold --project` after a core bump (the
|
|
81
|
+
upgrade command does this for you)
|
|
82
|
+
|
|
83
|
+
## Related Skills
|
|
84
|
+
|
|
85
|
+
- **self-modifying-code** — Tier 4: framework packages are off limits
|
|
86
|
+
- **agent-native-docs** — version-matched docs after the bump
|
|
87
|
+
- **portability** — keep app code provider-agnostic across upgrades
|
|
@@ -59,8 +59,9 @@ const BUILDER_CMS_DEFAULT_READ_LIMIT = 500;
|
|
|
59
59
|
const BUILDER_CMS_MAX_READ_LIMIT = 1000;
|
|
60
60
|
const BUILDER_CMS_PAGE_SIZE = 100;
|
|
61
61
|
const BUILDER_CMS_READ_RETRIES = 2;
|
|
62
|
-
const
|
|
63
|
-
"id,name,published,lastUpdated,createdDate,data.title,data.handle,data.url,data.slug,data.date,data.description,data.status,data.author,data.image
|
|
62
|
+
const BUILDER_CMS_METADATA_ENTRY_FIELDS =
|
|
63
|
+
"id,name,published,lastUpdated,createdDate,data.title,data.handle,data.url,data.slug,data.date,data.description,data.status,data.author,data.image";
|
|
64
|
+
const BUILDER_CMS_BODY_ENTRY_FIELDS = `${BUILDER_CMS_METADATA_ENTRY_FIELDS},data.blocks,data.blocksString`;
|
|
64
65
|
|
|
65
66
|
function builderContentApiHost() {
|
|
66
67
|
return (
|
|
@@ -489,7 +490,7 @@ async function readBuilderCmsContentEntriesViaMcp(args: {
|
|
|
489
490
|
modelName: args.model,
|
|
490
491
|
limit: pageLimit,
|
|
491
492
|
offset,
|
|
492
|
-
fields:
|
|
493
|
+
fields: BUILDER_CMS_METADATA_ENTRY_FIELDS,
|
|
493
494
|
enrich: true,
|
|
494
495
|
},
|
|
495
496
|
},
|
|
@@ -599,7 +600,7 @@ async function readBuilderCmsContentEntriesViaMcp(args: {
|
|
|
599
600
|
modelName: args.model,
|
|
600
601
|
limit: 1,
|
|
601
602
|
query: { id: entry.id },
|
|
602
|
-
fields:
|
|
603
|
+
fields: BUILDER_CMS_METADATA_ENTRY_FIELDS,
|
|
603
604
|
enrich: true,
|
|
604
605
|
},
|
|
605
606
|
},
|
|
@@ -649,6 +650,7 @@ async function readBuilderCmsContentEntriesViaContentApi(args: {
|
|
|
649
650
|
// bare reference id.
|
|
650
651
|
url.searchParams.set("enrich", "true");
|
|
651
652
|
url.searchParams.set("noCache", "true");
|
|
653
|
+
url.searchParams.set("fields", BUILDER_CMS_METADATA_ENTRY_FIELDS);
|
|
652
654
|
|
|
653
655
|
const limit = readLimit(args.limit);
|
|
654
656
|
const startOffset =
|
|
@@ -814,7 +816,7 @@ export async function readBuilderCmsContentEntry(args: {
|
|
|
814
816
|
url.searchParams.set("enrich", "true");
|
|
815
817
|
url.searchParams.set("noCache", "true");
|
|
816
818
|
url.searchParams.set("cachebust", String(Date.now()));
|
|
817
|
-
url.searchParams.set("fields",
|
|
819
|
+
url.searchParams.set("fields", BUILDER_CMS_BODY_ENTRY_FIELDS);
|
|
818
820
|
|
|
819
821
|
const response = await fetchBuilderContentPage({
|
|
820
822
|
fetchImpl: args.fetchImpl ?? fetch,
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { getUserSetting } from "@agent-native/core/settings";
|
|
2
|
+
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { and, eq, isNull } from "drizzle-orm";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
6
|
+
import { getDb, schema } from "../server/db/index.js";
|
|
7
|
+
|
|
8
|
+
export const PERSONAL_DATABASE_VIEW_OVERRIDES_VERSION = 1;
|
|
9
|
+
|
|
10
|
+
export const personalDatabaseViewSettingKey = (databaseId: string) =>
|
|
11
|
+
`content-database-personal-view:${databaseId}`;
|
|
12
|
+
|
|
13
|
+
export const sortSchema = z.object({
|
|
14
|
+
key: z.string(),
|
|
15
|
+
label: z.string(),
|
|
16
|
+
direction: z.enum(["asc", "desc"]),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const filterSchema = z.object({
|
|
20
|
+
key: z.string(),
|
|
21
|
+
label: z.string(),
|
|
22
|
+
operator: z.enum([
|
|
23
|
+
"contains",
|
|
24
|
+
"equals",
|
|
25
|
+
"does_not_equal",
|
|
26
|
+
"greater_than",
|
|
27
|
+
"less_than",
|
|
28
|
+
"before",
|
|
29
|
+
"after",
|
|
30
|
+
"between",
|
|
31
|
+
"is_checked",
|
|
32
|
+
"is_unchecked",
|
|
33
|
+
"is_empty",
|
|
34
|
+
"is_not_empty",
|
|
35
|
+
]),
|
|
36
|
+
value: z.string(),
|
|
37
|
+
filterGroupId: z.string().optional(),
|
|
38
|
+
parentFilterGroupId: z.string().optional(),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export const personalViewOverridesSchema = z.object({
|
|
42
|
+
version: z.literal(PERSONAL_DATABASE_VIEW_OVERRIDES_VERSION),
|
|
43
|
+
activeViewId: z.string().optional(),
|
|
44
|
+
views: z.array(
|
|
45
|
+
z.object({
|
|
46
|
+
id: z.string(),
|
|
47
|
+
sorts: z.array(sortSchema).default([]),
|
|
48
|
+
filters: z.array(filterSchema).default([]),
|
|
49
|
+
filterMode: z.enum(["and", "or"]).default("and"),
|
|
50
|
+
}),
|
|
51
|
+
),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export async function assertContentDatabaseViewerAccess(databaseId: string) {
|
|
55
|
+
const db = getDb();
|
|
56
|
+
const [database] = await db
|
|
57
|
+
.select()
|
|
58
|
+
.from(schema.contentDatabases)
|
|
59
|
+
.where(
|
|
60
|
+
and(
|
|
61
|
+
eq(schema.contentDatabases.id, databaseId),
|
|
62
|
+
isNull(schema.contentDatabases.deletedAt),
|
|
63
|
+
),
|
|
64
|
+
);
|
|
65
|
+
if (!database) throw new Error(`Database "${databaseId}" not found`);
|
|
66
|
+
|
|
67
|
+
await assertAccess("document", database.documentId, "viewer");
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export async function readPersonalDatabaseViewOverrides(
|
|
71
|
+
userEmail: string,
|
|
72
|
+
databaseId: string,
|
|
73
|
+
) {
|
|
74
|
+
const stored = await getUserSetting(
|
|
75
|
+
userEmail,
|
|
76
|
+
personalDatabaseViewSettingKey(databaseId),
|
|
77
|
+
);
|
|
78
|
+
const parsed = personalViewOverridesSchema.safeParse(stored);
|
|
79
|
+
return parsed.success ? parsed.data : null;
|
|
80
|
+
}
|