@agent-native/core 0.141.3 → 0.141.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 (152) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/analysis-workspace/SKILL.md +1 -1
  3. package/corpus/templates/analytics/actions/gong-calls.ts +56 -18
  4. package/corpus/templates/analytics/changelog/2026-08-05-analytics-queries-keep-every-table-tenant-scoped.md +6 -0
  5. package/corpus/templates/analytics/changelog/2026-08-05-fixed-sign-in-and-dashboard-requests-failing-when-background.md +6 -0
  6. package/corpus/templates/analytics/changelog/2026-08-05-historical-rollups-stay-complete-while-live-events-arrive.md +6 -0
  7. package/corpus/templates/analytics/server/db/schema.ts +1 -0
  8. package/corpus/templates/analytics/server/lib/dashboard-report.ts +2 -0
  9. package/corpus/templates/analytics/server/lib/emails.ts +51 -0
  10. package/corpus/templates/analytics/server/lib/first-party-analytics-health.ts +8 -12
  11. package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +9 -0
  12. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +262 -13
  13. package/corpus/templates/analytics/server/lib/gong.ts +132 -33
  14. package/corpus/templates/analytics/server/plugins/agent-chat.ts +1 -1
  15. package/corpus/templates/analytics/server/plugins/auth.ts +21 -2
  16. package/corpus/templates/analytics/server/plugins/db.ts +11 -3
  17. package/corpus/templates/analytics/server/plugins/transactional-emails.ts +5 -0
  18. package/corpus/templates/calendar/app/components/calendar/InlineEventPickers.tsx +17 -7
  19. package/corpus/templates/calendar/server/lib/booking-emails.ts +154 -70
  20. package/corpus/templates/calendar/server/lib/emails.ts +167 -0
  21. package/corpus/templates/calendar/server/lib/event-guest-notifications.ts +64 -28
  22. package/corpus/templates/calendar/server/plugins/transactional-emails.ts +5 -0
  23. package/corpus/templates/clips/actions/invite-member.ts +39 -16
  24. package/corpus/templates/clips/app/components/player/share-dialog.tsx +73 -1
  25. package/corpus/templates/clips/app/i18n/en-US.ts +3 -0
  26. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +10 -25
  27. package/corpus/templates/clips/app/routes/share.$shareId.tsx +2 -0
  28. package/corpus/templates/clips/changelog/2026-08-05-activity-is-now-the-default-clips-recording-tab-and-ai-setup.md +6 -0
  29. package/corpus/templates/clips/changelog/2026-08-05-clips-can-copy-a-linked-email-preview-for-public-recordings.md +6 -0
  30. package/corpus/templates/clips/changelog/2026-08-05-preparing-recording-now-uses-a-clean-shadow-free-status-card.md +6 -0
  31. package/corpus/templates/clips/desktop/src/styles.css +0 -3
  32. package/corpus/templates/clips/server/lib/emails.ts +256 -0
  33. package/corpus/templates/clips/server/lib/transactional-email-templates.ts +24 -0
  34. package/corpus/templates/clips/server/plugins/transactional-email-catalog.ts +5 -0
  35. package/corpus/templates/clips/server/routes/api/thumbnail/[recordingId].get.ts +4 -1
  36. package/corpus/templates/clips/shared/email-preview.ts +61 -0
  37. package/corpus/templates/content/server/lib/comment-notifications.ts +57 -26
  38. package/corpus/templates/content/server/lib/emails.ts +70 -0
  39. package/corpus/templates/content/server/plugins/transactional-emails.ts +5 -0
  40. package/corpus/templates/design/actions/import-design-tokens.ts +11 -8
  41. package/corpus/templates/design/actions/index-design-tokens.ts +13 -6
  42. package/corpus/templates/design/changelog/2026-08-05-design-token-imports-classify-typography-dimensions-correctly.md +6 -0
  43. package/corpus/templates/dispatch/app/routes/transactional-email.$appId.$id.tsx +4 -0
  44. package/corpus/templates/dispatch/app/routes/transactional-email.tsx +4 -0
  45. package/corpus/templates/dispatch/changelog/2026-08-05-transactional-email-catalogs-and-delivery-activity-are-available-again.md +6 -0
  46. package/corpus/templates/factory/AGENTS.md +18 -17
  47. package/corpus/templates/factory/actions/get-factory-automation-health.ts +50 -0
  48. package/corpus/templates/factory/actions/get-triage-config.ts +8 -0
  49. package/corpus/templates/factory/actions/save-triage-config.ts +26 -0
  50. package/corpus/templates/factory/app/i18n/en-US.ts +27 -0
  51. package/corpus/templates/factory/app/routes/factory.tsx +376 -206
  52. package/corpus/templates/factory/changelog/2026-08-05-factory-now-keeps-production-automations-running-shows-sched.md +6 -0
  53. package/corpus/templates/factory/server/db/schema.ts +6 -0
  54. package/corpus/templates/factory/server/plugins/factory-migrations.ts +10 -0
  55. package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +141 -2
  56. package/corpus/templates/forms/app/pages/FormsListPage.tsx +41 -21
  57. package/corpus/templates/forms/changelog/2026-08-05-form-links-can-now-be-cmd-clicked-to-open-in-a-new-tab.md +6 -0
  58. package/corpus/templates/forms/server/lib/emails.ts +52 -0
  59. package/corpus/templates/forms/server/lib/response-email.ts +2 -0
  60. package/corpus/templates/forms/server/plugins/transactional-emails.ts +5 -0
  61. package/corpus/templates/plan/actions/request-plan-access.ts +33 -12
  62. package/corpus/templates/plan/server/lib/comment-notifications.ts +53 -27
  63. package/corpus/templates/plan/server/lib/emails.ts +67 -0
  64. package/corpus/templates/plan/server/plugins/transactional-emails.ts +5 -0
  65. package/corpus/templates/slides/actions/import-from-url.ts +1 -0
  66. package/corpus/templates/slides/app/components/editor/NewDeckReferenceStep.tsx +492 -381
  67. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +8 -7
  68. package/corpus/templates/slides/app/components/layout/Layout.tsx +27 -23
  69. package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +313 -0
  70. package/corpus/templates/slides/app/components/ui/command.tsx +1 -0
  71. package/corpus/templates/slides/app/i18n/en-US.ts +8 -2
  72. package/corpus/templates/slides/app/lib/create-deck-generation.ts +305 -0
  73. package/corpus/templates/slides/app/pages/DeckEditor.tsx +12 -12
  74. package/corpus/templates/slides/app/pages/Index.tsx +127 -137
  75. package/corpus/templates/slides/app/root.tsx +8 -0
  76. package/corpus/templates/slides/changelog/2026-08-05-deck-browsing-keeps-all-and-mine-in-the-header-with-a-tighte.md +6 -0
  77. package/corpus/templates/slides/changelog/2026-08-05-new-deck-creation-now-flows-through-a-clean-full-screen-refe.md +6 -0
  78. package/corpus/templates/slides/changelog/2026-08-05-website-imports-now-include-linked-stylesheets-for-more-accu.md +6 -0
  79. package/corpus/templates/slides/server/lib/comment-notifications.ts +44 -21
  80. package/corpus/templates/slides/server/lib/emails.ts +40 -0
  81. package/corpus/templates/slides/server/plugins/transactional-emails.ts +5 -0
  82. package/dist/brand-kit/index.d.ts +1 -0
  83. package/dist/brand-kit/index.js +1 -0
  84. package/dist/brand-kit/tokens.d.ts +91 -0
  85. package/dist/brand-kit/tokens.js +279 -0
  86. package/dist/brand-kit/types.d.ts +25 -0
  87. package/dist/client/AssistantChat.js +7 -7
  88. package/dist/client/onboarding/FirstRunOnboarding.js +26 -2
  89. package/dist/client/onboarding/first-run-registry.d.ts +25 -0
  90. package/dist/client/onboarding/first-run-registry.js +18 -0
  91. package/dist/client/onboarding/index.d.ts +2 -0
  92. package/dist/client/onboarding/index.js +1 -0
  93. package/dist/collab/routes.d.ts +1 -1
  94. package/dist/deploy/build.d.ts +8 -0
  95. package/dist/deploy/build.js +92 -3
  96. package/dist/deploy/workspace-deploy.js +86 -3
  97. package/dist/email-catalog/actions/list-email-activity.d.ts +5 -0
  98. package/dist/email-catalog/actions/list-email-activity.js +19 -0
  99. package/dist/email-catalog/actions/list-email-engagement.d.ts +5 -0
  100. package/dist/email-catalog/actions/list-email-engagement.js +15 -0
  101. package/dist/email-catalog/actions/list-email-log.d.ts +7 -0
  102. package/dist/email-catalog/actions/list-email-log.js +23 -0
  103. package/dist/email-catalog/actions/list-transactional-emails.d.ts +22 -0
  104. package/dist/email-catalog/actions/list-transactional-emails.js +67 -0
  105. package/dist/email-catalog/actions/render-transactional-email-preview.d.ts +9 -0
  106. package/dist/email-catalog/actions/render-transactional-email-preview.js +25 -0
  107. package/dist/email-catalog/authorize.d.ts +1 -0
  108. package/dist/email-catalog/authorize.js +9 -0
  109. package/dist/email-catalog/log.d.ts +60 -0
  110. package/dist/email-catalog/log.js +142 -0
  111. package/dist/email-catalog/provider-metrics.d.ts +34 -0
  112. package/dist/email-catalog/provider-metrics.js +182 -0
  113. package/dist/email-catalog/registry.d.ts +78 -0
  114. package/dist/email-catalog/registry.js +70 -0
  115. package/dist/email-catalog/schema.d.ts +231 -0
  116. package/dist/email-catalog/schema.js +53 -0
  117. package/dist/email-catalog/system-emails.d.ts +13 -0
  118. package/dist/email-catalog/system-emails.js +67 -0
  119. package/dist/jobs/index.d.ts +2 -0
  120. package/dist/jobs/index.js +2 -0
  121. package/dist/jobs/run-history.js +48 -1
  122. package/dist/jobs/scheduler-dispatch.d.ts +7 -0
  123. package/dist/jobs/scheduler-dispatch.js +7 -0
  124. package/dist/jobs/scheduler-health.d.ts +22 -0
  125. package/dist/jobs/scheduler-health.js +172 -0
  126. package/dist/jobs/scheduler.js +67 -2
  127. package/dist/localization/default-messages.d.ts +45 -0
  128. package/dist/localization/default-messages.js +45 -0
  129. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  130. package/dist/notifications/routes.d.ts +3 -3
  131. package/dist/observability/routes.d.ts +5 -5
  132. package/dist/org/handlers.js +9 -1
  133. package/dist/progress/routes.d.ts +1 -1
  134. package/dist/provider-api/actions/custom-provider-registration.d.ts +10 -10
  135. package/dist/provider-api/actions/provider-api.d.ts +8 -8
  136. package/dist/secrets/routes.d.ts +9 -9
  137. package/dist/server/action-discovery.js +22 -0
  138. package/dist/server/agent-chat/recurring-jobs-runtime.d.ts +7 -1
  139. package/dist/server/agent-chat/recurring-jobs-runtime.js +12 -0
  140. package/dist/server/agent-chat-plugin.d.ts +2 -1
  141. package/dist/server/agent-chat-plugin.js +39 -1
  142. package/dist/server/better-auth-instance.js +17 -2
  143. package/dist/server/design-token-utils.d.ts +6 -1
  144. package/dist/server/design-token-utils.js +252 -59
  145. package/dist/server/email.d.ts +11 -0
  146. package/dist/server/email.js +54 -3
  147. package/dist/server/index.d.ts +1 -0
  148. package/dist/server/index.js +1 -0
  149. package/dist/server/realtime-token.d.ts +1 -1
  150. package/dist/server/transcribe-voice.d.ts +1 -1
  151. package/dist/vite/client.js +20 -14
  152. package/package.json +2 -1
@@ -2,7 +2,8 @@ import { resourceGetByPath, resourceListAllOwners, resourcePutIfCurrent, } from
2
2
  import { backgroundRunCutOffReason, isBackgroundAutomationRunActive, resolveBackgroundAutomationIdentity, runBackgroundAutomation, } from "./background-automation-runner.js";
3
3
  import { nextOccurrence, isValidCron, describeCron, effectiveTimezone, } from "./cron.js";
4
4
  import { buildJobResourceContent, parseJobResource, } from "./frontmatter.js";
5
- import { claimAutomationRun, finishAutomationRun, getAutomationRun, } from "./run-history.js";
5
+ import { claimAutomationRun, finishAutomationRun, getAutomationRun, listAutomationRuns, } from "./run-history.js";
6
+ import { recordAutomationSchedulerHealth } from "./scheduler-health.js";
6
7
  // ─── Frontmatter parsing ────────────────────────────────────────────────────
7
8
  export { classifyJobFrontmatter, classifyJobResource, normalizeJobMcpTools, parseJobResource, } from "./frontmatter.js";
8
9
  export function parseJobFrontmatter(content) {
@@ -21,6 +22,23 @@ let _hasJobsCache;
21
22
  let _lastJobsCheck = 0;
22
23
  const JOBS_CHECK_INTERVAL_MS = 5 * 60_000;
23
24
  let _emitterSubscribed = false;
25
+ async function recordSchedulerHealthForScopes(input) {
26
+ const orgIds = [...new Set(input.orgIds)];
27
+ const scopes = orgIds.length > 0 ? orgIds : [null];
28
+ const results = await Promise.allSettled(scopes.map((orgId) => recordAutomationSchedulerHealth({
29
+ appId: input.appId,
30
+ orgId,
31
+ checkedAt: input.checkedAt,
32
+ dispatchedAt: input.dispatchedAt,
33
+ error: input.error,
34
+ runtime: "recurring-jobs",
35
+ })));
36
+ for (const result of results) {
37
+ if (result.status === "rejected") {
38
+ console.warn("[recurring-jobs] Could not persist scheduler health:", result.reason);
39
+ }
40
+ }
41
+ }
24
42
  function subscribeToJobsResourceEvents() {
25
43
  if (_emitterSubscribed)
26
44
  return;
@@ -51,10 +69,18 @@ export async function processRecurringJobs(deps) {
51
69
  const nowMs = Date.now();
52
70
  if (_hasJobsCache === false &&
53
71
  nowMs - _lastJobsCheck < JOBS_CHECK_INTERVAL_MS) {
72
+ await recordSchedulerHealthForScopes({
73
+ appId: deps.appId,
74
+ orgIds: [],
75
+ checkedAt: nowMs,
76
+ });
54
77
  return;
55
78
  }
56
79
  const reservedJobKeys = new Set();
57
80
  const startedJobKeys = new Set();
81
+ const healthOrgIds = new Set();
82
+ let healthError = null;
83
+ let dispatchedAt;
58
84
  try {
59
85
  const jobResources = await resourceListAllOwners("jobs/");
60
86
  _hasJobsCache = jobResources.some((r) => r.path.endsWith(".md") && !r.path.endsWith(".keep"));
@@ -70,6 +96,7 @@ export async function processRecurringJobs(deps) {
70
96
  if (resource.path.endsWith(".keep"))
71
97
  continue;
72
98
  const { meta, body } = parseJobFrontmatter(resource.content);
99
+ healthOrgIds.add(meta.orgId ?? null);
73
100
  // Skip disabled or missing schedule
74
101
  if (!meta.enabled || !meta.schedule)
75
102
  continue;
@@ -82,10 +109,12 @@ export async function processRecurringJobs(deps) {
82
109
  continue;
83
110
  // Stuck — reset so the next check can re-run it
84
111
  meta.lastStatus = "error";
85
- meta.lastError = "Job timed out or server crashed mid-run";
112
+ meta.lastError =
113
+ "Worker stopped before a terminal result was recorded. The serverless worker may have timed out or been recycled. No delivery was confirmed.";
86
114
  const next = nextOccurrence(meta.schedule, now, meta.timezone);
87
115
  meta.nextRun = next.toISOString();
88
116
  await updateResource(resource, meta, body);
117
+ await recoverStaleAutomationHistory(resource.owner, resource.path);
89
118
  continue;
90
119
  }
91
120
  // Check if due
@@ -116,6 +145,14 @@ export async function processRecurringJobs(deps) {
116
145
  reservedJobKeys.add(key);
117
146
  dueJobs.push({ key, resource, meta, body });
118
147
  }
148
+ if (dueJobs.length > 0)
149
+ dispatchedAt = Date.now();
150
+ await recordSchedulerHealthForScopes({
151
+ appId: deps.appId,
152
+ orgIds: healthOrgIds,
153
+ checkedAt: Date.now(),
154
+ dispatchedAt,
155
+ });
119
156
  const outcomes = await Promise.allSettled(dueJobs.map(({ key, resource, meta, body }) => {
120
157
  startedJobKeys.add(key);
121
158
  return executeJob(resource, meta, body, deps, now).finally(() => {
@@ -134,6 +171,7 @@ export async function processRecurringJobs(deps) {
134
171
  // its retry budget at the driver level.
135
172
  const { isConnectionError } = await import("../db/client.js");
136
173
  if (isConnectionError(err)) {
174
+ healthError = "The scheduler could not reach the database.";
137
175
  _hasJobsCache = undefined; // force re-check on next successful tick
138
176
  _lastJobsCheck = 0;
139
177
  return;
@@ -142,6 +180,7 @@ export async function processRecurringJobs(deps) {
142
180
  const detail = err instanceof Error
143
181
  ? err
144
182
  : (err?.error ?? err?.message ?? err);
183
+ healthError = detail instanceof Error ? detail.message : String(detail);
145
184
  console.error("[recurring-jobs] Error processing jobs:", detail);
146
185
  }
147
186
  finally {
@@ -151,6 +190,32 @@ export async function processRecurringJobs(deps) {
151
190
  if (!startedJobKeys.has(key))
152
191
  _activeScheduledJobs.delete(key);
153
192
  }
193
+ await recordSchedulerHealthForScopes({
194
+ appId: deps.appId,
195
+ orgIds: healthOrgIds,
196
+ checkedAt: Date.now(),
197
+ dispatchedAt,
198
+ error: healthError,
199
+ });
200
+ }
201
+ }
202
+ async function recoverStaleAutomationHistory(owner, path) {
203
+ const automation = path.replace(/^jobs\//, "").replace(/\.md$/, "");
204
+ try {
205
+ const [run] = await listAutomationRuns({
206
+ owners: [owner],
207
+ automation,
208
+ limit: 1,
209
+ });
210
+ if (!run ||
211
+ run.finishedAt !== null ||
212
+ (run.status !== "running" && run.status !== "interrupted")) {
213
+ return;
214
+ }
215
+ await finishAutomationRun(run.id, "error", "Worker stopped before a terminal result was recorded. The serverless worker may have timed out or been recycled. No delivery was confirmed.");
216
+ }
217
+ catch (error) {
218
+ console.warn(`[recurring-jobs] Could not record stale history for "${automation}":`, error instanceof Error ? error.message : error);
154
219
  }
155
220
  }
156
221
  export const jobRunCutOffReason = backgroundRunCutOffReason;
@@ -175,6 +175,7 @@ declare const messages: {
175
175
  resources: string;
176
176
  messaging: string;
177
177
  destinations: string;
178
+ transactionalEmail: string;
178
179
  identities: string;
179
180
  approvals: string;
180
181
  automations: string;
@@ -205,6 +206,50 @@ declare const messages: {
205
206
  suggestionRouteSlack: string;
206
207
  suggestionGrantKey: string;
207
208
  };
209
+ transactionalEmail: {
210
+ title: string;
211
+ description: string;
212
+ retentionTitle: string;
213
+ retentionNote: string;
214
+ openRatesUnavailable: string;
215
+ sharedProviderMetricsUnavailable: string;
216
+ catalogFanoutFailed: string;
217
+ retry: string;
218
+ noApps: string;
219
+ catalogUnreadable: string;
220
+ countsUnreadable: string;
221
+ appSendsNoEmail: string;
222
+ emailNotFound: string;
223
+ emailNotFoundDescription: string;
224
+ sharedTitle: string;
225
+ sharedSubtitle: string;
226
+ email: string;
227
+ trigger: string;
228
+ sends: string;
229
+ openRate: string;
230
+ lastSent: string;
231
+ sendLogUnread: string;
232
+ failedCount: string;
233
+ failuresUnknown: string;
234
+ noProviderRecord: string;
235
+ noDeliveredMail: string;
236
+ neverSent: string;
237
+ lastSentUnknown: string;
238
+ preview: string;
239
+ previewDescription: string;
240
+ previewFailed: string;
241
+ previewFrameTitle: string;
242
+ subject: string;
243
+ activityLink: string;
244
+ activityTitle: string;
245
+ activityUnavailable: string;
246
+ activityEmpty: string;
247
+ recipient: string;
248
+ sender: string;
249
+ status: string;
250
+ opens: string;
251
+ lastEvent: string;
252
+ };
208
253
  pages: {
209
254
  appsDescription: string;
210
255
  appsDescriptionWithWorkspace: string;
@@ -180,6 +180,7 @@ const messages = {
180
180
  resources: "Resources",
181
181
  messaging: "Messaging",
182
182
  destinations: "Destinations",
183
+ transactionalEmail: "Transactional email",
183
184
  identities: "Identities",
184
185
  approvals: "Approvals",
185
186
  automations: "Automations",
@@ -210,6 +211,50 @@ const messages = {
210
211
  suggestionRouteSlack: "Route Slack mentions to my analytics app",
211
212
  suggestionGrantKey: "Grant my OpenAI key to this app",
212
213
  },
214
+ transactionalEmail: {
215
+ title: "Transactional email",
216
+ description: "Every transactional email each app in this workspace can send, with its trigger, recipients, and delivery metrics.",
217
+ retentionTitle: "Activity feed retention is short",
218
+ retentionNote: "The email provider's activity feed only retains recent messages, so an empty activity list does not mean nothing was sent.",
219
+ openRatesUnavailable: "Open rates unavailable",
220
+ sharedProviderMetricsUnavailable: "Provider metrics vary by sending app. Expand an app to see its provider data.",
221
+ catalogFanoutFailed: "Could not load app email catalogs",
222
+ retry: "Retry",
223
+ noApps: "No ready apps reported a transactional email catalog.",
224
+ catalogUnreadable: "This app's email catalog could not be read",
225
+ countsUnreadable: "Send counts could not be read",
226
+ appSendsNoEmail: "This app sends no transactional email of its own.",
227
+ emailNotFound: "Email not found",
228
+ emailNotFoundDescription: "This email is not in the app's catalog.",
229
+ sharedTitle: "Shared system email",
230
+ sharedSubtitle: "sent by every app",
231
+ email: "Email",
232
+ trigger: "Trigger",
233
+ sends: "Sends",
234
+ openRate: "Open rate",
235
+ lastSent: "Last sent",
236
+ sendLogUnread: "The send log could not be read, so the number of sends is unknown.",
237
+ failedCount: "{{count}} failed",
238
+ failuresUnknown: "failures unknown",
239
+ noProviderRecord: "The provider reported no record for this email in the window.",
240
+ noDeliveredMail: "No delivered mail yet",
241
+ neverSent: "Never sent",
242
+ lastSentUnknown: "The send log could not be read, so the last send time is unknown.",
243
+ preview: "Preview",
244
+ previewDescription: "Rendered with dummy data. Scripts are disabled in this preview.",
245
+ previewFailed: "Preview could not be rendered",
246
+ previewFrameTitle: "Preview of {{name}}",
247
+ subject: "Subject",
248
+ activityLink: "Activity log",
249
+ activityTitle: "Activity for {{name}}",
250
+ activityUnavailable: "Activity feed unavailable",
251
+ activityEmpty: "No recent activity in the provider's retention window.",
252
+ recipient: "Recipient",
253
+ sender: "Sender",
254
+ status: "Status",
255
+ opens: "Opens",
256
+ lastEvent: "Last event",
257
+ },
213
258
  pages: {
214
259
  appsDescription: "Open workspace apps and start new app creation from Dispatch.",
215
260
  appsDescriptionWithWorkspace: 'Apps in the "{{workspace}}" workspace. Each app gets its own route under this workspace and shares its database, auth, and agent chat.',
@@ -137,13 +137,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
137
137
  inputSchema: {
138
138
  type: string;
139
139
  properties: {
140
- count?: undefined;
141
140
  query?: undefined;
142
141
  minutes?: undefined;
143
142
  limit?: undefined;
144
143
  clientHint?: undefined;
145
144
  timestamp?: undefined;
146
145
  chapterId?: undefined;
146
+ count?: undefined;
147
147
  startAt?: undefined;
148
148
  endAt?: undefined;
149
149
  reason?: undefined;
@@ -159,7 +159,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
159
159
  inputSchema: {
160
160
  type: string;
161
161
  properties: {
162
- count?: undefined;
163
162
  query: {
164
163
  type: string;
165
164
  description: string;
@@ -175,6 +174,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
175
174
  clientHint?: undefined;
176
175
  timestamp?: undefined;
177
176
  chapterId?: undefined;
177
+ count?: undefined;
178
178
  startAt?: undefined;
179
179
  endAt?: undefined;
180
180
  reason?: undefined;
@@ -190,7 +190,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
190
190
  inputSchema: {
191
191
  type: string;
192
192
  properties: {
193
- count?: undefined;
194
193
  minutes: {
195
194
  type: string;
196
195
  description: string;
@@ -200,6 +199,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
200
199
  clientHint?: undefined;
201
200
  timestamp?: undefined;
202
201
  chapterId?: undefined;
202
+ count?: undefined;
203
203
  startAt?: undefined;
204
204
  endAt?: undefined;
205
205
  reason?: undefined;
@@ -216,7 +216,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
216
216
  type: string;
217
217
  required: string[];
218
218
  properties: {
219
- count?: undefined;
220
219
  query: {
221
220
  type: string;
222
221
  description: string;
@@ -235,6 +234,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
235
234
  };
236
235
  timestamp?: undefined;
237
236
  chapterId?: undefined;
237
+ count?: undefined;
238
238
  startAt?: undefined;
239
239
  endAt?: undefined;
240
240
  reason?: undefined;
@@ -250,7 +250,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
250
250
  type: string;
251
251
  required: string[];
252
252
  properties: {
253
- count?: undefined;
254
253
  query?: undefined;
255
254
  minutes?: undefined;
256
255
  limit?: undefined;
@@ -264,6 +263,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
264
263
  description: string;
265
264
  };
266
265
  chapterId?: undefined;
266
+ count?: undefined;
267
267
  startAt?: undefined;
268
268
  endAt?: undefined;
269
269
  includeMicrophone?: undefined;
@@ -314,13 +314,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
314
314
  type: string;
315
315
  required: string[];
316
316
  properties: {
317
- count?: undefined;
318
317
  query?: undefined;
319
318
  minutes?: undefined;
320
319
  limit?: undefined;
321
320
  clientHint?: undefined;
322
321
  timestamp?: undefined;
323
322
  chapterId?: undefined;
323
+ count?: undefined;
324
324
  startAt: {
325
325
  type: string;
326
326
  description: string;
@@ -349,13 +349,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
349
349
  type: string;
350
350
  required: string[];
351
351
  properties: {
352
- count?: undefined;
353
352
  query?: undefined;
354
353
  minutes?: undefined;
355
354
  limit?: undefined;
356
355
  clientHint?: undefined;
357
356
  timestamp?: undefined;
358
357
  chapterId?: undefined;
358
+ count?: undefined;
359
359
  startAt?: undefined;
360
360
  endAt?: undefined;
361
361
  reason?: undefined;
@@ -13,13 +13,13 @@
13
13
  export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
14
14
  count: number;
15
15
  updated?: undefined;
16
- ok?: undefined;
17
16
  error?: undefined;
17
+ ok?: undefined;
18
18
  } | {
19
19
  count?: undefined;
20
20
  updated: number;
21
- ok?: undefined;
22
21
  error?: undefined;
22
+ ok?: undefined;
23
23
  } | {
24
24
  count?: undefined;
25
25
  updated?: undefined;
@@ -28,6 +28,6 @@ export declare function createNotificationsHandler(): import("h3").EventHandlerW
28
28
  } | {
29
29
  count?: undefined;
30
30
  updated?: undefined;
31
- ok: boolean;
32
31
  error?: undefined;
32
+ ok: boolean;
33
33
  }>>;
@@ -41,27 +41,27 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
41
41
  thumbsUpRate: number;
42
42
  avgEvalScore: number;
43
43
  } | {
44
+ error?: undefined;
45
+ ok?: undefined;
44
46
  summary: import("./types.js").TraceSummary;
45
47
  spans: import("./types.js").TraceSpan[];
46
48
  id?: undefined;
49
+ } | {
47
50
  error?: undefined;
48
51
  ok?: undefined;
49
- } | {
50
52
  summary?: undefined;
51
53
  spans?: undefined;
52
54
  id: string;
53
- error?: undefined;
54
- ok?: undefined;
55
55
  } | {
56
+ ok?: undefined;
56
57
  summary?: undefined;
57
58
  spans?: undefined;
58
59
  id?: undefined;
59
60
  error: any;
60
- ok?: undefined;
61
61
  } | {
62
+ error?: undefined;
62
63
  summary?: undefined;
63
64
  spans?: undefined;
64
65
  id?: undefined;
65
- error?: undefined;
66
66
  ok: boolean;
67
67
  }>>;
@@ -28,6 +28,7 @@ function extractMemberEmail(event) {
28
28
  const nanoid = () => globalThis.crypto?.randomUUID?.().replace(/-/g, "") ??
29
29
  Math.random().toString(36).slice(2) + Date.now().toString(36);
30
30
  import { getDbExec, isPostgres } from "../db/client.js";
31
+ import { CORE_INVITE_EMAIL_ID } from "../email-catalog/system-emails.js";
31
32
  import { ssrfSafeFetch } from "../extensions/url-safety.js";
32
33
  import { getAppProductionUrl } from "../server/app-url.js";
33
34
  import { getSession } from "../server/auth.js";
@@ -275,7 +276,14 @@ async function inviteOne(ctx, rawEmail, role, event) {
275
276
  acceptUrl: getInviteAppUrl(event),
276
277
  inviter: ctx.email,
277
278
  });
278
- await sendEmail({ to: email, subject, html, text });
279
+ await sendEmail({
280
+ to: email,
281
+ subject,
282
+ html,
283
+ text,
284
+ templateId: CORE_INVITE_EMAIL_ID,
285
+ orgId: ctx.orgId,
286
+ });
279
287
  emailSent = true;
280
288
  }
281
289
  catch (err) {
@@ -15,6 +15,6 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
15
15
  error: string;
16
16
  ok?: undefined;
17
17
  } | {
18
- ok: boolean;
19
18
  error?: undefined;
19
+ ok: boolean;
20
20
  }>>;
@@ -75,10 +75,9 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
75
75
  user: "user";
76
76
  }>>;
77
77
  }, z.core.$strip>>, {
78
- id?: undefined;
79
- provider?: undefined;
80
78
  deleted?: undefined;
81
79
  found?: undefined;
80
+ message?: undefined;
82
81
  providers: {
83
82
  id: string;
84
83
  label: string;
@@ -89,45 +88,46 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
89
88
  updatedAt: number;
90
89
  }[];
91
90
  count: number;
91
+ provider?: undefined;
92
92
  registered?: undefined;
93
+ id?: undefined;
93
94
  label?: undefined;
94
- message?: undefined;
95
95
  } | {
96
- id?: undefined;
97
96
  deleted?: undefined;
97
+ message?: undefined;
98
98
  providers?: undefined;
99
99
  count?: undefined;
100
100
  found: boolean;
101
101
  provider: import("../custom-registry.js").CustomProviderConfig;
102
102
  registered?: undefined;
103
+ id?: undefined;
103
104
  label?: undefined;
104
- message?: undefined;
105
105
  } | {
106
- provider?: undefined;
107
106
  deleted?: undefined;
107
+ message?: undefined;
108
108
  providers?: undefined;
109
109
  count?: undefined;
110
+ provider?: undefined;
110
111
  found: boolean;
111
112
  id: string;
112
113
  registered?: undefined;
113
114
  label?: undefined;
114
- message?: undefined;
115
115
  } | {
116
- provider?: undefined;
117
116
  found?: undefined;
117
+ message?: undefined;
118
118
  providers?: undefined;
119
119
  count?: undefined;
120
+ provider?: undefined;
120
121
  deleted: boolean;
121
122
  id: string;
122
123
  registered?: undefined;
123
124
  label?: undefined;
124
- message?: undefined;
125
125
  } | {
126
- provider?: undefined;
127
126
  deleted?: undefined;
128
127
  found?: undefined;
129
128
  providers?: undefined;
130
129
  count?: undefined;
130
+ provider?: undefined;
131
131
  registered: boolean;
132
132
  id: string;
133
133
  label: string;
@@ -315,7 +315,6 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
315
315
  provider?: undefined;
316
316
  deleted?: undefined;
317
317
  found?: undefined;
318
- message?: undefined;
319
318
  providers: {
320
319
  id: string;
321
320
  label: string;
@@ -328,41 +327,42 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
328
327
  count: number;
329
328
  registered?: undefined;
330
329
  label?: undefined;
330
+ message?: undefined;
331
331
  } | {
332
332
  id?: undefined;
333
- count?: undefined;
334
333
  deleted?: undefined;
335
- message?: undefined;
334
+ count?: undefined;
336
335
  providers?: undefined;
337
336
  found: boolean;
338
337
  provider: import("../custom-registry.js").CustomProviderConfig;
339
338
  registered?: undefined;
340
339
  label?: undefined;
340
+ message?: undefined;
341
341
  } | {
342
- count?: undefined;
343
342
  provider?: undefined;
344
343
  deleted?: undefined;
345
- message?: undefined;
344
+ count?: undefined;
346
345
  providers?: undefined;
347
346
  found: boolean;
348
347
  id: string;
349
348
  registered?: undefined;
350
349
  label?: undefined;
350
+ message?: undefined;
351
351
  } | {
352
- count?: undefined;
353
352
  provider?: undefined;
354
353
  found?: undefined;
355
- message?: undefined;
354
+ count?: undefined;
356
355
  providers?: undefined;
357
356
  deleted: boolean;
358
357
  id: string;
359
358
  registered?: undefined;
360
359
  label?: undefined;
360
+ message?: undefined;
361
361
  } | {
362
- count?: undefined;
363
362
  provider?: undefined;
364
363
  deleted?: undefined;
365
364
  found?: undefined;
365
+ count?: undefined;
366
366
  providers?: undefined;
367
367
  registered: boolean;
368
368
  id: string;
@@ -34,37 +34,37 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
34
34
  /** POST /_agent-native/secrets/:key — write a secret. */
35
35
  export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
36
36
  error: string;
37
- ok?: undefined;
38
37
  status?: undefined;
38
+ ok?: undefined;
39
39
  } | {
40
- error?: undefined;
41
40
  ok: boolean;
42
41
  status: string;
42
+ error?: undefined;
43
43
  } | {
44
- ok?: undefined;
45
44
  error: string;
46
45
  removed?: undefined;
46
+ ok?: undefined;
47
47
  } | {
48
- error?: undefined;
49
48
  ok: boolean;
50
49
  removed: boolean;
50
+ error?: undefined;
51
51
  }>>;
52
52
  /**
53
53
  * POST /_agent-native/secrets/:key/test — validate an optional candidate value
54
54
  * or the current stored value without changing anything.
55
55
  */
56
56
  export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
57
- ok?: undefined;
58
57
  error: string;
59
58
  note?: undefined;
59
+ ok?: undefined;
60
60
  } | {
61
- error?: undefined;
62
61
  ok: boolean;
63
62
  note?: undefined;
64
- } | {
65
63
  error?: undefined;
64
+ } | {
66
65
  ok: boolean;
67
66
  note: string;
67
+ error?: undefined;
68
68
  } | {
69
69
  note?: undefined;
70
70
  ok: boolean;
@@ -95,11 +95,11 @@ export interface AdHocSecretPayload {
95
95
  export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
96
96
  error: string;
97
97
  } | {
98
- error?: undefined;
99
98
  ok: boolean;
100
99
  key: string;
101
- } | {
102
100
  error?: undefined;
101
+ } | {
103
102
  ok: boolean;
104
103
  removed: boolean;
104
+ error?: undefined;
105
105
  }>>;
@@ -517,6 +517,28 @@ export async function mergeCoreSharingActions(registry) {
517
517
  () => import("../sharing/actions/create-agent-resource-link.js"),
518
518
  ],
519
519
  ["upload-image", () => import("../file-upload/actions/upload-image.js")],
520
+ // Transactional email catalog - mounted everywhere so Dispatch can ask any
521
+ // app what it sends without that app opting in.
522
+ [
523
+ "list-transactional-emails",
524
+ () => import("../email-catalog/actions/list-transactional-emails.js"),
525
+ ],
526
+ [
527
+ "render-transactional-email-preview",
528
+ () => import("../email-catalog/actions/render-transactional-email-preview.js"),
529
+ ],
530
+ [
531
+ "list-email-log",
532
+ () => import("../email-catalog/actions/list-email-log.js"),
533
+ ],
534
+ [
535
+ "list-email-activity",
536
+ () => import("../email-catalog/actions/list-email-activity.js"),
537
+ ],
538
+ [
539
+ "list-email-engagement",
540
+ () => import("../email-catalog/actions/list-email-engagement.js"),
541
+ ],
520
542
  [
521
543
  "get-feature-flags",
522
544
  () => import("../feature-flags/actions/get-feature-flags.js"),
@@ -1,4 +1,10 @@
1
- type RecurringJobsRuntimeEnvKey = "AGENT_NATIVE_DISABLE_RECURRING_JOBS" | "AGENT_NATIVE_ENABLE_LOCAL_RECURRING_JOBS" | "APP_URL" | "BETTER_AUTH_URL" | "DEPLOY_URL" | "NODE_ENV" | "URL" | "VITE_APP_URL" | "VITE_WORKSPACE_GATEWAY_URL" | "WORKSPACE_GATEWAY_URL";
1
+ type RecurringJobsRuntimeEnvKey = "AGENT_NATIVE_DISABLE_RECURRING_JOBS" | "AGENT_NATIVE_ENABLE_LOCAL_RECURRING_JOBS" | "APP_URL" | "BETTER_AUTH_URL" | "DEPLOY_URL" | "NETLIFY" | "NETLIFY_LOCAL" | "NODE_ENV" | "SITE_ID" | "URL" | "VITE_APP_URL" | "VITE_WORKSPACE_GATEWAY_URL" | "WORKSPACE_GATEWAY_URL";
2
2
  type RecurringJobsRuntimeEnv = Partial<Record<RecurringJobsRuntimeEnvKey, string | undefined>>;
3
3
  export declare function shouldDisableRecurringJobsRuntime(env?: RecurringJobsRuntimeEnv): boolean;
4
+ /**
5
+ * Hosted Netlify deploys get a durable scheduled sweep emitted by the build.
6
+ * The in-process timer must stay off there: a scale-to-zero recycle destroys
7
+ * that timer, which is exactly the failure mode the emitted sweep fixes.
8
+ */
9
+ export declare function isNetlifyRecurringJobsRuntime(env?: RecurringJobsRuntimeEnv): boolean;
4
10
  export {};