@treeseed/sdk 0.13.0-rc.53 → 0.13.0-rc.55
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 -0
- package/dist/agent-capacity/authority/agent-authority-presets.js +2 -1
- package/dist/agent-capacity/contracts/configuration/configuration.js +1 -1
- package/dist/agent-capacity/validation/agent-definition-schema.d.ts +240 -240
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +1 -1
- package/dist/capacity-provider/client.d.ts +18 -3
- package/dist/capacity-provider/client.js +6 -0
- package/dist/capacity-provider/contracts/governance.d.ts +28 -1
- package/dist/capacity-provider/index.d.ts +1 -0
- package/dist/capacity-provider/index.js +1 -0
- package/dist/capacity-provider/sandbox-contracts.d.ts +422 -0
- package/dist/capacity-provider/sandbox-contracts.js +71 -0
- package/dist/capacity-provider/validation.d.ts +2 -1
- package/dist/capacity-provider/validation.js +23 -0
- package/dist/content/validation/agent-operational-content-schemas.d.ts +76 -76
- package/dist/content/validation/auxiliary-content-schemas.d.ts +20 -20
- package/dist/content/validation/content-model-schemas.d.ts +570 -570
- package/dist/content/validation/portable-content-data.d.ts +61 -61
- package/dist/deployment/ai-mode.d.ts +4 -4
- package/dist/deployment/schemas.d.ts +418 -100
- package/dist/deployment/schemas.js +23 -1
- package/dist/development/schemas.d.ts +22 -22
- package/dist/operator-contracts/canonical-command-tree.js +63 -3
- package/dist/operator-contracts/catalog/communication-operations.d.ts +300 -33
- package/dist/operator-contracts/catalog/communication-operations.js +56 -2
- package/dist/operator-contracts/catalog/inbox-operations.d.ts +261 -0
- package/dist/operator-contracts/catalog/inbox-operations.js +36 -0
- package/dist/operator-contracts/communication/contracts.d.ts +1261 -71
- package/dist/operator-contracts/communication/contracts.js +99 -7
- package/dist/operator-contracts/control-plane-operations.d.ts +592 -66
- package/dist/operator-contracts/control-plane-operations.js +4 -1
- package/dist/operator-contracts/inbox/contracts.d.ts +1099 -0
- package/dist/operator-contracts/inbox/contracts.js +134 -0
- package/dist/operator-contracts/index.d.ts +1 -0
- package/dist/operator-contracts/index.js +1 -0
- package/dist/operator-contracts/mcp.js +1 -1
- package/dist/security/encrypted-envelope.d.ts +177 -0
- package/dist/security/encrypted-envelope.js +34 -0
- package/dist/security/envelope-codec.d.ts +38 -0
- package/dist/security/envelope-codec.js +96 -0
- package/dist/security/index.d.ts +2 -0
- package/dist/security/index.js +2 -0
- package/package.json +5 -1
|
@@ -4,22 +4,25 @@ export declare function communicationOperations(): {
|
|
|
4
4
|
channel: string;
|
|
5
5
|
}, {}, {
|
|
6
6
|
message: string;
|
|
7
|
-
projectId: string;
|
|
8
7
|
timeoutSeconds?: number | undefined;
|
|
9
8
|
recipients?: string[] | undefined;
|
|
10
9
|
}, {
|
|
10
|
+
teamId: string;
|
|
11
|
+
sendId: string;
|
|
12
|
+
schemaVersion: "treeseed.communication-send-receipt/v4";
|
|
11
13
|
status: "failed" | "running" | "partial" | "complete" | "queued";
|
|
12
|
-
|
|
14
|
+
createdAt: string;
|
|
13
15
|
targets: {
|
|
16
|
+
invocationId: string | null;
|
|
14
17
|
status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
|
|
15
18
|
projectId: string;
|
|
16
19
|
completedAt: string | null;
|
|
17
20
|
agentSlug: string;
|
|
18
21
|
capacity: {
|
|
22
|
+
assignmentId: string | null;
|
|
19
23
|
status: string | null;
|
|
20
24
|
completedAt: string | null;
|
|
21
25
|
providerId: string | null;
|
|
22
|
-
assignmentId: string | null;
|
|
23
26
|
executionProviderId: string | null;
|
|
24
27
|
laneId: string | null;
|
|
25
28
|
lanePurpose: string | null;
|
|
@@ -28,6 +31,27 @@ export declare function communicationOperations(): {
|
|
|
28
31
|
returnedAt: string | null;
|
|
29
32
|
failedAt: string | null;
|
|
30
33
|
};
|
|
34
|
+
diagnostics: {
|
|
35
|
+
resources: Record<string, unknown>;
|
|
36
|
+
reason: string | null;
|
|
37
|
+
provider: {
|
|
38
|
+
providerId: string | null;
|
|
39
|
+
executionProviderId: string | null;
|
|
40
|
+
runtimeVersion: string | null;
|
|
41
|
+
};
|
|
42
|
+
selection: {
|
|
43
|
+
parameters: Record<string, unknown>;
|
|
44
|
+
capabilities: string[];
|
|
45
|
+
model: string | null;
|
|
46
|
+
};
|
|
47
|
+
usage: Record<string, unknown>[];
|
|
48
|
+
availability: "available" | "unavailable" | "partial";
|
|
49
|
+
identityManifest: Record<string, unknown>;
|
|
50
|
+
contextManifest: Record<string, unknown>[];
|
|
51
|
+
timing: Record<string, unknown>;
|
|
52
|
+
traceEvents: Record<string, unknown>[];
|
|
53
|
+
fullPayload?: Record<string, unknown> | undefined;
|
|
54
|
+
};
|
|
31
55
|
projectSlug: string;
|
|
32
56
|
definitionRevision: string;
|
|
33
57
|
revisions: {
|
|
@@ -36,7 +60,6 @@ export declare function communicationOperations(): {
|
|
|
36
60
|
agentDefinition: string;
|
|
37
61
|
chatProfile: string;
|
|
38
62
|
};
|
|
39
|
-
invocationId: string | null;
|
|
40
63
|
requirement: "required" | "optional";
|
|
41
64
|
parentInvocationId: string | null;
|
|
42
65
|
depth: number;
|
|
@@ -46,53 +69,77 @@ export declare function communicationOperations(): {
|
|
|
46
69
|
code: string;
|
|
47
70
|
message: string | null;
|
|
48
71
|
} | null;
|
|
72
|
+
acknowledgedAt: string | null;
|
|
73
|
+
leaseAcceptedAt: string | null;
|
|
49
74
|
}[];
|
|
50
|
-
createdAt: string;
|
|
51
75
|
responses: {
|
|
76
|
+
invocationId: string;
|
|
77
|
+
assignmentId: string | null;
|
|
52
78
|
status: "failed" | "cancelled" | "responded" | "abstained";
|
|
53
|
-
projectId: string;
|
|
54
79
|
createdAt: string;
|
|
80
|
+
projectId: string;
|
|
55
81
|
agentSlug: string;
|
|
56
|
-
|
|
57
|
-
invocationId: string;
|
|
82
|
+
projectSlug: string;
|
|
58
83
|
requirement: "required" | "optional";
|
|
59
84
|
messageRef: string;
|
|
60
85
|
markdown: string;
|
|
61
86
|
}[];
|
|
62
|
-
teamId: string;
|
|
63
87
|
channel: string;
|
|
64
|
-
updatedAt: string;
|
|
65
|
-
messageRef: string;
|
|
66
|
-
sendId: string;
|
|
67
88
|
topic: {
|
|
68
89
|
id: string;
|
|
69
90
|
slug: string;
|
|
70
91
|
};
|
|
71
|
-
|
|
92
|
+
events: {
|
|
93
|
+
teamId: string;
|
|
94
|
+
topicId: string;
|
|
95
|
+
sendId: string | null;
|
|
96
|
+
invocationId: string | null;
|
|
97
|
+
assignmentId: string | null;
|
|
98
|
+
sequence: number;
|
|
99
|
+
type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
|
|
100
|
+
payload: Record<string, unknown>;
|
|
101
|
+
id: string;
|
|
102
|
+
actor: {
|
|
103
|
+
kind: "control-plane" | "provider" | "agent" | "user";
|
|
104
|
+
id: string;
|
|
105
|
+
handle: string | null;
|
|
106
|
+
};
|
|
107
|
+
summary: string;
|
|
108
|
+
channel: string;
|
|
109
|
+
occurredAt: string;
|
|
110
|
+
}[];
|
|
111
|
+
updatedAt: string;
|
|
112
|
+
projectStreams: {
|
|
72
113
|
id: string;
|
|
73
114
|
projectId: string;
|
|
74
115
|
projectSlug: string;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
116
|
+
messageRef: string;
|
|
117
|
+
discussionId: string;
|
|
118
|
+
}[];
|
|
78
119
|
replayed: boolean;
|
|
79
120
|
}>;
|
|
80
121
|
sendStatus: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
81
122
|
teamId: string;
|
|
82
123
|
sendId: string;
|
|
83
|
-
}, {
|
|
124
|
+
}, {
|
|
125
|
+
diagnostics?: "metadata" | "full" | undefined;
|
|
126
|
+
}, undefined, {
|
|
127
|
+
teamId: string;
|
|
128
|
+
sendId: string;
|
|
129
|
+
schemaVersion: "treeseed.communication-send-receipt/v4";
|
|
84
130
|
status: "failed" | "running" | "partial" | "complete" | "queued";
|
|
85
|
-
|
|
131
|
+
createdAt: string;
|
|
86
132
|
targets: {
|
|
133
|
+
invocationId: string | null;
|
|
87
134
|
status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
|
|
88
135
|
projectId: string;
|
|
89
136
|
completedAt: string | null;
|
|
90
137
|
agentSlug: string;
|
|
91
138
|
capacity: {
|
|
139
|
+
assignmentId: string | null;
|
|
92
140
|
status: string | null;
|
|
93
141
|
completedAt: string | null;
|
|
94
142
|
providerId: string | null;
|
|
95
|
-
assignmentId: string | null;
|
|
96
143
|
executionProviderId: string | null;
|
|
97
144
|
laneId: string | null;
|
|
98
145
|
lanePurpose: string | null;
|
|
@@ -101,6 +148,27 @@ export declare function communicationOperations(): {
|
|
|
101
148
|
returnedAt: string | null;
|
|
102
149
|
failedAt: string | null;
|
|
103
150
|
};
|
|
151
|
+
diagnostics: {
|
|
152
|
+
resources: Record<string, unknown>;
|
|
153
|
+
reason: string | null;
|
|
154
|
+
provider: {
|
|
155
|
+
providerId: string | null;
|
|
156
|
+
executionProviderId: string | null;
|
|
157
|
+
runtimeVersion: string | null;
|
|
158
|
+
};
|
|
159
|
+
selection: {
|
|
160
|
+
parameters: Record<string, unknown>;
|
|
161
|
+
capabilities: string[];
|
|
162
|
+
model: string | null;
|
|
163
|
+
};
|
|
164
|
+
usage: Record<string, unknown>[];
|
|
165
|
+
availability: "available" | "unavailable" | "partial";
|
|
166
|
+
identityManifest: Record<string, unknown>;
|
|
167
|
+
contextManifest: Record<string, unknown>[];
|
|
168
|
+
timing: Record<string, unknown>;
|
|
169
|
+
traceEvents: Record<string, unknown>[];
|
|
170
|
+
fullPayload?: Record<string, unknown> | undefined;
|
|
171
|
+
};
|
|
104
172
|
projectSlug: string;
|
|
105
173
|
definitionRevision: string;
|
|
106
174
|
revisions: {
|
|
@@ -109,7 +177,6 @@ export declare function communicationOperations(): {
|
|
|
109
177
|
agentDefinition: string;
|
|
110
178
|
chatProfile: string;
|
|
111
179
|
};
|
|
112
|
-
invocationId: string | null;
|
|
113
180
|
requirement: "required" | "optional";
|
|
114
181
|
parentInvocationId: string | null;
|
|
115
182
|
depth: number;
|
|
@@ -119,52 +186,252 @@ export declare function communicationOperations(): {
|
|
|
119
186
|
code: string;
|
|
120
187
|
message: string | null;
|
|
121
188
|
} | null;
|
|
189
|
+
acknowledgedAt: string | null;
|
|
190
|
+
leaseAcceptedAt: string | null;
|
|
122
191
|
}[];
|
|
123
|
-
createdAt: string;
|
|
124
192
|
responses: {
|
|
193
|
+
invocationId: string;
|
|
194
|
+
assignmentId: string | null;
|
|
125
195
|
status: "failed" | "cancelled" | "responded" | "abstained";
|
|
126
|
-
projectId: string;
|
|
127
196
|
createdAt: string;
|
|
197
|
+
projectId: string;
|
|
128
198
|
agentSlug: string;
|
|
129
|
-
|
|
130
|
-
invocationId: string;
|
|
199
|
+
projectSlug: string;
|
|
131
200
|
requirement: "required" | "optional";
|
|
132
201
|
messageRef: string;
|
|
133
202
|
markdown: string;
|
|
134
203
|
}[];
|
|
204
|
+
channel: string;
|
|
205
|
+
topic: {
|
|
206
|
+
id: string;
|
|
207
|
+
slug: string;
|
|
208
|
+
};
|
|
209
|
+
events: {
|
|
210
|
+
teamId: string;
|
|
211
|
+
topicId: string;
|
|
212
|
+
sendId: string | null;
|
|
213
|
+
invocationId: string | null;
|
|
214
|
+
assignmentId: string | null;
|
|
215
|
+
sequence: number;
|
|
216
|
+
type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
|
|
217
|
+
payload: Record<string, unknown>;
|
|
218
|
+
id: string;
|
|
219
|
+
actor: {
|
|
220
|
+
kind: "control-plane" | "provider" | "agent" | "user";
|
|
221
|
+
id: string;
|
|
222
|
+
handle: string | null;
|
|
223
|
+
};
|
|
224
|
+
summary: string;
|
|
225
|
+
channel: string;
|
|
226
|
+
occurredAt: string;
|
|
227
|
+
}[];
|
|
228
|
+
updatedAt: string;
|
|
229
|
+
projectStreams: {
|
|
230
|
+
id: string;
|
|
231
|
+
projectId: string;
|
|
232
|
+
projectSlug: string;
|
|
233
|
+
messageRef: string;
|
|
234
|
+
discussionId: string;
|
|
235
|
+
}[];
|
|
236
|
+
replayed: boolean;
|
|
237
|
+
}>;
|
|
238
|
+
topicsList: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
239
|
+
teamId: string;
|
|
240
|
+
}, {
|
|
241
|
+
status?: "active" | "archived" | undefined;
|
|
242
|
+
cursor?: string | undefined;
|
|
243
|
+
limit?: number | undefined;
|
|
244
|
+
}, undefined, {
|
|
245
|
+
items: {
|
|
246
|
+
teamId: string;
|
|
247
|
+
status: "active" | "archived";
|
|
248
|
+
createdAt: string;
|
|
249
|
+
id: string;
|
|
250
|
+
updatedAt: string;
|
|
251
|
+
slug: string;
|
|
252
|
+
streams: {
|
|
253
|
+
id: string;
|
|
254
|
+
projectId: string;
|
|
255
|
+
projectSlug: string;
|
|
256
|
+
discussionId: string;
|
|
257
|
+
}[];
|
|
258
|
+
listeners: {
|
|
259
|
+
status: "active" | "removed";
|
|
260
|
+
projectId: string;
|
|
261
|
+
source: "operator" | "seed" | "mention";
|
|
262
|
+
agentSlug: string;
|
|
263
|
+
projectSlug: string;
|
|
264
|
+
updatedAt: string;
|
|
265
|
+
agentHandle: string;
|
|
266
|
+
subscribedAt: string;
|
|
267
|
+
}[];
|
|
268
|
+
}[];
|
|
269
|
+
cursor: string | null;
|
|
270
|
+
}>;
|
|
271
|
+
topicsShow: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
135
272
|
teamId: string;
|
|
136
273
|
channel: string;
|
|
274
|
+
}, {}, undefined, {
|
|
275
|
+
teamId: string;
|
|
276
|
+
status: "active" | "archived";
|
|
277
|
+
createdAt: string;
|
|
278
|
+
id: string;
|
|
137
279
|
updatedAt: string;
|
|
138
|
-
|
|
139
|
-
|
|
280
|
+
slug: string;
|
|
281
|
+
streams: {
|
|
282
|
+
id: string;
|
|
283
|
+
projectId: string;
|
|
284
|
+
projectSlug: string;
|
|
285
|
+
discussionId: string;
|
|
286
|
+
}[];
|
|
287
|
+
listeners: {
|
|
288
|
+
status: "active" | "removed";
|
|
289
|
+
projectId: string;
|
|
290
|
+
source: "operator" | "seed" | "mention";
|
|
291
|
+
agentSlug: string;
|
|
292
|
+
projectSlug: string;
|
|
293
|
+
updatedAt: string;
|
|
294
|
+
agentHandle: string;
|
|
295
|
+
subscribedAt: string;
|
|
296
|
+
}[];
|
|
297
|
+
}>;
|
|
298
|
+
topicsTimeline: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
299
|
+
teamId: string;
|
|
300
|
+
channel: string;
|
|
301
|
+
}, {
|
|
302
|
+
limit?: number | undefined;
|
|
303
|
+
diagnostics?: "metadata" | "full" | undefined;
|
|
304
|
+
after?: string | undefined;
|
|
305
|
+
waitSeconds?: number | undefined;
|
|
306
|
+
}, undefined, {
|
|
307
|
+
cursor: string | null;
|
|
140
308
|
topic: {
|
|
309
|
+
teamId: string;
|
|
310
|
+
status: "active" | "archived";
|
|
311
|
+
createdAt: string;
|
|
141
312
|
id: string;
|
|
313
|
+
updatedAt: string;
|
|
142
314
|
slug: string;
|
|
315
|
+
streams: {
|
|
316
|
+
id: string;
|
|
317
|
+
projectId: string;
|
|
318
|
+
projectSlug: string;
|
|
319
|
+
discussionId: string;
|
|
320
|
+
}[];
|
|
321
|
+
listeners: {
|
|
322
|
+
status: "active" | "removed";
|
|
323
|
+
projectId: string;
|
|
324
|
+
source: "operator" | "seed" | "mention";
|
|
325
|
+
agentSlug: string;
|
|
326
|
+
projectSlug: string;
|
|
327
|
+
updatedAt: string;
|
|
328
|
+
agentHandle: string;
|
|
329
|
+
subscribedAt: string;
|
|
330
|
+
}[];
|
|
143
331
|
};
|
|
144
|
-
|
|
332
|
+
events: {
|
|
333
|
+
teamId: string;
|
|
334
|
+
topicId: string;
|
|
335
|
+
sendId: string | null;
|
|
336
|
+
invocationId: string | null;
|
|
337
|
+
assignmentId: string | null;
|
|
338
|
+
sequence: number;
|
|
339
|
+
type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
|
|
340
|
+
payload: Record<string, unknown>;
|
|
145
341
|
id: string;
|
|
342
|
+
actor: {
|
|
343
|
+
kind: "control-plane" | "provider" | "agent" | "user";
|
|
344
|
+
id: string;
|
|
345
|
+
handle: string | null;
|
|
346
|
+
};
|
|
347
|
+
summary: string;
|
|
348
|
+
channel: string;
|
|
349
|
+
occurredAt: string;
|
|
350
|
+
}[];
|
|
351
|
+
}>;
|
|
352
|
+
topicsSubscribe: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
353
|
+
teamId: string;
|
|
354
|
+
channel: string;
|
|
355
|
+
}, {}, {
|
|
356
|
+
agent: string;
|
|
357
|
+
}, {
|
|
358
|
+
topicId: string;
|
|
359
|
+
replayed: boolean;
|
|
360
|
+
listener: {
|
|
361
|
+
status: "active" | "removed";
|
|
146
362
|
projectId: string;
|
|
363
|
+
source: "operator" | "seed" | "mention";
|
|
364
|
+
agentSlug: string;
|
|
147
365
|
projectSlug: string;
|
|
366
|
+
updatedAt: string;
|
|
367
|
+
agentHandle: string;
|
|
368
|
+
subscribedAt: string;
|
|
148
369
|
};
|
|
149
|
-
|
|
150
|
-
|
|
370
|
+
}>;
|
|
371
|
+
topicsUnsubscribe: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
372
|
+
teamId: string;
|
|
373
|
+
channel: string;
|
|
374
|
+
}, {}, {
|
|
375
|
+
agent: string;
|
|
376
|
+
}, {
|
|
377
|
+
topicId: string;
|
|
151
378
|
replayed: boolean;
|
|
379
|
+
listener: {
|
|
380
|
+
status: "active" | "removed";
|
|
381
|
+
projectId: string;
|
|
382
|
+
source: "operator" | "seed" | "mention";
|
|
383
|
+
agentSlug: string;
|
|
384
|
+
projectSlug: string;
|
|
385
|
+
updatedAt: string;
|
|
386
|
+
agentHandle: string;
|
|
387
|
+
subscribedAt: string;
|
|
388
|
+
};
|
|
152
389
|
}>;
|
|
153
390
|
};
|
|
154
391
|
export declare function providerDiscussionResponseOperation(): import("../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
155
392
|
assignmentId: string;
|
|
156
393
|
}, {}, {
|
|
157
|
-
leaseToken: string;
|
|
158
394
|
runnerId: string;
|
|
395
|
+
leaseToken: string;
|
|
159
396
|
summary?: string | undefined;
|
|
160
397
|
usage?: Record<string, unknown> | undefined;
|
|
161
398
|
markdown?: string | undefined;
|
|
162
399
|
outcome?: "responded" | "abstained" | undefined;
|
|
163
400
|
}, {
|
|
164
|
-
status: "responded" | "abstained";
|
|
165
|
-
schemaVersion: "treeseed.provider-discussion-response-receipt/v1";
|
|
166
|
-
assignmentId: string;
|
|
167
401
|
invocationId: string;
|
|
402
|
+
assignmentId: string;
|
|
403
|
+
schemaVersion: "treeseed.provider-discussion-response-receipt/v1";
|
|
404
|
+
status: "responded" | "abstained";
|
|
168
405
|
messageRef: string;
|
|
169
406
|
settledAt: string;
|
|
170
407
|
}>;
|
|
408
|
+
export declare function providerCommunicationLifecycleOperations(): {
|
|
409
|
+
notificationAcknowledge: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
410
|
+
assignmentId: string;
|
|
411
|
+
}, {}, {
|
|
412
|
+
providerId: string;
|
|
413
|
+
runnerId: string;
|
|
414
|
+
observedAt: string;
|
|
415
|
+
}, {
|
|
416
|
+
assignmentId: string;
|
|
417
|
+
acknowledgedAt: string;
|
|
418
|
+
replayed: boolean;
|
|
419
|
+
}>;
|
|
420
|
+
traceEvent: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
|
|
421
|
+
assignmentId: string;
|
|
422
|
+
}, {}, {
|
|
423
|
+
sequence: number;
|
|
424
|
+
type: string;
|
|
425
|
+
payload: Record<string, unknown>;
|
|
426
|
+
summary: string;
|
|
427
|
+
occurredAt: string;
|
|
428
|
+
runnerId: string;
|
|
429
|
+
leaseToken: string;
|
|
430
|
+
protectedPayload?: Record<string, unknown> | undefined;
|
|
431
|
+
}, {
|
|
432
|
+
assignmentId: string;
|
|
433
|
+
sequence: number;
|
|
434
|
+
replayed: boolean;
|
|
435
|
+
acceptedAt: string;
|
|
436
|
+
}>;
|
|
437
|
+
};
|
|
@@ -3,6 +3,13 @@ import { defineOperation } from "../operation-builder.js";
|
|
|
3
3
|
import {
|
|
4
4
|
communicationSendReceiptSchema,
|
|
5
5
|
communicationSendRequestSchema,
|
|
6
|
+
communicationTopicPageSchema,
|
|
7
|
+
communicationTopicSchema,
|
|
8
|
+
communicationTopicSubscriptionReceiptSchema,
|
|
9
|
+
communicationTopicSubscriptionRequestSchema,
|
|
10
|
+
communicationTopicTimelineSchema,
|
|
11
|
+
providerCommunicationNotificationAcknowledgeRequestSchema,
|
|
12
|
+
providerCommunicationTraceEventRequestSchema,
|
|
6
13
|
providerDiscussionResponseReceiptSchema,
|
|
7
14
|
providerDiscussionResponseRequestSchema
|
|
8
15
|
} from "../communication/contracts.js";
|
|
@@ -10,7 +17,7 @@ const empty = z.object({}).strict();
|
|
|
10
17
|
const none = z.undefined();
|
|
11
18
|
function communicationOperations() {
|
|
12
19
|
return {
|
|
13
|
-
send: defineOperation({ operationId: "communications.send", description: "Post a team discussion-topic message and admit
|
|
20
|
+
send: defineOperation({ operationId: "communications.send", description: "Post a team discussion-topic message and admit every addressed team agent to its project communication stream.", rest: { method: "POST", path: "/v1/teams/{teamId}/discussion-topics/{channel}/messages" }, parameters: "treeseed.communications.send.parameters/v3", capability: "agents.execute", authentication: "oauth", oauthScopes: ["treeseed:execution"], kind: "mutation", riskClass: "ordinary", confirmation: "never", surfaces: ["rest", "cli", "mcp_tool"], cacheScope: "none", pagination: "none" }, {
|
|
14
21
|
path: z.object({ teamId: z.string().min(1), channel: z.string().trim().min(1).max(120) }).strict(),
|
|
15
22
|
query: empty,
|
|
16
23
|
body: communicationSendRequestSchema,
|
|
@@ -18,9 +25,39 @@ function communicationOperations() {
|
|
|
18
25
|
}),
|
|
19
26
|
sendStatus: defineOperation({ operationId: "communications.sends.show", description: "Read a communication send and its durable agent responses.", rest: { method: "GET", path: "/v1/teams/{teamId}/communication-sends/{sendId}" }, parameters: "treeseed.communications.sends.show.parameters/v1", capability: "agents.read", authentication: "oauth", oauthScopes: ["treeseed:read"], kind: "read", riskClass: "ordinary", confirmation: "never", surfaces: ["rest", "mcp_tool", "mcp_resource"], cacheScope: "principal", pagination: "none" }, {
|
|
20
27
|
path: z.object({ teamId: z.string().min(1), sendId: z.string().min(1) }).strict(),
|
|
21
|
-
query:
|
|
28
|
+
query: z.object({ diagnostics: z.enum(["metadata", "full"]).optional() }).strict(),
|
|
22
29
|
body: none,
|
|
23
30
|
output: communicationSendReceiptSchema
|
|
31
|
+
}),
|
|
32
|
+
topicsList: defineOperation({ operationId: "communications.topics.list", description: "List team discussion topics and active listeners.", rest: { method: "GET", path: "/v1/teams/{teamId}/discussion-topics" }, parameters: "treeseed.communications.topics.list.parameters/v1", capability: "agents.read", authentication: "oauth", oauthScopes: ["treeseed:read"], kind: "read", riskClass: "ordinary", confirmation: "never", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"], cacheScope: "principal", pagination: "cursor" }, {
|
|
33
|
+
path: z.object({ teamId: z.string().min(1) }).strict(),
|
|
34
|
+
query: z.object({ status: z.enum(["active", "archived"]).optional(), limit: z.coerce.number().int().min(1).max(200).optional(), cursor: z.string().optional() }).strict(),
|
|
35
|
+
body: none,
|
|
36
|
+
output: communicationTopicPageSchema
|
|
37
|
+
}),
|
|
38
|
+
topicsShow: defineOperation({ operationId: "communications.topics.show", description: "Show one discussion topic, streams, and listeners.", rest: { method: "GET", path: "/v1/teams/{teamId}/discussion-topics/{channel}" }, parameters: "treeseed.communications.topics.show.parameters/v1", capability: "agents.read", authentication: "oauth", oauthScopes: ["treeseed:read"], kind: "read", riskClass: "ordinary", confirmation: "never", surfaces: ["rest", "cli", "mcp_tool", "mcp_resource"], cacheScope: "principal", pagination: "none" }, {
|
|
39
|
+
path: z.object({ teamId: z.string().min(1), channel: z.string().min(1) }).strict(),
|
|
40
|
+
query: empty,
|
|
41
|
+
body: none,
|
|
42
|
+
output: communicationTopicSchema
|
|
43
|
+
}),
|
|
44
|
+
topicsTimeline: defineOperation({ operationId: "communications.topics.timeline", description: "Read the ordered durable timeline for a discussion topic.", rest: { method: "GET", path: "/v1/teams/{teamId}/discussion-topics/{channel}/timeline" }, parameters: "treeseed.communications.topics.timeline.parameters/v1", capability: "agents.read", authentication: "oauth", oauthScopes: ["treeseed:read"], kind: "read", riskClass: "ordinary", confirmation: "never", surfaces: ["rest", "mcp_tool", "mcp_resource"], cacheScope: "principal", pagination: "cursor" }, {
|
|
45
|
+
path: z.object({ teamId: z.string().min(1), channel: z.string().min(1) }).strict(),
|
|
46
|
+
query: z.object({ after: z.string().optional(), waitSeconds: z.coerce.number().int().min(0).max(30).optional(), limit: z.coerce.number().int().min(1).max(500).optional(), diagnostics: z.enum(["metadata", "full"]).optional() }).strict(),
|
|
47
|
+
body: none,
|
|
48
|
+
output: communicationTopicTimelineSchema
|
|
49
|
+
}),
|
|
50
|
+
topicsSubscribe: defineOperation({ operationId: "communications.topics.subscriptions.put", description: "Subscribe an agent to a discussion topic.", rest: { method: "PUT", path: "/v1/teams/{teamId}/discussion-topics/{channel}/subscriptions" }, parameters: "treeseed.communications.topics.subscriptions.put.parameters/v1", capability: "agents.execute", authentication: "oauth", oauthScopes: ["treeseed:execution"], kind: "mutation", riskClass: "ordinary", confirmation: "never", surfaces: ["rest", "cli", "mcp_tool"], cacheScope: "none", pagination: "none" }, {
|
|
51
|
+
path: z.object({ teamId: z.string().min(1), channel: z.string().min(1) }).strict(),
|
|
52
|
+
query: empty,
|
|
53
|
+
body: communicationTopicSubscriptionRequestSchema,
|
|
54
|
+
output: communicationTopicSubscriptionReceiptSchema
|
|
55
|
+
}),
|
|
56
|
+
topicsUnsubscribe: defineOperation({ operationId: "communications.topics.subscriptions.delete", description: "Remove an agent subscription from a discussion topic.", rest: { method: "DELETE", path: "/v1/teams/{teamId}/discussion-topics/{channel}/subscriptions" }, parameters: "treeseed.communications.topics.subscriptions.delete.parameters/v1", capability: "agents.execute", authentication: "oauth", oauthScopes: ["treeseed:execution"], kind: "mutation", riskClass: "ordinary", confirmation: "never", surfaces: ["rest", "cli", "mcp_tool"], cacheScope: "none", pagination: "none" }, {
|
|
57
|
+
path: z.object({ teamId: z.string().min(1), channel: z.string().min(1) }).strict(),
|
|
58
|
+
query: empty,
|
|
59
|
+
body: communicationTopicSubscriptionRequestSchema,
|
|
60
|
+
output: communicationTopicSubscriptionReceiptSchema
|
|
24
61
|
})
|
|
25
62
|
};
|
|
26
63
|
}
|
|
@@ -32,7 +69,24 @@ function providerDiscussionResponseOperation() {
|
|
|
32
69
|
output: providerDiscussionResponseReceiptSchema
|
|
33
70
|
});
|
|
34
71
|
}
|
|
72
|
+
function providerCommunicationLifecycleOperations() {
|
|
73
|
+
return {
|
|
74
|
+
notificationAcknowledge: defineOperation({ operationId: "providers.assignments.communication.acknowledge", description: "Acknowledge provider observation of an addressed communication mention.", rest: { method: "POST", path: "/v1/provider/assignments/{assignmentId}/communication-acknowledgement" }, parameters: "treeseed.providers.assignments.communication.acknowledge.parameters/v1", capability: "providers.execute", authentication: "provider", oauthScopes: [], kind: "mutation", riskClass: "ordinary", confirmation: "never", surfaces: ["rest"], cacheScope: "none", pagination: "none" }, {
|
|
75
|
+
path: z.object({ assignmentId: z.string().min(1) }).strict(),
|
|
76
|
+
query: empty,
|
|
77
|
+
body: providerCommunicationNotificationAcknowledgeRequestSchema,
|
|
78
|
+
output: z.object({ assignmentId: z.string(), acknowledgedAt: z.string().datetime(), replayed: z.boolean() }).strict()
|
|
79
|
+
}),
|
|
80
|
+
traceEvent: defineOperation({ operationId: "providers.assignments.communication.trace.create", description: "Append one provider-authored communication execution trace event.", rest: { method: "POST", path: "/v1/provider/assignments/{assignmentId}/communication-trace-events" }, parameters: "treeseed.providers.assignments.communication.trace.create.parameters/v1", capability: "providers.execute", authentication: "provider", oauthScopes: [], kind: "mutation", riskClass: "ordinary", confirmation: "never", surfaces: ["rest"], cacheScope: "none", pagination: "none" }, {
|
|
81
|
+
path: z.object({ assignmentId: z.string().min(1) }).strict(),
|
|
82
|
+
query: empty,
|
|
83
|
+
body: providerCommunicationTraceEventRequestSchema,
|
|
84
|
+
output: z.object({ assignmentId: z.string(), sequence: z.number().int().nonnegative(), acceptedAt: z.string().datetime(), replayed: z.boolean() }).strict()
|
|
85
|
+
})
|
|
86
|
+
};
|
|
87
|
+
}
|
|
35
88
|
export {
|
|
36
89
|
communicationOperations,
|
|
90
|
+
providerCommunicationLifecycleOperations,
|
|
37
91
|
providerDiscussionResponseOperation
|
|
38
92
|
};
|