@agent-native/core 0.140.0 → 0.141.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +1 -1
  3. package/corpus/templates/analytics/changelog/2026-08-05-historical-analytics-rollups-stay-complete-and-atomic.md +6 -0
  4. package/corpus/templates/analytics/server/lib/dashboard-report.ts +0 -2
  5. package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +11 -6
  6. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +8 -18
  7. package/corpus/templates/analytics/server/plugins/db.ts +174 -0
  8. package/corpus/templates/calendar/app/components/calendar/OutOfOfficeEvent.tsx +38 -38
  9. package/corpus/templates/calendar/changelog/2026-08-05-out-of-office-blocks-now-open-from-their-scheduled-time-rang.md +6 -0
  10. package/corpus/templates/calendar/server/lib/booking-emails.ts +70 -154
  11. package/corpus/templates/calendar/server/lib/event-guest-notifications.ts +28 -64
  12. package/corpus/templates/clips/actions/get-recording-player-data.ts +1 -0
  13. package/corpus/templates/clips/actions/invite-member.ts +16 -39
  14. package/corpus/templates/clips/app/components/player/comments-panel.tsx +2 -3
  15. package/corpus/templates/clips/app/components/player/reaction-emojis.ts +10 -0
  16. package/corpus/templates/clips/app/components/player/reactions-tray.tsx +2 -2
  17. package/corpus/templates/clips/app/components/player/video-player.tsx +20 -6
  18. package/corpus/templates/clips/app/routes/embed.$shareId.tsx +33 -0
  19. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +5 -1
  20. package/corpus/templates/clips/app/routes/share.$shareId.tsx +27 -1
  21. package/corpus/templates/clips/changelog/2026-08-05-comment-and-video-reaction-pickers-now-include-eyes-and-mind.md +6 -0
  22. package/corpus/templates/clips/changelog/2026-08-05-fresh-recordings-now-open-with-the-complete-video.md +6 -0
  23. package/corpus/templates/clips/server/lib/transactional-email-templates.ts +0 -24
  24. package/corpus/templates/clips/server/routes/api/public-recording.get.ts +1 -0
  25. package/corpus/templates/content/server/lib/comment-notifications.ts +26 -57
  26. package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +1 -44
  27. package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +1 -265
  28. package/corpus/templates/design/actions/create-design-system.ts +10 -9
  29. package/corpus/templates/design/actions/get-design-system.ts +0 -53
  30. package/corpus/templates/design/actions/import-design-tokens.ts +71 -5
  31. package/corpus/templates/design/actions/index-design-tokens.ts +80 -61
  32. package/corpus/templates/design/actions/update-design-system.ts +10 -7
  33. package/corpus/templates/design/app/components/design/EditPanel.tsx +2 -45
  34. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +0 -12
  35. package/corpus/templates/design/app/components/design/edit-panel/document-colors.ts +6 -10
  36. package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +3 -19
  37. package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +10 -36
  38. package/corpus/templates/design/app/components/design/edit-panel/interaction-state-helpers.ts +0 -15
  39. package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +1 -19
  40. package/corpus/templates/design/app/components/design/edit-panel/position-helpers.ts +0 -6
  41. package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +23 -53
  42. package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +4 -142
  43. package/corpus/templates/design/app/components/design/types.ts +0 -6
  44. package/corpus/templates/design/app/i18n-data.ts +0 -20
  45. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +1 -1
  46. package/corpus/templates/design/app/pages/DesignSystems.tsx +1 -78
  47. package/corpus/templates/design/app/pages/design-editor/html-layer-positioning.ts +1 -6
  48. package/corpus/templates/design/e2e/helpers.ts +0 -17
  49. package/corpus/templates/design/shared/resolve-tweaks.ts +18 -10
  50. package/corpus/templates/forms/server/lib/response-email.ts +0 -2
  51. package/corpus/templates/plan/actions/request-plan-access.ts +12 -33
  52. package/corpus/templates/plan/server/lib/comment-notifications.ts +27 -53
  53. package/corpus/templates/slides/server/lib/comment-notifications.ts +21 -44
  54. package/dist/a2a/handlers.js +9 -10
  55. package/dist/brand-kit/index.d.ts +0 -1
  56. package/dist/brand-kit/index.js +0 -1
  57. package/dist/brand-kit/types.d.ts +0 -25
  58. package/dist/collab/awareness.d.ts +2 -2
  59. package/dist/collab/struct-routes.d.ts +1 -1
  60. package/dist/db/client.js +8 -8
  61. package/dist/db/migrations.js +39 -19
  62. package/dist/localization/default-messages.d.ts +0 -45
  63. package/dist/localization/default-messages.js +0 -45
  64. package/dist/notifications/routes.d.ts +6 -6
  65. package/dist/observability/routes.d.ts +3 -3
  66. package/dist/org/handlers.js +1 -8
  67. package/dist/progress/routes.d.ts +1 -1
  68. package/dist/provider-api/actions/custom-provider-registration.d.ts +7 -7
  69. package/dist/provider-api/actions/provider-api.d.ts +7 -7
  70. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  71. package/dist/resources/handlers.d.ts +1 -1
  72. package/dist/secrets/routes.d.ts +9 -9
  73. package/dist/server/action-discovery.js +0 -22
  74. package/dist/server/auth.js +3 -1
  75. package/dist/server/better-auth-instance.js +2 -17
  76. package/dist/server/email.d.ts +0 -9
  77. package/dist/server/email.js +3 -44
  78. package/dist/server/index.d.ts +0 -1
  79. package/dist/server/index.js +0 -1
  80. package/dist/server/transcribe-voice.d.ts +1 -1
  81. package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +3 -2
  82. package/docs/content/authentication.mdx +25 -19
  83. package/package.json +1 -1
  84. package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +3 -2
  85. package/corpus/templates/analytics/server/lib/emails.ts +0 -51
  86. package/corpus/templates/analytics/server/plugins/transactional-emails.ts +0 -5
  87. package/corpus/templates/calendar/server/lib/emails.ts +0 -167
  88. package/corpus/templates/calendar/server/plugins/transactional-emails.ts +0 -5
  89. package/corpus/templates/clips/server/lib/emails.ts +0 -256
  90. package/corpus/templates/clips/server/plugins/transactional-email-catalog.ts +0 -5
  91. package/corpus/templates/content/server/lib/emails.ts +0 -70
  92. package/corpus/templates/content/server/plugins/transactional-emails.ts +0 -5
  93. package/corpus/templates/design/app/components/design/edit-panel/design-system-swatches.ts +0 -215
  94. package/corpus/templates/design/changelog/2026-08-04-design-system-tokens-show-by-name-in-the-editor.md +0 -6
  95. package/corpus/templates/design/server/lib/design-system-tokens.ts +0 -35
  96. package/corpus/templates/design/shared/authored-color-styles.ts +0 -401
  97. package/corpus/templates/dispatch/app/routes/transactional-email.$appId.$id.tsx +0 -4
  98. package/corpus/templates/dispatch/app/routes/transactional-email.tsx +0 -4
  99. package/corpus/templates/forms/server/lib/emails.ts +0 -52
  100. package/corpus/templates/forms/server/plugins/transactional-emails.ts +0 -5
  101. package/corpus/templates/plan/server/lib/emails.ts +0 -67
  102. package/corpus/templates/plan/server/plugins/transactional-emails.ts +0 -5
  103. package/corpus/templates/slides/server/lib/emails.ts +0 -40
  104. package/corpus/templates/slides/server/plugins/transactional-emails.ts +0 -5
  105. package/dist/brand-kit/tokens.d.ts +0 -92
  106. package/dist/brand-kit/tokens.js +0 -280
  107. package/dist/email-catalog/actions/list-email-activity.d.ts +0 -6
  108. package/dist/email-catalog/actions/list-email-activity.js +0 -15
  109. package/dist/email-catalog/actions/list-email-engagement.d.ts +0 -6
  110. package/dist/email-catalog/actions/list-email-engagement.js +0 -15
  111. package/dist/email-catalog/actions/list-email-log.d.ts +0 -8
  112. package/dist/email-catalog/actions/list-email-log.js +0 -22
  113. package/dist/email-catalog/actions/list-transactional-emails.d.ts +0 -23
  114. package/dist/email-catalog/actions/list-transactional-emails.js +0 -61
  115. package/dist/email-catalog/actions/render-transactional-email-preview.d.ts +0 -10
  116. package/dist/email-catalog/actions/render-transactional-email-preview.js +0 -24
  117. package/dist/email-catalog/authorize.d.ts +0 -2
  118. package/dist/email-catalog/authorize.js +0 -10
  119. package/dist/email-catalog/log.d.ts +0 -57
  120. package/dist/email-catalog/log.js +0 -117
  121. package/dist/email-catalog/provider-metrics.d.ts +0 -34
  122. package/dist/email-catalog/provider-metrics.js +0 -165
  123. package/dist/email-catalog/registry.d.ts +0 -79
  124. package/dist/email-catalog/registry.js +0 -71
  125. package/dist/email-catalog/schema.d.ts +0 -212
  126. package/dist/email-catalog/schema.js +0 -49
  127. package/dist/email-catalog/system-emails.d.ts +0 -14
  128. package/dist/email-catalog/system-emails.js +0 -68
@@ -62,11 +62,11 @@ export declare const postAwareness: import("h3").EventHandlerWithFetch<import("h
62
62
  error: string;
63
63
  states?: undefined;
64
64
  } | {
65
- error?: undefined;
66
65
  states: {
67
66
  clientId: number;
68
67
  state: string;
69
68
  }[];
69
+ error?: undefined;
70
70
  }>>;
71
71
  /**
72
72
  * GET /_agent-native/collab/:docId/users
@@ -77,10 +77,10 @@ export declare const getActiveUsers: import("h3").EventHandlerWithFetch<import("
77
77
  error: string;
78
78
  users?: undefined;
79
79
  } | {
80
- error?: undefined;
81
80
  users: {
82
81
  clientId: number;
83
82
  lastSeen: number;
84
83
  }[];
84
+ error?: undefined;
85
85
  }>>;
86
86
  //# sourceMappingURL=awareness.d.ts.map
@@ -13,8 +13,8 @@
13
13
  * Body: { json: any, fieldName?: string, type?: "map"|"array", requestSource?: string }
14
14
  */
15
15
  export declare const postCollabJson: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
16
- ok?: undefined;
17
16
  error: string;
17
+ ok?: undefined;
18
18
  } | {
19
19
  error?: undefined;
20
20
  ok: boolean;
package/dist/db/client.js CHANGED
@@ -804,19 +804,19 @@ export function pgPoolOptions(url) {
804
804
  export function neonPoolMax() {
805
805
  if (!isServerlessRuntime())
806
806
  return 20;
807
- // The durable background-function worker is a SINGLE process per run (unlike
808
- // the many warm request-instances the foreground serverless has), so it can
809
- // safely hold a larger pool without risking Neon's connection cap. The agent's
807
+ // Netlify can run several background workers concurrently; a background
808
+ // worker is not a global singleton and must not hold a larger pool than the
809
+ // foreground path. The agent's
810
810
  // pre-send setup fires ~6 concurrent DB reads in parallel; with only 2
811
811
  // connections that burst exhausts the pool and a single stalled connection
812
812
  // freezes the worker before it can claim — observed on analytics' heavier
813
813
  // action surface, where the worker froze right after `model_done` and never
814
- // recorded `env_config`/`presend`, while the foreground (10-connection pool)
815
- // ran the identical code in ~2s. Give the bg worker enough connections for the
816
- // burst; keep the foreground serverless pool tiny to avoid "Max client
817
- // connections reached" across many warm instances.
814
+ // recorded `env_config`/`presend`, while the foreground path ran the
815
+ // identical code in ~2s. Four connections preserve the concurrent
816
+ // read burst while keeping foreground and background caps aligned, avoiding
817
+ // "Max client connections reached" across many warm instances.
818
818
  if (isBackgroundFunctionPoolContext())
819
- return 8;
819
+ return 4;
820
820
  return 4;
821
821
  }
822
822
  /**
@@ -354,11 +354,12 @@ export function runMigrations(migrations, options) {
354
354
  //
355
355
  // Now: use the pooled singleton (getDbExec) for the bookkeeping SELECT. If
356
356
  // the migrations table does not yet exist we treat it as "all migrations
357
- // pending" (current = -1). Only when there are pending migrations do we open
358
- // the direct-endpoint exec (DDL is the only thing Neon's PgBouncer blocks —
359
- // documented at getMigrationDatabaseUrl). The direct exec is shared across
360
- // concurrent runners via acquireMigrationExec() and closed after the last
361
- // caller via releaseMigrationExec().
357
+ // pending" (current = -1). Pending SQL/DDL opens the direct-endpoint exec
358
+ // (DDL is the only thing Neon's PgBouncer blocks — documented at
359
+ // getMigrationDatabaseUrl); run-only entries stay on the pooled client once
360
+ // both bookkeeping tables are known to exist. The direct exec is shared
361
+ // across concurrent runners via acquireMigrationExec() and closed after the
362
+ // last caller via releaseMigrationExec().
362
363
  // ---------------------------------------------------------------------------
363
364
  let current = -1; // sentinel: "table missing" → treat all as pending
364
365
  let namedRowsMissing = false; // sentinel: "named table missing" → no names applied yet
@@ -395,18 +396,34 @@ export function runMigrations(migrations, options) {
395
396
  if (pg && pendingFast !== null && pendingFast.length === 0) {
396
397
  return;
397
398
  }
399
+ // A run-only migration does not need the direct endpoint: the fast path
400
+ // already proved both bookkeeping tables exist, and its `run` callback is
401
+ // responsible for its own pooled database work. Keep the direct path for
402
+ // any pending SQL or for the first boot, where the tables still need DDL.
403
+ const runOnlyPending = pg &&
404
+ current >= 0 &&
405
+ !namedRowsMissing &&
406
+ pendingFast !== null &&
407
+ pendingFast.length > 0 &&
408
+ pendingFast.every((m) => resolveMigrationSql(m.sql, pg) === null);
398
409
  // Acquire the exec appropriate for the dialect.
399
410
  // For Postgres: the shared direct-endpoint exec (DDL-safe, closed on release).
400
411
  // For SQLite/libsql: the singleton pooled exec (no pooler concern).
401
- const exec = pg ? await acquireMigrationExec() : getDbExec();
412
+ const exec = pg
413
+ ? runOnlyPending
414
+ ? getDbExec()
415
+ : await acquireMigrationExec()
416
+ : getDbExec();
402
417
  try {
403
- // Retry initial table creation — SQLITE_BUSY_RECOVERY can occur on HMR
404
- // restarts when WAL files from the previous process haven't been released yet.
405
- await retrySqliteBusy(() => exec.execute(`CREATE TABLE IF NOT EXISTS ${table} (version INTEGER PRIMARY KEY)`), { maxAttempts: 6, baseDelayMs: 1000, rethrow: true });
406
- // Companion name-keyed bookkeeping table — never alters the existing
407
- // `${table}`'s PRIMARY KEY, so legacy version rows keep working exactly
408
- // as before. See the `runMigrations` doc comment for why this exists.
409
- await retrySqliteBusy(() => exec.execute(`CREATE TABLE IF NOT EXISTS ${namedTable} (name TEXT PRIMARY KEY, version INTEGER, applied_at ${pg ? "TIMESTAMP NOT NULL DEFAULT now()" : "TEXT NOT NULL DEFAULT (datetime('now'))"})`), { maxAttempts: 6, baseDelayMs: 1000, rethrow: true });
418
+ if (!runOnlyPending) {
419
+ // Retry initial table creation — SQLITE_BUSY_RECOVERY can occur on HMR
420
+ // restarts when WAL files from the previous process haven't been released yet.
421
+ await retrySqliteBusy(() => exec.execute(`CREATE TABLE IF NOT EXISTS ${table} (version INTEGER PRIMARY KEY)`), { maxAttempts: 6, baseDelayMs: 1000, rethrow: true });
422
+ // Companion name-keyed bookkeeping table — never alters the existing
423
+ // `${table}`'s PRIMARY KEY, so legacy version rows keep working exactly
424
+ // as before. See the `runMigrations` doc comment for why this exists.
425
+ await retrySqliteBusy(() => exec.execute(`CREATE TABLE IF NOT EXISTS ${namedTable} (name TEXT PRIMARY KEY, version INTEGER, applied_at ${pg ? "TIMESTAMP NOT NULL DEFAULT now()" : "TEXT NOT NULL DEFAULT (datetime('now'))"})`), { maxAttempts: 6, baseDelayMs: 1000, rethrow: true });
426
+ }
410
427
  // For Postgres, current was already set by the fast-path SELECT above.
411
428
  // For SQLite we run the SELECT now (via the same exec, which is the singleton).
412
429
  if (!pg) {
@@ -417,7 +434,8 @@ export function runMigrations(migrations, options) {
417
434
  appliedNames = new Set(nameRows.map((r) => String(r.name)));
418
435
  }
419
436
  }
420
- else if (current === -1 || (hasNamedMigrations && namedRowsMissing)) {
437
+ else if (!runOnlyPending &&
438
+ (current === -1 || (hasNamedMigrations && namedRowsMissing))) {
421
439
  // Fast-path read failed (table was absent on the pooler): re-read via the
422
440
  // direct exec now that CREATE TABLE IF NOT EXISTS has ensured it exists.
423
441
  if (current === -1) {
@@ -435,7 +453,9 @@ export function runMigrations(migrations, options) {
435
453
  const insertNamedSql = pg
436
454
  ? `INSERT INTO ${namedTable} (name, version) VALUES (?, ?) ON CONFLICT DO NOTHING`
437
455
  : `INSERT OR IGNORE INTO ${namedTable} (name, version) VALUES (?, ?)`;
438
- const pending = migrations.filter((m) => m.name ? !appliedNames.has(m.name) : m.version > current);
456
+ const pending = runOnlyPending
457
+ ? pendingFast
458
+ : migrations.filter((m) => m.name ? !appliedNames.has(m.name) : m.version > current);
439
459
  if (pending.length > 0) {
440
460
  console.log(`[db] Applying ${pending.length} migration(s) on ${pg ? "Postgres" : "SQLite/libsql"}…`);
441
461
  }
@@ -532,10 +552,10 @@ export function runMigrations(migrations, options) {
532
552
  }
533
553
  }
534
554
  finally {
535
- // Release the direct-endpoint exec (Postgres only). For SQLite getDbExec()
536
- // returns the process-lifetime singleton, so releaseMigrationExec is a no-op
537
- // (refCount never incremented for SQLite path, guard in releaseMigrationExec).
538
- if (pg)
555
+ // Release the direct-endpoint exec (Postgres only). Run-only migrations
556
+ // use the process-lifetime pooled singleton, so there is nothing to close
557
+ // in that branch.
558
+ if (pg && !runOnlyPending)
539
559
  await releaseMigrationExec();
540
560
  }
541
561
  }
@@ -175,7 +175,6 @@ declare const messages: {
175
175
  resources: string;
176
176
  messaging: string;
177
177
  destinations: string;
178
- transactionalEmail: string;
179
178
  identities: string;
180
179
  approvals: string;
181
180
  automations: string;
@@ -206,50 +205,6 @@ declare const messages: {
206
205
  suggestionRouteSlack: string;
207
206
  suggestionGrantKey: string;
208
207
  };
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
- };
253
208
  pages: {
254
209
  appsDescription: string;
255
210
  appsDescriptionWithWorkspace: string;
@@ -180,7 +180,6 @@ const messages = {
180
180
  resources: "Resources",
181
181
  messaging: "Messaging",
182
182
  destinations: "Destinations",
183
- transactionalEmail: "Transactional email",
184
183
  identities: "Identities",
185
184
  approvals: "Approvals",
186
185
  automations: "Automations",
@@ -211,50 +210,6 @@ const messages = {
211
210
  suggestionRouteSlack: "Route Slack mentions to my analytics app",
212
211
  suggestionGrantKey: "Grant my OpenAI key to this app",
213
212
  },
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
- },
258
213
  pages: {
259
214
  appsDescription: "Open workspace apps and start new app creation from Dispatch.",
260
215
  appsDescriptionWithWorkspace: 'Apps in the "{{workspace}}" workspace. Each app gets its own route under this workspace and shares its database, auth, and agent chat.',
@@ -11,24 +11,24 @@
11
11
  * DELETE /_agent-native/notifications/:id — delete
12
12
  */
13
13
  export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
14
- error?: undefined;
15
14
  count: number;
16
15
  updated?: undefined;
17
16
  ok?: undefined;
18
- } | {
19
17
  error?: undefined;
20
- count?: undefined;
18
+ } | {
21
19
  updated: number;
22
20
  ok?: undefined;
23
- } | {
21
+ error?: undefined;
24
22
  count?: undefined;
23
+ } | {
25
24
  updated?: undefined;
26
25
  error: string;
27
26
  ok?: undefined;
28
- } | {
29
- error?: undefined;
30
27
  count?: undefined;
28
+ } | {
31
29
  updated?: undefined;
32
30
  ok: boolean;
31
+ error?: undefined;
32
+ count?: undefined;
33
33
  }>>;
34
34
  //# sourceMappingURL=routes.d.ts.map
@@ -41,16 +41,16 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
41
41
  thumbsUpRate: number;
42
42
  avgEvalScore: number;
43
43
  } | {
44
- error?: undefined;
45
44
  summary: import("./types.js").TraceSummary;
46
45
  spans: import("./types.js").TraceSpan[];
47
46
  id?: undefined;
47
+ error?: undefined;
48
48
  ok?: undefined;
49
49
  } | {
50
- error?: undefined;
51
50
  summary?: undefined;
52
51
  spans?: undefined;
53
52
  id: string;
53
+ error?: undefined;
54
54
  ok?: undefined;
55
55
  } | {
56
56
  summary?: undefined;
@@ -59,10 +59,10 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
59
59
  error: any;
60
60
  ok?: undefined;
61
61
  } | {
62
- error?: undefined;
63
62
  summary?: undefined;
64
63
  spans?: undefined;
65
64
  id?: undefined;
65
+ error?: undefined;
66
66
  ok: boolean;
67
67
  }>>;
68
68
  //# sourceMappingURL=routes.d.ts.map
@@ -28,7 +28,6 @@ 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";
32
31
  import { ssrfSafeFetch } from "../extensions/url-safety.js";
33
32
  import { getAppProductionUrl } from "../server/app-url.js";
34
33
  import { getSession } from "../server/auth.js";
@@ -276,13 +275,7 @@ async function inviteOne(ctx, rawEmail, role, event) {
276
275
  acceptUrl: getInviteAppUrl(event),
277
276
  inviter: ctx.email,
278
277
  });
279
- await sendEmail({
280
- to: email,
281
- subject,
282
- html,
283
- text,
284
- templateId: CORE_INVITE_EMAIL_ID,
285
- });
278
+ await sendEmail({ to: email, subject, html, text });
286
279
  emailSent = true;
287
280
  }
288
281
  catch (err) {
@@ -15,7 +15,7 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
15
15
  error: string;
16
16
  ok?: undefined;
17
17
  } | {
18
- error?: undefined;
19
18
  ok: boolean;
19
+ error?: undefined;
20
20
  }>>;
21
21
  //# sourceMappingURL=routes.d.ts.map
@@ -76,7 +76,9 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
76
76
  }>>;
77
77
  }, z.core.$strip>>, {
78
78
  id?: undefined;
79
+ provider?: undefined;
79
80
  deleted?: undefined;
81
+ found?: undefined;
80
82
  providers: {
81
83
  id: string;
82
84
  label: string;
@@ -87,8 +89,6 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
87
89
  updatedAt: number;
88
90
  }[];
89
91
  count: number;
90
- provider?: undefined;
91
- found?: undefined;
92
92
  registered?: undefined;
93
93
  label?: undefined;
94
94
  message?: undefined;
@@ -103,31 +103,31 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
103
103
  label?: undefined;
104
104
  message?: undefined;
105
105
  } | {
106
+ provider?: undefined;
106
107
  deleted?: undefined;
107
108
  providers?: undefined;
108
109
  count?: undefined;
109
- provider?: undefined;
110
110
  found: boolean;
111
111
  id: string;
112
112
  registered?: undefined;
113
113
  label?: undefined;
114
114
  message?: undefined;
115
115
  } | {
116
- providers?: undefined;
117
- count?: undefined;
118
116
  provider?: undefined;
119
117
  found?: undefined;
118
+ providers?: undefined;
119
+ count?: undefined;
120
120
  deleted: boolean;
121
121
  id: string;
122
122
  registered?: undefined;
123
123
  label?: undefined;
124
124
  message?: undefined;
125
125
  } | {
126
+ provider?: undefined;
126
127
  deleted?: undefined;
128
+ found?: undefined;
127
129
  providers?: undefined;
128
130
  count?: undefined;
129
- provider?: undefined;
130
- found?: undefined;
131
131
  registered: boolean;
132
132
  id: string;
133
133
  label: string;
@@ -314,6 +314,8 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
314
314
  id?: undefined;
315
315
  provider?: undefined;
316
316
  deleted?: undefined;
317
+ found?: undefined;
318
+ message?: undefined;
317
319
  providers: {
318
320
  id: string;
319
321
  label: string;
@@ -324,46 +326,44 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
324
326
  updatedAt: number;
325
327
  }[];
326
328
  count: number;
327
- found?: undefined;
328
329
  registered?: undefined;
329
330
  label?: undefined;
330
- message?: undefined;
331
331
  } | {
332
332
  id?: undefined;
333
333
  count?: undefined;
334
334
  deleted?: undefined;
335
+ message?: undefined;
335
336
  providers?: undefined;
336
337
  found: boolean;
337
338
  provider: import("../custom-registry.js").CustomProviderConfig;
338
339
  registered?: undefined;
339
340
  label?: undefined;
340
- message?: undefined;
341
341
  } | {
342
342
  count?: undefined;
343
343
  provider?: undefined;
344
344
  deleted?: undefined;
345
+ message?: undefined;
345
346
  providers?: undefined;
346
347
  found: boolean;
347
348
  id: string;
348
349
  registered?: undefined;
349
350
  label?: undefined;
350
- message?: undefined;
351
351
  } | {
352
352
  count?: undefined;
353
353
  provider?: undefined;
354
- providers?: undefined;
355
354
  found?: undefined;
355
+ message?: undefined;
356
+ providers?: undefined;
356
357
  deleted: boolean;
357
358
  id: string;
358
359
  registered?: undefined;
359
360
  label?: undefined;
360
- message?: undefined;
361
361
  } | {
362
362
  count?: undefined;
363
363
  provider?: undefined;
364
364
  deleted?: undefined;
365
- providers?: undefined;
366
365
  found?: undefined;
366
+ providers?: undefined;
367
367
  registered: boolean;
368
368
  id: string;
369
369
  label: string;
@@ -73,6 +73,7 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
73
73
  offset?: unknown;
74
74
  limit?: unknown;
75
75
  }, {
76
+ deleted?: undefined;
76
77
  jobs: {
77
78
  id: string;
78
79
  name: string;
@@ -83,7 +84,6 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
83
84
  updatedAt: string;
84
85
  }[];
85
86
  total: number;
86
- deleted?: undefined;
87
87
  jobId?: undefined;
88
88
  } | {
89
89
  jobs?: undefined;
@@ -91,9 +91,9 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
91
91
  deleted: boolean;
92
92
  jobId: string;
93
93
  } | {
94
+ deleted?: undefined;
94
95
  jobs?: undefined;
95
96
  total?: undefined;
96
- deleted?: undefined;
97
97
  jobId?: undefined;
98
98
  hits: Record<string, unknown>[];
99
99
  offset: number;
@@ -48,8 +48,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
48
48
  }>;
49
49
  /** DELETE /_agent-native/resources/:id — delete a resource */
50
50
  export declare function handleDeleteResource(event: any): Promise<{
51
- ok?: undefined;
52
51
  error: string;
52
+ ok?: undefined;
53
53
  } | {
54
54
  error?: undefined;
55
55
  ok: boolean;
@@ -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,12 +95,12 @@ 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
  }>>;
106
106
  //# sourceMappingURL=routes.d.ts.map
@@ -517,28 +517,6 @@ 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
- ],
542
520
  [
543
521
  "get-feature-flags",
544
522
  () => import("../feature-flags/actions/get-feature-flags.js"),
@@ -2959,7 +2959,9 @@ async function mountBetterAuthRoutes(app, options) {
2959
2959
  const rawReturn = Array.isArray(query.return)
2960
2960
  ? query.return[0]
2961
2961
  : query.return;
2962
- setFirstRunOnboardingCookie(event);
2962
+ if (await getSession(event)) {
2963
+ setFirstRunOnboardingCookie(event);
2964
+ }
2963
2965
  return redirectWithStagedCookies(event, safeReturnPath(rawReturn), 302);
2964
2966
  }));
2965
2967
  // Auth guard — stored both in framework middleware registry AND in