@agent-native/core-corpus 0.207.0-nightly-20261011153008 → 0.207.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +1 -1
- package/corpus/templates/analytics/CHANGELOG.md +63 -1
- package/corpus/templates/analytics/actions/find-data.ts +12 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +2 -2
- package/corpus/templates/analytics/changelog/2026-10-11-analytics-finds-data-definitions-faster-and-identifies-user-.md +6 -0
- package/corpus/templates/analytics/evals/README.md +31 -10
- package/corpus/templates/analytics/evals/production-context.ts +25 -33
- package/corpus/templates/analytics/evals/production-source-cases-baseline.snapshot.txt +551 -0
- package/corpus/templates/analytics/evals/production-source-cases.eval.ts +93 -0
- package/corpus/templates/analytics/evals/results/analytics-smartness-before-after.csv +5 -0
- package/corpus/templates/analytics/scripts/build-source-index.ts +116 -17
- package/corpus/templates/analytics/server/lib/analytics-agent-context.ts +19 -5
- package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +73 -0
- package/corpus/templates/analytics/server/lib/data-dictionary-context.ts +14 -0
- package/corpus/templates/assets/CHANGELOG.md +6 -0
- package/corpus/templates/brain/CHANGELOG.md +12 -0
- package/corpus/templates/calendar/CHANGELOG.md +6 -0
- package/corpus/templates/chat/CHANGELOG.md +6 -0
- package/corpus/templates/chat/app/components/home/HomePage.tsx +1 -1
- package/corpus/templates/chat/app/i18n/en-US.ts +1 -1
- package/corpus/templates/clips/CHANGELOG.md +29 -0
- package/corpus/templates/clips/app/components/library/page-header.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +1 -0
- package/corpus/templates/clips/app/routes/import.tsx +3 -3
- package/corpus/templates/clips/app/routes/record.tsx +24 -4
- package/corpus/templates/clips/changelog/2026-10-10-clips-no-longer-treats-a-temporary-storage-status-failure-as.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-11-combo-buttons-keep-both-controls-at-the-same-height.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-11-dedicated-agent-icon.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-11-local-recordings-can-start-before-connecting-a-storage-provi.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-11-recordings-waiting-for-storage-setup-remain-retryable-throug.md +6 -0
- package/corpus/templates/clips/desktop/src/i18n/en-US.ts +1 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +8 -2
- package/corpus/templates/clips/server/lib/upload-lease.ts +6 -0
- package/corpus/templates/clips/server/lib/video-storage.ts +28 -6
- package/corpus/templates/clips/server/plugins/onboarding.ts +2 -1
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +10 -0
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +64 -19
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/interrupt.post.ts +9 -0
- package/corpus/templates/clips/shared/recording-core.ts +19 -1
- package/corpus/templates/content/CHANGELOG.md +39 -0
- package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +44 -37
- package/corpus/templates/content/app/components/editor/CommentAiRecipient.tsx +3 -2
- package/corpus/templates/content/app/components/editor/CommentComposer.tsx +2 -2
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +3 -2
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +3 -7
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +98 -63
- package/corpus/templates/content/app/components/editor/agent-identity.tsx +3 -2
- package/corpus/templates/content/app/components/editor/extensions/CommentHighlight.ts +149 -21
- package/corpus/templates/content/changelog/2026-10-10-accepting-a-suggested-edit-in-a-comment-thread-no-longer-sho.md +6 -0
- package/corpus/templates/content/changelog/2026-10-11-dedicated-agent-icon.md +6 -0
- package/corpus/templates/content/changelog/2026-10-11-share-and-copy-buttons-stay-the-same-height-in-the-editor.md +6 -0
- package/corpus/templates/content/shared/document-intent-merge.ts +4 -2
- package/corpus/templates/crm/CHANGELOG.md +6 -0
- package/corpus/templates/design/CHANGELOG.md +43 -0
- package/corpus/templates/design/actions/get-design.ts +1 -1
- package/corpus/templates/design/actions/navigate.ts +1 -1
- package/corpus/templates/design/actions/view-screen.ts +1 -1
- package/corpus/templates/design/app/components/design/editor/DesignWorkspaceRail.tsx +5 -5
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +2 -2
- package/corpus/templates/design/app/components/layout/Header.tsx +2 -2
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +3 -3
- package/corpus/templates/design/app/i18n/en-US.ts +4 -4
- package/corpus/templates/design/app/pages/design-editor/view/left-sidebar.tsx +1 -1
- package/corpus/templates/design/app/root.tsx +1 -1
- package/corpus/templates/design/changelog/2026-10-11-dedicated-agent-icon.md +6 -0
- package/corpus/templates/design/changelog/2026-10-11-replay-screenshots-can-be-handed-off-to-design-boards.md +8 -0
- package/corpus/templates/design/changelog/2026-10-11-the-editor-s-left-rail-tab-is-now-called-layers-and-the-desi.md +6 -0
- package/corpus/templates/factory/CHANGELOG.md +6 -0
- package/corpus/templates/mail/CHANGELOG.md +6 -0
- package/corpus/templates/plan/CHANGELOG.md +6 -0
- package/corpus/templates/slides/CHANGELOG.md +30 -0
- package/corpus/templates/slides/app/components/editor/SlideSlashCommandMenu.tsx +1 -1
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +1 -8
- package/corpus/templates/slides/app/pages/Index.tsx +2 -1
- package/corpus/templates/slides/changelog/2026-10-11-going-back-from-a-new-slides-generation-returns-home-without.md +6 -0
- package/corpus/templates/slides/scripts/edit-fidelity/authoring-fuzz.ts +1 -1
- package/corpus/templates/tasks/app/components/tasks/fields/TaskFieldsSidebar.tsx +2 -2
- package/package.json +1 -1
- package/corpus/templates/analytics/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/assets/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/brain/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/calendar/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/chat/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/clips/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/content/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/crm/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/design/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/dispatch/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/forms/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/mail/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/plan/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
- package/corpus/templates/slides/.deploy-tmp/agent-native-provided-plugins.mjs +0 -10
package/corpus/README.md
CHANGED
|
@@ -3,16 +3,73 @@
|
|
|
3
3
|
All notable user-facing changes to Agent-Native Analytics are documented here. Open it any
|
|
4
4
|
time from the command menu (Cmd+K → "What's new") or from Settings.
|
|
5
5
|
|
|
6
|
-
## 2026-10-
|
|
6
|
+
## 2026-10-11
|
|
7
|
+
|
|
8
|
+
### Improved
|
|
9
|
+
|
|
10
|
+
- Analytics finds data definitions faster and identifies user-organization relationships more clearly.
|
|
11
|
+
|
|
12
|
+
## 2026-10-10
|
|
7
13
|
|
|
8
14
|
### Improved
|
|
9
15
|
|
|
16
|
+
- Long session recordings start playback while remaining chunks load.
|
|
17
|
+
- Read only the event fields needed for onboarding journeys.
|
|
18
|
+
- The source index reports tracking calls with event names it cannot resolve, making event coverage gaps easier to spot.
|
|
19
|
+
- The data index preserves dbt's declared primary entity separately from its row grain.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Analytics discovery preserves source and freshness details when saved dictionary entries contain blank fields.
|
|
24
|
+
- Analytics now shows BigQuery recommendations only when they apply and marks unavailable index counts clearly.
|
|
25
|
+
- Onboarding journey queries reuse a single event read while preserving exact output attribution
|
|
26
|
+
- Reduce duplicate reads when loading organization onboarding journeys
|
|
27
|
+
- Replay friction scores now count rage clicks that span recording uploads.
|
|
28
|
+
- Session summaries count replay errors and failed requests across uploads without double-counting retries
|
|
29
|
+
- Storyboard export failures now report bounded handoff diagnostics without exposing raw exceptions.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Definitions and the source index now live on one Semantic layer page, which replaces the Source Status and Data Dictionary pages.
|
|
34
|
+
|
|
35
|
+
## 2026-10-09
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- Analytics can query owner-defined dbt metrics through a workspace connection
|
|
40
|
+
- Compare later onboarding activity across first-party sessions and apps, with unknown identities and incomplete observation windows called out.
|
|
41
|
+
- Dashboard folders can now sync with a GitHub repo folder: pull only the panels that changed in GitHub, or export app changes as a pull request, without overwriting edits made elsewhere in the app.
|
|
42
|
+
- Dashboards can filter by several values at once with multi-select filters.
|
|
43
|
+
- Journey capture can render recorded media in Chromium and save visible prompt provenance locally.
|
|
44
|
+
- Review source connections and export the data dictionary from one status page
|
|
45
|
+
|
|
46
|
+
### Improved
|
|
47
|
+
|
|
48
|
+
- Analytics prioritizes reviewed definitions over broad generated matches, keeps exact runnable panels discoverable, reports source-index quality accurately, and continues BigQuery searches without repeating metadata reads.
|
|
49
|
+
- Ask chats now open on their own shareable URL at /ask/<id>, and /ask always starts a blank chat.
|
|
50
|
+
- Dashboard filters support searching, selecting all values, or keeping only one value.
|
|
51
|
+
- Data Sources now lists integrations in the same rows as Settings, with connected sources first and setup in a side sheet.
|
|
52
|
+
- Approved metric definitions rank ahead of dashboard examples for exact name searches.
|
|
53
|
+
- Generated source entries now appear in data dictionary browsing, and new entries remain unapproved until reviewed.
|
|
54
|
+
- Journey captures can check replay media and optionally save a private, bounded copy of visible user messages.
|
|
55
|
+
- Onboarding journey event reads avoid an unused identity scan, cap query cost, and mark follow-up coverage incomplete when results are too large
|
|
56
|
+
- Onboarding journeys now honor the selected date range when reading events.
|
|
57
|
+
- Onboarding summaries return journey counts without waiting for replay metadata.
|
|
10
58
|
- Onboarding journeys include Builder connection and custom-key outcomes through deeper paths
|
|
11
59
|
- Onboarding journeys now show later activity within a chosen window, mark no-later results as right-censored, and identify when follow-up counts are incomplete.
|
|
12
60
|
- You can add app origins to a public key's replay allowlist without replacing its existing origins.
|
|
13
61
|
|
|
14
62
|
### Fixed
|
|
15
63
|
|
|
64
|
+
- First-party BigQuery dashboards use date-bounded weekly activity queries on both saved dashboard versions
|
|
65
|
+
- GitHub source connections use dedicated OAuth app credentials, separate from sign-in.
|
|
66
|
+
- Journey screenshots account for legacy clipping when checking embedded replay content.
|
|
67
|
+
- Journey trees remain available when a matching recording is not visible
|
|
68
|
+
- Onboarding journey queries avoid redundant event reads
|
|
69
|
+
- Onboarding journeys can find recordings from exact replay links even when session IDs differ
|
|
70
|
+
- Onboarding journey summaries load reliably for organizations using Builder Analytics.
|
|
71
|
+
- Replay screenshots finish loading fonts before capture.
|
|
72
|
+
- Replay screenshots support modern CSS colors.
|
|
16
73
|
- Existing chat threads keep the composer anchored at the bottom while their messages load.
|
|
17
74
|
- Journey captures now flag visible previews missing from the recording instead of saving blank screenshots
|
|
18
75
|
- Journey recordings flag iframe content when clipping, masks, or filters make its visibility uncertain.
|
|
@@ -20,6 +77,10 @@ time from the command menu (Cmd+K → "What's new") or from Settings.
|
|
|
20
77
|
- Session recordings keep their full history and performance insights across browser session changes and large replays.
|
|
21
78
|
- Large onboarding journeys keep their step counts when follow-up coverage exceeds query limits
|
|
22
79
|
|
|
80
|
+
### Removed
|
|
81
|
+
|
|
82
|
+
- Removed the default HTTP 5xx spike alert, since server responses are no longer recorded as analytics events
|
|
83
|
+
|
|
23
84
|
## 2026-10-08
|
|
24
85
|
|
|
25
86
|
### Added
|
|
@@ -85,6 +146,7 @@ time from the command menu (Cmd+K → "What's new") or from Settings.
|
|
|
85
146
|
|
|
86
147
|
### Improved
|
|
87
148
|
|
|
149
|
+
- Session replays now show the date and time the session started, and the Sessions list shows start times in a shorter, easier-to-scan format.
|
|
88
150
|
- Agent dashboard edits are now checked against the live chart before they save, so the agent no longer reports a chart change that did not happen.
|
|
89
151
|
|
|
90
152
|
### Fixed
|
|
@@ -37,13 +37,24 @@ export default defineAction({
|
|
|
37
37
|
orgId: getRequestOrgId() || null,
|
|
38
38
|
});
|
|
39
39
|
const { candidates, ...paginationAndCoverage } = result;
|
|
40
|
+
const sourceIndexGuidance =
|
|
41
|
+
result.sourceIndexStatus === "not-configured"
|
|
42
|
+
? "The generated source index is not configured, so absence from these references is not evidence that a warehouse relation does not exist. Use search-bigquery-schema for connected BigQuery schemas."
|
|
43
|
+
: result.sourceIndexStatus === "invalid" ||
|
|
44
|
+
result.sourceIndexStatus === "unavailable"
|
|
45
|
+
? "The generated source index could not be read, so treat these references as incomplete and verify with search-bigquery-schema."
|
|
46
|
+
: "";
|
|
40
47
|
return {
|
|
41
48
|
question,
|
|
42
49
|
results: candidates,
|
|
43
50
|
...paginationAndCoverage,
|
|
44
51
|
resultType: "reference-metadata",
|
|
45
|
-
guidance:
|
|
52
|
+
guidance: [
|
|
46
53
|
"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.",
|
|
54
|
+
sourceIndexGuidance,
|
|
55
|
+
]
|
|
56
|
+
.filter(Boolean)
|
|
57
|
+
.join(" "),
|
|
47
58
|
};
|
|
48
59
|
},
|
|
49
60
|
});
|
|
@@ -2635,12 +2635,12 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
|
|
|
2635
2635
|
</div>
|
|
2636
2636
|
</nav>
|
|
2637
2637
|
|
|
2638
|
-
<div className="mt-3 shrink-0 min-w-0
|
|
2638
|
+
<div className="mt-3 shrink-0 min-w-0">
|
|
2639
2639
|
<AppSidebarFooter
|
|
2640
2640
|
collapsed={false}
|
|
2641
2641
|
collapsible={false}
|
|
2642
2642
|
feedback={footerFeedback}
|
|
2643
|
-
className="
|
|
2643
|
+
className="border-border/70 px-2"
|
|
2644
2644
|
orgSwitcher={
|
|
2645
2645
|
<OrgSwitcher className="min-w-0 flex-1 !px-2 !bg-transparent !text-primary hover:!bg-accent/60 hover:!text-primary" />
|
|
2646
2646
|
}
|
|
@@ -10,8 +10,10 @@ The Analytics adapter assembles the production framework prompt, Analytics
|
|
|
10
10
|
instructions, initial tools, read-only action registry, and request-time catalog
|
|
11
11
|
prefetch. It invokes the shared production `runAgentLoop` with the real Analytics
|
|
12
12
|
final-response guard, caller email, organization id, abort signal, and usage
|
|
13
|
-
capture. The runner checks a bounded receipt for those conditions
|
|
14
|
-
|
|
13
|
+
capture. The runner checks a bounded receipt for those conditions. A failed or
|
|
14
|
+
timed-out catalog prefetch is reported to the model as a context note, as in
|
|
15
|
+
production; the agent can still search with its tools. Aborted runs, missing
|
|
16
|
+
guard/usage, skipped cases, and incorrect answers fail the eval.
|
|
15
17
|
|
|
16
18
|
This exercises the shared production agent-loop boundary; it does not dispatch
|
|
17
19
|
through the mounted HTTP chat handler or its thread/run persistence path. The
|
|
@@ -22,22 +24,41 @@ read from environment variables or app configuration.
|
|
|
22
24
|
If either identity value or the production adapter is missing, the command
|
|
23
25
|
exits with an error before running or scoring any case.
|
|
24
26
|
|
|
27
|
+
## Production path before and after
|
|
28
|
+
|
|
29
|
+
`results/analytics-smartness-before-after.csv` contains two runs per phase for
|
|
30
|
+
the same redacted synthetic case based on the reported Builder.io user and
|
|
31
|
+
organization question. It is not a replay of Brent's historical chat. The CSV
|
|
32
|
+
contains only run timing, token and tool counts, credits, and scorer outcomes;
|
|
33
|
+
it has no prompts, transcripts, emails, identifiers, row values, or secrets.
|
|
34
|
+
|
|
35
|
+
Both phases completed through the production agent loop, but both failed the
|
|
36
|
+
source-contract scorer because the production organization had no generated
|
|
37
|
+
source index configured at evaluation time. Mean latency fell from 101.4s to
|
|
38
|
+
83.7s (17.4%), mean LLM calls from 14.5 to 12 (17.2%), and mean input tokens
|
|
39
|
+
from 908k to 855k (5.8%). This establishes a faster lookup path, not an
|
|
40
|
+
accuracy improvement. The generated index now includes the missing membership
|
|
41
|
+
grains; rerun the same cases after the index is imported to measure the
|
|
42
|
+
accuracy gain. No production index or data rows were written for this eval.
|
|
43
|
+
|
|
25
44
|
## Synthetic source and grain cases
|
|
26
45
|
|
|
27
|
-
`production-source-cases.eval.ts` adds
|
|
28
|
-
|
|
29
|
-
people, identifiers, event rows, or production result
|
|
30
|
-
rejects failed or aborted runs, email-shaped output, and
|
|
31
|
-
metadata-only tool set. The CLI still runs each case through
|
|
32
|
-
production adapter and the shared production agent loop.
|
|
46
|
+
`production-source-cases.eval.ts` adds seven synthetic questions. They ask for
|
|
47
|
+
source selection, declared grain, and relation or field attribution; they do
|
|
48
|
+
not use captured prompts, people, identifiers, event rows, or production result
|
|
49
|
+
values. Their scorer rejects failed or aborted runs, email-shaped output, and
|
|
50
|
+
calls outside the metadata-only tool set. The CLI still runs each case through
|
|
51
|
+
this directory's production adapter and the shared production agent loop.
|
|
33
52
|
|
|
34
53
|
The expected source contracts are:
|
|
35
54
|
|
|
36
55
|
- Builder.io user roster: `dbt_mart.dim_users_core` at user grain,
|
|
37
56
|
`dbt_mart.dim_organizations` at organization grain, joined through
|
|
38
57
|
`dbt_intermediate.user_organization_role` at user-organization membership
|
|
39
|
-
grain.
|
|
40
|
-
|
|
58
|
+
grain. `dbt_mapping.user_id_to_org_id` is also a real one-row-per-membership
|
|
59
|
+
map with `user_id`, `organization_id`, and `is_root_org`; it does not carry
|
|
60
|
+
`organization_role`, so it cannot replace the role bridge for role-aware
|
|
61
|
+
rosters.
|
|
41
62
|
- Builder.io current and historical counts: `dbt_mart.organization_user_count`
|
|
42
63
|
is one row per organization per date; `dbt_mart.aggregate_monthly_users_per_org`
|
|
43
64
|
is one row per organization per month.
|
|
@@ -51,20 +51,32 @@ function toMessages(
|
|
|
51
51
|
return messages;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
function
|
|
54
|
+
export function buildAnalyticsPromptContext(
|
|
55
55
|
systemPrompt: string,
|
|
56
|
-
|
|
57
|
-
ReturnType<typeof retrieveAnalyticsPromptReferences>
|
|
58
|
-
>["jevPromptCandidates"],
|
|
56
|
+
references: Awaited<ReturnType<typeof retrieveAnalyticsPromptReferences>>,
|
|
59
57
|
): string {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
const candidates = references.jevPromptCandidates;
|
|
59
|
+
let prompt = systemPrompt;
|
|
60
|
+
if (candidates.length > 0) {
|
|
61
|
+
const resource = candidates
|
|
62
|
+
.map(
|
|
63
|
+
(candidate) =>
|
|
64
|
+
`### ${candidate.name}\n${candidate.description}\n${candidate.content}`,
|
|
65
|
+
)
|
|
66
|
+
.join("\n\n");
|
|
67
|
+
prompt += `\n\n<resource scope="analytics-catalog">\n${resource}\n</resource>`;
|
|
68
|
+
}
|
|
69
|
+
if (
|
|
70
|
+
references.prefetchStatus === "timed_out" ||
|
|
71
|
+
references.prefetchStatus === "failed"
|
|
72
|
+
) {
|
|
73
|
+
const reason =
|
|
74
|
+
references.prefetchStatus === "timed_out" ? "timed out" : "failed";
|
|
75
|
+
const subject =
|
|
76
|
+
candidates.length > 0 ? "Some preloaded context" : "Preloaded context";
|
|
77
|
+
prompt += `\n\n<context-note>${subject} was unavailable this turn (${reason}); search for anything relevant with the available tools before answering.</context-note>`;
|
|
78
|
+
}
|
|
79
|
+
return prompt;
|
|
68
80
|
}
|
|
69
81
|
|
|
70
82
|
export function filterAnalyticsEvalActions(
|
|
@@ -123,10 +135,7 @@ async function runAnalyticsProductionPath(args: {
|
|
|
123
135
|
deadlineAt: Date.now() + 1_300,
|
|
124
136
|
});
|
|
125
137
|
const runId = `eval:${crypto.randomUUID()}`;
|
|
126
|
-
const prompt =
|
|
127
|
-
args.systemPrompt,
|
|
128
|
-
references.jevPromptCandidates,
|
|
129
|
-
);
|
|
138
|
+
const prompt = buildAnalyticsPromptContext(args.systemPrompt, references);
|
|
130
139
|
const availableTools = actionsToEngineTools(args.actions);
|
|
131
140
|
const initialNames = new Set(args.initialToolNames);
|
|
132
141
|
const tools = availableTools.filter((tool) => initialNames.has(tool.name));
|
|
@@ -195,23 +204,6 @@ async function runAnalyticsProductionPath(args: {
|
|
|
195
204
|
availableActionNames,
|
|
196
205
|
readOnlyActionNames,
|
|
197
206
|
};
|
|
198
|
-
if (
|
|
199
|
-
references.prefetchStatus !== "ok" &&
|
|
200
|
-
references.prefetchStatus !== "empty"
|
|
201
|
-
) {
|
|
202
|
-
return {
|
|
203
|
-
output: {
|
|
204
|
-
text: "",
|
|
205
|
-
toolCalls: [],
|
|
206
|
-
ok: false,
|
|
207
|
-
error: `Analytics request preparation ${references.prefetchStatus}.`,
|
|
208
|
-
runId,
|
|
209
|
-
durationMs: 0,
|
|
210
|
-
},
|
|
211
|
-
receipt,
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
|
|
215
207
|
const started = Date.now();
|
|
216
208
|
let ok = true;
|
|
217
209
|
try {
|