@agent-native/core 0.131.4 → 0.131.6
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 +3 -3
- package/corpus/core/CHANGELOG.md +69 -0
- package/corpus/core/docs/content/agent-native-toolkit.mdx +13 -6
- package/corpus/core/docs/content/cloneable-saas.mdx +5 -5
- package/corpus/core/docs/content/creating-templates.mdx +9 -0
- package/corpus/core/docs/content/deployment.mdx +14 -10
- package/corpus/core/docs/content/docs-components.mdx +491 -0
- package/corpus/core/docs/content/doctor.mdx +8 -1
- package/corpus/core/docs/content/drop-in-agent.mdx +1 -1
- package/corpus/core/docs/content/extensions.mdx +18 -18
- package/corpus/core/docs/content/faq.mdx +4 -4
- package/corpus/core/docs/content/key-concepts.mdx +30 -21
- package/corpus/core/docs/content/template-brain-developers.mdx +4 -1
- package/corpus/core/docs/content/template-mail-developers.mdx +4 -1
- package/corpus/core/docs/content/what-is-agent-native.mdx +6 -6
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/client.ts +449 -66
- package/corpus/core/src/a2a/correlation.ts +31 -0
- package/corpus/core/src/a2a/types.ts +4 -0
- package/corpus/core/src/action.ts +3 -0
- package/corpus/core/src/agent/engine/registry.ts +45 -5
- package/corpus/core/src/agent/production-agent.ts +151 -18
- package/corpus/core/src/agent/run-loop-with-resume.ts +190 -3
- package/corpus/core/src/agent/run-manager.ts +117 -41
- package/corpus/core/src/agent/thread-debug-history.ts +86 -0
- package/corpus/core/src/agent/types.ts +3 -1
- package/corpus/core/src/cli/create.ts +11 -1
- package/corpus/core/src/cli/templates-meta.ts +2 -2
- package/corpus/core/src/client/agent-chat-adapter.ts +91 -13
- package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +11 -9
- package/corpus/core/src/client/sse-event-processor.ts +17 -3
- package/corpus/core/src/db/client.ts +57 -17
- package/corpus/core/src/integrations/adapters/slack.ts +8 -3
- package/corpus/core/src/localization/default-messages.ts +44 -0
- package/corpus/core/src/observability/traces.ts +78 -5
- package/corpus/core/src/scripts/call-agent.ts +290 -9
- package/corpus/core/src/scripts/describe-workspace-apps.ts +2 -2
- package/corpus/core/src/secrets/crypto.ts +126 -34
- package/corpus/core/src/secrets/storage.ts +61 -25
- package/corpus/core/src/server/agent-capabilities.ts +1 -1
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +111 -7
- package/corpus/core/src/server/agent-chat/context-tools.ts +2 -0
- package/corpus/core/src/server/agent-chat/plugin-options.ts +34 -1
- package/corpus/core/src/server/agent-chat/prompt-resources.ts +1 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +91 -59
- package/corpus/core/src/templates/default/.agents/skills/secrets/SKILL.md +14 -7
- package/corpus/core/src/templates/headless/.agents/skills/secrets/SKILL.md +14 -7
- package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/corpus/core/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/corpus/core/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +14 -7
- package/corpus/core/src/vite/client.ts +1 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-ops/SKILL.md +5 -4
- package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +6 -4
- package/corpus/templates/analytics/AGENTS.md +6 -4
- package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +4 -3
- package/corpus/templates/analytics/changelog/2026-07-30-scheduled-dashboard-emails-complete-every-panel-without-pool.md +6 -0
- package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +28 -1
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +18 -11
- package/corpus/templates/analytics/server/lib/analytics-connector-catalog.ts +4 -4
- package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +9 -5
- package/corpus/templates/analytics/server/lib/dashboard-panel-query.ts +6 -2
- package/corpus/templates/analytics/server/lib/dashboard-panel-source-resolver.ts +11 -4
- package/corpus/templates/analytics/server/lib/dashboard-report-render.ts +49 -31
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +16 -8
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +9 -3
- package/corpus/templates/analytics/server/lib/production-serverless-runtime.ts +11 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +3 -2
- package/corpus/templates/analytics/server/plugins/analytics-alert-jobs.ts +2 -1
- package/corpus/templates/analytics/server/plugins/dashboard-report-jobs.ts +2 -1
- package/corpus/templates/analytics/server/plugins/uptime-monitor-jobs.ts +1 -12
- package/corpus/templates/brain/.agents/skills/brain/RUNBOOK.md +54 -6
- package/corpus/templates/brain/.agents/skills/brain/SKILL.md +20 -9
- package/corpus/templates/brain/.agents/skills/ingestion-and-connectors/SKILL.md +33 -1
- package/corpus/templates/brain/AGENTS.md +3 -1
- package/corpus/templates/brain/README.md +4 -1
- package/corpus/templates/brain/actions/_schemas.ts +30 -8
- package/corpus/templates/brain/actions/ask-brain.ts +124 -14
- package/corpus/templates/brain/actions/create-source.ts +18 -2
- package/corpus/templates/brain/actions/enqueue-captures-distillation.ts +8 -123
- package/corpus/templates/brain/actions/enqueue-distillation.ts +6 -127
- package/corpus/templates/brain/actions/import-capture.ts +17 -5
- package/corpus/templates/brain/actions/import-transcript.ts +17 -5
- package/corpus/templates/brain/actions/update-source.ts +25 -5
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/brain/changelog/2026-07-30-blessed-resources-can-feed-cited-company-answers.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-30-the-left-sidebar-no-longer-shows-a-blank-organization-placeh.md +6 -0
- package/corpus/templates/brain/server/lib/brain.ts +49 -19
- package/corpus/templates/brain/server/lib/distillation-queue.ts +147 -0
- package/corpus/templates/brain/server/lib/source-policy.ts +264 -0
- package/corpus/templates/brain/server/plugins/agent-chat.ts +3 -2
- package/corpus/templates/brain/server/routes/api/_agent-native/brain/ingest.post.ts +116 -19
- package/corpus/templates/clips/app/components/meetings/google-oauth-identity-notice.tsx +51 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +4 -0
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +3 -1
- package/corpus/templates/clips/changelog/2026-07-30-google-calendar-warning.md +6 -0
- package/corpus/templates/content/.agents/skills/content-product-development/SKILL.md +47 -0
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +72 -8
- package/corpus/templates/content/changelog/2026-07-30-the-slash-command-hint-now-stays-on-only-the-active-empty-li.md +6 -0
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +506 -11
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +148 -17
- package/corpus/templates/design/app/components/design/canvas-interactions/design-canvas-interactions.ts +357 -0
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +7 -466
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +15 -311
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +19 -997
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +8 -1216
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +31 -38
- package/corpus/templates/design/package.json +0 -1
- package/corpus/templates/dispatch/AGENTS.md +8 -0
- package/corpus/templates/dispatch/DEVELOPING.md +29 -0
- package/corpus/templates/dispatch/actions/view-screen.ts +34 -2
- package/corpus/templates/dispatch/app/i18n-data.ts +457 -0
- package/corpus/templates/dispatch/changelog/2026-07-30-delegated-dispatch-work-continues-reliably-in-the-background.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-30-find-failed-runs-across-apps.md +6 -0
- package/corpus/templates/dispatch/netlify.toml +3 -0
- package/corpus/templates/slides/.agents/skills/analytics-data-for-decks/SKILL.md +8 -12
- package/corpus/templates/slides/AGENTS.md +4 -4
- package/corpus/templates/slides/actions/duplicate-deck.ts +19 -4
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +2 -10
- package/corpus/templates/slides/app/components/deck/MermaidRenderer.tsx +12 -1
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +30 -13
- package/corpus/templates/slides/app/components/editor/DeckEditorSkeleton.tsx +35 -0
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +63 -56
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +21 -76
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1110 -292
- package/corpus/templates/slides/app/components/editor/SlideOverflowWarning.tsx +53 -0
- package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +235 -18
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +4 -1
- package/corpus/templates/slides/app/components/editor/canvas-interactions/index.ts +11 -0
- package/corpus/templates/slides/app/components/editor/canvas-interactions/slides-canvas-adapter.ts +129 -0
- package/corpus/templates/slides/app/components/editor/selection-overlay-measurement.ts +70 -0
- package/corpus/templates/slides/app/components/editor/slide-object-interactions.ts +519 -65
- package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +36 -426
- package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +19 -458
- package/corpus/templates/slides/app/context/DeckContext.tsx +179 -72
- package/corpus/templates/slides/app/global.css +105 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +8 -0
- package/corpus/templates/slides/app/lib/deck-editor-loading.ts +26 -0
- package/corpus/templates/slides/app/lib/mermaid-blocks.ts +27 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +71 -38
- package/corpus/templates/slides/app/pages/Index.tsx +98 -41
- package/corpus/templates/slides/changelog/2026-07-30-deck-loading-no-longer-flashes-an-unavailable-message.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-duplicating-a-deck-from-the-deck-list-now-opens-the-copy-imm.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-layout-overflow-warning-is-readable-and-dismissible.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-shared-canvas-annotations.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-slide-objects-can-be-moved-as-a-group-copied-and-pasted-with.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-slide-text-editing-and-object-controls-now-match-google-slides.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-style-panel-now-scrolls-with-speaker-notes-open-shows-the-sl.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-top-toolbar-controls-now-use-consistent-sizing-with-undo-and.md +6 -0
- package/corpus/templates/slides/netlify.toml +3 -1
- package/corpus/templates/slides/package.json +0 -1
- package/corpus/templates/slides/server/lib/chat-attachments.ts +18 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +5 -0
- package/corpus/templates/slides/vite.config.ts +0 -1
- package/corpus/toolkit/CHANGELOG.md +13 -0
- package/corpus/toolkit/README.md +19 -0
- package/corpus/toolkit/agent-native.eject.json +38 -0
- package/corpus/toolkit/package.json +29 -1
- package/corpus/toolkit/src/canvas-annotations/CanvasCommentPins.tsx +861 -0
- package/corpus/toolkit/src/canvas-annotations/DrawOverlay.tsx +1233 -0
- package/corpus/toolkit/src/canvas-annotations/index.ts +15 -0
- package/corpus/toolkit/src/canvas-annotations/types.ts +14 -0
- package/corpus/toolkit/src/canvas-interactions/canvas-interactions.ts +933 -0
- package/corpus/toolkit/src/canvas-interactions/index.ts +67 -0
- package/corpus/toolkit/src/design-tweaks/scrub-input-utils.ts +311 -0
- package/corpus/toolkit/src/design-tweaks/scrub-input.tsx +491 -0
- package/corpus/toolkit/src/design-tweaks/visual-style-controls.tsx +26 -171
- package/corpus/toolkit/src/index.ts +1 -0
- package/dist/a2a/client.d.ts +23 -0
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +309 -44
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/correlation.d.ts +1 -0
- package/dist/a2a/correlation.d.ts.map +1 -1
- package/dist/a2a/correlation.js +27 -0
- package/dist/a2a/correlation.js.map +1 -1
- package/dist/a2a/types.d.ts +4 -0
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/action.d.ts +3 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +34 -7
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts +40 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +113 -15
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts +21 -0
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +163 -4
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/agent/run-manager.d.ts +16 -9
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +93 -42
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/thread-debug-history.d.ts +10 -0
- package/dist/agent/thread-debug-history.d.ts.map +1 -0
- package/dist/agent/thread-debug-history.js +68 -0
- package/dist/agent/thread-debug-history.js.map +1 -0
- package/dist/agent/types.d.ts +3 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +6 -1
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/templates-meta.js +2 -2
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +76 -13
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.js +1 -1
- package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +12 -3
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +48 -17
- package/dist/db/client.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/integrations/adapters/slack.js +7 -3
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/localization/default-messages.d.ts +43 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +43 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/traces.d.ts +3 -1
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +73 -4
- package/dist/observability/traces.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +12 -12
- package/dist/provider-api/actions/provider-api.d.ts +13 -13
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +233 -10
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/scripts/describe-workspace-apps.js +2 -2
- package/dist/scripts/describe-workspace-apps.js.map +1 -1
- package/dist/secrets/crypto.d.ts +31 -21
- package/dist/secrets/crypto.d.ts.map +1 -1
- package/dist/secrets/crypto.js +108 -33
- package/dist/secrets/crypto.js.map +1 -1
- package/dist/secrets/storage.d.ts +3 -5
- package/dist/secrets/storage.d.ts.map +1 -1
- package/dist/secrets/storage.js +40 -25
- package/dist/secrets/storage.js.map +1 -1
- package/dist/server/agent-capabilities.js +1 -1
- package/dist/server/agent-capabilities.js.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts +17 -3
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.js +92 -3
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
- package/dist/server/agent-chat/context-tools.d.ts.map +1 -1
- package/dist/server/agent-chat/context-tools.js +2 -0
- package/dist/server/agent-chat/context-tools.js.map +1 -1
- package/dist/server/agent-chat/plugin-options.d.ts +23 -0
- package/dist/server/agent-chat/plugin-options.d.ts.map +1 -1
- package/dist/server/agent-chat/plugin-options.js +4 -1
- package/dist/server/agent-chat/plugin-options.js.map +1 -1
- package/dist/server/agent-chat/prompt-resources.js +1 -1
- package/dist/server/agent-chat/prompt-resources.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +2 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +79 -56
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/templates/default/.agents/skills/secrets/SKILL.md +14 -7
- package/dist/templates/headless/.agents/skills/secrets/SKILL.md +14 -7
- package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/dist/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +14 -7
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +1 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/agent-native-toolkit.mdx +13 -6
- package/docs/content/cloneable-saas.mdx +5 -5
- package/docs/content/creating-templates.mdx +9 -0
- package/docs/content/deployment.mdx +14 -10
- package/docs/content/docs-components.mdx +491 -0
- package/docs/content/doctor.mdx +8 -1
- package/docs/content/drop-in-agent.mdx +1 -1
- package/docs/content/extensions.mdx +18 -18
- package/docs/content/faq.mdx +4 -4
- package/docs/content/key-concepts.mdx +30 -21
- package/docs/content/template-brain-developers.mdx +4 -1
- package/docs/content/template-mail-developers.mdx +4 -1
- package/docs/content/what-is-agent-native.mdx +6 -6
- package/package.json +2 -2
- package/src/a2a/client.ts +449 -66
- package/src/a2a/correlation.ts +31 -0
- package/src/a2a/types.ts +4 -0
- package/src/action.ts +3 -0
- package/src/agent/engine/registry.ts +45 -5
- package/src/agent/production-agent.ts +151 -18
- package/src/agent/run-loop-with-resume.ts +190 -3
- package/src/agent/run-manager.ts +117 -41
- package/src/agent/thread-debug-history.ts +86 -0
- package/src/agent/types.ts +3 -1
- package/src/cli/create.ts +11 -1
- package/src/cli/templates-meta.ts +2 -2
- package/src/client/agent-chat-adapter.ts +91 -13
- package/src/client/resources/McpIntegrationDialog.tsx +11 -9
- package/src/client/sse-event-processor.ts +17 -3
- package/src/db/client.ts +57 -17
- package/src/integrations/adapters/slack.ts +8 -3
- package/src/localization/default-messages.ts +44 -0
- package/src/observability/traces.ts +78 -5
- package/src/scripts/call-agent.ts +290 -9
- package/src/scripts/describe-workspace-apps.ts +2 -2
- package/src/secrets/crypto.ts +126 -34
- package/src/secrets/storage.ts +61 -25
- package/src/server/agent-capabilities.ts +1 -1
- package/src/server/agent-chat/action-filters-a2a.ts +111 -7
- package/src/server/agent-chat/context-tools.ts +2 -0
- package/src/server/agent-chat/plugin-options.ts +34 -1
- package/src/server/agent-chat/prompt-resources.ts +1 -1
- package/src/server/agent-chat-plugin.ts +91 -59
- package/src/templates/default/.agents/skills/secrets/SKILL.md +14 -7
- package/src/templates/headless/.agents/skills/secrets/SKILL.md +14 -7
- package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +14 -7
- package/src/vite/client.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpIntegrationDialog.d.ts","sourceRoot":"","sources":["../../../src/client/resources/McpIntegrationDialog.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAUL,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAI9B,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,YAAY,EAAE,cAAc,CAAC;IAC7B,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACxC;AAkED,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,YAAY,EACZ,oBAA2B,EAC3B,YAAY,EACZ,eAAe,EACf,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,YAAY,GACb,EAAE,yBAAyB,
|
|
1
|
+
{"version":3,"file":"McpIntegrationDialog.d.ts","sourceRoot":"","sources":["../../../src/client/resources/McpIntegrationDialog.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAUL,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAI9B,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,YAAY,EAAE,cAAc,CAAC;IAC7B,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACxC;AAkED,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,YAAY,EACZ,oBAA2B,EAC3B,YAAY,EACZ,eAAe,EACf,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,YAAY,GACb,EAAE,yBAAyB,sCAsrB3B"}
|
|
@@ -328,6 +328,6 @@ export function McpIntegrationDialog({ open, onOpenChange, initialIntegrationId
|
|
|
328
328
|
}, placeholder: selected?.headerPlaceholder ??
|
|
329
329
|
t("mcpIntegrations.headersPlaceholder") })] })), selected?.docsUrl && (_jsxs("a", { href: selected.docsUrl, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground underline hover:text-foreground", children: [t("mcpIntegrations.openSetupDocs"), _jsx(IconExternalLink, { className: "h-3 w-3" })] })), testResult && (_jsxs("div", { className: cn("flex items-start gap-1 rounded-md px-3 py-2 text-[11px] leading-snug", testResult.ok
|
|
330
330
|
? "bg-green-500/5 text-green-600 dark:text-green-400"
|
|
331
|
-
: "bg-red-500/5 text-red-600 dark:text-red-400"), children: [testResult.ok && (_jsx(IconCheck, { className: "mt-0.5 h-3 w-3 shrink-0" })), _jsx("span", { className: "min-w-0 break-words", children: testResult.message })] })), error && (_jsx("div", { className: "break-words rounded-md bg-red-500/5 px-3 py-2 text-[11px] leading-snug text-red-600 dark:text-red-400", children: error }))] }) }), _jsxs("div", { className: "flex shrink-0 items-center justify-between gap-2 border-t border-border px-7 py-4", children: [_jsx("button", { type: "button", onClick: runTest, disabled: !url.trim() || busy, className: "rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40", children: t("mcpIntegrations.test") }), !selected ? (_jsxs("button", { type: "button", onClick: connectCustomWithOAuth, disabled: !name.trim() || !url.trim() || busy, "aria-busy": busy, className: "rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40", children: [busy && (_jsx(IconLoader2, { className: "me-1.5 inline h-3.5 w-3.5 animate-spin" })), t("mcpIntegrations.connectWithOAuth")] })) : null, selectedRequiresSetup ? (selected?.docsUrl ? (_jsxs("a", { href: selected.docsUrl, target: "_blank", rel: "noopener noreferrer", className: "inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90", children: [t("mcpIntegrations.viewSetup"), _jsx(IconExternalLink, { className: "h-3 w-3" })] })) : null) : selected?.authMode === "oauth" ? (_jsxs("button", { type: "button", onClick: () => connectWithOAuth(selected), disabled: !name.trim() || !url.trim() || busy, "aria-busy": busy, className: "inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:pointer-events-none disabled:opacity-40", children: [busy && _jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" }), t("mcpIntegrations.connectWithOAuth")] })) : (_jsxs("button", { type: "button", onClick: submitForm, disabled: !name.trim() || !url.trim() || busy, className: "inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:pointer-events-none disabled:opacity-40", children: [busy && _jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" }), t("mcpIntegrations.connect")] }))] })] })) }) }));
|
|
331
|
+
: "bg-red-500/5 text-red-600 dark:text-red-400"), children: [testResult.ok && (_jsx(IconCheck, { className: "mt-0.5 h-3 w-3 shrink-0" })), _jsx("span", { className: "min-w-0 break-words", children: testResult.message })] })), error && (_jsx("div", { className: "break-words rounded-md bg-red-500/5 px-3 py-2 text-[11px] leading-snug text-red-600 dark:text-red-400", children: error }))] }) }), _jsxs("div", { className: "flex shrink-0 items-center justify-between gap-2 border-t border-border px-7 py-4", children: [!selectedRequiresSetup && (_jsx("button", { type: "button", onClick: runTest, disabled: !url.trim() || busy, className: "rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40", children: t("mcpIntegrations.test") })), !selected ? (_jsxs("button", { type: "button", onClick: connectCustomWithOAuth, disabled: !name.trim() || !url.trim() || busy, "aria-busy": busy, className: "rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40", children: [busy && (_jsx(IconLoader2, { className: "me-1.5 inline h-3.5 w-3.5 animate-spin" })), t("mcpIntegrations.connectWithOAuth")] })) : null, selectedRequiresSetup ? (selected?.docsUrl ? (_jsxs("a", { href: selected.docsUrl, target: "_blank", rel: "noopener noreferrer", className: "ms-auto inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90", children: [t("mcpIntegrations.viewSetup"), _jsx(IconExternalLink, { className: "h-3 w-3" })] })) : null) : selected?.authMode === "oauth" ? (_jsxs("button", { type: "button", onClick: () => connectWithOAuth(selected), disabled: !name.trim() || !url.trim() || busy, "aria-busy": busy, className: "inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:pointer-events-none disabled:opacity-40", children: [busy && _jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" }), t("mcpIntegrations.connectWithOAuth")] })) : (_jsxs("button", { type: "button", onClick: submitForm, disabled: !name.trim() || !url.trim() || busy, className: "inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:pointer-events-none disabled:opacity-40", children: [busy && _jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" }), t("mcpIntegrations.connect")] }))] })] })) }) }));
|
|
332
332
|
}
|
|
333
333
|
//# sourceMappingURL=McpIntegrationDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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AAI,EAAE,QAAQ,CAAC,OAAO,EACtB,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAC,oKAAoK,aAE7K,CAAC,CAAC,2BAA2B,CAAC,EAC/B,KAAC,gBAAgB,IAAC,SAAS,EAAC,SAAS,GAAG,IACtC,CACL,CAAC,CAAC,CAAC,IAAI,CACT,CAAC,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CACnC,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EACzC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,IAAI,eAClC,IAAI,EACf,SAAS,EAAC,qNAAqN,aAE9N,IAAI,IAAI,KAAC,WAAW,IAAC,SAAS,EAAC,0BAA0B,GAAG,EAC5D,CAAC,CAAC,kCAAkC,CAAC,IAC/B,CACV,CAAC,CAAC,CAAC,CACF,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,IAAI,EAC7C,SAAS,EAAC,qNAAqN,aAE9N,IAAI,IAAI,KAAC,WAAW,IAAC,SAAS,EAAC,0BAA0B,GAAG,EAC5D,CAAC,CAAC,yBAAyB,CAAC,IACtB,CACV,IACG,IACL,CACJ,GACa,GACT,CACV,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconArrowLeft,\n IconCheck,\n IconExternalLink,\n IconLoader2,\n IconSearch,\n} from \"@tabler/icons-react\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\n\nimport { agentNativePath } from \"../api-path.js\";\nimport { openAgentSettings } from \"../CommandMenu.js\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"../components/ui/dialog.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { useT } from \"../i18n.js\";\nimport { cn } from \"../utils.js\";\nimport {\n buildMcpOAuthStartUrl,\n createMcpIntegrationFormDefaults,\n filterMcpIntegrations,\n getMcpIntegrationApiFallback,\n getDefaultMcpIntegrations,\n isCustomMcpIntegrationEnabled,\n navigateToMcpOAuthStart,\n resolveMcpIntegrationScope,\n shouldOfferMcpOrganizationScope,\n type DefaultMcpIntegration,\n} from \"./mcp-integration-catalog.js\";\nimport {\n formatMcpServerError,\n getMcpUrlValidationError,\n testMcpServerUrl,\n useMcpServers,\n type CreateMcpServerArgs,\n type McpServerScope,\n} from \"./use-mcp-servers.js\";\n\ntype DialogMode = \"catalog\" | \"form\";\n\nexport interface McpIntegrationDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n initialIntegrationId?: string | null;\n defaultScope: McpServerScope;\n canCreateOrgMcp: boolean;\n hasOrg: boolean;\n onCreateMcpServer: (args: CreateMcpServerArgs) => Promise<unknown>;\n onCreated?: () => void;\n integrations?: DefaultMcpIntegration[];\n}\n\ninterface TestResult {\n ok: boolean;\n message: string;\n}\n\nfunction IntegrationLogo({ name, logoUrl }: { name: string; logoUrl: string }) {\n const [loaded, setLoaded] = useState(false);\n const [loadFailed, setLoadFailed] = useState(false);\n\n useEffect(() => {\n setLoaded(false);\n setLoadFailed(false);\n }, [logoUrl]);\n\n return (\n <div className=\"relative flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-background text-[11px] font-semibold text-muted-foreground\">\n <span aria-hidden=\"true\" hidden={loaded}>\n {name.slice(0, 1)}\n </span>\n <img\n src={logoUrl}\n alt=\"\"\n loading=\"lazy\"\n decoding=\"async\"\n className=\"absolute inset-1 h-6 w-6 object-contain\"\n hidden={loadFailed}\n onLoad={() => {\n setLoadFailed(false);\n setLoaded(true);\n }}\n onError={() => {\n setLoadFailed(true);\n setLoaded(false);\n }}\n />\n </div>\n );\n}\n\nfunction parseHeaderLines(text: string): Record<string, string> | undefined {\n const out: Record<string, string> = {};\n for (const line of text.split(/\\r?\\n/)) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n const idx = trimmed.indexOf(\":\");\n if (idx <= 0) continue;\n const key = trimmed.slice(0, idx).trim();\n const value = trimmed.slice(idx + 1).trim();\n if (!key || !value) continue;\n out[key] = value;\n }\n return Object.keys(out).length > 0 ? out : undefined;\n}\n\nfunction compareUrl(value: string): string {\n try {\n const url = new URL(value.trim());\n url.hash = \"\";\n return url.toString().replace(/\\/+$/, \"\");\n } catch {\n return value.trim().replace(/\\/+$/, \"\");\n }\n}\n\nexport function McpIntegrationDialog({\n open,\n onOpenChange,\n initialIntegrationId = null,\n defaultScope,\n canCreateOrgMcp,\n hasOrg,\n onCreateMcpServer,\n onCreated,\n integrations,\n}: McpIntegrationDialogProps) {\n const t = useT();\n const [mode, setMode] = useState<DialogMode>(\"catalog\");\n const [query, setQuery] = useState(\"\");\n const [selected, setSelected] = useState<DefaultMcpIntegration | null>(null);\n const safeDefaultScope = resolveMcpIntegrationScope(\n defaultScope,\n hasOrg,\n canCreateOrgMcp,\n );\n const [scope, setScope] = useState<McpServerScope>(safeDefaultScope);\n const [name, setName] = useState(\"\");\n const [url, setUrl] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [headersText, setHeadersText] = useState(\"\");\n const [busy, setBusy] = useState(false);\n const [quickBusyId, setQuickBusyId] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const [testResult, setTestResult] = useState<TestResult | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const mcpServersQuery = useMcpServers();\n const defaultIntegrations = useMemo(\n () => integrations ?? getDefaultMcpIntegrations(),\n [integrations],\n );\n const customIntegrationEnabled = useMemo(\n () => isCustomMcpIntegrationEnabled(),\n [],\n );\n const showCatalog = defaultIntegrations.length > 0;\n\n const connectedUrls = useMemo(() => {\n const servers = [\n ...(mcpServersQuery.data?.user ?? []),\n ...(mcpServersQuery.data?.org ?? []),\n ];\n // A saved server is not necessarily a working connection. The settings\n // page reports failed and unknown health states separately, so only mark\n // catalog entries as connected after the health probe succeeds.\n return new Set(\n servers\n .filter((server) => server.status.state === \"connected\")\n .map((server) => compareUrl(server.url)),\n );\n }, [mcpServersQuery.data]);\n\n const filteredIntegrations = useMemo(\n () => filterMcpIntegrations(query, defaultIntegrations),\n [defaultIntegrations, query],\n );\n\n const selectedRequiresSetup = Boolean(\n selected &&\n (selected.connectionMode === \"manual\" ||\n selected.availability === \"provider-setup\" ||\n selected.availability === \"client-restricted\"),\n );\n\n useEffect(() => {\n if (!open) return;\n const initialIntegration = initialIntegrationId\n ? defaultIntegrations.find(\n (integration) => integration.id === initialIntegrationId,\n )\n : null;\n const initialDefaults =\n createMcpIntegrationFormDefaults(initialIntegration);\n setMode(initialIntegration || !showCatalog ? \"form\" : \"catalog\");\n setQuery(\"\");\n setSelected(initialIntegration ?? null);\n setScope(safeDefaultScope);\n setName(initialDefaults.name);\n setUrl(initialDefaults.url);\n setDescription(initialDefaults.description);\n setHeadersText(initialDefaults.headersText);\n setBusy(false);\n setQuickBusyId(null);\n setError(null);\n setTestResult(null);\n }, [\n defaultIntegrations,\n initialIntegrationId,\n open,\n safeDefaultScope,\n showCatalog,\n ]);\n\n useEffect(() => {\n if (open && mode === \"form\") {\n const timer = window.setTimeout(() => inputRef.current?.focus(), 60);\n return () => window.clearTimeout(timer);\n }\n }, [mode, open]);\n\n const clearFeedback = () => {\n setError(null);\n setTestResult(null);\n };\n\n const openForm = (integration?: DefaultMcpIntegration | null) => {\n const defaults = createMcpIntegrationFormDefaults(integration);\n setSelected(integration ?? null);\n setScope(safeDefaultScope);\n setName(defaults.name);\n setUrl(defaults.url);\n setDescription(defaults.description);\n setHeadersText(defaults.headersText);\n setError(null);\n setTestResult(null);\n setMode(\"form\");\n };\n\n const beginOAuth = (\n args: {\n name: string;\n url: string;\n description: string;\n },\n options?: { quickId?: string },\n ) => {\n const validationError = getMcpUrlValidationError(args.url);\n if (validationError) {\n setError(validationError);\n setTestResult(null);\n return;\n }\n setBusy(true);\n setQuickBusyId(options?.quickId ?? null);\n const returnUrl =\n typeof window === \"undefined\"\n ? \"/\"\n : window.location.pathname +\n window.location.search +\n window.location.hash;\n navigateToMcpOAuthStart(\n agentNativePath(\n buildMcpOAuthStartUrl({\n name: args.name,\n url: args.url,\n description: args.description,\n scope,\n returnUrl,\n }),\n ),\n );\n };\n\n const connectWithOAuth = (\n integration: DefaultMcpIntegration,\n options?: { quickId?: string },\n ) =>\n beginOAuth(\n {\n name: integration.name,\n url: integration.url,\n description: integration.description,\n },\n options,\n );\n\n const connectCustomWithOAuth = () => {\n if (!name.trim()) {\n setError(t(\"mcpIntegrations.serverNameRequired\"));\n return;\n }\n beginOAuth({\n name: name.trim(),\n url: url.trim(),\n description: description.trim(),\n });\n };\n\n const createServer = async (\n args: CreateMcpServerArgs,\n options?: { quickId?: string },\n ) => {\n const validationError = getMcpUrlValidationError(args.url);\n if (validationError) {\n setError(validationError);\n setTestResult(null);\n return;\n }\n\n if (options?.quickId) setQuickBusyId(options.quickId);\n setBusy(true);\n setError(null);\n try {\n await onCreateMcpServer(args);\n onOpenChange(false);\n onCreated?.();\n } catch (err) {\n setError(formatMcpServerError(err));\n } finally {\n setBusy(false);\n setQuickBusyId(null);\n }\n };\n\n const submitForm = () => {\n const trimmedName = name.trim();\n const trimmedUrl = url.trim();\n if (!trimmedName || !trimmedUrl || busy) return;\n void createServer({\n scope,\n name: trimmedName,\n url: trimmedUrl,\n headers: parseHeaderLines(headersText),\n description: description.trim() || undefined,\n });\n };\n\n const quickConnect = (integration: DefaultMcpIntegration) => {\n if (\n integration.connectionMode === \"manual\" ||\n integration.availability === \"provider-setup\"\n ) {\n return;\n }\n if (integration.authMode === \"oauth\") {\n connectWithOAuth(integration, { quickId: integration.id });\n return;\n }\n if (integration.authMode === \"headers\") {\n openForm(integration);\n return;\n }\n void createServer(\n {\n scope: safeDefaultScope,\n name: integration.name,\n url: integration.url,\n description: integration.description,\n },\n { quickId: integration.id },\n );\n };\n\n const runTest = async () => {\n const trimmedUrl = url.trim();\n if (!trimmedUrl || busy) return;\n const validationError = getMcpUrlValidationError(trimmedUrl);\n if (validationError) {\n setTestResult({ ok: false, message: validationError });\n setError(null);\n return;\n }\n setBusy(true);\n setError(null);\n setTestResult(null);\n try {\n const res = await testMcpServerUrl(\n trimmedUrl,\n parseHeaderLines(headersText),\n );\n setTestResult(\n res.ok\n ? {\n ok: true,\n message: t(\"mcpIntegrations.toolsAvailable\", {\n count: res.toolCount ?? 0,\n }),\n }\n : { ok: false, message: res.error ?? t(\"mcpIntegrations.failed\") },\n );\n } catch (err) {\n setTestResult({ ok: false, message: formatMcpServerError(err) });\n } finally {\n setBusy(false);\n }\n };\n\n const renderScopeSelector = () => {\n if (!shouldOfferMcpOrganizationScope(hasOrg, canCreateOrgMcp)) return null;\n\n return (\n <div className=\"flex gap-1 rounded-md border border-border bg-background p-0.5\">\n <button\n type=\"button\"\n onClick={() => setScope(\"user\")}\n className={cn(\n \"flex-1 rounded px-2 py-1.5 text-[11px] font-medium\",\n scope === \"user\"\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:text-foreground\",\n )}\n >\n {t(\"mcpIntegrations.personal\")}\n </button>\n <button\n type=\"button\"\n onClick={() => setScope(\"org\")}\n className={cn(\n \"flex-1 rounded px-2 py-1.5 text-[11px] font-medium\",\n scope === \"org\"\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:text-foreground\",\n )}\n >\n {t(\"mcpIntegrations.organization\")}\n </button>\n </div>\n );\n };\n\n if (!showCatalog && !customIntegrationEnabled) return null;\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className=\"flex max-h-[min(820px,calc(100vh-32px))] w-[calc(100vw-24px)] max-w-[760px] flex-col gap-0 p-0 sm:w-[min(760px,calc(100vw-48px))]\">\n {mode === \"catalog\" ? (\n <>\n <DialogHeader className=\"shrink-0 px-7 pb-5 pe-14 pt-6\">\n <DialogTitle>{t(\"mcpIntegrations.title\")}</DialogTitle>\n <DialogDescription>\n {t(\"mcpIntegrations.description\", {\n count: defaultIntegrations.length,\n })}\n </DialogDescription>\n </DialogHeader>\n <div className=\"flex shrink-0 flex-col gap-3 px-7 pb-5 sm:flex-row\">\n <label className=\"relative min-w-0 flex-1\">\n <IconSearch className=\"pointer-events-none absolute start-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground\" />\n <input\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n className=\"h-9 w-full rounded-md border border-border bg-background pe-3 ps-8 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.searchPlaceholder\")}\n />\n </label>\n <button\n type=\"button\"\n onClick={() => openForm(null)}\n className={cn(\n \"inline-flex h-9 items-center justify-center gap-1.5 rounded-md border border-border bg-background px-3 text-[12px] font-medium text-foreground hover:bg-accent\",\n !customIntegrationEnabled && \"hidden\",\n )}\n >\n {t(\"mcpIntegrations.addYourOwn\")}\n </button>\n </div>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-7 pb-7\">\n {error && (\n <div className=\"mb-3 rounded-md border border-red-500/20 bg-red-500/5 px-3 py-2 text-[12px] leading-relaxed text-red-600 dark:text-red-400\">\n {error}\n </div>\n )}\n <div className=\"grid gap-3 sm:grid-cols-2\">\n {filteredIntegrations.map((integration) => {\n const apiFallback = getMcpIntegrationApiFallback(integration);\n const connected = connectedUrls.has(\n compareUrl(integration.url),\n );\n const requiresHeaders = integration.authMode === \"headers\";\n const setupOnly =\n integration.connectionMode === \"manual\" ||\n integration.availability === \"provider-setup\" ||\n integration.availability === \"client-restricted\";\n return (\n <article\n key={integration.id}\n className=\"flex min-h-[128px] flex-col rounded-md border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20\"\n >\n <div className=\"flex items-center gap-3\">\n <IntegrationLogo\n name={integration.name}\n logoUrl={integration.logoUrl}\n />\n <div className=\"min-w-0\">\n <h3 className=\"truncate text-[13px] font-semibold text-foreground\">\n {integration.name}\n </h3>\n {integration.availability !== \"ready\" && (\n <span className=\"mt-0.5 inline-flex rounded-full border border-border/70 bg-muted/40 px-1.5 py-0.5 text-[9px] font-medium text-muted-foreground\">\n {integration.availability === \"beta\"\n ? t(\"mcpIntegrations.status.beta\")\n : integration.availability ===\n \"client-restricted\"\n ? t(\"mcpIntegrations.status.clientRestricted\")\n : t(\"mcpIntegrations.status.setupRequired\")}\n </span>\n )}\n <span className=\"ms-1 mt-0.5 inline-flex rounded-full border border-border/70 bg-muted/40 px-1.5 py-0.5 text-[9px] font-medium text-muted-foreground\">\n {integration.verification === \"verified\"\n ? t(\"mcpIntegrations.status.verified\")\n : integration.verification === \"restricted\"\n ? t(\"mcpIntegrations.status.restricted\")\n : t(\"mcpIntegrations.status.preflightOnly\")}\n </span>\n </div>\n </div>\n <p className=\"mt-1 line-clamp-2 flex-1 text-[12px] leading-relaxed text-muted-foreground\">\n {t(integration.descriptionKey)}\n </p>\n <div className=\"mt-3 flex items-center gap-2\">\n {connected ? (\n <button\n type=\"button\"\n disabled\n className=\"inline-flex h-8 flex-1 cursor-not-allowed items-center justify-center gap-1.5 rounded-md border border-border bg-muted px-2.5 text-[12px] font-medium text-muted-foreground opacity-70\"\n >\n {t(\"mcpIntegrations.connected\")}\n </button>\n ) : setupOnly ? (\n <>\n {apiFallback && (\n <button\n type=\"button\"\n onClick={() =>\n openAgentSettings(\n `secrets:${apiFallback.secretKey}`,\n )\n }\n className=\"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md bg-primary px-2.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\"\n >\n {t(\"mcpIntegrations.useApiToken\")}\n </button>\n )}\n <a\n href={integration.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-[12px] font-medium text-foreground hover:bg-accent\"\n >\n {t(\"mcpIntegrations.viewSetup\")}\n <IconExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </>\n ) : (\n <button\n type=\"button\"\n onClick={() => quickConnect(integration)}\n disabled={busy}\n aria-busy={quickBusyId === integration.id}\n className={cn(\n \"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md bg-primary px-2.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\",\n busy && \"cursor-not-allowed opacity-70\",\n )}\n >\n {quickBusyId === integration.id ? (\n <IconLoader2 className=\"h-3.5 w-3.5 animate-spin\" />\n ) : null}\n {integration.authMode === \"oauth\"\n ? t(\"mcpIntegrations.connectWithOAuth\")\n : requiresHeaders\n ? t(\"mcpIntegrations.configure\")\n : t(\"mcpIntegrations.connect\")}\n </button>\n )}\n {integration.docsUrl && (\n <Tooltip>\n <TooltipTrigger asChild>\n <a\n href={integration.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-accent hover:text-foreground\"\n aria-label={t(\"mcpIntegrations.docsLabel\", {\n name: integration.name,\n })}\n >\n <IconExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </TooltipTrigger>\n <TooltipContent>\n {t(\"mcpIntegrations.docsLabel\", {\n name: integration.name,\n })}\n </TooltipContent>\n </Tooltip>\n )}\n </div>\n </article>\n );\n })}\n </div>\n {filteredIntegrations.length === 0 && (\n <div className=\"rounded-md border border-dashed border-border p-6 text-center text-[12px] text-muted-foreground\">\n {t(\"mcpIntegrations.noMatches\")}\n </div>\n )}\n </div>\n </>\n ) : (\n <>\n <DialogHeader className=\"shrink-0 border-b border-border px-7 pb-5 pe-14 pt-6\">\n <button\n type=\"button\"\n onClick={() => {\n clearFeedback();\n setMode(\"catalog\");\n }}\n className={cn(\n \"mb-1 inline-flex w-fit items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground\",\n !showCatalog && \"hidden\",\n )}\n >\n <IconArrowLeft className=\"h-3 w-3 rtl:-scale-x-100\" />\n {t(\"mcpIntegrations.backToIntegrations\")}\n </button>\n <DialogTitle>\n {selected\n ? t(\"mcpIntegrations.configureTitle\", {\n name: selected.name,\n })\n : t(\"mcpIntegrations.customTitle\")}\n </DialogTitle>\n <DialogDescription>\n {selected\n ? selected.authMode === \"none\"\n ? t(\"mcpIntegrations.presetNoAuthDescription\")\n : t(\"mcpIntegrations.presetAuthDescription\")\n : t(\"mcpIntegrations.customDescription\")}\n </DialogDescription>\n </DialogHeader>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-7 py-5\">\n <div className=\"space-y-3\">\n {renderScopeSelector()}\n {selected?.setupNoteKey && (\n <div className=\"rounded-md border border-border bg-muted/40 px-3 py-2 text-[11px] leading-relaxed text-muted-foreground\">\n {t(selected.setupNoteKey)}\n </div>\n )}\n {selected?.authMode === \"oauth\" && (\n <div className=\"rounded-md border border-blue-500/20 bg-blue-500/5 px-3 py-2 text-[11px] leading-relaxed text-blue-700 dark:text-blue-300\">\n {t(\"mcpIntegrations.oauthNotice\")}\n </div>\n )}\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.serverName\")}\n </span>\n <input\n ref={inputRef}\n value={name}\n onChange={(event) => {\n setName(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.serverNamePlaceholder\")}\n />\n </label>\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.url\")}\n </span>\n <input\n value={url}\n onChange={(event) => {\n setUrl(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.urlPlaceholder\")}\n />\n </label>\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.fieldDescription\")}\n </span>\n <input\n value={description}\n onChange={(event) => {\n setDescription(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.descriptionPlaceholder\")}\n />\n </label>\n {selected?.authMode !== \"oauth\" && (\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.headers\")}\n </span>\n <textarea\n value={headersText}\n onChange={(event) => {\n setHeadersText(event.target.value);\n clearFeedback();\n }}\n rows={3}\n className=\"w-full resize-y rounded-md border border-border bg-background px-2.5 py-1.5 text-[12px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n style={{\n fontFamily:\n 'ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace',\n }}\n placeholder={\n selected?.headerPlaceholder ??\n t(\"mcpIntegrations.headersPlaceholder\")\n }\n />\n </label>\n )}\n {selected?.docsUrl && (\n <a\n href={selected.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-[11px] text-muted-foreground underline hover:text-foreground\"\n >\n {t(\"mcpIntegrations.openSetupDocs\")}\n <IconExternalLink className=\"h-3 w-3\" />\n </a>\n )}\n {testResult && (\n <div\n className={cn(\n \"flex items-start gap-1 rounded-md px-3 py-2 text-[11px] leading-snug\",\n testResult.ok\n ? \"bg-green-500/5 text-green-600 dark:text-green-400\"\n : \"bg-red-500/5 text-red-600 dark:text-red-400\",\n )}\n >\n {testResult.ok && (\n <IconCheck className=\"mt-0.5 h-3 w-3 shrink-0\" />\n )}\n <span className=\"min-w-0 break-words\">\n {testResult.message}\n </span>\n </div>\n )}\n {error && (\n <div className=\"break-words rounded-md bg-red-500/5 px-3 py-2 text-[11px] leading-snug text-red-600 dark:text-red-400\">\n {error}\n </div>\n )}\n </div>\n </div>\n <div className=\"flex shrink-0 items-center justify-between gap-2 border-t border-border px-7 py-4\">\n <button\n type=\"button\"\n onClick={runTest}\n disabled={!url.trim() || busy}\n className=\"rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40\"\n >\n {t(\"mcpIntegrations.test\")}\n </button>\n {!selected ? (\n <button\n type=\"button\"\n onClick={connectCustomWithOAuth}\n disabled={!name.trim() || !url.trim() || busy}\n aria-busy={busy}\n className=\"rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40\"\n >\n {busy && (\n <IconLoader2 className=\"me-1.5 inline h-3.5 w-3.5 animate-spin\" />\n )}\n {t(\"mcpIntegrations.connectWithOAuth\")}\n </button>\n ) : null}\n {selectedRequiresSetup ? (\n selected?.docsUrl ? (\n <a\n href={selected.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\"\n >\n {t(\"mcpIntegrations.viewSetup\")}\n <IconExternalLink className=\"h-3 w-3\" />\n </a>\n ) : null\n ) : selected?.authMode === \"oauth\" ? (\n <button\n type=\"button\"\n onClick={() => connectWithOAuth(selected)}\n disabled={!name.trim() || !url.trim() || busy}\n aria-busy={busy}\n className=\"inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:pointer-events-none disabled:opacity-40\"\n >\n {busy && <IconLoader2 className=\"h-3.5 w-3.5 animate-spin\" />}\n {t(\"mcpIntegrations.connectWithOAuth\")}\n </button>\n ) : (\n <button\n type=\"button\"\n onClick={submitForm}\n disabled={!name.trim() || !url.trim() || busy}\n className=\"inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:pointer-events-none disabled:opacity-40\"\n >\n {busy && <IconLoader2 className=\"h-3.5 w-3.5 animate-spin\" />}\n {t(\"mcpIntegrations.connect\")}\n </button>\n )}\n </div>\n </>\n )}\n </DialogContent>\n </Dialog>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"McpIntegrationDialog.js","sourceRoot":"","sources":["../../../src/client/resources/McpIntegrationDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,qBAAqB,EACrB,gCAAgC,EAChC,qBAAqB,EACrB,4BAA4B,EAC5B,yBAAyB,EACzB,6BAA6B,EAC7B,uBAAuB,EACvB,0BAA0B,EAC1B,+BAA+B,GAEhC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,oBAAoB,EACpB,w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I,IAAI,EAC7C,SAAS,EAAC,qNAAqN,aAE9N,IAAI,IAAI,KAAC,WAAW,IAAC,SAAS,EAAC,0BAA0B,GAAG,EAC5D,CAAC,CAAC,yBAAyB,CAAC,IACtB,CACV,IACG,IACL,CACJ,GACa,GACT,CACV,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconArrowLeft,\n IconCheck,\n IconExternalLink,\n IconLoader2,\n IconSearch,\n} from \"@tabler/icons-react\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\n\nimport { agentNativePath } from \"../api-path.js\";\nimport { openAgentSettings } from \"../CommandMenu.js\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"../components/ui/dialog.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { useT } from \"../i18n.js\";\nimport { cn } from \"../utils.js\";\nimport {\n buildMcpOAuthStartUrl,\n createMcpIntegrationFormDefaults,\n filterMcpIntegrations,\n getMcpIntegrationApiFallback,\n getDefaultMcpIntegrations,\n isCustomMcpIntegrationEnabled,\n navigateToMcpOAuthStart,\n resolveMcpIntegrationScope,\n shouldOfferMcpOrganizationScope,\n type DefaultMcpIntegration,\n} from \"./mcp-integration-catalog.js\";\nimport {\n formatMcpServerError,\n getMcpUrlValidationError,\n testMcpServerUrl,\n useMcpServers,\n type CreateMcpServerArgs,\n type McpServerScope,\n} from \"./use-mcp-servers.js\";\n\ntype DialogMode = \"catalog\" | \"form\";\n\nexport interface McpIntegrationDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n initialIntegrationId?: string | null;\n defaultScope: McpServerScope;\n canCreateOrgMcp: boolean;\n hasOrg: boolean;\n onCreateMcpServer: (args: CreateMcpServerArgs) => Promise<unknown>;\n onCreated?: () => void;\n integrations?: DefaultMcpIntegration[];\n}\n\ninterface TestResult {\n ok: boolean;\n message: string;\n}\n\nfunction IntegrationLogo({ name, logoUrl }: { name: string; logoUrl: string }) {\n const [loaded, setLoaded] = useState(false);\n const [loadFailed, setLoadFailed] = useState(false);\n\n useEffect(() => {\n setLoaded(false);\n setLoadFailed(false);\n }, [logoUrl]);\n\n return (\n <div className=\"relative flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-background text-[11px] font-semibold text-muted-foreground\">\n <span aria-hidden=\"true\" hidden={loaded}>\n {name.slice(0, 1)}\n </span>\n <img\n src={logoUrl}\n alt=\"\"\n loading=\"lazy\"\n decoding=\"async\"\n className=\"absolute inset-1 h-6 w-6 object-contain\"\n hidden={loadFailed}\n onLoad={() => {\n setLoadFailed(false);\n setLoaded(true);\n }}\n onError={() => {\n setLoadFailed(true);\n setLoaded(false);\n }}\n />\n </div>\n );\n}\n\nfunction parseHeaderLines(text: string): Record<string, string> | undefined {\n const out: Record<string, string> = {};\n for (const line of text.split(/\\r?\\n/)) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n const idx = trimmed.indexOf(\":\");\n if (idx <= 0) continue;\n const key = trimmed.slice(0, idx).trim();\n const value = trimmed.slice(idx + 1).trim();\n if (!key || !value) continue;\n out[key] = value;\n }\n return Object.keys(out).length > 0 ? out : undefined;\n}\n\nfunction compareUrl(value: string): string {\n try {\n const url = new URL(value.trim());\n url.hash = \"\";\n return url.toString().replace(/\\/+$/, \"\");\n } catch {\n return value.trim().replace(/\\/+$/, \"\");\n }\n}\n\nexport function McpIntegrationDialog({\n open,\n onOpenChange,\n initialIntegrationId = null,\n defaultScope,\n canCreateOrgMcp,\n hasOrg,\n onCreateMcpServer,\n onCreated,\n integrations,\n}: McpIntegrationDialogProps) {\n const t = useT();\n const [mode, setMode] = useState<DialogMode>(\"catalog\");\n const [query, setQuery] = useState(\"\");\n const [selected, setSelected] = useState<DefaultMcpIntegration | null>(null);\n const safeDefaultScope = resolveMcpIntegrationScope(\n defaultScope,\n hasOrg,\n canCreateOrgMcp,\n );\n const [scope, setScope] = useState<McpServerScope>(safeDefaultScope);\n const [name, setName] = useState(\"\");\n const [url, setUrl] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [headersText, setHeadersText] = useState(\"\");\n const [busy, setBusy] = useState(false);\n const [quickBusyId, setQuickBusyId] = useState<string | null>(null);\n const [error, setError] = useState<string | null>(null);\n const [testResult, setTestResult] = useState<TestResult | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const mcpServersQuery = useMcpServers();\n const defaultIntegrations = useMemo(\n () => integrations ?? getDefaultMcpIntegrations(),\n [integrations],\n );\n const customIntegrationEnabled = useMemo(\n () => isCustomMcpIntegrationEnabled(),\n [],\n );\n const showCatalog = defaultIntegrations.length > 0;\n\n const connectedUrls = useMemo(() => {\n const servers = [\n ...(mcpServersQuery.data?.user ?? []),\n ...(mcpServersQuery.data?.org ?? []),\n ];\n // A saved server is not necessarily a working connection. The settings\n // page reports failed and unknown health states separately, so only mark\n // catalog entries as connected after the health probe succeeds.\n return new Set(\n servers\n .filter((server) => server.status.state === \"connected\")\n .map((server) => compareUrl(server.url)),\n );\n }, [mcpServersQuery.data]);\n\n const filteredIntegrations = useMemo(\n () => filterMcpIntegrations(query, defaultIntegrations),\n [defaultIntegrations, query],\n );\n\n const selectedRequiresSetup = Boolean(\n selected &&\n (selected.connectionMode === \"manual\" ||\n selected.availability === \"provider-setup\" ||\n selected.availability === \"client-restricted\"),\n );\n\n useEffect(() => {\n if (!open) return;\n const initialIntegration = initialIntegrationId\n ? defaultIntegrations.find(\n (integration) => integration.id === initialIntegrationId,\n )\n : null;\n const initialDefaults =\n createMcpIntegrationFormDefaults(initialIntegration);\n setMode(initialIntegration || !showCatalog ? \"form\" : \"catalog\");\n setQuery(\"\");\n setSelected(initialIntegration ?? null);\n setScope(safeDefaultScope);\n setName(initialDefaults.name);\n setUrl(initialDefaults.url);\n setDescription(initialDefaults.description);\n setHeadersText(initialDefaults.headersText);\n setBusy(false);\n setQuickBusyId(null);\n setError(null);\n setTestResult(null);\n }, [\n defaultIntegrations,\n initialIntegrationId,\n open,\n safeDefaultScope,\n showCatalog,\n ]);\n\n useEffect(() => {\n if (open && mode === \"form\") {\n const timer = window.setTimeout(() => inputRef.current?.focus(), 60);\n return () => window.clearTimeout(timer);\n }\n }, [mode, open]);\n\n const clearFeedback = () => {\n setError(null);\n setTestResult(null);\n };\n\n const openForm = (integration?: DefaultMcpIntegration | null) => {\n const defaults = createMcpIntegrationFormDefaults(integration);\n setSelected(integration ?? null);\n setScope(safeDefaultScope);\n setName(defaults.name);\n setUrl(defaults.url);\n setDescription(defaults.description);\n setHeadersText(defaults.headersText);\n setError(null);\n setTestResult(null);\n setMode(\"form\");\n };\n\n const beginOAuth = (\n args: {\n name: string;\n url: string;\n description: string;\n },\n options?: { quickId?: string },\n ) => {\n const validationError = getMcpUrlValidationError(args.url);\n if (validationError) {\n setError(validationError);\n setTestResult(null);\n return;\n }\n setBusy(true);\n setQuickBusyId(options?.quickId ?? null);\n const returnUrl =\n typeof window === \"undefined\"\n ? \"/\"\n : window.location.pathname +\n window.location.search +\n window.location.hash;\n navigateToMcpOAuthStart(\n agentNativePath(\n buildMcpOAuthStartUrl({\n name: args.name,\n url: args.url,\n description: args.description,\n scope,\n returnUrl,\n }),\n ),\n );\n };\n\n const connectWithOAuth = (\n integration: DefaultMcpIntegration,\n options?: { quickId?: string },\n ) =>\n beginOAuth(\n {\n name: integration.name,\n url: integration.url,\n description: integration.description,\n },\n options,\n );\n\n const connectCustomWithOAuth = () => {\n if (!name.trim()) {\n setError(t(\"mcpIntegrations.serverNameRequired\"));\n return;\n }\n beginOAuth({\n name: name.trim(),\n url: url.trim(),\n description: description.trim(),\n });\n };\n\n const createServer = async (\n args: CreateMcpServerArgs,\n options?: { quickId?: string },\n ) => {\n const validationError = getMcpUrlValidationError(args.url);\n if (validationError) {\n setError(validationError);\n setTestResult(null);\n return;\n }\n\n if (options?.quickId) setQuickBusyId(options.quickId);\n setBusy(true);\n setError(null);\n try {\n await onCreateMcpServer(args);\n onOpenChange(false);\n onCreated?.();\n } catch (err) {\n setError(formatMcpServerError(err));\n } finally {\n setBusy(false);\n setQuickBusyId(null);\n }\n };\n\n const submitForm = () => {\n const trimmedName = name.trim();\n const trimmedUrl = url.trim();\n if (!trimmedName || !trimmedUrl || busy) return;\n void createServer({\n scope,\n name: trimmedName,\n url: trimmedUrl,\n headers: parseHeaderLines(headersText),\n description: description.trim() || undefined,\n });\n };\n\n const quickConnect = (integration: DefaultMcpIntegration) => {\n if (\n integration.connectionMode === \"manual\" ||\n integration.availability === \"provider-setup\"\n ) {\n return;\n }\n if (integration.authMode === \"oauth\") {\n connectWithOAuth(integration, { quickId: integration.id });\n return;\n }\n if (integration.authMode === \"headers\") {\n openForm(integration);\n return;\n }\n void createServer(\n {\n scope: safeDefaultScope,\n name: integration.name,\n url: integration.url,\n description: integration.description,\n },\n { quickId: integration.id },\n );\n };\n\n const runTest = async () => {\n const trimmedUrl = url.trim();\n if (!trimmedUrl || busy) return;\n const validationError = getMcpUrlValidationError(trimmedUrl);\n if (validationError) {\n setTestResult({ ok: false, message: validationError });\n setError(null);\n return;\n }\n setBusy(true);\n setError(null);\n setTestResult(null);\n try {\n const res = await testMcpServerUrl(\n trimmedUrl,\n parseHeaderLines(headersText),\n );\n setTestResult(\n res.ok\n ? {\n ok: true,\n message: t(\"mcpIntegrations.toolsAvailable\", {\n count: res.toolCount ?? 0,\n }),\n }\n : { ok: false, message: res.error ?? t(\"mcpIntegrations.failed\") },\n );\n } catch (err) {\n setTestResult({ ok: false, message: formatMcpServerError(err) });\n } finally {\n setBusy(false);\n }\n };\n\n const renderScopeSelector = () => {\n if (!shouldOfferMcpOrganizationScope(hasOrg, canCreateOrgMcp)) return null;\n\n return (\n <div className=\"flex gap-1 rounded-md border border-border bg-background p-0.5\">\n <button\n type=\"button\"\n onClick={() => setScope(\"user\")}\n className={cn(\n \"flex-1 rounded px-2 py-1.5 text-[11px] font-medium\",\n scope === \"user\"\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:text-foreground\",\n )}\n >\n {t(\"mcpIntegrations.personal\")}\n </button>\n <button\n type=\"button\"\n onClick={() => setScope(\"org\")}\n className={cn(\n \"flex-1 rounded px-2 py-1.5 text-[11px] font-medium\",\n scope === \"org\"\n ? \"bg-accent text-foreground\"\n : \"text-muted-foreground hover:text-foreground\",\n )}\n >\n {t(\"mcpIntegrations.organization\")}\n </button>\n </div>\n );\n };\n\n if (!showCatalog && !customIntegrationEnabled) return null;\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className=\"flex max-h-[min(820px,calc(100vh-32px))] w-[calc(100vw-24px)] max-w-[760px] flex-col gap-0 p-0 sm:w-[min(760px,calc(100vw-48px))]\">\n {mode === \"catalog\" ? (\n <>\n <DialogHeader className=\"shrink-0 px-7 pb-5 pe-14 pt-6\">\n <DialogTitle>{t(\"mcpIntegrations.title\")}</DialogTitle>\n <DialogDescription>\n {t(\"mcpIntegrations.description\", {\n count: defaultIntegrations.length,\n })}\n </DialogDescription>\n </DialogHeader>\n <div className=\"flex shrink-0 flex-col gap-3 px-7 pb-5 sm:flex-row\">\n <label className=\"relative min-w-0 flex-1\">\n <IconSearch className=\"pointer-events-none absolute start-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground\" />\n <input\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n className=\"h-9 w-full rounded-md border border-border bg-background pe-3 ps-8 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.searchPlaceholder\")}\n />\n </label>\n <button\n type=\"button\"\n onClick={() => openForm(null)}\n className={cn(\n \"inline-flex h-9 items-center justify-center gap-1.5 rounded-md border border-border bg-background px-3 text-[12px] font-medium text-foreground hover:bg-accent\",\n !customIntegrationEnabled && \"hidden\",\n )}\n >\n {t(\"mcpIntegrations.addYourOwn\")}\n </button>\n </div>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-7 pb-7\">\n {error && (\n <div className=\"mb-3 rounded-md border border-red-500/20 bg-red-500/5 px-3 py-2 text-[12px] leading-relaxed text-red-600 dark:text-red-400\">\n {error}\n </div>\n )}\n <div className=\"grid gap-3 sm:grid-cols-2\">\n {filteredIntegrations.map((integration) => {\n const apiFallback = getMcpIntegrationApiFallback(integration);\n const connected = connectedUrls.has(\n compareUrl(integration.url),\n );\n const requiresHeaders = integration.authMode === \"headers\";\n const setupOnly =\n integration.connectionMode === \"manual\" ||\n integration.availability === \"provider-setup\" ||\n integration.availability === \"client-restricted\";\n return (\n <article\n key={integration.id}\n className=\"flex min-h-[128px] flex-col rounded-md border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20\"\n >\n <div className=\"flex items-center gap-3\">\n <IntegrationLogo\n name={integration.name}\n logoUrl={integration.logoUrl}\n />\n <div className=\"min-w-0\">\n <h3 className=\"truncate text-[13px] font-semibold text-foreground\">\n {integration.name}\n </h3>\n {integration.availability !== \"ready\" && (\n <span className=\"mt-0.5 inline-flex rounded-full border border-border/70 bg-muted/40 px-1.5 py-0.5 text-[9px] font-medium text-muted-foreground\">\n {integration.availability === \"beta\"\n ? t(\"mcpIntegrations.status.beta\")\n : integration.availability ===\n \"client-restricted\"\n ? t(\"mcpIntegrations.status.clientRestricted\")\n : t(\"mcpIntegrations.status.setupRequired\")}\n </span>\n )}\n <span className=\"ms-1 mt-0.5 inline-flex rounded-full border border-border/70 bg-muted/40 px-1.5 py-0.5 text-[9px] font-medium text-muted-foreground\">\n {integration.verification === \"verified\"\n ? t(\"mcpIntegrations.status.verified\")\n : integration.verification === \"restricted\"\n ? t(\"mcpIntegrations.status.restricted\")\n : t(\"mcpIntegrations.status.preflightOnly\")}\n </span>\n </div>\n </div>\n <p className=\"mt-1 line-clamp-2 flex-1 text-[12px] leading-relaxed text-muted-foreground\">\n {t(integration.descriptionKey)}\n </p>\n <div className=\"mt-3 flex items-center gap-2\">\n {connected ? (\n <button\n type=\"button\"\n disabled\n className=\"inline-flex h-8 flex-1 cursor-not-allowed items-center justify-center gap-1.5 rounded-md border border-border bg-muted px-2.5 text-[12px] font-medium text-muted-foreground opacity-70\"\n >\n {t(\"mcpIntegrations.connected\")}\n </button>\n ) : setupOnly ? (\n <>\n {apiFallback && (\n <button\n type=\"button\"\n onClick={() =>\n openAgentSettings(\n `secrets:${apiFallback.secretKey}`,\n )\n }\n className=\"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md bg-primary px-2.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\"\n >\n {t(\"mcpIntegrations.useApiToken\")}\n </button>\n )}\n <a\n href={integration.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-[12px] font-medium text-foreground hover:bg-accent\"\n >\n {t(\"mcpIntegrations.viewSetup\")}\n <IconExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </>\n ) : (\n <button\n type=\"button\"\n onClick={() => quickConnect(integration)}\n disabled={busy}\n aria-busy={quickBusyId === integration.id}\n className={cn(\n \"inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md bg-primary px-2.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\",\n busy && \"cursor-not-allowed opacity-70\",\n )}\n >\n {quickBusyId === integration.id ? (\n <IconLoader2 className=\"h-3.5 w-3.5 animate-spin\" />\n ) : null}\n {integration.authMode === \"oauth\"\n ? t(\"mcpIntegrations.connectWithOAuth\")\n : requiresHeaders\n ? t(\"mcpIntegrations.configure\")\n : t(\"mcpIntegrations.connect\")}\n </button>\n )}\n {integration.docsUrl && (\n <Tooltip>\n <TooltipTrigger asChild>\n <a\n href={integration.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-accent hover:text-foreground\"\n aria-label={t(\"mcpIntegrations.docsLabel\", {\n name: integration.name,\n })}\n >\n <IconExternalLink className=\"h-3.5 w-3.5\" />\n </a>\n </TooltipTrigger>\n <TooltipContent>\n {t(\"mcpIntegrations.docsLabel\", {\n name: integration.name,\n })}\n </TooltipContent>\n </Tooltip>\n )}\n </div>\n </article>\n );\n })}\n </div>\n {filteredIntegrations.length === 0 && (\n <div className=\"rounded-md border border-dashed border-border p-6 text-center text-[12px] text-muted-foreground\">\n {t(\"mcpIntegrations.noMatches\")}\n </div>\n )}\n </div>\n </>\n ) : (\n <>\n <DialogHeader className=\"shrink-0 border-b border-border px-7 pb-5 pe-14 pt-6\">\n <button\n type=\"button\"\n onClick={() => {\n clearFeedback();\n setMode(\"catalog\");\n }}\n className={cn(\n \"mb-1 inline-flex w-fit items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground\",\n !showCatalog && \"hidden\",\n )}\n >\n <IconArrowLeft className=\"h-3 w-3 rtl:-scale-x-100\" />\n {t(\"mcpIntegrations.backToIntegrations\")}\n </button>\n <DialogTitle>\n {selected\n ? t(\"mcpIntegrations.configureTitle\", {\n name: selected.name,\n })\n : t(\"mcpIntegrations.customTitle\")}\n </DialogTitle>\n <DialogDescription>\n {selected\n ? selected.authMode === \"none\"\n ? t(\"mcpIntegrations.presetNoAuthDescription\")\n : t(\"mcpIntegrations.presetAuthDescription\")\n : t(\"mcpIntegrations.customDescription\")}\n </DialogDescription>\n </DialogHeader>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-7 py-5\">\n <div className=\"space-y-3\">\n {renderScopeSelector()}\n {selected?.setupNoteKey && (\n <div className=\"rounded-md border border-border bg-muted/40 px-3 py-2 text-[11px] leading-relaxed text-muted-foreground\">\n {t(selected.setupNoteKey)}\n </div>\n )}\n {selected?.authMode === \"oauth\" && (\n <div className=\"rounded-md border border-blue-500/20 bg-blue-500/5 px-3 py-2 text-[11px] leading-relaxed text-blue-700 dark:text-blue-300\">\n {t(\"mcpIntegrations.oauthNotice\")}\n </div>\n )}\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.serverName\")}\n </span>\n <input\n ref={inputRef}\n value={name}\n onChange={(event) => {\n setName(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.serverNamePlaceholder\")}\n />\n </label>\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.url\")}\n </span>\n <input\n value={url}\n onChange={(event) => {\n setUrl(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.urlPlaceholder\")}\n />\n </label>\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.fieldDescription\")}\n </span>\n <input\n value={description}\n onChange={(event) => {\n setDescription(event.target.value);\n clearFeedback();\n }}\n className=\"w-full rounded-md border border-border bg-background px-2.5 py-1.5 text-[13px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n placeholder={t(\"mcpIntegrations.descriptionPlaceholder\")}\n />\n </label>\n {selected?.authMode !== \"oauth\" && (\n <label className=\"block\">\n <span className=\"mb-1 block text-[10px] font-medium text-muted-foreground\">\n {t(\"mcpIntegrations.headers\")}\n </span>\n <textarea\n value={headersText}\n onChange={(event) => {\n setHeadersText(event.target.value);\n clearFeedback();\n }}\n rows={3}\n className=\"w-full resize-y rounded-md border border-border bg-background px-2.5 py-1.5 text-[12px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-ring\"\n style={{\n fontFamily:\n 'ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace',\n }}\n placeholder={\n selected?.headerPlaceholder ??\n t(\"mcpIntegrations.headersPlaceholder\")\n }\n />\n </label>\n )}\n {selected?.docsUrl && (\n <a\n href={selected.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-[11px] text-muted-foreground underline hover:text-foreground\"\n >\n {t(\"mcpIntegrations.openSetupDocs\")}\n <IconExternalLink className=\"h-3 w-3\" />\n </a>\n )}\n {testResult && (\n <div\n className={cn(\n \"flex items-start gap-1 rounded-md px-3 py-2 text-[11px] leading-snug\",\n testResult.ok\n ? \"bg-green-500/5 text-green-600 dark:text-green-400\"\n : \"bg-red-500/5 text-red-600 dark:text-red-400\",\n )}\n >\n {testResult.ok && (\n <IconCheck className=\"mt-0.5 h-3 w-3 shrink-0\" />\n )}\n <span className=\"min-w-0 break-words\">\n {testResult.message}\n </span>\n </div>\n )}\n {error && (\n <div className=\"break-words rounded-md bg-red-500/5 px-3 py-2 text-[11px] leading-snug text-red-600 dark:text-red-400\">\n {error}\n </div>\n )}\n </div>\n </div>\n <div className=\"flex shrink-0 items-center justify-between gap-2 border-t border-border px-7 py-4\">\n {!selectedRequiresSetup && (\n <button\n type=\"button\"\n onClick={runTest}\n disabled={!url.trim() || busy}\n className=\"rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40\"\n >\n {t(\"mcpIntegrations.test\")}\n </button>\n )}\n {!selected ? (\n <button\n type=\"button\"\n onClick={connectCustomWithOAuth}\n disabled={!name.trim() || !url.trim() || busy}\n aria-busy={busy}\n className=\"rounded-md border border-border bg-background px-3 py-1.5 text-[12px] font-medium text-foreground hover:bg-accent disabled:pointer-events-none disabled:opacity-40\"\n >\n {busy && (\n <IconLoader2 className=\"me-1.5 inline h-3.5 w-3.5 animate-spin\" />\n )}\n {t(\"mcpIntegrations.connectWithOAuth\")}\n </button>\n ) : null}\n {selectedRequiresSetup ? (\n selected?.docsUrl ? (\n <a\n href={selected.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"ms-auto inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90\"\n >\n {t(\"mcpIntegrations.viewSetup\")}\n <IconExternalLink className=\"h-3 w-3\" />\n </a>\n ) : null\n ) : selected?.authMode === \"oauth\" ? (\n <button\n type=\"button\"\n onClick={() => connectWithOAuth(selected)}\n disabled={!name.trim() || !url.trim() || busy}\n aria-busy={busy}\n className=\"inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:pointer-events-none disabled:opacity-40\"\n >\n {busy && <IconLoader2 className=\"h-3.5 w-3.5 animate-spin\" />}\n {t(\"mcpIntegrations.connectWithOAuth\")}\n </button>\n ) : (\n <button\n type=\"button\"\n onClick={submitForm}\n disabled={!name.trim() || !url.trim() || busy}\n className=\"inline-flex min-w-[92px] items-center justify-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:pointer-events-none disabled:opacity-40\"\n >\n {busy && <IconLoader2 className=\"h-3.5 w-3.5 animate-spin\" />}\n {t(\"mcpIntegrations.connect\")}\n </button>\n )}\n </div>\n </>\n )}\n </DialogContent>\n </Dialog>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sse-event-processor.d.ts","sourceRoot":"","sources":["../../src/client/sse-event-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAK1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAQtE,MAAM,MAAM,WAAW,GACnB;IAAE,IAA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E,KAAK,EAAE,MAAM,CAAA;CAAE,EAClC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,IAAI,EAC1C,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EAC7B,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,IAAI,CAAC,CAkLf"}
|
|
@@ -90,7 +90,9 @@ export function sseInFlightWorkDelta(ev) {
|
|
|
90
90
|
if (ev.type === "agent_call") {
|
|
91
91
|
if (ev.status === "start")
|
|
92
92
|
return 1;
|
|
93
|
-
if (ev.status === "done" ||
|
|
93
|
+
if (ev.status === "done" ||
|
|
94
|
+
ev.status === "pending" ||
|
|
95
|
+
ev.status === "error")
|
|
94
96
|
return -1;
|
|
95
97
|
}
|
|
96
98
|
return 0;
|
|
@@ -1071,14 +1073,21 @@ export function processEvent(ev, content, toolCallCounter, tabId, state) {
|
|
|
1071
1073
|
activity: true,
|
|
1072
1074
|
});
|
|
1073
1075
|
}
|
|
1074
|
-
else if (ev.status === "done" ||
|
|
1076
|
+
else if (ev.status === "done" ||
|
|
1077
|
+
ev.status === "pending" ||
|
|
1078
|
+
ev.status === "error") {
|
|
1075
1079
|
for (let i = content.length - 1; i >= 0; i--) {
|
|
1076
1080
|
const part = content[i];
|
|
1077
1081
|
if (part.type === "tool-call" &&
|
|
1078
1082
|
part.toolName === `agent:${agentName}` &&
|
|
1079
1083
|
(!ev.agentCallId || part.toolCallId === ev.agentCallId) &&
|
|
1080
1084
|
part.result === undefined) {
|
|
1081
|
-
part.result =
|
|
1085
|
+
part.result =
|
|
1086
|
+
ev.status === "error"
|
|
1087
|
+
? "Error calling agent"
|
|
1088
|
+
: ev.status === "pending"
|
|
1089
|
+
? "Remote agent task is still pending"
|
|
1090
|
+
: "Done";
|
|
1082
1091
|
part.structuredMeta = {
|
|
1083
1092
|
...part.structuredMeta,
|
|
1084
1093
|
...(ev.durationMs != null
|