@agent-native/core 0.91.0 → 0.91.2

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 (219) hide show
  1. package/blueprints/action/crud.md +1 -1
  2. package/blueprints/channel/discord.md +1 -1
  3. package/blueprints/provider/stripe.md +1 -1
  4. package/blueprints/sandbox/docker.md +1 -1
  5. package/corpus/README.md +1 -1
  6. package/corpus/core/CHANGELOG.md +26 -0
  7. package/corpus/core/blueprints/action/crud.md +1 -1
  8. package/corpus/core/blueprints/channel/discord.md +1 -1
  9. package/corpus/core/blueprints/provider/stripe.md +1 -1
  10. package/corpus/core/blueprints/sandbox/docker.md +1 -1
  11. package/corpus/core/package.json +6 -5
  12. package/corpus/core/src/agent/run-manager.ts +23 -2
  13. package/corpus/core/src/agent/run-store.ts +2 -2
  14. package/corpus/core/src/cli/add.ts +1 -1
  15. package/corpus/core/src/cli/create.ts +8 -3
  16. package/corpus/core/src/cli/design-connect.ts +53 -9
  17. package/corpus/core/src/cli/index.ts +5 -4
  18. package/corpus/core/src/client/extensions/ExtensionSlot.tsx +7 -0
  19. package/corpus/core/src/client/session-replay.ts +97 -3
  20. package/corpus/core/src/jobs/scheduler.ts +30 -1
  21. package/corpus/core/src/localization/default-messages.ts +21 -0
  22. package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +21 -0
  23. package/corpus/core/src/templates/default/app/i18n/de-DE.ts +21 -0
  24. package/corpus/core/src/templates/default/app/i18n/en-US.ts +21 -0
  25. package/corpus/core/src/templates/default/app/i18n/es-ES.ts +21 -0
  26. package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +21 -0
  27. package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +20 -0
  28. package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +21 -0
  29. package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +20 -0
  30. package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +21 -0
  31. package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +20 -0
  32. package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +19 -0
  33. package/corpus/core/src/templates/default/package.json +2 -2
  34. package/corpus/core/src/templates/headless/package.json +3 -3
  35. package/corpus/core/src/templates/workspace-core/package.json +6 -6
  36. package/corpus/core/src/templates/workspace-root/package.json +2 -2
  37. package/corpus/core/src/triggers/dispatcher.ts +30 -2
  38. package/corpus/core/src/vite/client.ts +96 -1
  39. package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +21 -2
  40. package/corpus/templates/analytics/app/global.css +26 -10
  41. package/corpus/templates/analytics/app/i18n/zh-TW.ts +2 -0
  42. package/corpus/templates/analytics/app/i18n-data.ts +25 -0
  43. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +548 -237
  44. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +285 -294
  45. package/corpus/templates/analytics/changelog/2026-07-08-console-details-expand-inline-under-each-row-and-the-event-t.md +6 -0
  46. package/corpus/templates/analytics/changelog/2026-07-08-session-replay-clamps-ultra-wide-viewports-while-keeping-the.md +6 -0
  47. package/corpus/templates/analytics/changelog/2026-07-08-session-replay-keeps-a-usable-stage-when-dev-tools-is-open-a.md +6 -0
  48. package/corpus/templates/analytics/changelog/2026-07-08-session-replay-resumes-after-scrubbing-and-expands-console-r.md +6 -0
  49. package/corpus/templates/analytics/changelog/2026-07-08-session-replays-wait-for-full-load-keep-a-normal-viewport-an.md +6 -0
  50. package/corpus/templates/analytics/package.json +2 -2
  51. package/corpus/templates/assets/package.json +2 -2
  52. package/corpus/templates/brain/package.json +2 -2
  53. package/corpus/templates/calendar/AGENTS.md +10 -0
  54. package/corpus/templates/calendar/actions/create-event.ts +5 -1
  55. package/corpus/templates/calendar/actions/event-action-helpers.ts +41 -0
  56. package/corpus/templates/calendar/actions/get-attendee-timezones.ts +28 -0
  57. package/corpus/templates/calendar/actions/set-attendee-timezone.ts +68 -0
  58. package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +150 -11
  59. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +36 -1
  60. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +32 -0
  61. package/corpus/templates/calendar/app/hooks/use-attendee-timezones.ts +24 -0
  62. package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
  63. package/corpus/templates/calendar/app/i18n-data.ts +20 -0
  64. package/corpus/templates/calendar/app/lib/attendee-local-time.ts +122 -0
  65. package/corpus/templates/calendar/changelog/2026-07-08-event-details-now-support-extension-widgets-and-you-can-see-.md +6 -0
  66. package/corpus/templates/calendar/changelog/2026-07-08-when-you-invite-guests-to-a-new-event-you-now-appear-in.md +6 -0
  67. package/corpus/templates/calendar/package.json +2 -2
  68. package/corpus/templates/calendar/server/handlers/events.ts +5 -1
  69. package/corpus/templates/calendar/shared/api.ts +6 -0
  70. package/corpus/templates/chat/package.json +2 -2
  71. package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +6 -2
  72. package/corpus/templates/clips/actions/create-meeting.ts +8 -3
  73. package/corpus/templates/clips/actions/list-meetings.ts +31 -3
  74. package/corpus/templates/clips/changelog/2026-07-08-after-finishing-a-desktop-recording-reopening-clips-restor.md +6 -0
  75. package/corpus/templates/clips/changelog/2026-07-08-clips-now-pops-up-to-take-notes-when-you-join-an-adhoc-zoom-.md +6 -0
  76. package/corpus/templates/clips/changelog/2026-07-08-desktop-clip-recordings-are-louder-after-capture-mic-only.md +6 -0
  77. package/corpus/templates/clips/changelog/2026-07-08-meeting-reminders-now-appear-1-minute-before-start-stay-unti.md +6 -0
  78. package/corpus/templates/clips/changelog/2026-07-08-the-desktop-meetings-panel-has-room-for-its-drop-shadow-and-.md +6 -0
  79. package/corpus/templates/clips/chrome-extension/package.json +2 -2
  80. package/corpus/templates/clips/desktop/package.json +2 -2
  81. package/corpus/templates/clips/desktop/src/app.tsx +91 -34
  82. package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +15 -5
  83. package/corpus/templates/clips/desktop/src/lib/meeting-notification-timing.ts +83 -0
  84. package/corpus/templates/clips/desktop/src/lib/native-recording-warm.ts +21 -0
  85. package/corpus/templates/clips/desktop/src/lib/recorder.ts +98 -20
  86. package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +174 -50
  87. package/corpus/templates/clips/desktop/src/styles.css +128 -53
  88. package/corpus/templates/clips/desktop/src-tauri/src/adhoc_meetings_watcher.rs +364 -0
  89. package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +1 -1
  90. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +5 -0
  91. package/corpus/templates/clips/desktop/src-tauri/src/meetings_watcher.rs +91 -11
  92. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +69 -19
  93. package/corpus/templates/clips/desktop/src-tauri/src/native_speech.rs +36 -1
  94. package/corpus/templates/clips/desktop/src-tauri/src/notifications.rs +62 -10
  95. package/corpus/templates/clips/desktop/src-tauri/src/silence_detector.rs +1 -24
  96. package/corpus/templates/clips/desktop/src-tauri/src/util.rs +36 -1
  97. package/corpus/templates/clips/package.json +2 -2
  98. package/corpus/templates/content/actions/_content-database-personal-view.ts +80 -0
  99. package/corpus/templates/content/actions/get-content-database-personal-view.ts +27 -0
  100. package/corpus/templates/content/actions/update-content-database-personal-view.ts +31 -0
  101. package/corpus/templates/content/actions/update-content-database-view.ts +3 -0
  102. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +1 -1
  103. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +2584 -546
  104. package/corpus/templates/content/app/components/editor/database/filter-sort.ts +220 -18
  105. package/corpus/templates/content/app/hooks/use-content-database.ts +32 -0
  106. package/corpus/templates/content/app/i18n/zh-TW.ts +16 -0
  107. package/corpus/templates/content/app/i18n-data.ts +154 -0
  108. package/corpus/templates/content/changelog/2026-07-08-database-filters-now-support-notion-style-reset-save-for-eve.md +6 -0
  109. package/corpus/templates/content/changelog/2026-07-08-date-filters-can-now-target-a-between-range.md +6 -0
  110. package/corpus/templates/content/package.json +2 -2
  111. package/corpus/templates/content/parity/matrix.md +1 -1
  112. package/corpus/templates/content/parity/matrix.ts +2 -0
  113. package/corpus/templates/content/shared/api.ts +24 -0
  114. package/corpus/templates/design/AGENTS.md +9 -0
  115. package/corpus/templates/design/actions/request-localhost-write-consent.ts +141 -0
  116. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +13 -19
  117. package/corpus/templates/design/package.json +2 -2
  118. package/corpus/templates/design/server/lib/verify-write-grant.ts +4 -2
  119. package/corpus/templates/dispatch/app/i18n/zh-TW.ts +34 -1
  120. package/corpus/templates/dispatch/app/i18n-data.ts +387 -10
  121. package/corpus/templates/dispatch/app/routes/automations.tsx +1 -0
  122. package/corpus/templates/dispatch/changelog/2026-07-08-added-an-automations-page-to-review-pause-and-create.md +6 -0
  123. package/corpus/templates/dispatch/changelog/2026-07-08-destinations-now-shows-outbound-delivery-queue-health.md +6 -0
  124. package/corpus/templates/dispatch/package.json +2 -2
  125. package/corpus/templates/forms/package.json +2 -2
  126. package/corpus/templates/macros/package.json +2 -2
  127. package/corpus/templates/mail/app/hooks/use-emails.ts +56 -44
  128. package/corpus/templates/mail/app/lib/gmail-mutation-queue.ts +325 -0
  129. package/corpus/templates/mail/changelog/2026-07-08-rapid-archive-and-mark-read-now-batch-gmail-updates-so-the-i.md +6 -0
  130. package/corpus/templates/mail/package.json +2 -2
  131. package/corpus/templates/plan/package.json +2 -2
  132. package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +46 -29
  133. package/corpus/templates/slides/app/context/DeckContext.tsx +45 -18
  134. package/corpus/templates/slides/app/i18n/ar-SA.ts +4 -0
  135. package/corpus/templates/slides/app/i18n/de-DE.ts +4 -0
  136. package/corpus/templates/slides/app/i18n/en-US.ts +4 -0
  137. package/corpus/templates/slides/app/i18n/es-ES.ts +4 -0
  138. package/corpus/templates/slides/app/i18n/fr-FR.ts +4 -0
  139. package/corpus/templates/slides/app/i18n/hi-IN.ts +4 -0
  140. package/corpus/templates/slides/app/i18n/ja-JP.ts +4 -0
  141. package/corpus/templates/slides/app/i18n/ko-KR.ts +4 -0
  142. package/corpus/templates/slides/app/i18n/pt-BR.ts +4 -0
  143. package/corpus/templates/slides/app/i18n/zh-CN.ts +4 -0
  144. package/corpus/templates/slides/app/i18n/zh-TW.ts +4 -0
  145. package/corpus/templates/slides/app/lib/image-drop-to-agent.ts +115 -0
  146. package/corpus/templates/slides/app/pages/DeckEditor.tsx +22 -13
  147. package/corpus/templates/slides/changelog/2026-07-08-dropping-an-image-onto-a-slide-and-sending-it-to-the-agent-w.md +6 -0
  148. package/corpus/templates/slides/changelog/2026-07-08-undo-works-after-the-agent-edits-a-slide-so-you-can-reverse.md +6 -0
  149. package/corpus/templates/slides/package.json +2 -2
  150. package/dist/agent/run-manager.d.ts.map +1 -1
  151. package/dist/agent/run-manager.js +23 -2
  152. package/dist/agent/run-manager.js.map +1 -1
  153. package/dist/agent/run-store.js +2 -2
  154. package/dist/agent/run-store.js.map +1 -1
  155. package/dist/catalog.json +2 -2
  156. package/dist/cli/add.js +1 -1
  157. package/dist/cli/add.js.map +1 -1
  158. package/dist/cli/create.d.ts.map +1 -1
  159. package/dist/cli/create.js +8 -3
  160. package/dist/cli/create.js.map +1 -1
  161. package/dist/cli/design-connect.d.ts.map +1 -1
  162. package/dist/cli/design-connect.js +40 -10
  163. package/dist/cli/design-connect.js.map +1 -1
  164. package/dist/cli/index.js +5 -4
  165. package/dist/cli/index.js.map +1 -1
  166. package/dist/client/extensions/ExtensionSlot.js +6 -0
  167. package/dist/client/extensions/ExtensionSlot.js.map +1 -1
  168. package/dist/client/session-replay.d.ts +8 -0
  169. package/dist/client/session-replay.d.ts.map +1 -1
  170. package/dist/client/session-replay.js +80 -3
  171. package/dist/client/session-replay.js.map +1 -1
  172. package/dist/collab/routes.d.ts +1 -1
  173. package/dist/jobs/scheduler.js +26 -1
  174. package/dist/jobs/scheduler.js.map +1 -1
  175. package/dist/localization/default-messages.d.ts +19 -0
  176. package/dist/localization/default-messages.d.ts.map +1 -1
  177. package/dist/localization/default-messages.js +19 -0
  178. package/dist/localization/default-messages.js.map +1 -1
  179. package/dist/notifications/routes.d.ts +1 -1
  180. package/dist/observability/routes.d.ts +1 -1
  181. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  182. package/dist/resources/handlers.d.ts +1 -1
  183. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  184. package/dist/templates/default/app/i18n/ar-SA.ts +21 -0
  185. package/dist/templates/default/app/i18n/de-DE.ts +21 -0
  186. package/dist/templates/default/app/i18n/en-US.ts +21 -0
  187. package/dist/templates/default/app/i18n/es-ES.ts +21 -0
  188. package/dist/templates/default/app/i18n/fr-FR.ts +21 -0
  189. package/dist/templates/default/app/i18n/hi-IN.ts +20 -0
  190. package/dist/templates/default/app/i18n/ja-JP.ts +21 -0
  191. package/dist/templates/default/app/i18n/ko-KR.ts +20 -0
  192. package/dist/templates/default/app/i18n/pt-BR.ts +21 -0
  193. package/dist/templates/default/app/i18n/zh-CN.ts +20 -0
  194. package/dist/templates/default/app/i18n/zh-TW.ts +19 -0
  195. package/dist/templates/default/package.json +2 -2
  196. package/dist/templates/headless/package.json +3 -3
  197. package/dist/templates/workspace-core/package.json +6 -6
  198. package/dist/templates/workspace-root/package.json +2 -2
  199. package/dist/triggers/dispatcher.js +27 -2
  200. package/dist/triggers/dispatcher.js.map +1 -1
  201. package/dist/vite/client.d.ts.map +1 -1
  202. package/dist/vite/client.js +70 -1
  203. package/dist/vite/client.js.map +1 -1
  204. package/package.json +7 -6
  205. package/src/templates/default/app/i18n/ar-SA.ts +21 -0
  206. package/src/templates/default/app/i18n/de-DE.ts +21 -0
  207. package/src/templates/default/app/i18n/en-US.ts +21 -0
  208. package/src/templates/default/app/i18n/es-ES.ts +21 -0
  209. package/src/templates/default/app/i18n/fr-FR.ts +21 -0
  210. package/src/templates/default/app/i18n/hi-IN.ts +20 -0
  211. package/src/templates/default/app/i18n/ja-JP.ts +21 -0
  212. package/src/templates/default/app/i18n/ko-KR.ts +20 -0
  213. package/src/templates/default/app/i18n/pt-BR.ts +21 -0
  214. package/src/templates/default/app/i18n/zh-CN.ts +20 -0
  215. package/src/templates/default/app/i18n/zh-TW.ts +19 -0
  216. package/src/templates/default/package.json +2 -2
  217. package/src/templates/headless/package.json +3 -3
  218. package/src/templates/workspace-core/package.json +6 -6
  219. package/src/templates/workspace-root/package.json +2 -2
@@ -89,7 +89,7 @@ Read the `actions` skill. The rules that matter most here:
89
89
 
90
90
  ## Verify
91
91
 
92
- 1. `agent-native typecheck` (or `tsgo --noEmit`) passes.
92
+ 1. `agent-native typecheck` (or `tsc --noEmit`) passes.
93
93
  2. From the agent chat, invoke the new action and confirm structured
94
94
  input/output.
95
95
  3. From the UI, confirm the `useActionQuery` / `useActionMutation` path works and
@@ -66,7 +66,7 @@ Study the existing adapters as the pattern to copy:
66
66
 
67
67
  ## Verify
68
68
 
69
- 1. `tsgo --noEmit` for `@agent-native/core` passes.
69
+ 1. `tsc --noEmit` for `@agent-native/core` passes.
70
70
  2. `discord.spec.ts` passes (`vitest --run src/integrations/adapters/discord`).
71
71
  3. End-to-end smoke: send a signed test interaction to
72
72
  `/_agent-native/integrations/discord/webhook`; confirm a `200` returns
@@ -79,7 +79,7 @@ The substrate lives in `@agent-native/core/provider-api`:
79
79
 
80
80
  ## Verify
81
81
 
82
- 1. `agent-native typecheck` (or `tsgo --noEmit`) passes.
82
+ 1. `agent-native typecheck` (or `tsc --noEmit`) passes.
83
83
  2. With a placeholder `STRIPE_SECRET_KEY` set, ask the agent: "list my 5 most
84
84
  recent Stripe charges." Confirm it calls `provider-api-catalog` →
85
85
  (optionally) `provider-api-docs` → `provider-api-request` against
@@ -70,7 +70,7 @@ augment `env` with the parent's environment and never see app secrets.
70
70
 
71
71
  ## Verify
72
72
 
73
- 1. `tsgo --noEmit` for `@agent-native/core` passes.
73
+ 1. `tsc --noEmit` for `@agent-native/core` passes.
74
74
  2. `docker-adapter.spec.ts` passes.
75
75
  3. With Docker available, set `AGENT_NATIVE_SANDBOX=docker` and run a `run-code`
76
76
  task that uses `appAction`/`providerFetch` through the loopback bridge;
package/corpus/README.md CHANGED
@@ -28,4 +28,4 @@ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core/corpus
28
28
  ## Generated Counts
29
29
 
30
30
  - core files: 2149
31
- - template files: 4940
31
+ - template files: 4973
@@ -1,5 +1,31 @@
1
1
  # @agent-native/core
2
2
 
3
+ ## 0.91.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 823d635: Add a friendly label for the Calendar `calendar.event-detail.bottom` ExtensionSlot so the empty-slot affordance matches Mail's contact sidebar pattern.
8
+ - 823d635: Surface outbound delivery-queue health on Destinations and add quiet overview shortcuts so cleaned-up overview capabilities stay discoverable without restoring the old dashboard. Localize those overview shortcut and delivery-queue labels across Dispatch locales.
9
+ - 823d635: Attribute recurring job and automation LLM usage to task-specific usage labels.
10
+ - 823d635: Clamp absurd session-replay Meta and ViewportResize dimensions at capture so ultra-wide frames are never stored.
11
+ - 823d635: Align run-slot liveness with the stale reaper and surface repeated heartbeat write failures.
12
+ - 823d635: Upgrade the workspace toolchain to TypeScript 7 (`tsc`) with a side-by-side TypeScript 6 API package for tools that still need programmatic access. Replace `@typescript/native-preview` / `tsgo` with the stable `typescript` 7 release.
13
+ - Updated dependencies [823d635]
14
+ - Updated dependencies [823d635]
15
+ - @agent-native/toolkit@0.4.3
16
+
17
+ ## 0.91.1
18
+
19
+ ### Patch Changes
20
+
21
+ - 942165f: Fix design live-edit preview showing a 404/NotFound for client-side-routed
22
+ (SPA) dev apps. The bridge served every snapshot from its own `/live-edit`
23
+ path, so the proxied app's router booted at `location.pathname === "/live-edit"`
24
+ and matched no route. The bridge now injects a synchronous pre-boot
25
+ `history.replaceState` shim that rewrites the iframe path to the real target
26
+ route before the app bundle runs. Asset resolution (via the injected
27
+ `<base href>`) is unchanged, and static/non-SPA apps are unaffected.
28
+
3
29
  ## 0.91.0
4
30
 
5
31
  ### Minor Changes
@@ -89,7 +89,7 @@ Read the `actions` skill. The rules that matter most here:
89
89
 
90
90
  ## Verify
91
91
 
92
- 1. `agent-native typecheck` (or `tsgo --noEmit`) passes.
92
+ 1. `agent-native typecheck` (or `tsc --noEmit`) passes.
93
93
  2. From the agent chat, invoke the new action and confirm structured
94
94
  input/output.
95
95
  3. From the UI, confirm the `useActionQuery` / `useActionMutation` path works and
@@ -66,7 +66,7 @@ Study the existing adapters as the pattern to copy:
66
66
 
67
67
  ## Verify
68
68
 
69
- 1. `tsgo --noEmit` for `@agent-native/core` passes.
69
+ 1. `tsc --noEmit` for `@agent-native/core` passes.
70
70
  2. `discord.spec.ts` passes (`vitest --run src/integrations/adapters/discord`).
71
71
  3. End-to-end smoke: send a signed test interaction to
72
72
  `/_agent-native/integrations/discord/webhook`; confirm a `200` returns
@@ -79,7 +79,7 @@ The substrate lives in `@agent-native/core/provider-api`:
79
79
 
80
80
  ## Verify
81
81
 
82
- 1. `agent-native typecheck` (or `tsgo --noEmit`) passes.
82
+ 1. `agent-native typecheck` (or `tsc --noEmit`) passes.
83
83
  2. With a placeholder `STRIPE_SECRET_KEY` set, ask the agent: "list my 5 most
84
84
  recent Stripe charges." Confirm it calls `provider-api-catalog` →
85
85
  (optionally) `provider-api-docs` → `provider-api-request` against
@@ -70,7 +70,7 @@ augment `env` with the parent's environment and never see app secrets.
70
70
 
71
71
  ## Verify
72
72
 
73
- 1. `tsgo --noEmit` for `@agent-native/core` passes.
73
+ 1. `tsc --noEmit` for `@agent-native/core` passes.
74
74
  2. `docker-adapter.spec.ts` passes.
75
75
  3. With Docker available, set `AGENT_NATIVE_SANDBOX=docker` and run a `run-code`
76
76
  task that uses `appAction`/`providerFetch` through the loopback bridge;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.91.0",
3
+ "version": "0.91.2",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -227,9 +227,9 @@
227
227
  "provenance": true
228
228
  },
229
229
  "scripts": {
230
- "build": "tsgo && tsgo -p tsconfig.cli.json && node scripts/finalize-build.mjs && node scripts/check-dist-imports.mjs",
231
- "dev": "tsgo --watch",
232
- "typecheck": "tsgo --noEmit",
230
+ "build": "tsc && tsc -p tsconfig.cli.json && node scripts/finalize-build.mjs && node scripts/check-dist-imports.mjs",
231
+ "dev": "tsc --watch",
232
+ "typecheck": "tsc --noEmit",
233
233
  "test": "vitest --run src --maxWorkers=25%",
234
234
  "prepack": "tsx ../../scripts/sync-workspace-core-skills.ts --check && npm run build && cp ../../README.md ./README.md",
235
235
  "prepublishOnly": "npm run build"
@@ -367,7 +367,8 @@
367
367
  "react-dom": "^19.2.7",
368
368
  "react-router": "^8.1.0",
369
369
  "tailwindcss": "catalog:",
370
- "typescript": "^6.0.3",
370
+ "typescript": "catalog:",
371
+ "typescript-7": "catalog:",
371
372
  "vite": "catalog:",
372
373
  "vitest": "^4.1.5",
373
374
  "ws": "^8.18.0"
@@ -678,10 +678,31 @@ export function startRun(
678
678
 
679
679
  // Heartbeat: bump heartbeat_at every 1.5s so watchers can detect a dead
680
680
  // producer (process crash, HMR restart, isolate eviction) quickly and
681
- // reap the row. Paired with RUN_STALE_MS (6s) — 4x the interval to
681
+ // reap the row. Paired with RUN_STALE_MS (15s) — 10x the interval to
682
682
  // tolerate transient DB slowness without false positives.
683
+ let consecutiveHeartbeatFailures = 0;
683
684
  const heartbeatTimer: ReturnType<typeof setInterval> = setInterval(() => {
684
- updateRunHeartbeat(runId).catch(() => {});
685
+ updateRunHeartbeat(runId)
686
+ .then(() => {
687
+ consecutiveHeartbeatFailures = 0;
688
+ })
689
+ .catch((error) => {
690
+ consecutiveHeartbeatFailures += 1;
691
+ // Swallow routine single-tick blips; escalate once failures approach
692
+ // the stale window so false-positive stale_run from silent write
693
+ // failures is diagnosable.
694
+ if (consecutiveHeartbeatFailures >= 3) {
695
+ captureError(error, {
696
+ route: "/_agent-native/agent-chat",
697
+ tags: {
698
+ source: "agent-run-manager",
699
+ phase: "heartbeat",
700
+ consecutiveFailures: String(consecutiveHeartbeatFailures),
701
+ },
702
+ extra: { runId, threadId },
703
+ });
704
+ }
705
+ });
685
706
  checkSqlAbort();
686
707
  checkNoProgressBackstop();
687
708
  }, 1500);
@@ -719,7 +719,7 @@ export async function tryClaimRunSlot(
719
719
  WHERE thread_id = ?
720
720
  AND status = 'running'
721
721
  AND ${terminalRunEventExclusionSql()}
722
- AND COALESCE(heartbeat_at, started_at) >= ?
722
+ AND ${livenessBasisSql()} >= ?
723
723
  ORDER BY started_at DESC LIMIT 1`,
724
724
  args: [threadId, heartbeatCutoff],
725
725
  });
@@ -733,7 +733,7 @@ export async function tryClaimRunSlot(
733
733
  WHERE thread_id = ?
734
734
  AND status = 'running'
735
735
  AND ${terminalRunEventExclusionSql()}
736
- AND COALESCE(heartbeat_at, started_at) >= ${backgroundAwareStaleCutoffSql()}
736
+ AND ${livenessBasisSql()} >= ${backgroundAwareStaleCutoffSql()}
737
737
  ORDER BY started_at DESC LIMIT 1`,
738
738
  args: [threadId, now],
739
739
  });
@@ -202,7 +202,7 @@ A new **${kind}** integration. ${kindGuidance}
202
202
 
203
203
  ## Verify
204
204
 
205
- 1. \`agent-native typecheck\` (or \`tsgo --noEmit\`) passes.
205
+ 1. \`agent-native typecheck\` (or \`tsc --noEmit\`) passes.
206
206
  2. Add a focused \`*.spec.ts\` for the new surface and run it.
207
207
  3. Exercise the real workflow end to end: invoke the new action from the agent
208
208
  chat (and the UI if applicable), and confirm the external call round-trips
@@ -33,7 +33,12 @@ const REACT_ROUTER_BUILD_DEPENDENCIES = [
33
33
  "react-router",
34
34
  "vite",
35
35
  ] as const;
36
- const SENTRY_MINIMUM_RELEASE_AGE_EXCLUDES = ['"@sentry/*"'];
36
+ const MINIMUM_RELEASE_AGE_EXCLUDES = [
37
+ '"@typescript/*"',
38
+ '"@sentry/*"',
39
+ "typescript",
40
+ "typescript-7",
41
+ ];
37
42
  const FIRST_PARTY_TARBALL_SYMLINK_EXCLUDES = [
38
43
  "*/CLAUDE.md",
39
44
  "*/.claude/skills",
@@ -1100,7 +1105,7 @@ function postProcessStandalone(
1100
1105
  updated = mergeWorkspaceYamlListItems(
1101
1106
  updated,
1102
1107
  "minimumReleaseAgeExclude",
1103
- SENTRY_MINIMUM_RELEASE_AGE_EXCLUDES,
1108
+ MINIMUM_RELEASE_AGE_EXCLUDES,
1104
1109
  );
1105
1110
  if (updated !== existing) {
1106
1111
  fs.writeFileSync(wsPath, updated);
@@ -1159,7 +1164,7 @@ function fixStandaloneTsconfig(targetDir: string, templateName?: string): void {
1159
1164
  paths["@shared/*"] ??= ["./shared/*"];
1160
1165
  }
1161
1166
  // baseUrl is deprecated/errors in TS 6 (TS5101/TS5102) and removed in TS 7
1162
- // (tsgo, which CI runs). paths already resolve relative to this tsconfig,
1167
+ // (tsc, which CI runs). paths already resolve relative to this tsconfig,
1163
1168
  // and the "*": ["./*"] entry replaces baseUrl's bare-specifier resolution,
1164
1169
  // so never emit baseUrl into scaffolds.
1165
1170
  delete tsconfig.compilerOptions.baseUrl;
@@ -708,8 +708,42 @@ function addLiveEditBaseHref(html: string, href: string): string {
708
708
  return `<!DOCTYPE html><html><head>${baseTag}<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"></head><body>${html}</body></html>`;
709
709
  }
710
710
 
711
- function injectLiveEditBridge(html: string, targetUrl: string, script: string) {
712
- const withBase = addLiveEditBaseHref(html, targetUrl);
711
+ /**
712
+ * Rewrite the iframe path to the real target route before the proxied app's
713
+ * bundle runs. The bridge serves snapshots from its own `/live-edit` path, so a
714
+ * client-side-routed SPA would otherwise boot at "/live-edit", match no route,
715
+ * and render its 404. A synchronous inline script in `<head>` runs during parse
716
+ * (before deferred module bundles), so `history.replaceState` lands the SPA on
717
+ * the intended route. Assets still resolve via the injected `<base href>`.
718
+ */
719
+ function injectPreBootLocationShim(html: string, targetPath: string): string {
720
+ const path = targetPath.trim();
721
+ if (!path || path === "/live-edit") return html;
722
+ const shim = `<script data-agent-native-live-edit-location>
723
+ (function(){try{var p=${JSON.stringify(path)};if(p&&(location.pathname+location.search)!==p){history.replaceState(null,"",p);}}catch(e){}})();
724
+ </script>`;
725
+ if (/<head\b[^>]*>/i.test(html)) {
726
+ return html.replace(/<head\b[^>]*>/i, (match) => `${match}${shim}`);
727
+ }
728
+ if (/<html\b[^>]*>/i.test(html)) {
729
+ return html.replace(
730
+ /<html\b[^>]*>/i,
731
+ (match) => `${match}<head>${shim}</head>`,
732
+ );
733
+ }
734
+ return `${shim}${html}`;
735
+ }
736
+
737
+ function injectLiveEditBridge(
738
+ html: string,
739
+ baseHref: string,
740
+ script: string,
741
+ targetPath: string,
742
+ ) {
743
+ const withBase = injectPreBootLocationShim(
744
+ addLiveEditBaseHref(html, baseHref),
745
+ targetPath,
746
+ );
713
747
  if (!script) return withBase;
714
748
  if (withBase.includes("</body>")) {
715
749
  return withBase.replace("</body>", `${script}</body>`);
@@ -1288,10 +1322,17 @@ export async function startDesignConnectBridge(
1288
1322
  );
1289
1323
  const includeEditorBridge =
1290
1324
  requestUrl.searchParams.get("bridge") !== "0";
1325
+ // The dev server route the SPA must boot on (e.g. "/todo"), taken
1326
+ // from the resolved snapshot target rather than the bridge's own
1327
+ // "/live-edit" request path.
1328
+ const targetParsed = new URL(targetUrl);
1329
+ const targetPath =
1330
+ `${targetParsed.pathname}${targetParsed.search}` || "/";
1291
1331
  const html = injectLiveEditBridge(
1292
1332
  snapshot.html,
1293
1333
  new URL("/", manifest.bridgeUrl).toString(),
1294
1334
  includeEditorBridge ? liveEditBridgeScript : "",
1335
+ targetPath,
1295
1336
  );
1296
1337
  sendText(
1297
1338
  res,
@@ -1897,15 +1938,18 @@ export async function runDesign(argv: string[]) {
1897
1938
  console.error(`Routes: ${manifest.routeCount}`);
1898
1939
  console.error(`Dev URL: ${manifest.devServerUrl}`);
1899
1940
 
1900
- // Self-register with the design app server (best-effort). When an app URL
1901
- // is available (via --app-url or env var) the CLI POSTs the bridge token to
1902
- // connect-localhost so the server row stores the real token. Without this
1903
- // step grant-localhost-write-consent would mint a different token, causing
1904
- // every bridge write to return 401.
1941
+ // Self-register with the design app server (best-effort): POST the bridge
1942
+ // token to connect-localhost so the server row stores the real token. Without
1943
+ // it, the bridge and server tokens diverge and every write returns 401.
1905
1944
  const appUrl = resolveAppUrl(parsed.appUrl);
1906
1945
  if (appUrl) {
1907
- const authToken = resolveAuthToken();
1908
- void registerConnectionWithServer(appUrl, bridge, authToken);
1946
+ void registerConnectionWithServer(appUrl, bridge, resolveAuthToken());
1947
+ } else {
1948
+ // No app URL means the token never reaches the DB — surface it instead of
1949
+ // silently skipping, since live-edit will then 401.
1950
+ console.error(
1951
+ "[design connect] No app URL resolved (pass --app-url or set AGENT_NATIVE_URL); skipping self-registration — live-edit will fail to authorize.",
1952
+ );
1909
1953
  }
1910
1954
 
1911
1955
  return await new Promise<number>((resolve) => {
@@ -279,13 +279,14 @@ function findTsxBin(): string {
279
279
  }
280
280
 
281
281
  function findTypeScriptCompilerBin(): string {
282
- const localTsgo = path.resolve("node_modules/.bin/tsgo");
283
- if (fs.existsSync(localTsgo)) return localTsgo;
284
-
285
282
  const localTsc = path.resolve("node_modules/.bin/tsc");
286
283
  if (fs.existsSync(localTsc)) return localTsc;
287
284
 
288
- return "tsgo";
285
+ // Prefer TypeScript 7's tsc; fall back to legacy tsgo if present.
286
+ const localTsgo = path.resolve("node_modules/.bin/tsgo");
287
+ if (fs.existsSync(localTsgo)) return localTsgo;
288
+
289
+ return "tsc";
289
290
  }
290
291
 
291
292
  function findReactRouterBin(): string {
@@ -266,6 +266,13 @@ function describeSlot(
266
266
  };
267
267
  }
268
268
 
269
+ if (slotId === "calendar.event-detail.bottom") {
270
+ return {
271
+ title: t("extensions.eventDetailWidget"),
272
+ description: t("extensions.eventDetailDescription"),
273
+ };
274
+ }
275
+
269
276
  return {
270
277
  title: t("extensions.addWidgetHere"),
271
278
  description: slotId,
@@ -745,6 +745,99 @@ function serializeReplayEvent(event: ReplayEvent): string {
745
745
  }
746
746
  }
747
747
 
748
+ /** rrweb Meta event type. */
749
+ const RRWEB_META_EVENT = 4;
750
+ /** rrweb IncrementalSnapshot event type. */
751
+ const RRWEB_INCREMENTAL_EVENT = 3;
752
+ /** rrweb ViewportResize incremental source. */
753
+ const RRWEB_VIEWPORT_RESIZE_SOURCE = 4;
754
+
755
+ /**
756
+ * Bounds for captured viewport frames. Multi-monitor spans and corrupt
757
+ * resize payloads produce absurd aspect ratios that collapse the replay
758
+ * stage into an ultra-wide ribbon after fit-to-scale. Clamp at capture so
759
+ * bad dimensions are never stored.
760
+ */
761
+ const MIN_CAPTURED_VIEWPORT = 240;
762
+ const MAX_CAPTURED_ASPECT_RATIO = 2.45;
763
+ const MIN_CAPTURED_ASPECT_RATIO = 0.5;
764
+
765
+ /**
766
+ * Rewrite Meta / ViewportResize frames with absurd dimensions before they
767
+ * enter the upload queue. Returns the original event when dimensions are
768
+ * already sane or the event is not a viewport frame.
769
+ */
770
+ export function sanitizeCapturedReplayViewportEvent(
771
+ event: ReplayEvent,
772
+ ): ReplayEvent {
773
+ const type = event.type;
774
+ if (type === RRWEB_META_EVENT) {
775
+ return sanitizeCapturedViewportData(event, event.data);
776
+ }
777
+ if (type === RRWEB_INCREMENTAL_EVENT) {
778
+ const data = event.data;
779
+ if (
780
+ data &&
781
+ typeof data === "object" &&
782
+ !Array.isArray(data) &&
783
+ (data as Record<string, unknown>).source === RRWEB_VIEWPORT_RESIZE_SOURCE
784
+ ) {
785
+ return sanitizeCapturedViewportData(event, data);
786
+ }
787
+ }
788
+ return event;
789
+ }
790
+
791
+ function sanitizeCapturedViewportData(
792
+ event: ReplayEvent,
793
+ data: unknown,
794
+ ): ReplayEvent {
795
+ if (!data || typeof data !== "object" || Array.isArray(data)) return event;
796
+ const record = data as Record<string, unknown>;
797
+ const width = record.width;
798
+ const height = record.height;
799
+ if (
800
+ typeof width !== "number" ||
801
+ typeof height !== "number" ||
802
+ !Number.isFinite(width) ||
803
+ !Number.isFinite(height) ||
804
+ width <= 0 ||
805
+ height <= 0
806
+ ) {
807
+ return event;
808
+ }
809
+ const clamped = clampCapturedViewport(width, height);
810
+ if (
811
+ clamped.width === Math.round(width) &&
812
+ clamped.height === Math.round(height)
813
+ ) {
814
+ return event;
815
+ }
816
+ return {
817
+ ...event,
818
+ data: {
819
+ ...record,
820
+ width: clamped.width,
821
+ height: clamped.height,
822
+ },
823
+ };
824
+ }
825
+
826
+ function clampCapturedViewport(
827
+ width: number,
828
+ height: number,
829
+ ): { width: number; height: number } {
830
+ let nextWidth = Math.max(MIN_CAPTURED_VIEWPORT, Math.round(width));
831
+ let nextHeight = Math.max(MIN_CAPTURED_VIEWPORT, Math.round(height));
832
+ const aspect = nextWidth / nextHeight;
833
+ if (aspect > MAX_CAPTURED_ASPECT_RATIO) {
834
+ nextWidth = Math.round(nextHeight * MAX_CAPTURED_ASPECT_RATIO);
835
+ } else if (aspect < MIN_CAPTURED_ASPECT_RATIO) {
836
+ nextHeight = Math.round(nextWidth / MIN_CAPTURED_ASPECT_RATIO);
837
+ }
838
+ return { width: nextWidth, height: nextHeight };
839
+ }
840
+
748
841
  function replayEventTimestampMs(event: ReplayEvent): number {
749
842
  const timestamp = event.timestamp;
750
843
  if (typeof timestamp === "number" && Number.isFinite(timestamp)) {
@@ -762,7 +855,8 @@ function enqueueReplayEvent(
762
855
  event: ReplayEvent,
763
856
  ): void {
764
857
  if (!state.options) return;
765
- const serialized = serializeReplayEvent(event);
858
+ const sanitized = sanitizeCapturedReplayViewportEvent(event);
859
+ const serialized = serializeReplayEvent(sanitized);
766
860
  if (!serialized) return;
767
861
  const estimatedBytes = serialized.length;
768
862
  if (
@@ -773,8 +867,8 @@ function enqueueReplayEvent(
773
867
  }
774
868
  state.queue.push({
775
869
  json: serialized,
776
- timestampMs: replayEventTimestampMs(event),
777
- type: typeof event.type === "number" ? event.type : null,
870
+ timestampMs: replayEventTimestampMs(sanitized),
871
+ type: typeof sanitized.type === "number" ? sanitized.type : null,
778
872
  });
779
873
  state.queuedBytes += estimatedBytes;
780
874
  flushQueuedReplayIfNeeded(state);
@@ -451,13 +451,16 @@ async function executeJob(
451
451
  // run completes so finished jobs don't leave a live timer keeping the
452
452
  // process/event loop alive for the remainder of the window.
453
453
  let hardAbortTimer: ReturnType<typeof setTimeout> | null = null;
454
+ const jobUsageRef: {
455
+ current: Awaited<ReturnType<typeof runAgentLoop>> | null;
456
+ } = { current: null };
454
457
  await new Promise<void>((resolve, reject) => {
455
458
  const activeRun = startRun(
456
459
  runId,
457
460
  thread.id,
458
461
  async (send, signal) => {
459
462
  try {
460
- await runAgentLoop({
463
+ jobUsageRef.current = await runAgentLoop({
461
464
  engine,
462
465
  model,
463
466
  systemPrompt,
@@ -512,6 +515,32 @@ async function executeJob(
512
515
 
513
516
  if (jobError) throw jobError;
514
517
 
518
+ const jobUsage = jobUsageRef.current;
519
+ if (
520
+ jobUsage &&
521
+ (jobUsage.inputTokens > 0 ||
522
+ jobUsage.outputTokens > 0 ||
523
+ jobUsage.cacheReadTokens > 0 ||
524
+ jobUsage.cacheWriteTokens > 0)
525
+ ) {
526
+ try {
527
+ const { recordUsage } = await import("../usage/store.js");
528
+ await recordUsage({
529
+ ownerEmail: jobUserEmail,
530
+ inputTokens: jobUsage.inputTokens,
531
+ outputTokens: jobUsage.outputTokens,
532
+ cacheReadTokens: jobUsage.cacheReadTokens,
533
+ cacheWriteTokens: jobUsage.cacheWriteTokens,
534
+ model: jobUsage.model,
535
+ label: `recurring-job:${jobName}`,
536
+ app: deps.appId,
537
+ refId: runId,
538
+ });
539
+ } catch {
540
+ // Usage attribution must not break the scheduled task.
541
+ }
542
+ }
543
+
515
544
  // Success — update status. Compute the next run from completion time,
516
545
  // not the job's start time `now`: a long run could otherwise schedule a
517
546
  // nextRun that's already in the past and re-fire immediately next tick.
@@ -47,6 +47,8 @@ const messages = {
47
47
  destinations: "Destinations",
48
48
  identities: "Identities",
49
49
  approvals: "Approvals",
50
+ automations: "Automations",
51
+ delivery: "Delivery",
50
52
  audit: "Audit",
51
53
  dreams: "Dreams",
52
54
  threadDebug: "Thread Debug",
@@ -161,6 +163,22 @@ const messages = {
161
163
  activeUsers: "Active users",
162
164
  workspaceAppsStat: "Workspace apps",
163
165
  chatThreads: "Chat threads",
166
+ also: "Also",
167
+ workspaceShortcutsAria: "Workspace shortcuts",
168
+ deliveryQueue: "Delivery queue",
169
+ failedLastHour: "{{count}} failed in the last hour",
170
+ processingCount: "{{count}} processing",
171
+ queued: "Queued",
172
+ active: "Active",
173
+ done1h: "Done 1h",
174
+ failed1h: "Failed 1h",
175
+ oldestQueued: "Oldest queued: {{age}}",
176
+ queueAgeNone: "none",
177
+ queueFailureHint:
178
+ "Check credentials, destinations, and recent queue errors.",
179
+ unknownPlatform: "unknown",
180
+ attemptsCount: "{{count}} attempts",
181
+ noErrorMessage: "(no error message)",
164
182
  },
165
183
  },
166
184
  agentPanel: {
@@ -335,6 +353,9 @@ const messages = {
335
353
  contactSidebarWidget: "Contact sidebar widget",
336
354
  contactSidebarDescription:
337
355
  "Appears beside the current conversation with contact and thread context.",
356
+ eventDetailWidget: "Event detail widget",
357
+ eventDetailDescription:
358
+ "Appears below the open calendar event with event and attendee context.",
338
359
  addWidgetHere: "Add widget here",
339
360
  back: "Back",
340
361
  editExtension: "Edit Extension",
@@ -41,6 +41,8 @@ const messages = {
41
41
  destinations: "Destinations",
42
42
  identities: "Identities",
43
43
  approvals: "الموافقات",
44
+ automations: "الأتمتة",
45
+ delivery: "التسليم",
44
46
  audit: "Audit",
45
47
  dreams: "Dreams",
46
48
  threadDebug: "تصحيح الموضوع",
@@ -159,6 +161,22 @@ const messages = {
159
161
  activeUsers: "المستخدمين النشطين",
160
162
  workspaceAppsStat: "تطبيقات مساحة العمل",
161
163
  chatThreads: "مواضيع الدردشة",
164
+ also: "أيضًا",
165
+ workspaceShortcutsAria: "اختصارات مساحة العمل",
166
+ deliveryQueue: "قائمة انتظار التسليم",
167
+ failedLastHour: "{{count}} فشل خلال الساعة الماضية",
168
+ processingCount: "{{count}} قيد المعالجة",
169
+ queued: "في الانتظار",
170
+ active: "نشط",
171
+ done1h: "تم خلال ساعة",
172
+ failed1h: "فشل خلال ساعة",
173
+ oldestQueued: "الأقدم في الانتظار: {{age}}",
174
+ queueAgeNone: "لا شيء",
175
+ queueFailureHint:
176
+ "تحقق من بيانات الاعتماد والوجهات وأخطاء قائمة الانتظار الأخيرة.",
177
+ unknownPlatform: "غير معروف",
178
+ attemptsCount: "{{count}} محاولات",
179
+ noErrorMessage: "(لا توجد رسالة خطأ)",
162
180
  },
163
181
  },
164
182
  agentPanel: {
@@ -346,6 +364,9 @@ const messages = {
346
364
  contactSidebarWidget: "الاتصال القطعة الشريط الجانبي",
347
365
  contactSidebarDescription:
348
366
  "يظهر بجانب المحادثة الحالية مع سياق جهة الاتصال وسلسلة المحادثات.",
367
+ eventDetailWidget: "أداة تفاصيل الحدث",
368
+ eventDetailDescription:
369
+ "تظهر أسفل حدث التقويم المفتوح مع سياق الحدث والحضور.",
349
370
  addWidgetHere: "أضف القطعة هنا",
350
371
  back: "رجوع",
351
372
  editExtension: "تحرير التمديد",