@agent-native/core 0.91.1 → 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 (209) 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 +14 -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/index.ts +5 -4
  17. package/corpus/core/src/client/extensions/ExtensionSlot.tsx +7 -0
  18. package/corpus/core/src/client/session-replay.ts +97 -3
  19. package/corpus/core/src/jobs/scheduler.ts +30 -1
  20. package/corpus/core/src/localization/default-messages.ts +21 -0
  21. package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +21 -0
  22. package/corpus/core/src/templates/default/app/i18n/de-DE.ts +21 -0
  23. package/corpus/core/src/templates/default/app/i18n/en-US.ts +21 -0
  24. package/corpus/core/src/templates/default/app/i18n/es-ES.ts +21 -0
  25. package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +21 -0
  26. package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +20 -0
  27. package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +21 -0
  28. package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +20 -0
  29. package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +21 -0
  30. package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +20 -0
  31. package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +19 -0
  32. package/corpus/core/src/templates/default/package.json +2 -2
  33. package/corpus/core/src/templates/headless/package.json +3 -3
  34. package/corpus/core/src/templates/workspace-core/package.json +6 -6
  35. package/corpus/core/src/templates/workspace-root/package.json +2 -2
  36. package/corpus/core/src/triggers/dispatcher.ts +30 -2
  37. package/corpus/core/src/vite/client.ts +96 -1
  38. package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +21 -2
  39. package/corpus/templates/analytics/app/global.css +26 -10
  40. package/corpus/templates/analytics/app/i18n/zh-TW.ts +2 -0
  41. package/corpus/templates/analytics/app/i18n-data.ts +25 -0
  42. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +548 -237
  43. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +285 -294
  44. package/corpus/templates/analytics/changelog/2026-07-08-console-details-expand-inline-under-each-row-and-the-event-t.md +6 -0
  45. package/corpus/templates/analytics/changelog/2026-07-08-session-replay-clamps-ultra-wide-viewports-while-keeping-the.md +6 -0
  46. package/corpus/templates/analytics/changelog/2026-07-08-session-replay-keeps-a-usable-stage-when-dev-tools-is-open-a.md +6 -0
  47. package/corpus/templates/analytics/changelog/2026-07-08-session-replay-resumes-after-scrubbing-and-expands-console-r.md +6 -0
  48. package/corpus/templates/analytics/changelog/2026-07-08-session-replays-wait-for-full-load-keep-a-normal-viewport-an.md +6 -0
  49. package/corpus/templates/analytics/package.json +2 -2
  50. package/corpus/templates/assets/package.json +2 -2
  51. package/corpus/templates/brain/package.json +2 -2
  52. package/corpus/templates/calendar/AGENTS.md +10 -0
  53. package/corpus/templates/calendar/actions/create-event.ts +5 -1
  54. package/corpus/templates/calendar/actions/event-action-helpers.ts +41 -0
  55. package/corpus/templates/calendar/actions/get-attendee-timezones.ts +28 -0
  56. package/corpus/templates/calendar/actions/set-attendee-timezone.ts +68 -0
  57. package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +150 -11
  58. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +36 -1
  59. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +32 -0
  60. package/corpus/templates/calendar/app/hooks/use-attendee-timezones.ts +24 -0
  61. package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
  62. package/corpus/templates/calendar/app/i18n-data.ts +20 -0
  63. package/corpus/templates/calendar/app/lib/attendee-local-time.ts +122 -0
  64. package/corpus/templates/calendar/changelog/2026-07-08-event-details-now-support-extension-widgets-and-you-can-see-.md +6 -0
  65. package/corpus/templates/calendar/changelog/2026-07-08-when-you-invite-guests-to-a-new-event-you-now-appear-in.md +6 -0
  66. package/corpus/templates/calendar/package.json +2 -2
  67. package/corpus/templates/calendar/server/handlers/events.ts +5 -1
  68. package/corpus/templates/calendar/shared/api.ts +6 -0
  69. package/corpus/templates/chat/package.json +2 -2
  70. package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +6 -2
  71. package/corpus/templates/clips/actions/create-meeting.ts +8 -3
  72. package/corpus/templates/clips/actions/list-meetings.ts +31 -3
  73. package/corpus/templates/clips/changelog/2026-07-08-after-finishing-a-desktop-recording-reopening-clips-restor.md +6 -0
  74. package/corpus/templates/clips/changelog/2026-07-08-clips-now-pops-up-to-take-notes-when-you-join-an-adhoc-zoom-.md +6 -0
  75. package/corpus/templates/clips/changelog/2026-07-08-desktop-clip-recordings-are-louder-after-capture-mic-only.md +6 -0
  76. package/corpus/templates/clips/changelog/2026-07-08-meeting-reminders-now-appear-1-minute-before-start-stay-unti.md +6 -0
  77. package/corpus/templates/clips/changelog/2026-07-08-the-desktop-meetings-panel-has-room-for-its-drop-shadow-and-.md +6 -0
  78. package/corpus/templates/clips/chrome-extension/package.json +2 -2
  79. package/corpus/templates/clips/desktop/package.json +2 -2
  80. package/corpus/templates/clips/desktop/src/app.tsx +91 -34
  81. package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +15 -5
  82. package/corpus/templates/clips/desktop/src/lib/meeting-notification-timing.ts +83 -0
  83. package/corpus/templates/clips/desktop/src/lib/native-recording-warm.ts +21 -0
  84. package/corpus/templates/clips/desktop/src/lib/recorder.ts +98 -20
  85. package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +174 -50
  86. package/corpus/templates/clips/desktop/src/styles.css +128 -53
  87. package/corpus/templates/clips/desktop/src-tauri/src/adhoc_meetings_watcher.rs +364 -0
  88. package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +1 -1
  89. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +5 -0
  90. package/corpus/templates/clips/desktop/src-tauri/src/meetings_watcher.rs +91 -11
  91. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +69 -19
  92. package/corpus/templates/clips/desktop/src-tauri/src/native_speech.rs +36 -1
  93. package/corpus/templates/clips/desktop/src-tauri/src/notifications.rs +62 -10
  94. package/corpus/templates/clips/desktop/src-tauri/src/silence_detector.rs +1 -24
  95. package/corpus/templates/clips/desktop/src-tauri/src/util.rs +36 -1
  96. package/corpus/templates/clips/package.json +2 -2
  97. package/corpus/templates/content/actions/_content-database-personal-view.ts +80 -0
  98. package/corpus/templates/content/actions/get-content-database-personal-view.ts +27 -0
  99. package/corpus/templates/content/actions/update-content-database-personal-view.ts +31 -0
  100. package/corpus/templates/content/actions/update-content-database-view.ts +3 -0
  101. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +1 -1
  102. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +2584 -546
  103. package/corpus/templates/content/app/components/editor/database/filter-sort.ts +220 -18
  104. package/corpus/templates/content/app/hooks/use-content-database.ts +32 -0
  105. package/corpus/templates/content/app/i18n/zh-TW.ts +16 -0
  106. package/corpus/templates/content/app/i18n-data.ts +154 -0
  107. package/corpus/templates/content/changelog/2026-07-08-database-filters-now-support-notion-style-reset-save-for-eve.md +6 -0
  108. package/corpus/templates/content/changelog/2026-07-08-date-filters-can-now-target-a-between-range.md +6 -0
  109. package/corpus/templates/content/package.json +2 -2
  110. package/corpus/templates/content/parity/matrix.md +1 -1
  111. package/corpus/templates/content/parity/matrix.ts +2 -0
  112. package/corpus/templates/content/shared/api.ts +24 -0
  113. package/corpus/templates/design/package.json +2 -2
  114. package/corpus/templates/dispatch/app/i18n/zh-TW.ts +34 -1
  115. package/corpus/templates/dispatch/app/i18n-data.ts +387 -10
  116. package/corpus/templates/dispatch/app/routes/automations.tsx +1 -0
  117. package/corpus/templates/dispatch/changelog/2026-07-08-added-an-automations-page-to-review-pause-and-create.md +6 -0
  118. package/corpus/templates/dispatch/changelog/2026-07-08-destinations-now-shows-outbound-delivery-queue-health.md +6 -0
  119. package/corpus/templates/dispatch/package.json +2 -2
  120. package/corpus/templates/forms/package.json +2 -2
  121. package/corpus/templates/macros/package.json +2 -2
  122. package/corpus/templates/mail/app/hooks/use-emails.ts +56 -44
  123. package/corpus/templates/mail/app/lib/gmail-mutation-queue.ts +325 -0
  124. package/corpus/templates/mail/changelog/2026-07-08-rapid-archive-and-mark-read-now-batch-gmail-updates-so-the-i.md +6 -0
  125. package/corpus/templates/mail/package.json +2 -2
  126. package/corpus/templates/plan/package.json +2 -2
  127. package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +46 -29
  128. package/corpus/templates/slides/app/context/DeckContext.tsx +45 -18
  129. package/corpus/templates/slides/app/i18n/ar-SA.ts +4 -0
  130. package/corpus/templates/slides/app/i18n/de-DE.ts +4 -0
  131. package/corpus/templates/slides/app/i18n/en-US.ts +4 -0
  132. package/corpus/templates/slides/app/i18n/es-ES.ts +4 -0
  133. package/corpus/templates/slides/app/i18n/fr-FR.ts +4 -0
  134. package/corpus/templates/slides/app/i18n/hi-IN.ts +4 -0
  135. package/corpus/templates/slides/app/i18n/ja-JP.ts +4 -0
  136. package/corpus/templates/slides/app/i18n/ko-KR.ts +4 -0
  137. package/corpus/templates/slides/app/i18n/pt-BR.ts +4 -0
  138. package/corpus/templates/slides/app/i18n/zh-CN.ts +4 -0
  139. package/corpus/templates/slides/app/i18n/zh-TW.ts +4 -0
  140. package/corpus/templates/slides/app/lib/image-drop-to-agent.ts +115 -0
  141. package/corpus/templates/slides/app/pages/DeckEditor.tsx +22 -13
  142. package/corpus/templates/slides/changelog/2026-07-08-dropping-an-image-onto-a-slide-and-sending-it-to-the-agent-w.md +6 -0
  143. package/corpus/templates/slides/changelog/2026-07-08-undo-works-after-the-agent-edits-a-slide-so-you-can-reverse.md +6 -0
  144. package/corpus/templates/slides/package.json +2 -2
  145. package/dist/agent/run-manager.d.ts.map +1 -1
  146. package/dist/agent/run-manager.js +23 -2
  147. package/dist/agent/run-manager.js.map +1 -1
  148. package/dist/agent/run-store.js +2 -2
  149. package/dist/agent/run-store.js.map +1 -1
  150. package/dist/catalog.json +2 -2
  151. package/dist/cli/add.js +1 -1
  152. package/dist/cli/add.js.map +1 -1
  153. package/dist/cli/create.d.ts.map +1 -1
  154. package/dist/cli/create.js +8 -3
  155. package/dist/cli/create.js.map +1 -1
  156. package/dist/cli/index.js +5 -4
  157. package/dist/cli/index.js.map +1 -1
  158. package/dist/client/extensions/ExtensionSlot.js +6 -0
  159. package/dist/client/extensions/ExtensionSlot.js.map +1 -1
  160. package/dist/client/session-replay.d.ts +8 -0
  161. package/dist/client/session-replay.d.ts.map +1 -1
  162. package/dist/client/session-replay.js +80 -3
  163. package/dist/client/session-replay.js.map +1 -1
  164. package/dist/collab/struct-routes.d.ts +1 -1
  165. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  166. package/dist/jobs/scheduler.js +26 -1
  167. package/dist/jobs/scheduler.js.map +1 -1
  168. package/dist/localization/default-messages.d.ts +19 -0
  169. package/dist/localization/default-messages.d.ts.map +1 -1
  170. package/dist/localization/default-messages.js +19 -0
  171. package/dist/localization/default-messages.js.map +1 -1
  172. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  173. package/dist/resources/handlers.d.ts +2 -2
  174. package/dist/templates/default/app/i18n/ar-SA.ts +21 -0
  175. package/dist/templates/default/app/i18n/de-DE.ts +21 -0
  176. package/dist/templates/default/app/i18n/en-US.ts +21 -0
  177. package/dist/templates/default/app/i18n/es-ES.ts +21 -0
  178. package/dist/templates/default/app/i18n/fr-FR.ts +21 -0
  179. package/dist/templates/default/app/i18n/hi-IN.ts +20 -0
  180. package/dist/templates/default/app/i18n/ja-JP.ts +21 -0
  181. package/dist/templates/default/app/i18n/ko-KR.ts +20 -0
  182. package/dist/templates/default/app/i18n/pt-BR.ts +21 -0
  183. package/dist/templates/default/app/i18n/zh-CN.ts +20 -0
  184. package/dist/templates/default/app/i18n/zh-TW.ts +19 -0
  185. package/dist/templates/default/package.json +2 -2
  186. package/dist/templates/headless/package.json +3 -3
  187. package/dist/templates/workspace-core/package.json +6 -6
  188. package/dist/templates/workspace-root/package.json +2 -2
  189. package/dist/triggers/dispatcher.js +27 -2
  190. package/dist/triggers/dispatcher.js.map +1 -1
  191. package/dist/vite/client.d.ts.map +1 -1
  192. package/dist/vite/client.js +70 -1
  193. package/dist/vite/client.js.map +1 -1
  194. package/package.json +7 -6
  195. package/src/templates/default/app/i18n/ar-SA.ts +21 -0
  196. package/src/templates/default/app/i18n/de-DE.ts +21 -0
  197. package/src/templates/default/app/i18n/en-US.ts +21 -0
  198. package/src/templates/default/app/i18n/es-ES.ts +21 -0
  199. package/src/templates/default/app/i18n/fr-FR.ts +21 -0
  200. package/src/templates/default/app/i18n/hi-IN.ts +20 -0
  201. package/src/templates/default/app/i18n/ja-JP.ts +21 -0
  202. package/src/templates/default/app/i18n/ko-KR.ts +20 -0
  203. package/src/templates/default/app/i18n/pt-BR.ts +21 -0
  204. package/src/templates/default/app/i18n/zh-CN.ts +20 -0
  205. package/src/templates/default/app/i18n/zh-TW.ts +19 -0
  206. package/src/templates/default/package.json +2 -2
  207. package/src/templates/headless/package.json +3 -3
  208. package/src/templates/workspace-core/package.json +6 -6
  209. 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: 4941
31
+ - template files: 4973
@@ -1,5 +1,19 @@
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
+
3
17
  ## 0.91.1
4
18
 
5
19
  ### Patch 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.1",
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;
@@ -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: "تحرير التمديد",
@@ -43,6 +43,8 @@ const messages = {
43
43
  destinations: "Destinations",
44
44
  identities: "Identities",
45
45
  approvals: "Zulassungen",
46
+ automations: "Automatisierungen",
47
+ delivery: "Zustellung",
46
48
  audit: "Audit",
47
49
  dreams: "Dreams",
48
50
  threadDebug: "Thread-Debug",
@@ -160,6 +162,22 @@ const messages = {
160
162
  activeUsers: "Aktive Benutzer",
161
163
  workspaceAppsStat: "Workspace-Apps",
162
164
  chatThreads: "Chat-Threads",
165
+ also: "Außerdem",
166
+ workspaceShortcutsAria: "Workspace-Kurzbefehle",
167
+ deliveryQueue: "Zustellungswarteschlange",
168
+ failedLastHour: "{{count}} fehlgeschlagen in der letzten Stunde",
169
+ processingCount: "{{count}} in Bearbeitung",
170
+ queued: "Warteschlange",
171
+ active: "Aktiv",
172
+ done1h: "Erledigt 1 Std.",
173
+ failed1h: "Fehlgeschlagen 1 Std.",
174
+ oldestQueued: "Älteste Warteschlange: {{age}}",
175
+ queueAgeNone: "keine",
176
+ queueFailureHint:
177
+ "Prüfe Anmeldedaten, Ziele und aktuelle Warteschlangenfehler.",
178
+ unknownPlatform: "unbekannt",
179
+ attemptsCount: "{{count}} Versuche",
180
+ noErrorMessage: "(keine Fehlermeldung)",
163
181
  },
164
182
  },
165
183
  agentPanel: {
@@ -339,6 +357,9 @@ const messages = {
339
357
  contactSidebarWidget: "Kontakt-Sidebar-Widget",
340
358
  contactSidebarDescription:
341
359
  "Erscheint neben der aktuellen Konversation mit Kontakt- und Thread-Kontext.",
360
+ eventDetailWidget: "Ereignisdetail-Widget",
361
+ eventDetailDescription:
362
+ "Erscheint unter dem geöffneten Kalenderereignis mit Ereignis- und Teilnehmerkontext.",
342
363
  addWidgetHere: "Widget hier hinzufügen",
343
364
  back: "Zurück",
344
365
  editExtension: "Erweiterung bearbeiten",
@@ -42,6 +42,8 @@ const messages = {
42
42
  destinations: "Destinations",
43
43
  identities: "Identities",
44
44
  approvals: "Approvals",
45
+ automations: "Automations",
46
+ delivery: "Delivery",
45
47
  audit: "Audit",
46
48
  dreams: "Dreams",
47
49
  threadDebug: "Thread Debug",
@@ -156,6 +158,22 @@ const messages = {
156
158
  activeUsers: "Active users",
157
159
  workspaceAppsStat: "Workspace apps",
158
160
  chatThreads: "Chat threads",
161
+ also: "Also",
162
+ workspaceShortcutsAria: "Workspace shortcuts",
163
+ deliveryQueue: "Delivery queue",
164
+ failedLastHour: "{{count}} failed in the last hour",
165
+ processingCount: "{{count}} processing",
166
+ queued: "Queued",
167
+ active: "Active",
168
+ done1h: "Done 1h",
169
+ failed1h: "Failed 1h",
170
+ oldestQueued: "Oldest queued: {{age}}",
171
+ queueAgeNone: "none",
172
+ queueFailureHint:
173
+ "Check credentials, destinations, and recent queue errors.",
174
+ unknownPlatform: "unknown",
175
+ attemptsCount: "{{count}} attempts",
176
+ noErrorMessage: "(no error message)",
159
177
  },
160
178
  },
161
179
  agentPanel: {
@@ -330,6 +348,9 @@ const messages = {
330
348
  contactSidebarWidget: "Contact sidebar widget",
331
349
  contactSidebarDescription:
332
350
  "Appears beside the current conversation with contact and thread context.",
351
+ eventDetailWidget: "Event detail widget",
352
+ eventDetailDescription:
353
+ "Appears below the open calendar event with event and attendee context.",
333
354
  addWidgetHere: "Add widget here",
334
355
  back: "Back",
335
356
  editExtension: "Edit Extension",
@@ -43,6 +43,8 @@ const messages = {
43
43
  destinations: "Destinations",
44
44
  identities: "Identities",
45
45
  approvals: "Aprobaciones",
46
+ automations: "Automatizaciones",
47
+ delivery: "Entrega",
46
48
  audit: "Audit",
47
49
  dreams: "Dreams",
48
50
  threadDebug: "Depuración de subprocesos",
@@ -161,6 +163,22 @@ const messages = {
161
163
  activeUsers: "Usuarios activos",
162
164
  workspaceAppsStat: "Aplicaciones de espacio de trabajo",
163
165
  chatThreads: "Hilos de chat",
166
+ also: "También",
167
+ workspaceShortcutsAria: "Accesos directos del espacio de trabajo",
168
+ deliveryQueue: "Cola de entrega",
169
+ failedLastHour: "{{count}} fallos en la última hora",
170
+ processingCount: "{{count}} en proceso",
171
+ queued: "En cola",
172
+ active: "Activo",
173
+ done1h: "Hecho 1 h",
174
+ failed1h: "Fallido 1 h",
175
+ oldestQueued: "Más antiguo en cola: {{age}}",
176
+ queueAgeNone: "ninguno",
177
+ queueFailureHint:
178
+ "Revisa las credenciales, los destinos y los errores recientes de la cola.",
179
+ unknownPlatform: "desconocido",
180
+ attemptsCount: "{{count}} intentos",
181
+ noErrorMessage: "(sin mensaje de error)",
164
182
  },
165
183
  },
166
184
  agentPanel: {
@@ -344,6 +362,9 @@ const messages = {
344
362
  contactSidebarWidget: "Widget de la barra lateral de contacto",
345
363
  contactSidebarDescription:
346
364
  "Aparece junto a la conversación actual con el contexto del contacto y del hilo.",
365
+ eventDetailWidget: "Widget de detalle del evento",
366
+ eventDetailDescription:
367
+ "Aparece debajo del evento de calendario abierto con el contexto del evento y los asistentes.",
347
368
  addWidgetHere: "Añadir widget aquí",
348
369
  back: "Volver",
349
370
  editExtension: "Editar extensión",