@plotday/twister 0.49.0 → 0.51.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 (90) hide show
  1. package/dist/connector.d.ts +30 -3
  2. package/dist/connector.d.ts.map +1 -1
  3. package/dist/connector.js.map +1 -1
  4. package/dist/docs/assets/hierarchy.js +1 -1
  5. package/dist/docs/assets/search.js +1 -1
  6. package/dist/docs/classes/index.Connector.html +37 -13
  7. package/dist/docs/classes/index.Imap.html +1 -1
  8. package/dist/docs/classes/index.Options.html +1 -1
  9. package/dist/docs/classes/index.Smtp.html +1 -1
  10. package/dist/docs/classes/tools_integrations.Integrations.html +40 -10
  11. package/dist/docs/classes/tools_network.Network.html +1 -1
  12. package/dist/docs/classes/tools_plot.Plot.html +11 -19
  13. package/dist/docs/classes/tools_store.Store.html +25 -2
  14. package/dist/docs/classes/tools_tasks.Tasks.html +1 -1
  15. package/dist/docs/documents/Built-in_Tools.html +1 -1
  16. package/dist/docs/documents/Runtime_Environment.html +25 -1
  17. package/dist/docs/enums/plot.ActorType.html +4 -4
  18. package/dist/docs/enums/tools_integrations.AuthProvider.html +13 -13
  19. package/dist/docs/hierarchy.html +1 -1
  20. package/dist/docs/types/index.NewScheduleOccurrence.html +15 -2
  21. package/dist/docs/types/index.ScheduleOccurrence.html +2 -4
  22. package/dist/docs/types/index.ScheduleOccurrenceUpdate.html +1 -1
  23. package/dist/docs/types/plot.Actor.html +5 -5
  24. package/dist/docs/types/plot.Contact.html +4 -4
  25. package/dist/docs/types/plot.ContentType.html +1 -1
  26. package/dist/docs/types/plot.Link.html +24 -19
  27. package/dist/docs/types/plot.LinkUpdate.html +1 -1
  28. package/dist/docs/types/plot.NewActor.html +1 -1
  29. package/dist/docs/types/plot.NewContact.html +1 -1
  30. package/dist/docs/types/plot.NewLink.html +11 -4
  31. package/dist/docs/types/plot.NewLinkWithNotes.html +1 -1
  32. package/dist/docs/types/plot.NewNote.html +1 -1
  33. package/dist/docs/types/plot.Note.html +7 -1
  34. package/dist/docs/types/plot.NoteUpdate.html +1 -1
  35. package/dist/docs/types/plot.PlanOperation.html +1 -1
  36. package/dist/docs/types/tools_integrations.ArchiveLinkFilter.html +5 -5
  37. package/dist/docs/types/tools_integrations.AuthToken.html +4 -4
  38. package/dist/docs/types/tools_integrations.Authorization.html +4 -4
  39. package/dist/docs/types/tools_integrations.SyncContext.html +21 -2
  40. package/dist/llm-docs/connector.d.ts +1 -1
  41. package/dist/llm-docs/connector.d.ts.map +1 -1
  42. package/dist/llm-docs/connector.js +1 -1
  43. package/dist/llm-docs/connector.js.map +1 -1
  44. package/dist/llm-docs/plot.d.ts +1 -1
  45. package/dist/llm-docs/plot.d.ts.map +1 -1
  46. package/dist/llm-docs/plot.js +1 -1
  47. package/dist/llm-docs/plot.js.map +1 -1
  48. package/dist/llm-docs/schedule.d.ts +1 -1
  49. package/dist/llm-docs/schedule.d.ts.map +1 -1
  50. package/dist/llm-docs/schedule.js +1 -1
  51. package/dist/llm-docs/schedule.js.map +1 -1
  52. package/dist/llm-docs/tools/integrations.d.ts +1 -1
  53. package/dist/llm-docs/tools/integrations.d.ts.map +1 -1
  54. package/dist/llm-docs/tools/integrations.js +1 -1
  55. package/dist/llm-docs/tools/integrations.js.map +1 -1
  56. package/dist/llm-docs/tools/plot.d.ts +1 -1
  57. package/dist/llm-docs/tools/plot.d.ts.map +1 -1
  58. package/dist/llm-docs/tools/plot.js +1 -1
  59. package/dist/llm-docs/tools/plot.js.map +1 -1
  60. package/dist/llm-docs/tools/store.d.ts +1 -1
  61. package/dist/llm-docs/tools/store.d.ts.map +1 -1
  62. package/dist/llm-docs/tools/store.js +1 -1
  63. package/dist/llm-docs/tools/store.js.map +1 -1
  64. package/dist/plot.d.ts +33 -7
  65. package/dist/plot.d.ts.map +1 -1
  66. package/dist/plot.js.map +1 -1
  67. package/dist/schedule.d.ts +18 -2
  68. package/dist/schedule.d.ts.map +1 -1
  69. package/dist/tools/integrations.d.ts +64 -0
  70. package/dist/tools/integrations.d.ts.map +1 -1
  71. package/dist/tools/integrations.js.map +1 -1
  72. package/dist/tools/plot.d.ts +0 -11
  73. package/dist/tools/plot.d.ts.map +1 -1
  74. package/dist/tools/plot.js.map +1 -1
  75. package/dist/tools/store.d.ts +40 -0
  76. package/dist/tools/store.d.ts.map +1 -1
  77. package/dist/tools/store.js.map +1 -1
  78. package/package.json +1 -1
  79. package/src/connector.ts +30 -3
  80. package/src/llm-docs/connector.ts +1 -1
  81. package/src/llm-docs/plot.ts +1 -1
  82. package/src/llm-docs/schedule.ts +1 -1
  83. package/src/llm-docs/tools/integrations.ts +1 -1
  84. package/src/llm-docs/tools/plot.ts +1 -1
  85. package/src/llm-docs/tools/store.ts +1 -1
  86. package/src/plot.ts +40 -16
  87. package/src/schedule.ts +19 -3
  88. package/src/tools/integrations.ts +69 -0
  89. package/src/tools/plot.ts +0 -12
  90. package/src/tools/store.ts +44 -0
@@ -1 +1 @@
1
- {"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../src/plot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE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BAA2B;IAC3B,2DAAgB,CAAA;IAChB,4BAA4B;IAC5B,2DAAgB,CAAA;IAChB,qBAAqB;IACrB,+CAAU,CAAA;IACV,6BAA6B;IAC7B,uDAAc,CAAA;AAChB,CAAC,EAjBW,UAAU,KAAV,UAAU,QAiBrB;AAuED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,UAeX;AAfD,WAAY,UAAU;IACpB,8CAA8C;IAC9C,mCAAqB,CAAA;IACrB,mDAAmD;IACnD,2BAAa,CAAA;IACb,+DAA+D;IAC/D,mCAAqB,CAAA;IACrB,+DAA+D;IAC/D,2CAA6B,CAAA;IAC7B,yCAAyC;IACzC,2BAAa,CAAA;IACb,+DAA+D;IAC/D,+BAAiB,CAAA;IACjB,sDAAsD;IACtD,2BAAa,CAAA;AACf,CAAC,EAfW,UAAU,KAAV,UAAU,QAerB;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,oBAWX;AAXD,WAAY,oBAAoB;IAC9B,kBAAkB;IAClB,iDAAyB,CAAA;IACzB,WAAW;IACX,qCAAa,CAAA;IACb,sBAAsB;IACtB,yDAAiC,CAAA;IACjC,kBAAkB;IAClB,uCAAe,CAAA;IACf,6CAA6C;IAC7C,uCAAe,CAAA;AACjB,CAAC,EAXW,oBAAoB,KAApB,oBAAoB,QAW/B;AAumBD;;;;;GAKG;AACH,MAAM,CAAN,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,qCAAqC;IACrC,yCAAI,CAAA;IACJ,2CAA2C;IAC3C,+CAAO,CAAA;IACP,0CAA0C;IAC1C,2CAAK,CAAA;AACP,CAAC,EAPW,SAAS,KAAT,SAAS,QAOpB"}
@@ -149,11 +149,20 @@ export type ScheduleOccurrence = {
149
149
  end: Date | string | null;
150
150
  /** Tags for this occurrence */
151
151
  tags: Tags;
152
- /** True if the occurrence is archived */
153
- archived: boolean;
154
152
  };
155
153
  /**
156
154
  * Type for creating or updating schedule occurrences.
155
+ *
156
+ * Use `cancelled: true` to skip a single date in a recurring series
157
+ * (e.g. an upstream calendar reports one occurrence as cancelled).
158
+ * Internally this is translated into an addition to the parent
159
+ * schedule's `recurrenceExdates`; no occurrence schedule row is
160
+ * persisted for the cancelled date. For seeding the full exception
161
+ * list on the master at initial sync, use `NewSchedule.recurrenceExdates`
162
+ * instead.
163
+ *
164
+ * Use a normal occurrence record (without `cancelled`) for genuine
165
+ * overrides — time changes, RSVP differences, etc.
157
166
  */
158
167
  export type NewScheduleOccurrence = Pick<ScheduleOccurrence, "occurrence" | "start"> & Partial<Omit<ScheduleOccurrence, "occurrence" | "start" | "schedule" | "tags">> & {
159
168
  /** Tags for this occurrence */
@@ -164,6 +173,13 @@ export type NewScheduleOccurrence = Pick<ScheduleOccurrence, "occurrence" | "sta
164
173
  unread?: boolean;
165
174
  /** Contacts to upsert on this occurrence's schedule */
166
175
  contacts?: NewScheduleContact[];
176
+ /**
177
+ * Mark this single date as cancelled. The runtime translates this
178
+ * into an addition to the parent schedule's `recurrenceExdates` and
179
+ * archives any pre-existing override row for the same date — no
180
+ * occurrence schedule row is created.
181
+ */
182
+ cancelled?: boolean;
167
183
  };
168
184
  /**
169
185
  * Type for updating schedule occurrences inline.
@@ -1 +1 @@
1
- {"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../src/schedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACL,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,IAAI,EACV,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,qCAAqC;IACrC,OAAO,EAAE,IAAI,CAAC;IACd,8CAA8C;IAC9C,QAAQ,EAAE,OAAO,CAAC;IA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AC,EAAE,kBAAkB,EAAE,CAAC;IAEhC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,qBAAqB,EACrB,YAAY,CACb,GACC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC"}
@@ -78,6 +78,28 @@ export type SyncContext = {
78
78
  * Undefined when no limit applies.
79
79
  */
80
80
  syncHistoryMin?: Date;
81
+ /**
82
+ * True when this is a recovery dispatch after the connection's auth was
83
+ * restored (the user re-authorized a previously-broken connection).
84
+ *
85
+ * The framework calls `onChannelEnabled` again for every channel that was
86
+ * already enabled at the time of re-auth so the connector can recover from
87
+ * the auth gap. Connectors should:
88
+ *
89
+ * 1. Drop any persisted incremental sync cursors / sync tokens so the
90
+ * next sync re-walks history (the cursor may be stale or invalid —
91
+ * Google Calendar invalidates syncTokens after ~7 days).
92
+ * 2. Re-register webhooks (any prior subscription may have been
93
+ * invalidated during the auth outage).
94
+ * 3. Treat this as a backfill that walks history but does NOT spam
95
+ * notifications — set `unread: false` and `archived: false` on
96
+ * items as you would during initial sync.
97
+ *
98
+ * Most connectors can take the same code path as a fresh
99
+ * `onChannelEnabled` for `recovering: true` as long as that path
100
+ * overwrites stored state rather than appending to it.
101
+ */
102
+ recovering?: boolean;
81
103
  };
82
104
  /**
83
105
  * Built-in tool for managing OAuth authentication and channel resources.
@@ -224,6 +246,48 @@ export declare abstract class Integrations extends ITool {
224
246
  abstract setThreadToDo(source: string, actorId: ActorId, todo: boolean, options?: {
225
247
  date?: Date | string;
226
248
  }): Promise<void>;
249
+ /**
250
+ * Signal that initial bulk-sync (or recovery sync) for a channel is fully
251
+ * complete. The Flutter app uses this to clear the "syncing…" indicator
252
+ * on the connection.
253
+ *
254
+ * The framework automatically marks a channel as syncing when it dispatches
255
+ * `onChannelEnabled` (whether initial-enable, auto-enable from
256
+ * `setChannels`, or recovery after re-auth). Connectors do NOT need to
257
+ * call anything to start tracking — only to signal completion.
258
+ *
259
+ * Call this exactly once when the initial backfill has finished (no more
260
+ * pages, all phases exhausted). Do NOT call it on every incremental sync.
261
+ *
262
+ * If `onChannelEnabled` throws an unhandled exception, the framework
263
+ * automatically clears the syncing state — connectors don't need a
264
+ * `try/catch` to clear state on failure.
265
+ *
266
+ * No-op when no auth/user mapping exists for the channel (e.g. key-based
267
+ * connectors that don't have a per-user OAuth association).
268
+ *
269
+ * @param channelId - The channel resource ID whose initial sync just finished
270
+ */
271
+ abstract channelSyncCompleted(channelId: string): Promise<void>;
272
+ /**
273
+ * Flag a connection as needing re-authentication so the Flutter app
274
+ * surfaces a re-auth prompt on the next sync.
275
+ *
276
+ * Call this when a connector's API call returns a permanent auth-style
277
+ * error that the runtime can't observe through token refresh — e.g.
278
+ * Slack `invalid_auth` / `token_revoked` / `not_authed`, or a 401 on a
279
+ * provider that doesn't refresh. The runtime already flags reauth
280
+ * automatically when an OAuth refresh permanently fails or when the
281
+ * stored token is missing on a get(); only call this for cases the
282
+ * runtime can't see.
283
+ *
284
+ * Idempotent: safe to call repeatedly; existing reauth flags are not
285
+ * overwritten. No-op when the channel has no `enabledBy` actor (e.g.
286
+ * key-based connectors).
287
+ *
288
+ * @param channelId - The channel resource ID whose token is bad
289
+ */
290
+ abstract markNeedsReauth(channelId: string): Promise<void>;
227
291
  }
228
292
  /**
229
293
  * Filter criteria for archiving links.
@@ -1 +1 @@
1
- {"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../src/tools/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,EACL,YAAY,EACb,MAAM,IAAI,CAAC;AACZ,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,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M,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAClC,CAAC;AAEF;;;;;GAKG;AACH,oBAAY,YAAY;IACtB,0DAA0D;IAC1D,MAAM,WAAW;IACjB,0DAA0D;IAC1D,SAAS,cAAc;IACvB,kDAAkD;IAClD,MAAM,WAAW;IACjB,gDAAgD;IAChD,KAAK,UAAU;IACf,uDAAuD;IACvD,SAAS,cAAc;IACvB,kDAAkD;IAClD,MAAM,WAAW;IACjB,gCAAgC;IAChC,MAAM,WAAW;IACjB,sEAAsE;IACtE,MAAM,WAAW;IACjB,gDAAgD;IAChD,KAAK,UAAU;IACf,6CAA6C;IAC7C,OAAO,YAAY;IACnB,yDAAyD;IACzD,OAAO,YAAY;IACnB,iDAAiD;IACjD,QAAQ,aAAa;CACtB;AAED;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,mDAAmD;IACnD,QAAQ,EAAE,YAAY,CAAC;IACvB,sDAAsD;IACtD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,0EAA0E;IAC1E,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../src/tools/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GAEN,MAAM,IAAI,CAAC;AAqFZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,OAAgB,YAAa,SAAQ,KAAK;IAC9C;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,WAAuB;QAC3C,OAAO,KAAK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AA;IACf,uDAAuD;IACvD,uCAAuB,CAAA;IACvB,kDAAkD;IAClD,iCAAiB,CAAA;IACjB,gCAAgC;IAChC,iCAAiB,CAAA;IACjB,sEAAsE;IACtE,iCAAiB,CAAA;IACjB,gDAAgD;IAChD,+BAAe,CAAA;IACf,6CAA6C;IAC7C,mCAAmB,CAAA;IACnB,yDAAyD;IACzD,mCAAmB,CAAA;IACnB,iDAAiD;IACjD,qCAAqB,CAAA;AACvB,CAAC,EAzBW,YAAY,KAAZ,YAAY,QAyBvB"}
@@ -490,17 +490,6 @@ export declare abstract class Plot extends ITool {
490
490
  * twist. This is the same value exposed on Twist via `this.userId`.
491
491
  */
492
492
  abstract getUserId(): Promise<string>;
493
- /**
494
- * Returns the owner user's root priority ID. Used as the implicit default
495
- * when an operation needs a priority but the caller didn't supply one —
496
- * for example, `plot.createPriority()` without a parent, or
497
- * `plot.getThreads()` without an explicit `priorityId`.
498
- *
499
- * On the server, priority resolution for newly created threads/links
500
- * happens automatically via `match_priority_for_user`; twists rarely need
501
- * to call this directly.
502
- */
503
- abstract getDefaultPriorityId(): Promise<string>;
504
493
  /**
505
494
  * Creates a new schedule for a thread.
506
495
  *
@@ -1 +1 @@
1
- {"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,EACL,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,IAAI,EACL,MAAM,IAAI,CAAC;AACZ,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,O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,aAAa,QAGxB;AAED,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,0DAA0D;IAC1D,2CAAI,CAAA;IACJ,6FAA6F;IAC7F,2CAAI,CAAA;AACN,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAmDD,gDAAgD;AAChD,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACvC,+CAA+C;AAC/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAenC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,OAAgB,IAAK,SAAQ,KAAK;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,MAAM,CAAU,OAAO,CAqDrB;CA0ZH"}
@@ -137,5 +137,45 @@ export declare abstract class Store extends ITool {
137
137
  * @returns Promise that resolves when all keys are removed
138
138
  */
139
139
  abstract clearAll(): Promise<void>;
140
+ /**
141
+ * Acquire a self-expiring lock. Returns true if the caller now holds the
142
+ * lock, false if another holder has a non-expired lease.
143
+ *
144
+ * Use this for any operation where you previously hand-rolled a boolean
145
+ * "in progress" flag with manual cleanup on every error path. The lock
146
+ * auto-releases after `ttlMs`, so a crashed/timed-out holder cannot wedge
147
+ * the system permanently — pick a `ttlMs` comfortably longer than the
148
+ * worst-case duration of the protected work.
149
+ *
150
+ * Acquisition is atomic across concurrent callers (the underlying
151
+ * Durable Object serializes operations). Lock keys live in a reserved
152
+ * namespace and never appear in `get` / `list` results.
153
+ *
154
+ * @example
155
+ * ```typescript
156
+ * if (!(await this.tools.store.acquireLock(`sync_${id}`, 30 * 60_000))) {
157
+ * return; // another sync is already running
158
+ * }
159
+ * try {
160
+ * await this.runSync(id);
161
+ * } finally {
162
+ * await this.tools.store.releaseLock(`sync_${id}`);
163
+ * }
164
+ * ```
165
+ *
166
+ * @param key Lock identifier (any string).
167
+ * @param ttlMs Lease duration in milliseconds. After this time the lock
168
+ * is considered expired and a new caller can acquire it even if
169
+ * `releaseLock` was never called.
170
+ * @returns Promise resolving to true if acquired, false if held.
171
+ */
172
+ abstract acquireLock(key: string, ttlMs: number): Promise<boolean>;
173
+ /**
174
+ * Release a lock acquired via {@link acquireLock}. Safe to call even if
175
+ * the caller never acquired the lock or the lease has already expired.
176
+ *
177
+ * @param key The same key that was passed to `acquireLock`.
178
+ */
179
+ abstract releaseLock(key: string): Promise<void>;
140
180
  }
141
181
  //# sourceMappingURL=store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/tools/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,IAAI,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,8BAAsB,KAAM,SAAQ,KAAK;IACvC;;;;;;;;;;;;OAYG;IAEH,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IAEH,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAE1E;;;;;;;;OAQG;IAEH,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAEhD;;;;;;;;OAQG;IAEH,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAE1C;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CACnC"}
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/tools/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;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,OAAgB,KAAM,SAAQ,KAAK;CA2FxC"}
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/tools/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAqB,MAAM,IAAI,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,OAAgB,KAAM,SAAQ,KAAK;CAuIxC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plotday/twister",
3
- "version": "0.49.0",
3
+ "version": "0.51.0",
4
4
  "description": "Plot Twist Creator - Build intelligent extensions that integrate and automate",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/connector.ts CHANGED
@@ -240,6 +240,29 @@ export abstract class Connector<TSelf> extends Twist<TSelf> {
240
240
  /**
241
241
  * Called when a channel resource is enabled for syncing.
242
242
  *
243
+ * The framework dispatches this in three cases:
244
+ * 1. **Initial enable** — user toggled the channel on for the first time.
245
+ * 2. **Auto-enable** — `setChannels` discovered a new channel on a
246
+ * connection with `auto_enable_new_channels` set.
247
+ * 3. **Recovery after re-auth** — the user re-authorized a previously-
248
+ * broken connection. The framework calls `onChannelEnabled` for every
249
+ * channel that was already enabled at the time of re-auth, with
250
+ * `context.recovering = true`. See {@link SyncContext.recovering}.
251
+ *
252
+ * Implementations should be **idempotent and overwrite stored state**:
253
+ * the same channel may receive multiple `onChannelEnabled` calls across
254
+ * its lifetime. Use unconditional `this.set()` writes rather than
255
+ * coalesce/skip-if-present logic so a recovery dispatch wipes stale
256
+ * cursors and state from the prior session.
257
+ *
258
+ * **Sync state tracking is automatic.** The framework stamps the
259
+ * connection as "syncing" when it dispatches this method and clears
260
+ * that state when:
261
+ * - the connector calls `tools.integrations.channelSyncCompleted(id)`
262
+ * once the initial backfill is done, OR
263
+ * - this method throws an unhandled exception (auto-cleared so the UI
264
+ * doesn't get stuck in "syncing" forever).
265
+ *
243
266
  * **IMPORTANT: This method runs inline in the HTTP request handler.**
244
267
  * Any long-running work (webhook setup, API calls, sync) MUST be queued
245
268
  * as a separate task via `this.runTask()`, not executed inline. Blocking
@@ -250,8 +273,12 @@ export abstract class Connector<TSelf> extends Twist<TSelf> {
250
273
  *
251
274
  * @example
252
275
  * ```typescript
253
- * async onChannelEnabled(channel: Channel): Promise<void> {
254
- * await this.set(`sync_enabled_${channel.id}`, true);
276
+ * async onChannelEnabled(channel: Channel, context?: SyncContext): Promise<void> {
277
+ * // Recovery: drop stale cursors so the next sync re-walks history.
278
+ * if (context?.recovering) {
279
+ * await this.clear(`last_sync_token_${channel.id}`);
280
+ * }
281
+ *
255
282
  * await this.set(`sync_state_${channel.id}`, { channelId: channel.id });
256
283
  *
257
284
  * // Queue sync as a task — do NOT use this.run() or call sync methods inline
@@ -265,7 +292,7 @@ export abstract class Connector<TSelf> extends Twist<TSelf> {
265
292
  * ```
266
293
  *
267
294
  * @param channel - The channel that was enabled
268
- * @param context - Optional sync context with plan-based hints (e.g. syncHistoryMin)
295
+ * @param context - Optional sync context (plan-based hints, recovery flag)
269
296
  */
270
297
  abstract onChannelEnabled(channel: Channel, context?: SyncContext): Promise<void>;
271
298
 
@@ -5,4 +5,4 @@
5
5
  * Generated from: prebuild.ts
6
6
  */
7
7
 
8
- export default "import { type Actor, type ActorId, type Link, type NewLinkWithNotes, type Note, type Thread } from \"./plot\";\nimport type { ScheduleContactStatus } from \"./schedule\";\nimport {\n type AuthProvider,\n type AuthToken,\n type Authorization,\n type Channel,\n type LinkTypeConfig,\n type SyncContext,\n} from \"./tools/integrations\";\nimport { Twist } from \"./twist\";\n\n/**\n * Fields captured in Plot when a user initiates creation of a new external\n * item via a connector's `onCreateLink` hook.\n *\n * Thread-agnostic on purpose — connectors do not receive the Plot thread.\n * The platform attaches the returned `NewLinkWithNotes` to the originating\n * thread once `onCreateLink` resolves.\n */\n/**\n * Result returned from {@link Connector.onNoteCreated} and\n * {@link Connector.onNoteUpdated} to report what the external system now\n * has stored for the note.\n *\n * The runtime hashes `externalContent` and stores it as the note's sync\n * baseline. On the next sync-in, if the incoming content hashes to the\n * same value, the runtime knows the external side hasn't changed and\n * preserves Plot's (possibly formatted) content. When the external side\n * is edited, the hash diverges and the runtime overwrites Plot's content\n * with the new external version.\n *\n * Omitting `externalContent` skips baseline tracking — the next sync-in\n * will overwrite Plot's content (previous behavior). Always provide it\n * when the write-back's return value reflects what the external system\n * actually stored (often lossy plain-text), so the round-trip does not\n * clobber the original Plot markdown.\n *\n * The hash covers only the content string — the runtime intentionally\n * does not include a content-type in the hash, so write-back and sync-in\n * do not have to agree on a content-type label for the same underlying\n * bytes. Return exactly the string your connector's sync-in path will\n * emit as `NewNote.content` for this note on the next re-ingest.\n *\n * For back-compat, `onNoteCreated` may also return a plain string, which\n * is treated as `{ key }` with no baseline.\n */\nexport type NoteWriteBackResult = {\n /**\n * External system identifier assigned to this note. Set as the note's\n * `key` for future upsert matching. Required when the runtime does not\n * already know the key (i.e., from `onNoteCreated`); ignored from\n * `onNoteUpdated` when the key was already established on create.\n */\n key?: string;\n /**\n * The content string as the external system now stores it, post-write.\n * For systems whose write-back returns a representation of what was\n * actually stored (e.g. Google Drive comment `content` after a create),\n * pass that verbatim. For systems that only accept plain text, this\n * will often be a lossy plain-text version of the Plot markdown — that\n * is exactly the point: storing the lossy form as baseline lets the\n * next sync-in recognize it and skip overwriting the richer Plot\n * version.\n *\n * Must exactly match the string your connector's sync-in path emits as\n * `NewNote.content` for this note on re-ingest.\n */\n externalContent?: string;\n};\n\nexport type CreateLinkDraft = {\n /** The channel (account + resource) the new item belongs to. */\n channelId: string;\n /** Link type identifier, matches a `LinkTypeConfig.type`. */\n type: string;\n /** Status the user selected. Matches a `statuses[].status` for `type`. */\n status: string;\n /** Title of the originating Plot thread (post AI title generation). */\n title: string;\n /** Markdown content of the thread's first note, or null if none. */\n noteContent: string | null;\n /**\n * Contacts attached to the originating Plot thread, excluding the\n * creating user. Use these as recipients (email, chat DM members, etc.)\n * when the external item is a message or invite. An empty list means\n * the user did not add anyone to the thread.\n */\n contacts: Actor[];\n};\n\n/**\n * Base class for connectors — twists that sync data from external services.\n *\n * Connectors declare a single OAuth provider and scopes, and implement channel\n * lifecycle methods for discovering and syncing external resources. They save\n * data directly via `integrations.saveLink()` instead of using the Plot tool.\n *\n * @example\n * ```typescript\n * class LinearConnector extends Connector<LinearConnector> {\n * readonly provider = AuthProvider.Linear;\n * readonly scopes = [\"read\", \"write\"];\n * readonly linkTypes = [{\n * type: \"issue\",\n * label: \"Issue\",\n * statuses: [\n * { status: \"open\", label: \"Open\" },\n * { status: \"done\", label: \"Done\" },\n * ],\n * }];\n *\n * build(build: ToolBuilder) {\n * return {\n * integrations: build(Integrations),\n * };\n * }\n *\n * async getChannels(auth: Authorization, token: AuthToken): Promise<Channel[]> {\n * const teams = await this.listTeams(token);\n * return teams.map(t => ({ id: t.id, title: t.name }));\n * }\n *\n * async onChannelEnabled(channel: Channel) {\n * const issues = await this.fetchIssues(channel.id);\n * for (const issue of issues) {\n * await this.tools.integrations.saveLink(issue);\n * }\n * }\n *\n * async onChannelDisabled(channel: Channel) {\n * // Clean up webhooks, sync state, etc.\n * }\n * }\n * ```\n */\nexport abstract class Connector<TSelf> extends Twist<TSelf> {\n /**\n * Static marker to identify Connector subclasses without instanceof checks\n * across worker boundaries.\n */\n static readonly isConnector = true;\n\n // ---- Identity (abstract — every connector must declare) ----\n\n /** The OAuth provider this connector authenticates with. */\n readonly provider?: AuthProvider;\n\n /** OAuth scopes to request for this connector. */\n readonly scopes?: string[];\n\n // ---- Auth model ----\n\n /**\n * When true, one credential is shared across all users in the workspace,\n * entered once by the installer. When false (default), each user provides\n * their own credential.\n *\n * Applies to both OAuth and key-based connectors:\n * - Shared OAuth: e.g. Slack bot token (workspace-level)\n * - Shared key: e.g. Attio workspace API key\n * - Individual OAuth: e.g. Google Calendar (per-user)\n * - Individual key: e.g. Fellow (per-user API key)\n */\n readonly shared?: boolean;\n\n /**\n * The Options field name that contains the authentication key (e.g. \"apiKey\").\n * Must reference a `secure: true` field in the Options schema.\n *\n * When set, this connector uses key-based auth instead of OAuth.\n * For individual connectors (`shared` is false), this field is stored\n * per-user rather than in shared config.\n */\n readonly keyOption?: string;\n\n // ---- Optional metadata ----\n\n /**\n * When true, this connector has a single implicit channel.\n * `getChannels()` must return exactly one Channel.\n * The UI will show channel config inline instead of a channel list.\n */\n readonly singleChannel?: boolean;\n\n /**\n * Registry of link types this connector creates (e.g., issue, event, message).\n * Used for display in the UI (icons, labels, statuses).\n */\n readonly linkTypes?: LinkTypeConfig[];\n\n /**\n * When true, this connector is mentioned by default on replies to threads it created.\n * When false (default), this connector cannot be mentioned at all.\n *\n * Set this to true for connectors with bidirectional sync (e.g., issue trackers,\n * messaging) where user replies should be written back to the external service.\n */\n static readonly handleReplies?: boolean;\n\n // ---- Account identity (abstract — every connector must implement) ----\n\n /**\n * Returns a human-readable name for the connected account.\n * Shown in the connections list and edit modal to identify this connection.\n *\n * For OAuth connectors, this is typically the workspace or organization name\n * (e.g., \"Acme Corp\" for a Linear workspace). For API key connectors, this\n * could be the workspace name from the external service.\n *\n * Override this in your connector to return a meaningful account name.\n *\n * @param auth - The authorization (null for no-provider connectors)\n * @param token - The access token (null for no-provider connectors)\n * @returns Promise resolving to the account display name\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getAccountName(\n auth: Authorization | null,\n token: AuthToken | null\n ): Promise<string | null> {\n return Promise.resolve(null);\n }\n\n // ---- Channel lifecycle (abstract — every connector must implement) ----\n\n /**\n * Returns available channels for the authorized actor.\n * Called after OAuth is complete, during the setup/edit modal.\n *\n * @param auth - The completed authorization with provider and actor info\n * @param token - The access token for making API calls\n * @returns Promise resolving to available channels for the user to select\n */\n abstract getChannels(\n auth: Authorization | null,\n token: AuthToken | null\n ): Promise<Channel[]>;\n\n /**\n * Called when a channel resource is enabled for syncing.\n *\n * **IMPORTANT: This method runs inline in the HTTP request handler.**\n * Any long-running work (webhook setup, API calls, sync) MUST be queued\n * as a separate task via `this.runTask()`, not executed inline. Blocking\n * here causes the client to spin waiting for the response.\n *\n * Only lightweight operations should appear directly in this method:\n * `this.set()`, `this.get()`, `this.callback()`, and `this.runTask()`.\n *\n * @example\n * ```typescript\n * async onChannelEnabled(channel: Channel): Promise<void> {\n * await this.set(`sync_enabled_${channel.id}`, true);\n * await this.set(`sync_state_${channel.id}`, { channelId: channel.id });\n *\n * // Queue sync as a task — do NOT use this.run() or call sync methods inline\n * const syncCallback = await this.callback(this.syncBatch, 1, \"full\", channel.id, true);\n * await this.runTask(syncCallback);\n *\n * // Queue webhook setup as a task — do NOT call setupWebhook() inline\n * const webhookCallback = await this.callback(this.setupWebhook, channel.id);\n * await this.runTask(webhookCallback);\n * }\n * ```\n *\n * @param channel - The channel that was enabled\n * @param context - Optional sync context with plan-based hints (e.g. syncHistoryMin)\n */\n abstract onChannelEnabled(channel: Channel, context?: SyncContext): Promise<void>;\n\n /**\n * Called when a channel resource is disabled.\n * Should stop sync, clean up webhooks, and remove state.\n *\n * @param channel - The channel that was disabled\n */\n abstract onChannelDisabled(channel: Channel): Promise<void>;\n\n // ---- Write-back hooks (optional, default no-ops) ----\n\n /**\n * Called when a link created by this connector is updated by the user.\n * Override to write back changes to the external service\n * (e.g., changing issue status in Linear when marked done in Plot).\n *\n * @param link - The updated link\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkUpdated(link: Link): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * Called when a user creates a thread in Plot that should create a new\n * item in this connector's external system.\n *\n * A connector opts in to Plot-initiated creation by declaring a status\n * with `createDefault: true` on the relevant `LinkTypeConfig`. When a\n * user picks \"Create new <type>\" from the Add link modal and the thread\n * is synced, the runtime calls this method with the draft fields.\n *\n * Implementations should create the item in the external service and\n * return a `NewLinkWithNotes` describing the created item. The platform\n * attaches the returned link to the originating thread — do not call\n * `integrations.saveLink` yourself.\n *\n * Returning `null` aborts creation silently (the thread is still saved\n * without a link).\n *\n * @param draft - The fields captured in Plot for the new item.\n * @returns The link to attach, or null to abort creation.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onCreateLink(draft: CreateLinkDraft): Promise<NewLinkWithNotes | null> {\n return Promise.resolve(null);\n }\n\n /**\n * Called when a note is created on a thread owned by this connector.\n * Override to write back comments to the external service\n * (e.g., adding a comment to a Linear issue).\n *\n * Returning a string or {@link NoteWriteBackResult} links the Plot note\n * to its external counterpart. A plain string sets the note's `key`.\n * A `NoteWriteBackResult` additionally sets a sync baseline (via\n * `externalContent`) so the next sync-in can recognize the round-tripped\n * content and preserve Plot's formatted version. See\n * {@link NoteWriteBackResult} for details.\n *\n * @param note - The created note\n * @param thread - The thread the note belongs to (includes thread.meta with connector-specific data)\n * @returns Optional note key or NoteWriteBackResult for external dedup + baseline tracking\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onNoteCreated(note: Note, thread: Thread): Promise<string | NoteWriteBackResult | void> {\n return Promise.resolve();\n }\n\n /**\n * Called when a note on a thread owned by this connector is updated.\n * Override to write back changes to the external service\n * (e.g., syncing reaction tags as emoji reactions, or editing a comment\n * whose content changed in Plot).\n *\n * Return a {@link NoteWriteBackResult} with `externalContent` to update\n * the sync baseline after a successful write-back, so the next sync-in\n * recognizes the external version as already-seen and preserves Plot's\n * content.\n *\n * @param note - The updated note (includes current tags)\n * @param thread - The thread the note belongs to (includes thread.meta with connector-specific data)\n * @returns Optional NoteWriteBackResult for baseline tracking\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onNoteUpdated(note: Note, thread: Thread): Promise<NoteWriteBackResult | void> {\n return Promise.resolve();\n }\n\n /**\n * Called when a user reads or unreads a thread owned by this connector.\n * Override to write back read status to the external service\n * (e.g., marking an email as read in Gmail).\n *\n * @param thread - The thread that was read/unread (includes thread.meta with connector-specific data)\n * @param actor - The user who performed the action\n * @param unread - false when marked as read, true when marked as unread\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onThreadRead(thread: Thread, actor: Actor, unread: boolean): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * Called when a user marks or unmarks a thread as todo.\n * Override to sync todo status to the external service\n * (e.g., starring an email in Gmail when marked as todo).\n *\n * @param thread - The thread (includes thread.meta with connector-specific data)\n * @param actor - The user who changed the todo status\n * @param todo - true when marked as todo, false when done or removed\n * @param options - Additional context\n * @param options.date - The todo date (when todo=true)\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onThreadToDo(thread: Thread, actor: Actor, todo: boolean, options: { date?: Date }): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * Called when a schedule contact's RSVP status changes on a thread owned by this connector.\n * Override to sync RSVP changes back to the external calendar.\n *\n * @param thread - The thread (includes thread.meta with connector-specific data)\n * @param scheduleId - The schedule ID\n * @param contactId - The contact whose status changed\n * @param status - The new RSVP status ('attend', 'skip', or null)\n * @param actor - The user who changed the status\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onScheduleContactUpdated(thread: Thread, scheduleId: string, contactId: ActorId, status: ScheduleContactStatus | null, actor: Actor): Promise<void> {\n return Promise.resolve();\n }\n\n // ---- Activation ----\n\n /**\n * Called when the connector is activated after OAuth is complete.\n *\n * Connectors receive the authorization in addition to the activating actor.\n * When this runs, `this.userId` is already populated with the installing\n * user's ID.\n *\n * Default implementation does nothing. Override for custom setup.\n *\n * @param context - The activation context\n * @param context.auth - The completed OAuth authorization\n * @param context.actor - The actor who activated the connector\n */\n // @ts-ignore - Connector.activate() has a Connector-specific context type.\n activate(context: { auth?: Authorization; actor?: Actor }): Promise<void> {\n return Promise.resolve();\n }\n}\n\n/** @deprecated Use `Connector` instead. */\nexport { Connector as Source };\n";
8
+ export default "import { type Actor, type ActorId, type Link, type NewLinkWithNotes, type Note, type Thread } from \"./plot\";\nimport type { ScheduleContactStatus } from \"./schedule\";\nimport {\n type AuthProvider,\n type AuthToken,\n type Authorization,\n type Channel,\n type LinkTypeConfig,\n type SyncContext,\n} from \"./tools/integrations\";\nimport { Twist } from \"./twist\";\n\n/**\n * Fields captured in Plot when a user initiates creation of a new external\n * item via a connector's `onCreateLink` hook.\n *\n * Thread-agnostic on purpose — connectors do not receive the Plot thread.\n * The platform attaches the returned `NewLinkWithNotes` to the originating\n * thread once `onCreateLink` resolves.\n */\n/**\n * Result returned from {@link Connector.onNoteCreated} and\n * {@link Connector.onNoteUpdated} to report what the external system now\n * has stored for the note.\n *\n * The runtime hashes `externalContent` and stores it as the note's sync\n * baseline. On the next sync-in, if the incoming content hashes to the\n * same value, the runtime knows the external side hasn't changed and\n * preserves Plot's (possibly formatted) content. When the external side\n * is edited, the hash diverges and the runtime overwrites Plot's content\n * with the new external version.\n *\n * Omitting `externalContent` skips baseline tracking — the next sync-in\n * will overwrite Plot's content (previous behavior). Always provide it\n * when the write-back's return value reflects what the external system\n * actually stored (often lossy plain-text), so the round-trip does not\n * clobber the original Plot markdown.\n *\n * The hash covers only the content string — the runtime intentionally\n * does not include a content-type in the hash, so write-back and sync-in\n * do not have to agree on a content-type label for the same underlying\n * bytes. Return exactly the string your connector's sync-in path will\n * emit as `NewNote.content` for this note on the next re-ingest.\n *\n * For back-compat, `onNoteCreated` may also return a plain string, which\n * is treated as `{ key }` with no baseline.\n */\nexport type NoteWriteBackResult = {\n /**\n * External system identifier assigned to this note. Set as the note's\n * `key` for future upsert matching. Required when the runtime does not\n * already know the key (i.e., from `onNoteCreated`); ignored from\n * `onNoteUpdated` when the key was already established on create.\n */\n key?: string;\n /**\n * The content string as the external system now stores it, post-write.\n * For systems whose write-back returns a representation of what was\n * actually stored (e.g. Google Drive comment `content` after a create),\n * pass that verbatim. For systems that only accept plain text, this\n * will often be a lossy plain-text version of the Plot markdown — that\n * is exactly the point: storing the lossy form as baseline lets the\n * next sync-in recognize it and skip overwriting the richer Plot\n * version.\n *\n * Must exactly match the string your connector's sync-in path emits as\n * `NewNote.content` for this note on re-ingest.\n */\n externalContent?: string;\n};\n\nexport type CreateLinkDraft = {\n /** The channel (account + resource) the new item belongs to. */\n channelId: string;\n /** Link type identifier, matches a `LinkTypeConfig.type`. */\n type: string;\n /** Status the user selected. Matches a `statuses[].status` for `type`. */\n status: string;\n /** Title of the originating Plot thread (post AI title generation). */\n title: string;\n /** Markdown content of the thread's first note, or null if none. */\n noteContent: string | null;\n /**\n * Contacts attached to the originating Plot thread, excluding the\n * creating user. Use these as recipients (email, chat DM members, etc.)\n * when the external item is a message or invite. An empty list means\n * the user did not add anyone to the thread.\n */\n contacts: Actor[];\n};\n\n/**\n * Base class for connectors — twists that sync data from external services.\n *\n * Connectors declare a single OAuth provider and scopes, and implement channel\n * lifecycle methods for discovering and syncing external resources. They save\n * data directly via `integrations.saveLink()` instead of using the Plot tool.\n *\n * @example\n * ```typescript\n * class LinearConnector extends Connector<LinearConnector> {\n * readonly provider = AuthProvider.Linear;\n * readonly scopes = [\"read\", \"write\"];\n * readonly linkTypes = [{\n * type: \"issue\",\n * label: \"Issue\",\n * statuses: [\n * { status: \"open\", label: \"Open\" },\n * { status: \"done\", label: \"Done\" },\n * ],\n * }];\n *\n * build(build: ToolBuilder) {\n * return {\n * integrations: build(Integrations),\n * };\n * }\n *\n * async getChannels(auth: Authorization, token: AuthToken): Promise<Channel[]> {\n * const teams = await this.listTeams(token);\n * return teams.map(t => ({ id: t.id, title: t.name }));\n * }\n *\n * async onChannelEnabled(channel: Channel) {\n * const issues = await this.fetchIssues(channel.id);\n * for (const issue of issues) {\n * await this.tools.integrations.saveLink(issue);\n * }\n * }\n *\n * async onChannelDisabled(channel: Channel) {\n * // Clean up webhooks, sync state, etc.\n * }\n * }\n * ```\n */\nexport abstract class Connector<TSelf> extends Twist<TSelf> {\n /**\n * Static marker to identify Connector subclasses without instanceof checks\n * across worker boundaries.\n */\n static readonly isConnector = true;\n\n // ---- Identity (abstract — every connector must declare) ----\n\n /** The OAuth provider this connector authenticates with. */\n readonly provider?: AuthProvider;\n\n /** OAuth scopes to request for this connector. */\n readonly scopes?: string[];\n\n // ---- Auth model ----\n\n /**\n * When true, one credential is shared across all users in the workspace,\n * entered once by the installer. When false (default), each user provides\n * their own credential.\n *\n * Applies to both OAuth and key-based connectors:\n * - Shared OAuth: e.g. Slack bot token (workspace-level)\n * - Shared key: e.g. Attio workspace API key\n * - Individual OAuth: e.g. Google Calendar (per-user)\n * - Individual key: e.g. Fellow (per-user API key)\n */\n readonly shared?: boolean;\n\n /**\n * The Options field name that contains the authentication key (e.g. \"apiKey\").\n * Must reference a `secure: true` field in the Options schema.\n *\n * When set, this connector uses key-based auth instead of OAuth.\n * For individual connectors (`shared` is false), this field is stored\n * per-user rather than in shared config.\n */\n readonly keyOption?: string;\n\n // ---- Optional metadata ----\n\n /**\n * When true, this connector has a single implicit channel.\n * `getChannels()` must return exactly one Channel.\n * The UI will show channel config inline instead of a channel list.\n */\n readonly singleChannel?: boolean;\n\n /**\n * Registry of link types this connector creates (e.g., issue, event, message).\n * Used for display in the UI (icons, labels, statuses).\n */\n readonly linkTypes?: LinkTypeConfig[];\n\n /**\n * When true, this connector is mentioned by default on replies to threads it created.\n * When false (default), this connector cannot be mentioned at all.\n *\n * Set this to true for connectors with bidirectional sync (e.g., issue trackers,\n * messaging) where user replies should be written back to the external service.\n */\n static readonly handleReplies?: boolean;\n\n // ---- Account identity (abstract — every connector must implement) ----\n\n /**\n * Returns a human-readable name for the connected account.\n * Shown in the connections list and edit modal to identify this connection.\n *\n * For OAuth connectors, this is typically the workspace or organization name\n * (e.g., \"Acme Corp\" for a Linear workspace). For API key connectors, this\n * could be the workspace name from the external service.\n *\n * Override this in your connector to return a meaningful account name.\n *\n * @param auth - The authorization (null for no-provider connectors)\n * @param token - The access token (null for no-provider connectors)\n * @returns Promise resolving to the account display name\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getAccountName(\n auth: Authorization | null,\n token: AuthToken | null\n ): Promise<string | null> {\n return Promise.resolve(null);\n }\n\n // ---- Channel lifecycle (abstract — every connector must implement) ----\n\n /**\n * Returns available channels for the authorized actor.\n * Called after OAuth is complete, during the setup/edit modal.\n *\n * @param auth - The completed authorization with provider and actor info\n * @param token - The access token for making API calls\n * @returns Promise resolving to available channels for the user to select\n */\n abstract getChannels(\n auth: Authorization | null,\n token: AuthToken | null\n ): Promise<Channel[]>;\n\n /**\n * Called when a channel resource is enabled for syncing.\n *\n * The framework dispatches this in three cases:\n * 1. **Initial enable** — user toggled the channel on for the first time.\n * 2. **Auto-enable** — `setChannels` discovered a new channel on a\n * connection with `auto_enable_new_channels` set.\n * 3. **Recovery after re-auth** — the user re-authorized a previously-\n * broken connection. The framework calls `onChannelEnabled` for every\n * channel that was already enabled at the time of re-auth, with\n * `context.recovering = true`. See {@link SyncContext.recovering}.\n *\n * Implementations should be **idempotent and overwrite stored state**:\n * the same channel may receive multiple `onChannelEnabled` calls across\n * its lifetime. Use unconditional `this.set()` writes rather than\n * coalesce/skip-if-present logic so a recovery dispatch wipes stale\n * cursors and state from the prior session.\n *\n * **Sync state tracking is automatic.** The framework stamps the\n * connection as \"syncing\" when it dispatches this method and clears\n * that state when:\n * - the connector calls `tools.integrations.channelSyncCompleted(id)`\n * once the initial backfill is done, OR\n * - this method throws an unhandled exception (auto-cleared so the UI\n * doesn't get stuck in \"syncing\" forever).\n *\n * **IMPORTANT: This method runs inline in the HTTP request handler.**\n * Any long-running work (webhook setup, API calls, sync) MUST be queued\n * as a separate task via `this.runTask()`, not executed inline. Blocking\n * here causes the client to spin waiting for the response.\n *\n * Only lightweight operations should appear directly in this method:\n * `this.set()`, `this.get()`, `this.callback()`, and `this.runTask()`.\n *\n * @example\n * ```typescript\n * async onChannelEnabled(channel: Channel, context?: SyncContext): Promise<void> {\n * // Recovery: drop stale cursors so the next sync re-walks history.\n * if (context?.recovering) {\n * await this.clear(`last_sync_token_${channel.id}`);\n * }\n *\n * await this.set(`sync_state_${channel.id}`, { channelId: channel.id });\n *\n * // Queue sync as a task — do NOT use this.run() or call sync methods inline\n * const syncCallback = await this.callback(this.syncBatch, 1, \"full\", channel.id, true);\n * await this.runTask(syncCallback);\n *\n * // Queue webhook setup as a task — do NOT call setupWebhook() inline\n * const webhookCallback = await this.callback(this.setupWebhook, channel.id);\n * await this.runTask(webhookCallback);\n * }\n * ```\n *\n * @param channel - The channel that was enabled\n * @param context - Optional sync context (plan-based hints, recovery flag)\n */\n abstract onChannelEnabled(channel: Channel, context?: SyncContext): Promise<void>;\n\n /**\n * Called when a channel resource is disabled.\n * Should stop sync, clean up webhooks, and remove state.\n *\n * @param channel - The channel that was disabled\n */\n abstract onChannelDisabled(channel: Channel): Promise<void>;\n\n // ---- Write-back hooks (optional, default no-ops) ----\n\n /**\n * Called when a link created by this connector is updated by the user.\n * Override to write back changes to the external service\n * (e.g., changing issue status in Linear when marked done in Plot).\n *\n * @param link - The updated link\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onLinkUpdated(link: Link): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * Called when a user creates a thread in Plot that should create a new\n * item in this connector's external system.\n *\n * A connector opts in to Plot-initiated creation by declaring a status\n * with `createDefault: true` on the relevant `LinkTypeConfig`. When a\n * user picks \"Create new <type>\" from the Add link modal and the thread\n * is synced, the runtime calls this method with the draft fields.\n *\n * Implementations should create the item in the external service and\n * return a `NewLinkWithNotes` describing the created item. The platform\n * attaches the returned link to the originating thread — do not call\n * `integrations.saveLink` yourself.\n *\n * Returning `null` aborts creation silently (the thread is still saved\n * without a link).\n *\n * @param draft - The fields captured in Plot for the new item.\n * @returns The link to attach, or null to abort creation.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onCreateLink(draft: CreateLinkDraft): Promise<NewLinkWithNotes | null> {\n return Promise.resolve(null);\n }\n\n /**\n * Called when a note is created on a thread owned by this connector.\n * Override to write back comments to the external service\n * (e.g., adding a comment to a Linear issue).\n *\n * Returning a string or {@link NoteWriteBackResult} links the Plot note\n * to its external counterpart. A plain string sets the note's `key`.\n * A `NoteWriteBackResult` additionally sets a sync baseline (via\n * `externalContent`) so the next sync-in can recognize the round-tripped\n * content and preserve Plot's formatted version. See\n * {@link NoteWriteBackResult} for details.\n *\n * @param note - The created note\n * @param thread - The thread the note belongs to (includes thread.meta with connector-specific data)\n * @returns Optional note key or NoteWriteBackResult for external dedup + baseline tracking\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onNoteCreated(note: Note, thread: Thread): Promise<string | NoteWriteBackResult | void> {\n return Promise.resolve();\n }\n\n /**\n * Called when a note on a thread owned by this connector is updated.\n * Override to write back changes to the external service\n * (e.g., syncing reaction tags as emoji reactions, or editing a comment\n * whose content changed in Plot).\n *\n * Return a {@link NoteWriteBackResult} with `externalContent` to update\n * the sync baseline after a successful write-back, so the next sync-in\n * recognizes the external version as already-seen and preserves Plot's\n * content.\n *\n * @param note - The updated note (includes current tags)\n * @param thread - The thread the note belongs to (includes thread.meta with connector-specific data)\n * @returns Optional NoteWriteBackResult for baseline tracking\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onNoteUpdated(note: Note, thread: Thread): Promise<NoteWriteBackResult | void> {\n return Promise.resolve();\n }\n\n /**\n * Called when a user reads or unreads a thread owned by this connector.\n * Override to write back read status to the external service\n * (e.g., marking an email as read in Gmail).\n *\n * @param thread - The thread that was read/unread (includes thread.meta with connector-specific data)\n * @param actor - The user who performed the action\n * @param unread - false when marked as read, true when marked as unread\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onThreadRead(thread: Thread, actor: Actor, unread: boolean): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * Called when a user marks or unmarks a thread as todo.\n * Override to sync todo status to the external service\n * (e.g., starring an email in Gmail when marked as todo).\n *\n * @param thread - The thread (includes thread.meta with connector-specific data)\n * @param actor - The user who changed the todo status\n * @param todo - true when marked as todo, false when done or removed\n * @param options - Additional context\n * @param options.date - The todo date (when todo=true)\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onThreadToDo(thread: Thread, actor: Actor, todo: boolean, options: { date?: Date }): Promise<void> {\n return Promise.resolve();\n }\n\n /**\n * Called when a schedule contact's RSVP status changes on a thread owned by this connector.\n * Override to sync RSVP changes back to the external calendar.\n *\n * @param thread - The thread (includes thread.meta with connector-specific data)\n * @param scheduleId - The schedule ID\n * @param contactId - The contact whose status changed\n * @param status - The new RSVP status ('attend', 'skip', or null)\n * @param actor - The user who changed the status\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onScheduleContactUpdated(thread: Thread, scheduleId: string, contactId: ActorId, status: ScheduleContactStatus | null, actor: Actor): Promise<void> {\n return Promise.resolve();\n }\n\n // ---- Activation ----\n\n /**\n * Called when the connector is activated after OAuth is complete.\n *\n * Connectors receive the authorization in addition to the activating actor.\n * When this runs, `this.userId` is already populated with the installing\n * user's ID.\n *\n * Default implementation does nothing. Override for custom setup.\n *\n * @param context - The activation context\n * @param context.auth - The completed OAuth authorization\n * @param context.actor - The actor who activated the connector\n */\n // @ts-ignore - Connector.activate() has a Connector-specific context type.\n activate(context: { auth?: Authorization; actor?: Actor }): Promise<void> {\n return Promise.resolve();\n }\n}\n\n/** @deprecated Use `Connector` instead. */\nexport { Connector as Source };\n";