@agent-native/core 0.98.2 → 0.98.4

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 (78) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +23 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/agent/production-agent.ts +2 -2
  5. package/corpus/core/src/client/analytics.ts +12 -0
  6. package/corpus/core/src/client/index.ts +2 -0
  7. package/corpus/core/src/client/session-replay.ts +612 -26
  8. package/corpus/core/src/client/settings/DemoModeSection.tsx +6 -6
  9. package/corpus/core/src/client/settings/SettingsPanel.tsx +31 -211
  10. package/corpus/core/src/client/settings/agent-settings-search.ts +219 -0
  11. package/corpus/core/src/client/settings/index.ts +4 -0
  12. package/corpus/core/src/demo/actions/toggle-demo-mode.ts +2 -2
  13. package/corpus/core/src/demo/config.ts +6 -6
  14. package/corpus/core/src/demo/fetch-interceptor.ts +25 -2
  15. package/corpus/core/src/demo/redact.ts +57 -66
  16. package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +65 -6
  17. package/corpus/templates/analytics/AGENTS.md +6 -6
  18. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +429 -244
  19. package/corpus/templates/analytics/app/components/layout/command-palette-search.ts +93 -0
  20. package/corpus/templates/analytics/app/global.css +4 -62
  21. package/corpus/templates/analytics/app/hooks/use-replay-storage-status.ts +2 -1
  22. package/corpus/templates/analytics/app/lib/demo-chart-trend.ts +46 -33
  23. package/corpus/templates/analytics/app/pages/Settings.tsx +8 -45
  24. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +413 -105
  25. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +32 -16
  26. package/corpus/templates/analytics/app/pages/settings/settings-search.ts +126 -0
  27. package/corpus/templates/analytics/changelog/2026-07-12-command-menu-loading-placeholders-now-stay-below-available-r.md +6 -0
  28. package/corpus/templates/analytics/changelog/2026-07-12-command-menu-search-now-prioritizes-the-best-match.md +6 -0
  29. package/corpus/templates/analytics/changelog/2026-07-12-demo-charts-preserve-source-movement.md +6 -0
  30. package/corpus/templates/analytics/changelog/2026-07-12-fixed-session-replays-that-appeared-ultra-wide-hid-recorded-.md +6 -0
  31. package/corpus/templates/analytics/changelog/2026-07-12-replay-storage-settings-stay-readable-at-narrow-widths.md +6 -0
  32. package/corpus/templates/analytics/changelog/2026-07-12-session-replays-load-faster-in-demo-mode-while-visitor-email.md +6 -0
  33. package/corpus/templates/analytics/changelog/2026-07-12-session-replays-preserve-recorded-styling-and-keep-malformed.md +6 -0
  34. package/corpus/templates/calendar/app/components/calendar/DeleteEventDialog.tsx +11 -2
  35. package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +14 -2
  36. package/corpus/templates/calendar/changelog/2026-07-12-calendar-responses-can-now-be-saved-with-command-enter-or-ct.md +6 -0
  37. package/dist/agent/production-agent.js +2 -2
  38. package/dist/agent/production-agent.js.map +1 -1
  39. package/dist/client/analytics.d.ts.map +1 -1
  40. package/dist/client/analytics.js +11 -0
  41. package/dist/client/analytics.js.map +1 -1
  42. package/dist/client/index.d.ts +1 -1
  43. package/dist/client/index.d.ts.map +1 -1
  44. package/dist/client/index.js +1 -1
  45. package/dist/client/index.js.map +1 -1
  46. package/dist/client/session-replay.d.ts +12 -3
  47. package/dist/client/session-replay.d.ts.map +1 -1
  48. package/dist/client/session-replay.js +488 -23
  49. package/dist/client/session-replay.js.map +1 -1
  50. package/dist/client/settings/DemoModeSection.d.ts +3 -3
  51. package/dist/client/settings/DemoModeSection.js +4 -4
  52. package/dist/client/settings/DemoModeSection.js.map +1 -1
  53. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  54. package/dist/client/settings/SettingsPanel.js +41 -191
  55. package/dist/client/settings/SettingsPanel.js.map +1 -1
  56. package/dist/client/settings/agent-settings-search.d.ts +16 -0
  57. package/dist/client/settings/agent-settings-search.d.ts.map +1 -0
  58. package/dist/client/settings/agent-settings-search.js +178 -0
  59. package/dist/client/settings/agent-settings-search.js.map +1 -0
  60. package/dist/client/settings/index.d.ts +1 -0
  61. package/dist/client/settings/index.d.ts.map +1 -1
  62. package/dist/client/settings/index.js +1 -0
  63. package/dist/client/settings/index.js.map +1 -1
  64. package/dist/collab/routes.d.ts +1 -1
  65. package/dist/demo/actions/toggle-demo-mode.js +2 -2
  66. package/dist/demo/actions/toggle-demo-mode.js.map +1 -1
  67. package/dist/demo/config.js +6 -6
  68. package/dist/demo/config.js.map +1 -1
  69. package/dist/demo/fetch-interceptor.d.ts +1 -0
  70. package/dist/demo/fetch-interceptor.d.ts.map +1 -1
  71. package/dist/demo/fetch-interceptor.js +19 -2
  72. package/dist/demo/fetch-interceptor.js.map +1 -1
  73. package/dist/demo/redact.d.ts +14 -5
  74. package/dist/demo/redact.d.ts.map +1 -1
  75. package/dist/demo/redact.js +30 -56
  76. package/dist/demo/redact.js.map +1 -1
  77. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  78. package/package.json +2 -2
@@ -464,7 +464,11 @@ function EmptySessionsState() {
464
464
  );
465
465
  }
466
466
 
467
- export function ReplayStorageHint() {
467
+ export function ReplayStorageHint({
468
+ embedded = false,
469
+ }: {
470
+ embedded?: boolean;
471
+ }) {
468
472
  const t = useT();
469
473
  const storageStatus = useReplayStorageStatus();
470
474
  const builderStatus = useBuilderStatus();
@@ -523,22 +527,29 @@ export function ReplayStorageHint() {
523
527
 
524
528
  return (
525
529
  <Collapsible open={s3Expanded} onOpenChange={setS3Expanded}>
526
- <div className="mb-6 rounded-md border border-primary/30 bg-primary/5 p-4">
527
- <div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
528
- <div className="flex min-w-0 items-start gap-3">
529
- <div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-background text-primary">
530
- <IconCloud className="h-5 w-5" />
531
- </div>
532
- <div className="min-w-0">
533
- <div className="text-sm font-medium">
534
- {t("sessions.storageSetupTitle")}
530
+ <div
531
+ className={cn(
532
+ !embedded &&
533
+ "mb-6 rounded-md border border-primary/30 bg-primary/5 p-4",
534
+ )}
535
+ >
536
+ <div className="flex flex-wrap items-center gap-4">
537
+ {!embedded ? (
538
+ <div className="flex min-w-[min(100%,24rem)] flex-1 items-start gap-3">
539
+ <div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-background text-primary">
540
+ <IconCloud className="h-5 w-5" />
541
+ </div>
542
+ <div className="min-w-0">
543
+ <div className="text-sm font-medium">
544
+ {t("sessions.storageSetupTitle")}
545
+ </div>
546
+ <p className="mt-0.5 text-xs text-muted-foreground">
547
+ {t("sessions.storageSetupDescription")}
548
+ </p>
535
549
  </div>
536
- <p className="mt-0.5 text-xs text-muted-foreground">
537
- {t("sessions.storageSetupDescription")}
538
- </p>
539
550
  </div>
540
- </div>
541
- <div className="flex shrink-0 flex-wrap items-center gap-3">
551
+ ) : null}
552
+ <div className="flex max-w-full flex-wrap items-center gap-3">
542
553
  <Button
543
554
  type="button"
544
555
  size="sm"
@@ -584,7 +595,12 @@ export function ReplayStorageHint() {
584
595
  </div>
585
596
  </div>
586
597
  <CollapsibleContent>
587
- <div className="mt-4 border-t border-primary/20 pt-4">
598
+ <div
599
+ className={cn(
600
+ "mt-4 border-t pt-4",
601
+ embedded ? "border-border" : "border-primary/20",
602
+ )}
603
+ >
588
604
  <p className="mb-4 text-xs text-muted-foreground">
589
605
  {t("settings.s3OwnBucketDescription")}
590
606
  </p>
@@ -0,0 +1,126 @@
1
+ import {
2
+ getAgentSettingsSearchTabs,
3
+ type SettingsSearchEntry,
4
+ } from "@agent-native/core/client";
5
+
6
+ interface SettingsCommandItem {
7
+ id: string;
8
+ label: string;
9
+ keywords: string;
10
+ href: string;
11
+ }
12
+
13
+ type Translate = (key: string) => string;
14
+
15
+ export function buildAnalyticsGeneralSettingsSearchEntries(
16
+ t: Translate,
17
+ replayStorageConfigured: boolean,
18
+ ): SettingsSearchEntry[] {
19
+ return [
20
+ {
21
+ id: "analytics-account",
22
+ label: t("settings.account"),
23
+ keywords: "profile email signed in identity",
24
+ hash: "account",
25
+ },
26
+ {
27
+ id: "analytics-credentials",
28
+ label: t("settings.credentials"),
29
+ keywords: "data sources api keys manage credentials",
30
+ hash: "credentials",
31
+ },
32
+ {
33
+ id: "analytics-dashboard-templates",
34
+ label: t("settings.dashboardTemplates"),
35
+ keywords: "templates catalog dashboards",
36
+ hash: "dashboard-templates",
37
+ },
38
+ ...(replayStorageConfigured
39
+ ? [
40
+ {
41
+ id: "analytics-replay-storage",
42
+ label: t("sessions.storageSetupTitle"),
43
+ keywords: "session replay recording storage s3 bucket builder",
44
+ hash: "replay-storage",
45
+ },
46
+ ]
47
+ : []),
48
+ {
49
+ id: "analytics-language",
50
+ label: t("settings.languageTitle"),
51
+ keywords: "language locale translation i18n",
52
+ hash: "language",
53
+ },
54
+ {
55
+ id: "analytics-about",
56
+ label: t("settings.about"),
57
+ keywords: "about version info usage",
58
+ hash: "about",
59
+ },
60
+ ];
61
+ }
62
+
63
+ function normalizeLabel(label: string): string {
64
+ return label.trim().toLocaleLowerCase();
65
+ }
66
+
67
+ export function buildAnalyticsSettingsCommandItems(
68
+ t: Translate,
69
+ generalEntries: SettingsSearchEntry[],
70
+ ): SettingsCommandItem[] {
71
+ const tabs = [
72
+ {
73
+ id: "general",
74
+ label: "General",
75
+ keywords: "settings preferences configuration",
76
+ searchEntries: generalEntries.filter(
77
+ (entry) => entry.id !== "analytics-language",
78
+ ),
79
+ },
80
+ {
81
+ id: "alerts",
82
+ label: t("settings.alertsTitle"),
83
+ keywords: "alerts rules notifications thresholds triggers monitoring",
84
+ },
85
+ ...getAgentSettingsSearchTabs(),
86
+ ];
87
+ const commandIndexByDestination = new Map<string, number>();
88
+ const commands: SettingsCommandItem[] = [];
89
+
90
+ const add = (command: SettingsCommandItem) => {
91
+ const destinationKey = `${normalizeLabel(command.label)}\0${command.href}`;
92
+ const existingIndex = commandIndexByDestination.get(destinationKey);
93
+ if (existingIndex !== undefined) {
94
+ const existing = commands[existingIndex];
95
+ commands[existingIndex] = {
96
+ ...existing,
97
+ // Duplicate destinations can come from the app and shared settings
98
+ // catalogs. Preserve both sources' search phrases and tab context.
99
+ keywords: `${existing.keywords} ${command.keywords}`,
100
+ };
101
+ return;
102
+ }
103
+
104
+ commandIndexByDestination.set(destinationKey, commands.length);
105
+ commands.push(command);
106
+ };
107
+
108
+ for (const tab of tabs) {
109
+ add({
110
+ id: `tab:${tab.id}`,
111
+ label: tab.label,
112
+ keywords: `${tab.keywords} settings`,
113
+ href: `/settings#${tab.id}`,
114
+ });
115
+ for (const entry of tab.searchEntries ?? []) {
116
+ add({
117
+ id: entry.id,
118
+ label: entry.label,
119
+ keywords: `${entry.keywords ?? ""} ${entry.description ?? ""} ${tab.label} settings`,
120
+ href: `/settings#${entry.hash ?? entry.tabId ?? tab.id}`,
121
+ });
122
+ }
123
+ }
124
+
125
+ return commands;
126
+ }
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-07-12
4
+ ---
5
+
6
+ Command menu loading placeholders now stay below available results without flashing.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-07-12
4
+ ---
5
+
6
+ Command menu search now finds settings, prioritizes the best match, and keeps keyboard selection aligned with each query.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-07-12
4
+ ---
5
+
6
+ Demo mode trend charts now preserve the source series' real spikes, dips, and smooth stretches.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-07-12
4
+ ---
5
+
6
+ Fixed session replays that appeared ultra-wide, hid recorded menus, or skipped captured cursor movement.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-07-12
4
+ ---
5
+
6
+ Replay storage settings stay readable at narrow widths.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-07-12
4
+ ---
5
+
6
+ Session replays load faster in demo mode while visitor emails stay anonymized.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-07-12
4
+ ---
5
+
6
+ Session replays preserve recorded styling and keep malformed ultra-wide captures readable.
@@ -1,6 +1,6 @@
1
1
  import { useT } from "@agent-native/core/client";
2
2
  import type { CalendarEvent, DeleteEventScope } from "@shared/api";
3
- import { useEffect, useMemo, useState } from "react";
3
+ import { useEffect, useMemo, useRef, useState } from "react";
4
4
 
5
5
  import { getGuestAttendeeCount } from "@/components/calendar/GuestNotificationDialog";
6
6
  import {
@@ -36,6 +36,7 @@ export function DeleteEventDialog({
36
36
  onConfirm,
37
37
  }: DeleteEventDialogProps) {
38
38
  const t = useT();
39
+ const confirmButtonRef = useRef<HTMLButtonElement>(null);
39
40
  const [scope, setScope] = useState<DeleteEventScope>("single");
40
41
  const [message, setMessage] = useState("");
41
42
 
@@ -108,7 +109,14 @@ export function DeleteEventDialog({
108
109
 
109
110
  return (
110
111
  <AlertDialog open={open} onOpenChange={(isOpen) => !isOpen && onClose()}>
111
- <AlertDialogContent className="max-w-[420px]" onKeyDown={handleKeyDown}>
112
+ <AlertDialogContent
113
+ className="max-w-[420px]"
114
+ onKeyDown={handleKeyDown}
115
+ onOpenAutoFocus={(event) => {
116
+ event.preventDefault();
117
+ confirmButtonRef.current?.focus();
118
+ }}
119
+ >
112
120
  <AlertDialogHeader>
113
121
  <AlertDialogTitle className="text-sm">{copy.title}</AlertDialogTitle>
114
122
  <AlertDialogDescription>{copy.description}</AlertDialogDescription>
@@ -174,6 +182,7 @@ export function DeleteEventDialog({
174
182
  </Button>
175
183
  )}
176
184
  <Button
185
+ ref={confirmButtonRef}
177
186
  variant="destructive"
178
187
  onClick={() => handleConfirm(canNotifyGuests ? "all" : "none")}
179
188
  >
@@ -194,6 +194,12 @@ function RsvpControls({
194
194
  doRsvp(status, undefined, "");
195
195
  };
196
196
 
197
+ const savePendingResponse = () => {
198
+ if (!pendingStatus || mutation.isPending) return;
199
+ doRsvp(pendingStatus, isRecurring ? pendingScope : undefined);
200
+ closePopover();
201
+ };
202
+
197
203
  return (
198
204
  <Popover
199
205
  open={!!pendingStatus}
@@ -255,6 +261,13 @@ function RsvpControls({
255
261
  className="w-[22rem] max-w-[calc(100vw-2rem)] overflow-hidden p-0"
256
262
  onClick={(e) => e.stopPropagation()}
257
263
  onPointerDownCapture={(e) => e.stopPropagation()}
264
+ onKeyDown={(e) => {
265
+ if ((e.metaKey || e.ctrlKey) && e.key === "Enter") {
266
+ e.preventDefault();
267
+ e.stopPropagation();
268
+ savePendingResponse();
269
+ }
270
+ }}
258
271
  >
259
272
  {pendingStatus && (
260
273
  <div>
@@ -336,8 +349,7 @@ function RsvpControls({
336
349
  disabled={mutation.isPending}
337
350
  onClick={(e) => {
338
351
  e.stopPropagation();
339
- doRsvp(pendingStatus, isRecurring ? pendingScope : undefined);
340
- closePopover();
352
+ savePendingResponse();
341
353
  }}
342
354
  >
343
355
  {t("eventForm.saveResponse")}
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-07-12
4
+ ---
5
+
6
+ Calendar responses can now be saved with Command+Enter or Ctrl+Enter, and delete confirmations focus the delete action for faster keyboard use.
@@ -3247,8 +3247,8 @@ export async function runAgentLoop(opts) {
3247
3247
  // content parts; first-party actions opt in via the well-known
3248
3248
  // `_agentImages` result field (stripped from the JSON the model
3249
3249
  // reads, even in demo mode). Demo mode drops the images themselves —
3250
- // text redaction can't scrub pixels, and a screenshot would leak the
3251
- // real contact names/emails/numbers the redaction exists to hide. The images array
3250
+ // text redaction can't scrub pixels, and a screenshot may expose
3251
+ // original visual data. The images array
3252
3252
  // never touches the ledger — only the compact text notes appended
3253
3253
  // below are persisted.
3254
3254
  let imageNotes = [];