@treeseed/sdk 0.13.0-rc.53 → 0.13.0-rc.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +4 -0
  2. package/dist/agent-capacity/authority/agent-authority-presets.js +2 -1
  3. package/dist/agent-capacity/contracts/configuration/configuration.js +1 -1
  4. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +240 -240
  5. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +1 -1
  6. package/dist/capacity-provider/client.d.ts +18 -3
  7. package/dist/capacity-provider/client.js +6 -0
  8. package/dist/capacity-provider/contracts/governance.d.ts +28 -1
  9. package/dist/capacity-provider/index.d.ts +1 -0
  10. package/dist/capacity-provider/index.js +1 -0
  11. package/dist/capacity-provider/sandbox-contracts.d.ts +422 -0
  12. package/dist/capacity-provider/sandbox-contracts.js +71 -0
  13. package/dist/capacity-provider/validation.d.ts +2 -1
  14. package/dist/capacity-provider/validation.js +23 -0
  15. package/dist/content/validation/agent-operational-content-schemas.d.ts +76 -76
  16. package/dist/content/validation/auxiliary-content-schemas.d.ts +20 -20
  17. package/dist/content/validation/content-model-schemas.d.ts +570 -570
  18. package/dist/content/validation/portable-content-data.d.ts +61 -61
  19. package/dist/deployment/ai-mode.d.ts +4 -4
  20. package/dist/deployment/schemas.d.ts +418 -100
  21. package/dist/deployment/schemas.js +23 -1
  22. package/dist/development/schemas.d.ts +22 -22
  23. package/dist/operator-contracts/canonical-command-tree.js +63 -3
  24. package/dist/operator-contracts/catalog/communication-operations.d.ts +300 -33
  25. package/dist/operator-contracts/catalog/communication-operations.js +56 -2
  26. package/dist/operator-contracts/catalog/inbox-operations.d.ts +261 -0
  27. package/dist/operator-contracts/catalog/inbox-operations.js +36 -0
  28. package/dist/operator-contracts/communication/contracts.d.ts +1261 -71
  29. package/dist/operator-contracts/communication/contracts.js +99 -7
  30. package/dist/operator-contracts/control-plane-operations.d.ts +592 -66
  31. package/dist/operator-contracts/control-plane-operations.js +4 -1
  32. package/dist/operator-contracts/inbox/contracts.d.ts +1099 -0
  33. package/dist/operator-contracts/inbox/contracts.js +134 -0
  34. package/dist/operator-contracts/index.d.ts +1 -0
  35. package/dist/operator-contracts/index.js +1 -0
  36. package/dist/operator-contracts/mcp.js +1 -1
  37. package/dist/security/encrypted-envelope.d.ts +177 -0
  38. package/dist/security/encrypted-envelope.js +34 -0
  39. package/dist/security/envelope-codec.d.ts +38 -0
  40. package/dist/security/envelope-codec.js +96 -0
  41. package/dist/security/index.d.ts +2 -0
  42. package/dist/security/index.js +2 -0
  43. package/package.json +5 -1
@@ -0,0 +1,1099 @@
1
+ import { z } from 'zod';
2
+ export declare const inboxItemKindSchema: z.ZodEnum<["proposal", "question"]>;
3
+ export declare const inboxItemStatusSchema: z.ZodEnum<["outstanding", "answered", "approved", "rejected", "closed", "deleted"]>;
4
+ export declare const inboxActionKindSchema: z.ZodEnum<["publish_revision", "approve", "reject", "comment", "answer", "reply", "reopen"]>;
5
+ export declare const inboxProvenanceSchema: z.ZodObject<{
6
+ repositoryId: z.ZodNullable<z.ZodString>;
7
+ contentPath: z.ZodNullable<z.ZodString>;
8
+ commitSha: z.ZodNullable<z.ZodString>;
9
+ digest: z.ZodNullable<z.ZodString>;
10
+ }, "strict", z.ZodTypeAny, {
11
+ digest: string | null;
12
+ repositoryId: string | null;
13
+ contentPath: string | null;
14
+ commitSha: string | null;
15
+ }, {
16
+ digest: string | null;
17
+ repositoryId: string | null;
18
+ contentPath: string | null;
19
+ commitSha: string | null;
20
+ }>;
21
+ export declare const inboxActionDescriptorSchema: z.ZodObject<{
22
+ action: z.ZodEnum<["publish_revision", "approve", "reject", "comment", "answer", "reply", "reopen"]>;
23
+ label: z.ZodString;
24
+ enabled: z.ZodBoolean;
25
+ reason: z.ZodNullable<z.ZodString>;
26
+ requiresFeedback: z.ZodBoolean;
27
+ confirmation: z.ZodEnum<["never", "input_required"]>;
28
+ }, "strict", z.ZodTypeAny, {
29
+ reason: string | null;
30
+ enabled: boolean;
31
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
32
+ confirmation: "never" | "input_required";
33
+ label: string;
34
+ requiresFeedback: boolean;
35
+ }, {
36
+ reason: string | null;
37
+ enabled: boolean;
38
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
39
+ confirmation: "never" | "input_required";
40
+ label: string;
41
+ requiresFeedback: boolean;
42
+ }>;
43
+ export declare const inboxCommentSchema: z.ZodObject<{
44
+ id: z.ZodString;
45
+ parentId: z.ZodNullable<z.ZodString>;
46
+ kind: z.ZodEnum<["comment", "answer", "reply"]>;
47
+ authorId: z.ZodString;
48
+ authorLabel: z.ZodString;
49
+ markdown: z.ZodString;
50
+ createdAt: z.ZodString;
51
+ provenance: z.ZodObject<{
52
+ repositoryId: z.ZodNullable<z.ZodString>;
53
+ contentPath: z.ZodNullable<z.ZodString>;
54
+ commitSha: z.ZodNullable<z.ZodString>;
55
+ digest: z.ZodNullable<z.ZodString>;
56
+ }, "strict", z.ZodTypeAny, {
57
+ digest: string | null;
58
+ repositoryId: string | null;
59
+ contentPath: string | null;
60
+ commitSha: string | null;
61
+ }, {
62
+ digest: string | null;
63
+ repositoryId: string | null;
64
+ contentPath: string | null;
65
+ commitSha: string | null;
66
+ }>;
67
+ }, "strict", z.ZodTypeAny, {
68
+ createdAt: string;
69
+ kind: "comment" | "answer" | "reply";
70
+ id: string;
71
+ provenance: {
72
+ digest: string | null;
73
+ repositoryId: string | null;
74
+ contentPath: string | null;
75
+ commitSha: string | null;
76
+ };
77
+ markdown: string;
78
+ parentId: string | null;
79
+ authorId: string;
80
+ authorLabel: string;
81
+ }, {
82
+ createdAt: string;
83
+ kind: "comment" | "answer" | "reply";
84
+ id: string;
85
+ provenance: {
86
+ digest: string | null;
87
+ repositoryId: string | null;
88
+ contentPath: string | null;
89
+ commitSha: string | null;
90
+ };
91
+ markdown: string;
92
+ parentId: string | null;
93
+ authorId: string;
94
+ authorLabel: string;
95
+ }>;
96
+ export declare const inboxItemSchema: z.ZodObject<{
97
+ schemaVersion: z.ZodLiteral<"treeseed.inbox-item/v1">;
98
+ id: z.ZodString;
99
+ teamId: z.ZodString;
100
+ projectId: z.ZodString;
101
+ projectSlug: z.ZodString;
102
+ kind: z.ZodEnum<["proposal", "question"]>;
103
+ title: z.ZodString;
104
+ markdown: z.ZodString;
105
+ status: z.ZodEnum<["outstanding", "answered", "approved", "rejected", "closed", "deleted"]>;
106
+ authorId: z.ZodString;
107
+ authorLabel: z.ZodString;
108
+ version: z.ZodNumber;
109
+ discussionId: z.ZodNullable<z.ZodString>;
110
+ createdAt: z.ZodString;
111
+ updatedAt: z.ZodString;
112
+ provenance: z.ZodObject<{
113
+ repositoryId: z.ZodNullable<z.ZodString>;
114
+ contentPath: z.ZodNullable<z.ZodString>;
115
+ commitSha: z.ZodNullable<z.ZodString>;
116
+ digest: z.ZodNullable<z.ZodString>;
117
+ }, "strict", z.ZodTypeAny, {
118
+ digest: string | null;
119
+ repositoryId: string | null;
120
+ contentPath: string | null;
121
+ commitSha: string | null;
122
+ }, {
123
+ digest: string | null;
124
+ repositoryId: string | null;
125
+ contentPath: string | null;
126
+ commitSha: string | null;
127
+ }>;
128
+ availableActions: z.ZodArray<z.ZodObject<{
129
+ action: z.ZodEnum<["publish_revision", "approve", "reject", "comment", "answer", "reply", "reopen"]>;
130
+ label: z.ZodString;
131
+ enabled: z.ZodBoolean;
132
+ reason: z.ZodNullable<z.ZodString>;
133
+ requiresFeedback: z.ZodBoolean;
134
+ confirmation: z.ZodEnum<["never", "input_required"]>;
135
+ }, "strict", z.ZodTypeAny, {
136
+ reason: string | null;
137
+ enabled: boolean;
138
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
139
+ confirmation: "never" | "input_required";
140
+ label: string;
141
+ requiresFeedback: boolean;
142
+ }, {
143
+ reason: string | null;
144
+ enabled: boolean;
145
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
146
+ confirmation: "never" | "input_required";
147
+ label: string;
148
+ requiresFeedback: boolean;
149
+ }>, "many">;
150
+ comments: z.ZodArray<z.ZodObject<{
151
+ id: z.ZodString;
152
+ parentId: z.ZodNullable<z.ZodString>;
153
+ kind: z.ZodEnum<["comment", "answer", "reply"]>;
154
+ authorId: z.ZodString;
155
+ authorLabel: z.ZodString;
156
+ markdown: z.ZodString;
157
+ createdAt: z.ZodString;
158
+ provenance: z.ZodObject<{
159
+ repositoryId: z.ZodNullable<z.ZodString>;
160
+ contentPath: z.ZodNullable<z.ZodString>;
161
+ commitSha: z.ZodNullable<z.ZodString>;
162
+ digest: z.ZodNullable<z.ZodString>;
163
+ }, "strict", z.ZodTypeAny, {
164
+ digest: string | null;
165
+ repositoryId: string | null;
166
+ contentPath: string | null;
167
+ commitSha: string | null;
168
+ }, {
169
+ digest: string | null;
170
+ repositoryId: string | null;
171
+ contentPath: string | null;
172
+ commitSha: string | null;
173
+ }>;
174
+ }, "strict", z.ZodTypeAny, {
175
+ createdAt: string;
176
+ kind: "comment" | "answer" | "reply";
177
+ id: string;
178
+ provenance: {
179
+ digest: string | null;
180
+ repositoryId: string | null;
181
+ contentPath: string | null;
182
+ commitSha: string | null;
183
+ };
184
+ markdown: string;
185
+ parentId: string | null;
186
+ authorId: string;
187
+ authorLabel: string;
188
+ }, {
189
+ createdAt: string;
190
+ kind: "comment" | "answer" | "reply";
191
+ id: string;
192
+ provenance: {
193
+ digest: string | null;
194
+ repositoryId: string | null;
195
+ contentPath: string | null;
196
+ commitSha: string | null;
197
+ };
198
+ markdown: string;
199
+ parentId: string | null;
200
+ authorId: string;
201
+ authorLabel: string;
202
+ }>, "many">;
203
+ etag: z.ZodString;
204
+ }, "strict", z.ZodTypeAny, {
205
+ teamId: string;
206
+ schemaVersion: "treeseed.inbox-item/v1";
207
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
208
+ createdAt: string;
209
+ kind: "proposal" | "question";
210
+ id: string;
211
+ projectId: string;
212
+ provenance: {
213
+ digest: string | null;
214
+ repositoryId: string | null;
215
+ contentPath: string | null;
216
+ commitSha: string | null;
217
+ };
218
+ version: number;
219
+ projectSlug: string;
220
+ updatedAt: string;
221
+ markdown: string;
222
+ discussionId: string | null;
223
+ authorId: string;
224
+ authorLabel: string;
225
+ title: string;
226
+ availableActions: {
227
+ reason: string | null;
228
+ enabled: boolean;
229
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
230
+ confirmation: "never" | "input_required";
231
+ label: string;
232
+ requiresFeedback: boolean;
233
+ }[];
234
+ comments: {
235
+ createdAt: string;
236
+ kind: "comment" | "answer" | "reply";
237
+ id: string;
238
+ provenance: {
239
+ digest: string | null;
240
+ repositoryId: string | null;
241
+ contentPath: string | null;
242
+ commitSha: string | null;
243
+ };
244
+ markdown: string;
245
+ parentId: string | null;
246
+ authorId: string;
247
+ authorLabel: string;
248
+ }[];
249
+ etag: string;
250
+ }, {
251
+ teamId: string;
252
+ schemaVersion: "treeseed.inbox-item/v1";
253
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
254
+ createdAt: string;
255
+ kind: "proposal" | "question";
256
+ id: string;
257
+ projectId: string;
258
+ provenance: {
259
+ digest: string | null;
260
+ repositoryId: string | null;
261
+ contentPath: string | null;
262
+ commitSha: string | null;
263
+ };
264
+ version: number;
265
+ projectSlug: string;
266
+ updatedAt: string;
267
+ markdown: string;
268
+ discussionId: string | null;
269
+ authorId: string;
270
+ authorLabel: string;
271
+ title: string;
272
+ availableActions: {
273
+ reason: string | null;
274
+ enabled: boolean;
275
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
276
+ confirmation: "never" | "input_required";
277
+ label: string;
278
+ requiresFeedback: boolean;
279
+ }[];
280
+ comments: {
281
+ createdAt: string;
282
+ kind: "comment" | "answer" | "reply";
283
+ id: string;
284
+ provenance: {
285
+ digest: string | null;
286
+ repositoryId: string | null;
287
+ contentPath: string | null;
288
+ commitSha: string | null;
289
+ };
290
+ markdown: string;
291
+ parentId: string | null;
292
+ authorId: string;
293
+ authorLabel: string;
294
+ }[];
295
+ etag: string;
296
+ }>;
297
+ export declare const inboxItemSummarySchema: z.ZodObject<Pick<{
298
+ schemaVersion: z.ZodLiteral<"treeseed.inbox-item/v1">;
299
+ id: z.ZodString;
300
+ teamId: z.ZodString;
301
+ projectId: z.ZodString;
302
+ projectSlug: z.ZodString;
303
+ kind: z.ZodEnum<["proposal", "question"]>;
304
+ title: z.ZodString;
305
+ markdown: z.ZodString;
306
+ status: z.ZodEnum<["outstanding", "answered", "approved", "rejected", "closed", "deleted"]>;
307
+ authorId: z.ZodString;
308
+ authorLabel: z.ZodString;
309
+ version: z.ZodNumber;
310
+ discussionId: z.ZodNullable<z.ZodString>;
311
+ createdAt: z.ZodString;
312
+ updatedAt: z.ZodString;
313
+ provenance: z.ZodObject<{
314
+ repositoryId: z.ZodNullable<z.ZodString>;
315
+ contentPath: z.ZodNullable<z.ZodString>;
316
+ commitSha: z.ZodNullable<z.ZodString>;
317
+ digest: z.ZodNullable<z.ZodString>;
318
+ }, "strict", z.ZodTypeAny, {
319
+ digest: string | null;
320
+ repositoryId: string | null;
321
+ contentPath: string | null;
322
+ commitSha: string | null;
323
+ }, {
324
+ digest: string | null;
325
+ repositoryId: string | null;
326
+ contentPath: string | null;
327
+ commitSha: string | null;
328
+ }>;
329
+ availableActions: z.ZodArray<z.ZodObject<{
330
+ action: z.ZodEnum<["publish_revision", "approve", "reject", "comment", "answer", "reply", "reopen"]>;
331
+ label: z.ZodString;
332
+ enabled: z.ZodBoolean;
333
+ reason: z.ZodNullable<z.ZodString>;
334
+ requiresFeedback: z.ZodBoolean;
335
+ confirmation: z.ZodEnum<["never", "input_required"]>;
336
+ }, "strict", z.ZodTypeAny, {
337
+ reason: string | null;
338
+ enabled: boolean;
339
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
340
+ confirmation: "never" | "input_required";
341
+ label: string;
342
+ requiresFeedback: boolean;
343
+ }, {
344
+ reason: string | null;
345
+ enabled: boolean;
346
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
347
+ confirmation: "never" | "input_required";
348
+ label: string;
349
+ requiresFeedback: boolean;
350
+ }>, "many">;
351
+ comments: z.ZodArray<z.ZodObject<{
352
+ id: z.ZodString;
353
+ parentId: z.ZodNullable<z.ZodString>;
354
+ kind: z.ZodEnum<["comment", "answer", "reply"]>;
355
+ authorId: z.ZodString;
356
+ authorLabel: z.ZodString;
357
+ markdown: z.ZodString;
358
+ createdAt: z.ZodString;
359
+ provenance: z.ZodObject<{
360
+ repositoryId: z.ZodNullable<z.ZodString>;
361
+ contentPath: z.ZodNullable<z.ZodString>;
362
+ commitSha: z.ZodNullable<z.ZodString>;
363
+ digest: z.ZodNullable<z.ZodString>;
364
+ }, "strict", z.ZodTypeAny, {
365
+ digest: string | null;
366
+ repositoryId: string | null;
367
+ contentPath: string | null;
368
+ commitSha: string | null;
369
+ }, {
370
+ digest: string | null;
371
+ repositoryId: string | null;
372
+ contentPath: string | null;
373
+ commitSha: string | null;
374
+ }>;
375
+ }, "strict", z.ZodTypeAny, {
376
+ createdAt: string;
377
+ kind: "comment" | "answer" | "reply";
378
+ id: string;
379
+ provenance: {
380
+ digest: string | null;
381
+ repositoryId: string | null;
382
+ contentPath: string | null;
383
+ commitSha: string | null;
384
+ };
385
+ markdown: string;
386
+ parentId: string | null;
387
+ authorId: string;
388
+ authorLabel: string;
389
+ }, {
390
+ createdAt: string;
391
+ kind: "comment" | "answer" | "reply";
392
+ id: string;
393
+ provenance: {
394
+ digest: string | null;
395
+ repositoryId: string | null;
396
+ contentPath: string | null;
397
+ commitSha: string | null;
398
+ };
399
+ markdown: string;
400
+ parentId: string | null;
401
+ authorId: string;
402
+ authorLabel: string;
403
+ }>, "many">;
404
+ etag: z.ZodString;
405
+ }, "teamId" | "status" | "createdAt" | "kind" | "id" | "projectId" | "version" | "projectSlug" | "updatedAt" | "authorId" | "authorLabel" | "title" | "etag">, "strict", z.ZodTypeAny, {
406
+ teamId: string;
407
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
408
+ createdAt: string;
409
+ kind: "proposal" | "question";
410
+ id: string;
411
+ projectId: string;
412
+ version: number;
413
+ projectSlug: string;
414
+ updatedAt: string;
415
+ authorId: string;
416
+ authorLabel: string;
417
+ title: string;
418
+ etag: string;
419
+ }, {
420
+ teamId: string;
421
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
422
+ createdAt: string;
423
+ kind: "proposal" | "question";
424
+ id: string;
425
+ projectId: string;
426
+ version: number;
427
+ projectSlug: string;
428
+ updatedAt: string;
429
+ authorId: string;
430
+ authorLabel: string;
431
+ title: string;
432
+ etag: string;
433
+ }>;
434
+ export declare const inboxItemPageSchema: z.ZodObject<{
435
+ schemaVersion: z.ZodLiteral<"treeseed.inbox-page/v1">;
436
+ items: z.ZodArray<z.ZodObject<Pick<{
437
+ schemaVersion: z.ZodLiteral<"treeseed.inbox-item/v1">;
438
+ id: z.ZodString;
439
+ teamId: z.ZodString;
440
+ projectId: z.ZodString;
441
+ projectSlug: z.ZodString;
442
+ kind: z.ZodEnum<["proposal", "question"]>;
443
+ title: z.ZodString;
444
+ markdown: z.ZodString;
445
+ status: z.ZodEnum<["outstanding", "answered", "approved", "rejected", "closed", "deleted"]>;
446
+ authorId: z.ZodString;
447
+ authorLabel: z.ZodString;
448
+ version: z.ZodNumber;
449
+ discussionId: z.ZodNullable<z.ZodString>;
450
+ createdAt: z.ZodString;
451
+ updatedAt: z.ZodString;
452
+ provenance: z.ZodObject<{
453
+ repositoryId: z.ZodNullable<z.ZodString>;
454
+ contentPath: z.ZodNullable<z.ZodString>;
455
+ commitSha: z.ZodNullable<z.ZodString>;
456
+ digest: z.ZodNullable<z.ZodString>;
457
+ }, "strict", z.ZodTypeAny, {
458
+ digest: string | null;
459
+ repositoryId: string | null;
460
+ contentPath: string | null;
461
+ commitSha: string | null;
462
+ }, {
463
+ digest: string | null;
464
+ repositoryId: string | null;
465
+ contentPath: string | null;
466
+ commitSha: string | null;
467
+ }>;
468
+ availableActions: z.ZodArray<z.ZodObject<{
469
+ action: z.ZodEnum<["publish_revision", "approve", "reject", "comment", "answer", "reply", "reopen"]>;
470
+ label: z.ZodString;
471
+ enabled: z.ZodBoolean;
472
+ reason: z.ZodNullable<z.ZodString>;
473
+ requiresFeedback: z.ZodBoolean;
474
+ confirmation: z.ZodEnum<["never", "input_required"]>;
475
+ }, "strict", z.ZodTypeAny, {
476
+ reason: string | null;
477
+ enabled: boolean;
478
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
479
+ confirmation: "never" | "input_required";
480
+ label: string;
481
+ requiresFeedback: boolean;
482
+ }, {
483
+ reason: string | null;
484
+ enabled: boolean;
485
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
486
+ confirmation: "never" | "input_required";
487
+ label: string;
488
+ requiresFeedback: boolean;
489
+ }>, "many">;
490
+ comments: z.ZodArray<z.ZodObject<{
491
+ id: z.ZodString;
492
+ parentId: z.ZodNullable<z.ZodString>;
493
+ kind: z.ZodEnum<["comment", "answer", "reply"]>;
494
+ authorId: z.ZodString;
495
+ authorLabel: z.ZodString;
496
+ markdown: z.ZodString;
497
+ createdAt: z.ZodString;
498
+ provenance: z.ZodObject<{
499
+ repositoryId: z.ZodNullable<z.ZodString>;
500
+ contentPath: z.ZodNullable<z.ZodString>;
501
+ commitSha: z.ZodNullable<z.ZodString>;
502
+ digest: z.ZodNullable<z.ZodString>;
503
+ }, "strict", z.ZodTypeAny, {
504
+ digest: string | null;
505
+ repositoryId: string | null;
506
+ contentPath: string | null;
507
+ commitSha: string | null;
508
+ }, {
509
+ digest: string | null;
510
+ repositoryId: string | null;
511
+ contentPath: string | null;
512
+ commitSha: string | null;
513
+ }>;
514
+ }, "strict", z.ZodTypeAny, {
515
+ createdAt: string;
516
+ kind: "comment" | "answer" | "reply";
517
+ id: string;
518
+ provenance: {
519
+ digest: string | null;
520
+ repositoryId: string | null;
521
+ contentPath: string | null;
522
+ commitSha: string | null;
523
+ };
524
+ markdown: string;
525
+ parentId: string | null;
526
+ authorId: string;
527
+ authorLabel: string;
528
+ }, {
529
+ createdAt: string;
530
+ kind: "comment" | "answer" | "reply";
531
+ id: string;
532
+ provenance: {
533
+ digest: string | null;
534
+ repositoryId: string | null;
535
+ contentPath: string | null;
536
+ commitSha: string | null;
537
+ };
538
+ markdown: string;
539
+ parentId: string | null;
540
+ authorId: string;
541
+ authorLabel: string;
542
+ }>, "many">;
543
+ etag: z.ZodString;
544
+ }, "teamId" | "status" | "createdAt" | "kind" | "id" | "projectId" | "version" | "projectSlug" | "updatedAt" | "authorId" | "authorLabel" | "title" | "etag">, "strict", z.ZodTypeAny, {
545
+ teamId: string;
546
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
547
+ createdAt: string;
548
+ kind: "proposal" | "question";
549
+ id: string;
550
+ projectId: string;
551
+ version: number;
552
+ projectSlug: string;
553
+ updatedAt: string;
554
+ authorId: string;
555
+ authorLabel: string;
556
+ title: string;
557
+ etag: string;
558
+ }, {
559
+ teamId: string;
560
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
561
+ createdAt: string;
562
+ kind: "proposal" | "question";
563
+ id: string;
564
+ projectId: string;
565
+ version: number;
566
+ projectSlug: string;
567
+ updatedAt: string;
568
+ authorId: string;
569
+ authorLabel: string;
570
+ title: string;
571
+ etag: string;
572
+ }>, "many">;
573
+ cursor: z.ZodNullable<z.ZodString>;
574
+ }, "strict", z.ZodTypeAny, {
575
+ schemaVersion: "treeseed.inbox-page/v1";
576
+ items: {
577
+ teamId: string;
578
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
579
+ createdAt: string;
580
+ kind: "proposal" | "question";
581
+ id: string;
582
+ projectId: string;
583
+ version: number;
584
+ projectSlug: string;
585
+ updatedAt: string;
586
+ authorId: string;
587
+ authorLabel: string;
588
+ title: string;
589
+ etag: string;
590
+ }[];
591
+ cursor: string | null;
592
+ }, {
593
+ schemaVersion: "treeseed.inbox-page/v1";
594
+ items: {
595
+ teamId: string;
596
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
597
+ createdAt: string;
598
+ kind: "proposal" | "question";
599
+ id: string;
600
+ projectId: string;
601
+ version: number;
602
+ projectSlug: string;
603
+ updatedAt: string;
604
+ authorId: string;
605
+ authorLabel: string;
606
+ title: string;
607
+ etag: string;
608
+ }[];
609
+ cursor: string | null;
610
+ }>;
611
+ export declare const inboxEventSchema: z.ZodObject<{
612
+ schemaVersion: z.ZodLiteral<"treeseed.inbox-event/v1">;
613
+ sequence: z.ZodString;
614
+ id: z.ZodString;
615
+ teamId: z.ZodString;
616
+ itemId: z.ZodNullable<z.ZodString>;
617
+ type: z.ZodEnum<["item.created", "item.updated", "item.deleted", "draft.updated", "comment.created", "question.answered", "question.reopened", "proposal.revised", "proposal.decided"]>;
618
+ actorId: z.ZodString;
619
+ occurredAt: z.ZodString;
620
+ summary: z.ZodString;
621
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
622
+ }, "strict", z.ZodTypeAny, {
623
+ teamId: string;
624
+ sequence: string;
625
+ schemaVersion: "treeseed.inbox-event/v1";
626
+ type: "item.created" | "item.updated" | "item.deleted" | "draft.updated" | "comment.created" | "question.answered" | "question.reopened" | "proposal.revised" | "proposal.decided";
627
+ payload: Record<string, unknown>;
628
+ id: string;
629
+ summary: string;
630
+ occurredAt: string;
631
+ itemId: string | null;
632
+ actorId: string;
633
+ }, {
634
+ teamId: string;
635
+ sequence: string;
636
+ schemaVersion: "treeseed.inbox-event/v1";
637
+ type: "item.created" | "item.updated" | "item.deleted" | "draft.updated" | "comment.created" | "question.answered" | "question.reopened" | "proposal.revised" | "proposal.decided";
638
+ payload: Record<string, unknown>;
639
+ id: string;
640
+ summary: string;
641
+ occurredAt: string;
642
+ itemId: string | null;
643
+ actorId: string;
644
+ }>;
645
+ export declare const inboxTimelineSchema: z.ZodObject<{
646
+ events: z.ZodArray<z.ZodObject<{
647
+ schemaVersion: z.ZodLiteral<"treeseed.inbox-event/v1">;
648
+ sequence: z.ZodString;
649
+ id: z.ZodString;
650
+ teamId: z.ZodString;
651
+ itemId: z.ZodNullable<z.ZodString>;
652
+ type: z.ZodEnum<["item.created", "item.updated", "item.deleted", "draft.updated", "comment.created", "question.answered", "question.reopened", "proposal.revised", "proposal.decided"]>;
653
+ actorId: z.ZodString;
654
+ occurredAt: z.ZodString;
655
+ summary: z.ZodString;
656
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
657
+ }, "strict", z.ZodTypeAny, {
658
+ teamId: string;
659
+ sequence: string;
660
+ schemaVersion: "treeseed.inbox-event/v1";
661
+ type: "item.created" | "item.updated" | "item.deleted" | "draft.updated" | "comment.created" | "question.answered" | "question.reopened" | "proposal.revised" | "proposal.decided";
662
+ payload: Record<string, unknown>;
663
+ id: string;
664
+ summary: string;
665
+ occurredAt: string;
666
+ itemId: string | null;
667
+ actorId: string;
668
+ }, {
669
+ teamId: string;
670
+ sequence: string;
671
+ schemaVersion: "treeseed.inbox-event/v1";
672
+ type: "item.created" | "item.updated" | "item.deleted" | "draft.updated" | "comment.created" | "question.answered" | "question.reopened" | "proposal.revised" | "proposal.decided";
673
+ payload: Record<string, unknown>;
674
+ id: string;
675
+ summary: string;
676
+ occurredAt: string;
677
+ itemId: string | null;
678
+ actorId: string;
679
+ }>, "many">;
680
+ cursor: z.ZodString;
681
+ }, "strict", z.ZodTypeAny, {
682
+ cursor: string;
683
+ events: {
684
+ teamId: string;
685
+ sequence: string;
686
+ schemaVersion: "treeseed.inbox-event/v1";
687
+ type: "item.created" | "item.updated" | "item.deleted" | "draft.updated" | "comment.created" | "question.answered" | "question.reopened" | "proposal.revised" | "proposal.decided";
688
+ payload: Record<string, unknown>;
689
+ id: string;
690
+ summary: string;
691
+ occurredAt: string;
692
+ itemId: string | null;
693
+ actorId: string;
694
+ }[];
695
+ }, {
696
+ cursor: string;
697
+ events: {
698
+ teamId: string;
699
+ sequence: string;
700
+ schemaVersion: "treeseed.inbox-event/v1";
701
+ type: "item.created" | "item.updated" | "item.deleted" | "draft.updated" | "comment.created" | "question.answered" | "question.reopened" | "proposal.revised" | "proposal.decided";
702
+ payload: Record<string, unknown>;
703
+ id: string;
704
+ summary: string;
705
+ occurredAt: string;
706
+ itemId: string | null;
707
+ actorId: string;
708
+ }[];
709
+ }>;
710
+ export declare const inboxDraftPurposeSchema: z.ZodEnum<["feedback", "proposal_revision"]>;
711
+ export declare const inboxDraftSchema: z.ZodObject<{
712
+ schemaVersion: z.ZodLiteral<"treeseed.inbox-draft/v1">;
713
+ itemId: z.ZodString;
714
+ purpose: z.ZodEnum<["feedback", "proposal_revision"]>;
715
+ markdown: z.ZodString;
716
+ baseVersion: z.ZodNumber;
717
+ revision: z.ZodNumber;
718
+ updatedAt: z.ZodString;
719
+ etag: z.ZodString;
720
+ }, "strict", z.ZodTypeAny, {
721
+ purpose: "feedback" | "proposal_revision";
722
+ schemaVersion: "treeseed.inbox-draft/v1";
723
+ revision: number;
724
+ updatedAt: string;
725
+ markdown: string;
726
+ etag: string;
727
+ itemId: string;
728
+ baseVersion: number;
729
+ }, {
730
+ purpose: "feedback" | "proposal_revision";
731
+ schemaVersion: "treeseed.inbox-draft/v1";
732
+ revision: number;
733
+ updatedAt: string;
734
+ markdown: string;
735
+ etag: string;
736
+ itemId: string;
737
+ baseVersion: number;
738
+ }>;
739
+ export declare const inboxDraftWriteSchema: z.ZodObject<{
740
+ markdown: z.ZodString;
741
+ baseVersion: z.ZodNumber;
742
+ }, "strict", z.ZodTypeAny, {
743
+ markdown: string;
744
+ baseVersion: number;
745
+ }, {
746
+ markdown: string;
747
+ baseVersion: number;
748
+ }>;
749
+ export declare const inboxQuestionCreateSchema: z.ZodObject<{
750
+ projectId: z.ZodString;
751
+ title: z.ZodString;
752
+ markdown: z.ZodString;
753
+ recipients: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
754
+ relatedObjectives: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
755
+ }, "strict", z.ZodTypeAny, {
756
+ projectId: string;
757
+ recipients: string[];
758
+ markdown: string;
759
+ title: string;
760
+ relatedObjectives: string[];
761
+ }, {
762
+ projectId: string;
763
+ markdown: string;
764
+ title: string;
765
+ recipients?: string[] | undefined;
766
+ relatedObjectives?: string[] | undefined;
767
+ }>;
768
+ export declare const inboxActionRequestSchema: z.ZodObject<{
769
+ action: z.ZodEnum<["publish_revision", "approve", "reject", "comment", "answer", "reply", "reopen"]>;
770
+ markdown: z.ZodOptional<z.ZodString>;
771
+ parentId: z.ZodOptional<z.ZodString>;
772
+ changeReason: z.ZodOptional<z.ZodString>;
773
+ draftRevision: z.ZodOptional<z.ZodNumber>;
774
+ }, "strict", z.ZodTypeAny, {
775
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
776
+ markdown?: string | undefined;
777
+ parentId?: string | undefined;
778
+ changeReason?: string | undefined;
779
+ draftRevision?: number | undefined;
780
+ }, {
781
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
782
+ markdown?: string | undefined;
783
+ parentId?: string | undefined;
784
+ changeReason?: string | undefined;
785
+ draftRevision?: number | undefined;
786
+ }>;
787
+ export declare const inboxMutationReceiptSchema: z.ZodObject<{
788
+ schemaVersion: z.ZodLiteral<"treeseed.inbox-mutation-receipt/v1">;
789
+ item: z.ZodObject<{
790
+ schemaVersion: z.ZodLiteral<"treeseed.inbox-item/v1">;
791
+ id: z.ZodString;
792
+ teamId: z.ZodString;
793
+ projectId: z.ZodString;
794
+ projectSlug: z.ZodString;
795
+ kind: z.ZodEnum<["proposal", "question"]>;
796
+ title: z.ZodString;
797
+ markdown: z.ZodString;
798
+ status: z.ZodEnum<["outstanding", "answered", "approved", "rejected", "closed", "deleted"]>;
799
+ authorId: z.ZodString;
800
+ authorLabel: z.ZodString;
801
+ version: z.ZodNumber;
802
+ discussionId: z.ZodNullable<z.ZodString>;
803
+ createdAt: z.ZodString;
804
+ updatedAt: z.ZodString;
805
+ provenance: z.ZodObject<{
806
+ repositoryId: z.ZodNullable<z.ZodString>;
807
+ contentPath: z.ZodNullable<z.ZodString>;
808
+ commitSha: z.ZodNullable<z.ZodString>;
809
+ digest: z.ZodNullable<z.ZodString>;
810
+ }, "strict", z.ZodTypeAny, {
811
+ digest: string | null;
812
+ repositoryId: string | null;
813
+ contentPath: string | null;
814
+ commitSha: string | null;
815
+ }, {
816
+ digest: string | null;
817
+ repositoryId: string | null;
818
+ contentPath: string | null;
819
+ commitSha: string | null;
820
+ }>;
821
+ availableActions: z.ZodArray<z.ZodObject<{
822
+ action: z.ZodEnum<["publish_revision", "approve", "reject", "comment", "answer", "reply", "reopen"]>;
823
+ label: z.ZodString;
824
+ enabled: z.ZodBoolean;
825
+ reason: z.ZodNullable<z.ZodString>;
826
+ requiresFeedback: z.ZodBoolean;
827
+ confirmation: z.ZodEnum<["never", "input_required"]>;
828
+ }, "strict", z.ZodTypeAny, {
829
+ reason: string | null;
830
+ enabled: boolean;
831
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
832
+ confirmation: "never" | "input_required";
833
+ label: string;
834
+ requiresFeedback: boolean;
835
+ }, {
836
+ reason: string | null;
837
+ enabled: boolean;
838
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
839
+ confirmation: "never" | "input_required";
840
+ label: string;
841
+ requiresFeedback: boolean;
842
+ }>, "many">;
843
+ comments: z.ZodArray<z.ZodObject<{
844
+ id: z.ZodString;
845
+ parentId: z.ZodNullable<z.ZodString>;
846
+ kind: z.ZodEnum<["comment", "answer", "reply"]>;
847
+ authorId: z.ZodString;
848
+ authorLabel: z.ZodString;
849
+ markdown: z.ZodString;
850
+ createdAt: z.ZodString;
851
+ provenance: z.ZodObject<{
852
+ repositoryId: z.ZodNullable<z.ZodString>;
853
+ contentPath: z.ZodNullable<z.ZodString>;
854
+ commitSha: z.ZodNullable<z.ZodString>;
855
+ digest: z.ZodNullable<z.ZodString>;
856
+ }, "strict", z.ZodTypeAny, {
857
+ digest: string | null;
858
+ repositoryId: string | null;
859
+ contentPath: string | null;
860
+ commitSha: string | null;
861
+ }, {
862
+ digest: string | null;
863
+ repositoryId: string | null;
864
+ contentPath: string | null;
865
+ commitSha: string | null;
866
+ }>;
867
+ }, "strict", z.ZodTypeAny, {
868
+ createdAt: string;
869
+ kind: "comment" | "answer" | "reply";
870
+ id: string;
871
+ provenance: {
872
+ digest: string | null;
873
+ repositoryId: string | null;
874
+ contentPath: string | null;
875
+ commitSha: string | null;
876
+ };
877
+ markdown: string;
878
+ parentId: string | null;
879
+ authorId: string;
880
+ authorLabel: string;
881
+ }, {
882
+ createdAt: string;
883
+ kind: "comment" | "answer" | "reply";
884
+ id: string;
885
+ provenance: {
886
+ digest: string | null;
887
+ repositoryId: string | null;
888
+ contentPath: string | null;
889
+ commitSha: string | null;
890
+ };
891
+ markdown: string;
892
+ parentId: string | null;
893
+ authorId: string;
894
+ authorLabel: string;
895
+ }>, "many">;
896
+ etag: z.ZodString;
897
+ }, "strict", z.ZodTypeAny, {
898
+ teamId: string;
899
+ schemaVersion: "treeseed.inbox-item/v1";
900
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
901
+ createdAt: string;
902
+ kind: "proposal" | "question";
903
+ id: string;
904
+ projectId: string;
905
+ provenance: {
906
+ digest: string | null;
907
+ repositoryId: string | null;
908
+ contentPath: string | null;
909
+ commitSha: string | null;
910
+ };
911
+ version: number;
912
+ projectSlug: string;
913
+ updatedAt: string;
914
+ markdown: string;
915
+ discussionId: string | null;
916
+ authorId: string;
917
+ authorLabel: string;
918
+ title: string;
919
+ availableActions: {
920
+ reason: string | null;
921
+ enabled: boolean;
922
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
923
+ confirmation: "never" | "input_required";
924
+ label: string;
925
+ requiresFeedback: boolean;
926
+ }[];
927
+ comments: {
928
+ createdAt: string;
929
+ kind: "comment" | "answer" | "reply";
930
+ id: string;
931
+ provenance: {
932
+ digest: string | null;
933
+ repositoryId: string | null;
934
+ contentPath: string | null;
935
+ commitSha: string | null;
936
+ };
937
+ markdown: string;
938
+ parentId: string | null;
939
+ authorId: string;
940
+ authorLabel: string;
941
+ }[];
942
+ etag: string;
943
+ }, {
944
+ teamId: string;
945
+ schemaVersion: "treeseed.inbox-item/v1";
946
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
947
+ createdAt: string;
948
+ kind: "proposal" | "question";
949
+ id: string;
950
+ projectId: string;
951
+ provenance: {
952
+ digest: string | null;
953
+ repositoryId: string | null;
954
+ contentPath: string | null;
955
+ commitSha: string | null;
956
+ };
957
+ version: number;
958
+ projectSlug: string;
959
+ updatedAt: string;
960
+ markdown: string;
961
+ discussionId: string | null;
962
+ authorId: string;
963
+ authorLabel: string;
964
+ title: string;
965
+ availableActions: {
966
+ reason: string | null;
967
+ enabled: boolean;
968
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
969
+ confirmation: "never" | "input_required";
970
+ label: string;
971
+ requiresFeedback: boolean;
972
+ }[];
973
+ comments: {
974
+ createdAt: string;
975
+ kind: "comment" | "answer" | "reply";
976
+ id: string;
977
+ provenance: {
978
+ digest: string | null;
979
+ repositoryId: string | null;
980
+ contentPath: string | null;
981
+ commitSha: string | null;
982
+ };
983
+ markdown: string;
984
+ parentId: string | null;
985
+ authorId: string;
986
+ authorLabel: string;
987
+ }[];
988
+ etag: string;
989
+ }>;
990
+ action: z.ZodOptional<z.ZodEnum<["publish_revision", "approve", "reject", "comment", "answer", "reply", "reopen"]>>;
991
+ replayed: z.ZodBoolean;
992
+ receipts: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
993
+ }, "strict", z.ZodTypeAny, {
994
+ schemaVersion: "treeseed.inbox-mutation-receipt/v1";
995
+ item: {
996
+ teamId: string;
997
+ schemaVersion: "treeseed.inbox-item/v1";
998
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
999
+ createdAt: string;
1000
+ kind: "proposal" | "question";
1001
+ id: string;
1002
+ projectId: string;
1003
+ provenance: {
1004
+ digest: string | null;
1005
+ repositoryId: string | null;
1006
+ contentPath: string | null;
1007
+ commitSha: string | null;
1008
+ };
1009
+ version: number;
1010
+ projectSlug: string;
1011
+ updatedAt: string;
1012
+ markdown: string;
1013
+ discussionId: string | null;
1014
+ authorId: string;
1015
+ authorLabel: string;
1016
+ title: string;
1017
+ availableActions: {
1018
+ reason: string | null;
1019
+ enabled: boolean;
1020
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
1021
+ confirmation: "never" | "input_required";
1022
+ label: string;
1023
+ requiresFeedback: boolean;
1024
+ }[];
1025
+ comments: {
1026
+ createdAt: string;
1027
+ kind: "comment" | "answer" | "reply";
1028
+ id: string;
1029
+ provenance: {
1030
+ digest: string | null;
1031
+ repositoryId: string | null;
1032
+ contentPath: string | null;
1033
+ commitSha: string | null;
1034
+ };
1035
+ markdown: string;
1036
+ parentId: string | null;
1037
+ authorId: string;
1038
+ authorLabel: string;
1039
+ }[];
1040
+ etag: string;
1041
+ };
1042
+ receipts: Record<string, unknown>[];
1043
+ replayed: boolean;
1044
+ action?: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen" | undefined;
1045
+ }, {
1046
+ schemaVersion: "treeseed.inbox-mutation-receipt/v1";
1047
+ item: {
1048
+ teamId: string;
1049
+ schemaVersion: "treeseed.inbox-item/v1";
1050
+ status: "approved" | "rejected" | "outstanding" | "answered" | "closed" | "deleted";
1051
+ createdAt: string;
1052
+ kind: "proposal" | "question";
1053
+ id: string;
1054
+ projectId: string;
1055
+ provenance: {
1056
+ digest: string | null;
1057
+ repositoryId: string | null;
1058
+ contentPath: string | null;
1059
+ commitSha: string | null;
1060
+ };
1061
+ version: number;
1062
+ projectSlug: string;
1063
+ updatedAt: string;
1064
+ markdown: string;
1065
+ discussionId: string | null;
1066
+ authorId: string;
1067
+ authorLabel: string;
1068
+ title: string;
1069
+ availableActions: {
1070
+ reason: string | null;
1071
+ enabled: boolean;
1072
+ action: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen";
1073
+ confirmation: "never" | "input_required";
1074
+ label: string;
1075
+ requiresFeedback: boolean;
1076
+ }[];
1077
+ comments: {
1078
+ createdAt: string;
1079
+ kind: "comment" | "answer" | "reply";
1080
+ id: string;
1081
+ provenance: {
1082
+ digest: string | null;
1083
+ repositoryId: string | null;
1084
+ contentPath: string | null;
1085
+ commitSha: string | null;
1086
+ };
1087
+ markdown: string;
1088
+ parentId: string | null;
1089
+ authorId: string;
1090
+ authorLabel: string;
1091
+ }[];
1092
+ etag: string;
1093
+ };
1094
+ replayed: boolean;
1095
+ action?: "approve" | "reject" | "publish_revision" | "comment" | "answer" | "reply" | "reopen" | undefined;
1096
+ receipts?: Record<string, unknown>[] | undefined;
1097
+ }>;
1098
+ export type InboxItem = z.infer<typeof inboxItemSchema>;
1099
+ export type InboxDraft = z.infer<typeof inboxDraftSchema>;