@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
@@ -1,5 +1,6 @@
1
- import { type Thread, type ThreadUpdate, type Actor, type ActorId, ITool, type Link, type NewThread, type NewThreadWithNotes, type NewNote, type NewPriority, type Note, type NoteUpdate, type Priority, type PriorityUpdate, Uuid } from "..";
1
+ import { type Action, type Thread, type ThreadUpdate, type Actor, type ActorId, ITool, type Link, type LinkUpdate, type NewThread, type NewThreadWithNotes, type NewNote, type NewPriority, type Note, type NoteUpdate, type PlanOperation, type Priority, type PriorityUpdate, Uuid } from "..";
2
2
  import { type Schedule, type NewSchedule } from "../schedule";
3
+ import type { Callback } from "./callbacks";
3
4
  export declare enum ThreadAccess {
4
5
  /**
5
6
  * Create new Note on a Thread where the twist was mentioned.
@@ -11,18 +12,25 @@ export declare enum ThreadAccess {
11
12
  * Create new Note in a Thread the twist created.
12
13
  * All Respond permissions.
13
14
  */
14
- Create = 1
15
+ Create = 1,
16
+ /**
17
+ * List/query all Threads owned by the twist's user.
18
+ * Update any Thread (title, tags, archived, type, priority) regardless of creator.
19
+ * Create Notes on any Thread (not just own or mentioned).
20
+ * All Create permissions.
21
+ */
22
+ Full = 2
15
23
  }
16
24
  export declare enum PriorityAccess {
17
25
  /**
18
- * Create a new Priority within the twist's Priority.
19
- * Update Priority created by the twist.
26
+ * Create new Priorities under the twist owner's priority tree.
27
+ * Update Priorities created by the twist.
20
28
  */
21
29
  Create = 0,
22
30
  /**
23
- * Read all Priority within the twist's Priority.
24
- * Create a new Priority within the twist's Priority.
25
- * Update and archive any Priority within the twist's Priority.
31
+ * Read all Priorities owned by the twist's user.
32
+ * Create new Priorities under the twist owner's priority tree.
33
+ * Update and archive any Priority owned by the twist's user.
26
34
  */
27
35
  Full = 1
28
36
  }
@@ -30,6 +38,12 @@ export declare enum ContactAccess {
30
38
  /** Read existing contact details. Without this, only the ID will be provided. */
31
39
  Read = 0
32
40
  }
41
+ export declare enum LinkAccess {
42
+ /** Read links on any thread owned by the twist's user. */
43
+ Read = 0,
44
+ /** Read + update links, including moving links between threads owned by the twist's user. */
45
+ Full = 1
46
+ }
33
47
  /**
34
48
  * Intent handler for thread mentions.
35
49
  * Defines how the twist should respond when mentioned in a thread.
@@ -88,7 +102,11 @@ export type SearchOptions = {
88
102
  limit?: number;
89
103
  /** Minimum similarity score 0-1 (default: 0.3) */
90
104
  threshold?: number;
91
- /** Scope search to this priority + descendants (default: twist's installed priority). Must be within the twist's allowed scope. */
105
+ /**
106
+ * Scope search to this priority + descendants. Must be owned by the twist
107
+ * owner. When omitted, the server scopes the search to the owner's entire
108
+ * priority tree.
109
+ */
92
110
  priorityId?: string;
93
111
  };
94
112
  /**
@@ -108,7 +126,7 @@ export type SearchOptions = {
108
126
  * this.plot = tools.get(Plot);
109
127
  * }
110
128
  *
111
- * async activate(priority) {
129
+ * async activate() {
112
130
  * // Create a welcome thread
113
131
  * await this.plot.createThread({
114
132
  * title: "Welcome to Plot!",
@@ -202,15 +220,24 @@ export declare abstract class Plot extends ITool {
202
220
  intents?: NoteIntentHandler[];
203
221
  };
204
222
  /** Enable link processing from connected source channels. */
205
- link?: true;
223
+ link?: true | {
224
+ /** Access level for links. When omitted with `link: true`, only source channel links are accessible. */
225
+ access?: LinkAccess;
226
+ };
206
227
  priority?: {
207
228
  access?: PriorityAccess;
208
229
  };
209
230
  contact?: {
210
231
  access?: ContactAccess;
211
232
  };
212
- /** Enable semantic search across notes and links in the twist's priority scope. */
233
+ /** Enable semantic search across notes and links owned by the twist's user. */
213
234
  search?: true;
235
+ /**
236
+ * When true, admin write operations (on threads/notes/links/priorities not created by this twist)
237
+ * require user approval via plan actions instead of executing immediately.
238
+ * Read operations and operations on the twist's own content still work directly.
239
+ */
240
+ requireApproval?: boolean;
214
241
  };
215
242
  /**
216
243
  * Creates a new thread in the Plot system.
@@ -458,6 +485,22 @@ export declare abstract class Plot extends ITool {
458
485
  * the owner's name or email is needed.
459
486
  */
460
487
  abstract getOwner(): Promise<Actor>;
488
+ /**
489
+ * Returns the user ID (`twist_instance.owner_id`) that installed this
490
+ * twist. This is the same value exposed on Twist via `this.userId`.
491
+ */
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>;
461
504
  /**
462
505
  * Creates a new schedule for a thread.
463
506
  *
@@ -511,6 +554,76 @@ export declare abstract class Plot extends ITool {
511
554
  * @returns Promise resolving to array of search results ordered by similarity
512
555
  */
513
556
  abstract search(query: string, options?: SearchOptions): Promise<SearchResult[]>;
557
+ /**
558
+ * Lists threads owned by the twist's user.
559
+ *
560
+ * Requires `ThreadAccess.Full`.
561
+ *
562
+ * @param options - Query options for filtering threads
563
+ * @returns Promise resolving to array of threads
564
+ */
565
+ abstract getThreads(options?: {
566
+ /**
567
+ * Priority to list threads from. Must be owned by the twist owner.
568
+ * When omitted, defaults to the owner's root priority.
569
+ */
570
+ priorityId?: Uuid;
571
+ /** Include threads from descendant priorities. Default: true. */
572
+ includeDescendants?: boolean;
573
+ /** Include archived threads. Default: false. */
574
+ includeArchived?: boolean;
575
+ /** Maximum number of threads to return. Default: 50, max: 200. */
576
+ limit?: number;
577
+ /** Number of threads to skip for pagination. Default: 0. */
578
+ offset?: number;
579
+ }): Promise<Thread[]>;
580
+ /**
581
+ * Lists priorities owned by the twist's user.
582
+ *
583
+ * Requires `PriorityAccess.Full`.
584
+ *
585
+ * @param options - Query options for filtering priorities
586
+ * @returns Promise resolving to array of priorities
587
+ */
588
+ abstract getPriorities(options?: {
589
+ /**
590
+ * Parent priority to list children of. Must be owned by the twist
591
+ * owner. When omitted, defaults to the owner's root priority.
592
+ */
593
+ parentId?: Uuid;
594
+ /** Include all descendants, not just direct children. Default: false. */
595
+ includeDescendants?: boolean;
596
+ /** Include archived priorities. Default: false. */
597
+ includeArchived?: boolean;
598
+ }): Promise<Priority[]>;
599
+ /**
600
+ * Updates a link.
601
+ *
602
+ * Requires `LinkAccess.Full`. Set `threadId` to move the link to a different thread.
603
+ *
604
+ * @param link - The link update containing the ID and fields to change
605
+ * @returns Promise that resolves when the update is complete
606
+ */
607
+ abstract updateLink(link: LinkUpdate): Promise<void>;
608
+ /**
609
+ * Creates a plan of operations for user approval.
610
+ *
611
+ * Returns an Action that can be attached to a note. The user can approve,
612
+ * deny, or request changes. On approval, operations are executed by the API.
613
+ *
614
+ * Requires `requireApproval: true` in Plot options.
615
+ *
616
+ * @param options - Plan configuration
617
+ * @returns An Action of type `plan` to attach to a note
618
+ */
619
+ abstract createPlan(options: {
620
+ /** Human-readable title summarizing the plan */
621
+ title: string;
622
+ /** Array of operations to execute on approval */
623
+ operations: PlanOperation[];
624
+ /** Callback invoked with (action, approved: boolean) when the user responds */
625
+ callback: Callback;
626
+ }): Action;
514
627
  }
515
628
  export {};
516
629
  //# sourceMappingURL=plot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,IAAI,EACL,MAAM,IAAI,CAAC;AACZ,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAEr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AAE,MAAM,CAAC;QACf,4DAA4D;QAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAErB;;;;;;;OAOG;IAEH,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;QAC/B;;;WAGG;QACH,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,yEAAyE;QACzE,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,mDAAmD;QACnD,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAEvB;;;;;;;OAOG;IAEH,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAEpD;;;;;;;;;;OAUG;IAEH,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAE;QAC3B,gDAAgD;QAChD,KAAK,EAAE,MAAM,CAAC;QACd,iDAAiD;QACjD,UAAU,EAAE,aAAa,EAAE,CAAC;QAC5B,+EAA+E;QAC/E,QAAQ,EAAE,QAAQ,CAAC;KACpB,GAAG,MAAM;CACX"}
@@ -12,18 +12,25 @@ export var ThreadAccess;
12
12
  * All Respond permissions.
13
13
  */
14
14
  ThreadAccess[ThreadAccess["Create"] = 1] = "Create";
15
+ /**
16
+ * List/query all Threads owned by the twist's user.
17
+ * Update any Thread (title, tags, archived, type, priority) regardless of creator.
18
+ * Create Notes on any Thread (not just own or mentioned).
19
+ * All Create permissions.
20
+ */
21
+ ThreadAccess[ThreadAccess["Full"] = 2] = "Full";
15
22
  })(ThreadAccess || (ThreadAccess = {}));
16
23
  export var PriorityAccess;
17
24
  (function (PriorityAccess) {
18
25
  /**
19
- * Create a new Priority within the twist's Priority.
20
- * Update Priority created by the twist.
26
+ * Create new Priorities under the twist owner's priority tree.
27
+ * Update Priorities created by the twist.
21
28
  */
22
29
  PriorityAccess[PriorityAccess["Create"] = 0] = "Create";
23
30
  /**
24
- * Read all Priority within the twist's Priority.
25
- * Create a new Priority within the twist's Priority.
26
- * Update and archive any Priority within the twist's Priority.
31
+ * Read all Priorities owned by the twist's user.
32
+ * Create new Priorities under the twist owner's priority tree.
33
+ * Update and archive any Priority owned by the twist's user.
27
34
  */
28
35
  PriorityAccess[PriorityAccess["Full"] = 1] = "Full";
29
36
  })(PriorityAccess || (PriorityAccess = {}));
@@ -32,6 +39,13 @@ export var ContactAccess;
32
39
  /** Read existing contact details. Without this, only the ID will be provided. */
33
40
  ContactAccess[ContactAccess["Read"] = 0] = "Read";
34
41
  })(ContactAccess || (ContactAccess = {}));
42
+ export var LinkAccess;
43
+ (function (LinkAccess) {
44
+ /** Read links on any thread owned by the twist's user. */
45
+ LinkAccess[LinkAccess["Read"] = 0] = "Read";
46
+ /** Read + update links, including moving links between threads owned by the twist's user. */
47
+ LinkAccess[LinkAccess["Full"] = 1] = "Full";
48
+ })(LinkAccess || (LinkAccess = {}));
35
49
  /** Default number of search results returned */
36
50
  export const SEARCH_DEFAULT_LIMIT = 10;
37
51
  /** Maximum number of search results allowed */
@@ -53,7 +67,7 @@ export const SEARCH_MAX_LIMIT = 30;
53
67
  * this.plot = tools.get(Plot);
54
68
  * }
55
69
  *
56
- * async activate(priority) {
70
+ * async activate() {
57
71
  * // Create a welcome thread
58
72
  * await this.plot.createThread({
59
73
  * title: "Welcome to Plot!",
@@ -1 +1 @@
1
- {"version":3,"file":"plot.js","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GAWN,MAAM,IAAI,CAAC;AAMZ,MAAM,CAAN,IAAY,YAYX;AAZD,WAAY,YAAY;IACtB;;;OAGG;IACH,qDAAO,CAAA;IACP;;;;OAIG;IACH,mDAAM,CAAA;AACR,CAAC,EAZW,YAAY,KAAZ,YAAY,QAYvB;AAED,MAAM,CAAN,IAAY,cAYX;AAZD,WAAY,cAAc;IACxB;;;OAGG;IACH,uDAAM,CAAA;IACN;;;;OAIG;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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;CAsaH"}
@@ -0,0 +1,155 @@
1
+ import { ITool } from "..";
2
+ /** Opaque session handle returned by connect(). */
3
+ export type SmtpSession = string;
4
+ /** Credentials and server info for connecting to an SMTP server. */
5
+ export type SmtpConnectOptions = {
6
+ /** SMTP server hostname (e.g. "smtp.mail.me.com") */
7
+ host: string;
8
+ /** SMTP server port (e.g. 465 for TLS, 587 for STARTTLS) */
9
+ port: number;
10
+ /** Whether to use implicit TLS (true for port 465) */
11
+ tls: boolean;
12
+ /** Whether to upgrade to TLS via STARTTLS (true for port 587) */
13
+ starttls: boolean;
14
+ /** SMTP username (typically the email address) */
15
+ username: string;
16
+ /** SMTP password (app-specific password for Apple) */
17
+ password: string;
18
+ };
19
+ /** An email address with optional display name. */
20
+ export type SmtpAddress = {
21
+ /** Display name (e.g. "John Doe") */
22
+ name?: string;
23
+ /** Email address (e.g. "john@example.com") */
24
+ address: string;
25
+ };
26
+ /** An email message to send. */
27
+ export type SmtpMessage = {
28
+ /** Sender address */
29
+ from: SmtpAddress;
30
+ /** Primary recipients */
31
+ to: SmtpAddress[];
32
+ /** Carbon copy recipients */
33
+ cc?: SmtpAddress[];
34
+ /** Blind carbon copy recipients (not visible in headers) */
35
+ bcc?: SmtpAddress[];
36
+ /** Reply-To address (if different from From) */
37
+ replyTo?: SmtpAddress;
38
+ /** Message-ID of the message being replied to (for threading) */
39
+ inReplyTo?: string;
40
+ /** Message-ID chain for threading */
41
+ references?: string[];
42
+ /** Email subject line */
43
+ subject: string;
44
+ /** Plain text body */
45
+ text?: string;
46
+ /** HTML body */
47
+ html?: string;
48
+ /** Custom Message-ID; auto-generated as <uuid@plot.day> if omitted */
49
+ messageId?: string;
50
+ };
51
+ /** Result of sending an email. */
52
+ export type SmtpSendResult = {
53
+ /** The Message-ID that was used (auto-generated or from SmtpMessage) */
54
+ messageId: string;
55
+ /** Email addresses that were accepted by the server */
56
+ accepted: string[];
57
+ /** Email addresses that were rejected by the server */
58
+ rejected: string[];
59
+ };
60
+ /**
61
+ * Built-in tool for SMTP email sending.
62
+ *
63
+ * Provides high-level SMTP operations for composing and sending email.
64
+ * Handles TCP/TLS connections, STARTTLS upgrades, SMTP protocol details,
65
+ * and RFC 2822 message formatting internally.
66
+ *
67
+ * **Permission model:** Connectors declare which SMTP hosts they need access
68
+ * to. Connections to undeclared hosts are rejected.
69
+ *
70
+ * @example
71
+ * ```typescript
72
+ * class AppleMailConnector extends Connector<AppleMailConnector> {
73
+ * build(build: ConnectorBuilder) {
74
+ * return {
75
+ * options: build(Options, {
76
+ * email: { type: "text", label: "Apple ID Email", default: "" },
77
+ * password: { type: "text", label: "App-Specific Password", secure: true, default: "" },
78
+ * }),
79
+ *
80
+ * imap: build(Imap, { hosts: ["imap.mail.me.com"] }),
81
+ * smtp: build(Smtp, { hosts: ["smtp.mail.me.com"] }),
82
+ * integrations: build(Integrations),
83
+ * };
84
+ * }
85
+ *
86
+ * async sendReply(originalMessage: ImapMessage, replyBody: string) {
87
+ * const session = await this.tools.smtp.connect({
88
+ * host: "smtp.mail.me.com",
89
+ * port: 587,
90
+ * tls: false,
91
+ * starttls: true,
92
+ * username: this.tools.options.email,
93
+ * password: this.tools.options.password,
94
+ * });
95
+ *
96
+ * try {
97
+ * const result = await this.tools.smtp.send(session, {
98
+ * from: { address: this.tools.options.email },
99
+ * to: originalMessage.from ?? [],
100
+ * subject: `Re: ${originalMessage.subject ?? "(no subject)"}`,
101
+ * text: replyBody,
102
+ * inReplyTo: originalMessage.messageId,
103
+ * references: [
104
+ * ...(originalMessage.references ?? []),
105
+ * ...(originalMessage.messageId ? [originalMessage.messageId] : []),
106
+ * ],
107
+ * });
108
+ *
109
+ * console.log(`Sent reply, Message-ID: ${result.messageId}`);
110
+ * } finally {
111
+ * await this.tools.smtp.disconnect(session);
112
+ * }
113
+ * }
114
+ * }
115
+ * ```
116
+ */
117
+ export declare abstract class Smtp extends ITool {
118
+ static readonly Options: {
119
+ /** SMTP server hostnames this tool is allowed to connect to. */
120
+ hosts: string[];
121
+ };
122
+ /**
123
+ * Opens a connection to an SMTP server and authenticates.
124
+ *
125
+ * Handles the full SMTP handshake: greeting, EHLO, optional STARTTLS
126
+ * upgrade, and AUTH LOGIN authentication.
127
+ *
128
+ * @param options - Server address, port, TLS/STARTTLS setting, and credentials
129
+ * @returns An opaque session handle for subsequent operations
130
+ * @throws If the host is not in the declared hosts list, connection fails, or auth fails
131
+ */
132
+ abstract connect(options: SmtpConnectOptions): Promise<SmtpSession>;
133
+ /**
134
+ * Sends an email message.
135
+ *
136
+ * Constructs a properly formatted RFC 2822 message with MIME support
137
+ * and sends it via the SMTP protocol. Handles multipart messages when
138
+ * both text and HTML bodies are provided.
139
+ *
140
+ * @param session - Session handle from connect()
141
+ * @param message - The email message to send
142
+ * @returns Send result with Message-ID and per-recipient acceptance status
143
+ * @throws If the session is invalid or the server rejects the message entirely
144
+ */
145
+ abstract send(session: SmtpSession, message: SmtpMessage): Promise<SmtpSendResult>;
146
+ /**
147
+ * Closes the SMTP connection.
148
+ *
149
+ * Always call this when done, preferably in a finally block.
150
+ *
151
+ * @param session - Session handle from connect()
152
+ */
153
+ abstract disconnect(session: SmtpSession): Promise<void>;
154
+ }
155
+ //# sourceMappingURL=smtp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smtp.d.ts","sourceRoot":"","sources":["../../src/tools/smtp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AA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,MAAM,CAAC;IAClB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,8BAAsB,IAAK,SAAQ,KAAK;IACtC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE;QACvB,gEAAgE;QAChE,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;IAEF;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;IAEnE;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,IAAI,CACX,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,cAAc,CAAC;IAE1B;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CACzD"}
@@ -0,0 +1,62 @@
1
+ import { ITool } from "..";
2
+ /**
3
+ * Built-in tool for SMTP email sending.
4
+ *
5
+ * Provides high-level SMTP operations for composing and sending email.
6
+ * Handles TCP/TLS connections, STARTTLS upgrades, SMTP protocol details,
7
+ * and RFC 2822 message formatting internally.
8
+ *
9
+ * **Permission model:** Connectors declare which SMTP hosts they need access
10
+ * to. Connections to undeclared hosts are rejected.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * class AppleMailConnector extends Connector<AppleMailConnector> {
15
+ * build(build: ConnectorBuilder) {
16
+ * return {
17
+ * options: build(Options, {
18
+ * email: { type: "text", label: "Apple ID Email", default: "" },
19
+ * password: { type: "text", label: "App-Specific Password", secure: true, default: "" },
20
+ * }),
21
+ *
22
+ * imap: build(Imap, { hosts: ["imap.mail.me.com"] }),
23
+ * smtp: build(Smtp, { hosts: ["smtp.mail.me.com"] }),
24
+ * integrations: build(Integrations),
25
+ * };
26
+ * }
27
+ *
28
+ * async sendReply(originalMessage: ImapMessage, replyBody: string) {
29
+ * const session = await this.tools.smtp.connect({
30
+ * host: "smtp.mail.me.com",
31
+ * port: 587,
32
+ * tls: false,
33
+ * starttls: true,
34
+ * username: this.tools.options.email,
35
+ * password: this.tools.options.password,
36
+ * });
37
+ *
38
+ * try {
39
+ * const result = await this.tools.smtp.send(session, {
40
+ * from: { address: this.tools.options.email },
41
+ * to: originalMessage.from ?? [],
42
+ * subject: `Re: ${originalMessage.subject ?? "(no subject)"}`,
43
+ * text: replyBody,
44
+ * inReplyTo: originalMessage.messageId,
45
+ * references: [
46
+ * ...(originalMessage.references ?? []),
47
+ * ...(originalMessage.messageId ? [originalMessage.messageId] : []),
48
+ * ],
49
+ * });
50
+ *
51
+ * console.log(`Sent reply, Message-ID: ${result.messageId}`);
52
+ * } finally {
53
+ * await this.tools.smtp.disconnect(session);
54
+ * }
55
+ * }
56
+ * }
57
+ * ```
58
+ */
59
+ export class Smtp extends ITool {
60
+ static Options;
61
+ }
62
+ //# sourceMappingURL=smtp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smtp.js","sourceRoot":"","sources":["../../src/tools/smtp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAiE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,MAAM,OAAgB,IAAK,SAAQ,KAAK;IACtC,MAAM,CAAU,OAAO,CAGrB;CAuCH"}
package/dist/twist.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type Action, type Actor, type ActorId, type Link, type Note, type Priority, type Thread, Uuid } from "./plot";
1
+ import { type Action, type Actor, type ActorId, type Link, type Note, type Thread, Uuid } from "./plot";
2
2
  import type { Tag } from "./tag";
3
3
  import { type ITool } from "./tool";
4
4
  import type { Callback } from "./tools/callbacks";
@@ -7,10 +7,13 @@ import type { InferTools, ToolBuilder, ToolShed } from "./utils/types";
7
7
  /**
8
8
  * Base class for all twists.
9
9
  *
10
- * Twists are activated in a Plot priority and have access to that priority and all
11
- * its descendants.
10
+ * A twist is installed at the workspace level and is owned by a single user
11
+ * (see `this.userId`). It has no inherent priority scope: threads, notes, and
12
+ * links it creates are filed against the owner's priorities, with automatic
13
+ * priority matching when no explicit target is provided.
12
14
  *
13
- * Override build() to declare tool dependencies and lifecycle methods to handle events.
15
+ * Override `build()` to declare tool dependencies and lifecycle methods to
16
+ * handle events.
14
17
  *
15
18
  * @example
16
19
  * ```typescript
@@ -21,8 +24,7 @@ import type { InferTools, ToolBuilder, ToolShed } from "./utils/types";
21
24
  * };
22
25
  * }
23
26
  *
24
- * async activate(priority: Pick<Priority, "id">) {
25
- * // Initialize twist for the given priority
27
+ * async activate() {
26
28
  * await this.tools.plot.createThread({
27
29
  * title: "Hello, good looking!",
28
30
  * });
@@ -33,6 +35,11 @@ import type { InferTools, ToolBuilder, ToolShed } from "./utils/types";
33
35
  export declare abstract class Twist<TSelf> {
34
36
  protected id: Uuid;
35
37
  private toolShed;
38
+ /**
39
+ * The user ID (`twist_instance.owner_id`) that installed this twist.
40
+ * Populated by the runtime before any lifecycle method runs.
41
+ */
42
+ protected userId: Uuid;
36
43
  constructor(id: Uuid, toolShed: ToolShed);
37
44
  /**
38
45
  * Gets the initialized tools for this twist.
@@ -105,7 +112,16 @@ export declare abstract class Twist<TSelf> {
105
112
  */
106
113
  protected deleteAllCallbacks(): Promise<void>;
107
114
  /**
108
- * Executes a callback by its token.
115
+ * Executes a callback by its token inline in the current execution.
116
+ *
117
+ * **Use `this.runTask()` instead for batch continuations and long-running work.**
118
+ * `this.run()` executes inline, sharing the current request count (~1000 limit)
119
+ * and blocking the HTTP response. This causes timeouts when used in lifecycle
120
+ * methods like `onChannelEnabled` or `syncBatch` continuations.
121
+ *
122
+ * `this.run()` is appropriate when you need the callback's **return value** —
123
+ * e.g., running a parent callback token that returns data. For fire-and-forget
124
+ * work, always prefer `this.runTask()`.
109
125
  *
110
126
  * @param token - The callback token to execute
111
127
  * @param args - Optional arguments to pass to the callback
@@ -200,24 +216,25 @@ export declare abstract class Twist<TSelf> {
200
216
  */
201
217
  protected cancelAllTasks(): Promise<void>;
202
218
  /**
203
- * Called when the twist is activated for a specific priority.
219
+ * Called when the twist is installed by a user.
204
220
  *
205
- * This method should contain initialization logic such as setting up
206
- * initial threads, configuring webhooks, or establishing external connections.
221
+ * This method should contain initialization logic such as seeding
222
+ * initial threads, configuring webhooks, or establishing external
223
+ * connections. When it runs, `this.userId` is already populated with
224
+ * the installing user's ID.
207
225
  *
208
- * @param priority - The priority context containing the priority ID
209
226
  * @param context - Optional context containing the actor who triggered activation
210
227
  * @returns Promise that resolves when activation is complete
211
228
  */
212
- activate(priority: Pick<Priority, "id">, context?: {
229
+ activate(context?: {
213
230
  actor: Actor;
214
231
  }): Promise<void>;
215
232
  /**
216
- * Called when a new version of the twist is deployed to an existing priority.
233
+ * Called when a new version of the twist is deployed.
217
234
  *
218
235
  * This method should contain migration logic for updating old data structures
219
236
  * or setting up new resources that weren't needed by the previous version.
220
- * It is called with the new version for each active priorityTwist.
237
+ * It is called once per active twist_instance with the new version.
221
238
  *
222
239
  * @returns Promise that resolves when upgrade is complete
223
240
  */
@@ -259,9 +276,14 @@ export declare abstract class Twist<TSelf> {
259
276
  *
260
277
  * Notes created by the twist itself are filtered out to prevent loops.
261
278
  *
279
+ * Returning a string sets the note's `key` for future upsert matching,
280
+ * linking the Plot note to its external counterpart so that subsequent
281
+ * syncs (reactions, edits) update the existing note instead of creating duplicates.
282
+ *
262
283
  * @param note - The newly created note
284
+ * @returns Optional note key for external deduplication
263
285
  */
264
- onNoteCreated(note: Note, ...args: any[]): Promise<void>;
286
+ onNoteCreated(note: Note, ...args: any[]): Promise<string | void>;
265
287
  /**
266
288
  * Called when a link is created in a connected source channel.
267
289
  * Requires `link: true` in Plot options.
@@ -1 +1 @@
1
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