@agent-native/core 0.97.0 → 0.98.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/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +32 -0
- package/corpus/core/docs/content/authentication.mdx +3 -3
- package/corpus/core/docs/content/doctor.mdx +170 -0
- package/corpus/core/docs/content/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/ar-SA/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/security.mdx +2 -0
- package/corpus/core/docs/content/locales/de-DE/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/de-DE/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/security.mdx +2 -0
- package/corpus/core/docs/content/locales/es-ES/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/es-ES/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/security.mdx +2 -0
- package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/fr-FR/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/security.mdx +2 -0
- package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/hi-IN/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/security.mdx +2 -0
- package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/ja-JP/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/security.mdx +2 -0
- package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/ko-KR/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/security.mdx +2 -0
- package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/pt-BR/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/security.mdx +2 -0
- package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/zh-CN/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/security.mdx +2 -0
- package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/zh-TW/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/security.mdx +2 -0
- package/corpus/core/docs/content/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/security.mdx +2 -0
- package/corpus/core/package.json +5 -1
- package/corpus/core/scripts/finalize-build.mjs +63 -3
- package/corpus/core/scripts/materialize-source-corpus.mjs +101 -15
- package/corpus/core/src/action.ts +42 -0
- package/corpus/core/src/agent/engine/builder-engine.ts +3 -0
- package/corpus/core/src/agent/engine/context-directives-transform.ts +69 -0
- package/corpus/core/src/agent/engine/continuation-dispatch-retry.ts +168 -0
- package/corpus/core/src/agent/engine/tool-call-journal-seed.ts +85 -0
- package/corpus/core/src/agent/production-agent.ts +129 -244
- package/corpus/core/src/cli/doctor.ts +9 -3
- package/corpus/core/src/cli/plan-local.ts +10 -2
- package/corpus/core/src/cli/skills-content/assets-skill.ts +83 -0
- package/corpus/core/src/cli/skills-content/canvas.ts +153 -0
- package/corpus/core/src/cli/skills-content/connection.ts +52 -0
- package/corpus/core/src/cli/skills-content/content-skill.ts +109 -0
- package/corpus/core/src/cli/skills-content/design-exploration-skill.ts +118 -0
- package/corpus/core/src/cli/skills-content/design-visual-edit-skill.ts +228 -0
- package/corpus/core/src/cli/skills-content/document-quality.ts +196 -0
- package/corpus/core/src/cli/skills-content/exemplar.ts +69 -0
- package/corpus/core/src/cli/skills-content/help.ts +77 -0
- package/corpus/core/src/cli/skills-content/index.ts +22 -0
- package/corpus/core/src/cli/skills-content/local-files.ts +95 -0
- package/corpus/core/src/cli/skills-content/plan-setup-auth.ts +80 -0
- package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +470 -0
- package/corpus/core/src/cli/skills-content/visual-recap-skill.ts +547 -0
- package/corpus/core/src/cli/skills-content/visualize-repo-skill.ts +93 -0
- package/corpus/core/src/cli/skills-content/wireframe.ts +349 -0
- package/corpus/core/src/cli/skills.ts +27 -2733
- package/corpus/core/src/client/AgentPanel.tsx +6 -5
- package/corpus/core/src/client/CommandMenu.tsx +16 -5
- package/corpus/core/src/client/FeedbackButton.tsx +2 -2
- package/corpus/core/src/client/app-providers.tsx +18 -5
- package/corpus/core/src/client/chat/tool-call-display.tsx +3 -3
- package/corpus/core/src/client/composer/PastedTextChip.tsx +1 -1
- package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +143 -45
- package/corpus/core/src/client/composer/TiptapComposer.tsx +1 -1
- package/corpus/core/src/client/composer/VoiceButton.tsx +21 -5
- package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +107 -10
- package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +5 -2
- package/corpus/core/src/client/extensions/ExtensionEditor.tsx +37 -4
- package/corpus/core/src/client/extensions/ExtensionQueryErrorState.tsx +47 -0
- package/corpus/core/src/client/extensions/ExtensionSlot.tsx +39 -10
- package/corpus/core/src/client/extensions/ExtensionViewer.tsx +44 -6
- package/corpus/core/src/client/extensions/ExtensionsListPage.tsx +12 -3
- package/corpus/core/src/client/extensions/ExtensionsSidebarSection.tsx +49 -11
- package/corpus/core/src/client/index.ts +0 -13
- package/corpus/core/src/client/progress/RunsTray.tsx +10 -3
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +7 -0
- package/corpus/core/src/client/settings/useBuilderStatus.ts +6 -0
- package/corpus/core/src/client/tool-cells/EditCell.tsx +19 -16
- package/corpus/core/src/client/tool-cells/FilesChangedSummary.tsx +26 -23
- package/corpus/core/src/client/tool-cells/WriteCell.tsx +19 -16
- package/corpus/core/src/client/visual-style-controls.tsx +1 -1
- package/corpus/core/src/deploy/build.ts +36 -14
- package/corpus/core/src/integrations/google-docs-poller.ts +23 -2
- package/corpus/core/src/integrations/plugin.ts +10 -0
- package/corpus/core/src/integrations/webhook-handler.ts +27 -2
- package/corpus/core/src/jobs/scheduler.ts +28 -2
- package/corpus/core/src/localization/default-messages.ts +8 -1
- package/corpus/core/src/mcp/oauth-token.ts +6 -1
- package/corpus/core/src/observability/routes.ts +36 -0
- package/corpus/core/src/observability/sentiment.ts +261 -0
- package/corpus/core/src/observability/store.ts +23 -0
- package/corpus/core/src/observability/traces.ts +49 -63
- package/corpus/core/src/observability/tracking-identity.ts +55 -0
- package/corpus/core/src/observability/types.ts +13 -0
- package/corpus/core/src/secrets/storage.ts +67 -3
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +199 -0
- package/corpus/core/src/server/agent-chat/browser-team-tools.ts +510 -0
- package/corpus/core/src/server/agent-chat/context-tools.ts +595 -0
- package/corpus/core/src/server/agent-chat/framework-prompts.ts +470 -0
- package/corpus/core/src/server/agent-chat/lazy-fs.ts +11 -0
- package/corpus/core/src/server/agent-chat/mcp-glue.ts +91 -0
- package/corpus/core/src/server/agent-chat/plugin-options.ts +350 -0
- package/corpus/core/src/server/agent-chat/process-run-failure.ts +62 -0
- package/corpus/core/src/server/agent-chat/prompt-resources.ts +688 -0
- package/corpus/core/src/server/agent-chat/recurring-jobs-runtime.ts +80 -0
- package/corpus/core/src/server/agent-chat/request-surface.ts +71 -0
- package/corpus/core/src/server/agent-chat/run-code-tools.ts +67 -0
- package/corpus/core/src/server/agent-chat/script-entries.ts +779 -0
- package/corpus/core/src/server/agent-chat/shared-thread.ts +301 -0
- package/corpus/core/src/server/agent-chat/skill-frontmatter.ts +41 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +364 -4182
- package/corpus/core/src/server/agent-teams.ts +26 -3
- package/corpus/core/src/server/auth.ts +55 -57
- package/corpus/core/src/server/credential-provider.ts +22 -25
- package/corpus/core/src/server/edge.ts +1 -0
- package/corpus/core/src/server/onboarding-html.ts +1 -16
- package/corpus/core/src/server/realtime-voice.ts +40 -5
- package/corpus/core/src/server/request-origin.ts +6 -2
- package/corpus/core/src/server/ssr-handler.ts +55 -2
- package/corpus/core/src/sharing/access.ts +155 -11
- package/corpus/core/src/sharing/registry.ts +7 -0
- package/corpus/core/src/styles/agent-native.css +15 -14
- package/corpus/core/src/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/de-DE.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/en-US.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/es-ES.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +6 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +27 -29
- package/corpus/core/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +2 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/observability/SKILL.md +32 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +25 -0
- package/corpus/core/src/templates/workspace-core/src/server/index.ts +4 -2
- package/corpus/core/src/testing.ts +26 -0
- package/corpus/core/src/triggers/dispatcher.ts +23 -2
- package/corpus/core/src/vite/client.ts +126 -2
- package/corpus/core/tsconfig.cli.json +1 -1
- package/corpus/core/tsconfig.json +5 -1
- package/corpus/templates/analytics/.agents/skills/bigquery/SKILL.md +2 -2
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/analytics/AGENTS.md +19 -6
- package/corpus/templates/analytics/actions/install-dashboard-template.ts +79 -43
- package/corpus/templates/analytics/actions/list-explorer-dashboards.ts +3 -3
- package/corpus/templates/analytics/actions/list-sql-dashboards.ts +8 -3
- package/corpus/templates/analytics/actions/rename-analysis.ts +8 -2
- package/corpus/templates/analytics/actions/rename-dashboard.ts +8 -7
- package/corpus/templates/analytics/actions/view-screen.ts +4 -23
- package/corpus/templates/analytics/app/components/ResourceLoadError.tsx +42 -0
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +85 -70
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +107 -89
- package/corpus/templates/analytics/app/components/layout/SidebarLoadError.tsx +24 -0
- package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +15 -5
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/analytics/app/i18n-data.ts +40 -0
- package/corpus/templates/analytics/app/pages/Settings.tsx +6 -2
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +36 -20
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +34 -20
- package/corpus/templates/analytics/app/pages/adhoc/explorer/use-explorer-config.ts +42 -41
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +43 -36
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +11 -2
- package/corpus/templates/analytics/app/root.tsx +13 -1
- package/corpus/templates/analytics/app/routes/_index.tsx +14 -2
- package/corpus/templates/analytics/changelog/2026-07-03-agent-llm-observability-dashboard.md +1 -1
- package/corpus/templates/analytics/changelog/2026-07-11-agent-feedback-sentiment-dashboard.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-analytics-chats-now-start-faster-by-loading-metric-definitio.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-command-and-sql-previews-now-respond-without-lag.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-command-search-now-reports-loading-failures-and-lets-you-ret.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-dashboard-navigation-now-loads-faster-and-reports-request-fa.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-inferred-message-sentiment-dashboard.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-microphone-settings-from-realtime-voice-mode-now-open-the-vo.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-more-dashboard-edit-paths-are-now-safe-against-simultaneous-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-renaming-a-dashboard-is-now-safe-against-simultaneous-agent-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-renaming-an-analysis-is-now-safe-against-simultaneous-edits.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-workspace-mounted-analytics-now-opens-ask-reliably-and-route.md +6 -0
- package/corpus/templates/analytics/docs/schemas/first-party-analytics.md +37 -3
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +339 -1
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +1 -24
- package/corpus/templates/analytics/server/lib/dashboard-seeds.ts +0 -5
- package/corpus/templates/analytics/server/lib/dashboards-store.ts +289 -20
- package/corpus/templates/analytics/server/lib/data-dictionary-context.ts +106 -34
- package/corpus/templates/analytics/server/lib/demo-dashboards.ts +4 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +11 -39
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +30 -4
- package/corpus/templates/assets/app/routes/library.tsx +49 -5
- package/corpus/templates/assets/changelog/2026-07-11-library-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/calendar/.env.example +5 -0
- package/corpus/templates/calendar/app/components/calendar/EventCard.tsx +2 -2
- 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/pages/BookingLinksPage.tsx +37 -1
- package/corpus/templates/calendar/app/pages/BookingsList.tsx +20 -3
- package/corpus/templates/calendar/changelog/2026-07-11-booking-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-11-event-cards-give-subtle-press-feedback-and-smoother-hover.md +6 -0
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/clips/actions/decline-invite.ts +8 -0
- package/corpus/templates/clips/app/components/library/folder-tree.tsx +209 -187
- package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +2 -2
- package/corpus/templates/clips/app/components/player/reactions-tray.tsx +17 -5
- package/corpus/templates/clips/app/components/player/scrubber.tsx +5 -3
- package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +2 -2
- package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +119 -95
- package/corpus/templates/clips/app/global.css +45 -0
- package/corpus/templates/clips/app/root.tsx +4 -0
- package/corpus/templates/clips/app/routes/_app.notifications.tsx +23 -2
- package/corpus/templates/clips/app/routes/_app.trash.tsx +24 -2
- package/corpus/templates/clips/changelog/2026-07-11-controls-and-folders-now-move-more-smoothly.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-declining-an-invitation-now-requires-being-its-recipient.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-recording-overlays-are-lighter-weight-and-no-longer-cause-pa.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-workspace-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/overlay.css +34 -5
- package/corpus/templates/clips/chrome-extension/src/styles.css +2 -2
- package/corpus/templates/clips/desktop/src/styles.css +71 -26
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/content/actions/move-document.ts +34 -18
- package/corpus/templates/content/app/components/QueryErrorState.tsx +39 -0
- package/corpus/templates/content/app/components/editor/LinkHoverPreview.tsx +1 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +225 -1435
- package/corpus/templates/content/app/components/editor/database/GalleryView.tsx +368 -0
- package/corpus/templates/content/app/components/editor/database/ListView.tsx +353 -0
- package/corpus/templates/content/app/components/editor/database/TimelineView.tsx +580 -0
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +11 -2
- package/corpus/templates/content/app/global.css +19 -19
- package/corpus/templates/content/app/root.tsx +2 -2
- package/corpus/templates/content/app/routes/_app._index.tsx +11 -1
- package/corpus/templates/content/changelog/2026-07-11-document-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-editor-toggle-feedback-now-feels-more-responsive.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-moving-documents-at-the-same-time-no-longer-scrambles-their-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-public-document-chats-now-start-faster-while-keeping-full-do.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-reopening-a-comment-now-uses-consistent-permissions-everywhe.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-sidebar-resizing-now-tracks-your-cursor-instantly-instead-of.md +6 -0
- package/corpus/templates/content/server/lib/public-documents.ts +47 -10
- package/corpus/templates/content/server/routes/api/comments/[id].patch.ts +24 -24
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/design/app/components/QueryErrorState.tsx +24 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +1 -1
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +5 -2
- package/corpus/templates/design/app/components/design/EditPanel.tsx +326 -319
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +198 -193
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +11 -4
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +1 -1
- package/corpus/templates/design/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/design/app/pages/DesignSystems.tsx +7 -1
- package/corpus/templates/design/app/pages/Index.tsx +14 -2
- package/corpus/templates/design/app/pages/Present.tsx +16 -3
- package/corpus/templates/design/app/pages/Templates.tsx +10 -4
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +484 -0
- package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +378 -0
- package/corpus/templates/design/app/pages/design-editor/design-data-geometry-utils.ts +138 -0
- package/corpus/templates/design/app/pages/design-editor/dom-utils.ts +15 -0
- package/corpus/templates/design/app/pages/design-editor/generation-prompt-directives.ts +180 -0
- package/corpus/templates/design/app/pages/design-editor/html-layer-positioning.ts +226 -0
- package/corpus/templates/design/app/pages/design-editor/png-export-render.ts +348 -0
- package/corpus/templates/design/app/pages/design-editor/screen-command-utils.ts +160 -0
- package/corpus/templates/design/app/pages/design-editor/text-edit-utils.ts +238 -0
- package/corpus/templates/design/app/pages/design-editor/tool-state.ts +23 -1
- package/corpus/templates/design/app/pages/design-editor/types.ts +25 -0
- package/corpus/templates/design/app/root.tsx +10 -1
- package/corpus/templates/design/changelog/2026-07-11-canvas-context-menus-now-open-without-motion-jitter.md +6 -0
- package/corpus/templates/design/changelog/2026-07-11-design-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/design/changelog/2026-07-11-inspector-tooltips-appear-instantly-as-you-sweep-across-icon.md +6 -0
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/dispatch/app/i18n/zh-TW.ts +10 -0
- package/corpus/templates/dispatch/app/i18n-data.ts +123 -0
- package/corpus/templates/dispatch/app/routes/integrations.tsx +163 -144
- package/corpus/templates/dispatch/changelog/2026-07-11-dispatch-mcp-connections-now-start-with-safer-app-access-and.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-11-overview-and-chat-now-share-a-cleaner-more-stable-flow.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-11-query-errors-now-show-a-retry-option.md +6 -0
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +3 -3
- package/corpus/templates/forms/app/root.tsx +34 -8
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/macros/app/components/DailyProgress.tsx +25 -5
- package/corpus/templates/macros/app/components/QueryErrorState.tsx +31 -0
- package/corpus/templates/macros/app/components/WeightTracker.tsx +5 -1
- package/corpus/templates/macros/app/components/ui/button.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/progress.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/tabs.tsx +1 -1
- package/corpus/templates/macros/app/i18n/ar-SA.ts +2 -0
- package/corpus/templates/macros/app/i18n/de-DE.ts +2 -0
- package/corpus/templates/macros/app/i18n/en-US.ts +2 -0
- package/corpus/templates/macros/app/i18n/es-ES.ts +2 -0
- package/corpus/templates/macros/app/i18n/fr-FR.ts +2 -0
- package/corpus/templates/macros/app/i18n/hi-IN.ts +2 -0
- package/corpus/templates/macros/app/i18n/ja-JP.ts +2 -0
- package/corpus/templates/macros/app/i18n/ko-KR.ts +2 -0
- package/corpus/templates/macros/app/i18n/pt-BR.ts +2 -0
- package/corpus/templates/macros/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/macros/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/macros/app/routes/_index.tsx +22 -12
- package/corpus/templates/macros/app/routes/analytics.tsx +31 -10
- package/corpus/templates/macros/changelog/2026-07-11-daily-tracking-now-loads-and-updates-more-quickly.md +6 -0
- package/corpus/templates/macros/changelog/2026-07-11-data-load-failures-now-show-a-clear-error-with-a-retry-actio.md +6 -0
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/mail/.env.example +16 -11
- package/corpus/templates/mail/actions/list-emails.ts +39 -35
- package/corpus/templates/mail/app/components/email/ComposeModal.tsx +58 -6
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +35 -2
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +113 -104
- package/corpus/templates/mail/app/root.tsx +8 -10
- package/corpus/templates/mail/changelog/2026-07-11-compose-and-navigation-motion-now-feel-faster-and-smoother.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-11-swipe-to-archive-or-snooze-now-responds-to-quick-flicks-not-.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-11-the-assistant-now-sees-the-same-inbox-you-do-snoozed-mail-st.md +6 -0
- package/corpus/templates/mail/server/handlers/emails.ts +25 -69
- package/corpus/templates/mail/server/lib/list-inbox-emails.ts +169 -0
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/plan/.env.example +4 -0
- package/corpus/templates/plan/actions/create-plan-design.ts +89 -81
- package/corpus/templates/plan/actions/create-prototype-plan.ts +72 -59
- package/corpus/templates/plan/actions/create-ui-plan.ts +70 -55
- package/corpus/templates/plan/actions/create-visual-plan.ts +65 -51
- package/corpus/templates/plan/actions/update-local-plan-folder.ts +43 -30
- package/corpus/templates/plan/actions/update-visual-plan.ts +81 -64
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +17 -0
- package/corpus/templates/plan/app/components/ui/tabs.tsx +1 -1
- package/corpus/templates/plan/app/i18n/ar-SA.ts +10 -0
- package/corpus/templates/plan/app/i18n/de-DE.ts +10 -0
- package/corpus/templates/plan/app/i18n/en-US.ts +10 -0
- package/corpus/templates/plan/app/i18n/es-ES.ts +10 -0
- package/corpus/templates/plan/app/i18n/fr-FR.ts +10 -0
- package/corpus/templates/plan/app/i18n/hi-IN.ts +10 -0
- package/corpus/templates/plan/app/i18n/ja-JP.ts +10 -0
- package/corpus/templates/plan/app/i18n/ko-KR.ts +10 -0
- package/corpus/templates/plan/app/i18n/pt-BR.ts +10 -0
- package/corpus/templates/plan/app/i18n/zh-CN.ts +10 -0
- package/corpus/templates/plan/app/i18n/zh-TW.ts +10 -0
- package/corpus/templates/plan/app/lib/plan-local-bridge.ts +80 -1
- package/corpus/templates/plan/app/pages/PlansPage.tsx +152 -4
- package/corpus/templates/plan/app/root.tsx +11 -0
- package/corpus/templates/plan/changelog/2026-07-11-local-plans-now-explain-and-recover-from-browser-permission-.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-11-plan-edits-now-save-atomically-and-can-no-longer-partially-a.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-11-plan-lists-now-show-a-clear-error-with-a-retry-action-when-t.md +6 -0
- package/corpus/templates/plan/shared/plan-content.ts +546 -260
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/slides/actions/delete-slide-comment.ts +49 -0
- package/corpus/templates/slides/actions/update-slide-comment.ts +93 -0
- package/corpus/templates/slides/actions/view-screen.ts +14 -6
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +33 -10
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +2 -2
- package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +4 -2
- package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +4 -3
- package/corpus/templates/slides/app/context/DeckContext.tsx +9 -0
- package/corpus/templates/slides/app/i18n/ar-SA.ts +6 -0
- package/corpus/templates/slides/app/i18n/de-DE.ts +6 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +6 -0
- package/corpus/templates/slides/app/i18n/es-ES.ts +6 -0
- package/corpus/templates/slides/app/i18n/fr-FR.ts +6 -0
- package/corpus/templates/slides/app/i18n/hi-IN.ts +6 -0
- package/corpus/templates/slides/app/i18n/ja-JP.ts +6 -0
- package/corpus/templates/slides/app/i18n/ko-KR.ts +6 -0
- package/corpus/templates/slides/app/i18n/pt-BR.ts +6 -0
- package/corpus/templates/slides/app/i18n/zh-CN.ts +5 -0
- package/corpus/templates/slides/app/i18n/zh-TW.ts +5 -0
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +23 -2
- package/corpus/templates/slides/app/pages/Index.tsx +29 -1
- package/corpus/templates/slides/changelog/2026-07-11-comment-load-failures-now-show-a-retry-action-instead-of-say.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-comment-pins-now-clear-with-a-faster-smoother-confirmation.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-deck-and-design-system-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-editor-toggles-and-toolbar-menus-now-animate-smoothly.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-the-assistant-can-now-resolve-reopen-and-delete-slide-commen.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-viewing-slides-no-longer-loads-every-deck-s-full-contents-in.md +6 -0
- package/corpus/templates/slides/server/routes/api/comments/[id].delete.ts +29 -48
- package/corpus/templates/slides/server/routes/api/comments/[id].patch.ts +29 -65
- package/dist/action.d.ts +23 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +13 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +3 -0
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/engine/context-directives-transform.d.ts +25 -0
- package/dist/agent/engine/context-directives-transform.d.ts.map +1 -0
- package/dist/agent/engine/context-directives-transform.js +53 -0
- package/dist/agent/engine/context-directives-transform.js.map +1 -0
- package/dist/agent/engine/continuation-dispatch-retry.d.ts +40 -0
- package/dist/agent/engine/continuation-dispatch-retry.d.ts.map +1 -0
- package/dist/agent/engine/continuation-dispatch-retry.js +109 -0
- package/dist/agent/engine/continuation-dispatch-retry.js.map +1 -0
- package/dist/agent/engine/tool-call-journal-seed.d.ts +46 -0
- package/dist/agent/engine/tool-call-journal-seed.d.ts.map +1 -0
- package/dist/agent/engine/tool-call-journal-seed.js +60 -0
- package/dist/agent/engine/tool-call-journal-seed.js.map +1 -0
- package/dist/agent/production-agent.d.ts +7 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +102 -222
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +7 -3
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/plan-local.d.ts.map +1 -1
- package/dist/cli/plan-local.js +8 -2
- package/dist/cli/plan-local.js.map +1 -1
- package/dist/cli/skills-content/assets-skill.d.ts +2 -0
- package/dist/cli/skills-content/assets-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/assets-skill.js +84 -0
- package/dist/cli/skills-content/assets-skill.js.map +1 -0
- package/dist/cli/skills-content/canvas.d.ts +4 -0
- package/dist/cli/skills-content/canvas.d.ts.map +1 -0
- package/dist/cli/skills-content/canvas.js +152 -0
- package/dist/cli/skills-content/canvas.js.map +1 -0
- package/dist/cli/skills-content/connection.d.ts +2 -0
- package/dist/cli/skills-content/connection.d.ts.map +1 -0
- package/dist/cli/skills-content/connection.js +53 -0
- package/dist/cli/skills-content/connection.js.map +1 -0
- package/dist/cli/skills-content/content-skill.d.ts +2 -0
- package/dist/cli/skills-content/content-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/content-skill.js +110 -0
- package/dist/cli/skills-content/content-skill.js.map +1 -0
- package/dist/cli/skills-content/design-exploration-skill.d.ts +2 -0
- package/dist/cli/skills-content/design-exploration-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/design-exploration-skill.js +119 -0
- package/dist/cli/skills-content/design-exploration-skill.js.map +1 -0
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts +2 -0
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/design-visual-edit-skill.js +229 -0
- package/dist/cli/skills-content/design-visual-edit-skill.js.map +1 -0
- package/dist/cli/skills-content/document-quality.d.ts +4 -0
- package/dist/cli/skills-content/document-quality.d.ts.map +1 -0
- package/dist/cli/skills-content/document-quality.js +195 -0
- package/dist/cli/skills-content/document-quality.js.map +1 -0
- package/dist/cli/skills-content/exemplar.d.ts +4 -0
- package/dist/cli/skills-content/exemplar.d.ts.map +1 -0
- package/dist/cli/skills-content/exemplar.js +68 -0
- package/dist/cli/skills-content/exemplar.js.map +1 -0
- package/dist/cli/skills-content/help.d.ts +2 -0
- package/dist/cli/skills-content/help.d.ts.map +1 -0
- package/dist/cli/skills-content/help.js +78 -0
- package/dist/cli/skills-content/help.js.map +1 -0
- package/dist/cli/skills-content/index.d.ts +23 -0
- package/dist/cli/skills-content/index.d.ts.map +1 -0
- package/dist/cli/skills-content/index.js +23 -0
- package/dist/cli/skills-content/index.js.map +1 -0
- package/dist/cli/skills-content/local-files.d.ts +2 -0
- package/dist/cli/skills-content/local-files.d.ts.map +1 -0
- package/dist/cli/skills-content/local-files.js +96 -0
- package/dist/cli/skills-content/local-files.js.map +1 -0
- package/dist/cli/skills-content/plan-setup-auth.d.ts +9 -0
- package/dist/cli/skills-content/plan-setup-auth.d.ts.map +1 -0
- package/dist/cli/skills-content/plan-setup-auth.js +81 -0
- package/dist/cli/skills-content/plan-setup-auth.js.map +1 -0
- package/dist/cli/skills-content/visual-plan-skill.d.ts +2 -0
- package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/visual-plan-skill.js +471 -0
- package/dist/cli/skills-content/visual-plan-skill.js.map +1 -0
- package/dist/cli/skills-content/visual-recap-skill.d.ts +2 -0
- package/dist/cli/skills-content/visual-recap-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/visual-recap-skill.js +548 -0
- package/dist/cli/skills-content/visual-recap-skill.js.map +1 -0
- package/dist/cli/skills-content/visualize-repo-skill.d.ts +2 -0
- package/dist/cli/skills-content/visualize-repo-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/visualize-repo-skill.js +94 -0
- package/dist/cli/skills-content/visualize-repo-skill.js.map +1 -0
- package/dist/cli/skills-content/wireframe.d.ts +4 -0
- package/dist/cli/skills-content/wireframe.d.ts.map +1 -0
- package/dist/cli/skills-content/wireframe.js +347 -0
- package/dist/cli/skills-content/wireframe.js.map +1 -0
- package/dist/cli/skills.d.ts +2 -10
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +2 -2710
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +4 -2
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +15 -3
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/FeedbackButton.js +2 -2
- package/dist/client/FeedbackButton.js.map +1 -1
- package/dist/client/app-providers.d.ts +13 -5
- package/dist/client/app-providers.d.ts.map +1 -1
- package/dist/client/app-providers.js +9 -6
- package/dist/client/app-providers.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +4 -0
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +3 -3
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/composer/PastedTextChip.js +1 -1
- package/dist/client/composer/PastedTextChip.js.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.d.ts +3 -1
- package/dist/client/composer/RealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.js +35 -14
- package/dist/client/composer/RealtimeVoiceMode.js.map +1 -1
- package/dist/client/composer/TiptapComposer.js +1 -1
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/VoiceButton.d.ts +2 -0
- package/dist/client/composer/VoiceButton.d.ts.map +1 -1
- package/dist/client/composer/VoiceButton.js +9 -3
- package/dist/client/composer/VoiceButton.js.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.d.ts +5 -0
- package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.js +91 -12
- package/dist/client/composer/useRealtimeVoiceMode.js.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.js +4 -1
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/extensions/ExtensionEditor.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionEditor.js +15 -5
- package/dist/client/extensions/ExtensionEditor.js.map +1 -1
- package/dist/client/extensions/ExtensionQueryErrorState.d.ts +8 -0
- package/dist/client/extensions/ExtensionQueryErrorState.d.ts.map +1 -0
- package/dist/client/extensions/ExtensionQueryErrorState.js +11 -0
- package/dist/client/extensions/ExtensionQueryErrorState.js.map +1 -0
- package/dist/client/extensions/ExtensionSlot.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionSlot.js +17 -7
- package/dist/client/extensions/ExtensionSlot.js.map +1 -1
- package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionViewer.js +17 -7
- package/dist/client/extensions/ExtensionViewer.js.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.js +5 -3
- package/dist/client/extensions/ExtensionsListPage.js.map +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.js +21 -8
- package/dist/client/extensions/ExtensionsSidebarSection.js.map +1 -1
- package/dist/client/index.d.ts +0 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +0 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/progress/RunsTray.d.ts.map +1 -1
- package/dist/client/progress/RunsTray.js +7 -3
- package/dist/client/progress/RunsTray.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
- package/dist/client/settings/SettingsTabsPage.js +4 -0
- package/dist/client/settings/SettingsTabsPage.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.d.ts +2 -0
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js +4 -0
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/client/tool-cells/EditCell.d.ts.map +1 -1
- package/dist/client/tool-cells/EditCell.js +2 -1
- package/dist/client/tool-cells/EditCell.js.map +1 -1
- package/dist/client/tool-cells/FilesChangedSummary.d.ts.map +1 -1
- package/dist/client/tool-cells/FilesChangedSummary.js +2 -1
- package/dist/client/tool-cells/FilesChangedSummary.js.map +1 -1
- package/dist/client/tool-cells/WriteCell.d.ts.map +1 -1
- package/dist/client/tool-cells/WriteCell.js +2 -1
- package/dist/client/tool-cells/WriteCell.js.map +1 -1
- package/dist/client/visual-style-controls.js +1 -1
- package/dist/client/visual-style-controls.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +36 -14
- package/dist/deploy/build.js.map +1 -1
- package/dist/integrations/google-docs-poller.d.ts +7 -0
- package/dist/integrations/google-docs-poller.d.ts.map +1 -1
- package/dist/integrations/google-docs-poller.js +13 -3
- package/dist/integrations/google-docs-poller.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +10 -0
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/webhook-handler.d.ts +11 -0
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +16 -4
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/jobs/scheduler.d.ts +12 -0
- package/dist/jobs/scheduler.d.ts.map +1 -1
- package/dist/jobs/scheduler.js +13 -3
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/localization/default-messages.d.ts +7 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +8 -1
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp/oauth-token.d.ts +1 -1
- package/dist/mcp/oauth-token.d.ts.map +1 -1
- package/dist/mcp/oauth-token.js +6 -1
- package/dist/mcp/oauth-token.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts.map +1 -1
- package/dist/observability/routes.js +32 -0
- package/dist/observability/routes.js.map +1 -1
- package/dist/observability/sentiment.d.ts +42 -0
- package/dist/observability/sentiment.d.ts.map +1 -0
- package/dist/observability/sentiment.js +196 -0
- package/dist/observability/sentiment.js.map +1 -0
- package/dist/observability/store.d.ts +5 -0
- package/dist/observability/store.d.ts.map +1 -1
- package/dist/observability/store.js +17 -0
- package/dist/observability/store.js.map +1 -1
- package/dist/observability/traces.d.ts +2 -0
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +42 -57
- package/dist/observability/traces.js.map +1 -1
- package/dist/observability/tracking-identity.d.ts +3 -0
- package/dist/observability/tracking-identity.d.ts.map +1 -0
- package/dist/observability/tracking-identity.js +51 -0
- package/dist/observability/tracking-identity.js.map +1 -0
- package/dist/observability/types.d.ts +10 -0
- package/dist/observability/types.d.ts.map +1 -1
- package/dist/observability/types.js +3 -0
- package/dist/observability/types.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/storage.d.ts +6 -0
- package/dist/secrets/storage.d.ts.map +1 -1
- package/dist/secrets/storage.js +61 -3
- package/dist/secrets/storage.js.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts +50 -0
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -0
- package/dist/server/agent-chat/action-filters-a2a.js +127 -0
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -0
- package/dist/server/agent-chat/browser-team-tools.d.ts +21 -0
- package/dist/server/agent-chat/browser-team-tools.d.ts.map +1 -0
- package/dist/server/agent-chat/browser-team-tools.js +417 -0
- package/dist/server/agent-chat/browser-team-tools.js.map +1 -0
- package/dist/server/agent-chat/context-tools.d.ts +33 -0
- package/dist/server/agent-chat/context-tools.d.ts.map +1 -0
- package/dist/server/agent-chat/context-tools.js +520 -0
- package/dist/server/agent-chat/context-tools.js.map +1 -0
- package/dist/server/agent-chat/framework-prompts.d.ts +65 -0
- package/dist/server/agent-chat/framework-prompts.d.ts.map +1 -0
- package/dist/server/agent-chat/framework-prompts.js +403 -0
- package/dist/server/agent-chat/framework-prompts.js.map +1 -0
- package/dist/server/agent-chat/lazy-fs.d.ts +2 -0
- package/dist/server/agent-chat/lazy-fs.d.ts.map +1 -0
- package/dist/server/agent-chat/lazy-fs.js +11 -0
- package/dist/server/agent-chat/lazy-fs.js.map +1 -0
- package/dist/server/agent-chat/mcp-glue.d.ts +9 -0
- package/dist/server/agent-chat/mcp-glue.d.ts.map +1 -0
- package/dist/server/agent-chat/mcp-glue.js +63 -0
- package/dist/server/agent-chat/mcp-glue.js.map +1 -0
- package/dist/server/agent-chat/plugin-options.d.ts +322 -0
- package/dist/server/agent-chat/plugin-options.d.ts.map +1 -0
- package/dist/server/agent-chat/plugin-options.js +2 -0
- package/dist/server/agent-chat/plugin-options.js.map +1 -0
- package/dist/server/agent-chat/process-run-failure.d.ts +12 -0
- package/dist/server/agent-chat/process-run-failure.d.ts.map +1 -0
- package/dist/server/agent-chat/process-run-failure.js +24 -0
- package/dist/server/agent-chat/process-run-failure.js.map +1 -0
- package/dist/server/agent-chat/prompt-resources.d.ts +28 -0
- package/dist/server/agent-chat/prompt-resources.d.ts.map +1 -0
- package/dist/server/agent-chat/prompt-resources.js +514 -0
- package/dist/server/agent-chat/prompt-resources.js.map +1 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.d.ts +5 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.d.ts.map +1 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.js +53 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.js.map +1 -0
- package/dist/server/agent-chat/request-surface.d.ts +8 -0
- package/dist/server/agent-chat/request-surface.d.ts.map +1 -0
- package/dist/server/agent-chat/request-surface.js +56 -0
- package/dist/server/agent-chat/request-surface.js.map +1 -0
- package/dist/server/agent-chat/run-code-tools.d.ts +17 -0
- package/dist/server/agent-chat/run-code-tools.d.ts.map +1 -0
- package/dist/server/agent-chat/run-code-tools.js +55 -0
- package/dist/server/agent-chat/run-code-tools.js.map +1 -0
- package/dist/server/agent-chat/script-entries.d.ts +47 -0
- package/dist/server/agent-chat/script-entries.d.ts.map +1 -0
- package/dist/server/agent-chat/script-entries.js +633 -0
- package/dist/server/agent-chat/script-entries.js.map +1 -0
- package/dist/server/agent-chat/shared-thread.d.ts +33 -0
- package/dist/server/agent-chat/shared-thread.d.ts.map +1 -0
- package/dist/server/agent-chat/shared-thread.js +242 -0
- package/dist/server/agent-chat/shared-thread.js.map +1 -0
- package/dist/server/agent-chat/skill-frontmatter.d.ts +7 -0
- package/dist/server/agent-chat/skill-frontmatter.d.ts.map +1 -0
- package/dist/server/agent-chat/skill-frontmatter.js +26 -0
- package/dist/server/agent-chat/skill-frontmatter.js.map +1 -0
- package/dist/server/agent-chat-plugin.d.ts +45 -486
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +173 -3005
- 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/agent-teams.d.ts +10 -0
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +13 -3
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +50 -52
- package/dist/server/auth.js.map +1 -1
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +22 -21
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/edge.d.ts +1 -0
- package/dist/server/edge.d.ts.map +1 -1
- package/dist/server/edge.js +1 -0
- package/dist/server/edge.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +1 -16
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/realtime-voice.d.ts +3 -0
- package/dist/server/realtime-voice.d.ts.map +1 -1
- package/dist/server/realtime-voice.js +29 -5
- package/dist/server/realtime-voice.js.map +1 -1
- package/dist/server/request-origin.d.ts.map +1 -1
- package/dist/server/request-origin.js +6 -3
- package/dist/server/request-origin.js.map +1 -1
- package/dist/server/ssr-handler.d.ts.map +1 -1
- package/dist/server/ssr-handler.js +47 -2
- package/dist/server/ssr-handler.js.map +1 -1
- package/dist/sharing/access.d.ts +63 -3
- package/dist/sharing/access.d.ts.map +1 -1
- package/dist/sharing/access.js +53 -15
- package/dist/sharing/access.js.map +1 -1
- package/dist/sharing/registry.d.ts +7 -0
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js.map +1 -1
- package/dist/styles/agent-native.css +15 -14
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/dist/templates/default/app/i18n/ar-SA.ts +6 -0
- package/dist/templates/default/app/i18n/de-DE.ts +6 -0
- package/dist/templates/default/app/i18n/en-US.ts +6 -0
- package/dist/templates/default/app/i18n/es-ES.ts +6 -0
- package/dist/templates/default/app/i18n/fr-FR.ts +6 -0
- package/dist/templates/default/app/i18n/hi-IN.ts +6 -0
- package/dist/templates/default/app/i18n/ja-JP.ts +6 -0
- package/dist/templates/default/app/i18n/ko-KR.ts +6 -0
- package/dist/templates/default/app/i18n/pt-BR.ts +6 -0
- package/dist/templates/default/app/i18n/zh-CN.ts +6 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +6 -0
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +27 -29
- package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +2 -1
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +32 -0
- package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +25 -0
- package/dist/templates/workspace-core/src/server/index.ts +4 -2
- package/dist/testing.d.ts +16 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +16 -0
- package/dist/testing.js.map +1 -0
- package/dist/triggers/dispatcher.d.ts +7 -0
- package/dist/triggers/dispatcher.d.ts.map +1 -1
- package/dist/triggers/dispatcher.js +13 -3
- package/dist/triggers/dispatcher.js.map +1 -1
- package/dist/vite/client.d.ts +16 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +105 -2
- package/dist/vite/client.js.map +1 -1
- package/docs/content/authentication.mdx +3 -3
- package/docs/content/doctor.mdx +170 -0
- package/docs/content/external-agents.mdx +8 -7
- package/docs/content/locales/ar-SA/authentication.mdx +2 -2
- package/docs/content/locales/ar-SA/external-agents.mdx +8 -7
- package/docs/content/locales/ar-SA/mcp-protocol.mdx +1 -1
- package/docs/content/locales/ar-SA/security.mdx +2 -0
- package/docs/content/locales/de-DE/authentication.mdx +1 -1
- package/docs/content/locales/de-DE/external-agents.mdx +8 -7
- package/docs/content/locales/de-DE/mcp-protocol.mdx +1 -1
- package/docs/content/locales/de-DE/security.mdx +2 -0
- package/docs/content/locales/es-ES/authentication.mdx +2 -2
- package/docs/content/locales/es-ES/external-agents.mdx +8 -7
- package/docs/content/locales/es-ES/mcp-protocol.mdx +1 -1
- package/docs/content/locales/es-ES/security.mdx +2 -0
- package/docs/content/locales/fr-FR/authentication.mdx +1 -1
- package/docs/content/locales/fr-FR/external-agents.mdx +8 -7
- package/docs/content/locales/fr-FR/mcp-protocol.mdx +1 -1
- package/docs/content/locales/fr-FR/security.mdx +2 -0
- package/docs/content/locales/hi-IN/authentication.mdx +2 -2
- package/docs/content/locales/hi-IN/external-agents.mdx +8 -7
- package/docs/content/locales/hi-IN/mcp-protocol.mdx +1 -1
- package/docs/content/locales/hi-IN/security.mdx +2 -0
- package/docs/content/locales/ja-JP/authentication.mdx +2 -2
- package/docs/content/locales/ja-JP/external-agents.mdx +8 -7
- package/docs/content/locales/ja-JP/mcp-protocol.mdx +1 -1
- package/docs/content/locales/ja-JP/security.mdx +2 -0
- package/docs/content/locales/ko-KR/authentication.mdx +2 -2
- package/docs/content/locales/ko-KR/external-agents.mdx +8 -7
- package/docs/content/locales/ko-KR/mcp-protocol.mdx +1 -1
- package/docs/content/locales/ko-KR/security.mdx +2 -0
- package/docs/content/locales/pt-BR/authentication.mdx +2 -2
- package/docs/content/locales/pt-BR/external-agents.mdx +8 -7
- package/docs/content/locales/pt-BR/mcp-protocol.mdx +1 -1
- package/docs/content/locales/pt-BR/security.mdx +2 -0
- package/docs/content/locales/zh-CN/authentication.mdx +2 -2
- package/docs/content/locales/zh-CN/external-agents.mdx +8 -7
- package/docs/content/locales/zh-CN/mcp-protocol.mdx +1 -1
- package/docs/content/locales/zh-CN/security.mdx +2 -0
- package/docs/content/locales/zh-TW/authentication.mdx +2 -2
- package/docs/content/locales/zh-TW/external-agents.mdx +8 -7
- package/docs/content/locales/zh-TW/mcp-protocol.mdx +1 -1
- package/docs/content/locales/zh-TW/security.mdx +2 -0
- package/docs/content/mcp-protocol.mdx +1 -1
- package/docs/content/security.mdx +2 -0
- package/package.json +6 -2
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/src/templates/default/app/i18n/ar-SA.ts +6 -0
- package/src/templates/default/app/i18n/de-DE.ts +6 -0
- package/src/templates/default/app/i18n/en-US.ts +6 -0
- package/src/templates/default/app/i18n/es-ES.ts +6 -0
- package/src/templates/default/app/i18n/fr-FR.ts +6 -0
- package/src/templates/default/app/i18n/hi-IN.ts +6 -0
- package/src/templates/default/app/i18n/ja-JP.ts +6 -0
- package/src/templates/default/app/i18n/ko-KR.ts +6 -0
- package/src/templates/default/app/i18n/pt-BR.ts +6 -0
- package/src/templates/default/app/i18n/zh-CN.ts +6 -0
- package/src/templates/default/app/i18n/zh-TW.ts +6 -0
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +27 -29
- package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +2 -1
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +32 -0
- package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +25 -0
- package/src/templates/workspace-core/src/server/index.ts +4 -2
- package/corpus/core/src/client/ProductionAgentPanel.tsx +0 -9
- package/corpus/core/src/client/auth-redirect-url.ts +0 -23
- package/corpus/core/src/client/useProductionAgent.ts +0 -253
- package/corpus/core/src/shared/auth-redirect-url.ts +0 -1
- package/corpus/templates/analytics/app/pages/Index.tsx +0 -16
- package/corpus/templates/analytics/seeds/dashboards/agent-observability-llm.json +0 -173
- package/dist/client/ProductionAgentPanel.d.ts +0 -6
- package/dist/client/ProductionAgentPanel.d.ts.map +0 -1
- package/dist/client/ProductionAgentPanel.js +0 -6
- package/dist/client/ProductionAgentPanel.js.map +0 -1
- package/dist/client/auth-redirect-url.d.ts +0 -2
- package/dist/client/auth-redirect-url.d.ts.map +0 -1
- package/dist/client/auth-redirect-url.js +0 -19
- package/dist/client/auth-redirect-url.js.map +0 -1
- package/dist/client/useProductionAgent.d.ts +0 -24
- package/dist/client/useProductionAgent.d.ts.map +0 -1
- package/dist/client/useProductionAgent.js +0 -179
- package/dist/client/useProductionAgent.js.map +0 -1
- package/dist/shared/auth-redirect-url.d.ts +0 -2
- package/dist/shared/auth-redirect-url.d.ts.map +0 -1
- package/dist/shared/auth-redirect-url.js +0 -2
- package/dist/shared/auth-redirect-url.js.map +0 -1
|
@@ -23,7 +23,10 @@ import type {
|
|
|
23
23
|
ActionEntry,
|
|
24
24
|
AgentLoopFinalResponseGuard,
|
|
25
25
|
} from "../agent/production-agent.js";
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
actionsToEngineTools,
|
|
28
|
+
filterInitialEngineTools,
|
|
29
|
+
} from "../agent/production-agent.js";
|
|
27
30
|
import {
|
|
28
31
|
runAgentLoop,
|
|
29
32
|
appendAgentLoopContinuation,
|
|
@@ -43,6 +46,7 @@ import {
|
|
|
43
46
|
foldAssistantTurn,
|
|
44
47
|
threadDataToEngineMessages,
|
|
45
48
|
} from "../agent/thread-data-builder.js";
|
|
49
|
+
import { attachToolSearch } from "../agent/tool-search.js";
|
|
46
50
|
import type { AgentChatEvent } from "../agent/types.js";
|
|
47
51
|
import type { RunEvent } from "../agent/types.js";
|
|
48
52
|
import {
|
|
@@ -1600,6 +1604,16 @@ export interface AgentTeamRunConfig {
|
|
|
1600
1604
|
actions: Record<string, ActionEntry>;
|
|
1601
1605
|
engine: AgentEngine;
|
|
1602
1606
|
model: string;
|
|
1607
|
+
/**
|
|
1608
|
+
* Tool names to expose on the FIRST engine request for this sub-agent
|
|
1609
|
+
* chunk. See `SchedulerDeps.getInitialToolNames` (`jobs/scheduler.ts`) —
|
|
1610
|
+
* same semantics: when provided, every other action in `actions` is
|
|
1611
|
+
* deferred behind an attached `tool-search` entry instead of being
|
|
1612
|
+
* serialized on every chunk; `runAgentLoop`'s mid-run tool expansion still
|
|
1613
|
+
* lets the model discover and call them after a search. Omit to keep the
|
|
1614
|
+
* full `actions` set visible up front (current behavior).
|
|
1615
|
+
*/
|
|
1616
|
+
initialToolNames?: string[];
|
|
1603
1617
|
}
|
|
1604
1618
|
|
|
1605
1619
|
export interface ProcessAgentTeamRunOptions {
|
|
@@ -1710,11 +1724,19 @@ export async function processAgentTeamRun(
|
|
|
1710
1724
|
];
|
|
1711
1725
|
}
|
|
1712
1726
|
|
|
1727
|
+
const initialToolNames = config.initialToolNames;
|
|
1728
|
+
// Only attach tool-search (and pay its schema cost) when the caller
|
|
1729
|
+
// actually supplied an initial subset to filter down to — otherwise
|
|
1730
|
+
// this is byte-for-byte the prior unfiltered behavior.
|
|
1731
|
+
const baseActions = initialToolNames
|
|
1732
|
+
? attachToolSearch({ ...config.actions })
|
|
1733
|
+
: config.actions;
|
|
1713
1734
|
const messageAwareActions = createMessageAwareActions(
|
|
1714
1735
|
opts.taskId,
|
|
1715
|
-
|
|
1736
|
+
baseActions,
|
|
1716
1737
|
);
|
|
1717
|
-
const
|
|
1738
|
+
const availableTools = actionsToEngineTools(messageAwareActions);
|
|
1739
|
+
const tools = filterInitialEngineTools(availableTools, initialToolNames);
|
|
1718
1740
|
|
|
1719
1741
|
// Fresh runId per chunk (avoids agent_runs PK collisions); stable turnId so
|
|
1720
1742
|
// the durable assistant message folds across chunks.
|
|
@@ -1815,6 +1837,7 @@ export async function processAgentTeamRun(
|
|
|
1815
1837
|
model: config.model,
|
|
1816
1838
|
systemPrompt,
|
|
1817
1839
|
tools,
|
|
1840
|
+
availableTools,
|
|
1818
1841
|
messages,
|
|
1819
1842
|
actions: messageAwareActions,
|
|
1820
1843
|
send: wrappedSend,
|
|
@@ -1860,56 +1860,38 @@ function createAuthGuardFn(): (
|
|
|
1860
1860
|
}
|
|
1861
1861
|
|
|
1862
1862
|
// Force-sign-in entrypoint. Templates send viewers from public pages
|
|
1863
|
-
// (share links, embeds) here with a `?return=<path>` query
|
|
1864
|
-
//
|
|
1865
|
-
//
|
|
1866
|
-
//
|
|
1867
|
-
//
|
|
1868
|
-
// `return` is validated by parsing it against a sentinel base origin
|
|
1869
|
-
// and checking the resolved origin still matches. This rejects every
|
|
1870
|
-
// open-redirect shape — `//evil.com/...` (network-path reference),
|
|
1871
|
-
// `/\evil.com/...` (WHATWG URL parser normalises `\` to `/` in HTTP
|
|
1872
|
-
// URLs, so a naive prefix check on `//` misses this), absolute URLs
|
|
1873
|
-
// like `https://evil.com`, and `data:` / `javascript:` schemes. The
|
|
1874
|
-
// reconstructed path comes from the parsed segments so any leftover
|
|
1875
|
-
// quirks get normalised. Control chars (incl. CR/LF for header
|
|
1876
|
-
// injection) are rejected up front.
|
|
1877
|
-
//
|
|
1863
|
+
// (share links, embeds) here with a `?return=<path>` query. The cached
|
|
1864
|
+
// login document validates that return path in the browser and redirects
|
|
1865
|
+
// there after sign-in or when its client-side session check finds an
|
|
1866
|
+
// existing session.
|
|
1878
1867
|
if (p === "/_agent-native/sign-in") {
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
if (session) {
|
|
1885
|
-
return new Response("", {
|
|
1886
|
-
status: 302,
|
|
1887
|
-
headers: { Location: safeReturn },
|
|
1888
|
-
});
|
|
1889
|
-
}
|
|
1890
|
-
return loginHtmlResponse(loginHtml, event);
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
// Auth entry pages are framework-owned pages, not app routes. When a user
|
|
1894
|
-
// already has a session, redirect them back to the mounted app instead of
|
|
1895
|
-
// letting React Router try to render /login.
|
|
1896
|
-
if (p === "/login" || p === "/signup") {
|
|
1897
|
-
const session = await getSession(event);
|
|
1898
|
-
if (session) {
|
|
1868
|
+
// Preserve the zero-setup localhost experience without putting a
|
|
1869
|
+
// session lookup back on the cacheable app-shell URL. The client gate
|
|
1870
|
+
// reaches this explicit entrypoint after discovering there is no
|
|
1871
|
+
// session; only a fresh local development DB can take this redirect.
|
|
1872
|
+
if (getMethod(event) === "GET") {
|
|
1899
1873
|
const queryStr = queryStart >= 0 ? url.slice(queryStart + 1) : "";
|
|
1900
1874
|
const safeReturn = safeReturnPath(
|
|
1901
1875
|
new URLSearchParams(queryStr).get("return"),
|
|
1902
1876
|
);
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
});
|
|
1877
|
+
const autoSession = await maybeAutoCreateDevSession(
|
|
1878
|
+
event,
|
|
1879
|
+
safeReturn === "/" ? getAppBasePath() || "/" : safeReturn,
|
|
1880
|
+
);
|
|
1881
|
+
if (autoSession) return autoSession;
|
|
1909
1882
|
}
|
|
1910
1883
|
return loginHtmlResponse(loginHtml, event);
|
|
1911
1884
|
}
|
|
1912
1885
|
|
|
1886
|
+
// Auth entry pages are framework-owned pages, not app routes. Always serve
|
|
1887
|
+
// the same public, cacheable login document here. Its client-side session
|
|
1888
|
+
// check redirects signed-in visitors to the validated return path. Keeping
|
|
1889
|
+
// session-dependent decisions out of this server response prevents the CDN
|
|
1890
|
+
// from caching two different representations for the same URL.
|
|
1891
|
+
if (p === "/login" || p === "/signup") {
|
|
1892
|
+
return loginHtmlResponse(loginHtml, event);
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1913
1895
|
// Skip static assets (Vite chunks, fonts, images, etc.)
|
|
1914
1896
|
if (
|
|
1915
1897
|
p.startsWith("/assets/") ||
|
|
@@ -1950,6 +1932,36 @@ function createAuthGuardFn(): (
|
|
|
1950
1932
|
return;
|
|
1951
1933
|
}
|
|
1952
1934
|
|
|
1935
|
+
// Normal app documents and React Router page-data requests are an
|
|
1936
|
+
// impersonal SSR shell. `createH3SSRHandler` renders both under an
|
|
1937
|
+
// explicitly anonymous request context and gives them one shared public
|
|
1938
|
+
// cache policy, so production requests must not vary either response by
|
|
1939
|
+
// cookie. `AppProviders` resolves the browser session and gates private UI
|
|
1940
|
+
// after hydration.
|
|
1941
|
+
const isAppPageRequest =
|
|
1942
|
+
p !== "/api" &&
|
|
1943
|
+
!p.startsWith("/api/") &&
|
|
1944
|
+
p !== "/_agent-native" &&
|
|
1945
|
+
!p.startsWith("/_agent-native/") &&
|
|
1946
|
+
(isHtmlDocumentRequest(event, p) ||
|
|
1947
|
+
(isReadMethod(event) && p.endsWith(".data")));
|
|
1948
|
+
if (isAppPageRequest) {
|
|
1949
|
+
// A freshly scaffolded, loopback-only development app needs its initial
|
|
1950
|
+
// session before Vite starts optimizing and potentially reloading the
|
|
1951
|
+
// client. Waiting for the hydrated client gate to reach sign-in can lose
|
|
1952
|
+
// that one-time redirect after the dev account is created, leaving the
|
|
1953
|
+
// browser at the login page with no way to recreate its random password.
|
|
1954
|
+
// `maybeAutoCreateDevSession` is strictly development + loopback scoped,
|
|
1955
|
+
// does not read an existing session, and returns null for every existing
|
|
1956
|
+
// dev account, so production SSR remains one cacheable anonymous shell
|
|
1957
|
+
// and explicit sign-out still works.
|
|
1958
|
+
if (getMethod(event) === "GET") {
|
|
1959
|
+
const autoSession = await maybeAutoCreateDevSession(event, url);
|
|
1960
|
+
if (autoSession) return autoSession;
|
|
1961
|
+
}
|
|
1962
|
+
return;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1953
1965
|
const session = await getSession(event);
|
|
1954
1966
|
if (session) return;
|
|
1955
1967
|
|
|
@@ -1958,22 +1970,8 @@ function createAuthGuardFn(): (
|
|
|
1958
1970
|
return { error: "Unauthorized" };
|
|
1959
1971
|
}
|
|
1960
1972
|
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
return { error: "Unauthorized" };
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
// Local-dev convenience: on the first page GET of a freshly-scaffolded
|
|
1967
|
-
// app, transparently create + sign in `dev@local.test` instead of
|
|
1968
|
-
// showing the sign-up form. Gated on NODE_ENV=development AND no real users in the
|
|
1969
|
-
// DB, so production and any app that has ever had a real signup are
|
|
1970
|
-
// unaffected. See maybeAutoCreateDevSession for full conditions.
|
|
1971
|
-
if (getMethod(event) === "GET") {
|
|
1972
|
-
const autoSession = await maybeAutoCreateDevSession(event, url);
|
|
1973
|
-
if (autoSession) return autoSession;
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
return loginHtmlResponse(loginHtml, event);
|
|
1973
|
+
setResponseStatus(event, 401);
|
|
1974
|
+
return { error: "Unauthorized" };
|
|
1977
1975
|
};
|
|
1978
1976
|
}
|
|
1979
1977
|
|
|
@@ -257,30 +257,27 @@ export function isBuilderPrivateKey(value: string | null | undefined): boolean {
|
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
async function readBuilderCredentialScope(
|
|
260
|
-
|
|
260
|
+
readAppSecrets: typeof import("../secrets/storage.js").readAppSecrets,
|
|
261
261
|
scope: "user" | "org" | "workspace",
|
|
262
262
|
scopeId: string,
|
|
263
263
|
): Promise<BuilderResolvedCredentials> {
|
|
264
|
-
const
|
|
265
|
-
BUILDER_CREDENTIAL_KEYS
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
);
|
|
270
|
-
const map = new Map<string, string | null>(values);
|
|
264
|
+
const secrets = await readAppSecrets({
|
|
265
|
+
keys: BUILDER_CREDENTIAL_KEYS,
|
|
266
|
+
scope,
|
|
267
|
+
scopeId,
|
|
268
|
+
});
|
|
269
|
+
const value = (key: string): string | null => secrets.get(key)?.value ?? null;
|
|
271
270
|
return {
|
|
272
|
-
privateKey:
|
|
273
|
-
publicKey:
|
|
274
|
-
userId:
|
|
275
|
-
orgName:
|
|
276
|
-
orgKind:
|
|
277
|
-
subscription:
|
|
278
|
-
subscriptionLevel:
|
|
279
|
-
subscriptionName:
|
|
280
|
-
isEnterprise: readOptionalBuilderBoolean(
|
|
281
|
-
isFreeAccount: readOptionalBuilderBoolean(
|
|
282
|
-
map.get("BUILDER_IS_FREE_ACCOUNT"),
|
|
283
|
-
),
|
|
271
|
+
privateKey: value("BUILDER_PRIVATE_KEY"),
|
|
272
|
+
publicKey: value("BUILDER_PUBLIC_KEY"),
|
|
273
|
+
userId: value("BUILDER_USER_ID"),
|
|
274
|
+
orgName: value("BUILDER_ORG_NAME"),
|
|
275
|
+
orgKind: value("BUILDER_ORG_KIND"),
|
|
276
|
+
subscription: value("BUILDER_SUBSCRIPTION"),
|
|
277
|
+
subscriptionLevel: value("BUILDER_SUBSCRIPTION_LEVEL"),
|
|
278
|
+
subscriptionName: value("BUILDER_SUBSCRIPTION_NAME"),
|
|
279
|
+
isEnterprise: readOptionalBuilderBoolean(value("BUILDER_IS_ENTERPRISE")),
|
|
280
|
+
isFreeAccount: readOptionalBuilderBoolean(value("BUILDER_IS_FREE_ACCOUNT")),
|
|
284
281
|
source: scope === "workspace" ? "workspace" : scope,
|
|
285
282
|
};
|
|
286
283
|
}
|
|
@@ -397,7 +394,7 @@ async function resolveScopedBuilderCredentials(): Promise<BuilderResolvedCredent
|
|
|
397
394
|
const traceLookup = shouldTraceCredentialResolve();
|
|
398
395
|
let scopeAttempted = "user";
|
|
399
396
|
try {
|
|
400
|
-
const {
|
|
397
|
+
const { readAppSecrets } = await import("../secrets/storage.js");
|
|
401
398
|
const traceScope = (creds: BuilderResolvedCredentials, scopeId: string) => {
|
|
402
399
|
if (!traceLookup) return;
|
|
403
400
|
console.log(
|
|
@@ -406,7 +403,7 @@ async function resolveScopedBuilderCredentials(): Promise<BuilderResolvedCredent
|
|
|
406
403
|
};
|
|
407
404
|
|
|
408
405
|
const userCreds = await readBuilderCredentialScope(
|
|
409
|
-
|
|
406
|
+
readAppSecrets,
|
|
410
407
|
"user",
|
|
411
408
|
email,
|
|
412
409
|
);
|
|
@@ -417,7 +414,7 @@ async function resolveScopedBuilderCredentials(): Promise<BuilderResolvedCredent
|
|
|
417
414
|
if (orgId) {
|
|
418
415
|
scopeAttempted = "org";
|
|
419
416
|
const orgCreds = await readBuilderCredentialScope(
|
|
420
|
-
|
|
417
|
+
readAppSecrets,
|
|
421
418
|
"org",
|
|
422
419
|
orgId,
|
|
423
420
|
);
|
|
@@ -426,7 +423,7 @@ async function resolveScopedBuilderCredentials(): Promise<BuilderResolvedCredent
|
|
|
426
423
|
|
|
427
424
|
scopeAttempted = "workspace";
|
|
428
425
|
const workspaceCreds = await readBuilderCredentialScope(
|
|
429
|
-
|
|
426
|
+
readAppSecrets,
|
|
430
427
|
"workspace",
|
|
431
428
|
orgId,
|
|
432
429
|
);
|
|
@@ -436,7 +433,7 @@ async function resolveScopedBuilderCredentials(): Promise<BuilderResolvedCredent
|
|
|
436
433
|
scopeAttempted = "workspace-solo";
|
|
437
434
|
const scopeId = `solo:${email}`;
|
|
438
435
|
const workspaceCreds = await readBuilderCredentialScope(
|
|
439
|
-
|
|
436
|
+
readAppSecrets,
|
|
440
437
|
"workspace",
|
|
441
438
|
scopeId,
|
|
442
439
|
);
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
SUPPORTED_LOCALES,
|
|
16
16
|
type LocaleCode,
|
|
17
17
|
} from "../localization/shared.js";
|
|
18
|
-
import { AUTH_REDIRECT_QUERY_PARAM } from "../shared/auth-redirect-url.js";
|
|
19
18
|
import {
|
|
20
19
|
AGENT_NATIVE_SOCIAL_IMAGE_ALT,
|
|
21
20
|
AGENT_NATIVE_SOCIAL_IMAGE_HEIGHT,
|
|
@@ -2917,22 +2916,8 @@ ${signupLocalModeNoteHtml}
|
|
|
2917
2916
|
if (__anIsAuthEntryPath(window.location.pathname)) return __anPath('/');
|
|
2918
2917
|
return __anCurrentReturnPath();
|
|
2919
2918
|
}
|
|
2920
|
-
function __anWithAuthCacheBypass(ret) {
|
|
2921
|
-
try {
|
|
2922
|
-
var url = new URL(ret || __anPath('/'), window.location.origin);
|
|
2923
|
-
url.searchParams.set('${AUTH_REDIRECT_QUERY_PARAM}', Date.now().toString(36));
|
|
2924
|
-
return url.pathname + url.search + url.hash;
|
|
2925
|
-
} catch(e) {
|
|
2926
|
-
var fallback = ret || __anPath('/');
|
|
2927
|
-
var hashIndex = fallback.indexOf('#');
|
|
2928
|
-
var beforeHash = hashIndex === -1 ? fallback : fallback.slice(0, hashIndex);
|
|
2929
|
-
var hash = hashIndex === -1 ? '' : fallback.slice(hashIndex);
|
|
2930
|
-
var sep = beforeHash.indexOf('?') === -1 ? '?' : '&';
|
|
2931
|
-
return beforeHash + sep + '${AUTH_REDIRECT_QUERY_PARAM}=' + Date.now().toString(36) + hash;
|
|
2932
|
-
}
|
|
2933
|
-
}
|
|
2934
2919
|
function __anRedirectToSignedInApp(ret) {
|
|
2935
|
-
window.location.replace(
|
|
2920
|
+
window.location.replace(ret || __anGetSignedInReturnPath());
|
|
2936
2921
|
}
|
|
2937
2922
|
function __anMaybeRedirectSignedIn(ret) {
|
|
2938
2923
|
return fetch(__anPath('/_agent-native/auth/session'), {
|
|
@@ -34,6 +34,9 @@ export const REALTIME_VOICE_TOOL_PATH = "/_agent-native/realtime-voice/tool";
|
|
|
34
34
|
export const REALTIME_VOICE_MAX_SDP_BYTES = 64 * 1024;
|
|
35
35
|
export const REALTIME_VOICE_MAX_TOOL_BODY_BYTES = 64 * 1024;
|
|
36
36
|
export const REALTIME_VOICE_MAX_TOOL_OUTPUT_CHARS = 16_000;
|
|
37
|
+
export const REALTIME_VOICE_MAX_TOOLS = 32;
|
|
38
|
+
export const REALTIME_VOICE_MAX_TOOL_SCHEMA_BYTES = 32_000;
|
|
39
|
+
export const REALTIME_VOICE_MAX_SESSION_BYTES = 64_000;
|
|
37
40
|
|
|
38
41
|
const OPENAI_REALTIME_CALLS_URL = "https://api.openai.com/v1/realtime/calls";
|
|
39
42
|
const DEFAULT_MODEL = "gpt-realtime-2.1";
|
|
@@ -42,7 +45,6 @@ const DEFAULT_INSTRUCTIONS =
|
|
|
42
45
|
"You are the live voice interface for this Agent Native app. Speak naturally, briefly, and conversationally. Use the available function tools when the user asks you to navigate or take an action. Never claim an action succeeded until its tool result confirms success. If a tool requires approval, explain that the user must approve it in chat.";
|
|
43
46
|
const MAX_INSTRUCTIONS_CHARS = 16_000;
|
|
44
47
|
const MAX_TOOL_DESCRIPTION_CHARS = 2_000;
|
|
45
|
-
const MAX_TOOL_SCHEMA_CHARS = 64 * 1024;
|
|
46
48
|
const MAX_APPROVAL_KEY_CHARS = 1_024;
|
|
47
49
|
const REALTIME_TOOL_NAME = /^[A-Za-z0-9_-]{1,64}$/;
|
|
48
50
|
const CALL_ID = /^[A-Za-z0-9_-]{1,256}$/;
|
|
@@ -181,7 +183,13 @@ function normalizeToolSchema(
|
|
|
181
183
|
): Record<string, unknown> | null {
|
|
182
184
|
try {
|
|
183
185
|
const serialized = JSON.stringify(inputSchema);
|
|
184
|
-
if (
|
|
186
|
+
if (
|
|
187
|
+
!serialized ||
|
|
188
|
+
Buffer.byteLength(serialized, "utf8") >
|
|
189
|
+
REALTIME_VOICE_MAX_TOOL_SCHEMA_BYTES
|
|
190
|
+
) {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
185
193
|
const parsed = JSON.parse(serialized) as unknown;
|
|
186
194
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
187
195
|
return null;
|
|
@@ -213,6 +221,28 @@ function buildRealtimeTools(
|
|
|
213
221
|
return tools;
|
|
214
222
|
}
|
|
215
223
|
|
|
224
|
+
function packRealtimeTools(
|
|
225
|
+
session: Record<string, unknown>,
|
|
226
|
+
eligibleTools: RealtimeFunctionTool[],
|
|
227
|
+
): RealtimeFunctionTool[] {
|
|
228
|
+
const packed: RealtimeFunctionTool[] = [];
|
|
229
|
+
for (const tool of eligibleTools.slice(0, REALTIME_VOICE_MAX_TOOLS)) {
|
|
230
|
+
const candidate = [...packed, tool];
|
|
231
|
+
const candidateSession = {
|
|
232
|
+
...session,
|
|
233
|
+
tools: candidate,
|
|
234
|
+
tool_choice: "auto",
|
|
235
|
+
};
|
|
236
|
+
if (
|
|
237
|
+
Buffer.byteLength(JSON.stringify(candidateSession), "utf8") <=
|
|
238
|
+
REALTIME_VOICE_MAX_SESSION_BYTES
|
|
239
|
+
) {
|
|
240
|
+
packed.push(tool);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return packed;
|
|
244
|
+
}
|
|
245
|
+
|
|
216
246
|
function declaredBodyBytes(event: H3Event): number | undefined {
|
|
217
247
|
const raw = readSafeHeader(event, "content-length");
|
|
218
248
|
if (!raw) return undefined;
|
|
@@ -364,7 +394,7 @@ function createSessionHandler(
|
|
|
364
394
|
}
|
|
365
395
|
|
|
366
396
|
const instructions = await buildInstructions(auth, options);
|
|
367
|
-
const
|
|
397
|
+
const sessionBase = {
|
|
368
398
|
type: "realtime",
|
|
369
399
|
model: configuredIdentifier(options.model, DEFAULT_MODEL),
|
|
370
400
|
instructions,
|
|
@@ -383,7 +413,10 @@ function createSessionHandler(
|
|
|
383
413
|
voice: configuredIdentifier(options.voice, DEFAULT_VOICE),
|
|
384
414
|
},
|
|
385
415
|
},
|
|
386
|
-
|
|
416
|
+
};
|
|
417
|
+
const session = {
|
|
418
|
+
...sessionBase,
|
|
419
|
+
tools: packRealtimeTools(sessionBase, tools),
|
|
387
420
|
tool_choice: "auto",
|
|
388
421
|
};
|
|
389
422
|
|
|
@@ -632,7 +665,9 @@ export function mountRealtimeVoiceRoutes(
|
|
|
632
665
|
}
|
|
633
666
|
|
|
634
667
|
const tools = buildRealtimeTools(actions);
|
|
635
|
-
const allowedToolNames = new Set(
|
|
668
|
+
const allowedToolNames = new Set(
|
|
669
|
+
tools.slice(0, REALTIME_VOICE_MAX_TOOLS).map((tool) => tool.name),
|
|
670
|
+
);
|
|
636
671
|
const app = getH3App(nitroApp);
|
|
637
672
|
app.use(REALTIME_VOICE_SESSION_PATH, createSessionHandler(tools, options));
|
|
638
673
|
app.use(
|
|
@@ -12,6 +12,12 @@ function isLoopbackHost(host: string): boolean {
|
|
|
12
12
|
* back to `Sec-Fetch-Site` so Safari's fetch-spec behavior still works.
|
|
13
13
|
*/
|
|
14
14
|
export function isSameOriginRequest(event: H3Event): boolean {
|
|
15
|
+
// Fetch metadata is browser-controlled and describes the relationship
|
|
16
|
+
// before a reverse proxy rewrites Host (dev-lazy maps :8080 to :8088).
|
|
17
|
+
// Reject an explicit cross-site signal before consulting forgeable headers.
|
|
18
|
+
const fetchSite = getRequestHeader(event, "sec-fetch-site");
|
|
19
|
+
if (fetchSite) return fetchSite === "same-origin" || fetchSite === "none";
|
|
20
|
+
|
|
15
21
|
const host = getRequestHeader(event, "host");
|
|
16
22
|
const origin = getRequestHeader(event, "origin");
|
|
17
23
|
if (origin && host) {
|
|
@@ -55,8 +61,6 @@ export function isSameOriginRequest(event: H3Event): boolean {
|
|
|
55
61
|
return false;
|
|
56
62
|
}
|
|
57
63
|
}
|
|
58
|
-
const fetchSite = getRequestHeader(event, "sec-fetch-site");
|
|
59
|
-
if (fetchSite) return fetchSite === "same-origin" || fetchSite === "none";
|
|
60
64
|
// No Origin and no Sec-Fetch-Site: likely a non-browser client (curl,
|
|
61
65
|
// server-side) — safe to allow, CSRF requires a browser with ambient cookies.
|
|
62
66
|
return true;
|
|
@@ -98,6 +98,22 @@ function requestWithPathname(
|
|
|
98
98
|
return new Request(url, init);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
function requestForAnonymousSsr(request: Request): Request {
|
|
102
|
+
const headers = new Headers(request.headers);
|
|
103
|
+
headers.delete("cookie");
|
|
104
|
+
headers.delete("authorization");
|
|
105
|
+
const init: RequestInit & { duplex?: "half" } = {
|
|
106
|
+
method: request.method,
|
|
107
|
+
headers,
|
|
108
|
+
signal: request.signal,
|
|
109
|
+
};
|
|
110
|
+
if (request.body && !["GET", "HEAD"].includes(request.method.toUpperCase())) {
|
|
111
|
+
init.body = request.body;
|
|
112
|
+
init.duplex = "half";
|
|
113
|
+
}
|
|
114
|
+
return new Request(request.url, init);
|
|
115
|
+
}
|
|
116
|
+
|
|
101
117
|
function prefixMountedPath(path: string, basePath: string): string {
|
|
102
118
|
if (!basePath || !path.startsWith("/") || path.startsWith("//")) return path;
|
|
103
119
|
if (path === basePath || path.startsWith(`${basePath}/`)) return path;
|
|
@@ -106,7 +122,7 @@ function prefixMountedPath(path: string, basePath: string): string {
|
|
|
106
122
|
|
|
107
123
|
function prefixMountedHtml(html: string, basePath: string): string {
|
|
108
124
|
if (!basePath) return html;
|
|
109
|
-
|
|
125
|
+
const prefixedHtml = html
|
|
110
126
|
.replace(
|
|
111
127
|
/\b(href|src|action|formaction|poster)=(["'])(\/(?!\/)[^"']*)\2/g,
|
|
112
128
|
(_match, attr: string, quote: string, path: string) =>
|
|
@@ -116,6 +132,20 @@ function prefixMountedHtml(html: string, basePath: string): string {
|
|
|
116
132
|
const q = quote || "";
|
|
117
133
|
return `url(${q}${prefixMountedPath(path, basePath)}${q})`;
|
|
118
134
|
});
|
|
135
|
+
|
|
136
|
+
// React Router serializes the server-side basename into its hydration
|
|
137
|
+
// context. The request above is deliberately rendered mount-relative, so
|
|
138
|
+
// that value is normally "/" even though the browser URL is mounted at a
|
|
139
|
+
// workspace prefix such as "/analytics". If the client hydrates that
|
|
140
|
+
// context unchanged, the mounted pathname no longer matches the route tree:
|
|
141
|
+
// index redirects can stall and child pages can fall through to the 404.
|
|
142
|
+
// Keep the serialized router state consistent with the URLs we just
|
|
143
|
+
// prefixed. Template entry clients also set this defensively for older
|
|
144
|
+
// responses, but the initial hydration state must be correct at the source.
|
|
145
|
+
return prefixedHtml.replace(
|
|
146
|
+
/(window\.__reactRouterContext\s*=\s*\{\s*"basename"\s*:\s*)"(?:\\.|[^"\\])*"/,
|
|
147
|
+
`$1${JSON.stringify(basePath)}`,
|
|
148
|
+
);
|
|
119
149
|
}
|
|
120
150
|
|
|
121
151
|
function injectHeadScript(html: string, script: string | null): string {
|
|
@@ -219,6 +249,27 @@ function applyDefaultSsrCacheHeader(
|
|
|
219
249
|
) {
|
|
220
250
|
if (!isSsrHtmlOrDataResponse(headers, status, pathname)) return;
|
|
221
251
|
|
|
252
|
+
// A public shell must never set a viewer cookie or vary by credentials.
|
|
253
|
+
// Preserve harmless content-negotiation dimensions such as Accept-Encoding.
|
|
254
|
+
headers.delete("set-cookie");
|
|
255
|
+
const vary = headers.get("vary");
|
|
256
|
+
if (vary) {
|
|
257
|
+
const publicVary = vary
|
|
258
|
+
.split(",")
|
|
259
|
+
.map((value) => value.trim())
|
|
260
|
+
.filter((value) => {
|
|
261
|
+
const normalized = value.toLowerCase();
|
|
262
|
+
return (
|
|
263
|
+
normalized &&
|
|
264
|
+
normalized !== "*" &&
|
|
265
|
+
normalized !== "cookie" &&
|
|
266
|
+
normalized !== "authorization"
|
|
267
|
+
);
|
|
268
|
+
});
|
|
269
|
+
if (publicVary.length > 0) headers.set("vary", publicVary.join(", "));
|
|
270
|
+
else headers.delete("vary");
|
|
271
|
+
}
|
|
272
|
+
|
|
222
273
|
// Netlify Functions/proxies are not cached by default. Set all three cache
|
|
223
274
|
// headers: Cache-Control for browsers, CDN-Cache-Control for generic CDNs,
|
|
224
275
|
// and Netlify-CDN-Cache-Control (with durable) so Netlify's shared cache
|
|
@@ -347,7 +398,9 @@ export function createH3SSRHandler(getBuild: () => Promise<unknown> | unknown) {
|
|
|
347
398
|
return new Response(null, { status: 404 });
|
|
348
399
|
}
|
|
349
400
|
try {
|
|
350
|
-
const request =
|
|
401
|
+
const request = requestForAnonymousSsr(
|
|
402
|
+
requestWithPathname(event.req as Request, p, basePath),
|
|
403
|
+
);
|
|
351
404
|
// SSR renders an IMPERSONAL public shell — we deliberately do NOT read the
|
|
352
405
|
// request's session/cookies here, and pin an explicitly anonymous request
|
|
353
406
|
// context. That keeps the SSR HTML/.data identical for every visitor so it
|