@plotday/twister 0.43.0 → 0.45.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 (184) hide show
  1. package/bin/commands/deploy.js +87 -10
  2. package/bin/commands/deploy.js.map +1 -1
  3. package/dist/connector.d.ts +92 -12
  4. package/dist/connector.d.ts.map +1 -1
  5. package/dist/connector.js +73 -4
  6. package/dist/connector.js.map +1 -1
  7. package/dist/docs/assets/hierarchy.js +1 -1
  8. package/dist/docs/assets/navigation.js +1 -1
  9. package/dist/docs/assets/search.js +1 -1
  10. package/dist/docs/classes/index.Connector.html +114 -54
  11. package/dist/docs/classes/index.Imap.html +52 -0
  12. package/dist/docs/classes/index.Options.html +2 -2
  13. package/dist/docs/classes/index.Smtp.html +33 -0
  14. package/dist/docs/classes/tool.ITool.html +1 -1
  15. package/dist/docs/classes/tool.Tool.html +30 -25
  16. package/dist/docs/classes/tools_ai.AI.html +1 -1
  17. package/dist/docs/classes/tools_callbacks.Callbacks.html +1 -1
  18. package/dist/docs/classes/tools_integrations.Integrations.html +11 -10
  19. package/dist/docs/classes/tools_network.Network.html +40 -7
  20. package/dist/docs/classes/tools_plot.Plot.html +72 -23
  21. package/dist/docs/classes/tools_store.Store.html +1 -1
  22. package/dist/docs/classes/tools_tasks.Tasks.html +1 -1
  23. package/dist/docs/classes/tools_twists.Twists.html +1 -1
  24. package/dist/docs/classes/twist.Twist.html +53 -35
  25. package/dist/docs/documents/Built-in_Tools.html +5 -3
  26. package/dist/docs/enums/plot.ActionType.html +9 -7
  27. package/dist/docs/enums/plot.ActorType.html +4 -4
  28. package/dist/docs/enums/plot.ConferencingProvider.html +6 -6
  29. package/dist/docs/enums/tools_integrations.AuthProvider.html +13 -11
  30. package/dist/docs/enums/tools_plot.ContactAccess.html +2 -2
  31. package/dist/docs/enums/tools_plot.LinkAccess.html +5 -0
  32. package/dist/docs/enums/tools_plot.PriorityAccess.html +7 -7
  33. package/dist/docs/enums/tools_plot.ThreadAccess.html +8 -3
  34. package/dist/docs/hierarchy.html +1 -1
  35. package/dist/docs/media/AGENTS.md +11 -7
  36. package/dist/docs/media/MULTI_USER_AUTH.md +14 -11
  37. package/dist/docs/modules/index.html +1 -1
  38. package/dist/docs/modules/plot.html +1 -1
  39. package/dist/docs/modules/tools_integrations.html +1 -1
  40. package/dist/docs/modules/tools_plot.html +1 -1
  41. package/dist/docs/types/index.BooleanDef.html +2 -2
  42. package/dist/docs/types/index.ImapAddress.html +6 -0
  43. package/dist/docs/types/index.ImapConnectOptions.html +12 -0
  44. package/dist/docs/types/index.ImapFetchOptions.html +8 -0
  45. package/dist/docs/types/index.ImapFlagOperation.html +2 -0
  46. package/dist/docs/types/index.ImapMailbox.html +10 -0
  47. package/dist/docs/types/index.ImapMailboxStatus.html +14 -0
  48. package/dist/docs/types/index.ImapMessage.html +28 -0
  49. package/dist/docs/types/index.ImapSearchCriteria.html +18 -0
  50. package/dist/docs/types/index.ImapSession.html +2 -0
  51. package/dist/docs/types/index.NumberDef.html +2 -2
  52. package/dist/docs/types/index.OptionDef.html +1 -1
  53. package/dist/docs/types/index.OptionsSchema.html +1 -1
  54. package/dist/docs/types/index.ResolvedOptions.html +1 -1
  55. package/dist/docs/types/index.SmtpAddress.html +6 -0
  56. package/dist/docs/types/index.SmtpConnectOptions.html +14 -0
  57. package/dist/docs/types/index.SmtpMessage.html +24 -0
  58. package/dist/docs/types/index.SmtpSendResult.html +8 -0
  59. package/dist/docs/types/index.SmtpSession.html +2 -0
  60. package/dist/docs/types/index.TextDef.html +5 -2
  61. package/dist/docs/types/plot.Action.html +6 -2
  62. package/dist/docs/types/plot.Actor.html +5 -5
  63. package/dist/docs/types/plot.Contact.html +9 -0
  64. package/dist/docs/types/plot.ContentType.html +1 -1
  65. package/dist/docs/types/plot.Link.html +21 -18
  66. package/dist/docs/types/plot.LinkUpdate.html +5 -0
  67. package/dist/docs/types/plot.NewActor.html +1 -1
  68. package/dist/docs/types/plot.NewContact.html +3 -17
  69. package/dist/docs/types/plot.NewLink.html +10 -7
  70. package/dist/docs/types/plot.NewLinkWithNotes.html +5 -4
  71. package/dist/docs/types/plot.NewNote.html +13 -3
  72. package/dist/docs/types/plot.NewTags.html +1 -1
  73. package/dist/docs/types/plot.NewThread.html +7 -5
  74. package/dist/docs/types/plot.NewThreadWithNotes.html +1 -1
  75. package/dist/docs/types/plot.Note.html +5 -2
  76. package/dist/docs/types/plot.NoteUpdate.html +4 -3
  77. package/dist/docs/types/plot.PlanOperation.html +10 -0
  78. package/dist/docs/types/plot.PriorityUpdate.html +5 -3
  79. package/dist/docs/types/plot.Tags.html +1 -1
  80. package/dist/docs/types/plot.Thread.html +1 -1
  81. package/dist/docs/types/plot.ThreadAccessLevel.html +7 -0
  82. package/dist/docs/types/plot.ThreadCommon.html +5 -9
  83. package/dist/docs/types/plot.ThreadFilter.html +2 -2
  84. package/dist/docs/types/plot.ThreadMeta.html +1 -1
  85. package/dist/docs/types/plot.ThreadType.html +3 -3
  86. package/dist/docs/types/plot.ThreadUpdate.html +1 -1
  87. package/dist/docs/types/plot.ThreadWithNotes.html +1 -1
  88. package/dist/docs/types/tools_integrations.ArchiveLinkFilter.html +5 -5
  89. package/dist/docs/types/tools_integrations.AuthToken.html +4 -4
  90. package/dist/docs/types/tools_integrations.Authorization.html +4 -4
  91. package/dist/docs/types/tools_integrations.Channel.html +4 -4
  92. package/dist/docs/types/tools_integrations.LinkTypeConfig.html +10 -3
  93. package/dist/docs/types/tools_integrations.SyncContext.html +10 -0
  94. package/dist/docs/types/tools_plot.LinkFilter.html +5 -5
  95. package/dist/docs/types/tools_plot.LinkSearchResult.html +1 -1
  96. package/dist/docs/types/tools_plot.NoteIntentHandler.html +4 -4
  97. package/dist/docs/types/tools_plot.NoteSearchResult.html +1 -1
  98. package/dist/docs/types/tools_plot.SearchOptions.html +6 -4
  99. package/dist/docs/types/tools_plot.SearchResult.html +1 -1
  100. package/dist/docs/variables/tools_plot.SEARCH_DEFAULT_LIMIT.html +1 -1
  101. package/dist/docs/variables/tools_plot.SEARCH_MAX_LIMIT.html +1 -1
  102. package/dist/llm-docs/connector.d.ts +1 -1
  103. package/dist/llm-docs/connector.d.ts.map +1 -1
  104. package/dist/llm-docs/connector.js +1 -1
  105. package/dist/llm-docs/connector.js.map +1 -1
  106. package/dist/llm-docs/index.d.ts.map +1 -1
  107. package/dist/llm-docs/index.js +4 -0
  108. package/dist/llm-docs/index.js.map +1 -1
  109. package/dist/llm-docs/options.d.ts +1 -1
  110. package/dist/llm-docs/options.d.ts.map +1 -1
  111. package/dist/llm-docs/options.js +1 -1
  112. package/dist/llm-docs/options.js.map +1 -1
  113. package/dist/llm-docs/plot.d.ts +1 -1
  114. package/dist/llm-docs/plot.d.ts.map +1 -1
  115. package/dist/llm-docs/plot.js +1 -1
  116. package/dist/llm-docs/plot.js.map +1 -1
  117. package/dist/llm-docs/tool.d.ts +1 -1
  118. package/dist/llm-docs/tool.d.ts.map +1 -1
  119. package/dist/llm-docs/tool.js +1 -1
  120. package/dist/llm-docs/tool.js.map +1 -1
  121. package/dist/llm-docs/tools/imap.d.ts +9 -0
  122. package/dist/llm-docs/tools/imap.d.ts.map +1 -0
  123. package/dist/llm-docs/tools/imap.js +8 -0
  124. package/dist/llm-docs/tools/imap.js.map +1 -0
  125. package/dist/llm-docs/tools/integrations.d.ts +1 -1
  126. package/dist/llm-docs/tools/integrations.d.ts.map +1 -1
  127. package/dist/llm-docs/tools/integrations.js +1 -1
  128. package/dist/llm-docs/tools/integrations.js.map +1 -1
  129. package/dist/llm-docs/tools/network.d.ts +1 -1
  130. package/dist/llm-docs/tools/network.d.ts.map +1 -1
  131. package/dist/llm-docs/tools/network.js +1 -1
  132. package/dist/llm-docs/tools/network.js.map +1 -1
  133. package/dist/llm-docs/tools/plot.d.ts +1 -1
  134. package/dist/llm-docs/tools/plot.d.ts.map +1 -1
  135. package/dist/llm-docs/tools/plot.js +1 -1
  136. package/dist/llm-docs/tools/plot.js.map +1 -1
  137. package/dist/llm-docs/tools/smtp.d.ts +9 -0
  138. package/dist/llm-docs/tools/smtp.d.ts.map +1 -0
  139. package/dist/llm-docs/tools/smtp.js +8 -0
  140. package/dist/llm-docs/tools/smtp.js.map +1 -0
  141. package/dist/llm-docs/twist.d.ts +1 -1
  142. package/dist/llm-docs/twist.d.ts.map +1 -1
  143. package/dist/llm-docs/twist.js +1 -1
  144. package/dist/llm-docs/twist.js.map +1 -1
  145. package/dist/options.d.ts +3 -0
  146. package/dist/options.d.ts.map +1 -1
  147. package/dist/options.js.map +1 -1
  148. package/dist/plot.d.ts +198 -76
  149. package/dist/plot.d.ts.map +1 -1
  150. package/dist/plot.js +2 -0
  151. package/dist/plot.js.map +1 -1
  152. package/dist/tool.d.ts +13 -6
  153. package/dist/tool.d.ts.map +1 -1
  154. package/dist/tool.js +12 -5
  155. package/dist/tool.js.map +1 -1
  156. package/dist/tools/imap.d.ts +235 -0
  157. package/dist/tools/imap.d.ts.map +1 -0
  158. package/dist/tools/imap.js +61 -0
  159. package/dist/tools/imap.js.map +1 -0
  160. package/dist/tools/index.d.ts +2 -0
  161. package/dist/tools/index.d.ts.map +1 -1
  162. package/dist/tools/index.js +2 -0
  163. package/dist/tools/index.js.map +1 -1
  164. package/dist/tools/integrations.d.ts +35 -5
  165. package/dist/tools/integrations.d.ts.map +1 -1
  166. package/dist/tools/integrations.js +2 -0
  167. package/dist/tools/integrations.js.map +1 -1
  168. package/dist/tools/network.d.ts +53 -16
  169. package/dist/tools/network.d.ts.map +1 -1
  170. package/dist/tools/network.js.map +1 -1
  171. package/dist/tools/plot.d.ts +124 -11
  172. package/dist/tools/plot.d.ts.map +1 -1
  173. package/dist/tools/plot.js +20 -6
  174. package/dist/tools/plot.js.map +1 -1
  175. package/dist/tools/smtp.d.ts +155 -0
  176. package/dist/tools/smtp.d.ts.map +1 -0
  177. package/dist/tools/smtp.js +62 -0
  178. package/dist/tools/smtp.js.map +1 -0
  179. package/dist/twist.d.ts +37 -15
  180. package/dist/twist.d.ts.map +1 -1
  181. package/dist/twist.js +35 -13
  182. package/dist/twist.js.map +1 -1
  183. package/package.json +21 -1
  184. package/dist/docs/types/plot.PickPriorityConfig.html +0 -20
package/dist/plot.d.ts CHANGED
@@ -150,12 +150,20 @@ export type NewPriority = Pick<Priority, "title"> & Partial<Omit<Priority, "id"
150
150
  /**
151
151
  * Type for updating existing priorities.
152
152
  * Must provide either id or key to identify the priority to update.
153
+ * Set `parent` to move the priority under a new parent (requires PriorityAccess.Full).
153
154
  */
154
155
  export type PriorityUpdate = ({
155
156
  id: Uuid;
156
157
  } | {
157
158
  key: string;
158
- }) & Partial<Pick<Priority, "title" | "archived">>;
159
+ }) & Partial<Pick<Priority, "title" | "archived">> & {
160
+ /** Move the priority under a new parent. Requires PriorityAccess.Full. */
161
+ parent?: {
162
+ id: Uuid;
163
+ } | {
164
+ key: string;
165
+ };
166
+ };
159
167
  /**
160
168
  * Enumeration of supported action types.
161
169
  *
@@ -174,7 +182,9 @@ export declare enum ActionType {
174
182
  /** File attachment links stored in R2 */
175
183
  file = "file",
176
184
  /** Thread reference links for navigating to related threads */
177
- thread = "thread"
185
+ thread = "thread",
186
+ /** Structured plan of operations for user approval */
187
+ plan = "plan"
178
188
  }
179
189
  /**
180
190
  * Video conferencing providers for conferencing links.
@@ -285,6 +295,15 @@ export type Action = {
285
295
  type: ActionType.thread;
286
296
  /** UUID of the referenced thread */
287
297
  threadId: Uuid;
298
+ } | {
299
+ /** Structured plan of operations for user approval */
300
+ type: ActionType.plan;
301
+ /** Human-readable summary of the plan */
302
+ title: string;
303
+ /** Operations to execute on approval */
304
+ operations: PlanOperation[];
305
+ /** Callback invoked with (action, approved: boolean) */
306
+ callback: Callback;
288
307
  };
289
308
  /**
290
309
  * Represents metadata about a thread, typically from an external system.
@@ -326,10 +345,10 @@ export type ThreadMeta = {
326
345
  /**
327
346
  * Thread sub-type that determines the thread's icon and category.
328
347
  * Available types depend on whether the priority is shared:
329
- * - Private priorities: "notes" (default), "idea", "goal", "decision"
348
+ * - Private priorities: "action" (default for tasks), "notes" (default), "idea", "goal", "decision"
330
349
  * - Shared priorities: all above plus "discussion" (default), "announcement", "ask"
331
350
  */
332
- export type ThreadType = "notes" | "idea" | "goal" | "decision" | "discussion" | "announcement" | "ask";
351
+ export type ThreadType = "action" | "notes" | "idea" | "goal" | "decision" | "discussion" | "announcement" | "ask";
333
352
  /**
334
353
  * Tags on an item, along with the actors who added each tag.
335
354
  */
@@ -342,6 +361,13 @@ export type Tags = {
342
361
  export type NewTags = {
343
362
  [K in Tag]?: NewActor[];
344
363
  };
364
+ /**
365
+ * Thread access level determining visibility.
366
+ * - "public": Visible to all users with priority access
367
+ * - "members": Visible to priority members (default for shared priorities)
368
+ * - "private": Visible only to creator and contacts listed in accessContacts
369
+ */
370
+ export type ThreadAccessLevel = "public" | "members" | "private";
345
371
  /**
346
372
  * Common fields shared by both Thread and Note entities.
347
373
  */
@@ -356,14 +382,10 @@ export type ThreadCommon = {
356
382
  * to the current time, which is almost never correct for synced data.
357
383
  */
358
384
  created: Date;
359
- /** Whether this thread is private (only visible to creator) */
360
- private: boolean;
361
385
  /** Whether this thread has been archived */
362
386
  archived: boolean;
363
387
  /** Tags attached to this thread. Maps tag ID to array of actor IDs who added that tag. */
364
388
  tags: Tags;
365
- /** Array of actor IDs (users, contacts, or twists) mentioned in this thread via @-mentions */
366
- mentions: ActorId[];
367
389
  };
368
390
  /**
369
391
  * Fields on a Thread entity.
@@ -376,6 +398,10 @@ type ThreadFields = ThreadCommon & {
376
398
  priority: Priority;
377
399
  /** The thread's sub-type/category. Determines the displayed icon. */
378
400
  type: ThreadType | null;
401
+ /** Thread access level: "public", "members", or "private" */
402
+ access: ThreadAccessLevel;
403
+ /** Contacts who can see a private thread (empty array for creator-only). Only meaningful when access is "private". */
404
+ accessContacts: Contact[];
379
405
  /** The schedule associated with this thread, if any */
380
406
  schedule?: Schedule;
381
407
  /** Source-specific metadata from the thread's link, populated on callbacks */
@@ -388,38 +414,6 @@ export type ThreadWithNotes = Thread & {
388
414
  export type NewThreadWithNotes = NewThread & {
389
415
  notes: Omit<NewNote, "thread">[];
390
416
  };
391
- /**
392
- * Configuration for automatic priority selection based on thread similarity.
393
- *
394
- * Maps thread fields to scoring weights or required exact matches:
395
- * - Number value: Maximum score for similarity matching on this field
396
- * - `true` value: Required exact match - threads must match exactly or be excluded
397
- *
398
- * Scoring rules:
399
- * - content: Uses vector similarity on thread embedding (cosine similarity)
400
- * - mentions: Percentage of existing thread's mentions that appear in new thread
401
- * - meta.field: Exact match on top-level meta fields (e.g., "meta.sourceId")
402
- *
403
- * When content is `true`, applies a strong similarity threshold to ensure only close matches.
404
- * Default (when neither priority nor pickPriority specified): `{content: true}`
405
- *
406
- * @example
407
- * ```typescript
408
- * // Require exact content match with strong similarity
409
- * pickPriority: { content: true }
410
- *
411
- * // Score based on content (max 100 points) and mentions
412
- * pickPriority: { content: 100, mentions: true }
413
- *
414
- * // Match on meta and score content
415
- * pickPriority: { "meta.projectId": true, content: 50 }
416
- * ```
417
- */
418
- export type PickPriorityConfig = {
419
- content?: number | true;
420
- mentions?: number | true;
421
- [key: `meta.${string}`]: number | true;
422
- };
423
417
  /**
424
418
  * Type for creating new threads.
425
419
  *
@@ -432,16 +426,13 @@ export type PickPriorityConfig = {
432
426
  * };
433
427
  * ```
434
428
  */
435
- export type NewThread = Partial<Omit<ThreadFields, "priority" | "tags" | "mentions" | "id">> & ({
429
+ export type NewThread = Partial<Omit<ThreadFields, "priority" | "tags" | "id" | "accessContacts">> & ({
436
430
  /** Unique identifier for the thread, generated by Uuid.Generate(). */
437
431
  id: Uuid;
438
- } | {}) & ({
439
- /** Explicit priority (required when specified) - disables automatic priority matching */
440
- priority: Pick<Priority, "id">;
441
- } | {
442
- /** Configuration for automatic priority selection based on similarity */
443
- pickPriority?: PickPriorityConfig;
444
- }) & {
432
+ } | {}) & {
433
+ /** Explicit priority - disables automatic priority matching. When omitted, the server classifies the thread using the user's priority rules. */
434
+ priority?: Pick<Priority, "id">;
435
+ } & {
445
436
  /**
446
437
  * All tags to set on the new thread.
447
438
  */
@@ -451,6 +442,12 @@ export type NewThread = Partial<Omit<ThreadFields, "priority" | "tags" | "mentio
451
442
  * If omitted, defaults to "notes" (private) or "discussion" (shared).
452
443
  */
453
444
  type?: ThreadType;
445
+ /**
446
+ * Contacts who can see a private thread.
447
+ * Pass email-based NewContact objects; they are resolved to contact IDs by the API.
448
+ * If omitted for a private thread, defaults to the connection owner.
449
+ */
450
+ accessContacts?: NewContact[];
454
451
  /**
455
452
  * Whether the thread should be marked as unread for users.
456
453
  * - undefined/omitted (default): Thread is unread for users, except auto-marked
@@ -489,7 +486,10 @@ export type ThreadFilter = {
489
486
  * Fields supported by bulk updates via `match`. Only simple scalar fields
490
487
  * that can be applied uniformly across many threads are included.
491
488
  */
492
- type ThreadBulkUpdateFields = Partial<Pick<ThreadFields, "title" | "private" | "archived">>;
489
+ type ThreadBulkUpdateFields = Partial<Pick<ThreadFields, "title" | "access" | "archived">> & {
490
+ /** Contacts who can see a private thread. Pass NewContact objects (email-based); resolved by the API. */
491
+ accessContacts?: NewContact[];
492
+ };
493
493
  /**
494
494
  * Fields supported by single-thread updates via `id` or `source`.
495
495
  * Includes all bulk fields plus tags and preview.
@@ -521,6 +521,11 @@ type ThreadSingleUpdateFields = ThreadBulkUpdateFields & {
521
521
  * This field is write-only and won't be returned when reading threads.
522
522
  */
523
523
  preview?: string | null;
524
+ /**
525
+ * Move the thread to a different priority. Requires ThreadAccess.Full.
526
+ * The target priority must be owned by the twist's user.
527
+ */
528
+ priority?: Pick<Priority, "id">;
524
529
  };
525
530
  export type ThreadUpdate = (({
526
531
  id: Uuid;
@@ -568,6 +573,13 @@ export type Note = ThreadCommon & {
568
573
  reNote: {
569
574
  id: Uuid;
570
575
  } | null;
576
+ /**
577
+ * Contacts who can see this note, or null if the note inherits thread visibility.
578
+ * When set (even to []), the note is private to the listed contacts plus the creator.
579
+ */
580
+ accessContacts: ActorId[] | null;
581
+ /** Priority twist IDs (twists/connectors) mentioned for dispatch routing. Does not include user contacts. */
582
+ mentions: ActorId[];
571
583
  };
572
584
  /**
573
585
  * Type for creating new notes.
@@ -578,7 +590,7 @@ export type Note = ThreadCommon & {
578
590
  * - key: Provide an external identifier for upsert within the thread
579
591
  * - neither: A new note with auto-generated UUID will be created
580
592
  */
581
- export type NewNote = Partial<Omit<Note, "author" | "thread" | "tags" | "mentions" | "id" | "key" | "reNote">> & ({
593
+ export type NewNote = Partial<Omit<Note, "author" | "thread" | "tags" | "mentions" | "accessContacts" | "id" | "key" | "reNote">> & ({
582
594
  id: Uuid;
583
595
  } | {
584
596
  key: string;
@@ -604,7 +616,16 @@ export type NewNote = Partial<Omit<Note, "author" | "thread" | "tags" | "mention
604
616
  */
605
617
  tags?: NewTags;
606
618
  /**
607
- * Change the mentions on the note.
619
+ * Contacts who can see this note, or null/undefined to inherit thread visibility.
620
+ * Accepts resolved ActorId UUIDs or email-based NewContact objects (resolved server-side).
621
+ * Include all participants who should see the note (sender + recipients).
622
+ * The note author is NOT implicitly included — add them explicitly.
623
+ * When set (even to []), the note is private to the listed contacts plus the creator.
624
+ */
625
+ accessContacts?: (ActorId | NewContact)[] | null;
626
+ /**
627
+ * Twist/connector IDs to mention for dispatch routing.
628
+ * Does not include user contacts — use accessContacts for visibility.
608
629
  */
609
630
  mentions?: NewActor[];
610
631
  /**
@@ -618,6 +639,13 @@ export type NewNote = Partial<Omit<Note, "author" | "thread" | "tags" | "mention
618
639
  * Use false for initial sync to avoid marking historical items as unread.
619
640
  */
620
641
  unread?: boolean;
642
+ /**
643
+ * When true, the server will use AI to detect tasks in this note's content
644
+ * and create separate Plot-authored reply notes for each detected task.
645
+ * Use for messaging connectors (email, chat) where tasks are implicit
646
+ * in conversation rather than explicitly structured.
647
+ */
648
+ checkForTasks?: boolean;
621
649
  /**
622
650
  * Reference to a parent note this note is a reply to.
623
651
  * - `{ id }`: reply by UUID
@@ -640,7 +668,7 @@ export type NoteUpdate = ({
640
668
  key?: string;
641
669
  } | {
642
670
  key: string;
643
- }) & Partial<Pick<Note, "private" | "archived" | "content" | "actions" | "reNote">> & {
671
+ }) & Partial<Pick<Note, "accessContacts" | "archived" | "content" | "actions" | "reNote">> & {
644
672
  /**
645
673
  * Format of the note content. Determines how the note is processed:
646
674
  * - 'text': Plain text that will be converted to markdown (auto-links URLs, preserves line breaks)
@@ -660,7 +688,8 @@ export type NoteUpdate = ({
660
688
  */
661
689
  twistTags?: Partial<Record<Tag, boolean>>;
662
690
  /**
663
- * Change the mentions on the note.
691
+ * Twist/connector IDs to mention for dispatch routing.
692
+ * Does not include user contacts — use accessContacts for visibility.
664
693
  */
665
694
  mentions?: NewActor[];
666
695
  };
@@ -700,6 +729,18 @@ export type Actor = {
700
729
  */
701
730
  name?: string | null;
702
731
  };
732
+ /**
733
+ * A resolved contact with identity info. Used for access control lists
734
+ * where only human contacts (not twists) are relevant.
735
+ */
736
+ export type Contact = {
737
+ /** Unique identifier for the contact */
738
+ id: ActorId;
739
+ /** Email address, or null if not set */
740
+ email: string | null;
741
+ /** Display name, or null if not set */
742
+ name: string | null;
743
+ };
703
744
  /**
704
745
  * An existing or new contact.
705
746
  */
@@ -736,14 +777,10 @@ export declare enum ActorType {
736
777
  * };
737
778
  * ```
738
779
  */
739
- export type NewContact = {
740
- /**
741
- * Email address of the contact.
742
- * Either email or source must be provided for contact resolution.
743
- */
744
- email?: string;
745
- /** Optional display name for the contact */
746
- name?: string;
780
+ /**
781
+ * Common fields shared by all NewContact variants.
782
+ */
783
+ type NewContactBase = {
747
784
  /** Optional avatar image URL for the contact */
748
785
  avatar?: string;
749
786
  /**
@@ -755,6 +792,17 @@ export type NewContact = {
755
792
  accountId: string;
756
793
  };
757
794
  };
795
+ /**
796
+ * At least one of `email` or `name` must be provided so the contact can be
797
+ * identified in the UI. Contacts with neither would display as "Unknown".
798
+ */
799
+ export type NewContact = NewContactBase & ({
800
+ email: string;
801
+ name?: string;
802
+ } | {
803
+ email?: string;
804
+ name: string;
805
+ });
758
806
  export type ContentType = "text" | "markdown" | "html";
759
807
  /**
760
808
  * Represents an external entity linked to a thread.
@@ -767,7 +815,6 @@ export type ContentType = "text" | "markdown" | "html";
767
815
  * ```typescript
768
816
  * // A link representing a Linear issue
769
817
  * const link: Link = {
770
- * id: "..." as Uuid,
771
818
  * threadId: "..." as Uuid,
772
819
  * source: "linear:issue:549dd8bd-2bc9-43d1-95d5-4b4af0c5af1b",
773
820
  * created: new Date(),
@@ -782,8 +829,6 @@ export type ContentType = "text" | "markdown" | "html";
782
829
  * ```
783
830
  */
784
831
  export type Link = {
785
- /** Unique identifier for the link */
786
- id: Uuid;
787
832
  /** The thread this link belongs to */
788
833
  threadId: Uuid;
789
834
  /** External source identifier for dedup/upsert */
@@ -810,6 +855,13 @@ export type Link = {
810
855
  sourceUrl: string | null;
811
856
  /** Channel ID that produced this link (matches source_channel.channel_id) */
812
857
  channelId: string | null;
858
+ /**
859
+ * Cross-connector thread bundling key.
860
+ * When set, this link shares a thread with any link whose `source` matches
861
+ * this value (or whose `relatedSource` matches this link's `source`).
862
+ * Works regardless of creation order.
863
+ */
864
+ relatedSource: string | null;
813
865
  };
814
866
  /**
815
867
  * Type for creating new links.
@@ -818,20 +870,28 @@ export type Link = {
818
870
  * Requires a source identifier for dedup/upsert.
819
871
  */
820
872
  export type NewLink = ({
821
- /** Unique identifier for the link, generated by Uuid.Generate() */
822
- id: Uuid;
823
- } | {
824
873
  /**
825
874
  * Canonical ID for the item in an external system.
826
875
  * When set, uniquely identifies the link within a priority tree. This performs
827
876
  * an upsert.
828
877
  */
829
878
  source: string;
830
- } | {}) & Partial<Omit<Link, "id" | "source" | "author" | "assignee" | "threadId">> & {
879
+ } | {}) & Partial<Omit<Link, "source" | "author" | "assignee" | "threadId">> & {
831
880
  /** The person that created the item. By default, it will be the twist itself. */
832
881
  author?: NewActor;
833
882
  /** The person assigned to the item. */
834
883
  assignee?: NewActor | null;
884
+ /**
885
+ * Thread access level: "public", "members" (default), or "private".
886
+ * When "private", thread visibility is limited to the creator and contacts in accessContacts.
887
+ */
888
+ access?: ThreadAccessLevel;
889
+ /**
890
+ * Contacts who can see a private thread.
891
+ * Pass email-based NewContact objects; they are resolved to contact IDs by the API.
892
+ * If omitted for a private thread, defaults to the connection owner.
893
+ */
894
+ accessContacts?: NewContact[];
835
895
  /**
836
896
  * Whether the thread should be marked as unread for users.
837
897
  * - undefined/omitted (default): Thread is unread for users, except auto-marked
@@ -846,14 +906,10 @@ export type NewLink = ({
846
906
  * - undefined (default): Preserve current archive state
847
907
  */
848
908
  archived?: boolean;
849
- /**
850
- * Configuration for automatic priority selection based on similarity.
851
- * Only used when the link creates a new thread.
852
- */
853
- pickPriority?: PickPriorityConfig;
854
909
  /**
855
910
  * Explicit priority (disables automatic priority matching).
856
- * Only used when the link creates a new thread.
911
+ * Only used when the link creates a new thread. When omitted, the
912
+ * server classifies the thread using the user's priority rules.
857
913
  */
858
914
  priority?: Pick<Priority, "id">;
859
915
  };
@@ -866,9 +922,10 @@ export type NewLinkWithNotes = NewLink & {
866
922
  * Title for the link and its thread container.
867
923
  * Must be the real entity title (e.g. issue title, message subject),
868
924
  * never a placeholder or ID. This value overwrites the existing title on upsert.
869
- * If the title is not available in the webhook payload, fetch it from the API.
925
+ * Omit to preserve the existing title (e.g. for cancelled events where the
926
+ * title may not be available in the webhook payload).
870
927
  */
871
- title: string;
928
+ title?: string;
872
929
  /** Notes to attach to the thread */
873
930
  notes?: Omit<NewNote, "thread">[];
874
931
  /** Schedules to create for the link */
@@ -876,4 +933,69 @@ export type NewLinkWithNotes = NewLink & {
876
933
  /** Schedule occurrence overrides */
877
934
  scheduleOccurrences?: NewScheduleOccurrence[];
878
935
  };
936
+ /**
937
+ * Type for updating existing links.
938
+ *
939
+ * Set `threadId` to move the link to a different thread.
940
+ * Requires LinkAccess.Full.
941
+ */
942
+ export type LinkUpdate = {
943
+ id: Uuid;
944
+ } & {
945
+ /** Move the link to a different thread owned by the twist's user. */
946
+ threadId?: Uuid;
947
+ };
948
+ /**
949
+ * A single operation within a plan submitted for user approval.
950
+ *
951
+ * Operations include display metadata (titles) so the app can render
952
+ * a human-readable summary without additional lookups.
953
+ */
954
+ export type PlanOperation = {
955
+ type: "updateThread";
956
+ threadId: Uuid;
957
+ /** Current thread title for display */
958
+ threadTitle: string;
959
+ changes: Partial<Pick<ThreadFields, "archived" | "title" | "type">> & {
960
+ /** Move to this priority */
961
+ priority?: {
962
+ id: Uuid;
963
+ title: string;
964
+ };
965
+ };
966
+ } | {
967
+ type: "updateLink";
968
+ linkId: Uuid;
969
+ /** Current link title for display */
970
+ linkTitle: string;
971
+ changes: {
972
+ /** Move to this thread */
973
+ threadId?: Uuid;
974
+ threadTitle?: string;
975
+ };
976
+ } | {
977
+ type: "createThread";
978
+ title: string;
979
+ priorityId: Uuid;
980
+ /** Priority title for display */
981
+ priorityTitle: string;
982
+ } | {
983
+ type: "createNote";
984
+ threadId: Uuid;
985
+ /** Thread title for display */
986
+ threadTitle: string;
987
+ content: string;
988
+ } | {
989
+ type: "updatePriority";
990
+ priorityId: Uuid;
991
+ /** Current priority title for display */
992
+ priorityTitle: string;
993
+ changes: Partial<Pick<Priority, "title" | "archived">> & {
994
+ /** Move under this parent */
995
+ parent?: {
996
+ id: Uuid;
997
+ title: string;
998
+ };
999
+ };
1000
+ };
879
1001
  //# sourceMappingURL=plot.d.ts.map
@@ -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,M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C;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KACxC,CAAC;CACH,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,IAAI,CAAC;IACb,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,0BAA0B;QAC1B,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,IAAI,CAAC;IACjB,iCAAiC;IACjC,aAAa,EAAE,MAAM,CAAC;CACvB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,IAAI,CAAC;IACf,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,EAAE,IAAI,CAAC;IACjB,yCAAyC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC,GAAG;QACvD,6BAA6B;QAC7B,MAAM,CAAC,EAAE;YAAE,EAAE,EAAE,IAAI,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KACtC,CAAC;CACH,CAAC"}
package/dist/plot.js CHANGED
@@ -42,6 +42,8 @@ export var ActionType;
42
42
  ActionType["file"] = "file";
43
43
  /** Thread reference links for navigating to related threads */
44
44
  ActionType["thread"] = "thread";
45
+ /** Structured plan of operations for user approval */
46
+ ActionType["plan"] = "plan";
45
47
  })(ActionType || (ActionType = {}));
46
48
  /**
47
49
  * Video conferencing providers for conferencing links.
package/dist/plot.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"plot.js","sourceRoot":"","sources":["../src/plot.ts"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W,oBAAoB,KAApB,oBAAoB,QAW/B;AAgmBD;;;;;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"}
package/dist/tool.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type Actor, type Priority } from "./plot";
1
+ import { type Actor } from "./plot";
2
2
  import type { Callback } from "./tools/callbacks";
3
3
  import type { InferOptions, InferTools, Serializable, ToolBuilder, ToolShed } from "./utils/types";
4
4
  export type { ToolBuilder };
@@ -93,7 +93,16 @@ export declare abstract class Tool<TSelf> implements ITool {
93
93
  */
94
94
  protected deleteAllCallbacks(): Promise<void>;
95
95
  /**
96
- * Executes a callback by its token.
96
+ * Executes a callback by its token inline in the current execution.
97
+ *
98
+ * **Use `this.runTask()` instead for batch continuations and long-running work.**
99
+ * `this.run()` executes inline, sharing the current request count (~1000 limit)
100
+ * and blocking the HTTP response. This causes timeouts when used in lifecycle
101
+ * methods like `onChannelEnabled` or `syncBatch` continuations.
102
+ *
103
+ * `this.run()` is appropriate when you need the callback's **return value** —
104
+ * e.g., running a parent callback token that returns data. For fire-and-forget
105
+ * work, always prefer `this.runTask()`.
97
106
  *
98
107
  * @param token - The callback token to execute
99
108
  * @param args - Optional arguments to pass to the callback
@@ -223,11 +232,10 @@ export declare abstract class Tool<TSelf> implements ITool {
223
232
  * being called first, bubbling up to the top-level tools before the twist's
224
233
  * activate method is called.
225
234
  *
226
- * @param priority - The priority context containing the priority ID
227
235
  * @param context - Optional context containing the actor who triggered activation
228
236
  * @returns Promise that resolves when pre-activation is complete
229
237
  */
230
- preActivate(priority: Priority, context?: {
238
+ preActivate(context?: {
231
239
  actor: Actor;
232
240
  }): Promise<void>;
233
241
  /**
@@ -236,11 +244,10 @@ export declare abstract class Tool<TSelf> implements ITool {
236
244
  * This method is called in reverse order, with top-level tools being called
237
245
  * first, then cascading down to the deepest dependencies.
238
246
  *
239
- * @param priority - The priority context containing the priority ID
240
247
  * @param context - Optional context containing the actor who triggered activation
241
248
  * @returns Promise that resolves when post-activation is complete
242
249
  */
243
- postActivate(priority: Priority, context?: {
250
+ postActivate(context?: {
244
251
  actor: Actor;
245
252
  }): Promise<void>;
246
253
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,QAAQ,EACd,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,QAAQ,EACT,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B;;;GAGG;AACH,8BAAsB,KAAK;CAAG;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,8BAAsB,IAAI,CAAC,KAAK,CAAE,YAAW,KAAK;IAE9C,SAAS,CAAC,EAAE,EAAE,MAAM;IACpB,SAAS,CAAC,OAAO,EAAE,YAAY,CAAC,KAAK,CAAC;IACtC,OAAO,CAAC,QAAQ;gBAFN,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,YAAY,CAAC,KAAK,CAAC,EAC9B,QAAQ,EAAE,QAAQ;IAG5B;;;OAGG;IACH,SAAS,KAAK,KAAK,sBAElB;IAED;;;;;;;;;;;;;;;;OAgBG;IAEH,KAAK,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAIzD;;;;;;;;;;;;;OAaG;cACa,QAAQ,CACtB,KAAK,SAAS,YAAY,EAAE,EAC5B,EAAE,SAAS,CAAC,GAAG,IAAI,EAAE,KA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;IAIzC;;;;;;;;;;;;;;;;;;;;;OAqBG;cACa,OAAO,CACrB,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,IAAI,CAAA;KAAE,GACzB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIzB;;;;;OAKG;cACa,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxD;;;;OAIG;cACa,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/C;;;;;;;;;OASG;IAEH,WAAW,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAItD;;;;;;;;OAQG;IAEH,YAAY,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvD;;;;;;;;OAQG;IACH,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;;;;;;OAOG;IACH,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B;;;;;;;;OAQG;IACH,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B;;;;;;;OAOG;IACH,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B;;;;OAIG;IACG,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CAGpC"}
package/dist/tool.js CHANGED
@@ -104,7 +104,16 @@ export class Tool {
104
104
  return this.tools.callbacks.deleteAll();
105
105
  }
106
106
  /**
107
- * Executes a callback by its token.
107
+ * Executes a callback by its token inline in the current execution.
108
+ *
109
+ * **Use `this.runTask()` instead for batch continuations and long-running work.**
110
+ * `this.run()` executes inline, sharing the current request count (~1000 limit)
111
+ * and blocking the HTTP response. This causes timeouts when used in lifecycle
112
+ * methods like `onChannelEnabled` or `syncBatch` continuations.
113
+ *
114
+ * `this.run()` is appropriate when you need the callback's **return value** —
115
+ * e.g., running a parent callback token that returns data. For fire-and-forget
116
+ * work, always prefer `this.runTask()`.
108
117
  *
109
118
  * @param token - The callback token to execute
110
119
  * @param args - Optional arguments to pass to the callback
@@ -250,12 +259,11 @@ export class Tool {
250
259
  * being called first, bubbling up to the top-level tools before the twist's
251
260
  * activate method is called.
252
261
  *
253
- * @param priority - The priority context containing the priority ID
254
262
  * @param context - Optional context containing the actor who triggered activation
255
263
  * @returns Promise that resolves when pre-activation is complete
256
264
  */
257
265
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
258
- preActivate(priority, context) {
266
+ preActivate(context) {
259
267
  return Promise.resolve();
260
268
  }
261
269
  /**
@@ -264,12 +272,11 @@ export class Tool {
264
272
  * This method is called in reverse order, with top-level tools being called
265
273
  * first, then cascading down to the deepest dependencies.
266
274
  *
267
- * @param priority - The priority context containing the priority ID
268
275
  * @param context - Optional context containing the actor who triggered activation
269
276
  * @returns Promise that resolves when post-activation is complete
270
277
  */
271
278
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
272
- postActivate(priority, context) {
279
+ postActivate(context) {
273
280
  return Promise.resolve();
274
281
  }
275
282
  /**