@plotday/twister 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -4
- package/bin/templates/AGENTS.template.md +91 -29
- package/cli/templates/AGENTS.template.md +91 -29
- package/dist/common/calendar.d.ts +18 -21
- package/dist/common/calendar.d.ts.map +1 -1
- package/dist/common/messaging.d.ts +14 -5
- package/dist/common/messaging.d.ts.map +1 -1
- package/dist/common/projects.d.ts +20 -10
- package/dist/common/projects.d.ts.map +1 -1
- package/dist/docs/assets/hierarchy.js +1 -1
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/classes/tool.Tool.html +20 -15
- package/dist/docs/classes/tools_ai.AI.html +1 -1
- package/dist/docs/classes/tools_callbacks.Callbacks.html +1 -1
- package/dist/docs/classes/tools_integrations.Integrations.html +1 -1
- package/dist/docs/classes/tools_network.Network.html +1 -1
- package/dist/docs/classes/tools_plot.Plot.html +2 -2
- package/dist/docs/classes/tools_store.Store.html +13 -4
- package/dist/docs/classes/tools_tasks.Tasks.html +1 -1
- package/dist/docs/classes/tools_twists.Twists.html +1 -1
- package/dist/docs/documents/Building_Custom_Tools.html +8 -2
- package/dist/docs/documents/Built-in_Tools.html +19 -8
- package/dist/docs/documents/Core_Concepts.html +14 -6
- package/dist/docs/documents/Getting_Started.html +11 -4
- package/dist/docs/enums/plot.ActorType.html +4 -4
- package/dist/docs/enums/tools_plot.ContactAccess.html +1 -1
- package/dist/docs/hierarchy.html +1 -1
- package/dist/docs/index.html +10 -0
- package/dist/docs/interfaces/common_calendar.CalendarTool.html +19 -11
- package/dist/docs/media/SYNC_STRATEGIES.md +651 -0
- package/dist/docs/types/plot.Activity.html +16 -7
- package/dist/docs/types/plot.ActivityCommon.html +4 -4
- package/dist/docs/types/plot.ActivityUpdate.html +4 -2
- package/dist/docs/types/plot.ActivityWithNotes.html +1 -1
- package/dist/docs/types/plot.Actor.html +5 -5
- package/dist/docs/types/plot.ContentType.html +1 -1
- package/dist/docs/types/plot.NewActivity.html +26 -12
- package/dist/docs/types/plot.NewActivityWithNotes.html +1 -1
- package/dist/docs/types/plot.NewActor.html +1 -1
- package/dist/docs/types/plot.NewContact.html +4 -4
- package/dist/docs/types/plot.NewNote.html +9 -4
- package/dist/docs/types/plot.Note.html +6 -3
- package/dist/docs/types/plot.NoteUpdate.html +4 -3
- package/dist/docs/types/plot.PickPriorityConfig.html +2 -2
- package/dist/docs/types/plot.SyncUpdate.html +1 -1
- package/dist/llm-docs/common/calendar.d.ts +1 -1
- package/dist/llm-docs/common/calendar.d.ts.map +1 -1
- package/dist/llm-docs/common/calendar.js +1 -1
- package/dist/llm-docs/common/calendar.js.map +1 -1
- package/dist/llm-docs/common/messaging.d.ts +1 -1
- package/dist/llm-docs/common/messaging.d.ts.map +1 -1
- package/dist/llm-docs/common/messaging.js +1 -1
- package/dist/llm-docs/common/messaging.js.map +1 -1
- package/dist/llm-docs/common/projects.d.ts +1 -1
- package/dist/llm-docs/common/projects.d.ts.map +1 -1
- package/dist/llm-docs/common/projects.js +1 -1
- package/dist/llm-docs/common/projects.js.map +1 -1
- package/dist/llm-docs/plot.d.ts +1 -1
- package/dist/llm-docs/plot.d.ts.map +1 -1
- package/dist/llm-docs/plot.js +1 -1
- package/dist/llm-docs/plot.js.map +1 -1
- package/dist/llm-docs/tool.d.ts +1 -1
- package/dist/llm-docs/tool.d.ts.map +1 -1
- package/dist/llm-docs/tool.js +1 -1
- package/dist/llm-docs/tool.js.map +1 -1
- package/dist/llm-docs/tools/plot.d.ts +1 -1
- package/dist/llm-docs/tools/plot.d.ts.map +1 -1
- package/dist/llm-docs/tools/plot.js +1 -1
- package/dist/llm-docs/tools/plot.js.map +1 -1
- package/dist/llm-docs/tools/store.d.ts +1 -1
- package/dist/llm-docs/tools/store.d.ts.map +1 -1
- package/dist/llm-docs/tools/store.js +1 -1
- package/dist/llm-docs/tools/store.js.map +1 -1
- package/dist/llm-docs/twist-guide-template.d.ts +1 -1
- package/dist/llm-docs/twist-guide-template.d.ts.map +1 -1
- package/dist/llm-docs/twist-guide-template.js +1 -1
- package/dist/llm-docs/twist-guide-template.js.map +1 -1
- package/dist/plot.d.ts +109 -44
- package/dist/plot.d.ts.map +1 -1
- package/dist/plot.js.map +1 -1
- package/dist/tool.d.ts +16 -2
- package/dist/tool.d.ts.map +1 -1
- package/dist/tool.js +16 -2
- package/dist/tool.js.map +1 -1
- package/dist/tools/plot.d.ts +2 -2
- package/dist/tools/plot.d.ts.map +1 -1
- package/dist/tools/plot.js +1 -1
- package/dist/tools/plot.js.map +1 -1
- package/dist/tools/store.d.ts +16 -0
- package/dist/tools/store.d.ts.map +1 -1
- package/dist/tools/store.js.map +1 -1
- package/dist/twist-guide.d.ts +1 -1
- package/dist/twist-guide.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>NoteUpdate | Creating Plot Twists</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Creating Plot Twists"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="/" class="title">Creating Plot Twists</a><div id="tsd-toolbar-links"><a href="https://plot.day">Plot</a><a href="https://github.com/plotday/plot">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister">NPM</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/plot.html">plot</a></li><li><a href="" aria-current="page">NoteUpdate</a></li></ul><h1>Type Alias NoteUpdate</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">NoteUpdate</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-
|
|
2
|
-
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>NoteUpdate | Creating Plot Twists</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Creating Plot Twists"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="/" class="title">Creating Plot Twists</a><div id="tsd-toolbar-links"><a href="https://plot.day">Plot</a><a href="https://github.com/plotday/plot">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister">NPM</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/plot.html">plot</a></li><li><a href="" aria-current="page">NoteUpdate</a></li></ul><h1>Type Alias NoteUpdate</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">NoteUpdate</span><span class="tsd-signature-symbol">:</span> (<span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">id</span><span class="tsd-signature-symbol">:</span> <a href="index.Uuid.html" class="tsd-signature-type tsd-kind-type-alias">Uuid</a> <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">key</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-type">Partial</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-type">Pick</span><span class="tsd-signature-symbol"><</span><a href="plot.Note.html" class="tsd-signature-type tsd-kind-type-alias">Note</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">"draft"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"private"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"content"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"links"</span><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-symbol">{</span><br/> <span class="tsd-kind-property">contentType</span><span class="tsd-signature-symbol">?:</span> <a href="plot.ContentType.html" class="tsd-signature-type tsd-kind-type-alias">ContentType</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">tags</span><span class="tsd-signature-symbol">?:</span> <a href="plot.NewTags.html" class="tsd-signature-type tsd-kind-type-alias">NewTags</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">twistTags</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><a href="../enums/tag.Tag.html" class="tsd-signature-type tsd-kind-enum">Tag</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">mentions</span><span class="tsd-signature-symbol">?:</span> <a href="plot.NewActor.html" class="tsd-signature-type tsd-kind-type-alias">NewActor</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>Type for updating existing notes.
|
|
2
|
+
Must provide either id or key to identify the note to update.</p>
|
|
3
|
+
</div><div class="tsd-type-declaration"><h4>Type Declaration</h4><ul><li><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">id</span><span class="tsd-signature-symbol">:</span> <a href="index.Uuid.html" class="tsd-signature-type tsd-kind-type-alias">Uuid</a> <span class="tsd-signature-symbol">}</span></li><li><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></li></ul><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">contentType</span><span class="tsd-signature-symbol">?: </span><a href="plot.ContentType.html" class="tsd-signature-type tsd-kind-type-alias">ContentType</a></h5><div class="tsd-comment tsd-typography"><p>Format of the note content. Determines how the note is processed:</p>
|
|
3
4
|
<ul>
|
|
4
5
|
<li>'text': Plain text that will be converted to markdown (auto-links URLs, preserves line breaks)</li>
|
|
5
6
|
<li>'markdown': Already in markdown format (default, no conversion)</li>
|
|
@@ -11,4 +12,4 @@ Use twistTags to add/remove the twist from tags to avoid clearing other actors'
|
|
|
11
12
|
Maps tag ID to boolean: true = add tag, false = remove tag.
|
|
12
13
|
This is allowed on all notes the twist has access to.</p>
|
|
13
14
|
</div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">mentions</span><span class="tsd-signature-symbol">?: </span><a href="plot.NewActor.html" class="tsd-signature-type tsd-kind-type-alias">NewActor</a><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><p>Change the mentions on the note.</p>
|
|
14
|
-
</div></li></ul></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#
|
|
15
|
+
</div></li></ul></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L734">plot.ts:734</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-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><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://plot.day" class="tsd-nav-link">Plot</a><a href="https://github.com/plotday/plot" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister" class="tsd-nav-link">NPM</a></nav><nav class="tsd-navigation"><a href="../modules.html">Creating Plot Twists</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -16,7 +16,7 @@ Default (when neither priority nor pickPriority specified): <code>{content: true
|
|
|
16
16
|
</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-7">// Require exact content match with strong similarity</span><br/><span class="hl-15">pickPriority</span><span class="hl-1">: { </span><span class="hl-15">content</span><span class="hl-1">: </span><span class="hl-4">true</span><span class="hl-1"> }</span><br/><br/><span class="hl-7">// Score based on content (max 100 points) and require exact type match</span><br/><span class="hl-15">pickPriority</span><span class="hl-1">: { </span><span class="hl-15">content</span><span class="hl-1">: </span><span class="hl-14">100</span><span class="hl-1">, </span><span class="hl-15">type</span><span class="hl-1">: </span><span class="hl-4">true</span><span class="hl-1"> }</span><br/><br/><span class="hl-7">// Match on meta source and score content</span><br/><span class="hl-15">pickPriority</span><span class="hl-1">: { </span><span class="hl-3">"meta.source"</span><span class="hl-1">: </span><span class="hl-4">true</span><span class="hl-1">, </span><span class="hl-15">content</span><span class="hl-1">: </span><span class="hl-14">50</span><span class="hl-1"> }</span>
|
|
17
17
|
</code><button type="button">Copy</button></pre>
|
|
18
18
|
|
|
19
|
-
</div></div></section><div class="tsd-signature"><span class="tsd-signature-keyword">type</span> <span class="tsd-kind-type-alias">PickPriorityConfig</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#content">content</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#type">type</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#mentions">mentions</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">`</span><span class="tsd-signature-type">meta.</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-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel"><h4 class="tsd-before-signature">Indexable</h4><ul class="tsd-signatures"><li class="tsd-index-signature"><div class="tsd-signature"><span class="tsd-signature-symbol">[</span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-symbol">`</span><span class="tsd-signature-type">meta.</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-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span></div></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#
|
|
19
|
+
</div></div></section><div class="tsd-signature"><span class="tsd-signature-keyword">type</span> <span class="tsd-kind-type-alias">PickPriorityConfig</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#content">content</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#type">type</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#mentions">mentions</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">`</span><span class="tsd-signature-type">meta.</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-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel"><h4 class="tsd-before-signature">Indexable</h4><ul class="tsd-signatures"><li class="tsd-index-signature"><div class="tsd-signature"><span class="tsd-signature-symbol">[</span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-symbol">`</span><span class="tsd-signature-type">meta.</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-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span></div></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L421">plot.ts:421</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">Properties</h3><div class="tsd-index-list"><a href="#content" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>content?</span></a>
|
|
20
20
|
<a href="#type" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type?</span></a>
|
|
21
21
|
<a href="#mentions" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>mentions?</span></a>
|
|
22
|
-
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="content"><code class="tsd-tag">Optional</code><span>content</span><a href="#content" 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><div class="tsd-signature"><span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#
|
|
22
|
+
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="content"><code class="tsd-tag">Optional</code><span>content</span><a href="#content" 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><div class="tsd-signature"><span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L422">plot.ts:422</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="type"><code class="tsd-tag">Optional</code><span>type</span><a href="#type" 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><div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L423">plot.ts:423</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="mentions"><code class="tsd-tag">Optional</code><span>mentions</span><a href="#mentions" 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><div class="tsd-signature"><span class="tsd-kind-property">mentions</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">true</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L424">plot.ts:424</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-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><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-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><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#content"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>content</span></a><a href="#type"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type</span></a><a href="#mentions"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>mentions</span></a></div></details></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://plot.day" class="tsd-nav-link">Plot</a><a href="https://github.com/plotday/plot" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister" class="tsd-nav-link">NPM</a></nav><nav class="tsd-navigation"><a href="../modules.html">Creating Plot Twists</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -12,4 +12,4 @@ providing Plot with the appropriate operation to perform.</p>
|
|
|
12
12
|
</div></li></ul></li></ul></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-7">// Send a new activity</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">newItem</span><span class="hl-1">: </span><span class="hl-5">SyncUpdate</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-2">type:</span><span class="hl-1"> </span><span class="hl-2">ActivityType</span><span class="hl-1">.</span><span class="hl-2">Event</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">title:</span><span class="hl-1"> </span><span class="hl-3">"New Meeting"</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-2">Uuid</span><span class="hl-1">.</span><span class="hl-6">Generate</span><span class="hl-1">(), </span><span class="hl-7">// Tool-generated ID</span><br/><span class="hl-1"> </span><span class="hl-2">notes:</span><span class="hl-1"> [{ </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-2">Uuid</span><span class="hl-1">.</span><span class="hl-6">Generate</span><span class="hl-1">(), </span><span class="hl-2">content:</span><span class="hl-1"> </span><span class="hl-3">"Description"</span><span class="hl-1"> }]</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-7">// Send an update to existing activity</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-8">update</span><span class="hl-1">: </span><span class="hl-5">SyncUpdate</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-2">activityId:</span><span class="hl-1"> </span><span class="hl-2">existingActivityId</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">update:</span><span class="hl-1"> { </span><span class="hl-2">title:</span><span class="hl-1"> </span><span class="hl-3">"Updated Meeting Title"</span><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-2">notes:</span><span class="hl-1"> [{ </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-2">Uuid</span><span class="hl-1">.</span><span class="hl-6">Generate</span><span class="hl-1">(), </span><span class="hl-2">content:</span><span class="hl-1"> </span><span class="hl-3">"New comment"</span><span class="hl-1"> }]</span><br/><span class="hl-1">};</span>
|
|
13
13
|
</code><button type="button">Copy</button></pre>
|
|
14
14
|
|
|
15
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#
|
|
15
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L644">plot.ts:644</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-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><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://plot.day" class="tsd-nav-link">Plot</a><a href="https://github.com/plotday/plot" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/@plotday/twister" class="tsd-nav-link">NPM</a></nav><nav class="tsd-navigation"><a href="../modules.html">Creating Plot Twists</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* This file is auto-generated during build. Do not edit manually.
|
|
5
5
|
* Generated from: prebuild.ts
|
|
6
6
|
*/
|
|
7
|
-
declare const _default: "import type { ActivityLink, NewActivityWithNotes, SyncUpdate } from \"../index\";\n\n/**\n * Represents successful calendar authorization.\n *\n * Returned by calendar tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * calendar operations.\n */\nexport type CalendarAuth = {\n /** Opaque token for calendar operations */\n authToken: string;\n};\n\n/**\n * Represents a calendar from an external calendar service.\n *\n * Contains metadata about a specific calendar that can be synced\n * with Plot. Different calendar providers may have additional\n * provider-specific properties.\n */\nexport interface Calendar {\n /** Unique identifier for the calendar within the provider */\n id: string;\n /** Human-readable name of the calendar */\n name: string;\n /** Optional description or additional details about the calendar */\n description: string | null;\n /** Whether this is the user's primary/default calendar */\n primary: boolean;\n}\n\n/**\n * Configuration options for calendar synchronization.\n *\n * Controls the time range and other parameters for calendar sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface SyncOptions {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n /** Latest date to sync events to (exclusive) */\n timeMax?: Date;\n}\n\n/**\n * Base interface for calendar integration tools.\n *\n * Defines the standard operations that all calendar tools must implement\n * to integrate with external calendar services like Google Calendar,\n * Outlook Calendar, etc.\n *\n * **Implementation Pattern:**\n * 1. Request an ActivityLink for authorization\n * 2. Create an Activity with the ActivityLink to prompt user\n * 3. Receive a CalendarAuth in the specified callback\n * 4. Fetch list of available calendars\n * 5. Start sync for selected calendars\n * 6. Process incoming events via callbacks\n *\n * @example\n * ```typescript\n * // Typical calendar integration flow\n * class MyCalendarTwist extends Twist {\n * private googleCalendar: GoogleCalendar;\n *\n * async activate() {\n * // Step 1: Request authorization\n * const authLink = await this.googleCalendar.requestAuth(\"onAuthComplete\");\n * await this.plot.createActivity({\n * type: ActivityType.Action,\n * title: \"Connect Google Calendar\",\n * links: [authLink],\n * });\n * }\n *\n * async onAuthComplete(auth: CalendarAuth) {\n * // Step 2: Get available calendars\n * const calendars = await this.googleCalendar.getCalendars(auth.authToken);\n *\n * // Step 3: Start sync for primary calendar\n * const primaryCalendar = calendars.find(c => c.primary);\n * if (primaryCalendar) {\n * await this.googleCalendar.startSync(\n * auth.authToken,\n * primaryCalendar.id,\n * \"onCalendarEvent\"\n * );\n * }\n * }\n *\n * async onCalendarEvent(\n * syncUpdate: SyncUpdate,\n * syncMeta: { initialSync: boolean }\n * ) {\n * // Step 4: Process synced events
|
|
7
|
+
declare const _default: "import type { ActivityLink, NewActivityWithNotes, SyncUpdate } from \"../index\";\n\n/**\n * Represents successful calendar authorization.\n *\n * Returned by calendar tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * calendar operations.\n */\nexport type CalendarAuth = {\n /** Opaque token for calendar operations */\n authToken: string;\n};\n\n/**\n * Represents a calendar from an external calendar service.\n *\n * Contains metadata about a specific calendar that can be synced\n * with Plot. Different calendar providers may have additional\n * provider-specific properties.\n */\nexport interface Calendar {\n /** Unique identifier for the calendar within the provider */\n id: string;\n /** Human-readable name of the calendar */\n name: string;\n /** Optional description or additional details about the calendar */\n description: string | null;\n /** Whether this is the user's primary/default calendar */\n primary: boolean;\n}\n\n/**\n * Configuration options for calendar synchronization.\n *\n * Controls the time range and other parameters for calendar sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface SyncOptions {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n /** Latest date to sync events to (exclusive) */\n timeMax?: Date;\n}\n\n/**\n * Base interface for calendar integration tools.\n *\n * Defines the standard operations that all calendar tools must implement\n * to integrate with external calendar services like Google Calendar,\n * Outlook Calendar, etc.\n *\n * **Implementation Pattern:**\n * 1. Request an ActivityLink for authorization\n * 2. Create an Activity with the ActivityLink to prompt user\n * 3. Receive a CalendarAuth in the specified callback\n * 4. Fetch list of available calendars\n * 5. Start sync for selected calendars\n * 6. Process incoming events via callbacks\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source and Note.key for automatic upserts without manual ID tracking.\n * See SYNC_STRATEGIES.md for detailed patterns and when to use alternative approaches.\n *\n * @example\n * ```typescript\n * // Typical calendar integration flow using source/key upserts\n * class MyCalendarTwist extends Twist {\n * private googleCalendar: GoogleCalendar;\n *\n * async activate() {\n * // Step 1: Request authorization\n * const authLink = await this.googleCalendar.requestAuth(\"onAuthComplete\");\n * await this.plot.createActivity({\n * type: ActivityType.Action,\n * title: \"Connect Google Calendar\",\n * links: [authLink],\n * });\n * }\n *\n * async onAuthComplete(auth: CalendarAuth) {\n * // Step 2: Get available calendars\n * const calendars = await this.googleCalendar.getCalendars(auth.authToken);\n *\n * // Step 3: Start sync for primary calendar\n * const primaryCalendar = calendars.find(c => c.primary);\n * if (primaryCalendar) {\n * await this.googleCalendar.startSync(\n * auth.authToken,\n * primaryCalendar.id,\n * \"onCalendarEvent\"\n * );\n * }\n * }\n *\n * async onCalendarEvent(\n * syncUpdate: SyncUpdate,\n * syncMeta: { initialSync: boolean }\n * ) {\n * // Step 4: Process synced events using source/key pattern\n * // The sync update will automatically use the event's URL as the source\n * // for deduplication - no manual ID tracking needed\n * await this.plot.createActivity(syncUpdate);\n * }\n * }\n * ```\n */\nexport interface CalendarTool {\n /**\n * Initiates the authorization flow for the calendar service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<TCallback extends (auth: CalendarAuth, ...args: any[]) => any>(\n callback: TCallback,\n ...extraArgs: TCallback extends (auth: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of calendars accessible to the authenticated user.\n *\n * Returns metadata for all calendars the user has access to, including\n * their primary calendar and any shared calendars. This list can be\n * presented to users for calendar selection.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available calendars\n * @throws When the auth token is invalid or expired\n */\n getCalendars(authToken: string): Promise<Calendar[]>;\n\n /**\n * Begins synchronizing events from a specific calendar.\n *\n * Sets up real-time sync for the specified calendar, including initial\n * event import and ongoing change notifications. The callback function\n * will be invoked for each synced event.\n *\n * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):\n * - Set Activity.source to the event's canonical URL (e.g., event.htmlLink)\n * - Use Note.key for event details (description, attendees, etc.) to enable upserts\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all events (creates new or updates existing)\n * - Set activity.unread = false for initial sync, true for incremental updates\n *\n * **Alternative** (Strategy 3 - Advanced cases):\n * - Use Uuid.Generate() and store ID mappings when creating multiple activities per event\n * - See SYNC_STRATEGIES.md for when this is appropriate\n *\n * @param authToken - Authorization token for calendar access\n * @param calendarId - ID of the calendar to sync\n * @param callback - Function receiving (syncUpdate, ...extraArgs) for each synced event\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise that resolves when sync setup is complete\n * @throws When auth token is invalid or calendar doesn't exist\n */\n startSync<\n TCallback extends (\n syncUpdate: SyncUpdate,\n ...args: any[]\n ) => any\n >(\n authToken: string,\n calendarId: string,\n callback: TCallback,\n ...extraArgs: TCallback extends (\n syncUpdate: any,\n ...rest: infer R\n ) => any\n ? R\n : []\n ): Promise<void>;\n\n /**\n * Stops synchronizing events from a specific calendar.\n *\n * Disables real-time sync and cleans up any webhooks or polling\n * mechanisms for the specified calendar. No further events will\n * be synced after this call.\n *\n * @param authToken - Authorization token for calendar access\n * @param calendarId - ID of the calendar to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, calendarId: string): Promise<void>;\n}\n";
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,k3NAAk3N;AAAj4N,wBAAk4N"}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* This file is auto-generated during build. Do not edit manually.
|
|
5
5
|
* Generated from: prebuild.ts
|
|
6
6
|
*/
|
|
7
|
-
export default "import type { ActivityLink, NewActivityWithNotes, SyncUpdate } from \"../index\";\n\n/**\n * Represents successful calendar authorization.\n *\n * Returned by calendar tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * calendar operations.\n */\nexport type CalendarAuth = {\n /** Opaque token for calendar operations */\n authToken: string;\n};\n\n/**\n * Represents a calendar from an external calendar service.\n *\n * Contains metadata about a specific calendar that can be synced\n * with Plot. Different calendar providers may have additional\n * provider-specific properties.\n */\nexport interface Calendar {\n /** Unique identifier for the calendar within the provider */\n id: string;\n /** Human-readable name of the calendar */\n name: string;\n /** Optional description or additional details about the calendar */\n description: string | null;\n /** Whether this is the user's primary/default calendar */\n primary: boolean;\n}\n\n/**\n * Configuration options for calendar synchronization.\n *\n * Controls the time range and other parameters for calendar sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface SyncOptions {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n /** Latest date to sync events to (exclusive) */\n timeMax?: Date;\n}\n\n/**\n * Base interface for calendar integration tools.\n *\n * Defines the standard operations that all calendar tools must implement\n * to integrate with external calendar services like Google Calendar,\n * Outlook Calendar, etc.\n *\n * **Implementation Pattern:**\n * 1. Request an ActivityLink for authorization\n * 2. Create an Activity with the ActivityLink to prompt user\n * 3. Receive a CalendarAuth in the specified callback\n * 4. Fetch list of available calendars\n * 5. Start sync for selected calendars\n * 6. Process incoming events via callbacks\n *\n * @example\n * ```typescript\n * // Typical calendar integration flow\n * class MyCalendarTwist extends Twist {\n * private googleCalendar: GoogleCalendar;\n *\n * async activate() {\n * // Step 1: Request authorization\n * const authLink = await this.googleCalendar.requestAuth(\"onAuthComplete\");\n * await this.plot.createActivity({\n * type: ActivityType.Action,\n * title: \"Connect Google Calendar\",\n * links: [authLink],\n * });\n * }\n *\n * async onAuthComplete(auth: CalendarAuth) {\n * // Step 2: Get available calendars\n * const calendars = await this.googleCalendar.getCalendars(auth.authToken);\n *\n * // Step 3: Start sync for primary calendar\n * const primaryCalendar = calendars.find(c => c.primary);\n * if (primaryCalendar) {\n * await this.googleCalendar.startSync(\n * auth.authToken,\n * primaryCalendar.id,\n * \"onCalendarEvent\"\n * );\n * }\n * }\n *\n * async onCalendarEvent(\n * syncUpdate: SyncUpdate,\n * syncMeta: { initialSync: boolean }\n * ) {\n * // Step 4: Process synced events
|
|
7
|
+
export default "import type { ActivityLink, NewActivityWithNotes, SyncUpdate } from \"../index\";\n\n/**\n * Represents successful calendar authorization.\n *\n * Returned by calendar tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * calendar operations.\n */\nexport type CalendarAuth = {\n /** Opaque token for calendar operations */\n authToken: string;\n};\n\n/**\n * Represents a calendar from an external calendar service.\n *\n * Contains metadata about a specific calendar that can be synced\n * with Plot. Different calendar providers may have additional\n * provider-specific properties.\n */\nexport interface Calendar {\n /** Unique identifier for the calendar within the provider */\n id: string;\n /** Human-readable name of the calendar */\n name: string;\n /** Optional description or additional details about the calendar */\n description: string | null;\n /** Whether this is the user's primary/default calendar */\n primary: boolean;\n}\n\n/**\n * Configuration options for calendar synchronization.\n *\n * Controls the time range and other parameters for calendar sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface SyncOptions {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n /** Latest date to sync events to (exclusive) */\n timeMax?: Date;\n}\n\n/**\n * Base interface for calendar integration tools.\n *\n * Defines the standard operations that all calendar tools must implement\n * to integrate with external calendar services like Google Calendar,\n * Outlook Calendar, etc.\n *\n * **Implementation Pattern:**\n * 1. Request an ActivityLink for authorization\n * 2. Create an Activity with the ActivityLink to prompt user\n * 3. Receive a CalendarAuth in the specified callback\n * 4. Fetch list of available calendars\n * 5. Start sync for selected calendars\n * 6. Process incoming events via callbacks\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source and Note.key for automatic upserts without manual ID tracking.\n * See SYNC_STRATEGIES.md for detailed patterns and when to use alternative approaches.\n *\n * @example\n * ```typescript\n * // Typical calendar integration flow using source/key upserts\n * class MyCalendarTwist extends Twist {\n * private googleCalendar: GoogleCalendar;\n *\n * async activate() {\n * // Step 1: Request authorization\n * const authLink = await this.googleCalendar.requestAuth(\"onAuthComplete\");\n * await this.plot.createActivity({\n * type: ActivityType.Action,\n * title: \"Connect Google Calendar\",\n * links: [authLink],\n * });\n * }\n *\n * async onAuthComplete(auth: CalendarAuth) {\n * // Step 2: Get available calendars\n * const calendars = await this.googleCalendar.getCalendars(auth.authToken);\n *\n * // Step 3: Start sync for primary calendar\n * const primaryCalendar = calendars.find(c => c.primary);\n * if (primaryCalendar) {\n * await this.googleCalendar.startSync(\n * auth.authToken,\n * primaryCalendar.id,\n * \"onCalendarEvent\"\n * );\n * }\n * }\n *\n * async onCalendarEvent(\n * syncUpdate: SyncUpdate,\n * syncMeta: { initialSync: boolean }\n * ) {\n * // Step 4: Process synced events using source/key pattern\n * // The sync update will automatically use the event's URL as the source\n * // for deduplication - no manual ID tracking needed\n * await this.plot.createActivity(syncUpdate);\n * }\n * }\n * ```\n */\nexport interface CalendarTool {\n /**\n * Initiates the authorization flow for the calendar service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<TCallback extends (auth: CalendarAuth, ...args: any[]) => any>(\n callback: TCallback,\n ...extraArgs: TCallback extends (auth: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of calendars accessible to the authenticated user.\n *\n * Returns metadata for all calendars the user has access to, including\n * their primary calendar and any shared calendars. This list can be\n * presented to users for calendar selection.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available calendars\n * @throws When the auth token is invalid or expired\n */\n getCalendars(authToken: string): Promise<Calendar[]>;\n\n /**\n * Begins synchronizing events from a specific calendar.\n *\n * Sets up real-time sync for the specified calendar, including initial\n * event import and ongoing change notifications. The callback function\n * will be invoked for each synced event.\n *\n * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):\n * - Set Activity.source to the event's canonical URL (e.g., event.htmlLink)\n * - Use Note.key for event details (description, attendees, etc.) to enable upserts\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all events (creates new or updates existing)\n * - Set activity.unread = false for initial sync, true for incremental updates\n *\n * **Alternative** (Strategy 3 - Advanced cases):\n * - Use Uuid.Generate() and store ID mappings when creating multiple activities per event\n * - See SYNC_STRATEGIES.md for when this is appropriate\n *\n * @param authToken - Authorization token for calendar access\n * @param calendarId - ID of the calendar to sync\n * @param callback - Function receiving (syncUpdate, ...extraArgs) for each synced event\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise that resolves when sync setup is complete\n * @throws When auth token is invalid or calendar doesn't exist\n */\n startSync<\n TCallback extends (\n syncUpdate: SyncUpdate,\n ...args: any[]\n ) => any\n >(\n authToken: string,\n calendarId: string,\n callback: TCallback,\n ...extraArgs: TCallback extends (\n syncUpdate: any,\n ...rest: infer R\n ) => any\n ? R\n : []\n ): Promise<void>;\n\n /**\n * Stops synchronizing events from a specific calendar.\n *\n * Disables real-time sync and cleans up any webhooks or polling\n * mechanisms for the specified calendar. No further events will\n * be synced after this call.\n *\n * @param authToken - Authorization token for calendar access\n * @param calendarId - ID of the calendar to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, calendarId: string): Promise<void>;\n}\n";
|
|
8
8
|
//# sourceMappingURL=calendar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../src/llm-docs/common/calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,
|
|
1
|
+
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../src/llm-docs/common/calendar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,k3NAAk3N,CAAC"}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* This file is auto-generated during build. Do not edit manually.
|
|
5
5
|
* Generated from: prebuild.ts
|
|
6
6
|
*/
|
|
7
|
-
declare const _default: "import type { ActivityLink, NewActivityWithNotes, SyncUpdate } from \"../index\";\n\n/**\n * Represents a successful messaging service authorization.\n *\n * Returned by messaging tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * messaging operations.\n */\nexport type MessagingAuth = {\n /** Opaque token for messaging operations */\n authToken: string;\n};\n\n/**\n * Represents a channel from an external messaging service.\n *\n * Contains metadata about a specific channel that can be synced\n * with Plot.\n */\nexport interface MessageChannel {\n /** Unique identifier for the channel within the provider */\n id: string;\n /** Human-readable name of the channel (e.g., \"Inbox\", \"#general\", \"My Team Thread\") */\n name: string;\n /** Optional description or additional details about the channel */\n description: string | null;\n /** Whether this is the user's primary/default channel (e.g. email inbox) */\n primary: boolean;\n}\n\n/**\n * Configuration options for messaging synchronization.\n *\n * Controls the time range and other parameters for messaging sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface MessageSyncOptions {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n}\n\n/**\n * Base interface for email and chat integration tools.\n *\n * All synced messages/emails are converted to ActivityWithNotes objects.\n * Each email thread or chat conversation becomes an Activity with Notes for each message.\n */\nexport interface MessagingTool {\n /**\n * Initiates the authorization flow for the service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<TCallback extends (auth: MessagingAuth, ...args: any[]) => any>(\n callback: TCallback,\n ...extraArgs: TCallback extends (auth: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of conversation channels (inboxes, channels) accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available conversation channels\n */\n getChannels(authToken: string): Promise<MessageChannel[]>;\n\n /**\n * Begins synchronizing messages from a specific channel.\n *\n * Email threads and chat conversations are converted to SyncUpdate objects,\n * which can be either new items or updates to existing items.\n *\n *
|
|
7
|
+
declare const _default: "import type { ActivityLink, NewActivityWithNotes, SyncUpdate } from \"../index\";\n\n/**\n * Represents a successful messaging service authorization.\n *\n * Returned by messaging tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * messaging operations.\n */\nexport type MessagingAuth = {\n /** Opaque token for messaging operations */\n authToken: string;\n};\n\n/**\n * Represents a channel from an external messaging service.\n *\n * Contains metadata about a specific channel that can be synced\n * with Plot.\n */\nexport interface MessageChannel {\n /** Unique identifier for the channel within the provider */\n id: string;\n /** Human-readable name of the channel (e.g., \"Inbox\", \"#general\", \"My Team Thread\") */\n name: string;\n /** Optional description or additional details about the channel */\n description: string | null;\n /** Whether this is the user's primary/default channel (e.g. email inbox) */\n primary: boolean;\n}\n\n/**\n * Configuration options for messaging synchronization.\n *\n * Controls the time range and other parameters for messaging sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface MessageSyncOptions {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n}\n\n/**\n * Base interface for email and chat integration tools.\n *\n * All synced messages/emails are converted to ActivityWithNotes objects.\n * Each email thread or chat conversation becomes an Activity with Notes for each message.\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source (thread URL or ID) and Note.key (message ID) for automatic upserts.\n * See SYNC_STRATEGIES.md for detailed patterns.\n */\nexport interface MessagingTool {\n /**\n * Initiates the authorization flow for the service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<TCallback extends (auth: MessagingAuth, ...args: any[]) => any>(\n callback: TCallback,\n ...extraArgs: TCallback extends (auth: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of conversation channels (inboxes, channels) accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available conversation channels\n */\n getChannels(authToken: string): Promise<MessageChannel[]>;\n\n /**\n * Begins synchronizing messages from a specific channel.\n *\n * Email threads and chat conversations are converted to SyncUpdate objects,\n * which can be either new items or updates to existing items.\n *\n * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):\n * - Set Activity.source to the thread/conversation URL or stable ID (e.g., \"slack:{channelId}:{threadTs}\")\n * - Use Note.key for individual messages (e.g., \"message-{messageId}\")\n * - Each message becomes a separate note with unique key for upserts\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all threads (creates new or updates existing)\n * - Set activity.unread = false for initial sync, true for incremental updates\n *\n * **Alternative** (Strategy 3 - Advanced cases):\n * - Use Uuid.Generate() and store ID mappings when creating multiple activities per thread\n * - See SYNC_STRATEGIES.md for when this is appropriate\n *\n * @param authToken - Authorization token for access\n * @param channelId - ID of the channel (e.g., channel, inbox) to sync\n * @param callback - Function receiving (syncUpdate, ...extraArgs) for each synced conversation\n * @param options - Optional configuration for limiting the sync scope (e.g., time range)\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TCallback extends (syncUpdate: SyncUpdate, ...args: any[]) => any\n >(\n authToken: string,\n channelId: string,\n callback: TCallback,\n options?: MessageSyncOptions,\n ...extraArgs: TCallback extends (syncUpdate: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<void>;\n\n /**\n * Stops synchronizing messages from a specific channel.\n *\n * @param authToken - Authorization token for access\n * @param channelId - ID of the channel to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, channelId: string): Promise<void>;\n}\n";
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=messaging.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/messaging.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,
|
|
1
|
+
{"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/messaging.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,6vJAA6vJ;AAA5wJ,wBAA6wJ"}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* This file is auto-generated during build. Do not edit manually.
|
|
5
5
|
* Generated from: prebuild.ts
|
|
6
6
|
*/
|
|
7
|
-
export default "import type { ActivityLink, NewActivityWithNotes, SyncUpdate } from \"../index\";\n\n/**\n * Represents a successful messaging service authorization.\n *\n * Returned by messaging tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * messaging operations.\n */\nexport type MessagingAuth = {\n /** Opaque token for messaging operations */\n authToken: string;\n};\n\n/**\n * Represents a channel from an external messaging service.\n *\n * Contains metadata about a specific channel that can be synced\n * with Plot.\n */\nexport interface MessageChannel {\n /** Unique identifier for the channel within the provider */\n id: string;\n /** Human-readable name of the channel (e.g., \"Inbox\", \"#general\", \"My Team Thread\") */\n name: string;\n /** Optional description or additional details about the channel */\n description: string | null;\n /** Whether this is the user's primary/default channel (e.g. email inbox) */\n primary: boolean;\n}\n\n/**\n * Configuration options for messaging synchronization.\n *\n * Controls the time range and other parameters for messaging sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface MessageSyncOptions {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n}\n\n/**\n * Base interface for email and chat integration tools.\n *\n * All synced messages/emails are converted to ActivityWithNotes objects.\n * Each email thread or chat conversation becomes an Activity with Notes for each message.\n */\nexport interface MessagingTool {\n /**\n * Initiates the authorization flow for the service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<TCallback extends (auth: MessagingAuth, ...args: any[]) => any>(\n callback: TCallback,\n ...extraArgs: TCallback extends (auth: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of conversation channels (inboxes, channels) accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available conversation channels\n */\n getChannels(authToken: string): Promise<MessageChannel[]>;\n\n /**\n * Begins synchronizing messages from a specific channel.\n *\n * Email threads and chat conversations are converted to SyncUpdate objects,\n * which can be either new items or updates to existing items.\n *\n *
|
|
7
|
+
export default "import type { ActivityLink, NewActivityWithNotes, SyncUpdate } from \"../index\";\n\n/**\n * Represents a successful messaging service authorization.\n *\n * Returned by messaging tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * messaging operations.\n */\nexport type MessagingAuth = {\n /** Opaque token for messaging operations */\n authToken: string;\n};\n\n/**\n * Represents a channel from an external messaging service.\n *\n * Contains metadata about a specific channel that can be synced\n * with Plot.\n */\nexport interface MessageChannel {\n /** Unique identifier for the channel within the provider */\n id: string;\n /** Human-readable name of the channel (e.g., \"Inbox\", \"#general\", \"My Team Thread\") */\n name: string;\n /** Optional description or additional details about the channel */\n description: string | null;\n /** Whether this is the user's primary/default channel (e.g. email inbox) */\n primary: boolean;\n}\n\n/**\n * Configuration options for messaging synchronization.\n *\n * Controls the time range and other parameters for messaging sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface MessageSyncOptions {\n /** Earliest date to sync events from (inclusive) */\n timeMin?: Date;\n}\n\n/**\n * Base interface for email and chat integration tools.\n *\n * All synced messages/emails are converted to ActivityWithNotes objects.\n * Each email thread or chat conversation becomes an Activity with Notes for each message.\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source (thread URL or ID) and Note.key (message ID) for automatic upserts.\n * See SYNC_STRATEGIES.md for detailed patterns.\n */\nexport interface MessagingTool {\n /**\n * Initiates the authorization flow for the service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<TCallback extends (auth: MessagingAuth, ...args: any[]) => any>(\n callback: TCallback,\n ...extraArgs: TCallback extends (auth: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of conversation channels (inboxes, channels) accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available conversation channels\n */\n getChannels(authToken: string): Promise<MessageChannel[]>;\n\n /**\n * Begins synchronizing messages from a specific channel.\n *\n * Email threads and chat conversations are converted to SyncUpdate objects,\n * which can be either new items or updates to existing items.\n *\n * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):\n * - Set Activity.source to the thread/conversation URL or stable ID (e.g., \"slack:{channelId}:{threadTs}\")\n * - Use Note.key for individual messages (e.g., \"message-{messageId}\")\n * - Each message becomes a separate note with unique key for upserts\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all threads (creates new or updates existing)\n * - Set activity.unread = false for initial sync, true for incremental updates\n *\n * **Alternative** (Strategy 3 - Advanced cases):\n * - Use Uuid.Generate() and store ID mappings when creating multiple activities per thread\n * - See SYNC_STRATEGIES.md for when this is appropriate\n *\n * @param authToken - Authorization token for access\n * @param channelId - ID of the channel (e.g., channel, inbox) to sync\n * @param callback - Function receiving (syncUpdate, ...extraArgs) for each synced conversation\n * @param options - Optional configuration for limiting the sync scope (e.g., time range)\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TCallback extends (syncUpdate: SyncUpdate, ...args: any[]) => any\n >(\n authToken: string,\n channelId: string,\n callback: TCallback,\n options?: MessageSyncOptions,\n ...extraArgs: TCallback extends (syncUpdate: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<void>;\n\n /**\n * Stops synchronizing messages from a specific channel.\n *\n * @param authToken - Authorization token for access\n * @param channelId - ID of the channel to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, channelId: string): Promise<void>;\n}\n";
|
|
8
8
|
//# sourceMappingURL=messaging.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messaging.js","sourceRoot":"","sources":["../../../src/llm-docs/common/messaging.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,
|
|
1
|
+
{"version":3,"file":"messaging.js","sourceRoot":"","sources":["../../../src/llm-docs/common/messaging.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,6vJAA6vJ,CAAC"}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* This file is auto-generated during build. Do not edit manually.
|
|
5
5
|
* Generated from: prebuild.ts
|
|
6
6
|
*/
|
|
7
|
-
declare const _default: "import type {\n ActivityLink,\n ActivityUpdate,\n NewActivityWithNotes,\n SyncUpdate,\n} from \"../index\";\n\n/**\n * Represents a successful project management service authorization.\n *\n * Returned by project management tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * project operations.\n */\nexport type ProjectAuth = {\n /** Opaque token for project management operations */\n authToken: string;\n};\n\n/**\n * Represents a project from an external project management service.\n *\n * Contains metadata about a specific project/board/workspace that can be synced\n * with Plot.\n */\nexport interface Project {\n /** Unique identifier for the project within the provider */\n id: string;\n /** Human-readable name of the project (e.g., \"Q1 Roadmap\", \"Engineering\") */\n name: string;\n /** Optional description or additional details about the project */\n description: string | null;\n /** Optional project key/abbreviation (e.g., \"PROJ\" in Jira, \"ENG\" in Linear) */\n key: string | null;\n}\n\n/**\n * Configuration options for project synchronization.\n *\n * Controls the time range and other parameters for project sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface ProjectSyncOptions {\n /** Earliest date to sync issues from (inclusive) */\n timeMin?: Date;\n}\n\n/**\n * Base interface for project management integration tools.\n *\n * All synced issues/tasks are converted to ActivityWithNotes objects.\n * Each issue becomes an Activity with Notes for the description and comments.\n */\nexport interface ProjectTool {\n /**\n * Initiates the authorization flow for the service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<TCallback extends (auth: ProjectAuth, ...args: any[]) => any>(\n callback: TCallback,\n ...extraArgs: TCallback extends (auth: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of projects accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available projects\n */\n getProjects(authToken: string): Promise<Project[]>;\n\n /**\n * Begins synchronizing issues from a specific project.\n *\n * Issues and tasks are converted to SyncUpdate objects, which can be either\n * new items or updates to existing items.\n *\n *
|
|
7
|
+
declare const _default: "import type {\n ActivityLink,\n ActivityUpdate,\n NewActivityWithNotes,\n SyncUpdate,\n} from \"../index\";\n\n/**\n * Represents a successful project management service authorization.\n *\n * Returned by project management tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * project operations.\n */\nexport type ProjectAuth = {\n /** Opaque token for project management operations */\n authToken: string;\n};\n\n/**\n * Represents a project from an external project management service.\n *\n * Contains metadata about a specific project/board/workspace that can be synced\n * with Plot.\n */\nexport interface Project {\n /** Unique identifier for the project within the provider */\n id: string;\n /** Human-readable name of the project (e.g., \"Q1 Roadmap\", \"Engineering\") */\n name: string;\n /** Optional description or additional details about the project */\n description: string | null;\n /** Optional project key/abbreviation (e.g., \"PROJ\" in Jira, \"ENG\" in Linear) */\n key: string | null;\n}\n\n/**\n * Configuration options for project synchronization.\n *\n * Controls the time range and other parameters for project sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface ProjectSyncOptions {\n /** Earliest date to sync issues from (inclusive) */\n timeMin?: Date;\n}\n\n/**\n * Base interface for project management integration tools.\n *\n * All synced issues/tasks are converted to ActivityWithNotes objects.\n * Each issue becomes an Activity with Notes for the description and comments.\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source (issue URL) and Note.key for automatic upserts.\n * See SYNC_STRATEGIES.md for detailed patterns.\n */\nexport interface ProjectTool {\n /**\n * Initiates the authorization flow for the service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<TCallback extends (auth: ProjectAuth, ...args: any[]) => any>(\n callback: TCallback,\n ...extraArgs: TCallback extends (auth: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of projects accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available projects\n */\n getProjects(authToken: string): Promise<Project[]>;\n\n /**\n * Begins synchronizing issues from a specific project.\n *\n * Issues and tasks are converted to SyncUpdate objects, which can be either\n * new items or updates to existing items.\n *\n * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):\n * - Set Activity.source to the issue's canonical URL (e.g., Linear issue URL, Jira issue URL)\n * - Use Note.key for issue details:\n * - key: \"description\" for issue description (upserts on changes)\n * - key: \"metadata\" for status, priority, assignee, etc.\n * - key: \"comment-{commentId}\" for individual comments (unique per comment)\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all issues (creates new or updates existing)\n * - Set activity.unread = false for initial sync, true for incremental updates\n *\n * **Alternative** (Strategy 3 - Advanced cases):\n * - Use Uuid.Generate() and store ID mappings when creating multiple activities per issue\n * - See SYNC_STRATEGIES.md for when this is appropriate\n *\n * @param authToken - Authorization token for access\n * @param projectId - ID of the project to sync\n * @param callback - Function receiving (syncUpdate, ...extraArgs) for each synced issue\n * @param options - Optional configuration for limiting the sync scope (e.g., time range)\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TCallback extends (\n syncUpdate: SyncUpdate,\n ...args: any[]\n ) => any\n >(\n authToken: string,\n projectId: string,\n callback: TCallback,\n options?: ProjectSyncOptions,\n ...extraArgs: TCallback extends (\n syncUpdate: any,\n ...rest: infer R\n ) => any\n ? R\n : []\n ): Promise<void>;\n\n /**\n * Stops synchronizing issues from a specific project.\n *\n * @param authToken - Authorization token for access\n * @param projectId - ID of the project to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, projectId: string): Promise<void>;\n\n /**\n * Updates an issue/task with new values.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync activity updates back to the external service.\n *\n * The update object contains only the fields that changed, plus id and source.\n * Uses the combination of start and done to determine workflow state:\n * - done set \u2192 Completed/Done state\n * - done null + start set \u2192 In Progress/Active state\n * - done null + start null \u2192 Backlog/Todo state\n *\n * @param authToken - Authorization token for access\n * @param update - ActivityUpdate with changed fields (includes id and source)\n * @returns Promise that resolves when the update is synced\n */\n updateIssue?(authToken: string, update: ActivityUpdate): Promise<void>;\n\n /**\n * Adds a comment to an issue/task.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync notes added to activities back as comments on the external service.\n *\n * @param authToken - Authorization token for access\n * @param issueId - ID or key of the issue/task to comment on\n * @param body - The comment text content\n * @returns Promise that resolves when the comment is added\n */\n addIssueComment?(\n authToken: string,\n issueId: string,\n body: string\n ): Promise<void>;\n}\n";
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/projects.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/llm-docs/common/projects.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;wBAEY,upMAAwoM;AAAvpM,wBAAwpM"}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* This file is auto-generated during build. Do not edit manually.
|
|
5
5
|
* Generated from: prebuild.ts
|
|
6
6
|
*/
|
|
7
|
-
export default "import type {\n ActivityLink,\n ActivityUpdate,\n NewActivityWithNotes,\n SyncUpdate,\n} from \"../index\";\n\n/**\n * Represents a successful project management service authorization.\n *\n * Returned by project management tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * project operations.\n */\nexport type ProjectAuth = {\n /** Opaque token for project management operations */\n authToken: string;\n};\n\n/**\n * Represents a project from an external project management service.\n *\n * Contains metadata about a specific project/board/workspace that can be synced\n * with Plot.\n */\nexport interface Project {\n /** Unique identifier for the project within the provider */\n id: string;\n /** Human-readable name of the project (e.g., \"Q1 Roadmap\", \"Engineering\") */\n name: string;\n /** Optional description or additional details about the project */\n description: string | null;\n /** Optional project key/abbreviation (e.g., \"PROJ\" in Jira, \"ENG\" in Linear) */\n key: string | null;\n}\n\n/**\n * Configuration options for project synchronization.\n *\n * Controls the time range and other parameters for project sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface ProjectSyncOptions {\n /** Earliest date to sync issues from (inclusive) */\n timeMin?: Date;\n}\n\n/**\n * Base interface for project management integration tools.\n *\n * All synced issues/tasks are converted to ActivityWithNotes objects.\n * Each issue becomes an Activity with Notes for the description and comments.\n */\nexport interface ProjectTool {\n /**\n * Initiates the authorization flow for the service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<TCallback extends (auth: ProjectAuth, ...args: any[]) => any>(\n callback: TCallback,\n ...extraArgs: TCallback extends (auth: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of projects accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available projects\n */\n getProjects(authToken: string): Promise<Project[]>;\n\n /**\n * Begins synchronizing issues from a specific project.\n *\n * Issues and tasks are converted to SyncUpdate objects, which can be either\n * new items or updates to existing items.\n *\n *
|
|
7
|
+
export default "import type {\n ActivityLink,\n ActivityUpdate,\n NewActivityWithNotes,\n SyncUpdate,\n} from \"../index\";\n\n/**\n * Represents a successful project management service authorization.\n *\n * Returned by project management tools when authorization completes successfully.\n * The auth token is an opaque identifier that can be used for subsequent\n * project operations.\n */\nexport type ProjectAuth = {\n /** Opaque token for project management operations */\n authToken: string;\n};\n\n/**\n * Represents a project from an external project management service.\n *\n * Contains metadata about a specific project/board/workspace that can be synced\n * with Plot.\n */\nexport interface Project {\n /** Unique identifier for the project within the provider */\n id: string;\n /** Human-readable name of the project (e.g., \"Q1 Roadmap\", \"Engineering\") */\n name: string;\n /** Optional description or additional details about the project */\n description: string | null;\n /** Optional project key/abbreviation (e.g., \"PROJ\" in Jira, \"ENG\" in Linear) */\n key: string | null;\n}\n\n/**\n * Configuration options for project synchronization.\n *\n * Controls the time range and other parameters for project sync operations.\n * Used to limit sync scope and optimize performance.\n */\nexport interface ProjectSyncOptions {\n /** Earliest date to sync issues from (inclusive) */\n timeMin?: Date;\n}\n\n/**\n * Base interface for project management integration tools.\n *\n * All synced issues/tasks are converted to ActivityWithNotes objects.\n * Each issue becomes an Activity with Notes for the description and comments.\n *\n * **Recommended Data Sync Strategy:**\n * Use Activity.source (issue URL) and Note.key for automatic upserts.\n * See SYNC_STRATEGIES.md for detailed patterns.\n */\nexport interface ProjectTool {\n /**\n * Initiates the authorization flow for the service.\n *\n * @param callback - Function receiving (auth, ...extraArgs) when auth completes\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise resolving to an ActivityLink to initiate the auth flow\n */\n requestAuth<TCallback extends (auth: ProjectAuth, ...args: any[]) => any>(\n callback: TCallback,\n ...extraArgs: TCallback extends (auth: any, ...rest: infer R) => any\n ? R\n : []\n ): Promise<ActivityLink>;\n\n /**\n * Retrieves the list of projects accessible to the user.\n *\n * @param authToken - Authorization token from successful auth flow\n * @returns Promise resolving to array of available projects\n */\n getProjects(authToken: string): Promise<Project[]>;\n\n /**\n * Begins synchronizing issues from a specific project.\n *\n * Issues and tasks are converted to SyncUpdate objects, which can be either\n * new items or updates to existing items.\n *\n * **Recommended Implementation** (Strategy 2 - Upsert via Source/Key):\n * - Set Activity.source to the issue's canonical URL (e.g., Linear issue URL, Jira issue URL)\n * - Use Note.key for issue details:\n * - key: \"description\" for issue description (upserts on changes)\n * - key: \"metadata\" for status, priority, assignee, etc.\n * - key: \"comment-{commentId}\" for individual comments (unique per comment)\n * - No manual ID tracking needed - Plot handles deduplication automatically\n * - Send NewActivityWithNotes for all issues (creates new or updates existing)\n * - Set activity.unread = false for initial sync, true for incremental updates\n *\n * **Alternative** (Strategy 3 - Advanced cases):\n * - Use Uuid.Generate() and store ID mappings when creating multiple activities per issue\n * - See SYNC_STRATEGIES.md for when this is appropriate\n *\n * @param authToken - Authorization token for access\n * @param projectId - ID of the project to sync\n * @param callback - Function receiving (syncUpdate, ...extraArgs) for each synced issue\n * @param options - Optional configuration for limiting the sync scope (e.g., time range)\n * @param extraArgs - Additional arguments to pass to the callback (type-checked)\n * @returns Promise that resolves when sync setup is complete\n */\n startSync<\n TCallback extends (\n syncUpdate: SyncUpdate,\n ...args: any[]\n ) => any\n >(\n authToken: string,\n projectId: string,\n callback: TCallback,\n options?: ProjectSyncOptions,\n ...extraArgs: TCallback extends (\n syncUpdate: any,\n ...rest: infer R\n ) => any\n ? R\n : []\n ): Promise<void>;\n\n /**\n * Stops synchronizing issues from a specific project.\n *\n * @param authToken - Authorization token for access\n * @param projectId - ID of the project to stop syncing\n * @returns Promise that resolves when sync is stopped\n */\n stopSync(authToken: string, projectId: string): Promise<void>;\n\n /**\n * Updates an issue/task with new values.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync activity updates back to the external service.\n *\n * The update object contains only the fields that changed, plus id and source.\n * Uses the combination of start and done to determine workflow state:\n * - done set → Completed/Done state\n * - done null + start set → In Progress/Active state\n * - done null + start null → Backlog/Todo state\n *\n * @param authToken - Authorization token for access\n * @param update - ActivityUpdate with changed fields (includes id and source)\n * @returns Promise that resolves when the update is synced\n */\n updateIssue?(authToken: string, update: ActivityUpdate): Promise<void>;\n\n /**\n * Adds a comment to an issue/task.\n *\n * Optional method for bidirectional sync. When implemented, allows Plot to\n * sync notes added to activities back as comments on the external service.\n *\n * @param authToken - Authorization token for access\n * @param issueId - ID or key of the issue/task to comment on\n * @param body - The comment text content\n * @returns Promise that resolves when the comment is added\n */\n addIssueComment?(\n authToken: string,\n issueId: string,\n body: string\n ): Promise<void>;\n}\n";
|
|
8
8
|
//# sourceMappingURL=projects.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../../src/llm-docs/common/projects.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../../src/llm-docs/common/projects.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,woMAAwoM,CAAC"}
|