@agent-native/core-corpus 0.209.0 → 0.209.1-nightly-20261015033458
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 +1 -1
- package/corpus/templates/analytics/.agents/skills/adhoc-analysis/SKILL.md +1 -1
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +30 -0
- package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +9 -6
- package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +39 -18
- package/corpus/templates/analytics/.agents/skills/hubspot/SKILL.md +2 -1
- package/corpus/templates/analytics/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/analytics/AGENTS.md +2 -2
- package/corpus/templates/analytics/actions/account-deep-dive.ts +1 -1
- package/corpus/templates/analytics/actions/compose-dashboard.ts +4 -0
- package/corpus/templates/analytics/actions/configure-gong-native-insights.ts +2 -2
- package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +10 -1
- package/corpus/templates/analytics/actions/find-data.ts +24 -2
- package/corpus/templates/analytics/actions/gong-native-insights.ts +1 -1
- package/corpus/templates/analytics/actions/inspect-sigma-workbook.ts +170 -0
- package/corpus/templates/analytics/actions/list-sigma-workbooks.ts +167 -0
- package/corpus/templates/analytics/actions/migrate-sigma-workbook.ts +573 -0
- package/corpus/templates/analytics/actions/mutate-dashboard.ts +3 -0
- package/corpus/templates/analytics/actions/provider-api-request.ts +1 -1
- package/corpus/templates/analytics/actions/run-gong-native-insight.ts +43 -7
- package/corpus/templates/analytics/actions/save-sigma-connection.ts +327 -0
- package/corpus/templates/analytics/actions/update-dashboard.ts +4 -0
- package/corpus/templates/analytics/app/components/dashboard/SigmaMigrationDialog.tsx +1497 -0
- package/corpus/templates/analytics/app/components/ui/button-group.tsx +1 -0
- package/corpus/templates/analytics/app/i18n/en-US.ts +102 -0
- package/corpus/templates/analytics/app/pages/DashboardOverview.tsx +47 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +87 -64
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +1 -0
- package/corpus/templates/analytics/changelog/2026-10-14-chats-no-longer-stop-with-result-is-unknown-after-a-rejected.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-14-dashboards-show-a-reset-filters-button-whenever-a-filter-dif.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-14-fixed-the-chat-repeating-a-finished-reply-several-times-and-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-14-gong-questions-use-gong-s-own-search-instead-of-paging-all-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-14-import-bigquery-backed-sigma-workbooks-as-private-analytics-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-14-import-from-sigma-is-easier-to-find.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-14-membership-searches-no-longer-treat-monthly-counts-as-user-r.md +6 -0
- package/corpus/templates/analytics/evals/README.md +59 -0
- package/corpus/templates/analytics/evals/production-source-cases.eval.ts +161 -0
- package/corpus/templates/analytics/evals/synthetic-production-path/README.md +120 -4
- package/corpus/templates/analytics/evals/synthetic-production-path/SYNTHETIC-analytics-production-path-v22-before-after.csv +101 -0
- package/corpus/templates/analytics/evals/synthetic-production-path/SYNTHETIC-analytics-production-path-v23-before-after.csv +101 -0
- package/corpus/templates/analytics/evals/synthetic-production-path/SYNTHETIC-analytics-production-path-v24-before-after.csv +101 -0
- package/corpus/templates/analytics/evals/synthetic-production-path/comparison-validation.ts +157 -12
- package/corpus/templates/analytics/evals/synthetic-retrieval/SYNTHETIC-analytics-retrieval-v6.csv +2 -2
- package/corpus/templates/analytics/scripts/build-source-index.ts +12 -8
- package/corpus/templates/analytics/scripts/sigma-source-index.ts +31 -2
- package/corpus/templates/analytics/server/db/index.ts +8 -0
- package/corpus/templates/analytics/server/db/schema.ts +67 -1
- package/corpus/templates/analytics/server/lib/analytics-agent-context.ts +1 -1
- package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +1673 -42
- package/corpus/templates/analytics/server/lib/bi-migration/external-dashboards-store.ts +571 -0
- package/corpus/templates/analytics/server/lib/bi-migration/sigma-adapter.ts +1361 -0
- package/corpus/templates/analytics/server/lib/bi-migration/sigma-connections.ts +111 -0
- package/corpus/templates/analytics/server/lib/bi-migration/sigma-migration.ts +74 -0
- package/corpus/templates/analytics/server/lib/dashboard-panel-verification.ts +2 -1
- package/corpus/templates/analytics/server/lib/dashboards-store.ts +40 -0
- package/corpus/templates/analytics/server/lib/gong-native-policy.ts +22 -2
- package/corpus/templates/analytics/server/lib/gong.ts +6 -0
- package/corpus/templates/analytics/server/lib/provider-credentials.ts +165 -3
- package/corpus/templates/analytics/server/lib/sigma-connection.ts +90 -0
- package/corpus/templates/analytics/server/lib/sigma-setup-secret-sweep.ts +44 -0
- package/corpus/templates/analytics/server/lib/source-index-schema.ts +27 -1
- package/corpus/templates/analytics/server/lib/source-index-store.ts +70 -23
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +128 -19
- package/corpus/templates/analytics/server/plugins/db.ts +6 -0
- package/corpus/templates/analytics/server/register-secrets.ts +28 -0
- package/corpus/templates/analytics/shared/feature-flags.ts +8 -0
- package/corpus/templates/analytics/shared/panel-rendered-prefix.ts +7 -0
- package/corpus/templates/assets/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/brain/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/calendar/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/chat/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/clips/.agents/skills/screen-memory/SKILL.md +12 -10
- package/corpus/templates/clips/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/clips/AGENTS.md +1 -1
- package/corpus/templates/clips/actions/cleanup-dictation.ts +41 -9
- package/corpus/templates/clips/actions/create-recording.ts +32 -2
- package/corpus/templates/clips/actions/import-loom-recording.ts +14 -0
- package/corpus/templates/clips/actions/lib/create-recording-schema.ts +15 -0
- package/corpus/templates/clips/actions/list-recording-context.ts +95 -13
- package/corpus/templates/clips/actions/request-recording-context.ts +3 -51
- package/corpus/templates/clips/actions/start-meeting-recording.ts +12 -0
- package/corpus/templates/clips/actions/update-dictation.ts +72 -8
- package/corpus/templates/clips/app/components/lookback/recording-context-model.ts +29 -17
- package/corpus/templates/clips/app/components/lookback/recording-context-panel.tsx +148 -34
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +5 -0
- package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +30 -16
- package/corpus/templates/clips/app/hooks/use-drop-video-upload.ts +1 -0
- package/corpus/templates/clips/app/hooks/use-sonner-lifecycle-toast.ts +3 -1
- package/corpus/templates/clips/app/i18n/en-US.ts +10 -0
- package/corpus/templates/clips/app/lib/local-recording-saved.ts +42 -0
- package/corpus/templates/clips/app/lib/local-recording-upload.ts +9 -1
- package/corpus/templates/clips/app/lib/missing-share-retry.ts +20 -0
- package/corpus/templates/clips/app/lib/recording-backup.ts +31 -0
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +86 -4
- package/corpus/templates/clips/app/routes/_app.r.$recordingId.tsx +3 -6
- package/corpus/templates/clips/app/routes/record.tsx +57 -14
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +103 -9
- package/corpus/templates/clips/changelog/2026-10-14-camera-settings-control-center.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-clips-recording-failure-toasts-now-dismiss-automatically.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-dictation-cleanup-can-be-undone-and-the-original-transcript-.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-earlier-screen-time-is-shared-with-its-clip.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-include-last-says-none-and-can-turn-off-rewind.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-owners-can-download-a-local-copy-when-a-clip-upload-fails.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-private-clips-show-the-access-screen-right-away-instead-of-loading.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-restoring-a-dictation-now-stays-final-while-cleanup-is-still.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-selected-window-recordings-now-include-the-camera-bubble-ove.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-shared-clips-no-longer-show-earlier-screen-time-after-a-clip.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-transcript-edits-stay-intact-when-cleanup-is-running.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-undo-no-longer-removes-a-newer-dictation-cleanup.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-window-recordings-include-camera-preview.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-14-window-recordings-keep-the-camera-bubble-visible-and-aligned.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +138 -27
- package/corpus/templates/clips/desktop/src/lib/recorder-events.ts +43 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +24 -10
- package/corpus/templates/clips/desktop/src/lookback/LookbackRow.tsx +10 -2
- package/corpus/templates/clips/desktop/src-tauri/src/accessibility.rs +8 -6
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +6 -4
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +77 -15
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen/custom_capture.rs +299 -67
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +1263 -65
- package/corpus/templates/clips/desktop/src-tauri/src/util.rs +56 -43
- package/corpus/templates/clips/server/db/index.ts +2 -23
- package/corpus/templates/clips/server/db/schema.ts +4 -1
- package/corpus/templates/clips/server/lib/context-footage.ts +23 -0
- package/corpus/templates/clips/server/lib/recording-context-test-db.ts +20 -3
- package/corpus/templates/clips/server/lib/recording-created.ts +49 -0
- package/corpus/templates/clips/server/plugins/db.ts +10 -0
- package/corpus/templates/clips/server/routes/api/public-recording.get.ts +16 -8
- package/corpus/templates/clips/server/routes/api/thumbnail/[recordingId].get.ts +45 -8
- package/corpus/templates/clips/server/routes/api/video/[recordingId].get.ts +46 -13
- package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +3 -3
- package/corpus/templates/content/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/content/actions/add-comment.ts +48 -46
- package/corpus/templates/content/actions/list-comments.ts +5 -26
- package/corpus/templates/content/actions/update-comment.ts +82 -56
- package/corpus/templates/content/app/components/editor/CommentAvatar.tsx +37 -0
- package/corpus/templates/content/app/components/editor/CommentComposer.tsx +162 -68
- package/corpus/templates/content/app/components/editor/CommentEntry.tsx +31 -24
- package/corpus/templates/content/app/components/editor/CommentIdentity.tsx +364 -0
- package/corpus/templates/content/app/components/editor/CommentRow.tsx +69 -63
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +199 -111
- package/corpus/templates/content/app/components/editor/ThreadSuggestion.tsx +10 -0
- package/corpus/templates/content/app/components/editor/comment-ai.tsx +13 -0
- package/corpus/templates/content/app/components/editor/comment-drafts.tsx +36 -9
- package/corpus/templates/content/app/components/ui/hover-card.tsx +1 -0
- package/corpus/templates/content/app/global.css +0 -11
- package/corpus/templates/content/app/hooks/use-comments.ts +12 -33
- package/corpus/templates/content/app/hooks/use-mention-members.ts +10 -8
- package/corpus/templates/content/app/i18n-data.ts +10 -0
- package/corpus/templates/content/changelog/2026-10-11-comment-mentions-of-people-and-agents-now-stay-as-avatar-and.md +6 -0
- package/corpus/templates/content/docs/product/capabilities/content.comment.page-owned.md +6 -0
- package/corpus/templates/content/server/db/schema.ts +2 -0
- package/corpus/templates/content/server/lib/comment-mention-input.ts +40 -0
- package/corpus/templates/content/server/lib/comment-notifications.ts +27 -11
- package/corpus/templates/content/server/lib/comment-submission-source.ts +10 -0
- package/corpus/templates/content/server/plugins/db.ts +6 -0
- package/corpus/templates/content/shared/comment-mentions.ts +461 -0
- package/corpus/templates/crm/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +44 -8
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +15 -3
- package/corpus/templates/design/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/design/actions/apply-design-token-edit.ts +23 -4
- package/corpus/templates/design/actions/apply-motion-edit.ts +157 -9
- package/corpus/templates/design/actions/apply-visual-edit.ts +32 -0
- package/corpus/templates/design/actions/edit-design.ts +7 -0
- package/corpus/templates/design/actions/get-motion-timeline.ts +143 -43
- package/corpus/templates/design/actions/import-design-tokens.ts +163 -165
- package/corpus/templates/design/actions/index-design-tokens.ts +21 -79
- package/corpus/templates/design/actions/propose-node-rewrite.ts +3 -0
- package/corpus/templates/design/actions/remove-motion-timeline.ts +75 -52
- package/corpus/templates/design/actions/run-design-extension-action.ts +1 -1
- package/corpus/templates/design/actions/show-design-questions.ts +2 -0
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +3 -2
- package/corpus/templates/design/app/components/design/MotionDock.tsx +27 -5
- package/corpus/templates/design/app/components/design/MotionNativeStyleEditor.tsx +36 -3
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +509 -408
- package/corpus/templates/design/app/components/design/edit-panel/motion-inspector-properties.tsx +12 -94
- package/corpus/templates/design/app/i18n/en-US.ts +36 -10
- package/corpus/templates/design/app/pages/Index.tsx +5 -4
- package/corpus/templates/design/app/pages/design-editor/commands/geometry-commit.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/queue-frame-geometry-save.ts +114 -0
- package/corpus/templates/design/app/pages/design-editor/design-editor-view.tsx +8 -1
- package/corpus/templates/design/app/pages/design-editor/domains/use-editor-active-screen-and-geometry.ts +20 -54
- package/corpus/templates/design/app/pages/design-editor/domains/use-editor-content-and-components.ts +54 -1
- package/corpus/templates/design/app/pages/design-editor/domains/use-editor-live-edits-and-presence.ts +62 -9
- package/corpus/templates/design/app/pages/design-editor/effects/motion-autosave.ts +122 -14
- package/corpus/templates/design/app/pages/design-editor/motion-state.ts +166 -14
- package/corpus/templates/design/changelog/2026-10-13-home-prompt-suggestions-stay-hidden-until-ai-is-connected.md +6 -0
- package/corpus/templates/design/changelog/2026-10-13-the-tokens-panel-import-menu-now-imports-dtcg-token-files-cs.md +6 -0
- package/corpus/templates/design/changelog/2026-10-13-the-tokens-panel-menu-now-creates-a-token-of-a-chosen-kind-c.md +6 -0
- package/corpus/templates/design/changelog/2026-10-13-undo-reliably-restores-screen-positions-after-repeated-keybo.md +6 -0
- package/corpus/templates/design/changelog/2026-10-14-chats-no-longer-stop-with-result-is-unknown-after-a-rejected.md +6 -0
- package/corpus/templates/design/changelog/2026-10-14-deselecting-a-layer-keeps-motion-open-and-restores-the-canva.md +6 -0
- package/corpus/templates/design/changelog/2026-10-14-design-motion-keeps-supported-react-and-html-motion-edits-in.md +6 -0
- package/corpus/templates/design/changelog/2026-10-14-motion-can-import-supported-inline-css-keyframes-and-round-t.md +6 -0
- package/corpus/templates/design/changelog/2026-10-14-motion-saves-now-move-imported-inline-html-animations-into-m.md +6 -0
- package/corpus/templates/design/changelog/2026-10-14-motion-source-editing-now-refuses-targets-with-dynamic-style.md +6 -0
- package/corpus/templates/design/changelog/2026-10-14-motion-timeline-duration-fields-support-keyboard-stepping.md +6 -0
- package/corpus/templates/design/server/lib/dtcg-tokens.ts +400 -0
- package/corpus/templates/design/shared/design-token-types.ts +159 -0
- package/corpus/templates/design/shared/motion-authored-css-import.ts +883 -0
- package/corpus/templates/design/shared/motion-code.ts +648 -1
- package/corpus/templates/design/shared/motion-html-source.ts +409 -21
- package/corpus/templates/design/shared/motion-native-style-runtime.ts +1 -1
- package/corpus/templates/design/shared/motion-react-source.ts +813 -23
- package/corpus/templates/dispatch/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/dispatch/AGENTS.md +1 -1
- package/corpus/templates/dispatch/changelog/2026-10-14-gong-questions-go-to-analytics-instead-of-scanning-every-.md +6 -0
- package/corpus/templates/dispatch/server/lib/app-roles.ts +3 -1
- package/corpus/templates/factory/.agents/skills/review-latest-feedback/SKILL.md +5 -0
- package/corpus/templates/factory/.agents/skills/review-latest-feedback/references/chat-run-health.md +50 -0
- package/corpus/templates/forms/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/mail/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/mail/AGENTS.md +1 -1
- package/corpus/templates/mail/actions/provider-api-request.ts +124 -6
- package/corpus/templates/mail/changelog/2026-10-14-allowing-automation-sends-no-longer-lets-automations-delet.md +6 -0
- package/corpus/templates/mail/changelog/2026-10-14-automations-that-add-a-gmail-label-no-longer-wait-for-send-a.md +6 -0
- package/corpus/templates/mail/server/plugins/agent-chat.ts +1 -1
- package/corpus/templates/plan/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/slides/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/slides/actions/add-slide.ts +2 -0
- package/corpus/templates/slides/actions/get-deck.ts +2 -0
- package/corpus/templates/slides/actions/patch-deck.ts +37 -0
- package/corpus/templates/slides/actions/update-slide.ts +4 -0
- package/corpus/templates/slides/app/components/editor/SlideSlashCommandMenu.tsx +28 -12
- package/corpus/templates/slides/app/components/editor/in-place-text-session.ts +369 -141
- package/corpus/templates/slides/app/components/editor/rich-text-selection.ts +81 -55
- package/corpus/templates/slides/changelog/2026-10-13-bold-formatting-stays-consistent-when-you-format-and-copy-se.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-13-keep-the-caret-inside-list-items-when-navigating-to-line-edg.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-13-list-formatting-keeps-the-caret-after-a-soft-line-break.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-13-long-slide-editing-sessions-preserve-more-undo-history.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-13-markdown-formatting-shortcuts-preserve-styling-when-the-care.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-13-slash-menu-keyboard-selection-stays-responsive-through-repea.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-14-backspace-removes-a-leading-space-in-a-heading-or-quote-with.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-14-chats-no-longer-stop-with-result-is-unknown-after-a-rejected.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-14-slash-command-keyboard-navigation-now-starts-from-the-first-.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-14-slash-command-options-are-easier-to-distinguish-with-pointer.md +6 -0
- package/corpus/templates/slides/scripts/edit-fidelity/authoring-fuzz.ts +1785 -175
- package/corpus/templates/slides/scripts/edit-fidelity/run.ts +278 -59
- package/package.json +1 -1
package/corpus/README.md
CHANGED
|
@@ -63,7 +63,7 @@ Use the available actions to pull data. Read the relevant `.agents/skills/<provi
|
|
|
63
63
|
**Tips for data gathering:**
|
|
64
64
|
|
|
65
65
|
- Start with the primary source (e.g., HubSpot for deals), then enrich with secondary sources
|
|
66
|
-
- For named deal/account deep dives, call `account-deep-dive` first with the
|
|
66
|
+
- For the CRM side of named deal/account deep dives, call `account-deep-dive` first (ask what was said in Gong calls with `run-gong-native-insight`) with the
|
|
67
67
|
account, company, domain, deal, or opportunity name. It returns HubSpot deals,
|
|
68
68
|
associated companies/contacts/tickets/notes/emails, Gong call detail, compact
|
|
69
69
|
transcript excerpts, coverage counts, and gaps. Use targeted `hubspot-records`
|
|
@@ -235,6 +235,34 @@ catalog template. Existing dashboards remain readable while the native
|
|
|
235
235
|
replacement is validated. Bespoke interaction flows, arbitrary layouts, and
|
|
236
236
|
visualizations outside these contracts may remain Custom Blocks.
|
|
237
237
|
|
|
238
|
+
## Sigma workbook import
|
|
239
|
+
|
|
240
|
+
The dashboard menu opens the Sigma import flow, where users can browse and
|
|
241
|
+
preview workbooks. Imports remain disabled for elements whose source project
|
|
242
|
+
Analytics cannot verify: Sigma's connection API reports provider type and
|
|
243
|
+
metadata but does not expose a BigQuery project identifier. Do not call
|
|
244
|
+
`migrate-sigma-workbook` for an unverified source or treat an Analytics
|
|
245
|
+
BigQuery credential as proof that it targets Sigma's project. Users can list
|
|
246
|
+
workbooks with `list-sigma-workbooks` and inspect one with
|
|
247
|
+
`inspect-sigma-workbook`. The feature is controlled by
|
|
248
|
+
`analytics.sigma-dashboard-migration` and requires a Sigma connection granted
|
|
249
|
+
to Analytics.
|
|
250
|
+
|
|
251
|
+
Use an existing Dispatch Sigma connection when it is granted to Analytics; the
|
|
252
|
+
import flow discovers accessible connections without copying their Vault
|
|
253
|
+
values. If direct setup is needed, an organization owner or admin can enter
|
|
254
|
+
Sigma client credentials in the Analytics dialog. Analytics saves those values
|
|
255
|
+
under Analytics-specific encrypted organization secrets and links them to an
|
|
256
|
+
Analytics-only connection. Credential values must never pass through agent chat,
|
|
257
|
+
action arguments, logs, source, or screenshots.
|
|
258
|
+
|
|
259
|
+
If Sigma adds verifiable source mapping in the future, the planned import will
|
|
260
|
+
create a private snapshot in the user's personal `Sigma` folder. Other source
|
|
261
|
+
types and unsupported elements will become review callouts. Preserve migration
|
|
262
|
+
warnings and never describe a future result as parity-complete or automatically
|
|
263
|
+
synchronized. Sigma's workbook-code API is public Beta and can omit unsupported
|
|
264
|
+
workbook features before inspection receives the response.
|
|
265
|
+
|
|
238
266
|
The source tree ships four provider-free v2 manifests in
|
|
239
267
|
`server/lib/native-v2-dashboards.ts`: Customer ROI, Account Engagement,
|
|
240
268
|
Cross-sell, and Win / Loss. They intentionally contain no customer names,
|
|
@@ -356,6 +384,8 @@ An unwrapped `{{<id>:list}}` with no selection fails the query on purpose. Optio
|
|
|
356
384
|
|
|
357
385
|
Filters auto-apply on change — there is no Apply button. Each filter change writes to the URL and re-runs the affected panels. Other filters are preserved (the URL update is functional, not destructive). If you see a filter "reset" itself when another filter changes, look for a duplicate `id` first.
|
|
358
386
|
|
|
387
|
+
**Reset filters** in the filter bar returns the dashboard to what a fresh load shows: the default saved view when the dashboard has one, otherwise each filter's own `default`. It shows only while a filter's resolved value differs from that, so `f_timeRange=30d` on a 30d-default filter counts as reset. To reset for the user with `set-search-params`, remove every `f_` param and `view`, or set the default view's params and `view=<id>`.
|
|
388
|
+
|
|
359
389
|
## Modifying A Dashboard
|
|
360
390
|
|
|
361
391
|
For existing dashboard edits, default to `mutate-dashboard`. It gives the
|
|
@@ -149,7 +149,7 @@ pnpm action account-deep-dive --query="The Knot" --days=180 --gongLimit=10 --tra
|
|
|
149
149
|
# HubSpot contacts or companies
|
|
150
150
|
pnpm action hubspot-records --objectType=companies --query=builder.io --properties=name,domain,lifecyclestage
|
|
151
151
|
|
|
152
|
-
# Gong call
|
|
152
|
+
# Gong call evidence (quotes, counts); ask run-gong-native-insight first for "what did they say"
|
|
153
153
|
pnpm action gong-calls --company="The Knot" --days=180 --includeTranscripts=true --transcriptLimit=5
|
|
154
154
|
```
|
|
155
155
|
|
|
@@ -160,10 +160,13 @@ endpoint/filter a shortcut can't express) have **no bespoke action** — reach
|
|
|
160
160
|
them through the shared provider API escape-hatch pattern:
|
|
161
161
|
`provider-api-catalog` / `provider-api-docs` to learn the endpoint, then
|
|
162
162
|
`provider-api-request` (or `providerFetch` inside `run-code`) against the
|
|
163
|
-
provider's real HTTP API.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
provider's real HTTP API. Ask the provider to do the work first: use its own
|
|
164
|
+
search or semantic tool, or a server-side filter on a bounded window (for
|
|
165
|
+
Gong, `run-gong-native-insight`). Only for exhaustive coverage, exact counts, or
|
|
166
|
+
an absence claim ("how many", "any/none across all …") stage the raw API
|
|
167
|
+
response with `stageAs`/`saveToFile` and reduce it with `query-staged-dataset`
|
|
168
|
+
or `run-code`, rather than stretching a capped shortcut action or paging by
|
|
169
|
+
hand to filter locally.
|
|
167
170
|
|
|
168
171
|
### Writing Ad-Hoc Scripts
|
|
169
172
|
|
|
@@ -194,7 +197,7 @@ For complete answers, combine data from multiple sources:
|
|
|
194
197
|
- **BigQuery** for analytics events, signups, pageviews
|
|
195
198
|
- **First-party Analytics** (`query-agent-native-analytics`) for events collected through `/track`
|
|
196
199
|
- **HubSpot** for CRM data — `hubspot-records` for contacts/companies/tickets/general lookup; `hubspot-deals` and `hubspot-metrics` for pipeline and revenue analysis
|
|
197
|
-
- **Gong** for sales-call evidence — use `gong-calls` with `includeTranscripts=true` for
|
|
200
|
+
- **Gong** for sales-call evidence — ask `run-gong-native-insight` first for what was said, risks, objections, or next steps; use `gong-calls` with `includeTranscripts=true` for quotes, counts, or when native operations are not connected
|
|
198
201
|
- **Jira** for engineering metrics — tickets, sprints
|
|
199
202
|
- **GitHub** for code metrics — PRs, reviews
|
|
200
203
|
- **Agent-Native Analytics Monitoring -> Errors** for first-party captured
|
|
@@ -10,29 +10,47 @@ description: >-
|
|
|
10
10
|
Use Gong for sales-call evidence. Call metadata alone is not enough for a deep
|
|
11
11
|
dive that asks what happened in customer conversations.
|
|
12
12
|
|
|
13
|
+
## Answer Questions With Gong's Own Search First
|
|
14
|
+
|
|
15
|
+
Gong's MCP (`ask_account`, `ask_deal`, `generate_brief`) searches and analyzes
|
|
16
|
+
the calls server-side and answers in seconds. That is how Claude answers Gong
|
|
17
|
+
questions, and it is the default here too.
|
|
18
|
+
|
|
19
|
+
- A question about an account, deal, customer, competitor, or topic ("what did
|
|
20
|
+
X say about Y", risks, objections, themes, next steps, call prep) →
|
|
21
|
+
`run-gong-native-insight` first, one consolidated call. Do not page `/calls`
|
|
22
|
+
or `/calls/extensive`, and do not pull transcripts, to answer a question.
|
|
23
|
+
- Reach for the raw paths below only when the user needs verbatim quotes, an
|
|
24
|
+
exact count, or proof that something was absent across all calls, or when the
|
|
25
|
+
native operations are not connected (`gong-native-insights` lists them).
|
|
26
|
+
- If a blocking Gong request returns a size-limit error, stop paging and switch
|
|
27
|
+
to the native operation or a narrower `gong-calls` search. Never retry the
|
|
28
|
+
same wide window.
|
|
29
|
+
|
|
13
30
|
## Actions
|
|
14
31
|
|
|
15
32
|
- `gong-native-insights` — lists the connected provider-native qualitative
|
|
16
33
|
synthesis operations (`ask_account`, `ask_deal`, `generate_brief`) and their
|
|
17
34
|
schemas. It never calls Gong AI or spends a credit request.
|
|
18
35
|
- `run-gong-native-insight` — sends one of those operations through Gong's
|
|
19
|
-
connected MCP.
|
|
20
|
-
the native tools are connected. One
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
loads Gong call details, and returns
|
|
36
|
+
connected MCP. This is the first choice for questions, themes, risks,
|
|
37
|
+
summaries, and deck narrative when the native tools are connected. One
|
|
38
|
+
invocation makes one Gong AI request (one credit request), so put related
|
|
39
|
+
sub-questions in one call. It is on by default; a workspace owner can turn it
|
|
40
|
+
off with `configure-gong-native-insights`, which never blocks the raw
|
|
41
|
+
evidence path.
|
|
42
|
+
- `account-deep-dive` — first choice for a named account/deal when the answer
|
|
43
|
+
needs HubSpot CRM context alongside Gong. For a question about what was said
|
|
44
|
+
in the calls, use `run-gong-native-insight` first. It searches by
|
|
45
|
+
account/deal/company/contact domain, loads Gong call details, and returns
|
|
46
|
+
compact transcript excerpts for synthesis.
|
|
29
47
|
- `gong-calls` — bounded convenience reads: list recent calls, search by
|
|
30
48
|
company/domain/person/email, fetch a single transcript by call ID, or return
|
|
31
49
|
transcript excerpts for a small matching cohort. Its `transcriptQuery` is a
|
|
32
50
|
local scan after batched transcript retrieval, not Gong's server-side
|
|
33
51
|
keyword search.
|
|
34
52
|
|
|
35
|
-
For
|
|
53
|
+
For exhaustive, count, or absence-sensitive Gong work, use the raw provider API surface:
|
|
36
54
|
use `provider-api-catalog` / `provider-api-docs`, then stage `/calls/extensive`
|
|
37
55
|
or another raw endpoint with `provider-api-request`. Reduce staged tracker or
|
|
38
56
|
call data with `query-staged-dataset` or a Data Program. Use
|
|
@@ -41,14 +59,15 @@ native/indexed search can answer the question.
|
|
|
41
59
|
|
|
42
60
|
## Route Synthesis and Evidence Separately
|
|
43
61
|
|
|
44
|
-
- Use `run-gong-native-insight`
|
|
45
|
-
and
|
|
46
|
-
is unknown and raw transcript evidence is unavailable
|
|
62
|
+
- Use `run-gong-native-insight` to answer the question where Gong retrieves
|
|
63
|
+
and analyzes evidence internally. Its result is provider synthesis: coverage
|
|
64
|
+
is unknown and raw transcript evidence is unavailable, so say that when the
|
|
65
|
+
user asked for completeness.
|
|
47
66
|
- Use `gong-calls` or `provider-corpus-job` for quotes, exact counts, transcript
|
|
48
67
|
records, coverage-sensitive claims, and proof that something was absent.
|
|
49
68
|
- Consolidate related native questions into one narrowly scoped request. Each
|
|
50
|
-
native operation independently consumes Gong
|
|
51
|
-
per slide, bullet, or sub-question.
|
|
69
|
+
native operation independently consumes a Gong credit request, so do not make
|
|
70
|
+
one call per slide, bullet, or sub-question.
|
|
52
71
|
- From a sibling app, ask Analytics a natural-language question by default.
|
|
53
72
|
Analytics owns Gong/HubSpot routing, source coverage, credentials, transcript
|
|
54
73
|
strategy, joins, and synthesis. Use `call-agent`'s direct `action` + `input`
|
|
@@ -90,8 +109,10 @@ When analyzing customer sentiment, objections, or voice of the customer:
|
|
|
90
109
|
|
|
91
110
|
For account or deal deep dives:
|
|
92
111
|
|
|
93
|
-
1.
|
|
94
|
-
|
|
112
|
+
1. Ask `run-gong-native-insight` first for what customers said, risks,
|
|
113
|
+
objections, and next steps. Call `account-deep-dive` first when the request
|
|
114
|
+
also needs CRM context, contacts, stages, amount, close date, or an overall
|
|
115
|
+
opportunity narrative, or when native operations are not connected.
|
|
95
116
|
2. Use `gong-calls` for targeted follow-up searches by account name, domain,
|
|
96
117
|
person, or email.
|
|
97
118
|
3. Set `includeTranscripts=true` when the user asks for context, risks,
|
|
@@ -26,7 +26,8 @@ actions do not expose, inspect the provider catalog/docs and call
|
|
|
26
26
|
|
|
27
27
|
## Actions
|
|
28
28
|
|
|
29
|
-
- `account-deep-dive` — first choice for named account/deal
|
|
29
|
+
- `account-deep-dive` — first choice for the CRM side of a named account/deal
|
|
30
|
+
deep dive (use `run-gong-native-insight` for what was said in calls). It
|
|
30
31
|
searches matching HubSpot deals, loads associated companies, contacts,
|
|
31
32
|
tickets, notes, and emails, then pairs that CRM context with Gong evidence.
|
|
32
33
|
- `hubspot-deals` — deals with normalized stage, pipeline, owner, forecast, and
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// AUTO-GENERATED by @agent-native/core deploy build
|
|
2
|
+
import { markDefaultPluginProvided } from "@agent-native/core/server/edge";
|
|
3
|
+
|
|
4
|
+
const pluginStems = ["agent-chat","analytics-alert-jobs","analytics-rollup-backfill-jobs","auth","collab","config","core-routes","creative-context","dashboard-report-jobs","db","feature-flags","labs","onboarding","otel","session-replay-retention-jobs","transactional-emails","uptime-monitor-jobs"];
|
|
5
|
+
|
|
6
|
+
export default function markBuildDiscoveredPlugins(nitroApp) {
|
|
7
|
+
for (const stem of pluginStems) {
|
|
8
|
+
markDefaultPluginProvided(nitroApp, stem);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -15,13 +15,13 @@ Use local docs only (no web research): `pnpm action docs-search --query "<topic>
|
|
|
15
15
|
- Use one bounded SQL or server-side `run-code` call for lists, filters, counts, or cohorts. If the catalog misses, call `find-data` once, then inspect exact metadata with `search-bigquery-schema` or provider status only when needed; do not fan out per item or add unasked breakdowns.
|
|
16
16
|
- For an exact owner-defined dbt metric, use `query-dbt-semantic-metric` when a dbt workspace connection is available. dbt defines metric meaning and grain; Sigma and Amplitude are examples and cross-checks. Do not infer an owner-approved metric from a model name or dashboard.
|
|
17
17
|
- Answer shape: when a saved or certified dashboard answers, open with one line naming and linking it (`[Title](/dashboards/<id>)`) and how to read it there, then answer. Add a short "How it's computed" note (source, window, filters, sample size, caveats) only when it changes how to read the number. Show SQL, tables, or schema only when asked, when the user writes SQL or asks about tables or columns, or when no dashboard matches. Label figures “Unverified” if no live query ran; never cite the public `demo` source as real evidence unless asked.
|
|
18
|
-
- Create or change saved artifacts only when asked. For named
|
|
18
|
+
- Create or change saved artifacts only when asked. For a named account, use `run-gong-native-insight` for Gong and `account-deep-dive` for HubSpot context; for health, read `account-health`. When challenged on coverage, rerun from the source cohort and provide the updated answer.
|
|
19
19
|
|
|
20
20
|
## Core rules
|
|
21
21
|
|
|
22
22
|
- UI feedback: target 100 ms, never exceed 400 ms; acknowledge before network work.
|
|
23
23
|
- Sibling apps delegate metrics and product questions over A2A in natural language, never SQL. Analytics owns schema, source selection, and stable shaped reads.
|
|
24
|
-
- Use actions for data and sharing; respect ownable access checks. Provider actions are shortcuts
|
|
24
|
+
- Use actions for data and sharing; respect ownable access checks. Provider actions are shortcuts; stage broad Gong scans with `query-staged-dataset` or a Data Program.
|
|
25
25
|
- Reports/alerts use SQL actions and cap at five recipients. Store large payloads in file/blob storage, not SQL or app state.
|
|
26
26
|
- Never invent data or source semantics. For external integrations, inspect the workspace/provider connection catalog first; reuse its scoped resolver.
|
|
27
27
|
- For MCP, use allowlisted cataloged actions; use `ask_app` for interpretation, source selection, multi-step, or unsupported actions.
|
|
@@ -366,7 +366,7 @@ async function loadGongEvidence(options: {
|
|
|
366
366
|
|
|
367
367
|
export default defineAction({
|
|
368
368
|
description:
|
|
369
|
-
"Build a bounded CRM/Gong account or deal evidence bundle from HubSpot and Gong. Use
|
|
369
|
+
"Build a bounded CRM/Gong account or deal evidence bundle from HubSpot and Gong. Use it for the HubSpot CRM context of a named account, deal, or opportunity; ask run-gong-native-insight first for what was said in calls. This is not a complete account-health result: for account health, follow it with verified product-usage queries for the resolved customer using the account-health skill.",
|
|
370
370
|
schema: z.object({
|
|
371
371
|
query: z
|
|
372
372
|
.string()
|
|
@@ -178,6 +178,10 @@ export default defineAction({
|
|
|
178
178
|
height: 680,
|
|
179
179
|
}),
|
|
180
180
|
},
|
|
181
|
+
// Append skips ids already present and merges onto the latest row, so a replay
|
|
182
|
+
// adds nothing. Overwrite and refreshExisting replace panels with no revision
|
|
183
|
+
// fence, so a replay could erase an edit made between calls.
|
|
184
|
+
retrySafe: (input) => !input.overwrite && !input.refreshExisting,
|
|
181
185
|
run: async (args, actionContext?: ActionRunContext) => {
|
|
182
186
|
const email = getRequestUserEmail();
|
|
183
187
|
if (!email) throw new Error("no authenticated user");
|
|
@@ -5,7 +5,7 @@ import { writeGongNativeInsightsPolicy } from "../server/lib/gong-native-policy"
|
|
|
5
5
|
|
|
6
6
|
export default defineAction({
|
|
7
7
|
description:
|
|
8
|
-
"
|
|
8
|
+
"Turn Gong native semantic operations on or off for the current workspace (organization owners and admins only). They are on by default; each run-gong-native-insight call consumes one Gong credit request. Turn them off to block every semantic request while keeping raw Gong evidence actions available.",
|
|
9
9
|
schema: z.object({
|
|
10
10
|
enabled: z
|
|
11
11
|
.boolean()
|
|
@@ -22,7 +22,7 @@ export default defineAction({
|
|
|
22
22
|
...policy,
|
|
23
23
|
creditRequests: 0,
|
|
24
24
|
guidance: enabled
|
|
25
|
-
? "Gong native semantic requests are enabled for this scope. Each request
|
|
25
|
+
? "Gong native semantic requests are enabled for this scope. Each request independently consumes one Gong credit request."
|
|
26
26
|
: "Gong native semantic requests are disabled. Use gong-calls or the provider corpus evidence path.",
|
|
27
27
|
};
|
|
28
28
|
},
|
|
@@ -977,7 +977,16 @@ export function applyDashboardMutationOperations(
|
|
|
977
977
|
case "removePanels": {
|
|
978
978
|
const ids = uniqueStrings(op.panelIds);
|
|
979
979
|
const panels = panelsFromConfig(config);
|
|
980
|
-
for (const id of ids)
|
|
980
|
+
for (const id of ids) {
|
|
981
|
+
// A remove replayed after its first attempt committed finds the
|
|
982
|
+
// panel gone; say so, so the model checks instead of retrying.
|
|
983
|
+
if (findPanelIndex(panels, id) < 0) {
|
|
984
|
+
fail(
|
|
985
|
+
`${missingPanelHelp(panels, id)} If an earlier attempt already removed it, the dashboard is already in the requested state; confirm with get-sql-dashboard instead of retrying.`,
|
|
986
|
+
{ errorCode: "dashboard_panel_not_found", statusCode: 404 },
|
|
987
|
+
);
|
|
988
|
+
}
|
|
989
|
+
}
|
|
981
990
|
config.panels = panels.filter(
|
|
982
991
|
(panel) => !ids.includes(panelId(panel)),
|
|
983
992
|
);
|
|
@@ -9,6 +9,7 @@ import { searchAnalyticsQueryCatalog } from "../server/lib/analytics-query-catal
|
|
|
9
9
|
import type {
|
|
10
10
|
SourceIndexFreshness,
|
|
11
11
|
SourceIndexScanCoverage,
|
|
12
|
+
SourceIndexSourcesFreshness,
|
|
12
13
|
} from "../server/lib/source-index-store.js";
|
|
13
14
|
|
|
14
15
|
function countLabel(
|
|
@@ -58,9 +59,25 @@ function sourceIndexFreshnessGuidance(
|
|
|
58
59
|
return `The generated source index is stale (${freshness.ageDays} days old; refresh threshold ${freshness.staleAfterDays} days). Use its entries only to discover leads; do not treat its definitions, grain, joins, or omissions as current. Verify current schema and owner-approved definitions before querying.`;
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
function sourceIndexSourcesFreshnessGuidance(
|
|
63
|
+
status: "not-configured" | "unavailable" | "invalid" | "available",
|
|
64
|
+
freshness: SourceIndexSourcesFreshness | null,
|
|
65
|
+
): string {
|
|
66
|
+
if (status !== "available") return "";
|
|
67
|
+
if (
|
|
68
|
+
freshness?.fresh === true &&
|
|
69
|
+
freshness.sourceCount > 0 &&
|
|
70
|
+
freshness.unknownTimestampCount === 0 &&
|
|
71
|
+
freshness.staleSourceCount === 0
|
|
72
|
+
) {
|
|
73
|
+
return "";
|
|
74
|
+
}
|
|
75
|
+
return "Per-source source-index freshness is stale or unknown. Treat missing references as inconclusive and verify current schema or source metadata before reporting that no matching source exists.";
|
|
76
|
+
}
|
|
77
|
+
|
|
61
78
|
export default defineAction({
|
|
62
79
|
description:
|
|
63
|
-
"Find definitions, dashboard SQL, and source-index references. Returns ranked metadata,
|
|
80
|
+
"Find definitions, dashboard SQL, and source-index references. Returns ranked metadata, freshness and coverage, not live values. For rosters, use row-grain sources over aggregates. Stale generated entries are hints; use `search-bigquery-schema` for columns or partitions, then query live before reporting.",
|
|
64
81
|
schema: z.object({
|
|
65
82
|
question: z
|
|
66
83
|
.string()
|
|
@@ -103,16 +120,21 @@ export default defineAction({
|
|
|
103
120
|
result.sourceIndexStatus,
|
|
104
121
|
result.sourceIndexFreshness,
|
|
105
122
|
);
|
|
123
|
+
const sourceFreshnessGuidance = sourceIndexSourcesFreshnessGuidance(
|
|
124
|
+
result.sourceIndexStatus,
|
|
125
|
+
result.sourceIndexSourcesFreshness,
|
|
126
|
+
);
|
|
106
127
|
return {
|
|
107
128
|
question,
|
|
108
129
|
results: candidates,
|
|
109
130
|
...paginationAndCoverage,
|
|
110
131
|
resultType: "reference-metadata",
|
|
111
132
|
guidance: [
|
|
112
|
-
"Treat saved SQL and source-index entries as examples or unapproved metadata. Verify source scope, live schema, partitions, and current values before answering. If truncated is true and nextPage is present, continue with that cursor; if truncated is true and nextPage is null, refine the search or use an explicit dashboard/schema search because a source cap was reached.",
|
|
133
|
+
"Treat saved SQL and source-index entries as examples or unapproved metadata. Verify source scope, live schema, partitions, and current values before answering. For rosters, exclude aggregates and snapshots as member sources. If none remain, report no row-grain source and check index coverage or schema. If truncated is true and nextPage is present, continue with that cursor; if truncated is true and nextPage is null, refine the search or use an explicit dashboard/schema search because a source cap was reached.",
|
|
113
134
|
sourceIndexGuidance,
|
|
114
135
|
scanGuidance,
|
|
115
136
|
freshnessGuidance,
|
|
137
|
+
sourceFreshnessGuidance,
|
|
116
138
|
]
|
|
117
139
|
.filter(Boolean)
|
|
118
140
|
.join(" "),
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
|
|
9
9
|
export default defineAction({
|
|
10
10
|
description:
|
|
11
|
-
"List the Gong native semantic operations (ask_account, ask_deal, generate_brief) connected in this request scope, with their input schemas. This never calls Gong AI or consumes Gong credits.
|
|
11
|
+
"List the Gong native semantic operations (ask_account, ask_deal, generate_brief) connected in this request scope, with their input schemas. This never calls Gong AI or consumes Gong credits. Call run-gong-native-insight with the chosen operation to answer a question about an account, deal, or topic. For verbatim quotes, exact counts, or absence/exhaustive claims use gong-calls or the provider corpus evidence path instead.",
|
|
12
12
|
// Paid execution moved to run-gong-native-insight. Reject its arguments here
|
|
13
13
|
// instead of silently returning a listing to an older caller.
|
|
14
14
|
schema: z.strictObject(
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { defineAction, fail } from "@agent-native/core/action";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
inspectSigmaWorkbook,
|
|
6
|
+
type SigmaPortableElement,
|
|
7
|
+
type SigmaWorkbookInspection,
|
|
8
|
+
} from "../server/lib/bi-migration/sigma-adapter.js";
|
|
9
|
+
import { resolveSigmaConnectionSelection } from "../server/lib/bi-migration/sigma-connections.js";
|
|
10
|
+
import { requireSigmaMigrationContext } from "../server/lib/bi-migration/sigma-migration.js";
|
|
11
|
+
|
|
12
|
+
const inspectSchema = z.object({
|
|
13
|
+
workbookId: z
|
|
14
|
+
.string()
|
|
15
|
+
.trim()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(200)
|
|
18
|
+
.regex(/^[A-Za-z0-9_-]+$/)
|
|
19
|
+
.describe("Sigma workbook ID returned by list-sigma-workbooks."),
|
|
20
|
+
connectionId: z
|
|
21
|
+
.string()
|
|
22
|
+
.trim()
|
|
23
|
+
.min(1)
|
|
24
|
+
.max(200)
|
|
25
|
+
.optional()
|
|
26
|
+
.describe("Selected connected Sigma workspace connection, when needed."),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export type SigmaElementReviewReason =
|
|
30
|
+
| "unsupported_element"
|
|
31
|
+
| "unsupported_source"
|
|
32
|
+
| "source_unavailable"
|
|
33
|
+
| "source_mapping_required"
|
|
34
|
+
| "query_unavailable"
|
|
35
|
+
| "unsafe_sql"
|
|
36
|
+
| "visualization_review";
|
|
37
|
+
|
|
38
|
+
export interface SigmaElementReview {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
type: string;
|
|
42
|
+
importable: boolean;
|
|
43
|
+
visualizationPreserved: boolean;
|
|
44
|
+
reason?: SigmaElementReviewReason;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function reviewElement(
|
|
48
|
+
element: SigmaPortableElement,
|
|
49
|
+
inspection: SigmaWorkbookInspection,
|
|
50
|
+
): SigmaElementReview {
|
|
51
|
+
if (element.kind !== "panel") {
|
|
52
|
+
return {
|
|
53
|
+
id: element.id,
|
|
54
|
+
name: element.title,
|
|
55
|
+
type: element.sigmaKind,
|
|
56
|
+
importable: false,
|
|
57
|
+
visualizationPreserved: false,
|
|
58
|
+
reason: "unsupported_element",
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const connection = inspection.sourceConnections.find(
|
|
63
|
+
(source) => source.connectionId === element.source?.connectionId,
|
|
64
|
+
);
|
|
65
|
+
if (!connection || connection.targetProviderCandidate !== "bigquery") {
|
|
66
|
+
const sourceUnavailable = inspection.diagnostics.some(
|
|
67
|
+
(diagnostic) =>
|
|
68
|
+
diagnostic.code === "sigma_source_connection_unavailable" &&
|
|
69
|
+
diagnostic.connectionId === element.source?.connectionId,
|
|
70
|
+
);
|
|
71
|
+
return {
|
|
72
|
+
id: element.id,
|
|
73
|
+
name: element.title,
|
|
74
|
+
type: element.chartType,
|
|
75
|
+
importable: false,
|
|
76
|
+
visualizationPreserved: false,
|
|
77
|
+
reason: sourceUnavailable ? "source_unavailable" : "unsupported_source",
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Sigma reports the provider type, but the current connection API does not
|
|
82
|
+
// establish that this Analytics credential points at the same project.
|
|
83
|
+
return {
|
|
84
|
+
id: element.id,
|
|
85
|
+
name: element.title,
|
|
86
|
+
type: element.chartType,
|
|
87
|
+
importable: false,
|
|
88
|
+
visualizationPreserved: false,
|
|
89
|
+
reason: "source_mapping_required",
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function summarizeSigmaElementReview(args: {
|
|
94
|
+
inspection: SigmaWorkbookInspection;
|
|
95
|
+
}): SigmaElementReview[] {
|
|
96
|
+
return args.inspection.elements.map((element) =>
|
|
97
|
+
reviewElement(element, args.inspection),
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function requireSigmaSourceInspection(
|
|
102
|
+
inspection: SigmaWorkbookInspection,
|
|
103
|
+
): void {
|
|
104
|
+
if (
|
|
105
|
+
inspection.diagnostics.some((diagnostic) => diagnostic.severity === "error")
|
|
106
|
+
) {
|
|
107
|
+
fail(
|
|
108
|
+
"Sigma source connection details could not be verified. Retry the workbook preview.",
|
|
109
|
+
{
|
|
110
|
+
errorCode: "sigma_source_inspection_failed",
|
|
111
|
+
statusCode: 503,
|
|
112
|
+
},
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export default defineAction({
|
|
118
|
+
description:
|
|
119
|
+
"Preview a Sigma workbook without returning SQL or workbook payloads. Sigma imports remain preview-only because the current connection API does not expose a BigQuery project mapping Analytics can verify.",
|
|
120
|
+
schema: inspectSchema,
|
|
121
|
+
http: { method: "GET" },
|
|
122
|
+
readOnly: true,
|
|
123
|
+
mcpTool: false,
|
|
124
|
+
publicAgent: { expose: true, readOnly: true, requiresAuth: true },
|
|
125
|
+
run: async (args) => {
|
|
126
|
+
await requireSigmaMigrationContext();
|
|
127
|
+
const selection = await resolveSigmaConnectionSelection(args.connectionId);
|
|
128
|
+
if (!selection.selected) {
|
|
129
|
+
fail("Select a connected Sigma workspace connection first.", {
|
|
130
|
+
errorCode: "sigma_connection_required",
|
|
131
|
+
statusCode: 400,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
const inspection = await inspectSigmaWorkbook({
|
|
135
|
+
connectionId: selection.selected.id,
|
|
136
|
+
workbookId: args.workbookId,
|
|
137
|
+
includeSqlQueries: false,
|
|
138
|
+
});
|
|
139
|
+
requireSigmaSourceInspection(inspection);
|
|
140
|
+
const elements = summarizeSigmaElementReview({
|
|
141
|
+
inspection,
|
|
142
|
+
});
|
|
143
|
+
const importableCount = elements.filter(
|
|
144
|
+
(element) => element.importable,
|
|
145
|
+
).length;
|
|
146
|
+
const unsupportedCount = elements.length - importableCount;
|
|
147
|
+
const reviewRequiredCount = elements.filter(
|
|
148
|
+
(element) =>
|
|
149
|
+
!element.importable || element.reason === "visualization_review",
|
|
150
|
+
).length;
|
|
151
|
+
const sourceMappingRequiredCount = elements.filter(
|
|
152
|
+
(element) => element.reason === "source_mapping_required",
|
|
153
|
+
).length;
|
|
154
|
+
return {
|
|
155
|
+
workbook: {
|
|
156
|
+
id: inspection.workbook.workbookId,
|
|
157
|
+
name: inspection.workbook.name,
|
|
158
|
+
updatedAt: inspection.workbook.updatedAt,
|
|
159
|
+
},
|
|
160
|
+
connectionId: selection.selected.id,
|
|
161
|
+
connectionLabel: selection.selected.label,
|
|
162
|
+
importableCount,
|
|
163
|
+
unsupportedCount,
|
|
164
|
+
reviewRequiredCount,
|
|
165
|
+
sourceMappingRequiredCount,
|
|
166
|
+
elements,
|
|
167
|
+
betaRepresentationWarning: true,
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
});
|