@agent-native/core 0.92.11 → 0.93.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 +45 -0
- package/corpus/core/docs/content/automation-connectors.mdx +80 -0
- package/corpus/core/docs/content/extensions.mdx +8 -0
- package/corpus/core/docs/content/locales/ar-SA/extensions.mdx +8 -0
- package/corpus/core/docs/content/locales/ar-SA/messaging.mdx +84 -15
- package/corpus/core/docs/content/locales/ar-SA/template-clips.mdx +1 -0
- package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +1 -0
- package/corpus/core/docs/content/locales/de-DE/extensions.mdx +10 -0
- package/corpus/core/docs/content/locales/de-DE/messaging.mdx +92 -15
- package/corpus/core/docs/content/locales/de-DE/template-clips.mdx +1 -0
- package/corpus/core/docs/content/locales/de-DE/template-design.mdx +1 -0
- package/corpus/core/docs/content/locales/es-ES/extensions.mdx +10 -0
- package/corpus/core/docs/content/locales/es-ES/messaging.mdx +91 -15
- package/corpus/core/docs/content/locales/es-ES/template-clips.mdx +1 -0
- package/corpus/core/docs/content/locales/es-ES/template-design.mdx +1 -0
- package/corpus/core/docs/content/locales/fr-FR/extensions.mdx +10 -0
- package/corpus/core/docs/content/locales/fr-FR/messaging.mdx +91 -15
- package/corpus/core/docs/content/locales/fr-FR/template-clips.mdx +1 -0
- package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +1 -0
- package/corpus/core/docs/content/locales/hi-IN/extensions.mdx +8 -0
- package/corpus/core/docs/content/locales/hi-IN/messaging.mdx +81 -15
- package/corpus/core/docs/content/locales/hi-IN/template-clips.mdx +1 -0
- package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +1 -0
- package/corpus/core/docs/content/locales/ja-JP/extensions.mdx +9 -0
- package/corpus/core/docs/content/locales/ja-JP/messaging.mdx +81 -15
- package/corpus/core/docs/content/locales/ja-JP/template-clips.mdx +1 -0
- package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +1 -0
- package/corpus/core/docs/content/locales/ko-KR/extensions.mdx +8 -0
- package/corpus/core/docs/content/locales/ko-KR/messaging.mdx +80 -15
- package/corpus/core/docs/content/locales/ko-KR/template-clips.mdx +1 -0
- package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +1 -0
- package/corpus/core/docs/content/locales/pt-BR/extensions.mdx +9 -0
- package/corpus/core/docs/content/locales/pt-BR/messaging.mdx +88 -15
- package/corpus/core/docs/content/locales/pt-BR/template-clips.mdx +1 -0
- package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +1 -0
- package/corpus/core/docs/content/locales/zh-CN/extensions.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-CN/messaging.mdx +78 -15
- package/corpus/core/docs/content/locales/zh-CN/template-clips.mdx +1 -0
- package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +1 -0
- package/corpus/core/docs/content/locales/zh-TW/extensions.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/messaging.mdx +78 -15
- package/corpus/core/docs/content/locales/zh-TW/template-clips.mdx +1 -0
- package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +1 -0
- package/corpus/core/docs/content/messaging.mdx +227 -45
- package/corpus/core/docs/content/template-clips.mdx +3 -0
- package/corpus/core/docs/content/template-design.mdx +4 -0
- package/corpus/core/package.json +5 -1
- package/corpus/core/src/a2a/artifact-response.ts +131 -2
- package/corpus/core/src/a2a/client.ts +10 -0
- package/corpus/core/src/a2a/handlers.ts +40 -76
- package/corpus/core/src/a2a/types.ts +2 -0
- package/corpus/core/src/agent/durable-background.ts +24 -0
- package/corpus/core/src/agent/production-agent.ts +48 -5
- package/corpus/core/src/agent/run-manager.ts +171 -20
- package/corpus/core/src/agent/run-store.ts +297 -42
- package/corpus/core/src/agent/types.ts +23 -0
- package/corpus/core/src/audit/record.ts +31 -0
- package/corpus/core/src/audit/store.ts +69 -3
- package/corpus/core/src/audit/types.ts +13 -0
- package/corpus/core/src/automation/index.ts +802 -0
- package/corpus/core/src/cli/create.ts +12 -5
- package/corpus/core/src/cli/design-connect.ts +596 -36
- package/corpus/core/src/client/AgentPanel.tsx +51 -6
- package/corpus/core/src/client/AssistantChat.tsx +274 -147
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +3 -0
- package/corpus/core/src/client/RunStuckBanner.tsx +69 -20
- package/corpus/core/src/client/agent-chat-adapter.ts +110 -17
- package/corpus/core/src/client/automation.ts +22 -0
- package/corpus/core/src/client/chat/run-recovery.tsx +67 -50
- package/corpus/core/src/client/composer/TiptapComposer.tsx +8 -0
- package/corpus/core/src/client/index.ts +30 -0
- package/corpus/core/src/client/integrations/api.ts +295 -0
- package/corpus/core/src/client/integrations/index.ts +26 -0
- package/corpus/core/src/client/transcription/use-live-transcription.ts +68 -5
- package/corpus/core/src/client/use-run-stuck-detection.ts +41 -3
- package/corpus/core/src/deploy/build.ts +59 -3
- package/corpus/core/src/deploy/workspace-deploy.ts +37 -2
- package/corpus/core/src/file-upload/types.ts +2 -0
- package/corpus/core/src/index.ts +37 -0
- package/corpus/core/src/integrations/a2a-continuations-store.ts +6 -4
- package/corpus/core/src/integrations/adapters/discord.ts +362 -0
- package/corpus/core/src/integrations/adapters/index.ts +29 -0
- package/corpus/core/src/integrations/adapters/microsoft-teams.ts +411 -0
- package/corpus/core/src/integrations/adapters/slack.ts +861 -27
- package/corpus/core/src/integrations/adapters/telegram.ts +54 -15
- package/corpus/core/src/integrations/adapters/whatsapp.ts +41 -17
- package/corpus/core/src/integrations/catalog.ts +571 -0
- package/corpus/core/src/integrations/controls-store.ts +187 -0
- package/corpus/core/src/integrations/index.ts +100 -0
- package/corpus/core/src/integrations/installations-store.ts +677 -0
- package/corpus/core/src/integrations/integration-memory.ts +187 -0
- package/corpus/core/src/integrations/pending-tasks-retry-job.ts +6 -6
- package/corpus/core/src/integrations/pending-tasks-store.ts +83 -5
- package/corpus/core/src/integrations/plugin.ts +685 -47
- package/corpus/core/src/integrations/scope-store.ts +498 -0
- package/corpus/core/src/integrations/slack-manifest.ts +78 -0
- package/corpus/core/src/integrations/slack-oauth.ts +343 -0
- package/corpus/core/src/integrations/types.ts +179 -0
- package/corpus/core/src/integrations/usage-budget-store.ts +906 -0
- package/corpus/core/src/integrations/webhook-handler.ts +562 -51
- package/corpus/core/src/jobs/scheduler.ts +100 -2
- package/corpus/core/src/jobs/tools.ts +45 -9
- package/corpus/core/src/provider-api/index.ts +72 -1
- package/corpus/core/src/resources/handlers.ts +88 -14
- package/corpus/core/src/resources/script-helpers.ts +36 -7
- package/corpus/core/src/resources/store.ts +59 -52
- package/corpus/core/src/scripts/call-agent.ts +107 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +294 -119
- package/corpus/core/src/server/auth.ts +10 -14
- package/corpus/core/src/server/builder-design-systems.ts +16 -1
- package/corpus/core/src/server/edge.ts +18 -0
- package/corpus/core/src/server/index.ts +26 -0
- package/corpus/core/src/server/request-context.ts +18 -0
- package/corpus/core/src/server/social-og-image.ts +3 -2
- package/corpus/core/src/styles/agent-native.css +62 -44
- package/corpus/core/src/templates/default/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/core/src/templates/default/AGENTS.md +7 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/core/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +6 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +25 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +15 -0
- package/corpus/core/src/templates/workspace-core/AGENTS.md +3 -2
- package/corpus/core/src/usage/store.ts +37 -2
- package/corpus/templates/analytics/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/analytics/.agents/skills/provider-api/SKILL.md +23 -0
- package/corpus/templates/analytics/.builder/skills/provider-api/SKILL.md +15 -0
- package/corpus/templates/analytics/actions/save-monitor.ts +25 -2
- package/corpus/templates/analytics/app/lib/data-sources.ts +28 -0
- package/corpus/templates/analytics/changelog/2026-07-10-agent-created-uptime-monitors-now-return-a-direct-link-to-th.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-10-dashboard-email-reports-still-arrive-when-screenshot-capture-temporarily-fails.md +6 -0
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +3 -7
- package/corpus/templates/analytics/server/lib/credential-keys.ts +12 -0
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +5 -1
- package/corpus/templates/analytics/server/lib/provider-credentials.ts +2 -0
- package/corpus/templates/analytics/server/routes/api/test-connection.post.ts +16 -0
- package/corpus/templates/assets/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/brain/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/calendar/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/calendar/app/components/calendar/CommandPalette.tsx +98 -108
- package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +97 -90
- package/corpus/templates/calendar/changelog/2026-07-10-event-guest-details-and-option-menus-now-use-valid-accessibl.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-10-natural-language-event-phrases-stay-available-as-quick-creat.md +6 -0
- package/corpus/templates/chat/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
- package/corpus/templates/clips/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/clips/.agents/skills/recording/SKILL.md +17 -1
- package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +8 -0
- package/corpus/templates/clips/AGENTS.md +8 -3
- package/corpus/templates/clips/actions/finalize-recording.ts +63 -23
- package/corpus/templates/clips/actions/get-recording-player-data.ts +6 -2
- package/corpus/templates/clips/actions/lib/ensure-seekable-video.ts +72 -9
- package/corpus/templates/clips/actions/list-recordings.ts +19 -3
- package/corpus/templates/clips/actions/navigate.ts +2 -0
- package/corpus/templates/clips/actions/reprocess-recording.ts +20 -6
- package/corpus/templates/clips/actions/request-transcript.ts +16 -31
- package/corpus/templates/clips/actions/view-screen.ts +57 -5
- package/corpus/templates/clips/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/clips/app/components/library/empty-state.tsx +2 -0
- package/corpus/templates/clips/app/components/library/library-grid.tsx +69 -42
- package/corpus/templates/clips/app/components/library/library-layout.tsx +15 -1
- package/corpus/templates/clips/app/components/library/recording-card.tsx +81 -68
- package/corpus/templates/clips/app/components/library/search-bar.tsx +4 -3
- package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +9 -3
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/player/transcript-panel.tsx +27 -5
- package/corpus/templates/clips/app/hooks/use-library.ts +1 -1
- package/corpus/templates/clips/app/hooks/use-navigation-state.ts +10 -2
- package/corpus/templates/clips/app/hooks/use-player-shortcuts.ts +1 -0
- package/corpus/templates/clips/app/i18n/ar-SA.ts +7 -1
- package/corpus/templates/clips/app/i18n/de-DE.ts +7 -1
- package/corpus/templates/clips/app/i18n/en-US.ts +7 -1
- package/corpus/templates/clips/app/i18n/es-ES.ts +7 -1
- package/corpus/templates/clips/app/i18n/fr-FR.ts +7 -1
- package/corpus/templates/clips/app/i18n/hi-IN.ts +7 -1
- package/corpus/templates/clips/app/i18n/ja-JP.ts +7 -1
- package/corpus/templates/clips/app/i18n/ko-KR.ts +7 -1
- package/corpus/templates/clips/app/i18n/pt-BR.ts +7 -1
- package/corpus/templates/clips/app/i18n/zh-CN.ts +8 -1
- package/corpus/templates/clips/app/i18n/zh-TW.ts +8 -1
- package/corpus/templates/clips/app/lib/recording-visibility.ts +70 -0
- package/corpus/templates/clips/app/routes/_app.shared.tsx +20 -0
- package/corpus/templates/clips/app/routes/download.tsx +24 -8
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +115 -2
- package/corpus/templates/clips/app/routes/record.tsx +62 -0
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +25 -16
- package/corpus/templates/clips/changelog/2026-07-10-clips-desktop-is-now-available-for-linux-with-appimage-debia.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-clips-downloads-updates-sooner-in-the-background-and-offers-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-clips-shared-with-you-now-appear-in-a-searchable-shared-with.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-clips-with-missing-mobile-video-frames-can-be-repaired-witho.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-fixed-copying-agent-responses-and-transcript-text-from-recor.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-mobile-camera-recordings-pause-while-backgrounded.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-mp4-downloads-now-show-progress-immediately-after-the-option.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-recording-pages-now-open-as-soon-as-you-stop-with-a-share-li.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-recordings-now-seek-smoothly-downloads-use-the-correct-file-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-10-s3-compatible-storage-now-saves-hosted-recordings-without-re.md +6 -0
- package/corpus/templates/clips/desktop/README.md +22 -6
- package/corpus/templates/clips/desktop/package.json +1 -1
- package/corpus/templates/clips/desktop/src/app.tsx +32 -19
- package/corpus/templates/clips/desktop/src/components/ReadinessPanel.tsx +15 -9
- package/corpus/templates/clips/desktop/src/lib/finalization-guard.ts +22 -0
- package/corpus/templates/clips/desktop/src/lib/permissions.ts +3 -1
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +97 -120
- package/corpus/templates/clips/desktop/src/lib/updater.ts +26 -4
- package/corpus/templates/clips/desktop/src/overlays/finalizing.tsx +4 -8
- package/corpus/templates/clips/desktop/src-tauri/Cargo.toml +1 -1
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +2 -2
- package/corpus/templates/clips/desktop/src-tauri/src/permission_status.rs +11 -7
- package/corpus/templates/clips/desktop/src-tauri/tauri.linux.conf.json +11 -0
- package/corpus/templates/clips/netlify.toml +3 -0
- package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +106 -0
- package/corpus/templates/clips/server/lib/public-agent-context.ts +9 -1
- package/corpus/templates/clips/server/lib/resumable-upload-provider.ts +52 -0
- package/corpus/templates/clips/server/lib/s3-upload-provider.ts +433 -85
- package/corpus/templates/clips/server/lib/video-remux.ts +114 -0
- package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +109 -0
- package/corpus/templates/clips/server/routes/api/clips-updater.json.get.ts +22 -11
- package/corpus/templates/clips/server/routes/api/public-recording.get.ts +4 -2
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +47 -5
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +10 -2
- package/corpus/templates/clips/shared/share-loader-response.ts +12 -0
- package/corpus/templates/clips/shared/transcript-status.ts +40 -0
- package/corpus/templates/content/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/content/.agents/skills/content/SKILL.md +57 -5
- package/corpus/templates/content/AGENTS.md +65 -55
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +92 -23
- package/corpus/templates/content/actions/_database-source-utils.ts +207 -41
- package/corpus/templates/content/actions/_property-utils.ts +30 -2
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +316 -121
- package/corpus/templates/content/actions/attach-content-database-source.ts +41 -17
- package/corpus/templates/content/actions/change-content-database-source-role.ts +46 -8
- package/corpus/templates/content/actions/submit-content-database-form.ts +497 -0
- package/corpus/templates/content/actions/suggest-source-join-key.ts +8 -1
- package/corpus/templates/content/actions/update-content-database-view.ts +8 -1
- package/corpus/templates/content/actions/view-screen.ts +4 -1
- package/corpus/templates/content/agent-native.app-skill.json +1 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +250 -64
- package/corpus/templates/content/app/components/editor/database/FormView.tsx +460 -0
- package/corpus/templates/content/app/components/editor/database/navigation-state.ts +3 -0
- package/corpus/templates/content/app/components/editor/database/settings.tsx +30 -37
- package/corpus/templates/content/app/components/editor/database/shared.tsx +2 -0
- package/corpus/templates/content/app/components/editor/database/view-config.ts +29 -1
- package/corpus/templates/content/app/components/ui/textarea.tsx +1 -0
- package/corpus/templates/content/app/hooks/use-content-database.ts +22 -0
- package/corpus/templates/content/app/i18n/zh-TW.ts +21 -0
- package/corpus/templates/content/app/i18n-data.ts +225 -0
- package/corpus/templates/content/changelog/2026-07-09-builder-source-refreshes-now-keep-mapped-fields-such-as-topi.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-builder-backed-properties-now-load-current-source-values-as-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-builder-database-refreshes-now-stay-explicit-and-accurate.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-database-form-views-now-collect-ordered-required-answers-and.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-database-tables-now-use-a-quieter-more-compact-layout-with-c.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-slack-intake-routes-to-content-database-forms.md +6 -0
- package/corpus/templates/content/parity/matrix.md +1 -0
- package/corpus/templates/content/parity/matrix.ts +18 -0
- package/corpus/templates/content/shared/api.ts +28 -1
- package/corpus/templates/content/shared/database-form.ts +53 -0
- package/corpus/templates/design/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +26 -0
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +85 -12
- package/corpus/templates/design/AGENTS.md +72 -18
- package/corpus/templates/design/DESIGN.md +1 -1
- package/corpus/templates/design/DEVELOPING.md +1 -1
- package/corpus/templates/design/FIGMA_INTEROPERABILITY.md +116 -0
- package/corpus/templates/design/actions/create-design-from-template.ts +220 -0
- package/corpus/templates/design/actions/create-design-system.ts +92 -16
- package/corpus/templates/design/actions/delete-design-template.ts +28 -0
- package/corpus/templates/design/actions/delete-file.ts +7 -0
- package/corpus/templates/design/actions/edit-design.ts +3 -0
- package/corpus/templates/design/actions/export-design-as-figma-svg.ts +137 -5
- package/corpus/templates/design/actions/export-pdf.ts +1 -1
- package/corpus/templates/design/actions/generate-design.ts +3 -0
- package/corpus/templates/design/actions/get-design-snapshot.ts +9 -0
- package/corpus/templates/design/actions/get-figma-connection-status.ts +26 -0
- package/corpus/templates/design/actions/get-figma-design-context.ts +138 -0
- package/corpus/templates/design/actions/get-figma-styles.ts +2 -2
- package/corpus/templates/design/actions/import-figma-clipboard.ts +112 -16
- package/corpus/templates/design/actions/import-figma-frame.ts +15 -4
- package/corpus/templates/design/actions/index-design-system-with-builder.ts +4 -0
- package/corpus/templates/design/actions/list-design-templates.ts +118 -0
- package/corpus/templates/design/actions/navigate.ts +16 -2
- package/corpus/templates/design/actions/provider-api-request.ts +11 -1
- package/corpus/templates/design/actions/save-design-as-template.ts +156 -0
- package/corpus/templates/design/actions/set-active-breakpoint.ts +13 -4
- package/corpus/templates/design/actions/take-design-screenshot.ts +73 -3
- package/corpus/templates/design/actions/update-file.ts +39 -22
- package/corpus/templates/design/actions/view-screen.ts +36 -1
- package/corpus/templates/design/actions/write-local-file.ts +50 -38
- package/corpus/templates/design/app/components/design/AutoLayoutSuggestionDialog.tsx +151 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +20 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +251 -22
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +3 -3
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +384 -9
- package/corpus/templates/design/app/components/design/EditPanel.tsx +105 -32
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +58 -28
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +6 -0
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +539 -53
- package/corpus/templates/design/app/components/design/bridge/embedded-wheel.bridge.ts +40 -0
- package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +1 -0
- package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +1 -0
- package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +5 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/create-providers.ts +2 -0
- package/corpus/templates/design/app/components/design/code-workbench/workspace/localhost-provider.ts +3 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/types.ts +2 -0
- package/corpus/templates/design/app/components/design/edit-panel/element-identity.ts +19 -0
- package/corpus/templates/design/app/components/design/edit-panel/frame-presets-panel.tsx +1 -0
- package/corpus/templates/design/app/components/design/edit-panel/interaction-state-helpers.ts +27 -0
- package/corpus/templates/design/app/components/design/inspector/InteractionStatePanel.tsx +137 -81
- package/corpus/templates/design/app/components/design/inspector/frame-size-presets.ts +25 -5
- package/corpus/templates/design/app/components/design/multi-screen/chrome-transitions.ts +1 -1
- package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +220 -3
- package/corpus/templates/design/app/components/design/multi-screen/overview-layout.ts +13 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +22 -1
- package/corpus/templates/design/app/components/design/types.ts +4 -0
- package/corpus/templates/design/app/components/design-system/ProductionDesignSystemShowcase.tsx +208 -0
- package/corpus/templates/design/app/components/editor/FigmaLinkComposerBubble.tsx +321 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +24 -4
- package/corpus/templates/design/app/components/layout/Layout.tsx +16 -2
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/design/app/components/templates/TemplatePreview.tsx +72 -0
- package/corpus/templates/design/app/global.css +2 -35
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +10 -0
- package/corpus/templates/design/app/i18n/zh-TW.ts +127 -5
- package/corpus/templates/design/app/i18n-breakpoints.ts +209 -0
- package/corpus/templates/design/app/i18n-data.ts +1317 -59
- package/corpus/templates/design/app/i18n-template-feature.ts +458 -0
- package/corpus/templates/design/app/lib/design-clipboard.ts +202 -0
- package/corpus/templates/design/app/lib/design-file-upload.ts +87 -0
- package/corpus/templates/design/app/lib/design-import.ts +168 -11
- package/corpus/templates/design/app/lib/desktop-design-preview.ts +423 -0
- package/corpus/templates/design/app/lib/figma-clipboard.ts +74 -8
- package/corpus/templates/design/app/lib/figma-connection.ts +161 -0
- package/corpus/templates/design/app/lib/figma-svg-copy.ts +814 -22
- package/corpus/templates/design/app/lib/figma-url.ts +77 -0
- package/corpus/templates/design/app/lib/pending-generation.ts +35 -0
- package/corpus/templates/design/app/pages/DesignSystems.tsx +236 -177
- package/corpus/templates/design/app/pages/Index.tsx +38 -0
- package/corpus/templates/design/app/pages/Templates.tsx +498 -0
- package/corpus/templates/design/app/pages/design-editor/auto-layout-suggestion.ts +328 -0
- package/corpus/templates/design/app/pages/design-editor/clone-idrefs.ts +113 -0
- package/corpus/templates/design/app/pages/design-editor/created-screen-navigation.ts +55 -0
- package/corpus/templates/design/app/pages/design-editor/editor-session.ts +32 -0
- package/corpus/templates/design/app/pages/design-editor/editor-state.ts +49 -2
- package/corpus/templates/design/app/pages/design-editor/export-capture.ts +296 -0
- package/corpus/templates/design/app/pages/design-editor/history.ts +101 -2
- package/corpus/templates/design/app/pages/design-editor/layout-operations.ts +28 -1
- package/corpus/templates/design/app/pages/design-editor/overview-camera.ts +34 -0
- package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +202 -6
- package/corpus/templates/design/app/pages/design-editor/pending-structure-verification.ts +92 -0
- package/corpus/templates/design/app/pages/design-editor/save-failure.ts +58 -0
- package/corpus/templates/design/app/routes/templates.tsx +4 -6
- package/corpus/templates/design/changelog/2026-07-10-app-workspaces-now-use-clean-borderless-main-surfaces-throug.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-ask-chat-what-s-in-a-figma-file-or-frame-structure-screensho.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-canvas-edits-now-reject-malformed-html-before-it-can-corrupt.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-complex-designs-now-export-as-valid-secure-svgs-and-crisp-ra.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-complex-figma-masks-arcs-rich-text-transformed-images-and-ad.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-copied-layers-paste-across-designs-and-browser-tabs.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-copy-and-download-editable-figma-svg.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-copying-design-text-now-pastes-readable-text-into-other-apps.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-deleted-screens-can-be-restored-with-undo-and-removed-again-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-design-changes-now-save-before-switching-apps-and-retry-when.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-design-stays-usable-on-phones-by-keeping-editor-panels-and-f.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-download-all-screens-as-one-multi-page-pdf-from-the-overview.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-duplicated-layers-now-keep-labels-aria-relationships-fragmen.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fig-import-results-stay-compact.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-figma-imports-now-load-real-fonts-fix-rotated-gradient-dashe.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-figma-links-in-chat-and-the-import-tab-now-offer-secure-one-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-cmd-z-not-restoring-content-after-an-agent-driven-desi.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-download-pdf-being-unreachable-from-the-export-panel-e.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-dragging-a-layer-out-of-an-auto-layout-row-column-no-l.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-figma-svg-export-text-wrapping-sizing-and-inner-layer.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-hiding-or-locking-one-layer-no-longer-hides-or-blocks-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-png-screenshots-of-tall-screens-being-cropped-to-one-v.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-fixed-png-svg-exports-capturing-broken-layout-when-webfonts-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-frame-tool-now-offers-standard-ad-unit-size-presets-medium-r.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-full-view-controls-stay-within-their-frame-instead-of-coveri.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-hover-focus-focus-visible-pressed-and-disabled-states-now-pr.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-layer-drops-now-land-in-the-intended-grid-row-stay-visually-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-local-code-workspaces-now-keep-unsaved-edits-across-panel-sw.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-local-visual-editing-now-keeps-authenticated-sessions-shared.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-long-running-agent-work-no-longer-shows-a-premature-stuck-wa.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-managed-figma-connections-are-recognized-automatically.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-new-designs-can-open-directly-in-the-editor-without-a-pr.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-new-screens-are-selected-and-revealed-immediately.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-new-text-layers-undo-as-one-safe-creation.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-preview-and-apply-inferred-auto-layout-without-changing-yo.md +5 -0
- package/corpus/templates/design/changelog/2026-07-10-print-pdf-exports-and-paper-size-presets-letter-a4-now-match.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-responsive-frame-editing.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-reusable-design-templates.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-screen-overview-frames-now-use-a-clearer-interact-action-wit.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-start-designs-from-source-linked-material-3-carbon-or-primer.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-tweaks-guidance.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-uploaded-fig-files-can-now-become-editable-design-screens-wi.md +6 -0
- package/corpus/templates/design/e2e/helpers.ts +3 -3
- package/corpus/templates/design/package.json +2 -0
- package/corpus/templates/design/scripts/qa-figma-stress-import.ts +96 -0
- package/corpus/templates/design/server/db/index.ts +10 -0
- package/corpus/templates/design/server/db/schema.ts +44 -0
- package/corpus/templates/design/server/handlers/import-design-file.ts +114 -80
- package/corpus/templates/design/server/handlers/index-design-system-with-builder.ts +19 -6
- package/corpus/templates/design/server/lib/design-export.ts +240 -3
- package/corpus/templates/design/server/lib/design-template-data.ts +89 -0
- package/corpus/templates/design/server/lib/design-to-figma-svg.ts +250 -26
- package/corpus/templates/design/server/lib/fig-file-decoder.ts +839 -0
- package/corpus/templates/design/server/lib/fig-file-import.ts +287 -0
- package/corpus/templates/design/server/lib/fig-file-limits.ts +3 -0
- package/corpus/templates/design/server/lib/fig-file-to-html.ts +2568 -0
- package/corpus/templates/design/server/lib/figma-design-context.ts +359 -0
- package/corpus/templates/design/server/lib/figma-node-import.ts +478 -22
- package/corpus/templates/design/server/lib/figma-node-to-html.ts +554 -29
- package/corpus/templates/design/server/lib/local-figma-qa-upload.ts +112 -0
- package/corpus/templates/design/server/lib/verify-write-grant.ts +16 -2
- package/corpus/templates/design/server/lib/visible-clipboard-html.ts +13 -3
- package/corpus/templates/design/server/plugins/agent-chat.ts +7 -0
- package/corpus/templates/design/server/plugins/db.ts +42 -0
- package/corpus/templates/design/server/plugins/local-figma-qa-upload.ts +7 -0
- package/corpus/templates/design/server/register-secrets.ts +8 -8
- package/corpus/templates/design/server/routes/api/qa-figma-import-assets/[assetId].get.ts +46 -0
- package/corpus/templates/design/server/source-workspace.ts +104 -12
- package/corpus/templates/design/shared/code-layer.ts +105 -28
- package/corpus/templates/design/shared/design-system-templates.ts +301 -0
- package/corpus/templates/design/shared/design-template-presets.ts +195 -0
- package/corpus/templates/design/shared/figma-url.ts +8 -0
- package/corpus/templates/design/shared/html-integrity.ts +306 -0
- package/corpus/templates/design/shared/interaction-states.ts +318 -23
- package/corpus/templates/design/shared/locked-layers.ts +151 -0
- package/corpus/templates/dispatch/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/dispatch/app/i18n/zh-TW.ts +48 -0
- package/corpus/templates/dispatch/app/i18n-data.ts +536 -1
- package/corpus/templates/dispatch/changelog/2026-07-10-connect-slack-workspaces-with-oauth-and-manage-channel-ident.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-10-microsoft-teams-bots-and-discord-slash-commands-can-now-conn.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-10-slack-and-telegram-now-route-uptime-monitor-requests-to-anal.md +6 -0
- package/corpus/templates/forms/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/forms/.agents/skills/form-publishing/SKILL.md +7 -0
- package/corpus/templates/forms/AGENTS.md +4 -0
- package/corpus/templates/forms/actions/create-form.ts +44 -7
- package/corpus/templates/forms/actions/lib/assert-publishable-form.ts +38 -0
- package/corpus/templates/forms/actions/patch-form-fields.ts +4 -0
- package/corpus/templates/forms/actions/update-form.ts +2 -36
- package/corpus/templates/forms/app/i18n/ar-SA.ts +3 -0
- package/corpus/templates/forms/app/i18n/de-DE.ts +3 -0
- package/corpus/templates/forms/app/i18n/en-US.ts +3 -0
- package/corpus/templates/forms/app/i18n/es-ES.ts +3 -0
- package/corpus/templates/forms/app/i18n/fr-FR.ts +3 -0
- package/corpus/templates/forms/app/i18n/hi-IN.ts +3 -0
- package/corpus/templates/forms/app/i18n/ja-JP.ts +3 -0
- package/corpus/templates/forms/app/i18n/ko-KR.ts +3 -0
- package/corpus/templates/forms/app/i18n/pt-BR.ts +3 -0
- package/corpus/templates/forms/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/forms/app/i18n/zh-TW.ts +3 -0
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +17 -0
- package/corpus/templates/forms/changelog/2026-07-10-agent-created-published-forms-now-return-the-anonymous-publi.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-10-published-forms-can-no-longer-be-edited-into-an-unusable-emp.md +6 -0
- package/corpus/templates/forms/server/handlers/submissions.ts +4 -3
- package/corpus/templates/forms/server/plugins/agent-chat.ts +1 -0
- package/corpus/templates/forms/shared/types.ts +5 -0
- package/corpus/templates/mail/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +2 -2
- package/corpus/templates/mail/changelog/2026-07-10-mail-navigation-now-uses-a-clean-borderless-drawer.md +6 -0
- package/corpus/templates/plan/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/corpus/templates/plan/app/lib/plan-local-bridge.ts +4 -1
- package/corpus/templates/plan/changelog/2026-07-10-local-plans-now-keep-valid-content-visible-when-one-generate.md +6 -0
- package/corpus/templates/plan/server/lib/local-plan-files.ts +4 -1
- package/corpus/templates/slides/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/dist/a2a/artifact-response.d.ts.map +1 -1
- package/dist/a2a/artifact-response.js +88 -2
- package/dist/a2a/artifact-response.js.map +1 -1
- package/dist/a2a/client.d.ts +9 -0
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +1 -0
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/handlers.d.ts.map +1 -1
- package/dist/a2a/handlers.js +24 -69
- package/dist/a2a/handlers.js.map +1 -1
- package/dist/a2a/types.d.ts +2 -0
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/agent/durable-background.d.ts +11 -0
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +17 -0
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/agent/production-agent.d.ts +5 -3
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +34 -8
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts +44 -2
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +124 -18
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/run-store.d.ts +109 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +274 -37
- package/dist/agent/run-store.js.map +1 -1
- package/dist/agent/types.d.ts +22 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/audit/record.d.ts.map +1 -1
- package/dist/audit/record.js +29 -0
- package/dist/audit/record.js.map +1 -1
- package/dist/audit/store.d.ts.map +1 -1
- package/dist/audit/store.js +62 -3
- package/dist/audit/store.js.map +1 -1
- package/dist/audit/types.d.ts +13 -0
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js.map +1 -1
- package/dist/automation/index.d.ts +193 -0
- package/dist/automation/index.d.ts.map +1 -0
- package/dist/automation/index.js +464 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +10 -3
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +492 -35
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +7 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +32 -8
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +15 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +115 -47
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +1 -1
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/RunStuckBanner.d.ts +14 -1
- package/dist/client/RunStuckBanner.d.ts.map +1 -1
- package/dist/client/RunStuckBanner.js +35 -7
- package/dist/client/RunStuckBanner.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts +4 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +97 -16
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/automation.d.ts +14 -0
- package/dist/client/automation.d.ts.map +1 -0
- package/dist/client/automation.js +9 -0
- package/dist/client/automation.js.map +1 -0
- package/dist/client/chat/run-recovery.d.ts +4 -0
- package/dist/client/chat/run-recovery.d.ts.map +1 -1
- package/dist/client/chat/run-recovery.js +12 -10
- package/dist/client/chat/run-recovery.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +8 -0
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/integrations/api.d.ts +115 -0
- package/dist/client/integrations/api.d.ts.map +1 -0
- package/dist/client/integrations/api.js +123 -0
- package/dist/client/integrations/api.js.map +1 -0
- package/dist/client/integrations/index.d.ts +1 -0
- package/dist/client/integrations/index.d.ts.map +1 -1
- package/dist/client/integrations/index.js +1 -0
- package/dist/client/integrations/index.js.map +1 -1
- package/dist/client/transcription/use-live-transcription.d.ts.map +1 -1
- package/dist/client/transcription/use-live-transcription.js +59 -5
- package/dist/client/transcription/use-live-transcription.js.map +1 -1
- package/dist/client/use-run-stuck-detection.d.ts +16 -1
- package/dist/client/use-run-stuck-detection.d.ts.map +1 -1
- package/dist/client/use-run-stuck-detection.js +23 -4
- package/dist/client/use-run-stuck-detection.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +49 -4
- package/dist/deploy/build.js.map +1 -1
- package/dist/deploy/workspace-deploy.d.ts.map +1 -1
- package/dist/deploy/workspace-deploy.js +31 -2
- package/dist/deploy/workspace-deploy.js.map +1 -1
- package/dist/file-upload/types.d.ts +2 -0
- package/dist/file-upload/types.d.ts.map +1 -1
- package/dist/file-upload/types.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/a2a-continuations-store.d.ts.map +1 -1
- package/dist/integrations/a2a-continuations-store.js +6 -4
- package/dist/integrations/a2a-continuations-store.js.map +1 -1
- package/dist/integrations/adapters/discord.d.ts +3 -0
- package/dist/integrations/adapters/discord.d.ts.map +1 -0
- package/dist/integrations/adapters/discord.js +261 -0
- package/dist/integrations/adapters/discord.js.map +1 -0
- package/dist/integrations/adapters/index.d.ts +4 -0
- package/dist/integrations/adapters/index.d.ts.map +1 -0
- package/dist/integrations/adapters/index.js +26 -0
- package/dist/integrations/adapters/index.js.map +1 -0
- package/dist/integrations/adapters/microsoft-teams.d.ts +5 -0
- package/dist/integrations/adapters/microsoft-teams.d.ts.map +1 -0
- package/dist/integrations/adapters/microsoft-teams.js +295 -0
- package/dist/integrations/adapters/microsoft-teams.js.map +1 -0
- package/dist/integrations/adapters/slack.d.ts +8 -2
- package/dist/integrations/adapters/slack.d.ts.map +1 -1
- package/dist/integrations/adapters/slack.js +736 -27
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/integrations/adapters/telegram.d.ts +0 -2
- package/dist/integrations/adapters/telegram.d.ts.map +1 -1
- package/dist/integrations/adapters/telegram.js +49 -15
- package/dist/integrations/adapters/telegram.js.map +1 -1
- package/dist/integrations/adapters/whatsapp.d.ts +0 -2
- package/dist/integrations/adapters/whatsapp.d.ts.map +1 -1
- package/dist/integrations/adapters/whatsapp.js +40 -17
- package/dist/integrations/adapters/whatsapp.js.map +1 -1
- package/dist/integrations/catalog.d.ts +75 -0
- package/dist/integrations/catalog.d.ts.map +1 -0
- package/dist/integrations/catalog.js +451 -0
- package/dist/integrations/catalog.js.map +1 -0
- package/dist/integrations/controls-store.d.ts +44 -0
- package/dist/integrations/controls-store.d.ts.map +1 -0
- package/dist/integrations/controls-store.js +129 -0
- package/dist/integrations/controls-store.js.map +1 -0
- package/dist/integrations/index.d.ts +13 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +9 -0
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/installations-store.d.ts +112 -0
- package/dist/integrations/installations-store.d.ts.map +1 -0
- package/dist/integrations/installations-store.js +493 -0
- package/dist/integrations/installations-store.js.map +1 -0
- package/dist/integrations/integration-memory.d.ts +24 -0
- package/dist/integrations/integration-memory.d.ts.map +1 -0
- package/dist/integrations/integration-memory.js +136 -0
- package/dist/integrations/integration-memory.js.map +1 -0
- package/dist/integrations/pending-tasks-retry-job.d.ts.map +1 -1
- package/dist/integrations/pending-tasks-retry-job.js +6 -5
- package/dist/integrations/pending-tasks-retry-job.js.map +1 -1
- package/dist/integrations/pending-tasks-store.d.ts +17 -0
- package/dist/integrations/pending-tasks-store.d.ts.map +1 -1
- package/dist/integrations/pending-tasks-store.js +71 -5
- package/dist/integrations/pending-tasks-store.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +520 -35
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/scope-store.d.ts +65 -0
- package/dist/integrations/scope-store.d.ts.map +1 -0
- package/dist/integrations/scope-store.js +361 -0
- package/dist/integrations/scope-store.js.map +1 -0
- package/dist/integrations/slack-manifest.d.ts +66 -0
- package/dist/integrations/slack-manifest.d.ts.map +1 -0
- package/dist/integrations/slack-manifest.js +70 -0
- package/dist/integrations/slack-manifest.js.map +1 -0
- package/dist/integrations/slack-oauth.d.ts +99 -0
- package/dist/integrations/slack-oauth.d.ts.map +1 -0
- package/dist/integrations/slack-oauth.js +226 -0
- package/dist/integrations/slack-oauth.js.map +1 -0
- package/dist/integrations/types.d.ts +144 -0
- package/dist/integrations/types.d.ts.map +1 -1
- package/dist/integrations/types.js +16 -1
- package/dist/integrations/types.js.map +1 -1
- package/dist/integrations/usage-budget-store.d.ts +84 -0
- package/dist/integrations/usage-budget-store.d.ts.map +1 -0
- package/dist/integrations/usage-budget-store.js +650 -0
- package/dist/integrations/usage-budget-store.js.map +1 -0
- package/dist/integrations/webhook-handler.d.ts +4 -0
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +415 -47
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/jobs/scheduler.d.ts +6 -0
- package/dist/jobs/scheduler.d.ts.map +1 -1
- package/dist/jobs/scheduler.js +83 -4
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/jobs/tools.d.ts.map +1 -1
- package/dist/jobs/tools.js +43 -11
- package/dist/jobs/tools.js.map +1 -1
- package/dist/provider-api/index.d.ts +4 -4
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +72 -1
- package/dist/provider-api/index.js.map +1 -1
- package/dist/resources/handlers.d.ts.map +1 -1
- package/dist/resources/handlers.js +57 -15
- package/dist/resources/handlers.js.map +1 -1
- package/dist/resources/script-helpers.d.ts.map +1 -1
- package/dist/resources/script-helpers.js +34 -8
- package/dist/resources/script-helpers.js.map +1 -1
- package/dist/resources/store.d.ts +10 -0
- package/dist/resources/store.d.ts.map +1 -1
- package/dist/resources/store.js +54 -47
- package/dist/resources/store.js.map +1 -1
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +106 -1
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +15 -4
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +248 -113
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +10 -14
- package/dist/server/auth.js.map +1 -1
- package/dist/server/builder-design-systems.d.ts +3 -1
- package/dist/server/builder-design-systems.d.ts.map +1 -1
- package/dist/server/builder-design-systems.js +9 -2
- package/dist/server/builder-design-systems.js.map +1 -1
- package/dist/server/edge.d.ts +1 -1
- package/dist/server/edge.d.ts.map +1 -1
- package/dist/server/edge.js +1 -1
- package/dist/server/edge.js.map +1 -1
- package/dist/server/index.d.ts +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/request-context.d.ts +18 -0
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js.map +1 -1
- package/dist/server/social-og-image.d.ts.map +1 -1
- package/dist/server/social-og-image.js +3 -2
- package/dist/server/social-og-image.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/styles/agent-native.css +62 -44
- package/dist/templates/default/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/dist/templates/default/AGENTS.md +7 -3
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/dist/templates/workspace-core/.agents/skills/extension-points/SKILL.md +6 -3
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +25 -0
- package/dist/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +15 -0
- package/dist/templates/workspace-core/AGENTS.md +3 -2
- package/dist/usage/store.d.ts +7 -0
- package/dist/usage/store.d.ts.map +1 -1
- package/dist/usage/store.js +24 -3
- package/dist/usage/store.js.map +1 -1
- package/docs/content/automation-connectors.mdx +80 -0
- package/docs/content/extensions.mdx +8 -0
- package/docs/content/locales/ar-SA/extensions.mdx +8 -0
- package/docs/content/locales/ar-SA/messaging.mdx +84 -15
- package/docs/content/locales/ar-SA/template-clips.mdx +1 -0
- package/docs/content/locales/ar-SA/template-design.mdx +1 -0
- package/docs/content/locales/de-DE/extensions.mdx +10 -0
- package/docs/content/locales/de-DE/messaging.mdx +92 -15
- package/docs/content/locales/de-DE/template-clips.mdx +1 -0
- package/docs/content/locales/de-DE/template-design.mdx +1 -0
- package/docs/content/locales/es-ES/extensions.mdx +10 -0
- package/docs/content/locales/es-ES/messaging.mdx +91 -15
- package/docs/content/locales/es-ES/template-clips.mdx +1 -0
- package/docs/content/locales/es-ES/template-design.mdx +1 -0
- package/docs/content/locales/fr-FR/extensions.mdx +10 -0
- package/docs/content/locales/fr-FR/messaging.mdx +91 -15
- package/docs/content/locales/fr-FR/template-clips.mdx +1 -0
- package/docs/content/locales/fr-FR/template-design.mdx +1 -0
- package/docs/content/locales/hi-IN/extensions.mdx +8 -0
- package/docs/content/locales/hi-IN/messaging.mdx +81 -15
- package/docs/content/locales/hi-IN/template-clips.mdx +1 -0
- package/docs/content/locales/hi-IN/template-design.mdx +1 -0
- package/docs/content/locales/ja-JP/extensions.mdx +9 -0
- package/docs/content/locales/ja-JP/messaging.mdx +81 -15
- package/docs/content/locales/ja-JP/template-clips.mdx +1 -0
- package/docs/content/locales/ja-JP/template-design.mdx +1 -0
- package/docs/content/locales/ko-KR/extensions.mdx +8 -0
- package/docs/content/locales/ko-KR/messaging.mdx +80 -15
- package/docs/content/locales/ko-KR/template-clips.mdx +1 -0
- package/docs/content/locales/ko-KR/template-design.mdx +1 -0
- package/docs/content/locales/pt-BR/extensions.mdx +9 -0
- package/docs/content/locales/pt-BR/messaging.mdx +88 -15
- package/docs/content/locales/pt-BR/template-clips.mdx +1 -0
- package/docs/content/locales/pt-BR/template-design.mdx +1 -0
- package/docs/content/locales/zh-CN/extensions.mdx +6 -0
- package/docs/content/locales/zh-CN/messaging.mdx +78 -15
- package/docs/content/locales/zh-CN/template-clips.mdx +1 -0
- package/docs/content/locales/zh-CN/template-design.mdx +1 -0
- package/docs/content/locales/zh-TW/extensions.mdx +6 -0
- package/docs/content/locales/zh-TW/messaging.mdx +78 -15
- package/docs/content/locales/zh-TW/template-clips.mdx +1 -0
- package/docs/content/locales/zh-TW/template-design.mdx +1 -0
- package/docs/content/messaging.mdx +227 -45
- package/docs/content/template-clips.mdx +3 -0
- package/docs/content/template-design.mdx +4 -0
- package/package.json +5 -1
- package/src/templates/default/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/src/templates/default/AGENTS.md +7 -3
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +22 -9
- package/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +6 -3
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +25 -0
- package/src/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +15 -0
- package/src/templates/workspace-core/AGENTS.md +3 -2
|
@@ -29,6 +29,8 @@ export interface BuildBuilderDesignSystemIndexFilesOptions {
|
|
|
29
29
|
designMdFilename?: string;
|
|
30
30
|
maxCodeFiles?: number;
|
|
31
31
|
maxTotalCodeBytes?: number;
|
|
32
|
+
/** Default keeps legacy best-effort code indexing; upload/chat surfaces should fail loudly. */
|
|
33
|
+
overflowBehavior?: "skip" | "throw";
|
|
32
34
|
}
|
|
33
35
|
export interface BuilderDesignSystemProxyFieldsOptions {
|
|
34
36
|
result: BuilderDesignSystemIndexResult;
|
|
@@ -93,7 +95,7 @@ export interface BuilderDesignSystemIndexResult {
|
|
|
93
95
|
}
|
|
94
96
|
export declare function getBuilderDesignSystemsBaseUrl(): string;
|
|
95
97
|
export declare function mimeTypeForBuilderDesignSystemFilename(filename: string, explicit?: string): string;
|
|
96
|
-
export declare function buildBuilderDesignSystemIndexFiles({ codeFiles, designMd, designMdFilename, maxCodeFiles, maxTotalCodeBytes, }: BuildBuilderDesignSystemIndexFilesOptions): BuilderDesignSystemIndexFile[];
|
|
98
|
+
export declare function buildBuilderDesignSystemIndexFiles({ codeFiles, designMd, designMdFilename, maxCodeFiles, maxTotalCodeBytes, overflowBehavior, }: BuildBuilderDesignSystemIndexFilesOptions): BuilderDesignSystemIndexFile[];
|
|
97
99
|
export declare function builderDesignSystemUrl(designSystemId?: string | null): string;
|
|
98
100
|
export declare function localBuilderDesignSystemId(builderDesignSystemId: string): string;
|
|
99
101
|
export declare function createBuilderDesignSystemProxyFields({ result, projectName, description, surface, }: BuilderDesignSystemProxyFieldsOptions): BuilderDesignSystemProxyFields;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-design-systems.d.ts","sourceRoot":"","sources":["../../src/server/builder-design-systems.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC9B;AAED,MAAM,WAAW,yCAAyC;IACxD,SAAS,CAAC,EAAE,gCAAgC,EAAE,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"builder-design-systems.d.ts","sourceRoot":"","sources":["../../src/server/builder-design-systems.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,Q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,gBAAgB,EAChB,YAAqC,EACrC,iBAAgD,EAChD,gBAAyB,GAC1B,EAAE,yCAAyC,GAAG,4BAA4B,EAAE,CAyD5E;AAoGD,wBAAgB,sBAAsB,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAO7E;AAED,wBAAgB,0BAA0B,CACxC,qBAAqB,EAAE,MAAM,GAC5B,MAAM,CAMR;AAED,wBAAgB,oCAAoC,CAAC,EACnD,MAAM,EACN,WAAW,EACX,WAAW,EACX,OAAO,GACR,EAAE,qCAAqC,GAAG,8BAA8B,CA6DxE;AAED,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,OAAO,GACZ,iCAAiC,GAAG,IAAI,CA2B1C;AA4CD,wBAAsB,4BAA4B,CAChD,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,8BAAmC,GAC3C,OAAO,CAAC,2BAA2B,EAAE,CAAC,CAsBxC;AAED,wBAAsB,mCAAmC,CACvD,SAAS,EAAE,iCAAiC,EAC5C,OAAO,GAAE,8BAA0D,GAClE,OAAO,CAAC,oCAAoC,CAAC,CAkB/C;AAED,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,8BAA8B,CAAC,CAmGzC"}
|
|
@@ -53,7 +53,7 @@ export function mimeTypeForBuilderDesignSystemFilename(filename, explicit) {
|
|
|
53
53
|
return "image/svg+xml";
|
|
54
54
|
return "text/plain";
|
|
55
55
|
}
|
|
56
|
-
export function buildBuilderDesignSystemIndexFiles({ codeFiles, designMd, designMdFilename, maxCodeFiles = DEFAULT_MAX_CODE_FILES, maxTotalCodeBytes = DEFAULT_MAX_TOTAL_CODE_BYTES, }) {
|
|
56
|
+
export function buildBuilderDesignSystemIndexFiles({ codeFiles, designMd, designMdFilename, maxCodeFiles = DEFAULT_MAX_CODE_FILES, maxTotalCodeBytes = DEFAULT_MAX_TOTAL_CODE_BYTES, overflowBehavior = "skip", }) {
|
|
57
57
|
const encoder = new TextEncoder();
|
|
58
58
|
const files = [];
|
|
59
59
|
let totalBytes = 0;
|
|
@@ -67,8 +67,12 @@ export function buildBuilderDesignSystemIndexFiles({ codeFiles, designMd, design
|
|
|
67
67
|
: encoder.encode(content);
|
|
68
68
|
if (data.byteLength === 0)
|
|
69
69
|
return;
|
|
70
|
-
if (totalBytes + data.byteLength > maxTotalCodeBytes)
|
|
70
|
+
if (totalBytes + data.byteLength > maxTotalCodeBytes) {
|
|
71
|
+
if (overflowBehavior === "throw") {
|
|
72
|
+
throw new Error(`Design-system file "${normalizedName}" exceeds the ${Math.round(maxTotalCodeBytes / 1024 / 1024)} MB inline upload budget. Use the dedicated file upload instead of sending large binary files through an action payload.`);
|
|
73
|
+
}
|
|
71
74
|
return;
|
|
75
|
+
}
|
|
72
76
|
totalBytes += data.byteLength;
|
|
73
77
|
files.push({
|
|
74
78
|
name: normalizedName,
|
|
@@ -79,6 +83,9 @@ export function buildBuilderDesignSystemIndexFiles({ codeFiles, designMd, design
|
|
|
79
83
|
if (designMd?.trim()) {
|
|
80
84
|
pushFile(designMdFilename?.trim() || "design.md", designMd, "text/markdown");
|
|
81
85
|
}
|
|
86
|
+
if (overflowBehavior === "throw" && (codeFiles?.length ?? 0) > maxCodeFiles) {
|
|
87
|
+
throw new Error(`Too many design-system files (max ${maxCodeFiles}); no files were indexed.`);
|
|
88
|
+
}
|
|
82
89
|
for (const file of (codeFiles ?? []).slice(0, maxCodeFiles)) {
|
|
83
90
|
pushFile(file.filename, file.content, file.mimeType, file.encoding);
|
|
84
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-design-systems.js","sourceRoot":"","sources":["../../src/server/builder-design-systems.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAElC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AA0HnC,M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AAE;gBACpC,CAAC,CAAC,EAAE,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,CAAC,IAAI,EAAE,EAAE;gBAC3D,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9D,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,IAAI,EAAE;gBACjC,CAAC,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,eAAe,CAAC,IAAI,EAAE,EAAE;gBACrD,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;KACH,CACF,CAAC;IACF,MAAM,QAAQ,CAAC,QAAQ,EAAE,uCAAuC,CAAC,CAAC;IAClE,MAAM,SAAS,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAqB,CAAC;IAC9D,IAAI,CAAC,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC;QAC1E,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;IACJ,CAAC;IAED,OAAO;QACL,EAAE,EAAE,IAAI;QACR,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,cAAc,EAAE,SAAS,CAAC,cAAc;QACxC,cAAc,EAAE,OAAO,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,IAAI;QACnD,UAAU,EAAE,sBAAsB,CAAC,SAAS,CAAC,cAAc,CAAC;QAC5D,MAAM,EAAE,aAAa;KACtB,CAAC;AACJ,CAAC","sourcesContent":["import { FeatureNotConfiguredError } from \"./credential-provider.js\";\nimport {\n getBuilderProxyOrigin,\n resolveBuilderCredentials,\n} from \"./credential-provider.js\";\n\nconst DEFAULT_TIMEOUT_MS = 120_000;\n\nexport interface BuilderDesignSystemIndexFile {\n name: string;\n data: Uint8Array;\n mimeType?: string;\n}\n\nexport interface BuilderDesignSystemCodeFileInput {\n filename: string;\n content: string;\n mimeType?: string;\n /**\n * How `content` is encoded. Defaults to `\"utf8\"` (existing behavior,\n * unchanged for every current text-file caller). Pass `\"base64\"` for\n * binary files -- most importantly `.fig` (a zip/kiwi binary container,\n * never valid UTF-8 text). Without this, a `.fig` upload silently\n * corrupts: `mimeTypeForBuilderDesignSystemFilename` already special-cases\n * `.fig` as `application/octet-stream`, but the actual byte pipeline ran\n * every file through `TextEncoder().encode()` regardless, which mangles\n * any byte >= 0x80 in a binary-as-string payload (or, if the caller\n * base64-encoded first with no decode step here, stores the literal\n * base64 text instead of the decoded binary). Callers sending `.fig`/PDF/\n * other binary bytes must base64-encode `content` and set this to\n * `\"base64\"`.\n */\n encoding?: \"utf8\" | \"base64\";\n}\n\nexport interface BuildBuilderDesignSystemIndexFilesOptions {\n codeFiles?: BuilderDesignSystemCodeFileInput[];\n designMd?: string;\n designMdFilename?: string;\n maxCodeFiles?: number;\n maxTotalCodeBytes?: number;\n}\n\nexport interface BuilderDesignSystemProxyFieldsOptions {\n result: BuilderDesignSystemIndexResult;\n projectName?: string;\n description?: string;\n surface: \"design\" | \"slides\";\n}\n\nexport interface BuilderDesignSystemProxyFields {\n title: string;\n description: string;\n data: string;\n customInstructions: string;\n}\n\nexport interface BuilderDesignSystemProxyReference {\n source: \"builder\";\n builderDesignSystemId: string;\n builderJobId: string;\n builderProjectId?: string;\n builderUrl?: string;\n builderStatus?: string;\n}\n\nexport interface BuilderDesignSystemDocsOptions {\n page?: number;\n pageSize?: number;\n minimal?: boolean;\n type?: string;\n}\n\nexport interface BuilderDesignSystemDocument {\n id?: string;\n name?: string;\n type?: string;\n description?: string;\n content?: string;\n tokenValues?: Record<string, string>;\n rawTokens?: string[];\n relevantFiles?: string[];\n relatedComponents?: string[];\n}\n\nexport interface BuilderDesignSystemHydratedReference extends BuilderDesignSystemProxyReference {\n docs: BuilderDesignSystemDocument[];\n tokenValues: Record<string, string>;\n docCount: number;\n}\n\nexport interface BuilderDesignSystemIndexOptions {\n projectName?: string;\n description?: string;\n githubRepoUrl?: string;\n connectedProjectId?: string;\n files?: BuilderDesignSystemIndexFile[];\n selection?: Record<string, string[]>;\n devToolsVersion?: string;\n}\n\nexport interface BuilderDesignSystemIndexResult {\n ok: true;\n source: \"builder\";\n projectId: string;\n jobId: string;\n designSystemId: string;\n suggestedTitle: string | null;\n builderUrl: string;\n status: \"in-progress\";\n}\n\ninterface BuilderDesignSystemCredentials {\n privateKey: string;\n publicKey: string;\n userId: string | null;\n}\n\ninterface UploadStartResponse {\n uploads?: Array<{ idx: number; uploadUrl: string; uploadToken: string }>;\n}\n\ninterface GenerateResponse {\n projectId?: string;\n jobId?: string;\n designSystemId?: string;\n}\n\nconst DEFAULT_MAX_CODE_FILES = 50;\nconst DEFAULT_MAX_TOTAL_CODE_BYTES = 2 * 1024 * 1024;\nconst MAX_DOC_CONTENT_CHARS = 4_000;\n\nfunction trimTrailingSlash(value: string): string {\n return value.replace(/\\/+$/, \"\");\n}\n\nexport function getBuilderDesignSystemsBaseUrl(): string {\n return (\n process.env.BUILDER_DESIGN_SYSTEMS_BASE_URL ||\n `${trimTrailingSlash(getBuilderProxyOrigin())}/design-systems/v1`\n );\n}\n\nfunction getBuilderAppHost(): string {\n return (\n process.env.BUILDER_APP_HOST ||\n process.env.BUILDER_PUBLIC_APP_HOST ||\n \"https://builder.io\"\n );\n}\n\nfunction makeBuilderDesignSystemUrl(\n path: string,\n credentials: BuilderDesignSystemCredentials,\n): URL {\n const base = `${trimTrailingSlash(getBuilderDesignSystemsBaseUrl())}/`;\n const url = new URL(path.replace(/^\\/+/, \"\"), base);\n url.searchParams.set(\"apiKey\", credentials.publicKey);\n if (credentials.userId) url.searchParams.set(\"userId\", credentials.userId);\n return url;\n}\n\nfunction makeBuilderHeaders(\n credentials: BuilderDesignSystemCredentials,\n): Record<string, string> {\n return {\n Authorization: `Bearer ${credentials.privateKey}`,\n \"x-builder-api-key\": credentials.publicKey,\n ...(credentials.userId ? { \"x-builder-user-id\": credentials.userId } : {}),\n };\n}\n\nexport function mimeTypeForBuilderDesignSystemFilename(\n filename: string,\n explicit?: string,\n): string {\n if (explicit?.trim()) return explicit.trim();\n const lower = filename.toLowerCase();\n if (lower.endsWith(\".fig\")) return \"application/octet-stream\";\n if (lower.endsWith(\".pdf\")) return \"application/pdf\";\n if (lower.endsWith(\".md\") || lower.endsWith(\".markdown\"))\n return \"text/markdown\";\n if (lower.endsWith(\".mdx\")) return \"text/markdown\";\n if (lower.endsWith(\".json\")) return \"application/json\";\n if (lower.endsWith(\".css\")) return \"text/css\";\n if (lower.endsWith(\".html\") || lower.endsWith(\".htm\")) return \"text/html\";\n if (lower.endsWith(\".svg\")) return \"image/svg+xml\";\n return \"text/plain\";\n}\n\nexport function buildBuilderDesignSystemIndexFiles({\n codeFiles,\n designMd,\n designMdFilename,\n maxCodeFiles = DEFAULT_MAX_CODE_FILES,\n maxTotalCodeBytes = DEFAULT_MAX_TOTAL_CODE_BYTES,\n}: BuildBuilderDesignSystemIndexFilesOptions): BuilderDesignSystemIndexFile[] {\n const encoder = new TextEncoder();\n const files: BuilderDesignSystemIndexFile[] = [];\n let totalBytes = 0;\n\n function pushFile(\n filename: string,\n content: string,\n mimeType?: string,\n encoding?: \"utf8\" | \"base64\",\n ) {\n const normalizedName = filename.replace(/^\\/+/, \"\") || \"code.txt\";\n // `.fig`/PDF/other binary payloads must round-trip through base64, not\n // UTF-8 -- TextEncoder().encode() on a binary-as-string payload mangles\n // any byte >= 0x80. See BuilderDesignSystemCodeFileInput.encoding.\n const data =\n encoding === \"base64\"\n ? new Uint8Array(Buffer.from(content, \"base64\"))\n : encoder.encode(content);\n if (data.byteLength === 0) return;\n if (totalBytes + data.byteLength > maxTotalCodeBytes) return;\n totalBytes += data.byteLength;\n files.push({\n name: normalizedName,\n data,\n mimeType: mimeTypeForBuilderDesignSystemFilename(\n normalizedName,\n mimeType,\n ),\n });\n }\n\n if (designMd?.trim()) {\n pushFile(\n designMdFilename?.trim() || \"design.md\",\n designMd,\n \"text/markdown\",\n );\n }\n\n for (const file of (codeFiles ?? []).slice(0, maxCodeFiles)) {\n pushFile(file.filename, file.content, file.mimeType, file.encoding);\n }\n\n return files;\n}\n\nasync function resolveBuilderDesignSystemCredentials(): Promise<BuilderDesignSystemCredentials> {\n const credentials = await resolveBuilderCredentials();\n if (!credentials.privateKey || !credentials.publicKey) {\n throw new FeatureNotConfiguredError({\n requiredCredential: \"BUILDER_PRIVATE_KEY\",\n message:\n \"Connect Builder.io before indexing a design system from Figma or code.\",\n builderConnectUrl: \"/_agent-native/builder/connect\",\n });\n }\n return {\n privateKey: credentials.privateKey,\n publicKey: credentials.publicKey,\n userId: credentials.userId ?? null,\n };\n}\n\nfunction mimeTypeForFile(file: BuilderDesignSystemIndexFile): string {\n return mimeTypeForBuilderDesignSystemFilename(file.name, file.mimeType);\n}\n\nfunction makeBody(bytes: Uint8Array, mimeType: string): BodyInit {\n return typeof Blob !== \"undefined\"\n ? new Blob([bytes as unknown as BlobPart], { type: mimeType })\n : (bytes as unknown as BodyInit);\n}\n\nasync function fetchWithTimeout(\n url: string | URL,\n init: RequestInit,\n timeoutMs = DEFAULT_TIMEOUT_MS,\n): Promise<Response> {\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), timeoutMs);\n try {\n return await fetch(url, { ...init, signal: controller.signal });\n } finally {\n clearTimeout(timer);\n }\n}\n\nasync function parseErrorBody(response: Response): Promise<string> {\n const text = await response.text().catch(() => \"\");\n if (!text) return response.statusText || `HTTP ${response.status}`;\n try {\n const json = JSON.parse(text) as { error?: unknown };\n if (typeof json.error === \"string\") return json.error;\n if (json.error && typeof json.error === \"object\") {\n return JSON.stringify(json.error).slice(0, 500);\n }\n } catch {}\n return text.replace(/\\s+/g, \" \").trim().slice(0, 500);\n}\n\nasync function assertOk(response: Response, label: string): Promise<void> {\n if (response.ok) return;\n throw new Error(\n `${label} (${response.status}): ${await parseErrorBody(response)}`,\n );\n}\n\nasync function uploadToResumableUrl(\n slot: { uploadUrl: string },\n file: BuilderDesignSystemIndexFile,\n): Promise<void> {\n const mimeType = mimeTypeForFile(file);\n const bytes = file.data;\n const start = await fetchWithTimeout(slot.uploadUrl, {\n method: \"POST\",\n headers: {\n \"x-goog-resumable\": \"start\",\n \"x-goog-content-length-range\": `0,${bytes.byteLength}`,\n \"Content-Type\": mimeType,\n },\n });\n await assertOk(start, \"Builder design-system upload session failed\");\n const sessionUrl = start.headers.get(\"Location\");\n if (!sessionUrl) {\n throw new Error(\"Builder design-system upload session returned no URL.\");\n }\n\n const response = await fetchWithTimeout(sessionUrl, {\n method: \"PUT\",\n headers: {\n \"Content-Range\": `bytes 0-${bytes.byteLength - 1}/${bytes.byteLength}`,\n \"Content-Type\": mimeType,\n },\n body: makeBody(bytes, mimeType),\n });\n await assertOk(response, \"Builder design-system file upload failed\");\n}\n\nfunction nonEmptyFiles(\n files: BuilderDesignSystemIndexFile[] | undefined,\n): BuilderDesignSystemIndexFile[] {\n return (files ?? []).filter((file) => file.data.byteLength > 0);\n}\n\nexport function builderDesignSystemUrl(designSystemId?: string | null): string {\n const host = trimTrailingSlash(getBuilderAppHost());\n return designSystemId\n ? `${host}/app/design-system-intelligence/${encodeURIComponent(\n designSystemId,\n )}`\n : `${host}/app/design-system-intelligence`;\n}\n\nexport function localBuilderDesignSystemId(\n builderDesignSystemId: string,\n): string {\n const slug = builderDesignSystemId\n .replace(/[^a-zA-Z0-9_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n .slice(0, 96);\n return `builder-${slug || \"design-system\"}`;\n}\n\nexport function createBuilderDesignSystemProxyFields({\n result,\n projectName,\n description,\n surface,\n}: BuilderDesignSystemProxyFieldsOptions): BuilderDesignSystemProxyFields {\n const title = projectName?.trim() || \"Builder indexed design system\";\n const fallbackDescription =\n description ?? `Builder indexed design system ${result.designSystemId}`;\n const surfaceNoun = surface === \"slides\" ? \"slides\" : \"designs\";\n const spacingKey = surface === \"slides\" ? \"slidePadding\" : \"pagePadding\";\n const data = JSON.stringify({\n source: \"builder\",\n builderDesignSystemId: result.designSystemId,\n builderJobId: result.jobId,\n builderProjectId: result.projectId,\n builderUrl: result.builderUrl,\n builderStatus: result.status,\n colors: {\n primary: \"var(--primary)\",\n secondary: \"var(--secondary)\",\n accent: \"var(--accent)\",\n background: \"var(--background)\",\n surface: \"var(--card)\",\n text: \"var(--foreground)\",\n textMuted: \"var(--muted-foreground)\",\n },\n typography: {\n headingFont: \"inherit\",\n bodyFont: \"inherit\",\n headingWeight: \"700\",\n bodyWeight: \"400\",\n headingSizes: { h1: \"48px\", h2: \"32px\", h3: \"24px\" },\n },\n spacing: { elementGap: \"24px\", [spacingKey]: \"48px\" },\n borders: { radius: \"12px\", accentWidth: \"1px\" },\n logos: [],\n notes: [\n \"This is a local selectable proxy for a Builder DSI-indexed design system.\",\n `Builder design system id: ${result.designSystemId}`,\n `Builder indexing job id: ${result.jobId}`,\n `Builder project id: ${result.projectId}`,\n `Builder URL: ${result.builderUrl}`,\n projectName ? `Requested name: ${projectName}` : \"\",\n description ? `Context: ${description}` : \"\",\n \"Builder Design System Intelligence is the source of truth for indexed tokens, components, assets, and usage guidance.\",\n ]\n .filter(Boolean)\n .join(\"\\n\"),\n });\n const customInstructions = [\n \"This design system is indexed by Builder Design System Intelligence (DSI).\",\n `Builder design system id: ${result.designSystemId}`,\n `Builder job id: ${result.jobId}`,\n `Builder project id: ${result.projectId}`,\n `Builder URL: ${result.builderUrl}`,\n `When generating ${surfaceNoun}, treat Builder DSI as the source of truth for indexed tokens, components, assets, and usage guidance.`,\n \"Call get-design-system for this local id before generation and use the returned builder docs and token values when available.\",\n ].join(\"\\n\");\n\n return {\n title,\n description: fallbackDescription,\n data,\n customInstructions,\n };\n}\n\nexport function parseBuilderDesignSystemProxyReference(\n data: unknown,\n): BuilderDesignSystemProxyReference | null {\n let parsed: unknown = data;\n if (typeof data === \"string\") {\n try {\n parsed = JSON.parse(data);\n } catch {\n return null;\n }\n }\n if (!parsed || typeof parsed !== \"object\") return null;\n const value = parsed as Record<string, unknown>;\n if (value.source !== \"builder\") return null;\n if (typeof value.builderDesignSystemId !== \"string\") return null;\n if (typeof value.builderJobId !== \"string\") return null;\n return {\n source: \"builder\",\n builderDesignSystemId: value.builderDesignSystemId,\n builderJobId: value.builderJobId,\n builderProjectId:\n typeof value.builderProjectId === \"string\"\n ? value.builderProjectId\n : undefined,\n builderUrl:\n typeof value.builderUrl === \"string\" ? value.builderUrl : undefined,\n builderStatus:\n typeof value.builderStatus === \"string\" ? value.builderStatus : undefined,\n };\n}\n\nfunction truncateDocContent(content: unknown): string | undefined {\n if (typeof content !== \"string\") return undefined;\n if (content.length <= MAX_DOC_CONTENT_CHARS) return content;\n return `${content.slice(0, MAX_DOC_CONTENT_CHARS)}\\n\\n[truncated]`;\n}\n\nfunction normalizeBuilderDesignSystemDocument(\n value: unknown,\n): BuilderDesignSystemDocument {\n const doc =\n value && typeof value === \"object\"\n ? (value as Record<string, unknown>)\n : {};\n return {\n id: typeof doc.id === \"string\" ? doc.id : undefined,\n name: typeof doc.name === \"string\" ? doc.name : undefined,\n type: typeof doc.type === \"string\" ? doc.type : undefined,\n description:\n typeof doc.description === \"string\" ? doc.description : undefined,\n content: truncateDocContent(doc.content),\n tokenValues:\n doc.tokenValues && typeof doc.tokenValues === \"object\"\n ? (doc.tokenValues as Record<string, string>)\n : undefined,\n rawTokens: Array.isArray(doc.rawTokens)\n ? doc.rawTokens.filter(\n (token): token is string => typeof token === \"string\",\n )\n : undefined,\n relevantFiles: Array.isArray(doc.relevantFiles)\n ? doc.relevantFiles.filter(\n (file): file is string => typeof file === \"string\",\n )\n : undefined,\n relatedComponents: Array.isArray(doc.relatedComponents)\n ? doc.relatedComponents.filter(\n (component): component is string => typeof component === \"string\",\n )\n : undefined,\n };\n}\n\nexport async function fetchBuilderDesignSystemDocs(\n designSystemId: string,\n options: BuilderDesignSystemDocsOptions = {},\n): Promise<BuilderDesignSystemDocument[]> {\n const credentials = await resolveBuilderDesignSystemCredentials();\n const url = makeBuilderDesignSystemUrl(\n `${encodeURIComponent(designSystemId)}/docs`,\n credentials,\n );\n if (options.page !== undefined)\n url.searchParams.set(\"page\", String(options.page));\n if (options.pageSize !== undefined)\n url.searchParams.set(\"pageSize\", String(options.pageSize));\n if (options.minimal !== undefined)\n url.searchParams.set(\"minimal\", options.minimal ? \"true\" : \"false\");\n if (options.type?.trim()) url.searchParams.set(\"type\", options.type.trim());\n\n const response = await fetchWithTimeout(url, {\n method: \"GET\",\n headers: makeBuilderHeaders(credentials),\n });\n await assertOk(response, \"Builder design-system docs fetch failed\");\n const json = (await response.json()) as unknown;\n if (!Array.isArray(json)) return [];\n return json.map(normalizeBuilderDesignSystemDocument);\n}\n\nexport async function hydrateBuilderDesignSystemReference(\n reference: BuilderDesignSystemProxyReference,\n options: BuilderDesignSystemDocsOptions = { page: 0, pageSize: 40 },\n): Promise<BuilderDesignSystemHydratedReference> {\n const docs = await fetchBuilderDesignSystemDocs(\n reference.builderDesignSystemId,\n options,\n );\n const tokenValues: Record<string, string> = {};\n for (const doc of docs) {\n if (!doc.tokenValues) continue;\n for (const [name, value] of Object.entries(doc.tokenValues)) {\n if (typeof value === \"string\") tokenValues[name] = value;\n }\n }\n return {\n ...reference,\n docs,\n tokenValues,\n docCount: docs.length,\n };\n}\n\nexport async function startBuilderDesignSystemIndex(\n options: BuilderDesignSystemIndexOptions,\n): Promise<BuilderDesignSystemIndexResult> {\n const files = nonEmptyFiles(options.files);\n const description = options.description?.trim();\n if (description) {\n files.unshift({\n name: \"additional-context.txt\",\n data: new TextEncoder().encode(description),\n mimeType: \"text/plain\",\n });\n }\n if (\n files.length === 0 &&\n !options.githubRepoUrl &&\n !options.connectedProjectId\n ) {\n throw new Error(\n \"Provide at least one .fig/code/text file or a GitHub repository URL to index with Builder.\",\n );\n }\n\n const credentials = await resolveBuilderDesignSystemCredentials();\n let uploadTokens: string[] = [];\n if (files.length > 0) {\n const uploadStart = await fetchWithTimeout(\n makeBuilderDesignSystemUrl(\"upload/start\", credentials),\n {\n method: \"POST\",\n headers: {\n ...makeBuilderHeaders(credentials),\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n attachments: files.map((file) => ({\n name: file.name,\n mimetype: mimeTypeForFile(file),\n declaredSize: file.data.byteLength,\n })),\n }),\n },\n );\n await assertOk(uploadStart, \"Builder design-system upload start failed\");\n const uploadJson = (await uploadStart.json()) as UploadStartResponse;\n const slots = [...(uploadJson.uploads ?? [])].sort((a, b) => a.idx - b.idx);\n if (slots.length !== files.length) {\n throw new Error(\"Builder did not return upload slots for all files.\");\n }\n for (let i = 0; i < slots.length; i++) {\n if (slots[i].idx !== i) {\n throw new Error(`Builder upload slot mismatch: expected ${i}.`);\n }\n await uploadToResumableUrl(slots[i], files[i]);\n }\n uploadTokens = slots.map((slot) => slot.uploadToken);\n }\n\n const generate = await fetchWithTimeout(\n makeBuilderDesignSystemUrl(\"generate\", credentials),\n {\n method: \"POST\",\n headers: {\n ...makeBuilderHeaders(credentials),\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n uploads: uploadTokens,\n ...(options.projectName?.trim()\n ? { projectName: options.projectName.trim() }\n : {}),\n ...(options.githubRepoUrl?.trim()\n ? { githubRepoUrl: options.githubRepoUrl.trim() }\n : {}),\n ...(options.connectedProjectId?.trim()\n ? { connectedProjectId: options.connectedProjectId.trim() }\n : {}),\n ...(options.selection ? { selection: options.selection } : {}),\n ...(options.devToolsVersion?.trim()\n ? { devToolsVersion: options.devToolsVersion.trim() }\n : {}),\n }),\n },\n );\n await assertOk(generate, \"Builder design-system indexing failed\");\n const generated = (await generate.json()) as GenerateResponse;\n if (!generated.projectId || !generated.jobId || !generated.designSystemId) {\n throw new Error(\n \"Builder design-system indexing returned an incomplete response.\",\n );\n }\n\n return {\n ok: true,\n source: \"builder\",\n projectId: generated.projectId,\n jobId: generated.jobId,\n designSystemId: generated.designSystemId,\n suggestedTitle: options.projectName?.trim() || null,\n builderUrl: builderDesignSystemUrl(generated.designSystemId),\n status: \"in-progress\",\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"builder-design-systems.js","sourceRoot":"","sources":["../../src/server/builder-design-systems.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAElC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AA4HnC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,4BAA4B,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AACrD,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAEpC,SAAS,iBAAiB,CAAC,KAAa;IACtC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,8BAA8B;IAC5C,OAAO,CACL,OAAO,CAAC,GAAG,CAAC,+BAA+B;QAC3C,GAAG,iBAAiB,CAAC,qBAAqB,EAAE,CAAC,oBAAoB,CAClE,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB;IACxB,OAAO,CACL,OAAO,CAAC,GAAG,CAAC,gBAAgB;QAC5B,OAAO,CAAC,GAAG,CAAC,uBAAuB;QACnC,oBAAoB,CACrB,CAAC;AACJ,CAAC;AAED,SAAS,0BAA0B,CACjC,IAAY,EACZ,WAA2C;IAE3C,MAAM,IAAI,GAAG,GAAG,iBAAiB,CAAC,8BAA8B,EAAE,CAAC,GAAG,CAAC;IACvE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IACpD,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAC,SAAS,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AC;IACF,MAAM,QAAQ,CAAC,QAAQ,EAAE,uCAAuC,CAAC,CAAC;IAClE,MAAM,SAAS,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAqB,CAAC;IAC9D,IAAI,CAAC,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC;QAC1E,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;IACJ,CAAC;IAED,OAAO;QACL,EAAE,EAAE,IAAI;QACR,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,cAAc,EAAE,SAAS,CAAC,cAAc;QACxC,cAAc,EAAE,OAAO,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,IAAI;QACnD,UAAU,EAAE,sBAAsB,CAAC,SAAS,CAAC,cAAc,CAAC;QAC5D,MAAM,EAAE,aAAa;KACtB,CAAC;AACJ,CAAC","sourcesContent":["import { FeatureNotConfiguredError } from \"./credential-provider.js\";\nimport {\n getBuilderProxyOrigin,\n resolveBuilderCredentials,\n} from \"./credential-provider.js\";\n\nconst DEFAULT_TIMEOUT_MS = 120_000;\n\nexport interface BuilderDesignSystemIndexFile {\n name: string;\n data: Uint8Array;\n mimeType?: string;\n}\n\nexport interface BuilderDesignSystemCodeFileInput {\n filename: string;\n content: string;\n mimeType?: string;\n /**\n * How `content` is encoded. Defaults to `\"utf8\"` (existing behavior,\n * unchanged for every current text-file caller). Pass `\"base64\"` for\n * binary files -- most importantly `.fig` (a zip/kiwi binary container,\n * never valid UTF-8 text). Without this, a `.fig` upload silently\n * corrupts: `mimeTypeForBuilderDesignSystemFilename` already special-cases\n * `.fig` as `application/octet-stream`, but the actual byte pipeline ran\n * every file through `TextEncoder().encode()` regardless, which mangles\n * any byte >= 0x80 in a binary-as-string payload (or, if the caller\n * base64-encoded first with no decode step here, stores the literal\n * base64 text instead of the decoded binary). Callers sending `.fig`/PDF/\n * other binary bytes must base64-encode `content` and set this to\n * `\"base64\"`.\n */\n encoding?: \"utf8\" | \"base64\";\n}\n\nexport interface BuildBuilderDesignSystemIndexFilesOptions {\n codeFiles?: BuilderDesignSystemCodeFileInput[];\n designMd?: string;\n designMdFilename?: string;\n maxCodeFiles?: number;\n maxTotalCodeBytes?: number;\n /** Default keeps legacy best-effort code indexing; upload/chat surfaces should fail loudly. */\n overflowBehavior?: \"skip\" | \"throw\";\n}\n\nexport interface BuilderDesignSystemProxyFieldsOptions {\n result: BuilderDesignSystemIndexResult;\n projectName?: string;\n description?: string;\n surface: \"design\" | \"slides\";\n}\n\nexport interface BuilderDesignSystemProxyFields {\n title: string;\n description: string;\n data: string;\n customInstructions: string;\n}\n\nexport interface BuilderDesignSystemProxyReference {\n source: \"builder\";\n builderDesignSystemId: string;\n builderJobId: string;\n builderProjectId?: string;\n builderUrl?: string;\n builderStatus?: string;\n}\n\nexport interface BuilderDesignSystemDocsOptions {\n page?: number;\n pageSize?: number;\n minimal?: boolean;\n type?: string;\n}\n\nexport interface BuilderDesignSystemDocument {\n id?: string;\n name?: string;\n type?: string;\n description?: string;\n content?: string;\n tokenValues?: Record<string, string>;\n rawTokens?: string[];\n relevantFiles?: string[];\n relatedComponents?: string[];\n}\n\nexport interface BuilderDesignSystemHydratedReference extends BuilderDesignSystemProxyReference {\n docs: BuilderDesignSystemDocument[];\n tokenValues: Record<string, string>;\n docCount: number;\n}\n\nexport interface BuilderDesignSystemIndexOptions {\n projectName?: string;\n description?: string;\n githubRepoUrl?: string;\n connectedProjectId?: string;\n files?: BuilderDesignSystemIndexFile[];\n selection?: Record<string, string[]>;\n devToolsVersion?: string;\n}\n\nexport interface BuilderDesignSystemIndexResult {\n ok: true;\n source: \"builder\";\n projectId: string;\n jobId: string;\n designSystemId: string;\n suggestedTitle: string | null;\n builderUrl: string;\n status: \"in-progress\";\n}\n\ninterface BuilderDesignSystemCredentials {\n privateKey: string;\n publicKey: string;\n userId: string | null;\n}\n\ninterface UploadStartResponse {\n uploads?: Array<{ idx: number; uploadUrl: string; uploadToken: string }>;\n}\n\ninterface GenerateResponse {\n projectId?: string;\n jobId?: string;\n designSystemId?: string;\n}\n\nconst DEFAULT_MAX_CODE_FILES = 50;\nconst DEFAULT_MAX_TOTAL_CODE_BYTES = 2 * 1024 * 1024;\nconst MAX_DOC_CONTENT_CHARS = 4_000;\n\nfunction trimTrailingSlash(value: string): string {\n return value.replace(/\\/+$/, \"\");\n}\n\nexport function getBuilderDesignSystemsBaseUrl(): string {\n return (\n process.env.BUILDER_DESIGN_SYSTEMS_BASE_URL ||\n `${trimTrailingSlash(getBuilderProxyOrigin())}/design-systems/v1`\n );\n}\n\nfunction getBuilderAppHost(): string {\n return (\n process.env.BUILDER_APP_HOST ||\n process.env.BUILDER_PUBLIC_APP_HOST ||\n \"https://builder.io\"\n );\n}\n\nfunction makeBuilderDesignSystemUrl(\n path: string,\n credentials: BuilderDesignSystemCredentials,\n): URL {\n const base = `${trimTrailingSlash(getBuilderDesignSystemsBaseUrl())}/`;\n const url = new URL(path.replace(/^\\/+/, \"\"), base);\n url.searchParams.set(\"apiKey\", credentials.publicKey);\n if (credentials.userId) url.searchParams.set(\"userId\", credentials.userId);\n return url;\n}\n\nfunction makeBuilderHeaders(\n credentials: BuilderDesignSystemCredentials,\n): Record<string, string> {\n return {\n Authorization: `Bearer ${credentials.privateKey}`,\n \"x-builder-api-key\": credentials.publicKey,\n ...(credentials.userId ? { \"x-builder-user-id\": credentials.userId } : {}),\n };\n}\n\nexport function mimeTypeForBuilderDesignSystemFilename(\n filename: string,\n explicit?: string,\n): string {\n if (explicit?.trim()) return explicit.trim();\n const lower = filename.toLowerCase();\n if (lower.endsWith(\".fig\")) return \"application/octet-stream\";\n if (lower.endsWith(\".pdf\")) return \"application/pdf\";\n if (lower.endsWith(\".md\") || lower.endsWith(\".markdown\"))\n return \"text/markdown\";\n if (lower.endsWith(\".mdx\")) return \"text/markdown\";\n if (lower.endsWith(\".json\")) return \"application/json\";\n if (lower.endsWith(\".css\")) return \"text/css\";\n if (lower.endsWith(\".html\") || lower.endsWith(\".htm\")) return \"text/html\";\n if (lower.endsWith(\".svg\")) return \"image/svg+xml\";\n return \"text/plain\";\n}\n\nexport function buildBuilderDesignSystemIndexFiles({\n codeFiles,\n designMd,\n designMdFilename,\n maxCodeFiles = DEFAULT_MAX_CODE_FILES,\n maxTotalCodeBytes = DEFAULT_MAX_TOTAL_CODE_BYTES,\n overflowBehavior = \"skip\",\n}: BuildBuilderDesignSystemIndexFilesOptions): BuilderDesignSystemIndexFile[] {\n const encoder = new TextEncoder();\n const files: BuilderDesignSystemIndexFile[] = [];\n let totalBytes = 0;\n\n function pushFile(\n filename: string,\n content: string,\n mimeType?: string,\n encoding?: \"utf8\" | \"base64\",\n ) {\n const normalizedName = filename.replace(/^\\/+/, \"\") || \"code.txt\";\n // `.fig`/PDF/other binary payloads must round-trip through base64, not\n // UTF-8 -- TextEncoder().encode() on a binary-as-string payload mangles\n // any byte >= 0x80. See BuilderDesignSystemCodeFileInput.encoding.\n const data =\n encoding === \"base64\"\n ? new Uint8Array(Buffer.from(content, \"base64\"))\n : encoder.encode(content);\n if (data.byteLength === 0) return;\n if (totalBytes + data.byteLength > maxTotalCodeBytes) {\n if (overflowBehavior === \"throw\") {\n throw new Error(\n `Design-system file \"${normalizedName}\" exceeds the ${Math.round(maxTotalCodeBytes / 1024 / 1024)} MB inline upload budget. Use the dedicated file upload instead of sending large binary files through an action payload.`,\n );\n }\n return;\n }\n totalBytes += data.byteLength;\n files.push({\n name: normalizedName,\n data,\n mimeType: mimeTypeForBuilderDesignSystemFilename(\n normalizedName,\n mimeType,\n ),\n });\n }\n\n if (designMd?.trim()) {\n pushFile(\n designMdFilename?.trim() || \"design.md\",\n designMd,\n \"text/markdown\",\n );\n }\n\n if (overflowBehavior === \"throw\" && (codeFiles?.length ?? 0) > maxCodeFiles) {\n throw new Error(\n `Too many design-system files (max ${maxCodeFiles}); no files were indexed.`,\n );\n }\n for (const file of (codeFiles ?? []).slice(0, maxCodeFiles)) {\n pushFile(file.filename, file.content, file.mimeType, file.encoding);\n }\n\n return files;\n}\n\nasync function resolveBuilderDesignSystemCredentials(): Promise<BuilderDesignSystemCredentials> {\n const credentials = await resolveBuilderCredentials();\n if (!credentials.privateKey || !credentials.publicKey) {\n throw new FeatureNotConfiguredError({\n requiredCredential: \"BUILDER_PRIVATE_KEY\",\n message:\n \"Connect Builder.io before indexing a design system from Figma or code.\",\n builderConnectUrl: \"/_agent-native/builder/connect\",\n });\n }\n return {\n privateKey: credentials.privateKey,\n publicKey: credentials.publicKey,\n userId: credentials.userId ?? null,\n };\n}\n\nfunction mimeTypeForFile(file: BuilderDesignSystemIndexFile): string {\n return mimeTypeForBuilderDesignSystemFilename(file.name, file.mimeType);\n}\n\nfunction makeBody(bytes: Uint8Array, mimeType: string): BodyInit {\n return typeof Blob !== \"undefined\"\n ? new Blob([bytes as unknown as BlobPart], { type: mimeType })\n : (bytes as unknown as BodyInit);\n}\n\nasync function fetchWithTimeout(\n url: string | URL,\n init: RequestInit,\n timeoutMs = DEFAULT_TIMEOUT_MS,\n): Promise<Response> {\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), timeoutMs);\n try {\n return await fetch(url, { ...init, signal: controller.signal });\n } finally {\n clearTimeout(timer);\n }\n}\n\nasync function parseErrorBody(response: Response): Promise<string> {\n const text = await response.text().catch(() => \"\");\n if (!text) return response.statusText || `HTTP ${response.status}`;\n try {\n const json = JSON.parse(text) as { error?: unknown };\n if (typeof json.error === \"string\") return json.error;\n if (json.error && typeof json.error === \"object\") {\n return JSON.stringify(json.error).slice(0, 500);\n }\n } catch {}\n return text.replace(/\\s+/g, \" \").trim().slice(0, 500);\n}\n\nasync function assertOk(response: Response, label: string): Promise<void> {\n if (response.ok) return;\n throw new Error(\n `${label} (${response.status}): ${await parseErrorBody(response)}`,\n );\n}\n\nasync function uploadToResumableUrl(\n slot: { uploadUrl: string },\n file: BuilderDesignSystemIndexFile,\n): Promise<void> {\n const mimeType = mimeTypeForFile(file);\n const bytes = file.data;\n const start = await fetchWithTimeout(slot.uploadUrl, {\n method: \"POST\",\n headers: {\n \"x-goog-resumable\": \"start\",\n \"x-goog-content-length-range\": `0,${bytes.byteLength}`,\n \"Content-Type\": mimeType,\n },\n });\n await assertOk(start, \"Builder design-system upload session failed\");\n const sessionUrl = start.headers.get(\"Location\");\n if (!sessionUrl) {\n throw new Error(\"Builder design-system upload session returned no URL.\");\n }\n\n const response = await fetchWithTimeout(sessionUrl, {\n method: \"PUT\",\n headers: {\n \"Content-Range\": `bytes 0-${bytes.byteLength - 1}/${bytes.byteLength}`,\n \"Content-Type\": mimeType,\n },\n body: makeBody(bytes, mimeType),\n });\n await assertOk(response, \"Builder design-system file upload failed\");\n}\n\nfunction nonEmptyFiles(\n files: BuilderDesignSystemIndexFile[] | undefined,\n): BuilderDesignSystemIndexFile[] {\n return (files ?? []).filter((file) => file.data.byteLength > 0);\n}\n\nexport function builderDesignSystemUrl(designSystemId?: string | null): string {\n const host = trimTrailingSlash(getBuilderAppHost());\n return designSystemId\n ? `${host}/app/design-system-intelligence/${encodeURIComponent(\n designSystemId,\n )}`\n : `${host}/app/design-system-intelligence`;\n}\n\nexport function localBuilderDesignSystemId(\n builderDesignSystemId: string,\n): string {\n const slug = builderDesignSystemId\n .replace(/[^a-zA-Z0-9_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n .slice(0, 96);\n return `builder-${slug || \"design-system\"}`;\n}\n\nexport function createBuilderDesignSystemProxyFields({\n result,\n projectName,\n description,\n surface,\n}: BuilderDesignSystemProxyFieldsOptions): BuilderDesignSystemProxyFields {\n const title = projectName?.trim() || \"Builder indexed design system\";\n const fallbackDescription =\n description ?? `Builder indexed design system ${result.designSystemId}`;\n const surfaceNoun = surface === \"slides\" ? \"slides\" : \"designs\";\n const spacingKey = surface === \"slides\" ? \"slidePadding\" : \"pagePadding\";\n const data = JSON.stringify({\n source: \"builder\",\n builderDesignSystemId: result.designSystemId,\n builderJobId: result.jobId,\n builderProjectId: result.projectId,\n builderUrl: result.builderUrl,\n builderStatus: result.status,\n colors: {\n primary: \"var(--primary)\",\n secondary: \"var(--secondary)\",\n accent: \"var(--accent)\",\n background: \"var(--background)\",\n surface: \"var(--card)\",\n text: \"var(--foreground)\",\n textMuted: \"var(--muted-foreground)\",\n },\n typography: {\n headingFont: \"inherit\",\n bodyFont: \"inherit\",\n headingWeight: \"700\",\n bodyWeight: \"400\",\n headingSizes: { h1: \"48px\", h2: \"32px\", h3: \"24px\" },\n },\n spacing: { elementGap: \"24px\", [spacingKey]: \"48px\" },\n borders: { radius: \"12px\", accentWidth: \"1px\" },\n logos: [],\n notes: [\n \"This is a local selectable proxy for a Builder DSI-indexed design system.\",\n `Builder design system id: ${result.designSystemId}`,\n `Builder indexing job id: ${result.jobId}`,\n `Builder project id: ${result.projectId}`,\n `Builder URL: ${result.builderUrl}`,\n projectName ? `Requested name: ${projectName}` : \"\",\n description ? `Context: ${description}` : \"\",\n \"Builder Design System Intelligence is the source of truth for indexed tokens, components, assets, and usage guidance.\",\n ]\n .filter(Boolean)\n .join(\"\\n\"),\n });\n const customInstructions = [\n \"This design system is indexed by Builder Design System Intelligence (DSI).\",\n `Builder design system id: ${result.designSystemId}`,\n `Builder job id: ${result.jobId}`,\n `Builder project id: ${result.projectId}`,\n `Builder URL: ${result.builderUrl}`,\n `When generating ${surfaceNoun}, treat Builder DSI as the source of truth for indexed tokens, components, assets, and usage guidance.`,\n \"Call get-design-system for this local id before generation and use the returned builder docs and token values when available.\",\n ].join(\"\\n\");\n\n return {\n title,\n description: fallbackDescription,\n data,\n customInstructions,\n };\n}\n\nexport function parseBuilderDesignSystemProxyReference(\n data: unknown,\n): BuilderDesignSystemProxyReference | null {\n let parsed: unknown = data;\n if (typeof data === \"string\") {\n try {\n parsed = JSON.parse(data);\n } catch {\n return null;\n }\n }\n if (!parsed || typeof parsed !== \"object\") return null;\n const value = parsed as Record<string, unknown>;\n if (value.source !== \"builder\") return null;\n if (typeof value.builderDesignSystemId !== \"string\") return null;\n if (typeof value.builderJobId !== \"string\") return null;\n return {\n source: \"builder\",\n builderDesignSystemId: value.builderDesignSystemId,\n builderJobId: value.builderJobId,\n builderProjectId:\n typeof value.builderProjectId === \"string\"\n ? value.builderProjectId\n : undefined,\n builderUrl:\n typeof value.builderUrl === \"string\" ? value.builderUrl : undefined,\n builderStatus:\n typeof value.builderStatus === \"string\" ? value.builderStatus : undefined,\n };\n}\n\nfunction truncateDocContent(content: unknown): string | undefined {\n if (typeof content !== \"string\") return undefined;\n if (content.length <= MAX_DOC_CONTENT_CHARS) return content;\n return `${content.slice(0, MAX_DOC_CONTENT_CHARS)}\\n\\n[truncated]`;\n}\n\nfunction normalizeBuilderDesignSystemDocument(\n value: unknown,\n): BuilderDesignSystemDocument {\n const doc =\n value && typeof value === \"object\"\n ? (value as Record<string, unknown>)\n : {};\n return {\n id: typeof doc.id === \"string\" ? doc.id : undefined,\n name: typeof doc.name === \"string\" ? doc.name : undefined,\n type: typeof doc.type === \"string\" ? doc.type : undefined,\n description:\n typeof doc.description === \"string\" ? doc.description : undefined,\n content: truncateDocContent(doc.content),\n tokenValues:\n doc.tokenValues && typeof doc.tokenValues === \"object\"\n ? (doc.tokenValues as Record<string, string>)\n : undefined,\n rawTokens: Array.isArray(doc.rawTokens)\n ? doc.rawTokens.filter(\n (token): token is string => typeof token === \"string\",\n )\n : undefined,\n relevantFiles: Array.isArray(doc.relevantFiles)\n ? doc.relevantFiles.filter(\n (file): file is string => typeof file === \"string\",\n )\n : undefined,\n relatedComponents: Array.isArray(doc.relatedComponents)\n ? doc.relatedComponents.filter(\n (component): component is string => typeof component === \"string\",\n )\n : undefined,\n };\n}\n\nexport async function fetchBuilderDesignSystemDocs(\n designSystemId: string,\n options: BuilderDesignSystemDocsOptions = {},\n): Promise<BuilderDesignSystemDocument[]> {\n const credentials = await resolveBuilderDesignSystemCredentials();\n const url = makeBuilderDesignSystemUrl(\n `${encodeURIComponent(designSystemId)}/docs`,\n credentials,\n );\n if (options.page !== undefined)\n url.searchParams.set(\"page\", String(options.page));\n if (options.pageSize !== undefined)\n url.searchParams.set(\"pageSize\", String(options.pageSize));\n if (options.minimal !== undefined)\n url.searchParams.set(\"minimal\", options.minimal ? \"true\" : \"false\");\n if (options.type?.trim()) url.searchParams.set(\"type\", options.type.trim());\n\n const response = await fetchWithTimeout(url, {\n method: \"GET\",\n headers: makeBuilderHeaders(credentials),\n });\n await assertOk(response, \"Builder design-system docs fetch failed\");\n const json = (await response.json()) as unknown;\n if (!Array.isArray(json)) return [];\n return json.map(normalizeBuilderDesignSystemDocument);\n}\n\nexport async function hydrateBuilderDesignSystemReference(\n reference: BuilderDesignSystemProxyReference,\n options: BuilderDesignSystemDocsOptions = { page: 0, pageSize: 40 },\n): Promise<BuilderDesignSystemHydratedReference> {\n const docs = await fetchBuilderDesignSystemDocs(\n reference.builderDesignSystemId,\n options,\n );\n const tokenValues: Record<string, string> = {};\n for (const doc of docs) {\n if (!doc.tokenValues) continue;\n for (const [name, value] of Object.entries(doc.tokenValues)) {\n if (typeof value === \"string\") tokenValues[name] = value;\n }\n }\n return {\n ...reference,\n docs,\n tokenValues,\n docCount: docs.length,\n };\n}\n\nexport async function startBuilderDesignSystemIndex(\n options: BuilderDesignSystemIndexOptions,\n): Promise<BuilderDesignSystemIndexResult> {\n const files = nonEmptyFiles(options.files);\n const description = options.description?.trim();\n if (description) {\n files.unshift({\n name: \"additional-context.txt\",\n data: new TextEncoder().encode(description),\n mimeType: \"text/plain\",\n });\n }\n if (\n files.length === 0 &&\n !options.githubRepoUrl &&\n !options.connectedProjectId\n ) {\n throw new Error(\n \"Provide at least one .fig/code/text file or a GitHub repository URL to index with Builder.\",\n );\n }\n\n const credentials = await resolveBuilderDesignSystemCredentials();\n let uploadTokens: string[] = [];\n if (files.length > 0) {\n const uploadStart = await fetchWithTimeout(\n makeBuilderDesignSystemUrl(\"upload/start\", credentials),\n {\n method: \"POST\",\n headers: {\n ...makeBuilderHeaders(credentials),\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n attachments: files.map((file) => ({\n name: file.name,\n mimetype: mimeTypeForFile(file),\n declaredSize: file.data.byteLength,\n })),\n }),\n },\n );\n await assertOk(uploadStart, \"Builder design-system upload start failed\");\n const uploadJson = (await uploadStart.json()) as UploadStartResponse;\n const slots = [...(uploadJson.uploads ?? [])].sort((a, b) => a.idx - b.idx);\n if (slots.length !== files.length) {\n throw new Error(\"Builder did not return upload slots for all files.\");\n }\n for (let i = 0; i < slots.length; i++) {\n if (slots[i].idx !== i) {\n throw new Error(`Builder upload slot mismatch: expected ${i}.`);\n }\n await uploadToResumableUrl(slots[i], files[i]);\n }\n uploadTokens = slots.map((slot) => slot.uploadToken);\n }\n\n const generate = await fetchWithTimeout(\n makeBuilderDesignSystemUrl(\"generate\", credentials),\n {\n method: \"POST\",\n headers: {\n ...makeBuilderHeaders(credentials),\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n uploads: uploadTokens,\n ...(options.projectName?.trim()\n ? { projectName: options.projectName.trim() }\n : {}),\n ...(options.githubRepoUrl?.trim()\n ? { githubRepoUrl: options.githubRepoUrl.trim() }\n : {}),\n ...(options.connectedProjectId?.trim()\n ? { connectedProjectId: options.connectedProjectId.trim() }\n : {}),\n ...(options.selection ? { selection: options.selection } : {}),\n ...(options.devToolsVersion?.trim()\n ? { devToolsVersion: options.devToolsVersion.trim() }\n : {}),\n }),\n },\n );\n await assertOk(generate, \"Builder design-system indexing failed\");\n const generated = (await generate.json()) as GenerateResponse;\n if (!generated.projectId || !generated.jobId || !generated.designSystemId) {\n throw new Error(\n \"Builder design-system indexing returned an incomplete response.\",\n );\n }\n\n return {\n ok: true,\n source: \"builder\",\n projectId: generated.projectId,\n jobId: generated.jobId,\n designSystemId: generated.designSystemId,\n suggestedTitle: options.projectName?.trim() || null,\n builderUrl: builderDesignSystemUrl(generated.designSystemId),\n status: \"in-progress\",\n };\n}\n"]}
|
package/dist/server/edge.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { createAuthPlugin, defaultAuthPlugin } from "./auth-plugin.js";
|
|
|
2
2
|
export { createAgentChatPlugin, defaultAgentChatPlugin, refreshGlobalMcpManager, type AgentChatPluginOptions, } from "./agent-chat-plugin.js";
|
|
3
3
|
export { createContextXrayPlugin, defaultContextXrayPlugin, } from "../agent/context-xray/plugin.js";
|
|
4
4
|
export { createCoreRoutesPlugin, defaultCoreRoutesPlugin, FRAMEWORK_ROUTE_PREFIX, type CoreRoutesPluginOptions, } from "./core-routes-plugin.js";
|
|
5
|
-
export { createIntegrationsPlugin, defaultIntegrationsPlugin, enqueueRemoteCommand, slackAdapter, telegramAdapter, whatsappAdapter, emailAdapter, type PlatformAdapter, type IncomingMessage, type OutgoingMessage, type IntegrationStatus, type IntegrationsPluginOptions, } from "../integrations/index.js";
|
|
5
|
+
export { createIntegrationsPlugin, defaultIntegrationsPlugin, enqueueRemoteCommand, slackAdapter, telegramAdapter, whatsappAdapter, discordAdapter, microsoftTeamsAdapter, emailAdapter, assertPlatformCapability, type PlatformAdapter, type IncomingMessage, type OutgoingMessage, type PlatformAdapterCapabilities, type ImmediateWebhookResponse, type IntegrationStatus, type IntegrationsPluginOptions, BUILT_IN_INTEGRATION_CATALOG, INTEGRATION_CATEGORIES, getIntegrationCatalogEntry, listBuiltInChannelIntegrations, listIntegrationCatalog, type BuiltInChannelId, type ChannelCapabilities, type IntegrationAvailability, type IntegrationCatalogEntry, type IntegrationCategory, type IntegrationCredentialRequirement, type IntegrationIconKey, type IntegrationSupportMaturity, } from "../integrations/index.js";
|
|
6
6
|
export { createObservationalMemoryPlugin, defaultObservationalMemoryPlugin, } from "../agent/observational-memory/plugin.js";
|
|
7
7
|
export { createOnboardingPlugin, defaultOnboardingPlugin, } from "../onboarding/plugin.js";
|
|
8
8
|
export { createOrgPlugin, defaultOrgPlugin } from "../org/plugin.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/server/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,KAAK,sBAAsB,GAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,
|
|
1
|
+
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/server/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,KAAK,sBAAsB,GAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,wBAAwB,EACxB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,4BAA4B,EAC5B,sBAAsB,EACtB,0BAA0B,EAC1B,8BAA8B,EAC9B,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,GAChC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,cAAc,EACd,yBAAyB,EACzB,KAAK,SAAS,GACf,MAAM,gCAAgC,CAAC"}
|
package/dist/server/edge.js
CHANGED
|
@@ -2,7 +2,7 @@ export { createAuthPlugin, defaultAuthPlugin } from "./auth-plugin.js";
|
|
|
2
2
|
export { createAgentChatPlugin, defaultAgentChatPlugin, refreshGlobalMcpManager, } from "./agent-chat-plugin.js";
|
|
3
3
|
export { createContextXrayPlugin, defaultContextXrayPlugin, } from "../agent/context-xray/plugin.js";
|
|
4
4
|
export { createCoreRoutesPlugin, defaultCoreRoutesPlugin, FRAMEWORK_ROUTE_PREFIX, } from "./core-routes-plugin.js";
|
|
5
|
-
export { createIntegrationsPlugin, defaultIntegrationsPlugin, enqueueRemoteCommand, slackAdapter, telegramAdapter, whatsappAdapter, emailAdapter, } from "../integrations/index.js";
|
|
5
|
+
export { createIntegrationsPlugin, defaultIntegrationsPlugin, enqueueRemoteCommand, slackAdapter, telegramAdapter, whatsappAdapter, discordAdapter, microsoftTeamsAdapter, emailAdapter, assertPlatformCapability, BUILT_IN_INTEGRATION_CATALOG, INTEGRATION_CATEGORIES, getIntegrationCatalogEntry, listBuiltInChannelIntegrations, listIntegrationCatalog, } from "../integrations/index.js";
|
|
6
6
|
export { createObservationalMemoryPlugin, defaultObservationalMemoryPlugin, } from "../agent/observational-memory/plugin.js";
|
|
7
7
|
export { createOnboardingPlugin, defaultOnboardingPlugin, } from "../onboarding/plugin.js";
|
|
8
8
|
export { createOrgPlugin, defaultOrgPlugin } from "../org/plugin.js";
|
package/dist/server/edge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../src/server/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,GAEvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,
|
|
1
|
+
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../src/server/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,GAEvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,wBAAwB,EAQxB,4BAA4B,EAC5B,sBAAsB,EACtB,0BAA0B,EAC1B,8BAA8B,EAC9B,sBAAsB,GASvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,cAAc,EACd,yBAAyB,GAE1B,MAAM,gCAAgC,CAAC","sourcesContent":["export { createAuthPlugin, defaultAuthPlugin } from \"./auth-plugin.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n refreshGlobalMcpManager,\n type AgentChatPluginOptions,\n} from \"./agent-chat-plugin.js\";\nexport {\n createContextXrayPlugin,\n defaultContextXrayPlugin,\n} from \"../agent/context-xray/plugin.js\";\nexport {\n createCoreRoutesPlugin,\n defaultCoreRoutesPlugin,\n FRAMEWORK_ROUTE_PREFIX,\n type CoreRoutesPluginOptions,\n} from \"./core-routes-plugin.js\";\nexport {\n createIntegrationsPlugin,\n defaultIntegrationsPlugin,\n enqueueRemoteCommand,\n slackAdapter,\n telegramAdapter,\n whatsappAdapter,\n discordAdapter,\n microsoftTeamsAdapter,\n emailAdapter,\n assertPlatformCapability,\n type PlatformAdapter,\n type IncomingMessage,\n type OutgoingMessage,\n type PlatformAdapterCapabilities,\n type ImmediateWebhookResponse,\n type IntegrationStatus,\n type IntegrationsPluginOptions,\n BUILT_IN_INTEGRATION_CATALOG,\n INTEGRATION_CATEGORIES,\n getIntegrationCatalogEntry,\n listBuiltInChannelIntegrations,\n listIntegrationCatalog,\n type BuiltInChannelId,\n type ChannelCapabilities,\n type IntegrationAvailability,\n type IntegrationCatalogEntry,\n type IntegrationCategory,\n type IntegrationCredentialRequirement,\n type IntegrationIconKey,\n type IntegrationSupportMaturity,\n} from \"../integrations/index.js\";\nexport {\n createObservationalMemoryPlugin,\n defaultObservationalMemoryPlugin,\n} from \"../agent/observational-memory/plugin.js\";\nexport {\n createOnboardingPlugin,\n defaultOnboardingPlugin,\n} from \"../onboarding/plugin.js\";\nexport { createOrgPlugin, defaultOrgPlugin } from \"../org/plugin.js\";\nexport {\n createResourcesPlugin,\n defaultResourcesPlugin,\n} from \"./resources-plugin.js\";\nexport {\n getH3App,\n awaitBootstrap,\n markDefaultPluginProvided,\n type H3AppShim,\n} from \"./framework-request-handler.js\";\n"]}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { createServer, type CreateServerOptions, type EnvKeyConfig, } from "./create-server.js";
|
|
2
|
+
export { AGENT_BACKGROUND_PROCESSOR_FIELD, AGENT_BACKGROUND_PROCESSOR_ROUTE, AGENT_BACKGROUND_PROCESSOR_ROUTE_FIELD, dispatchPathTargetsNetlifyBackgroundFunction, resolveDurableBackgroundDispatchPath, } from "../agent/durable-background.js";
|
|
2
3
|
export { readBody, readBodyWithSizeLimit, streamFile, DEFAULT_CHAT_MAX_BODY_BYTES, DEFAULT_UPLOAD_MAX_FILE_BYTES, MAX_CHAT_ATTACHMENTS_PER_MESSAGE, isAllowedUploadMimeType, } from "./h3-helpers.js";
|
|
3
4
|
export { buildDeepLink, toAbsoluteOpenUrl, toDesktopOpenUrl, toVsCodeOpenUrl, OPEN_ROUTE_SUBPATH, DESKTOP_OPEN_URL, VSCODE_OPEN_URL, type DeepLinkInput, } from "./deep-link.js";
|
|
4
5
|
export { createOpenRouteHandler, type OpenRouteOptions } from "./open-route.js";
|
|
@@ -49,7 +50,7 @@ export { runWithRequestContext, hasRequestContext, getRequestContext, getRequest
|
|
|
49
50
|
export { formatDateInTimezone, todayInTimezone } from "./date-utils.js";
|
|
50
51
|
export { createOnboardingPlugin, defaultOnboardingPlugin, } from "../onboarding/plugin.js";
|
|
51
52
|
export { registerFileUploadProvider, unregisterFileUploadProvider, listFileUploadProviders, getActiveFileUploadProvider, getActiveFileUploadProviderForRequest, uploadFile, builderFileUploadProvider, type FileUploadInput, type FileUploadProvider, type FileUploadResult, } from "../file-upload/index.js";
|
|
52
|
-
export { createIntegrationsPlugin, defaultIntegrationsPlugin, enqueueRemoteCommand, slackAdapter, telegramAdapter, whatsappAdapter, emailAdapter, type PlatformAdapter, type IncomingMessage, type OutgoingMessage, type IntegrationStatus, type IntegrationsPluginOptions, } from "../integrations/index.js";
|
|
53
|
+
export { createIntegrationsPlugin, defaultIntegrationsPlugin, enqueueRemoteCommand, slackAdapter, telegramAdapter, whatsappAdapter, discordAdapter, microsoftTeamsAdapter, emailAdapter, assertPlatformCapability, type PlatformAdapter, type IncomingMessage, type OutgoingMessage, type PlatformAdapterCapabilities, type ImmediateWebhookResponse, type IntegrationStatus, type IntegrationsPluginOptions, type IntegrationExecutionContext, BUILT_IN_INTEGRATION_CATALOG, INTEGRATION_CATEGORIES, getIntegrationCatalogEntry, listBuiltInChannelIntegrations, listIntegrationCatalog, type BuiltInChannelId, type ChannelCapabilities, type IntegrationAvailability, type IntegrationCatalogEntry, type IntegrationCategory, type IntegrationCredentialRequirement, type IntegrationIconKey, type IntegrationSupportMaturity, } from "../integrations/index.js";
|
|
53
54
|
export { isElectron, isMobile, getOrigin, getAppBasePath, getAppUrl, resolveOAuthRedirectUri, isAllowedOAuthRedirectUri, encodeOAuthState, decodeOAuthState, resolveOAuthOwner, createOAuthSession, oauthCallbackResponse, oauthErrorPage, oauthDesktopExchangePage, type OAuthStatePayload, type OAuthOwnerResult, type OAuthSessionResult, } from "./google-oauth.js";
|
|
54
55
|
export { FeatureNotConfiguredError, hasBuilderPrivateKey, isBuilderEnvManaged, getBuilderProxyOrigin, getBuilderImageGenerationBaseUrl, getBuilderWebSearchBaseUrl, getBuilderAuthHeader, resolveBuilderPrivateKey, resolveBuilderAuthHeader, resolveHasBuilderPrivateKey, resolveHasCompleteBuilderConnection, resolveBuilderCredentials, resolveBuilderCredential, readDeployCredentialEnv, writeBuilderCredentials, deleteBuilderCredentials, resolveSecret, } from "./credential-provider.js";
|
|
55
56
|
export { builderDesignSystemUrl, buildBuilderDesignSystemIndexFiles, createBuilderDesignSystemProxyFields, fetchBuilderDesignSystemDocs, getBuilderDesignSystemsBaseUrl, hydrateBuilderDesignSystemReference, localBuilderDesignSystemId, mimeTypeForBuilderDesignSystemFilename, parseBuilderDesignSystemProxyReference, startBuilderDesignSystemIndex, type BuildBuilderDesignSystemIndexFilesOptions, type BuilderDesignSystemCodeFileInput, type BuilderDesignSystemDocsOptions, type BuilderDesignSystemDocument, type BuilderDesignSystemHydratedReference, type BuilderDesignSystemIndexFile, type BuilderDesignSystemIndexOptions, type BuilderDesignSystemIndexResult, type BuilderDesignSystemProxyFields, type BuilderDesignSystemProxyFieldsOptions, type BuilderDesignSystemProxyReference, } from "./builder-design-systems.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,YAAY,GAClB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,YAAY,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,gCAAgC,EAChC,gCAAgC,EAChC,sCAAsC,EACtC,4CAA4C,EAC5C,oCAAoC,GACrC,MAAM,gCAAgC,CAAC;AAExC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pC,mCAAmC,EACnC,mCAAmC,EACnC,0CAA0C,EAC1C,eAAe,EACf,KAAK,8BAA8B,EACnC,KAAK,0CAA0C,GAChD,MAAM,sCAAsC,CAAC;AAU9C,MAAM,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACrE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,cAAc,CAErE"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { createServer, } from "./create-server.js";
|
|
2
|
+
export { AGENT_BACKGROUND_PROCESSOR_FIELD, AGENT_BACKGROUND_PROCESSOR_ROUTE, AGENT_BACKGROUND_PROCESSOR_ROUTE_FIELD, dispatchPathTargetsNetlifyBackgroundFunction, resolveDurableBackgroundDispatchPath, } from "../agent/durable-background.js";
|
|
2
3
|
export { readBody, readBodyWithSizeLimit, streamFile, DEFAULT_CHAT_MAX_BODY_BYTES, DEFAULT_UPLOAD_MAX_FILE_BYTES, MAX_CHAT_ATTACHMENTS_PER_MESSAGE, isAllowedUploadMimeType, } from "./h3-helpers.js";
|
|
3
4
|
export { buildDeepLink, toAbsoluteOpenUrl, toDesktopOpenUrl, toVsCodeOpenUrl, OPEN_ROUTE_SUBPATH, DESKTOP_OPEN_URL, VSCODE_OPEN_URL, } from "./deep-link.js";
|
|
4
5
|
export { createOpenRouteHandler } from "./open-route.js";
|
|
@@ -50,7 +51,7 @@ export { runWithRequestContext, hasRequestContext, getRequestContext, getRequest
|
|
|
50
51
|
export { formatDateInTimezone, todayInTimezone } from "./date-utils.js";
|
|
51
52
|
export { createOnboardingPlugin, defaultOnboardingPlugin, } from "../onboarding/plugin.js";
|
|
52
53
|
export { registerFileUploadProvider, unregisterFileUploadProvider, listFileUploadProviders, getActiveFileUploadProvider, getActiveFileUploadProviderForRequest, uploadFile, builderFileUploadProvider, } from "../file-upload/index.js";
|
|
53
|
-
export { createIntegrationsPlugin, defaultIntegrationsPlugin, enqueueRemoteCommand, slackAdapter, telegramAdapter, whatsappAdapter, emailAdapter, } from "../integrations/index.js";
|
|
54
|
+
export { createIntegrationsPlugin, defaultIntegrationsPlugin, enqueueRemoteCommand, slackAdapter, telegramAdapter, whatsappAdapter, discordAdapter, microsoftTeamsAdapter, emailAdapter, assertPlatformCapability, BUILT_IN_INTEGRATION_CATALOG, INTEGRATION_CATEGORIES, getIntegrationCatalogEntry, listBuiltInChannelIntegrations, listIntegrationCatalog, } from "../integrations/index.js";
|
|
54
55
|
export { isElectron, isMobile, getOrigin, getAppBasePath, getAppUrl, resolveOAuthRedirectUri, isAllowedOAuthRedirectUri, encodeOAuthState, decodeOAuthState, resolveOAuthOwner, createOAuthSession, oauthCallbackResponse, oauthErrorPage, oauthDesktopExchangePage, } from "./google-oauth.js";
|
|
55
56
|
export { FeatureNotConfiguredError, hasBuilderPrivateKey, isBuilderEnvManaged, getBuilderProxyOrigin, getBuilderImageGenerationBaseUrl, getBuilderWebSearchBaseUrl, getBuilderAuthHeader, resolveBuilderPrivateKey, resolveBuilderAuthHeader, resolveHasBuilderPrivateKey, resolveHasCompleteBuilderConnection, resolveBuilderCredentials, resolveBuilderCredential, readDeployCredentialEnv, writeBuilderCredentials, deleteBuilderCredentials, resolveSecret, } from "./credential-provider.js";
|
|
56
57
|
export { builderDesignSystemUrl, buildBuilderDesignSystemIndexFiles, createBuilderDesignSystemProxyFields, fetchBuilderDesignSystemDocs, getBuilderDesignSystemsBaseUrl, hydrateBuilderDesignSystemReference, localBuilderDesignSystemId, mimeTypeForBuilderDesignSystemFilename, parseBuilderDesignSystemProxyReference, startBuilderDesignSystemIndex, } from "./builder-design-systems.js";
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,GAGb,MAAM,oBAAoB,CAAC;AAE5B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,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["export {\n createServer,\n type CreateServerOptions,\n type EnvKeyConfig,\n} from \"./create-server.js\";\n\nexport {\n readBody,\n readBodyWithSizeLimit,\n streamFile,\n DEFAULT_CHAT_MAX_BODY_BYTES,\n DEFAULT_UPLOAD_MAX_FILE_BYTES,\n MAX_CHAT_ATTACHMENTS_PER_MESSAGE,\n isAllowedUploadMimeType,\n} from \"./h3-helpers.js\";\nexport {\n buildDeepLink,\n toAbsoluteOpenUrl,\n toDesktopOpenUrl,\n toVsCodeOpenUrl,\n OPEN_ROUTE_SUBPATH,\n DESKTOP_OPEN_URL,\n VSCODE_OPEN_URL,\n type DeepLinkInput,\n} from \"./deep-link.js\";\nexport { createOpenRouteHandler, type OpenRouteOptions } from \"./open-route.js\";\nexport {\n createEmbedStartRouteHandler,\n buildEmbedStartPath,\n type EmbedStartRouteOptions,\n} from \"./embed-route.js\";\nexport {\n createEmbedSessionTicket,\n consumeEmbedSessionTicket,\n normalizeEmbedTargetPath,\n requestHasEmbedAuthMarker,\n resolveEmbedSessionFromRequest,\n setEmbedSessionCookie,\n signEmbedSessionToken,\n verifyEmbedSessionToken,\n type ConsumedEmbedSessionTicket,\n type ConsumeEmbedSessionTicketOptions,\n type EmbedSessionTicket,\n type EmbedSessionTicketInput,\n type EmbedSessionTokenClaims,\n type ResolvedEmbedSession,\n type VerifyEmbedSessionTokenResult,\n} from \"./embed-session.js\";\nexport { createSSEHandler, type SSEHandlerOptions } from \"./sse.js\";\nexport {\n mountAuthMiddleware,\n autoMountAuth,\n getSession,\n COOKIE_NAME,\n addSession,\n removeSession,\n getSessionEmail,\n getFrameworkSessionCookieValues,\n setFrameworkSessionCookie,\n clearFrameworkSessionCookies,\n runAuthGuard,\n setDesktopExchange,\n setDesktopExchangeError,\n safeReturnPath,\n type DesktopExchangeErrorPayload,\n type AuthSession,\n type AuthOptions,\n} from \"./auth.js\";\nexport {\n handleIdentitySso,\n getIdentityHubUrl,\n isIdentitySsoEnabled,\n isIdentitySsoBypassPath,\n identitySsoLoginButtonHtml,\n IDENTITY_SSO_PROVIDER_ID,\n IDENTITY_SSO_SCOPE,\n} from \"./identity-sso.js\";\nexport { requireEnvKey, type MissingKeyResponse } from \"./missing-key.js\";\nexport { verifyCaptcha, type CaptchaVerifyResult } from \"./captcha.js\";\nexport {\n getLocaleInitScript,\n parseAcceptLanguage,\n resolveLocaleFromRequest,\n type LocaleInitScriptOptions,\n type ResolveLocaleFromRequestOptions,\n type ResolvedRequestLocale,\n} from \"../localization/server.js\";\nexport {\n createProductionAgentHandler,\n type ActionEntry,\n type ScriptEntry,\n type ProductionAgentOptions,\n type ActionTool,\n type ScriptTool,\n type AgentMessage,\n type AgentChatRequest,\n type AgentChatEvent,\n type AgentChatAttachment,\n type AgentChatReference,\n type MentionProvider,\n type MentionProviderItem,\n type AgentLoopFinalResponseGuard,\n type AgentLoopFinalResponseGuardContext,\n type AgentLoopFinalResponseGuardResult,\n type AgentLoopToolCallSummary,\n type AgentLoopToolResultSummary,\n} from \"../agent/index.js\";\nexport {\n actionsToEngineTools,\n getOwnerActiveApiKey,\n runAgentLoop,\n} from \"../agent/production-agent.js\";\nexport {\n getStoredModelForEngine,\n resolveEngine,\n} from \"../agent/engine/index.js\";\nexport {\n completeText,\n type CompleteTextMessage,\n type CompleteTextOptions,\n type CompleteTextResult,\n type CompleteTextUsage,\n} from \"./complete-text.js\";\nexport { createDevScriptRegistry } from \"../scripts/dev/index.js\";\n\nexport {\n createPollHandler,\n recordChange,\n getVersion,\n getChangesSince,\n getPollEmitter,\n canSeeChangeForUser,\n POLL_CHANGE_EVENT,\n} from \"./poll.js\";\nexport { createPollEventsHandler } from \"./poll-events.js\";\nexport { createAuthPlugin, defaultAuthPlugin } from \"./auth-plugin.js\";\nexport {\n initServerSentry,\n isServerSentryEnabled,\n setSentryUserForRequest,\n captureRouteError,\n type RouteErrorContext,\n} from \"./sentry.js\";\nexport {\n captureError,\n captureServerError,\n registerErrorCaptureProvider,\n type CaptureErrorContext,\n type CaptureErrorProvider,\n} from \"./capture-error.js\";\nexport { createSentryPlugin, defaultSentryPlugin } from \"./sentry-plugin.js\";\n// Re-export the org plugin so the auto-discovery's DEFAULT_PLUGIN_REGISTRY\n// (which references \"defaultOrgPlugin\" from @agent-native/core/server) can\n// resolve it during the deploy build worker-entry generation.\nexport { createOrgPlugin, defaultOrgPlugin } from \"../org/plugin.js\";\nexport {\n createContextXrayPlugin,\n defaultContextXrayPlugin,\n} from \"../agent/context-xray/plugin.js\";\nexport {\n createObservationalMemoryPlugin,\n defaultObservationalMemoryPlugin,\n} from \"../agent/observational-memory/plugin.js\";\nexport {\n createGoogleAuthPlugin,\n type GoogleAuthPluginOptions,\n} from \"./google-auth-plugin.js\";\nexport type { GoogleAuthMode } from \"./google-auth-mode.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n refreshGlobalMcpManager,\n type AgentChatPluginOptions,\n} from \"./agent-chat-plugin.js\";\nexport {\n configureAgentNativeEmbeddedEnvironment,\n createAgentNativeEmbeddedAuthOptions,\n createAgentNativeEmbeddedPlugin,\n mountAgentNativeEmbedded,\n normalizeAgentNativeEmbeddedSession,\n type AgentNativeEmbeddedAuthOptions,\n type AgentNativeEmbeddedGetSession,\n type AgentNativeEmbeddedHostSession,\n type AgentNativeEmbeddedPluginOptions,\n} from \"./embedded.js\";\nexport {\n createThread,\n getThread,\n listThreads,\n updateThreadData,\n deleteThread,\n setThreadArchived,\n setThreadPinned,\n setThreadScope,\n type ChatThread,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ListThreadsOptions,\n} from \"../chat-threads/store.js\";\nexport {\n createResourcesPlugin,\n defaultResourcesPlugin,\n} from \"./resources-plugin.js\";\nexport {\n createCoreRoutesPlugin,\n defaultCoreRoutesPlugin,\n FRAMEWORK_ROUTE_PREFIX,\n type CoreRoutesPluginOptions,\n} from \"./core-routes-plugin.js\";\nexport {\n AGENT_NATIVE_OG_IMAGE_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_HEIGHT,\n AGENT_NATIVE_OG_IMAGE_NETLIFY_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_WIDTH,\n agentNativeOgImageResponseHeaders,\n createAgentNativeOgImageHandler,\n renderAgentNativeOgImagePng,\n renderAgentNativeOgImageSvg,\n type AgentNativeOgImageInput,\n} from \"./social-og-image.js\";\nexport {\n createBrowserSessionActionEntries,\n type CreateBrowserSessionActionEntriesOptions,\n} from \"../browser-sessions/actions.js\";\nexport {\n DEFAULT_BROWSER_SESSION_REQUEST_POLL_MS,\n DEFAULT_BROWSER_SESSION_REQUEST_TIMEOUT_MS,\n DEFAULT_BROWSER_SESSION_TTL_MS,\n callBrowserSession,\n claimBrowserSessionRequest,\n completeBrowserSessionRequest,\n createBrowserSessionRequest,\n disconnectBrowserSession,\n getBrowserSession,\n getBrowserSessionRequest,\n listBrowserSessions,\n registerBrowserSession,\n waitForBrowserSessionRequest,\n} from \"../browser-sessions/store.js\";\nexport {\n mountBrowserSessionRoutes,\n type MountBrowserSessionRoutesOptions,\n} from \"../browser-sessions/routes.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n createTerminalPlugin,\n defaultTerminalPlugin,\n type TerminalPluginOptions,\n} from \"../terminal/terminal-plugin.js\";\nexport {\n createCollabPlugin,\n type CollabPluginOptions,\n} from \"./collab-plugin.js\";\n\nexport {\n spawnTask,\n getTask,\n getTaskByThread,\n listTasks,\n sendToTask,\n markTaskErrored,\n type AgentTask,\n type SpawnTaskOptions,\n} from \"./agent-teams.js\";\nexport { isOAuthConnected, getOAuthAccounts } from \"./oauth-helpers.js\";\nexport {\n hasGoogleSignInCredentials,\n resolveGoogleLegacyProviderCredentials,\n resolveGoogleProviderCredentialCandidates,\n resolveGoogleProviderCredentials,\n resolveGoogleSignInCredentials,\n type GoogleOAuthCredentials,\n} from \"./google-oauth-credentials.js\";\nexport { wrapWithAnalytics } from \"./analytics.js\";\nexport {\n getH3App,\n awaitBootstrap,\n markDefaultPluginProvided,\n type H3AppShim,\n} from \"./framework-request-handler.js\";\nexport {\n autoDiscoverActions,\n autoDiscoverScripts,\n loadActionsFromStaticRegistry,\n mergeCoreSharingActions,\n registerPackageActions,\n} from \"./action-discovery.js\";\nexport {\n mountActionRoutes,\n type MountActionRoutesOptions,\n} from \"./action-routes.js\";\nexport {\n runWithRequestContext,\n hasRequestContext,\n getRequestContext,\n getRequestUserEmail,\n getRequestUserName,\n getRequestOrgId,\n getRequestTimezone,\n getRequestRunContext,\n getCredentialContext,\n isIntegrationCallerRequest,\n type RequestContext,\n type RequestRunContext,\n} from \"./request-context.js\";\nexport { formatDateInTimezone, todayInTimezone } from \"./date-utils.js\";\n\nexport {\n createOnboardingPlugin,\n defaultOnboardingPlugin,\n} from \"../onboarding/plugin.js\";\n\nexport {\n registerFileUploadProvider,\n unregisterFileUploadProvider,\n listFileUploadProviders,\n getActiveFileUploadProvider,\n getActiveFileUploadProviderForRequest,\n uploadFile,\n builderFileUploadProvider,\n type FileUploadInput,\n type FileUploadProvider,\n type FileUploadResult,\n} from \"../file-upload/index.js\";\n\nexport {\n createIntegrationsPlugin,\n defaultIntegrationsPlugin,\n enqueueRemoteCommand,\n slackAdapter,\n telegramAdapter,\n whatsappAdapter,\n emailAdapter,\n type PlatformAdapter,\n type IncomingMessage,\n type OutgoingMessage,\n type IntegrationStatus,\n type IntegrationsPluginOptions,\n} from \"../integrations/index.js\";\n\nexport {\n isElectron,\n isMobile,\n getOrigin,\n getAppBasePath,\n getAppUrl,\n resolveOAuthRedirectUri,\n isAllowedOAuthRedirectUri,\n encodeOAuthState,\n decodeOAuthState,\n resolveOAuthOwner,\n createOAuthSession,\n oauthCallbackResponse,\n oauthErrorPage,\n oauthDesktopExchangePage,\n type OAuthStatePayload,\n type OAuthOwnerResult,\n type OAuthSessionResult,\n} from \"./google-oauth.js\";\n\nexport {\n FeatureNotConfiguredError,\n hasBuilderPrivateKey,\n isBuilderEnvManaged,\n getBuilderProxyOrigin,\n getBuilderImageGenerationBaseUrl,\n getBuilderWebSearchBaseUrl,\n getBuilderAuthHeader,\n resolveBuilderPrivateKey,\n resolveBuilderAuthHeader,\n resolveHasBuilderPrivateKey,\n resolveHasCompleteBuilderConnection,\n resolveBuilderCredentials,\n resolveBuilderCredential,\n readDeployCredentialEnv,\n writeBuilderCredentials,\n deleteBuilderCredentials,\n resolveSecret,\n} from \"./credential-provider.js\";\nexport {\n builderDesignSystemUrl,\n buildBuilderDesignSystemIndexFiles,\n createBuilderDesignSystemProxyFields,\n fetchBuilderDesignSystemDocs,\n getBuilderDesignSystemsBaseUrl,\n hydrateBuilderDesignSystemReference,\n localBuilderDesignSystemId,\n mimeTypeForBuilderDesignSystemFilename,\n parseBuilderDesignSystemProxyReference,\n startBuilderDesignSystemIndex,\n type BuildBuilderDesignSystemIndexFilesOptions,\n type BuilderDesignSystemCodeFileInput,\n type BuilderDesignSystemDocsOptions,\n type BuilderDesignSystemDocument,\n type BuilderDesignSystemHydratedReference,\n type BuilderDesignSystemIndexFile,\n type BuilderDesignSystemIndexOptions,\n type BuilderDesignSystemIndexResult,\n type BuilderDesignSystemProxyFields,\n type BuilderDesignSystemProxyFieldsOptions,\n type BuilderDesignSystemProxyReference,\n} from \"./builder-design-systems.js\";\nexport {\n getBuilderBranchProjectId,\n isBuilderBranchingEnabled,\n resolveBuilderBranchProjectId,\n resolveIsBuilderBranchingEnabled,\n runBuilderAgent,\n type RunBuilderAgentResult,\n} from \"./builder-browser.js\";\nexport {\n ensureFusionContainer,\n sendFusionBranchMessage,\n pushFusionBranch,\n reserveFusionHostingSlug,\n deployFusionProject,\n getFusionDeploys,\n getFusionBranchEditorUrl,\n getFusionHostingUrl,\n type FusionBranchRef,\n type EnsureFusionContainerResult,\n type SendFusionMessageResult,\n} from \"./fusion-app.js\";\n\nexport {\n sendEmail,\n isEmailConfigured,\n getEmailProvider,\n type EmailAttachment,\n type EmailProvider,\n type SendEmailArgs,\n} from \"./email.js\";\nexport {\n renderEmail,\n emailStrong,\n emailLink,\n type RenderEmailArgs,\n type RenderedEmail,\n type EmailCta,\n} from \"./email-template.js\";\nexport { getAppProductionUrl, getFirstPartyProdUrl } from \"./app-url.js\";\nexport {\n getConfiguredAppBasePath,\n normalizeAppBasePath,\n withConfiguredAppBasePath,\n} from \"./app-base-path.js\";\nexport {\n signShortLivedToken,\n verifyShortLivedToken,\n type ShortLivedTokenClaims,\n type VerifyResult as ShortLivedTokenVerifyResult,\n} from \"./short-lived-token.js\";\nexport {\n AGENT_ACCESS_PARAM,\n DEFAULT_AGENT_ACCESS_TTL_SECONDS,\n appendAgentAccessParam,\n buildAgentAccessApiUrl,\n buildAgentAccessUrl,\n createScopedAgentAccessGrant,\n normalizeAgentAccessBasePath,\n normalizeAgentAccessOrigin,\n scopedAgentAccessResourceId,\n signScopedAgentAccessToken,\n toAgentAccessUrl,\n verifyScopedAgentAccessToken,\n type AgentAccessApiUrlOptions,\n type AgentAccessResourceScope,\n type AgentAccessUrlOptions,\n type ScopedAgentAccessGrant,\n type ScopedAgentAccessTokenOptions,\n} from \"./agent-access.js\";\nexport {\n AGENT_READABLE_RESOURCE_PAYLOAD_TYPE,\n AGENT_READABLE_RESOURCE_SCRIPT_TYPE,\n buildAgentReadableResourceDiscovery,\n renderAgentReadableResourceDiscoveryScript,\n safeJsonForHtml,\n type AgentReadableResourceDiscovery,\n type BuildAgentReadableResourceDiscoveryOptions,\n} from \"../shared/agent-readable-resource.js\";\n\n// SSR handler is NOT re-exported here — it uses a virtual module\n// (virtual:react-router/server-build) that only exists at Vite dev/build time.\n// Including it in this barrel would break the esbuild CF Pages bundler.\n// Templates import directly: import { ssrHandler } from \"@agent-native/core/server/ssr-handler\"\n\n// Nitro plugin helper — re-exported so templates don't need nitro as a direct dependency.\n// defineNitroPlugin is an identity function; this typed wrapper lets templates use it\n// without resolving `nitro/runtime` (which requires Nitro's virtual modules at runtime).\nexport type NitroPluginDef = (nitroApp: any) => void | Promise<void>;\nexport function defineNitroPlugin(def: NitroPluginDef): NitroPluginDef {\n return def;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,GAGb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,gCAAgC,EAChC,gCAAgC,EAChC,sCAAsC,EACtC,4CAA4C,EAC5C,oCAAoC,GACrC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,UAAU,EACV,2BAA2B,EAC3B,6BAA6B,EAC7B,gCAAgC,EAChC,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,GAEhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAyB,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,GAEpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,GAQxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAA0B,MAAM,UAAU,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,eAAe,EACf,+BAA+B,EAC/B,yBAAyB,EACzB,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,E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;AAC7B,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAGtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAChC,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,gBAAgB,EAChB,4BAA4B,GAM7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,oCAAoC,EACpC,mCAAmC,EACnC,mCAAmC,EACnC,0CAA0C,EAC1C,eAAe,GAGhB,MAAM,sCAAsC,CAAC;AAW9C,MAAM,UAAU,iBAAiB,CAAC,GAAmB;IACnD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["export {\n createServer,\n type CreateServerOptions,\n type EnvKeyConfig,\n} from \"./create-server.js\";\nexport {\n AGENT_BACKGROUND_PROCESSOR_FIELD,\n AGENT_BACKGROUND_PROCESSOR_ROUTE,\n AGENT_BACKGROUND_PROCESSOR_ROUTE_FIELD,\n dispatchPathTargetsNetlifyBackgroundFunction,\n resolveDurableBackgroundDispatchPath,\n} from \"../agent/durable-background.js\";\n\nexport {\n readBody,\n readBodyWithSizeLimit,\n streamFile,\n DEFAULT_CHAT_MAX_BODY_BYTES,\n DEFAULT_UPLOAD_MAX_FILE_BYTES,\n MAX_CHAT_ATTACHMENTS_PER_MESSAGE,\n isAllowedUploadMimeType,\n} from \"./h3-helpers.js\";\nexport {\n buildDeepLink,\n toAbsoluteOpenUrl,\n toDesktopOpenUrl,\n toVsCodeOpenUrl,\n OPEN_ROUTE_SUBPATH,\n DESKTOP_OPEN_URL,\n VSCODE_OPEN_URL,\n type DeepLinkInput,\n} from \"./deep-link.js\";\nexport { createOpenRouteHandler, type OpenRouteOptions } from \"./open-route.js\";\nexport {\n createEmbedStartRouteHandler,\n buildEmbedStartPath,\n type EmbedStartRouteOptions,\n} from \"./embed-route.js\";\nexport {\n createEmbedSessionTicket,\n consumeEmbedSessionTicket,\n normalizeEmbedTargetPath,\n requestHasEmbedAuthMarker,\n resolveEmbedSessionFromRequest,\n setEmbedSessionCookie,\n signEmbedSessionToken,\n verifyEmbedSessionToken,\n type ConsumedEmbedSessionTicket,\n type ConsumeEmbedSessionTicketOptions,\n type EmbedSessionTicket,\n type EmbedSessionTicketInput,\n type EmbedSessionTokenClaims,\n type ResolvedEmbedSession,\n type VerifyEmbedSessionTokenResult,\n} from \"./embed-session.js\";\nexport { createSSEHandler, type SSEHandlerOptions } from \"./sse.js\";\nexport {\n mountAuthMiddleware,\n autoMountAuth,\n getSession,\n COOKIE_NAME,\n addSession,\n removeSession,\n getSessionEmail,\n getFrameworkSessionCookieValues,\n setFrameworkSessionCookie,\n clearFrameworkSessionCookies,\n runAuthGuard,\n setDesktopExchange,\n setDesktopExchangeError,\n safeReturnPath,\n type DesktopExchangeErrorPayload,\n type AuthSession,\n type AuthOptions,\n} from \"./auth.js\";\nexport {\n handleIdentitySso,\n getIdentityHubUrl,\n isIdentitySsoEnabled,\n isIdentitySsoBypassPath,\n identitySsoLoginButtonHtml,\n IDENTITY_SSO_PROVIDER_ID,\n IDENTITY_SSO_SCOPE,\n} from \"./identity-sso.js\";\nexport { requireEnvKey, type MissingKeyResponse } from \"./missing-key.js\";\nexport { verifyCaptcha, type CaptchaVerifyResult } from \"./captcha.js\";\nexport {\n getLocaleInitScript,\n parseAcceptLanguage,\n resolveLocaleFromRequest,\n type LocaleInitScriptOptions,\n type ResolveLocaleFromRequestOptions,\n type ResolvedRequestLocale,\n} from \"../localization/server.js\";\nexport {\n createProductionAgentHandler,\n type ActionEntry,\n type ScriptEntry,\n type ProductionAgentOptions,\n type ActionTool,\n type ScriptTool,\n type AgentMessage,\n type AgentChatRequest,\n type AgentChatEvent,\n type AgentChatAttachment,\n type AgentChatReference,\n type MentionProvider,\n type MentionProviderItem,\n type AgentLoopFinalResponseGuard,\n type AgentLoopFinalResponseGuardContext,\n type AgentLoopFinalResponseGuardResult,\n type AgentLoopToolCallSummary,\n type AgentLoopToolResultSummary,\n} from \"../agent/index.js\";\nexport {\n actionsToEngineTools,\n getOwnerActiveApiKey,\n runAgentLoop,\n} from \"../agent/production-agent.js\";\nexport {\n getStoredModelForEngine,\n resolveEngine,\n} from \"../agent/engine/index.js\";\nexport {\n completeText,\n type CompleteTextMessage,\n type CompleteTextOptions,\n type CompleteTextResult,\n type CompleteTextUsage,\n} from \"./complete-text.js\";\nexport { createDevScriptRegistry } from \"../scripts/dev/index.js\";\n\nexport {\n createPollHandler,\n recordChange,\n getVersion,\n getChangesSince,\n getPollEmitter,\n canSeeChangeForUser,\n POLL_CHANGE_EVENT,\n} from \"./poll.js\";\nexport { createPollEventsHandler } from \"./poll-events.js\";\nexport { createAuthPlugin, defaultAuthPlugin } from \"./auth-plugin.js\";\nexport {\n initServerSentry,\n isServerSentryEnabled,\n setSentryUserForRequest,\n captureRouteError,\n type RouteErrorContext,\n} from \"./sentry.js\";\nexport {\n captureError,\n captureServerError,\n registerErrorCaptureProvider,\n type CaptureErrorContext,\n type CaptureErrorProvider,\n} from \"./capture-error.js\";\nexport { createSentryPlugin, defaultSentryPlugin } from \"./sentry-plugin.js\";\n// Re-export the org plugin so the auto-discovery's DEFAULT_PLUGIN_REGISTRY\n// (which references \"defaultOrgPlugin\" from @agent-native/core/server) can\n// resolve it during the deploy build worker-entry generation.\nexport { createOrgPlugin, defaultOrgPlugin } from \"../org/plugin.js\";\nexport {\n createContextXrayPlugin,\n defaultContextXrayPlugin,\n} from \"../agent/context-xray/plugin.js\";\nexport {\n createObservationalMemoryPlugin,\n defaultObservationalMemoryPlugin,\n} from \"../agent/observational-memory/plugin.js\";\nexport {\n createGoogleAuthPlugin,\n type GoogleAuthPluginOptions,\n} from \"./google-auth-plugin.js\";\nexport type { GoogleAuthMode } from \"./google-auth-mode.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n refreshGlobalMcpManager,\n type AgentChatPluginOptions,\n} from \"./agent-chat-plugin.js\";\nexport {\n configureAgentNativeEmbeddedEnvironment,\n createAgentNativeEmbeddedAuthOptions,\n createAgentNativeEmbeddedPlugin,\n mountAgentNativeEmbedded,\n normalizeAgentNativeEmbeddedSession,\n type AgentNativeEmbeddedAuthOptions,\n type AgentNativeEmbeddedGetSession,\n type AgentNativeEmbeddedHostSession,\n type AgentNativeEmbeddedPluginOptions,\n} from \"./embedded.js\";\nexport {\n createThread,\n getThread,\n listThreads,\n updateThreadData,\n deleteThread,\n setThreadArchived,\n setThreadPinned,\n setThreadScope,\n type ChatThread,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ListThreadsOptions,\n} from \"../chat-threads/store.js\";\nexport {\n createResourcesPlugin,\n defaultResourcesPlugin,\n} from \"./resources-plugin.js\";\nexport {\n createCoreRoutesPlugin,\n defaultCoreRoutesPlugin,\n FRAMEWORK_ROUTE_PREFIX,\n type CoreRoutesPluginOptions,\n} from \"./core-routes-plugin.js\";\nexport {\n AGENT_NATIVE_OG_IMAGE_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_HEIGHT,\n AGENT_NATIVE_OG_IMAGE_NETLIFY_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_WIDTH,\n agentNativeOgImageResponseHeaders,\n createAgentNativeOgImageHandler,\n renderAgentNativeOgImagePng,\n renderAgentNativeOgImageSvg,\n type AgentNativeOgImageInput,\n} from \"./social-og-image.js\";\nexport {\n createBrowserSessionActionEntries,\n type CreateBrowserSessionActionEntriesOptions,\n} from \"../browser-sessions/actions.js\";\nexport {\n DEFAULT_BROWSER_SESSION_REQUEST_POLL_MS,\n DEFAULT_BROWSER_SESSION_REQUEST_TIMEOUT_MS,\n DEFAULT_BROWSER_SESSION_TTL_MS,\n callBrowserSession,\n claimBrowserSessionRequest,\n completeBrowserSessionRequest,\n createBrowserSessionRequest,\n disconnectBrowserSession,\n getBrowserSession,\n getBrowserSessionRequest,\n listBrowserSessions,\n registerBrowserSession,\n waitForBrowserSessionRequest,\n} from \"../browser-sessions/store.js\";\nexport {\n mountBrowserSessionRoutes,\n type MountBrowserSessionRoutesOptions,\n} from \"../browser-sessions/routes.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n createTerminalPlugin,\n defaultTerminalPlugin,\n type TerminalPluginOptions,\n} from \"../terminal/terminal-plugin.js\";\nexport {\n createCollabPlugin,\n type CollabPluginOptions,\n} from \"./collab-plugin.js\";\n\nexport {\n spawnTask,\n getTask,\n getTaskByThread,\n listTasks,\n sendToTask,\n markTaskErrored,\n type AgentTask,\n type SpawnTaskOptions,\n} from \"./agent-teams.js\";\nexport { isOAuthConnected, getOAuthAccounts } from \"./oauth-helpers.js\";\nexport {\n hasGoogleSignInCredentials,\n resolveGoogleLegacyProviderCredentials,\n resolveGoogleProviderCredentialCandidates,\n resolveGoogleProviderCredentials,\n resolveGoogleSignInCredentials,\n type GoogleOAuthCredentials,\n} from \"./google-oauth-credentials.js\";\nexport { wrapWithAnalytics } from \"./analytics.js\";\nexport {\n getH3App,\n awaitBootstrap,\n markDefaultPluginProvided,\n type H3AppShim,\n} from \"./framework-request-handler.js\";\nexport {\n autoDiscoverActions,\n autoDiscoverScripts,\n loadActionsFromStaticRegistry,\n mergeCoreSharingActions,\n registerPackageActions,\n} from \"./action-discovery.js\";\nexport {\n mountActionRoutes,\n type MountActionRoutesOptions,\n} from \"./action-routes.js\";\nexport {\n runWithRequestContext,\n hasRequestContext,\n getRequestContext,\n getRequestUserEmail,\n getRequestUserName,\n getRequestOrgId,\n getRequestTimezone,\n getRequestRunContext,\n getCredentialContext,\n isIntegrationCallerRequest,\n type RequestContext,\n type RequestRunContext,\n} from \"./request-context.js\";\nexport { formatDateInTimezone, todayInTimezone } from \"./date-utils.js\";\n\nexport {\n createOnboardingPlugin,\n defaultOnboardingPlugin,\n} from \"../onboarding/plugin.js\";\n\nexport {\n registerFileUploadProvider,\n unregisterFileUploadProvider,\n listFileUploadProviders,\n getActiveFileUploadProvider,\n getActiveFileUploadProviderForRequest,\n uploadFile,\n builderFileUploadProvider,\n type FileUploadInput,\n type FileUploadProvider,\n type FileUploadResult,\n} from \"../file-upload/index.js\";\n\nexport {\n createIntegrationsPlugin,\n defaultIntegrationsPlugin,\n enqueueRemoteCommand,\n slackAdapter,\n telegramAdapter,\n whatsappAdapter,\n discordAdapter,\n microsoftTeamsAdapter,\n emailAdapter,\n assertPlatformCapability,\n type PlatformAdapter,\n type IncomingMessage,\n type OutgoingMessage,\n type PlatformAdapterCapabilities,\n type ImmediateWebhookResponse,\n type IntegrationStatus,\n type IntegrationsPluginOptions,\n type IntegrationExecutionContext,\n BUILT_IN_INTEGRATION_CATALOG,\n INTEGRATION_CATEGORIES,\n getIntegrationCatalogEntry,\n listBuiltInChannelIntegrations,\n listIntegrationCatalog,\n type BuiltInChannelId,\n type ChannelCapabilities,\n type IntegrationAvailability,\n type IntegrationCatalogEntry,\n type IntegrationCategory,\n type IntegrationCredentialRequirement,\n type IntegrationIconKey,\n type IntegrationSupportMaturity,\n} from \"../integrations/index.js\";\n\nexport {\n isElectron,\n isMobile,\n getOrigin,\n getAppBasePath,\n getAppUrl,\n resolveOAuthRedirectUri,\n isAllowedOAuthRedirectUri,\n encodeOAuthState,\n decodeOAuthState,\n resolveOAuthOwner,\n createOAuthSession,\n oauthCallbackResponse,\n oauthErrorPage,\n oauthDesktopExchangePage,\n type OAuthStatePayload,\n type OAuthOwnerResult,\n type OAuthSessionResult,\n} from \"./google-oauth.js\";\n\nexport {\n FeatureNotConfiguredError,\n hasBuilderPrivateKey,\n isBuilderEnvManaged,\n getBuilderProxyOrigin,\n getBuilderImageGenerationBaseUrl,\n getBuilderWebSearchBaseUrl,\n getBuilderAuthHeader,\n resolveBuilderPrivateKey,\n resolveBuilderAuthHeader,\n resolveHasBuilderPrivateKey,\n resolveHasCompleteBuilderConnection,\n resolveBuilderCredentials,\n resolveBuilderCredential,\n readDeployCredentialEnv,\n writeBuilderCredentials,\n deleteBuilderCredentials,\n resolveSecret,\n} from \"./credential-provider.js\";\nexport {\n builderDesignSystemUrl,\n buildBuilderDesignSystemIndexFiles,\n createBuilderDesignSystemProxyFields,\n fetchBuilderDesignSystemDocs,\n getBuilderDesignSystemsBaseUrl,\n hydrateBuilderDesignSystemReference,\n localBuilderDesignSystemId,\n mimeTypeForBuilderDesignSystemFilename,\n parseBuilderDesignSystemProxyReference,\n startBuilderDesignSystemIndex,\n type BuildBuilderDesignSystemIndexFilesOptions,\n type BuilderDesignSystemCodeFileInput,\n type BuilderDesignSystemDocsOptions,\n type BuilderDesignSystemDocument,\n type BuilderDesignSystemHydratedReference,\n type BuilderDesignSystemIndexFile,\n type BuilderDesignSystemIndexOptions,\n type BuilderDesignSystemIndexResult,\n type BuilderDesignSystemProxyFields,\n type BuilderDesignSystemProxyFieldsOptions,\n type BuilderDesignSystemProxyReference,\n} from \"./builder-design-systems.js\";\nexport {\n getBuilderBranchProjectId,\n isBuilderBranchingEnabled,\n resolveBuilderBranchProjectId,\n resolveIsBuilderBranchingEnabled,\n runBuilderAgent,\n type RunBuilderAgentResult,\n} from \"./builder-browser.js\";\nexport {\n ensureFusionContainer,\n sendFusionBranchMessage,\n pushFusionBranch,\n reserveFusionHostingSlug,\n deployFusionProject,\n getFusionDeploys,\n getFusionBranchEditorUrl,\n getFusionHostingUrl,\n type FusionBranchRef,\n type EnsureFusionContainerResult,\n type SendFusionMessageResult,\n} from \"./fusion-app.js\";\n\nexport {\n sendEmail,\n isEmailConfigured,\n getEmailProvider,\n type EmailAttachment,\n type EmailProvider,\n type SendEmailArgs,\n} from \"./email.js\";\nexport {\n renderEmail,\n emailStrong,\n emailLink,\n type RenderEmailArgs,\n type RenderedEmail,\n type EmailCta,\n} from \"./email-template.js\";\nexport { getAppProductionUrl, getFirstPartyProdUrl } from \"./app-url.js\";\nexport {\n getConfiguredAppBasePath,\n normalizeAppBasePath,\n withConfiguredAppBasePath,\n} from \"./app-base-path.js\";\nexport {\n signShortLivedToken,\n verifyShortLivedToken,\n type ShortLivedTokenClaims,\n type VerifyResult as ShortLivedTokenVerifyResult,\n} from \"./short-lived-token.js\";\nexport {\n AGENT_ACCESS_PARAM,\n DEFAULT_AGENT_ACCESS_TTL_SECONDS,\n appendAgentAccessParam,\n buildAgentAccessApiUrl,\n buildAgentAccessUrl,\n createScopedAgentAccessGrant,\n normalizeAgentAccessBasePath,\n normalizeAgentAccessOrigin,\n scopedAgentAccessResourceId,\n signScopedAgentAccessToken,\n toAgentAccessUrl,\n verifyScopedAgentAccessToken,\n type AgentAccessApiUrlOptions,\n type AgentAccessResourceScope,\n type AgentAccessUrlOptions,\n type ScopedAgentAccessGrant,\n type ScopedAgentAccessTokenOptions,\n} from \"./agent-access.js\";\nexport {\n AGENT_READABLE_RESOURCE_PAYLOAD_TYPE,\n AGENT_READABLE_RESOURCE_SCRIPT_TYPE,\n buildAgentReadableResourceDiscovery,\n renderAgentReadableResourceDiscoveryScript,\n safeJsonForHtml,\n type AgentReadableResourceDiscovery,\n type BuildAgentReadableResourceDiscoveryOptions,\n} from \"../shared/agent-readable-resource.js\";\n\n// SSR handler is NOT re-exported here — it uses a virtual module\n// (virtual:react-router/server-build) that only exists at Vite dev/build time.\n// Including it in this barrel would break the esbuild CF Pages bundler.\n// Templates import directly: import { ssrHandler } from \"@agent-native/core/server/ssr-handler\"\n\n// Nitro plugin helper — re-exported so templates don't need nitro as a direct dependency.\n// defineNitroPlugin is an identity function; this typed wrapper lets templates use it\n// without resolving `nitro/runtime` (which requires Nitro's virtual modules at runtime).\nexport type NitroPluginDef = (nitroApp: any) => void | Promise<void>;\nexport function defineNitroPlugin(def: NitroPluginDef): NitroPluginDef {\n return def;\n}\n"]}
|
|
@@ -113,6 +113,24 @@ export interface RequestContext {
|
|
|
113
113
|
attempts?: number;
|
|
114
114
|
incoming: import("../integrations/types.js").IncomingMessage;
|
|
115
115
|
placeholderRef?: string;
|
|
116
|
+
installationId?: string;
|
|
117
|
+
scopeId?: string;
|
|
118
|
+
principalType?: "user" | "service";
|
|
119
|
+
lineage?: {
|
|
120
|
+
runId?: string;
|
|
121
|
+
parentTaskId?: string;
|
|
122
|
+
source?: {
|
|
123
|
+
kind: string;
|
|
124
|
+
platform?: string;
|
|
125
|
+
id: string;
|
|
126
|
+
url?: string;
|
|
127
|
+
};
|
|
128
|
+
network?: {
|
|
129
|
+
protocol: "a2a" | "mcp" | "provider-api";
|
|
130
|
+
id: string;
|
|
131
|
+
peer?: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
116
134
|
};
|
|
117
135
|
/**
|
|
118
136
|
* Mutable per-request agent-run state. Populated by the agent-chat plugin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-context.d.ts","sourceRoot":"","sources":["../../src/server/request-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA0DH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,SAAS,CAAC,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,IAAI,CAAC;IACT,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,UAAU,CAAC,EA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