@agent-native/core 0.92.12 → 0.94.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 +64 -0
- package/corpus/core/docs/content/a2a-protocol.mdx +21 -5
- package/corpus/core/docs/content/actions.mdx +9 -23
- package/corpus/core/docs/content/agent-mentions.mdx +31 -29
- package/corpus/core/docs/content/agent-native-toolkit.mdx +15 -6
- package/corpus/core/docs/content/agent-surfaces.mdx +9 -13
- package/corpus/core/docs/content/agent-teams.mdx +1 -0
- package/corpus/core/docs/content/authentication.mdx +10 -3
- package/corpus/core/docs/content/automation-connectors.mdx +123 -0
- package/corpus/core/docs/content/automations.mdx +17 -3
- package/corpus/core/docs/content/blueprint-installer.mdx +11 -4
- package/corpus/core/docs/content/cli-adapters.mdx +9 -6
- package/corpus/core/docs/content/client.mdx +16 -0
- package/corpus/core/docs/content/cloneable-saas.mdx +14 -11
- package/corpus/core/docs/content/code-agents-ui.mdx +65 -0
- package/corpus/core/docs/content/components.mdx +30 -14
- package/corpus/core/docs/content/context-awareness.mdx +27 -15
- package/corpus/core/docs/content/creating-templates.mdx +15 -9
- package/corpus/core/docs/content/cross-app-sso.mdx +16 -6
- package/corpus/core/docs/content/data-programs.mdx +1 -1
- package/corpus/core/docs/content/database.mdx +17 -5
- package/corpus/core/docs/content/deployment.mdx +19 -18
- package/corpus/core/docs/content/dispatch.mdx +6 -2
- package/corpus/core/docs/content/drop-in-agent.mdx +10 -4
- package/corpus/core/docs/content/durable-background-runs.mdx +9 -5
- package/corpus/core/docs/content/durable-resume.mdx +9 -4
- package/corpus/core/docs/content/embedding-sdk.mdx +26 -8
- package/corpus/core/docs/content/evals.mdx +3 -5
- package/corpus/core/docs/content/extensions.mdx +23 -2
- package/corpus/core/docs/content/external-agents.mdx +25 -34
- package/corpus/core/docs/content/faq.mdx +8 -0
- package/corpus/core/docs/content/file-uploads.mdx +12 -3
- package/corpus/core/docs/content/frames.mdx +16 -0
- package/corpus/core/docs/content/generative-ui.mdx +1 -1
- package/corpus/core/docs/content/getting-started.mdx +34 -21
- package/corpus/core/docs/content/harness-agents.mdx +8 -4
- package/corpus/core/docs/content/human-approval.mdx +8 -3
- package/corpus/core/docs/content/internationalization.mdx +9 -4
- package/corpus/core/docs/content/key-concepts.mdx +13 -20
- package/corpus/core/docs/content/local-file-mode.mdx +14 -8
- package/corpus/core/docs/content/locales/ar-SA/actions.mdx +2 -2
- package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +2 -2
- package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +8 -10
- package/corpus/core/docs/content/locales/ar-SA/agent-teams.mdx +1 -0
- package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/components.mdx +11 -1
- package/corpus/core/docs/content/locales/ar-SA/creating-templates.mdx +3 -7
- package/corpus/core/docs/content/locales/ar-SA/cross-app-sso.mdx +16 -6
- package/corpus/core/docs/content/locales/ar-SA/deployment.mdx +8 -0
- package/corpus/core/docs/content/locales/ar-SA/extensions.mdx +8 -0
- package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +2 -7
- package/corpus/core/docs/content/locales/ar-SA/key-concepts.mdx +13 -20
- package/corpus/core/docs/content/locales/ar-SA/messaging.mdx +84 -15
- package/corpus/core/docs/content/locales/ar-SA/multi-tenancy.mdx +5 -5
- package/corpus/core/docs/content/locales/ar-SA/notifications.mdx +18 -10
- package/corpus/core/docs/content/locales/ar-SA/processors.mdx +11 -5
- package/corpus/core/docs/content/locales/ar-SA/server.mdx +17 -10
- package/corpus/core/docs/content/locales/ar-SA/sharing.mdx +10 -10
- package/corpus/core/docs/content/locales/ar-SA/skills-guide.mdx +34 -17
- package/corpus/core/docs/content/locales/ar-SA/template-assets.mdx +16 -13
- package/corpus/core/docs/content/locales/ar-SA/template-brain.mdx +3 -1
- package/corpus/core/docs/content/locales/ar-SA/template-clips.mdx +4 -3
- package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +4 -1
- package/corpus/core/docs/content/locales/ar-SA/template-dispatch.mdx +5 -1
- package/corpus/core/docs/content/locales/ar-SA/template-mail.mdx +8 -0
- package/corpus/core/docs/content/locales/ar-SA/tracking.mdx +9 -6
- package/corpus/core/docs/content/locales/ar-SA/using-your-agent.mdx +0 -7
- package/corpus/core/docs/content/locales/ar-SA/voice-input.mdx +6 -0
- package/corpus/core/docs/content/locales/ar-SA/workspace-connections.mdx +9 -2
- package/corpus/core/docs/content/locales/ar-SA/workspace.mdx +19 -18
- package/corpus/core/docs/content/locales/de-DE/actions.mdx +2 -2
- package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +2 -2
- package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +8 -10
- package/corpus/core/docs/content/locales/de-DE/agent-teams.mdx +1 -0
- package/corpus/core/docs/content/locales/de-DE/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/components.mdx +11 -1
- package/corpus/core/docs/content/locales/de-DE/creating-templates.mdx +3 -7
- package/corpus/core/docs/content/locales/de-DE/cross-app-sso.mdx +16 -6
- package/corpus/core/docs/content/locales/de-DE/deployment.mdx +8 -0
- package/corpus/core/docs/content/locales/de-DE/extensions.mdx +10 -0
- package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +3 -7
- package/corpus/core/docs/content/locales/de-DE/key-concepts.mdx +13 -20
- package/corpus/core/docs/content/locales/de-DE/messaging.mdx +92 -15
- package/corpus/core/docs/content/locales/de-DE/multi-tenancy.mdx +5 -5
- package/corpus/core/docs/content/locales/de-DE/notifications.mdx +18 -10
- package/corpus/core/docs/content/locales/de-DE/processors.mdx +11 -5
- package/corpus/core/docs/content/locales/de-DE/server.mdx +18 -10
- package/corpus/core/docs/content/locales/de-DE/sharing.mdx +10 -10
- package/corpus/core/docs/content/locales/de-DE/skills-guide.mdx +34 -17
- package/corpus/core/docs/content/locales/de-DE/template-assets.mdx +16 -13
- package/corpus/core/docs/content/locales/de-DE/template-brain.mdx +3 -1
- package/corpus/core/docs/content/locales/de-DE/template-clips.mdx +4 -3
- package/corpus/core/docs/content/locales/de-DE/template-design.mdx +4 -1
- package/corpus/core/docs/content/locales/de-DE/template-dispatch.mdx +5 -1
- package/corpus/core/docs/content/locales/de-DE/template-mail.mdx +8 -0
- package/corpus/core/docs/content/locales/de-DE/tracking.mdx +9 -6
- package/corpus/core/docs/content/locales/de-DE/using-your-agent.mdx +0 -7
- package/corpus/core/docs/content/locales/de-DE/voice-input.mdx +6 -0
- package/corpus/core/docs/content/locales/de-DE/workspace-connections.mdx +9 -2
- package/corpus/core/docs/content/locales/de-DE/workspace.mdx +19 -18
- package/corpus/core/docs/content/locales/es-ES/actions.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +8 -10
- package/corpus/core/docs/content/locales/es-ES/agent-teams.mdx +1 -0
- package/corpus/core/docs/content/locales/es-ES/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/components.mdx +11 -1
- package/corpus/core/docs/content/locales/es-ES/creating-templates.mdx +3 -7
- package/corpus/core/docs/content/locales/es-ES/cross-app-sso.mdx +16 -6
- package/corpus/core/docs/content/locales/es-ES/deployment.mdx +8 -0
- package/corpus/core/docs/content/locales/es-ES/extensions.mdx +10 -0
- package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +3 -7
- package/corpus/core/docs/content/locales/es-ES/key-concepts.mdx +13 -20
- package/corpus/core/docs/content/locales/es-ES/messaging.mdx +91 -15
- package/corpus/core/docs/content/locales/es-ES/multi-tenancy.mdx +5 -5
- package/corpus/core/docs/content/locales/es-ES/notifications.mdx +18 -10
- package/corpus/core/docs/content/locales/es-ES/processors.mdx +11 -5
- package/corpus/core/docs/content/locales/es-ES/server.mdx +17 -10
- package/corpus/core/docs/content/locales/es-ES/sharing.mdx +10 -10
- package/corpus/core/docs/content/locales/es-ES/skills-guide.mdx +34 -17
- package/corpus/core/docs/content/locales/es-ES/template-assets.mdx +16 -13
- package/corpus/core/docs/content/locales/es-ES/template-brain.mdx +3 -1
- package/corpus/core/docs/content/locales/es-ES/template-clips.mdx +4 -3
- package/corpus/core/docs/content/locales/es-ES/template-design.mdx +4 -1
- package/corpus/core/docs/content/locales/es-ES/template-dispatch.mdx +5 -1
- package/corpus/core/docs/content/locales/es-ES/template-mail.mdx +8 -0
- package/corpus/core/docs/content/locales/es-ES/tracking.mdx +9 -6
- package/corpus/core/docs/content/locales/es-ES/using-your-agent.mdx +0 -7
- package/corpus/core/docs/content/locales/es-ES/voice-input.mdx +6 -0
- package/corpus/core/docs/content/locales/es-ES/workspace-connections.mdx +9 -2
- package/corpus/core/docs/content/locales/es-ES/workspace.mdx +19 -18
- package/corpus/core/docs/content/locales/fr-FR/actions.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +8 -10
- package/corpus/core/docs/content/locales/fr-FR/agent-teams.mdx +1 -0
- package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/components.mdx +11 -1
- package/corpus/core/docs/content/locales/fr-FR/creating-templates.mdx +3 -7
- package/corpus/core/docs/content/locales/fr-FR/cross-app-sso.mdx +16 -6
- package/corpus/core/docs/content/locales/fr-FR/deployment.mdx +8 -0
- package/corpus/core/docs/content/locales/fr-FR/extensions.mdx +10 -0
- package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +3 -7
- package/corpus/core/docs/content/locales/fr-FR/key-concepts.mdx +13 -20
- package/corpus/core/docs/content/locales/fr-FR/messaging.mdx +91 -15
- package/corpus/core/docs/content/locales/fr-FR/multi-tenancy.mdx +5 -5
- package/corpus/core/docs/content/locales/fr-FR/notifications.mdx +18 -10
- package/corpus/core/docs/content/locales/fr-FR/processors.mdx +11 -5
- package/corpus/core/docs/content/locales/fr-FR/server.mdx +17 -10
- package/corpus/core/docs/content/locales/fr-FR/sharing.mdx +10 -10
- package/corpus/core/docs/content/locales/fr-FR/skills-guide.mdx +34 -17
- package/corpus/core/docs/content/locales/fr-FR/template-assets.mdx +16 -13
- package/corpus/core/docs/content/locales/fr-FR/template-brain.mdx +3 -1
- package/corpus/core/docs/content/locales/fr-FR/template-clips.mdx +4 -3
- package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +4 -1
- package/corpus/core/docs/content/locales/fr-FR/template-dispatch.mdx +5 -1
- package/corpus/core/docs/content/locales/fr-FR/template-mail.mdx +8 -0
- package/corpus/core/docs/content/locales/fr-FR/tracking.mdx +9 -6
- package/corpus/core/docs/content/locales/fr-FR/using-your-agent.mdx +0 -7
- package/corpus/core/docs/content/locales/fr-FR/voice-input.mdx +6 -0
- package/corpus/core/docs/content/locales/fr-FR/workspace-connections.mdx +9 -2
- package/corpus/core/docs/content/locales/fr-FR/workspace.mdx +19 -18
- package/corpus/core/docs/content/locales/hi-IN/actions.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +8 -10
- package/corpus/core/docs/content/locales/hi-IN/agent-teams.mdx +1 -0
- package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/components.mdx +11 -1
- package/corpus/core/docs/content/locales/hi-IN/creating-templates.mdx +3 -7
- package/corpus/core/docs/content/locales/hi-IN/cross-app-sso.mdx +16 -6
- package/corpus/core/docs/content/locales/hi-IN/deployment.mdx +8 -0
- package/corpus/core/docs/content/locales/hi-IN/extensions.mdx +8 -0
- package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +2 -7
- package/corpus/core/docs/content/locales/hi-IN/key-concepts.mdx +13 -20
- package/corpus/core/docs/content/locales/hi-IN/messaging.mdx +81 -15
- package/corpus/core/docs/content/locales/hi-IN/multi-tenancy.mdx +5 -5
- package/corpus/core/docs/content/locales/hi-IN/notifications.mdx +18 -10
- package/corpus/core/docs/content/locales/hi-IN/processors.mdx +11 -5
- package/corpus/core/docs/content/locales/hi-IN/server.mdx +17 -10
- package/corpus/core/docs/content/locales/hi-IN/sharing.mdx +10 -10
- package/corpus/core/docs/content/locales/hi-IN/skills-guide.mdx +34 -17
- package/corpus/core/docs/content/locales/hi-IN/template-assets.mdx +16 -13
- package/corpus/core/docs/content/locales/hi-IN/template-brain.mdx +3 -1
- package/corpus/core/docs/content/locales/hi-IN/template-clips.mdx +4 -3
- package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +4 -1
- package/corpus/core/docs/content/locales/hi-IN/template-dispatch.mdx +5 -1
- package/corpus/core/docs/content/locales/hi-IN/template-mail.mdx +8 -0
- package/corpus/core/docs/content/locales/hi-IN/tracking.mdx +9 -6
- package/corpus/core/docs/content/locales/hi-IN/using-your-agent.mdx +0 -7
- package/corpus/core/docs/content/locales/hi-IN/voice-input.mdx +6 -0
- package/corpus/core/docs/content/locales/hi-IN/workspace-connections.mdx +9 -2
- package/corpus/core/docs/content/locales/hi-IN/workspace.mdx +19 -18
- package/corpus/core/docs/content/locales/ja-JP/actions.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +8 -10
- package/corpus/core/docs/content/locales/ja-JP/agent-teams.mdx +1 -0
- package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/components.mdx +11 -1
- package/corpus/core/docs/content/locales/ja-JP/creating-templates.mdx +3 -7
- package/corpus/core/docs/content/locales/ja-JP/cross-app-sso.mdx +16 -6
- package/corpus/core/docs/content/locales/ja-JP/deployment.mdx +8 -0
- package/corpus/core/docs/content/locales/ja-JP/extensions.mdx +9 -0
- package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +2 -7
- package/corpus/core/docs/content/locales/ja-JP/key-concepts.mdx +13 -20
- package/corpus/core/docs/content/locales/ja-JP/messaging.mdx +81 -15
- package/corpus/core/docs/content/locales/ja-JP/multi-tenancy.mdx +5 -5
- package/corpus/core/docs/content/locales/ja-JP/notifications.mdx +18 -10
- package/corpus/core/docs/content/locales/ja-JP/processors.mdx +11 -5
- package/corpus/core/docs/content/locales/ja-JP/server.mdx +17 -10
- package/corpus/core/docs/content/locales/ja-JP/sharing.mdx +10 -10
- package/corpus/core/docs/content/locales/ja-JP/skills-guide.mdx +34 -17
- package/corpus/core/docs/content/locales/ja-JP/template-assets.mdx +16 -13
- package/corpus/core/docs/content/locales/ja-JP/template-brain.mdx +3 -1
- package/corpus/core/docs/content/locales/ja-JP/template-clips.mdx +4 -4
- package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +4 -1
- package/corpus/core/docs/content/locales/ja-JP/template-dispatch.mdx +5 -1
- package/corpus/core/docs/content/locales/ja-JP/template-mail.mdx +8 -0
- package/corpus/core/docs/content/locales/ja-JP/tracking.mdx +9 -6
- package/corpus/core/docs/content/locales/ja-JP/using-your-agent.mdx +0 -7
- package/corpus/core/docs/content/locales/ja-JP/voice-input.mdx +6 -0
- package/corpus/core/docs/content/locales/ja-JP/workspace-connections.mdx +9 -2
- package/corpus/core/docs/content/locales/ja-JP/workspace.mdx +19 -18
- package/corpus/core/docs/content/locales/ko-KR/actions.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +8 -10
- package/corpus/core/docs/content/locales/ko-KR/agent-teams.mdx +1 -0
- package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/components.mdx +11 -1
- package/corpus/core/docs/content/locales/ko-KR/creating-templates.mdx +3 -7
- package/corpus/core/docs/content/locales/ko-KR/cross-app-sso.mdx +16 -6
- package/corpus/core/docs/content/locales/ko-KR/deployment.mdx +8 -0
- package/corpus/core/docs/content/locales/ko-KR/extensions.mdx +8 -0
- package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +2 -7
- package/corpus/core/docs/content/locales/ko-KR/key-concepts.mdx +13 -20
- package/corpus/core/docs/content/locales/ko-KR/messaging.mdx +80 -15
- package/corpus/core/docs/content/locales/ko-KR/multi-tenancy.mdx +5 -5
- package/corpus/core/docs/content/locales/ko-KR/notifications.mdx +18 -10
- package/corpus/core/docs/content/locales/ko-KR/processors.mdx +11 -5
- package/corpus/core/docs/content/locales/ko-KR/server.mdx +17 -10
- package/corpus/core/docs/content/locales/ko-KR/sharing.mdx +10 -10
- package/corpus/core/docs/content/locales/ko-KR/skills-guide.mdx +34 -17
- package/corpus/core/docs/content/locales/ko-KR/template-assets.mdx +16 -13
- package/corpus/core/docs/content/locales/ko-KR/template-brain.mdx +3 -1
- package/corpus/core/docs/content/locales/ko-KR/template-clips.mdx +4 -4
- package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +4 -1
- package/corpus/core/docs/content/locales/ko-KR/template-dispatch.mdx +5 -1
- package/corpus/core/docs/content/locales/ko-KR/template-mail.mdx +8 -0
- package/corpus/core/docs/content/locales/ko-KR/tracking.mdx +9 -6
- package/corpus/core/docs/content/locales/ko-KR/using-your-agent.mdx +0 -7
- package/corpus/core/docs/content/locales/ko-KR/voice-input.mdx +6 -0
- package/corpus/core/docs/content/locales/ko-KR/workspace-connections.mdx +9 -2
- package/corpus/core/docs/content/locales/ko-KR/workspace.mdx +19 -18
- package/corpus/core/docs/content/locales/pt-BR/actions.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +8 -10
- package/corpus/core/docs/content/locales/pt-BR/agent-teams.mdx +1 -0
- package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/components.mdx +11 -1
- package/corpus/core/docs/content/locales/pt-BR/creating-templates.mdx +3 -7
- package/corpus/core/docs/content/locales/pt-BR/cross-app-sso.mdx +16 -6
- package/corpus/core/docs/content/locales/pt-BR/deployment.mdx +8 -0
- package/corpus/core/docs/content/locales/pt-BR/extensions.mdx +9 -0
- package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +3 -7
- package/corpus/core/docs/content/locales/pt-BR/key-concepts.mdx +13 -20
- package/corpus/core/docs/content/locales/pt-BR/messaging.mdx +88 -15
- package/corpus/core/docs/content/locales/pt-BR/multi-tenancy.mdx +5 -5
- package/corpus/core/docs/content/locales/pt-BR/notifications.mdx +18 -10
- package/corpus/core/docs/content/locales/pt-BR/processors.mdx +11 -5
- package/corpus/core/docs/content/locales/pt-BR/server.mdx +17 -10
- package/corpus/core/docs/content/locales/pt-BR/sharing.mdx +10 -10
- package/corpus/core/docs/content/locales/pt-BR/skills-guide.mdx +34 -17
- package/corpus/core/docs/content/locales/pt-BR/template-assets.mdx +16 -13
- package/corpus/core/docs/content/locales/pt-BR/template-brain.mdx +3 -1
- package/corpus/core/docs/content/locales/pt-BR/template-clips.mdx +4 -3
- package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +4 -1
- package/corpus/core/docs/content/locales/pt-BR/template-dispatch.mdx +5 -1
- package/corpus/core/docs/content/locales/pt-BR/template-mail.mdx +8 -0
- package/corpus/core/docs/content/locales/pt-BR/tracking.mdx +9 -6
- package/corpus/core/docs/content/locales/pt-BR/using-your-agent.mdx +0 -7
- package/corpus/core/docs/content/locales/pt-BR/voice-input.mdx +6 -0
- package/corpus/core/docs/content/locales/pt-BR/workspace-connections.mdx +9 -2
- package/corpus/core/docs/content/locales/pt-BR/workspace.mdx +19 -18
- package/corpus/core/docs/content/locales/zh-CN/actions.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +8 -10
- package/corpus/core/docs/content/locales/zh-CN/agent-teams.mdx +1 -0
- package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/components.mdx +11 -1
- package/corpus/core/docs/content/locales/zh-CN/creating-templates.mdx +3 -7
- package/corpus/core/docs/content/locales/zh-CN/cross-app-sso.mdx +16 -6
- package/corpus/core/docs/content/locales/zh-CN/deployment.mdx +8 -0
- package/corpus/core/docs/content/locales/zh-CN/extensions.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +2 -7
- package/corpus/core/docs/content/locales/zh-CN/key-concepts.mdx +13 -20
- package/corpus/core/docs/content/locales/zh-CN/messaging.mdx +78 -15
- package/corpus/core/docs/content/locales/zh-CN/multi-tenancy.mdx +5 -5
- package/corpus/core/docs/content/locales/zh-CN/notifications.mdx +18 -10
- package/corpus/core/docs/content/locales/zh-CN/processors.mdx +11 -5
- package/corpus/core/docs/content/locales/zh-CN/server.mdx +16 -10
- package/corpus/core/docs/content/locales/zh-CN/sharing.mdx +10 -10
- package/corpus/core/docs/content/locales/zh-CN/skills-guide.mdx +34 -17
- package/corpus/core/docs/content/locales/zh-CN/template-assets.mdx +16 -13
- package/corpus/core/docs/content/locales/zh-CN/template-brain.mdx +3 -1
- package/corpus/core/docs/content/locales/zh-CN/template-clips.mdx +4 -4
- package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +4 -1
- package/corpus/core/docs/content/locales/zh-CN/template-dispatch.mdx +5 -1
- package/corpus/core/docs/content/locales/zh-CN/template-mail.mdx +8 -0
- package/corpus/core/docs/content/locales/zh-CN/tracking.mdx +9 -6
- package/corpus/core/docs/content/locales/zh-CN/using-your-agent.mdx +0 -7
- package/corpus/core/docs/content/locales/zh-CN/voice-input.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-CN/workspace-connections.mdx +9 -2
- package/corpus/core/docs/content/locales/zh-CN/workspace.mdx +19 -18
- package/corpus/core/docs/content/locales/zh-TW/actions.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +8 -10
- package/corpus/core/docs/content/locales/zh-TW/agent-teams.mdx +1 -0
- package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/components.mdx +11 -1
- package/corpus/core/docs/content/locales/zh-TW/creating-templates.mdx +3 -7
- package/corpus/core/docs/content/locales/zh-TW/cross-app-sso.mdx +16 -6
- package/corpus/core/docs/content/locales/zh-TW/deployment.mdx +8 -0
- package/corpus/core/docs/content/locales/zh-TW/extensions.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +2 -7
- package/corpus/core/docs/content/locales/zh-TW/key-concepts.mdx +13 -20
- package/corpus/core/docs/content/locales/zh-TW/messaging.mdx +78 -15
- package/corpus/core/docs/content/locales/zh-TW/multi-tenancy.mdx +5 -5
- package/corpus/core/docs/content/locales/zh-TW/notifications.mdx +18 -10
- package/corpus/core/docs/content/locales/zh-TW/processors.mdx +11 -5
- package/corpus/core/docs/content/locales/zh-TW/server.mdx +16 -10
- package/corpus/core/docs/content/locales/zh-TW/sharing.mdx +10 -10
- package/corpus/core/docs/content/locales/zh-TW/skills-guide.mdx +34 -17
- package/corpus/core/docs/content/locales/zh-TW/template-assets.mdx +16 -13
- package/corpus/core/docs/content/locales/zh-TW/template-brain.mdx +3 -1
- package/corpus/core/docs/content/locales/zh-TW/template-clips.mdx +4 -4
- package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +4 -1
- package/corpus/core/docs/content/locales/zh-TW/template-dispatch.mdx +5 -1
- package/corpus/core/docs/content/locales/zh-TW/template-mail.mdx +8 -0
- package/corpus/core/docs/content/locales/zh-TW/tracking.mdx +9 -6
- package/corpus/core/docs/content/locales/zh-TW/using-your-agent.mdx +0 -7
- package/corpus/core/docs/content/locales/zh-TW/voice-input.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/workspace-connections.mdx +9 -2
- package/corpus/core/docs/content/locales/zh-TW/workspace.mdx +19 -18
- package/corpus/core/docs/content/mcp-apps.mdx +14 -32
- package/corpus/core/docs/content/mcp-clients.mdx +48 -54
- package/corpus/core/docs/content/mcp-protocol.mdx +25 -10
- package/corpus/core/docs/content/messaging.mdx +238 -48
- package/corpus/core/docs/content/multi-app-workspace.mdx +11 -96
- package/corpus/core/docs/content/multi-tenancy.mdx +5 -5
- package/corpus/core/docs/content/native-chat-ui.mdx +4 -4
- package/corpus/core/docs/content/notifications.mdx +19 -12
- package/corpus/core/docs/content/observability.mdx +2 -4
- package/corpus/core/docs/content/observational-memory.mdx +7 -3
- package/corpus/core/docs/content/onboarding.mdx +9 -2
- package/corpus/core/docs/content/plan-plugin.mdx +10 -2
- package/corpus/core/docs/content/pr-visual-recap.mdx +1 -1
- package/corpus/core/docs/content/processors.mdx +11 -5
- package/corpus/core/docs/content/pure-agent-apps.mdx +5 -1
- package/corpus/core/docs/content/real-time-collaboration.mdx +30 -67
- package/corpus/core/docs/content/recurring-jobs.mdx +8 -6
- package/corpus/core/docs/content/routing.mdx +3 -4
- package/corpus/core/docs/content/sandbox-adapters.mdx +30 -53
- package/corpus/core/docs/content/security.mdx +8 -0
- package/corpus/core/docs/content/server.mdx +17 -10
- package/corpus/core/docs/content/sharing.mdx +10 -10
- package/corpus/core/docs/content/skills-guide.mdx +35 -16
- package/corpus/core/docs/content/template-analytics.mdx +11 -8
- package/corpus/core/docs/content/template-assets.mdx +16 -13
- package/corpus/core/docs/content/template-brain.mdx +3 -1
- package/corpus/core/docs/content/template-calendar.mdx +12 -4
- package/corpus/core/docs/content/template-chat.mdx +4 -4
- package/corpus/core/docs/content/template-clips.mdx +6 -3
- package/corpus/core/docs/content/template-content.mdx +23 -18
- package/corpus/core/docs/content/template-design.mdx +7 -1
- package/corpus/core/docs/content/template-dispatch.mdx +5 -1
- package/corpus/core/docs/content/template-mail.mdx +14 -2
- package/corpus/core/docs/content/template-plan.mdx +22 -15
- package/corpus/core/docs/content/template-slides.mdx +11 -3
- package/corpus/core/docs/content/toolkit-agent-ux.mdx +46 -3
- package/corpus/core/docs/content/toolkit-collaboration.mdx +58 -4
- package/corpus/core/docs/content/toolkit-command-navigation.mdx +8 -2
- package/corpus/core/docs/content/toolkit-comments-review.mdx +10 -2
- package/corpus/core/docs/content/toolkit-history.mdx +8 -3
- package/corpus/core/docs/content/toolkit-observability.mdx +48 -2
- package/corpus/core/docs/content/toolkit-org-team.mdx +8 -2
- package/corpus/core/docs/content/toolkit-resources.mdx +45 -2
- package/corpus/core/docs/content/toolkit-settings.mdx +8 -2
- package/corpus/core/docs/content/toolkit-setup-connections.mdx +7 -2
- package/corpus/core/docs/content/toolkit-sharing.mdx +46 -3
- package/corpus/core/docs/content/toolkit-ui.mdx +82 -11
- package/corpus/core/docs/content/tracking.mdx +10 -8
- package/corpus/core/docs/content/using-your-agent.mdx +0 -12
- package/corpus/core/docs/content/voice-input.mdx +7 -1
- package/corpus/core/docs/content/what-is-agent-native.mdx +7 -8
- package/corpus/core/docs/content/workspace-connections.mdx +16 -23
- package/corpus/core/docs/content/workspace-management.mdx +16 -4
- package/corpus/core/docs/content/workspace.mdx +19 -18
- package/corpus/core/package.json +5 -1
- package/corpus/core/src/a2a/artifact-response.ts +131 -2
- package/corpus/core/src/a2a/client.ts +10 -0
- package/corpus/core/src/a2a/handlers.ts +40 -76
- package/corpus/core/src/a2a/types.ts +2 -0
- package/corpus/core/src/agent/context-xray/tokenize.ts +6 -1
- package/corpus/core/src/agent/durable-background.ts +24 -0
- package/corpus/core/src/agent/engine/ai-sdk-engine.ts +9 -5
- package/corpus/core/src/agent/engine/anthropic-engine.ts +2 -4
- package/corpus/core/src/agent/engine/builder-engine.ts +5 -7
- 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/harness/ai-sdk-adapter.ts +6 -1
- package/corpus/core/src/agent/harness/background.ts +96 -19
- package/corpus/core/src/agent/harness/index.ts +11 -0
- package/corpus/core/src/agent/harness/lifecycle.ts +498 -0
- package/corpus/core/src/agent/harness/runner.ts +38 -0
- package/corpus/core/src/agent/harness/store.ts +22 -3
- package/corpus/core/src/agent/model-config.ts +4 -1
- package/corpus/core/src/agent/production-agent.ts +205 -9
- package/corpus/core/src/agent/run-manager.ts +135 -11
- package/corpus/core/src/agent/run-store.ts +225 -15
- package/corpus/core/src/agent/types.ts +23 -0
- package/corpus/core/src/application-state/index.ts +1 -0
- package/corpus/core/src/application-state/store.ts +32 -0
- package/corpus/core/src/audit/record.ts +31 -0
- package/corpus/core/src/audit/store.ts +69 -3
- package/corpus/core/src/audit/types.ts +13 -0
- package/corpus/core/src/automation/index.ts +802 -0
- package/corpus/core/src/cli/code-agent-connector.ts +263 -8
- package/corpus/core/src/cli/code-agent-executor.ts +15 -1
- package/corpus/core/src/cli/create.ts +12 -5
- package/corpus/core/src/cli/design-connect.ts +596 -36
- package/corpus/core/src/client/AgentPanel.tsx +92 -44
- package/corpus/core/src/client/AssistantChat.tsx +324 -149
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +36 -40
- package/corpus/core/src/client/RunStuckBanner.tsx +69 -20
- package/corpus/core/src/client/agent-chat-adapter.ts +54 -5
- package/corpus/core/src/client/appearance.ts +8 -5
- package/corpus/core/src/client/automation.ts +22 -0
- package/corpus/core/src/client/chat/connectors.ts +293 -29
- package/corpus/core/src/client/chat/message-components.tsx +23 -1
- package/corpus/core/src/client/chat/run-recovery.tsx +67 -50
- package/corpus/core/src/client/chat/runtime.ts +126 -25
- package/corpus/core/src/client/chat/tool-call-display.tsx +45 -4
- package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +294 -0
- package/corpus/core/src/client/composer/TiptapComposer.tsx +29 -20
- package/corpus/core/src/client/composer/VoiceButton.tsx +20 -0
- package/corpus/core/src/client/composer/index.ts +22 -0
- package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +640 -0
- package/corpus/core/src/client/guided-questions.tsx +12 -3
- package/corpus/core/src/client/index.ts +48 -0
- package/corpus/core/src/client/integrations/api.ts +295 -0
- package/corpus/core/src/client/integrations/index.ts +26 -0
- package/corpus/core/src/client/settings/DemoModeSection.tsx +4 -3
- package/corpus/core/src/client/settings/SettingsPanel.tsx +4 -0
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +95 -37
- package/corpus/core/src/client/transcription/use-live-transcription.ts +68 -5
- package/corpus/core/src/client/use-chat-models.ts +17 -17
- package/corpus/core/src/client/use-db-sync.ts +108 -7
- package/corpus/core/src/client/use-run-stuck-detection.ts +41 -3
- package/corpus/core/src/code-agents/background-controller.ts +18 -0
- package/corpus/core/src/collab/ydoc-manager.ts +41 -6
- package/corpus/core/src/db/migrations.ts +17 -1
- package/corpus/core/src/demo/fetch-interceptor.ts +16 -11
- package/corpus/core/src/deploy/build.ts +59 -3
- package/corpus/core/src/deploy/workspace-deploy.ts +37 -2
- package/corpus/core/src/file-upload/types.ts +2 -0
- package/corpus/core/src/index.ts +37 -0
- package/corpus/core/src/integrations/a2a-continuations-store.ts +6 -4
- package/corpus/core/src/integrations/adapters/discord.ts +362 -0
- package/corpus/core/src/integrations/adapters/index.ts +29 -0
- package/corpus/core/src/integrations/adapters/microsoft-teams.ts +411 -0
- package/corpus/core/src/integrations/adapters/slack.ts +900 -27
- package/corpus/core/src/integrations/adapters/telegram.ts +54 -15
- package/corpus/core/src/integrations/adapters/whatsapp.ts +41 -17
- package/corpus/core/src/integrations/awaiting-input-store.ts +130 -0
- package/corpus/core/src/integrations/catalog.ts +571 -0
- package/corpus/core/src/integrations/computer-supervision-store.ts +423 -0
- package/corpus/core/src/integrations/computer-supervision.ts +213 -0
- package/corpus/core/src/integrations/controls-store.ts +187 -0
- package/corpus/core/src/integrations/index.ts +129 -1
- package/corpus/core/src/integrations/installations-store.ts +677 -0
- package/corpus/core/src/integrations/integration-memory.ts +187 -0
- package/corpus/core/src/integrations/pending-tasks-retry-job.ts +6 -6
- package/corpus/core/src/integrations/pending-tasks-store.ts +83 -5
- package/corpus/core/src/integrations/plugin.ts +916 -49
- package/corpus/core/src/integrations/remote-commands-store.ts +334 -3
- package/corpus/core/src/integrations/remote-devices-store.ts +68 -9
- package/corpus/core/src/integrations/remote-json-safety.ts +127 -0
- package/corpus/core/src/integrations/remote-run-events-store.ts +104 -19
- package/corpus/core/src/integrations/remote-types.ts +66 -3
- package/corpus/core/src/integrations/scope-store.ts +498 -0
- package/corpus/core/src/integrations/slack-manifest.ts +78 -0
- package/corpus/core/src/integrations/slack-oauth.ts +343 -0
- package/corpus/core/src/integrations/types.ts +179 -0
- package/corpus/core/src/integrations/usage-budget-store.ts +906 -0
- package/corpus/core/src/integrations/webhook-handler.ts +723 -53
- package/corpus/core/src/jobs/scheduler.ts +100 -2
- package/corpus/core/src/jobs/tools.ts +45 -9
- package/corpus/core/src/localization/default-messages.ts +28 -0
- package/corpus/core/src/mcp-client/config.ts +48 -2
- package/corpus/core/src/mcp-client/index.ts +35 -2
- package/corpus/core/src/mcp-client/tool-policy.ts +182 -0
- package/corpus/core/src/provider-api/index.ts +72 -1
- package/corpus/core/src/resources/handlers.ts +88 -14
- package/corpus/core/src/resources/script-helpers.ts +36 -7
- package/corpus/core/src/resources/store.ts +59 -52
- package/corpus/core/src/scripts/call-agent.ts +107 -1
- package/corpus/core/src/secrets/register-framework-secrets.ts +27 -4
- package/corpus/core/src/server/agent-chat-plugin.ts +356 -127
- package/corpus/core/src/server/auth.ts +10 -14
- package/corpus/core/src/server/builder-design-systems.ts +16 -1
- package/corpus/core/src/server/edge.ts +18 -0
- package/corpus/core/src/server/index.ts +42 -0
- package/corpus/core/src/server/realtime-voice.ts +590 -0
- package/corpus/core/src/server/request-context.ts +18 -0
- package/corpus/core/src/server/social-og-image.ts +3 -2
- package/corpus/core/src/shared/reasoning-effort.ts +61 -19
- package/corpus/core/src/styles/agent-conversation.css +17 -0
- package/corpus/core/src/styles/agent-native.css +62 -44
- package/corpus/core/src/templates/default/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/core/src/templates/default/AGENTS.md +7 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/core/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +6 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +25 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +15 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -5
- package/corpus/core/src/templates/workspace-core/AGENTS.md +3 -2
- package/corpus/core/src/usage/store.ts +37 -2
- package/corpus/templates/analytics/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/analytics/.agents/skills/provider-api/SKILL.md +23 -0
- package/corpus/templates/analytics/.builder/skills/provider-api/SKILL.md +15 -0
- package/corpus/templates/analytics/actions/save-monitor.ts +25 -2
- package/corpus/templates/analytics/app/lib/data-sources.ts +28 -0
- package/corpus/templates/analytics/changelog/2026-07-10-agent-created-uptime-monitors-now-return-a-direct-link-to-th.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-10-dashboard-email-reports-still-arrive-when-screenshot-capture-temporarily-fails.md +6 -0
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +3 -7
- package/corpus/templates/analytics/server/lib/credential-keys.ts +12 -0
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +5 -1
- package/corpus/templates/analytics/server/lib/provider-credentials.ts +2 -0
- package/corpus/templates/analytics/server/routes/api/test-connection.post.ts +16 -0
- package/corpus/templates/assets/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/brain/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/brain/app/lib/settings-navigation.ts +22 -0
- package/corpus/templates/brain/app/routes/settings.tsx +367 -252
- package/corpus/templates/brain/changelog/2026-07-10-brain-settings-now-separate-assistant-behavior-publishing-re.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-10-organization-settings-now-opens-directly-from-the-workspace-.md +6 -0
- package/corpus/templates/calendar/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/calendar/.agents/skills/event-management/SKILL.md +36 -4
- package/corpus/templates/calendar/AGENTS.md +4 -0
- package/corpus/templates/calendar/actions/create-event.ts +7 -19
- package/corpus/templates/calendar/actions/delete-event.ts +10 -3
- package/corpus/templates/calendar/actions/rsvp-event.ts +1 -1
- package/corpus/templates/calendar/actions/update-event.ts +4 -3
- package/corpus/templates/calendar/app/components/calendar/CommandPalette.tsx +98 -108
- package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +100 -13
- package/corpus/templates/calendar/app/components/calendar/DayView.tsx +12 -4
- package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +97 -90
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +3 -3
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +86 -8
- package/corpus/templates/calendar/app/components/calendar/EventDialog.tsx +3 -1
- package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +12 -4
- package/corpus/templates/calendar/app/hooks/use-events.ts +1 -0
- package/corpus/templates/calendar/app/lib/event-account-selection.ts +36 -0
- package/corpus/templates/calendar/app/lib/event-form-initialization.ts +21 -0
- package/corpus/templates/calendar/app/lib/event-mutation-inputs.ts +18 -0
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +119 -26
- package/corpus/templates/calendar/changelog/2026-07-10-choose-which-connected-google-account-receives-a-new-event-w.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-10-event-guest-details-and-option-menus-now-use-valid-accessibl.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-10-natural-language-event-phrases-stay-available-as-quick-creat.md +6 -0
- package/corpus/templates/calendar/server/db/schema.ts +2 -0
- package/corpus/templates/calendar/server/handlers/bookings.ts +43 -6
- package/corpus/templates/calendar/server/handlers/events.ts +28 -9
- package/corpus/templates/calendar/server/lib/google-calendar.ts +66 -38
- package/corpus/templates/calendar/server/plugins/db.ts +5 -0
- package/corpus/templates/chat/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
- package/corpus/templates/clips/.agents/skills/ai-video-tools/SKILL.md +12 -3
- package/corpus/templates/clips/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +1 -1
- package/corpus/templates/clips/.agents/skills/recording/SKILL.md +17 -1
- package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +8 -0
- package/corpus/templates/clips/AGENTS.md +12 -5
- package/corpus/templates/clips/actions/finalize-recording.ts +63 -23
- package/corpus/templates/clips/actions/get-recording-player-data.ts +6 -2
- package/corpus/templates/clips/actions/lib/ensure-seekable-video.ts +72 -9
- package/corpus/templates/clips/actions/list-recordings.ts +19 -3
- package/corpus/templates/clips/actions/navigate.ts +2 -0
- package/corpus/templates/clips/actions/regenerate-title.ts +53 -7
- package/corpus/templates/clips/actions/reprocess-recording.ts +20 -6
- package/corpus/templates/clips/actions/request-transcript.ts +168 -72
- package/corpus/templates/clips/actions/save-browser-transcript.ts +11 -9
- package/corpus/templates/clips/actions/view-screen.ts +57 -5
- package/corpus/templates/clips/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/clips/app/components/library/empty-state.tsx +2 -0
- package/corpus/templates/clips/app/components/library/library-grid.tsx +69 -42
- package/corpus/templates/clips/app/components/library/library-layout.tsx +15 -1
- package/corpus/templates/clips/app/components/library/recording-card.tsx +81 -68
- package/corpus/templates/clips/app/components/library/search-bar.tsx +4 -3
- package/corpus/templates/clips/app/components/player/comments-panel.tsx +101 -53
- package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +9 -3
- package/corpus/templates/clips/app/components/player/playback-comment-overlay.tsx +102 -0
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/player/video-player.tsx +10 -1
- package/corpus/templates/clips/app/hooks/use-auto-title.ts +14 -0
- package/corpus/templates/clips/app/hooks/use-library.ts +1 -1
- package/corpus/templates/clips/app/hooks/use-navigation-state.ts +10 -2
- package/corpus/templates/clips/app/i18n/ar-SA.ts +7 -1
- package/corpus/templates/clips/app/i18n/de-DE.ts +7 -1
- package/corpus/templates/clips/app/i18n/en-US.ts +7 -1
- package/corpus/templates/clips/app/i18n/es-ES.ts +7 -1
- package/corpus/templates/clips/app/i18n/fr-FR.ts +7 -1
- package/corpus/templates/clips/app/i18n/hi-IN.ts +7 -1
- package/corpus/templates/clips/app/i18n/ja-JP.ts +7 -1
- package/corpus/templates/clips/app/i18n/ko-KR.ts +7 -1
- package/corpus/templates/clips/app/i18n/pt-BR.ts +7 -1
- package/corpus/templates/clips/app/i18n/zh-CN.ts +8 -1
- package/corpus/templates/clips/app/i18n/zh-TW.ts +8 -1
- package/corpus/templates/clips/app/lib/recording-visibility.ts +70 -0
- package/corpus/templates/clips/app/routes/_app.shared.tsx +20 -0
- package/corpus/templates/clips/app/routes/download.tsx +24 -8
- package/corpus/templates/clips/app/routes/embed.$shareId.tsx +2 -0
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +115 -2
- package/corpus/templates/clips/app/routes/record.tsx +62 -0
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +25 -16
- package/corpus/templates/clips/changelog/2026-07-10-clips-desktop-is-now-available-for-linux-with-appimage-debia.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-clips-downloads-updates-sooner-in-the-background-and-offers-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-clips-shared-with-you-now-appear-in-a-searchable-shared-with.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-clips-with-missing-mobile-video-frames-can-be-repaired-witho.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-comment-replies-now-open-inline-and-focus-immediately-while-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-dismissed-upload-warnings-now-keep-recordings-in-clip-drafts.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-dragging-the-meeting-recorder-no-longer-opens-the-expanded.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-finishing-meeting-notes-no-longer-opens-your-browser.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-meeting-recordings-now-keep-microphone-audio-and-recover-tra.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-mobile-camera-recordings-pause-while-backgrounded.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-mp4-downloads-now-show-progress-immediately-after-the-option.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-recording-pages-now-open-as-soon-as-you-stop-with-a-share-li.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-recording-pause-and-resume-controls-now-respond-reliably-on-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-recordings-now-seek-smoothly-downloads-use-the-correct-file-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-s3-compatible-storage-now-saves-hosted-recordings-without-re.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-starting-and-joining-a-meeting-now-closes-the-desktop-popover.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-timestamped-comments-now-appear-over-the-video-as-playback-r.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-transcript-backed-titles-and-summaries-now-finish-after-recording.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-zoom-meetings-now-open-directly-in-the-desktop-app.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/overlay.ts +49 -7
- package/corpus/templates/clips/desktop/README.md +22 -6
- package/corpus/templates/clips/desktop/package.json +1 -1
- package/corpus/templates/clips/desktop/src/app.tsx +102 -61
- package/corpus/templates/clips/desktop/src/components/ReadinessPanel.tsx +15 -9
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +8 -14
- package/corpus/templates/clips/desktop/src/lib/finalization-guard.ts +22 -0
- package/corpus/templates/clips/desktop/src/lib/meeting-join-url.ts +33 -0
- package/corpus/templates/clips/desktop/src/lib/pause-transition.ts +79 -0
- package/corpus/templates/clips/desktop/src/lib/permissions.ts +3 -1
- package/corpus/templates/clips/desktop/src/lib/pill-interaction.ts +19 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +187 -159
- package/corpus/templates/clips/desktop/src/lib/transcription-engine.ts +3 -2
- package/corpus/templates/clips/desktop/src/lib/updater.ts +26 -4
- package/corpus/templates/clips/desktop/src/overlays/finalizing.tsx +4 -8
- package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +3 -2
- package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +32 -6
- package/corpus/templates/clips/desktop/src/overlays/toolbar.tsx +50 -5
- package/corpus/templates/clips/desktop/src/styles.css +11 -19
- package/corpus/templates/clips/desktop/src-tauri/Cargo.toml +1 -1
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +2 -2
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +2 -1
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +121 -4
- package/corpus/templates/clips/desktop/src-tauri/src/native_speech.rs +97 -17
- package/corpus/templates/clips/desktop/src-tauri/src/permission_status.rs +11 -7
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +80 -5
- package/corpus/templates/clips/desktop/src-tauri/tauri.conf.json +1 -1
- package/corpus/templates/clips/desktop/src-tauri/tauri.linux.conf.json +11 -0
- package/corpus/templates/clips/netlify.toml +3 -0
- package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +106 -0
- package/corpus/templates/clips/server/lib/public-agent-context.ts +9 -1
- package/corpus/templates/clips/server/lib/resumable-upload-provider.ts +52 -0
- package/corpus/templates/clips/server/lib/s3-upload-provider.ts +433 -85
- package/corpus/templates/clips/server/lib/video-remux.ts +114 -0
- package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +109 -0
- package/corpus/templates/clips/server/routes/api/clips-updater.json.get.ts +22 -11
- package/corpus/templates/clips/server/routes/api/public-recording.get.ts +4 -2
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +47 -5
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +10 -2
- package/corpus/templates/clips/shared/share-loader-response.ts +12 -0
- package/corpus/templates/clips/shared/transcript-status.ts +40 -0
- package/corpus/templates/clips/vitest.config.ts +23 -0
- package/corpus/templates/content/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/content/.agents/skills/content/SKILL.md +57 -5
- package/corpus/templates/content/AGENTS.md +65 -55
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +10 -16
- package/corpus/templates/content/actions/_database-source-utils.ts +58 -11
- package/corpus/templates/content/actions/_property-utils.ts +30 -2
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +312 -114
- package/corpus/templates/content/actions/submit-content-database-form.ts +497 -0
- package/corpus/templates/content/actions/update-content-database-view.ts +8 -1
- package/corpus/templates/content/actions/view-screen.ts +4 -1
- package/corpus/templates/content/agent-native.app-skill.json +1 -1
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +28 -9
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +250 -64
- package/corpus/templates/content/app/components/editor/database/FormView.tsx +460 -0
- package/corpus/templates/content/app/components/editor/database/navigation-state.ts +3 -0
- package/corpus/templates/content/app/components/editor/database/settings.tsx +30 -37
- package/corpus/templates/content/app/components/editor/database/shared.tsx +2 -0
- package/corpus/templates/content/app/components/editor/database/view-config.ts +29 -1
- package/corpus/templates/content/app/components/ui/textarea.tsx +1 -0
- package/corpus/templates/content/app/hooks/use-content-database.ts +22 -0
- package/corpus/templates/content/app/i18n/zh-TW.ts +21 -0
- package/corpus/templates/content/app/i18n-data.ts +225 -0
- package/corpus/templates/content/changelog/2026-07-10-builder-backed-properties-now-load-current-source-values-as-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-builder-database-refreshes-now-stay-explicit-and-accurate.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-database-form-views-now-collect-ordered-required-answers-and.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-database-tables-now-use-a-quieter-more-compact-layout-with-c.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-open-documents-no-longer-make-constant-background-requests-w.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-slack-intake-routes-to-content-database-forms.md +6 -0
- package/corpus/templates/content/parity/matrix.md +1 -0
- package/corpus/templates/content/parity/matrix.ts +18 -0
- package/corpus/templates/content/shared/api.ts +27 -1
- package/corpus/templates/content/shared/database-form.ts +53 -0
- package/corpus/templates/design/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +26 -0
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +106 -16
- package/corpus/templates/design/AGENTS.md +79 -18
- package/corpus/templates/design/DESIGN.md +1 -1
- package/corpus/templates/design/DEVELOPING.md +1 -1
- package/corpus/templates/design/FIGMA_INTEROPERABILITY.md +116 -0
- package/corpus/templates/design/actions/create-design-from-template.ts +220 -0
- package/corpus/templates/design/actions/create-design-system.ts +92 -16
- package/corpus/templates/design/actions/delete-design-template.ts +28 -0
- package/corpus/templates/design/actions/delete-file.ts +7 -0
- package/corpus/templates/design/actions/edit-design.ts +3 -0
- package/corpus/templates/design/actions/export-design-as-figma-svg.ts +137 -5
- package/corpus/templates/design/actions/export-pdf.ts +1 -1
- package/corpus/templates/design/actions/generate-design.ts +3 -0
- package/corpus/templates/design/actions/get-design-snapshot.ts +9 -0
- package/corpus/templates/design/actions/get-figma-connection-status.ts +26 -0
- package/corpus/templates/design/actions/get-figma-design-context.ts +138 -0
- package/corpus/templates/design/actions/get-figma-styles.ts +2 -2
- package/corpus/templates/design/actions/import-figma-clipboard.ts +112 -16
- package/corpus/templates/design/actions/import-figma-frame.ts +15 -4
- package/corpus/templates/design/actions/index-design-system-with-builder.ts +4 -0
- package/corpus/templates/design/actions/list-design-templates.ts +118 -0
- package/corpus/templates/design/actions/navigate.ts +16 -2
- package/corpus/templates/design/actions/provider-api-request.ts +11 -1
- package/corpus/templates/design/actions/save-design-as-template.ts +156 -0
- package/corpus/templates/design/actions/set-active-breakpoint.ts +13 -4
- package/corpus/templates/design/actions/take-design-screenshot.ts +73 -3
- package/corpus/templates/design/actions/update-file.ts +39 -22
- package/corpus/templates/design/actions/view-screen.ts +36 -1
- package/corpus/templates/design/actions/write-local-file.ts +50 -38
- package/corpus/templates/design/app/components/design/AutoLayoutSuggestionDialog.tsx +151 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +20 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +383 -29
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +3 -3
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +384 -9
- package/corpus/templates/design/app/components/design/EditPanel.tsx +105 -32
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +131 -46
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +6 -0
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +545 -54
- package/corpus/templates/design/app/components/design/bridge/embedded-wheel.bridge.ts +40 -0
- package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +1 -0
- package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +1 -0
- package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +5 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/create-providers.ts +2 -0
- package/corpus/templates/design/app/components/design/code-workbench/workspace/localhost-provider.ts +3 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/types.ts +2 -0
- package/corpus/templates/design/app/components/design/edit-panel/element-identity.ts +19 -0
- package/corpus/templates/design/app/components/design/edit-panel/frame-presets-panel.tsx +1 -0
- package/corpus/templates/design/app/components/design/edit-panel/interaction-state-helpers.ts +27 -0
- package/corpus/templates/design/app/components/design/inspector/InteractionStatePanel.tsx +137 -81
- package/corpus/templates/design/app/components/design/inspector/frame-size-presets.ts +25 -5
- package/corpus/templates/design/app/components/design/multi-screen/chrome-transitions.ts +1 -1
- package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +350 -3
- package/corpus/templates/design/app/components/design/multi-screen/overview-layout.ts +13 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +22 -1
- package/corpus/templates/design/app/components/design/types.ts +4 -0
- package/corpus/templates/design/app/components/design-system/ProductionDesignSystemShowcase.tsx +208 -0
- package/corpus/templates/design/app/components/editor/FigmaLinkComposerBubble.tsx +321 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +24 -4
- package/corpus/templates/design/app/components/layout/Layout.tsx +16 -2
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/design/app/components/templates/TemplatePreview.tsx +72 -0
- package/corpus/templates/design/app/global.css +2 -35
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +10 -0
- package/corpus/templates/design/app/i18n/zh-TW.ts +127 -5
- package/corpus/templates/design/app/i18n-breakpoints.ts +209 -0
- package/corpus/templates/design/app/i18n-data.ts +1317 -59
- package/corpus/templates/design/app/i18n-template-feature.ts +458 -0
- package/corpus/templates/design/app/lib/clipboard-content-lineage.ts +64 -0
- package/corpus/templates/design/app/lib/design-clipboard-managed-styles.ts +247 -0
- package/corpus/templates/design/app/lib/design-clipboard.ts +259 -0
- package/corpus/templates/design/app/lib/design-file-upload.ts +87 -0
- package/corpus/templates/design/app/lib/design-import.ts +198 -13
- package/corpus/templates/design/app/lib/desktop-design-preview.ts +423 -0
- package/corpus/templates/design/app/lib/figma-clipboard.ts +74 -8
- package/corpus/templates/design/app/lib/figma-connection.ts +161 -0
- package/corpus/templates/design/app/lib/figma-svg-copy.ts +814 -22
- package/corpus/templates/design/app/lib/figma-url.ts +77 -0
- package/corpus/templates/design/app/lib/pending-generation.ts +35 -0
- package/corpus/templates/design/app/pages/DesignSystems.tsx +236 -177
- package/corpus/templates/design/app/pages/Index.tsx +38 -0
- package/corpus/templates/design/app/pages/Templates.tsx +498 -0
- package/corpus/templates/design/app/pages/design-editor/auto-layout-suggestion.ts +328 -0
- package/corpus/templates/design/app/pages/design-editor/clone-idrefs.ts +113 -0
- package/corpus/templates/design/app/pages/design-editor/created-screen-navigation.ts +55 -0
- package/corpus/templates/design/app/pages/design-editor/editor-session.ts +32 -0
- package/corpus/templates/design/app/pages/design-editor/editor-state.ts +49 -2
- package/corpus/templates/design/app/pages/design-editor/export-capture.ts +296 -0
- package/corpus/templates/design/app/pages/design-editor/history.ts +101 -2
- package/corpus/templates/design/app/pages/design-editor/latest-write-queue.ts +56 -0
- package/corpus/templates/design/app/pages/design-editor/layout-operations.ts +28 -1
- package/corpus/templates/design/app/pages/design-editor/overview-camera.ts +34 -0
- package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +202 -6
- package/corpus/templates/design/app/pages/design-editor/pending-structure-verification.ts +92 -0
- package/corpus/templates/design/app/pages/design-editor/performance-buffer-guard.ts +80 -0
- package/corpus/templates/design/app/pages/design-editor/save-failure.ts +58 -0
- package/corpus/templates/design/app/routes/templates.tsx +4 -6
- package/corpus/templates/design/changelog/2026-07-10-app-workspaces-now-use-clean-borderless-main-surfaces-throug.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-ask-chat-what-s-in-a-figma-file-or-frame-structure-screensho.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-canvas-edits-now-reject-malformed-html-before-it-can-corrupt.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-complex-designs-now-export-as-valid-secure-svgs-and-crisp-ra.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-complex-figma-masks-arcs-rich-text-transformed-images-and-ad.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-concurrent-agent-and-artboard-edits-no-longer-show-misleadin.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-copied-layers-paste-across-designs-and-browser-tabs.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-copy-and-download-editable-figma-svg.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-copying-design-text-now-pastes-readable-text-into-other-apps.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-deleted-screens-can-be-restored-with-undo-and-removed-again-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-design-changes-now-save-before-switching-apps-and-retry-when.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-design-stays-usable-on-phones-by-keeping-editor-panels-and-f.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-designs-with-html-examples-inside-alpine-attributes-or-comme.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-download-all-screens-as-one-multi-page-pdf-from-the-overview.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-duplicated-layers-now-keep-labels-aria-relationships-fragmen.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fig-import-results-stay-compact.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-figma-imports-now-load-real-fonts-fix-rotated-gradient-dashe.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-figma-links-in-chat-and-the-import-tab-now-offer-secure-one-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-cmd-z-not-restoring-content-after-an-agent-driven-desi.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-download-pdf-being-unreachable-from-the-export-panel-e.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-dragging-a-layer-out-of-an-auto-layout-row-column-no-l.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-figma-svg-export-text-wrapping-sizing-and-inner-layer.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-hiding-or-locking-one-layer-no-longer-hides-or-blocks-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-png-screenshots-of-tall-screens-being-cropped-to-one-v.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-png-svg-exports-capturing-broken-layout-when-webfonts-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-frame-tool-now-offers-standard-ad-unit-size-presets-medium-r.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-full-view-controls-stay-within-their-frame-instead-of-coveri.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-hover-focus-focus-visible-pressed-and-disabled-states-now-pr.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-interactive-designs-no-longer-appear-blank-in-the-canvas-whe.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-layer-drops-now-land-in-the-intended-grid-row-stay-visually-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-local-code-workspaces-now-keep-unsaved-edits-across-panel-sw.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-local-visual-editing-now-keeps-authenticated-sessions-shared.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-long-overview-editing-sessions-lots-of-pan-zoom-screen-switc.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-long-running-agent-work-no-longer-shows-a-premature-stuck-wa.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-managed-figma-connections-are-recognized-automatically.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-new-designs-can-open-directly-in-the-editor-without-a-pr.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-new-screens-are-selected-and-revealed-immediately.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-new-text-layers-undo-as-one-safe-creation.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-preview-and-apply-inferred-auto-layout-without-changing-yo.md +5 -0
- package/corpus/templates/design/changelog/2026-07-10-print-pdf-exports-and-paper-size-presets-letter-a4-now-match.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-rapid-breakpoint-and-edit-scope-changes-no-longer-jump-back-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-responsive-breakpoint-previews-stay-visible-while-panning-ac.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-responsive-frame-editing.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-reusable-design-templates.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-rich-design-clipboard-markers-are-now-accepted-only-from-the.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-screen-overview-frames-now-use-a-clearer-interact-action-wit.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-start-designs-from-source-linked-material-3-carbon-or-primer.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-tweaks-guidance.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-uploaded-fig-files-can-now-become-editable-design-screens-wi.md +6 -0
- package/corpus/templates/design/e2e/helpers.ts +18 -7
- package/corpus/templates/design/package.json +2 -0
- package/corpus/templates/design/scripts/qa-figma-stress-import.ts +96 -0
- package/corpus/templates/design/server/db/index.ts +10 -0
- package/corpus/templates/design/server/db/schema.ts +44 -0
- package/corpus/templates/design/server/handlers/import-design-file.ts +114 -80
- package/corpus/templates/design/server/handlers/index-design-system-with-builder.ts +19 -6
- package/corpus/templates/design/server/lib/design-export.ts +240 -3
- package/corpus/templates/design/server/lib/design-template-data.ts +89 -0
- package/corpus/templates/design/server/lib/design-to-figma-svg.ts +250 -26
- package/corpus/templates/design/server/lib/fig-file-decoder.ts +839 -0
- package/corpus/templates/design/server/lib/fig-file-import.ts +287 -0
- package/corpus/templates/design/server/lib/fig-file-limits.ts +3 -0
- package/corpus/templates/design/server/lib/fig-file-to-html.ts +2568 -0
- package/corpus/templates/design/server/lib/figma-design-context.ts +359 -0
- package/corpus/templates/design/server/lib/figma-node-import.ts +478 -22
- package/corpus/templates/design/server/lib/figma-node-to-html.ts +554 -29
- package/corpus/templates/design/server/lib/local-figma-qa-upload.ts +112 -0
- package/corpus/templates/design/server/lib/verify-write-grant.ts +16 -2
- package/corpus/templates/design/server/lib/visible-clipboard-html.ts +13 -3
- package/corpus/templates/design/server/plugins/agent-chat.ts +7 -0
- package/corpus/templates/design/server/plugins/db.ts +42 -0
- package/corpus/templates/design/server/plugins/local-figma-qa-upload.ts +7 -0
- package/corpus/templates/design/server/register-secrets.ts +8 -8
- package/corpus/templates/design/server/routes/api/qa-figma-import-assets/[assetId].get.ts +46 -0
- package/corpus/templates/design/server/source-workspace.ts +131 -13
- package/corpus/templates/design/shared/code-layer.ts +105 -28
- package/corpus/templates/design/shared/design-system-templates.ts +301 -0
- package/corpus/templates/design/shared/design-template-presets.ts +195 -0
- package/corpus/templates/design/shared/figma-url.ts +8 -0
- package/corpus/templates/design/shared/html-integrity.ts +401 -0
- package/corpus/templates/design/shared/interaction-states.ts +318 -23
- package/corpus/templates/design/shared/locked-layers.ts +151 -0
- package/corpus/templates/dispatch/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/dispatch/AGENTS.md +10 -2
- package/corpus/templates/dispatch/actions/view-screen.ts +11 -0
- package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +13 -0
- package/corpus/templates/dispatch/app/i18n/zh-TW.ts +51 -0
- package/corpus/templates/dispatch/app/i18n-data.ts +572 -1
- package/corpus/templates/dispatch/app/routes/operations.tsx +1 -0
- package/corpus/templates/dispatch/changelog/2026-07-10-connect-slack-workspaces-with-oauth-and-manage-channel-ident.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-10-dispatch-now-has-a-cleaner-chat-history-and-quieter-sidebar-.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-10-microsoft-teams-bots-and-discord-slash-commands-can-now-conn.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-10-operations-console-brings-agent-monitoring-and-database-inspection-tog.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-10-slack-and-telegram-now-route-uptime-monitor-requests-to-anal.md +6 -0
- package/corpus/templates/forms/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/forms/.agents/skills/form-publishing/SKILL.md +7 -0
- package/corpus/templates/forms/AGENTS.md +4 -0
- package/corpus/templates/forms/actions/create-form.ts +44 -7
- package/corpus/templates/forms/actions/lib/assert-publishable-form.ts +38 -0
- package/corpus/templates/forms/actions/patch-form-fields.ts +4 -0
- package/corpus/templates/forms/actions/update-form.ts +2 -36
- package/corpus/templates/forms/app/i18n/ar-SA.ts +3 -0
- package/corpus/templates/forms/app/i18n/de-DE.ts +3 -0
- package/corpus/templates/forms/app/i18n/en-US.ts +3 -0
- package/corpus/templates/forms/app/i18n/es-ES.ts +3 -0
- package/corpus/templates/forms/app/i18n/fr-FR.ts +3 -0
- package/corpus/templates/forms/app/i18n/hi-IN.ts +3 -0
- package/corpus/templates/forms/app/i18n/ja-JP.ts +3 -0
- package/corpus/templates/forms/app/i18n/ko-KR.ts +3 -0
- package/corpus/templates/forms/app/i18n/pt-BR.ts +3 -0
- package/corpus/templates/forms/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/forms/app/i18n/zh-TW.ts +3 -0
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +17 -0
- package/corpus/templates/forms/changelog/2026-07-10-agent-created-published-forms-now-return-the-anonymous-publi.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-10-published-forms-can-no-longer-be-edited-into-an-unusable-emp.md +6 -0
- package/corpus/templates/forms/server/handlers/submissions.ts +4 -3
- package/corpus/templates/forms/server/plugins/agent-chat.ts +1 -0
- package/corpus/templates/forms/shared/types.ts +5 -0
- package/corpus/templates/mail/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/mail/actions/get-integration-statuses.ts +36 -0
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +3 -2
- package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +3 -3
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +2 -2
- package/corpus/templates/mail/app/hooks/use-apollo.ts +5 -71
- package/corpus/templates/mail/app/hooks/use-draft-queue.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-integrations.ts +51 -48
- package/corpus/templates/mail/app/lib/integration-status.ts +31 -0
- package/corpus/templates/mail/app/lib/sync-invalidation.ts +5 -0
- package/corpus/templates/mail/app/pages/SettingsPage.tsx +3 -0
- package/corpus/templates/mail/app/root.tsx +22 -12
- package/corpus/templates/mail/changelog/2026-07-10-email-content-backgrounds-now-blend-cleanly-with-dark-mode.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-10-mail-navigation-now-uses-a-clean-borderless-drawer.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-10-mail-settings-now-group-drafting-automation-and-connected-se.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-10-organization-settings-now-opens-directly-from-the-workspace-.md +6 -0
- package/corpus/templates/plan/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/plan/app/lib/plan-local-bridge.ts +4 -1
- package/corpus/templates/plan/changelog/2026-07-10-local-plans-now-keep-valid-content-visible-when-one-generate.md +6 -0
- package/corpus/templates/plan/server/lib/local-plan-files.ts +4 -1
- package/corpus/templates/slides/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/dist/a2a/artifact-response.d.ts.map +1 -1
- package/dist/a2a/artifact-response.js +88 -2
- package/dist/a2a/artifact-response.js.map +1 -1
- package/dist/a2a/client.d.ts +9 -0
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +1 -0
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/handlers.d.ts.map +1 -1
- package/dist/a2a/handlers.js +24 -69
- package/dist/a2a/handlers.js.map +1 -1
- package/dist/a2a/types.d.ts +2 -0
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/agent/context-xray/tokenize.d.ts.map +1 -1
- package/dist/agent/context-xray/tokenize.js +6 -1
- package/dist/agent/context-xray/tokenize.js.map +1 -1
- package/dist/agent/durable-background.d.ts +11 -0
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +17 -0
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.js +8 -3
- package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
- package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
- package/dist/agent/engine/anthropic-engine.js +2 -4
- package/dist/agent/engine/anthropic-engine.js.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +2 -3
- package/dist/agent/engine/builder-engine.js.map +1 -1
- 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 +13 -0
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +33 -0
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/harness/ai-sdk-adapter.d.ts.map +1 -1
- package/dist/agent/harness/ai-sdk-adapter.js +3 -1
- package/dist/agent/harness/ai-sdk-adapter.js.map +1 -1
- package/dist/agent/harness/background.d.ts +9 -9
- package/dist/agent/harness/background.d.ts.map +1 -1
- package/dist/agent/harness/background.js +77 -19
- package/dist/agent/harness/background.js.map +1 -1
- package/dist/agent/harness/index.d.ts +1 -0
- package/dist/agent/harness/index.d.ts.map +1 -1
- package/dist/agent/harness/index.js +1 -0
- package/dist/agent/harness/index.js.map +1 -1
- package/dist/agent/harness/lifecycle.d.ts +45 -0
- package/dist/agent/harness/lifecycle.d.ts.map +1 -0
- package/dist/agent/harness/lifecycle.js +318 -0
- package/dist/agent/harness/lifecycle.js.map +1 -0
- package/dist/agent/harness/runner.d.ts.map +1 -1
- package/dist/agent/harness/runner.js +29 -1
- package/dist/agent/harness/runner.js.map +1 -1
- package/dist/agent/harness/store.d.ts +2 -0
- package/dist/agent/harness/store.d.ts.map +1 -1
- package/dist/agent/harness/store.js +17 -3
- package/dist/agent/harness/store.js.map +1 -1
- package/dist/agent/model-config.d.ts +2 -2
- package/dist/agent/model-config.d.ts.map +1 -1
- package/dist/agent/model-config.js +4 -1
- package/dist/agent/model-config.js.map +1 -1
- package/dist/agent/production-agent.d.ts +40 -2
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +150 -9
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts +44 -2
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +90 -9
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/run-store.d.ts +109 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +206 -15
- package/dist/agent/run-store.js.map +1 -1
- package/dist/agent/types.d.ts +22 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/application-state/index.d.ts +1 -1
- package/dist/application-state/index.d.ts.map +1 -1
- package/dist/application-state/index.js +1 -1
- package/dist/application-state/index.js.map +1 -1
- package/dist/application-state/store.d.ts +6 -0
- package/dist/application-state/store.d.ts.map +1 -1
- package/dist/application-state/store.js +31 -0
- package/dist/application-state/store.js.map +1 -1
- package/dist/audit/record.d.ts.map +1 -1
- package/dist/audit/record.js +29 -0
- package/dist/audit/record.js.map +1 -1
- package/dist/audit/store.d.ts.map +1 -1
- package/dist/audit/store.js +62 -3
- package/dist/audit/store.js.map +1 -1
- package/dist/audit/types.d.ts +13 -0
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js.map +1 -1
- package/dist/automation/index.d.ts +193 -0
- package/dist/automation/index.d.ts.map +1 -0
- package/dist/automation/index.js +464 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/cli/code-agent-connector.d.ts +9 -0
- package/dist/cli/code-agent-connector.d.ts.map +1 -1
- package/dist/cli/code-agent-connector.js +212 -10
- package/dist/cli/code-agent-connector.js.map +1 -1
- package/dist/cli/code-agent-executor.d.ts +2 -0
- package/dist/cli/code-agent-executor.d.ts.map +1 -1
- package/dist/cli/code-agent-executor.js +8 -1
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +10 -3
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +492 -35
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +7 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +38 -13
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +21 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +147 -49
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +17 -38
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/RunStuckBanner.d.ts +14 -1
- package/dist/client/RunStuckBanner.d.ts.map +1 -1
- package/dist/client/RunStuckBanner.js +35 -7
- package/dist/client/RunStuckBanner.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts +4 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +49 -4
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/appearance.d.ts +4 -2
- package/dist/client/appearance.d.ts.map +1 -1
- package/dist/client/appearance.js +8 -5
- package/dist/client/appearance.js.map +1 -1
- package/dist/client/automation.d.ts +14 -0
- package/dist/client/automation.d.ts.map +1 -0
- package/dist/client/automation.js +9 -0
- package/dist/client/automation.js.map +1 -0
- package/dist/client/chat/connectors.d.ts.map +1 -1
- package/dist/client/chat/connectors.js +206 -28
- package/dist/client/chat/connectors.js.map +1 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +17 -1
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/run-recovery.d.ts +4 -0
- package/dist/client/chat/run-recovery.d.ts.map +1 -1
- package/dist/client/chat/run-recovery.js +12 -10
- package/dist/client/chat/run-recovery.js.map +1 -1
- package/dist/client/chat/runtime.d.ts.map +1 -1
- package/dist/client/chat/runtime.js +84 -24
- package/dist/client/chat/runtime.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +8 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +21 -3
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.d.ts +54 -0
- package/dist/client/composer/RealtimeVoiceMode.d.ts.map +1 -0
- package/dist/client/composer/RealtimeVoiceMode.js +63 -0
- package/dist/client/composer/RealtimeVoiceMode.js.map +1 -0
- package/dist/client/composer/TiptapComposer.d.ts +1 -0
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +25 -20
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/VoiceButton.d.ts.map +1 -1
- package/dist/client/composer/VoiceButton.js +9 -0
- package/dist/client/composer/VoiceButton.js.map +1 -1
- package/dist/client/composer/index.d.ts +2 -0
- package/dist/client/composer/index.d.ts.map +1 -1
- package/dist/client/composer/index.js +2 -0
- package/dist/client/composer/index.js.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.d.ts +56 -0
- package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +1 -0
- package/dist/client/composer/useRealtimeVoiceMode.js +492 -0
- package/dist/client/composer/useRealtimeVoiceMode.js.map +1 -0
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +7 -2
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +3 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/integrations/api.d.ts +115 -0
- package/dist/client/integrations/api.d.ts.map +1 -0
- package/dist/client/integrations/api.js +123 -0
- package/dist/client/integrations/api.js.map +1 -0
- package/dist/client/integrations/index.d.ts +1 -0
- package/dist/client/integrations/index.d.ts.map +1 -1
- package/dist/client/integrations/index.js +1 -0
- package/dist/client/integrations/index.js.map +1 -1
- package/dist/client/settings/DemoModeSection.d.ts.map +1 -1
- package/dist/client/settings/DemoModeSection.js +4 -3
- package/dist/client/settings/DemoModeSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +4 -0
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts +10 -3
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
- package/dist/client/settings/SettingsTabsPage.js +49 -11
- package/dist/client/settings/SettingsTabsPage.js.map +1 -1
- package/dist/client/transcription/use-live-transcription.d.ts.map +1 -1
- package/dist/client/transcription/use-live-transcription.js +59 -5
- package/dist/client/transcription/use-live-transcription.js.map +1 -1
- package/dist/client/use-chat-models.d.ts.map +1 -1
- package/dist/client/use-chat-models.js +6 -14
- package/dist/client/use-chat-models.js.map +1 -1
- package/dist/client/use-db-sync.d.ts.map +1 -1
- package/dist/client/use-db-sync.js +87 -7
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/client/use-run-stuck-detection.d.ts +16 -1
- package/dist/client/use-run-stuck-detection.d.ts.map +1 -1
- package/dist/client/use-run-stuck-detection.js +23 -4
- package/dist/client/use-run-stuck-detection.js.map +1 -1
- package/dist/code-agents/background-controller.d.ts +1 -1
- package/dist/code-agents/background-controller.d.ts.map +1 -1
- package/dist/code-agents/background-controller.js +17 -1
- package/dist/code-agents/background-controller.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/ydoc-manager.d.ts +9 -1
- package/dist/collab/ydoc-manager.d.ts.map +1 -1
- package/dist/collab/ydoc-manager.js +30 -6
- package/dist/collab/ydoc-manager.js.map +1 -1
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/migrations.js +4 -2
- package/dist/db/migrations.js.map +1 -1
- package/dist/demo/fetch-interceptor.d.ts +5 -1
- package/dist/demo/fetch-interceptor.d.ts.map +1 -1
- package/dist/demo/fetch-interceptor.js +16 -12
- package/dist/demo/fetch-interceptor.js.map +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +49 -4
- package/dist/deploy/build.js.map +1 -1
- package/dist/deploy/workspace-deploy.d.ts.map +1 -1
- package/dist/deploy/workspace-deploy.js +31 -2
- package/dist/deploy/workspace-deploy.js.map +1 -1
- package/dist/file-upload/types.d.ts +2 -0
- package/dist/file-upload/types.d.ts.map +1 -1
- package/dist/file-upload/types.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/a2a-continuations-store.d.ts.map +1 -1
- package/dist/integrations/a2a-continuations-store.js +6 -4
- package/dist/integrations/a2a-continuations-store.js.map +1 -1
- package/dist/integrations/adapters/discord.d.ts +3 -0
- package/dist/integrations/adapters/discord.d.ts.map +1 -0
- package/dist/integrations/adapters/discord.js +261 -0
- package/dist/integrations/adapters/discord.js.map +1 -0
- package/dist/integrations/adapters/index.d.ts +4 -0
- package/dist/integrations/adapters/index.d.ts.map +1 -0
- package/dist/integrations/adapters/index.js +26 -0
- package/dist/integrations/adapters/index.js.map +1 -0
- package/dist/integrations/adapters/microsoft-teams.d.ts +5 -0
- package/dist/integrations/adapters/microsoft-teams.d.ts.map +1 -0
- package/dist/integrations/adapters/microsoft-teams.js +295 -0
- package/dist/integrations/adapters/microsoft-teams.js.map +1 -0
- package/dist/integrations/adapters/slack.d.ts +10 -2
- package/dist/integrations/adapters/slack.d.ts.map +1 -1
- package/dist/integrations/adapters/slack.js +772 -27
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/integrations/adapters/telegram.d.ts +0 -2
- package/dist/integrations/adapters/telegram.d.ts.map +1 -1
- package/dist/integrations/adapters/telegram.js +49 -15
- package/dist/integrations/adapters/telegram.js.map +1 -1
- package/dist/integrations/adapters/whatsapp.d.ts +0 -2
- package/dist/integrations/adapters/whatsapp.d.ts.map +1 -1
- package/dist/integrations/adapters/whatsapp.js +40 -17
- package/dist/integrations/adapters/whatsapp.js.map +1 -1
- package/dist/integrations/awaiting-input-store.d.ts +27 -0
- package/dist/integrations/awaiting-input-store.d.ts.map +1 -0
- package/dist/integrations/awaiting-input-store.js +112 -0
- package/dist/integrations/awaiting-input-store.js.map +1 -0
- package/dist/integrations/catalog.d.ts +75 -0
- package/dist/integrations/catalog.d.ts.map +1 -0
- package/dist/integrations/catalog.js +451 -0
- package/dist/integrations/catalog.js.map +1 -0
- package/dist/integrations/computer-supervision-store.d.ts +65 -0
- package/dist/integrations/computer-supervision-store.d.ts.map +1 -0
- package/dist/integrations/computer-supervision-store.js +296 -0
- package/dist/integrations/computer-supervision-store.js.map +1 -0
- package/dist/integrations/computer-supervision.d.ts +11 -0
- package/dist/integrations/computer-supervision.d.ts.map +1 -0
- package/dist/integrations/computer-supervision.js +160 -0
- package/dist/integrations/computer-supervision.js.map +1 -0
- package/dist/integrations/controls-store.d.ts +44 -0
- package/dist/integrations/controls-store.d.ts.map +1 -0
- package/dist/integrations/controls-store.js +129 -0
- package/dist/integrations/controls-store.js.map +1 -0
- package/dist/integrations/index.d.ts +19 -4
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +14 -2
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/installations-store.d.ts +112 -0
- package/dist/integrations/installations-store.d.ts.map +1 -0
- package/dist/integrations/installations-store.js +493 -0
- package/dist/integrations/installations-store.js.map +1 -0
- package/dist/integrations/integration-memory.d.ts +24 -0
- package/dist/integrations/integration-memory.d.ts.map +1 -0
- package/dist/integrations/integration-memory.js +136 -0
- package/dist/integrations/integration-memory.js.map +1 -0
- package/dist/integrations/pending-tasks-retry-job.d.ts.map +1 -1
- package/dist/integrations/pending-tasks-retry-job.js +6 -5
- package/dist/integrations/pending-tasks-retry-job.js.map +1 -1
- package/dist/integrations/pending-tasks-store.d.ts +17 -0
- package/dist/integrations/pending-tasks-store.d.ts.map +1 -1
- package/dist/integrations/pending-tasks-store.js +71 -5
- package/dist/integrations/pending-tasks-store.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +725 -38
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/remote-commands-store.d.ts +15 -1
- package/dist/integrations/remote-commands-store.d.ts.map +1 -1
- package/dist/integrations/remote-commands-store.js +273 -3
- package/dist/integrations/remote-commands-store.js.map +1 -1
- package/dist/integrations/remote-devices-store.d.ts +4 -3
- package/dist/integrations/remote-devices-store.d.ts.map +1 -1
- package/dist/integrations/remote-devices-store.js +49 -2
- package/dist/integrations/remote-devices-store.js.map +1 -1
- package/dist/integrations/remote-json-safety.d.ts +6 -0
- package/dist/integrations/remote-json-safety.d.ts.map +1 -0
- package/dist/integrations/remote-json-safety.js +114 -0
- package/dist/integrations/remote-json-safety.js.map +1 -0
- package/dist/integrations/remote-run-events-store.d.ts +11 -1
- package/dist/integrations/remote-run-events-store.d.ts.map +1 -1
- package/dist/integrations/remote-run-events-store.js +85 -17
- package/dist/integrations/remote-run-events-store.js.map +1 -1
- package/dist/integrations/remote-types.d.ts +54 -3
- package/dist/integrations/remote-types.d.ts.map +1 -1
- package/dist/integrations/remote-types.js.map +1 -1
- package/dist/integrations/scope-store.d.ts +65 -0
- package/dist/integrations/scope-store.d.ts.map +1 -0
- package/dist/integrations/scope-store.js +361 -0
- package/dist/integrations/scope-store.js.map +1 -0
- package/dist/integrations/slack-manifest.d.ts +66 -0
- package/dist/integrations/slack-manifest.d.ts.map +1 -0
- package/dist/integrations/slack-manifest.js +70 -0
- package/dist/integrations/slack-manifest.js.map +1 -0
- package/dist/integrations/slack-oauth.d.ts +99 -0
- package/dist/integrations/slack-oauth.d.ts.map +1 -0
- package/dist/integrations/slack-oauth.js +226 -0
- package/dist/integrations/slack-oauth.js.map +1 -0
- package/dist/integrations/types.d.ts +144 -0
- package/dist/integrations/types.d.ts.map +1 -1
- package/dist/integrations/types.js +16 -1
- package/dist/integrations/types.js.map +1 -1
- package/dist/integrations/usage-budget-store.d.ts +84 -0
- package/dist/integrations/usage-budget-store.d.ts.map +1 -0
- package/dist/integrations/usage-budget-store.js +650 -0
- package/dist/integrations/usage-budget-store.js.map +1 -0
- package/dist/integrations/webhook-handler.d.ts +4 -0
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +548 -51
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/jobs/scheduler.d.ts +6 -0
- package/dist/jobs/scheduler.d.ts.map +1 -1
- package/dist/jobs/scheduler.js +83 -4
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/jobs/tools.d.ts.map +1 -1
- package/dist/jobs/tools.js +43 -11
- package/dist/jobs/tools.js.map +1 -1
- package/dist/localization/default-messages.d.ts +26 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +26 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp-client/config.d.ts.map +1 -1
- package/dist/mcp-client/config.js +44 -3
- package/dist/mcp-client/config.js.map +1 -1
- package/dist/mcp-client/index.d.ts +6 -1
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +11 -3
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/mcp-client/tool-policy.d.ts +24 -0
- package/dist/mcp-client/tool-policy.d.ts.map +1 -0
- package/dist/mcp-client/tool-policy.js +139 -0
- package/dist/mcp-client/tool-policy.js.map +1 -0
- package/dist/observability/routes.d.ts +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/index.d.ts +4 -4
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +72 -1
- package/dist/provider-api/index.js.map +1 -1
- package/dist/resources/handlers.d.ts.map +1 -1
- package/dist/resources/handlers.js +57 -15
- package/dist/resources/handlers.js.map +1 -1
- package/dist/resources/script-helpers.d.ts.map +1 -1
- package/dist/resources/script-helpers.js +34 -8
- package/dist/resources/script-helpers.js.map +1 -1
- package/dist/resources/store.d.ts +10 -0
- package/dist/resources/store.d.ts.map +1 -1
- package/dist/resources/store.js +54 -47
- package/dist/resources/store.js.map +1 -1
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +106 -1
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/secrets/register-framework-secrets.d.ts +3 -4
- package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
- package/dist/secrets/register-framework-secrets.js +25 -4
- package/dist/secrets/register-framework-secrets.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-chat-plugin.d.ts +15 -4
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +300 -118
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +10 -14
- package/dist/server/auth.js.map +1 -1
- package/dist/server/builder-design-systems.d.ts +3 -1
- package/dist/server/builder-design-systems.d.ts.map +1 -1
- package/dist/server/builder-design-systems.js +9 -2
- package/dist/server/builder-design-systems.js.map +1 -1
- package/dist/server/edge.d.ts +1 -1
- package/dist/server/edge.d.ts.map +1 -1
- package/dist/server/edge.js +1 -1
- package/dist/server/edge.js.map +1 -1
- package/dist/server/index.d.ts +4 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +4 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/realtime-voice.d.ts +53 -0
- package/dist/server/realtime-voice.d.ts.map +1 -0
- package/dist/server/realtime-voice.js +404 -0
- package/dist/server/realtime-voice.js.map +1 -0
- package/dist/server/request-context.d.ts +18 -0
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js.map +1 -1
- package/dist/server/social-og-image.d.ts.map +1 -1
- package/dist/server/social-og-image.js +3 -2
- package/dist/server/social-og-image.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/reasoning-effort.d.ts +20 -0
- package/dist/shared/reasoning-effort.d.ts.map +1 -1
- package/dist/shared/reasoning-effort.js +52 -18
- package/dist/shared/reasoning-effort.js.map +1 -1
- package/dist/styles/agent-conversation.css +17 -0
- package/dist/styles/agent-native.css +62 -44
- package/dist/templates/default/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/dist/templates/default/AGENTS.md +7 -3
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/dist/templates/workspace-core/.agents/skills/extension-points/SKILL.md +6 -3
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +25 -0
- package/dist/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +15 -0
- package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -5
- package/dist/templates/workspace-core/AGENTS.md +3 -2
- package/dist/usage/store.d.ts +7 -0
- package/dist/usage/store.d.ts.map +1 -1
- package/dist/usage/store.js +24 -3
- package/dist/usage/store.js.map +1 -1
- package/docs/content/a2a-protocol.mdx +21 -5
- package/docs/content/actions.mdx +9 -23
- package/docs/content/agent-mentions.mdx +31 -29
- package/docs/content/agent-native-toolkit.mdx +15 -6
- package/docs/content/agent-surfaces.mdx +9 -13
- package/docs/content/agent-teams.mdx +1 -0
- package/docs/content/authentication.mdx +10 -3
- package/docs/content/automation-connectors.mdx +123 -0
- package/docs/content/automations.mdx +17 -3
- package/docs/content/blueprint-installer.mdx +11 -4
- package/docs/content/cli-adapters.mdx +9 -6
- package/docs/content/client.mdx +16 -0
- package/docs/content/cloneable-saas.mdx +14 -11
- package/docs/content/code-agents-ui.mdx +65 -0
- package/docs/content/components.mdx +30 -14
- package/docs/content/context-awareness.mdx +27 -15
- package/docs/content/creating-templates.mdx +15 -9
- package/docs/content/cross-app-sso.mdx +16 -6
- package/docs/content/data-programs.mdx +1 -1
- package/docs/content/database.mdx +17 -5
- package/docs/content/deployment.mdx +19 -18
- package/docs/content/dispatch.mdx +6 -2
- package/docs/content/drop-in-agent.mdx +10 -4
- package/docs/content/durable-background-runs.mdx +9 -5
- package/docs/content/durable-resume.mdx +9 -4
- package/docs/content/embedding-sdk.mdx +26 -8
- package/docs/content/evals.mdx +3 -5
- package/docs/content/extensions.mdx +23 -2
- package/docs/content/external-agents.mdx +25 -34
- package/docs/content/faq.mdx +8 -0
- package/docs/content/file-uploads.mdx +12 -3
- package/docs/content/frames.mdx +16 -0
- package/docs/content/generative-ui.mdx +1 -1
- package/docs/content/getting-started.mdx +34 -21
- package/docs/content/harness-agents.mdx +8 -4
- package/docs/content/human-approval.mdx +8 -3
- package/docs/content/internationalization.mdx +9 -4
- package/docs/content/key-concepts.mdx +13 -20
- package/docs/content/local-file-mode.mdx +14 -8
- package/docs/content/locales/ar-SA/actions.mdx +2 -2
- package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +2 -2
- package/docs/content/locales/ar-SA/agent-surfaces.mdx +8 -10
- package/docs/content/locales/ar-SA/agent-teams.mdx +1 -0
- package/docs/content/locales/ar-SA/authentication.mdx +1 -1
- package/docs/content/locales/ar-SA/components.mdx +11 -1
- package/docs/content/locales/ar-SA/creating-templates.mdx +3 -7
- package/docs/content/locales/ar-SA/cross-app-sso.mdx +16 -6
- package/docs/content/locales/ar-SA/deployment.mdx +8 -0
- package/docs/content/locales/ar-SA/extensions.mdx +8 -0
- package/docs/content/locales/ar-SA/external-agents.mdx +2 -7
- package/docs/content/locales/ar-SA/key-concepts.mdx +13 -20
- package/docs/content/locales/ar-SA/messaging.mdx +84 -15
- package/docs/content/locales/ar-SA/multi-tenancy.mdx +5 -5
- package/docs/content/locales/ar-SA/notifications.mdx +18 -10
- package/docs/content/locales/ar-SA/processors.mdx +11 -5
- package/docs/content/locales/ar-SA/server.mdx +17 -10
- package/docs/content/locales/ar-SA/sharing.mdx +10 -10
- package/docs/content/locales/ar-SA/skills-guide.mdx +34 -17
- package/docs/content/locales/ar-SA/template-assets.mdx +16 -13
- package/docs/content/locales/ar-SA/template-brain.mdx +3 -1
- package/docs/content/locales/ar-SA/template-clips.mdx +4 -3
- package/docs/content/locales/ar-SA/template-design.mdx +4 -1
- package/docs/content/locales/ar-SA/template-dispatch.mdx +5 -1
- package/docs/content/locales/ar-SA/template-mail.mdx +8 -0
- package/docs/content/locales/ar-SA/tracking.mdx +9 -6
- package/docs/content/locales/ar-SA/using-your-agent.mdx +0 -7
- package/docs/content/locales/ar-SA/voice-input.mdx +6 -0
- package/docs/content/locales/ar-SA/workspace-connections.mdx +9 -2
- package/docs/content/locales/ar-SA/workspace.mdx +19 -18
- package/docs/content/locales/de-DE/actions.mdx +2 -2
- package/docs/content/locales/de-DE/agent-native-toolkit.mdx +2 -2
- package/docs/content/locales/de-DE/agent-surfaces.mdx +8 -10
- package/docs/content/locales/de-DE/agent-teams.mdx +1 -0
- package/docs/content/locales/de-DE/authentication.mdx +1 -1
- package/docs/content/locales/de-DE/components.mdx +11 -1
- package/docs/content/locales/de-DE/creating-templates.mdx +3 -7
- package/docs/content/locales/de-DE/cross-app-sso.mdx +16 -6
- package/docs/content/locales/de-DE/deployment.mdx +8 -0
- package/docs/content/locales/de-DE/extensions.mdx +10 -0
- package/docs/content/locales/de-DE/external-agents.mdx +3 -7
- package/docs/content/locales/de-DE/key-concepts.mdx +13 -20
- package/docs/content/locales/de-DE/messaging.mdx +92 -15
- package/docs/content/locales/de-DE/multi-tenancy.mdx +5 -5
- package/docs/content/locales/de-DE/notifications.mdx +18 -10
- package/docs/content/locales/de-DE/processors.mdx +11 -5
- package/docs/content/locales/de-DE/server.mdx +18 -10
- package/docs/content/locales/de-DE/sharing.mdx +10 -10
- package/docs/content/locales/de-DE/skills-guide.mdx +34 -17
- package/docs/content/locales/de-DE/template-assets.mdx +16 -13
- package/docs/content/locales/de-DE/template-brain.mdx +3 -1
- package/docs/content/locales/de-DE/template-clips.mdx +4 -3
- package/docs/content/locales/de-DE/template-design.mdx +4 -1
- package/docs/content/locales/de-DE/template-dispatch.mdx +5 -1
- package/docs/content/locales/de-DE/template-mail.mdx +8 -0
- package/docs/content/locales/de-DE/tracking.mdx +9 -6
- package/docs/content/locales/de-DE/using-your-agent.mdx +0 -7
- package/docs/content/locales/de-DE/voice-input.mdx +6 -0
- package/docs/content/locales/de-DE/workspace-connections.mdx +9 -2
- package/docs/content/locales/de-DE/workspace.mdx +19 -18
- package/docs/content/locales/es-ES/actions.mdx +2 -2
- package/docs/content/locales/es-ES/agent-native-toolkit.mdx +2 -2
- package/docs/content/locales/es-ES/agent-surfaces.mdx +8 -10
- package/docs/content/locales/es-ES/agent-teams.mdx +1 -0
- package/docs/content/locales/es-ES/authentication.mdx +1 -1
- package/docs/content/locales/es-ES/components.mdx +11 -1
- package/docs/content/locales/es-ES/creating-templates.mdx +3 -7
- package/docs/content/locales/es-ES/cross-app-sso.mdx +16 -6
- package/docs/content/locales/es-ES/deployment.mdx +8 -0
- package/docs/content/locales/es-ES/extensions.mdx +10 -0
- package/docs/content/locales/es-ES/external-agents.mdx +3 -7
- package/docs/content/locales/es-ES/key-concepts.mdx +13 -20
- package/docs/content/locales/es-ES/messaging.mdx +91 -15
- package/docs/content/locales/es-ES/multi-tenancy.mdx +5 -5
- package/docs/content/locales/es-ES/notifications.mdx +18 -10
- package/docs/content/locales/es-ES/processors.mdx +11 -5
- package/docs/content/locales/es-ES/server.mdx +17 -10
- package/docs/content/locales/es-ES/sharing.mdx +10 -10
- package/docs/content/locales/es-ES/skills-guide.mdx +34 -17
- package/docs/content/locales/es-ES/template-assets.mdx +16 -13
- package/docs/content/locales/es-ES/template-brain.mdx +3 -1
- package/docs/content/locales/es-ES/template-clips.mdx +4 -3
- package/docs/content/locales/es-ES/template-design.mdx +4 -1
- package/docs/content/locales/es-ES/template-dispatch.mdx +5 -1
- package/docs/content/locales/es-ES/template-mail.mdx +8 -0
- package/docs/content/locales/es-ES/tracking.mdx +9 -6
- package/docs/content/locales/es-ES/using-your-agent.mdx +0 -7
- package/docs/content/locales/es-ES/voice-input.mdx +6 -0
- package/docs/content/locales/es-ES/workspace-connections.mdx +9 -2
- package/docs/content/locales/es-ES/workspace.mdx +19 -18
- package/docs/content/locales/fr-FR/actions.mdx +2 -2
- package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +2 -2
- package/docs/content/locales/fr-FR/agent-surfaces.mdx +8 -10
- package/docs/content/locales/fr-FR/agent-teams.mdx +1 -0
- package/docs/content/locales/fr-FR/authentication.mdx +1 -1
- package/docs/content/locales/fr-FR/components.mdx +11 -1
- package/docs/content/locales/fr-FR/creating-templates.mdx +3 -7
- package/docs/content/locales/fr-FR/cross-app-sso.mdx +16 -6
- package/docs/content/locales/fr-FR/deployment.mdx +8 -0
- package/docs/content/locales/fr-FR/extensions.mdx +10 -0
- package/docs/content/locales/fr-FR/external-agents.mdx +3 -7
- package/docs/content/locales/fr-FR/key-concepts.mdx +13 -20
- package/docs/content/locales/fr-FR/messaging.mdx +91 -15
- package/docs/content/locales/fr-FR/multi-tenancy.mdx +5 -5
- package/docs/content/locales/fr-FR/notifications.mdx +18 -10
- package/docs/content/locales/fr-FR/processors.mdx +11 -5
- package/docs/content/locales/fr-FR/server.mdx +17 -10
- package/docs/content/locales/fr-FR/sharing.mdx +10 -10
- package/docs/content/locales/fr-FR/skills-guide.mdx +34 -17
- package/docs/content/locales/fr-FR/template-assets.mdx +16 -13
- package/docs/content/locales/fr-FR/template-brain.mdx +3 -1
- package/docs/content/locales/fr-FR/template-clips.mdx +4 -3
- package/docs/content/locales/fr-FR/template-design.mdx +4 -1
- package/docs/content/locales/fr-FR/template-dispatch.mdx +5 -1
- package/docs/content/locales/fr-FR/template-mail.mdx +8 -0
- package/docs/content/locales/fr-FR/tracking.mdx +9 -6
- package/docs/content/locales/fr-FR/using-your-agent.mdx +0 -7
- package/docs/content/locales/fr-FR/voice-input.mdx +6 -0
- package/docs/content/locales/fr-FR/workspace-connections.mdx +9 -2
- package/docs/content/locales/fr-FR/workspace.mdx +19 -18
- package/docs/content/locales/hi-IN/actions.mdx +2 -2
- package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +2 -2
- package/docs/content/locales/hi-IN/agent-surfaces.mdx +8 -10
- package/docs/content/locales/hi-IN/agent-teams.mdx +1 -0
- package/docs/content/locales/hi-IN/authentication.mdx +1 -1
- package/docs/content/locales/hi-IN/components.mdx +11 -1
- package/docs/content/locales/hi-IN/creating-templates.mdx +3 -7
- package/docs/content/locales/hi-IN/cross-app-sso.mdx +16 -6
- package/docs/content/locales/hi-IN/deployment.mdx +8 -0
- package/docs/content/locales/hi-IN/extensions.mdx +8 -0
- package/docs/content/locales/hi-IN/external-agents.mdx +2 -7
- package/docs/content/locales/hi-IN/key-concepts.mdx +13 -20
- package/docs/content/locales/hi-IN/messaging.mdx +81 -15
- package/docs/content/locales/hi-IN/multi-tenancy.mdx +5 -5
- package/docs/content/locales/hi-IN/notifications.mdx +18 -10
- package/docs/content/locales/hi-IN/processors.mdx +11 -5
- package/docs/content/locales/hi-IN/server.mdx +17 -10
- package/docs/content/locales/hi-IN/sharing.mdx +10 -10
- package/docs/content/locales/hi-IN/skills-guide.mdx +34 -17
- package/docs/content/locales/hi-IN/template-assets.mdx +16 -13
- package/docs/content/locales/hi-IN/template-brain.mdx +3 -1
- package/docs/content/locales/hi-IN/template-clips.mdx +4 -3
- package/docs/content/locales/hi-IN/template-design.mdx +4 -1
- package/docs/content/locales/hi-IN/template-dispatch.mdx +5 -1
- package/docs/content/locales/hi-IN/template-mail.mdx +8 -0
- package/docs/content/locales/hi-IN/tracking.mdx +9 -6
- package/docs/content/locales/hi-IN/using-your-agent.mdx +0 -7
- package/docs/content/locales/hi-IN/voice-input.mdx +6 -0
- package/docs/content/locales/hi-IN/workspace-connections.mdx +9 -2
- package/docs/content/locales/hi-IN/workspace.mdx +19 -18
- package/docs/content/locales/ja-JP/actions.mdx +2 -2
- package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +2 -2
- package/docs/content/locales/ja-JP/agent-surfaces.mdx +8 -10
- package/docs/content/locales/ja-JP/agent-teams.mdx +1 -0
- package/docs/content/locales/ja-JP/authentication.mdx +1 -1
- package/docs/content/locales/ja-JP/components.mdx +11 -1
- package/docs/content/locales/ja-JP/creating-templates.mdx +3 -7
- package/docs/content/locales/ja-JP/cross-app-sso.mdx +16 -6
- package/docs/content/locales/ja-JP/deployment.mdx +8 -0
- package/docs/content/locales/ja-JP/extensions.mdx +9 -0
- package/docs/content/locales/ja-JP/external-agents.mdx +2 -7
- package/docs/content/locales/ja-JP/key-concepts.mdx +13 -20
- package/docs/content/locales/ja-JP/messaging.mdx +81 -15
- package/docs/content/locales/ja-JP/multi-tenancy.mdx +5 -5
- package/docs/content/locales/ja-JP/notifications.mdx +18 -10
- package/docs/content/locales/ja-JP/processors.mdx +11 -5
- package/docs/content/locales/ja-JP/server.mdx +17 -10
- package/docs/content/locales/ja-JP/sharing.mdx +10 -10
- package/docs/content/locales/ja-JP/skills-guide.mdx +34 -17
- package/docs/content/locales/ja-JP/template-assets.mdx +16 -13
- package/docs/content/locales/ja-JP/template-brain.mdx +3 -1
- package/docs/content/locales/ja-JP/template-clips.mdx +4 -4
- package/docs/content/locales/ja-JP/template-design.mdx +4 -1
- package/docs/content/locales/ja-JP/template-dispatch.mdx +5 -1
- package/docs/content/locales/ja-JP/template-mail.mdx +8 -0
- package/docs/content/locales/ja-JP/tracking.mdx +9 -6
- package/docs/content/locales/ja-JP/using-your-agent.mdx +0 -7
- package/docs/content/locales/ja-JP/voice-input.mdx +6 -0
- package/docs/content/locales/ja-JP/workspace-connections.mdx +9 -2
- package/docs/content/locales/ja-JP/workspace.mdx +19 -18
- package/docs/content/locales/ko-KR/actions.mdx +2 -2
- package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +2 -2
- package/docs/content/locales/ko-KR/agent-surfaces.mdx +8 -10
- package/docs/content/locales/ko-KR/agent-teams.mdx +1 -0
- package/docs/content/locales/ko-KR/authentication.mdx +1 -1
- package/docs/content/locales/ko-KR/components.mdx +11 -1
- package/docs/content/locales/ko-KR/creating-templates.mdx +3 -7
- package/docs/content/locales/ko-KR/cross-app-sso.mdx +16 -6
- package/docs/content/locales/ko-KR/deployment.mdx +8 -0
- package/docs/content/locales/ko-KR/extensions.mdx +8 -0
- package/docs/content/locales/ko-KR/external-agents.mdx +2 -7
- package/docs/content/locales/ko-KR/key-concepts.mdx +13 -20
- package/docs/content/locales/ko-KR/messaging.mdx +80 -15
- package/docs/content/locales/ko-KR/multi-tenancy.mdx +5 -5
- package/docs/content/locales/ko-KR/notifications.mdx +18 -10
- package/docs/content/locales/ko-KR/processors.mdx +11 -5
- package/docs/content/locales/ko-KR/server.mdx +17 -10
- package/docs/content/locales/ko-KR/sharing.mdx +10 -10
- package/docs/content/locales/ko-KR/skills-guide.mdx +34 -17
- package/docs/content/locales/ko-KR/template-assets.mdx +16 -13
- package/docs/content/locales/ko-KR/template-brain.mdx +3 -1
- package/docs/content/locales/ko-KR/template-clips.mdx +4 -4
- package/docs/content/locales/ko-KR/template-design.mdx +4 -1
- package/docs/content/locales/ko-KR/template-dispatch.mdx +5 -1
- package/docs/content/locales/ko-KR/template-mail.mdx +8 -0
- package/docs/content/locales/ko-KR/tracking.mdx +9 -6
- package/docs/content/locales/ko-KR/using-your-agent.mdx +0 -7
- package/docs/content/locales/ko-KR/voice-input.mdx +6 -0
- package/docs/content/locales/ko-KR/workspace-connections.mdx +9 -2
- package/docs/content/locales/ko-KR/workspace.mdx +19 -18
- package/docs/content/locales/pt-BR/actions.mdx +2 -2
- package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +2 -2
- package/docs/content/locales/pt-BR/agent-surfaces.mdx +8 -10
- package/docs/content/locales/pt-BR/agent-teams.mdx +1 -0
- package/docs/content/locales/pt-BR/authentication.mdx +1 -1
- package/docs/content/locales/pt-BR/components.mdx +11 -1
- package/docs/content/locales/pt-BR/creating-templates.mdx +3 -7
- package/docs/content/locales/pt-BR/cross-app-sso.mdx +16 -6
- package/docs/content/locales/pt-BR/deployment.mdx +8 -0
- package/docs/content/locales/pt-BR/extensions.mdx +9 -0
- package/docs/content/locales/pt-BR/external-agents.mdx +3 -7
- package/docs/content/locales/pt-BR/key-concepts.mdx +13 -20
- package/docs/content/locales/pt-BR/messaging.mdx +88 -15
- package/docs/content/locales/pt-BR/multi-tenancy.mdx +5 -5
- package/docs/content/locales/pt-BR/notifications.mdx +18 -10
- package/docs/content/locales/pt-BR/processors.mdx +11 -5
- package/docs/content/locales/pt-BR/server.mdx +17 -10
- package/docs/content/locales/pt-BR/sharing.mdx +10 -10
- package/docs/content/locales/pt-BR/skills-guide.mdx +34 -17
- package/docs/content/locales/pt-BR/template-assets.mdx +16 -13
- package/docs/content/locales/pt-BR/template-brain.mdx +3 -1
- package/docs/content/locales/pt-BR/template-clips.mdx +4 -3
- package/docs/content/locales/pt-BR/template-design.mdx +4 -1
- package/docs/content/locales/pt-BR/template-dispatch.mdx +5 -1
- package/docs/content/locales/pt-BR/template-mail.mdx +8 -0
- package/docs/content/locales/pt-BR/tracking.mdx +9 -6
- package/docs/content/locales/pt-BR/using-your-agent.mdx +0 -7
- package/docs/content/locales/pt-BR/voice-input.mdx +6 -0
- package/docs/content/locales/pt-BR/workspace-connections.mdx +9 -2
- package/docs/content/locales/pt-BR/workspace.mdx +19 -18
- package/docs/content/locales/zh-CN/actions.mdx +2 -2
- package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +2 -2
- package/docs/content/locales/zh-CN/agent-surfaces.mdx +8 -10
- package/docs/content/locales/zh-CN/agent-teams.mdx +1 -0
- package/docs/content/locales/zh-CN/authentication.mdx +1 -1
- package/docs/content/locales/zh-CN/components.mdx +11 -1
- package/docs/content/locales/zh-CN/creating-templates.mdx +3 -7
- package/docs/content/locales/zh-CN/cross-app-sso.mdx +16 -6
- package/docs/content/locales/zh-CN/deployment.mdx +8 -0
- package/docs/content/locales/zh-CN/extensions.mdx +6 -0
- package/docs/content/locales/zh-CN/external-agents.mdx +2 -7
- package/docs/content/locales/zh-CN/key-concepts.mdx +13 -20
- package/docs/content/locales/zh-CN/messaging.mdx +78 -15
- package/docs/content/locales/zh-CN/multi-tenancy.mdx +5 -5
- package/docs/content/locales/zh-CN/notifications.mdx +18 -10
- package/docs/content/locales/zh-CN/processors.mdx +11 -5
- package/docs/content/locales/zh-CN/server.mdx +16 -10
- package/docs/content/locales/zh-CN/sharing.mdx +10 -10
- package/docs/content/locales/zh-CN/skills-guide.mdx +34 -17
- package/docs/content/locales/zh-CN/template-assets.mdx +16 -13
- package/docs/content/locales/zh-CN/template-brain.mdx +3 -1
- package/docs/content/locales/zh-CN/template-clips.mdx +4 -4
- package/docs/content/locales/zh-CN/template-design.mdx +4 -1
- package/docs/content/locales/zh-CN/template-dispatch.mdx +5 -1
- package/docs/content/locales/zh-CN/template-mail.mdx +8 -0
- package/docs/content/locales/zh-CN/tracking.mdx +9 -6
- package/docs/content/locales/zh-CN/using-your-agent.mdx +0 -7
- package/docs/content/locales/zh-CN/voice-input.mdx +6 -0
- package/docs/content/locales/zh-CN/workspace-connections.mdx +9 -2
- package/docs/content/locales/zh-CN/workspace.mdx +19 -18
- package/docs/content/locales/zh-TW/actions.mdx +2 -2
- package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +2 -2
- package/docs/content/locales/zh-TW/agent-surfaces.mdx +8 -10
- package/docs/content/locales/zh-TW/agent-teams.mdx +1 -0
- package/docs/content/locales/zh-TW/authentication.mdx +1 -1
- package/docs/content/locales/zh-TW/components.mdx +11 -1
- package/docs/content/locales/zh-TW/creating-templates.mdx +3 -7
- package/docs/content/locales/zh-TW/cross-app-sso.mdx +16 -6
- package/docs/content/locales/zh-TW/deployment.mdx +8 -0
- package/docs/content/locales/zh-TW/extensions.mdx +6 -0
- package/docs/content/locales/zh-TW/external-agents.mdx +2 -7
- package/docs/content/locales/zh-TW/key-concepts.mdx +13 -20
- package/docs/content/locales/zh-TW/messaging.mdx +78 -15
- package/docs/content/locales/zh-TW/multi-tenancy.mdx +5 -5
- package/docs/content/locales/zh-TW/notifications.mdx +18 -10
- package/docs/content/locales/zh-TW/processors.mdx +11 -5
- package/docs/content/locales/zh-TW/server.mdx +16 -10
- package/docs/content/locales/zh-TW/sharing.mdx +10 -10
- package/docs/content/locales/zh-TW/skills-guide.mdx +34 -17
- package/docs/content/locales/zh-TW/template-assets.mdx +16 -13
- package/docs/content/locales/zh-TW/template-brain.mdx +3 -1
- package/docs/content/locales/zh-TW/template-clips.mdx +4 -4
- package/docs/content/locales/zh-TW/template-design.mdx +4 -1
- package/docs/content/locales/zh-TW/template-dispatch.mdx +5 -1
- package/docs/content/locales/zh-TW/template-mail.mdx +8 -0
- package/docs/content/locales/zh-TW/tracking.mdx +9 -6
- package/docs/content/locales/zh-TW/using-your-agent.mdx +0 -7
- package/docs/content/locales/zh-TW/voice-input.mdx +6 -0
- package/docs/content/locales/zh-TW/workspace-connections.mdx +9 -2
- package/docs/content/locales/zh-TW/workspace.mdx +19 -18
- package/docs/content/mcp-apps.mdx +14 -32
- package/docs/content/mcp-clients.mdx +48 -54
- package/docs/content/mcp-protocol.mdx +25 -10
- package/docs/content/messaging.mdx +238 -48
- package/docs/content/multi-app-workspace.mdx +11 -96
- package/docs/content/multi-tenancy.mdx +5 -5
- package/docs/content/native-chat-ui.mdx +4 -4
- package/docs/content/notifications.mdx +19 -12
- package/docs/content/observability.mdx +2 -4
- package/docs/content/observational-memory.mdx +7 -3
- package/docs/content/onboarding.mdx +9 -2
- package/docs/content/plan-plugin.mdx +10 -2
- package/docs/content/pr-visual-recap.mdx +1 -1
- package/docs/content/processors.mdx +11 -5
- package/docs/content/pure-agent-apps.mdx +5 -1
- package/docs/content/real-time-collaboration.mdx +30 -67
- package/docs/content/recurring-jobs.mdx +8 -6
- package/docs/content/routing.mdx +3 -4
- package/docs/content/sandbox-adapters.mdx +30 -53
- package/docs/content/security.mdx +8 -0
- package/docs/content/server.mdx +17 -10
- package/docs/content/sharing.mdx +10 -10
- package/docs/content/skills-guide.mdx +35 -16
- package/docs/content/template-analytics.mdx +11 -8
- package/docs/content/template-assets.mdx +16 -13
- package/docs/content/template-brain.mdx +3 -1
- package/docs/content/template-calendar.mdx +12 -4
- package/docs/content/template-chat.mdx +4 -4
- package/docs/content/template-clips.mdx +6 -3
- package/docs/content/template-content.mdx +23 -18
- package/docs/content/template-design.mdx +7 -1
- package/docs/content/template-dispatch.mdx +5 -1
- package/docs/content/template-mail.mdx +14 -2
- package/docs/content/template-plan.mdx +22 -15
- package/docs/content/template-slides.mdx +11 -3
- package/docs/content/toolkit-agent-ux.mdx +46 -3
- package/docs/content/toolkit-collaboration.mdx +58 -4
- package/docs/content/toolkit-command-navigation.mdx +8 -2
- package/docs/content/toolkit-comments-review.mdx +10 -2
- package/docs/content/toolkit-history.mdx +8 -3
- package/docs/content/toolkit-observability.mdx +48 -2
- package/docs/content/toolkit-org-team.mdx +8 -2
- package/docs/content/toolkit-resources.mdx +45 -2
- package/docs/content/toolkit-settings.mdx +8 -2
- package/docs/content/toolkit-setup-connections.mdx +7 -2
- package/docs/content/toolkit-sharing.mdx +46 -3
- package/docs/content/toolkit-ui.mdx +82 -11
- package/docs/content/tracking.mdx +10 -8
- package/docs/content/using-your-agent.mdx +0 -12
- package/docs/content/voice-input.mdx +7 -1
- package/docs/content/what-is-agent-native.mdx +7 -8
- package/docs/content/workspace-connections.mdx +16 -23
- package/docs/content/workspace-management.mdx +16 -4
- package/docs/content/workspace.mdx +19 -18
- package/package.json +5 -1
- package/src/templates/default/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/src/templates/default/AGENTS.md +7 -3
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +6 -3
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +25 -0
- package/src/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +15 -0
- package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -5
- package/src/templates/workspace-core/AGENTS.md +3 -2
- package/corpus/core/docs/content/locales/ar-SA/migration-workbench.mdx +0 -76
- package/corpus/core/docs/content/locales/de-DE/migration-workbench.mdx +0 -76
- package/corpus/core/docs/content/locales/es-ES/migration-workbench.mdx +0 -76
- package/corpus/core/docs/content/locales/fr-FR/migration-workbench.mdx +0 -76
- package/corpus/core/docs/content/locales/hi-IN/migration-workbench.mdx +0 -74
- package/corpus/core/docs/content/locales/ja-JP/migration-workbench.mdx +0 -76
- package/corpus/core/docs/content/locales/ko-KR/migration-workbench.mdx +0 -74
- package/corpus/core/docs/content/locales/pt-BR/migration-workbench.mdx +0 -76
- package/corpus/core/docs/content/locales/zh-CN/migration-workbench.mdx +0 -74
- package/corpus/core/docs/content/locales/zh-TW/migration-workbench.mdx +0 -74
- package/corpus/core/docs/content/migration-workbench.mdx +0 -74
- package/corpus/core/docs/content/toolkit-app-adapters.mdx +0 -55
- package/corpus/core/docs/content/toolkit-collaboration-ui.mdx +0 -60
- package/corpus/core/docs/content/toolkit-sharing-ui.mdx +0 -45
- package/corpus/core/docs/content/toolkit-shell-hooks.mdx +0 -36
- package/docs/content/locales/ar-SA/migration-workbench.mdx +0 -76
- package/docs/content/locales/de-DE/migration-workbench.mdx +0 -76
- package/docs/content/locales/es-ES/migration-workbench.mdx +0 -76
- package/docs/content/locales/fr-FR/migration-workbench.mdx +0 -76
- package/docs/content/locales/hi-IN/migration-workbench.mdx +0 -74
- package/docs/content/locales/ja-JP/migration-workbench.mdx +0 -76
- package/docs/content/locales/ko-KR/migration-workbench.mdx +0 -74
- package/docs/content/locales/pt-BR/migration-workbench.mdx +0 -76
- package/docs/content/locales/zh-CN/migration-workbench.mdx +0 -74
- package/docs/content/locales/zh-TW/migration-workbench.mdx +0 -74
- package/docs/content/migration-workbench.mdx +0 -74
- package/docs/content/toolkit-app-adapters.mdx +0 -55
- package/docs/content/toolkit-collaboration-ui.mdx +0 -60
- package/docs/content/toolkit-sharing-ui.mdx +0 -45
- package/docs/content/toolkit-shell-hooks.mdx +0 -36
|
@@ -11,11 +11,14 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
# Capture Learnings
|
|
13
13
|
|
|
14
|
-
This is background knowledge, not a slash command. **
|
|
14
|
+
This is background knowledge, not a slash command. **Organization learnings and your personal memory index are loaded at the start of every conversation, including Slack/integration turns.** Capture durable context proactively when you learn something worth remembering.
|
|
15
15
|
|
|
16
16
|
## How to Read & Write Memories
|
|
17
17
|
|
|
18
|
-
Memories are stored as **resources** in the SQL database
|
|
18
|
+
Memories are stored as **resources** in the SQL database, not as files on disk.
|
|
19
|
+
|
|
20
|
+
- **Team/organization knowledge:** shared `LEARNINGS.md`. Read it first, merge the new fact, then write the full updated file with the `resources` tool using `scope: "shared"`. Shared scope resolves to the active organization; it must never leak to another organization in the same deployment.
|
|
21
|
+
- **Personal knowledge:** `memory/MEMORY.md` plus `memory/<name>.md`, written with `save-memory`.
|
|
19
22
|
|
|
20
23
|
- **Save a memory:** `save-memory --name <name> --type <type> --description "..." --content "..."`
|
|
21
24
|
- **Read a memory:** `resource-read --path memory/<name>.md`
|
|
@@ -33,6 +36,14 @@ Memories are stored as **resources** in the SQL database (personal scope), not a
|
|
|
33
36
|
|
|
34
37
|
## When to Capture
|
|
35
38
|
|
|
39
|
+
### Team and organization knowledge (`LEARNINGS.md`, shared scope)
|
|
40
|
+
- Canonical destinations and workflows (for example, which Content database receives a type of Slack request)
|
|
41
|
+
- Required intake fields, ownership, prioritization conventions, metric definitions, and approved terminology
|
|
42
|
+
- Durable external references that the whole team needs, including the canonical page/database URL
|
|
43
|
+
- Corrections or decisions that should affect every organization member's future Slack and app conversations
|
|
44
|
+
|
|
45
|
+
Store the fact and a concise provenance link when available. Do not paste full private conversations, customer data, credentials, or secrets into learnings. Put stable always-on policy in shared `AGENTS.md`; put learned facts and evolving conventions in shared `LEARNINGS.md`.
|
|
46
|
+
|
|
36
47
|
### User Preferences & Memory (`user`)
|
|
37
48
|
- **Tone and style** — "I prefer casual tone", "don't use emojis", "keep replies short"
|
|
38
49
|
- **Personal context** — contacts, relationships, habits ("my wife's email is...", "I'm in PST timezone")
|
|
@@ -58,19 +69,21 @@ Memories are stored as **resources** in the SQL database (personal scope), not a
|
|
|
58
69
|
- Things obvious from reading the code
|
|
59
70
|
- Standard language/framework behavior
|
|
60
71
|
- Temporary debugging notes
|
|
61
|
-
- Anything already in AGENTS.md or skills
|
|
72
|
+
- Anything already in AGENTS.md, shared LEARNINGS.md, or skills
|
|
62
73
|
- Ephemeral task details (use tasks/plans instead)
|
|
63
74
|
|
|
64
75
|
## Key Rules
|
|
65
76
|
|
|
66
|
-
1. **Save proactively — don't ask permission.** When you learn something, save it immediately.
|
|
67
|
-
2. **
|
|
68
|
-
3. **
|
|
69
|
-
4. **
|
|
70
|
-
5. **
|
|
77
|
+
1. **Save proactively — don't ask permission.** When you learn something durable, save it immediately at the correct scope.
|
|
78
|
+
2. **Choose scope by audience.** Organization workflow or reference → shared `LEARNINGS.md`; one person's preference/context → personal memory.
|
|
79
|
+
3. **One memory per topic** — e.g. `coding-style`, `project-alpha`, not one giant dump
|
|
80
|
+
4. **Read before updating** — if a memory exists, read it first and merge, don't overwrite
|
|
81
|
+
5. **Keep descriptions concise** — the index is loaded every conversation
|
|
82
|
+
6. **Memories are SQL-backed** — they persist across sessions and are not in git; still minimize sensitive content
|
|
71
83
|
|
|
72
84
|
## Graduation
|
|
73
85
|
|
|
74
86
|
When a memory is referenced repeatedly, it may belong in AGENTS.md or a skill:
|
|
75
|
-
- Saving a memory is lightweight (auto-apply, personal scope)
|
|
87
|
+
- Saving a personal memory is lightweight (auto-apply, personal scope)
|
|
88
|
+
- Shared LEARNINGS.md is the lightweight organization knowledge layer
|
|
76
89
|
- Updating AGENTS.md or a skill is heavier (affects all users/agents)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-response.d.ts","sourceRoot":"","sources":["../../src/a2a/artifact-response.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC;
|
|
1
|
+
{"version":3,"file":"artifact-response.d.ts","sourceRoot":"","sources":["../../src/a2a/artifact-response.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC;AAo8BD,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,oBAAoB,EAAE,EACnC,OAAO,GAAE,0BAA+B,GACvC,MAAM,CAsIR;AAED,wBAAgB,kCAAkC,CAChD,WAAW,EAAE,oBAAoB,EAAE,EACnC,OAAO,GAAE,0BAA+B,GACvC,MAAM,GAAG,IAAI,CA8Bf"}
|
|
@@ -97,6 +97,32 @@ function imageIdValue(parsed) {
|
|
|
97
97
|
stringValue(parsed.imageId) ??
|
|
98
98
|
stringValue(parsed.id));
|
|
99
99
|
}
|
|
100
|
+
function contentDatabaseSubmissionArtifact(parsed) {
|
|
101
|
+
const id = stringValue(parsed.createdDocumentId);
|
|
102
|
+
if (!id)
|
|
103
|
+
return null;
|
|
104
|
+
const verification = asRecord(parsed.verification);
|
|
105
|
+
const candidates = [
|
|
106
|
+
stringValue(parsed.url),
|
|
107
|
+
stringValue(parsed.urlPath),
|
|
108
|
+
stringValue(parsed.createdDocumentUrl),
|
|
109
|
+
stringValue(verification?.url),
|
|
110
|
+
stringValue(verification?.urlPath),
|
|
111
|
+
].filter((value) => !!value);
|
|
112
|
+
const url = candidates.find((candidate) => artifactUrlReferencesId(candidate, "document", id));
|
|
113
|
+
const items = Array.isArray(parsed.items) ? parsed.items : [];
|
|
114
|
+
const createdItem = items.map(asRecord).find((item) => {
|
|
115
|
+
const document = asRecord(item?.document);
|
|
116
|
+
return stringValue(document?.id) === id;
|
|
117
|
+
});
|
|
118
|
+
const createdDocument = asRecord(createdItem?.document);
|
|
119
|
+
return {
|
|
120
|
+
id,
|
|
121
|
+
title: stringValue(parsed.createdDocumentTitle) ??
|
|
122
|
+
stringValue(createdDocument?.title),
|
|
123
|
+
url,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
100
126
|
function addImageArtifact(images, parsed) {
|
|
101
127
|
const id = imageIdValue(parsed);
|
|
102
128
|
if (!id)
|
|
@@ -149,6 +175,8 @@ function collectArtifacts(results) {
|
|
|
149
175
|
const images = new Map();
|
|
150
176
|
const designShells = new Map();
|
|
151
177
|
const generatedDesigns = new Map();
|
|
178
|
+
const monitors = new Map();
|
|
179
|
+
const forms = new Map();
|
|
152
180
|
for (const toolResult of results) {
|
|
153
181
|
if (toolResult.tool === "call-agent") {
|
|
154
182
|
for (const artifact of parseDownstreamArtifactBlock(toolResult.result)) {
|
|
@@ -200,6 +228,39 @@ function collectArtifacts(results) {
|
|
|
200
228
|
const parsed = parseToolResultJson(toolResult.result);
|
|
201
229
|
if (!parsed)
|
|
202
230
|
continue;
|
|
231
|
+
if (toolResult.tool === "save-monitor") {
|
|
232
|
+
const id = stringValue(parsed.id);
|
|
233
|
+
const url = stringValue(parsed.monitorAppUrl);
|
|
234
|
+
if (id && url) {
|
|
235
|
+
monitors.set(id, {
|
|
236
|
+
id,
|
|
237
|
+
name: stringValue(parsed.name),
|
|
238
|
+
url,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
if (toolResult.tool === "create-form") {
|
|
244
|
+
const id = stringValue(parsed.id);
|
|
245
|
+
const url = stringValue(parsed.publicUrl);
|
|
246
|
+
if (id && url && stringValue(parsed.status) === "published") {
|
|
247
|
+
const settings = asRecord(parsed.settings);
|
|
248
|
+
forms.set(id, {
|
|
249
|
+
id,
|
|
250
|
+
title: stringValue(parsed.title),
|
|
251
|
+
url,
|
|
252
|
+
anonymous: settings?.anonymous === true,
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
if (toolResult.tool === "submit-content-database-form" ||
|
|
258
|
+
toolResult.tool === "add-database-item") {
|
|
259
|
+
const artifact = contentDatabaseSubmissionArtifact(parsed);
|
|
260
|
+
if (artifact)
|
|
261
|
+
documents.set(artifact.id, artifact);
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
203
264
|
if (toolResult.tool === "create-document" ||
|
|
204
265
|
toolResult.tool === "get-document" ||
|
|
205
266
|
toolResult.tool === "update-document") {
|
|
@@ -362,6 +423,8 @@ function collectArtifacts(results) {
|
|
|
362
423
|
images: [...images.values()],
|
|
363
424
|
designShells: [...designShells.values()],
|
|
364
425
|
generatedDesigns: [...generatedDesigns.values()],
|
|
426
|
+
monitors: [...monitors.values()],
|
|
427
|
+
forms: [...forms.values()],
|
|
365
428
|
};
|
|
366
429
|
}
|
|
367
430
|
function parseDownstreamArtifactBlock(result) {
|
|
@@ -536,6 +599,15 @@ function formatDesignLine(design, baseUrl) {
|
|
|
536
599
|
const fileLabel = design.fileCount === 1 ? "1 file" : `${design.fileCount} files`;
|
|
537
600
|
return `- Design: ${artifactUrlFromResult({ url: design.url }, `/design/${design.id}`, baseUrl)} (ID: ${design.id}, ${fileLabel})`;
|
|
538
601
|
}
|
|
602
|
+
function formatMonitorLine(monitor) {
|
|
603
|
+
const label = monitor.name ? `Monitor "${monitor.name}"` : "Monitor";
|
|
604
|
+
return `- ${label}: ${monitor.url} (ID: ${monitor.id})`;
|
|
605
|
+
}
|
|
606
|
+
function formatFormLine(form) {
|
|
607
|
+
const kind = form.anonymous ? "Anonymous form" : "Public form";
|
|
608
|
+
const label = form.title ? `${kind} "${form.title}"` : kind;
|
|
609
|
+
return `- ${label}: ${form.url} (ID: ${form.id})`;
|
|
610
|
+
}
|
|
539
611
|
function formatIncompleteDesignMessage(shells) {
|
|
540
612
|
const ids = shells.map((shell) => shell.id).join(", ");
|
|
541
613
|
const noun = shells.length === 1 ? "project shell" : "project shells";
|
|
@@ -659,7 +731,7 @@ function formatUnverifiedArtifactMessage(refs, documents, decks, dashboards, ana
|
|
|
659
731
|
export function appendA2AArtifactLinks(responseText, toolResults, options = {}) {
|
|
660
732
|
const baseUrl = normalizeBaseUrl(options.baseUrl);
|
|
661
733
|
const includeReferencedArtifacts = options.includeReferencedArtifacts ?? false;
|
|
662
|
-
const { documents, decks, dashboards, analyses, images, designShells, generatedDesigns, } = collectArtifacts(toolResults);
|
|
734
|
+
const { documents, decks, dashboards, analyses, images, designShells, generatedDesigns, monitors, forms, } = collectArtifacts(toolResults);
|
|
663
735
|
const generatedDesignIds = new Set(generatedDesigns.map((design) => design.id));
|
|
664
736
|
const incompleteShells = designShells.filter((shell) => !generatedDesignIds.has(shell.id));
|
|
665
737
|
let text = responseText.trim() === "(no response)" ? "" : responseText.trim();
|
|
@@ -717,6 +789,18 @@ export function appendA2AArtifactLinks(responseText, toolResults, options = {})
|
|
|
717
789
|
missingLines.push(formatDesignLine(design, baseUrl));
|
|
718
790
|
}
|
|
719
791
|
}
|
|
792
|
+
for (const monitor of monitors) {
|
|
793
|
+
if (includeReferencedArtifacts ||
|
|
794
|
+
!responseAlreadyMentionsPath(text, monitor.url)) {
|
|
795
|
+
missingLines.push(formatMonitorLine(monitor));
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
for (const form of forms) {
|
|
799
|
+
if (includeReferencedArtifacts ||
|
|
800
|
+
!responseAlreadyMentionsPath(text, form.url)) {
|
|
801
|
+
missingLines.push(formatFormLine(form));
|
|
802
|
+
}
|
|
803
|
+
}
|
|
720
804
|
if (missingLines.length === 0)
|
|
721
805
|
return text;
|
|
722
806
|
const artifactBlock = `Artifacts:\n${missingLines.join("\n")}`;
|
|
@@ -724,7 +808,7 @@ export function appendA2AArtifactLinks(responseText, toolResults, options = {})
|
|
|
724
808
|
}
|
|
725
809
|
export function buildA2ARecoverableArtifactMessage(toolResults, options = {}) {
|
|
726
810
|
const baseUrl = normalizeBaseUrl(options.baseUrl);
|
|
727
|
-
const { documents, decks, dashboards, analyses, images, generatedDesigns } = collectArtifacts(toolResults);
|
|
811
|
+
const { documents, decks, dashboards, analyses, images, generatedDesigns, monitors, forms, } = collectArtifacts(toolResults);
|
|
728
812
|
const lines = [
|
|
729
813
|
...documents.map((document) => formatDocumentLine(document, baseUrl)),
|
|
730
814
|
...decks.map((deck) => formatDeckLine(deck, baseUrl)),
|
|
@@ -732,6 +816,8 @@ export function buildA2ARecoverableArtifactMessage(toolResults, options = {}) {
|
|
|
732
816
|
...analyses.map((analysis) => formatAnalysisLine(analysis, baseUrl)),
|
|
733
817
|
...images.map((image) => formatImageLine(image, baseUrl)),
|
|
734
818
|
...generatedDesigns.map((design) => formatDesignLine(design, baseUrl)),
|
|
819
|
+
...monitors.map(formatMonitorLine),
|
|
820
|
+
...forms.map(formatFormLine),
|
|
735
821
|
];
|
|
736
822
|
if (lines.length === 0)
|
|
737
823
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-response.js","sourceRoot":"","sources":["../../src/a2a/artifact-response.ts"],"names":[],"mappings":"AAgEA,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAChE,CAAC,CAAE,KAAiC;QACpC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,OAAO,KAA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AAQ,EAAE,EAAE,CAAC,kBAAkB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACpE,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACzD,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvE,CAAC;IAEF,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,OAAO;QACL,8FAA8F;QAC9F,EAAE;QACF,YAAY;QACZ,GAAG,KAAK;KACT,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC","sourcesContent":["export interface A2AToolResultSummary {\n tool: string;\n result: string;\n}\n\nexport interface A2AArtifactResponseOptions {\n baseUrl?: string;\n includeReferencedArtifacts?: boolean;\n}\n\ninterface CreatedDocumentArtifact {\n id: string;\n title?: string;\n url?: string;\n}\n\ninterface CreatedDesignShell {\n id: string;\n title?: string;\n}\n\ninterface GeneratedDesignArtifact {\n id: string;\n fileCount: number;\n url?: string;\n}\n\ninterface CreatedDeckArtifact {\n id: string;\n url?: string;\n}\n\ninterface CreatedDashboardArtifact {\n id: string;\n title?: string;\n url?: string;\n}\n\ninterface CreatedAnalysisArtifact {\n id: string;\n title?: string;\n url?: string;\n}\n\ninterface CreatedImageArtifact {\n id: string;\n runId?: string;\n title?: string;\n url?: string;\n}\n\ntype ReferencedArtifactKind =\n | \"deck\"\n | \"design\"\n | \"document\"\n | \"dashboard\"\n | \"analysis\"\n | \"image\";\n\ninterface ReferencedArtifact {\n kind: ReferencedArtifactKind;\n id: string;\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | null {\n return value && typeof value === \"object\" && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : null;\n}\n\nfunction stringValue(value: unknown): string | undefined {\n return typeof value === \"string\" && value.trim() ? value.trim() : undefined;\n}\n\nfunction parseToolResultJson(result: string): Record<string, unknown> | null {\n const trimmed = result.trim();\n if (!trimmed || /^Error(?:\\s|:)/i.test(trimmed)) return null;\n\n try {\n return asRecord(JSON.parse(trimmed));\n } catch {\n // Dev shell wrappers may include console output before the returned JSON.\n const firstBrace = trimmed.indexOf(\"{\");\n const lastBrace = trimmed.lastIndexOf(\"}\");\n if (firstBrace < 0 || lastBrace <= firstBrace) return null;\n try {\n return asRecord(JSON.parse(trimmed.slice(firstBrace, lastBrace + 1)));\n } catch {\n return null;\n }\n }\n}\n\nfunction normalizeBaseUrl(baseUrl: string | undefined): string | undefined {\n const trimmed = baseUrl?.trim();\n return trimmed ? trimmed.replace(/\\/+$/, \"\") : undefined;\n}\n\nfunction artifactUrl(baseUrl: string | undefined, path: string): string {\n const base = normalizeBaseUrl(baseUrl);\n return base ? `${base}${path}` : path;\n}\n\nfunction artifactUrlFromResult(\n parsed: Record<string, unknown>,\n fallbackPath: string,\n baseUrl: string | undefined,\n): string {\n const explicitUrl = stringValue(parsed.url) ?? stringValue(parsed.urlPath);\n if (!explicitUrl) return artifactUrl(baseUrl, fallbackPath);\n if (explicitUrl.startsWith(\"/\")) return artifactUrl(baseUrl, explicitUrl);\n try {\n return new URL(explicitUrl).toString();\n } catch {\n return artifactUrl(baseUrl, fallbackPath);\n }\n}\n\nfunction responseAlreadyMentionsPath(text: string, path: string): boolean {\n return text.includes(path);\n}\n\nfunction responseMentionsDesignShell(\n text: string,\n shell: CreatedDesignShell,\n): boolean {\n if (!text.trim()) return true;\n return text.includes(shell.id) || text.includes(`/design/${shell.id}`);\n}\n\nfunction responseAlreadyWarnsIncompleteDesign(text: string): boolean {\n return /(?:not ready|still working|processing|no renderable|no files|failed|could not|cannot|can't)/i.test(\n text,\n );\n}\n\nfunction isRenderableDesignFile(value: unknown): boolean {\n const file = asRecord(value);\n if (!file) return false;\n\n const filename = stringValue(file.filename);\n const fileType = stringValue(file.fileType);\n const hasRenderableType =\n fileType === \"html\" ||\n fileType === \"jsx\" ||\n filename?.endsWith(\".html\") ||\n filename?.endsWith(\".jsx\");\n if (!hasRenderableType) return false;\n\n return typeof file.content !== \"string\" || file.content.trim().length > 0;\n}\n\nfunction countRenderableDesignFiles(files: unknown): number {\n if (!Array.isArray(files)) return 0;\n return files.filter(isRenderableDesignFile).length;\n}\n\nfunction numberValue(value: unknown): number | undefined {\n return typeof value === \"number\" && Number.isFinite(value)\n ? value\n : undefined;\n}\n\nfunction deckIdValue(parsed: Record<string, unknown>): string | undefined {\n return stringValue(parsed.id) ?? stringValue(parsed.deckId);\n}\n\nfunction dashboardIdValue(parsed: Record<string, unknown>): string | undefined {\n return stringValue(parsed.id) ?? stringValue(parsed.dashboardId);\n}\n\nfunction analysisIdValue(parsed: Record<string, unknown>): string | undefined {\n return stringValue(parsed.id) ?? stringValue(parsed.analysisId);\n}\n\nfunction imageIdValue(parsed: Record<string, unknown>): string | undefined {\n return (\n stringValue(parsed.assetId) ??\n stringValue(parsed.imageId) ??\n stringValue(parsed.id)\n );\n}\n\nfunction addImageArtifact(\n images: Map<string, CreatedImageArtifact>,\n parsed: Record<string, unknown>,\n): void {\n const id = imageIdValue(parsed);\n if (!id) return;\n images.set(id, {\n id,\n runId: stringValue(parsed.runId) ?? stringValue(parsed.generationRunId),\n title: stringValue(parsed.title),\n url:\n stringValue(parsed.pageUrl) ??\n stringValue(parsed.detailUrl) ??\n stringValue(parsed.url) ??\n stringValue(parsed.urlPath),\n });\n}\n\nfunction isReadyDeckArtifact(parsed: Record<string, unknown>): boolean {\n const slideCount = numberValue(parsed.slideCount);\n if (slideCount !== undefined) return slideCount > 0;\n if (Array.isArray(parsed.slides)) return parsed.slides.length > 0;\n return true;\n}\n\nfunction addDeckArtifact(\n decks: Map<string, CreatedDeckArtifact>,\n parsed: Record<string, unknown>,\n options: { requireReady: boolean },\n): void {\n const id = deckIdValue(parsed);\n if (!id) return;\n if (options.requireReady && !isReadyDeckArtifact(parsed)) return;\n decks.set(id, {\n id,\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n}\n\nfunction addListedDeckArtifacts(\n decks: Map<string, CreatedDeckArtifact>,\n parsed: Record<string, unknown>,\n): void {\n const items = parsed.decks;\n if (!Array.isArray(items)) return;\n for (const item of items) {\n const deck = asRecord(item);\n if (!deck) continue;\n addDeckArtifact(decks, deck, { requireReady: false });\n }\n}\n\nfunction collectArtifacts(results: A2AToolResultSummary[]): {\n documents: CreatedDocumentArtifact[];\n decks: CreatedDeckArtifact[];\n dashboards: CreatedDashboardArtifact[];\n analyses: CreatedAnalysisArtifact[];\n images: CreatedImageArtifact[];\n designShells: CreatedDesignShell[];\n generatedDesigns: GeneratedDesignArtifact[];\n} {\n const documents = new Map<string, CreatedDocumentArtifact>();\n const decks = new Map<string, CreatedDeckArtifact>();\n const dashboards = new Map<string, CreatedDashboardArtifact>();\n const analyses = new Map<string, CreatedAnalysisArtifact>();\n const images = new Map<string, CreatedImageArtifact>();\n const designShells = new Map<string, CreatedDesignShell>();\n const generatedDesigns = new Map<string, GeneratedDesignArtifact>();\n\n for (const toolResult of results) {\n if (toolResult.tool === \"call-agent\") {\n for (const artifact of parseDownstreamArtifactBlock(toolResult.result)) {\n if (artifact.kind === \"deck\") {\n decks.set(artifact.id, {\n id: artifact.id,\n url: artifact.url,\n });\n } else if (artifact.kind === \"document\") {\n documents.set(artifact.id, {\n id: artifact.id,\n title: artifact.title,\n url: artifact.url,\n });\n } else if (artifact.kind === \"dashboard\") {\n dashboards.set(artifact.id, {\n id: artifact.id,\n title: artifact.title,\n url: artifact.url,\n });\n } else if (artifact.kind === \"analysis\") {\n analyses.set(artifact.id, {\n id: artifact.id,\n title: artifact.title,\n url: artifact.url,\n });\n } else if (artifact.kind === \"image\") {\n images.set(artifact.id, {\n id: artifact.id,\n title: artifact.title,\n url: artifact.url,\n runId: artifact.runId,\n });\n } else if (artifact.kind === \"design\" && artifact.fileCount > 0) {\n generatedDesigns.set(artifact.id, {\n id: artifact.id,\n fileCount: artifact.fileCount,\n url: artifact.url,\n });\n }\n }\n continue;\n }\n\n const parsed = parseToolResultJson(toolResult.result);\n if (!parsed) continue;\n\n if (\n toolResult.tool === \"create-document\" ||\n toolResult.tool === \"get-document\" ||\n toolResult.tool === \"update-document\"\n ) {\n const id = stringValue(parsed.id);\n if (id) {\n documents.set(id, {\n id,\n title: stringValue(parsed.title),\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n continue;\n }\n\n if (\n toolResult.tool === \"create-deck\" ||\n toolResult.tool === \"duplicate-deck\"\n ) {\n addDeckArtifact(decks, parsed, { requireReady: true });\n continue;\n }\n\n if (toolResult.tool === \"get-deck\") {\n addDeckArtifact(decks, parsed, { requireReady: false });\n continue;\n }\n\n if (toolResult.tool === \"list-decks\") {\n addListedDeckArtifacts(decks, parsed);\n continue;\n }\n\n if (toolResult.tool === \"add-slide\") {\n const id = stringValue(parsed.deckId);\n const slideCount = numberValue(parsed.slideCount);\n if (id && slideCount !== undefined && slideCount > 0) {\n decks.set(id, {\n id,\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n continue;\n }\n\n if (\n toolResult.tool === \"update-dashboard\" ||\n toolResult.tool === \"rename-dashboard\" ||\n toolResult.tool === \"get-dashboard\"\n ) {\n const id = dashboardIdValue(parsed);\n if (id) {\n dashboards.set(id, {\n id,\n title: stringValue(parsed.name) ?? stringValue(parsed.title),\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n continue;\n }\n\n if (\n toolResult.tool === \"save-analysis\" ||\n toolResult.tool === \"get-analysis\"\n ) {\n const id = analysisIdValue(parsed);\n if (id) {\n analyses.set(id, {\n id,\n title: stringValue(parsed.name) ?? stringValue(parsed.title),\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n continue;\n }\n\n if (\n toolResult.tool === \"generate-image\" ||\n toolResult.tool === \"refine-image\" ||\n toolResult.tool === \"get-asset\" ||\n toolResult.tool === \"save-generated-image\" ||\n toolResult.tool === \"export-image\"\n ) {\n addImageArtifact(images, parsed);\n continue;\n }\n\n if (toolResult.tool === \"generate-image-batch\") {\n if (Array.isArray(parsed.images)) {\n for (const item of parsed.images) {\n const image = asRecord(item);\n if (!image || image.ok === false) continue;\n addImageArtifact(images, image);\n }\n }\n continue;\n }\n\n if (toolResult.tool === \"create-design\") {\n const id = stringValue(parsed.id);\n if (id) {\n designShells.set(id, { id, title: stringValue(parsed.title) });\n }\n continue;\n }\n\n if (toolResult.tool === \"get-design\") {\n const id = stringValue(parsed.id);\n if (!id) continue;\n\n const renderableFileCount = countRenderableDesignFiles(parsed.files);\n if (renderableFileCount > 0) {\n generatedDesigns.set(id, {\n id,\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n fileCount: Array.isArray(parsed.files)\n ? parsed.files.length\n : renderableFileCount,\n });\n } else {\n designShells.set(id, { id, title: stringValue(parsed.title) });\n }\n continue;\n }\n\n if (toolResult.tool === \"generate-design\") {\n const id = stringValue(parsed.designId);\n if (!id) continue;\n\n const savedFiles = Array.isArray(parsed.savedFiles)\n ? parsed.savedFiles\n : [];\n const fileCount = numberValue(parsed.fileCount) ?? savedFiles.length;\n\n if (fileCount > 0) {\n generatedDesigns.set(id, {\n id,\n fileCount,\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n continue;\n }\n\n if (toolResult.tool === \"create-file\") {\n const id = stringValue(parsed.designId);\n if (!id) continue;\n const renderable =\n parsed.renderable === true ||\n stringValue(parsed.fileType) === \"html\" ||\n stringValue(parsed.fileType) === \"jsx\";\n\n if (renderable) {\n const previous = generatedDesigns.get(id);\n generatedDesigns.set(id, {\n id,\n url:\n stringValue(parsed.url) ??\n stringValue(parsed.urlPath) ??\n previous?.url,\n fileCount: (previous?.fileCount ?? 0) + 1,\n });\n }\n }\n\n if (toolResult.tool === \"duplicate-design\") {\n const id = stringValue(parsed.id);\n const fileCount = numberValue(parsed.fileCount);\n if (id && fileCount && fileCount > 0) {\n generatedDesigns.set(id, {\n id,\n fileCount,\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n }\n }\n\n return {\n documents: [...documents.values()],\n decks: [...decks.values()],\n dashboards: [...dashboards.values()],\n analyses: [...analyses.values()],\n images: [...images.values()],\n designShells: [...designShells.values()],\n generatedDesigns: [...generatedDesigns.values()],\n };\n}\n\ntype DownstreamArtifact =\n | { kind: \"deck\"; id: string; url: string }\n | { kind: \"document\"; id: string; url: string; title?: string }\n | { kind: \"dashboard\"; id: string; url: string; title?: string }\n | { kind: \"analysis\"; id: string; url: string; title?: string }\n | { kind: \"image\"; id: string; url: string; title?: string; runId?: string }\n | { kind: \"design\"; id: string; url: string; fileCount: number };\n\nfunction parseDownstreamArtifactBlock(result: string): DownstreamArtifact[] {\n const artifacts: DownstreamArtifact[] = [];\n for (const line of downstreamArtifactLines(result)) {\n const deck = line.match(\n /^- Deck(?:\\s+\"[^\"]+\")?(?:\\s+\\([^)]*\\))?:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+)\\)$/,\n );\n if (deck) {\n const id = deck[2];\n if (!artifactUrlReferencesId(deck[1], \"deck\", id)) continue;\n artifacts.push({\n kind: \"deck\",\n url: deck[1],\n id,\n });\n continue;\n }\n\n const document = line.match(\n /^- Document(?:\\s+\"([^\"]+)\")?:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+)\\)$/,\n );\n if (document) {\n const id = document[3];\n if (!artifactUrlReferencesId(document[2], \"document\", id)) continue;\n artifacts.push({\n kind: \"document\",\n title: document[1],\n url: document[2],\n id,\n });\n continue;\n }\n\n const dashboard = line.match(\n /^- Dashboard(?:\\s+\"([^\"]+)\")?:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+)\\)$/,\n );\n if (dashboard) {\n const id = dashboard[3];\n if (!artifactUrlReferencesId(dashboard[2], \"dashboard\", id)) continue;\n artifacts.push({\n kind: \"dashboard\",\n title: dashboard[1],\n url: dashboard[2],\n id,\n });\n continue;\n }\n\n const analysis = line.match(\n /^- (?:Analysis|Report)(?:\\s+\"([^\"]+)\")?:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+)\\)$/,\n );\n if (analysis) {\n const id = analysis[3];\n if (!artifactUrlReferencesId(analysis[2], \"analysis\", id)) continue;\n artifacts.push({\n kind: \"analysis\",\n title: analysis[1],\n url: analysis[2],\n id,\n });\n continue;\n }\n\n const image = line.match(\n /^- Image(?:\\s+\"([^\"]+)\")?:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+)(?:,\\s*Run:\\s*([A-Za-z0-9_-]+))?\\)$/,\n );\n if (image) {\n const id = image[3];\n if (!artifactUrlReferencesId(image[2], \"image\", id)) continue;\n artifacts.push({\n kind: \"image\",\n title: image[1],\n url: image[2],\n id,\n runId: image[4],\n });\n continue;\n }\n\n const design = line.match(\n /^- Design:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+),\\s*(\\d+)\\s+files?\\)$/,\n );\n if (design) {\n const id = design[2];\n if (!artifactUrlReferencesId(design[1], \"design\", id)) continue;\n artifacts.push({\n kind: \"design\",\n url: design[1],\n id,\n fileCount: Number(design[3]),\n });\n }\n }\n return artifacts;\n}\n\nfunction downstreamArtifactLines(result: string): string[] {\n const lines = result.split(/\\r?\\n/);\n const artifactLines: string[] = [];\n\n for (let i = 0; i < lines.length; i += 1) {\n if (lines[i].trim() !== \"Artifacts:\") continue;\n\n let sawBlockLine = false;\n for (let j = i + 1; j < lines.length; j += 1) {\n const trimmed = lines[j].trim();\n if (!trimmed) {\n if (!sawBlockLine) continue;\n break;\n }\n if (!trimmed.startsWith(\"- \")) break;\n sawBlockLine = true;\n artifactLines.push(trimmed);\n }\n }\n\n return artifactLines;\n}\n\nfunction artifactUrlReferencesId(\n rawUrl: string,\n kind: ReferencedArtifactKind,\n id: string,\n): boolean {\n const reference = parseArtifactReferenceUrl(rawUrl);\n return reference?.kind === kind && reference.id === id;\n}\n\nfunction parseArtifactReferenceUrl(rawUrl: string): ReferencedArtifact | null {\n let url: URL;\n try {\n url = new URL(rawUrl, \"https://agent-native-artifact.invalid\");\n } catch {\n return null;\n }\n\n if (url.protocol !== \"http:\" && url.protocol !== \"https:\") return null;\n\n const path = url.pathname.replace(/\\/+$/, \"\");\n const deck = path.match(/(?:^|\\/)deck\\/([A-Za-z0-9_-]+)(?:\\/present)?$/);\n if (deck) return { kind: \"deck\", id: deck[1] };\n\n const design = path.match(/(?:^|\\/)design\\/([A-Za-z0-9_-]+)$/);\n if (design) return { kind: \"design\", id: design[1] };\n\n const document = path.match(/(?:^|\\/)page\\/([A-Za-z0-9_-]+)$/);\n if (document) return { kind: \"document\", id: document[1] };\n\n const dashboard = path.match(/(?:^|\\/)adhoc\\/([A-Za-z0-9_-]+)$/);\n if (dashboard) return { kind: \"dashboard\", id: dashboard[1] };\n\n const analysis = path.match(/(?:^|\\/)analyses\\/([A-Za-z0-9_-]+)$/);\n if (analysis) return { kind: \"analysis\", id: analysis[1] };\n\n const image = path.match(/(?:^|\\/)image\\/([A-Za-z0-9_-]+)$/);\n if (image) return { kind: \"image\", id: image[1] };\n\n const imageEmbed = path.match(/(?:^|\\/)asset\\/([A-Za-z0-9_-]+)\\/embed$/);\n if (imageEmbed) return { kind: \"image\", id: imageEmbed[1] };\n\n const imageContent = path.match(\n /(?:^|\\/)api\\/assets\\/([A-Za-z0-9_-]+)\\/content$/,\n );\n if (imageContent) return { kind: \"image\", id: imageContent[1] };\n\n return null;\n}\n\nfunction formatDocumentLine(\n document: CreatedDocumentArtifact,\n baseUrl: string | undefined,\n): string {\n const label = document.title ? `Document \"${document.title}\"` : \"Document\";\n return `- ${label}: ${artifactUrlFromResult({ url: document.url }, `/page/${document.id}`, baseUrl)} (ID: ${document.id})`;\n}\n\nfunction formatDeckLine(\n deck: CreatedDeckArtifact,\n baseUrl: string | undefined,\n): string {\n return `- Deck: ${artifactUrlFromResult({ url: deck.url }, `/deck/${deck.id}`, baseUrl)} (ID: ${deck.id})`;\n}\n\nfunction formatDashboardLine(\n dashboard: CreatedDashboardArtifact,\n baseUrl: string | undefined,\n): string {\n const label = dashboard.title\n ? `Dashboard \"${dashboard.title}\"`\n : \"Dashboard\";\n return `- ${label}: ${artifactUrlFromResult({ url: dashboard.url }, `/adhoc/${dashboard.id}`, baseUrl)} (ID: ${dashboard.id})`;\n}\n\nfunction formatAnalysisLine(\n analysis: CreatedAnalysisArtifact,\n baseUrl: string | undefined,\n): string {\n const label = analysis.title ? `Report \"${analysis.title}\"` : \"Report\";\n return `- ${label}: ${artifactUrlFromResult({ url: analysis.url }, `/analyses/${analysis.id}`, baseUrl)} (ID: ${analysis.id})`;\n}\n\nfunction formatImageLine(\n image: CreatedImageArtifact,\n baseUrl: string | undefined,\n): string {\n const label = image.title ? `Image \"${image.title}\"` : \"Image\";\n const run = image.runId ? `, Run: ${image.runId}` : \"\";\n return `- ${label}: ${artifactUrlFromResult({ url: image.url }, `/image/${image.id}`, baseUrl)} (ID: ${image.id}${run})`;\n}\n\nfunction formatDesignLine(\n design: GeneratedDesignArtifact,\n baseUrl: string | undefined,\n): string {\n const fileLabel =\n design.fileCount === 1 ? \"1 file\" : `${design.fileCount} files`;\n return `- Design: ${artifactUrlFromResult({ url: design.url }, `/design/${design.id}`, baseUrl)} (ID: ${design.id}, ${fileLabel})`;\n}\n\nfunction formatIncompleteDesignMessage(shells: CreatedDesignShell[]): string {\n const ids = shells.map((shell) => shell.id).join(\", \");\n const noun = shells.length === 1 ? \"project shell\" : \"project shells\";\n return (\n `The design is not ready yet. Design ${noun} ${ids} ` +\n \"exists, but no renderable files were saved, so I cannot return it as a completed artifact.\"\n );\n}\n\nfunction collectReferencedArtifacts(\n text: string,\n baseUrl: string | undefined,\n): ReferencedArtifact[] {\n const refs = new Map<string, ReferencedArtifact>();\n const baseOrigin = safeOrigin(baseUrl);\n const artifactUrlPattern =\n /(?:(https?:\\/\\/[^/\\s<>()]+))?(?:\\/[^\\s<>()]*)?\\/(deck|design|page|adhoc|analyses|image|asset|assets)\\/([A-Za-z0-9_-]+)/g;\n\n for (const match of text.matchAll(artifactUrlPattern)) {\n const origin = safeOrigin(match[1]);\n const route = match[2];\n const id = match[3];\n const kind: ReferencedArtifactKind =\n route === \"deck\"\n ? \"deck\"\n : route === \"design\"\n ? \"design\"\n : route === \"page\"\n ? \"document\"\n : route === \"adhoc\"\n ? \"dashboard\"\n : route === \"analyses\"\n ? \"analysis\"\n : \"image\";\n if (!shouldValidateArtifactReference(origin, baseOrigin, kind)) continue;\n refs.set(`${kind}:${id}`, { kind, id });\n }\n\n return [...refs.values()];\n}\n\nfunction safeOrigin(url: string | undefined): string | undefined {\n if (!url) return undefined;\n try {\n return new URL(url).origin;\n } catch {\n return undefined;\n }\n}\n\nconst KNOWN_AGENT_NATIVE_ARTIFACT_HOSTS: Record<\n ReferencedArtifactKind,\n ReadonlySet<string>\n> = {\n deck: new Set([\"slides.agent-native.com\"]),\n design: new Set([\"design.agent-native.com\"]),\n document: new Set([\"content.agent-native.com\"]),\n dashboard: new Set([\"analytics.agent-native.com\"]),\n analysis: new Set([\"analytics.agent-native.com\"]),\n image: new Set([\"assets.agent-native.com\", \"images.agent-native.com\"]),\n};\n\nfunction safeHostnameFromOrigin(\n origin: string | undefined,\n): string | undefined {\n if (!origin) return undefined;\n try {\n return new URL(origin).hostname.toLowerCase();\n } catch {\n return undefined;\n }\n}\n\nfunction shouldValidateArtifactReference(\n origin: string | undefined,\n baseOrigin: string | undefined,\n kind: ReferencedArtifactKind,\n): boolean {\n if (!origin || !baseOrigin || origin === baseOrigin) return true;\n\n const hostname = safeHostnameFromOrigin(origin);\n return !!hostname && KNOWN_AGENT_NATIVE_ARTIFACT_HOSTS[kind].has(hostname);\n}\n\nfunction findUnverifiedArtifactReferences(\n text: string,\n baseUrl: string | undefined,\n documents: CreatedDocumentArtifact[],\n decks: CreatedDeckArtifact[],\n dashboards: CreatedDashboardArtifact[],\n analyses: CreatedAnalysisArtifact[],\n images: CreatedImageArtifact[],\n generatedDesigns: GeneratedDesignArtifact[],\n): ReferencedArtifact[] {\n const documentIds = new Set(documents.map((document) => document.id));\n const deckIds = new Set(decks.map((deck) => deck.id));\n const dashboardIds = new Set(dashboards.map((dashboard) => dashboard.id));\n const analysisIds = new Set(analyses.map((analysis) => analysis.id));\n const imageIds = new Set(images.map((image) => image.id));\n const designIds = new Set(generatedDesigns.map((design) => design.id));\n\n return collectReferencedArtifacts(text, baseUrl).filter((ref) => {\n if (ref.kind === \"document\") return !documentIds.has(ref.id);\n if (ref.kind === \"deck\") return !deckIds.has(ref.id);\n if (ref.kind === \"dashboard\") return !dashboardIds.has(ref.id);\n if (ref.kind === \"analysis\") return !analysisIds.has(ref.id);\n if (ref.kind === \"image\") return !imageIds.has(ref.id);\n return !designIds.has(ref.id);\n });\n}\n\nfunction formatUnverifiedArtifactMessage(\n refs: ReferencedArtifact[],\n documents: CreatedDocumentArtifact[],\n decks: CreatedDeckArtifact[],\n dashboards: CreatedDashboardArtifact[],\n analyses: CreatedAnalysisArtifact[],\n images: CreatedImageArtifact[],\n generatedDesigns: GeneratedDesignArtifact[],\n baseUrl: string | undefined,\n): string {\n const hasOnlyDesigns = refs.every((ref) => ref.kind === \"design\");\n const hasOnlyDocuments = refs.every((ref) => ref.kind === \"document\");\n const hasOnlyDecks = refs.every((ref) => ref.kind === \"deck\");\n const hasOnlyDashboards = refs.every((ref) => ref.kind === \"dashboard\");\n const hasOnlyAnalyses = refs.every((ref) => ref.kind === \"analysis\");\n const hasOnlyImages = refs.every((ref) => ref.kind === \"image\");\n const label = hasOnlyDesigns\n ? \"design URL\"\n : hasOnlyDocuments\n ? \"document URL\"\n : hasOnlyDecks\n ? \"deck URL\"\n : hasOnlyDashboards\n ? \"dashboard URL\"\n : hasOnlyAnalyses\n ? \"report URL\"\n : hasOnlyImages\n ? \"image URL\"\n : \"artifact URL\";\n const plural = refs.length === 1 ? label : `${label}s`;\n const message = `I could not verify the ${plural} in the final answer against a successful artifact action that saved app data, so I cannot return it.`;\n const verifiedLines = [\n ...documents.map((document) => formatDocumentLine(document, baseUrl)),\n ...decks.map((deck) => formatDeckLine(deck, baseUrl)),\n ...dashboards.map((dashboard) => formatDashboardLine(dashboard, baseUrl)),\n ...analyses.map((analysis) => formatAnalysisLine(analysis, baseUrl)),\n ...images.map((image) => formatImageLine(image, baseUrl)),\n ...generatedDesigns.map((design) => formatDesignLine(design, baseUrl)),\n ];\n\n return verifiedLines.length > 0\n ? `${message}\\n\\nArtifacts:\\n${verifiedLines.join(\"\\n\")}`\n : message;\n}\n\nexport function appendA2AArtifactLinks(\n responseText: string,\n toolResults: A2AToolResultSummary[],\n options: A2AArtifactResponseOptions = {},\n): string {\n const baseUrl = normalizeBaseUrl(options.baseUrl);\n const includeReferencedArtifacts =\n options.includeReferencedArtifacts ?? false;\n const {\n documents,\n decks,\n dashboards,\n analyses,\n images,\n designShells,\n generatedDesigns,\n } = collectArtifacts(toolResults);\n const generatedDesignIds = new Set(\n generatedDesigns.map((design) => design.id),\n );\n const incompleteShells = designShells.filter(\n (shell) => !generatedDesignIds.has(shell.id),\n );\n\n let text = responseText.trim() === \"(no response)\" ? \"\" : responseText.trim();\n\n if (\n generatedDesigns.length === 0 &&\n incompleteShells.length > 0 &&\n !responseAlreadyWarnsIncompleteDesign(text) &&\n (incompleteShells.some((shell) =>\n responseMentionsDesignShell(text, shell),\n ) ||\n /\\b(?:done|created|ready|here(?:'s| is)|complete|finished)\\b/i.test(text))\n ) {\n return formatIncompleteDesignMessage(incompleteShells);\n }\n\n const unverifiedRefs = findUnverifiedArtifactReferences(\n text,\n baseUrl,\n documents,\n decks,\n dashboards,\n analyses,\n images,\n generatedDesigns,\n );\n if (unverifiedRefs.length > 0) {\n return formatUnverifiedArtifactMessage(\n unverifiedRefs,\n documents,\n decks,\n dashboards,\n analyses,\n images,\n generatedDesigns,\n baseUrl,\n );\n }\n\n const missingLines: string[] = [];\n for (const document of documents) {\n const path = `/page/${document.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatDocumentLine(document, baseUrl));\n }\n }\n for (const deck of decks) {\n const path = `/deck/${deck.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatDeckLine(deck, baseUrl));\n }\n }\n for (const dashboard of dashboards) {\n const path = `/adhoc/${dashboard.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatDashboardLine(dashboard, baseUrl));\n }\n }\n for (const analysis of analyses) {\n const path = `/analyses/${analysis.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatAnalysisLine(analysis, baseUrl));\n }\n }\n for (const image of images) {\n const path = `/image/${image.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatImageLine(image, baseUrl));\n }\n }\n for (const design of generatedDesigns) {\n const path = `/design/${design.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatDesignLine(design, baseUrl));\n }\n }\n\n if (missingLines.length === 0) return text;\n const artifactBlock = `Artifacts:\\n${missingLines.join(\"\\n\")}`;\n return text ? `${text}\\n\\n${artifactBlock}` : artifactBlock;\n}\n\nexport function buildA2ARecoverableArtifactMessage(\n toolResults: A2AToolResultSummary[],\n options: A2AArtifactResponseOptions = {},\n): string | null {\n const baseUrl = normalizeBaseUrl(options.baseUrl);\n const { documents, decks, dashboards, analyses, images, generatedDesigns } =\n collectArtifacts(toolResults);\n const lines = [\n ...documents.map((document) => formatDocumentLine(document, baseUrl)),\n ...decks.map((deck) => formatDeckLine(deck, baseUrl)),\n ...dashboards.map((dashboard) => formatDashboardLine(dashboard, baseUrl)),\n ...analyses.map((analysis) => formatAnalysisLine(analysis, baseUrl)),\n ...images.map((image) => formatImageLine(image, baseUrl)),\n ...generatedDesigns.map((design) => formatDesignLine(design, baseUrl)),\n ];\n\n if (lines.length === 0) return null;\n return [\n \"The agent is still working on the full response, but these verified artifacts already exist:\",\n \"\",\n \"Artifacts:\",\n ...lines,\n ].join(\"\\n\");\n}\n"]}
|
|
1
|
+
{"version":3,"file":"artifact-response.js","sourceRoot":"","sources":["../../src/a2a/artifact-response.ts"],"names":[],"mappings":"AA6EA,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAChE,CAAC,CAAE,KAAiC;QACpC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9E,CAAC;AAED,SAAS,mBAAmB,CAAC,MAAc;IACzC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAE7D,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,0EAA0E;QAC1E,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACxC,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC3C,IAAI,UAAU,GAAG,CAAC,IAAI,SAAS,IAAI,UAAU;YAAE,OAAO,IAAI,CAAC;QAC3D,IAAI,CAAC;YACH,OAAO,QAAQ,CAAC,IA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FAA8F;QAC9F,EAAE;QACF,YAAY;QACZ,GAAG,KAAK;KACT,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC","sourcesContent":["export interface A2AToolResultSummary {\n tool: string;\n result: string;\n}\n\nexport interface A2AArtifactResponseOptions {\n baseUrl?: string;\n includeReferencedArtifacts?: boolean;\n}\n\ninterface CreatedDocumentArtifact {\n id: string;\n title?: string;\n url?: string;\n}\n\ninterface CreatedDesignShell {\n id: string;\n title?: string;\n}\n\ninterface GeneratedDesignArtifact {\n id: string;\n fileCount: number;\n url?: string;\n}\n\ninterface CreatedDeckArtifact {\n id: string;\n url?: string;\n}\n\ninterface CreatedDashboardArtifact {\n id: string;\n title?: string;\n url?: string;\n}\n\ninterface CreatedAnalysisArtifact {\n id: string;\n title?: string;\n url?: string;\n}\n\ninterface CreatedImageArtifact {\n id: string;\n runId?: string;\n title?: string;\n url?: string;\n}\n\ninterface CreatedMonitorArtifact {\n id: string;\n name?: string;\n url: string;\n}\n\ninterface CreatedFormArtifact {\n id: string;\n title?: string;\n url: string;\n anonymous: boolean;\n}\n\ntype ReferencedArtifactKind =\n | \"deck\"\n | \"design\"\n | \"document\"\n | \"dashboard\"\n | \"analysis\"\n | \"image\";\n\ninterface ReferencedArtifact {\n kind: ReferencedArtifactKind;\n id: string;\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | null {\n return value && typeof value === \"object\" && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : null;\n}\n\nfunction stringValue(value: unknown): string | undefined {\n return typeof value === \"string\" && value.trim() ? value.trim() : undefined;\n}\n\nfunction parseToolResultJson(result: string): Record<string, unknown> | null {\n const trimmed = result.trim();\n if (!trimmed || /^Error(?:\\s|:)/i.test(trimmed)) return null;\n\n try {\n return asRecord(JSON.parse(trimmed));\n } catch {\n // Dev shell wrappers may include console output before the returned JSON.\n const firstBrace = trimmed.indexOf(\"{\");\n const lastBrace = trimmed.lastIndexOf(\"}\");\n if (firstBrace < 0 || lastBrace <= firstBrace) return null;\n try {\n return asRecord(JSON.parse(trimmed.slice(firstBrace, lastBrace + 1)));\n } catch {\n return null;\n }\n }\n}\n\nfunction normalizeBaseUrl(baseUrl: string | undefined): string | undefined {\n const trimmed = baseUrl?.trim();\n return trimmed ? trimmed.replace(/\\/+$/, \"\") : undefined;\n}\n\nfunction artifactUrl(baseUrl: string | undefined, path: string): string {\n const base = normalizeBaseUrl(baseUrl);\n return base ? `${base}${path}` : path;\n}\n\nfunction artifactUrlFromResult(\n parsed: Record<string, unknown>,\n fallbackPath: string,\n baseUrl: string | undefined,\n): string {\n const explicitUrl = stringValue(parsed.url) ?? stringValue(parsed.urlPath);\n if (!explicitUrl) return artifactUrl(baseUrl, fallbackPath);\n if (explicitUrl.startsWith(\"/\")) return artifactUrl(baseUrl, explicitUrl);\n try {\n return new URL(explicitUrl).toString();\n } catch {\n return artifactUrl(baseUrl, fallbackPath);\n }\n}\n\nfunction responseAlreadyMentionsPath(text: string, path: string): boolean {\n return text.includes(path);\n}\n\nfunction responseMentionsDesignShell(\n text: string,\n shell: CreatedDesignShell,\n): boolean {\n if (!text.trim()) return true;\n return text.includes(shell.id) || text.includes(`/design/${shell.id}`);\n}\n\nfunction responseAlreadyWarnsIncompleteDesign(text: string): boolean {\n return /(?:not ready|still working|processing|no renderable|no files|failed|could not|cannot|can't)/i.test(\n text,\n );\n}\n\nfunction isRenderableDesignFile(value: unknown): boolean {\n const file = asRecord(value);\n if (!file) return false;\n\n const filename = stringValue(file.filename);\n const fileType = stringValue(file.fileType);\n const hasRenderableType =\n fileType === \"html\" ||\n fileType === \"jsx\" ||\n filename?.endsWith(\".html\") ||\n filename?.endsWith(\".jsx\");\n if (!hasRenderableType) return false;\n\n return typeof file.content !== \"string\" || file.content.trim().length > 0;\n}\n\nfunction countRenderableDesignFiles(files: unknown): number {\n if (!Array.isArray(files)) return 0;\n return files.filter(isRenderableDesignFile).length;\n}\n\nfunction numberValue(value: unknown): number | undefined {\n return typeof value === \"number\" && Number.isFinite(value)\n ? value\n : undefined;\n}\n\nfunction deckIdValue(parsed: Record<string, unknown>): string | undefined {\n return stringValue(parsed.id) ?? stringValue(parsed.deckId);\n}\n\nfunction dashboardIdValue(parsed: Record<string, unknown>): string | undefined {\n return stringValue(parsed.id) ?? stringValue(parsed.dashboardId);\n}\n\nfunction analysisIdValue(parsed: Record<string, unknown>): string | undefined {\n return stringValue(parsed.id) ?? stringValue(parsed.analysisId);\n}\n\nfunction imageIdValue(parsed: Record<string, unknown>): string | undefined {\n return (\n stringValue(parsed.assetId) ??\n stringValue(parsed.imageId) ??\n stringValue(parsed.id)\n );\n}\n\nfunction contentDatabaseSubmissionArtifact(\n parsed: Record<string, unknown>,\n): CreatedDocumentArtifact | null {\n const id = stringValue(parsed.createdDocumentId);\n if (!id) return null;\n\n const verification = asRecord(parsed.verification);\n const candidates = [\n stringValue(parsed.url),\n stringValue(parsed.urlPath),\n stringValue(parsed.createdDocumentUrl),\n stringValue(verification?.url),\n stringValue(verification?.urlPath),\n ].filter((value): value is string => !!value);\n const url = candidates.find((candidate) =>\n artifactUrlReferencesId(candidate, \"document\", id),\n );\n\n const items = Array.isArray(parsed.items) ? parsed.items : [];\n const createdItem = items.map(asRecord).find((item) => {\n const document = asRecord(item?.document);\n return stringValue(document?.id) === id;\n });\n const createdDocument = asRecord(createdItem?.document);\n\n return {\n id,\n title:\n stringValue(parsed.createdDocumentTitle) ??\n stringValue(createdDocument?.title),\n url,\n };\n}\n\nfunction addImageArtifact(\n images: Map<string, CreatedImageArtifact>,\n parsed: Record<string, unknown>,\n): void {\n const id = imageIdValue(parsed);\n if (!id) return;\n images.set(id, {\n id,\n runId: stringValue(parsed.runId) ?? stringValue(parsed.generationRunId),\n title: stringValue(parsed.title),\n url:\n stringValue(parsed.pageUrl) ??\n stringValue(parsed.detailUrl) ??\n stringValue(parsed.url) ??\n stringValue(parsed.urlPath),\n });\n}\n\nfunction isReadyDeckArtifact(parsed: Record<string, unknown>): boolean {\n const slideCount = numberValue(parsed.slideCount);\n if (slideCount !== undefined) return slideCount > 0;\n if (Array.isArray(parsed.slides)) return parsed.slides.length > 0;\n return true;\n}\n\nfunction addDeckArtifact(\n decks: Map<string, CreatedDeckArtifact>,\n parsed: Record<string, unknown>,\n options: { requireReady: boolean },\n): void {\n const id = deckIdValue(parsed);\n if (!id) return;\n if (options.requireReady && !isReadyDeckArtifact(parsed)) return;\n decks.set(id, {\n id,\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n}\n\nfunction addListedDeckArtifacts(\n decks: Map<string, CreatedDeckArtifact>,\n parsed: Record<string, unknown>,\n): void {\n const items = parsed.decks;\n if (!Array.isArray(items)) return;\n for (const item of items) {\n const deck = asRecord(item);\n if (!deck) continue;\n addDeckArtifact(decks, deck, { requireReady: false });\n }\n}\n\nfunction collectArtifacts(results: A2AToolResultSummary[]): {\n documents: CreatedDocumentArtifact[];\n decks: CreatedDeckArtifact[];\n dashboards: CreatedDashboardArtifact[];\n analyses: CreatedAnalysisArtifact[];\n images: CreatedImageArtifact[];\n designShells: CreatedDesignShell[];\n generatedDesigns: GeneratedDesignArtifact[];\n monitors: CreatedMonitorArtifact[];\n forms: CreatedFormArtifact[];\n} {\n const documents = new Map<string, CreatedDocumentArtifact>();\n const decks = new Map<string, CreatedDeckArtifact>();\n const dashboards = new Map<string, CreatedDashboardArtifact>();\n const analyses = new Map<string, CreatedAnalysisArtifact>();\n const images = new Map<string, CreatedImageArtifact>();\n const designShells = new Map<string, CreatedDesignShell>();\n const generatedDesigns = new Map<string, GeneratedDesignArtifact>();\n const monitors = new Map<string, CreatedMonitorArtifact>();\n const forms = new Map<string, CreatedFormArtifact>();\n\n for (const toolResult of results) {\n if (toolResult.tool === \"call-agent\") {\n for (const artifact of parseDownstreamArtifactBlock(toolResult.result)) {\n if (artifact.kind === \"deck\") {\n decks.set(artifact.id, {\n id: artifact.id,\n url: artifact.url,\n });\n } else if (artifact.kind === \"document\") {\n documents.set(artifact.id, {\n id: artifact.id,\n title: artifact.title,\n url: artifact.url,\n });\n } else if (artifact.kind === \"dashboard\") {\n dashboards.set(artifact.id, {\n id: artifact.id,\n title: artifact.title,\n url: artifact.url,\n });\n } else if (artifact.kind === \"analysis\") {\n analyses.set(artifact.id, {\n id: artifact.id,\n title: artifact.title,\n url: artifact.url,\n });\n } else if (artifact.kind === \"image\") {\n images.set(artifact.id, {\n id: artifact.id,\n title: artifact.title,\n url: artifact.url,\n runId: artifact.runId,\n });\n } else if (artifact.kind === \"design\" && artifact.fileCount > 0) {\n generatedDesigns.set(artifact.id, {\n id: artifact.id,\n fileCount: artifact.fileCount,\n url: artifact.url,\n });\n }\n }\n continue;\n }\n\n const parsed = parseToolResultJson(toolResult.result);\n if (!parsed) continue;\n\n if (toolResult.tool === \"save-monitor\") {\n const id = stringValue(parsed.id);\n const url = stringValue(parsed.monitorAppUrl);\n if (id && url) {\n monitors.set(id, {\n id,\n name: stringValue(parsed.name),\n url,\n });\n }\n continue;\n }\n\n if (toolResult.tool === \"create-form\") {\n const id = stringValue(parsed.id);\n const url = stringValue(parsed.publicUrl);\n if (id && url && stringValue(parsed.status) === \"published\") {\n const settings = asRecord(parsed.settings);\n forms.set(id, {\n id,\n title: stringValue(parsed.title),\n url,\n anonymous: settings?.anonymous === true,\n });\n }\n continue;\n }\n\n if (\n toolResult.tool === \"submit-content-database-form\" ||\n toolResult.tool === \"add-database-item\"\n ) {\n const artifact = contentDatabaseSubmissionArtifact(parsed);\n if (artifact) documents.set(artifact.id, artifact);\n continue;\n }\n\n if (\n toolResult.tool === \"create-document\" ||\n toolResult.tool === \"get-document\" ||\n toolResult.tool === \"update-document\"\n ) {\n const id = stringValue(parsed.id);\n if (id) {\n documents.set(id, {\n id,\n title: stringValue(parsed.title),\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n continue;\n }\n\n if (\n toolResult.tool === \"create-deck\" ||\n toolResult.tool === \"duplicate-deck\"\n ) {\n addDeckArtifact(decks, parsed, { requireReady: true });\n continue;\n }\n\n if (toolResult.tool === \"get-deck\") {\n addDeckArtifact(decks, parsed, { requireReady: false });\n continue;\n }\n\n if (toolResult.tool === \"list-decks\") {\n addListedDeckArtifacts(decks, parsed);\n continue;\n }\n\n if (toolResult.tool === \"add-slide\") {\n const id = stringValue(parsed.deckId);\n const slideCount = numberValue(parsed.slideCount);\n if (id && slideCount !== undefined && slideCount > 0) {\n decks.set(id, {\n id,\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n continue;\n }\n\n if (\n toolResult.tool === \"update-dashboard\" ||\n toolResult.tool === \"rename-dashboard\" ||\n toolResult.tool === \"get-dashboard\"\n ) {\n const id = dashboardIdValue(parsed);\n if (id) {\n dashboards.set(id, {\n id,\n title: stringValue(parsed.name) ?? stringValue(parsed.title),\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n continue;\n }\n\n if (\n toolResult.tool === \"save-analysis\" ||\n toolResult.tool === \"get-analysis\"\n ) {\n const id = analysisIdValue(parsed);\n if (id) {\n analyses.set(id, {\n id,\n title: stringValue(parsed.name) ?? stringValue(parsed.title),\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n continue;\n }\n\n if (\n toolResult.tool === \"generate-image\" ||\n toolResult.tool === \"refine-image\" ||\n toolResult.tool === \"get-asset\" ||\n toolResult.tool === \"save-generated-image\" ||\n toolResult.tool === \"export-image\"\n ) {\n addImageArtifact(images, parsed);\n continue;\n }\n\n if (toolResult.tool === \"generate-image-batch\") {\n if (Array.isArray(parsed.images)) {\n for (const item of parsed.images) {\n const image = asRecord(item);\n if (!image || image.ok === false) continue;\n addImageArtifact(images, image);\n }\n }\n continue;\n }\n\n if (toolResult.tool === \"create-design\") {\n const id = stringValue(parsed.id);\n if (id) {\n designShells.set(id, { id, title: stringValue(parsed.title) });\n }\n continue;\n }\n\n if (toolResult.tool === \"get-design\") {\n const id = stringValue(parsed.id);\n if (!id) continue;\n\n const renderableFileCount = countRenderableDesignFiles(parsed.files);\n if (renderableFileCount > 0) {\n generatedDesigns.set(id, {\n id,\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n fileCount: Array.isArray(parsed.files)\n ? parsed.files.length\n : renderableFileCount,\n });\n } else {\n designShells.set(id, { id, title: stringValue(parsed.title) });\n }\n continue;\n }\n\n if (toolResult.tool === \"generate-design\") {\n const id = stringValue(parsed.designId);\n if (!id) continue;\n\n const savedFiles = Array.isArray(parsed.savedFiles)\n ? parsed.savedFiles\n : [];\n const fileCount = numberValue(parsed.fileCount) ?? savedFiles.length;\n\n if (fileCount > 0) {\n generatedDesigns.set(id, {\n id,\n fileCount,\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n continue;\n }\n\n if (toolResult.tool === \"create-file\") {\n const id = stringValue(parsed.designId);\n if (!id) continue;\n const renderable =\n parsed.renderable === true ||\n stringValue(parsed.fileType) === \"html\" ||\n stringValue(parsed.fileType) === \"jsx\";\n\n if (renderable) {\n const previous = generatedDesigns.get(id);\n generatedDesigns.set(id, {\n id,\n url:\n stringValue(parsed.url) ??\n stringValue(parsed.urlPath) ??\n previous?.url,\n fileCount: (previous?.fileCount ?? 0) + 1,\n });\n }\n }\n\n if (toolResult.tool === \"duplicate-design\") {\n const id = stringValue(parsed.id);\n const fileCount = numberValue(parsed.fileCount);\n if (id && fileCount && fileCount > 0) {\n generatedDesigns.set(id, {\n id,\n fileCount,\n url: stringValue(parsed.url) ?? stringValue(parsed.urlPath),\n });\n }\n }\n }\n\n return {\n documents: [...documents.values()],\n decks: [...decks.values()],\n dashboards: [...dashboards.values()],\n analyses: [...analyses.values()],\n images: [...images.values()],\n designShells: [...designShells.values()],\n generatedDesigns: [...generatedDesigns.values()],\n monitors: [...monitors.values()],\n forms: [...forms.values()],\n };\n}\n\ntype DownstreamArtifact =\n | { kind: \"deck\"; id: string; url: string }\n | { kind: \"document\"; id: string; url: string; title?: string }\n | { kind: \"dashboard\"; id: string; url: string; title?: string }\n | { kind: \"analysis\"; id: string; url: string; title?: string }\n | { kind: \"image\"; id: string; url: string; title?: string; runId?: string }\n | { kind: \"design\"; id: string; url: string; fileCount: number };\n\nfunction parseDownstreamArtifactBlock(result: string): DownstreamArtifact[] {\n const artifacts: DownstreamArtifact[] = [];\n for (const line of downstreamArtifactLines(result)) {\n const deck = line.match(\n /^- Deck(?:\\s+\"[^\"]+\")?(?:\\s+\\([^)]*\\))?:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+)\\)$/,\n );\n if (deck) {\n const id = deck[2];\n if (!artifactUrlReferencesId(deck[1], \"deck\", id)) continue;\n artifacts.push({\n kind: \"deck\",\n url: deck[1],\n id,\n });\n continue;\n }\n\n const document = line.match(\n /^- Document(?:\\s+\"([^\"]+)\")?:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+)\\)$/,\n );\n if (document) {\n const id = document[3];\n if (!artifactUrlReferencesId(document[2], \"document\", id)) continue;\n artifacts.push({\n kind: \"document\",\n title: document[1],\n url: document[2],\n id,\n });\n continue;\n }\n\n const dashboard = line.match(\n /^- Dashboard(?:\\s+\"([^\"]+)\")?:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+)\\)$/,\n );\n if (dashboard) {\n const id = dashboard[3];\n if (!artifactUrlReferencesId(dashboard[2], \"dashboard\", id)) continue;\n artifacts.push({\n kind: \"dashboard\",\n title: dashboard[1],\n url: dashboard[2],\n id,\n });\n continue;\n }\n\n const analysis = line.match(\n /^- (?:Analysis|Report)(?:\\s+\"([^\"]+)\")?:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+)\\)$/,\n );\n if (analysis) {\n const id = analysis[3];\n if (!artifactUrlReferencesId(analysis[2], \"analysis\", id)) continue;\n artifacts.push({\n kind: \"analysis\",\n title: analysis[1],\n url: analysis[2],\n id,\n });\n continue;\n }\n\n const image = line.match(\n /^- Image(?:\\s+\"([^\"]+)\")?:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+)(?:,\\s*Run:\\s*([A-Za-z0-9_-]+))?\\)$/,\n );\n if (image) {\n const id = image[3];\n if (!artifactUrlReferencesId(image[2], \"image\", id)) continue;\n artifacts.push({\n kind: \"image\",\n title: image[1],\n url: image[2],\n id,\n runId: image[4],\n });\n continue;\n }\n\n const design = line.match(\n /^- Design:\\s+(\\S+)\\s+\\(ID:\\s*([A-Za-z0-9_-]+),\\s*(\\d+)\\s+files?\\)$/,\n );\n if (design) {\n const id = design[2];\n if (!artifactUrlReferencesId(design[1], \"design\", id)) continue;\n artifacts.push({\n kind: \"design\",\n url: design[1],\n id,\n fileCount: Number(design[3]),\n });\n }\n }\n return artifacts;\n}\n\nfunction downstreamArtifactLines(result: string): string[] {\n const lines = result.split(/\\r?\\n/);\n const artifactLines: string[] = [];\n\n for (let i = 0; i < lines.length; i += 1) {\n if (lines[i].trim() !== \"Artifacts:\") continue;\n\n let sawBlockLine = false;\n for (let j = i + 1; j < lines.length; j += 1) {\n const trimmed = lines[j].trim();\n if (!trimmed) {\n if (!sawBlockLine) continue;\n break;\n }\n if (!trimmed.startsWith(\"- \")) break;\n sawBlockLine = true;\n artifactLines.push(trimmed);\n }\n }\n\n return artifactLines;\n}\n\nfunction artifactUrlReferencesId(\n rawUrl: string,\n kind: ReferencedArtifactKind,\n id: string,\n): boolean {\n const reference = parseArtifactReferenceUrl(rawUrl);\n return reference?.kind === kind && reference.id === id;\n}\n\nfunction parseArtifactReferenceUrl(rawUrl: string): ReferencedArtifact | null {\n let url: URL;\n try {\n url = new URL(rawUrl, \"https://agent-native-artifact.invalid\");\n } catch {\n return null;\n }\n\n if (url.protocol !== \"http:\" && url.protocol !== \"https:\") return null;\n\n const path = url.pathname.replace(/\\/+$/, \"\");\n const deck = path.match(/(?:^|\\/)deck\\/([A-Za-z0-9_-]+)(?:\\/present)?$/);\n if (deck) return { kind: \"deck\", id: deck[1] };\n\n const design = path.match(/(?:^|\\/)design\\/([A-Za-z0-9_-]+)$/);\n if (design) return { kind: \"design\", id: design[1] };\n\n const document = path.match(/(?:^|\\/)page\\/([A-Za-z0-9_-]+)$/);\n if (document) return { kind: \"document\", id: document[1] };\n\n const dashboard = path.match(/(?:^|\\/)adhoc\\/([A-Za-z0-9_-]+)$/);\n if (dashboard) return { kind: \"dashboard\", id: dashboard[1] };\n\n const analysis = path.match(/(?:^|\\/)analyses\\/([A-Za-z0-9_-]+)$/);\n if (analysis) return { kind: \"analysis\", id: analysis[1] };\n\n const image = path.match(/(?:^|\\/)image\\/([A-Za-z0-9_-]+)$/);\n if (image) return { kind: \"image\", id: image[1] };\n\n const imageEmbed = path.match(/(?:^|\\/)asset\\/([A-Za-z0-9_-]+)\\/embed$/);\n if (imageEmbed) return { kind: \"image\", id: imageEmbed[1] };\n\n const imageContent = path.match(\n /(?:^|\\/)api\\/assets\\/([A-Za-z0-9_-]+)\\/content$/,\n );\n if (imageContent) return { kind: \"image\", id: imageContent[1] };\n\n return null;\n}\n\nfunction formatDocumentLine(\n document: CreatedDocumentArtifact,\n baseUrl: string | undefined,\n): string {\n const label = document.title ? `Document \"${document.title}\"` : \"Document\";\n return `- ${label}: ${artifactUrlFromResult({ url: document.url }, `/page/${document.id}`, baseUrl)} (ID: ${document.id})`;\n}\n\nfunction formatDeckLine(\n deck: CreatedDeckArtifact,\n baseUrl: string | undefined,\n): string {\n return `- Deck: ${artifactUrlFromResult({ url: deck.url }, `/deck/${deck.id}`, baseUrl)} (ID: ${deck.id})`;\n}\n\nfunction formatDashboardLine(\n dashboard: CreatedDashboardArtifact,\n baseUrl: string | undefined,\n): string {\n const label = dashboard.title\n ? `Dashboard \"${dashboard.title}\"`\n : \"Dashboard\";\n return `- ${label}: ${artifactUrlFromResult({ url: dashboard.url }, `/adhoc/${dashboard.id}`, baseUrl)} (ID: ${dashboard.id})`;\n}\n\nfunction formatAnalysisLine(\n analysis: CreatedAnalysisArtifact,\n baseUrl: string | undefined,\n): string {\n const label = analysis.title ? `Report \"${analysis.title}\"` : \"Report\";\n return `- ${label}: ${artifactUrlFromResult({ url: analysis.url }, `/analyses/${analysis.id}`, baseUrl)} (ID: ${analysis.id})`;\n}\n\nfunction formatImageLine(\n image: CreatedImageArtifact,\n baseUrl: string | undefined,\n): string {\n const label = image.title ? `Image \"${image.title}\"` : \"Image\";\n const run = image.runId ? `, Run: ${image.runId}` : \"\";\n return `- ${label}: ${artifactUrlFromResult({ url: image.url }, `/image/${image.id}`, baseUrl)} (ID: ${image.id}${run})`;\n}\n\nfunction formatDesignLine(\n design: GeneratedDesignArtifact,\n baseUrl: string | undefined,\n): string {\n const fileLabel =\n design.fileCount === 1 ? \"1 file\" : `${design.fileCount} files`;\n return `- Design: ${artifactUrlFromResult({ url: design.url }, `/design/${design.id}`, baseUrl)} (ID: ${design.id}, ${fileLabel})`;\n}\n\nfunction formatMonitorLine(monitor: CreatedMonitorArtifact): string {\n const label = monitor.name ? `Monitor \"${monitor.name}\"` : \"Monitor\";\n return `- ${label}: ${monitor.url} (ID: ${monitor.id})`;\n}\n\nfunction formatFormLine(form: CreatedFormArtifact): string {\n const kind = form.anonymous ? \"Anonymous form\" : \"Public form\";\n const label = form.title ? `${kind} \"${form.title}\"` : kind;\n return `- ${label}: ${form.url} (ID: ${form.id})`;\n}\n\nfunction formatIncompleteDesignMessage(shells: CreatedDesignShell[]): string {\n const ids = shells.map((shell) => shell.id).join(\", \");\n const noun = shells.length === 1 ? \"project shell\" : \"project shells\";\n return (\n `The design is not ready yet. Design ${noun} ${ids} ` +\n \"exists, but no renderable files were saved, so I cannot return it as a completed artifact.\"\n );\n}\n\nfunction collectReferencedArtifacts(\n text: string,\n baseUrl: string | undefined,\n): ReferencedArtifact[] {\n const refs = new Map<string, ReferencedArtifact>();\n const baseOrigin = safeOrigin(baseUrl);\n const artifactUrlPattern =\n /(?:(https?:\\/\\/[^/\\s<>()]+))?(?:\\/[^\\s<>()]*)?\\/(deck|design|page|adhoc|analyses|image|asset|assets)\\/([A-Za-z0-9_-]+)/g;\n\n for (const match of text.matchAll(artifactUrlPattern)) {\n const origin = safeOrigin(match[1]);\n const route = match[2];\n const id = match[3];\n const kind: ReferencedArtifactKind =\n route === \"deck\"\n ? \"deck\"\n : route === \"design\"\n ? \"design\"\n : route === \"page\"\n ? \"document\"\n : route === \"adhoc\"\n ? \"dashboard\"\n : route === \"analyses\"\n ? \"analysis\"\n : \"image\";\n if (!shouldValidateArtifactReference(origin, baseOrigin, kind)) continue;\n refs.set(`${kind}:${id}`, { kind, id });\n }\n\n return [...refs.values()];\n}\n\nfunction safeOrigin(url: string | undefined): string | undefined {\n if (!url) return undefined;\n try {\n return new URL(url).origin;\n } catch {\n return undefined;\n }\n}\n\nconst KNOWN_AGENT_NATIVE_ARTIFACT_HOSTS: Record<\n ReferencedArtifactKind,\n ReadonlySet<string>\n> = {\n deck: new Set([\"slides.agent-native.com\"]),\n design: new Set([\"design.agent-native.com\"]),\n document: new Set([\"content.agent-native.com\"]),\n dashboard: new Set([\"analytics.agent-native.com\"]),\n analysis: new Set([\"analytics.agent-native.com\"]),\n image: new Set([\"assets.agent-native.com\", \"images.agent-native.com\"]),\n};\n\nfunction safeHostnameFromOrigin(\n origin: string | undefined,\n): string | undefined {\n if (!origin) return undefined;\n try {\n return new URL(origin).hostname.toLowerCase();\n } catch {\n return undefined;\n }\n}\n\nfunction shouldValidateArtifactReference(\n origin: string | undefined,\n baseOrigin: string | undefined,\n kind: ReferencedArtifactKind,\n): boolean {\n if (!origin || !baseOrigin || origin === baseOrigin) return true;\n\n const hostname = safeHostnameFromOrigin(origin);\n return !!hostname && KNOWN_AGENT_NATIVE_ARTIFACT_HOSTS[kind].has(hostname);\n}\n\nfunction findUnverifiedArtifactReferences(\n text: string,\n baseUrl: string | undefined,\n documents: CreatedDocumentArtifact[],\n decks: CreatedDeckArtifact[],\n dashboards: CreatedDashboardArtifact[],\n analyses: CreatedAnalysisArtifact[],\n images: CreatedImageArtifact[],\n generatedDesigns: GeneratedDesignArtifact[],\n): ReferencedArtifact[] {\n const documentIds = new Set(documents.map((document) => document.id));\n const deckIds = new Set(decks.map((deck) => deck.id));\n const dashboardIds = new Set(dashboards.map((dashboard) => dashboard.id));\n const analysisIds = new Set(analyses.map((analysis) => analysis.id));\n const imageIds = new Set(images.map((image) => image.id));\n const designIds = new Set(generatedDesigns.map((design) => design.id));\n\n return collectReferencedArtifacts(text, baseUrl).filter((ref) => {\n if (ref.kind === \"document\") return !documentIds.has(ref.id);\n if (ref.kind === \"deck\") return !deckIds.has(ref.id);\n if (ref.kind === \"dashboard\") return !dashboardIds.has(ref.id);\n if (ref.kind === \"analysis\") return !analysisIds.has(ref.id);\n if (ref.kind === \"image\") return !imageIds.has(ref.id);\n return !designIds.has(ref.id);\n });\n}\n\nfunction formatUnverifiedArtifactMessage(\n refs: ReferencedArtifact[],\n documents: CreatedDocumentArtifact[],\n decks: CreatedDeckArtifact[],\n dashboards: CreatedDashboardArtifact[],\n analyses: CreatedAnalysisArtifact[],\n images: CreatedImageArtifact[],\n generatedDesigns: GeneratedDesignArtifact[],\n baseUrl: string | undefined,\n): string {\n const hasOnlyDesigns = refs.every((ref) => ref.kind === \"design\");\n const hasOnlyDocuments = refs.every((ref) => ref.kind === \"document\");\n const hasOnlyDecks = refs.every((ref) => ref.kind === \"deck\");\n const hasOnlyDashboards = refs.every((ref) => ref.kind === \"dashboard\");\n const hasOnlyAnalyses = refs.every((ref) => ref.kind === \"analysis\");\n const hasOnlyImages = refs.every((ref) => ref.kind === \"image\");\n const label = hasOnlyDesigns\n ? \"design URL\"\n : hasOnlyDocuments\n ? \"document URL\"\n : hasOnlyDecks\n ? \"deck URL\"\n : hasOnlyDashboards\n ? \"dashboard URL\"\n : hasOnlyAnalyses\n ? \"report URL\"\n : hasOnlyImages\n ? \"image URL\"\n : \"artifact URL\";\n const plural = refs.length === 1 ? label : `${label}s`;\n const message = `I could not verify the ${plural} in the final answer against a successful artifact action that saved app data, so I cannot return it.`;\n const verifiedLines = [\n ...documents.map((document) => formatDocumentLine(document, baseUrl)),\n ...decks.map((deck) => formatDeckLine(deck, baseUrl)),\n ...dashboards.map((dashboard) => formatDashboardLine(dashboard, baseUrl)),\n ...analyses.map((analysis) => formatAnalysisLine(analysis, baseUrl)),\n ...images.map((image) => formatImageLine(image, baseUrl)),\n ...generatedDesigns.map((design) => formatDesignLine(design, baseUrl)),\n ];\n\n return verifiedLines.length > 0\n ? `${message}\\n\\nArtifacts:\\n${verifiedLines.join(\"\\n\")}`\n : message;\n}\n\nexport function appendA2AArtifactLinks(\n responseText: string,\n toolResults: A2AToolResultSummary[],\n options: A2AArtifactResponseOptions = {},\n): string {\n const baseUrl = normalizeBaseUrl(options.baseUrl);\n const includeReferencedArtifacts =\n options.includeReferencedArtifacts ?? false;\n const {\n documents,\n decks,\n dashboards,\n analyses,\n images,\n designShells,\n generatedDesigns,\n monitors,\n forms,\n } = collectArtifacts(toolResults);\n const generatedDesignIds = new Set(\n generatedDesigns.map((design) => design.id),\n );\n const incompleteShells = designShells.filter(\n (shell) => !generatedDesignIds.has(shell.id),\n );\n\n let text = responseText.trim() === \"(no response)\" ? \"\" : responseText.trim();\n\n if (\n generatedDesigns.length === 0 &&\n incompleteShells.length > 0 &&\n !responseAlreadyWarnsIncompleteDesign(text) &&\n (incompleteShells.some((shell) =>\n responseMentionsDesignShell(text, shell),\n ) ||\n /\\b(?:done|created|ready|here(?:'s| is)|complete|finished)\\b/i.test(text))\n ) {\n return formatIncompleteDesignMessage(incompleteShells);\n }\n\n const unverifiedRefs = findUnverifiedArtifactReferences(\n text,\n baseUrl,\n documents,\n decks,\n dashboards,\n analyses,\n images,\n generatedDesigns,\n );\n if (unverifiedRefs.length > 0) {\n return formatUnverifiedArtifactMessage(\n unverifiedRefs,\n documents,\n decks,\n dashboards,\n analyses,\n images,\n generatedDesigns,\n baseUrl,\n );\n }\n\n const missingLines: string[] = [];\n for (const document of documents) {\n const path = `/page/${document.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatDocumentLine(document, baseUrl));\n }\n }\n for (const deck of decks) {\n const path = `/deck/${deck.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatDeckLine(deck, baseUrl));\n }\n }\n for (const dashboard of dashboards) {\n const path = `/adhoc/${dashboard.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatDashboardLine(dashboard, baseUrl));\n }\n }\n for (const analysis of analyses) {\n const path = `/analyses/${analysis.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatAnalysisLine(analysis, baseUrl));\n }\n }\n for (const image of images) {\n const path = `/image/${image.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatImageLine(image, baseUrl));\n }\n }\n for (const design of generatedDesigns) {\n const path = `/design/${design.id}`;\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, path)\n ) {\n missingLines.push(formatDesignLine(design, baseUrl));\n }\n }\n for (const monitor of monitors) {\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, monitor.url)\n ) {\n missingLines.push(formatMonitorLine(monitor));\n }\n }\n for (const form of forms) {\n if (\n includeReferencedArtifacts ||\n !responseAlreadyMentionsPath(text, form.url)\n ) {\n missingLines.push(formatFormLine(form));\n }\n }\n\n if (missingLines.length === 0) return text;\n const artifactBlock = `Artifacts:\\n${missingLines.join(\"\\n\")}`;\n return text ? `${text}\\n\\n${artifactBlock}` : artifactBlock;\n}\n\nexport function buildA2ARecoverableArtifactMessage(\n toolResults: A2AToolResultSummary[],\n options: A2AArtifactResponseOptions = {},\n): string | null {\n const baseUrl = normalizeBaseUrl(options.baseUrl);\n const {\n documents,\n decks,\n dashboards,\n analyses,\n images,\n generatedDesigns,\n monitors,\n forms,\n } = collectArtifacts(toolResults);\n const lines = [\n ...documents.map((document) => formatDocumentLine(document, baseUrl)),\n ...decks.map((deck) => formatDeckLine(deck, baseUrl)),\n ...dashboards.map((dashboard) => formatDashboardLine(dashboard, baseUrl)),\n ...analyses.map((analysis) => formatAnalysisLine(analysis, baseUrl)),\n ...images.map((image) => formatImageLine(image, baseUrl)),\n ...generatedDesigns.map((design) => formatDesignLine(design, baseUrl)),\n ...monitors.map(formatMonitorLine),\n ...forms.map(formatFormLine),\n ];\n\n if (lines.length === 0) return null;\n return [\n \"The agent is still working on the full response, but these verified artifacts already exist:\",\n \"\",\n \"Artifacts:\",\n ...lines,\n ].join(\"\\n\");\n}\n"]}
|
package/dist/a2a/client.d.ts
CHANGED
|
@@ -114,5 +114,14 @@ export declare function callAgent(url: string, text: string, opts?: {
|
|
|
114
114
|
timeoutMs?: number;
|
|
115
115
|
/** Poll interval for async calls. Primarily useful for tests/retries. */
|
|
116
116
|
pollIntervalMs?: number;
|
|
117
|
+
/**
|
|
118
|
+
* Called with each successfully polled task while an async call is still
|
|
119
|
+
* in flight (see `A2AClient.sendAndWait`). Fires once per real poll
|
|
120
|
+
* round-trip that returns a task — including the terminal poll — so
|
|
121
|
+
* callers can surface genuine remote liveness/progress. Not called when a
|
|
122
|
+
* poll fetch throws (remote unresponsive) or when the task completes
|
|
123
|
+
* synchronously on submit. Only threaded through for async calls.
|
|
124
|
+
*/
|
|
125
|
+
onUpdate?: (task: Task) => void;
|
|
117
126
|
}): Promise<string>;
|
|
118
127
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/a2a/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/a2a/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,SAAS,EAGT,OAAO,EACP,IAAI,EACL,MAAM,YAAY,CAAC;AAEpB,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ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