@treeseed/sdk 0.13.0-rc.52 → 0.13.0-rc.54
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/validation/agent-lab-forensics-schema.d.ts +2 -2
- package/dist/capacity-provider/client.d.ts +15 -0
- package/dist/capacity-provider/client.js +6 -0
- package/dist/content/validation/agent-operational-content-schemas.d.ts +14 -14
- package/dist/content/validation/auxiliary-content-schemas.d.ts +4 -4
- package/dist/content/validation/content-model-schemas.d.ts +28 -28
- package/dist/content/validation/portable-content-data.d.ts +5 -5
- package/dist/deployment/schemas.js +1 -1
- package/dist/operator-contracts/canonical-command-tree.js +26 -5
- package/dist/operator-contracts/catalog/communication-operations.d.ts +286 -19
- 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 +1223 -33
- package/dist/operator-contracts/communication/contracts.js +99 -7
- package/dist/operator-contracts/control-plane-operations.d.ts +577 -51
- 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/package.json +1 -1
|
@@ -14,7 +14,11 @@ const operationBindings = {
|
|
|
14
14
|
"auth logout": protocol("protocol.oauth.revoke"),
|
|
15
15
|
"auth status": operation("accounts.current.show"),
|
|
16
16
|
"users create": protocol("protocol.accounts.create"),
|
|
17
|
-
"send": operation("communications.send", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "channel"
|
|
17
|
+
"send": operation("communications.send", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "channel"), field("body", "message", "argument", "message"), field("body", "recipients", "option", "to"), field("body", "timeoutSeconds", "option", "timeout", false, "integer")]),
|
|
18
|
+
"topics list": operation("communications.topics.list", [field("path", "teamId", "context", "team", true), ...page()]),
|
|
19
|
+
"topics show": operation("communications.topics.show", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "topic", true)]),
|
|
20
|
+
"topics subscribe": operation("communications.topics.subscriptions.put", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "topic", true), field("body", "agent", "argument", "agent", true)]),
|
|
21
|
+
"topics unsubscribe": operation("communications.topics.subscriptions.delete", [field("path", "teamId", "context", "team", true), field("path", "channel", "argument", "topic", true), field("body", "agent", "argument", "agent", true)]),
|
|
18
22
|
"teams list": operation("teams.list", page()),
|
|
19
23
|
"teams current": local("local.teams.current"),
|
|
20
24
|
"teams use": local("local.teams.use"),
|
|
@@ -47,6 +51,10 @@ const operationBindings = {
|
|
|
47
51
|
"host topology": local("local.host.topology"),
|
|
48
52
|
"host connections": local("local.host.connections"),
|
|
49
53
|
"host provider status": local("local.host.provider.status"),
|
|
54
|
+
"host storage status": local("local.host.storage.status"),
|
|
55
|
+
"host storage connect": local("local.host.storage.connect"),
|
|
56
|
+
"host storage reconcile": local("local.host.storage.reconcile"),
|
|
57
|
+
"host storage rotate": local("local.host.storage.rotate"),
|
|
50
58
|
"host fleet status": local("local.host.fleet.status"),
|
|
51
59
|
"host recovery status": local("local.host.recovery.status"),
|
|
52
60
|
"host recovery retry": local("local.host.recovery.retry"),
|
|
@@ -92,8 +100,8 @@ const operationBindings = {
|
|
|
92
100
|
"seeds verify": operation("seeds.verify", [field("path", "name", "argument", "seed", true)]),
|
|
93
101
|
"plans list": operation("plans.list", [field("path", "decisionId", "option", "decision", true), ...page()]),
|
|
94
102
|
"plans show": operation("plans.show", [field("path", "capacityPlanId", "argument", "plan", true)]),
|
|
95
|
-
"workdays plan": operation("workdays.plan", [field("path", "teamId", "context", "team", true), field("body", "
|
|
96
|
-
"workdays start": operation("workdays.start", [field("path", "teamId", "context", "team", true), field("body", "preflightId", "option", "preflight", true), field("body", "
|
|
103
|
+
"workdays plan": operation("workdays.plan", [field("path", "teamId", "context", "team", true), field("body", "profileId", "option", "profile"), field("body", "projects", "option", "projects", false, "csv"), field("body", "startsAt", "option", "start"), field("body", "endsAt", "option", "end"), field("body", "durationSeconds", "option", "duration", false, "integer"), field("body", "objectiveFilters", "option", "objective", false, "csv")]),
|
|
104
|
+
"workdays start": operation("workdays.start", [field("path", "teamId", "context", "team", true), field("body", "preflightId", "option", "preflight", true), field("body", "preflightDigest", "option", "digest", true)]),
|
|
97
105
|
"workdays list": operation("workdays.list", [field("path", "teamId", "context", "team", true), ...page()]),
|
|
98
106
|
"workdays show": operation("workdays.show", [field("path", "teamId", "context", "team", true), field("path", "runId", "argument", "workday", true)]),
|
|
99
107
|
"workdays schedules list": operation("workdays.schedules.list", [field("path", "teamId", "context", "team", true)]),
|
|
@@ -166,7 +174,7 @@ function branch(segment, children) {
|
|
|
166
174
|
return { nodeType: "branch", segment, description: `${segment[0].toUpperCase()}${segment.slice(1)} operations.`, children };
|
|
167
175
|
}
|
|
168
176
|
function configurationAdopt() {
|
|
169
|
-
const value = leaf("adopt", "mutation", "file", "
|
|
177
|
+
const value = leaf("adopt", "mutation", "file", "destructive");
|
|
170
178
|
if (value.nodeType !== "leaf") throw new Error("Configuration adoption must be a leaf command.");
|
|
171
179
|
value.options = [...value.options ?? [], { name: "--confirm", description: "Confirm replacement of the installed configuration identity.", type: "boolean" }];
|
|
172
180
|
return value;
|
|
@@ -246,7 +254,14 @@ const commandTree = {
|
|
|
246
254
|
schemaVersion: "treeseed.command-tree/v1",
|
|
247
255
|
executable: "trsd",
|
|
248
256
|
commands: [
|
|
249
|
-
{ nodeType: "leaf", segment: "
|
|
257
|
+
{ nodeType: "leaf", segment: "inbox", description: "Open the active team governance inbox.", kind: "read", options: [{ name: "--project", description: "Initial project filter.", type: "string" }, { name: "--type", description: "Initial proposal, question, or all filter.", type: "string" }, { name: "--all", description: "Include completed and decided items.", type: "boolean" }], resultSchemaId: "treeseed.inbox-session/v1", execution: local("local.inbox") },
|
|
258
|
+
{ nodeType: "leaf", segment: "send", description: "Send a message or open the interactive team topic browser.", kind: "mutation", arguments: [{ name: "channel", description: "Optional team discussion topic to preselect.", required: false }, { name: "message", description: "Markdown message containing agent addresses.", required: false }], options: [planOption, { name: "--team", description: "One-command team override.", type: "string" }, { name: "--to", description: "Deprecated validation-only address list.", type: "string[]" }, { name: "--timeout", description: "Optional maximum seconds to listen for the complete response chain.", type: "number" }, { name: "--no-wait", description: "Return immediately after durable admission.", type: "boolean" }, { name: "--wait", description: "Deprecated wait duration in seconds.", type: "number" }, { name: "--json-stream", description: "Emit ordered communication events as NDJSON.", type: "boolean" }, { name: "--diagnostics", description: "Diagnostic detail: metadata or full.", type: "string" }], authorization: { capability: "agents.execute", confirmation: "never" }, resultSchemaId: "treeseed.communication-send-receipt/v4", execution: unavailable() },
|
|
259
|
+
branch("topics", [
|
|
260
|
+
{ nodeType: "leaf", segment: "list", description: "List discussion topics and active listeners.", kind: "read", options: [{ name: "--status", description: "Topic status.", type: "string" }, { name: "--limit", description: "Maximum topics.", type: "number" }, { name: "--cursor", description: "Pagination cursor.", type: "string" }], resultSchemaId: "treeseed.communication-topic-page/v1", execution: unavailable() },
|
|
261
|
+
{ nodeType: "leaf", segment: "show", description: "Show a discussion topic and its listeners.", kind: "read", arguments: [{ name: "topic", description: "Discussion topic.", required: true }], resultSchemaId: "treeseed.communication-topic/v1", execution: unavailable() },
|
|
262
|
+
{ nodeType: "leaf", segment: "subscribe", description: "Subscribe an agent to a discussion topic.", kind: "mutation", arguments: [{ name: "topic", description: "Discussion topic.", required: true }, { name: "agent", description: "@project/agent handle.", required: true }], options: [planOption], authorization: { capability: "agents.execute", confirmation: "never" }, resultSchemaId: "treeseed.communication-topic-subscription-receipt/v1", execution: unavailable() },
|
|
263
|
+
{ nodeType: "leaf", segment: "unsubscribe", description: "Remove an agent subscription from a discussion topic.", kind: "mutation", arguments: [{ name: "topic", description: "Discussion topic.", required: true }, { name: "agent", description: "@project/agent handle.", required: true }], options: [planOption], authorization: { capability: "agents.execute", confirmation: "never" }, resultSchemaId: "treeseed.communication-topic-subscription-receipt/v1", execution: unavailable() }
|
|
264
|
+
]),
|
|
250
265
|
branch("auth", [authLogin(), leaf("logout", "mutation"), leaf("status")]),
|
|
251
266
|
branch("users", [userCreate()]),
|
|
252
267
|
branch("teams", [leaf("list"), { nodeType: "leaf", segment: "current", description: "Show the active team for this authenticated server session.", kind: "read", resultSchemaId: "treeseed.command.teams.current/v1", execution: unavailable() }, { nodeType: "leaf", segment: "use", description: "Select the active team for this authenticated server session.", kind: "mutation", arguments: [{ name: "team", description: "Team UUID or unambiguous slug.", required: true }], options: [planOption], authorization: { capability: "teams.read", confirmation: "never" }, resultSchemaId: "treeseed.command.teams.use/v1", execution: unavailable() }]),
|
|
@@ -275,6 +290,12 @@ const commandTree = {
|
|
|
275
290
|
leaf("topology"),
|
|
276
291
|
leaf("connections"),
|
|
277
292
|
branch("provider", [leaf("status")]),
|
|
293
|
+
branch("storage", [
|
|
294
|
+
leaf("status"),
|
|
295
|
+
addOptions(leaf("connect", "mutation", "backend", "credential"), [{ name: "--account-id", description: "Optional Cloudflare account ID when the bootstrap authority reaches multiple accounts.", type: "string" }]),
|
|
296
|
+
leaf("reconcile", "mutation", void 0, "authority"),
|
|
297
|
+
leaf("rotate", "mutation", "backend", "credential")
|
|
298
|
+
]),
|
|
278
299
|
branch("fleet", [leaf("status")]),
|
|
279
300
|
branch("update", [leaf("status"), leaf("check", "mutation"), leaf("apply", "mutation", void 0, "authority"), leaf("channel", "mutation", "track", "authority"), leaf("pause", "mutation", void 0, "authority"), leaf("resume", "mutation", void 0, "authority")]),
|
|
280
301
|
branch("component", [leaf("list"), leaf("status", "read", "component"), leaf("enable", "mutation", "component", "authority"), leaf("disable", "mutation", "component", "destructive")]),
|
|
@@ -4,12 +4,11 @@ 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
|
}, {
|
|
11
10
|
status: "failed" | "running" | "partial" | "complete" | "queued";
|
|
12
|
-
schemaVersion: "treeseed.communication-send-receipt/
|
|
11
|
+
schemaVersion: "treeseed.communication-send-receipt/v4";
|
|
13
12
|
targets: {
|
|
14
13
|
status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
|
|
15
14
|
projectId: string;
|
|
@@ -28,6 +27,28 @@ export declare function communicationOperations(): {
|
|
|
28
27
|
returnedAt: string | null;
|
|
29
28
|
failedAt: string | null;
|
|
30
29
|
};
|
|
30
|
+
diagnostics: {
|
|
31
|
+
resources: Record<string, unknown>;
|
|
32
|
+
reason: string | null;
|
|
33
|
+
provider: {
|
|
34
|
+
providerId: string | null;
|
|
35
|
+
executionProviderId: string | null;
|
|
36
|
+
runtimeVersion: string | null;
|
|
37
|
+
};
|
|
38
|
+
selection: {
|
|
39
|
+
parameters: Record<string, unknown>;
|
|
40
|
+
capabilities: string[];
|
|
41
|
+
model: string | null;
|
|
42
|
+
};
|
|
43
|
+
usage: Record<string, unknown>[];
|
|
44
|
+
availability: "available" | "unavailable" | "partial";
|
|
45
|
+
identityManifest: Record<string, unknown>;
|
|
46
|
+
contextManifest: Record<string, unknown>[];
|
|
47
|
+
timing: Record<string, unknown>;
|
|
48
|
+
traceEvents: Record<string, unknown>[];
|
|
49
|
+
fullPayload?: Record<string, unknown> | undefined;
|
|
50
|
+
};
|
|
51
|
+
invocationId: string | null;
|
|
31
52
|
projectSlug: string;
|
|
32
53
|
definitionRevision: string;
|
|
33
54
|
revisions: {
|
|
@@ -36,7 +57,6 @@ export declare function communicationOperations(): {
|
|
|
36
57
|
agentDefinition: string;
|
|
37
58
|
chatProfile: string;
|
|
38
59
|
};
|
|
39
|
-
invocationId: string | null;
|
|
40
60
|
requirement: "required" | "optional";
|
|
41
61
|
parentInvocationId: string | null;
|
|
42
62
|
depth: number;
|
|
@@ -46,6 +66,8 @@ export declare function communicationOperations(): {
|
|
|
46
66
|
code: string;
|
|
47
67
|
message: string | null;
|
|
48
68
|
} | null;
|
|
69
|
+
acknowledgedAt: string | null;
|
|
70
|
+
leaseAcceptedAt: string | null;
|
|
49
71
|
}[];
|
|
50
72
|
createdAt: string;
|
|
51
73
|
responses: {
|
|
@@ -55,34 +77,55 @@ export declare function communicationOperations(): {
|
|
|
55
77
|
agentSlug: string;
|
|
56
78
|
assignmentId: string | null;
|
|
57
79
|
invocationId: string;
|
|
80
|
+
projectSlug: string;
|
|
58
81
|
requirement: "required" | "optional";
|
|
59
82
|
messageRef: string;
|
|
60
83
|
markdown: string;
|
|
61
84
|
}[];
|
|
62
85
|
teamId: string;
|
|
63
86
|
channel: string;
|
|
64
|
-
updatedAt: string;
|
|
65
|
-
messageRef: string;
|
|
66
|
-
sendId: string;
|
|
67
87
|
topic: {
|
|
68
88
|
id: string;
|
|
69
89
|
slug: string;
|
|
70
90
|
};
|
|
71
|
-
|
|
91
|
+
events: {
|
|
92
|
+
type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
|
|
93
|
+
id: string;
|
|
94
|
+
actor: {
|
|
95
|
+
kind: "control-plane" | "provider" | "agent" | "user";
|
|
96
|
+
id: string;
|
|
97
|
+
handle: string | null;
|
|
98
|
+
};
|
|
99
|
+
summary: string;
|
|
100
|
+
teamId: string;
|
|
101
|
+
channel: string;
|
|
102
|
+
assignmentId: string | null;
|
|
103
|
+
sequence: number;
|
|
104
|
+
topicId: string;
|
|
105
|
+
occurredAt: string;
|
|
106
|
+
sendId: string | null;
|
|
107
|
+
invocationId: string | null;
|
|
108
|
+
payload: Record<string, unknown>;
|
|
109
|
+
}[];
|
|
110
|
+
sendId: string;
|
|
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, {
|
|
84
127
|
status: "failed" | "running" | "partial" | "complete" | "queued";
|
|
85
|
-
schemaVersion: "treeseed.communication-send-receipt/
|
|
128
|
+
schemaVersion: "treeseed.communication-send-receipt/v4";
|
|
86
129
|
targets: {
|
|
87
130
|
status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
|
|
88
131
|
projectId: string;
|
|
@@ -101,6 +144,28 @@ export declare function communicationOperations(): {
|
|
|
101
144
|
returnedAt: string | null;
|
|
102
145
|
failedAt: string | null;
|
|
103
146
|
};
|
|
147
|
+
diagnostics: {
|
|
148
|
+
resources: Record<string, unknown>;
|
|
149
|
+
reason: string | null;
|
|
150
|
+
provider: {
|
|
151
|
+
providerId: string | null;
|
|
152
|
+
executionProviderId: string | null;
|
|
153
|
+
runtimeVersion: string | null;
|
|
154
|
+
};
|
|
155
|
+
selection: {
|
|
156
|
+
parameters: Record<string, unknown>;
|
|
157
|
+
capabilities: string[];
|
|
158
|
+
model: string | null;
|
|
159
|
+
};
|
|
160
|
+
usage: Record<string, unknown>[];
|
|
161
|
+
availability: "available" | "unavailable" | "partial";
|
|
162
|
+
identityManifest: Record<string, unknown>;
|
|
163
|
+
contextManifest: Record<string, unknown>[];
|
|
164
|
+
timing: Record<string, unknown>;
|
|
165
|
+
traceEvents: Record<string, unknown>[];
|
|
166
|
+
fullPayload?: Record<string, unknown> | undefined;
|
|
167
|
+
};
|
|
168
|
+
invocationId: string | null;
|
|
104
169
|
projectSlug: string;
|
|
105
170
|
definitionRevision: string;
|
|
106
171
|
revisions: {
|
|
@@ -109,7 +174,6 @@ export declare function communicationOperations(): {
|
|
|
109
174
|
agentDefinition: string;
|
|
110
175
|
chatProfile: string;
|
|
111
176
|
};
|
|
112
|
-
invocationId: string | null;
|
|
113
177
|
requirement: "required" | "optional";
|
|
114
178
|
parentInvocationId: string | null;
|
|
115
179
|
depth: number;
|
|
@@ -119,6 +183,8 @@ export declare function communicationOperations(): {
|
|
|
119
183
|
code: string;
|
|
120
184
|
message: string | null;
|
|
121
185
|
} | null;
|
|
186
|
+
acknowledgedAt: string | null;
|
|
187
|
+
leaseAcceptedAt: string | null;
|
|
122
188
|
}[];
|
|
123
189
|
createdAt: string;
|
|
124
190
|
responses: {
|
|
@@ -128,34 +194,205 @@ export declare function communicationOperations(): {
|
|
|
128
194
|
agentSlug: string;
|
|
129
195
|
assignmentId: string | null;
|
|
130
196
|
invocationId: string;
|
|
197
|
+
projectSlug: string;
|
|
131
198
|
requirement: "required" | "optional";
|
|
132
199
|
messageRef: string;
|
|
133
200
|
markdown: string;
|
|
134
201
|
}[];
|
|
135
202
|
teamId: string;
|
|
136
203
|
channel: string;
|
|
137
|
-
|
|
138
|
-
|
|
204
|
+
topic: {
|
|
205
|
+
id: string;
|
|
206
|
+
slug: string;
|
|
207
|
+
};
|
|
208
|
+
events: {
|
|
209
|
+
type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
|
|
210
|
+
id: string;
|
|
211
|
+
actor: {
|
|
212
|
+
kind: "control-plane" | "provider" | "agent" | "user";
|
|
213
|
+
id: string;
|
|
214
|
+
handle: string | null;
|
|
215
|
+
};
|
|
216
|
+
summary: string;
|
|
217
|
+
teamId: string;
|
|
218
|
+
channel: string;
|
|
219
|
+
assignmentId: string | null;
|
|
220
|
+
sequence: number;
|
|
221
|
+
topicId: string;
|
|
222
|
+
occurredAt: string;
|
|
223
|
+
sendId: string | null;
|
|
224
|
+
invocationId: string | null;
|
|
225
|
+
payload: Record<string, unknown>;
|
|
226
|
+
}[];
|
|
139
227
|
sendId: string;
|
|
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
|
+
status: "active" | "archived";
|
|
247
|
+
id: string;
|
|
248
|
+
createdAt: string;
|
|
249
|
+
teamId: 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<{
|
|
272
|
+
teamId: string;
|
|
273
|
+
channel: string;
|
|
274
|
+
}, {}, undefined, {
|
|
275
|
+
status: "active" | "archived";
|
|
276
|
+
id: string;
|
|
277
|
+
createdAt: string;
|
|
278
|
+
teamId: string;
|
|
279
|
+
updatedAt: string;
|
|
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
|
+
status: "active" | "archived";
|
|
141
310
|
id: string;
|
|
311
|
+
createdAt: string;
|
|
312
|
+
teamId: 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
|
+
type: "message.posted" | "mention.acknowledged" | "response_lease.accepted" | "agent.progress" | "agent.response" | "agent.abstained" | "agent.failed";
|
|
145
334
|
id: string;
|
|
335
|
+
actor: {
|
|
336
|
+
kind: "control-plane" | "provider" | "agent" | "user";
|
|
337
|
+
id: string;
|
|
338
|
+
handle: string | null;
|
|
339
|
+
};
|
|
340
|
+
summary: string;
|
|
341
|
+
teamId: string;
|
|
342
|
+
channel: string;
|
|
343
|
+
assignmentId: string | null;
|
|
344
|
+
sequence: number;
|
|
345
|
+
topicId: string;
|
|
346
|
+
occurredAt: string;
|
|
347
|
+
sendId: string | null;
|
|
348
|
+
invocationId: string | null;
|
|
349
|
+
payload: Record<string, unknown>;
|
|
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;
|
|
@@ -168,3 +405,33 @@ export declare function providerDiscussionResponseOperation(): import("../contro
|
|
|
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
|
+
type: string;
|
|
424
|
+
summary: string;
|
|
425
|
+
sequence: number;
|
|
426
|
+
occurredAt: string;
|
|
427
|
+
payload: Record<string, unknown>;
|
|
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
|
};
|