@happyvertical/smrt-messages 0.62.7 → 0.62.8

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 (54) hide show
  1. package/AGENTS.md +30 -0
  2. package/dist/chunks/{AttachmentCollection-nTqD75n8.js → AttachmentCollection-DhCoruwp.js} +4 -4
  3. package/dist/chunks/{AttachmentCollection-nTqD75n8.js.map → AttachmentCollection-DhCoruwp.js.map} +1 -1
  4. package/dist/chunks/{Email-DKcIiMxB.js → Email-CmNoK1lj.js} +9 -6
  5. package/dist/chunks/Email-CmNoK1lj.js.map +1 -0
  6. package/dist/chunks/EmailAccountCollection-CHizpsxL.js +1555 -0
  7. package/dist/chunks/EmailAccountCollection-CHizpsxL.js.map +1 -0
  8. package/dist/chunks/{EmailCollection-BYeuWWsP.js → EmailCollection-Yo2wBv_1.js} +3 -3
  9. package/dist/chunks/{EmailCollection-BYeuWWsP.js.map → EmailCollection-Yo2wBv_1.js.map} +1 -1
  10. package/dist/chunks/{EmailFolder-UMGpXTQ7.js → EmailFolder-Dks5clxA.js} +6 -6
  11. package/dist/chunks/{EmailFolder-UMGpXTQ7.js.map → EmailFolder-Dks5clxA.js.map} +1 -1
  12. package/dist/chunks/{EmailFolderCollection-DHZKwe1H.js → EmailFolderCollection-nIR4Kpcr.js} +2 -2
  13. package/dist/chunks/{EmailFolderCollection-DHZKwe1H.js.map → EmailFolderCollection-nIR4Kpcr.js.map} +1 -1
  14. package/dist/chunks/{Message-M8INXZs5.js → Message-e99HkbG8.js} +6 -6
  15. package/dist/chunks/{Message-M8INXZs5.js.map → Message-e99HkbG8.js.map} +1 -1
  16. package/dist/chunks/{MessageCollection-CT0O_7wG.js → MessageCollection-t8cLUSNJ.js} +2 -2
  17. package/dist/chunks/{MessageCollection-CT0O_7wG.js.map → MessageCollection-t8cLUSNJ.js.map} +1 -1
  18. package/dist/chunks/{MessagingEndpointCollection-DrNvP8GM.js → MessagingEndpointCollection-CGtAL77R.js} +2 -2
  19. package/dist/chunks/{MessagingEndpointCollection-DrNvP8GM.js.map → MessagingEndpointCollection-CGtAL77R.js.map} +1 -1
  20. package/dist/chunks/{SlackSender-CjSvwY1K.js → SlackSender-CetlSe6D.js} +2 -2
  21. package/dist/chunks/{SlackSender-CjSvwY1K.js.map → SlackSender-CetlSe6D.js.map} +1 -1
  22. package/dist/chunks/{TweetSender-CcLPNNi1.js → TweetSender-Dw-TDxIB.js} +2 -2
  23. package/dist/chunks/{TweetSender-CcLPNNi1.js.map → TweetSender-Dw-TDxIB.js.map} +1 -1
  24. package/dist/chunks/{providers-4iLula-V.js → providers-Bz_F_ywF.js} +36 -1
  25. package/dist/chunks/{providers-4iLula-V.js.map → providers-Bz_F_ywF.js.map} +1 -1
  26. package/dist/collections/EmailAccountCollection.d.ts.map +1 -1
  27. package/dist/connect.js +1 -1
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +64 -18
  31. package/dist/index.js.map +1 -1
  32. package/dist/mail-sync-jobs.d.ts +48 -0
  33. package/dist/mail-sync-jobs.d.ts.map +1 -0
  34. package/dist/mail-sync.d.ts +58 -0
  35. package/dist/mail-sync.d.ts.map +1 -0
  36. package/dist/manifest.json +158 -34
  37. package/dist/models/Email.d.ts +1 -0
  38. package/dist/models/Email.d.ts.map +1 -1
  39. package/dist/models/EmailAccount.d.ts +29 -2
  40. package/dist/models/EmailAccount.d.ts.map +1 -1
  41. package/dist/providers/email.js +3 -2
  42. package/dist/providers/email.js.map +1 -1
  43. package/dist/providers/slack.js +2 -2
  44. package/dist/providers/twitter.js +2 -2
  45. package/dist/providers.d.ts.map +1 -1
  46. package/dist/recipes.d.ts +1 -1
  47. package/dist/smrt-knowledge.json +66 -10
  48. package/dist/smrt-knowledge.okf.md +3 -2
  49. package/dist/types.d.ts +5 -1
  50. package/dist/types.d.ts.map +1 -1
  51. package/package.json +17 -16
  52. package/dist/chunks/Email-DKcIiMxB.js.map +0 -1
  53. package/dist/chunks/EmailAccountCollection-DtCuHcB4.js +0 -1224
  54. package/dist/chunks/EmailAccountCollection-DtCuHcB4.js.map +0 -1
@@ -10,6 +10,7 @@ import { Message } from "./Message.js";
10
10
  export declare class Email extends Message {
11
11
  messageId: string;
12
12
  inReplyTo: string;
13
+ providerMessageId: string;
13
14
  ccAddresses: string;
14
15
  bccAddresses: string;
15
16
  replyToAddress: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../src/models/Email.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,aAAU,CAAC;AAClB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAW,CAAC;AAEpC,qBAQa,KAAM,SAAQ,OAAO;IAMhC,SAAS,SAAM;IAIf,SAAS,SAAM;IAIf,WAAW,SAAM;IAKjB,YAAY,SAAM;IAElB,cAAc,SAAM;IAEpB,WAAW,SAAM;IAIjB,QAAQ,SAAM;IAEd,QAAQ,SAAM;IAOd,QAAQ,SAAM;IAId,UAAU,SAAM;IAIhB,MAAM,SAAM;IAEZ,KAAK,SAAM;IAIX,UAAU,UAAS;IAEnB,OAAO,UAAS;IAMhB,UAAU,SAAM;IAIhB,OAAO,SAAM;gBAED,OAAO,GAAE,YAAiB;IA8BtC;;OAEG;IACH,cAAc,IAAI,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAS3D;;OAEG;IACH,eAAe,IAAI,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAS5D;;OAEG;IACH,SAAS,IAAI,MAAM,EAAE;IASrB;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IAIj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EG;IACM,WAAW,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,KAAK;IA0D7D;;OAEG;IACM,aAAa,IAAI,KAAK;IAgC/B;;OAEG;cACgB,eAAe,IAAI,MAAM;IAe5C;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAyBxB;;;OAGG;IACY,IAAI,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAM3E,yEAAyE;IAC1D,SAAS,CACtB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,iBAAiB,CAAC;IAM7B;;;OAGG;YACW,kBAAkB;CASjC"}
@@ -4,6 +4,7 @@
4
4
  * Retains email-specific fields and sync capability.
5
5
  */
6
6
  import '../__smrt-register__.js';
7
+ import { type MailSyncOptions, type MailSyncResult } from '../mail-sync.js';
7
8
  import type { EmailAccountOptions, MessageSenderInterface, SyncOptions, SyncResult } from "../types.js";
8
9
  import { Account } from "./Account.js";
9
10
  /** Whether an error means the server refused the account's sign-in. */
@@ -11,6 +12,12 @@ export declare function isMailAuthFailure(error: unknown): boolean;
11
12
  export declare class EmailAccount extends Account {
12
13
  email: string;
13
14
  syncIntervalMinutes: number;
15
+ /**
16
+ * Opaque resume point of the mail server's change feed. Written only after
17
+ * the batch it came from has been applied; null means the next sync starts
18
+ * with a full pass. Internal state: never exposed over generated surfaces.
19
+ */
20
+ syncCursor: string | null;
14
21
  constructor(options?: EmailAccountOptions);
15
22
  /**
16
23
  * Options for child rows (folders/emails) created during sync: carries the DB
@@ -18,9 +25,9 @@ export declare class EmailAccount extends Account {
18
25
  * identity fields. When this account was hydrated from the DB, `this.options`
19
26
  * holds the account row's `id`/`slug`/`_skipLoad`; spreading those into a new
20
27
  * child would make every synced row inherit the account's primary key and
21
- * upsert over each other.
28
+ * upsert over each other. Internal: the mail sync engine reuses it.
22
29
  */
23
- private childOptions;
30
+ childOptions(): Record<string, unknown>;
24
31
  /**
25
32
  * Create a sender for this email account
26
33
  */
@@ -52,6 +59,26 @@ export declare class EmailAccount extends Account {
52
59
  */
53
60
  syncFrom(options?: SyncOptions): Promise<SyncResult>;
54
61
  private syncFromScoped;
62
+ /**
63
+ * Sync new, changed and deleted mail since the last run, from the server's
64
+ * change feed (JMAP). The feed cursor is saved on `syncCursor` only after
65
+ * each batch has been applied; replaying a batch is harmless; a rejected
66
+ * cursor restarts with a full pass. One run per account at a time.
67
+ *
68
+ * Closed accounts (inactive, or needing reconnection) are skipped. A server
69
+ * that refuses the sign-in marks the account `needs_reconnect` and throws an
70
+ * error flagged `retryable: false`. Every other failure throws and leaves the
71
+ * cursor where it was, so the job can simply retry.
72
+ *
73
+ * This is the method the sync job runs (`enqueueMailSync`).
74
+ */
75
+ syncChanges(options?: MailSyncOptions): Promise<MailSyncResult>;
76
+ /**
77
+ * Every message in one server-side conversation, oldest first, read straight
78
+ * from the mail server (providers with native threads, such as JMAP).
79
+ * Returns null when the provider has no thread lookup.
80
+ */
81
+ fetchThread(threadId: string): Promise<import("@happyvertical/email").EmailMessage[] | null>;
55
82
  /**
56
83
  * Get all folders for this account
57
84
  */
@@ -1 +1 @@
1
- {"version":3,"file":"EmailAccount.d.ts","sourceRoot":"","sources":["../../src/models/EmailAccount.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EAEtB,WAAW,EACX,UAAU,EACX,MAAM,aAAU,CAAC;AAClB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAW,CAAC;AAEpC,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAOzD;AAED,qBAMa,YAAa,SAAQ,OAAO;IAEvC,KAAK,SAAM;IAIX,mBAAmB,SAAM;gBAEb,OAAO,GAAE,mBAAwB;IAW7C;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY;IAQpB;;O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,QAAQ,CAAC,EAAE,MAAM,CAAC;KACd,GACL,OAAO,CAAC,IAAI,CAAC;IAOhB;;;;;;;OAOG;IACG,OAAO,CACX,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAU5D;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;CAcxC"}
@@ -1,10 +1,11 @@
1
- import { a as registerMessagingProvider, n as getMessagingProvider, t as ensureBuiltinMessagingProvidersRegistered } from "../chunks/providers-4iLula-V.js";
1
+ import { a as registerMessagingProvider, n as getMessagingProvider, t as ensureBuiltinMessagingProvidersRegistered } from "../chunks/providers-Bz_F_ywF.js";
2
2
  //#region src/providers/email.ts
3
3
  var EMAIL_PROVIDER_IDS = [
4
4
  "smtp",
5
5
  "imap",
6
6
  "pop3",
7
- "gmail"
7
+ "gmail",
8
+ "jmap"
8
9
  ];
9
10
  var registered = false;
10
11
  function ensureEmailMessagingProvider() {
@@ -1 +1 @@
1
- {"version":3,"file":"email.js","names":[],"sources":["../../src/providers/email.ts"],"sourcesContent":["/**\n * Explicit email provider entry point (#1979).\n *\n * Importing this module upgrades the builtin metadata-only email provider\n * definitions (smtp, imap, pop3, gmail) with a functional\n * `createEmailClient` backed by `@happyvertical/email`. Until a server\n * imports it, provider-neutral consumers carry zero email-SDK weight\n * (googleapis, nodemailer, imapflow, mailparser) and\n * `EmailAccount.createClient()` fails with an actionable error.\n *\n * The SDK itself is still loaded on first client construction, so importing\n * this entry keeps server startup cheap while making the dependency an\n * explicit part of the consumer's bundle contract.\n *\n * @example\n * ```ts\n * // hooks.server.ts / server bootstrap\n * import '@happyvertical/smrt-messages/providers/email';\n * ```\n */\nimport type { GetEmailClientOptions } from '@happyvertical/email';\nimport {\n ensureBuiltinMessagingProvidersRegistered,\n getMessagingProvider,\n registerMessagingProvider,\n} from '../providers.js';\n\nconst EMAIL_PROVIDER_IDS = ['smtp', 'imap', 'pop3', 'gmail'] as const;\n\nlet registered = false;\n\n/** Idempotently registers the email client factory on the email providers. */\nexport function ensureEmailMessagingProvider(): void {\n if (registered) return;\n registered = true;\n\n ensureBuiltinMessagingProvidersRegistered();\n for (const id of EMAIL_PROVIDER_IDS) {\n const definition = getMessagingProvider(id);\n if (!definition) continue;\n registerMessagingProvider({\n ...definition,\n createEmailClient: async (options: GetEmailClientOptions) => {\n const { getEmailClient } = await import('@happyvertical/email');\n return getEmailClient(options);\n },\n });\n }\n}\n\nensureEmailMessagingProvider();\n"],"mappings":";;AA2BA,IAAM,qBAAqB;CAAC;CAAQ;CAAQ;CAAQ;AAAO;AAE3D,IAAI,aAAa;AAGV,SAAS,+BAAqC;CACnD,IAAI,YAAY;CAChB,aAAa;CAEb,0CAA0C;CAC1C,KAAA,MAAW,MAAM,oBAAoB;EACnC,MAAM,aAAa,qBAAqB,EAAE;EAC1C,IAAI,CAAC,YAAY;EACjB,0BAA0B;GACxB,GAAG;GACH,mBAAmB,OAAO,YAAmC;IAC3D,MAAM,EAAE,mBAAmB,MAAM,OAAO;IACxC,OAAO,eAAe,OAAO;GAC/B;EACF,CAAC;CACH;AACF;AAEA,6BAA6B"}
1
+ {"version":3,"file":"email.js","names":[],"sources":["../../src/providers/email.ts"],"sourcesContent":["/**\n * Explicit email provider entry point (#1979).\n *\n * Importing this module upgrades the builtin metadata-only email provider\n * definitions (smtp, imap, pop3, gmail, jmap) with a functional\n * `createEmailClient` backed by `@happyvertical/email`. Until a server\n * imports it, provider-neutral consumers carry zero email-SDK weight\n * (googleapis, nodemailer, imapflow, mailparser) and\n * `EmailAccount.createClient()` fails with an actionable error.\n *\n * The SDK itself is still loaded on first client construction, so importing\n * this entry keeps server startup cheap while making the dependency an\n * explicit part of the consumer's bundle contract.\n *\n * @example\n * ```ts\n * // hooks.server.ts / server bootstrap\n * import '@happyvertical/smrt-messages/providers/email';\n * ```\n */\nimport type { GetEmailClientOptions } from '@happyvertical/email';\nimport {\n ensureBuiltinMessagingProvidersRegistered,\n getMessagingProvider,\n registerMessagingProvider,\n} from '../providers.js';\n\nconst EMAIL_PROVIDER_IDS = ['smtp', 'imap', 'pop3', 'gmail', 'jmap'] as const;\n\nlet registered = false;\n\n/** Idempotently registers the email client factory on the email providers. */\nexport function ensureEmailMessagingProvider(): void {\n if (registered) return;\n registered = true;\n\n ensureBuiltinMessagingProvidersRegistered();\n for (const id of EMAIL_PROVIDER_IDS) {\n const definition = getMessagingProvider(id);\n if (!definition) continue;\n registerMessagingProvider({\n ...definition,\n createEmailClient: async (options: GetEmailClientOptions) => {\n const { getEmailClient } = await import('@happyvertical/email');\n return getEmailClient(options);\n },\n });\n }\n}\n\nensureEmailMessagingProvider();\n"],"mappings":";;AA2BA,IAAM,qBAAqB;CAAC;CAAQ;CAAQ;CAAQ;CAAS;AAAM;AAEnE,IAAI,aAAa;AAGV,SAAS,+BAAqC;CACnD,IAAI,YAAY;CAChB,aAAa;CAEb,0CAA0C;CAC1C,KAAA,MAAW,MAAM,oBAAoB;EACnC,MAAM,aAAa,qBAAqB,EAAE;EAC1C,IAAI,CAAC,YAAY;EACjB,0BAA0B;GACxB,GAAG;GACH,mBAAmB,OAAO,YAAmC;IAC3D,MAAM,EAAE,mBAAmB,MAAM,OAAO;IACxC,OAAO,eAAe,OAAO;GAC/B;EACF,CAAC;CACH;AACF;AAEA,6BAA6B"}
@@ -1,4 +1,4 @@
1
- import { a as registerMessagingProvider, t as ensureBuiltinMessagingProvidersRegistered } from "../chunks/providers-4iLula-V.js";
1
+ import { a as registerMessagingProvider, t as ensureBuiltinMessagingProvidersRegistered } from "../chunks/providers-Bz_F_ywF.js";
2
2
  //#region src/providers/slack.ts
3
3
  var registered = false;
4
4
  function ensureSlackMessagingProvider() {
@@ -24,7 +24,7 @@ function ensureSlackMessagingProvider() {
24
24
  required: true
25
25
  }],
26
26
  createSender: async (account) => {
27
- const { SlackSender } = await import("../chunks/SlackSender-CjSvwY1K.js").then((n) => n.n);
27
+ const { SlackSender } = await import("../chunks/SlackSender-CetlSe6D.js").then((n) => n.n);
28
28
  return new SlackSender(account);
29
29
  },
30
30
  createMessageClient: async (config) => {
@@ -1,4 +1,4 @@
1
- import { a as registerMessagingProvider, t as ensureBuiltinMessagingProvidersRegistered } from "../chunks/providers-4iLula-V.js";
1
+ import { a as registerMessagingProvider, t as ensureBuiltinMessagingProvidersRegistered } from "../chunks/providers-Bz_F_ywF.js";
2
2
  //#region src/providers/twitter.ts
3
3
  var registered = false;
4
4
  function ensureTwitterMessagingProvider() {
@@ -39,7 +39,7 @@ function ensureTwitterMessagingProvider() {
39
39
  ],
40
40
  endpointFields: [],
41
41
  createSender: async (account) => {
42
- const { TweetSender } = await import("../chunks/TweetSender-CcLPNNi1.js").then((n) => n.n);
42
+ const { TweetSender } = await import("../chunks/TweetSender-Dw-TDxIB.js").then((n) => n.n);
43
43
  return new TweetSender(account);
44
44
  },
45
45
  createMessageClient: async (config) => {
@@ -1 +1 @@
1
- {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,0BAA0B,GAClC,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,KAAK,GACL,OAAO,GACP,UAAU,CAAC;AAEf,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,0BAA0B,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;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ACnB,qBAAqB,CAAC;AAY1B,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,2BAA2B,GACpC,MAAM,IAAI,CAGZ;AAED,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,MAAM,GACT,2BAA2B,GAAG,SAAS,CAGzC;AAED,wBAAgB,sBAAsB,CACpC,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAAO,iCAM/C;AAqBD,wBAAgB,yCAAyC,IAAI,IAAI,CA8JhE"}
package/dist/recipes.d.ts CHANGED
@@ -21,7 +21,7 @@ export declare class MailboxRecipe extends SmrtRecipe {
21
21
  icon: string;
22
22
  description: string;
23
23
  };
24
- static models: (typeof EmailAccount | typeof Email)[];
24
+ static models: (typeof Email | typeof EmailAccount)[];
25
25
  static runtime: "both";
26
26
  static surfaces: readonly [{
27
27
  readonly kind: "route";
@@ -3,13 +3,13 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-messages",
6
- "packageVersion": "0.62.7",
6
+ "packageVersion": "0.62.8",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "fe9faa9a09f1a44f3aa5b26d83c49cc82a5b6eaedf8a70f28cca76a4e16f85a7",
11
- "packageJson": "d925a7c7827342fc76521c5bc3b633cb126e59b648ec06197d744df238fbebc5",
12
- "agents": "371fbab92d5a0e355983d22b2785505af4f0469de6e78ac435bfcb434fe72409",
10
+ "manifest": "a96b8fdd5313347a372e26a66d66bbc52953b2e5ad113fc8b42cf302f130304c",
11
+ "packageJson": "5028e9ffa88bda2ddda443593a8328574db036fece8ac463703c7d621d305471",
12
+ "agents": "d0e96fb1da71c991c47f14bf2add20ff51b97deb3ff4482cc7569800ef11f047",
13
13
  "moduleDoc:agents/notification-outbox.md": "0e9a870c4b2d5f0fec47af0dff6e61d216fb0121d384d99bccfc506beb6e38ad",
14
14
  "moduleDoc:agents/profile-recipients.md": "1b6710bf646ddeafd6836df8270fcbb8e29226dceda716a693d945cc2e914606"
15
15
  },
@@ -32,10 +32,11 @@
32
32
  "@happyvertical/logger": "catalog:",
33
33
  "@happyvertical/messages": "catalog:",
34
34
  "@happyvertical/smrt-core": "workspace:*",
35
+ "@happyvertical/smrt-jobs": "workspace:*",
35
36
  "@happyvertical/smrt-profiles": "workspace:*",
36
- "@happyvertical/smrt-types": "workspace:*",
37
37
  "@happyvertical/smrt-secrets": "workspace:*",
38
38
  "@happyvertical/smrt-tenancy": "workspace:*",
39
+ "@happyvertical/smrt-types": "workspace:*",
39
40
  "@happyvertical/smrt-ui": "workspace:*",
40
41
  "@happyvertical/smrt-users": "workspace:*",
41
42
  "@happyvertical/sql": "catalog:",
@@ -54,6 +55,7 @@
54
55
  },
55
56
  "smrtDependencies": [
56
57
  "@happyvertical/smrt-core",
58
+ "@happyvertical/smrt-jobs",
57
59
  "@happyvertical/smrt-ledgers",
58
60
  "@happyvertical/smrt-profiles",
59
61
  "@happyvertical/smrt-secrets",
@@ -4188,6 +4190,13 @@
4188
4190
  "columnType": "TEXT",
4189
4191
  "description": "The sender-assigned reference of the email being replied to."
4190
4192
  },
4193
+ {
4194
+ "name": "providerMessageId",
4195
+ "type": "text",
4196
+ "required": false,
4197
+ "columnType": "TEXT",
4198
+ "description": "The mail server's own id for this email, used to keep mailbox sync from storing it twice."
4199
+ },
4191
4200
  {
4192
4201
  "name": "ccAddresses",
4193
4202
  "type": "text",
@@ -5191,9 +5200,11 @@
5191
5200
  ],
5192
5201
  "methods": [
5193
5202
  "activate",
5203
+ "childOptions",
5194
5204
  "createClient",
5195
5205
  "createSender",
5196
5206
  "deactivate",
5207
+ "fetchThread",
5197
5208
  "getConfiguration",
5198
5209
  "getCredentials",
5199
5210
  "getEmails",
@@ -5209,6 +5220,7 @@
5209
5220
  "setCredentials",
5210
5221
  "setSettings",
5211
5222
  "syncAll",
5223
+ "syncChanges",
5212
5224
  "syncFrom"
5213
5225
  ],
5214
5226
  "methodSignatures": [
@@ -5217,6 +5229,10 @@
5217
5229
  "async": true,
5218
5230
  "returns": "Promise<void>"
5219
5231
  },
5232
+ {
5233
+ "name": "childOptions",
5234
+ "returns": "Record<string, unknown>"
5235
+ },
5220
5236
  {
5221
5237
  "name": "createClient",
5222
5238
  "async": true,
@@ -5232,6 +5248,14 @@
5232
5248
  "async": true,
5233
5249
  "returns": "Promise<void>"
5234
5250
  },
5251
+ {
5252
+ "name": "fetchThread",
5253
+ "async": true,
5254
+ "params": [
5255
+ "threadId: string"
5256
+ ],
5257
+ "returns": "any"
5258
+ },
5235
5259
  {
5236
5260
  "name": "getConfiguration",
5237
5261
  "returns": "Record<string, unknown>"
@@ -5327,6 +5351,14 @@
5327
5351
  ],
5328
5352
  "returns": "Promise<Map<string, object>>"
5329
5353
  },
5354
+ {
5355
+ "name": "syncChanges",
5356
+ "async": true,
5357
+ "params": [
5358
+ "options?: MailSyncOptions"
5359
+ ],
5360
+ "returns": "Promise<MailSyncResult>"
5361
+ },
5330
5362
  {
5331
5363
  "name": "syncFrom",
5332
5364
  "async": true,
@@ -5387,6 +5419,13 @@
5387
5419
  "reason": "not listed in api.include",
5388
5420
  "objectName": "@happyvertical/smrt-messages:EmailAccount"
5389
5421
  },
5422
+ {
5423
+ "kind": "api",
5424
+ "operation": "childOptions",
5425
+ "code": "not-included",
5426
+ "reason": "not listed in api.include",
5427
+ "objectName": "@happyvertical/smrt-messages:EmailAccount"
5428
+ },
5390
5429
  {
5391
5430
  "kind": "api",
5392
5431
  "operation": "createClient",
@@ -5408,6 +5447,13 @@
5408
5447
  "reason": "not listed in api.include",
5409
5448
  "objectName": "@happyvertical/smrt-messages:EmailAccount"
5410
5449
  },
5450
+ {
5451
+ "kind": "api",
5452
+ "operation": "fetchThread",
5453
+ "code": "not-included",
5454
+ "reason": "not listed in api.include",
5455
+ "objectName": "@happyvertical/smrt-messages:EmailAccount"
5456
+ },
5411
5457
  {
5412
5458
  "kind": "api",
5413
5459
  "operation": "getConfiguration",
@@ -5513,6 +5559,13 @@
5513
5559
  "reason": "not listed in api.include",
5514
5560
  "objectName": "@happyvertical/smrt-messages:EmailAccount"
5515
5561
  },
5562
+ {
5563
+ "kind": "api",
5564
+ "operation": "syncChanges",
5565
+ "code": "not-included",
5566
+ "reason": "not listed in api.include",
5567
+ "objectName": "@happyvertical/smrt-messages:EmailAccount"
5568
+ },
5516
5569
  {
5517
5570
  "kind": "api",
5518
5571
  "operation": "syncFrom",
@@ -13729,7 +13782,7 @@
13729
13782
  "polymorphicAssociations": 0,
13730
13783
  "uuidColumns": 130
13731
13784
  },
13732
- "agentDoc": "# @happyvertical/smrt-messages\n\nMulti-channel messaging with STI hierarchies for both messages and accounts. Credential encryption via smrt-secrets.\n\n## STI Hierarchies\n\n**Messages** (share `messages` table):\n- `Message` (base): accountId, personaId, endpointId, correlationId, threadId, subject, body, fromAddress, toAddresses (JSON), sendStatus (draft/sending/sent/failed), retryCount\n- `Email`: messageId (RFC 822), inReplyTo, ccAddresses, bccAddresses, htmlBody, textBody, folderId, labels, headers\n- `Tweet`: tweetId, retweetCount, likeCount, mediaUrls, hashtags, mentions\n- `SlackMessage`: channelId, slackTs, slackThreadTs, reactions, blocks\n\n**Accounts** (share `accounts` table):\n- `Account` (base): channelType, providerType, public configuration,\n credentialSecretId, isActive, lastSyncAt, deprecated sensitive settings\n- `EmailAccount`, `TwitterAccount`, `SlackAccount`, `ZulipAccount`,\n `TelegramAccount`: provider-specific identity/sender behavior\n\n## Persona messaging\n\n- `MessagingEndpoint`: tenant-owned, write-only destination JSON with masked\n display helper.\n- `PersonaMessageRoute`: persona → account + endpoint, selected by purpose and\n descending priority.\n- `PersonaMessagingService`: persists and sends through an enabled route.\n- Provider registry: public setup descriptors + optional sender factory. Keep\n channel (`sms`) separate from provider (`twilio`).\n- Permissions: `messages.send`, `messages.manage-routes`,\n `messages.manage-credentials`.\n- `MessagingSettingsService` is the permissioned server boundary;\n its host-supplied `resolvePersonaTenantId` proves cross-package ownership.\n `MessagingSettingsPanel` is the callback-driven Svelte surface.\n- Account, endpoint, and route generated surfaces are read-only. Do not add\n generated mutations around the settings service or make secret fields writable.\n- **Recipe `messages.slack`** (`src/recipes.ts`, help in `src/help/slack.md`): lists Slack messages and workspaces beside the Mailbox and Notifications recipes; workspaces stay read-only and sending goes through the senders, not generated routes. Fields it shows carry `@field({ description })` in plain words; keep them when editing the models.\n\n## Per-account mail access (owner + grants)\n\nOptional by default: `Account.ownerUserId` is nullable, and an account without\nan owner stays tenant-wide. Apps that want private or shared mailboxes set\nowners and call `configureMailAccess({ options, resolvePrincipal })` at startup\n(`access.ts`); smrt never knows the host's credential model, the host returns a\n`MailPrincipal` (`userId` + tenant, optional `scopes` / `accountIds` ceilings).\n\n- Scopes `read`, `triage`, `draft`, `send` are `ResourceGrant` rows (resource\n type `messages:account`, permission `messages.<scope>`) checked by\n `checkResourceOperationPermission`, so the grantee also needs the tenant\n `messages.<scope>` permission (the ceiling). The owner holds every scope\n implicitly. Agents are `User` rows the host maps its credential to; the\n principal ceilings are intersected with the grant, never added to it.\n- `access-enforcement.ts` is a `GlobalInterceptors` entry registered at package\n load. Emails, folders and attachments (matched by STI ancestry) are filtered\n in `beforeList`/`afterList`/`afterGet`; raw `query()` on them is refused while\n any account is closed to the principal. Fail closed: no principal, no\n resolver or a foreign tenant means owned accounts are invisible. No tenant\n admin or super-admin bypass; trusted work (sync, outbox) uses\n `runWithMailSystemAccess()`. `EmailAccount.syncFrom()` does so itself.\n- Attachments carry a denormalized `accountId` (always derived from the message in a\n `beforeSave` interceptor, never caller-supplied) so lists, projections and counts filter in SQL; run\n `AttachmentCollection.backfillAccountIds()` once after upgrading (legacy rows\n without it are hidden from every read until then).\n- `connectMailbox` refuses by default: give the service `allowedMailHosts`\n (and optionally `allowedMailPorts`) or your own `validateMailbox`. The\n built-in validator never connects to private, loopback or link-local\n addresses and returns only a generic error. Policy lookups use the\n configured db handle, not a caller's transaction.\n- `Message.send()` needs the `send` scope on an owned account. Account rows are\n not filtered (senders, routes and the outbox read them without a principal).\n- `MailAccessService` (`grant`, `revoke`, `list`, `setOwner`) needs tenant\n `messages.manage-access` AND ownership (or delegation); an administrator\n cannot read, self-grant or take over an owned mailbox. Unowned accounts can be\n claimed once with `messages.manage-credentials`.\n- Before `configureMailAccess` is called the policy still fails closed on\n owned accounts: every collection operation on a mail class (the core `onCollectionReady`\n interceptor hook, so STI subclasses on a default collection are covered) registers its\n database, per database, and the policy hides every owned account's mail\n through list, count, projections, facets and raw queries; it learns the database from the first mail or account row it\n sees and, with no principal resolver, hides every owned account's mail.\n Direct hydration (`new Email({ id }).initialize()`, `loadRelated()`) is gated\n in the models' `loadFromId`/`loadFromSlug`.\n- `connectionStatus` (`connected` / `needs_reconnect`) and `statusMessage` mark\n an account whose sign-in the server refused; `syncFrom()` sets it.\n\n## Mailbox connect (provider-neutral)\n\nCredentials reach smrt-secrets in two ways; neither writes the plaintext `settings` fallback.\n\n- **Write-only app password**: `MessagingSettingsService.connectMailbox()`\n (permission `messages.manage-credentials`). The candidate credential is\n validated by opening a session first (`validateMailbox` option, default the\n provider's email client); a refusal leaves no account and no secret, and the\n error text has the secret redacted. The connecting user becomes the owner;\n `label` and the per-account endpoint (`configuration`) are stored; reconnect\n replaces the secret and is owner-only. `setAccountActive()` pauses/resumes\n (`isActive`), `removeAccount()` deletes the secret, the synced mail and the\n account. IMAP/POP3 are admitted here (receive-only), not by `saveAccount`.\n- **Generic OAuth 2.0 / OIDC**: `@happyvertical/smrt-messages/connect`\n (`startMailOAuthConnect`, `completeMailOAuthConnect`, `MailOAuthProvider`)\n on the shared kernel `@happyvertical/smrt-secrets/connect` (single-use\n tenant- and user-bound `ConnectState`, PKCE, safe return path, OIDC\n discovery with issuer check). The signed-in user becomes the owner; an\n account owned by someone else or by no one is never taken over. No role\n checks in the flow: authorize before calling.\n- **Reconnect**: `syncFrom()` marks an auth failure `connectionStatus =\n 'needs_reconnect'` (`Account.markNeedsReconnect/markConnected`) instead of\n failing silently.\n- The Google provider is a later step (sdk#1405), not part of this flow.\n\n## In-app notifications (`UserNotification`)\n\nThe in-app channel: one stored row per person, with read state.\n`user_notifications`: `tenantId` (required), `recipientUserId`\n(`@crossPackageRef` smrt-users:User, uuid), `kind`, `title`, `body`, `href`,\n`severity` (info/success/warning/error), `sourceRef`, `occurredAt`, `readAt`,\n`dismissedAt`. Conflict identity `(tenant_id, recipient_user_id, source_ref)`.\n\n- `UserNotificationService` is the only access path: `notify()` /\n `notifyMany()` (dedupe on `sourceRef`, existing row returned untouched;\n a unique ref is generated when omitted), `listForUser()` / `countUnread()`\n across explicit `tenantIds` (each read under `withTenant`), `markRead()`,\n `dismiss()` (also marks read), `markAllRead()`. Every write filters on the\n recipient, so another user's id matches nothing.\n- Generated REST/MCP/CLI are off (`api`/`mcp`/`cli: false`): a tenant-scoped\n list would expose every member's rows. Hosts expose their own routes that\n pass the signed-in user's id, never a request-chosen one.\n- Hosts decide who is told (e.g. `SocialPost.createdByUserId` for a failed\n post). New table: consumers run `db:migrate`.\n\n## Notification email outbox (`NotificationDelivery`)\n\n`NotificationOutboxService` is the external-channel counterpart of\n`UserNotificationService`: `enqueueEmail()` stores one delivery per\n`(tenant, recipient, channel, sourceRef)` after the host resolves the\nrecipient address and same-tenant sender account (callers never choose an\naddress); `dispatchDue()` leases due rows by compare-and-set\n(`NotificationDelivery.transition()`), creates the single outbound `Email`\nunder the lease, and settles sent/retry/failed/uncertain. Never resend an\n`uncertain` row automatically. Contract, retry, and reconciliation policy:\n[agents/notification-outbox.md](agents/notification-outbox.md). New table:\nconsumers run `db:migrate`.\n\n`NotificationOptOut` (`notification_opt_outs`, tenant-required, generated\nsurfaces off) is the per-recipient opt-out ledger for the outbox's\n`isSuppressed` hook, keyed `(tenant, recipient, channel, scope)` with scope `*`\nor `project:<uuid>`-style keys. `NotificationOptOutService`: idempotent\n`optOut`/`optIn` (with a `principal` only `userId === recipientUserId` may\nchange a row, and only in the principal's own `tenantId`, else\n`NotificationOptOutDeniedError`; no principal = trusted host code), trusted `isOptedOut` (a `*` row matches every scope), `listForRecipient`\n(principal required). `optOutSuppression(service, scopeOf)` builds the\n`isSuppressed` function. Details in the outbox doc; consumers run `db:migrate`.\n\n## Credential Security\n\nAccount credentials stored via tenant-bound `credentialSecretId` →\nsmrt-secrets. Use `setCredentials()`/`getCredentials()` — never store passwords\ndirectly. Credential descriptor schemas contain field definitions, never values.\n\n## Send Lifecycle\n\n`message.send()`: resolves account → creates provider sender → updates sendStatus. Retry support with `maxRetries` budget.\nA failure the provider may still have accepted carries\n`MessageSendResult.outcomeUnknown` (set by `EmailSender` unless\n`isDefiniteSendRejection()` proves a refusal, and when a sender throws) and is\npersisted as `metadata.sendOutcomeUnknown`; never auto-resend it.\n`EmailSender` attaches the message's stored `Attachment` rows (read through\n`Attachment.readContent()`, under the message's tenant context) plus\n`SendEmailOptions.attachments` bytes; an unreadable or file-less row fails the\nsend with the error on `sendError`, never a silent drop (#3808).\n`PersonaMessagingService.send({ attachments })` accepts them on email routes only.\n\n## Provider entry points (bundle boundary, #1979)\n\nThe package root is provider-neutral: models, collections, services,\npermissions, and the provider registry carry **zero provider-SDK weight**.\nProvider SDK wrappers (`@happyvertical/email`, `@happyvertical/messages`) are\nreachable only through explicit entry points, imported once at server startup:\n\n```ts\nimport '@happyvertical/smrt-messages/providers/email'; // smtp/imap/pop3/gmail\nimport '@happyvertical/smrt-messages/providers/slack';\nimport '@happyvertical/smrt-messages/providers/twitter';\nimport '@happyvertical/smrt-messages/providers/all'; // all of the above\n```\n\n- Without the matching entry, `EmailAccount.createClient()` (send + mailbox\n sync) throws an actionable error and `SlackSender`/`TweetSender` return a\n failure result naming the entry to import. Telegram and Zulip are\n fetch-based and always work from the root.\n- Builtin registry definitions stay metadata-only (setup fields for UIs); the\n entries upgrade them with `createEmailClient`/`createMessageClient`/\n `createSender` hooks. Never import a provider SDK from any module reachable\n from `src/index.ts` — the consumer bundle gate (`packages/bundle-gate`)\n fails CI when one becomes reachable.\n- `Attachment.readContent()` loads `@happyvertical/files` through core's\n `importOptionalDependency` boundary and keeps its null-on-failure contract\n in builds where the SDK is absent.\n\n## Gotchas\n\n- **Manifest before decorators**: every decorated model imports\n `../__smrt-register__.js`, and `package.json#sideEffects` lists\n `./src/__smrt-register__.ts`. Without both, the library build dropped or\n reordered the self-registration, so dist classes registered with only their\n decorated fields and could adopt smrt-ledgers' same-named `Account` (#3098).\n- **`Account` is not unique**: smrt-ledgers also declares `Account` (on\n `ledger_accounts`). Resolve by constructor or qualified name; the\n coexistence tests (`ledger-account-identity-*`, and the PostgreSQL lane\n `pnpm test:postgres`) load both packages in both orders.\n Both declare the `accounts` collection, so registering the ledgers `Account`\n auto-loads this family from its manifest as STI siblings. Core loads this\n base with them and never takes the ledgers `Account` for it (#4735,\n `ledger-account-identity-sti-siblings.test.ts`).\n- **STI `_meta_type`**: qualified format `@happyvertical/smrt-messages:Email`\n- **JSON fields**: all address/metadata fields are JSON strings with `getX()`/`setX()` helpers\n- **RFC 822 threading**: Email uses `inReplyTo`/`messageId`/`references` — manual management required\n- **Attachment.messageId**: use this field (not `emailId`); old getter/setter mapped via deprecation wrapper\n- **Optional tenancy**: `@TenantScoped({ mode: 'optional' })` on Message, Account, Attachment\n- **Required tenancy**: endpoints and persona routes are always tenant scoped\n- **Secrets are write-only**: never serialize credentials or endpoint.address to an app\n\n## Intake byte snapshots\n\n`EmailAccount.readIntakeMessage(providerLookup, maxBytes, imapIdentity?)` is the authorized host seam for\nopt-in ingestion. It copies full-message attachment bytes from the registered\nemail provider and fails when only attachment metadata is available; it never\nreads provider-supplied paths or advances sync checkpoints. Keep this path\nprovider-neutral and exclude arbitrary headers/credentials from its snapshot.\nIMAP lookup must include folder/UIDVALIDITY/UID verification; sender Message-ID\nis a lookup hint, never the durable delivery identity.\n\nProtected notification Emails carry durable delivery provenance. Their canonical\n`send`/`retrySend`, ordinary save/delete, and default EmailSender handoff are\nconstrained by `protected-notification-handoff.ts` (package-private, never a root\nexport). Only the outbox enters its exact one-use scope after current trusted\npolicy/byte validation. Preserve old-row/constructor identity checks, current\npersisted lease checks at the actual provider boundary, copied byte buffers and\nunknown-outcome marker protection. See the outbox contract and shared protected\nhandoff suite (SQLite and migrated PostgreSQL).\n\n## Protected external contacts\n\nProfile email uses exclusive `recipientProfileId` plus `resolveProfileRecipient`, a reserved `profileNotificationPolicy` and exact current tenant-owned public Profile email. No User account is required. Before activating profiles, run normal framework schema migration and public `planNotificationProfileRecipients` / `migrateNotificationProfileRecipients`; runtime verifies physical constraints and never applies DDL. Legacy User notification and opt-out paths remain User-only. See [profile recipient contract and matrix](agents/profile-recipients.md).\n",
13785
+ "agentDoc": "# @happyvertical/smrt-messages\n\nMulti-channel messaging with STI hierarchies for both messages and accounts. Credential encryption via smrt-secrets.\n\n## STI Hierarchies\n\n**Messages** (share `messages` table):\n- `Message` (base): accountId, personaId, endpointId, correlationId, threadId, subject, body, fromAddress, toAddresses (JSON), sendStatus (draft/sending/sent/failed), retryCount\n- `Email`: messageId (RFC 822), inReplyTo, ccAddresses, bccAddresses, htmlBody, textBody, folderId, labels, headers\n- `Tweet`: tweetId, retweetCount, likeCount, mediaUrls, hashtags, mentions\n- `SlackMessage`: channelId, slackTs, slackThreadTs, reactions, blocks\n\n**Accounts** (share `accounts` table):\n- `Account` (base): channelType, providerType, public configuration,\n credentialSecretId, isActive, lastSyncAt, deprecated sensitive settings\n- `EmailAccount`, `TwitterAccount`, `SlackAccount`, `ZulipAccount`,\n `TelegramAccount`: provider-specific identity/sender behavior\n\n## Persona messaging\n\n- `MessagingEndpoint`: tenant-owned, write-only destination JSON with masked\n display helper.\n- `PersonaMessageRoute`: persona → account + endpoint, selected by purpose and\n descending priority.\n- `PersonaMessagingService`: persists and sends through an enabled route.\n- Provider registry: public setup descriptors + optional sender factory. Keep\n channel (`sms`) separate from provider (`twilio`).\n- Permissions: `messages.send`, `messages.manage-routes`,\n `messages.manage-credentials`.\n- `MessagingSettingsService` is the permissioned server boundary;\n its host-supplied `resolvePersonaTenantId` proves cross-package ownership.\n `MessagingSettingsPanel` is the callback-driven Svelte surface.\n- Account, endpoint, and route generated surfaces are read-only. Do not add\n generated mutations around the settings service or make secret fields writable.\n- **Recipe `messages.slack`** (`src/recipes.ts`, help in `src/help/slack.md`): lists Slack messages and workspaces beside the Mailbox and Notifications recipes; workspaces stay read-only and sending goes through the senders, not generated routes. Fields it shows carry `@field({ description })` in plain words; keep them when editing the models.\n\n## Per-account mail access (owner + grants)\n\nOptional by default: `Account.ownerUserId` is nullable, and an account without\nan owner stays tenant-wide. Apps that want private or shared mailboxes set\nowners and call `configureMailAccess({ options, resolvePrincipal })` at startup\n(`access.ts`); smrt never knows the host's credential model, the host returns a\n`MailPrincipal` (`userId` + tenant, optional `scopes` / `accountIds` ceilings).\n\n- Scopes `read`, `triage`, `draft`, `send` are `ResourceGrant` rows (resource\n type `messages:account`, permission `messages.<scope>`) checked by\n `checkResourceOperationPermission`, so the grantee also needs the tenant\n `messages.<scope>` permission (the ceiling). The owner holds every scope\n implicitly. Agents are `User` rows the host maps its credential to; the\n principal ceilings are intersected with the grant, never added to it.\n- `access-enforcement.ts` is a `GlobalInterceptors` entry registered at package\n load. Emails, folders and attachments (matched by STI ancestry) are filtered\n in `beforeList`/`afterList`/`afterGet`; raw `query()` on them is refused while\n any account is closed to the principal. Fail closed: no principal, no\n resolver or a foreign tenant means owned accounts are invisible. No tenant\n admin or super-admin bypass; trusted work (sync, outbox) uses\n `runWithMailSystemAccess()`. `EmailAccount.syncFrom()` does so itself.\n- Attachments carry a denormalized `accountId` (always derived from the message in a\n `beforeSave` interceptor, never caller-supplied) so lists, projections and counts filter in SQL; run\n `AttachmentCollection.backfillAccountIds()` once after upgrading (legacy rows\n without it are hidden from every read until then).\n- `connectMailbox` refuses by default: give the service `allowedMailHosts`\n (and optionally `allowedMailPorts`) or your own `validateMailbox`. The\n built-in validator never connects to private, loopback or link-local\n addresses and returns only a generic error. Policy lookups use the\n configured db handle, not a caller's transaction.\n- `Message.send()` needs the `send` scope on an owned account. Account rows are\n not filtered (senders, routes and the outbox read them without a principal).\n- `MailAccessService` (`grant`, `revoke`, `list`, `setOwner`) needs tenant\n `messages.manage-access` AND ownership (or delegation); an administrator\n cannot read, self-grant or take over an owned mailbox. Unowned accounts can be\n claimed once with `messages.manage-credentials`.\n- Before `configureMailAccess` is called the policy still fails closed on\n owned accounts: every collection operation on a mail class (the core `onCollectionReady`\n interceptor hook, so STI subclasses on a default collection are covered) registers its\n database, per database, and the policy hides every owned account's mail\n through list, count, projections, facets and raw queries; it learns the database from the first mail or account row it\n sees and, with no principal resolver, hides every owned account's mail.\n Direct hydration (`new Email({ id }).initialize()`, `loadRelated()`) is gated\n in the models' `loadFromId`/`loadFromSlug`.\n- `connectionStatus` (`connected` / `needs_reconnect`) and `statusMessage` mark\n an account whose sign-in the server refused; `syncFrom()` sets it.\n\n## Mailbox connect (provider-neutral)\n\nCredentials reach smrt-secrets in two ways; neither writes the plaintext `settings` fallback.\n\n- **Write-only app password**: `MessagingSettingsService.connectMailbox()`\n (permission `messages.manage-credentials`). The candidate credential is\n validated by opening a session first (`validateMailbox` option, default the\n provider's email client); a refusal leaves no account and no secret, and the\n error text has the secret redacted. The connecting user becomes the owner;\n `label` and the per-account endpoint (`configuration`) are stored; reconnect\n replaces the secret and is owner-only. `setAccountActive()` pauses/resumes\n (`isActive`), `removeAccount()` deletes the secret, the synced mail and the\n account. IMAP/POP3 are admitted here (receive-only), not by `saveAccount`.\n- **Generic OAuth 2.0 / OIDC**: `@happyvertical/smrt-messages/connect`\n (`startMailOAuthConnect`, `completeMailOAuthConnect`, `MailOAuthProvider`)\n on the shared kernel `@happyvertical/smrt-secrets/connect` (single-use\n tenant- and user-bound `ConnectState`, PKCE, safe return path, OIDC\n discovery with issuer check). The signed-in user becomes the owner; an\n account owned by someone else or by no one is never taken over. No role\n checks in the flow: authorize before calling.\n- **Reconnect**: `syncFrom()` marks an auth failure `connectionStatus =\n 'needs_reconnect'` (`Account.markNeedsReconnect/markConnected`) instead of\n failing silently.\n- The Google provider is a later step (sdk#1405), not part of this flow.\n\n## In-app notifications (`UserNotification`)\n\nThe in-app channel: one stored row per person, with read state.\n`user_notifications`: `tenantId` (required), `recipientUserId`\n(`@crossPackageRef` smrt-users:User, uuid), `kind`, `title`, `body`, `href`,\n`severity` (info/success/warning/error), `sourceRef`, `occurredAt`, `readAt`,\n`dismissedAt`. Conflict identity `(tenant_id, recipient_user_id, source_ref)`.\n\n- `UserNotificationService` is the only access path: `notify()` /\n `notifyMany()` (dedupe on `sourceRef`, existing row returned untouched;\n a unique ref is generated when omitted), `listForUser()` / `countUnread()`\n across explicit `tenantIds` (each read under `withTenant`), `markRead()`,\n `dismiss()` (also marks read), `markAllRead()`. Every write filters on the\n recipient, so another user's id matches nothing.\n- Generated REST/MCP/CLI are off (`api`/`mcp`/`cli: false`): a tenant-scoped\n list would expose every member's rows. Hosts expose their own routes that\n pass the signed-in user's id, never a request-chosen one.\n- Hosts decide who is told (e.g. `SocialPost.createdByUserId` for a failed\n post). New table: consumers run `db:migrate`.\n\n## Notification email outbox (`NotificationDelivery`)\n\n`NotificationOutboxService` is the external-channel counterpart of\n`UserNotificationService`: `enqueueEmail()` stores one delivery per\n`(tenant, recipient, channel, sourceRef)` after the host resolves the\nrecipient address and same-tenant sender account (callers never choose an\naddress); `dispatchDue()` leases due rows by compare-and-set\n(`NotificationDelivery.transition()`), creates the single outbound `Email`\nunder the lease, and settles sent/retry/failed/uncertain. Never resend an\n`uncertain` row automatically. Contract, retry, and reconciliation policy:\n[agents/notification-outbox.md](agents/notification-outbox.md). New table:\nconsumers run `db:migrate`.\n\n`NotificationOptOut` (`notification_opt_outs`, tenant-required, generated\nsurfaces off) is the per-recipient opt-out ledger for the outbox's\n`isSuppressed` hook, keyed `(tenant, recipient, channel, scope)` with scope `*`\nor `project:<uuid>`-style keys. `NotificationOptOutService`: idempotent\n`optOut`/`optIn` (with a `principal` only `userId === recipientUserId` may\nchange a row, and only in the principal's own `tenantId`, else\n`NotificationOptOutDeniedError`; no principal = trusted host code), trusted `isOptedOut` (a `*` row matches every scope), `listForRecipient`\n(principal required). `optOutSuppression(service, scopeOf)` builds the\n`isSuppressed` function. Details in the outbox doc; consumers run `db:migrate`.\n\n## Credential Security\n\nAccount credentials stored via tenant-bound `credentialSecretId` →\nsmrt-secrets. Use `setCredentials()`/`getCredentials()` — never store passwords\ndirectly. Credential descriptor schemas contain field definitions, never values.\n\n## Send Lifecycle\n\n`message.send()`: resolves account → creates provider sender → updates sendStatus. Retry support with `maxRetries` budget.\nA failure the provider may still have accepted carries\n`MessageSendResult.outcomeUnknown` (set by `EmailSender` unless\n`isDefiniteSendRejection()` proves a refusal, and when a sender throws) and is\npersisted as `metadata.sendOutcomeUnknown`; never auto-resend it.\n`EmailSender` attaches the message's stored `Attachment` rows (read through\n`Attachment.readContent()`, under the message's tenant context) plus\n`SendEmailOptions.attachments` bytes; an unreadable or file-less row fails the\nsend with the error on `sendError`, never a silent drop (#3808).\n`PersonaMessagingService.send({ attachments })` accepts them on email routes only.\n\n## Provider entry points (bundle boundary, #1979)\n\nThe package root is provider-neutral: models, collections, services,\npermissions, and the provider registry carry **zero provider-SDK weight**.\nProvider SDK wrappers (`@happyvertical/email`, `@happyvertical/messages`) are\nreachable only through explicit entry points, imported once at server startup:\n\n```ts\nimport '@happyvertical/smrt-messages/providers/email'; // smtp/imap/pop3/gmail\nimport '@happyvertical/smrt-messages/providers/slack';\nimport '@happyvertical/smrt-messages/providers/twitter';\nimport '@happyvertical/smrt-messages/providers/all'; // all of the above\n```\n\n- Without the matching entry, `EmailAccount.createClient()` (send + mailbox\n sync) throws an actionable error and `SlackSender`/`TweetSender` return a\n failure result naming the entry to import. Telegram and Zulip are\n fetch-based and always work from the root.\n- Builtin registry definitions stay metadata-only (setup fields for UIs); the\n entries upgrade them with `createEmailClient`/`createMessageClient`/\n `createSender` hooks. Never import a provider SDK from any module reachable\n from `src/index.ts` — the consumer bundle gate (`packages/bundle-gate`)\n fails CI when one becomes reachable.\n- `Attachment.readContent()` loads `@happyvertical/files` through core's\n `importOptionalDependency` boundary and keeps its null-on-failure contract\n in builds where the SDK is absent.\n\n## Gotchas\n\n- **Manifest before decorators**: every decorated model imports\n `../__smrt-register__.js`, and `package.json#sideEffects` lists\n `./src/__smrt-register__.ts`. Without both, the library build dropped or\n reordered the self-registration, so dist classes registered with only their\n decorated fields and could adopt smrt-ledgers' same-named `Account` (#3098).\n- **`Account` is not unique**: smrt-ledgers also declares `Account` (on\n `ledger_accounts`). Resolve by constructor or qualified name; the\n coexistence tests (`ledger-account-identity-*`, and the PostgreSQL lane\n `pnpm test:postgres`) load both packages in both orders.\n Both declare the `accounts` collection, so registering the ledgers `Account`\n auto-loads this family from its manifest as STI siblings. Core loads this\n base with them and never takes the ledgers `Account` for it (#4735,\n `ledger-account-identity-sti-siblings.test.ts`).\n- **STI `_meta_type`**: qualified format `@happyvertical/smrt-messages:Email`\n- **JSON fields**: all address/metadata fields are JSON strings with `getX()`/`setX()` helpers\n- **RFC 822 threading**: Email uses `inReplyTo`/`messageId`/`references` — manual management required\n- **Attachment.messageId**: use this field (not `emailId`); old getter/setter mapped via deprecation wrapper\n- **Optional tenancy**: `@TenantScoped({ mode: 'optional' })` on Message, Account, Attachment\n- **Required tenancy**: endpoints and persona routes are always tenant scoped\n- **Secrets are write-only**: never serialize credentials or endpoint.address to an app\n\n## Intake byte snapshots\n\n`EmailAccount.readIntakeMessage(providerLookup, maxBytes, imapIdentity?)` is the authorized host seam for\nopt-in ingestion. It copies full-message attachment bytes from the registered\nemail provider and fails when only attachment metadata is available; it never\nreads provider-supplied paths or advances sync checkpoints. Keep this path\nprovider-neutral and exclude arbitrary headers/credentials from its snapshot.\nIMAP lookup must include folder/UIDVALIDITY/UID verification; sender Message-ID\nis a lookup hint, never the durable delivery identity.\n\nProtected notification Emails carry durable delivery provenance. Their canonical\n`send`/`retrySend`, ordinary save/delete, and default EmailSender handoff are\nconstrained by `protected-notification-handoff.ts` (package-private, never a root\nexport). Only the outbox enters its exact one-use scope after current trusted\npolicy/byte validation. Preserve old-row/constructor identity checks, current\npersisted lease checks at the actual provider boundary, copied byte buffers and\nunknown-outcome marker protection. See the outbox contract and shared protected\nhandoff suite (SQLite and migrated PostgreSQL).\n\n## Protected external contacts\n\nProfile email uses exclusive `recipientProfileId` plus `resolveProfileRecipient`, a reserved `profileNotificationPolicy` and exact current tenant-owned public Profile email. No User account is required. Before activating profiles, run normal framework schema migration and public `planNotificationProfileRecipients` / `migrateNotificationProfileRecipients`; runtime verifies physical constraints and never applies DDL. Legacy User notification and opt-out paths remain User-only. See [profile recipient contract and matrix](agents/profile-recipients.md).\n\n## Incremental mail sync (change feed)\n\n`EmailAccount.syncChanges({ limit?, maxBatches? })` (`mail-sync.ts`) drives\n`EmailClient.getChanges()` (JMAP provider `jmap`; `@happyvertical/email` 0.114+).\n`syncFrom()` stays the polling path for IMAP/POP3.\n\n- `EmailAccount.syncCursor` is the opaque feed cursor (sensitive + readonly, never\n on generated surfaces). It is saved only after its batch is applied; a failure\n anywhere leaves it where it was, so the job just retries.\n- Rows are keyed on `Email.providerMessageId` (the server's own id, per account),\n so applying a batch twice changes nothing. Added/changed messages upsert,\n `removed` deletes, `folders` upserts `EmailFolder` by path and counts are\n recomputed for touched folders. Metadata-only changes keep stored bodies.\n- `resync-required` clears the cursor and runs a full pass in the same run; a\n full pass from no cursor deletes stored messages (with a `providerMessageId`)\n the server no longer has. A second resync request in one run throws.\n- One lane per account: runs queue behind each other in-process, work on the\n stored (revision-guarded) row, and the job is deduplicated per tenant+account.\n Inactive and `needs_reconnect` accounts, and clients without `getChanges`,\n return `{ status: 'skipped' }`. Auth failures call `markNeedsReconnect()` and\n throw with `retryable: false`. The sync runs under `runWithMailSystemAccess()`.\n- Job: `enqueueMailSync(account)` / `enqueueDueMailSyncs(accounts)`\n (`mail-sync-jobs.ts`, queue `mail-sync`, dedupe key `mail-sync:<accountId>`)\n target `EmailAccount.syncChanges` through `@happyvertical/smrt-jobs` (optional\n peer). The host runs the `TaskRunner` and schedules `enqueueDueMailSyncs`.\n- Known gaps: attachment rows are not created (only `hasAttachments`/`size`);\n a renamed server folder creates a new folder row (stored messages keep the old\n path until they change); `jmap` has no connect-flow validator yet and is not an\n outbound transport.\n",
13733
13786
  "moduleDocs": [
13734
13787
  {
13735
13788
  "path": "agents/notification-outbox.md",
@@ -13837,7 +13890,8 @@
13837
13890
  "options": [
13838
13891
  "imap",
13839
13892
  "pop3",
13840
- "gmail"
13893
+ "gmail",
13894
+ "jmap"
13841
13895
  ],
13842
13896
  "required": true
13843
13897
  },
@@ -13888,7 +13942,7 @@
13888
13942
  "demo": {
13889
13943
  "mode": "server",
13890
13944
  "reasons": [
13891
- "Needs a server because its package depends on @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3617, #3624, #3626, #3627)."
13945
+ "Needs a server because its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3626, #3627)."
13892
13946
  ]
13893
13947
  }
13894
13948
  },
@@ -13957,7 +14011,7 @@
13957
14011
  "demo": {
13958
14012
  "mode": "server",
13959
14013
  "reasons": [
13960
- "Needs a server because its package depends on @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3617, #3624, #3626, #3627)."
14014
+ "Needs a server because its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3626, #3627)."
13961
14015
  ]
13962
14016
  }
13963
14017
  },
@@ -14190,7 +14244,7 @@
14190
14244
  "demo": {
14191
14245
  "mode": "server",
14192
14246
  "reasons": [
14193
- "Needs a server because its package depends on @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3617, #3624, #3626, #3627)."
14247
+ "Needs a server because its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3626, #3627)."
14194
14248
  ]
14195
14249
  }
14196
14250
  }
@@ -14198,12 +14252,14 @@
14198
14252
  "browser": {
14199
14253
  "status": "server-only",
14200
14254
  "issues": [
14255
+ "#3615",
14201
14256
  "#3617",
14202
14257
  "#3624",
14203
14258
  "#3626",
14204
14259
  "#3627"
14205
14260
  ],
14206
14261
  "via": [
14262
+ "@happyvertical/smrt-jobs",
14207
14263
  "@happyvertical/smrt-profiles",
14208
14264
  "@happyvertical/smrt-secrets",
14209
14265
  "@happyvertical/smrt-tenancy",
@@ -5,10 +5,10 @@ description: "Unified multi-channel messaging with STI-based hierarchies"
5
5
  status: "stable"
6
6
  generated:
7
7
  by: "smrt/scripts/generate-knowledge-okf.ts"
8
- at: "2026-11-18T11:21:29Z"
8
+ at: "2026-11-18T15:23:12Z"
9
9
  audience: "internal"
10
10
  evidence_level: "source-inspected"
11
- source_revision: "sha256:52fe46d2883f6984653de1992fc7f9fc023fe6948e0bf91b1ab4b007b11c76ff"
11
+ source_revision: "sha256:8a2e21faf9fbc2728f3fafc97b9bbe007ccc93763b18bafab0e930acd9582bb2"
12
12
  sources:
13
13
  - id: "manifest"
14
14
  resource: "https://github.com/happyvertical/smrt/blob/main/packages/messages/package.json"
@@ -42,6 +42,7 @@ sources:
42
42
  ## Framework dependencies
43
43
 
44
44
  - [smrt-core](/components/smrt-core.md)
45
+ - [smrt-jobs](/components/smrt-jobs.md)
45
46
  - [smrt-ledgers](/components/smrt-ledgers.md)
46
47
  - [smrt-profiles](/components/smrt-profiles.md)
47
48
  - [smrt-secrets](/components/smrt-secrets.md)
package/dist/types.d.ts CHANGED
@@ -110,7 +110,7 @@ export type AccountType = 'EmailAccount' | 'SlackAccount' | 'TwitterAccount' | '
110
110
  /**
111
111
  * Email provider type
112
112
  */
113
- export type ProviderType = 'smtp' | 'imap' | 'pop3' | 'gmail';
113
+ export type ProviderType = 'smtp' | 'imap' | 'pop3' | 'gmail' | 'jmap';
114
114
  /**
115
115
  * Options for creating Message (base)
116
116
  */
@@ -221,6 +221,8 @@ export interface AttachmentOptions extends SmrtObjectOptions {
221
221
  */
222
222
  export interface EmailOptions extends MessageOptions {
223
223
  messageId?: string;
224
+ /** The mail server's own id for this message (JMAP Email id). */
225
+ providerMessageId?: string;
224
226
  inReplyTo?: string;
225
227
  ccAddresses?: string;
226
228
  bccAddresses?: string;
@@ -244,6 +246,8 @@ export interface EmailAccountOptions extends AccountOptions {
244
246
  email?: string;
245
247
  providerType?: ProviderType;
246
248
  syncIntervalMinutes?: number;
249
+ /** Opaque change-feed resume point; see `EmailAccount.syncChanges()`. */
250
+ syncCursor?: string | null;
247
251
  }
248
252
  /**
249
253
  * Options for creating EmailFolder
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,MAAM,qBAAqB,GAC7B,OAAO,GACP,OAAO,GACP,UAAU,GACV,OAAO,GACP,SAAS,GACT,KAAK,CAAC;AAEV,gFAAgF;AAChF,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAMrE;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,OAAO,GACP,SAAS,GACT,SAAS,GACT,MAAM,GACN,QAAQ,GACR,WAAW,CAAC;AAEhB;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,CACF,OAAO,EAAE,OAAO,EAChB,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,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-messages",
3
- "version": "0.62.7",
3
+ "version": "0.62.8",
4
4
  "smrtJsdoc": "strict",
5
5
  "description": "Unified multi-channel messaging with STI-based hierarchies",
6
6
  "type": "module",
@@ -63,19 +63,20 @@
63
63
  "./dist/svelte/index.js"
64
64
  ],
65
65
  "dependencies": {
66
- "@happyvertical/email": "^0.114.0",
67
- "@happyvertical/files": "^0.114.0",
68
- "@happyvertical/logger": "^0.114.0",
69
- "@happyvertical/messages": "^0.114.0",
70
- "@happyvertical/smrt-core": "0.62.7",
71
- "@happyvertical/smrt-profiles": "0.62.7",
72
- "@happyvertical/smrt-types": "0.62.7",
73
- "@happyvertical/smrt-secrets": "0.62.7",
74
- "@happyvertical/smrt-tenancy": "0.62.7",
75
- "@happyvertical/smrt-ui": "0.62.7",
76
- "@happyvertical/smrt-users": "0.62.7",
77
- "@happyvertical/sql": "^0.114.0",
78
- "@happyvertical/utils": "^0.114.0"
66
+ "@happyvertical/email": "^0.115.0",
67
+ "@happyvertical/files": "^0.115.0",
68
+ "@happyvertical/logger": "^0.115.0",
69
+ "@happyvertical/messages": "^0.115.0",
70
+ "@happyvertical/smrt-core": "0.62.8",
71
+ "@happyvertical/smrt-jobs": "0.62.8",
72
+ "@happyvertical/smrt-profiles": "0.62.8",
73
+ "@happyvertical/smrt-secrets": "0.62.8",
74
+ "@happyvertical/smrt-tenancy": "0.62.8",
75
+ "@happyvertical/smrt-types": "0.62.8",
76
+ "@happyvertical/smrt-ui": "0.62.8",
77
+ "@happyvertical/smrt-users": "0.62.8",
78
+ "@happyvertical/sql": "^0.115.0",
79
+ "@happyvertical/utils": "^0.115.0"
79
80
  },
80
81
  "peerDependencies": {
81
82
  "@happyvertical/encryption": "*",
@@ -90,8 +91,8 @@
90
91
  }
91
92
  },
92
93
  "devDependencies": {
93
- "@happyvertical/smrt-ledgers": "0.62.7",
94
- "@happyvertical/smrt-vitest": "0.62.7",
94
+ "@happyvertical/smrt-ledgers": "0.62.8",
95
+ "@happyvertical/smrt-vitest": "0.62.8",
95
96
  "@sveltejs/package": "^2.5.8",
96
97
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
97
98
  "@types/node": "24.13.6",