@plotday/twister 0.20.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 (298) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +261 -0
  3. package/bin/commands/build.js +108 -0
  4. package/bin/commands/build.js.map +1 -0
  5. package/bin/commands/create.js +230 -0
  6. package/bin/commands/create.js.map +1 -0
  7. package/bin/commands/deploy.js +292 -0
  8. package/bin/commands/deploy.js.map +1 -0
  9. package/bin/commands/generate.js +301 -0
  10. package/bin/commands/generate.js.map +1 -0
  11. package/bin/commands/lint.js +69 -0
  12. package/bin/commands/lint.js.map +1 -0
  13. package/bin/commands/login.js +140 -0
  14. package/bin/commands/login.js.map +1 -0
  15. package/bin/commands/priority-create.js +102 -0
  16. package/bin/commands/priority-create.js.map +1 -0
  17. package/bin/commands/priority-list.js +47 -0
  18. package/bin/commands/priority-list.js.map +1 -0
  19. package/bin/commands/twist-logs.js +187 -0
  20. package/bin/commands/twist-logs.js.map +1 -0
  21. package/bin/index.js +129 -0
  22. package/bin/index.js.map +1 -0
  23. package/bin/package.json +3 -0
  24. package/bin/plot.cjs +3 -0
  25. package/bin/templates/AGENTS.template.md +403 -0
  26. package/bin/templates/CLAUDE.template.md +1 -0
  27. package/bin/templates/README.template.md +189 -0
  28. package/bin/utils/bundle.js +106 -0
  29. package/bin/utils/bundle.js.map +1 -0
  30. package/bin/utils/output.js +133 -0
  31. package/bin/utils/output.js.map +1 -0
  32. package/bin/utils/packageManager.js +65 -0
  33. package/bin/utils/packageManager.js.map +1 -0
  34. package/bin/utils/sse.js +100 -0
  35. package/bin/utils/sse.js.map +1 -0
  36. package/bin/utils/token.js +75 -0
  37. package/bin/utils/token.js.map +1 -0
  38. package/cli/templates/AGENTS.template.md +403 -0
  39. package/cli/templates/CLAUDE.template.md +1 -0
  40. package/cli/templates/README.template.md +189 -0
  41. package/dist/common/calendar.d.ts +144 -0
  42. package/dist/common/calendar.d.ts.map +1 -0
  43. package/dist/common/calendar.js +2 -0
  44. package/dist/common/calendar.js.map +1 -0
  45. package/dist/common/messaging.d.ts +84 -0
  46. package/dist/common/messaging.d.ts.map +1 -0
  47. package/dist/common/messaging.js +2 -0
  48. package/dist/common/messaging.js.map +1 -0
  49. package/dist/creator-docs.d.ts +11 -0
  50. package/dist/creator-docs.d.ts.map +1 -0
  51. package/dist/creator-docs.js +27 -0
  52. package/dist/creator-docs.js.map +1 -0
  53. package/dist/docs/.nojekyll +1 -0
  54. package/dist/docs/assets/favicon.svg +8 -0
  55. package/dist/docs/assets/hierarchy.js +1 -0
  56. package/dist/docs/assets/highlight.css +134 -0
  57. package/dist/docs/assets/icons.js +18 -0
  58. package/dist/docs/assets/icons.svg +1 -0
  59. package/dist/docs/assets/main.js +60 -0
  60. package/dist/docs/assets/navigation.js +1 -0
  61. package/dist/docs/assets/search.js +1 -0
  62. package/dist/docs/assets/style.css +1633 -0
  63. package/dist/docs/classes/tool.ITool.html +4 -0
  64. package/dist/docs/classes/tool.Tool.html +116 -0
  65. package/dist/docs/classes/tools_ai.AI.html +27 -0
  66. package/dist/docs/classes/tools_callbacks.Callbacks.html +45 -0
  67. package/dist/docs/classes/tools_integrations.Integrations.html +26 -0
  68. package/dist/docs/classes/tools_network.Network.html +68 -0
  69. package/dist/docs/classes/tools_plot.Plot.html +82 -0
  70. package/dist/docs/classes/tools_store.Store.html +53 -0
  71. package/dist/docs/classes/tools_tasks.Tasks.html +39 -0
  72. package/dist/docs/classes/tools_twists.Twists.html +59 -0
  73. package/dist/docs/classes/twist.Twist.html +96 -0
  74. package/dist/docs/documents/Advanced.html +91 -0
  75. package/dist/docs/documents/Building_Custom_Tools.html +200 -0
  76. package/dist/docs/documents/Built-in_Tools.html +170 -0
  77. package/dist/docs/documents/CLI_Reference.html +193 -0
  78. package/dist/docs/documents/Core_Concepts.html +163 -0
  79. package/dist/docs/documents/Getting_Started.html +94 -0
  80. package/dist/docs/documents/Runtime_Environment.html +128 -0
  81. package/dist/docs/enums/plot.ActivityLinkType.html +12 -0
  82. package/dist/docs/enums/plot.ActivityType.html +10 -0
  83. package/dist/docs/enums/plot.ActorType.html +10 -0
  84. package/dist/docs/enums/plot.ConferencingProvider.html +14 -0
  85. package/dist/docs/enums/tag.Tag.html +45 -0
  86. package/dist/docs/enums/tools_ai.AIModel.html +31 -0
  87. package/dist/docs/enums/tools_integrations.AuthLevel.html +7 -0
  88. package/dist/docs/enums/tools_integrations.AuthProvider.html +24 -0
  89. package/dist/docs/enums/tools_plot.ActivityAccess.html +8 -0
  90. package/dist/docs/enums/tools_plot.ContactAccess.html +5 -0
  91. package/dist/docs/enums/tools_plot.PriorityAccess.html +8 -0
  92. package/dist/docs/hierarchy.html +1 -0
  93. package/dist/docs/index.html +100 -0
  94. package/dist/docs/interfaces/common_calendar.Calendar.html +13 -0
  95. package/dist/docs/interfaces/common_calendar.CalendarTool.html +49 -0
  96. package/dist/docs/interfaces/common_calendar.SyncOptions.html +8 -0
  97. package/dist/docs/interfaces/tools_ai.AIRequest.html +46 -0
  98. package/dist/docs/interfaces/tools_ai.AIResponse.html +19 -0
  99. package/dist/docs/interfaces/tools_ai.FilePart.html +14 -0
  100. package/dist/docs/interfaces/tools_ai.ImagePart.html +11 -0
  101. package/dist/docs/interfaces/tools_ai.ReasoningPart.html +7 -0
  102. package/dist/docs/interfaces/tools_ai.RedactedReasoningPart.html +5 -0
  103. package/dist/docs/interfaces/tools_ai.TextPart.html +5 -0
  104. package/dist/docs/interfaces/tools_ai.ToolCallPart.html +9 -0
  105. package/dist/docs/interfaces/tools_ai.ToolExecutionOptions.html +9 -0
  106. package/dist/docs/interfaces/tools_ai.ToolResultPart.html +9 -0
  107. package/dist/docs/interfaces/tools_twists.TwistSource.html +13 -0
  108. package/dist/docs/interfaces/utils_types.ToolShed.html +11 -0
  109. package/dist/docs/modules/common_calendar.html +1 -0
  110. package/dist/docs/modules/index.html +1 -0
  111. package/dist/docs/modules/plot.html +1 -0
  112. package/dist/docs/modules/tag.html +1 -0
  113. package/dist/docs/modules/tool.html +1 -0
  114. package/dist/docs/modules/tools_ai.html +1 -0
  115. package/dist/docs/modules/tools_callbacks.html +1 -0
  116. package/dist/docs/modules/tools_integrations.html +1 -0
  117. package/dist/docs/modules/tools_network.html +1 -0
  118. package/dist/docs/modules/tools_plot.html +1 -0
  119. package/dist/docs/modules/tools_store.html +1 -0
  120. package/dist/docs/modules/tools_tasks.html +1 -0
  121. package/dist/docs/modules/tools_twists.html +1 -0
  122. package/dist/docs/modules/twist.html +1 -0
  123. package/dist/docs/modules/utils_types.html +1 -0
  124. package/dist/docs/modules.html +1 -0
  125. package/dist/docs/types/common_calendar.CalendarAuth.html +7 -0
  126. package/dist/docs/types/plot.Activity.html +64 -0
  127. package/dist/docs/types/plot.ActivityLink.html +22 -0
  128. package/dist/docs/types/plot.ActivityMeta.html +11 -0
  129. package/dist/docs/types/plot.ActivityUpdate.html +13 -0
  130. package/dist/docs/types/plot.Actor.html +15 -0
  131. package/dist/docs/types/plot.ActorId.html +4 -0
  132. package/dist/docs/types/plot.NewActivity.html +16 -0
  133. package/dist/docs/types/plot.NewContact.html +13 -0
  134. package/dist/docs/types/plot.NewPriority.html +5 -0
  135. package/dist/docs/types/plot.NoteType.html +1 -0
  136. package/dist/docs/types/plot.PickPriorityConfig.html +22 -0
  137. package/dist/docs/types/plot.Priority.html +8 -0
  138. package/dist/docs/types/tools_ai.AIAssistantMessage.html +4 -0
  139. package/dist/docs/types/tools_ai.AIMessage.html +3 -0
  140. package/dist/docs/types/tools_ai.AISource.html +11 -0
  141. package/dist/docs/types/tools_ai.AISystemMessage.html +7 -0
  142. package/dist/docs/types/tools_ai.AITool.html +19 -0
  143. package/dist/docs/types/tools_ai.AIToolMessage.html +4 -0
  144. package/dist/docs/types/tools_ai.AIToolSet.html +1 -0
  145. package/dist/docs/types/tools_ai.AIUsage.html +10 -0
  146. package/dist/docs/types/tools_ai.AIUserMessage.html +4 -0
  147. package/dist/docs/types/tools_ai.DataContent.html +2 -0
  148. package/dist/docs/types/tools_ai.ModelPreferences.html +24 -0
  149. package/dist/docs/types/tools_callbacks.Callback.html +8 -0
  150. package/dist/docs/types/tools_integrations.AuthToken.html +16 -0
  151. package/dist/docs/types/tools_integrations.Authorization.html +10 -0
  152. package/dist/docs/types/tools_network.WebhookRequest.html +15 -0
  153. package/dist/docs/types/tools_plot.ActivityIntentHandler.html +9 -0
  154. package/dist/docs/types/tools_twists.Log.html +6 -0
  155. package/dist/docs/types/tools_twists.TwistPermissions.html +12 -0
  156. package/dist/docs/types/utils_types.BuiltInTools.html +5 -0
  157. package/dist/docs/types/utils_types.CallbackMethods.html +3 -0
  158. package/dist/docs/types/utils_types.ExtractBuildReturn.html +2 -0
  159. package/dist/docs/types/utils_types.InferOptions.html +2 -0
  160. package/dist/docs/types/utils_types.InferTools.html +3 -0
  161. package/dist/docs/types/utils_types.NoFunctions.html +3 -0
  162. package/dist/docs/types/utils_types.NonFunction.html +2 -0
  163. package/dist/docs/types/utils_types.PromiseValues.html +3 -0
  164. package/dist/docs/types/utils_types.ToolBuilder.html +3 -0
  165. package/dist/index.d.ts +7 -0
  166. package/dist/index.d.ts.map +1 -0
  167. package/dist/index.js +7 -0
  168. package/dist/index.js.map +1 -0
  169. package/dist/llm-docs/common/calendar.d.ts +9 -0
  170. package/dist/llm-docs/common/calendar.d.ts.map +1 -0
  171. package/dist/llm-docs/common/calendar.js +8 -0
  172. package/dist/llm-docs/common/calendar.js.map +1 -0
  173. package/dist/llm-docs/common/messaging.d.ts +9 -0
  174. package/dist/llm-docs/common/messaging.d.ts.map +1 -0
  175. package/dist/llm-docs/common/messaging.js +8 -0
  176. package/dist/llm-docs/common/messaging.js.map +1 -0
  177. package/dist/llm-docs/creator-docs.d.ts +9 -0
  178. package/dist/llm-docs/creator-docs.d.ts.map +1 -0
  179. package/dist/llm-docs/creator-docs.js +8 -0
  180. package/dist/llm-docs/creator-docs.js.map +1 -0
  181. package/dist/llm-docs/index.d.ts +11 -0
  182. package/dist/llm-docs/index.d.ts.map +1 -0
  183. package/dist/llm-docs/index.js +42 -0
  184. package/dist/llm-docs/index.js.map +1 -0
  185. package/dist/llm-docs/plot.d.ts +9 -0
  186. package/dist/llm-docs/plot.d.ts.map +1 -0
  187. package/dist/llm-docs/plot.js +8 -0
  188. package/dist/llm-docs/plot.js.map +1 -0
  189. package/dist/llm-docs/tag.d.ts +9 -0
  190. package/dist/llm-docs/tag.d.ts.map +1 -0
  191. package/dist/llm-docs/tag.js +8 -0
  192. package/dist/llm-docs/tag.js.map +1 -0
  193. package/dist/llm-docs/tool.d.ts +9 -0
  194. package/dist/llm-docs/tool.d.ts.map +1 -0
  195. package/dist/llm-docs/tool.js +8 -0
  196. package/dist/llm-docs/tool.js.map +1 -0
  197. package/dist/llm-docs/tools/ai.d.ts +9 -0
  198. package/dist/llm-docs/tools/ai.d.ts.map +1 -0
  199. package/dist/llm-docs/tools/ai.js +8 -0
  200. package/dist/llm-docs/tools/ai.js.map +1 -0
  201. package/dist/llm-docs/tools/callbacks.d.ts +9 -0
  202. package/dist/llm-docs/tools/callbacks.d.ts.map +1 -0
  203. package/dist/llm-docs/tools/callbacks.js +8 -0
  204. package/dist/llm-docs/tools/callbacks.js.map +1 -0
  205. package/dist/llm-docs/tools/integrations.d.ts +9 -0
  206. package/dist/llm-docs/tools/integrations.d.ts.map +1 -0
  207. package/dist/llm-docs/tools/integrations.js +8 -0
  208. package/dist/llm-docs/tools/integrations.js.map +1 -0
  209. package/dist/llm-docs/tools/network.d.ts +9 -0
  210. package/dist/llm-docs/tools/network.d.ts.map +1 -0
  211. package/dist/llm-docs/tools/network.js +8 -0
  212. package/dist/llm-docs/tools/network.js.map +1 -0
  213. package/dist/llm-docs/tools/plot.d.ts +9 -0
  214. package/dist/llm-docs/tools/plot.d.ts.map +1 -0
  215. package/dist/llm-docs/tools/plot.js +8 -0
  216. package/dist/llm-docs/tools/plot.js.map +1 -0
  217. package/dist/llm-docs/tools/store.d.ts +9 -0
  218. package/dist/llm-docs/tools/store.d.ts.map +1 -0
  219. package/dist/llm-docs/tools/store.js +8 -0
  220. package/dist/llm-docs/tools/store.js.map +1 -0
  221. package/dist/llm-docs/tools/tasks.d.ts +9 -0
  222. package/dist/llm-docs/tools/tasks.d.ts.map +1 -0
  223. package/dist/llm-docs/tools/tasks.js +8 -0
  224. package/dist/llm-docs/tools/tasks.js.map +1 -0
  225. package/dist/llm-docs/tools/twists.d.ts +9 -0
  226. package/dist/llm-docs/tools/twists.d.ts.map +1 -0
  227. package/dist/llm-docs/tools/twists.js +8 -0
  228. package/dist/llm-docs/tools/twists.js.map +1 -0
  229. package/dist/llm-docs/twist-guide-template.d.ts +9 -0
  230. package/dist/llm-docs/twist-guide-template.d.ts.map +1 -0
  231. package/dist/llm-docs/twist-guide-template.js +8 -0
  232. package/dist/llm-docs/twist-guide-template.js.map +1 -0
  233. package/dist/llm-docs/twist.d.ts +9 -0
  234. package/dist/llm-docs/twist.d.ts.map +1 -0
  235. package/dist/llm-docs/twist.js +8 -0
  236. package/dist/llm-docs/twist.js.map +1 -0
  237. package/dist/plot.d.ts +463 -0
  238. package/dist/plot.d.ts.map +1 -0
  239. package/dist/plot.js +68 -0
  240. package/dist/plot.js.map +1 -0
  241. package/dist/tag.d.ts +47 -0
  242. package/dist/tag.d.ts.map +1 -0
  243. package/dist/tag.js +51 -0
  244. package/dist/tag.js.map +1 -0
  245. package/dist/tool.d.ts +242 -0
  246. package/dist/tool.d.ts.map +1 -0
  247. package/dist/tool.js +283 -0
  248. package/dist/tool.js.map +1 -0
  249. package/dist/tools/ai.d.ts +697 -0
  250. package/dist/tools/ai.d.ts.map +1 -0
  251. package/dist/tools/ai.js +104 -0
  252. package/dist/tools/ai.js.map +1 -0
  253. package/dist/tools/callbacks.d.ts +96 -0
  254. package/dist/tools/callbacks.d.ts.map +1 -0
  255. package/dist/tools/callbacks.js +40 -0
  256. package/dist/tools/callbacks.js.map +1 -0
  257. package/dist/tools/index.d.ts +9 -0
  258. package/dist/tools/index.d.ts.map +1 -0
  259. package/dist/tools/index.js +9 -0
  260. package/dist/tools/index.js.map +1 -0
  261. package/dist/tools/integrations.d.ts +142 -0
  262. package/dist/tools/integrations.d.ts.map +1 -0
  263. package/dist/tools/integrations.js +79 -0
  264. package/dist/tools/integrations.js.map +1 -0
  265. package/dist/tools/network.d.ts +188 -0
  266. package/dist/tools/network.d.ts.map +1 -0
  267. package/dist/tools/network.js +87 -0
  268. package/dist/tools/network.js.map +1 -0
  269. package/dist/tools/plot.d.ts +252 -0
  270. package/dist/tools/plot.d.ts.map +1 -0
  271. package/dist/tools/plot.js +72 -0
  272. package/dist/tools/plot.js.map +1 -0
  273. package/dist/tools/store.d.ts +90 -0
  274. package/dist/tools/store.d.ts.map +1 -0
  275. package/dist/tools/store.js +48 -0
  276. package/dist/tools/store.js.map +1 -0
  277. package/dist/tools/tasks.d.ts +93 -0
  278. package/dist/tools/tasks.d.ts.map +1 -0
  279. package/dist/tools/tasks.js +58 -0
  280. package/dist/tools/tasks.js.map +1 -0
  281. package/dist/tools/twists.d.ts +213 -0
  282. package/dist/tools/twists.d.ts.map +1 -0
  283. package/dist/tools/twists.js +26 -0
  284. package/dist/tools/twists.js.map +1 -0
  285. package/dist/twist-guide.d.ts +2 -0
  286. package/dist/twist-guide.d.ts.map +1 -0
  287. package/dist/twist-guide.js +9 -0
  288. package/dist/twist-guide.js.map +1 -0
  289. package/dist/twist.d.ts +204 -0
  290. package/dist/twist.d.ts.map +1 -0
  291. package/dist/twist.js +216 -0
  292. package/dist/twist.js.map +1 -0
  293. package/dist/utils/types.d.ts +91 -0
  294. package/dist/utils/types.d.ts.map +1 -0
  295. package/dist/utils/types.js +2 -0
  296. package/dist/utils/types.js.map +1 -0
  297. package/package.json +206 -0
  298. package/tsconfig.base.json +28 -0
package/dist/plot.d.ts ADDED
@@ -0,0 +1,463 @@
1
+ import { type Tag } from "./tag";
2
+ import { type Callback } from "./tools/callbacks";
3
+ export { Tag } from "./tag";
4
+ /**
5
+ * Represents a unique user, contact, or twist in Plot.
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).
9
+ */
10
+ export type ActorId = string & {
11
+ readonly __brand: "ActorId";
12
+ };
13
+ /**
14
+ * Represents a priority context within Plot.
15
+ *
16
+ * Priorities are similar to projects in other apps. All Activity is in a Priority.
17
+ * Priorities can be nested.
18
+ */
19
+ export type Priority = {
20
+ /** Unique identifier for the priority */
21
+ id: string;
22
+ /** Human-readable title for the priority */
23
+ title: string;
24
+ };
25
+ /**
26
+ * Type for creating new priorities.
27
+ *
28
+ * Excludes the auto-generated ID field and adds an optional parentId
29
+ * for creating hierarchical priority structures.
30
+ */
31
+ export type NewPriority = Omit<Priority, "id"> & {
32
+ /** Optional ID of the parent priority for creating hierarchies */
33
+ parentId?: string;
34
+ };
35
+ /**
36
+ * Enumeration of supported activity types in Plot.
37
+ *
38
+ * Each activity type has different behaviors and rendering characteristics
39
+ * within the Plot application.
40
+ */
41
+ export declare enum ActivityType {
42
+ /** A note or piece of information without actionable requirements */
43
+ Note = 0,
44
+ /** An actionable item that can be completed */
45
+ Task = 1,
46
+ /** A scheduled occurrence with start and optional end time */
47
+ Event = 2
48
+ }
49
+ /**
50
+ * Enumeration of supported activity link types.
51
+ *
52
+ * Different link types have different behaviors when clicked by users
53
+ * and may require different rendering approaches.
54
+ */
55
+ export declare enum ActivityLinkType {
56
+ /** External web links that open in browser */
57
+ external = "external",
58
+ /** Authentication flows for connecting services */
59
+ auth = "auth",
60
+ /** Callback links that trigger twist methods when clicked */
61
+ callback = "callback",
62
+ /** Video conferencing links with provider-specific handling */
63
+ conferencing = "conferencing"
64
+ }
65
+ /**
66
+ * Video conferencing providers for conferencing links.
67
+ *
68
+ * Used to identify the conferencing platform and provide
69
+ * provider-specific UI elements (titles, icons, etc.).
70
+ */
71
+ export declare enum ConferencingProvider {
72
+ /** Google Meet */
73
+ googleMeet = "googleMeet",
74
+ /** Zoom */
75
+ zoom = "zoom",
76
+ /** Microsoft Teams */
77
+ microsoftTeams = "microsoftTeams",
78
+ /** Cisco Webex */
79
+ webex = "webex",
80
+ /** Other or unknown conferencing provider */
81
+ other = "other"
82
+ }
83
+ /**
84
+ * Represents a clickable link attached to an activity.
85
+ *
86
+ * Activity links are rendered as buttons that enable user interaction with activities.
87
+ * Different link types have specific behaviors and required fields for proper functionality.
88
+ *
89
+ * @example
90
+ * ```typescript
91
+ * // External link - opens URL in browser
92
+ * const externalLink: ActivityLink = {
93
+ * type: ActivityLinkType.external,
94
+ * title: "Open in Google Calendar",
95
+ * url: "https://calendar.google.com/event/123",
96
+ * };
97
+ *
98
+ * // Conferencing link - opens video conference with provider info
99
+ * const conferencingLink: ActivityLink = {
100
+ * type: ActivityLinkType.conferencing,
101
+ * url: "https://meet.google.com/abc-defg-hij",
102
+ * provider: ConferencingProvider.googleMeet,
103
+ * };
104
+ *
105
+ * // Integrations link - initiates OAuth flow
106
+ * const authLink: ActivityLink = {
107
+ * type: ActivityLinkType.auth,
108
+ * title: "Continue with Google",
109
+ * provider: AuthProvider.Google,
110
+ * level: AuthLevel.User,
111
+ * scopes: ["https://www.googleapis.com/auth/calendar.readonly"],
112
+ * callback: "callback-token-for-auth-completion"
113
+ * };
114
+ *
115
+ * // Callback link - triggers a twist method
116
+ * const callbackLink: ActivityLink = {
117
+ * type: ActivityLinkType.callback,
118
+ * title: "📅 Primary Calendar",
119
+ * token: "callback-token-here"
120
+ * };
121
+ * ```
122
+ */
123
+ export type ActivityLink = {
124
+ /** External web link that opens in browser */
125
+ type: ActivityLinkType.external;
126
+ /** Display text for the link button */
127
+ title: string;
128
+ /** URL to open when clicked */
129
+ url: string;
130
+ } | {
131
+ /** Video conferencing link with provider-specific handling */
132
+ type: ActivityLinkType.conferencing;
133
+ /** URL to join the conference */
134
+ url: string;
135
+ /** Conferencing provider for UI customization */
136
+ provider: ConferencingProvider;
137
+ } | {
138
+ /** Authentication link that initiates an OAuth flow */
139
+ type: ActivityLinkType.auth;
140
+ /** Display text for the auth button */
141
+ title: string;
142
+ /** OAuth provider (e.g., "google", "microsoft") */
143
+ provider: string;
144
+ /** Authorization level ("user" or "priority") */
145
+ level: string;
146
+ /** Array of OAuth scopes to request */
147
+ scopes: string[];
148
+ /** Callback token for auth completion notification */
149
+ callback: Callback;
150
+ } | {
151
+ /** Callback link that triggers a twist method when clicked */
152
+ type: ActivityLinkType.callback;
153
+ /** Display text for the callback button */
154
+ title: string;
155
+ /** Token identifying the callback to execute */
156
+ callback: Callback;
157
+ };
158
+ /**
159
+ * Represents metadata about an activity, typically from an external system.
160
+ *
161
+ * Activity metadata enables tracking where activities originated from,
162
+ * which is useful for synchronization, deduplication, and linking
163
+ * back to external systems.
164
+ *
165
+ * @example
166
+ * ```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
+ * };
173
+ * ```
174
+ */
175
+ export type ActivityMeta = {
176
+ /** The type identifier for the source system */
177
+ source: string;
178
+ /** Additional source-specific properties */
179
+ [key: string]: any;
180
+ };
181
+ /**
182
+ * Represents a complete activity within the Plot system.
183
+ *
184
+ * Activities are the core entities in Plot, representing anything from simple notes
185
+ * to complex recurring events. They support rich metadata including scheduling,
186
+ * recurrence patterns, links, and external source tracking.
187
+ *
188
+ * @example
189
+ * ```typescript
190
+ * // Simple note
191
+ * const task: Activity = {
192
+ * type: ActivityType.Note,
193
+ * title: "New campaign brainstorming ideas",
194
+ * note: "We could rent a bouncy castle...",
195
+ * author: { id: "user-1", name: "John Doe", type: ActorType.User },
196
+ * priority: { id: "work", title: "Work" },
197
+ * // ... other fields
198
+ * };
199
+ *
200
+ * // Simple task
201
+ * const task: Activity = {
202
+ * type: ActivityType.Task,
203
+ * title: "Review budget proposal",
204
+ * author: { id: "user-1", name: "John Doe", type: ActorType.User },
205
+ * end: null,
206
+ * priority: { id: "work", title: "Work" },
207
+ * // ... other fields
208
+ * };
209
+ *
210
+ * // Recurring event
211
+ * const meeting: Activity = {
212
+ * type: ActivityType.Event,
213
+ * title: "Weekly standup",
214
+ * recurrenceRule: "FREQ=WEEKLY;BYDAY=MO",
215
+ * recurrenceCount: 12,
216
+ * // ... other fields
217
+ * };
218
+ * ```
219
+ */
220
+ export type Activity = {
221
+ /** Unique identifier for the activity */
222
+ id: string;
223
+ /** The type of activity (Note, Task, or Event) */
224
+ type: ActivityType;
225
+ /** Information about who created the activity */
226
+ author: Actor;
227
+ /** The display title/summary of the activity */
228
+ title: string | null;
229
+ /** Primary content for the activity */
230
+ note: string | null;
231
+ /**
232
+ * Start time of a scheduled activity. Notes are not typically scheduled unless they're about specific times.
233
+ * For recurring events, this represents the start of the first occurrence.
234
+ * 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.
236
+ */
237
+ start: Date | string | null;
238
+ /**
239
+ * End time of a scheduled activity. Notes are not typically scheduled unless they're about specific times.
240
+ * For recurring events, this represents the end of the first occurrence.
241
+ * Can be a Date object for timed events or a date string in "YYYY-MM-DD" format for all-day events.
242
+ * Null for tasks or activities without defined end times.
243
+ */
244
+ end: Date | string | null;
245
+ /**
246
+ * For recurring activities, the last occurrence date (inclusive).
247
+ * Can be a Date object, date string in "YYYY-MM-DD" format, or null if recurring indefinitely.
248
+ * When both recurrenceCount and recurrenceUntil are provided, recurrenceCount takes precedence.
249
+ */
250
+ recurrenceUntil: Date | string | null;
251
+ /**
252
+ * For recurring activities, the number of occurrences to generate.
253
+ * Takes precedence over recurrenceUntil if both are provided.
254
+ * Null for non-recurring activities or indefinite recurrence.
255
+ */
256
+ 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
+ /** The priority context this activity belongs to */
266
+ priority: Priority;
267
+ /** Recurrence rule in RFC 5545 RRULE format (e.g., "FREQ=WEEKLY;BYDAY=MO,WE,FR") */
268
+ recurrenceRule: string | null;
269
+ /** Array of dates to exclude from the recurrence pattern */
270
+ recurrenceExdates: Date[] | null;
271
+ /** Array of additional occurrence dates to include in the recurrence pattern */
272
+ recurrenceDates: Date[] | null;
273
+ /**
274
+ * For recurring event exceptions, points to the root recurring activity.
275
+ * Used when an individual occurrence of a recurring event is modified.
276
+ */
277
+ recurrence: Activity | null;
278
+ /**
279
+ * For recurring event exceptions, the original occurrence date being overridden.
280
+ * Used to identify which occurrence of a recurring event this exception replaces.
281
+ */
282
+ occurrence: Date | null;
283
+ /** Metadata about the activity, typically from an external system that created it */
284
+ 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;
289
+ };
290
+ /**
291
+ * Configuration for automatic priority selection based on activity similarity.
292
+ *
293
+ * Maps activity fields to scoring weights or required exact matches:
294
+ * - Number value: Maximum score for similarity matching on this field
295
+ * - `true` value: Required exact match - activities must match exactly or be excluded
296
+ *
297
+ * Scoring rules:
298
+ * - content: Uses vector similarity on activity embedding (cosine similarity)
299
+ * - type: Exact match on ActivityType
300
+ * - mentions: Percentage of existing activity's mentions that appear in new activity
301
+ * - meta.field: Exact match on top-level meta fields (e.g., "meta.sourceId")
302
+ *
303
+ * When content is `true`, applies a strong similarity threshold to ensure only close matches.
304
+ * Default (when neither priority nor pickPriority specified): `{content: true}`
305
+ *
306
+ * @example
307
+ * ```typescript
308
+ * // Require exact content match with strong similarity
309
+ * pickPriority: { content: true }
310
+ *
311
+ * // Score based on content (max 100 points) and require exact type match
312
+ * pickPriority: { content: 100, type: true }
313
+ *
314
+ * // Match on meta source and score content
315
+ * pickPriority: { "meta.source": true, content: 50 }
316
+ * ```
317
+ */
318
+ export type PickPriorityConfig = {
319
+ content?: number | true;
320
+ type?: number | true;
321
+ mentions?: number | true;
322
+ [key: `meta.${string}`]: number | true;
323
+ };
324
+ /**
325
+ * Type for creating new activities.
326
+ *
327
+ * Requires only the activity type, with all other fields optional.
328
+ * The ID and author will be automatically assigned by the Plot system
329
+ * based on the current execution context.
330
+ *
331
+ * Priority can be specified in three ways:
332
+ * 1. Explicit priority: `priority: { id: "..." }` - Use specific priority (disables pickPriority)
333
+ * 2. Pick priority config: `pickPriority: { ... }` - Auto-select based on similarity
334
+ * 3. Neither: Defaults to `pickPriority: { content: true }` for automatic matching
335
+ *
336
+ * @example
337
+ * ```typescript
338
+ * // Explicit priority (disables automatic matching)
339
+ * const newTask: NewActivity = {
340
+ * type: ActivityType.Task,
341
+ * title: "Review pull request",
342
+ * priority: { id: "work-project-123" }
343
+ * };
344
+ *
345
+ * // Automatic priority matching (default behavior)
346
+ * const newNote: NewActivity = {
347
+ * type: ActivityType.Note,
348
+ * title: "Meeting notes",
349
+ * note: "Discussed Q4 roadmap..."
350
+ * // Defaults to pickPriority: { content: true }
351
+ * };
352
+ *
353
+ * // Custom priority matching
354
+ * const newEvent: NewActivity = {
355
+ * type: ActivityType.Event,
356
+ * title: "Team standup",
357
+ * pickPriority: { type: true, content: 50 }
358
+ * };
359
+ * ```
360
+ */
361
+ export type NewActivity = Pick<Activity, "type"> & Partial<Omit<Activity, "id" | "author" | "type" | "parent" | "priority" | "threadRoot"> & {
362
+ parent?: Pick<Activity, "id"> | null;
363
+ /**
364
+ * Format of the note content. Determines how the note is processed:
365
+ * - 'text': Plain text that will be converted to markdown (auto-links URLs, preserves line breaks)
366
+ * - 'markdown': Already in markdown format (default, no conversion)
367
+ * - 'html': HTML content that will be converted to markdown
368
+ */
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;
379
+ /**
380
+ * Format of the note content. Determines how the note is processed:
381
+ * - 'text': Plain text that will be converted to markdown (auto-links URLs, preserves line breaks)
382
+ * - 'markdown': Already in markdown format (default, no conversion)
383
+ * - 'html': HTML content that will be converted to markdown
384
+ */
385
+ noteType?: NoteType;
386
+ /**
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.
390
+ */
391
+ tags?: Partial<Record<Tag, ActorId[]>>;
392
+ /**
393
+ * Add or remove the twist's tags.
394
+ * Maps tag ID to boolean: true = add tag, false = remove tag.
395
+ * This is allowed on all activities the twist has access to.
396
+ */
397
+ twistTags?: Partial<Record<Tag, boolean>>;
398
+ };
399
+ /**
400
+ * Represents an actor in Plot - a user, contact, or twist.
401
+ *
402
+ * Actors can be associated with activities as authors, assignees, or mentions.
403
+ * The email field is only included when ContactAccess.Read permission is granted.
404
+ *
405
+ * @example
406
+ * ```typescript
407
+ * const actor: Actor = {
408
+ * id: "f0ffd5f8-1635-4b13-9532-35f97446db90" as ActorId,
409
+ * type: ActorType.Contact,
410
+ * email: "john.doe@example.com", // Only if ContactAccess.Read
411
+ * name: "John Doe"
412
+ * };
413
+ * ```
414
+ */
415
+ export type Actor = {
416
+ /** Unique identifier for the actor */
417
+ id: ActorId;
418
+ /** Type of actor (User, Contact, or Twist) */
419
+ type: ActorType;
420
+ /** Email address (only included with ContactAccess.Read permission) */
421
+ email?: string;
422
+ /** Display name (undefined if not included due to permissions, null if not set) */
423
+ name?: string | null;
424
+ };
425
+ /**
426
+ * Enumeration of author types that can create activities.
427
+ *
428
+ * The author type affects how activities are displayed and processed
429
+ * within the Plot system.
430
+ */
431
+ export declare enum ActorType {
432
+ /** Activities created by human users */
433
+ User = 0,
434
+ /** Activities created by external contacts */
435
+ Contact = 1,
436
+ /** Activities created by automated twists */
437
+ Twist = 2
438
+ }
439
+ /**
440
+ * Represents contact information for creating a new contact.
441
+ *
442
+ * Contacts are used throughout Plot for representing people associated
443
+ * with activities, such as event attendees or task assignees.
444
+ *
445
+ * @example
446
+ * ```typescript
447
+ * const newContact: NewContact = {
448
+ * email: "john.doe@example.com",
449
+ * name: "John Doe",
450
+ * avatar: "https://avatar.example.com/john.jpg"
451
+ * };
452
+ * ```
453
+ */
454
+ export type NewContact = {
455
+ /** Email address of the contact (required) */
456
+ email: string;
457
+ /** Optional display name for the contact */
458
+ name?: string;
459
+ /** Optional avatar image URL for the contact */
460
+ avatar?: string;
461
+ };
462
+ export type NoteType = "text" | "markdown" | "html";
463
+ //# sourceMappingURL=plot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../src/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;CAAE,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;GA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,IAAI,CAAC;CACtB,CAAC;AAEF;;;;;GAKG;AACH,oBAAY,SAAS;IACnB,wCAAwC;IACxC,IAAI,IAAA;IACJ,8CAA8C;IAC9C,OAAO,IAAA;IACP,6CAA6C;IAC7C,KAAK,IAAA;CACN;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC"}
package/dist/plot.js ADDED
@@ -0,0 +1,68 @@
1
+ export { Tag } from "./tag";
2
+ /**
3
+ * Enumeration of supported activity types in Plot.
4
+ *
5
+ * Each activity type has different behaviors and rendering characteristics
6
+ * within the Plot application.
7
+ */
8
+ export var ActivityType;
9
+ (function (ActivityType) {
10
+ /** A note or piece of information without actionable requirements */
11
+ ActivityType[ActivityType["Note"] = 0] = "Note";
12
+ /** An actionable item that can be completed */
13
+ ActivityType[ActivityType["Task"] = 1] = "Task";
14
+ /** A scheduled occurrence with start and optional end time */
15
+ ActivityType[ActivityType["Event"] = 2] = "Event";
16
+ })(ActivityType || (ActivityType = {}));
17
+ /**
18
+ * Enumeration of supported activity link types.
19
+ *
20
+ * Different link types have different behaviors when clicked by users
21
+ * and may require different rendering approaches.
22
+ */
23
+ export var ActivityLinkType;
24
+ (function (ActivityLinkType) {
25
+ /** External web links that open in browser */
26
+ ActivityLinkType["external"] = "external";
27
+ /** Authentication flows for connecting services */
28
+ ActivityLinkType["auth"] = "auth";
29
+ /** Callback links that trigger twist methods when clicked */
30
+ ActivityLinkType["callback"] = "callback";
31
+ /** Video conferencing links with provider-specific handling */
32
+ ActivityLinkType["conferencing"] = "conferencing";
33
+ })(ActivityLinkType || (ActivityLinkType = {}));
34
+ /**
35
+ * Video conferencing providers for conferencing links.
36
+ *
37
+ * Used to identify the conferencing platform and provide
38
+ * provider-specific UI elements (titles, icons, etc.).
39
+ */
40
+ export var ConferencingProvider;
41
+ (function (ConferencingProvider) {
42
+ /** Google Meet */
43
+ ConferencingProvider["googleMeet"] = "googleMeet";
44
+ /** Zoom */
45
+ ConferencingProvider["zoom"] = "zoom";
46
+ /** Microsoft Teams */
47
+ ConferencingProvider["microsoftTeams"] = "microsoftTeams";
48
+ /** Cisco Webex */
49
+ ConferencingProvider["webex"] = "webex";
50
+ /** Other or unknown conferencing provider */
51
+ ConferencingProvider["other"] = "other";
52
+ })(ConferencingProvider || (ConferencingProvider = {}));
53
+ /**
54
+ * Enumeration of author types that can create activities.
55
+ *
56
+ * The author type affects how activities are displayed and processed
57
+ * within the Plot system.
58
+ */
59
+ export var ActorType;
60
+ (function (ActorType) {
61
+ /** Activities created by human users */
62
+ ActorType[ActorType["User"] = 0] = "User";
63
+ /** Activities created by external contacts */
64
+ ActorType[ActorType["Contact"] = 1] = "Contact";
65
+ /** Activities created by automated twists */
66
+ ActorType[ActorType["Twist"] = 2] = "Twist";
67
+ })(ActorType || (ActorType = {}));
68
+ //# sourceMappingURL=plot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plot.js","sourceRoot":"","sources":["../src/plot.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAkC5B;;;;;GAKG;AACH,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,qEAAqE;IACrE,+CAAI,CAAA;IACJ,+CAA+C;IAC/C,+CAAI,CAAA;IACJ,8DAA8D;IAC9D,iDAAK,CAAA;AACP,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B,8CAA8C;IAC9C,yCAAqB,CAAA;IACrB,mDAAmD;IACnD,iCAAa,CAAA;IACb,6DAA6D;IAC7D,yCAAqB,CAAA;IACrB,+DAA+D;IAC/D,iDAA6B,CAAA;AAC/B,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,oBAWX;AAXD,WAAY,oBAAoB;IAC9B,kBAAkB;IAClB,iDAAyB,CAAA;IACzB,WAAW;IACX,qCAAa,CAAA;IACb,sBAAsB;IACtB,yDAAiC,CAAA;IACjC,kBAAkB;IAClB,uCAAe,CAAA;IACf,6CAA6C;IAC7C,uCAAe,CAAA;AACjB,CAAC,EAXW,oBAAoB,KAApB,oBAAoB,QAW/B;AAsYD;;;;;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 ADDED
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Activity tags. Three types:
3
+ * 1. Special tags, which trigger other behaviors
4
+ * 2. Toggle tags, which anyone can toggle a shared value on or off
5
+ * 3. Count tags, where everyone can add or remove their own
6
+ */
7
+ export declare enum Tag {
8
+ Now = 1,
9
+ Later = 2,
10
+ Done = 3,
11
+ Archived = 4,
12
+ Pinned = 100,
13
+ Urgent = 101,
14
+ Todo = 102,
15
+ Goal = 103,
16
+ Decision = 104,
17
+ Waiting = 105,
18
+ Blocked = 106,
19
+ Warning = 107,
20
+ Question = 108,
21
+ Twist = 109,
22
+ Star = 110,
23
+ Idea = 111,
24
+ Attachment = 112,
25
+ Link = 113,
26
+ Yes = 1000,
27
+ No = 1001,
28
+ Volunteer = 1002,
29
+ Tada = 1003,
30
+ Fire = 1004,
31
+ Totally = 1005,
32
+ Looking = 1006,
33
+ Love = 1007,
34
+ Rocket = 1008,
35
+ Sparkles = 1009,
36
+ Thanks = 1010,
37
+ Smile = 1011,
38
+ Wave = 1012,
39
+ Praise = 1015,
40
+ Applause = 1016,
41
+ Cool = 1017,
42
+ Sad = 1018,
43
+ Attend = 1019,
44
+ Skip = 1020,
45
+ Undecided = 1021
46
+ }
47
+ //# sourceMappingURL=tag.d.ts.map
@@ -0,0 +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"}
package/dist/tag.js ADDED
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Activity tags. Three types:
3
+ * 1. Special tags, which trigger other behaviors
4
+ * 2. Toggle tags, which anyone can toggle a shared value on or off
5
+ * 3. Count tags, where everyone can add or remove their own
6
+ */
7
+ export var Tag;
8
+ (function (Tag) {
9
+ // Special tags
10
+ Tag[Tag["Now"] = 1] = "Now";
11
+ Tag[Tag["Later"] = 2] = "Later";
12
+ Tag[Tag["Done"] = 3] = "Done";
13
+ Tag[Tag["Archived"] = 4] = "Archived";
14
+ // Toggle tags
15
+ Tag[Tag["Pinned"] = 100] = "Pinned";
16
+ Tag[Tag["Urgent"] = 101] = "Urgent";
17
+ Tag[Tag["Todo"] = 102] = "Todo";
18
+ Tag[Tag["Goal"] = 103] = "Goal";
19
+ Tag[Tag["Decision"] = 104] = "Decision";
20
+ Tag[Tag["Waiting"] = 105] = "Waiting";
21
+ Tag[Tag["Blocked"] = 106] = "Blocked";
22
+ Tag[Tag["Warning"] = 107] = "Warning";
23
+ Tag[Tag["Question"] = 108] = "Question";
24
+ Tag[Tag["Twist"] = 109] = "Twist";
25
+ Tag[Tag["Star"] = 110] = "Star";
26
+ Tag[Tag["Idea"] = 111] = "Idea";
27
+ Tag[Tag["Attachment"] = 112] = "Attachment";
28
+ Tag[Tag["Link"] = 113] = "Link";
29
+ // Count tags
30
+ Tag[Tag["Yes"] = 1000] = "Yes";
31
+ Tag[Tag["No"] = 1001] = "No";
32
+ Tag[Tag["Volunteer"] = 1002] = "Volunteer";
33
+ Tag[Tag["Tada"] = 1003] = "Tada";
34
+ Tag[Tag["Fire"] = 1004] = "Fire";
35
+ Tag[Tag["Totally"] = 1005] = "Totally";
36
+ Tag[Tag["Looking"] = 1006] = "Looking";
37
+ Tag[Tag["Love"] = 1007] = "Love";
38
+ Tag[Tag["Rocket"] = 1008] = "Rocket";
39
+ Tag[Tag["Sparkles"] = 1009] = "Sparkles";
40
+ Tag[Tag["Thanks"] = 1010] = "Thanks";
41
+ Tag[Tag["Smile"] = 1011] = "Smile";
42
+ Tag[Tag["Wave"] = 1012] = "Wave";
43
+ Tag[Tag["Praise"] = 1015] = "Praise";
44
+ Tag[Tag["Applause"] = 1016] = "Applause";
45
+ Tag[Tag["Cool"] = 1017] = "Cool";
46
+ Tag[Tag["Sad"] = 1018] = "Sad";
47
+ Tag[Tag["Attend"] = 1019] = "Attend";
48
+ Tag[Tag["Skip"] = 1020] = "Skip";
49
+ Tag[Tag["Undecided"] = 1021] = "Undecided";
50
+ })(Tag || (Tag = {}));
51
+ //# sourceMappingURL=tag.js.map
@@ -0,0 +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;IACX,oCAAa,CAAA;IACb,wCAAe,CAAA;IACf,gCAAW,CAAA;IACX,8BAAU,CAAA;IACV,oCAAa,CAAA;IACb,gCAAW,CAAA;IACX,0CAAgB,CAAA;AAClB,CAAC,EA5CW,GAAG,KAAH,GAAG,QA4Cd"}