@treeseed/sdk 0.13.0-rc.24 → 0.13.0-rc.26

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.
@@ -1,6 +1,7 @@
1
1
  import type { ProviderAssignmentLifecycleRequest, ProviderAssignmentLifecycleResult, ProviderNextAssignmentRequest } from '../capacity/agents/agent-capacity.js';
2
2
  import type { ProviderRuntimeEventInput } from '../agent-capacity/contracts/capacity/workdays/workday-records.js';
3
3
  import type { CapacityProviderIdentity, CapacityProviderIdentityRotationRequest, CapacityProviderSignedProof, ProviderAccessTokenIssue, ProviderAvailabilitySession, ProviderCredentialIssuanceAuthorization, ProviderRegistrationRequest, ProviderRegistrationSubmission, ProviderTeamCredentialIssue } from './contracts/index.js';
4
+ import type { ProviderDiscussionResponseRequest } from '../operator-contracts/communication/contracts.js';
4
5
  export interface ProviderProtocolClientOptions {
5
6
  controlPlaneUrl: string;
6
7
  accessToken?: string;
@@ -43,6 +44,14 @@ export declare class ProviderProtocolClient {
43
44
  startAssignmentExecution(assignmentId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;
44
45
  startAssignmentCloseout(assignmentId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;
45
46
  preflightAssignmentCompletion(assignmentId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;
47
+ respondToAssignmentDiscussion(assignmentId: string, request: ProviderDiscussionResponseRequest, idempotencyKey: string): Promise<{
48
+ status: "responded";
49
+ schemaVersion: "treeseed.provider-discussion-response-receipt/v1";
50
+ assignmentId: string;
51
+ invocationId: string;
52
+ messageRef: string;
53
+ settledAt: string;
54
+ }>;
46
55
  returnAssignment(assignmentId: string, request?: ProviderAssignmentLifecycleRequest): Promise<ProviderAssignmentLifecycleResult>;
47
56
  completeAssignment(assignmentId: string, request?: ProviderAssignmentLifecycleRequest): Promise<ProviderAssignmentLifecycleResult>;
48
57
  failAssignment(assignmentId: string, request?: ProviderAssignmentLifecycleRequest): Promise<ProviderAssignmentLifecycleResult>;
@@ -126,6 +126,9 @@ class ProviderProtocolClient {
126
126
  preflightAssignmentCompletion(assignmentId, request) {
127
127
  return this.invoke(CONTROL_PLANE_OPERATIONS.providers.completionPreflight, { path: { assignmentId }, body: request });
128
128
  }
129
+ respondToAssignmentDiscussion(assignmentId, request, idempotencyKey) {
130
+ return this.invoke(CONTROL_PLANE_OPERATIONS.providers.discussionResponse, { path: { assignmentId }, body: request }, { idempotencyKey });
131
+ }
129
132
  returnAssignment(assignmentId, request = {}) {
130
133
  return this.invoke(CONTROL_PLANE_OPERATIONS.providers.returnAssignment, { path: { assignmentId }, body: request });
131
134
  }
@@ -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" | "status" | "plan";
144
+ kind: "message" | "status" | "summary" | "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" | "status" | "plan";
154
+ kind: "message" | "status" | "summary" | "plan";
155
155
  description: string;
156
156
  title: string;
157
157
  revision: number;
@@ -169,9 +169,9 @@ export declare const discussionTopicContentSchema: z.ZodObject<{
169
169
  parentTopicId: z.ZodOptional<z.ZodString>;
170
170
  status: z.ZodDefault<z.ZodEnum<["active", "archived"]>>;
171
171
  }, "strict", z.ZodTypeAny, {
172
+ status: "active" | "archived";
172
173
  id: string;
173
174
  description: string;
174
- status: "active" | "archived";
175
175
  title: string;
176
176
  slug: string;
177
177
  groupIds: string[];
@@ -254,10 +254,11 @@ export declare const assignmentPlanContentSchema: z.ZodObject<{
254
254
  decisionId: z.ZodOptional<z.ZodString>;
255
255
  capacityPlanId: z.ZodOptional<z.ZodString>;
256
256
  }, "strict", z.ZodTypeAny, {
257
- id: string;
258
257
  status: "active" | "completed" | "ready" | "superseded" | "draft";
259
- projectId: string;
258
+ id: string;
259
+ createdAt: Date;
260
260
  teamId: string;
261
+ projectId: string;
261
262
  objective: string;
262
263
  completed: {
263
264
  id: string;
@@ -266,7 +267,6 @@ export declare const assignmentPlanContentSchema: z.ZodObject<{
266
267
  }[];
267
268
  title: string;
268
269
  revision: number;
269
- createdAt: Date;
270
270
  remaining: {
271
271
  id: string;
272
272
  description: string;
@@ -289,14 +289,14 @@ export declare const assignmentPlanContentSchema: z.ZodObject<{
289
289
  contextRefs: string[];
290
290
  } | undefined;
291
291
  }, {
292
- id: string;
293
292
  status: "active" | "completed" | "ready" | "superseded" | "draft";
294
- projectId: string;
293
+ id: string;
294
+ createdAt: Date;
295
295
  teamId: string;
296
+ projectId: string;
296
297
  objective: string;
297
298
  title: string;
298
299
  revision: number;
299
- createdAt: Date;
300
300
  description?: string | undefined;
301
301
  decisionId?: string | undefined;
302
302
  capacityPlanId?: string | undefined;
@@ -351,12 +351,12 @@ export declare const assignmentStatusContentSchema: z.ZodEffects<z.ZodObject<{
351
351
  reason: z.ZodOptional<z.ZodString>;
352
352
  progress: z.ZodOptional<z.ZodNumber>;
353
353
  }, "strict", z.ZodTypeAny, {
354
+ status: "failed" | "pending" | "running" | "completed" | "cancelled" | "admitted" | "suspended" | "waiting" | "leased";
354
355
  id: string;
355
- status: "completed" | "cancelled" | "failed" | "admitted" | "running" | "suspended" | "pending" | "waiting" | "leased";
356
- projectId: string;
356
+ createdAt: Date;
357
357
  teamId: string;
358
+ projectId: string;
358
359
  title: string;
359
- createdAt: Date;
360
360
  sequence: number;
361
361
  phase: string;
362
362
  description?: string | undefined;
@@ -370,12 +370,12 @@ export declare const assignmentStatusContentSchema: z.ZodEffects<z.ZodObject<{
370
370
  } | undefined;
371
371
  progress?: number | undefined;
372
372
  }, {
373
+ status: "failed" | "pending" | "running" | "completed" | "cancelled" | "admitted" | "suspended" | "waiting" | "leased";
373
374
  id: string;
374
- status: "completed" | "cancelled" | "failed" | "admitted" | "running" | "suspended" | "pending" | "waiting" | "leased";
375
- projectId: string;
375
+ createdAt: Date;
376
376
  teamId: string;
377
+ projectId: string;
377
378
  title: string;
378
- createdAt: Date;
379
379
  sequence: number;
380
380
  phase: string;
381
381
  description?: string | undefined;
@@ -389,12 +389,12 @@ export declare const assignmentStatusContentSchema: z.ZodEffects<z.ZodObject<{
389
389
  } | undefined;
390
390
  progress?: number | undefined;
391
391
  }>, {
392
+ status: "failed" | "pending" | "running" | "completed" | "cancelled" | "admitted" | "suspended" | "waiting" | "leased";
392
393
  id: string;
393
- status: "completed" | "cancelled" | "failed" | "admitted" | "running" | "suspended" | "pending" | "waiting" | "leased";
394
- projectId: string;
394
+ createdAt: Date;
395
395
  teamId: string;
396
+ projectId: string;
396
397
  title: string;
397
- createdAt: Date;
398
398
  sequence: number;
399
399
  phase: string;
400
400
  description?: string | undefined;
@@ -408,12 +408,12 @@ export declare const assignmentStatusContentSchema: z.ZodEffects<z.ZodObject<{
408
408
  } | undefined;
409
409
  progress?: number | undefined;
410
410
  }, {
411
+ status: "failed" | "pending" | "running" | "completed" | "cancelled" | "admitted" | "suspended" | "waiting" | "leased";
411
412
  id: string;
412
- status: "completed" | "cancelled" | "failed" | "admitted" | "running" | "suspended" | "pending" | "waiting" | "leased";
413
- projectId: string;
413
+ createdAt: Date;
414
414
  teamId: string;
415
+ projectId: string;
415
416
  title: string;
416
- createdAt: Date;
417
417
  sequence: number;
418
418
  phase: string;
419
419
  description?: string | undefined;
@@ -468,14 +468,14 @@ export declare const assignmentSummaryContentSchema: z.ZodObject<{
468
468
  artifactRefs: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
469
469
  verificationRefs: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
470
470
  }, "strict", z.ZodTypeAny, {
471
+ status: "failed" | "completed" | "cancelled" | "suspended";
471
472
  id: string;
472
- summary: string;
473
- status: "completed" | "cancelled" | "failed" | "suspended";
473
+ createdAt: Date;
474
474
  blockers: string[];
475
- projectId: string;
475
+ summary: string;
476
476
  teamId: string;
477
+ projectId: string;
477
478
  title: string;
478
- createdAt: Date;
479
479
  artifactRefs: string[];
480
480
  lessons: string[];
481
481
  performance: {
@@ -493,19 +493,19 @@ export declare const assignmentSummaryContentSchema: z.ZodObject<{
493
493
  contextRefs: string[];
494
494
  } | undefined;
495
495
  }, {
496
+ status: "failed" | "completed" | "cancelled" | "suspended";
496
497
  id: string;
498
+ createdAt: Date;
497
499
  summary: string;
498
- status: "completed" | "cancelled" | "failed" | "suspended";
499
- projectId: string;
500
500
  teamId: string;
501
+ projectId: string;
501
502
  title: string;
502
- createdAt: Date;
503
503
  performance: {
504
504
  outcome: string;
505
505
  metrics?: Record<string, number> | undefined;
506
506
  };
507
- description?: string | undefined;
508
507
  blockers?: string[] | undefined;
508
+ description?: string | undefined;
509
509
  assignmentId?: string | undefined;
510
510
  updatedAt?: Date | undefined;
511
511
  workdayId?: string | undefined;
@@ -592,12 +592,12 @@ export declare const agentEvaluationContentSchema: z.ZodObject<{
592
592
  evidenceRefs?: string[] | undefined;
593
593
  }>, "many">;
594
594
  }, "strict", z.ZodTypeAny, {
595
- id: string;
596
595
  status: string;
597
- projectId: string;
596
+ id: string;
597
+ createdAt: Date;
598
598
  teamId: string;
599
+ projectId: string;
599
600
  title: string;
600
- createdAt: Date;
601
601
  contextQueryRefs: {
602
602
  id: string;
603
603
  revision: number;
@@ -630,12 +630,12 @@ export declare const agentEvaluationContentSchema: z.ZodObject<{
630
630
  workdayId?: string | undefined;
631
631
  score?: number | undefined;
632
632
  }, {
633
- id: string;
634
633
  status: string;
635
- projectId: string;
634
+ id: string;
635
+ createdAt: Date;
636
636
  teamId: string;
637
+ projectId: string;
637
638
  title: string;
638
- createdAt: Date;
639
639
  agentId: string;
640
640
  outcome: "failed" | "passed" | "needs-revision";
641
641
  agentDefinitionRef: {
@@ -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" | "status" | "plan";
814
+ kind: "message" | "status" | "summary" | "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" | "status" | "plan";
824
+ kind: "message" | "status" | "summary" | "plan";
825
825
  description: string;
826
826
  title: string;
827
827
  revision: number;
@@ -839,9 +839,9 @@ export declare const agentOperationalContentSchemas: {
839
839
  parentTopicId: z.ZodOptional<z.ZodString>;
840
840
  status: z.ZodDefault<z.ZodEnum<["active", "archived"]>>;
841
841
  }, "strict", z.ZodTypeAny, {
842
+ status: "active" | "archived";
842
843
  id: string;
843
844
  description: string;
844
- status: "active" | "archived";
845
845
  title: string;
846
846
  slug: string;
847
847
  groupIds: string[];
@@ -924,10 +924,11 @@ export declare const agentOperationalContentSchemas: {
924
924
  decisionId: z.ZodOptional<z.ZodString>;
925
925
  capacityPlanId: z.ZodOptional<z.ZodString>;
926
926
  }, "strict", z.ZodTypeAny, {
927
- id: string;
928
927
  status: "active" | "completed" | "ready" | "superseded" | "draft";
929
- projectId: string;
928
+ id: string;
929
+ createdAt: Date;
930
930
  teamId: string;
931
+ projectId: string;
931
932
  objective: string;
932
933
  completed: {
933
934
  id: string;
@@ -936,7 +937,6 @@ export declare const agentOperationalContentSchemas: {
936
937
  }[];
937
938
  title: string;
938
939
  revision: number;
939
- createdAt: Date;
940
940
  remaining: {
941
941
  id: string;
942
942
  description: string;
@@ -959,14 +959,14 @@ export declare const agentOperationalContentSchemas: {
959
959
  contextRefs: string[];
960
960
  } | undefined;
961
961
  }, {
962
- id: string;
963
962
  status: "active" | "completed" | "ready" | "superseded" | "draft";
964
- projectId: string;
963
+ id: string;
964
+ createdAt: Date;
965
965
  teamId: string;
966
+ projectId: string;
966
967
  objective: string;
967
968
  title: string;
968
969
  revision: number;
969
- createdAt: Date;
970
970
  description?: string | undefined;
971
971
  decisionId?: string | undefined;
972
972
  capacityPlanId?: string | undefined;
@@ -1021,12 +1021,12 @@ export declare const agentOperationalContentSchemas: {
1021
1021
  reason: z.ZodOptional<z.ZodString>;
1022
1022
  progress: z.ZodOptional<z.ZodNumber>;
1023
1023
  }, "strict", z.ZodTypeAny, {
1024
+ status: "failed" | "pending" | "running" | "completed" | "cancelled" | "admitted" | "suspended" | "waiting" | "leased";
1024
1025
  id: string;
1025
- status: "completed" | "cancelled" | "failed" | "admitted" | "running" | "suspended" | "pending" | "waiting" | "leased";
1026
- projectId: string;
1026
+ createdAt: Date;
1027
1027
  teamId: string;
1028
+ projectId: string;
1028
1029
  title: string;
1029
- createdAt: Date;
1030
1030
  sequence: number;
1031
1031
  phase: string;
1032
1032
  description?: string | undefined;
@@ -1040,12 +1040,12 @@ export declare const agentOperationalContentSchemas: {
1040
1040
  } | undefined;
1041
1041
  progress?: number | undefined;
1042
1042
  }, {
1043
+ status: "failed" | "pending" | "running" | "completed" | "cancelled" | "admitted" | "suspended" | "waiting" | "leased";
1043
1044
  id: string;
1044
- status: "completed" | "cancelled" | "failed" | "admitted" | "running" | "suspended" | "pending" | "waiting" | "leased";
1045
- projectId: string;
1045
+ createdAt: Date;
1046
1046
  teamId: string;
1047
+ projectId: string;
1047
1048
  title: string;
1048
- createdAt: Date;
1049
1049
  sequence: number;
1050
1050
  phase: string;
1051
1051
  description?: string | undefined;
@@ -1059,12 +1059,12 @@ export declare const agentOperationalContentSchemas: {
1059
1059
  } | undefined;
1060
1060
  progress?: number | undefined;
1061
1061
  }>, {
1062
+ status: "failed" | "pending" | "running" | "completed" | "cancelled" | "admitted" | "suspended" | "waiting" | "leased";
1062
1063
  id: string;
1063
- status: "completed" | "cancelled" | "failed" | "admitted" | "running" | "suspended" | "pending" | "waiting" | "leased";
1064
- projectId: string;
1064
+ createdAt: Date;
1065
1065
  teamId: string;
1066
+ projectId: string;
1066
1067
  title: string;
1067
- createdAt: Date;
1068
1068
  sequence: number;
1069
1069
  phase: string;
1070
1070
  description?: string | undefined;
@@ -1078,12 +1078,12 @@ export declare const agentOperationalContentSchemas: {
1078
1078
  } | undefined;
1079
1079
  progress?: number | undefined;
1080
1080
  }, {
1081
+ status: "failed" | "pending" | "running" | "completed" | "cancelled" | "admitted" | "suspended" | "waiting" | "leased";
1081
1082
  id: string;
1082
- status: "completed" | "cancelled" | "failed" | "admitted" | "running" | "suspended" | "pending" | "waiting" | "leased";
1083
- projectId: string;
1083
+ createdAt: Date;
1084
1084
  teamId: string;
1085
+ projectId: string;
1085
1086
  title: string;
1086
- createdAt: Date;
1087
1087
  sequence: number;
1088
1088
  phase: string;
1089
1089
  description?: string | undefined;
@@ -1138,14 +1138,14 @@ export declare const agentOperationalContentSchemas: {
1138
1138
  artifactRefs: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
1139
1139
  verificationRefs: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
1140
1140
  }, "strict", z.ZodTypeAny, {
1141
+ status: "failed" | "completed" | "cancelled" | "suspended";
1141
1142
  id: string;
1142
- summary: string;
1143
- status: "completed" | "cancelled" | "failed" | "suspended";
1143
+ createdAt: Date;
1144
1144
  blockers: string[];
1145
- projectId: string;
1145
+ summary: string;
1146
1146
  teamId: string;
1147
+ projectId: string;
1147
1148
  title: string;
1148
- createdAt: Date;
1149
1149
  artifactRefs: string[];
1150
1150
  lessons: string[];
1151
1151
  performance: {
@@ -1163,19 +1163,19 @@ export declare const agentOperationalContentSchemas: {
1163
1163
  contextRefs: string[];
1164
1164
  } | undefined;
1165
1165
  }, {
1166
+ status: "failed" | "completed" | "cancelled" | "suspended";
1166
1167
  id: string;
1168
+ createdAt: Date;
1167
1169
  summary: string;
1168
- status: "completed" | "cancelled" | "failed" | "suspended";
1169
- projectId: string;
1170
1170
  teamId: string;
1171
+ projectId: string;
1171
1172
  title: string;
1172
- createdAt: Date;
1173
1173
  performance: {
1174
1174
  outcome: string;
1175
1175
  metrics?: Record<string, number> | undefined;
1176
1176
  };
1177
- description?: string | undefined;
1178
1177
  blockers?: string[] | undefined;
1178
+ description?: string | undefined;
1179
1179
  assignmentId?: string | undefined;
1180
1180
  updatedAt?: Date | undefined;
1181
1181
  workdayId?: string | undefined;
@@ -1262,12 +1262,12 @@ export declare const agentOperationalContentSchemas: {
1262
1262
  evidenceRefs?: string[] | undefined;
1263
1263
  }>, "many">;
1264
1264
  }, "strict", z.ZodTypeAny, {
1265
- id: string;
1266
1265
  status: string;
1267
- projectId: string;
1266
+ id: string;
1267
+ createdAt: Date;
1268
1268
  teamId: string;
1269
+ projectId: string;
1269
1270
  title: string;
1270
- createdAt: Date;
1271
1271
  contextQueryRefs: {
1272
1272
  id: string;
1273
1273
  revision: number;
@@ -1300,12 +1300,12 @@ export declare const agentOperationalContentSchemas: {
1300
1300
  workdayId?: string | undefined;
1301
1301
  score?: number | undefined;
1302
1302
  }, {
1303
- id: string;
1304
1303
  status: string;
1305
- projectId: string;
1304
+ id: string;
1305
+ createdAt: Date;
1306
1306
  teamId: string;
1307
+ projectId: string;
1307
1308
  title: string;
1308
- createdAt: Date;
1309
1309
  agentId: string;
1310
1310
  outcome: "failed" | "passed" | "needs-revision";
1311
1311
  agentDefinitionRef: {