@plotday/twister 0.33.2 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/common/calendar.d.ts +20 -90
  2. package/dist/common/calendar.d.ts.map +1 -1
  3. package/dist/common/documents.d.ts +122 -0
  4. package/dist/common/documents.d.ts.map +1 -0
  5. package/dist/common/documents.js +2 -0
  6. package/dist/common/documents.js.map +1 -0
  7. package/dist/common/messaging.d.ts +21 -40
  8. package/dist/common/messaging.d.ts.map +1 -1
  9. package/dist/common/projects.d.ts +27 -51
  10. package/dist/common/projects.d.ts.map +1 -1
  11. package/dist/docs/assets/hierarchy.js +1 -1
  12. package/dist/docs/assets/navigation.js +1 -1
  13. package/dist/docs/assets/search.js +1 -1
  14. package/dist/docs/classes/tool.ITool.html +1 -1
  15. package/dist/docs/classes/tool.Tool.html +24 -20
  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 +33 -26
  19. package/dist/docs/classes/tools_network.Network.html +1 -1
  20. package/dist/docs/classes/tools_plot.Plot.html +3 -3
  21. package/dist/docs/classes/tools_store.Store.html +10 -4
  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/enums/plot.ActivityKind.html +2 -2
  25. package/dist/docs/enums/plot.ActivityLinkType.html +6 -6
  26. package/dist/docs/enums/plot.ActivityType.html +4 -4
  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/plot.ThemeColor.html +9 -9
  30. package/dist/docs/enums/tools_integrations.AuthProvider.html +11 -11
  31. package/dist/docs/hierarchy.html +1 -1
  32. package/dist/docs/modules/common_calendar.html +1 -1
  33. package/dist/docs/modules/index.html +1 -1
  34. package/dist/docs/modules/plot.html +1 -1
  35. package/dist/docs/modules/tool.html +1 -1
  36. package/dist/docs/modules/tools_integrations.html +1 -1
  37. package/dist/docs/types/common_calendar.Calendar.html +5 -5
  38. package/dist/docs/types/common_calendar.CalendarTool.html +17 -43
  39. package/dist/docs/types/common_calendar.SyncOptions.html +3 -3
  40. package/dist/docs/types/plot.Activity.html +2 -59
  41. package/dist/docs/types/plot.ActivityCommon.html +8 -8
  42. package/dist/docs/types/plot.ActivityFilter.html +3 -0
  43. package/dist/docs/types/plot.ActivityLink.html +1 -1
  44. package/dist/docs/types/plot.ActivityMeta.html +1 -1
  45. package/dist/docs/types/plot.ActivityOccurrence.html +7 -7
  46. package/dist/docs/types/plot.ActivityOccurrenceUpdate.html +1 -1
  47. package/dist/docs/types/plot.ActivityUpdate.html +3 -28
  48. package/dist/docs/types/plot.ActivityWithNotes.html +1 -1
  49. package/dist/docs/types/plot.Actor.html +5 -5
  50. package/dist/docs/types/plot.ActorId.html +1 -1
  51. package/dist/docs/types/plot.ContentType.html +1 -1
  52. package/dist/docs/types/plot.NewActivity.html +3 -3
  53. package/dist/docs/types/plot.NewActivityOccurrence.html +1 -1
  54. package/dist/docs/types/plot.NewActivityWithNotes.html +1 -1
  55. package/dist/docs/types/plot.NewActor.html +1 -1
  56. package/dist/docs/types/plot.NewContact.html +8 -4
  57. package/dist/docs/types/plot.NewNote.html +9 -2
  58. package/dist/docs/types/plot.NewPriority.html +1 -1
  59. package/dist/docs/types/plot.NewTags.html +1 -1
  60. package/dist/docs/types/plot.Note.html +3 -2
  61. package/dist/docs/types/plot.NoteUpdate.html +2 -2
  62. package/dist/docs/types/plot.PickPriorityConfig.html +2 -2
  63. package/dist/docs/types/plot.Priority.html +6 -6
  64. package/dist/docs/types/plot.PriorityUpdate.html +1 -1
  65. package/dist/docs/types/plot.Tags.html +1 -1
  66. package/dist/docs/types/tool.SyncToolOptions.html +9 -0
  67. package/dist/docs/types/tools_integrations.AuthToken.html +4 -4
  68. package/dist/docs/types/tools_integrations.Authorization.html +4 -4
  69. package/dist/docs/types/tools_integrations.IntegrationOptions.html +4 -0
  70. package/dist/docs/types/tools_integrations.IntegrationProviderConfig.html +13 -0
  71. package/dist/docs/types/tools_integrations.Syncable.html +7 -0
  72. package/dist/llm-docs/common/calendar.d.ts +1 -1
  73. package/dist/llm-docs/common/calendar.d.ts.map +1 -1
  74. package/dist/llm-docs/common/calendar.js +1 -1
  75. package/dist/llm-docs/common/calendar.js.map +1 -1
  76. package/dist/llm-docs/common/documents.d.ts +9 -0
  77. package/dist/llm-docs/common/documents.d.ts.map +1 -0
  78. package/dist/llm-docs/common/documents.js +8 -0
  79. package/dist/llm-docs/common/documents.js.map +1 -0
  80. package/dist/llm-docs/common/messaging.d.ts +1 -1
  81. package/dist/llm-docs/common/messaging.d.ts.map +1 -1
  82. package/dist/llm-docs/common/messaging.js +1 -1
  83. package/dist/llm-docs/common/messaging.js.map +1 -1
  84. package/dist/llm-docs/common/projects.d.ts +1 -1
  85. package/dist/llm-docs/common/projects.d.ts.map +1 -1
  86. package/dist/llm-docs/common/projects.js +1 -1
  87. package/dist/llm-docs/common/projects.js.map +1 -1
  88. package/dist/llm-docs/index.d.ts.map +1 -1
  89. package/dist/llm-docs/index.js +2 -0
  90. package/dist/llm-docs/index.js.map +1 -1
  91. package/dist/llm-docs/plot.d.ts +1 -1
  92. package/dist/llm-docs/plot.d.ts.map +1 -1
  93. package/dist/llm-docs/plot.js +1 -1
  94. package/dist/llm-docs/plot.js.map +1 -1
  95. package/dist/llm-docs/tool.d.ts +1 -1
  96. package/dist/llm-docs/tool.d.ts.map +1 -1
  97. package/dist/llm-docs/tool.js +1 -1
  98. package/dist/llm-docs/tool.js.map +1 -1
  99. package/dist/llm-docs/tools/integrations.d.ts +1 -1
  100. package/dist/llm-docs/tools/integrations.d.ts.map +1 -1
  101. package/dist/llm-docs/tools/integrations.js +1 -1
  102. package/dist/llm-docs/tools/integrations.js.map +1 -1
  103. package/dist/llm-docs/tools/plot.d.ts +1 -1
  104. package/dist/llm-docs/tools/plot.d.ts.map +1 -1
  105. package/dist/llm-docs/tools/plot.js +1 -1
  106. package/dist/llm-docs/tools/plot.js.map +1 -1
  107. package/dist/llm-docs/tools/store.d.ts +1 -1
  108. package/dist/llm-docs/tools/store.d.ts.map +1 -1
  109. package/dist/llm-docs/tools/store.js +1 -1
  110. package/dist/llm-docs/tools/store.js.map +1 -1
  111. package/dist/plot.d.ts +92 -17
  112. package/dist/plot.d.ts.map +1 -1
  113. package/dist/plot.js.map +1 -1
  114. package/dist/tool.d.ts +22 -1
  115. package/dist/tool.d.ts.map +1 -1
  116. package/dist/tool.js +9 -0
  117. package/dist/tool.js.map +1 -1
  118. package/dist/tools/integrations.d.ts +86 -46
  119. package/dist/tools/integrations.d.ts.map +1 -1
  120. package/dist/tools/integrations.js +36 -21
  121. package/dist/tools/integrations.js.map +1 -1
  122. package/dist/tools/plot.d.ts +3 -1
  123. package/dist/tools/plot.d.ts.map +1 -1
  124. package/dist/tools/store.d.ts +10 -0
  125. package/dist/tools/store.d.ts.map +1 -1
  126. package/dist/tools/store.js.map +1 -1
  127. package/package.json +11 -1
  128. package/dist/docs/types/common_calendar.CalendarAuth.html +0 -7
@@ -1,15 +1,4 @@
1
- import type { ActivityLink, NewActivityWithNotes, Serializable } from "../index";
2
- /**
3
- * Represents successful calendar authorization.
4
- *
5
- * Returned by calendar tools when authorization completes successfully.
6
- * The auth token is an opaque identifier that can be used for subsequent
7
- * calendar operations.
8
- */
9
- export type CalendarAuth = {
10
- /** Opaque token for calendar operations */
11
- authToken: string;
12
- };
1
+ import type { NewActivityWithNotes, Serializable } from "../index";
13
2
  /**
14
3
  * Represents a calendar from an external calendar service.
15
4
  *
@@ -73,13 +62,12 @@ export type SyncOptions = {
73
62
  * - Easier testing of tools in isolation
74
63
  *
75
64
  * **Implementation Pattern:**
76
- * 1. Request an ActivityLink for authorization
77
- * 2. Create an Activity with the ActivityLink to prompt user (via twist)
78
- * 3. Receive a CalendarAuth in the specified callback
79
- * 4. Fetch list of available calendars
80
- * 5. Start sync for selected calendars
81
- * 6. **Tool builds NewActivity objects** and passes them to the twist via callback
82
- * 7. **Twist decides** whether to save using createActivity/updateActivity
65
+ * 1. Authorization is handled via the twist edit modal (Integrations provider config)
66
+ * 2. Tool declares providers and lifecycle callbacks in build()
67
+ * 3. onAuthorized lists available calendars and calls setSyncables()
68
+ * 4. User enables calendars in the modal → onSyncEnabled fires
69
+ * 5. **Tool builds NewActivity objects** and passes them to the twist via callback
70
+ * 6. **Twist decides** whether to save using createActivity/updateActivity
83
71
  *
84
72
  * **Tool Implementation Rules:**
85
73
  * - **DO** build Activity/Note objects from external data
@@ -93,70 +81,28 @@ export type SyncOptions = {
93
81
  *
94
82
  * @example
95
83
  * ```typescript
96
- * // Typical calendar integration flow using source/key upserts
97
84
  * class MyCalendarTwist extends Twist {
98
- * private googleCalendar: GoogleCalendar;
99
- *
100
- * async activate() {
101
- * // Step 1: Request authorization
102
- * const authLink = await this.googleCalendar.requestAuth("onAuthComplete");
103
- * await this.plot.createActivity({
104
- * type: ActivityType.Action,
105
- * title: "Connect Google Calendar",
106
- * links: [authLink],
107
- * });
108
- * }
109
- *
110
- * async onAuthComplete(auth: CalendarAuth) {
111
- * // Step 2: Get available calendars
112
- * const calendars = await this.googleCalendar.getCalendars(auth.authToken);
113
- *
114
- * // Step 3: Start sync for primary calendar
115
- * const primaryCalendar = calendars.find(c => c.primary);
116
- * if (primaryCalendar) {
117
- * await this.googleCalendar.startSync(
118
- * {
119
- * authToken: auth.authToken,
120
- * calendarId: primaryCalendar.id
121
- * },
122
- * this.onCalendarEvent, // Callback receives data from tool
123
- * { initialSync: true }
124
- * );
125
- * }
85
+ * build(build: ToolBuilder) {
86
+ * return {
87
+ * googleCalendar: build(GoogleCalendar),
88
+ * plot: build(Plot, { activity: { access: ActivityAccess.Create } }),
89
+ * };
126
90
  * }
127
91
  *
128
- * async onCalendarEvent(
129
- * activity: NewActivityWithNotes,
130
- * syncMeta: { initialSync: boolean }
131
- * ) {
132
- * // Step 4: Twist decides what to do with the data
133
- * // Tool built the NewActivity, twist saves it
134
- * await this.plot.createActivity(activity);
135
- * }
92
+ * // Auth and calendar selection handled in the twist edit modal.
93
+ * // Events are delivered via the startSync callback.
136
94
  * }
137
95
  * ```
138
96
  */
139
97
  export type CalendarTool = {
140
- /**
141
- * Initiates the authorization flow for the calendar service.
142
- *
143
- * @param callback - Function receiving (auth, ...extraArgs) when auth completes
144
- * @param extraArgs - Additional arguments to pass to the callback (type-checked)
145
- * @returns Promise resolving to an ActivityLink to initiate the auth flow
146
- */
147
- requestAuth<TArgs extends Serializable[], TCallback extends (auth: CalendarAuth, ...args: TArgs) => any>(callback: TCallback, ...extraArgs: TArgs): Promise<ActivityLink>;
148
98
  /**
149
99
  * Retrieves the list of calendars accessible to the authenticated user.
150
100
  *
151
- * Returns metadata for all calendars the user has access to, including
152
- * their primary calendar and any shared calendars. This list can be
153
- * presented to users for calendar selection.
154
- *
155
- * @param authToken - Authorization token from successful auth flow
101
+ * @param calendarId - A calendar ID to use for auth lookup
156
102
  * @returns Promise resolving to array of available calendars
157
- * @throws When the auth token is invalid or expired
103
+ * @throws When no valid authorization is available
158
104
  */
159
- getCalendars(authToken: string): Promise<Calendar[]>;
105
+ getCalendars(calendarId: string): Promise<Calendar[]>;
160
106
  /**
161
107
  * Begins synchronizing events from a specific calendar.
162
108
  *
@@ -164,42 +110,26 @@ export type CalendarTool = {
164
110
  * event import and ongoing change notifications. The callback function
165
111
  * will be invoked for each synced event.
166
112
  *
167
- * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):
168
- * - Set Activity.source to the event's canonical URL (e.g., event.htmlLink)
169
- * - Use Note.key for event details (description, attendees, etc.) to enable upserts
170
- * - No manual ID tracking needed - Plot handles deduplication automatically
171
- * - Send NewActivityWithNotes for all events (creates new or updates existing)
172
- * - Set activity.unread = false for initial sync, omit for incremental updates
173
- *
174
- * **Alternative** (Strategy 3 - Advanced cases):
175
- * - Use Uuid.Generate() and store ID mappings when creating multiple activities per event
176
- * - See SYNC_STRATEGIES.md for when this is appropriate
113
+ * Auth is obtained automatically via integrations.get(provider, calendarId).
177
114
  *
178
115
  * @param options - Sync configuration options
179
- * @param options.authToken - Authorization token for calendar access
180
116
  * @param options.calendarId - ID of the calendar to sync
181
117
  * @param options.timeMin - Earliest date to sync events from (inclusive)
182
118
  * @param options.timeMax - Latest date to sync events to (exclusive)
183
119
  * @param callback - Function receiving (activity, ...extraArgs) for each synced event
184
120
  * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)
185
121
  * @returns Promise that resolves when sync setup is complete
186
- * @throws When auth token is invalid or calendar doesn't exist
122
+ * @throws When no valid authorization or calendar doesn't exist
187
123
  */
188
124
  startSync<TArgs extends Serializable[], TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any>(options: {
189
- authToken: string;
190
125
  calendarId: string;
191
126
  } & SyncOptions, callback: TCallback, ...extraArgs: TArgs): Promise<void>;
192
127
  /**
193
128
  * Stops synchronizing events from a specific calendar.
194
129
  *
195
- * Disables real-time sync and cleans up any webhooks or polling
196
- * mechanisms for the specified calendar. No further events will
197
- * be synced after this call.
198
- *
199
- * @param authToken - Authorization token for calendar access
200
130
  * @param calendarId - ID of the calendar to stop syncing
201
131
  * @returns Promise that resolves when sync is stopped
202
132
  */
203
- stopSync(authToken: string, calendarId: string): Promise<void>;
133
+ stopSync(calendarId: string): Promise<void>;
204
134
  };
205
135
  //# sourceMappingURL=calendar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/common/calendar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEjF;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;GAMG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,GAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C,CAAC"}
@@ -0,0 +1,122 @@
1
+ import type { ActivityMeta, NewActivityWithNotes, Serializable } from "../index";
2
+ /**
3
+ * Represents a folder from an external document service.
4
+ *
5
+ * Contains metadata about a specific folder that can be synced
6
+ * with Plot. Different document providers may have additional
7
+ * provider-specific properties.
8
+ */
9
+ export type DocumentFolder = {
10
+ /** Unique identifier for the folder within the provider */
11
+ id: string;
12
+ /** Human-readable name of the folder */
13
+ name: string;
14
+ /** Optional description or additional details about the folder */
15
+ description: string | null;
16
+ /** Whether this is a root-level folder (e.g., "My Drive" in Google Drive) */
17
+ root: boolean;
18
+ };
19
+ /**
20
+ * Configuration options for document synchronization.
21
+ *
22
+ * Controls the time range and other parameters for document sync operations.
23
+ * Used to limit sync scope and optimize performance.
24
+ */
25
+ export type DocumentSyncOptions = {
26
+ /** Earliest date to sync documents from (inclusive) */
27
+ timeMin?: Date;
28
+ };
29
+ /**
30
+ * Base interface for document service integration tools.
31
+ *
32
+ * All synced documents are converted to ActivityWithNotes objects.
33
+ * Each document becomes an Activity with Notes for the description and comments.
34
+ *
35
+ * **Architecture: Tools Build, Twists Save**
36
+ *
37
+ * Document tools follow Plot's core architectural principle:
38
+ * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)
39
+ * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)
40
+ *
41
+ * **Implementation Pattern:**
42
+ * 1. Authorization is handled via the twist edit modal (Integrations provider config)
43
+ * 2. Tool declares providers and lifecycle callbacks in build()
44
+ * 3. onAuthorized lists available folders and calls setSyncables()
45
+ * 4. User enables folders in the modal → onSyncEnabled fires
46
+ * 5. **Tool builds NewActivity objects** and passes them to the twist via callback
47
+ * 6. **Twist decides** whether to save using createActivity/updateActivity
48
+ *
49
+ * **Recommended Data Sync Strategy:**
50
+ * Use Activity.source and Note.key for automatic upserts.
51
+ *
52
+ * - Set `Activity.source` to `"{provider}:file:{fileId}"` (e.g., `"google-drive:file:abc123"`)
53
+ * - Use `Note.key` for document details:
54
+ * - key: `"summary"` for the document description or metadata summary
55
+ * - key: `"comment-{commentId}"` for individual comments (unique per comment)
56
+ * - key: `"reply-{commentId}-{replyId}"` for comment replies
57
+ * - No manual ID tracking needed - Plot handles deduplication automatically
58
+ * - Send NewActivityWithNotes for all documents (creates new or updates existing)
59
+ * - Set `activity.unread = false` for initial sync, omit for incremental updates
60
+ */
61
+ export type DocumentTool = {
62
+ /**
63
+ * Retrieves the list of folders accessible to the user.
64
+ *
65
+ * @param folderId - A folder ID to use for auth lookup
66
+ * @returns Promise resolving to array of available folders
67
+ */
68
+ getFolders(folderId: string): Promise<DocumentFolder[]>;
69
+ /**
70
+ * Begins synchronizing documents from a specific folder.
71
+ *
72
+ * Documents are converted to NewActivityWithNotes objects.
73
+ *
74
+ * Auth is obtained automatically via integrations.get(provider, folderId).
75
+ *
76
+ * @param options - Sync configuration options
77
+ * @param options.folderId - ID of the folder to sync
78
+ * @param options.timeMin - Earliest date to sync documents from (inclusive)
79
+ * @param callback - Function receiving (activity, ...extraArgs) for each synced document
80
+ * @param extraArgs - Additional arguments to pass to the callback (type-checked, no functions allowed)
81
+ * @returns Promise that resolves when sync setup is complete
82
+ */
83
+ startSync<TArgs extends Serializable[], TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any>(options: {
84
+ folderId: string;
85
+ } & DocumentSyncOptions, callback: TCallback, ...extraArgs: TArgs): Promise<void>;
86
+ /**
87
+ * Stops synchronizing documents from a specific folder.
88
+ *
89
+ * @param folderId - ID of the folder to stop syncing
90
+ * @returns Promise that resolves when sync is stopped
91
+ */
92
+ stopSync(folderId: string): Promise<void>;
93
+ /**
94
+ * Adds a comment to a document.
95
+ *
96
+ * Optional method for bidirectional sync. When implemented, allows Plot to
97
+ * sync notes added to activities back as comments on the external document.
98
+ *
99
+ * Auth is obtained automatically. The tool should extract its own ID
100
+ * from meta (e.g., fileId).
101
+ *
102
+ * @param meta - Activity metadata containing the tool's document identifier
103
+ * @param body - The comment text content
104
+ * @param noteId - Optional Plot note ID for deduplication
105
+ * @returns The external comment key (e.g. "comment-123") for dedup, or void
106
+ */
107
+ addDocumentComment?(meta: ActivityMeta, body: string, noteId?: string): Promise<string | void>;
108
+ /**
109
+ * Adds a reply to an existing comment thread on a document.
110
+ *
111
+ * Auth is obtained automatically. The tool should extract its own ID
112
+ * from meta (e.g., fileId).
113
+ *
114
+ * @param meta - Activity metadata containing the tool's document identifier
115
+ * @param commentId - The external comment ID to reply to
116
+ * @param body - The reply text content
117
+ * @param noteId - Optional Plot note ID for deduplication
118
+ * @returns The external reply key (e.g. "reply-123-456") for dedup, or void
119
+ */
120
+ addDocumentReply?(meta: ActivityMeta, commentId: string, body: string, noteId?: string): Promise<string | void>;
121
+ };
122
+ //# sourceMappingURL=documents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../src/common/documents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACb,MAAM,UAAU,CAAC;AAElB;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,6EAA6E;IAC7E,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,uDAAuD;IACvD,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;;;;OAKG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAExD;;;;;;;;;;;;;OAaG;IACH,SAAS,CACP,KAAK,SAAS,YAAY,EAAE,EAC5B,SAAS,SAAS,CAAC,QAAQ,EAAE,oBAAoB,EAAE,GAAG,IAAI,EAAE,KAAK,KAAK,GAAG,EAEzE,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,mBAAmB,EACvB,QAAQ,EAAE,SAAS,EACnB,GAAG,SAAS,EAAE,KAAK,GAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1C;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,CACjB,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,CACf,IAAI,EAAE,YAAY,EAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=documents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.js","sourceRoot":"","sources":["../../src/common/documents.ts"],"names":[],"mappings":""}
@@ -1,20 +1,10 @@
1
- import type { ActivityLink, NewActivityWithNotes, Serializable } from "../index";
2
- /**
3
- * Represents a successful messaging service authorization.
4
- *
5
- * Returned by messaging tools when authorization completes successfully.
6
- * The auth token is an opaque identifier that can be used for subsequent
7
- * messaging operations.
8
- */
9
- export type MessagingAuth = {
10
- /** Opaque token for messaging operations */
11
- authToken: string;
12
- };
1
+ import type { NewActivityWithNotes, Serializable } from "../index";
13
2
  /**
14
3
  * Represents a channel from an external messaging service.
15
4
  *
16
5
  * Contains metadata about a specific channel that can be synced
17
- * with Plot.
6
+ * with Plot. Different messaging providers may have additional
7
+ * provider-specific properties.
18
8
  */
19
9
  export type MessageChannel = {
20
10
  /** Unique identifier for the channel within the provider */
@@ -42,45 +32,38 @@ export type MessageSyncOptions = {
42
32
  * All synced messages/emails are converted to ActivityWithNotes objects.
43
33
  * Each email thread or chat conversation becomes an Activity with Notes for each message.
44
34
  *
35
+ * **Architecture: Tools Build, Twists Save**
36
+ *
37
+ * Messaging tools follow Plot's core architectural principle:
38
+ * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)
39
+ * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)
40
+ *
41
+ * **Implementation Pattern:**
42
+ * 1. Authorization is handled via the twist edit modal (Integrations provider config)
43
+ * 2. Tool declares providers and lifecycle callbacks in build()
44
+ * 3. onAuthorized lists available channels and calls setSyncables()
45
+ * 4. User enables channels in the modal → onSyncEnabled fires
46
+ * 5. **Tool builds NewActivity objects** and passes them to the twist via callback
47
+ * 6. **Twist decides** whether to save using createActivity/updateActivity
48
+ *
45
49
  * **Recommended Data Sync Strategy:**
46
50
  * Use Activity.source (thread URL or ID) and Note.key (message ID) for automatic upserts.
47
51
  * See SYNC_STRATEGIES.md for detailed patterns.
48
52
  */
49
53
  export type MessagingTool = {
50
- /**
51
- * Initiates the authorization flow for the service.
52
- *
53
- * @param callback - Function receiving (auth, ...extraArgs) when auth completes
54
- * @param extraArgs - Additional arguments to pass to the callback (type-checked)
55
- * @returns Promise resolving to an ActivityLink to initiate the auth flow
56
- */
57
- requestAuth<TArgs extends Serializable[], TCallback extends (auth: MessagingAuth, ...args: TArgs) => any>(callback: TCallback, ...extraArgs: TArgs): Promise<ActivityLink>;
58
54
  /**
59
55
  * Retrieves the list of conversation channels (inboxes, channels) accessible to the user.
60
56
  *
61
- * @param authToken - Authorization token from successful auth flow
57
+ * @param channelId - A channel ID to use for auth lookup
62
58
  * @returns Promise resolving to array of available conversation channels
63
59
  */
64
- getChannels(authToken: string): Promise<MessageChannel[]>;
60
+ getChannels(channelId: string): Promise<MessageChannel[]>;
65
61
  /**
66
62
  * Begins synchronizing messages from a specific channel.
67
63
  *
68
- * Email threads and chat conversations are converted to NewActivityWithNotes objects.
69
- *
70
- * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):
71
- * - Set Activity.source to the thread/conversation URL or stable ID (e.g., "slack:{channelId}:{threadTs}")
72
- * - Use Note.key for individual messages (e.g., "message-{messageId}")
73
- * - Each message becomes a separate note with unique key for upserts
74
- * - No manual ID tracking needed - Plot handles deduplication automatically
75
- * - Send NewActivityWithNotes for all threads (creates new or updates existing)
76
- * - Set activity.unread = false for initial sync, omit for incremental updates
77
- *
78
- * **Alternative** (Strategy 3 - Advanced cases):
79
- * - Use Uuid.Generate() and store ID mappings when creating multiple activities per thread
80
- * - See SYNC_STRATEGIES.md for when this is appropriate
64
+ * Auth is obtained automatically via integrations.get(provider, channelId).
81
65
  *
82
66
  * @param options - Sync configuration options
83
- * @param options.authToken - Authorization token for access
84
67
  * @param options.channelId - ID of the channel (e.g., channel, inbox) to sync
85
68
  * @param options.timeMin - Earliest date to sync events from (inclusive)
86
69
  * @param callback - Function receiving (thread, ...extraArgs) for each synced conversation
@@ -88,16 +71,14 @@ export type MessagingTool = {
88
71
  * @returns Promise that resolves when sync setup is complete
89
72
  */
90
73
  startSync<TArgs extends Serializable[], TCallback extends (thread: NewActivityWithNotes, ...args: TArgs) => any>(options: {
91
- authToken: string;
92
74
  channelId: string;
93
75
  } & MessageSyncOptions, callback: TCallback, ...extraArgs: TArgs): Promise<void>;
94
76
  /**
95
77
  * Stops synchronizing messages from a specific channel.
96
78
  *
97
- * @param authToken - Authorization token for access
98
79
  * @param channelId - ID of the channel to stop syncing
99
80
  * @returns Promise that resolves when sync is stopped
100
81
  */
101
- stopSync(authToken: string, channelId: string): Promise<void>;
82
+ stopSync(channelId: string): Promise<void>;
102
83
  };
103
84
  //# sourceMappingURL=messaging.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../src/common/messaging.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEjF;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,4EAA4E;IAC5E,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,oDAAoD;IACpD,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;;;OAMG;IACH,WAAW,CACT,KAAK,SAAS,YAAY,EAAE,EAC5B,SAAS,SAAS,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,KAAK,KAAK,GAAG,EAE9D,QAAQ,EAAE,SAAS,EACnB,GAAG,SAAS,EAAE,KAAK,GAClB,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzB;;;;;OAKG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAE1D;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,SAAS,CACP,KAAK,SAAS,YAAY,EAAE,EAC5B,SAAS,SAAS,CAAC,MAAM,EAAE,oBAAoB,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C;KACnB,GAAG,kBAAkB,EACtB,QAAQ,EAAE,SAAS,EACnB,GAAG,SAAS,EAAE,KAAK,GAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5C,CAAC"}
@@ -1,20 +1,10 @@
1
- import type { Activity, ActivityLink, ActivityMeta, NewActivityWithNotes, Serializable } from "../index";
2
- /**
3
- * Represents a successful project management service authorization.
4
- *
5
- * Returned by project management tools when authorization completes successfully.
6
- * The auth token is an opaque identifier that can be used for subsequent
7
- * project operations.
8
- */
9
- export type ProjectAuth = {
10
- /** Opaque token for project management operations */
11
- authToken: string;
12
- };
1
+ import type { Activity, ActivityMeta, NewActivityWithNotes, Serializable } from "../index";
13
2
  /**
14
3
  * Represents a project from an external project management service.
15
4
  *
16
5
  * Contains metadata about a specific project/board/workspace that can be synced
17
- * with Plot.
6
+ * with Plot. Different project providers may have additional
7
+ * provider-specific properties.
18
8
  */
19
9
  export type Project = {
20
10
  /** Unique identifier for the project within the provider */
@@ -42,47 +32,38 @@ export type ProjectSyncOptions = {
42
32
  * All synced issues/tasks are converted to ActivityWithNotes objects.
43
33
  * Each issue becomes an Activity with Notes for the description and comments.
44
34
  *
35
+ * **Architecture: Tools Build, Twists Save**
36
+ *
37
+ * Project tools follow Plot's core architectural principle:
38
+ * - **Tools**: Fetch external data and transform it into Plot format (NewActivity objects)
39
+ * - **Twists**: Receive the data and decide what to do with it (create, update, filter, etc.)
40
+ *
41
+ * **Implementation Pattern:**
42
+ * 1. Authorization is handled via the twist edit modal (Integrations provider config)
43
+ * 2. Tool declares providers and lifecycle callbacks in build()
44
+ * 3. onAuthorized lists available projects and calls setSyncables()
45
+ * 4. User enables projects in the modal → onSyncEnabled fires
46
+ * 5. **Tool builds NewActivity objects** and passes them to the twist via callback
47
+ * 6. **Twist decides** whether to save using createActivity/updateActivity
48
+ *
45
49
  * **Recommended Data Sync Strategy:**
46
50
  * Use Activity.source (issue URL) and Note.key for automatic upserts.
47
51
  * See SYNC_STRATEGIES.md for detailed patterns.
48
52
  */
49
53
  export type ProjectTool = {
50
- /**
51
- * Initiates the authorization flow for the service.
52
- *
53
- * @param callback - Function receiving (auth, ...extraArgs) when auth completes
54
- * @param extraArgs - Additional arguments to pass to the callback (type-checked)
55
- * @returns Promise resolving to an ActivityLink to initiate the auth flow
56
- */
57
- requestAuth<TArgs extends Serializable[], TCallback extends (auth: ProjectAuth, ...args: TArgs) => any>(callback: TCallback, ...extraArgs: TArgs): Promise<ActivityLink>;
58
54
  /**
59
55
  * Retrieves the list of projects accessible to the user.
60
56
  *
61
- * @param authToken - Authorization token from successful auth flow
57
+ * @param projectId - A project ID to use for auth lookup
62
58
  * @returns Promise resolving to array of available projects
63
59
  */
64
- getProjects(authToken: string): Promise<Project[]>;
60
+ getProjects(projectId: string): Promise<Project[]>;
65
61
  /**
66
62
  * Begins synchronizing issues from a specific project.
67
63
  *
68
- * Issues and tasks are converted to NewActivityWithNotes objects.
69
- *
70
- * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):
71
- * - Set Activity.source to the issue's canonical URL (e.g., Linear issue URL, Jira issue URL)
72
- * - Use Note.key for issue details:
73
- * - key: "description" for issue description (upserts on changes)
74
- * - key: "metadata" for status, priority, assignee, etc.
75
- * - key: "comment-{commentId}" for individual comments (unique per comment)
76
- * - No manual ID tracking needed - Plot handles deduplication automatically
77
- * - Send NewActivityWithNotes for all issues (creates new or updates existing)
78
- * - Set activity.unread = false for initial sync, omit for incremental updates
79
- *
80
- * **Alternative** (Strategy 3 - Advanced cases):
81
- * - Use Uuid.Generate() and store ID mappings when creating multiple activities per issue
82
- * - See SYNC_STRATEGIES.md for when this is appropriate
64
+ * Auth is obtained automatically via integrations.get(provider, projectId).
83
65
  *
84
66
  * @param options - Sync configuration options
85
- * @param options.authToken - Authorization token for access
86
67
  * @param options.projectId - ID of the project to sync
87
68
  * @param options.timeMin - Earliest date to sync issues from (inclusive)
88
69
  * @param callback - Function receiving (activity, ...extraArgs) for each synced issue
@@ -90,47 +71,42 @@ export type ProjectTool = {
90
71
  * @returns Promise that resolves when sync setup is complete
91
72
  */
92
73
  startSync<TArgs extends Serializable[], TCallback extends (activity: NewActivityWithNotes, ...args: TArgs) => any>(options: {
93
- authToken: string;
94
74
  projectId: string;
95
75
  } & ProjectSyncOptions, callback: TCallback, ...extraArgs: TArgs): Promise<void>;
96
76
  /**
97
77
  * Stops synchronizing issues from a specific project.
98
78
  *
99
- * @param authToken - Authorization token for access
100
79
  * @param projectId - ID of the project to stop syncing
101
80
  * @returns Promise that resolves when sync is stopped
102
81
  */
103
- stopSync(authToken: string, projectId: string): Promise<void>;
82
+ stopSync(projectId: string): Promise<void>;
104
83
  /**
105
84
  * Updates an issue/task with new values.
106
85
  *
107
86
  * Optional method for bidirectional sync. When implemented, allows Plot to
108
87
  * sync activity updates back to the external service.
109
88
  *
110
- * Uses the combination of start and done to determine workflow state:
111
- * - done set Completed/Done state
112
- * - done null + start set → In Progress/Active state
113
- * - done null + start null → Backlog/Todo state
89
+ * Auth is obtained automatically via integrations.get(provider, projectId)
90
+ * using the projectId from activity.meta.
114
91
  *
115
- * @param authToken - Authorization token for access
116
92
  * @param activity - The updated activity
117
93
  * @returns Promise that resolves when the update is synced
118
94
  */
119
- updateIssue?(authToken: string, activity: Activity): Promise<void>;
95
+ updateIssue?(activity: Activity): Promise<void>;
120
96
  /**
121
97
  * Adds a comment to an issue/task.
122
98
  *
123
99
  * Optional method for bidirectional sync. When implemented, allows Plot to
124
100
  * sync notes added to activities back as comments on the external service.
125
101
  *
126
- * The tool should extract its own ID from meta (e.g., linearId, taskGid, issueKey).
102
+ * Auth is obtained automatically. The tool should extract its own ID
103
+ * from meta (e.g., linearId, taskGid, issueKey).
127
104
  *
128
- * @param authToken - Authorization token for access
129
105
  * @param meta - Activity metadata containing the tool's issue/task identifier
130
106
  * @param body - The comment text content
131
107
  * @param noteId - Optional Plot note ID, used by tools that support comment metadata (e.g. Jira)
132
108
  * @returns The external comment key (e.g. "comment-123") for dedup, or void
133
109
  */
134
- addIssueComment?(authToken: string, meta: ActivityMeta, body: string, noteId?: string): Promise<string | void>;
110
+ addIssueComment?(meta: ActivityMeta, body: string, noteId?: string): Promise<string | void>;
135
111
  };
136
112
  //# sourceMappingURL=projects.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/common/projects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACb,MAAM,UAAU,CAAC;AAElB;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gFAAgF;IAChF,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,oDAAoD;IACpD,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;;;;;OAMG;IACH,WAAW,CACT,KAAK,SAAS,YAAY,EAAE,EAC5B,SAAS,SAAS,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,KAAK,KAAK,GAAG,EAE5D,QAAQ,EAAE,SAAS,EACnB,GAAG,SAAS,EAAE,KAAK,GAClB,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzB;;;;;OAKG;IACH,WAAW,CAAC,SAAS,EAA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63RLbbRcI3WWwvTcTqGPBC6zqBivZYC04NnuOjeAoygIlr1GW1WlGKHgRzZI1SsYkM0JVN3HxbQgUUtXhjVaObXiGRMaSQ5sW6IEd2nRxLXhU/KitfdfdmPGB7hdlf6G0rdnHtnYic/Z625akcIhoFkcztP8++WTo5vyYNk4byH4CaY8o4x17to7Skk/riC1oul7yOqp/IedNuj8sGFvhDENZxbusQ84m0IKxFU4Z5vkb3A9c0w=="
1
+ window.hierarchyData = "eJyNkk1PxCAQhv/LnGex9GNLuW089WJM9GY2BrvoNmWLgTF72PS/G1o1eIITCTzzPgPMDZy15EG+8EIcEZx+N3qg0c4e5A14IcIyq4sGCf2ztQYQpnE+geSlQPhyBiQMRnmv/R1Za9hKsTNdArqegATyp10o220bCMN5NCen52DmHOuuwaZssC0EtqJEUdUo2ga7fYmdqI4LAuc86iWrlYxOFoS6a+Lg6+jJp6L9K60c2/C0pCljyaFPC9TIDn06uP33RffKmDc1TBkXGH5R9leUYRNlPBAz6Q+ntnFJCseIZnFpWiuqOtI+aLpaN6WN8wayn4IMTxv/0qOxlJZ8GkssoOn4bh+/3hNZp9P5PmBshTMMoopnWfmcSaCAsRVOGZblG4H2XUc="
@@ -1 +1 @@
1
- window.navigationData = "eJytm99z2zYSx/8Vj/qaOydpmrp58+nSVlfH8VjK9aGT0SAUbKEmAZUALbs3/d9vAJAUQCywq1SvwhefXSx+EMBCv/1vZviTmb2b/dSJDdezF7NqK+pNy+Xs3W+HQm6MkPdnS8NawzezF7MdM9vZu9lGVV3DpdHnvWTdS/65NU09ezF7EHIze3fx7cXF25cXf70YiXPV8rO5khXfGQ3xrGA9CDDavzpRm38IebZSqgZxg2LtFBTexjZ43mmjmjLWCtdeSKPPrxZnt/yOt1xWHGz71WI9CjDabSeNaPjZe/koWiUtAWL2snUgg8mfA/YHtenq7KioVNMoeV6xmssNaw9WG1/t3AvWgyC29xqGrp53/OyyFkxn7c573mVntgej5nkHmAy1E/svf/j+1Xevw35JGlJmYrzls6w+7o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