@agent-native/core 0.129.2 → 0.130.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 +72 -0
- package/corpus/core/docs/content/cloneable-saas.mdx +114 -0
- package/corpus/core/docs/content/creating-templates.mdx +28 -2
- package/corpus/core/docs/content/syncing-template-changes.mdx +7 -0
- package/corpus/core/docs/content/template-clips-developers.mdx +12 -5
- package/corpus/core/docs/content/template-dispatch-developers.mdx +1 -1
- package/corpus/core/docs/content/template-dispatch.mdx +1 -1
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/action-ui.ts +1 -0
- package/corpus/core/src/action.ts +5 -1
- package/corpus/core/src/agent/engine/ai-sdk-engine.ts +15 -5
- package/corpus/core/src/agent/harness/runner.ts +5 -0
- package/corpus/core/src/agent/production-agent.ts +33 -0
- package/corpus/core/src/agent/run-loop-with-resume.ts +5 -0
- package/corpus/core/src/agent/run-manager.ts +126 -1
- package/corpus/core/src/agent/thread-data-builder.ts +47 -2
- package/corpus/core/src/agent/types.ts +2 -0
- package/corpus/core/src/chat-threads/store.ts +4 -5
- package/corpus/core/src/cli/create.ts +1139 -65
- package/corpus/core/src/cli/design-connect.ts +3 -7
- package/corpus/core/src/cli/index.ts +5 -3
- package/corpus/core/src/cli/skills-content/design-visual-edit-skill.ts +83 -47
- package/corpus/core/src/client/AssistantChat.tsx +27 -16
- package/corpus/core/src/client/agent-chat-adapter.ts +24 -0
- package/corpus/core/src/client/blocks/library/wireframe-kit.tsx +17 -2
- package/corpus/core/src/client/chat/index.ts +1 -0
- package/corpus/core/src/client/chat/message-components.tsx +104 -1
- package/corpus/core/src/client/chat/run-recovery.tsx +15 -3
- package/corpus/core/src/client/chat/widgets/DataTableWidget.tsx +10 -29
- package/corpus/core/src/client/chat/widgets/WorkspaceFileWidget.tsx +71 -0
- package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +22 -0
- package/corpus/core/src/client/chat/widgets/workspace-file-result.ts +49 -0
- package/corpus/core/src/client/embed-auth.ts +2 -0
- package/corpus/core/src/client/org/InvitationBanner.tsx +14 -1
- package/corpus/core/src/client/org/OrgSwitcher.tsx +23 -0
- package/corpus/core/src/client/org/TeamPage.tsx +130 -0
- package/corpus/core/src/client/org/WorkspaceNotice.tsx +85 -0
- package/corpus/core/src/client/org/hooks.ts +14 -0
- package/corpus/core/src/client/org/index.ts +2 -0
- package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +27 -40
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +134 -51
- package/corpus/core/src/client/resources/mcp-integration-catalog.ts +7 -0
- package/corpus/core/src/client/resources/use-resources.ts +6 -0
- package/corpus/core/src/client/use-action.ts +3 -1
- package/corpus/core/src/client/widgets/index.ts +1 -0
- package/corpus/core/src/coding-tools/run-code.ts +2 -1
- package/corpus/core/src/db/client.ts +28 -4
- package/corpus/core/src/deploy/build.ts +31 -3
- package/corpus/core/src/eject/remote-mcp-presets.ts +1 -1
- package/corpus/core/src/index.browser.ts +1 -0
- package/corpus/core/src/index.ts +1 -0
- package/corpus/core/src/integrations/google-docs-poller.ts +3 -0
- package/corpus/core/src/integrations/webhook-handler.ts +28 -11
- package/corpus/core/src/jobs/scheduler.ts +4 -0
- package/corpus/core/src/localization/default-messages.ts +3 -2
- package/corpus/core/src/observability/traces.ts +48 -12
- package/corpus/core/src/org/handlers.ts +52 -1
- package/corpus/core/src/org/migrations.ts +4 -0
- package/corpus/core/src/org/plugin.ts +14 -0
- package/corpus/core/src/org/schema.ts +1 -0
- package/corpus/core/src/org/types.ts +8 -0
- package/corpus/core/src/org/workspace-url.ts +74 -0
- package/corpus/core/src/resources/handlers.ts +35 -5
- package/corpus/core/src/scripts/runner.ts +183 -5
- package/corpus/core/src/server/action-routes.ts +32 -2
- package/corpus/core/src/server/agent-chat-plugin.ts +29 -0
- package/corpus/core/src/server/agent-teams.ts +10 -1
- package/corpus/core/src/server/auth.ts +33 -7
- package/corpus/core/src/server/embed-route.ts +9 -0
- package/corpus/core/src/server/embed-session.ts +62 -3
- package/corpus/core/src/server/open-route.ts +20 -6
- package/corpus/core/src/server/prompts/framework-core-compact.ts +1 -1
- package/corpus/core/src/server/prompts/framework-core.ts +1 -0
- package/corpus/core/src/server/request-context.ts +36 -1
- package/corpus/core/src/shared/embed-auth.ts +1 -0
- package/corpus/core/src/shared/html-document.ts +115 -0
- package/corpus/core/src/shared/index.ts +1 -0
- package/corpus/core/src/sharing/access.ts +8 -1
- package/corpus/core/src/sharing/registry.ts +11 -2
- package/corpus/core/src/workspace-files/actions.ts +100 -0
- package/corpus/core/src/workspace-files/tool.ts +4 -0
- package/corpus/templates/analytics/.agents/skills/analysis-workspace/SKILL.md +4 -0
- package/corpus/templates/analytics/.agents/skills/hubspot/SKILL.md +9 -1
- package/corpus/templates/analytics/AGENTS.md +17 -24
- package/corpus/templates/analytics/actions/data-source-status.ts +11 -1
- package/corpus/templates/analytics/app/i18n-data.ts +34 -0
- package/corpus/templates/analytics/app/lib/data-source-status.ts +86 -0
- package/corpus/templates/analytics/app/lib/native-mcp-exclusions.ts +9 -0
- package/corpus/templates/analytics/app/pages/DataSources.tsx +184 -20
- package/corpus/templates/analytics/changelog/2026-07-28-native-analytics-data-sources-no-longer-show-duplicate-mc.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-exports-now-appear-in-chat-with-a-direct-download-instead-of.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-queued-chat-prompts-no-longer-resend-after-analytics-navigat.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-scheduled-dashboard-emails-load-every-panel-reliably-without.md +6 -0
- package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +6 -3
- package/corpus/templates/analytics/server/lib/credential-keys.ts +1 -1
- package/corpus/templates/analytics/server/lib/hubspot.ts +1 -1
- package/corpus/templates/analytics/server/lib/provider-credentials.ts +55 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +123 -27
- package/corpus/templates/analytics/server/routes/[...page].get.ts +2 -7
- package/corpus/templates/analytics/vite.config.ts +7 -0
- package/corpus/templates/brain/actions/list-connection-providers.ts +100 -2
- package/corpus/templates/brain/app/lib/brain.ts +10 -0
- package/corpus/templates/brain/app/routes/sources.tsx +15 -4
- package/corpus/templates/brain/changelog/2026-07-29-brain-automatically-retries-failed-source-syncs-and-guides-y.md +6 -0
- package/corpus/templates/brain/jobs/process-ingest-queue.ts +13 -0
- package/corpus/templates/brain/server/jobs/sync-sources.ts +27 -22
- package/corpus/templates/brain/server/plugins/agent-chat.ts +2 -1
- package/corpus/templates/brain/server/routes/api/brain/queue/run.post.ts +7 -1
- package/corpus/templates/clips/AGENTS.md +1 -1
- package/corpus/templates/clips/actions/create-recording-agent-link.ts +11 -1
- package/corpus/templates/clips/actions/update-comment.ts +68 -0
- package/corpus/templates/clips/app/components/editor/editor-layout.tsx +0 -1
- package/corpus/templates/clips/app/components/player/comments-panel.tsx +221 -65
- package/corpus/templates/clips/app/components/player/video-player.tsx +101 -27
- package/corpus/templates/clips/app/i18n/en-US.ts +2 -1
- package/corpus/templates/clips/app/routes/bug-report.done.tsx +48 -27
- package/corpus/templates/clips/app/routes/bug-report.tsx +43 -4
- package/corpus/templates/clips/app/routes/record.tsx +2 -0
- package/corpus/templates/clips/changelog/2026-07-29-clip-playback-now-recovers-instead-of-getting-stuck-when-a-b.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-comments-can-now-be-edited-after-posting.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-download-actions-now-use-a-shorter-clearer-label.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-embedded-bug-reports-now-return-a-temporary-agent-readable.md +6 -0
- package/corpus/templates/clips/shared/bug-report.ts +99 -0
- package/corpus/templates/content/actions/_content-database-personal-view.ts +7 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +5 -2
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +20 -8
- package/corpus/templates/content/changelog/2026-07-29-missing-databases-no-longer-trigger-repeated-personal-view-e.md +6 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +83 -47
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +474 -55
- package/corpus/templates/design/.generated/bridge/embedded-wheel.generated.ts +3 -0
- package/corpus/templates/design/.generated/bridge/hit-test.generated.ts +18 -1
- package/corpus/templates/design/.generated/bridge/source-location.generated.ts +348 -0
- package/corpus/templates/design/actions/add-localhost-screens.ts +2 -7
- package/corpus/templates/design/actions/apply-visual-edit.ts +7 -1
- package/corpus/templates/design/actions/connect-localhost.ts +5 -9
- package/corpus/templates/design/actions/create-component.ts +16 -13
- package/corpus/templates/design/actions/grant-localhost-write-consent.ts +2 -7
- package/corpus/templates/design/actions/list-design-source-capabilities.ts +4 -7
- package/corpus/templates/design/actions/list-local-files.ts +26 -50
- package/corpus/templates/design/actions/list-localhost-connections.ts +2 -7
- package/corpus/templates/design/actions/migrate-board-objects-to-file.ts +2 -2
- package/corpus/templates/design/actions/open-visual-edit.ts +234 -135
- package/corpus/templates/design/actions/read-local-file.ts +26 -50
- package/corpus/templates/design/actions/request-localhost-write-consent.ts +2 -7
- package/corpus/templates/design/actions/write-local-file.ts +31 -73
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +307 -133
- package/corpus/templates/design/app/components/design/EditPanel.tsx +94 -22
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +137 -60
- package/corpus/templates/design/app/components/design/ResponsiveInteractBar.tsx +75 -14
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +755 -97
- package/corpus/templates/design/app/components/design/bridge/embedded-wheel.bridge.ts +8 -0
- package/corpus/templates/design/app/components/design/bridge/hit-test.bridge.ts +24 -1
- package/corpus/templates/design/app/components/design/bridge/source-location.bridge.ts +530 -0
- package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbenchLoader.tsx +278 -0
- package/corpus/templates/design/app/components/design/code-workbench/editor/MonacoHost.tsx +32 -12
- package/corpus/templates/design/app/components/design/code-workbench/editor/monaco-setup.ts +14 -3
- package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +87 -24
- package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +36 -0
- package/corpus/templates/design/app/components/design/code-workbench/store.tsx +2 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/localhost-provider.ts +48 -8
- package/corpus/templates/design/app/components/design/design-canvas/content-size-report.ts +3 -13
- package/corpus/templates/design/app/components/design/design-canvas/embedded-frame.ts +4 -2
- package/corpus/templates/design/app/components/design/design-canvas/hit-test.ts +3 -13
- package/corpus/templates/design/app/components/design/edit-panel/element-classification.ts +3 -1
- package/corpus/templates/design/app/components/design/edit-panel/inspect-code-source.ts +93 -0
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +4 -2
- package/corpus/templates/design/app/components/design/multi-screen/cross-screen-drop.ts +35 -0
- package/corpus/templates/design/app/components/design/multi-screen/iframe-targeting.ts +24 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +9 -0
- package/corpus/templates/design/app/components/design/types.ts +29 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +7 -4
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +3 -0
- package/corpus/templates/design/app/i18n-data.ts +153 -46
- package/corpus/templates/design/app/i18n-responsive-interact.ts +12 -12
- package/corpus/templates/design/app/lib/design-editor-route.ts +23 -0
- package/corpus/templates/design/app/pages/VisualEdit.tsx +19 -6
- package/corpus/templates/design/app/pages/design-editor/action-error.ts +19 -0
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +29 -0
- package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +6 -0
- package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +277 -15
- package/corpus/templates/design/app/pages/design-editor/editor-state.ts +75 -9
- package/corpus/templates/design/app/pages/design-editor/layer-state-scope.ts +28 -0
- package/corpus/templates/design/app/pages/design-editor/live-screen-layer-drop.ts +41 -0
- package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +496 -41
- package/corpus/templates/design/app/pages/design-editor/pending-live-edit-unload-guard.ts +27 -0
- package/corpus/templates/design/app/pages/design-editor/pending-structure-verification.ts +10 -0
- package/corpus/templates/design/app/pages/design-editor/react-semantic-handoff.ts +168 -9
- package/corpus/templates/design/app/pages/design-editor/responsive-interact.ts +41 -3
- package/corpus/templates/design/app/pages/design-editor/screen-command-utils.ts +5 -0
- package/corpus/templates/design/app/pages/design-editor/selection-state.ts +42 -13
- package/corpus/templates/design/app/pages/design-editor/source-location.ts +180 -0
- package/corpus/templates/design/app/pages/design-editor/tool-state.ts +17 -0
- package/corpus/templates/design/app/public-routes.ts +1 -0
- package/corpus/templates/design/app/routes/visual-edit.$id.tsx +15 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-is-easier-to-find-and-named-screens-open-dir.md +1 -1
- package/corpus/templates/design/changelog/2026-07-28-deleting-a-selected-element-now-removes-it-from-the-live-pre.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-deleting-an-element-on-a-connected-localhost-screen-now-queu.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-interact-mode-now-shows-a-responsive-device-preview-with-pre.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-layer-hide-and-lock-now-apply-to-the-live-preview-instead-of.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-layers-panel-selections-on-a-connected-localhost-screen-can-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-locked-layers-now-show-a-subtle-dashed-outline-in-the-live-p.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-the-apply-design-updates-button-now-counts-pending-live-text.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-the-design-canvas-no-longer-stalls-on-a-render-loop-while-a-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-visual-edit-on-a-local-dev-server-no-longer-requires-signing.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-visual-edits-on-a-react-19-app-no-longer-report-a-source-lin.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-an-edit-that-cannot-be-written-to-source-now-names-the-reaso.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-applying-a-primitive-dropped-onto-a-connected-localhost-scre.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-changing-a-style-in-the-inspector-now-updates-a-connected-lo.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-choosing-edit-or-annotate-from-a-focused-screen-now-returns-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-concurrent-source-edits-now-return-a-clear-conflict-response.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-creating-a-component-from-an-element-that-repeats-in-the-sou.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-deleting-an-element-you-just-dropped-onto-a-live-screen-no-l.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-dragging-a-layer-across-screens-no-longer-dies-when-the-poin.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-dragging-an-element-from-a-stored-screen-into-a-live-localho.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-drawing-a-box-on-the-canvas-and-dragging-it-into-a-connected.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-fixed-a-loading-screen-flicker-when-reopening-designs-with-a.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-interact-mode-has-edit-and-annotate-buttons-again-so-you-can.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-layer-groups-can-be-dropped-onto-live-localhost-screens.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-localhost-source-errors-now-say-what-actually-went-wrong-whi.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-opening-or-refreshing-a-live-localhost-screen-in-single-scre.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-redo-after-undoing-a-drop-onto-a-live-screen-puts-the-elemen.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-shapes-can-be-drawn-directly-onto-live-localhost-screens.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-shapes-drawn-on-the-canvas-board-now-appear-immediately-inst.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-style-edits-on-a-running-localhost-screen-now-preview-live-a.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-the-apply-design-updates-control-now-appears-as-a-clean-conn.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-visual-edits-on-a-mapped-component-instance-now-tell-the-age.md +6 -0
- package/corpus/templates/design/server/lib/design-data-access.ts +21 -7
- package/corpus/templates/design/server/lib/localhost-connection.ts +240 -0
- package/corpus/templates/design/server/routes/[...page].get.ts +2 -5
- package/corpus/templates/design/server/source-workspace.ts +2 -0
- package/corpus/templates/design/shared/code-layer.ts +43 -0
- package/corpus/templates/design/shared/html-content.ts +26 -0
- package/corpus/templates/design/shared/html-integrity.ts +21 -1
- package/corpus/templates/design/shared/local-jsx-visual-edit.ts +15 -0
- package/corpus/templates/design/shared/source-mode.ts +76 -0
- package/corpus/templates/dispatch/changelog/2026-07-29-workspace-members-without-admin-access-now-see-a-clear-permi.md +6 -0
- package/corpus/templates/dispatch/server/lib/usage-metrics.ts +2 -1
- package/corpus/templates/plan/app/lib/plan-annotation-runtime.ts +3 -4
- package/corpus/templates/plan/server/routes/[...page].get.ts +2 -5
- package/corpus/templates/slides/actions/patch-deck.ts +29 -17
- package/corpus/toolkit/CHANGELOG.md +6 -0
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/composer/ComposerPlusMenu.tsx +3 -2
- package/dist/action-ui.d.ts +1 -0
- package/dist/action-ui.d.ts.map +1 -1
- package/dist/action-ui.js +1 -0
- package/dist/action-ui.js.map +1 -1
- package/dist/action.d.ts +5 -1
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.js +13 -5
- package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
- package/dist/agent/harness/runner.d.ts.map +1 -1
- package/dist/agent/harness/runner.js +5 -0
- package/dist/agent/harness/runner.js.map +1 -1
- package/dist/agent/production-agent.d.ts +16 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +18 -1
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +6 -0
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/agent/run-manager.d.ts +14 -0
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +91 -1
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts +3 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +35 -3
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/agent/types.d.ts +2 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +4 -6
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/create.d.ts +66 -6
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +765 -66
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +2 -7
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/index.js +5 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.js +83 -47
- package/dist/cli/skills-content/design-visual-edit-skill.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +16 -9
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +21 -0
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.d.ts +2 -0
- package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.js +8 -2
- package/dist/client/blocks/library/wireframe-kit.js.map +1 -1
- package/dist/client/chat/index.d.ts +1 -1
- package/dist/client/chat/index.d.ts.map +1 -1
- package/dist/client/chat/index.js +1 -1
- package/dist/client/chat/index.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +17 -0
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +24 -2
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/run-recovery.d.ts +6 -0
- package/dist/client/chat/run-recovery.d.ts.map +1 -1
- package/dist/client/chat/run-recovery.js +13 -3
- package/dist/client/chat/run-recovery.js.map +1 -1
- package/dist/client/chat/widgets/DataTableWidget.d.ts.map +1 -1
- package/dist/client/chat/widgets/DataTableWidget.js +2 -3
- package/dist/client/chat/widgets/DataTableWidget.js.map +1 -1
- package/dist/client/chat/widgets/WorkspaceFileWidget.d.ts +5 -0
- package/dist/client/chat/widgets/WorkspaceFileWidget.d.ts.map +1 -0
- package/dist/client/chat/widgets/WorkspaceFileWidget.js +34 -0
- package/dist/client/chat/widgets/WorkspaceFileWidget.js.map +1 -0
- package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.js +13 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
- package/dist/client/chat/widgets/workspace-file-result.d.ts +12 -0
- package/dist/client/chat/widgets/workspace-file-result.d.ts.map +1 -0
- package/dist/client/chat/widgets/workspace-file-result.js +34 -0
- package/dist/client/chat/widgets/workspace-file-result.js.map +1 -0
- package/dist/client/embed-auth.d.ts.map +1 -1
- package/dist/client/embed-auth.js +2 -1
- package/dist/client/embed-auth.js.map +1 -1
- package/dist/client/org/InvitationBanner.d.ts +5 -2
- package/dist/client/org/InvitationBanner.d.ts.map +1 -1
- package/dist/client/org/InvitationBanner.js +9 -2
- package/dist/client/org/InvitationBanner.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +3 -2
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +27 -3
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/org/WorkspaceNotice.d.ts +18 -0
- package/dist/client/org/WorkspaceNotice.d.ts.map +1 -0
- package/dist/client/org/WorkspaceNotice.js +56 -0
- package/dist/client/org/WorkspaceNotice.js.map +1 -0
- package/dist/client/org/hooks.d.ts +1 -0
- package/dist/client/org/hooks.d.ts.map +1 -1
- package/dist/client/org/hooks.js +12 -0
- package/dist/client/org/hooks.js.map +1 -1
- package/dist/client/org/index.d.ts +2 -1
- package/dist/client/org/index.d.ts.map +1 -1
- package/dist/client/org/index.js +2 -1
- package/dist/client/org/index.js.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.js +8 -12
- package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts +3 -0
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +49 -20
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/resources/mcp-integration-catalog.d.ts +1 -0
- package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
- package/dist/client/resources/mcp-integration-catalog.js +3 -0
- package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
- package/dist/client/resources/use-resources.d.ts +1 -0
- package/dist/client/resources/use-resources.d.ts.map +1 -1
- package/dist/client/resources/use-resources.js +3 -0
- package/dist/client/resources/use-resources.js.map +1 -1
- package/dist/client/use-action.d.ts +3 -1
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +3 -1
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/widgets/index.d.ts +1 -1
- package/dist/client/widgets/index.d.ts.map +1 -1
- package/dist/client/widgets/index.js +1 -1
- package/dist/client/widgets/index.js.map +1 -1
- package/dist/coding-tools/run-code.js +2 -1
- package/dist/coding-tools/run-code.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 +1 -0
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +24 -3
- package/dist/db/client.js.map +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +25 -3
- package/dist/deploy/build.js.map +1 -1
- package/dist/eject/remote-mcp-presets.js +1 -1
- package/dist/eject/remote-mcp-presets.js.map +1 -1
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/google-docs-poller.d.ts.map +1 -1
- package/dist/integrations/google-docs-poller.js +4 -1
- package/dist/integrations/google-docs-poller.js.map +1 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +23 -11
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/jobs/scheduler.js +4 -0
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/localization/default-messages.d.ts +3 -2
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +3 -2
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +27 -7
- package/dist/observability/traces.js.map +1 -1
- package/dist/org/handlers.d.ts +15 -0
- package/dist/org/handlers.d.ts.map +1 -1
- package/dist/org/handlers.js +45 -1
- package/dist/org/handlers.js.map +1 -1
- package/dist/org/migrations.d.ts.map +1 -1
- package/dist/org/migrations.js +4 -0
- package/dist/org/migrations.js.map +1 -1
- package/dist/org/plugin.d.ts +1 -0
- package/dist/org/plugin.d.ts.map +1 -1
- package/dist/org/plugin.js +10 -1
- package/dist/org/plugin.js.map +1 -1
- package/dist/org/schema.d.ts +19 -0
- package/dist/org/schema.d.ts.map +1 -1
- package/dist/org/schema.js +1 -0
- package/dist/org/schema.js.map +1 -1
- package/dist/org/types.d.ts +8 -0
- package/dist/org/types.d.ts.map +1 -1
- package/dist/org/types.js.map +1 -1
- package/dist/org/workspace-url.d.ts +32 -0
- package/dist/org/workspace-url.d.ts.map +1 -0
- package/dist/org/workspace-url.js +63 -0
- package/dist/org/workspace-url.js.map +1 -0
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
- package/dist/provider-api/actions/provider-api.d.ts +7 -7
- package/dist/resources/handlers.d.ts +2 -3
- package/dist/resources/handlers.d.ts.map +1 -1
- package/dist/resources/handlers.js +25 -5
- package/dist/resources/handlers.js.map +1 -1
- package/dist/scripts/runner.d.ts +17 -0
- package/dist/scripts/runner.d.ts.map +1 -1
- package/dist/scripts/runner.js +130 -5
- package/dist/scripts/runner.js.map +1 -1
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +24 -2
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +26 -1
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +10 -1
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/auth.d.ts +22 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +33 -7
- package/dist/server/auth.js.map +1 -1
- package/dist/server/embed-route.d.ts.map +1 -1
- package/dist/server/embed-route.js +6 -1
- package/dist/server/embed-route.js.map +1 -1
- package/dist/server/embed-session.d.ts +7 -0
- package/dist/server/embed-session.d.ts.map +1 -1
- package/dist/server/embed-session.js +46 -4
- package/dist/server/embed-session.js.map +1 -1
- package/dist/server/open-route.d.ts.map +1 -1
- package/dist/server/open-route.js +17 -7
- package/dist/server/open-route.js.map +1 -1
- package/dist/server/prompts/framework-core-compact.js +1 -1
- package/dist/server/prompts/framework-core-compact.js.map +1 -1
- package/dist/server/prompts/framework-core.d.ts.map +1 -1
- package/dist/server/prompts/framework-core.js +1 -0
- package/dist/server/prompts/framework-core.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/request-context.d.ts +26 -0
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js +18 -1
- package/dist/server/request-context.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/embed-auth.d.ts +1 -0
- package/dist/shared/embed-auth.d.ts.map +1 -1
- package/dist/shared/embed-auth.js +1 -0
- package/dist/shared/embed-auth.js.map +1 -1
- package/dist/shared/html-document.d.ts +12 -0
- package/dist/shared/html-document.d.ts.map +1 -0
- package/dist/shared/html-document.js +92 -0
- package/dist/shared/html-document.js.map +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/sharing/access.d.ts +1 -0
- package/dist/sharing/access.d.ts.map +1 -1
- package/dist/sharing/access.js +8 -2
- package/dist/sharing/access.js.map +1 -1
- package/dist/sharing/registry.d.ts +3 -0
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js.map +1 -1
- package/dist/workspace-files/actions.d.ts +28 -0
- package/dist/workspace-files/actions.d.ts.map +1 -0
- package/dist/workspace-files/actions.js +75 -0
- package/dist/workspace-files/actions.js.map +1 -0
- package/dist/workspace-files/tool.d.ts.map +1 -1
- package/dist/workspace-files/tool.js +4 -0
- package/dist/workspace-files/tool.js.map +1 -1
- package/docs/content/cloneable-saas.mdx +114 -0
- package/docs/content/creating-templates.mdx +28 -2
- package/docs/content/syncing-template-changes.mdx +7 -0
- package/docs/content/template-clips-developers.mdx +12 -5
- package/docs/content/template-dispatch-developers.mdx +1 -1
- package/docs/content/template-dispatch.mdx +1 -1
- package/package.json +2 -2
- package/src/action-ui.ts +1 -0
- package/src/action.ts +5 -1
- package/src/agent/engine/ai-sdk-engine.ts +15 -5
- package/src/agent/harness/runner.ts +5 -0
- package/src/agent/production-agent.ts +33 -0
- package/src/agent/run-loop-with-resume.ts +5 -0
- package/src/agent/run-manager.ts +126 -1
- package/src/agent/thread-data-builder.ts +47 -2
- package/src/agent/types.ts +2 -0
- package/src/chat-threads/store.ts +4 -5
- package/src/cli/create.ts +1139 -65
- package/src/cli/design-connect.ts +3 -7
- package/src/cli/index.ts +5 -3
- package/src/cli/skills-content/design-visual-edit-skill.ts +83 -47
- package/src/client/AssistantChat.tsx +27 -16
- package/src/client/agent-chat-adapter.ts +24 -0
- package/src/client/blocks/library/wireframe-kit.tsx +17 -2
- package/src/client/chat/index.ts +1 -0
- package/src/client/chat/message-components.tsx +104 -1
- package/src/client/chat/run-recovery.tsx +15 -3
- package/src/client/chat/widgets/DataTableWidget.tsx +10 -29
- package/src/client/chat/widgets/WorkspaceFileWidget.tsx +71 -0
- package/src/client/chat/widgets/builtin-tool-renderers.tsx +22 -0
- package/src/client/chat/widgets/workspace-file-result.ts +49 -0
- package/src/client/embed-auth.ts +2 -0
- package/src/client/org/InvitationBanner.tsx +14 -1
- package/src/client/org/OrgSwitcher.tsx +23 -0
- package/src/client/org/TeamPage.tsx +130 -0
- package/src/client/org/WorkspaceNotice.tsx +85 -0
- package/src/client/org/hooks.ts +14 -0
- package/src/client/org/index.ts +2 -0
- package/src/client/resources/McpIntegrationDialog.tsx +27 -40
- package/src/client/resources/ResourcesPanel.tsx +134 -51
- package/src/client/resources/mcp-integration-catalog.ts +7 -0
- package/src/client/resources/use-resources.ts +6 -0
- package/src/client/use-action.ts +3 -1
- package/src/client/widgets/index.ts +1 -0
- package/src/coding-tools/run-code.ts +2 -1
- package/src/db/client.ts +28 -4
- package/src/deploy/build.ts +31 -3
- package/src/eject/remote-mcp-presets.ts +1 -1
- package/src/index.browser.ts +1 -0
- package/src/index.ts +1 -0
- package/src/integrations/google-docs-poller.ts +3 -0
- package/src/integrations/webhook-handler.ts +28 -11
- package/src/jobs/scheduler.ts +4 -0
- package/src/localization/default-messages.ts +3 -2
- package/src/observability/traces.ts +48 -12
- package/src/org/handlers.ts +52 -1
- package/src/org/migrations.ts +4 -0
- package/src/org/plugin.ts +14 -0
- package/src/org/schema.ts +1 -0
- package/src/org/types.ts +8 -0
- package/src/org/workspace-url.ts +74 -0
- package/src/resources/handlers.ts +35 -5
- package/src/scripts/runner.ts +183 -5
- package/src/server/__snapshots__/agent-chat-plugin.surface.spec.ts.snap +2 -1
- package/src/server/action-routes.ts +32 -2
- package/src/server/agent-chat-plugin.ts +29 -0
- package/src/server/agent-teams.ts +10 -1
- package/src/server/auth.ts +33 -7
- package/src/server/embed-route.ts +9 -0
- package/src/server/embed-session.ts +62 -3
- package/src/server/open-route.ts +20 -6
- package/src/server/prompts/framework-core-compact.ts +1 -1
- package/src/server/prompts/framework-core.ts +1 -0
- package/src/server/request-context.ts +36 -1
- package/src/shared/embed-auth.ts +1 -0
- package/src/shared/html-document.ts +115 -0
- package/src/shared/index.ts +1 -0
- package/src/sharing/access.ts +8 -1
- package/src/sharing/registry.ts +11 -2
- package/src/workspace-files/actions.ts +100 -0
- package/src/workspace-files/tool.ts +4 -0
- package/corpus/templates/design/changelog/2026-07-28-interact-mode-can-preview-designs-in-responsive-device-sizes.md +0 -6
- package/corpus/templates/design/changelog/2026-07-28-interact-mode-now-opens-a-full-screen-responsive-preview-wit.md +0 -6
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# Analytics — Agent Guide
|
|
2
2
|
|
|
3
|
-
Analytics is an agent-native BI workspace
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
analyses remain readable only for compatibility.
|
|
3
|
+
Analytics is an agent-native BI workspace for data sources, queries, dashboards,
|
|
4
|
+
charts, and warehouse integrations. Dashboards are the canonical user-facing
|
|
5
|
+
artifact; legacy analyses remain readable only for compatibility.
|
|
7
6
|
|
|
8
7
|
**This agent is Claude with BigQuery/Gong/HubSpot/Prometheus access.** Reason
|
|
9
8
|
over fetched data here; do not suggest another AI tool.
|
|
@@ -17,15 +16,12 @@ ladder.
|
|
|
17
16
|
## How To Answer A Data Question
|
|
18
17
|
|
|
19
18
|
1. **Search existing work first.** Call `search-analytics-query-catalog` before
|
|
20
|
-
writing
|
|
21
|
-
|
|
22
|
-
Adapt the closest match to the requested filters and window, run it once, and
|
|
23
|
-
stop.
|
|
19
|
+
writing a query. Adapt the closest saved SQL to the requested filters and
|
|
20
|
+
window, run it once, and stop.
|
|
24
21
|
2. **One bounded call.** List, filter, count, and cohort questions ("which X,
|
|
25
22
|
excluding Y") are a single SQL statement, or one `run-code` script that
|
|
26
|
-
filters server-side. Never page through a cohort
|
|
27
|
-
|
|
28
|
-
ten-second answer into a twenty-minute one.
|
|
23
|
+
filters server-side. Never page through a cohort or fan out per item to apply
|
|
24
|
+
a filter.
|
|
29
25
|
3. **Escalate only on a miss.** If the catalog returns nothing usable, make at
|
|
30
26
|
most one discovery pass (`list-data-dictionary`, `search-bigquery-schema`,
|
|
31
27
|
`data-source-status`), then query. Don't cross-check or add breakdowns
|
|
@@ -34,13 +30,14 @@ ladder.
|
|
|
34
30
|
chart — never deflect to "check the dashboard." Keep native data widgets to
|
|
35
31
|
already-summarized data (≤50 rows); above that, state the total and show the
|
|
36
32
|
top rows.
|
|
37
|
-
5. **
|
|
33
|
+
5. **Deliver exports in chat.** See `analysis-workspace`; never return only a
|
|
34
|
+
path or tell the user to find a download elsewhere.
|
|
35
|
+
6. **Chunk only for reading.** Group into 5-10 with per-item notes only when 30+
|
|
38
36
|
items each need qualitative reading no query can do (call transcripts, ticket
|
|
39
37
|
threads). Chunking a question a query could answer is the most expensive
|
|
40
38
|
mistake available here. See `adhoc-analysis`.
|
|
41
39
|
|
|
42
|
-
Use `ask-question`
|
|
43
|
-
definition, date range, or grain is genuinely ambiguous and a wrong guess would
|
|
40
|
+
Use `ask-question` at most once when an ambiguous metric, range, or grain would
|
|
44
41
|
change the numbers.
|
|
45
42
|
|
|
46
43
|
## Core Rules
|
|
@@ -49,10 +46,8 @@ change the numbers.
|
|
|
49
46
|
semantics; only present values you actually retrieved, and state uncertainty.
|
|
50
47
|
- Every analytical answer carries audit context: source(s), time window,
|
|
51
48
|
filters, row count/sample size, join method, caveats.
|
|
52
|
-
- Use actions for sources, queries, charts, dashboards, and sharing. Don't
|
|
53
|
-
|
|
54
|
-
with `pnpm action <name>`; in production call native tools. Use
|
|
55
|
-
`share-resource` / `set-resource-visibility` for sharing.
|
|
49
|
+
- Use actions for sources, queries, charts, dashboards, and sharing. Don't bypass
|
|
50
|
+
access checks with raw SQL for ownable resources.
|
|
56
51
|
- Provider actions are shortcuts, not limits — escalate to
|
|
57
52
|
`provider-api-catalog` / `provider-api-docs` / `provider-api-request` when a
|
|
58
53
|
canned action is too narrow. See `provider-api`.
|
|
@@ -66,14 +61,12 @@ change the numbers.
|
|
|
66
61
|
- The `demo` source (Node Exporter) is demo data against a public endpoint.
|
|
67
62
|
Never cite it as real analytics evidence unless the user asks about the demo
|
|
68
63
|
dashboard.
|
|
69
|
-
- Store large payloads
|
|
70
|
-
URLs
|
|
71
|
-
`settings`, or `resources`. Persist URLs, ids, or handles.
|
|
64
|
+
- Store large payloads in file/blob storage, never SQL or app state. Persist
|
|
65
|
+
only URLs, ids, or handles.
|
|
72
66
|
- Never hardcode API keys, tokens, webhook URLs, secrets, private Builder data,
|
|
73
67
|
or customer data. Use secrets/OAuth and obvious placeholders in examples.
|
|
74
|
-
- External MCP callers
|
|
75
|
-
|
|
76
|
-
stay `ask_app`-only. Backend reads always return real identities.
|
|
68
|
+
- External MCP callers default to `ask_app` for multi-step work; fallback reads
|
|
69
|
+
are bounded and scoped, and writes stay `ask_app`-only.
|
|
77
70
|
- Dashboard email reports and analytics alert rules are SQL-backed,
|
|
78
71
|
self-describing action surfaces — don't hand-wire routes around them. Reports
|
|
79
72
|
cap at five recipients. See `dashboard-ops`.
|
|
@@ -29,6 +29,15 @@ const DATA_SOURCES_SETUP_LINK = buildDeepLink({
|
|
|
29
29
|
to: "/data-sources",
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
+
function dataSourceSetupLink(provider: string): string {
|
|
33
|
+
const source = encodeURIComponent(provider);
|
|
34
|
+
return buildDeepLink({
|
|
35
|
+
app: APP_ID,
|
|
36
|
+
view: "data-sources",
|
|
37
|
+
to: `/data-sources?source=${source}&returnTo=ask`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
32
41
|
const BUILT_IN_FIRST_PARTY_PROVIDER = {
|
|
33
42
|
provider: "first-party",
|
|
34
43
|
label: "First-party Analytics",
|
|
@@ -74,7 +83,7 @@ async function listWorkspaceConnectionsForStatus(): Promise<{
|
|
|
74
83
|
|
|
75
84
|
export default defineAction({
|
|
76
85
|
description:
|
|
77
|
-
"List which analytics data sources are available without revealing secret values. This always includes the built-in first-party Analytics event store, which is queried with `query-agent-native-analytics`; it also reports configured credentials and granted workspace connections. The result includes `hasConnectedExternalDataSources`, `connectedExternalDataSourceCount`, and `dataSourcesSetupLink`;
|
|
86
|
+
"List which analytics data sources are available without revealing secret values. This always includes the built-in first-party Analytics event store, which is queried with `query-agent-native-analytics`; it also reports configured credentials and granted workspace connections. The result includes `hasConnectedExternalDataSources`, `connectedExternalDataSourceCount`, and `dataSourcesSetupLink`; each provider also includes a focused `setupLink`. When a requested provider is unavailable, use its focused link for contextual setup guidance. The `key` arg accepts exact credential names like JIRA_API_TOKEN and provider aliases like jira, pylon, bigquery, github, hubspot, gong, or slack.",
|
|
78
87
|
schema: z.object({
|
|
79
88
|
key: z
|
|
80
89
|
.string()
|
|
@@ -198,6 +207,7 @@ export default defineAction({
|
|
|
198
207
|
return {
|
|
199
208
|
provider: provider.provider,
|
|
200
209
|
label: provider.label,
|
|
210
|
+
setupLink: dataSourceSetupLink(provider.provider),
|
|
201
211
|
// A failed workspace-connection lookup cannot prove a provider is
|
|
202
212
|
// disconnected — a workspace-held connection lives in exactly the
|
|
203
213
|
// data we could not read. Report null, never false.
|
|
@@ -858,6 +858,9 @@ const enUS = {
|
|
|
858
858
|
githubOAuthUnavailable:
|
|
859
859
|
"OAuth app credentials are not configured on this deployment. Use the personal access token field below.",
|
|
860
860
|
sharedIntegration: "Shared integration",
|
|
861
|
+
workspaceAdminRequiredTitle: "Organization connection requires an admin",
|
|
862
|
+
workspaceAdminRequiredDescription:
|
|
863
|
+
"Ask an organization owner or admin to connect {{name}} for everyone in this organization.",
|
|
861
864
|
sharedReady:
|
|
862
865
|
"Analytics can use this provider through a workspace connection granted from Dispatch.",
|
|
863
866
|
sharedNeedsGrant:
|
|
@@ -1325,6 +1328,9 @@ const analyticsSliceTranslations: {
|
|
|
1325
1328
|
githubOAuthUnavailable:
|
|
1326
1329
|
"此部署中未配置 OAuth 应用程序凭据。使用下面的个人访问令牌字段。",
|
|
1327
1330
|
sharedIntegration: "共享集成",
|
|
1331
|
+
workspaceAdminRequiredTitle: "组织连接需要管理员",
|
|
1332
|
+
workspaceAdminRequiredDescription:
|
|
1333
|
+
"请让组织所有者或管理员为此组织中的所有人连接 {{name}}。",
|
|
1328
1334
|
sharedReady:
|
|
1329
1335
|
"Analytics 可以通过 Dispatch 授予的工作空间连接来使用此提供程序。",
|
|
1330
1336
|
sharedNeedsGrant: "存在工作区连接。打开Dispatch,授予Analytics访问权限。",
|
|
@@ -1618,6 +1624,10 @@ const analyticsSliceTranslations: {
|
|
|
1618
1624
|
githubOAuthUnavailable:
|
|
1619
1625
|
"Las credenciales de la aplicación OAuth no están configuradas en esta implementación. Utilice el campo de token de acceso personal a continuación.",
|
|
1620
1626
|
sharedIntegration: "Integración compartida",
|
|
1627
|
+
workspaceAdminRequiredTitle:
|
|
1628
|
+
"La conexión de la organización requiere un administrador",
|
|
1629
|
+
workspaceAdminRequiredDescription:
|
|
1630
|
+
"Pide a un propietario o administrador de la organización que conecte {{name}} para todos.",
|
|
1621
1631
|
sharedReady:
|
|
1622
1632
|
"Analytics puede utilizar este proveedor a través de una conexión de espacio de trabajo otorgada por Dispatch.",
|
|
1623
1633
|
sharedNeedsGrant:
|
|
@@ -1930,6 +1940,10 @@ const analyticsSliceTranslations: {
|
|
|
1930
1940
|
githubOAuthUnavailable:
|
|
1931
1941
|
"Les informations d'identification de l'application OAuth ne sont pas configurées sur ce déploiement. Utilisez le champ du jeton d'accès personnel ci-dessous.",
|
|
1932
1942
|
sharedIntegration: "Intégration partagée",
|
|
1943
|
+
workspaceAdminRequiredTitle:
|
|
1944
|
+
"La connexion de l’organisation nécessite un administrateur",
|
|
1945
|
+
workspaceAdminRequiredDescription:
|
|
1946
|
+
"Demandez à un propriétaire ou administrateur de l’organisation de connecter {{name}} pour tous.",
|
|
1933
1947
|
sharedReady:
|
|
1934
1948
|
"Analytics peut utiliser ce fournisseur via une connexion à l'espace de travail accordée par Dispatch.",
|
|
1935
1949
|
sharedNeedsGrant:
|
|
@@ -2240,6 +2254,10 @@ const analyticsSliceTranslations: {
|
|
|
2240
2254
|
githubOAuthUnavailable:
|
|
2241
2255
|
"Die Anmeldeinformationen für die OAuth-App sind in dieser Bereitstellung nicht konfiguriert. Verwenden Sie das Feld für das persönliche Zugriffstoken unten.",
|
|
2242
2256
|
sharedIntegration: "Gemeinsame Integration",
|
|
2257
|
+
workspaceAdminRequiredTitle:
|
|
2258
|
+
"Für die Organisationsverbindung ist ein Administrator erforderlich",
|
|
2259
|
+
workspaceAdminRequiredDescription:
|
|
2260
|
+
"Bitte einen Organisationsinhaber oder Administrator, {{name}} für alle zu verbinden.",
|
|
2243
2261
|
sharedReady:
|
|
2244
2262
|
"Analytics kann diesen Anbieter über eine von Dispatch gewährte Workspace-Verbindung nutzen.",
|
|
2245
2263
|
sharedNeedsGrant:
|
|
@@ -2548,6 +2566,9 @@ const analyticsSliceTranslations: {
|
|
|
2548
2566
|
githubOAuthUnavailable:
|
|
2549
2567
|
"OAuth アプリの資格情報は、この展開では構成されていません。以下の個人アクセス トークン フィールドを使用してください。",
|
|
2550
2568
|
sharedIntegration: "共有統合",
|
|
2569
|
+
workspaceAdminRequiredTitle: "組織の接続には管理者が必要です",
|
|
2570
|
+
workspaceAdminRequiredDescription:
|
|
2571
|
+
"組織の所有者または管理者に、組織全体で {{name}} を接続するよう依頼してください。",
|
|
2551
2572
|
sharedReady:
|
|
2552
2573
|
"Analytics は、Dispatch から付与されたワークスペース接続を通じてこのプロバイダーを使用できます。",
|
|
2553
2574
|
sharedNeedsGrant:
|
|
@@ -2850,6 +2871,9 @@ const analyticsSliceTranslations: {
|
|
|
2850
2871
|
githubOAuthUnavailable:
|
|
2851
2872
|
"이 배포에서는 OAuth 앱 자격 증명이 구성되지 않습니다. 아래의 개인 액세스 토큰 필드를 사용하세요.",
|
|
2852
2873
|
sharedIntegration: "공유 통합",
|
|
2874
|
+
workspaceAdminRequiredTitle: "조직 연결에는 관리자가 필요합니다",
|
|
2875
|
+
workspaceAdminRequiredDescription:
|
|
2876
|
+
"조직 소유자 또는 관리자에게 조직의 모든 사용자를 위해 {{name}} 연결을 요청하세요.",
|
|
2853
2877
|
sharedReady:
|
|
2854
2878
|
"Analytics는 Dispatch에서 부여된 작업 공간 연결을 통해 이 공급자를 사용할 수 있습니다.",
|
|
2855
2879
|
sharedNeedsGrant:
|
|
@@ -3149,6 +3173,10 @@ const analyticsSliceTranslations: {
|
|
|
3149
3173
|
githubOAuthUnavailable:
|
|
3150
3174
|
"As credenciais do aplicativo OAuth não estão configuradas nesta implantação. Use o campo de token de acesso pessoal abaixo.",
|
|
3151
3175
|
sharedIntegration: "Integração compartilhada",
|
|
3176
|
+
workspaceAdminRequiredTitle:
|
|
3177
|
+
"A conexão da organização requer um administrador",
|
|
3178
|
+
workspaceAdminRequiredDescription:
|
|
3179
|
+
"Peça a um proprietário ou administrador da organização para conectar {{name}} para todos.",
|
|
3152
3180
|
sharedReady:
|
|
3153
3181
|
"Analytics pode usar este provedor por meio de uma conexão de espaço de trabalho concedida pelo Dispatch.",
|
|
3154
3182
|
sharedNeedsGrant:
|
|
@@ -3453,6 +3481,9 @@ const analyticsSliceTranslations: {
|
|
|
3453
3481
|
githubOAuthUnavailable:
|
|
3454
3482
|
"इस परिनियोजन पर OAuth ऐप क्रेडेंशियल कॉन्फ़िगर नहीं किए गए हैं। नीचे व्यक्तिगत एक्सेस टोकन फ़ील्ड का उपयोग करें।",
|
|
3455
3483
|
sharedIntegration: "साझा एकीकरण",
|
|
3484
|
+
workspaceAdminRequiredTitle: "संगठन कनेक्शन के लिए एडमिन आवश्यक है",
|
|
3485
|
+
workspaceAdminRequiredDescription:
|
|
3486
|
+
"संगठन के मालिक या एडमिन से सभी के लिए {{name}} कनेक्ट करने को कहें।",
|
|
3456
3487
|
sharedReady:
|
|
3457
3488
|
"Analytics इस प्रदाता का उपयोग Dispatch से दिए गए कार्यक्षेत्र कनेक्शन के माध्यम से कर सकता है।",
|
|
3458
3489
|
sharedNeedsGrant:
|
|
@@ -3748,6 +3779,9 @@ const analyticsSliceTranslations: {
|
|
|
3748
3779
|
githubOAuthUnavailable:
|
|
3749
3780
|
"لم يتم تكوين بيانات اعتماد تطبيق OAuth في هذا النشر. استخدم حقل رمز الوصول الشخصي أدناه.",
|
|
3750
3781
|
sharedIntegration: "التكامل المشترك",
|
|
3782
|
+
workspaceAdminRequiredTitle: "يتطلب اتصال المؤسسة مشرفًا",
|
|
3783
|
+
workspaceAdminRequiredDescription:
|
|
3784
|
+
"اطلب من مالك المؤسسة أو أحد المشرفين ربط {{name}} لجميع أعضاء المؤسسة.",
|
|
3751
3785
|
sharedReady:
|
|
3752
3786
|
"يمكن لـ Analytics استخدام هذا الموفر من خلال اتصال مساحة العمل الممنوح من Dispatch.",
|
|
3753
3787
|
sharedNeedsGrant:
|
|
@@ -30,6 +30,7 @@ export interface WorkspaceConnectionProviderSummary {
|
|
|
30
30
|
export interface DataSourceProviderStatus {
|
|
31
31
|
provider: string;
|
|
32
32
|
label: string;
|
|
33
|
+
setupLink?: string;
|
|
33
34
|
// null when the workspace-connection lookup failed: unreadable, not absent.
|
|
34
35
|
configured: boolean | null;
|
|
35
36
|
configuredKeys: string[];
|
|
@@ -75,6 +76,91 @@ const dataSourceWorkspaceProviderIds: Record<string, string> = {
|
|
|
75
76
|
slack: "slack",
|
|
76
77
|
};
|
|
77
78
|
|
|
79
|
+
const workspaceOAuthSourceIds = new Set([
|
|
80
|
+
"notion",
|
|
81
|
+
"hubspot",
|
|
82
|
+
"jira",
|
|
83
|
+
"sentry",
|
|
84
|
+
]);
|
|
85
|
+
|
|
86
|
+
export function isWorkspaceOAuthSource(source: DataSource): boolean {
|
|
87
|
+
return workspaceOAuthSourceIds.has(source.id);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function shouldShowWorkspaceOAuthSetup(
|
|
91
|
+
source: DataSource,
|
|
92
|
+
status: SharedConnectionStatus | null,
|
|
93
|
+
canManageOrg: boolean,
|
|
94
|
+
): boolean {
|
|
95
|
+
return (
|
|
96
|
+
canManageOrg &&
|
|
97
|
+
(status?.kind === "needs_credentials" || status?.kind === "needs_grant") &&
|
|
98
|
+
isWorkspaceOAuthSource(source)
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function shouldShowWorkspaceOAuthAdminNotice(
|
|
103
|
+
source: DataSource,
|
|
104
|
+
ready: boolean,
|
|
105
|
+
canManageOrg: boolean,
|
|
106
|
+
orgLoaded = true,
|
|
107
|
+
hasOrg = true,
|
|
108
|
+
): boolean {
|
|
109
|
+
return (
|
|
110
|
+
orgLoaded &&
|
|
111
|
+
hasOrg &&
|
|
112
|
+
!canManageOrg &&
|
|
113
|
+
!ready &&
|
|
114
|
+
isWorkspaceOAuthSource(source)
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function shouldOfferWorkspaceOAuthReconnect(
|
|
119
|
+
source: DataSource,
|
|
120
|
+
status: SharedConnectionStatus | null,
|
|
121
|
+
canManageOrg: boolean,
|
|
122
|
+
connectionTestFailed: boolean,
|
|
123
|
+
): boolean {
|
|
124
|
+
return (
|
|
125
|
+
canManageOrg &&
|
|
126
|
+
connectionTestFailed &&
|
|
127
|
+
status?.kind === "ready" &&
|
|
128
|
+
isWorkspaceOAuthSource(source)
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export type FocusedDataSourceResolution =
|
|
133
|
+
| { status: "none" }
|
|
134
|
+
| { status: "found"; source: DataSource }
|
|
135
|
+
| { status: "unknown"; requestedId: string };
|
|
136
|
+
|
|
137
|
+
export function focusedDataSourceFromSearchParams(
|
|
138
|
+
searchParams: URLSearchParams,
|
|
139
|
+
): FocusedDataSourceResolution {
|
|
140
|
+
const requestedSourceId = searchParams.get("source")?.trim().toLowerCase();
|
|
141
|
+
if (!requestedSourceId) return { status: "none" };
|
|
142
|
+
|
|
143
|
+
// Keep links emitted before PostgreSQL's provider id was aligned with the
|
|
144
|
+
// UI source id working instead of silently dropping their focus.
|
|
145
|
+
const sourceId =
|
|
146
|
+
requestedSourceId === "postgres" ? "postgresql" : requestedSourceId;
|
|
147
|
+
const source = dataSources.find((candidate) => candidate.id === sourceId);
|
|
148
|
+
return source
|
|
149
|
+
? { status: "found", source }
|
|
150
|
+
: { status: "unknown", requestedId: requestedSourceId };
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function dataSourceOAuthReturnPath(
|
|
154
|
+
source: DataSource | undefined,
|
|
155
|
+
returnToAsk: boolean,
|
|
156
|
+
): string {
|
|
157
|
+
const params = new URLSearchParams();
|
|
158
|
+
if (source) params.set("source", source.id);
|
|
159
|
+
if (returnToAsk) params.set("returnTo", "ask");
|
|
160
|
+
const query = params.toString();
|
|
161
|
+
return query ? `/data-sources?${query}` : "/data-sources";
|
|
162
|
+
}
|
|
163
|
+
|
|
78
164
|
export function getGoogleDriveConnection(
|
|
79
165
|
data: DataSourceStatusResponse | undefined,
|
|
80
166
|
): WorkspaceConnectionProviderSummary | undefined {
|