@plotday/twister 0.53.0 → 0.55.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/dist/connector.d.ts +47 -6
- package/dist/connector.d.ts.map +1 -1
- package/dist/connector.js +2 -1
- package/dist/connector.js.map +1 -1
- package/dist/docs/assets/hierarchy.js +1 -1
- package/dist/docs/assets/navigation.js +1 -1
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/classes/index.Connector.html +26 -25
- package/dist/docs/classes/index.FileNotFoundError.html +1 -1
- package/dist/docs/classes/index.Files.html +2 -2
- package/dist/docs/classes/index.Imap.html +1 -1
- package/dist/docs/classes/index.Options.html +1 -1
- package/dist/docs/classes/index.Smtp.html +1 -1
- package/dist/docs/classes/tools_ai.AI.html +7 -5
- package/dist/docs/classes/tools_callbacks.Callbacks.html +1 -1
- package/dist/docs/classes/tools_integrations.Integrations.html +11 -11
- package/dist/docs/classes/tools_network.Network.html +1 -1
- package/dist/docs/classes/tools_plot.Plot.html +62 -56
- package/dist/docs/classes/tools_store.Store.html +1 -1
- package/dist/docs/classes/tools_tasks.Tasks.html +1 -1
- package/dist/docs/classes/tools_twists.Twists.html +2 -2
- package/dist/docs/classes/twist.Twist.html +3 -3
- package/dist/docs/enums/plot.ActionType.html +9 -9
- package/dist/docs/enums/plot.ActorType.html +4 -4
- package/dist/docs/enums/plot.ConferencingProvider.html +6 -6
- package/dist/docs/enums/plot.ThemeColor.html +1 -1
- package/dist/docs/enums/tools_ai.AIModel.html +2 -2
- package/dist/docs/enums/tools_integrations.AuthProvider.html +13 -13
- package/dist/docs/enums/{tools_plot.PriorityAccess.html → tools_plot.FocusAccess.html} +6 -6
- package/dist/docs/enums/tools_plot.ThreadAccess.html +1 -1
- package/dist/docs/hierarchy.html +1 -1
- package/dist/docs/interfaces/tools_ai.AIRequest.html +27 -11
- package/dist/docs/interfaces/tools_ai.AIResponse.html +9 -9
- package/dist/docs/interfaces/tools_ai.FilePart.html +5 -5
- package/dist/docs/interfaces/tools_ai.ImagePart.html +4 -4
- package/dist/docs/interfaces/tools_ai.ReasoningPart.html +4 -4
- package/dist/docs/interfaces/tools_ai.RedactedReasoningPart.html +3 -3
- package/dist/docs/interfaces/tools_ai.TextPart.html +3 -3
- package/dist/docs/interfaces/tools_ai.ToolCallPart.html +5 -5
- package/dist/docs/interfaces/tools_ai.ToolExecutionOptions.html +4 -4
- package/dist/docs/interfaces/tools_ai.ToolResultPart.html +5 -5
- package/dist/docs/media/AGENTS.md +1 -1
- package/dist/docs/modules/index.html +1 -1
- package/dist/docs/modules/plot.html +1 -1
- package/dist/docs/modules/tools_plot.html +1 -1
- package/dist/docs/types/index.CreateLinkDraft.html +14 -13
- package/dist/docs/types/index.OptionalScopeGroup.html +12 -0
- package/dist/docs/types/index.ResolvedRecipient.html +13 -2
- package/dist/docs/types/index.Schedule.html +1 -1
- package/dist/docs/types/index.ScopeConfig.html +9 -0
- package/dist/docs/types/plot.Action.html +1 -1
- package/dist/docs/types/plot.Actor.html +5 -5
- package/dist/docs/types/plot.Contact.html +4 -4
- package/dist/docs/types/plot.ContentType.html +1 -1
- package/dist/docs/types/plot.Focus.html +18 -0
- package/dist/docs/types/plot.FocusUpdate.html +3 -0
- package/dist/docs/types/plot.Link.html +16 -16
- package/dist/docs/types/plot.LinkUpdate.html +1 -1
- package/dist/docs/types/plot.NewActor.html +1 -1
- package/dist/docs/types/plot.NewContact.html +1 -1
- package/dist/docs/types/plot.NewFocus.html +13 -0
- package/dist/docs/types/plot.NewLink.html +6 -6
- package/dist/docs/types/plot.NewLinkWithNotes.html +1 -1
- package/dist/docs/types/plot.NewNote.html +2 -2
- package/dist/docs/types/plot.NewReactions.html +1 -1
- package/dist/docs/types/plot.NewTags.html +1 -1
- package/dist/docs/types/plot.NewThread.html +4 -4
- package/dist/docs/types/plot.NewThreadWithNotes.html +1 -1
- package/dist/docs/types/plot.Note.html +2 -2
- package/dist/docs/types/plot.NoteUpdate.html +1 -1
- package/dist/docs/types/plot.PlanOperation.html +6 -6
- package/dist/docs/types/plot.Reaction.html +1 -1
- package/dist/docs/types/plot.Reactions.html +1 -1
- package/dist/docs/types/plot.Tags.html +1 -1
- package/dist/docs/types/plot.Thread.html +1 -1
- package/dist/docs/types/plot.ThreadAccessLevel.html +3 -3
- package/dist/docs/types/plot.ThreadCommon.html +6 -6
- package/dist/docs/types/plot.ThreadFilter.html +2 -2
- package/dist/docs/types/plot.ThreadMeta.html +1 -1
- package/dist/docs/types/plot.ThreadType.html +4 -4
- package/dist/docs/types/plot.ThreadUpdate.html +1 -1
- package/dist/docs/types/plot.ThreadWithNotes.html +1 -1
- package/dist/docs/types/tools_ai.AIAssistantMessage.html +2 -2
- package/dist/docs/types/tools_ai.AICapabilities.html +7 -3
- package/dist/docs/types/tools_ai.AIMessage.html +1 -1
- package/dist/docs/types/tools_ai.AIOptions.html +2 -2
- package/dist/docs/types/tools_ai.AISource.html +1 -1
- package/dist/docs/types/tools_ai.AISystemMessage.html +2 -2
- package/dist/docs/types/tools_ai.AITool.html +10 -9
- package/dist/docs/types/tools_ai.AIToolMessage.html +2 -2
- package/dist/docs/types/tools_ai.AIToolSet.html +1 -1
- package/dist/docs/types/tools_ai.AIUsage.html +5 -5
- package/dist/docs/types/tools_ai.AIUserMessage.html +2 -2
- package/dist/docs/types/tools_ai.DataContent.html +1 -1
- package/dist/docs/types/tools_ai.ModelPreferences.html +4 -4
- package/dist/docs/types/tools_integrations.ArchiveLinkFilter.html +5 -5
- package/dist/docs/types/tools_integrations.AuthToken.html +4 -4
- package/dist/docs/types/tools_integrations.Authorization.html +4 -4
- package/dist/docs/types/tools_integrations.Channel.html +23 -4
- package/dist/docs/types/tools_integrations.ComposeConfig.html +4 -4
- package/dist/docs/types/tools_integrations.ContactRoleConfig.html +5 -5
- package/dist/docs/types/tools_integrations.LinkTypeConfig.html +57 -28
- package/dist/docs/types/tools_integrations.SyncContext.html +3 -3
- package/dist/docs/types/tools_plot.SearchOptions.html +5 -6
- package/dist/docs/types/tools_twists.TwistPermissions.html +1 -1
- package/dist/llm-docs/connector.d.ts +1 -1
- package/dist/llm-docs/connector.d.ts.map +1 -1
- package/dist/llm-docs/connector.js +1 -1
- package/dist/llm-docs/connector.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/schedule.d.ts +1 -1
- package/dist/llm-docs/schedule.d.ts.map +1 -1
- package/dist/llm-docs/schedule.js +1 -1
- package/dist/llm-docs/schedule.js.map +1 -1
- package/dist/llm-docs/tools/ai.d.ts +1 -1
- package/dist/llm-docs/tools/ai.d.ts.map +1 -1
- package/dist/llm-docs/tools/ai.js +1 -1
- package/dist/llm-docs/tools/ai.js.map +1 -1
- package/dist/llm-docs/tools/files.d.ts +1 -1
- package/dist/llm-docs/tools/files.d.ts.map +1 -1
- package/dist/llm-docs/tools/files.js +1 -1
- package/dist/llm-docs/tools/files.js.map +1 -1
- package/dist/llm-docs/tools/integrations.d.ts +1 -1
- package/dist/llm-docs/tools/integrations.d.ts.map +1 -1
- package/dist/llm-docs/tools/integrations.js +1 -1
- package/dist/llm-docs/tools/integrations.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/twists.d.ts +1 -1
- package/dist/llm-docs/tools/twists.d.ts.map +1 -1
- package/dist/llm-docs/tools/twists.js +1 -1
- package/dist/llm-docs/tools/twists.js.map +1 -1
- package/dist/llm-docs/twist.d.ts +1 -1
- package/dist/llm-docs/twist.d.ts.map +1 -1
- package/dist/llm-docs/twist.js +1 -1
- package/dist/llm-docs/twist.js.map +1 -1
- package/dist/plot.d.ts +62 -82
- package/dist/plot.d.ts.map +1 -1
- package/dist/plot.js +1 -1
- package/dist/plot.js.map +1 -1
- package/dist/schedule.d.ts +1 -1
- package/dist/tools/ai.d.ts +46 -10
- package/dist/tools/ai.d.ts.map +1 -1
- package/dist/tools/ai.js.map +1 -1
- package/dist/tools/files.d.ts +1 -1
- package/dist/tools/integrations.d.ts +80 -24
- package/dist/tools/integrations.d.ts.map +1 -1
- package/dist/tools/integrations.js.map +1 -1
- package/dist/tools/plot.d.ts +66 -56
- package/dist/tools/plot.d.ts.map +1 -1
- package/dist/tools/plot.js +14 -14
- package/dist/tools/plot.js.map +1 -1
- package/dist/tools/twists.d.ts +2 -2
- package/dist/twist.d.ts +3 -3
- package/dist/twist.js +3 -3
- package/package.json +1 -1
- package/src/connector.ts +49 -6
- package/src/llm-docs/connector.ts +1 -1
- package/src/llm-docs/plot.ts +1 -1
- package/src/llm-docs/schedule.ts +1 -1
- package/src/llm-docs/tools/ai.ts +1 -1
- package/src/llm-docs/tools/files.ts +1 -1
- package/src/llm-docs/tools/integrations.ts +1 -1
- package/src/llm-docs/tools/plot.ts +1 -1
- package/src/llm-docs/tools/twists.ts +1 -1
- package/src/llm-docs/twist.ts +1 -1
- package/src/plot.ts +63 -72
- package/src/schedule.ts +1 -1
- package/src/tools/ai.ts +46 -10
- package/src/tools/files.ts +1 -1
- package/src/tools/integrations.ts +80 -24
- package/src/tools/plot.ts +69 -59
- package/src/tools/twists.ts +2 -2
- package/src/twist.ts +3 -3
- package/dist/docs/types/plot.NewPriority.html +0 -15
- package/dist/docs/types/plot.Priority.html +0 -15
- package/dist/docs/types/plot.PriorityUpdate.html +0 -5
|
@@ -10,6 +10,26 @@ export type Channel = {
|
|
|
10
10
|
id: string;
|
|
11
11
|
/** Display name shown in the UI */
|
|
12
12
|
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* Whether this channel should be selected by default when the user first
|
|
15
|
+
* adds the connection. Tri-state:
|
|
16
|
+
* - `true` — pre-select it (e.g. the user's own/primary calendar).
|
|
17
|
+
* - `false` — exclude it from the default selection (low-value or
|
|
18
|
+
* irrelevant resources that would crowd the user's view, or containers
|
|
19
|
+
* whose contents are too broad to sync wholesale — e.g. a holiday or
|
|
20
|
+
* someone-else's shared calendar, a GitHub org that cascades to every
|
|
21
|
+
* repo, a Microsoft Teams team container). The user can still enable it
|
|
22
|
+
* manually.
|
|
23
|
+
* - `undefined` — no opinion; the client decides. The client defaults to
|
|
24
|
+
* enabling the channel unless its title looks low-value (holidays,
|
|
25
|
+
* birthdays, spam/sent/draft, …).
|
|
26
|
+
*
|
|
27
|
+
* The guiding principle is "sync everything the user would reasonably want
|
|
28
|
+
* by default" — for most connectors that's all channels, so only set this
|
|
29
|
+
* where the connector can distinguish the user's own/relevant channels from
|
|
30
|
+
* low-value ones (e.g. Google Calendar via `accessRole === "owner"`).
|
|
31
|
+
*/
|
|
32
|
+
enabledByDefault?: boolean;
|
|
13
33
|
/** Optional nested channel resources (e.g., subfolders) */
|
|
14
34
|
children?: Channel[];
|
|
15
35
|
/** Per-channel link type configs. Overrides twist-level linkTypes when present. */
|
|
@@ -31,6 +51,28 @@ export type LinkTypeConfig = {
|
|
|
31
51
|
* when omitted. Use the singular noun in title case (e.g. "Comment").
|
|
32
52
|
*/
|
|
33
53
|
noteLabel?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Placeholder shown in the editor when this link type is the target of a
|
|
56
|
+
* new thread (NewThreadPage). Example: "Send a Gmail email".
|
|
57
|
+
* If unset, Plot derives "Create a new {connector} {label.toLowerCase()}".
|
|
58
|
+
*/
|
|
59
|
+
composePlaceholder?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Label for the Send button on NewThreadPage when this link type is the
|
|
62
|
+
* target. Example: "Send". If unset, defaults to "Create".
|
|
63
|
+
*/
|
|
64
|
+
composeVerb?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Placeholder shown in the in-thread editor for the default reply mode.
|
|
67
|
+
* Example: "Reply" (Gmail), "Add a comment" (Linear). If unset, Plot derives
|
|
68
|
+
* "Add a {noteLabel.toLowerCase()}" or "Add a note".
|
|
69
|
+
*/
|
|
70
|
+
replyPlaceholder?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Label for the Send button in the in-thread editor. Example: "Send"
|
|
73
|
+
* (Gmail), "Comment" (Linear). If unset, defaults to "Send".
|
|
74
|
+
*/
|
|
75
|
+
replyVerb?: string;
|
|
34
76
|
/** URL to an icon for this link type (light mode). Prefer Iconify `logos/*` URLs. */
|
|
35
77
|
logo?: string;
|
|
36
78
|
/** URL to an icon for dark mode. Use when the default logo is invisible on dark backgrounds (e.g., Iconify `simple-icons/*` with `?color=`). */
|
|
@@ -54,32 +96,26 @@ export type LinkTypeConfig = {
|
|
|
54
96
|
*/
|
|
55
97
|
active?: boolean;
|
|
56
98
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
task?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Mark the thread `to_read=true` in Plot when a link enters this status.
|
|
66
|
-
* Use for connectors that explicitly track read-later state (Pocket
|
|
67
|
-
* archives, Slack "remind me", etc).
|
|
68
|
-
*/
|
|
69
|
-
toRead?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* @deprecated Use `active` (messaging) or `task` (project tracker) instead.
|
|
72
|
-
* Treated as `task: true` for backward compatibility.
|
|
73
|
-
*
|
|
74
|
-
* Original meaning: whether this status represents the connector's
|
|
75
|
-
* "to-do" / active state. When a user adds a thread to Plot's agenda,
|
|
76
|
-
* done-status links flip to the status marked `todo: true` (e.g.,
|
|
77
|
-
* Gmail's "starred", Linear's "todo").
|
|
99
|
+
* Marks this status as the connector's "to-do" / active state. When a
|
|
100
|
+
* user brings a done thread back into Plot's agenda, done-status links
|
|
101
|
+
* are flipped to the status marked `todo: true` (e.g. Gmail's "starred",
|
|
102
|
+
* Linear's "unstarted"); connectors that don't mark one fall back to the
|
|
103
|
+
* first non-done status.
|
|
78
104
|
*/
|
|
79
105
|
todo?: boolean;
|
|
80
106
|
}>;
|
|
81
107
|
/** Whether this link type supports displaying and changing the assignee */
|
|
82
108
|
supportsAssignee?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Whether this link type produces time-anchored schedule/agenda items
|
|
111
|
+
* (i.e. calendar events). The Plot app shows the agenda (the bottom-nav
|
|
112
|
+
* tab on mobile and the left-sidebar agenda on desktop) only when the
|
|
113
|
+
* user has at least one active connection whose link types include one
|
|
114
|
+
* with `includesSchedules: true`. Calendar connectors (Google / Apple /
|
|
115
|
+
* Outlook Calendar) set this on their `event` link type. Defaults to
|
|
116
|
+
* false — non-calendar link types (messages, issues, tasks, docs) omit it.
|
|
117
|
+
*/
|
|
118
|
+
includesSchedules?: boolean;
|
|
83
119
|
/** Default thread creation mode for this link type: 'all' | 'actionable' | 'manual' */
|
|
84
120
|
defaultCreateThreads?: string;
|
|
85
121
|
/**
|
|
@@ -111,6 +147,22 @@ export type LinkTypeConfig = {
|
|
|
111
147
|
* false when omitted.
|
|
112
148
|
*/
|
|
113
149
|
supportsContactChanges?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Whether a note/reply on this link type can carry a link (a pasted URL or
|
|
152
|
+
* connector-created item) that Plot forwards to the source. When false (the
|
|
153
|
+
* default), the "Add link" button is hidden for threads of this link type.
|
|
154
|
+
* Only set true if the connector's reply path actually forwards the link
|
|
155
|
+
* action to the source. Private Plot notes (no link type) always allow links.
|
|
156
|
+
*/
|
|
157
|
+
supportsLinks?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Whether a note/reply on this link type can carry an uploaded file that Plot
|
|
160
|
+
* forwards to the source as an attachment. When false (the default), the
|
|
161
|
+
* "Attach file" button is hidden for threads of this link type. Only set true
|
|
162
|
+
* if the connector's reply path actually uploads file actions to the source.
|
|
163
|
+
* Private Plot notes (no link type) always allow attachments.
|
|
164
|
+
*/
|
|
165
|
+
supportsFileAttachments?: boolean;
|
|
114
166
|
/**
|
|
115
167
|
* Declares how sharing on threads of this link type is scoped:
|
|
116
168
|
*
|
|
@@ -122,12 +174,16 @@ export type LinkTypeConfig = {
|
|
|
122
174
|
* - `"message"`: each note carries its own recipient set via
|
|
123
175
|
* `note.access_contacts`; the thread roster is the union across
|
|
124
176
|
* all messages. Email.
|
|
177
|
+
* - `"none"`: the link type has no recipient roster at all. No
|
|
178
|
+
* contacts/sharing UI is shown for these threads. Use for purely
|
|
179
|
+
* personal destinations with no sharing concept (e.g. Google
|
|
180
|
+
* Tasks). The per-thread `contacts` array is ignored for sharing UI.
|
|
125
181
|
*
|
|
126
182
|
* Omit to default to `"thread"`. When set to `"message"`, every
|
|
127
183
|
* note this connector ingests must populate `access_contacts`
|
|
128
184
|
* explicitly (never NULL).
|
|
129
185
|
*/
|
|
130
|
-
sharingModel?: "thread" | "channel" | "message";
|
|
186
|
+
sharingModel?: "thread" | "channel" | "message" | "none";
|
|
131
187
|
};
|
|
132
188
|
/**
|
|
133
189
|
* Declares how a link type is composable from Plot via
|
|
@@ -298,7 +354,7 @@ export declare abstract class Integrations extends ITool {
|
|
|
298
354
|
*/
|
|
299
355
|
abstract get(provider: AuthProvider, channelId: string): Promise<AuthToken | null>;
|
|
300
356
|
/**
|
|
301
|
-
* Saves a link with notes to the connector's
|
|
357
|
+
* Saves a link with notes to the connector's focus.
|
|
302
358
|
*
|
|
303
359
|
* Creates a thread+link pair. The thread is a lightweight container;
|
|
304
360
|
* the link holds the external entity data (source, meta, type, status, etc.).
|
|
@@ -333,7 +389,7 @@ export declare abstract class Integrations extends ITool {
|
|
|
333
389
|
*/
|
|
334
390
|
abstract saveLinks(links: NewLinkWithNotes[]): Promise<(Uuid | null)[]>;
|
|
335
391
|
/**
|
|
336
|
-
* Upserts contacts into the connector's
|
|
392
|
+
* Upserts contacts into the connector's focus without requiring a Link.
|
|
337
393
|
*
|
|
338
394
|
* Use this for messaging connectors to bulk-sync workspace members so the
|
|
339
395
|
* recipient picker can filter contacts by reachable platform account. Populate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../src/tools/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,EACN,MAAM,IAAI,CAAC;AACZ,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,iEAAiE;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,mFAAmF;IACnF,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gJAAgJ;IAChJ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sHAAsH;IACtH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC;QACf,qDAAqD;QACrD,MAAM,EAAE,MAAM,CAAC;QACf,kDAAkD;QAClD,KAAK,EAAE,MAAM,CAAC;QACd,wFAAwF;QACxF,IAAI,CAAC,EAAE,OAAO,CAAC;QACf;;;;;;WAMG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;;;;;WAMG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"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AQ,EAAE,YAAY,CAAC;IACvB,sDAAsD;IACtD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,0EAA0E;IAC1E,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../src/tools/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GACN,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../src/tools/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GACN,MAAM,IAAI,CAAC;AAuSZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,OAAgB,YAAa,SAAQ,KAAK;IAC9C;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,WAAuB;QAC3C,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACjD,CAAC;CAuJF;AAiBD;;;;;GAKG;AACH,MAAM,CAAN,IAAY,YAyBX;AAzBD,WAAY,YAAY;IACtB,0DAA0D;IAC1D,iCAAiB,CAAA;IACjB,0DAA0D;IAC1D,uCAAuB,CAAA;IACvB,kDAAkD;IAClD,iCAAiB,CAAA;IACjB,gDAAgD;IAChD,+BAAe,CAAA;IACf,uDAAuD;IACvD,uCAAuB,CAAA;IACvB,kDAAkD;IAClD,iCAAiB,CAAA;IACjB,gCAAgC;IAChC,iCAAiB,CAAA;IACjB,sEAAsE;IACtE,iCAAiB,CAAA;IACjB,gDAAgD;IAChD,+BAAe,CAAA;IACf,6CAA6C;IAC7C,mCAAmB,CAAA;IACnB,yDAAyD;IACzD,mCAAmB,CAAA;IACnB,iDAAiD;IACjD,qCAAqB,CAAA;AACvB,CAAC,EAzBW,YAAY,KAAZ,YAAY,QAyBvB"}
|
package/dist/tools/plot.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Action, type Thread, type ThreadUpdate, type Actor, type ActorId, ITool, type Link, type LinkUpdate, type NewThread, type NewThreadWithNotes, type NewNote, type
|
|
1
|
+
import { type Action, type Thread, type ThreadUpdate, type Actor, type ActorId, ITool, type Link, type LinkUpdate, type NewThread, type NewThreadWithNotes, type NewNote, type NewFocus, type Note, type NoteUpdate, type PlanOperation, type Focus, type FocusUpdate, Uuid } from "..";
|
|
2
2
|
import { type Schedule, type NewSchedule } from "../schedule";
|
|
3
3
|
import type { Callback } from "./callbacks";
|
|
4
4
|
export declare enum ThreadAccess {
|
|
@@ -15,22 +15,22 @@ export declare enum ThreadAccess {
|
|
|
15
15
|
Create = 1,
|
|
16
16
|
/**
|
|
17
17
|
* List/query all Threads owned by the twist's user.
|
|
18
|
-
* Update any Thread (title, tags, archived, type,
|
|
18
|
+
* Update any Thread (title, tags, archived, type, focus) regardless of creator.
|
|
19
19
|
* Create Notes on any Thread (not just own or mentioned).
|
|
20
20
|
* All Create permissions.
|
|
21
21
|
*/
|
|
22
22
|
Full = 2
|
|
23
23
|
}
|
|
24
|
-
export declare enum
|
|
24
|
+
export declare enum FocusAccess {
|
|
25
25
|
/**
|
|
26
|
-
* Create new
|
|
27
|
-
* Update
|
|
26
|
+
* Create new Focuses for the twist owner.
|
|
27
|
+
* Update Focuses created by the twist.
|
|
28
28
|
*/
|
|
29
29
|
Create = 0,
|
|
30
30
|
/**
|
|
31
|
-
* Read all
|
|
32
|
-
* Create new
|
|
33
|
-
* Update and archive any
|
|
31
|
+
* Read all Focuses owned by the twist's user.
|
|
32
|
+
* Create new Focuses for the twist owner.
|
|
33
|
+
* Update and archive any Focus owned by the twist's user.
|
|
34
34
|
*/
|
|
35
35
|
Full = 1
|
|
36
36
|
}
|
|
@@ -74,7 +74,7 @@ type SearchResultBase = {
|
|
|
74
74
|
id: string;
|
|
75
75
|
title: string | null;
|
|
76
76
|
};
|
|
77
|
-
|
|
77
|
+
focus: {
|
|
78
78
|
id: string;
|
|
79
79
|
title: string | null;
|
|
80
80
|
};
|
|
@@ -103,17 +103,16 @@ export type SearchOptions = {
|
|
|
103
103
|
/** Minimum similarity score 0-1 (default: 0.3) */
|
|
104
104
|
threshold?: number;
|
|
105
105
|
/**
|
|
106
|
-
* Scope search to this
|
|
107
|
-
*
|
|
108
|
-
* priority tree.
|
|
106
|
+
* Scope search to this focus. Must be owned by the twist owner. When
|
|
107
|
+
* omitted, the server scopes the search across all of the owner's focuses.
|
|
109
108
|
*/
|
|
110
|
-
|
|
109
|
+
focusId?: string;
|
|
111
110
|
};
|
|
112
111
|
/**
|
|
113
112
|
* Built-in tool for interacting with the core Plot data layer.
|
|
114
113
|
*
|
|
115
114
|
* The Plot tool provides twists with the ability to create and manage threads,
|
|
116
|
-
*
|
|
115
|
+
* focuses, and contacts within the Plot system. This is the primary interface
|
|
117
116
|
* for twists to persist data and interact with the Plot database.
|
|
118
117
|
*
|
|
119
118
|
* @example
|
|
@@ -174,8 +173,8 @@ export declare abstract class Plot extends ITool {
|
|
|
174
173
|
* }],
|
|
175
174
|
* },
|
|
176
175
|
* link: true,
|
|
177
|
-
*
|
|
178
|
-
* access:
|
|
176
|
+
* focus: {
|
|
177
|
+
* access: FocusAccess.Full
|
|
179
178
|
* },
|
|
180
179
|
* contact: {
|
|
181
180
|
* access: ContactAccess.Read
|
|
@@ -218,14 +217,35 @@ export declare abstract class Plot extends ITool {
|
|
|
218
217
|
* ```
|
|
219
218
|
*/
|
|
220
219
|
intents?: NoteIntentHandler[];
|
|
220
|
+
/**
|
|
221
|
+
* Single conversational handler for mentions.
|
|
222
|
+
*
|
|
223
|
+
* When set, EVERY mention of this twist is routed directly to this
|
|
224
|
+
* handler — intent matching (and the built-in "What can you do?" /
|
|
225
|
+
* "Remove yourself" intents) is skipped. Use this to build a
|
|
226
|
+
* general-purpose conversational assistant that responds to any
|
|
227
|
+
* request, rather than classifying into a fixed set of `intents`.
|
|
228
|
+
*
|
|
229
|
+
* `handler` and `intents` are mutually exclusive; when both are
|
|
230
|
+
* present, `handler` takes precedence and `intents` is ignored.
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* ```typescript
|
|
234
|
+
* note: {
|
|
235
|
+
* defaultMention: true,
|
|
236
|
+
* handler: this.respond, // (note: Note) => Promise<void>
|
|
237
|
+
* }
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
240
|
+
handler?: (note: Note) => Promise<void>;
|
|
221
241
|
};
|
|
222
242
|
/** Enable link processing from connected source channels. */
|
|
223
243
|
link?: true | {
|
|
224
244
|
/** Access level for links. When omitted with `link: true`, only source channel links are accessible. */
|
|
225
245
|
access?: LinkAccess;
|
|
226
246
|
};
|
|
227
|
-
|
|
228
|
-
access?:
|
|
247
|
+
focus?: {
|
|
248
|
+
access?: FocusAccess;
|
|
229
249
|
};
|
|
230
250
|
contact?: {
|
|
231
251
|
access?: ContactAccess;
|
|
@@ -233,7 +253,7 @@ export declare abstract class Plot extends ITool {
|
|
|
233
253
|
/** Enable semantic search across notes and links owned by the twist's user. */
|
|
234
254
|
search?: true;
|
|
235
255
|
/**
|
|
236
|
-
* When true, admin write operations (on threads/notes/links/
|
|
256
|
+
* When true, admin write operations (on threads/notes/links/focuses not created by this twist)
|
|
237
257
|
* require user approval via plan actions instead of executing immediately.
|
|
238
258
|
* Read operations and operations on the twist's own content still work directly.
|
|
239
259
|
*/
|
|
@@ -275,8 +295,7 @@ export declare abstract class Plot extends ITool {
|
|
|
275
295
|
* For tags, provide a Record<number, boolean> where true adds a tag and false removes it.
|
|
276
296
|
* Tags not included in the update remain unchanged.
|
|
277
297
|
*
|
|
278
|
-
*
|
|
279
|
-
* maintain the correct hierarchical structure.
|
|
298
|
+
* Set `focus` to move the thread to a different focus.
|
|
280
299
|
*
|
|
281
300
|
* Scheduling is handled separately via `createSchedule()` / `updateSchedule()`.
|
|
282
301
|
*
|
|
@@ -435,40 +454,40 @@ export declare abstract class Plot extends ITool {
|
|
|
435
454
|
key: string;
|
|
436
455
|
}): Promise<Note | null>;
|
|
437
456
|
/**
|
|
438
|
-
* Creates a new
|
|
457
|
+
* Creates a new focus in the Plot system.
|
|
439
458
|
*
|
|
440
|
-
*
|
|
441
|
-
* The created
|
|
459
|
+
* Focuses serve as organizational containers for threads and twists.
|
|
460
|
+
* The created focus will be automatically assigned a unique ID.
|
|
442
461
|
*
|
|
443
|
-
* @param
|
|
444
|
-
* @returns Promise resolving to the complete created
|
|
462
|
+
* @param focus - The focus data to create
|
|
463
|
+
* @returns Promise resolving to the complete created focus
|
|
445
464
|
*/
|
|
446
|
-
abstract
|
|
465
|
+
abstract createFocus(focus: NewFocus): Promise<Focus & {
|
|
447
466
|
created: boolean;
|
|
448
467
|
}>;
|
|
449
468
|
/**
|
|
450
|
-
* Retrieves a
|
|
469
|
+
* Retrieves a focus by ID or key.
|
|
451
470
|
*
|
|
452
|
-
* Archived
|
|
471
|
+
* Archived focuses are included in the results.
|
|
453
472
|
*
|
|
454
|
-
* @param
|
|
455
|
-
* @returns Promise resolving to the matching
|
|
473
|
+
* @param focus - Focus lookup by ID or key
|
|
474
|
+
* @returns Promise resolving to the matching focus or null if not found
|
|
456
475
|
*/
|
|
457
|
-
abstract
|
|
476
|
+
abstract getFocus(focus: {
|
|
458
477
|
id: Uuid;
|
|
459
478
|
} | {
|
|
460
479
|
key: string;
|
|
461
|
-
}): Promise<
|
|
480
|
+
}): Promise<Focus | null>;
|
|
462
481
|
/**
|
|
463
|
-
* Updates an existing
|
|
482
|
+
* Updates an existing focus in the Plot system.
|
|
464
483
|
*
|
|
465
|
-
* The
|
|
484
|
+
* The focus is identified by either its ID or key.
|
|
466
485
|
* Only the fields specified in the update will be changed.
|
|
467
486
|
*
|
|
468
|
-
* @param update -
|
|
487
|
+
* @param update - Focus update containing ID/key and fields to change
|
|
469
488
|
* @returns Promise that resolves when the update is complete
|
|
470
489
|
*/
|
|
471
|
-
abstract
|
|
490
|
+
abstract updateFocus(update: FocusUpdate): Promise<void>;
|
|
472
491
|
/**
|
|
473
492
|
* Retrieves actors by their IDs.
|
|
474
493
|
*
|
|
@@ -553,12 +572,10 @@ export declare abstract class Plot extends ITool {
|
|
|
553
572
|
*/
|
|
554
573
|
abstract getThreads(options?: {
|
|
555
574
|
/**
|
|
556
|
-
*
|
|
557
|
-
* When omitted, defaults to the owner's
|
|
575
|
+
* Focus to list threads from. Must be owned by the twist owner.
|
|
576
|
+
* When omitted, defaults to the owner's Inbox.
|
|
558
577
|
*/
|
|
559
|
-
|
|
560
|
-
/** Include threads from descendant priorities. Default: true. */
|
|
561
|
-
includeDescendants?: boolean;
|
|
578
|
+
focusId?: Uuid;
|
|
562
579
|
/** Include archived threads. Default: false. */
|
|
563
580
|
includeArchived?: boolean;
|
|
564
581
|
/** Maximum number of threads to return. Default: 50, max: 200. */
|
|
@@ -567,24 +584,17 @@ export declare abstract class Plot extends ITool {
|
|
|
567
584
|
offset?: number;
|
|
568
585
|
}): Promise<Thread[]>;
|
|
569
586
|
/**
|
|
570
|
-
* Lists
|
|
587
|
+
* Lists focuses owned by the twist's user.
|
|
571
588
|
*
|
|
572
|
-
* Requires `
|
|
589
|
+
* Requires `FocusAccess.Full`.
|
|
573
590
|
*
|
|
574
|
-
* @param options - Query options for filtering
|
|
575
|
-
* @returns Promise resolving to array of
|
|
591
|
+
* @param options - Query options for filtering focuses
|
|
592
|
+
* @returns Promise resolving to array of focuses
|
|
576
593
|
*/
|
|
577
|
-
abstract
|
|
578
|
-
/**
|
|
579
|
-
* Parent priority to list children of. Must be owned by the twist
|
|
580
|
-
* owner. When omitted, defaults to the owner's root priority.
|
|
581
|
-
*/
|
|
582
|
-
parentId?: Uuid;
|
|
583
|
-
/** Include all descendants, not just direct children. Default: false. */
|
|
584
|
-
includeDescendants?: boolean;
|
|
585
|
-
/** Include archived priorities. Default: false. */
|
|
594
|
+
abstract getFocuses(options?: {
|
|
595
|
+
/** Include archived focuses. Default: false. */
|
|
586
596
|
includeArchived?: boolean;
|
|
587
|
-
}): Promise<
|
|
597
|
+
}): Promise<Focus[]>;
|
|
588
598
|
/**
|
|
589
599
|
* Updates a link.
|
|
590
600
|
*
|
package/dist/tools/plot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,EACL,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,
|
|
1
|
+
{"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,EACL,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,IAAI,EACL,MAAM,IAAI,CAAC;AACZ,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE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AG,MAAM;CACX"}
|
package/dist/tools/plot.js
CHANGED
|
@@ -14,26 +14,26 @@ export var ThreadAccess;
|
|
|
14
14
|
ThreadAccess[ThreadAccess["Create"] = 1] = "Create";
|
|
15
15
|
/**
|
|
16
16
|
* List/query all Threads owned by the twist's user.
|
|
17
|
-
* Update any Thread (title, tags, archived, type,
|
|
17
|
+
* Update any Thread (title, tags, archived, type, focus) regardless of creator.
|
|
18
18
|
* Create Notes on any Thread (not just own or mentioned).
|
|
19
19
|
* All Create permissions.
|
|
20
20
|
*/
|
|
21
21
|
ThreadAccess[ThreadAccess["Full"] = 2] = "Full";
|
|
22
22
|
})(ThreadAccess || (ThreadAccess = {}));
|
|
23
|
-
export var
|
|
24
|
-
(function (
|
|
23
|
+
export var FocusAccess;
|
|
24
|
+
(function (FocusAccess) {
|
|
25
25
|
/**
|
|
26
|
-
* Create new
|
|
27
|
-
* Update
|
|
26
|
+
* Create new Focuses for the twist owner.
|
|
27
|
+
* Update Focuses created by the twist.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
FocusAccess[FocusAccess["Create"] = 0] = "Create";
|
|
30
30
|
/**
|
|
31
|
-
* Read all
|
|
32
|
-
* Create new
|
|
33
|
-
* Update and archive any
|
|
31
|
+
* Read all Focuses owned by the twist's user.
|
|
32
|
+
* Create new Focuses for the twist owner.
|
|
33
|
+
* Update and archive any Focus owned by the twist's user.
|
|
34
34
|
*/
|
|
35
|
-
|
|
36
|
-
})(
|
|
35
|
+
FocusAccess[FocusAccess["Full"] = 1] = "Full";
|
|
36
|
+
})(FocusAccess || (FocusAccess = {}));
|
|
37
37
|
export var ContactAccess;
|
|
38
38
|
(function (ContactAccess) {
|
|
39
39
|
/** Read existing contact details. Without this, only the ID will be provided. */
|
|
@@ -54,7 +54,7 @@ export const SEARCH_MAX_LIMIT = 30;
|
|
|
54
54
|
* Built-in tool for interacting with the core Plot data layer.
|
|
55
55
|
*
|
|
56
56
|
* The Plot tool provides twists with the ability to create and manage threads,
|
|
57
|
-
*
|
|
57
|
+
* focuses, and contacts within the Plot system. This is the primary interface
|
|
58
58
|
* for twists to persist data and interact with the Plot database.
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
@@ -115,8 +115,8 @@ export class Plot extends ITool {
|
|
|
115
115
|
* }],
|
|
116
116
|
* },
|
|
117
117
|
* link: true,
|
|
118
|
-
*
|
|
119
|
-
* access:
|
|
118
|
+
* focus: {
|
|
119
|
+
* access: FocusAccess.Full
|
|
120
120
|
* },
|
|
121
121
|
* contact: {
|
|
122
122
|
* access: ContactAccess.Read
|
package/dist/tools/plot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plot.js","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,GAaN,MAAM,IAAI,CAAC;AAOZ,MAAM,CAAN,IAAY,YAmBX;AAnBD,WAAY,YAAY;IACtB;;;OAGG;IACH,qDAAO,CAAA;IACP;;;;OAIG;IACH,mDAAM,CAAA;IACN;;;;;OAKG;IACH,+CAAI,CAAA;AACN,CAAC,EAnBW,YAAY,KAAZ,YAAY,QAmBvB;AAED,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"plot.js","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,GAaN,MAAM,IAAI,CAAC;AAOZ,MAAM,CAAN,IAAY,YAmBX;AAnBD,WAAY,YAAY;IACtB;;;OAGG;IACH,qDAAO,CAAA;IACP;;;;OAIG;IACH,mDAAM,CAAA;IACN;;;;;OAKG;IACH,+CAAI,CAAA;AACN,CAAC,EAnBW,YAAY,KAAZ,YAAY,QAmBvB;AAED,MAAM,CAAN,IAAY,WAYX;AAZD,WAAY,WAAW;IACrB;;;OAGG;IACH,iDAAM,CAAA;IACN;;;;OAIG;IACH,6CAAI,CAAA;AACN,CAAC,EAZW,WAAW,KAAX,WAAW,QAYtB;AAED,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,iFAAiF;IACjF,iDAAI,CAAA;AACN,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,0DAA0D;IAC1D,2CAAI,CAAA;IACJ,6FAA6F;IAC7F,2CAAI,CAAA;AACN,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAmDD,gDAAgD;AAChD,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACvC,+CAA+C;AAC/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAcnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,OAAgB,IAAK,SAAQ,KAAK;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,MAAM,CAAU,OAAO,CA0ErB;CAgZH"}
|
package/dist/tools/twists.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export type Log = {
|
|
|
42
42
|
* },
|
|
43
43
|
* "plot": {
|
|
44
44
|
* "thread:mentioned": ["read", "write", "update"],
|
|
45
|
-
* "
|
|
45
|
+
* "focus": ["read", "write", "update"]
|
|
46
46
|
* }
|
|
47
47
|
* }
|
|
48
48
|
* ```
|
|
@@ -72,7 +72,7 @@ export type TwistPermissions = Record<string, Record<string, string[]>>;
|
|
|
72
72
|
*/
|
|
73
73
|
export declare abstract class Twists extends ITool {
|
|
74
74
|
/**
|
|
75
|
-
* Creates a new twist ID and grants access to people in the current
|
|
75
|
+
* Creates a new twist ID and grants access to people in the current focus.
|
|
76
76
|
*
|
|
77
77
|
* @returns Promise resolving to the generated twist ID
|
|
78
78
|
* @throws When twist creation fails
|
package/dist/twist.d.ts
CHANGED
|
@@ -9,9 +9,9 @@ import type { InferTools, ToolBuilder, ToolShed } from "./utils/types";
|
|
|
9
9
|
* Base class for all twists.
|
|
10
10
|
*
|
|
11
11
|
* A twist is installed at the workspace level and is owned by a single user
|
|
12
|
-
* (see `this.userId`). It has no inherent
|
|
13
|
-
* links it creates are filed against the owner's
|
|
14
|
-
*
|
|
12
|
+
* (see `this.userId`). It has no inherent focus scope: threads, notes, and
|
|
13
|
+
* links it creates are filed against the owner's focuses, with automatic
|
|
14
|
+
* focus matching when no explicit target is provided.
|
|
15
15
|
*
|
|
16
16
|
* Override `build()` to declare tool dependencies and lifecycle methods to
|
|
17
17
|
* handle events.
|
package/dist/twist.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Base class for all twists.
|
|
3
3
|
*
|
|
4
4
|
* A twist is installed at the workspace level and is owned by a single user
|
|
5
|
-
* (see `this.userId`). It has no inherent
|
|
6
|
-
* links it creates are filed against the owner's
|
|
7
|
-
*
|
|
5
|
+
* (see `this.userId`). It has no inherent focus scope: threads, notes, and
|
|
6
|
+
* links it creates are filed against the owner's focuses, with automatic
|
|
7
|
+
* focus matching when no explicit target is provided.
|
|
8
8
|
*
|
|
9
9
|
* Override `build()` to declare tool dependencies and lifecycle methods to
|
|
10
10
|
* handle events.
|