@plotday/twister 0.53.0 → 0.54.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 +19 -4
- package/dist/connector.d.ts.map +1 -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 +25 -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.ResolvedRecipient.html +13 -2
- package/dist/docs/types/index.Schedule.html +1 -1
- 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.ComposeConfig.html +4 -4
- package/dist/docs/types/tools_integrations.ContactRoleConfig.html +5 -5
- package/dist/docs/types/tools_integrations.LinkTypeConfig.html +14 -23
- 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 +7 -23
- 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 +19 -4
- 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 +7 -23
- 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
package/src/tools/ai.ts
CHANGED
|
@@ -69,8 +69,11 @@ export abstract class AI extends ITool {
|
|
|
69
69
|
* Returns which AI capabilities are currently available.
|
|
70
70
|
* Check this before calling prompt() or embed() to gracefully
|
|
71
71
|
* handle cases where AI is disabled by the user.
|
|
72
|
+
*
|
|
73
|
+
* Built-in tools are accessed as RPC stubs, so from a twist this call
|
|
74
|
+
* resolves asynchronously — always `await` it.
|
|
72
75
|
*/
|
|
73
|
-
abstract available(): AICapabilities
|
|
76
|
+
abstract available(): AICapabilities | Promise<AICapabilities>;
|
|
74
77
|
|
|
75
78
|
/**
|
|
76
79
|
* Sends a request to an AI model and returns the response using the Vercel AI SDK.
|
|
@@ -134,7 +137,7 @@ export abstract class AI extends ITool {
|
|
|
134
137
|
* tools: {
|
|
135
138
|
* getWeather: {
|
|
136
139
|
* description: "Get weather for a city",
|
|
137
|
-
*
|
|
140
|
+
* inputSchema: Type.Object({
|
|
138
141
|
* city: Type.String()
|
|
139
142
|
* }),
|
|
140
143
|
* execute: async ({ city }) => {
|
|
@@ -165,6 +168,12 @@ export type AICapabilities = {
|
|
|
165
168
|
prompt: boolean;
|
|
166
169
|
/** Whether AI embedding generation is available. */
|
|
167
170
|
embed: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Whether provider-native web search is available. True for Plot AI and
|
|
173
|
+
* Anthropic/Google BYOK providers; false for OpenAI/custom BYOK providers
|
|
174
|
+
* that don't expose a server-side web search tool through this runtime.
|
|
175
|
+
*/
|
|
176
|
+
webSearch: boolean;
|
|
168
177
|
};
|
|
169
178
|
|
|
170
179
|
/**
|
|
@@ -345,6 +354,31 @@ export interface AIRequest<
|
|
|
345
354
|
* Controls diversity by limiting to top probability tokens.
|
|
346
355
|
*/
|
|
347
356
|
topP?: number;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Enable provider-native web search so the model can retrieve
|
|
360
|
+
* up-to-date information from the web. The search is executed
|
|
361
|
+
* server-side by the provider and any pages used are returned in
|
|
362
|
+
* {@link AIResponse.sources}.
|
|
363
|
+
*
|
|
364
|
+
* Only available on web-search-capable providers (Anthropic and
|
|
365
|
+
* Google). Check {@link AICapabilities.webSearch} via `available()`
|
|
366
|
+
* before relying on it; on unsupported providers the flag is ignored.
|
|
367
|
+
*
|
|
368
|
+
* Pass `true` for defaults, or an object to cap the number of searches.
|
|
369
|
+
*/
|
|
370
|
+
webSearch?: boolean | { maxUses?: number };
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Maximum number of sequential generation steps for agentic tool use.
|
|
374
|
+
* When the model calls a tool, its result is fed back and the model is
|
|
375
|
+
* called again, up to `maxSteps` times, until it produces a final answer.
|
|
376
|
+
*
|
|
377
|
+
* Defaults to 1 (single step — tool calls are returned but not looped),
|
|
378
|
+
* preserving prior behavior. Set higher (e.g. 6) to let the model chain
|
|
379
|
+
* tool calls into a final answer.
|
|
380
|
+
*/
|
|
381
|
+
maxSteps?: number;
|
|
348
382
|
}
|
|
349
383
|
|
|
350
384
|
/**
|
|
@@ -742,17 +776,19 @@ export interface ToolExecutionOptions {
|
|
|
742
776
|
*/
|
|
743
777
|
export type AITool<PARAMETERS extends ToolParameters = any, RESULT = any> = {
|
|
744
778
|
/**
|
|
745
|
-
* The schema of the input that the tool expects
|
|
746
|
-
*
|
|
747
|
-
* Use descriptions to make the input
|
|
779
|
+
* The schema of the input that the tool expects, expressed as a Typebox
|
|
780
|
+
* schema. The language model uses this to generate (and the runtime to
|
|
781
|
+
* validate) the tool input. Use field descriptions to make the input
|
|
782
|
+
* understandable for the model.
|
|
783
|
+
*
|
|
784
|
+
* This is the canonical field read by the runtime. `parameters` is an
|
|
785
|
+
* accepted alias for backwards compatibility.
|
|
748
786
|
*/
|
|
749
|
-
|
|
787
|
+
inputSchema: TSchema;
|
|
750
788
|
/**
|
|
751
|
-
*
|
|
752
|
-
* It is also used to validate the output of the language model.
|
|
753
|
-
* Use descriptions to make the input understandable for the language model.
|
|
789
|
+
* @deprecated Alias for {@link inputSchema}. Prefer `inputSchema`.
|
|
754
790
|
*/
|
|
755
|
-
|
|
791
|
+
parameters?: PARAMETERS;
|
|
756
792
|
/**
|
|
757
793
|
* An optional description of what the tool does.
|
|
758
794
|
* Will be used by the language model to decide whether to use the tool.
|
package/src/tools/files.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { ITool } from "..";
|
|
|
14
14
|
*/
|
|
15
15
|
export abstract class Files extends ITool {
|
|
16
16
|
/**
|
|
17
|
-
* Read a file uploaded by a client and attached to a note in a
|
|
17
|
+
* Read a file uploaded by a client and attached to a note in a focus
|
|
18
18
|
* where this twist is installed.
|
|
19
19
|
*
|
|
20
20
|
* @param fileId The id from an ActionType.file action.
|
|
@@ -62,27 +62,11 @@ export type LinkTypeConfig = {
|
|
|
62
62
|
*/
|
|
63
63
|
active?: boolean;
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*/
|
|
71
|
-
task?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Mark the thread `to_read=true` in Plot when a link enters this status.
|
|
74
|
-
* Use for connectors that explicitly track read-later state (Pocket
|
|
75
|
-
* archives, Slack "remind me", etc).
|
|
76
|
-
*/
|
|
77
|
-
toRead?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* @deprecated Use `active` (messaging) or `task` (project tracker) instead.
|
|
80
|
-
* Treated as `task: true` for backward compatibility.
|
|
81
|
-
*
|
|
82
|
-
* Original meaning: whether this status represents the connector's
|
|
83
|
-
* "to-do" / active state. When a user adds a thread to Plot's agenda,
|
|
84
|
-
* done-status links flip to the status marked `todo: true` (e.g.,
|
|
85
|
-
* Gmail's "starred", Linear's "todo").
|
|
65
|
+
* Marks this status as the connector's "to-do" / active state. When a
|
|
66
|
+
* user brings a done thread back into Plot's agenda, done-status links
|
|
67
|
+
* are flipped to the status marked `todo: true` (e.g. Gmail's "starred",
|
|
68
|
+
* Linear's "unstarted"); connectors that don't mark one fall back to the
|
|
69
|
+
* first non-done status.
|
|
86
70
|
*/
|
|
87
71
|
todo?: boolean;
|
|
88
72
|
}>;
|
|
@@ -316,7 +300,7 @@ export abstract class Integrations extends ITool {
|
|
|
316
300
|
abstract get(provider: AuthProvider, channelId: string): Promise<AuthToken | null>;
|
|
317
301
|
|
|
318
302
|
/**
|
|
319
|
-
* Saves a link with notes to the connector's
|
|
303
|
+
* Saves a link with notes to the connector's focus.
|
|
320
304
|
*
|
|
321
305
|
* Creates a thread+link pair. The thread is a lightweight container;
|
|
322
306
|
* the link holds the external entity data (source, meta, type, status, etc.).
|
|
@@ -355,7 +339,7 @@ export abstract class Integrations extends ITool {
|
|
|
355
339
|
abstract saveLinks(links: NewLinkWithNotes[]): Promise<(Uuid | null)[]>;
|
|
356
340
|
|
|
357
341
|
/**
|
|
358
|
-
* Upserts contacts into the connector's
|
|
342
|
+
* Upserts contacts into the connector's focus without requiring a Link.
|
|
359
343
|
*
|
|
360
344
|
* Use this for messaging connectors to bulk-sync workspace members so the
|
|
361
345
|
* recipient picker can filter contacts by reachable platform account. Populate
|
package/src/tools/plot.ts
CHANGED
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
type NewThread,
|
|
11
11
|
type NewThreadWithNotes,
|
|
12
12
|
type NewNote,
|
|
13
|
-
type
|
|
13
|
+
type NewFocus,
|
|
14
14
|
type Note,
|
|
15
15
|
type NoteUpdate,
|
|
16
16
|
type PlanOperation,
|
|
17
|
-
type
|
|
18
|
-
type
|
|
17
|
+
type Focus,
|
|
18
|
+
type FocusUpdate,
|
|
19
19
|
Uuid,
|
|
20
20
|
} from "..";
|
|
21
21
|
import {
|
|
@@ -38,23 +38,23 @@ export enum ThreadAccess {
|
|
|
38
38
|
Create,
|
|
39
39
|
/**
|
|
40
40
|
* List/query all Threads owned by the twist's user.
|
|
41
|
-
* Update any Thread (title, tags, archived, type,
|
|
41
|
+
* Update any Thread (title, tags, archived, type, focus) regardless of creator.
|
|
42
42
|
* Create Notes on any Thread (not just own or mentioned).
|
|
43
43
|
* All Create permissions.
|
|
44
44
|
*/
|
|
45
45
|
Full,
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export enum
|
|
48
|
+
export enum FocusAccess {
|
|
49
49
|
/**
|
|
50
|
-
* Create new
|
|
51
|
-
* Update
|
|
50
|
+
* Create new Focuses for the twist owner.
|
|
51
|
+
* Update Focuses created by the twist.
|
|
52
52
|
*/
|
|
53
53
|
Create,
|
|
54
54
|
/**
|
|
55
|
-
* Read all
|
|
56
|
-
* Create new
|
|
57
|
-
* Update and archive any
|
|
55
|
+
* Read all Focuses owned by the twist's user.
|
|
56
|
+
* Create new Focuses for the twist owner.
|
|
57
|
+
* Update and archive any Focus owned by the twist's user.
|
|
58
58
|
*/
|
|
59
59
|
Full,
|
|
60
60
|
}
|
|
@@ -100,7 +100,7 @@ export type LinkFilter = {
|
|
|
100
100
|
|
|
101
101
|
type SearchResultBase = {
|
|
102
102
|
thread: { id: string; title: string | null };
|
|
103
|
-
|
|
103
|
+
focus: { id: string; title: string | null };
|
|
104
104
|
similarity: number;
|
|
105
105
|
};
|
|
106
106
|
|
|
@@ -131,18 +131,17 @@ export type SearchOptions = {
|
|
|
131
131
|
/** Minimum similarity score 0-1 (default: 0.3) */
|
|
132
132
|
threshold?: number;
|
|
133
133
|
/**
|
|
134
|
-
* Scope search to this
|
|
135
|
-
*
|
|
136
|
-
* priority tree.
|
|
134
|
+
* Scope search to this focus. Must be owned by the twist owner. When
|
|
135
|
+
* omitted, the server scopes the search across all of the owner's focuses.
|
|
137
136
|
*/
|
|
138
|
-
|
|
137
|
+
focusId?: string;
|
|
139
138
|
};
|
|
140
139
|
|
|
141
140
|
/**
|
|
142
141
|
* Built-in tool for interacting with the core Plot data layer.
|
|
143
142
|
*
|
|
144
143
|
* The Plot tool provides twists with the ability to create and manage threads,
|
|
145
|
-
*
|
|
144
|
+
* focuses, and contacts within the Plot system. This is the primary interface
|
|
146
145
|
* for twists to persist data and interact with the Plot database.
|
|
147
146
|
*
|
|
148
147
|
* @example
|
|
@@ -203,8 +202,8 @@ export abstract class Plot extends ITool {
|
|
|
203
202
|
* }],
|
|
204
203
|
* },
|
|
205
204
|
* link: true,
|
|
206
|
-
*
|
|
207
|
-
* access:
|
|
205
|
+
* focus: {
|
|
206
|
+
* access: FocusAccess.Full
|
|
208
207
|
* },
|
|
209
208
|
* contact: {
|
|
210
209
|
* access: ContactAccess.Read
|
|
@@ -247,14 +246,35 @@ export abstract class Plot extends ITool {
|
|
|
247
246
|
* ```
|
|
248
247
|
*/
|
|
249
248
|
intents?: NoteIntentHandler[];
|
|
249
|
+
/**
|
|
250
|
+
* Single conversational handler for mentions.
|
|
251
|
+
*
|
|
252
|
+
* When set, EVERY mention of this twist is routed directly to this
|
|
253
|
+
* handler — intent matching (and the built-in "What can you do?" /
|
|
254
|
+
* "Remove yourself" intents) is skipped. Use this to build a
|
|
255
|
+
* general-purpose conversational assistant that responds to any
|
|
256
|
+
* request, rather than classifying into a fixed set of `intents`.
|
|
257
|
+
*
|
|
258
|
+
* `handler` and `intents` are mutually exclusive; when both are
|
|
259
|
+
* present, `handler` takes precedence and `intents` is ignored.
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* ```typescript
|
|
263
|
+
* note: {
|
|
264
|
+
* defaultMention: true,
|
|
265
|
+
* handler: this.respond, // (note: Note) => Promise<void>
|
|
266
|
+
* }
|
|
267
|
+
* ```
|
|
268
|
+
*/
|
|
269
|
+
handler?: (note: Note) => Promise<void>;
|
|
250
270
|
};
|
|
251
271
|
/** Enable link processing from connected source channels. */
|
|
252
272
|
link?: true | {
|
|
253
273
|
/** Access level for links. When omitted with `link: true`, only source channel links are accessible. */
|
|
254
274
|
access?: LinkAccess;
|
|
255
275
|
};
|
|
256
|
-
|
|
257
|
-
access?:
|
|
276
|
+
focus?: {
|
|
277
|
+
access?: FocusAccess;
|
|
258
278
|
};
|
|
259
279
|
contact?: {
|
|
260
280
|
access?: ContactAccess;
|
|
@@ -262,7 +282,7 @@ export abstract class Plot extends ITool {
|
|
|
262
282
|
/** Enable semantic search across notes and links owned by the twist's user. */
|
|
263
283
|
search?: true;
|
|
264
284
|
/**
|
|
265
|
-
* When true, admin write operations (on threads/notes/links/
|
|
285
|
+
* When true, admin write operations (on threads/notes/links/focuses not created by this twist)
|
|
266
286
|
* require user approval via plan actions instead of executing immediately.
|
|
267
287
|
* Read operations and operations on the twist's own content still work directly.
|
|
268
288
|
*/
|
|
@@ -313,8 +333,7 @@ export abstract class Plot extends ITool {
|
|
|
313
333
|
* For tags, provide a Record<number, boolean> where true adds a tag and false removes it.
|
|
314
334
|
* Tags not included in the update remain unchanged.
|
|
315
335
|
*
|
|
316
|
-
*
|
|
317
|
-
* maintain the correct hierarchical structure.
|
|
336
|
+
* Set `focus` to move the thread to a different focus.
|
|
318
337
|
*
|
|
319
338
|
* Scheduling is handled separately via `createSchedule()` / `updateSchedule()`.
|
|
320
339
|
*
|
|
@@ -481,41 +500,41 @@ export abstract class Plot extends ITool {
|
|
|
481
500
|
abstract getNote(note: { id: Uuid } | { key: string }): Promise<Note | null>;
|
|
482
501
|
|
|
483
502
|
/**
|
|
484
|
-
* Creates a new
|
|
503
|
+
* Creates a new focus in the Plot system.
|
|
485
504
|
*
|
|
486
|
-
*
|
|
487
|
-
* The created
|
|
505
|
+
* Focuses serve as organizational containers for threads and twists.
|
|
506
|
+
* The created focus will be automatically assigned a unique ID.
|
|
488
507
|
*
|
|
489
|
-
* @param
|
|
490
|
-
* @returns Promise resolving to the complete created
|
|
508
|
+
* @param focus - The focus data to create
|
|
509
|
+
* @returns Promise resolving to the complete created focus
|
|
491
510
|
*/
|
|
492
511
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
493
|
-
abstract
|
|
512
|
+
abstract createFocus(focus: NewFocus): Promise<Focus & { created: boolean }>;
|
|
494
513
|
|
|
495
514
|
/**
|
|
496
|
-
* Retrieves a
|
|
515
|
+
* Retrieves a focus by ID or key.
|
|
497
516
|
*
|
|
498
|
-
* Archived
|
|
517
|
+
* Archived focuses are included in the results.
|
|
499
518
|
*
|
|
500
|
-
* @param
|
|
501
|
-
* @returns Promise resolving to the matching
|
|
519
|
+
* @param focus - Focus lookup by ID or key
|
|
520
|
+
* @returns Promise resolving to the matching focus or null if not found
|
|
502
521
|
*/
|
|
503
522
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
504
|
-
abstract
|
|
505
|
-
|
|
506
|
-
): Promise<
|
|
523
|
+
abstract getFocus(
|
|
524
|
+
focus: { id: Uuid } | { key: string }
|
|
525
|
+
): Promise<Focus | null>;
|
|
507
526
|
|
|
508
527
|
/**
|
|
509
|
-
* Updates an existing
|
|
528
|
+
* Updates an existing focus in the Plot system.
|
|
510
529
|
*
|
|
511
|
-
* The
|
|
530
|
+
* The focus is identified by either its ID or key.
|
|
512
531
|
* Only the fields specified in the update will be changed.
|
|
513
532
|
*
|
|
514
|
-
* @param update -
|
|
533
|
+
* @param update - Focus update containing ID/key and fields to change
|
|
515
534
|
* @returns Promise that resolves when the update is complete
|
|
516
535
|
*/
|
|
517
536
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
518
|
-
abstract
|
|
537
|
+
abstract updateFocus(update: FocusUpdate): Promise<void>;
|
|
519
538
|
|
|
520
539
|
/**
|
|
521
540
|
* Retrieves actors by their IDs.
|
|
@@ -611,12 +630,10 @@ export abstract class Plot extends ITool {
|
|
|
611
630
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
612
631
|
abstract getThreads(options?: {
|
|
613
632
|
/**
|
|
614
|
-
*
|
|
615
|
-
* When omitted, defaults to the owner's
|
|
633
|
+
* Focus to list threads from. Must be owned by the twist owner.
|
|
634
|
+
* When omitted, defaults to the owner's Inbox.
|
|
616
635
|
*/
|
|
617
|
-
|
|
618
|
-
/** Include threads from descendant priorities. Default: true. */
|
|
619
|
-
includeDescendants?: boolean;
|
|
636
|
+
focusId?: Uuid;
|
|
620
637
|
/** Include archived threads. Default: false. */
|
|
621
638
|
includeArchived?: boolean;
|
|
622
639
|
/** Maximum number of threads to return. Default: 50, max: 200. */
|
|
@@ -626,25 +643,18 @@ export abstract class Plot extends ITool {
|
|
|
626
643
|
}): Promise<Thread[]>;
|
|
627
644
|
|
|
628
645
|
/**
|
|
629
|
-
* Lists
|
|
646
|
+
* Lists focuses owned by the twist's user.
|
|
630
647
|
*
|
|
631
|
-
* Requires `
|
|
648
|
+
* Requires `FocusAccess.Full`.
|
|
632
649
|
*
|
|
633
|
-
* @param options - Query options for filtering
|
|
634
|
-
* @returns Promise resolving to array of
|
|
650
|
+
* @param options - Query options for filtering focuses
|
|
651
|
+
* @returns Promise resolving to array of focuses
|
|
635
652
|
*/
|
|
636
653
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
637
|
-
abstract
|
|
638
|
-
/**
|
|
639
|
-
* Parent priority to list children of. Must be owned by the twist
|
|
640
|
-
* owner. When omitted, defaults to the owner's root priority.
|
|
641
|
-
*/
|
|
642
|
-
parentId?: Uuid;
|
|
643
|
-
/** Include all descendants, not just direct children. Default: false. */
|
|
644
|
-
includeDescendants?: boolean;
|
|
645
|
-
/** Include archived priorities. Default: false. */
|
|
654
|
+
abstract getFocuses(options?: {
|
|
655
|
+
/** Include archived focuses. Default: false. */
|
|
646
656
|
includeArchived?: boolean;
|
|
647
|
-
}): Promise<
|
|
657
|
+
}): Promise<Focus[]>;
|
|
648
658
|
|
|
649
659
|
/**
|
|
650
660
|
* Updates a link.
|
package/src/tools/twists.ts
CHANGED
|
@@ -46,7 +46,7 @@ export type Log = {
|
|
|
46
46
|
* },
|
|
47
47
|
* "plot": {
|
|
48
48
|
* "thread:mentioned": ["read", "write", "update"],
|
|
49
|
-
* "
|
|
49
|
+
* "focus": ["read", "write", "update"]
|
|
50
50
|
* }
|
|
51
51
|
* }
|
|
52
52
|
* ```
|
|
@@ -77,7 +77,7 @@ export type TwistPermissions = Record<string, Record<string, string[]>>;
|
|
|
77
77
|
*/
|
|
78
78
|
export abstract class Twists extends ITool {
|
|
79
79
|
/**
|
|
80
|
-
* Creates a new twist ID and grants access to people in the current
|
|
80
|
+
* Creates a new twist ID and grants access to people in the current focus.
|
|
81
81
|
*
|
|
82
82
|
* @returns Promise resolving to the generated twist ID
|
|
83
83
|
* @throws When twist creation fails
|
package/src/twist.ts
CHANGED
|
@@ -10,9 +10,9 @@ import type { InferTools, ToolBuilder, ToolShed } from "./utils/types";
|
|
|
10
10
|
* Base class for all twists.
|
|
11
11
|
*
|
|
12
12
|
* A twist is installed at the workspace level and is owned by a single user
|
|
13
|
-
* (see `this.userId`). It has no inherent
|
|
14
|
-
* links it creates are filed against the owner's
|
|
15
|
-
*
|
|
13
|
+
* (see `this.userId`). It has no inherent focus scope: threads, notes, and
|
|
14
|
+
* links it creates are filed against the owner's focuses, with automatic
|
|
15
|
+
* focus matching when no explicit target is provided.
|
|
16
16
|
*
|
|
17
17
|
* Override `build()` to declare tool dependencies and lifecycle methods to
|
|
18
18
|
* handle events.
|
|
@@ -1,15 +0,0 @@
|
|
|
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>NewPriority | 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">NewPriority</a></li></ul><h1>Type Alias NewPriority</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">NewPriority</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Pick</span><span class="tsd-signature-symbol"><</span><a href="plot.Priority.html" class="tsd-signature-type tsd-kind-type-alias">Priority</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">"title"</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><span class="tsd-signature-type">Omit</span><span class="tsd-signature-symbol"><</span><a href="plot.Priority.html" class="tsd-signature-type tsd-kind-type-alias">Priority</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">"id"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"title"</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">&</span> (<br/> <span class="tsd-signature-symbol">{</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><br/> <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><br/> <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-kind-property">parent</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></div><div class="tsd-comment tsd-typography"><p>Type for creating new priorities.</p>
|
|
2
|
-
<p>Supports multiple creation patterns:</p>
|
|
3
|
-
<ul>
|
|
4
|
-
<li>Provide a specific UUID for the priority</li>
|
|
5
|
-
<li>Provide a key for upsert within the user's priorities</li>
|
|
6
|
-
<li>Omit both to auto-generate a new UUID</li>
|
|
7
|
-
</ul>
|
|
8
|
-
<p>Optionally specify a parent priority by ID or key for hierarchical structures.</p>
|
|
9
|
-
</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><ul class="tsd-parameters"><li class="tsd-parameter"><h5><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></h5><div class="tsd-comment tsd-typography"><p>Unique identifier for the priority, generated by Uuid.Generate().
|
|
10
|
-
Specifying an ID allows tools to track and upsert priorities.</p>
|
|
11
|
-
</div></li></ul></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><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">key</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Unique key for the priority within the user's priorities.
|
|
12
|
-
Can be used to upsert without knowing the UUID.
|
|
13
|
-
For example, "@plot" identifies the Plot priority.</p>
|
|
14
|
-
</div></li></ul></li><li><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">parent</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></h5><div class="tsd-comment tsd-typography"><p>Add the new priority as the child of another priority</p>
|
|
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#L132">plot.ts:132</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>
|
|
@@ -1,15 +0,0 @@
|
|
|
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>Priority | 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">Priority</a></li></ul><h1>Type Alias Priority</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Represents a priority context within Plot.</p>
|
|
2
|
-
<p>Priorities are similar to projects in other apps. All Activity is in a Priority.
|
|
3
|
-
Priorities can be nested.</p>
|
|
4
|
-
</div></section><div class="tsd-signature"><span class="tsd-signature-keyword">type</span> <span class="tsd-kind-type-alias">Priority</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#id">id</a><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><br/> <a class="tsd-kind-property" href="#title">title</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#archived">archived</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#key">key</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#color">color</a><span class="tsd-signature-symbol">:</span> <a href="../enums/plot.ThemeColor.html" class="tsd-signature-type tsd-kind-enum">ThemeColor</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L106">plot.ts:106</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="#id" 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>id</span></a>
|
|
5
|
-
<a href="#title" 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>title</span></a>
|
|
6
|
-
<a href="#archived" 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>archived</span></a>
|
|
7
|
-
<a href="#key" 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>key</span></a>
|
|
8
|
-
<a href="#color" 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>color</span></a>
|
|
9
|
-
</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="id"><span>id</span><a href="#id" 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">id</span><span class="tsd-signature-symbol">:</span> <a href="index.Uuid.html" class="tsd-signature-type tsd-kind-type-alias">Uuid</a></div><div class="tsd-comment tsd-typography"><p>Unique identifier for the priority</p>
|
|
10
|
-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L108">plot.ts:108</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="title"><span>title</span><a href="#title" 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">title</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Human-readable title for the priority</p>
|
|
11
|
-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L110">plot.ts:110</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="archived"><span>archived</span><a href="#archived" 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">archived</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Whether this priority has been archived</p>
|
|
12
|
-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L112">plot.ts:112</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="key"><span>key</span><a href="#key" 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">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-type">null</span></div><div class="tsd-comment tsd-typography"><p>Optional key for referencing this priority.
|
|
13
|
-
Keys are unique per priority tree (a user's personal priorities or the root of a shared priority).</p>
|
|
14
|
-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L117">plot.ts:117</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="color"><span>color</span><a href="#color" 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">color</span><span class="tsd-signature-symbol">:</span> <a href="../enums/plot.ThemeColor.html" class="tsd-signature-type tsd-kind-enum">ThemeColor</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></div><div class="tsd-comment tsd-typography"><p>Optional theme color for the priority (0-7). If not set, inherits from parent or defaults to 7 (Resolution).</p>
|
|
15
|
-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/plotday/plot/blob/main/twist/twister/src/plot.ts#L119">plot.ts:119</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="#id"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id</span></a><a href="#title"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>title</span></a><a href="#archived"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>archived</span></a><a href="#key"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>key</span></a><a href="#color"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>color</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>
|
|
@@ -1,5 +0,0 @@
|
|
|
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>PriorityUpdate | 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">PriorityUpdate</a></li></ul><h1>Type Alias PriorityUpdate</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">PriorityUpdate</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.Priority.html" class="tsd-signature-type tsd-kind-type-alias">Priority</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">"title"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"archived"</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> <span class="tsd-kind-property">parent</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></div><div class="tsd-comment tsd-typography"><p>Type for updating existing priorities.
|
|
2
|
-
Must provide either id or key to identify the priority to update.
|
|
3
|
-
Set <code>parent</code> to move the priority under a new parent (requires PriorityAccess.Full).</p>
|
|
4
|
-
</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">parent</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></h5><div class="tsd-comment tsd-typography"><p>Move the priority under a new parent. Requires PriorityAccess.Full.</p>
|
|
5
|
-
</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#L163">plot.ts:163</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>
|