@plotday/twister 0.21.0 → 0.26.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 (186) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +35 -6
  3. package/bin/commands/deploy.js +234 -2
  4. package/bin/commands/deploy.js.map +1 -1
  5. package/bin/commands/generate.js +11 -2
  6. package/bin/commands/generate.js.map +1 -1
  7. package/bin/commands/login.js +19 -3
  8. package/bin/commands/login.js.map +1 -1
  9. package/bin/commands/priority-create.js +7 -2
  10. package/bin/commands/priority-create.js.map +1 -1
  11. package/bin/commands/priority-list.js +6 -1
  12. package/bin/commands/priority-list.js.map +1 -1
  13. package/bin/commands/twist-logs.js +12 -3
  14. package/bin/commands/twist-logs.js.map +1 -1
  15. package/bin/templates/AGENTS.template.md +109 -20
  16. package/bin/utils/bundle.js +40 -0
  17. package/bin/utils/bundle.js.map +1 -1
  18. package/bin/utils/network-error.js +149 -0
  19. package/bin/utils/network-error.js.map +1 -0
  20. package/cli/templates/AGENTS.template.md +109 -20
  21. package/dist/common/calendar.d.ts +12 -4
  22. package/dist/common/calendar.d.ts.map +1 -1
  23. package/dist/common/messaging.d.ts +8 -7
  24. package/dist/common/messaging.d.ts.map +1 -1
  25. package/dist/common/projects.d.ts +123 -0
  26. package/dist/common/projects.d.ts.map +1 -0
  27. package/dist/common/projects.js +2 -0
  28. package/dist/common/projects.js.map +1 -0
  29. package/dist/docs/assets/hierarchy.js +1 -1
  30. package/dist/docs/assets/highlight.css +6 -6
  31. package/dist/docs/assets/navigation.js +1 -1
  32. package/dist/docs/assets/search.js +1 -1
  33. package/dist/docs/classes/tool.ITool.html +1 -1
  34. package/dist/docs/classes/tool.Tool.html +5 -5
  35. package/dist/docs/classes/tools_ai.AI.html +3 -3
  36. package/dist/docs/classes/tools_callbacks.Callbacks.html +4 -4
  37. package/dist/docs/classes/tools_integrations.Integrations.html +1 -1
  38. package/dist/docs/classes/tools_network.Network.html +4 -4
  39. package/dist/docs/classes/tools_plot.Plot.html +64 -29
  40. package/dist/docs/classes/tools_store.Store.html +1 -1
  41. package/dist/docs/classes/tools_tasks.Tasks.html +2 -2
  42. package/dist/docs/classes/tools_twists.Twists.html +5 -5
  43. package/dist/docs/classes/twist.Twist.html +1 -1
  44. package/dist/docs/documents/Building_Custom_Tools.html +5 -6
  45. package/dist/docs/documents/Built-in_Tools.html +33 -14
  46. package/dist/docs/documents/Core_Concepts.html +59 -8
  47. package/dist/docs/documents/Getting_Started.html +19 -3
  48. package/dist/docs/documents/Runtime_Environment.html +7 -8
  49. package/dist/docs/enums/plot.ActivityLinkType.html +5 -5
  50. package/dist/docs/enums/plot.ActivityType.html +4 -4
  51. package/dist/docs/enums/plot.ActorType.html +4 -4
  52. package/dist/docs/enums/plot.ConferencingProvider.html +6 -6
  53. package/dist/docs/enums/tag.Tag.html +3 -4
  54. package/dist/docs/enums/tools_plot.ActivityAccess.html +6 -6
  55. package/dist/docs/enums/tools_plot.ContactAccess.html +3 -3
  56. package/dist/docs/enums/tools_plot.PriorityAccess.html +3 -3
  57. package/dist/docs/functions/utils_hash.quickHash.html +1 -0
  58. package/dist/docs/hierarchy.html +1 -1
  59. package/dist/docs/index.html +2 -11
  60. package/dist/docs/interfaces/common_calendar.CalendarTool.html +14 -8
  61. package/dist/docs/interfaces/tools_ai.AIRequest.html +4 -4
  62. package/dist/docs/interfaces/tools_ai.AIResponse.html +2 -2
  63. package/dist/docs/interfaces/tools_twists.TwistSource.html +1 -1
  64. package/dist/docs/modules/index.html +1 -1
  65. package/dist/docs/modules/plot.html +1 -1
  66. package/dist/docs/modules/tools_plot.html +1 -1
  67. package/dist/docs/modules/utils_hash.html +1 -0
  68. package/dist/docs/modules.html +1 -1
  69. package/dist/docs/types/plot.Activity.html +37 -52
  70. package/dist/docs/types/plot.ActivityCommon.html +22 -0
  71. package/dist/docs/types/plot.ActivityLink.html +1 -1
  72. package/dist/docs/types/plot.ActivityMeta.html +24 -6
  73. package/dist/docs/types/plot.ActivityUpdate.html +2 -8
  74. package/dist/docs/types/plot.ActivityWithNotes.html +1 -0
  75. package/dist/docs/types/plot.Actor.html +5 -5
  76. package/dist/docs/types/plot.ActorId.html +8 -3
  77. package/dist/docs/types/plot.ContentType.html +1 -0
  78. package/dist/docs/types/plot.NewActivity.html +18 -3
  79. package/dist/docs/types/plot.NewActivityWithNotes.html +1 -0
  80. package/dist/docs/types/plot.NewContact.html +4 -4
  81. package/dist/docs/types/plot.NewNote.html +16 -0
  82. package/dist/docs/types/plot.NewPriority.html +1 -1
  83. package/dist/docs/types/plot.Note.html +7 -0
  84. package/dist/docs/types/plot.NoteUpdate.html +14 -0
  85. package/dist/docs/types/plot.PickPriorityConfig.html +3 -3
  86. package/dist/docs/types/plot.Priority.html +3 -3
  87. package/dist/docs/types/plot.Tags.html +1 -0
  88. package/dist/docs/types/tools_ai.DataContent.html +1 -1
  89. package/dist/docs/types/tools_network.WebhookRequest.html +4 -2
  90. package/dist/docs/types/{tools_plot.ActivityIntentHandler.html → tools_plot.NoteIntentHandler.html} +5 -5
  91. package/dist/llm-docs/common/calendar.d.ts +2 -2
  92. package/dist/llm-docs/common/calendar.d.ts.map +1 -1
  93. package/dist/llm-docs/common/calendar.js +2 -2
  94. package/dist/llm-docs/common/calendar.js.map +1 -1
  95. package/dist/llm-docs/common/messaging.d.ts +2 -2
  96. package/dist/llm-docs/common/messaging.d.ts.map +1 -1
  97. package/dist/llm-docs/common/messaging.js +2 -2
  98. package/dist/llm-docs/common/messaging.js.map +1 -1
  99. package/dist/llm-docs/common/projects.d.ts +9 -0
  100. package/dist/llm-docs/common/projects.d.ts.map +1 -0
  101. package/dist/llm-docs/common/projects.js +8 -0
  102. package/dist/llm-docs/common/projects.js.map +1 -0
  103. package/dist/llm-docs/index.d.ts +1 -1
  104. package/dist/llm-docs/index.js +17 -17
  105. package/dist/llm-docs/index.js.map +1 -1
  106. package/dist/llm-docs/plot.d.ts +2 -2
  107. package/dist/llm-docs/plot.d.ts.map +1 -1
  108. package/dist/llm-docs/plot.js +2 -2
  109. package/dist/llm-docs/plot.js.map +1 -1
  110. package/dist/llm-docs/tag.d.ts +2 -2
  111. package/dist/llm-docs/tag.d.ts.map +1 -1
  112. package/dist/llm-docs/tag.js +2 -2
  113. package/dist/llm-docs/tag.js.map +1 -1
  114. package/dist/llm-docs/tool.d.ts +2 -2
  115. package/dist/llm-docs/tool.d.ts.map +1 -1
  116. package/dist/llm-docs/tool.js +2 -2
  117. package/dist/llm-docs/tool.js.map +1 -1
  118. package/dist/llm-docs/tools/ai.d.ts +2 -2
  119. package/dist/llm-docs/tools/ai.d.ts.map +1 -1
  120. package/dist/llm-docs/tools/ai.js +2 -2
  121. package/dist/llm-docs/tools/ai.js.map +1 -1
  122. package/dist/llm-docs/tools/callbacks.d.ts +2 -2
  123. package/dist/llm-docs/tools/callbacks.d.ts.map +1 -1
  124. package/dist/llm-docs/tools/callbacks.js +2 -2
  125. package/dist/llm-docs/tools/callbacks.js.map +1 -1
  126. package/dist/llm-docs/tools/integrations.d.ts +1 -1
  127. package/dist/llm-docs/tools/integrations.js +1 -1
  128. package/dist/llm-docs/tools/network.d.ts +2 -2
  129. package/dist/llm-docs/tools/network.d.ts.map +1 -1
  130. package/dist/llm-docs/tools/network.js +2 -2
  131. package/dist/llm-docs/tools/network.js.map +1 -1
  132. package/dist/llm-docs/tools/plot.d.ts +2 -2
  133. package/dist/llm-docs/tools/plot.d.ts.map +1 -1
  134. package/dist/llm-docs/tools/plot.js +2 -2
  135. package/dist/llm-docs/tools/plot.js.map +1 -1
  136. package/dist/llm-docs/tools/store.d.ts +1 -1
  137. package/dist/llm-docs/tools/store.js +1 -1
  138. package/dist/llm-docs/tools/tasks.d.ts +1 -1
  139. package/dist/llm-docs/tools/tasks.js +1 -1
  140. package/dist/llm-docs/tools/twists.d.ts +2 -2
  141. package/dist/llm-docs/tools/twists.d.ts.map +1 -1
  142. package/dist/llm-docs/tools/twists.js +2 -2
  143. package/dist/llm-docs/tools/twists.js.map +1 -1
  144. package/dist/llm-docs/twist-guide-template.d.ts +1 -1
  145. package/dist/llm-docs/twist-guide-template.d.ts.map +1 -1
  146. package/dist/llm-docs/twist-guide-template.js +1 -1
  147. package/dist/llm-docs/twist-guide-template.js.map +1 -1
  148. package/dist/llm-docs/twist.d.ts +1 -1
  149. package/dist/llm-docs/twist.js +1 -1
  150. package/dist/plot.d.ts +271 -61
  151. package/dist/plot.d.ts.map +1 -1
  152. package/dist/plot.js.map +1 -1
  153. package/dist/tag.d.ts +2 -3
  154. package/dist/tag.d.ts.map +1 -1
  155. package/dist/tag.js +2 -3
  156. package/dist/tag.js.map +1 -1
  157. package/dist/tool.d.ts +2 -2
  158. package/dist/tool.d.ts.map +1 -1
  159. package/dist/tool.js +1 -1
  160. package/dist/tool.js.map +1 -1
  161. package/dist/tools/ai.d.ts +2 -2
  162. package/dist/tools/ai.d.ts.map +1 -1
  163. package/dist/tools/callbacks.d.ts +1 -1
  164. package/dist/tools/callbacks.d.ts.map +1 -1
  165. package/dist/tools/network.d.ts +2 -0
  166. package/dist/tools/network.d.ts.map +1 -1
  167. package/dist/tools/network.js.map +1 -1
  168. package/dist/tools/plot.d.ts +150 -29
  169. package/dist/tools/plot.d.ts.map +1 -1
  170. package/dist/tools/plot.js +4 -4
  171. package/dist/tools/plot.js.map +1 -1
  172. package/dist/tools/twists.d.ts +2 -2
  173. package/dist/twist-guide.d.ts +1 -1
  174. package/dist/twist-guide.d.ts.map +1 -1
  175. package/dist/utils/hash.d.ts +2 -0
  176. package/dist/utils/hash.d.ts.map +1 -0
  177. package/dist/utils/hash.js +9 -0
  178. package/dist/utils/hash.js.map +1 -0
  179. package/package.json +56 -2
  180. package/tsconfig.base.json +1 -0
  181. package/dist/docs/documents/Advanced.html +0 -91
  182. package/dist/docs/types/plot.NoteType.html +0 -1
  183. package/dist/llm-docs/creator-docs.d.ts +0 -9
  184. package/dist/llm-docs/creator-docs.d.ts.map +0 -1
  185. package/dist/llm-docs/creator-docs.js +0 -8
  186. package/dist/llm-docs/creator-docs.js.map +0 -1
@@ -4,5 +4,5 @@
4
4
  * This file is auto-generated during build. Do not edit manually.
5
5
  * Generated from: cli/templates/AGENTS.template.md
6
6
  */
7
- export default "# Twist Implementation Guide for LLMs\n\nThis document provides context for AI assistants generating or modifying twists.\n\n## Architecture Overview\n\nPlot Twists are TypeScript classes that extend the `Twist` base class. Twists interact with external services and Plot's core functionality through a tool-based architecture.\n\n### Runtime Environment\n\n**Critical**: All Twists and tool functions are executed in a sandboxed, ephemeral environment with limited resources:\n\n- **Memory is temporary**: Anything stored in memory (e.g. as a variable in the twist/tool object) is lost after the function completes. Use the Store tool instead. Only use memory for temporary caching.\n- **Limited CPU time**: Each execution has limited CPU time (typically 10 seconds) and memory (128MB)\n- **Use the Run tool**: Queue separate chunks of work with `run.now(functionName, context)`\n- **Break long operations**: Split large operations into smaller batches that can be processed independently\n- **Store intermediate state**: Use the Store tool to persist state between batches\n- **Examples**: Syncing large datasets, processing many API calls, or performing batch operations\n\n## twist Structure Pattern\n\n```typescript\nimport {\n type Activity,\n twist,\n type Priority,\n type ToolBuilder,\n} from \"@plotday/twister\";\nimport { Plot } from \"@plotday/twister/tools/plot\";\n\nexport default class MyTwist extends Twist<MyTwist> {\n build(build: ToolBuilder) {\n return {\n plot: build(Plot),\n };\n }\n\n async activate(priority: Pick<Priority, \"id\">) {\n // Called when twist is enabled for a priority\n // Common actions: request auth, create setup activities\n }\n\n async activity(activity: Activity) {\n // Called when an activity is routed to this twist\n // Common actions: process external events, update activities\n }\n}\n```\n\n## Tool System\n\n### Accessing Tools\n\nAll tools are declared in the `build` method:\n\n```typescript\nbuild(build: ToolBuilder) {\n return {\n toolName: build(ToolClass),\n };\n}\n```\n\nAll `build()` calls must occur in the `build` method as they are used for dependency analysis.\n\nIMPORTANT: HTTP access is restricted to URLs requested via `build(Network, { urls: [url1, url2, ...] })` in the `build` method. Wildcards are supported. Use `build(Network, { urls: ['*'] })` if full access is needed.\n\n### Built-in Tools (Always Available)\n\nFor complete API documentation of built-in tools including all methods, types, and detailed examples, see the TypeScript definitions in your installed package at `node_modules/@plotday/twister/src/tools/*.ts`. Each tool file contains comprehensive JSDoc documentation.\n\n**Quick reference - Available tools:**\n\n- `@plotday/twister/tools/plot` - Core data layer (create/update activities, priorities, contacts)\n- `@plotday/twister/tools/ai` - LLM integration (text generation, structured output, reasoning)\n - Use ModelPreferences to specify `speed` (fast/balanced/capable) and `cost` (low/medium/high)\n- `@plotday/twister/tools/store` - Persistent key-value storage (also via `this.set()`, `this.get()`)\n- `@plotday/twister/tools/tasks` - Queue batched work (also via `this.run()`)\n- `@plotday/twister/tools/callbacks` - Persistent function references (also via `this.callback()`)\n- `@plotday/twister/tools/integrations` - OAuth2 authentication flows\n- `@plotday/twister/tools/network` - HTTP access permissions and webhook management\n- `@plotday/twister/tools/twists` - Manage other Twists\n\n**Critical**: Never use instance variables for state. They are lost after function execution. Always use Store methods.\n\n### External Tools (Add to package.json)\n\nAdd tool dependencies to `package.json`:\n\n```json\n{\n \"dependencies\": {\n \"@plotday/twister\": \"workspace:^\",\n \"@plotday/tool-google-calendar\": \"workspace:^\"\n }\n}\n```\n\n#### Common External Tools\n\n- `@plotday/tool-google-calendar`: Google Calendar integration\n- `@plotday/tool-outlook-calendar`: Outlook Calendar integration\n- `@plotday/tool-google-contacts`: Google Contacts integration\n\n## Lifecycle Methods\n\n### activate(priority: Pick<Priority, \"id\">)\n\nCalled when the twist is enabled for a priority. Common patterns:\n\n**Request Authentication:**\n\n```typescript\nasync activate(_priority: Pick<Priority, \"id\">) {\n const authLink = await this.tools.externalTool.requestAuth(\n this.onAuthComplete,\n \"google\"\n );\n\n await this.tools.plot.createActivity({\n type: ActivityType.Action,\n title: \"Connect your account\",\n links: [authLink],\n });\n}\n```\n\n**Store Parent Activity for Later:**\n\n```typescript\nconst activity = await this.tools.plot.createActivity({\n type: ActivityType.Action,\n title: \"Setup\",\n});\n\nawait this.set(\"setup_activity_id\", activity.id);\n```\n\n### activity(activity: Activity)\n\nCalled when an activity is routed to the twist. Common patterns:\n\n**Create Activities from External Events:**\n\n```typescript\nasync activity(activity: Activity) {\n await this.tools.plot.createActivity(activity);\n}\n```\n\n**Update Based on User Action:**\n\n```typescript\nasync activity(activity: Activity) {\n if (activity.completed) {\n await this.handleCompletion(activity);\n }\n}\n```\n\n## Activity Links\n\nActivity links enable user interaction:\n\n```typescript\nimport { type ActivityLink, ActivityLinkType } from \"@plotday/twister\";\n\n// URL link\nconst urlLink: ActivityLink = {\n title: \"Open website\",\n type: ActivityLinkType.url,\n url: \"https://example.com\",\n};\n\n// Callback link (uses Callbacks tool)\nconst token = await this.callback(this.onLinkClicked, \"context\");\nconst callbackLink: ActivityLink = {\n title: \"Click me\",\n type: ActivityLinkType.callback,\n token: token,\n};\n\n// Add to activity\nawait this.tools.plot.createActivity({\n type: ActivityType.Action,\n title: \"Task with links\",\n links: [urlLink, callbackLink],\n});\n```\n\n## Authentication Pattern\n\nCommon pattern for OAuth authentication:\n\n```typescript\nasync activate(_priority: Pick<Priority, \"id\">) {\n // Request auth link from tool with callback\n const authLink = await this.tools.googleTool.requestAuth(\n this.onAuthComplete,\n \"google\"\n );\n\n // Create activity with auth link\n const activity = await this.tools.plot.createActivity({\n type: ActivityType.Action,\n title: \"Connect Google account\",\n links: [authLink],\n });\n\n // Store for later use\n await this.set(\"auth_activity_id\", activity.id);\n}\n\nasync onAuthComplete(authResult: { authToken: string }, provider: string) {\n // Store auth token\n await this.set(`${provider}_auth`, authResult.authToken);\n\n // Continue setup flow\n await this.setupSyncOptions(authResult.authToken);\n}\n```\n\n## Sync Pattern\n\nPattern for syncing external data with callbacks:\n\n```typescript\nasync startSync(calendarId: string): Promise<void> {\n const authToken = await this.get<string>(\"auth_token\");\n\n await this.tools.calendarTool.startSync(\n authToken,\n calendarId,\n this.handleEvent,\n calendarId\n );\n}\n\nasync handleEvent(activity: Activity, calendarId: string): Promise<void> {\n // Process incoming event from external service\n await this.tools.plot.createActivity(activity);\n}\n\nasync stopSync(calendarId: string): Promise<void> {\n const authToken = await this.get<string>(\"auth_token\");\n await this.tools.calendarTool.stopSync(authToken, calendarId);\n}\n```\n\n## Calendar Selection Pattern\n\nPattern for letting users select from multiple calendars/accounts:\n\n```typescript\nprivate async createCalendarSelectionActivity(\n provider: string,\n calendars: Calendar[],\n authToken: string\n): Promise<void> {\n const links: ActivityLink[] = [];\n\n for (const calendar of calendars) {\n const token = await this.callback(\n this.onCalendarSelected,\n provider,\n calendar.id,\n calendar.name,\n authToken\n );\n\n links.push({\n title: `📅 ${calendar.name}${calendar.primary ? \" (Primary)\" : \"\"}`,\n type: ActivityLinkType.callback,\n token: token,\n });\n }\n\n await this.tools.plot.createActivity({\n type: ActivityType.Note,\n title: \"Which calendars would you like to connect?\",\n links,\n });\n}\n\nasync onCalendarSelected(\n link: ActivityLink,\n provider: string,\n calendarId: string,\n calendarName: string,\n authToken: string\n): Promise<void> {\n // Start sync for selected calendar\n await this.tools.tool.startSync(\n authToken,\n calendarId,\n this.handleEvent,\n provider,\n calendarId\n );\n}\n```\n\n## Batch Processing Pattern\n\n**Important**: Because Twists run in an ephemeral environment with limited execution time, you must break long operations into batches. Each batch runs independently in a new execution context.\n\n### Key Principles\n\n1. **Store state between batches**: Use the Store tool to persist progress\n2. **Queue next batch**: Use the Run tool to schedule the next chunk\n3. **Clean up when done**: Delete stored state after completion\n4. **Handle failures**: Store enough state to resume if a batch fails\n\n### Example Implementation\n\n```typescript\nasync startSync(resourceId: string): Promise<void> {\n // Initialize state in Store (persists between executions)\n await this.set(`sync_state_${resourceId}`, {\n nextPageToken: null,\n batchNumber: 1,\n itemsProcessed: 0,\n });\n\n // Queue first batch using runTask method\n const callback = await this.callback(this.syncBatch, resourceId);\n await this.runTask(callback);\n}\n\nasync syncBatch(args: any, resourceId: string): Promise<void> {\n // Load state from Store (set by previous execution)\n const state = await this.get(`sync_state_${resourceId}`);\n\n // Process one batch (keep under time limit)\n const result = await this.fetchBatch(state.nextPageToken);\n\n // Process results\n for (const item of result.items) {\n await this.tools.plot.createActivity(item);\n }\n\n if (result.nextPageToken) {\n // Update state in Store for next batch\n await this.set(`sync_state_${resourceId}`, {\n nextPageToken: result.nextPageToken,\n batchNumber: state.batchNumber + 1,\n itemsProcessed: state.itemsProcessed + result.items.length,\n });\n\n // Queue next batch (runs in new execution context)\n const nextCallback = await this.callback(this.syncBatch, resourceId);\n await this.runTask(nextCallback);\n } else {\n // Cleanup when complete\n await this.clear(`sync_state_${resourceId}`);\n\n // Optionally notify user of completion\n await this.tools.plot.createActivity({\n type: ActivityType.Note,\n note: `Sync complete: ${state.itemsProcessed + result.items.length} items processed`,\n });\n }\n}\n```\n\n## Error Handling\n\nAlways handle errors gracefully and communicate them to users:\n\n```typescript\ntry {\n await this.externalOperation();\n} catch (error) {\n console.error(\"Operation failed:\", error);\n\n await this.tools.plot.createActivity({\n type: ActivityType.Note,\n note: `Failed to complete operation: ${error.message}`,\n });\n}\n```\n\n## Common Pitfalls\n\n- **Don't use instance variables for state** - Anything stored in memory is lost after function execution. Always use the Store tool for data that needs to persist.\n- **Processing self-created activities** - Other users may change an Activity created by the twist, resulting in an \\`activity\\` call. Be sure to check the \\`changes === null\\` and/or \\`activity.author.id !== this.id\\` to avoid re-processing.\n- Most activity should be `type = ActivityType.Note` with a `title` and `note`, and no `start` or `end`. This represents a typical message. `start` and `end` should only be used for a note if it should be displayed for a specific date or time, such as a birthday.\n- Tools are declared in the `build` method and accessed via `this.tools.toolName` in twist methods.\n- **Don't forget runtime limits** - Each execution has ~10 seconds. Break long operations into batches with the Tasks tool. Process enough items per batch to be efficient, but few enough to stay under time limits.\n- **Always use Callbacks tool for persistent references** - Direct function references don't survive worker restarts.\n- **Store auth tokens** - Don't re-request authentication unnecessarily.\n- **Clean up callbacks and stored state** - Delete callbacks and Store entries when no longer needed.\n- **Handle missing auth gracefully** - Check for stored auth before operations.\n\n## Testing\n\nBefore deploying, verify:\n\n1. Linting passes: `{{packageManager}} lint`\n2. All dependencies are in package.json\n3. Authentication flow works end-to-end\n4. Batch operations handle pagination correctly\n5. Error cases are handled gracefully\n";
7
+ export default "# Twist Implementation Guide for LLMs\n\nThis document provides context for AI assistants generating or modifying twists.\n\n## Architecture Overview\n\nPlot Twists are TypeScript classes that extend the `Twist` base class. Twists interact with external services and Plot's core functionality through a tool-based architecture.\n\n### Runtime Environment\n\n**Critical**: All Twists and tool functions are executed in a sandboxed, ephemeral environment with limited resources:\n\n- **Memory is temporary**: Anything stored in memory (e.g. as a variable in the twist/tool object) is lost after the function completes. Use the Store tool instead. Only use memory for temporary caching.\n- **Limited CPU time**: Each execution has limited CPU time (typically 10 seconds) and memory (128MB)\n- **Use the Run tool**: Queue separate chunks of work with `run.now(functionName, context)`\n- **Break long operations**: Split large operations into smaller batches that can be processed independently\n- **Store intermediate state**: Use the Store tool to persist state between batches\n- **Examples**: Syncing large datasets, processing many API calls, or performing batch operations\n\n## Understanding Activities and Notes\n\n**CRITICAL CONCEPT**: An **Activity** represents something done or to be done (a task, event, or conversation), while **Notes** represent the updates and details on that activity.\n\n**Think of an Activity as a thread** on a messaging platform, and **Notes as the messages in that thread**.\n\n### Key Guidelines\n\n1. **Always create Activities with an initial Note** - The title is just a summary; detailed content goes in Notes\n2. **Add Notes to existing Activities for updates** - Don't create a new Activity for each related message\n3. **Use `source` field for deduplication** - Enables safe, idempotent sync from external systems\n4. **Most Activities should be `ActivityType.Note`** - Use `Action` only for tasks with `doneAt`, use `Event` only for items with `start`/`end`\n\n### Decision Tree\n\n```\nNew event/task/conversation?\n ├─ Yes → Create new Activity with initial Note\n │ Include `source` field for deduplication\n │\n └─ No (update/reply/comment) → Check for existing Activity\n ├─ Found → Add Note to existing Activity\n └─ Not found → Create new Activity with initial Note\n```\n\n## Twist Structure Pattern\n\n```typescript\nimport {\n type Activity,\n type Priority,\n type ToolBuilder,\n twist,\n} from \"@plotday/twister\";\nimport { Plot } from \"@plotday/twister/tools/plot\";\n\nexport default class MyTwist extends Twist<MyTwist> {\n build(build: ToolBuilder) {\n return {\n plot: build(Plot),\n };\n }\n\n async activate(priority: Pick<Priority, \"id\">) {\n // Called when twist is enabled for a priority\n // Common actions: request auth, create setup activities\n }\n\n async activity(activity: Activity) {\n // Called when an activity is routed to this twist\n // Common actions: process external events, update activities\n }\n}\n```\n\n## Tool System\n\n### Accessing Tools\n\nAll tools are declared in the `build` method:\n\n```typescript\nbuild(build: ToolBuilder) {\n return {\n toolName: build(ToolClass),\n };\n}\n```\n\nAll `build()` calls must occur in the `build` method as they are used for dependency analysis.\n\nIMPORTANT: HTTP access is restricted to URLs requested via `build(Network, { urls: [url1, url2, ...] })` in the `build` method. Wildcards are supported. Use `build(Network, { urls: ['*'] })` if full access is needed.\n\n### Built-in Tools (Always Available)\n\nFor complete API documentation of built-in tools including all methods, types, and detailed examples, see the TypeScript definitions in your installed package at `node_modules/@plotday/twister/src/tools/*.ts`. Each tool file contains comprehensive JSDoc documentation.\n\n**Quick reference - Available tools:**\n\n- `@plotday/twister/tools/plot` - Core data layer (create/update activities, priorities, contacts)\n- `@plotday/twister/tools/ai` - LLM integration (text generation, structured output, reasoning)\n - Use ModelPreferences to specify `speed` (fast/balanced/capable) and `cost` (low/medium/high)\n- `@plotday/twister/tools/store` - Persistent key-value storage (also via `this.set()`, `this.get()`)\n- `@plotday/twister/tools/tasks` - Queue batched work (also via `this.run()`)\n- `@plotday/twister/tools/callbacks` - Persistent function references (also via `this.callback()`)\n- `@plotday/twister/tools/integrations` - OAuth2 authentication flows\n- `@plotday/twister/tools/network` - HTTP access permissions and webhook management\n- `@plotday/twister/tools/twists` - Manage other Twists\n\n**Critical**: Never use instance variables for state. They are lost after function execution. Always use Store methods.\n\n### External Tools (Add to package.json)\n\nAdd tool dependencies to `package.json`:\n\n```json\n{\n \"dependencies\": {\n \"@plotday/twister\": \"workspace:^\",\n \"@plotday/tool-google-calendar\": \"workspace:^\"\n }\n}\n```\n\n#### Common External Tools\n\n- `@plotday/tool-google-calendar`: Google Calendar integration\n- `@plotday/tool-outlook-calendar`: Outlook Calendar integration\n- `@plotday/tool-google-contacts`: Google Contacts integration\n\n## Lifecycle Methods\n\n### activate(priority: Pick<Priority, \"id\">)\n\nCalled when the twist is enabled for a priority. Common patterns:\n\n**Request Authentication:**\n\n```typescript\nasync activate(_priority: Pick<Priority, \"id\">) {\n const authLink = await this.tools.externalTool.requestAuth(\n this.onAuthComplete,\n \"google\"\n );\n\n await this.tools.plot.createActivity({\n type: ActivityType.Note,\n title: \"Connect your account\",\n notes: [\n {\n content: \"Click the link below to connect your account and start syncing.\",\n links: [authLink],\n },\n ],\n });\n}\n```\n\n**Store Parent Activity for Later:**\n\n```typescript\nconst activity = await this.tools.plot.createActivity({\n type: ActivityType.Note,\n title: \"Setup\",\n notes: [\n {\n content: \"Your twist is being set up. Configuration steps will appear here.\",\n },\n ],\n});\n\nawait this.set(\"setup_activity_id\", activity.id);\n```\n\n### activity(activity: Activity)\n\nCalled when an activity is routed to the twist. Common patterns:\n\n**Create Activities from External Events:**\n\n```typescript\nasync activity(activity: Activity) {\n await this.tools.plot.createActivity(activity);\n}\n```\n\n**Update Based on User Action:**\n\n```typescript\nasync activity(activity: Activity) {\n if (activity.completed) {\n await this.handleCompletion(activity);\n }\n}\n```\n\n## Activity Links\n\nActivity links enable user interaction:\n\n```typescript\nimport { type ActivityLink, ActivityLinkType } from \"@plotday/twister\";\n\n// URL link\nconst urlLink: ActivityLink = {\n title: \"Open website\",\n type: ActivityLinkType.url,\n url: \"https://example.com\",\n};\n\n// Callback link (uses Callbacks tool)\nconst token = await this.callback(this.onLinkClicked, \"context\");\nconst callbackLink: ActivityLink = {\n title: \"Click me\",\n type: ActivityLinkType.callback,\n token: token,\n};\n\n// Add to activity note\nawait this.tools.plot.createActivity({\n type: ActivityType.Note,\n title: \"Task with links\",\n notes: [\n {\n content: \"Click the links below to take action.\",\n links: [urlLink, callbackLink],\n },\n ],\n});\n```\n\n## Authentication Pattern\n\nCommon pattern for OAuth authentication:\n\n```typescript\nasync activate(_priority: Pick<Priority, \"id\">) {\n // Request auth link from tool with callback\n const authLink = await this.tools.googleTool.requestAuth(\n this.onAuthComplete,\n \"google\"\n );\n\n // Create activity with auth link\n const activity = await this.tools.plot.createActivity({\n type: ActivityType.Note,\n title: \"Connect Google account\",\n notes: [\n {\n content: \"Click below to connect your Google account and start syncing.\",\n links: [authLink],\n },\n ],\n });\n\n // Store for later use\n await this.set(\"auth_activity_id\", activity.id);\n}\n\nasync onAuthComplete(authResult: { authToken: string }, provider: string) {\n // Store auth token\n await this.set(`${provider}_auth`, authResult.authToken);\n\n // Continue setup flow\n await this.setupSyncOptions(authResult.authToken);\n}\n```\n\n## Sync Pattern\n\nPattern for syncing external data - demonstrates adding Notes to existing Activities:\n\n```typescript\nasync startSync(calendarId: string): Promise<void> {\n const authToken = await this.get<string>(\"auth_token\");\n\n await this.tools.calendarTool.startSync(\n authToken,\n calendarId,\n this.handleEvent,\n calendarId\n );\n}\n\nasync handleEvent(\n incomingActivity: NewActivityWithNotes,\n calendarId: string\n): Promise<void> {\n // Check if this activity already exists (using source for deduplication)\n if (incomingActivity.source) {\n const existing = await this.tools.plot.getActivityBySource(\n incomingActivity.source\n );\n\n if (existing) {\n // Add update as a Note to existing Activity (add message to thread)\n if (incomingActivity.notes?.[0]?.content) {\n await this.tools.plot.createNote({\n activity: { id: existing.id },\n content: incomingActivity.notes[0].content,\n });\n }\n return;\n }\n }\n\n // Create new Activity with initial Note (new thread with first message)\n await this.tools.plot.createActivity(incomingActivity);\n}\n\nasync stopSync(calendarId: string): Promise<void> {\n const authToken = await this.get<string>(\"auth_token\");\n await this.tools.calendarTool.stopSync(authToken, calendarId);\n}\n```\n\n## Calendar Selection Pattern\n\nPattern for letting users select from multiple calendars/accounts:\n\n```typescript\nprivate async createCalendarSelectionActivity(\n provider: string,\n calendars: Calendar[],\n authToken: string\n): Promise<void> {\n const links: ActivityLink[] = [];\n\n for (const calendar of calendars) {\n const token = await this.callback(\n this.onCalendarSelected,\n provider,\n calendar.id,\n calendar.name,\n authToken\n );\n\n links.push({\n title: `📅 ${calendar.name}${calendar.primary ? \" (Primary)\" : \"\"}`,\n type: ActivityLinkType.callback,\n token: token,\n });\n }\n\n await this.tools.plot.createActivity({\n type: ActivityType.Note,\n title: \"Which calendars would you like to connect?\",\n notes: [\n {\n content: \"Select the calendars you want to sync:\",\n links,\n },\n ],\n });\n}\n\nasync onCalendarSelected(\n link: ActivityLink,\n provider: string,\n calendarId: string,\n calendarName: string,\n authToken: string\n): Promise<void> {\n // Start sync for selected calendar\n await this.tools.tool.startSync(\n authToken,\n calendarId,\n this.handleEvent,\n provider,\n calendarId\n );\n}\n```\n\n## Batch Processing Pattern\n\n**Important**: Because Twists run in an ephemeral environment with limited execution time, you must break long operations into batches. Each batch runs independently in a new execution context.\n\n### Key Principles\n\n1. **Store state between batches**: Use the Store tool to persist progress\n2. **Queue next batch**: Use the Run tool to schedule the next chunk\n3. **Clean up when done**: Delete stored state after completion\n4. **Handle failures**: Store enough state to resume if a batch fails\n\n### Example Implementation\n\n```typescript\nasync startSync(resourceId: string): Promise<void> {\n // Initialize state in Store (persists between executions)\n await this.set(`sync_state_${resourceId}`, {\n nextPageToken: null,\n batchNumber: 1,\n itemsProcessed: 0,\n });\n\n // Queue first batch using runTask method\n const callback = await this.callback(this.syncBatch, resourceId);\n await this.runTask(callback);\n}\n\nasync syncBatch(args: any, resourceId: string): Promise<void> {\n // Load state from Store (set by previous execution)\n const state = await this.get(`sync_state_${resourceId}`);\n\n // Process one batch (keep under time limit)\n const result = await this.fetchBatch(state.nextPageToken);\n\n // Process results (create activities with Notes)\n for (const item of result.items) {\n await this.tools.plot.createActivity({\n type: ActivityType.Note,\n title: item.title,\n source: `external:${item.id}`, // For deduplication\n notes: [{ content: item.description }],\n });\n }\n\n if (result.nextPageToken) {\n // Update state in Store for next batch\n await this.set(`sync_state_${resourceId}`, {\n nextPageToken: result.nextPageToken,\n batchNumber: state.batchNumber + 1,\n itemsProcessed: state.itemsProcessed + result.items.length,\n });\n\n // Queue next batch (runs in new execution context)\n const nextCallback = await this.callback(this.syncBatch, resourceId);\n await this.runTask(nextCallback);\n } else {\n // Cleanup when complete\n await this.clear(`sync_state_${resourceId}`);\n\n // Optionally notify user of completion\n await this.tools.plot.createActivity({\n type: ActivityType.Note,\n title: \"Sync complete\",\n notes: [\n {\n content: `Successfully processed ${state.itemsProcessed + result.items.length} items.`,\n },\n ],\n });\n }\n}\n```\n\n## Error Handling\n\nAlways handle errors gracefully and communicate them to users:\n\n```typescript\ntry {\n await this.externalOperation();\n} catch (error) {\n console.error(\"Operation failed:\", error);\n\n await this.tools.plot.createActivity({\n type: ActivityType.Note,\n title: \"Operation failed\",\n notes: [\n {\n content: `Failed to complete operation: ${error.message}`,\n },\n ],\n });\n}\n```\n\n## Common Pitfalls\n\n- **Don't use instance variables for state** - Anything stored in memory is lost after function execution. Always use the Store tool for data that needs to persist.\n- **Processing self-created activities** - Other users may change an Activity created by the twist, resulting in an \\`activity\\` call. Be sure to check the \\`changes === null\\` and/or \\`activity.author.id !== this.id\\` to avoid re-processing.\n- **Always create Activities with Notes** - See \"Understanding Activities and Notes\" section above for the thread/message pattern and decision tree.\n- **Use correct Activity types** - Most should be `ActivityType.Note`. Only use `Action` for tasks with `doneAt`, and `Event` for items with `start`/`end`.\n- **Use `source` field for deduplication** - Always include `source` when syncing external data to enable safe, idempotent operations.\n- **Add Notes to existing Activities** - Check for existing Activities with `getActivityBySource()` before creating new ones. Think thread replies, not new threads.\n- Tools are declared in the `build` method and accessed via `this.tools.toolName` in twist methods.\n- **Don't forget runtime limits** - Each execution has ~10 seconds. Break long operations into batches with the Tasks tool. Process enough items per batch to be efficient, but few enough to stay under time limits.\n- **Always use Callbacks tool for persistent references** - Direct function references don't survive worker restarts.\n- **Store auth tokens** - Don't re-request authentication unnecessarily.\n- **Clean up callbacks and stored state** - Delete callbacks and Store entries when no longer needed.\n- **Handle missing auth gracefully** - Check for stored auth before operations.\n\n## Testing\n\nBefore deploying, verify:\n\n1. Linting passes: `{{packageManager}} lint`\n2. All dependencies are in package.json\n3. Authentication flow works end-to-end\n4. Batch operations handle pagination correctly\n5. Error cases are handled gracefully\n";
8
8
  //# sourceMappingURL=twist-guide-template.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"twist-guide-template.js","sourceRoot":"","sources":["../../src/llm-docs/twist-guide-template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,+mZAA+mZ,CAAC"}
1
+ {"version":3,"file":"twist-guide-template.js","sourceRoot":"","sources":["../../src/llm-docs/twist-guide-template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,gqfAAgqf,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated LLM documentation for @plotday/sdk/twist
2
+ * Generated LLM documentation for @plotday/twister/twist
3
3
  *
4
4
  * This file is auto-generated during build. Do not edit manually.
5
5
  * Generated from: prebuild.ts
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Generated LLM documentation for @plotday/sdk/twist
2
+ * Generated LLM documentation for @plotday/twister/twist
3
3
  *
4
4
  * This file is auto-generated during build. Do not edit manually.
5
5
  * Generated from: prebuild.ts
package/dist/plot.d.ts CHANGED
@@ -4,8 +4,11 @@ export { Tag } from "./tag";
4
4
  /**
5
5
  * Represents a unique user, contact, or twist in Plot.
6
6
  *
7
- * Note contacts (i.e. people not using Plot) are also represented by ActorIds. They may be
8
- * people interacting with other connected services (e.g. an email sender or event attendee).
7
+ * ActorIds are used throughout Plot for:
8
+ * - Activity authors and assignees
9
+ * - Tag creators (actor_id in activity_tag/note_tag)
10
+ * - Mentions in activities and notes
11
+ * - Any entity that can perform actions in Plot
9
12
  */
10
13
  export type ActorId = string & {
11
14
  readonly __brand: "ActorId";
@@ -162,22 +165,65 @@ export type ActivityLink = {
162
165
  * which is useful for synchronization, deduplication, and linking
163
166
  * back to external systems.
164
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)
192
+ *
165
193
  * @example
166
194
  * ```typescript
167
- * const googleCalendarMeta: ActivityMeta = {
168
- * type: "google-calendar-event",
169
- * id: "event-123",
170
- * calendarId: "primary",
171
- * htmlLink: "https://calendar.google.com/event/123"
172
- * };
195
+ * // First call creates the activity
196
+ * await plot.createActivity({
197
+ * type: ActivityType.Event,
198
+ * title: "Team Meeting",
199
+ * start: new Date("2024-01-15T10:00:00Z"),
200
+ * source: "google-calendar:event-abc123",
201
+ * meta: {
202
+ * calendarId: "primary",
203
+ * htmlLink: "https://calendar.google.com/event/abc123"
204
+ * }
205
+ * });
206
+ *
207
+ * // Second call with same source updates the existing activity
208
+ * 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
213
+ * });
214
+ *
215
+ * // Different twist, same source = creates new activity (independent)
216
+ * // Different source = creates new activity
217
+ * // No source = creates new activity (no deduplication)
173
218
  * ```
174
219
  */
175
220
  export type ActivityMeta = {
176
- /** The type identifier for the source system */
177
- source: string;
178
- /** Additional source-specific properties */
221
+ /** Source-specific properties and metadata */
179
222
  [key: string]: any;
180
223
  };
224
+ export type Tags = {
225
+ [K in Tag]?: ActorId[];
226
+ };
181
227
  /**
182
228
  * Represents a complete activity within the Plot system.
183
229
  *
@@ -191,7 +237,7 @@ export type ActivityMeta = {
191
237
  * const task: Activity = {
192
238
  * type: ActivityType.Note,
193
239
  * title: "New campaign brainstorming ideas",
194
- * note: "We could rent a bouncy castle...",
240
+ * content: "We could rent a bouncy castle...",
195
241
  * author: { id: "user-1", name: "John Doe", type: ActorType.User },
196
242
  * priority: { id: "work", title: "Work" },
197
243
  * // ... other fields
@@ -202,7 +248,6 @@ export type ActivityMeta = {
202
248
  * type: ActivityType.Action,
203
249
  * title: "Review budget proposal",
204
250
  * author: { id: "user-1", name: "John Doe", type: ActorType.User },
205
- * end: null,
206
251
  * priority: { id: "work", title: "Work" },
207
252
  * // ... other fields
208
253
  * };
@@ -217,22 +262,98 @@ export type ActivityMeta = {
217
262
  * };
218
263
  * ```
219
264
  */
220
- export type Activity = {
265
+ export type ActivityCommon = {
221
266
  /** Unique identifier for the activity */
222
267
  id: string;
223
- /** The type of activity (Note, Task, or Event) */
224
- type: ActivityType;
225
268
  /** Information about who created the activity */
226
269
  author: Actor;
270
+ /** Whether this activity is in draft state (not shown in do now view) */
271
+ draft: boolean;
272
+ /** Whether this activity is private (only visible to author) */
273
+ private: boolean;
274
+ /** Whether this activity has been archived */
275
+ archived: boolean;
276
+ /** Tags attached to this activity. Maps tag ID to array of actor IDs who added that tag. */
277
+ tags: Tags | null;
278
+ /** Array of actor IDs (users, contacts, or twists) mentioned in this activity via @-mentions */
279
+ mentions: ActorId[] | null;
280
+ };
281
+ export type Activity = ActivityCommon & {
227
282
  /** The display title/summary of the activity */
228
283
  title: string | null;
229
- /** Primary content for the activity */
230
- note: string | null;
284
+ /** The type of activity (Note, Task, or Event) */
285
+ type: ActivityType;
286
+ /**
287
+ * The actor assigned to this activity.
288
+ *
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).
291
+ *
292
+ * **For notes and events:** Assignee is optional and typically null.
293
+ *
294
+ * @example
295
+ * ```typescript
296
+ * // Create action with explicit assignee
297
+ * const task: NewActivity = {
298
+ * type: ActivityType.Action,
299
+ * title: "Review PR #123",
300
+ * assignee: {
301
+ * id: userId as ActorId,
302
+ * type: ActorType.User,
303
+ * name: "Alice"
304
+ * }
305
+ * };
306
+ *
307
+ * // Create action with auto-assignment (defaults to twist owner)
308
+ * const task: NewActivity = {
309
+ * type: ActivityType.Action,
310
+ * title: "Follow up on email"
311
+ * // assignee will be set automatically to twist owner
312
+ * };
313
+ *
314
+ * // Update assignee
315
+ * await plot.updateActivity({
316
+ * id: activityId,
317
+ * assignee: {
318
+ * id: newUserId as ActorId,
319
+ * type: ActorType.User,
320
+ * name: "Bob"
321
+ * }
322
+ * });
323
+ * ```
324
+ */
325
+ assignee: Actor | null;
326
+ /** Timestamp when the activity was marked as complete. Null if not completed. */
327
+ doneAt: Date | null;
231
328
  /**
232
329
  * Start time of a scheduled activity. Notes are not typically scheduled unless they're about specific times.
233
330
  * For recurring events, this represents the start of the first occurrence.
234
331
  * Can be a Date object for timed events or a date string in "YYYY-MM-DD" format for all-day events.
235
- * Null for activities without scheduled start times.
332
+ *
333
+ * **Activity Scheduling States** (for Actions):
334
+ * - **Do Now** (current/actionable): When creating a NewActivity of type Action, omitting `start` defaults to current time
335
+ * - **Do Later** (future scheduled): Set `start` to a future Date or date string
336
+ * - **Do Someday** (unscheduled backlog): Explicitly set `start: null`
337
+ *
338
+ * @example
339
+ * ```typescript
340
+ * // "Do Now" - defaults to current time when start is omitted
341
+ * await this.tools.plot.createActivity({ type: ActivityType.Action, title: "Urgent task" });
342
+ *
343
+ * // "Do Later" - scheduled for a specific time
344
+ * await this.tools.plot.createActivity({
345
+ * type: ActivityType.Action,
346
+ * title: "Future task",
347
+ * start: new Date("2025-02-01")
348
+ * });
349
+ *
350
+ * // "Do Someday" - unscheduled backlog item
351
+ * await this.tools.plot.createActivity({
352
+ * type: ActivityType.Action,
353
+ * title: "Backlog task",
354
+ * start: null
355
+ * });
356
+ * ```
236
357
  */
237
358
  start: Date | string | null;
238
359
  /**
@@ -254,14 +375,6 @@ export type Activity = {
254
375
  * Null for non-recurring activities or indefinite recurrence.
255
376
  */
256
377
  recurrenceCount: number | null;
257
- /** Timestamp when the activity was marked as complete. Null if not completed. */
258
- doneAt: Date | null;
259
- /** Reference to a parent activity for creating hierarchical relationships */
260
- parent: Activity | null;
261
- /** For nested activities in a thread, references the top-level activity of that thread */
262
- threadRoot?: Activity;
263
- /** Array of interactive links attached to the activity */
264
- links: Array<ActivityLink> | null;
265
378
  /** The priority context this activity belongs to */
266
379
  priority: Priority;
267
380
  /** Recurrence rule in RFC 5545 RRULE format (e.g., "FREQ=WEEKLY;BYDAY=MO,WE,FR") */
@@ -280,12 +393,26 @@ export type Activity = {
280
393
  * Used to identify which occurrence of a recurring event this exception replaces.
281
394
  */
282
395
  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;
283
408
  /** Metadata about the activity, typically from an external system that created it */
284
409
  meta: ActivityMeta | null;
285
- /** Tags attached to this activity. Maps tag ID to array of actor IDs who added that tag. */
286
- tags: Partial<Record<Tag, ActorId[]>> | null;
287
- /** Array of actor IDs (users, contacts, or twists) mentioned in this activity via @-mentions */
288
- mentions: ActorId[] | null;
410
+ };
411
+ export type ActivityWithNotes = Activity & {
412
+ notes: Note[];
413
+ };
414
+ export type NewActivityWithNotes = NewActivity & {
415
+ notes: Omit<NewNote, "activity">[];
289
416
  };
290
417
  /**
291
418
  * Configuration for automatic priority selection based on activity similarity.
@@ -328,6 +455,16 @@ export type PickPriorityConfig = {
328
455
  * The ID and author will be automatically assigned by the Plot system
329
456
  * based on the current execution context.
330
457
  *
458
+ * **Important: Scheduling Defaults for Actions**
459
+ *
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)
464
+ *
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.
467
+ *
331
468
  * Priority can be specified in three ways:
332
469
  * 1. Explicit priority: `priority: { id: "..." }` - Use specific priority (disables pickPriority)
333
470
  * 2. Pick priority config: `pickPriority: { ... }` - Auto-select based on similarity
@@ -335,64 +472,137 @@ export type PickPriorityConfig = {
335
472
  *
336
473
  * @example
337
474
  * ```typescript
338
- * // Explicit priority (disables automatic matching)
339
- * const newTask: NewActivity = {
475
+ * // "Do Now" - Action defaults to current time (actionable today)
476
+ * const urgentTask: NewActivity = {
477
+ * type: ActivityType.Action,
478
+ * title: "Review pull request"
479
+ * // Omitting start defaults to new Date()
480
+ * };
481
+ *
482
+ * // "Do Someday" - Backlog item (recommended for most synced tasks)
483
+ * const backlogTask: NewActivity = {
340
484
  * type: ActivityType.Action,
341
- * title: "Review pull request",
342
- * priority: { id: "work-project-123" }
485
+ * title: "Refactor user service",
486
+ * start: null // Explicitly set to null for backlog
343
487
  * };
344
488
  *
345
- * // Automatic priority matching (default behavior)
346
- * const newNote: NewActivity = {
489
+ * // "Do Later" - Scheduled for specific date
490
+ * const futureTask: NewActivity = {
491
+ * type: ActivityType.Action,
492
+ * title: "Prepare Q1 review",
493
+ * start: new Date("2025-03-15")
494
+ * };
495
+ *
496
+ * // Note (typically unscheduled)
497
+ * const note: NewActivity = {
347
498
  * type: ActivityType.Note,
348
499
  * title: "Meeting notes",
349
- * note: "Discussed Q4 roadmap..."
350
- * // Defaults to pickPriority: { content: true }
500
+ * content: "Discussed Q4 roadmap...",
501
+ * start: null // Notes typically don't have scheduled times
351
502
  * };
352
503
  *
353
- * // Custom priority matching
354
- * const newEvent: NewActivity = {
504
+ * // Event (always has explicit start/end times)
505
+ * const event: NewActivity = {
355
506
  * type: ActivityType.Event,
356
507
  * title: "Team standup",
357
- * pickPriority: { type: true, content: 50 }
508
+ * start: new Date("2025-01-15T10:00:00"),
509
+ * end: new Date("2025-01-15T10:30:00")
358
510
  * };
359
511
  * ```
360
512
  */
361
- export type NewActivity = Pick<Activity, "type"> & Partial<Omit<Activity, "id" | "author" | "type" | "parent" | "priority" | "threadRoot"> & {
362
- parent?: Pick<Activity, "id"> | null;
513
+ export type NewActivity = Pick<Activity, "type"> & Partial<Omit<Activity, "id" | "author" | "type" | "priority" | "mentions">> & ({
514
+ /** Explicit priority (required when specified) - disables automatic priority matching */
515
+ priority: Pick<Priority, "id">;
516
+ } | {
517
+ /** Configuration for automatic priority selection based on similarity */
518
+ pickPriority?: PickPriorityConfig;
519
+ } | {}) & {
520
+ /**
521
+ * Whether the activity should be marked as unread for users.
522
+ * - true (default): Activity is unread for all users in the priority
523
+ * - false: Activity is marked as read for all users in the priority at creation time
524
+ *
525
+ * Use false for historical imports to avoid marking old items as unread.
526
+ */
527
+ unread?: boolean;
528
+ };
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">> & {
530
+ /**
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.
534
+ */
535
+ tags?: {
536
+ [K in Tag]?: ActorId[];
537
+ };
538
+ /**
539
+ * Add or remove the twist's tags.
540
+ * Maps tag ID to boolean: true = add tag, false = remove tag.
541
+ * This is allowed on all activities the twist has access to.
542
+ */
543
+ twistTags?: Partial<Record<Tag, boolean>>;
544
+ };
545
+ /**
546
+ * Represents a note within an activity.
547
+ *
548
+ * Notes contain the detailed content (note text, links) associated with an activity.
549
+ * They are always ordered by creation time within their parent activity.
550
+ */
551
+ export type Note = Omit<ActivityCommon, "type"> & {
552
+ /** The parent activity this note belongs to */
553
+ activity: Activity;
554
+ /** Primary content for the note (markdown) */
555
+ content: string | null;
556
+ /** Array of interactive links attached to the note */
557
+ links: Array<ActivityLink> | null;
558
+ };
559
+ /**
560
+ * Type for creating new notes.
561
+ *
562
+ * Requires the activity reference, with all other fields optional.
563
+ */
564
+ export type NewNote = Partial<Omit<Note, "id" | "author" | "activity">> & {
565
+ /** Reference to the parent activity (required) */
566
+ activity: Pick<Activity, "id">;
363
567
  /**
364
568
  * Format of the note content. Determines how the note is processed:
365
569
  * - 'text': Plain text that will be converted to markdown (auto-links URLs, preserves line breaks)
366
570
  * - 'markdown': Already in markdown format (default, no conversion)
367
571
  * - 'html': HTML content that will be converted to markdown
368
572
  */
369
- noteType?: NoteType;
370
- }> & ({
371
- /** Explicit priority (required when specified) - disables automatic priority matching */
372
- priority: Pick<Priority, "id">;
373
- } | {
374
- /** Configuration for automatic priority selection based on similarity */
375
- pickPriority?: PickPriorityConfig;
376
- } | {});
377
- export type ActivityUpdate = Pick<Activity, "id"> & Partial<Pick<Activity, "type" | "start" | "end" | "doneAt" | "note" | "title" | "meta" | "links" | "recurrenceRule" | "recurrenceDates" | "recurrenceExdates" | "recurrenceUntil" | "recurrenceCount" | "occurrence" | "mentions">> & {
378
- parent?: Pick<Activity, "id"> | null;
573
+ contentType?: ContentType;
574
+ /**
575
+ * Whether the note should mark the parent activity as unread for users.
576
+ * - true (default): Activity becomes unread for users who haven't authored the note
577
+ * - false: Activity is marked as read for all users in the priority at note creation time
578
+ *
579
+ * Use false for historical imports to avoid marking old items as unread.
580
+ */
581
+ unread?: boolean;
582
+ };
583
+ /**
584
+ * Type for updating existing notes.
585
+ */
586
+ export type NoteUpdate = Pick<Note, "id"> & Partial<Pick<Note, "draft" | "private" | "content" | "links" | "mentions">> & {
379
587
  /**
380
588
  * Format of the note content. Determines how the note is processed:
381
589
  * - 'text': Plain text that will be converted to markdown (auto-links URLs, preserves line breaks)
382
590
  * - 'markdown': Already in markdown format (default, no conversion)
383
591
  * - 'html': HTML content that will be converted to markdown
384
592
  */
385
- noteType?: NoteType;
593
+ contentType?: ContentType;
386
594
  /**
387
- * Full tags object from Activity. Maps tag ID to array of actor IDs who added that tag.
388
- * Only allowed for activities created by the twist.
389
- * Use twistTags instead for adding/removing the twist's tags on other activities.
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.
390
598
  */
391
- tags?: Partial<Record<Tag, ActorId[]>>;
599
+ tags?: {
600
+ [K in Tag]?: ActorId[];
601
+ };
392
602
  /**
393
603
  * Add or remove the twist's tags.
394
604
  * Maps tag ID to boolean: true = add tag, false = remove tag.
395
- * This is allowed on all activities the twist has access to.
605
+ * This is allowed on all notes the twist has access to.
396
606
  */
397
607
  twistTags?: Partial<Record<Tag, boolean>>;
398
608
  };
@@ -459,5 +669,5 @@ export type NewContact = {
459
669
  /** Optional avatar image URL for the contact */
460
670
  avatar?: string;
461
671
  };
462
- export type NoteType = "text" | "markdown" | "html";
672
+ export type ContentType = "text" | "markdown" | "html";
463
673
  //# sourceMappingURL=plot.d.ts.map
@@ -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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,uCAAe,CAAA;AACjB,CAAC,EAXW,oBAAoB,KAApB,oBAAoB,QAW/B;AAslBD;;;;;GAKG;AACH,MAAM,CAAN,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,wCAAwC;IACxC,yCAAI,CAAA;IACJ,8CAA8C;IAC9C,+CAAO,CAAA;IACP,6CAA6C;IAC7C,2CAAK,CAAA;AACP,CAAC,EAPW,SAAS,KAAT,SAAS,QAOpB"}
package/dist/tag.d.ts CHANGED
@@ -9,9 +9,10 @@ export declare enum Tag {
9
9
  Later = 2,
10
10
  Done = 3,
11
11
  Archived = 4,
12
+ Someday = 7,
12
13
  Pinned = 100,
13
14
  Urgent = 101,
14
- Todo = 102,
15
+ Inbox = 102,
15
16
  Goal = 103,
16
17
  Decision = 104,
17
18
  Waiting = 105,
@@ -21,8 +22,6 @@ export declare enum Tag {
21
22
  Twist = 109,
22
23
  Star = 110,
23
24
  Idea = 111,
24
- Attachment = 112,
25
- Link = 113,
26
25
  Yes = 1000,
27
26
  No = 1001,
28
27
  Volunteer = 1002,
package/dist/tag.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../src/tag.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,GAAG;IAEb,GAAG,IAAI;IACP,KAAK,IAAI;IACT,IAAI,IAAI;IACR,QAAQ,IAAI;IAGZ,MAAM,MAAM;IACZ,MAAM,MAAM;IACZ,IAAI,MAAM;IACV,IAAI,MAAM;IACV,QAAQ,MAAM;IACd,OAAO,MAAM;IACb,OAAO,MAAM;IACb,OAAO,MAAM;IACb,QAAQ,MAAM;IACd,KAAK,MAAM;IACX,IAAI,MAAM;IACV,IAAI,MAAM;IACV,UAAU,MAAM;IAChB,IAAI,MAAM;IAGV,GAAG,OAAO;IACV,EAAE,OAAO;IACT,SAAS,OAAO;IAChB,IAAI,OAAO;IACX,IAAI,OAAO;IACX,OAAO,OAAO;IACd,OAAO,OAAO;IACd,IAAI,OAAO;IACX,MAAM,OAAO;IACb,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,IAAI,OAAO;IACX,MAAM,OAAO;IACb,QAAQ,OAAO;IACf,IAAI,OAAO;IACX,GAAG,OAAO;IACV,MAAM,OAAO;IACb,IAAI,OAAO;IACX,SAAS,OAAO;CACjB"}
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../src/tag.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,GAAG;IAEb,GAAG,IAAI;IACP,KAAK,IAAI;IACT,IAAI,IAAI;IACR,QAAQ,IAAI;IACZ,OAAO,IAAI;IAGX,MAAM,MAAM;IACZ,MAAM,MAAM;IACZ,KAAK,MAAM;IACX,IAAI,MAAM;IACV,QAAQ,MAAM;IACd,OAAO,MAAM;IACb,OAAO,MAAM;IACb,OAAO,MAAM;IACb,QAAQ,MAAM;IACd,KAAK,MAAM;IACX,IAAI,MAAM;IACV,IAAI,MAAM;IAGV,GAAG,OAAO;IACV,EAAE,OAAO;IACT,SAAS,OAAO;IAChB,IAAI,OAAO;IACX,IAAI,OAAO;IACX,OAAO,OAAO;IACd,OAAO,OAAO;IACd,IAAI,OAAO;IACX,MAAM,OAAO;IACb,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,IAAI,OAAO;IACX,MAAM,OAAO;IACb,QAAQ,OAAO;IACf,IAAI,OAAO;IACX,GAAG,OAAO;IACV,MAAM,OAAO;IACb,IAAI,OAAO;IACX,SAAS,OAAO;CACjB"}
package/dist/tag.js CHANGED
@@ -11,10 +11,11 @@ export var Tag;
11
11
  Tag[Tag["Later"] = 2] = "Later";
12
12
  Tag[Tag["Done"] = 3] = "Done";
13
13
  Tag[Tag["Archived"] = 4] = "Archived";
14
+ Tag[Tag["Someday"] = 7] = "Someday";
14
15
  // Toggle tags
15
16
  Tag[Tag["Pinned"] = 100] = "Pinned";
16
17
  Tag[Tag["Urgent"] = 101] = "Urgent";
17
- Tag[Tag["Todo"] = 102] = "Todo";
18
+ Tag[Tag["Inbox"] = 102] = "Inbox";
18
19
  Tag[Tag["Goal"] = 103] = "Goal";
19
20
  Tag[Tag["Decision"] = 104] = "Decision";
20
21
  Tag[Tag["Waiting"] = 105] = "Waiting";
@@ -24,8 +25,6 @@ export var Tag;
24
25
  Tag[Tag["Twist"] = 109] = "Twist";
25
26
  Tag[Tag["Star"] = 110] = "Star";
26
27
  Tag[Tag["Idea"] = 111] = "Idea";
27
- Tag[Tag["Attachment"] = 112] = "Attachment";
28
- Tag[Tag["Link"] = 113] = "Link";
29
28
  // Count tags
30
29
  Tag[Tag["Yes"] = 1000] = "Yes";
31
30
  Tag[Tag["No"] = 1001] = "No";
package/dist/tag.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tag.js","sourceRoot":"","sources":["../src/tag.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,GA4CX;AA5CD,WAAY,GAAG;IACb,eAAe;IACf,2BAAO,CAAA;IACP,+BAAS,CAAA;IACT,6BAAQ,CAAA;IACR,qCAAY,CAAA;IAEZ,cAAc;IACd,mCAAY,CAAA;IACZ,mCAAY,CAAA;IACZ,+BAAU,CAAA;IACV,+BAAU,CAAA;IACV,uCAAc,CAAA;IACd,qCAAa,CAAA;IACb,qCAAa,CAAA;IACb,qCAAa,CAAA;IACb,uCAAc,CAAA;IACd,iCAAW,CAAA;IACX,+BAAU,CAAA;IACV,+BAAU,CAAA;IACV,2CAAgB,CAAA;IAChB,+BAAU,CAAA;IAEV,aAAa;IACb,8BAAU,CAAA;IACV,4BAAS,CAAA;IACT,0CAAgB,CAAA;IAChB,gCAAW,CAAA;IACX,gCAAW,CAAA;IACX,sCAAc,CAAA;IACd,sCAAc,CAAA;IACd,gCAAW,CAAA;IACX,oCAAa,CAAA;IACb,wCAAe,CAAA;IACf,oCAAa,CAAA;IACb,kCAAY,CAAA;IACZ,gCAAW,CAAA;I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