@treeseed/sdk 0.13.0-rc.37 → 0.13.0-rc.38

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.
@@ -5,52 +5,84 @@ const communicationRecipientSchema = z.object({
5
5
  }).strict();
6
6
  const communicationSendRequestSchema = z.object({
7
7
  message: z.string().trim().min(1).max(1e5),
8
- topic: z.string().trim().min(1).max(240).optional(),
9
- projectId: z.string().min(1).optional(),
8
+ projectId: z.string().min(1),
10
9
  recipients: z.array(z.string().trim().min(1)).max(100).optional(),
11
- waitSeconds: z.number().int().min(0).max(3600).optional()
10
+ timeoutSeconds: z.number().int().min(1).max(3600).optional()
12
11
  }).strict();
13
12
  const communicationTargetSchema = communicationRecipientSchema.extend({
14
13
  projectSlug: z.string().min(1),
15
14
  definitionRevision: z.string().min(1),
15
+ revisions: z.object({
16
+ project: z.string().min(1),
17
+ library: z.string().min(1),
18
+ agentDefinition: z.string().min(1),
19
+ chatProfile: z.string().min(1)
20
+ }).strict(),
16
21
  invocationId: z.string().min(1).nullable(),
17
- status: z.enum(["queued", "running", "responded", "failed", "cancelled"])
22
+ requirement: z.enum(["required", "optional"]),
23
+ parentInvocationId: z.string().min(1).nullable(),
24
+ depth: z.number().int().nonnegative(),
25
+ status: z.enum(["queued", "running", "responded", "abstained", "failed", "cancelled"]),
26
+ requestedAt: z.string().datetime(),
27
+ updatedAt: z.string().datetime(),
28
+ completedAt: z.string().datetime().nullable(),
29
+ failure: z.object({ code: z.string().min(1), message: z.string().nullable() }).strict().nullable(),
30
+ capacity: z.object({
31
+ assignmentId: z.string().min(1).nullable(),
32
+ providerId: z.string().min(1).nullable(),
33
+ executionProviderId: z.string().min(1).nullable(),
34
+ laneId: z.string().min(1).nullable(),
35
+ lanePurpose: z.string().min(1).nullable(),
36
+ status: z.string().min(1).nullable(),
37
+ assignedAt: z.string().datetime().nullable(),
38
+ claimedAt: z.string().datetime().nullable(),
39
+ completedAt: z.string().datetime().nullable(),
40
+ returnedAt: z.string().datetime().nullable(),
41
+ failedAt: z.string().datetime().nullable()
42
+ }).strict()
18
43
  });
19
44
  const communicationResponseSchema = communicationRecipientSchema.extend({
20
45
  invocationId: z.string().min(1),
21
46
  assignmentId: z.string().min(1).nullable(),
22
47
  messageRef: z.string().min(1),
23
48
  markdown: z.string(),
24
- status: z.enum(["responded", "failed", "cancelled"]),
49
+ requirement: z.enum(["required", "optional"]),
50
+ status: z.enum(["responded", "abstained", "failed", "cancelled"]),
25
51
  createdAt: z.string().datetime()
26
52
  });
27
53
  const communicationSendReceiptSchema = z.object({
28
- schemaVersion: z.literal("treeseed.communication-send-receipt/v1"),
54
+ schemaVersion: z.literal("treeseed.communication-send-receipt/v2"),
29
55
  sendId: z.string().min(1),
30
56
  teamId: z.string().min(1),
31
57
  channel: z.string().min(1),
32
- topic: z.string().nullable(),
58
+ topic: z.object({ id: z.string().min(1), slug: z.string().min(1) }).strict(),
59
+ projectStream: z.object({ id: z.string().min(1), projectId: z.string().min(1), projectSlug: z.string().min(1) }).strict(),
33
60
  discussionId: z.string().min(1),
34
61
  messageRef: z.string().min(1),
62
+ sourceMessage: z.string(),
35
63
  status: z.enum(["queued", "running", "complete", "partial", "failed"]),
36
64
  targets: z.array(communicationTargetSchema),
37
65
  responses: z.array(communicationResponseSchema),
38
66
  createdAt: z.string().datetime(),
39
- updatedAt: z.string().datetime()
67
+ updatedAt: z.string().datetime(),
68
+ replayed: z.boolean()
40
69
  }).strict();
41
70
  const providerDiscussionResponseRequestSchema = z.object({
42
71
  leaseToken: z.string().min(1),
43
72
  runnerId: z.string().min(1),
44
- markdown: z.string().trim().min(1).max(1e5),
73
+ outcome: z.enum(["responded", "abstained"]).default("responded"),
74
+ markdown: z.string().trim().min(1).max(1e5).optional(),
45
75
  summary: z.string().trim().min(1).max(4e3).optional(),
46
76
  usage: z.record(z.unknown()).optional()
47
- }).strict();
77
+ }).strict().superRefine((value, context) => {
78
+ if (value.outcome === "responded" && !value.markdown) context.addIssue({ code: z.ZodIssueCode.custom, path: ["markdown"], message: "A response requires Markdown." });
79
+ });
48
80
  const providerDiscussionResponseReceiptSchema = z.object({
49
81
  schemaVersion: z.literal("treeseed.provider-discussion-response-receipt/v1"),
50
82
  assignmentId: z.string().min(1),
51
83
  invocationId: z.string().min(1),
52
84
  messageRef: z.string().min(1),
53
- status: z.literal("responded"),
85
+ status: z.enum(["responded", "abstained"]),
54
86
  settledAt: z.string().datetime()
55
87
  }).strict();
56
88
  export {
@@ -466,72 +466,151 @@ export declare const CONTROL_PLANE_OPERATIONS: {
466
466
  channel: string;
467
467
  }, {}, {
468
468
  message: string;
469
- projectId?: string | undefined;
469
+ projectId: string;
470
+ timeoutSeconds?: number | undefined;
470
471
  recipients?: string[] | undefined;
471
- topic?: string | undefined;
472
- waitSeconds?: number | undefined;
473
472
  }, {
474
473
  status: "partial" | "failed" | "complete" | "running" | "queued";
475
- schemaVersion: "treeseed.communication-send-receipt/v1";
474
+ schemaVersion: "treeseed.communication-send-receipt/v2";
476
475
  createdAt: string;
477
476
  responses: {
478
- status: "failed" | "cancelled" | "responded";
477
+ status: "failed" | "cancelled" | "responded" | "abstained";
479
478
  createdAt: string;
480
479
  projectId: string;
481
480
  agentSlug: string;
482
481
  assignmentId: string | null;
483
482
  invocationId: string;
483
+ requirement: "required" | "optional";
484
484
  messageRef: string;
485
485
  markdown: string;
486
486
  }[];
487
487
  teamId: string;
488
488
  channel: string;
489
- topic: string | null;
489
+ updatedAt: string;
490
490
  messageRef: string;
491
491
  sendId: string;
492
+ topic: {
493
+ id: string;
494
+ slug: string;
495
+ };
496
+ projectStream: {
497
+ id: string;
498
+ projectId: string;
499
+ projectSlug: string;
500
+ };
492
501
  discussionId: string;
502
+ sourceMessage: string;
493
503
  targets: {
494
- status: "failed" | "running" | "cancelled" | "queued" | "responded";
504
+ status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
505
+ completedAt: string | null;
495
506
  projectId: string;
496
507
  agentSlug: string;
508
+ capacity: {
509
+ status: string | null;
510
+ completedAt: string | null;
511
+ providerId: string | null;
512
+ assignmentId: string | null;
513
+ executionProviderId: string | null;
514
+ laneId: string | null;
515
+ lanePurpose: string | null;
516
+ assignedAt: string | null;
517
+ claimedAt: string | null;
518
+ returnedAt: string | null;
519
+ failedAt: string | null;
520
+ };
497
521
  projectSlug: string;
498
522
  definitionRevision: string;
523
+ revisions: {
524
+ project: string;
525
+ library: string;
526
+ agentDefinition: string;
527
+ chatProfile: string;
528
+ };
499
529
  invocationId: string | null;
530
+ requirement: "required" | "optional";
531
+ parentInvocationId: string | null;
532
+ depth: number;
533
+ requestedAt: string;
534
+ updatedAt: string;
535
+ failure: {
536
+ code: string;
537
+ message: string | null;
538
+ } | null;
500
539
  }[];
501
- updatedAt: string;
540
+ replayed: boolean;
502
541
  }>;
503
542
  readonly sendStatus: ControlPlaneOperationBinding<{
504
543
  teamId: string;
505
544
  sendId: string;
506
545
  }, {}, undefined, {
507
546
  status: "partial" | "failed" | "complete" | "running" | "queued";
508
- schemaVersion: "treeseed.communication-send-receipt/v1";
547
+ schemaVersion: "treeseed.communication-send-receipt/v2";
509
548
  createdAt: string;
510
549
  responses: {
511
- status: "failed" | "cancelled" | "responded";
550
+ status: "failed" | "cancelled" | "responded" | "abstained";
512
551
  createdAt: string;
513
552
  projectId: string;
514
553
  agentSlug: string;
515
554
  assignmentId: string | null;
516
555
  invocationId: string;
556
+ requirement: "required" | "optional";
517
557
  messageRef: string;
518
558
  markdown: string;
519
559
  }[];
520
560
  teamId: string;
521
561
  channel: string;
522
- topic: string | null;
562
+ updatedAt: string;
523
563
  messageRef: string;
524
564
  sendId: string;
565
+ topic: {
566
+ id: string;
567
+ slug: string;
568
+ };
569
+ projectStream: {
570
+ id: string;
571
+ projectId: string;
572
+ projectSlug: string;
573
+ };
525
574
  discussionId: string;
575
+ sourceMessage: string;
526
576
  targets: {
527
- status: "failed" | "running" | "cancelled" | "queued" | "responded";
577
+ status: "failed" | "running" | "cancelled" | "queued" | "responded" | "abstained";
578
+ completedAt: string | null;
528
579
  projectId: string;
529
580
  agentSlug: string;
581
+ capacity: {
582
+ status: string | null;
583
+ completedAt: string | null;
584
+ providerId: string | null;
585
+ assignmentId: string | null;
586
+ executionProviderId: string | null;
587
+ laneId: string | null;
588
+ lanePurpose: string | null;
589
+ assignedAt: string | null;
590
+ claimedAt: string | null;
591
+ returnedAt: string | null;
592
+ failedAt: string | null;
593
+ };
530
594
  projectSlug: string;
531
595
  definitionRevision: string;
596
+ revisions: {
597
+ project: string;
598
+ library: string;
599
+ agentDefinition: string;
600
+ chatProfile: string;
601
+ };
532
602
  invocationId: string | null;
603
+ requirement: "required" | "optional";
604
+ parentInvocationId: string | null;
605
+ depth: number;
606
+ requestedAt: string;
607
+ updatedAt: string;
608
+ failure: {
609
+ code: string;
610
+ message: string | null;
611
+ } | null;
533
612
  }[];
534
- updatedAt: string;
613
+ replayed: boolean;
535
614
  }>;
536
615
  };
537
616
  readonly capacity: {
@@ -1068,13 +1147,14 @@ export declare const CONTROL_PLANE_OPERATIONS: {
1068
1147
  readonly discussionResponse: ControlPlaneOperationBinding<{
1069
1148
  assignmentId: string;
1070
1149
  }, {}, {
1071
- markdown: string;
1072
1150
  leaseToken: string;
1073
1151
  runnerId: string;
1074
1152
  summary?: string | undefined;
1075
1153
  usage?: Record<string, unknown> | undefined;
1154
+ markdown?: string | undefined;
1155
+ outcome?: "responded" | "abstained" | undefined;
1076
1156
  }, {
1077
- status: "responded";
1157
+ status: "responded" | "abstained";
1078
1158
  schemaVersion: "treeseed.provider-discussion-response-receipt/v1";
1079
1159
  assignmentId: string;
1080
1160
  invocationId: string;
@@ -7,4 +7,5 @@ export * from './control-plane-operations.js';
7
7
  export * from './mcp.js';
8
8
  export * from './oauth.js';
9
9
  export * from './communication/contracts.js';
10
+ export * from './communication/addressing.js';
10
11
  export * from './seed/seed-bundle.js';
@@ -7,4 +7,5 @@ export * from "./control-plane-operations.js";
7
7
  export * from "./mcp.js";
8
8
  export * from "./oauth.js";
9
9
  export * from "./communication/contracts.js";
10
+ export * from "./communication/addressing.js";
10
11
  export * from "./seed/seed-bundle.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/sdk",
3
- "version": "0.13.0-rc.37",
3
+ "version": "0.13.0-rc.38",
4
4
  "description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {