@vm0/runner 2.2.0 → 2.2.2
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 +135 -236
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4783,11 +4783,32 @@ var volumeConfigSchema = z4.object({
|
|
|
4783
4783
|
name: z4.string().min(1, "Volume name is required"),
|
|
4784
4784
|
version: z4.string().min(1, "Volume version is required")
|
|
4785
4785
|
});
|
|
4786
|
+
var SUPPORTED_APPS = ["github"];
|
|
4787
|
+
var appStringSchema = z4.string().regex(
|
|
4788
|
+
/^[a-z]+(:(?:latest|dev))?$/,
|
|
4789
|
+
"App must be in format 'app' or 'app:tag' (e.g., 'github', 'github:dev')"
|
|
4790
|
+
).refine(
|
|
4791
|
+
(val) => {
|
|
4792
|
+
const [app] = val.split(":");
|
|
4793
|
+
return SUPPORTED_APPS.includes(app);
|
|
4794
|
+
},
|
|
4795
|
+
`Unsupported app. Supported apps: ${SUPPORTED_APPS.join(", ")}`
|
|
4796
|
+
);
|
|
4786
4797
|
var agentDefinitionSchema = z4.object({
|
|
4787
4798
|
description: z4.string().optional(),
|
|
4799
|
+
/**
|
|
4800
|
+
* @deprecated Use `apps` field instead for pre-installed tools.
|
|
4801
|
+
* This field will be removed in a future version.
|
|
4802
|
+
*/
|
|
4788
4803
|
image: z4.string().optional(),
|
|
4789
|
-
// Optional when provider supports auto-config
|
|
4790
4804
|
provider: z4.string().min(1, "Provider is required"),
|
|
4805
|
+
/**
|
|
4806
|
+
* Array of pre-installed apps/tools for the agent environment.
|
|
4807
|
+
* Format: "app" or "app:tag" (e.g., "github", "github:dev", "github:latest")
|
|
4808
|
+
* Default tag is "latest" if not specified.
|
|
4809
|
+
* Currently supported apps: "github" (includes GitHub CLI)
|
|
4810
|
+
*/
|
|
4811
|
+
apps: z4.array(appStringSchema).optional(),
|
|
4791
4812
|
volumes: z4.array(z4.string()).optional(),
|
|
4792
4813
|
working_dir: z4.string().optional(),
|
|
4793
4814
|
// Optional when provider supports auto-config
|
|
@@ -5806,143 +5827,21 @@ var authContract = c6.router({
|
|
|
5806
5827
|
}
|
|
5807
5828
|
});
|
|
5808
5829
|
|
|
5809
|
-
// ../../packages/core/src/contracts/
|
|
5830
|
+
// ../../packages/core/src/contracts/cron.ts
|
|
5810
5831
|
import { z as z10 } from "zod";
|
|
5811
5832
|
var c7 = initContract();
|
|
5812
|
-
var
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
versionId: z10.string().nullable(),
|
|
5817
|
-
// null for legacy images without versioning
|
|
5818
|
-
status: z10.string(),
|
|
5819
|
-
errorMessage: z10.string().nullable(),
|
|
5820
|
-
createdAt: z10.coerce.date(),
|
|
5821
|
-
updatedAt: z10.coerce.date()
|
|
5822
|
-
});
|
|
5823
|
-
var createImageRequestSchema = z10.object({
|
|
5824
|
-
dockerfile: z10.string().min(1, "dockerfile is required"),
|
|
5825
|
-
alias: z10.string().min(3, "alias must be at least 3 characters").max(64, "alias must be at most 64 characters").regex(
|
|
5826
|
-
/^[a-zA-Z0-9][a-zA-Z0-9-]{1,62}[a-zA-Z0-9]$/,
|
|
5827
|
-
"alias must be 3-64 characters, alphanumeric and hyphens, start/end with alphanumeric"
|
|
5828
|
-
).refine(
|
|
5829
|
-
(val) => !val.toLowerCase().startsWith("vm0-"),
|
|
5830
|
-
'alias cannot start with "vm0-" (reserved for system templates)'
|
|
5831
|
-
).transform((s) => s.toLowerCase()),
|
|
5832
|
-
deleteExisting: z10.boolean().optional()
|
|
5833
|
-
});
|
|
5834
|
-
var createImageResponseSchema = z10.object({
|
|
5835
|
-
buildId: z10.string(),
|
|
5836
|
-
imageId: z10.string(),
|
|
5837
|
-
alias: z10.string(),
|
|
5838
|
-
versionId: z10.string()
|
|
5839
|
-
// nanoid(8), unique per build
|
|
5840
|
-
});
|
|
5841
|
-
var buildStatusResponseSchema = z10.object({
|
|
5842
|
-
status: buildStatusSchema,
|
|
5843
|
-
logs: z10.array(z10.string()),
|
|
5844
|
-
logsOffset: z10.number(),
|
|
5833
|
+
var cleanupResultSchema = z10.object({
|
|
5834
|
+
runId: z10.string(),
|
|
5835
|
+
sandboxId: z10.string().nullable(),
|
|
5836
|
+
status: z10.enum(["cleaned", "error"]),
|
|
5845
5837
|
error: z10.string().optional()
|
|
5846
5838
|
});
|
|
5847
|
-
var
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
*/
|
|
5852
|
-
list: {
|
|
5853
|
-
method: "GET",
|
|
5854
|
-
path: "/api/images",
|
|
5855
|
-
responses: {
|
|
5856
|
-
200: z10.object({
|
|
5857
|
-
images: z10.array(imageInfoSchema)
|
|
5858
|
-
}),
|
|
5859
|
-
401: apiErrorSchema,
|
|
5860
|
-
500: apiErrorSchema
|
|
5861
|
-
},
|
|
5862
|
-
summary: "List user images"
|
|
5863
|
-
},
|
|
5864
|
-
/**
|
|
5865
|
-
* POST /api/images
|
|
5866
|
-
* Create an image build task from a Dockerfile
|
|
5867
|
-
*/
|
|
5868
|
-
create: {
|
|
5869
|
-
method: "POST",
|
|
5870
|
-
path: "/api/images",
|
|
5871
|
-
body: createImageRequestSchema,
|
|
5872
|
-
responses: {
|
|
5873
|
-
202: createImageResponseSchema,
|
|
5874
|
-
400: apiErrorSchema,
|
|
5875
|
-
401: apiErrorSchema,
|
|
5876
|
-
500: apiErrorSchema
|
|
5877
|
-
},
|
|
5878
|
-
summary: "Create image build"
|
|
5879
|
-
}
|
|
5880
|
-
});
|
|
5881
|
-
var imagesByIdContract = c7.router({
|
|
5882
|
-
/**
|
|
5883
|
-
* DELETE /api/images/:imageId
|
|
5884
|
-
* Delete an image by ID
|
|
5885
|
-
*/
|
|
5886
|
-
delete: {
|
|
5887
|
-
method: "DELETE",
|
|
5888
|
-
path: "/api/images/:imageId",
|
|
5889
|
-
pathParams: z10.object({
|
|
5890
|
-
imageId: z10.string().min(1, "imageId is required")
|
|
5891
|
-
}),
|
|
5892
|
-
responses: {
|
|
5893
|
-
200: z10.object({
|
|
5894
|
-
deleted: z10.boolean()
|
|
5895
|
-
}),
|
|
5896
|
-
400: apiErrorSchema,
|
|
5897
|
-
401: apiErrorSchema,
|
|
5898
|
-
403: apiErrorSchema,
|
|
5899
|
-
404: apiErrorSchema,
|
|
5900
|
-
500: apiErrorSchema
|
|
5901
|
-
},
|
|
5902
|
-
summary: "Delete image"
|
|
5903
|
-
}
|
|
5904
|
-
});
|
|
5905
|
-
var imageBuildsContract = c7.router({
|
|
5906
|
-
/**
|
|
5907
|
-
* GET /api/images/:imageId/builds/:buildId
|
|
5908
|
-
* Query build status with incremental logs
|
|
5909
|
-
*/
|
|
5910
|
-
getStatus: {
|
|
5911
|
-
method: "GET",
|
|
5912
|
-
path: "/api/images/:imageId/builds/:buildId",
|
|
5913
|
-
pathParams: z10.object({
|
|
5914
|
-
imageId: z10.string().min(1, "imageId is required"),
|
|
5915
|
-
buildId: z10.string().min(1, "buildId is required")
|
|
5916
|
-
}),
|
|
5917
|
-
query: z10.object({
|
|
5918
|
-
logsOffset: z10.coerce.number().int().min(0).optional().default(0)
|
|
5919
|
-
}),
|
|
5920
|
-
responses: {
|
|
5921
|
-
200: buildStatusResponseSchema,
|
|
5922
|
-
400: apiErrorSchema,
|
|
5923
|
-
401: apiErrorSchema,
|
|
5924
|
-
404: apiErrorSchema,
|
|
5925
|
-
500: apiErrorSchema
|
|
5926
|
-
},
|
|
5927
|
-
summary: "Get build status"
|
|
5928
|
-
}
|
|
5839
|
+
var cleanupResponseSchema = z10.object({
|
|
5840
|
+
cleaned: z10.number(),
|
|
5841
|
+
errors: z10.number(),
|
|
5842
|
+
results: z10.array(cleanupResultSchema)
|
|
5929
5843
|
});
|
|
5930
|
-
|
|
5931
|
-
// ../../packages/core/src/contracts/cron.ts
|
|
5932
|
-
import { z as z11 } from "zod";
|
|
5933
|
-
var c8 = initContract();
|
|
5934
|
-
var cleanupResultSchema = z11.object({
|
|
5935
|
-
runId: z11.string(),
|
|
5936
|
-
sandboxId: z11.string().nullable(),
|
|
5937
|
-
status: z11.enum(["cleaned", "error"]),
|
|
5938
|
-
error: z11.string().optional()
|
|
5939
|
-
});
|
|
5940
|
-
var cleanupResponseSchema = z11.object({
|
|
5941
|
-
cleaned: z11.number(),
|
|
5942
|
-
errors: z11.number(),
|
|
5943
|
-
results: z11.array(cleanupResultSchema)
|
|
5944
|
-
});
|
|
5945
|
-
var cronCleanupSandboxesContract = c8.router({
|
|
5844
|
+
var cronCleanupSandboxesContract = c7.router({
|
|
5946
5845
|
/**
|
|
5947
5846
|
* GET /api/cron/cleanup-sandboxes
|
|
5948
5847
|
* Cron job to cleanup sandboxes that have stopped sending heartbeats
|
|
@@ -5960,48 +5859,48 @@ var cronCleanupSandboxesContract = c8.router({
|
|
|
5960
5859
|
});
|
|
5961
5860
|
|
|
5962
5861
|
// ../../packages/core/src/contracts/proxy.ts
|
|
5963
|
-
import { z as
|
|
5964
|
-
var proxyErrorSchema =
|
|
5965
|
-
error:
|
|
5966
|
-
message:
|
|
5967
|
-
code:
|
|
5862
|
+
import { z as z11 } from "zod";
|
|
5863
|
+
var proxyErrorSchema = z11.object({
|
|
5864
|
+
error: z11.object({
|
|
5865
|
+
message: z11.string(),
|
|
5866
|
+
code: z11.enum([
|
|
5968
5867
|
"UNAUTHORIZED",
|
|
5969
5868
|
"BAD_REQUEST",
|
|
5970
5869
|
"BAD_GATEWAY",
|
|
5971
5870
|
"INTERNAL_ERROR"
|
|
5972
5871
|
]),
|
|
5973
|
-
targetUrl:
|
|
5872
|
+
targetUrl: z11.string().optional()
|
|
5974
5873
|
})
|
|
5975
5874
|
});
|
|
5976
5875
|
|
|
5977
5876
|
// ../../packages/core/src/contracts/scopes.ts
|
|
5978
|
-
import { z as
|
|
5979
|
-
var
|
|
5980
|
-
var scopeTypeSchema =
|
|
5981
|
-
var scopeSlugSchema =
|
|
5877
|
+
import { z as z12 } from "zod";
|
|
5878
|
+
var c8 = initContract();
|
|
5879
|
+
var scopeTypeSchema = z12.enum(["personal", "organization", "system"]);
|
|
5880
|
+
var scopeSlugSchema = z12.string().min(3, "Scope slug must be at least 3 characters").max(64, "Scope slug must be at most 64 characters").regex(
|
|
5982
5881
|
/^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]{1,2}$/,
|
|
5983
5882
|
"Scope slug must contain only lowercase letters, numbers, and hyphens, and must start and end with an alphanumeric character"
|
|
5984
5883
|
).refine(
|
|
5985
5884
|
(slug) => !slug.startsWith("vm0"),
|
|
5986
5885
|
"Scope slug cannot start with 'vm0' (reserved)"
|
|
5987
5886
|
).transform((s) => s.toLowerCase());
|
|
5988
|
-
var scopeResponseSchema =
|
|
5989
|
-
id:
|
|
5990
|
-
slug:
|
|
5887
|
+
var scopeResponseSchema = z12.object({
|
|
5888
|
+
id: z12.string().uuid(),
|
|
5889
|
+
slug: z12.string(),
|
|
5991
5890
|
type: scopeTypeSchema,
|
|
5992
|
-
displayName:
|
|
5993
|
-
createdAt:
|
|
5994
|
-
updatedAt:
|
|
5891
|
+
displayName: z12.string().nullable(),
|
|
5892
|
+
createdAt: z12.string(),
|
|
5893
|
+
updatedAt: z12.string()
|
|
5995
5894
|
});
|
|
5996
|
-
var createScopeRequestSchema =
|
|
5895
|
+
var createScopeRequestSchema = z12.object({
|
|
5997
5896
|
slug: scopeSlugSchema,
|
|
5998
|
-
displayName:
|
|
5897
|
+
displayName: z12.string().max(128).optional()
|
|
5999
5898
|
});
|
|
6000
|
-
var updateScopeRequestSchema =
|
|
5899
|
+
var updateScopeRequestSchema = z12.object({
|
|
6001
5900
|
slug: scopeSlugSchema,
|
|
6002
|
-
force:
|
|
5901
|
+
force: z12.boolean().optional().default(false)
|
|
6003
5902
|
});
|
|
6004
|
-
var scopeContract =
|
|
5903
|
+
var scopeContract = c8.router({
|
|
6005
5904
|
/**
|
|
6006
5905
|
* GET /api/scope
|
|
6007
5906
|
* Get current user's scope
|
|
@@ -6056,42 +5955,42 @@ var scopeContract = c9.router({
|
|
|
6056
5955
|
});
|
|
6057
5956
|
|
|
6058
5957
|
// ../../packages/core/src/contracts/sessions.ts
|
|
6059
|
-
import { z as
|
|
6060
|
-
var
|
|
6061
|
-
var sessionResponseSchema =
|
|
6062
|
-
id:
|
|
6063
|
-
agentComposeId:
|
|
6064
|
-
agentComposeVersionId:
|
|
6065
|
-
conversationId:
|
|
6066
|
-
artifactName:
|
|
6067
|
-
vars:
|
|
6068
|
-
secretNames:
|
|
6069
|
-
volumeVersions:
|
|
6070
|
-
createdAt:
|
|
6071
|
-
updatedAt:
|
|
5958
|
+
import { z as z13 } from "zod";
|
|
5959
|
+
var c9 = initContract();
|
|
5960
|
+
var sessionResponseSchema = z13.object({
|
|
5961
|
+
id: z13.string(),
|
|
5962
|
+
agentComposeId: z13.string(),
|
|
5963
|
+
agentComposeVersionId: z13.string().nullable(),
|
|
5964
|
+
conversationId: z13.string().nullable(),
|
|
5965
|
+
artifactName: z13.string().nullable(),
|
|
5966
|
+
vars: z13.record(z13.string(), z13.string()).nullable(),
|
|
5967
|
+
secretNames: z13.array(z13.string()).nullable(),
|
|
5968
|
+
volumeVersions: z13.record(z13.string(), z13.string()).nullable(),
|
|
5969
|
+
createdAt: z13.string(),
|
|
5970
|
+
updatedAt: z13.string()
|
|
6072
5971
|
});
|
|
6073
|
-
var agentComposeSnapshotSchema =
|
|
6074
|
-
agentComposeVersionId:
|
|
6075
|
-
vars:
|
|
6076
|
-
secretNames:
|
|
5972
|
+
var agentComposeSnapshotSchema = z13.object({
|
|
5973
|
+
agentComposeVersionId: z13.string(),
|
|
5974
|
+
vars: z13.record(z13.string(), z13.string()).optional(),
|
|
5975
|
+
secretNames: z13.array(z13.string()).optional()
|
|
6077
5976
|
});
|
|
6078
|
-
var artifactSnapshotSchema2 =
|
|
6079
|
-
artifactName:
|
|
6080
|
-
artifactVersion:
|
|
5977
|
+
var artifactSnapshotSchema2 = z13.object({
|
|
5978
|
+
artifactName: z13.string(),
|
|
5979
|
+
artifactVersion: z13.string()
|
|
6081
5980
|
});
|
|
6082
|
-
var volumeVersionsSnapshotSchema2 =
|
|
6083
|
-
versions:
|
|
5981
|
+
var volumeVersionsSnapshotSchema2 = z13.object({
|
|
5982
|
+
versions: z13.record(z13.string(), z13.string())
|
|
6084
5983
|
});
|
|
6085
|
-
var checkpointResponseSchema =
|
|
6086
|
-
id:
|
|
6087
|
-
runId:
|
|
6088
|
-
conversationId:
|
|
5984
|
+
var checkpointResponseSchema = z13.object({
|
|
5985
|
+
id: z13.string(),
|
|
5986
|
+
runId: z13.string(),
|
|
5987
|
+
conversationId: z13.string(),
|
|
6089
5988
|
agentComposeSnapshot: agentComposeSnapshotSchema,
|
|
6090
5989
|
artifactSnapshot: artifactSnapshotSchema2.nullable(),
|
|
6091
5990
|
volumeVersionsSnapshot: volumeVersionsSnapshotSchema2.nullable(),
|
|
6092
|
-
createdAt:
|
|
5991
|
+
createdAt: z13.string()
|
|
6093
5992
|
});
|
|
6094
|
-
var sessionsByIdContract =
|
|
5993
|
+
var sessionsByIdContract = c9.router({
|
|
6095
5994
|
/**
|
|
6096
5995
|
* GET /api/agent/sessions/:id
|
|
6097
5996
|
* Get session by ID
|
|
@@ -6099,8 +5998,8 @@ var sessionsByIdContract = c10.router({
|
|
|
6099
5998
|
getById: {
|
|
6100
5999
|
method: "GET",
|
|
6101
6000
|
path: "/api/agent/sessions/:id",
|
|
6102
|
-
pathParams:
|
|
6103
|
-
id:
|
|
6001
|
+
pathParams: z13.object({
|
|
6002
|
+
id: z13.string().min(1, "Session ID is required")
|
|
6104
6003
|
}),
|
|
6105
6004
|
responses: {
|
|
6106
6005
|
200: sessionResponseSchema,
|
|
@@ -6111,7 +6010,7 @@ var sessionsByIdContract = c10.router({
|
|
|
6111
6010
|
summary: "Get session by ID"
|
|
6112
6011
|
}
|
|
6113
6012
|
});
|
|
6114
|
-
var checkpointsByIdContract =
|
|
6013
|
+
var checkpointsByIdContract = c9.router({
|
|
6115
6014
|
/**
|
|
6116
6015
|
* GET /api/agent/checkpoints/:id
|
|
6117
6016
|
* Get checkpoint by ID
|
|
@@ -6119,8 +6018,8 @@ var checkpointsByIdContract = c10.router({
|
|
|
6119
6018
|
getById: {
|
|
6120
6019
|
method: "GET",
|
|
6121
6020
|
path: "/api/agent/checkpoints/:id",
|
|
6122
|
-
pathParams:
|
|
6123
|
-
id:
|
|
6021
|
+
pathParams: z13.object({
|
|
6022
|
+
id: z13.string().min(1, "Checkpoint ID is required")
|
|
6124
6023
|
}),
|
|
6125
6024
|
responses: {
|
|
6126
6025
|
200: checkpointResponseSchema,
|
|
@@ -6133,29 +6032,29 @@ var checkpointsByIdContract = c10.router({
|
|
|
6133
6032
|
});
|
|
6134
6033
|
|
|
6135
6034
|
// ../../packages/core/src/contracts/runners.ts
|
|
6136
|
-
import { z as
|
|
6137
|
-
var
|
|
6138
|
-
var runnerGroupSchema =
|
|
6035
|
+
import { z as z14 } from "zod";
|
|
6036
|
+
var c10 = initContract();
|
|
6037
|
+
var runnerGroupSchema = z14.string().regex(
|
|
6139
6038
|
/^[a-z0-9-]+\/[a-z0-9-]+$/,
|
|
6140
6039
|
"Runner group must be in scope/name format (e.g., acme/production)"
|
|
6141
6040
|
);
|
|
6142
|
-
var jobSchema =
|
|
6143
|
-
runId:
|
|
6144
|
-
prompt:
|
|
6145
|
-
agentComposeVersionId:
|
|
6146
|
-
vars:
|
|
6147
|
-
secretNames:
|
|
6148
|
-
checkpointId:
|
|
6041
|
+
var jobSchema = z14.object({
|
|
6042
|
+
runId: z14.string().uuid(),
|
|
6043
|
+
prompt: z14.string(),
|
|
6044
|
+
agentComposeVersionId: z14.string(),
|
|
6045
|
+
vars: z14.record(z14.string(), z14.string()).nullable(),
|
|
6046
|
+
secretNames: z14.array(z14.string()).nullable(),
|
|
6047
|
+
checkpointId: z14.string().uuid().nullable()
|
|
6149
6048
|
});
|
|
6150
|
-
var runnersPollContract =
|
|
6049
|
+
var runnersPollContract = c10.router({
|
|
6151
6050
|
poll: {
|
|
6152
6051
|
method: "POST",
|
|
6153
6052
|
path: "/api/runners/poll",
|
|
6154
|
-
body:
|
|
6053
|
+
body: z14.object({
|
|
6155
6054
|
group: runnerGroupSchema
|
|
6156
6055
|
}),
|
|
6157
6056
|
responses: {
|
|
6158
|
-
200:
|
|
6057
|
+
200: z14.object({
|
|
6159
6058
|
job: jobSchema.nullable()
|
|
6160
6059
|
}),
|
|
6161
6060
|
400: apiErrorSchema,
|
|
@@ -6165,58 +6064,58 @@ var runnersPollContract = c11.router({
|
|
|
6165
6064
|
summary: "Poll for pending jobs (long-polling with 30s timeout)"
|
|
6166
6065
|
}
|
|
6167
6066
|
});
|
|
6168
|
-
var storageEntrySchema =
|
|
6169
|
-
mountPath:
|
|
6170
|
-
archiveUrl:
|
|
6067
|
+
var storageEntrySchema = z14.object({
|
|
6068
|
+
mountPath: z14.string(),
|
|
6069
|
+
archiveUrl: z14.string().nullable()
|
|
6171
6070
|
});
|
|
6172
|
-
var artifactEntrySchema =
|
|
6173
|
-
mountPath:
|
|
6174
|
-
archiveUrl:
|
|
6175
|
-
vasStorageName:
|
|
6176
|
-
vasVersionId:
|
|
6071
|
+
var artifactEntrySchema = z14.object({
|
|
6072
|
+
mountPath: z14.string(),
|
|
6073
|
+
archiveUrl: z14.string().nullable(),
|
|
6074
|
+
vasStorageName: z14.string(),
|
|
6075
|
+
vasVersionId: z14.string()
|
|
6177
6076
|
});
|
|
6178
|
-
var storageManifestSchema =
|
|
6179
|
-
storages:
|
|
6077
|
+
var storageManifestSchema = z14.object({
|
|
6078
|
+
storages: z14.array(storageEntrySchema),
|
|
6180
6079
|
artifact: artifactEntrySchema.nullable()
|
|
6181
6080
|
});
|
|
6182
|
-
var resumeSessionSchema =
|
|
6183
|
-
sessionId:
|
|
6184
|
-
sessionHistory:
|
|
6081
|
+
var resumeSessionSchema = z14.object({
|
|
6082
|
+
sessionId: z14.string(),
|
|
6083
|
+
sessionHistory: z14.string()
|
|
6185
6084
|
});
|
|
6186
|
-
var storedExecutionContextSchema =
|
|
6187
|
-
workingDir:
|
|
6085
|
+
var storedExecutionContextSchema = z14.object({
|
|
6086
|
+
workingDir: z14.string(),
|
|
6188
6087
|
storageManifest: storageManifestSchema.nullable(),
|
|
6189
|
-
environment:
|
|
6088
|
+
environment: z14.record(z14.string(), z14.string()).nullable(),
|
|
6190
6089
|
resumeSession: resumeSessionSchema.nullable(),
|
|
6191
|
-
encryptedSecrets:
|
|
6090
|
+
encryptedSecrets: z14.string().nullable(),
|
|
6192
6091
|
// AES-256-GCM encrypted secrets
|
|
6193
|
-
cliAgentType:
|
|
6194
|
-
experimentalNetworkSecurity:
|
|
6092
|
+
cliAgentType: z14.string(),
|
|
6093
|
+
experimentalNetworkSecurity: z14.boolean().optional()
|
|
6195
6094
|
});
|
|
6196
|
-
var executionContextSchema =
|
|
6197
|
-
runId:
|
|
6198
|
-
prompt:
|
|
6199
|
-
agentComposeVersionId:
|
|
6200
|
-
vars:
|
|
6201
|
-
secretNames:
|
|
6202
|
-
checkpointId:
|
|
6203
|
-
sandboxToken:
|
|
6095
|
+
var executionContextSchema = z14.object({
|
|
6096
|
+
runId: z14.string().uuid(),
|
|
6097
|
+
prompt: z14.string(),
|
|
6098
|
+
agentComposeVersionId: z14.string(),
|
|
6099
|
+
vars: z14.record(z14.string(), z14.string()).nullable(),
|
|
6100
|
+
secretNames: z14.array(z14.string()).nullable(),
|
|
6101
|
+
checkpointId: z14.string().uuid().nullable(),
|
|
6102
|
+
sandboxToken: z14.string(),
|
|
6204
6103
|
// New fields for E2B parity:
|
|
6205
|
-
workingDir:
|
|
6104
|
+
workingDir: z14.string(),
|
|
6206
6105
|
storageManifest: storageManifestSchema.nullable(),
|
|
6207
|
-
environment:
|
|
6106
|
+
environment: z14.record(z14.string(), z14.string()).nullable(),
|
|
6208
6107
|
resumeSession: resumeSessionSchema.nullable(),
|
|
6209
|
-
secretValues:
|
|
6210
|
-
cliAgentType:
|
|
6108
|
+
secretValues: z14.array(z14.string()).nullable(),
|
|
6109
|
+
cliAgentType: z14.string()
|
|
6211
6110
|
});
|
|
6212
|
-
var runnersJobClaimContract =
|
|
6111
|
+
var runnersJobClaimContract = c10.router({
|
|
6213
6112
|
claim: {
|
|
6214
6113
|
method: "POST",
|
|
6215
6114
|
path: "/api/runners/jobs/:id/claim",
|
|
6216
|
-
pathParams:
|
|
6217
|
-
id:
|
|
6115
|
+
pathParams: z14.object({
|
|
6116
|
+
id: z14.string().uuid()
|
|
6218
6117
|
}),
|
|
6219
|
-
body:
|
|
6118
|
+
body: z14.object({}),
|
|
6220
6119
|
responses: {
|
|
6221
6120
|
200: executionContextSchema,
|
|
6222
6121
|
400: apiErrorSchema,
|
|
@@ -9440,7 +9339,7 @@ var statusCommand = new Command2("status").description("Check runner connectivit
|
|
|
9440
9339
|
});
|
|
9441
9340
|
|
|
9442
9341
|
// src/index.ts
|
|
9443
|
-
var version = true ? "2.2.
|
|
9342
|
+
var version = true ? "2.2.2" : "0.1.0";
|
|
9444
9343
|
program.name("vm0-runner").version(version).description("Self-hosted runner for VM0 agents");
|
|
9445
9344
|
program.addCommand(startCommand);
|
|
9446
9345
|
program.addCommand(statusCommand);
|