@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":"MermaidBlock.js","sourceRoot":"","sources":["../../../../src/client/blocks/library/MermaidBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QA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,EAAC,YAAY,4CACzB,eAAK,SAAS,EAAC,cAAc,aAC3B,KAAC,QAAQ,IAAC,OAAO,EAAE,QAAQ,+BAA2B,EACtD,mBACE,EAAE,EAAE,QAAQ,EACZ,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,QAAQ,EAAE,CAAC,QAAQ,EACnB,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,QAAQ,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAEnD,SAAS,EAAC,oQAAoQ,EAC9Q,WAAW,EAAE,0CAA0C,GACvD,EACF,YAAG,SAAS,EAAC,+BAA+B,+EAExC,IACA,EACN,eAAK,SAAS,EAAC,cAAc,aAC3B,KAAC,QAAQ,IAAC,OAAO,EAAE,SAAS,wBAAoB,EAChD,KAAC,QAAQ,IACP,EAAE,EAAE,SAAS,EACb,KAAK,EAAE,IAAI,CAAC,OAAO,IAAI,EAAE,EACzB,QAAQ,EAAE,CAAC,QAAQ,EACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,QAAQ,CAAC;4BACP,GAAG,IAAI;4BACP,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,SAAS;yBACzC,CAAC,EAEJ,WAAW,EAAC,kBAAkB,GAC9B,IACE,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { IconArrowsMaximize } from \"@tabler/icons-react\";\nimport { useEffect, useId, useMemo, useState } from \"react\";\n\nimport { ltrCodeBlockProps } from \"../code-block-direction.js\";\nimport type { BlockEditProps, BlockReadProps } from \"../types.js\";\nimport { useBlockCopy } from \"./block-copy.js\";\nimport { DevInput, DevLabel } from \"./dev-doc-ui.js\";\nimport { DiagramLightbox } from \"./diagram.js\";\nimport type { MermaidData } from \"./mermaid.config.js\";\n\n/**\n * Read + Edit renderers for a `mermaid` block — a Mermaid diagram definition\n * (flowchart, sequence, etc.) edited as raw text and rendered as an\n * Excalidraw-style SVG so it matches the plan's hand-drawn / sketchy house\n * style.\n * Lives in core so any app can register the dev-doc block; it stays app-agnostic\n * (no shadcn / next-themes import).\n *\n * The Mermaid and Excalidraw runtimes are browser-only,\n * so the Read renderer SSR-guards: it renders a lightweight placeholder until a\n * `useEffect` confirms it is mounted, then dynamically imports\n * `@excalidraw/mermaid-to-excalidraw` + `@excalidraw/excalidraw` and injects\n * the exported SVG. If Excalidraw conversion fails, it falls back to Mermaid's\n * hand-drawn renderer. Parse errors never throw; they show the raw source and\n * the error message.\n *\n * Dark mode: the plan editor toggles a `.dark` class on <html>. The Read renderer\n * reads `document.documentElement.classList.contains(\"dark\")` (re-checking on a\n * `MutationObserver` of the html class) and re-renders the diagram with matching\n * light/dark export settings.\n */\n\ninterface MermaidRenderState {\n svg?: string;\n error?: string;\n}\n\nfunction errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : \"Failed to render diagram\";\n}\n\nfunction sanitizeSvgMarkup(svg: string): string {\n if (typeof DOMParser === \"undefined\") return svg;\n const doc = new DOMParser().parseFromString(svg, \"image/svg+xml\");\n doc\n .querySelectorAll(\"script, foreignObject\")\n .forEach((node) => node.remove());\n for (const element of Array.from(doc.querySelectorAll(\"*\"))) {\n for (const attr of Array.from(element.attributes)) {\n const name = attr.name.toLowerCase();\n const value = attr.value.trim().toLowerCase();\n if (\n name.startsWith(\"on\") ||\n ((name === \"href\" || name.endsWith(\":href\")) &&\n value.startsWith(\"javascript:\"))\n ) {\n element.removeAttribute(attr.name);\n }\n }\n }\n return doc.documentElement.outerHTML;\n}\n\nasync function renderExcalidrawSvg(\n source: string,\n isDark: boolean,\n): Promise<string> {\n const [{ parseMermaidToExcalidraw }, excalidraw] = await Promise.all([\n import(\"@excalidraw/mermaid-to-excalidraw\") as Promise<{\n parseMermaidToExcalidraw: (source: string) => Promise<{\n elements: unknown[];\n files?: Record<string, unknown>;\n }>;\n }>,\n import(\"@excalidraw/excalidraw\") as Promise<{\n convertToExcalidrawElements: (elements: unknown[]) => unknown[];\n exportToSvg: (options: {\n elements: unknown[];\n appState: {\n theme: \"dark\" | \"light\";\n viewBackgroundColor: string;\n exportWithDarkMode: boolean;\n };\n files: Record<string, unknown>;\n }) => Promise<{ outerHTML: string }>;\n }>,\n ]);\n const { elements, files } = await parseMermaidToExcalidraw(source);\n const excalidrawElements = excalidraw.convertToExcalidrawElements(elements);\n const svg = await excalidraw.exportToSvg({\n elements: excalidrawElements,\n appState: {\n theme: isDark ? \"dark\" : \"light\",\n viewBackgroundColor: \"transparent\",\n exportWithDarkMode: isDark,\n },\n files: files ?? {},\n });\n return sanitizeSvgMarkup(svg.outerHTML);\n}\n\nasync function renderMermaidSvg(\n source: string,\n id: string,\n isDark: boolean,\n): Promise<string> {\n const mermaid = (\n (await import(\"mermaid\")) as {\n default: {\n initialize: (config: Record<string, unknown>) => void;\n render: (id: string, source: string) => Promise<{ svg: string }>;\n };\n }\n ).default;\n mermaid.initialize({\n startOnLoad: false,\n securityLevel: \"strict\",\n look: \"handDrawn\",\n theme: isDark ? \"dark\" : \"neutral\",\n });\n const { svg } = await mermaid.render(id, source);\n return sanitizeSvgMarkup(svg);\n}\n\n/** Read the live dark-mode flag from the document root (next-themes-free). */\nfunction useIsDark(): boolean {\n const [isDark, setIsDark] = useState(false);\n useEffect(() => {\n if (typeof document === \"undefined\") return;\n const root = document.documentElement;\n const read = () => setIsDark(root.classList.contains(\"dark\"));\n read();\n const observer = new MutationObserver(read);\n observer.observe(root, { attributes: true, attributeFilter: [\"class\"] });\n return () => observer.disconnect();\n }, []);\n return isDark;\n}\n\n/**\n * Inject a rendered Mermaid/Excalidraw SVG string. Shared by the inline render\n * and the expand lightbox so the enlarged view shows the exact same SVG; the\n * lightbox passes `enlarged` so the SVG stretches to fill the wider modal\n * (`max-w-5xl`) instead of staying at its intrinsic inline size.\n */\nfunction MermaidSvg({ svg, enlarged }: { svg: string; enlarged?: boolean }) {\n return (\n <div\n className={\n enlarged\n ? \"flex justify-center overflow-auto [&_svg]:h-auto [&_svg]:w-full [&_svg]:max-w-full\"\n : \"mt-2 flex justify-center overflow-auto [&_svg]:h-auto [&_svg]:max-w-full\"\n }\n // Excalidraw and Mermaid output are sanitized before injection.\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n );\n}\n\nfunction MermaidDiagram({\n source,\n idSeed,\n}: {\n source: string;\n idSeed: string;\n}) {\n const isDark = useIsDark();\n const copy = useBlockCopy();\n // Only render the diagram after mount: `mermaid` is client-only and SSR has no\n // DOM for it to measure against.\n const [mounted, setMounted] = useState(false);\n const [state, setState] = useState<MermaidRenderState>({});\n const [expanded, setExpanded] = useState(false);\n\n // A DOM-id-safe, stable-per-block render id. Mermaid requires a valid CSS id.\n const renderId = useMemo(\n () => `mermaid-${idSeed.replace(/[^a-zA-Z0-9_-]/g, \"-\")}`,\n [idSeed],\n );\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n useEffect(() => {\n if (!mounted) return;\n let cancelled = false;\n const trimmed = source.trim();\n if (!trimmed) {\n setState({});\n return;\n }\n (async () => {\n try {\n const svg = await renderExcalidrawSvg(trimmed, isDark);\n if (!cancelled) setState({ svg });\n } catch (excalidrawError) {\n try {\n // Fallback keeps diagrams usable if a Mermaid feature is not supported\n // by the Excalidraw converter in a given host app.\n const svg = await renderMermaidSvg(\n trimmed,\n `${renderId}-${isDark ? \"d\" : \"l\"}`,\n isDark,\n );\n if (!cancelled) setState({ svg });\n } catch (mermaidError) {\n const excalidrawMessage = errorMessage(excalidrawError);\n const mermaidMessage = errorMessage(mermaidError);\n if (!cancelled) {\n setState({\n error:\n excalidrawMessage === mermaidMessage\n ? mermaidMessage\n : `Excalidraw: ${excalidrawMessage}; Mermaid fallback: ${mermaidMessage}`,\n });\n }\n }\n }\n })();\n return () => {\n cancelled = true;\n };\n // Re-render when the source OR the resolved theme changes so toggling\n // dark/light updates the diagram live.\n }, [mounted, source, isDark, renderId]);\n\n if (!mounted) {\n return (\n <div className=\"mt-2 flex min-h-24 items-center justify-center rounded-lg border border-plan-line bg-plan-code text-sm text-plan-muted\">\n {copy.loadingDiagram}\n </div>\n );\n }\n\n if (state.error) {\n return (\n <div className=\"mt-2 space-y-2\">\n <pre className=\"overflow-auto rounded-lg border border-plan-line bg-plan-code px-3 py-2 font-mono [font-size:var(--plan-code-size)] text-plan-code-text\">\n {source}\n </pre>\n <p className=\"text-sm text-plan-muted\">\n {copy.couldNotRenderDiagram}: {state.error}\n </p>\n </div>\n );\n }\n\n if (!state.svg) {\n return (\n <div className=\"mt-2 flex min-h-24 items-center justify-center rounded-lg border border-plan-line bg-plan-code text-sm text-plan-muted\">\n {copy.addDiagramDefinition}\n </div>\n );\n }\n\n // Hover-revealed top-right expand button + shared lightbox, matching the\n // DiagramBlock affordance exactly (same icon, reveal-on-hover/focus, Escape +\n // backdrop close via the reused `DiagramLightbox`). The enlarged view re-shows\n // the same rendered SVG scaled to fit the wider modal.\n const svg = state.svg;\n return (\n <div className=\"group/mermaid relative\">\n <MermaidSvg svg={svg} />\n <button\n type=\"button\"\n data-plan-interactive\n onClick={() => setExpanded(true)}\n aria-label={copy.expandDiagram}\n title={copy.expandDiagram}\n className=\"an-diagram-expand-trigger absolute right-2 top-2 z-10 flex size-7 items-center justify-center rounded-md border border-border/60 bg-background/90 text-muted-foreground opacity-0 shadow-sm backdrop-blur transition-[color,opacity] hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring group-hover/mermaid:opacity-100\"\n >\n <IconArrowsMaximize className=\"size-4\" />\n </button>\n {expanded ? (\n <DiagramLightbox onClose={() => setExpanded(false)}>\n <MermaidSvg svg={svg} enlarged />\n </DiagramLightbox>\n ) : null}\n </div>\n );\n}\n\n/**\n * Read-only renderer for a `mermaid` block. Wraps the diagram in the standard\n * titled `plan-block` section + an optional muted caption, matching the plan\n * house style.\n */\nexport function MermaidRead({\n data,\n blockId,\n title,\n summary,\n}: BlockReadProps<MermaidData>) {\n return (\n <section\n {...ltrCodeBlockProps}\n className=\"plan-block\"\n data-block-id={blockId}\n >\n {title && <div className=\"plan-block-label\">{title}</div>}\n <MermaidDiagram source={data.source} idSeed={blockId} />\n {data.caption && (\n <p className=\"mt-3 text-sm text-plan-muted\">{data.caption}</p>\n )}\n {summary && <p className=\"mt-5 text-plan-muted\">{summary}</p>}\n </section>\n );\n}\n\n/**\n * Edit renderer (panel surface) for a `mermaid` block: a monospace textarea for\n * the diagram source plus an optional caption input. Both commit immediately via\n * `onChange`. `editSurface: \"panel\"` means the registry renders the `Read` view\n * with a corner edit button that opens this form in the plan's shared popover, so\n * this renders only the form (the popover supplies the chrome and title).\n */\nexport function MermaidEdit({\n data,\n onChange,\n editable,\n}: BlockEditProps<MermaidData>) {\n const sourceId = useId();\n const captionId = useId();\n\n return (\n <div className=\"grid gap-3\" data-plan-interactive>\n <div className=\"grid gap-1.5\">\n <DevLabel htmlFor={sourceId}>Diagram source</DevLabel>\n <textarea\n id={sourceId}\n value={data.source}\n readOnly={!editable}\n spellCheck={false}\n onChange={(event) =>\n onChange({ ...data, source: event.target.value })\n }\n className=\"flex min-h-56 w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\"\n placeholder={\"flowchart TD\\n A[Start] --> B{Decision}\"}\n />\n <p className=\"text-xs text-muted-foreground\">\n Mermaid syntax — flowcharts, sequence diagrams, and more.\n </p>\n </div>\n <div className=\"grid gap-1.5\">\n <DevLabel htmlFor={captionId}>Caption</DevLabel>\n <DevInput\n id={captionId}\n value={data.caption ?? \"\"}\n readOnly={!editable}\n onChange={(event) =>\n onChange({\n ...data,\n caption: event.target.value || undefined,\n })\n }\n placeholder=\"Optional caption\"\n />\n </div>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MermaidBlock.js","sourceRoot":"","sources":["../../../../src/client/blocks/library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\";\nimport { useEffect, useId, useMemo, useState } from \"react\";\n\nimport { ltrCodeBlockProps } from \"../code-block-direction.js\";\nimport type { BlockEditProps, BlockReadProps } from \"../types.js\";\nimport { useBlockCopy } from \"./block-copy.js\";\nimport { DevInput, DevLabel } from \"./dev-doc-ui.js\";\nimport { DiagramLightbox } from \"./diagram.js\";\nimport type { MermaidData } from \"./mermaid.config.js\";\n\n/**\n * Read + Edit renderers for a `mermaid` block — a Mermaid diagram definition\n * (flowchart, sequence, etc.) edited as raw text and rendered as an\n * Excalidraw-style SVG so it matches the plan's hand-drawn / sketchy house\n * style.\n * Lives in core so any app can register the dev-doc block; it stays app-agnostic\n * (no shadcn / next-themes import).\n *\n * The Mermaid and Excalidraw runtimes are browser-only,\n * so the Read renderer SSR-guards: it renders a lightweight placeholder until a\n * `useEffect` confirms it is mounted, then dynamically imports\n * `@excalidraw/mermaid-to-excalidraw` + `@excalidraw/excalidraw` and injects\n * the exported SVG. If Excalidraw conversion fails, it falls back to Mermaid's\n * hand-drawn renderer. Parse errors never throw; they show the raw source and\n * the error message.\n *\n * Dark mode: the plan editor toggles a `.dark` class on <html>. The Read renderer\n * reads `document.documentElement.classList.contains(\"dark\")` (re-checking on a\n * `MutationObserver` of the html class) and re-renders the diagram with matching\n * light/dark export settings.\n */\n\ninterface MermaidRenderState {\n svg?: string;\n error?: string;\n}\n\nfunction errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : \"Failed to render diagram\";\n}\n\nfunction sanitizeSvgMarkup(svg: string): string {\n if (typeof DOMParser === \"undefined\") return svg;\n const doc = new DOMParser().parseFromString(svg, \"image/svg+xml\");\n doc\n .querySelectorAll(\"script, foreignObject\")\n .forEach((node) => node.remove());\n for (const element of Array.from(doc.querySelectorAll(\"*\"))) {\n for (const attr of Array.from(element.attributes)) {\n const name = attr.name.toLowerCase();\n const value = attr.value.trim().toLowerCase();\n if (\n name.startsWith(\"on\") ||\n ((name === \"href\" || name.endsWith(\":href\")) &&\n value.startsWith(\"javascript:\"))\n ) {\n element.removeAttribute(attr.name);\n }\n }\n }\n return doc.documentElement.outerHTML;\n}\n\nasync function renderExcalidrawSvg(\n source: string,\n isDark: boolean,\n): Promise<string> {\n const [{ parseMermaidToExcalidraw }, excalidraw] = await Promise.all([\n import(\"@excalidraw/mermaid-to-excalidraw\") as Promise<{\n parseMermaidToExcalidraw: (source: string) => Promise<{\n elements: unknown[];\n files?: Record<string, unknown>;\n }>;\n }>,\n import(\"@excalidraw/excalidraw\") as Promise<{\n convertToExcalidrawElements: (elements: unknown[]) => unknown[];\n exportToSvg: (options: {\n elements: unknown[];\n appState: {\n theme: \"dark\" | \"light\";\n viewBackgroundColor: string;\n exportWithDarkMode: boolean;\n };\n files: Record<string, unknown>;\n }) => Promise<{ outerHTML: string }>;\n }>,\n ]);\n const { elements, files } = await parseMermaidToExcalidraw(source);\n const excalidrawElements = excalidraw.convertToExcalidrawElements(elements);\n const svg = await excalidraw.exportToSvg({\n elements: excalidrawElements,\n appState: {\n theme: isDark ? \"dark\" : \"light\",\n viewBackgroundColor: \"transparent\",\n exportWithDarkMode: isDark,\n },\n files: files ?? {},\n });\n return sanitizeSvgMarkup(svg.outerHTML);\n}\n\nasync function renderMermaidSvg(\n source: string,\n id: string,\n isDark: boolean,\n): Promise<string> {\n const mermaid = (\n (await import(\"mermaid\")) as {\n default: {\n initialize: (config: Record<string, unknown>) => void;\n render: (id: string, source: string) => Promise<{ svg: string }>;\n };\n }\n ).default;\n mermaid.initialize({\n startOnLoad: false,\n securityLevel: \"strict\",\n look: \"handDrawn\",\n theme: isDark ? \"dark\" : \"neutral\",\n });\n const { svg } = await mermaid.render(id, source);\n return sanitizeSvgMarkup(svg);\n}\n\n/** Read the live dark-mode flag from the document root (next-themes-free). */\nfunction useIsDark(): boolean {\n const [isDark, setIsDark] = useState(false);\n useEffect(() => {\n if (typeof document === \"undefined\") return;\n const root = document.documentElement;\n const read = () => setIsDark(root.classList.contains(\"dark\"));\n read();\n const observer = new MutationObserver(read);\n observer.observe(root, { attributes: true, attributeFilter: [\"class\"] });\n return () => observer.disconnect();\n }, []);\n return isDark;\n}\n\n/**\n * Inject a rendered Mermaid/Excalidraw SVG string. Shared by the inline render\n * and the expand lightbox so the enlarged view shows the exact same SVG; the\n * lightbox passes `enlarged` so the SVG stretches to fill the wider modal\n * (`max-w-5xl`) instead of staying at its intrinsic inline size.\n */\nfunction MermaidSvg({ svg, enlarged }: { svg: string; enlarged?: boolean }) {\n return (\n <div\n className={\n enlarged\n ? \"flex justify-center overflow-auto [&_svg]:h-auto [&_svg]:w-full [&_svg]:max-w-full\"\n : \"mt-2 flex justify-center overflow-auto [&_svg]:h-auto [&_svg]:max-w-full\"\n }\n // Excalidraw and Mermaid output are sanitized before injection.\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n );\n}\n\nfunction MermaidDiagram({\n source,\n idSeed,\n}: {\n source: string;\n idSeed: string;\n}) {\n const isDark = useIsDark();\n const copy = useBlockCopy();\n // Only render the diagram after mount: `mermaid` is client-only and SSR has no\n // DOM for it to measure against.\n const [mounted, setMounted] = useState(false);\n const [state, setState] = useState<MermaidRenderState>({});\n const [expanded, setExpanded] = useState(false);\n\n // A DOM-id-safe, stable-per-block render id. Mermaid requires a valid CSS id.\n const renderId = useMemo(\n () => `mermaid-${idSeed.replace(/[^a-zA-Z0-9_-]/g, \"-\")}`,\n [idSeed],\n );\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n useEffect(() => {\n if (!mounted) return;\n let cancelled = false;\n const trimmed = source.trim();\n if (!trimmed) {\n setState({});\n return;\n }\n (async () => {\n try {\n const svg = await renderExcalidrawSvg(trimmed, isDark);\n if (!cancelled) setState({ svg });\n } catch (excalidrawError) {\n try {\n // Fallback keeps diagrams usable if a Mermaid feature is not supported\n // by the Excalidraw converter in a given host app.\n const svg = await renderMermaidSvg(\n trimmed,\n `${renderId}-${isDark ? \"d\" : \"l\"}`,\n isDark,\n );\n if (!cancelled) setState({ svg });\n } catch (mermaidError) {\n const excalidrawMessage = errorMessage(excalidrawError);\n const mermaidMessage = errorMessage(mermaidError);\n if (!cancelled) {\n setState({\n error:\n excalidrawMessage === mermaidMessage\n ? mermaidMessage\n : `Excalidraw: ${excalidrawMessage}; Mermaid fallback: ${mermaidMessage}`,\n });\n }\n }\n }\n })();\n return () => {\n cancelled = true;\n };\n // Re-render when the source OR the resolved theme changes so toggling\n // dark/light updates the diagram live.\n }, [mounted, source, isDark, renderId]);\n\n if (!mounted) {\n return (\n <div className=\"mt-2 flex min-h-24 items-center justify-center rounded-lg border border-plan-line bg-plan-code text-sm text-plan-muted\">\n {copy.loadingDiagram}\n </div>\n );\n }\n\n if (state.error) {\n return (\n <div className=\"mt-2 space-y-2\">\n <pre className=\"overflow-auto rounded-lg border border-plan-line bg-plan-code px-3 py-2 font-mono [font-size:var(--plan-code-size)] text-plan-code-text\">\n {source}\n </pre>\n <p className=\"text-sm text-plan-muted\">\n {copy.couldNotRenderDiagram}: {state.error}\n </p>\n </div>\n );\n }\n\n if (!state.svg) {\n return (\n <div className=\"mt-2 flex min-h-24 items-center justify-center rounded-lg border border-plan-line bg-plan-code text-sm text-plan-muted\">\n {copy.addDiagramDefinition}\n </div>\n );\n }\n\n // Hover-revealed top-right expand button + shared lightbox, matching the\n // DiagramBlock affordance exactly (same icon, reveal-on-hover/focus, Escape +\n // backdrop close via the reused `DiagramLightbox`). The enlarged view re-shows\n // the same rendered SVG scaled to fit the wider modal.\n const svg = state.svg;\n return (\n <div className=\"group/mermaid relative\">\n <MermaidSvg svg={svg} />\n <button\n type=\"button\"\n data-plan-interactive\n onClick={() => setExpanded(true)}\n aria-label={copy.expandDiagram}\n title={copy.expandDiagram}\n className=\"an-diagram-expand-trigger absolute right-2 top-2 z-10 flex size-7 items-center justify-center rounded-md border border-border/60 bg-background text-muted-foreground opacity-0 shadow-sm transition-[color,opacity] hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring group-hover/mermaid:opacity-100\"\n >\n <IconArrowsMaximize className=\"size-4\" />\n </button>\n {expanded ? (\n <DiagramLightbox onClose={() => setExpanded(false)}>\n <MermaidSvg svg={svg} enlarged />\n </DiagramLightbox>\n ) : null}\n </div>\n );\n}\n\n/**\n * Read-only renderer for a `mermaid` block. Wraps the diagram in the standard\n * titled `plan-block` section + an optional muted caption, matching the plan\n * house style.\n */\nexport function MermaidRead({\n data,\n blockId,\n title,\n summary,\n}: BlockReadProps<MermaidData>) {\n return (\n <section\n {...ltrCodeBlockProps}\n className=\"plan-block\"\n data-block-id={blockId}\n >\n {title && <div className=\"plan-block-label\">{title}</div>}\n <MermaidDiagram source={data.source} idSeed={blockId} />\n {data.caption && (\n <p className=\"mt-3 text-sm text-plan-muted\">{data.caption}</p>\n )}\n {summary && <p className=\"mt-5 text-plan-muted\">{summary}</p>}\n </section>\n );\n}\n\n/**\n * Edit renderer (panel surface) for a `mermaid` block: a monospace textarea for\n * the diagram source plus an optional caption input. Both commit immediately via\n * `onChange`. `editSurface: \"panel\"` means the registry renders the `Read` view\n * with a corner edit button that opens this form in the plan's shared popover, so\n * this renders only the form (the popover supplies the chrome and title).\n */\nexport function MermaidEdit({\n data,\n onChange,\n editable,\n}: BlockEditProps<MermaidData>) {\n const sourceId = useId();\n const captionId = useId();\n\n return (\n <div className=\"grid gap-3\" data-plan-interactive>\n <div className=\"grid gap-1.5\">\n <DevLabel htmlFor={sourceId}>Diagram source</DevLabel>\n <textarea\n id={sourceId}\n value={data.source}\n readOnly={!editable}\n spellCheck={false}\n onChange={(event) =>\n onChange({ ...data, source: event.target.value })\n }\n className=\"flex min-h-56 w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\"\n placeholder={\"flowchart TD\\n A[Start] --> B{Decision}\"}\n />\n <p className=\"text-xs text-muted-foreground\">\n Mermaid syntax — flowcharts, sequence diagrams, and more.\n </p>\n </div>\n <div className=\"grid gap-1.5\">\n <DevLabel htmlFor={captionId}>Caption</DevLabel>\n <DevInput\n id={captionId}\n value={data.caption ?? \"\"}\n readOnly={!editable}\n onChange={(event) =>\n onChange({\n ...data,\n caption: event.target.value || undefined,\n })\n }\n placeholder=\"Optional caption\"\n />\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -7,10 +7,9 @@ import type { BlockMdxConfig } from "../types.js";
|
|
|
7
7
|
* (`diagram.tsx`) consume one definition. Keeping it React-free means importing
|
|
8
8
|
* it into a server module never pulls React into the Nitro/SSR bundle.
|
|
9
9
|
*
|
|
10
|
-
* The MDX `tag`
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* template before moving here).
|
|
10
|
+
* The MDX `tag` keeps backward compatibility with legacy
|
|
11
|
+
* `<Diagram … data={…} />` files while the current authoring form stores
|
|
12
|
+
* maintainable `html`/`css` as child code fences.
|
|
14
13
|
*/
|
|
15
14
|
export interface DiagramNode {
|
|
16
15
|
id: string;
|
|
@@ -54,11 +53,12 @@ export interface DiagramData {
|
|
|
54
53
|
*/
|
|
55
54
|
export declare const diagramSchema: z.ZodType<DiagramData>;
|
|
56
55
|
/**
|
|
57
|
-
* MDX config:
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
56
|
+
* MDX config: new source uses normal fenced-code children:
|
|
57
|
+
*
|
|
58
|
+
* `<Diagram caption="...">` plus child `html` / `css` fences. Legacy
|
|
59
|
+
* `<Diagram data={...} />` remains accepted by `fromAttrs`; `toAttrs` keeps the
|
|
60
|
+
* `data` key present-but-undefined when using child fences so docs validation
|
|
61
|
+
* still recognizes old `data={...}` as a supported compatibility attribute.
|
|
62
62
|
*/
|
|
63
63
|
export declare const diagramMdx: BlockMdxConfig<DiagramData>;
|
|
64
64
|
//# sourceMappingURL=diagram.config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagram.config.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/library/diagram.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"diagram.config.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/library/diagram.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;CACvB;AAoED;;;;GAIG;AACH,eAAO,MAAM,aAAa,EA8BP,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;AAe1C;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,WAAW,CAqBlD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { childCodeFenceFields, serializeChildCodeFenceFields } from "../mdx.js";
|
|
2
3
|
const idSchema = z.string().trim().min(1).max(120);
|
|
3
4
|
const unsafeDiagramHtmlPattern = /(?:<!doctype|<\/?(?:html|head|body|script|style|iframe|object|embed|link|meta|base|form|math|foreignObject|noscript|frame|frameset|applet|portal|marquee)[\s>/]|@(?:import|font-face|keyframes|page|namespace|charset)\b|\b(?:java\s*script|vb\s*script|data\s*:\s*(?:text\/html|image\/svg\+xml))\s*:?\s*|\bsrcdoc\s*=|(?:^|\s)(?:on[a-z][\w:-]*|@[\w:.-]+|x-on:[\w:.-]+|:on[a-z][\w:-]*|x-bind:on[a-z][\w:-]*|:style|x-bind:style)\s*=|expression\s*\(|url\s*\(\s*['"]?\s*(?:java\s*script|vb\s*script|data\s*:\s*(?:text\/html|image\/svg\+xml)))/i;
|
|
4
5
|
const unsafeViewportCssPattern = /(?:^|[;{\s])position\s*:\s*(?:fixed|sticky)\b|(?:^|[;{\s])z-index\s*:\s*[1-9]\d{4,}\b/i;
|
|
@@ -90,22 +91,45 @@ export const diagramSchema = z
|
|
|
90
91
|
message: "Diagram block requires html or at least one node.",
|
|
91
92
|
});
|
|
92
93
|
});
|
|
94
|
+
function hasChildFenceData(data) {
|
|
95
|
+
return Boolean(data.html || data.css);
|
|
96
|
+
}
|
|
97
|
+
function graphDataForAttr(data) {
|
|
98
|
+
const graph = {};
|
|
99
|
+
if (data.nodes?.length)
|
|
100
|
+
graph.nodes = data.nodes;
|
|
101
|
+
if (data.edges?.length)
|
|
102
|
+
graph.edges = data.edges;
|
|
103
|
+
if (data.notes?.length)
|
|
104
|
+
graph.notes = data.notes;
|
|
105
|
+
if (Object.keys(graph).length > 0)
|
|
106
|
+
return graph;
|
|
107
|
+
return hasChildFenceData(data) ? undefined : data;
|
|
108
|
+
}
|
|
93
109
|
/**
|
|
94
|
-
* MDX config:
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
110
|
+
* MDX config: new source uses normal fenced-code children:
|
|
111
|
+
*
|
|
112
|
+
* `<Diagram caption="...">` plus child `html` / `css` fences. Legacy
|
|
113
|
+
* `<Diagram data={...} />` remains accepted by `fromAttrs`; `toAttrs` keeps the
|
|
114
|
+
* `data` key present-but-undefined when using child fences so docs validation
|
|
115
|
+
* still recognizes old `data={...}` as a supported compatibility attribute.
|
|
99
116
|
*/
|
|
100
117
|
export const diagramMdx = {
|
|
101
118
|
tag: "Diagram",
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
fromAttrs: (attrs) => (
|
|
107
|
-
|
|
108
|
-
|
|
119
|
+
toAttrs: (data) => ({
|
|
120
|
+
data: graphDataForAttr(data),
|
|
121
|
+
caption: data.caption,
|
|
122
|
+
}),
|
|
123
|
+
fromAttrs: (attrs) => ({
|
|
124
|
+
...(attrs.object("data") ?? {}),
|
|
125
|
+
...(attrs.string("caption") !== undefined
|
|
126
|
+
? { caption: attrs.string("caption") }
|
|
127
|
+
: {}),
|
|
128
|
+
}),
|
|
129
|
+
serializeChildren: (data) => serializeChildCodeFenceFields(data, { html: "html", css: "css" }),
|
|
130
|
+
parseChildren: (childNodes) => childCodeFenceFields(childNodes, {
|
|
131
|
+
html: "html",
|
|
132
|
+
css: "css",
|
|
109
133
|
}),
|
|
110
134
|
};
|
|
111
135
|
//# sourceMappingURL=diagram.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagram.config.js","sourceRoot":"","sources":["../../../../src/client/blocks/library/diagram.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwDxB,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,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AC,CAAC,QAAQ,EAAE;IAC9C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACrD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrD,CAAC;KACD,WAAW,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IACzB,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC;QAAE,OAAO;IAC/D,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,MAAM,CAAC;QACd,OAAO,EAAE,mDAAmD;KAC7D,CAAC,CAAC;AACL,CAAC,CAAsC,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAgC;IACrD,GAAG,EAAE,SAAS;IACd,kEAAkE;IAClE,uEAAuE;IACvE,yEAAyE;IACzE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAA0C,EAAE,CAAC;IACzE,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CACnB,CAAC,KAAK,CAAC,MAAM,CAAc,MAAM,CAAC,IAAI;QACpC,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;KACV,CAAgB;CACpB,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport type { BlockMdxConfig } from \"../types.js\";\n\n/**\n * Pure (React-free) part of the shared `diagram` block: its data schema and MDX\n * round-trip config. Lives in core so BOTH apps' server/shared registries\n * (`plan-block-registry.ts`, `nfm-registry.ts`) and the client spec\n * (`diagram.tsx`) consume one definition. Keeping it React-free means importing\n * it into a server module never pulls React into the Nitro/SSR bundle.\n *\n * The MDX `tag` + attribute shape MUST match the legacy `<Diagram … data={…} />`\n * encoding — the whole `data` object is serialized as one JSON `data` prop — so\n * stored `.mdx` round-trips byte-compatibly (the block originated in the plan\n * template before moving here).\n */\n\nexport interface DiagramNode {\n id: string;\n label: string;\n detail?: string;\n x?: number;\n y?: number;\n}\n\nexport interface DiagramEdge {\n from: string;\n to: string;\n label?: string;\n}\n\nexport interface DiagramNote {\n id: string;\n text: string;\n x?: number;\n y?: number;\n}\n\nexport interface DiagramData {\n /**\n * Preferred authoring path for architecture/code diagrams: a scoped, inert\n * HTML/SVG fragment. Use .diagram-* primitives and --wf-* tokens; the\n * renderer supplies theme-token-backed styling plus sketch/clean style hooks.\n */\n html?: string;\n css?: string;\n caption?: string;\n /**\n * Legacy compatibility path for older/simple node graphs. New plans should use\n * `html`/`css` when layout quality matters.\n */\n nodes?: DiagramNode[];\n edges?: DiagramEdge[];\n notes?: DiagramNote[];\n}\n\nconst idSchema = z.string().trim().min(1).max(120);\nconst unsafeDiagramHtmlPattern =\n /(?:<!doctype|<\\/?(?:html|head|body|script|style|iframe|object|embed|link|meta|base|form|math|foreignObject|noscript|frame|frameset|applet|portal|marquee)[\\s>/]|@(?:import|font-face|keyframes|page|namespace|charset)\\b|\\b(?:java\\s*script|vb\\s*script|data\\s*:\\s*(?:text\\/html|image\\/svg\\+xml))\\s*:?\\s*|\\bsrcdoc\\s*=|(?:^|\\s)(?:on[a-z][\\w:-]*|@[\\w:.-]+|x-on:[\\w:.-]+|:on[a-z][\\w:-]*|x-bind:on[a-z][\\w:-]*|:style|x-bind:style)\\s*=|expression\\s*\\(|url\\s*\\(\\s*['\"]?\\s*(?:java\\s*script|vb\\s*script|data\\s*:\\s*(?:text\\/html|image\\/svg\\+xml)))/i;\nconst unsafeViewportCssPattern =\n /(?:^|[;{\\s])position\\s*:\\s*(?:fixed|sticky)\\b|(?:^|[;{\\s])z-index\\s*:\\s*[1-9]\\d{4,}\\b/i;\n\nfunction decodeSafetyEntities(value: string): string {\n return value\n .replace(/&#(x[0-9a-f]+|\\d+);?/gi, (_, code: string) => {\n const point = code.toLowerCase().startsWith(\"x\")\n ? Number.parseInt(code.slice(1), 16)\n : Number.parseInt(code, 10);\n return Number.isFinite(point) ? String.fromCodePoint(point) : \"\";\n })\n .replace(/&(colon|tab|newline);/gi, (_, name: string) => {\n if (name.toLowerCase() === \"colon\") return \":\";\n if (name.toLowerCase() === \"tab\") return \"\\t\";\n return \"\\n\";\n });\n}\n\nfunction decodeCssSafetyEscapes(value: string): string {\n return value.replace(/\\\\([0-9a-fA-F]{1,6}\\s?|.)/g, (_match, escaped) => {\n const hex = String(escaped).match(/^[0-9a-fA-F]{1,6}/)?.[0];\n if (hex) {\n const point = Number.parseInt(hex, 16);\n return Number.isFinite(point) ? String.fromCodePoint(point) : \"\";\n }\n return String(escaped)[0] ?? \"\";\n });\n}\n\nfunction noActiveDiagramText(value: string) {\n const decoded = decodeCssSafetyEscapes(decodeSafetyEntities(value));\n const compact = decoded.toLowerCase().replace(/[\\u0000-\\u0020]+/g, \"\");\n return (\n !unsafeDiagramHtmlPattern.test(value) &&\n !unsafeDiagramHtmlPattern.test(decoded) &&\n !unsafeViewportCssPattern.test(decoded) &&\n !/(?:javascript|vbscript):|data:(?:text\\/html|image\\/svg\\+xml)|expression\\(|url\\(['\"]?(?:javascript|vbscript|data:(?:text\\/html|image\\/svg\\+xml))/.test(\n compact,\n )\n );\n}\n\nconst diagramNodeSchema = z.object({\n id: idSchema,\n label: z.string().trim().min(1).max(160),\n detail: z.string().trim().max(500).optional(),\n x: z.number().min(0).max(100).optional(),\n y: z.number().min(0).max(100).optional(),\n}) as z.ZodType<DiagramNode>;\n\nconst diagramEdgeSchema = z.object({\n from: idSchema,\n to: idSchema,\n label: z.string().trim().max(100).optional(),\n}) as z.ZodType<DiagramEdge>;\n\nconst diagramNoteSchema = z.object({\n id: idSchema,\n text: z.string().trim().min(1).max(500),\n x: z.number().min(0).max(100).optional(),\n y: z.number().min(0).max(100).optional(),\n}) as z.ZodType<DiagramNote>;\n\n/**\n * The block can be a flexible HTML/SVG fragment or a legacy positional\n * node/edge/note graph, so it ships a custom `Edit` rather than relying on the\n * schema auto-editor. Editing stays comment/patch-driven.\n */\nexport const diagramSchema = z\n .object({\n html: z\n .string()\n .trim()\n .max(100_000)\n .refine(noActiveDiagramText, {\n message:\n \"Diagram html must be an inert fragment; SVG is allowed, scripts/events are not.\",\n })\n .optional(),\n css: z\n .string()\n .max(50_000)\n .refine(noActiveDiagramText, {\n message: \"Diagram css must not include document or script tags.\",\n })\n .optional(),\n caption: z.string().trim().max(600).optional(),\n nodes: z.array(diagramNodeSchema).max(80).optional(),\n edges: z.array(diagramEdgeSchema).max(120).optional(),\n notes: z.array(diagramNoteSchema).max(40).optional(),\n })\n .superRefine((data, ctx) => {\n if (data.html?.trim() || (data.nodes?.length ?? 0) > 0) return;\n ctx.addIssue({\n code: \"custom\",\n path: [\"html\"],\n message: \"Diagram block requires html or at least one node.\",\n });\n }) as unknown as z.ZodType<DiagramData>;\n\n/**\n * MDX config: the entire `data` object is serialized as one JSON `data` prop and\n * the element is self-closing — exactly the legacy `<Diagram id … data={…} />`\n * form. `toAttrs` returns `{ data }`; `fromAttrs` reads the `data` object,\n * mirroring the legacy `dataAttr(node, \"data\") ?? { nodes: [], edges: [] }`\n * default so plans missing the prop still parse.\n */\nexport const diagramMdx: BlockMdxConfig<DiagramData> = {\n tag: \"Diagram\",\n // The whole data object becomes one JSON `data` prop. Cast to the\n // structured-attr member of `MdxAttrValue` — `DiagramData` is a closed\n // interface without an index signature, which the union member requires.\n toAttrs: (data) => ({ data: data as unknown as Record<string, unknown> }),\n fromAttrs: (attrs) =>\n (attrs.object<DiagramData>(\"data\") ?? {\n nodes: [],\n edges: [],\n }) as DiagramData,\n};\n"]}
|
|
1
|
+
{"version":3,"file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,EAAE,KAAK;KACX,CAAC;CACL,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport { childCodeFenceFields, serializeChildCodeFenceFields } from \"../mdx.js\";\nimport type { BlockMdxConfig } from \"../types.js\";\n\n/**\n * Pure (React-free) part of the shared `diagram` block: its data schema and MDX\n * round-trip config. Lives in core so BOTH apps' server/shared registries\n * (`plan-block-registry.ts`, `nfm-registry.ts`) and the client spec\n * (`diagram.tsx`) consume one definition. Keeping it React-free means importing\n * it into a server module never pulls React into the Nitro/SSR bundle.\n *\n * The MDX `tag` keeps backward compatibility with legacy\n * `<Diagram … data={…} />` files while the current authoring form stores\n * maintainable `html`/`css` as child code fences.\n */\n\nexport interface DiagramNode {\n id: string;\n label: string;\n detail?: string;\n x?: number;\n y?: number;\n}\n\nexport interface DiagramEdge {\n from: string;\n to: string;\n label?: string;\n}\n\nexport interface DiagramNote {\n id: string;\n text: string;\n x?: number;\n y?: number;\n}\n\nexport interface DiagramData {\n /**\n * Preferred authoring path for architecture/code diagrams: a scoped, inert\n * HTML/SVG fragment. Use .diagram-* primitives and --wf-* tokens; the\n * renderer supplies theme-token-backed styling plus sketch/clean style hooks.\n */\n html?: string;\n css?: string;\n caption?: string;\n /**\n * Legacy compatibility path for older/simple node graphs. New plans should use\n * `html`/`css` when layout quality matters.\n */\n nodes?: DiagramNode[];\n edges?: DiagramEdge[];\n notes?: DiagramNote[];\n}\n\nconst idSchema = z.string().trim().min(1).max(120);\nconst unsafeDiagramHtmlPattern =\n /(?:<!doctype|<\\/?(?:html|head|body|script|style|iframe|object|embed|link|meta|base|form|math|foreignObject|noscript|frame|frameset|applet|portal|marquee)[\\s>/]|@(?:import|font-face|keyframes|page|namespace|charset)\\b|\\b(?:java\\s*script|vb\\s*script|data\\s*:\\s*(?:text\\/html|image\\/svg\\+xml))\\s*:?\\s*|\\bsrcdoc\\s*=|(?:^|\\s)(?:on[a-z][\\w:-]*|@[\\w:.-]+|x-on:[\\w:.-]+|:on[a-z][\\w:-]*|x-bind:on[a-z][\\w:-]*|:style|x-bind:style)\\s*=|expression\\s*\\(|url\\s*\\(\\s*['\"]?\\s*(?:java\\s*script|vb\\s*script|data\\s*:\\s*(?:text\\/html|image\\/svg\\+xml)))/i;\nconst unsafeViewportCssPattern =\n /(?:^|[;{\\s])position\\s*:\\s*(?:fixed|sticky)\\b|(?:^|[;{\\s])z-index\\s*:\\s*[1-9]\\d{4,}\\b/i;\n\nfunction decodeSafetyEntities(value: string): string {\n return value\n .replace(/&#(x[0-9a-f]+|\\d+);?/gi, (_, code: string) => {\n const point = code.toLowerCase().startsWith(\"x\")\n ? Number.parseInt(code.slice(1), 16)\n : Number.parseInt(code, 10);\n return Number.isFinite(point) ? String.fromCodePoint(point) : \"\";\n })\n .replace(/&(colon|tab|newline);/gi, (_, name: string) => {\n if (name.toLowerCase() === \"colon\") return \":\";\n if (name.toLowerCase() === \"tab\") return \"\\t\";\n return \"\\n\";\n });\n}\n\nfunction decodeCssSafetyEscapes(value: string): string {\n return value.replace(/\\\\([0-9a-fA-F]{1,6}\\s?|.)/g, (_match, escaped) => {\n const hex = String(escaped).match(/^[0-9a-fA-F]{1,6}/)?.[0];\n if (hex) {\n const point = Number.parseInt(hex, 16);\n return Number.isFinite(point) ? String.fromCodePoint(point) : \"\";\n }\n return String(escaped)[0] ?? \"\";\n });\n}\n\nfunction noActiveDiagramText(value: string) {\n const decoded = decodeCssSafetyEscapes(decodeSafetyEntities(value));\n const compact = decoded.toLowerCase().replace(/[\\u0000-\\u0020]+/g, \"\");\n return (\n !unsafeDiagramHtmlPattern.test(value) &&\n !unsafeDiagramHtmlPattern.test(decoded) &&\n !unsafeViewportCssPattern.test(decoded) &&\n !/(?:javascript|vbscript):|data:(?:text\\/html|image\\/svg\\+xml)|expression\\(|url\\(['\"]?(?:javascript|vbscript|data:(?:text\\/html|image\\/svg\\+xml))/.test(\n compact,\n )\n );\n}\n\nconst diagramNodeSchema = z.object({\n id: idSchema,\n label: z.string().trim().min(1).max(160),\n detail: z.string().trim().max(500).optional(),\n x: z.number().min(0).max(100).optional(),\n y: z.number().min(0).max(100).optional(),\n}) as z.ZodType<DiagramNode>;\n\nconst diagramEdgeSchema = z.object({\n from: idSchema,\n to: idSchema,\n label: z.string().trim().max(100).optional(),\n}) as z.ZodType<DiagramEdge>;\n\nconst diagramNoteSchema = z.object({\n id: idSchema,\n text: z.string().trim().min(1).max(500),\n x: z.number().min(0).max(100).optional(),\n y: z.number().min(0).max(100).optional(),\n}) as z.ZodType<DiagramNote>;\n\n/**\n * The block can be a flexible HTML/SVG fragment or a legacy positional\n * node/edge/note graph, so it ships a custom `Edit` rather than relying on the\n * schema auto-editor. Editing stays comment/patch-driven.\n */\nexport const diagramSchema = z\n .object({\n html: z\n .string()\n .trim()\n .max(100_000)\n .refine(noActiveDiagramText, {\n message:\n \"Diagram html must be an inert fragment; SVG is allowed, scripts/events are not.\",\n })\n .optional(),\n css: z\n .string()\n .max(50_000)\n .refine(noActiveDiagramText, {\n message: \"Diagram css must not include document or script tags.\",\n })\n .optional(),\n caption: z.string().trim().max(600).optional(),\n nodes: z.array(diagramNodeSchema).max(80).optional(),\n edges: z.array(diagramEdgeSchema).max(120).optional(),\n notes: z.array(diagramNoteSchema).max(40).optional(),\n })\n .superRefine((data, ctx) => {\n if (data.html?.trim() || (data.nodes?.length ?? 0) > 0) return;\n ctx.addIssue({\n code: \"custom\",\n path: [\"html\"],\n message: \"Diagram block requires html or at least one node.\",\n });\n }) as unknown as z.ZodType<DiagramData>;\n\nfunction hasChildFenceData(data: DiagramData) {\n return Boolean(data.html || data.css);\n}\n\nfunction graphDataForAttr(data: DiagramData): DiagramData | undefined {\n const graph: DiagramData = {};\n if (data.nodes?.length) graph.nodes = data.nodes;\n if (data.edges?.length) graph.edges = data.edges;\n if (data.notes?.length) graph.notes = data.notes;\n if (Object.keys(graph).length > 0) return graph;\n return hasChildFenceData(data) ? undefined : data;\n}\n\n/**\n * MDX config: new source uses normal fenced-code children:\n *\n * `<Diagram caption=\"...\">` plus child `html` / `css` fences. Legacy\n * `<Diagram data={...} />` remains accepted by `fromAttrs`; `toAttrs` keeps the\n * `data` key present-but-undefined when using child fences so docs validation\n * still recognizes old `data={...}` as a supported compatibility attribute.\n */\nexport const diagramMdx: BlockMdxConfig<DiagramData> = {\n tag: \"Diagram\",\n toAttrs: (data) => ({\n data: graphDataForAttr(data) as unknown as\n | Record<string, unknown>\n | undefined,\n caption: data.caption,\n }),\n fromAttrs: (attrs) => ({\n ...(attrs.object<DiagramData>(\"data\") ?? {}),\n ...(attrs.string(\"caption\") !== undefined\n ? { caption: attrs.string(\"caption\") }\n : {}),\n }),\n serializeChildren: (data) =>\n serializeChildCodeFenceFields(data, { html: \"html\", css: \"css\" }),\n parseChildren: (childNodes) =>\n childCodeFenceFields<DiagramData>(childNodes, {\n html: \"html\",\n css: \"css\",\n }),\n};\n"]}
|
|
@@ -286,7 +286,7 @@ function ExpandableDiagramBody({ data, ctx, compact, }) {
|
|
|
286
286
|
const styleTooltip = sketchy
|
|
287
287
|
? copy.handDrawnDiagramsSwitch
|
|
288
288
|
: copy.cleanDiagramsSwitch;
|
|
289
|
-
return (_jsxs("div", { className: "group/diagram relative", children: [_jsx(DiagramBody, { data: data, ctx: ctx, compact: compact }), _jsx(TooltipProvider, { delayDuration: 100, skipDelayDuration: 0, children: _jsxs("div", { className: "absolute right-2 top-2 z-10 flex items-center gap-1.5", children: [supportsStyleToggle && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "data-plan-interactive": true, onClick: () => toggleWireframeStyle(), "aria-label": styleLabel, "aria-pressed": sketchy, className: "an-diagram-style-trigger flex size-7 items-center justify-center rounded-md border border-border/60 bg-background
|
|
289
|
+
return (_jsxs("div", { className: "group/diagram relative", children: [_jsx(DiagramBody, { data: data, ctx: ctx, compact: compact }), _jsx(TooltipProvider, { delayDuration: 100, skipDelayDuration: 0, children: _jsxs("div", { className: "absolute right-2 top-2 z-10 flex items-center gap-1.5", children: [supportsStyleToggle && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "data-plan-interactive": true, onClick: () => toggleWireframeStyle(), "aria-label": styleLabel, "aria-pressed": sketchy, className: "an-diagram-style-trigger flex size-7 items-center justify-center rounded-md border border-border/60 bg-background text-muted-foreground opacity-0 shadow-sm transition-[color,opacity] hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring group-hover/diagram:opacity-100", children: sketchy ? (_jsx(IconScribble, { className: "size-4" })) : (_jsx(IconShape2, { className: "size-4" })) }) }), _jsx(TooltipContent, { side: "left", children: styleTooltip })] })), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "data-plan-interactive": true, onClick: () => setExpanded(true), "aria-label": copy.expandDiagram, className: "an-diagram-expand-trigger flex size-7 items-center justify-center rounded-md border border-border/60 bg-background text-muted-foreground opacity-0 shadow-sm transition-[color,opacity] hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring group-hover/diagram:opacity-100", children: _jsx(IconArrowsMaximize, { className: "size-4" }) }) }), _jsx(TooltipContent, { side: "left", children: copy.expandDiagram })] })] }) }), expanded ? (_jsx(DiagramLightbox, { onClose: () => setExpanded(false), children: _jsx(DiagramBody, { data: data, ctx: ctx }) })) : null] }));
|
|
290
290
|
}
|
|
291
291
|
/* -------------------------------------------------------------------------- */
|
|
292
292
|
/* Read + Edit */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagram.js","sourceRoot":"","sources":["../../../../src/client/blocks/library/diagram.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,KAAK,GACN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,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AkF;AAClF,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAc;IACnD,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,aAAa;IACrB,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,CAAC,OAAO,CAAC;IACpB,+EAA+E;IAC/E,wDAAwD;IACxD,WAAW,EAAE,OAAO;IACpB,KAAK,EAAE,SAAS;IAChB,WAAW,EACT,2PAA2P;IAC7P,6EAA6E;IAC7E,wDAAwD;IACxD,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;CACrE,CAAC,CAAC","sourcesContent":["import {\n IconArrowsMaximize,\n IconScribble,\n IconShape2,\n IconX,\n} from \"@tabler/icons-react\";\nimport { useEffect, useId, useMemo, useRef, useState } from \"react\";\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../../components/ui/tooltip.js\";\nimport { cn } from \"../../utils.js\";\nimport { AiEditableFieldLabel } from \"../AiEditableField.js\";\nimport { ltrCodeBlockProps } from \"../code-block-direction.js\";\nimport { defineBlock } from \"../types.js\";\nimport type {\n BlockReadProps,\n BlockEditProps,\n BlockRenderContext,\n} from \"../types.js\";\nimport { useBlockCopy } from \"./block-copy.js\";\nimport {\n diagramMdx,\n diagramSchema,\n type DiagramData,\n type DiagramEdge,\n type DiagramNode,\n} from \"./diagram.config.js\";\nimport {\n sanitizeDiagramHtml,\n sanitizeWireframeCss,\n scopeDesignCss,\n} from \"./sanitize-html.js\";\nimport {\n RoughOverlay,\n toggleWireframeStyle,\n useIsDark,\n useWireframeStyle,\n} from \"./wireframe-kit.js\";\n\n/**\n * Read + Edit renderers for the shared `diagram` block — a flexible inline\n * architecture/code diagram. The preferred authoring path is a scoped, inert\n * HTML/SVG fragment that leans on `.diagram-*` primitives and `--wf-*` tokens;\n * a legacy positional / sequence node-graph path is kept for older/simple plans.\n * Lives in core so any app can register it (it originated in the plan template).\n *\n * DECOUPLING from the plan original (mirrors the sibling `wireframe.tsx` port):\n * - Theme: `useIsDark()` reads `document.documentElement.classList` instead of\n * `next-themes`; `useWireframeStyle()` reads the viewer's sketchy/clean\n * preference from the shared `plan-wireframe-style` localStorage key — both\n * from `./wireframe-kit.js`, so core stays plan-free and shadcn-free.\n * - HTML sanitize: the HTML/SVG fragment + CSS run through the app-injected\n * `ctx.sanitizeHtml` at the render point (defense-in-depth against stored\n * XSS). Without a sanitizer wired, the HTML path emits nothing — core never\n * injects unsanitized author HTML. The React-free `diagramSchema` already\n * rejects active markup before storage.\n * - The rough.js sketch overlay reuses the kit's shared `RoughOverlay`, scoped\n * with the diagram selector and `drawFrame={false}` (the same call the plan\n * `HtmlDiagram` made). The `.plan-diagram-frame` / `.diagram-*` / `data-rough`\n * class contract is preserved exactly so the theme-token CSS in core's\n * `blocks.css` styles it in any app.\n *\n * The section carries the app-neutral `an-block` class plus the legacy\n * `plan-block` class so plan renders byte-identically while any other app gets\n * the theme-token treatment.\n */\n\n/* -------------------------------------------------------------------------- */\n/* HTML/SVG diagram path */\n/* -------------------------------------------------------------------------- */\n\n/** The rough-overlay selector for diagram bordered boxes (mirrors the plan). */\nconst DIAGRAM_ROUGH_SELECTOR =\n \"[data-rough],.diagram-panel,.diagram-node,.diagram-box,.diagram-pill,.diagram-card,[class*='card'],[class*='box'],[class*='panel'],[class*='pill'],[class*='chip'],[class*='badge'],hr\";\n\nfunction HtmlDiagram({\n data,\n ctx,\n compact,\n}: {\n data: DiagramData;\n ctx: BlockRenderContext;\n compact?: boolean;\n}) {\n const ref = useRef<HTMLDivElement>(null);\n const isDark = useIsDark();\n const style = useWireframeStyle();\n const scopeId = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n // Sanitize author HTML/CSS at the render point (defense-in-depth against\n // stored XSS). Self-contained in core via the shared block sanitizer (DOM-based\n // in the browser, regex fallback on the server) so diagrams render in any app\n // without the host wiring a sanitizer hook.\n const safeHtml = useMemo(() => sanitizeDiagramHtml(data.html), [data.html]);\n const scopedCss = useMemo(() => {\n const safeCss = sanitizeWireframeCss(data.css);\n // Scope every author selector under this diagram instance so global\n // selectors (body, *, .app-shell, :root) can't escape and restyle the page.\n return safeCss\n ? scopeDesignCss(safeCss, `[data-plan-diagram-scope=\"${scopeId}\"]`)\n : \"\";\n }, [data.css, scopeId]);\n\n return (\n <div\n ref={ref}\n className={cn(\"plan-diagram-shell\", compact && \"plan-diagram-compact\")}\n >\n <div\n className=\"plan-diagram-frame\"\n dir={ctx.textDirection}\n data-theme={isDark ? \"dark\" : \"light\"}\n data-style={style}\n data-text-direction={ctx.textDirection}\n data-plan-diagram-scope={scopeId}\n >\n {scopedCss && <style>{scopedCss}</style>}\n <div\n className=\"plan-diagram-frame-content\"\n dangerouslySetInnerHTML={{ __html: safeHtml }}\n />\n </div>\n <RoughOverlay\n scopeRef={ref}\n enabled={style === \"sketchy\"}\n drawFrame={false}\n selector={DIAGRAM_ROUGH_SELECTOR}\n />\n {data.caption && !compact && (\n <p className=\"mt-3 text-sm leading-6 text-muted-foreground\">\n {data.caption}\n </p>\n )}\n </div>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Legacy node-graph paths */\n/* -------------------------------------------------------------------------- */\n\nfunction clampDiagramPercent(value: number) {\n if (!Number.isFinite(value)) return 50;\n return Math.max(4, Math.min(96, value));\n}\n\nfunction hasPositionedDiagramNodes(data: DiagramData): boolean {\n return (data.nodes ?? []).some(\n (node) => typeof node.x === \"number\" && typeof node.y === \"number\",\n );\n}\n\nfunction orderDiagramNodes(\n nodes: DiagramNode[],\n edges: DiagramEdge[],\n): DiagramNode[] {\n if (nodes.length === 0) return [];\n const byId = new Map(nodes.map((node) => [node.id, node]));\n const indegree = new Map(nodes.map((node) => [node.id, 0]));\n for (const edge of edges) {\n if (byId.has(edge.from) && byId.has(edge.to)) {\n indegree.set(edge.to, (indegree.get(edge.to) ?? 0) + 1);\n }\n }\n const start = nodes.find((node) => (indegree.get(node.id) ?? 0) === 0);\n if (!start) return nodes;\n const ordered: DiagramNode[] = [];\n const seen = new Set<string>();\n let current: DiagramNode | undefined = start;\n while (current && !seen.has(current.id)) {\n const node: DiagramNode = current;\n ordered.push(node);\n seen.add(node.id);\n const next = edges.find((edge) => edge.from === node.id);\n current = next ? byId.get(next.to) : undefined;\n }\n for (const node of nodes) if (!seen.has(node.id)) ordered.push(node);\n return ordered;\n}\n\nfunction PositionedDiagram({\n data,\n compact,\n markerId,\n direction,\n}: {\n data: DiagramData;\n compact?: boolean;\n markerId: string;\n direction?: BlockRenderContext[\"textDirection\"];\n}) {\n const nodes = (data.nodes ?? []).map((node) => ({\n ...node,\n x: clampDiagramPercent(node.x ?? 50),\n y: clampDiagramPercent(node.y ?? 50),\n }));\n const edges = data.edges ?? [];\n const arrowId = `${markerId}-diagram-arrow`;\n const nodeWidth = compact ? 150 : 190;\n const rows = diagramRows(nodes, compact);\n const canvasHeight = diagramCanvasHeight(rows.length, compact);\n const canvasMinWidth = compact ? 560 : 720;\n const nodeWidthPct = compact ? 20 : 18;\n const nodeHeightPct = compact ? 14 : 18;\n const paddedViewBox = diagramViewBox(nodes, nodeWidthPct, nodeHeightPct);\n const xMargin = compact ? 13 : 14;\n const yMargin = compact ? 15 : 18;\n const displayNodes = nodes.map((node) => ({\n ...node,\n displayXBase: diagramPointPercent(\n node.x,\n paddedViewBox.x,\n paddedViewBox.width,\n xMargin,\n ),\n displayY: diagramRowPointPercent(node.y, rows, paddedViewBox, yMargin),\n }));\n const displayNodesForDirection = displayNodes.map((node) => ({\n ...node,\n displayX: direction === \"rtl\" ? 100 - node.displayXBase : node.displayXBase,\n }));\n const nodeByIdForDirection = new Map(\n displayNodesForDirection.map((node) => [node.id, node]),\n );\n\n return (\n <div\n className=\"plan-sketch rounded-[16px] border border-border bg-muted p-5\"\n dir={direction}\n data-text-direction={direction}\n >\n <div\n className=\"overflow-auto rounded-xl border border-border bg-background\"\n style={{ minHeight: canvasHeight }}\n >\n <div\n className=\"relative\"\n style={{ minHeight: canvasHeight, minWidth: canvasMinWidth }}\n >\n <svg\n className=\"pointer-events-none absolute inset-0 z-0 h-full w-full\"\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n >\n <defs>\n <marker\n id={arrowId}\n viewBox=\"0 0 10 10\"\n refX=\"8\"\n refY=\"5\"\n markerWidth=\"5\"\n markerHeight=\"5\"\n orient=\"auto-start-reverse\"\n >\n <path\n d=\"M 0 0 L 10 5 L 0 10 z\"\n className=\"fill-muted-foreground\"\n />\n </marker>\n </defs>\n {edges.map((edge, index) => {\n const from = nodeByIdForDirection.get(edge.from);\n const to = nodeByIdForDirection.get(edge.to);\n if (!from || !to) return null;\n return (\n <line\n key={`${edge.from}-${edge.to}-${index}`}\n x1={from.displayX}\n y1={from.displayY}\n x2={to.displayX}\n y2={to.displayY}\n markerEnd={`url(#${arrowId})`}\n vectorEffect=\"non-scaling-stroke\"\n className=\"stroke-border\"\n strokeWidth={2}\n strokeDasharray={edge.label ? \"0\" : \"6 5\"}\n />\n );\n })}\n </svg>\n\n {!compact &&\n edges.map((edge, index) => {\n const from = nodeByIdForDirection.get(edge.from);\n const to = nodeByIdForDirection.get(edge.to);\n if (!edge.label || !from || !to) return null;\n return (\n <span\n key={`${edge.from}-${edge.to}-${index}-label`}\n className=\"absolute z-10 max-w-[130px] -translate-x-1/2 -translate-y-1/2 rounded-full border border-border bg-background px-2 py-0.5 text-center text-[11px] font-semibold text-muted-foreground shadow-sm\"\n style={{\n left: `${(from.displayX + to.displayX) / 2}%`,\n top: `${(from.displayY + to.displayY) / 2}%`,\n }}\n >\n {edge.label}\n </span>\n );\n })}\n\n {displayNodesForDirection.map((node, index) => (\n <article\n key={node.id}\n className=\"absolute z-20 -translate-x-1/2 -translate-y-1/2 rounded-xl border-2 border-border bg-background p-3 text-foreground shadow-sm\"\n style={{\n left: `${node.displayX}%`,\n top: `${node.displayY}%`,\n width: nodeWidth,\n }}\n >\n <p className=\"text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground\">\n {index + 1}\n </p>\n <h3 className=\"mt-2 text-base font-semibold leading-tight\">\n {node.label}\n </h3>\n {node.detail && !compact && (\n <p className=\"mt-2 text-xs leading-5 text-muted-foreground\">\n {node.detail}\n </p>\n )}\n </article>\n ))}\n </div>\n </div>\n {data.notes && data.notes.length > 0 && !compact && (\n <div className=\"mt-4 grid gap-2 border-t border-border pt-4 text-sm text-muted-foreground md:grid-cols-2\">\n {data.notes.map((note) => (\n <p key={note.id}>{note.text}</p>\n ))}\n </div>\n )}\n </div>\n );\n}\n\ntype DiagramViewBox = {\n x: number;\n y: number;\n width: number;\n height: number;\n};\n\nfunction diagramViewBox(\n nodes: Array<Pick<DiagramNode, \"x\" | \"y\">>,\n nodeWidthPct: number,\n nodeHeightPct: number,\n): DiagramViewBox {\n if (nodes.length === 0) return { x: 0, y: 0, width: 100, height: 100 };\n\n const halfWidth = nodeWidthPct / 2;\n const halfHeight = nodeHeightPct / 2;\n const left = Math.min(...nodes.map((node) => (node.x ?? 50) - halfWidth));\n const right = Math.max(...nodes.map((node) => (node.x ?? 50) + halfWidth));\n const top = Math.min(...nodes.map((node) => (node.y ?? 50) - halfHeight));\n const bottom = Math.max(...nodes.map((node) => (node.y ?? 50) + halfHeight));\n\n const x = Math.min(0, left);\n const y = Math.min(0, top);\n const width = Math.max(100, right) - x;\n const height = Math.max(100, bottom) - y;\n\n return { x, y, width, height };\n}\n\nfunction diagramPointPercent(\n value: number,\n viewBoxStart: number,\n viewBoxSize: number,\n margin = 0,\n): number {\n if (\n !Number.isFinite(value) ||\n !Number.isFinite(viewBoxSize) ||\n !viewBoxSize\n ) {\n return 50;\n }\n const percent = ((value - viewBoxStart) / viewBoxSize) * 100;\n return Math.min(100 - margin, Math.max(margin, percent));\n}\n\nfunction diagramRows(\n nodes: Array<Pick<DiagramNode, \"y\">>,\n compact?: boolean,\n): number[] {\n const rowGap = compact ? 8 : 10;\n return [...nodes]\n .sort((a, b) => (a.y ?? 50) - (b.y ?? 50))\n .reduce<number[]>((acc, node) => {\n const y = node.y ?? 50;\n const last = acc[acc.length - 1];\n if (last == null || Math.abs(y - last) >= rowGap) acc.push(y);\n return acc;\n }, []);\n}\n\nfunction diagramRowPointPercent(\n value: number,\n rows: number[],\n viewBox: DiagramViewBox,\n margin: number,\n): number {\n if (rows.length <= 2) {\n return diagramPointPercent(value, viewBox.y, viewBox.height, margin);\n }\n const closestIndex = rows.reduce((bestIndex, row, index) => {\n const bestDistance = Math.abs((rows[bestIndex] ?? 50) - value);\n return Math.abs(row - value) < bestDistance ? index : bestIndex;\n }, 0);\n const span = 100 - margin * 2;\n return margin + (span * closestIndex) / Math.max(1, rows.length - 1);\n}\n\nfunction diagramCanvasHeight(rows: number, compact?: boolean): number {\n const base = compact ? 280 : 430;\n if (rows <= 2) return base;\n return Math.max(base, rows * (compact ? 140 : 190) + (compact ? 80 : 120));\n}\n\nfunction SequenceDiagram({\n data,\n compact,\n direction,\n}: {\n data: DiagramData;\n compact?: boolean;\n direction?: BlockRenderContext[\"textDirection\"];\n}) {\n const edges = data.edges ?? [];\n const nodes = orderDiagramNodes(data.nodes ?? [], edges);\n if (nodes.length === 0) {\n return (\n <div className=\"rounded-[12px] border border-border bg-muted p-4 text-sm text-muted-foreground\">\n Diagram content is empty.\n </div>\n );\n }\n const visualNodes = direction === \"rtl\" ? [...nodes].reverse() : nodes;\n return (\n <div\n className=\"plan-sketch rounded-[16px] border border-border bg-muted p-5\"\n dir={direction}\n data-text-direction={direction}\n >\n <div\n className={cn(\n \"flex gap-3 overflow-x-auto pb-2\",\n compact ? \"items-center\" : \"items-stretch\",\n )}\n >\n {visualNodes.map((node, index) => {\n const next = visualNodes[index + 1];\n const edge = next\n ? edges.find(\n (candidate) =>\n (candidate.from === node.id && candidate.to === next.id) ||\n (candidate.from === next.id && candidate.to === node.id),\n )\n : undefined;\n return (\n <div key={node.id} className=\"flex min-w-max items-center gap-3\">\n <article\n className={cn(\n \"w-[180px] rounded-xl border-2 border-border bg-background p-3 text-foreground\",\n compact && \"w-[150px]\",\n )}\n >\n <p className=\"text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground\">\n {index + 1}\n </p>\n <h3 className=\"mt-2 text-base font-semibold leading-tight\">\n {node.label}\n </h3>\n {node.detail && !compact && (\n <p className=\"mt-2 text-xs leading-5 text-muted-foreground\">\n {node.detail}\n </p>\n )}\n </article>\n {next && (\n <div className=\"grid min-w-[72px] justify-items-center gap-1 text-muted-foreground\">\n {edge?.label && (\n <span className=\"max-w-[96px] truncate rounded-full border border-border px-2 py-0.5 text-[11px] font-semibold\">\n {edge.label}\n </span>\n )}\n <span className=\"h-0.5 w-full rounded-full border-t-2 border-dashed border-border\" />\n </div>\n )}\n </div>\n );\n })}\n </div>\n {data.notes && data.notes.length > 0 && !compact && (\n <div className=\"mt-4 grid gap-2 border-t border-border pt-4 text-sm text-muted-foreground md:grid-cols-2\">\n {data.notes.map((note) => (\n <p key={note.id}>{note.text}</p>\n ))}\n </div>\n )}\n </div>\n );\n}\n\n/**\n * The diagram body. Routes to the preferred HTML/SVG path (when `data.html` is\n * set) and otherwise to a legacy node-graph path (positioned canvas when nodes\n * carry x/y, else an ordered sequence). Used both inline and, scaled up, inside\n * the expand lightbox — so every variant (html/css, positioned, sequence)\n * enlarges through the same code path.\n */\nfunction DiagramBody({\n data,\n ctx,\n compact,\n}: {\n data: DiagramData;\n ctx: BlockRenderContext;\n compact?: boolean;\n}) {\n const markerId = useId().replace(/:/g, \"\");\n if (data.html?.trim()) {\n return <HtmlDiagram data={data} ctx={ctx} compact={compact} />;\n }\n if (hasPositionedDiagramNodes(data)) {\n return (\n <PositionedDiagram\n data={data}\n compact={compact}\n markerId={markerId}\n direction={ctx.textDirection}\n />\n );\n }\n return (\n <SequenceDiagram\n data={data}\n compact={compact}\n direction={ctx.textDirection}\n />\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Expand / lightbox */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Enlarge overlay for a rendered diagram. Mirrors the image lightbox contract\n * used by the composer's `ImagePreviewLightbox` (PromptComposer.tsx) so the\n * expand affordance feels identical to viewing an image full-size: a fixed\n * `bg-black/80` backdrop, Escape to close, click-the-backdrop to close, and a\n * top-right close button. Unlike the image variant this renders arbitrary\n * children (the diagram body re-rendered larger) rather than an `<img>`, since a\n * diagram is live HTML/SVG/node-graph markup, not an image URL.\n *\n * Exported so the separate Mermaid block (`MermaidBlock.tsx`, which renders its\n * diagram to an SVG through a different runtime) can reuse the exact same\n * lightbox contract — one expand affordance shared across both diagram types.\n */\nexport function DiagramLightbox({\n children,\n onClose,\n}: {\n children: React.ReactNode;\n onClose: () => void;\n}) {\n useEffect(() => {\n const handler = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") onClose();\n };\n document.addEventListener(\"keydown\", handler);\n document.body.style.overflow = \"hidden\";\n return () => {\n document.removeEventListener(\"keydown\", handler);\n document.body.style.overflow = \"\";\n };\n }, [onClose]);\n\n return (\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Diagram preview\"\n onClick={onClose}\n data-plan-interactive\n className=\"fixed inset-0 z-[300] flex items-center justify-center overflow-auto bg-black/80 p-6 cursor-zoom-out\"\n >\n <div\n onClick={(e) => e.stopPropagation()}\n className=\"max-h-full w-full max-w-5xl cursor-default overflow-auto rounded-md bg-background p-6 shadow-2xl\"\n >\n {children}\n </div>\n <button\n type=\"button\"\n onClick={onClose}\n aria-label=\"Close preview\"\n className=\"absolute right-4 top-4 flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-white/30 bg-black/40 text-white hover:bg-black/60\"\n >\n <IconX className=\"h-4 w-4\" />\n </button>\n </div>\n );\n}\n\n/**\n * The diagram body plus a hover-revealed top-right \"expand\" button (like the\n * image attachment zoom). Opening the button re-renders the exact same\n * `DiagramBody` inside `DiagramLightbox` at a larger size, so html/css and\n * mermaid/legacy node-graph diagrams alike enlarge through one path. The inline\n * (non-expanded) render is otherwise unchanged.\n */\nfunction ExpandableDiagramBody({\n data,\n ctx,\n compact,\n}: {\n data: DiagramData;\n ctx: BlockRenderContext;\n compact?: boolean;\n}) {\n const [expanded, setExpanded] = useState(false);\n const supportsStyleToggle = Boolean(data.html);\n const style = useWireframeStyle();\n const copy = useBlockCopy();\n const sketchy = style === \"sketchy\";\n const styleLabel = sketchy\n ? copy.switchToCleanDiagrams\n : copy.switchToHandDrawnDiagrams;\n const styleTooltip = sketchy\n ? copy.handDrawnDiagramsSwitch\n : copy.cleanDiagramsSwitch;\n return (\n <div className=\"group/diagram relative\">\n <DiagramBody data={data} ctx={ctx} compact={compact} />\n <TooltipProvider delayDuration={100} skipDelayDuration={0}>\n <div className=\"absolute right-2 top-2 z-10 flex items-center gap-1.5\">\n {supportsStyleToggle && (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n data-plan-interactive\n onClick={() => toggleWireframeStyle()}\n aria-label={styleLabel}\n aria-pressed={sketchy}\n className=\"an-diagram-style-trigger flex size-7 items-center justify-center rounded-md border border-border/60 bg-background/90 text-muted-foreground opacity-0 shadow-sm backdrop-blur transition-[color,opacity] hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring group-hover/diagram:opacity-100\"\n >\n {sketchy ? (\n <IconScribble className=\"size-4\" />\n ) : (\n <IconShape2 className=\"size-4\" />\n )}\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"left\">{styleTooltip}</TooltipContent>\n </Tooltip>\n )}\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n data-plan-interactive\n onClick={() => setExpanded(true)}\n aria-label={copy.expandDiagram}\n className=\"an-diagram-expand-trigger flex size-7 items-center justify-center rounded-md border border-border/60 bg-background/90 text-muted-foreground opacity-0 shadow-sm backdrop-blur transition-[color,opacity] hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring group-hover/diagram:opacity-100\"\n >\n <IconArrowsMaximize className=\"size-4\" />\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"left\">{copy.expandDiagram}</TooltipContent>\n </Tooltip>\n </div>\n </TooltipProvider>\n {expanded ? (\n <DiagramLightbox onClose={() => setExpanded(false)}>\n <DiagramBody data={data} ctx={ctx} />\n </DiagramLightbox>\n ) : null}\n </div>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Read + Edit */\n/* -------------------------------------------------------------------------- */\n\n/** Read-only renderer: the diagram body wrapped in the standard titled block. */\nexport function DiagramRead({\n data,\n blockId,\n title,\n summary,\n ctx,\n compactVisuals,\n}: BlockReadProps<DiagramData>) {\n return (\n <section\n {...ltrCodeBlockProps}\n className=\"an-block plan-block\"\n data-block-id={blockId}\n >\n {title && <div className=\"an-block-label plan-block-label\">{title}</div>}\n <ExpandableDiagramBody data={data} ctx={ctx} compact={compactVisuals} />\n {summary && <p className=\"mt-5 text-muted-foreground\">{summary}</p>}\n </section>\n );\n}\n\n/**\n * Edit form (panel surface). The block can be an HTML/SVG fragment or a legacy\n * node/edge/note graph, so this exposes html/css/caption plus a collapsible\n * legacy node-graph JSON editor, each with an AI-edit affordance via\n * `ctx.renderAiFieldAction` (through `AiEditableFieldLabel`). `editSurface:\n * \"panel\"` means the registry renders the `Read` view with a corner edit button\n * that opens this form in the app-provided popover.\n */\nexport function DiagramEdit({\n data,\n onChange,\n editable,\n blockId,\n title,\n summary,\n ctx,\n}: BlockEditProps<DiagramData>) {\n const htmlId = useId();\n const cssId = useId();\n const captionId = useId();\n const legacyId = useId();\n const [html, setHtml] = useState(data.html ?? \"\");\n const [css, setCss] = useState(data.css ?? \"\");\n const [caption, setCaption] = useState(data.caption ?? \"\");\n const [legacyJson, setLegacyJson] = useState(() =>\n JSON.stringify(\n {\n nodes: data.nodes ?? [],\n edges: data.edges ?? [],\n notes: data.notes ?? [],\n },\n null,\n 2,\n ),\n );\n\n useEffect(() => {\n setHtml(data.html ?? \"\");\n setCss(data.css ?? \"\");\n setCaption(data.caption ?? \"\");\n setLegacyJson(\n JSON.stringify(\n {\n nodes: data.nodes ?? [],\n edges: data.edges ?? [],\n notes: data.notes ?? [],\n },\n null,\n 2,\n ),\n );\n }, [data]);\n\n const saveHtmlDiagram = () => {\n onChange({\n html: html.trim() || undefined,\n css: css.trim() || undefined,\n caption: caption.trim() || undefined,\n nodes: data.nodes,\n edges: data.edges,\n notes: data.notes,\n });\n };\n\n const saveLegacyDiagram = () => {\n const parsed = JSON.parse(legacyJson) as Pick<\n DiagramData,\n \"nodes\" | \"edges\" | \"notes\"\n >;\n onChange({\n ...data,\n nodes: parsed.nodes ?? [],\n edges: parsed.edges ?? [],\n notes: parsed.notes ?? [],\n });\n };\n\n const fieldAction = (\n field: \"HTML / SVG fragment\" | \"CSS\" | \"caption\" | \"legacy node graph JSON\",\n value: string,\n ) => ({\n blockId,\n blockType: \"diagram\",\n blockTitle: title,\n blockSummary: summary,\n fieldValue: value,\n draftScope: `block:diagram:${blockId}:${field.toLowerCase().replace(/[^a-z0-9]+/g, \"-\")}`,\n disabled: !editable,\n instructions:\n \"Update the plan with update-visual-plan using a targeted update-block content patch for this diagram block id. Preserve unrelated diagram fields unless the requested edit requires changing them. Keep diagram HTML/CSS on renderer-owned .diagram-* primitives and --wf-* tokens; do not introduce custom font-family or hard-coded hex/rgb/hsl colors.\",\n companionFields: [\n {\n label: \"HTML / SVG fragment\",\n value: html.trim() || \"(empty)\",\n language: \"html\",\n },\n { label: \"CSS\", value: css.trim() || \"(empty)\", language: \"css\" },\n {\n label: \"caption\",\n value: caption.trim() || \"(empty)\",\n language: \"text\",\n },\n ],\n });\n\n return (\n <div className=\"grid gap-4\" data-plan-interactive>\n <button\n type=\"button\"\n className=\"inline-flex h-8 w-fit items-center justify-center rounded-md bg-primary px-3 text-xs font-medium text-primary-foreground disabled:opacity-50\"\n disabled={!editable}\n onClick={saveHtmlDiagram}\n >\n Save diagram\n </button>\n <div className=\"group/field grid gap-1.5\">\n <AiEditableFieldLabel\n htmlFor={htmlId}\n label=\"HTML / SVG fragment\"\n ctx={ctx}\n action={fieldAction(\"HTML / SVG fragment\", html)}\n />\n <textarea\n id={htmlId}\n className=\"min-h-48 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs leading-5 text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n value={html}\n disabled={!editable}\n onChange={(event) => setHtml(event.target.value)}\n placeholder=\"<div class='diagram'>...</div>\"\n />\n </div>\n <div className=\"group/field grid gap-1.5\">\n <AiEditableFieldLabel\n htmlFor={cssId}\n label=\"CSS\"\n ctx={ctx}\n action={fieldAction(\"CSS\", css)}\n />\n <textarea\n id={cssId}\n className=\"min-h-32 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs leading-5 text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n value={css}\n disabled={!editable}\n onChange={(event) => setCss(event.target.value)}\n placeholder=\".diagram { display: grid; }\"\n />\n </div>\n <div className=\"group/field grid gap-1.5\">\n <AiEditableFieldLabel\n htmlFor={captionId}\n label=\"Caption\"\n ctx={ctx}\n action={fieldAction(\"caption\", caption)}\n />\n <input\n id={captionId}\n className=\"h-9 w-full rounded-md border border-input bg-background px-3 text-sm text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n value={caption}\n disabled={!editable}\n onChange={(event) => setCaption(event.target.value)}\n />\n </div>\n {!data.html && (\n <details className=\"rounded-md border border-border p-3\">\n <summary className=\"cursor-pointer text-xs font-semibold text-muted-foreground\">\n Legacy node graph data\n </summary>\n <div className=\"group/field mt-3 grid gap-1.5\">\n <AiEditableFieldLabel\n htmlFor={legacyId}\n label=\"JSON\"\n ctx={ctx}\n action={fieldAction(\"legacy node graph JSON\", legacyJson)}\n />\n <textarea\n id={legacyId}\n className=\"min-h-44 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs leading-5 text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n value={legacyJson}\n disabled={!editable}\n onChange={(event) => setLegacyJson(event.target.value)}\n />\n </div>\n <button\n type=\"button\"\n className=\"mt-3 inline-flex h-8 items-center justify-center rounded-md border border-input px-3 text-xs font-medium text-foreground disabled:opacity-50\"\n disabled={!editable}\n onClick={saveLegacyDiagram}\n >\n Save graph data\n </button>\n </details>\n )}\n </div>\n );\n}\n\n/** Full client spec for the shared `diagram` block (schema + MDX + Read/Edit). */\nexport const diagramBlock = defineBlock<DiagramData>({\n type: \"diagram\",\n schema: diagramSchema,\n mdx: diagramMdx,\n Read: DiagramRead,\n Edit: DiagramEdit,\n placement: [\"block\"],\n // Config-driven: the rendered diagram differs from its raw html/css source, so\n // edit from a corner button + panel rather than inline.\n editSurface: \"panel\",\n label: \"Diagram\",\n description:\n \"A flexible inline architecture/code diagram. Prefer html/css with SVG or semantic HTML for polished two-dimensional layouts; use .diagram-* primitives and --wf-* tokens for theme/sketch compatibility. Legacy nodes/edges are only for simple previews.\",\n // Seed the legacy fallback shape so a fresh block validates while agents can\n // replace it with html/css when layout quality matters.\n empty: () => ({ nodes: [{ id: \"n1\", label: \"Module\" }], edges: [] }),\n});\n"]}
|
|
1
|
+
{"version":3,"file":"diagram.js","sourceRoot":"","sources":["../../../../src/client/blocks/library/diagram.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,KAAK,GACN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,EACL,OAAO,EACP,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;A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,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,CAAC,OAAO,CAAC;IACpB,+EAA+E;IAC/E,wDAAwD;IACxD,WAAW,EAAE,OAAO;IACpB,KAAK,EAAE,SAAS;IAChB,WAAW,EACT,2PAA2P;IAC7P,6EAA6E;IAC7E,wDAAwD;IACxD,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;CACrE,CAAC,CAAC","sourcesContent":["import {\n IconArrowsMaximize,\n IconScribble,\n IconShape2,\n IconX,\n} from \"@tabler/icons-react\";\nimport { useEffect, useId, useMemo, useRef, useState } from \"react\";\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../../components/ui/tooltip.js\";\nimport { cn } from \"../../utils.js\";\nimport { AiEditableFieldLabel } from \"../AiEditableField.js\";\nimport { ltrCodeBlockProps } from \"../code-block-direction.js\";\nimport { defineBlock } from \"../types.js\";\nimport type {\n BlockReadProps,\n BlockEditProps,\n BlockRenderContext,\n} from \"../types.js\";\nimport { useBlockCopy } from \"./block-copy.js\";\nimport {\n diagramMdx,\n diagramSchema,\n type DiagramData,\n type DiagramEdge,\n type DiagramNode,\n} from \"./diagram.config.js\";\nimport {\n sanitizeDiagramHtml,\n sanitizeWireframeCss,\n scopeDesignCss,\n} from \"./sanitize-html.js\";\nimport {\n RoughOverlay,\n toggleWireframeStyle,\n useIsDark,\n useWireframeStyle,\n} from \"./wireframe-kit.js\";\n\n/**\n * Read + Edit renderers for the shared `diagram` block — a flexible inline\n * architecture/code diagram. The preferred authoring path is a scoped, inert\n * HTML/SVG fragment that leans on `.diagram-*` primitives and `--wf-*` tokens;\n * a legacy positional / sequence node-graph path is kept for older/simple plans.\n * Lives in core so any app can register it (it originated in the plan template).\n *\n * DECOUPLING from the plan original (mirrors the sibling `wireframe.tsx` port):\n * - Theme: `useIsDark()` reads `document.documentElement.classList` instead of\n * `next-themes`; `useWireframeStyle()` reads the viewer's sketchy/clean\n * preference from the shared `plan-wireframe-style` localStorage key — both\n * from `./wireframe-kit.js`, so core stays plan-free and shadcn-free.\n * - HTML sanitize: the HTML/SVG fragment + CSS run through the app-injected\n * `ctx.sanitizeHtml` at the render point (defense-in-depth against stored\n * XSS). Without a sanitizer wired, the HTML path emits nothing — core never\n * injects unsanitized author HTML. The React-free `diagramSchema` already\n * rejects active markup before storage.\n * - The rough.js sketch overlay reuses the kit's shared `RoughOverlay`, scoped\n * with the diagram selector and `drawFrame={false}` (the same call the plan\n * `HtmlDiagram` made). The `.plan-diagram-frame` / `.diagram-*` / `data-rough`\n * class contract is preserved exactly so the theme-token CSS in core's\n * `blocks.css` styles it in any app.\n *\n * The section carries the app-neutral `an-block` class plus the legacy\n * `plan-block` class so plan renders byte-identically while any other app gets\n * the theme-token treatment.\n */\n\n/* -------------------------------------------------------------------------- */\n/* HTML/SVG diagram path */\n/* -------------------------------------------------------------------------- */\n\n/** The rough-overlay selector for diagram bordered boxes (mirrors the plan). */\nconst DIAGRAM_ROUGH_SELECTOR =\n \"[data-rough],.diagram-panel,.diagram-node,.diagram-box,.diagram-pill,.diagram-card,[class*='card'],[class*='box'],[class*='panel'],[class*='pill'],[class*='chip'],[class*='badge'],hr\";\n\nfunction HtmlDiagram({\n data,\n ctx,\n compact,\n}: {\n data: DiagramData;\n ctx: BlockRenderContext;\n compact?: boolean;\n}) {\n const ref = useRef<HTMLDivElement>(null);\n const isDark = useIsDark();\n const style = useWireframeStyle();\n const scopeId = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n // Sanitize author HTML/CSS at the render point (defense-in-depth against\n // stored XSS). Self-contained in core via the shared block sanitizer (DOM-based\n // in the browser, regex fallback on the server) so diagrams render in any app\n // without the host wiring a sanitizer hook.\n const safeHtml = useMemo(() => sanitizeDiagramHtml(data.html), [data.html]);\n const scopedCss = useMemo(() => {\n const safeCss = sanitizeWireframeCss(data.css);\n // Scope every author selector under this diagram instance so global\n // selectors (body, *, .app-shell, :root) can't escape and restyle the page.\n return safeCss\n ? scopeDesignCss(safeCss, `[data-plan-diagram-scope=\"${scopeId}\"]`)\n : \"\";\n }, [data.css, scopeId]);\n\n return (\n <div\n ref={ref}\n className={cn(\"plan-diagram-shell\", compact && \"plan-diagram-compact\")}\n >\n <div\n className=\"plan-diagram-frame\"\n dir={ctx.textDirection}\n data-theme={isDark ? \"dark\" : \"light\"}\n data-style={style}\n data-text-direction={ctx.textDirection}\n data-plan-diagram-scope={scopeId}\n >\n {scopedCss && <style>{scopedCss}</style>}\n <div\n className=\"plan-diagram-frame-content\"\n dangerouslySetInnerHTML={{ __html: safeHtml }}\n />\n </div>\n <RoughOverlay\n scopeRef={ref}\n enabled={style === \"sketchy\"}\n drawFrame={false}\n selector={DIAGRAM_ROUGH_SELECTOR}\n />\n {data.caption && !compact && (\n <p className=\"mt-3 text-sm leading-6 text-muted-foreground\">\n {data.caption}\n </p>\n )}\n </div>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Legacy node-graph paths */\n/* -------------------------------------------------------------------------- */\n\nfunction clampDiagramPercent(value: number) {\n if (!Number.isFinite(value)) return 50;\n return Math.max(4, Math.min(96, value));\n}\n\nfunction hasPositionedDiagramNodes(data: DiagramData): boolean {\n return (data.nodes ?? []).some(\n (node) => typeof node.x === \"number\" && typeof node.y === \"number\",\n );\n}\n\nfunction orderDiagramNodes(\n nodes: DiagramNode[],\n edges: DiagramEdge[],\n): DiagramNode[] {\n if (nodes.length === 0) return [];\n const byId = new Map(nodes.map((node) => [node.id, node]));\n const indegree = new Map(nodes.map((node) => [node.id, 0]));\n for (const edge of edges) {\n if (byId.has(edge.from) && byId.has(edge.to)) {\n indegree.set(edge.to, (indegree.get(edge.to) ?? 0) + 1);\n }\n }\n const start = nodes.find((node) => (indegree.get(node.id) ?? 0) === 0);\n if (!start) return nodes;\n const ordered: DiagramNode[] = [];\n const seen = new Set<string>();\n let current: DiagramNode | undefined = start;\n while (current && !seen.has(current.id)) {\n const node: DiagramNode = current;\n ordered.push(node);\n seen.add(node.id);\n const next = edges.find((edge) => edge.from === node.id);\n current = next ? byId.get(next.to) : undefined;\n }\n for (const node of nodes) if (!seen.has(node.id)) ordered.push(node);\n return ordered;\n}\n\nfunction PositionedDiagram({\n data,\n compact,\n markerId,\n direction,\n}: {\n data: DiagramData;\n compact?: boolean;\n markerId: string;\n direction?: BlockRenderContext[\"textDirection\"];\n}) {\n const nodes = (data.nodes ?? []).map((node) => ({\n ...node,\n x: clampDiagramPercent(node.x ?? 50),\n y: clampDiagramPercent(node.y ?? 50),\n }));\n const edges = data.edges ?? [];\n const arrowId = `${markerId}-diagram-arrow`;\n const nodeWidth = compact ? 150 : 190;\n const rows = diagramRows(nodes, compact);\n const canvasHeight = diagramCanvasHeight(rows.length, compact);\n const canvasMinWidth = compact ? 560 : 720;\n const nodeWidthPct = compact ? 20 : 18;\n const nodeHeightPct = compact ? 14 : 18;\n const paddedViewBox = diagramViewBox(nodes, nodeWidthPct, nodeHeightPct);\n const xMargin = compact ? 13 : 14;\n const yMargin = compact ? 15 : 18;\n const displayNodes = nodes.map((node) => ({\n ...node,\n displayXBase: diagramPointPercent(\n node.x,\n paddedViewBox.x,\n paddedViewBox.width,\n xMargin,\n ),\n displayY: diagramRowPointPercent(node.y, rows, paddedViewBox, yMargin),\n }));\n const displayNodesForDirection = displayNodes.map((node) => ({\n ...node,\n displayX: direction === \"rtl\" ? 100 - node.displayXBase : node.displayXBase,\n }));\n const nodeByIdForDirection = new Map(\n displayNodesForDirection.map((node) => [node.id, node]),\n );\n\n return (\n <div\n className=\"plan-sketch rounded-[16px] border border-border bg-muted p-5\"\n dir={direction}\n data-text-direction={direction}\n >\n <div\n className=\"overflow-auto rounded-xl border border-border bg-background\"\n style={{ minHeight: canvasHeight }}\n >\n <div\n className=\"relative\"\n style={{ minHeight: canvasHeight, minWidth: canvasMinWidth }}\n >\n <svg\n className=\"pointer-events-none absolute inset-0 z-0 h-full w-full\"\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n >\n <defs>\n <marker\n id={arrowId}\n viewBox=\"0 0 10 10\"\n refX=\"8\"\n refY=\"5\"\n markerWidth=\"5\"\n markerHeight=\"5\"\n orient=\"auto-start-reverse\"\n >\n <path\n d=\"M 0 0 L 10 5 L 0 10 z\"\n className=\"fill-muted-foreground\"\n />\n </marker>\n </defs>\n {edges.map((edge, index) => {\n const from = nodeByIdForDirection.get(edge.from);\n const to = nodeByIdForDirection.get(edge.to);\n if (!from || !to) return null;\n return (\n <line\n key={`${edge.from}-${edge.to}-${index}`}\n x1={from.displayX}\n y1={from.displayY}\n x2={to.displayX}\n y2={to.displayY}\n markerEnd={`url(#${arrowId})`}\n vectorEffect=\"non-scaling-stroke\"\n className=\"stroke-border\"\n strokeWidth={2}\n strokeDasharray={edge.label ? \"0\" : \"6 5\"}\n />\n );\n })}\n </svg>\n\n {!compact &&\n edges.map((edge, index) => {\n const from = nodeByIdForDirection.get(edge.from);\n const to = nodeByIdForDirection.get(edge.to);\n if (!edge.label || !from || !to) return null;\n return (\n <span\n key={`${edge.from}-${edge.to}-${index}-label`}\n className=\"absolute z-10 max-w-[130px] -translate-x-1/2 -translate-y-1/2 rounded-full border border-border bg-background px-2 py-0.5 text-center text-[11px] font-semibold text-muted-foreground shadow-sm\"\n style={{\n left: `${(from.displayX + to.displayX) / 2}%`,\n top: `${(from.displayY + to.displayY) / 2}%`,\n }}\n >\n {edge.label}\n </span>\n );\n })}\n\n {displayNodesForDirection.map((node, index) => (\n <article\n key={node.id}\n className=\"absolute z-20 -translate-x-1/2 -translate-y-1/2 rounded-xl border-2 border-border bg-background p-3 text-foreground shadow-sm\"\n style={{\n left: `${node.displayX}%`,\n top: `${node.displayY}%`,\n width: nodeWidth,\n }}\n >\n <p className=\"text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground\">\n {index + 1}\n </p>\n <h3 className=\"mt-2 text-base font-semibold leading-tight\">\n {node.label}\n </h3>\n {node.detail && !compact && (\n <p className=\"mt-2 text-xs leading-5 text-muted-foreground\">\n {node.detail}\n </p>\n )}\n </article>\n ))}\n </div>\n </div>\n {data.notes && data.notes.length > 0 && !compact && (\n <div className=\"mt-4 grid gap-2 border-t border-border pt-4 text-sm text-muted-foreground md:grid-cols-2\">\n {data.notes.map((note) => (\n <p key={note.id}>{note.text}</p>\n ))}\n </div>\n )}\n </div>\n );\n}\n\ntype DiagramViewBox = {\n x: number;\n y: number;\n width: number;\n height: number;\n};\n\nfunction diagramViewBox(\n nodes: Array<Pick<DiagramNode, \"x\" | \"y\">>,\n nodeWidthPct: number,\n nodeHeightPct: number,\n): DiagramViewBox {\n if (nodes.length === 0) return { x: 0, y: 0, width: 100, height: 100 };\n\n const halfWidth = nodeWidthPct / 2;\n const halfHeight = nodeHeightPct / 2;\n const left = Math.min(...nodes.map((node) => (node.x ?? 50) - halfWidth));\n const right = Math.max(...nodes.map((node) => (node.x ?? 50) + halfWidth));\n const top = Math.min(...nodes.map((node) => (node.y ?? 50) - halfHeight));\n const bottom = Math.max(...nodes.map((node) => (node.y ?? 50) + halfHeight));\n\n const x = Math.min(0, left);\n const y = Math.min(0, top);\n const width = Math.max(100, right) - x;\n const height = Math.max(100, bottom) - y;\n\n return { x, y, width, height };\n}\n\nfunction diagramPointPercent(\n value: number,\n viewBoxStart: number,\n viewBoxSize: number,\n margin = 0,\n): number {\n if (\n !Number.isFinite(value) ||\n !Number.isFinite(viewBoxSize) ||\n !viewBoxSize\n ) {\n return 50;\n }\n const percent = ((value - viewBoxStart) / viewBoxSize) * 100;\n return Math.min(100 - margin, Math.max(margin, percent));\n}\n\nfunction diagramRows(\n nodes: Array<Pick<DiagramNode, \"y\">>,\n compact?: boolean,\n): number[] {\n const rowGap = compact ? 8 : 10;\n return [...nodes]\n .sort((a, b) => (a.y ?? 50) - (b.y ?? 50))\n .reduce<number[]>((acc, node) => {\n const y = node.y ?? 50;\n const last = acc[acc.length - 1];\n if (last == null || Math.abs(y - last) >= rowGap) acc.push(y);\n return acc;\n }, []);\n}\n\nfunction diagramRowPointPercent(\n value: number,\n rows: number[],\n viewBox: DiagramViewBox,\n margin: number,\n): number {\n if (rows.length <= 2) {\n return diagramPointPercent(value, viewBox.y, viewBox.height, margin);\n }\n const closestIndex = rows.reduce((bestIndex, row, index) => {\n const bestDistance = Math.abs((rows[bestIndex] ?? 50) - value);\n return Math.abs(row - value) < bestDistance ? index : bestIndex;\n }, 0);\n const span = 100 - margin * 2;\n return margin + (span * closestIndex) / Math.max(1, rows.length - 1);\n}\n\nfunction diagramCanvasHeight(rows: number, compact?: boolean): number {\n const base = compact ? 280 : 430;\n if (rows <= 2) return base;\n return Math.max(base, rows * (compact ? 140 : 190) + (compact ? 80 : 120));\n}\n\nfunction SequenceDiagram({\n data,\n compact,\n direction,\n}: {\n data: DiagramData;\n compact?: boolean;\n direction?: BlockRenderContext[\"textDirection\"];\n}) {\n const edges = data.edges ?? [];\n const nodes = orderDiagramNodes(data.nodes ?? [], edges);\n if (nodes.length === 0) {\n return (\n <div className=\"rounded-[12px] border border-border bg-muted p-4 text-sm text-muted-foreground\">\n Diagram content is empty.\n </div>\n );\n }\n const visualNodes = direction === \"rtl\" ? [...nodes].reverse() : nodes;\n return (\n <div\n className=\"plan-sketch rounded-[16px] border border-border bg-muted p-5\"\n dir={direction}\n data-text-direction={direction}\n >\n <div\n className={cn(\n \"flex gap-3 overflow-x-auto pb-2\",\n compact ? \"items-center\" : \"items-stretch\",\n )}\n >\n {visualNodes.map((node, index) => {\n const next = visualNodes[index + 1];\n const edge = next\n ? edges.find(\n (candidate) =>\n (candidate.from === node.id && candidate.to === next.id) ||\n (candidate.from === next.id && candidate.to === node.id),\n )\n : undefined;\n return (\n <div key={node.id} className=\"flex min-w-max items-center gap-3\">\n <article\n className={cn(\n \"w-[180px] rounded-xl border-2 border-border bg-background p-3 text-foreground\",\n compact && \"w-[150px]\",\n )}\n >\n <p className=\"text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground\">\n {index + 1}\n </p>\n <h3 className=\"mt-2 text-base font-semibold leading-tight\">\n {node.label}\n </h3>\n {node.detail && !compact && (\n <p className=\"mt-2 text-xs leading-5 text-muted-foreground\">\n {node.detail}\n </p>\n )}\n </article>\n {next && (\n <div className=\"grid min-w-[72px] justify-items-center gap-1 text-muted-foreground\">\n {edge?.label && (\n <span className=\"max-w-[96px] truncate rounded-full border border-border px-2 py-0.5 text-[11px] font-semibold\">\n {edge.label}\n </span>\n )}\n <span className=\"h-0.5 w-full rounded-full border-t-2 border-dashed border-border\" />\n </div>\n )}\n </div>\n );\n })}\n </div>\n {data.notes && data.notes.length > 0 && !compact && (\n <div className=\"mt-4 grid gap-2 border-t border-border pt-4 text-sm text-muted-foreground md:grid-cols-2\">\n {data.notes.map((note) => (\n <p key={note.id}>{note.text}</p>\n ))}\n </div>\n )}\n </div>\n );\n}\n\n/**\n * The diagram body. Routes to the preferred HTML/SVG path (when `data.html` is\n * set) and otherwise to a legacy node-graph path (positioned canvas when nodes\n * carry x/y, else an ordered sequence). Used both inline and, scaled up, inside\n * the expand lightbox — so every variant (html/css, positioned, sequence)\n * enlarges through the same code path.\n */\nfunction DiagramBody({\n data,\n ctx,\n compact,\n}: {\n data: DiagramData;\n ctx: BlockRenderContext;\n compact?: boolean;\n}) {\n const markerId = useId().replace(/:/g, \"\");\n if (data.html?.trim()) {\n return <HtmlDiagram data={data} ctx={ctx} compact={compact} />;\n }\n if (hasPositionedDiagramNodes(data)) {\n return (\n <PositionedDiagram\n data={data}\n compact={compact}\n markerId={markerId}\n direction={ctx.textDirection}\n />\n );\n }\n return (\n <SequenceDiagram\n data={data}\n compact={compact}\n direction={ctx.textDirection}\n />\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Expand / lightbox */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Enlarge overlay for a rendered diagram. Mirrors the image lightbox contract\n * used by the composer's `ImagePreviewLightbox` (PromptComposer.tsx) so the\n * expand affordance feels identical to viewing an image full-size: a fixed\n * `bg-black/80` backdrop, Escape to close, click-the-backdrop to close, and a\n * top-right close button. Unlike the image variant this renders arbitrary\n * children (the diagram body re-rendered larger) rather than an `<img>`, since a\n * diagram is live HTML/SVG/node-graph markup, not an image URL.\n *\n * Exported so the separate Mermaid block (`MermaidBlock.tsx`, which renders its\n * diagram to an SVG through a different runtime) can reuse the exact same\n * lightbox contract — one expand affordance shared across both diagram types.\n */\nexport function DiagramLightbox({\n children,\n onClose,\n}: {\n children: React.ReactNode;\n onClose: () => void;\n}) {\n useEffect(() => {\n const handler = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") onClose();\n };\n document.addEventListener(\"keydown\", handler);\n document.body.style.overflow = \"hidden\";\n return () => {\n document.removeEventListener(\"keydown\", handler);\n document.body.style.overflow = \"\";\n };\n }, [onClose]);\n\n return (\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Diagram preview\"\n onClick={onClose}\n data-plan-interactive\n className=\"fixed inset-0 z-[300] flex items-center justify-center overflow-auto bg-black/80 p-6 cursor-zoom-out\"\n >\n <div\n onClick={(e) => e.stopPropagation()}\n className=\"max-h-full w-full max-w-5xl cursor-default overflow-auto rounded-md bg-background p-6 shadow-2xl\"\n >\n {children}\n </div>\n <button\n type=\"button\"\n onClick={onClose}\n aria-label=\"Close preview\"\n className=\"absolute right-4 top-4 flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-white/30 bg-black/40 text-white hover:bg-black/60\"\n >\n <IconX className=\"h-4 w-4\" />\n </button>\n </div>\n );\n}\n\n/**\n * The diagram body plus a hover-revealed top-right \"expand\" button (like the\n * image attachment zoom). Opening the button re-renders the exact same\n * `DiagramBody` inside `DiagramLightbox` at a larger size, so html/css and\n * mermaid/legacy node-graph diagrams alike enlarge through one path. The inline\n * (non-expanded) render is otherwise unchanged.\n */\nfunction ExpandableDiagramBody({\n data,\n ctx,\n compact,\n}: {\n data: DiagramData;\n ctx: BlockRenderContext;\n compact?: boolean;\n}) {\n const [expanded, setExpanded] = useState(false);\n const supportsStyleToggle = Boolean(data.html);\n const style = useWireframeStyle();\n const copy = useBlockCopy();\n const sketchy = style === \"sketchy\";\n const styleLabel = sketchy\n ? copy.switchToCleanDiagrams\n : copy.switchToHandDrawnDiagrams;\n const styleTooltip = sketchy\n ? copy.handDrawnDiagramsSwitch\n : copy.cleanDiagramsSwitch;\n return (\n <div className=\"group/diagram relative\">\n <DiagramBody data={data} ctx={ctx} compact={compact} />\n <TooltipProvider delayDuration={100} skipDelayDuration={0}>\n <div className=\"absolute right-2 top-2 z-10 flex items-center gap-1.5\">\n {supportsStyleToggle && (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n data-plan-interactive\n onClick={() => toggleWireframeStyle()}\n aria-label={styleLabel}\n aria-pressed={sketchy}\n className=\"an-diagram-style-trigger flex size-7 items-center justify-center rounded-md border border-border/60 bg-background text-muted-foreground opacity-0 shadow-sm transition-[color,opacity] hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring group-hover/diagram:opacity-100\"\n >\n {sketchy ? (\n <IconScribble className=\"size-4\" />\n ) : (\n <IconShape2 className=\"size-4\" />\n )}\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"left\">{styleTooltip}</TooltipContent>\n </Tooltip>\n )}\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n data-plan-interactive\n onClick={() => setExpanded(true)}\n aria-label={copy.expandDiagram}\n className=\"an-diagram-expand-trigger flex size-7 items-center justify-center rounded-md border border-border/60 bg-background text-muted-foreground opacity-0 shadow-sm transition-[color,opacity] hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring group-hover/diagram:opacity-100\"\n >\n <IconArrowsMaximize className=\"size-4\" />\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"left\">{copy.expandDiagram}</TooltipContent>\n </Tooltip>\n </div>\n </TooltipProvider>\n {expanded ? (\n <DiagramLightbox onClose={() => setExpanded(false)}>\n <DiagramBody data={data} ctx={ctx} />\n </DiagramLightbox>\n ) : null}\n </div>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Read + Edit */\n/* -------------------------------------------------------------------------- */\n\n/** Read-only renderer: the diagram body wrapped in the standard titled block. */\nexport function DiagramRead({\n data,\n blockId,\n title,\n summary,\n ctx,\n compactVisuals,\n}: BlockReadProps<DiagramData>) {\n return (\n <section\n {...ltrCodeBlockProps}\n className=\"an-block plan-block\"\n data-block-id={blockId}\n >\n {title && <div className=\"an-block-label plan-block-label\">{title}</div>}\n <ExpandableDiagramBody data={data} ctx={ctx} compact={compactVisuals} />\n {summary && <p className=\"mt-5 text-muted-foreground\">{summary}</p>}\n </section>\n );\n}\n\n/**\n * Edit form (panel surface). The block can be an HTML/SVG fragment or a legacy\n * node/edge/note graph, so this exposes html/css/caption plus a collapsible\n * legacy node-graph JSON editor, each with an AI-edit affordance via\n * `ctx.renderAiFieldAction` (through `AiEditableFieldLabel`). `editSurface:\n * \"panel\"` means the registry renders the `Read` view with a corner edit button\n * that opens this form in the app-provided popover.\n */\nexport function DiagramEdit({\n data,\n onChange,\n editable,\n blockId,\n title,\n summary,\n ctx,\n}: BlockEditProps<DiagramData>) {\n const htmlId = useId();\n const cssId = useId();\n const captionId = useId();\n const legacyId = useId();\n const [html, setHtml] = useState(data.html ?? \"\");\n const [css, setCss] = useState(data.css ?? \"\");\n const [caption, setCaption] = useState(data.caption ?? \"\");\n const [legacyJson, setLegacyJson] = useState(() =>\n JSON.stringify(\n {\n nodes: data.nodes ?? [],\n edges: data.edges ?? [],\n notes: data.notes ?? [],\n },\n null,\n 2,\n ),\n );\n\n useEffect(() => {\n setHtml(data.html ?? \"\");\n setCss(data.css ?? \"\");\n setCaption(data.caption ?? \"\");\n setLegacyJson(\n JSON.stringify(\n {\n nodes: data.nodes ?? [],\n edges: data.edges ?? [],\n notes: data.notes ?? [],\n },\n null,\n 2,\n ),\n );\n }, [data]);\n\n const saveHtmlDiagram = () => {\n onChange({\n html: html.trim() || undefined,\n css: css.trim() || undefined,\n caption: caption.trim() || undefined,\n nodes: data.nodes,\n edges: data.edges,\n notes: data.notes,\n });\n };\n\n const saveLegacyDiagram = () => {\n const parsed = JSON.parse(legacyJson) as Pick<\n DiagramData,\n \"nodes\" | \"edges\" | \"notes\"\n >;\n onChange({\n ...data,\n nodes: parsed.nodes ?? [],\n edges: parsed.edges ?? [],\n notes: parsed.notes ?? [],\n });\n };\n\n const fieldAction = (\n field: \"HTML / SVG fragment\" | \"CSS\" | \"caption\" | \"legacy node graph JSON\",\n value: string,\n ) => ({\n blockId,\n blockType: \"diagram\",\n blockTitle: title,\n blockSummary: summary,\n fieldValue: value,\n draftScope: `block:diagram:${blockId}:${field.toLowerCase().replace(/[^a-z0-9]+/g, \"-\")}`,\n disabled: !editable,\n instructions:\n \"Update the plan with update-visual-plan using a targeted update-block content patch for this diagram block id. Preserve unrelated diagram fields unless the requested edit requires changing them. Keep diagram HTML/CSS on renderer-owned .diagram-* primitives and --wf-* tokens; do not introduce custom font-family or hard-coded hex/rgb/hsl colors.\",\n companionFields: [\n {\n label: \"HTML / SVG fragment\",\n value: html.trim() || \"(empty)\",\n language: \"html\",\n },\n { label: \"CSS\", value: css.trim() || \"(empty)\", language: \"css\" },\n {\n label: \"caption\",\n value: caption.trim() || \"(empty)\",\n language: \"text\",\n },\n ],\n });\n\n return (\n <div className=\"grid gap-4\" data-plan-interactive>\n <button\n type=\"button\"\n className=\"inline-flex h-8 w-fit items-center justify-center rounded-md bg-primary px-3 text-xs font-medium text-primary-foreground disabled:opacity-50\"\n disabled={!editable}\n onClick={saveHtmlDiagram}\n >\n Save diagram\n </button>\n <div className=\"group/field grid gap-1.5\">\n <AiEditableFieldLabel\n htmlFor={htmlId}\n label=\"HTML / SVG fragment\"\n ctx={ctx}\n action={fieldAction(\"HTML / SVG fragment\", html)}\n />\n <textarea\n id={htmlId}\n className=\"min-h-48 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs leading-5 text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n value={html}\n disabled={!editable}\n onChange={(event) => setHtml(event.target.value)}\n placeholder=\"<div class='diagram'>...</div>\"\n />\n </div>\n <div className=\"group/field grid gap-1.5\">\n <AiEditableFieldLabel\n htmlFor={cssId}\n label=\"CSS\"\n ctx={ctx}\n action={fieldAction(\"CSS\", css)}\n />\n <textarea\n id={cssId}\n className=\"min-h-32 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs leading-5 text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n value={css}\n disabled={!editable}\n onChange={(event) => setCss(event.target.value)}\n placeholder=\".diagram { display: grid; }\"\n />\n </div>\n <div className=\"group/field grid gap-1.5\">\n <AiEditableFieldLabel\n htmlFor={captionId}\n label=\"Caption\"\n ctx={ctx}\n action={fieldAction(\"caption\", caption)}\n />\n <input\n id={captionId}\n className=\"h-9 w-full rounded-md border border-input bg-background px-3 text-sm text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n value={caption}\n disabled={!editable}\n onChange={(event) => setCaption(event.target.value)}\n />\n </div>\n {!data.html && (\n <details className=\"rounded-md border border-border p-3\">\n <summary className=\"cursor-pointer text-xs font-semibold text-muted-foreground\">\n Legacy node graph data\n </summary>\n <div className=\"group/field mt-3 grid gap-1.5\">\n <AiEditableFieldLabel\n htmlFor={legacyId}\n label=\"JSON\"\n ctx={ctx}\n action={fieldAction(\"legacy node graph JSON\", legacyJson)}\n />\n <textarea\n id={legacyId}\n className=\"min-h-44 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs leading-5 text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"\n value={legacyJson}\n disabled={!editable}\n onChange={(event) => setLegacyJson(event.target.value)}\n />\n </div>\n <button\n type=\"button\"\n className=\"mt-3 inline-flex h-8 items-center justify-center rounded-md border border-input px-3 text-xs font-medium text-foreground disabled:opacity-50\"\n disabled={!editable}\n onClick={saveLegacyDiagram}\n >\n Save graph data\n </button>\n </details>\n )}\n </div>\n );\n}\n\n/** Full client spec for the shared `diagram` block (schema + MDX + Read/Edit). */\nexport const diagramBlock = defineBlock<DiagramData>({\n type: \"diagram\",\n schema: diagramSchema,\n mdx: diagramMdx,\n Read: DiagramRead,\n Edit: DiagramEdit,\n placement: [\"block\"],\n // Config-driven: the rendered diagram differs from its raw html/css source, so\n // edit from a corner button + panel rather than inline.\n editSurface: \"panel\",\n label: \"Diagram\",\n description:\n \"A flexible inline architecture/code diagram. Prefer html/css with SVG or semantic HTML for polished two-dimensional layouts; use .diagram-* primitives and --wf-* tokens for theme/sketch compatibility. Legacy nodes/edges are only for simple previews.\",\n // Seed the legacy fallback shape so a fresh block validates while agents can\n // replace it with html/css when layout quality matters.\n empty: () => ({ nodes: [{ id: \"n1\", label: \"Module\" }], edges: [] }),\n});\n"]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export declare function sanitizeWireframeHtml(html: string | undefined
|
|
1
|
+
export declare function sanitizeWireframeHtml(html: string | undefined, options?: {
|
|
2
|
+
preserveThemeClasses?: boolean;
|
|
3
|
+
}): string;
|
|
2
4
|
export declare function sanitizeDiagramHtml(html: string | undefined): string;
|
|
3
5
|
export declare function sanitizeWireframeCss(css: string | undefined): string;
|
|
4
6
|
export declare function scopeDesignCss(css: string, scopeSelector: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize-html.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/library/sanitize-html.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sanitize-html.d.ts","sourceRoot":"","sources":["../../../../src/client/blocks/library/sanitize-html.ts"],"names":[],"mappings":"AAyKA,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,OAAO,CAAC,EAAE;IAAE,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAAE,GAC3C,MAAM,CAUR;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAcpE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAoBpE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAsBzE"}
|