@agent-native/core 0.141.6 → 0.144.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/agent-native.eject.json +9 -0
- package/corpus/README.md +1 -1
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +3 -14
- package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +11 -6
- package/corpus/templates/analytics/.agents/skills/prometheus/SKILL.md +5 -5
- package/corpus/templates/analytics/.agents/skills/provider-api/SKILL.md +19 -0
- package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/analytics/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/analytics/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/analytics/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/analytics/AGENTS.md +37 -40
- package/corpus/templates/analytics/actions/compose-dashboard.ts +1 -1
- package/corpus/templates/analytics/actions/ensure-native-v2-dashboards.ts +1 -1
- package/corpus/templates/analytics/actions/list-dashboard-usage-stats.ts +17 -22
- package/corpus/templates/analytics/actions/migrate-first-party-analytics-to-bigquery.ts +135 -0
- package/corpus/templates/analytics/actions/navigate.ts +5 -6
- package/corpus/templates/analytics/actions/provider-api-register.ts +50 -0
- package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +46 -13
- package/corpus/templates/analytics/actions/test-custom-api-connection.ts +106 -0
- package/corpus/templates/analytics/actions/update-dashboard.ts +0 -1
- package/corpus/templates/analytics/actions/view-screen.ts +0 -20
- package/corpus/templates/analytics/app/components/CustomApiCard.tsx +430 -0
- package/corpus/templates/analytics/app/components/layout/Header.tsx +0 -1
- package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +5 -5
- package/corpus/templates/analytics/app/i18n-data.ts +682 -90
- package/corpus/templates/analytics/app/lib/native-mcp-exclusions.ts +6 -0
- package/corpus/templates/analytics/app/lib/sql-query.ts +33 -6
- package/corpus/templates/analytics/app/pages/Agents.tsx +0 -3
- package/corpus/templates/analytics/app/pages/DataSources.tsx +4 -0
- package/corpus/templates/analytics/app/pages/Settings.tsx +22 -43
- package/corpus/templates/analytics/app/pages/settings/settings-search.ts +23 -20
- package/corpus/templates/analytics/app/routes/extensions._index.tsx +1 -1
- package/corpus/templates/analytics/app/routes/settings.$.tsx +1 -0
- package/corpus/templates/analytics/app/routes/team.tsx +1 -1
- package/corpus/templates/analytics/changelog/2026-08-05-settings-no-longer-includes-an-unnecessary-about-section.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-06-analytics-dashboards-load-reliably-during-background-data-sw.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-06-analytics-dashboards-remain-responsive-while-historical-data.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-06-analytics-query-results-now-render-as-a-table-with-csv-downl.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-06-connect-public-https-custom-apis-and-hand-tested-endpoints-t.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-06-durable-agent-worker-memory.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-06-live-dashboard-panels-use-the-shared-query-timeout.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-06-on-demand-billing-is-available-as-a-native-dashboard-with-ta.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-06-visible-dashboard-names-are-unique.md +6 -0
- package/corpus/templates/analytics/docs/schemas/first-party-analytics.md +1 -1
- package/corpus/templates/analytics/netlify.toml +7 -0
- package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +4 -0
- package/corpus/templates/analytics/scripts/first-party-analytics-bigquery.sql +104 -0
- package/corpus/templates/analytics/server/db/index.ts +27 -0
- package/corpus/templates/analytics/server/db/schema.ts +10 -0
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +0 -2
- package/corpus/templates/analytics/server/lib/dashboards-store.ts +227 -60
- package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +1147 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics-health.ts +34 -15
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +57 -4
- package/corpus/templates/analytics/server/lib/native-v2-dashboards.ts +227 -1
- package/corpus/templates/analytics/server/lib/real-data-actions.ts +1 -3
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +7 -4
- package/corpus/templates/analytics/server/plugins/analytics-rollup-backfill-jobs.ts +1 -0
- package/corpus/templates/analytics/server/plugins/db.ts +52 -18
- package/corpus/templates/assets/.agents/skills/asset-generation/SKILL.md +36 -8
- package/corpus/templates/assets/.agents/skills/image-generation/SKILL.md +16 -1
- package/corpus/templates/assets/.agents/skills/library-management/SKILL.md +16 -1
- package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/assets/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/assets/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/assets/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/assets/AGENTS.md +1 -0
- package/corpus/templates/assets/actions/_helpers.ts +12 -0
- package/corpus/templates/assets/actions/generate-image.ts +9 -3
- package/corpus/templates/assets/actions/import-style-from-url.ts +115 -0
- package/corpus/templates/assets/app/hooks/use-navigation-state.ts +3 -1
- package/corpus/templates/assets/app/routes/extensions._index.tsx +1 -1
- package/corpus/templates/assets/app/routes/settings.$.tsx +1 -0
- package/corpus/templates/assets/app/routes/settings.tsx +5 -0
- package/corpus/templates/assets/app/routes/team.tsx +1 -1
- package/corpus/templates/assets/changelog/2026-08-05-brand-kits-can-import-a-website-s-hydrated-visual-language-a.md +6 -0
- package/corpus/templates/assets/changelog/2026-08-05-generated-images-now-hand-off-embeddable-previews-to-other-w.md +6 -0
- package/corpus/templates/assets/server/lib/generation.ts +58 -0
- package/corpus/templates/assets/shared/api.ts +12 -0
- package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/brain/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/brain/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/brain/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/brain/actions/list-connection-providers.ts +24 -3
- package/corpus/templates/brain/app/lib/dispatch-links.ts +44 -0
- package/corpus/templates/brain/app/routes/extensions._index.tsx +1 -1
- package/corpus/templates/brain/app/routes/sources.tsx +15 -7
- package/corpus/templates/brain/app/routes/team.tsx +1 -1
- package/corpus/templates/brain/app/routes.ts +1 -1
- package/corpus/templates/brain/changelog/2026-08-06-brain-provider-setup-links-open-dispatch-correctly-in-standa.md +6 -0
- package/corpus/templates/brain/server/plugins/agent-chat.ts +1 -0
- package/corpus/templates/calendar/.agents/skills/event-management/SKILL.md +26 -0
- package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/calendar/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/calendar/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/calendar/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/calendar/AGENTS.md +11 -32
- package/corpus/templates/calendar/actions/update-event.ts +107 -1
- package/corpus/templates/calendar/app/components/calendar/EventCalendarSelect.tsx +83 -0
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +57 -0
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +59 -73
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +3 -1
- package/corpus/templates/calendar/app/hooks/use-events.ts +4 -1
- package/corpus/templates/calendar/app/i18n-data.ts +20 -0
- package/corpus/templates/calendar/app/routes/_app.extensions._index.tsx +1 -1
- package/corpus/templates/calendar/app/routes/_app.settings.$.tsx +1 -0
- package/corpus/templates/calendar/app/routes/_app.team.tsx +1 -1
- package/corpus/templates/calendar/changelog/2026-08-06-delegated-requests-continue-in-the-background.md +6 -0
- package/corpus/templates/calendar/changelog/2026-08-06-existing-events-can-move-between-connected-google-account-ca.md +6 -0
- package/corpus/templates/calendar/server/lib/google-calendar.ts +101 -0
- package/corpus/templates/calendar/server/plugins/agent-chat.ts +7 -1
- package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/chat/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/chat/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/chat/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/chat/app/root.tsx +1 -1
- package/corpus/templates/chat/app/routes/agent.tsx +7 -7
- package/corpus/templates/chat/app/routes/extensions._index.tsx +1 -1
- package/corpus/templates/chat/app/routes/settings.$.tsx +1 -0
- package/corpus/templates/chat/app/routes/team.tsx +1 -1
- package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/clips/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/clips/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/clips/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/clips/app/components/editor/editor-layout.tsx +9 -24
- package/corpus/templates/clips/app/components/editor/timeline-geometry.ts +15 -0
- package/corpus/templates/clips/app/components/editor/waveform.tsx +4 -17
- package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
- package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +14 -3
- package/corpus/templates/clips/app/components/player/transcript-panel.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.extensions._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.settings.$.tsx +1 -0
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +28 -38
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +21 -27
- package/corpus/templates/clips/changelog/2026-08-06-clips-recovers-from-stalled-recording-setup-without-requirin.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-06-clips-starts-faster-after-a-deploy-or-idle-period-startup-no.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-06-deleting-a-recording-returns-cleanly-to-the-library-and-fit-.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-06-hide-clip-insights-from-viewers-without-analytics-access.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +48 -20
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +275 -74
- package/corpus/templates/clips/desktop/src/lib/recording-start-guard.ts +84 -0
- package/corpus/templates/clips/desktop/src/overlays/toolbar.tsx +14 -4
- package/corpus/templates/clips/server/plugins/db.ts +214 -26
- package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/content/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/content/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/content/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/content/app/routes/_app.extensions._index.tsx +1 -1
- package/corpus/templates/content/app/routes/_app.settings.$.tsx +1 -0
- package/corpus/templates/content/app/routes/_app.team.tsx +1 -1
- package/corpus/templates/content/e2e/global-setup.ts +1 -1
- package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/crm/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/crm/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/crm/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/crm/changelog/2026-08-06-crm-starts-faster-after-a-deploy-or-idle-period-one-time-dat.md +6 -0
- package/corpus/templates/crm/server/plugins/db.ts +11 -8
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +36 -1
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +6 -1
- package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/design/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/design/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/design/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/design/actions/analyze-brand-assets.ts +7 -7
- package/corpus/templates/design/actions/import-from-url.ts +6 -5
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +27 -18
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +2 -2
- package/corpus/templates/design/app/pages/Index.tsx +6 -2
- package/corpus/templates/design/app/routes/extensions._index.tsx +1 -1
- package/corpus/templates/design/app/routes/settings.$.tsx +1 -0
- package/corpus/templates/design/app/routes/team.tsx +1 -1
- package/corpus/templates/design/changelog/2026-08-05-deleting-a-design-from-the-home-page-no-longer-leaves-the-ap.md +6 -0
- package/corpus/templates/design/changelog/2026-08-05-renaming-a-layer-now-focuses-its-name-field-automatically.md +6 -0
- package/corpus/templates/design/changelog/2026-08-05-website-url-imports-now-capture-hydrated-browser-computed-de.md +6 -0
- package/corpus/templates/design/e2e/global-setup.ts +1 -1
- package/corpus/templates/design/server/plugins/agent-chat.ts +2 -0
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/dispatch/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/dispatch/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/dispatch/app/routes/settings.$.tsx +1 -0
- package/corpus/templates/dispatch/app/routes/team.tsx +1 -1
- package/corpus/templates/dispatch/changelog/2026-08-06-ready-workspace-apps-stay-one-click-away-in-a-compact-dispat.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-08-06-shared-vault-values-and-management-are-now-restricted-to-wor.md +6 -0
- package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/factory/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/factory/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/factory/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/factory/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/factory/app/routes/extensions._index.tsx +1 -1
- package/corpus/templates/factory/app/routes/settings.$.tsx +1 -0
- package/corpus/templates/factory/app/routes/team.tsx +1 -1
- package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/forms/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/forms/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/forms/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/forms/app/routes/_app.extensions._index.tsx +1 -1
- package/corpus/templates/forms/app/routes/_app.settings.$.tsx +1 -0
- package/corpus/templates/forms/app/routes/_app.team.tsx +1 -1
- package/corpus/templates/forms/changelog/2026-08-06-delegated-requests-continue-in-the-background.md +6 -0
- package/corpus/templates/forms/server/plugins/agent-chat.ts +4 -0
- package/corpus/templates/forms/shared/navigation.ts +1 -1
- package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/macros/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/macros/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/macros/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/macros/app/routes/extensions._index.tsx +1 -1
- package/corpus/templates/macros/app/routes/settings.$.tsx +1 -0
- package/corpus/templates/macros/app/routes/team.tsx +1 -1
- package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/mail/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/mail/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/mail/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/mail/app/routes/extensions._index.tsx +1 -1
- package/corpus/templates/mail/app/routes/settings.$.tsx +1 -0
- package/corpus/templates/mail/changelog/2026-08-06-delegated-requests-continue-in-the-background.md +6 -0
- package/corpus/templates/mail/server/plugins/agent-chat.ts +6 -0
- package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/plan/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/plan/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/plan/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/plan/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/plan/app/routes/extensions._index.tsx +1 -1
- package/corpus/templates/plan/app/routes/settings.$.tsx +1 -0
- package/corpus/templates/plan/app/routes/team.tsx +1 -1
- package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +48 -5
- package/corpus/templates/slides/.agents/skills/design-systems/SKILL.md +40 -2
- package/corpus/templates/slides/.agents/skills/image-generation-via-a2a/SKILL.md +6 -0
- package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +15 -2
- package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +29 -24
- package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/slides/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/slides/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/slides/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/slides/AGENTS.md +7 -9
- package/corpus/templates/slides/_gitignore +1 -0
- package/corpus/templates/slides/actions/analyze-brand-assets.ts +7 -7
- package/corpus/templates/slides/actions/export-pptx.ts +402 -36
- package/corpus/templates/slides/actions/import-file.ts +46 -85
- package/corpus/templates/slides/actions/import-from-url.ts +6 -6
- package/corpus/templates/slides/actions/import-google-slides-reference.ts +271 -12
- package/corpus/templates/slides/actions/import-pptx.ts +85 -60
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +10 -13
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/AddSlidePopover.tsx +5 -1
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +25 -12
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +112 -57
- package/corpus/templates/slides/app/components/editor/GoogleDriveConnectionCta.tsx +202 -0
- package/corpus/templates/slides/app/components/editor/GoogleSlidesReferenceImport.tsx +26 -14
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +176 -0
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +182 -141
- package/corpus/templates/slides/app/components/editor/canvas-interactions/index.ts +1 -0
- package/corpus/templates/slides/app/components/editor/canvas-interactions/slides-canvas-adapter.ts +18 -0
- package/corpus/templates/slides/app/components/editor/slide-text-targets.ts +85 -0
- package/corpus/templates/slides/app/components/layout/Layout.tsx +3 -0
- package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +13 -3
- package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +27 -1
- package/corpus/templates/slides/app/context/DeckContext.tsx +71 -20
- package/corpus/templates/slides/app/global.css +6 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
- package/corpus/templates/slides/app/lib/create-deck-generation.ts +10 -6
- package/corpus/templates/slides/app/lib/deck-preview-frame.ts +15 -0
- package/corpus/templates/slides/app/lib/deck-share-links.ts +9 -0
- package/corpus/templates/slides/app/lib/export-pptx-client.ts +89 -0
- package/corpus/templates/slides/app/lib/slide-animation-elements.ts +3 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +17 -0
- package/corpus/templates/slides/app/pages/Index.tsx +107 -6
- package/corpus/templates/slides/app/routes/extensions._index.tsx +1 -1
- package/corpus/templates/slides/app/routes/settings.$.tsx +1 -0
- package/corpus/templates/slides/app/routes/team.tsx +1 -1
- package/corpus/templates/slides/changelog/2026-08-05-failed-deck-creation-and-reference-uploads-now-recover-clean.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-05-slides-recover-completed-generation-results-after-a-sync-hic.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-05-website-url-imports-now-capture-hydrated-browser-computed-st.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-06-clicking-the-gray-canvas-around-a-slide-clears-its-selection.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-06-deck-thumbnails-keep-a-consistent-listing-frame-across-aspec.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-06-deep-linked-decks-open-directly-instead-of-being-interrupted.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-06-google-slides-exports-now-show-clear-import-steps-when-direc.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-06-import-pdf-google-slides-and-powerpoint-decks-directly-from-.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-06-imported-powerpoint-exports-keep-text-and-images-editable-an.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-06-presentation-prompts-continue-adding-rendered-slides-until-t.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-06-public-decks-now-share-read-only-presentation-links-by-defau.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-06-slides-offers-a-direct-connect-google-button-when-a-drive-co.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-06-slides-preserve-uploaded-pdf-layouts-accept-larger-reference.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-06-styled-words-stay-part-of-their-text-box-instead-of-becoming.md +6 -0
- package/corpus/templates/slides/server/handlers/google-docs-auth.ts +7 -20
- package/corpus/templates/slides/server/handlers/import/html-converter.ts +236 -13
- package/corpus/templates/slides/server/handlers/import/pptx-assets.ts +67 -0
- package/corpus/templates/slides/server/handlers/import/pptx-parser.ts +2 -0
- package/corpus/templates/slides/server/handlers/uploads.ts +7 -3
- package/corpus/templates/slides/server/lib/chat-attachments.ts +6 -3
- package/corpus/templates/slides/server/lib/emails.ts +7 -2
- package/corpus/templates/slides/server/lib/google-docs-error.ts +50 -0
- package/corpus/templates/slides/server/lib/google-docs-oauth.ts +1 -0
- package/corpus/templates/slides/server/lib/import-asset-storage.ts +127 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +4 -3
- package/corpus/templates/slides/server/routes/api/import-assets/[token].get.ts +70 -0
- package/corpus/templates/slides/shared/upload-types.ts +3 -0
- package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/corpus/templates/tasks/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/corpus/templates/tasks/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/app/components/layout/Header.tsx +3 -1
- package/corpus/templates/tasks/app/routes/extensions._index.tsx +1 -1
- package/corpus/templates/tasks/app/routes/settings.$.tsx +1 -0
- package/dist/agent/engine/ai-sdk-engine.js +49 -3
- package/dist/agent/production-agent.d.ts +18 -0
- package/dist/agent/production-agent.js +80 -1
- package/dist/agent/types.d.ts +7 -0
- package/dist/cli/agent-plugin.d.ts +112 -0
- package/dist/cli/agent-plugin.js +1081 -0
- package/dist/cli/app-skill.js +39 -1
- package/dist/cli/code-agent-executor.d.ts +3 -0
- package/dist/cli/code-agent-executor.js +51 -13
- package/dist/cli/index.js +13 -0
- package/dist/cli/templates-meta.js +1 -1
- package/dist/client/AgentPanel.d.ts +3 -1
- package/dist/client/AgentPanel.js +9 -2
- package/dist/client/AssistantChat.d.ts +8 -0
- package/dist/client/AssistantChat.js +23 -8
- package/dist/client/NewWorkspaceAppFlow.js +1 -0
- package/dist/client/agent-chat-adapter.d.ts +1 -1
- package/dist/client/agent-chat-adapter.js +153 -7
- package/dist/client/agent-page/AgentWorkspaceContent.d.ts +1 -1
- package/dist/client/agent-page/AgentWorkspaceContent.js +13 -13
- package/dist/client/assistant-ui-recovery.d.ts +2 -1
- package/dist/client/assistant-ui-recovery.js +7 -3
- package/dist/client/chat/run-recovery.js +5 -1
- package/dist/client/embed-auth.js +6 -2
- package/dist/client/error-format.js +12 -0
- package/dist/client/integrations/IntegrationsPanel.js +40 -6
- package/dist/client/onboarding/FirstRunOnboarding.js +11 -4
- package/dist/client/org/OrgSwitcher.js +2 -2
- package/dist/client/org/TeamPage.js +92 -72
- package/dist/client/require-session.d.ts +1 -1
- package/dist/client/require-session.js +4 -4
- package/dist/client/resources/McpConnectionSuggestion.d.ts +1 -0
- package/dist/client/resources/McpConnectionSuggestion.js +27 -10
- package/dist/client/resources/McpIntegrationDialog.js +77 -45
- package/dist/client/resources/mcp-integration-catalog.d.ts +13 -1
- package/dist/client/resources/mcp-integration-catalog.js +255 -2
- package/dist/client/resources/mcp-integration-logos.js +18 -2
- package/dist/client/resources/use-mcp-servers.d.ts +5 -0
- package/dist/client/resources/use-mcp-servers.js +36 -0
- package/dist/client/settings/AccountSettingsCard.js +42 -36
- package/dist/client/settings/AutomationsSection.js +1 -1
- package/dist/client/settings/DemoModeSection.d.ts +3 -1
- package/dist/client/settings/DemoModeSection.js +4 -1
- package/dist/client/settings/ExtensionsSettingsContent.js +1 -1
- package/dist/client/settings/SchedulingTimezoneField.d.ts +3 -1
- package/dist/client/settings/SchedulingTimezoneField.js +9 -5
- package/dist/client/settings/SettingsPanel.d.ts +4 -1
- package/dist/client/settings/SettingsPanel.js +21 -21
- package/dist/client/settings/SettingsTabsPage.d.ts +2 -2
- package/dist/client/settings/SettingsTabsPage.js +98 -45
- package/dist/client/settings/VoiceTranscriptionSection.js +6 -1
- package/dist/client/settings/useSettingsPanelController.js +47 -8
- package/dist/collab/routes.d.ts +1 -1
- package/dist/db/client.d.ts +9 -0
- package/dist/db/client.js +51 -16
- package/dist/db/create-get-db.js +2 -2
- package/dist/db/ddl-guard.d.ts +11 -10
- package/dist/db/ddl-guard.js +40 -12
- package/dist/deploy/build.d.ts +2 -0
- package/dist/deploy/build.js +97 -4
- package/dist/deploy/workspace-deploy.js +0 -2
- package/dist/guards/no-env-credentials.js +9 -0
- package/dist/ingestion/index.d.ts +1 -1
- package/dist/ingestion/pptx.d.ts +68 -0
- package/dist/ingestion/pptx.js +660 -213
- package/dist/ingestion/website.d.ts +30 -0
- package/dist/integrations/plugin.js +9 -6
- package/dist/localization/default-messages.d.ts +59 -0
- package/dist/localization/default-messages.js +62 -2
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/mcp-client/oauth-routes.d.ts +2 -0
- package/dist/mcp-client/oauth-routes.js +74 -7
- package/dist/mcp-client/routes.d.ts +1 -0
- package/dist/mcp-client/routes.js +49 -0
- package/dist/navigation/index.js +16 -5
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/onboarding/app-profile.js +11 -0
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +13 -13
- package/dist/provider-api/actions/provider-api.d.ts +11 -11
- package/dist/resources/store.js +15 -1
- package/dist/scripts/call-agent.js +45 -4
- package/dist/secrets/routes.d.ts +6 -6
- package/dist/server/agent-chat/action-filters-a2a.d.ts +1 -1
- package/dist/server/agent-chat/action-filters-a2a.js +36 -1
- package/dist/server/agent-chat-plugin.js +29 -8
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/auth.js +55 -17
- package/dist/server/better-auth-instance.js +5 -3
- package/dist/server/core-routes-plugin.d.ts +8 -1
- package/dist/server/core-routes-plugin.js +28 -3
- package/dist/server/credential-provider.d.ts +3 -3
- package/dist/server/credential-provider.js +90 -4
- package/dist/server/identity-sso.js +2 -1
- package/dist/server/onboarding-html.d.ts +2 -0
- package/dist/server/onboarding-html.js +171 -62
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/self-dispatch.d.ts +5 -4
- package/dist/server/self-dispatch.js +25 -14
- package/dist/server/ssr-handler.d.ts +1 -1
- package/dist/server/ssr-handler.js +1 -1
- package/dist/server/workspace-provider-oauth.js +1 -1
- package/dist/setup-connections/onboarding.js +1 -1
- package/dist/shared/cache-control.d.ts +26 -2
- package/dist/shared/cache-control.js +43 -2
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/password-policy.d.ts +3 -0
- package/dist/shared/password-policy.js +3 -0
- package/dist/shared/sign-in-journey.d.ts +5 -2
- package/dist/shared/sign-in-journey.js +10 -4
- package/dist/sharing/actions/set-resource-visibility.js +16 -4
- package/dist/sharing/registry.d.ts +14 -0
- package/dist/styles/agent-native.css +6 -0
- package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/dist/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/dist/templates/chat/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/dist/templates/chat/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/dist/templates/chat/app/components/layout/Layout.tsx +1 -1
- package/dist/templates/chat/app/hooks/use-navigation-state.ts +1 -1
- package/dist/templates/chat/app/root.tsx +1 -1
- package/dist/templates/chat/app/routes/agent.tsx +7 -7
- package/dist/templates/chat/app/routes/extensions._index.tsx +1 -1
- package/dist/templates/chat/app/routes/settings.$.tsx +1 -0
- package/dist/templates/chat/app/routes/team.tsx +1 -1
- package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/dist/templates/default/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/dist/templates/default/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/dist/templates/default/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/dist/templates/headless/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/dist/templates/headless/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/dist/templates/headless/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/dist/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +6 -0
- package/dist/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +37 -6
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +4 -2
- package/dist/templates/workspace-core/.agents/skills/performance/SKILL.md +51 -0
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/dist/templates/workspace-core/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/dist/templates/workspace-core/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/dist/templates/workspace-root/AGENTS.md +7 -0
- package/dist/user-profile/actions/change-password.js +8 -3
- package/dist/user-profile/actions/set-password.js +5 -1
- package/dist/vite/action-types-plugin.js +59 -0
- package/docs/content/authentication.mdx +4 -5
- package/docs/content/skills-guide.mdx +13 -0
- package/docs/content/template-analytics-developers.mdx +1 -1
- package/docs/content/template-calendar-developers.mdx +1 -1
- package/docs/content/template-chat-developers.mdx +2 -2
- package/docs/content/template-content-developers.mdx +1 -1
- package/docs/content/template-mail-developers.mdx +1 -1
- package/docs/content/template-plan-developers.mdx +1 -1
- package/docs/content/toolkit-command-navigation.mdx +6 -6
- package/docs/content/toolkit-org-team.mdx +1 -1
- package/docs/content/toolkit-settings.mdx +8 -8
- package/docs/content/toolkit-setup-connections.mdx +1 -1
- package/package.json +6 -2
- package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/src/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/src/templates/chat/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/src/templates/chat/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/src/templates/chat/app/components/layout/Layout.tsx +1 -1
- package/src/templates/chat/app/hooks/use-navigation-state.ts +1 -1
- package/src/templates/chat/app/root.tsx +1 -1
- package/src/templates/chat/app/routes/agent.tsx +7 -7
- package/src/templates/chat/app/routes/extensions._index.tsx +1 -1
- package/src/templates/chat/app/routes/settings.$.tsx +1 -0
- package/src/templates/chat/app/routes/team.tsx +1 -1
- package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/src/templates/default/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/src/templates/default/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/src/templates/default/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/src/templates/headless/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/src/templates/headless/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/src/templates/headless/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/src/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +6 -0
- package/src/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +37 -6
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +4 -2
- package/src/templates/workspace-core/.agents/skills/performance/SKILL.md +51 -0
- package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +296 -0
- package/src/templates/workspace-core/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
- package/src/templates/workspace-core/.agents/skills/turn-into-skill/SKILL.md +112 -0
- package/src/templates/workspace-core/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
- package/src/templates/workspace-root/AGENTS.md +7 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-management/references/template-catalog-and-demo.md +0 -62
- package/corpus/templates/analytics/actions/install-dashboard-template.ts +0 -369
- package/corpus/templates/analytics/actions/list-dashboard-templates.ts +0 -47
- package/corpus/templates/analytics/actions/list-native-v2-dashboard-templates.ts +0 -34
- package/corpus/templates/analytics/app/routes/catalog.tsx +0 -240
- package/src/templates/default/actions/navigate.spec.ts +0 -53
package/dist/navigation/index.js
CHANGED
|
@@ -22,12 +22,22 @@ function normalizeLeadingPath(path) {
|
|
|
22
22
|
return `/${trimmed.replace(/^\/+/, "").replace(/\/+$/, "")}`;
|
|
23
23
|
}
|
|
24
24
|
function normalizeTabId(tab) {
|
|
25
|
-
|
|
25
|
+
const normalized = tab
|
|
26
26
|
.trim()
|
|
27
27
|
.replace(/^#/, "")
|
|
28
28
|
.toLowerCase()
|
|
29
29
|
.replace(/['"]/g, "")
|
|
30
30
|
.replace(/[\s_]+/g, "-");
|
|
31
|
+
if (normalized === "connections")
|
|
32
|
+
return "integrations";
|
|
33
|
+
if (normalized === "team" || normalized === "org")
|
|
34
|
+
return "organization";
|
|
35
|
+
if (normalized === "changelog" ||
|
|
36
|
+
normalized === "what-s-new" ||
|
|
37
|
+
normalized === "updates") {
|
|
38
|
+
return "whats-new";
|
|
39
|
+
}
|
|
40
|
+
return normalized;
|
|
31
41
|
}
|
|
32
42
|
function pathSegment(value) {
|
|
33
43
|
return encodeURIComponent(value.trim().replace(/^\/+|\/+$/g, ""));
|
|
@@ -40,10 +50,11 @@ function resolveOpenPathRoute(route, params) {
|
|
|
40
50
|
export function buildSettingsRoute(tab, basePath = STANDARD_APP_ROUTES.settings) {
|
|
41
51
|
const path = normalizeLeadingPath(basePath);
|
|
42
52
|
const normalizedTab = tab ? normalizeTabId(tab) : null;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
53
|
+
const segments = (normalizedTab || STANDARD_SETTINGS_TABS.general)
|
|
54
|
+
.split(":")
|
|
55
|
+
.map((segment) => pathSegment(segment))
|
|
56
|
+
.filter(Boolean);
|
|
57
|
+
return `${path}/${segments.join("/")}`;
|
|
47
58
|
}
|
|
48
59
|
export function buildTeamRoute(options = {}) {
|
|
49
60
|
return options.teamInSettings
|
|
@@ -42,22 +42,22 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
|
|
|
42
42
|
avgEvalScore: number;
|
|
43
43
|
} | {
|
|
44
44
|
error?: undefined;
|
|
45
|
-
ok?: undefined;
|
|
46
45
|
summary: import("./types.js").TraceSummary;
|
|
47
46
|
spans: import("./types.js").TraceSpan[];
|
|
48
47
|
id?: undefined;
|
|
48
|
+
ok?: undefined;
|
|
49
49
|
} | {
|
|
50
50
|
error?: undefined;
|
|
51
|
-
ok?: undefined;
|
|
52
51
|
summary?: undefined;
|
|
53
52
|
spans?: undefined;
|
|
54
53
|
id: string;
|
|
55
|
-
} | {
|
|
56
54
|
ok?: undefined;
|
|
55
|
+
} | {
|
|
57
56
|
summary?: undefined;
|
|
58
57
|
spans?: undefined;
|
|
59
58
|
id?: undefined;
|
|
60
59
|
error: any;
|
|
60
|
+
ok?: undefined;
|
|
61
61
|
} | {
|
|
62
62
|
error?: undefined;
|
|
63
63
|
summary?: undefined;
|
|
@@ -6,6 +6,14 @@ const LLM_CAPABILITY = {
|
|
|
6
6
|
keySummary: "One model key: Anthropic, OpenAI, Gemini, Groq, Mistral, or Cohere",
|
|
7
7
|
why: "The agent uses a language model to understand requests and produce answers.",
|
|
8
8
|
};
|
|
9
|
+
const DESIGN_SYSTEM_INTELLIGENCE_CAPABILITY = {
|
|
10
|
+
id: "design-system-intelligence",
|
|
11
|
+
label: "Design system intelligence",
|
|
12
|
+
required: false,
|
|
13
|
+
builderIncluded: true,
|
|
14
|
+
keySummary: "Builder Design System Intelligence",
|
|
15
|
+
why: "Uses your brand and design-system guidance to keep generated work on brand.",
|
|
16
|
+
};
|
|
9
17
|
const PROFILES = {
|
|
10
18
|
analytics: {
|
|
11
19
|
appId: "analytics",
|
|
@@ -42,6 +50,7 @@ const PROFILES = {
|
|
|
42
50
|
keySummary: "Gemini for video, or OpenAI / Gemini for images",
|
|
43
51
|
why: "These providers create the images and videos requested in the app.",
|
|
44
52
|
},
|
|
53
|
+
DESIGN_SYSTEM_INTELLIGENCE_CAPABILITY,
|
|
45
54
|
{
|
|
46
55
|
id: "file-storage",
|
|
47
56
|
label: "Media storage",
|
|
@@ -169,6 +178,7 @@ const PROFILES = {
|
|
|
169
178
|
appName: "Design",
|
|
170
179
|
capabilities: [
|
|
171
180
|
LLM_CAPABILITY,
|
|
181
|
+
DESIGN_SYSTEM_INTELLIGENCE_CAPABILITY,
|
|
172
182
|
{
|
|
173
183
|
id: "assets-library",
|
|
174
184
|
label: "Assets library",
|
|
@@ -313,6 +323,7 @@ const PROFILES = {
|
|
|
313
323
|
appName: "Slides",
|
|
314
324
|
capabilities: [
|
|
315
325
|
LLM_CAPABILITY,
|
|
326
|
+
DESIGN_SYSTEM_INTELLIGENCE_CAPABILITY,
|
|
316
327
|
{
|
|
317
328
|
id: "image-generation",
|
|
318
329
|
label: "Image generation",
|
|
@@ -75,9 +75,8 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
75
75
|
user: "user";
|
|
76
76
|
}>>;
|
|
77
77
|
}, z.core.$strip>>, {
|
|
78
|
+
id?: undefined;
|
|
78
79
|
deleted?: undefined;
|
|
79
|
-
found?: undefined;
|
|
80
|
-
message?: undefined;
|
|
81
80
|
providers: {
|
|
82
81
|
id: string;
|
|
83
82
|
label: string;
|
|
@@ -89,45 +88,46 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
89
88
|
}[];
|
|
90
89
|
count: number;
|
|
91
90
|
provider?: undefined;
|
|
91
|
+
found?: undefined;
|
|
92
92
|
registered?: undefined;
|
|
93
|
-
id?: undefined;
|
|
94
93
|
label?: undefined;
|
|
94
|
+
message?: undefined;
|
|
95
95
|
} | {
|
|
96
|
+
id?: undefined;
|
|
96
97
|
deleted?: undefined;
|
|
97
|
-
message?: undefined;
|
|
98
|
-
providers?: undefined;
|
|
99
98
|
count?: undefined;
|
|
99
|
+
providers?: undefined;
|
|
100
100
|
found: boolean;
|
|
101
101
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
102
102
|
registered?: undefined;
|
|
103
|
-
id?: undefined;
|
|
104
103
|
label?: undefined;
|
|
104
|
+
message?: undefined;
|
|
105
105
|
} | {
|
|
106
106
|
deleted?: undefined;
|
|
107
|
-
message?: undefined;
|
|
108
|
-
providers?: undefined;
|
|
109
107
|
count?: undefined;
|
|
108
|
+
providers?: undefined;
|
|
110
109
|
provider?: undefined;
|
|
111
110
|
found: boolean;
|
|
112
111
|
id: string;
|
|
113
112
|
registered?: undefined;
|
|
114
113
|
label?: undefined;
|
|
115
|
-
} | {
|
|
116
|
-
found?: undefined;
|
|
117
114
|
message?: undefined;
|
|
118
|
-
|
|
115
|
+
} | {
|
|
119
116
|
count?: undefined;
|
|
117
|
+
providers?: undefined;
|
|
120
118
|
provider?: undefined;
|
|
119
|
+
found?: undefined;
|
|
121
120
|
deleted: boolean;
|
|
122
121
|
id: string;
|
|
123
122
|
registered?: undefined;
|
|
124
123
|
label?: undefined;
|
|
124
|
+
message?: undefined;
|
|
125
125
|
} | {
|
|
126
126
|
deleted?: undefined;
|
|
127
|
-
found?: undefined;
|
|
128
|
-
providers?: undefined;
|
|
129
127
|
count?: undefined;
|
|
128
|
+
providers?: undefined;
|
|
130
129
|
provider?: undefined;
|
|
130
|
+
found?: undefined;
|
|
131
131
|
registered: boolean;
|
|
132
132
|
id: string;
|
|
133
133
|
label: string;
|
|
@@ -311,10 +311,10 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
311
311
|
notes?: string | undefined;
|
|
312
312
|
scope?: "org" | "user" | undefined;
|
|
313
313
|
}, {
|
|
314
|
+
message?: undefined;
|
|
314
315
|
id?: undefined;
|
|
315
316
|
provider?: undefined;
|
|
316
317
|
deleted?: undefined;
|
|
317
|
-
found?: undefined;
|
|
318
318
|
providers: {
|
|
319
319
|
id: string;
|
|
320
320
|
label: string;
|
|
@@ -325,45 +325,45 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
325
325
|
updatedAt: number;
|
|
326
326
|
}[];
|
|
327
327
|
count: number;
|
|
328
|
+
found?: undefined;
|
|
328
329
|
registered?: undefined;
|
|
329
330
|
label?: undefined;
|
|
330
|
-
message?: undefined;
|
|
331
331
|
} | {
|
|
332
|
+
message?: undefined;
|
|
333
|
+
count?: undefined;
|
|
332
334
|
id?: undefined;
|
|
333
335
|
deleted?: undefined;
|
|
334
|
-
count?: undefined;
|
|
335
336
|
providers?: undefined;
|
|
336
337
|
found: boolean;
|
|
337
338
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
338
339
|
registered?: undefined;
|
|
339
340
|
label?: undefined;
|
|
340
|
-
message?: undefined;
|
|
341
341
|
} | {
|
|
342
|
+
message?: undefined;
|
|
343
|
+
count?: undefined;
|
|
342
344
|
provider?: undefined;
|
|
343
345
|
deleted?: undefined;
|
|
344
|
-
count?: undefined;
|
|
345
346
|
providers?: undefined;
|
|
346
347
|
found: boolean;
|
|
347
348
|
id: string;
|
|
348
349
|
registered?: undefined;
|
|
349
350
|
label?: undefined;
|
|
350
|
-
message?: undefined;
|
|
351
351
|
} | {
|
|
352
|
-
|
|
353
|
-
found?: undefined;
|
|
352
|
+
message?: undefined;
|
|
354
353
|
count?: undefined;
|
|
354
|
+
provider?: undefined;
|
|
355
355
|
providers?: undefined;
|
|
356
|
+
found?: undefined;
|
|
356
357
|
deleted: boolean;
|
|
357
358
|
id: string;
|
|
358
359
|
registered?: undefined;
|
|
359
360
|
label?: undefined;
|
|
360
|
-
message?: undefined;
|
|
361
361
|
} | {
|
|
362
|
+
count?: undefined;
|
|
362
363
|
provider?: undefined;
|
|
363
364
|
deleted?: undefined;
|
|
364
|
-
found?: undefined;
|
|
365
|
-
count?: undefined;
|
|
366
365
|
providers?: undefined;
|
|
366
|
+
found?: undefined;
|
|
367
367
|
registered: boolean;
|
|
368
368
|
id: string;
|
|
369
369
|
label: string;
|
package/dist/resources/store.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import crypto from "crypto";
|
|
2
2
|
import { getDbExec, isPostgres, intType, retryOnDdlRace, } from "../db/client.js";
|
|
3
|
-
import { ensureColumnExists, ensureTableExists } from "../db/ddl-guard.js";
|
|
3
|
+
import { ensureColumnExists, ensureIndexExists, ensureTableExists, } from "../db/ddl-guard.js";
|
|
4
4
|
import { widenIntColumnsToBigInt } from "../db/widen-columns.js";
|
|
5
5
|
import { canUseLocalWorkspaceResourcePath, deleteLocalWorkspaceResource, isLocalWorkspaceResourceId, isLocalWorkspaceResourcesEnabled, listLocalWorkspaceResources, localWorkspaceResourcePathFromId, readLocalWorkspaceResource, writeLocalWorkspaceResource, } from "../local-artifacts/index.js";
|
|
6
6
|
import { getRequestOrgId, getRequestUserEmail, } from "../server/request-context.js";
|
|
@@ -655,6 +655,20 @@ async function _doEnsureTable() {
|
|
|
655
655
|
"updated_at",
|
|
656
656
|
"expires_at",
|
|
657
657
|
]);
|
|
658
|
+
// `cleanupExpiredAgentScratchResources` filters on exactly these two columns
|
|
659
|
+
// and, without this, full-scans `resources` — a table shared by every
|
|
660
|
+
// template and read from agent discovery, docs, chat scratch and remote-agent
|
|
661
|
+
// manifests. Its 60s throttle is a module-scope timestamp that starts at 0 in
|
|
662
|
+
// a fresh isolate, so the first resource read after EVERY cold start pays
|
|
663
|
+
// that scan. Idempotent and dialect-agnostic, per the `performance` skill.
|
|
664
|
+
await ensureIndexExists("resources_visibility_expires_idx", `CREATE INDEX IF NOT EXISTS resources_visibility_expires_idx ON resources (visibility, expires_at)`).catch((err) => {
|
|
665
|
+
// An index is an optimization, not a correctness requirement: a
|
|
666
|
+
// concurrent creator or a permissions edge must not fail table init and
|
|
667
|
+
// take the app down with it. The scan it avoids is slow, not wrong — but
|
|
668
|
+
// say so, because "silently slow forever" is the outcome nobody notices.
|
|
669
|
+
// coercion-ok: absence of an index degrades latency, never correctness
|
|
670
|
+
console.warn("[resources] could not ensure resources_visibility_expires_idx; scratch cleanup will full-scan:", err?.message ?? err);
|
|
671
|
+
});
|
|
658
672
|
// Seed default shared resources if they don't exist (INSERT OR IGNORE to avoid race conditions)
|
|
659
673
|
const now = Date.now();
|
|
660
674
|
const seedSql = isPostgres()
|
|
@@ -90,6 +90,23 @@ function terminalTaskError(value) {
|
|
|
90
90
|
: {}),
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* A delegated failure must be an error at the caller's tool boundary. Returning
|
|
95
|
+
* an `Error: ...` string makes the production agent treat the failed call as a
|
|
96
|
+
* successful tool result, so it can spend the rest of its turn retrying or
|
|
97
|
+
* changing arguments while the real failure remains invisible to the loop
|
|
98
|
+
* breaker.
|
|
99
|
+
*/
|
|
100
|
+
class A2AInvocationError extends Error {
|
|
101
|
+
taskId;
|
|
102
|
+
errorCode;
|
|
103
|
+
constructor(message, options = {}) {
|
|
104
|
+
super(message);
|
|
105
|
+
this.name = "A2AInvocationError";
|
|
106
|
+
this.taskId = options.taskId;
|
|
107
|
+
this.errorCode = options.errorCode;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
93
110
|
function buildMessageIdempotencyKey(originatingTurnId, target, exactMessage) {
|
|
94
111
|
if (!originatingTurnId)
|
|
95
112
|
return undefined;
|
|
@@ -363,6 +380,7 @@ export async function run(args, context, selfAppId) {
|
|
|
363
380
|
status: terminalStatus,
|
|
364
381
|
agentCallId,
|
|
365
382
|
durationMs: Date.now() - startedAt,
|
|
383
|
+
...(terminalCode ? { terminalCode } : {}),
|
|
366
384
|
});
|
|
367
385
|
}
|
|
368
386
|
}
|
|
@@ -534,6 +552,13 @@ export async function run(args, context, selfAppId) {
|
|
|
534
552
|
let lastProgressEmitAt = callStartedAt;
|
|
535
553
|
let lastActivitySequence = -1;
|
|
536
554
|
const onRemotePollUpdate = (task) => {
|
|
555
|
+
// Capture the remote task id on every poll, not only on the timeout and
|
|
556
|
+
// error branches that used to set it. Without this a call that SUCCEEDS
|
|
557
|
+
// slowly carries no task id, so "why did this one take four minutes?"
|
|
558
|
+
// cannot be traced into the receiving app's own task record — which is
|
|
559
|
+
// the question worth asking about a slow cross-app call.
|
|
560
|
+
if (task?.id)
|
|
561
|
+
invocationTaskId = task.id;
|
|
537
562
|
const state = task?.status?.state;
|
|
538
563
|
const parts = task.status?.message?.parts;
|
|
539
564
|
const snapshot = Array.isArray(parts)
|
|
@@ -686,7 +711,16 @@ export async function run(args, context, selfAppId) {
|
|
|
686
711
|
agentCallId,
|
|
687
712
|
...(invocationTaskId ? { taskId: invocationTaskId } : {}),
|
|
688
713
|
durationMs: Date.now() - callStartedAt,
|
|
714
|
+
...(invocationTerminalCode
|
|
715
|
+
? { terminalCode: invocationTerminalCode }
|
|
716
|
+
: {}),
|
|
689
717
|
});
|
|
718
|
+
if (terminalStatus === "error") {
|
|
719
|
+
throw new A2AInvocationError(responseText || `Error: The ${agent.name} agent returned no result.`, {
|
|
720
|
+
taskId: invocationTaskId,
|
|
721
|
+
errorCode: invocationTerminalCode,
|
|
722
|
+
});
|
|
723
|
+
}
|
|
690
724
|
return (responseText || `Error: The ${agent.name} agent returned no result.`);
|
|
691
725
|
}
|
|
692
726
|
// No context — use the async + poll call so we don't get cut off at the
|
|
@@ -734,6 +768,8 @@ export async function run(args, context, selfAppId) {
|
|
|
734
768
|
return expanded;
|
|
735
769
|
}
|
|
736
770
|
catch (err) {
|
|
771
|
+
if (err instanceof A2AInvocationError)
|
|
772
|
+
throw err;
|
|
737
773
|
const msg = err?.message ?? String(err);
|
|
738
774
|
const credentialMessage = formatDownstreamLlmCredentialFailure(agent.name, err);
|
|
739
775
|
if (credentialMessage)
|
|
@@ -749,10 +785,13 @@ export async function run(args, context, selfAppId) {
|
|
|
749
785
|
invocationStatus = "error";
|
|
750
786
|
invocationTaskId = terminal.taskId;
|
|
751
787
|
invocationTerminalCode = terminal.errorCode ?? terminal.state;
|
|
752
|
-
|
|
788
|
+
throw new A2AInvocationError(`Error calling ${agent.name}: remote task ${terminal.state}` +
|
|
753
789
|
(terminal.errorCode ? ` (${terminal.errorCode})` : "") +
|
|
754
790
|
(terminal.taskId ? ` [taskId: ${terminal.taskId}]` : "") +
|
|
755
|
-
(terminal.responseText ? `: ${terminal.responseText}` : "")
|
|
791
|
+
(terminal.responseText ? `: ${terminal.responseText}` : ""), {
|
|
792
|
+
taskId: terminal.taskId,
|
|
793
|
+
errorCode: terminal.errorCode ?? terminal.state,
|
|
794
|
+
});
|
|
756
795
|
}
|
|
757
796
|
const timeoutTaskId = getA2ATaskTimeoutTaskId(err);
|
|
758
797
|
if (timeoutTaskId) {
|
|
@@ -766,11 +805,13 @@ export async function run(args, context, selfAppId) {
|
|
|
766
805
|
if (/timeout|did not complete|Inactivity|504/i.test(msg)) {
|
|
767
806
|
invocationStatus = "error";
|
|
768
807
|
invocationTerminalCode = "timeout_without_task";
|
|
769
|
-
|
|
808
|
+
throw new A2AInvocationError(`Error calling ${agent.name}: the remote request timed out before a task id could be recovered.`, { errorCode: "timeout_without_task" });
|
|
770
809
|
}
|
|
771
810
|
invocationStatus = "error";
|
|
772
811
|
invocationTerminalCode = "call_failed";
|
|
773
|
-
|
|
812
|
+
throw new A2AInvocationError(`Error calling ${agent.name}: ${msg}`, {
|
|
813
|
+
errorCode: "call_failed",
|
|
814
|
+
});
|
|
774
815
|
}
|
|
775
816
|
finally {
|
|
776
817
|
trackA2AInvocation({
|
package/dist/secrets/routes.d.ts
CHANGED
|
@@ -37,17 +37,17 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
|
|
|
37
37
|
ok?: undefined;
|
|
38
38
|
status?: undefined;
|
|
39
39
|
} | {
|
|
40
|
+
error?: undefined;
|
|
40
41
|
ok: boolean;
|
|
41
42
|
status: string;
|
|
42
|
-
error?: undefined;
|
|
43
43
|
} | {
|
|
44
44
|
ok?: undefined;
|
|
45
45
|
error: string;
|
|
46
46
|
removed?: undefined;
|
|
47
47
|
} | {
|
|
48
|
+
error?: undefined;
|
|
48
49
|
ok: boolean;
|
|
49
50
|
removed: boolean;
|
|
50
|
-
error?: undefined;
|
|
51
51
|
}>>;
|
|
52
52
|
/**
|
|
53
53
|
* POST /_agent-native/secrets/:key/test — validate an optional candidate value
|
|
@@ -58,13 +58,13 @@ export declare function createTestSecretHandler(): import("h3").EventHandlerWith
|
|
|
58
58
|
error: string;
|
|
59
59
|
note?: undefined;
|
|
60
60
|
} | {
|
|
61
|
+
error?: undefined;
|
|
61
62
|
ok: boolean;
|
|
62
63
|
note?: undefined;
|
|
63
|
-
error?: undefined;
|
|
64
64
|
} | {
|
|
65
|
+
error?: undefined;
|
|
65
66
|
ok: boolean;
|
|
66
67
|
note: string;
|
|
67
|
-
error?: undefined;
|
|
68
68
|
} | {
|
|
69
69
|
note?: undefined;
|
|
70
70
|
ok: boolean;
|
|
@@ -95,11 +95,11 @@ export interface AdHocSecretPayload {
|
|
|
95
95
|
export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
|
|
96
96
|
error: string;
|
|
97
97
|
} | {
|
|
98
|
+
error?: undefined;
|
|
98
99
|
ok: boolean;
|
|
99
100
|
key: string;
|
|
100
|
-
error?: undefined;
|
|
101
101
|
} | {
|
|
102
|
+
error?: undefined;
|
|
102
103
|
ok: boolean;
|
|
103
104
|
removed: boolean;
|
|
104
|
-
error?: undefined;
|
|
105
105
|
}>>;
|
|
@@ -75,7 +75,7 @@ type A2AAgentLoopRunner = typeof runAgentLoopDirectWithSoftTimeout;
|
|
|
75
75
|
export declare const DEFAULT_DELEGATED_MAX_ITERATIONS = 80;
|
|
76
76
|
export declare const DEFAULT_DELEGATED_MAX_RUN_INPUT_TOKENS = 750000;
|
|
77
77
|
export declare const DEFAULT_DELEGATED_MAX_TOOL_RESULT_CHARS = 20000;
|
|
78
|
-
export declare const DELEGATED_AGENT_EXECUTION_CONTRACT = "\n<delegated-agent-contract>\nThis request was delegated by another app. You are the specialist owner of the work.\n- Interpret the caller's natural-language objective using your own instructions, skills, data dictionary, credentials, and tools. Choose providers, schemas, queries, and joins here; never ask the caller to invent SQL or source-specific implementation details for you.\n- Finish the objective autonomously in this delegated turn whenever a safe, reasonable default exists. Do not bounce the work back with UI-navigation requests, implementation questions, or intermediate status. Ask for input only when authorization, missing credentials, or a consequential user choice truly blocks progress.\n- When evidence is incomplete, return the best grounded partial answer with explicit coverage gaps instead of refusing or asking the caller to choose your source, filter, dashboard, or workflow.\n- Minimize round trips. Filter, join, aggregate, paginate, stage, and reduce large datasets inside your own tools rather than returning raw records or transcripts.\n- Return a concise caller-ready result with the answer, source and coverage details, relevant counts or IDs, caveats/partial gaps, and exact artifact URLs. Do not return tool transcripts or large raw payloads.\n</delegated-agent-contract>";
|
|
78
|
+
export declare const DELEGATED_AGENT_EXECUTION_CONTRACT = "\n<delegated-agent-contract>\nThis request was delegated by another app. You are the specialist owner of the work.\n- Interpret the caller's natural-language objective using your own instructions, skills, data dictionary, credentials, and tools. Choose providers, schemas, queries, and joins here; never ask the caller to invent SQL or source-specific implementation details for you.\n- Finish the objective autonomously in this delegated turn whenever a safe, reasonable default exists. Do not bounce the work back with UI-navigation requests, implementation questions, or intermediate status. Ask for input only when authorization, missing credentials, or a consequential user choice truly blocks progress.\n- When evidence is incomplete, return the best grounded partial answer with explicit coverage gaps instead of refusing or asking the caller to choose your source, filter, dashboard, or workflow.\n- Reach for your own registered actions first and by name. They are the same actions this app's interactive chat uses and are almost always the shortest path to the answer. Do not rediscover your own capabilities by exploring, and never use a shell, filesystem, or code-execution tool to do what one of your actions already does \u2014 that is the difference between answering in seconds and answering in minutes.\n- Minimize round trips. Filter, join, aggregate, paginate, stage, and reduce large datasets inside your own tools rather than returning raw records or transcripts.\n- Return a concise caller-ready result with the answer, source and coverage details, relevant counts or IDs, caveats/partial gaps, and exact artifact URLs. Do not return tool transcripts or large raw payloads.\n</delegated-agent-contract>";
|
|
79
79
|
export interface DelegatedAgentLoopTelemetry {
|
|
80
80
|
runId: string;
|
|
81
81
|
threadId: string | null;
|
|
@@ -4,6 +4,7 @@ import { collectFinalResponseTextFromAgentEvents } from "../../a2a/response-text
|
|
|
4
4
|
import { resolveMainChatMaxOutputTokens } from "../../agent/engine/output-tokens.js";
|
|
5
5
|
import { filterInitialEngineTools, resolveAgentRequestReasoningEffort, } from "../../agent/production-agent.js";
|
|
6
6
|
import { runAgentLoopDirectWithSoftTimeout } from "../../agent/run-loop-with-resume.js";
|
|
7
|
+
import { resolveRunSoftTimeoutMs } from "../../agent/run-manager.js";
|
|
7
8
|
import { isAuthenticatedReadAction, isAutoReadExcludedActionName, } from "../../mcp/build-server.js";
|
|
8
9
|
import { withConfiguredAppBasePath } from "../app-base-path.js";
|
|
9
10
|
// ---------------------------------------------------------------------------
|
|
@@ -255,12 +256,44 @@ function formatA2ATerminalError(event) {
|
|
|
255
256
|
export const DEFAULT_DELEGATED_MAX_ITERATIONS = 80;
|
|
256
257
|
export const DEFAULT_DELEGATED_MAX_RUN_INPUT_TOKENS = 750_000;
|
|
257
258
|
export const DEFAULT_DELEGATED_MAX_TOOL_RESULT_CHARS = 20_000;
|
|
259
|
+
/**
|
|
260
|
+
* A sentence naming the wall clock this delegated step actually gets, or "" when
|
|
261
|
+
* there is no enforced budget (local dev returns 0 from the resolver).
|
|
262
|
+
*
|
|
263
|
+
* "I ran out of time before finishing this step" was 39% of all failed inbound
|
|
264
|
+
* A2A tasks in one measured week, clustered at 35-46s against a 40s foreground
|
|
265
|
+
* serverless wall. The callee was never told that wall exists: it is handed a
|
|
266
|
+
* nominal 80 iterations and 750k tokens and plans accordingly, while production
|
|
267
|
+
* iterations measure ~34s each — so a foreground chunk affords roughly one.
|
|
268
|
+
*
|
|
269
|
+
* The clock is already enforced correctly; a second, cruder cap on iterations
|
|
270
|
+
* would only waste budget. What was missing is that the agent could not see it.
|
|
271
|
+
* An agent that knows it has forty seconds scopes to forty seconds.
|
|
272
|
+
*/
|
|
273
|
+
function delegatedTimeBudgetNote(runSoftTimeoutMs, backgroundFunction) {
|
|
274
|
+
const softTimeoutMs = resolveRunSoftTimeoutMs(runSoftTimeoutMs, {
|
|
275
|
+
useHostedDefault: true,
|
|
276
|
+
backgroundFunction,
|
|
277
|
+
});
|
|
278
|
+
if (!Number.isFinite(softTimeoutMs) || softTimeoutMs <= 0)
|
|
279
|
+
return "";
|
|
280
|
+
const seconds = Math.max(1, Math.round(softTimeoutMs / 1000));
|
|
281
|
+
return (`\n<delegated-time-budget>\n` +
|
|
282
|
+
`This step is cut off after about ${seconds} seconds. Scope the work to fit it. ` +
|
|
283
|
+
`Prefer one decisive action over exploring, and note that a single tool call plus a model ` +
|
|
284
|
+
`response commonly takes tens of seconds — so plan on completing very few steps, not many. ` +
|
|
285
|
+
`If the objective cannot be finished in that window, return the best grounded partial answer ` +
|
|
286
|
+
`and say what is missing. Do not begin work you cannot finish, and do not treat this budget ` +
|
|
287
|
+
`as a reason to skip verifying what you do report.\n` +
|
|
288
|
+
`</delegated-time-budget>`);
|
|
289
|
+
}
|
|
258
290
|
export const DELEGATED_AGENT_EXECUTION_CONTRACT = `
|
|
259
291
|
<delegated-agent-contract>
|
|
260
292
|
This request was delegated by another app. You are the specialist owner of the work.
|
|
261
293
|
- Interpret the caller's natural-language objective using your own instructions, skills, data dictionary, credentials, and tools. Choose providers, schemas, queries, and joins here; never ask the caller to invent SQL or source-specific implementation details for you.
|
|
262
294
|
- Finish the objective autonomously in this delegated turn whenever a safe, reasonable default exists. Do not bounce the work back with UI-navigation requests, implementation questions, or intermediate status. Ask for input only when authorization, missing credentials, or a consequential user choice truly blocks progress.
|
|
263
295
|
- When evidence is incomplete, return the best grounded partial answer with explicit coverage gaps instead of refusing or asking the caller to choose your source, filter, dashboard, or workflow.
|
|
296
|
+
- Reach for your own registered actions first and by name. They are the same actions this app's interactive chat uses and are almost always the shortest path to the answer. Do not rediscover your own capabilities by exploring, and never use a shell, filesystem, or code-execution tool to do what one of your actions already does — that is the difference between answering in seconds and answering in minutes.
|
|
264
297
|
- Minimize round trips. Filter, join, aggregate, paginate, stage, and reduce large datasets inside your own tools rather than returning raw records or transcripts.
|
|
265
298
|
- Return a concise caller-ready result with the answer, source and coverage details, relevant counts or IDs, caveats/partial gaps, and exact artifact URLs. Do not return tool transcripts or large raw payloads.
|
|
266
299
|
</delegated-agent-contract>`;
|
|
@@ -271,7 +304,9 @@ async function runDelegatedAgentLoop(runOptions, pluginOptions, timeoutOptions,
|
|
|
271
304
|
const delegatedHardToolResultCap = policy?.maxToolResultChars ?? DEFAULT_DELEGATED_MAX_TOOL_RESULT_CHARS;
|
|
272
305
|
const resolvedRunOptions = {
|
|
273
306
|
...runOptions,
|
|
274
|
-
systemPrompt: runOptions.systemPrompt +
|
|
307
|
+
systemPrompt: runOptions.systemPrompt +
|
|
308
|
+
DELEGATED_AGENT_EXECUTION_CONTRACT +
|
|
309
|
+
delegatedTimeBudgetNote(pluginOptions.runSoftTimeoutMs, timeoutOptions?.backgroundFunction === true),
|
|
275
310
|
// Delegated runs resolve their own model and do not pass through the
|
|
276
311
|
// interactive request handler's output-token setup. Use the same
|
|
277
312
|
// model-aware headroom here so reasoning models (notably GPT-5.x) do
|
|
@@ -1237,17 +1237,38 @@ export function createAgentChatPlugin(options) {
|
|
|
1237
1237
|
? ""
|
|
1238
1238
|
: await buildSchemaBlock(owner, databaseToolsMode);
|
|
1239
1239
|
const extra = await resolveExtraContext(context.event, owner);
|
|
1240
|
+
const a2aStoredModel = await getStoredModelForEngine(a2aEngine, {
|
|
1241
|
+
appId: options?.appId,
|
|
1242
|
+
});
|
|
1243
|
+
// Preference only, and last before the default: an app that pinned
|
|
1244
|
+
// a model keeps it. Read separately from the correlation sanitizer
|
|
1245
|
+
// below so it stays out of every identity/access path.
|
|
1246
|
+
const a2aCallerModelHint = sanitizeA2ACorrelationMetadata(context.metadata).callerModel;
|
|
1240
1247
|
const model = resolveDelegatedRunModel(a2aEngine, {
|
|
1241
1248
|
explicitModel: options?.model,
|
|
1242
|
-
storedModel:
|
|
1243
|
-
|
|
1244
|
-
}),
|
|
1245
|
-
// Preference only, and last before the default: an app that pinned
|
|
1246
|
-
// a model keeps it. Read separately from the correlation sanitizer
|
|
1247
|
-
// below so it stays out of every identity/access path.
|
|
1248
|
-
callerModelHint: sanitizeA2ACorrelationMetadata(context.metadata)
|
|
1249
|
-
.callerModel,
|
|
1249
|
+
storedModel: a2aStoredModel,
|
|
1250
|
+
callerModelHint: a2aCallerModelHint,
|
|
1250
1251
|
});
|
|
1252
|
+
// The interactive path logs its model AND where the model came from;
|
|
1253
|
+
// this path logged neither, so "the same app answers me in 27s but
|
|
1254
|
+
// takes 5 minutes when another app asks" had no way to be checked.
|
|
1255
|
+
// The usual answer is right here: the chat model picker is a
|
|
1256
|
+
// browser-local preference, so it reaches an interactive turn as the
|
|
1257
|
+
// highest-precedence request model and never reaches this path at
|
|
1258
|
+
// all — a delegated turn falls through to the app's stored model or
|
|
1259
|
+
// the engine default, which can be a different, weaker model.
|
|
1260
|
+
console.log(`[a2a] resolved engine=${a2aEngine.name} model=${model} ` +
|
|
1261
|
+
// A hint the callee's engine does not offer is dropped, so the
|
|
1262
|
+
// label is derived from what actually won — reporting
|
|
1263
|
+
// "caller-hint" for a rejected hint would send the next person
|
|
1264
|
+
// debugging this in exactly the wrong direction.
|
|
1265
|
+
`modelSource=${options?.model
|
|
1266
|
+
? "configured"
|
|
1267
|
+
: a2aStoredModel
|
|
1268
|
+
? "stored"
|
|
1269
|
+
: a2aCallerModelHint && model === a2aCallerModelHint
|
|
1270
|
+
? "caller-hint"
|
|
1271
|
+
: "default"} callerHint=${a2aCallerModelHint ?? "(none)"} appId=${options?.appId ?? "(none)"}`);
|
|
1251
1272
|
if (a2aRunContext) {
|
|
1252
1273
|
a2aRunContext.engine = a2aEngine;
|
|
1253
1274
|
a2aRunContext.model = model;
|
|
@@ -27,10 +27,10 @@ export declare function resolveAgentEngineApiKeyWriteTarget(event: H3Event, scop
|
|
|
27
27
|
export declare function createAgentEngineApiKeyHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
28
28
|
error: any;
|
|
29
29
|
} | {
|
|
30
|
+
error?: undefined;
|
|
30
31
|
ok: boolean;
|
|
31
32
|
key: string;
|
|
32
33
|
baseUrlKey?: string;
|
|
33
34
|
scope: AgentEngineApiKeyScope;
|
|
34
|
-
error?: undefined;
|
|
35
35
|
}>>;
|
|
36
36
|
export {};
|