@treeseed/sdk 0.13.0-rc.15 → 0.13.0-rc.17

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.
@@ -141,7 +141,7 @@ export declare const agentInstructionTemplateContentSchema: z.ZodObject<{
141
141
  appliesToProfiles: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
142
142
  }, "strict", z.ZodTypeAny, {
143
143
  id: string;
144
- kind: "message" | "summary" | "plan" | "status";
144
+ kind: "message" | "summary" | "status" | "plan";
145
145
  description: string;
146
146
  title: string;
147
147
  revision: number;
@@ -151,7 +151,7 @@ export declare const agentInstructionTemplateContentSchema: z.ZodObject<{
151
151
  outputSkeleton?: string | undefined;
152
152
  }, {
153
153
  id: string;
154
- kind: "message" | "summary" | "plan" | "status";
154
+ kind: "message" | "summary" | "status" | "plan";
155
155
  description: string;
156
156
  title: string;
157
157
  revision: number;
@@ -470,8 +470,8 @@ export declare const assignmentSummaryContentSchema: z.ZodObject<{
470
470
  }, "strict", z.ZodTypeAny, {
471
471
  id: string;
472
472
  summary: string;
473
- blockers: string[];
474
473
  status: "completed" | "cancelled" | "failed" | "suspended";
474
+ blockers: string[];
475
475
  projectId: string;
476
476
  teamId: string;
477
477
  title: string;
@@ -811,7 +811,7 @@ export declare const agentOperationalContentSchemas: {
811
811
  appliesToProfiles: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
812
812
  }, "strict", z.ZodTypeAny, {
813
813
  id: string;
814
- kind: "message" | "summary" | "plan" | "status";
814
+ kind: "message" | "summary" | "status" | "plan";
815
815
  description: string;
816
816
  title: string;
817
817
  revision: number;
@@ -821,7 +821,7 @@ export declare const agentOperationalContentSchemas: {
821
821
  outputSkeleton?: string | undefined;
822
822
  }, {
823
823
  id: string;
824
- kind: "message" | "summary" | "plan" | "status";
824
+ kind: "message" | "summary" | "status" | "plan";
825
825
  description: string;
826
826
  title: string;
827
827
  revision: number;
@@ -1140,8 +1140,8 @@ export declare const agentOperationalContentSchemas: {
1140
1140
  }, "strict", z.ZodTypeAny, {
1141
1141
  id: string;
1142
1142
  summary: string;
1143
- blockers: string[];
1144
1143
  status: "completed" | "cancelled" | "failed" | "suspended";
1144
+ blockers: string[];
1145
1145
  projectId: string;
1146
1146
  teamId: string;
1147
1147
  title: string;
@@ -144,7 +144,7 @@ declare const schemas: {
144
144
  appliesToProfiles: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
145
145
  }, "strict", z.ZodTypeAny, {
146
146
  id: string;
147
- kind: "message" | "summary" | "plan" | "status";
147
+ kind: "message" | "summary" | "status" | "plan";
148
148
  description: string;
149
149
  title: string;
150
150
  revision: number;
@@ -154,7 +154,7 @@ declare const schemas: {
154
154
  outputSkeleton?: string | undefined;
155
155
  }, {
156
156
  id: string;
157
- kind: "message" | "summary" | "plan" | "status";
157
+ kind: "message" | "summary" | "status" | "plan";
158
158
  description: string;
159
159
  title: string;
160
160
  revision: number;
@@ -473,8 +473,8 @@ declare const schemas: {
473
473
  }, "strict", z.ZodTypeAny, {
474
474
  id: string;
475
475
  summary: string;
476
- blockers: string[];
477
476
  status: "completed" | "cancelled" | "failed" | "suspended";
477
+ blockers: string[];
478
478
  projectId: string;
479
479
  teamId: string;
480
480
  title: string;
@@ -1679,7 +1679,7 @@ declare const schemas: {
1679
1679
  related_proposals?: string[] | undefined;
1680
1680
  related_decisions?: string[] | undefined;
1681
1681
  related_books?: string[] | undefined;
1682
- question_type?: "evaluation" | "research" | "implementation" | "knowledge-gap" | "strategy" | undefined;
1682
+ question_type?: "research" | "evaluation" | "implementation" | "knowledge-gap" | "strategy" | undefined;
1683
1683
  motivation?: string | undefined;
1684
1684
  primary_contributor?: string | undefined;
1685
1685
  }, {
@@ -1701,7 +1701,7 @@ declare const schemas: {
1701
1701
  related_proposals?: string[] | undefined;
1702
1702
  related_decisions?: string[] | undefined;
1703
1703
  related_books?: string[] | undefined;
1704
- question_type?: "evaluation" | "research" | "implementation" | "knowledge-gap" | "strategy" | undefined;
1704
+ question_type?: "research" | "evaluation" | "implementation" | "knowledge-gap" | "strategy" | undefined;
1705
1705
  motivation?: string | undefined;
1706
1706
  primary_contributor?: string | undefined;
1707
1707
  }>;
@@ -9799,8 +9799,8 @@ declare const schemas: {
9799
9799
  description: string;
9800
9800
  slug: string;
9801
9801
  contract: "treeseed.group/v1";
9802
- aliases?: string[] | undefined;
9803
9802
  status?: "active" | "archived" | undefined;
9803
+ aliases?: string[] | undefined;
9804
9804
  }, {
9805
9805
  id: string;
9806
9806
  classification: string;
@@ -9808,8 +9808,8 @@ declare const schemas: {
9808
9808
  description: string;
9809
9809
  slug: string;
9810
9810
  contract: "treeseed.group/v1";
9811
- aliases?: string[] | undefined;
9812
9811
  status?: "active" | "archived" | undefined;
9812
+ aliases?: string[] | undefined;
9813
9813
  }>;
9814
9814
  group_edge: z.ZodObject<{
9815
9815
  contract: z.ZodLiteral<"treeseed.group-edge/v1">;
@@ -11561,7 +11561,7 @@ export declare function validateContentFrontmatter(model: PortableContentModel,
11561
11561
  mergePolicy: "replace" | "append";
11562
11562
  } | {
11563
11563
  id: string;
11564
- kind: "message" | "summary" | "plan" | "status";
11564
+ kind: "message" | "summary" | "status" | "plan";
11565
11565
  description: string;
11566
11566
  title: string;
11567
11567
  revision: number;
@@ -11634,8 +11634,8 @@ export declare function validateContentFrontmatter(model: PortableContentModel,
11634
11634
  } | {
11635
11635
  id: string;
11636
11636
  summary: string;
11637
- blockers: string[];
11638
11637
  status: "completed" | "cancelled" | "failed" | "suspended";
11638
+ blockers: string[];
11639
11639
  projectId: string;
11640
11640
  teamId: string;
11641
11641
  title: string;
@@ -11744,7 +11744,7 @@ export declare function validateContentFrontmatter(model: PortableContentModel,
11744
11744
  related_proposals?: string[] | undefined;
11745
11745
  related_decisions?: string[] | undefined;
11746
11746
  related_books?: string[] | undefined;
11747
- question_type?: "evaluation" | "research" | "implementation" | "knowledge-gap" | "strategy" | undefined;
11747
+ question_type?: "research" | "evaluation" | "implementation" | "knowledge-gap" | "strategy" | undefined;
11748
11748
  motivation?: string | undefined;
11749
11749
  primary_contributor?: string | undefined;
11750
11750
  } | {
@@ -11896,8 +11896,8 @@ export declare function validateContentFrontmatter(model: PortableContentModel,
11896
11896
  description: string;
11897
11897
  slug: string;
11898
11898
  contract: "treeseed.group/v1";
11899
- aliases?: string[] | undefined;
11900
11899
  status?: "active" | "archived" | undefined;
11900
+ aliases?: string[] | undefined;
11901
11901
  } | {
11902
11902
  id: string;
11903
11903
  contract: "treeseed.group-edge/v1";
@@ -20516,7 +20516,7 @@ export declare function describeContentFrontmatterSchema(model: PortableContentM
20516
20516
  appliesToProfiles: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
20517
20517
  }, "strict", z.ZodTypeAny, {
20518
20518
  id: string;
20519
- kind: "message" | "summary" | "plan" | "status";
20519
+ kind: "message" | "summary" | "status" | "plan";
20520
20520
  description: string;
20521
20521
  title: string;
20522
20522
  revision: number;
@@ -20526,7 +20526,7 @@ export declare function describeContentFrontmatterSchema(model: PortableContentM
20526
20526
  outputSkeleton?: string | undefined;
20527
20527
  }, {
20528
20528
  id: string;
20529
- kind: "message" | "summary" | "plan" | "status";
20529
+ kind: "message" | "summary" | "status" | "plan";
20530
20530
  description: string;
20531
20531
  title: string;
20532
20532
  revision: number;
@@ -20841,8 +20841,8 @@ export declare function describeContentFrontmatterSchema(model: PortableContentM
20841
20841
  }, "strict", z.ZodTypeAny, {
20842
20842
  id: string;
20843
20843
  summary: string;
20844
- blockers: string[];
20845
20844
  status: "completed" | "cancelled" | "failed" | "suspended";
20845
+ blockers: string[];
20846
20846
  projectId: string;
20847
20847
  teamId: string;
20848
20848
  title: string;
@@ -21187,7 +21187,7 @@ export declare function describeContentFrontmatterSchema(model: PortableContentM
21187
21187
  related_proposals?: string[] | undefined;
21188
21188
  related_decisions?: string[] | undefined;
21189
21189
  related_books?: string[] | undefined;
21190
- question_type?: "evaluation" | "research" | "implementation" | "knowledge-gap" | "strategy" | undefined;
21190
+ question_type?: "research" | "evaluation" | "implementation" | "knowledge-gap" | "strategy" | undefined;
21191
21191
  motivation?: string | undefined;
21192
21192
  primary_contributor?: string | undefined;
21193
21193
  }, {
@@ -21209,7 +21209,7 @@ export declare function describeContentFrontmatterSchema(model: PortableContentM
21209
21209
  related_proposals?: string[] | undefined;
21210
21210
  related_decisions?: string[] | undefined;
21211
21211
  related_books?: string[] | undefined;
21212
- question_type?: "evaluation" | "research" | "implementation" | "knowledge-gap" | "strategy" | undefined;
21212
+ question_type?: "research" | "evaluation" | "implementation" | "knowledge-gap" | "strategy" | undefined;
21213
21213
  motivation?: string | undefined;
21214
21214
  primary_contributor?: string | undefined;
21215
21215
  }> | z.ZodObject<{
@@ -21686,8 +21686,8 @@ export declare function describeContentFrontmatterSchema(model: PortableContentM
21686
21686
  description: string;
21687
21687
  slug: string;
21688
21688
  contract: "treeseed.group/v1";
21689
- aliases?: string[] | undefined;
21690
21689
  status?: "active" | "archived" | undefined;
21690
+ aliases?: string[] | undefined;
21691
21691
  }, {
21692
21692
  id: string;
21693
21693
  classification: string;
@@ -21695,8 +21695,8 @@ export declare function describeContentFrontmatterSchema(model: PortableContentM
21695
21695
  description: string;
21696
21696
  slug: string;
21697
21697
  contract: "treeseed.group/v1";
21698
- aliases?: string[] | undefined;
21699
21698
  status?: "active" | "archived" | undefined;
21699
+ aliases?: string[] | undefined;
21700
21700
  }> | z.ZodObject<{
21701
21701
  contract: z.ZodLiteral<"treeseed.group-edge/v1">;
21702
21702
  id: z.ZodString;
@@ -1743,7 +1743,7 @@ export declare function validatePortableContentData(model: string, value: unknow
1743
1743
  mergePolicy: "replace" | "append";
1744
1744
  } | {
1745
1745
  id: string;
1746
- kind: "message" | "summary" | "plan" | "status";
1746
+ kind: "message" | "summary" | "status" | "plan";
1747
1747
  description: string;
1748
1748
  title: string;
1749
1749
  revision: number;
@@ -1816,8 +1816,8 @@ export declare function validatePortableContentData(model: string, value: unknow
1816
1816
  } | {
1817
1817
  id: string;
1818
1818
  summary: string;
1819
- blockers: string[];
1820
1819
  status: "completed" | "cancelled" | "failed" | "suspended";
1820
+ blockers: string[];
1821
1821
  projectId: string;
1822
1822
  teamId: string;
1823
1823
  title: string;
@@ -1926,7 +1926,7 @@ export declare function validatePortableContentData(model: string, value: unknow
1926
1926
  related_proposals?: string[] | undefined;
1927
1927
  related_decisions?: string[] | undefined;
1928
1928
  related_books?: string[] | undefined;
1929
- question_type?: "evaluation" | "research" | "implementation" | "knowledge-gap" | "strategy" | undefined;
1929
+ question_type?: "research" | "evaluation" | "implementation" | "knowledge-gap" | "strategy" | undefined;
1930
1930
  motivation?: string | undefined;
1931
1931
  primary_contributor?: string | undefined;
1932
1932
  } | {
@@ -2078,8 +2078,8 @@ export declare function validatePortableContentData(model: string, value: unknow
2078
2078
  description: string;
2079
2079
  slug: string;
2080
2080
  contract: "treeseed.group/v1";
2081
- aliases?: string[] | undefined;
2082
2081
  status?: "active" | "archived" | undefined;
2082
+ aliases?: string[] | undefined;
2083
2083
  } | {
2084
2084
  id: string;
2085
2085
  contract: "treeseed.group-edge/v1";
@@ -255,6 +255,79 @@ export declare const CONTROL_PLANE_OPERATIONS: {
255
255
  approvalId: string;
256
256
  }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
257
257
  };
258
+ readonly planning: {
259
+ readonly status: ControlPlaneOperationBinding<{
260
+ decisionId: string;
261
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
262
+ readonly requestInput: ControlPlaneOperationBinding<{
263
+ decisionId: string;
264
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
265
+ readonly executionInputs: ControlPlaneOperationBinding<{
266
+ decisionId: string;
267
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
268
+ readonly createExecutionInput: ControlPlaneOperationBinding<{
269
+ decisionId: string;
270
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
271
+ readonly acceptExecutionInput: ControlPlaneOperationBinding<{
272
+ inputId: string;
273
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
274
+ readonly requestExecutionInputRevision: ControlPlaneOperationBinding<{
275
+ inputId: string;
276
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
277
+ };
278
+ readonly estimates: {
279
+ readonly create: ControlPlaneOperationBinding<{
280
+ decisionId: string;
281
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
282
+ readonly list: ControlPlaneOperationBinding<{
283
+ decisionId: string;
284
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
285
+ readonly accept: ControlPlaneOperationBinding<{
286
+ estimateId: string;
287
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
288
+ readonly reject: ControlPlaneOperationBinding<{
289
+ estimateId: string;
290
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
291
+ };
292
+ readonly assignmentGraphs: {
293
+ readonly validateAuthority: ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
294
+ readonly compile: ControlPlaneOperationBinding<{
295
+ decisionId: string;
296
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
297
+ readonly list: ControlPlaneOperationBinding<{
298
+ decisionId: string;
299
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
300
+ readonly show: ControlPlaneOperationBinding<{
301
+ graphId: string;
302
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
303
+ readonly manifest: ControlPlaneOperationBinding<{
304
+ manifestId: string;
305
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
306
+ readonly createManifest: ControlPlaneOperationBinding<{
307
+ contractId: string;
308
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
309
+ readonly approveContract: ControlPlaneOperationBinding<{
310
+ contractId: string;
311
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
312
+ readonly rejectContract: ControlPlaneOperationBinding<{
313
+ contractId: string;
314
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
315
+ };
316
+ readonly research: {
317
+ readonly createWorkflow: ControlPlaneOperationBinding<{
318
+ projectId: string;
319
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
320
+ readonly workflows: ControlPlaneOperationBinding<{
321
+ projectId: string;
322
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
323
+ readonly workflow: ControlPlaneOperationBinding<{
324
+ workflowId: string;
325
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
326
+ readonly completeStage: ControlPlaneOperationBinding<{
327
+ stage: string;
328
+ workflowId: string;
329
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
330
+ };
258
331
  readonly repositories: {
259
332
  readonly githubSetup: ControlPlaneOperationBinding<{
260
333
  kind: string;
@@ -367,6 +440,28 @@ export declare const CONTROL_PLANE_OPERATIONS: {
367
440
  artifactId: string;
368
441
  }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
369
442
  };
443
+ readonly communications: {
444
+ readonly invocations: ControlPlaneOperationBinding<{
445
+ teamId: string;
446
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
447
+ readonly invocation: ControlPlaneOperationBinding<{
448
+ teamId: string;
449
+ invocationId: string;
450
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
451
+ readonly status: ControlPlaneOperationBinding<{
452
+ teamId: string;
453
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
454
+ readonly handoffs: ControlPlaneOperationBinding<{
455
+ teamId: string;
456
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
457
+ readonly clientActions: ControlPlaneOperationBinding<{
458
+ teamId: string;
459
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
460
+ readonly cancelInvocation: ControlPlaneOperationBinding<{
461
+ teamId: string;
462
+ invocationId: string;
463
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
464
+ };
370
465
  readonly capacity: {
371
466
  readonly availability: ControlPlaneOperationBinding<{
372
467
  teamId: string;
@@ -221,6 +221,36 @@ const CONTROL_PLANE_OPERATIONS = {
221
221
  approval: resource("governance.approvals.show", "GET", "/v1/projects/{projectId}/approvals/{approvalId}", { projectId: z.string().min(1), approvalId: z.string().min(1) }, { capability: "governance.read" }),
222
222
  decideApproval: resource("governance.approvals.decide", "POST", "/v1/projects/{projectId}/approvals/{approvalId}/decision", { projectId: z.string().min(1), approvalId: z.string().min(1) }, { capability: "governance.decide", scopes: ["treeseed:governance:write"], risk: "authority", concurrency: true })
223
223
  },
224
+ planning: {
225
+ status: resource("planning.status.show", "GET", "/v1/decisions/{decisionId}/planning-status", { decisionId: z.string().min(1) }, { capability: "planning.read", surfaces: ["rest", "mcp_resource"] }),
226
+ requestInput: resource("planning.input.requests.create", "POST", "/v1/decisions/{decisionId}/planning-input-requests", { decisionId: z.string().min(1) }, { capability: "planning.write", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] }),
227
+ executionInputs: resource("planning.execution.inputs.list", "GET", "/v1/decisions/{decisionId}/execution-inputs", { decisionId: z.string().min(1) }, { capability: "planning.read", surfaces: ["rest", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
228
+ createExecutionInput: resource("planning.execution.inputs.create", "POST", "/v1/decisions/{decisionId}/execution-inputs", { decisionId: z.string().min(1) }, { capability: "planning.write", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] }),
229
+ acceptExecutionInput: resource("planning.execution.inputs.accept", "POST", "/v1/decision-execution-inputs/{inputId}/accept", { inputId: z.string().min(1) }, { capability: "planning.decide", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] }),
230
+ requestExecutionInputRevision: resource("planning.execution.inputs.revision.request", "POST", "/v1/decision-execution-inputs/{inputId}/request-revision", { inputId: z.string().min(1) }, { capability: "planning.decide", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] })
231
+ },
232
+ estimates: {
233
+ create: resource("estimates.create", "POST", "/v1/decisions/{decisionId}/estimates", { decisionId: z.string().min(1) }, { capability: "estimates.write", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] }),
234
+ list: resource("estimates.list", "GET", "/v1/decisions/{decisionId}/estimates", { decisionId: z.string().min(1) }, { capability: "estimates.read", surfaces: ["rest", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
235
+ accept: resource("estimates.accept", "POST", "/v1/structured-agent-estimates/{estimateId}/accept", { estimateId: z.string().min(1) }, { capability: "estimates.decide", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] }),
236
+ reject: resource("estimates.reject", "POST", "/v1/structured-agent-estimates/{estimateId}/reject", { estimateId: z.string().min(1) }, { capability: "estimates.decide", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] })
237
+ },
238
+ assignmentGraphs: {
239
+ validateAuthority: resource("assignment.graphs.authority.validate", "POST", "/v1/governance/execution-authorities/validate", {}, { capability: "assignments.read", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] }),
240
+ compile: resource("assignment.graphs.compile", "POST", "/v1/decisions/{decisionId}/assignment-graphs/compile", { decisionId: z.string().min(1) }, { capability: "assignments.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] }),
241
+ list: resource("assignment.graphs.list", "GET", "/v1/decisions/{decisionId}/assignment-graphs", { decisionId: z.string().min(1) }, { capability: "assignments.read", surfaces: ["rest", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
242
+ show: resource("assignment.graphs.show", "GET", "/v1/decision-assignment-graphs/{graphId}", { graphId: z.string().min(1) }, { capability: "assignments.read", surfaces: ["rest", "mcp_resource"] }),
243
+ manifest: resource("assignment.deliverable.manifests.show", "GET", "/v1/deliverable-manifests/{manifestId}", { manifestId: z.string().min(1) }, { capability: "assignments.read", surfaces: ["rest", "mcp_resource"] }),
244
+ createManifest: resource("assignment.deliverable.manifests.create", "POST", "/v1/deliverable-contracts/{contractId}/manifests", { contractId: z.string().min(1) }, { capability: "assignments.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] }),
245
+ approveContract: resource("assignment.deliverable.contracts.approve", "POST", "/v1/deliverable-contracts/{contractId}/approve", { contractId: z.string().min(1) }, { capability: "assignments.decide", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] }),
246
+ rejectContract: resource("assignment.deliverable.contracts.reject", "POST", "/v1/deliverable-contracts/{contractId}/reject", { contractId: z.string().min(1) }, { capability: "assignments.decide", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"] })
247
+ },
248
+ research: {
249
+ createWorkflow: resource("research.workflows.create", "POST", "/v1/projects/{projectId}/research-workflows", { projectId: z.string().min(1) }, { capability: "research.write", scopes: ["treeseed:knowledge:write"], surfaces: ["rest", "mcp_tool"] }),
250
+ workflows: resource("research.workflows.list", "GET", "/v1/projects/{projectId}/research-workflows", { projectId: z.string().min(1) }, { capability: "research.read", surfaces: ["rest", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
251
+ workflow: resource("research.workflows.show", "GET", "/v1/research-workflows/{workflowId}", { workflowId: z.string().min(1) }, { capability: "research.read", surfaces: ["rest", "mcp_resource"] }),
252
+ completeStage: resource("research.workflows.stages.complete", "POST", "/v1/research-workflows/{workflowId}/stages/{stage}/complete", { workflowId: z.string().min(1), stage: z.string().min(1) }, { capability: "research.write", scopes: ["treeseed:knowledge:write"], surfaces: ["rest", "mcp_tool"], concurrency: true })
253
+ },
224
254
  repositories: {
225
255
  githubSetup: resource("repositories.github.setup", "POST", "/v1/provider-connectors/github/{kind}/setup", { kind: z.string().min(1) }, { capability: "repositories.connect", scopes: ["treeseed:projects:write"], risk: "authority" }),
226
256
  githubCallback: resource("repositories.github.callback", "GET", "/v1/provider-connectors/github/{kind}/callback", { kind: z.string().min(1) }, { capability: "repositories.connect", scopes: [], authentication: "signed_request" }),
@@ -258,6 +288,14 @@ const CONTROL_PLANE_OPERATIONS = {
258
288
  artifacts: resource("agents.artifacts.list", "GET", "/v1/projects/{projectId}/agent-artifacts", { projectId: z.string().min(1) }, { capability: "agents.read", pagination: "cursor" }),
259
289
  artifact: resource("agents.artifacts.show", "GET", "/v1/projects/{projectId}/agent-artifacts/{artifactId}", { projectId: z.string().min(1), artifactId: z.string().min(1) }, { capability: "agents.read" })
260
290
  },
291
+ communications: {
292
+ invocations: resource("communications.invocations.list", "GET", "/v1/teams/{teamId}/agent-invocations", { teamId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "mcp_tool", "mcp_resource"], pagination: "cursor" }),
293
+ invocation: resource("communications.invocations.show", "GET", "/v1/teams/{teamId}/agent-invocations/{invocationId}", { teamId: z.string().min(1), invocationId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "mcp_resource"] }),
294
+ status: resource("communications.status.show", "GET", "/v1/teams/{teamId}/communication-status", { teamId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "mcp_tool", "mcp_resource"] }),
295
+ handoffs: resource("communications.handoffs.list", "GET", "/v1/teams/{teamId}/operation-handoffs", { teamId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "mcp_resource"], pagination: "cursor" }),
296
+ clientActions: resource("communications.client.actions.list", "GET", "/v1/teams/{teamId}/client-actions", { teamId: z.string().min(1) }, { capability: "agents.read", surfaces: ["rest", "mcp_resource"], pagination: "cursor" }),
297
+ cancelInvocation: resource("communications.invocations.cancel", "POST", "/v1/teams/{teamId}/agent-invocations/{invocationId}/cancel", { teamId: z.string().min(1), invocationId: z.string().min(1) }, { capability: "agents.execute", scopes: ["treeseed:execution"], surfaces: ["rest", "mcp_tool"], risk: "destructive", concurrency: true })
298
+ },
261
299
  capacity: {
262
300
  availability: resource("capacity.status", "GET", "/v1/teams/{teamId}/capacity/availability-sessions", { teamId: z.string().min(1) }, { capability: "capacity.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
263
301
  usage: resource("capacity.usage", "GET", "/v1/teams/{teamId}/capacity/usage", { teamId: z.string().min(1) }, { capability: "capacity.read", surfaces: ["rest", "cli", "mcp_tool"] }),
@@ -74,5 +74,9 @@ export interface McpCatalog {
74
74
  resourceSubscriptions: true;
75
75
  };
76
76
  }
77
+ export declare const TREESEED_MCP_PROMPTS: readonly McpPromptDescriptor[];
78
+ export declare function operationToMcpResource(operation: ControlPlaneOperationDescriptor): McpResourceDescriptor | null;
77
79
  export declare function operationToMcpTool(operation: ControlPlaneOperationDescriptor): McpToolDescriptor | null;
78
80
  export declare function buildMcpTools(operations: readonly ControlPlaneOperationDescriptor[]): McpToolDescriptor[];
81
+ export declare function buildMcpResources(operations: readonly ControlPlaneOperationDescriptor[]): McpResourceDescriptor[];
82
+ export declare function buildMcpCatalog(operations: readonly ControlPlaneOperationDescriptor[]): McpCatalog;
@@ -1,4 +1,38 @@
1
1
  const MCP_PROTOCOL_VERSION = "2026-07-28";
2
+ const TREESEED_MCP_PROMPTS = [
3
+ { name: "operate", description: "Operate TreeSeed through currently discoverable capabilities.", argumentSchemaId: "treeseed.prompt.objective/v1", requiredScopes: ["treeseed:read"] },
4
+ { name: "research", description: "Research a governed TreeSeed question and accumulate knowledge.", argumentSchemaId: "treeseed.prompt.objective/v1", requiredScopes: ["treeseed:read"] },
5
+ { name: "governance-review", description: "Review a proposal or decision using current governance evidence.", argumentSchemaId: "treeseed.prompt.objective/v1", requiredScopes: ["treeseed:read"] },
6
+ { name: "workday-planning", description: "Plan a time-based workday without bypassing API authority.", argumentSchemaId: "treeseed.prompt.objective/v1", requiredScopes: ["treeseed:read"] },
7
+ { name: "project-agent-chat", description: "Prepare an explicit governed project-agent chat invocation.", argumentSchemaId: "treeseed.prompt.objective/v1", requiredScopes: ["treeseed:read"] }
8
+ ];
9
+ function resourcePath(restPath) {
10
+ const [root, version, ...segments] = restPath.split("/");
11
+ if (root !== "" || version !== "v1" || segments.length === 0) throw new Error(`MCP resource requires a versioned control-plane REST path: ${restPath}`);
12
+ const path = segments.join("/");
13
+ if (path === "me") return "accounts/current";
14
+ return path.replace(/^platform\/operations(?=\/|$)/u, "operations").replace(/^capacity-plans(?=\/|$)/u, "plans").replace(/\/workday-runs(?=\/|$)/u, "/workdays").replace(/\/capacity\/assignments(?=\/|$)/u, "/assignments");
15
+ }
16
+ function operationToMcpResource(operation) {
17
+ if (!operation.surfaces.includes("mcp_resource")) return null;
18
+ if (operation.kind !== "read" || operation.rest.method !== "GET") {
19
+ throw new Error(`MCP resource operation ${operation.operationId} must be a read-only GET operation.`);
20
+ }
21
+ const uriTemplate = `treeseed://${resourcePath(operation.rest.path)}`;
22
+ const parameters = (value) => [...value.matchAll(/\{([^}]+)\}/gu)].map((match) => match[1]).sort();
23
+ if (JSON.stringify(parameters(uriTemplate)) !== JSON.stringify(parameters(operation.rest.path))) {
24
+ throw new Error(`MCP resource ${operation.operationId} must preserve its REST path parameter names.`);
25
+ }
26
+ return {
27
+ uriTemplate,
28
+ name: operation.operationId,
29
+ description: operation.description,
30
+ mimeType: "application/json",
31
+ operationId: operation.operationId,
32
+ subscribable: true,
33
+ ...operation.operationId === "status.show" ? { cacheTtlSeconds: 10 } : {}
34
+ };
35
+ }
2
36
  function operationToMcpTool(operation) {
3
37
  if (!operation.surfaces.includes("mcp_tool")) return null;
4
38
  return {
@@ -16,8 +50,28 @@ function operationToMcpTool(operation) {
16
50
  function buildMcpTools(operations) {
17
51
  return operations.map(operationToMcpTool).filter((tool) => tool !== null).sort((left, right) => left.name.localeCompare(right.name));
18
52
  }
53
+ function buildMcpResources(operations) {
54
+ const resources = operations.map(operationToMcpResource).filter((resource) => resource !== null).sort((left, right) => left.uriTemplate.localeCompare(right.uriTemplate));
55
+ const uriTemplates = new Set(resources.map(({ uriTemplate }) => uriTemplate));
56
+ if (uriTemplates.size !== resources.length) throw new Error("MCP resource URI templates must be unique.");
57
+ return resources;
58
+ }
59
+ function buildMcpCatalog(operations) {
60
+ return {
61
+ schemaVersion: "treeseed.mcp-catalog/v1",
62
+ protocolVersion: MCP_PROTOCOL_VERSION,
63
+ tools: buildMcpTools(operations),
64
+ resources: buildMcpResources(operations),
65
+ prompts: [...TREESEED_MCP_PROMPTS],
66
+ capabilities: { completion: true, progress: true, cancellation: true, inputRequired: true, resourceSubscriptions: true }
67
+ };
68
+ }
19
69
  export {
20
70
  MCP_PROTOCOL_VERSION,
71
+ TREESEED_MCP_PROMPTS,
72
+ buildMcpCatalog,
73
+ buildMcpResources,
21
74
  buildMcpTools,
75
+ operationToMcpResource,
22
76
  operationToMcpTool
23
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/sdk",
3
- "version": "0.13.0-rc.15",
3
+ "version": "0.13.0-rc.17",
4
4
  "description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {