@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,7 @@ import {
15
15
  IconLayoutSidebarLeftCollapse,
16
16
  IconLayoutSidebarLeftExpand,
17
17
  IconPlus,
18
+ IconSettings,
18
19
  } from "@tabler/icons-react";
19
20
  import {
20
21
  AgentSidebar,
@@ -212,6 +213,12 @@ export function LibraryLayout({ children }: LibraryLayoutProps) {
212
213
  icon: IconTrash,
213
214
  match: (p) => p.startsWith("/trash"),
214
215
  },
216
+ {
217
+ to: "/settings",
218
+ label: "Settings",
219
+ icon: IconSettings,
220
+ match: (p) => p.startsWith("/settings"),
221
+ },
215
222
  ];
216
223
 
217
224
  return (
@@ -1,4 +1,4 @@
1
- import { useState } from "react";
1
+ import { useState, type FocusEvent } from "react";
2
2
  import {
3
3
  IconPlayerPlay,
4
4
  IconPlayerPause,
@@ -24,6 +24,11 @@ import {
24
24
  TooltipContent,
25
25
  TooltipTrigger,
26
26
  } from "@/components/ui/tooltip";
27
+ import {
28
+ Popover,
29
+ PopoverContent,
30
+ PopoverTrigger,
31
+ } from "@/components/ui/popover";
27
32
  import { PLAYBACK_SPEED_OPTIONS } from "@/lib/playback-speed";
28
33
 
29
34
  export const SPEED_OPTIONS = PLAYBACK_SPEED_OPTIONS;
@@ -85,7 +90,14 @@ export function PlayerControls(props: PlayerControlsProps) {
85
90
  menuPortalContainer,
86
91
  } = props;
87
92
 
88
- const [volumeHover, setVolumeHover] = useState(false);
93
+ const [volumePopoverOpen, setVolumePopoverOpen] = useState(false);
94
+
95
+ const handleVolumeBlur = (event: FocusEvent<HTMLDivElement>) => {
96
+ const nextFocusedElement = event.relatedTarget as Node | null;
97
+ if (!event.currentTarget.contains(nextFocusedElement)) {
98
+ setVolumePopoverOpen(false);
99
+ }
100
+ };
89
101
 
90
102
  return (
91
103
  <div className="px-3 pb-2 pt-10 bg-gradient-to-t from-black/80 via-black/50 to-transparent">
@@ -112,38 +124,56 @@ export function PlayerControls(props: PlayerControlsProps) {
112
124
  </IconBtn>
113
125
 
114
126
  <div
115
- className="flex items-center gap-1"
116
- onMouseEnter={() => setVolumeHover(true)}
117
- onMouseLeave={() => setVolumeHover(false)}
127
+ className="relative flex shrink-0 items-center"
128
+ onMouseEnter={() => setVolumePopoverOpen(true)}
129
+ onMouseLeave={() => setVolumePopoverOpen(false)}
130
+ onFocus={() => setVolumePopoverOpen(true)}
131
+ onBlur={handleVolumeBlur}
118
132
  >
119
- <IconBtn onClick={onToggleMute} tooltip="Mute (M)">
120
- {muted || volume === 0 ? (
121
- <IconVolumeOff className="h-5 w-5" />
122
- ) : (
123
- <IconVolume className="h-5 w-5" />
124
- )}
125
- </IconBtn>
126
- <div
127
- className={cn(
128
- "transition-all overflow-hidden",
129
- volumeHover ? "w-20" : "w-0",
130
- )}
131
- >
132
- <input
133
- type="range"
134
- min={0}
135
- max={1}
136
- step={0.05}
137
- value={muted ? 0 : volume}
138
- onChange={(e) => onVolumeChange(parseFloat(e.target.value))}
139
- className="w-full accent-primary cursor-pointer"
140
- />
141
- </div>
133
+ <Popover open={volumePopoverOpen} onOpenChange={setVolumePopoverOpen}>
134
+ <PopoverTrigger asChild>
135
+ <button
136
+ type="button"
137
+ onClick={onToggleMute}
138
+ className="flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-white hover:bg-white/10"
139
+ aria-label={muted || volume === 0 ? "Unmute" : "Mute"}
140
+ >
141
+ {muted || volume === 0 ? (
142
+ <IconVolumeOff className="h-5 w-5" />
143
+ ) : (
144
+ <IconVolume className="h-5 w-5" />
145
+ )}
146
+ </button>
147
+ </PopoverTrigger>
148
+ <PopoverContent
149
+ side="top"
150
+ align="center"
151
+ sideOffset={8}
152
+ portalled={false}
153
+ className="w-auto border-white/10 bg-black/90 p-2 text-white shadow-2xl backdrop-blur-md"
154
+ onOpenAutoFocus={(event) => event.preventDefault()}
155
+ onCloseAutoFocus={(event) => event.preventDefault()}
156
+ >
157
+ <div className="flex h-24 w-8 items-center justify-center">
158
+ <input
159
+ aria-label="Volume"
160
+ aria-orientation="vertical"
161
+ type="range"
162
+ min={0}
163
+ max={1}
164
+ step={0.05}
165
+ value={muted ? 0 : volume}
166
+ onChange={(e) => onVolumeChange(parseFloat(e.target.value))}
167
+ className="h-2 w-24 -rotate-90 cursor-pointer accent-white"
168
+ />
169
+ </div>
170
+ </PopoverContent>
171
+ </Popover>
142
172
  </div>
143
173
 
144
- <span className="text-xs font-mono tabular-nums text-white/90 px-2">
174
+ <span className="shrink-0 whitespace-nowrap px-1 font-mono text-[10px] leading-none tabular-nums text-white/85 sm:text-[11px]">
145
175
  {msToClock(currentMs)}
146
- <span className="text-white/50"> / {msToClock(durationMs)}</span>
176
+ <span className="text-white/50">/{msToClock(durationMs)}</span>
147
177
  </span>
148
178
 
149
179
  <div className="flex-1" />
@@ -162,7 +192,7 @@ export function PlayerControls(props: PlayerControlsProps) {
162
192
  <Tooltip>
163
193
  <TooltipTrigger asChild>
164
194
  <DropdownMenuTrigger asChild>
165
- <button className="h-8 px-2 rounded-md hover:bg-white/10 text-xs font-medium tabular-nums">
195
+ <button className="h-8 shrink-0 rounded-md px-2 text-xs font-medium tabular-nums hover:bg-white/10">
166
196
  {speed}x
167
197
  </button>
168
198
  </DropdownMenuTrigger>
@@ -237,7 +267,7 @@ function IconBtn({
237
267
  <button
238
268
  onClick={onClick}
239
269
  className={cn(
240
- "h-8 w-8 rounded-md flex items-center justify-center",
270
+ "flex h-8 w-8 shrink-0 items-center justify-center rounded-md",
241
271
  active ? "bg-white/20 text-white" : "text-white hover:bg-white/10",
242
272
  )}
243
273
  >
@@ -1,14 +1,48 @@
1
- function isTruthy(value: unknown): boolean {
1
+ function isFalsy(value: unknown): boolean {
2
2
  if (typeof value !== "string") return false;
3
- return ["1", "true", "yes", "on"].includes(value.trim().toLowerCase());
3
+ return ["0", "false", "no", "off"].includes(value.trim().toLowerCase());
4
+ }
5
+
6
+ function normalizeHostname(hostname: string | undefined): string {
7
+ return (hostname ?? "").trim().toLowerCase();
8
+ }
9
+
10
+ export function supportsPublishedClipsChromeExtensionHost(
11
+ hostname: string | undefined,
12
+ ): boolean {
13
+ const normalized = normalizeHostname(hostname);
14
+ return (
15
+ normalized === "clips.agent-native.com" ||
16
+ normalized === "localhost" ||
17
+ normalized === "127.0.0.1"
18
+ );
19
+ }
20
+
21
+ export function resolveClipsChromeExtensionEnabled({
22
+ enabledSetting,
23
+ hostname,
24
+ }: {
25
+ enabledSetting?: string;
26
+ hostname?: string;
27
+ }): boolean {
28
+ const normalizedSetting = enabledSetting?.trim();
29
+ if (normalizedSetting) return !isFalsy(normalizedSetting);
30
+ return supportsPublishedClipsChromeExtensionHost(hostname);
31
+ }
32
+
33
+ function getCurrentHostname(): string | undefined {
34
+ return typeof window === "undefined" ? undefined : window.location.hostname;
4
35
  }
5
36
 
6
37
  const chromeExtensionUrl =
7
38
  import.meta.env.VITE_CLIPS_CHROME_EXTENSION_URL?.trim() ??
8
39
  "https://chromewebstore.google.com/detail/baoipacpchggcdigagnajakiidcgcffn";
9
40
 
10
- export const clipsChromeExtensionEnabled = isTruthy(
11
- import.meta.env.VITE_CLIPS_CHROME_EXTENSION_ENABLED,
12
- );
41
+ // The published extension manifest only trusts first-party Clips/local origins.
42
+ // Custom deployments can opt in after publishing a matching extension/listing.
43
+ export const clipsChromeExtensionEnabled = resolveClipsChromeExtensionEnabled({
44
+ enabledSetting: import.meta.env.VITE_CLIPS_CHROME_EXTENSION_ENABLED,
45
+ hostname: getCurrentHostname(),
46
+ });
13
47
 
14
48
  export const clipsChromeExtensionUrl = chromeExtensionUrl || null;