@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
|
@@ -89,7 +89,7 @@ Read the `actions` skill. The rules that matter most here:
|
|
|
89
89
|
|
|
90
90
|
## Verify
|
|
91
91
|
|
|
92
|
-
1. `agent-native typecheck` (or `
|
|
92
|
+
1. `agent-native typecheck` (or `tsc --noEmit`) passes.
|
|
93
93
|
2. From the agent chat, invoke the new action and confirm structured
|
|
94
94
|
input/output.
|
|
95
95
|
3. From the UI, confirm the `useActionQuery` / `useActionMutation` path works and
|
|
@@ -66,7 +66,7 @@ Study the existing adapters as the pattern to copy:
|
|
|
66
66
|
|
|
67
67
|
## Verify
|
|
68
68
|
|
|
69
|
-
1. `
|
|
69
|
+
1. `tsc --noEmit` for `@agent-native/core` passes.
|
|
70
70
|
2. `discord.spec.ts` passes (`vitest --run src/integrations/adapters/discord`).
|
|
71
71
|
3. End-to-end smoke: send a signed test interaction to
|
|
72
72
|
`/_agent-native/integrations/discord/webhook`; confirm a `200` returns
|
|
@@ -79,7 +79,7 @@ The substrate lives in `@agent-native/core/provider-api`:
|
|
|
79
79
|
|
|
80
80
|
## Verify
|
|
81
81
|
|
|
82
|
-
1. `agent-native typecheck` (or `
|
|
82
|
+
1. `agent-native typecheck` (or `tsc --noEmit`) passes.
|
|
83
83
|
2. With a placeholder `STRIPE_SECRET_KEY` set, ask the agent: "list my 5 most
|
|
84
84
|
recent Stripe charges." Confirm it calls `provider-api-catalog` →
|
|
85
85
|
(optionally) `provider-api-docs` → `provider-api-request` against
|
|
@@ -70,7 +70,7 @@ augment `env` with the parent's environment and never see app secrets.
|
|
|
70
70
|
|
|
71
71
|
## Verify
|
|
72
72
|
|
|
73
|
-
1. `
|
|
73
|
+
1. `tsc --noEmit` for `@agent-native/core` passes.
|
|
74
74
|
2. `docker-adapter.spec.ts` passes.
|
|
75
75
|
3. With Docker available, set `AGENT_NATIVE_SANDBOX=docker` and run a `run-code`
|
|
76
76
|
task that uses `appAction`/`providerFetch` through the loopback bridge;
|
package/corpus/README.md
CHANGED
package/corpus/core/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @agent-native/core
|
|
2
2
|
|
|
3
|
+
## 0.92.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 680b1eb: Show plain-English thinking in chat, Codex-style tool rows with modal output, and collapse finished work into a "Worked for" summary.
|
|
8
|
+
- 680b1eb: Add `agent-native upgrade` (with `upgrade check` doctor) so older apps can bump `@agent-native/*`, refresh scaffold skills, and verify without inventing core/dispatch patches or overrides. Harden self-modifying-code / AGENTS guidance, discover workspace packages from `pnpm-workspace.yaml`, and ship the `upgrade-agent-native` skill.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 680b1eb: Keep plan-mode blocked tools visible and discoverable as blocked stubs, preload common provider tools in lean agent runs, steer extension edits away from repeated large content scans, and let raw JSON Schema tool inputs recover from common scalar string values without poisoning read-only duplicate caches.
|
|
13
|
+
- 680b1eb: Compact repeated tool-search results and unchanged extension content within a single agent run to preserve context, while keeping schema-including tool searches repeatable when the agent explicitly asks for schemas.
|
|
14
|
+
- 680b1eb: Always register Slack/webhook/email notification channels, prefer delivery-only per-notification webhook URLs, and avoid applying workspace auth headers to override destinations.
|
|
15
|
+
- 680b1eb: Stop rewriting session-replay Meta and ViewportResize dimensions at capture so stored frames stay aligned with the FullSnapshot DOM, while display sizing still clamps extreme aspect ratios.
|
|
16
|
+
- 680b1eb: Render Agent settings sections as polished card surfaces on full settings pages while keeping the sidebar settings panel compact.
|
|
17
|
+
- Updated dependencies [680b1eb]
|
|
18
|
+
- @agent-native/toolkit@0.4.4
|
|
19
|
+
|
|
20
|
+
## 0.91.2
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 823d635: Add a friendly label for the Calendar `calendar.event-detail.bottom` ExtensionSlot so the empty-slot affordance matches Mail's contact sidebar pattern.
|
|
25
|
+
- 823d635: Surface outbound delivery-queue health on Destinations and add quiet overview shortcuts so cleaned-up overview capabilities stay discoverable without restoring the old dashboard. Localize those overview shortcut and delivery-queue labels across Dispatch locales.
|
|
26
|
+
- 823d635: Attribute recurring job and automation LLM usage to task-specific usage labels.
|
|
27
|
+
- 823d635: Clamp absurd session-replay Meta and ViewportResize dimensions at capture so ultra-wide frames are never stored.
|
|
28
|
+
- 823d635: Align run-slot liveness with the stale reaper and surface repeated heartbeat write failures.
|
|
29
|
+
- 823d635: Upgrade the workspace toolchain to TypeScript 7 (`tsc`) with a side-by-side TypeScript 6 API package for tools that still need programmatic access. Replace `@typescript/native-preview` / `tsgo` with the stable `typescript` 7 release.
|
|
30
|
+
- Updated dependencies [823d635]
|
|
31
|
+
- Updated dependencies [823d635]
|
|
32
|
+
- @agent-native/toolkit@0.4.3
|
|
33
|
+
|
|
3
34
|
## 0.91.1
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -89,7 +89,7 @@ Read the `actions` skill. The rules that matter most here:
|
|
|
89
89
|
|
|
90
90
|
## Verify
|
|
91
91
|
|
|
92
|
-
1. `agent-native typecheck` (or `
|
|
92
|
+
1. `agent-native typecheck` (or `tsc --noEmit`) passes.
|
|
93
93
|
2. From the agent chat, invoke the new action and confirm structured
|
|
94
94
|
input/output.
|
|
95
95
|
3. From the UI, confirm the `useActionQuery` / `useActionMutation` path works and
|
|
@@ -66,7 +66,7 @@ Study the existing adapters as the pattern to copy:
|
|
|
66
66
|
|
|
67
67
|
## Verify
|
|
68
68
|
|
|
69
|
-
1. `
|
|
69
|
+
1. `tsc --noEmit` for `@agent-native/core` passes.
|
|
70
70
|
2. `discord.spec.ts` passes (`vitest --run src/integrations/adapters/discord`).
|
|
71
71
|
3. End-to-end smoke: send a signed test interaction to
|
|
72
72
|
`/_agent-native/integrations/discord/webhook`; confirm a `200` returns
|
|
@@ -79,7 +79,7 @@ The substrate lives in `@agent-native/core/provider-api`:
|
|
|
79
79
|
|
|
80
80
|
## Verify
|
|
81
81
|
|
|
82
|
-
1. `agent-native typecheck` (or `
|
|
82
|
+
1. `agent-native typecheck` (or `tsc --noEmit`) passes.
|
|
83
83
|
2. With a placeholder `STRIPE_SECRET_KEY` set, ask the agent: "list my 5 most
|
|
84
84
|
recent Stripe charges." Confirm it calls `provider-api-catalog` →
|
|
85
85
|
(optionally) `provider-api-docs` → `provider-api-request` against
|
|
@@ -70,7 +70,7 @@ augment `env` with the parent's environment and never see app secrets.
|
|
|
70
70
|
|
|
71
71
|
## Verify
|
|
72
72
|
|
|
73
|
-
1. `
|
|
73
|
+
1. `tsc --noEmit` for `@agent-native/core` passes.
|
|
74
74
|
2. `docker-adapter.spec.ts` passes.
|
|
75
75
|
3. With Docker available, set `AGENT_NATIVE_SANDBOX=docker` and run a `run-code`
|
|
76
76
|
task that uses `appAction`/`providerFetch` through the loopback bridge;
|
|
@@ -227,6 +227,23 @@ SSE gives same-process writes an immediate path to the browser, and a lightweigh
|
|
|
227
227
|
|
|
228
228
|
AI is non-deterministic, so you need conversation flow to give feedback and iterate — not one-shot buttons — and the agent already has your codebase, instructions, skills, and history that an inline call lacks. Routing everything through the agent is also what lets the app be driven from Slack, Telegram, or another agent. See [Key Concepts — Agent chat bridge](/docs/key-concepts#agent-chat-bridge).
|
|
229
229
|
|
|
230
|
+
### How do I upgrade an older Agent Native app? {#upgrade-older-app}
|
|
231
|
+
|
|
232
|
+
Run the supported upgrade path from the app or workspace root:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
npx @agent-native/core@latest upgrade
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
That bumps `@agent-native/*` dependencies to `latest`, installs, refreshes
|
|
239
|
+
scaffold skills (`skills update scaffold --project`), and runs typecheck when
|
|
240
|
+
available. Use `upgrade check` first if you want a doctor-only report of
|
|
241
|
+
framework overrides/patches and pending bumps.
|
|
242
|
+
|
|
243
|
+
Do **not** fix a broken upgrade with `pnpm.overrides`, `patchedDependencies`,
|
|
244
|
+
or edits under `node_modules/@agent-native/*` (especially core/dispatch). If
|
|
245
|
+
upgrade or typecheck fails, fix app-level code or ask — then re-run upgrade.
|
|
246
|
+
|
|
230
247
|
### Why is this a framework and not a library? {#why-framework-not-library}
|
|
231
248
|
|
|
232
249
|
The shared database, live sync, actions system, and application state only work because they're wired together from the ground up — the UI reacts to agent changes instantly, agents communicate, and the agent understands what the user is looking at. A library gives you pieces; this is an architecture. See [Key Concepts](/docs/key-concepts).
|
|
@@ -108,12 +108,18 @@ Severity drives the badge styling in the dropdown and is passed through to chann
|
|
|
108
108
|
|
|
109
109
|
## Built-in channels {#channels}
|
|
110
110
|
|
|
111
|
-
| Channel | Delivery | Requires
|
|
112
|
-
| --------- | --------------------------------------------------------- |
|
|
113
|
-
| `inbox` | Persists to the `notifications` table; drives the bell UI | Always on — part of the primitive.
|
|
114
|
-
| `
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
| Channel | Delivery | Requires |
|
|
112
|
+
| --------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
113
|
+
| `inbox` | Persists to the `notifications` table; drives the bell UI | Always on — part of the primitive. |
|
|
114
|
+
| `email` | Sends email via Resend/SendGrid | Per-notification `metadata.emailRecipients` and/or `NOTIFICATIONS_EMAIL_RECIPIENTS`. |
|
|
115
|
+
| `slack` | POST Slack Block Kit JSON to an incoming webhook | Per-notification `metadata.slackWebhookUrl` and/or `NOTIFICATIONS_SLACK_WEBHOOK_URL`. |
|
|
116
|
+
| `webhook` | POST JSON to a configured URL | Per-notification `metadata.webhookUrl` and/or `NOTIFICATIONS_WEBHOOK_URL`. |
|
|
117
|
+
|
|
118
|
+
Slack and webhook are always registered. Delivery prefers the per-notification
|
|
119
|
+
metadata URL, then falls back to the matching env var. If neither is set, that
|
|
120
|
+
channel no-ops for the emission.
|
|
121
|
+
|
|
122
|
+
The webhook and Slack channels resolve `${keys.NAME}` references in both the URL and `NOTIFICATIONS_*_AUTH` against the owner's ad-hoc [secrets](/docs/security), so the raw value never enters the agent's context. Per-key URL allowlists are enforced — same rule the automations `web-request` tool uses.
|
|
117
123
|
|
|
118
124
|
<Diagram id="doc-block-1lduyog" title="Channels and severity" summary={"inbox is always on; webhook needs an env var; custom channels register at startup. Severity drives badge styling and is passed through to every channel."}>
|
|
119
125
|
|
package/corpus/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.92.0",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -227,9 +227,9 @@
|
|
|
227
227
|
"provenance": true
|
|
228
228
|
},
|
|
229
229
|
"scripts": {
|
|
230
|
-
"build": "
|
|
231
|
-
"dev": "
|
|
232
|
-
"typecheck": "
|
|
230
|
+
"build": "tsc && tsc -p tsconfig.cli.json && node scripts/finalize-build.mjs && node scripts/check-dist-imports.mjs",
|
|
231
|
+
"dev": "tsc --watch",
|
|
232
|
+
"typecheck": "tsc --noEmit",
|
|
233
233
|
"test": "vitest --run src --maxWorkers=25%",
|
|
234
234
|
"prepack": "tsx ../../scripts/sync-workspace-core-skills.ts --check && npm run build && cp ../../README.md ./README.md",
|
|
235
235
|
"prepublishOnly": "npm run build"
|
|
@@ -367,7 +367,8 @@
|
|
|
367
367
|
"react-dom": "^19.2.7",
|
|
368
368
|
"react-router": "^8.1.0",
|
|
369
369
|
"tailwindcss": "catalog:",
|
|
370
|
-
"typescript": "
|
|
370
|
+
"typescript": "catalog:",
|
|
371
|
+
"typescript-7": "catalog:",
|
|
371
372
|
"vite": "catalog:",
|
|
372
373
|
"vitest": "^4.1.5",
|
|
373
374
|
"ws": "^8.18.0"
|
|
@@ -824,6 +824,23 @@ function createPlanModeBashAction(entry: ActionEntry): ActionEntry {
|
|
|
824
824
|
};
|
|
825
825
|
}
|
|
826
826
|
|
|
827
|
+
function createPlanModeBlockedAction(
|
|
828
|
+
name: string,
|
|
829
|
+
entry: ActionEntry,
|
|
830
|
+
reason?: string,
|
|
831
|
+
): ActionEntry {
|
|
832
|
+
return {
|
|
833
|
+
...entry,
|
|
834
|
+
allowInPlanMode: false,
|
|
835
|
+
readOnly: true,
|
|
836
|
+
tool: {
|
|
837
|
+
...entry.tool,
|
|
838
|
+
description: `${entry.tool.description}\n\nPlan mode blocked: ${reason ?? "not available while planning"}.`,
|
|
839
|
+
},
|
|
840
|
+
run: async () => planModeBlockedMessage(name, reason),
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
|
|
827
844
|
export function createPlanModeActionRegistry(
|
|
828
845
|
actions: Record<string, ActionEntry>,
|
|
829
846
|
): Record<string, ActionEntry> {
|
|
@@ -831,8 +848,22 @@ export function createPlanModeActionRegistry(
|
|
|
831
848
|
|
|
832
849
|
for (const [name, entry] of Object.entries(actions)) {
|
|
833
850
|
if (name === TOOL_SEARCH_ACTION_NAME) continue;
|
|
834
|
-
if (entry.allowInPlanMode === false)
|
|
835
|
-
|
|
851
|
+
if (entry.allowInPlanMode === false) {
|
|
852
|
+
filtered[name] = createPlanModeBlockedAction(
|
|
853
|
+
name,
|
|
854
|
+
entry,
|
|
855
|
+
"not available while planning",
|
|
856
|
+
);
|
|
857
|
+
continue;
|
|
858
|
+
}
|
|
859
|
+
if (PLAN_MODE_BLOCKED_READONLY_TOOLS.has(name)) {
|
|
860
|
+
filtered[name] = createPlanModeBlockedAction(
|
|
861
|
+
name,
|
|
862
|
+
entry,
|
|
863
|
+
"not available while planning",
|
|
864
|
+
);
|
|
865
|
+
continue;
|
|
866
|
+
}
|
|
836
867
|
|
|
837
868
|
const allowedActions = PLAN_MODE_ALLOWED_ACTIONS[name];
|
|
838
869
|
if (allowedActions) {
|
|
@@ -852,6 +883,12 @@ export function createPlanModeActionRegistry(
|
|
|
852
883
|
|
|
853
884
|
if (entry.readOnly === true) {
|
|
854
885
|
filtered[name] = entry;
|
|
886
|
+
} else {
|
|
887
|
+
filtered[name] = createPlanModeBlockedAction(
|
|
888
|
+
name,
|
|
889
|
+
entry,
|
|
890
|
+
"write or side-effecting tool",
|
|
891
|
+
);
|
|
855
892
|
}
|
|
856
893
|
}
|
|
857
894
|
|
|
@@ -965,7 +1002,10 @@ export interface ProductionAgentOptions {
|
|
|
965
1002
|
* only these tool schemas plus `tool-search`; the full action registry remains
|
|
966
1003
|
* searchable, and matching tool schemas from `tool-search` results are added
|
|
967
1004
|
* to the next model request. This keeps first-token latency low without
|
|
968
|
-
* forcing rarely used capabilities into every prompt.
|
|
1005
|
+
* forcing rarely used capabilities into every prompt. The framework also
|
|
1006
|
+
* promotes common provider/corpus/code-execution tools when the current
|
|
1007
|
+
* app/mode registry exposes them, so prompts that teach broad integrations do
|
|
1008
|
+
* not describe tools that require an extra discovery turn before use.
|
|
969
1009
|
*/
|
|
970
1010
|
initialToolNames?: string[];
|
|
971
1011
|
/**
|
|
@@ -2066,6 +2106,7 @@ function isReusableReadOnlyToolResult(part: EngineToolResultPart): boolean {
|
|
|
2066
2106
|
const lower = part.content.trim().toLowerCase();
|
|
2067
2107
|
if (!lower) return false;
|
|
2068
2108
|
return !(
|
|
2109
|
+
lower.startsWith("invalid action parameters for ") ||
|
|
2069
2110
|
lower.startsWith("error running ") ||
|
|
2070
2111
|
lower.includes("run aborted") ||
|
|
2071
2112
|
lower.includes("tool call timed out") ||
|
|
@@ -2151,16 +2192,74 @@ export function actionsToEngineTools(
|
|
|
2151
2192
|
return tools;
|
|
2152
2193
|
}
|
|
2153
2194
|
|
|
2154
|
-
function filterInitialEngineTools(
|
|
2195
|
+
export function filterInitialEngineTools(
|
|
2155
2196
|
tools: EngineTool[],
|
|
2156
2197
|
initialToolNames?: string[],
|
|
2157
2198
|
): EngineTool[] {
|
|
2158
2199
|
if (!initialToolNames) return tools;
|
|
2159
2200
|
const names = new Set(initialToolNames);
|
|
2160
2201
|
names.add(TOOL_SEARCH_ACTION_NAME);
|
|
2202
|
+
for (const tool of tools) {
|
|
2203
|
+
if (isDefaultLeanInitialToolName(tool.name)) {
|
|
2204
|
+
names.add(tool.name);
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2161
2207
|
return tools.filter((tool) => names.has(tool.name));
|
|
2162
2208
|
}
|
|
2163
2209
|
|
|
2210
|
+
const DEFAULT_LEAN_INITIAL_TOOL_NAMES = new Set([
|
|
2211
|
+
// Broad provider/API/corpus primitives should be callable as soon as the
|
|
2212
|
+
// prompt teaches them; waiting for a discovery round-trip caused prod runs to
|
|
2213
|
+
// waste turns on provider work that was described but not loaded.
|
|
2214
|
+
"data-source-status",
|
|
2215
|
+
"provider-api-catalog",
|
|
2216
|
+
"provider-api-docs",
|
|
2217
|
+
"provider-api-request",
|
|
2218
|
+
"provider-corpus-job",
|
|
2219
|
+
"provider-corpus-jobs",
|
|
2220
|
+
"query-staged-dataset",
|
|
2221
|
+
"list-staged-datasets",
|
|
2222
|
+
"delete-staged-dataset",
|
|
2223
|
+
"run-code",
|
|
2224
|
+
"get-code-execution",
|
|
2225
|
+
"list-extensions",
|
|
2226
|
+
"get-extension",
|
|
2227
|
+
"update-extension",
|
|
2228
|
+
"list-extension-history",
|
|
2229
|
+
"get-extension-history-version",
|
|
2230
|
+
// Common first-class integration shortcuts. These are included only when the
|
|
2231
|
+
// current app/mode registry actually exposes them.
|
|
2232
|
+
"bigquery",
|
|
2233
|
+
"search-bigquery-schema",
|
|
2234
|
+
"bigquery-table-info",
|
|
2235
|
+
"ga4",
|
|
2236
|
+
"amplitude",
|
|
2237
|
+
"prometheus",
|
|
2238
|
+
"grafana",
|
|
2239
|
+
"sentry",
|
|
2240
|
+
"stripe",
|
|
2241
|
+
"account-deep-dive",
|
|
2242
|
+
"slack-messages",
|
|
2243
|
+
"hubspot-deals",
|
|
2244
|
+
"hubspot-records",
|
|
2245
|
+
"hubspot-pipelines",
|
|
2246
|
+
"hubspot-metrics",
|
|
2247
|
+
"gong-calls",
|
|
2248
|
+
"github-repo-files",
|
|
2249
|
+
"jira",
|
|
2250
|
+
"jira-search",
|
|
2251
|
+
"gcloud",
|
|
2252
|
+
"notion-search",
|
|
2253
|
+
"pylon-search",
|
|
2254
|
+
]);
|
|
2255
|
+
|
|
2256
|
+
function isDefaultLeanInitialToolName(name: string): boolean {
|
|
2257
|
+
if (DEFAULT_LEAN_INITIAL_TOOL_NAMES.has(name)) return true;
|
|
2258
|
+
return (
|
|
2259
|
+
name.startsWith("provider-api-") || name.startsWith("provider-corpus-")
|
|
2260
|
+
);
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2164
2263
|
function extractToolSearchResultNames(value: unknown): string[] {
|
|
2165
2264
|
if (!value || typeof value !== "object") return [];
|
|
2166
2265
|
const result = value as { query?: unknown; results?: unknown };
|
|
@@ -2538,7 +2637,7 @@ type RawJsonSchema = AgentNativeJsonSchema;
|
|
|
2538
2637
|
const rawToolInputAjv = new Ajv({
|
|
2539
2638
|
strict: false,
|
|
2540
2639
|
allErrors: true,
|
|
2541
|
-
coerceTypes:
|
|
2640
|
+
coerceTypes: true,
|
|
2542
2641
|
useDefaults: false,
|
|
2543
2642
|
removeAdditional: false,
|
|
2544
2643
|
});
|
|
@@ -3635,47 +3734,6 @@ export async function runAgentLoop(opts: {
|
|
|
3635
3734
|
}
|
|
3636
3735
|
}
|
|
3637
3736
|
|
|
3638
|
-
const cacheKey =
|
|
3639
|
-
actionEntry.readOnly === true
|
|
3640
|
-
? toolCallCacheKey(toolCall.name, toolCall.input)
|
|
3641
|
-
: null;
|
|
3642
|
-
if (cacheKey && readOnlyToolResultCache.has(cacheKey)) {
|
|
3643
|
-
const repeats = (duplicateReadOnlyToolCalls.get(cacheKey) ?? 0) + 1;
|
|
3644
|
-
duplicateReadOnlyToolCalls.set(cacheKey, repeats);
|
|
3645
|
-
const previousResult = readOnlyToolResultCache.get(cacheKey) ?? "";
|
|
3646
|
-
const result =
|
|
3647
|
-
`Skipped duplicate read-only call to ${toolCall.name}: identical input already ran in this turn. ` +
|
|
3648
|
-
`Use the previous result already in the conversation instead of calling this tool again.\n\n` +
|
|
3649
|
-
`Previous result:\n${previousResult}`;
|
|
3650
|
-
send({
|
|
3651
|
-
type: "tool_start",
|
|
3652
|
-
tool: toolCall.name,
|
|
3653
|
-
input: toolCall.input as Record<string, string>,
|
|
3654
|
-
});
|
|
3655
|
-
send({
|
|
3656
|
-
type: "tool_done",
|
|
3657
|
-
tool: toolCall.name,
|
|
3658
|
-
input: toolCall.input as Record<string, unknown>,
|
|
3659
|
-
result,
|
|
3660
|
-
completedSideEffect: false,
|
|
3661
|
-
});
|
|
3662
|
-
recordToolResult(result, false);
|
|
3663
|
-
if (repeats >= 3) {
|
|
3664
|
-
requestedActionStop ??= {
|
|
3665
|
-
message:
|
|
3666
|
-
"I stopped because the agent kept asking for the same read-only context it already had. Please send the request again if you want me to retry from a fresh turn.",
|
|
3667
|
-
errorCode: "duplicate_read_only_tool",
|
|
3668
|
-
};
|
|
3669
|
-
}
|
|
3670
|
-
return {
|
|
3671
|
-
type: "tool-result" as const,
|
|
3672
|
-
toolCallId: toolCall.id,
|
|
3673
|
-
toolName: toolCall.name,
|
|
3674
|
-
toolInput: wireToolInput,
|
|
3675
|
-
content: result,
|
|
3676
|
-
};
|
|
3677
|
-
}
|
|
3678
|
-
|
|
3679
3737
|
const DEFAULT_TOOL_RESULT_CHARS = 50_000;
|
|
3680
3738
|
// Default action tools should not undercut durable/background runs. The
|
|
3681
3739
|
// run-manager still aborts foreground hosted runs around 40s, while
|
|
@@ -3912,6 +3970,42 @@ export async function runAgentLoop(opts: {
|
|
|
3912
3970
|
};
|
|
3913
3971
|
}
|
|
3914
3972
|
|
|
3973
|
+
const cacheKey =
|
|
3974
|
+
actionEntry.readOnly === true
|
|
3975
|
+
? toolCallCacheKey(toolCall.name, toolCall.input)
|
|
3976
|
+
: null;
|
|
3977
|
+
if (cacheKey && readOnlyToolResultCache.has(cacheKey)) {
|
|
3978
|
+
const repeats = (duplicateReadOnlyToolCalls.get(cacheKey) ?? 0) + 1;
|
|
3979
|
+
duplicateReadOnlyToolCalls.set(cacheKey, repeats);
|
|
3980
|
+
const previousResult = readOnlyToolResultCache.get(cacheKey) ?? "";
|
|
3981
|
+
const result =
|
|
3982
|
+
`Skipped duplicate read-only call to ${toolCall.name}: identical input already ran in this turn. ` +
|
|
3983
|
+
`Use the previous result already in the conversation instead of calling this tool again.\n\n` +
|
|
3984
|
+
`Previous result:\n${previousResult}`;
|
|
3985
|
+
send({
|
|
3986
|
+
type: "tool_done",
|
|
3987
|
+
tool: toolCall.name,
|
|
3988
|
+
input: toolCall.input as Record<string, unknown>,
|
|
3989
|
+
result,
|
|
3990
|
+
completedSideEffect: false,
|
|
3991
|
+
});
|
|
3992
|
+
recordToolResult(result, false);
|
|
3993
|
+
if (repeats >= 3) {
|
|
3994
|
+
requestedActionStop ??= {
|
|
3995
|
+
message:
|
|
3996
|
+
"I stopped because the agent kept asking for the same read-only context it already had. Please send the request again if you want me to retry from a fresh turn.",
|
|
3997
|
+
errorCode: "duplicate_read_only_tool",
|
|
3998
|
+
};
|
|
3999
|
+
}
|
|
4000
|
+
return {
|
|
4001
|
+
type: "tool-result" as const,
|
|
4002
|
+
toolCallId: toolCall.id,
|
|
4003
|
+
toolName: toolCall.name,
|
|
4004
|
+
toolInput: wireToolInput,
|
|
4005
|
+
content: result,
|
|
4006
|
+
};
|
|
4007
|
+
}
|
|
4008
|
+
|
|
3915
4009
|
if (
|
|
3916
4010
|
opts.executionMode === "plan" &&
|
|
3917
4011
|
!isPlanModeToolCallAllowed(toolCall.name, toolCall.input, actionEntry)
|
|
@@ -678,10 +678,31 @@ export function startRun(
|
|
|
678
678
|
|
|
679
679
|
// Heartbeat: bump heartbeat_at every 1.5s so watchers can detect a dead
|
|
680
680
|
// producer (process crash, HMR restart, isolate eviction) quickly and
|
|
681
|
-
// reap the row. Paired with RUN_STALE_MS (
|
|
681
|
+
// reap the row. Paired with RUN_STALE_MS (15s) — 10x the interval to
|
|
682
682
|
// tolerate transient DB slowness without false positives.
|
|
683
|
+
let consecutiveHeartbeatFailures = 0;
|
|
683
684
|
const heartbeatTimer: ReturnType<typeof setInterval> = setInterval(() => {
|
|
684
|
-
updateRunHeartbeat(runId)
|
|
685
|
+
updateRunHeartbeat(runId)
|
|
686
|
+
.then(() => {
|
|
687
|
+
consecutiveHeartbeatFailures = 0;
|
|
688
|
+
})
|
|
689
|
+
.catch((error) => {
|
|
690
|
+
consecutiveHeartbeatFailures += 1;
|
|
691
|
+
// Swallow routine single-tick blips; escalate once failures approach
|
|
692
|
+
// the stale window so false-positive stale_run from silent write
|
|
693
|
+
// failures is diagnosable.
|
|
694
|
+
if (consecutiveHeartbeatFailures >= 3) {
|
|
695
|
+
captureError(error, {
|
|
696
|
+
route: "/_agent-native/agent-chat",
|
|
697
|
+
tags: {
|
|
698
|
+
source: "agent-run-manager",
|
|
699
|
+
phase: "heartbeat",
|
|
700
|
+
consecutiveFailures: String(consecutiveHeartbeatFailures),
|
|
701
|
+
},
|
|
702
|
+
extra: { runId, threadId },
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
});
|
|
685
706
|
checkSqlAbort();
|
|
686
707
|
checkNoProgressBackstop();
|
|
687
708
|
}, 1500);
|
|
@@ -719,7 +719,7 @@ export async function tryClaimRunSlot(
|
|
|
719
719
|
WHERE thread_id = ?
|
|
720
720
|
AND status = 'running'
|
|
721
721
|
AND ${terminalRunEventExclusionSql()}
|
|
722
|
-
AND
|
|
722
|
+
AND ${livenessBasisSql()} >= ?
|
|
723
723
|
ORDER BY started_at DESC LIMIT 1`,
|
|
724
724
|
args: [threadId, heartbeatCutoff],
|
|
725
725
|
});
|
|
@@ -733,7 +733,7 @@ export async function tryClaimRunSlot(
|
|
|
733
733
|
WHERE thread_id = ?
|
|
734
734
|
AND status = 'running'
|
|
735
735
|
AND ${terminalRunEventExclusionSql()}
|
|
736
|
-
AND
|
|
736
|
+
AND ${livenessBasisSql()} >= ${backgroundAwareStaleCutoffSql()}
|
|
737
737
|
ORDER BY started_at DESC LIMIT 1`,
|
|
738
738
|
args: [threadId, now],
|
|
739
739
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { parseMcpToolName } from "../mcp-client/manager.js";
|
|
2
2
|
import { isMcpToolAllowedForRequest } from "../mcp-client/visibility.js";
|
|
3
|
+
import { getRequestRunContext } from "../server/request-context.js";
|
|
3
4
|
import type { ActionEntry } from "./production-agent.js";
|
|
4
5
|
|
|
5
6
|
export const TOOL_SEARCH_ACTION_NAME = "tool-search";
|
|
@@ -43,14 +44,14 @@ export function createToolSearchEntry(
|
|
|
43
44
|
return {
|
|
44
45
|
tool: {
|
|
45
46
|
description:
|
|
46
|
-
"Discover callable tools/actions, including connected MCP server tools named `mcp__<server>__<tool>`. Call it with NO query to list every available tool by name with a one-line description (cheap — no input schemas)
|
|
47
|
+
"Discover callable tools/actions, including connected MCP server tools named `mcp__<server>__<tool>`. Call it with NO query to list every available tool by name with a one-line description (cheap — no input schemas); names from that menu are not loaded for calling yet, so call tool-search again with a specific query for the tool/capability before invoking it. Use this whenever you need a capability but aren't sure which tool to call — most tools are not loaded into context up front, so this is how you find and then call them.",
|
|
47
48
|
parameters: {
|
|
48
49
|
type: "object",
|
|
49
50
|
properties: {
|
|
50
51
|
query: {
|
|
51
52
|
type: "string",
|
|
52
53
|
description:
|
|
53
|
-
"What capability to find, e.g. `send slack message`, `create calendar event`, `zapier gmail`, or `browser screenshot`. Omit to list every available tool name (the full menu) with one-line descriptions.",
|
|
54
|
+
"What capability to find, e.g. `send slack message`, `create calendar event`, `zapier gmail`, or `browser screenshot`. Omit to list every available tool name (the full menu) with one-line descriptions; then call tool-search again with a specific query before calling a tool from that menu.",
|
|
54
55
|
},
|
|
55
56
|
limit: {
|
|
56
57
|
type: "number",
|
|
@@ -90,6 +91,8 @@ export function searchToolRegistry(
|
|
|
90
91
|
query: string;
|
|
91
92
|
totalTools: number;
|
|
92
93
|
count: number;
|
|
94
|
+
repeated?: boolean;
|
|
95
|
+
message?: string;
|
|
93
96
|
results: ToolSearchResult[];
|
|
94
97
|
} {
|
|
95
98
|
const query = String(args.query ?? "").trim();
|
|
@@ -105,6 +108,33 @@ export function searchToolRegistry(
|
|
|
105
108
|
options.defaultLimit ?? DEFAULT_LIMIT,
|
|
106
109
|
options.maxLimit ?? MAX_LIMIT,
|
|
107
110
|
);
|
|
111
|
+
const cacheKey = normalizeToolSearchCacheKey({
|
|
112
|
+
query,
|
|
113
|
+
limit,
|
|
114
|
+
includeSchemas,
|
|
115
|
+
});
|
|
116
|
+
const runCtx = getRequestRunContext();
|
|
117
|
+
const priorSearch = includeSchemas
|
|
118
|
+
? undefined
|
|
119
|
+
: runCtx?.toolSearchReads?.[cacheKey];
|
|
120
|
+
if (priorSearch) {
|
|
121
|
+
return {
|
|
122
|
+
query,
|
|
123
|
+
totalTools: priorSearch.totalTools,
|
|
124
|
+
count: priorSearch.resultNames.length,
|
|
125
|
+
repeated: true,
|
|
126
|
+
message:
|
|
127
|
+
"This exact tool-search query already ran in this agent run. Use the previously returned schemas/details instead of searching again.",
|
|
128
|
+
results: priorSearch.resultNames.map((name) => ({
|
|
129
|
+
name,
|
|
130
|
+
kind: parseMcpToolName(name) ? ("mcp" as const) : ("action" as const),
|
|
131
|
+
score: 0,
|
|
132
|
+
description:
|
|
133
|
+
"Already returned by an earlier identical tool-search call.",
|
|
134
|
+
parameters: [],
|
|
135
|
+
})),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
108
138
|
const queryTokens = tokenize(query);
|
|
109
139
|
|
|
110
140
|
const candidates: ToolSearchResult[] = [];
|
|
@@ -112,6 +142,7 @@ export function searchToolRegistry(
|
|
|
112
142
|
|
|
113
143
|
for (const [name, entry] of Object.entries(registry)) {
|
|
114
144
|
if (!entry?.tool || name === TOOL_SEARCH_ACTION_NAME) continue;
|
|
145
|
+
if (entry.agentTool === false) continue;
|
|
115
146
|
if (name.startsWith("mcp__") && !isMcpToolAllowedForRequest(name)) {
|
|
116
147
|
continue;
|
|
117
148
|
}
|
|
@@ -160,7 +191,16 @@ export function searchToolRegistry(
|
|
|
160
191
|
|
|
161
192
|
if (listAll) {
|
|
162
193
|
candidates.sort((a, b) => a.name.localeCompare(b.name));
|
|
163
|
-
|
|
194
|
+
const result = {
|
|
195
|
+
query,
|
|
196
|
+
totalTools,
|
|
197
|
+
count: candidates.length,
|
|
198
|
+
message:
|
|
199
|
+
'Menu mode lists tool names only; it does not load schemas for calling. Before invoking a tool found here, call tool-search again with a specific query such as the tool name or capability (for example, { "query": "hubspot-deals" }).',
|
|
200
|
+
results: candidates,
|
|
201
|
+
};
|
|
202
|
+
rememberToolSearchResult(cacheKey, result);
|
|
203
|
+
return result;
|
|
164
204
|
}
|
|
165
205
|
|
|
166
206
|
candidates.sort((a, b) => {
|
|
@@ -168,12 +208,39 @@ export function searchToolRegistry(
|
|
|
168
208
|
return a.name.localeCompare(b.name);
|
|
169
209
|
});
|
|
170
210
|
|
|
171
|
-
|
|
211
|
+
const result = {
|
|
172
212
|
query,
|
|
173
213
|
totalTools,
|
|
174
214
|
count: Math.min(candidates.length, limit),
|
|
175
215
|
results: candidates.slice(0, limit),
|
|
176
216
|
};
|
|
217
|
+
if (!includeSchemas) rememberToolSearchResult(cacheKey, result);
|
|
218
|
+
return result;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function normalizeToolSearchCacheKey(options: {
|
|
222
|
+
query: string;
|
|
223
|
+
limit: number;
|
|
224
|
+
includeSchemas: boolean;
|
|
225
|
+
}): string {
|
|
226
|
+
return JSON.stringify({
|
|
227
|
+
query: options.query.trim().toLowerCase(),
|
|
228
|
+
limit: options.limit,
|
|
229
|
+
includeSchemas: options.includeSchemas,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function rememberToolSearchResult(
|
|
234
|
+
cacheKey: string,
|
|
235
|
+
result: { totalTools: number; results: Array<{ name: string }> },
|
|
236
|
+
) {
|
|
237
|
+
const runCtx = getRequestRunContext();
|
|
238
|
+
if (!runCtx) return;
|
|
239
|
+
const reads = (runCtx.toolSearchReads ??= {});
|
|
240
|
+
reads[cacheKey] = {
|
|
241
|
+
totalTools: result.totalTools,
|
|
242
|
+
resultNames: result.results.map((item) => item.name),
|
|
243
|
+
};
|
|
177
244
|
}
|
|
178
245
|
|
|
179
246
|
function truncate(value: string, max: number): string {
|
|
@@ -202,7 +202,7 @@ A new **${kind}** integration. ${kindGuidance}
|
|
|
202
202
|
|
|
203
203
|
## Verify
|
|
204
204
|
|
|
205
|
-
1. \`agent-native typecheck\` (or \`
|
|
205
|
+
1. \`agent-native typecheck\` (or \`tsc --noEmit\`) passes.
|
|
206
206
|
2. Add a focused \`*.spec.ts\` for the new surface and run it.
|
|
207
207
|
3. Exercise the real workflow end to end: invoke the new action from the agent
|
|
208
208
|
chat (and the UI if applicable), and confirm the external call round-trips
|