@agent-native/core 0.109.4 → 0.110.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 +1 -1
- package/corpus/core/CHANGELOG.md +17 -0
- package/corpus/core/docs/content/actions.mdx +2 -4
- package/corpus/core/docs/content/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/audit-log.mdx +1 -2
- package/corpus/core/docs/content/authentication.mdx +3 -2
- package/corpus/core/docs/content/client.mdx +19 -18
- package/corpus/core/docs/content/components.mdx +1 -1
- package/corpus/core/docs/content/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/doctor.mdx +27 -6
- package/corpus/core/docs/content/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/getting-started.mdx +4 -2
- package/corpus/core/docs/content/internationalization.mdx +9 -6
- package/corpus/core/docs/content/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/ar-SA/client.mdx +19 -18
- package/corpus/core/docs/content/locales/ar-SA/components.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/ar-SA/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/ar-SA/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/ar-SA/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/ar-SA/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/ar-SA/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/ar-SA/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/ar-SA/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/de-DE/client.mdx +19 -18
- package/corpus/core/docs/content/locales/de-DE/components.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/de-DE/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/de-DE/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/de-DE/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/de-DE/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/de-DE/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/de-DE/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/de-DE/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/es-ES/client.mdx +19 -18
- package/corpus/core/docs/content/locales/es-ES/components.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/es-ES/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/es-ES/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/es-ES/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/es-ES/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/es-ES/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/es-ES/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/es-ES/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/fr-FR/client.mdx +19 -18
- package/corpus/core/docs/content/locales/fr-FR/components.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/fr-FR/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/fr-FR/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/fr-FR/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/fr-FR/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/fr-FR/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/fr-FR/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/fr-FR/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/hi-IN/client.mdx +19 -18
- package/corpus/core/docs/content/locales/hi-IN/components.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/hi-IN/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/hi-IN/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/hi-IN/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/hi-IN/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/hi-IN/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/hi-IN/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/hi-IN/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/hi-IN/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/ja-JP/client.mdx +19 -18
- package/corpus/core/docs/content/locales/ja-JP/components.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/ja-JP/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/ja-JP/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/ja-JP/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/ja-JP/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/ja-JP/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/ja-JP/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/ja-JP/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/ko-KR/client.mdx +19 -18
- package/corpus/core/docs/content/locales/ko-KR/components.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/ko-KR/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/ko-KR/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/ko-KR/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/ko-KR/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/ko-KR/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/ko-KR/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/ko-KR/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/pt-BR/client.mdx +19 -18
- package/corpus/core/docs/content/locales/pt-BR/components.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/pt-BR/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/pt-BR/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/pt-BR/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/pt-BR/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/pt-BR/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/pt-BR/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/pt-BR/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/zh-CN/client.mdx +19 -18
- package/corpus/core/docs/content/locales/zh-CN/components.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-CN/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/zh-CN/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-CN/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/zh-CN/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/zh-CN/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/zh-CN/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-CN/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/zh-TW/client.mdx +19 -18
- package/corpus/core/docs/content/locales/zh-TW/components.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-TW/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/zh-TW/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-TW/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/zh-TW/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/zh-TW/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/zh-TW/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-TW/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/observability.mdx +1 -2
- package/corpus/core/docs/content/package-lifecycle.mdx +29 -0
- package/corpus/core/docs/content/real-time-collaboration.mdx +8 -7
- package/corpus/core/docs/content/sharing.mdx +1 -2
- package/corpus/core/docs/content/template-chat.mdx +1 -2
- package/corpus/core/docs/content/toolkit-agent-ux.mdx +3 -2
- package/corpus/core/docs/content/toolkit-observability.mdx +1 -2
- package/corpus/core/docs/content/toolkit-settings.mdx +2 -2
- package/corpus/core/docs/content/toolkit-sharing.mdx +5 -2
- package/corpus/core/docs/content/tracking.mdx +2 -4
- package/corpus/core/docs/content/what-is-agent-native.mdx +1 -2
- package/corpus/core/export-snapshot.json +324 -0
- package/corpus/core/migration-manifest.json +1492 -0
- package/corpus/core/package.json +21 -3
- package/corpus/core/src/cli/doctor.ts +77 -7
- package/corpus/core/src/cli/migration-codemod.ts +569 -0
- package/corpus/core/src/cli/upgrade.ts +63 -7
- package/corpus/core/src/client/agent-chat/index.ts +279 -0
- package/corpus/core/src/client/agent-page/AgentContextTab.tsx +3 -1
- package/corpus/core/src/client/analytics/index.ts +40 -0
- package/corpus/core/src/client/api-path.ts +2 -2
- package/corpus/core/src/client/automation/index.ts +4 -0
- package/corpus/core/src/client/changelog/index.ts +1 -0
- package/corpus/core/src/client/chat/widgets/InlineExtensionWidget.tsx +5 -84
- package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +52 -14
- package/corpus/core/src/client/chat/widgets/inline-extension-result.ts +86 -0
- package/corpus/core/src/client/client-bootstrap.ts +7 -0
- package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +1 -1
- package/corpus/core/src/client/hooks/index.ts +46 -0
- package/corpus/core/src/client/host/index.ts +170 -0
- package/corpus/core/src/client/index.ts +20 -664
- package/corpus/core/src/client/navigation/index.ts +54 -0
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +1 -1
- package/corpus/core/src/client/resources/index.ts +2 -1
- package/corpus/core/src/client/resources/use-resources.ts +0 -20
- package/corpus/core/src/client/route-chunk-recovery/index.ts +1 -0
- package/corpus/core/src/client/ui/index.ts +55 -0
- package/corpus/core/src/client/uploads/index.ts +1 -0
- package/corpus/core/src/client/uploads/use-upload-resource.ts +24 -0
- package/corpus/core/src/client/widgets/index.ts +41 -0
- package/corpus/core/src/localization/default-messages.ts +2 -1
- package/corpus/core/src/package-lifecycle/deprecated-imports.ts +179 -0
- package/corpus/core/src/package-lifecycle/index.ts +5 -0
- package/corpus/core/src/package-lifecycle/migration-manifest.ts +159 -0
- package/corpus/core/src/package-lifecycle/migration-message.ts +6 -0
- package/corpus/core/src/package-lifecycle/tombstone.ts +44 -0
- package/corpus/core/src/package-lifecycle/upgrade-error.ts +19 -0
- package/corpus/core/src/templates/default/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/core/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/core/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/core/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/core/src/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/core/src/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/core/src/templates/default/app/hooks/use-navigation-state.ts +2 -5
- package/corpus/core/src/templates/default/app/i18n/index.ts +1 -1
- package/corpus/core/src/templates/default/app/lib/utils.ts +1 -1
- package/corpus/core/src/templates/default/app/root.tsx +8 -6
- package/corpus/core/src/templates/default/app/routes/_index.tsx +2 -1
- package/corpus/core/src/templates/default/app/routes/agent.tsx +2 -1
- package/corpus/core/src/templates/default/app/routes/settings.tsx +2 -3
- package/corpus/core/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/core/src/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
- package/corpus/core/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/core/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/core/src/vite/action-types-plugin.ts +4 -0
- package/corpus/core/src/vite/client.ts +80 -65
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/analytics/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/analytics/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/analytics/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/analytics/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/analytics/app/components/Markdown.tsx +1 -1
- package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +2 -1
- package/corpus/templates/analytics/app/components/agents/FeatureFlagsFleetPanel.tsx +6 -4
- package/corpus/templates/analytics/app/components/analysis/AnalysisHistoryPanel.tsx +1 -1
- package/corpus/templates/analytics/app/components/auth/AuthProvider.tsx +2 -2
- package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DashboardHistoryPanel.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +2 -1
- package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +4 -6
- package/corpus/templates/analytics/app/components/layout/DashboardHeader.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Header.tsx +2 -2
- package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/analytics/app/components/layout/MobileNav.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/NewAnalysisDialog.tsx +4 -6
- package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +3 -5
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +10 -10
- package/corpus/templates/analytics/app/entry.client.tsx +2 -4
- package/corpus/templates/analytics/app/hooks/use-analysis-revisions.ts +4 -1
- package/corpus/templates/analytics/app/hooks/use-dashboard-chat-context.ts +6 -4
- package/corpus/templates/analytics/app/hooks/use-dashboard-revisions.ts +4 -1
- package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +1 -1
- package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +2 -4
- package/corpus/templates/analytics/app/hooks/use-replay-storage-status.ts +1 -1
- package/corpus/templates/analytics/app/hooks/use-user-pref.ts +1 -1
- package/corpus/templates/analytics/app/i18n/index.ts +1 -1
- package/corpus/templates/analytics/app/i18n-data.ts +1 -1
- package/corpus/templates/analytics/app/lib/api-hooks.ts +1 -1
- package/corpus/templates/analytics/app/lib/item-popularity.ts +1 -1
- package/corpus/templates/analytics/app/lib/query-metrics.ts +1 -1
- package/corpus/templates/analytics/app/lib/sql-query.ts +1 -1
- package/corpus/templates/analytics/app/lib/tab-id.ts +1 -1
- package/corpus/templates/analytics/app/lib/track-metric.ts +1 -1
- package/corpus/templates/analytics/app/lib/user-info.ts +1 -1
- package/corpus/templates/analytics/app/lib/utils.ts +1 -1
- package/corpus/templates/analytics/app/pages/Agents.tsx +5 -6
- package/corpus/templates/analytics/app/pages/Ask.tsx +2 -2
- package/corpus/templates/analytics/app/pages/DataDictionary.tsx +3 -3
- package/corpus/templates/analytics/app/pages/DataSources.tsx +7 -5
- package/corpus/templates/analytics/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/analytics/app/pages/Placeholder.tsx +1 -1
- package/corpus/templates/analytics/app/pages/Settings.tsx +5 -6
- package/corpus/templates/analytics/app/pages/adhoc/BlankDashboard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventCombobox.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventPanel.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ExplorerChart.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/FilterBuilder.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/GroupByPicker.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyCombobox.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyValueCombobox.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/use-explorer-config.ts +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +8 -6
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/EmailReportDialog.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +4 -6
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewSqlPopover.tsx +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +9 -7
- package/corpus/templates/analytics/app/pages/analyses/AnalysesList.tsx +3 -6
- package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +4 -4
- package/corpus/templates/analytics/app/pages/analyses/LegacyFusionAnalysis.tsx +2 -1
- package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +1 -11
- package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +2 -1
- package/corpus/templates/analytics/app/pages/monitoring/UptimePanel.tsx +1 -14
- package/corpus/templates/analytics/app/pages/monitoring/errors/IssueDetail.tsx +1 -1
- package/corpus/templates/analytics/app/pages/monitoring/errors/IssueList.tsx +1 -1
- package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +1 -6
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorDetail.tsx +1 -8
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +4 -10
- package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +1 -6
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPageEditor.tsx +4 -8
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPagesView.tsx +4 -10
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/i18n.ts +1 -6
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +5 -6
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +1 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +5 -5
- package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +2 -2
- package/corpus/templates/analytics/app/pages/settings/settings-search.ts +1 -1
- package/corpus/templates/analytics/app/root.tsx +6 -6
- package/corpus/templates/analytics/app/routes/agent.tsx +1 -1
- package/corpus/templates/analytics/app/routes/catalog.tsx +2 -2
- package/corpus/templates/analytics/app/routes/chart.tsx +1 -1
- package/corpus/templates/analytics/app/routes/status.$slug.tsx +1 -13
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/assets/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/assets/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/assets/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/assets/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +2 -1
- package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +3 -3
- package/corpus/templates/assets/app/components/layout/Header.tsx +3 -5
- package/corpus/templates/assets/app/components/layout/Layout.tsx +4 -4
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +6 -6
- package/corpus/templates/assets/app/components/library/CreateLibraryDialog.tsx +2 -2
- package/corpus/templates/assets/app/components/library/GenerationPresetsPanel.tsx +2 -1
- package/corpus/templates/assets/app/components/library/LibraryCard.tsx +1 -1
- package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +1 -1
- package/corpus/templates/assets/app/hooks/use-image-model-menu.ts +2 -2
- package/corpus/templates/assets/app/hooks/use-navigation-state.ts +3 -3
- package/corpus/templates/assets/app/i18n/index.ts +1 -1
- package/corpus/templates/assets/app/i18n-data.ts +1 -1
- package/corpus/templates/assets/app/lib/asset-urls.ts +1 -1
- package/corpus/templates/assets/app/lib/utils.ts +1 -1
- package/corpus/templates/assets/app/root.tsx +10 -9
- package/corpus/templates/assets/app/routes/_index.tsx +3 -3
- package/corpus/templates/assets/app/routes/agent.tsx +1 -1
- package/corpus/templates/assets/app/routes/asset.$id.tsx +3 -3
- package/corpus/templates/assets/app/routes/asset.$id_.embed.tsx +1 -1
- package/corpus/templates/assets/app/routes/audit.tsx +2 -2
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +6 -4
- package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +4 -4
- package/corpus/templates/assets/app/routes/brand-kits.$id_.settings.tsx +3 -3
- package/corpus/templates/assets/app/routes/library.tsx +13 -9
- package/corpus/templates/assets/app/routes/run.$id_.embed.tsx +1 -1
- package/corpus/templates/assets/app/routes/settings.tsx +11 -12
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/brain/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/brain/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/brain/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/brain/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/brain/app/components/brain/CanonicalPreviewSheet.tsx +1 -1
- package/corpus/templates/brain/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/brain/app/hooks/use-distillation-bridge.ts +3 -6
- package/corpus/templates/brain/app/hooks/use-navigation-state.ts +3 -4
- package/corpus/templates/brain/app/i18n/index.ts +1 -1
- package/corpus/templates/brain/app/i18n-data.ts +1 -1
- package/corpus/templates/brain/app/lib/utils.ts +1 -1
- package/corpus/templates/brain/app/root.tsx +10 -9
- package/corpus/templates/brain/app/routes/_index.tsx +2 -2
- package/corpus/templates/brain/app/routes/agent.tsx +1 -1
- package/corpus/templates/brain/app/routes/knowledge.tsx +2 -2
- package/corpus/templates/brain/app/routes/ops.tsx +2 -2
- package/corpus/templates/brain/app/routes/review.tsx +2 -2
- package/corpus/templates/brain/app/routes/search.tsx +2 -1
- package/corpus/templates/brain/app/routes/settings.tsx +8 -7
- package/corpus/templates/brain/app/routes/sources.tsx +2 -2
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/calendar/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/calendar/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/calendar/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/calendar/app/components/CloudUpgrade.tsx +1 -1
- package/corpus/templates/calendar/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/calendar/app/components/TimezoneCombobox.tsx +1 -1
- package/corpus/templates/calendar/app/components/booking/BookingConfirmation.tsx +1 -1
- package/corpus/templates/calendar/app/components/booking/BookingForm.tsx +2 -1
- package/corpus/templates/calendar/app/components/booking/TimeSlotPicker.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/AddCalendarDialog.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/ApolloPanel.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/CommandPalette.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +3 -5
- package/corpus/templates/calendar/app/components/calendar/DayView.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/DeleteEventDialog.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventCard.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventDescription.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/EventDialog.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventOptionControls.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +3 -3
- package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +3 -5
- package/corpus/templates/calendar/app/components/calendar/GoogleSyncButton.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/GuestNotificationDialog.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/IntegrationsSidebar.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/KeyboardShortcutsHelp.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/PeopleSearchDialog.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/WorkingLocationEditor.tsx +1 -1
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +3 -3
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +4 -6
- package/corpus/templates/calendar/app/hooks/use-apollo.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-attendee-timezones.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-availability.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-booking-links.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-bookings.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-db-status.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-events.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-external-calendars.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-google-auth.ts +2 -2
- package/corpus/templates/calendar/app/hooks/use-integrations.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-navigation-state.ts +3 -2
- package/corpus/templates/calendar/app/hooks/use-overlay-people.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-people.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-settings.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-view-preferences.ts +2 -1
- package/corpus/templates/calendar/app/hooks/use-zoom-auth.ts +2 -1
- package/corpus/templates/calendar/app/i18n/index.ts +1 -1
- package/corpus/templates/calendar/app/i18n-data.ts +1 -1
- package/corpus/templates/calendar/app/lib/api-path.ts +1 -1
- package/corpus/templates/calendar/app/lib/utils.ts +1 -1
- package/corpus/templates/calendar/app/pages/AvailabilitySettings.tsx +1 -1
- package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +3 -1
- package/corpus/templates/calendar/app/pages/BookingPage.tsx +2 -3
- package/corpus/templates/calendar/app/pages/BookingsList.tsx +1 -1
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +3 -5
- package/corpus/templates/calendar/app/pages/ManageBookingPage.tsx +1 -1
- package/corpus/templates/calendar/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/calendar/app/pages/Settings.tsx +9 -8
- package/corpus/templates/calendar/app/root.tsx +15 -9
- package/corpus/templates/calendar/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/calendar/app/routes/_app.settings.tsx +1 -1
- package/corpus/templates/calendar/app/routes/event.tsx +3 -3
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/chat/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/chat/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +4 -4
- package/corpus/templates/chat/app/hooks/use-navigation-state.ts +3 -4
- package/corpus/templates/chat/app/i18n/index.ts +1 -1
- package/corpus/templates/chat/app/i18n-data.ts +1 -1
- package/corpus/templates/chat/app/lib/utils.ts +1 -1
- package/corpus/templates/chat/app/root.tsx +10 -9
- package/corpus/templates/chat/app/routes/_index.tsx +2 -2
- package/corpus/templates/chat/app/routes/agent.tsx +10 -3
- package/corpus/templates/chat/app/routes/database.tsx +1 -1
- package/corpus/templates/chat/app/routes/observability.tsx +2 -1
- package/corpus/templates/chat/app/routes/settings.tsx +4 -5
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/clips/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/clips/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/clips/app/components/capture-install-options.tsx +2 -1
- package/corpus/templates/clips/app/components/dictate/vocabulary-section.tsx +2 -2
- package/corpus/templates/clips/app/components/editable-recording-title.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/chapters-editor.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/editor-layout.tsx +4 -14
- package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/split-button.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +3 -3
- package/corpus/templates/clips/app/components/editor/thumbnail-picker.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/transcript-editor.tsx +1 -1
- package/corpus/templates/clips/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +1 -1
- package/corpus/templates/clips/app/components/library/create-folder-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/library/create-space-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/library/empty-state.tsx +1 -1
- package/corpus/templates/clips/app/components/library/folder-tree.tsx +1 -1
- package/corpus/templates/clips/app/components/library/library-grid.tsx +2 -2
- package/corpus/templates/clips/app/components/library/library-layout.tsx +6 -6
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +1 -1
- package/corpus/templates/clips/app/components/library/recording-card.tsx +1 -1
- package/corpus/templates/clips/app/components/library/search-bar.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/auto-record-prompt.tsx +1 -17
- package/corpus/templates/clips/app/components/meetings/canvas-editor.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +2 -20
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +3 -1
- package/corpus/templates/clips/app/components/meetings/transcript-bubbles.tsx +1 -1
- package/corpus/templates/clips/app/components/player/access-password-prompt.tsx +1 -1
- package/corpus/templates/clips/app/components/player/captions-overlay.tsx +1 -1
- package/corpus/templates/clips/app/components/player/comments-panel.tsx +2 -1
- package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +2 -1
- package/corpus/templates/clips/app/components/player/insights-panel.tsx +2 -1
- package/corpus/templates/clips/app/components/player/player-controls.tsx +1 -1
- package/corpus/templates/clips/app/components/player/settings-panel.tsx +2 -2
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +3 -3
- package/corpus/templates/clips/app/components/player/sign-in-prompt-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/player/timestamped-comment-button.tsx +2 -1
- package/corpus/templates/clips/app/components/player/transcript-panel.tsx +3 -6
- package/corpus/templates/clips/app/components/player/video-player.tsx +3 -5
- package/corpus/templates/clips/app/components/recorder/camera-visualizer.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/countdown-overlay.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/microphone-visualizer.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +2 -1
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +3 -13
- package/corpus/templates/clips/app/components/recorder/recording-toolbar.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +3 -6
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +2 -2
- package/corpus/templates/clips/app/components/sharing/viewed-by-popover.tsx +2 -1
- package/corpus/templates/clips/app/components/workspace/branding-editor.tsx +3 -5
- package/corpus/templates/clips/app/components/workspace/engagement-chart.tsx +1 -1
- package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +3 -1
- package/corpus/templates/clips/app/components/workspace/invite-dialog.tsx +2 -1
- package/corpus/templates/clips/app/components/workspace/members-list.tsx +2 -1
- package/corpus/templates/clips/app/components/workspace/notifications-list.tsx +1 -1
- package/corpus/templates/clips/app/components/workspace/top-creators-table.tsx +1 -1
- package/corpus/templates/clips/app/entry.client.tsx +2 -4
- package/corpus/templates/clips/app/hooks/use-auto-title.ts +3 -17
- package/corpus/templates/clips/app/hooks/use-library.ts +4 -1
- package/corpus/templates/clips/app/hooks/use-navigation-state.ts +2 -1
- package/corpus/templates/clips/app/hooks/use-video-storage-status.ts +1 -1
- package/corpus/templates/clips/app/hooks/use-view-tracking.ts +1 -1
- package/corpus/templates/clips/app/i18n/index.ts +5 -5
- package/corpus/templates/clips/app/lib/camera-blur.ts +1 -1
- package/corpus/templates/clips/app/lib/capture-install-options.ts +1 -1
- package/corpus/templates/clips/app/lib/thumbnail-capture.ts +1 -1
- package/corpus/templates/clips/app/lib/utils.ts +1 -1
- package/corpus/templates/clips/app/root.tsx +13 -9
- package/corpus/templates/clips/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/clips/app/routes/_app.archive.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +2 -2
- package/corpus/templates/clips/app/routes/_app.extensions.$id.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.extensions._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.library.folder.$folderId.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +2 -2
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +3 -5
- package/corpus/templates/clips/app/routes/_app.notifications.tsx +2 -2
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +7 -7
- package/corpus/templates/clips/app/routes/_app.settings.organization.tsx +2 -1
- package/corpus/templates/clips/app/routes/_app.shared.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.folder.$folderId.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.spaces._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.trash.tsx +2 -1
- package/corpus/templates/clips/app/routes/_index.tsx +1 -1
- package/corpus/templates/clips/app/routes/bug-report.done.tsx +2 -1
- package/corpus/templates/clips/app/routes/bug-report.tsx +2 -1
- package/corpus/templates/clips/app/routes/download.tsx +2 -1
- package/corpus/templates/clips/app/routes/embed.$shareId.tsx +2 -1
- package/corpus/templates/clips/app/routes/invite.$token.tsx +2 -1
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +4 -5
- package/corpus/templates/clips/app/routes/record.tsx +4 -4
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +5 -6
- package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +3 -1
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/content/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/content/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/content/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/content/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/content/app/blocks/SourceComponentBlock.tsx +1 -1
- package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +1 -1
- package/corpus/templates/content/app/components/EmptyState.tsx +1 -1
- package/corpus/templates/content/app/components/QueryErrorState.tsx +1 -1
- package/corpus/templates/content/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +1 -1
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +3 -1
- package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +1 -1
- package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +1 -1
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +7 -5
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +3 -6
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +7 -9
- package/corpus/templates/content/app/components/editor/EmojiPicker.tsx +1 -1
- package/corpus/templates/content/app/components/editor/LinkHoverPreview.tsx +1 -1
- package/corpus/templates/content/app/components/editor/NotionConflictBanner.tsx +1 -1
- package/corpus/templates/content/app/components/editor/NotionSyncBar.tsx +1 -1
- package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +2 -1
- package/corpus/templates/content/app/components/editor/TableHoverControls.tsx +1 -1
- package/corpus/templates/content/app/components/editor/VersionHistoryPanel.tsx +2 -1
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +6 -4
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +5 -6
- package/corpus/templates/content/app/components/editor/database/FormView.tsx +1 -1
- package/corpus/templates/content/app/components/editor/database/settings.tsx +2 -2
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +1 -1
- package/corpus/templates/content/app/components/editor/extensions/AudioBlock.tsx +2 -1
- package/corpus/templates/content/app/components/editor/extensions/CodeBlockNode.tsx +1 -1
- package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +2 -1
- package/corpus/templates/content/app/components/editor/extensions/LocalMdxComponentNode.tsx +1 -1
- package/corpus/templates/content/app/components/editor/extensions/VideoBlock.tsx +2 -1
- package/corpus/templates/content/app/components/editor/extensions/registryBlocks.ts +1 -1
- package/corpus/templates/content/app/components/editor/image-upload.ts +1 -1
- package/corpus/templates/content/app/components/editor/registrySlashItems.ts +1 -1
- package/corpus/templates/content/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/content/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +9 -9
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +1 -1
- package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +5 -1
- package/corpus/templates/content/app/entry.client.tsx +2 -4
- package/corpus/templates/content/app/hooks/use-comments.ts +4 -1
- package/corpus/templates/content/app/hooks/use-content-database.ts +4 -1
- package/corpus/templates/content/app/hooks/use-content-spaces.ts +4 -1
- package/corpus/templates/content/app/hooks/use-db-sync.ts +1 -1
- package/corpus/templates/content/app/hooks/use-document-properties.ts +4 -1
- package/corpus/templates/content/app/hooks/use-document-versions.ts +4 -1
- package/corpus/templates/content/app/hooks/use-documents.ts +4 -1
- package/corpus/templates/content/app/hooks/use-mention-members.ts +1 -1
- package/corpus/templates/content/app/hooks/use-navigation-state.ts +2 -1
- package/corpus/templates/content/app/hooks/use-notion.ts +2 -2
- package/corpus/templates/content/app/i18n/index.ts +1 -1
- package/corpus/templates/content/app/i18n-data.ts +1 -1
- package/corpus/templates/content/app/lib/local-control-resources.ts +1 -1
- package/corpus/templates/content/app/lib/utils.ts +1 -1
- package/corpus/templates/content/app/root.tsx +15 -9
- package/corpus/templates/content/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/content/app/routes/_app.local-files.tsx +2 -1
- package/corpus/templates/content/app/routes/_app.page.$id.tsx +1 -1
- package/corpus/templates/content/app/routes/_app.settings.tsx +4 -5
- package/corpus/templates/content/app/routes/p.$id.tsx +2 -1
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/design/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/design/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/design/app/components/QueryErrorState.tsx +1 -1
- package/corpus/templates/design/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/design/app/components/design/AutoLayoutSuggestionDialog.tsx +1 -1
- package/corpus/templates/design/app/components/design/BreakpointBar.tsx +1 -30
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +4 -3
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +4 -4
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +2 -5
- package/corpus/templates/design/app/components/design/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/components/design/EditPanel.tsx +2 -2
- package/corpus/templates/design/app/components/design/FusionAppBanner.tsx +4 -1
- package/corpus/templates/design/app/components/design/KeyboardShortcutsPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design/LocalhostWriteConsentDialog.tsx +1 -1
- package/corpus/templates/design/app/components/design/MotionDock.tsx +1 -19
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +2 -2
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +2 -2
- package/corpus/templates/design/app/components/design/ReadOnlyDesignBanner.tsx +1 -1
- package/corpus/templates/design/app/components/design/ReviewCommentsPanel.tsx +2 -2
- package/corpus/templates/design/app/components/design/ReviewPanel.tsx +1 -22
- package/corpus/templates/design/app/components/design/ReviewStatusControl.tsx +2 -2
- package/corpus/templates/design/app/components/design/StatesPanel.tsx +4 -14
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +2 -17
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/editor/BufferSync.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/inline-provider.ts +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/localhost-provider.ts +1 -1
- package/corpus/templates/design/app/components/design/design-canvas/annotation-snapshot.ts +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +2 -2
- package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/field-primitives.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/frame-presets-panel.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/typography-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/inspector/BreakpointOverrideIndicator.tsx +1 -16
- package/corpus/templates/design/app/components/design/inspector/GlslShaderPanel.tsx +2 -34
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +2 -1
- package/corpus/templates/design/app/components/design/inspector/InteractionStatePanel.tsx +1 -25
- package/corpus/templates/design/app/components/design/inspector/MotionKeyframeDiamond.tsx +1 -30
- package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design-system/ProductionDesignSystemShowcase.tsx +1 -1
- package/corpus/templates/design/app/components/editor/FigmaLinkComposerBubble.tsx +1 -1
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -3
- package/corpus/templates/design/app/components/layout/Header.tsx +4 -4
- package/corpus/templates/design/app/components/layout/Layout.tsx +4 -5
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +4 -6
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +1 -1
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/components/visual-editor/NodeRewriteProposal.tsx +2 -2
- package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +3 -4
- package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +1 -1
- package/corpus/templates/design/app/hooks/use-agent-generating.ts +1 -1
- package/corpus/templates/design/app/hooks/use-design-system.ts +1 -1
- package/corpus/templates/design/app/hooks/use-design-systems.ts +1 -1
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +2 -2
- package/corpus/templates/design/app/hooks/use-question-flow.ts +1 -1
- package/corpus/templates/design/app/i18n/index.ts +1 -1
- package/corpus/templates/design/app/i18n-data.ts +1 -1
- package/corpus/templates/design/app/i18n-keyboard-shortcuts.ts +1 -1
- package/corpus/templates/design/app/lib/agent-chat.ts +1 -1
- package/corpus/templates/design/app/lib/design-save-outbox.ts +1 -1
- package/corpus/templates/design/app/lib/desktop-design-preview.ts +1 -1
- package/corpus/templates/design/app/lib/figma-connection.ts +2 -1
- package/corpus/templates/design/app/lib/figma-svg-copy.ts +1 -1
- package/corpus/templates/design/app/lib/pending-generation.ts +1 -1
- package/corpus/templates/design/app/lib/utils.ts +1 -1
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +4 -6
- package/corpus/templates/design/app/pages/DesignSystems.tsx +4 -4
- package/corpus/templates/design/app/pages/Index.tsx +5 -5
- package/corpus/templates/design/app/pages/NotFound.tsx +3 -5
- package/corpus/templates/design/app/pages/Present.tsx +7 -6
- package/corpus/templates/design/app/pages/Templates.tsx +4 -4
- package/corpus/templates/design/app/pages/VisualEdit.tsx +3 -1
- package/corpus/templates/design/app/pages/design-editor/editor-session.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/generation-prompt-directives.ts +1 -1
- package/corpus/templates/design/app/root.tsx +10 -9
- package/corpus/templates/design/app/routes/agent.tsx +2 -1
- package/corpus/templates/design/app/routes/observability.tsx +1 -1
- package/corpus/templates/design/app/routes/settings.tsx +4 -5
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/dispatch/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/dispatch/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +3 -4
- package/corpus/templates/dispatch/app/i18n/index.ts +1 -1
- package/corpus/templates/dispatch/app/i18n-data.ts +1 -1
- package/corpus/templates/dispatch/app/root.tsx +10 -9
- package/corpus/templates/dispatch/app/routes/agent.tsx +2 -1
- package/corpus/templates/dispatch/app/routes/integrations.tsx +3 -3
- package/corpus/templates/dispatch/app/routes/settings.tsx +4 -5
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/forms/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/forms/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/forms/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/forms/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/forms/app/components/CloudUpgrade.tsx +1 -1
- package/corpus/templates/forms/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/forms/app/components/builder/FieldPropertiesPanel.tsx +1 -1
- package/corpus/templates/forms/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/forms/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/forms/app/hooks/use-db-status.ts +1 -1
- package/corpus/templates/forms/app/hooks/use-forms.ts +2 -2
- package/corpus/templates/forms/app/hooks/use-navigation-state.ts +3 -3
- package/corpus/templates/forms/app/hooks/use-responses.ts +1 -1
- package/corpus/templates/forms/app/i18n/index.ts +1 -1
- package/corpus/templates/forms/app/lib/utils.ts +1 -1
- package/corpus/templates/forms/app/pages/AskPage.tsx +2 -2
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +5 -6
- package/corpus/templates/forms/app/pages/FormFillPage.tsx +2 -1
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +3 -6
- package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +1 -1
- package/corpus/templates/forms/app/pages/ResponsesPage.tsx +1 -1
- package/corpus/templates/forms/app/root.tsx +15 -12
- package/corpus/templates/forms/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/forms/app/routes/_app.settings.tsx +4 -5
- package/corpus/templates/forms/app/routes/_index.tsx +1 -1
- package/corpus/templates/forms/app/routes/form-preview.tsx +5 -1
- package/corpus/templates/macros/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/macros/app/components/AddExerciseDialog.tsx +2 -1
- package/corpus/templates/macros/app/components/AddMealDialog.tsx +2 -1
- package/corpus/templates/macros/app/components/AddWeightDialog.tsx +2 -1
- package/corpus/templates/macros/app/components/DailyProgress.tsx +2 -1
- package/corpus/templates/macros/app/components/ExerciseCard.tsx +1 -1
- package/corpus/templates/macros/app/components/MealCard.tsx +1 -1
- package/corpus/templates/macros/app/components/QueryErrorState.tsx +1 -1
- package/corpus/templates/macros/app/components/VoiceDictation.tsx +2 -1
- package/corpus/templates/macros/app/components/WeeklyCaloriesChart.tsx +1 -1
- package/corpus/templates/macros/app/components/WeightCard.tsx +1 -1
- package/corpus/templates/macros/app/components/WeightTracker.tsx +2 -2
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +5 -8
- package/corpus/templates/macros/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/macros/app/i18n/index.ts +1 -1
- package/corpus/templates/macros/app/lib/api.ts +1 -1
- package/corpus/templates/macros/app/lib/utils.ts +1 -1
- package/corpus/templates/macros/app/root.tsx +10 -9
- package/corpus/templates/macros/app/routes/_index.tsx +2 -2
- package/corpus/templates/macros/app/routes/agent.tsx +2 -1
- package/corpus/templates/macros/app/routes/analytics.tsx +2 -1
- package/corpus/templates/macros/app/routes/settings.tsx +4 -5
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/mail/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/mail/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/mail/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/mail/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +3 -3
- package/corpus/templates/mail/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/mail/app/components/agent-engine-picker.tsx +2 -1
- package/corpus/templates/mail/app/components/email/AttachmentStrip.tsx +1 -1
- package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +1 -1
- package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +1 -1
- package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +1 -1
- package/corpus/templates/mail/app/components/email/ComposeModal.tsx +2 -1
- package/corpus/templates/mail/app/components/email/ComposeSlashMenu.tsx +1 -1
- package/corpus/templates/mail/app/components/email/EmailList.tsx +1 -1
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +1 -1
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +2 -1
- package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +2 -1
- package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +2 -1
- package/corpus/templates/mail/app/components/email/MobileActionBar.tsx +1 -1
- package/corpus/templates/mail/app/components/email/RecipientInput.tsx +1 -1
- package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +1 -1
- package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +1 -1
- package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +1 -1
- package/corpus/templates/mail/app/components/email/extensions/ComposeImageBlock.tsx +1 -1
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +6 -6
- package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +2 -1
- package/corpus/templates/mail/app/components/layout/SearchBar.tsx +1 -1
- package/corpus/templates/mail/app/components/settings/GmailFiltersSection.tsx +1 -1
- package/corpus/templates/mail/app/components/settings/SnippetsSection.tsx +1 -1
- package/corpus/templates/mail/app/entry.client.tsx +1 -6
- package/corpus/templates/mail/app/hooks/use-aliases.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-apollo.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-automations.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-compose-state.ts +2 -2
- package/corpus/templates/mail/app/hooks/use-draft-queue.ts +4 -1
- package/corpus/templates/mail/app/hooks/use-emails.ts +3 -1
- package/corpus/templates/mail/app/hooks/use-gmail-filters.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-google-auth.ts +2 -1
- package/corpus/templates/mail/app/hooks/use-integrations.ts +2 -2
- package/corpus/templates/mail/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-scheduled-jobs.ts +2 -2
- package/corpus/templates/mail/app/hooks/use-snippets.ts +1 -1
- package/corpus/templates/mail/app/i18n/index.ts +1 -1
- package/corpus/templates/mail/app/lib/agent-generate.ts +1 -1
- package/corpus/templates/mail/app/lib/gmail-mutation-queue.ts +1 -10
- package/corpus/templates/mail/app/lib/mcp-chat-bridge.ts +1 -1
- package/corpus/templates/mail/app/lib/thread-cache.ts +1 -1
- package/corpus/templates/mail/app/lib/upload.ts +1 -1
- package/corpus/templates/mail/app/lib/utils.ts +1 -1
- package/corpus/templates/mail/app/pages/DraftQueuePage.tsx +1 -1
- package/corpus/templates/mail/app/pages/InboxPage.tsx +1 -1
- package/corpus/templates/mail/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/mail/app/pages/SettingsPage.tsx +9 -8
- package/corpus/templates/mail/app/root.tsx +11 -8
- package/corpus/templates/mail/app/routes/agent.tsx +2 -1
- package/corpus/templates/mail/app/routes/email.tsx +5 -1
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/plan/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/plan/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/plan/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/plan/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/plan/app/components/editor/PlanBlockNode.tsx +2 -2
- package/corpus/templates/plan/app/components/editor/PlanDocumentEditor.tsx +3 -3
- package/corpus/templates/plan/app/components/editor/planSlashCommands.ts +1 -1
- package/corpus/templates/plan/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/plan/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +8 -9
- package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +3 -5
- package/corpus/templates/plan/app/components/plan/GuestModeBanner.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/LocalCodebasePicker.tsx +2 -1
- package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +7 -5
- package/corpus/templates/plan/app/components/plan/PlanImageNode.tsx +2 -1
- package/corpus/templates/plan/app/components/plan/PlanImageViewer.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PlanMarkdownEditor.tsx +3 -3
- package/corpus/templates/plan/app/components/plan/PlanMarkdownReader.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PlanTableOfContents.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PrototypeViewer.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/VisualAnswerInline.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/planBlocks.tsx +3 -5
- package/corpus/templates/plan/app/components/plan/wireframe/LegacyRegionWireframe.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +1 -1
- package/corpus/templates/plan/app/hooks/use-navigation-state.ts +5 -3
- package/corpus/templates/plan/app/hooks/use-plan-presence.ts +2 -2
- package/corpus/templates/plan/app/hooks/use-plans.ts +4 -1
- package/corpus/templates/plan/app/i18n/ar-SA.ts +4 -0
- package/corpus/templates/plan/app/i18n/de-DE.ts +4 -0
- package/corpus/templates/plan/app/i18n/en-US.ts +4 -0
- package/corpus/templates/plan/app/i18n/es-ES.ts +4 -0
- package/corpus/templates/plan/app/i18n/fr-FR.ts +4 -0
- package/corpus/templates/plan/app/i18n/hi-IN.ts +4 -0
- package/corpus/templates/plan/app/i18n/index.ts +1 -1
- package/corpus/templates/plan/app/i18n/ja-JP.ts +4 -0
- package/corpus/templates/plan/app/i18n/ko-KR.ts +4 -0
- package/corpus/templates/plan/app/i18n/pt-BR.ts +4 -0
- package/corpus/templates/plan/app/i18n/zh-CN.ts +4 -0
- package/corpus/templates/plan/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/plan/app/lib/local-codebase-context.ts +1 -1
- package/corpus/templates/plan/app/lib/local-control-resources.ts +1 -1
- package/corpus/templates/plan/app/lib/plan-comment-editor-helpers.ts +1 -1
- package/corpus/templates/plan/app/lib/plan-local-bridge.ts +1 -1
- package/corpus/templates/plan/app/lib/register-chat-renderers.tsx +1 -1
- package/corpus/templates/plan/app/lib/utils.ts +1 -1
- package/corpus/templates/plan/app/pages/PlanChatPage.tsx +2 -2
- package/corpus/templates/plan/app/pages/PlansPage.tsx +13 -14
- package/corpus/templates/plan/app/root.tsx +11 -10
- package/corpus/templates/plan/app/routes/agent.tsx +2 -1
- package/corpus/templates/plan/app/routes/settings.tsx +4 -5
- package/corpus/templates/plan/shared/plan-doc.ts +2 -47
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/slides/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/slides/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/slides/app/components/CloudUpgrade.tsx +1 -1
- package/corpus/templates/slides/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +2 -1
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +1 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemPreview.tsx +1 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +5 -5
- package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/AssetLibraryPanel.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/BlockBubbleMenu.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +6 -6
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +6 -8
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/GeneratingOverlay.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/GoogleDocImportHint.tsx +3 -5
- package/corpus/templates/slides/app/components/editor/HistoryPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +3 -1
- package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ImageOverlay.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ImageSearchPanel.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/ImportButton.tsx +5 -1
- package/corpus/templates/slides/app/components/editor/LogoSearchPanel.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/MermaidToExcalidrawPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +3 -1
- package/corpus/templates/slides/app/components/editor/QuestionFlow.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ShareDialog.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/SlideBubbleMenu.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +12 -8
- package/corpus/templates/slides/app/components/editor/SlideInlineEditor.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/SlideSlashMenu.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/TweaksPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +2 -1
- package/corpus/templates/slides/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/slides/app/components/layout/Layout.tsx +2 -1
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +4 -6
- package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +1 -1
- package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +2 -1
- package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +1 -1
- package/corpus/templates/slides/app/components/visual-editor/MultiSelectChip.tsx +1 -1
- package/corpus/templates/slides/app/components/visual-editor/SaveStatusIndicator.tsx +1 -1
- package/corpus/templates/slides/app/context/DeckContext.tsx +5 -3
- package/corpus/templates/slides/app/entry.client.tsx +2 -4
- package/corpus/templates/slides/app/hooks/use-agent-generating.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-db-status.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-design-system.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-presence.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-role.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-versions.ts +4 -1
- package/corpus/templates/slides/app/hooks/use-design-systems.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-slide-comments.ts +2 -2
- package/corpus/templates/slides/app/i18n/index.ts +1 -1
- package/corpus/templates/slides/app/lib/utils.ts +1 -1
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +5 -6
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -1
- package/corpus/templates/slides/app/pages/Index.tsx +4 -7
- package/corpus/templates/slides/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/slides/app/pages/Presentation.tsx +1 -1
- package/corpus/templates/slides/app/pages/SharedPresentation.tsx +2 -1
- package/corpus/templates/slides/app/root.tsx +13 -11
- package/corpus/templates/slides/app/routes/agent.tsx +2 -1
- package/corpus/templates/slides/app/routes/settings.tsx +4 -5
- package/corpus/templates/slides/app/routes/slide.tsx +3 -3
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/tasks/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/tasks/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/tasks/app/components/custom-fields/FieldsList.tsx +1 -1
- package/corpus/templates/tasks/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/tasks/app/components/layout/Layout.tsx +4 -1
- package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +2 -1
- package/corpus/templates/tasks/app/components/shared/ListViewHeader.tsx +1 -1
- package/corpus/templates/tasks/app/components/tasks/TaskList.tsx +1 -1
- package/corpus/templates/tasks/app/hooks/use-custom-fields.ts +4 -1
- package/corpus/templates/tasks/app/hooks/use-inbox-items.ts +4 -1
- package/corpus/templates/tasks/app/hooks/use-navigation-state.ts +2 -1
- package/corpus/templates/tasks/app/hooks/use-tasks.ts +4 -1
- package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +4 -1
- package/corpus/templates/tasks/app/lib/utils.ts +1 -1
- package/corpus/templates/tasks/app/root.tsx +9 -7
- package/dist/cli/doctor.d.ts +4 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +57 -5
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/migration-codemod.d.ts +21 -0
- package/dist/cli/migration-codemod.d.ts.map +1 -0
- package/dist/cli/migration-codemod.js +363 -0
- package/dist/cli/migration-codemod.js.map +1 -0
- package/dist/cli/upgrade.d.ts +7 -0
- package/dist/cli/upgrade.d.ts.map +1 -1
- package/dist/cli/upgrade.js +52 -7
- package/dist/cli/upgrade.js.map +1 -1
- package/dist/client/agent-chat/index.d.ts +40 -0
- package/dist/client/agent-chat/index.d.ts.map +1 -0
- package/dist/client/agent-chat/index.js +39 -0
- package/dist/client/agent-chat/index.js.map +1 -0
- package/dist/client/agent-page/AgentContextTab.d.ts.map +1 -1
- package/dist/client/agent-page/AgentContextTab.js +3 -1
- package/dist/client/agent-page/AgentContextTab.js.map +1 -1
- package/dist/client/analytics/index.d.ts +3 -0
- package/dist/client/analytics/index.d.ts.map +1 -0
- package/dist/client/analytics/index.js +3 -0
- package/dist/client/analytics/index.js.map +1 -0
- package/dist/client/api-path.js +2 -2
- package/dist/client/api-path.js.map +1 -1
- package/dist/client/automation/index.d.ts +2 -0
- package/dist/client/automation/index.d.ts.map +1 -0
- package/dist/client/automation/index.js +2 -0
- package/dist/client/automation/index.js.map +1 -0
- package/dist/client/changelog/index.d.ts +2 -0
- package/dist/client/changelog/index.d.ts.map +1 -0
- package/dist/client/changelog/index.js +2 -0
- package/dist/client/changelog/index.js.map +1 -0
- package/dist/client/chat/widgets/InlineExtensionWidget.d.ts +1 -12
- package/dist/client/chat/widgets/InlineExtensionWidget.d.ts.map +1 -1
- package/dist/client/chat/widgets/InlineExtensionWidget.js +2 -66
- package/dist/client/chat/widgets/InlineExtensionWidget.js.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.js +21 -8
- package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
- package/dist/client/chat/widgets/inline-extension-result.d.ts +14 -0
- package/dist/client/chat/widgets/inline-extension-result.d.ts.map +1 -0
- package/dist/client/chat/widgets/inline-extension-result.js +67 -0
- package/dist/client/chat/widgets/inline-extension-result.js.map +1 -0
- package/dist/client/client-bootstrap.d.ts +2 -0
- package/dist/client/client-bootstrap.d.ts.map +1 -0
- package/dist/client/client-bootstrap.js +7 -0
- package/dist/client/client-bootstrap.js.map +1 -0
- package/dist/client/context-xray/ContextXRayPanel.js +1 -1
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/hooks/index.d.ts +13 -0
- package/dist/client/hooks/index.d.ts.map +1 -0
- package/dist/client/hooks/index.js +13 -0
- package/dist/client/hooks/index.js.map +1 -0
- package/dist/client/host/index.d.ts +20 -0
- package/dist/client/host/index.d.ts.map +1 -0
- package/dist/client/host/index.js +18 -0
- package/dist/client/host/index.js.map +1 -0
- package/dist/client/index.d.ts +19 -100
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +19 -106
- package/dist/client/index.js.map +1 -1
- package/dist/client/navigation/index.d.ts +6 -0
- package/dist/client/navigation/index.d.ts.map +1 -0
- package/dist/client/navigation/index.js +6 -0
- package/dist/client/navigation/index.js.map +1 -0
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +2 -1
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/resources/index.d.ts +2 -1
- package/dist/client/resources/index.d.ts.map +1 -1
- package/dist/client/resources/index.js +1 -0
- package/dist/client/resources/index.js.map +1 -1
- package/dist/client/resources/use-resources.d.ts +0 -1
- package/dist/client/resources/use-resources.d.ts.map +1 -1
- package/dist/client/resources/use-resources.js +0 -17
- package/dist/client/resources/use-resources.js.map +1 -1
- package/dist/client/route-chunk-recovery/index.d.ts +2 -0
- package/dist/client/route-chunk-recovery/index.d.ts.map +1 -0
- package/dist/client/route-chunk-recovery/index.js +2 -0
- package/dist/client/route-chunk-recovery/index.js.map +1 -0
- package/dist/client/ui/index.d.ts +18 -0
- package/dist/client/ui/index.d.ts.map +1 -0
- package/dist/client/ui/index.js +18 -0
- package/dist/client/ui/index.js.map +1 -0
- package/dist/client/uploads/index.d.ts +2 -0
- package/dist/client/uploads/index.d.ts.map +1 -0
- package/dist/client/uploads/index.js +2 -0
- package/dist/client/uploads/index.js.map +1 -0
- package/dist/client/uploads/use-upload-resource.d.ts +3 -0
- package/dist/client/uploads/use-upload-resource.d.ts.map +1 -0
- package/dist/client/uploads/use-upload-resource.js +20 -0
- package/dist/client/uploads/use-upload-resource.js.map +1 -0
- package/dist/client/widgets/index.d.ts +3 -0
- package/dist/client/widgets/index.d.ts.map +1 -0
- package/dist/client/widgets/index.js +3 -0
- package/dist/client/widgets/index.js.map +1 -0
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/localization/default-messages.d.ts +2 -1
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +2 -1
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +1 -1
- package/dist/package-lifecycle/deprecated-imports.d.ts +15 -0
- package/dist/package-lifecycle/deprecated-imports.d.ts.map +1 -0
- package/dist/package-lifecycle/deprecated-imports.js +141 -0
- package/dist/package-lifecycle/deprecated-imports.js.map +1 -0
- package/dist/package-lifecycle/index.d.ts +5 -0
- package/dist/package-lifecycle/index.d.ts.map +1 -1
- package/dist/package-lifecycle/index.js +5 -0
- package/dist/package-lifecycle/index.js.map +1 -1
- package/dist/package-lifecycle/migration-manifest.d.ts +28 -0
- package/dist/package-lifecycle/migration-manifest.d.ts.map +1 -0
- package/dist/package-lifecycle/migration-manifest.js +102 -0
- package/dist/package-lifecycle/migration-manifest.js.map +1 -0
- package/dist/package-lifecycle/migration-message.d.ts +3 -0
- package/dist/package-lifecycle/migration-message.d.ts.map +1 -0
- package/dist/package-lifecycle/migration-message.js +5 -0
- package/dist/package-lifecycle/migration-message.js.map +1 -0
- package/dist/package-lifecycle/tombstone.d.ts +10 -0
- package/dist/package-lifecycle/tombstone.d.ts.map +1 -0
- package/dist/package-lifecycle/tombstone.js +23 -0
- package/dist/package-lifecycle/tombstone.js.map +1 -0
- package/dist/package-lifecycle/upgrade-error.d.ts +11 -0
- package/dist/package-lifecycle/upgrade-error.d.ts.map +1 -0
- package/dist/package-lifecycle/upgrade-error.js +11 -0
- package/dist/package-lifecycle/upgrade-error.js.map +1 -0
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +3 -3
- package/dist/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/dist/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/dist/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/templates/chat/app/components/layout/Header.tsx +2 -1
- package/dist/templates/chat/app/components/layout/Layout.tsx +2 -2
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +4 -4
- package/dist/templates/chat/app/hooks/use-navigation-state.ts +3 -4
- package/dist/templates/chat/app/i18n/index.ts +1 -1
- package/dist/templates/chat/app/i18n-data.ts +1 -1
- package/dist/templates/chat/app/lib/utils.ts +1 -1
- package/dist/templates/chat/app/root.tsx +10 -9
- package/dist/templates/chat/app/routes/_index.tsx +2 -2
- package/dist/templates/chat/app/routes/agent.tsx +10 -3
- package/dist/templates/chat/app/routes/database.tsx +1 -1
- package/dist/templates/chat/app/routes/observability.tsx +2 -1
- package/dist/templates/chat/app/routes/settings.tsx +4 -5
- package/dist/templates/default/.agents/skills/actions/SKILL.md +3 -3
- package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/dist/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/dist/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/dist/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
- package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/templates/default/app/hooks/use-navigation-state.ts +2 -5
- package/dist/templates/default/app/i18n/index.ts +1 -1
- package/dist/templates/default/app/lib/utils.ts +1 -1
- package/dist/templates/default/app/root.tsx +8 -6
- package/dist/templates/default/app/routes/_index.tsx +2 -1
- package/dist/templates/default/app/routes/agent.tsx +2 -1
- package/dist/templates/default/app/routes/settings.tsx +2 -3
- package/dist/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
- package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
- package/dist/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/dist/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +4 -0
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +35 -64
- package/dist/vite/client.js.map +1 -1
- package/docs/content/actions.mdx +2 -4
- package/docs/content/agent-surfaces.mdx +2 -4
- package/docs/content/audit-log.mdx +1 -2
- package/docs/content/authentication.mdx +3 -2
- package/docs/content/client.mdx +19 -18
- package/docs/content/components.mdx +1 -1
- package/docs/content/context-awareness.mdx +4 -7
- package/docs/content/creating-templates.mdx +7 -5
- package/docs/content/doctor.mdx +27 -6
- package/docs/content/drop-in-agent.mdx +6 -11
- package/docs/content/embedding-sdk.mdx +8 -10
- package/docs/content/getting-started.mdx +4 -2
- package/docs/content/internationalization.mdx +9 -6
- package/docs/content/key-concepts.mdx +2 -4
- package/docs/content/locales/ar-SA/actions.mdx +2 -4
- package/docs/content/locales/ar-SA/agent-surfaces.mdx +2 -4
- package/docs/content/locales/ar-SA/audit-log.mdx +1 -2
- package/docs/content/locales/ar-SA/authentication.mdx +3 -2
- package/docs/content/locales/ar-SA/client.mdx +19 -18
- package/docs/content/locales/ar-SA/components.mdx +1 -1
- package/docs/content/locales/ar-SA/context-awareness.mdx +4 -7
- package/docs/content/locales/ar-SA/creating-templates.mdx +7 -5
- package/docs/content/locales/ar-SA/doctor.mdx +10 -0
- package/docs/content/locales/ar-SA/drop-in-agent.mdx +6 -11
- package/docs/content/locales/ar-SA/embedding-sdk.mdx +8 -10
- package/docs/content/locales/ar-SA/internationalization.mdx +9 -6
- package/docs/content/locales/ar-SA/key-concepts.mdx +2 -4
- package/docs/content/locales/ar-SA/observability.mdx +1 -2
- package/docs/content/locales/ar-SA/package-lifecycle.mdx +6 -0
- package/docs/content/locales/ar-SA/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/ar-SA/sharing.mdx +1 -2
- package/docs/content/locales/ar-SA/template-chat.mdx +1 -2
- package/docs/content/locales/ar-SA/tracking.mdx +2 -4
- package/docs/content/locales/ar-SA/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/de-DE/actions.mdx +2 -4
- package/docs/content/locales/de-DE/agent-surfaces.mdx +2 -4
- package/docs/content/locales/de-DE/audit-log.mdx +1 -2
- package/docs/content/locales/de-DE/authentication.mdx +3 -2
- package/docs/content/locales/de-DE/client.mdx +19 -18
- package/docs/content/locales/de-DE/components.mdx +1 -1
- package/docs/content/locales/de-DE/context-awareness.mdx +4 -7
- package/docs/content/locales/de-DE/creating-templates.mdx +7 -5
- package/docs/content/locales/de-DE/doctor.mdx +10 -0
- package/docs/content/locales/de-DE/drop-in-agent.mdx +6 -11
- package/docs/content/locales/de-DE/embedding-sdk.mdx +8 -10
- package/docs/content/locales/de-DE/internationalization.mdx +9 -6
- package/docs/content/locales/de-DE/key-concepts.mdx +2 -4
- package/docs/content/locales/de-DE/observability.mdx +1 -2
- package/docs/content/locales/de-DE/package-lifecycle.mdx +6 -0
- package/docs/content/locales/de-DE/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/de-DE/sharing.mdx +1 -2
- package/docs/content/locales/de-DE/template-chat.mdx +1 -2
- package/docs/content/locales/de-DE/tracking.mdx +2 -4
- package/docs/content/locales/de-DE/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/es-ES/actions.mdx +2 -4
- package/docs/content/locales/es-ES/agent-surfaces.mdx +2 -4
- package/docs/content/locales/es-ES/audit-log.mdx +1 -2
- package/docs/content/locales/es-ES/authentication.mdx +3 -2
- package/docs/content/locales/es-ES/client.mdx +19 -18
- package/docs/content/locales/es-ES/components.mdx +1 -1
- package/docs/content/locales/es-ES/context-awareness.mdx +4 -7
- package/docs/content/locales/es-ES/creating-templates.mdx +7 -5
- package/docs/content/locales/es-ES/doctor.mdx +10 -0
- package/docs/content/locales/es-ES/drop-in-agent.mdx +6 -11
- package/docs/content/locales/es-ES/embedding-sdk.mdx +8 -10
- package/docs/content/locales/es-ES/internationalization.mdx +9 -6
- package/docs/content/locales/es-ES/key-concepts.mdx +2 -4
- package/docs/content/locales/es-ES/observability.mdx +1 -2
- package/docs/content/locales/es-ES/package-lifecycle.mdx +6 -0
- package/docs/content/locales/es-ES/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/es-ES/sharing.mdx +1 -2
- package/docs/content/locales/es-ES/template-chat.mdx +1 -2
- package/docs/content/locales/es-ES/tracking.mdx +2 -4
- package/docs/content/locales/es-ES/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/fr-FR/actions.mdx +2 -4
- package/docs/content/locales/fr-FR/agent-surfaces.mdx +2 -4
- package/docs/content/locales/fr-FR/audit-log.mdx +1 -2
- package/docs/content/locales/fr-FR/authentication.mdx +3 -2
- package/docs/content/locales/fr-FR/client.mdx +19 -18
- package/docs/content/locales/fr-FR/components.mdx +1 -1
- package/docs/content/locales/fr-FR/context-awareness.mdx +4 -7
- package/docs/content/locales/fr-FR/creating-templates.mdx +7 -5
- package/docs/content/locales/fr-FR/doctor.mdx +10 -0
- package/docs/content/locales/fr-FR/drop-in-agent.mdx +6 -11
- package/docs/content/locales/fr-FR/embedding-sdk.mdx +8 -10
- package/docs/content/locales/fr-FR/internationalization.mdx +9 -6
- package/docs/content/locales/fr-FR/key-concepts.mdx +2 -4
- package/docs/content/locales/fr-FR/observability.mdx +1 -2
- package/docs/content/locales/fr-FR/package-lifecycle.mdx +6 -0
- package/docs/content/locales/fr-FR/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/fr-FR/sharing.mdx +1 -2
- package/docs/content/locales/fr-FR/template-chat.mdx +1 -2
- package/docs/content/locales/fr-FR/tracking.mdx +2 -4
- package/docs/content/locales/fr-FR/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/hi-IN/actions.mdx +2 -4
- package/docs/content/locales/hi-IN/agent-surfaces.mdx +2 -4
- package/docs/content/locales/hi-IN/audit-log.mdx +1 -2
- package/docs/content/locales/hi-IN/authentication.mdx +3 -2
- package/docs/content/locales/hi-IN/client.mdx +19 -18
- package/docs/content/locales/hi-IN/components.mdx +1 -1
- package/docs/content/locales/hi-IN/context-awareness.mdx +4 -7
- package/docs/content/locales/hi-IN/creating-templates.mdx +7 -5
- package/docs/content/locales/hi-IN/doctor.mdx +10 -0
- package/docs/content/locales/hi-IN/drop-in-agent.mdx +6 -11
- package/docs/content/locales/hi-IN/embedding-sdk.mdx +8 -10
- package/docs/content/locales/hi-IN/internationalization.mdx +9 -6
- package/docs/content/locales/hi-IN/key-concepts.mdx +2 -4
- package/docs/content/locales/hi-IN/observability.mdx +1 -2
- package/docs/content/locales/hi-IN/package-lifecycle.mdx +6 -0
- package/docs/content/locales/hi-IN/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/hi-IN/sharing.mdx +1 -2
- package/docs/content/locales/hi-IN/template-chat.mdx +1 -2
- package/docs/content/locales/hi-IN/tracking.mdx +2 -4
- package/docs/content/locales/hi-IN/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/ja-JP/actions.mdx +2 -4
- package/docs/content/locales/ja-JP/agent-surfaces.mdx +2 -4
- package/docs/content/locales/ja-JP/audit-log.mdx +1 -2
- package/docs/content/locales/ja-JP/authentication.mdx +3 -2
- package/docs/content/locales/ja-JP/client.mdx +19 -18
- package/docs/content/locales/ja-JP/components.mdx +1 -1
- package/docs/content/locales/ja-JP/context-awareness.mdx +4 -7
- package/docs/content/locales/ja-JP/creating-templates.mdx +7 -5
- package/docs/content/locales/ja-JP/doctor.mdx +10 -0
- package/docs/content/locales/ja-JP/drop-in-agent.mdx +6 -11
- package/docs/content/locales/ja-JP/embedding-sdk.mdx +8 -10
- package/docs/content/locales/ja-JP/internationalization.mdx +9 -6
- package/docs/content/locales/ja-JP/key-concepts.mdx +2 -4
- package/docs/content/locales/ja-JP/observability.mdx +1 -2
- package/docs/content/locales/ja-JP/package-lifecycle.mdx +6 -0
- package/docs/content/locales/ja-JP/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/ja-JP/sharing.mdx +1 -2
- package/docs/content/locales/ja-JP/template-chat.mdx +1 -2
- package/docs/content/locales/ja-JP/tracking.mdx +2 -4
- package/docs/content/locales/ja-JP/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/ko-KR/actions.mdx +2 -4
- package/docs/content/locales/ko-KR/agent-surfaces.mdx +2 -4
- package/docs/content/locales/ko-KR/audit-log.mdx +1 -2
- package/docs/content/locales/ko-KR/authentication.mdx +3 -2
- package/docs/content/locales/ko-KR/client.mdx +19 -18
- package/docs/content/locales/ko-KR/components.mdx +1 -1
- package/docs/content/locales/ko-KR/context-awareness.mdx +4 -7
- package/docs/content/locales/ko-KR/creating-templates.mdx +7 -5
- package/docs/content/locales/ko-KR/doctor.mdx +10 -0
- package/docs/content/locales/ko-KR/drop-in-agent.mdx +6 -11
- package/docs/content/locales/ko-KR/embedding-sdk.mdx +8 -10
- package/docs/content/locales/ko-KR/internationalization.mdx +9 -6
- package/docs/content/locales/ko-KR/key-concepts.mdx +2 -4
- package/docs/content/locales/ko-KR/observability.mdx +1 -2
- package/docs/content/locales/ko-KR/package-lifecycle.mdx +6 -0
- package/docs/content/locales/ko-KR/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/ko-KR/sharing.mdx +1 -2
- package/docs/content/locales/ko-KR/template-chat.mdx +1 -2
- package/docs/content/locales/ko-KR/tracking.mdx +2 -4
- package/docs/content/locales/ko-KR/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/pt-BR/actions.mdx +2 -4
- package/docs/content/locales/pt-BR/agent-surfaces.mdx +2 -4
- package/docs/content/locales/pt-BR/audit-log.mdx +1 -2
- package/docs/content/locales/pt-BR/authentication.mdx +3 -2
- package/docs/content/locales/pt-BR/client.mdx +19 -18
- package/docs/content/locales/pt-BR/components.mdx +1 -1
- package/docs/content/locales/pt-BR/context-awareness.mdx +4 -7
- package/docs/content/locales/pt-BR/creating-templates.mdx +7 -5
- package/docs/content/locales/pt-BR/doctor.mdx +10 -0
- package/docs/content/locales/pt-BR/drop-in-agent.mdx +6 -11
- package/docs/content/locales/pt-BR/embedding-sdk.mdx +8 -10
- package/docs/content/locales/pt-BR/internationalization.mdx +9 -6
- package/docs/content/locales/pt-BR/key-concepts.mdx +2 -4
- package/docs/content/locales/pt-BR/observability.mdx +1 -2
- package/docs/content/locales/pt-BR/package-lifecycle.mdx +6 -0
- package/docs/content/locales/pt-BR/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/pt-BR/sharing.mdx +1 -2
- package/docs/content/locales/pt-BR/template-chat.mdx +1 -2
- package/docs/content/locales/pt-BR/tracking.mdx +2 -4
- package/docs/content/locales/pt-BR/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/zh-CN/actions.mdx +2 -4
- package/docs/content/locales/zh-CN/agent-surfaces.mdx +2 -4
- package/docs/content/locales/zh-CN/audit-log.mdx +1 -2
- package/docs/content/locales/zh-CN/authentication.mdx +3 -2
- package/docs/content/locales/zh-CN/client.mdx +19 -18
- package/docs/content/locales/zh-CN/components.mdx +1 -1
- package/docs/content/locales/zh-CN/context-awareness.mdx +4 -7
- package/docs/content/locales/zh-CN/creating-templates.mdx +7 -5
- package/docs/content/locales/zh-CN/doctor.mdx +10 -0
- package/docs/content/locales/zh-CN/drop-in-agent.mdx +6 -11
- package/docs/content/locales/zh-CN/embedding-sdk.mdx +8 -10
- package/docs/content/locales/zh-CN/internationalization.mdx +9 -6
- package/docs/content/locales/zh-CN/key-concepts.mdx +2 -4
- package/docs/content/locales/zh-CN/observability.mdx +1 -2
- package/docs/content/locales/zh-CN/package-lifecycle.mdx +6 -0
- package/docs/content/locales/zh-CN/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/zh-CN/sharing.mdx +1 -2
- package/docs/content/locales/zh-CN/template-chat.mdx +1 -2
- package/docs/content/locales/zh-CN/tracking.mdx +2 -4
- package/docs/content/locales/zh-CN/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/zh-TW/actions.mdx +2 -4
- package/docs/content/locales/zh-TW/agent-surfaces.mdx +2 -4
- package/docs/content/locales/zh-TW/audit-log.mdx +1 -2
- package/docs/content/locales/zh-TW/authentication.mdx +3 -2
- package/docs/content/locales/zh-TW/client.mdx +19 -18
- package/docs/content/locales/zh-TW/components.mdx +1 -1
- package/docs/content/locales/zh-TW/context-awareness.mdx +4 -7
- package/docs/content/locales/zh-TW/creating-templates.mdx +7 -5
- package/docs/content/locales/zh-TW/doctor.mdx +10 -0
- package/docs/content/locales/zh-TW/drop-in-agent.mdx +6 -11
- package/docs/content/locales/zh-TW/embedding-sdk.mdx +8 -10
- package/docs/content/locales/zh-TW/internationalization.mdx +9 -6
- package/docs/content/locales/zh-TW/key-concepts.mdx +2 -4
- package/docs/content/locales/zh-TW/observability.mdx +1 -2
- package/docs/content/locales/zh-TW/package-lifecycle.mdx +6 -0
- package/docs/content/locales/zh-TW/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/zh-TW/sharing.mdx +1 -2
- package/docs/content/locales/zh-TW/template-chat.mdx +1 -2
- package/docs/content/locales/zh-TW/tracking.mdx +2 -4
- package/docs/content/locales/zh-TW/what-is-agent-native.mdx +1 -2
- package/docs/content/observability.mdx +1 -2
- package/docs/content/package-lifecycle.mdx +29 -0
- package/docs/content/real-time-collaboration.mdx +8 -7
- package/docs/content/sharing.mdx +1 -2
- package/docs/content/template-chat.mdx +1 -2
- package/docs/content/toolkit-agent-ux.mdx +3 -2
- package/docs/content/toolkit-observability.mdx +1 -2
- package/docs/content/toolkit-settings.mdx +2 -2
- package/docs/content/toolkit-sharing.mdx +5 -2
- package/docs/content/tracking.mdx +2 -4
- package/docs/content/what-is-agent-native.mdx +1 -2
- package/migration-manifest.json +1492 -0
- package/package.json +23 -5
- package/src/templates/chat/.agents/skills/actions/SKILL.md +3 -3
- package/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/src/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/src/templates/chat/app/components/layout/Header.tsx +2 -1
- package/src/templates/chat/app/components/layout/Layout.tsx +2 -2
- package/src/templates/chat/app/components/layout/Sidebar.tsx +4 -4
- package/src/templates/chat/app/hooks/use-navigation-state.ts +3 -4
- package/src/templates/chat/app/i18n/index.ts +1 -1
- package/src/templates/chat/app/i18n-data.ts +1 -1
- package/src/templates/chat/app/lib/utils.ts +1 -1
- package/src/templates/chat/app/root.tsx +10 -9
- package/src/templates/chat/app/routes/_index.tsx +2 -2
- package/src/templates/chat/app/routes/agent.tsx +10 -3
- package/src/templates/chat/app/routes/database.tsx +1 -1
- package/src/templates/chat/app/routes/observability.tsx +2 -1
- package/src/templates/chat/app/routes/settings.tsx +4 -5
- package/src/templates/default/.agents/skills/actions/SKILL.md +3 -3
- package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/src/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/src/templates/default/app/hooks/use-navigation-state.ts +2 -5
- package/src/templates/default/app/i18n/index.ts +1 -1
- package/src/templates/default/app/lib/utils.ts +1 -1
- package/src/templates/default/app/root.tsx +8 -6
- package/src/templates/default/app/routes/_index.tsx +2 -1
- package/src/templates/default/app/routes/agent.tsx +2 -1
- package/src/templates/default/app/routes/settings.tsx +2 -3
- package/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
- package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
- package/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
package/dist/cli/doctor.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* itself via `scripts/guard-*.mjs` (see
|
|
5
5
|
* `advisor-plans/reports/005-doctor-design.md` for the full design and
|
|
6
6
|
* `advisor-plans/015-doctor-v1-implementation.md` for the implementation
|
|
7
|
-
* plan). v1 ships
|
|
7
|
+
* plan). v1 ships 8 of those guards, ported to work against a single
|
|
8
8
|
* generated app root instead of this monorepo's multi-template layout —
|
|
9
9
|
* see `../guards/index.ts`.
|
|
10
10
|
*
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
import fs from "node:fs";
|
|
24
24
|
import path from "node:path";
|
|
25
25
|
import { scanDbToolScoping, scanDrizzlePush, scanEnvCredentials, scanEnvMutation, scanLocalhostFallback, scanUnscopedCredentials, scanUnscopedQueries, } from "../guards/index.js";
|
|
26
|
+
import { AGENT_NATIVE_UPGRADE_CODEMOD_COMMAND, scanDeprecatedImports, } from "../package-lifecycle/index.js";
|
|
26
27
|
export const ALL_GUARD_NAMES = [
|
|
27
28
|
"no-drizzle-push",
|
|
28
29
|
"no-unscoped-credentials",
|
|
@@ -31,6 +32,7 @@ export const ALL_GUARD_NAMES = [
|
|
|
31
32
|
"db-tool-scoping",
|
|
32
33
|
"no-env-mutation",
|
|
33
34
|
"no-localhost-fallback",
|
|
35
|
+
"migration-manifest",
|
|
34
36
|
];
|
|
35
37
|
const DEFAULT_DOCTOR_CONFIG = {
|
|
36
38
|
disabledGuards: [],
|
|
@@ -65,7 +67,7 @@ export function readDoctorConfig(root) {
|
|
|
65
67
|
return { ...DEFAULT_DOCTOR_CONFIG, dbToolScopingDenylist: {} };
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
|
-
function runGuard(name, root, config) {
|
|
70
|
+
function runGuard(name, root, config, migrationManifests) {
|
|
69
71
|
switch (name) {
|
|
70
72
|
case "no-drizzle-push":
|
|
71
73
|
return scanDrizzlePush({ root });
|
|
@@ -84,6 +86,29 @@ function runGuard(name, root, config) {
|
|
|
84
86
|
return scanEnvMutation({ root });
|
|
85
87
|
case "no-localhost-fallback":
|
|
86
88
|
return scanLocalhostFallback({ root, extraExemptPaths: [] });
|
|
89
|
+
case "migration-manifest": {
|
|
90
|
+
const imports = scanDeprecatedImports({
|
|
91
|
+
root,
|
|
92
|
+
manifests: migrationManifests,
|
|
93
|
+
});
|
|
94
|
+
return {
|
|
95
|
+
name,
|
|
96
|
+
findings: imports
|
|
97
|
+
.filter((finding) => finding.status === "active")
|
|
98
|
+
.map((finding) => ({
|
|
99
|
+
file: path.relative(root, finding.file),
|
|
100
|
+
line: finding.line,
|
|
101
|
+
message: `${finding.from} moves to ${finding.to.join(", ")}. Run: ${AGENT_NATIVE_UPGRADE_CODEMOD_COMMAND}`,
|
|
102
|
+
})),
|
|
103
|
+
warnings: imports
|
|
104
|
+
.filter((finding) => finding.status === "planned")
|
|
105
|
+
.map((finding) => ({
|
|
106
|
+
file: path.relative(root, finding.file),
|
|
107
|
+
line: finding.line,
|
|
108
|
+
message: `${finding.from} is planned to move to ${finding.to.join(", ")} in a future release. No rewrite is available yet.`,
|
|
109
|
+
})),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
87
112
|
}
|
|
88
113
|
}
|
|
89
114
|
/** Pure scan orchestrator: runs the selected guards against `root` and
|
|
@@ -101,8 +126,9 @@ export function runDoctorScan(options) {
|
|
|
101
126
|
names = ALL_GUARD_NAMES.filter((n) => !config.disabledGuards.includes(n));
|
|
102
127
|
}
|
|
103
128
|
const findings = [];
|
|
129
|
+
const warnings = [];
|
|
104
130
|
for (const name of names) {
|
|
105
|
-
const result = runGuard(name, root, config);
|
|
131
|
+
const result = runGuard(name, root, config, options.migrationManifests);
|
|
106
132
|
for (const f of result.findings) {
|
|
107
133
|
findings.push({
|
|
108
134
|
guard: name,
|
|
@@ -111,8 +137,21 @@ export function runDoctorScan(options) {
|
|
|
111
137
|
message: f.message,
|
|
112
138
|
});
|
|
113
139
|
}
|
|
140
|
+
for (const warning of result.warnings ?? []) {
|
|
141
|
+
warnings.push({
|
|
142
|
+
guard: name,
|
|
143
|
+
file: warning.file,
|
|
144
|
+
line: warning.line,
|
|
145
|
+
message: warning.message,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
114
148
|
}
|
|
115
|
-
return {
|
|
149
|
+
return {
|
|
150
|
+
ok: findings.length === 0,
|
|
151
|
+
findings,
|
|
152
|
+
warnings,
|
|
153
|
+
guardsRun: names,
|
|
154
|
+
};
|
|
116
155
|
}
|
|
117
156
|
/** Pure escalation rule shared by the CLI (`--strict`) and the `build`
|
|
118
157
|
* pre-step (`--strict` / `agent-native.json` `doctor.failOnBuild`). Doctor
|
|
@@ -138,6 +177,12 @@ function formatDoctorHuman(report, root) {
|
|
|
138
177
|
lines.push(` [${f.guard}] ${f.file}:${f.line} — ${f.message}`);
|
|
139
178
|
}
|
|
140
179
|
}
|
|
180
|
+
if (report.warnings.length > 0) {
|
|
181
|
+
lines.push(`${report.warnings.length} warning(s):`);
|
|
182
|
+
for (const warning of report.warnings) {
|
|
183
|
+
lines.push(` [${warning.guard}] ${warning.file}:${warning.line} — ${warning.message}`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
141
186
|
return lines.join("\n");
|
|
142
187
|
}
|
|
143
188
|
export function parseDoctorArgs(argv) {
|
|
@@ -181,7 +226,7 @@ export function printDoctorHelp(io = defaultIo) {
|
|
|
181
226
|
io.log([
|
|
182
227
|
"Usage:",
|
|
183
228
|
" agent-native doctor Scan app source for security-critical guard violations",
|
|
184
|
-
" agent-native doctor --json Machine-readable report: { ok, findings, guardsRun, strict }",
|
|
229
|
+
" agent-native doctor --json Machine-readable report: { ok, findings, warnings, guardsRun, strict }",
|
|
185
230
|
" agent-native doctor --only <guard,guard> Run only the named guard(s)",
|
|
186
231
|
" agent-native doctor --strict Escalate findings to a hard failure when used by `agent-native build --strict`",
|
|
187
232
|
" agent-native doctor --cwd <dir> Run against a project root other than the current directory",
|
|
@@ -198,6 +243,7 @@ export function printDoctorHelp(io = defaultIo) {
|
|
|
198
243
|
"",
|
|
199
244
|
"For dependency-pin health (framework overrides/patches, stale",
|
|
200
245
|
"@agent-native/* pins), run `agent-native upgrade check` instead.",
|
|
246
|
+
`For import migrations, run \`${AGENT_NATIVE_UPGRADE_CODEMOD_COMMAND}\`.`,
|
|
201
247
|
].join("\n"));
|
|
202
248
|
}
|
|
203
249
|
/** `agent-native doctor` CLI entrypoint. Returns the process exit code —
|
|
@@ -269,6 +315,12 @@ export async function runDoctorBuildHook(options, io = defaultIo) {
|
|
|
269
315
|
io.err(` [${f.guard}] ${f.file}:${f.line} — ${f.message}`);
|
|
270
316
|
}
|
|
271
317
|
}
|
|
318
|
+
if (report.warnings.length > 0) {
|
|
319
|
+
io.err(`\n[doctor] ${report.warnings.length} planned migration warning(s) — no rewrite is available yet.`);
|
|
320
|
+
for (const warning of report.warnings) {
|
|
321
|
+
io.err(` [${warning.guard}] ${warning.file}:${warning.line} — ${warning.message}`);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
272
324
|
const fail = shouldFailBuild(report.findings.length > 0, {
|
|
273
325
|
strict: options.strict,
|
|
274
326
|
failOnBuild: config.failOnBuild,
|
package/dist/cli/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAY5B,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,iBAAiB;IACjB,yBAAyB;IACzB,qBAAqB;IACrB,oBAAoB;IACpB,iBAAiB;IACjB,iBAAiB;IACjB,uBAAuB;CACxB,CAAC;AAQF,MAAM,qBAAqB,GAAiB;IAC1C,cAAc,EAAE,EAAE;IAClB,qBAAqB,EAAE,EAAE;IACzB,WAAW,EAAE,KAAK;CACnB,CAAC;AAeF;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,MAAM,YAAY,GAAG,I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ariants this monorepo already enforces on\n * itself via `scripts/guard-*.mjs` (see\n * `advisor-plans/reports/005-doctor-design.md` for the full design and\n * `advisor-plans/015-doctor-v1-implementation.md` for the implementation\n * plan). v1 ships 7 of those guards, ported to work against a single\n * generated app root instead of this monorepo's multi-template layout —\n * see `../guards/index.ts`.\n *\n * This is a NEW top-level command, deliberately kept separate from the two\n * existing \"doctor\" precedents in this CLI:\n * - `agent-native upgrade check` (`upgrade.ts`) — dependency-pin health.\n * - `agent-native recap doctor` (`recap.ts`) — PR Visual Recap config health.\n * Each diagnoses a different domain; none are folded into a shared\n * mega-doctor (see report 005, \"Relationship to upgrade doctor and recap\n * doctor\").\n *\n * `--fix` is reserved, not implemented in v1 — it prints a message and\n * exits 2 rather than silently no-op, so a future implementation doesn't\n * collide with a script already passing the flag.\n */\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nimport {\n scanDbToolScoping,\n scanDrizzlePush,\n scanEnvCredentials,\n scanEnvMutation,\n scanLocalhostFallback,\n scanUnscopedCredentials,\n scanUnscopedQueries,\n} from \"../guards/index.js\";\nimport type { GuardResult } from \"../guards/index.js\";\n\nexport type GuardName =\n | \"no-drizzle-push\"\n | \"no-unscoped-credentials\"\n | \"no-unscoped-queries\"\n | \"no-env-credentials\"\n | \"db-tool-scoping\"\n | \"no-env-mutation\"\n | \"no-localhost-fallback\";\n\nexport const ALL_GUARD_NAMES: GuardName[] = [\n \"no-drizzle-push\",\n \"no-unscoped-credentials\",\n \"no-unscoped-queries\",\n \"no-env-credentials\",\n \"db-tool-scoping\",\n \"no-env-mutation\",\n \"no-localhost-fallback\",\n];\n\nexport interface DoctorConfig {\n disabledGuards: string[];\n dbToolScopingDenylist: Record<string, string>;\n failOnBuild: boolean;\n}\n\nconst DEFAULT_DOCTOR_CONFIG: DoctorConfig = {\n disabledGuards: [],\n dbToolScopingDenylist: {},\n failOnBuild: false,\n};\n\nexport interface DoctorFinding {\n guard: string;\n file: string;\n line: number;\n message: string;\n}\n\nexport interface DoctorReport {\n ok: boolean;\n findings: DoctorFinding[];\n guardsRun: string[];\n}\n\n/**\n * Reads the optional `\"doctor\"` key from `<root>/agent-native.json`. All\n * fields are optional with sane empty defaults — an app needs zero config\n * to run `agent-native doctor` with every v1 guard enabled.\n */\nexport function readDoctorConfig(root: string): DoctorConfig {\n const manifestPath = path.join(root, \"agent-native.json\");\n if (!fs.existsSync(manifestPath)) {\n return { ...DEFAULT_DOCTOR_CONFIG, dbToolScopingDenylist: {} };\n }\n try {\n const raw = fs.readFileSync(manifestPath, \"utf-8\");\n const parsed = JSON.parse(raw) as { doctor?: Record<string, unknown> };\n const doctor = parsed.doctor ?? {};\n const disabledGuards = Array.isArray(doctor.disabledGuards)\n ? doctor.disabledGuards.filter((v): v is string => typeof v === \"string\")\n : [];\n const dbToolScopingDenylist =\n doctor.dbToolScopingDenylist &&\n typeof doctor.dbToolScopingDenylist === \"object\"\n ? (Object.fromEntries(\n Object.entries(\n doctor.dbToolScopingDenylist as Record<string, unknown>,\n ).filter(\n (entry): entry is [string, string] =>\n typeof entry[1] === \"string\",\n ),\n ) as Record<string, string>)\n : {};\n const failOnBuild = doctor.failOnBuild === true;\n return { disabledGuards, dbToolScopingDenylist, failOnBuild };\n } catch {\n return { ...DEFAULT_DOCTOR_CONFIG, dbToolScopingDenylist: {} };\n }\n}\n\nfunction runGuard(\n name: GuardName,\n root: string,\n config: DoctorConfig,\n): GuardResult {\n switch (name) {\n case \"no-drizzle-push\":\n return scanDrizzlePush({ root });\n case \"no-unscoped-credentials\":\n return scanUnscopedCredentials({ root });\n case \"no-unscoped-queries\":\n return scanUnscopedQueries({ root, extraExemptPaths: [] });\n case \"no-env-credentials\":\n return scanEnvCredentials({ root });\n case \"db-tool-scoping\":\n return scanDbToolScoping({\n root,\n denylist: config.dbToolScopingDenylist,\n });\n case \"no-env-mutation\":\n return scanEnvMutation({ root });\n case \"no-localhost-fallback\":\n return scanLocalhostFallback({ root, extraExemptPaths: [] });\n }\n}\n\nexport interface RunDoctorScanOptions {\n root: string;\n /** Restrict to these guard names. When omitted, runs every guard not\n * listed in `agent-native.json`'s `doctor.disabledGuards`. Unknown names\n * are silently ignored here — the CLI layer (`runDoctor`) validates\n * `--only` and reports a usage error before calling this. */\n only?: string[];\n}\n\n/** Pure scan orchestrator: runs the selected guards against `root` and\n * returns a flat report. No I/O beyond reading `agent-native.json` and the\n * app source tree — no printing, no process.exit. */\nexport function runDoctorScan(options: RunDoctorScanOptions): DoctorReport {\n const root = options.root;\n const config = readDoctorConfig(root);\n\n let names: GuardName[];\n if (options.only && options.only.length > 0) {\n const knownOnly = options.only.filter((n): n is GuardName =>\n (ALL_GUARD_NAMES as string[]).includes(n),\n );\n names = knownOnly;\n } else {\n names = ALL_GUARD_NAMES.filter((n) => !config.disabledGuards.includes(n));\n }\n\n const findings: DoctorFinding[] = [];\n for (const name of names) {\n const result = runGuard(name, root, config);\n for (const f of result.findings) {\n findings.push({\n guard: name,\n file: f.file,\n line: f.line,\n message: f.message,\n });\n }\n }\n\n return { ok: findings.length === 0, findings, guardsRun: names };\n}\n\n/** Pure escalation rule shared by the CLI (`--strict`) and the `build`\n * pre-step (`--strict` / `agent-native.json` `doctor.failOnBuild`). Doctor\n * findings never fail anything on their own — only `strict` or\n * `failOnBuild` turn findings into a hard failure. */\nexport function shouldFailBuild(\n hasFindings: boolean,\n opts: { strict?: boolean; failOnBuild?: boolean },\n): boolean {\n return hasFindings && Boolean(opts.strict || opts.failOnBuild);\n}\n\nexport interface DoctorIo {\n log: (message: string) => void;\n err: (message: string) => void;\n}\n\nconst defaultIo: DoctorIo = {\n log: (message) => console.log(message),\n err: (message) => console.error(message),\n};\n\nfunction formatDoctorHuman(report: DoctorReport, root: string): string {\n const lines: string[] = [];\n lines.push(`agent-native doctor: ${root}`);\n lines.push(`Guards run: ${report.guardsRun.join(\", \") || \"(none)\"}`);\n if (report.findings.length === 0) {\n lines.push(\"Clean — no findings.\");\n } else {\n lines.push(`${report.findings.length} finding(s):`);\n for (const f of report.findings) {\n lines.push(` [${f.guard}] ${f.file}:${f.line} — ${f.message}`);\n }\n }\n return lines.join(\"\\n\");\n}\n\nexport interface DoctorCliOptions {\n json?: boolean;\n cwd?: string;\n only?: string[];\n strict?: boolean;\n help?: boolean;\n fix?: boolean;\n}\n\nexport function parseDoctorArgs(argv: string[]): DoctorCliOptions {\n const opts: DoctorCliOptions = {};\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i];\n if (arg === \"--help\" || arg === \"-h\") {\n opts.help = true;\n } else if (arg === \"--json\") {\n opts.json = true;\n } else if (arg === \"--strict\") {\n opts.strict = true;\n } else if (arg === \"--fix\") {\n opts.fix = true;\n } else if (arg === \"--cwd\" && argv[i + 1] !== undefined) {\n opts.cwd = argv[++i];\n } else if (arg.startsWith(\"--cwd=\")) {\n opts.cwd = arg.slice(\"--cwd=\".length);\n } else if (arg === \"--only\" && argv[i + 1] !== undefined) {\n opts.only = splitGuardList(argv[++i]);\n } else if (arg.startsWith(\"--only=\")) {\n opts.only = splitGuardList(arg.slice(\"--only=\".length));\n }\n }\n return opts;\n}\n\nfunction splitGuardList(value: string): string[] {\n return value\n .split(\",\")\n .map((s) => s.trim())\n .filter((s) => s.length > 0);\n}\n\nexport function printDoctorHelp(io: Pick<DoctorIo, \"log\"> = defaultIo): void {\n io.log(\n [\n \"Usage:\",\n \" agent-native doctor Scan app source for security-critical guard violations\",\n \" agent-native doctor --json Machine-readable report: { ok, findings, guardsRun, strict }\",\n \" agent-native doctor --only <guard,guard> Run only the named guard(s)\",\n \" agent-native doctor --strict Escalate findings to a hard failure when used by `agent-native build --strict`\",\n \" agent-native doctor --cwd <dir> Run against a project root other than the current directory\",\n \" agent-native doctor --fix Not implemented in this version\",\n \" agent-native doctor --help Show this help\",\n \"\",\n `Guards: ${ALL_GUARD_NAMES.join(\", \")}`,\n \"\",\n \"Exit codes: 0 clean, 1 findings present, 2 usage/execution error.\",\n \"\",\n \"`agent-native build` runs doctor as a warn-only pre-step by default — it\",\n \"never fails the build unless `agent-native build --strict` is passed or\",\n 'agent-native.json sets { \"doctor\": { \"failOnBuild\": true } }.',\n \"\",\n \"For dependency-pin health (framework overrides/patches, stale\",\n \"@agent-native/* pins), run `agent-native upgrade check` instead.\",\n ].join(\"\\n\"),\n );\n}\n\n/** `agent-native doctor` CLI entrypoint. Returns the process exit code —\n * callers are responsible for calling `process.exit(code)`. */\nexport async function runDoctor(\n argv: string[],\n io: DoctorIo = defaultIo,\n): Promise<number> {\n const opts = parseDoctorArgs(argv);\n\n if (opts.help) {\n printDoctorHelp(io);\n return 0;\n }\n\n if (opts.fix) {\n io.err(\n \"agent-native doctor --fix is not implemented in this version. Fix findings manually and re-run `agent-native doctor`.\",\n );\n return 2;\n }\n\n const root = path.resolve(opts.cwd ?? process.cwd());\n if (!fs.existsSync(root) || !fs.statSync(root).isDirectory()) {\n const message = `--cwd path does not exist or is not a directory: ${root}`;\n if (opts.json) io.err(JSON.stringify({ ok: false, message }, null, 2));\n else io.err(message);\n return 2;\n }\n\n if (opts.only) {\n const unknown = opts.only.filter(\n (n) => !(ALL_GUARD_NAMES as string[]).includes(n),\n );\n if (unknown.length > 0) {\n const message = `Unknown guard name(s) in --only: ${unknown.join(\", \")}. Known guards: ${ALL_GUARD_NAMES.join(\", \")}`;\n if (opts.json) io.err(JSON.stringify({ ok: false, message }, null, 2));\n else io.err(message);\n return 2;\n }\n }\n\n const report = runDoctorScan({ root, only: opts.only });\n\n if (opts.json) {\n // The machine-readable report always goes to stdout (io.log), whether\n // or not findings are present, so `agent-native doctor --json >\n // report.json` in CI always captures the report. Only the usage/\n // execution error payloads above (bad --cwd, unknown --only) go to\n // stderr — those are diagnostics for exit code 2, not the report.\n io.log(\n JSON.stringify({ ...report, strict: Boolean(opts.strict) }, null, 2),\n );\n } else {\n io.log(formatDoctorHuman(report, root));\n if (!report.ok) {\n io.err(\"\");\n io.err(\n \"agent-native doctor found issues above. Fix them, or add a `// guard:allow-<check> — reason` opt-out with reviewer approval.\",\n );\n }\n }\n\n return report.ok ? 0 : 1;\n}\n\nexport interface DoctorBuildHookOptions {\n cwd: string;\n /** Set when the caller passed `agent-native build --strict`. */\n strict?: boolean;\n}\n\nexport interface DoctorBuildHookResult {\n /** False only when findings are present AND (`strict` was requested OR\n * `agent-native.json`'s `doctor.failOnBuild` is true). */\n ok: boolean;\n report: DoctorReport;\n}\n\n/**\n * `agent-native build`'s doctor pre-step. Always runs every enabled guard\n * and always prints findings (as warnings) to `io.err` — never silent.\n * Never causes the build to fail unless `strict` was passed or\n * `agent-native.json` sets `doctor.failOnBuild: true` (see report 005,\n * \"Where it runs\" — the v1 doctor has zero field mileage against arbitrary\n * app layouts, so shipping fail-by-default would risk breaking a first\n * deploy on a false positive).\n */\nexport async function runDoctorBuildHook(\n options: DoctorBuildHookOptions,\n io: DoctorIo = defaultIo,\n): Promise<DoctorBuildHookResult> {\n const root = path.resolve(options.cwd);\n const config = readDoctorConfig(root);\n const report = runDoctorScan({ root });\n\n if (report.findings.length > 0) {\n io.err(\n `\\n[doctor] ${report.findings.length} finding(s) from \\`agent-native doctor\\` — run it directly for details. This does not fail the build unless --strict was passed or agent-native.json's doctor.failOnBuild is true.`,\n );\n for (const f of report.findings) {\n io.err(` [${f.guard}] ${f.file}:${f.line} — ${f.message}`);\n }\n }\n\n const fail = shouldFailBuild(report.findings.length > 0, {\n strict: options.strict,\n failOnBuild: config.failOnBuild,\n });\n if (fail) {\n io.err(\n `\\n[doctor] Failing build: ${options.strict ? \"--strict was passed\" : \"agent-native.json's doctor.failOnBuild is true\"}.`,\n );\n }\n\n return { ok: !fail, report };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,kBAAkB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C,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,gDAAgD,GAAG,CAC1H,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/B,CAAC","sourcesContent":["/**\n * `agent-native doctor` — scan an app's source tree for the security-\n * critical code-safety invariants this monorepo already enforces on\n * itself via `scripts/guard-*.mjs` (see\n * `advisor-plans/reports/005-doctor-design.md` for the full design and\n * `advisor-plans/015-doctor-v1-implementation.md` for the implementation\n * plan). v1 ships 8 of those guards, ported to work against a single\n * generated app root instead of this monorepo's multi-template layout —\n * see `../guards/index.ts`.\n *\n * This is a NEW top-level command, deliberately kept separate from the two\n * existing \"doctor\" precedents in this CLI:\n * - `agent-native upgrade check` (`upgrade.ts`) — dependency-pin health.\n * - `agent-native recap doctor` (`recap.ts`) — PR Visual Recap config health.\n * Each diagnoses a different domain; none are folded into a shared\n * mega-doctor (see report 005, \"Relationship to upgrade doctor and recap\n * doctor\").\n *\n * `--fix` is reserved, not implemented in v1 — it prints a message and\n * exits 2 rather than silently no-op, so a future implementation doesn't\n * collide with a script already passing the flag.\n */\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nimport {\n scanDbToolScoping,\n scanDrizzlePush,\n scanEnvCredentials,\n scanEnvMutation,\n scanLocalhostFallback,\n scanUnscopedCredentials,\n scanUnscopedQueries,\n} from \"../guards/index.js\";\nimport type { GuardFinding, GuardResult } from \"../guards/index.js\";\nimport {\n AGENT_NATIVE_UPGRADE_CODEMOD_COMMAND,\n scanDeprecatedImports,\n type MigrationManifest,\n} from \"../package-lifecycle/index.js\";\n\nexport type GuardName =\n | \"no-drizzle-push\"\n | \"no-unscoped-credentials\"\n | \"no-unscoped-queries\"\n | \"no-env-credentials\"\n | \"db-tool-scoping\"\n | \"no-env-mutation\"\n | \"no-localhost-fallback\"\n | \"migration-manifest\";\n\nexport const ALL_GUARD_NAMES: GuardName[] = [\n \"no-drizzle-push\",\n \"no-unscoped-credentials\",\n \"no-unscoped-queries\",\n \"no-env-credentials\",\n \"db-tool-scoping\",\n \"no-env-mutation\",\n \"no-localhost-fallback\",\n \"migration-manifest\",\n];\n\nexport interface DoctorConfig {\n disabledGuards: string[];\n dbToolScopingDenylist: Record<string, string>;\n failOnBuild: boolean;\n}\n\nconst DEFAULT_DOCTOR_CONFIG: DoctorConfig = {\n disabledGuards: [],\n dbToolScopingDenylist: {},\n failOnBuild: false,\n};\n\nexport interface DoctorFinding {\n guard: string;\n file: string;\n line: number;\n message: string;\n}\n\nexport interface DoctorReport {\n ok: boolean;\n findings: DoctorFinding[];\n warnings: DoctorFinding[];\n guardsRun: string[];\n}\n\ninterface DoctorGuardResult extends GuardResult {\n warnings?: GuardFinding[];\n}\n\n/**\n * Reads the optional `\"doctor\"` key from `<root>/agent-native.json`. All\n * fields are optional with sane empty defaults — an app needs zero config\n * to run `agent-native doctor` with every v1 guard enabled.\n */\nexport function readDoctorConfig(root: string): DoctorConfig {\n const manifestPath = path.join(root, \"agent-native.json\");\n if (!fs.existsSync(manifestPath)) {\n return { ...DEFAULT_DOCTOR_CONFIG, dbToolScopingDenylist: {} };\n }\n try {\n const raw = fs.readFileSync(manifestPath, \"utf-8\");\n const parsed = JSON.parse(raw) as { doctor?: Record<string, unknown> };\n const doctor = parsed.doctor ?? {};\n const disabledGuards = Array.isArray(doctor.disabledGuards)\n ? doctor.disabledGuards.filter((v): v is string => typeof v === \"string\")\n : [];\n const dbToolScopingDenylist =\n doctor.dbToolScopingDenylist &&\n typeof doctor.dbToolScopingDenylist === \"object\"\n ? (Object.fromEntries(\n Object.entries(\n doctor.dbToolScopingDenylist as Record<string, unknown>,\n ).filter(\n (entry): entry is [string, string] =>\n typeof entry[1] === \"string\",\n ),\n ) as Record<string, string>)\n : {};\n const failOnBuild = doctor.failOnBuild === true;\n return { disabledGuards, dbToolScopingDenylist, failOnBuild };\n } catch {\n return { ...DEFAULT_DOCTOR_CONFIG, dbToolScopingDenylist: {} };\n }\n}\n\nfunction runGuard(\n name: GuardName,\n root: string,\n config: DoctorConfig,\n migrationManifests?: MigrationManifest[],\n): DoctorGuardResult {\n switch (name) {\n case \"no-drizzle-push\":\n return scanDrizzlePush({ root });\n case \"no-unscoped-credentials\":\n return scanUnscopedCredentials({ root });\n case \"no-unscoped-queries\":\n return scanUnscopedQueries({ root, extraExemptPaths: [] });\n case \"no-env-credentials\":\n return scanEnvCredentials({ root });\n case \"db-tool-scoping\":\n return scanDbToolScoping({\n root,\n denylist: config.dbToolScopingDenylist,\n });\n case \"no-env-mutation\":\n return scanEnvMutation({ root });\n case \"no-localhost-fallback\":\n return scanLocalhostFallback({ root, extraExemptPaths: [] });\n case \"migration-manifest\": {\n const imports = scanDeprecatedImports({\n root,\n manifests: migrationManifests,\n });\n return {\n name,\n findings: imports\n .filter((finding) => finding.status === \"active\")\n .map((finding) => ({\n file: path.relative(root, finding.file),\n line: finding.line,\n message: `${finding.from} moves to ${finding.to.join(\", \")}. Run: ${AGENT_NATIVE_UPGRADE_CODEMOD_COMMAND}`,\n })),\n warnings: imports\n .filter((finding) => finding.status === \"planned\")\n .map((finding) => ({\n file: path.relative(root, finding.file),\n line: finding.line,\n message: `${finding.from} is planned to move to ${finding.to.join(\", \")} in a future release. No rewrite is available yet.`,\n })),\n };\n }\n }\n}\n\nexport interface RunDoctorScanOptions {\n root: string;\n /** Restrict to these guard names. When omitted, runs every guard not\n * listed in `agent-native.json`'s `doctor.disabledGuards`. Unknown names\n * are silently ignored here — the CLI layer (`runDoctor`) validates\n * `--only` and reports a usage error before calling this. */\n only?: string[];\n migrationManifests?: MigrationManifest[];\n}\n\n/** Pure scan orchestrator: runs the selected guards against `root` and\n * returns a flat report. No I/O beyond reading `agent-native.json` and the\n * app source tree — no printing, no process.exit. */\nexport function runDoctorScan(options: RunDoctorScanOptions): DoctorReport {\n const root = options.root;\n const config = readDoctorConfig(root);\n\n let names: GuardName[];\n if (options.only && options.only.length > 0) {\n const knownOnly = options.only.filter((n): n is GuardName =>\n (ALL_GUARD_NAMES as string[]).includes(n),\n );\n names = knownOnly;\n } else {\n names = ALL_GUARD_NAMES.filter((n) => !config.disabledGuards.includes(n));\n }\n\n const findings: DoctorFinding[] = [];\n const warnings: DoctorFinding[] = [];\n for (const name of names) {\n const result = runGuard(name, root, config, options.migrationManifests);\n for (const f of result.findings) {\n findings.push({\n guard: name,\n file: f.file,\n line: f.line,\n message: f.message,\n });\n }\n for (const warning of result.warnings ?? []) {\n warnings.push({\n guard: name,\n file: warning.file,\n line: warning.line,\n message: warning.message,\n });\n }\n }\n\n return {\n ok: findings.length === 0,\n findings,\n warnings,\n guardsRun: names,\n };\n}\n\n/** Pure escalation rule shared by the CLI (`--strict`) and the `build`\n * pre-step (`--strict` / `agent-native.json` `doctor.failOnBuild`). Doctor\n * findings never fail anything on their own — only `strict` or\n * `failOnBuild` turn findings into a hard failure. */\nexport function shouldFailBuild(\n hasFindings: boolean,\n opts: { strict?: boolean; failOnBuild?: boolean },\n): boolean {\n return hasFindings && Boolean(opts.strict || opts.failOnBuild);\n}\n\nexport interface DoctorIo {\n log: (message: string) => void;\n err: (message: string) => void;\n}\n\nconst defaultIo: DoctorIo = {\n log: (message) => console.log(message),\n err: (message) => console.error(message),\n};\n\nfunction formatDoctorHuman(report: DoctorReport, root: string): string {\n const lines: string[] = [];\n lines.push(`agent-native doctor: ${root}`);\n lines.push(`Guards run: ${report.guardsRun.join(\", \") || \"(none)\"}`);\n if (report.findings.length === 0) {\n lines.push(\"Clean — no findings.\");\n } else {\n lines.push(`${report.findings.length} finding(s):`);\n for (const f of report.findings) {\n lines.push(` [${f.guard}] ${f.file}:${f.line} — ${f.message}`);\n }\n }\n if (report.warnings.length > 0) {\n lines.push(`${report.warnings.length} warning(s):`);\n for (const warning of report.warnings) {\n lines.push(\n ` [${warning.guard}] ${warning.file}:${warning.line} — ${warning.message}`,\n );\n }\n }\n return lines.join(\"\\n\");\n}\n\nexport interface DoctorCliOptions {\n json?: boolean;\n cwd?: string;\n only?: string[];\n strict?: boolean;\n help?: boolean;\n fix?: boolean;\n}\n\nexport function parseDoctorArgs(argv: string[]): DoctorCliOptions {\n const opts: DoctorCliOptions = {};\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i];\n if (arg === \"--help\" || arg === \"-h\") {\n opts.help = true;\n } else if (arg === \"--json\") {\n opts.json = true;\n } else if (arg === \"--strict\") {\n opts.strict = true;\n } else if (arg === \"--fix\") {\n opts.fix = true;\n } else if (arg === \"--cwd\" && argv[i + 1] !== undefined) {\n opts.cwd = argv[++i];\n } else if (arg.startsWith(\"--cwd=\")) {\n opts.cwd = arg.slice(\"--cwd=\".length);\n } else if (arg === \"--only\" && argv[i + 1] !== undefined) {\n opts.only = splitGuardList(argv[++i]);\n } else if (arg.startsWith(\"--only=\")) {\n opts.only = splitGuardList(arg.slice(\"--only=\".length));\n }\n }\n return opts;\n}\n\nfunction splitGuardList(value: string): string[] {\n return value\n .split(\",\")\n .map((s) => s.trim())\n .filter((s) => s.length > 0);\n}\n\nexport function printDoctorHelp(io: Pick<DoctorIo, \"log\"> = defaultIo): void {\n io.log(\n [\n \"Usage:\",\n \" agent-native doctor Scan app source for security-critical guard violations\",\n \" agent-native doctor --json Machine-readable report: { ok, findings, warnings, guardsRun, strict }\",\n \" agent-native doctor --only <guard,guard> Run only the named guard(s)\",\n \" agent-native doctor --strict Escalate findings to a hard failure when used by `agent-native build --strict`\",\n \" agent-native doctor --cwd <dir> Run against a project root other than the current directory\",\n \" agent-native doctor --fix Not implemented in this version\",\n \" agent-native doctor --help Show this help\",\n \"\",\n `Guards: ${ALL_GUARD_NAMES.join(\", \")}`,\n \"\",\n \"Exit codes: 0 clean, 1 findings present, 2 usage/execution error.\",\n \"\",\n \"`agent-native build` runs doctor as a warn-only pre-step by default — it\",\n \"never fails the build unless `agent-native build --strict` is passed or\",\n 'agent-native.json sets { \"doctor\": { \"failOnBuild\": true } }.',\n \"\",\n \"For dependency-pin health (framework overrides/patches, stale\",\n \"@agent-native/* pins), run `agent-native upgrade check` instead.\",\n `For import migrations, run \\`${AGENT_NATIVE_UPGRADE_CODEMOD_COMMAND}\\`.`,\n ].join(\"\\n\"),\n );\n}\n\n/** `agent-native doctor` CLI entrypoint. Returns the process exit code —\n * callers are responsible for calling `process.exit(code)`. */\nexport async function runDoctor(\n argv: string[],\n io: DoctorIo = defaultIo,\n): Promise<number> {\n const opts = parseDoctorArgs(argv);\n\n if (opts.help) {\n printDoctorHelp(io);\n return 0;\n }\n\n if (opts.fix) {\n io.err(\n \"agent-native doctor --fix is not implemented in this version. Fix findings manually and re-run `agent-native doctor`.\",\n );\n return 2;\n }\n\n const root = path.resolve(opts.cwd ?? process.cwd());\n if (!fs.existsSync(root) || !fs.statSync(root).isDirectory()) {\n const message = `--cwd path does not exist or is not a directory: ${root}`;\n if (opts.json) io.err(JSON.stringify({ ok: false, message }, null, 2));\n else io.err(message);\n return 2;\n }\n\n if (opts.only) {\n const unknown = opts.only.filter(\n (n) => !(ALL_GUARD_NAMES as string[]).includes(n),\n );\n if (unknown.length > 0) {\n const message = `Unknown guard name(s) in --only: ${unknown.join(\", \")}. Known guards: ${ALL_GUARD_NAMES.join(\", \")}`;\n if (opts.json) io.err(JSON.stringify({ ok: false, message }, null, 2));\n else io.err(message);\n return 2;\n }\n }\n\n const report = runDoctorScan({ root, only: opts.only });\n\n if (opts.json) {\n // The machine-readable report always goes to stdout (io.log), whether\n // or not findings are present, so `agent-native doctor --json >\n // report.json` in CI always captures the report. Only the usage/\n // execution error payloads above (bad --cwd, unknown --only) go to\n // stderr — those are diagnostics for exit code 2, not the report.\n io.log(\n JSON.stringify({ ...report, strict: Boolean(opts.strict) }, null, 2),\n );\n } else {\n io.log(formatDoctorHuman(report, root));\n if (!report.ok) {\n io.err(\"\");\n io.err(\n \"agent-native doctor found issues above. Fix them, or add a `// guard:allow-<check> — reason` opt-out with reviewer approval.\",\n );\n }\n }\n\n return report.ok ? 0 : 1;\n}\n\nexport interface DoctorBuildHookOptions {\n cwd: string;\n /** Set when the caller passed `agent-native build --strict`. */\n strict?: boolean;\n}\n\nexport interface DoctorBuildHookResult {\n /** False only when findings are present AND (`strict` was requested OR\n * `agent-native.json`'s `doctor.failOnBuild` is true). */\n ok: boolean;\n report: DoctorReport;\n}\n\n/**\n * `agent-native build`'s doctor pre-step. Always runs every enabled guard\n * and always prints findings (as warnings) to `io.err` — never silent.\n * Never causes the build to fail unless `strict` was passed or\n * `agent-native.json` sets `doctor.failOnBuild: true` (see report 005,\n * \"Where it runs\" — the v1 doctor has zero field mileage against arbitrary\n * app layouts, so shipping fail-by-default would risk breaking a first\n * deploy on a false positive).\n */\nexport async function runDoctorBuildHook(\n options: DoctorBuildHookOptions,\n io: DoctorIo = defaultIo,\n): Promise<DoctorBuildHookResult> {\n const root = path.resolve(options.cwd);\n const config = readDoctorConfig(root);\n const report = runDoctorScan({ root });\n\n if (report.findings.length > 0) {\n io.err(\n `\\n[doctor] ${report.findings.length} finding(s) from \\`agent-native doctor\\` — run it directly for details. This does not fail the build unless --strict was passed or agent-native.json's doctor.failOnBuild is true.`,\n );\n for (const f of report.findings) {\n io.err(` [${f.guard}] ${f.file}:${f.line} — ${f.message}`);\n }\n }\n if (report.warnings.length > 0) {\n io.err(\n `\\n[doctor] ${report.warnings.length} planned migration warning(s) — no rewrite is available yet.`,\n );\n for (const warning of report.warnings) {\n io.err(\n ` [${warning.guard}] ${warning.file}:${warning.line} — ${warning.message}`,\n );\n }\n }\n\n const fail = shouldFailBuild(report.findings.length > 0, {\n strict: options.strict,\n failOnBuild: config.failOnBuild,\n });\n if (fail) {\n io.err(\n `\\n[doctor] Failing build: ${options.strict ? \"--strict was passed\" : \"agent-native.json's doctor.failOnBuild is true\"}.`,\n );\n }\n\n return { ok: !fail, report };\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type MigrationManifest } from "../package-lifecycle/migration-manifest.js";
|
|
2
|
+
export interface MigrationCodemodFileChange {
|
|
3
|
+
file: string;
|
|
4
|
+
before: string;
|
|
5
|
+
after: string;
|
|
6
|
+
}
|
|
7
|
+
export interface MigrationCodemodResult {
|
|
8
|
+
changes: MigrationCodemodFileChange[];
|
|
9
|
+
dependencyFiles: string[];
|
|
10
|
+
warnings: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface RunMigrationCodemodsOptions {
|
|
13
|
+
root: string;
|
|
14
|
+
manifests?: MigrationManifest[];
|
|
15
|
+
apply?: boolean;
|
|
16
|
+
targetExists?: (specifier: string) => boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function loadMigrationManifests(projectRoot: string): MigrationManifest[];
|
|
19
|
+
export declare function runMigrationCodemods(options: RunMigrationCodemodsOptions): MigrationCodemodResult;
|
|
20
|
+
export declare function formatMigrationCodemodDiff(result: MigrationCodemodResult, root: string): string;
|
|
21
|
+
//# sourceMappingURL=migration-codemod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration-codemod.d.ts","sourceRoot":"","sources":["../../src/cli/migration-codemod.ts"],"names":[],"mappings":"AAYA,OAAO,EAML,KAAK,iBAAiB,EAEvB,MAAM,4CAA4C,CAAC;AAcpD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;CAC/C;AAqCD,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,GAClB,iBAAiB,EAAE,CAKrB;AAkXD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,2BAA2B,GACnC,sBAAsB,CA6DxB;AAiCD,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,sBAAsB,EAC9B,IAAI,EAAE,MAAM,GACX,MAAM,CAIR"}
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { Project, QuoteKind, } from "ts-morph";
|
|
5
|
+
import { bundledCorePackageVersion, isMigrationManifestActive, loadMigrationManifestsForProject, migrationMoveStatus, resolveMigrationSymbolMove, } from "../package-lifecycle/migration-manifest.js";
|
|
6
|
+
const SOURCE_EXTENSIONS = new Set([".ts", ".tsx"]);
|
|
7
|
+
const SKIP_DIRECTORIES = new Set([
|
|
8
|
+
".git",
|
|
9
|
+
".next",
|
|
10
|
+
".output",
|
|
11
|
+
".turbo",
|
|
12
|
+
"build",
|
|
13
|
+
"coverage",
|
|
14
|
+
"dist",
|
|
15
|
+
"node_modules",
|
|
16
|
+
]);
|
|
17
|
+
function collectSourceFiles(root) {
|
|
18
|
+
const files = [];
|
|
19
|
+
const visit = (directory) => {
|
|
20
|
+
for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
|
|
21
|
+
if (entry.isDirectory() && SKIP_DIRECTORIES.has(entry.name))
|
|
22
|
+
continue;
|
|
23
|
+
const entryPath = path.join(directory, entry.name);
|
|
24
|
+
if (entry.isDirectory()) {
|
|
25
|
+
visit(entryPath);
|
|
26
|
+
}
|
|
27
|
+
else if (SOURCE_EXTENSIONS.has(path.extname(entry.name)) &&
|
|
28
|
+
!entry.name.endsWith(".d.ts")) {
|
|
29
|
+
files.push(entryPath);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
visit(root);
|
|
34
|
+
return files.sort();
|
|
35
|
+
}
|
|
36
|
+
function mergeManifestMoves(manifests) {
|
|
37
|
+
const moves = {};
|
|
38
|
+
for (const manifest of manifests) {
|
|
39
|
+
Object.assign(moves, manifest.moves);
|
|
40
|
+
}
|
|
41
|
+
return moves;
|
|
42
|
+
}
|
|
43
|
+
export function loadMigrationManifests(projectRoot) {
|
|
44
|
+
const packageVersion = bundledCorePackageVersion();
|
|
45
|
+
return loadMigrationManifestsForProject(projectRoot).filter((manifest) => isMigrationManifestActive(manifest, packageVersion));
|
|
46
|
+
}
|
|
47
|
+
function packageNameFromSpecifier(specifier) {
|
|
48
|
+
if (specifier.startsWith("@")) {
|
|
49
|
+
const [scope, name] = specifier.split("/");
|
|
50
|
+
return scope && name ? `${scope}/${name}` : null;
|
|
51
|
+
}
|
|
52
|
+
const [name] = specifier.split("/");
|
|
53
|
+
return name && !name.startsWith(".") ? name : null;
|
|
54
|
+
}
|
|
55
|
+
function nearestPackageFile(file, root) {
|
|
56
|
+
let directory = path.dirname(file);
|
|
57
|
+
const boundary = path.resolve(root);
|
|
58
|
+
while (directory.startsWith(boundary)) {
|
|
59
|
+
const packageFile = path.join(directory, "package.json");
|
|
60
|
+
if (fs.existsSync(packageFile))
|
|
61
|
+
return packageFile;
|
|
62
|
+
if (directory === boundary)
|
|
63
|
+
break;
|
|
64
|
+
directory = path.dirname(directory);
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
function recordIntroducedDependency(pending, sourceFile, root, from, to) {
|
|
69
|
+
const fromPackage = packageNameFromSpecifier(from);
|
|
70
|
+
const toPackage = packageNameFromSpecifier(to);
|
|
71
|
+
if (!toPackage || toPackage === fromPackage)
|
|
72
|
+
return;
|
|
73
|
+
const packageFile = nearestPackageFile(sourceFile, root);
|
|
74
|
+
if (!packageFile)
|
|
75
|
+
return;
|
|
76
|
+
if (!pending.some((entry) => entry.packageFile === packageFile && entry.packageName === toPackage)) {
|
|
77
|
+
pending.push({ packageFile, packageName: toPackage });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function importedNameStructure(importedName, localName, nextName, typeOnly) {
|
|
81
|
+
return {
|
|
82
|
+
name: nextName,
|
|
83
|
+
alias: localName !== nextName
|
|
84
|
+
? localName
|
|
85
|
+
: importedName !== nextName
|
|
86
|
+
? importedName
|
|
87
|
+
: undefined,
|
|
88
|
+
isTypeOnly: typeOnly,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function warnSkippedTarget(warnings, sourceFile, target, reason) {
|
|
92
|
+
const message = reason === "planned"
|
|
93
|
+
? `${sourceFile}: migration to ${target} is planned but not active; no rewrite was applied`
|
|
94
|
+
: `${sourceFile}: migration target ${target} is not exported by an installed package; no rewrite was applied`;
|
|
95
|
+
if (!warnings.includes(message))
|
|
96
|
+
warnings.push(message);
|
|
97
|
+
}
|
|
98
|
+
function rewriteImportDeclaration(declaration, move, root, pendingDependencies, warnings, targetExists) {
|
|
99
|
+
const originalSpecifier = declaration.getModuleSpecifierValue();
|
|
100
|
+
const sourceFile = declaration.getSourceFile();
|
|
101
|
+
const namedImports = declaration.getNamedImports();
|
|
102
|
+
if (!move.symbols) {
|
|
103
|
+
if (migrationMoveStatus(move) === "planned") {
|
|
104
|
+
warnSkippedTarget(warnings, sourceFile.getFilePath(), move.to, "planned");
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
if (!targetExists(move.to)) {
|
|
108
|
+
warnSkippedTarget(warnings, sourceFile.getFilePath(), move.to, "unresolved");
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
declaration.setModuleSpecifier(move.to);
|
|
112
|
+
recordIntroducedDependency(pendingDependencies, sourceFile.getFilePath(), root, originalSpecifier, move.to);
|
|
113
|
+
return originalSpecifier !== move.to;
|
|
114
|
+
}
|
|
115
|
+
if (namedImports.length === 0) {
|
|
116
|
+
warnings.push(`${sourceFile.getFilePath()}: cannot split default, namespace, or side-effect import from ${originalSpecifier}`);
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
const groups = new Map();
|
|
120
|
+
const movedImports = new Set();
|
|
121
|
+
for (const namedImport of namedImports) {
|
|
122
|
+
const importedName = namedImport.getName();
|
|
123
|
+
const resolved = resolveMigrationSymbolMove(move, importedName);
|
|
124
|
+
if (!resolved || resolved.to === originalSpecifier)
|
|
125
|
+
continue;
|
|
126
|
+
if (resolved.status === "planned") {
|
|
127
|
+
warnSkippedTarget(warnings, sourceFile.getFilePath(), resolved.to, "planned");
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (!targetExists(resolved.to)) {
|
|
131
|
+
warnSkippedTarget(warnings, sourceFile.getFilePath(), resolved.to, "unresolved");
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
const localName = namedImport.getAliasNode()?.getText() ?? importedName;
|
|
135
|
+
const group = groups.get(resolved.to) ?? [];
|
|
136
|
+
group.push(importedNameStructure(importedName, localName, resolved.name, !declaration.isTypeOnly() && namedImport.isTypeOnly()));
|
|
137
|
+
groups.set(resolved.to, group);
|
|
138
|
+
movedImports.add(namedImport);
|
|
139
|
+
recordIntroducedDependency(pendingDependencies, sourceFile.getFilePath(), root, originalSpecifier, resolved.to);
|
|
140
|
+
}
|
|
141
|
+
if (groups.size === 0)
|
|
142
|
+
return false;
|
|
143
|
+
const declarationIndex = declaration.getChildIndex();
|
|
144
|
+
for (const namedImport of movedImports)
|
|
145
|
+
namedImport.remove();
|
|
146
|
+
let offset = 1;
|
|
147
|
+
for (const [target, imports] of groups) {
|
|
148
|
+
sourceFile.insertImportDeclaration(declarationIndex + offset, {
|
|
149
|
+
moduleSpecifier: target,
|
|
150
|
+
isTypeOnly: declaration.isTypeOnly(),
|
|
151
|
+
namedImports: imports,
|
|
152
|
+
});
|
|
153
|
+
offset += 1;
|
|
154
|
+
}
|
|
155
|
+
if (declaration.getNamedImports().length === 0 &&
|
|
156
|
+
!declaration.getDefaultImport() &&
|
|
157
|
+
!declaration.getNamespaceImport()) {
|
|
158
|
+
declaration.remove();
|
|
159
|
+
}
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
function rewriteExportDeclarations(sourceFile, moves, root, pendingDependencies, warnings, targetExists) {
|
|
163
|
+
for (const declaration of [...sourceFile.getExportDeclarations()]) {
|
|
164
|
+
const originalSpecifier = declaration.getModuleSpecifierValue();
|
|
165
|
+
if (!originalSpecifier)
|
|
166
|
+
continue;
|
|
167
|
+
const move = moves[originalSpecifier];
|
|
168
|
+
if (!move)
|
|
169
|
+
continue;
|
|
170
|
+
const namedExports = declaration.getNamedExports();
|
|
171
|
+
if (!move.symbols) {
|
|
172
|
+
if (migrationMoveStatus(move) === "planned") {
|
|
173
|
+
warnSkippedTarget(warnings, sourceFile.getFilePath(), move.to, "planned");
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
if (!targetExists(move.to)) {
|
|
177
|
+
warnSkippedTarget(warnings, sourceFile.getFilePath(), move.to, "unresolved");
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
declaration.setModuleSpecifier(move.to);
|
|
181
|
+
recordIntroducedDependency(pendingDependencies, sourceFile.getFilePath(), root, originalSpecifier, move.to);
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
if (namedExports.length === 0) {
|
|
185
|
+
warnings.push(`${sourceFile.getFilePath()}: cannot split export star from ${originalSpecifier}`);
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
const groups = new Map();
|
|
189
|
+
const movedExports = new Set();
|
|
190
|
+
for (const namedExport of namedExports) {
|
|
191
|
+
const exportedFromName = namedExport.getName();
|
|
192
|
+
const resolved = resolveMigrationSymbolMove(move, exportedFromName);
|
|
193
|
+
if (!resolved || resolved.to === originalSpecifier)
|
|
194
|
+
continue;
|
|
195
|
+
if (resolved.status === "planned") {
|
|
196
|
+
warnSkippedTarget(warnings, sourceFile.getFilePath(), resolved.to, "planned");
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
if (!targetExists(resolved.to)) {
|
|
200
|
+
warnSkippedTarget(warnings, sourceFile.getFilePath(), resolved.to, "unresolved");
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
const publicName = namedExport.getAliasNode()?.getText() ?? exportedFromName;
|
|
204
|
+
const group = groups.get(resolved.to) ?? [];
|
|
205
|
+
group.push({
|
|
206
|
+
name: resolved.name,
|
|
207
|
+
alias: publicName !== resolved.name
|
|
208
|
+
? publicName
|
|
209
|
+
: exportedFromName !== resolved.name
|
|
210
|
+
? exportedFromName
|
|
211
|
+
: undefined,
|
|
212
|
+
isTypeOnly: !declaration.isTypeOnly() && namedExport.isTypeOnly()
|
|
213
|
+
? true
|
|
214
|
+
: undefined,
|
|
215
|
+
});
|
|
216
|
+
groups.set(resolved.to, group);
|
|
217
|
+
movedExports.add(namedExport);
|
|
218
|
+
recordIntroducedDependency(pendingDependencies, sourceFile.getFilePath(), root, originalSpecifier, resolved.to);
|
|
219
|
+
}
|
|
220
|
+
if (groups.size === 0)
|
|
221
|
+
continue;
|
|
222
|
+
const declarationIndex = declaration.getChildIndex();
|
|
223
|
+
for (const namedExport of movedExports)
|
|
224
|
+
namedExport.remove();
|
|
225
|
+
let offset = 1;
|
|
226
|
+
for (const [target, exports] of groups) {
|
|
227
|
+
sourceFile.insertExportDeclaration(declarationIndex + offset, {
|
|
228
|
+
moduleSpecifier: target,
|
|
229
|
+
isTypeOnly: declaration.isTypeOnly(),
|
|
230
|
+
namedExports: exports,
|
|
231
|
+
});
|
|
232
|
+
offset += 1;
|
|
233
|
+
}
|
|
234
|
+
if (declaration.getNamedExports().length === 0)
|
|
235
|
+
declaration.remove();
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function readPackageJson(packageFile) {
|
|
239
|
+
try {
|
|
240
|
+
return JSON.parse(fs.readFileSync(packageFile, "utf-8"));
|
|
241
|
+
}
|
|
242
|
+
catch {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
function addDependencies(pending, apply) {
|
|
247
|
+
const changes = [];
|
|
248
|
+
const byFile = new Map();
|
|
249
|
+
for (const entry of pending) {
|
|
250
|
+
const packages = byFile.get(entry.packageFile) ?? new Set();
|
|
251
|
+
packages.add(entry.packageName);
|
|
252
|
+
byFile.set(entry.packageFile, packages);
|
|
253
|
+
}
|
|
254
|
+
for (const [packageFile, packageNames] of byFile) {
|
|
255
|
+
const packageJson = readPackageJson(packageFile);
|
|
256
|
+
if (!packageJson)
|
|
257
|
+
continue;
|
|
258
|
+
const allDependencySections = [
|
|
259
|
+
"dependencies",
|
|
260
|
+
"devDependencies",
|
|
261
|
+
"optionalDependencies",
|
|
262
|
+
"peerDependencies",
|
|
263
|
+
];
|
|
264
|
+
const missing = [...packageNames].filter((packageName) => !allDependencySections.some((section) => {
|
|
265
|
+
const dependencies = packageJson[section];
|
|
266
|
+
return (dependencies &&
|
|
267
|
+
typeof dependencies === "object" &&
|
|
268
|
+
packageName in dependencies);
|
|
269
|
+
}));
|
|
270
|
+
if (missing.length === 0)
|
|
271
|
+
continue;
|
|
272
|
+
const before = `${JSON.stringify(packageJson, null, 2)}\n`;
|
|
273
|
+
const dependencies = packageJson.dependencies && typeof packageJson.dependencies === "object"
|
|
274
|
+
? packageJson.dependencies
|
|
275
|
+
: {};
|
|
276
|
+
for (const packageName of missing.sort())
|
|
277
|
+
dependencies[packageName] = "latest";
|
|
278
|
+
packageJson.dependencies = Object.fromEntries(Object.entries(dependencies).sort(([left], [right]) => left.localeCompare(right)));
|
|
279
|
+
const after = `${JSON.stringify(packageJson, null, 2)}\n`;
|
|
280
|
+
changes.push({ file: packageFile, before, after });
|
|
281
|
+
if (apply)
|
|
282
|
+
fs.writeFileSync(packageFile, after);
|
|
283
|
+
}
|
|
284
|
+
return changes;
|
|
285
|
+
}
|
|
286
|
+
export function runMigrationCodemods(options) {
|
|
287
|
+
const root = path.resolve(options.root);
|
|
288
|
+
const manifests = options.manifests ?? loadMigrationManifests(root);
|
|
289
|
+
const moves = mergeManifestMoves(manifests);
|
|
290
|
+
const requireFromProject = createRequire(path.join(root, "package.json"));
|
|
291
|
+
const targetExists = options.targetExists ??
|
|
292
|
+
((specifier) => {
|
|
293
|
+
try {
|
|
294
|
+
requireFromProject.resolve(specifier);
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
catch {
|
|
298
|
+
return false;
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
const project = new Project({
|
|
302
|
+
skipAddingFilesFromTsConfig: true,
|
|
303
|
+
manipulationSettings: { quoteKind: QuoteKind.Double },
|
|
304
|
+
});
|
|
305
|
+
const sourceFiles = project.addSourceFilesAtPaths(collectSourceFiles(root));
|
|
306
|
+
const pendingDependencies = [];
|
|
307
|
+
const warnings = [];
|
|
308
|
+
const changes = [];
|
|
309
|
+
for (const sourceFile of sourceFiles) {
|
|
310
|
+
const before = sourceFile.getFullText();
|
|
311
|
+
for (const declaration of [...sourceFile.getImportDeclarations()]) {
|
|
312
|
+
const move = moves[declaration.getModuleSpecifierValue()];
|
|
313
|
+
if (!move)
|
|
314
|
+
continue;
|
|
315
|
+
rewriteImportDeclaration(declaration, move, root, pendingDependencies, warnings, targetExists);
|
|
316
|
+
}
|
|
317
|
+
rewriteExportDeclarations(sourceFile, moves, root, pendingDependencies, warnings, targetExists);
|
|
318
|
+
const after = sourceFile.getFullText();
|
|
319
|
+
if (before === after)
|
|
320
|
+
continue;
|
|
321
|
+
changes.push({ file: sourceFile.getFilePath(), before, after });
|
|
322
|
+
if (options.apply)
|
|
323
|
+
sourceFile.saveSync();
|
|
324
|
+
}
|
|
325
|
+
const dependencyChanges = addDependencies(pendingDependencies, Boolean(options.apply));
|
|
326
|
+
return {
|
|
327
|
+
changes: [...changes, ...dependencyChanges],
|
|
328
|
+
dependencyFiles: dependencyChanges.map((change) => change.file),
|
|
329
|
+
warnings,
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
function focusedDiff(change, root) {
|
|
333
|
+
const beforeLines = change.before.split("\n");
|
|
334
|
+
const afterLines = change.after.split("\n");
|
|
335
|
+
let prefix = 0;
|
|
336
|
+
while (prefix < beforeLines.length &&
|
|
337
|
+
prefix < afterLines.length &&
|
|
338
|
+
beforeLines[prefix] === afterLines[prefix]) {
|
|
339
|
+
prefix += 1;
|
|
340
|
+
}
|
|
341
|
+
let suffix = 0;
|
|
342
|
+
while (suffix < beforeLines.length - prefix &&
|
|
343
|
+
suffix < afterLines.length - prefix &&
|
|
344
|
+
beforeLines[beforeLines.length - 1 - suffix] ===
|
|
345
|
+
afterLines[afterLines.length - 1 - suffix]) {
|
|
346
|
+
suffix += 1;
|
|
347
|
+
}
|
|
348
|
+
const beforeChanged = beforeLines.slice(prefix, beforeLines.length - suffix);
|
|
349
|
+
const afterChanged = afterLines.slice(prefix, afterLines.length - suffix);
|
|
350
|
+
return [
|
|
351
|
+
`--- ${path.relative(root, change.file)}`,
|
|
352
|
+
`+++ ${path.relative(root, change.file)}`,
|
|
353
|
+
`@@ -${prefix + 1} +${prefix + 1} @@`,
|
|
354
|
+
...beforeChanged.map((line) => `-${line}`),
|
|
355
|
+
...afterChanged.map((line) => `+${line}`),
|
|
356
|
+
].join("\n");
|
|
357
|
+
}
|
|
358
|
+
export function formatMigrationCodemodDiff(result, root) {
|
|
359
|
+
return result.changes
|
|
360
|
+
.map((change) => focusedDiff(change, path.resolve(root)))
|
|
361
|
+
.join("\n");
|
|
362
|
+
}
|
|
363
|
+
//# sourceMappingURL=migration-codemod.js.map
|