@agent-native/core 0.79.26 → 0.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +39 -0
- package/corpus/core/docs/content/a2a-protocol.mdx +97 -9
- package/corpus/core/docs/content/actions.mdx +65 -4
- package/corpus/core/docs/content/agent-mentions.mdx +68 -4
- package/corpus/core/docs/content/agent-surfaces.mdx +112 -8
- package/corpus/core/docs/content/agent-teams.mdx +171 -12
- package/corpus/core/docs/content/agent-web-surfaces.mdx +51 -4
- package/corpus/core/docs/content/authentication.mdx +122 -8
- package/corpus/core/docs/content/automations.mdx +110 -8
- package/corpus/core/docs/content/blueprint-installer.mdx +42 -4
- package/corpus/core/docs/content/cli-adapters.mdx +44 -4
- package/corpus/core/docs/content/client.mdx +79 -8
- package/corpus/core/docs/content/cloneable-saas.mdx +85 -8
- package/corpus/core/docs/content/code-agents-ui.mdx +98 -8
- package/corpus/core/docs/content/components.mdx +118 -8
- package/corpus/core/docs/content/context-awareness.mdx +98 -8
- package/corpus/core/docs/content/creating-templates.mdx +49 -4
- package/corpus/core/docs/content/cross-app-sso.mdx +109 -8
- package/corpus/core/docs/content/database.mdx +56 -4
- package/corpus/core/docs/content/deployment.mdx +103 -8
- package/corpus/core/docs/content/dispatch.mdx +134 -8
- package/corpus/core/docs/content/drop-in-agent.mdx +63 -4
- package/corpus/core/docs/content/durable-background-runs.mdx +98 -8
- package/corpus/core/docs/content/durable-resume.mdx +47 -4
- package/corpus/core/docs/content/embedding-sdk.mdx +83 -8
- package/corpus/core/docs/content/evals.mdx +102 -8
- package/corpus/core/docs/content/extensions.mdx +113 -9
- package/corpus/core/docs/content/external-agents.mdx +119 -8
- package/corpus/core/docs/content/faq.mdx +98 -8
- package/corpus/core/docs/content/file-uploads.mdx +61 -4
- package/corpus/core/docs/content/frames.mdx +90 -8
- package/corpus/core/docs/content/generative-ui.mdx +50 -4
- package/corpus/core/docs/content/getting-started.mdx +34 -4
- package/corpus/core/docs/content/harness-agents.mdx +77 -8
- package/corpus/core/docs/content/human-approval.mdx +50 -4
- package/corpus/core/docs/content/key-concepts.mdx +102 -8
- package/corpus/core/docs/content/local-file-mode.mdx +58 -4
- package/corpus/core/docs/content/locales/ar-SA/a2a-protocol.mdx +97 -9
- package/corpus/core/docs/content/locales/ar-SA/actions.mdx +65 -4
- package/corpus/core/docs/content/locales/ar-SA/agent-mentions.mdx +68 -4
- package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +114 -8
- package/corpus/core/docs/content/locales/ar-SA/agent-teams.mdx +174 -12
- package/corpus/core/docs/content/locales/ar-SA/agent-web-surfaces.mdx +49 -4
- package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +120 -8
- package/corpus/core/docs/content/locales/ar-SA/automations.mdx +110 -8
- package/corpus/core/docs/content/locales/ar-SA/blueprint-installer.mdx +42 -4
- package/corpus/core/docs/content/locales/ar-SA/cli-adapters.mdx +40 -4
- package/corpus/core/docs/content/locales/ar-SA/client.mdx +80 -8
- package/corpus/core/docs/content/locales/ar-SA/cloneable-saas.mdx +85 -8
- package/corpus/core/docs/content/locales/ar-SA/code-agents-ui.mdx +99 -8
- package/corpus/core/docs/content/locales/ar-SA/components.mdx +114 -8
- package/corpus/core/docs/content/locales/ar-SA/context-awareness.mdx +100 -8
- package/corpus/core/docs/content/locales/ar-SA/creating-templates.mdx +51 -4
- package/corpus/core/docs/content/locales/ar-SA/cross-app-sso.mdx +109 -8
- package/corpus/core/docs/content/locales/ar-SA/database.mdx +52 -4
- package/corpus/core/docs/content/locales/ar-SA/deployment.mdx +103 -8
- package/corpus/core/docs/content/locales/ar-SA/dispatch.mdx +134 -8
- package/corpus/core/docs/content/locales/ar-SA/drop-in-agent.mdx +63 -4
- package/corpus/core/docs/content/locales/ar-SA/durable-resume.mdx +47 -4
- package/corpus/core/docs/content/locales/ar-SA/embedding-sdk.mdx +83 -8
- package/corpus/core/docs/content/locales/ar-SA/evals.mdx +102 -8
- package/corpus/core/docs/content/locales/ar-SA/extensions.mdx +113 -9
- package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +119 -8
- package/corpus/core/docs/content/locales/ar-SA/faq.mdx +98 -8
- package/corpus/core/docs/content/locales/ar-SA/file-uploads.mdx +61 -4
- package/corpus/core/docs/content/locales/ar-SA/frames.mdx +88 -8
- package/corpus/core/docs/content/locales/ar-SA/getting-started.mdx +34 -4
- package/corpus/core/docs/content/locales/ar-SA/harness-agents.mdx +79 -8
- package/corpus/core/docs/content/locales/ar-SA/human-approval.mdx +50 -4
- package/corpus/core/docs/content/locales/ar-SA/key-concepts.mdx +107 -8
- package/corpus/core/docs/content/locales/ar-SA/local-file-mode.mdx +56 -4
- package/corpus/core/docs/content/locales/ar-SA/mcp-apps.mdx +120 -10
- package/corpus/core/docs/content/locales/ar-SA/mcp-clients.mdx +133 -8
- package/corpus/core/docs/content/locales/ar-SA/mcp-protocol.mdx +105 -8
- package/corpus/core/docs/content/locales/ar-SA/messaging.mdx +115 -8
- package/corpus/core/docs/content/locales/ar-SA/migration-workbench.mdx +47 -4
- package/corpus/core/docs/content/locales/ar-SA/multi-app-workspace.mdx +91 -8
- package/corpus/core/docs/content/locales/ar-SA/multi-tenancy.mdx +80 -8
- package/corpus/core/docs/content/locales/ar-SA/native-chat-ui.mdx +104 -8
- package/corpus/core/docs/content/locales/ar-SA/notifications.mdx +135 -8
- package/corpus/core/docs/content/locales/ar-SA/observability.mdx +102 -8
- package/corpus/core/docs/content/locales/ar-SA/observational-memory.mdx +87 -8
- package/corpus/core/docs/content/locales/ar-SA/onboarding.mdx +45 -4
- package/corpus/core/docs/content/locales/ar-SA/plan-plugin.mdx +99 -8
- package/corpus/core/docs/content/locales/ar-SA/pr-visual-recap.mdx +125 -8
- package/corpus/core/docs/content/locales/ar-SA/processors.mdx +41 -4
- package/corpus/core/docs/content/locales/ar-SA/progress.mdx +46 -4
- package/corpus/core/docs/content/locales/ar-SA/pure-agent-apps.mdx +48 -4
- package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +102 -8
- package/corpus/core/docs/content/locales/ar-SA/recurring-jobs.mdx +59 -4
- package/corpus/core/docs/content/locales/ar-SA/routing.mdx +44 -5
- package/corpus/core/docs/content/locales/ar-SA/sandbox-adapters.mdx +43 -4
- package/corpus/core/docs/content/locales/ar-SA/security.mdx +80 -8
- package/corpus/core/docs/content/locales/ar-SA/server.mdx +173 -12
- package/corpus/core/docs/content/locales/ar-SA/sharing.mdx +45 -4
- package/corpus/core/docs/content/locales/ar-SA/skills-guide.mdx +118 -9
- package/corpus/core/docs/content/locales/ar-SA/template-analytics.mdx +46 -4
- package/corpus/core/docs/content/locales/ar-SA/template-assets.mdx +62 -4
- package/corpus/core/docs/content/locales/ar-SA/template-brain.mdx +65 -4
- package/corpus/core/docs/content/locales/ar-SA/template-calendar.mdx +62 -4
- package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +61 -4
- package/corpus/core/docs/content/locales/ar-SA/template-clips.mdx +52 -4
- package/corpus/core/docs/content/locales/ar-SA/template-content.mdx +62 -4
- package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +101 -4
- package/corpus/core/docs/content/locales/ar-SA/template-dispatch.mdx +57 -4
- package/corpus/core/docs/content/locales/ar-SA/template-forms.mdx +62 -4
- package/corpus/core/docs/content/locales/ar-SA/template-mail.mdx +60 -4
- package/corpus/core/docs/content/locales/ar-SA/template-plan.mdx +61 -4
- package/corpus/core/docs/content/locales/ar-SA/template-slides.mdx +49 -4
- package/corpus/core/docs/content/locales/ar-SA/template-videos.mdx +53 -4
- package/corpus/core/docs/content/locales/ar-SA/tracking.mdx +54 -4
- package/corpus/core/docs/content/locales/ar-SA/using-your-agent.mdx +51 -4
- package/corpus/core/docs/content/locales/ar-SA/voice-input.mdx +43 -4
- package/corpus/core/docs/content/locales/ar-SA/what-is-agent-native.mdx +96 -8
- package/corpus/core/docs/content/locales/ar-SA/workspace-connections.mdx +128 -8
- package/corpus/core/docs/content/locales/ar-SA/workspace-management.mdx +50 -4
- package/corpus/core/docs/content/locales/ar-SA/workspace.mdx +112 -8
- package/corpus/core/docs/content/locales/ar-SA/writing-agent-instructions.mdx +41 -4
- package/corpus/core/docs/content/locales/de-DE/a2a-protocol.mdx +99 -9
- package/corpus/core/docs/content/locales/de-DE/actions.mdx +67 -4
- package/corpus/core/docs/content/locales/de-DE/agent-mentions.mdx +68 -4
- package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +116 -8
- package/corpus/core/docs/content/locales/de-DE/agent-teams.mdx +171 -12
- package/corpus/core/docs/content/locales/de-DE/agent-web-surfaces.mdx +51 -4
- package/corpus/core/docs/content/locales/de-DE/authentication.mdx +122 -8
- package/corpus/core/docs/content/locales/de-DE/automations.mdx +110 -8
- package/corpus/core/docs/content/locales/de-DE/blueprint-installer.mdx +42 -4
- package/corpus/core/docs/content/locales/de-DE/cli-adapters.mdx +44 -4
- package/corpus/core/docs/content/locales/de-DE/client.mdx +79 -8
- package/corpus/core/docs/content/locales/de-DE/cloneable-saas.mdx +85 -8
- package/corpus/core/docs/content/locales/de-DE/code-agents-ui.mdx +100 -8
- package/corpus/core/docs/content/locales/de-DE/components.mdx +118 -8
- package/corpus/core/docs/content/locales/de-DE/context-awareness.mdx +98 -8
- package/corpus/core/docs/content/locales/de-DE/creating-templates.mdx +51 -4
- package/corpus/core/docs/content/locales/de-DE/cross-app-sso.mdx +109 -8
- package/corpus/core/docs/content/locales/de-DE/database.mdx +52 -4
- package/corpus/core/docs/content/locales/de-DE/deployment.mdx +103 -8
- package/corpus/core/docs/content/locales/de-DE/dispatch.mdx +134 -8
- package/corpus/core/docs/content/locales/de-DE/drop-in-agent.mdx +63 -4
- package/corpus/core/docs/content/locales/de-DE/durable-resume.mdx +47 -4
- package/corpus/core/docs/content/locales/de-DE/embedding-sdk.mdx +85 -8
- package/corpus/core/docs/content/locales/de-DE/evals.mdx +102 -8
- package/corpus/core/docs/content/locales/de-DE/extensions.mdx +113 -9
- package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +119 -8
- package/corpus/core/docs/content/locales/de-DE/faq.mdx +98 -8
- package/corpus/core/docs/content/locales/de-DE/file-uploads.mdx +61 -4
- package/corpus/core/docs/content/locales/de-DE/frames.mdx +88 -8
- package/corpus/core/docs/content/locales/de-DE/getting-started.mdx +34 -4
- package/corpus/core/docs/content/locales/de-DE/harness-agents.mdx +79 -8
- package/corpus/core/docs/content/locales/de-DE/human-approval.mdx +50 -4
- package/corpus/core/docs/content/locales/de-DE/key-concepts.mdx +104 -8
- package/corpus/core/docs/content/locales/de-DE/local-file-mode.mdx +58 -4
- package/corpus/core/docs/content/locales/de-DE/mcp-apps.mdx +120 -10
- package/corpus/core/docs/content/locales/de-DE/mcp-clients.mdx +133 -8
- package/corpus/core/docs/content/locales/de-DE/mcp-protocol.mdx +105 -8
- package/corpus/core/docs/content/locales/de-DE/messaging.mdx +115 -8
- package/corpus/core/docs/content/locales/de-DE/migration-workbench.mdx +47 -4
- package/corpus/core/docs/content/locales/de-DE/multi-app-workspace.mdx +91 -8
- package/corpus/core/docs/content/locales/de-DE/multi-tenancy.mdx +80 -8
- package/corpus/core/docs/content/locales/de-DE/native-chat-ui.mdx +108 -8
- package/corpus/core/docs/content/locales/de-DE/notifications.mdx +135 -8
- package/corpus/core/docs/content/locales/de-DE/observability.mdx +102 -8
- package/corpus/core/docs/content/locales/de-DE/observational-memory.mdx +92 -8
- package/corpus/core/docs/content/locales/de-DE/onboarding.mdx +45 -4
- package/corpus/core/docs/content/locales/de-DE/plan-plugin.mdx +99 -8
- package/corpus/core/docs/content/locales/de-DE/pr-visual-recap.mdx +125 -8
- package/corpus/core/docs/content/locales/de-DE/processors.mdx +41 -4
- package/corpus/core/docs/content/locales/de-DE/progress.mdx +46 -4
- package/corpus/core/docs/content/locales/de-DE/pure-agent-apps.mdx +50 -4
- package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +104 -8
- package/corpus/core/docs/content/locales/de-DE/recurring-jobs.mdx +59 -4
- package/corpus/core/docs/content/locales/de-DE/routing.mdx +44 -5
- package/corpus/core/docs/content/locales/de-DE/sandbox-adapters.mdx +43 -4
- package/corpus/core/docs/content/locales/de-DE/security.mdx +80 -8
- package/corpus/core/docs/content/locales/de-DE/server.mdx +171 -12
- package/corpus/core/docs/content/locales/de-DE/sharing.mdx +45 -4
- package/corpus/core/docs/content/locales/de-DE/skills-guide.mdx +118 -9
- package/corpus/core/docs/content/locales/de-DE/template-analytics.mdx +46 -4
- package/corpus/core/docs/content/locales/de-DE/template-assets.mdx +62 -4
- package/corpus/core/docs/content/locales/de-DE/template-brain.mdx +69 -4
- package/corpus/core/docs/content/locales/de-DE/template-calendar.mdx +62 -4
- package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +61 -4
- package/corpus/core/docs/content/locales/de-DE/template-clips.mdx +52 -4
- package/corpus/core/docs/content/locales/de-DE/template-content.mdx +60 -4
- package/corpus/core/docs/content/locales/de-DE/template-design.mdx +109 -4
- package/corpus/core/docs/content/locales/de-DE/template-dispatch.mdx +57 -4
- package/corpus/core/docs/content/locales/de-DE/template-forms.mdx +64 -4
- package/corpus/core/docs/content/locales/de-DE/template-mail.mdx +60 -4
- package/corpus/core/docs/content/locales/de-DE/template-plan.mdx +63 -4
- package/corpus/core/docs/content/locales/de-DE/template-slides.mdx +49 -4
- package/corpus/core/docs/content/locales/de-DE/template-videos.mdx +53 -4
- package/corpus/core/docs/content/locales/de-DE/tracking.mdx +54 -4
- package/corpus/core/docs/content/locales/de-DE/using-your-agent.mdx +51 -4
- package/corpus/core/docs/content/locales/de-DE/voice-input.mdx +45 -4
- package/corpus/core/docs/content/locales/de-DE/what-is-agent-native.mdx +100 -8
- package/corpus/core/docs/content/locales/de-DE/workspace-connections.mdx +128 -8
- package/corpus/core/docs/content/locales/de-DE/workspace-management.mdx +50 -4
- package/corpus/core/docs/content/locales/de-DE/workspace.mdx +111 -8
- package/corpus/core/docs/content/locales/de-DE/writing-agent-instructions.mdx +45 -4
- package/corpus/core/docs/content/locales/es-ES/a2a-protocol.mdx +99 -9
- package/corpus/core/docs/content/locales/es-ES/actions.mdx +67 -4
- package/corpus/core/docs/content/locales/es-ES/agent-mentions.mdx +68 -4
- package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +120 -8
- package/corpus/core/docs/content/locales/es-ES/agent-teams.mdx +172 -12
- package/corpus/core/docs/content/locales/es-ES/agent-web-surfaces.mdx +51 -4
- package/corpus/core/docs/content/locales/es-ES/authentication.mdx +122 -8
- package/corpus/core/docs/content/locales/es-ES/automations.mdx +110 -8
- package/corpus/core/docs/content/locales/es-ES/blueprint-installer.mdx +42 -4
- package/corpus/core/docs/content/locales/es-ES/cli-adapters.mdx +44 -4
- package/corpus/core/docs/content/locales/es-ES/client.mdx +79 -8
- package/corpus/core/docs/content/locales/es-ES/cloneable-saas.mdx +85 -8
- package/corpus/core/docs/content/locales/es-ES/code-agents-ui.mdx +101 -8
- package/corpus/core/docs/content/locales/es-ES/components.mdx +118 -8
- package/corpus/core/docs/content/locales/es-ES/context-awareness.mdx +98 -8
- package/corpus/core/docs/content/locales/es-ES/creating-templates.mdx +51 -4
- package/corpus/core/docs/content/locales/es-ES/cross-app-sso.mdx +109 -8
- package/corpus/core/docs/content/locales/es-ES/database.mdx +52 -4
- package/corpus/core/docs/content/locales/es-ES/deployment.mdx +103 -8
- package/corpus/core/docs/content/locales/es-ES/dispatch.mdx +134 -8
- package/corpus/core/docs/content/locales/es-ES/drop-in-agent.mdx +63 -4
- package/corpus/core/docs/content/locales/es-ES/durable-resume.mdx +47 -4
- package/corpus/core/docs/content/locales/es-ES/embedding-sdk.mdx +87 -8
- package/corpus/core/docs/content/locales/es-ES/evals.mdx +102 -8
- package/corpus/core/docs/content/locales/es-ES/extensions.mdx +113 -9
- package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +119 -8
- package/corpus/core/docs/content/locales/es-ES/faq.mdx +98 -8
- package/corpus/core/docs/content/locales/es-ES/file-uploads.mdx +61 -4
- package/corpus/core/docs/content/locales/es-ES/frames.mdx +88 -8
- package/corpus/core/docs/content/locales/es-ES/getting-started.mdx +34 -4
- package/corpus/core/docs/content/locales/es-ES/harness-agents.mdx +79 -8
- package/corpus/core/docs/content/locales/es-ES/human-approval.mdx +50 -4
- package/corpus/core/docs/content/locales/es-ES/key-concepts.mdx +104 -8
- package/corpus/core/docs/content/locales/es-ES/local-file-mode.mdx +60 -4
- package/corpus/core/docs/content/locales/es-ES/mcp-apps.mdx +120 -10
- package/corpus/core/docs/content/locales/es-ES/mcp-clients.mdx +135 -8
- package/corpus/core/docs/content/locales/es-ES/mcp-protocol.mdx +105 -8
- package/corpus/core/docs/content/locales/es-ES/messaging.mdx +115 -8
- package/corpus/core/docs/content/locales/es-ES/migration-workbench.mdx +47 -4
- package/corpus/core/docs/content/locales/es-ES/multi-app-workspace.mdx +91 -8
- package/corpus/core/docs/content/locales/es-ES/multi-tenancy.mdx +80 -8
- package/corpus/core/docs/content/locales/es-ES/native-chat-ui.mdx +108 -8
- package/corpus/core/docs/content/locales/es-ES/notifications.mdx +135 -8
- package/corpus/core/docs/content/locales/es-ES/observability.mdx +104 -8
- package/corpus/core/docs/content/locales/es-ES/observational-memory.mdx +92 -8
- package/corpus/core/docs/content/locales/es-ES/onboarding.mdx +45 -4
- package/corpus/core/docs/content/locales/es-ES/plan-plugin.mdx +99 -8
- package/corpus/core/docs/content/locales/es-ES/pr-visual-recap.mdx +125 -8
- package/corpus/core/docs/content/locales/es-ES/processors.mdx +41 -4
- package/corpus/core/docs/content/locales/es-ES/progress.mdx +46 -4
- package/corpus/core/docs/content/locales/es-ES/pure-agent-apps.mdx +50 -4
- package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +109 -8
- package/corpus/core/docs/content/locales/es-ES/recurring-jobs.mdx +59 -4
- package/corpus/core/docs/content/locales/es-ES/routing.mdx +44 -5
- package/corpus/core/docs/content/locales/es-ES/sandbox-adapters.mdx +44 -4
- package/corpus/core/docs/content/locales/es-ES/security.mdx +82 -8
- package/corpus/core/docs/content/locales/es-ES/server.mdx +173 -12
- package/corpus/core/docs/content/locales/es-ES/sharing.mdx +45 -4
- package/corpus/core/docs/content/locales/es-ES/skills-guide.mdx +118 -9
- package/corpus/core/docs/content/locales/es-ES/template-analytics.mdx +46 -4
- package/corpus/core/docs/content/locales/es-ES/template-assets.mdx +64 -4
- package/corpus/core/docs/content/locales/es-ES/template-brain.mdx +69 -4
- package/corpus/core/docs/content/locales/es-ES/template-calendar.mdx +62 -4
- package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +61 -4
- package/corpus/core/docs/content/locales/es-ES/template-clips.mdx +52 -4
- package/corpus/core/docs/content/locales/es-ES/template-content.mdx +64 -4
- package/corpus/core/docs/content/locales/es-ES/template-design.mdx +108 -4
- package/corpus/core/docs/content/locales/es-ES/template-dispatch.mdx +57 -4
- package/corpus/core/docs/content/locales/es-ES/template-forms.mdx +64 -4
- package/corpus/core/docs/content/locales/es-ES/template-mail.mdx +60 -4
- package/corpus/core/docs/content/locales/es-ES/template-plan.mdx +61 -4
- package/corpus/core/docs/content/locales/es-ES/template-slides.mdx +49 -4
- package/corpus/core/docs/content/locales/es-ES/template-videos.mdx +53 -4
- package/corpus/core/docs/content/locales/es-ES/tracking.mdx +54 -4
- package/corpus/core/docs/content/locales/es-ES/using-your-agent.mdx +51 -4
- package/corpus/core/docs/content/locales/es-ES/voice-input.mdx +45 -4
- package/corpus/core/docs/content/locales/es-ES/what-is-agent-native.mdx +99 -8
- package/corpus/core/docs/content/locales/es-ES/workspace-connections.mdx +128 -8
- package/corpus/core/docs/content/locales/es-ES/workspace-management.mdx +50 -4
- package/corpus/core/docs/content/locales/es-ES/workspace.mdx +112 -8
- package/corpus/core/docs/content/locales/es-ES/writing-agent-instructions.mdx +46 -4
- package/corpus/core/docs/content/locales/fr-FR/a2a-protocol.mdx +97 -9
- package/corpus/core/docs/content/locales/fr-FR/actions.mdx +67 -4
- package/corpus/core/docs/content/locales/fr-FR/agent-mentions.mdx +68 -4
- package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +118 -8
- package/corpus/core/docs/content/locales/fr-FR/agent-teams.mdx +172 -12
- package/corpus/core/docs/content/locales/fr-FR/agent-web-surfaces.mdx +51 -4
- package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +122 -8
- package/corpus/core/docs/content/locales/fr-FR/automations.mdx +110 -8
- package/corpus/core/docs/content/locales/fr-FR/blueprint-installer.mdx +42 -4
- package/corpus/core/docs/content/locales/fr-FR/cli-adapters.mdx +44 -4
- package/corpus/core/docs/content/locales/fr-FR/client.mdx +81 -8
- package/corpus/core/docs/content/locales/fr-FR/cloneable-saas.mdx +85 -8
- package/corpus/core/docs/content/locales/fr-FR/code-agents-ui.mdx +102 -8
- package/corpus/core/docs/content/locales/fr-FR/components.mdx +118 -8
- package/corpus/core/docs/content/locales/fr-FR/context-awareness.mdx +98 -8
- package/corpus/core/docs/content/locales/fr-FR/creating-templates.mdx +49 -4
- package/corpus/core/docs/content/locales/fr-FR/cross-app-sso.mdx +109 -8
- package/corpus/core/docs/content/locales/fr-FR/database.mdx +52 -4
- package/corpus/core/docs/content/locales/fr-FR/deployment.mdx +103 -8
- package/corpus/core/docs/content/locales/fr-FR/dispatch.mdx +134 -8
- package/corpus/core/docs/content/locales/fr-FR/drop-in-agent.mdx +63 -4
- package/corpus/core/docs/content/locales/fr-FR/durable-resume.mdx +47 -4
- package/corpus/core/docs/content/locales/fr-FR/embedding-sdk.mdx +87 -8
- package/corpus/core/docs/content/locales/fr-FR/evals.mdx +102 -8
- package/corpus/core/docs/content/locales/fr-FR/extensions.mdx +113 -9
- package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +119 -8
- package/corpus/core/docs/content/locales/fr-FR/faq.mdx +98 -8
- package/corpus/core/docs/content/locales/fr-FR/file-uploads.mdx +61 -4
- package/corpus/core/docs/content/locales/fr-FR/frames.mdx +90 -8
- package/corpus/core/docs/content/locales/fr-FR/getting-started.mdx +34 -4
- package/corpus/core/docs/content/locales/fr-FR/harness-agents.mdx +77 -8
- package/corpus/core/docs/content/locales/fr-FR/human-approval.mdx +50 -4
- package/corpus/core/docs/content/locales/fr-FR/key-concepts.mdx +106 -8
- package/corpus/core/docs/content/locales/fr-FR/local-file-mode.mdx +58 -4
- package/corpus/core/docs/content/locales/fr-FR/mcp-apps.mdx +120 -10
- package/corpus/core/docs/content/locales/fr-FR/mcp-clients.mdx +135 -8
- package/corpus/core/docs/content/locales/fr-FR/mcp-protocol.mdx +105 -8
- package/corpus/core/docs/content/locales/fr-FR/messaging.mdx +115 -8
- package/corpus/core/docs/content/locales/fr-FR/migration-workbench.mdx +47 -4
- package/corpus/core/docs/content/locales/fr-FR/multi-app-workspace.mdx +91 -8
- package/corpus/core/docs/content/locales/fr-FR/multi-tenancy.mdx +80 -8
- package/corpus/core/docs/content/locales/fr-FR/native-chat-ui.mdx +108 -8
- package/corpus/core/docs/content/locales/fr-FR/notifications.mdx +135 -8
- package/corpus/core/docs/content/locales/fr-FR/observability.mdx +104 -8
- package/corpus/core/docs/content/locales/fr-FR/observational-memory.mdx +89 -8
- package/corpus/core/docs/content/locales/fr-FR/onboarding.mdx +45 -4
- package/corpus/core/docs/content/locales/fr-FR/plan-plugin.mdx +99 -8
- package/corpus/core/docs/content/locales/fr-FR/pr-visual-recap.mdx +126 -8
- package/corpus/core/docs/content/locales/fr-FR/processors.mdx +41 -4
- package/corpus/core/docs/content/locales/fr-FR/progress.mdx +46 -4
- package/corpus/core/docs/content/locales/fr-FR/pure-agent-apps.mdx +48 -4
- package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +107 -8
- package/corpus/core/docs/content/locales/fr-FR/recurring-jobs.mdx +59 -4
- package/corpus/core/docs/content/locales/fr-FR/routing.mdx +44 -5
- package/corpus/core/docs/content/locales/fr-FR/sandbox-adapters.mdx +44 -4
- package/corpus/core/docs/content/locales/fr-FR/security.mdx +82 -8
- package/corpus/core/docs/content/locales/fr-FR/server.mdx +173 -12
- package/corpus/core/docs/content/locales/fr-FR/sharing.mdx +45 -4
- package/corpus/core/docs/content/locales/fr-FR/skills-guide.mdx +118 -9
- package/corpus/core/docs/content/locales/fr-FR/template-analytics.mdx +46 -4
- package/corpus/core/docs/content/locales/fr-FR/template-assets.mdx +66 -4
- package/corpus/core/docs/content/locales/fr-FR/template-brain.mdx +69 -4
- package/corpus/core/docs/content/locales/fr-FR/template-calendar.mdx +62 -4
- package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +61 -4
- package/corpus/core/docs/content/locales/fr-FR/template-clips.mdx +52 -4
- package/corpus/core/docs/content/locales/fr-FR/template-content.mdx +64 -4
- package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +107 -4
- package/corpus/core/docs/content/locales/fr-FR/template-dispatch.mdx +57 -4
- package/corpus/core/docs/content/locales/fr-FR/template-forms.mdx +64 -4
- package/corpus/core/docs/content/locales/fr-FR/template-mail.mdx +60 -4
- package/corpus/core/docs/content/locales/fr-FR/template-plan.mdx +61 -4
- package/corpus/core/docs/content/locales/fr-FR/template-slides.mdx +49 -4
- package/corpus/core/docs/content/locales/fr-FR/template-videos.mdx +53 -4
- package/corpus/core/docs/content/locales/fr-FR/tracking.mdx +54 -4
- package/corpus/core/docs/content/locales/fr-FR/using-your-agent.mdx +51 -4
- package/corpus/core/docs/content/locales/fr-FR/voice-input.mdx +45 -4
- package/corpus/core/docs/content/locales/fr-FR/what-is-agent-native.mdx +101 -8
- package/corpus/core/docs/content/locales/fr-FR/workspace-connections.mdx +128 -8
- package/corpus/core/docs/content/locales/fr-FR/workspace-management.mdx +50 -4
- package/corpus/core/docs/content/locales/fr-FR/workspace.mdx +112 -8
- package/corpus/core/docs/content/locales/fr-FR/writing-agent-instructions.mdx +47 -4
- package/corpus/core/docs/content/locales/hi-IN/a2a-protocol.mdx +97 -9
- package/corpus/core/docs/content/locales/hi-IN/actions.mdx +63 -4
- package/corpus/core/docs/content/locales/hi-IN/agent-mentions.mdx +68 -4
- package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +112 -8
- package/corpus/core/docs/content/locales/hi-IN/agent-teams.mdx +171 -12
- package/corpus/core/docs/content/locales/hi-IN/agent-web-surfaces.mdx +51 -4
- package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +122 -8
- package/corpus/core/docs/content/locales/hi-IN/automations.mdx +110 -8
- package/corpus/core/docs/content/locales/hi-IN/blueprint-installer.mdx +42 -4
- package/corpus/core/docs/content/locales/hi-IN/cli-adapters.mdx +44 -4
- package/corpus/core/docs/content/locales/hi-IN/client.mdx +79 -8
- package/corpus/core/docs/content/locales/hi-IN/cloneable-saas.mdx +85 -8
- package/corpus/core/docs/content/locales/hi-IN/code-agents-ui.mdx +96 -8
- package/corpus/core/docs/content/locales/hi-IN/components.mdx +114 -8
- package/corpus/core/docs/content/locales/hi-IN/context-awareness.mdx +102 -8
- package/corpus/core/docs/content/locales/hi-IN/creating-templates.mdx +53 -4
- package/corpus/core/docs/content/locales/hi-IN/cross-app-sso.mdx +109 -8
- package/corpus/core/docs/content/locales/hi-IN/database.mdx +52 -4
- package/corpus/core/docs/content/locales/hi-IN/deployment.mdx +103 -8
- package/corpus/core/docs/content/locales/hi-IN/dispatch.mdx +134 -8
- package/corpus/core/docs/content/locales/hi-IN/drop-in-agent.mdx +63 -4
- package/corpus/core/docs/content/locales/hi-IN/durable-resume.mdx +47 -4
- package/corpus/core/docs/content/locales/hi-IN/embedding-sdk.mdx +83 -8
- package/corpus/core/docs/content/locales/hi-IN/evals.mdx +100 -8
- package/corpus/core/docs/content/locales/hi-IN/extensions.mdx +113 -9
- package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +119 -8
- package/corpus/core/docs/content/locales/hi-IN/faq.mdx +96 -8
- package/corpus/core/docs/content/locales/hi-IN/file-uploads.mdx +61 -4
- package/corpus/core/docs/content/locales/hi-IN/frames.mdx +88 -8
- package/corpus/core/docs/content/locales/hi-IN/getting-started.mdx +34 -4
- package/corpus/core/docs/content/locales/hi-IN/harness-agents.mdx +77 -8
- package/corpus/core/docs/content/locales/hi-IN/human-approval.mdx +51 -4
- package/corpus/core/docs/content/locales/hi-IN/key-concepts.mdx +104 -8
- package/corpus/core/docs/content/locales/hi-IN/local-file-mode.mdx +58 -4
- package/corpus/core/docs/content/locales/hi-IN/mcp-apps.mdx +120 -10
- package/corpus/core/docs/content/locales/hi-IN/mcp-clients.mdx +133 -8
- package/corpus/core/docs/content/locales/hi-IN/mcp-protocol.mdx +105 -8
- package/corpus/core/docs/content/locales/hi-IN/messaging.mdx +115 -8
- package/corpus/core/docs/content/locales/hi-IN/migration-workbench.mdx +45 -4
- package/corpus/core/docs/content/locales/hi-IN/multi-app-workspace.mdx +91 -8
- package/corpus/core/docs/content/locales/hi-IN/multi-tenancy.mdx +80 -8
- package/corpus/core/docs/content/locales/hi-IN/native-chat-ui.mdx +106 -8
- package/corpus/core/docs/content/locales/hi-IN/notifications.mdx +135 -8
- package/corpus/core/docs/content/locales/hi-IN/observability.mdx +102 -8
- package/corpus/core/docs/content/locales/hi-IN/observational-memory.mdx +89 -8
- package/corpus/core/docs/content/locales/hi-IN/onboarding.mdx +45 -4
- package/corpus/core/docs/content/locales/hi-IN/plan-plugin.mdx +99 -8
- package/corpus/core/docs/content/locales/hi-IN/pr-visual-recap.mdx +126 -8
- package/corpus/core/docs/content/locales/hi-IN/processors.mdx +41 -4
- package/corpus/core/docs/content/locales/hi-IN/progress.mdx +46 -4
- package/corpus/core/docs/content/locales/hi-IN/pure-agent-apps.mdx +48 -4
- package/corpus/core/docs/content/locales/hi-IN/real-time-collaboration.mdx +106 -8
- package/corpus/core/docs/content/locales/hi-IN/recurring-jobs.mdx +59 -4
- package/corpus/core/docs/content/locales/hi-IN/routing.mdx +44 -5
- package/corpus/core/docs/content/locales/hi-IN/sandbox-adapters.mdx +43 -4
- package/corpus/core/docs/content/locales/hi-IN/security.mdx +78 -8
- package/corpus/core/docs/content/locales/hi-IN/server.mdx +169 -12
- package/corpus/core/docs/content/locales/hi-IN/sharing.mdx +45 -4
- package/corpus/core/docs/content/locales/hi-IN/skills-guide.mdx +118 -9
- package/corpus/core/docs/content/locales/hi-IN/template-analytics.mdx +46 -4
- package/corpus/core/docs/content/locales/hi-IN/template-assets.mdx +62 -4
- package/corpus/core/docs/content/locales/hi-IN/template-brain.mdx +69 -4
- package/corpus/core/docs/content/locales/hi-IN/template-calendar.mdx +62 -4
- package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +59 -4
- package/corpus/core/docs/content/locales/hi-IN/template-clips.mdx +52 -4
- package/corpus/core/docs/content/locales/hi-IN/template-content.mdx +62 -4
- package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +102 -4
- package/corpus/core/docs/content/locales/hi-IN/template-dispatch.mdx +57 -4
- package/corpus/core/docs/content/locales/hi-IN/template-forms.mdx +64 -4
- package/corpus/core/docs/content/locales/hi-IN/template-mail.mdx +64 -4
- package/corpus/core/docs/content/locales/hi-IN/template-plan.mdx +61 -4
- package/corpus/core/docs/content/locales/hi-IN/template-slides.mdx +49 -4
- package/corpus/core/docs/content/locales/hi-IN/template-videos.mdx +53 -4
- package/corpus/core/docs/content/locales/hi-IN/tracking.mdx +54 -4
- package/corpus/core/docs/content/locales/hi-IN/using-your-agent.mdx +51 -4
- package/corpus/core/docs/content/locales/hi-IN/voice-input.mdx +43 -4
- package/corpus/core/docs/content/locales/hi-IN/what-is-agent-native.mdx +97 -8
- package/corpus/core/docs/content/locales/hi-IN/workspace-connections.mdx +128 -8
- package/corpus/core/docs/content/locales/hi-IN/workspace-management.mdx +50 -4
- package/corpus/core/docs/content/locales/hi-IN/workspace.mdx +111 -8
- package/corpus/core/docs/content/locales/hi-IN/writing-agent-instructions.mdx +40 -4
- package/corpus/core/docs/content/locales/ja-JP/a2a-protocol.mdx +97 -9
- package/corpus/core/docs/content/locales/ja-JP/actions.mdx +67 -4
- package/corpus/core/docs/content/locales/ja-JP/agent-mentions.mdx +68 -4
- package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +116 -8
- package/corpus/core/docs/content/locales/ja-JP/agent-teams.mdx +172 -12
- package/corpus/core/docs/content/locales/ja-JP/agent-web-surfaces.mdx +51 -4
- package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +122 -8
- package/corpus/core/docs/content/locales/ja-JP/automations.mdx +110 -8
- package/corpus/core/docs/content/locales/ja-JP/blueprint-installer.mdx +44 -4
- package/corpus/core/docs/content/locales/ja-JP/cli-adapters.mdx +44 -4
- package/corpus/core/docs/content/locales/ja-JP/client.mdx +79 -8
- package/corpus/core/docs/content/locales/ja-JP/cloneable-saas.mdx +85 -8
- package/corpus/core/docs/content/locales/ja-JP/code-agents-ui.mdx +100 -8
- package/corpus/core/docs/content/locales/ja-JP/components.mdx +116 -8
- package/corpus/core/docs/content/locales/ja-JP/context-awareness.mdx +100 -8
- package/corpus/core/docs/content/locales/ja-JP/creating-templates.mdx +51 -4
- package/corpus/core/docs/content/locales/ja-JP/cross-app-sso.mdx +109 -8
- package/corpus/core/docs/content/locales/ja-JP/database.mdx +52 -4
- package/corpus/core/docs/content/locales/ja-JP/deployment.mdx +103 -8
- package/corpus/core/docs/content/locales/ja-JP/dispatch.mdx +134 -8
- package/corpus/core/docs/content/locales/ja-JP/drop-in-agent.mdx +63 -4
- package/corpus/core/docs/content/locales/ja-JP/durable-resume.mdx +47 -4
- package/corpus/core/docs/content/locales/ja-JP/embedding-sdk.mdx +85 -8
- package/corpus/core/docs/content/locales/ja-JP/evals.mdx +102 -8
- package/corpus/core/docs/content/locales/ja-JP/extensions.mdx +111 -9
- package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +119 -8
- package/corpus/core/docs/content/locales/ja-JP/faq.mdx +98 -8
- package/corpus/core/docs/content/locales/ja-JP/file-uploads.mdx +61 -4
- package/corpus/core/docs/content/locales/ja-JP/frames.mdx +88 -8
- package/corpus/core/docs/content/locales/ja-JP/getting-started.mdx +34 -4
- package/corpus/core/docs/content/locales/ja-JP/harness-agents.mdx +79 -8
- package/corpus/core/docs/content/locales/ja-JP/human-approval.mdx +50 -4
- package/corpus/core/docs/content/locales/ja-JP/key-concepts.mdx +105 -8
- package/corpus/core/docs/content/locales/ja-JP/local-file-mode.mdx +58 -4
- package/corpus/core/docs/content/locales/ja-JP/mcp-apps.mdx +119 -10
- package/corpus/core/docs/content/locales/ja-JP/mcp-clients.mdx +134 -8
- package/corpus/core/docs/content/locales/ja-JP/mcp-protocol.mdx +105 -8
- package/corpus/core/docs/content/locales/ja-JP/messaging.mdx +115 -8
- package/corpus/core/docs/content/locales/ja-JP/migration-workbench.mdx +47 -4
- package/corpus/core/docs/content/locales/ja-JP/multi-app-workspace.mdx +91 -8
- package/corpus/core/docs/content/locales/ja-JP/multi-tenancy.mdx +80 -8
- package/corpus/core/docs/content/locales/ja-JP/native-chat-ui.mdx +104 -8
- package/corpus/core/docs/content/locales/ja-JP/notifications.mdx +135 -8
- package/corpus/core/docs/content/locales/ja-JP/observability.mdx +104 -8
- package/corpus/core/docs/content/locales/ja-JP/observational-memory.mdx +89 -8
- package/corpus/core/docs/content/locales/ja-JP/onboarding.mdx +45 -4
- package/corpus/core/docs/content/locales/ja-JP/plan-plugin.mdx +99 -8
- package/corpus/core/docs/content/locales/ja-JP/pr-visual-recap.mdx +123 -8
- package/corpus/core/docs/content/locales/ja-JP/processors.mdx +39 -4
- package/corpus/core/docs/content/locales/ja-JP/progress.mdx +46 -4
- package/corpus/core/docs/content/locales/ja-JP/pure-agent-apps.mdx +48 -4
- package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +106 -8
- package/corpus/core/docs/content/locales/ja-JP/recurring-jobs.mdx +59 -4
- package/corpus/core/docs/content/locales/ja-JP/routing.mdx +44 -5
- package/corpus/core/docs/content/locales/ja-JP/sandbox-adapters.mdx +43 -4
- package/corpus/core/docs/content/locales/ja-JP/security.mdx +82 -8
- package/corpus/core/docs/content/locales/ja-JP/server.mdx +171 -12
- package/corpus/core/docs/content/locales/ja-JP/sharing.mdx +45 -4
- package/corpus/core/docs/content/locales/ja-JP/skills-guide.mdx +118 -9
- package/corpus/core/docs/content/locales/ja-JP/template-analytics.mdx +46 -4
- package/corpus/core/docs/content/locales/ja-JP/template-assets.mdx +64 -4
- package/corpus/core/docs/content/locales/ja-JP/template-brain.mdx +67 -4
- package/corpus/core/docs/content/locales/ja-JP/template-calendar.mdx +62 -4
- package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +61 -4
- package/corpus/core/docs/content/locales/ja-JP/template-clips.mdx +52 -4
- package/corpus/core/docs/content/locales/ja-JP/template-content.mdx +62 -4
- package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +106 -4
- package/corpus/core/docs/content/locales/ja-JP/template-dispatch.mdx +57 -4
- package/corpus/core/docs/content/locales/ja-JP/template-forms.mdx +62 -4
- package/corpus/core/docs/content/locales/ja-JP/template-mail.mdx +62 -4
- package/corpus/core/docs/content/locales/ja-JP/template-plan.mdx +63 -4
- package/corpus/core/docs/content/locales/ja-JP/template-slides.mdx +49 -4
- package/corpus/core/docs/content/locales/ja-JP/template-videos.mdx +53 -4
- package/corpus/core/docs/content/locales/ja-JP/tracking.mdx +54 -4
- package/corpus/core/docs/content/locales/ja-JP/using-your-agent.mdx +51 -4
- package/corpus/core/docs/content/locales/ja-JP/voice-input.mdx +43 -4
- package/corpus/core/docs/content/locales/ja-JP/what-is-agent-native.mdx +96 -8
- package/corpus/core/docs/content/locales/ja-JP/workspace-connections.mdx +128 -8
- package/corpus/core/docs/content/locales/ja-JP/workspace-management.mdx +50 -4
- package/corpus/core/docs/content/locales/ja-JP/workspace.mdx +111 -8
- package/corpus/core/docs/content/locales/ja-JP/writing-agent-instructions.mdx +44 -4
- package/corpus/core/docs/content/locales/ko-KR/a2a-protocol.mdx +97 -9
- package/corpus/core/docs/content/locales/ko-KR/actions.mdx +63 -4
- package/corpus/core/docs/content/locales/ko-KR/agent-mentions.mdx +68 -4
- package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +113 -8
- package/corpus/core/docs/content/locales/ko-KR/agent-teams.mdx +171 -12
- package/corpus/core/docs/content/locales/ko-KR/agent-web-surfaces.mdx +51 -4
- package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +122 -8
- package/corpus/core/docs/content/locales/ko-KR/automations.mdx +110 -8
- package/corpus/core/docs/content/locales/ko-KR/blueprint-installer.mdx +42 -4
- package/corpus/core/docs/content/locales/ko-KR/cli-adapters.mdx +44 -4
- package/corpus/core/docs/content/locales/ko-KR/client.mdx +79 -8
- package/corpus/core/docs/content/locales/ko-KR/cloneable-saas.mdx +85 -8
- package/corpus/core/docs/content/locales/ko-KR/code-agents-ui.mdx +96 -8
- package/corpus/core/docs/content/locales/ko-KR/components.mdx +112 -8
- package/corpus/core/docs/content/locales/ko-KR/context-awareness.mdx +96 -8
- package/corpus/core/docs/content/locales/ko-KR/creating-templates.mdx +51 -4
- package/corpus/core/docs/content/locales/ko-KR/cross-app-sso.mdx +109 -8
- package/corpus/core/docs/content/locales/ko-KR/database.mdx +52 -4
- package/corpus/core/docs/content/locales/ko-KR/deployment.mdx +103 -8
- package/corpus/core/docs/content/locales/ko-KR/dispatch.mdx +132 -8
- package/corpus/core/docs/content/locales/ko-KR/drop-in-agent.mdx +63 -4
- package/corpus/core/docs/content/locales/ko-KR/durable-resume.mdx +47 -4
- package/corpus/core/docs/content/locales/ko-KR/embedding-sdk.mdx +81 -8
- package/corpus/core/docs/content/locales/ko-KR/evals.mdx +102 -8
- package/corpus/core/docs/content/locales/ko-KR/extensions.mdx +111 -9
- package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +119 -8
- package/corpus/core/docs/content/locales/ko-KR/faq.mdx +96 -8
- package/corpus/core/docs/content/locales/ko-KR/file-uploads.mdx +61 -4
- package/corpus/core/docs/content/locales/ko-KR/frames.mdx +86 -8
- package/corpus/core/docs/content/locales/ko-KR/getting-started.mdx +34 -4
- package/corpus/core/docs/content/locales/ko-KR/harness-agents.mdx +77 -8
- package/corpus/core/docs/content/locales/ko-KR/human-approval.mdx +50 -4
- package/corpus/core/docs/content/locales/ko-KR/key-concepts.mdx +104 -8
- package/corpus/core/docs/content/locales/ko-KR/local-file-mode.mdx +56 -4
- package/corpus/core/docs/content/locales/ko-KR/mcp-apps.mdx +120 -10
- package/corpus/core/docs/content/locales/ko-KR/mcp-clients.mdx +133 -8
- package/corpus/core/docs/content/locales/ko-KR/mcp-protocol.mdx +105 -8
- package/corpus/core/docs/content/locales/ko-KR/messaging.mdx +115 -8
- package/corpus/core/docs/content/locales/ko-KR/migration-workbench.mdx +45 -4
- package/corpus/core/docs/content/locales/ko-KR/multi-app-workspace.mdx +91 -8
- package/corpus/core/docs/content/locales/ko-KR/multi-tenancy.mdx +80 -8
- package/corpus/core/docs/content/locales/ko-KR/native-chat-ui.mdx +104 -8
- package/corpus/core/docs/content/locales/ko-KR/notifications.mdx +135 -8
- package/corpus/core/docs/content/locales/ko-KR/observability.mdx +102 -8
- package/corpus/core/docs/content/locales/ko-KR/observational-memory.mdx +87 -8
- package/corpus/core/docs/content/locales/ko-KR/onboarding.mdx +44 -4
- package/corpus/core/docs/content/locales/ko-KR/plan-plugin.mdx +99 -8
- package/corpus/core/docs/content/locales/ko-KR/pr-visual-recap.mdx +125 -8
- package/corpus/core/docs/content/locales/ko-KR/processors.mdx +39 -4
- package/corpus/core/docs/content/locales/ko-KR/progress.mdx +46 -4
- package/corpus/core/docs/content/locales/ko-KR/pure-agent-apps.mdx +46 -4
- package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +104 -8
- package/corpus/core/docs/content/locales/ko-KR/recurring-jobs.mdx +59 -4
- package/corpus/core/docs/content/locales/ko-KR/routing.mdx +44 -5
- package/corpus/core/docs/content/locales/ko-KR/sandbox-adapters.mdx +41 -4
- package/corpus/core/docs/content/locales/ko-KR/security.mdx +78 -8
- package/corpus/core/docs/content/locales/ko-KR/server.mdx +171 -12
- package/corpus/core/docs/content/locales/ko-KR/sharing.mdx +45 -4
- package/corpus/core/docs/content/locales/ko-KR/skills-guide.mdx +118 -9
- package/corpus/core/docs/content/locales/ko-KR/template-analytics.mdx +46 -4
- package/corpus/core/docs/content/locales/ko-KR/template-assets.mdx +62 -4
- package/corpus/core/docs/content/locales/ko-KR/template-brain.mdx +65 -4
- package/corpus/core/docs/content/locales/ko-KR/template-calendar.mdx +60 -4
- package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +59 -4
- package/corpus/core/docs/content/locales/ko-KR/template-clips.mdx +52 -4
- package/corpus/core/docs/content/locales/ko-KR/template-content.mdx +60 -4
- package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +102 -4
- package/corpus/core/docs/content/locales/ko-KR/template-dispatch.mdx +57 -4
- package/corpus/core/docs/content/locales/ko-KR/template-forms.mdx +60 -4
- package/corpus/core/docs/content/locales/ko-KR/template-mail.mdx +60 -4
- package/corpus/core/docs/content/locales/ko-KR/template-plan.mdx +57 -4
- package/corpus/core/docs/content/locales/ko-KR/template-slides.mdx +49 -4
- package/corpus/core/docs/content/locales/ko-KR/template-videos.mdx +53 -4
- package/corpus/core/docs/content/locales/ko-KR/tracking.mdx +54 -4
- package/corpus/core/docs/content/locales/ko-KR/using-your-agent.mdx +51 -4
- package/corpus/core/docs/content/locales/ko-KR/voice-input.mdx +43 -4
- package/corpus/core/docs/content/locales/ko-KR/what-is-agent-native.mdx +95 -8
- package/corpus/core/docs/content/locales/ko-KR/workspace-connections.mdx +128 -8
- package/corpus/core/docs/content/locales/ko-KR/workspace-management.mdx +50 -4
- package/corpus/core/docs/content/locales/ko-KR/workspace.mdx +111 -8
- package/corpus/core/docs/content/locales/ko-KR/writing-agent-instructions.mdx +38 -4
- package/corpus/core/docs/content/locales/pt-BR/a2a-protocol.mdx +99 -9
- package/corpus/core/docs/content/locales/pt-BR/actions.mdx +67 -4
- package/corpus/core/docs/content/locales/pt-BR/agent-mentions.mdx +68 -4
- package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +116 -8
- package/corpus/core/docs/content/locales/pt-BR/agent-teams.mdx +172 -12
- package/corpus/core/docs/content/locales/pt-BR/agent-web-surfaces.mdx +51 -4
- package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +122 -8
- package/corpus/core/docs/content/locales/pt-BR/automations.mdx +110 -8
- package/corpus/core/docs/content/locales/pt-BR/blueprint-installer.mdx +42 -4
- package/corpus/core/docs/content/locales/pt-BR/cli-adapters.mdx +44 -4
- package/corpus/core/docs/content/locales/pt-BR/client.mdx +81 -8
- package/corpus/core/docs/content/locales/pt-BR/cloneable-saas.mdx +85 -8
- package/corpus/core/docs/content/locales/pt-BR/code-agents-ui.mdx +98 -8
- package/corpus/core/docs/content/locales/pt-BR/components.mdx +118 -8
- package/corpus/core/docs/content/locales/pt-BR/context-awareness.mdx +100 -8
- package/corpus/core/docs/content/locales/pt-BR/creating-templates.mdx +51 -4
- package/corpus/core/docs/content/locales/pt-BR/cross-app-sso.mdx +109 -8
- package/corpus/core/docs/content/locales/pt-BR/database.mdx +52 -4
- package/corpus/core/docs/content/locales/pt-BR/deployment.mdx +103 -8
- package/corpus/core/docs/content/locales/pt-BR/dispatch.mdx +134 -8
- package/corpus/core/docs/content/locales/pt-BR/drop-in-agent.mdx +63 -4
- package/corpus/core/docs/content/locales/pt-BR/durable-resume.mdx +47 -4
- package/corpus/core/docs/content/locales/pt-BR/embedding-sdk.mdx +87 -8
- package/corpus/core/docs/content/locales/pt-BR/evals.mdx +102 -8
- package/corpus/core/docs/content/locales/pt-BR/extensions.mdx +113 -9
- package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +119 -8
- package/corpus/core/docs/content/locales/pt-BR/faq.mdx +98 -8
- package/corpus/core/docs/content/locales/pt-BR/file-uploads.mdx +61 -4
- package/corpus/core/docs/content/locales/pt-BR/frames.mdx +88 -8
- package/corpus/core/docs/content/locales/pt-BR/getting-started.mdx +34 -4
- package/corpus/core/docs/content/locales/pt-BR/harness-agents.mdx +79 -8
- package/corpus/core/docs/content/locales/pt-BR/human-approval.mdx +50 -4
- package/corpus/core/docs/content/locales/pt-BR/key-concepts.mdx +104 -8
- package/corpus/core/docs/content/locales/pt-BR/local-file-mode.mdx +60 -4
- package/corpus/core/docs/content/locales/pt-BR/mcp-apps.mdx +120 -10
- package/corpus/core/docs/content/locales/pt-BR/mcp-clients.mdx +133 -8
- package/corpus/core/docs/content/locales/pt-BR/mcp-protocol.mdx +105 -8
- package/corpus/core/docs/content/locales/pt-BR/messaging.mdx +115 -8
- package/corpus/core/docs/content/locales/pt-BR/migration-workbench.mdx +47 -4
- package/corpus/core/docs/content/locales/pt-BR/multi-app-workspace.mdx +91 -8
- package/corpus/core/docs/content/locales/pt-BR/multi-tenancy.mdx +80 -8
- package/corpus/core/docs/content/locales/pt-BR/native-chat-ui.mdx +108 -8
- package/corpus/core/docs/content/locales/pt-BR/notifications.mdx +135 -8
- package/corpus/core/docs/content/locales/pt-BR/observability.mdx +104 -8
- package/corpus/core/docs/content/locales/pt-BR/observational-memory.mdx +92 -8
- package/corpus/core/docs/content/locales/pt-BR/onboarding.mdx +45 -4
- package/corpus/core/docs/content/locales/pt-BR/plan-plugin.mdx +99 -8
- package/corpus/core/docs/content/locales/pt-BR/pr-visual-recap.mdx +125 -8
- package/corpus/core/docs/content/locales/pt-BR/processors.mdx +41 -4
- package/corpus/core/docs/content/locales/pt-BR/progress.mdx +46 -4
- package/corpus/core/docs/content/locales/pt-BR/pure-agent-apps.mdx +48 -4
- package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +107 -8
- package/corpus/core/docs/content/locales/pt-BR/recurring-jobs.mdx +59 -4
- package/corpus/core/docs/content/locales/pt-BR/routing.mdx +44 -5
- package/corpus/core/docs/content/locales/pt-BR/sandbox-adapters.mdx +43 -4
- package/corpus/core/docs/content/locales/pt-BR/security.mdx +82 -8
- package/corpus/core/docs/content/locales/pt-BR/server.mdx +173 -12
- package/corpus/core/docs/content/locales/pt-BR/sharing.mdx +45 -4
- package/corpus/core/docs/content/locales/pt-BR/skills-guide.mdx +118 -9
- package/corpus/core/docs/content/locales/pt-BR/template-analytics.mdx +46 -4
- package/corpus/core/docs/content/locales/pt-BR/template-assets.mdx +64 -4
- package/corpus/core/docs/content/locales/pt-BR/template-brain.mdx +69 -4
- package/corpus/core/docs/content/locales/pt-BR/template-calendar.mdx +62 -4
- package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +61 -4
- package/corpus/core/docs/content/locales/pt-BR/template-clips.mdx +52 -4
- package/corpus/core/docs/content/locales/pt-BR/template-content.mdx +64 -4
- package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +106 -4
- package/corpus/core/docs/content/locales/pt-BR/template-dispatch.mdx +57 -4
- package/corpus/core/docs/content/locales/pt-BR/template-forms.mdx +64 -4
- package/corpus/core/docs/content/locales/pt-BR/template-mail.mdx +60 -4
- package/corpus/core/docs/content/locales/pt-BR/template-plan.mdx +63 -4
- package/corpus/core/docs/content/locales/pt-BR/template-slides.mdx +49 -4
- package/corpus/core/docs/content/locales/pt-BR/template-videos.mdx +53 -4
- package/corpus/core/docs/content/locales/pt-BR/tracking.mdx +54 -4
- package/corpus/core/docs/content/locales/pt-BR/using-your-agent.mdx +51 -4
- package/corpus/core/docs/content/locales/pt-BR/voice-input.mdx +43 -4
- package/corpus/core/docs/content/locales/pt-BR/what-is-agent-native.mdx +101 -8
- package/corpus/core/docs/content/locales/pt-BR/workspace-connections.mdx +128 -8
- package/corpus/core/docs/content/locales/pt-BR/workspace-management.mdx +50 -4
- package/corpus/core/docs/content/locales/pt-BR/workspace.mdx +111 -8
- package/corpus/core/docs/content/locales/pt-BR/writing-agent-instructions.mdx +46 -4
- package/corpus/core/docs/content/locales/zh-CN/a2a-protocol.mdx +97 -9
- package/corpus/core/docs/content/locales/zh-CN/actions.mdx +65 -4
- package/corpus/core/docs/content/locales/zh-CN/agent-mentions.mdx +68 -4
- package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +108 -8
- package/corpus/core/docs/content/locales/zh-CN/agent-teams.mdx +171 -12
- package/corpus/core/docs/content/locales/zh-CN/agent-web-surfaces.mdx +51 -4
- package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +122 -8
- package/corpus/core/docs/content/locales/zh-CN/automations.mdx +110 -8
- package/corpus/core/docs/content/locales/zh-CN/blueprint-installer.mdx +42 -4
- package/corpus/core/docs/content/locales/zh-CN/cli-adapters.mdx +44 -4
- package/corpus/core/docs/content/locales/zh-CN/client.mdx +79 -8
- package/corpus/core/docs/content/locales/zh-CN/cloneable-saas.mdx +83 -8
- package/corpus/core/docs/content/locales/zh-CN/code-agents-ui.mdx +94 -8
- package/corpus/core/docs/content/locales/zh-CN/components.mdx +112 -8
- package/corpus/core/docs/content/locales/zh-CN/context-awareness.mdx +96 -8
- package/corpus/core/docs/content/locales/zh-CN/creating-templates.mdx +51 -4
- package/corpus/core/docs/content/locales/zh-CN/cross-app-sso.mdx +107 -8
- package/corpus/core/docs/content/locales/zh-CN/database.mdx +52 -4
- package/corpus/core/docs/content/locales/zh-CN/deployment.mdx +103 -8
- package/corpus/core/docs/content/locales/zh-CN/dispatch.mdx +134 -8
- package/corpus/core/docs/content/locales/zh-CN/drop-in-agent.mdx +63 -4
- package/corpus/core/docs/content/locales/zh-CN/durable-resume.mdx +45 -4
- package/corpus/core/docs/content/locales/zh-CN/embedding-sdk.mdx +81 -8
- package/corpus/core/docs/content/locales/zh-CN/evals.mdx +100 -8
- package/corpus/core/docs/content/locales/zh-CN/extensions.mdx +111 -9
- package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +119 -8
- package/corpus/core/docs/content/locales/zh-CN/faq.mdx +96 -8
- package/corpus/core/docs/content/locales/zh-CN/file-uploads.mdx +61 -4
- package/corpus/core/docs/content/locales/zh-CN/frames.mdx +86 -8
- package/corpus/core/docs/content/locales/zh-CN/getting-started.mdx +34 -4
- package/corpus/core/docs/content/locales/zh-CN/harness-agents.mdx +79 -8
- package/corpus/core/docs/content/locales/zh-CN/human-approval.mdx +50 -4
- package/corpus/core/docs/content/locales/zh-CN/key-concepts.mdx +100 -8
- package/corpus/core/docs/content/locales/zh-CN/local-file-mode.mdx +56 -4
- package/corpus/core/docs/content/locales/zh-CN/mcp-apps.mdx +120 -10
- package/corpus/core/docs/content/locales/zh-CN/mcp-clients.mdx +133 -8
- package/corpus/core/docs/content/locales/zh-CN/mcp-protocol.mdx +105 -8
- package/corpus/core/docs/content/locales/zh-CN/messaging.mdx +115 -8
- package/corpus/core/docs/content/locales/zh-CN/migration-workbench.mdx +45 -4
- package/corpus/core/docs/content/locales/zh-CN/multi-app-workspace.mdx +91 -8
- package/corpus/core/docs/content/locales/zh-CN/multi-tenancy.mdx +80 -8
- package/corpus/core/docs/content/locales/zh-CN/native-chat-ui.mdx +104 -8
- package/corpus/core/docs/content/locales/zh-CN/notifications.mdx +135 -8
- package/corpus/core/docs/content/locales/zh-CN/observability.mdx +102 -8
- package/corpus/core/docs/content/locales/zh-CN/observational-memory.mdx +85 -8
- package/corpus/core/docs/content/locales/zh-CN/onboarding.mdx +44 -4
- package/corpus/core/docs/content/locales/zh-CN/plan-plugin.mdx +97 -8
- package/corpus/core/docs/content/locales/zh-CN/pr-visual-recap.mdx +123 -8
- package/corpus/core/docs/content/locales/zh-CN/processors.mdx +39 -4
- package/corpus/core/docs/content/locales/zh-CN/progress.mdx +46 -4
- package/corpus/core/docs/content/locales/zh-CN/pure-agent-apps.mdx +46 -4
- package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +98 -8
- package/corpus/core/docs/content/locales/zh-CN/recurring-jobs.mdx +59 -4
- package/corpus/core/docs/content/locales/zh-CN/routing.mdx +42 -5
- package/corpus/core/docs/content/locales/zh-CN/sandbox-adapters.mdx +41 -4
- package/corpus/core/docs/content/locales/zh-CN/security.mdx +78 -8
- package/corpus/core/docs/content/locales/zh-CN/server.mdx +169 -12
- package/corpus/core/docs/content/locales/zh-CN/sharing.mdx +45 -4
- package/corpus/core/docs/content/locales/zh-CN/skills-guide.mdx +118 -9
- package/corpus/core/docs/content/locales/zh-CN/template-analytics.mdx +46 -4
- package/corpus/core/docs/content/locales/zh-CN/template-assets.mdx +58 -4
- package/corpus/core/docs/content/locales/zh-CN/template-brain.mdx +65 -4
- package/corpus/core/docs/content/locales/zh-CN/template-calendar.mdx +58 -4
- package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +57 -4
- package/corpus/core/docs/content/locales/zh-CN/template-clips.mdx +52 -4
- package/corpus/core/docs/content/locales/zh-CN/template-content.mdx +58 -4
- package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +94 -4
- package/corpus/core/docs/content/locales/zh-CN/template-dispatch.mdx +57 -4
- package/corpus/core/docs/content/locales/zh-CN/template-forms.mdx +58 -4
- package/corpus/core/docs/content/locales/zh-CN/template-mail.mdx +60 -4
- package/corpus/core/docs/content/locales/zh-CN/template-plan.mdx +57 -4
- package/corpus/core/docs/content/locales/zh-CN/template-slides.mdx +49 -4
- package/corpus/core/docs/content/locales/zh-CN/template-videos.mdx +51 -4
- package/corpus/core/docs/content/locales/zh-CN/tracking.mdx +54 -4
- package/corpus/core/docs/content/locales/zh-CN/using-your-agent.mdx +51 -4
- package/corpus/core/docs/content/locales/zh-CN/voice-input.mdx +43 -4
- package/corpus/core/docs/content/locales/zh-CN/what-is-agent-native.mdx +94 -8
- package/corpus/core/docs/content/locales/zh-CN/workspace-connections.mdx +126 -8
- package/corpus/core/docs/content/locales/zh-CN/workspace-management.mdx +50 -4
- package/corpus/core/docs/content/locales/zh-CN/workspace.mdx +110 -8
- package/corpus/core/docs/content/locales/zh-CN/writing-agent-instructions.mdx +38 -4
- package/corpus/core/docs/content/locales/zh-TW/a2a-protocol.mdx +97 -9
- package/corpus/core/docs/content/locales/zh-TW/actions.mdx +63 -4
- package/corpus/core/docs/content/locales/zh-TW/agent-mentions.mdx +68 -4
- package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +108 -8
- package/corpus/core/docs/content/locales/zh-TW/agent-teams.mdx +171 -12
- package/corpus/core/docs/content/locales/zh-TW/agent-web-surfaces.mdx +51 -4
- package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +122 -8
- package/corpus/core/docs/content/locales/zh-TW/automations.mdx +110 -8
- package/corpus/core/docs/content/locales/zh-TW/blueprint-installer.mdx +42 -4
- package/corpus/core/docs/content/locales/zh-TW/cli-adapters.mdx +44 -4
- package/corpus/core/docs/content/locales/zh-TW/client.mdx +79 -8
- package/corpus/core/docs/content/locales/zh-TW/cloneable-saas.mdx +83 -8
- package/corpus/core/docs/content/locales/zh-TW/code-agents-ui.mdx +94 -8
- package/corpus/core/docs/content/locales/zh-TW/components.mdx +112 -8
- package/corpus/core/docs/content/locales/zh-TW/context-awareness.mdx +96 -8
- package/corpus/core/docs/content/locales/zh-TW/creating-templates.mdx +51 -4
- package/corpus/core/docs/content/locales/zh-TW/cross-app-sso.mdx +107 -8
- package/corpus/core/docs/content/locales/zh-TW/database.mdx +52 -4
- package/corpus/core/docs/content/locales/zh-TW/deployment.mdx +103 -8
- package/corpus/core/docs/content/locales/zh-TW/dispatch.mdx +134 -8
- package/corpus/core/docs/content/locales/zh-TW/drop-in-agent.mdx +63 -4
- package/corpus/core/docs/content/locales/zh-TW/durable-background-runs.mdx +88 -8
- package/corpus/core/docs/content/locales/zh-TW/durable-resume.mdx +45 -4
- package/corpus/core/docs/content/locales/zh-TW/embedding-sdk.mdx +83 -8
- package/corpus/core/docs/content/locales/zh-TW/evals.mdx +100 -8
- package/corpus/core/docs/content/locales/zh-TW/extensions.mdx +111 -9
- package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +119 -8
- package/corpus/core/docs/content/locales/zh-TW/faq.mdx +96 -8
- package/corpus/core/docs/content/locales/zh-TW/file-uploads.mdx +61 -4
- package/corpus/core/docs/content/locales/zh-TW/frames.mdx +86 -8
- package/corpus/core/docs/content/locales/zh-TW/getting-started.mdx +34 -4
- package/corpus/core/docs/content/locales/zh-TW/harness-agents.mdx +79 -8
- package/corpus/core/docs/content/locales/zh-TW/human-approval.mdx +50 -4
- package/corpus/core/docs/content/locales/zh-TW/key-concepts.mdx +100 -8
- package/corpus/core/docs/content/locales/zh-TW/local-file-mode.mdx +56 -4
- package/corpus/core/docs/content/locales/zh-TW/mcp-apps.mdx +120 -10
- package/corpus/core/docs/content/locales/zh-TW/mcp-clients.mdx +133 -8
- package/corpus/core/docs/content/locales/zh-TW/mcp-protocol.mdx +105 -8
- package/corpus/core/docs/content/locales/zh-TW/messaging.mdx +115 -8
- package/corpus/core/docs/content/locales/zh-TW/migration-workbench.mdx +45 -4
- package/corpus/core/docs/content/locales/zh-TW/multi-app-workspace.mdx +91 -8
- package/corpus/core/docs/content/locales/zh-TW/multi-tenancy.mdx +80 -8
- package/corpus/core/docs/content/locales/zh-TW/native-chat-ui.mdx +104 -8
- package/corpus/core/docs/content/locales/zh-TW/notifications.mdx +135 -8
- package/corpus/core/docs/content/locales/zh-TW/observability.mdx +102 -8
- package/corpus/core/docs/content/locales/zh-TW/observational-memory.mdx +85 -8
- package/corpus/core/docs/content/locales/zh-TW/onboarding.mdx +44 -4
- package/corpus/core/docs/content/locales/zh-TW/plan-plugin.mdx +97 -8
- package/corpus/core/docs/content/locales/zh-TW/pr-visual-recap.mdx +123 -8
- package/corpus/core/docs/content/locales/zh-TW/processors.mdx +39 -4
- package/corpus/core/docs/content/locales/zh-TW/progress.mdx +46 -4
- package/corpus/core/docs/content/locales/zh-TW/pure-agent-apps.mdx +46 -4
- package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +98 -8
- package/corpus/core/docs/content/locales/zh-TW/recurring-jobs.mdx +59 -4
- package/corpus/core/docs/content/locales/zh-TW/routing.mdx +42 -5
- package/corpus/core/docs/content/locales/zh-TW/sandbox-adapters.mdx +41 -4
- package/corpus/core/docs/content/locales/zh-TW/security.mdx +80 -8
- package/corpus/core/docs/content/locales/zh-TW/server.mdx +169 -12
- package/corpus/core/docs/content/locales/zh-TW/sharing.mdx +45 -4
- package/corpus/core/docs/content/locales/zh-TW/skills-guide.mdx +118 -9
- package/corpus/core/docs/content/locales/zh-TW/template-analytics.mdx +46 -4
- package/corpus/core/docs/content/locales/zh-TW/template-assets.mdx +58 -4
- package/corpus/core/docs/content/locales/zh-TW/template-brain.mdx +65 -4
- package/corpus/core/docs/content/locales/zh-TW/template-calendar.mdx +58 -4
- package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +59 -4
- package/corpus/core/docs/content/locales/zh-TW/template-clips.mdx +52 -4
- package/corpus/core/docs/content/locales/zh-TW/template-content.mdx +58 -4
- package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +96 -4
- package/corpus/core/docs/content/locales/zh-TW/template-dispatch.mdx +57 -4
- package/corpus/core/docs/content/locales/zh-TW/template-forms.mdx +58 -4
- package/corpus/core/docs/content/locales/zh-TW/template-mail.mdx +60 -4
- package/corpus/core/docs/content/locales/zh-TW/template-plan.mdx +57 -4
- package/corpus/core/docs/content/locales/zh-TW/template-slides.mdx +49 -4
- package/corpus/core/docs/content/locales/zh-TW/template-videos.mdx +51 -4
- package/corpus/core/docs/content/locales/zh-TW/tracking.mdx +54 -4
- package/corpus/core/docs/content/locales/zh-TW/using-your-agent.mdx +51 -4
- package/corpus/core/docs/content/locales/zh-TW/voice-input.mdx +43 -4
- package/corpus/core/docs/content/locales/zh-TW/what-is-agent-native.mdx +94 -8
- package/corpus/core/docs/content/locales/zh-TW/workspace-connections.mdx +126 -8
- package/corpus/core/docs/content/locales/zh-TW/workspace-management.mdx +50 -4
- package/corpus/core/docs/content/locales/zh-TW/workspace.mdx +111 -8
- package/corpus/core/docs/content/locales/zh-TW/writing-agent-instructions.mdx +38 -4
- package/corpus/core/docs/content/mcp-apps.mdx +120 -10
- package/corpus/core/docs/content/mcp-clients.mdx +161 -8
- package/corpus/core/docs/content/mcp-protocol.mdx +105 -8
- package/corpus/core/docs/content/messaging.mdx +115 -8
- package/corpus/core/docs/content/migration-workbench.mdx +45 -4
- package/corpus/core/docs/content/multi-app-workspace.mdx +91 -8
- package/corpus/core/docs/content/multi-tenancy.mdx +80 -8
- package/corpus/core/docs/content/native-chat-ui.mdx +106 -8
- package/corpus/core/docs/content/notifications.mdx +135 -8
- package/corpus/core/docs/content/observability.mdx +102 -8
- package/corpus/core/docs/content/observational-memory.mdx +89 -8
- package/corpus/core/docs/content/onboarding.mdx +45 -4
- package/corpus/core/docs/content/plan-plugin.mdx +99 -8
- package/corpus/core/docs/content/pr-visual-recap.mdx +125 -8
- package/corpus/core/docs/content/processors.mdx +41 -4
- package/corpus/core/docs/content/progress.mdx +46 -4
- package/corpus/core/docs/content/pure-agent-apps.mdx +46 -4
- package/corpus/core/docs/content/real-time-collaboration.mdx +104 -8
- package/corpus/core/docs/content/recurring-jobs.mdx +59 -4
- package/corpus/core/docs/content/routing.mdx +44 -5
- package/corpus/core/docs/content/sandbox-adapters.mdx +43 -4
- package/corpus/core/docs/content/security.mdx +80 -8
- package/corpus/core/docs/content/server.mdx +173 -12
- package/corpus/core/docs/content/sharing.mdx +45 -4
- package/corpus/core/docs/content/skills-guide.mdx +118 -9
- package/corpus/core/docs/content/template-analytics.mdx +46 -4
- package/corpus/core/docs/content/template-assets.mdx +60 -4
- package/corpus/core/docs/content/template-brain.mdx +67 -4
- package/corpus/core/docs/content/template-calendar.mdx +62 -4
- package/corpus/core/docs/content/template-chat.mdx +61 -4
- package/corpus/core/docs/content/template-clips.mdx +52 -4
- package/corpus/core/docs/content/template-content.mdx +60 -4
- package/corpus/core/docs/content/template-design.mdx +103 -4
- package/corpus/core/docs/content/template-dispatch.mdx +57 -4
- package/corpus/core/docs/content/template-forms.mdx +62 -4
- package/corpus/core/docs/content/template-mail.mdx +60 -4
- package/corpus/core/docs/content/template-plan.mdx +61 -4
- package/corpus/core/docs/content/template-slides.mdx +49 -4
- package/corpus/core/docs/content/template-videos.mdx +51 -4
- package/corpus/core/docs/content/tracking.mdx +54 -4
- package/corpus/core/docs/content/using-your-agent.mdx +51 -4
- package/corpus/core/docs/content/voice-input.mdx +43 -4
- package/corpus/core/docs/content/what-is-agent-native.mdx +188 -8
- package/corpus/core/docs/content/workspace-connections.mdx +128 -8
- package/corpus/core/docs/content/workspace-management.mdx +50 -4
- package/corpus/core/docs/content/workspace.mdx +111 -8
- package/corpus/core/docs/content/writing-agent-instructions.mdx +45 -4
- package/corpus/core/package.json +2 -1
- package/corpus/core/src/agent/engine/index.ts +1 -0
- package/corpus/core/src/agent/engine/registry.ts +40 -0
- package/corpus/core/src/agent/production-agent.ts +6 -2
- package/corpus/core/src/application-state/store.ts +5 -5
- package/corpus/core/src/chat-threads/store.ts +2 -2
- package/corpus/core/src/cli/content-local.ts +374 -0
- package/corpus/core/src/cli/design-connect.ts +490 -0
- package/corpus/core/src/cli/index.ts +33 -0
- package/corpus/core/src/cli/skills.ts +355 -200
- package/corpus/core/src/client/AssistantChat.tsx +39 -3
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +11 -93
- package/corpus/core/src/client/agent-chat.ts +27 -3
- package/corpus/core/src/client/analytics.ts +68 -15
- package/corpus/core/src/client/blocks/index.ts +2 -0
- package/corpus/core/src/client/blocks/library/MermaidBlock.tsx +1 -1
- package/corpus/core/src/client/blocks/library/diagram.config.ts +42 -18
- package/corpus/core/src/client/blocks/library/diagram.tsx +2 -2
- package/corpus/core/src/client/blocks/library/sanitize-html.ts +71 -6
- package/corpus/core/src/client/blocks/library/wireframe-kit.tsx +2 -2
- package/corpus/core/src/client/blocks/library/wireframe.tsx +9 -3
- package/corpus/core/src/client/blocks/mdx.ts +62 -1
- package/corpus/core/src/client/blocks/server.ts +2 -0
- package/corpus/core/src/client/blocks/types.ts +5 -4
- package/corpus/core/src/client/chat/message-components.tsx +2 -98
- package/corpus/core/src/client/chat-model-groups.ts +147 -0
- package/corpus/core/src/client/components/LiveCursorOverlay.tsx +33 -66
- package/corpus/core/src/client/components/ui/dialog.tsx +91 -0
- package/corpus/core/src/client/composer/ComposerPlusMenu.tsx +33 -290
- package/corpus/core/src/client/composer/TiptapComposer.tsx +99 -24
- package/corpus/core/src/client/composer/useVoiceDictation.ts +429 -260
- package/corpus/core/src/client/frame-protocol.ts +17 -2
- package/corpus/core/src/client/index.ts +2 -0
- package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +614 -0
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +411 -644
- package/corpus/core/src/client/resources/mcp-integration-catalog.ts +239 -0
- package/corpus/core/src/client/rich-markdown-editor/RegistryBlockNode.tsx +2 -2
- package/corpus/core/src/client/settings/SettingsPanel.tsx +1 -1
- package/corpus/core/src/client/sharing/ShareButton.tsx +20 -15
- package/corpus/core/src/client/use-agent-engine-configured.ts +80 -28
- package/corpus/core/src/client/use-chat-models.ts +12 -104
- package/corpus/core/src/db/client.ts +0 -5
- package/corpus/core/src/integrations/adapters/email.ts +2 -2
- package/corpus/core/src/local-artifacts/index.ts +18 -0
- package/corpus/core/src/localization/default-messages.ts +81 -0
- package/corpus/core/src/localization/shared.ts +3 -3
- package/corpus/core/src/org/handlers.ts +2 -2
- package/corpus/core/src/resources/store.ts +7 -7
- package/corpus/core/src/server/core-routes-plugin.ts +34 -12
- package/corpus/core/src/server/transcribe-voice.ts +57 -22
- package/corpus/core/src/shared/mcp-embed-headers.ts +23 -1
- package/corpus/core/src/shared/mcp-integration-config.ts +101 -0
- package/corpus/core/src/styles/agent-native.css +58 -107
- package/corpus/core/src/styles/blocks.css +15 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
- package/corpus/core/src/vite/client.ts +19 -0
- package/corpus/core/src/voice/index.ts +18 -0
- package/corpus/core/src/voice/voice-cleanup-prompt.ts +38 -0
- package/corpus/core/src/voice/voice-context.ts +217 -0
- package/corpus/core/src/voice/voice-replacements.ts +75 -0
- package/corpus/templates/analytics/AGENTS.md +4 -3
- package/corpus/templates/analytics/actions/list-session-recordings.ts +6 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +557 -400
- package/corpus/templates/analytics/app/global.css +22 -4
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +3 -0
- package/corpus/templates/analytics/app/i18n-data.ts +21 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +33 -8
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +7 -0
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +32 -10
- package/corpus/templates/analytics/changelog/2026-06-28-ask-tab-now-matches-the-darker-app-background.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-28-dashboard-email-reports-now-use-cleaner-light-mode-snapshots.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-28-sessions-now-show-only-signed-in-recordings-with-playable-re.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-28-sessions-shows-scoped-recordings-even-when-replay-events-are.md +6 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +3 -3
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +29 -7
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +5 -2
- package/corpus/templates/analytics/server/lib/session-replay.ts +21 -7
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +4 -4
- package/corpus/templates/assets/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +29 -2
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +131 -42
- package/corpus/templates/brain/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/brain/app/i18n-data.ts +20 -0
- package/corpus/templates/brain/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +29 -1
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +417 -299
- package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/calendar/app/i18n-data.ts +20 -0
- package/corpus/templates/calendar/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +6 -19
- package/corpus/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/clips/AGENTS.md +8 -0
- package/corpus/templates/clips/actions/cleanup-transcript.ts +58 -10
- package/corpus/templates/clips/actions/finalize-meeting.ts +81 -12
- package/corpus/templates/clips/actions/get-builder-credit-status.ts +22 -0
- package/corpus/templates/clips/actions/get-recording-player-data.ts +18 -3
- package/corpus/templates/clips/actions/lib/agents-md-context.ts +4 -1
- package/corpus/templates/clips/actions/lib/builder-credits-state.ts +46 -0
- package/corpus/templates/clips/actions/lib/provider-transcript.ts +51 -0
- package/corpus/templates/clips/actions/regenerate-title.ts +18 -0
- package/corpus/templates/clips/actions/request-transcript.ts +56 -33
- package/corpus/templates/clips/actions/save-browser-transcript.ts +1 -17
- package/corpus/templates/clips/app/components/library/library-layout.tsx +3 -3
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +2 -2
- package/corpus/templates/clips/app/components/player/transcript-panel.tsx +120 -11
- package/corpus/templates/clips/app/i18n/ar-SA.ts +25 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +25 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +25 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +25 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +25 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +25 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +25 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +25 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +25 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +23 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +23 -0
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +69 -0
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +52 -2
- package/corpus/templates/clips/app/routes/record.tsx +26 -15
- package/corpus/templates/clips/changelog/2026-06-28-builder-credit-pauses-show-friendly-upgrade-guidance.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-28-left-sidebar-footer-controls-use-less-divider-chrome.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-28-transcription-now-auto-detects-spoken-language-instead-of-following.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-28-video-uploads-now-finish-when-duration-metadata-is-unavailable.md +6 -0
- package/corpus/templates/clips/desktop/src/lib/personal-vocabulary.ts +13 -8
- package/corpus/templates/clips/desktop/src/lib/transcription-engine.ts +7 -3
- package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +60 -1
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +30 -12
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +6 -19
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +4 -3
- package/corpus/templates/clips/shared/builder-credits.ts +120 -0
- package/corpus/templates/clips/shared/recording-core.ts +26 -8
- package/corpus/templates/content/AGENTS.md +23 -2
- package/corpus/templates/content/actions/_builder-docs-client.ts +952 -0
- package/corpus/templates/content/actions/_document-flush.ts +62 -0
- package/corpus/templates/content/actions/_local-file-documents.ts +115 -18
- package/corpus/templates/content/actions/check-builder-doc.ts +38 -0
- package/corpus/templates/content/actions/delete-document.ts +8 -0
- package/corpus/templates/content/actions/import-content-source.ts +12 -0
- package/corpus/templates/content/actions/list-builder-docs.ts +29 -0
- package/corpus/templates/content/actions/pull-builder-doc.ts +42 -0
- package/corpus/templates/content/actions/pull-document.ts +9 -59
- package/corpus/templates/content/actions/push-builder-doc.ts +45 -0
- package/corpus/templates/content/app/blocks/BuilderDocsBlocks.tsx +254 -0
- package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +4 -0
- package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +1 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +1 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +5 -5
- package/corpus/templates/content/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/content/server/db/schema.ts +12 -0
- package/corpus/templates/content/server/plugins/db.ts +23 -0
- package/corpus/templates/content/shared/api.ts +1 -0
- package/corpus/templates/content/shared/builder-docs-blocks.ts +361 -0
- package/corpus/templates/content/shared/builder-mdx.ts +1037 -0
- package/corpus/templates/content/shared/content-source.ts +6 -0
- package/corpus/templates/content/shared/nfm-registry.ts +4 -0
- package/corpus/templates/content/vite.config.ts +13 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +137 -0
- package/corpus/templates/design/AGENTS.md +95 -5
- package/corpus/templates/design/DESIGN.md +82 -0
- package/corpus/templates/design/DEVELOPING.md +43 -0
- package/corpus/templates/design/actions/add-localhost-screens.ts +426 -0
- package/corpus/templates/design/actions/apply-shader.ts +277 -0
- package/corpus/templates/design/actions/apply-visual-edit.ts +303 -0
- package/corpus/templates/design/actions/connect-localhost.ts +183 -0
- package/corpus/templates/design/actions/edit-design.ts +195 -42
- package/corpus/templates/design/actions/generate-design.ts +71 -1
- package/corpus/templates/design/actions/generate-screens.ts +193 -0
- package/corpus/templates/design/actions/get-code-layer-projection.ts +191 -0
- package/corpus/templates/design/actions/get-shader.ts +119 -0
- package/corpus/templates/design/actions/list-localhost-connections.ts +95 -0
- package/corpus/templates/design/actions/navigate.ts +55 -2
- package/corpus/templates/design/actions/view-screen.ts +68 -1
- package/corpus/templates/design/agent-native.app-skill.json +10 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +761 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +2057 -103
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +74 -38
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +399 -0
- package/corpus/templates/design/app/components/design/EditPanel.tsx +3185 -439
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +1124 -0
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +3116 -147
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +700 -13
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +107 -63
- package/corpus/templates/design/app/components/design/index.ts +0 -5
- package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +286 -0
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +699 -0
- package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +461 -0
- package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +166 -0
- package/corpus/templates/design/app/components/design/inspector/FigmaColorPicker.tsx +1420 -0
- package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +420 -0
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +215 -0
- package/corpus/templates/design/app/components/design/inspector/ShaderControls.stories.tsx +71 -0
- package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +518 -0
- package/corpus/templates/design/app/components/design/inspector/ShaderEffectRow.tsx +106 -0
- package/corpus/templates/design/app/components/design/inspector/figma-icons.tsx +361 -0
- package/corpus/templates/design/app/components/design/inspector/index.ts +60 -0
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +201 -0
- package/corpus/templates/design/app/components/design/types.ts +23 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +24 -13
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +4 -4
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +474 -36
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +22 -5
- package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +24 -11
- package/corpus/templates/design/app/global.css +121 -3
- package/corpus/templates/design/app/hooks/use-agent-generating.ts +4 -0
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +130 -8
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +329 -0
- package/corpus/templates/design/app/i18n/zh-TW.ts +264 -0
- package/corpus/templates/design/app/i18n-data.ts +2790 -1
- package/corpus/templates/design/app/pages/DesignEditor.tsx +5108 -851
- package/corpus/templates/design/changelog/2026-06-28-annotate-mode-now-combines-drawing-and-comment-pins-in-one-c.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-design-editor-panel-borders-are-cleaner-so-the-canvas-edge-s.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-drawing-prompts-now-reliably-open-and-submit-to-the-design-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-editor-app-menus-now-use-an-outline-agent-native-mark-with-b.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-figma-style-code-design-mode.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-layer-selection-now-updates-chat-context-without-opening-the.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-layer-selections-now-preserve-hidden-and-locked-canvas-state.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-live-cursors-now-keep-names-beside-a-cleaner-pointer-marker.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-mode-switching-now-lives-in-a-compact-bottom-right-icon-dock.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-screen-overview-now-handles-zooming-drawing-opening-and-dele.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-screen-overview-now-selects-screens-on-click-and-opens-them-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-screen-overview-zooms-into-the-active-screen-with-smoother-e.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-selected-element-chips-in-chat-are-shorter-and-easier-to-sca.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-the-design-editor-toolbar-is-more-compact-and-the-app-menu-m.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-tweaks-now-live-at-the-top-of-the-design-sidebar-instead-of-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-28-tweaks-now-live-in-the-right-inspector-beside-the-design-tab.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-active-sidebar-rows-use-soft-highlights.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-agents-can-now-open-screen-overview-focus-screens-and-add.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-agents-now-edit-broad-copy-changes-more-reliably.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-editor-extensions-now-run-inline-beside-the-artboard.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-sidebars-use-darker-chrome-and-chat-warns-immediately.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-visual-edit-can-open-localhost-routes-as-url-backed-screens.md +6 -0
- package/corpus/templates/design/package.json +1 -0
- package/corpus/templates/design/server/db/schema.ts +26 -0
- package/corpus/templates/design/server/lib/design-snapshot.ts +1 -1
- package/corpus/templates/design/server/plugins/agent-chat.ts +3 -0
- package/corpus/templates/design/shared/api.ts +27 -0
- package/corpus/templates/design/shared/canvas-frames.ts +103 -0
- package/corpus/templates/design/shared/canvas-math.ts +1058 -0
- package/corpus/templates/design/shared/code-layer.ts +2212 -0
- package/corpus/templates/design/shared/color-utils.ts +180 -0
- package/corpus/templates/design/shared/generation-session.ts +61 -0
- package/corpus/templates/design/shared/shader-presets.ts +782 -0
- package/corpus/templates/design/shared/shader-safety.ts +137 -0
- package/corpus/templates/design/shared/source-mode.ts +237 -0
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +149 -6
- package/corpus/templates/forms/app/i18n/ar-SA.ts +2 -0
- package/corpus/templates/forms/app/i18n/de-DE.ts +2 -0
- package/corpus/templates/forms/app/i18n/en-US.ts +2 -0
- package/corpus/templates/forms/app/i18n/es-ES.ts +2 -0
- package/corpus/templates/forms/app/i18n/fr-FR.ts +2 -0
- package/corpus/templates/forms/app/i18n/hi-IN.ts +2 -0
- package/corpus/templates/forms/app/i18n/ja-JP.ts +2 -0
- package/corpus/templates/forms/app/i18n/ko-KR.ts +2 -0
- package/corpus/templates/forms/app/i18n/pt-BR.ts +2 -0
- package/corpus/templates/forms/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/forms/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/forms/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +2 -2
- package/corpus/templates/macros/changelog/2026-06-28-left-sidebar-footer-controls-use-less-divider-chrome.md +6 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +408 -247
- package/corpus/templates/mail/app/i18n/ar-SA.ts +4 -0
- package/corpus/templates/mail/app/i18n/de-DE.ts +4 -0
- package/corpus/templates/mail/app/i18n/en-US.ts +4 -0
- package/corpus/templates/mail/app/i18n/es-ES.ts +4 -0
- package/corpus/templates/mail/app/i18n/fr-FR.ts +4 -0
- package/corpus/templates/mail/app/i18n/hi-IN.ts +4 -0
- package/corpus/templates/mail/app/i18n/ja-JP.ts +4 -0
- package/corpus/templates/mail/app/i18n/ko-KR.ts +4 -0
- package/corpus/templates/mail/app/i18n/pt-BR.ts +4 -0
- package/corpus/templates/mail/app/i18n/zh-CN.ts +4 -0
- package/corpus/templates/mail/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/mail/changelog/2026-06-28-pinned-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +25 -92
- package/corpus/templates/plan/.agents/skills/visual-plan/references/connection.md +51 -0
- package/corpus/templates/plan/.agents/skills/visual-plan/references/document-quality.md +5 -1
- package/corpus/templates/plan/.agents/skills/visual-plan/references/local-files.md +85 -0
- package/corpus/templates/plan/.agents/skills/visual-plan/references/wireframe.md +21 -0
- package/corpus/templates/plan/.agents/skills/visual-recap/SKILL.md +32 -104
- package/corpus/templates/plan/.agents/skills/visual-recap/references/connection.md +51 -0
- package/corpus/templates/plan/.agents/skills/visual-recap/references/local-files.md +85 -0
- package/corpus/templates/plan/.agents/skills/visual-recap/references/wireframe.md +21 -0
- package/corpus/templates/plan/actions/create-prototype-plan.ts +1 -1
- package/corpus/templates/plan/actions/delete-visual-plan.ts +2 -2
- package/corpus/templates/plan/actions/get-plan-blocks.ts +2 -0
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +6 -8
- package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +25 -29
- package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +10 -5
- package/corpus/templates/plan/app/components/plan/wireframe/html-artboard.css +15 -3
- package/corpus/templates/plan/app/components/plan/wireframe/kit/rough.tsx +6 -6
- package/corpus/templates/plan/app/components/plan/wireframe/sanitize-html.ts +71 -6
- package/corpus/templates/plan/app/global.css +67 -81
- package/corpus/templates/plan/app/pages/PlansPage.tsx +8 -0
- package/corpus/templates/plan/app/root.tsx +31 -1
- package/corpus/templates/plan/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-28-plan-canvases-stay-stable-while-panning-and-zooming-in-chrom.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-28-plan-wireframes-avoid-overlapping-sketch-lines-in-dense-mockups.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-28-plan-wireframes-ignore-host-color-utility-classes-so-canvas-.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-28-plans-use-the-shared-neutral-light-and-dark-theme.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-28-sending-open-feedback-from-a-plan-now-opens-the-inline-plan-.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-28-wireframe-style-can-now-be-switched-between-sketchy-and-clean.md +6 -0
- package/corpus/templates/plan/server/plan-content.ts +62 -3
- package/corpus/templates/plan/server/plan-mdx.ts +177 -2
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/slides/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/templates/videos/app/components/Sidebar.tsx +2 -2
- package/corpus/templates/videos/app/components/layout/Layout.tsx +29 -2
- package/corpus/templates/videos/app/components/layout/NavSidebar.tsx +113 -30
- package/corpus/templates/videos/app/i18n/ar-SA.ts +2 -0
- package/corpus/templates/videos/app/i18n/de-DE.ts +2 -0
- package/corpus/templates/videos/app/i18n/en-US.ts +2 -0
- package/corpus/templates/videos/app/i18n/es-ES.ts +2 -0
- package/corpus/templates/videos/app/i18n/fr-FR.ts +2 -0
- package/corpus/templates/videos/app/i18n/hi-IN.ts +2 -0
- package/corpus/templates/videos/app/i18n/ja-JP.ts +2 -0
- package/corpus/templates/videos/app/i18n/ko-KR.ts +2 -0
- package/corpus/templates/videos/app/i18n/pt-BR.ts +2 -0
- package/corpus/templates/videos/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/videos/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/videos/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
- package/dist/agent/engine/index.d.ts +1 -1
- package/dist/agent/engine/index.d.ts.map +1 -1
- package/dist/agent/engine/index.js +1 -1
- package/dist/agent/engine/index.js.map +1 -1
- package/dist/agent/engine/registry.d.ts +9 -0
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +37 -0
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +4 -3
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/application-state/store.js +5 -5
- package/dist/application-state/store.js.map +1 -1
- package/dist/chat-threads/store.js +2 -2
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/content-local.d.ts +31 -0
- package/dist/cli/content-local.d.ts.map +1 -0
- package/dist/cli/content-local.js +300 -0
- package/dist/cli/content-local.js.map +1 -0
- package/dist/cli/design-connect.d.ts +52 -0
- package/dist/cli/design-connect.d.ts.map +1 -0
- package/dist/cli/design-connect.js +409 -0
- package/dist/cli/design-connect.js.map +1 -0
- package/dist/cli/index.js +31 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts +13 -4
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +348 -200
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +34 -4
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +8 -69
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat.d.ts +6 -0
- package/dist/client/agent-chat.d.ts.map +1 -1
- package/dist/client/agent-chat.js +17 -3
- package/dist/client/agent-chat.js.map +1 -1
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +48 -13
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/blocks/index.d.ts +1 -1
- package/dist/client/blocks/index.d.ts.map +1 -1
- package/dist/client/blocks/index.js +1 -1
- package/dist/client/blocks/index.js.map +1 -1
- package/dist/client/blocks/library/MermaidBlock.js +1 -1
- package/dist/client/blocks/library/MermaidBlock.js.map +1 -1
- package/dist/client/blocks/library/diagram.config.d.ts +9 -9
- package/dist/client/blocks/library/diagram.config.d.ts.map +1 -1
- package/dist/client/blocks/library/diagram.config.js +36 -12
- package/dist/client/blocks/library/diagram.config.js.map +1 -1
- package/dist/client/blocks/library/diagram.js +1 -1
- package/dist/client/blocks/library/diagram.js.map +1 -1
- package/dist/client/blocks/library/sanitize-html.d.ts +3 -1
- package/dist/client/blocks/library/sanitize-html.d.ts.map +1 -1
- package/dist/client/blocks/library/sanitize-html.js +53 -5
- package/dist/client/blocks/library/sanitize-html.js.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.d.ts +2 -2
- package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.js +2 -2
- package/dist/client/blocks/library/wireframe-kit.js.map +1 -1
- package/dist/client/blocks/library/wireframe.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe.js +5 -2
- package/dist/client/blocks/library/wireframe.js.map +1 -1
- package/dist/client/blocks/mdx.d.ts +11 -0
- package/dist/client/blocks/mdx.d.ts.map +1 -1
- package/dist/client/blocks/mdx.js +47 -1
- package/dist/client/blocks/mdx.js.map +1 -1
- package/dist/client/blocks/server.d.ts +1 -1
- package/dist/client/blocks/server.d.ts.map +1 -1
- package/dist/client/blocks/server.js +1 -1
- package/dist/client/blocks/server.js.map +1 -1
- package/dist/client/blocks/types.d.ts +5 -4
- package/dist/client/blocks/types.d.ts.map +1 -1
- package/dist/client/blocks/types.js.map +1 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +2 -12
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat-model-groups.d.ts +22 -0
- package/dist/client/chat-model-groups.d.ts.map +1 -0
- package/dist/client/chat-model-groups.js +93 -0
- package/dist/client/chat-model-groups.js.map +1 -0
- package/dist/client/components/LiveCursorOverlay.d.ts +1 -2
- package/dist/client/components/LiveCursorOverlay.d.ts.map +1 -1
- package/dist/client/components/LiveCursorOverlay.js +19 -40
- package/dist/client/components/LiveCursorOverlay.js.map +1 -1
- package/dist/client/components/ui/dialog.d.ts +14 -0
- package/dist/client/components/ui/dialog.d.ts.map +1 -0
- package/dist/client/components/ui/dialog.js +21 -0
- package/dist/client/components/ui/dialog.js.map +1 -0
- package/dist/client/composer/ComposerPlusMenu.d.ts.map +1 -1
- package/dist/client/composer/ComposerPlusMenu.js +24 -149
- package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +3 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +86 -24
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/useVoiceDictation.d.ts +9 -0
- package/dist/client/composer/useVoiceDictation.d.ts.map +1 -1
- package/dist/client/composer/useVoiceDictation.js +154 -32
- package/dist/client/composer/useVoiceDictation.js.map +1 -1
- package/dist/client/frame-protocol.d.ts +17 -2
- package/dist/client/frame-protocol.d.ts.map +1 -1
- package/dist/client/frame-protocol.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.d.ts +13 -0
- package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -0
- package/dist/client/resources/McpIntegrationDialog.js +261 -0
- package/dist/client/resources/McpIntegrationDialog.js.map +1 -0
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +74 -190
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/resources/mcp-integration-catalog.d.ts +30 -0
- package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -0
- package/dist/client/resources/mcp-integration-catalog.js +191 -0
- package/dist/client/resources/mcp-integration-catalog.js.map +1 -0
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js +2 -2
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -1
- package/dist/client/settings/SettingsPanel.js +1 -1
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/sharing/ShareButton.d.ts +2 -0
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +7 -6
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/use-agent-engine-configured.d.ts +5 -0
- package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
- package/dist/client/use-agent-engine-configured.js +51 -25
- package/dist/client/use-agent-engine-configured.js.map +1 -1
- package/dist/client/use-chat-models.d.ts +2 -7
- package/dist/client/use-chat-models.d.ts.map +1 -1
- package/dist/client/use-chat-models.js +8 -78
- package/dist/client/use-chat-models.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +2 -2
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +0 -5
- package/dist/db/client.js.map +1 -1
- package/dist/integrations/adapters/email.js +2 -2
- package/dist/integrations/adapters/email.js.map +1 -1
- package/dist/local-artifacts/index.d.ts +6 -0
- package/dist/local-artifacts/index.d.ts.map +1 -1
- package/dist/local-artifacts/index.js +12 -0
- package/dist/local-artifacts/index.js.map +1 -1
- package/dist/localization/default-messages.d.ts +76 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +76 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/localization/shared.d.ts +1 -1
- package/dist/localization/shared.js +3 -3
- package/dist/localization/shared.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +6 -6
- package/dist/org/handlers.js +2 -2
- package/dist/org/handlers.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/resources/store.js +7 -7
- package/dist/resources/store.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/core-routes-plugin.d.ts +1 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +29 -11
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts.map +1 -1
- package/dist/server/transcribe-voice.js +40 -24
- package/dist/server/transcribe-voice.js.map +1 -1
- package/dist/shared/mcp-embed-headers.d.ts +1 -0
- package/dist/shared/mcp-embed-headers.d.ts.map +1 -1
- package/dist/shared/mcp-embed-headers.js +20 -1
- package/dist/shared/mcp-embed-headers.js.map +1 -1
- package/dist/shared/mcp-integration-config.d.ts +27 -0
- package/dist/shared/mcp-integration-config.d.ts.map +1 -0
- package/dist/shared/mcp-integration-config.js +56 -0
- package/dist/shared/mcp-integration-config.js.map +1 -0
- package/dist/styles/agent-native.css +58 -107
- package/dist/styles/blocks.css +15 -3
- package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
- package/dist/vite/client.d.ts +11 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +4 -0
- package/dist/vite/client.js.map +1 -1
- package/dist/voice/index.d.ts +5 -0
- package/dist/voice/index.d.ts.map +1 -0
- package/dist/voice/index.js +4 -0
- package/dist/voice/index.js.map +1 -0
- package/dist/voice/voice-cleanup-prompt.d.ts +6 -0
- package/dist/voice/voice-cleanup-prompt.d.ts.map +1 -0
- package/dist/voice/voice-cleanup-prompt.js +26 -0
- package/dist/voice/voice-cleanup-prompt.js.map +1 -0
- package/dist/voice/voice-context.d.ts +25 -0
- package/dist/voice/voice-context.d.ts.map +1 -0
- package/dist/voice/voice-context.js +156 -0
- package/dist/voice/voice-context.js.map +1 -0
- package/dist/voice/voice-replacements.d.ts +4 -0
- package/dist/voice/voice-replacements.d.ts.map +1 -0
- package/dist/voice/voice-replacements.js +52 -0
- package/dist/voice/voice-replacements.js.map +1 -0
- package/docs/content/a2a-protocol.mdx +97 -9
- package/docs/content/actions.mdx +65 -4
- package/docs/content/agent-mentions.mdx +68 -4
- package/docs/content/agent-surfaces.mdx +112 -8
- package/docs/content/agent-teams.mdx +171 -12
- package/docs/content/agent-web-surfaces.mdx +51 -4
- package/docs/content/authentication.mdx +122 -8
- package/docs/content/automations.mdx +110 -8
- package/docs/content/blueprint-installer.mdx +42 -4
- package/docs/content/cli-adapters.mdx +44 -4
- package/docs/content/client.mdx +79 -8
- package/docs/content/cloneable-saas.mdx +85 -8
- package/docs/content/code-agents-ui.mdx +98 -8
- package/docs/content/components.mdx +118 -8
- package/docs/content/context-awareness.mdx +98 -8
- package/docs/content/creating-templates.mdx +49 -4
- package/docs/content/cross-app-sso.mdx +109 -8
- package/docs/content/database.mdx +56 -4
- package/docs/content/deployment.mdx +103 -8
- package/docs/content/dispatch.mdx +134 -8
- package/docs/content/drop-in-agent.mdx +63 -4
- package/docs/content/durable-background-runs.mdx +98 -8
- package/docs/content/durable-resume.mdx +47 -4
- package/docs/content/embedding-sdk.mdx +83 -8
- package/docs/content/evals.mdx +102 -8
- package/docs/content/extensions.mdx +113 -9
- package/docs/content/external-agents.mdx +119 -8
- package/docs/content/faq.mdx +98 -8
- package/docs/content/file-uploads.mdx +61 -4
- package/docs/content/frames.mdx +90 -8
- package/docs/content/generative-ui.mdx +50 -4
- package/docs/content/getting-started.mdx +34 -4
- package/docs/content/harness-agents.mdx +77 -8
- package/docs/content/human-approval.mdx +50 -4
- package/docs/content/key-concepts.mdx +102 -8
- package/docs/content/local-file-mode.mdx +58 -4
- package/docs/content/locales/ar-SA/a2a-protocol.mdx +97 -9
- package/docs/content/locales/ar-SA/actions.mdx +65 -4
- package/docs/content/locales/ar-SA/agent-mentions.mdx +68 -4
- package/docs/content/locales/ar-SA/agent-surfaces.mdx +114 -8
- package/docs/content/locales/ar-SA/agent-teams.mdx +174 -12
- package/docs/content/locales/ar-SA/agent-web-surfaces.mdx +49 -4
- package/docs/content/locales/ar-SA/authentication.mdx +120 -8
- package/docs/content/locales/ar-SA/automations.mdx +110 -8
- package/docs/content/locales/ar-SA/blueprint-installer.mdx +42 -4
- package/docs/content/locales/ar-SA/cli-adapters.mdx +40 -4
- package/docs/content/locales/ar-SA/client.mdx +80 -8
- package/docs/content/locales/ar-SA/cloneable-saas.mdx +85 -8
- package/docs/content/locales/ar-SA/code-agents-ui.mdx +99 -8
- package/docs/content/locales/ar-SA/components.mdx +114 -8
- package/docs/content/locales/ar-SA/context-awareness.mdx +100 -8
- package/docs/content/locales/ar-SA/creating-templates.mdx +51 -4
- package/docs/content/locales/ar-SA/cross-app-sso.mdx +109 -8
- package/docs/content/locales/ar-SA/database.mdx +52 -4
- package/docs/content/locales/ar-SA/deployment.mdx +103 -8
- package/docs/content/locales/ar-SA/dispatch.mdx +134 -8
- package/docs/content/locales/ar-SA/drop-in-agent.mdx +63 -4
- package/docs/content/locales/ar-SA/durable-resume.mdx +47 -4
- package/docs/content/locales/ar-SA/embedding-sdk.mdx +83 -8
- package/docs/content/locales/ar-SA/evals.mdx +102 -8
- package/docs/content/locales/ar-SA/extensions.mdx +113 -9
- package/docs/content/locales/ar-SA/external-agents.mdx +119 -8
- package/docs/content/locales/ar-SA/faq.mdx +98 -8
- package/docs/content/locales/ar-SA/file-uploads.mdx +61 -4
- package/docs/content/locales/ar-SA/frames.mdx +88 -8
- package/docs/content/locales/ar-SA/getting-started.mdx +34 -4
- package/docs/content/locales/ar-SA/harness-agents.mdx +79 -8
- package/docs/content/locales/ar-SA/human-approval.mdx +50 -4
- package/docs/content/locales/ar-SA/key-concepts.mdx +107 -8
- package/docs/content/locales/ar-SA/local-file-mode.mdx +56 -4
- package/docs/content/locales/ar-SA/mcp-apps.mdx +120 -10
- package/docs/content/locales/ar-SA/mcp-clients.mdx +133 -8
- package/docs/content/locales/ar-SA/mcp-protocol.mdx +105 -8
- package/docs/content/locales/ar-SA/messaging.mdx +115 -8
- package/docs/content/locales/ar-SA/migration-workbench.mdx +47 -4
- package/docs/content/locales/ar-SA/multi-app-workspace.mdx +91 -8
- package/docs/content/locales/ar-SA/multi-tenancy.mdx +80 -8
- package/docs/content/locales/ar-SA/native-chat-ui.mdx +104 -8
- package/docs/content/locales/ar-SA/notifications.mdx +135 -8
- package/docs/content/locales/ar-SA/observability.mdx +102 -8
- package/docs/content/locales/ar-SA/observational-memory.mdx +87 -8
- package/docs/content/locales/ar-SA/onboarding.mdx +45 -4
- package/docs/content/locales/ar-SA/plan-plugin.mdx +99 -8
- package/docs/content/locales/ar-SA/pr-visual-recap.mdx +125 -8
- package/docs/content/locales/ar-SA/processors.mdx +41 -4
- package/docs/content/locales/ar-SA/progress.mdx +46 -4
- package/docs/content/locales/ar-SA/pure-agent-apps.mdx +48 -4
- package/docs/content/locales/ar-SA/real-time-collaboration.mdx +102 -8
- package/docs/content/locales/ar-SA/recurring-jobs.mdx +59 -4
- package/docs/content/locales/ar-SA/routing.mdx +44 -5
- package/docs/content/locales/ar-SA/sandbox-adapters.mdx +43 -4
- package/docs/content/locales/ar-SA/security.mdx +80 -8
- package/docs/content/locales/ar-SA/server.mdx +173 -12
- package/docs/content/locales/ar-SA/sharing.mdx +45 -4
- package/docs/content/locales/ar-SA/skills-guide.mdx +118 -9
- package/docs/content/locales/ar-SA/template-analytics.mdx +46 -4
- package/docs/content/locales/ar-SA/template-assets.mdx +62 -4
- package/docs/content/locales/ar-SA/template-brain.mdx +65 -4
- package/docs/content/locales/ar-SA/template-calendar.mdx +62 -4
- package/docs/content/locales/ar-SA/template-chat.mdx +61 -4
- package/docs/content/locales/ar-SA/template-clips.mdx +52 -4
- package/docs/content/locales/ar-SA/template-content.mdx +62 -4
- package/docs/content/locales/ar-SA/template-design.mdx +101 -4
- package/docs/content/locales/ar-SA/template-dispatch.mdx +57 -4
- package/docs/content/locales/ar-SA/template-forms.mdx +62 -4
- package/docs/content/locales/ar-SA/template-mail.mdx +60 -4
- package/docs/content/locales/ar-SA/template-plan.mdx +61 -4
- package/docs/content/locales/ar-SA/template-slides.mdx +49 -4
- package/docs/content/locales/ar-SA/template-videos.mdx +53 -4
- package/docs/content/locales/ar-SA/tracking.mdx +54 -4
- package/docs/content/locales/ar-SA/using-your-agent.mdx +51 -4
- package/docs/content/locales/ar-SA/voice-input.mdx +43 -4
- package/docs/content/locales/ar-SA/what-is-agent-native.mdx +96 -8
- package/docs/content/locales/ar-SA/workspace-connections.mdx +128 -8
- package/docs/content/locales/ar-SA/workspace-management.mdx +50 -4
- package/docs/content/locales/ar-SA/workspace.mdx +112 -8
- package/docs/content/locales/ar-SA/writing-agent-instructions.mdx +41 -4
- package/docs/content/locales/de-DE/a2a-protocol.mdx +99 -9
- package/docs/content/locales/de-DE/actions.mdx +67 -4
- package/docs/content/locales/de-DE/agent-mentions.mdx +68 -4
- package/docs/content/locales/de-DE/agent-surfaces.mdx +116 -8
- package/docs/content/locales/de-DE/agent-teams.mdx +171 -12
- package/docs/content/locales/de-DE/agent-web-surfaces.mdx +51 -4
- package/docs/content/locales/de-DE/authentication.mdx +122 -8
- package/docs/content/locales/de-DE/automations.mdx +110 -8
- package/docs/content/locales/de-DE/blueprint-installer.mdx +42 -4
- package/docs/content/locales/de-DE/cli-adapters.mdx +44 -4
- package/docs/content/locales/de-DE/client.mdx +79 -8
- package/docs/content/locales/de-DE/cloneable-saas.mdx +85 -8
- package/docs/content/locales/de-DE/code-agents-ui.mdx +100 -8
- package/docs/content/locales/de-DE/components.mdx +118 -8
- package/docs/content/locales/de-DE/context-awareness.mdx +98 -8
- package/docs/content/locales/de-DE/creating-templates.mdx +51 -4
- package/docs/content/locales/de-DE/cross-app-sso.mdx +109 -8
- package/docs/content/locales/de-DE/database.mdx +52 -4
- package/docs/content/locales/de-DE/deployment.mdx +103 -8
- package/docs/content/locales/de-DE/dispatch.mdx +134 -8
- package/docs/content/locales/de-DE/drop-in-agent.mdx +63 -4
- package/docs/content/locales/de-DE/durable-resume.mdx +47 -4
- package/docs/content/locales/de-DE/embedding-sdk.mdx +85 -8
- package/docs/content/locales/de-DE/evals.mdx +102 -8
- package/docs/content/locales/de-DE/extensions.mdx +113 -9
- package/docs/content/locales/de-DE/external-agents.mdx +119 -8
- package/docs/content/locales/de-DE/faq.mdx +98 -8
- package/docs/content/locales/de-DE/file-uploads.mdx +61 -4
- package/docs/content/locales/de-DE/frames.mdx +88 -8
- package/docs/content/locales/de-DE/getting-started.mdx +34 -4
- package/docs/content/locales/de-DE/harness-agents.mdx +79 -8
- package/docs/content/locales/de-DE/human-approval.mdx +50 -4
- package/docs/content/locales/de-DE/key-concepts.mdx +104 -8
- package/docs/content/locales/de-DE/local-file-mode.mdx +58 -4
- package/docs/content/locales/de-DE/mcp-apps.mdx +120 -10
- package/docs/content/locales/de-DE/mcp-clients.mdx +133 -8
- package/docs/content/locales/de-DE/mcp-protocol.mdx +105 -8
- package/docs/content/locales/de-DE/messaging.mdx +115 -8
- package/docs/content/locales/de-DE/migration-workbench.mdx +47 -4
- package/docs/content/locales/de-DE/multi-app-workspace.mdx +91 -8
- package/docs/content/locales/de-DE/multi-tenancy.mdx +80 -8
- package/docs/content/locales/de-DE/native-chat-ui.mdx +108 -8
- package/docs/content/locales/de-DE/notifications.mdx +135 -8
- package/docs/content/locales/de-DE/observability.mdx +102 -8
- package/docs/content/locales/de-DE/observational-memory.mdx +92 -8
- package/docs/content/locales/de-DE/onboarding.mdx +45 -4
- package/docs/content/locales/de-DE/plan-plugin.mdx +99 -8
- package/docs/content/locales/de-DE/pr-visual-recap.mdx +125 -8
- package/docs/content/locales/de-DE/processors.mdx +41 -4
- package/docs/content/locales/de-DE/progress.mdx +46 -4
- package/docs/content/locales/de-DE/pure-agent-apps.mdx +50 -4
- package/docs/content/locales/de-DE/real-time-collaboration.mdx +104 -8
- package/docs/content/locales/de-DE/recurring-jobs.mdx +59 -4
- package/docs/content/locales/de-DE/routing.mdx +44 -5
- package/docs/content/locales/de-DE/sandbox-adapters.mdx +43 -4
- package/docs/content/locales/de-DE/security.mdx +80 -8
- package/docs/content/locales/de-DE/server.mdx +171 -12
- package/docs/content/locales/de-DE/sharing.mdx +45 -4
- package/docs/content/locales/de-DE/skills-guide.mdx +118 -9
- package/docs/content/locales/de-DE/template-analytics.mdx +46 -4
- package/docs/content/locales/de-DE/template-assets.mdx +62 -4
- package/docs/content/locales/de-DE/template-brain.mdx +69 -4
- package/docs/content/locales/de-DE/template-calendar.mdx +62 -4
- package/docs/content/locales/de-DE/template-chat.mdx +61 -4
- package/docs/content/locales/de-DE/template-clips.mdx +52 -4
- package/docs/content/locales/de-DE/template-content.mdx +60 -4
- package/docs/content/locales/de-DE/template-design.mdx +109 -4
- package/docs/content/locales/de-DE/template-dispatch.mdx +57 -4
- package/docs/content/locales/de-DE/template-forms.mdx +64 -4
- package/docs/content/locales/de-DE/template-mail.mdx +60 -4
- package/docs/content/locales/de-DE/template-plan.mdx +63 -4
- package/docs/content/locales/de-DE/template-slides.mdx +49 -4
- package/docs/content/locales/de-DE/template-videos.mdx +53 -4
- package/docs/content/locales/de-DE/tracking.mdx +54 -4
- package/docs/content/locales/de-DE/using-your-agent.mdx +51 -4
- package/docs/content/locales/de-DE/voice-input.mdx +45 -4
- package/docs/content/locales/de-DE/what-is-agent-native.mdx +100 -8
- package/docs/content/locales/de-DE/workspace-connections.mdx +128 -8
- package/docs/content/locales/de-DE/workspace-management.mdx +50 -4
- package/docs/content/locales/de-DE/workspace.mdx +111 -8
- package/docs/content/locales/de-DE/writing-agent-instructions.mdx +45 -4
- package/docs/content/locales/es-ES/a2a-protocol.mdx +99 -9
- package/docs/content/locales/es-ES/actions.mdx +67 -4
- package/docs/content/locales/es-ES/agent-mentions.mdx +68 -4
- package/docs/content/locales/es-ES/agent-surfaces.mdx +120 -8
- package/docs/content/locales/es-ES/agent-teams.mdx +172 -12
- package/docs/content/locales/es-ES/agent-web-surfaces.mdx +51 -4
- package/docs/content/locales/es-ES/authentication.mdx +122 -8
- package/docs/content/locales/es-ES/automations.mdx +110 -8
- package/docs/content/locales/es-ES/blueprint-installer.mdx +42 -4
- package/docs/content/locales/es-ES/cli-adapters.mdx +44 -4
- package/docs/content/locales/es-ES/client.mdx +79 -8
- package/docs/content/locales/es-ES/cloneable-saas.mdx +85 -8
- package/docs/content/locales/es-ES/code-agents-ui.mdx +101 -8
- package/docs/content/locales/es-ES/components.mdx +118 -8
- package/docs/content/locales/es-ES/context-awareness.mdx +98 -8
- package/docs/content/locales/es-ES/creating-templates.mdx +51 -4
- package/docs/content/locales/es-ES/cross-app-sso.mdx +109 -8
- package/docs/content/locales/es-ES/database.mdx +52 -4
- package/docs/content/locales/es-ES/deployment.mdx +103 -8
- package/docs/content/locales/es-ES/dispatch.mdx +134 -8
- package/docs/content/locales/es-ES/drop-in-agent.mdx +63 -4
- package/docs/content/locales/es-ES/durable-resume.mdx +47 -4
- package/docs/content/locales/es-ES/embedding-sdk.mdx +87 -8
- package/docs/content/locales/es-ES/evals.mdx +102 -8
- package/docs/content/locales/es-ES/extensions.mdx +113 -9
- package/docs/content/locales/es-ES/external-agents.mdx +119 -8
- package/docs/content/locales/es-ES/faq.mdx +98 -8
- package/docs/content/locales/es-ES/file-uploads.mdx +61 -4
- package/docs/content/locales/es-ES/frames.mdx +88 -8
- package/docs/content/locales/es-ES/getting-started.mdx +34 -4
- package/docs/content/locales/es-ES/harness-agents.mdx +79 -8
- package/docs/content/locales/es-ES/human-approval.mdx +50 -4
- package/docs/content/locales/es-ES/key-concepts.mdx +104 -8
- package/docs/content/locales/es-ES/local-file-mode.mdx +60 -4
- package/docs/content/locales/es-ES/mcp-apps.mdx +120 -10
- package/docs/content/locales/es-ES/mcp-clients.mdx +135 -8
- package/docs/content/locales/es-ES/mcp-protocol.mdx +105 -8
- package/docs/content/locales/es-ES/messaging.mdx +115 -8
- package/docs/content/locales/es-ES/migration-workbench.mdx +47 -4
- package/docs/content/locales/es-ES/multi-app-workspace.mdx +91 -8
- package/docs/content/locales/es-ES/multi-tenancy.mdx +80 -8
- package/docs/content/locales/es-ES/native-chat-ui.mdx +108 -8
- package/docs/content/locales/es-ES/notifications.mdx +135 -8
- package/docs/content/locales/es-ES/observability.mdx +104 -8
- package/docs/content/locales/es-ES/observational-memory.mdx +92 -8
- package/docs/content/locales/es-ES/onboarding.mdx +45 -4
- package/docs/content/locales/es-ES/plan-plugin.mdx +99 -8
- package/docs/content/locales/es-ES/pr-visual-recap.mdx +125 -8
- package/docs/content/locales/es-ES/processors.mdx +41 -4
- package/docs/content/locales/es-ES/progress.mdx +46 -4
- package/docs/content/locales/es-ES/pure-agent-apps.mdx +50 -4
- package/docs/content/locales/es-ES/real-time-collaboration.mdx +109 -8
- package/docs/content/locales/es-ES/recurring-jobs.mdx +59 -4
- package/docs/content/locales/es-ES/routing.mdx +44 -5
- package/docs/content/locales/es-ES/sandbox-adapters.mdx +44 -4
- package/docs/content/locales/es-ES/security.mdx +82 -8
- package/docs/content/locales/es-ES/server.mdx +173 -12
- package/docs/content/locales/es-ES/sharing.mdx +45 -4
- package/docs/content/locales/es-ES/skills-guide.mdx +118 -9
- package/docs/content/locales/es-ES/template-analytics.mdx +46 -4
- package/docs/content/locales/es-ES/template-assets.mdx +64 -4
- package/docs/content/locales/es-ES/template-brain.mdx +69 -4
- package/docs/content/locales/es-ES/template-calendar.mdx +62 -4
- package/docs/content/locales/es-ES/template-chat.mdx +61 -4
- package/docs/content/locales/es-ES/template-clips.mdx +52 -4
- package/docs/content/locales/es-ES/template-content.mdx +64 -4
- package/docs/content/locales/es-ES/template-design.mdx +108 -4
- package/docs/content/locales/es-ES/template-dispatch.mdx +57 -4
- package/docs/content/locales/es-ES/template-forms.mdx +64 -4
- package/docs/content/locales/es-ES/template-mail.mdx +60 -4
- package/docs/content/locales/es-ES/template-plan.mdx +61 -4
- package/docs/content/locales/es-ES/template-slides.mdx +49 -4
- package/docs/content/locales/es-ES/template-videos.mdx +53 -4
- package/docs/content/locales/es-ES/tracking.mdx +54 -4
- package/docs/content/locales/es-ES/using-your-agent.mdx +51 -4
- package/docs/content/locales/es-ES/voice-input.mdx +45 -4
- package/docs/content/locales/es-ES/what-is-agent-native.mdx +99 -8
- package/docs/content/locales/es-ES/workspace-connections.mdx +128 -8
- package/docs/content/locales/es-ES/workspace-management.mdx +50 -4
- package/docs/content/locales/es-ES/workspace.mdx +112 -8
- package/docs/content/locales/es-ES/writing-agent-instructions.mdx +46 -4
- package/docs/content/locales/fr-FR/a2a-protocol.mdx +97 -9
- package/docs/content/locales/fr-FR/actions.mdx +67 -4
- package/docs/content/locales/fr-FR/agent-mentions.mdx +68 -4
- package/docs/content/locales/fr-FR/agent-surfaces.mdx +118 -8
- package/docs/content/locales/fr-FR/agent-teams.mdx +172 -12
- package/docs/content/locales/fr-FR/agent-web-surfaces.mdx +51 -4
- package/docs/content/locales/fr-FR/authentication.mdx +122 -8
- package/docs/content/locales/fr-FR/automations.mdx +110 -8
- package/docs/content/locales/fr-FR/blueprint-installer.mdx +42 -4
- package/docs/content/locales/fr-FR/cli-adapters.mdx +44 -4
- package/docs/content/locales/fr-FR/client.mdx +81 -8
- package/docs/content/locales/fr-FR/cloneable-saas.mdx +85 -8
- package/docs/content/locales/fr-FR/code-agents-ui.mdx +102 -8
- package/docs/content/locales/fr-FR/components.mdx +118 -8
- package/docs/content/locales/fr-FR/context-awareness.mdx +98 -8
- package/docs/content/locales/fr-FR/creating-templates.mdx +49 -4
- package/docs/content/locales/fr-FR/cross-app-sso.mdx +109 -8
- package/docs/content/locales/fr-FR/database.mdx +52 -4
- package/docs/content/locales/fr-FR/deployment.mdx +103 -8
- package/docs/content/locales/fr-FR/dispatch.mdx +134 -8
- package/docs/content/locales/fr-FR/drop-in-agent.mdx +63 -4
- package/docs/content/locales/fr-FR/durable-resume.mdx +47 -4
- package/docs/content/locales/fr-FR/embedding-sdk.mdx +87 -8
- package/docs/content/locales/fr-FR/evals.mdx +102 -8
- package/docs/content/locales/fr-FR/extensions.mdx +113 -9
- package/docs/content/locales/fr-FR/external-agents.mdx +119 -8
- package/docs/content/locales/fr-FR/faq.mdx +98 -8
- package/docs/content/locales/fr-FR/file-uploads.mdx +61 -4
- package/docs/content/locales/fr-FR/frames.mdx +90 -8
- package/docs/content/locales/fr-FR/getting-started.mdx +34 -4
- package/docs/content/locales/fr-FR/harness-agents.mdx +77 -8
- package/docs/content/locales/fr-FR/human-approval.mdx +50 -4
- package/docs/content/locales/fr-FR/key-concepts.mdx +106 -8
- package/docs/content/locales/fr-FR/local-file-mode.mdx +58 -4
- package/docs/content/locales/fr-FR/mcp-apps.mdx +120 -10
- package/docs/content/locales/fr-FR/mcp-clients.mdx +135 -8
- package/docs/content/locales/fr-FR/mcp-protocol.mdx +105 -8
- package/docs/content/locales/fr-FR/messaging.mdx +115 -8
- package/docs/content/locales/fr-FR/migration-workbench.mdx +47 -4
- package/docs/content/locales/fr-FR/multi-app-workspace.mdx +91 -8
- package/docs/content/locales/fr-FR/multi-tenancy.mdx +80 -8
- package/docs/content/locales/fr-FR/native-chat-ui.mdx +108 -8
- package/docs/content/locales/fr-FR/notifications.mdx +135 -8
- package/docs/content/locales/fr-FR/observability.mdx +104 -8
- package/docs/content/locales/fr-FR/observational-memory.mdx +89 -8
- package/docs/content/locales/fr-FR/onboarding.mdx +45 -4
- package/docs/content/locales/fr-FR/plan-plugin.mdx +99 -8
- package/docs/content/locales/fr-FR/pr-visual-recap.mdx +126 -8
- package/docs/content/locales/fr-FR/processors.mdx +41 -4
- package/docs/content/locales/fr-FR/progress.mdx +46 -4
- package/docs/content/locales/fr-FR/pure-agent-apps.mdx +48 -4
- package/docs/content/locales/fr-FR/real-time-collaboration.mdx +107 -8
- package/docs/content/locales/fr-FR/recurring-jobs.mdx +59 -4
- package/docs/content/locales/fr-FR/routing.mdx +44 -5
- package/docs/content/locales/fr-FR/sandbox-adapters.mdx +44 -4
- package/docs/content/locales/fr-FR/security.mdx +82 -8
- package/docs/content/locales/fr-FR/server.mdx +173 -12
- package/docs/content/locales/fr-FR/sharing.mdx +45 -4
- package/docs/content/locales/fr-FR/skills-guide.mdx +118 -9
- package/docs/content/locales/fr-FR/template-analytics.mdx +46 -4
- package/docs/content/locales/fr-FR/template-assets.mdx +66 -4
- package/docs/content/locales/fr-FR/template-brain.mdx +69 -4
- package/docs/content/locales/fr-FR/template-calendar.mdx +62 -4
- package/docs/content/locales/fr-FR/template-chat.mdx +61 -4
- package/docs/content/locales/fr-FR/template-clips.mdx +52 -4
- package/docs/content/locales/fr-FR/template-content.mdx +64 -4
- package/docs/content/locales/fr-FR/template-design.mdx +107 -4
- package/docs/content/locales/fr-FR/template-dispatch.mdx +57 -4
- package/docs/content/locales/fr-FR/template-forms.mdx +64 -4
- package/docs/content/locales/fr-FR/template-mail.mdx +60 -4
- package/docs/content/locales/fr-FR/template-plan.mdx +61 -4
- package/docs/content/locales/fr-FR/template-slides.mdx +49 -4
- package/docs/content/locales/fr-FR/template-videos.mdx +53 -4
- package/docs/content/locales/fr-FR/tracking.mdx +54 -4
- package/docs/content/locales/fr-FR/using-your-agent.mdx +51 -4
- package/docs/content/locales/fr-FR/voice-input.mdx +45 -4
- package/docs/content/locales/fr-FR/what-is-agent-native.mdx +101 -8
- package/docs/content/locales/fr-FR/workspace-connections.mdx +128 -8
- package/docs/content/locales/fr-FR/workspace-management.mdx +50 -4
- package/docs/content/locales/fr-FR/workspace.mdx +112 -8
- package/docs/content/locales/fr-FR/writing-agent-instructions.mdx +47 -4
- package/docs/content/locales/hi-IN/a2a-protocol.mdx +97 -9
- package/docs/content/locales/hi-IN/actions.mdx +63 -4
- package/docs/content/locales/hi-IN/agent-mentions.mdx +68 -4
- package/docs/content/locales/hi-IN/agent-surfaces.mdx +112 -8
- package/docs/content/locales/hi-IN/agent-teams.mdx +171 -12
- package/docs/content/locales/hi-IN/agent-web-surfaces.mdx +51 -4
- package/docs/content/locales/hi-IN/authentication.mdx +122 -8
- package/docs/content/locales/hi-IN/automations.mdx +110 -8
- package/docs/content/locales/hi-IN/blueprint-installer.mdx +42 -4
- package/docs/content/locales/hi-IN/cli-adapters.mdx +44 -4
- package/docs/content/locales/hi-IN/client.mdx +79 -8
- package/docs/content/locales/hi-IN/cloneable-saas.mdx +85 -8
- package/docs/content/locales/hi-IN/code-agents-ui.mdx +96 -8
- package/docs/content/locales/hi-IN/components.mdx +114 -8
- package/docs/content/locales/hi-IN/context-awareness.mdx +102 -8
- package/docs/content/locales/hi-IN/creating-templates.mdx +53 -4
- package/docs/content/locales/hi-IN/cross-app-sso.mdx +109 -8
- package/docs/content/locales/hi-IN/database.mdx +52 -4
- package/docs/content/locales/hi-IN/deployment.mdx +103 -8
- package/docs/content/locales/hi-IN/dispatch.mdx +134 -8
- package/docs/content/locales/hi-IN/drop-in-agent.mdx +63 -4
- package/docs/content/locales/hi-IN/durable-resume.mdx +47 -4
- package/docs/content/locales/hi-IN/embedding-sdk.mdx +83 -8
- package/docs/content/locales/hi-IN/evals.mdx +100 -8
- package/docs/content/locales/hi-IN/extensions.mdx +113 -9
- package/docs/content/locales/hi-IN/external-agents.mdx +119 -8
- package/docs/content/locales/hi-IN/faq.mdx +96 -8
- package/docs/content/locales/hi-IN/file-uploads.mdx +61 -4
- package/docs/content/locales/hi-IN/frames.mdx +88 -8
- package/docs/content/locales/hi-IN/getting-started.mdx +34 -4
- package/docs/content/locales/hi-IN/harness-agents.mdx +77 -8
- package/docs/content/locales/hi-IN/human-approval.mdx +51 -4
- package/docs/content/locales/hi-IN/key-concepts.mdx +104 -8
- package/docs/content/locales/hi-IN/local-file-mode.mdx +58 -4
- package/docs/content/locales/hi-IN/mcp-apps.mdx +120 -10
- package/docs/content/locales/hi-IN/mcp-clients.mdx +133 -8
- package/docs/content/locales/hi-IN/mcp-protocol.mdx +105 -8
- package/docs/content/locales/hi-IN/messaging.mdx +115 -8
- package/docs/content/locales/hi-IN/migration-workbench.mdx +45 -4
- package/docs/content/locales/hi-IN/multi-app-workspace.mdx +91 -8
- package/docs/content/locales/hi-IN/multi-tenancy.mdx +80 -8
- package/docs/content/locales/hi-IN/native-chat-ui.mdx +106 -8
- package/docs/content/locales/hi-IN/notifications.mdx +135 -8
- package/docs/content/locales/hi-IN/observability.mdx +102 -8
- package/docs/content/locales/hi-IN/observational-memory.mdx +89 -8
- package/docs/content/locales/hi-IN/onboarding.mdx +45 -4
- package/docs/content/locales/hi-IN/plan-plugin.mdx +99 -8
- package/docs/content/locales/hi-IN/pr-visual-recap.mdx +126 -8
- package/docs/content/locales/hi-IN/processors.mdx +41 -4
- package/docs/content/locales/hi-IN/progress.mdx +46 -4
- package/docs/content/locales/hi-IN/pure-agent-apps.mdx +48 -4
- package/docs/content/locales/hi-IN/real-time-collaboration.mdx +106 -8
- package/docs/content/locales/hi-IN/recurring-jobs.mdx +59 -4
- package/docs/content/locales/hi-IN/routing.mdx +44 -5
- package/docs/content/locales/hi-IN/sandbox-adapters.mdx +43 -4
- package/docs/content/locales/hi-IN/security.mdx +78 -8
- package/docs/content/locales/hi-IN/server.mdx +169 -12
- package/docs/content/locales/hi-IN/sharing.mdx +45 -4
- package/docs/content/locales/hi-IN/skills-guide.mdx +118 -9
- package/docs/content/locales/hi-IN/template-analytics.mdx +46 -4
- package/docs/content/locales/hi-IN/template-assets.mdx +62 -4
- package/docs/content/locales/hi-IN/template-brain.mdx +69 -4
- package/docs/content/locales/hi-IN/template-calendar.mdx +62 -4
- package/docs/content/locales/hi-IN/template-chat.mdx +59 -4
- package/docs/content/locales/hi-IN/template-clips.mdx +52 -4
- package/docs/content/locales/hi-IN/template-content.mdx +62 -4
- package/docs/content/locales/hi-IN/template-design.mdx +102 -4
- package/docs/content/locales/hi-IN/template-dispatch.mdx +57 -4
- package/docs/content/locales/hi-IN/template-forms.mdx +64 -4
- package/docs/content/locales/hi-IN/template-mail.mdx +64 -4
- package/docs/content/locales/hi-IN/template-plan.mdx +61 -4
- package/docs/content/locales/hi-IN/template-slides.mdx +49 -4
- package/docs/content/locales/hi-IN/template-videos.mdx +53 -4
- package/docs/content/locales/hi-IN/tracking.mdx +54 -4
- package/docs/content/locales/hi-IN/using-your-agent.mdx +51 -4
- package/docs/content/locales/hi-IN/voice-input.mdx +43 -4
- package/docs/content/locales/hi-IN/what-is-agent-native.mdx +97 -8
- package/docs/content/locales/hi-IN/workspace-connections.mdx +128 -8
- package/docs/content/locales/hi-IN/workspace-management.mdx +50 -4
- package/docs/content/locales/hi-IN/workspace.mdx +111 -8
- package/docs/content/locales/hi-IN/writing-agent-instructions.mdx +40 -4
- package/docs/content/locales/ja-JP/a2a-protocol.mdx +97 -9
- package/docs/content/locales/ja-JP/actions.mdx +67 -4
- package/docs/content/locales/ja-JP/agent-mentions.mdx +68 -4
- package/docs/content/locales/ja-JP/agent-surfaces.mdx +116 -8
- package/docs/content/locales/ja-JP/agent-teams.mdx +172 -12
- package/docs/content/locales/ja-JP/agent-web-surfaces.mdx +51 -4
- package/docs/content/locales/ja-JP/authentication.mdx +122 -8
- package/docs/content/locales/ja-JP/automations.mdx +110 -8
- package/docs/content/locales/ja-JP/blueprint-installer.mdx +44 -4
- package/docs/content/locales/ja-JP/cli-adapters.mdx +44 -4
- package/docs/content/locales/ja-JP/client.mdx +79 -8
- package/docs/content/locales/ja-JP/cloneable-saas.mdx +85 -8
- package/docs/content/locales/ja-JP/code-agents-ui.mdx +100 -8
- package/docs/content/locales/ja-JP/components.mdx +116 -8
- package/docs/content/locales/ja-JP/context-awareness.mdx +100 -8
- package/docs/content/locales/ja-JP/creating-templates.mdx +51 -4
- package/docs/content/locales/ja-JP/cross-app-sso.mdx +109 -8
- package/docs/content/locales/ja-JP/database.mdx +52 -4
- package/docs/content/locales/ja-JP/deployment.mdx +103 -8
- package/docs/content/locales/ja-JP/dispatch.mdx +134 -8
- package/docs/content/locales/ja-JP/drop-in-agent.mdx +63 -4
- package/docs/content/locales/ja-JP/durable-resume.mdx +47 -4
- package/docs/content/locales/ja-JP/embedding-sdk.mdx +85 -8
- package/docs/content/locales/ja-JP/evals.mdx +102 -8
- package/docs/content/locales/ja-JP/extensions.mdx +111 -9
- package/docs/content/locales/ja-JP/external-agents.mdx +119 -8
- package/docs/content/locales/ja-JP/faq.mdx +98 -8
- package/docs/content/locales/ja-JP/file-uploads.mdx +61 -4
- package/docs/content/locales/ja-JP/frames.mdx +88 -8
- package/docs/content/locales/ja-JP/getting-started.mdx +34 -4
- package/docs/content/locales/ja-JP/harness-agents.mdx +79 -8
- package/docs/content/locales/ja-JP/human-approval.mdx +50 -4
- package/docs/content/locales/ja-JP/key-concepts.mdx +105 -8
- package/docs/content/locales/ja-JP/local-file-mode.mdx +58 -4
- package/docs/content/locales/ja-JP/mcp-apps.mdx +119 -10
- package/docs/content/locales/ja-JP/mcp-clients.mdx +134 -8
- package/docs/content/locales/ja-JP/mcp-protocol.mdx +105 -8
- package/docs/content/locales/ja-JP/messaging.mdx +115 -8
- package/docs/content/locales/ja-JP/migration-workbench.mdx +47 -4
- package/docs/content/locales/ja-JP/multi-app-workspace.mdx +91 -8
- package/docs/content/locales/ja-JP/multi-tenancy.mdx +80 -8
- package/docs/content/locales/ja-JP/native-chat-ui.mdx +104 -8
- package/docs/content/locales/ja-JP/notifications.mdx +135 -8
- package/docs/content/locales/ja-JP/observability.mdx +104 -8
- package/docs/content/locales/ja-JP/observational-memory.mdx +89 -8
- package/docs/content/locales/ja-JP/onboarding.mdx +45 -4
- package/docs/content/locales/ja-JP/plan-plugin.mdx +99 -8
- package/docs/content/locales/ja-JP/pr-visual-recap.mdx +123 -8
- package/docs/content/locales/ja-JP/processors.mdx +39 -4
- package/docs/content/locales/ja-JP/progress.mdx +46 -4
- package/docs/content/locales/ja-JP/pure-agent-apps.mdx +48 -4
- package/docs/content/locales/ja-JP/real-time-collaboration.mdx +106 -8
- package/docs/content/locales/ja-JP/recurring-jobs.mdx +59 -4
- package/docs/content/locales/ja-JP/routing.mdx +44 -5
- package/docs/content/locales/ja-JP/sandbox-adapters.mdx +43 -4
- package/docs/content/locales/ja-JP/security.mdx +82 -8
- package/docs/content/locales/ja-JP/server.mdx +171 -12
- package/docs/content/locales/ja-JP/sharing.mdx +45 -4
- package/docs/content/locales/ja-JP/skills-guide.mdx +118 -9
- package/docs/content/locales/ja-JP/template-analytics.mdx +46 -4
- package/docs/content/locales/ja-JP/template-assets.mdx +64 -4
- package/docs/content/locales/ja-JP/template-brain.mdx +67 -4
- package/docs/content/locales/ja-JP/template-calendar.mdx +62 -4
- package/docs/content/locales/ja-JP/template-chat.mdx +61 -4
- package/docs/content/locales/ja-JP/template-clips.mdx +52 -4
- package/docs/content/locales/ja-JP/template-content.mdx +62 -4
- package/docs/content/locales/ja-JP/template-design.mdx +106 -4
- package/docs/content/locales/ja-JP/template-dispatch.mdx +57 -4
- package/docs/content/locales/ja-JP/template-forms.mdx +62 -4
- package/docs/content/locales/ja-JP/template-mail.mdx +62 -4
- package/docs/content/locales/ja-JP/template-plan.mdx +63 -4
- package/docs/content/locales/ja-JP/template-slides.mdx +49 -4
- package/docs/content/locales/ja-JP/template-videos.mdx +53 -4
- package/docs/content/locales/ja-JP/tracking.mdx +54 -4
- package/docs/content/locales/ja-JP/using-your-agent.mdx +51 -4
- package/docs/content/locales/ja-JP/voice-input.mdx +43 -4
- package/docs/content/locales/ja-JP/what-is-agent-native.mdx +96 -8
- package/docs/content/locales/ja-JP/workspace-connections.mdx +128 -8
- package/docs/content/locales/ja-JP/workspace-management.mdx +50 -4
- package/docs/content/locales/ja-JP/workspace.mdx +111 -8
- package/docs/content/locales/ja-JP/writing-agent-instructions.mdx +44 -4
- package/docs/content/locales/ko-KR/a2a-protocol.mdx +97 -9
- package/docs/content/locales/ko-KR/actions.mdx +63 -4
- package/docs/content/locales/ko-KR/agent-mentions.mdx +68 -4
- package/docs/content/locales/ko-KR/agent-surfaces.mdx +113 -8
- package/docs/content/locales/ko-KR/agent-teams.mdx +171 -12
- package/docs/content/locales/ko-KR/agent-web-surfaces.mdx +51 -4
- package/docs/content/locales/ko-KR/authentication.mdx +122 -8
- package/docs/content/locales/ko-KR/automations.mdx +110 -8
- package/docs/content/locales/ko-KR/blueprint-installer.mdx +42 -4
- package/docs/content/locales/ko-KR/cli-adapters.mdx +44 -4
- package/docs/content/locales/ko-KR/client.mdx +79 -8
- package/docs/content/locales/ko-KR/cloneable-saas.mdx +85 -8
- package/docs/content/locales/ko-KR/code-agents-ui.mdx +96 -8
- package/docs/content/locales/ko-KR/components.mdx +112 -8
- package/docs/content/locales/ko-KR/context-awareness.mdx +96 -8
- package/docs/content/locales/ko-KR/creating-templates.mdx +51 -4
- package/docs/content/locales/ko-KR/cross-app-sso.mdx +109 -8
- package/docs/content/locales/ko-KR/database.mdx +52 -4
- package/docs/content/locales/ko-KR/deployment.mdx +103 -8
- package/docs/content/locales/ko-KR/dispatch.mdx +132 -8
- package/docs/content/locales/ko-KR/drop-in-agent.mdx +63 -4
- package/docs/content/locales/ko-KR/durable-resume.mdx +47 -4
- package/docs/content/locales/ko-KR/embedding-sdk.mdx +81 -8
- package/docs/content/locales/ko-KR/evals.mdx +102 -8
- package/docs/content/locales/ko-KR/extensions.mdx +111 -9
- package/docs/content/locales/ko-KR/external-agents.mdx +119 -8
- package/docs/content/locales/ko-KR/faq.mdx +96 -8
- package/docs/content/locales/ko-KR/file-uploads.mdx +61 -4
- package/docs/content/locales/ko-KR/frames.mdx +86 -8
- package/docs/content/locales/ko-KR/getting-started.mdx +34 -4
- package/docs/content/locales/ko-KR/harness-agents.mdx +77 -8
- package/docs/content/locales/ko-KR/human-approval.mdx +50 -4
- package/docs/content/locales/ko-KR/key-concepts.mdx +104 -8
- package/docs/content/locales/ko-KR/local-file-mode.mdx +56 -4
- package/docs/content/locales/ko-KR/mcp-apps.mdx +120 -10
- package/docs/content/locales/ko-KR/mcp-clients.mdx +133 -8
- package/docs/content/locales/ko-KR/mcp-protocol.mdx +105 -8
- package/docs/content/locales/ko-KR/messaging.mdx +115 -8
- package/docs/content/locales/ko-KR/migration-workbench.mdx +45 -4
- package/docs/content/locales/ko-KR/multi-app-workspace.mdx +91 -8
- package/docs/content/locales/ko-KR/multi-tenancy.mdx +80 -8
- package/docs/content/locales/ko-KR/native-chat-ui.mdx +104 -8
- package/docs/content/locales/ko-KR/notifications.mdx +135 -8
- package/docs/content/locales/ko-KR/observability.mdx +102 -8
- package/docs/content/locales/ko-KR/observational-memory.mdx +87 -8
- package/docs/content/locales/ko-KR/onboarding.mdx +44 -4
- package/docs/content/locales/ko-KR/plan-plugin.mdx +99 -8
- package/docs/content/locales/ko-KR/pr-visual-recap.mdx +125 -8
- package/docs/content/locales/ko-KR/processors.mdx +39 -4
- package/docs/content/locales/ko-KR/progress.mdx +46 -4
- package/docs/content/locales/ko-KR/pure-agent-apps.mdx +46 -4
- package/docs/content/locales/ko-KR/real-time-collaboration.mdx +104 -8
- package/docs/content/locales/ko-KR/recurring-jobs.mdx +59 -4
- package/docs/content/locales/ko-KR/routing.mdx +44 -5
- package/docs/content/locales/ko-KR/sandbox-adapters.mdx +41 -4
- package/docs/content/locales/ko-KR/security.mdx +78 -8
- package/docs/content/locales/ko-KR/server.mdx +171 -12
- package/docs/content/locales/ko-KR/sharing.mdx +45 -4
- package/docs/content/locales/ko-KR/skills-guide.mdx +118 -9
- package/docs/content/locales/ko-KR/template-analytics.mdx +46 -4
- package/docs/content/locales/ko-KR/template-assets.mdx +62 -4
- package/docs/content/locales/ko-KR/template-brain.mdx +65 -4
- package/docs/content/locales/ko-KR/template-calendar.mdx +60 -4
- package/docs/content/locales/ko-KR/template-chat.mdx +59 -4
- package/docs/content/locales/ko-KR/template-clips.mdx +52 -4
- package/docs/content/locales/ko-KR/template-content.mdx +60 -4
- package/docs/content/locales/ko-KR/template-design.mdx +102 -4
- package/docs/content/locales/ko-KR/template-dispatch.mdx +57 -4
- package/docs/content/locales/ko-KR/template-forms.mdx +60 -4
- package/docs/content/locales/ko-KR/template-mail.mdx +60 -4
- package/docs/content/locales/ko-KR/template-plan.mdx +57 -4
- package/docs/content/locales/ko-KR/template-slides.mdx +49 -4
- package/docs/content/locales/ko-KR/template-videos.mdx +53 -4
- package/docs/content/locales/ko-KR/tracking.mdx +54 -4
- package/docs/content/locales/ko-KR/using-your-agent.mdx +51 -4
- package/docs/content/locales/ko-KR/voice-input.mdx +43 -4
- package/docs/content/locales/ko-KR/what-is-agent-native.mdx +95 -8
- package/docs/content/locales/ko-KR/workspace-connections.mdx +128 -8
- package/docs/content/locales/ko-KR/workspace-management.mdx +50 -4
- package/docs/content/locales/ko-KR/workspace.mdx +111 -8
- package/docs/content/locales/ko-KR/writing-agent-instructions.mdx +38 -4
- package/docs/content/locales/pt-BR/a2a-protocol.mdx +99 -9
- package/docs/content/locales/pt-BR/actions.mdx +67 -4
- package/docs/content/locales/pt-BR/agent-mentions.mdx +68 -4
- package/docs/content/locales/pt-BR/agent-surfaces.mdx +116 -8
- package/docs/content/locales/pt-BR/agent-teams.mdx +172 -12
- package/docs/content/locales/pt-BR/agent-web-surfaces.mdx +51 -4
- package/docs/content/locales/pt-BR/authentication.mdx +122 -8
- package/docs/content/locales/pt-BR/automations.mdx +110 -8
- package/docs/content/locales/pt-BR/blueprint-installer.mdx +42 -4
- package/docs/content/locales/pt-BR/cli-adapters.mdx +44 -4
- package/docs/content/locales/pt-BR/client.mdx +81 -8
- package/docs/content/locales/pt-BR/cloneable-saas.mdx +85 -8
- package/docs/content/locales/pt-BR/code-agents-ui.mdx +98 -8
- package/docs/content/locales/pt-BR/components.mdx +118 -8
- package/docs/content/locales/pt-BR/context-awareness.mdx +100 -8
- package/docs/content/locales/pt-BR/creating-templates.mdx +51 -4
- package/docs/content/locales/pt-BR/cross-app-sso.mdx +109 -8
- package/docs/content/locales/pt-BR/database.mdx +52 -4
- package/docs/content/locales/pt-BR/deployment.mdx +103 -8
- package/docs/content/locales/pt-BR/dispatch.mdx +134 -8
- package/docs/content/locales/pt-BR/drop-in-agent.mdx +63 -4
- package/docs/content/locales/pt-BR/durable-resume.mdx +47 -4
- package/docs/content/locales/pt-BR/embedding-sdk.mdx +87 -8
- package/docs/content/locales/pt-BR/evals.mdx +102 -8
- package/docs/content/locales/pt-BR/extensions.mdx +113 -9
- package/docs/content/locales/pt-BR/external-agents.mdx +119 -8
- package/docs/content/locales/pt-BR/faq.mdx +98 -8
- package/docs/content/locales/pt-BR/file-uploads.mdx +61 -4
- package/docs/content/locales/pt-BR/frames.mdx +88 -8
- package/docs/content/locales/pt-BR/getting-started.mdx +34 -4
- package/docs/content/locales/pt-BR/harness-agents.mdx +79 -8
- package/docs/content/locales/pt-BR/human-approval.mdx +50 -4
- package/docs/content/locales/pt-BR/key-concepts.mdx +104 -8
- package/docs/content/locales/pt-BR/local-file-mode.mdx +60 -4
- package/docs/content/locales/pt-BR/mcp-apps.mdx +120 -10
- package/docs/content/locales/pt-BR/mcp-clients.mdx +133 -8
- package/docs/content/locales/pt-BR/mcp-protocol.mdx +105 -8
- package/docs/content/locales/pt-BR/messaging.mdx +115 -8
- package/docs/content/locales/pt-BR/migration-workbench.mdx +47 -4
- package/docs/content/locales/pt-BR/multi-app-workspace.mdx +91 -8
- package/docs/content/locales/pt-BR/multi-tenancy.mdx +80 -8
- package/docs/content/locales/pt-BR/native-chat-ui.mdx +108 -8
- package/docs/content/locales/pt-BR/notifications.mdx +135 -8
- package/docs/content/locales/pt-BR/observability.mdx +104 -8
- package/docs/content/locales/pt-BR/observational-memory.mdx +92 -8
- package/docs/content/locales/pt-BR/onboarding.mdx +45 -4
- package/docs/content/locales/pt-BR/plan-plugin.mdx +99 -8
- package/docs/content/locales/pt-BR/pr-visual-recap.mdx +125 -8
- package/docs/content/locales/pt-BR/processors.mdx +41 -4
- package/docs/content/locales/pt-BR/progress.mdx +46 -4
- package/docs/content/locales/pt-BR/pure-agent-apps.mdx +48 -4
- package/docs/content/locales/pt-BR/real-time-collaboration.mdx +107 -8
- package/docs/content/locales/pt-BR/recurring-jobs.mdx +59 -4
- package/docs/content/locales/pt-BR/routing.mdx +44 -5
- package/docs/content/locales/pt-BR/sandbox-adapters.mdx +43 -4
- package/docs/content/locales/pt-BR/security.mdx +82 -8
- package/docs/content/locales/pt-BR/server.mdx +173 -12
- package/docs/content/locales/pt-BR/sharing.mdx +45 -4
- package/docs/content/locales/pt-BR/skills-guide.mdx +118 -9
- package/docs/content/locales/pt-BR/template-analytics.mdx +46 -4
- package/docs/content/locales/pt-BR/template-assets.mdx +64 -4
- package/docs/content/locales/pt-BR/template-brain.mdx +69 -4
- package/docs/content/locales/pt-BR/template-calendar.mdx +62 -4
- package/docs/content/locales/pt-BR/template-chat.mdx +61 -4
- package/docs/content/locales/pt-BR/template-clips.mdx +52 -4
- package/docs/content/locales/pt-BR/template-content.mdx +64 -4
- package/docs/content/locales/pt-BR/template-design.mdx +106 -4
- package/docs/content/locales/pt-BR/template-dispatch.mdx +57 -4
- package/docs/content/locales/pt-BR/template-forms.mdx +64 -4
- package/docs/content/locales/pt-BR/template-mail.mdx +60 -4
- package/docs/content/locales/pt-BR/template-plan.mdx +63 -4
- package/docs/content/locales/pt-BR/template-slides.mdx +49 -4
- package/docs/content/locales/pt-BR/template-videos.mdx +53 -4
- package/docs/content/locales/pt-BR/tracking.mdx +54 -4
- package/docs/content/locales/pt-BR/using-your-agent.mdx +51 -4
- package/docs/content/locales/pt-BR/voice-input.mdx +43 -4
- package/docs/content/locales/pt-BR/what-is-agent-native.mdx +101 -8
- package/docs/content/locales/pt-BR/workspace-connections.mdx +128 -8
- package/docs/content/locales/pt-BR/workspace-management.mdx +50 -4
- package/docs/content/locales/pt-BR/workspace.mdx +111 -8
- package/docs/content/locales/pt-BR/writing-agent-instructions.mdx +46 -4
- package/docs/content/locales/zh-CN/a2a-protocol.mdx +97 -9
- package/docs/content/locales/zh-CN/actions.mdx +65 -4
- package/docs/content/locales/zh-CN/agent-mentions.mdx +68 -4
- package/docs/content/locales/zh-CN/agent-surfaces.mdx +108 -8
- package/docs/content/locales/zh-CN/agent-teams.mdx +171 -12
- package/docs/content/locales/zh-CN/agent-web-surfaces.mdx +51 -4
- package/docs/content/locales/zh-CN/authentication.mdx +122 -8
- package/docs/content/locales/zh-CN/automations.mdx +110 -8
- package/docs/content/locales/zh-CN/blueprint-installer.mdx +42 -4
- package/docs/content/locales/zh-CN/cli-adapters.mdx +44 -4
- package/docs/content/locales/zh-CN/client.mdx +79 -8
- package/docs/content/locales/zh-CN/cloneable-saas.mdx +83 -8
- package/docs/content/locales/zh-CN/code-agents-ui.mdx +94 -8
- package/docs/content/locales/zh-CN/components.mdx +112 -8
- package/docs/content/locales/zh-CN/context-awareness.mdx +96 -8
- package/docs/content/locales/zh-CN/creating-templates.mdx +51 -4
- package/docs/content/locales/zh-CN/cross-app-sso.mdx +107 -8
- package/docs/content/locales/zh-CN/database.mdx +52 -4
- package/docs/content/locales/zh-CN/deployment.mdx +103 -8
- package/docs/content/locales/zh-CN/dispatch.mdx +134 -8
- package/docs/content/locales/zh-CN/drop-in-agent.mdx +63 -4
- package/docs/content/locales/zh-CN/durable-resume.mdx +45 -4
- package/docs/content/locales/zh-CN/embedding-sdk.mdx +81 -8
- package/docs/content/locales/zh-CN/evals.mdx +100 -8
- package/docs/content/locales/zh-CN/extensions.mdx +111 -9
- package/docs/content/locales/zh-CN/external-agents.mdx +119 -8
- package/docs/content/locales/zh-CN/faq.mdx +96 -8
- package/docs/content/locales/zh-CN/file-uploads.mdx +61 -4
- package/docs/content/locales/zh-CN/frames.mdx +86 -8
- package/docs/content/locales/zh-CN/getting-started.mdx +34 -4
- package/docs/content/locales/zh-CN/harness-agents.mdx +79 -8
- package/docs/content/locales/zh-CN/human-approval.mdx +50 -4
- package/docs/content/locales/zh-CN/key-concepts.mdx +100 -8
- package/docs/content/locales/zh-CN/local-file-mode.mdx +56 -4
- package/docs/content/locales/zh-CN/mcp-apps.mdx +120 -10
- package/docs/content/locales/zh-CN/mcp-clients.mdx +133 -8
- package/docs/content/locales/zh-CN/mcp-protocol.mdx +105 -8
- package/docs/content/locales/zh-CN/messaging.mdx +115 -8
- package/docs/content/locales/zh-CN/migration-workbench.mdx +45 -4
- package/docs/content/locales/zh-CN/multi-app-workspace.mdx +91 -8
- package/docs/content/locales/zh-CN/multi-tenancy.mdx +80 -8
- package/docs/content/locales/zh-CN/native-chat-ui.mdx +104 -8
- package/docs/content/locales/zh-CN/notifications.mdx +135 -8
- package/docs/content/locales/zh-CN/observability.mdx +102 -8
- package/docs/content/locales/zh-CN/observational-memory.mdx +85 -8
- package/docs/content/locales/zh-CN/onboarding.mdx +44 -4
- package/docs/content/locales/zh-CN/plan-plugin.mdx +97 -8
- package/docs/content/locales/zh-CN/pr-visual-recap.mdx +123 -8
- package/docs/content/locales/zh-CN/processors.mdx +39 -4
- package/docs/content/locales/zh-CN/progress.mdx +46 -4
- package/docs/content/locales/zh-CN/pure-agent-apps.mdx +46 -4
- package/docs/content/locales/zh-CN/real-time-collaboration.mdx +98 -8
- package/docs/content/locales/zh-CN/recurring-jobs.mdx +59 -4
- package/docs/content/locales/zh-CN/routing.mdx +42 -5
- package/docs/content/locales/zh-CN/sandbox-adapters.mdx +41 -4
- package/docs/content/locales/zh-CN/security.mdx +78 -8
- package/docs/content/locales/zh-CN/server.mdx +169 -12
- package/docs/content/locales/zh-CN/sharing.mdx +45 -4
- package/docs/content/locales/zh-CN/skills-guide.mdx +118 -9
- package/docs/content/locales/zh-CN/template-analytics.mdx +46 -4
- package/docs/content/locales/zh-CN/template-assets.mdx +58 -4
- package/docs/content/locales/zh-CN/template-brain.mdx +65 -4
- package/docs/content/locales/zh-CN/template-calendar.mdx +58 -4
- package/docs/content/locales/zh-CN/template-chat.mdx +57 -4
- package/docs/content/locales/zh-CN/template-clips.mdx +52 -4
- package/docs/content/locales/zh-CN/template-content.mdx +58 -4
- package/docs/content/locales/zh-CN/template-design.mdx +94 -4
- package/docs/content/locales/zh-CN/template-dispatch.mdx +57 -4
- package/docs/content/locales/zh-CN/template-forms.mdx +58 -4
- package/docs/content/locales/zh-CN/template-mail.mdx +60 -4
- package/docs/content/locales/zh-CN/template-plan.mdx +57 -4
- package/docs/content/locales/zh-CN/template-slides.mdx +49 -4
- package/docs/content/locales/zh-CN/template-videos.mdx +51 -4
- package/docs/content/locales/zh-CN/tracking.mdx +54 -4
- package/docs/content/locales/zh-CN/using-your-agent.mdx +51 -4
- package/docs/content/locales/zh-CN/voice-input.mdx +43 -4
- package/docs/content/locales/zh-CN/what-is-agent-native.mdx +94 -8
- package/docs/content/locales/zh-CN/workspace-connections.mdx +126 -8
- package/docs/content/locales/zh-CN/workspace-management.mdx +50 -4
- package/docs/content/locales/zh-CN/workspace.mdx +110 -8
- package/docs/content/locales/zh-CN/writing-agent-instructions.mdx +38 -4
- package/docs/content/locales/zh-TW/a2a-protocol.mdx +97 -9
- package/docs/content/locales/zh-TW/actions.mdx +63 -4
- package/docs/content/locales/zh-TW/agent-mentions.mdx +68 -4
- package/docs/content/locales/zh-TW/agent-surfaces.mdx +108 -8
- package/docs/content/locales/zh-TW/agent-teams.mdx +171 -12
- package/docs/content/locales/zh-TW/agent-web-surfaces.mdx +51 -4
- package/docs/content/locales/zh-TW/authentication.mdx +122 -8
- package/docs/content/locales/zh-TW/automations.mdx +110 -8
- package/docs/content/locales/zh-TW/blueprint-installer.mdx +42 -4
- package/docs/content/locales/zh-TW/cli-adapters.mdx +44 -4
- package/docs/content/locales/zh-TW/client.mdx +79 -8
- package/docs/content/locales/zh-TW/cloneable-saas.mdx +83 -8
- package/docs/content/locales/zh-TW/code-agents-ui.mdx +94 -8
- package/docs/content/locales/zh-TW/components.mdx +112 -8
- package/docs/content/locales/zh-TW/context-awareness.mdx +96 -8
- package/docs/content/locales/zh-TW/creating-templates.mdx +51 -4
- package/docs/content/locales/zh-TW/cross-app-sso.mdx +107 -8
- package/docs/content/locales/zh-TW/database.mdx +52 -4
- package/docs/content/locales/zh-TW/deployment.mdx +103 -8
- package/docs/content/locales/zh-TW/dispatch.mdx +134 -8
- package/docs/content/locales/zh-TW/drop-in-agent.mdx +63 -4
- package/docs/content/locales/zh-TW/durable-background-runs.mdx +88 -8
- package/docs/content/locales/zh-TW/durable-resume.mdx +45 -4
- package/docs/content/locales/zh-TW/embedding-sdk.mdx +83 -8
- package/docs/content/locales/zh-TW/evals.mdx +100 -8
- package/docs/content/locales/zh-TW/extensions.mdx +111 -9
- package/docs/content/locales/zh-TW/external-agents.mdx +119 -8
- package/docs/content/locales/zh-TW/faq.mdx +96 -8
- package/docs/content/locales/zh-TW/file-uploads.mdx +61 -4
- package/docs/content/locales/zh-TW/frames.mdx +86 -8
- package/docs/content/locales/zh-TW/getting-started.mdx +34 -4
- package/docs/content/locales/zh-TW/harness-agents.mdx +79 -8
- package/docs/content/locales/zh-TW/human-approval.mdx +50 -4
- package/docs/content/locales/zh-TW/key-concepts.mdx +100 -8
- package/docs/content/locales/zh-TW/local-file-mode.mdx +56 -4
- package/docs/content/locales/zh-TW/mcp-apps.mdx +120 -10
- package/docs/content/locales/zh-TW/mcp-clients.mdx +133 -8
- package/docs/content/locales/zh-TW/mcp-protocol.mdx +105 -8
- package/docs/content/locales/zh-TW/messaging.mdx +115 -8
- package/docs/content/locales/zh-TW/migration-workbench.mdx +45 -4
- package/docs/content/locales/zh-TW/multi-app-workspace.mdx +91 -8
- package/docs/content/locales/zh-TW/multi-tenancy.mdx +80 -8
- package/docs/content/locales/zh-TW/native-chat-ui.mdx +104 -8
- package/docs/content/locales/zh-TW/notifications.mdx +135 -8
- package/docs/content/locales/zh-TW/observability.mdx +102 -8
- package/docs/content/locales/zh-TW/observational-memory.mdx +85 -8
- package/docs/content/locales/zh-TW/onboarding.mdx +44 -4
- package/docs/content/locales/zh-TW/plan-plugin.mdx +97 -8
- package/docs/content/locales/zh-TW/pr-visual-recap.mdx +123 -8
- package/docs/content/locales/zh-TW/processors.mdx +39 -4
- package/docs/content/locales/zh-TW/progress.mdx +46 -4
- package/docs/content/locales/zh-TW/pure-agent-apps.mdx +46 -4
- package/docs/content/locales/zh-TW/real-time-collaboration.mdx +98 -8
- package/docs/content/locales/zh-TW/recurring-jobs.mdx +59 -4
- package/docs/content/locales/zh-TW/routing.mdx +42 -5
- package/docs/content/locales/zh-TW/sandbox-adapters.mdx +41 -4
- package/docs/content/locales/zh-TW/security.mdx +80 -8
- package/docs/content/locales/zh-TW/server.mdx +169 -12
- package/docs/content/locales/zh-TW/sharing.mdx +45 -4
- package/docs/content/locales/zh-TW/skills-guide.mdx +118 -9
- package/docs/content/locales/zh-TW/template-analytics.mdx +46 -4
- package/docs/content/locales/zh-TW/template-assets.mdx +58 -4
- package/docs/content/locales/zh-TW/template-brain.mdx +65 -4
- package/docs/content/locales/zh-TW/template-calendar.mdx +58 -4
- package/docs/content/locales/zh-TW/template-chat.mdx +59 -4
- package/docs/content/locales/zh-TW/template-clips.mdx +52 -4
- package/docs/content/locales/zh-TW/template-content.mdx +58 -4
- package/docs/content/locales/zh-TW/template-design.mdx +96 -4
- package/docs/content/locales/zh-TW/template-dispatch.mdx +57 -4
- package/docs/content/locales/zh-TW/template-forms.mdx +58 -4
- package/docs/content/locales/zh-TW/template-mail.mdx +60 -4
- package/docs/content/locales/zh-TW/template-plan.mdx +57 -4
- package/docs/content/locales/zh-TW/template-slides.mdx +49 -4
- package/docs/content/locales/zh-TW/template-videos.mdx +51 -4
- package/docs/content/locales/zh-TW/tracking.mdx +54 -4
- package/docs/content/locales/zh-TW/using-your-agent.mdx +51 -4
- package/docs/content/locales/zh-TW/voice-input.mdx +43 -4
- package/docs/content/locales/zh-TW/what-is-agent-native.mdx +94 -8
- package/docs/content/locales/zh-TW/workspace-connections.mdx +126 -8
- package/docs/content/locales/zh-TW/workspace-management.mdx +50 -4
- package/docs/content/locales/zh-TW/workspace.mdx +111 -8
- package/docs/content/locales/zh-TW/writing-agent-instructions.mdx +38 -4
- package/docs/content/mcp-apps.mdx +120 -10
- package/docs/content/mcp-clients.mdx +161 -8
- package/docs/content/mcp-protocol.mdx +105 -8
- package/docs/content/messaging.mdx +115 -8
- package/docs/content/migration-workbench.mdx +45 -4
- package/docs/content/multi-app-workspace.mdx +91 -8
- package/docs/content/multi-tenancy.mdx +80 -8
- package/docs/content/native-chat-ui.mdx +106 -8
- package/docs/content/notifications.mdx +135 -8
- package/docs/content/observability.mdx +102 -8
- package/docs/content/observational-memory.mdx +89 -8
- package/docs/content/onboarding.mdx +45 -4
- package/docs/content/plan-plugin.mdx +99 -8
- package/docs/content/pr-visual-recap.mdx +125 -8
- package/docs/content/processors.mdx +41 -4
- package/docs/content/progress.mdx +46 -4
- package/docs/content/pure-agent-apps.mdx +46 -4
- package/docs/content/real-time-collaboration.mdx +104 -8
- package/docs/content/recurring-jobs.mdx +59 -4
- package/docs/content/routing.mdx +44 -5
- package/docs/content/sandbox-adapters.mdx +43 -4
- package/docs/content/security.mdx +80 -8
- package/docs/content/server.mdx +173 -12
- package/docs/content/sharing.mdx +45 -4
- package/docs/content/skills-guide.mdx +118 -9
- package/docs/content/template-analytics.mdx +46 -4
- package/docs/content/template-assets.mdx +60 -4
- package/docs/content/template-brain.mdx +67 -4
- package/docs/content/template-calendar.mdx +62 -4
- package/docs/content/template-chat.mdx +61 -4
- package/docs/content/template-clips.mdx +52 -4
- package/docs/content/template-content.mdx +60 -4
- package/docs/content/template-design.mdx +103 -4
- package/docs/content/template-dispatch.mdx +57 -4
- package/docs/content/template-forms.mdx +62 -4
- package/docs/content/template-mail.mdx +60 -4
- package/docs/content/template-plan.mdx +61 -4
- package/docs/content/template-slides.mdx +49 -4
- package/docs/content/template-videos.mdx +51 -4
- package/docs/content/tracking.mdx +54 -4
- package/docs/content/using-your-agent.mdx +51 -4
- package/docs/content/voice-input.mdx +43 -4
- package/docs/content/what-is-agent-native.mdx +188 -8
- package/docs/content/workspace-connections.mdx +128 -8
- package/docs/content/workspace-management.mdx +50 -4
- package/docs/content/workspace.mdx +111 -8
- package/docs/content/writing-agent-instructions.mdx +45 -4
- package/package.json +2 -1
- package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
- package/corpus/templates/design/app/components/design/DesignToolbar.tsx +0 -339
- package/corpus/templates/design/app/components/design/PresentMode.tsx +0 -68
- package/corpus/templates/design/app/components/design/ViewportTabs.tsx +0 -149
- package/corpus/templates/design/app/components/design/ZoomControls.tsx +0 -157
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcribe-voice.d.ts","sourceRoot":"","sources":["../../src/server/transcribe-voice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"transcribe-voice.d.ts","sourceRoot":"","sources":["../../src/server/transcribe-voice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAsGH,wBAAgB,4BAA4B;;;;;;IAuX3C"}
|
|
@@ -21,6 +21,7 @@ import { createBuilderEngine } from "../agent/engine/builder-engine.js";
|
|
|
21
21
|
import { appStateGet } from "../application-state/store.js";
|
|
22
22
|
import { getOrgContext } from "../org/context.js";
|
|
23
23
|
import { transcribeWithBuilder } from "../transcription/builder-transcription.js";
|
|
24
|
+
import { applyVoiceContextReplacements, buildVoiceGuidanceBlock, parseVoiceContextPack, voiceContextTermsOnly, } from "../voice/index.js";
|
|
24
25
|
import { getSession } from "./auth.js";
|
|
25
26
|
import { resolveHasBuilderPrivateKey, resolveSecret, } from "./credential-provider.js";
|
|
26
27
|
import { runWithRequestContext } from "./request-context.js";
|
|
@@ -125,6 +126,15 @@ export function createTranscribeVoiceHandler() {
|
|
|
125
126
|
const instructions = instructionsPart?.data
|
|
126
127
|
? sanitizeInstructions(Buffer.from(instructionsPart.data).toString("utf8"))
|
|
127
128
|
: undefined;
|
|
129
|
+
const voiceContextPart = parts?.find((p) => p.name === "voiceContext" || p.name === "contextPack");
|
|
130
|
+
const voiceContext = voiceContextPart?.data
|
|
131
|
+
? parseVoiceContextPack(Buffer.from(voiceContextPart.data).toString("utf8"))
|
|
132
|
+
: undefined;
|
|
133
|
+
const voiceGuidance = buildVoiceGuidanceBlock({
|
|
134
|
+
instructions,
|
|
135
|
+
contextPack: voiceContextTermsOnly(voiceContext),
|
|
136
|
+
});
|
|
137
|
+
const applyVoiceContext = (value) => applyVoiceContextReplacements(value, voiceContext).trim();
|
|
128
138
|
// Resolve provider preference. Per-request "provider" form field takes
|
|
129
139
|
// precedence (the desktop client sends it on every dictation press),
|
|
130
140
|
// falling back to the user's stored `voice-transcription-prefs` app
|
|
@@ -190,7 +200,7 @@ export function createTranscribeVoiceHandler() {
|
|
|
190
200
|
// does not want audio uploaded to any external provider. The client
|
|
191
201
|
// shouldn't hit this endpoint when "browser" is selected; this is a
|
|
192
202
|
// defense-in-depth refusal.
|
|
193
|
-
if (providerPref === "browser") {
|
|
203
|
+
if (providerPref === "browser" && !transcriptText) {
|
|
194
204
|
setResponseStatus(event, 400);
|
|
195
205
|
return {
|
|
196
206
|
error: 'Voice provider is set to "browser" (Web Speech API only). Change the preference in Settings → Voice Transcription to use a server-side provider.',
|
|
@@ -205,7 +215,8 @@ export function createTranscribeVoiceHandler() {
|
|
|
205
215
|
return await cleanupTranscriptText({
|
|
206
216
|
event,
|
|
207
217
|
text: transcriptText,
|
|
208
|
-
instructions,
|
|
218
|
+
instructions: voiceGuidance,
|
|
219
|
+
contextPack: voiceContext,
|
|
209
220
|
providerPref,
|
|
210
221
|
hasBuilderPrivateKey,
|
|
211
222
|
withRequestContext,
|
|
@@ -239,9 +250,9 @@ export function createTranscribeVoiceHandler() {
|
|
|
239
250
|
mimeType: mime,
|
|
240
251
|
apiKey: geminiKey,
|
|
241
252
|
language: language || undefined,
|
|
242
|
-
instructions,
|
|
253
|
+
instructions: voiceGuidance,
|
|
243
254
|
});
|
|
244
|
-
const trimmed = text
|
|
255
|
+
const trimmed = applyVoiceContext(text);
|
|
245
256
|
if (!trimmed) {
|
|
246
257
|
setResponseStatus(event, 502);
|
|
247
258
|
return { error: "Gemini returned an empty transcript." };
|
|
@@ -273,9 +284,9 @@ export function createTranscribeVoiceHandler() {
|
|
|
273
284
|
? BUILDER_GEMINI_TRANSCRIPTION_MODEL
|
|
274
285
|
: undefined,
|
|
275
286
|
language: language || undefined,
|
|
276
|
-
instructions,
|
|
287
|
+
instructions: voiceGuidance,
|
|
277
288
|
});
|
|
278
|
-
return { text: (result.text ?? "")
|
|
289
|
+
return { text: applyVoiceContext(result.text ?? "") };
|
|
279
290
|
}
|
|
280
291
|
catch (err) {
|
|
281
292
|
const message = err?.message ?? String(err);
|
|
@@ -306,7 +317,8 @@ export function createTranscribeVoiceHandler() {
|
|
|
306
317
|
audioBytes,
|
|
307
318
|
mime,
|
|
308
319
|
language,
|
|
309
|
-
instructions,
|
|
320
|
+
instructions: voiceGuidance,
|
|
321
|
+
contextPack: voiceContext,
|
|
310
322
|
});
|
|
311
323
|
}
|
|
312
324
|
// ── Auto / undefined / openai fallback chain ────────────────────────
|
|
@@ -320,9 +332,9 @@ export function createTranscribeVoiceHandler() {
|
|
|
320
332
|
mimeType: mime,
|
|
321
333
|
model: BUILDER_GEMINI_TRANSCRIPTION_MODEL,
|
|
322
334
|
language: language || undefined,
|
|
323
|
-
instructions,
|
|
335
|
+
instructions: voiceGuidance,
|
|
324
336
|
});
|
|
325
|
-
return { text: (result.text ?? "")
|
|
337
|
+
return { text: applyVoiceContext(result.text ?? "") };
|
|
326
338
|
}
|
|
327
339
|
catch (err) {
|
|
328
340
|
const message = err?.message ?? String(err);
|
|
@@ -347,9 +359,9 @@ export function createTranscribeVoiceHandler() {
|
|
|
347
359
|
mimeType: mime,
|
|
348
360
|
apiKey: geminiKey,
|
|
349
361
|
language: language || undefined,
|
|
350
|
-
instructions,
|
|
362
|
+
instructions: voiceGuidance,
|
|
351
363
|
});
|
|
352
|
-
const trimmed = text
|
|
364
|
+
const trimmed = applyVoiceContext(text);
|
|
353
365
|
if (trimmed) {
|
|
354
366
|
console.log(`[transcribe-voice] Gemini → ${trimmed.length} chars`);
|
|
355
367
|
return { text: trimmed };
|
|
@@ -402,7 +414,8 @@ export function createTranscribeVoiceHandler() {
|
|
|
402
414
|
audioBytes,
|
|
403
415
|
mime,
|
|
404
416
|
language,
|
|
405
|
-
instructions,
|
|
417
|
+
instructions: voiceGuidance,
|
|
418
|
+
contextPack: voiceContext,
|
|
406
419
|
});
|
|
407
420
|
});
|
|
408
421
|
}
|
|
@@ -413,7 +426,7 @@ export function createTranscribeVoiceHandler() {
|
|
|
413
426
|
* strict-Groq preference path and the auto fallback chain share one
|
|
414
427
|
* implementation.
|
|
415
428
|
*/
|
|
416
|
-
async function callWhisperCompat({ event, provider, audioBytes, mime, language, instructions, }) {
|
|
429
|
+
async function callWhisperCompat({ event, provider, audioBytes, mime, language, instructions, contextPack, }) {
|
|
417
430
|
const ext = pickExtension(mime);
|
|
418
431
|
const filename = `composer-voice.${ext}`;
|
|
419
432
|
const form = new FormData();
|
|
@@ -443,7 +456,9 @@ async function callWhisperCompat({ event, provider, audioBytes, mime, language,
|
|
|
443
456
|
};
|
|
444
457
|
}
|
|
445
458
|
const data = (await res.json());
|
|
446
|
-
return {
|
|
459
|
+
return {
|
|
460
|
+
text: applyVoiceContextReplacements((data.text ?? "").trim(), contextPack).trim(),
|
|
461
|
+
};
|
|
447
462
|
}
|
|
448
463
|
catch (err) {
|
|
449
464
|
setResponseStatus(event, 502);
|
|
@@ -457,12 +472,13 @@ async function callWhisperCompat({ event, provider, audioBytes, mime, language,
|
|
|
457
472
|
clearTimeout(timeout);
|
|
458
473
|
}
|
|
459
474
|
}
|
|
460
|
-
async function cleanupTranscriptText({ event, text, instructions, providerPref, hasBuilderPrivateKey, withRequestContext, resolveApiKey, }) {
|
|
475
|
+
async function cleanupTranscriptText({ event, text, instructions, contextPack, providerPref, hasBuilderPrivateKey, withRequestContext, resolveApiKey, }) {
|
|
461
476
|
const original = text.trim();
|
|
462
477
|
if (!original)
|
|
463
478
|
return { text: "" };
|
|
479
|
+
const finalizeText = (value) => applyVoiceContextReplacements(value || original, contextPack).trim();
|
|
464
480
|
if (providerPref === "browser") {
|
|
465
|
-
return { text: original };
|
|
481
|
+
return { text: finalizeText(original) };
|
|
466
482
|
}
|
|
467
483
|
if (providerPref === "builder" || providerPref === "builder-gemini") {
|
|
468
484
|
if (!(await hasBuilderPrivateKey())) {
|
|
@@ -473,7 +489,7 @@ async function cleanupTranscriptText({ event, text, instructions, providerPref,
|
|
|
473
489
|
}
|
|
474
490
|
try {
|
|
475
491
|
const cleaned = await withRequestContext(() => cleanupWithBuilder({ text: original, instructions }));
|
|
476
|
-
return { text: cleaned || original };
|
|
492
|
+
return { text: finalizeText(cleaned || original) };
|
|
477
493
|
}
|
|
478
494
|
catch (err) {
|
|
479
495
|
setResponseStatus(event, 502);
|
|
@@ -496,7 +512,7 @@ async function cleanupTranscriptText({ event, text, instructions, providerPref,
|
|
|
496
512
|
apiKey: geminiKey,
|
|
497
513
|
instructions,
|
|
498
514
|
});
|
|
499
|
-
return { text: cleaned || original };
|
|
515
|
+
return { text: finalizeText(cleaned || original) };
|
|
500
516
|
}
|
|
501
517
|
catch (err) {
|
|
502
518
|
setResponseStatus(event, 502);
|
|
@@ -521,7 +537,7 @@ async function cleanupTranscriptText({ event, text, instructions, providerPref,
|
|
|
521
537
|
apiKey,
|
|
522
538
|
instructions,
|
|
523
539
|
});
|
|
524
|
-
return { text: cleaned || original };
|
|
540
|
+
return { text: finalizeText(cleaned || original) };
|
|
525
541
|
}
|
|
526
542
|
catch (err) {
|
|
527
543
|
setResponseStatus(event, 502);
|
|
@@ -534,7 +550,7 @@ async function cleanupTranscriptText({ event, text, instructions, providerPref,
|
|
|
534
550
|
try {
|
|
535
551
|
const cleaned = await withRequestContext(() => cleanupWithBuilder({ text: original, instructions }));
|
|
536
552
|
if (cleaned)
|
|
537
|
-
return { text: cleaned };
|
|
553
|
+
return { text: finalizeText(cleaned) };
|
|
538
554
|
}
|
|
539
555
|
catch {
|
|
540
556
|
// Fall through to BYOK providers, then raw text.
|
|
@@ -549,7 +565,7 @@ async function cleanupTranscriptText({ event, text, instructions, providerPref,
|
|
|
549
565
|
instructions,
|
|
550
566
|
});
|
|
551
567
|
if (cleaned)
|
|
552
|
-
return { text: cleaned };
|
|
568
|
+
return { text: finalizeText(cleaned) };
|
|
553
569
|
}
|
|
554
570
|
catch {
|
|
555
571
|
// Fall through.
|
|
@@ -565,7 +581,7 @@ async function cleanupTranscriptText({ event, text, instructions, providerPref,
|
|
|
565
581
|
instructions,
|
|
566
582
|
});
|
|
567
583
|
if (cleaned)
|
|
568
|
-
return { text: cleaned };
|
|
584
|
+
return { text: finalizeText(cleaned) };
|
|
569
585
|
}
|
|
570
586
|
catch {
|
|
571
587
|
// Fall through.
|
|
@@ -581,13 +597,13 @@ async function cleanupTranscriptText({ event, text, instructions, providerPref,
|
|
|
581
597
|
instructions,
|
|
582
598
|
});
|
|
583
599
|
if (cleaned)
|
|
584
|
-
return { text: cleaned };
|
|
600
|
+
return { text: finalizeText(cleaned) };
|
|
585
601
|
}
|
|
586
602
|
catch {
|
|
587
603
|
// Fall through.
|
|
588
604
|
}
|
|
589
605
|
}
|
|
590
|
-
return { text: original };
|
|
606
|
+
return { text: finalizeText(original) };
|
|
591
607
|
}
|
|
592
608
|
async function cleanupWithBuilder({ text, instructions, }) {
|
|
593
609
|
const engine = createBuilderEngine();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcribe-voice.js","sourceRoot":"","sources":["../../src/server/transcribe-voice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,GAElB,MAAM,IAAI,CAAC;AAEZ,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,2BAA2B,EAC3B,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,WAAW,GAAG,gDAAgD,CAAC;AACrE,MAAM,QAAQ,GAAG,qDAAqD,CAAC;AACvE,MAAM,aAAa,GAAG,iDAAiD,CAAC;AACxE,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAC5C,MAAM,kBAAkB,GAAG,yBAAyB,CAAC;AACrD,MAAM,YAAY,GAAG,WAAW,CAAC;AACjC,MAAM,eAAe,GAAG,4CAA4C,CAAC;AACrE,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAC5C,MAAM,eAAe,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,sBAAsB;AAChE,MAAM,oB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ACV,OAAO,IAAI,IAAI,EAAE,CAAC;IACpB,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAED,SAAS,2BAA2B,CAAC,IAAY;IAC/C,sEAAsE;IACtE,2DAA2D;IAC3D,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACtD,IAAI,CAAC,KAAK;QAAE,OAAO,YAAY,CAAC;IAChC,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAiB;IAC3C,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACD,kEAAkE;IAClE,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,KAAK,GAAG,MAAM,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC;QAC7C,MAAM,IAAI,MAAM,CAAC,YAAY,CAC3B,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CACxD,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC","sourcesContent":["/**\n * POST /_agent-native/transcribe-voice\n *\n * Receives an audio blob from the agent sidebar composer and forwards it to\n * the configured transcription provider. Returns `{ text }` on success,\n * `{ error }` on failure.\n *\n * Key resolution order for BYOK providers:\n * 1. Request-scoped encrypted secret (`app_secrets`: user, org, workspace).\n * 2. Env var fallback only outside authenticated request contexts.\n *\n * If no server provider is configured, returns 400 with an error the\n * composer UI can surface (the client falls back to Web Speech when possible).\n *\n * This is a framework route rather than a `defineAction` because multipart\n * audio bodies aren't a clean fit for the action contract (actions are\n * typed JSON-in / JSON-out).\n */\n\nimport {\n defineEventHandler,\n getMethod,\n getRequestHeader,\n readMultipartFormData,\n setResponseStatus,\n type H3Event,\n} from \"h3\";\n\nimport { createBuilderEngine } from \"../agent/engine/builder-engine.js\";\nimport { appStateGet } from \"../application-state/store.js\";\nimport { getOrgContext } from \"../org/context.js\";\nimport { transcribeWithBuilder } from \"../transcription/builder-transcription.js\";\nimport { getSession } from \"./auth.js\";\nimport {\n resolveHasBuilderPrivateKey,\n resolveSecret,\n} from \"./credential-provider.js\";\nimport { runWithRequestContext } from \"./request-context.js\";\n\nconst WHISPER_URL = \"https://api.openai.com/v1/audio/transcriptions\";\nconst GROQ_URL = \"https://api.groq.com/openai/v1/audio/transcriptions\";\nconst GROQ_CHAT_URL = \"https://api.groq.com/openai/v1/chat/completions\";\nconst GROQ_MODEL = \"whisper-large-v3-turbo\";\nconst GROQ_CLEANUP_MODEL = \"llama-3.3-70b-versatile\";\nconst OPENAI_MODEL = \"whisper-1\";\nconst OPENAI_CHAT_URL = \"https://api.openai.com/v1/chat/completions\";\nconst OPENAI_CLEANUP_MODEL = \"gpt-5.4-mini\";\nconst MAX_AUDIO_BYTES = 25 * 1024 * 1024; // Whisper hard limit.\nconst MAX_TRANSCRIPT_CHARS = 40_000;\n// Public Builder transcription model id. The Builder gateway maps this to\n// Gemini 3.1 Flash-Lite.\nconst BUILDER_GEMINI_TRANSCRIPTION_MODEL = \"gemini-3-1-flash-lite\";\n\n// Gemini Flash Lite BYOK path when GEMINI_API_KEY is configured.\n// Gemini accepts inline audio; we just give it the bytes and a \"transcribe\n// this\" prompt and it replies with text. 2.5x faster TTFT than 2.5 Flash\n// per Google's release notes, and noticeably snappier than the Whisper\n// round-trip even on a fast connection.\n// Keep the direct Google AI path on a stable public model id; Builder's\n// managed provider above handles the newer Gemini 3.1 Flash-Lite preview.\nconst GEMINI_MODEL = \"gemini-2.0-flash-lite\";\nconst GEMINI_URL = `https://generativelanguage.googleapis.com/v1beta/models/${GEMINI_MODEL}:generateContent`;\n\n/**\n * Reject cross-site POSTs. Cookies are `SameSite=None; Secure` over HTTPS so\n * the browser would otherwise attach the session to a forged form submission\n * from evil.com, causing us to spend OpenAI credits on the user's behalf.\n * Same-origin browsers always send `Origin` on POST; if it's missing we fall\n * back to `Sec-Fetch-Site` so Safari's fetch-spec behavior still works.\n */\nfunction isSameOriginRequest(event: H3Event): boolean {\n const host = getRequestHeader(event, \"host\");\n const origin = getRequestHeader(event, \"origin\");\n if (origin && host) {\n try {\n const parsed = new URL(origin);\n if (parsed.host === host) return true;\n // Tauri desktop dev serves the tray WebView from localhost:1420 while\n // the app server lives on the template dev port. Production Tauri\n // WebViews can also send a tauri://localhost origin. Treat only those\n // desktop origins as trusted cross-origin callers; arbitrary websites\n // still fail the CSRF check.\n if (parsed.protocol === \"tauri:\" && parsed.hostname === \"localhost\") {\n return true;\n }\n if (\n (parsed.protocol === \"http:\" || parsed.protocol === \"https:\") &&\n parsed.hostname === \"tauri.localhost\" &&\n (host.startsWith(\"localhost:\") || host.startsWith(\"127.0.0.1:\"))\n ) {\n return true;\n }\n if (\n parsed.protocol === \"http:\" &&\n (parsed.hostname === \"localhost\" || parsed.hostname === \"127.0.0.1\") &&\n parsed.port === \"1420\" &&\n (host.startsWith(\"localhost:\") || host.startsWith(\"127.0.0.1:\"))\n ) {\n return true;\n }\n return false;\n } catch {\n return false;\n }\n }\n const fetchSite = getRequestHeader(event, \"sec-fetch-site\");\n if (fetchSite) return fetchSite === \"same-origin\" || fetchSite === \"none\";\n // No Origin and no Sec-Fetch-Site: likely a non-browser client (curl,\n // server-side) — safe to allow, CSRF requires a browser with ambient cookies.\n return true;\n}\n\nexport function createTranscribeVoiceHandler() {\n return defineEventHandler(async (event: H3Event) => {\n if (getMethod(event) !== \"POST\") {\n setResponseStatus(event, 405);\n return { error: \"Method not allowed\" };\n }\n if (!isSameOriginRequest(event)) {\n setResponseStatus(event, 403);\n return { error: \"Cross-origin request rejected\" };\n }\n\n const parts = await readMultipartFormData(event).catch(() => null);\n const audio = parts?.find((p) => p.name === \"audio\");\n const textPart = parts?.find((p) => p.name === \"text\");\n const transcriptText = textPart?.data\n ? sanitizeTranscriptText(Buffer.from(textPart.data).toString(\"utf8\"))\n : undefined;\n if (!audio?.data?.length && !transcriptText) {\n setResponseStatus(event, 400);\n return { error: \"Missing audio or transcript payload\" };\n }\n if (audio?.data?.length && audio.data.length > MAX_AUDIO_BYTES) {\n setResponseStatus(event, 413);\n return { error: \"Audio too large (max 25 MB)\" };\n }\n\n const languagePart = parts?.find((p) => p.name === \"language\");\n const language = languagePart?.data\n ? Buffer.from(languagePart.data).toString(\"utf8\").trim().slice(0, 8)\n : undefined;\n const instructionsPart = parts?.find((p) => p.name === \"instructions\");\n const instructions = instructionsPart?.data\n ? sanitizeInstructions(\n Buffer.from(instructionsPart.data).toString(\"utf8\"),\n )\n : undefined;\n\n // Resolve provider preference. Per-request \"provider\" form field takes\n // precedence (the desktop client sends it on every dictation press),\n // falling back to the user's stored `voice-transcription-prefs` app\n // state for the agent sidebar composer / web clients that don't send\n // it explicitly.\n const session = await getSession(event).catch(() => null);\n if (!session?.email && process.env.NODE_ENV === \"production\") {\n setResponseStatus(event, 401);\n return { error: \"Authentication required\" };\n }\n const orgCtx = session?.email\n ? await getOrgContext(event).catch(() => null)\n : null;\n const requestContext = {\n userEmail: session?.email,\n orgId: orgCtx?.orgId ?? undefined,\n };\n const withRequestContext = async <T>(fn: () => Promise<T>): Promise<T> =>\n requestContext.userEmail\n ? runWithRequestContext(requestContext, fn)\n : fn();\n const hasBuilderPrivateKey = async () =>\n withRequestContext(() => resolveHasBuilderPrivateKey());\n const transcribeWithBuilderForRequest = (\n opts: Parameters<typeof transcribeWithBuilder>[0],\n ) => withRequestContext(() => transcribeWithBuilder(opts));\n const sessionId = session?.email ?? \"local\";\n let providerPref: string | undefined;\n // CRITICAL: presence of the \"provider\" form field is the explicit\n // signal that the client is making a per-request choice. Even if\n // the value is \"auto\" (→ undefined providerPref → fallback chain),\n // we must NOT fall back to app-state's stored preference — the\n // client just told us what it wants. Without this gate, a stale\n // `voice-transcription-prefs.provider = \"browser\"` in app-state\n // (from earlier testing) would override the client's \"auto\" and\n // 400 with \"Voice provider is set to browser\".\n const providerPart = parts?.find((p) => p.name === \"provider\");\n let providerExplicit = false;\n if (providerPart?.data) {\n const v = Buffer.from(providerPart.data)\n .toString(\"utf8\")\n .trim()\n .toLowerCase();\n if (\n v === \"auto\" ||\n v === \"browser\" ||\n v === \"builder\" ||\n v === \"builder-gemini\" ||\n v === \"gemini\" ||\n v === \"openai\" ||\n v === \"groq\"\n ) {\n providerExplicit = true;\n providerPref = v === \"auto\" ? undefined : v;\n }\n }\n if (!providerExplicit) {\n try {\n const prefs = await appStateGet(sessionId, \"voice-transcription-prefs\");\n providerPref = (\n prefs as { provider?: string; value?: { provider?: string } } | null\n )?.provider;\n providerPref ??= (prefs as { value?: { provider?: string } } | null)\n ?.value?.provider;\n } catch {\n /* fall through — default to fallback chain */\n }\n }\n\n // Respect explicit \"browser\" preference — user chose Web Speech API and\n // does not want audio uploaded to any external provider. The client\n // shouldn't hit this endpoint when \"browser\" is selected; this is a\n // defense-in-depth refusal.\n if (providerPref === \"browser\") {\n setResponseStatus(event, 400);\n return {\n error:\n 'Voice provider is set to \"browser\" (Web Speech API only). Change the preference in Settings → Voice Transcription to use a server-side provider.',\n };\n }\n\n // Per-user-or-fallback API key resolution. Hoisted up so the Gemini\n // path below can use it without duplicating logic.\n async function resolveApiKey(key: string): Promise<string | undefined> {\n return (await withRequestContext(() => resolveSecret(key))) ?? undefined;\n }\n\n if (transcriptText) {\n return await cleanupTranscriptText({\n event,\n text: transcriptText,\n instructions,\n providerPref,\n hasBuilderPrivateKey,\n withRequestContext,\n resolveApiKey,\n });\n }\n\n if (!audio?.data?.length) {\n setResponseStatus(event, 400);\n return { error: \"Missing audio payload\" };\n }\n\n const mime = audio.type || \"audio/webm\";\n const audioBytes = new Uint8Array(\n audio.data.buffer,\n audio.data.byteOffset,\n audio.data.byteLength,\n );\n\n let builderError: string | null = null;\n\n // ── Strict per-provider preferences ─────────────────────────────────\n // When the user explicitly picks a single provider (gemini / builder /\n // groq), we only try that provider and surface its error rather than\n // silently falling through. \"auto\" / undefined keeps the existing\n // fallback chain below. \"openai\" is handled by the chain (it skips\n // earlier providers and lands on the Whisper path).\n\n if (providerPref === \"gemini\") {\n const geminiKey = await resolveApiKey(\"GEMINI_API_KEY\");\n if (!geminiKey) {\n setResponseStatus(event, 400);\n return {\n error:\n \"Gemini is selected but GEMINI_API_KEY is not configured. Add it in Settings → API Keys, or change the provider preference.\",\n };\n }\n try {\n const text = await transcribeWithGemini({\n audioBytes,\n mimeType: mime,\n apiKey: geminiKey,\n language: language || undefined,\n instructions,\n });\n const trimmed = text.trim();\n if (!trimmed) {\n setResponseStatus(event, 502);\n return { error: \"Gemini returned an empty transcript.\" };\n }\n return { text: trimmed };\n } catch (err) {\n setResponseStatus(event, 502);\n return {\n error: `Gemini transcription failed: ${(err as Error)?.message ?? String(err)}`,\n };\n }\n }\n\n if (providerPref === \"builder\" || providerPref === \"builder-gemini\") {\n const label =\n providerPref === \"builder-gemini\"\n ? \"Builder Gemini Flash-Lite\"\n : \"Builder\";\n if (!(await hasBuilderPrivateKey())) {\n setResponseStatus(event, 400);\n return {\n error: `${label} is selected but Builder.io is not connected. Connect Builder.io in Settings, or change the provider preference.`,\n };\n }\n try {\n const result = await transcribeWithBuilderForRequest({\n audioBytes,\n mimeType: mime,\n model:\n providerPref === \"builder-gemini\"\n ? BUILDER_GEMINI_TRANSCRIPTION_MODEL\n : undefined,\n language: language || undefined,\n instructions,\n });\n return { text: (result.text ?? \"\").trim() };\n } catch (err) {\n const message = (err as Error)?.message ?? String(err);\n if (message.includes(\"credits exhausted\")) {\n setResponseStatus(event, 402);\n return { error: message };\n }\n setResponseStatus(event, 502);\n return { error: `${label} transcription failed: ${message}` };\n }\n }\n\n if (providerPref === \"groq\") {\n const groqKey = await resolveApiKey(\"GROQ_API_KEY\");\n if (!groqKey) {\n setResponseStatus(event, 400);\n return {\n error:\n \"Groq is selected but GROQ_API_KEY is not configured. Add it in Settings → API Keys, or change the provider preference.\",\n };\n }\n return await callWhisperCompat({\n event,\n provider: {\n name: \"groq\",\n endpoint: GROQ_URL,\n model: GROQ_MODEL,\n apiKey: groqKey,\n },\n audioBytes,\n mime,\n language,\n instructions,\n });\n }\n\n // ── Auto / undefined / openai fallback chain ────────────────────────\n\n // ── Builder Gemini Flash-Lite path ─────────────────────────────────\n // First-priority in auto mode when Builder is connected. This lets users\n // try Gemini 3.1 Flash-Lite without bringing their own Google key.\n if (providerPref !== \"openai\" && (await hasBuilderPrivateKey())) {\n try {\n const result = await transcribeWithBuilderForRequest({\n audioBytes,\n mimeType: mime,\n model: BUILDER_GEMINI_TRANSCRIPTION_MODEL,\n language: language || undefined,\n instructions,\n });\n return { text: (result.text ?? \"\").trim() };\n } catch (err) {\n const message = (err as Error)?.message ?? String(err);\n // Surface 402 (credits exhausted) as a 402 so the client can show\n // a specific upgrade prompt.\n if (message.includes(\"credits exhausted\")) {\n setResponseStatus(event, 402);\n return { error: message };\n }\n builderError = message;\n }\n }\n\n // ── Gemini Flash Lite BYOK path ────────────────────────────────────\n // If Builder is unavailable, try a user-provided Gemini key before\n // Whisper-compatible providers.\n if (providerPref !== \"openai\") {\n const geminiKey = await resolveApiKey(\"GEMINI_API_KEY\");\n if (geminiKey) {\n try {\n const text = await transcribeWithGemini({\n audioBytes,\n mimeType: mime,\n apiKey: geminiKey,\n language: language || undefined,\n instructions,\n });\n const trimmed = text.trim();\n if (trimmed) {\n console.log(`[transcribe-voice] Gemini → ${trimmed.length} chars`);\n return { text: trimmed };\n }\n console.warn(\n \"[transcribe-voice] Gemini returned empty text — falling through to next provider\",\n );\n } catch (err) {\n console.warn(\n \"[transcribe-voice] Gemini path failed, falling through:\",\n (err as Error)?.message ?? err,\n );\n }\n }\n }\n\n // If Builder is unavailable, fall through to BYOK providers rather than\n // hard-failing. This mirrors Clips' batch transcription path.\n\n // ── Groq / OpenAI Whisper-compatible path ──────────────────────────\n // (resolveApiKey is hoisted above so the Gemini path can use it too.)\n\n let provider: {\n name: \"groq\" | \"openai\";\n endpoint: string;\n model: string;\n apiKey: string;\n } | null = null;\n\n if (providerPref !== \"openai\") {\n const groqKey = await resolveApiKey(\"GROQ_API_KEY\");\n if (groqKey) {\n provider = {\n name: \"groq\",\n endpoint: GROQ_URL,\n model: GROQ_MODEL,\n apiKey: groqKey,\n };\n }\n }\n if (!provider) {\n const openaiKey = await resolveApiKey(\"OPENAI_API_KEY\");\n if (openaiKey) {\n provider = {\n name: \"openai\",\n endpoint: WHISPER_URL,\n model: OPENAI_MODEL,\n apiKey: openaiKey,\n };\n }\n }\n\n if (!provider) {\n setResponseStatus(event, builderError ? 502 : 400);\n return {\n error: builderError\n ? `Builder transcription failed: ${builderError}. Add GEMINI_API_KEY, GROQ_API_KEY, or OPENAI_API_KEY in Settings → API Keys to enable a fallback provider.`\n : \"No voice transcription provider configured. Connect Builder.io or add GEMINI_API_KEY / GROQ_API_KEY / OPENAI_API_KEY in Settings → API Keys.\",\n };\n }\n\n return await callWhisperCompat({\n event,\n provider,\n audioBytes,\n mime,\n language,\n instructions,\n });\n });\n}\n\n/**\n * Posts the audio to a Whisper-compatible OpenAI-style endpoint (Groq or\n * OpenAI itself) and returns `{ text }` / `{ error }` shaped like the\n * other branches in `createTranscribeVoiceHandler`. Hoisted so the\n * strict-Groq preference path and the auto fallback chain share one\n * implementation.\n */\nasync function callWhisperCompat({\n event,\n provider,\n audioBytes,\n mime,\n language,\n instructions,\n}: {\n event: H3Event;\n provider: {\n name: \"groq\" | \"openai\";\n endpoint: string;\n model: string;\n apiKey: string;\n };\n audioBytes: Uint8Array;\n mime: string;\n language?: string;\n instructions?: string;\n}): Promise<{ text: string } | { error: string }> {\n const ext = pickExtension(mime);\n const filename = `composer-voice.${ext}`;\n\n const form = new FormData();\n form.append(\n \"file\",\n new Blob([audioBytes as BlobPart], { type: mime }),\n filename,\n );\n form.append(\"model\", provider.model);\n form.append(\"response_format\", \"json\");\n if (language) form.append(\"language\", language);\n if (instructions) form.append(\"prompt\", instructions);\n\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 45_000);\n try {\n const res = await fetch(provider.endpoint, {\n method: \"POST\",\n headers: { Authorization: `Bearer ${provider.apiKey}` },\n body: form,\n signal: controller.signal,\n });\n if (!res.ok) {\n const text = await res.text().catch(() => \"\");\n setResponseStatus(event, res.status === 401 ? 401 : 502);\n return {\n error:\n res.status === 401\n ? `${provider.name} rejected the API key. Update it in Settings → API Keys.`\n : `${provider.name} transcription error ${res.status}: ${text.slice(0, 300)}`,\n };\n }\n const data = (await res.json()) as { text?: string };\n return { text: (data.text ?? \"\").trim() };\n } catch (err) {\n setResponseStatus(event, 502);\n return {\n error:\n (err as Error)?.name === \"AbortError\"\n ? `${provider.name} transcription timed out after 45 seconds.`\n : `Could not reach ${provider.name}: ${(err as Error)?.message ?? err}`,\n };\n } finally {\n clearTimeout(timeout);\n }\n}\n\nasync function cleanupTranscriptText({\n event,\n text,\n instructions,\n providerPref,\n hasBuilderPrivateKey,\n withRequestContext,\n resolveApiKey,\n}: {\n event: H3Event;\n text: string;\n instructions?: string;\n providerPref?: string;\n hasBuilderPrivateKey: () => Promise<boolean>;\n withRequestContext: <T>(fn: () => Promise<T>) => Promise<T>;\n resolveApiKey: (key: string) => Promise<string | undefined>;\n}): Promise<{ text: string } | { error: string }> {\n const original = text.trim();\n if (!original) return { text: \"\" };\n\n if (providerPref === \"browser\") {\n return { text: original };\n }\n\n if (providerPref === \"builder\" || providerPref === \"builder-gemini\") {\n if (!(await hasBuilderPrivateKey())) {\n setResponseStatus(event, 400);\n return {\n error:\n \"Builder.io cleanup is selected but Builder.io is not connected. Connect Builder.io in Settings, or change the provider preference.\",\n };\n }\n try {\n const cleaned = await withRequestContext(() =>\n cleanupWithBuilder({ text: original, instructions }),\n );\n return { text: cleaned || original };\n } catch (err) {\n setResponseStatus(event, 502);\n return {\n error: `Builder.io cleanup failed: ${(err as Error)?.message ?? String(err)}`,\n };\n }\n }\n\n if (providerPref === \"gemini\") {\n const geminiKey = await resolveApiKey(\"GEMINI_API_KEY\");\n if (!geminiKey) {\n setResponseStatus(event, 400);\n return {\n error:\n \"Gemini cleanup is selected but GEMINI_API_KEY is not configured.\",\n };\n }\n try {\n const cleaned = await cleanupWithGemini({\n text: original,\n apiKey: geminiKey,\n instructions,\n });\n return { text: cleaned || original };\n } catch (err) {\n setResponseStatus(event, 502);\n return {\n error: `Gemini cleanup failed: ${(err as Error)?.message ?? String(err)}`,\n };\n }\n }\n\n if (providerPref === \"openai\" || providerPref === \"groq\") {\n const keyName =\n providerPref === \"openai\" ? \"OPENAI_API_KEY\" : \"GROQ_API_KEY\";\n const apiKey = await resolveApiKey(keyName);\n if (!apiKey) {\n setResponseStatus(event, 400);\n return {\n error: `${providerPref} cleanup is selected but ${keyName} is not configured.`,\n };\n }\n try {\n const cleaned = await cleanupWithChatProvider({\n provider: providerPref,\n text: original,\n apiKey,\n instructions,\n });\n return { text: cleaned || original };\n } catch (err) {\n setResponseStatus(event, 502);\n return {\n error: `${providerPref} cleanup failed: ${(err as Error)?.message ?? String(err)}`,\n };\n }\n }\n\n if (await hasBuilderPrivateKey()) {\n try {\n const cleaned = await withRequestContext(() =>\n cleanupWithBuilder({ text: original, instructions }),\n );\n if (cleaned) return { text: cleaned };\n } catch {\n // Fall through to BYOK providers, then raw text.\n }\n }\n\n const geminiKey = await resolveApiKey(\"GEMINI_API_KEY\");\n if (geminiKey) {\n try {\n const cleaned = await cleanupWithGemini({\n text: original,\n apiKey: geminiKey,\n instructions,\n });\n if (cleaned) return { text: cleaned };\n } catch {\n // Fall through.\n }\n }\n\n const groqKey = await resolveApiKey(\"GROQ_API_KEY\");\n if (groqKey) {\n try {\n const cleaned = await cleanupWithChatProvider({\n provider: \"groq\",\n text: original,\n apiKey: groqKey,\n instructions,\n });\n if (cleaned) return { text: cleaned };\n } catch {\n // Fall through.\n }\n }\n\n const openaiKey = await resolveApiKey(\"OPENAI_API_KEY\");\n if (openaiKey) {\n try {\n const cleaned = await cleanupWithChatProvider({\n provider: \"openai\",\n text: original,\n apiKey: openaiKey,\n instructions,\n });\n if (cleaned) return { text: cleaned };\n } catch {\n // Fall through.\n }\n }\n\n return { text: original };\n}\n\nasync function cleanupWithBuilder({\n text,\n instructions,\n}: {\n text: string;\n instructions?: string;\n}): Promise<string> {\n const engine = createBuilderEngine();\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 8_000);\n let streamedText = \"\";\n let finalText = \"\";\n let terminalError: string | undefined;\n try {\n for await (const event of engine.stream({\n model: BUILDER_GEMINI_TRANSCRIPTION_MODEL,\n systemPrompt: buildCleanupSystemPrompt(instructions),\n messages: [\n {\n role: \"user\",\n content: [{ type: \"text\", text: buildCleanupUserPrompt(text) }],\n },\n ],\n tools: [],\n abortSignal: controller.signal,\n maxOutputTokens: Math.min(4096, Math.max(512, text.length * 2)),\n temperature: 0,\n })) {\n if (event.type === \"text-delta\") streamedText += event.text;\n if (event.type === \"assistant-content\") {\n finalText = event.parts\n .filter((part) => part.type === \"text\")\n .map((part) => part.text)\n .join(\"\")\n .trim();\n }\n if (event.type === \"stop\" && event.reason === \"error\") {\n terminalError = event.error ?? \"Builder gateway returned an error\";\n }\n }\n } finally {\n clearTimeout(timeout);\n }\n if (terminalError) throw new Error(terminalError);\n return stripTranscriptEnvelope(finalText || streamedText);\n}\n\nasync function cleanupWithGemini({\n text,\n apiKey,\n instructions,\n}: {\n text: string;\n apiKey: string;\n instructions?: string;\n}): Promise<string> {\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 8_000);\n try {\n const res = await fetch(GEMINI_URL, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-goog-api-key\": apiKey,\n },\n body: JSON.stringify({\n contents: [\n {\n parts: [\n { text: buildCleanupSystemPrompt(instructions) },\n { text: buildCleanupUserPrompt(text) },\n ],\n },\n ],\n generationConfig: { temperature: 0 },\n }),\n signal: controller.signal,\n });\n if (!res.ok) {\n const body = await res.text().catch(() => \"\");\n throw new Error(`Gemini ${res.status}: ${body.slice(0, 300)}`);\n }\n const data = (await res.json()) as {\n candidates?: Array<{\n content?: { parts?: Array<{ text?: string }> };\n }>;\n };\n const cleaned = data.candidates?.[0]?.content?.parts\n ?.map((p) => p.text ?? \"\")\n .join(\"\")\n .trim();\n return stripTranscriptEnvelope(cleaned ?? \"\");\n } finally {\n clearTimeout(timeout);\n }\n}\n\nasync function cleanupWithChatProvider({\n provider,\n text,\n apiKey,\n instructions,\n}: {\n provider: \"openai\" | \"groq\";\n text: string;\n apiKey: string;\n instructions?: string;\n}): Promise<string> {\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 8_000);\n const endpoint = provider === \"openai\" ? OPENAI_CHAT_URL : GROQ_CHAT_URL;\n const model =\n provider === \"openai\" ? OPENAI_CLEANUP_MODEL : GROQ_CLEANUP_MODEL;\n try {\n const res = await fetch(endpoint, {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${apiKey}`,\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n model,\n messages: [\n { role: \"system\", content: buildCleanupSystemPrompt(instructions) },\n { role: \"user\", content: buildCleanupUserPrompt(text) },\n ],\n temperature: 0,\n }),\n signal: controller.signal,\n });\n if (!res.ok) {\n const body = await res.text().catch(() => \"\");\n throw new Error(`${provider} ${res.status}: ${body.slice(0, 300)}`);\n }\n const data = (await res.json()) as {\n choices?: Array<{ message?: { content?: string } }>;\n };\n return stripTranscriptEnvelope(\n data.choices?.[0]?.message?.content?.trim() ?? \"\",\n );\n } finally {\n clearTimeout(timeout);\n }\n}\n\nfunction pickExtension(mime: string): string {\n const lower = mime.toLowerCase();\n if (lower.includes(\"mp4\") || lower.includes(\"m4a\")) return \"mp4\";\n if (lower.includes(\"mpeg\") || lower.includes(\"mp3\")) return \"mp3\";\n if (lower.includes(\"ogg\")) return \"ogg\";\n if (lower.includes(\"wav\")) return \"wav\";\n return \"webm\";\n}\n\nfunction sanitizeInstructions(value: string): string | undefined {\n const trimmed = value.replace(/\\0/g, \"\").trim();\n if (!trimmed) return undefined;\n return trimmed.slice(0, 3000);\n}\n\nfunction sanitizeTranscriptText(value: string): string | undefined {\n const trimmed = value.replace(/\\0/g, \"\").trim();\n if (!trimmed) return undefined;\n return trimmed.slice(0, MAX_TRANSCRIPT_CHARS);\n}\n\nfunction buildCleanupSystemPrompt(instructions?: string): string {\n const custom = instructions\n ? `\\n\\nUser's custom cleanup instructions:\\n${instructions}`\n : \"\";\n return `You clean up live speech-recognition transcripts before paste.\n\nRules:\n- Preserve the speaker's meaning and voice.\n- Fix obvious recognition mistakes, punctuation, capitalization, spacing, and casing.\n- Remove false starts and filler only when they are clearly not intentional.\n- Do not add facts, explanations, headings, bullets, quotes, or markdown.\n- Output only the cleaned transcript text.${custom}`;\n}\n\nfunction buildCleanupUserPrompt(text: string): string {\n return `Clean up this transcript and return only the final text:\\n\\n<transcript>\\n${text}\\n</transcript>`;\n}\n\nfunction stripTranscriptEnvelope(value: string): string {\n return value\n .trim()\n .replace(/^```(?:text)?\\s*/i, \"\")\n .replace(/\\s*```$/i, \"\")\n .replace(/^[\"“](.*)[\"”]$/s, \"$1\")\n .trim();\n}\n\nfunction buildGeminiTranscriptionPrompt({\n language,\n instructions,\n}: {\n language?: string;\n instructions?: string;\n}): string {\n const base = language\n ? `Transcribe the speech in this audio (language: ${language}).`\n : \"Transcribe the speech in this audio.\";\n const custom = instructions\n ? `\\n\\nAdditional user instructions for transcription cleanup:\\n${instructions}\\n\\nApply these only to formatting, casing, punctuation, vocabulary, and cleanup. Do not add content that is not present in the audio.`\n : \"\";\n return `${base} Output only the transcript text — no preamble, no quotes, no formatting.${custom}`;\n}\n\n/**\n * Transcribe audio via Gemini Flash Lite.\n *\n * Gemini accepts the audio inline as base64 alongside a text prompt; we\n * ask for just the transcript with no preamble. 30s timeout — Gemini is\n * fast and we'd rather fall through to Whisper than wait longer.\n *\n * Gemini's documented audio formats are WAV / MP3 / AIFF / AAC / OGG /\n * FLAC — webm/opus is not officially supported but in practice it\n * accepts webm too. If Gemini rejects it the caller falls through.\n */\nasync function transcribeWithGemini({\n audioBytes,\n mimeType,\n apiKey,\n language,\n instructions,\n}: {\n audioBytes: Uint8Array;\n mimeType: string;\n apiKey: string;\n language?: string;\n instructions?: string;\n}): Promise<string> {\n const base64 = uint8ArrayToBase64(audioBytes);\n const prompt = buildGeminiTranscriptionPrompt({ language, instructions });\n\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 30_000);\n try {\n const res = await fetch(GEMINI_URL, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-goog-api-key\": apiKey,\n },\n body: JSON.stringify({\n contents: [\n {\n parts: [\n { text: prompt },\n {\n inlineData: {\n mimeType: normalizeAudioMimeForGemini(mimeType),\n data: base64,\n },\n },\n ],\n },\n ],\n // Keep generation tight — we want the transcript verbatim, no\n // creative reinterpretation.\n generationConfig: { temperature: 0 },\n }),\n signal: controller.signal,\n });\n if (!res.ok) {\n const body = await res.text().catch(() => \"\");\n throw new Error(`Gemini ${res.status}: ${body.slice(0, 300)}`);\n }\n const data = (await res.json()) as {\n candidates?: Array<{\n content?: { parts?: Array<{ text?: string }> };\n }>;\n };\n const text = data.candidates?.[0]?.content?.parts\n ?.map((p) => p.text ?? \"\")\n .join(\"\")\n .trim();\n return text ?? \"\";\n } finally {\n clearTimeout(timeout);\n }\n}\n\nfunction normalizeAudioMimeForGemini(mime: string): string {\n // Strip codec parameters — Gemini doesn't need them and some variants\n // (e.g. \"audio/webm;codecs=opus\") are rejected as unknown.\n const lower = mime.toLowerCase().split(\";\")[0].trim();\n if (!lower) return \"audio/webm\";\n return lower;\n}\n\nfunction uint8ArrayToBase64(bytes: Uint8Array): string {\n if (typeof Buffer !== \"undefined\") {\n return Buffer.from(bytes).toString(\"base64\");\n }\n // Fallback for non-Node runtimes — chunk to avoid stack overflow.\n let binary = \"\";\n const chunk = 0x8000;\n for (let i = 0; i < bytes.length; i += chunk) {\n binary += String.fromCharCode(\n ...bytes.subarray(i, Math.min(i + chunk, bytes.length)),\n );\n }\n return btoa(binary);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"transcribe-voice.js","sourceRoot":"","sources":["../../src/server/transcribe-voice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,GAElB,MAAM,IAAI,CAAC;AAEZ,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,GAEtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,2BAA2B,EAC3B,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,WAAW,GAAG,gDAAgD,CAAC;AACrE,MAAM,QAAQ,GAAG,qDAAqD,CAAC;AACvE,MAAM,aAAa,GAAG,iDAAiD,CAAC;AACxE,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAC5C,MAAM,kBAAkB,GAAG,yBAAyB,CAAC;AACrD,MAAM,YAAY,GAAG,WAAW,CAAC;AACjC,MAAM,eAAe,GAAG,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EAAE,CAAC;aACR,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,IAAI,EAAE,CAAC;IACpB,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAED,SAAS,2BAA2B,CAAC,IAAY;IAC/C,sEAAsE;IACtE,2DAA2D;IAC3D,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACtD,IAAI,CAAC,KAAK;QAAE,OAAO,YAAY,CAAC;IAChC,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAiB;IAC3C,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACD,kEAAkE;IAClE,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,KAAK,GAAG,MAAM,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC;QAC7C,MAAM,IAAI,MAAM,CAAC,YAAY,CAC3B,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CACxD,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC","sourcesContent":["/**\n * POST /_agent-native/transcribe-voice\n *\n * Receives an audio blob from the agent sidebar composer and forwards it to\n * the configured transcription provider. Returns `{ text }` on success,\n * `{ error }` on failure.\n *\n * Key resolution order for BYOK providers:\n * 1. Request-scoped encrypted secret (`app_secrets`: user, org, workspace).\n * 2. Env var fallback only outside authenticated request contexts.\n *\n * If no server provider is configured, returns 400 with an error the\n * composer UI can surface (the client falls back to Web Speech when possible).\n *\n * This is a framework route rather than a `defineAction` because multipart\n * audio bodies aren't a clean fit for the action contract (actions are\n * typed JSON-in / JSON-out).\n */\n\nimport {\n defineEventHandler,\n getMethod,\n getRequestHeader,\n readMultipartFormData,\n setResponseStatus,\n type H3Event,\n} from \"h3\";\n\nimport { createBuilderEngine } from \"../agent/engine/builder-engine.js\";\nimport { appStateGet } from \"../application-state/store.js\";\nimport { getOrgContext } from \"../org/context.js\";\nimport { transcribeWithBuilder } from \"../transcription/builder-transcription.js\";\nimport {\n applyVoiceContextReplacements,\n buildVoiceGuidanceBlock,\n parseVoiceContextPack,\n voiceContextTermsOnly,\n type VoiceContextPack,\n} from \"../voice/index.js\";\nimport { getSession } from \"./auth.js\";\nimport {\n resolveHasBuilderPrivateKey,\n resolveSecret,\n} from \"./credential-provider.js\";\nimport { runWithRequestContext } from \"./request-context.js\";\n\nconst WHISPER_URL = \"https://api.openai.com/v1/audio/transcriptions\";\nconst GROQ_URL = \"https://api.groq.com/openai/v1/audio/transcriptions\";\nconst GROQ_CHAT_URL = \"https://api.groq.com/openai/v1/chat/completions\";\nconst GROQ_MODEL = \"whisper-large-v3-turbo\";\nconst GROQ_CLEANUP_MODEL = \"llama-3.3-70b-versatile\";\nconst OPENAI_MODEL = \"whisper-1\";\nconst OPENAI_CHAT_URL = \"https://api.openai.com/v1/chat/completions\";\nconst OPENAI_CLEANUP_MODEL = \"gpt-5.4-mini\";\nconst MAX_AUDIO_BYTES = 25 * 1024 * 1024; // Whisper hard limit.\nconst MAX_TRANSCRIPT_CHARS = 40_000;\n// Public Builder transcription model id. The Builder gateway maps this to\n// Gemini 3.1 Flash-Lite.\nconst BUILDER_GEMINI_TRANSCRIPTION_MODEL = \"gemini-3-1-flash-lite\";\n\n// Gemini Flash Lite BYOK path when GEMINI_API_KEY is configured.\n// Gemini accepts inline audio; we just give it the bytes and a \"transcribe\n// this\" prompt and it replies with text. 2.5x faster TTFT than 2.5 Flash\n// per Google's release notes, and noticeably snappier than the Whisper\n// round-trip even on a fast connection.\n// Keep the direct Google AI path on a stable public model id; Builder's\n// managed provider above handles the newer Gemini 3.1 Flash-Lite preview.\nconst GEMINI_MODEL = \"gemini-2.0-flash-lite\";\nconst GEMINI_URL = `https://generativelanguage.googleapis.com/v1beta/models/${GEMINI_MODEL}:generateContent`;\n\n/**\n * Reject cross-site POSTs. Cookies are `SameSite=None; Secure` over HTTPS so\n * the browser would otherwise attach the session to a forged form submission\n * from evil.com, causing us to spend OpenAI credits on the user's behalf.\n * Same-origin browsers always send `Origin` on POST; if it's missing we fall\n * back to `Sec-Fetch-Site` so Safari's fetch-spec behavior still works.\n */\nfunction isSameOriginRequest(event: H3Event): boolean {\n const host = getRequestHeader(event, \"host\");\n const origin = getRequestHeader(event, \"origin\");\n if (origin && host) {\n try {\n const parsed = new URL(origin);\n if (parsed.host === host) return true;\n // Tauri desktop dev serves the tray WebView from localhost:1420 while\n // the app server lives on the template dev port. Production Tauri\n // WebViews can also send a tauri://localhost origin. Treat only those\n // desktop origins as trusted cross-origin callers; arbitrary websites\n // still fail the CSRF check.\n if (parsed.protocol === \"tauri:\" && parsed.hostname === \"localhost\") {\n return true;\n }\n if (\n (parsed.protocol === \"http:\" || parsed.protocol === \"https:\") &&\n parsed.hostname === \"tauri.localhost\" &&\n (host.startsWith(\"localhost:\") || host.startsWith(\"127.0.0.1:\"))\n ) {\n return true;\n }\n if (\n parsed.protocol === \"http:\" &&\n (parsed.hostname === \"localhost\" || parsed.hostname === \"127.0.0.1\") &&\n parsed.port === \"1420\" &&\n (host.startsWith(\"localhost:\") || host.startsWith(\"127.0.0.1:\"))\n ) {\n return true;\n }\n return false;\n } catch {\n return false;\n }\n }\n const fetchSite = getRequestHeader(event, \"sec-fetch-site\");\n if (fetchSite) return fetchSite === \"same-origin\" || fetchSite === \"none\";\n // No Origin and no Sec-Fetch-Site: likely a non-browser client (curl,\n // server-side) — safe to allow, CSRF requires a browser with ambient cookies.\n return true;\n}\n\nexport function createTranscribeVoiceHandler() {\n return defineEventHandler(async (event: H3Event) => {\n if (getMethod(event) !== \"POST\") {\n setResponseStatus(event, 405);\n return { error: \"Method not allowed\" };\n }\n if (!isSameOriginRequest(event)) {\n setResponseStatus(event, 403);\n return { error: \"Cross-origin request rejected\" };\n }\n\n const parts = await readMultipartFormData(event).catch(() => null);\n const audio = parts?.find((p) => p.name === \"audio\");\n const textPart = parts?.find((p) => p.name === \"text\");\n const transcriptText = textPart?.data\n ? sanitizeTranscriptText(Buffer.from(textPart.data).toString(\"utf8\"))\n : undefined;\n if (!audio?.data?.length && !transcriptText) {\n setResponseStatus(event, 400);\n return { error: \"Missing audio or transcript payload\" };\n }\n if (audio?.data?.length && audio.data.length > MAX_AUDIO_BYTES) {\n setResponseStatus(event, 413);\n return { error: \"Audio too large (max 25 MB)\" };\n }\n\n const languagePart = parts?.find((p) => p.name === \"language\");\n const language = languagePart?.data\n ? Buffer.from(languagePart.data).toString(\"utf8\").trim().slice(0, 8)\n : undefined;\n const instructionsPart = parts?.find((p) => p.name === \"instructions\");\n const instructions = instructionsPart?.data\n ? sanitizeInstructions(\n Buffer.from(instructionsPart.data).toString(\"utf8\"),\n )\n : undefined;\n const voiceContextPart = parts?.find(\n (p) => p.name === \"voiceContext\" || p.name === \"contextPack\",\n );\n const voiceContext = voiceContextPart?.data\n ? parseVoiceContextPack(\n Buffer.from(voiceContextPart.data).toString(\"utf8\"),\n )\n : undefined;\n const voiceGuidance = buildVoiceGuidanceBlock({\n instructions,\n contextPack: voiceContextTermsOnly(voiceContext),\n });\n const applyVoiceContext = (value: string) =>\n applyVoiceContextReplacements(value, voiceContext).trim();\n\n // Resolve provider preference. Per-request \"provider\" form field takes\n // precedence (the desktop client sends it on every dictation press),\n // falling back to the user's stored `voice-transcription-prefs` app\n // state for the agent sidebar composer / web clients that don't send\n // it explicitly.\n const session = await getSession(event).catch(() => null);\n if (!session?.email && process.env.NODE_ENV === \"production\") {\n setResponseStatus(event, 401);\n return { error: \"Authentication required\" };\n }\n const orgCtx = session?.email\n ? await getOrgContext(event).catch(() => null)\n : null;\n const requestContext = {\n userEmail: session?.email,\n orgId: orgCtx?.orgId ?? undefined,\n };\n const withRequestContext = async <T>(fn: () => Promise<T>): Promise<T> =>\n requestContext.userEmail\n ? runWithRequestContext(requestContext, fn)\n : fn();\n const hasBuilderPrivateKey = async () =>\n withRequestContext(() => resolveHasBuilderPrivateKey());\n const transcribeWithBuilderForRequest = (\n opts: Parameters<typeof transcribeWithBuilder>[0],\n ) => withRequestContext(() => transcribeWithBuilder(opts));\n const sessionId = session?.email ?? \"local\";\n let providerPref: string | undefined;\n // CRITICAL: presence of the \"provider\" form field is the explicit\n // signal that the client is making a per-request choice. Even if\n // the value is \"auto\" (→ undefined providerPref → fallback chain),\n // we must NOT fall back to app-state's stored preference — the\n // client just told us what it wants. Without this gate, a stale\n // `voice-transcription-prefs.provider = \"browser\"` in app-state\n // (from earlier testing) would override the client's \"auto\" and\n // 400 with \"Voice provider is set to browser\".\n const providerPart = parts?.find((p) => p.name === \"provider\");\n let providerExplicit = false;\n if (providerPart?.data) {\n const v = Buffer.from(providerPart.data)\n .toString(\"utf8\")\n .trim()\n .toLowerCase();\n if (\n v === \"auto\" ||\n v === \"browser\" ||\n v === \"builder\" ||\n v === \"builder-gemini\" ||\n v === \"gemini\" ||\n v === \"openai\" ||\n v === \"groq\"\n ) {\n providerExplicit = true;\n providerPref = v === \"auto\" ? undefined : v;\n }\n }\n if (!providerExplicit) {\n try {\n const prefs = await appStateGet(sessionId, \"voice-transcription-prefs\");\n providerPref = (\n prefs as { provider?: string; value?: { provider?: string } } | null\n )?.provider;\n providerPref ??= (prefs as { value?: { provider?: string } } | null)\n ?.value?.provider;\n } catch {\n /* fall through — default to fallback chain */\n }\n }\n\n // Respect explicit \"browser\" preference — user chose Web Speech API and\n // does not want audio uploaded to any external provider. The client\n // shouldn't hit this endpoint when \"browser\" is selected; this is a\n // defense-in-depth refusal.\n if (providerPref === \"browser\" && !transcriptText) {\n setResponseStatus(event, 400);\n return {\n error:\n 'Voice provider is set to \"browser\" (Web Speech API only). Change the preference in Settings → Voice Transcription to use a server-side provider.',\n };\n }\n\n // Per-user-or-fallback API key resolution. Hoisted up so the Gemini\n // path below can use it without duplicating logic.\n async function resolveApiKey(key: string): Promise<string | undefined> {\n return (await withRequestContext(() => resolveSecret(key))) ?? undefined;\n }\n\n if (transcriptText) {\n return await cleanupTranscriptText({\n event,\n text: transcriptText,\n instructions: voiceGuidance,\n contextPack: voiceContext,\n providerPref,\n hasBuilderPrivateKey,\n withRequestContext,\n resolveApiKey,\n });\n }\n\n if (!audio?.data?.length) {\n setResponseStatus(event, 400);\n return { error: \"Missing audio payload\" };\n }\n\n const mime = audio.type || \"audio/webm\";\n const audioBytes = new Uint8Array(\n audio.data.buffer,\n audio.data.byteOffset,\n audio.data.byteLength,\n );\n\n let builderError: string | null = null;\n\n // ── Strict per-provider preferences ─────────────────────────────────\n // When the user explicitly picks a single provider (gemini / builder /\n // groq), we only try that provider and surface its error rather than\n // silently falling through. \"auto\" / undefined keeps the existing\n // fallback chain below. \"openai\" is handled by the chain (it skips\n // earlier providers and lands on the Whisper path).\n\n if (providerPref === \"gemini\") {\n const geminiKey = await resolveApiKey(\"GEMINI_API_KEY\");\n if (!geminiKey) {\n setResponseStatus(event, 400);\n return {\n error:\n \"Gemini is selected but GEMINI_API_KEY is not configured. Add it in Settings → API Keys, or change the provider preference.\",\n };\n }\n try {\n const text = await transcribeWithGemini({\n audioBytes,\n mimeType: mime,\n apiKey: geminiKey,\n language: language || undefined,\n instructions: voiceGuidance,\n });\n const trimmed = applyVoiceContext(text);\n if (!trimmed) {\n setResponseStatus(event, 502);\n return { error: \"Gemini returned an empty transcript.\" };\n }\n return { text: trimmed };\n } catch (err) {\n setResponseStatus(event, 502);\n return {\n error: `Gemini transcription failed: ${(err as Error)?.message ?? String(err)}`,\n };\n }\n }\n\n if (providerPref === \"builder\" || providerPref === \"builder-gemini\") {\n const label =\n providerPref === \"builder-gemini\"\n ? \"Builder Gemini Flash-Lite\"\n : \"Builder\";\n if (!(await hasBuilderPrivateKey())) {\n setResponseStatus(event, 400);\n return {\n error: `${label} is selected but Builder.io is not connected. Connect Builder.io in Settings, or change the provider preference.`,\n };\n }\n try {\n const result = await transcribeWithBuilderForRequest({\n audioBytes,\n mimeType: mime,\n model:\n providerPref === \"builder-gemini\"\n ? BUILDER_GEMINI_TRANSCRIPTION_MODEL\n : undefined,\n language: language || undefined,\n instructions: voiceGuidance,\n });\n return { text: applyVoiceContext(result.text ?? \"\") };\n } catch (err) {\n const message = (err as Error)?.message ?? String(err);\n if (message.includes(\"credits exhausted\")) {\n setResponseStatus(event, 402);\n return { error: message };\n }\n setResponseStatus(event, 502);\n return { error: `${label} transcription failed: ${message}` };\n }\n }\n\n if (providerPref === \"groq\") {\n const groqKey = await resolveApiKey(\"GROQ_API_KEY\");\n if (!groqKey) {\n setResponseStatus(event, 400);\n return {\n error:\n \"Groq is selected but GROQ_API_KEY is not configured. Add it in Settings → API Keys, or change the provider preference.\",\n };\n }\n return await callWhisperCompat({\n event,\n provider: {\n name: \"groq\",\n endpoint: GROQ_URL,\n model: GROQ_MODEL,\n apiKey: groqKey,\n },\n audioBytes,\n mime,\n language,\n instructions: voiceGuidance,\n contextPack: voiceContext,\n });\n }\n\n // ── Auto / undefined / openai fallback chain ────────────────────────\n\n // ── Builder Gemini Flash-Lite path ─────────────────────────────────\n // First-priority in auto mode when Builder is connected. This lets users\n // try Gemini 3.1 Flash-Lite without bringing their own Google key.\n if (providerPref !== \"openai\" && (await hasBuilderPrivateKey())) {\n try {\n const result = await transcribeWithBuilderForRequest({\n audioBytes,\n mimeType: mime,\n model: BUILDER_GEMINI_TRANSCRIPTION_MODEL,\n language: language || undefined,\n instructions: voiceGuidance,\n });\n return { text: applyVoiceContext(result.text ?? \"\") };\n } catch (err) {\n const message = (err as Error)?.message ?? String(err);\n // Surface 402 (credits exhausted) as a 402 so the client can show\n // a specific upgrade prompt.\n if (message.includes(\"credits exhausted\")) {\n setResponseStatus(event, 402);\n return { error: message };\n }\n builderError = message;\n }\n }\n\n // ── Gemini Flash Lite BYOK path ────────────────────────────────────\n // If Builder is unavailable, try a user-provided Gemini key before\n // Whisper-compatible providers.\n if (providerPref !== \"openai\") {\n const geminiKey = await resolveApiKey(\"GEMINI_API_KEY\");\n if (geminiKey) {\n try {\n const text = await transcribeWithGemini({\n audioBytes,\n mimeType: mime,\n apiKey: geminiKey,\n language: language || undefined,\n instructions: voiceGuidance,\n });\n const trimmed = applyVoiceContext(text);\n if (trimmed) {\n console.log(`[transcribe-voice] Gemini → ${trimmed.length} chars`);\n return { text: trimmed };\n }\n console.warn(\n \"[transcribe-voice] Gemini returned empty text — falling through to next provider\",\n );\n } catch (err) {\n console.warn(\n \"[transcribe-voice] Gemini path failed, falling through:\",\n (err as Error)?.message ?? err,\n );\n }\n }\n }\n\n // If Builder is unavailable, fall through to BYOK providers rather than\n // hard-failing. This mirrors Clips' batch transcription path.\n\n // ── Groq / OpenAI Whisper-compatible path ──────────────────────────\n // (resolveApiKey is hoisted above so the Gemini path can use it too.)\n\n let provider: {\n name: \"groq\" | \"openai\";\n endpoint: string;\n model: string;\n apiKey: string;\n } | null = null;\n\n if (providerPref !== \"openai\") {\n const groqKey = await resolveApiKey(\"GROQ_API_KEY\");\n if (groqKey) {\n provider = {\n name: \"groq\",\n endpoint: GROQ_URL,\n model: GROQ_MODEL,\n apiKey: groqKey,\n };\n }\n }\n if (!provider) {\n const openaiKey = await resolveApiKey(\"OPENAI_API_KEY\");\n if (openaiKey) {\n provider = {\n name: \"openai\",\n endpoint: WHISPER_URL,\n model: OPENAI_MODEL,\n apiKey: openaiKey,\n };\n }\n }\n\n if (!provider) {\n setResponseStatus(event, builderError ? 502 : 400);\n return {\n error: builderError\n ? `Builder transcription failed: ${builderError}. Add GEMINI_API_KEY, GROQ_API_KEY, or OPENAI_API_KEY in Settings → API Keys to enable a fallback provider.`\n : \"No voice transcription provider configured. Connect Builder.io or add GEMINI_API_KEY / GROQ_API_KEY / OPENAI_API_KEY in Settings → API Keys.\",\n };\n }\n\n return await callWhisperCompat({\n event,\n provider,\n audioBytes,\n mime,\n language,\n instructions: voiceGuidance,\n contextPack: voiceContext,\n });\n });\n}\n\n/**\n * Posts the audio to a Whisper-compatible OpenAI-style endpoint (Groq or\n * OpenAI itself) and returns `{ text }` / `{ error }` shaped like the\n * other branches in `createTranscribeVoiceHandler`. Hoisted so the\n * strict-Groq preference path and the auto fallback chain share one\n * implementation.\n */\nasync function callWhisperCompat({\n event,\n provider,\n audioBytes,\n mime,\n language,\n instructions,\n contextPack,\n}: {\n event: H3Event;\n provider: {\n name: \"groq\" | \"openai\";\n endpoint: string;\n model: string;\n apiKey: string;\n };\n audioBytes: Uint8Array;\n mime: string;\n language?: string;\n instructions?: string;\n contextPack?: VoiceContextPack;\n}): Promise<{ text: string } | { error: string }> {\n const ext = pickExtension(mime);\n const filename = `composer-voice.${ext}`;\n\n const form = new FormData();\n form.append(\n \"file\",\n new Blob([audioBytes as BlobPart], { type: mime }),\n filename,\n );\n form.append(\"model\", provider.model);\n form.append(\"response_format\", \"json\");\n if (language) form.append(\"language\", language);\n if (instructions) form.append(\"prompt\", instructions);\n\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 45_000);\n try {\n const res = await fetch(provider.endpoint, {\n method: \"POST\",\n headers: { Authorization: `Bearer ${provider.apiKey}` },\n body: form,\n signal: controller.signal,\n });\n if (!res.ok) {\n const text = await res.text().catch(() => \"\");\n setResponseStatus(event, res.status === 401 ? 401 : 502);\n return {\n error:\n res.status === 401\n ? `${provider.name} rejected the API key. Update it in Settings → API Keys.`\n : `${provider.name} transcription error ${res.status}: ${text.slice(0, 300)}`,\n };\n }\n const data = (await res.json()) as { text?: string };\n return {\n text: applyVoiceContextReplacements(\n (data.text ?? \"\").trim(),\n contextPack,\n ).trim(),\n };\n } catch (err) {\n setResponseStatus(event, 502);\n return {\n error:\n (err as Error)?.name === \"AbortError\"\n ? `${provider.name} transcription timed out after 45 seconds.`\n : `Could not reach ${provider.name}: ${(err as Error)?.message ?? err}`,\n };\n } finally {\n clearTimeout(timeout);\n }\n}\n\nasync function cleanupTranscriptText({\n event,\n text,\n instructions,\n contextPack,\n providerPref,\n hasBuilderPrivateKey,\n withRequestContext,\n resolveApiKey,\n}: {\n event: H3Event;\n text: string;\n instructions?: string;\n contextPack?: VoiceContextPack;\n providerPref?: string;\n hasBuilderPrivateKey: () => Promise<boolean>;\n withRequestContext: <T>(fn: () => Promise<T>) => Promise<T>;\n resolveApiKey: (key: string) => Promise<string | undefined>;\n}): Promise<{ text: string } | { error: string }> {\n const original = text.trim();\n if (!original) return { text: \"\" };\n const finalizeText = (value: string) =>\n applyVoiceContextReplacements(value || original, contextPack).trim();\n\n if (providerPref === \"browser\") {\n return { text: finalizeText(original) };\n }\n\n if (providerPref === \"builder\" || providerPref === \"builder-gemini\") {\n if (!(await hasBuilderPrivateKey())) {\n setResponseStatus(event, 400);\n return {\n error:\n \"Builder.io cleanup is selected but Builder.io is not connected. Connect Builder.io in Settings, or change the provider preference.\",\n };\n }\n try {\n const cleaned = await withRequestContext(() =>\n cleanupWithBuilder({ text: original, instructions }),\n );\n return { text: finalizeText(cleaned || original) };\n } catch (err) {\n setResponseStatus(event, 502);\n return {\n error: `Builder.io cleanup failed: ${(err as Error)?.message ?? String(err)}`,\n };\n }\n }\n\n if (providerPref === \"gemini\") {\n const geminiKey = await resolveApiKey(\"GEMINI_API_KEY\");\n if (!geminiKey) {\n setResponseStatus(event, 400);\n return {\n error:\n \"Gemini cleanup is selected but GEMINI_API_KEY is not configured.\",\n };\n }\n try {\n const cleaned = await cleanupWithGemini({\n text: original,\n apiKey: geminiKey,\n instructions,\n });\n return { text: finalizeText(cleaned || original) };\n } catch (err) {\n setResponseStatus(event, 502);\n return {\n error: `Gemini cleanup failed: ${(err as Error)?.message ?? String(err)}`,\n };\n }\n }\n\n if (providerPref === \"openai\" || providerPref === \"groq\") {\n const keyName =\n providerPref === \"openai\" ? \"OPENAI_API_KEY\" : \"GROQ_API_KEY\";\n const apiKey = await resolveApiKey(keyName);\n if (!apiKey) {\n setResponseStatus(event, 400);\n return {\n error: `${providerPref} cleanup is selected but ${keyName} is not configured.`,\n };\n }\n try {\n const cleaned = await cleanupWithChatProvider({\n provider: providerPref,\n text: original,\n apiKey,\n instructions,\n });\n return { text: finalizeText(cleaned || original) };\n } catch (err) {\n setResponseStatus(event, 502);\n return {\n error: `${providerPref} cleanup failed: ${(err as Error)?.message ?? String(err)}`,\n };\n }\n }\n\n if (await hasBuilderPrivateKey()) {\n try {\n const cleaned = await withRequestContext(() =>\n cleanupWithBuilder({ text: original, instructions }),\n );\n if (cleaned) return { text: finalizeText(cleaned) };\n } catch {\n // Fall through to BYOK providers, then raw text.\n }\n }\n\n const geminiKey = await resolveApiKey(\"GEMINI_API_KEY\");\n if (geminiKey) {\n try {\n const cleaned = await cleanupWithGemini({\n text: original,\n apiKey: geminiKey,\n instructions,\n });\n if (cleaned) return { text: finalizeText(cleaned) };\n } catch {\n // Fall through.\n }\n }\n\n const groqKey = await resolveApiKey(\"GROQ_API_KEY\");\n if (groqKey) {\n try {\n const cleaned = await cleanupWithChatProvider({\n provider: \"groq\",\n text: original,\n apiKey: groqKey,\n instructions,\n });\n if (cleaned) return { text: finalizeText(cleaned) };\n } catch {\n // Fall through.\n }\n }\n\n const openaiKey = await resolveApiKey(\"OPENAI_API_KEY\");\n if (openaiKey) {\n try {\n const cleaned = await cleanupWithChatProvider({\n provider: \"openai\",\n text: original,\n apiKey: openaiKey,\n instructions,\n });\n if (cleaned) return { text: finalizeText(cleaned) };\n } catch {\n // Fall through.\n }\n }\n\n return { text: finalizeText(original) };\n}\n\nasync function cleanupWithBuilder({\n text,\n instructions,\n}: {\n text: string;\n instructions?: string;\n}): Promise<string> {\n const engine = createBuilderEngine();\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 8_000);\n let streamedText = \"\";\n let finalText = \"\";\n let terminalError: string | undefined;\n try {\n for await (const event of engine.stream({\n model: BUILDER_GEMINI_TRANSCRIPTION_MODEL,\n systemPrompt: buildCleanupSystemPrompt(instructions),\n messages: [\n {\n role: \"user\",\n content: [{ type: \"text\", text: buildCleanupUserPrompt(text) }],\n },\n ],\n tools: [],\n abortSignal: controller.signal,\n maxOutputTokens: Math.min(4096, Math.max(512, text.length * 2)),\n temperature: 0,\n })) {\n if (event.type === \"text-delta\") streamedText += event.text;\n if (event.type === \"assistant-content\") {\n finalText = event.parts\n .filter((part) => part.type === \"text\")\n .map((part) => part.text)\n .join(\"\")\n .trim();\n }\n if (event.type === \"stop\" && event.reason === \"error\") {\n terminalError = event.error ?? \"Builder gateway returned an error\";\n }\n }\n } finally {\n clearTimeout(timeout);\n }\n if (terminalError) throw new Error(terminalError);\n return stripTranscriptEnvelope(finalText || streamedText);\n}\n\nasync function cleanupWithGemini({\n text,\n apiKey,\n instructions,\n}: {\n text: string;\n apiKey: string;\n instructions?: string;\n}): Promise<string> {\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 8_000);\n try {\n const res = await fetch(GEMINI_URL, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-goog-api-key\": apiKey,\n },\n body: JSON.stringify({\n contents: [\n {\n parts: [\n { text: buildCleanupSystemPrompt(instructions) },\n { text: buildCleanupUserPrompt(text) },\n ],\n },\n ],\n generationConfig: { temperature: 0 },\n }),\n signal: controller.signal,\n });\n if (!res.ok) {\n const body = await res.text().catch(() => \"\");\n throw new Error(`Gemini ${res.status}: ${body.slice(0, 300)}`);\n }\n const data = (await res.json()) as {\n candidates?: Array<{\n content?: { parts?: Array<{ text?: string }> };\n }>;\n };\n const cleaned = data.candidates?.[0]?.content?.parts\n ?.map((p) => p.text ?? \"\")\n .join(\"\")\n .trim();\n return stripTranscriptEnvelope(cleaned ?? \"\");\n } finally {\n clearTimeout(timeout);\n }\n}\n\nasync function cleanupWithChatProvider({\n provider,\n text,\n apiKey,\n instructions,\n}: {\n provider: \"openai\" | \"groq\";\n text: string;\n apiKey: string;\n instructions?: string;\n}): Promise<string> {\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 8_000);\n const endpoint = provider === \"openai\" ? OPENAI_CHAT_URL : GROQ_CHAT_URL;\n const model =\n provider === \"openai\" ? OPENAI_CLEANUP_MODEL : GROQ_CLEANUP_MODEL;\n try {\n const res = await fetch(endpoint, {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${apiKey}`,\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n model,\n messages: [\n { role: \"system\", content: buildCleanupSystemPrompt(instructions) },\n { role: \"user\", content: buildCleanupUserPrompt(text) },\n ],\n temperature: 0,\n }),\n signal: controller.signal,\n });\n if (!res.ok) {\n const body = await res.text().catch(() => \"\");\n throw new Error(`${provider} ${res.status}: ${body.slice(0, 300)}`);\n }\n const data = (await res.json()) as {\n choices?: Array<{ message?: { content?: string } }>;\n };\n return stripTranscriptEnvelope(\n data.choices?.[0]?.message?.content?.trim() ?? \"\",\n );\n } finally {\n clearTimeout(timeout);\n }\n}\n\nfunction pickExtension(mime: string): string {\n const lower = mime.toLowerCase();\n if (lower.includes(\"mp4\") || lower.includes(\"m4a\")) return \"mp4\";\n if (lower.includes(\"mpeg\") || lower.includes(\"mp3\")) return \"mp3\";\n if (lower.includes(\"ogg\")) return \"ogg\";\n if (lower.includes(\"wav\")) return \"wav\";\n return \"webm\";\n}\n\nfunction sanitizeInstructions(value: string): string | undefined {\n const trimmed = value.replace(/\\0/g, \"\").trim();\n if (!trimmed) return undefined;\n return trimmed.slice(0, 3000);\n}\n\nfunction sanitizeTranscriptText(value: string): string | undefined {\n const trimmed = value.replace(/\\0/g, \"\").trim();\n if (!trimmed) return undefined;\n return trimmed.slice(0, MAX_TRANSCRIPT_CHARS);\n}\n\nfunction buildCleanupSystemPrompt(instructions?: string): string {\n const custom = instructions\n ? `\\n\\nUser's custom cleanup instructions:\\n${instructions}`\n : \"\";\n return `You clean up live speech-recognition transcripts before paste.\n\nRules:\n- Preserve the speaker's meaning and voice.\n- Fix obvious recognition mistakes, punctuation, capitalization, spacing, and casing.\n- Remove false starts and filler only when they are clearly not intentional.\n- Do not add facts, explanations, headings, bullets, quotes, or markdown.\n- Output only the cleaned transcript text.${custom}`;\n}\n\nfunction buildCleanupUserPrompt(text: string): string {\n return `Clean up this transcript and return only the final text:\\n\\n<transcript>\\n${text}\\n</transcript>`;\n}\n\nfunction stripTranscriptEnvelope(value: string): string {\n return value\n .trim()\n .replace(/^```(?:text)?\\s*/i, \"\")\n .replace(/\\s*```$/i, \"\")\n .replace(/^[\"“](.*)[\"”]$/s, \"$1\")\n .trim();\n}\n\nfunction buildGeminiTranscriptionPrompt({\n language,\n instructions,\n}: {\n language?: string;\n instructions?: string;\n}): string {\n const base = language\n ? `Transcribe the speech in this audio (language: ${language}).`\n : \"Transcribe the speech in this audio.\";\n const custom = instructions\n ? `\\n\\nAdditional user instructions for transcription cleanup:\\n${instructions}\\n\\nApply these only to formatting, casing, punctuation, vocabulary, and cleanup. Do not add content that is not present in the audio.`\n : \"\";\n return `${base} Output only the transcript text — no preamble, no quotes, no formatting.${custom}`;\n}\n\n/**\n * Transcribe audio via Gemini Flash Lite.\n *\n * Gemini accepts the audio inline as base64 alongside a text prompt; we\n * ask for just the transcript with no preamble. 30s timeout — Gemini is\n * fast and we'd rather fall through to Whisper than wait longer.\n *\n * Gemini's documented audio formats are WAV / MP3 / AIFF / AAC / OGG /\n * FLAC — webm/opus is not officially supported but in practice it\n * accepts webm too. If Gemini rejects it the caller falls through.\n */\nasync function transcribeWithGemini({\n audioBytes,\n mimeType,\n apiKey,\n language,\n instructions,\n}: {\n audioBytes: Uint8Array;\n mimeType: string;\n apiKey: string;\n language?: string;\n instructions?: string;\n}): Promise<string> {\n const base64 = uint8ArrayToBase64(audioBytes);\n const prompt = buildGeminiTranscriptionPrompt({ language, instructions });\n\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 30_000);\n try {\n const res = await fetch(GEMINI_URL, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-goog-api-key\": apiKey,\n },\n body: JSON.stringify({\n contents: [\n {\n parts: [\n { text: prompt },\n {\n inlineData: {\n mimeType: normalizeAudioMimeForGemini(mimeType),\n data: base64,\n },\n },\n ],\n },\n ],\n // Keep generation tight — we want the transcript verbatim, no\n // creative reinterpretation.\n generationConfig: { temperature: 0 },\n }),\n signal: controller.signal,\n });\n if (!res.ok) {\n const body = await res.text().catch(() => \"\");\n throw new Error(`Gemini ${res.status}: ${body.slice(0, 300)}`);\n }\n const data = (await res.json()) as {\n candidates?: Array<{\n content?: { parts?: Array<{ text?: string }> };\n }>;\n };\n const text = data.candidates?.[0]?.content?.parts\n ?.map((p) => p.text ?? \"\")\n .join(\"\")\n .trim();\n return text ?? \"\";\n } finally {\n clearTimeout(timeout);\n }\n}\n\nfunction normalizeAudioMimeForGemini(mime: string): string {\n // Strip codec parameters — Gemini doesn't need them and some variants\n // (e.g. \"audio/webm;codecs=opus\") are rejected as unknown.\n const lower = mime.toLowerCase().split(\";\")[0].trim();\n if (!lower) return \"audio/webm\";\n return lower;\n}\n\nfunction uint8ArrayToBase64(bytes: Uint8Array): string {\n if (typeof Buffer !== \"undefined\") {\n return Buffer.from(bytes).toString(\"base64\");\n }\n // Fallback for non-Node runtimes — chunk to avoid stack overflow.\n let binary = \"\";\n const chunk = 0x8000;\n for (let i = 0; i < bytes.length; i += chunk) {\n binary += String.fromCharCode(\n ...bytes.subarray(i, Math.min(i + chunk, bytes.length)),\n );\n }\n return btoa(binary);\n}\n"]}
|
|
@@ -5,6 +5,7 @@ export declare function isClaudeMcpContentOrigin(origin: string | null | undefin
|
|
|
5
5
|
export declare function isChatGptMcpSandboxOrigin(origin: string | null | undefined): boolean;
|
|
6
6
|
export declare function isMcpProductHostOrigin(origin: string | null | undefined): boolean;
|
|
7
7
|
export declare function isAgentNativeFirstPartyAppOrigin(origin: string | null | undefined): boolean;
|
|
8
|
+
export declare function isBuilderIoEmbedOrigin(origin: string | null | undefined): boolean;
|
|
8
9
|
export declare function isMcpEmbedCorsOrigin(origin: string | null | undefined): boolean;
|
|
9
10
|
export declare function shouldAllowMcpEmbedCredentials(origin: string | null | undefined): boolean;
|
|
10
11
|
export declare const MCP_EMBED_STATIC_ASSET_HEADERS: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-embed-headers.d.ts","sourceRoot":"","sources":["../../src/shared/mcp-embed-headers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,yLAC+I,CAAC;AACzL,eAAO,MAAM,uBAAuB,oCAAoC,CAAC;AAYzE,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAWT;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAUT;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAWT;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAOT;AAED,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAgBT;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,
|
|
1
|
+
{"version":3,"file":"mcp-embed-headers.d.ts","sourceRoot":"","sources":["../../src/shared/mcp-embed-headers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,yLAC+I,CAAC;AACzL,eAAO,MAAM,uBAAuB,oCAAoC,CAAC;AAYzE,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAWT;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAUT;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAWT;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAOT;AAED,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAgBT;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAiBT;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAUT;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAQT;AAED,eAAO,MAAM,8BAA8B;aACzC,6BAA6B,EAAE,GAAG;aAClC,8BAA8B,EAAE,cAAc;CACtC,CAAC;AAoBX,wBAAgB,6BAA6B,CAC3C,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,OAAO,8BAA8B,CAAA;CAAE,CAAC,CAapE"}
|
|
@@ -70,13 +70,32 @@ export function isAgentNativeFirstPartyAppOrigin(origin) {
|
|
|
70
70
|
return false;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
+
export function isBuilderIoEmbedOrigin(origin) {
|
|
74
|
+
if (!origin)
|
|
75
|
+
return false;
|
|
76
|
+
try {
|
|
77
|
+
const url = new URL(origin);
|
|
78
|
+
const hostname = url.hostname.toLowerCase();
|
|
79
|
+
return (url.protocol === "https:" &&
|
|
80
|
+
!url.username &&
|
|
81
|
+
!url.password &&
|
|
82
|
+
(hostname === "builder.io" ||
|
|
83
|
+
hostname.endsWith(".builder.io") ||
|
|
84
|
+
hostname === "builder.my" ||
|
|
85
|
+
hostname.endsWith(".builder.my")));
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
73
91
|
export function isMcpEmbedCorsOrigin(origin) {
|
|
74
92
|
return (origin === "null" ||
|
|
75
93
|
isLocalMcpEmbedOrigin(origin) ||
|
|
76
94
|
isClaudeMcpContentOrigin(origin) ||
|
|
77
95
|
isChatGptMcpSandboxOrigin(origin) ||
|
|
78
96
|
isMcpProductHostOrigin(origin) ||
|
|
79
|
-
isAgentNativeFirstPartyAppOrigin(origin)
|
|
97
|
+
isAgentNativeFirstPartyAppOrigin(origin) ||
|
|
98
|
+
isBuilderIoEmbedOrigin(origin));
|
|
80
99
|
}
|
|
81
100
|
export function shouldAllowMcpEmbedCredentials(origin) {
|
|
82
101
|
return (origin !== "null" &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-embed-headers.js","sourceRoot":"","sources":["../../src/shared/mcp-embed-headers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,4BAA4B,GACvC,sLAAsL,CAAC;AACzL,MAAM,CAAC,MAAM,uBAAuB,GAAG,iCAAiC,CAAC;AAEzE,MAAM,0BAA0B,GAAG,wCAAwC,CAAC;AAC5E,MAAM,2BAA2B,GAC/B,iDAAiD,CAAC;AACpD,MAAM,wCAAwC,GAAG,mBAAmB,CAAC;AACrE,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IACvC,yBAAyB;IACzB,qBAAqB;IACrB,mBAAmB;CACpB,CAAC,CAAC;AAEH,MAAM,UAAU,qBAAqB,CACnC,MAAiC;IAEjC,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,M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AI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,QAAiB;IAEjB,MAAM,IAAI,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,KAAK,GAGP,EAAE,CAAC;IACP,KAAK,MAAM,OAAO,IAAI,qBAAqB,EAAE,CAAC;QAC5C,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;QAC7D,IAAI,IAAI,EAAE,CAAC;YACT,KAAK,CAAC,GAAG,IAAI,GAAG,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;QAC3E,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["export const MCP_EMBED_CORS_ALLOW_HEADERS =\n \"Content-Type,Authorization,X-Requested-With,X-Request-Source,X-Agent-Native-CSRF,X-Agent-Native-Frontend,X-User-Timezone,X-Agent-Native-Embed-Target,X-Agent-Native-Embed-Transplant\";\nexport const EMBED_TRANSPLANT_HEADER = \"x-agent-native-embed-transplant\";\n\nconst CLAUDE_MCP_CONTENT_HOST_RE = /^[a-f0-9]{32}\\.claudemcpcontent\\.com$/i;\nconst CHATGPT_MCP_SANDBOX_HOST_RE =\n /^(?:[^.]+\\.)?web-sandbox\\.oaiusercontent\\.com$/i;\nconst AGENT_NATIVE_FIRST_PARTY_APP_HOST_SUFFIX = \".agent-native.com\";\nconst MCP_PRODUCT_HOST_ORIGINS = new Set([\n \"https://chat.openai.com\",\n \"https://chatgpt.com\",\n \"https://claude.ai\",\n]);\n\nexport function isLocalMcpEmbedOrigin(\n origin: string | null | undefined,\n): boolean {\n if (!origin) return false;\n try {\n const url = new URL(origin);\n return (\n url.protocol === \"http:\" &&\n [\"localhost\", \"127.0.0.1\", \"::1\", \"[::1]\"].includes(url.hostname)\n );\n } catch {\n return false;\n }\n}\n\nexport function isClaudeMcpContentOrigin(\n origin: string | null | undefined,\n): boolean {\n if (!origin) return false;\n try {\n const url = new URL(origin);\n return (\n url.protocol === \"https:\" && CLAUDE_MCP_CONTENT_HOST_RE.test(url.hostname)\n );\n } catch {\n return false;\n }\n}\n\nexport function isChatGptMcpSandboxOrigin(\n origin: string | null | undefined,\n): boolean {\n if (!origin) return false;\n try {\n const url = new URL(origin);\n return (\n url.protocol === \"https:\" &&\n CHATGPT_MCP_SANDBOX_HOST_RE.test(url.hostname)\n );\n } catch {\n return false;\n }\n}\n\nexport function isMcpProductHostOrigin(\n origin: string | null | undefined,\n): boolean {\n if (!origin) return false;\n try {\n return MCP_PRODUCT_HOST_ORIGINS.has(new URL(origin).origin);\n } catch {\n return false;\n }\n}\n\nexport function isAgentNativeFirstPartyAppOrigin(\n origin: string | null | undefined,\n): boolean {\n if (!origin) return false;\n try {\n const url = new URL(origin);\n const hostname = url.hostname.toLowerCase();\n return (\n url.protocol === \"https:\" &&\n !url.username &&\n !url.password &&\n !url.port &&\n hostname.endsWith(AGENT_NATIVE_FIRST_PARTY_APP_HOST_SUFFIX) &&\n hostname.length > AGENT_NATIVE_FIRST_PARTY_APP_HOST_SUFFIX.length\n );\n } catch {\n return false;\n }\n}\n\nexport function isBuilderIoEmbedOrigin(\n origin: string | null | undefined,\n): boolean {\n if (!origin) return false;\n try {\n const url = new URL(origin);\n const hostname = url.hostname.toLowerCase();\n return (\n url.protocol === \"https:\" &&\n !url.username &&\n !url.password &&\n (hostname === \"builder.io\" ||\n hostname.endsWith(\".builder.io\") ||\n hostname === \"builder.my\" ||\n hostname.endsWith(\".builder.my\"))\n );\n } catch {\n return false;\n }\n}\n\nexport function isMcpEmbedCorsOrigin(\n origin: string | null | undefined,\n): boolean {\n return (\n origin === \"null\" ||\n isLocalMcpEmbedOrigin(origin) ||\n isClaudeMcpContentOrigin(origin) ||\n isChatGptMcpSandboxOrigin(origin) ||\n isMcpProductHostOrigin(origin) ||\n isAgentNativeFirstPartyAppOrigin(origin) ||\n isBuilderIoEmbedOrigin(origin)\n );\n}\n\nexport function shouldAllowMcpEmbedCredentials(\n origin: string | null | undefined,\n): boolean {\n return (\n origin !== \"null\" &&\n !isClaudeMcpContentOrigin(origin) &&\n !isChatGptMcpSandboxOrigin(origin) &&\n !isMcpProductHostOrigin(origin) &&\n !isAgentNativeFirstPartyAppOrigin(origin)\n );\n}\n\nexport const MCP_EMBED_STATIC_ASSET_HEADERS = {\n \"Access-Control-Allow-Origin\": \"*\",\n \"Cross-Origin-Resource-Policy\": \"cross-origin\",\n} as const;\n\nconst STATIC_ASSET_PATTERNS = [\n \"/assets/**\",\n \"/favicon.ico\",\n \"/favicon.svg\",\n \"/manifest.json\",\n \"/icon-*.svg\",\n \"/agent-native-*.svg\",\n \"/library-presets/**\",\n];\n\nfunction normalizeBasePath(basePath: string | undefined): string {\n const base = (basePath ?? \"\").trim();\n if (!base || base === \"/\") return \"\";\n return base.startsWith(\"/\")\n ? base.replace(/\\/+$/g, \"\")\n : `/${base.replace(/\\/+$/g, \"\")}`;\n}\n\nexport function mcpEmbedStaticAssetRouteRules(\n basePath?: string,\n): Record<string, { headers: typeof MCP_EMBED_STATIC_ASSET_HEADERS }> {\n const base = normalizeBasePath(basePath);\n const rules: Record<\n string,\n { headers: typeof MCP_EMBED_STATIC_ASSET_HEADERS }\n > = {};\n for (const pattern of STATIC_ASSET_PATTERNS) {\n rules[pattern] = { headers: MCP_EMBED_STATIC_ASSET_HEADERS };\n if (base) {\n rules[`${base}${pattern}`] = { headers: MCP_EMBED_STATIC_ASSET_HEADERS };\n }\n }\n return rules;\n}\n"]}
|