@treeseed/sdk 0.13.0-rc.54 → 0.13.0-rc.56

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 (49) hide show
  1. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.d.ts +0 -2
  2. package/dist/agent-capacity/contracts/configuration/configuration.js +1 -1
  3. package/dist/agent-capacity/validation/activity-profile.js +18 -9
  4. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +715 -793
  5. package/dist/agent-capacity/validation/agent-definition-schema.js +8 -28
  6. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +12 -12
  7. package/dist/capacity-provider/capability-ontology.d.ts +1211 -0
  8. package/dist/capacity-provider/capability-ontology.js +200 -0
  9. package/dist/capacity-provider/client.d.ts +3 -3
  10. package/dist/capacity-provider/contracts/governance.d.ts +63 -1
  11. package/dist/capacity-provider/core-capability-catalog.d.ts +47 -0
  12. package/dist/capacity-provider/core-capability-catalog.js +63 -0
  13. package/dist/capacity-provider/environment-catalog.d.ts +877 -0
  14. package/dist/capacity-provider/environment-catalog.js +116 -0
  15. package/dist/capacity-provider/index.d.ts +4 -0
  16. package/dist/capacity-provider/index.js +4 -0
  17. package/dist/capacity-provider/sandbox-contracts.d.ts +543 -0
  18. package/dist/capacity-provider/sandbox-contracts.js +86 -0
  19. package/dist/capacity-provider/validation.d.ts +3 -1
  20. package/dist/capacity-provider/validation.js +56 -0
  21. package/dist/content/validation/agent-operational-content-schemas.d.ts +76 -76
  22. package/dist/content/validation/auxiliary-content-schemas.d.ts +16 -16
  23. package/dist/content/validation/content-model-schemas.d.ts +1462 -1605
  24. package/dist/content/validation/portable-content-data.d.ts +139 -152
  25. package/dist/deployment/ai-mode.d.ts +4 -4
  26. package/dist/deployment/schemas.d.ts +410 -92
  27. package/dist/deployment/schemas.js +23 -1
  28. package/dist/development/schemas.d.ts +22 -22
  29. package/dist/operator-contracts/canonical-command-tree.js +45 -0
  30. package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +164 -0
  31. package/dist/operator-contracts/catalog/capability-ontology-operations.js +24 -0
  32. package/dist/operator-contracts/catalog/communication-operations.d.ts +50 -50
  33. package/dist/operator-contracts/catalog/control-plane-catalog.d.ts +6 -0
  34. package/dist/operator-contracts/catalog/control-plane-catalog.js +18 -0
  35. package/dist/operator-contracts/catalog/inbox-operations.d.ts +25 -25
  36. package/dist/operator-contracts/communication/contracts.d.ts +139 -139
  37. package/dist/operator-contracts/control-plane-operations.d.ts +588 -420
  38. package/dist/operator-contracts/control-plane-operations.js +7 -10
  39. package/dist/operator-contracts/inbox/contracts.d.ts +77 -77
  40. package/dist/operator-contracts/index.d.ts +1 -0
  41. package/dist/operator-contracts/index.js +1 -0
  42. package/dist/security/encrypted-envelope.d.ts +177 -0
  43. package/dist/security/encrypted-envelope.js +34 -0
  44. package/dist/security/envelope-codec.d.ts +38 -0
  45. package/dist/security/envelope-codec.js +96 -0
  46. package/dist/security/index.d.ts +2 -0
  47. package/dist/security/index.js +2 -0
  48. package/dist/types/agents/agent-activity-profile.d.ts +15 -33
  49. package/package.json +5 -1
@@ -0,0 +1,116 @@
1
+ import { createHash, createPublicKey, verify } from "node:crypto";
2
+ import { z } from "zod";
3
+ const identifier = z.string().regex(/^[a-z][a-z0-9._-]{0,127}$/u);
4
+ const digest = z.string().regex(/^sha256:[a-f0-9]{64}$/u);
5
+ const version = z.string().regex(/^\d+\.\d+\.\d+$/u);
6
+ const sandboxEnvironmentContractSchema = z.object({
7
+ id: identifier,
8
+ version,
9
+ digest,
10
+ capabilities: z.array(identifier)
11
+ }).strict();
12
+ const provenance = z.object({
13
+ sourceRepository: z.string().url(),
14
+ sourceRevision: z.union([z.string().regex(/^[a-f0-9]{40}$/u), digest]),
15
+ buildRecipeDigest: digest,
16
+ sbomDigest: digest,
17
+ signature: z.object({ keyId: identifier, algorithm: z.enum(["Ed25519", "cosign"]), value: z.string().min(1) }).strict()
18
+ }).strict();
19
+ const sandboxEnvironmentCatalogEntrySchema = z.object({
20
+ id: identifier,
21
+ version,
22
+ kind: z.enum(["base", "extension"]),
23
+ contract: sandboxEnvironmentContractSchema,
24
+ image: z.object({ reference: z.string().min(1), digest, architectures: z.array(z.enum(["amd64", "arm64"])).min(1), operatingSystem: z.literal("linux") }).strict(),
25
+ derivedFrom: z.array(z.object({ entryId: identifier, version, imageDigest: digest }).strict()).min(1).nullable(),
26
+ provenance,
27
+ qualification: z.object({ suiteId: identifier, suiteVersion: version, evidenceDigest: digest, status: z.literal("passed"), completedAt: z.string().datetime() }).strict(),
28
+ status: z.enum(["active", "deprecated", "revoked"]),
29
+ createdAt: z.string().datetime()
30
+ }).strict().superRefine((entry, context) => {
31
+ if (new Set(entry.image.architectures).size !== entry.image.architectures.length) context.addIssue({ code: z.ZodIssueCode.custom, path: ["image", "architectures"], message: "Image architectures must be unique." });
32
+ if (entry.kind === "base" && entry.derivedFrom !== null) context.addIssue({ code: z.ZodIssueCode.custom, path: ["derivedFrom"], message: "Base environments cannot derive from another catalog entry." });
33
+ if (entry.kind === "extension" && entry.derivedFrom === null) context.addIssue({ code: z.ZodIssueCode.custom, path: ["derivedFrom"], message: "Extended environments require exact catalog bases." });
34
+ });
35
+ const sandboxEnvironmentCatalogSchema = z.object({
36
+ schemaVersion: z.literal("treeseed.sandbox-environment-catalog/v1"),
37
+ generation: z.number().int().positive(),
38
+ catalogDigest: digest,
39
+ rootPolicy: z.object({ allowedBaseImageDigests: z.array(digest).min(1) }).strict(),
40
+ entries: z.array(sandboxEnvironmentCatalogEntrySchema),
41
+ createdAt: z.string().datetime(),
42
+ signature: z.object({ keyId: identifier, algorithm: z.literal("Ed25519"), value: z.string().min(1) }).strict()
43
+ }).strict().superRefine((catalog, context) => {
44
+ const entries = new Map(catalog.entries.map((entry) => [`${entry.id}@${entry.version}`, entry]));
45
+ for (const [index, entry] of catalog.entries.entries()) {
46
+ if (entry.kind === "base" && !catalog.rootPolicy.allowedBaseImageDigests.includes(entry.image.digest)) context.addIssue({ code: z.ZodIssueCode.custom, path: ["entries", index, "image", "digest"], message: "Base image is not an allowed catalog root." });
47
+ if (entry.kind !== "extension" || !entry.derivedFrom) continue;
48
+ const parentArchitectures = /* @__PURE__ */ new Set();
49
+ for (const [parentIndex, reference] of entry.derivedFrom.entries()) {
50
+ const parent = entries.get(`${reference.entryId}@${reference.version}`);
51
+ if (!parent || parent.image.digest !== reference.imageDigest) {
52
+ context.addIssue({ code: z.ZodIssueCode.custom, path: ["entries", index, "derivedFrom", parentIndex], message: "Environment extension does not bind an exact entry in this catalog." });
53
+ continue;
54
+ }
55
+ const pending = [parent], seen = /* @__PURE__ */ new Set(), roots = [];
56
+ while (pending.length) {
57
+ const current = pending.pop(), key = `${current.id}@${current.version}`;
58
+ if (seen.has(key)) {
59
+ roots.length = 0;
60
+ break;
61
+ }
62
+ seen.add(key);
63
+ if (current.kind === "base") {
64
+ roots.push(current);
65
+ continue;
66
+ }
67
+ for (const ancestor of current.derivedFrom ?? []) {
68
+ const resolved = entries.get(`${ancestor.entryId}@${ancestor.version}`);
69
+ if (!resolved || resolved.image.digest !== ancestor.imageDigest) {
70
+ roots.length = 0;
71
+ pending.length = 0;
72
+ break;
73
+ }
74
+ pending.push(resolved);
75
+ }
76
+ }
77
+ if (!roots.length || roots.some((root) => !catalog.rootPolicy.allowedBaseImageDigests.includes(root.image.digest))) context.addIssue({ code: z.ZodIssueCode.custom, path: ["entries", index, "derivedFrom", parentIndex], message: "Environment extension does not resolve to an allowed catalog root." });
78
+ else for (const root of roots) for (const architecture of root.image.architectures) parentArchitectures.add(architecture);
79
+ }
80
+ for (const architecture of entry.image.architectures) if (!parentArchitectures.has(architecture)) context.addIssue({ code: z.ZodIssueCode.custom, path: ["entries", index, "derivedFrom"], message: `Environment extension has no allowed ${architecture} base.` });
81
+ }
82
+ });
83
+ const providerSandboxEnvironmentAvailabilitySchema = z.object({
84
+ schemaVersion: z.literal("treeseed.provider-sandbox-environments/v1"),
85
+ providerId: z.string().min(1),
86
+ catalogGeneration: z.number().int().positive(),
87
+ catalogDigest: digest,
88
+ entries: z.array(z.object({ entryId: identifier, version, contractDigest: digest, imageDigest: digest, status: z.enum(["pulling", "ready", "failed", "quarantined"]), checkedAt: z.string().datetime(), reason: z.string().min(1).nullable() }).strict())
89
+ }).strict();
90
+ function canonical(value) {
91
+ if (value === null || typeof value !== "object") return JSON.stringify(value);
92
+ if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
93
+ return `{${Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, item]) => `${JSON.stringify(key)}:${canonical(item)}`).join(",")}}`;
94
+ }
95
+ function sandboxEnvironmentCatalogDigest(value) {
96
+ return `sha256:${createHash("sha256").update(canonical(value)).digest("hex")}`;
97
+ }
98
+ function sandboxEnvironmentCatalogSigningBytes(value) {
99
+ return Buffer.from(canonical({ ...value, signature: { ...value.signature, value: "" } }));
100
+ }
101
+ function verifySandboxEnvironmentCatalog(value, publicJwk) {
102
+ const catalog = sandboxEnvironmentCatalogSchema.parse(value);
103
+ const { catalogDigest, signature: _signature, ...material } = catalog;
104
+ if (sandboxEnvironmentCatalogDigest(material) !== catalogDigest) throw new Error("Sandbox environment catalog digest does not match its canonical content.");
105
+ if (!verify(null, sandboxEnvironmentCatalogSigningBytes(catalog), createPublicKey({ key: publicJwk, format: "jwk" }), Buffer.from(catalog.signature.value, "base64url"))) throw new Error("Sandbox environment catalog signature is invalid.");
106
+ return catalog;
107
+ }
108
+ export {
109
+ providerSandboxEnvironmentAvailabilitySchema,
110
+ sandboxEnvironmentCatalogDigest,
111
+ sandboxEnvironmentCatalogEntrySchema,
112
+ sandboxEnvironmentCatalogSchema,
113
+ sandboxEnvironmentCatalogSigningBytes,
114
+ sandboxEnvironmentContractSchema,
115
+ verifySandboxEnvironmentCatalog
116
+ };
@@ -1,3 +1,7 @@
1
1
  export * from './client.js';
2
2
  export * from './contracts/index.js';
3
3
  export * from './validation.js';
4
+ export * from './sandbox-contracts.js';
5
+ export * from './environment-catalog.js';
6
+ export * from './capability-ontology.js';
7
+ export * from './core-capability-catalog.js';
@@ -1,3 +1,7 @@
1
1
  export * from "./client.js";
2
2
  export * from "./contracts/index.js";
3
3
  export * from "./validation.js";
4
+ export * from "./sandbox-contracts.js";
5
+ export * from "./environment-catalog.js";
6
+ export * from "./capability-ontology.js";
7
+ export * from "./core-capability-catalog.js";
@@ -0,0 +1,543 @@
1
+ import { z } from 'zod';
2
+ declare const sandboxProfile: z.ZodString;
3
+ export declare const sandboxAssignmentSchema: z.ZodObject<{
4
+ schemaVersion: z.ZodLiteral<"treeseed.sandbox-assignment/v1">;
5
+ assignmentId: z.ZodString;
6
+ attempt: z.ZodNumber;
7
+ runnerId: z.ZodString;
8
+ providerId: z.ZodString;
9
+ teamId: z.ZodString;
10
+ projectId: z.ZodString;
11
+ profile: z.ZodString;
12
+ environmentContract: z.ZodOptional<z.ZodObject<{
13
+ id: z.ZodString;
14
+ version: z.ZodString;
15
+ digest: z.ZodString;
16
+ capabilities: z.ZodArray<z.ZodString, "many">;
17
+ }, "strict", z.ZodTypeAny, {
18
+ id: string;
19
+ digest: string;
20
+ version: string;
21
+ capabilities: string[];
22
+ }, {
23
+ id: string;
24
+ digest: string;
25
+ version: string;
26
+ capabilities: string[];
27
+ }>>;
28
+ guestImage: z.ZodString;
29
+ guestImageDigest: z.ZodString;
30
+ identityManifestDigest: z.ZodString;
31
+ contextManifestDigest: z.ZodString;
32
+ resources: z.ZodObject<{
33
+ cpuCores: z.ZodNumber;
34
+ memoryBytes: z.ZodNumber;
35
+ diskBytes: z.ZodNumber;
36
+ durationSeconds: z.ZodNumber;
37
+ processLimit: z.ZodNumber;
38
+ outputBytes: z.ZodNumber;
39
+ }, "strict", z.ZodTypeAny, {
40
+ cpuCores: number;
41
+ memoryBytes: number;
42
+ diskBytes: number;
43
+ durationSeconds: number;
44
+ processLimit: number;
45
+ outputBytes: number;
46
+ }, {
47
+ cpuCores: number;
48
+ memoryBytes: number;
49
+ diskBytes: number;
50
+ durationSeconds: number;
51
+ processLimit: number;
52
+ outputBytes: number;
53
+ }>;
54
+ inputs: z.ZodArray<z.ZodObject<{
55
+ id: z.ZodString;
56
+ digest: z.ZodString;
57
+ bytes: z.ZodNumber;
58
+ disposition: z.ZodEnum<["read-only", "copy-on-write"]>;
59
+ mediaType: z.ZodString;
60
+ targetPath: z.ZodString;
61
+ }, "strict", z.ZodTypeAny, {
62
+ id: string;
63
+ mediaType: string;
64
+ digest: string;
65
+ bytes: number;
66
+ disposition: "read-only" | "copy-on-write";
67
+ targetPath: string;
68
+ }, {
69
+ id: string;
70
+ mediaType: string;
71
+ digest: string;
72
+ bytes: number;
73
+ disposition: "read-only" | "copy-on-write";
74
+ targetPath: string;
75
+ }>, "many">;
76
+ outputs: z.ZodArray<z.ZodObject<{
77
+ id: z.ZodString;
78
+ path: z.ZodString;
79
+ mediaType: z.ZodString;
80
+ maxBytes: z.ZodNumber;
81
+ }, "strict", z.ZodTypeAny, {
82
+ path: string;
83
+ id: string;
84
+ mediaType: string;
85
+ maxBytes: number;
86
+ }, {
87
+ path: string;
88
+ id: string;
89
+ mediaType: string;
90
+ maxBytes: number;
91
+ }>, "many">;
92
+ network: z.ZodObject<{
93
+ defaultDeny: z.ZodLiteral<true>;
94
+ relayUrl: z.ZodString;
95
+ allowedServices: z.ZodArray<z.ZodString, "many">;
96
+ connectedDevelopmentSessionId: z.ZodOptional<z.ZodString>;
97
+ }, "strict", z.ZodTypeAny, {
98
+ defaultDeny: true;
99
+ relayUrl: string;
100
+ allowedServices: string[];
101
+ connectedDevelopmentSessionId?: string | undefined;
102
+ }, {
103
+ defaultDeny: true;
104
+ relayUrl: string;
105
+ allowedServices: string[];
106
+ connectedDevelopmentSessionId?: string | undefined;
107
+ }>;
108
+ modelPolicy: z.ZodObject<{
109
+ provider: z.ZodString;
110
+ model: z.ZodString;
111
+ capabilities: z.ZodArray<z.ZodString, "many">;
112
+ maxInputTokens: z.ZodOptional<z.ZodNumber>;
113
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
114
+ maxCost: z.ZodOptional<z.ZodNumber>;
115
+ }, "strict", z.ZodTypeAny, {
116
+ provider: string;
117
+ capabilities: string[];
118
+ model: string;
119
+ maxInputTokens?: number | undefined;
120
+ maxOutputTokens?: number | undefined;
121
+ maxCost?: number | undefined;
122
+ }, {
123
+ provider: string;
124
+ capabilities: string[];
125
+ model: string;
126
+ maxInputTokens?: number | undefined;
127
+ maxOutputTokens?: number | undefined;
128
+ maxCost?: number | undefined;
129
+ }>;
130
+ credentialHandles: z.ZodArray<z.ZodObject<{
131
+ id: z.ZodString;
132
+ profileId: z.ZodString;
133
+ revealAllowed: z.ZodLiteral<false>;
134
+ }, "strict", z.ZodTypeAny, {
135
+ id: string;
136
+ profileId: string;
137
+ revealAllowed: false;
138
+ }, {
139
+ id: string;
140
+ profileId: string;
141
+ revealAllowed: false;
142
+ }>, "many">;
143
+ treeDxHandleIds: z.ZodArray<z.ZodString, "many">;
144
+ leaseExpiresAt: z.ZodString;
145
+ signature: z.ZodObject<{
146
+ keyId: z.ZodString;
147
+ algorithm: z.ZodLiteral<"Ed25519">;
148
+ value: z.ZodString;
149
+ }, "strict", z.ZodTypeAny, {
150
+ value: string;
151
+ algorithm: "Ed25519";
152
+ keyId: string;
153
+ }, {
154
+ value: string;
155
+ algorithm: "Ed25519";
156
+ keyId: string;
157
+ }>;
158
+ }, "strict", z.ZodTypeAny, {
159
+ teamId: string;
160
+ assignmentId: string;
161
+ schemaVersion: "treeseed.sandbox-assignment/v1";
162
+ outputs: {
163
+ path: string;
164
+ id: string;
165
+ mediaType: string;
166
+ maxBytes: number;
167
+ }[];
168
+ resources: {
169
+ cpuCores: number;
170
+ memoryBytes: number;
171
+ diskBytes: number;
172
+ durationSeconds: number;
173
+ processLimit: number;
174
+ outputBytes: number;
175
+ };
176
+ projectId: string;
177
+ profile: string;
178
+ network: {
179
+ defaultDeny: true;
180
+ relayUrl: string;
181
+ allowedServices: string[];
182
+ connectedDevelopmentSessionId?: string | undefined;
183
+ };
184
+ guestImage: string;
185
+ guestImageDigest: string;
186
+ providerId: string;
187
+ runnerId: string;
188
+ inputs: {
189
+ id: string;
190
+ mediaType: string;
191
+ digest: string;
192
+ bytes: number;
193
+ disposition: "read-only" | "copy-on-write";
194
+ targetPath: string;
195
+ }[];
196
+ signature: {
197
+ value: string;
198
+ algorithm: "Ed25519";
199
+ keyId: string;
200
+ };
201
+ leaseExpiresAt: string;
202
+ attempt: number;
203
+ identityManifestDigest: string;
204
+ contextManifestDigest: string;
205
+ modelPolicy: {
206
+ provider: string;
207
+ capabilities: string[];
208
+ model: string;
209
+ maxInputTokens?: number | undefined;
210
+ maxOutputTokens?: number | undefined;
211
+ maxCost?: number | undefined;
212
+ };
213
+ credentialHandles: {
214
+ id: string;
215
+ profileId: string;
216
+ revealAllowed: false;
217
+ }[];
218
+ treeDxHandleIds: string[];
219
+ environmentContract?: {
220
+ id: string;
221
+ digest: string;
222
+ version: string;
223
+ capabilities: string[];
224
+ } | undefined;
225
+ }, {
226
+ teamId: string;
227
+ assignmentId: string;
228
+ schemaVersion: "treeseed.sandbox-assignment/v1";
229
+ outputs: {
230
+ path: string;
231
+ id: string;
232
+ mediaType: string;
233
+ maxBytes: number;
234
+ }[];
235
+ resources: {
236
+ cpuCores: number;
237
+ memoryBytes: number;
238
+ diskBytes: number;
239
+ durationSeconds: number;
240
+ processLimit: number;
241
+ outputBytes: number;
242
+ };
243
+ projectId: string;
244
+ profile: string;
245
+ network: {
246
+ defaultDeny: true;
247
+ relayUrl: string;
248
+ allowedServices: string[];
249
+ connectedDevelopmentSessionId?: string | undefined;
250
+ };
251
+ guestImage: string;
252
+ guestImageDigest: string;
253
+ providerId: string;
254
+ runnerId: string;
255
+ inputs: {
256
+ id: string;
257
+ mediaType: string;
258
+ digest: string;
259
+ bytes: number;
260
+ disposition: "read-only" | "copy-on-write";
261
+ targetPath: string;
262
+ }[];
263
+ signature: {
264
+ value: string;
265
+ algorithm: "Ed25519";
266
+ keyId: string;
267
+ };
268
+ leaseExpiresAt: string;
269
+ attempt: number;
270
+ identityManifestDigest: string;
271
+ contextManifestDigest: string;
272
+ modelPolicy: {
273
+ provider: string;
274
+ capabilities: string[];
275
+ model: string;
276
+ maxInputTokens?: number | undefined;
277
+ maxOutputTokens?: number | undefined;
278
+ maxCost?: number | undefined;
279
+ };
280
+ credentialHandles: {
281
+ id: string;
282
+ profileId: string;
283
+ revealAllowed: false;
284
+ }[];
285
+ treeDxHandleIds: string[];
286
+ environmentContract?: {
287
+ id: string;
288
+ digest: string;
289
+ version: string;
290
+ capabilities: string[];
291
+ } | undefined;
292
+ }>;
293
+ export declare const sandboxEventSchema: z.ZodObject<{
294
+ schemaVersion: z.ZodLiteral<"treeseed.sandbox-event/v1">;
295
+ sandboxId: z.ZodString;
296
+ assignmentId: z.ZodString;
297
+ sequence: z.ZodNumber;
298
+ occurredAt: z.ZodString;
299
+ type: z.ZodEnum<["sandbox.created", "sandbox.ready", "execution.started", "execution.progress", "tool.requested", "tool.completed", "execution.completed", "execution.failed", "sandbox.destroyed"]>;
300
+ payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
301
+ }, "strict", z.ZodTypeAny, {
302
+ assignmentId: string;
303
+ sequence: number;
304
+ schemaVersion: "treeseed.sandbox-event/v1";
305
+ type: "sandbox.created" | "sandbox.ready" | "execution.started" | "execution.progress" | "tool.requested" | "tool.completed" | "execution.completed" | "execution.failed" | "sandbox.destroyed";
306
+ payload: Record<string, unknown>;
307
+ occurredAt: string;
308
+ sandboxId: string;
309
+ }, {
310
+ assignmentId: string;
311
+ sequence: number;
312
+ schemaVersion: "treeseed.sandbox-event/v1";
313
+ type: "sandbox.created" | "sandbox.ready" | "execution.started" | "execution.progress" | "tool.requested" | "tool.completed" | "execution.completed" | "execution.failed" | "sandbox.destroyed";
314
+ occurredAt: string;
315
+ sandboxId: string;
316
+ payload?: Record<string, unknown> | undefined;
317
+ }>;
318
+ export declare const sandboxLeaseRenewalSchema: z.ZodObject<{
319
+ schemaVersion: z.ZodLiteral<"treeseed.sandbox-lease-renewal/v1">;
320
+ sandboxId: z.ZodString;
321
+ assignmentId: z.ZodString;
322
+ providerId: z.ZodString;
323
+ teamId: z.ZodString;
324
+ leaseExpiresAt: z.ZodString;
325
+ issuedAt: z.ZodString;
326
+ signature: z.ZodObject<{
327
+ keyId: z.ZodString;
328
+ algorithm: z.ZodLiteral<"Ed25519">;
329
+ value: z.ZodString;
330
+ }, "strict", z.ZodTypeAny, {
331
+ value: string;
332
+ algorithm: "Ed25519";
333
+ keyId: string;
334
+ }, {
335
+ value: string;
336
+ algorithm: "Ed25519";
337
+ keyId: string;
338
+ }>;
339
+ }, "strict", z.ZodTypeAny, {
340
+ teamId: string;
341
+ assignmentId: string;
342
+ schemaVersion: "treeseed.sandbox-lease-renewal/v1";
343
+ providerId: string;
344
+ signature: {
345
+ value: string;
346
+ algorithm: "Ed25519";
347
+ keyId: string;
348
+ };
349
+ issuedAt: string;
350
+ leaseExpiresAt: string;
351
+ sandboxId: string;
352
+ }, {
353
+ teamId: string;
354
+ assignmentId: string;
355
+ schemaVersion: "treeseed.sandbox-lease-renewal/v1";
356
+ providerId: string;
357
+ signature: {
358
+ value: string;
359
+ algorithm: "Ed25519";
360
+ keyId: string;
361
+ };
362
+ issuedAt: string;
363
+ leaseExpiresAt: string;
364
+ sandboxId: string;
365
+ }>;
366
+ export declare const sandboxResultSchema: z.ZodObject<{
367
+ schemaVersion: z.ZodLiteral<"treeseed.sandbox-result/v1">;
368
+ sandboxId: z.ZodString;
369
+ assignmentId: z.ZodString;
370
+ status: z.ZodEnum<["completed", "failed", "cancelled", "expired"]>;
371
+ summary: z.ZodString;
372
+ responseMarkdown: z.ZodOptional<z.ZodString>;
373
+ artifacts: z.ZodArray<z.ZodObject<{
374
+ id: z.ZodString;
375
+ path: z.ZodString;
376
+ digest: z.ZodString;
377
+ mediaType: z.ZodString;
378
+ bytes: z.ZodNumber;
379
+ }, "strict", z.ZodTypeAny, {
380
+ path: string;
381
+ id: string;
382
+ mediaType: string;
383
+ digest: string;
384
+ bytes: number;
385
+ }, {
386
+ path: string;
387
+ id: string;
388
+ mediaType: string;
389
+ digest: string;
390
+ bytes: number;
391
+ }>, "many">;
392
+ usage: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
393
+ diagnostics: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
394
+ teardown: z.ZodObject<{
395
+ verified: z.ZodBoolean;
396
+ completedAt: z.ZodNullable<z.ZodString>;
397
+ }, "strict", z.ZodTypeAny, {
398
+ completedAt: string | null;
399
+ verified: boolean;
400
+ }, {
401
+ completedAt: string | null;
402
+ verified: boolean;
403
+ }>;
404
+ }, "strict", z.ZodTypeAny, {
405
+ assignmentId: string;
406
+ schemaVersion: "treeseed.sandbox-result/v1";
407
+ status: "expired" | "failed" | "completed" | "cancelled";
408
+ artifacts: {
409
+ path: string;
410
+ id: string;
411
+ mediaType: string;
412
+ digest: string;
413
+ bytes: number;
414
+ }[];
415
+ summary: string;
416
+ usage: Record<string, unknown>;
417
+ diagnostics: Record<string, unknown>;
418
+ sandboxId: string;
419
+ teardown: {
420
+ completedAt: string | null;
421
+ verified: boolean;
422
+ };
423
+ responseMarkdown?: string | undefined;
424
+ }, {
425
+ assignmentId: string;
426
+ schemaVersion: "treeseed.sandbox-result/v1";
427
+ status: "expired" | "failed" | "completed" | "cancelled";
428
+ artifacts: {
429
+ path: string;
430
+ id: string;
431
+ mediaType: string;
432
+ digest: string;
433
+ bytes: number;
434
+ }[];
435
+ summary: string;
436
+ sandboxId: string;
437
+ teardown: {
438
+ completedAt: string | null;
439
+ verified: boolean;
440
+ };
441
+ usage?: Record<string, unknown> | undefined;
442
+ diagnostics?: Record<string, unknown> | undefined;
443
+ responseMarkdown?: string | undefined;
444
+ }>;
445
+ export declare const providerEnvironmentReceiptSchema: z.ZodObject<{
446
+ schemaVersion: z.ZodLiteral<"treeseed.provider-environment-receipt/v1">;
447
+ assignmentId: z.ZodString;
448
+ offerId: z.ZodString;
449
+ providerId: z.ZodString;
450
+ imageDigest: z.ZodString;
451
+ baseLineage: z.ZodObject<{
452
+ baseImageDigest: z.ZodString;
453
+ provenanceDigest: z.ZodString;
454
+ architectures: z.ZodArray<z.ZodEnum<["amd64", "arm64"]>, "many">;
455
+ }, "strict", z.ZodTypeAny, {
456
+ baseImageDigest: string;
457
+ provenanceDigest: string;
458
+ architectures: ("amd64" | "arm64")[];
459
+ }, {
460
+ baseImageDigest: string;
461
+ provenanceDigest: string;
462
+ architectures: ("amd64" | "arm64")[];
463
+ }>;
464
+ securityAttestationDigest: z.ZodString;
465
+ brokerVersion: z.ZodString;
466
+ teardown: z.ZodObject<{
467
+ verified: z.ZodBoolean;
468
+ completedAt: z.ZodNullable<z.ZodString>;
469
+ }, "strict", z.ZodTypeAny, {
470
+ completedAt: string | null;
471
+ verified: boolean;
472
+ }, {
473
+ completedAt: string | null;
474
+ verified: boolean;
475
+ }>;
476
+ createdAt: z.ZodString;
477
+ signature: z.ZodObject<{
478
+ keyId: z.ZodString;
479
+ algorithm: z.ZodLiteral<"Ed25519">;
480
+ value: z.ZodString;
481
+ }, "strict", z.ZodTypeAny, {
482
+ value: string;
483
+ algorithm: "Ed25519";
484
+ keyId: string;
485
+ }, {
486
+ value: string;
487
+ algorithm: "Ed25519";
488
+ keyId: string;
489
+ }>;
490
+ }, "strict", z.ZodTypeAny, {
491
+ assignmentId: string;
492
+ schemaVersion: "treeseed.provider-environment-receipt/v1";
493
+ createdAt: string;
494
+ providerId: string;
495
+ signature: {
496
+ value: string;
497
+ algorithm: "Ed25519";
498
+ keyId: string;
499
+ };
500
+ offerId: string;
501
+ teardown: {
502
+ completedAt: string | null;
503
+ verified: boolean;
504
+ };
505
+ imageDigest: string;
506
+ baseLineage: {
507
+ baseImageDigest: string;
508
+ provenanceDigest: string;
509
+ architectures: ("amd64" | "arm64")[];
510
+ };
511
+ securityAttestationDigest: string;
512
+ brokerVersion: string;
513
+ }, {
514
+ assignmentId: string;
515
+ schemaVersion: "treeseed.provider-environment-receipt/v1";
516
+ createdAt: string;
517
+ providerId: string;
518
+ signature: {
519
+ value: string;
520
+ algorithm: "Ed25519";
521
+ keyId: string;
522
+ };
523
+ offerId: string;
524
+ teardown: {
525
+ completedAt: string | null;
526
+ verified: boolean;
527
+ };
528
+ imageDigest: string;
529
+ baseLineage: {
530
+ baseImageDigest: string;
531
+ provenanceDigest: string;
532
+ architectures: ("amd64" | "arm64")[];
533
+ };
534
+ securityAttestationDigest: string;
535
+ brokerVersion: string;
536
+ }>;
537
+ export type SandboxAssignment = z.infer<typeof sandboxAssignmentSchema>;
538
+ export type SandboxEvent = z.infer<typeof sandboxEventSchema>;
539
+ export type SandboxLeaseRenewal = z.infer<typeof sandboxLeaseRenewalSchema>;
540
+ export type SandboxResult = z.infer<typeof sandboxResultSchema>;
541
+ export type ProviderEnvironmentReceipt = z.infer<typeof providerEnvironmentReceiptSchema>;
542
+ export type SandboxEnvironmentProfile = z.infer<typeof sandboxProfile>;
543
+ export {};