@agent-native/core-corpus 0.209.0 → 0.209.1-nightly-20261015005848
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 +22 -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/configure-gong-native-insights.ts +2 -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/provider-api-request.ts +1 -1
- package/corpus/templates/analytics/actions/run-gong-native-insight.ts +43 -7
- package/corpus/templates/analytics/app/components/dashboard/SigmaMigrationDialog.tsx +1186 -0
- package/corpus/templates/analytics/app/i18n/en-US.ts +74 -0
- package/corpus/templates/analytics/app/pages/DashboardOverview.tsx +28 -1
- 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/server/db/index.ts +8 -0
- package/corpus/templates/analytics/server/db/schema.ts +67 -1
- 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/plugins/agent-chat.ts +127 -19
- package/corpus/templates/analytics/server/plugins/db.ts +6 -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/.deploy-tmp/agent-native-provided-plugins.mjs +10 -0
- package/corpus/templates/clips/actions/cleanup-dictation.ts +41 -9
- package/corpus/templates/clips/actions/update-dictation.ts +72 -8
- package/corpus/templates/clips/app/hooks/use-sonner-lifecycle-toast.ts +3 -1
- package/corpus/templates/clips/app/i18n/en-US.ts +6 -0
- package/corpus/templates/clips/app/lib/recording-backup.ts +26 -0
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +86 -4
- package/corpus/templates/clips/app/routes/_app.r.$recordingId.tsx +0 -6
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +73 -0
- 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-owners-can-download-a-local-copy-when-a-clip-upload-fails.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-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 +127 -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-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/schema.ts +4 -1
- package/corpus/templates/clips/server/plugins/db.ts +10 -0
- 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-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/import-design-tokens.ts +163 -165
- package/corpus/templates/design/actions/index-design-tokens.ts +21 -79
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +509 -408
- package/corpus/templates/design/app/i18n/en-US.ts +23 -10
- package/corpus/templates/design/app/pages/Index.tsx +5 -4
- package/corpus/templates/design/app/pages/design-editor/design-editor-view.tsx +2 -1
- 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-14-deselecting-a-layer-keeps-motion-open-and-restores-the-canva.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/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/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/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/scripts/edit-fidelity/authoring-fuzz.ts +63 -0
- 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,28 @@ 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 preview
|
|
239
|
+
|
|
240
|
+
The Sigma workbook flow is preview-only until Analytics can verify the source
|
|
241
|
+
project mapping. The current Sigma connection API reports provider type and
|
|
242
|
+
metadata but does not expose a BigQuery project identifier, so inspection blocks
|
|
243
|
+
all Sigma BigQuery SQL and the import action stays hidden from the agent and
|
|
244
|
+
disabled in the UI. Do not call `migrate-sigma-workbook` or treat an Analytics
|
|
245
|
+
BigQuery credential as proof that it targets the Sigma project. Users can list
|
|
246
|
+
workbooks with `list-sigma-workbooks` and preview one with
|
|
247
|
+
`inspect-sigma-workbook`. The feature is controlled by
|
|
248
|
+
`analytics.sigma-dashboard-migration` and requires a granted Sigma connection.
|
|
249
|
+
The Dispatch setup link can create a Sigma workspace connection from
|
|
250
|
+
Vault-backed client ID and client secret references and grant Analytics access;
|
|
251
|
+
never copy their values into Analytics settings.
|
|
252
|
+
|
|
253
|
+
If Sigma adds verifiable source mapping in the future, the planned import will
|
|
254
|
+
create a private snapshot in the user's personal `Sigma` folder. Other source
|
|
255
|
+
types and unsupported elements will become review callouts. Preserve migration
|
|
256
|
+
warnings and never describe a future result as parity-complete or automatically
|
|
257
|
+
synchronized. Sigma's workbook-code API is public Beta and can omit unsupported
|
|
258
|
+
workbook features before inspection receives the response.
|
|
259
|
+
|
|
238
260
|
The source tree ships four provider-free v2 manifests in
|
|
239
261
|
`server/lib/native-v2-dashboards.ts`: Customer ROI, Account Engagement,
|
|
240
262
|
Cross-sell, and Win / Loss. They intentionally contain no customer names,
|
|
@@ -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()
|
|
@@ -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
|
},
|
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core/action";
|
|
2
|
+
import { buildDeepLink } from "@agent-native/core/server";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
listExternalDashboards,
|
|
7
|
+
type ExternalDashboardMigrationStatus,
|
|
8
|
+
} from "../server/lib/bi-migration/external-dashboards-store.js";
|
|
9
|
+
import { listSigmaWorkbooks } from "../server/lib/bi-migration/sigma-adapter.js";
|
|
10
|
+
import { resolveSigmaConnectionSelection } from "../server/lib/bi-migration/sigma-connections.js";
|
|
11
|
+
import {
|
|
12
|
+
requireSigmaMigrationContext,
|
|
13
|
+
sigmaMigrationSetupLink,
|
|
14
|
+
} from "../server/lib/bi-migration/sigma-migration.js";
|
|
15
|
+
import { loadAccessibleDashboardMetadataByIds } from "../server/lib/dashboards-store.js";
|
|
16
|
+
|
|
17
|
+
const listSchema = z.object({
|
|
18
|
+
connectionId: z
|
|
19
|
+
.string()
|
|
20
|
+
.trim()
|
|
21
|
+
.min(1)
|
|
22
|
+
.max(200)
|
|
23
|
+
.optional()
|
|
24
|
+
.describe("Selected connected Sigma workspace connection, when needed."),
|
|
25
|
+
page: z
|
|
26
|
+
.string()
|
|
27
|
+
.trim()
|
|
28
|
+
.min(1)
|
|
29
|
+
.max(2_000)
|
|
30
|
+
.optional()
|
|
31
|
+
.describe("Opaque Sigma pagination cursor returned by the previous page."),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export default defineAction({
|
|
35
|
+
description:
|
|
36
|
+
"List Sigma workbooks accessible to the granted Analytics Sigma connection. Returns workbook metadata, preview status, retry eligibility, and a dashboard link only when the current user owns and can access the imported dashboard. Sigma workbook imports remain disabled until the source project mapping can be verified.",
|
|
37
|
+
schema: listSchema,
|
|
38
|
+
http: { method: "GET" },
|
|
39
|
+
readOnly: true,
|
|
40
|
+
mcpTool: false,
|
|
41
|
+
publicAgent: { expose: true, readOnly: true, requiresAuth: true },
|
|
42
|
+
run: async (args) => {
|
|
43
|
+
const context = await requireSigmaMigrationContext();
|
|
44
|
+
const selection = await resolveSigmaConnectionSelection(args.connectionId);
|
|
45
|
+
const connected = selection.connections.some(
|
|
46
|
+
(connection) => connection.status === "connected",
|
|
47
|
+
);
|
|
48
|
+
const setupUrl = sigmaMigrationSetupLink("sigma");
|
|
49
|
+
if (!selection.selected) {
|
|
50
|
+
return {
|
|
51
|
+
connected,
|
|
52
|
+
connections: selection.connections,
|
|
53
|
+
requiresConnectionSelection: selection.requiresSelection,
|
|
54
|
+
setupUrl,
|
|
55
|
+
workbooks: [],
|
|
56
|
+
nextPage: null,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const page = await listSigmaWorkbooks({
|
|
61
|
+
connectionId: selection.selected.id,
|
|
62
|
+
page: args.page,
|
|
63
|
+
limit: 100,
|
|
64
|
+
});
|
|
65
|
+
const migrations = await listExternalDashboards({
|
|
66
|
+
provider: "sigma",
|
|
67
|
+
sourceIds: page.workbooks.map((workbook) => workbook.workbookId),
|
|
68
|
+
limit: 100,
|
|
69
|
+
});
|
|
70
|
+
const migrationBySourceId = new Map(
|
|
71
|
+
migrations.map((migration) => [migration.sourceId, migration]),
|
|
72
|
+
);
|
|
73
|
+
const dashboardIds = migrations.flatMap((migration) =>
|
|
74
|
+
migration.status === "migrated" &&
|
|
75
|
+
migration.migratedByCurrentUser &&
|
|
76
|
+
migration.targetDashboardId
|
|
77
|
+
? [migration.targetDashboardId]
|
|
78
|
+
: [],
|
|
79
|
+
);
|
|
80
|
+
const dashboards = await loadAccessibleDashboardMetadataByIds(
|
|
81
|
+
{ email: context.userEmail, orgId: context.orgId },
|
|
82
|
+
dashboardIds,
|
|
83
|
+
);
|
|
84
|
+
const dashboardById = new Map(
|
|
85
|
+
dashboards.map((dashboard) => [dashboard.id, dashboard]),
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
const workbooks = page.workbooks.map((workbook) => {
|
|
89
|
+
const migration = migrationBySourceId.get(workbook.workbookId);
|
|
90
|
+
const status: ExternalDashboardMigrationStatus =
|
|
91
|
+
migration?.status ?? "not_started";
|
|
92
|
+
const migrationDashboard =
|
|
93
|
+
migration?.status === "migrated" &&
|
|
94
|
+
migration.migratedByCurrentUser &&
|
|
95
|
+
migration.targetDashboardId
|
|
96
|
+
? dashboardById.get(migration.targetDashboardId)
|
|
97
|
+
: undefined;
|
|
98
|
+
let dashboardId: string | undefined;
|
|
99
|
+
let dashboardName: string | undefined;
|
|
100
|
+
if (
|
|
101
|
+
migration?.status === "migrated" &&
|
|
102
|
+
migration.migratedByCurrentUser &&
|
|
103
|
+
migration.targetDashboardId
|
|
104
|
+
) {
|
|
105
|
+
const dashboard = dashboardById.get(migration.targetDashboardId);
|
|
106
|
+
if (
|
|
107
|
+
dashboard?.kind === "sql" &&
|
|
108
|
+
dashboard.ownerEmail.toLowerCase() === context.userEmail &&
|
|
109
|
+
dashboard.orgId === context.orgId
|
|
110
|
+
) {
|
|
111
|
+
dashboardId = dashboard.id;
|
|
112
|
+
dashboardName = dashboard.title;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
id: workbook.workbookId,
|
|
117
|
+
name: workbook.name,
|
|
118
|
+
...(typeof workbook.isArchived === "boolean"
|
|
119
|
+
? { isArchived: workbook.isArchived }
|
|
120
|
+
: {}),
|
|
121
|
+
...(workbook.path ? { path: workbook.path } : {}),
|
|
122
|
+
...(workbook.updatedAt ? { updatedAt: workbook.updatedAt } : {}),
|
|
123
|
+
status,
|
|
124
|
+
...(dashboardId
|
|
125
|
+
? {
|
|
126
|
+
dashboardId,
|
|
127
|
+
dashboardName,
|
|
128
|
+
dashboardUrl: buildDeepLink({
|
|
129
|
+
app: "analytics",
|
|
130
|
+
view: "adhoc",
|
|
131
|
+
params: { dashboardId },
|
|
132
|
+
}),
|
|
133
|
+
}
|
|
134
|
+
: {}),
|
|
135
|
+
...(migration?.status === "migrated" &&
|
|
136
|
+
migration.migratedByCurrentUser &&
|
|
137
|
+
migration.targetDashboardId &&
|
|
138
|
+
!migrationDashboard
|
|
139
|
+
? { canRecoverMissingDashboard: true }
|
|
140
|
+
: {}),
|
|
141
|
+
...(migration?.status === "migrating" && migration.canRetryStaleClaim
|
|
142
|
+
? { canRetryStaleClaim: true }
|
|
143
|
+
: {}),
|
|
144
|
+
...(migration?.flaggedCount
|
|
145
|
+
? { flaggedCount: migration.flaggedCount }
|
|
146
|
+
: {}),
|
|
147
|
+
retryableByCurrentUser:
|
|
148
|
+
status !== "failed" || migration?.migratedByCurrentUser === true,
|
|
149
|
+
...(migration?.status === "migrated" && !migration.migratedByCurrentUser
|
|
150
|
+
? { migratedByTeammate: true }
|
|
151
|
+
: {}),
|
|
152
|
+
};
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
return {
|
|
156
|
+
connected,
|
|
157
|
+
connectionId: selection.selected.id,
|
|
158
|
+
connectionLabel: selection.selected.label,
|
|
159
|
+
connections: selection.connections,
|
|
160
|
+
requiresConnectionSelection: false,
|
|
161
|
+
setupUrl,
|
|
162
|
+
workbooks,
|
|
163
|
+
nextPage: page.nextPage,
|
|
164
|
+
...(page.total !== undefined ? { total: page.total } : {}),
|
|
165
|
+
};
|
|
166
|
+
},
|
|
167
|
+
});
|