@treeseed/sdk 0.13.0-rc.122 → 0.13.0-rc.124

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 (126) hide show
  1. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +1392 -974
  2. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +72 -27
  3. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +34 -34
  4. package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.d.ts +2 -0
  5. package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.js +13 -0
  6. package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +1 -0
  7. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.d.ts +126 -1
  8. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.js +35 -1
  9. package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.d.ts +1 -3
  10. package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.js +21 -15
  11. package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.d.ts +3 -42
  12. package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.js +8 -8
  13. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.d.ts +227 -66
  14. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +54 -19
  15. package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +214 -5
  16. package/dist/agent-capacity/contracts/capacity/workdays/workday-records.js +19 -0
  17. package/dist/agent-capacity/contracts/operations/agent-team-clone.d.ts +47 -47
  18. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +119 -0
  19. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.js +16 -0
  20. package/dist/agent-capacity/contracts/support/execution-graph.d.ts +434 -230
  21. package/dist/agent-capacity/contracts/support/execution-graph.js +20 -18
  22. package/dist/agent-capacity/contracts/support/financial-records.d.ts +2 -0
  23. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +286 -254
  24. package/dist/agent-capacity/validation/agent-definition-schema.js +22 -28
  25. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +1 -1
  26. package/dist/agent-capacity/validation/assignment-records.js +45 -0
  27. package/dist/capacity/agents/agent-capacity.d.ts +1 -0
  28. package/dist/capacity/agents/agent-capacity.js +1 -0
  29. package/dist/capacity-provider/capability-ontology.d.ts +102 -102
  30. package/dist/capacity-provider/client.d.ts +14 -7
  31. package/dist/capacity-provider/client.js +1 -4
  32. package/dist/capacity-provider/contracts/capacity-facts.d.ts +0 -1
  33. package/dist/capacity-provider/contracts/environment-profiles.d.ts +40 -40
  34. package/dist/capacity-provider/contracts/governance.d.ts +2 -17
  35. package/dist/capacity-provider/contracts/index.d.ts +2 -0
  36. package/dist/capacity-provider/contracts/index.js +2 -0
  37. package/dist/capacity-provider/core-capability-catalog.d.ts +7 -7
  38. package/dist/capacity-provider/environment-catalog.d.ts +22 -22
  39. package/dist/capacity-provider/environment-catalog.js +1 -1
  40. package/dist/capacity-provider/install-configuration.d.ts +4 -4
  41. package/dist/capacity-provider/sandbox-contracts.d.ts +54 -54
  42. package/dist/capacity-provider/source-workspace.d.ts +76 -76
  43. package/dist/capacity-provider/validation.d.ts +10 -2
  44. package/dist/capacity-provider/validation.js +52 -22
  45. package/dist/content/validation/agent-operational-content-schemas.d.ts +120 -118
  46. package/dist/content/validation/agent-operational-content-schemas.js +2 -0
  47. package/dist/content/validation/auxiliary-content-schemas.d.ts +92 -92
  48. package/dist/content/validation/content-model-schemas.d.ts +3155 -2512
  49. package/dist/content/validation/content-model-schemas.js +97 -87
  50. package/dist/content/validation/portable-content-data.d.ts +173 -168
  51. package/dist/content/validation/schema-constraints.d.ts +78 -0
  52. package/dist/content/validation/schema-constraints.js +149 -0
  53. package/dist/deployment/ai/storage.d.ts +20 -20
  54. package/dist/deployment/ai-hosting.d.ts +12 -12
  55. package/dist/deployment/ai-instance.d.ts +12 -12
  56. package/dist/deployment/ai-mode.d.ts +34 -34
  57. package/dist/deployment/hosted-topology-template.d.ts +25 -25
  58. package/dist/deployment/hosted-topology.d.ts +146 -146
  59. package/dist/deployment/postgres/transfer.d.ts +2 -2
  60. package/dist/deployment/schemas.d.ts +504 -504
  61. package/dist/development/schemas.d.ts +325 -325
  62. package/dist/graph/context-query-contracts.js +1 -1
  63. package/dist/guarantees/index.d.ts +26 -2
  64. package/dist/identity/contracts.js +6 -1
  65. package/dist/operator-contracts/canonical-command-tree.js +22 -8
  66. package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +27 -27
  67. package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +25 -25
  68. package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +11 -9
  69. package/dist/operator-contracts/catalog/communication-operations.d.ts +108 -90
  70. package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +33 -33
  71. package/dist/operator-contracts/catalog/inbox-operations.d.ts +27 -27
  72. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +4 -4
  73. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +2 -1
  74. package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +5 -5
  75. package/dist/operator-contracts/catalog/provider-environment-operations.d.ts +3 -3
  76. package/dist/operator-contracts/catalog/services/secret-operations.d.ts +16 -8
  77. package/dist/operator-contracts/catalog/services/secret-operations.js +2 -1
  78. package/dist/operator-contracts/catalog/workdays/profile-operations.d.ts +11 -11
  79. package/dist/operator-contracts/catalog/workdays/selection-commands.js +7 -6
  80. package/dist/operator-contracts/communication/contracts.d.ts +340 -198
  81. package/dist/operator-contracts/communication/contracts.js +6 -1
  82. package/dist/operator-contracts/control-plane-operation.d.ts +7 -0
  83. package/dist/operator-contracts/control-plane-operation.js +6 -0
  84. package/dist/operator-contracts/control-plane-operations.d.ts +469 -442
  85. package/dist/operator-contracts/control-plane-operations.js +26 -10
  86. package/dist/operator-contracts/inbox/contracts.d.ts +100 -100
  87. package/dist/operator-contracts/knowledge/contracts.d.ts +6 -6
  88. package/dist/operator-contracts/mcp.js +4 -3
  89. package/dist/operator-contracts/workday-lifecycle.d.ts +192 -2
  90. package/dist/operator-contracts/workday-lifecycle.js +108 -45
  91. package/dist/platform/agent-schema-verification.js +316 -33
  92. package/dist/platform/contracts.d.ts +72 -72
  93. package/dist/platform/schemas.d.ts +144 -36
  94. package/dist/platform/schemas.js +26 -0
  95. package/dist/platform/verification.js +4 -0
  96. package/dist/sdk-types/support/sdk-search-request.d.ts +2 -2
  97. package/dist/secrets-capability/secret-contracts.d.ts +2 -2
  98. package/dist/secrets-capability/shared-access.d.ts +1 -1
  99. package/dist/secrets-capability/shared-resources.d.ts +30 -30
  100. package/dist/security/encrypted-envelope.d.ts +6 -6
  101. package/dist/treedx/client.d.ts +4 -4
  102. package/dist/treedx/index.d.ts +1 -1
  103. package/dist/treedx/index.js +1 -0
  104. package/dist/treedx/types.d.ts +286 -0
  105. package/dist/treedx/types.js +44 -0
  106. package/dist/types/agents/agent-activity-profile.d.ts +1 -0
  107. package/guarantees/agent/golden/component-boundaries.guarantee.yaml +12 -0
  108. package/guarantees/agent/golden/product-custody.guarantee.yaml +12 -0
  109. package/guarantees/agent/golden/product.guarantee.yaml +12 -0
  110. package/guarantees/agent/golden/scenes/component-boundaries.scene.yaml +837 -0
  111. package/guarantees/agent/golden/scenes/product-custody.scene.yaml +53 -0
  112. package/guarantees/agent/golden/scenes/product.scene.yaml +8 -0
  113. package/guarantees/verifiers/golden.verifiers.yaml +1429 -0
  114. package/package.json +10 -5
  115. package/tests/acceptance/golden-product.test.ts +205 -0
  116. package/tests/acceptance/golden-product.ts +404 -0
  117. package/tests/acceptance/product/base-red.ts +73 -0
  118. package/tests/acceptance/product/documentation-examples.ts +68 -0
  119. package/tests/acceptance/product/intent-runtime.ts +145 -0
  120. package/tests/acceptance/product/release-output.ts +160 -0
  121. package/tests/acceptance/product/research-artifact.ts +87 -0
  122. package/tests/acceptance/product/research-revision.ts +82 -0
  123. package/tests/acceptance/product/research-source.ts +91 -0
  124. package/tests/acceptance/product/test-chain.ts +192 -0
  125. package/treeseed.package.yaml +147 -0
  126. package/dist/.treeseed-build-complete.json +0 -1
@@ -1,4 +1,5 @@
1
1
  import type { AgentWorkExecutionMode } from '../../support/authority/execution-mode.js';
2
+ import { z } from 'zod';
2
3
  export type CapacityWorkdayRunStatus = 'queued' | 'running' | 'completed' | 'cancelled' | 'failed' | 'degraded';
3
4
  export type CapacityWorkdayEventStatus = 'recorded' | 'active' | 'completed' | 'warning' | 'error' | 'failed';
4
5
  export interface CapacityWorkdayRunRecord {
@@ -78,6 +79,10 @@ export interface AgentActivityEvent {
78
79
  }
79
80
  export interface ProviderRuntimeEventInput {
80
81
  id: string;
82
+ leaseToken?: string;
83
+ runnerId?: string;
84
+ sequence?: number;
85
+ protectedPayload?: Record<string, unknown>;
81
86
  eventType: `provider.${string}`;
82
87
  status: 'recorded' | 'active' | 'completed' | 'warning' | 'error' | 'failed';
83
88
  component: 'provider-manager' | 'provider-runner' | 'lease' | 'execution-provider' | 'recovery';
@@ -87,16 +92,220 @@ export interface ProviderRuntimeEventInput {
87
92
  refs?: Record<string, unknown>;
88
93
  metrics?: Record<string, unknown>;
89
94
  }
90
- export interface CapacityWorkdayScheduleRecord {
95
+ export declare const workdayScheduleSchema: z.ZodObject<{
96
+ id: z.ZodString;
97
+ teamId: z.ZodString;
98
+ status: z.ZodEnum<["active", "paused", "completed", "failed"]>;
99
+ purpose: z.ZodString;
100
+ cadenceSeconds: z.ZodNumber;
101
+ intent: z.ZodEffects<z.ZodEffects<z.ZodObject<{
102
+ schemaVersion: z.ZodLiteral<"treeseed.workday-intent/v1">;
103
+ teamId: z.ZodString;
104
+ profileId: z.ZodString;
105
+ projects: z.ZodEffects<z.ZodUnion<[z.ZodLiteral<"all">, z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>]>, any, any>;
106
+ executionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["simulation", "production"]>>>;
107
+ startsAt: z.ZodString;
108
+ endsAt: z.ZodOptional<z.ZodString>;
109
+ durationSeconds: z.ZodOptional<z.ZodNumber>;
110
+ planningOnly: z.ZodOptional<z.ZodBoolean>;
111
+ objectiveFilters: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
112
+ proposalIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
113
+ decisionIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
114
+ groupIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
115
+ reportingAgentId: z.ZodOptional<z.ZodString>;
116
+ continueFromWorkdayId: z.ZodOptional<z.ZodString>;
117
+ allocation: z.ZodOptional<z.ZodObject<{
118
+ planningPercent: z.ZodOptional<z.ZodNumber>;
119
+ allocationWeight: z.ZodOptional<z.ZodNumber>;
120
+ planningTurnMaximumSeconds: z.ZodOptional<z.ZodNumber>;
121
+ projectPercentages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
122
+ agentClassPercentages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>>;
123
+ }, "strict", z.ZodTypeAny, {
124
+ planningPercent?: number | undefined;
125
+ allocationWeight?: number | undefined;
126
+ planningTurnMaximumSeconds?: number | undefined;
127
+ projectPercentages?: Record<string, number> | undefined;
128
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
129
+ }, {
130
+ planningPercent?: number | undefined;
131
+ allocationWeight?: number | undefined;
132
+ planningTurnMaximumSeconds?: number | undefined;
133
+ projectPercentages?: Record<string, number> | undefined;
134
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
135
+ }>>;
136
+ agentSelection: z.ZodOptional<z.ZodEffects<z.ZodObject<{
137
+ activityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["planning", "estimating", "reviewing", "reporting", "chat"]>, "many">>;
138
+ mode: z.ZodOptional<z.ZodLiteral<"intersection">>;
139
+ }, "strict", z.ZodTypeAny, {
140
+ mode?: "intersection" | undefined;
141
+ activityTypes?: ("planning" | "estimating" | "reviewing" | "reporting" | "chat")[] | undefined;
142
+ }, {
143
+ mode?: "intersection" | undefined;
144
+ activityTypes?: ("planning" | "estimating" | "reviewing" | "reporting" | "chat")[] | undefined;
145
+ }>, {
146
+ [x: string]: any;
147
+ }, {
148
+ [x: string]: any;
149
+ }>>;
150
+ operatorConstraints: z.ZodOptional<z.ZodObject<{
151
+ providerIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
152
+ maxConcurrency: z.ZodOptional<z.ZodNumber>;
153
+ }, "strict", z.ZodTypeAny, {
154
+ providerIds?: string[] | undefined;
155
+ maxConcurrency?: number | undefined;
156
+ }, {
157
+ providerIds?: string[] | undefined;
158
+ maxConcurrency?: number | undefined;
159
+ }>>;
160
+ }, "strict", z.ZodTypeAny, {
161
+ schemaVersion: "treeseed.workday-intent/v1";
162
+ teamId: string;
163
+ profileId: string;
164
+ startsAt: string;
165
+ groupIds?: string[] | undefined;
166
+ durationSeconds?: number | undefined;
167
+ projects?: any;
168
+ executionMode?: "simulation" | "production" | undefined;
169
+ reportingAgentId?: string | undefined;
170
+ endsAt?: string | undefined;
171
+ planningOnly?: boolean | undefined;
172
+ objectiveFilters?: string[] | undefined;
173
+ proposalIds?: string[] | undefined;
174
+ decisionIds?: string[] | undefined;
175
+ continueFromWorkdayId?: string | undefined;
176
+ allocation?: {
177
+ planningPercent?: number | undefined;
178
+ allocationWeight?: number | undefined;
179
+ planningTurnMaximumSeconds?: number | undefined;
180
+ projectPercentages?: Record<string, number> | undefined;
181
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
182
+ } | undefined;
183
+ agentSelection?: {
184
+ [x: string]: any;
185
+ } | undefined;
186
+ operatorConstraints?: {
187
+ providerIds?: string[] | undefined;
188
+ maxConcurrency?: number | undefined;
189
+ } | undefined;
190
+ }, {
191
+ schemaVersion: "treeseed.workday-intent/v1";
192
+ teamId: string;
193
+ profileId: string;
194
+ startsAt: string;
195
+ groupIds?: string[] | undefined;
196
+ durationSeconds?: number | undefined;
197
+ projects?: any;
198
+ executionMode?: "simulation" | "production" | undefined;
199
+ reportingAgentId?: string | undefined;
200
+ endsAt?: string | undefined;
201
+ planningOnly?: boolean | undefined;
202
+ objectiveFilters?: string[] | undefined;
203
+ proposalIds?: string[] | undefined;
204
+ decisionIds?: string[] | undefined;
205
+ continueFromWorkdayId?: string | undefined;
206
+ allocation?: {
207
+ planningPercent?: number | undefined;
208
+ allocationWeight?: number | undefined;
209
+ planningTurnMaximumSeconds?: number | undefined;
210
+ projectPercentages?: Record<string, number> | undefined;
211
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
212
+ } | undefined;
213
+ agentSelection?: {
214
+ [x: string]: any;
215
+ } | undefined;
216
+ operatorConstraints?: {
217
+ providerIds?: string[] | undefined;
218
+ maxConcurrency?: number | undefined;
219
+ } | undefined;
220
+ }>, {
221
+ schemaVersion: "treeseed.workday-intent/v1";
222
+ teamId: string;
223
+ profileId: string;
224
+ startsAt: string;
225
+ groupIds?: string[] | undefined;
226
+ durationSeconds?: number | undefined;
227
+ projects?: any;
228
+ executionMode?: "simulation" | "production" | undefined;
229
+ reportingAgentId?: string | undefined;
230
+ endsAt?: string | undefined;
231
+ planningOnly?: boolean | undefined;
232
+ objectiveFilters?: string[] | undefined;
233
+ proposalIds?: string[] | undefined;
234
+ decisionIds?: string[] | undefined;
235
+ continueFromWorkdayId?: string | undefined;
236
+ allocation?: {
237
+ planningPercent?: number | undefined;
238
+ allocationWeight?: number | undefined;
239
+ planningTurnMaximumSeconds?: number | undefined;
240
+ projectPercentages?: Record<string, number> | undefined;
241
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
242
+ } | undefined;
243
+ agentSelection?: {
244
+ [x: string]: any;
245
+ } | undefined;
246
+ operatorConstraints?: {
247
+ providerIds?: string[] | undefined;
248
+ maxConcurrency?: number | undefined;
249
+ } | undefined;
250
+ }, {
251
+ schemaVersion: "treeseed.workday-intent/v1";
252
+ teamId: string;
253
+ profileId: string;
254
+ startsAt: string;
255
+ groupIds?: string[] | undefined;
256
+ durationSeconds?: number | undefined;
257
+ projects?: any;
258
+ executionMode?: "simulation" | "production" | undefined;
259
+ reportingAgentId?: string | undefined;
260
+ endsAt?: string | undefined;
261
+ planningOnly?: boolean | undefined;
262
+ objectiveFilters?: string[] | undefined;
263
+ proposalIds?: string[] | undefined;
264
+ decisionIds?: string[] | undefined;
265
+ continueFromWorkdayId?: string | undefined;
266
+ allocation?: {
267
+ planningPercent?: number | undefined;
268
+ allocationWeight?: number | undefined;
269
+ planningTurnMaximumSeconds?: number | undefined;
270
+ projectPercentages?: Record<string, number> | undefined;
271
+ agentClassPercentages?: Record<string, Record<string, number>> | undefined;
272
+ } | undefined;
273
+ agentSelection?: {
274
+ [x: string]: any;
275
+ } | undefined;
276
+ operatorConstraints?: {
277
+ providerIds?: string[] | undefined;
278
+ maxConcurrency?: number | undefined;
279
+ } | undefined;
280
+ }>, any, any>;
281
+ lastRunId: z.ZodNullable<z.ZodString>;
282
+ nextRunAt: z.ZodString;
283
+ stateVersion: z.ZodNumber;
284
+ createdAt: z.ZodString;
285
+ updatedAt: z.ZodString;
286
+ }, "strict", z.ZodTypeAny, {
287
+ status: "active" | "completed" | "failed" | "paused";
91
288
  id: string;
92
- teamId: string;
93
- status: 'active' | 'paused' | 'completed' | 'failed';
94
289
  purpose: string;
290
+ createdAt: string;
291
+ updatedAt: string;
292
+ teamId: string;
95
293
  cadenceSeconds: number;
96
- intent: import('../../../../operator-contracts/workday-lifecycle.js').WorkdayIntent;
97
294
  lastRunId: string | null;
98
295
  nextRunAt: string;
99
296
  stateVersion: number;
297
+ intent?: any;
298
+ }, {
299
+ status: "active" | "completed" | "failed" | "paused";
300
+ id: string;
301
+ purpose: string;
100
302
  createdAt: string;
101
303
  updatedAt: string;
102
- }
304
+ teamId: string;
305
+ cadenceSeconds: number;
306
+ lastRunId: string | null;
307
+ nextRunAt: string;
308
+ stateVersion: number;
309
+ intent?: any;
310
+ }>;
311
+ export type CapacityWorkdayScheduleRecord = z.infer<typeof workdayScheduleSchema>;
@@ -0,0 +1,19 @@
1
+ import { z } from "zod";
2
+ import { leaseSchema } from "../assignments/agent-execution.js";
3
+ import { workdayIntentSchema } from "../../../../operator-contracts/workday-lifecycle.js";
4
+ const workdayScheduleSchema = z.object({
5
+ id: leaseSchema.shape.id,
6
+ teamId: leaseSchema.shape.id,
7
+ status: z.enum(["active", "paused", "completed", "failed"]),
8
+ purpose: z.string(),
9
+ cadenceSeconds: z.number().int().min(60),
10
+ intent: workdayIntentSchema,
11
+ lastRunId: z.string().nullable(),
12
+ nextRunAt: leaseSchema.shape.acquiredAt,
13
+ stateVersion: z.number().int().positive(),
14
+ createdAt: leaseSchema.shape.acquiredAt,
15
+ updatedAt: leaseSchema.shape.acquiredAt
16
+ }).strict();
17
+ export {
18
+ workdayScheduleSchema
19
+ };
@@ -47,15 +47,15 @@ export declare const agentTeamClonePlanSchema: z.ZodObject<{
47
47
  commit: z.ZodString;
48
48
  }, "strict", z.ZodTypeAny, {
49
49
  name: string;
50
- slug: string;
51
- repository: string;
52
50
  commit: string;
51
+ repository: string;
52
+ slug: string;
53
53
  projectId: string;
54
54
  }, {
55
55
  name: string;
56
- slug: string;
57
- repository: string;
58
56
  commit: string;
57
+ repository: string;
58
+ slug: string;
59
59
  projectId: string;
60
60
  }>;
61
61
  targets: z.ZodArray<z.ZodObject<{
@@ -84,82 +84,82 @@ export declare const agentTeamClonePlanSchema: z.ZodObject<{
84
84
  }>, "many">;
85
85
  }, "strict", z.ZodTypeAny, {
86
86
  name: string;
87
- slug: string;
88
- repository: string;
89
- commit: string;
90
- action: "noop" | "create" | "update";
91
- projectId: string;
92
87
  definitions: {
93
88
  path: string;
94
89
  agentClass: string;
95
90
  desiredDigest: string;
96
91
  sourceDigest: string;
97
92
  }[];
98
- }, {
99
- name: string;
100
- slug: string;
101
- repository: string;
102
93
  commit: string;
103
- action: "noop" | "create" | "update";
94
+ repository: string;
95
+ slug: string;
104
96
  projectId: string;
97
+ action: "create" | "update" | "noop";
98
+ }, {
99
+ name: string;
105
100
  definitions: {
106
101
  path: string;
107
102
  agentClass: string;
108
103
  desiredDigest: string;
109
104
  sourceDigest: string;
110
105
  }[];
106
+ commit: string;
107
+ repository: string;
108
+ slug: string;
109
+ projectId: string;
110
+ action: "create" | "update" | "noop";
111
111
  }>, "many">;
112
112
  digest: z.ZodString;
113
113
  }, "strict", z.ZodTypeAny, {
114
114
  schemaVersion: "treeseed.agent-team-clone-plan/v1";
115
- targets: {
115
+ source: {
116
116
  name: string;
117
- slug: string;
118
- repository: string;
119
117
  commit: string;
120
- action: "noop" | "create" | "update";
118
+ repository: string;
119
+ slug: string;
121
120
  projectId: string;
121
+ };
122
+ teamId: string;
123
+ digest: string;
124
+ targets: {
125
+ name: string;
122
126
  definitions: {
123
127
  path: string;
124
128
  agentClass: string;
125
129
  desiredDigest: string;
126
130
  sourceDigest: string;
127
131
  }[];
132
+ commit: string;
133
+ repository: string;
134
+ slug: string;
135
+ projectId: string;
136
+ action: "create" | "update" | "noop";
128
137
  }[];
129
- digest: string;
130
- teamId: string;
138
+ }, {
139
+ schemaVersion: "treeseed.agent-team-clone-plan/v1";
131
140
  source: {
132
141
  name: string;
133
- slug: string;
134
- repository: string;
135
142
  commit: string;
143
+ repository: string;
144
+ slug: string;
136
145
  projectId: string;
137
146
  };
138
- }, {
139
- schemaVersion: "treeseed.agent-team-clone-plan/v1";
147
+ teamId: string;
148
+ digest: string;
140
149
  targets: {
141
150
  name: string;
142
- slug: string;
143
- repository: string;
144
- commit: string;
145
- action: "noop" | "create" | "update";
146
- projectId: string;
147
151
  definitions: {
148
152
  path: string;
149
153
  agentClass: string;
150
154
  desiredDigest: string;
151
155
  sourceDigest: string;
152
156
  }[];
153
- }[];
154
- digest: string;
155
- teamId: string;
156
- source: {
157
- name: string;
158
- slug: string;
159
- repository: string;
160
157
  commit: string;
158
+ repository: string;
159
+ slug: string;
161
160
  projectId: string;
162
- };
161
+ action: "create" | "update" | "noop";
162
+ }[];
163
163
  }>;
164
164
  export declare const agentTeamCloneReceiptSchema: z.ZodObject<{
165
165
  schemaVersion: z.ZodLiteral<"treeseed.agent-team-clone-receipt/v1">;
@@ -174,43 +174,43 @@ export declare const agentTeamCloneReceiptSchema: z.ZodObject<{
174
174
  commit: z.ZodString;
175
175
  definitionCount: z.ZodNumber;
176
176
  }, "strict", z.ZodTypeAny, {
177
- repository: string;
178
177
  commit: string;
179
- action: "noop" | "created" | "updated";
178
+ repository: string;
180
179
  projectId: string;
180
+ action: "created" | "noop" | "updated";
181
181
  definitionCount: number;
182
182
  }, {
183
- repository: string;
184
183
  commit: string;
185
- action: "noop" | "created" | "updated";
184
+ repository: string;
186
185
  projectId: string;
186
+ action: "created" | "noop" | "updated";
187
187
  definitionCount: number;
188
188
  }>, "many">;
189
189
  }, "strict", z.ZodTypeAny, {
190
190
  schemaVersion: "treeseed.agent-team-clone-receipt/v1";
191
+ teamId: string;
191
192
  targets: {
192
- repository: string;
193
193
  commit: string;
194
- action: "noop" | "created" | "updated";
194
+ repository: string;
195
195
  projectId: string;
196
+ action: "created" | "noop" | "updated";
196
197
  definitionCount: number;
197
198
  }[];
198
199
  noop: boolean;
199
200
  planDigest: string;
200
- teamId: string;
201
201
  mutation: boolean;
202
202
  }, {
203
203
  schemaVersion: "treeseed.agent-team-clone-receipt/v1";
204
+ teamId: string;
204
205
  targets: {
205
- repository: string;
206
206
  commit: string;
207
- action: "noop" | "created" | "updated";
207
+ repository: string;
208
208
  projectId: string;
209
+ action: "created" | "noop" | "updated";
209
210
  definitionCount: number;
210
211
  }[];
211
212
  noop: boolean;
212
213
  planDigest: string;
213
- teamId: string;
214
214
  mutation: boolean;
215
215
  }>;
216
216
  export type AgentTeamCloneRequest = z.infer<typeof agentTeamCloneRequestSchema>;
@@ -1,3 +1,122 @@
1
+ import { z } from 'zod';
2
+ /** An exact governed registration, not mutable class metadata or an issued assignment. */
3
+ export declare const agentRegistrationSchema: z.ZodObject<{
4
+ schemaVersion: z.ZodLiteral<"treeseed.agent-registration/v1">;
5
+ id: z.ZodString;
6
+ teamId: z.ZodString;
7
+ projectIds: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
8
+ agentClass: z.ZodString;
9
+ profileRef: z.ZodEffects<z.ZodObject<{
10
+ store: z.ZodEnum<["treedx", "postgresql", "git", "url"]>;
11
+ model: z.ZodString;
12
+ id: z.ZodString;
13
+ revision: z.ZodOptional<z.ZodNumber>;
14
+ digest: z.ZodOptional<z.ZodString>;
15
+ repository: z.ZodOptional<z.ZodString>;
16
+ commit: z.ZodOptional<z.ZodString>;
17
+ path: z.ZodOptional<z.ZodString>;
18
+ anchor: z.ZodOptional<z.ZodString>;
19
+ startLine: z.ZodOptional<z.ZodNumber>;
20
+ endLine: z.ZodOptional<z.ZodNumber>;
21
+ url: z.ZodOptional<z.ZodString>;
22
+ }, "strict", z.ZodTypeAny, {
23
+ id: string;
24
+ model: string;
25
+ store: "treedx" | "git" | "postgresql" | "url";
26
+ path?: string | undefined;
27
+ anchor?: string | undefined;
28
+ commit?: string | undefined;
29
+ repository?: string | undefined;
30
+ revision?: number | undefined;
31
+ digest?: string | undefined;
32
+ url?: string | undefined;
33
+ startLine?: number | undefined;
34
+ endLine?: number | undefined;
35
+ }, {
36
+ id: string;
37
+ model: string;
38
+ store: "treedx" | "git" | "postgresql" | "url";
39
+ path?: string | undefined;
40
+ anchor?: string | undefined;
41
+ commit?: string | undefined;
42
+ repository?: string | undefined;
43
+ revision?: number | undefined;
44
+ digest?: string | undefined;
45
+ url?: string | undefined;
46
+ startLine?: number | undefined;
47
+ endLine?: number | undefined;
48
+ }>, {
49
+ id: string;
50
+ model: string;
51
+ store: "treedx" | "git" | "postgresql" | "url";
52
+ path?: string | undefined;
53
+ anchor?: string | undefined;
54
+ commit?: string | undefined;
55
+ repository?: string | undefined;
56
+ revision?: number | undefined;
57
+ digest?: string | undefined;
58
+ url?: string | undefined;
59
+ startLine?: number | undefined;
60
+ endLine?: number | undefined;
61
+ }, {
62
+ id: string;
63
+ model: string;
64
+ store: "treedx" | "git" | "postgresql" | "url";
65
+ path?: string | undefined;
66
+ anchor?: string | undefined;
67
+ commit?: string | undefined;
68
+ repository?: string | undefined;
69
+ revision?: number | undefined;
70
+ digest?: string | undefined;
71
+ url?: string | undefined;
72
+ startLine?: number | undefined;
73
+ endLine?: number | undefined;
74
+ }>;
75
+ active: z.ZodBoolean;
76
+ }, "strict", z.ZodTypeAny, {
77
+ id: string;
78
+ active: boolean;
79
+ schemaVersion: "treeseed.agent-registration/v1";
80
+ agentClass: string;
81
+ teamId: string;
82
+ profileRef: {
83
+ id: string;
84
+ model: string;
85
+ store: "treedx" | "git" | "postgresql" | "url";
86
+ path?: string | undefined;
87
+ anchor?: string | undefined;
88
+ commit?: string | undefined;
89
+ repository?: string | undefined;
90
+ revision?: number | undefined;
91
+ digest?: string | undefined;
92
+ url?: string | undefined;
93
+ startLine?: number | undefined;
94
+ endLine?: number | undefined;
95
+ };
96
+ projectIds: string[];
97
+ }, {
98
+ id: string;
99
+ active: boolean;
100
+ schemaVersion: "treeseed.agent-registration/v1";
101
+ agentClass: string;
102
+ teamId: string;
103
+ profileRef: {
104
+ id: string;
105
+ model: string;
106
+ store: "treedx" | "git" | "postgresql" | "url";
107
+ path?: string | undefined;
108
+ anchor?: string | undefined;
109
+ commit?: string | undefined;
110
+ repository?: string | undefined;
111
+ revision?: number | undefined;
112
+ digest?: string | undefined;
113
+ url?: string | undefined;
114
+ startLine?: number | undefined;
115
+ endLine?: number | undefined;
116
+ };
117
+ projectIds: string[];
118
+ }>;
119
+ export type AgentRegistration = z.infer<typeof agentRegistrationSchema>;
1
120
  export type ProjectAgentClassStatus = 'active' | 'paused' | 'archived';
2
121
  export interface ProjectAgentClass {
3
122
  id: string;
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+ import { exactEntityReferenceSchema, leaseSchema } from "../../capacity/assignments/agent-execution.js";
3
+ import { agentClassSchema } from "../../../validation/agent-definition-schema.js";
4
+ import { uniqueArray } from "../../../../content/validation/schema-constraints.js";
5
+ const agentRegistrationSchema = z.object({
6
+ schemaVersion: z.literal("treeseed.agent-registration/v1"),
7
+ id: leaseSchema.shape.id,
8
+ teamId: leaseSchema.shape.id,
9
+ projectIds: uniqueArray(z.array(leaseSchema.shape.id).min(1)),
10
+ agentClass: agentClassSchema,
11
+ profileRef: exactEntityReferenceSchema,
12
+ active: z.boolean()
13
+ }).strict();
14
+ export {
15
+ agentRegistrationSchema
16
+ };