@plotday/twister 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/bin/commands/create.js +37 -3
- package/bin/commands/create.js.map +1 -1
- package/bin/commands/deploy.js +4 -0
- package/bin/commands/deploy.js.map +1 -1
- package/bin/index.js +1 -0
- package/bin/index.js.map +1 -1
- package/bin/templates/AGENTS.template.md +101 -189
- package/bin/templates/README.template.md +2 -23
- package/cli/templates/AGENTS.template.md +101 -189
- package/cli/templates/README.template.md +2 -23
- 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.Options.html +1 -1
- package/dist/docs/classes/index.Source.html +200 -0
- package/dist/docs/classes/tool.ITool.html +1 -1
- package/dist/docs/classes/tool.Tool.html +21 -21
- package/dist/docs/classes/tools_ai.AI.html +1 -1
- package/dist/docs/classes/tools_callbacks.Callbacks.html +2 -2
- package/dist/docs/classes/tools_integrations.Integrations.html +45 -16
- package/dist/docs/classes/tools_network.Network.html +1 -1
- package/dist/docs/classes/tools_plot.Plot.html +93 -60
- 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 +1 -1
- package/dist/docs/classes/twist.Twist.html +42 -10
- package/dist/docs/documents/Building_Sources.html +137 -0
- package/dist/docs/documents/Built-in_Tools.html +11 -2
- package/dist/docs/documents/Core_Concepts.html +5 -10
- package/dist/docs/documents/Getting_Started.html +1 -1
- package/dist/docs/enums/{plot.ActivityLinkType.html → plot.ActionType.html} +10 -8
- package/dist/docs/enums/plot.ActorType.html +7 -7
- package/dist/docs/enums/plot.ConferencingProvider.html +6 -6
- package/dist/docs/enums/plot.ThemeColor.html +9 -9
- package/dist/docs/enums/tag.Tag.html +3 -10
- package/dist/docs/enums/tools_integrations.AuthProvider.html +11 -11
- package/dist/docs/enums/tools_plot.ContactAccess.html +3 -3
- package/dist/docs/enums/tools_plot.PriorityAccess.html +3 -3
- package/dist/docs/enums/{tools_plot.ActivityAccess.html → tools_plot.ThreadAccess.html} +6 -6
- package/dist/docs/hierarchy.html +1 -1
- package/dist/docs/index.html +5 -6
- package/dist/docs/media/AGENTS.md +910 -0
- package/dist/docs/media/MULTI_USER_AUTH.md +111 -0
- package/dist/docs/media/SYNC_STRATEGIES.md +7 -7
- package/dist/docs/modules/index.html +1 -1
- package/dist/docs/modules/plot.html +1 -1
- package/dist/docs/modules/tool.html +1 -1
- package/dist/docs/modules/tools_integrations.html +1 -1
- package/dist/docs/modules/tools_plot.html +1 -1
- package/dist/docs/modules.html +1 -1
- package/dist/docs/types/index.NewSchedule.html +33 -0
- package/dist/docs/types/index.NewScheduleContact.html +5 -0
- package/dist/docs/types/index.NewScheduleOccurrence.html +6 -0
- package/dist/docs/types/index.Schedule.html +37 -0
- package/dist/docs/types/index.ScheduleContact.html +5 -0
- package/dist/docs/types/index.ScheduleContactRole.html +1 -0
- package/dist/docs/types/index.ScheduleContactStatus.html +1 -0
- package/dist/docs/types/index.ScheduleOccurrence.html +17 -0
- package/dist/docs/types/index.ScheduleOccurrenceUpdate.html +2 -0
- package/dist/docs/types/plot.Action.html +28 -0
- package/dist/docs/types/plot.Actor.html +6 -6
- package/dist/docs/types/plot.ActorId.html +1 -1
- package/dist/docs/types/plot.ContentType.html +1 -1
- package/dist/docs/types/plot.Link.html +36 -0
- package/dist/docs/types/plot.NewActor.html +1 -1
- package/dist/docs/types/plot.NewContact.html +5 -5
- package/dist/docs/types/plot.NewLink.html +26 -0
- package/dist/docs/types/plot.NewLinkWithNotes.html +7 -0
- package/dist/docs/types/plot.NewNote.html +10 -10
- package/dist/docs/types/plot.NewPriority.html +1 -1
- package/dist/docs/types/plot.NewTags.html +1 -1
- package/dist/docs/types/plot.NewThread.html +27 -0
- package/dist/docs/types/plot.NewThreadWithNotes.html +1 -0
- package/dist/docs/types/plot.Note.html +9 -8
- package/dist/docs/types/plot.NoteUpdate.html +2 -2
- package/dist/docs/types/plot.PickPriorityConfig.html +8 -10
- package/dist/docs/types/plot.Priority.html +6 -6
- package/dist/docs/types/plot.PriorityUpdate.html +1 -1
- package/dist/docs/types/plot.Tags.html +1 -1
- package/dist/docs/types/plot.Thread.html +1 -0
- package/dist/docs/types/plot.ThreadCommon.html +17 -0
- package/dist/docs/types/plot.ThreadFilter.html +2 -0
- package/dist/docs/types/plot.ThreadMeta.html +11 -0
- package/dist/docs/types/plot.ThreadUpdate.html +3 -0
- package/dist/docs/types/plot.ThreadWithNotes.html +1 -0
- package/dist/docs/types/tools_integrations.ArchiveLinkFilter.html +11 -0
- 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 +11 -0
- package/dist/docs/types/tools_integrations.LinkTypeConfig.html +17 -0
- package/dist/docs/types/tools_plot.LinkFilter.html +10 -0
- package/dist/docs/types/tools_plot.LinkSearchResult.html +1 -0
- package/dist/docs/types/tools_plot.NoteIntentHandler.html +6 -6
- package/dist/docs/types/tools_plot.NoteSearchResult.html +1 -0
- package/dist/docs/types/tools_plot.SearchOptions.html +7 -0
- package/dist/docs/types/tools_plot.SearchResult.html +1 -0
- package/dist/docs/types/tools_twists.TwistPermissions.html +1 -1
- package/dist/docs/variables/tools_plot.SEARCH_DEFAULT_LIMIT.html +2 -0
- package/dist/docs/variables/tools_plot.SEARCH_MAX_LIMIT.html +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/llm-docs/index.d.ts.map +1 -1
- package/dist/llm-docs/index.js +4 -8
- package/dist/llm-docs/index.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 +9 -0
- package/dist/llm-docs/schedule.d.ts.map +1 -0
- package/dist/llm-docs/schedule.js +8 -0
- package/dist/llm-docs/schedule.js.map +1 -0
- package/dist/llm-docs/source.d.ts +9 -0
- package/dist/llm-docs/source.d.ts.map +1 -0
- package/dist/llm-docs/source.js +8 -0
- package/dist/llm-docs/source.js.map +1 -0
- package/dist/llm-docs/tag.d.ts +1 -1
- package/dist/llm-docs/tag.d.ts.map +1 -1
- package/dist/llm-docs/tag.js +1 -1
- package/dist/llm-docs/tag.js.map +1 -1
- package/dist/llm-docs/tool.d.ts +1 -1
- package/dist/llm-docs/tool.d.ts.map +1 -1
- package/dist/llm-docs/tool.js +1 -1
- package/dist/llm-docs/tool.js.map +1 -1
- package/dist/llm-docs/tools/callbacks.d.ts +1 -1
- package/dist/llm-docs/tools/callbacks.d.ts.map +1 -1
- package/dist/llm-docs/tools/callbacks.js +1 -1
- package/dist/llm-docs/tools/callbacks.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-guide-template.d.ts +1 -1
- package/dist/llm-docs/twist-guide-template.d.ts.map +1 -1
- package/dist/llm-docs/twist-guide-template.js +1 -1
- package/dist/llm-docs/twist-guide-template.js.map +1 -1
- package/dist/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 +264 -589
- package/dist/plot.d.ts.map +1 -1
- package/dist/plot.js +18 -49
- package/dist/plot.js.map +1 -1
- package/dist/schedule.d.ts +172 -0
- package/dist/schedule.d.ts.map +1 -0
- package/dist/schedule.js +2 -0
- package/dist/schedule.js.map +1 -0
- package/dist/source.d.ts +158 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +144 -0
- package/dist/source.js.map +1 -0
- package/dist/tag.d.ts +3 -10
- package/dist/tag.d.ts.map +1 -1
- package/dist/tag.js +2 -11
- package/dist/tag.js.map +1 -1
- package/dist/tool.d.ts +1 -15
- package/dist/tool.d.ts.map +1 -1
- package/dist/tool.js.map +1 -1
- package/dist/tools/callbacks.d.ts +1 -1
- package/dist/tools/callbacks.js +1 -1
- package/dist/tools/integrations.d.ts +119 -52
- package/dist/tools/integrations.d.ts.map +1 -1
- package/dist/tools/integrations.js +23 -22
- package/dist/tools/integrations.js.map +1 -1
- package/dist/tools/plot.d.ts +182 -117
- package/dist/tools/plot.d.ts.map +1 -1
- package/dist/tools/plot.js +23 -21
- package/dist/tools/plot.js.map +1 -1
- package/dist/tools/twists.d.ts +1 -1
- package/dist/twist-guide.d.ts +1 -1
- package/dist/twist-guide.d.ts.map +1 -1
- package/dist/twist.d.ts +66 -11
- package/dist/twist.d.ts.map +1 -1
- package/dist/twist.js +79 -10
- package/dist/twist.js.map +1 -1
- package/package.json +11 -41
- package/dist/common/calendar.d.ts +0 -135
- package/dist/common/calendar.d.ts.map +0 -1
- package/dist/common/calendar.js +0 -2
- package/dist/common/calendar.js.map +0 -1
- package/dist/common/documents.d.ts +0 -122
- package/dist/common/documents.d.ts.map +0 -1
- package/dist/common/documents.js +0 -2
- package/dist/common/documents.js.map +0 -1
- package/dist/common/messaging.d.ts +0 -84
- package/dist/common/messaging.d.ts.map +0 -1
- package/dist/common/messaging.js +0 -2
- package/dist/common/messaging.js.map +0 -1
- package/dist/common/projects.d.ts +0 -112
- package/dist/common/projects.d.ts.map +0 -1
- package/dist/common/projects.js +0 -2
- package/dist/common/projects.js.map +0 -1
- package/dist/docs/documents/Building_Custom_Tools.html +0 -215
- package/dist/docs/enums/plot.ActivityKind.html +0 -14
- package/dist/docs/enums/plot.ActivityType.html +0 -10
- package/dist/docs/modules/common_calendar.html +0 -1
- package/dist/docs/types/common_calendar.Calendar.html +0 -13
- package/dist/docs/types/common_calendar.CalendarTool.html +0 -81
- package/dist/docs/types/common_calendar.SyncOptions.html +0 -24
- package/dist/docs/types/plot.Activity.html +0 -2
- package/dist/docs/types/plot.ActivityCommon.html +0 -20
- package/dist/docs/types/plot.ActivityFilter.html +0 -3
- package/dist/docs/types/plot.ActivityLink.html +0 -26
- package/dist/docs/types/plot.ActivityMeta.html +0 -11
- package/dist/docs/types/plot.ActivityOccurrence.html +0 -22
- package/dist/docs/types/plot.ActivityOccurrenceUpdate.html +0 -3
- package/dist/docs/types/plot.ActivityUpdate.html +0 -3
- package/dist/docs/types/plot.ActivityWithNotes.html +0 -1
- package/dist/docs/types/plot.NewActivity.html +0 -81
- package/dist/docs/types/plot.NewActivityOccurrence.html +0 -24
- package/dist/docs/types/plot.NewActivityWithNotes.html +0 -1
- package/dist/docs/types/tool.SyncToolOptions.html +0 -9
- package/dist/docs/types/tools_integrations.IntegrationOptions.html +0 -4
- package/dist/docs/types/tools_integrations.IntegrationProviderConfig.html +0 -13
- package/dist/docs/types/tools_integrations.Syncable.html +0 -9
- package/dist/llm-docs/common/calendar.d.ts +0 -9
- package/dist/llm-docs/common/calendar.d.ts.map +0 -1
- package/dist/llm-docs/common/calendar.js +0 -8
- package/dist/llm-docs/common/calendar.js.map +0 -1
- package/dist/llm-docs/common/documents.d.ts +0 -9
- package/dist/llm-docs/common/documents.d.ts.map +0 -1
- package/dist/llm-docs/common/documents.js +0 -8
- package/dist/llm-docs/common/documents.js.map +0 -1
- package/dist/llm-docs/common/messaging.d.ts +0 -9
- package/dist/llm-docs/common/messaging.d.ts.map +0 -1
- package/dist/llm-docs/common/messaging.js +0 -8
- package/dist/llm-docs/common/messaging.js.map +0 -1
- package/dist/llm-docs/common/projects.d.ts +0 -9
- package/dist/llm-docs/common/projects.d.ts.map +0 -1
- package/dist/llm-docs/common/projects.js +0 -8
- package/dist/llm-docs/common/projects.js.map +0 -1
package/dist/tools/plot.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
1
|
+
import { type Thread, type ThreadUpdate, type Actor, type ActorId, ITool, type Link, type NewThread, type NewThreadWithNotes, type NewContact, type NewNote, type NewPriority, type Note, type NoteUpdate, type Priority, type PriorityUpdate, Uuid } from "..";
|
|
2
|
+
import { type Schedule, type NewSchedule } from "../schedule";
|
|
3
|
+
export declare enum ThreadAccess {
|
|
3
4
|
/**
|
|
4
|
-
* Create new Note on
|
|
5
|
-
* Add/remove tags on
|
|
5
|
+
* Create new Note on a Thread where the twist was mentioned.
|
|
6
|
+
* Add/remove tags on Thread or Note where the twist was mentioned.
|
|
6
7
|
*/
|
|
7
8
|
Respond = 0,
|
|
8
9
|
/**
|
|
9
|
-
* Create new
|
|
10
|
-
* Create new Note in
|
|
10
|
+
* Create new Thread.
|
|
11
|
+
* Create new Note in a Thread the twist created.
|
|
11
12
|
* All Respond permissions.
|
|
12
13
|
*/
|
|
13
14
|
Create = 1
|
|
@@ -32,8 +33,8 @@ export declare enum ContactAccess {
|
|
|
32
33
|
Write = 1
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
|
-
* Intent handler for
|
|
36
|
-
* Defines how the twist should respond when mentioned in
|
|
36
|
+
* Intent handler for thread mentions.
|
|
37
|
+
* Defines how the twist should respond when mentioned in a thread.
|
|
37
38
|
*/
|
|
38
39
|
export type NoteIntentHandler = {
|
|
39
40
|
/** Human-readable description of what this intent handles */
|
|
@@ -43,10 +44,59 @@ export type NoteIntentHandler = {
|
|
|
43
44
|
/** The function to call when this intent is matched */
|
|
44
45
|
handler: (note: Note) => Promise<void>;
|
|
45
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Filter for querying links from connected source channels.
|
|
49
|
+
*/
|
|
50
|
+
export type LinkFilter = {
|
|
51
|
+
/** Only return links from these channel IDs. */
|
|
52
|
+
channelIds?: string[];
|
|
53
|
+
/** Only return links created/updated after this date. */
|
|
54
|
+
since?: Date;
|
|
55
|
+
/** Only return links of this type. */
|
|
56
|
+
type?: string;
|
|
57
|
+
/** Maximum number of links to return. */
|
|
58
|
+
limit?: number;
|
|
59
|
+
};
|
|
60
|
+
type SearchResultBase = {
|
|
61
|
+
thread: {
|
|
62
|
+
id: string;
|
|
63
|
+
title: string | null;
|
|
64
|
+
};
|
|
65
|
+
priority: {
|
|
66
|
+
id: string;
|
|
67
|
+
title: string | null;
|
|
68
|
+
};
|
|
69
|
+
similarity: number;
|
|
70
|
+
};
|
|
71
|
+
export type NoteSearchResult = SearchResultBase & {
|
|
72
|
+
type: 'note';
|
|
73
|
+
id: string;
|
|
74
|
+
content: string | null;
|
|
75
|
+
};
|
|
76
|
+
export type LinkSearchResult = SearchResultBase & {
|
|
77
|
+
type: 'link';
|
|
78
|
+
id: string;
|
|
79
|
+
title: string | null;
|
|
80
|
+
sourceUrl: string | null;
|
|
81
|
+
content: string | null;
|
|
82
|
+
};
|
|
83
|
+
export type SearchResult = NoteSearchResult | LinkSearchResult;
|
|
84
|
+
/** Default number of search results returned */
|
|
85
|
+
export declare const SEARCH_DEFAULT_LIMIT = 10;
|
|
86
|
+
/** Maximum number of search results allowed */
|
|
87
|
+
export declare const SEARCH_MAX_LIMIT = 30;
|
|
88
|
+
export type SearchOptions = {
|
|
89
|
+
/** Max results to return (default: 10, max: 30) */
|
|
90
|
+
limit?: number;
|
|
91
|
+
/** Minimum similarity score 0-1 (default: 0.3) */
|
|
92
|
+
threshold?: number;
|
|
93
|
+
/** Scope search to this priority + descendants (default: twist's installed priority). Must be within the twist's allowed scope. */
|
|
94
|
+
priorityId?: string;
|
|
95
|
+
};
|
|
46
96
|
/**
|
|
47
97
|
* Built-in tool for interacting with the core Plot data layer.
|
|
48
98
|
*
|
|
49
|
-
* The Plot tool provides twists with the ability to create and manage
|
|
99
|
+
* The Plot tool provides twists with the ability to create and manage threads,
|
|
50
100
|
* priorities, and contacts within the Plot system. This is the primary interface
|
|
51
101
|
* for twists to persist data and interact with the Plot database.
|
|
52
102
|
*
|
|
@@ -61,13 +111,12 @@ export type NoteIntentHandler = {
|
|
|
61
111
|
* }
|
|
62
112
|
*
|
|
63
113
|
* async activate(priority) {
|
|
64
|
-
* // Create a welcome
|
|
65
|
-
* await this.plot.
|
|
66
|
-
* type: ActivityType.Note,
|
|
114
|
+
* // Create a welcome thread
|
|
115
|
+
* await this.plot.createThread({
|
|
67
116
|
* title: "Welcome to Plot!",
|
|
68
|
-
*
|
|
117
|
+
* actions: [{
|
|
69
118
|
* title: "Get Started",
|
|
70
|
-
* type:
|
|
119
|
+
* type: ActionType.external,
|
|
71
120
|
* url: "https://plot.day/docs"
|
|
72
121
|
* }]
|
|
73
122
|
* });
|
|
@@ -87,8 +136,8 @@ export declare abstract class Plot extends ITool {
|
|
|
87
136
|
* build(build: ToolBuilder) {
|
|
88
137
|
* return {
|
|
89
138
|
* plot: build(Plot, {
|
|
90
|
-
*
|
|
91
|
-
* access:
|
|
139
|
+
* thread: {
|
|
140
|
+
* access: ThreadAccess.Create
|
|
92
141
|
* }
|
|
93
142
|
* })
|
|
94
143
|
* };
|
|
@@ -98,9 +147,8 @@ export declare abstract class Plot extends ITool {
|
|
|
98
147
|
* build(build: ToolBuilder) {
|
|
99
148
|
* return {
|
|
100
149
|
* plot: build(Plot, {
|
|
101
|
-
*
|
|
102
|
-
* access:
|
|
103
|
-
* updated: this.onActivityUpdated
|
|
150
|
+
* thread: {
|
|
151
|
+
* access: ThreadAccess.Create,
|
|
104
152
|
* },
|
|
105
153
|
* note: {
|
|
106
154
|
* intents: [{
|
|
@@ -108,8 +156,8 @@ export declare abstract class Plot extends ITool {
|
|
|
108
156
|
* examples: ["Schedule a meeting tomorrow"],
|
|
109
157
|
* handler: this.onSchedulingIntent
|
|
110
158
|
* }],
|
|
111
|
-
* created: this.onNoteCreated
|
|
112
159
|
* },
|
|
160
|
+
* link: true,
|
|
113
161
|
* priority: {
|
|
114
162
|
* access: PriorityAccess.Full
|
|
115
163
|
* },
|
|
@@ -122,27 +170,12 @@ export declare abstract class Plot extends ITool {
|
|
|
122
170
|
* ```
|
|
123
171
|
*/
|
|
124
172
|
static readonly Options: {
|
|
125
|
-
|
|
173
|
+
thread?: {
|
|
126
174
|
/**
|
|
127
175
|
* Capability to create Notes and modify tags.
|
|
128
176
|
* Must be explicitly set to grant permissions.
|
|
129
177
|
*/
|
|
130
|
-
access?:
|
|
131
|
-
/**
|
|
132
|
-
* Called when an activity created by this twist is updated.
|
|
133
|
-
* This is often used to implement two-way sync with an external system.
|
|
134
|
-
*
|
|
135
|
-
* @param activity - The updated activity
|
|
136
|
-
* @param changes - Changes to the activity and the previous version
|
|
137
|
-
*/
|
|
138
|
-
updated?: (activity: Activity, changes: {
|
|
139
|
-
tagsAdded: Record<Tag, ActorId[]>;
|
|
140
|
-
tagsRemoved: Record<Tag, ActorId[]>;
|
|
141
|
-
/**
|
|
142
|
-
* If present, this update is for a specific occurrence of a recurring activity.
|
|
143
|
-
*/
|
|
144
|
-
occurrence?: ActivityOccurrence;
|
|
145
|
-
}) => Promise<void>;
|
|
178
|
+
access?: ThreadAccess;
|
|
146
179
|
};
|
|
147
180
|
note?: {
|
|
148
181
|
/**
|
|
@@ -165,120 +198,98 @@ export declare abstract class Plot extends ITool {
|
|
|
165
198
|
* ```
|
|
166
199
|
*/
|
|
167
200
|
intents?: NoteIntentHandler[];
|
|
168
|
-
/**
|
|
169
|
-
* Called when a note is created on an activity created by this twist.
|
|
170
|
-
* This is often used to implement two-way sync with an external system,
|
|
171
|
-
* such as syncing notes as comments back to the source system.
|
|
172
|
-
*
|
|
173
|
-
* Notes created by the twist itself are automatically filtered out to prevent loops.
|
|
174
|
-
* The parent activity is available via note.activity.
|
|
175
|
-
*
|
|
176
|
-
* @param note - The newly created note
|
|
177
|
-
*/
|
|
178
|
-
created?: (note: Note) => Promise<void>;
|
|
179
201
|
};
|
|
202
|
+
/** Enable link processing from connected source channels. */
|
|
203
|
+
link?: true;
|
|
180
204
|
priority?: {
|
|
181
205
|
access?: PriorityAccess;
|
|
182
206
|
};
|
|
183
207
|
contact?: {
|
|
184
208
|
access?: ContactAccess;
|
|
185
209
|
};
|
|
210
|
+
/** Enable semantic search across notes and links in the twist's priority scope. */
|
|
211
|
+
search?: true;
|
|
186
212
|
};
|
|
187
213
|
/**
|
|
188
|
-
* Creates a new
|
|
214
|
+
* Creates a new thread in the Plot system.
|
|
189
215
|
*
|
|
190
|
-
* The
|
|
191
|
-
* based on the current execution context. All other fields from
|
|
192
|
-
* will be preserved in the created
|
|
216
|
+
* The thread will be automatically assigned an ID and author information
|
|
217
|
+
* based on the current execution context. All other fields from NewThread
|
|
218
|
+
* will be preserved in the created thread.
|
|
193
219
|
*
|
|
194
|
-
* @param
|
|
195
|
-
* @returns Promise resolving to the created
|
|
220
|
+
* @param thread - The thread data to create
|
|
221
|
+
* @returns Promise resolving to the created thread's ID
|
|
196
222
|
*/
|
|
197
|
-
abstract
|
|
223
|
+
abstract createThread(thread: NewThread | NewThreadWithNotes): Promise<Uuid>;
|
|
198
224
|
/**
|
|
199
|
-
* Creates multiple
|
|
225
|
+
* Creates multiple threads in a single batch operation.
|
|
200
226
|
*
|
|
201
|
-
* This method efficiently creates multiple
|
|
202
|
-
* more performant than calling
|
|
203
|
-
* All
|
|
227
|
+
* This method efficiently creates multiple threads at once, which is
|
|
228
|
+
* more performant than calling createThread() multiple times individually.
|
|
229
|
+
* All threads are created with the same author and access control rules.
|
|
204
230
|
*
|
|
205
|
-
* @param
|
|
206
|
-
* @returns Promise resolving to array of created
|
|
231
|
+
* @param threads - Array of thread data to create
|
|
232
|
+
* @returns Promise resolving to array of created thread IDs
|
|
207
233
|
*/
|
|
208
|
-
abstract
|
|
234
|
+
abstract createThreads(threads: (NewThread | NewThreadWithNotes)[]): Promise<Uuid[]>;
|
|
209
235
|
/**
|
|
210
|
-
* Updates an existing
|
|
236
|
+
* Updates an existing thread in the Plot system.
|
|
211
237
|
*
|
|
212
|
-
* **Important**: This method only updates existing
|
|
213
|
-
* if the
|
|
214
|
-
*
|
|
238
|
+
* **Important**: This method only updates existing threads. It will throw an error
|
|
239
|
+
* if the thread does not exist. Use `createThread()` to create or update (upsert)
|
|
240
|
+
* threads.
|
|
215
241
|
*
|
|
216
242
|
* Only the fields provided in the update object will be modified - all other fields
|
|
217
243
|
* remain unchanged. This enables partial updates without needing to fetch and resend
|
|
218
|
-
* the entire
|
|
244
|
+
* the entire thread object.
|
|
219
245
|
*
|
|
220
246
|
* For tags, provide a Record<number, boolean> where true adds a tag and false removes it.
|
|
221
247
|
* Tags not included in the update remain unchanged.
|
|
222
248
|
*
|
|
223
|
-
* When updating the parent, the
|
|
249
|
+
* When updating the parent, the thread's path will be automatically recalculated to
|
|
224
250
|
* maintain the correct hierarchical structure.
|
|
225
251
|
*
|
|
226
|
-
*
|
|
227
|
-
* automatically recalculate duration and range values to maintain consistency.
|
|
252
|
+
* Scheduling is handled separately via `createSchedule()` / `updateSchedule()`.
|
|
228
253
|
*
|
|
229
|
-
* @param
|
|
254
|
+
* @param thread - The thread update containing the ID or source and fields to change
|
|
230
255
|
* @returns Promise that resolves when the update is complete
|
|
231
|
-
* @throws Error if the
|
|
256
|
+
* @throws Error if the thread does not exist
|
|
232
257
|
*
|
|
233
258
|
* @example
|
|
234
259
|
* ```typescript
|
|
235
260
|
* // Mark a task as complete
|
|
236
|
-
* await this.plot.
|
|
261
|
+
* await this.plot.updateThread({
|
|
237
262
|
* id: "task-123",
|
|
238
263
|
* done: new Date()
|
|
239
264
|
* });
|
|
240
265
|
*
|
|
241
|
-
* // Reschedule an event
|
|
242
|
-
* await this.plot.updateActivity({
|
|
243
|
-
* id: "event-456",
|
|
244
|
-
* start: new Date("2024-03-15T10:00:00Z"),
|
|
245
|
-
* end: new Date("2024-03-15T11:00:00Z")
|
|
246
|
-
* });
|
|
247
|
-
*
|
|
248
266
|
* // Add and remove tags
|
|
249
|
-
* await this.plot.
|
|
250
|
-
* id: "
|
|
267
|
+
* await this.plot.updateThread({
|
|
268
|
+
* id: "thread-789",
|
|
251
269
|
* tags: {
|
|
252
270
|
* 1: true, // Add tag with ID 1
|
|
253
271
|
* 2: false // Remove tag with ID 2
|
|
254
272
|
* }
|
|
255
273
|
* });
|
|
256
|
-
*
|
|
257
|
-
* // Update a recurring event exception
|
|
258
|
-
* await this.plot.updateActivity({
|
|
259
|
-
* id: "exception-123",
|
|
260
|
-
* occurrence: new Date("2024-03-20T09:00:00Z"),
|
|
261
|
-
* title: "Rescheduled meeting"
|
|
262
|
-
* });
|
|
263
274
|
* ```
|
|
264
275
|
*/
|
|
265
|
-
abstract
|
|
276
|
+
abstract updateThread(thread: ThreadUpdate): Promise<void>;
|
|
266
277
|
/**
|
|
267
|
-
* Retrieves all notes within
|
|
278
|
+
* Retrieves all notes within a thread.
|
|
268
279
|
*
|
|
269
|
-
* Notes are detailed entries within
|
|
270
|
-
* Each note can contain markdown content,
|
|
271
|
-
* related to the parent
|
|
280
|
+
* Notes are detailed entries within a thread, ordered by creation time.
|
|
281
|
+
* Each note can contain markdown content, actions, and other detailed information
|
|
282
|
+
* related to the parent thread.
|
|
272
283
|
*
|
|
273
|
-
* @param
|
|
274
|
-
* @returns Promise resolving to array of notes in the
|
|
284
|
+
* @param thread - The thread whose notes to retrieve
|
|
285
|
+
* @returns Promise resolving to array of notes in the thread
|
|
275
286
|
*/
|
|
276
|
-
abstract getNotes(
|
|
287
|
+
abstract getNotes(thread: Thread): Promise<Note[]>;
|
|
277
288
|
/**
|
|
278
|
-
* Creates a new note in
|
|
289
|
+
* Creates a new note in a thread.
|
|
279
290
|
*
|
|
280
|
-
* Notes provide detailed content within
|
|
281
|
-
*
|
|
291
|
+
* Notes provide detailed content within a thread, supporting markdown,
|
|
292
|
+
* actions, and other rich content. The note will be automatically assigned
|
|
282
293
|
* an ID and author information based on the current execution context.
|
|
283
294
|
*
|
|
284
295
|
* @param note - The note data to create
|
|
@@ -288,17 +299,17 @@ export declare abstract class Plot extends ITool {
|
|
|
288
299
|
* ```typescript
|
|
289
300
|
* // Create a note with content
|
|
290
301
|
* await this.plot.createNote({
|
|
291
|
-
*
|
|
302
|
+
* thread: { id: "thread-123" },
|
|
292
303
|
* note: "Discussion notes from the meeting...",
|
|
293
304
|
* contentType: "markdown"
|
|
294
305
|
* });
|
|
295
306
|
*
|
|
296
|
-
* // Create a note with
|
|
307
|
+
* // Create a note with actions
|
|
297
308
|
* await this.plot.createNote({
|
|
298
|
-
*
|
|
309
|
+
* thread: { id: "thread-456" },
|
|
299
310
|
* note: "Meeting recording available",
|
|
300
|
-
*
|
|
301
|
-
* type:
|
|
311
|
+
* actions: [{
|
|
312
|
+
* type: ActionType.external,
|
|
302
313
|
* title: "View Recording",
|
|
303
314
|
* url: "https://example.com/recording"
|
|
304
315
|
* }]
|
|
@@ -321,11 +332,11 @@ export declare abstract class Plot extends ITool {
|
|
|
321
332
|
* // Create multiple notes in one batch
|
|
322
333
|
* await this.plot.createNotes([
|
|
323
334
|
* {
|
|
324
|
-
*
|
|
335
|
+
* thread: { id: "thread-123" },
|
|
325
336
|
* note: "First message in thread"
|
|
326
337
|
* },
|
|
327
338
|
* {
|
|
328
|
-
*
|
|
339
|
+
* thread: { id: "thread-123" },
|
|
329
340
|
* note: "Second message in thread"
|
|
330
341
|
* }
|
|
331
342
|
* ]);
|
|
@@ -365,25 +376,25 @@ export declare abstract class Plot extends ITool {
|
|
|
365
376
|
*/
|
|
366
377
|
abstract updateNote(note: NoteUpdate): Promise<void>;
|
|
367
378
|
/**
|
|
368
|
-
* Retrieves
|
|
379
|
+
* Retrieves a thread by ID or source.
|
|
369
380
|
*
|
|
370
|
-
* This method enables lookup of
|
|
371
|
-
* source identifier (canonical URL from an external system). Archived
|
|
381
|
+
* This method enables lookup of threads either by their unique ID or by their
|
|
382
|
+
* source identifier (canonical URL from an external system). Archived threads
|
|
372
383
|
* are included in the results.
|
|
373
384
|
*
|
|
374
|
-
* @param
|
|
375
|
-
* @returns Promise resolving to the matching
|
|
385
|
+
* @param thread - Thread lookup by ID or source
|
|
386
|
+
* @returns Promise resolving to the matching thread or null if not found
|
|
376
387
|
*/
|
|
377
|
-
abstract
|
|
388
|
+
abstract getThread(thread: {
|
|
378
389
|
id: Uuid;
|
|
379
390
|
} | {
|
|
380
391
|
source: string;
|
|
381
|
-
}): Promise<
|
|
392
|
+
}): Promise<Thread | null>;
|
|
382
393
|
/**
|
|
383
394
|
* Retrieves a note by ID or key.
|
|
384
395
|
*
|
|
385
396
|
* This method enables lookup of notes either by their unique ID or by their
|
|
386
|
-
* key (unique identifier within the
|
|
397
|
+
* key (unique identifier within the thread). Archived notes are included
|
|
387
398
|
* in the results.
|
|
388
399
|
*
|
|
389
400
|
* @param note - Note lookup by ID or key
|
|
@@ -397,7 +408,7 @@ export declare abstract class Plot extends ITool {
|
|
|
397
408
|
/**
|
|
398
409
|
* Creates a new priority in the Plot system.
|
|
399
410
|
*
|
|
400
|
-
* Priorities serve as organizational containers for
|
|
411
|
+
* Priorities serve as organizational containers for threads and twists.
|
|
401
412
|
* The created priority will be automatically assigned a unique ID.
|
|
402
413
|
*
|
|
403
414
|
* @param priority - The priority data to create
|
|
@@ -432,7 +443,7 @@ export declare abstract class Plot extends ITool {
|
|
|
432
443
|
/**
|
|
433
444
|
* Adds contacts to the Plot system.
|
|
434
445
|
*
|
|
435
|
-
* Contacts are used for associating people with
|
|
446
|
+
* Contacts are used for associating people with threads, such as
|
|
436
447
|
* event attendees or task assignees. Duplicate contacts (by email)
|
|
437
448
|
* will be merged or updated as appropriate.
|
|
438
449
|
* This method requires ContactAccess.Write permission.
|
|
@@ -451,5 +462,59 @@ export declare abstract class Plot extends ITool {
|
|
|
451
462
|
* @returns Promise resolving to array of actors
|
|
452
463
|
*/
|
|
453
464
|
abstract getActors(ids: ActorId[]): Promise<Actor[]>;
|
|
465
|
+
/**
|
|
466
|
+
* Creates a new schedule for a thread.
|
|
467
|
+
*
|
|
468
|
+
* Schedules define when a thread occurs in time. A thread can have
|
|
469
|
+
* multiple schedules (shared and per-user).
|
|
470
|
+
*
|
|
471
|
+
* @param schedule - The schedule data to create
|
|
472
|
+
* @returns Promise resolving to the created schedule
|
|
473
|
+
*
|
|
474
|
+
* @example
|
|
475
|
+
* ```typescript
|
|
476
|
+
* // Schedule a timed event
|
|
477
|
+
* const threadId = await this.plot.createThread({
|
|
478
|
+
* title: "Team standup"
|
|
479
|
+
* });
|
|
480
|
+
* await this.plot.createSchedule({
|
|
481
|
+
* threadId,
|
|
482
|
+
* start: new Date("2025-01-15T10:00:00Z"),
|
|
483
|
+
* end: new Date("2025-01-15T10:30:00Z"),
|
|
484
|
+
* recurrenceRule: "FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR"
|
|
485
|
+
* });
|
|
486
|
+
* ```
|
|
487
|
+
*/
|
|
488
|
+
abstract createSchedule(schedule: NewSchedule): Promise<Schedule>;
|
|
489
|
+
/**
|
|
490
|
+
* Retrieves all schedules for a thread.
|
|
491
|
+
*
|
|
492
|
+
* @param threadId - The thread whose schedules to retrieve
|
|
493
|
+
* @returns Promise resolving to array of schedules for the thread
|
|
494
|
+
*/
|
|
495
|
+
abstract getSchedules(threadId: Uuid): Promise<Schedule[]>;
|
|
496
|
+
/**
|
|
497
|
+
* Retrieves links from connected source channels.
|
|
498
|
+
*
|
|
499
|
+
* Requires `link: true` in Plot options.
|
|
500
|
+
*
|
|
501
|
+
* @param filter - Optional filter criteria for links
|
|
502
|
+
* @returns Promise resolving to array of links with their notes
|
|
503
|
+
*/
|
|
504
|
+
abstract getLinks(filter?: LinkFilter): Promise<Array<{
|
|
505
|
+
link: Link;
|
|
506
|
+
notes: Note[];
|
|
507
|
+
}>>;
|
|
508
|
+
/**
|
|
509
|
+
* Searches notes and links using semantic similarity.
|
|
510
|
+
*
|
|
511
|
+
* Requires `search: true` in Plot options.
|
|
512
|
+
*
|
|
513
|
+
* @param query - The search query text
|
|
514
|
+
* @param options - Optional search configuration
|
|
515
|
+
* @returns Promise resolving to array of search results ordered by similarity
|
|
516
|
+
*/
|
|
517
|
+
abstract search(query: string, options?: SearchOptions): Promise<SearchResult[]>;
|
|
454
518
|
}
|
|
519
|
+
export {};
|
|
455
520
|
//# sourceMappingURL=plot.d.ts.map
|
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,
|
|
1
|
+
{"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,IAAI,EACL,MAAM,IAAI,CAAC;AACZ,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAErB,oBAAY,YAAY;IACtB;;;OAGG;IACH,OAAO,IAAA;IACP;;;;OAIG;IACH,MAAM,IAAA;CACP;AAED,oBAAY,cAAc;IACxB;;;OAGG;IACH,MAAM,IAAA;IACN;;;;OAIG;IACH,IAAI,IAAA;CACL;AAED,oBAAY,aAAa;IACvB,iFAAiF;IACjF,IAAI,IAAA;IACJ,kCAAkC;IAClC,KAAK,IAAA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new Note on a Thread where the twist was mentioned.
|
|
6
|
+
* Add/remove tags on Thread or Note where the twist was mentioned.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
ThreadAccess[ThreadAccess["Respond"] = 0] = "Respond";
|
|
9
9
|
/**
|
|
10
|
-
* Create new
|
|
11
|
-
* Create new Note in
|
|
10
|
+
* Create new Thread.
|
|
11
|
+
* Create new Note in a Thread the twist created.
|
|
12
12
|
* All Respond permissions.
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
})(
|
|
14
|
+
ThreadAccess[ThreadAccess["Create"] = 1] = "Create";
|
|
15
|
+
})(ThreadAccess || (ThreadAccess = {}));
|
|
16
16
|
export var PriorityAccess;
|
|
17
17
|
(function (PriorityAccess) {
|
|
18
18
|
/**
|
|
@@ -34,10 +34,14 @@ export var ContactAccess;
|
|
|
34
34
|
/** Create and update contacts. */
|
|
35
35
|
ContactAccess[ContactAccess["Write"] = 1] = "Write";
|
|
36
36
|
})(ContactAccess || (ContactAccess = {}));
|
|
37
|
+
/** Default number of search results returned */
|
|
38
|
+
export const SEARCH_DEFAULT_LIMIT = 10;
|
|
39
|
+
/** Maximum number of search results allowed */
|
|
40
|
+
export const SEARCH_MAX_LIMIT = 30;
|
|
37
41
|
/**
|
|
38
42
|
* Built-in tool for interacting with the core Plot data layer.
|
|
39
43
|
*
|
|
40
|
-
* The Plot tool provides twists with the ability to create and manage
|
|
44
|
+
* The Plot tool provides twists with the ability to create and manage threads,
|
|
41
45
|
* priorities, and contacts within the Plot system. This is the primary interface
|
|
42
46
|
* for twists to persist data and interact with the Plot database.
|
|
43
47
|
*
|
|
@@ -52,13 +56,12 @@ export var ContactAccess;
|
|
|
52
56
|
* }
|
|
53
57
|
*
|
|
54
58
|
* async activate(priority) {
|
|
55
|
-
* // Create a welcome
|
|
56
|
-
* await this.plot.
|
|
57
|
-
* type: ActivityType.Note,
|
|
59
|
+
* // Create a welcome thread
|
|
60
|
+
* await this.plot.createThread({
|
|
58
61
|
* title: "Welcome to Plot!",
|
|
59
|
-
*
|
|
62
|
+
* actions: [{
|
|
60
63
|
* title: "Get Started",
|
|
61
|
-
* type:
|
|
64
|
+
* type: ActionType.external,
|
|
62
65
|
* url: "https://plot.day/docs"
|
|
63
66
|
* }]
|
|
64
67
|
* });
|
|
@@ -78,8 +81,8 @@ export class Plot extends ITool {
|
|
|
78
81
|
* build(build: ToolBuilder) {
|
|
79
82
|
* return {
|
|
80
83
|
* plot: build(Plot, {
|
|
81
|
-
*
|
|
82
|
-
* access:
|
|
84
|
+
* thread: {
|
|
85
|
+
* access: ThreadAccess.Create
|
|
83
86
|
* }
|
|
84
87
|
* })
|
|
85
88
|
* };
|
|
@@ -89,9 +92,8 @@ export class Plot extends ITool {
|
|
|
89
92
|
* build(build: ToolBuilder) {
|
|
90
93
|
* return {
|
|
91
94
|
* plot: build(Plot, {
|
|
92
|
-
*
|
|
93
|
-
* access:
|
|
94
|
-
* updated: this.onActivityUpdated
|
|
95
|
+
* thread: {
|
|
96
|
+
* access: ThreadAccess.Create,
|
|
95
97
|
* },
|
|
96
98
|
* note: {
|
|
97
99
|
* intents: [{
|
|
@@ -99,8 +101,8 @@ export class Plot extends ITool {
|
|
|
99
101
|
* examples: ["Schedule a meeting tomorrow"],
|
|
100
102
|
* handler: this.onSchedulingIntent
|
|
101
103
|
* }],
|
|
102
|
-
* created: this.onNoteCreated
|
|
103
104
|
* },
|
|
105
|
+
* link: true,
|
|
104
106
|
* priority: {
|
|
105
107
|
* access: PriorityAccess.Full
|
|
106
108
|
* },
|
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,
|
|
1
|
+
{"version":3,"file":"plot.js","sourceRoot":"","sources":["../../src/tools/plot.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GAYN,MAAM,IAAI,CAAC;AAMZ,MAAM,CAAN,IAAY,YAYX;AAZD,WAAY,YAAY;IACtB;;;OAGG;IACH,qDAAO,CAAA;IACP;;;;OAIG;IACH,mDAAM,CAAA;AACR,CAAC,EAZW,YAAY,KAAZ,YAAY,QAYvB;AAED,MAAM,CAAN,IAAY,cAYX;AAZD,WAAY,cAAc;IACxB;;;OAGG;IACH,uDAAM,CAAA;IACN;;;;OAIG;IACH,mDAAI,CAAA;AACN,CAAC,EAZW,cAAc,KAAd,cAAc,QAYzB;AAED,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,iFAAiF;IACjF,iDAAI,CAAA;IACJ,kCAAkC;IAClC,mDAAK,CAAA;AACP,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAmDD,gDAAgD;AAChD,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACvC,+CAA+C;AAC/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAWnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,OAAgB,IAAK,SAAQ,KAAK;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,MAAM,CAAU,OAAO,CAwCrB;CA6UH"}
|
package/dist/tools/twists.d.ts
CHANGED