@vm0/runner 3.2.0 → 3.3.0
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 +88 -62
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -6687,7 +6687,7 @@ var cliAuthDeviceContract = c6.router({
|
|
|
6687
6687
|
200: z10.object({
|
|
6688
6688
|
device_code: z10.string(),
|
|
6689
6689
|
user_code: z10.string(),
|
|
6690
|
-
|
|
6690
|
+
verification_path: z10.string(),
|
|
6691
6691
|
expires_in: z10.number(),
|
|
6692
6692
|
interval: z10.number()
|
|
6693
6693
|
}),
|
|
@@ -7486,12 +7486,12 @@ var publicApiErrorSchema = z20.object({
|
|
|
7486
7486
|
code: z20.string(),
|
|
7487
7487
|
message: z20.string(),
|
|
7488
7488
|
param: z20.string().optional(),
|
|
7489
|
-
|
|
7489
|
+
docUrl: z20.string().url().optional()
|
|
7490
7490
|
})
|
|
7491
7491
|
});
|
|
7492
7492
|
var paginationSchema = z20.object({
|
|
7493
|
-
|
|
7494
|
-
|
|
7493
|
+
hasMore: z20.boolean(),
|
|
7494
|
+
nextCursor: z20.string().nullable()
|
|
7495
7495
|
});
|
|
7496
7496
|
function createPaginatedResponseSchema(dataSchema) {
|
|
7497
7497
|
return z20.object({
|
|
@@ -7508,6 +7508,11 @@ var timestampSchema = z20.string().datetime();
|
|
|
7508
7508
|
|
|
7509
7509
|
// ../../packages/core/src/contracts/platform.ts
|
|
7510
7510
|
var c15 = initContract();
|
|
7511
|
+
var platformPaginationSchema = z21.object({
|
|
7512
|
+
hasMore: z21.boolean(),
|
|
7513
|
+
nextCursor: z21.string().nullable(),
|
|
7514
|
+
totalPages: z21.number()
|
|
7515
|
+
});
|
|
7511
7516
|
var platformLogStatusSchema = z21.enum([
|
|
7512
7517
|
"pending",
|
|
7513
7518
|
"running",
|
|
@@ -7519,9 +7524,10 @@ var platformLogStatusSchema = z21.enum([
|
|
|
7519
7524
|
var platformLogEntrySchema = z21.object({
|
|
7520
7525
|
id: z21.string().uuid()
|
|
7521
7526
|
});
|
|
7522
|
-
var platformLogsListResponseSchema =
|
|
7523
|
-
platformLogEntrySchema
|
|
7524
|
-
|
|
7527
|
+
var platformLogsListResponseSchema = z21.object({
|
|
7528
|
+
data: z21.array(platformLogEntrySchema),
|
|
7529
|
+
pagination: platformPaginationSchema
|
|
7530
|
+
});
|
|
7525
7531
|
var artifactSchema = z21.object({
|
|
7526
7532
|
name: z21.string().nullable(),
|
|
7527
7533
|
version: z21.string().nullable()
|
|
@@ -7530,7 +7536,7 @@ var platformLogDetailSchema = z21.object({
|
|
|
7530
7536
|
id: z21.string().uuid(),
|
|
7531
7537
|
sessionId: z21.string().nullable(),
|
|
7532
7538
|
agentName: z21.string(),
|
|
7533
|
-
|
|
7539
|
+
framework: z21.string().nullable(),
|
|
7534
7540
|
status: platformLogStatusSchema,
|
|
7535
7541
|
prompt: z21.string(),
|
|
7536
7542
|
error: z21.string().nullable(),
|
|
@@ -7568,6 +7574,26 @@ var platformLogsByIdContract = c15.router({
|
|
|
7568
7574
|
summary: "Get agent run log details by ID"
|
|
7569
7575
|
}
|
|
7570
7576
|
});
|
|
7577
|
+
var artifactDownloadResponseSchema = z21.object({
|
|
7578
|
+
url: z21.string().url(),
|
|
7579
|
+
expiresAt: z21.string()
|
|
7580
|
+
});
|
|
7581
|
+
var platformArtifactDownloadContract = c15.router({
|
|
7582
|
+
getDownloadUrl: {
|
|
7583
|
+
method: "GET",
|
|
7584
|
+
path: "/api/platform/artifacts/download",
|
|
7585
|
+
query: z21.object({
|
|
7586
|
+
name: z21.string().min(1, "Artifact name is required"),
|
|
7587
|
+
version: z21.string().optional()
|
|
7588
|
+
}),
|
|
7589
|
+
responses: {
|
|
7590
|
+
200: artifactDownloadResponseSchema,
|
|
7591
|
+
401: apiErrorSchema,
|
|
7592
|
+
404: apiErrorSchema
|
|
7593
|
+
},
|
|
7594
|
+
summary: "Get presigned URL for artifact download"
|
|
7595
|
+
}
|
|
7596
|
+
});
|
|
7571
7597
|
|
|
7572
7598
|
// ../../packages/core/src/contracts/public/agents.ts
|
|
7573
7599
|
import { z as z22 } from "zod";
|
|
@@ -7575,15 +7601,15 @@ var c16 = initContract();
|
|
|
7575
7601
|
var publicAgentSchema = z22.object({
|
|
7576
7602
|
id: z22.string(),
|
|
7577
7603
|
name: z22.string(),
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7604
|
+
currentVersionId: z22.string().nullable(),
|
|
7605
|
+
createdAt: timestampSchema,
|
|
7606
|
+
updatedAt: timestampSchema
|
|
7581
7607
|
});
|
|
7582
7608
|
var agentVersionSchema = z22.object({
|
|
7583
7609
|
id: z22.string(),
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7610
|
+
agentId: z22.string(),
|
|
7611
|
+
versionNumber: z22.number(),
|
|
7612
|
+
createdAt: timestampSchema
|
|
7587
7613
|
});
|
|
7588
7614
|
var publicAgentDetailSchema = publicAgentSchema;
|
|
7589
7615
|
var paginatedAgentsSchema = createPaginatedResponseSchema(publicAgentSchema);
|
|
@@ -7657,50 +7683,50 @@ var publicRunStatusSchema = z23.enum([
|
|
|
7657
7683
|
]);
|
|
7658
7684
|
var publicRunSchema = z23.object({
|
|
7659
7685
|
id: z23.string(),
|
|
7660
|
-
|
|
7661
|
-
|
|
7686
|
+
agentId: z23.string(),
|
|
7687
|
+
agentName: z23.string(),
|
|
7662
7688
|
status: publicRunStatusSchema,
|
|
7663
7689
|
prompt: z23.string(),
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7690
|
+
createdAt: timestampSchema,
|
|
7691
|
+
startedAt: timestampSchema.nullable(),
|
|
7692
|
+
completedAt: timestampSchema.nullable()
|
|
7667
7693
|
});
|
|
7668
7694
|
var publicRunDetailSchema = publicRunSchema.extend({
|
|
7669
7695
|
error: z23.string().nullable(),
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7696
|
+
executionTimeMs: z23.number().nullable(),
|
|
7697
|
+
checkpointId: z23.string().nullable(),
|
|
7698
|
+
sessionId: z23.string().nullable(),
|
|
7699
|
+
artifactName: z23.string().nullable(),
|
|
7700
|
+
artifactVersion: z23.string().nullable(),
|
|
7675
7701
|
volumes: z23.record(z23.string(), z23.string()).optional()
|
|
7676
7702
|
});
|
|
7677
7703
|
var paginatedRunsSchema = createPaginatedResponseSchema(publicRunSchema);
|
|
7678
7704
|
var createRunRequestSchema = z23.object({
|
|
7679
|
-
// Agent identification (one of: agent,
|
|
7705
|
+
// Agent identification (one of: agent, agentId, sessionId, checkpointId)
|
|
7680
7706
|
agent: z23.string().optional(),
|
|
7681
7707
|
// Agent name
|
|
7682
|
-
|
|
7708
|
+
agentId: z23.string().optional(),
|
|
7683
7709
|
// Agent ID
|
|
7684
|
-
|
|
7710
|
+
agentVersion: z23.string().optional(),
|
|
7685
7711
|
// Version specifier (e.g., "latest", "v1", specific ID)
|
|
7686
7712
|
// Continue session
|
|
7687
|
-
|
|
7713
|
+
sessionId: z23.string().optional(),
|
|
7688
7714
|
// Resume from checkpoint
|
|
7689
|
-
|
|
7715
|
+
checkpointId: z23.string().optional(),
|
|
7690
7716
|
// Required
|
|
7691
7717
|
prompt: z23.string().min(1, "Prompt is required"),
|
|
7692
7718
|
// Optional configuration
|
|
7693
7719
|
variables: z23.record(z23.string(), z23.string()).optional(),
|
|
7694
7720
|
secrets: z23.record(z23.string(), z23.string()).optional(),
|
|
7695
|
-
|
|
7721
|
+
artifactName: z23.string().optional(),
|
|
7696
7722
|
// Artifact name to mount
|
|
7697
|
-
|
|
7723
|
+
artifactVersion: z23.string().optional(),
|
|
7698
7724
|
// Artifact version (defaults to latest)
|
|
7699
7725
|
volumes: z23.record(z23.string(), z23.string()).optional()
|
|
7700
7726
|
// volume_name -> version
|
|
7701
7727
|
});
|
|
7702
7728
|
var runListQuerySchema = listQuerySchema.extend({
|
|
7703
|
-
|
|
7729
|
+
agentId: z23.string().optional(),
|
|
7704
7730
|
status: publicRunStatusSchema.optional(),
|
|
7705
7731
|
since: timestampSchema.optional()
|
|
7706
7732
|
});
|
|
@@ -7809,16 +7835,16 @@ var publicRunLogsContract = c17.router({
|
|
|
7809
7835
|
});
|
|
7810
7836
|
var metricPointSchema = z23.object({
|
|
7811
7837
|
timestamp: timestampSchema,
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7838
|
+
cpuPercent: z23.number(),
|
|
7839
|
+
memoryUsedMb: z23.number(),
|
|
7840
|
+
memoryTotalMb: z23.number(),
|
|
7841
|
+
diskUsedMb: z23.number(),
|
|
7842
|
+
diskTotalMb: z23.number()
|
|
7817
7843
|
});
|
|
7818
7844
|
var metricsSummarySchema = z23.object({
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7845
|
+
avgCpuPercent: z23.number(),
|
|
7846
|
+
maxMemoryUsedMb: z23.number(),
|
|
7847
|
+
totalDurationMs: z23.number().nullable()
|
|
7822
7848
|
});
|
|
7823
7849
|
var metricsResponseSchema2 = z23.object({
|
|
7824
7850
|
data: z23.array(metricPointSchema),
|
|
@@ -7869,7 +7895,7 @@ var publicRunEventsContract = c17.router({
|
|
|
7869
7895
|
id: z23.string().min(1, "Run ID is required")
|
|
7870
7896
|
}),
|
|
7871
7897
|
query: z23.object({
|
|
7872
|
-
|
|
7898
|
+
lastEventId: z23.string().optional()
|
|
7873
7899
|
// For reconnection
|
|
7874
7900
|
}),
|
|
7875
7901
|
responses: {
|
|
@@ -7890,27 +7916,27 @@ var c18 = initContract();
|
|
|
7890
7916
|
var publicArtifactSchema = z24.object({
|
|
7891
7917
|
id: z24.string(),
|
|
7892
7918
|
name: z24.string(),
|
|
7893
|
-
|
|
7919
|
+
currentVersionId: z24.string().nullable(),
|
|
7894
7920
|
size: z24.number(),
|
|
7895
7921
|
// Total size in bytes
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7922
|
+
fileCount: z24.number(),
|
|
7923
|
+
createdAt: timestampSchema,
|
|
7924
|
+
updatedAt: timestampSchema
|
|
7899
7925
|
});
|
|
7900
7926
|
var artifactVersionSchema = z24.object({
|
|
7901
7927
|
id: z24.string(),
|
|
7902
7928
|
// SHA-256 content hash
|
|
7903
|
-
|
|
7929
|
+
artifactId: z24.string(),
|
|
7904
7930
|
size: z24.number(),
|
|
7905
7931
|
// Size in bytes
|
|
7906
|
-
|
|
7932
|
+
fileCount: z24.number(),
|
|
7907
7933
|
message: z24.string().nullable(),
|
|
7908
7934
|
// Optional commit message
|
|
7909
|
-
|
|
7910
|
-
|
|
7935
|
+
createdBy: z24.string(),
|
|
7936
|
+
createdAt: timestampSchema
|
|
7911
7937
|
});
|
|
7912
7938
|
var publicArtifactDetailSchema = publicArtifactSchema.extend({
|
|
7913
|
-
|
|
7939
|
+
currentVersion: artifactVersionSchema.nullable()
|
|
7914
7940
|
});
|
|
7915
7941
|
var paginatedArtifactsSchema = createPaginatedResponseSchema(publicArtifactSchema);
|
|
7916
7942
|
var paginatedArtifactVersionsSchema = createPaginatedResponseSchema(
|
|
@@ -7977,7 +8003,7 @@ var publicArtifactDownloadContract = c18.router({
|
|
|
7977
8003
|
id: z24.string().min(1, "Artifact ID is required")
|
|
7978
8004
|
}),
|
|
7979
8005
|
query: z24.object({
|
|
7980
|
-
|
|
8006
|
+
versionId: z24.string().optional()
|
|
7981
8007
|
// Defaults to current version
|
|
7982
8008
|
}),
|
|
7983
8009
|
responses: {
|
|
@@ -7998,27 +8024,27 @@ var c19 = initContract();
|
|
|
7998
8024
|
var publicVolumeSchema = z25.object({
|
|
7999
8025
|
id: z25.string(),
|
|
8000
8026
|
name: z25.string(),
|
|
8001
|
-
|
|
8027
|
+
currentVersionId: z25.string().nullable(),
|
|
8002
8028
|
size: z25.number(),
|
|
8003
8029
|
// Total size in bytes
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8030
|
+
fileCount: z25.number(),
|
|
8031
|
+
createdAt: timestampSchema,
|
|
8032
|
+
updatedAt: timestampSchema
|
|
8007
8033
|
});
|
|
8008
8034
|
var volumeVersionSchema = z25.object({
|
|
8009
8035
|
id: z25.string(),
|
|
8010
8036
|
// SHA-256 content hash
|
|
8011
|
-
|
|
8037
|
+
volumeId: z25.string(),
|
|
8012
8038
|
size: z25.number(),
|
|
8013
8039
|
// Size in bytes
|
|
8014
|
-
|
|
8040
|
+
fileCount: z25.number(),
|
|
8015
8041
|
message: z25.string().nullable(),
|
|
8016
8042
|
// Optional commit message
|
|
8017
|
-
|
|
8018
|
-
|
|
8043
|
+
createdBy: z25.string(),
|
|
8044
|
+
createdAt: timestampSchema
|
|
8019
8045
|
});
|
|
8020
8046
|
var publicVolumeDetailSchema = publicVolumeSchema.extend({
|
|
8021
|
-
|
|
8047
|
+
currentVersion: volumeVersionSchema.nullable()
|
|
8022
8048
|
});
|
|
8023
8049
|
var paginatedVolumesSchema = createPaginatedResponseSchema(publicVolumeSchema);
|
|
8024
8050
|
var paginatedVolumeVersionsSchema = createPaginatedResponseSchema(volumeVersionSchema);
|
|
@@ -8083,7 +8109,7 @@ var publicVolumeDownloadContract = c19.router({
|
|
|
8083
8109
|
id: z25.string().min(1, "Volume ID is required")
|
|
8084
8110
|
}),
|
|
8085
8111
|
query: z25.object({
|
|
8086
|
-
|
|
8112
|
+
versionId: z25.string().optional()
|
|
8087
8113
|
// Defaults to current version
|
|
8088
8114
|
}),
|
|
8089
8115
|
responses: {
|
|
@@ -10411,7 +10437,7 @@ var benchmarkCommand = new Command4("benchmark").description(
|
|
|
10411
10437
|
});
|
|
10412
10438
|
|
|
10413
10439
|
// src/index.ts
|
|
10414
|
-
var version = true ? "3.
|
|
10440
|
+
var version = true ? "3.3.0" : "0.1.0";
|
|
10415
10441
|
program.name("vm0-runner").version(version).description("Self-hosted runner for VM0 agents");
|
|
10416
10442
|
program.addCommand(startCommand);
|
|
10417
10443
|
program.addCommand(doctorCommand);
|