Skip to content

Commit bdbedca

Browse files
committed
Add Activity.threadRoot
1 parent 431d8c7 commit bdbedca

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

.changeset/quick-streets-trade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@plotday/agent": patch
3+
---
4+
5+
Added: Activity.threadRoot

builder/src/plot.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ export type Activity = {
269269
doneAt: Date | null;
270270
/** Reference to a parent activity for creating hierarchical relationships */
271271
parent: Activity | null;
272+
/** For nested activities in a thread, references the top-level activity of that thread */
273+
threadRoot?: Activity;
272274
/** Array of interactive links attached to the activity */
273275
links: Array<ActivityLink> | null;
274276
/** The priority context this activity belongs to */
@@ -319,7 +321,7 @@ export type Activity = {
319321
*/
320322
export type NewActivity = Pick<Activity, "type"> &
321323
Partial<
322-
Omit<Activity, "id" | "author" | "type" | "parent" | "priority"> & {
324+
Omit<Activity, "id" | "author" | "type" | "parent" | "priority" | "threadRoot"> & {
323325
parent?: Pick<Activity, "id"> | null;
324326
priority?: Pick<Priority, "id">;
325327
}

builder/src/tools/plot.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ export enum ActivityAccess {
2727

2828
export enum PriorityAccess {
2929
/**
30-
* Create new priority.
30+
* Create a new Priority within the agent's Priority.
3131
* Update Priority created by the agent.
3232
*/
3333
Create,
3434
/**
35-
* Update and archive Priority created by others.
36-
* All Create permissions.
35+
* Read all Priority within the agent's Priority.
36+
* Create a new Priority within the agent's Priority.
37+
* Update and archive any Priority within the agent's Priority.
3738
*/
3839
Full,
3940
}

0 commit comments

Comments
 (0)