@agent-native/core 0.72.4 → 0.74.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.
Files changed (129) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +67 -0
  3. package/corpus/core/docs/content/skills-guide.md +14 -0
  4. package/corpus/core/docs/content/template-clips.md +7 -1
  5. package/corpus/core/package.json +1 -1
  6. package/corpus/core/src/agent/durable-background.ts +35 -12
  7. package/corpus/core/src/agent/production-agent.ts +55 -8
  8. package/corpus/core/src/cli/create.ts +1 -1
  9. package/corpus/core/src/cli/skills.ts +450 -19
  10. package/corpus/core/src/client/ConnectBuilderCard.tsx +7 -7
  11. package/corpus/core/src/client/NewWorkspaceAppFlow.tsx +1 -1
  12. package/corpus/core/src/client/blocks/library/AnnotatedCodeBlock.tsx +33 -18
  13. package/corpus/core/src/client/blocks/library/annotation-rail.tsx +3 -4
  14. package/corpus/core/src/client/components/CodeRequiredDialog.tsx +5 -8
  15. package/corpus/core/src/server/agent-chat-plugin.ts +7 -7
  16. package/corpus/core/src/server/auth.ts +7 -0
  17. package/corpus/core/src/server/onboarding-html.ts +95 -9
  18. package/corpus/core/src/server/self-dispatch.ts +8 -1
  19. package/corpus/core/src/templates/default/AGENTS.md +4 -0
  20. package/corpus/core/src/templates/default/package.json +2 -1
  21. package/corpus/core/src/templates/headless/AGENTS.md +4 -0
  22. package/corpus/core/src/templates/headless/package.json +1 -0
  23. package/corpus/core/src/templates/workspace-root/AGENTS.md +4 -0
  24. package/corpus/core/src/templates/workspace-root/README.md +4 -0
  25. package/corpus/core/src/templates/workspace-root/package.json +1 -0
  26. package/corpus/templates/analytics/actions/compose-dashboard.ts +34 -0
  27. package/corpus/templates/analytics/actions/install-dashboard-template.ts +51 -3
  28. package/corpus/templates/analytics/actions/update-dashboard.ts +3 -4
  29. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +175 -48
  30. package/corpus/templates/analytics/app/global.css +15 -13
  31. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +9 -32
  32. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +0 -26
  33. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +0 -23
  34. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/pivot.ts +65 -2
  35. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +3 -4
  36. package/corpus/templates/analytics/changelog/2026-06-24-dashboard-charts-now-fill-sparse-template-time-series-suppor.md +6 -0
  37. package/corpus/templates/analytics/changelog/2026-06-24-dashboard-filters-now-apply-consistently-to-first-party-traf.md +6 -0
  38. package/corpus/templates/analytics/changelog/2026-06-24-dashboard-rows-now-auto-fit-panels-so-one-two-or-three-chart.md +6 -0
  39. package/corpus/templates/analytics/changelog/2026-06-24-dashboard-traffic-tables-now-show-top-urls-and-shared-clips-.md +6 -0
  40. package/corpus/templates/analytics/changelog/2026-06-24-first-party-signup-and-pageview-panels-now-honor-dashboard-filters.md +5 -0
  41. package/corpus/templates/analytics/changelog/2026-06-24-first-party-template-dashboards-now-include-repeat-users-ret.md +6 -0
  42. package/corpus/templates/analytics/changelog/2026-06-24-retention-charts-now-break-out-1-day-and-7-day-return-rates-.md +6 -0
  43. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +330 -49
  44. package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +7 -2
  45. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +35 -8
  46. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +337 -45
  47. package/corpus/templates/calendar/changelog/2026-06-23-added-a-heads-up-explaining-google-s-app-not-verified-screen.md +1 -1
  48. package/corpus/templates/calendar/server/plugins/auth.ts +12 -0
  49. package/corpus/templates/clips/.agents/skills/recording/SKILL.md +7 -7
  50. package/corpus/templates/clips/AGENTS.md +6 -2
  51. package/corpus/templates/clips/app/components/capture-install-options.tsx +20 -4
  52. package/corpus/templates/clips/app/components/library/library-layout.tsx +7 -0
  53. package/corpus/templates/clips/app/components/player/player-controls.tsx +62 -32
  54. package/corpus/templates/clips/app/lib/capture-install-options.ts +39 -5
  55. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +786 -323
  56. package/corpus/templates/clips/app/routes/download.tsx +2 -2
  57. package/corpus/templates/clips/app/routes/share.$shareId.tsx +1 -1
  58. package/corpus/templates/clips/changelog/2026-06-24-inline-slack-playback-controls-no-longer-shift-when-adjustin.md +6 -0
  59. package/corpus/templates/clips/changelog/2026-06-24-settings-now-puts-what-s-new-in-a-compact-sidebar-prioritize.md +6 -0
  60. package/corpus/templates/clips/changelog/2026-06-24-shared-clips-now-expose-their-full-console-log-stream-all-le.md +6 -0
  61. package/corpus/templates/clips/changelog/2026-06-24-shared-clips-now-expose-their-full-fetch-xhr-network-request.md +6 -0
  62. package/corpus/templates/clips/changelog/2026-06-24-the-chrome-extension-option-now-only-appears-on-supported-hosts.md +5 -0
  63. package/corpus/templates/clips/chrome-extension/STORE_DRAFT.md +13 -8
  64. package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -1
  65. package/corpus/templates/clips/chrome-extension/scripts/package.ts +15 -2
  66. package/corpus/templates/clips/chrome-extension/src/overlay.css +4 -25
  67. package/corpus/templates/clips/chrome-extension/src/overlay.ts +1 -3
  68. package/corpus/templates/clips/server/lib/public-agent-context.ts +67 -24
  69. package/corpus/templates/mail/server/plugins/auth.ts +4 -1
  70. package/corpus/templates/plan/app/pages/PlansPage.tsx +271 -197
  71. package/corpus/templates/plan/changelog/2026-06-24-annotated-code-callouts-now-use-numbered-gutter-markers-that.md +6 -0
  72. package/corpus/templates/plan/server/plan-content.ts +45 -2
  73. package/dist/agent/durable-background.d.ts +9 -4
  74. package/dist/agent/durable-background.d.ts.map +1 -1
  75. package/dist/agent/durable-background.js +34 -11
  76. package/dist/agent/durable-background.js.map +1 -1
  77. package/dist/agent/production-agent.d.ts.map +1 -1
  78. package/dist/agent/production-agent.js +52 -8
  79. package/dist/agent/production-agent.js.map +1 -1
  80. package/dist/cli/create.js +1 -1
  81. package/dist/cli/create.js.map +1 -1
  82. package/dist/cli/skills.d.ts.map +1 -1
  83. package/dist/cli/skills.js +361 -19
  84. package/dist/cli/skills.js.map +1 -1
  85. package/dist/client/ConnectBuilderCard.d.ts.map +1 -1
  86. package/dist/client/ConnectBuilderCard.js +6 -6
  87. package/dist/client/ConnectBuilderCard.js.map +1 -1
  88. package/dist/client/NewWorkspaceAppFlow.js +1 -1
  89. package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
  90. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
  91. package/dist/client/blocks/library/AnnotatedCodeBlock.js +14 -10
  92. package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
  93. package/dist/client/blocks/library/annotation-rail.d.ts +3 -4
  94. package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -1
  95. package/dist/client/blocks/library/annotation-rail.js +3 -4
  96. package/dist/client/blocks/library/annotation-rail.js.map +1 -1
  97. package/dist/client/components/CodeRequiredDialog.d.ts.map +1 -1
  98. package/dist/client/components/CodeRequiredDialog.js +2 -1
  99. package/dist/client/components/CodeRequiredDialog.js.map +1 -1
  100. package/dist/server/agent-chat-plugin.js +7 -7
  101. package/dist/server/agent-chat-plugin.js.map +1 -1
  102. package/dist/server/auth.d.ts +7 -0
  103. package/dist/server/auth.d.ts.map +1 -1
  104. package/dist/server/auth.js +1 -0
  105. package/dist/server/auth.js.map +1 -1
  106. package/dist/server/onboarding-html.d.ts +15 -0
  107. package/dist/server/onboarding-html.d.ts.map +1 -1
  108. package/dist/server/onboarding-html.js +73 -9
  109. package/dist/server/onboarding-html.js.map +1 -1
  110. package/dist/server/self-dispatch.d.ts.map +1 -1
  111. package/dist/server/self-dispatch.js +5 -1
  112. package/dist/server/self-dispatch.js.map +1 -1
  113. package/dist/templates/default/AGENTS.md +4 -0
  114. package/dist/templates/default/package.json +2 -1
  115. package/dist/templates/headless/AGENTS.md +4 -0
  116. package/dist/templates/headless/package.json +1 -0
  117. package/dist/templates/workspace-root/AGENTS.md +4 -0
  118. package/dist/templates/workspace-root/README.md +4 -0
  119. package/dist/templates/workspace-root/package.json +1 -0
  120. package/docs/content/skills-guide.md +14 -0
  121. package/docs/content/template-clips.md +7 -1
  122. package/package.json +1 -1
  123. package/src/templates/default/AGENTS.md +4 -0
  124. package/src/templates/default/package.json +2 -1
  125. package/src/templates/headless/AGENTS.md +4 -0
  126. package/src/templates/headless/package.json +1 -0
  127. package/src/templates/workspace-root/AGENTS.md +4 -0
  128. package/src/templates/workspace-root/README.md +4 -0
  129. package/src/templates/workspace-root/package.json +1 -0
@@ -15,6 +15,66 @@ export interface PivotResult {
15
15
  seriesKeys: string[];
16
16
  }
17
17
 
18
+ const ISO_DAY_RE = /^\d{4}-\d{2}-\d{2}$/;
19
+ const MAX_DAILY_GAP_FILL_DAYS = 800;
20
+
21
+ function dayToUtcMs(day: string): number | null {
22
+ if (!ISO_DAY_RE.test(day)) return null;
23
+ const [year, month, date] = day.split("-").map(Number);
24
+ const ms = Date.UTC(year, month - 1, date);
25
+ return Number.isFinite(ms) ? ms : null;
26
+ }
27
+
28
+ function utcMsToDay(ms: number): string {
29
+ return new Date(ms).toISOString().slice(0, 10);
30
+ }
31
+
32
+ function fillMissingSeries(
33
+ row: Record<string, unknown>,
34
+ seriesKeys: string[],
35
+ ): Record<string, unknown> {
36
+ for (const key of seriesKeys) {
37
+ if (!(key in row)) row[key] = 0;
38
+ }
39
+ return row;
40
+ }
41
+
42
+ function fillMissingDailyRows(
43
+ rows: Record<string, unknown>[],
44
+ xKey: string,
45
+ seriesKeys: string[],
46
+ ): Record<string, unknown>[] {
47
+ if (rows.length < 2 || seriesKeys.length === 0) return rows;
48
+
49
+ const first = rows[0]?.[xKey];
50
+ const last = rows[rows.length - 1]?.[xKey];
51
+ if (typeof first !== "string" || typeof last !== "string") return rows;
52
+
53
+ const startMs = dayToUtcMs(first);
54
+ const endMs = dayToUtcMs(last);
55
+ if (startMs == null || endMs == null || endMs < startMs) return rows;
56
+
57
+ const dayCount = Math.floor((endMs - startMs) / 86_400_000) + 1;
58
+ if (dayCount > MAX_DAILY_GAP_FILL_DAYS) return rows;
59
+
60
+ const byDay = new Map<string, Record<string, unknown>>();
61
+ for (const row of rows) {
62
+ const day = row[xKey];
63
+ if (typeof day === "string" && ISO_DAY_RE.test(day)) {
64
+ byDay.set(day, row);
65
+ }
66
+ }
67
+
68
+ const filled: Record<string, unknown>[] = [];
69
+ for (let ms = startMs; ms <= endMs; ms += 86_400_000) {
70
+ const day = utcMsToDay(ms);
71
+ filled.push(
72
+ fillMissingSeries(byDay.get(day) ?? { [xKey]: day }, seriesKeys),
73
+ );
74
+ }
75
+ return filled;
76
+ }
77
+
18
78
  export function pivotRows(
19
79
  rows: Record<string, unknown>[],
20
80
  config: PivotConfig,
@@ -52,8 +112,11 @@ export function pivotRows(
52
112
  if (emitted.has(x)) continue;
53
113
  emitted.add(x);
54
114
  const bucket = byX.get(x);
55
- if (bucket) orderedRows.push(bucket);
115
+ if (bucket) orderedRows.push(fillMissingSeries(bucket, seriesKeys));
56
116
  }
57
117
 
58
- return { rows: orderedRows, seriesKeys };
118
+ return {
119
+ rows: fillMissingDailyRows(orderedRows, xKey, seriesKeys),
120
+ seriesKeys,
121
+ };
59
122
  }
@@ -88,10 +88,9 @@ export interface SqlPanel {
88
88
  source: DataSourceType;
89
89
  chartType: ChartType;
90
90
  /**
91
- * How many grid columns this panel spans. Defaults to 1. The renderer
92
- * clamps to the active section's column count, so a `width: 4` panel in a
93
- * 2-column section still spans the full row. Sections always span every
94
- * column regardless of this value.
91
+ * Legacy layout field retained for existing dashboards and action payloads.
92
+ * The renderer now auto-fits rows from panel order: one card in a row spans
93
+ * the row, two cards split it, and so on up to the section column count.
95
94
  */
96
95
  width: number;
97
96
  /**
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-06-24
4
+ ---
5
+
6
+ Dashboard charts now fill sparse template time series, support legend toggles, and sort tooltip values by impact.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-06-24
4
+ ---
5
+
6
+ Dashboard filters now apply consistently to first-party traffic panels and unsafe table links render as plain text.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-06-24
4
+ ---
5
+
6
+ Dashboard rows now auto-fit panels so one, two, or three charts fill the row naturally.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: added
3
+ date: 2026-06-24
4
+ ---
5
+
6
+ Dashboard traffic tables now show top URLs and shared Clips with clickable links.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "analytics": fixed
3
+ ---
4
+
5
+ First-party signup and pageview dashboard panels now use the selected time range and email filters consistently.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: added
3
+ date: 2026-06-24
4
+ ---
5
+
6
+ First-party template dashboards now show key activity, signup, retention, DAU, and WAU trends over time by template.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: added
3
+ date: 2026-06-24
4
+ ---
5
+
6
+ Retention charts now break out 1-day and 7-day return rates by template.