@treeseed/sdk 0.13.0-rc.117 → 0.13.0-rc.119

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 (77) hide show
  1. package/dist/.treeseed-build-complete.json +1 -1
  2. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +4199 -0
  3. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +155 -0
  4. package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +7 -1
  5. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.d.ts +199 -0
  6. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +96 -0
  7. package/dist/agent-capacity/contracts/operations/agent-team-clone.d.ts +218 -0
  8. package/dist/agent-capacity/contracts/operations/agent-team-clone.js +57 -0
  9. package/dist/agent-capacity/contracts/support/decision-work.d.ts +1 -24
  10. package/dist/agent-capacity/contracts/support/execution-graph.d.ts +1087 -0
  11. package/dist/agent-capacity/contracts/support/execution-graph.js +120 -0
  12. package/dist/agent-capacity/validation/activity-profile.d.ts +1 -1
  13. package/dist/agent-capacity/validation/activity-profile.js +3 -272
  14. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +2699 -8867
  15. package/dist/agent-capacity/validation/agent-definition-schema.js +67 -159
  16. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +3 -3
  17. package/dist/agent-capacity/validation/assignment-records.js +1 -1
  18. package/dist/agent-capacity/validation/execution/execution-graph.d.ts +1 -0
  19. package/dist/agent-capacity/validation/execution/execution-graph.js +16 -0
  20. package/dist/agent-capacity/validation/index.d.ts +2 -1
  21. package/dist/agent-capacity/validation/index.js +2 -1
  22. package/dist/capacity/agents/agent-capacity.d.ts +5 -1
  23. package/dist/capacity/agents/agent-capacity.js +4 -1
  24. package/dist/capacity-provider/client.d.ts +1 -43
  25. package/dist/capacity-provider/client.js +1 -22
  26. package/dist/capacity-provider/sandbox-contracts.d.ts +4 -4
  27. package/dist/capacity-provider/sandbox.d.ts +0 -1
  28. package/dist/capacity-provider/sandbox.js +0 -1
  29. package/dist/capacity-provider/source-workspace.d.ts +19 -171
  30. package/dist/capacity-provider/source-workspace.js +7 -24
  31. package/dist/content/contracts.d.ts +1 -1
  32. package/dist/content/validation/agent-operational-content-schemas.d.ts +24 -695
  33. package/dist/content/validation/agent-operational-content-schemas.js +11 -54
  34. package/dist/content/validation/auxiliary-content-schemas.d.ts +58 -58
  35. package/dist/content/validation/content-model-schemas.d.ts +8617 -18610
  36. package/dist/content/validation/content-model-schemas.js +160 -43
  37. package/dist/content/validation/portable-content-data.d.ts +369 -1681
  38. package/dist/content/validation/portable-content-data.js +5 -4
  39. package/dist/deployment/schemas.d.ts +48 -48
  40. package/dist/development/schemas.d.ts +32 -16
  41. package/dist/development/schemas.js +8 -3
  42. package/dist/model-registry/agent-operational-models.d.ts +1 -1
  43. package/dist/model-registry/agent-operational-models.js +0 -3
  44. package/dist/model-registry/build-builtin-model-registry.js +44 -72
  45. package/dist/operator-contracts/canonical-command-tree.js +63 -180
  46. package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +75 -0
  47. package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.js +42 -0
  48. package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +60 -0
  49. package/dist/operator-contracts/catalog/commands/command-tree-builders.js +191 -0
  50. package/dist/operator-contracts/catalog/communication-operations.d.ts +1 -1
  51. package/dist/operator-contracts/catalog/execution/execution-operations.d.ts +36 -0
  52. package/dist/operator-contracts/catalog/execution/execution-operations.js +39 -0
  53. package/dist/operator-contracts/catalog/inbox-operations.d.ts +5 -1
  54. package/dist/operator-contracts/catalog/workdays/selection-commands.js +1 -0
  55. package/dist/operator-contracts/command-tree.js +1 -0
  56. package/dist/operator-contracts/control-plane-operations.d.ts +136 -73
  57. package/dist/operator-contracts/control-plane-operations.js +19 -40
  58. package/dist/operator-contracts/inbox/contracts.d.ts +12 -0
  59. package/dist/operator-contracts/inbox/contracts.js +5 -1
  60. package/dist/operator-contracts/mcp.js +1 -1
  61. package/dist/operator-contracts/workday-lifecycle.d.ts +8 -8
  62. package/dist/operator-contracts/workday-lifecycle.js +6 -3
  63. package/dist/sdk-types/support/sdk-model-names.d.ts +1 -1
  64. package/dist/sdk-types/support/sdk-model-names.js +0 -3
  65. package/dist/secrets-capability/shared-resources.d.ts +6 -6
  66. package/dist/types/agents/agent-activity-profile.d.ts +39 -77
  67. package/dist/types/agents/agent-activity-profile.js +23 -0
  68. package/dist/types/agents/execution-run-ref.d.ts +1 -8
  69. package/package.json +1 -1
  70. package/dist/agent-capacity/authority/agent-authority-presets.d.ts +0 -13
  71. package/dist/agent-capacity/authority/agent-authority-presets.js +0 -107
  72. package/dist/agent-capacity/contracts/operations/workflow-promotion.d.ts +0 -24
  73. package/dist/agent-capacity/contracts/operations/workflow-promotion.js +0 -0
  74. package/dist/agent-capacity/validation/workflow-promotion.d.ts +0 -2
  75. package/dist/agent-capacity/validation/workflow-promotion.js +0 -34
  76. package/dist/capacity-provider/source/candidate.d.ts +0 -1275
  77. package/dist/capacity-provider/source/candidate.js +0 -72
@@ -0,0 +1,4199 @@
1
+ import { z } from 'zod';
2
+ export declare const exactEntityReferenceSchema: z.ZodEffects<z.ZodObject<{
3
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
4
+ model: z.ZodString;
5
+ id: z.ZodString;
6
+ revision: z.ZodOptional<z.ZodNumber>;
7
+ digest: z.ZodOptional<z.ZodString>;
8
+ repository: z.ZodOptional<z.ZodString>;
9
+ commit: z.ZodOptional<z.ZodString>;
10
+ path: z.ZodOptional<z.ZodString>;
11
+ anchor: z.ZodOptional<z.ZodString>;
12
+ startLine: z.ZodOptional<z.ZodNumber>;
13
+ endLine: z.ZodOptional<z.ZodNumber>;
14
+ url: z.ZodOptional<z.ZodString>;
15
+ }, "strict", z.ZodTypeAny, {
16
+ id: string;
17
+ model: string;
18
+ store: "git" | "url" | "postgresql" | "treedx";
19
+ path?: string | undefined;
20
+ repository?: string | undefined;
21
+ commit?: string | undefined;
22
+ digest?: string | undefined;
23
+ anchor?: string | undefined;
24
+ url?: string | undefined;
25
+ revision?: number | undefined;
26
+ startLine?: number | undefined;
27
+ endLine?: number | undefined;
28
+ }, {
29
+ id: string;
30
+ model: string;
31
+ store: "git" | "url" | "postgresql" | "treedx";
32
+ path?: string | undefined;
33
+ repository?: string | undefined;
34
+ commit?: string | undefined;
35
+ digest?: string | undefined;
36
+ anchor?: string | undefined;
37
+ url?: string | undefined;
38
+ revision?: number | undefined;
39
+ startLine?: number | undefined;
40
+ endLine?: number | undefined;
41
+ }>, {
42
+ id: string;
43
+ model: string;
44
+ store: "git" | "url" | "postgresql" | "treedx";
45
+ path?: string | undefined;
46
+ repository?: string | undefined;
47
+ commit?: string | undefined;
48
+ digest?: string | undefined;
49
+ anchor?: string | undefined;
50
+ url?: string | undefined;
51
+ revision?: number | undefined;
52
+ startLine?: number | undefined;
53
+ endLine?: number | undefined;
54
+ }, {
55
+ id: string;
56
+ model: string;
57
+ store: "git" | "url" | "postgresql" | "treedx";
58
+ path?: string | undefined;
59
+ repository?: string | undefined;
60
+ commit?: string | undefined;
61
+ digest?: string | undefined;
62
+ anchor?: string | undefined;
63
+ url?: string | undefined;
64
+ revision?: number | undefined;
65
+ startLine?: number | undefined;
66
+ endLine?: number | undefined;
67
+ }>;
68
+ export declare const assignmentReferenceSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
69
+ kind: z.ZodLiteral<"git">;
70
+ repository: z.ZodString;
71
+ commit: z.ZodString;
72
+ branch: z.ZodOptional<z.ZodString>;
73
+ path: z.ZodOptional<z.ZodString>;
74
+ }, "strict", z.ZodTypeAny, {
75
+ kind: "git";
76
+ repository: string;
77
+ commit: string;
78
+ path?: string | undefined;
79
+ branch?: string | undefined;
80
+ }, {
81
+ kind: "git";
82
+ repository: string;
83
+ commit: string;
84
+ path?: string | undefined;
85
+ branch?: string | undefined;
86
+ }>, z.ZodObject<{
87
+ kind: z.ZodLiteral<"treedx">;
88
+ projectId: z.ZodString;
89
+ repository: z.ZodString;
90
+ commit: z.ZodString;
91
+ path: z.ZodString;
92
+ workspaceId: z.ZodOptional<z.ZodString>;
93
+ }, "strict", z.ZodTypeAny, {
94
+ path: string;
95
+ kind: "treedx";
96
+ repository: string;
97
+ commit: string;
98
+ projectId: string;
99
+ workspaceId?: string | undefined;
100
+ }, {
101
+ path: string;
102
+ kind: "treedx";
103
+ repository: string;
104
+ commit: string;
105
+ projectId: string;
106
+ workspaceId?: string | undefined;
107
+ }>, z.ZodObject<{
108
+ kind: z.ZodLiteral<"url">;
109
+ url: z.ZodString;
110
+ digest: z.ZodOptional<z.ZodString>;
111
+ }, "strict", z.ZodTypeAny, {
112
+ kind: "url";
113
+ url: string;
114
+ digest?: string | undefined;
115
+ }, {
116
+ kind: "url";
117
+ url: string;
118
+ digest?: string | undefined;
119
+ }>]>;
120
+ export declare const exactGrantSchema: z.ZodObject<{
121
+ contentRead: z.ZodArray<z.ZodEffects<z.ZodObject<{
122
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
123
+ model: z.ZodString;
124
+ id: z.ZodString;
125
+ revision: z.ZodOptional<z.ZodNumber>;
126
+ digest: z.ZodOptional<z.ZodString>;
127
+ repository: z.ZodOptional<z.ZodString>;
128
+ commit: z.ZodOptional<z.ZodString>;
129
+ path: z.ZodOptional<z.ZodString>;
130
+ anchor: z.ZodOptional<z.ZodString>;
131
+ startLine: z.ZodOptional<z.ZodNumber>;
132
+ endLine: z.ZodOptional<z.ZodNumber>;
133
+ url: z.ZodOptional<z.ZodString>;
134
+ }, "strict", z.ZodTypeAny, {
135
+ id: string;
136
+ model: string;
137
+ store: "git" | "url" | "postgresql" | "treedx";
138
+ path?: string | undefined;
139
+ repository?: string | undefined;
140
+ commit?: string | undefined;
141
+ digest?: string | undefined;
142
+ anchor?: string | undefined;
143
+ url?: string | undefined;
144
+ revision?: number | undefined;
145
+ startLine?: number | undefined;
146
+ endLine?: number | undefined;
147
+ }, {
148
+ id: string;
149
+ model: string;
150
+ store: "git" | "url" | "postgresql" | "treedx";
151
+ path?: string | undefined;
152
+ repository?: string | undefined;
153
+ commit?: string | undefined;
154
+ digest?: string | undefined;
155
+ anchor?: string | undefined;
156
+ url?: string | undefined;
157
+ revision?: number | undefined;
158
+ startLine?: number | undefined;
159
+ endLine?: number | undefined;
160
+ }>, {
161
+ id: string;
162
+ model: string;
163
+ store: "git" | "url" | "postgresql" | "treedx";
164
+ path?: string | undefined;
165
+ repository?: string | undefined;
166
+ commit?: string | undefined;
167
+ digest?: string | undefined;
168
+ anchor?: string | undefined;
169
+ url?: string | undefined;
170
+ revision?: number | undefined;
171
+ startLine?: number | undefined;
172
+ endLine?: number | undefined;
173
+ }, {
174
+ id: string;
175
+ model: string;
176
+ store: "git" | "url" | "postgresql" | "treedx";
177
+ path?: string | undefined;
178
+ repository?: string | undefined;
179
+ commit?: string | undefined;
180
+ digest?: string | undefined;
181
+ anchor?: string | undefined;
182
+ url?: string | undefined;
183
+ revision?: number | undefined;
184
+ startLine?: number | undefined;
185
+ endLine?: number | undefined;
186
+ }>, "many">;
187
+ contentWrite: z.ZodArray<z.ZodEffects<z.ZodObject<{
188
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
189
+ model: z.ZodString;
190
+ id: z.ZodString;
191
+ revision: z.ZodOptional<z.ZodNumber>;
192
+ digest: z.ZodOptional<z.ZodString>;
193
+ repository: z.ZodOptional<z.ZodString>;
194
+ commit: z.ZodOptional<z.ZodString>;
195
+ path: z.ZodOptional<z.ZodString>;
196
+ anchor: z.ZodOptional<z.ZodString>;
197
+ startLine: z.ZodOptional<z.ZodNumber>;
198
+ endLine: z.ZodOptional<z.ZodNumber>;
199
+ url: z.ZodOptional<z.ZodString>;
200
+ }, "strict", z.ZodTypeAny, {
201
+ id: string;
202
+ model: string;
203
+ store: "git" | "url" | "postgresql" | "treedx";
204
+ path?: string | undefined;
205
+ repository?: string | undefined;
206
+ commit?: string | undefined;
207
+ digest?: string | undefined;
208
+ anchor?: string | undefined;
209
+ url?: string | undefined;
210
+ revision?: number | undefined;
211
+ startLine?: number | undefined;
212
+ endLine?: number | undefined;
213
+ }, {
214
+ id: string;
215
+ model: string;
216
+ store: "git" | "url" | "postgresql" | "treedx";
217
+ path?: string | undefined;
218
+ repository?: string | undefined;
219
+ commit?: string | undefined;
220
+ digest?: string | undefined;
221
+ anchor?: string | undefined;
222
+ url?: string | undefined;
223
+ revision?: number | undefined;
224
+ startLine?: number | undefined;
225
+ endLine?: number | undefined;
226
+ }>, {
227
+ id: string;
228
+ model: string;
229
+ store: "git" | "url" | "postgresql" | "treedx";
230
+ path?: string | undefined;
231
+ repository?: string | undefined;
232
+ commit?: string | undefined;
233
+ digest?: string | undefined;
234
+ anchor?: string | undefined;
235
+ url?: string | undefined;
236
+ revision?: number | undefined;
237
+ startLine?: number | undefined;
238
+ endLine?: number | undefined;
239
+ }, {
240
+ id: string;
241
+ model: string;
242
+ store: "git" | "url" | "postgresql" | "treedx";
243
+ path?: string | undefined;
244
+ repository?: string | undefined;
245
+ commit?: string | undefined;
246
+ digest?: string | undefined;
247
+ anchor?: string | undefined;
248
+ url?: string | undefined;
249
+ revision?: number | undefined;
250
+ startLine?: number | undefined;
251
+ endLine?: number | undefined;
252
+ }>, "many">;
253
+ sourceRead: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
254
+ sourceWrite: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
255
+ tools: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
256
+ }, "strict", z.ZodTypeAny, {
257
+ tools: string[];
258
+ contentRead: {
259
+ id: string;
260
+ model: string;
261
+ store: "git" | "url" | "postgresql" | "treedx";
262
+ path?: string | undefined;
263
+ repository?: string | undefined;
264
+ commit?: string | undefined;
265
+ digest?: string | undefined;
266
+ anchor?: string | undefined;
267
+ url?: string | undefined;
268
+ revision?: number | undefined;
269
+ startLine?: number | undefined;
270
+ endLine?: number | undefined;
271
+ }[];
272
+ contentWrite: {
273
+ id: string;
274
+ model: string;
275
+ store: "git" | "url" | "postgresql" | "treedx";
276
+ path?: string | undefined;
277
+ repository?: string | undefined;
278
+ commit?: string | undefined;
279
+ digest?: string | undefined;
280
+ anchor?: string | undefined;
281
+ url?: string | undefined;
282
+ revision?: number | undefined;
283
+ startLine?: number | undefined;
284
+ endLine?: number | undefined;
285
+ }[];
286
+ sourceRead: string[];
287
+ sourceWrite: string[];
288
+ }, {
289
+ tools: string[];
290
+ contentRead: {
291
+ id: string;
292
+ model: string;
293
+ store: "git" | "url" | "postgresql" | "treedx";
294
+ path?: string | undefined;
295
+ repository?: string | undefined;
296
+ commit?: string | undefined;
297
+ digest?: string | undefined;
298
+ anchor?: string | undefined;
299
+ url?: string | undefined;
300
+ revision?: number | undefined;
301
+ startLine?: number | undefined;
302
+ endLine?: number | undefined;
303
+ }[];
304
+ contentWrite: {
305
+ id: string;
306
+ model: string;
307
+ store: "git" | "url" | "postgresql" | "treedx";
308
+ path?: string | undefined;
309
+ repository?: string | undefined;
310
+ commit?: string | undefined;
311
+ digest?: string | undefined;
312
+ anchor?: string | undefined;
313
+ url?: string | undefined;
314
+ revision?: number | undefined;
315
+ startLine?: number | undefined;
316
+ endLine?: number | undefined;
317
+ }[];
318
+ sourceRead: string[];
319
+ sourceWrite: string[];
320
+ }>;
321
+ export declare const assignmentWorkspaceSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
322
+ mode: z.ZodLiteral<"read-only">;
323
+ }, "strict", z.ZodTypeAny, {
324
+ mode: "read-only";
325
+ }, {
326
+ mode: "read-only";
327
+ }>, z.ZodObject<{
328
+ mode: z.ZodLiteral<"treedx">;
329
+ workspaceId: z.ZodString;
330
+ repository: z.ZodString;
331
+ baseCommit: z.ZodString;
332
+ writablePaths: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>, string[], string[]>;
333
+ }, "strict", z.ZodTypeAny, {
334
+ repository: string;
335
+ mode: "treedx";
336
+ workspaceId: string;
337
+ baseCommit: string;
338
+ writablePaths: string[];
339
+ }, {
340
+ repository: string;
341
+ mode: "treedx";
342
+ workspaceId: string;
343
+ baseCommit: string;
344
+ writablePaths: string[];
345
+ }>, z.ZodObject<{
346
+ mode: z.ZodLiteral<"git">;
347
+ repository: z.ZodString;
348
+ baseCommit: z.ZodString;
349
+ branch: z.ZodString;
350
+ writablePaths: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>, string[], string[]>;
351
+ }, "strict", z.ZodTypeAny, {
352
+ repository: string;
353
+ branch: string;
354
+ mode: "git";
355
+ baseCommit: string;
356
+ writablePaths: string[];
357
+ }, {
358
+ repository: string;
359
+ branch: string;
360
+ mode: "git";
361
+ baseCommit: string;
362
+ writablePaths: string[];
363
+ }>]>;
364
+ export declare const estimateSchema: z.ZodEffects<z.ZodObject<{
365
+ minimumSeconds: z.ZodNumber;
366
+ expectedSeconds: z.ZodNumber;
367
+ maximumSeconds: z.ZodNumber;
368
+ rationale: z.ZodOptional<z.ZodString>;
369
+ }, "strict", z.ZodTypeAny, {
370
+ minimumSeconds: number;
371
+ expectedSeconds: number;
372
+ maximumSeconds: number;
373
+ rationale?: string | undefined;
374
+ }, {
375
+ minimumSeconds: number;
376
+ expectedSeconds: number;
377
+ maximumSeconds: number;
378
+ rationale?: string | undefined;
379
+ }>, {
380
+ minimumSeconds: number;
381
+ expectedSeconds: number;
382
+ maximumSeconds: number;
383
+ rationale?: string | undefined;
384
+ }, {
385
+ minimumSeconds: number;
386
+ expectedSeconds: number;
387
+ maximumSeconds: number;
388
+ rationale?: string | undefined;
389
+ }>;
390
+ export declare const effectiveActivityProfileSchema: z.ZodObject<Omit<Omit<{
391
+ handler: z.ZodString;
392
+ dependsOn: z.ZodOptional<z.ZodEffects<z.ZodObject<{
393
+ agents: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
394
+ events: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodLiteral<"workday-closing">, "many">, "workday-closing"[], "workday-closing"[]>>;
395
+ }, "strict", z.ZodTypeAny, {
396
+ agents?: string[] | undefined;
397
+ events?: "workday-closing"[] | undefined;
398
+ }, {
399
+ agents?: string[] | undefined;
400
+ events?: "workday-closing"[] | undefined;
401
+ }>, {
402
+ agents?: string[] | undefined;
403
+ events?: "workday-closing"[] | undefined;
404
+ }, {
405
+ agents?: string[] | undefined;
406
+ events?: "workday-closing"[] | undefined;
407
+ }>>;
408
+ permissions: z.ZodObject<{
409
+ content: z.ZodObject<{
410
+ read: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
411
+ write: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
412
+ }, "strict", z.ZodTypeAny, {
413
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
414
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
415
+ }, {
416
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
417
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
418
+ }>;
419
+ tools: z.ZodEffects<z.ZodArray<z.ZodEnum<["discussion", "source.read", "source.write", "verification", "release"]>, "many">, ("release" | "verification" | "discussion" | "source.read" | "source.write")[], ("release" | "verification" | "discussion" | "source.read" | "source.write")[]>;
420
+ }, "strict", z.ZodTypeAny, {
421
+ content: {
422
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
423
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
424
+ };
425
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
426
+ }, {
427
+ content: {
428
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
429
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
430
+ };
431
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
432
+ }>;
433
+ prompt: z.ZodObject<{
434
+ system: z.ZodString;
435
+ instructions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
436
+ }, "strict", z.ZodTypeAny, {
437
+ system: string;
438
+ instructions?: string[] | undefined;
439
+ }, {
440
+ system: string;
441
+ instructions?: string[] | undefined;
442
+ }>;
443
+ additionalContext: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
444
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
445
+ }, "dependsOn"> & {
446
+ profileRef: z.ZodEffects<z.ZodObject<{
447
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
448
+ model: z.ZodString;
449
+ id: z.ZodString;
450
+ revision: z.ZodOptional<z.ZodNumber>;
451
+ digest: z.ZodOptional<z.ZodString>;
452
+ repository: z.ZodOptional<z.ZodString>;
453
+ commit: z.ZodOptional<z.ZodString>;
454
+ path: z.ZodOptional<z.ZodString>;
455
+ anchor: z.ZodOptional<z.ZodString>;
456
+ startLine: z.ZodOptional<z.ZodNumber>;
457
+ endLine: z.ZodOptional<z.ZodNumber>;
458
+ url: z.ZodOptional<z.ZodString>;
459
+ }, "strict", z.ZodTypeAny, {
460
+ id: string;
461
+ model: string;
462
+ store: "git" | "url" | "postgresql" | "treedx";
463
+ path?: string | undefined;
464
+ repository?: string | undefined;
465
+ commit?: string | undefined;
466
+ digest?: string | undefined;
467
+ anchor?: string | undefined;
468
+ url?: string | undefined;
469
+ revision?: number | undefined;
470
+ startLine?: number | undefined;
471
+ endLine?: number | undefined;
472
+ }, {
473
+ id: string;
474
+ model: string;
475
+ store: "git" | "url" | "postgresql" | "treedx";
476
+ path?: string | undefined;
477
+ repository?: string | undefined;
478
+ commit?: string | undefined;
479
+ digest?: string | undefined;
480
+ anchor?: string | undefined;
481
+ url?: string | undefined;
482
+ revision?: number | undefined;
483
+ startLine?: number | undefined;
484
+ endLine?: number | undefined;
485
+ }>, {
486
+ id: string;
487
+ model: string;
488
+ store: "git" | "url" | "postgresql" | "treedx";
489
+ path?: string | undefined;
490
+ repository?: string | undefined;
491
+ commit?: string | undefined;
492
+ digest?: string | undefined;
493
+ anchor?: string | undefined;
494
+ url?: string | undefined;
495
+ revision?: number | undefined;
496
+ startLine?: number | undefined;
497
+ endLine?: number | undefined;
498
+ }, {
499
+ id: string;
500
+ model: string;
501
+ store: "git" | "url" | "postgresql" | "treedx";
502
+ path?: string | undefined;
503
+ repository?: string | undefined;
504
+ commit?: string | undefined;
505
+ digest?: string | undefined;
506
+ anchor?: string | undefined;
507
+ url?: string | undefined;
508
+ revision?: number | undefined;
509
+ startLine?: number | undefined;
510
+ endLine?: number | undefined;
511
+ }>;
512
+ activity: z.ZodEnum<["planning", "estimating", "acting", "reviewing", "reporting", "chat"]>;
513
+ handlerOrigin: z.ZodEnum<["agent-package", "project-runtime"]>;
514
+ permissionCeiling: z.ZodObject<{
515
+ content: z.ZodObject<{
516
+ read: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
517
+ write: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
518
+ }, "strict", z.ZodTypeAny, {
519
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
520
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
521
+ }, {
522
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
523
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
524
+ }>;
525
+ tools: z.ZodEffects<z.ZodArray<z.ZodEnum<["discussion", "source.read", "source.write", "verification", "release"]>, "many">, ("release" | "verification" | "discussion" | "source.read" | "source.write")[], ("release" | "verification" | "discussion" | "source.read" | "source.write")[]>;
526
+ }, "strict", z.ZodTypeAny, {
527
+ content: {
528
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
529
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
530
+ };
531
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
532
+ }, {
533
+ content: {
534
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
535
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
536
+ };
537
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
538
+ }>;
539
+ }, "permissions">, "strict", z.ZodTypeAny, {
540
+ prompt: {
541
+ system: string;
542
+ instructions?: string[] | undefined;
543
+ };
544
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
545
+ handler: string;
546
+ profileRef: {
547
+ id: string;
548
+ model: string;
549
+ store: "git" | "url" | "postgresql" | "treedx";
550
+ path?: string | undefined;
551
+ repository?: string | undefined;
552
+ commit?: string | undefined;
553
+ digest?: string | undefined;
554
+ anchor?: string | undefined;
555
+ url?: string | undefined;
556
+ revision?: number | undefined;
557
+ startLine?: number | undefined;
558
+ endLine?: number | undefined;
559
+ };
560
+ handlerOrigin: "agent-package" | "project-runtime";
561
+ permissionCeiling: {
562
+ content: {
563
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
564
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
565
+ };
566
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
567
+ };
568
+ parameters?: Record<string, unknown> | undefined;
569
+ additionalContext?: string[] | undefined;
570
+ }, {
571
+ prompt: {
572
+ system: string;
573
+ instructions?: string[] | undefined;
574
+ };
575
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
576
+ handler: string;
577
+ profileRef: {
578
+ id: string;
579
+ model: string;
580
+ store: "git" | "url" | "postgresql" | "treedx";
581
+ path?: string | undefined;
582
+ repository?: string | undefined;
583
+ commit?: string | undefined;
584
+ digest?: string | undefined;
585
+ anchor?: string | undefined;
586
+ url?: string | undefined;
587
+ revision?: number | undefined;
588
+ startLine?: number | undefined;
589
+ endLine?: number | undefined;
590
+ };
591
+ handlerOrigin: "agent-package" | "project-runtime";
592
+ permissionCeiling: {
593
+ content: {
594
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
595
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
596
+ };
597
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
598
+ };
599
+ parameters?: Record<string, unknown> | undefined;
600
+ additionalContext?: string[] | undefined;
601
+ }>;
602
+ export declare const assignmentAttemptSchema: z.ZodObject<{
603
+ schemaVersion: z.ZodLiteral<"treeseed.assignment-attempt/v1">;
604
+ id: z.ZodString;
605
+ idempotencyKey: z.ZodString;
606
+ teamId: z.ZodString;
607
+ projectId: z.ZodString;
608
+ workdayId: z.ZodString;
609
+ nodeId: z.ZodString;
610
+ workItemId: z.ZodOptional<z.ZodString>;
611
+ nodeRevision: z.ZodNumber;
612
+ graphRevision: z.ZodNumber;
613
+ sourceRef: z.ZodEffects<z.ZodObject<{
614
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
615
+ model: z.ZodString;
616
+ id: z.ZodString;
617
+ revision: z.ZodOptional<z.ZodNumber>;
618
+ digest: z.ZodOptional<z.ZodString>;
619
+ repository: z.ZodOptional<z.ZodString>;
620
+ commit: z.ZodOptional<z.ZodString>;
621
+ path: z.ZodOptional<z.ZodString>;
622
+ anchor: z.ZodOptional<z.ZodString>;
623
+ startLine: z.ZodOptional<z.ZodNumber>;
624
+ endLine: z.ZodOptional<z.ZodNumber>;
625
+ url: z.ZodOptional<z.ZodString>;
626
+ }, "strict", z.ZodTypeAny, {
627
+ id: string;
628
+ model: string;
629
+ store: "git" | "url" | "postgresql" | "treedx";
630
+ path?: string | undefined;
631
+ repository?: string | undefined;
632
+ commit?: string | undefined;
633
+ digest?: string | undefined;
634
+ anchor?: string | undefined;
635
+ url?: string | undefined;
636
+ revision?: number | undefined;
637
+ startLine?: number | undefined;
638
+ endLine?: number | undefined;
639
+ }, {
640
+ id: string;
641
+ model: string;
642
+ store: "git" | "url" | "postgresql" | "treedx";
643
+ path?: string | undefined;
644
+ repository?: string | undefined;
645
+ commit?: string | undefined;
646
+ digest?: string | undefined;
647
+ anchor?: string | undefined;
648
+ url?: string | undefined;
649
+ revision?: number | undefined;
650
+ startLine?: number | undefined;
651
+ endLine?: number | undefined;
652
+ }>, {
653
+ id: string;
654
+ model: string;
655
+ store: "git" | "url" | "postgresql" | "treedx";
656
+ path?: string | undefined;
657
+ repository?: string | undefined;
658
+ commit?: string | undefined;
659
+ digest?: string | undefined;
660
+ anchor?: string | undefined;
661
+ url?: string | undefined;
662
+ revision?: number | undefined;
663
+ startLine?: number | undefined;
664
+ endLine?: number | undefined;
665
+ }, {
666
+ id: string;
667
+ model: string;
668
+ store: "git" | "url" | "postgresql" | "treedx";
669
+ path?: string | undefined;
670
+ repository?: string | undefined;
671
+ commit?: string | undefined;
672
+ digest?: string | undefined;
673
+ anchor?: string | undefined;
674
+ url?: string | undefined;
675
+ revision?: number | undefined;
676
+ startLine?: number | undefined;
677
+ endLine?: number | undefined;
678
+ }>;
679
+ authorityRefs: z.ZodArray<z.ZodEffects<z.ZodObject<{
680
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
681
+ model: z.ZodString;
682
+ id: z.ZodString;
683
+ revision: z.ZodOptional<z.ZodNumber>;
684
+ digest: z.ZodOptional<z.ZodString>;
685
+ repository: z.ZodOptional<z.ZodString>;
686
+ commit: z.ZodOptional<z.ZodString>;
687
+ path: z.ZodOptional<z.ZodString>;
688
+ anchor: z.ZodOptional<z.ZodString>;
689
+ startLine: z.ZodOptional<z.ZodNumber>;
690
+ endLine: z.ZodOptional<z.ZodNumber>;
691
+ url: z.ZodOptional<z.ZodString>;
692
+ }, "strict", z.ZodTypeAny, {
693
+ id: string;
694
+ model: string;
695
+ store: "git" | "url" | "postgresql" | "treedx";
696
+ path?: string | undefined;
697
+ repository?: string | undefined;
698
+ commit?: string | undefined;
699
+ digest?: string | undefined;
700
+ anchor?: string | undefined;
701
+ url?: string | undefined;
702
+ revision?: number | undefined;
703
+ startLine?: number | undefined;
704
+ endLine?: number | undefined;
705
+ }, {
706
+ id: string;
707
+ model: string;
708
+ store: "git" | "url" | "postgresql" | "treedx";
709
+ path?: string | undefined;
710
+ repository?: string | undefined;
711
+ commit?: string | undefined;
712
+ digest?: string | undefined;
713
+ anchor?: string | undefined;
714
+ url?: string | undefined;
715
+ revision?: number | undefined;
716
+ startLine?: number | undefined;
717
+ endLine?: number | undefined;
718
+ }>, {
719
+ id: string;
720
+ model: string;
721
+ store: "git" | "url" | "postgresql" | "treedx";
722
+ path?: string | undefined;
723
+ repository?: string | undefined;
724
+ commit?: string | undefined;
725
+ digest?: string | undefined;
726
+ anchor?: string | undefined;
727
+ url?: string | undefined;
728
+ revision?: number | undefined;
729
+ startLine?: number | undefined;
730
+ endLine?: number | undefined;
731
+ }, {
732
+ id: string;
733
+ model: string;
734
+ store: "git" | "url" | "postgresql" | "treedx";
735
+ path?: string | undefined;
736
+ repository?: string | undefined;
737
+ commit?: string | undefined;
738
+ digest?: string | undefined;
739
+ anchor?: string | undefined;
740
+ url?: string | undefined;
741
+ revision?: number | undefined;
742
+ startLine?: number | undefined;
743
+ endLine?: number | undefined;
744
+ }>, "many">;
745
+ effectiveProfile: z.ZodObject<Omit<Omit<{
746
+ handler: z.ZodString;
747
+ dependsOn: z.ZodOptional<z.ZodEffects<z.ZodObject<{
748
+ agents: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
749
+ events: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodLiteral<"workday-closing">, "many">, "workday-closing"[], "workday-closing"[]>>;
750
+ }, "strict", z.ZodTypeAny, {
751
+ agents?: string[] | undefined;
752
+ events?: "workday-closing"[] | undefined;
753
+ }, {
754
+ agents?: string[] | undefined;
755
+ events?: "workday-closing"[] | undefined;
756
+ }>, {
757
+ agents?: string[] | undefined;
758
+ events?: "workday-closing"[] | undefined;
759
+ }, {
760
+ agents?: string[] | undefined;
761
+ events?: "workday-closing"[] | undefined;
762
+ }>>;
763
+ permissions: z.ZodObject<{
764
+ content: z.ZodObject<{
765
+ read: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
766
+ write: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
767
+ }, "strict", z.ZodTypeAny, {
768
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
769
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
770
+ }, {
771
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
772
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
773
+ }>;
774
+ tools: z.ZodEffects<z.ZodArray<z.ZodEnum<["discussion", "source.read", "source.write", "verification", "release"]>, "many">, ("release" | "verification" | "discussion" | "source.read" | "source.write")[], ("release" | "verification" | "discussion" | "source.read" | "source.write")[]>;
775
+ }, "strict", z.ZodTypeAny, {
776
+ content: {
777
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
778
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
779
+ };
780
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
781
+ }, {
782
+ content: {
783
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
784
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
785
+ };
786
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
787
+ }>;
788
+ prompt: z.ZodObject<{
789
+ system: z.ZodString;
790
+ instructions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
791
+ }, "strict", z.ZodTypeAny, {
792
+ system: string;
793
+ instructions?: string[] | undefined;
794
+ }, {
795
+ system: string;
796
+ instructions?: string[] | undefined;
797
+ }>;
798
+ additionalContext: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
799
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
800
+ }, "dependsOn"> & {
801
+ profileRef: z.ZodEffects<z.ZodObject<{
802
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
803
+ model: z.ZodString;
804
+ id: z.ZodString;
805
+ revision: z.ZodOptional<z.ZodNumber>;
806
+ digest: z.ZodOptional<z.ZodString>;
807
+ repository: z.ZodOptional<z.ZodString>;
808
+ commit: z.ZodOptional<z.ZodString>;
809
+ path: z.ZodOptional<z.ZodString>;
810
+ anchor: z.ZodOptional<z.ZodString>;
811
+ startLine: z.ZodOptional<z.ZodNumber>;
812
+ endLine: z.ZodOptional<z.ZodNumber>;
813
+ url: z.ZodOptional<z.ZodString>;
814
+ }, "strict", z.ZodTypeAny, {
815
+ id: string;
816
+ model: string;
817
+ store: "git" | "url" | "postgresql" | "treedx";
818
+ path?: string | undefined;
819
+ repository?: string | undefined;
820
+ commit?: string | undefined;
821
+ digest?: string | undefined;
822
+ anchor?: string | undefined;
823
+ url?: string | undefined;
824
+ revision?: number | undefined;
825
+ startLine?: number | undefined;
826
+ endLine?: number | undefined;
827
+ }, {
828
+ id: string;
829
+ model: string;
830
+ store: "git" | "url" | "postgresql" | "treedx";
831
+ path?: string | undefined;
832
+ repository?: string | undefined;
833
+ commit?: string | undefined;
834
+ digest?: string | undefined;
835
+ anchor?: string | undefined;
836
+ url?: string | undefined;
837
+ revision?: number | undefined;
838
+ startLine?: number | undefined;
839
+ endLine?: number | undefined;
840
+ }>, {
841
+ id: string;
842
+ model: string;
843
+ store: "git" | "url" | "postgresql" | "treedx";
844
+ path?: string | undefined;
845
+ repository?: string | undefined;
846
+ commit?: string | undefined;
847
+ digest?: string | undefined;
848
+ anchor?: string | undefined;
849
+ url?: string | undefined;
850
+ revision?: number | undefined;
851
+ startLine?: number | undefined;
852
+ endLine?: number | undefined;
853
+ }, {
854
+ id: string;
855
+ model: string;
856
+ store: "git" | "url" | "postgresql" | "treedx";
857
+ path?: string | undefined;
858
+ repository?: string | undefined;
859
+ commit?: string | undefined;
860
+ digest?: string | undefined;
861
+ anchor?: string | undefined;
862
+ url?: string | undefined;
863
+ revision?: number | undefined;
864
+ startLine?: number | undefined;
865
+ endLine?: number | undefined;
866
+ }>;
867
+ activity: z.ZodEnum<["planning", "estimating", "acting", "reviewing", "reporting", "chat"]>;
868
+ handlerOrigin: z.ZodEnum<["agent-package", "project-runtime"]>;
869
+ permissionCeiling: z.ZodObject<{
870
+ content: z.ZodObject<{
871
+ read: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
872
+ write: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
873
+ }, "strict", z.ZodTypeAny, {
874
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
875
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
876
+ }, {
877
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
878
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
879
+ }>;
880
+ tools: z.ZodEffects<z.ZodArray<z.ZodEnum<["discussion", "source.read", "source.write", "verification", "release"]>, "many">, ("release" | "verification" | "discussion" | "source.read" | "source.write")[], ("release" | "verification" | "discussion" | "source.read" | "source.write")[]>;
881
+ }, "strict", z.ZodTypeAny, {
882
+ content: {
883
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
884
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
885
+ };
886
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
887
+ }, {
888
+ content: {
889
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
890
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
891
+ };
892
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
893
+ }>;
894
+ }, "permissions">, "strict", z.ZodTypeAny, {
895
+ prompt: {
896
+ system: string;
897
+ instructions?: string[] | undefined;
898
+ };
899
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
900
+ handler: string;
901
+ profileRef: {
902
+ id: string;
903
+ model: string;
904
+ store: "git" | "url" | "postgresql" | "treedx";
905
+ path?: string | undefined;
906
+ repository?: string | undefined;
907
+ commit?: string | undefined;
908
+ digest?: string | undefined;
909
+ anchor?: string | undefined;
910
+ url?: string | undefined;
911
+ revision?: number | undefined;
912
+ startLine?: number | undefined;
913
+ endLine?: number | undefined;
914
+ };
915
+ handlerOrigin: "agent-package" | "project-runtime";
916
+ permissionCeiling: {
917
+ content: {
918
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
919
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
920
+ };
921
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
922
+ };
923
+ parameters?: Record<string, unknown> | undefined;
924
+ additionalContext?: string[] | undefined;
925
+ }, {
926
+ prompt: {
927
+ system: string;
928
+ instructions?: string[] | undefined;
929
+ };
930
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
931
+ handler: string;
932
+ profileRef: {
933
+ id: string;
934
+ model: string;
935
+ store: "git" | "url" | "postgresql" | "treedx";
936
+ path?: string | undefined;
937
+ repository?: string | undefined;
938
+ commit?: string | undefined;
939
+ digest?: string | undefined;
940
+ anchor?: string | undefined;
941
+ url?: string | undefined;
942
+ revision?: number | undefined;
943
+ startLine?: number | undefined;
944
+ endLine?: number | undefined;
945
+ };
946
+ handlerOrigin: "agent-package" | "project-runtime";
947
+ permissionCeiling: {
948
+ content: {
949
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
950
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
951
+ };
952
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
953
+ };
954
+ parameters?: Record<string, unknown> | undefined;
955
+ additionalContext?: string[] | undefined;
956
+ }>;
957
+ requiredCapabilities: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
958
+ grant: z.ZodObject<{
959
+ contentRead: z.ZodArray<z.ZodEffects<z.ZodObject<{
960
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
961
+ model: z.ZodString;
962
+ id: z.ZodString;
963
+ revision: z.ZodOptional<z.ZodNumber>;
964
+ digest: z.ZodOptional<z.ZodString>;
965
+ repository: z.ZodOptional<z.ZodString>;
966
+ commit: z.ZodOptional<z.ZodString>;
967
+ path: z.ZodOptional<z.ZodString>;
968
+ anchor: z.ZodOptional<z.ZodString>;
969
+ startLine: z.ZodOptional<z.ZodNumber>;
970
+ endLine: z.ZodOptional<z.ZodNumber>;
971
+ url: z.ZodOptional<z.ZodString>;
972
+ }, "strict", z.ZodTypeAny, {
973
+ id: string;
974
+ model: string;
975
+ store: "git" | "url" | "postgresql" | "treedx";
976
+ path?: string | undefined;
977
+ repository?: string | undefined;
978
+ commit?: string | undefined;
979
+ digest?: string | undefined;
980
+ anchor?: string | undefined;
981
+ url?: string | undefined;
982
+ revision?: number | undefined;
983
+ startLine?: number | undefined;
984
+ endLine?: number | undefined;
985
+ }, {
986
+ id: string;
987
+ model: string;
988
+ store: "git" | "url" | "postgresql" | "treedx";
989
+ path?: string | undefined;
990
+ repository?: string | undefined;
991
+ commit?: string | undefined;
992
+ digest?: string | undefined;
993
+ anchor?: string | undefined;
994
+ url?: string | undefined;
995
+ revision?: number | undefined;
996
+ startLine?: number | undefined;
997
+ endLine?: number | undefined;
998
+ }>, {
999
+ id: string;
1000
+ model: string;
1001
+ store: "git" | "url" | "postgresql" | "treedx";
1002
+ path?: string | undefined;
1003
+ repository?: string | undefined;
1004
+ commit?: string | undefined;
1005
+ digest?: string | undefined;
1006
+ anchor?: string | undefined;
1007
+ url?: string | undefined;
1008
+ revision?: number | undefined;
1009
+ startLine?: number | undefined;
1010
+ endLine?: number | undefined;
1011
+ }, {
1012
+ id: string;
1013
+ model: string;
1014
+ store: "git" | "url" | "postgresql" | "treedx";
1015
+ path?: string | undefined;
1016
+ repository?: string | undefined;
1017
+ commit?: string | undefined;
1018
+ digest?: string | undefined;
1019
+ anchor?: string | undefined;
1020
+ url?: string | undefined;
1021
+ revision?: number | undefined;
1022
+ startLine?: number | undefined;
1023
+ endLine?: number | undefined;
1024
+ }>, "many">;
1025
+ contentWrite: z.ZodArray<z.ZodEffects<z.ZodObject<{
1026
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
1027
+ model: z.ZodString;
1028
+ id: z.ZodString;
1029
+ revision: z.ZodOptional<z.ZodNumber>;
1030
+ digest: z.ZodOptional<z.ZodString>;
1031
+ repository: z.ZodOptional<z.ZodString>;
1032
+ commit: z.ZodOptional<z.ZodString>;
1033
+ path: z.ZodOptional<z.ZodString>;
1034
+ anchor: z.ZodOptional<z.ZodString>;
1035
+ startLine: z.ZodOptional<z.ZodNumber>;
1036
+ endLine: z.ZodOptional<z.ZodNumber>;
1037
+ url: z.ZodOptional<z.ZodString>;
1038
+ }, "strict", z.ZodTypeAny, {
1039
+ id: string;
1040
+ model: string;
1041
+ store: "git" | "url" | "postgresql" | "treedx";
1042
+ path?: string | undefined;
1043
+ repository?: string | undefined;
1044
+ commit?: string | undefined;
1045
+ digest?: string | undefined;
1046
+ anchor?: string | undefined;
1047
+ url?: string | undefined;
1048
+ revision?: number | undefined;
1049
+ startLine?: number | undefined;
1050
+ endLine?: number | undefined;
1051
+ }, {
1052
+ id: string;
1053
+ model: string;
1054
+ store: "git" | "url" | "postgresql" | "treedx";
1055
+ path?: string | undefined;
1056
+ repository?: string | undefined;
1057
+ commit?: string | undefined;
1058
+ digest?: string | undefined;
1059
+ anchor?: string | undefined;
1060
+ url?: string | undefined;
1061
+ revision?: number | undefined;
1062
+ startLine?: number | undefined;
1063
+ endLine?: number | undefined;
1064
+ }>, {
1065
+ id: string;
1066
+ model: string;
1067
+ store: "git" | "url" | "postgresql" | "treedx";
1068
+ path?: string | undefined;
1069
+ repository?: string | undefined;
1070
+ commit?: string | undefined;
1071
+ digest?: string | undefined;
1072
+ anchor?: string | undefined;
1073
+ url?: string | undefined;
1074
+ revision?: number | undefined;
1075
+ startLine?: number | undefined;
1076
+ endLine?: number | undefined;
1077
+ }, {
1078
+ id: string;
1079
+ model: string;
1080
+ store: "git" | "url" | "postgresql" | "treedx";
1081
+ path?: string | undefined;
1082
+ repository?: string | undefined;
1083
+ commit?: string | undefined;
1084
+ digest?: string | undefined;
1085
+ anchor?: string | undefined;
1086
+ url?: string | undefined;
1087
+ revision?: number | undefined;
1088
+ startLine?: number | undefined;
1089
+ endLine?: number | undefined;
1090
+ }>, "many">;
1091
+ sourceRead: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
1092
+ sourceWrite: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
1093
+ tools: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
1094
+ }, "strict", z.ZodTypeAny, {
1095
+ tools: string[];
1096
+ contentRead: {
1097
+ id: string;
1098
+ model: string;
1099
+ store: "git" | "url" | "postgresql" | "treedx";
1100
+ path?: string | undefined;
1101
+ repository?: string | undefined;
1102
+ commit?: string | undefined;
1103
+ digest?: string | undefined;
1104
+ anchor?: string | undefined;
1105
+ url?: string | undefined;
1106
+ revision?: number | undefined;
1107
+ startLine?: number | undefined;
1108
+ endLine?: number | undefined;
1109
+ }[];
1110
+ contentWrite: {
1111
+ id: string;
1112
+ model: string;
1113
+ store: "git" | "url" | "postgresql" | "treedx";
1114
+ path?: string | undefined;
1115
+ repository?: string | undefined;
1116
+ commit?: string | undefined;
1117
+ digest?: string | undefined;
1118
+ anchor?: string | undefined;
1119
+ url?: string | undefined;
1120
+ revision?: number | undefined;
1121
+ startLine?: number | undefined;
1122
+ endLine?: number | undefined;
1123
+ }[];
1124
+ sourceRead: string[];
1125
+ sourceWrite: string[];
1126
+ }, {
1127
+ tools: string[];
1128
+ contentRead: {
1129
+ id: string;
1130
+ model: string;
1131
+ store: "git" | "url" | "postgresql" | "treedx";
1132
+ path?: string | undefined;
1133
+ repository?: string | undefined;
1134
+ commit?: string | undefined;
1135
+ digest?: string | undefined;
1136
+ anchor?: string | undefined;
1137
+ url?: string | undefined;
1138
+ revision?: number | undefined;
1139
+ startLine?: number | undefined;
1140
+ endLine?: number | undefined;
1141
+ }[];
1142
+ contentWrite: {
1143
+ id: string;
1144
+ model: string;
1145
+ store: "git" | "url" | "postgresql" | "treedx";
1146
+ path?: string | undefined;
1147
+ repository?: string | undefined;
1148
+ commit?: string | undefined;
1149
+ digest?: string | undefined;
1150
+ anchor?: string | undefined;
1151
+ url?: string | undefined;
1152
+ revision?: number | undefined;
1153
+ startLine?: number | undefined;
1154
+ endLine?: number | undefined;
1155
+ }[];
1156
+ sourceRead: string[];
1157
+ sourceWrite: string[];
1158
+ }>;
1159
+ provider: z.ZodObject<{
1160
+ providerId: z.ZodString;
1161
+ offerId: z.ZodString;
1162
+ offerRevision: z.ZodNumber;
1163
+ runtimeBuild: z.ZodString;
1164
+ }, "strict", z.ZodTypeAny, {
1165
+ providerId: string;
1166
+ offerId: string;
1167
+ offerRevision: number;
1168
+ runtimeBuild: string;
1169
+ }, {
1170
+ providerId: string;
1171
+ offerId: string;
1172
+ offerRevision: number;
1173
+ runtimeBuild: string;
1174
+ }>;
1175
+ contextRefs: z.ZodArray<z.ZodEffects<z.ZodObject<{
1176
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
1177
+ model: z.ZodString;
1178
+ id: z.ZodString;
1179
+ revision: z.ZodOptional<z.ZodNumber>;
1180
+ digest: z.ZodOptional<z.ZodString>;
1181
+ repository: z.ZodOptional<z.ZodString>;
1182
+ commit: z.ZodOptional<z.ZodString>;
1183
+ path: z.ZodOptional<z.ZodString>;
1184
+ anchor: z.ZodOptional<z.ZodString>;
1185
+ startLine: z.ZodOptional<z.ZodNumber>;
1186
+ endLine: z.ZodOptional<z.ZodNumber>;
1187
+ url: z.ZodOptional<z.ZodString>;
1188
+ }, "strict", z.ZodTypeAny, {
1189
+ id: string;
1190
+ model: string;
1191
+ store: "git" | "url" | "postgresql" | "treedx";
1192
+ path?: string | undefined;
1193
+ repository?: string | undefined;
1194
+ commit?: string | undefined;
1195
+ digest?: string | undefined;
1196
+ anchor?: string | undefined;
1197
+ url?: string | undefined;
1198
+ revision?: number | undefined;
1199
+ startLine?: number | undefined;
1200
+ endLine?: number | undefined;
1201
+ }, {
1202
+ id: string;
1203
+ model: string;
1204
+ store: "git" | "url" | "postgresql" | "treedx";
1205
+ path?: string | undefined;
1206
+ repository?: string | undefined;
1207
+ commit?: string | undefined;
1208
+ digest?: string | undefined;
1209
+ anchor?: string | undefined;
1210
+ url?: string | undefined;
1211
+ revision?: number | undefined;
1212
+ startLine?: number | undefined;
1213
+ endLine?: number | undefined;
1214
+ }>, {
1215
+ id: string;
1216
+ model: string;
1217
+ store: "git" | "url" | "postgresql" | "treedx";
1218
+ path?: string | undefined;
1219
+ repository?: string | undefined;
1220
+ commit?: string | undefined;
1221
+ digest?: string | undefined;
1222
+ anchor?: string | undefined;
1223
+ url?: string | undefined;
1224
+ revision?: number | undefined;
1225
+ startLine?: number | undefined;
1226
+ endLine?: number | undefined;
1227
+ }, {
1228
+ id: string;
1229
+ model: string;
1230
+ store: "git" | "url" | "postgresql" | "treedx";
1231
+ path?: string | undefined;
1232
+ repository?: string | undefined;
1233
+ commit?: string | undefined;
1234
+ digest?: string | undefined;
1235
+ anchor?: string | undefined;
1236
+ url?: string | undefined;
1237
+ revision?: number | undefined;
1238
+ startLine?: number | undefined;
1239
+ endLine?: number | undefined;
1240
+ }>, "many">;
1241
+ predecessorResultIds: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
1242
+ acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1243
+ workspace: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1244
+ mode: z.ZodLiteral<"read-only">;
1245
+ }, "strict", z.ZodTypeAny, {
1246
+ mode: "read-only";
1247
+ }, {
1248
+ mode: "read-only";
1249
+ }>, z.ZodObject<{
1250
+ mode: z.ZodLiteral<"treedx">;
1251
+ workspaceId: z.ZodString;
1252
+ repository: z.ZodString;
1253
+ baseCommit: z.ZodString;
1254
+ writablePaths: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>, string[], string[]>;
1255
+ }, "strict", z.ZodTypeAny, {
1256
+ repository: string;
1257
+ mode: "treedx";
1258
+ workspaceId: string;
1259
+ baseCommit: string;
1260
+ writablePaths: string[];
1261
+ }, {
1262
+ repository: string;
1263
+ mode: "treedx";
1264
+ workspaceId: string;
1265
+ baseCommit: string;
1266
+ writablePaths: string[];
1267
+ }>, z.ZodObject<{
1268
+ mode: z.ZodLiteral<"git">;
1269
+ repository: z.ZodString;
1270
+ baseCommit: z.ZodString;
1271
+ branch: z.ZodString;
1272
+ writablePaths: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>, string[], string[]>;
1273
+ }, "strict", z.ZodTypeAny, {
1274
+ repository: string;
1275
+ branch: string;
1276
+ mode: "git";
1277
+ baseCommit: string;
1278
+ writablePaths: string[];
1279
+ }, {
1280
+ repository: string;
1281
+ branch: string;
1282
+ mode: "git";
1283
+ baseCommit: string;
1284
+ writablePaths: string[];
1285
+ }>]>;
1286
+ estimate: z.ZodEffects<z.ZodObject<{
1287
+ minimumSeconds: z.ZodNumber;
1288
+ expectedSeconds: z.ZodNumber;
1289
+ maximumSeconds: z.ZodNumber;
1290
+ rationale: z.ZodOptional<z.ZodString>;
1291
+ }, "strict", z.ZodTypeAny, {
1292
+ minimumSeconds: number;
1293
+ expectedSeconds: number;
1294
+ maximumSeconds: number;
1295
+ rationale?: string | undefined;
1296
+ }, {
1297
+ minimumSeconds: number;
1298
+ expectedSeconds: number;
1299
+ maximumSeconds: number;
1300
+ rationale?: string | undefined;
1301
+ }>, {
1302
+ minimumSeconds: number;
1303
+ expectedSeconds: number;
1304
+ maximumSeconds: number;
1305
+ rationale?: string | undefined;
1306
+ }, {
1307
+ minimumSeconds: number;
1308
+ expectedSeconds: number;
1309
+ maximumSeconds: number;
1310
+ rationale?: string | undefined;
1311
+ }>;
1312
+ limits: z.ZodObject<{
1313
+ maximumSeconds: z.ZodNumber;
1314
+ maximumContextBytes: z.ZodNumber;
1315
+ maximumContextTokens: z.ZodOptional<z.ZodNumber>;
1316
+ maximumContextItems: z.ZodNumber;
1317
+ }, "strict", z.ZodTypeAny, {
1318
+ maximumSeconds: number;
1319
+ maximumContextBytes: number;
1320
+ maximumContextItems: number;
1321
+ maximumContextTokens?: number | undefined;
1322
+ }, {
1323
+ maximumSeconds: number;
1324
+ maximumContextBytes: number;
1325
+ maximumContextItems: number;
1326
+ maximumContextTokens?: number | undefined;
1327
+ }>;
1328
+ deadline: z.ZodString;
1329
+ leaseId: z.ZodString;
1330
+ reservationId: z.ZodString;
1331
+ attempt: z.ZodNumber;
1332
+ status: z.ZodEnum<["created", "leased", "running", "completed", "blocked", "failed", "cancelled", "expired"]>;
1333
+ createdAt: z.ZodString;
1334
+ startedAt: z.ZodOptional<z.ZodString>;
1335
+ finishedAt: z.ZodOptional<z.ZodString>;
1336
+ }, "strict", z.ZodTypeAny, {
1337
+ status: "blocked" | "expired" | "failed" | "running" | "completed" | "cancelled" | "created" | "leased";
1338
+ provider: {
1339
+ providerId: string;
1340
+ offerId: string;
1341
+ offerRevision: number;
1342
+ runtimeBuild: string;
1343
+ };
1344
+ id: string;
1345
+ schemaVersion: "treeseed.assignment-attempt/v1";
1346
+ projectId: string;
1347
+ teamId: string;
1348
+ createdAt: string;
1349
+ idempotencyKey: string;
1350
+ requiredCapabilities: string[];
1351
+ nodeId: string;
1352
+ grant: {
1353
+ tools: string[];
1354
+ contentRead: {
1355
+ id: string;
1356
+ model: string;
1357
+ store: "git" | "url" | "postgresql" | "treedx";
1358
+ path?: string | undefined;
1359
+ repository?: string | undefined;
1360
+ commit?: string | undefined;
1361
+ digest?: string | undefined;
1362
+ anchor?: string | undefined;
1363
+ url?: string | undefined;
1364
+ revision?: number | undefined;
1365
+ startLine?: number | undefined;
1366
+ endLine?: number | undefined;
1367
+ }[];
1368
+ contentWrite: {
1369
+ id: string;
1370
+ model: string;
1371
+ store: "git" | "url" | "postgresql" | "treedx";
1372
+ path?: string | undefined;
1373
+ repository?: string | undefined;
1374
+ commit?: string | undefined;
1375
+ digest?: string | undefined;
1376
+ anchor?: string | undefined;
1377
+ url?: string | undefined;
1378
+ revision?: number | undefined;
1379
+ startLine?: number | undefined;
1380
+ endLine?: number | undefined;
1381
+ }[];
1382
+ sourceRead: string[];
1383
+ sourceWrite: string[];
1384
+ };
1385
+ workspace: {
1386
+ mode: "read-only";
1387
+ } | {
1388
+ repository: string;
1389
+ mode: "treedx";
1390
+ workspaceId: string;
1391
+ baseCommit: string;
1392
+ writablePaths: string[];
1393
+ } | {
1394
+ repository: string;
1395
+ branch: string;
1396
+ mode: "git";
1397
+ baseCommit: string;
1398
+ writablePaths: string[];
1399
+ };
1400
+ limits: {
1401
+ maximumSeconds: number;
1402
+ maximumContextBytes: number;
1403
+ maximumContextItems: number;
1404
+ maximumContextTokens?: number | undefined;
1405
+ };
1406
+ estimate: {
1407
+ minimumSeconds: number;
1408
+ expectedSeconds: number;
1409
+ maximumSeconds: number;
1410
+ rationale?: string | undefined;
1411
+ };
1412
+ workdayId: string;
1413
+ nodeRevision: number;
1414
+ graphRevision: number;
1415
+ sourceRef: {
1416
+ id: string;
1417
+ model: string;
1418
+ store: "git" | "url" | "postgresql" | "treedx";
1419
+ path?: string | undefined;
1420
+ repository?: string | undefined;
1421
+ commit?: string | undefined;
1422
+ digest?: string | undefined;
1423
+ anchor?: string | undefined;
1424
+ url?: string | undefined;
1425
+ revision?: number | undefined;
1426
+ startLine?: number | undefined;
1427
+ endLine?: number | undefined;
1428
+ };
1429
+ authorityRefs: {
1430
+ id: string;
1431
+ model: string;
1432
+ store: "git" | "url" | "postgresql" | "treedx";
1433
+ path?: string | undefined;
1434
+ repository?: string | undefined;
1435
+ commit?: string | undefined;
1436
+ digest?: string | undefined;
1437
+ anchor?: string | undefined;
1438
+ url?: string | undefined;
1439
+ revision?: number | undefined;
1440
+ startLine?: number | undefined;
1441
+ endLine?: number | undefined;
1442
+ }[];
1443
+ effectiveProfile: {
1444
+ prompt: {
1445
+ system: string;
1446
+ instructions?: string[] | undefined;
1447
+ };
1448
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
1449
+ handler: string;
1450
+ profileRef: {
1451
+ id: string;
1452
+ model: string;
1453
+ store: "git" | "url" | "postgresql" | "treedx";
1454
+ path?: string | undefined;
1455
+ repository?: string | undefined;
1456
+ commit?: string | undefined;
1457
+ digest?: string | undefined;
1458
+ anchor?: string | undefined;
1459
+ url?: string | undefined;
1460
+ revision?: number | undefined;
1461
+ startLine?: number | undefined;
1462
+ endLine?: number | undefined;
1463
+ };
1464
+ handlerOrigin: "agent-package" | "project-runtime";
1465
+ permissionCeiling: {
1466
+ content: {
1467
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
1468
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
1469
+ };
1470
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
1471
+ };
1472
+ parameters?: Record<string, unknown> | undefined;
1473
+ additionalContext?: string[] | undefined;
1474
+ };
1475
+ contextRefs: {
1476
+ id: string;
1477
+ model: string;
1478
+ store: "git" | "url" | "postgresql" | "treedx";
1479
+ path?: string | undefined;
1480
+ repository?: string | undefined;
1481
+ commit?: string | undefined;
1482
+ digest?: string | undefined;
1483
+ anchor?: string | undefined;
1484
+ url?: string | undefined;
1485
+ revision?: number | undefined;
1486
+ startLine?: number | undefined;
1487
+ endLine?: number | undefined;
1488
+ }[];
1489
+ predecessorResultIds: string[];
1490
+ deadline: string;
1491
+ leaseId: string;
1492
+ reservationId: string;
1493
+ attempt: number;
1494
+ startedAt?: string | undefined;
1495
+ finishedAt?: string | undefined;
1496
+ workItemId?: string | undefined;
1497
+ acceptanceCriteria?: string[] | undefined;
1498
+ }, {
1499
+ status: "blocked" | "expired" | "failed" | "running" | "completed" | "cancelled" | "created" | "leased";
1500
+ provider: {
1501
+ providerId: string;
1502
+ offerId: string;
1503
+ offerRevision: number;
1504
+ runtimeBuild: string;
1505
+ };
1506
+ id: string;
1507
+ schemaVersion: "treeseed.assignment-attempt/v1";
1508
+ projectId: string;
1509
+ teamId: string;
1510
+ createdAt: string;
1511
+ idempotencyKey: string;
1512
+ requiredCapabilities: string[];
1513
+ nodeId: string;
1514
+ grant: {
1515
+ tools: string[];
1516
+ contentRead: {
1517
+ id: string;
1518
+ model: string;
1519
+ store: "git" | "url" | "postgresql" | "treedx";
1520
+ path?: string | undefined;
1521
+ repository?: string | undefined;
1522
+ commit?: string | undefined;
1523
+ digest?: string | undefined;
1524
+ anchor?: string | undefined;
1525
+ url?: string | undefined;
1526
+ revision?: number | undefined;
1527
+ startLine?: number | undefined;
1528
+ endLine?: number | undefined;
1529
+ }[];
1530
+ contentWrite: {
1531
+ id: string;
1532
+ model: string;
1533
+ store: "git" | "url" | "postgresql" | "treedx";
1534
+ path?: string | undefined;
1535
+ repository?: string | undefined;
1536
+ commit?: string | undefined;
1537
+ digest?: string | undefined;
1538
+ anchor?: string | undefined;
1539
+ url?: string | undefined;
1540
+ revision?: number | undefined;
1541
+ startLine?: number | undefined;
1542
+ endLine?: number | undefined;
1543
+ }[];
1544
+ sourceRead: string[];
1545
+ sourceWrite: string[];
1546
+ };
1547
+ workspace: {
1548
+ mode: "read-only";
1549
+ } | {
1550
+ repository: string;
1551
+ mode: "treedx";
1552
+ workspaceId: string;
1553
+ baseCommit: string;
1554
+ writablePaths: string[];
1555
+ } | {
1556
+ repository: string;
1557
+ branch: string;
1558
+ mode: "git";
1559
+ baseCommit: string;
1560
+ writablePaths: string[];
1561
+ };
1562
+ limits: {
1563
+ maximumSeconds: number;
1564
+ maximumContextBytes: number;
1565
+ maximumContextItems: number;
1566
+ maximumContextTokens?: number | undefined;
1567
+ };
1568
+ estimate: {
1569
+ minimumSeconds: number;
1570
+ expectedSeconds: number;
1571
+ maximumSeconds: number;
1572
+ rationale?: string | undefined;
1573
+ };
1574
+ workdayId: string;
1575
+ nodeRevision: number;
1576
+ graphRevision: number;
1577
+ sourceRef: {
1578
+ id: string;
1579
+ model: string;
1580
+ store: "git" | "url" | "postgresql" | "treedx";
1581
+ path?: string | undefined;
1582
+ repository?: string | undefined;
1583
+ commit?: string | undefined;
1584
+ digest?: string | undefined;
1585
+ anchor?: string | undefined;
1586
+ url?: string | undefined;
1587
+ revision?: number | undefined;
1588
+ startLine?: number | undefined;
1589
+ endLine?: number | undefined;
1590
+ };
1591
+ authorityRefs: {
1592
+ id: string;
1593
+ model: string;
1594
+ store: "git" | "url" | "postgresql" | "treedx";
1595
+ path?: string | undefined;
1596
+ repository?: string | undefined;
1597
+ commit?: string | undefined;
1598
+ digest?: string | undefined;
1599
+ anchor?: string | undefined;
1600
+ url?: string | undefined;
1601
+ revision?: number | undefined;
1602
+ startLine?: number | undefined;
1603
+ endLine?: number | undefined;
1604
+ }[];
1605
+ effectiveProfile: {
1606
+ prompt: {
1607
+ system: string;
1608
+ instructions?: string[] | undefined;
1609
+ };
1610
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
1611
+ handler: string;
1612
+ profileRef: {
1613
+ id: string;
1614
+ model: string;
1615
+ store: "git" | "url" | "postgresql" | "treedx";
1616
+ path?: string | undefined;
1617
+ repository?: string | undefined;
1618
+ commit?: string | undefined;
1619
+ digest?: string | undefined;
1620
+ anchor?: string | undefined;
1621
+ url?: string | undefined;
1622
+ revision?: number | undefined;
1623
+ startLine?: number | undefined;
1624
+ endLine?: number | undefined;
1625
+ };
1626
+ handlerOrigin: "agent-package" | "project-runtime";
1627
+ permissionCeiling: {
1628
+ content: {
1629
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
1630
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
1631
+ };
1632
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
1633
+ };
1634
+ parameters?: Record<string, unknown> | undefined;
1635
+ additionalContext?: string[] | undefined;
1636
+ };
1637
+ contextRefs: {
1638
+ id: string;
1639
+ model: string;
1640
+ store: "git" | "url" | "postgresql" | "treedx";
1641
+ path?: string | undefined;
1642
+ repository?: string | undefined;
1643
+ commit?: string | undefined;
1644
+ digest?: string | undefined;
1645
+ anchor?: string | undefined;
1646
+ url?: string | undefined;
1647
+ revision?: number | undefined;
1648
+ startLine?: number | undefined;
1649
+ endLine?: number | undefined;
1650
+ }[];
1651
+ predecessorResultIds: string[];
1652
+ deadline: string;
1653
+ leaseId: string;
1654
+ reservationId: string;
1655
+ attempt: number;
1656
+ startedAt?: string | undefined;
1657
+ finishedAt?: string | undefined;
1658
+ workItemId?: string | undefined;
1659
+ acceptanceCriteria?: string[] | undefined;
1660
+ }>;
1661
+ export declare const verificationRecordSchema: z.ZodObject<{
1662
+ command: z.ZodString;
1663
+ status: z.ZodEnum<["passed", "failed", "skipped"]>;
1664
+ exitCode: z.ZodNumber;
1665
+ outputDigest: z.ZodString;
1666
+ durationSeconds: z.ZodOptional<z.ZodNumber>;
1667
+ }, "strict", z.ZodTypeAny, {
1668
+ status: "passed" | "failed" | "skipped";
1669
+ command: string;
1670
+ exitCode: number;
1671
+ outputDigest: string;
1672
+ durationSeconds?: number | undefined;
1673
+ }, {
1674
+ status: "passed" | "failed" | "skipped";
1675
+ command: string;
1676
+ exitCode: number;
1677
+ outputDigest: string;
1678
+ durationSeconds?: number | undefined;
1679
+ }>;
1680
+ export declare const usageSchema: z.ZodObject<{
1681
+ elapsedSeconds: z.ZodNumber;
1682
+ modelInputTokens: z.ZodOptional<z.ZodNumber>;
1683
+ modelOutputTokens: z.ZodOptional<z.ZodNumber>;
1684
+ native: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1685
+ }, "strict", z.ZodTypeAny, {
1686
+ elapsedSeconds: number;
1687
+ native?: Record<string, number> | undefined;
1688
+ modelInputTokens?: number | undefined;
1689
+ modelOutputTokens?: number | undefined;
1690
+ }, {
1691
+ elapsedSeconds: number;
1692
+ native?: Record<string, number> | undefined;
1693
+ modelInputTokens?: number | undefined;
1694
+ modelOutputTokens?: number | undefined;
1695
+ }>;
1696
+ export declare const diagnosticSchema: z.ZodObject<{
1697
+ code: z.ZodString;
1698
+ severity: z.ZodEnum<["info", "warning", "error"]>;
1699
+ message: z.ZodString;
1700
+ ref: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1701
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
1702
+ model: z.ZodString;
1703
+ id: z.ZodString;
1704
+ revision: z.ZodOptional<z.ZodNumber>;
1705
+ digest: z.ZodOptional<z.ZodString>;
1706
+ repository: z.ZodOptional<z.ZodString>;
1707
+ commit: z.ZodOptional<z.ZodString>;
1708
+ path: z.ZodOptional<z.ZodString>;
1709
+ anchor: z.ZodOptional<z.ZodString>;
1710
+ startLine: z.ZodOptional<z.ZodNumber>;
1711
+ endLine: z.ZodOptional<z.ZodNumber>;
1712
+ url: z.ZodOptional<z.ZodString>;
1713
+ }, "strict", z.ZodTypeAny, {
1714
+ id: string;
1715
+ model: string;
1716
+ store: "git" | "url" | "postgresql" | "treedx";
1717
+ path?: string | undefined;
1718
+ repository?: string | undefined;
1719
+ commit?: string | undefined;
1720
+ digest?: string | undefined;
1721
+ anchor?: string | undefined;
1722
+ url?: string | undefined;
1723
+ revision?: number | undefined;
1724
+ startLine?: number | undefined;
1725
+ endLine?: number | undefined;
1726
+ }, {
1727
+ id: string;
1728
+ model: string;
1729
+ store: "git" | "url" | "postgresql" | "treedx";
1730
+ path?: string | undefined;
1731
+ repository?: string | undefined;
1732
+ commit?: string | undefined;
1733
+ digest?: string | undefined;
1734
+ anchor?: string | undefined;
1735
+ url?: string | undefined;
1736
+ revision?: number | undefined;
1737
+ startLine?: number | undefined;
1738
+ endLine?: number | undefined;
1739
+ }>, {
1740
+ id: string;
1741
+ model: string;
1742
+ store: "git" | "url" | "postgresql" | "treedx";
1743
+ path?: string | undefined;
1744
+ repository?: string | undefined;
1745
+ commit?: string | undefined;
1746
+ digest?: string | undefined;
1747
+ anchor?: string | undefined;
1748
+ url?: string | undefined;
1749
+ revision?: number | undefined;
1750
+ startLine?: number | undefined;
1751
+ endLine?: number | undefined;
1752
+ }, {
1753
+ id: string;
1754
+ model: string;
1755
+ store: "git" | "url" | "postgresql" | "treedx";
1756
+ path?: string | undefined;
1757
+ repository?: string | undefined;
1758
+ commit?: string | undefined;
1759
+ digest?: string | undefined;
1760
+ anchor?: string | undefined;
1761
+ url?: string | undefined;
1762
+ revision?: number | undefined;
1763
+ startLine?: number | undefined;
1764
+ endLine?: number | undefined;
1765
+ }>>;
1766
+ }, "strict", z.ZodTypeAny, {
1767
+ code: string;
1768
+ message: string;
1769
+ severity: "error" | "warning" | "info";
1770
+ ref?: {
1771
+ id: string;
1772
+ model: string;
1773
+ store: "git" | "url" | "postgresql" | "treedx";
1774
+ path?: string | undefined;
1775
+ repository?: string | undefined;
1776
+ commit?: string | undefined;
1777
+ digest?: string | undefined;
1778
+ anchor?: string | undefined;
1779
+ url?: string | undefined;
1780
+ revision?: number | undefined;
1781
+ startLine?: number | undefined;
1782
+ endLine?: number | undefined;
1783
+ } | undefined;
1784
+ }, {
1785
+ code: string;
1786
+ message: string;
1787
+ severity: "error" | "warning" | "info";
1788
+ ref?: {
1789
+ id: string;
1790
+ model: string;
1791
+ store: "git" | "url" | "postgresql" | "treedx";
1792
+ path?: string | undefined;
1793
+ repository?: string | undefined;
1794
+ commit?: string | undefined;
1795
+ digest?: string | undefined;
1796
+ anchor?: string | undefined;
1797
+ url?: string | undefined;
1798
+ revision?: number | undefined;
1799
+ startLine?: number | undefined;
1800
+ endLine?: number | undefined;
1801
+ } | undefined;
1802
+ }>;
1803
+ export declare const assignmentResultSchema: z.ZodObject<{
1804
+ schemaVersion: z.ZodLiteral<"treeseed.assignment-result/v1">;
1805
+ id: z.ZodString;
1806
+ assignmentId: z.ZodString;
1807
+ status: z.ZodEnum<["completed", "blocked", "failed"]>;
1808
+ summary: z.ZodString;
1809
+ references: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1810
+ kind: z.ZodLiteral<"git">;
1811
+ repository: z.ZodString;
1812
+ commit: z.ZodString;
1813
+ branch: z.ZodOptional<z.ZodString>;
1814
+ path: z.ZodOptional<z.ZodString>;
1815
+ }, "strict", z.ZodTypeAny, {
1816
+ kind: "git";
1817
+ repository: string;
1818
+ commit: string;
1819
+ path?: string | undefined;
1820
+ branch?: string | undefined;
1821
+ }, {
1822
+ kind: "git";
1823
+ repository: string;
1824
+ commit: string;
1825
+ path?: string | undefined;
1826
+ branch?: string | undefined;
1827
+ }>, z.ZodObject<{
1828
+ kind: z.ZodLiteral<"treedx">;
1829
+ projectId: z.ZodString;
1830
+ repository: z.ZodString;
1831
+ commit: z.ZodString;
1832
+ path: z.ZodString;
1833
+ workspaceId: z.ZodOptional<z.ZodString>;
1834
+ }, "strict", z.ZodTypeAny, {
1835
+ path: string;
1836
+ kind: "treedx";
1837
+ repository: string;
1838
+ commit: string;
1839
+ projectId: string;
1840
+ workspaceId?: string | undefined;
1841
+ }, {
1842
+ path: string;
1843
+ kind: "treedx";
1844
+ repository: string;
1845
+ commit: string;
1846
+ projectId: string;
1847
+ workspaceId?: string | undefined;
1848
+ }>, z.ZodObject<{
1849
+ kind: z.ZodLiteral<"url">;
1850
+ url: z.ZodString;
1851
+ digest: z.ZodOptional<z.ZodString>;
1852
+ }, "strict", z.ZodTypeAny, {
1853
+ kind: "url";
1854
+ url: string;
1855
+ digest?: string | undefined;
1856
+ }, {
1857
+ kind: "url";
1858
+ url: string;
1859
+ digest?: string | undefined;
1860
+ }>]>, "many">;
1861
+ verification: z.ZodArray<z.ZodObject<{
1862
+ command: z.ZodString;
1863
+ status: z.ZodEnum<["passed", "failed", "skipped"]>;
1864
+ exitCode: z.ZodNumber;
1865
+ outputDigest: z.ZodString;
1866
+ durationSeconds: z.ZodOptional<z.ZodNumber>;
1867
+ }, "strict", z.ZodTypeAny, {
1868
+ status: "passed" | "failed" | "skipped";
1869
+ command: string;
1870
+ exitCode: number;
1871
+ outputDigest: string;
1872
+ durationSeconds?: number | undefined;
1873
+ }, {
1874
+ status: "passed" | "failed" | "skipped";
1875
+ command: string;
1876
+ exitCode: number;
1877
+ outputDigest: string;
1878
+ durationSeconds?: number | undefined;
1879
+ }>, "many">;
1880
+ usage: z.ZodObject<{
1881
+ elapsedSeconds: z.ZodNumber;
1882
+ modelInputTokens: z.ZodOptional<z.ZodNumber>;
1883
+ modelOutputTokens: z.ZodOptional<z.ZodNumber>;
1884
+ native: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1885
+ }, "strict", z.ZodTypeAny, {
1886
+ elapsedSeconds: number;
1887
+ native?: Record<string, number> | undefined;
1888
+ modelInputTokens?: number | undefined;
1889
+ modelOutputTokens?: number | undefined;
1890
+ }, {
1891
+ elapsedSeconds: number;
1892
+ native?: Record<string, number> | undefined;
1893
+ modelInputTokens?: number | undefined;
1894
+ modelOutputTokens?: number | undefined;
1895
+ }>;
1896
+ diagnostics: z.ZodArray<z.ZodObject<{
1897
+ code: z.ZodString;
1898
+ severity: z.ZodEnum<["info", "warning", "error"]>;
1899
+ message: z.ZodString;
1900
+ ref: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1901
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
1902
+ model: z.ZodString;
1903
+ id: z.ZodString;
1904
+ revision: z.ZodOptional<z.ZodNumber>;
1905
+ digest: z.ZodOptional<z.ZodString>;
1906
+ repository: z.ZodOptional<z.ZodString>;
1907
+ commit: z.ZodOptional<z.ZodString>;
1908
+ path: z.ZodOptional<z.ZodString>;
1909
+ anchor: z.ZodOptional<z.ZodString>;
1910
+ startLine: z.ZodOptional<z.ZodNumber>;
1911
+ endLine: z.ZodOptional<z.ZodNumber>;
1912
+ url: z.ZodOptional<z.ZodString>;
1913
+ }, "strict", z.ZodTypeAny, {
1914
+ id: string;
1915
+ model: string;
1916
+ store: "git" | "url" | "postgresql" | "treedx";
1917
+ path?: string | undefined;
1918
+ repository?: string | undefined;
1919
+ commit?: string | undefined;
1920
+ digest?: string | undefined;
1921
+ anchor?: string | undefined;
1922
+ url?: string | undefined;
1923
+ revision?: number | undefined;
1924
+ startLine?: number | undefined;
1925
+ endLine?: number | undefined;
1926
+ }, {
1927
+ id: string;
1928
+ model: string;
1929
+ store: "git" | "url" | "postgresql" | "treedx";
1930
+ path?: string | undefined;
1931
+ repository?: string | undefined;
1932
+ commit?: string | undefined;
1933
+ digest?: string | undefined;
1934
+ anchor?: string | undefined;
1935
+ url?: string | undefined;
1936
+ revision?: number | undefined;
1937
+ startLine?: number | undefined;
1938
+ endLine?: number | undefined;
1939
+ }>, {
1940
+ id: string;
1941
+ model: string;
1942
+ store: "git" | "url" | "postgresql" | "treedx";
1943
+ path?: string | undefined;
1944
+ repository?: string | undefined;
1945
+ commit?: string | undefined;
1946
+ digest?: string | undefined;
1947
+ anchor?: string | undefined;
1948
+ url?: string | undefined;
1949
+ revision?: number | undefined;
1950
+ startLine?: number | undefined;
1951
+ endLine?: number | undefined;
1952
+ }, {
1953
+ id: string;
1954
+ model: string;
1955
+ store: "git" | "url" | "postgresql" | "treedx";
1956
+ path?: string | undefined;
1957
+ repository?: string | undefined;
1958
+ commit?: string | undefined;
1959
+ digest?: string | undefined;
1960
+ anchor?: string | undefined;
1961
+ url?: string | undefined;
1962
+ revision?: number | undefined;
1963
+ startLine?: number | undefined;
1964
+ endLine?: number | undefined;
1965
+ }>>;
1966
+ }, "strict", z.ZodTypeAny, {
1967
+ code: string;
1968
+ message: string;
1969
+ severity: "error" | "warning" | "info";
1970
+ ref?: {
1971
+ id: string;
1972
+ model: string;
1973
+ store: "git" | "url" | "postgresql" | "treedx";
1974
+ path?: string | undefined;
1975
+ repository?: string | undefined;
1976
+ commit?: string | undefined;
1977
+ digest?: string | undefined;
1978
+ anchor?: string | undefined;
1979
+ url?: string | undefined;
1980
+ revision?: number | undefined;
1981
+ startLine?: number | undefined;
1982
+ endLine?: number | undefined;
1983
+ } | undefined;
1984
+ }, {
1985
+ code: string;
1986
+ message: string;
1987
+ severity: "error" | "warning" | "info";
1988
+ ref?: {
1989
+ id: string;
1990
+ model: string;
1991
+ store: "git" | "url" | "postgresql" | "treedx";
1992
+ path?: string | undefined;
1993
+ repository?: string | undefined;
1994
+ commit?: string | undefined;
1995
+ digest?: string | undefined;
1996
+ anchor?: string | undefined;
1997
+ url?: string | undefined;
1998
+ revision?: number | undefined;
1999
+ startLine?: number | undefined;
2000
+ endLine?: number | undefined;
2001
+ } | undefined;
2002
+ }>, "many">;
2003
+ completedAt: z.ZodString;
2004
+ }, "strict", z.ZodTypeAny, {
2005
+ status: "blocked" | "failed" | "completed";
2006
+ id: string;
2007
+ schemaVersion: "treeseed.assignment-result/v1";
2008
+ assignmentId: string;
2009
+ completedAt: string;
2010
+ verification: {
2011
+ status: "passed" | "failed" | "skipped";
2012
+ command: string;
2013
+ exitCode: number;
2014
+ outputDigest: string;
2015
+ durationSeconds?: number | undefined;
2016
+ }[];
2017
+ summary: string;
2018
+ usage: {
2019
+ elapsedSeconds: number;
2020
+ native?: Record<string, number> | undefined;
2021
+ modelInputTokens?: number | undefined;
2022
+ modelOutputTokens?: number | undefined;
2023
+ };
2024
+ diagnostics: {
2025
+ code: string;
2026
+ message: string;
2027
+ severity: "error" | "warning" | "info";
2028
+ ref?: {
2029
+ id: string;
2030
+ model: string;
2031
+ store: "git" | "url" | "postgresql" | "treedx";
2032
+ path?: string | undefined;
2033
+ repository?: string | undefined;
2034
+ commit?: string | undefined;
2035
+ digest?: string | undefined;
2036
+ anchor?: string | undefined;
2037
+ url?: string | undefined;
2038
+ revision?: number | undefined;
2039
+ startLine?: number | undefined;
2040
+ endLine?: number | undefined;
2041
+ } | undefined;
2042
+ }[];
2043
+ references: ({
2044
+ kind: "git";
2045
+ repository: string;
2046
+ commit: string;
2047
+ path?: string | undefined;
2048
+ branch?: string | undefined;
2049
+ } | {
2050
+ path: string;
2051
+ kind: "treedx";
2052
+ repository: string;
2053
+ commit: string;
2054
+ projectId: string;
2055
+ workspaceId?: string | undefined;
2056
+ } | {
2057
+ kind: "url";
2058
+ url: string;
2059
+ digest?: string | undefined;
2060
+ })[];
2061
+ }, {
2062
+ status: "blocked" | "failed" | "completed";
2063
+ id: string;
2064
+ schemaVersion: "treeseed.assignment-result/v1";
2065
+ assignmentId: string;
2066
+ completedAt: string;
2067
+ verification: {
2068
+ status: "passed" | "failed" | "skipped";
2069
+ command: string;
2070
+ exitCode: number;
2071
+ outputDigest: string;
2072
+ durationSeconds?: number | undefined;
2073
+ }[];
2074
+ summary: string;
2075
+ usage: {
2076
+ elapsedSeconds: number;
2077
+ native?: Record<string, number> | undefined;
2078
+ modelInputTokens?: number | undefined;
2079
+ modelOutputTokens?: number | undefined;
2080
+ };
2081
+ diagnostics: {
2082
+ code: string;
2083
+ message: string;
2084
+ severity: "error" | "warning" | "info";
2085
+ ref?: {
2086
+ id: string;
2087
+ model: string;
2088
+ store: "git" | "url" | "postgresql" | "treedx";
2089
+ path?: string | undefined;
2090
+ repository?: string | undefined;
2091
+ commit?: string | undefined;
2092
+ digest?: string | undefined;
2093
+ anchor?: string | undefined;
2094
+ url?: string | undefined;
2095
+ revision?: number | undefined;
2096
+ startLine?: number | undefined;
2097
+ endLine?: number | undefined;
2098
+ } | undefined;
2099
+ }[];
2100
+ references: ({
2101
+ kind: "git";
2102
+ repository: string;
2103
+ commit: string;
2104
+ path?: string | undefined;
2105
+ branch?: string | undefined;
2106
+ } | {
2107
+ path: string;
2108
+ kind: "treedx";
2109
+ repository: string;
2110
+ commit: string;
2111
+ projectId: string;
2112
+ workspaceId?: string | undefined;
2113
+ } | {
2114
+ kind: "url";
2115
+ url: string;
2116
+ digest?: string | undefined;
2117
+ })[];
2118
+ }>;
2119
+ export declare const authorizedContextItemSchema: z.ZodObject<{
2120
+ ref: z.ZodEffects<z.ZodObject<{
2121
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
2122
+ model: z.ZodString;
2123
+ id: z.ZodString;
2124
+ revision: z.ZodOptional<z.ZodNumber>;
2125
+ digest: z.ZodOptional<z.ZodString>;
2126
+ repository: z.ZodOptional<z.ZodString>;
2127
+ commit: z.ZodOptional<z.ZodString>;
2128
+ path: z.ZodOptional<z.ZodString>;
2129
+ anchor: z.ZodOptional<z.ZodString>;
2130
+ startLine: z.ZodOptional<z.ZodNumber>;
2131
+ endLine: z.ZodOptional<z.ZodNumber>;
2132
+ url: z.ZodOptional<z.ZodString>;
2133
+ }, "strict", z.ZodTypeAny, {
2134
+ id: string;
2135
+ model: string;
2136
+ store: "git" | "url" | "postgresql" | "treedx";
2137
+ path?: string | undefined;
2138
+ repository?: string | undefined;
2139
+ commit?: string | undefined;
2140
+ digest?: string | undefined;
2141
+ anchor?: string | undefined;
2142
+ url?: string | undefined;
2143
+ revision?: number | undefined;
2144
+ startLine?: number | undefined;
2145
+ endLine?: number | undefined;
2146
+ }, {
2147
+ id: string;
2148
+ model: string;
2149
+ store: "git" | "url" | "postgresql" | "treedx";
2150
+ path?: string | undefined;
2151
+ repository?: string | undefined;
2152
+ commit?: string | undefined;
2153
+ digest?: string | undefined;
2154
+ anchor?: string | undefined;
2155
+ url?: string | undefined;
2156
+ revision?: number | undefined;
2157
+ startLine?: number | undefined;
2158
+ endLine?: number | undefined;
2159
+ }>, {
2160
+ id: string;
2161
+ model: string;
2162
+ store: "git" | "url" | "postgresql" | "treedx";
2163
+ path?: string | undefined;
2164
+ repository?: string | undefined;
2165
+ commit?: string | undefined;
2166
+ digest?: string | undefined;
2167
+ anchor?: string | undefined;
2168
+ url?: string | undefined;
2169
+ revision?: number | undefined;
2170
+ startLine?: number | undefined;
2171
+ endLine?: number | undefined;
2172
+ }, {
2173
+ id: string;
2174
+ model: string;
2175
+ store: "git" | "url" | "postgresql" | "treedx";
2176
+ path?: string | undefined;
2177
+ repository?: string | undefined;
2178
+ commit?: string | undefined;
2179
+ digest?: string | undefined;
2180
+ anchor?: string | undefined;
2181
+ url?: string | undefined;
2182
+ revision?: number | undefined;
2183
+ startLine?: number | undefined;
2184
+ endLine?: number | undefined;
2185
+ }>;
2186
+ mediaType: z.ZodString;
2187
+ digest: z.ZodString;
2188
+ value: z.ZodAny;
2189
+ }, "strict", z.ZodTypeAny, {
2190
+ digest: string;
2191
+ mediaType: string;
2192
+ ref: {
2193
+ id: string;
2194
+ model: string;
2195
+ store: "git" | "url" | "postgresql" | "treedx";
2196
+ path?: string | undefined;
2197
+ repository?: string | undefined;
2198
+ commit?: string | undefined;
2199
+ digest?: string | undefined;
2200
+ anchor?: string | undefined;
2201
+ url?: string | undefined;
2202
+ revision?: number | undefined;
2203
+ startLine?: number | undefined;
2204
+ endLine?: number | undefined;
2205
+ };
2206
+ value?: any;
2207
+ }, {
2208
+ digest: string;
2209
+ mediaType: string;
2210
+ ref: {
2211
+ id: string;
2212
+ model: string;
2213
+ store: "git" | "url" | "postgresql" | "treedx";
2214
+ path?: string | undefined;
2215
+ repository?: string | undefined;
2216
+ commit?: string | undefined;
2217
+ digest?: string | undefined;
2218
+ anchor?: string | undefined;
2219
+ url?: string | undefined;
2220
+ revision?: number | undefined;
2221
+ startLine?: number | undefined;
2222
+ endLine?: number | undefined;
2223
+ };
2224
+ value?: any;
2225
+ }>;
2226
+ export declare const assignmentContextSchema: z.ZodObject<{
2227
+ assignment: z.ZodObject<{
2228
+ schemaVersion: z.ZodLiteral<"treeseed.assignment-attempt/v1">;
2229
+ id: z.ZodString;
2230
+ idempotencyKey: z.ZodString;
2231
+ teamId: z.ZodString;
2232
+ projectId: z.ZodString;
2233
+ workdayId: z.ZodString;
2234
+ nodeId: z.ZodString;
2235
+ workItemId: z.ZodOptional<z.ZodString>;
2236
+ nodeRevision: z.ZodNumber;
2237
+ graphRevision: z.ZodNumber;
2238
+ sourceRef: z.ZodEffects<z.ZodObject<{
2239
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
2240
+ model: z.ZodString;
2241
+ id: z.ZodString;
2242
+ revision: z.ZodOptional<z.ZodNumber>;
2243
+ digest: z.ZodOptional<z.ZodString>;
2244
+ repository: z.ZodOptional<z.ZodString>;
2245
+ commit: z.ZodOptional<z.ZodString>;
2246
+ path: z.ZodOptional<z.ZodString>;
2247
+ anchor: z.ZodOptional<z.ZodString>;
2248
+ startLine: z.ZodOptional<z.ZodNumber>;
2249
+ endLine: z.ZodOptional<z.ZodNumber>;
2250
+ url: z.ZodOptional<z.ZodString>;
2251
+ }, "strict", z.ZodTypeAny, {
2252
+ id: string;
2253
+ model: string;
2254
+ store: "git" | "url" | "postgresql" | "treedx";
2255
+ path?: string | undefined;
2256
+ repository?: string | undefined;
2257
+ commit?: string | undefined;
2258
+ digest?: string | undefined;
2259
+ anchor?: string | undefined;
2260
+ url?: string | undefined;
2261
+ revision?: number | undefined;
2262
+ startLine?: number | undefined;
2263
+ endLine?: number | undefined;
2264
+ }, {
2265
+ id: string;
2266
+ model: string;
2267
+ store: "git" | "url" | "postgresql" | "treedx";
2268
+ path?: string | undefined;
2269
+ repository?: string | undefined;
2270
+ commit?: string | undefined;
2271
+ digest?: string | undefined;
2272
+ anchor?: string | undefined;
2273
+ url?: string | undefined;
2274
+ revision?: number | undefined;
2275
+ startLine?: number | undefined;
2276
+ endLine?: number | undefined;
2277
+ }>, {
2278
+ id: string;
2279
+ model: string;
2280
+ store: "git" | "url" | "postgresql" | "treedx";
2281
+ path?: string | undefined;
2282
+ repository?: string | undefined;
2283
+ commit?: string | undefined;
2284
+ digest?: string | undefined;
2285
+ anchor?: string | undefined;
2286
+ url?: string | undefined;
2287
+ revision?: number | undefined;
2288
+ startLine?: number | undefined;
2289
+ endLine?: number | undefined;
2290
+ }, {
2291
+ id: string;
2292
+ model: string;
2293
+ store: "git" | "url" | "postgresql" | "treedx";
2294
+ path?: string | undefined;
2295
+ repository?: string | undefined;
2296
+ commit?: string | undefined;
2297
+ digest?: string | undefined;
2298
+ anchor?: string | undefined;
2299
+ url?: string | undefined;
2300
+ revision?: number | undefined;
2301
+ startLine?: number | undefined;
2302
+ endLine?: number | undefined;
2303
+ }>;
2304
+ authorityRefs: z.ZodArray<z.ZodEffects<z.ZodObject<{
2305
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
2306
+ model: z.ZodString;
2307
+ id: z.ZodString;
2308
+ revision: z.ZodOptional<z.ZodNumber>;
2309
+ digest: z.ZodOptional<z.ZodString>;
2310
+ repository: z.ZodOptional<z.ZodString>;
2311
+ commit: z.ZodOptional<z.ZodString>;
2312
+ path: z.ZodOptional<z.ZodString>;
2313
+ anchor: z.ZodOptional<z.ZodString>;
2314
+ startLine: z.ZodOptional<z.ZodNumber>;
2315
+ endLine: z.ZodOptional<z.ZodNumber>;
2316
+ url: z.ZodOptional<z.ZodString>;
2317
+ }, "strict", z.ZodTypeAny, {
2318
+ id: string;
2319
+ model: string;
2320
+ store: "git" | "url" | "postgresql" | "treedx";
2321
+ path?: string | undefined;
2322
+ repository?: string | undefined;
2323
+ commit?: string | undefined;
2324
+ digest?: string | undefined;
2325
+ anchor?: string | undefined;
2326
+ url?: string | undefined;
2327
+ revision?: number | undefined;
2328
+ startLine?: number | undefined;
2329
+ endLine?: number | undefined;
2330
+ }, {
2331
+ id: string;
2332
+ model: string;
2333
+ store: "git" | "url" | "postgresql" | "treedx";
2334
+ path?: string | undefined;
2335
+ repository?: string | undefined;
2336
+ commit?: string | undefined;
2337
+ digest?: string | undefined;
2338
+ anchor?: string | undefined;
2339
+ url?: string | undefined;
2340
+ revision?: number | undefined;
2341
+ startLine?: number | undefined;
2342
+ endLine?: number | undefined;
2343
+ }>, {
2344
+ id: string;
2345
+ model: string;
2346
+ store: "git" | "url" | "postgresql" | "treedx";
2347
+ path?: string | undefined;
2348
+ repository?: string | undefined;
2349
+ commit?: string | undefined;
2350
+ digest?: string | undefined;
2351
+ anchor?: string | undefined;
2352
+ url?: string | undefined;
2353
+ revision?: number | undefined;
2354
+ startLine?: number | undefined;
2355
+ endLine?: number | undefined;
2356
+ }, {
2357
+ id: string;
2358
+ model: string;
2359
+ store: "git" | "url" | "postgresql" | "treedx";
2360
+ path?: string | undefined;
2361
+ repository?: string | undefined;
2362
+ commit?: string | undefined;
2363
+ digest?: string | undefined;
2364
+ anchor?: string | undefined;
2365
+ url?: string | undefined;
2366
+ revision?: number | undefined;
2367
+ startLine?: number | undefined;
2368
+ endLine?: number | undefined;
2369
+ }>, "many">;
2370
+ effectiveProfile: z.ZodObject<Omit<Omit<{
2371
+ handler: z.ZodString;
2372
+ dependsOn: z.ZodOptional<z.ZodEffects<z.ZodObject<{
2373
+ agents: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
2374
+ events: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodLiteral<"workday-closing">, "many">, "workday-closing"[], "workday-closing"[]>>;
2375
+ }, "strict", z.ZodTypeAny, {
2376
+ agents?: string[] | undefined;
2377
+ events?: "workday-closing"[] | undefined;
2378
+ }, {
2379
+ agents?: string[] | undefined;
2380
+ events?: "workday-closing"[] | undefined;
2381
+ }>, {
2382
+ agents?: string[] | undefined;
2383
+ events?: "workday-closing"[] | undefined;
2384
+ }, {
2385
+ agents?: string[] | undefined;
2386
+ events?: "workday-closing"[] | undefined;
2387
+ }>>;
2388
+ permissions: z.ZodObject<{
2389
+ content: z.ZodObject<{
2390
+ read: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
2391
+ write: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
2392
+ }, "strict", z.ZodTypeAny, {
2393
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2394
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2395
+ }, {
2396
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2397
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2398
+ }>;
2399
+ tools: z.ZodEffects<z.ZodArray<z.ZodEnum<["discussion", "source.read", "source.write", "verification", "release"]>, "many">, ("release" | "verification" | "discussion" | "source.read" | "source.write")[], ("release" | "verification" | "discussion" | "source.read" | "source.write")[]>;
2400
+ }, "strict", z.ZodTypeAny, {
2401
+ content: {
2402
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2403
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2404
+ };
2405
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
2406
+ }, {
2407
+ content: {
2408
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2409
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2410
+ };
2411
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
2412
+ }>;
2413
+ prompt: z.ZodObject<{
2414
+ system: z.ZodString;
2415
+ instructions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2416
+ }, "strict", z.ZodTypeAny, {
2417
+ system: string;
2418
+ instructions?: string[] | undefined;
2419
+ }, {
2420
+ system: string;
2421
+ instructions?: string[] | undefined;
2422
+ }>;
2423
+ additionalContext: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
2424
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2425
+ }, "dependsOn"> & {
2426
+ profileRef: z.ZodEffects<z.ZodObject<{
2427
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
2428
+ model: z.ZodString;
2429
+ id: z.ZodString;
2430
+ revision: z.ZodOptional<z.ZodNumber>;
2431
+ digest: z.ZodOptional<z.ZodString>;
2432
+ repository: z.ZodOptional<z.ZodString>;
2433
+ commit: z.ZodOptional<z.ZodString>;
2434
+ path: z.ZodOptional<z.ZodString>;
2435
+ anchor: z.ZodOptional<z.ZodString>;
2436
+ startLine: z.ZodOptional<z.ZodNumber>;
2437
+ endLine: z.ZodOptional<z.ZodNumber>;
2438
+ url: z.ZodOptional<z.ZodString>;
2439
+ }, "strict", z.ZodTypeAny, {
2440
+ id: string;
2441
+ model: string;
2442
+ store: "git" | "url" | "postgresql" | "treedx";
2443
+ path?: string | undefined;
2444
+ repository?: string | undefined;
2445
+ commit?: string | undefined;
2446
+ digest?: string | undefined;
2447
+ anchor?: string | undefined;
2448
+ url?: string | undefined;
2449
+ revision?: number | undefined;
2450
+ startLine?: number | undefined;
2451
+ endLine?: number | undefined;
2452
+ }, {
2453
+ id: string;
2454
+ model: string;
2455
+ store: "git" | "url" | "postgresql" | "treedx";
2456
+ path?: string | undefined;
2457
+ repository?: string | undefined;
2458
+ commit?: string | undefined;
2459
+ digest?: string | undefined;
2460
+ anchor?: string | undefined;
2461
+ url?: string | undefined;
2462
+ revision?: number | undefined;
2463
+ startLine?: number | undefined;
2464
+ endLine?: number | undefined;
2465
+ }>, {
2466
+ id: string;
2467
+ model: string;
2468
+ store: "git" | "url" | "postgresql" | "treedx";
2469
+ path?: string | undefined;
2470
+ repository?: string | undefined;
2471
+ commit?: string | undefined;
2472
+ digest?: string | undefined;
2473
+ anchor?: string | undefined;
2474
+ url?: string | undefined;
2475
+ revision?: number | undefined;
2476
+ startLine?: number | undefined;
2477
+ endLine?: number | undefined;
2478
+ }, {
2479
+ id: string;
2480
+ model: string;
2481
+ store: "git" | "url" | "postgresql" | "treedx";
2482
+ path?: string | undefined;
2483
+ repository?: string | undefined;
2484
+ commit?: string | undefined;
2485
+ digest?: string | undefined;
2486
+ anchor?: string | undefined;
2487
+ url?: string | undefined;
2488
+ revision?: number | undefined;
2489
+ startLine?: number | undefined;
2490
+ endLine?: number | undefined;
2491
+ }>;
2492
+ activity: z.ZodEnum<["planning", "estimating", "acting", "reviewing", "reporting", "chat"]>;
2493
+ handlerOrigin: z.ZodEnum<["agent-package", "project-runtime"]>;
2494
+ permissionCeiling: z.ZodObject<{
2495
+ content: z.ZodObject<{
2496
+ read: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
2497
+ write: z.ZodEffects<z.ZodArray<z.ZodEnum<["agent", "book", "knowledge", "objective", "discussion", "discussion-message", "proposal", "question", "note", "decision"]>, "many">, ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[], ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[]>;
2498
+ }, "strict", z.ZodTypeAny, {
2499
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2500
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2501
+ }, {
2502
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2503
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2504
+ }>;
2505
+ tools: z.ZodEffects<z.ZodArray<z.ZodEnum<["discussion", "source.read", "source.write", "verification", "release"]>, "many">, ("release" | "verification" | "discussion" | "source.read" | "source.write")[], ("release" | "verification" | "discussion" | "source.read" | "source.write")[]>;
2506
+ }, "strict", z.ZodTypeAny, {
2507
+ content: {
2508
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2509
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2510
+ };
2511
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
2512
+ }, {
2513
+ content: {
2514
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2515
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2516
+ };
2517
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
2518
+ }>;
2519
+ }, "permissions">, "strict", z.ZodTypeAny, {
2520
+ prompt: {
2521
+ system: string;
2522
+ instructions?: string[] | undefined;
2523
+ };
2524
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
2525
+ handler: string;
2526
+ profileRef: {
2527
+ id: string;
2528
+ model: string;
2529
+ store: "git" | "url" | "postgresql" | "treedx";
2530
+ path?: string | undefined;
2531
+ repository?: string | undefined;
2532
+ commit?: string | undefined;
2533
+ digest?: string | undefined;
2534
+ anchor?: string | undefined;
2535
+ url?: string | undefined;
2536
+ revision?: number | undefined;
2537
+ startLine?: number | undefined;
2538
+ endLine?: number | undefined;
2539
+ };
2540
+ handlerOrigin: "agent-package" | "project-runtime";
2541
+ permissionCeiling: {
2542
+ content: {
2543
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2544
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2545
+ };
2546
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
2547
+ };
2548
+ parameters?: Record<string, unknown> | undefined;
2549
+ additionalContext?: string[] | undefined;
2550
+ }, {
2551
+ prompt: {
2552
+ system: string;
2553
+ instructions?: string[] | undefined;
2554
+ };
2555
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
2556
+ handler: string;
2557
+ profileRef: {
2558
+ id: string;
2559
+ model: string;
2560
+ store: "git" | "url" | "postgresql" | "treedx";
2561
+ path?: string | undefined;
2562
+ repository?: string | undefined;
2563
+ commit?: string | undefined;
2564
+ digest?: string | undefined;
2565
+ anchor?: string | undefined;
2566
+ url?: string | undefined;
2567
+ revision?: number | undefined;
2568
+ startLine?: number | undefined;
2569
+ endLine?: number | undefined;
2570
+ };
2571
+ handlerOrigin: "agent-package" | "project-runtime";
2572
+ permissionCeiling: {
2573
+ content: {
2574
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2575
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
2576
+ };
2577
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
2578
+ };
2579
+ parameters?: Record<string, unknown> | undefined;
2580
+ additionalContext?: string[] | undefined;
2581
+ }>;
2582
+ requiredCapabilities: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
2583
+ grant: z.ZodObject<{
2584
+ contentRead: z.ZodArray<z.ZodEffects<z.ZodObject<{
2585
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
2586
+ model: z.ZodString;
2587
+ id: z.ZodString;
2588
+ revision: z.ZodOptional<z.ZodNumber>;
2589
+ digest: z.ZodOptional<z.ZodString>;
2590
+ repository: z.ZodOptional<z.ZodString>;
2591
+ commit: z.ZodOptional<z.ZodString>;
2592
+ path: z.ZodOptional<z.ZodString>;
2593
+ anchor: z.ZodOptional<z.ZodString>;
2594
+ startLine: z.ZodOptional<z.ZodNumber>;
2595
+ endLine: z.ZodOptional<z.ZodNumber>;
2596
+ url: z.ZodOptional<z.ZodString>;
2597
+ }, "strict", z.ZodTypeAny, {
2598
+ id: string;
2599
+ model: string;
2600
+ store: "git" | "url" | "postgresql" | "treedx";
2601
+ path?: string | undefined;
2602
+ repository?: string | undefined;
2603
+ commit?: string | undefined;
2604
+ digest?: string | undefined;
2605
+ anchor?: string | undefined;
2606
+ url?: string | undefined;
2607
+ revision?: number | undefined;
2608
+ startLine?: number | undefined;
2609
+ endLine?: number | undefined;
2610
+ }, {
2611
+ id: string;
2612
+ model: string;
2613
+ store: "git" | "url" | "postgresql" | "treedx";
2614
+ path?: string | undefined;
2615
+ repository?: string | undefined;
2616
+ commit?: string | undefined;
2617
+ digest?: string | undefined;
2618
+ anchor?: string | undefined;
2619
+ url?: string | undefined;
2620
+ revision?: number | undefined;
2621
+ startLine?: number | undefined;
2622
+ endLine?: number | undefined;
2623
+ }>, {
2624
+ id: string;
2625
+ model: string;
2626
+ store: "git" | "url" | "postgresql" | "treedx";
2627
+ path?: string | undefined;
2628
+ repository?: string | undefined;
2629
+ commit?: string | undefined;
2630
+ digest?: string | undefined;
2631
+ anchor?: string | undefined;
2632
+ url?: string | undefined;
2633
+ revision?: number | undefined;
2634
+ startLine?: number | undefined;
2635
+ endLine?: number | undefined;
2636
+ }, {
2637
+ id: string;
2638
+ model: string;
2639
+ store: "git" | "url" | "postgresql" | "treedx";
2640
+ path?: string | undefined;
2641
+ repository?: string | undefined;
2642
+ commit?: string | undefined;
2643
+ digest?: string | undefined;
2644
+ anchor?: string | undefined;
2645
+ url?: string | undefined;
2646
+ revision?: number | undefined;
2647
+ startLine?: number | undefined;
2648
+ endLine?: number | undefined;
2649
+ }>, "many">;
2650
+ contentWrite: z.ZodArray<z.ZodEffects<z.ZodObject<{
2651
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
2652
+ model: z.ZodString;
2653
+ id: z.ZodString;
2654
+ revision: z.ZodOptional<z.ZodNumber>;
2655
+ digest: z.ZodOptional<z.ZodString>;
2656
+ repository: z.ZodOptional<z.ZodString>;
2657
+ commit: z.ZodOptional<z.ZodString>;
2658
+ path: z.ZodOptional<z.ZodString>;
2659
+ anchor: z.ZodOptional<z.ZodString>;
2660
+ startLine: z.ZodOptional<z.ZodNumber>;
2661
+ endLine: z.ZodOptional<z.ZodNumber>;
2662
+ url: z.ZodOptional<z.ZodString>;
2663
+ }, "strict", z.ZodTypeAny, {
2664
+ id: string;
2665
+ model: string;
2666
+ store: "git" | "url" | "postgresql" | "treedx";
2667
+ path?: string | undefined;
2668
+ repository?: string | undefined;
2669
+ commit?: string | undefined;
2670
+ digest?: string | undefined;
2671
+ anchor?: string | undefined;
2672
+ url?: string | undefined;
2673
+ revision?: number | undefined;
2674
+ startLine?: number | undefined;
2675
+ endLine?: number | undefined;
2676
+ }, {
2677
+ id: string;
2678
+ model: string;
2679
+ store: "git" | "url" | "postgresql" | "treedx";
2680
+ path?: string | undefined;
2681
+ repository?: string | undefined;
2682
+ commit?: string | undefined;
2683
+ digest?: string | undefined;
2684
+ anchor?: string | undefined;
2685
+ url?: string | undefined;
2686
+ revision?: number | undefined;
2687
+ startLine?: number | undefined;
2688
+ endLine?: number | undefined;
2689
+ }>, {
2690
+ id: string;
2691
+ model: string;
2692
+ store: "git" | "url" | "postgresql" | "treedx";
2693
+ path?: string | undefined;
2694
+ repository?: string | undefined;
2695
+ commit?: string | undefined;
2696
+ digest?: string | undefined;
2697
+ anchor?: string | undefined;
2698
+ url?: string | undefined;
2699
+ revision?: number | undefined;
2700
+ startLine?: number | undefined;
2701
+ endLine?: number | undefined;
2702
+ }, {
2703
+ id: string;
2704
+ model: string;
2705
+ store: "git" | "url" | "postgresql" | "treedx";
2706
+ path?: string | undefined;
2707
+ repository?: string | undefined;
2708
+ commit?: string | undefined;
2709
+ digest?: string | undefined;
2710
+ anchor?: string | undefined;
2711
+ url?: string | undefined;
2712
+ revision?: number | undefined;
2713
+ startLine?: number | undefined;
2714
+ endLine?: number | undefined;
2715
+ }>, "many">;
2716
+ sourceRead: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
2717
+ sourceWrite: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
2718
+ tools: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
2719
+ }, "strict", z.ZodTypeAny, {
2720
+ tools: string[];
2721
+ contentRead: {
2722
+ id: string;
2723
+ model: string;
2724
+ store: "git" | "url" | "postgresql" | "treedx";
2725
+ path?: string | undefined;
2726
+ repository?: string | undefined;
2727
+ commit?: string | undefined;
2728
+ digest?: string | undefined;
2729
+ anchor?: string | undefined;
2730
+ url?: string | undefined;
2731
+ revision?: number | undefined;
2732
+ startLine?: number | undefined;
2733
+ endLine?: number | undefined;
2734
+ }[];
2735
+ contentWrite: {
2736
+ id: string;
2737
+ model: string;
2738
+ store: "git" | "url" | "postgresql" | "treedx";
2739
+ path?: string | undefined;
2740
+ repository?: string | undefined;
2741
+ commit?: string | undefined;
2742
+ digest?: string | undefined;
2743
+ anchor?: string | undefined;
2744
+ url?: string | undefined;
2745
+ revision?: number | undefined;
2746
+ startLine?: number | undefined;
2747
+ endLine?: number | undefined;
2748
+ }[];
2749
+ sourceRead: string[];
2750
+ sourceWrite: string[];
2751
+ }, {
2752
+ tools: string[];
2753
+ contentRead: {
2754
+ id: string;
2755
+ model: string;
2756
+ store: "git" | "url" | "postgresql" | "treedx";
2757
+ path?: string | undefined;
2758
+ repository?: string | undefined;
2759
+ commit?: string | undefined;
2760
+ digest?: string | undefined;
2761
+ anchor?: string | undefined;
2762
+ url?: string | undefined;
2763
+ revision?: number | undefined;
2764
+ startLine?: number | undefined;
2765
+ endLine?: number | undefined;
2766
+ }[];
2767
+ contentWrite: {
2768
+ id: string;
2769
+ model: string;
2770
+ store: "git" | "url" | "postgresql" | "treedx";
2771
+ path?: string | undefined;
2772
+ repository?: string | undefined;
2773
+ commit?: string | undefined;
2774
+ digest?: string | undefined;
2775
+ anchor?: string | undefined;
2776
+ url?: string | undefined;
2777
+ revision?: number | undefined;
2778
+ startLine?: number | undefined;
2779
+ endLine?: number | undefined;
2780
+ }[];
2781
+ sourceRead: string[];
2782
+ sourceWrite: string[];
2783
+ }>;
2784
+ provider: z.ZodObject<{
2785
+ providerId: z.ZodString;
2786
+ offerId: z.ZodString;
2787
+ offerRevision: z.ZodNumber;
2788
+ runtimeBuild: z.ZodString;
2789
+ }, "strict", z.ZodTypeAny, {
2790
+ providerId: string;
2791
+ offerId: string;
2792
+ offerRevision: number;
2793
+ runtimeBuild: string;
2794
+ }, {
2795
+ providerId: string;
2796
+ offerId: string;
2797
+ offerRevision: number;
2798
+ runtimeBuild: string;
2799
+ }>;
2800
+ contextRefs: z.ZodArray<z.ZodEffects<z.ZodObject<{
2801
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
2802
+ model: z.ZodString;
2803
+ id: z.ZodString;
2804
+ revision: z.ZodOptional<z.ZodNumber>;
2805
+ digest: z.ZodOptional<z.ZodString>;
2806
+ repository: z.ZodOptional<z.ZodString>;
2807
+ commit: z.ZodOptional<z.ZodString>;
2808
+ path: z.ZodOptional<z.ZodString>;
2809
+ anchor: z.ZodOptional<z.ZodString>;
2810
+ startLine: z.ZodOptional<z.ZodNumber>;
2811
+ endLine: z.ZodOptional<z.ZodNumber>;
2812
+ url: z.ZodOptional<z.ZodString>;
2813
+ }, "strict", z.ZodTypeAny, {
2814
+ id: string;
2815
+ model: string;
2816
+ store: "git" | "url" | "postgresql" | "treedx";
2817
+ path?: string | undefined;
2818
+ repository?: string | undefined;
2819
+ commit?: string | undefined;
2820
+ digest?: string | undefined;
2821
+ anchor?: string | undefined;
2822
+ url?: string | undefined;
2823
+ revision?: number | undefined;
2824
+ startLine?: number | undefined;
2825
+ endLine?: number | undefined;
2826
+ }, {
2827
+ id: string;
2828
+ model: string;
2829
+ store: "git" | "url" | "postgresql" | "treedx";
2830
+ path?: string | undefined;
2831
+ repository?: string | undefined;
2832
+ commit?: string | undefined;
2833
+ digest?: string | undefined;
2834
+ anchor?: string | undefined;
2835
+ url?: string | undefined;
2836
+ revision?: number | undefined;
2837
+ startLine?: number | undefined;
2838
+ endLine?: number | undefined;
2839
+ }>, {
2840
+ id: string;
2841
+ model: string;
2842
+ store: "git" | "url" | "postgresql" | "treedx";
2843
+ path?: string | undefined;
2844
+ repository?: string | undefined;
2845
+ commit?: string | undefined;
2846
+ digest?: string | undefined;
2847
+ anchor?: string | undefined;
2848
+ url?: string | undefined;
2849
+ revision?: number | undefined;
2850
+ startLine?: number | undefined;
2851
+ endLine?: number | undefined;
2852
+ }, {
2853
+ id: string;
2854
+ model: string;
2855
+ store: "git" | "url" | "postgresql" | "treedx";
2856
+ path?: string | undefined;
2857
+ repository?: string | undefined;
2858
+ commit?: string | undefined;
2859
+ digest?: string | undefined;
2860
+ anchor?: string | undefined;
2861
+ url?: string | undefined;
2862
+ revision?: number | undefined;
2863
+ startLine?: number | undefined;
2864
+ endLine?: number | undefined;
2865
+ }>, "many">;
2866
+ predecessorResultIds: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
2867
+ acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2868
+ workspace: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
2869
+ mode: z.ZodLiteral<"read-only">;
2870
+ }, "strict", z.ZodTypeAny, {
2871
+ mode: "read-only";
2872
+ }, {
2873
+ mode: "read-only";
2874
+ }>, z.ZodObject<{
2875
+ mode: z.ZodLiteral<"treedx">;
2876
+ workspaceId: z.ZodString;
2877
+ repository: z.ZodString;
2878
+ baseCommit: z.ZodString;
2879
+ writablePaths: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>, string[], string[]>;
2880
+ }, "strict", z.ZodTypeAny, {
2881
+ repository: string;
2882
+ mode: "treedx";
2883
+ workspaceId: string;
2884
+ baseCommit: string;
2885
+ writablePaths: string[];
2886
+ }, {
2887
+ repository: string;
2888
+ mode: "treedx";
2889
+ workspaceId: string;
2890
+ baseCommit: string;
2891
+ writablePaths: string[];
2892
+ }>, z.ZodObject<{
2893
+ mode: z.ZodLiteral<"git">;
2894
+ repository: z.ZodString;
2895
+ baseCommit: z.ZodString;
2896
+ branch: z.ZodString;
2897
+ writablePaths: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>, string[], string[]>;
2898
+ }, "strict", z.ZodTypeAny, {
2899
+ repository: string;
2900
+ branch: string;
2901
+ mode: "git";
2902
+ baseCommit: string;
2903
+ writablePaths: string[];
2904
+ }, {
2905
+ repository: string;
2906
+ branch: string;
2907
+ mode: "git";
2908
+ baseCommit: string;
2909
+ writablePaths: string[];
2910
+ }>]>;
2911
+ estimate: z.ZodEffects<z.ZodObject<{
2912
+ minimumSeconds: z.ZodNumber;
2913
+ expectedSeconds: z.ZodNumber;
2914
+ maximumSeconds: z.ZodNumber;
2915
+ rationale: z.ZodOptional<z.ZodString>;
2916
+ }, "strict", z.ZodTypeAny, {
2917
+ minimumSeconds: number;
2918
+ expectedSeconds: number;
2919
+ maximumSeconds: number;
2920
+ rationale?: string | undefined;
2921
+ }, {
2922
+ minimumSeconds: number;
2923
+ expectedSeconds: number;
2924
+ maximumSeconds: number;
2925
+ rationale?: string | undefined;
2926
+ }>, {
2927
+ minimumSeconds: number;
2928
+ expectedSeconds: number;
2929
+ maximumSeconds: number;
2930
+ rationale?: string | undefined;
2931
+ }, {
2932
+ minimumSeconds: number;
2933
+ expectedSeconds: number;
2934
+ maximumSeconds: number;
2935
+ rationale?: string | undefined;
2936
+ }>;
2937
+ limits: z.ZodObject<{
2938
+ maximumSeconds: z.ZodNumber;
2939
+ maximumContextBytes: z.ZodNumber;
2940
+ maximumContextTokens: z.ZodOptional<z.ZodNumber>;
2941
+ maximumContextItems: z.ZodNumber;
2942
+ }, "strict", z.ZodTypeAny, {
2943
+ maximumSeconds: number;
2944
+ maximumContextBytes: number;
2945
+ maximumContextItems: number;
2946
+ maximumContextTokens?: number | undefined;
2947
+ }, {
2948
+ maximumSeconds: number;
2949
+ maximumContextBytes: number;
2950
+ maximumContextItems: number;
2951
+ maximumContextTokens?: number | undefined;
2952
+ }>;
2953
+ deadline: z.ZodString;
2954
+ leaseId: z.ZodString;
2955
+ reservationId: z.ZodString;
2956
+ attempt: z.ZodNumber;
2957
+ status: z.ZodEnum<["created", "leased", "running", "completed", "blocked", "failed", "cancelled", "expired"]>;
2958
+ createdAt: z.ZodString;
2959
+ startedAt: z.ZodOptional<z.ZodString>;
2960
+ finishedAt: z.ZodOptional<z.ZodString>;
2961
+ }, "strict", z.ZodTypeAny, {
2962
+ status: "blocked" | "expired" | "failed" | "running" | "completed" | "cancelled" | "created" | "leased";
2963
+ provider: {
2964
+ providerId: string;
2965
+ offerId: string;
2966
+ offerRevision: number;
2967
+ runtimeBuild: string;
2968
+ };
2969
+ id: string;
2970
+ schemaVersion: "treeseed.assignment-attempt/v1";
2971
+ projectId: string;
2972
+ teamId: string;
2973
+ createdAt: string;
2974
+ idempotencyKey: string;
2975
+ requiredCapabilities: string[];
2976
+ nodeId: string;
2977
+ grant: {
2978
+ tools: string[];
2979
+ contentRead: {
2980
+ id: string;
2981
+ model: string;
2982
+ store: "git" | "url" | "postgresql" | "treedx";
2983
+ path?: string | undefined;
2984
+ repository?: string | undefined;
2985
+ commit?: string | undefined;
2986
+ digest?: string | undefined;
2987
+ anchor?: string | undefined;
2988
+ url?: string | undefined;
2989
+ revision?: number | undefined;
2990
+ startLine?: number | undefined;
2991
+ endLine?: number | undefined;
2992
+ }[];
2993
+ contentWrite: {
2994
+ id: string;
2995
+ model: string;
2996
+ store: "git" | "url" | "postgresql" | "treedx";
2997
+ path?: string | undefined;
2998
+ repository?: string | undefined;
2999
+ commit?: string | undefined;
3000
+ digest?: string | undefined;
3001
+ anchor?: string | undefined;
3002
+ url?: string | undefined;
3003
+ revision?: number | undefined;
3004
+ startLine?: number | undefined;
3005
+ endLine?: number | undefined;
3006
+ }[];
3007
+ sourceRead: string[];
3008
+ sourceWrite: string[];
3009
+ };
3010
+ workspace: {
3011
+ mode: "read-only";
3012
+ } | {
3013
+ repository: string;
3014
+ mode: "treedx";
3015
+ workspaceId: string;
3016
+ baseCommit: string;
3017
+ writablePaths: string[];
3018
+ } | {
3019
+ repository: string;
3020
+ branch: string;
3021
+ mode: "git";
3022
+ baseCommit: string;
3023
+ writablePaths: string[];
3024
+ };
3025
+ limits: {
3026
+ maximumSeconds: number;
3027
+ maximumContextBytes: number;
3028
+ maximumContextItems: number;
3029
+ maximumContextTokens?: number | undefined;
3030
+ };
3031
+ estimate: {
3032
+ minimumSeconds: number;
3033
+ expectedSeconds: number;
3034
+ maximumSeconds: number;
3035
+ rationale?: string | undefined;
3036
+ };
3037
+ workdayId: string;
3038
+ nodeRevision: number;
3039
+ graphRevision: number;
3040
+ sourceRef: {
3041
+ id: string;
3042
+ model: string;
3043
+ store: "git" | "url" | "postgresql" | "treedx";
3044
+ path?: string | undefined;
3045
+ repository?: string | undefined;
3046
+ commit?: string | undefined;
3047
+ digest?: string | undefined;
3048
+ anchor?: string | undefined;
3049
+ url?: string | undefined;
3050
+ revision?: number | undefined;
3051
+ startLine?: number | undefined;
3052
+ endLine?: number | undefined;
3053
+ };
3054
+ authorityRefs: {
3055
+ id: string;
3056
+ model: string;
3057
+ store: "git" | "url" | "postgresql" | "treedx";
3058
+ path?: string | undefined;
3059
+ repository?: string | undefined;
3060
+ commit?: string | undefined;
3061
+ digest?: string | undefined;
3062
+ anchor?: string | undefined;
3063
+ url?: string | undefined;
3064
+ revision?: number | undefined;
3065
+ startLine?: number | undefined;
3066
+ endLine?: number | undefined;
3067
+ }[];
3068
+ effectiveProfile: {
3069
+ prompt: {
3070
+ system: string;
3071
+ instructions?: string[] | undefined;
3072
+ };
3073
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
3074
+ handler: string;
3075
+ profileRef: {
3076
+ id: string;
3077
+ model: string;
3078
+ store: "git" | "url" | "postgresql" | "treedx";
3079
+ path?: string | undefined;
3080
+ repository?: string | undefined;
3081
+ commit?: string | undefined;
3082
+ digest?: string | undefined;
3083
+ anchor?: string | undefined;
3084
+ url?: string | undefined;
3085
+ revision?: number | undefined;
3086
+ startLine?: number | undefined;
3087
+ endLine?: number | undefined;
3088
+ };
3089
+ handlerOrigin: "agent-package" | "project-runtime";
3090
+ permissionCeiling: {
3091
+ content: {
3092
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
3093
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
3094
+ };
3095
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
3096
+ };
3097
+ parameters?: Record<string, unknown> | undefined;
3098
+ additionalContext?: string[] | undefined;
3099
+ };
3100
+ contextRefs: {
3101
+ id: string;
3102
+ model: string;
3103
+ store: "git" | "url" | "postgresql" | "treedx";
3104
+ path?: string | undefined;
3105
+ repository?: string | undefined;
3106
+ commit?: string | undefined;
3107
+ digest?: string | undefined;
3108
+ anchor?: string | undefined;
3109
+ url?: string | undefined;
3110
+ revision?: number | undefined;
3111
+ startLine?: number | undefined;
3112
+ endLine?: number | undefined;
3113
+ }[];
3114
+ predecessorResultIds: string[];
3115
+ deadline: string;
3116
+ leaseId: string;
3117
+ reservationId: string;
3118
+ attempt: number;
3119
+ startedAt?: string | undefined;
3120
+ finishedAt?: string | undefined;
3121
+ workItemId?: string | undefined;
3122
+ acceptanceCriteria?: string[] | undefined;
3123
+ }, {
3124
+ status: "blocked" | "expired" | "failed" | "running" | "completed" | "cancelled" | "created" | "leased";
3125
+ provider: {
3126
+ providerId: string;
3127
+ offerId: string;
3128
+ offerRevision: number;
3129
+ runtimeBuild: string;
3130
+ };
3131
+ id: string;
3132
+ schemaVersion: "treeseed.assignment-attempt/v1";
3133
+ projectId: string;
3134
+ teamId: string;
3135
+ createdAt: string;
3136
+ idempotencyKey: string;
3137
+ requiredCapabilities: string[];
3138
+ nodeId: string;
3139
+ grant: {
3140
+ tools: string[];
3141
+ contentRead: {
3142
+ id: string;
3143
+ model: string;
3144
+ store: "git" | "url" | "postgresql" | "treedx";
3145
+ path?: string | undefined;
3146
+ repository?: string | undefined;
3147
+ commit?: string | undefined;
3148
+ digest?: string | undefined;
3149
+ anchor?: string | undefined;
3150
+ url?: string | undefined;
3151
+ revision?: number | undefined;
3152
+ startLine?: number | undefined;
3153
+ endLine?: number | undefined;
3154
+ }[];
3155
+ contentWrite: {
3156
+ id: string;
3157
+ model: string;
3158
+ store: "git" | "url" | "postgresql" | "treedx";
3159
+ path?: string | undefined;
3160
+ repository?: string | undefined;
3161
+ commit?: string | undefined;
3162
+ digest?: string | undefined;
3163
+ anchor?: string | undefined;
3164
+ url?: string | undefined;
3165
+ revision?: number | undefined;
3166
+ startLine?: number | undefined;
3167
+ endLine?: number | undefined;
3168
+ }[];
3169
+ sourceRead: string[];
3170
+ sourceWrite: string[];
3171
+ };
3172
+ workspace: {
3173
+ mode: "read-only";
3174
+ } | {
3175
+ repository: string;
3176
+ mode: "treedx";
3177
+ workspaceId: string;
3178
+ baseCommit: string;
3179
+ writablePaths: string[];
3180
+ } | {
3181
+ repository: string;
3182
+ branch: string;
3183
+ mode: "git";
3184
+ baseCommit: string;
3185
+ writablePaths: string[];
3186
+ };
3187
+ limits: {
3188
+ maximumSeconds: number;
3189
+ maximumContextBytes: number;
3190
+ maximumContextItems: number;
3191
+ maximumContextTokens?: number | undefined;
3192
+ };
3193
+ estimate: {
3194
+ minimumSeconds: number;
3195
+ expectedSeconds: number;
3196
+ maximumSeconds: number;
3197
+ rationale?: string | undefined;
3198
+ };
3199
+ workdayId: string;
3200
+ nodeRevision: number;
3201
+ graphRevision: number;
3202
+ sourceRef: {
3203
+ id: string;
3204
+ model: string;
3205
+ store: "git" | "url" | "postgresql" | "treedx";
3206
+ path?: string | undefined;
3207
+ repository?: string | undefined;
3208
+ commit?: string | undefined;
3209
+ digest?: string | undefined;
3210
+ anchor?: string | undefined;
3211
+ url?: string | undefined;
3212
+ revision?: number | undefined;
3213
+ startLine?: number | undefined;
3214
+ endLine?: number | undefined;
3215
+ };
3216
+ authorityRefs: {
3217
+ id: string;
3218
+ model: string;
3219
+ store: "git" | "url" | "postgresql" | "treedx";
3220
+ path?: string | undefined;
3221
+ repository?: string | undefined;
3222
+ commit?: string | undefined;
3223
+ digest?: string | undefined;
3224
+ anchor?: string | undefined;
3225
+ url?: string | undefined;
3226
+ revision?: number | undefined;
3227
+ startLine?: number | undefined;
3228
+ endLine?: number | undefined;
3229
+ }[];
3230
+ effectiveProfile: {
3231
+ prompt: {
3232
+ system: string;
3233
+ instructions?: string[] | undefined;
3234
+ };
3235
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
3236
+ handler: string;
3237
+ profileRef: {
3238
+ id: string;
3239
+ model: string;
3240
+ store: "git" | "url" | "postgresql" | "treedx";
3241
+ path?: string | undefined;
3242
+ repository?: string | undefined;
3243
+ commit?: string | undefined;
3244
+ digest?: string | undefined;
3245
+ anchor?: string | undefined;
3246
+ url?: string | undefined;
3247
+ revision?: number | undefined;
3248
+ startLine?: number | undefined;
3249
+ endLine?: number | undefined;
3250
+ };
3251
+ handlerOrigin: "agent-package" | "project-runtime";
3252
+ permissionCeiling: {
3253
+ content: {
3254
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
3255
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
3256
+ };
3257
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
3258
+ };
3259
+ parameters?: Record<string, unknown> | undefined;
3260
+ additionalContext?: string[] | undefined;
3261
+ };
3262
+ contextRefs: {
3263
+ id: string;
3264
+ model: string;
3265
+ store: "git" | "url" | "postgresql" | "treedx";
3266
+ path?: string | undefined;
3267
+ repository?: string | undefined;
3268
+ commit?: string | undefined;
3269
+ digest?: string | undefined;
3270
+ anchor?: string | undefined;
3271
+ url?: string | undefined;
3272
+ revision?: number | undefined;
3273
+ startLine?: number | undefined;
3274
+ endLine?: number | undefined;
3275
+ }[];
3276
+ predecessorResultIds: string[];
3277
+ deadline: string;
3278
+ leaseId: string;
3279
+ reservationId: string;
3280
+ attempt: number;
3281
+ startedAt?: string | undefined;
3282
+ finishedAt?: string | undefined;
3283
+ workItemId?: string | undefined;
3284
+ acceptanceCriteria?: string[] | undefined;
3285
+ }>;
3286
+ context: z.ZodArray<z.ZodObject<{
3287
+ ref: z.ZodEffects<z.ZodObject<{
3288
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
3289
+ model: z.ZodString;
3290
+ id: z.ZodString;
3291
+ revision: z.ZodOptional<z.ZodNumber>;
3292
+ digest: z.ZodOptional<z.ZodString>;
3293
+ repository: z.ZodOptional<z.ZodString>;
3294
+ commit: z.ZodOptional<z.ZodString>;
3295
+ path: z.ZodOptional<z.ZodString>;
3296
+ anchor: z.ZodOptional<z.ZodString>;
3297
+ startLine: z.ZodOptional<z.ZodNumber>;
3298
+ endLine: z.ZodOptional<z.ZodNumber>;
3299
+ url: z.ZodOptional<z.ZodString>;
3300
+ }, "strict", z.ZodTypeAny, {
3301
+ id: string;
3302
+ model: string;
3303
+ store: "git" | "url" | "postgresql" | "treedx";
3304
+ path?: string | undefined;
3305
+ repository?: string | undefined;
3306
+ commit?: string | undefined;
3307
+ digest?: string | undefined;
3308
+ anchor?: string | undefined;
3309
+ url?: string | undefined;
3310
+ revision?: number | undefined;
3311
+ startLine?: number | undefined;
3312
+ endLine?: number | undefined;
3313
+ }, {
3314
+ id: string;
3315
+ model: string;
3316
+ store: "git" | "url" | "postgresql" | "treedx";
3317
+ path?: string | undefined;
3318
+ repository?: string | undefined;
3319
+ commit?: string | undefined;
3320
+ digest?: string | undefined;
3321
+ anchor?: string | undefined;
3322
+ url?: string | undefined;
3323
+ revision?: number | undefined;
3324
+ startLine?: number | undefined;
3325
+ endLine?: number | undefined;
3326
+ }>, {
3327
+ id: string;
3328
+ model: string;
3329
+ store: "git" | "url" | "postgresql" | "treedx";
3330
+ path?: string | undefined;
3331
+ repository?: string | undefined;
3332
+ commit?: string | undefined;
3333
+ digest?: string | undefined;
3334
+ anchor?: string | undefined;
3335
+ url?: string | undefined;
3336
+ revision?: number | undefined;
3337
+ startLine?: number | undefined;
3338
+ endLine?: number | undefined;
3339
+ }, {
3340
+ id: string;
3341
+ model: string;
3342
+ store: "git" | "url" | "postgresql" | "treedx";
3343
+ path?: string | undefined;
3344
+ repository?: string | undefined;
3345
+ commit?: string | undefined;
3346
+ digest?: string | undefined;
3347
+ anchor?: string | undefined;
3348
+ url?: string | undefined;
3349
+ revision?: number | undefined;
3350
+ startLine?: number | undefined;
3351
+ endLine?: number | undefined;
3352
+ }>;
3353
+ mediaType: z.ZodString;
3354
+ digest: z.ZodString;
3355
+ value: z.ZodAny;
3356
+ }, "strict", z.ZodTypeAny, {
3357
+ digest: string;
3358
+ mediaType: string;
3359
+ ref: {
3360
+ id: string;
3361
+ model: string;
3362
+ store: "git" | "url" | "postgresql" | "treedx";
3363
+ path?: string | undefined;
3364
+ repository?: string | undefined;
3365
+ commit?: string | undefined;
3366
+ digest?: string | undefined;
3367
+ anchor?: string | undefined;
3368
+ url?: string | undefined;
3369
+ revision?: number | undefined;
3370
+ startLine?: number | undefined;
3371
+ endLine?: number | undefined;
3372
+ };
3373
+ value?: any;
3374
+ }, {
3375
+ digest: string;
3376
+ mediaType: string;
3377
+ ref: {
3378
+ id: string;
3379
+ model: string;
3380
+ store: "git" | "url" | "postgresql" | "treedx";
3381
+ path?: string | undefined;
3382
+ repository?: string | undefined;
3383
+ commit?: string | undefined;
3384
+ digest?: string | undefined;
3385
+ anchor?: string | undefined;
3386
+ url?: string | undefined;
3387
+ revision?: number | undefined;
3388
+ startLine?: number | undefined;
3389
+ endLine?: number | undefined;
3390
+ };
3391
+ value?: any;
3392
+ }>, "many">;
3393
+ predecessorResults: z.ZodArray<z.ZodObject<{
3394
+ schemaVersion: z.ZodLiteral<"treeseed.assignment-result/v1">;
3395
+ id: z.ZodString;
3396
+ assignmentId: z.ZodString;
3397
+ status: z.ZodEnum<["completed", "blocked", "failed"]>;
3398
+ summary: z.ZodString;
3399
+ references: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3400
+ kind: z.ZodLiteral<"git">;
3401
+ repository: z.ZodString;
3402
+ commit: z.ZodString;
3403
+ branch: z.ZodOptional<z.ZodString>;
3404
+ path: z.ZodOptional<z.ZodString>;
3405
+ }, "strict", z.ZodTypeAny, {
3406
+ kind: "git";
3407
+ repository: string;
3408
+ commit: string;
3409
+ path?: string | undefined;
3410
+ branch?: string | undefined;
3411
+ }, {
3412
+ kind: "git";
3413
+ repository: string;
3414
+ commit: string;
3415
+ path?: string | undefined;
3416
+ branch?: string | undefined;
3417
+ }>, z.ZodObject<{
3418
+ kind: z.ZodLiteral<"treedx">;
3419
+ projectId: z.ZodString;
3420
+ repository: z.ZodString;
3421
+ commit: z.ZodString;
3422
+ path: z.ZodString;
3423
+ workspaceId: z.ZodOptional<z.ZodString>;
3424
+ }, "strict", z.ZodTypeAny, {
3425
+ path: string;
3426
+ kind: "treedx";
3427
+ repository: string;
3428
+ commit: string;
3429
+ projectId: string;
3430
+ workspaceId?: string | undefined;
3431
+ }, {
3432
+ path: string;
3433
+ kind: "treedx";
3434
+ repository: string;
3435
+ commit: string;
3436
+ projectId: string;
3437
+ workspaceId?: string | undefined;
3438
+ }>, z.ZodObject<{
3439
+ kind: z.ZodLiteral<"url">;
3440
+ url: z.ZodString;
3441
+ digest: z.ZodOptional<z.ZodString>;
3442
+ }, "strict", z.ZodTypeAny, {
3443
+ kind: "url";
3444
+ url: string;
3445
+ digest?: string | undefined;
3446
+ }, {
3447
+ kind: "url";
3448
+ url: string;
3449
+ digest?: string | undefined;
3450
+ }>]>, "many">;
3451
+ verification: z.ZodArray<z.ZodObject<{
3452
+ command: z.ZodString;
3453
+ status: z.ZodEnum<["passed", "failed", "skipped"]>;
3454
+ exitCode: z.ZodNumber;
3455
+ outputDigest: z.ZodString;
3456
+ durationSeconds: z.ZodOptional<z.ZodNumber>;
3457
+ }, "strict", z.ZodTypeAny, {
3458
+ status: "passed" | "failed" | "skipped";
3459
+ command: string;
3460
+ exitCode: number;
3461
+ outputDigest: string;
3462
+ durationSeconds?: number | undefined;
3463
+ }, {
3464
+ status: "passed" | "failed" | "skipped";
3465
+ command: string;
3466
+ exitCode: number;
3467
+ outputDigest: string;
3468
+ durationSeconds?: number | undefined;
3469
+ }>, "many">;
3470
+ usage: z.ZodObject<{
3471
+ elapsedSeconds: z.ZodNumber;
3472
+ modelInputTokens: z.ZodOptional<z.ZodNumber>;
3473
+ modelOutputTokens: z.ZodOptional<z.ZodNumber>;
3474
+ native: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
3475
+ }, "strict", z.ZodTypeAny, {
3476
+ elapsedSeconds: number;
3477
+ native?: Record<string, number> | undefined;
3478
+ modelInputTokens?: number | undefined;
3479
+ modelOutputTokens?: number | undefined;
3480
+ }, {
3481
+ elapsedSeconds: number;
3482
+ native?: Record<string, number> | undefined;
3483
+ modelInputTokens?: number | undefined;
3484
+ modelOutputTokens?: number | undefined;
3485
+ }>;
3486
+ diagnostics: z.ZodArray<z.ZodObject<{
3487
+ code: z.ZodString;
3488
+ severity: z.ZodEnum<["info", "warning", "error"]>;
3489
+ message: z.ZodString;
3490
+ ref: z.ZodOptional<z.ZodEffects<z.ZodObject<{
3491
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
3492
+ model: z.ZodString;
3493
+ id: z.ZodString;
3494
+ revision: z.ZodOptional<z.ZodNumber>;
3495
+ digest: z.ZodOptional<z.ZodString>;
3496
+ repository: z.ZodOptional<z.ZodString>;
3497
+ commit: z.ZodOptional<z.ZodString>;
3498
+ path: z.ZodOptional<z.ZodString>;
3499
+ anchor: z.ZodOptional<z.ZodString>;
3500
+ startLine: z.ZodOptional<z.ZodNumber>;
3501
+ endLine: z.ZodOptional<z.ZodNumber>;
3502
+ url: z.ZodOptional<z.ZodString>;
3503
+ }, "strict", z.ZodTypeAny, {
3504
+ id: string;
3505
+ model: string;
3506
+ store: "git" | "url" | "postgresql" | "treedx";
3507
+ path?: string | undefined;
3508
+ repository?: string | undefined;
3509
+ commit?: string | undefined;
3510
+ digest?: string | undefined;
3511
+ anchor?: string | undefined;
3512
+ url?: string | undefined;
3513
+ revision?: number | undefined;
3514
+ startLine?: number | undefined;
3515
+ endLine?: number | undefined;
3516
+ }, {
3517
+ id: string;
3518
+ model: string;
3519
+ store: "git" | "url" | "postgresql" | "treedx";
3520
+ path?: string | undefined;
3521
+ repository?: string | undefined;
3522
+ commit?: string | undefined;
3523
+ digest?: string | undefined;
3524
+ anchor?: string | undefined;
3525
+ url?: string | undefined;
3526
+ revision?: number | undefined;
3527
+ startLine?: number | undefined;
3528
+ endLine?: number | undefined;
3529
+ }>, {
3530
+ id: string;
3531
+ model: string;
3532
+ store: "git" | "url" | "postgresql" | "treedx";
3533
+ path?: string | undefined;
3534
+ repository?: string | undefined;
3535
+ commit?: string | undefined;
3536
+ digest?: string | undefined;
3537
+ anchor?: string | undefined;
3538
+ url?: string | undefined;
3539
+ revision?: number | undefined;
3540
+ startLine?: number | undefined;
3541
+ endLine?: number | undefined;
3542
+ }, {
3543
+ id: string;
3544
+ model: string;
3545
+ store: "git" | "url" | "postgresql" | "treedx";
3546
+ path?: string | undefined;
3547
+ repository?: string | undefined;
3548
+ commit?: string | undefined;
3549
+ digest?: string | undefined;
3550
+ anchor?: string | undefined;
3551
+ url?: string | undefined;
3552
+ revision?: number | undefined;
3553
+ startLine?: number | undefined;
3554
+ endLine?: number | undefined;
3555
+ }>>;
3556
+ }, "strict", z.ZodTypeAny, {
3557
+ code: string;
3558
+ message: string;
3559
+ severity: "error" | "warning" | "info";
3560
+ ref?: {
3561
+ id: string;
3562
+ model: string;
3563
+ store: "git" | "url" | "postgresql" | "treedx";
3564
+ path?: string | undefined;
3565
+ repository?: string | undefined;
3566
+ commit?: string | undefined;
3567
+ digest?: string | undefined;
3568
+ anchor?: string | undefined;
3569
+ url?: string | undefined;
3570
+ revision?: number | undefined;
3571
+ startLine?: number | undefined;
3572
+ endLine?: number | undefined;
3573
+ } | undefined;
3574
+ }, {
3575
+ code: string;
3576
+ message: string;
3577
+ severity: "error" | "warning" | "info";
3578
+ ref?: {
3579
+ id: string;
3580
+ model: string;
3581
+ store: "git" | "url" | "postgresql" | "treedx";
3582
+ path?: string | undefined;
3583
+ repository?: string | undefined;
3584
+ commit?: string | undefined;
3585
+ digest?: string | undefined;
3586
+ anchor?: string | undefined;
3587
+ url?: string | undefined;
3588
+ revision?: number | undefined;
3589
+ startLine?: number | undefined;
3590
+ endLine?: number | undefined;
3591
+ } | undefined;
3592
+ }>, "many">;
3593
+ completedAt: z.ZodString;
3594
+ }, "strict", z.ZodTypeAny, {
3595
+ status: "blocked" | "failed" | "completed";
3596
+ id: string;
3597
+ schemaVersion: "treeseed.assignment-result/v1";
3598
+ assignmentId: string;
3599
+ completedAt: string;
3600
+ verification: {
3601
+ status: "passed" | "failed" | "skipped";
3602
+ command: string;
3603
+ exitCode: number;
3604
+ outputDigest: string;
3605
+ durationSeconds?: number | undefined;
3606
+ }[];
3607
+ summary: string;
3608
+ usage: {
3609
+ elapsedSeconds: number;
3610
+ native?: Record<string, number> | undefined;
3611
+ modelInputTokens?: number | undefined;
3612
+ modelOutputTokens?: number | undefined;
3613
+ };
3614
+ diagnostics: {
3615
+ code: string;
3616
+ message: string;
3617
+ severity: "error" | "warning" | "info";
3618
+ ref?: {
3619
+ id: string;
3620
+ model: string;
3621
+ store: "git" | "url" | "postgresql" | "treedx";
3622
+ path?: string | undefined;
3623
+ repository?: string | undefined;
3624
+ commit?: string | undefined;
3625
+ digest?: string | undefined;
3626
+ anchor?: string | undefined;
3627
+ url?: string | undefined;
3628
+ revision?: number | undefined;
3629
+ startLine?: number | undefined;
3630
+ endLine?: number | undefined;
3631
+ } | undefined;
3632
+ }[];
3633
+ references: ({
3634
+ kind: "git";
3635
+ repository: string;
3636
+ commit: string;
3637
+ path?: string | undefined;
3638
+ branch?: string | undefined;
3639
+ } | {
3640
+ path: string;
3641
+ kind: "treedx";
3642
+ repository: string;
3643
+ commit: string;
3644
+ projectId: string;
3645
+ workspaceId?: string | undefined;
3646
+ } | {
3647
+ kind: "url";
3648
+ url: string;
3649
+ digest?: string | undefined;
3650
+ })[];
3651
+ }, {
3652
+ status: "blocked" | "failed" | "completed";
3653
+ id: string;
3654
+ schemaVersion: "treeseed.assignment-result/v1";
3655
+ assignmentId: string;
3656
+ completedAt: string;
3657
+ verification: {
3658
+ status: "passed" | "failed" | "skipped";
3659
+ command: string;
3660
+ exitCode: number;
3661
+ outputDigest: string;
3662
+ durationSeconds?: number | undefined;
3663
+ }[];
3664
+ summary: string;
3665
+ usage: {
3666
+ elapsedSeconds: number;
3667
+ native?: Record<string, number> | undefined;
3668
+ modelInputTokens?: number | undefined;
3669
+ modelOutputTokens?: number | undefined;
3670
+ };
3671
+ diagnostics: {
3672
+ code: string;
3673
+ message: string;
3674
+ severity: "error" | "warning" | "info";
3675
+ ref?: {
3676
+ id: string;
3677
+ model: string;
3678
+ store: "git" | "url" | "postgresql" | "treedx";
3679
+ path?: string | undefined;
3680
+ repository?: string | undefined;
3681
+ commit?: string | undefined;
3682
+ digest?: string | undefined;
3683
+ anchor?: string | undefined;
3684
+ url?: string | undefined;
3685
+ revision?: number | undefined;
3686
+ startLine?: number | undefined;
3687
+ endLine?: number | undefined;
3688
+ } | undefined;
3689
+ }[];
3690
+ references: ({
3691
+ kind: "git";
3692
+ repository: string;
3693
+ commit: string;
3694
+ path?: string | undefined;
3695
+ branch?: string | undefined;
3696
+ } | {
3697
+ path: string;
3698
+ kind: "treedx";
3699
+ repository: string;
3700
+ commit: string;
3701
+ projectId: string;
3702
+ workspaceId?: string | undefined;
3703
+ } | {
3704
+ kind: "url";
3705
+ url: string;
3706
+ digest?: string | undefined;
3707
+ })[];
3708
+ }>, "many">;
3709
+ }, "strict", z.ZodTypeAny, {
3710
+ context: {
3711
+ digest: string;
3712
+ mediaType: string;
3713
+ ref: {
3714
+ id: string;
3715
+ model: string;
3716
+ store: "git" | "url" | "postgresql" | "treedx";
3717
+ path?: string | undefined;
3718
+ repository?: string | undefined;
3719
+ commit?: string | undefined;
3720
+ digest?: string | undefined;
3721
+ anchor?: string | undefined;
3722
+ url?: string | undefined;
3723
+ revision?: number | undefined;
3724
+ startLine?: number | undefined;
3725
+ endLine?: number | undefined;
3726
+ };
3727
+ value?: any;
3728
+ }[];
3729
+ assignment: {
3730
+ status: "blocked" | "expired" | "failed" | "running" | "completed" | "cancelled" | "created" | "leased";
3731
+ provider: {
3732
+ providerId: string;
3733
+ offerId: string;
3734
+ offerRevision: number;
3735
+ runtimeBuild: string;
3736
+ };
3737
+ id: string;
3738
+ schemaVersion: "treeseed.assignment-attempt/v1";
3739
+ projectId: string;
3740
+ teamId: string;
3741
+ createdAt: string;
3742
+ idempotencyKey: string;
3743
+ requiredCapabilities: string[];
3744
+ nodeId: string;
3745
+ grant: {
3746
+ tools: string[];
3747
+ contentRead: {
3748
+ id: string;
3749
+ model: string;
3750
+ store: "git" | "url" | "postgresql" | "treedx";
3751
+ path?: string | undefined;
3752
+ repository?: string | undefined;
3753
+ commit?: string | undefined;
3754
+ digest?: string | undefined;
3755
+ anchor?: string | undefined;
3756
+ url?: string | undefined;
3757
+ revision?: number | undefined;
3758
+ startLine?: number | undefined;
3759
+ endLine?: number | undefined;
3760
+ }[];
3761
+ contentWrite: {
3762
+ id: string;
3763
+ model: string;
3764
+ store: "git" | "url" | "postgresql" | "treedx";
3765
+ path?: string | undefined;
3766
+ repository?: string | undefined;
3767
+ commit?: string | undefined;
3768
+ digest?: string | undefined;
3769
+ anchor?: string | undefined;
3770
+ url?: string | undefined;
3771
+ revision?: number | undefined;
3772
+ startLine?: number | undefined;
3773
+ endLine?: number | undefined;
3774
+ }[];
3775
+ sourceRead: string[];
3776
+ sourceWrite: string[];
3777
+ };
3778
+ workspace: {
3779
+ mode: "read-only";
3780
+ } | {
3781
+ repository: string;
3782
+ mode: "treedx";
3783
+ workspaceId: string;
3784
+ baseCommit: string;
3785
+ writablePaths: string[];
3786
+ } | {
3787
+ repository: string;
3788
+ branch: string;
3789
+ mode: "git";
3790
+ baseCommit: string;
3791
+ writablePaths: string[];
3792
+ };
3793
+ limits: {
3794
+ maximumSeconds: number;
3795
+ maximumContextBytes: number;
3796
+ maximumContextItems: number;
3797
+ maximumContextTokens?: number | undefined;
3798
+ };
3799
+ estimate: {
3800
+ minimumSeconds: number;
3801
+ expectedSeconds: number;
3802
+ maximumSeconds: number;
3803
+ rationale?: string | undefined;
3804
+ };
3805
+ workdayId: string;
3806
+ nodeRevision: number;
3807
+ graphRevision: number;
3808
+ sourceRef: {
3809
+ id: string;
3810
+ model: string;
3811
+ store: "git" | "url" | "postgresql" | "treedx";
3812
+ path?: string | undefined;
3813
+ repository?: string | undefined;
3814
+ commit?: string | undefined;
3815
+ digest?: string | undefined;
3816
+ anchor?: string | undefined;
3817
+ url?: string | undefined;
3818
+ revision?: number | undefined;
3819
+ startLine?: number | undefined;
3820
+ endLine?: number | undefined;
3821
+ };
3822
+ authorityRefs: {
3823
+ id: string;
3824
+ model: string;
3825
+ store: "git" | "url" | "postgresql" | "treedx";
3826
+ path?: string | undefined;
3827
+ repository?: string | undefined;
3828
+ commit?: string | undefined;
3829
+ digest?: string | undefined;
3830
+ anchor?: string | undefined;
3831
+ url?: string | undefined;
3832
+ revision?: number | undefined;
3833
+ startLine?: number | undefined;
3834
+ endLine?: number | undefined;
3835
+ }[];
3836
+ effectiveProfile: {
3837
+ prompt: {
3838
+ system: string;
3839
+ instructions?: string[] | undefined;
3840
+ };
3841
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
3842
+ handler: string;
3843
+ profileRef: {
3844
+ id: string;
3845
+ model: string;
3846
+ store: "git" | "url" | "postgresql" | "treedx";
3847
+ path?: string | undefined;
3848
+ repository?: string | undefined;
3849
+ commit?: string | undefined;
3850
+ digest?: string | undefined;
3851
+ anchor?: string | undefined;
3852
+ url?: string | undefined;
3853
+ revision?: number | undefined;
3854
+ startLine?: number | undefined;
3855
+ endLine?: number | undefined;
3856
+ };
3857
+ handlerOrigin: "agent-package" | "project-runtime";
3858
+ permissionCeiling: {
3859
+ content: {
3860
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
3861
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
3862
+ };
3863
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
3864
+ };
3865
+ parameters?: Record<string, unknown> | undefined;
3866
+ additionalContext?: string[] | undefined;
3867
+ };
3868
+ contextRefs: {
3869
+ id: string;
3870
+ model: string;
3871
+ store: "git" | "url" | "postgresql" | "treedx";
3872
+ path?: string | undefined;
3873
+ repository?: string | undefined;
3874
+ commit?: string | undefined;
3875
+ digest?: string | undefined;
3876
+ anchor?: string | undefined;
3877
+ url?: string | undefined;
3878
+ revision?: number | undefined;
3879
+ startLine?: number | undefined;
3880
+ endLine?: number | undefined;
3881
+ }[];
3882
+ predecessorResultIds: string[];
3883
+ deadline: string;
3884
+ leaseId: string;
3885
+ reservationId: string;
3886
+ attempt: number;
3887
+ startedAt?: string | undefined;
3888
+ finishedAt?: string | undefined;
3889
+ workItemId?: string | undefined;
3890
+ acceptanceCriteria?: string[] | undefined;
3891
+ };
3892
+ predecessorResults: {
3893
+ status: "blocked" | "failed" | "completed";
3894
+ id: string;
3895
+ schemaVersion: "treeseed.assignment-result/v1";
3896
+ assignmentId: string;
3897
+ completedAt: string;
3898
+ verification: {
3899
+ status: "passed" | "failed" | "skipped";
3900
+ command: string;
3901
+ exitCode: number;
3902
+ outputDigest: string;
3903
+ durationSeconds?: number | undefined;
3904
+ }[];
3905
+ summary: string;
3906
+ usage: {
3907
+ elapsedSeconds: number;
3908
+ native?: Record<string, number> | undefined;
3909
+ modelInputTokens?: number | undefined;
3910
+ modelOutputTokens?: number | undefined;
3911
+ };
3912
+ diagnostics: {
3913
+ code: string;
3914
+ message: string;
3915
+ severity: "error" | "warning" | "info";
3916
+ ref?: {
3917
+ id: string;
3918
+ model: string;
3919
+ store: "git" | "url" | "postgresql" | "treedx";
3920
+ path?: string | undefined;
3921
+ repository?: string | undefined;
3922
+ commit?: string | undefined;
3923
+ digest?: string | undefined;
3924
+ anchor?: string | undefined;
3925
+ url?: string | undefined;
3926
+ revision?: number | undefined;
3927
+ startLine?: number | undefined;
3928
+ endLine?: number | undefined;
3929
+ } | undefined;
3930
+ }[];
3931
+ references: ({
3932
+ kind: "git";
3933
+ repository: string;
3934
+ commit: string;
3935
+ path?: string | undefined;
3936
+ branch?: string | undefined;
3937
+ } | {
3938
+ path: string;
3939
+ kind: "treedx";
3940
+ repository: string;
3941
+ commit: string;
3942
+ projectId: string;
3943
+ workspaceId?: string | undefined;
3944
+ } | {
3945
+ kind: "url";
3946
+ url: string;
3947
+ digest?: string | undefined;
3948
+ })[];
3949
+ }[];
3950
+ }, {
3951
+ context: {
3952
+ digest: string;
3953
+ mediaType: string;
3954
+ ref: {
3955
+ id: string;
3956
+ model: string;
3957
+ store: "git" | "url" | "postgresql" | "treedx";
3958
+ path?: string | undefined;
3959
+ repository?: string | undefined;
3960
+ commit?: string | undefined;
3961
+ digest?: string | undefined;
3962
+ anchor?: string | undefined;
3963
+ url?: string | undefined;
3964
+ revision?: number | undefined;
3965
+ startLine?: number | undefined;
3966
+ endLine?: number | undefined;
3967
+ };
3968
+ value?: any;
3969
+ }[];
3970
+ assignment: {
3971
+ status: "blocked" | "expired" | "failed" | "running" | "completed" | "cancelled" | "created" | "leased";
3972
+ provider: {
3973
+ providerId: string;
3974
+ offerId: string;
3975
+ offerRevision: number;
3976
+ runtimeBuild: string;
3977
+ };
3978
+ id: string;
3979
+ schemaVersion: "treeseed.assignment-attempt/v1";
3980
+ projectId: string;
3981
+ teamId: string;
3982
+ createdAt: string;
3983
+ idempotencyKey: string;
3984
+ requiredCapabilities: string[];
3985
+ nodeId: string;
3986
+ grant: {
3987
+ tools: string[];
3988
+ contentRead: {
3989
+ id: string;
3990
+ model: string;
3991
+ store: "git" | "url" | "postgresql" | "treedx";
3992
+ path?: string | undefined;
3993
+ repository?: string | undefined;
3994
+ commit?: string | undefined;
3995
+ digest?: string | undefined;
3996
+ anchor?: string | undefined;
3997
+ url?: string | undefined;
3998
+ revision?: number | undefined;
3999
+ startLine?: number | undefined;
4000
+ endLine?: number | undefined;
4001
+ }[];
4002
+ contentWrite: {
4003
+ id: string;
4004
+ model: string;
4005
+ store: "git" | "url" | "postgresql" | "treedx";
4006
+ path?: string | undefined;
4007
+ repository?: string | undefined;
4008
+ commit?: string | undefined;
4009
+ digest?: string | undefined;
4010
+ anchor?: string | undefined;
4011
+ url?: string | undefined;
4012
+ revision?: number | undefined;
4013
+ startLine?: number | undefined;
4014
+ endLine?: number | undefined;
4015
+ }[];
4016
+ sourceRead: string[];
4017
+ sourceWrite: string[];
4018
+ };
4019
+ workspace: {
4020
+ mode: "read-only";
4021
+ } | {
4022
+ repository: string;
4023
+ mode: "treedx";
4024
+ workspaceId: string;
4025
+ baseCommit: string;
4026
+ writablePaths: string[];
4027
+ } | {
4028
+ repository: string;
4029
+ branch: string;
4030
+ mode: "git";
4031
+ baseCommit: string;
4032
+ writablePaths: string[];
4033
+ };
4034
+ limits: {
4035
+ maximumSeconds: number;
4036
+ maximumContextBytes: number;
4037
+ maximumContextItems: number;
4038
+ maximumContextTokens?: number | undefined;
4039
+ };
4040
+ estimate: {
4041
+ minimumSeconds: number;
4042
+ expectedSeconds: number;
4043
+ maximumSeconds: number;
4044
+ rationale?: string | undefined;
4045
+ };
4046
+ workdayId: string;
4047
+ nodeRevision: number;
4048
+ graphRevision: number;
4049
+ sourceRef: {
4050
+ id: string;
4051
+ model: string;
4052
+ store: "git" | "url" | "postgresql" | "treedx";
4053
+ path?: string | undefined;
4054
+ repository?: string | undefined;
4055
+ commit?: string | undefined;
4056
+ digest?: string | undefined;
4057
+ anchor?: string | undefined;
4058
+ url?: string | undefined;
4059
+ revision?: number | undefined;
4060
+ startLine?: number | undefined;
4061
+ endLine?: number | undefined;
4062
+ };
4063
+ authorityRefs: {
4064
+ id: string;
4065
+ model: string;
4066
+ store: "git" | "url" | "postgresql" | "treedx";
4067
+ path?: string | undefined;
4068
+ repository?: string | undefined;
4069
+ commit?: string | undefined;
4070
+ digest?: string | undefined;
4071
+ anchor?: string | undefined;
4072
+ url?: string | undefined;
4073
+ revision?: number | undefined;
4074
+ startLine?: number | undefined;
4075
+ endLine?: number | undefined;
4076
+ }[];
4077
+ effectiveProfile: {
4078
+ prompt: {
4079
+ system: string;
4080
+ instructions?: string[] | undefined;
4081
+ };
4082
+ activity: "planning" | "acting" | "estimating" | "reviewing" | "reporting" | "chat";
4083
+ handler: string;
4084
+ profileRef: {
4085
+ id: string;
4086
+ model: string;
4087
+ store: "git" | "url" | "postgresql" | "treedx";
4088
+ path?: string | undefined;
4089
+ repository?: string | undefined;
4090
+ commit?: string | undefined;
4091
+ digest?: string | undefined;
4092
+ anchor?: string | undefined;
4093
+ url?: string | undefined;
4094
+ revision?: number | undefined;
4095
+ startLine?: number | undefined;
4096
+ endLine?: number | undefined;
4097
+ };
4098
+ handlerOrigin: "agent-package" | "project-runtime";
4099
+ permissionCeiling: {
4100
+ content: {
4101
+ read: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
4102
+ write: ("agent" | "knowledge" | "decision" | "proposal" | "objective" | "question" | "discussion" | "note" | "book" | "discussion-message")[];
4103
+ };
4104
+ tools: ("release" | "verification" | "discussion" | "source.read" | "source.write")[];
4105
+ };
4106
+ parameters?: Record<string, unknown> | undefined;
4107
+ additionalContext?: string[] | undefined;
4108
+ };
4109
+ contextRefs: {
4110
+ id: string;
4111
+ model: string;
4112
+ store: "git" | "url" | "postgresql" | "treedx";
4113
+ path?: string | undefined;
4114
+ repository?: string | undefined;
4115
+ commit?: string | undefined;
4116
+ digest?: string | undefined;
4117
+ anchor?: string | undefined;
4118
+ url?: string | undefined;
4119
+ revision?: number | undefined;
4120
+ startLine?: number | undefined;
4121
+ endLine?: number | undefined;
4122
+ }[];
4123
+ predecessorResultIds: string[];
4124
+ deadline: string;
4125
+ leaseId: string;
4126
+ reservationId: string;
4127
+ attempt: number;
4128
+ startedAt?: string | undefined;
4129
+ finishedAt?: string | undefined;
4130
+ workItemId?: string | undefined;
4131
+ acceptanceCriteria?: string[] | undefined;
4132
+ };
4133
+ predecessorResults: {
4134
+ status: "blocked" | "failed" | "completed";
4135
+ id: string;
4136
+ schemaVersion: "treeseed.assignment-result/v1";
4137
+ assignmentId: string;
4138
+ completedAt: string;
4139
+ verification: {
4140
+ status: "passed" | "failed" | "skipped";
4141
+ command: string;
4142
+ exitCode: number;
4143
+ outputDigest: string;
4144
+ durationSeconds?: number | undefined;
4145
+ }[];
4146
+ summary: string;
4147
+ usage: {
4148
+ elapsedSeconds: number;
4149
+ native?: Record<string, number> | undefined;
4150
+ modelInputTokens?: number | undefined;
4151
+ modelOutputTokens?: number | undefined;
4152
+ };
4153
+ diagnostics: {
4154
+ code: string;
4155
+ message: string;
4156
+ severity: "error" | "warning" | "info";
4157
+ ref?: {
4158
+ id: string;
4159
+ model: string;
4160
+ store: "git" | "url" | "postgresql" | "treedx";
4161
+ path?: string | undefined;
4162
+ repository?: string | undefined;
4163
+ commit?: string | undefined;
4164
+ digest?: string | undefined;
4165
+ anchor?: string | undefined;
4166
+ url?: string | undefined;
4167
+ revision?: number | undefined;
4168
+ startLine?: number | undefined;
4169
+ endLine?: number | undefined;
4170
+ } | undefined;
4171
+ }[];
4172
+ references: ({
4173
+ kind: "git";
4174
+ repository: string;
4175
+ commit: string;
4176
+ path?: string | undefined;
4177
+ branch?: string | undefined;
4178
+ } | {
4179
+ path: string;
4180
+ kind: "treedx";
4181
+ repository: string;
4182
+ commit: string;
4183
+ projectId: string;
4184
+ workspaceId?: string | undefined;
4185
+ } | {
4186
+ kind: "url";
4187
+ url: string;
4188
+ digest?: string | undefined;
4189
+ })[];
4190
+ }[];
4191
+ }>;
4192
+ export type ExactEntityReference = z.infer<typeof exactEntityReferenceSchema>;
4193
+ export type AssignmentReference = z.infer<typeof assignmentReferenceSchema>;
4194
+ export type ExactGrant = z.infer<typeof exactGrantSchema>;
4195
+ export type AssignmentWorkspace = z.infer<typeof assignmentWorkspaceSchema>;
4196
+ export type EffectiveActivityProfile = z.infer<typeof effectiveActivityProfileSchema>;
4197
+ export type AssignmentAttempt = z.infer<typeof assignmentAttemptSchema>;
4198
+ export type AssignmentResult = z.infer<typeof assignmentResultSchema>;
4199
+ export type AssignmentContext = z.infer<typeof assignmentContextSchema>;