@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
@@ -12,10 +12,10 @@ This is the recommended approach for most use cases.</p>
12
12
  <li>Create callbacks first using <code>this.callback()</code></li>
13
13
  <li>Store intermediate state using the Store tool</li>
14
14
  </ul>
15
- </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">class</span><span class="hl-1"> </span><span class="hl-5">SyncTool</span><span class="hl-1"> </span><span class="hl-4">extends</span><span class="hl-1"> </span><span class="hl-5">Tool</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">async</span><span class="hl-1"> </span><span class="hl-6">startBatchSync</span><span class="hl-1">(</span><span class="hl-2">totalItems</span><span class="hl-1">: </span><span class="hl-5">number</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">// Store initial state using built-in set method</span><br/><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">set</span><span class="hl-1">(</span><span class="hl-3">&quot;sync_progress&quot;</span><span class="hl-1">, { </span><span class="hl-2">processed:</span><span class="hl-1"> </span><span class="hl-12">0</span><span class="hl-1">, </span><span class="hl-2">total:</span><span class="hl-1"> </span><span class="hl-2">totalItems</span><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-7">// Create callback and queue first batch using built-in methods</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">callback</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">callback</span><span class="hl-1">(</span><span class="hl-3">&quot;processBatch&quot;</span><span class="hl-1">, { </span><span class="hl-2">batchNumber:</span><span class="hl-1"> </span><span class="hl-12">1</span><span class="hl-1"> });</span><br/><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">runTask</span><span class="hl-1">(</span><span class="hl-2">callback</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-4">async</span><span class="hl-1"> </span><span class="hl-6">processBatch</span><span class="hl-1">(</span><span class="hl-2">args</span><span class="hl-1">: </span><span class="hl-5">any</span><span class="hl-1">, </span><span class="hl-2">context</span><span class="hl-1">: { </span><span class="hl-2">batchNumber</span><span class="hl-1">: </span><span class="hl-5">number</span><span class="hl-1"> }) {</span><br/><span class="hl-1"> </span><span class="hl-7">// Process one batch of items</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">progress</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">get</span><span class="hl-1">(</span><span class="hl-3">&quot;sync_progress&quot;</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-7">// ... process items ...</span><br/><br/><span class="hl-1"> </span><span class="hl-0">if</span><span class="hl-1"> (</span><span class="hl-2">progress</span><span class="hl-1">.</span><span class="hl-2">processed</span><span class="hl-1"> &lt; </span><span class="hl-2">progress</span><span class="hl-1">.</span><span class="hl-2">total</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">// Queue next batch using built-in methods</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">callback</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">callback</span><span class="hl-1">(</span><span class="hl-3">&quot;processBatch&quot;</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-2">batchNumber:</span><span class="hl-1"> </span><span class="hl-2">context</span><span class="hl-1">.</span><span class="hl-2">batchNumber</span><span class="hl-1"> + </span><span class="hl-12">1</span><br/><span class="hl-1"> });</span><br/><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">runTask</span><span class="hl-1">(</span><span class="hl-2">callback</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-4">async</span><span class="hl-1"> </span><span class="hl-6">scheduleCleanup</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">tomorrow</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">Date</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-2">tomorrow</span><span class="hl-1">.</span><span class="hl-6">setDate</span><span class="hl-1">(</span><span class="hl-2">tomorrow</span><span class="hl-1">.</span><span class="hl-6">getDate</span><span class="hl-1">() + </span><span class="hl-12">1</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">callback</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">callback</span><span class="hl-1">(</span><span class="hl-3">&quot;cleanupOldData&quot;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-0">return</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">run</span><span class="hl-1">(</span><span class="hl-2">callback</span><span class="hl-1">, { </span><span class="hl-2">runAt:</span><span class="hl-1"> </span><span class="hl-2">tomorrow</span><span class="hl-1"> });</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
15
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">class</span><span class="hl-1"> </span><span class="hl-5">SyncTool</span><span class="hl-1"> </span><span class="hl-4">extends</span><span class="hl-1"> </span><span class="hl-5">Tool</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">async</span><span class="hl-1"> </span><span class="hl-6">startBatchSync</span><span class="hl-1">(</span><span class="hl-2">totalItems</span><span class="hl-1">: </span><span class="hl-5">number</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">// Store initial state using built-in set method</span><br/><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">set</span><span class="hl-1">(</span><span class="hl-3">&quot;sync_progress&quot;</span><span class="hl-1">, { </span><span class="hl-2">processed:</span><span class="hl-1"> </span><span class="hl-14">0</span><span class="hl-1">, </span><span class="hl-2">total:</span><span class="hl-1"> </span><span class="hl-2">totalItems</span><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-7">// Create callback and queue first batch using built-in methods</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">callback</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">callback</span><span class="hl-1">(</span><span class="hl-3">&quot;processBatch&quot;</span><span class="hl-1">, { </span><span class="hl-2">batchNumber:</span><span class="hl-1"> </span><span class="hl-14">1</span><span class="hl-1"> });</span><br/><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">runTask</span><span class="hl-1">(</span><span class="hl-2">callback</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-4">async</span><span class="hl-1"> </span><span class="hl-6">processBatch</span><span class="hl-1">(</span><span class="hl-2">args</span><span class="hl-1">: </span><span class="hl-5">any</span><span class="hl-1">, </span><span class="hl-2">context</span><span class="hl-1">: { </span><span class="hl-2">batchNumber</span><span class="hl-1">: </span><span class="hl-5">number</span><span class="hl-1"> }) {</span><br/><span class="hl-1"> </span><span class="hl-7">// Process one batch of items</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">progress</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">get</span><span class="hl-1">(</span><span class="hl-3">&quot;sync_progress&quot;</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-7">// ... process items ...</span><br/><br/><span class="hl-1"> </span><span class="hl-0">if</span><span class="hl-1"> (</span><span class="hl-2">progress</span><span class="hl-1">.</span><span class="hl-2">processed</span><span class="hl-1"> &lt; </span><span class="hl-2">progress</span><span class="hl-1">.</span><span class="hl-2">total</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">// Queue next batch using built-in methods</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">callback</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">callback</span><span class="hl-1">(</span><span class="hl-3">&quot;processBatch&quot;</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-2">batchNumber:</span><span class="hl-1"> </span><span class="hl-2">context</span><span class="hl-1">.</span><span class="hl-2">batchNumber</span><span class="hl-1"> + </span><span class="hl-14">1</span><br/><span class="hl-1"> });</span><br/><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">runTask</span><span class="hl-1">(</span><span class="hl-2">callback</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-4">async</span><span class="hl-1"> </span><span class="hl-6">scheduleCleanup</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">tomorrow</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-6">Date</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-2">tomorrow</span><span class="hl-1">.</span><span class="hl-6">setDate</span><span class="hl-1">(</span><span class="hl-2">tomorrow</span><span class="hl-1">.</span><span class="hl-6">getDate</span><span class="hl-1">() + </span><span class="hl-14">1</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">callback</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">callback</span><span class="hl-1">(</span><span class="hl-3">&quot;cleanupOldData&quot;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-0">return</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">run</span><span class="hl-1">(</span><span class="hl-2">callback</span><span class="hl-1">, { </span><span class="hl-2">runAt:</span><span class="hl-1"> </span><span class="hl-2">tomorrow</span><span class="hl-1"> });</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
16
16
  </code><button type="button">Copy</button></pre>
17
17
 
18
- </div></div></section><section class="tsd-panel tsd-hierarchy" data-refl="710"><h4>Hierarchy (<a href="../hierarchy.html#tools/tasks.Tasks">View Summary</a>)</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><a href="tool.ITool.html" class="tsd-signature-type tsd-kind-class">ITool</a><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">Tasks</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/tasks.ts#L58">tools/tasks.ts:58</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
18
+ </div></div></section><section class="tsd-panel tsd-hierarchy" data-refl="759"><h4>Hierarchy (<a href="../hierarchy.html#tools/tasks.Tasks">View Summary</a>)</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><a href="tool.ITool.html" class="tsd-signature-type tsd-kind-class">ITool</a><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">Tasks</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/tasks.ts#L58">tools/tasks.ts:58</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
19
19
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="#runtask" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>run<wbr/>Task</span></a>
20
20
  <a href="#canceltask" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>cancel<wbr/>Task</span></a>
21
21
  <a href="#cancelalltasks" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>cancel<wbr/>All<wbr/>Tasks</span></a>
@@ -4,7 +4,7 @@ and programmatically deploy twists.</p>
4
4
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">class</span><span class="hl-1"> </span><span class="hl-5">TwistBuilderTwist</span><span class="hl-1"> </span><span class="hl-4">extends</span><span class="hl-1"> </span><span class="hl-5">Twist</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">build</span><span class="hl-1">(</span><span class="hl-2">build</span><span class="hl-1">: </span><span class="hl-5">ToolBuilder</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-0">return</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">twists:</span><span class="hl-1"> </span><span class="hl-2">build</span><span class="hl-1">.</span><span class="hl-6">get</span><span class="hl-1">(</span><span class="hl-2">Twists</span><span class="hl-1">)</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-4">async</span><span class="hl-1"> </span><span class="hl-6">activate</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">twistId</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-2">tools</span><span class="hl-1">.</span><span class="hl-2">twists</span><span class="hl-1">.</span><span class="hl-6">create</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-7">// Display twist ID to user</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
5
5
  </code><button type="button">Copy</button></pre>
6
6
 
7
- </div></div></section><section class="tsd-panel tsd-hierarchy" data-refl="309"><h4>Hierarchy (<a href="../hierarchy.html#tools/twists.Twists">View Summary</a>)</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><a href="tool.ITool.html" class="tsd-signature-type tsd-kind-class">ITool</a><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">Twists</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/twists.ts#L78">tools/twists.ts:78</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
7
+ </div></div></section><section class="tsd-panel tsd-hierarchy" data-refl="332"><h4>Hierarchy (<a href="../hierarchy.html#tools/twists.Twists">View Summary</a>)</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><a href="tool.ITool.html" class="tsd-signature-type tsd-kind-class">ITool</a><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">Twists</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/twists.ts#L78">tools/twists.ts:78</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
8
8
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="#create" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create</span></a>
9
9
  <a href="#generate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>generate</span></a>
10
10
  <a href="#deploy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>deploy</span></a>
@@ -22,19 +22,19 @@ to build it, with iterative error correction (up to 3 attempts).</p>
22
22
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">spec</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Markdown specification describing the twist functionality</p>
23
23
  </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/tools_twists.TwistSource.html" class="tsd-signature-type tsd-kind-interface">TwistSource</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to twist source (dependencies and files)</p>
24
24
  <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-1">Throws<a href="#throws-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>When generation fails after maximum attempts</p>
25
- </div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-2">Example<a href="#example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">source</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">twist</span><span class="hl-1">.</span><span class="hl-6">generate</span><span class="hl-1">(</span><span class="hl-3">`</span><br/><span class="hl-3"># Calendar Sync Twist</span><br/><br/><span class="hl-3">This twist syncs Google Calendar events to Plot activities.</span><br/><br/><span class="hl-3">## Features</span><br/><span class="hl-3">- Authenticate with Google</span><br/><span class="hl-3">- Sync calendar events</span><br/><span class="hl-3">- Create activities from events</span><br/><span class="hl-3">`</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// source.dependencies: { &quot;@plotday/sdk&quot;: &quot;workspace:^&quot;, ... }</span><br/><span class="hl-7">// source.files: { &quot;index.ts&quot;: &quot;export default class...&quot; }</span>
25
+ </div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-2">Example<a href="#example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">source</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">twist</span><span class="hl-1">.</span><span class="hl-6">generate</span><span class="hl-1">(</span><span class="hl-3">`</span><br/><span class="hl-3"># Calendar Sync Twist</span><br/><br/><span class="hl-3">This twist syncs Google Calendar events to Plot activities.</span><br/><br/><span class="hl-3">## Features</span><br/><span class="hl-3">- Authenticate with Google</span><br/><span class="hl-3">- Sync calendar events</span><br/><span class="hl-3">- Create activities from events</span><br/><span class="hl-3">`</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// source.dependencies: { &quot;@plotday/twister&quot;: &quot;workspace:^&quot;, ... }</span><br/><span class="hl-7">// source.files: { &quot;index.ts&quot;: &quot;export default class...&quot; }</span>
26
26
  </code><button type="button">Copy</button></pre>
27
27
 
28
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/twists.ts#L122">tools/twists.ts:122</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deploy"><code class="tsd-tag">Abstract</code><span>deploy</span><a href="#deploy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deploy-1"><span class="tsd-kind-call-signature">deploy</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">twistId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">environment</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;personal&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;private&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;review&quot;</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">dryRun</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">&amp;</span> (<span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">module</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">source</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/tools_twists.TwistSource.html" class="tsd-signature-type tsd-kind-interface">TwistSource</a> <span class="tsd-signature-symbol">}</span>)<span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">version</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">permissions</span><span class="tsd-signature-symbol">:</span> <a href="../types/tools_twists.TwistPermissions.html" class="tsd-signature-type tsd-kind-type-alias">TwistPermissions</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">errors</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span><a href="#deploy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Deploys a twist programmatically.</p>
28
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/tools/twists.ts#L122">tools/twists.ts:122</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deploy"><code class="tsd-tag">Abstract</code><span>deploy</span><a href="#deploy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deploy-1"><span class="tsd-kind-call-signature">deploy</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">twistId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">environment</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;private&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;personal&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;review&quot;</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">dryRun</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">&amp;</span> (<span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">module</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">source</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/tools_twists.TwistSource.html" class="tsd-signature-type tsd-kind-interface">TwistSource</a> <span class="tsd-signature-symbol">}</span>)<span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">version</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">permissions</span><span class="tsd-signature-symbol">:</span> <a href="../types/tools_twists.TwistPermissions.html" class="tsd-signature-type tsd-kind-type-alias">TwistPermissions</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">errors</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span><a href="#deploy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Deploys a twist programmatically.</p>
29
29
  <p>This method provides the same functionality as the plot deploy CLI
30
30
  command, but can be called from within a twist. Accepts either:</p>
31
31
  <ul>
32
32
  <li>A pre-bundled module (JavaScript code)</li>
33
33
  <li>A source object (dependencies + files) which is built in a sandbox</li>
34
34
  </ul>
35
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">twistId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">environment</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;personal&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;private&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;review&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">dryRun</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">&amp;</span> (<span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">module</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">source</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/tools_twists.TwistSource.html" class="tsd-signature-type tsd-kind-interface">TwistSource</a> <span class="tsd-signature-symbol">}</span>)</span><div class="tsd-comment tsd-typography"><p>Deployment configuration</p>
35
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">twistId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">environment</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;private&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;personal&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;review&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">dryRun</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">&amp;</span> (<span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">module</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">source</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/tools_twists.TwistSource.html" class="tsd-signature-type tsd-kind-interface">TwistSource</a> <span class="tsd-signature-symbol">}</span>)</span><div class="tsd-comment tsd-typography"><p>Deployment configuration</p>
36
36
  </div><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">twistId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Twist ID for deployment</p>
37
- </div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">environment</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">&quot;personal&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;private&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;review&quot;</span></h5><div class="tsd-comment tsd-typography"><p>Target environment (defaults to &quot;personal&quot;)</p>
37
+ </div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">environment</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">&quot;private&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;personal&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;review&quot;</span></h5><div class="tsd-comment tsd-typography"><p>Target environment (defaults to &quot;personal&quot;)</p>
38
38
  </div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Optional twist name (required for first deploy)</p>
39
39
  </div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Optional twist description (required for first deploy)</p>
40
40
  </div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">dryRun</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><p>If true, validates without deploying (returns errors if any)</p>
@@ -37,7 +37,7 @@ Return an object mapping tool names to build() promises.</p>
37
37
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-type">Function</span></span><div class="tsd-comment tsd-typography"><p>The method to callback</p>
38
38
  </div></li><li><span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">extraArgs</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>Additional arguments to pass (type-checked, must be serializable)</p>
39
39
  </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/tools_callbacks.Callback.html" class="tsd-signature-type tsd-kind-type-alias">Callback</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to a persistent callback token</p>
40
- <div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-2">Example<a href="#example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">callback</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">callback</span><span class="hl-1">(</span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-2">onWebhook</span><span class="hl-1">, </span><span class="hl-3">&quot;calendar&quot;</span><span class="hl-1">, </span><span class="hl-12">123</span><span class="hl-1">);</span>
40
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-2">Example<a href="#example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">callback</span><span class="hl-1"> = </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-6">callback</span><span class="hl-1">(</span><span class="hl-4">this</span><span class="hl-1">.</span><span class="hl-2">onWebhook</span><span class="hl-1">, </span><span class="hl-3">&quot;calendar&quot;</span><span class="hl-1">, </span><span class="hl-14">123</span><span class="hl-1">);</span>
41
41
  </code><button type="button">Copy</button></pre>
42
42
 
43
43
  </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/twist.ts#L77">twist.ts:77</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><h3 class="tsd-anchor-link" id="deletecallback"><code class="tsd-tag">Protected</code><span>delete<wbr/>Callback</span><a href="#deletecallback" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected"><li class=""><div class="tsd-signature tsd-anchor-link" id="deletecallback-1"><span class="tsd-kind-call-signature">deleteCallback</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">token</span><span class="tsd-signature-symbol">:</span> <a href="../types/tools_callbacks.Callback.html" class="tsd-signature-type tsd-kind-type-alias">Callback</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#deletecallback-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Deletes a specific callback by its token.</p>