@agent-native/core-corpus 0.201.1 → 0.202.0-nightly-20261006033736
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/session-replay/SKILL.md +5 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/interpolate.ts +27 -1
- package/corpus/templates/analytics/changelog/2026-10-02-dashboard-queries-preserve-recording-permissions-across-supp.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-05-agent-links-copied-from-a-dashboard-analysis-or-session-repl.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-05-bigquery-dashboard-filters-work-with-values-that-contain-apo.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-05-session-replay-agent-links-stay-usable-with-large-event-list.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
- package/corpus/templates/analytics/server/handlers/session-replay.ts +1 -1
- package/corpus/templates/analytics/server/lib/analytics-alerts.ts +2 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +207 -206
- package/corpus/templates/analytics/server/lib/first-party-analytics-cache.ts +42 -4
- package/corpus/templates/analytics/server/lib/first-party-analytics-sql-policy.ts +261 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +253 -528
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +1 -1
- package/corpus/templates/analytics/server/lib/session-replay-agent-context.ts +2 -3
- package/corpus/templates/analytics/server/lib/session-replay.ts +5 -5
- package/corpus/templates/analytics/server/plugins/auth.ts +2 -2
- package/corpus/templates/assets/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
- package/corpus/templates/assets/server/plugins/auth.ts +2 -2
- package/corpus/templates/brain/server/plugins/auth.ts +2 -2
- package/corpus/templates/calendar/app/pages/BookingPage.tsx +6 -4
- package/corpus/templates/calendar/app/vite-env.d.ts +0 -1
- package/corpus/templates/calendar/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
- package/corpus/templates/calendar/package.json +0 -3
- package/corpus/templates/calendar/server/plugins/auth.ts +2 -2
- package/corpus/templates/calendar/tsconfig.json +1 -1
- package/corpus/templates/calendar/vite.config.ts +0 -2
- package/corpus/templates/calendar/vitest.config.ts +0 -2
- package/corpus/templates/chat/server/plugins/auth.ts +2 -2
- package/corpus/templates/clips/changelog/2026-10-05-agent-links-copied-from-a-clip-are-shorter-so-claude-can-fet.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
- package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +10 -4
- package/corpus/templates/clips/server/plugins/auth.ts +2 -2
- package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +10 -5
- package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +10 -2
- package/corpus/templates/content/AGENTS.md +1 -1
- package/corpus/templates/content/actions/_document-access.ts +20 -15
- package/corpus/templates/content/actions/get-trashed-document.ts +17 -15
- package/corpus/templates/content/actions/restore-document.ts +4 -2
- package/corpus/templates/content/app/components/editor/CommentRow.tsx +49 -27
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +26 -10
- package/corpus/templates/content/app/components/editor/DocumentAccessScreen.tsx +202 -0
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +101 -66
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +6 -2
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +17 -0
- package/corpus/templates/content/app/components/editor/database/ContentTable.tsx +156 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseTableGrid.tsx +10 -4
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +146 -78
- package/corpus/templates/content/app/components/editor/database/DatabaseViewSkeleton.tsx +1 -2
- package/corpus/templates/content/app/components/editor/extensions/NotionExtensions.tsx +14 -8
- package/corpus/templates/content/app/components/editor/suggestions/model.ts +50 -5
- package/corpus/templates/content/app/components/editor/suggestions/read-only-blocks.ts +107 -22
- package/corpus/templates/content/app/i18n-data.ts +9 -2
- package/corpus/templates/content/app/routes/_app.access-requests.$requestId.tsx +5 -0
- package/corpus/templates/content/changelog/2026-10-02-a-page-link-you-cant-open-now-says-whether-the-page-exists.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-collections-fit-phones-tablets-and-open-side-panels-view-tab.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-comment-and-suggestion-headers-keep-the-author-s-name-and-ti.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-suggest-edits-works-on-pages-written-by-agents-including-pag.md +1 -1
- package/corpus/templates/content/changelog/2026-10-02-while-you-suggest-edits-tables-and-other-blocks-that-suggest.md +1 -1
- package/corpus/templates/content/changelog/2026-10-02-you-and-agents-can-now-suggest-edits-to-the-text-inside-tabl.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-you-can-now-request-access-to-a-page-you-don-t-have-access-t.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-accepting-a-suggestion-whose-surrounding-text-changed-now-sa.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-agent-links-copied-from-a-document-are-shorter-so-claude-can.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-long-comments-now-scroll-inside-their-card-instead-of-jumpin.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-suggested-edits-that-rewrite-a-phrase-show-one-replacement.md +6 -0
- package/corpus/templates/content/docs/product/capabilities/content.access.visibility-closure.md +20 -7
- package/corpus/templates/content/docs/product/capabilities/content.workspace.session-restore.md +2 -2
- package/corpus/templates/content/server/db/index.ts +22 -0
- package/corpus/templates/content/server/lib/chatgpt-directory-tools.ts +1 -0
- package/corpus/templates/content/server/lib/content-trash-purge.ts +10 -4
- package/corpus/templates/content/server/lib/suggested-edits.ts +119 -16
- package/corpus/templates/content/server/plugins/auth.ts +2 -2
- package/corpus/templates/content/server/routes/api/_agent-native-background/content-trash-purge-worker.post.ts +6 -5
- package/corpus/templates/content/shared/suggestion-diff.ts +164 -49
- package/corpus/templates/content/shared/suggestion-formatting.ts +176 -44
- package/corpus/templates/content/shared/suggestion-rebase.ts +152 -19
- package/corpus/templates/crm/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
- package/corpus/templates/crm/server/plugins/auth.ts +2 -2
- package/corpus/templates/design/app/pages/Index.tsx +3 -2
- package/corpus/templates/design/changelog/2026-10-05-agent-links-copied-from-a-design-are-shorter-so-claude-can-f.md +6 -0
- package/corpus/templates/design/changelog/2026-10-05-sending-a-prompt-checks-ai-is-still-connected.md +6 -0
- package/corpus/templates/design/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
- package/corpus/templates/design/server/plugins/auth.ts +2 -2
- package/corpus/templates/dispatch/changelog/2026-10-05-restored-default-apps-in-dispatch-and-kept-their-links-on-th.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
- package/corpus/templates/factory/server/plugins/auth.ts +2 -2
- package/corpus/templates/forms/server/plugins/auth.ts +2 -2
- package/corpus/templates/mail/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
- package/corpus/templates/mail/server/plugins/auth.ts +2 -2
- package/corpus/templates/plan/server/plugins/auth.ts +2 -2
- package/corpus/templates/slides/agent-native.app-skill.json +3 -3
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +16 -0
- package/corpus/templates/slides/app/components/editor/QuestionFlow.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/in-place-text-session.ts +432 -75
- package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/slides/app/hooks/use-new-deck-generation.ts +120 -9
- package/corpus/templates/slides/app/lib/generation-state.ts +2 -1
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +110 -49
- package/corpus/templates/slides/app/pages/Index.tsx +18 -1
- package/corpus/templates/slides/changelog/2026-10-03-list-edits-keep-anchored-slide-layouts-in-place.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-05-agent-links-copied-from-a-deck-are-shorter-so-claude-can-fet.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-05-ai-setup-checks-use-a-fresh-status-before-sending-even-when-.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-05-slide-text-navigation-and-drag-layout.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-05-slides-keeps-generation-progress-visible-restores-pending-qu.md +6 -0
- package/corpus/templates/slides/scripts/edit-fidelity/README.md +21 -4
- package/corpus/templates/slides/scripts/edit-fidelity/authoring-fuzz.ts +182 -55
- package/corpus/templates/slides/scripts/edit-fidelity/lib/in-page.ts +494 -20
- package/corpus/templates/slides/scripts/edit-fidelity/lib/metrics.ts +546 -19
- package/corpus/templates/slides/scripts/edit-fidelity/retry-infra.ts +7 -0
- package/corpus/templates/slides/scripts/edit-fidelity/run-options.ts +12 -0
- package/corpus/templates/slides/scripts/edit-fidelity/run.ts +664 -69
- package/corpus/templates/slides/server/lib/chatgpt-directory-tools.ts +1 -0
- package/corpus/templates/slides/server/plugins/auth.ts +2 -2
- package/corpus/templates/tasks/server/plugins/auth.ts +2 -2
- package/package.json +1 -1
- package/corpus/templates/calendar/app/components/booking/ocean/brand-colors.ts +0 -45
- package/corpus/templates/calendar/app/components/booking/ocean/camera.ts +0 -28
- package/corpus/templates/calendar/app/components/booking/ocean/hero-ocean-background.tsx +0 -154
- package/corpus/templates/calendar/app/components/booking/ocean/ocean-colors.ts +0 -11
- package/corpus/templates/calendar/app/components/booking/ocean/ocean-graph.ts +0 -29
- package/corpus/templates/calendar/app/components/booking/ocean/renderer.ts +0 -684
- package/corpus/templates/calendar/app/components/booking/ocean/tuning.ts +0 -131
- package/corpus/templates/calendar/app/components/booking/ocean/webgpu-support.ts +0 -12
- package/corpus/templates/calendar/app/components/booking/ocean-booking-background.tsx +0 -48
package/corpus/README.md
CHANGED
|
@@ -26,6 +26,11 @@ agent answers about browser recordings in the Analytics template.
|
|
|
26
26
|
browser or agent.
|
|
27
27
|
- Playback bytes must go through scoped server helpers that check
|
|
28
28
|
`session-recording` access before reading private blob refs.
|
|
29
|
+
- First-party SQL (`query-agent-native-analytics`, dashboard panels) reads
|
|
30
|
+
`session_recordings` through the same `session-recording` access rule as
|
|
31
|
+
the UI: the caller's own recordings, plus recordings in the active org that
|
|
32
|
+
are org-visible or shared with the caller or that org. Any new SQL path over
|
|
33
|
+
recordings must use that rule, not an `org_id` match.
|
|
29
34
|
- SQL inline chunks are a local/dev fallback only; production should use
|
|
30
35
|
private or encrypted blob storage.
|
|
31
36
|
- A local Analytics app pointed at a production database must also use the key
|
|
@@ -2,9 +2,31 @@ function escapeSqlValue(value: string): string {
|
|
|
2
2
|
return value.replace(/'/g, "''");
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
// GoogleSQL has no doubled-quote escape: 'o''brien' is a syntax error, and an
|
|
6
|
+
// unescaped backslash would swallow the closing quote.
|
|
7
|
+
function escapeGoogleSqlValue(value: string): string {
|
|
8
|
+
const escapes: Record<string, string> = {
|
|
9
|
+
"\\": "\\\\",
|
|
10
|
+
"'": "\\'",
|
|
11
|
+
'"': '\\"',
|
|
12
|
+
"\n": "\\n",
|
|
13
|
+
"\r": "\\r",
|
|
14
|
+
"\t": "\\t",
|
|
15
|
+
"\b": "\\b",
|
|
16
|
+
"\f": "\\f",
|
|
17
|
+
};
|
|
18
|
+
return value.replace(
|
|
19
|
+
/[\\'"\x00-\x1f\x7f]/g,
|
|
20
|
+
(character) =>
|
|
21
|
+
escapes[character] ??
|
|
22
|
+
`\\x${character.charCodeAt(0).toString(16).padStart(2, "0")}`,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
5
26
|
export interface InterpolateOptions {
|
|
6
27
|
failClosedTimeVariables?: boolean;
|
|
7
28
|
customDateRangeSupport?: boolean;
|
|
29
|
+
googleSqlValues?: boolean;
|
|
8
30
|
}
|
|
9
31
|
|
|
10
32
|
// ponytail: daily date spines cap custom ranges at roughly ten years; use per-query budgets if wider history becomes a supported need.
|
|
@@ -29,6 +51,8 @@ export function interpolateDashboardPanelSql(
|
|
|
29
51
|
config.timeScope !== "fixed-window" &&
|
|
30
52
|
config.timeScope !== "cohort-history" &&
|
|
31
53
|
config.timeScope !== "all-time",
|
|
54
|
+
// First-party panels are PostgreSQL SQL that the BigQuery binder re-quotes.
|
|
55
|
+
googleSqlValues: panel.source === "bigquery",
|
|
32
56
|
});
|
|
33
57
|
}
|
|
34
58
|
|
|
@@ -169,6 +193,8 @@ export function interpolate(
|
|
|
169
193
|
return "__missing_dashboard_time_filter__";
|
|
170
194
|
}
|
|
171
195
|
if (value == null) return "";
|
|
172
|
-
return
|
|
196
|
+
return options.googleSqlValues
|
|
197
|
+
? escapeGoogleSqlValue(String(value))
|
|
198
|
+
: escapeSqlValue(String(value));
|
|
173
199
|
});
|
|
174
200
|
}
|
|
@@ -242,7 +242,7 @@ function replayChunkSeqsFromQuery(query: Record<string, unknown>): number[] {
|
|
|
242
242
|
function verifyAgentReplayAccessToken(
|
|
243
243
|
event: any,
|
|
244
244
|
recordingId: string,
|
|
245
|
-
): { token: string; viewerEmail
|
|
245
|
+
): { token: string; viewerEmail?: string } | null | false {
|
|
246
246
|
const token = readAgentReplayAccessToken(event);
|
|
247
247
|
if (!token) return null;
|
|
248
248
|
const access = resolveSessionReplayAgentAccess(recordingId, token);
|
|
@@ -1007,6 +1007,8 @@ export function buildBigQueryAlertQuery(
|
|
|
1007
1007
|
return `SELECT * FROM (${candidateSql}) AS analytics_alert_page${cursorPredicate ? ` WHERE ${cursorPredicate}` : ""} ORDER BY timestamp DESC, id DESC`;
|
|
1008
1008
|
}
|
|
1009
1009
|
|
|
1010
|
+
// PostgreSQL quoting on purpose: queryFirstPartyAnalytics lexes this SQL as
|
|
1011
|
+
// PostgreSQL, and its binder re-quotes every literal for GoogleSQL.
|
|
1010
1012
|
function bigQuerySqlLiteral(value: string): string {
|
|
1011
1013
|
return `'${value.replace(/'/g, "''")}'`;
|
|
1012
1014
|
}
|