@plotday/twister 0.35.0 → 0.37.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 (262) hide show
  1. package/README.md +4 -2
  2. package/bin/commands/create.js +37 -3
  3. package/bin/commands/create.js.map +1 -1
  4. package/bin/commands/deploy.js +4 -0
  5. package/bin/commands/deploy.js.map +1 -1
  6. package/bin/index.js +1 -0
  7. package/bin/index.js.map +1 -1
  8. package/bin/templates/AGENTS.template.md +188 -271
  9. package/bin/templates/README.template.md +2 -23
  10. package/cli/templates/AGENTS.template.md +188 -271
  11. package/cli/templates/README.template.md +2 -23
  12. package/dist/docs/assets/hierarchy.js +1 -1
  13. package/dist/docs/assets/navigation.js +1 -1
  14. package/dist/docs/assets/search.js +1 -1
  15. package/dist/docs/classes/index.Options.html +10 -0
  16. package/dist/docs/classes/index.Source.html +184 -0
  17. package/dist/docs/classes/tool.ITool.html +1 -1
  18. package/dist/docs/classes/tool.Tool.html +21 -21
  19. package/dist/docs/classes/tools_ai.AI.html +1 -1
  20. package/dist/docs/classes/tools_callbacks.Callbacks.html +2 -2
  21. package/dist/docs/classes/tools_integrations.Integrations.html +38 -16
  22. package/dist/docs/classes/tools_network.Network.html +1 -1
  23. package/dist/docs/classes/tools_plot.Plot.html +86 -60
  24. package/dist/docs/classes/tools_store.Store.html +1 -1
  25. package/dist/docs/classes/tools_tasks.Tasks.html +1 -1
  26. package/dist/docs/classes/tools_twists.Twists.html +1 -1
  27. package/dist/docs/classes/twist.Twist.html +42 -10
  28. package/dist/docs/documents/Building_Sources.html +137 -0
  29. package/dist/docs/documents/Built-in_Tools.html +11 -2
  30. package/dist/docs/documents/Core_Concepts.html +5 -10
  31. package/dist/docs/documents/Getting_Started.html +1 -1
  32. package/dist/docs/enums/{plot.ActivityLinkType.html → plot.ActionType.html} +8 -8
  33. package/dist/docs/enums/plot.ActorType.html +7 -7
  34. package/dist/docs/enums/plot.ConferencingProvider.html +6 -6
  35. package/dist/docs/enums/plot.ThemeColor.html +9 -9
  36. package/dist/docs/enums/tag.Tag.html +3 -10
  37. package/dist/docs/enums/tools_integrations.AuthProvider.html +11 -11
  38. package/dist/docs/enums/tools_plot.ContactAccess.html +3 -3
  39. package/dist/docs/enums/tools_plot.PriorityAccess.html +3 -3
  40. package/dist/docs/enums/{tools_plot.ActivityAccess.html → tools_plot.ThreadAccess.html} +6 -6
  41. package/dist/docs/hierarchy.html +1 -1
  42. package/dist/docs/index.html +5 -6
  43. package/dist/docs/interfaces/utils_types.ToolShed.html +5 -5
  44. package/dist/docs/media/AGENTS.md +910 -0
  45. package/dist/docs/media/MULTI_USER_AUTH.md +111 -0
  46. package/dist/docs/media/SYNC_STRATEGIES.md +7 -7
  47. package/dist/docs/modules/index.html +1 -1
  48. package/dist/docs/modules/plot.html +1 -1
  49. package/dist/docs/modules/tool.html +1 -1
  50. package/dist/docs/modules/tools_integrations.html +1 -1
  51. package/dist/docs/modules/tools_plot.html +1 -1
  52. package/dist/docs/modules.html +1 -1
  53. package/dist/docs/types/index.BooleanDef.html +7 -0
  54. package/dist/docs/types/index.NewSchedule.html +33 -0
  55. package/dist/docs/types/index.NewScheduleContact.html +5 -0
  56. package/dist/docs/types/index.NewScheduleOccurrence.html +6 -0
  57. package/dist/docs/types/index.NumberDef.html +9 -0
  58. package/dist/docs/types/index.OptionDef.html +2 -0
  59. package/dist/docs/types/index.OptionsSchema.html +3 -0
  60. package/dist/docs/types/index.ResolvedOptions.html +4 -0
  61. package/dist/docs/types/index.Schedule.html +37 -0
  62. package/dist/docs/types/index.ScheduleContact.html +5 -0
  63. package/dist/docs/types/index.ScheduleContactRole.html +1 -0
  64. package/dist/docs/types/index.ScheduleContactStatus.html +1 -0
  65. package/dist/docs/types/index.ScheduleOccurrence.html +17 -0
  66. package/dist/docs/types/index.ScheduleOccurrenceUpdate.html +2 -0
  67. package/dist/docs/types/index.SelectDef.html +8 -0
  68. package/dist/docs/types/index.TextDef.html +8 -0
  69. package/dist/docs/types/plot.Action.html +26 -0
  70. package/dist/docs/types/plot.Actor.html +6 -6
  71. package/dist/docs/types/plot.ActorId.html +1 -1
  72. package/dist/docs/types/plot.ContentType.html +1 -1
  73. package/dist/docs/types/plot.Link.html +36 -0
  74. package/dist/docs/types/plot.NewActor.html +1 -1
  75. package/dist/docs/types/plot.NewContact.html +5 -5
  76. package/dist/docs/types/plot.NewLink.html +26 -0
  77. package/dist/docs/types/plot.NewLinkWithNotes.html +7 -0
  78. package/dist/docs/types/plot.NewNote.html +10 -10
  79. package/dist/docs/types/plot.NewPriority.html +1 -1
  80. package/dist/docs/types/plot.NewTags.html +1 -1
  81. package/dist/docs/types/plot.NewThread.html +27 -0
  82. package/dist/docs/types/plot.NewThreadWithNotes.html +1 -0
  83. package/dist/docs/types/plot.Note.html +9 -8
  84. package/dist/docs/types/plot.NoteUpdate.html +2 -2
  85. package/dist/docs/types/plot.PickPriorityConfig.html +8 -10
  86. package/dist/docs/types/plot.Priority.html +6 -6
  87. package/dist/docs/types/plot.PriorityUpdate.html +1 -1
  88. package/dist/docs/types/plot.Tags.html +1 -1
  89. package/dist/docs/types/plot.Thread.html +1 -0
  90. package/dist/docs/types/plot.ThreadCommon.html +17 -0
  91. package/dist/docs/types/plot.ThreadFilter.html +2 -0
  92. package/dist/docs/types/plot.ThreadMeta.html +11 -0
  93. package/dist/docs/types/plot.ThreadUpdate.html +3 -0
  94. package/dist/docs/types/plot.ThreadWithNotes.html +1 -0
  95. package/dist/docs/types/tools_integrations.ArchiveLinkFilter.html +11 -0
  96. package/dist/docs/types/tools_integrations.AuthToken.html +4 -4
  97. package/dist/docs/types/tools_integrations.Authorization.html +4 -4
  98. package/dist/docs/types/tools_integrations.Channel.html +11 -0
  99. package/dist/docs/types/tools_integrations.LinkTypeConfig.html +17 -0
  100. package/dist/docs/types/tools_plot.LinkFilter.html +10 -0
  101. package/dist/docs/types/tools_plot.NoteIntentHandler.html +6 -6
  102. package/dist/docs/types/tools_twists.TwistPermissions.html +1 -1
  103. package/dist/docs/types/utils_types.BuiltInTools.html +2 -2
  104. package/dist/docs/types/utils_types.ExtractBuildReturn.html +1 -1
  105. package/dist/docs/types/utils_types.InferOptions.html +1 -1
  106. package/dist/docs/types/utils_types.InferTools.html +1 -1
  107. package/dist/docs/types/utils_types.JSONValue.html +1 -1
  108. package/dist/docs/types/utils_types.PromiseValues.html +1 -1
  109. package/dist/docs/types/utils_types.ToolBuilder.html +2 -2
  110. package/dist/index.d.ts +3 -0
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/index.js +3 -0
  113. package/dist/index.js.map +1 -1
  114. package/dist/llm-docs/index.d.ts.map +1 -1
  115. package/dist/llm-docs/index.js +6 -8
  116. package/dist/llm-docs/index.js.map +1 -1
  117. package/dist/llm-docs/options.d.ts +9 -0
  118. package/dist/llm-docs/options.d.ts.map +1 -0
  119. package/dist/llm-docs/options.js +8 -0
  120. package/dist/llm-docs/options.js.map +1 -0
  121. package/dist/llm-docs/plot.d.ts +1 -1
  122. package/dist/llm-docs/plot.d.ts.map +1 -1
  123. package/dist/llm-docs/plot.js +1 -1
  124. package/dist/llm-docs/plot.js.map +1 -1
  125. package/dist/llm-docs/schedule.d.ts +9 -0
  126. package/dist/llm-docs/schedule.d.ts.map +1 -0
  127. package/dist/llm-docs/schedule.js +8 -0
  128. package/dist/llm-docs/schedule.js.map +1 -0
  129. package/dist/llm-docs/source.d.ts +9 -0
  130. package/dist/llm-docs/source.d.ts.map +1 -0
  131. package/dist/llm-docs/source.js +8 -0
  132. package/dist/llm-docs/source.js.map +1 -0
  133. package/dist/llm-docs/tag.d.ts +1 -1
  134. package/dist/llm-docs/tag.d.ts.map +1 -1
  135. package/dist/llm-docs/tag.js +1 -1
  136. package/dist/llm-docs/tag.js.map +1 -1
  137. package/dist/llm-docs/tool.d.ts +1 -1
  138. package/dist/llm-docs/tool.d.ts.map +1 -1
  139. package/dist/llm-docs/tool.js +1 -1
  140. package/dist/llm-docs/tool.js.map +1 -1
  141. package/dist/llm-docs/tools/callbacks.d.ts +1 -1
  142. package/dist/llm-docs/tools/callbacks.d.ts.map +1 -1
  143. package/dist/llm-docs/tools/callbacks.js +1 -1
  144. package/dist/llm-docs/tools/callbacks.js.map +1 -1
  145. package/dist/llm-docs/tools/integrations.d.ts +1 -1
  146. package/dist/llm-docs/tools/integrations.d.ts.map +1 -1
  147. package/dist/llm-docs/tools/integrations.js +1 -1
  148. package/dist/llm-docs/tools/integrations.js.map +1 -1
  149. package/dist/llm-docs/tools/plot.d.ts +1 -1
  150. package/dist/llm-docs/tools/plot.d.ts.map +1 -1
  151. package/dist/llm-docs/tools/plot.js +1 -1
  152. package/dist/llm-docs/tools/plot.js.map +1 -1
  153. package/dist/llm-docs/tools/twists.d.ts +1 -1
  154. package/dist/llm-docs/tools/twists.d.ts.map +1 -1
  155. package/dist/llm-docs/tools/twists.js +1 -1
  156. package/dist/llm-docs/tools/twists.js.map +1 -1
  157. package/dist/llm-docs/twist-guide-template.d.ts +1 -1
  158. package/dist/llm-docs/twist-guide-template.d.ts.map +1 -1
  159. package/dist/llm-docs/twist-guide-template.js +1 -1
  160. package/dist/llm-docs/twist-guide-template.js.map +1 -1
  161. package/dist/llm-docs/twist.d.ts +1 -1
  162. package/dist/llm-docs/twist.d.ts.map +1 -1
  163. package/dist/llm-docs/twist.js +1 -1
  164. package/dist/llm-docs/twist.js.map +1 -1
  165. package/dist/options.d.ts +104 -0
  166. package/dist/options.d.ts.map +1 -0
  167. package/dist/options.js +40 -0
  168. package/dist/options.js.map +1 -0
  169. package/dist/plot.d.ts +254 -588
  170. package/dist/plot.d.ts.map +1 -1
  171. package/dist/plot.js +16 -49
  172. package/dist/plot.js.map +1 -1
  173. package/dist/schedule.d.ts +172 -0
  174. package/dist/schedule.d.ts.map +1 -0
  175. package/dist/schedule.js +2 -0
  176. package/dist/schedule.js.map +1 -0
  177. package/dist/source.d.ts +133 -0
  178. package/dist/source.d.ts.map +1 -0
  179. package/dist/source.js +116 -0
  180. package/dist/source.js.map +1 -0
  181. package/dist/tag.d.ts +3 -10
  182. package/dist/tag.d.ts.map +1 -1
  183. package/dist/tag.js +2 -11
  184. package/dist/tag.js.map +1 -1
  185. package/dist/tool.d.ts +1 -15
  186. package/dist/tool.d.ts.map +1 -1
  187. package/dist/tool.js.map +1 -1
  188. package/dist/tools/callbacks.d.ts +1 -1
  189. package/dist/tools/callbacks.js +1 -1
  190. package/dist/tools/integrations.d.ts +107 -50
  191. package/dist/tools/integrations.d.ts.map +1 -1
  192. package/dist/tools/integrations.js +23 -22
  193. package/dist/tools/integrations.js.map +1 -1
  194. package/dist/tools/plot.d.ts +133 -117
  195. package/dist/tools/plot.d.ts.map +1 -1
  196. package/dist/tools/plot.js +19 -21
  197. package/dist/tools/plot.js.map +1 -1
  198. package/dist/tools/twists.d.ts +1 -1
  199. package/dist/twist-guide.d.ts +1 -1
  200. package/dist/twist-guide.d.ts.map +1 -1
  201. package/dist/twist.d.ts +66 -11
  202. package/dist/twist.d.ts.map +1 -1
  203. package/dist/twist.js +79 -10
  204. package/dist/twist.js.map +1 -1
  205. package/dist/utils/types.d.ts +5 -1
  206. package/dist/utils/types.d.ts.map +1 -1
  207. package/package.json +16 -41
  208. package/dist/common/calendar.d.ts +0 -135
  209. package/dist/common/calendar.d.ts.map +0 -1
  210. package/dist/common/calendar.js +0 -2
  211. package/dist/common/calendar.js.map +0 -1
  212. package/dist/common/documents.d.ts +0 -122
  213. package/dist/common/documents.d.ts.map +0 -1
  214. package/dist/common/documents.js +0 -2
  215. package/dist/common/documents.js.map +0 -1
  216. package/dist/common/messaging.d.ts +0 -84
  217. package/dist/common/messaging.d.ts.map +0 -1
  218. package/dist/common/messaging.js +0 -2
  219. package/dist/common/messaging.js.map +0 -1
  220. package/dist/common/projects.d.ts +0 -112
  221. package/dist/common/projects.d.ts.map +0 -1
  222. package/dist/common/projects.js +0 -2
  223. package/dist/common/projects.js.map +0 -1
  224. package/dist/docs/documents/Building_Custom_Tools.html +0 -215
  225. package/dist/docs/enums/plot.ActivityKind.html +0 -14
  226. package/dist/docs/enums/plot.ActivityType.html +0 -10
  227. package/dist/docs/modules/common_calendar.html +0 -1
  228. package/dist/docs/types/common_calendar.Calendar.html +0 -13
  229. package/dist/docs/types/common_calendar.CalendarTool.html +0 -81
  230. package/dist/docs/types/common_calendar.SyncOptions.html +0 -24
  231. package/dist/docs/types/plot.Activity.html +0 -2
  232. package/dist/docs/types/plot.ActivityCommon.html +0 -20
  233. package/dist/docs/types/plot.ActivityFilter.html +0 -3
  234. package/dist/docs/types/plot.ActivityLink.html +0 -26
  235. package/dist/docs/types/plot.ActivityMeta.html +0 -11
  236. package/dist/docs/types/plot.ActivityOccurrence.html +0 -22
  237. package/dist/docs/types/plot.ActivityOccurrenceUpdate.html +0 -3
  238. package/dist/docs/types/plot.ActivityUpdate.html +0 -3
  239. package/dist/docs/types/plot.ActivityWithNotes.html +0 -1
  240. package/dist/docs/types/plot.NewActivity.html +0 -81
  241. package/dist/docs/types/plot.NewActivityOccurrence.html +0 -24
  242. package/dist/docs/types/plot.NewActivityWithNotes.html +0 -1
  243. package/dist/docs/types/tool.SyncToolOptions.html +0 -9
  244. package/dist/docs/types/tools_integrations.IntegrationOptions.html +0 -4
  245. package/dist/docs/types/tools_integrations.IntegrationProviderConfig.html +0 -13
  246. package/dist/docs/types/tools_integrations.Syncable.html +0 -7
  247. package/dist/llm-docs/common/calendar.d.ts +0 -9
  248. package/dist/llm-docs/common/calendar.d.ts.map +0 -1
  249. package/dist/llm-docs/common/calendar.js +0 -8
  250. package/dist/llm-docs/common/calendar.js.map +0 -1
  251. package/dist/llm-docs/common/documents.d.ts +0 -9
  252. package/dist/llm-docs/common/documents.d.ts.map +0 -1
  253. package/dist/llm-docs/common/documents.js +0 -8
  254. package/dist/llm-docs/common/documents.js.map +0 -1
  255. package/dist/llm-docs/common/messaging.d.ts +0 -9
  256. package/dist/llm-docs/common/messaging.d.ts.map +0 -1
  257. package/dist/llm-docs/common/messaging.js +0 -8
  258. package/dist/llm-docs/common/messaging.js.map +0 -1
  259. package/dist/llm-docs/common/projects.d.ts +0 -9
  260. package/dist/llm-docs/common/projects.d.ts.map +0 -1
  261. package/dist/llm-docs/common/projects.js +0 -8
  262. package/dist/llm-docs/common/projects.js.map +0 -1
@@ -1,13 +1,14 @@
1
- import { type Activity, type ActivityOccurrence, type ActivityUpdate, type Actor, type ActorId, ITool, type NewActivity, type NewActivityWithNotes, type NewContact, type NewNote, type NewPriority, type Note, type NoteUpdate, type Priority, type PriorityUpdate, type Tag, Uuid } from "..";
2
- export declare enum ActivityAccess {
1
+ import { type Thread, type ThreadUpdate, type Actor, type ActorId, ITool, type Link, type NewThread, type NewThreadWithNotes, type NewContact, type NewNote, type NewPriority, type Note, type NoteUpdate, type Priority, type PriorityUpdate, Uuid } from "..";
2
+ import { type Schedule, type NewSchedule } from "../schedule";
3
+ export declare enum ThreadAccess {
3
4
  /**
4
- * Create new Note on an Activity where the twist was mentioned.
5
- * Add/remove tags on Activity or Note where the twist was mentioned.
5
+ * Create new Note on a Thread where the twist was mentioned.
6
+ * Add/remove tags on Thread or Note where the twist was mentioned.
6
7
  */
7
8
  Respond = 0,
8
9
  /**
9
- * Create new Activity.
10
- * Create new Note in an Activity the twist created.
10
+ * Create new Thread.
11
+ * Create new Note in a Thread the twist created.
11
12
  * All Respond permissions.
12
13
  */
13
14
  Create = 1
@@ -32,8 +33,8 @@ export declare enum ContactAccess {
32
33
  Write = 1
33
34
  }
34
35
  /**
35
- * Intent handler for activity mentions.
36
- * Defines how the twist should respond when mentioned in an activity.
36
+ * Intent handler for thread mentions.
37
+ * Defines how the twist should respond when mentioned in a thread.
37
38
  */
38
39
  export type NoteIntentHandler = {
39
40
  /** Human-readable description of what this intent handles */
@@ -43,10 +44,23 @@ export type NoteIntentHandler = {
43
44
  /** The function to call when this intent is matched */
44
45
  handler: (note: Note) => Promise<void>;
45
46
  };
47
+ /**
48
+ * Filter for querying links from connected source channels.
49
+ */
50
+ export type LinkFilter = {
51
+ /** Only return links from these channel IDs. */
52
+ channelIds?: string[];
53
+ /** Only return links created/updated after this date. */
54
+ since?: Date;
55
+ /** Only return links of this type. */
56
+ type?: string;
57
+ /** Maximum number of links to return. */
58
+ limit?: number;
59
+ };
46
60
  /**
47
61
  * Built-in tool for interacting with the core Plot data layer.
48
62
  *
49
- * The Plot tool provides twists with the ability to create and manage activities,
63
+ * The Plot tool provides twists with the ability to create and manage threads,
50
64
  * priorities, and contacts within the Plot system. This is the primary interface
51
65
  * for twists to persist data and interact with the Plot database.
52
66
  *
@@ -61,13 +75,12 @@ export type NoteIntentHandler = {
61
75
  * }
62
76
  *
63
77
  * async activate(priority) {
64
- * // Create a welcome activity
65
- * await this.plot.createActivity({
66
- * type: ActivityType.Note,
78
+ * // Create a welcome thread
79
+ * await this.plot.createThread({
67
80
  * title: "Welcome to Plot!",
68
- * links: [{
81
+ * actions: [{
69
82
  * title: "Get Started",
70
- * type: ActivityLinkType.external,
83
+ * type: ActionType.external,
71
84
  * url: "https://plot.day/docs"
72
85
  * }]
73
86
  * });
@@ -87,8 +100,8 @@ export declare abstract class Plot extends ITool {
87
100
  * build(build: ToolBuilder) {
88
101
  * return {
89
102
  * plot: build(Plot, {
90
- * activity: {
91
- * access: ActivityAccess.Create
103
+ * thread: {
104
+ * access: ThreadAccess.Create
92
105
  * }
93
106
  * })
94
107
  * };
@@ -98,9 +111,8 @@ export declare abstract class Plot extends ITool {
98
111
  * build(build: ToolBuilder) {
99
112
  * return {
100
113
  * plot: build(Plot, {
101
- * activity: {
102
- * access: ActivityAccess.Create,
103
- * updated: this.onActivityUpdated
114
+ * thread: {
115
+ * access: ThreadAccess.Create,
104
116
  * },
105
117
  * note: {
106
118
  * intents: [{
@@ -108,8 +120,8 @@ export declare abstract class Plot extends ITool {
108
120
  * examples: ["Schedule a meeting tomorrow"],
109
121
  * handler: this.onSchedulingIntent
110
122
  * }],
111
- * created: this.onNoteCreated
112
123
  * },
124
+ * link: true,
113
125
  * priority: {
114
126
  * access: PriorityAccess.Full
115
127
  * },
@@ -122,27 +134,12 @@ export declare abstract class Plot extends ITool {
122
134
  * ```
123
135
  */
124
136
  static readonly Options: {
125
- activity?: {
137
+ thread?: {
126
138
  /**
127
139
  * Capability to create Notes and modify tags.
128
140
  * Must be explicitly set to grant permissions.
129
141
  */
130
- access?: ActivityAccess;
131
- /**
132
- * Called when an activity created by this twist is updated.
133
- * This is often used to implement two-way sync with an external system.
134
- *
135
- * @param activity - The updated activity
136
- * @param changes - Changes to the activity and the previous version
137
- */
138
- updated?: (activity: Activity, changes: {
139
- tagsAdded: Record<Tag, ActorId[]>;
140
- tagsRemoved: Record<Tag, ActorId[]>;
141
- /**
142
- * If present, this update is for a specific occurrence of a recurring activity.
143
- */
144
- occurrence?: ActivityOccurrence;
145
- }) => Promise<void>;
142
+ access?: ThreadAccess;
146
143
  };
147
144
  note?: {
148
145
  /**
@@ -165,18 +162,9 @@ export declare abstract class Plot extends ITool {
165
162
  * ```
166
163
  */
167
164
  intents?: NoteIntentHandler[];
168
- /**
169
- * Called when a note is created on an activity created by this twist.
170
- * This is often used to implement two-way sync with an external system,
171
- * such as syncing notes as comments back to the source system.
172
- *
173
- * Notes created by the twist itself are automatically filtered out to prevent loops.
174
- * The parent activity is available via note.activity.
175
- *
176
- * @param note - The newly created note
177
- */
178
- created?: (note: Note) => Promise<void>;
179
165
  };
166
+ /** Enable link processing from connected source channels. */
167
+ link?: true;
180
168
  priority?: {
181
169
  access?: PriorityAccess;
182
170
  };
@@ -185,100 +173,85 @@ export declare abstract class Plot extends ITool {
185
173
  };
186
174
  };
187
175
  /**
188
- * Creates a new activity in the Plot system.
176
+ * Creates a new thread in the Plot system.
189
177
  *
190
- * The activity will be automatically assigned an ID and author information
191
- * based on the current execution context. All other fields from NewActivity
192
- * will be preserved in the created activity.
178
+ * The thread will be automatically assigned an ID and author information
179
+ * based on the current execution context. All other fields from NewThread
180
+ * will be preserved in the created thread.
193
181
  *
194
- * @param activity - The activity data to create
195
- * @returns Promise resolving to the created activity's ID
182
+ * @param thread - The thread data to create
183
+ * @returns Promise resolving to the created thread's ID
196
184
  */
197
- abstract createActivity(activity: NewActivity | NewActivityWithNotes): Promise<Uuid>;
185
+ abstract createThread(thread: NewThread | NewThreadWithNotes): Promise<Uuid>;
198
186
  /**
199
- * Creates multiple activities in a single batch operation.
187
+ * Creates multiple threads in a single batch operation.
200
188
  *
201
- * This method efficiently creates multiple activities at once, which is
202
- * more performant than calling createActivity() multiple times individually.
203
- * All activities are created with the same author and access control rules.
189
+ * This method efficiently creates multiple threads at once, which is
190
+ * more performant than calling createThread() multiple times individually.
191
+ * All threads are created with the same author and access control rules.
204
192
  *
205
- * @param activities - Array of activity data to create
206
- * @returns Promise resolving to array of created activity IDs
193
+ * @param threads - Array of thread data to create
194
+ * @returns Promise resolving to array of created thread IDs
207
195
  */
208
- abstract createActivities(activities: (NewActivity | NewActivityWithNotes)[]): Promise<Uuid[]>;
196
+ abstract createThreads(threads: (NewThread | NewThreadWithNotes)[]): Promise<Uuid[]>;
209
197
  /**
210
- * Updates an existing activity in the Plot system.
198
+ * Updates an existing thread in the Plot system.
211
199
  *
212
- * **Important**: This method only updates existing activities. It will throw an error
213
- * if the activity does not exist. Use `createActivity()` to create or update (upsert)
214
- * activities.
200
+ * **Important**: This method only updates existing threads. It will throw an error
201
+ * if the thread does not exist. Use `createThread()` to create or update (upsert)
202
+ * threads.
215
203
  *
216
204
  * Only the fields provided in the update object will be modified - all other fields
217
205
  * remain unchanged. This enables partial updates without needing to fetch and resend
218
- * the entire activity object.
206
+ * the entire thread object.
219
207
  *
220
208
  * For tags, provide a Record<number, boolean> where true adds a tag and false removes it.
221
209
  * Tags not included in the update remain unchanged.
222
210
  *
223
- * When updating the parent, the activity's path will be automatically recalculated to
211
+ * When updating the parent, the thread's path will be automatically recalculated to
224
212
  * maintain the correct hierarchical structure.
225
213
  *
226
- * When updating scheduling fields (start, end, recurrence*), the database will
227
- * automatically recalculate duration and range values to maintain consistency.
214
+ * Scheduling is handled separately via `createSchedule()` / `updateSchedule()`.
228
215
  *
229
- * @param activity - The activity update containing the ID or source and fields to change
216
+ * @param thread - The thread update containing the ID or source and fields to change
230
217
  * @returns Promise that resolves when the update is complete
231
- * @throws Error if the activity does not exist
218
+ * @throws Error if the thread does not exist
232
219
  *
233
220
  * @example
234
221
  * ```typescript
235
222
  * // Mark a task as complete
236
- * await this.plot.updateActivity({
223
+ * await this.plot.updateThread({
237
224
  * id: "task-123",
238
225
  * done: new Date()
239
226
  * });
240
227
  *
241
- * // Reschedule an event
242
- * await this.plot.updateActivity({
243
- * id: "event-456",
244
- * start: new Date("2024-03-15T10:00:00Z"),
245
- * end: new Date("2024-03-15T11:00:00Z")
246
- * });
247
- *
248
228
  * // Add and remove tags
249
- * await this.plot.updateActivity({
250
- * id: "activity-789",
229
+ * await this.plot.updateThread({
230
+ * id: "thread-789",
251
231
  * tags: {
252
232
  * 1: true, // Add tag with ID 1
253
233
  * 2: false // Remove tag with ID 2
254
234
  * }
255
235
  * });
256
- *
257
- * // Update a recurring event exception
258
- * await this.plot.updateActivity({
259
- * id: "exception-123",
260
- * occurrence: new Date("2024-03-20T09:00:00Z"),
261
- * title: "Rescheduled meeting"
262
- * });
263
236
  * ```
264
237
  */
265
- abstract updateActivity(activity: ActivityUpdate): Promise<void>;
238
+ abstract updateThread(thread: ThreadUpdate): Promise<void>;
266
239
  /**
267
- * Retrieves all notes within an activity.
240
+ * Retrieves all notes within a thread.
268
241
  *
269
- * Notes are detailed entries within an activity, ordered by creation time.
270
- * Each note can contain markdown content, links, and other detailed information
271
- * related to the parent activity.
242
+ * Notes are detailed entries within a thread, ordered by creation time.
243
+ * Each note can contain markdown content, actions, and other detailed information
244
+ * related to the parent thread.
272
245
  *
273
- * @param activity - The activity whose notes to retrieve
274
- * @returns Promise resolving to array of notes in the activity
246
+ * @param thread - The thread whose notes to retrieve
247
+ * @returns Promise resolving to array of notes in the thread
275
248
  */
276
- abstract getNotes(activity: Activity): Promise<Note[]>;
249
+ abstract getNotes(thread: Thread): Promise<Note[]>;
277
250
  /**
278
- * Creates a new note in an activity.
251
+ * Creates a new note in a thread.
279
252
  *
280
- * Notes provide detailed content within an activity, supporting markdown,
281
- * links, and other rich content. The note will be automatically assigned
253
+ * Notes provide detailed content within a thread, supporting markdown,
254
+ * actions, and other rich content. The note will be automatically assigned
282
255
  * an ID and author information based on the current execution context.
283
256
  *
284
257
  * @param note - The note data to create
@@ -288,17 +261,17 @@ export declare abstract class Plot extends ITool {
288
261
  * ```typescript
289
262
  * // Create a note with content
290
263
  * await this.plot.createNote({
291
- * activity: { id: "activity-123" },
264
+ * thread: { id: "thread-123" },
292
265
  * note: "Discussion notes from the meeting...",
293
266
  * contentType: "markdown"
294
267
  * });
295
268
  *
296
- * // Create a note with links
269
+ * // Create a note with actions
297
270
  * await this.plot.createNote({
298
- * activity: { id: "activity-456" },
271
+ * thread: { id: "thread-456" },
299
272
  * note: "Meeting recording available",
300
- * links: [{
301
- * type: ActivityLinkType.external,
273
+ * actions: [{
274
+ * type: ActionType.external,
302
275
  * title: "View Recording",
303
276
  * url: "https://example.com/recording"
304
277
  * }]
@@ -321,11 +294,11 @@ export declare abstract class Plot extends ITool {
321
294
  * // Create multiple notes in one batch
322
295
  * await this.plot.createNotes([
323
296
  * {
324
- * activity: { id: "activity-123" },
297
+ * thread: { id: "thread-123" },
325
298
  * note: "First message in thread"
326
299
  * },
327
300
  * {
328
- * activity: { id: "activity-123" },
301
+ * thread: { id: "thread-123" },
329
302
  * note: "Second message in thread"
330
303
  * }
331
304
  * ]);
@@ -365,25 +338,25 @@ export declare abstract class Plot extends ITool {
365
338
  */
366
339
  abstract updateNote(note: NoteUpdate): Promise<void>;
367
340
  /**
368
- * Retrieves an activity by ID or source.
341
+ * Retrieves a thread by ID or source.
369
342
  *
370
- * This method enables lookup of activities either by their unique ID or by their
371
- * source identifier (canonical URL from an external system). Archived activities
343
+ * This method enables lookup of threads either by their unique ID or by their
344
+ * source identifier (canonical URL from an external system). Archived threads
372
345
  * are included in the results.
373
346
  *
374
- * @param activity - Activity lookup by ID or source
375
- * @returns Promise resolving to the matching activity or null if not found
347
+ * @param thread - Thread lookup by ID or source
348
+ * @returns Promise resolving to the matching thread or null if not found
376
349
  */
377
- abstract getActivity(activity: {
350
+ abstract getThread(thread: {
378
351
  id: Uuid;
379
352
  } | {
380
353
  source: string;
381
- }): Promise<Activity | null>;
354
+ }): Promise<Thread | null>;
382
355
  /**
383
356
  * Retrieves a note by ID or key.
384
357
  *
385
358
  * This method enables lookup of notes either by their unique ID or by their
386
- * key (unique identifier within the activity). Archived notes are included
359
+ * key (unique identifier within the thread). Archived notes are included
387
360
  * in the results.
388
361
  *
389
362
  * @param note - Note lookup by ID or key
@@ -397,7 +370,7 @@ export declare abstract class Plot extends ITool {
397
370
  /**
398
371
  * Creates a new priority in the Plot system.
399
372
  *
400
- * Priorities serve as organizational containers for activities and twists.
373
+ * Priorities serve as organizational containers for threads and twists.
401
374
  * The created priority will be automatically assigned a unique ID.
402
375
  *
403
376
  * @param priority - The priority data to create
@@ -432,7 +405,7 @@ export declare abstract class Plot extends ITool {
432
405
  /**
433
406
  * Adds contacts to the Plot system.
434
407
  *
435
- * Contacts are used for associating people with activities, such as
408
+ * Contacts are used for associating people with threads, such as
436
409
  * event attendees or task assignees. Duplicate contacts (by email)
437
410
  * will be merged or updated as appropriate.
438
411
  * This method requires ContactAccess.Write permission.
@@ -451,5 +424,48 @@ export declare abstract class Plot extends ITool {
451
424
  * @returns Promise resolving to array of actors
452
425
  */
453
426
  abstract getActors(ids: ActorId[]): Promise<Actor[]>;
427
+ /**
428
+ * Creates a new schedule for a thread.
429
+ *
430
+ * Schedules define when a thread occurs in time. A thread can have
431
+ * multiple schedules (shared and per-user).
432
+ *
433
+ * @param schedule - The schedule data to create
434
+ * @returns Promise resolving to the created schedule
435
+ *
436
+ * @example
437
+ * ```typescript
438
+ * // Schedule a timed event
439
+ * const threadId = await this.plot.createThread({
440
+ * title: "Team standup"
441
+ * });
442
+ * await this.plot.createSchedule({
443
+ * threadId,
444
+ * start: new Date("2025-01-15T10:00:00Z"),
445
+ * end: new Date("2025-01-15T10:30:00Z"),
446
+ * recurrenceRule: "FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR"
447
+ * });
448
+ * ```
449
+ */
450
+ abstract createSchedule(schedule: NewSchedule): Promise<Schedule>;
451
+ /**
452
+ * Retrieves all schedules for a thread.
453
+ *
454
+ * @param threadId - The thread whose schedules to retrieve
455
+ * @returns Promise resolving to array of schedules for the thread
456
+ */
457
+ abstract getSchedules(threadId: Uuid): Promise<Schedule[]>;
458
+ /**
459
+ * Retrieves links from connected source channels.
460
+ *
461
+ * Requires `link: true` in Plot options.
462
+ *
463
+ * @param filter - Optional filter criteria for links
464
+ * @returns Promise resolving to array of links with their notes
465
+ */
466
+ abstract getLinks(filter?: LinkFilter): Promise<Array<{
467
+ link: Link;
468
+ notes: Note[];
469
+ }>>;
454
470
  }
455
471
  //# sourceMappingURL=plot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,EACL,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,GAAG,EACR,IAAI,EACL,MAAM,IAAI,CAAC;AAEZ,oBAAY,cAAc;IACxB;;;OAGG;IACH,OAAO,IAAA;IACP;;;;OAIG;IACH,MAAM,IAAA;CACP;AAED,oBAAY,cAAc;IACxB;;;OAGG;IACH,MAAM,IAAA;IACN;;;;OAIG;IACH,IAAI,IAAA;CACL;AAED,oBAAY,aAAa;IACvB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CAAC;CACtF"}
@@ -1,18 +1,18 @@
1
1
  import { ITool, } from "..";
2
- export var ActivityAccess;
3
- (function (ActivityAccess) {
2
+ export var ThreadAccess;
3
+ (function (ThreadAccess) {
4
4
  /**
5
- * Create new Note on an Activity where the twist was mentioned.
6
- * Add/remove tags on Activity or Note where the twist was mentioned.
5
+ * Create new Note on a Thread where the twist was mentioned.
6
+ * Add/remove tags on Thread or Note where the twist was mentioned.
7
7
  */
8
- ActivityAccess[ActivityAccess["Respond"] = 0] = "Respond";
8
+ ThreadAccess[ThreadAccess["Respond"] = 0] = "Respond";
9
9
  /**
10
- * Create new Activity.
11
- * Create new Note in an Activity the twist created.
10
+ * Create new Thread.
11
+ * Create new Note in a Thread the twist created.
12
12
  * All Respond permissions.
13
13
  */
14
- ActivityAccess[ActivityAccess["Create"] = 1] = "Create";
15
- })(ActivityAccess || (ActivityAccess = {}));
14
+ ThreadAccess[ThreadAccess["Create"] = 1] = "Create";
15
+ })(ThreadAccess || (ThreadAccess = {}));
16
16
  export var PriorityAccess;
17
17
  (function (PriorityAccess) {
18
18
  /**
@@ -37,7 +37,7 @@ export var ContactAccess;
37
37
  /**
38
38
  * Built-in tool for interacting with the core Plot data layer.
39
39
  *
40
- * The Plot tool provides twists with the ability to create and manage activities,
40
+ * The Plot tool provides twists with the ability to create and manage threads,
41
41
  * priorities, and contacts within the Plot system. This is the primary interface
42
42
  * for twists to persist data and interact with the Plot database.
43
43
  *
@@ -52,13 +52,12 @@ export var ContactAccess;
52
52
  * }
53
53
  *
54
54
  * async activate(priority) {
55
- * // Create a welcome activity
56
- * await this.plot.createActivity({
57
- * type: ActivityType.Note,
55
+ * // Create a welcome thread
56
+ * await this.plot.createThread({
58
57
  * title: "Welcome to Plot!",
59
- * links: [{
58
+ * actions: [{
60
59
  * title: "Get Started",
61
- * type: ActivityLinkType.external,
60
+ * type: ActionType.external,
62
61
  * url: "https://plot.day/docs"
63
62
  * }]
64
63
  * });
@@ -78,8 +77,8 @@ export class Plot extends ITool {
78
77
  * build(build: ToolBuilder) {
79
78
  * return {
80
79
  * plot: build(Plot, {
81
- * activity: {
82
- * access: ActivityAccess.Create
80
+ * thread: {
81
+ * access: ThreadAccess.Create
83
82
  * }
84
83
  * })
85
84
  * };
@@ -89,9 +88,8 @@ export class Plot extends ITool {
89
88
  * build(build: ToolBuilder) {
90
89
  * return {
91
90
  * plot: build(Plot, {
92
- * activity: {
93
- * access: ActivityAccess.Create,
94
- * updated: this.onActivityUpdated
91
+ * thread: {
92
+ * access: ThreadAccess.Create,
95
93
  * },
96
94
  * note: {
97
95
  * intents: [{
@@ -99,8 +97,8 @@ export class Plot extends ITool {
99
97
  * examples: ["Schedule a meeting tomorrow"],
100
98
  * handler: this.onSchedulingIntent
101
99
  * }],
102
- * created: this.onNoteCreated
103
100
  * },
101
+ * link: true,
104
102
  * priority: {
105
103
  * access: PriorityAccess.Full
106
104
  * },
@@ -1 +1 @@
1
- {"version":3,"file":"plot.js","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,GAYN,MAAM,IAAI,CAAC;AAEZ,MAAM,CAAN,IAAY,cAYX;AAZD,WAAY,cAAc;IACxB;;;OAGG;IACH,yDAAO,CAAA;IACP;;;;OAIG;IACH,uDAAM,CAAA;AACR,CAAC,EAZW,cAAc,KAAd,cAAc,QAYzB;AAED,MAAM,CAAN,IAAY,cAYX;AAZD,WAAY,cAAc;IACxB;;;OAGG;IACH,uDAAM,CAAA;IACN;;;;OAIG;IACH,mDAAI,CAAA;AACN,CAAC,EAZW,cAAc,KAAd,cAAc,QAYzB;AAED,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,iFAAiF;IACjF,iDAAI,CAAA;IACJ,kCAAkC;IAClC,mDAAK,CAAA;AACP,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAeD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,OAAgB,IAAK,SAAQ,KAAK;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,MAAM,CAAU,OAAO,CAiErB;CAkSH"}
1
+ {"version":3,"file":"plot.js","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GAYN,MAAM,IAAI,CAAC;AAMZ,MAAM,CAAN,IAAY,YAYX;AAZD,WAAY,YAAY;IACtB;;;OAGG;IACH,qDAAO,CAAA;IACP;;;;OAIG;IACH,mDAAM,CAAA;AACR,CAAC,EAZW,YAAY,KAAZ,YAAY,QAYvB;AAED,MAAM,CAAN,IAAY,cAYX;AAZD,WAAY,cAAc;IACxB;;;OAGG;IACH,uDAAM,CAAA;IACN;;;;OAIG;IACH,mDAAI,CAAA;AACN,CAAC,EAZW,cAAc,KAAd,cAAc,QAYzB;AAED,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,iFAAiF;IACjF,iDAAI,CAAA;IACJ,kCAAkC;IAClC,mDAAK,CAAA;AACP,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AA6BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,OAAgB,IAAK,SAAQ,KAAK;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,MAAM,CAAU,OAAO,CAsCrB;CAiUH"}
@@ -41,7 +41,7 @@ export type Log = {
41
41
  * "https://googleapis.com/*": ["use"]
42
42
  * },
43
43
  * "plot": {
44
- * "activity:mentioned": ["read", "write", "update"],
44
+ * "thread:mentioned": ["read", "write", "update"],
45
45
  * "priority": ["read", "write", "update"]
46
46
  * }
47
47
  * }