@agent-native/core 0.93.0 → 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 +25 -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 +82 -39
- 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 +22 -9
- 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/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/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 +3 -3
- package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +3 -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/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/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 +3 -3
- package/corpus/core/docs/content/locales/de-DE/template-design.mdx +3 -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/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/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 +3 -3
- package/corpus/core/docs/content/locales/es-ES/template-design.mdx +3 -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/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/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 +3 -3
- package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +3 -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/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/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 +3 -3
- package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +3 -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/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/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 +3 -4
- package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +3 -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/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/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 +3 -4
- package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +3 -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/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/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 +3 -3
- package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +3 -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/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/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 +3 -4
- package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +3 -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/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/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 +3 -4
- package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +3 -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 +19 -11
- 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 +3 -3
- package/corpus/core/docs/content/template-content.mdx +23 -18
- package/corpus/core/docs/content/template-design.mdx +3 -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 +1 -1
- package/corpus/core/src/agent/context-xray/tokenize.ts +6 -1
- 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 +190 -6
- package/corpus/core/src/agent/run-manager.ts +5 -1
- package/corpus/core/src/application-state/index.ts +1 -0
- package/corpus/core/src/application-state/store.ts +32 -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/client/AgentPanel.tsx +41 -38
- package/corpus/core/src/client/AssistantChat.tsx +53 -5
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +33 -40
- package/corpus/core/src/client/appearance.ts +8 -5
- 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/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 +21 -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 +18 -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/use-chat-models.ts +17 -17
- package/corpus/core/src/client/use-db-sync.ts +108 -7
- 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/integrations/adapters/slack.ts +41 -2
- package/corpus/core/src/integrations/awaiting-input-store.ts +130 -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/index.ts +29 -1
- package/corpus/core/src/integrations/plugin.ts +231 -2
- 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/webhook-handler.ts +161 -2
- 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/secrets/register-framework-secrets.ts +27 -4
- package/corpus/core/src/server/agent-chat-plugin.ts +62 -8
- package/corpus/core/src/server/index.ts +16 -0
- package/corpus/core/src/server/realtime-voice.ts +590 -0
- package/corpus/core/src/shared/reasoning-effort.ts +61 -19
- package/corpus/core/src/styles/agent-conversation.css +17 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -5
- 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/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/CreateEventDialog.tsx +100 -13
- package/corpus/templates/calendar/app/components/calendar/DayView.tsx +12 -4
- 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/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/clips/.agents/skills/ai-video-tools/SKILL.md +12 -3
- package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +1 -1
- package/corpus/templates/clips/AGENTS.md +4 -2
- package/corpus/templates/clips/actions/regenerate-title.ts +53 -7
- package/corpus/templates/clips/actions/request-transcript.ts +152 -41
- package/corpus/templates/clips/actions/save-browser-transcript.ts +11 -9
- package/corpus/templates/clips/app/components/player/comments-panel.tsx +101 -53
- package/corpus/templates/clips/app/components/player/playback-comment-overlay.tsx +102 -0
- 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/routes/embed.$shareId.tsx +2 -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-recording-pause-and-resume-controls-now-respond-reliably-on-.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/src/app.tsx +70 -42
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +8 -14
- 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/pill-interaction.ts +19 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +90 -39
- package/corpus/templates/clips/desktop/src/lib/transcription-engine.ts +3 -2
- 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/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/whisper_speech.rs +80 -5
- package/corpus/templates/clips/desktop/src-tauri/tauri.conf.json +1 -1
- package/corpus/templates/clips/vitest.config.ts +23 -0
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +28 -9
- package/corpus/templates/content/changelog/2026-07-10-open-documents-no-longer-make-constant-background-requests-w.md +6 -0
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +21 -4
- package/corpus/templates/design/AGENTS.md +7 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +132 -7
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +73 -18
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +6 -1
- package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +135 -5
- 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 +60 -3
- package/corpus/templates/design/app/lib/design-import.ts +31 -3
- package/corpus/templates/design/app/pages/design-editor/latest-write-queue.ts +56 -0
- package/corpus/templates/design/app/pages/design-editor/performance-buffer-guard.ts +80 -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-designs-with-html-examples-inside-alpine-attributes-or-comme.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-long-overview-editing-sessions-lots-of-pan-zoom-screen-switc.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-rich-design-clipboard-markers-are-now-accepted-only-from-the.md +6 -0
- package/corpus/templates/design/e2e/helpers.ts +16 -5
- package/corpus/templates/design/server/source-workspace.ts +28 -2
- package/corpus/templates/design/shared/html-integrity.ts +119 -24
- 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 +3 -0
- package/corpus/templates/dispatch/app/i18n-data.ts +37 -1
- package/corpus/templates/dispatch/app/routes/operations.tsx +1 -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-operations-console-brings-agent-monitoring-and-database-inspection-tog.md +6 -0
- 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/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-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/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/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 +38 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +135 -4
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.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/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/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +6 -5
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +6 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +34 -4
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +16 -37
- package/dist/client/MultiTabAssistantChat.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/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/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 +17 -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 +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/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/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/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/struct-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/integrations/adapters/slack.d.ts +2 -0
- package/dist/integrations/adapters/slack.d.ts.map +1 -1
- package/dist/integrations/adapters/slack.js +38 -2
- package/dist/integrations/adapters/slack.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/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/index.d.ts +6 -3
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +5 -2
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +205 -3
- 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/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +133 -4
- package/dist/integrations/webhook-handler.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 +5 -5
- package/dist/resources/handlers.d.ts +3 -3
- 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.map +1 -1
- package/dist/server/agent-chat-plugin.js +53 -6
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -1
- 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/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/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -5
- 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 +82 -39
- 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 +22 -9
- 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/external-agents.mdx +2 -7
- package/docs/content/locales/ar-SA/key-concepts.mdx +13 -20
- 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 +3 -3
- package/docs/content/locales/ar-SA/template-design.mdx +3 -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/external-agents.mdx +3 -7
- package/docs/content/locales/de-DE/key-concepts.mdx +13 -20
- 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 +3 -3
- package/docs/content/locales/de-DE/template-design.mdx +3 -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/external-agents.mdx +3 -7
- package/docs/content/locales/es-ES/key-concepts.mdx +13 -20
- 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 +3 -3
- package/docs/content/locales/es-ES/template-design.mdx +3 -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/external-agents.mdx +3 -7
- package/docs/content/locales/fr-FR/key-concepts.mdx +13 -20
- 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 +3 -3
- package/docs/content/locales/fr-FR/template-design.mdx +3 -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/external-agents.mdx +2 -7
- package/docs/content/locales/hi-IN/key-concepts.mdx +13 -20
- 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 +3 -3
- package/docs/content/locales/hi-IN/template-design.mdx +3 -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/external-agents.mdx +2 -7
- package/docs/content/locales/ja-JP/key-concepts.mdx +13 -20
- 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 +3 -4
- package/docs/content/locales/ja-JP/template-design.mdx +3 -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/external-agents.mdx +2 -7
- package/docs/content/locales/ko-KR/key-concepts.mdx +13 -20
- 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 +3 -4
- package/docs/content/locales/ko-KR/template-design.mdx +3 -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/external-agents.mdx +3 -7
- package/docs/content/locales/pt-BR/key-concepts.mdx +13 -20
- 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 +3 -3
- package/docs/content/locales/pt-BR/template-design.mdx +3 -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/external-agents.mdx +2 -7
- package/docs/content/locales/zh-CN/key-concepts.mdx +13 -20
- 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 +3 -4
- package/docs/content/locales/zh-CN/template-design.mdx +3 -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/external-agents.mdx +2 -7
- package/docs/content/locales/zh-TW/key-concepts.mdx +13 -20
- 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 +3 -4
- package/docs/content/locales/zh-TW/template-design.mdx +3 -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 +19 -11
- 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 +3 -3
- package/docs/content/template-content.mdx +23 -18
- package/docs/content/template-design.mdx +3 -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 +1 -1
- package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -5
- 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
|
@@ -4,8 +4,30 @@ import {
|
|
|
4
4
|
isPostgres,
|
|
5
5
|
retryOnDdlRace,
|
|
6
6
|
} from "../db/client.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
ensureColumnExists,
|
|
9
|
+
ensureTableExists,
|
|
10
|
+
ensureIndexExists,
|
|
11
|
+
} from "../db/ddl-guard.js";
|
|
12
|
+
import {
|
|
13
|
+
authorizeComputerOperation,
|
|
14
|
+
ensureComputerApprovalStore,
|
|
15
|
+
} from "./computer-supervision-store.js";
|
|
16
|
+
import {
|
|
17
|
+
assertValidComputerCommandEnvelope,
|
|
18
|
+
ComputerSupervisionError,
|
|
19
|
+
} from "./computer-supervision.js";
|
|
20
|
+
import {
|
|
21
|
+
getRemoteComputerCapabilities,
|
|
22
|
+
getRemoteDeviceForOwner,
|
|
23
|
+
} from "./remote-devices-store.js";
|
|
24
|
+
import {
|
|
25
|
+
assertNoBinaryPayload,
|
|
26
|
+
serializeBoundedRemoteJson,
|
|
27
|
+
} from "./remote-json-safety.js";
|
|
8
28
|
import type {
|
|
29
|
+
ComputerCommandEnvelope,
|
|
30
|
+
ComputerOperationClass,
|
|
9
31
|
RemoteCommand,
|
|
10
32
|
RemoteCommandKind,
|
|
11
33
|
RemoteCommandStatus,
|
|
@@ -41,6 +63,14 @@ async function ensureTable(): Promise<void> {
|
|
|
41
63
|
result_json TEXT,
|
|
42
64
|
platform TEXT,
|
|
43
65
|
external_thread_id TEXT,
|
|
66
|
+
computer_task_id TEXT,
|
|
67
|
+
computer_run_id TEXT,
|
|
68
|
+
computer_sequence ${intType()},
|
|
69
|
+
idempotency_key TEXT,
|
|
70
|
+
operation_class TEXT,
|
|
71
|
+
approval_scope TEXT,
|
|
72
|
+
action_hash TEXT,
|
|
73
|
+
lease_expires_at ${intType()},
|
|
44
74
|
attempts ${intType()} NOT NULL DEFAULT 0,
|
|
45
75
|
next_check_at ${intType()} NOT NULL,
|
|
46
76
|
claimed_at ${intType()},
|
|
@@ -53,6 +83,7 @@ async function ensureTable(): Promise<void> {
|
|
|
53
83
|
if (isPostgres()) {
|
|
54
84
|
// PG guard: probe via information_schema, only issue DDL if missing, bounded lock_timeout
|
|
55
85
|
await ensureTableExists("integration_remote_commands", createSql);
|
|
86
|
+
await ensureComputerCommandColumns();
|
|
56
87
|
await ensureIndexExists(
|
|
57
88
|
"idx_remote_commands_device_status_next",
|
|
58
89
|
`CREATE INDEX IF NOT EXISTS idx_remote_commands_device_status_next ON integration_remote_commands(device_id, status, next_check_at)`,
|
|
@@ -61,16 +92,19 @@ async function ensureTable(): Promise<void> {
|
|
|
61
92
|
"idx_remote_commands_owner",
|
|
62
93
|
`CREATE INDEX IF NOT EXISTS idx_remote_commands_owner ON integration_remote_commands(owner_email, org_id)`,
|
|
63
94
|
);
|
|
95
|
+
await ensureComputerCommandIndexes();
|
|
64
96
|
return;
|
|
65
97
|
}
|
|
66
98
|
|
|
67
99
|
// SQLite: keep existing behavior
|
|
68
100
|
await retryOnDdlRace(() => client.execute(createSql));
|
|
101
|
+
await ensureComputerCommandColumns();
|
|
69
102
|
await retryOnDdlRace(() =>
|
|
70
103
|
client.execute(
|
|
71
104
|
`CREATE INDEX IF NOT EXISTS idx_remote_commands_device_status_next ON integration_remote_commands(device_id, status, next_check_at)`,
|
|
72
105
|
),
|
|
73
106
|
);
|
|
107
|
+
await ensureComputerCommandIndexes();
|
|
74
108
|
await retryOnDdlRace(() =>
|
|
75
109
|
client.execute(
|
|
76
110
|
`CREATE INDEX IF NOT EXISTS idx_remote_commands_owner ON integration_remote_commands(owner_email, org_id)`,
|
|
@@ -86,17 +120,22 @@ async function ensureTable(): Promise<void> {
|
|
|
86
120
|
}
|
|
87
121
|
|
|
88
122
|
function rowToCommand(row: Record<string, unknown>): RemoteCommand {
|
|
123
|
+
const params = parseJson(row.params_json, {});
|
|
89
124
|
return {
|
|
90
125
|
id: row.id as string,
|
|
91
126
|
deviceId: row.device_id as string,
|
|
92
127
|
ownerEmail: row.owner_email as string,
|
|
93
128
|
orgId: (row.org_id as string | null) ?? null,
|
|
94
129
|
kind: row.kind as RemoteCommandKind,
|
|
95
|
-
params
|
|
130
|
+
params,
|
|
96
131
|
status: row.status as RemoteCommandStatus,
|
|
97
132
|
result: parseJson(row.result_json, null),
|
|
98
133
|
platform: (row.platform as string | null) ?? null,
|
|
99
134
|
externalThreadId: (row.external_thread_id as string | null) ?? null,
|
|
135
|
+
computerOperation:
|
|
136
|
+
row.kind === "computer-operation"
|
|
137
|
+
? ((params as { envelope?: ComputerCommandEnvelope })?.envelope ?? null)
|
|
138
|
+
: null,
|
|
100
139
|
attempts: Number(row.attempts ?? 0),
|
|
101
140
|
nextCheckAt: Number(row.next_check_at ?? 0),
|
|
102
141
|
claimedAt: row.claimed_at == null ? null : Number(row.claimed_at as number),
|
|
@@ -108,6 +147,48 @@ function rowToCommand(row: Record<string, unknown>): RemoteCommand {
|
|
|
108
147
|
};
|
|
109
148
|
}
|
|
110
149
|
|
|
150
|
+
async function ensureComputerCommandColumns(): Promise<void> {
|
|
151
|
+
const columns: Array<[string, string]> = [
|
|
152
|
+
["computer_task_id", "TEXT"],
|
|
153
|
+
["computer_run_id", "TEXT"],
|
|
154
|
+
["computer_sequence", intType()],
|
|
155
|
+
["idempotency_key", "TEXT"],
|
|
156
|
+
["operation_class", "TEXT"],
|
|
157
|
+
["approval_scope", "TEXT"],
|
|
158
|
+
["action_hash", "TEXT"],
|
|
159
|
+
["lease_expires_at", intType()],
|
|
160
|
+
];
|
|
161
|
+
for (const [name, definition] of columns) {
|
|
162
|
+
const sql = `ALTER TABLE integration_remote_commands ADD COLUMN${isPostgres() ? " IF NOT EXISTS" : ""} ${name} ${definition}`;
|
|
163
|
+
if (isPostgres()) {
|
|
164
|
+
await ensureColumnExists("integration_remote_commands", name, sql);
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
try {
|
|
168
|
+
await retryOnDdlRace(() => getDbExec().execute(sql));
|
|
169
|
+
} catch (error) {
|
|
170
|
+
if (!isDuplicateColumnError(error)) throw error;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
async function ensureComputerCommandIndexes(): Promise<void> {
|
|
176
|
+
const indexes = [
|
|
177
|
+
[
|
|
178
|
+
"idx_remote_commands_computer_sequence",
|
|
179
|
+
`CREATE UNIQUE INDEX IF NOT EXISTS idx_remote_commands_computer_sequence ON integration_remote_commands(device_id, computer_task_id, computer_run_id, computer_sequence)`,
|
|
180
|
+
],
|
|
181
|
+
[
|
|
182
|
+
"idx_remote_commands_idempotency",
|
|
183
|
+
`CREATE UNIQUE INDEX IF NOT EXISTS idx_remote_commands_idempotency ON integration_remote_commands(device_id, idempotency_key)`,
|
|
184
|
+
],
|
|
185
|
+
] as const;
|
|
186
|
+
for (const [name, sql] of indexes) {
|
|
187
|
+
if (isPostgres()) await ensureIndexExists(name, sql);
|
|
188
|
+
else await retryOnDdlRace(() => getDbExec().execute(sql));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
111
192
|
export function isRemoteCommandKind(
|
|
112
193
|
value: unknown,
|
|
113
194
|
): value is RemoteCommandKind {
|
|
@@ -127,6 +208,12 @@ export async function enqueueRemoteCommand(input: {
|
|
|
127
208
|
externalThreadId?: string | null;
|
|
128
209
|
nextCheckAt?: number;
|
|
129
210
|
}): Promise<RemoteCommand> {
|
|
211
|
+
if (input.kind === "computer-operation") {
|
|
212
|
+
throw new ComputerSupervisionError(
|
|
213
|
+
"invalid-envelope",
|
|
214
|
+
"Computer operations must use enqueueComputerCommand",
|
|
215
|
+
);
|
|
216
|
+
}
|
|
130
217
|
await ensureTable();
|
|
131
218
|
const client = getDbExec();
|
|
132
219
|
const now = Date.now();
|
|
@@ -160,6 +247,96 @@ export async function enqueueRemoteCommand(input: {
|
|
|
160
247
|
return command;
|
|
161
248
|
}
|
|
162
249
|
|
|
250
|
+
export async function enqueueComputerCommand(input: {
|
|
251
|
+
deviceId: string;
|
|
252
|
+
ownerEmail: string;
|
|
253
|
+
orgId?: string | null;
|
|
254
|
+
envelope: ComputerCommandEnvelope;
|
|
255
|
+
platform?: string | null;
|
|
256
|
+
}): Promise<RemoteCommand> {
|
|
257
|
+
const envelope = await assertValidComputerCommandEnvelope(input.envelope);
|
|
258
|
+
const device = await getRemoteDeviceForOwner({
|
|
259
|
+
id: input.deviceId,
|
|
260
|
+
ownerEmail: input.ownerEmail,
|
|
261
|
+
orgId: input.orgId,
|
|
262
|
+
});
|
|
263
|
+
if (!device || device.status !== "active") {
|
|
264
|
+
throw new ComputerSupervisionError(
|
|
265
|
+
"approval-mismatch",
|
|
266
|
+
"Computer device does not belong to this owner and organization",
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
const capabilities = getRemoteComputerCapabilities(device);
|
|
270
|
+
const [surface, mode] = envelope.operationClass.split(".") as [
|
|
271
|
+
"browser" | "desktop",
|
|
272
|
+
"observe" | "control",
|
|
273
|
+
];
|
|
274
|
+
if (capabilities?.[surface]?.[mode] !== true) {
|
|
275
|
+
throw new ComputerSupervisionError(
|
|
276
|
+
"approval-denied",
|
|
277
|
+
`Remote device did not advertise ${envelope.operationClass}`,
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
await ensureTable();
|
|
281
|
+
await ensureComputerApprovalStore();
|
|
282
|
+
const client = getDbExec();
|
|
283
|
+
const insert = async (tx: typeof client): Promise<string> => {
|
|
284
|
+
await authorizeComputerOperation({ ...input, envelope }, tx);
|
|
285
|
+
const now = Date.now();
|
|
286
|
+
const id = `remote-command-${now}-${randomHex(8)}`;
|
|
287
|
+
try {
|
|
288
|
+
await tx.execute({
|
|
289
|
+
sql: `INSERT INTO integration_remote_commands
|
|
290
|
+
(id, device_id, owner_email, org_id, kind, params_json, status,
|
|
291
|
+
result_json, platform, external_thread_id, computer_task_id,
|
|
292
|
+
computer_run_id, computer_sequence, idempotency_key, operation_class,
|
|
293
|
+
approval_scope, action_hash, lease_expires_at, attempts, next_check_at,
|
|
294
|
+
created_at, updated_at)
|
|
295
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
296
|
+
args: [
|
|
297
|
+
id,
|
|
298
|
+
input.deviceId,
|
|
299
|
+
input.ownerEmail,
|
|
300
|
+
input.orgId ?? null,
|
|
301
|
+
"computer-operation",
|
|
302
|
+
JSON.stringify({ envelope }),
|
|
303
|
+
"pending",
|
|
304
|
+
null,
|
|
305
|
+
input.platform ?? null,
|
|
306
|
+
null,
|
|
307
|
+
envelope.taskId,
|
|
308
|
+
envelope.runId,
|
|
309
|
+
envelope.sequence,
|
|
310
|
+
envelope.idempotencyKey,
|
|
311
|
+
envelope.operationClass,
|
|
312
|
+
envelope.approval.scope,
|
|
313
|
+
envelope.approval.actionHash,
|
|
314
|
+
envelope.leaseExpiresAt,
|
|
315
|
+
0,
|
|
316
|
+
now,
|
|
317
|
+
now,
|
|
318
|
+
now,
|
|
319
|
+
],
|
|
320
|
+
});
|
|
321
|
+
} catch (error) {
|
|
322
|
+
if (isUniqueConstraintError(error)) {
|
|
323
|
+
throw new ComputerSupervisionError(
|
|
324
|
+
"replay",
|
|
325
|
+
"Computer operation sequence or idempotency key was already used",
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
throw error;
|
|
329
|
+
}
|
|
330
|
+
return id;
|
|
331
|
+
};
|
|
332
|
+
const id = client.transaction
|
|
333
|
+
? await client.transaction((tx) => insert(tx))
|
|
334
|
+
: await insert(client);
|
|
335
|
+
const command = await getRemoteCommand(id);
|
|
336
|
+
if (!command) throw new Error("computer command insert failed");
|
|
337
|
+
return command;
|
|
338
|
+
}
|
|
339
|
+
|
|
163
340
|
export async function getRemoteCommand(
|
|
164
341
|
id: string,
|
|
165
342
|
): Promise<RemoteCommand | null> {
|
|
@@ -209,6 +386,7 @@ export async function claimNextRemoteCommand(
|
|
|
209
386
|
sql: `SELECT id FROM integration_remote_commands
|
|
210
387
|
WHERE device_id = ?
|
|
211
388
|
AND status = 'pending'
|
|
389
|
+
AND kind <> 'computer-operation'
|
|
212
390
|
AND next_check_at <= ?
|
|
213
391
|
ORDER BY created_at ASC
|
|
214
392
|
LIMIT 1`,
|
|
@@ -240,6 +418,116 @@ export async function claimNextRemoteCommand(
|
|
|
240
418
|
return command;
|
|
241
419
|
}
|
|
242
420
|
|
|
421
|
+
export async function claimNextComputerCommand(input: {
|
|
422
|
+
deviceId: string;
|
|
423
|
+
ownerEmail: string;
|
|
424
|
+
orgId?: string | null;
|
|
425
|
+
operationClasses?: ComputerOperationClass[];
|
|
426
|
+
now?: number;
|
|
427
|
+
}): Promise<RemoteCommand | null> {
|
|
428
|
+
await ensureTable();
|
|
429
|
+
if (input.operationClasses?.length === 0) return null;
|
|
430
|
+
const client = getDbExec();
|
|
431
|
+
const now = input.now ?? Date.now();
|
|
432
|
+
const operationClassClause = input.operationClasses?.length
|
|
433
|
+
? ` AND operation_class IN (${input.operationClasses.map(() => "?").join(", ")})`
|
|
434
|
+
: "";
|
|
435
|
+
const { rows } = await client.execute({
|
|
436
|
+
sql: `SELECT * FROM integration_remote_commands
|
|
437
|
+
WHERE device_id = ? AND owner_email = ?
|
|
438
|
+
AND ((org_id IS NULL AND ? IS NULL) OR org_id = ?)
|
|
439
|
+
AND kind = 'computer-operation' AND status = 'pending'
|
|
440
|
+
AND next_check_at <= ?${operationClassClause}
|
|
441
|
+
ORDER BY computer_sequence ASC, created_at ASC
|
|
442
|
+
LIMIT 1`,
|
|
443
|
+
args: [
|
|
444
|
+
input.deviceId,
|
|
445
|
+
input.ownerEmail,
|
|
446
|
+
input.orgId ?? null,
|
|
447
|
+
input.orgId ?? null,
|
|
448
|
+
now,
|
|
449
|
+
...(input.operationClasses ?? []),
|
|
450
|
+
],
|
|
451
|
+
});
|
|
452
|
+
if (!rows[0]) return null;
|
|
453
|
+
const candidate = rowToCommand(rows[0] as Record<string, unknown>);
|
|
454
|
+
try {
|
|
455
|
+
const envelope = await assertValidComputerCommandEnvelope(
|
|
456
|
+
candidate.computerOperation,
|
|
457
|
+
{ now },
|
|
458
|
+
);
|
|
459
|
+
const row = rows[0] as Record<string, unknown>;
|
|
460
|
+
if (
|
|
461
|
+
envelope.taskId !== row.computer_task_id ||
|
|
462
|
+
envelope.runId !== row.computer_run_id ||
|
|
463
|
+
envelope.sequence !== Number(row.computer_sequence) ||
|
|
464
|
+
envelope.idempotencyKey !== row.idempotency_key ||
|
|
465
|
+
envelope.operationClass !== row.operation_class ||
|
|
466
|
+
envelope.approval.scope !== row.approval_scope ||
|
|
467
|
+
envelope.approval.actionHash !== row.action_hash ||
|
|
468
|
+
envelope.leaseExpiresAt !== Number(row.lease_expires_at)
|
|
469
|
+
) {
|
|
470
|
+
throw new ComputerSupervisionError(
|
|
471
|
+
"action-hash-mismatch",
|
|
472
|
+
"Stored computer command binding does not match its envelope",
|
|
473
|
+
);
|
|
474
|
+
}
|
|
475
|
+
} catch (error) {
|
|
476
|
+
await client.execute({
|
|
477
|
+
sql: `UPDATE integration_remote_commands
|
|
478
|
+
SET status = 'failed', error_message = ?, completed_at = ?, updated_at = ?
|
|
479
|
+
WHERE id = ? AND device_id = ? AND owner_email = ?
|
|
480
|
+
AND ((org_id IS NULL AND ? IS NULL) OR org_id = ?)
|
|
481
|
+
AND status = 'pending'`,
|
|
482
|
+
args: [
|
|
483
|
+
error instanceof Error
|
|
484
|
+
? error.message.slice(0, 2000)
|
|
485
|
+
: "Invalid computer operation",
|
|
486
|
+
now,
|
|
487
|
+
now,
|
|
488
|
+
candidate.id,
|
|
489
|
+
input.deviceId,
|
|
490
|
+
input.ownerEmail,
|
|
491
|
+
input.orgId ?? null,
|
|
492
|
+
input.orgId ?? null,
|
|
493
|
+
],
|
|
494
|
+
});
|
|
495
|
+
return null;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
const result = await client.execute({
|
|
499
|
+
sql: isPostgres()
|
|
500
|
+
? `UPDATE integration_remote_commands
|
|
501
|
+
SET status = 'claimed', attempts = attempts + 1, claimed_at = ?, updated_at = ?
|
|
502
|
+
WHERE id = ? AND device_id = ? AND owner_email = ?
|
|
503
|
+
AND ((org_id IS NULL AND ? IS NULL) OR org_id = ?)
|
|
504
|
+
AND status = 'pending' AND lease_expires_at > ?
|
|
505
|
+
RETURNING *`
|
|
506
|
+
: `UPDATE integration_remote_commands
|
|
507
|
+
SET status = 'claimed', attempts = attempts + 1, claimed_at = ?, updated_at = ?
|
|
508
|
+
WHERE id = ? AND device_id = ? AND owner_email = ?
|
|
509
|
+
AND ((org_id IS NULL AND ? IS NULL) OR org_id = ?)
|
|
510
|
+
AND status = 'pending' AND lease_expires_at > ?`,
|
|
511
|
+
args: [
|
|
512
|
+
now,
|
|
513
|
+
now,
|
|
514
|
+
candidate.id,
|
|
515
|
+
input.deviceId,
|
|
516
|
+
input.ownerEmail,
|
|
517
|
+
input.orgId ?? null,
|
|
518
|
+
input.orgId ?? null,
|
|
519
|
+
now,
|
|
520
|
+
],
|
|
521
|
+
});
|
|
522
|
+
if (isPostgres()) {
|
|
523
|
+
const row = result.rows?.[0];
|
|
524
|
+
return row ? rowToCommand(row as Record<string, unknown>) : null;
|
|
525
|
+
}
|
|
526
|
+
if (affectedRows(result) === 0) return null;
|
|
527
|
+
const command = await getRemoteCommand(candidate.id);
|
|
528
|
+
return command?.status === "claimed" ? command : null;
|
|
529
|
+
}
|
|
530
|
+
|
|
243
531
|
export async function updateRemoteCommandResult(input: {
|
|
244
532
|
deviceId: string;
|
|
245
533
|
commandId: string;
|
|
@@ -252,7 +540,15 @@ export async function updateRemoteCommandResult(input: {
|
|
|
252
540
|
const now = Date.now();
|
|
253
541
|
const completedAt = TERMINAL_STATUSES.has(input.status) ? now : null;
|
|
254
542
|
const resultJson =
|
|
255
|
-
input.result === undefined
|
|
543
|
+
input.result === undefined
|
|
544
|
+
? undefined
|
|
545
|
+
: serializeBoundedRemoteJson(input.result, {
|
|
546
|
+
label: "Remote command result",
|
|
547
|
+
maxBytes: 256_000,
|
|
548
|
+
});
|
|
549
|
+
if (input.errorMessage) {
|
|
550
|
+
assertNoBinaryPayload(input.errorMessage, "Remote command error");
|
|
551
|
+
}
|
|
256
552
|
|
|
257
553
|
await client.execute({
|
|
258
554
|
sql: `UPDATE integration_remote_commands
|
|
@@ -357,3 +653,38 @@ function randomHex(byteLength: number): string {
|
|
|
357
653
|
.map((byte) => byte.toString(16).padStart(2, "0"))
|
|
358
654
|
.join("");
|
|
359
655
|
}
|
|
656
|
+
|
|
657
|
+
function affectedRows(result: {
|
|
658
|
+
rowsAffected?: number;
|
|
659
|
+
rows?: unknown[];
|
|
660
|
+
}): number {
|
|
661
|
+
return (
|
|
662
|
+
result.rowsAffected ??
|
|
663
|
+
Number((result as { rowCount?: unknown }).rowCount ?? 0)
|
|
664
|
+
);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
function isDuplicateColumnError(error: unknown): boolean {
|
|
668
|
+
const code = String((error as { code?: unknown })?.code ?? "");
|
|
669
|
+
const message = String((error as { message?: unknown })?.message ?? error)
|
|
670
|
+
.toLowerCase()
|
|
671
|
+
.trim();
|
|
672
|
+
return (
|
|
673
|
+
code === "42701" ||
|
|
674
|
+
message.includes("duplicate column") ||
|
|
675
|
+
message.includes("already exists")
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
function isUniqueConstraintError(error: unknown): boolean {
|
|
680
|
+
const code = String((error as { code?: unknown })?.code ?? "");
|
|
681
|
+
const message = String((error as { message?: unknown })?.message ?? error)
|
|
682
|
+
.toLowerCase()
|
|
683
|
+
.trim();
|
|
684
|
+
return (
|
|
685
|
+
code === "23505" ||
|
|
686
|
+
code === "2067" ||
|
|
687
|
+
message.includes("unique constraint") ||
|
|
688
|
+
message.includes("duplicate key")
|
|
689
|
+
);
|
|
690
|
+
}
|
|
@@ -9,7 +9,12 @@ import {
|
|
|
9
9
|
ensureIndexExists,
|
|
10
10
|
ensureTableExists,
|
|
11
11
|
} from "../db/ddl-guard.js";
|
|
12
|
-
import type {
|
|
12
|
+
import type {
|
|
13
|
+
PublicRemoteDevice,
|
|
14
|
+
RemoteComputerCapabilities,
|
|
15
|
+
RemoteDevice,
|
|
16
|
+
RemoteDeviceMetadata,
|
|
17
|
+
} from "./remote-types.js";
|
|
13
18
|
|
|
14
19
|
let _initPromise: Promise<void> | undefined;
|
|
15
20
|
|
|
@@ -136,10 +141,7 @@ function rowToDevice(row: Record<string, unknown>): RemoteDevice {
|
|
|
136
141
|
platform: (row.platform as string | null) ?? null,
|
|
137
142
|
appVersion: (row.app_version as string | null) ?? null,
|
|
138
143
|
hostName: (row.host_name as string | null) ?? null,
|
|
139
|
-
metadata: parseJson(row.metadata_json, null) as
|
|
140
|
-
string,
|
|
141
|
-
unknown
|
|
142
|
-
> | null,
|
|
144
|
+
metadata: parseJson(row.metadata_json, null) as RemoteDeviceMetadata | null,
|
|
143
145
|
deviceTokenHash: row.device_token_hash as string,
|
|
144
146
|
lastSeenAt:
|
|
145
147
|
row.last_seen_at == null ? null : Number(row.last_seen_at as number),
|
|
@@ -168,6 +170,14 @@ export function toPublicRemoteDevice(device: RemoteDevice): PublicRemoteDevice {
|
|
|
168
170
|
};
|
|
169
171
|
}
|
|
170
172
|
|
|
173
|
+
export function getRemoteComputerCapabilities(
|
|
174
|
+
device: Pick<RemoteDevice, "metadata">,
|
|
175
|
+
): RemoteComputerCapabilities | null {
|
|
176
|
+
const value = device.metadata?.computerCapabilities;
|
|
177
|
+
if (!value || typeof value !== "object") return null;
|
|
178
|
+
return normalizeComputerCapabilities(value);
|
|
179
|
+
}
|
|
180
|
+
|
|
171
181
|
export async function createRemoteDevice(input: {
|
|
172
182
|
ownerEmail: string;
|
|
173
183
|
orgId?: string | null;
|
|
@@ -175,7 +185,7 @@ export async function createRemoteDevice(input: {
|
|
|
175
185
|
platform?: string | null;
|
|
176
186
|
appVersion?: string | null;
|
|
177
187
|
hostName?: string | null;
|
|
178
|
-
metadata?:
|
|
188
|
+
metadata?: RemoteDeviceMetadata | null;
|
|
179
189
|
}): Promise<{ device: RemoteDevice; token: string }> {
|
|
180
190
|
await ensureTable();
|
|
181
191
|
const client = getDbExec();
|
|
@@ -197,7 +207,7 @@ export async function createRemoteDevice(input: {
|
|
|
197
207
|
sanitizeOptionalString(input.platform, 80),
|
|
198
208
|
sanitizeOptionalString(input.appVersion, 120),
|
|
199
209
|
sanitizeOptionalString(input.hostName, 200),
|
|
200
|
-
|
|
210
|
+
serializeRemoteDeviceMetadata(input.metadata),
|
|
201
211
|
tokenHash,
|
|
202
212
|
now,
|
|
203
213
|
"active",
|
|
@@ -316,7 +326,7 @@ export async function updateRemoteDeviceDetails(input: {
|
|
|
316
326
|
platform?: string | null;
|
|
317
327
|
appVersion?: string | null;
|
|
318
328
|
hostName?: string | null;
|
|
319
|
-
metadata?:
|
|
329
|
+
metadata?: RemoteDeviceMetadata | null;
|
|
320
330
|
}): Promise<RemoteDevice | null> {
|
|
321
331
|
await ensureTable();
|
|
322
332
|
const now = Date.now();
|
|
@@ -340,7 +350,7 @@ export async function updateRemoteDeviceDetails(input: {
|
|
|
340
350
|
}
|
|
341
351
|
if (input.metadata !== undefined) {
|
|
342
352
|
updates.push("metadata_json = ?");
|
|
343
|
-
args.push(
|
|
353
|
+
args.push(serializeRemoteDeviceMetadata(input.metadata));
|
|
344
354
|
}
|
|
345
355
|
if (updates.length === 0) return getRemoteDevice(input.id);
|
|
346
356
|
|
|
@@ -420,6 +430,55 @@ function parseJson(value: unknown, fallback: unknown): unknown {
|
|
|
420
430
|
}
|
|
421
431
|
}
|
|
422
432
|
|
|
433
|
+
function serializeRemoteDeviceMetadata(
|
|
434
|
+
metadata: RemoteDeviceMetadata | null | undefined,
|
|
435
|
+
): string | null {
|
|
436
|
+
if (!metadata) return null;
|
|
437
|
+
const normalized: RemoteDeviceMetadata = { ...metadata };
|
|
438
|
+
if (metadata.computerCapabilities !== undefined) {
|
|
439
|
+
normalized.computerCapabilities = normalizeComputerCapabilities(
|
|
440
|
+
metadata.computerCapabilities,
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
const json = JSON.stringify(normalized);
|
|
444
|
+
if (new TextEncoder().encode(json).byteLength > 32_768) {
|
|
445
|
+
throw new Error("Remote device metadata exceeds 32 KiB");
|
|
446
|
+
}
|
|
447
|
+
if (/"data:[^"]*"/i.test(json) || looksLikeLargeBase64(json)) {
|
|
448
|
+
throw new Error("Remote device metadata cannot contain binary payloads");
|
|
449
|
+
}
|
|
450
|
+
return json;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
function normalizeComputerCapabilities(
|
|
454
|
+
value: RemoteComputerCapabilities,
|
|
455
|
+
): RemoteComputerCapabilities {
|
|
456
|
+
const result: RemoteComputerCapabilities = {};
|
|
457
|
+
if (value.browser && typeof value.browser === "object") {
|
|
458
|
+
result.browser = {
|
|
459
|
+
observe: value.browser.observe === true,
|
|
460
|
+
control: value.browser.control === true,
|
|
461
|
+
provider: sanitizeOptionalString(value.browser.provider, 120),
|
|
462
|
+
version: sanitizeOptionalString(value.browser.version, 120),
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
if (value.desktop && typeof value.desktop === "object") {
|
|
466
|
+
result.desktop = {
|
|
467
|
+
observe: value.desktop.observe === true,
|
|
468
|
+
control: value.desktop.control === true,
|
|
469
|
+
accessibility: value.desktop.accessibility === true,
|
|
470
|
+
screenCapture: value.desktop.screenCapture === true,
|
|
471
|
+
provider: sanitizeOptionalString(value.desktop.provider, 120),
|
|
472
|
+
version: sanitizeOptionalString(value.desktop.version, 120),
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
return result;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
function looksLikeLargeBase64(value: string): boolean {
|
|
479
|
+
return value.length > 4_096 && /[A-Za-z0-9+/]{4_096,}={0,2}/.test(value);
|
|
480
|
+
}
|
|
481
|
+
|
|
423
482
|
function randomHex(byteLength: number): string {
|
|
424
483
|
const bytes = new Uint8Array(byteLength);
|
|
425
484
|
globalThis.crypto.getRandomValues(bytes);
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
const DATA_URL_PATTERN = /data:[a-z][^;,]{0,100}[;,]/i;
|
|
2
|
+
const BASE64_PREFIX_PATTERN = /(?:^|[,;])base64,/i;
|
|
3
|
+
const MAX_TRAVERSAL_DEPTH = 20;
|
|
4
|
+
const MAX_TRAVERSAL_NODES = 25_000;
|
|
5
|
+
const BINARY_FIELD_NAMES = new Set([
|
|
6
|
+
"base64",
|
|
7
|
+
"dataurl",
|
|
8
|
+
"image",
|
|
9
|
+
"imagebase64",
|
|
10
|
+
"imagedata",
|
|
11
|
+
"imagebytes",
|
|
12
|
+
"screenshot",
|
|
13
|
+
"screenshotbase64",
|
|
14
|
+
"screenshotdata",
|
|
15
|
+
"bytes",
|
|
16
|
+
"buffer",
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
export function serializeBoundedRemoteJson(
|
|
20
|
+
value: unknown,
|
|
21
|
+
options: { label: string; maxBytes: number },
|
|
22
|
+
): string {
|
|
23
|
+
assertNoBinaryPayload(value, options.label);
|
|
24
|
+
let json: string | undefined;
|
|
25
|
+
try {
|
|
26
|
+
json = JSON.stringify(value);
|
|
27
|
+
} catch {
|
|
28
|
+
throw new Error(`${options.label} must contain only serializable JSON`);
|
|
29
|
+
}
|
|
30
|
+
if (json === undefined) {
|
|
31
|
+
throw new Error(`${options.label} must contain a JSON value`);
|
|
32
|
+
}
|
|
33
|
+
const bytes = new TextEncoder().encode(json).byteLength;
|
|
34
|
+
if (bytes > options.maxBytes) {
|
|
35
|
+
throw new Error(`${options.label} exceeds ${options.maxBytes} JSON bytes`);
|
|
36
|
+
}
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function assertNoBinaryPayload(value: unknown, label: string): void {
|
|
41
|
+
let visited = 0;
|
|
42
|
+
const seen = new Set<object>();
|
|
43
|
+
const visit = (entry: unknown, depth: number, key?: string): void => {
|
|
44
|
+
visited++;
|
|
45
|
+
if (visited > MAX_TRAVERSAL_NODES || depth > MAX_TRAVERSAL_DEPTH) {
|
|
46
|
+
throw new Error(`${label} is too deeply nested or complex`);
|
|
47
|
+
}
|
|
48
|
+
if (typeof entry === "string") {
|
|
49
|
+
const trimmed = entry.trim();
|
|
50
|
+
if (
|
|
51
|
+
DATA_URL_PATTERN.test(trimmed) ||
|
|
52
|
+
BASE64_PREFIX_PATTERN.test(trimmed) ||
|
|
53
|
+
looksLikeBase64(trimmed) ||
|
|
54
|
+
(isBinaryFieldName(key) && trimmed.length > 0)
|
|
55
|
+
) {
|
|
56
|
+
throw new Error(
|
|
57
|
+
`${label} cannot contain screenshots, images, base64, or data URLs`,
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (
|
|
63
|
+
entry == null ||
|
|
64
|
+
typeof entry === "number" ||
|
|
65
|
+
typeof entry === "boolean"
|
|
66
|
+
) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (
|
|
70
|
+
typeof entry === "bigint" ||
|
|
71
|
+
typeof entry === "function" ||
|
|
72
|
+
typeof entry === "symbol" ||
|
|
73
|
+
typeof entry === "undefined"
|
|
74
|
+
) {
|
|
75
|
+
throw new Error(`${label} must contain only serializable JSON`);
|
|
76
|
+
}
|
|
77
|
+
if (ArrayBuffer.isView(entry) || entry instanceof ArrayBuffer) {
|
|
78
|
+
throw new Error(`${label} cannot contain binary buffers`);
|
|
79
|
+
}
|
|
80
|
+
if (typeof Blob !== "undefined" && entry instanceof Blob) {
|
|
81
|
+
throw new Error(`${label} cannot contain binary blobs`);
|
|
82
|
+
}
|
|
83
|
+
if (typeof entry !== "object") return;
|
|
84
|
+
if (seen.has(entry)) {
|
|
85
|
+
throw new Error(`${label} must not contain circular values`);
|
|
86
|
+
}
|
|
87
|
+
seen.add(entry);
|
|
88
|
+
if (Array.isArray(entry)) {
|
|
89
|
+
if (isBinaryFieldName(key) && entry.length > 0) {
|
|
90
|
+
throw new Error(`${label} cannot contain binary arrays`);
|
|
91
|
+
}
|
|
92
|
+
for (const item of entry) visit(item, depth + 1, key);
|
|
93
|
+
seen.delete(entry);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const record = entry as Record<string, unknown>;
|
|
97
|
+
if (record.type === "Buffer" && Array.isArray(record.data)) {
|
|
98
|
+
throw new Error(`${label} cannot contain serialized buffers`);
|
|
99
|
+
}
|
|
100
|
+
for (const [childKey, child] of Object.entries(record)) {
|
|
101
|
+
if (isBinaryFieldName(childKey) && child != null) {
|
|
102
|
+
throw new Error(
|
|
103
|
+
`${label} cannot contain screenshots, images, base64, or data URLs`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
visit(child, depth + 1, childKey);
|
|
107
|
+
}
|
|
108
|
+
seen.delete(entry);
|
|
109
|
+
};
|
|
110
|
+
visit(value, 0);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function isBinaryFieldName(key: string | undefined): boolean {
|
|
114
|
+
if (!key) return false;
|
|
115
|
+
const normalized = key.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
116
|
+
return BINARY_FIELD_NAMES.has(normalized);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function looksLikeBase64(value: string): boolean {
|
|
120
|
+
if (value.length < 512) return false;
|
|
121
|
+
const compact = value.replace(/[\r\n]/g, "");
|
|
122
|
+
return (
|
|
123
|
+
compact.length >= 512 &&
|
|
124
|
+
compact.length % 4 === 0 &&
|
|
125
|
+
/^[A-Za-z0-9+/]+={0,2}$/.test(compact)
|
|
126
|
+
);
|
|
127
|
+
}
|