@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.
Files changed (127) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +5 -0
  3. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/interpolate.ts +27 -1
  4. package/corpus/templates/analytics/changelog/2026-10-02-dashboard-queries-preserve-recording-permissions-across-supp.md +6 -0
  5. package/corpus/templates/analytics/changelog/2026-10-05-agent-links-copied-from-a-dashboard-analysis-or-session-repl.md +6 -0
  6. package/corpus/templates/analytics/changelog/2026-10-05-bigquery-dashboard-filters-work-with-values-that-contain-apo.md +6 -0
  7. package/corpus/templates/analytics/changelog/2026-10-05-session-replay-agent-links-stay-usable-with-large-event-list.md +6 -0
  8. package/corpus/templates/analytics/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
  9. package/corpus/templates/analytics/server/handlers/session-replay.ts +1 -1
  10. package/corpus/templates/analytics/server/lib/analytics-alerts.ts +2 -0
  11. package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +207 -206
  12. package/corpus/templates/analytics/server/lib/first-party-analytics-cache.ts +42 -4
  13. package/corpus/templates/analytics/server/lib/first-party-analytics-sql-policy.ts +261 -0
  14. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +253 -528
  15. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +1 -1
  16. package/corpus/templates/analytics/server/lib/session-replay-agent-context.ts +2 -3
  17. package/corpus/templates/analytics/server/lib/session-replay.ts +5 -5
  18. package/corpus/templates/analytics/server/plugins/auth.ts +2 -2
  19. package/corpus/templates/assets/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
  20. package/corpus/templates/assets/server/plugins/auth.ts +2 -2
  21. package/corpus/templates/brain/server/plugins/auth.ts +2 -2
  22. package/corpus/templates/calendar/app/pages/BookingPage.tsx +6 -4
  23. package/corpus/templates/calendar/app/vite-env.d.ts +0 -1
  24. package/corpus/templates/calendar/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
  25. package/corpus/templates/calendar/package.json +0 -3
  26. package/corpus/templates/calendar/server/plugins/auth.ts +2 -2
  27. package/corpus/templates/calendar/tsconfig.json +1 -1
  28. package/corpus/templates/calendar/vite.config.ts +0 -2
  29. package/corpus/templates/calendar/vitest.config.ts +0 -2
  30. package/corpus/templates/chat/server/plugins/auth.ts +2 -2
  31. package/corpus/templates/clips/changelog/2026-10-05-agent-links-copied-from-a-clip-are-shorter-so-claude-can-fet.md +6 -0
  32. package/corpus/templates/clips/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
  33. package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +10 -4
  34. package/corpus/templates/clips/server/plugins/auth.ts +2 -2
  35. package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +10 -5
  36. package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +10 -2
  37. package/corpus/templates/content/AGENTS.md +1 -1
  38. package/corpus/templates/content/actions/_document-access.ts +20 -15
  39. package/corpus/templates/content/actions/get-trashed-document.ts +17 -15
  40. package/corpus/templates/content/actions/restore-document.ts +4 -2
  41. package/corpus/templates/content/app/components/editor/CommentRow.tsx +49 -27
  42. package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +26 -10
  43. package/corpus/templates/content/app/components/editor/DocumentAccessScreen.tsx +202 -0
  44. package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +101 -66
  45. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +6 -2
  46. package/corpus/templates/content/app/components/editor/VisualEditor.tsx +17 -0
  47. package/corpus/templates/content/app/components/editor/database/ContentTable.tsx +156 -1
  48. package/corpus/templates/content/app/components/editor/database/DatabaseTableGrid.tsx +10 -4
  49. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +146 -78
  50. package/corpus/templates/content/app/components/editor/database/DatabaseViewSkeleton.tsx +1 -2
  51. package/corpus/templates/content/app/components/editor/extensions/NotionExtensions.tsx +14 -8
  52. package/corpus/templates/content/app/components/editor/suggestions/model.ts +50 -5
  53. package/corpus/templates/content/app/components/editor/suggestions/read-only-blocks.ts +107 -22
  54. package/corpus/templates/content/app/i18n-data.ts +9 -2
  55. package/corpus/templates/content/app/routes/_app.access-requests.$requestId.tsx +5 -0
  56. package/corpus/templates/content/changelog/2026-10-02-a-page-link-you-cant-open-now-says-whether-the-page-exists.md +6 -0
  57. package/corpus/templates/content/changelog/2026-10-02-collections-fit-phones-tablets-and-open-side-panels-view-tab.md +6 -0
  58. package/corpus/templates/content/changelog/2026-10-02-comment-and-suggestion-headers-keep-the-author-s-name-and-ti.md +6 -0
  59. package/corpus/templates/content/changelog/2026-10-02-suggest-edits-works-on-pages-written-by-agents-including-pag.md +1 -1
  60. package/corpus/templates/content/changelog/2026-10-02-while-you-suggest-edits-tables-and-other-blocks-that-suggest.md +1 -1
  61. package/corpus/templates/content/changelog/2026-10-02-you-and-agents-can-now-suggest-edits-to-the-text-inside-tabl.md +6 -0
  62. 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
  63. package/corpus/templates/content/changelog/2026-10-05-accepting-a-suggestion-whose-surrounding-text-changed-now-sa.md +6 -0
  64. package/corpus/templates/content/changelog/2026-10-05-agent-links-copied-from-a-document-are-shorter-so-claude-can.md +6 -0
  65. package/corpus/templates/content/changelog/2026-10-05-long-comments-now-scroll-inside-their-card-instead-of-jumpin.md +6 -0
  66. package/corpus/templates/content/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
  67. package/corpus/templates/content/changelog/2026-10-05-suggested-edits-that-rewrite-a-phrase-show-one-replacement.md +6 -0
  68. package/corpus/templates/content/docs/product/capabilities/content.access.visibility-closure.md +20 -7
  69. package/corpus/templates/content/docs/product/capabilities/content.workspace.session-restore.md +2 -2
  70. package/corpus/templates/content/server/db/index.ts +22 -0
  71. package/corpus/templates/content/server/lib/chatgpt-directory-tools.ts +1 -0
  72. package/corpus/templates/content/server/lib/content-trash-purge.ts +10 -4
  73. package/corpus/templates/content/server/lib/suggested-edits.ts +119 -16
  74. package/corpus/templates/content/server/plugins/auth.ts +2 -2
  75. package/corpus/templates/content/server/routes/api/_agent-native-background/content-trash-purge-worker.post.ts +6 -5
  76. package/corpus/templates/content/shared/suggestion-diff.ts +164 -49
  77. package/corpus/templates/content/shared/suggestion-formatting.ts +176 -44
  78. package/corpus/templates/content/shared/suggestion-rebase.ts +152 -19
  79. package/corpus/templates/crm/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
  80. package/corpus/templates/crm/server/plugins/auth.ts +2 -2
  81. package/corpus/templates/design/app/pages/Index.tsx +3 -2
  82. package/corpus/templates/design/changelog/2026-10-05-agent-links-copied-from-a-design-are-shorter-so-claude-can-f.md +6 -0
  83. package/corpus/templates/design/changelog/2026-10-05-sending-a-prompt-checks-ai-is-still-connected.md +6 -0
  84. package/corpus/templates/design/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
  85. package/corpus/templates/design/server/plugins/auth.ts +2 -2
  86. package/corpus/templates/dispatch/changelog/2026-10-05-restored-default-apps-in-dispatch-and-kept-their-links-on-th.md +6 -0
  87. package/corpus/templates/dispatch/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
  88. package/corpus/templates/factory/server/plugins/auth.ts +2 -2
  89. package/corpus/templates/forms/server/plugins/auth.ts +2 -2
  90. package/corpus/templates/mail/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
  91. package/corpus/templates/mail/server/plugins/auth.ts +2 -2
  92. package/corpus/templates/plan/server/plugins/auth.ts +2 -2
  93. package/corpus/templates/slides/agent-native.app-skill.json +3 -3
  94. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +16 -0
  95. package/corpus/templates/slides/app/components/editor/QuestionFlow.tsx +2 -1
  96. package/corpus/templates/slides/app/components/editor/in-place-text-session.ts +432 -75
  97. package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -0
  98. package/corpus/templates/slides/app/hooks/use-new-deck-generation.ts +120 -9
  99. package/corpus/templates/slides/app/lib/generation-state.ts +2 -1
  100. package/corpus/templates/slides/app/pages/DeckEditor.tsx +110 -49
  101. package/corpus/templates/slides/app/pages/Index.tsx +18 -1
  102. package/corpus/templates/slides/changelog/2026-10-03-list-edits-keep-anchored-slide-layouts-in-place.md +6 -0
  103. package/corpus/templates/slides/changelog/2026-10-05-agent-links-copied-from-a-deck-are-shorter-so-claude-can-fet.md +6 -0
  104. package/corpus/templates/slides/changelog/2026-10-05-ai-setup-checks-use-a-fresh-status-before-sending-even-when-.md +6 -0
  105. package/corpus/templates/slides/changelog/2026-10-05-sign-in-and-signup-pages-now-share-the-animated-agent-native.md +6 -0
  106. package/corpus/templates/slides/changelog/2026-10-05-slide-text-navigation-and-drag-layout.md +6 -0
  107. package/corpus/templates/slides/changelog/2026-10-05-slides-keeps-generation-progress-visible-restores-pending-qu.md +6 -0
  108. package/corpus/templates/slides/scripts/edit-fidelity/README.md +21 -4
  109. package/corpus/templates/slides/scripts/edit-fidelity/authoring-fuzz.ts +182 -55
  110. package/corpus/templates/slides/scripts/edit-fidelity/lib/in-page.ts +494 -20
  111. package/corpus/templates/slides/scripts/edit-fidelity/lib/metrics.ts +546 -19
  112. package/corpus/templates/slides/scripts/edit-fidelity/retry-infra.ts +7 -0
  113. package/corpus/templates/slides/scripts/edit-fidelity/run-options.ts +12 -0
  114. package/corpus/templates/slides/scripts/edit-fidelity/run.ts +664 -69
  115. package/corpus/templates/slides/server/lib/chatgpt-directory-tools.ts +1 -0
  116. package/corpus/templates/slides/server/plugins/auth.ts +2 -2
  117. package/corpus/templates/tasks/server/plugins/auth.ts +2 -2
  118. package/package.json +1 -1
  119. package/corpus/templates/calendar/app/components/booking/ocean/brand-colors.ts +0 -45
  120. package/corpus/templates/calendar/app/components/booking/ocean/camera.ts +0 -28
  121. package/corpus/templates/calendar/app/components/booking/ocean/hero-ocean-background.tsx +0 -154
  122. package/corpus/templates/calendar/app/components/booking/ocean/ocean-colors.ts +0 -11
  123. package/corpus/templates/calendar/app/components/booking/ocean/ocean-graph.ts +0 -29
  124. package/corpus/templates/calendar/app/components/booking/ocean/renderer.ts +0 -684
  125. package/corpus/templates/calendar/app/components/booking/ocean/tuning.ts +0 -131
  126. package/corpus/templates/calendar/app/components/booking/ocean/webgpu-support.ts +0 -12
  127. package/corpus/templates/calendar/app/components/booking/ocean-booking-background.tsx +0 -48
package/corpus/README.md CHANGED
@@ -32,4 +32,4 @@ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core-corpus/corpu
32
32
 
33
33
  ## Generated Counts
34
34
 
35
- - template files: 11159
35
+ - template files: 11187
@@ -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 escapeSqlValue(String(value));
196
+ return options.googleSqlValues
197
+ ? escapeGoogleSqlValue(String(value))
198
+ : escapeSqlValue(String(value));
173
199
  });
174
200
  }
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-10-02
4
+ ---
5
+
6
+ Dashboard queries preserve recording permissions across supported SQL formats
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-10-05
4
+ ---
5
+
6
+ Agent links copied from a dashboard, analysis, or session replay are shorter, so Claude can fetch them without hitting its URL length limit.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-10-05
4
+ ---
5
+
6
+ BigQuery dashboard filters work with values that contain apostrophes or backslashes
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-10-05
4
+ ---
5
+
6
+ Session replay agent links stay usable with large event lists and longer agent names.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-10-05
4
+ ---
5
+
6
+ Sign-in and signup pages now share the animated Agent-Native wave.
@@ -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: string } | null | false {
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
  }