ac-teams 0.0.15 → 0.0.16
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 +1 -1
- package/docs/operations.md +2 -0
- package/docs/usage.md +21 -21
- package/package.json +1 -1
- package/src/coordinator.ts +31 -15
- package/src/graph.ts +13 -4
- package/src/group.ts +134 -0
- package/src/index.ts +37 -12
- package/src/panel.ts +114 -45
- package/src/render.ts +12 -12
- package/src/schemas.ts +12 -3
- package/src/store.ts +76 -20
- package/src/types.ts +27 -4
package/src/types.ts
CHANGED
|
@@ -47,6 +47,8 @@ export interface Member {
|
|
|
47
47
|
role?: "main" | "member";
|
|
48
48
|
/** State recorded when the coordinator owner stopped this member; the next owner's resume pass consumes it. */
|
|
49
49
|
handover?: "busy" | "idle" | "input";
|
|
50
|
+
/** Registered by a yield: posts on these tasks reach this member and wake it. Cleared when it next works. */
|
|
51
|
+
waiting?: { tasks: string[] };
|
|
50
52
|
/** Promotion in progress: the last completed step and what a rollback restores. */
|
|
51
53
|
promotion?: { step: "stopped" | "moved" | "role" | "entry"; sessionFile: string; parent?: string; access?: Access; provider?: string };
|
|
52
54
|
}
|
|
@@ -74,6 +76,10 @@ export interface Task {
|
|
|
74
76
|
completedAt?: number;
|
|
75
77
|
owner?: string;
|
|
76
78
|
creator?: string;
|
|
79
|
+
/** Who handed this task to its owner; receives its activity. Routing falls back to the creator. */
|
|
80
|
+
delegator?: string;
|
|
81
|
+
/** The post that published this task's completion outcome. */
|
|
82
|
+
outcome?: string;
|
|
77
83
|
}
|
|
78
84
|
export interface TaskView extends Task {
|
|
79
85
|
blockedBy: string[];
|
|
@@ -83,11 +89,18 @@ export interface Message {
|
|
|
83
89
|
id: string;
|
|
84
90
|
from: string;
|
|
85
91
|
recipients: string[];
|
|
86
|
-
|
|
92
|
+
/** Delivered directly in notices; complete enough to act on. */
|
|
93
|
+
summary: string;
|
|
94
|
+
/** Read on demand. */
|
|
95
|
+
detail?: string;
|
|
96
|
+
task?: string;
|
|
97
|
+
replyTo?: string;
|
|
98
|
+
/** "outcome": the post that completed its task. */
|
|
99
|
+
kind?: "outcome";
|
|
87
100
|
time: string;
|
|
88
101
|
}
|
|
89
102
|
export interface TeamState {
|
|
90
|
-
version:
|
|
103
|
+
version: 5;
|
|
91
104
|
id: string;
|
|
92
105
|
/** Lets an unsandboxed session of the same user add itself as a main session. */
|
|
93
106
|
key: string;
|
|
@@ -115,11 +128,19 @@ export interface TaskArgs {
|
|
|
115
128
|
label?: string;
|
|
116
129
|
description?: string;
|
|
117
130
|
dependencies?: string[];
|
|
131
|
+
/** Complete: the outcome published with the completion. */
|
|
132
|
+
summary?: string;
|
|
133
|
+
detail?: string;
|
|
118
134
|
}
|
|
119
135
|
export interface MessageArgs {
|
|
120
|
-
action: "send" | "history" | "search";
|
|
136
|
+
action: "send" | "history" | "search" | "wait";
|
|
137
|
+
/** Wait: also wake on posts linked to these tasks. */
|
|
138
|
+
tasks?: string[];
|
|
121
139
|
recipients?: string[];
|
|
122
|
-
|
|
140
|
+
summary?: string;
|
|
141
|
+
detail?: string;
|
|
142
|
+
task?: string;
|
|
143
|
+
replyTo?: string;
|
|
123
144
|
query?: string;
|
|
124
145
|
after?: number;
|
|
125
146
|
limit?: number;
|
|
@@ -138,6 +159,8 @@ export interface AgentArgs {
|
|
|
138
159
|
limit?: number;
|
|
139
160
|
depth?: number;
|
|
140
161
|
access?: AccessRequest;
|
|
162
|
+
/** Launch: an existing task the new member owns, with the requester as its delegator. */
|
|
163
|
+
task?: string;
|
|
141
164
|
}
|
|
142
165
|
export interface UserAction {
|
|
143
166
|
action: "task_request" | "feedback" | "resume" | "promote" | "leave";
|