@plotday/twister 0.26.0 → 0.28.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 (120) hide show
  1. package/README.md +10 -4
  2. package/bin/commands/deploy.js +15 -7
  3. package/bin/commands/deploy.js.map +1 -1
  4. package/bin/templates/AGENTS.template.md +119 -33
  5. package/bin/utils/sse.js +19 -1
  6. package/bin/utils/sse.js.map +1 -1
  7. package/cli/templates/AGENTS.template.md +119 -33
  8. package/dist/common/calendar.d.ts +23 -11
  9. package/dist/common/calendar.d.ts.map +1 -1
  10. package/dist/common/messaging.d.ts +21 -6
  11. package/dist/common/messaging.d.ts.map +1 -1
  12. package/dist/common/projects.d.ts +25 -17
  13. package/dist/common/projects.d.ts.map +1 -1
  14. package/dist/docs/assets/hierarchy.js +1 -1
  15. package/dist/docs/assets/navigation.js +1 -1
  16. package/dist/docs/assets/search.js +1 -1
  17. package/dist/docs/classes/tool.Tool.html +20 -15
  18. package/dist/docs/classes/tools_ai.AI.html +1 -1
  19. package/dist/docs/classes/tools_callbacks.Callbacks.html +1 -1
  20. package/dist/docs/classes/tools_integrations.Integrations.html +1 -1
  21. package/dist/docs/classes/tools_network.Network.html +1 -1
  22. package/dist/docs/classes/tools_plot.Plot.html +2 -2
  23. package/dist/docs/classes/tools_store.Store.html +13 -4
  24. package/dist/docs/classes/tools_tasks.Tasks.html +1 -1
  25. package/dist/docs/classes/tools_twists.Twists.html +1 -1
  26. package/dist/docs/documents/Building_Custom_Tools.html +8 -2
  27. package/dist/docs/documents/Built-in_Tools.html +19 -8
  28. package/dist/docs/documents/Core_Concepts.html +14 -6
  29. package/dist/docs/documents/Getting_Started.html +11 -4
  30. package/dist/docs/documents/Runtime_Environment.html +1 -1
  31. package/dist/docs/enums/plot.ActivityLinkType.html +5 -5
  32. package/dist/docs/enums/plot.ActivityType.html +4 -4
  33. package/dist/docs/enums/plot.ActorType.html +4 -4
  34. package/dist/docs/enums/plot.ConferencingProvider.html +6 -6
  35. package/dist/docs/enums/tools_plot.ContactAccess.html +1 -1
  36. package/dist/docs/functions/index.Uuid.Generate.html +1 -0
  37. package/dist/docs/hierarchy.html +1 -1
  38. package/dist/docs/index.html +10 -0
  39. package/dist/docs/interfaces/common_calendar.CalendarTool.html +23 -13
  40. package/dist/docs/media/SYNC_STRATEGIES.md +651 -0
  41. package/dist/docs/modules/index.Uuid.html +1 -0
  42. package/dist/docs/modules/index.html +1 -1
  43. package/dist/docs/modules/plot.html +1 -1
  44. package/dist/docs/types/index.Uuid.html +1 -0
  45. package/dist/docs/types/plot.Activity.html +17 -15
  46. package/dist/docs/types/plot.ActivityCommon.html +16 -16
  47. package/dist/docs/types/plot.ActivityLink.html +1 -1
  48. package/dist/docs/types/plot.ActivityMeta.html +5 -25
  49. package/dist/docs/types/plot.ActivityUpdate.html +5 -4
  50. package/dist/docs/types/plot.ActivityWithNotes.html +1 -1
  51. package/dist/docs/types/plot.Actor.html +5 -5
  52. package/dist/docs/types/plot.ActorId.html +1 -1
  53. package/dist/docs/types/plot.ContentType.html +1 -1
  54. package/dist/docs/types/plot.NewActivity.html +32 -14
  55. package/dist/docs/types/plot.NewActivityWithNotes.html +1 -1
  56. package/dist/docs/types/plot.NewActor.html +3 -0
  57. package/dist/docs/types/plot.NewContact.html +4 -4
  58. package/dist/docs/types/plot.NewNote.html +14 -4
  59. package/dist/docs/types/plot.NewPriority.html +1 -1
  60. package/dist/docs/types/plot.NewTags.html +2 -0
  61. package/dist/docs/types/plot.Note.html +6 -3
  62. package/dist/docs/types/plot.NoteUpdate.html +7 -6
  63. package/dist/docs/types/plot.PickPriorityConfig.html +2 -2
  64. package/dist/docs/types/plot.Priority.html +3 -3
  65. package/dist/docs/types/plot.SyncUpdate.html +15 -0
  66. package/dist/docs/types/plot.Tags.html +2 -1
  67. package/dist/llm-docs/common/calendar.d.ts +1 -1
  68. package/dist/llm-docs/common/calendar.d.ts.map +1 -1
  69. package/dist/llm-docs/common/calendar.js +1 -1
  70. package/dist/llm-docs/common/calendar.js.map +1 -1
  71. package/dist/llm-docs/common/messaging.d.ts +1 -1
  72. package/dist/llm-docs/common/messaging.d.ts.map +1 -1
  73. package/dist/llm-docs/common/messaging.js +1 -1
  74. package/dist/llm-docs/common/messaging.js.map +1 -1
  75. package/dist/llm-docs/common/projects.d.ts +1 -1
  76. package/dist/llm-docs/common/projects.d.ts.map +1 -1
  77. package/dist/llm-docs/common/projects.js +1 -1
  78. package/dist/llm-docs/common/projects.js.map +1 -1
  79. package/dist/llm-docs/plot.d.ts +1 -1
  80. package/dist/llm-docs/plot.d.ts.map +1 -1
  81. package/dist/llm-docs/plot.js +1 -1
  82. package/dist/llm-docs/plot.js.map +1 -1
  83. package/dist/llm-docs/tool.d.ts +1 -1
  84. package/dist/llm-docs/tool.d.ts.map +1 -1
  85. package/dist/llm-docs/tool.js +1 -1
  86. package/dist/llm-docs/tool.js.map +1 -1
  87. package/dist/llm-docs/tools/plot.d.ts +1 -1
  88. package/dist/llm-docs/tools/plot.d.ts.map +1 -1
  89. package/dist/llm-docs/tools/plot.js +1 -1
  90. package/dist/llm-docs/tools/plot.js.map +1 -1
  91. package/dist/llm-docs/tools/store.d.ts +1 -1
  92. package/dist/llm-docs/tools/store.d.ts.map +1 -1
  93. package/dist/llm-docs/tools/store.js +1 -1
  94. package/dist/llm-docs/tools/store.js.map +1 -1
  95. package/dist/llm-docs/twist-guide-template.d.ts +1 -1
  96. package/dist/llm-docs/twist-guide-template.d.ts.map +1 -1
  97. package/dist/llm-docs/twist-guide-template.js +1 -1
  98. package/dist/llm-docs/twist-guide-template.js.map +1 -1
  99. package/dist/plot.d.ts +230 -149
  100. package/dist/plot.d.ts.map +1 -1
  101. package/dist/plot.js +1 -0
  102. package/dist/plot.js.map +1 -1
  103. package/dist/tool.d.ts +16 -2
  104. package/dist/tool.d.ts.map +1 -1
  105. package/dist/tool.js +16 -2
  106. package/dist/tool.js.map +1 -1
  107. package/dist/tools/plot.d.ts +2 -2
  108. package/dist/tools/plot.d.ts.map +1 -1
  109. package/dist/tools/plot.js +1 -1
  110. package/dist/tools/plot.js.map +1 -1
  111. package/dist/tools/store.d.ts +16 -0
  112. package/dist/tools/store.d.ts.map +1 -1
  113. package/dist/tools/store.js.map +1 -1
  114. package/dist/twist-guide.d.ts +1 -1
  115. package/dist/twist-guide.d.ts.map +1 -1
  116. package/dist/utils/uuid.d.ts +7 -0
  117. package/dist/utils/uuid.d.ts.map +1 -0
  118. package/dist/utils/uuid.js +9 -0
  119. package/dist/utils/uuid.js.map +1 -0
  120. package/package.json +9 -2
package/dist/plot.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { type Tag } from "./tag";
2
2
  import { type Callback } from "./tools/callbacks";
3
+ import { Uuid } from "./utils/uuid";
3
4
  export { Tag } from "./tag";
5
+ export { Uuid } from "./utils/uuid";
4
6
  /**
5
7
  * Represents a unique user, contact, or twist in Plot.
6
8
  *
@@ -161,110 +163,68 @@ export type ActivityLink = {
161
163
  /**
162
164
  * Represents metadata about an activity, typically from an external system.
163
165
  *
164
- * Activity metadata enables tracking where activities originated from,
165
- * which is useful for synchronization, deduplication, and linking
166
- * back to external systems.
167
- *
168
- * ## Source-Based Upsert
169
- *
170
- * When creating an activity with a `source` field, Plot automatically implements
171
- * **upsert behavior**. If an activity with the same source already exists (created
172
- * by the same twist definition), it will be **updated** instead of creating a duplicate.
173
- * This enables safe, idempotent sync operations.
174
- *
175
- * ### How Source Uniqueness Works
176
- *
177
- * - **Scoped to twist definition**: Sources are unique per twist, not per twist instance.
178
- * Different instances of the same twist (installed in different priorities) share
179
- * the same source namespace.
180
- * - **Independent twists**: Different twists can have activities with the same source value.
181
- * - **Archived activities**: Archived activities don't conflict with active ones - you can
182
- * create a new activity with the same source after archiving.
183
- * - **Optional**: Activities without sources are always created fresh - no deduplication.
184
- *
185
- * ### Upsert Behavior Details
186
- *
187
- * When an activity is upserted (updated instead of created):
188
- * - **All provided fields** are updated with new values
189
- * - **Tags** are merged (existing tags + new tags)
190
- * - **Notes** are appended (existing notes kept, new ones added)
191
- * - **Priority** is NOT changed (stays in original priority)
166
+ * Activity metadata enables storing additional information about activities,
167
+ * which is useful for synchronization, linking back to external systems,
168
+ * and storing tool-specific data.
192
169
  *
193
170
  * @example
194
171
  * ```typescript
195
- * // First call creates the activity
172
+ * // Calendar event metadata
196
173
  * await plot.createActivity({
197
174
  * type: ActivityType.Event,
198
175
  * title: "Team Meeting",
199
176
  * start: new Date("2024-01-15T10:00:00Z"),
200
- * source: "google-calendar:event-abc123",
201
177
  * meta: {
202
178
  * calendarId: "primary",
203
- * htmlLink: "https://calendar.google.com/event/abc123"
179
+ * htmlLink: "https://calendar.google.com/event/abc123",
180
+ * conferenceData: { ... }
204
181
  * }
205
182
  * });
206
183
  *
207
- * // Second call with same source updates the existing activity
184
+ * // Project issue metadata
208
185
  * await plot.createActivity({
209
- * type: ActivityType.Event,
210
- * title: "Team Meeting (Updated)", // Title will be updated
211
- * start: new Date("2024-01-15T14:00:00Z"), // Time will be updated
212
- * source: "google-calendar:event-abc123" // Same source = upsert
186
+ * type: ActivityType.Action,
187
+ * title: "Fix login bug",
188
+ * meta: {
189
+ * projectId: "TEAM",
190
+ * issueNumber: 123,
191
+ * url: "https://linear.app/team/issue/TEAM-123"
192
+ * }
213
193
  * });
214
- *
215
- * // Different twist, same source = creates new activity (independent)
216
- * // Different source = creates new activity
217
- * // No source = creates new activity (no deduplication)
218
194
  * ```
219
195
  */
220
196
  export type ActivityMeta = {
221
197
  /** Source-specific properties and metadata */
222
198
  [key: string]: any;
223
199
  };
200
+ /**
201
+ * Tags on an item, along with the actors who added each tag.
202
+ */
224
203
  export type Tags = {
225
204
  [K in Tag]?: ActorId[];
226
205
  };
227
206
  /**
228
- * Represents a complete activity within the Plot system.
229
- *
230
- * Activities are the core entities in Plot, representing anything from simple notes
231
- * to complex recurring events. They support rich metadata including scheduling,
232
- * recurrence patterns, links, and external source tracking.
233
- *
234
- * @example
235
- * ```typescript
236
- * // Simple note
237
- * const task: Activity = {
238
- * type: ActivityType.Note,
239
- * title: "New campaign brainstorming ideas",
240
- * content: "We could rent a bouncy castle...",
241
- * author: { id: "user-1", name: "John Doe", type: ActorType.User },
242
- * priority: { id: "work", title: "Work" },
243
- * // ... other fields
244
- * };
245
- *
246
- * // Simple action
247
- * const action: Activity = {
248
- * type: ActivityType.Action,
249
- * title: "Review budget proposal",
250
- * author: { id: "user-1", name: "John Doe", type: ActorType.User },
251
- * priority: { id: "work", title: "Work" },
252
- * // ... other fields
253
- * };
254
- *
255
- * // Recurring event
256
- * const meeting: Activity = {
257
- * type: ActivityType.Event,
258
- * title: "Weekly standup",
259
- * recurrenceRule: "FREQ=WEEKLY;BYDAY=MO",
260
- * recurrenceCount: 12,
261
- * // ... other fields
262
- * };
263
- * ```
207
+ * A set of tags to add to an item, along with the actors adding each tag.
208
+ */
209
+ export type NewTags = {
210
+ [K in Tag]?: NewActor[];
211
+ };
212
+ /**
213
+ * Common fields shared by both Activity and Note entities.
264
214
  */
265
215
  export type ActivityCommon = {
266
216
  /** Unique identifier for the activity */
267
- id: string;
217
+ id: Uuid;
218
+ /**
219
+ * When this activity was originally created in its source system.
220
+ *
221
+ * For activities created in Plot, this is when the user created it.
222
+ * For activities synced from external systems (GitHub issues, emails, calendar events),
223
+ * this is the original creation time in that system.
224
+ *
225
+ * Defaults to the current time when creating new activities.
226
+ */
227
+ created: Date;
268
228
  /** Information about who created the activity */
269
229
  author: Actor;
270
230
  /** Whether this activity is in draft state (not shown in do now view) */
@@ -274,71 +234,84 @@ export type ActivityCommon = {
274
234
  /** Whether this activity has been archived */
275
235
  archived: boolean;
276
236
  /** Tags attached to this activity. Maps tag ID to array of actor IDs who added that tag. */
277
- tags: Tags | null;
237
+ tags: Tags;
278
238
  /** Array of actor IDs (users, contacts, or twists) mentioned in this activity via @-mentions */
279
- mentions: ActorId[] | null;
239
+ mentions: ActorId[];
280
240
  };
281
241
  export type Activity = ActivityCommon & {
242
+ /**
243
+ * Canonical URL for the item in an external system.
244
+ * For example, https://acme.atlassian.net/browse/PROJ-42 could represent a Jira issue.
245
+ * When set, it uniquely identifies the activity within a priority tree.
246
+ */
247
+ source: string | null;
282
248
  /** The display title/summary of the activity */
283
- title: string | null;
249
+ title: string;
284
250
  /** The type of activity (Note, Task, or Event) */
285
251
  type: ActivityType;
286
252
  /**
287
253
  * The actor assigned to this activity.
288
254
  *
289
- * **For actions (tasks):** An assignee is required. If not explicitly provided when creating
290
- * an action, the assignee will default to the user who installed the twist (the twist owner).
255
+ * **For actions (tasks):**
256
+ * - If not provided (undefined), defaults to the user who installed the twist (twist owner)
257
+ * - To create an **unassigned action**, explicitly set `assignee: null`
258
+ * - For synced tasks from external systems, typically set `assignee: null` for unassigned items
291
259
  *
292
260
  * **For notes and events:** Assignee is optional and typically null.
293
261
  *
294
262
  * @example
295
263
  * ```typescript
296
- * // Create action with explicit assignee
264
+ * // Create action assigned to twist owner (default behavior)
297
265
  * const task: NewActivity = {
298
266
  * type: ActivityType.Action,
299
- * title: "Review PR #123",
300
- * assignee: {
301
- * id: userId as ActorId,
302
- * type: ActorType.User,
303
- * name: "Alice"
304
- * }
267
+ * title: "Follow up on email"
268
+ * // assignee omitted → defaults to twist owner
305
269
  * };
306
270
  *
307
- * // Create action with auto-assignment (defaults to twist owner)
308
- * const task: NewActivity = {
271
+ * // Create UNASSIGNED action (for backlog items)
272
+ * const backlogTask: NewActivity = {
309
273
  * type: ActivityType.Action,
310
- * title: "Follow up on email"
311
- * // assignee will be set automatically to twist owner
274
+ * title: "Review PR #123",
275
+ * assignee: null // Explicitly set to null
312
276
  * };
313
277
  *
314
- * // Update assignee
315
- * await plot.updateActivity({
316
- * id: activityId,
278
+ * // Create action with explicit assignee
279
+ * const assignedTask: NewActivity = {
280
+ * type: ActivityType.Action,
281
+ * title: "Deploy to production",
317
282
  * assignee: {
318
- * id: newUserId as ActorId,
283
+ * id: userId as ActorId,
319
284
  * type: ActorType.User,
320
- * name: "Bob"
285
+ * name: "Alice"
321
286
  * }
322
- * });
287
+ * };
323
288
  * ```
324
289
  */
325
290
  assignee: Actor | null;
326
291
  /** Timestamp when the activity was marked as complete. Null if not completed. */
327
- doneAt: Date | null;
292
+ done: Date | null;
328
293
  /**
329
294
  * Start time of a scheduled activity. Notes are not typically scheduled unless they're about specific times.
330
295
  * For recurring events, this represents the start of the first occurrence.
331
296
  * Can be a Date object for timed events or a date string in "YYYY-MM-DD" format for all-day events.
332
297
  *
333
298
  * **Activity Scheduling States** (for Actions):
334
- * - **Do Now** (current/actionable): When creating a NewActivity of type Action, omitting `start` defaults to current time
299
+ * - **Do Now** (current/actionable): When creating an Action, omitting `start` defaults to current time
335
300
  * - **Do Later** (future scheduled): Set `start` to a future Date or date string
336
301
  * - **Do Someday** (unscheduled backlog): Explicitly set `start: null`
337
302
  *
303
+ * **Important for synced tasks**: When syncing unassigned backlog items from external systems,
304
+ * set BOTH `start: null` AND `assignee: null` to create unscheduled, unassigned actions.
305
+ *
338
306
  * @example
339
307
  * ```typescript
340
- * // "Do Now" - defaults to current time when start is omitted
341
- * await this.tools.plot.createActivity({ type: ActivityType.Action, title: "Urgent task" });
308
+ * // "Do Now" - assigned to twist owner, actionable immediately
309
+ * await this.tools.plot.createActivity({
310
+ * type: ActivityType.Action,
311
+ * title: "Urgent task"
312
+ * // start omitted → defaults to now
313
+ * // assignee omitted → defaults to twist owner
314
+ * });
342
315
  *
343
316
  * // "Do Later" - scheduled for a specific time
344
317
  * await this.tools.plot.createActivity({
@@ -347,11 +320,12 @@ export type Activity = ActivityCommon & {
347
320
  * start: new Date("2025-02-01")
348
321
  * });
349
322
  *
350
- * // "Do Someday" - unscheduled backlog item
323
+ * // "Do Someday" - unassigned backlog item (common for synced tasks)
351
324
  * await this.tools.plot.createActivity({
352
325
  * type: ActivityType.Action,
353
326
  * title: "Backlog task",
354
- * start: null
327
+ * start: null, // Explicitly unscheduled
328
+ * assignee: null // Explicitly unassigned
355
329
  * });
356
330
  * ```
357
331
  */
@@ -393,18 +367,6 @@ export type Activity = ActivityCommon & {
393
367
  * Used to identify which occurrence of a recurring event this exception replaces.
394
368
  */
395
369
  occurrence: Date | null;
396
- /**
397
- * Unique identifier for this activity in the source system.
398
- *
399
- * Used for deduplication - activities with the same source are upserted instead
400
- * of creating duplicates. Format is typically "source-name:external-id"
401
- * (e.g., "google-calendar:event-123", "outlook:message-456").
402
- *
403
- * When provided, enables idempotent sync operations - calling createActivity()
404
- * multiple times with the same source will update the existing activity rather
405
- * than creating duplicates.
406
- */
407
- source: string | null;
408
370
  /** Metadata about the activity, typically from an external system that created it */
409
371
  meta: ActivityMeta | null;
410
372
  };
@@ -452,18 +414,24 @@ export type PickPriorityConfig = {
452
414
  * Type for creating new activities.
453
415
  *
454
416
  * Requires only the activity type, with all other fields optional.
455
- * The ID and author will be automatically assigned by the Plot system
456
- * based on the current execution context.
417
+ * The author will be automatically assigned by the Plot system based on
418
+ * the current execution context. The ID can be optionally provided by
419
+ * tools for tracking and update detection purposes.
457
420
  *
458
- * **Important: Scheduling Defaults for Actions**
421
+ * **Important: Defaults for Actions**
459
422
  *
460
- * When creating an Activity of type `Action`, the `start` field determines its scheduling state:
461
- * - **Omit `start`** → Defaults to current time → "Do Now" (appears in today's actionable list)
462
- * - **Set `start: null`**Unscheduled "Do Someday" (backlog item, no specific time)
463
- * - **Set `start` to future Date** → Scheduled → "Do Later" (appears on that date)
423
+ * When creating an Activity of type `Action`:
424
+ * - **`start` omitted** → Defaults to current time (now) → "Do Now"
425
+ * - **`assignee` omitted**Defaults to twist owner Assigned action
464
426
  *
465
- * For most external task integrations (project management, issue trackers), use `start: null`
466
- * to create backlog items unless the task is explicitly marked as current/active.
427
+ * To create unassigned backlog items (common for synced tasks), you MUST explicitly set BOTH:
428
+ * - `start: null` "Do Someday" (unscheduled)
429
+ * - `assignee: null` → Unassigned
430
+ *
431
+ * **Scheduling States**:
432
+ * - **"Do Now"** (actionable today): Omit `start` or set to current time
433
+ * - **"Do Later"** (scheduled): Set `start` to a future Date
434
+ * - **"Do Someday"** (backlog): Set `start: null`
467
435
  *
468
436
  * Priority can be specified in three ways:
469
437
  * 1. Explicit priority: `priority: { id: "..." }` - Use specific priority (disables pickPriority)
@@ -472,18 +440,20 @@ export type PickPriorityConfig = {
472
440
  *
473
441
  * @example
474
442
  * ```typescript
475
- * // "Do Now" - Action defaults to current time (actionable today)
443
+ * // "Do Now" - Assigned to twist owner, actionable immediately
476
444
  * const urgentTask: NewActivity = {
477
445
  * type: ActivityType.Action,
478
446
  * title: "Review pull request"
479
- * // Omitting start defaults to new Date()
447
+ * // start omitted → defaults to now
448
+ * // assignee omitted → defaults to twist owner
480
449
  * };
481
450
  *
482
- * // "Do Someday" - Backlog item (recommended for most synced tasks)
451
+ * // "Do Someday" - UNASSIGNED backlog item (for synced tasks)
483
452
  * const backlogTask: NewActivity = {
484
453
  * type: ActivityType.Action,
485
454
  * title: "Refactor user service",
486
- * start: null // Explicitly set to null for backlog
455
+ * start: null, // Must explicitly set to null
456
+ * assignee: null // Must explicitly set to null
487
457
  * };
488
458
  *
489
459
  * // "Do Later" - Scheduled for specific date
@@ -510,13 +480,39 @@ export type PickPriorityConfig = {
510
480
  * };
511
481
  * ```
512
482
  */
513
- export type NewActivity = Pick<Activity, "type"> & Partial<Omit<Activity, "id" | "author" | "type" | "priority" | "mentions">> & ({
483
+ export type NewActivity = Pick<Activity, "type"> & Partial<Omit<Activity, "author" | "assignee" | "type" | "priority" | "tags" | "mentions" | "id" | "source">> & ({
484
+ /**
485
+ * Unique identifier for the activity, generated by Uuid.Generate().
486
+ * Specifying an ID allows tools to track and upsert activities.
487
+ */
488
+ id: Uuid;
489
+ } | {
490
+ /**
491
+ * Canonical URL for the item in an external system.
492
+ * For example, https://acme.atlassian.net/browse/PROJ-42 could represent a Jira issue.
493
+ * When set, it uniquely identifies the activity within a priority tree. This performs
494
+ * an upsert.
495
+ */
496
+ source: string;
497
+ } | {}) & ({
514
498
  /** Explicit priority (required when specified) - disables automatic priority matching */
515
499
  priority: Pick<Priority, "id">;
516
500
  } | {
517
501
  /** Configuration for automatic priority selection based on similarity */
518
502
  pickPriority?: PickPriorityConfig;
519
- } | {}) & {
503
+ }) & {
504
+ /**
505
+ * The person that created the item. By default, it will be the twist itself.
506
+ */
507
+ author?: NewActor;
508
+ /**
509
+ * The person that assigned to the item.
510
+ */
511
+ assignee?: NewActor | null;
512
+ /**
513
+ * All tags to set on the new activity.
514
+ */
515
+ tags?: NewTags;
520
516
  /**
521
517
  * Whether the activity should be marked as unread for users.
522
518
  * - true (default): Activity is unread for all users in the priority
@@ -526,15 +522,22 @@ export type NewActivity = Pick<Activity, "type"> & Partial<Omit<Activity, "id" |
526
522
  */
527
523
  unread?: boolean;
528
524
  };
529
- export type ActivityUpdate = Pick<Activity, "id"> & Partial<Pick<Activity, "type" | "start" | "end" | "doneAt" | "title" | "assignee" | "draft" | "private" | "source" | "meta" | "recurrenceRule" | "recurrenceDates" | "recurrenceExdates" | "recurrenceUntil" | "recurrenceCount" | "occurrence">> & {
525
+ export type ActivityUpdate = ({
530
526
  /**
531
- * Full tags object from Activity. Maps tag ID to array of actor IDs who added that tag.
532
- * Only allowed for activities created by the twist.
533
- * Use twistTags instead for adding/removing the twist's tags on other activities.
527
+ * Unique identifier for the activity.
534
528
  */
535
- tags?: {
536
- [K in Tag]?: ActorId[];
537
- };
529
+ id: Uuid;
530
+ } | {
531
+ /**
532
+ * Canonical URL for the item in an external system.
533
+ */
534
+ source: string;
535
+ }) & Partial<Pick<Activity, "type" | "start" | "end" | "done" | "title" | "assignee" | "draft" | "private" | "meta" | "recurrenceRule" | "recurrenceDates" | "recurrenceExdates" | "recurrenceUntil" | "recurrenceCount" | "occurrence">> & {
536
+ /**
537
+ * Tags to change on the activity. Use an empty array of NewActor to remove a tag.
538
+ * Use twistTags to add/remove the twist from tags to avoid clearing other actors' tags.
539
+ */
540
+ tags?: NewTags;
538
541
  /**
539
542
  * Add or remove the twist's tags.
540
543
  * Maps tag ID to boolean: true = add tag, false = remove tag.
@@ -542,13 +545,55 @@ export type ActivityUpdate = Pick<Activity, "id"> & Partial<Pick<Activity, "type
542
545
  */
543
546
  twistTags?: Partial<Record<Tag, boolean>>;
544
547
  };
548
+ /**
549
+ * Represents a sync update from a tool.
550
+ *
551
+ * Tools that sync from external sources can send either:
552
+ * - A new activity with notes (for newly discovered items)
553
+ * - An update to an existing activity with optional new notes (for changed items)
554
+ *
555
+ * This allows tools to manage their own update detection logic locally,
556
+ * providing Plot with the appropriate operation to perform.
557
+ *
558
+ * @example
559
+ * ```typescript
560
+ * // Send a new activity
561
+ * const newItem: SyncUpdate = {
562
+ * type: ActivityType.Event,
563
+ * title: "New Meeting",
564
+ * id: Uuid.Generate(), // Tool-generated ID
565
+ * notes: [{ id: Uuid.Generate(), content: "Description" }]
566
+ * };
567
+ *
568
+ * // Send an update to existing activity
569
+ * const update: SyncUpdate = {
570
+ * activityId: existingActivityId,
571
+ * update: { title: "Updated Meeting Title" },
572
+ * notes: [{ id: Uuid.Generate(), content: "New comment" }]
573
+ * };
574
+ * ```
575
+ */
576
+ export type SyncUpdate = NewActivityWithNotes | {
577
+ /** ID of the activity to update */
578
+ activityId: string;
579
+ /** Optional updates to the activity itself */
580
+ update?: ActivityUpdate;
581
+ /** Optional new notes to add to the activity */
582
+ notes?: NewNote[];
583
+ };
545
584
  /**
546
585
  * Represents a note within an activity.
547
586
  *
548
587
  * Notes contain the detailed content (note text, links) associated with an activity.
549
588
  * They are always ordered by creation time within their parent activity.
550
589
  */
551
- export type Note = Omit<ActivityCommon, "type"> & {
590
+ export type Note = ActivityCommon & {
591
+ /**
592
+ * Unique identifier for the note within its activity.
593
+ * Can be used to upsert without knowing the id.
594
+ * For example, "description" could identify the description note for a Jira issue.
595
+ */
596
+ key: string | null;
552
597
  /** The parent activity this note belongs to */
553
598
  activity: Activity;
554
599
  /** Primary content for the note (markdown) */
@@ -560,10 +605,24 @@ export type Note = Omit<ActivityCommon, "type"> & {
560
605
  * Type for creating new notes.
561
606
  *
562
607
  * Requires the activity reference, with all other fields optional.
608
+ * Can provide id, key, or neither for note identification:
609
+ * - id: Provide a specific UUID for the note
610
+ * - key: Provide an external identifier for upsert within the activity
611
+ * - neither: A new note with auto-generated UUID will be created
563
612
  */
564
- export type NewNote = Partial<Omit<Note, "id" | "author" | "activity">> & {
613
+ export type NewNote = Partial<Omit<Note, "author" | "activity" | "tags" | "mentions" | "id" | "key">> & ({
614
+ id: Uuid;
615
+ } | {
616
+ key: string;
617
+ } | {}) & {
565
618
  /** Reference to the parent activity (required) */
566
- activity: Pick<Activity, "id">;
619
+ activity: Pick<Activity, "id"> | {
620
+ source: string;
621
+ };
622
+ /**
623
+ * The person that created the item, or leave undefined to use the twist as author.
624
+ */
625
+ author?: NewActor;
567
626
  /**
568
627
  * Format of the note content. Determines how the note is processed:
569
628
  * - 'text': Plain text that will be converted to markdown (auto-links URLs, preserves line breaks)
@@ -571,6 +630,15 @@ export type NewNote = Partial<Omit<Note, "id" | "author" | "activity">> & {
571
630
  * - 'html': HTML content that will be converted to markdown
572
631
  */
573
632
  contentType?: ContentType;
633
+ /**
634
+ * Tags to change on the activity. Use an empty array of NewActor to remove a tag.
635
+ * Use twistTags to add/remove the twist from tags to avoid clearing other actors' tags.
636
+ */
637
+ tags?: NewTags;
638
+ /**
639
+ * Change the mentions on the note.
640
+ */
641
+ mentions?: NewActor[];
574
642
  /**
575
643
  * Whether the note should mark the parent activity as unread for users.
576
644
  * - true (default): Activity becomes unread for users who haven't authored the note
@@ -582,8 +650,13 @@ export type NewNote = Partial<Omit<Note, "id" | "author" | "activity">> & {
582
650
  };
583
651
  /**
584
652
  * Type for updating existing notes.
653
+ * Must provide either id or key to identify the note to update.
585
654
  */
586
- export type NoteUpdate = Pick<Note, "id"> & Partial<Pick<Note, "draft" | "private" | "content" | "links" | "mentions">> & {
655
+ export type NoteUpdate = ({
656
+ id: Uuid;
657
+ } | {
658
+ key: string;
659
+ }) & Partial<Pick<Note, "draft" | "private" | "content" | "links">> & {
587
660
  /**
588
661
  * Format of the note content. Determines how the note is processed:
589
662
  * - 'text': Plain text that will be converted to markdown (auto-links URLs, preserves line breaks)
@@ -592,19 +665,20 @@ export type NoteUpdate = Pick<Note, "id"> & Partial<Pick<Note, "draft" | "privat
592
665
  */
593
666
  contentType?: ContentType;
594
667
  /**
595
- * Full tags object from Note. Maps tag ID to array of actor IDs who added that tag.
596
- * Only allowed for notes created by the twist.
597
- * Use twistTags instead for adding/removing the twist's tags on other notes.
668
+ * Tags to change on the note. Use an empty array of NewActor to remove a tag.
669
+ * Use twistTags to add/remove the twist from tags to avoid clearing other actors' tags.
598
670
  */
599
- tags?: {
600
- [K in Tag]?: ActorId[];
601
- };
671
+ tags?: NewTags;
602
672
  /**
603
673
  * Add or remove the twist's tags.
604
674
  * Maps tag ID to boolean: true = add tag, false = remove tag.
605
675
  * This is allowed on all notes the twist has access to.
606
676
  */
607
677
  twistTags?: Partial<Record<Tag, boolean>>;
678
+ /**
679
+ * Change the mentions on the note.
680
+ */
681
+ mentions?: NewActor[];
608
682
  };
609
683
  /**
610
684
  * Represents an actor in Plot - a user, contact, or twist.
@@ -632,6 +706,13 @@ export type Actor = {
632
706
  /** Display name (undefined if not included due to permissions, null if not set) */
633
707
  name?: string | null;
634
708
  };
709
+ /**
710
+ * An existing or new contact.
711
+ */
712
+ export type NewActor = {
713
+ /** Unique identifier for the actor */
714
+ id: ActorId;
715
+ } | NewContact;
635
716
  /**
636
717
  * Enumeration of author types that can create activities.
637
718
  *
@@ -1 +1 @@
1
- {"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../src/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG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ACH,MAAM,MAAM,QAAQ,GAChB;IACE,sCAAsC;IACtC,EAAE,EAAE,OAAO,CAAC;CACb,GACD,UAAU,CAAC;AAEf;;;;;GAKG;AACH,oBAAY,SAAS;IACnB,wCAAwC;IACxC,IAAI,IAAA;IACJ,8CAA8C;IAC9C,OAAO,IAAA;IACP,6CAA6C;IAC7C,KAAK,IAAA;CACN;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC"}
package/dist/plot.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { Tag } from "./tag";
2
+ export { Uuid } from "./utils/uuid";
2
3
  /**
3
4
  * Enumeration of supported activity types in Plot.
4
5
  *
package/dist/plot.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"plot.js","sourceRoot":"","sources":["../src/plot.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAqC5B;;;;;GAKG;AACH,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,qEAAqE;IACrE,+CAAI,CAAA;IACJ,+CAA+C;IAC/C,mDAAM,CAAA;IACN,8DAA8D;IAC9D,iDAAK,CAAA;AACP,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B,8CAA8C;IAC9C,yCAAqB,CAAA;IACrB,mDAAmD;IACnD,iCAAa,CAAA;IACb,6DAA6D;IAC7D,yCAAqB,CAAA;IACrB,+DAA+D;IAC/D,iDAA6B,CAAA;AAC/B,CAAC,EATW,gBAAg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