@vm0/runner 3.4.0 → 3.5.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 +64 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -5627,7 +5627,9 @@ var storedExecutionContextSchema = z6.object({
|
|
|
5627
5627
|
cliAgentType: z6.string(),
|
|
5628
5628
|
experimentalFirewall: experimentalFirewallSchema.optional(),
|
|
5629
5629
|
// Debug flag to force real Claude in mock environments (internal use only)
|
|
5630
|
-
debugNoMockClaude: z6.boolean().optional()
|
|
5630
|
+
debugNoMockClaude: z6.boolean().optional(),
|
|
5631
|
+
// Dispatch timestamp for E2E timing metrics
|
|
5632
|
+
apiStartTime: z6.number().optional()
|
|
5631
5633
|
});
|
|
5632
5634
|
var executionContextSchema = z6.object({
|
|
5633
5635
|
runId: z6.string().uuid(),
|
|
@@ -5647,7 +5649,9 @@ var executionContextSchema = z6.object({
|
|
|
5647
5649
|
// Experimental firewall configuration
|
|
5648
5650
|
experimentalFirewall: experimentalFirewallSchema.optional(),
|
|
5649
5651
|
// Debug flag to force real Claude in mock environments (internal use only)
|
|
5650
|
-
debugNoMockClaude: z6.boolean().optional()
|
|
5652
|
+
debugNoMockClaude: z6.boolean().optional(),
|
|
5653
|
+
// Dispatch timestamp for E2E timing metrics
|
|
5654
|
+
apiStartTime: z6.number().optional()
|
|
5651
5655
|
});
|
|
5652
5656
|
var runnersJobClaimContract = c.router({
|
|
5653
5657
|
claim: {
|
|
@@ -5984,7 +5988,36 @@ var eventsResponseSchema = z8.object({
|
|
|
5984
5988
|
run: runStateSchema,
|
|
5985
5989
|
framework: z8.string()
|
|
5986
5990
|
});
|
|
5991
|
+
var runListItemSchema = z8.object({
|
|
5992
|
+
id: z8.string(),
|
|
5993
|
+
agentName: z8.string(),
|
|
5994
|
+
status: runStatusSchema,
|
|
5995
|
+
prompt: z8.string(),
|
|
5996
|
+
createdAt: z8.string(),
|
|
5997
|
+
startedAt: z8.string().nullable()
|
|
5998
|
+
});
|
|
5999
|
+
var runsListResponseSchema = z8.object({
|
|
6000
|
+
runs: z8.array(runListItemSchema)
|
|
6001
|
+
});
|
|
5987
6002
|
var runsMainContract = c3.router({
|
|
6003
|
+
/**
|
|
6004
|
+
* GET /api/agent/runs
|
|
6005
|
+
* List agent runs (pending and running by default)
|
|
6006
|
+
*/
|
|
6007
|
+
list: {
|
|
6008
|
+
method: "GET",
|
|
6009
|
+
path: "/api/agent/runs",
|
|
6010
|
+
headers: authHeadersSchema,
|
|
6011
|
+
query: z8.object({
|
|
6012
|
+
status: runStatusSchema.optional(),
|
|
6013
|
+
limit: z8.coerce.number().min(1).max(100).default(50)
|
|
6014
|
+
}),
|
|
6015
|
+
responses: {
|
|
6016
|
+
200: runsListResponseSchema,
|
|
6017
|
+
401: apiErrorSchema
|
|
6018
|
+
},
|
|
6019
|
+
summary: "List agent runs"
|
|
6020
|
+
},
|
|
5988
6021
|
/**
|
|
5989
6022
|
* POST /api/agent/runs
|
|
5990
6023
|
* Create and execute a new agent run
|
|
@@ -6025,6 +6058,33 @@ var runsByIdContract = c3.router({
|
|
|
6025
6058
|
summary: "Get agent run by ID"
|
|
6026
6059
|
}
|
|
6027
6060
|
});
|
|
6061
|
+
var cancelRunResponseSchema = z8.object({
|
|
6062
|
+
id: z8.string(),
|
|
6063
|
+
status: z8.literal("cancelled"),
|
|
6064
|
+
message: z8.string()
|
|
6065
|
+
});
|
|
6066
|
+
var runsCancelContract = c3.router({
|
|
6067
|
+
/**
|
|
6068
|
+
* POST /api/agent/runs/:id/cancel
|
|
6069
|
+
* Cancel a pending or running run
|
|
6070
|
+
*/
|
|
6071
|
+
cancel: {
|
|
6072
|
+
method: "POST",
|
|
6073
|
+
path: "/api/agent/runs/:id/cancel",
|
|
6074
|
+
headers: authHeadersSchema,
|
|
6075
|
+
pathParams: z8.object({
|
|
6076
|
+
id: z8.string().min(1, "Run ID is required")
|
|
6077
|
+
}),
|
|
6078
|
+
body: z8.undefined(),
|
|
6079
|
+
responses: {
|
|
6080
|
+
200: cancelRunResponseSchema,
|
|
6081
|
+
400: apiErrorSchema,
|
|
6082
|
+
401: apiErrorSchema,
|
|
6083
|
+
404: apiErrorSchema
|
|
6084
|
+
},
|
|
6085
|
+
summary: "Cancel a pending or running run"
|
|
6086
|
+
}
|
|
6087
|
+
});
|
|
6028
6088
|
var runEventsContract = c3.router({
|
|
6029
6089
|
/**
|
|
6030
6090
|
* GET /api/agent/runs/:id/events
|
|
@@ -9276,6 +9336,7 @@ function buildEnvironmentVariables(context, apiUrl) {
|
|
|
9276
9336
|
VM0_API_TOKEN: context.sandboxToken,
|
|
9277
9337
|
VM0_PROMPT: context.prompt,
|
|
9278
9338
|
VM0_WORKING_DIR: context.workingDir,
|
|
9339
|
+
VM0_API_START_TIME: context.apiStartTime?.toString() ?? "",
|
|
9279
9340
|
CLI_AGENT_TYPE: context.cliAgentType || "claude-code"
|
|
9280
9341
|
};
|
|
9281
9342
|
const vercelBypass = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
|
|
@@ -10659,7 +10720,7 @@ var benchmarkCommand = new Command4("benchmark").description(
|
|
|
10659
10720
|
});
|
|
10660
10721
|
|
|
10661
10722
|
// src/index.ts
|
|
10662
|
-
var version = true ? "3.
|
|
10723
|
+
var version = true ? "3.5.0" : "0.1.0";
|
|
10663
10724
|
program.name("vm0-runner").version(version).description("Self-hosted runner for VM0 agents");
|
|
10664
10725
|
program.addCommand(startCommand);
|
|
10665
10726
|
program.addCommand(doctorCommand);
|