@vm0/runner 3.0.2 → 3.0.4
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.
- package/index.js +873 -792
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1103,7 +1103,7 @@ var FirecrackerVM = class {
|
|
|
1103
1103
|
mem_size_mib: this.config.memoryMb
|
|
1104
1104
|
});
|
|
1105
1105
|
const networkBootArgs = generateNetworkBootArgs(this.networkConfig);
|
|
1106
|
-
const bootArgs = `console=ttyS0 reboot=k panic=1 pci=off init=/sbin/overlay-init ${networkBootArgs}`;
|
|
1106
|
+
const bootArgs = `console=ttyS0 reboot=k panic=1 pci=off nomodules random.trust_cpu=on quiet loglevel=0 nokaslr audit=0 numa=off mitigations=off noresume init=/sbin/overlay-init ${networkBootArgs}`;
|
|
1107
1107
|
console.log(`[VM ${this.config.vmId}] Boot args: ${bootArgs}`);
|
|
1108
1108
|
await this.client.setBootSource({
|
|
1109
1109
|
kernel_image_path: this.config.kernelPath,
|
|
@@ -1545,6 +1545,9 @@ var VsockClient = class {
|
|
|
1545
1545
|
}
|
|
1546
1546
|
};
|
|
1547
1547
|
|
|
1548
|
+
// ../../packages/core/src/contracts/base.ts
|
|
1549
|
+
import { z as z3 } from "zod";
|
|
1550
|
+
|
|
1548
1551
|
// ../../node_modules/.pnpm/@ts-rest+core@3.53.0-rc.1_@types+node@24.3.0/node_modules/@ts-rest/core/index.esm.mjs
|
|
1549
1552
|
var util;
|
|
1550
1553
|
(function(util2) {
|
|
@@ -5371,56 +5374,62 @@ var initContract = () => {
|
|
|
5371
5374
|
};
|
|
5372
5375
|
};
|
|
5373
5376
|
|
|
5377
|
+
// ../../packages/core/src/contracts/base.ts
|
|
5378
|
+
var authHeadersSchema = z3.object({
|
|
5379
|
+
authorization: z3.string().optional()
|
|
5380
|
+
});
|
|
5381
|
+
|
|
5374
5382
|
// ../../packages/core/src/contracts/errors.ts
|
|
5375
|
-
import { z as
|
|
5376
|
-
var apiErrorSchema =
|
|
5377
|
-
error:
|
|
5378
|
-
message:
|
|
5379
|
-
code:
|
|
5383
|
+
import { z as z4 } from "zod";
|
|
5384
|
+
var apiErrorSchema = z4.object({
|
|
5385
|
+
error: z4.object({
|
|
5386
|
+
message: z4.string(),
|
|
5387
|
+
code: z4.string()
|
|
5380
5388
|
})
|
|
5381
5389
|
});
|
|
5382
5390
|
|
|
5383
5391
|
// ../../packages/core/src/contracts/composes.ts
|
|
5384
|
-
import { z as
|
|
5392
|
+
import { z as z6 } from "zod";
|
|
5385
5393
|
|
|
5386
5394
|
// ../../packages/core/src/contracts/runners.ts
|
|
5387
|
-
import { z as
|
|
5395
|
+
import { z as z5 } from "zod";
|
|
5388
5396
|
var c = initContract();
|
|
5389
|
-
var firewallRuleSchema =
|
|
5390
|
-
domain:
|
|
5391
|
-
ip:
|
|
5397
|
+
var firewallRuleSchema = z5.object({
|
|
5398
|
+
domain: z5.string().optional(),
|
|
5399
|
+
ip: z5.string().optional(),
|
|
5392
5400
|
/** Terminal rule - value is the action (ALLOW or DENY) */
|
|
5393
|
-
final:
|
|
5401
|
+
final: z5.enum(["ALLOW", "DENY"]).optional(),
|
|
5394
5402
|
/** Action for domain/ip rules */
|
|
5395
|
-
action:
|
|
5403
|
+
action: z5.enum(["ALLOW", "DENY"]).optional()
|
|
5396
5404
|
});
|
|
5397
|
-
var experimentalFirewallSchema =
|
|
5398
|
-
enabled:
|
|
5399
|
-
rules:
|
|
5400
|
-
experimental_mitm:
|
|
5401
|
-
experimental_seal_secrets:
|
|
5405
|
+
var experimentalFirewallSchema = z5.object({
|
|
5406
|
+
enabled: z5.boolean(),
|
|
5407
|
+
rules: z5.array(firewallRuleSchema).optional(),
|
|
5408
|
+
experimental_mitm: z5.boolean().optional(),
|
|
5409
|
+
experimental_seal_secrets: z5.boolean().optional()
|
|
5402
5410
|
});
|
|
5403
|
-
var runnerGroupSchema =
|
|
5411
|
+
var runnerGroupSchema = z5.string().regex(
|
|
5404
5412
|
/^[a-z0-9-]+\/[a-z0-9-]+$/,
|
|
5405
5413
|
"Runner group must be in scope/name format (e.g., acme/production)"
|
|
5406
5414
|
);
|
|
5407
|
-
var jobSchema =
|
|
5408
|
-
runId:
|
|
5409
|
-
prompt:
|
|
5410
|
-
agentComposeVersionId:
|
|
5411
|
-
vars:
|
|
5412
|
-
secretNames:
|
|
5413
|
-
checkpointId:
|
|
5415
|
+
var jobSchema = z5.object({
|
|
5416
|
+
runId: z5.string().uuid(),
|
|
5417
|
+
prompt: z5.string(),
|
|
5418
|
+
agentComposeVersionId: z5.string(),
|
|
5419
|
+
vars: z5.record(z5.string(), z5.string()).nullable(),
|
|
5420
|
+
secretNames: z5.array(z5.string()).nullable(),
|
|
5421
|
+
checkpointId: z5.string().uuid().nullable()
|
|
5414
5422
|
});
|
|
5415
5423
|
var runnersPollContract = c.router({
|
|
5416
5424
|
poll: {
|
|
5417
5425
|
method: "POST",
|
|
5418
5426
|
path: "/api/runners/poll",
|
|
5419
|
-
|
|
5427
|
+
headers: authHeadersSchema,
|
|
5428
|
+
body: z5.object({
|
|
5420
5429
|
group: runnerGroupSchema
|
|
5421
5430
|
}),
|
|
5422
5431
|
responses: {
|
|
5423
|
-
200:
|
|
5432
|
+
200: z5.object({
|
|
5424
5433
|
job: jobSchema.nullable()
|
|
5425
5434
|
}),
|
|
5426
5435
|
400: apiErrorSchema,
|
|
@@ -5430,64 +5439,65 @@ var runnersPollContract = c.router({
|
|
|
5430
5439
|
summary: "Poll for pending jobs (long-polling with 30s timeout)"
|
|
5431
5440
|
}
|
|
5432
5441
|
});
|
|
5433
|
-
var storageEntrySchema =
|
|
5434
|
-
mountPath:
|
|
5435
|
-
archiveUrl:
|
|
5442
|
+
var storageEntrySchema = z5.object({
|
|
5443
|
+
mountPath: z5.string(),
|
|
5444
|
+
archiveUrl: z5.string().nullable()
|
|
5436
5445
|
});
|
|
5437
|
-
var artifactEntrySchema =
|
|
5438
|
-
mountPath:
|
|
5439
|
-
archiveUrl:
|
|
5440
|
-
vasStorageName:
|
|
5441
|
-
vasVersionId:
|
|
5446
|
+
var artifactEntrySchema = z5.object({
|
|
5447
|
+
mountPath: z5.string(),
|
|
5448
|
+
archiveUrl: z5.string().nullable(),
|
|
5449
|
+
vasStorageName: z5.string(),
|
|
5450
|
+
vasVersionId: z5.string()
|
|
5442
5451
|
});
|
|
5443
|
-
var storageManifestSchema =
|
|
5444
|
-
storages:
|
|
5452
|
+
var storageManifestSchema = z5.object({
|
|
5453
|
+
storages: z5.array(storageEntrySchema),
|
|
5445
5454
|
artifact: artifactEntrySchema.nullable()
|
|
5446
5455
|
});
|
|
5447
|
-
var resumeSessionSchema =
|
|
5448
|
-
sessionId:
|
|
5449
|
-
sessionHistory:
|
|
5456
|
+
var resumeSessionSchema = z5.object({
|
|
5457
|
+
sessionId: z5.string(),
|
|
5458
|
+
sessionHistory: z5.string()
|
|
5450
5459
|
});
|
|
5451
|
-
var storedExecutionContextSchema =
|
|
5452
|
-
workingDir:
|
|
5460
|
+
var storedExecutionContextSchema = z5.object({
|
|
5461
|
+
workingDir: z5.string(),
|
|
5453
5462
|
storageManifest: storageManifestSchema.nullable(),
|
|
5454
|
-
environment:
|
|
5463
|
+
environment: z5.record(z5.string(), z5.string()).nullable(),
|
|
5455
5464
|
resumeSession: resumeSessionSchema.nullable(),
|
|
5456
|
-
encryptedSecrets:
|
|
5465
|
+
encryptedSecrets: z5.string().nullable(),
|
|
5457
5466
|
// AES-256-GCM encrypted secrets
|
|
5458
|
-
cliAgentType:
|
|
5467
|
+
cliAgentType: z5.string(),
|
|
5459
5468
|
experimentalFirewall: experimentalFirewallSchema.optional(),
|
|
5460
5469
|
// Debug flag to force real Claude in mock environments (internal use only)
|
|
5461
|
-
debugNoMockClaude:
|
|
5462
|
-
});
|
|
5463
|
-
var executionContextSchema =
|
|
5464
|
-
runId:
|
|
5465
|
-
prompt:
|
|
5466
|
-
agentComposeVersionId:
|
|
5467
|
-
vars:
|
|
5468
|
-
secretNames:
|
|
5469
|
-
checkpointId:
|
|
5470
|
-
sandboxToken:
|
|
5470
|
+
debugNoMockClaude: z5.boolean().optional()
|
|
5471
|
+
});
|
|
5472
|
+
var executionContextSchema = z5.object({
|
|
5473
|
+
runId: z5.string().uuid(),
|
|
5474
|
+
prompt: z5.string(),
|
|
5475
|
+
agentComposeVersionId: z5.string(),
|
|
5476
|
+
vars: z5.record(z5.string(), z5.string()).nullable(),
|
|
5477
|
+
secretNames: z5.array(z5.string()).nullable(),
|
|
5478
|
+
checkpointId: z5.string().uuid().nullable(),
|
|
5479
|
+
sandboxToken: z5.string(),
|
|
5471
5480
|
// New fields for E2B parity:
|
|
5472
|
-
workingDir:
|
|
5481
|
+
workingDir: z5.string(),
|
|
5473
5482
|
storageManifest: storageManifestSchema.nullable(),
|
|
5474
|
-
environment:
|
|
5483
|
+
environment: z5.record(z5.string(), z5.string()).nullable(),
|
|
5475
5484
|
resumeSession: resumeSessionSchema.nullable(),
|
|
5476
|
-
secretValues:
|
|
5477
|
-
cliAgentType:
|
|
5485
|
+
secretValues: z5.array(z5.string()).nullable(),
|
|
5486
|
+
cliAgentType: z5.string(),
|
|
5478
5487
|
// Experimental firewall configuration
|
|
5479
5488
|
experimentalFirewall: experimentalFirewallSchema.optional(),
|
|
5480
5489
|
// Debug flag to force real Claude in mock environments (internal use only)
|
|
5481
|
-
debugNoMockClaude:
|
|
5490
|
+
debugNoMockClaude: z5.boolean().optional()
|
|
5482
5491
|
});
|
|
5483
5492
|
var runnersJobClaimContract = c.router({
|
|
5484
5493
|
claim: {
|
|
5485
5494
|
method: "POST",
|
|
5486
5495
|
path: "/api/runners/jobs/:id/claim",
|
|
5487
|
-
|
|
5488
|
-
|
|
5496
|
+
headers: authHeadersSchema,
|
|
5497
|
+
pathParams: z5.object({
|
|
5498
|
+
id: z5.string().uuid()
|
|
5489
5499
|
}),
|
|
5490
|
-
body:
|
|
5500
|
+
body: z5.object({}),
|
|
5491
5501
|
responses: {
|
|
5492
5502
|
200: executionContextSchema,
|
|
5493
5503
|
400: apiErrorSchema,
|
|
@@ -5505,82 +5515,82 @@ var runnersJobClaimContract = c.router({
|
|
|
5505
5515
|
|
|
5506
5516
|
// ../../packages/core/src/contracts/composes.ts
|
|
5507
5517
|
var c2 = initContract();
|
|
5508
|
-
var composeVersionQuerySchema =
|
|
5518
|
+
var composeVersionQuerySchema = z6.preprocess(
|
|
5509
5519
|
(val) => val === void 0 || val === null ? void 0 : String(val),
|
|
5510
|
-
|
|
5520
|
+
z6.string().min(1, "Missing version query parameter").regex(
|
|
5511
5521
|
/^[a-f0-9]{8,64}$|^latest$/i,
|
|
5512
5522
|
"Version must be 8-64 hex characters or 'latest'"
|
|
5513
5523
|
)
|
|
5514
5524
|
);
|
|
5515
|
-
var agentNameSchema =
|
|
5525
|
+
var agentNameSchema = z6.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
|
|
5516
5526
|
/^[a-zA-Z0-9][a-zA-Z0-9-]{1,62}[a-zA-Z0-9]$/,
|
|
5517
5527
|
"Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
|
|
5518
5528
|
);
|
|
5519
|
-
var volumeConfigSchema =
|
|
5520
|
-
name:
|
|
5521
|
-
version:
|
|
5529
|
+
var volumeConfigSchema = z6.object({
|
|
5530
|
+
name: z6.string().min(1, "Volume name is required"),
|
|
5531
|
+
version: z6.string().min(1, "Volume version is required")
|
|
5522
5532
|
});
|
|
5523
5533
|
var SUPPORTED_APPS = ["github"];
|
|
5524
5534
|
var SUPPORTED_APP_TAGS = ["latest", "dev"];
|
|
5525
5535
|
var APP_NAME_REGEX = /^[a-z0-9-]+$/;
|
|
5526
|
-
var appStringSchema =
|
|
5536
|
+
var appStringSchema = z6.string().superRefine((val, ctx) => {
|
|
5527
5537
|
const [appName, tag] = val.split(":");
|
|
5528
5538
|
if (!appName || !APP_NAME_REGEX.test(appName)) {
|
|
5529
5539
|
ctx.addIssue({
|
|
5530
|
-
code:
|
|
5540
|
+
code: z6.ZodIssueCode.custom,
|
|
5531
5541
|
message: "App name must contain only lowercase letters, numbers, and hyphens"
|
|
5532
5542
|
});
|
|
5533
5543
|
return;
|
|
5534
5544
|
}
|
|
5535
5545
|
if (!SUPPORTED_APPS.includes(appName)) {
|
|
5536
5546
|
ctx.addIssue({
|
|
5537
|
-
code:
|
|
5547
|
+
code: z6.ZodIssueCode.custom,
|
|
5538
5548
|
message: `Invalid app: "${appName}". Supported apps: ${SUPPORTED_APPS.join(", ")}`
|
|
5539
5549
|
});
|
|
5540
5550
|
return;
|
|
5541
5551
|
}
|
|
5542
5552
|
if (tag !== void 0 && !SUPPORTED_APP_TAGS.includes(tag)) {
|
|
5543
5553
|
ctx.addIssue({
|
|
5544
|
-
code:
|
|
5554
|
+
code: z6.ZodIssueCode.custom,
|
|
5545
5555
|
message: `Invalid app tag: "${tag}". Supported tags: ${SUPPORTED_APP_TAGS.join(", ")}`
|
|
5546
5556
|
});
|
|
5547
5557
|
}
|
|
5548
5558
|
});
|
|
5549
|
-
var agentDefinitionSchema =
|
|
5550
|
-
description:
|
|
5559
|
+
var agentDefinitionSchema = z6.object({
|
|
5560
|
+
description: z6.string().optional(),
|
|
5551
5561
|
/**
|
|
5552
5562
|
* @deprecated Use `apps` field instead for pre-installed tools.
|
|
5553
5563
|
* This field will be removed in a future version.
|
|
5554
5564
|
*/
|
|
5555
|
-
image:
|
|
5556
|
-
framework:
|
|
5565
|
+
image: z6.string().optional(),
|
|
5566
|
+
framework: z6.string().min(1, "Framework is required"),
|
|
5557
5567
|
/**
|
|
5558
5568
|
* Array of pre-installed apps/tools for the agent environment.
|
|
5559
5569
|
* Format: "app" or "app:tag" (e.g., "github", "github:dev", "github:latest")
|
|
5560
5570
|
* Default tag is "latest" if not specified.
|
|
5561
5571
|
* Currently supported apps: "github" (includes GitHub CLI)
|
|
5562
5572
|
*/
|
|
5563
|
-
apps:
|
|
5564
|
-
volumes:
|
|
5565
|
-
working_dir:
|
|
5573
|
+
apps: z6.array(appStringSchema).optional(),
|
|
5574
|
+
volumes: z6.array(z6.string()).optional(),
|
|
5575
|
+
working_dir: z6.string().optional(),
|
|
5566
5576
|
// Optional when provider supports auto-config
|
|
5567
|
-
environment:
|
|
5577
|
+
environment: z6.record(z6.string(), z6.string()).optional(),
|
|
5568
5578
|
/**
|
|
5569
5579
|
* Path to instructions file (e.g., AGENTS.md).
|
|
5570
5580
|
* Auto-uploaded as volume and mounted at /home/user/.claude/CLAUDE.md
|
|
5571
5581
|
*/
|
|
5572
|
-
instructions:
|
|
5582
|
+
instructions: z6.string().min(1, "Instructions path cannot be empty").optional(),
|
|
5573
5583
|
/**
|
|
5574
5584
|
* Array of GitHub tree URLs for agent skills.
|
|
5575
5585
|
* Each skill is auto-downloaded and mounted at /home/user/.claude/skills/{skillName}/
|
|
5576
5586
|
*/
|
|
5577
|
-
skills:
|
|
5587
|
+
skills: z6.array(z6.string()).optional(),
|
|
5578
5588
|
/**
|
|
5579
5589
|
* Route this agent to a self-hosted runner instead of E2B.
|
|
5580
5590
|
* When specified, runs will be queued for the specified runner group.
|
|
5581
5591
|
*/
|
|
5582
|
-
experimental_runner:
|
|
5583
|
-
group:
|
|
5592
|
+
experimental_runner: z6.object({
|
|
5593
|
+
group: z6.string().regex(
|
|
5584
5594
|
/^[a-z0-9-]+\/[a-z0-9-]+$/,
|
|
5585
5595
|
"Runner group must be in scope/name format (e.g., acme/production)"
|
|
5586
5596
|
)
|
|
@@ -5592,25 +5602,25 @@ var agentDefinitionSchema = z5.object({
|
|
|
5592
5602
|
*/
|
|
5593
5603
|
experimental_firewall: experimentalFirewallSchema.optional()
|
|
5594
5604
|
});
|
|
5595
|
-
var agentComposeContentSchema =
|
|
5596
|
-
version:
|
|
5597
|
-
agents:
|
|
5598
|
-
volumes:
|
|
5605
|
+
var agentComposeContentSchema = z6.object({
|
|
5606
|
+
version: z6.string().min(1, "Version is required"),
|
|
5607
|
+
agents: z6.record(z6.string(), agentDefinitionSchema),
|
|
5608
|
+
volumes: z6.record(z6.string(), volumeConfigSchema).optional()
|
|
5599
5609
|
});
|
|
5600
|
-
var composeResponseSchema =
|
|
5601
|
-
id:
|
|
5602
|
-
name:
|
|
5603
|
-
headVersionId:
|
|
5610
|
+
var composeResponseSchema = z6.object({
|
|
5611
|
+
id: z6.string(),
|
|
5612
|
+
name: z6.string(),
|
|
5613
|
+
headVersionId: z6.string().nullable(),
|
|
5604
5614
|
content: agentComposeContentSchema.nullable(),
|
|
5605
|
-
createdAt:
|
|
5606
|
-
updatedAt:
|
|
5615
|
+
createdAt: z6.string(),
|
|
5616
|
+
updatedAt: z6.string()
|
|
5607
5617
|
});
|
|
5608
|
-
var createComposeResponseSchema =
|
|
5609
|
-
composeId:
|
|
5610
|
-
name:
|
|
5611
|
-
versionId:
|
|
5612
|
-
action:
|
|
5613
|
-
updatedAt:
|
|
5618
|
+
var createComposeResponseSchema = z6.object({
|
|
5619
|
+
composeId: z6.string(),
|
|
5620
|
+
name: z6.string(),
|
|
5621
|
+
versionId: z6.string(),
|
|
5622
|
+
action: z6.enum(["created", "existing"]),
|
|
5623
|
+
updatedAt: z6.string()
|
|
5614
5624
|
});
|
|
5615
5625
|
var composesMainContract = c2.router({
|
|
5616
5626
|
/**
|
|
@@ -5621,9 +5631,10 @@ var composesMainContract = c2.router({
|
|
|
5621
5631
|
getByName: {
|
|
5622
5632
|
method: "GET",
|
|
5623
5633
|
path: "/api/agent/composes",
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5634
|
+
headers: authHeadersSchema,
|
|
5635
|
+
query: z6.object({
|
|
5636
|
+
name: z6.string().min(1, "Missing name query parameter"),
|
|
5637
|
+
scope: z6.string().optional()
|
|
5627
5638
|
}),
|
|
5628
5639
|
responses: {
|
|
5629
5640
|
200: composeResponseSchema,
|
|
@@ -5642,7 +5653,8 @@ var composesMainContract = c2.router({
|
|
|
5642
5653
|
create: {
|
|
5643
5654
|
method: "POST",
|
|
5644
5655
|
path: "/api/agent/composes",
|
|
5645
|
-
|
|
5656
|
+
headers: authHeadersSchema,
|
|
5657
|
+
body: z6.object({
|
|
5646
5658
|
content: agentComposeContentSchema
|
|
5647
5659
|
}),
|
|
5648
5660
|
responses: {
|
|
@@ -5662,8 +5674,9 @@ var composesByIdContract = c2.router({
|
|
|
5662
5674
|
getById: {
|
|
5663
5675
|
method: "GET",
|
|
5664
5676
|
path: "/api/agent/composes/:id",
|
|
5665
|
-
|
|
5666
|
-
|
|
5677
|
+
headers: authHeadersSchema,
|
|
5678
|
+
pathParams: z6.object({
|
|
5679
|
+
id: z6.string().min(1, "Compose ID is required")
|
|
5667
5680
|
}),
|
|
5668
5681
|
responses: {
|
|
5669
5682
|
200: composeResponseSchema,
|
|
@@ -5681,14 +5694,15 @@ var composesVersionsContract = c2.router({
|
|
|
5681
5694
|
resolveVersion: {
|
|
5682
5695
|
method: "GET",
|
|
5683
5696
|
path: "/api/agent/composes/versions",
|
|
5684
|
-
|
|
5685
|
-
|
|
5697
|
+
headers: authHeadersSchema,
|
|
5698
|
+
query: z6.object({
|
|
5699
|
+
composeId: z6.string().min(1, "Missing composeId query parameter"),
|
|
5686
5700
|
version: composeVersionQuerySchema
|
|
5687
5701
|
}),
|
|
5688
5702
|
responses: {
|
|
5689
|
-
200:
|
|
5690
|
-
versionId:
|
|
5691
|
-
tag:
|
|
5703
|
+
200: z6.object({
|
|
5704
|
+
versionId: z6.string(),
|
|
5705
|
+
tag: z6.string().optional()
|
|
5692
5706
|
}),
|
|
5693
5707
|
400: apiErrorSchema,
|
|
5694
5708
|
401: apiErrorSchema,
|
|
@@ -5697,10 +5711,10 @@ var composesVersionsContract = c2.router({
|
|
|
5697
5711
|
summary: "Resolve version specifier to full version ID"
|
|
5698
5712
|
}
|
|
5699
5713
|
});
|
|
5700
|
-
var composeListItemSchema =
|
|
5701
|
-
name:
|
|
5702
|
-
headVersionId:
|
|
5703
|
-
updatedAt:
|
|
5714
|
+
var composeListItemSchema = z6.object({
|
|
5715
|
+
name: z6.string(),
|
|
5716
|
+
headVersionId: z6.string().nullable(),
|
|
5717
|
+
updatedAt: z6.string()
|
|
5704
5718
|
});
|
|
5705
5719
|
var composesListContract = c2.router({
|
|
5706
5720
|
/**
|
|
@@ -5711,12 +5725,13 @@ var composesListContract = c2.router({
|
|
|
5711
5725
|
list: {
|
|
5712
5726
|
method: "GET",
|
|
5713
5727
|
path: "/api/agent/composes/list",
|
|
5714
|
-
|
|
5715
|
-
|
|
5728
|
+
headers: authHeadersSchema,
|
|
5729
|
+
query: z6.object({
|
|
5730
|
+
scope: z6.string().optional()
|
|
5716
5731
|
}),
|
|
5717
5732
|
responses: {
|
|
5718
|
-
200:
|
|
5719
|
-
composes:
|
|
5733
|
+
200: z6.object({
|
|
5734
|
+
composes: z6.array(composeListItemSchema)
|
|
5720
5735
|
}),
|
|
5721
5736
|
400: apiErrorSchema,
|
|
5722
5737
|
401: apiErrorSchema
|
|
@@ -5726,85 +5741,85 @@ var composesListContract = c2.router({
|
|
|
5726
5741
|
});
|
|
5727
5742
|
|
|
5728
5743
|
// ../../packages/core/src/contracts/runs.ts
|
|
5729
|
-
import { z as
|
|
5744
|
+
import { z as z7 } from "zod";
|
|
5730
5745
|
var c3 = initContract();
|
|
5731
|
-
var runStatusSchema =
|
|
5746
|
+
var runStatusSchema = z7.enum([
|
|
5732
5747
|
"pending",
|
|
5733
5748
|
"running",
|
|
5734
5749
|
"completed",
|
|
5735
5750
|
"failed",
|
|
5736
5751
|
"timeout"
|
|
5737
5752
|
]);
|
|
5738
|
-
var unifiedRunRequestSchema =
|
|
5753
|
+
var unifiedRunRequestSchema = z7.object({
|
|
5739
5754
|
// High-level shortcuts (mutually exclusive with each other)
|
|
5740
|
-
checkpointId:
|
|
5741
|
-
sessionId:
|
|
5755
|
+
checkpointId: z7.string().optional(),
|
|
5756
|
+
sessionId: z7.string().optional(),
|
|
5742
5757
|
// Base parameters (can be used directly or overridden after shortcut expansion)
|
|
5743
|
-
agentComposeId:
|
|
5744
|
-
agentComposeVersionId:
|
|
5745
|
-
conversationId:
|
|
5746
|
-
artifactName:
|
|
5747
|
-
artifactVersion:
|
|
5748
|
-
vars:
|
|
5749
|
-
secrets:
|
|
5750
|
-
volumeVersions:
|
|
5758
|
+
agentComposeId: z7.string().optional(),
|
|
5759
|
+
agentComposeVersionId: z7.string().optional(),
|
|
5760
|
+
conversationId: z7.string().optional(),
|
|
5761
|
+
artifactName: z7.string().optional(),
|
|
5762
|
+
artifactVersion: z7.string().optional(),
|
|
5763
|
+
vars: z7.record(z7.string(), z7.string()).optional(),
|
|
5764
|
+
secrets: z7.record(z7.string(), z7.string()).optional(),
|
|
5765
|
+
volumeVersions: z7.record(z7.string(), z7.string()).optional(),
|
|
5751
5766
|
// Debug flag to force real Claude in mock environments (internal use only)
|
|
5752
|
-
debugNoMockClaude:
|
|
5767
|
+
debugNoMockClaude: z7.boolean().optional(),
|
|
5753
5768
|
// Model provider for automatic credential injection
|
|
5754
|
-
modelProvider:
|
|
5769
|
+
modelProvider: z7.string().optional(),
|
|
5755
5770
|
// Required
|
|
5756
|
-
prompt:
|
|
5771
|
+
prompt: z7.string().min(1, "Missing prompt")
|
|
5757
5772
|
});
|
|
5758
|
-
var createRunResponseSchema =
|
|
5759
|
-
runId:
|
|
5773
|
+
var createRunResponseSchema = z7.object({
|
|
5774
|
+
runId: z7.string(),
|
|
5760
5775
|
status: runStatusSchema,
|
|
5761
|
-
sandboxId:
|
|
5762
|
-
output:
|
|
5763
|
-
error:
|
|
5764
|
-
executionTimeMs:
|
|
5765
|
-
createdAt:
|
|
5766
|
-
});
|
|
5767
|
-
var getRunResponseSchema =
|
|
5768
|
-
runId:
|
|
5769
|
-
agentComposeVersionId:
|
|
5776
|
+
sandboxId: z7.string().optional(),
|
|
5777
|
+
output: z7.string().optional(),
|
|
5778
|
+
error: z7.string().optional(),
|
|
5779
|
+
executionTimeMs: z7.number().optional(),
|
|
5780
|
+
createdAt: z7.string()
|
|
5781
|
+
});
|
|
5782
|
+
var getRunResponseSchema = z7.object({
|
|
5783
|
+
runId: z7.string(),
|
|
5784
|
+
agentComposeVersionId: z7.string(),
|
|
5770
5785
|
status: runStatusSchema,
|
|
5771
|
-
prompt:
|
|
5772
|
-
vars:
|
|
5773
|
-
sandboxId:
|
|
5774
|
-
result:
|
|
5775
|
-
output:
|
|
5776
|
-
executionTimeMs:
|
|
5786
|
+
prompt: z7.string(),
|
|
5787
|
+
vars: z7.record(z7.string(), z7.string()).optional(),
|
|
5788
|
+
sandboxId: z7.string().optional(),
|
|
5789
|
+
result: z7.object({
|
|
5790
|
+
output: z7.string(),
|
|
5791
|
+
executionTimeMs: z7.number()
|
|
5777
5792
|
}).optional(),
|
|
5778
|
-
error:
|
|
5779
|
-
createdAt:
|
|
5780
|
-
startedAt:
|
|
5781
|
-
completedAt:
|
|
5782
|
-
});
|
|
5783
|
-
var runEventSchema =
|
|
5784
|
-
sequenceNumber:
|
|
5785
|
-
eventType:
|
|
5786
|
-
eventData:
|
|
5787
|
-
createdAt:
|
|
5788
|
-
});
|
|
5789
|
-
var runResultSchema =
|
|
5790
|
-
checkpointId:
|
|
5791
|
-
agentSessionId:
|
|
5792
|
-
conversationId:
|
|
5793
|
-
artifact:
|
|
5793
|
+
error: z7.string().optional(),
|
|
5794
|
+
createdAt: z7.string(),
|
|
5795
|
+
startedAt: z7.string().optional(),
|
|
5796
|
+
completedAt: z7.string().optional()
|
|
5797
|
+
});
|
|
5798
|
+
var runEventSchema = z7.object({
|
|
5799
|
+
sequenceNumber: z7.number(),
|
|
5800
|
+
eventType: z7.string(),
|
|
5801
|
+
eventData: z7.unknown(),
|
|
5802
|
+
createdAt: z7.string()
|
|
5803
|
+
});
|
|
5804
|
+
var runResultSchema = z7.object({
|
|
5805
|
+
checkpointId: z7.string(),
|
|
5806
|
+
agentSessionId: z7.string(),
|
|
5807
|
+
conversationId: z7.string(),
|
|
5808
|
+
artifact: z7.record(z7.string(), z7.string()).optional(),
|
|
5794
5809
|
// optional when run has no artifact
|
|
5795
|
-
volumes:
|
|
5810
|
+
volumes: z7.record(z7.string(), z7.string()).optional()
|
|
5796
5811
|
});
|
|
5797
|
-
var runStateSchema =
|
|
5812
|
+
var runStateSchema = z7.object({
|
|
5798
5813
|
status: runStatusSchema,
|
|
5799
5814
|
result: runResultSchema.optional(),
|
|
5800
|
-
error:
|
|
5815
|
+
error: z7.string().optional()
|
|
5801
5816
|
});
|
|
5802
|
-
var eventsResponseSchema =
|
|
5803
|
-
events:
|
|
5804
|
-
hasMore:
|
|
5805
|
-
nextSequence:
|
|
5817
|
+
var eventsResponseSchema = z7.object({
|
|
5818
|
+
events: z7.array(runEventSchema),
|
|
5819
|
+
hasMore: z7.boolean(),
|
|
5820
|
+
nextSequence: z7.number(),
|
|
5806
5821
|
run: runStateSchema,
|
|
5807
|
-
framework:
|
|
5822
|
+
framework: z7.string()
|
|
5808
5823
|
});
|
|
5809
5824
|
var runsMainContract = c3.router({
|
|
5810
5825
|
/**
|
|
@@ -5814,6 +5829,7 @@ var runsMainContract = c3.router({
|
|
|
5814
5829
|
create: {
|
|
5815
5830
|
method: "POST",
|
|
5816
5831
|
path: "/api/agent/runs",
|
|
5832
|
+
headers: authHeadersSchema,
|
|
5817
5833
|
body: unifiedRunRequestSchema,
|
|
5818
5834
|
responses: {
|
|
5819
5835
|
201: createRunResponseSchema,
|
|
@@ -5832,8 +5848,9 @@ var runsByIdContract = c3.router({
|
|
|
5832
5848
|
getById: {
|
|
5833
5849
|
method: "GET",
|
|
5834
5850
|
path: "/api/agent/runs/:id",
|
|
5835
|
-
|
|
5836
|
-
|
|
5851
|
+
headers: authHeadersSchema,
|
|
5852
|
+
pathParams: z7.object({
|
|
5853
|
+
id: z7.string().min(1, "Run ID is required")
|
|
5837
5854
|
}),
|
|
5838
5855
|
responses: {
|
|
5839
5856
|
200: getRunResponseSchema,
|
|
@@ -5852,12 +5869,13 @@ var runEventsContract = c3.router({
|
|
|
5852
5869
|
getEvents: {
|
|
5853
5870
|
method: "GET",
|
|
5854
5871
|
path: "/api/agent/runs/:id/events",
|
|
5855
|
-
|
|
5856
|
-
|
|
5872
|
+
headers: authHeadersSchema,
|
|
5873
|
+
pathParams: z7.object({
|
|
5874
|
+
id: z7.string().min(1, "Run ID is required")
|
|
5857
5875
|
}),
|
|
5858
|
-
query:
|
|
5859
|
-
since:
|
|
5860
|
-
limit:
|
|
5876
|
+
query: z7.object({
|
|
5877
|
+
since: z7.coerce.number().default(-1),
|
|
5878
|
+
limit: z7.coerce.number().default(100)
|
|
5861
5879
|
}),
|
|
5862
5880
|
responses: {
|
|
5863
5881
|
200: eventsResponseSchema,
|
|
@@ -5867,50 +5885,50 @@ var runEventsContract = c3.router({
|
|
|
5867
5885
|
summary: "Get agent run events"
|
|
5868
5886
|
}
|
|
5869
5887
|
});
|
|
5870
|
-
var telemetryMetricSchema =
|
|
5871
|
-
ts:
|
|
5872
|
-
cpu:
|
|
5873
|
-
mem_used:
|
|
5874
|
-
mem_total:
|
|
5875
|
-
disk_used:
|
|
5876
|
-
disk_total:
|
|
5888
|
+
var telemetryMetricSchema = z7.object({
|
|
5889
|
+
ts: z7.string(),
|
|
5890
|
+
cpu: z7.number(),
|
|
5891
|
+
mem_used: z7.number(),
|
|
5892
|
+
mem_total: z7.number(),
|
|
5893
|
+
disk_used: z7.number(),
|
|
5894
|
+
disk_total: z7.number()
|
|
5877
5895
|
});
|
|
5878
|
-
var systemLogResponseSchema =
|
|
5879
|
-
systemLog:
|
|
5880
|
-
hasMore:
|
|
5896
|
+
var systemLogResponseSchema = z7.object({
|
|
5897
|
+
systemLog: z7.string(),
|
|
5898
|
+
hasMore: z7.boolean()
|
|
5881
5899
|
});
|
|
5882
|
-
var metricsResponseSchema =
|
|
5883
|
-
metrics:
|
|
5884
|
-
hasMore:
|
|
5900
|
+
var metricsResponseSchema = z7.object({
|
|
5901
|
+
metrics: z7.array(telemetryMetricSchema),
|
|
5902
|
+
hasMore: z7.boolean()
|
|
5885
5903
|
});
|
|
5886
|
-
var agentEventsResponseSchema =
|
|
5887
|
-
events:
|
|
5888
|
-
hasMore:
|
|
5889
|
-
framework:
|
|
5904
|
+
var agentEventsResponseSchema = z7.object({
|
|
5905
|
+
events: z7.array(runEventSchema),
|
|
5906
|
+
hasMore: z7.boolean(),
|
|
5907
|
+
framework: z7.string()
|
|
5890
5908
|
});
|
|
5891
|
-
var networkLogEntrySchema =
|
|
5892
|
-
timestamp:
|
|
5909
|
+
var networkLogEntrySchema = z7.object({
|
|
5910
|
+
timestamp: z7.string(),
|
|
5893
5911
|
// Common fields (all modes)
|
|
5894
|
-
mode:
|
|
5895
|
-
action:
|
|
5896
|
-
host:
|
|
5897
|
-
port:
|
|
5898
|
-
rule_matched:
|
|
5912
|
+
mode: z7.enum(["mitm", "sni"]).optional(),
|
|
5913
|
+
action: z7.enum(["ALLOW", "DENY"]).optional(),
|
|
5914
|
+
host: z7.string().optional(),
|
|
5915
|
+
port: z7.number().optional(),
|
|
5916
|
+
rule_matched: z7.string().nullable().optional(),
|
|
5899
5917
|
// MITM-only fields (optional)
|
|
5900
|
-
method:
|
|
5901
|
-
url:
|
|
5902
|
-
status:
|
|
5903
|
-
latency_ms:
|
|
5904
|
-
request_size:
|
|
5905
|
-
response_size:
|
|
5918
|
+
method: z7.string().optional(),
|
|
5919
|
+
url: z7.string().optional(),
|
|
5920
|
+
status: z7.number().optional(),
|
|
5921
|
+
latency_ms: z7.number().optional(),
|
|
5922
|
+
request_size: z7.number().optional(),
|
|
5923
|
+
response_size: z7.number().optional()
|
|
5906
5924
|
});
|
|
5907
|
-
var networkLogsResponseSchema =
|
|
5908
|
-
networkLogs:
|
|
5909
|
-
hasMore:
|
|
5925
|
+
var networkLogsResponseSchema = z7.object({
|
|
5926
|
+
networkLogs: z7.array(networkLogEntrySchema),
|
|
5927
|
+
hasMore: z7.boolean()
|
|
5910
5928
|
});
|
|
5911
|
-
var telemetryResponseSchema =
|
|
5912
|
-
systemLog:
|
|
5913
|
-
metrics:
|
|
5929
|
+
var telemetryResponseSchema = z7.object({
|
|
5930
|
+
systemLog: z7.string(),
|
|
5931
|
+
metrics: z7.array(telemetryMetricSchema)
|
|
5914
5932
|
});
|
|
5915
5933
|
var runTelemetryContract = c3.router({
|
|
5916
5934
|
/**
|
|
@@ -5920,8 +5938,9 @@ var runTelemetryContract = c3.router({
|
|
|
5920
5938
|
getTelemetry: {
|
|
5921
5939
|
method: "GET",
|
|
5922
5940
|
path: "/api/agent/runs/:id/telemetry",
|
|
5923
|
-
|
|
5924
|
-
|
|
5941
|
+
headers: authHeadersSchema,
|
|
5942
|
+
pathParams: z7.object({
|
|
5943
|
+
id: z7.string().min(1, "Run ID is required")
|
|
5925
5944
|
}),
|
|
5926
5945
|
responses: {
|
|
5927
5946
|
200: telemetryResponseSchema,
|
|
@@ -5939,13 +5958,14 @@ var runSystemLogContract = c3.router({
|
|
|
5939
5958
|
getSystemLog: {
|
|
5940
5959
|
method: "GET",
|
|
5941
5960
|
path: "/api/agent/runs/:id/telemetry/system-log",
|
|
5942
|
-
|
|
5943
|
-
|
|
5961
|
+
headers: authHeadersSchema,
|
|
5962
|
+
pathParams: z7.object({
|
|
5963
|
+
id: z7.string().min(1, "Run ID is required")
|
|
5944
5964
|
}),
|
|
5945
|
-
query:
|
|
5946
|
-
since:
|
|
5947
|
-
limit:
|
|
5948
|
-
order:
|
|
5965
|
+
query: z7.object({
|
|
5966
|
+
since: z7.coerce.number().optional(),
|
|
5967
|
+
limit: z7.coerce.number().min(1).max(100).default(5),
|
|
5968
|
+
order: z7.enum(["asc", "desc"]).default("desc")
|
|
5949
5969
|
}),
|
|
5950
5970
|
responses: {
|
|
5951
5971
|
200: systemLogResponseSchema,
|
|
@@ -5963,13 +5983,14 @@ var runMetricsContract = c3.router({
|
|
|
5963
5983
|
getMetrics: {
|
|
5964
5984
|
method: "GET",
|
|
5965
5985
|
path: "/api/agent/runs/:id/telemetry/metrics",
|
|
5966
|
-
|
|
5967
|
-
|
|
5986
|
+
headers: authHeadersSchema,
|
|
5987
|
+
pathParams: z7.object({
|
|
5988
|
+
id: z7.string().min(1, "Run ID is required")
|
|
5968
5989
|
}),
|
|
5969
|
-
query:
|
|
5970
|
-
since:
|
|
5971
|
-
limit:
|
|
5972
|
-
order:
|
|
5990
|
+
query: z7.object({
|
|
5991
|
+
since: z7.coerce.number().optional(),
|
|
5992
|
+
limit: z7.coerce.number().min(1).max(100).default(5),
|
|
5993
|
+
order: z7.enum(["asc", "desc"]).default("desc")
|
|
5973
5994
|
}),
|
|
5974
5995
|
responses: {
|
|
5975
5996
|
200: metricsResponseSchema,
|
|
@@ -5987,13 +6008,14 @@ var runAgentEventsContract = c3.router({
|
|
|
5987
6008
|
getAgentEvents: {
|
|
5988
6009
|
method: "GET",
|
|
5989
6010
|
path: "/api/agent/runs/:id/telemetry/agent",
|
|
5990
|
-
|
|
5991
|
-
|
|
6011
|
+
headers: authHeadersSchema,
|
|
6012
|
+
pathParams: z7.object({
|
|
6013
|
+
id: z7.string().min(1, "Run ID is required")
|
|
5992
6014
|
}),
|
|
5993
|
-
query:
|
|
5994
|
-
since:
|
|
5995
|
-
limit:
|
|
5996
|
-
order:
|
|
6015
|
+
query: z7.object({
|
|
6016
|
+
since: z7.coerce.number().optional(),
|
|
6017
|
+
limit: z7.coerce.number().min(1).max(100).default(5),
|
|
6018
|
+
order: z7.enum(["asc", "desc"]).default("desc")
|
|
5997
6019
|
}),
|
|
5998
6020
|
responses: {
|
|
5999
6021
|
200: agentEventsResponseSchema,
|
|
@@ -6011,13 +6033,14 @@ var runNetworkLogsContract = c3.router({
|
|
|
6011
6033
|
getNetworkLogs: {
|
|
6012
6034
|
method: "GET",
|
|
6013
6035
|
path: "/api/agent/runs/:id/telemetry/network",
|
|
6014
|
-
|
|
6015
|
-
|
|
6036
|
+
headers: authHeadersSchema,
|
|
6037
|
+
pathParams: z7.object({
|
|
6038
|
+
id: z7.string().min(1, "Run ID is required")
|
|
6016
6039
|
}),
|
|
6017
|
-
query:
|
|
6018
|
-
since:
|
|
6019
|
-
limit:
|
|
6020
|
-
order:
|
|
6040
|
+
query: z7.object({
|
|
6041
|
+
since: z7.coerce.number().optional(),
|
|
6042
|
+
limit: z7.coerce.number().min(1).max(100).default(5),
|
|
6043
|
+
order: z7.enum(["asc", "desc"]).default("desc")
|
|
6021
6044
|
}),
|
|
6022
6045
|
responses: {
|
|
6023
6046
|
200: networkLogsResponseSchema,
|
|
@@ -6029,20 +6052,20 @@ var runNetworkLogsContract = c3.router({
|
|
|
6029
6052
|
});
|
|
6030
6053
|
|
|
6031
6054
|
// ../../packages/core/src/contracts/storages.ts
|
|
6032
|
-
import { z as
|
|
6055
|
+
import { z as z8 } from "zod";
|
|
6033
6056
|
var c4 = initContract();
|
|
6034
|
-
var storageTypeSchema =
|
|
6035
|
-
var versionQuerySchema =
|
|
6057
|
+
var storageTypeSchema = z8.enum(["volume", "artifact"]);
|
|
6058
|
+
var versionQuerySchema = z8.preprocess(
|
|
6036
6059
|
(val) => val === void 0 || val === null ? void 0 : String(val),
|
|
6037
|
-
|
|
6060
|
+
z8.string().regex(/^[a-f0-9]{8,64}$/i, "Version must be 8-64 hex characters").optional()
|
|
6038
6061
|
);
|
|
6039
|
-
var uploadStorageResponseSchema =
|
|
6040
|
-
name:
|
|
6041
|
-
versionId:
|
|
6042
|
-
size:
|
|
6043
|
-
fileCount:
|
|
6062
|
+
var uploadStorageResponseSchema = z8.object({
|
|
6063
|
+
name: z8.string(),
|
|
6064
|
+
versionId: z8.string(),
|
|
6065
|
+
size: z8.number(),
|
|
6066
|
+
fileCount: z8.number(),
|
|
6044
6067
|
type: storageTypeSchema,
|
|
6045
|
-
deduplicated:
|
|
6068
|
+
deduplicated: z8.boolean()
|
|
6046
6069
|
});
|
|
6047
6070
|
var storagesContract = c4.router({
|
|
6048
6071
|
/**
|
|
@@ -6059,6 +6082,7 @@ var storagesContract = c4.router({
|
|
|
6059
6082
|
upload: {
|
|
6060
6083
|
method: "POST",
|
|
6061
6084
|
path: "/api/storages",
|
|
6085
|
+
headers: authHeadersSchema,
|
|
6062
6086
|
contentType: "multipart/form-data",
|
|
6063
6087
|
body: c4.type(),
|
|
6064
6088
|
responses: {
|
|
@@ -6082,8 +6106,9 @@ var storagesContract = c4.router({
|
|
|
6082
6106
|
download: {
|
|
6083
6107
|
method: "GET",
|
|
6084
6108
|
path: "/api/storages",
|
|
6085
|
-
|
|
6086
|
-
|
|
6109
|
+
headers: authHeadersSchema,
|
|
6110
|
+
query: z8.object({
|
|
6111
|
+
name: z8.string().min(1, "Storage name is required"),
|
|
6087
6112
|
version: versionQuerySchema
|
|
6088
6113
|
}),
|
|
6089
6114
|
responses: {
|
|
@@ -6100,40 +6125,41 @@ var storagesContract = c4.router({
|
|
|
6100
6125
|
summary: "Download storage archive"
|
|
6101
6126
|
}
|
|
6102
6127
|
});
|
|
6103
|
-
var fileEntryWithHashSchema =
|
|
6104
|
-
path:
|
|
6105
|
-
hash:
|
|
6106
|
-
size:
|
|
6128
|
+
var fileEntryWithHashSchema = z8.object({
|
|
6129
|
+
path: z8.string().min(1, "File path is required"),
|
|
6130
|
+
hash: z8.string().length(64, "Hash must be SHA-256 (64 hex chars)"),
|
|
6131
|
+
size: z8.number().int().min(0, "Size must be non-negative")
|
|
6107
6132
|
});
|
|
6108
|
-
var storageChangesSchema =
|
|
6109
|
-
added:
|
|
6110
|
-
modified:
|
|
6111
|
-
deleted:
|
|
6133
|
+
var storageChangesSchema = z8.object({
|
|
6134
|
+
added: z8.array(z8.string()),
|
|
6135
|
+
modified: z8.array(z8.string()),
|
|
6136
|
+
deleted: z8.array(z8.string())
|
|
6112
6137
|
});
|
|
6113
|
-
var presignedUploadSchema =
|
|
6114
|
-
key:
|
|
6115
|
-
presignedUrl:
|
|
6138
|
+
var presignedUploadSchema = z8.object({
|
|
6139
|
+
key: z8.string(),
|
|
6140
|
+
presignedUrl: z8.string().url()
|
|
6116
6141
|
});
|
|
6117
6142
|
var storagesPrepareContract = c4.router({
|
|
6118
6143
|
prepare: {
|
|
6119
6144
|
method: "POST",
|
|
6120
6145
|
path: "/api/storages/prepare",
|
|
6121
|
-
|
|
6122
|
-
|
|
6146
|
+
headers: authHeadersSchema,
|
|
6147
|
+
body: z8.object({
|
|
6148
|
+
storageName: z8.string().min(1, "Storage name is required"),
|
|
6123
6149
|
storageType: storageTypeSchema,
|
|
6124
|
-
files:
|
|
6125
|
-
force:
|
|
6126
|
-
runId:
|
|
6150
|
+
files: z8.array(fileEntryWithHashSchema),
|
|
6151
|
+
force: z8.boolean().optional(),
|
|
6152
|
+
runId: z8.string().optional(),
|
|
6127
6153
|
// For sandbox auth
|
|
6128
|
-
baseVersion:
|
|
6154
|
+
baseVersion: z8.string().optional(),
|
|
6129
6155
|
// For incremental uploads
|
|
6130
6156
|
changes: storageChangesSchema.optional()
|
|
6131
6157
|
}),
|
|
6132
6158
|
responses: {
|
|
6133
|
-
200:
|
|
6134
|
-
versionId:
|
|
6135
|
-
existing:
|
|
6136
|
-
uploads:
|
|
6159
|
+
200: z8.object({
|
|
6160
|
+
versionId: z8.string(),
|
|
6161
|
+
existing: z8.boolean(),
|
|
6162
|
+
uploads: z8.object({
|
|
6137
6163
|
archive: presignedUploadSchema,
|
|
6138
6164
|
manifest: presignedUploadSchema
|
|
6139
6165
|
}).optional()
|
|
@@ -6150,22 +6176,23 @@ var storagesCommitContract = c4.router({
|
|
|
6150
6176
|
commit: {
|
|
6151
6177
|
method: "POST",
|
|
6152
6178
|
path: "/api/storages/commit",
|
|
6153
|
-
|
|
6154
|
-
|
|
6179
|
+
headers: authHeadersSchema,
|
|
6180
|
+
body: z8.object({
|
|
6181
|
+
storageName: z8.string().min(1, "Storage name is required"),
|
|
6155
6182
|
storageType: storageTypeSchema,
|
|
6156
|
-
versionId:
|
|
6157
|
-
files:
|
|
6158
|
-
runId:
|
|
6159
|
-
message:
|
|
6183
|
+
versionId: z8.string().min(1, "Version ID is required"),
|
|
6184
|
+
files: z8.array(fileEntryWithHashSchema),
|
|
6185
|
+
runId: z8.string().optional(),
|
|
6186
|
+
message: z8.string().optional()
|
|
6160
6187
|
}),
|
|
6161
6188
|
responses: {
|
|
6162
|
-
200:
|
|
6163
|
-
success:
|
|
6164
|
-
versionId:
|
|
6165
|
-
storageName:
|
|
6166
|
-
size:
|
|
6167
|
-
fileCount:
|
|
6168
|
-
deduplicated:
|
|
6189
|
+
200: z8.object({
|
|
6190
|
+
success: z8.literal(true),
|
|
6191
|
+
versionId: z8.string(),
|
|
6192
|
+
storageName: z8.string(),
|
|
6193
|
+
size: z8.number(),
|
|
6194
|
+
fileCount: z8.number(),
|
|
6195
|
+
deduplicated: z8.boolean().optional()
|
|
6169
6196
|
}),
|
|
6170
6197
|
400: apiErrorSchema,
|
|
6171
6198
|
401: apiErrorSchema,
|
|
@@ -6181,26 +6208,27 @@ var storagesDownloadContract = c4.router({
|
|
|
6181
6208
|
download: {
|
|
6182
6209
|
method: "GET",
|
|
6183
6210
|
path: "/api/storages/download",
|
|
6184
|
-
|
|
6185
|
-
|
|
6211
|
+
headers: authHeadersSchema,
|
|
6212
|
+
query: z8.object({
|
|
6213
|
+
name: z8.string().min(1, "Storage name is required"),
|
|
6186
6214
|
type: storageTypeSchema,
|
|
6187
6215
|
version: versionQuerySchema
|
|
6188
6216
|
}),
|
|
6189
6217
|
responses: {
|
|
6190
6218
|
// Normal response with presigned URL
|
|
6191
|
-
200:
|
|
6192
|
-
|
|
6193
|
-
url:
|
|
6194
|
-
versionId:
|
|
6195
|
-
fileCount:
|
|
6196
|
-
size:
|
|
6219
|
+
200: z8.union([
|
|
6220
|
+
z8.object({
|
|
6221
|
+
url: z8.string().url(),
|
|
6222
|
+
versionId: z8.string(),
|
|
6223
|
+
fileCount: z8.number(),
|
|
6224
|
+
size: z8.number()
|
|
6197
6225
|
}),
|
|
6198
6226
|
// Empty artifact response
|
|
6199
|
-
|
|
6200
|
-
empty:
|
|
6201
|
-
versionId:
|
|
6202
|
-
fileCount:
|
|
6203
|
-
size:
|
|
6227
|
+
z8.object({
|
|
6228
|
+
empty: z8.literal(true),
|
|
6229
|
+
versionId: z8.string(),
|
|
6230
|
+
fileCount: z8.literal(0),
|
|
6231
|
+
size: z8.literal(0)
|
|
6204
6232
|
})
|
|
6205
6233
|
]),
|
|
6206
6234
|
400: apiErrorSchema,
|
|
@@ -6215,16 +6243,17 @@ var storagesListContract = c4.router({
|
|
|
6215
6243
|
list: {
|
|
6216
6244
|
method: "GET",
|
|
6217
6245
|
path: "/api/storages/list",
|
|
6218
|
-
|
|
6246
|
+
headers: authHeadersSchema,
|
|
6247
|
+
query: z8.object({
|
|
6219
6248
|
type: storageTypeSchema
|
|
6220
6249
|
}),
|
|
6221
6250
|
responses: {
|
|
6222
|
-
200:
|
|
6223
|
-
|
|
6224
|
-
name:
|
|
6225
|
-
size:
|
|
6226
|
-
fileCount:
|
|
6227
|
-
updatedAt:
|
|
6251
|
+
200: z8.array(
|
|
6252
|
+
z8.object({
|
|
6253
|
+
name: z8.string(),
|
|
6254
|
+
size: z8.number(),
|
|
6255
|
+
fileCount: z8.number(),
|
|
6256
|
+
updatedAt: z8.string()
|
|
6228
6257
|
})
|
|
6229
6258
|
),
|
|
6230
6259
|
401: apiErrorSchema,
|
|
@@ -6235,18 +6264,18 @@ var storagesListContract = c4.router({
|
|
|
6235
6264
|
});
|
|
6236
6265
|
|
|
6237
6266
|
// ../../packages/core/src/contracts/webhooks.ts
|
|
6238
|
-
import { z as
|
|
6267
|
+
import { z as z9 } from "zod";
|
|
6239
6268
|
var c5 = initContract();
|
|
6240
|
-
var agentEventSchema =
|
|
6241
|
-
type:
|
|
6242
|
-
sequenceNumber:
|
|
6269
|
+
var agentEventSchema = z9.object({
|
|
6270
|
+
type: z9.string(),
|
|
6271
|
+
sequenceNumber: z9.number().int().nonnegative()
|
|
6243
6272
|
}).passthrough();
|
|
6244
|
-
var artifactSnapshotSchema =
|
|
6245
|
-
artifactName:
|
|
6246
|
-
artifactVersion:
|
|
6273
|
+
var artifactSnapshotSchema = z9.object({
|
|
6274
|
+
artifactName: z9.string(),
|
|
6275
|
+
artifactVersion: z9.string()
|
|
6247
6276
|
});
|
|
6248
|
-
var volumeVersionsSnapshotSchema =
|
|
6249
|
-
versions:
|
|
6277
|
+
var volumeVersionsSnapshotSchema = z9.object({
|
|
6278
|
+
versions: z9.record(z9.string(), z9.string())
|
|
6250
6279
|
});
|
|
6251
6280
|
var webhookEventsContract = c5.router({
|
|
6252
6281
|
/**
|
|
@@ -6256,15 +6285,16 @@ var webhookEventsContract = c5.router({
|
|
|
6256
6285
|
send: {
|
|
6257
6286
|
method: "POST",
|
|
6258
6287
|
path: "/api/webhooks/agent/events",
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6288
|
+
headers: authHeadersSchema,
|
|
6289
|
+
body: z9.object({
|
|
6290
|
+
runId: z9.string().min(1, "runId is required"),
|
|
6291
|
+
events: z9.array(agentEventSchema).min(1, "events array cannot be empty")
|
|
6262
6292
|
}),
|
|
6263
6293
|
responses: {
|
|
6264
|
-
200:
|
|
6265
|
-
received:
|
|
6266
|
-
firstSequence:
|
|
6267
|
-
lastSequence:
|
|
6294
|
+
200: z9.object({
|
|
6295
|
+
received: z9.number(),
|
|
6296
|
+
firstSequence: z9.number(),
|
|
6297
|
+
lastSequence: z9.number()
|
|
6268
6298
|
}),
|
|
6269
6299
|
400: apiErrorSchema,
|
|
6270
6300
|
401: apiErrorSchema,
|
|
@@ -6282,15 +6312,16 @@ var webhookCompleteContract = c5.router({
|
|
|
6282
6312
|
complete: {
|
|
6283
6313
|
method: "POST",
|
|
6284
6314
|
path: "/api/webhooks/agent/complete",
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6315
|
+
headers: authHeadersSchema,
|
|
6316
|
+
body: z9.object({
|
|
6317
|
+
runId: z9.string().min(1, "runId is required"),
|
|
6318
|
+
exitCode: z9.number(),
|
|
6319
|
+
error: z9.string().optional()
|
|
6289
6320
|
}),
|
|
6290
6321
|
responses: {
|
|
6291
|
-
200:
|
|
6292
|
-
success:
|
|
6293
|
-
status:
|
|
6322
|
+
200: z9.object({
|
|
6323
|
+
success: z9.boolean(),
|
|
6324
|
+
status: z9.enum(["completed", "failed"])
|
|
6294
6325
|
}),
|
|
6295
6326
|
400: apiErrorSchema,
|
|
6296
6327
|
401: apiErrorSchema,
|
|
@@ -6308,21 +6339,22 @@ var webhookCheckpointsContract = c5.router({
|
|
|
6308
6339
|
create: {
|
|
6309
6340
|
method: "POST",
|
|
6310
6341
|
path: "/api/webhooks/agent/checkpoints",
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6342
|
+
headers: authHeadersSchema,
|
|
6343
|
+
body: z9.object({
|
|
6344
|
+
runId: z9.string().min(1, "runId is required"),
|
|
6345
|
+
cliAgentType: z9.string().min(1, "cliAgentType is required"),
|
|
6346
|
+
cliAgentSessionId: z9.string().min(1, "cliAgentSessionId is required"),
|
|
6347
|
+
cliAgentSessionHistory: z9.string().min(1, "cliAgentSessionHistory is required"),
|
|
6316
6348
|
artifactSnapshot: artifactSnapshotSchema.optional(),
|
|
6317
6349
|
volumeVersionsSnapshot: volumeVersionsSnapshotSchema.optional()
|
|
6318
6350
|
}),
|
|
6319
6351
|
responses: {
|
|
6320
|
-
200:
|
|
6321
|
-
checkpointId:
|
|
6322
|
-
agentSessionId:
|
|
6323
|
-
conversationId:
|
|
6352
|
+
200: z9.object({
|
|
6353
|
+
checkpointId: z9.string(),
|
|
6354
|
+
agentSessionId: z9.string(),
|
|
6355
|
+
conversationId: z9.string(),
|
|
6324
6356
|
artifact: artifactSnapshotSchema.optional(),
|
|
6325
|
-
volumes:
|
|
6357
|
+
volumes: z9.record(z9.string(), z9.string()).optional()
|
|
6326
6358
|
}),
|
|
6327
6359
|
400: apiErrorSchema,
|
|
6328
6360
|
401: apiErrorSchema,
|
|
@@ -6340,12 +6372,13 @@ var webhookHeartbeatContract = c5.router({
|
|
|
6340
6372
|
send: {
|
|
6341
6373
|
method: "POST",
|
|
6342
6374
|
path: "/api/webhooks/agent/heartbeat",
|
|
6343
|
-
|
|
6344
|
-
|
|
6375
|
+
headers: authHeadersSchema,
|
|
6376
|
+
body: z9.object({
|
|
6377
|
+
runId: z9.string().min(1, "runId is required")
|
|
6345
6378
|
}),
|
|
6346
6379
|
responses: {
|
|
6347
|
-
200:
|
|
6348
|
-
ok:
|
|
6380
|
+
200: z9.object({
|
|
6381
|
+
ok: z9.boolean()
|
|
6349
6382
|
}),
|
|
6350
6383
|
400: apiErrorSchema,
|
|
6351
6384
|
401: apiErrorSchema,
|
|
@@ -6369,14 +6402,15 @@ var webhookStoragesContract = c5.router({
|
|
|
6369
6402
|
upload: {
|
|
6370
6403
|
method: "POST",
|
|
6371
6404
|
path: "/api/webhooks/agent/storages",
|
|
6405
|
+
headers: authHeadersSchema,
|
|
6372
6406
|
contentType: "multipart/form-data",
|
|
6373
6407
|
body: c5.type(),
|
|
6374
6408
|
responses: {
|
|
6375
|
-
200:
|
|
6376
|
-
versionId:
|
|
6377
|
-
storageName:
|
|
6378
|
-
size:
|
|
6379
|
-
fileCount:
|
|
6409
|
+
200: z9.object({
|
|
6410
|
+
versionId: z9.string(),
|
|
6411
|
+
storageName: z9.string(),
|
|
6412
|
+
size: z9.number(),
|
|
6413
|
+
fileCount: z9.number()
|
|
6380
6414
|
}),
|
|
6381
6415
|
400: apiErrorSchema,
|
|
6382
6416
|
401: apiErrorSchema,
|
|
@@ -6402,20 +6436,21 @@ var webhookStoragesIncrementalContract = c5.router({
|
|
|
6402
6436
|
upload: {
|
|
6403
6437
|
method: "POST",
|
|
6404
6438
|
path: "/api/webhooks/agent/storages/incremental",
|
|
6439
|
+
headers: authHeadersSchema,
|
|
6405
6440
|
contentType: "multipart/form-data",
|
|
6406
6441
|
body: c5.type(),
|
|
6407
6442
|
responses: {
|
|
6408
|
-
200:
|
|
6409
|
-
versionId:
|
|
6410
|
-
storageName:
|
|
6411
|
-
size:
|
|
6412
|
-
fileCount:
|
|
6413
|
-
incrementalStats:
|
|
6414
|
-
addedFiles:
|
|
6415
|
-
modifiedFiles:
|
|
6416
|
-
deletedFiles:
|
|
6417
|
-
unchangedFiles:
|
|
6418
|
-
bytesUploaded:
|
|
6443
|
+
200: z9.object({
|
|
6444
|
+
versionId: z9.string(),
|
|
6445
|
+
storageName: z9.string(),
|
|
6446
|
+
size: z9.number(),
|
|
6447
|
+
fileCount: z9.number(),
|
|
6448
|
+
incrementalStats: z9.object({
|
|
6449
|
+
addedFiles: z9.number(),
|
|
6450
|
+
modifiedFiles: z9.number(),
|
|
6451
|
+
deletedFiles: z9.number(),
|
|
6452
|
+
unchangedFiles: z9.number(),
|
|
6453
|
+
bytesUploaded: z9.number()
|
|
6419
6454
|
}).optional()
|
|
6420
6455
|
}),
|
|
6421
6456
|
400: apiErrorSchema,
|
|
@@ -6426,36 +6461,36 @@ var webhookStoragesIncrementalContract = c5.router({
|
|
|
6426
6461
|
summary: "Upload storage version incrementally from sandbox"
|
|
6427
6462
|
}
|
|
6428
6463
|
});
|
|
6429
|
-
var metricDataSchema =
|
|
6430
|
-
ts:
|
|
6431
|
-
cpu:
|
|
6432
|
-
mem_used:
|
|
6433
|
-
mem_total:
|
|
6434
|
-
disk_used:
|
|
6435
|
-
disk_total:
|
|
6464
|
+
var metricDataSchema = z9.object({
|
|
6465
|
+
ts: z9.string(),
|
|
6466
|
+
cpu: z9.number(),
|
|
6467
|
+
mem_used: z9.number(),
|
|
6468
|
+
mem_total: z9.number(),
|
|
6469
|
+
disk_used: z9.number(),
|
|
6470
|
+
disk_total: z9.number()
|
|
6436
6471
|
});
|
|
6437
|
-
var sandboxOperationSchema =
|
|
6438
|
-
ts:
|
|
6439
|
-
action_type:
|
|
6440
|
-
duration_ms:
|
|
6441
|
-
success:
|
|
6442
|
-
error:
|
|
6472
|
+
var sandboxOperationSchema = z9.object({
|
|
6473
|
+
ts: z9.string(),
|
|
6474
|
+
action_type: z9.string(),
|
|
6475
|
+
duration_ms: z9.number(),
|
|
6476
|
+
success: z9.boolean(),
|
|
6477
|
+
error: z9.string().optional()
|
|
6443
6478
|
});
|
|
6444
|
-
var networkLogSchema =
|
|
6445
|
-
timestamp:
|
|
6479
|
+
var networkLogSchema = z9.object({
|
|
6480
|
+
timestamp: z9.string(),
|
|
6446
6481
|
// Common fields (all modes)
|
|
6447
|
-
mode:
|
|
6448
|
-
action:
|
|
6449
|
-
host:
|
|
6450
|
-
port:
|
|
6451
|
-
rule_matched:
|
|
6482
|
+
mode: z9.enum(["mitm", "sni"]).optional(),
|
|
6483
|
+
action: z9.enum(["ALLOW", "DENY"]).optional(),
|
|
6484
|
+
host: z9.string().optional(),
|
|
6485
|
+
port: z9.number().optional(),
|
|
6486
|
+
rule_matched: z9.string().nullable().optional(),
|
|
6452
6487
|
// MITM-only fields (optional)
|
|
6453
|
-
method:
|
|
6454
|
-
url:
|
|
6455
|
-
status:
|
|
6456
|
-
latency_ms:
|
|
6457
|
-
request_size:
|
|
6458
|
-
response_size:
|
|
6488
|
+
method: z9.string().optional(),
|
|
6489
|
+
url: z9.string().optional(),
|
|
6490
|
+
status: z9.number().optional(),
|
|
6491
|
+
latency_ms: z9.number().optional(),
|
|
6492
|
+
request_size: z9.number().optional(),
|
|
6493
|
+
response_size: z9.number().optional()
|
|
6459
6494
|
});
|
|
6460
6495
|
var webhookTelemetryContract = c5.router({
|
|
6461
6496
|
/**
|
|
@@ -6465,17 +6500,18 @@ var webhookTelemetryContract = c5.router({
|
|
|
6465
6500
|
send: {
|
|
6466
6501
|
method: "POST",
|
|
6467
6502
|
path: "/api/webhooks/agent/telemetry",
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6503
|
+
headers: authHeadersSchema,
|
|
6504
|
+
body: z9.object({
|
|
6505
|
+
runId: z9.string().min(1, "runId is required"),
|
|
6506
|
+
systemLog: z9.string().optional(),
|
|
6507
|
+
metrics: z9.array(metricDataSchema).optional(),
|
|
6508
|
+
networkLogs: z9.array(networkLogSchema).optional(),
|
|
6509
|
+
sandboxOperations: z9.array(sandboxOperationSchema).optional()
|
|
6474
6510
|
}),
|
|
6475
6511
|
responses: {
|
|
6476
|
-
200:
|
|
6477
|
-
success:
|
|
6478
|
-
id:
|
|
6512
|
+
200: z9.object({
|
|
6513
|
+
success: z9.boolean(),
|
|
6514
|
+
id: z9.string()
|
|
6479
6515
|
}),
|
|
6480
6516
|
400: apiErrorSchema,
|
|
6481
6517
|
401: apiErrorSchema,
|
|
@@ -6489,21 +6525,22 @@ var webhookStoragesPrepareContract = c5.router({
|
|
|
6489
6525
|
prepare: {
|
|
6490
6526
|
method: "POST",
|
|
6491
6527
|
path: "/api/webhooks/agent/storages/prepare",
|
|
6492
|
-
|
|
6493
|
-
|
|
6528
|
+
headers: authHeadersSchema,
|
|
6529
|
+
body: z9.object({
|
|
6530
|
+
runId: z9.string().min(1, "runId is required"),
|
|
6494
6531
|
// Required for webhook auth
|
|
6495
|
-
storageName:
|
|
6532
|
+
storageName: z9.string().min(1, "Storage name is required"),
|
|
6496
6533
|
storageType: storageTypeSchema,
|
|
6497
|
-
files:
|
|
6498
|
-
force:
|
|
6499
|
-
baseVersion:
|
|
6534
|
+
files: z9.array(fileEntryWithHashSchema),
|
|
6535
|
+
force: z9.boolean().optional(),
|
|
6536
|
+
baseVersion: z9.string().optional(),
|
|
6500
6537
|
changes: storageChangesSchema.optional()
|
|
6501
6538
|
}),
|
|
6502
6539
|
responses: {
|
|
6503
|
-
200:
|
|
6504
|
-
versionId:
|
|
6505
|
-
existing:
|
|
6506
|
-
uploads:
|
|
6540
|
+
200: z9.object({
|
|
6541
|
+
versionId: z9.string(),
|
|
6542
|
+
existing: z9.boolean(),
|
|
6543
|
+
uploads: z9.object({
|
|
6507
6544
|
archive: presignedUploadSchema,
|
|
6508
6545
|
manifest: presignedUploadSchema
|
|
6509
6546
|
}).optional()
|
|
@@ -6520,23 +6557,24 @@ var webhookStoragesCommitContract = c5.router({
|
|
|
6520
6557
|
commit: {
|
|
6521
6558
|
method: "POST",
|
|
6522
6559
|
path: "/api/webhooks/agent/storages/commit",
|
|
6523
|
-
|
|
6524
|
-
|
|
6560
|
+
headers: authHeadersSchema,
|
|
6561
|
+
body: z9.object({
|
|
6562
|
+
runId: z9.string().min(1, "runId is required"),
|
|
6525
6563
|
// Required for webhook auth
|
|
6526
|
-
storageName:
|
|
6564
|
+
storageName: z9.string().min(1, "Storage name is required"),
|
|
6527
6565
|
storageType: storageTypeSchema,
|
|
6528
|
-
versionId:
|
|
6529
|
-
files:
|
|
6530
|
-
message:
|
|
6566
|
+
versionId: z9.string().min(1, "Version ID is required"),
|
|
6567
|
+
files: z9.array(fileEntryWithHashSchema),
|
|
6568
|
+
message: z9.string().optional()
|
|
6531
6569
|
}),
|
|
6532
6570
|
responses: {
|
|
6533
|
-
200:
|
|
6534
|
-
success:
|
|
6535
|
-
versionId:
|
|
6536
|
-
storageName:
|
|
6537
|
-
size:
|
|
6538
|
-
fileCount:
|
|
6539
|
-
deduplicated:
|
|
6571
|
+
200: z9.object({
|
|
6572
|
+
success: z9.literal(true),
|
|
6573
|
+
versionId: z9.string(),
|
|
6574
|
+
storageName: z9.string(),
|
|
6575
|
+
size: z9.number(),
|
|
6576
|
+
fileCount: z9.number(),
|
|
6577
|
+
deduplicated: z9.boolean().optional()
|
|
6540
6578
|
}),
|
|
6541
6579
|
400: apiErrorSchema,
|
|
6542
6580
|
401: apiErrorSchema,
|
|
@@ -6550,11 +6588,11 @@ var webhookStoragesCommitContract = c5.router({
|
|
|
6550
6588
|
});
|
|
6551
6589
|
|
|
6552
6590
|
// ../../packages/core/src/contracts/cli-auth.ts
|
|
6553
|
-
import { z as
|
|
6591
|
+
import { z as z10 } from "zod";
|
|
6554
6592
|
var c6 = initContract();
|
|
6555
|
-
var oauthErrorSchema =
|
|
6556
|
-
error:
|
|
6557
|
-
error_description:
|
|
6593
|
+
var oauthErrorSchema = z10.object({
|
|
6594
|
+
error: z10.string(),
|
|
6595
|
+
error_description: z10.string()
|
|
6558
6596
|
});
|
|
6559
6597
|
var cliAuthDeviceContract = c6.router({
|
|
6560
6598
|
/**
|
|
@@ -6564,14 +6602,14 @@ var cliAuthDeviceContract = c6.router({
|
|
|
6564
6602
|
create: {
|
|
6565
6603
|
method: "POST",
|
|
6566
6604
|
path: "/api/cli/auth/device",
|
|
6567
|
-
body:
|
|
6605
|
+
body: z10.object({}).optional(),
|
|
6568
6606
|
responses: {
|
|
6569
|
-
200:
|
|
6570
|
-
device_code:
|
|
6571
|
-
user_code:
|
|
6572
|
-
verification_url:
|
|
6573
|
-
expires_in:
|
|
6574
|
-
interval:
|
|
6607
|
+
200: z10.object({
|
|
6608
|
+
device_code: z10.string(),
|
|
6609
|
+
user_code: z10.string(),
|
|
6610
|
+
verification_url: z10.string(),
|
|
6611
|
+
expires_in: z10.number(),
|
|
6612
|
+
interval: z10.number()
|
|
6575
6613
|
}),
|
|
6576
6614
|
500: oauthErrorSchema
|
|
6577
6615
|
},
|
|
@@ -6586,16 +6624,16 @@ var cliAuthTokenContract = c6.router({
|
|
|
6586
6624
|
exchange: {
|
|
6587
6625
|
method: "POST",
|
|
6588
6626
|
path: "/api/cli/auth/token",
|
|
6589
|
-
body:
|
|
6590
|
-
device_code:
|
|
6627
|
+
body: z10.object({
|
|
6628
|
+
device_code: z10.string().min(1, "device_code is required")
|
|
6591
6629
|
}),
|
|
6592
6630
|
responses: {
|
|
6593
6631
|
// Success - token issued
|
|
6594
|
-
200:
|
|
6595
|
-
access_token:
|
|
6596
|
-
refresh_token:
|
|
6597
|
-
token_type:
|
|
6598
|
-
expires_in:
|
|
6632
|
+
200: z10.object({
|
|
6633
|
+
access_token: z10.string(),
|
|
6634
|
+
refresh_token: z10.string(),
|
|
6635
|
+
token_type: z10.literal("Bearer"),
|
|
6636
|
+
expires_in: z10.number()
|
|
6599
6637
|
}),
|
|
6600
6638
|
// Authorization pending
|
|
6601
6639
|
202: oauthErrorSchema,
|
|
@@ -6608,7 +6646,7 @@ var cliAuthTokenContract = c6.router({
|
|
|
6608
6646
|
});
|
|
6609
6647
|
|
|
6610
6648
|
// ../../packages/core/src/contracts/auth.ts
|
|
6611
|
-
import { z as
|
|
6649
|
+
import { z as z11 } from "zod";
|
|
6612
6650
|
var c7 = initContract();
|
|
6613
6651
|
var authContract = c7.router({
|
|
6614
6652
|
/**
|
|
@@ -6618,10 +6656,11 @@ var authContract = c7.router({
|
|
|
6618
6656
|
me: {
|
|
6619
6657
|
method: "GET",
|
|
6620
6658
|
path: "/api/auth/me",
|
|
6659
|
+
headers: authHeadersSchema,
|
|
6621
6660
|
responses: {
|
|
6622
|
-
200:
|
|
6623
|
-
userId:
|
|
6624
|
-
email:
|
|
6661
|
+
200: z11.object({
|
|
6662
|
+
userId: z11.string(),
|
|
6663
|
+
email: z11.string()
|
|
6625
6664
|
}),
|
|
6626
6665
|
401: apiErrorSchema,
|
|
6627
6666
|
404: apiErrorSchema,
|
|
@@ -6632,18 +6671,18 @@ var authContract = c7.router({
|
|
|
6632
6671
|
});
|
|
6633
6672
|
|
|
6634
6673
|
// ../../packages/core/src/contracts/cron.ts
|
|
6635
|
-
import { z as
|
|
6674
|
+
import { z as z12 } from "zod";
|
|
6636
6675
|
var c8 = initContract();
|
|
6637
|
-
var cleanupResultSchema =
|
|
6638
|
-
runId:
|
|
6639
|
-
sandboxId:
|
|
6640
|
-
status:
|
|
6641
|
-
error:
|
|
6676
|
+
var cleanupResultSchema = z12.object({
|
|
6677
|
+
runId: z12.string(),
|
|
6678
|
+
sandboxId: z12.string().nullable(),
|
|
6679
|
+
status: z12.enum(["cleaned", "error"]),
|
|
6680
|
+
error: z12.string().optional()
|
|
6642
6681
|
});
|
|
6643
|
-
var cleanupResponseSchema =
|
|
6644
|
-
cleaned:
|
|
6645
|
-
errors:
|
|
6646
|
-
results:
|
|
6682
|
+
var cleanupResponseSchema = z12.object({
|
|
6683
|
+
cleaned: z12.number(),
|
|
6684
|
+
errors: z12.number(),
|
|
6685
|
+
results: z12.array(cleanupResultSchema)
|
|
6647
6686
|
});
|
|
6648
6687
|
var cronCleanupSandboxesContract = c8.router({
|
|
6649
6688
|
/**
|
|
@@ -6653,6 +6692,7 @@ var cronCleanupSandboxesContract = c8.router({
|
|
|
6653
6692
|
cleanup: {
|
|
6654
6693
|
method: "GET",
|
|
6655
6694
|
path: "/api/cron/cleanup-sandboxes",
|
|
6695
|
+
headers: authHeadersSchema,
|
|
6656
6696
|
responses: {
|
|
6657
6697
|
200: cleanupResponseSchema,
|
|
6658
6698
|
401: apiErrorSchema,
|
|
@@ -6663,46 +6703,46 @@ var cronCleanupSandboxesContract = c8.router({
|
|
|
6663
6703
|
});
|
|
6664
6704
|
|
|
6665
6705
|
// ../../packages/core/src/contracts/proxy.ts
|
|
6666
|
-
import { z as
|
|
6667
|
-
var proxyErrorSchema =
|
|
6668
|
-
error:
|
|
6669
|
-
message:
|
|
6670
|
-
code:
|
|
6706
|
+
import { z as z13 } from "zod";
|
|
6707
|
+
var proxyErrorSchema = z13.object({
|
|
6708
|
+
error: z13.object({
|
|
6709
|
+
message: z13.string(),
|
|
6710
|
+
code: z13.enum([
|
|
6671
6711
|
"UNAUTHORIZED",
|
|
6672
6712
|
"BAD_REQUEST",
|
|
6673
6713
|
"BAD_GATEWAY",
|
|
6674
6714
|
"INTERNAL_ERROR"
|
|
6675
6715
|
]),
|
|
6676
|
-
targetUrl:
|
|
6716
|
+
targetUrl: z13.string().optional()
|
|
6677
6717
|
})
|
|
6678
6718
|
});
|
|
6679
6719
|
|
|
6680
6720
|
// ../../packages/core/src/contracts/scopes.ts
|
|
6681
|
-
import { z as
|
|
6721
|
+
import { z as z14 } from "zod";
|
|
6682
6722
|
var c9 = initContract();
|
|
6683
|
-
var scopeTypeSchema =
|
|
6684
|
-
var scopeSlugSchema =
|
|
6723
|
+
var scopeTypeSchema = z14.enum(["personal", "organization", "system"]);
|
|
6724
|
+
var scopeSlugSchema = z14.string().min(3, "Scope slug must be at least 3 characters").max(64, "Scope slug must be at most 64 characters").regex(
|
|
6685
6725
|
/^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]{1,2}$/,
|
|
6686
6726
|
"Scope slug must contain only lowercase letters, numbers, and hyphens, and must start and end with an alphanumeric character"
|
|
6687
6727
|
).refine(
|
|
6688
6728
|
(slug) => !slug.startsWith("vm0"),
|
|
6689
6729
|
"Scope slug cannot start with 'vm0' (reserved)"
|
|
6690
6730
|
).transform((s) => s.toLowerCase());
|
|
6691
|
-
var scopeResponseSchema =
|
|
6692
|
-
id:
|
|
6693
|
-
slug:
|
|
6731
|
+
var scopeResponseSchema = z14.object({
|
|
6732
|
+
id: z14.string().uuid(),
|
|
6733
|
+
slug: z14.string(),
|
|
6694
6734
|
type: scopeTypeSchema,
|
|
6695
|
-
displayName:
|
|
6696
|
-
createdAt:
|
|
6697
|
-
updatedAt:
|
|
6735
|
+
displayName: z14.string().nullable(),
|
|
6736
|
+
createdAt: z14.string(),
|
|
6737
|
+
updatedAt: z14.string()
|
|
6698
6738
|
});
|
|
6699
|
-
var createScopeRequestSchema =
|
|
6739
|
+
var createScopeRequestSchema = z14.object({
|
|
6700
6740
|
slug: scopeSlugSchema,
|
|
6701
|
-
displayName:
|
|
6741
|
+
displayName: z14.string().max(128).optional()
|
|
6702
6742
|
});
|
|
6703
|
-
var updateScopeRequestSchema =
|
|
6743
|
+
var updateScopeRequestSchema = z14.object({
|
|
6704
6744
|
slug: scopeSlugSchema,
|
|
6705
|
-
force:
|
|
6745
|
+
force: z14.boolean().optional().default(false)
|
|
6706
6746
|
});
|
|
6707
6747
|
var scopeContract = c9.router({
|
|
6708
6748
|
/**
|
|
@@ -6712,6 +6752,7 @@ var scopeContract = c9.router({
|
|
|
6712
6752
|
get: {
|
|
6713
6753
|
method: "GET",
|
|
6714
6754
|
path: "/api/scope",
|
|
6755
|
+
headers: authHeadersSchema,
|
|
6715
6756
|
responses: {
|
|
6716
6757
|
200: scopeResponseSchema,
|
|
6717
6758
|
401: apiErrorSchema,
|
|
@@ -6727,6 +6768,7 @@ var scopeContract = c9.router({
|
|
|
6727
6768
|
create: {
|
|
6728
6769
|
method: "POST",
|
|
6729
6770
|
path: "/api/scope",
|
|
6771
|
+
headers: authHeadersSchema,
|
|
6730
6772
|
body: createScopeRequestSchema,
|
|
6731
6773
|
responses: {
|
|
6732
6774
|
201: scopeResponseSchema,
|
|
@@ -6744,6 +6786,7 @@ var scopeContract = c9.router({
|
|
|
6744
6786
|
update: {
|
|
6745
6787
|
method: "PUT",
|
|
6746
6788
|
path: "/api/scope",
|
|
6789
|
+
headers: authHeadersSchema,
|
|
6747
6790
|
body: updateScopeRequestSchema,
|
|
6748
6791
|
responses: {
|
|
6749
6792
|
200: scopeResponseSchema,
|
|
@@ -6759,28 +6802,28 @@ var scopeContract = c9.router({
|
|
|
6759
6802
|
});
|
|
6760
6803
|
|
|
6761
6804
|
// ../../packages/core/src/contracts/credentials.ts
|
|
6762
|
-
import { z as
|
|
6805
|
+
import { z as z15 } from "zod";
|
|
6763
6806
|
var c10 = initContract();
|
|
6764
|
-
var credentialNameSchema =
|
|
6807
|
+
var credentialNameSchema = z15.string().min(1, "Credential name is required").max(255, "Credential name must be at most 255 characters").regex(
|
|
6765
6808
|
/^[A-Z][A-Z0-9_]*$/,
|
|
6766
6809
|
"Credential name must contain only uppercase letters, numbers, and underscores, and must start with a letter (e.g., MY_API_KEY)"
|
|
6767
6810
|
);
|
|
6768
|
-
var credentialTypeSchema =
|
|
6769
|
-
var credentialResponseSchema =
|
|
6770
|
-
id:
|
|
6771
|
-
name:
|
|
6772
|
-
description:
|
|
6811
|
+
var credentialTypeSchema = z15.enum(["user", "model-provider"]);
|
|
6812
|
+
var credentialResponseSchema = z15.object({
|
|
6813
|
+
id: z15.string().uuid(),
|
|
6814
|
+
name: z15.string(),
|
|
6815
|
+
description: z15.string().nullable(),
|
|
6773
6816
|
type: credentialTypeSchema,
|
|
6774
|
-
createdAt:
|
|
6775
|
-
updatedAt:
|
|
6817
|
+
createdAt: z15.string(),
|
|
6818
|
+
updatedAt: z15.string()
|
|
6776
6819
|
});
|
|
6777
|
-
var credentialListResponseSchema =
|
|
6778
|
-
credentials:
|
|
6820
|
+
var credentialListResponseSchema = z15.object({
|
|
6821
|
+
credentials: z15.array(credentialResponseSchema)
|
|
6779
6822
|
});
|
|
6780
|
-
var setCredentialRequestSchema =
|
|
6823
|
+
var setCredentialRequestSchema = z15.object({
|
|
6781
6824
|
name: credentialNameSchema,
|
|
6782
|
-
value:
|
|
6783
|
-
description:
|
|
6825
|
+
value: z15.string().min(1, "Credential value is required"),
|
|
6826
|
+
description: z15.string().max(1e3).optional()
|
|
6784
6827
|
});
|
|
6785
6828
|
var credentialsMainContract = c10.router({
|
|
6786
6829
|
/**
|
|
@@ -6790,6 +6833,7 @@ var credentialsMainContract = c10.router({
|
|
|
6790
6833
|
list: {
|
|
6791
6834
|
method: "GET",
|
|
6792
6835
|
path: "/api/credentials",
|
|
6836
|
+
headers: authHeadersSchema,
|
|
6793
6837
|
responses: {
|
|
6794
6838
|
200: credentialListResponseSchema,
|
|
6795
6839
|
401: apiErrorSchema,
|
|
@@ -6804,6 +6848,7 @@ var credentialsMainContract = c10.router({
|
|
|
6804
6848
|
set: {
|
|
6805
6849
|
method: "PUT",
|
|
6806
6850
|
path: "/api/credentials",
|
|
6851
|
+
headers: authHeadersSchema,
|
|
6807
6852
|
body: setCredentialRequestSchema,
|
|
6808
6853
|
responses: {
|
|
6809
6854
|
200: credentialResponseSchema,
|
|
@@ -6823,7 +6868,8 @@ var credentialsByNameContract = c10.router({
|
|
|
6823
6868
|
get: {
|
|
6824
6869
|
method: "GET",
|
|
6825
6870
|
path: "/api/credentials/:name",
|
|
6826
|
-
|
|
6871
|
+
headers: authHeadersSchema,
|
|
6872
|
+
pathParams: z15.object({
|
|
6827
6873
|
name: credentialNameSchema
|
|
6828
6874
|
}),
|
|
6829
6875
|
responses: {
|
|
@@ -6841,11 +6887,12 @@ var credentialsByNameContract = c10.router({
|
|
|
6841
6887
|
delete: {
|
|
6842
6888
|
method: "DELETE",
|
|
6843
6889
|
path: "/api/credentials/:name",
|
|
6844
|
-
|
|
6890
|
+
headers: authHeadersSchema,
|
|
6891
|
+
pathParams: z15.object({
|
|
6845
6892
|
name: credentialNameSchema
|
|
6846
6893
|
}),
|
|
6847
6894
|
responses: {
|
|
6848
|
-
204:
|
|
6895
|
+
204: z15.undefined(),
|
|
6849
6896
|
401: apiErrorSchema,
|
|
6850
6897
|
404: apiErrorSchema,
|
|
6851
6898
|
500: apiErrorSchema
|
|
@@ -6855,44 +6902,45 @@ var credentialsByNameContract = c10.router({
|
|
|
6855
6902
|
});
|
|
6856
6903
|
|
|
6857
6904
|
// ../../packages/core/src/contracts/model-providers.ts
|
|
6858
|
-
import { z as
|
|
6905
|
+
import { z as z16 } from "zod";
|
|
6859
6906
|
var c11 = initContract();
|
|
6860
|
-
var modelProviderTypeSchema =
|
|
6907
|
+
var modelProviderTypeSchema = z16.enum([
|
|
6861
6908
|
"claude-code-oauth-token",
|
|
6862
6909
|
"anthropic-api-key",
|
|
6863
6910
|
"openai-api-key"
|
|
6864
6911
|
]);
|
|
6865
|
-
var modelProviderFrameworkSchema =
|
|
6866
|
-
var modelProviderResponseSchema =
|
|
6867
|
-
id:
|
|
6912
|
+
var modelProviderFrameworkSchema = z16.enum(["claude-code", "codex"]);
|
|
6913
|
+
var modelProviderResponseSchema = z16.object({
|
|
6914
|
+
id: z16.string().uuid(),
|
|
6868
6915
|
type: modelProviderTypeSchema,
|
|
6869
6916
|
framework: modelProviderFrameworkSchema,
|
|
6870
|
-
credentialName:
|
|
6871
|
-
isDefault:
|
|
6872
|
-
createdAt:
|
|
6873
|
-
updatedAt:
|
|
6917
|
+
credentialName: z16.string(),
|
|
6918
|
+
isDefault: z16.boolean(),
|
|
6919
|
+
createdAt: z16.string(),
|
|
6920
|
+
updatedAt: z16.string()
|
|
6874
6921
|
});
|
|
6875
|
-
var modelProviderListResponseSchema =
|
|
6876
|
-
modelProviders:
|
|
6922
|
+
var modelProviderListResponseSchema = z16.object({
|
|
6923
|
+
modelProviders: z16.array(modelProviderResponseSchema)
|
|
6877
6924
|
});
|
|
6878
|
-
var upsertModelProviderRequestSchema =
|
|
6925
|
+
var upsertModelProviderRequestSchema = z16.object({
|
|
6879
6926
|
type: modelProviderTypeSchema,
|
|
6880
|
-
credential:
|
|
6881
|
-
convert:
|
|
6927
|
+
credential: z16.string().min(1, "Credential is required"),
|
|
6928
|
+
convert: z16.boolean().optional()
|
|
6882
6929
|
});
|
|
6883
|
-
var upsertModelProviderResponseSchema =
|
|
6930
|
+
var upsertModelProviderResponseSchema = z16.object({
|
|
6884
6931
|
provider: modelProviderResponseSchema,
|
|
6885
|
-
created:
|
|
6932
|
+
created: z16.boolean()
|
|
6886
6933
|
});
|
|
6887
|
-
var checkCredentialResponseSchema =
|
|
6888
|
-
exists:
|
|
6889
|
-
credentialName:
|
|
6890
|
-
currentType:
|
|
6934
|
+
var checkCredentialResponseSchema = z16.object({
|
|
6935
|
+
exists: z16.boolean(),
|
|
6936
|
+
credentialName: z16.string(),
|
|
6937
|
+
currentType: z16.enum(["user", "model-provider"]).optional()
|
|
6891
6938
|
});
|
|
6892
6939
|
var modelProvidersMainContract = c11.router({
|
|
6893
6940
|
list: {
|
|
6894
6941
|
method: "GET",
|
|
6895
6942
|
path: "/api/model-providers",
|
|
6943
|
+
headers: authHeadersSchema,
|
|
6896
6944
|
responses: {
|
|
6897
6945
|
200: modelProviderListResponseSchema,
|
|
6898
6946
|
401: apiErrorSchema,
|
|
@@ -6903,6 +6951,7 @@ var modelProvidersMainContract = c11.router({
|
|
|
6903
6951
|
upsert: {
|
|
6904
6952
|
method: "PUT",
|
|
6905
6953
|
path: "/api/model-providers",
|
|
6954
|
+
headers: authHeadersSchema,
|
|
6906
6955
|
body: upsertModelProviderRequestSchema,
|
|
6907
6956
|
responses: {
|
|
6908
6957
|
200: upsertModelProviderResponseSchema,
|
|
@@ -6919,7 +6968,8 @@ var modelProvidersCheckContract = c11.router({
|
|
|
6919
6968
|
check: {
|
|
6920
6969
|
method: "GET",
|
|
6921
6970
|
path: "/api/model-providers/check/:type",
|
|
6922
|
-
|
|
6971
|
+
headers: authHeadersSchema,
|
|
6972
|
+
pathParams: z16.object({
|
|
6923
6973
|
type: modelProviderTypeSchema
|
|
6924
6974
|
}),
|
|
6925
6975
|
responses: {
|
|
@@ -6934,11 +6984,12 @@ var modelProvidersByTypeContract = c11.router({
|
|
|
6934
6984
|
delete: {
|
|
6935
6985
|
method: "DELETE",
|
|
6936
6986
|
path: "/api/model-providers/:type",
|
|
6937
|
-
|
|
6987
|
+
headers: authHeadersSchema,
|
|
6988
|
+
pathParams: z16.object({
|
|
6938
6989
|
type: modelProviderTypeSchema
|
|
6939
6990
|
}),
|
|
6940
6991
|
responses: {
|
|
6941
|
-
204:
|
|
6992
|
+
204: z16.undefined(),
|
|
6942
6993
|
401: apiErrorSchema,
|
|
6943
6994
|
404: apiErrorSchema,
|
|
6944
6995
|
500: apiErrorSchema
|
|
@@ -6950,10 +7001,11 @@ var modelProvidersConvertContract = c11.router({
|
|
|
6950
7001
|
convert: {
|
|
6951
7002
|
method: "POST",
|
|
6952
7003
|
path: "/api/model-providers/:type/convert",
|
|
6953
|
-
|
|
7004
|
+
headers: authHeadersSchema,
|
|
7005
|
+
pathParams: z16.object({
|
|
6954
7006
|
type: modelProviderTypeSchema
|
|
6955
7007
|
}),
|
|
6956
|
-
body:
|
|
7008
|
+
body: z16.undefined(),
|
|
6957
7009
|
responses: {
|
|
6958
7010
|
200: modelProviderResponseSchema,
|
|
6959
7011
|
400: apiErrorSchema,
|
|
@@ -6968,10 +7020,11 @@ var modelProvidersSetDefaultContract = c11.router({
|
|
|
6968
7020
|
setDefault: {
|
|
6969
7021
|
method: "POST",
|
|
6970
7022
|
path: "/api/model-providers/:type/set-default",
|
|
6971
|
-
|
|
7023
|
+
headers: authHeadersSchema,
|
|
7024
|
+
pathParams: z16.object({
|
|
6972
7025
|
type: modelProviderTypeSchema
|
|
6973
7026
|
}),
|
|
6974
|
-
body:
|
|
7027
|
+
body: z16.undefined(),
|
|
6975
7028
|
responses: {
|
|
6976
7029
|
200: modelProviderResponseSchema,
|
|
6977
7030
|
401: apiErrorSchema,
|
|
@@ -6983,40 +7036,40 @@ var modelProvidersSetDefaultContract = c11.router({
|
|
|
6983
7036
|
});
|
|
6984
7037
|
|
|
6985
7038
|
// ../../packages/core/src/contracts/sessions.ts
|
|
6986
|
-
import { z as
|
|
7039
|
+
import { z as z17 } from "zod";
|
|
6987
7040
|
var c12 = initContract();
|
|
6988
|
-
var sessionResponseSchema =
|
|
6989
|
-
id:
|
|
6990
|
-
agentComposeId:
|
|
6991
|
-
agentComposeVersionId:
|
|
6992
|
-
conversationId:
|
|
6993
|
-
artifactName:
|
|
6994
|
-
vars:
|
|
6995
|
-
secretNames:
|
|
6996
|
-
volumeVersions:
|
|
6997
|
-
createdAt:
|
|
6998
|
-
updatedAt:
|
|
7041
|
+
var sessionResponseSchema = z17.object({
|
|
7042
|
+
id: z17.string(),
|
|
7043
|
+
agentComposeId: z17.string(),
|
|
7044
|
+
agentComposeVersionId: z17.string().nullable(),
|
|
7045
|
+
conversationId: z17.string().nullable(),
|
|
7046
|
+
artifactName: z17.string().nullable(),
|
|
7047
|
+
vars: z17.record(z17.string(), z17.string()).nullable(),
|
|
7048
|
+
secretNames: z17.array(z17.string()).nullable(),
|
|
7049
|
+
volumeVersions: z17.record(z17.string(), z17.string()).nullable(),
|
|
7050
|
+
createdAt: z17.string(),
|
|
7051
|
+
updatedAt: z17.string()
|
|
6999
7052
|
});
|
|
7000
|
-
var agentComposeSnapshotSchema =
|
|
7001
|
-
agentComposeVersionId:
|
|
7002
|
-
vars:
|
|
7003
|
-
secretNames:
|
|
7053
|
+
var agentComposeSnapshotSchema = z17.object({
|
|
7054
|
+
agentComposeVersionId: z17.string(),
|
|
7055
|
+
vars: z17.record(z17.string(), z17.string()).optional(),
|
|
7056
|
+
secretNames: z17.array(z17.string()).optional()
|
|
7004
7057
|
});
|
|
7005
|
-
var artifactSnapshotSchema2 =
|
|
7006
|
-
artifactName:
|
|
7007
|
-
artifactVersion:
|
|
7058
|
+
var artifactSnapshotSchema2 = z17.object({
|
|
7059
|
+
artifactName: z17.string(),
|
|
7060
|
+
artifactVersion: z17.string()
|
|
7008
7061
|
});
|
|
7009
|
-
var volumeVersionsSnapshotSchema2 =
|
|
7010
|
-
versions:
|
|
7062
|
+
var volumeVersionsSnapshotSchema2 = z17.object({
|
|
7063
|
+
versions: z17.record(z17.string(), z17.string())
|
|
7011
7064
|
});
|
|
7012
|
-
var checkpointResponseSchema =
|
|
7013
|
-
id:
|
|
7014
|
-
runId:
|
|
7015
|
-
conversationId:
|
|
7065
|
+
var checkpointResponseSchema = z17.object({
|
|
7066
|
+
id: z17.string(),
|
|
7067
|
+
runId: z17.string(),
|
|
7068
|
+
conversationId: z17.string(),
|
|
7016
7069
|
agentComposeSnapshot: agentComposeSnapshotSchema,
|
|
7017
7070
|
artifactSnapshot: artifactSnapshotSchema2.nullable(),
|
|
7018
7071
|
volumeVersionsSnapshot: volumeVersionsSnapshotSchema2.nullable(),
|
|
7019
|
-
createdAt:
|
|
7072
|
+
createdAt: z17.string()
|
|
7020
7073
|
});
|
|
7021
7074
|
var sessionsByIdContract = c12.router({
|
|
7022
7075
|
/**
|
|
@@ -7026,8 +7079,9 @@ var sessionsByIdContract = c12.router({
|
|
|
7026
7079
|
getById: {
|
|
7027
7080
|
method: "GET",
|
|
7028
7081
|
path: "/api/agent/sessions/:id",
|
|
7029
|
-
|
|
7030
|
-
|
|
7082
|
+
headers: authHeadersSchema,
|
|
7083
|
+
pathParams: z17.object({
|
|
7084
|
+
id: z17.string().min(1, "Session ID is required")
|
|
7031
7085
|
}),
|
|
7032
7086
|
responses: {
|
|
7033
7087
|
200: sessionResponseSchema,
|
|
@@ -7046,8 +7100,9 @@ var checkpointsByIdContract = c12.router({
|
|
|
7046
7100
|
getById: {
|
|
7047
7101
|
method: "GET",
|
|
7048
7102
|
path: "/api/agent/checkpoints/:id",
|
|
7049
|
-
|
|
7050
|
-
|
|
7103
|
+
headers: authHeadersSchema,
|
|
7104
|
+
pathParams: z17.object({
|
|
7105
|
+
id: z17.string().min(1, "Checkpoint ID is required")
|
|
7051
7106
|
}),
|
|
7052
7107
|
responses: {
|
|
7053
7108
|
200: checkpointResponseSchema,
|
|
@@ -7060,88 +7115,88 @@ var checkpointsByIdContract = c12.router({
|
|
|
7060
7115
|
});
|
|
7061
7116
|
|
|
7062
7117
|
// ../../packages/core/src/contracts/schedules.ts
|
|
7063
|
-
import { z as
|
|
7118
|
+
import { z as z18 } from "zod";
|
|
7064
7119
|
var c13 = initContract();
|
|
7065
|
-
var scheduleTriggerSchema =
|
|
7066
|
-
cron:
|
|
7067
|
-
at:
|
|
7068
|
-
timezone:
|
|
7120
|
+
var scheduleTriggerSchema = z18.object({
|
|
7121
|
+
cron: z18.string().optional(),
|
|
7122
|
+
at: z18.string().optional(),
|
|
7123
|
+
timezone: z18.string().default("UTC")
|
|
7069
7124
|
}).refine((data) => data.cron && !data.at || !data.cron && data.at, {
|
|
7070
7125
|
message: "Exactly one of 'cron' or 'at' must be specified"
|
|
7071
7126
|
});
|
|
7072
|
-
var scheduleRunConfigSchema =
|
|
7073
|
-
agent:
|
|
7074
|
-
prompt:
|
|
7075
|
-
vars:
|
|
7076
|
-
secrets:
|
|
7077
|
-
artifactName:
|
|
7078
|
-
artifactVersion:
|
|
7079
|
-
volumeVersions:
|
|
7127
|
+
var scheduleRunConfigSchema = z18.object({
|
|
7128
|
+
agent: z18.string().min(1, "Agent reference required"),
|
|
7129
|
+
prompt: z18.string().min(1, "Prompt required"),
|
|
7130
|
+
vars: z18.record(z18.string(), z18.string()).optional(),
|
|
7131
|
+
secrets: z18.record(z18.string(), z18.string()).optional(),
|
|
7132
|
+
artifactName: z18.string().optional(),
|
|
7133
|
+
artifactVersion: z18.string().optional(),
|
|
7134
|
+
volumeVersions: z18.record(z18.string(), z18.string()).optional()
|
|
7080
7135
|
});
|
|
7081
|
-
var scheduleDefinitionSchema =
|
|
7136
|
+
var scheduleDefinitionSchema = z18.object({
|
|
7082
7137
|
on: scheduleTriggerSchema,
|
|
7083
7138
|
run: scheduleRunConfigSchema
|
|
7084
7139
|
});
|
|
7085
|
-
var scheduleYamlSchema =
|
|
7086
|
-
version:
|
|
7087
|
-
schedules:
|
|
7088
|
-
});
|
|
7089
|
-
var deployScheduleRequestSchema =
|
|
7090
|
-
name:
|
|
7091
|
-
cronExpression:
|
|
7092
|
-
atTime:
|
|
7093
|
-
timezone:
|
|
7094
|
-
prompt:
|
|
7095
|
-
vars:
|
|
7096
|
-
secrets:
|
|
7097
|
-
artifactName:
|
|
7098
|
-
artifactVersion:
|
|
7099
|
-
volumeVersions:
|
|
7140
|
+
var scheduleYamlSchema = z18.object({
|
|
7141
|
+
version: z18.literal("1.0"),
|
|
7142
|
+
schedules: z18.record(z18.string(), scheduleDefinitionSchema)
|
|
7143
|
+
});
|
|
7144
|
+
var deployScheduleRequestSchema = z18.object({
|
|
7145
|
+
name: z18.string().min(1).max(64, "Schedule name max 64 chars"),
|
|
7146
|
+
cronExpression: z18.string().optional(),
|
|
7147
|
+
atTime: z18.string().optional(),
|
|
7148
|
+
timezone: z18.string().default("UTC"),
|
|
7149
|
+
prompt: z18.string().min(1, "Prompt required"),
|
|
7150
|
+
vars: z18.record(z18.string(), z18.string()).optional(),
|
|
7151
|
+
secrets: z18.record(z18.string(), z18.string()).optional(),
|
|
7152
|
+
artifactName: z18.string().optional(),
|
|
7153
|
+
artifactVersion: z18.string().optional(),
|
|
7154
|
+
volumeVersions: z18.record(z18.string(), z18.string()).optional(),
|
|
7100
7155
|
// Resolved agent compose ID (CLI resolves scope/name:version → composeId)
|
|
7101
|
-
composeId:
|
|
7156
|
+
composeId: z18.string().uuid("Invalid compose ID")
|
|
7102
7157
|
}).refine(
|
|
7103
7158
|
(data) => data.cronExpression && !data.atTime || !data.cronExpression && data.atTime,
|
|
7104
7159
|
{
|
|
7105
7160
|
message: "Exactly one of 'cronExpression' or 'atTime' must be specified"
|
|
7106
7161
|
}
|
|
7107
7162
|
);
|
|
7108
|
-
var scheduleResponseSchema =
|
|
7109
|
-
id:
|
|
7110
|
-
composeId:
|
|
7111
|
-
composeName:
|
|
7112
|
-
scopeSlug:
|
|
7113
|
-
name:
|
|
7114
|
-
cronExpression:
|
|
7115
|
-
atTime:
|
|
7116
|
-
timezone:
|
|
7117
|
-
prompt:
|
|
7118
|
-
vars:
|
|
7163
|
+
var scheduleResponseSchema = z18.object({
|
|
7164
|
+
id: z18.string().uuid(),
|
|
7165
|
+
composeId: z18.string().uuid(),
|
|
7166
|
+
composeName: z18.string(),
|
|
7167
|
+
scopeSlug: z18.string(),
|
|
7168
|
+
name: z18.string(),
|
|
7169
|
+
cronExpression: z18.string().nullable(),
|
|
7170
|
+
atTime: z18.string().nullable(),
|
|
7171
|
+
timezone: z18.string(),
|
|
7172
|
+
prompt: z18.string(),
|
|
7173
|
+
vars: z18.record(z18.string(), z18.string()).nullable(),
|
|
7119
7174
|
// Secret names only (values are never returned)
|
|
7120
|
-
secretNames:
|
|
7121
|
-
artifactName:
|
|
7122
|
-
artifactVersion:
|
|
7123
|
-
volumeVersions:
|
|
7124
|
-
enabled:
|
|
7125
|
-
nextRunAt:
|
|
7126
|
-
createdAt:
|
|
7127
|
-
updatedAt:
|
|
7128
|
-
});
|
|
7129
|
-
var runSummarySchema =
|
|
7130
|
-
id:
|
|
7131
|
-
status:
|
|
7132
|
-
createdAt:
|
|
7133
|
-
completedAt:
|
|
7134
|
-
error:
|
|
7135
|
-
});
|
|
7136
|
-
var scheduleRunsResponseSchema =
|
|
7137
|
-
runs:
|
|
7138
|
-
});
|
|
7139
|
-
var scheduleListResponseSchema =
|
|
7140
|
-
schedules:
|
|
7141
|
-
});
|
|
7142
|
-
var deployScheduleResponseSchema =
|
|
7175
|
+
secretNames: z18.array(z18.string()).nullable(),
|
|
7176
|
+
artifactName: z18.string().nullable(),
|
|
7177
|
+
artifactVersion: z18.string().nullable(),
|
|
7178
|
+
volumeVersions: z18.record(z18.string(), z18.string()).nullable(),
|
|
7179
|
+
enabled: z18.boolean(),
|
|
7180
|
+
nextRunAt: z18.string().nullable(),
|
|
7181
|
+
createdAt: z18.string(),
|
|
7182
|
+
updatedAt: z18.string()
|
|
7183
|
+
});
|
|
7184
|
+
var runSummarySchema = z18.object({
|
|
7185
|
+
id: z18.string().uuid(),
|
|
7186
|
+
status: z18.enum(["pending", "running", "completed", "failed", "timeout"]),
|
|
7187
|
+
createdAt: z18.string(),
|
|
7188
|
+
completedAt: z18.string().nullable(),
|
|
7189
|
+
error: z18.string().nullable()
|
|
7190
|
+
});
|
|
7191
|
+
var scheduleRunsResponseSchema = z18.object({
|
|
7192
|
+
runs: z18.array(runSummarySchema)
|
|
7193
|
+
});
|
|
7194
|
+
var scheduleListResponseSchema = z18.object({
|
|
7195
|
+
schedules: z18.array(scheduleResponseSchema)
|
|
7196
|
+
});
|
|
7197
|
+
var deployScheduleResponseSchema = z18.object({
|
|
7143
7198
|
schedule: scheduleResponseSchema,
|
|
7144
|
-
created:
|
|
7199
|
+
created: z18.boolean()
|
|
7145
7200
|
// true if created, false if updated
|
|
7146
7201
|
});
|
|
7147
7202
|
var schedulesMainContract = c13.router({
|
|
@@ -7152,6 +7207,7 @@ var schedulesMainContract = c13.router({
|
|
|
7152
7207
|
deploy: {
|
|
7153
7208
|
method: "POST",
|
|
7154
7209
|
path: "/api/agent/schedules",
|
|
7210
|
+
headers: authHeadersSchema,
|
|
7155
7211
|
body: deployScheduleRequestSchema,
|
|
7156
7212
|
responses: {
|
|
7157
7213
|
200: deployScheduleResponseSchema,
|
|
@@ -7173,6 +7229,7 @@ var schedulesMainContract = c13.router({
|
|
|
7173
7229
|
list: {
|
|
7174
7230
|
method: "GET",
|
|
7175
7231
|
path: "/api/agent/schedules",
|
|
7232
|
+
headers: authHeadersSchema,
|
|
7176
7233
|
responses: {
|
|
7177
7234
|
200: scheduleListResponseSchema,
|
|
7178
7235
|
401: apiErrorSchema
|
|
@@ -7188,11 +7245,12 @@ var schedulesByNameContract = c13.router({
|
|
|
7188
7245
|
getByName: {
|
|
7189
7246
|
method: "GET",
|
|
7190
7247
|
path: "/api/agent/schedules/:name",
|
|
7191
|
-
|
|
7192
|
-
|
|
7248
|
+
headers: authHeadersSchema,
|
|
7249
|
+
pathParams: z18.object({
|
|
7250
|
+
name: z18.string().min(1, "Schedule name required")
|
|
7193
7251
|
}),
|
|
7194
|
-
query:
|
|
7195
|
-
composeId:
|
|
7252
|
+
query: z18.object({
|
|
7253
|
+
composeId: z18.string().uuid("Compose ID required")
|
|
7196
7254
|
}),
|
|
7197
7255
|
responses: {
|
|
7198
7256
|
200: scheduleResponseSchema,
|
|
@@ -7208,14 +7266,15 @@ var schedulesByNameContract = c13.router({
|
|
|
7208
7266
|
delete: {
|
|
7209
7267
|
method: "DELETE",
|
|
7210
7268
|
path: "/api/agent/schedules/:name",
|
|
7211
|
-
|
|
7212
|
-
|
|
7269
|
+
headers: authHeadersSchema,
|
|
7270
|
+
pathParams: z18.object({
|
|
7271
|
+
name: z18.string().min(1, "Schedule name required")
|
|
7213
7272
|
}),
|
|
7214
|
-
query:
|
|
7215
|
-
composeId:
|
|
7273
|
+
query: z18.object({
|
|
7274
|
+
composeId: z18.string().uuid("Compose ID required")
|
|
7216
7275
|
}),
|
|
7217
7276
|
responses: {
|
|
7218
|
-
204:
|
|
7277
|
+
204: z18.undefined(),
|
|
7219
7278
|
401: apiErrorSchema,
|
|
7220
7279
|
404: apiErrorSchema
|
|
7221
7280
|
},
|
|
@@ -7230,11 +7289,12 @@ var schedulesEnableContract = c13.router({
|
|
|
7230
7289
|
enable: {
|
|
7231
7290
|
method: "POST",
|
|
7232
7291
|
path: "/api/agent/schedules/:name/enable",
|
|
7233
|
-
|
|
7234
|
-
|
|
7292
|
+
headers: authHeadersSchema,
|
|
7293
|
+
pathParams: z18.object({
|
|
7294
|
+
name: z18.string().min(1, "Schedule name required")
|
|
7235
7295
|
}),
|
|
7236
|
-
body:
|
|
7237
|
-
composeId:
|
|
7296
|
+
body: z18.object({
|
|
7297
|
+
composeId: z18.string().uuid("Compose ID required")
|
|
7238
7298
|
}),
|
|
7239
7299
|
responses: {
|
|
7240
7300
|
200: scheduleResponseSchema,
|
|
@@ -7250,11 +7310,12 @@ var schedulesEnableContract = c13.router({
|
|
|
7250
7310
|
disable: {
|
|
7251
7311
|
method: "POST",
|
|
7252
7312
|
path: "/api/agent/schedules/:name/disable",
|
|
7253
|
-
|
|
7254
|
-
|
|
7313
|
+
headers: authHeadersSchema,
|
|
7314
|
+
pathParams: z18.object({
|
|
7315
|
+
name: z18.string().min(1, "Schedule name required")
|
|
7255
7316
|
}),
|
|
7256
|
-
body:
|
|
7257
|
-
composeId:
|
|
7317
|
+
body: z18.object({
|
|
7318
|
+
composeId: z18.string().uuid("Compose ID required")
|
|
7258
7319
|
}),
|
|
7259
7320
|
responses: {
|
|
7260
7321
|
200: scheduleResponseSchema,
|
|
@@ -7272,12 +7333,13 @@ var scheduleRunsContract = c13.router({
|
|
|
7272
7333
|
listRuns: {
|
|
7273
7334
|
method: "GET",
|
|
7274
7335
|
path: "/api/agent/schedules/:name/runs",
|
|
7275
|
-
|
|
7276
|
-
|
|
7336
|
+
headers: authHeadersSchema,
|
|
7337
|
+
pathParams: z18.object({
|
|
7338
|
+
name: z18.string().min(1, "Schedule name required")
|
|
7277
7339
|
}),
|
|
7278
|
-
query:
|
|
7279
|
-
composeId:
|
|
7280
|
-
limit:
|
|
7340
|
+
query: z18.object({
|
|
7341
|
+
composeId: z18.string().uuid("Compose ID required"),
|
|
7342
|
+
limit: z18.coerce.number().min(0).max(100).default(5)
|
|
7281
7343
|
}),
|
|
7282
7344
|
responses: {
|
|
7283
7345
|
200: scheduleRunsResponseSchema,
|
|
@@ -7289,16 +7351,16 @@ var scheduleRunsContract = c13.router({
|
|
|
7289
7351
|
});
|
|
7290
7352
|
|
|
7291
7353
|
// ../../packages/core/src/contracts/realtime.ts
|
|
7292
|
-
import { z as
|
|
7354
|
+
import { z as z19 } from "zod";
|
|
7293
7355
|
var c14 = initContract();
|
|
7294
|
-
var ablyTokenRequestSchema =
|
|
7295
|
-
keyName:
|
|
7296
|
-
ttl:
|
|
7297
|
-
timestamp:
|
|
7298
|
-
capability:
|
|
7299
|
-
clientId:
|
|
7300
|
-
nonce:
|
|
7301
|
-
mac:
|
|
7356
|
+
var ablyTokenRequestSchema = z19.object({
|
|
7357
|
+
keyName: z19.string(),
|
|
7358
|
+
ttl: z19.number().optional(),
|
|
7359
|
+
timestamp: z19.number(),
|
|
7360
|
+
capability: z19.string(),
|
|
7361
|
+
clientId: z19.string().optional(),
|
|
7362
|
+
nonce: z19.string(),
|
|
7363
|
+
mac: z19.string()
|
|
7302
7364
|
});
|
|
7303
7365
|
var realtimeTokenContract = c14.router({
|
|
7304
7366
|
/**
|
|
@@ -7308,8 +7370,9 @@ var realtimeTokenContract = c14.router({
|
|
|
7308
7370
|
create: {
|
|
7309
7371
|
method: "POST",
|
|
7310
7372
|
path: "/api/realtime/token",
|
|
7311
|
-
|
|
7312
|
-
|
|
7373
|
+
headers: authHeadersSchema,
|
|
7374
|
+
body: z19.object({
|
|
7375
|
+
runId: z19.string().uuid("runId must be a valid UUID")
|
|
7313
7376
|
}),
|
|
7314
7377
|
responses: {
|
|
7315
7378
|
200: ablyTokenRequestSchema,
|
|
@@ -7323,8 +7386,8 @@ var realtimeTokenContract = c14.router({
|
|
|
7323
7386
|
});
|
|
7324
7387
|
|
|
7325
7388
|
// ../../packages/core/src/contracts/public/common.ts
|
|
7326
|
-
import { z as
|
|
7327
|
-
var publicApiErrorTypeSchema =
|
|
7389
|
+
import { z as z20 } from "zod";
|
|
7390
|
+
var publicApiErrorTypeSchema = z20.enum([
|
|
7328
7391
|
"api_error",
|
|
7329
7392
|
// Internal server error (5xx)
|
|
7330
7393
|
"invalid_request_error",
|
|
@@ -7336,58 +7399,59 @@ var publicApiErrorTypeSchema = z19.enum([
|
|
|
7336
7399
|
"conflict_error"
|
|
7337
7400
|
// Resource conflict (409)
|
|
7338
7401
|
]);
|
|
7339
|
-
var publicApiErrorSchema =
|
|
7340
|
-
error:
|
|
7402
|
+
var publicApiErrorSchema = z20.object({
|
|
7403
|
+
error: z20.object({
|
|
7341
7404
|
type: publicApiErrorTypeSchema,
|
|
7342
|
-
code:
|
|
7343
|
-
message:
|
|
7344
|
-
param:
|
|
7345
|
-
doc_url:
|
|
7405
|
+
code: z20.string(),
|
|
7406
|
+
message: z20.string(),
|
|
7407
|
+
param: z20.string().optional(),
|
|
7408
|
+
doc_url: z20.string().url().optional()
|
|
7346
7409
|
})
|
|
7347
7410
|
});
|
|
7348
|
-
var paginationSchema =
|
|
7349
|
-
has_more:
|
|
7350
|
-
next_cursor:
|
|
7411
|
+
var paginationSchema = z20.object({
|
|
7412
|
+
has_more: z20.boolean(),
|
|
7413
|
+
next_cursor: z20.string().nullable()
|
|
7351
7414
|
});
|
|
7352
7415
|
function createPaginatedResponseSchema(dataSchema) {
|
|
7353
|
-
return
|
|
7354
|
-
data:
|
|
7416
|
+
return z20.object({
|
|
7417
|
+
data: z20.array(dataSchema),
|
|
7355
7418
|
pagination: paginationSchema
|
|
7356
7419
|
});
|
|
7357
7420
|
}
|
|
7358
|
-
var listQuerySchema =
|
|
7359
|
-
cursor:
|
|
7360
|
-
limit:
|
|
7421
|
+
var listQuerySchema = z20.object({
|
|
7422
|
+
cursor: z20.string().optional(),
|
|
7423
|
+
limit: z20.coerce.number().min(1).max(100).default(20)
|
|
7361
7424
|
});
|
|
7362
|
-
var requestIdSchema =
|
|
7363
|
-
var timestampSchema =
|
|
7425
|
+
var requestIdSchema = z20.string().uuid();
|
|
7426
|
+
var timestampSchema = z20.string().datetime();
|
|
7364
7427
|
|
|
7365
7428
|
// ../../packages/core/src/contracts/public/agents.ts
|
|
7366
|
-
import { z as
|
|
7429
|
+
import { z as z21 } from "zod";
|
|
7367
7430
|
var c15 = initContract();
|
|
7368
|
-
var publicAgentSchema =
|
|
7369
|
-
id:
|
|
7370
|
-
name:
|
|
7371
|
-
current_version_id:
|
|
7431
|
+
var publicAgentSchema = z21.object({
|
|
7432
|
+
id: z21.string(),
|
|
7433
|
+
name: z21.string(),
|
|
7434
|
+
current_version_id: z21.string().nullable(),
|
|
7372
7435
|
created_at: timestampSchema,
|
|
7373
7436
|
updated_at: timestampSchema
|
|
7374
7437
|
});
|
|
7375
|
-
var agentVersionSchema =
|
|
7376
|
-
id:
|
|
7377
|
-
agent_id:
|
|
7378
|
-
version_number:
|
|
7438
|
+
var agentVersionSchema = z21.object({
|
|
7439
|
+
id: z21.string(),
|
|
7440
|
+
agent_id: z21.string(),
|
|
7441
|
+
version_number: z21.number(),
|
|
7379
7442
|
created_at: timestampSchema
|
|
7380
7443
|
});
|
|
7381
7444
|
var publicAgentDetailSchema = publicAgentSchema;
|
|
7382
7445
|
var paginatedAgentsSchema = createPaginatedResponseSchema(publicAgentSchema);
|
|
7383
7446
|
var paginatedAgentVersionsSchema = createPaginatedResponseSchema(agentVersionSchema);
|
|
7384
7447
|
var agentListQuerySchema = listQuerySchema.extend({
|
|
7385
|
-
name:
|
|
7448
|
+
name: z21.string().optional()
|
|
7386
7449
|
});
|
|
7387
7450
|
var publicAgentsListContract = c15.router({
|
|
7388
7451
|
list: {
|
|
7389
7452
|
method: "GET",
|
|
7390
7453
|
path: "/v1/agents",
|
|
7454
|
+
headers: authHeadersSchema,
|
|
7391
7455
|
query: agentListQuerySchema,
|
|
7392
7456
|
responses: {
|
|
7393
7457
|
200: paginatedAgentsSchema,
|
|
@@ -7402,8 +7466,9 @@ var publicAgentByIdContract = c15.router({
|
|
|
7402
7466
|
get: {
|
|
7403
7467
|
method: "GET",
|
|
7404
7468
|
path: "/v1/agents/:id",
|
|
7405
|
-
|
|
7406
|
-
|
|
7469
|
+
headers: authHeadersSchema,
|
|
7470
|
+
pathParams: z21.object({
|
|
7471
|
+
id: z21.string().min(1, "Agent ID is required")
|
|
7407
7472
|
}),
|
|
7408
7473
|
responses: {
|
|
7409
7474
|
200: publicAgentDetailSchema,
|
|
@@ -7419,8 +7484,9 @@ var publicAgentVersionsContract = c15.router({
|
|
|
7419
7484
|
list: {
|
|
7420
7485
|
method: "GET",
|
|
7421
7486
|
path: "/v1/agents/:id/versions",
|
|
7422
|
-
|
|
7423
|
-
|
|
7487
|
+
headers: authHeadersSchema,
|
|
7488
|
+
pathParams: z21.object({
|
|
7489
|
+
id: z21.string().min(1, "Agent ID is required")
|
|
7424
7490
|
}),
|
|
7425
7491
|
query: listQuerySchema,
|
|
7426
7492
|
responses: {
|
|
@@ -7435,9 +7501,9 @@ var publicAgentVersionsContract = c15.router({
|
|
|
7435
7501
|
});
|
|
7436
7502
|
|
|
7437
7503
|
// ../../packages/core/src/contracts/public/runs.ts
|
|
7438
|
-
import { z as
|
|
7504
|
+
import { z as z22 } from "zod";
|
|
7439
7505
|
var c16 = initContract();
|
|
7440
|
-
var publicRunStatusSchema =
|
|
7506
|
+
var publicRunStatusSchema = z22.enum([
|
|
7441
7507
|
"pending",
|
|
7442
7508
|
"running",
|
|
7443
7509
|
"completed",
|
|
@@ -7445,52 +7511,52 @@ var publicRunStatusSchema = z21.enum([
|
|
|
7445
7511
|
"timeout",
|
|
7446
7512
|
"cancelled"
|
|
7447
7513
|
]);
|
|
7448
|
-
var publicRunSchema =
|
|
7449
|
-
id:
|
|
7450
|
-
agent_id:
|
|
7451
|
-
agent_name:
|
|
7514
|
+
var publicRunSchema = z22.object({
|
|
7515
|
+
id: z22.string(),
|
|
7516
|
+
agent_id: z22.string(),
|
|
7517
|
+
agent_name: z22.string(),
|
|
7452
7518
|
status: publicRunStatusSchema,
|
|
7453
|
-
prompt:
|
|
7519
|
+
prompt: z22.string(),
|
|
7454
7520
|
created_at: timestampSchema,
|
|
7455
7521
|
started_at: timestampSchema.nullable(),
|
|
7456
7522
|
completed_at: timestampSchema.nullable()
|
|
7457
7523
|
});
|
|
7458
7524
|
var publicRunDetailSchema = publicRunSchema.extend({
|
|
7459
|
-
error:
|
|
7460
|
-
execution_time_ms:
|
|
7461
|
-
checkpoint_id:
|
|
7462
|
-
session_id:
|
|
7463
|
-
artifact_name:
|
|
7464
|
-
artifact_version:
|
|
7465
|
-
volumes:
|
|
7525
|
+
error: z22.string().nullable(),
|
|
7526
|
+
execution_time_ms: z22.number().nullable(),
|
|
7527
|
+
checkpoint_id: z22.string().nullable(),
|
|
7528
|
+
session_id: z22.string().nullable(),
|
|
7529
|
+
artifact_name: z22.string().nullable(),
|
|
7530
|
+
artifact_version: z22.string().nullable(),
|
|
7531
|
+
volumes: z22.record(z22.string(), z22.string()).optional()
|
|
7466
7532
|
});
|
|
7467
7533
|
var paginatedRunsSchema = createPaginatedResponseSchema(publicRunSchema);
|
|
7468
|
-
var createRunRequestSchema =
|
|
7534
|
+
var createRunRequestSchema = z22.object({
|
|
7469
7535
|
// Agent identification (one of: agent, agent_id, session_id, checkpoint_id)
|
|
7470
|
-
agent:
|
|
7536
|
+
agent: z22.string().optional(),
|
|
7471
7537
|
// Agent name
|
|
7472
|
-
agent_id:
|
|
7538
|
+
agent_id: z22.string().optional(),
|
|
7473
7539
|
// Agent ID
|
|
7474
|
-
agent_version:
|
|
7540
|
+
agent_version: z22.string().optional(),
|
|
7475
7541
|
// Version specifier (e.g., "latest", "v1", specific ID)
|
|
7476
7542
|
// Continue session
|
|
7477
|
-
session_id:
|
|
7543
|
+
session_id: z22.string().optional(),
|
|
7478
7544
|
// Resume from checkpoint
|
|
7479
|
-
checkpoint_id:
|
|
7545
|
+
checkpoint_id: z22.string().optional(),
|
|
7480
7546
|
// Required
|
|
7481
|
-
prompt:
|
|
7547
|
+
prompt: z22.string().min(1, "Prompt is required"),
|
|
7482
7548
|
// Optional configuration
|
|
7483
|
-
variables:
|
|
7484
|
-
secrets:
|
|
7485
|
-
artifact_name:
|
|
7549
|
+
variables: z22.record(z22.string(), z22.string()).optional(),
|
|
7550
|
+
secrets: z22.record(z22.string(), z22.string()).optional(),
|
|
7551
|
+
artifact_name: z22.string().optional(),
|
|
7486
7552
|
// Artifact name to mount
|
|
7487
|
-
artifact_version:
|
|
7553
|
+
artifact_version: z22.string().optional(),
|
|
7488
7554
|
// Artifact version (defaults to latest)
|
|
7489
|
-
volumes:
|
|
7555
|
+
volumes: z22.record(z22.string(), z22.string()).optional()
|
|
7490
7556
|
// volume_name -> version
|
|
7491
7557
|
});
|
|
7492
7558
|
var runListQuerySchema = listQuerySchema.extend({
|
|
7493
|
-
agent_id:
|
|
7559
|
+
agent_id: z22.string().optional(),
|
|
7494
7560
|
status: publicRunStatusSchema.optional(),
|
|
7495
7561
|
since: timestampSchema.optional()
|
|
7496
7562
|
});
|
|
@@ -7498,6 +7564,7 @@ var publicRunsListContract = c16.router({
|
|
|
7498
7564
|
list: {
|
|
7499
7565
|
method: "GET",
|
|
7500
7566
|
path: "/v1/runs",
|
|
7567
|
+
headers: authHeadersSchema,
|
|
7501
7568
|
query: runListQuerySchema,
|
|
7502
7569
|
responses: {
|
|
7503
7570
|
200: paginatedRunsSchema,
|
|
@@ -7510,6 +7577,7 @@ var publicRunsListContract = c16.router({
|
|
|
7510
7577
|
create: {
|
|
7511
7578
|
method: "POST",
|
|
7512
7579
|
path: "/v1/runs",
|
|
7580
|
+
headers: authHeadersSchema,
|
|
7513
7581
|
body: createRunRequestSchema,
|
|
7514
7582
|
responses: {
|
|
7515
7583
|
202: publicRunDetailSchema,
|
|
@@ -7527,8 +7595,9 @@ var publicRunByIdContract = c16.router({
|
|
|
7527
7595
|
get: {
|
|
7528
7596
|
method: "GET",
|
|
7529
7597
|
path: "/v1/runs/:id",
|
|
7530
|
-
|
|
7531
|
-
|
|
7598
|
+
headers: authHeadersSchema,
|
|
7599
|
+
pathParams: z22.object({
|
|
7600
|
+
id: z22.string().min(1, "Run ID is required")
|
|
7532
7601
|
}),
|
|
7533
7602
|
responses: {
|
|
7534
7603
|
200: publicRunDetailSchema,
|
|
@@ -7544,10 +7613,11 @@ var publicRunCancelContract = c16.router({
|
|
|
7544
7613
|
cancel: {
|
|
7545
7614
|
method: "POST",
|
|
7546
7615
|
path: "/v1/runs/:id/cancel",
|
|
7547
|
-
|
|
7548
|
-
|
|
7616
|
+
headers: authHeadersSchema,
|
|
7617
|
+
pathParams: z22.object({
|
|
7618
|
+
id: z22.string().min(1, "Run ID is required")
|
|
7549
7619
|
}),
|
|
7550
|
-
body:
|
|
7620
|
+
body: z22.undefined(),
|
|
7551
7621
|
responses: {
|
|
7552
7622
|
200: publicRunDetailSchema,
|
|
7553
7623
|
400: publicApiErrorSchema,
|
|
@@ -7560,26 +7630,27 @@ var publicRunCancelContract = c16.router({
|
|
|
7560
7630
|
description: "Cancel a pending or running execution"
|
|
7561
7631
|
}
|
|
7562
7632
|
});
|
|
7563
|
-
var logEntrySchema =
|
|
7633
|
+
var logEntrySchema = z22.object({
|
|
7564
7634
|
timestamp: timestampSchema,
|
|
7565
|
-
type:
|
|
7566
|
-
level:
|
|
7567
|
-
message:
|
|
7568
|
-
metadata:
|
|
7635
|
+
type: z22.enum(["agent", "system", "network"]),
|
|
7636
|
+
level: z22.enum(["debug", "info", "warn", "error"]),
|
|
7637
|
+
message: z22.string(),
|
|
7638
|
+
metadata: z22.record(z22.string(), z22.unknown()).optional()
|
|
7569
7639
|
});
|
|
7570
7640
|
var paginatedLogsSchema = createPaginatedResponseSchema(logEntrySchema);
|
|
7571
7641
|
var logsQuerySchema = listQuerySchema.extend({
|
|
7572
|
-
type:
|
|
7642
|
+
type: z22.enum(["agent", "system", "network", "all"]).default("all"),
|
|
7573
7643
|
since: timestampSchema.optional(),
|
|
7574
7644
|
until: timestampSchema.optional(),
|
|
7575
|
-
order:
|
|
7645
|
+
order: z22.enum(["asc", "desc"]).default("asc")
|
|
7576
7646
|
});
|
|
7577
7647
|
var publicRunLogsContract = c16.router({
|
|
7578
7648
|
getLogs: {
|
|
7579
7649
|
method: "GET",
|
|
7580
7650
|
path: "/v1/runs/:id/logs",
|
|
7581
|
-
|
|
7582
|
-
|
|
7651
|
+
headers: authHeadersSchema,
|
|
7652
|
+
pathParams: z22.object({
|
|
7653
|
+
id: z22.string().min(1, "Run ID is required")
|
|
7583
7654
|
}),
|
|
7584
7655
|
query: logsQuerySchema,
|
|
7585
7656
|
responses: {
|
|
@@ -7592,29 +7663,30 @@ var publicRunLogsContract = c16.router({
|
|
|
7592
7663
|
description: "Get unified logs for a run. Combines agent, system, and network logs."
|
|
7593
7664
|
}
|
|
7594
7665
|
});
|
|
7595
|
-
var metricPointSchema =
|
|
7666
|
+
var metricPointSchema = z22.object({
|
|
7596
7667
|
timestamp: timestampSchema,
|
|
7597
|
-
cpu_percent:
|
|
7598
|
-
memory_used_mb:
|
|
7599
|
-
memory_total_mb:
|
|
7600
|
-
disk_used_mb:
|
|
7601
|
-
disk_total_mb:
|
|
7602
|
-
});
|
|
7603
|
-
var metricsSummarySchema =
|
|
7604
|
-
avg_cpu_percent:
|
|
7605
|
-
max_memory_used_mb:
|
|
7606
|
-
total_duration_ms:
|
|
7607
|
-
});
|
|
7608
|
-
var metricsResponseSchema2 =
|
|
7609
|
-
data:
|
|
7668
|
+
cpu_percent: z22.number(),
|
|
7669
|
+
memory_used_mb: z22.number(),
|
|
7670
|
+
memory_total_mb: z22.number(),
|
|
7671
|
+
disk_used_mb: z22.number(),
|
|
7672
|
+
disk_total_mb: z22.number()
|
|
7673
|
+
});
|
|
7674
|
+
var metricsSummarySchema = z22.object({
|
|
7675
|
+
avg_cpu_percent: z22.number(),
|
|
7676
|
+
max_memory_used_mb: z22.number(),
|
|
7677
|
+
total_duration_ms: z22.number().nullable()
|
|
7678
|
+
});
|
|
7679
|
+
var metricsResponseSchema2 = z22.object({
|
|
7680
|
+
data: z22.array(metricPointSchema),
|
|
7610
7681
|
summary: metricsSummarySchema
|
|
7611
7682
|
});
|
|
7612
7683
|
var publicRunMetricsContract = c16.router({
|
|
7613
7684
|
getMetrics: {
|
|
7614
7685
|
method: "GET",
|
|
7615
7686
|
path: "/v1/runs/:id/metrics",
|
|
7616
|
-
|
|
7617
|
-
|
|
7687
|
+
headers: authHeadersSchema,
|
|
7688
|
+
pathParams: z22.object({
|
|
7689
|
+
id: z22.string().min(1, "Run ID is required")
|
|
7618
7690
|
}),
|
|
7619
7691
|
responses: {
|
|
7620
7692
|
200: metricsResponseSchema2,
|
|
@@ -7626,7 +7698,7 @@ var publicRunMetricsContract = c16.router({
|
|
|
7626
7698
|
description: "Get CPU, memory, and disk metrics for a run"
|
|
7627
7699
|
}
|
|
7628
7700
|
});
|
|
7629
|
-
var sseEventTypeSchema =
|
|
7701
|
+
var sseEventTypeSchema = z22.enum([
|
|
7630
7702
|
"status",
|
|
7631
7703
|
// Run status change
|
|
7632
7704
|
"output",
|
|
@@ -7638,25 +7710,26 @@ var sseEventTypeSchema = z21.enum([
|
|
|
7638
7710
|
"heartbeat"
|
|
7639
7711
|
// Keep-alive
|
|
7640
7712
|
]);
|
|
7641
|
-
var sseEventSchema =
|
|
7713
|
+
var sseEventSchema = z22.object({
|
|
7642
7714
|
event: sseEventTypeSchema,
|
|
7643
|
-
data:
|
|
7644
|
-
id:
|
|
7715
|
+
data: z22.unknown(),
|
|
7716
|
+
id: z22.string().optional()
|
|
7645
7717
|
// For Last-Event-ID reconnection
|
|
7646
7718
|
});
|
|
7647
7719
|
var publicRunEventsContract = c16.router({
|
|
7648
7720
|
streamEvents: {
|
|
7649
7721
|
method: "GET",
|
|
7650
7722
|
path: "/v1/runs/:id/events",
|
|
7651
|
-
|
|
7652
|
-
|
|
7723
|
+
headers: authHeadersSchema,
|
|
7724
|
+
pathParams: z22.object({
|
|
7725
|
+
id: z22.string().min(1, "Run ID is required")
|
|
7653
7726
|
}),
|
|
7654
|
-
query:
|
|
7655
|
-
last_event_id:
|
|
7727
|
+
query: z22.object({
|
|
7728
|
+
last_event_id: z22.string().optional()
|
|
7656
7729
|
// For reconnection
|
|
7657
7730
|
}),
|
|
7658
7731
|
responses: {
|
|
7659
|
-
200:
|
|
7732
|
+
200: z22.any(),
|
|
7660
7733
|
// SSE stream - actual content is text/event-stream
|
|
7661
7734
|
401: publicApiErrorSchema,
|
|
7662
7735
|
404: publicApiErrorSchema,
|
|
@@ -7668,28 +7741,28 @@ var publicRunEventsContract = c16.router({
|
|
|
7668
7741
|
});
|
|
7669
7742
|
|
|
7670
7743
|
// ../../packages/core/src/contracts/public/artifacts.ts
|
|
7671
|
-
import { z as
|
|
7744
|
+
import { z as z23 } from "zod";
|
|
7672
7745
|
var c17 = initContract();
|
|
7673
|
-
var publicArtifactSchema =
|
|
7674
|
-
id:
|
|
7675
|
-
name:
|
|
7676
|
-
current_version_id:
|
|
7677
|
-
size:
|
|
7746
|
+
var publicArtifactSchema = z23.object({
|
|
7747
|
+
id: z23.string(),
|
|
7748
|
+
name: z23.string(),
|
|
7749
|
+
current_version_id: z23.string().nullable(),
|
|
7750
|
+
size: z23.number(),
|
|
7678
7751
|
// Total size in bytes
|
|
7679
|
-
file_count:
|
|
7752
|
+
file_count: z23.number(),
|
|
7680
7753
|
created_at: timestampSchema,
|
|
7681
7754
|
updated_at: timestampSchema
|
|
7682
7755
|
});
|
|
7683
|
-
var artifactVersionSchema =
|
|
7684
|
-
id:
|
|
7756
|
+
var artifactVersionSchema = z23.object({
|
|
7757
|
+
id: z23.string(),
|
|
7685
7758
|
// SHA-256 content hash
|
|
7686
|
-
artifact_id:
|
|
7687
|
-
size:
|
|
7759
|
+
artifact_id: z23.string(),
|
|
7760
|
+
size: z23.number(),
|
|
7688
7761
|
// Size in bytes
|
|
7689
|
-
file_count:
|
|
7690
|
-
message:
|
|
7762
|
+
file_count: z23.number(),
|
|
7763
|
+
message: z23.string().nullable(),
|
|
7691
7764
|
// Optional commit message
|
|
7692
|
-
created_by:
|
|
7765
|
+
created_by: z23.string(),
|
|
7693
7766
|
created_at: timestampSchema
|
|
7694
7767
|
});
|
|
7695
7768
|
var publicArtifactDetailSchema = publicArtifactSchema.extend({
|
|
@@ -7703,6 +7776,7 @@ var publicArtifactsListContract = c17.router({
|
|
|
7703
7776
|
list: {
|
|
7704
7777
|
method: "GET",
|
|
7705
7778
|
path: "/v1/artifacts",
|
|
7779
|
+
headers: authHeadersSchema,
|
|
7706
7780
|
query: listQuerySchema,
|
|
7707
7781
|
responses: {
|
|
7708
7782
|
200: paginatedArtifactsSchema,
|
|
@@ -7717,8 +7791,9 @@ var publicArtifactByIdContract = c17.router({
|
|
|
7717
7791
|
get: {
|
|
7718
7792
|
method: "GET",
|
|
7719
7793
|
path: "/v1/artifacts/:id",
|
|
7720
|
-
|
|
7721
|
-
|
|
7794
|
+
headers: authHeadersSchema,
|
|
7795
|
+
pathParams: z23.object({
|
|
7796
|
+
id: z23.string().min(1, "Artifact ID is required")
|
|
7722
7797
|
}),
|
|
7723
7798
|
responses: {
|
|
7724
7799
|
200: publicArtifactDetailSchema,
|
|
@@ -7734,8 +7809,9 @@ var publicArtifactVersionsContract = c17.router({
|
|
|
7734
7809
|
list: {
|
|
7735
7810
|
method: "GET",
|
|
7736
7811
|
path: "/v1/artifacts/:id/versions",
|
|
7737
|
-
|
|
7738
|
-
|
|
7812
|
+
headers: authHeadersSchema,
|
|
7813
|
+
pathParams: z23.object({
|
|
7814
|
+
id: z23.string().min(1, "Artifact ID is required")
|
|
7739
7815
|
}),
|
|
7740
7816
|
query: listQuerySchema,
|
|
7741
7817
|
responses: {
|
|
@@ -7752,15 +7828,16 @@ var publicArtifactDownloadContract = c17.router({
|
|
|
7752
7828
|
download: {
|
|
7753
7829
|
method: "GET",
|
|
7754
7830
|
path: "/v1/artifacts/:id/download",
|
|
7755
|
-
|
|
7756
|
-
|
|
7831
|
+
headers: authHeadersSchema,
|
|
7832
|
+
pathParams: z23.object({
|
|
7833
|
+
id: z23.string().min(1, "Artifact ID is required")
|
|
7757
7834
|
}),
|
|
7758
|
-
query:
|
|
7759
|
-
version_id:
|
|
7835
|
+
query: z23.object({
|
|
7836
|
+
version_id: z23.string().optional()
|
|
7760
7837
|
// Defaults to current version
|
|
7761
7838
|
}),
|
|
7762
7839
|
responses: {
|
|
7763
|
-
302:
|
|
7840
|
+
302: z23.undefined(),
|
|
7764
7841
|
// Redirect to presigned URL
|
|
7765
7842
|
401: publicApiErrorSchema,
|
|
7766
7843
|
404: publicApiErrorSchema,
|
|
@@ -7772,28 +7849,28 @@ var publicArtifactDownloadContract = c17.router({
|
|
|
7772
7849
|
});
|
|
7773
7850
|
|
|
7774
7851
|
// ../../packages/core/src/contracts/public/volumes.ts
|
|
7775
|
-
import { z as
|
|
7852
|
+
import { z as z24 } from "zod";
|
|
7776
7853
|
var c18 = initContract();
|
|
7777
|
-
var publicVolumeSchema =
|
|
7778
|
-
id:
|
|
7779
|
-
name:
|
|
7780
|
-
current_version_id:
|
|
7781
|
-
size:
|
|
7854
|
+
var publicVolumeSchema = z24.object({
|
|
7855
|
+
id: z24.string(),
|
|
7856
|
+
name: z24.string(),
|
|
7857
|
+
current_version_id: z24.string().nullable(),
|
|
7858
|
+
size: z24.number(),
|
|
7782
7859
|
// Total size in bytes
|
|
7783
|
-
file_count:
|
|
7860
|
+
file_count: z24.number(),
|
|
7784
7861
|
created_at: timestampSchema,
|
|
7785
7862
|
updated_at: timestampSchema
|
|
7786
7863
|
});
|
|
7787
|
-
var volumeVersionSchema =
|
|
7788
|
-
id:
|
|
7864
|
+
var volumeVersionSchema = z24.object({
|
|
7865
|
+
id: z24.string(),
|
|
7789
7866
|
// SHA-256 content hash
|
|
7790
|
-
volume_id:
|
|
7791
|
-
size:
|
|
7867
|
+
volume_id: z24.string(),
|
|
7868
|
+
size: z24.number(),
|
|
7792
7869
|
// Size in bytes
|
|
7793
|
-
file_count:
|
|
7794
|
-
message:
|
|
7870
|
+
file_count: z24.number(),
|
|
7871
|
+
message: z24.string().nullable(),
|
|
7795
7872
|
// Optional commit message
|
|
7796
|
-
created_by:
|
|
7873
|
+
created_by: z24.string(),
|
|
7797
7874
|
created_at: timestampSchema
|
|
7798
7875
|
});
|
|
7799
7876
|
var publicVolumeDetailSchema = publicVolumeSchema.extend({
|
|
@@ -7805,6 +7882,7 @@ var publicVolumesListContract = c18.router({
|
|
|
7805
7882
|
list: {
|
|
7806
7883
|
method: "GET",
|
|
7807
7884
|
path: "/v1/volumes",
|
|
7885
|
+
headers: authHeadersSchema,
|
|
7808
7886
|
query: listQuerySchema,
|
|
7809
7887
|
responses: {
|
|
7810
7888
|
200: paginatedVolumesSchema,
|
|
@@ -7819,8 +7897,9 @@ var publicVolumeByIdContract = c18.router({
|
|
|
7819
7897
|
get: {
|
|
7820
7898
|
method: "GET",
|
|
7821
7899
|
path: "/v1/volumes/:id",
|
|
7822
|
-
|
|
7823
|
-
|
|
7900
|
+
headers: authHeadersSchema,
|
|
7901
|
+
pathParams: z24.object({
|
|
7902
|
+
id: z24.string().min(1, "Volume ID is required")
|
|
7824
7903
|
}),
|
|
7825
7904
|
responses: {
|
|
7826
7905
|
200: publicVolumeDetailSchema,
|
|
@@ -7836,8 +7915,9 @@ var publicVolumeVersionsContract = c18.router({
|
|
|
7836
7915
|
list: {
|
|
7837
7916
|
method: "GET",
|
|
7838
7917
|
path: "/v1/volumes/:id/versions",
|
|
7839
|
-
|
|
7840
|
-
|
|
7918
|
+
headers: authHeadersSchema,
|
|
7919
|
+
pathParams: z24.object({
|
|
7920
|
+
id: z24.string().min(1, "Volume ID is required")
|
|
7841
7921
|
}),
|
|
7842
7922
|
query: listQuerySchema,
|
|
7843
7923
|
responses: {
|
|
@@ -7854,15 +7934,16 @@ var publicVolumeDownloadContract = c18.router({
|
|
|
7854
7934
|
download: {
|
|
7855
7935
|
method: "GET",
|
|
7856
7936
|
path: "/v1/volumes/:id/download",
|
|
7857
|
-
|
|
7858
|
-
|
|
7937
|
+
headers: authHeadersSchema,
|
|
7938
|
+
pathParams: z24.object({
|
|
7939
|
+
id: z24.string().min(1, "Volume ID is required")
|
|
7859
7940
|
}),
|
|
7860
|
-
query:
|
|
7861
|
-
version_id:
|
|
7941
|
+
query: z24.object({
|
|
7942
|
+
version_id: z24.string().optional()
|
|
7862
7943
|
// Defaults to current version
|
|
7863
7944
|
}),
|
|
7864
7945
|
responses: {
|
|
7865
|
-
302:
|
|
7946
|
+
302: z24.undefined(),
|
|
7866
7947
|
// Redirect to presigned URL
|
|
7867
7948
|
401: publicApiErrorSchema,
|
|
7868
7949
|
404: publicApiErrorSchema,
|
|
@@ -10231,7 +10312,7 @@ var benchmarkCommand = new Command4("benchmark").description(
|
|
|
10231
10312
|
});
|
|
10232
10313
|
|
|
10233
10314
|
// src/index.ts
|
|
10234
|
-
var version = true ? "3.0.
|
|
10315
|
+
var version = true ? "3.0.4" : "0.1.0";
|
|
10235
10316
|
program.name("vm0-runner").version(version).description("Self-hosted runner for VM0 agents");
|
|
10236
10317
|
program.addCommand(startCommand);
|
|
10237
10318
|
program.addCommand(doctorCommand);
|