@treeseed/sdk 0.13.0-rc.121 → 0.13.0-rc.123

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 (157) hide show
  1. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +2365 -1275
  2. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +94 -28
  3. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +38 -38
  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 +2 -59
  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 +2 -4
  10. package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.js +22 -16
  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 +244 -85
  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 +216 -70
  16. package/dist/agent-capacity/contracts/capacity/workdays/workday-records.js +19 -0
  17. package/dist/agent-capacity/contracts/configuration/configuration.d.ts +1 -1
  18. package/dist/agent-capacity/contracts/configuration/configuration.js +0 -2
  19. package/dist/agent-capacity/contracts/operations/agent-team-clone.d.ts +55 -55
  20. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +119 -23
  21. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.js +16 -0
  22. package/dist/agent-capacity/contracts/runtime/runtime-observability.d.ts +2 -154
  23. package/dist/agent-capacity/contracts/support/agent-atlas.d.ts +0 -13
  24. package/dist/agent-capacity/contracts/support/execution-graph.d.ts +496 -292
  25. package/dist/agent-capacity/contracts/support/execution-graph.js +21 -19
  26. package/dist/agent-capacity/contracts/support/financial-records.d.ts +3 -6
  27. package/dist/agent-capacity/contracts/support/planning-records.d.ts +1 -87
  28. package/dist/agent-capacity/grant.d.ts +34 -0
  29. package/dist/agent-capacity/grant.js +4 -0
  30. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +1178 -1152
  31. package/dist/agent-capacity/validation/agent-definition-schema.js +21 -28
  32. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +10 -10
  33. package/dist/agent-capacity/validation/agent-lab-forensics-schema.js +0 -1
  34. package/dist/agent-capacity/validation/assignment-records.d.ts +1 -6
  35. package/dist/agent-capacity/validation/assignment-records.js +49 -35
  36. package/dist/agent-capacity/validation/configuration.d.ts +1 -1
  37. package/dist/agent-capacity/validation/configuration.js +2 -6
  38. package/dist/agent-capacity/validation/grant.d.ts +11 -0
  39. package/dist/agent-capacity/validation/grant.js +31 -0
  40. package/dist/capacity/agents/agent-capacity.d.ts +3 -4
  41. package/dist/capacity/agents/agent-capacity.js +2 -3
  42. package/dist/capacity-provider/capability-ontology.d.ts +150 -150
  43. package/dist/capacity-provider/client.d.ts +15 -9
  44. package/dist/capacity-provider/client.js +1 -10
  45. package/dist/capacity-provider/contracts/capacity-facts.d.ts +0 -1
  46. package/dist/capacity-provider/contracts/environment-profiles.d.ts +44 -44
  47. package/dist/capacity-provider/contracts/governance.d.ts +2 -17
  48. package/dist/capacity-provider/contracts/index.d.ts +2 -0
  49. package/dist/capacity-provider/contracts/index.js +2 -0
  50. package/dist/capacity-provider/core-capability-catalog.d.ts +7 -7
  51. package/dist/capacity-provider/environment-catalog.d.ts +188 -188
  52. package/dist/capacity-provider/environment-catalog.js +1 -1
  53. package/dist/capacity-provider/install-configuration.d.ts +2 -2
  54. package/dist/capacity-provider/sandbox-contracts.d.ts +92 -92
  55. package/dist/capacity-provider/source-workspace.d.ts +166 -68
  56. package/dist/capacity-provider/source-workspace.js +5 -1
  57. package/dist/capacity-provider/validation.d.ts +10 -2
  58. package/dist/capacity-provider/validation.js +52 -22
  59. package/dist/content/validation/agent-operational-content-schemas.d.ts +144 -142
  60. package/dist/content/validation/agent-operational-content-schemas.js +2 -0
  61. package/dist/content/validation/auxiliary-content-schemas.d.ts +158 -158
  62. package/dist/content/validation/content-model-schemas.d.ts +9105 -5295
  63. package/dist/content/validation/content-model-schemas.js +192 -115
  64. package/dist/content/validation/portable-content-data.d.ts +411 -238
  65. package/dist/content/validation/portable-content-data.js +6 -1
  66. package/dist/content/validation/schema-constraints.d.ts +78 -0
  67. package/dist/content/validation/schema-constraints.js +149 -0
  68. package/dist/deployment/ai/storage.d.ts +24 -24
  69. package/dist/deployment/ai-hosting.d.ts +18 -18
  70. package/dist/deployment/ai-instance.d.ts +16 -16
  71. package/dist/deployment/ai-mode.d.ts +92 -92
  72. package/dist/deployment/hosted-topology-template.d.ts +44 -44
  73. package/dist/deployment/hosted-topology.d.ts +335 -335
  74. package/dist/deployment/postgres/contracts.d.ts +52 -52
  75. package/dist/deployment/postgres/transfer.d.ts +6 -6
  76. package/dist/deployment/schemas.d.ts +1114 -1114
  77. package/dist/development/schemas.d.ts +633 -633
  78. package/dist/graph/context-query-contracts.js +1 -1
  79. package/dist/guarantees/index.d.ts +26 -2
  80. package/dist/identity/contracts.js +6 -1
  81. package/dist/knowledge/contracts.d.ts +9 -2
  82. package/dist/knowledge/contracts.js +2 -2
  83. package/dist/model-registry/discussion-models.js +0 -1
  84. package/dist/operator-contracts/canonical-command-tree.js +25 -9
  85. package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +29 -29
  86. package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +30 -30
  87. package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +15 -13
  88. package/dist/operator-contracts/catalog/communication-operations.d.ts +176 -158
  89. package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +67 -67
  90. package/dist/operator-contracts/catalog/inbox-operations.d.ts +65 -65
  91. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +6 -6
  92. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +2 -1
  93. package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +10 -10
  94. package/dist/operator-contracts/catalog/provider-environment-operations.d.ts +3 -3
  95. package/dist/operator-contracts/catalog/services/secret-operations.d.ts +16 -8
  96. package/dist/operator-contracts/catalog/services/secret-operations.js +2 -1
  97. package/dist/operator-contracts/catalog/workdays/profile-operations.d.ts +11 -11
  98. package/dist/operator-contracts/catalog/workdays/selection-commands.js +3 -0
  99. package/dist/operator-contracts/communication/contracts.d.ts +537 -395
  100. package/dist/operator-contracts/communication/contracts.js +6 -1
  101. package/dist/operator-contracts/control-plane-operation.d.ts +7 -0
  102. package/dist/operator-contracts/control-plane-operation.js +6 -0
  103. package/dist/operator-contracts/control-plane-operations.d.ts +631 -610
  104. package/dist/operator-contracts/control-plane-operations.js +26 -12
  105. package/dist/operator-contracts/inbox/contracts.d.ts +229 -229
  106. package/dist/operator-contracts/knowledge/contracts.d.ts +16 -16
  107. package/dist/operator-contracts/mcp.js +4 -3
  108. package/dist/operator-contracts/workday-lifecycle.d.ts +192 -0
  109. package/dist/operator-contracts/workday-lifecycle.js +109 -45
  110. package/dist/platform/agent-schema-verification.d.ts +3 -0
  111. package/dist/platform/agent-schema-verification.js +377 -0
  112. package/dist/platform/contracts.d.ts +72 -72
  113. package/dist/platform/schemas.d.ts +144 -36
  114. package/dist/platform/schemas.js +26 -0
  115. package/dist/platform/verification.js +10 -0
  116. package/dist/sdk-types/support/planning-policy.d.ts +1 -1
  117. package/dist/sdk-types/support/sdk-search-request.d.ts +2 -2
  118. package/dist/secrets-capability/secret-contracts.d.ts +2 -2
  119. package/dist/secrets-capability/shared-access.d.ts +3 -3
  120. package/dist/secrets-capability/shared-resources.d.ts +50 -50
  121. package/dist/secrets-capability/vault-contracts.d.ts +2 -2
  122. package/dist/security/encrypted-envelope.d.ts +14 -14
  123. package/dist/treedx/client.d.ts +4 -4
  124. package/dist/treedx/index.d.ts +1 -1
  125. package/dist/treedx/index.js +1 -0
  126. package/dist/treedx/types.d.ts +286 -0
  127. package/dist/treedx/types.js +44 -0
  128. package/guarantees/agent/golden/component-boundaries.guarantee.yaml +12 -0
  129. package/guarantees/agent/golden/product-custody.guarantee.yaml +12 -0
  130. package/guarantees/agent/golden/product.guarantee.yaml +12 -0
  131. package/guarantees/agent/golden/scenes/component-boundaries.scene.yaml +837 -0
  132. package/guarantees/agent/golden/scenes/product-custody.scene.yaml +53 -0
  133. package/guarantees/agent/golden/scenes/product.scene.yaml +8 -0
  134. package/guarantees/verifiers/golden.verifiers.yaml +1429 -0
  135. package/package.json +9 -3
  136. package/tests/acceptance/golden-product.test.ts +205 -0
  137. package/tests/acceptance/golden-product.ts +404 -0
  138. package/tests/acceptance/product/base-red.ts +73 -0
  139. package/tests/acceptance/product/documentation-examples.ts +68 -0
  140. package/tests/acceptance/product/intent-runtime.ts +145 -0
  141. package/tests/acceptance/product/release-output.ts +160 -0
  142. package/tests/acceptance/product/research-artifact.ts +87 -0
  143. package/tests/acceptance/product/research-revision.ts +82 -0
  144. package/tests/acceptance/product/research-source.ts +91 -0
  145. package/tests/acceptance/product/test-chain.ts +192 -0
  146. package/treeseed.package.yaml +147 -0
  147. package/dist/.treeseed-build-complete.json +0 -1
  148. package/dist/agent-capacity/allocation.d.ts +0 -183
  149. package/dist/agent-capacity/allocation.js +0 -5
  150. package/dist/agent-capacity/artifact-mutation-receipt.d.ts +0 -49
  151. package/dist/agent-capacity/artifact-mutation-receipt.js +0 -36
  152. package/dist/agent-capacity/artifacts.d.ts +0 -123
  153. package/dist/agent-capacity/artifacts.js +0 -39
  154. package/dist/agent-capacity/contracts/support/decision-work.d.ts +0 -227
  155. package/dist/agent-capacity/contracts/support/decision-work.js +0 -0
  156. package/dist/agent-capacity/validation/allocation.d.ts +0 -12
  157. package/dist/agent-capacity/validation/allocation.js +0 -115
@@ -27,13 +27,13 @@ export declare const agentTeamCloneDefinitionSchema: z.ZodObject<{
27
27
  desiredDigest: z.ZodString;
28
28
  }, "strict", z.ZodTypeAny, {
29
29
  path: string;
30
- desiredDigest: string;
31
30
  agentClass: string;
31
+ desiredDigest: string;
32
32
  sourceDigest: string;
33
33
  }, {
34
34
  path: string;
35
- desiredDigest: string;
36
35
  agentClass: string;
36
+ desiredDigest: string;
37
37
  sourceDigest: string;
38
38
  }>;
39
39
  export declare const agentTeamClonePlanSchema: z.ZodObject<{
@@ -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<{
@@ -73,93 +73,93 @@ export declare const agentTeamClonePlanSchema: z.ZodObject<{
73
73
  desiredDigest: z.ZodString;
74
74
  }, "strict", z.ZodTypeAny, {
75
75
  path: string;
76
- desiredDigest: string;
77
76
  agentClass: string;
77
+ desiredDigest: string;
78
78
  sourceDigest: string;
79
79
  }, {
80
80
  path: string;
81
- desiredDigest: string;
82
81
  agentClass: string;
82
+ desiredDigest: string;
83
83
  sourceDigest: string;
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
- desiredDigest: string;
95
89
  agentClass: string;
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
- desiredDigest: string;
108
102
  agentClass: string;
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
- desiredDigest: string;
125
128
  agentClass: string;
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
- desiredDigest: string;
150
153
  agentClass: string;
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,23 +1,123 @@
1
- import type { AgentExecutionMode } from '../../capacity/assignments/assignment-records.js';
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>;
2
120
  export type ProjectAgentClassStatus = 'active' | 'paused' | 'archived';
3
- export interface AgentKernelProfile {
4
- id?: string;
5
- name?: string;
6
- defaultMode?: AgentExecutionMode;
7
- allowedModes?: AgentExecutionMode[];
8
- planningBudgetPercent?: number;
9
- actingBudgetPercent?: number;
10
- maxConcurrentModeRuns?: number;
11
- fallbackMode?: AgentExecutionMode | null;
12
- metadata?: Record<string, unknown>;
13
- }
14
- export interface AgentKernelPolicy {
15
- modeSelection?: Record<string, unknown>;
16
- budgetSplit?: Record<string, unknown>;
17
- fallback?: Record<string, unknown>;
18
- outputValidation?: Record<string, unknown>;
19
- metadata?: Record<string, unknown>;
20
- }
21
121
  export interface ProjectAgentClass {
22
122
  id: string;
23
123
  teamId: string;
@@ -25,11 +125,7 @@ export interface ProjectAgentClass {
25
125
  slug: string;
26
126
  name: string;
27
127
  status: ProjectAgentClassStatus;
28
- allowedModes: AgentExecutionMode[];
29
- kernelProfile: AgentKernelProfile;
30
- kernelPolicy: AgentKernelPolicy;
31
128
  handlerRefs: Record<string, unknown>;
32
- outputContracts: Record<string, unknown>;
33
129
  metadata?: Record<string, unknown>;
34
130
  createdAt?: string;
35
131
  updatedAt?: 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
+ };
@@ -1,104 +1,14 @@
1
1
  import type { CapacityPageInfo } from '../../../capacity/capacity-core/capacity-pagination.js';
2
2
  import type { ExecutionCapabilityDemand, ExecutionCapabilitySupply } from '../../../types/agents.js';
3
- import type { AgentCapacityEnvelope, AgentExecutionMode, AgentModeRun, AgentModeRunUsageSettlement, DecisionExecutionInput, ProviderAssignment, ProviderAssignmentSynthesisSource, TreeDxProxyHandle, WorkdayCapacityEnvelope } from '../capacity/assignments/assignment-records.js';
4
- import type { AgentKernelPolicy, AgentKernelProfile, ProjectAgentClass } from '../projects/agents/project-agent-class.js';
5
- import type { CapacityLedgerEntry, CapacityReservation, CapacityUsageActual } from '../support/financial-records.js';
6
- import type { DecisionPlanningStatus, WorkdayCapacityEnvelopeRecord } from '../support/planning-records.js';
7
- export type AgentKernelModeExecutionStatus = 'completed' | 'waiting' | 'failed' | 'returned';
3
+ import type { AgentExecutionMode, ProviderAssignment, ProviderAssignmentSynthesisSource, TreeDxProxyHandle } from '../capacity/assignments/assignment-records.js';
4
+ import type { CapacityLedgerEntry } from '../support/financial-records.js';
8
5
  export type AgentKernelModeFallbackCode = 'assignment_missing_project_or_agent' | 'assignment_governance_provenance_missing' | 'assignment_lease_expired' | 'assignment_mode_not_allowed' | 'assignment_missing_capacity_envelope' | 'assignment_missing_decision_input' | 'assignment_handler_failed' | 'assignment_project_not_synced' | 'assignment_agent_not_found' | 'assignment_insufficient_capability' | 'assignment_decision_not_ready' | 'assignment_capacity_plan_not_accepted' | 'assignment_capacity_not_reserved' | 'assignment_capability_handle_invalid' | 'assignment_capability_handle_secret_material' | 'assignment_capability_handle_write_not_ready' | 'assignment_capability_handle_workspace_denied' | 'assignment_repository_ref_scope_invalid' | 'assignment_workflow_operation_denied' | 'assignment_eligibility_capability_mismatch' | 'assignment_retry_policy_exceeded' | 'assignment_treedx_proxy_scope_invalid' | 'assignment_fallback_quota_exceeded' | 'assignment_output_invalid';
9
- export interface AgentCapacityPlan {
10
- teamId: string;
11
- projectId: string;
12
- environment: string;
13
- allocationSetId?: string | null;
14
- workday: WorkdayCapacityEnvelope;
15
- assignableProviders: Array<{
16
- capacityProviderId: string;
17
- executionProviderId?: string | null;
18
- availableAgentSeconds?: number | null;
19
- reasons?: string[];
20
- metadata?: Record<string, unknown>;
21
- }>;
22
- metadata?: Record<string, unknown>;
23
- }
24
6
  export interface AgentKernelModeFallback {
25
7
  code: AgentKernelModeFallbackCode | string;
26
8
  reason: string;
27
9
  retryable: boolean;
28
10
  metadata?: Record<string, unknown>;
29
11
  }
30
- export interface AgentKernelModeExecutionInput {
31
- assignment: ProviderAssignment;
32
- modeRunId?: string | null;
33
- projectAgentClass?: ProjectAgentClass | null;
34
- kernelProfile?: AgentKernelProfile | null;
35
- kernelPolicy?: AgentKernelPolicy | null;
36
- capacityEnvelope?: AgentCapacityEnvelope | null;
37
- decisionInput?: DecisionExecutionInput | null;
38
- leaseToken?: string | null;
39
- runnerId?: string | null;
40
- readiness?: DecisionPlanningStatus | null;
41
- treedxProxyHandle?: TreeDxProxyHandle | null;
42
- now?: string | Date;
43
- metadata?: Record<string, unknown>;
44
- }
45
- export interface AgentKernelModeExecutionResult {
46
- status: AgentKernelModeExecutionStatus;
47
- mode: AgentExecutionMode;
48
- assignmentId: string;
49
- projectId: string;
50
- projectAgentClassId: string;
51
- agentId?: string | null;
52
- handlerId?: string | null;
53
- summary: string;
54
- outputs?: Record<string, unknown>;
55
- selectedInput: Record<string, unknown>;
56
- capacityEnvelope: AgentCapacityEnvelope;
57
- traceRefs?: Record<string, unknown>;
58
- usageActual?: AgentModeRunUsageSettlement | Record<string, unknown> | null;
59
- artifactManifest?: import('../../artifacts.js').AgentArtifactManifest | null;
60
- fallback?: AgentKernelModeFallback | null;
61
- metadata?: Record<string, unknown>;
62
- }
63
- export interface AgentKernelQueueObservation {
64
- planningReady?: number | null;
65
- actingReady?: number | null;
66
- fallbackReady?: number | null;
67
- planningBudgetSeconds?: number | null;
68
- actingBudgetSeconds?: number | null;
69
- modePreference?: AgentExecutionMode | 'fallback' | null;
70
- metadata?: Record<string, unknown>;
71
- }
72
- export interface AgentKernelModeDecision {
73
- kind: 'mode' | 'fallback' | 'idle';
74
- mode?: AgentExecutionMode | null;
75
- reason: string;
76
- metadata?: Record<string, unknown>;
77
- }
78
- export interface AgentKernelOutputValidationResult {
79
- ok: boolean;
80
- reason?: string | null;
81
- metadata?: Record<string, unknown>;
82
- }
83
- export interface ProviderAssignmentSynthesisCandidate {
84
- id?: string;
85
- teamId: string;
86
- projectId: string;
87
- capacityProviderId: string;
88
- executionProviderId?: string | null;
89
- projectAgentClassId: string;
90
- mode: AgentExecutionMode;
91
- source: ProviderAssignmentSynthesisSource | string;
92
- sourceId: string;
93
- synthesisKey: string;
94
- priority?: number | null;
95
- readiness?: DecisionPlanningStatus | null;
96
- capacityEnvelope: AgentCapacityEnvelope;
97
- decisionInput: DecisionExecutionInput;
98
- workspaceContext?: Record<string, unknown>;
99
- explanation?: ProviderAssignmentExplanation | Record<string, unknown>;
100
- metadata?: Record<string, unknown>;
101
- }
102
12
  export interface ProviderAssignmentExplanation {
103
13
  id?: string;
104
14
  teamId: string;
@@ -197,7 +107,6 @@ export interface CapacityRuntimeDiagnosticsResponse {
197
107
  generatedAt: string;
198
108
  assignments: ProviderAssignment[];
199
109
  explanations: ProviderAssignmentExplanation[];
200
- modeRuns: AgentModeRun[];
201
110
  treeDxProxyAudit: Array<Record<string, unknown>>;
202
111
  ledgerEntries: CapacityLedgerEntry[];
203
112
  fallbackOutputs: Array<Record<string, unknown>>;
@@ -206,9 +115,6 @@ export interface CapacityRuntimeDiagnosticsResponse {
206
115
  assignments: CapacityPageInfo & {
207
116
  total: number;
208
117
  };
209
- modeRuns: CapacityPageInfo & {
210
- total: number;
211
- };
212
118
  treeDxProxyAudit: CapacityPageInfo & {
213
119
  total: number;
214
120
  };
@@ -275,61 +181,3 @@ export interface AgentFallbackOutput {
275
181
  metadata?: Record<string, unknown>;
276
182
  createdAt?: string;
277
183
  }
278
- export interface CapacitySettlementSummary {
279
- id?: string;
280
- teamId: string;
281
- projectId?: string | null;
282
- workDayId?: string | null;
283
- allocationSetId?: string | null;
284
- policyVersion?: string | null;
285
- requestedSeconds: number;
286
- reservedSeconds: number;
287
- activeSeconds: number;
288
- elapsedSeconds: number;
289
- releasedSeconds: number;
290
- overrunSeconds: number;
291
- nativeUsage: Record<string, unknown>;
292
- providerConfidence: 'high' | 'medium' | 'low' | 'blocked' | string;
293
- warnings: string[];
294
- metadata?: Record<string, unknown>;
295
- createdAt?: string;
296
- }
297
- export interface CapacityEvidenceWindow<T> {
298
- items: T[];
299
- page: CapacityPageInfo;
300
- total: number;
301
- }
302
- export interface WorkdayCapacitySummaryTotals {
303
- assignments: {
304
- total: number;
305
- pending: number;
306
- leased: number;
307
- completed: number;
308
- failed: number;
309
- returned: number;
310
- cancelled: number;
311
- };
312
- modeRuns: {
313
- total: number;
314
- queued: number;
315
- running: number;
316
- succeeded: number;
317
- failed: number;
318
- usageReported: number;
319
- };
320
- reservations: number;
321
- usageActuals: number;
322
- ledgerEntries: number;
323
- }
324
- export interface WorkdayCapacitySummaryPayload {
325
- workday: WorkdayCapacityEnvelopeRecord;
326
- totals: WorkdayCapacitySummaryTotals;
327
- settlement: CapacitySettlementSummary;
328
- evidence: {
329
- assignments?: CapacityEvidenceWindow<ProviderAssignment>;
330
- modeRuns?: CapacityEvidenceWindow<AgentModeRun>;
331
- reservations?: CapacityEvidenceWindow<CapacityReservation>;
332
- usageActuals?: CapacityEvidenceWindow<CapacityUsageActual>;
333
- ledgerEntries?: CapacityEvidenceWindow<CapacityLedgerEntry>;
334
- } | null;
335
- }
@@ -1,4 +1,3 @@
1
- import type { DecisionAssignmentGraphEdge, DecisionAssignmentGraphNode } from "./decision-work.js";
2
1
  export declare const AGENT_ATLAS_TOPOLOGY_CONTRACT: "treeseed.agent-atlas-topology/v1";
3
2
  export declare const agentAtlasSizingMetrics: readonly ["activity", "queue", "executions", "artifacts", "cost", "attention"];
4
3
  export type AgentAtlasSizingMetric = (typeof agentAtlasSizingMetrics)[number];
@@ -170,16 +169,4 @@ export interface AgentAtlasContextReference {
170
169
  path?: string;
171
170
  digest?: string;
172
171
  }
173
- export interface AgentAtlasAssignmentGraphProjection {
174
- id: string;
175
- projectId: string;
176
- decisionId: string;
177
- proposalId: string | null;
178
- status: string;
179
- nodes: Array<DecisionAssignmentGraphNode & {
180
- assignmentIds: string[];
181
- progressPercent: number | null;
182
- }>;
183
- edges: DecisionAssignmentGraphEdge[];
184
- }
185
172
  export declare function isAgentAtlasContextReference(value: unknown): value is AgentAtlasContextReference;