@agent-native/core 0.97.0 → 0.98.1
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 +56 -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 +6 -2
- package/corpus/core/scripts/finalize-build.mjs +63 -3
- package/corpus/core/scripts/materialize-source-corpus.mjs +101 -15
- package/corpus/core/src/action-change-marker.ts +8 -1
- 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/changelog/parse.ts +8 -3
- 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 +8 -8
- package/corpus/core/src/client/AssistantChat.tsx +83 -39
- package/corpus/core/src/client/CommandMenu.tsx +16 -5
- package/corpus/core/src/client/FeedbackButton.tsx +2 -2
- package/corpus/core/src/client/analytics.ts +29 -0
- package/corpus/core/src/client/app-providers.tsx +18 -5
- package/corpus/core/src/client/blocks/library/wireframe-kit.tsx +16 -2
- package/corpus/core/src/client/chat/tool-call-display.tsx +3 -3
- package/corpus/core/src/client/chat-model-groups.ts +28 -0
- package/corpus/core/src/client/composer/PastedTextChip.tsx +1 -1
- package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +523 -68
- package/corpus/core/src/client/composer/TiptapComposer.tsx +47 -30
- package/corpus/core/src/client/composer/VoiceButton.tsx +22 -5
- package/corpus/core/src/client/composer/index.ts +5 -0
- package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +1271 -35
- 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 +5 -13
- package/corpus/core/src/client/progress/RunsTray.tsx +23 -4
- package/corpus/core/src/client/settings/SecretsSection.tsx +387 -266
- package/corpus/core/src/client/settings/SettingsPanel.tsx +117 -38
- 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/use-action.ts +12 -0
- package/corpus/core/src/client/use-agent-chat-home-handoff.ts +8 -1
- package/corpus/core/src/client/use-agent-engine-configured.ts +17 -3
- package/corpus/core/src/client/use-db-sync.ts +84 -34
- package/corpus/core/src/client/use-pausing-interval.ts +14 -4
- 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/scope-store.ts +1 -1
- package/corpus/core/src/integrations/usage-budget-store.ts +1 -1
- 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 +51 -1
- package/corpus/core/src/mcp/oauth-token.ts +6 -1
- package/corpus/core/src/mcp-client/workspace-servers.ts +4 -4
- 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/crypto.ts +28 -8
- package/corpus/core/src/secrets/storage.ts +67 -3
- package/corpus/core/src/server/action-change.ts +5 -1
- package/corpus/core/src/server/action-routes.ts +8 -0
- 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/poll.ts +1 -0
- package/corpus/core/src/server/realtime-voice.ts +335 -14
- 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 +17 -16
- package/corpus/core/src/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
- 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/real-time-sync/SKILL.md +2 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
- 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 +135 -3
- 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/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +10 -5
- package/corpus/templates/analytics/AGENTS.md +15 -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/navigate.ts +59 -5
- 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 +7 -29
- package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +20 -3
- package/corpus/templates/analytics/app/components/ResourceLoadError.tsx +42 -0
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +2 -1
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +85 -70
- package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +128 -95
- package/corpus/templates/analytics/app/components/layout/SidebarLoadError.tsx +24 -0
- package/corpus/templates/analytics/app/global.css +19 -20
- 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/lib/provider-corpus-job-sync.ts +26 -0
- package/corpus/templates/analytics/app/pages/Settings.tsx +41 -343
- 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/pages/monitoring/ErrorsPanel.tsx +38 -7
- package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +1 -1
- package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +3 -0
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +333 -272
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +72 -17
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +297 -108
- package/corpus/templates/analytics/app/root.tsx +40 -8
- package/corpus/templates/analytics/app/routes/_index.tsx +14 -2
- package/corpus/templates/analytics/changelog/2026-06-24-first-party-signup-and-pageview-panels-now-honor-dashboard-filters.md +2 -1
- package/corpus/templates/analytics/changelog/2026-06-25-referrer-dashboard-panels-show-external-domains.md +2 -1
- package/corpus/templates/analytics/changelog/2026-07-03-agent-llm-observability-dashboard.md +1 -1
- package/corpus/templates/analytics/changelog/2026-07-06-mobile-chat-header-is-more-compact-and-the-menu-button-opens-navigation.md +1 -0
- package/corpus/templates/analytics/changelog/2026-07-08-dashboard-history-and-chat-context.md +1 -0
- package/corpus/templates/analytics/changelog/2026-07-08-settings-are-cleaner-searchable-and-alerts-have-their-own-tab.md +1 -0
- package/corpus/templates/analytics/changelog/2026-07-08-sidebar-sections-stay-collapsed-until-opened.md +1 -0
- 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-analytics-no-longer-repeatedly-restarts-background-requests-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-analytics-only-asks-for-replay-storage-when-you-enable-sessi.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-charts-now-show-their-loading-skeleton-while-refreshing.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-realtime-voice-now-shows-a-clear-connection-indicator-comple.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-replay-event-counts-stay-hidden-until-recordings-finish-load.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-replay-storage-key-mismatches-show-actionable-setup-guidance.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-replay-timelines-group-continuous-scrolling-and-dev-tools-co.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-filters-now-stay-compact-in-a-settings-menu-at-mediu.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replay-console-errors-now-link-to-matching-issues-or.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replays-load-large-recordings-faster-and-surface-fai.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replays-preserve-recorded-styles-and-viewport-layout.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replays-stay-centered-instead-of-clipping-wide-recor.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/package.json +1 -1
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +37 -1
- package/corpus/templates/analytics/server/handlers/session-replay.ts +57 -0
- 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 +20 -4
- package/corpus/templates/analytics/server/lib/session-replay-agent-context.ts +12 -0
- package/corpus/templates/analytics/server/lib/session-replay.ts +208 -2
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +11 -39
- package/corpus/templates/analytics/server/plugins/onboarding.ts +7 -79
- package/corpus/templates/analytics/server/routes/api/session-replay/recordings/[recordingId]/chunks.get.ts +1 -0
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +30 -4
- package/corpus/templates/assets/app/global.css +4 -4
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +0 -1
- package/corpus/templates/assets/app/routes/library.tsx +49 -6
- 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/brain/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/brain/app/global.css +5 -5
- package/corpus/templates/brain/app/root.tsx +0 -3
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +2 -2
- 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/app/root.tsx +1 -0
- 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/chat/.agents/skills/real-time-sync/SKILL.md +2 -2
- 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/hooks/use-auto-title.ts +74 -8
- package/corpus/templates/clips/app/hooks/use-library.ts +12 -25
- 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.settings._index.tsx +20 -22
- 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-generated-titles-no-longer-cause-continuous-background-refreshes.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-s3-storage-setup-stays-collapsed-until-you-choose-it-as-the-.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/.agents/skills/real-time-sync/SKILL.md +2 -2
- 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/hooks/use-comments.ts +0 -1
- 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-comments-now-update-from-live-collaboration-events-without-c.md +6 -0
- 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/Header.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/.agents/skills/real-time-sync/SKILL.md +2 -2
- 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/layout/AppLayout.tsx +1 -2
- 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/root.tsx +0 -3
- 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/.agents/skills/real-time-sync/SKILL.md +2 -2
- 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/hooks/use-compose-state.ts +1 -0
- package/corpus/templates/mail/app/root.tsx +9 -22
- 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/.agents/skills/real-time-sync/SKILL.md +2 -2
- 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/hooks/use-navigation-state.ts +5 -2
- package/corpus/templates/plan/app/hooks/use-plans.ts +6 -13
- 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 +157 -31
- 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/changelog/2026-07-11-plan-refreshes-only-when-content-changes.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 +37 -11
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +2 -2
- package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +2 -2
- package/corpus/templates/slides/app/components/layout/Header.tsx +1 -1
- 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 +10 -0
- package/corpus/templates/slides/app/hooks/use-slide-comments.ts +7 -31
- 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-comments-now-update-from-live-collaboration-events-without-c.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-change-marker.d.ts +1 -0
- package/dist/action-change-marker.d.ts.map +1 -1
- package/dist/action-change-marker.js +7 -1
- package/dist/action-change-marker.js.map +1 -1
- 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/changelog/parse.d.ts +4 -2
- package/dist/changelog/parse.d.ts.map +1 -1
- package/dist/changelog/parse.js +5 -3
- package/dist/changelog/parse.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 +6 -5
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +7 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +62 -40
- package/dist/client/AssistantChat.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/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +26 -0
- package/dist/client/analytics.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/blocks/library/wireframe-kit.d.ts +2 -0
- package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.js +9 -2
- package/dist/client/blocks/library/wireframe-kit.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/chat-model-groups.d.ts.map +1 -1
- package/dist/client/chat-model-groups.js +24 -0
- package/dist/client/chat-model-groups.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 +40 -2
- package/dist/client/composer/RealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.js +186 -35
- package/dist/client/composer/RealtimeVoiceMode.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +4 -0
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +48 -30
- 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/index.d.ts +2 -2
- package/dist/client/composer/index.d.ts.map +1 -1
- package/dist/client/composer/index.js +1 -1
- package/dist/client/composer/index.js.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.d.ts +104 -2
- package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.js +1015 -35
- 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 +1 -3
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -6
- package/dist/client/index.js.map +1 -1
- package/dist/client/progress/RunsTray.d.ts.map +1 -1
- package/dist/client/progress/RunsTray.js +17 -4
- package/dist/client/progress/RunsTray.js.map +1 -1
- package/dist/client/settings/SecretsSection.d.ts +2 -3
- package/dist/client/settings/SecretsSection.d.ts.map +1 -1
- package/dist/client/settings/SecretsSection.js +46 -22
- package/dist/client/settings/SecretsSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts +9 -0
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +46 -12
- package/dist/client/settings/SettingsPanel.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/use-action.d.ts +2 -0
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +10 -0
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/use-agent-chat-home-handoff.d.ts +2 -0
- package/dist/client/use-agent-chat-home-handoff.d.ts.map +1 -1
- package/dist/client/use-agent-chat-home-handoff.js +7 -1
- package/dist/client/use-agent-chat-home-handoff.js.map +1 -1
- package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
- package/dist/client/use-agent-engine-configured.js +17 -3
- package/dist/client/use-agent-engine-configured.js.map +1 -1
- package/dist/client/use-db-sync.d.ts +8 -2
- package/dist/client/use-db-sync.d.ts.map +1 -1
- package/dist/client/use-db-sync.js +57 -32
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/client/use-pausing-interval.d.ts.map +1 -1
- package/dist/client/use-pausing-interval.js +16 -4
- package/dist/client/use-pausing-interval.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/scope-store.js +1 -1
- package/dist/integrations/scope-store.js.map +1 -1
- package/dist/integrations/usage-budget-store.js +1 -1
- package/dist/integrations/usage-budget-store.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 +47 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +48 -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/mcp-client/workspace-servers.js +4 -4
- package/dist/mcp-client/workspace-servers.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +5 -5
- 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/resources/handlers.d.ts +1 -1
- package/dist/secrets/crypto.d.ts +7 -6
- package/dist/secrets/crypto.d.ts.map +1 -1
- package/dist/secrets/crypto.js +30 -11
- package/dist/secrets/crypto.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- 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/action-change.d.ts +1 -0
- package/dist/server/action-change.d.ts.map +1 -1
- package/dist/server/action-change.js +4 -1
- package/dist/server/action-change.js.map +1 -1
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +5 -0
- package/dist/server/action-routes.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-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/poll.d.ts.map +1 -1
- package/dist/server/poll.js +1 -0
- package/dist/server/poll.js.map +1 -1
- package/dist/server/realtime-voice.d.ts +10 -0
- package/dist/server/realtime-voice.d.ts.map +1 -1
- package/dist/server/realtime-voice.js +249 -15
- 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 +17 -16
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
- 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/real-time-sync/SKILL.md +2 -2
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
- package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
- 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 +111 -3
- 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 +7 -3
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
- 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/real-time-sync/SKILL.md +2 -2
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
- package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
- 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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { execFileSync } from "node:child_process";
|
|
3
|
+
import { randomBytes } from "node:crypto";
|
|
3
4
|
import {
|
|
4
5
|
copyFileSync,
|
|
5
6
|
existsSync,
|
|
@@ -7,6 +8,7 @@ import {
|
|
|
7
8
|
mkdirSync,
|
|
8
9
|
readFileSync,
|
|
9
10
|
readdirSync,
|
|
11
|
+
renameSync,
|
|
10
12
|
rmSync,
|
|
11
13
|
writeFileSync,
|
|
12
14
|
} from "node:fs";
|
|
@@ -113,6 +115,14 @@ const excludedFileSuffixes = [
|
|
|
113
115
|
".tsbuildinfo",
|
|
114
116
|
];
|
|
115
117
|
|
|
118
|
+
// Matches both the "corpus" output dir itself and the unique per-process
|
|
119
|
+
// temp dirs materializeSourceCorpus() swaps into place (see
|
|
120
|
+
// swapCorpusDirIntoPlace), so a non-git fallback filesystem walk never
|
|
121
|
+
// recurses into the corpus output it is currently producing.
|
|
122
|
+
function isCorpusOutputDirName(name) {
|
|
123
|
+
return name === "corpus" || name.startsWith("corpus.tmp-");
|
|
124
|
+
}
|
|
125
|
+
|
|
116
126
|
function shouldSkipFile(name) {
|
|
117
127
|
if (excludedFileNames.has(name)) return true;
|
|
118
128
|
if (name === ".env") return true;
|
|
@@ -125,7 +135,14 @@ function shouldSkipFile(name) {
|
|
|
125
135
|
|
|
126
136
|
function shouldSkipRelativePath(relativePath) {
|
|
127
137
|
const segments = relativePath.split("/");
|
|
128
|
-
if (
|
|
138
|
+
if (
|
|
139
|
+
segments.some(
|
|
140
|
+
(segment) =>
|
|
141
|
+
excludedDirNames.has(segment) || isCorpusOutputDirName(segment),
|
|
142
|
+
)
|
|
143
|
+
) {
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
129
146
|
const name = segments[segments.length - 1];
|
|
130
147
|
return shouldSkipFile(name);
|
|
131
148
|
}
|
|
@@ -190,7 +207,12 @@ function listFilesystemFiles(absRoot, relRoot) {
|
|
|
190
207
|
const abs = join(absRoot, entry.name);
|
|
191
208
|
const rel = `${relRoot}/${entry.name}`.split("\\").join("/");
|
|
192
209
|
if (entry.isDirectory()) {
|
|
193
|
-
if (
|
|
210
|
+
if (
|
|
211
|
+
excludedDirNames.has(entry.name) ||
|
|
212
|
+
isCorpusOutputDirName(entry.name)
|
|
213
|
+
) {
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
194
216
|
files.push(...listFilesystemFiles(abs, rel));
|
|
195
217
|
} else if (entry.isFile()) {
|
|
196
218
|
files.push(rel);
|
|
@@ -210,7 +232,7 @@ function sourceFilesFor(rootRel) {
|
|
|
210
232
|
.sort();
|
|
211
233
|
}
|
|
212
234
|
|
|
213
|
-
function copySourceFiles(rootRel, targetName) {
|
|
235
|
+
function copySourceFiles(rootRel, targetName, baseDir) {
|
|
214
236
|
const files = sourceFilesFor(rootRel);
|
|
215
237
|
const prefix = `${rootRel}/`;
|
|
216
238
|
let copied = 0;
|
|
@@ -220,7 +242,7 @@ function copySourceFiles(rootRel, targetName) {
|
|
|
220
242
|
const sourcePath = join(repoRoot, file);
|
|
221
243
|
if (!existsSync(sourcePath)) continue;
|
|
222
244
|
if (!lstatSync(sourcePath).isFile()) continue;
|
|
223
|
-
const targetPath = join(
|
|
245
|
+
const targetPath = join(baseDir, targetName, relToRoot);
|
|
224
246
|
mkdirSync(dirname(targetPath), { recursive: true });
|
|
225
247
|
copyFileSync(sourcePath, targetPath);
|
|
226
248
|
copied += 1;
|
|
@@ -228,7 +250,7 @@ function copySourceFiles(rootRel, targetName) {
|
|
|
228
250
|
return { files: copied };
|
|
229
251
|
}
|
|
230
252
|
|
|
231
|
-
function writeCorpusReadme(stats) {
|
|
253
|
+
function writeCorpusReadme(stats, baseDir) {
|
|
232
254
|
const lines = [
|
|
233
255
|
"# Agent Native Source Corpus",
|
|
234
256
|
"",
|
|
@@ -263,24 +285,88 @@ function writeCorpusReadme(stats) {
|
|
|
263
285
|
`- template files: ${stats.templateFiles}`,
|
|
264
286
|
"",
|
|
265
287
|
];
|
|
266
|
-
writeFileSync(join(
|
|
288
|
+
writeFileSync(join(baseDir, "README.md"), lines.join("\n"));
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const swapMaxAttempts = 5;
|
|
292
|
+
const swapRetryDelayMs = 40;
|
|
293
|
+
|
|
294
|
+
// Synchronous sleep with no subprocess dependency, so retrying stays
|
|
295
|
+
// cross-platform (Windows CI has no `sleep` binary under cmd.exe).
|
|
296
|
+
function sleepSync(ms) {
|
|
297
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// `corpusDir` is only ever replaced wholesale by a fully-populated temp dir
|
|
301
|
+
// (see swapCorpusDirIntoPlace), so its presence + README.md proves *some*
|
|
302
|
+
// materialize run -- ours or a concurrent one -- finished successfully.
|
|
303
|
+
export function looksLikeMaterializedCorpus(dir) {
|
|
304
|
+
return existsSync(join(dir, "README.md"));
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Concurrent `materializeSourceCorpus()` runs (e.g. two overlapping
|
|
308
|
+
// `scripts/dev-lazy.ts` prebuilds racing on the same checkout) used to both
|
|
309
|
+
// `rmSync`/repopulate the shared `corpusDir` directly, which could throw
|
|
310
|
+
// ENOTEMPTY out of the recursive rm/rename when one process's writes landed
|
|
311
|
+
// mid-walk of another's, crashing dev-lazy startup entirely. Build into a
|
|
312
|
+
// unique-per-process temp dir instead (nothing else can touch that path),
|
|
313
|
+
// then swap it into place with a small bounded retry that treats "a
|
|
314
|
+
// concurrent run already produced an equivalent corpus" as success rather
|
|
315
|
+
// than a fatal error.
|
|
316
|
+
export function swapCorpusDirIntoPlace(tempDir, targetDir = corpusDir) {
|
|
317
|
+
for (let attempt = 1; attempt <= swapMaxAttempts; attempt += 1) {
|
|
318
|
+
try {
|
|
319
|
+
rmSync(targetDir, { recursive: true, force: true });
|
|
320
|
+
} catch {
|
|
321
|
+
// A concurrent rename may already be repopulating targetDir; let the
|
|
322
|
+
// renameSync below decide the outcome instead of failing here.
|
|
323
|
+
}
|
|
324
|
+
try {
|
|
325
|
+
renameSync(tempDir, targetDir);
|
|
326
|
+
return true;
|
|
327
|
+
} catch (error) {
|
|
328
|
+
const code = error && error.code;
|
|
329
|
+
const concurrentWriter =
|
|
330
|
+
code === "ENOTEMPTY" ||
|
|
331
|
+
code === "EEXIST" ||
|
|
332
|
+
code === "ENOENT" ||
|
|
333
|
+
code === "EPERM";
|
|
334
|
+
if (!concurrentWriter) throw error;
|
|
335
|
+
if (looksLikeMaterializedCorpus(targetDir)) {
|
|
336
|
+
rmSync(tempDir, { recursive: true, force: true });
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
if (attempt < swapMaxAttempts) {
|
|
340
|
+
sleepSync(swapRetryDelayMs * attempt);
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
throw error;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return false;
|
|
267
347
|
}
|
|
268
348
|
|
|
269
349
|
export function materializeSourceCorpus() {
|
|
270
|
-
|
|
271
|
-
|
|
350
|
+
const tempDir = `${corpusDir}.tmp-${process.pid}-${randomBytes(4).toString("hex")}`;
|
|
351
|
+
rmSync(tempDir, { recursive: true, force: true });
|
|
352
|
+
mkdirSync(tempDir, { recursive: true });
|
|
272
353
|
|
|
273
|
-
const coreStats = copySourceFiles("packages/core", "core");
|
|
274
|
-
const templateStats = copySourceFiles("templates", "templates");
|
|
354
|
+
const coreStats = copySourceFiles("packages/core", "core", tempDir);
|
|
355
|
+
const templateStats = copySourceFiles("templates", "templates", tempDir);
|
|
356
|
+
|
|
357
|
+
writeCorpusReadme(
|
|
358
|
+
{ coreFiles: coreStats.files, templateFiles: templateStats.files },
|
|
359
|
+
tempDir,
|
|
360
|
+
);
|
|
275
361
|
|
|
276
|
-
|
|
277
|
-
coreFiles: coreStats.files,
|
|
278
|
-
templateFiles: templateStats.files,
|
|
279
|
-
});
|
|
362
|
+
const applied = swapCorpusDirIntoPlace(tempDir);
|
|
280
363
|
|
|
281
364
|
const size = relative(packageDir, corpusDir);
|
|
365
|
+
const note = applied
|
|
366
|
+
? ""
|
|
367
|
+
: " (accepted a concurrent run's equivalent corpus)";
|
|
282
368
|
console.log(
|
|
283
|
-
`[agent-native] Materialized source corpus at ${size} (${coreStats.files} core files, ${templateStats.files} template files)
|
|
369
|
+
`[agent-native] Materialized source corpus at ${size} (${coreStats.files} core files, ${templateStats.files} template files).${note}`,
|
|
284
370
|
);
|
|
285
371
|
}
|
|
286
372
|
|
|
@@ -5,6 +5,7 @@ export interface ActionChangeTarget {
|
|
|
5
5
|
actionName?: string;
|
|
6
6
|
owner?: string;
|
|
7
7
|
orgId?: string;
|
|
8
|
+
requestSource?: string;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export function actionChangeMarkerSession(
|
|
@@ -23,6 +24,7 @@ export function actionChangeMarkerValue(
|
|
|
23
24
|
...(target.actionName ? { actionName: target.actionName } : {}),
|
|
24
25
|
...(target.owner ? { owner: target.owner } : {}),
|
|
25
26
|
...(target.orgId ? { orgId: target.orgId } : {}),
|
|
27
|
+
...(target.requestSource ? { requestSource: target.requestSource } : {}),
|
|
26
28
|
};
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -42,6 +44,7 @@ export function parseActionChangeMarker(
|
|
|
42
44
|
let actionName: string | undefined;
|
|
43
45
|
let owner: string | undefined;
|
|
44
46
|
let orgId: string | undefined;
|
|
47
|
+
let requestSource: string | undefined;
|
|
45
48
|
|
|
46
49
|
if (parsed && typeof parsed === "object") {
|
|
47
50
|
const record = parsed as Record<string, unknown>;
|
|
@@ -49,6 +52,10 @@ export function parseActionChangeMarker(
|
|
|
49
52
|
typeof record.actionName === "string" ? record.actionName : undefined;
|
|
50
53
|
owner = typeof record.owner === "string" ? record.owner : undefined;
|
|
51
54
|
orgId = typeof record.orgId === "string" ? record.orgId : undefined;
|
|
55
|
+
requestSource =
|
|
56
|
+
typeof record.requestSource === "string"
|
|
57
|
+
? record.requestSource
|
|
58
|
+
: undefined;
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
if (!owner && !orgId && typeof sessionId === "string" && sessionId) {
|
|
@@ -63,5 +70,5 @@ export function parseActionChangeMarker(
|
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
if (!actionName && !owner && !orgId) return null;
|
|
66
|
-
return { actionName, owner, orgId };
|
|
73
|
+
return { actionName, owner, orgId, requestSource };
|
|
67
74
|
}
|
|
@@ -307,6 +307,25 @@ interface DefineActionWithSchema<
|
|
|
307
307
|
schema: TSchema;
|
|
308
308
|
/** Legacy parameters — ignored when `schema` is provided. */
|
|
309
309
|
parameters?: never;
|
|
310
|
+
/**
|
|
311
|
+
* Optional alternate Standard Schema (Zod, Valibot, ArkType) used ONLY to
|
|
312
|
+
* build the tool definition advertised to the model — the JSON Schema that
|
|
313
|
+
* lands in the Claude `tools` array (and MCP/A2A tool listings, which read
|
|
314
|
+
* the same `tool.parameters`). Runtime validation always runs against
|
|
315
|
+
* `schema` above via the normal `wrapWithValidation` path; setting this
|
|
316
|
+
* never weakens validation and never changes `run()`'s argument type.
|
|
317
|
+
*
|
|
318
|
+
* Use this when the full input schema is much richer than what the model
|
|
319
|
+
* needs to see up front — the canonical example is a deep discriminated
|
|
320
|
+
* union of block/shape types where a per-call catalog lookup tool (e.g.
|
|
321
|
+
* `get-plan-blocks`) already teaches the full field shapes. Advertise a
|
|
322
|
+
* compact version (e.g. an enum of valid `type` values plus a note to call
|
|
323
|
+
* the lookup tool) instead of embedding every variant's fields in every
|
|
324
|
+
* request. Invalid calls still get the full, actionable validation error
|
|
325
|
+
* (missing/invalid fields, received args) from `schema` — this only trims
|
|
326
|
+
* what is proactively shown, not what is accepted or checked.
|
|
327
|
+
*/
|
|
328
|
+
agentInputSchema?: StandardSchemaV1;
|
|
310
329
|
/** Optional Standard Schema-compatible schema (Zod, Valibot, ArkType) the
|
|
311
330
|
* action's RETURN value is validated against AFTER `run()` resolves. Borrowed
|
|
312
331
|
* from Mastra/Flue structured-output. When omitted, behavior is byte-for-byte
|
|
@@ -437,6 +456,10 @@ interface DefineActionWithParams<
|
|
|
437
456
|
parameters?: TParams;
|
|
438
457
|
/** Standard Schema — not used in this overload. */
|
|
439
458
|
schema?: never;
|
|
459
|
+
/** Advertised-only schema override — not used in this overload (no runtime
|
|
460
|
+
* schema to advertise a compact alternative for). See the schema overload
|
|
461
|
+
* above. */
|
|
462
|
+
agentInputSchema?: never;
|
|
440
463
|
/** Optional Standard Schema-compatible schema the action's RETURN value is
|
|
441
464
|
* validated against AFTER `run()` resolves. See the schema overload above.
|
|
442
465
|
* When omitted, behavior is byte-for-byte unchanged. */
|
|
@@ -632,6 +655,25 @@ export function defineAction(options: any) {
|
|
|
632
655
|
};
|
|
633
656
|
}
|
|
634
657
|
|
|
658
|
+
// `agentInputSchema` swaps in a compact JSON Schema for the ADVERTISED tool
|
|
659
|
+
// definition only (what the model/MCP/A2A tool listings see). It never
|
|
660
|
+
// touches validation below — `wrapWithValidation` is always called with
|
|
661
|
+
// `options.schema`, the full schema, as the source of truth for what's
|
|
662
|
+
// accepted. Passing the same (compact) `toolParameters` into it only
|
|
663
|
+
// affects the top-level "Expected: { ... }" hint text and gateway string
|
|
664
|
+
// coercion, both of which only look at top-level property names/types —
|
|
665
|
+
// unaffected by trimming a nested union, so this stays safe either way.
|
|
666
|
+
if (
|
|
667
|
+
hasSchema &&
|
|
668
|
+
options.agentInputSchema &&
|
|
669
|
+
"~standard" in options.agentInputSchema
|
|
670
|
+
) {
|
|
671
|
+
toolParameters = schemaToJsonSchema(
|
|
672
|
+
options.agentInputSchema,
|
|
673
|
+
options.description,
|
|
674
|
+
);
|
|
675
|
+
}
|
|
676
|
+
|
|
635
677
|
// Wrap run() with INPUT validation when schema is provided.
|
|
636
678
|
// Pass toolParameters so the validation error can echo the expected signature
|
|
637
679
|
// (required vs optional fields) and help the caller self-correct.
|
|
@@ -222,6 +222,9 @@ class BuilderEngine implements AgentEngine {
|
|
|
222
222
|
opts.maxOutputTokens,
|
|
223
223
|
opts.model,
|
|
224
224
|
),
|
|
225
|
+
...(typeof opts.temperature === "number"
|
|
226
|
+
? { temperature: opts.temperature }
|
|
227
|
+
: {}),
|
|
225
228
|
...(reasoningEffort ? { reasoning_effort: reasoningEffort } : {}),
|
|
226
229
|
};
|
|
227
230
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { applyContextDirectives } from "../context-xray/apply-directives.js";
|
|
2
|
+
import { loadContextDirectives } from "../context-xray/directives-store.js";
|
|
3
|
+
import {
|
|
4
|
+
buildManifest,
|
|
5
|
+
writeContextManifest,
|
|
6
|
+
} from "../context-xray/manifest.js";
|
|
7
|
+
import { computeProtectedSegmentIds } from "../context-xray/segments.js";
|
|
8
|
+
import type { EngineMessage } from "./types.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Context X-Ray transform for one `runAgentLoop` iteration: loads any
|
|
12
|
+
* directives for the thread (evict/pin/restore), applies them to the raw
|
|
13
|
+
* message history, and best-effort persists a manifest describing what was
|
|
14
|
+
* sent to the model.
|
|
15
|
+
*
|
|
16
|
+
* Returns the transformed messages, or the original `messages` array
|
|
17
|
+
* unchanged (by reference) if the transform throws — the transform is a
|
|
18
|
+
* hardening/observability layer, never a gate, so a failure here must not
|
|
19
|
+
* break the turn. The manifest write is fire-and-forget (not awaited) so it
|
|
20
|
+
* never adds latency to the model-call path.
|
|
21
|
+
*
|
|
22
|
+
* Moved verbatim out of `runAgentLoop`'s per-iteration setup — behavior
|
|
23
|
+
* unchanged. Caller is still responsible for gating this on `threadId` being
|
|
24
|
+
* present and for the separate Observational Memory pass that runs after it.
|
|
25
|
+
*/
|
|
26
|
+
export async function applyContextXrayTransformForIteration(opts: {
|
|
27
|
+
threadId: string;
|
|
28
|
+
ownerEmail?: string | null;
|
|
29
|
+
turnId?: string;
|
|
30
|
+
model: string;
|
|
31
|
+
messages: EngineMessage[];
|
|
32
|
+
}): Promise<EngineMessage[]> {
|
|
33
|
+
const { threadId, ownerEmail, turnId, model, messages } = opts;
|
|
34
|
+
try {
|
|
35
|
+
const directives = await loadContextDirectives(threadId, {
|
|
36
|
+
ownerEmail: ownerEmail ?? null,
|
|
37
|
+
});
|
|
38
|
+
const protectedSegmentIds = computeProtectedSegmentIds(messages);
|
|
39
|
+
const { messages: transformedMessages, appliedStatus } =
|
|
40
|
+
applyContextDirectives(messages, directives, {
|
|
41
|
+
protectedSegmentIds,
|
|
42
|
+
});
|
|
43
|
+
const manifest = await buildManifest({
|
|
44
|
+
threadId,
|
|
45
|
+
...(turnId ? { turnId } : {}),
|
|
46
|
+
model,
|
|
47
|
+
rawMessages: messages,
|
|
48
|
+
sentMessages: transformedMessages,
|
|
49
|
+
appliedStatus,
|
|
50
|
+
directives,
|
|
51
|
+
protectedSegmentIds,
|
|
52
|
+
source: "structured",
|
|
53
|
+
enforceable: true,
|
|
54
|
+
});
|
|
55
|
+
void writeContextManifest(threadId, manifest).catch((err) => {
|
|
56
|
+
console.warn(
|
|
57
|
+
"[context-xray] failed to write manifest:",
|
|
58
|
+
err instanceof Error ? err.message : String(err),
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
return transformedMessages;
|
|
62
|
+
} catch (err) {
|
|
63
|
+
console.warn(
|
|
64
|
+
"[context-xray] context transform skipped:",
|
|
65
|
+
err instanceof Error ? err.message : String(err),
|
|
66
|
+
);
|
|
67
|
+
return messages;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ChainServerDrivenContinuationDeps,
|
|
3
|
+
ContinuationDispatchBudget,
|
|
4
|
+
} from "../production-agent.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The subset of `ChainServerDrivenContinuationDeps` this stage needs,
|
|
8
|
+
* already resolved to their non-optional defaults (mirrors how
|
|
9
|
+
* `chainServerDrivenContinuation` builds its local `d` object).
|
|
10
|
+
*/
|
|
11
|
+
export type ContinuationDispatchRetryDeps = Required<
|
|
12
|
+
Pick<
|
|
13
|
+
ChainServerDrivenContinuationDeps,
|
|
14
|
+
| "sleep"
|
|
15
|
+
| "updateRunHeartbeat"
|
|
16
|
+
| "fireInternalDispatch"
|
|
17
|
+
| "readBackgroundRunClaim"
|
|
18
|
+
>
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Attempts to deliver one background-continuation dispatch, retrying with
|
|
23
|
+
* backoff up to `dispatchBudget.maxDispatchAttempts` times.
|
|
24
|
+
*
|
|
25
|
+
* Moved verbatim out of `chainServerDrivenContinuation`'s "TRANSACTIONAL
|
|
26
|
+
* HANDOFF" section — behavior, ordering, and error handling unchanged. The
|
|
27
|
+
* caller is still responsible for: minting `nextRunId`, inserting the
|
|
28
|
+
* successor row, building `dispatchBody`, and handling the
|
|
29
|
+
* deferred-recovery / fatal-error paths after this returns.
|
|
30
|
+
*
|
|
31
|
+
* `isLoopProtectionDispatchError` and `maxNestedSelfDispatchDepth` are
|
|
32
|
+
* passed in (rather than imported) so this module has no runtime import
|
|
33
|
+
* back on `production-agent.js` — only the type-only import above, which
|
|
34
|
+
* TypeScript erases.
|
|
35
|
+
*/
|
|
36
|
+
export async function attemptContinuationDispatch(params: {
|
|
37
|
+
event: unknown;
|
|
38
|
+
chainViaDurableBackground: boolean;
|
|
39
|
+
backgroundContinuationCount: number;
|
|
40
|
+
nextRunId: string;
|
|
41
|
+
nextRowInserted: boolean;
|
|
42
|
+
continuationDispatchPath: string;
|
|
43
|
+
dispatchBody: Record<string, unknown>;
|
|
44
|
+
dispatchBudget: ContinuationDispatchBudget;
|
|
45
|
+
isLoopProtectionDispatchError: (err: unknown) => boolean;
|
|
46
|
+
maxNestedSelfDispatchDepth: number;
|
|
47
|
+
deps: ContinuationDispatchRetryDeps;
|
|
48
|
+
}): Promise<{
|
|
49
|
+
dispatched: boolean;
|
|
50
|
+
lastDispatchErr: unknown;
|
|
51
|
+
nestedDepthExceeded: boolean;
|
|
52
|
+
}> {
|
|
53
|
+
const {
|
|
54
|
+
event,
|
|
55
|
+
chainViaDurableBackground,
|
|
56
|
+
backgroundContinuationCount,
|
|
57
|
+
nextRunId,
|
|
58
|
+
nextRowInserted,
|
|
59
|
+
continuationDispatchPath,
|
|
60
|
+
dispatchBody,
|
|
61
|
+
dispatchBudget,
|
|
62
|
+
isLoopProtectionDispatchError,
|
|
63
|
+
maxNestedSelfDispatchDepth,
|
|
64
|
+
deps: d,
|
|
65
|
+
} = params;
|
|
66
|
+
const maxDispatchAttempts = dispatchBudget.maxDispatchAttempts;
|
|
67
|
+
const dispatchResponseTimeoutMs = dispatchBudget.dispatchResponseTimeoutMs;
|
|
68
|
+
|
|
69
|
+
let dispatched = false;
|
|
70
|
+
let lastDispatchErr: unknown;
|
|
71
|
+
// Proactive nested-chain safety margin — see `MAX_NESTED_SELF_DISPATCH_DEPTH`.
|
|
72
|
+
// Skip the nested dispatch attempt entirely once this segment's hop count
|
|
73
|
+
// reaches the cap; a nested attempt at this depth is expected to trip
|
|
74
|
+
// Netlify's loop protection, so there is nothing to gain by trying it and
|
|
75
|
+
// burning this worker's remaining wall clock on a doomed call. Falls
|
|
76
|
+
// straight into the same deferred-recovery path below as an exhausted
|
|
77
|
+
// retry budget.
|
|
78
|
+
const nestedDepthExceeded =
|
|
79
|
+
backgroundContinuationCount >= maxNestedSelfDispatchDepth;
|
|
80
|
+
if (nestedDepthExceeded) {
|
|
81
|
+
lastDispatchErr = new Error(
|
|
82
|
+
`proactive nested-dispatch depth cap reached (backgroundContinuationCount=${backgroundContinuationCount} >= MAX_NESTED_SELF_DISPATCH_DEPTH=${maxNestedSelfDispatchDepth}) — deferring to the unclaimed-background-run sweep instead of risking Netlify loop protection`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
for (
|
|
86
|
+
let attempt = 0;
|
|
87
|
+
!nestedDepthExceeded && attempt < maxDispatchAttempts && !dispatched;
|
|
88
|
+
attempt++
|
|
89
|
+
) {
|
|
90
|
+
try {
|
|
91
|
+
if (attempt > 0) {
|
|
92
|
+
// Uncapped budgets (durable-background and true-foreground) keep
|
|
93
|
+
// the original `500 * 2 ** attempt` schedule unchanged. The capped
|
|
94
|
+
// budget (proven-in-background-function) instead uses a schedule
|
|
95
|
+
// starting at 500ms and doubling per gap, capped at
|
|
96
|
+
// `backoffCapMs` — see `resolveContinuationDispatchBudget` for why
|
|
97
|
+
// this stays well inside the worker's remaining wall clock even
|
|
98
|
+
// with 5 attempts.
|
|
99
|
+
const backoffMs = Number.isFinite(dispatchBudget.backoffCapMs)
|
|
100
|
+
? Math.min(500 * 2 ** (attempt - 1), dispatchBudget.backoffCapMs)
|
|
101
|
+
: 500 * 2 ** attempt;
|
|
102
|
+
await d.sleep(backoffMs);
|
|
103
|
+
// Keep the pre-inserted successor row visibly alive while we
|
|
104
|
+
// retry: the awaited attempts + backoff can outlast
|
|
105
|
+
// UNCLAIMED_BACKGROUND_RUN_GRACE_MS (25s), and without a fresh
|
|
106
|
+
// heartbeat the unclaimed-run reaper / sweep could error a handoff
|
|
107
|
+
// we are still delivering.
|
|
108
|
+
if (nextRowInserted) {
|
|
109
|
+
await d.updateRunHeartbeat(nextRunId).catch(() => {});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
await d.fireInternalDispatch({
|
|
113
|
+
event,
|
|
114
|
+
// Durable chain: same path resolution as the initial dispatch —
|
|
115
|
+
// on hosted Netlify the background function's DEFAULT url (no
|
|
116
|
+
// custom config.path; async via background:true; never shadowed
|
|
117
|
+
// because /.netlify/* is excluded from the /* catch-all) so each
|
|
118
|
+
// chunk keeps the 15-min budget; off-Netlify the in-process
|
|
119
|
+
// framework route. Foreground self-chain: always the framework
|
|
120
|
+
// `_process-run` route on the regular function (see the fn doc).
|
|
121
|
+
path: continuationDispatchPath,
|
|
122
|
+
taskId: nextRunId,
|
|
123
|
+
body: dispatchBody,
|
|
124
|
+
awaitResponse: true,
|
|
125
|
+
responseTimeoutMs: dispatchResponseTimeoutMs,
|
|
126
|
+
});
|
|
127
|
+
dispatched = true;
|
|
128
|
+
} catch (dispatchErr) {
|
|
129
|
+
lastDispatchErr = dispatchErr;
|
|
130
|
+
// Regular-function targets (foreground self-chain) respond only
|
|
131
|
+
// after the successor chunk FINISHES, so an await timeout is not
|
|
132
|
+
// proof of a dead handoff. The successor's ATOMIC CLAIM is: a row
|
|
133
|
+
// that left `dispatch_mode='background'` (claimed) or is already
|
|
134
|
+
// terminal proves the handoff landed — stop retrying. A duplicate
|
|
135
|
+
// delivery would lose the claim and no-op anyway; skipping it saves
|
|
136
|
+
// wall-clock this close to the invocation deadline.
|
|
137
|
+
if (!chainViaDurableBackground && nextRowInserted) {
|
|
138
|
+
const claim = await d
|
|
139
|
+
.readBackgroundRunClaim(nextRunId)
|
|
140
|
+
.catch(() => null);
|
|
141
|
+
if (
|
|
142
|
+
claim &&
|
|
143
|
+
((claim.dispatchMode && claim.dispatchMode !== "background") ||
|
|
144
|
+
(claim.status && claim.status !== "running"))
|
|
145
|
+
) {
|
|
146
|
+
dispatched = true;
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
console.error(
|
|
151
|
+
`[agent-chat] background continuation dispatch attempt ${attempt + 1} failed:`,
|
|
152
|
+
dispatchErr instanceof Error ? dispatchErr.message : dispatchErr,
|
|
153
|
+
);
|
|
154
|
+
// Netlify loop protection (see `isLoopProtectionDispatchError`) is a
|
|
155
|
+
// property of this same live, nested call chain — retrying the exact
|
|
156
|
+
// same nested self-dispatch within the next few seconds will not
|
|
157
|
+
// change that, so further attempts are a guaranteed-doomed use of
|
|
158
|
+
// this worker's remaining wall clock. Stop immediately (instead of
|
|
159
|
+
// burning the full `maxDispatchAttempts` budget) and fall into the
|
|
160
|
+
// same deferred-recovery path below, which hands the successor to the
|
|
161
|
+
// sweep — a genuinely different, non-nested invocation.
|
|
162
|
+
if (isLoopProtectionDispatchError(dispatchErr)) {
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return { dispatched, lastDispatchErr, nestedDepthExceeded };
|
|
168
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { getCurrentTurnEventsForThread } from "../run-store.js";
|
|
2
|
+
import {
|
|
3
|
+
classifyToolCallJournal,
|
|
4
|
+
type ToolCallJournal,
|
|
5
|
+
} from "../tool-call-journal.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Minimal shape `runAgentLoop` needs from a prior tool call — kept local
|
|
9
|
+
* (rather than importing `AgentLoopToolCallSummary` from `production-agent.js`)
|
|
10
|
+
* so this module has no runtime dependency back on the file that calls it.
|
|
11
|
+
*/
|
|
12
|
+
export interface PriorTurnToolCallSummary {
|
|
13
|
+
name: string;
|
|
14
|
+
input: unknown;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Minimal shape `runAgentLoop` needs from a prior tool result. See
|
|
18
|
+
* `PriorTurnToolCallSummary` for why this is a local shape, not an import. */
|
|
19
|
+
export interface PriorTurnToolResultSummary {
|
|
20
|
+
name: string;
|
|
21
|
+
content: string;
|
|
22
|
+
isError: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Tool-call journal hard-block (resume safety). Snapshot the per-turn journal
|
|
27
|
+
* ONCE here, before any tool runs in this chunk, so it reflects only PRIOR
|
|
28
|
+
* run chunks of this logical turn. A write tool whose exact call already
|
|
29
|
+
* completed in an earlier interrupted chunk must not re-fire its side effect;
|
|
30
|
+
* when matched, `runToolCall` returns the journaled result instead of
|
|
31
|
+
* executing.
|
|
32
|
+
*
|
|
33
|
+
* Loaded eagerly (not lazily mid-loop) so the current chunk's own
|
|
34
|
+
* asynchronously-persisted tool_done events can never leak in and make a
|
|
35
|
+
* same-chunk call wrongly short-circuit. Best-effort: any ledger failure
|
|
36
|
+
* leaves the journal empty and all calls run normally. Fresh first-turn calls
|
|
37
|
+
* see an empty journal and are unaffected.
|
|
38
|
+
*
|
|
39
|
+
* Also returns the prior chunks' tool calls/results so the caller can seed
|
|
40
|
+
* its own `toolCallHistory` / `toolResultHistory` accumulators — final
|
|
41
|
+
* response guards must see successful reads from earlier chunks, not only
|
|
42
|
+
* tools executed after the latest handoff. Otherwise a guard can reject a
|
|
43
|
+
* grounded answer (or a successfully-created artifact) after the
|
|
44
|
+
* evidence-producing query completed in a predecessor run.
|
|
45
|
+
*
|
|
46
|
+
* Moved verbatim out of `runAgentLoop`'s per-turn setup — behavior unchanged.
|
|
47
|
+
*/
|
|
48
|
+
export async function loadPriorTurnToolCallJournal(
|
|
49
|
+
threadId: string | undefined,
|
|
50
|
+
): Promise<{
|
|
51
|
+
toolCallJournal: ToolCallJournal | null;
|
|
52
|
+
priorToolCalls: PriorTurnToolCallSummary[];
|
|
53
|
+
priorToolResults: PriorTurnToolResultSummary[];
|
|
54
|
+
}> {
|
|
55
|
+
const priorToolCalls: PriorTurnToolCallSummary[] = [];
|
|
56
|
+
const priorToolResults: PriorTurnToolResultSummary[] = [];
|
|
57
|
+
let toolCallJournal: ToolCallJournal | null = null;
|
|
58
|
+
if (!threadId) {
|
|
59
|
+
return { toolCallJournal, priorToolCalls, priorToolResults };
|
|
60
|
+
}
|
|
61
|
+
try {
|
|
62
|
+
const priorEvents = await getCurrentTurnEventsForThread(threadId);
|
|
63
|
+
if (priorEvents.length > 0) {
|
|
64
|
+
for (const event of priorEvents) {
|
|
65
|
+
if (event.type === "tool_start") {
|
|
66
|
+
priorToolCalls.push({
|
|
67
|
+
name: event.tool,
|
|
68
|
+
input: event.input,
|
|
69
|
+
});
|
|
70
|
+
} else if (event.type === "tool_done") {
|
|
71
|
+
priorToolResults.push({
|
|
72
|
+
name: event.tool,
|
|
73
|
+
content: event.result,
|
|
74
|
+
isError: event.isError === true,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
toolCallJournal = classifyToolCallJournal(priorEvents);
|
|
79
|
+
}
|
|
80
|
+
} catch {
|
|
81
|
+
// Journal is a hardening layer, never a gate — a failed ledger read just
|
|
82
|
+
// means no hard-block this turn.
|
|
83
|
+
}
|
|
84
|
+
return { toolCallJournal, priorToolCalls, priorToolResults };
|
|
85
|
+
}
|