@vm0/cli 9.74.0 → 9.74.1
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 +263 -137
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -47,7 +47,7 @@ if (DSN) {
|
|
|
47
47
|
Sentry.init({
|
|
48
48
|
dsn: DSN,
|
|
49
49
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
50
|
-
release: "9.74.
|
|
50
|
+
release: "9.74.1",
|
|
51
51
|
sendDefaultPii: false,
|
|
52
52
|
tracesSampleRate: 0,
|
|
53
53
|
shutdownTimeout: 500,
|
|
@@ -66,7 +66,7 @@ if (DSN) {
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
Sentry.setContext("cli", {
|
|
69
|
-
version: "9.74.
|
|
69
|
+
version: "9.74.1",
|
|
70
70
|
command: process.argv.slice(2).join(" ")
|
|
71
71
|
});
|
|
72
72
|
Sentry.setContext("runtime", {
|
|
@@ -906,26 +906,6 @@ var logsByIdContract = c2.router({
|
|
|
906
906
|
summary: "Get agent run log details by ID"
|
|
907
907
|
}
|
|
908
908
|
});
|
|
909
|
-
var artifactDownloadResponseSchema = z5.object({
|
|
910
|
-
url: z5.url(),
|
|
911
|
-
expiresAt: z5.string()
|
|
912
|
-
});
|
|
913
|
-
var artifactDownloadContract = c2.router({
|
|
914
|
-
getDownloadUrl: {
|
|
915
|
-
method: "GET",
|
|
916
|
-
path: "/api/app/artifacts/download",
|
|
917
|
-
query: z5.object({
|
|
918
|
-
name: z5.string().min(1, "Artifact name is required"),
|
|
919
|
-
version: z5.string().optional()
|
|
920
|
-
}),
|
|
921
|
-
responses: {
|
|
922
|
-
200: artifactDownloadResponseSchema,
|
|
923
|
-
401: apiErrorSchema,
|
|
924
|
-
404: apiErrorSchema
|
|
925
|
-
},
|
|
926
|
-
summary: "Get presigned URL for artifact download"
|
|
927
|
-
}
|
|
928
|
-
});
|
|
929
909
|
|
|
930
910
|
// ../../packages/core/src/contracts/orgs.ts
|
|
931
911
|
import { z as z7 } from "zod";
|
|
@@ -937,13 +917,22 @@ var orgRoleSchema = z6.enum(["admin", "member"]);
|
|
|
937
917
|
var orgMemberSchema = z6.object({
|
|
938
918
|
userId: z6.string(),
|
|
939
919
|
email: z6.string(),
|
|
920
|
+
firstName: z6.string().nullable(),
|
|
921
|
+
lastName: z6.string().nullable(),
|
|
922
|
+
imageUrl: z6.string(),
|
|
940
923
|
role: orgRoleSchema,
|
|
941
924
|
joinedAt: z6.string()
|
|
942
925
|
});
|
|
926
|
+
var orgPendingInvitationSchema = z6.object({
|
|
927
|
+
email: z6.string(),
|
|
928
|
+
role: orgRoleSchema,
|
|
929
|
+
createdAt: z6.string()
|
|
930
|
+
});
|
|
943
931
|
var orgMembersResponseSchema = z6.object({
|
|
944
932
|
slug: z6.string(),
|
|
945
933
|
role: orgRoleSchema,
|
|
946
934
|
members: z6.array(orgMemberSchema),
|
|
935
|
+
pendingInvitations: z6.array(orgPendingInvitationSchema).optional(),
|
|
947
936
|
createdAt: z6.string()
|
|
948
937
|
});
|
|
949
938
|
var inviteOrgMemberRequestSchema = z6.object({
|
|
@@ -952,6 +941,10 @@ var inviteOrgMemberRequestSchema = z6.object({
|
|
|
952
941
|
var removeOrgMemberRequestSchema = z6.object({
|
|
953
942
|
email: z6.string().email()
|
|
954
943
|
});
|
|
944
|
+
var updateOrgMemberRoleRequestSchema = z6.object({
|
|
945
|
+
email: z6.string().email(),
|
|
946
|
+
role: orgRoleSchema
|
|
947
|
+
});
|
|
955
948
|
var orgMessageResponseSchema = z6.object({
|
|
956
949
|
message: z6.string()
|
|
957
950
|
});
|
|
@@ -1039,11 +1032,13 @@ var orgSlugSchema = z7.string().min(3, "Org slug must be at least 3 characters")
|
|
|
1039
1032
|
var orgResponseSchema = z7.object({
|
|
1040
1033
|
id: z7.string(),
|
|
1041
1034
|
slug: z7.string(),
|
|
1035
|
+
name: z7.string(),
|
|
1042
1036
|
tier: z7.string().optional(),
|
|
1043
1037
|
role: orgRoleSchema.optional()
|
|
1044
1038
|
});
|
|
1045
1039
|
var updateOrgRequestSchema = z7.object({
|
|
1046
|
-
slug: orgSlugSchema,
|
|
1040
|
+
slug: orgSlugSchema.optional(),
|
|
1041
|
+
name: z7.string().min(1).max(128).optional(),
|
|
1047
1042
|
force: z7.boolean().optional().default(false)
|
|
1048
1043
|
});
|
|
1049
1044
|
var orgContract = c4.router({
|
|
@@ -3106,6 +3101,7 @@ var storedChatMessageSchema2 = z18.object({
|
|
|
3106
3101
|
content: z18.string(),
|
|
3107
3102
|
runId: z18.string().optional(),
|
|
3108
3103
|
error: z18.string().optional(),
|
|
3104
|
+
summaries: z18.array(z18.string()).optional(),
|
|
3109
3105
|
createdAt: z18.string()
|
|
3110
3106
|
});
|
|
3111
3107
|
var unsavedRunSchema = z18.object({
|
|
@@ -7947,6 +7943,7 @@ var zeroConnectorScopeDiffContract = c28.router({
|
|
|
7947
7943
|
});
|
|
7948
7944
|
|
|
7949
7945
|
// ../../packages/core/src/contracts/zero-org.ts
|
|
7946
|
+
import { z as z33 } from "zod";
|
|
7950
7947
|
var c29 = initContract();
|
|
7951
7948
|
var zeroOrgContract = c29.router({
|
|
7952
7949
|
get: {
|
|
@@ -7959,20 +7956,130 @@ var zeroOrgContract = c29.router({
|
|
|
7959
7956
|
404: apiErrorSchema
|
|
7960
7957
|
},
|
|
7961
7958
|
summary: "Get current org (zero proxy)"
|
|
7959
|
+
},
|
|
7960
|
+
update: {
|
|
7961
|
+
method: "PUT",
|
|
7962
|
+
path: "/api/zero/org",
|
|
7963
|
+
headers: authHeadersSchema,
|
|
7964
|
+
body: updateOrgRequestSchema,
|
|
7965
|
+
responses: {
|
|
7966
|
+
200: orgResponseSchema,
|
|
7967
|
+
400: apiErrorSchema,
|
|
7968
|
+
401: apiErrorSchema,
|
|
7969
|
+
403: apiErrorSchema,
|
|
7970
|
+
404: apiErrorSchema,
|
|
7971
|
+
409: apiErrorSchema,
|
|
7972
|
+
500: apiErrorSchema
|
|
7973
|
+
},
|
|
7974
|
+
summary: "Update org slug (zero proxy)"
|
|
7975
|
+
}
|
|
7976
|
+
});
|
|
7977
|
+
var zeroOrgLeaveContract = c29.router({
|
|
7978
|
+
leave: {
|
|
7979
|
+
method: "POST",
|
|
7980
|
+
path: "/api/zero/org/leave",
|
|
7981
|
+
headers: authHeadersSchema,
|
|
7982
|
+
body: z33.object({}),
|
|
7983
|
+
responses: {
|
|
7984
|
+
200: orgMessageResponseSchema,
|
|
7985
|
+
401: apiErrorSchema,
|
|
7986
|
+
403: apiErrorSchema,
|
|
7987
|
+
500: apiErrorSchema
|
|
7988
|
+
},
|
|
7989
|
+
summary: "Leave the current org (zero proxy)"
|
|
7990
|
+
}
|
|
7991
|
+
});
|
|
7992
|
+
var zeroOrgDeleteContract = c29.router({
|
|
7993
|
+
delete: {
|
|
7994
|
+
method: "POST",
|
|
7995
|
+
path: "/api/zero/org/delete",
|
|
7996
|
+
headers: authHeadersSchema,
|
|
7997
|
+
body: z33.object({ slug: z33.string() }),
|
|
7998
|
+
responses: {
|
|
7999
|
+
200: orgMessageResponseSchema,
|
|
8000
|
+
400: apiErrorSchema,
|
|
8001
|
+
401: apiErrorSchema,
|
|
8002
|
+
403: apiErrorSchema,
|
|
8003
|
+
500: apiErrorSchema
|
|
8004
|
+
},
|
|
8005
|
+
summary: "Delete the current org (zero proxy)"
|
|
7962
8006
|
}
|
|
7963
8007
|
});
|
|
7964
8008
|
|
|
7965
|
-
// ../../packages/core/src/contracts/zero-
|
|
7966
|
-
import { z as z33 } from "zod";
|
|
8009
|
+
// ../../packages/core/src/contracts/zero-org-members.ts
|
|
7967
8010
|
var c30 = initContract();
|
|
7968
|
-
var
|
|
8011
|
+
var zeroOrgMembersContract = c30.router({
|
|
8012
|
+
members: {
|
|
8013
|
+
method: "GET",
|
|
8014
|
+
path: "/api/zero/org/members",
|
|
8015
|
+
headers: authHeadersSchema,
|
|
8016
|
+
responses: {
|
|
8017
|
+
200: orgMembersResponseSchema,
|
|
8018
|
+
400: apiErrorSchema,
|
|
8019
|
+
401: apiErrorSchema,
|
|
8020
|
+
403: apiErrorSchema,
|
|
8021
|
+
404: apiErrorSchema,
|
|
8022
|
+
500: apiErrorSchema
|
|
8023
|
+
},
|
|
8024
|
+
summary: "Get org members (zero proxy)"
|
|
8025
|
+
},
|
|
8026
|
+
updateRole: {
|
|
8027
|
+
method: "PATCH",
|
|
8028
|
+
path: "/api/zero/org/members",
|
|
8029
|
+
headers: authHeadersSchema,
|
|
8030
|
+
body: updateOrgMemberRoleRequestSchema,
|
|
8031
|
+
responses: {
|
|
8032
|
+
200: orgMessageResponseSchema,
|
|
8033
|
+
400: apiErrorSchema,
|
|
8034
|
+
401: apiErrorSchema,
|
|
8035
|
+
403: apiErrorSchema,
|
|
8036
|
+
500: apiErrorSchema
|
|
8037
|
+
},
|
|
8038
|
+
summary: "Update a member's role (zero proxy)"
|
|
8039
|
+
},
|
|
8040
|
+
removeMember: {
|
|
8041
|
+
method: "DELETE",
|
|
8042
|
+
path: "/api/zero/org/members",
|
|
8043
|
+
headers: authHeadersSchema,
|
|
8044
|
+
body: removeOrgMemberRequestSchema,
|
|
8045
|
+
responses: {
|
|
8046
|
+
200: orgMessageResponseSchema,
|
|
8047
|
+
400: apiErrorSchema,
|
|
8048
|
+
401: apiErrorSchema,
|
|
8049
|
+
403: apiErrorSchema,
|
|
8050
|
+
500: apiErrorSchema
|
|
8051
|
+
},
|
|
8052
|
+
summary: "Remove a member from the org (zero proxy)"
|
|
8053
|
+
}
|
|
8054
|
+
});
|
|
8055
|
+
var zeroOrgInviteContract = c30.router({
|
|
8056
|
+
invite: {
|
|
8057
|
+
method: "POST",
|
|
8058
|
+
path: "/api/zero/org/invite",
|
|
8059
|
+
headers: authHeadersSchema,
|
|
8060
|
+
body: inviteOrgMemberRequestSchema,
|
|
8061
|
+
responses: {
|
|
8062
|
+
200: orgMessageResponseSchema,
|
|
8063
|
+
400: apiErrorSchema,
|
|
8064
|
+
401: apiErrorSchema,
|
|
8065
|
+
403: apiErrorSchema,
|
|
8066
|
+
500: apiErrorSchema
|
|
8067
|
+
},
|
|
8068
|
+
summary: "Invite a member to the org (zero proxy)"
|
|
8069
|
+
}
|
|
8070
|
+
});
|
|
8071
|
+
|
|
8072
|
+
// ../../packages/core/src/contracts/zero-composes.ts
|
|
8073
|
+
import { z as z34 } from "zod";
|
|
8074
|
+
var c31 = initContract();
|
|
8075
|
+
var zeroComposesMainContract = c31.router({
|
|
7969
8076
|
getByName: {
|
|
7970
8077
|
method: "GET",
|
|
7971
8078
|
path: "/api/zero/composes",
|
|
7972
8079
|
headers: authHeadersSchema,
|
|
7973
|
-
query:
|
|
7974
|
-
name:
|
|
7975
|
-
org:
|
|
8080
|
+
query: z34.object({
|
|
8081
|
+
name: z34.string().min(1, "Missing name query parameter"),
|
|
8082
|
+
org: z34.string().optional()
|
|
7976
8083
|
}),
|
|
7977
8084
|
responses: {
|
|
7978
8085
|
200: composeResponseSchema,
|
|
@@ -7983,13 +8090,13 @@ var zeroComposesMainContract = c30.router({
|
|
|
7983
8090
|
summary: "Get agent compose by name (zero proxy)"
|
|
7984
8091
|
}
|
|
7985
8092
|
});
|
|
7986
|
-
var zeroComposesByIdContract =
|
|
8093
|
+
var zeroComposesByIdContract = c31.router({
|
|
7987
8094
|
getById: {
|
|
7988
8095
|
method: "GET",
|
|
7989
8096
|
path: "/api/zero/composes/:id",
|
|
7990
8097
|
headers: authHeadersSchema,
|
|
7991
|
-
pathParams:
|
|
7992
|
-
id:
|
|
8098
|
+
pathParams: z34.object({
|
|
8099
|
+
id: z34.string().min(1, "Compose ID is required")
|
|
7993
8100
|
}),
|
|
7994
8101
|
responses: {
|
|
7995
8102
|
200: composeResponseSchema,
|
|
@@ -8003,12 +8110,12 @@ var zeroComposesByIdContract = c30.router({
|
|
|
8003
8110
|
method: "DELETE",
|
|
8004
8111
|
path: "/api/zero/composes/:id",
|
|
8005
8112
|
headers: authHeadersSchema,
|
|
8006
|
-
pathParams:
|
|
8007
|
-
id:
|
|
8113
|
+
pathParams: z34.object({
|
|
8114
|
+
id: z34.string().uuid("Compose ID is required")
|
|
8008
8115
|
}),
|
|
8009
|
-
body:
|
|
8116
|
+
body: c31.noBody(),
|
|
8010
8117
|
responses: {
|
|
8011
|
-
204:
|
|
8118
|
+
204: c31.noBody(),
|
|
8012
8119
|
401: apiErrorSchema,
|
|
8013
8120
|
403: apiErrorSchema,
|
|
8014
8121
|
404: apiErrorSchema,
|
|
@@ -8017,17 +8124,17 @@ var zeroComposesByIdContract = c30.router({
|
|
|
8017
8124
|
summary: "Delete agent compose (zero proxy)"
|
|
8018
8125
|
}
|
|
8019
8126
|
});
|
|
8020
|
-
var zeroComposesListContract =
|
|
8127
|
+
var zeroComposesListContract = c31.router({
|
|
8021
8128
|
list: {
|
|
8022
8129
|
method: "GET",
|
|
8023
8130
|
path: "/api/zero/composes/list",
|
|
8024
8131
|
headers: authHeadersSchema,
|
|
8025
|
-
query:
|
|
8026
|
-
org:
|
|
8132
|
+
query: z34.object({
|
|
8133
|
+
org: z34.string().optional()
|
|
8027
8134
|
}),
|
|
8028
8135
|
responses: {
|
|
8029
|
-
200:
|
|
8030
|
-
composes:
|
|
8136
|
+
200: z34.object({
|
|
8137
|
+
composes: z34.array(composeListItemSchema)
|
|
8031
8138
|
}),
|
|
8032
8139
|
400: apiErrorSchema,
|
|
8033
8140
|
401: apiErrorSchema,
|
|
@@ -8038,12 +8145,12 @@ var zeroComposesListContract = c30.router({
|
|
|
8038
8145
|
});
|
|
8039
8146
|
|
|
8040
8147
|
// ../../packages/core/src/contracts/zero-runs.ts
|
|
8041
|
-
import { z as
|
|
8148
|
+
import { z as z35 } from "zod";
|
|
8042
8149
|
var zeroRunRequestSchema = unifiedRunRequestSchema.omit({
|
|
8043
8150
|
triggerSource: true
|
|
8044
8151
|
});
|
|
8045
|
-
var
|
|
8046
|
-
var zeroRunsMainContract =
|
|
8152
|
+
var c32 = initContract();
|
|
8153
|
+
var zeroRunsMainContract = c32.router({
|
|
8047
8154
|
create: {
|
|
8048
8155
|
method: "POST",
|
|
8049
8156
|
path: "/api/zero/runs",
|
|
@@ -8059,13 +8166,13 @@ var zeroRunsMainContract = c31.router({
|
|
|
8059
8166
|
summary: "Create and execute agent run (zero proxy)"
|
|
8060
8167
|
}
|
|
8061
8168
|
});
|
|
8062
|
-
var zeroRunsByIdContract =
|
|
8169
|
+
var zeroRunsByIdContract = c32.router({
|
|
8063
8170
|
getById: {
|
|
8064
8171
|
method: "GET",
|
|
8065
8172
|
path: "/api/zero/runs/:id",
|
|
8066
8173
|
headers: authHeadersSchema,
|
|
8067
|
-
pathParams:
|
|
8068
|
-
id:
|
|
8174
|
+
pathParams: z35.object({
|
|
8175
|
+
id: z35.string().min(1, "Run ID is required")
|
|
8069
8176
|
}),
|
|
8070
8177
|
responses: {
|
|
8071
8178
|
200: getRunResponseSchema,
|
|
@@ -8076,15 +8183,15 @@ var zeroRunsByIdContract = c31.router({
|
|
|
8076
8183
|
summary: "Get agent run by ID (zero proxy)"
|
|
8077
8184
|
}
|
|
8078
8185
|
});
|
|
8079
|
-
var zeroRunsCancelContract =
|
|
8186
|
+
var zeroRunsCancelContract = c32.router({
|
|
8080
8187
|
cancel: {
|
|
8081
8188
|
method: "POST",
|
|
8082
8189
|
path: "/api/zero/runs/:id/cancel",
|
|
8083
8190
|
headers: authHeadersSchema,
|
|
8084
|
-
pathParams:
|
|
8085
|
-
id:
|
|
8191
|
+
pathParams: z35.object({
|
|
8192
|
+
id: z35.string().min(1, "Run ID is required")
|
|
8086
8193
|
}),
|
|
8087
|
-
body:
|
|
8194
|
+
body: z35.undefined(),
|
|
8088
8195
|
responses: {
|
|
8089
8196
|
200: cancelRunResponseSchema,
|
|
8090
8197
|
400: apiErrorSchema,
|
|
@@ -8095,7 +8202,7 @@ var zeroRunsCancelContract = c31.router({
|
|
|
8095
8202
|
summary: "Cancel a pending or running run (zero proxy)"
|
|
8096
8203
|
}
|
|
8097
8204
|
});
|
|
8098
|
-
var zeroRunsQueueContract =
|
|
8205
|
+
var zeroRunsQueueContract = c32.router({
|
|
8099
8206
|
getQueue: {
|
|
8100
8207
|
method: "GET",
|
|
8101
8208
|
path: "/api/zero/runs/queue",
|
|
@@ -8108,18 +8215,18 @@ var zeroRunsQueueContract = c31.router({
|
|
|
8108
8215
|
summary: "Get org run queue status (zero proxy)"
|
|
8109
8216
|
}
|
|
8110
8217
|
});
|
|
8111
|
-
var zeroRunAgentEventsContract =
|
|
8218
|
+
var zeroRunAgentEventsContract = c32.router({
|
|
8112
8219
|
getAgentEvents: {
|
|
8113
8220
|
method: "GET",
|
|
8114
8221
|
path: "/api/zero/runs/:id/telemetry/agent",
|
|
8115
8222
|
headers: authHeadersSchema,
|
|
8116
|
-
pathParams:
|
|
8117
|
-
id:
|
|
8223
|
+
pathParams: z35.object({
|
|
8224
|
+
id: z35.string().min(1, "Run ID is required")
|
|
8118
8225
|
}),
|
|
8119
|
-
query:
|
|
8120
|
-
since:
|
|
8121
|
-
limit:
|
|
8122
|
-
order:
|
|
8226
|
+
query: z35.object({
|
|
8227
|
+
since: z35.coerce.number().optional(),
|
|
8228
|
+
limit: z35.coerce.number().min(1).max(100).default(5),
|
|
8229
|
+
order: z35.enum(["asc", "desc"]).default("desc")
|
|
8123
8230
|
}),
|
|
8124
8231
|
responses: {
|
|
8125
8232
|
200: agentEventsResponseSchema,
|
|
@@ -8131,9 +8238,9 @@ var zeroRunAgentEventsContract = c31.router({
|
|
|
8131
8238
|
});
|
|
8132
8239
|
|
|
8133
8240
|
// ../../packages/core/src/contracts/zero-schedules.ts
|
|
8134
|
-
import { z as
|
|
8135
|
-
var
|
|
8136
|
-
var zeroSchedulesMainContract =
|
|
8241
|
+
import { z as z36 } from "zod";
|
|
8242
|
+
var c33 = initContract();
|
|
8243
|
+
var zeroSchedulesMainContract = c33.router({
|
|
8137
8244
|
deploy: {
|
|
8138
8245
|
method: "POST",
|
|
8139
8246
|
path: "/api/zero/schedules",
|
|
@@ -8161,19 +8268,19 @@ var zeroSchedulesMainContract = c32.router({
|
|
|
8161
8268
|
summary: "List all schedules (zero proxy)"
|
|
8162
8269
|
}
|
|
8163
8270
|
});
|
|
8164
|
-
var zeroSchedulesByNameContract =
|
|
8271
|
+
var zeroSchedulesByNameContract = c33.router({
|
|
8165
8272
|
delete: {
|
|
8166
8273
|
method: "DELETE",
|
|
8167
8274
|
path: "/api/zero/schedules/:name",
|
|
8168
8275
|
headers: authHeadersSchema,
|
|
8169
|
-
pathParams:
|
|
8170
|
-
name:
|
|
8276
|
+
pathParams: z36.object({
|
|
8277
|
+
name: z36.string().min(1, "Schedule name required")
|
|
8171
8278
|
}),
|
|
8172
|
-
query:
|
|
8173
|
-
composeId:
|
|
8279
|
+
query: z36.object({
|
|
8280
|
+
composeId: z36.string().uuid("Compose ID required")
|
|
8174
8281
|
}),
|
|
8175
8282
|
responses: {
|
|
8176
|
-
204:
|
|
8283
|
+
204: c33.noBody(),
|
|
8177
8284
|
401: apiErrorSchema,
|
|
8178
8285
|
403: apiErrorSchema,
|
|
8179
8286
|
404: apiErrorSchema
|
|
@@ -8181,16 +8288,16 @@ var zeroSchedulesByNameContract = c32.router({
|
|
|
8181
8288
|
summary: "Delete schedule (zero proxy)"
|
|
8182
8289
|
}
|
|
8183
8290
|
});
|
|
8184
|
-
var zeroSchedulesEnableContract =
|
|
8291
|
+
var zeroSchedulesEnableContract = c33.router({
|
|
8185
8292
|
enable: {
|
|
8186
8293
|
method: "POST",
|
|
8187
8294
|
path: "/api/zero/schedules/:name/enable",
|
|
8188
8295
|
headers: authHeadersSchema,
|
|
8189
|
-
pathParams:
|
|
8190
|
-
name:
|
|
8296
|
+
pathParams: z36.object({
|
|
8297
|
+
name: z36.string().min(1, "Schedule name required")
|
|
8191
8298
|
}),
|
|
8192
|
-
body:
|
|
8193
|
-
composeId:
|
|
8299
|
+
body: z36.object({
|
|
8300
|
+
composeId: z36.string().uuid("Compose ID required")
|
|
8194
8301
|
}),
|
|
8195
8302
|
responses: {
|
|
8196
8303
|
200: scheduleResponseSchema,
|
|
@@ -8205,11 +8312,11 @@ var zeroSchedulesEnableContract = c32.router({
|
|
|
8205
8312
|
method: "POST",
|
|
8206
8313
|
path: "/api/zero/schedules/:name/disable",
|
|
8207
8314
|
headers: authHeadersSchema,
|
|
8208
|
-
pathParams:
|
|
8209
|
-
name:
|
|
8315
|
+
pathParams: z36.object({
|
|
8316
|
+
name: z36.string().min(1, "Schedule name required")
|
|
8210
8317
|
}),
|
|
8211
|
-
body:
|
|
8212
|
-
composeId:
|
|
8318
|
+
body: z36.object({
|
|
8319
|
+
composeId: z36.string().uuid("Compose ID required")
|
|
8213
8320
|
}),
|
|
8214
8321
|
responses: {
|
|
8215
8322
|
200: scheduleResponseSchema,
|
|
@@ -8223,9 +8330,9 @@ var zeroSchedulesEnableContract = c32.router({
|
|
|
8223
8330
|
});
|
|
8224
8331
|
|
|
8225
8332
|
// ../../packages/core/src/contracts/zero-model-providers.ts
|
|
8226
|
-
import { z as
|
|
8227
|
-
var
|
|
8228
|
-
var zeroModelProvidersMainContract =
|
|
8333
|
+
import { z as z37 } from "zod";
|
|
8334
|
+
var c34 = initContract();
|
|
8335
|
+
var zeroModelProvidersMainContract = c34.router({
|
|
8229
8336
|
list: {
|
|
8230
8337
|
method: "GET",
|
|
8231
8338
|
path: "/api/zero/model-providers",
|
|
@@ -8253,16 +8360,16 @@ var zeroModelProvidersMainContract = c33.router({
|
|
|
8253
8360
|
summary: "Create or update an org-level model provider (admin only)"
|
|
8254
8361
|
}
|
|
8255
8362
|
});
|
|
8256
|
-
var zeroModelProvidersByTypeContract =
|
|
8363
|
+
var zeroModelProvidersByTypeContract = c34.router({
|
|
8257
8364
|
delete: {
|
|
8258
8365
|
method: "DELETE",
|
|
8259
8366
|
path: "/api/zero/model-providers/:type",
|
|
8260
8367
|
headers: authHeadersSchema,
|
|
8261
|
-
pathParams:
|
|
8368
|
+
pathParams: z37.object({
|
|
8262
8369
|
type: modelProviderTypeSchema
|
|
8263
8370
|
}),
|
|
8264
8371
|
responses: {
|
|
8265
|
-
204:
|
|
8372
|
+
204: c34.noBody(),
|
|
8266
8373
|
401: apiErrorSchema,
|
|
8267
8374
|
403: apiErrorSchema,
|
|
8268
8375
|
404: apiErrorSchema,
|
|
@@ -8271,15 +8378,15 @@ var zeroModelProvidersByTypeContract = c33.router({
|
|
|
8271
8378
|
summary: "Delete an org-level model provider (admin only)"
|
|
8272
8379
|
}
|
|
8273
8380
|
});
|
|
8274
|
-
var zeroModelProvidersDefaultContract =
|
|
8381
|
+
var zeroModelProvidersDefaultContract = c34.router({
|
|
8275
8382
|
setDefault: {
|
|
8276
8383
|
method: "POST",
|
|
8277
8384
|
path: "/api/zero/model-providers/:type/default",
|
|
8278
8385
|
headers: authHeadersSchema,
|
|
8279
|
-
pathParams:
|
|
8386
|
+
pathParams: z37.object({
|
|
8280
8387
|
type: modelProviderTypeSchema
|
|
8281
8388
|
}),
|
|
8282
|
-
body:
|
|
8389
|
+
body: z37.undefined(),
|
|
8283
8390
|
responses: {
|
|
8284
8391
|
200: modelProviderResponseSchema,
|
|
8285
8392
|
401: apiErrorSchema,
|
|
@@ -8290,10 +8397,29 @@ var zeroModelProvidersDefaultContract = c33.router({
|
|
|
8290
8397
|
summary: "Set org-level model provider as default (admin only)"
|
|
8291
8398
|
}
|
|
8292
8399
|
});
|
|
8400
|
+
var zeroModelProvidersUpdateModelContract = c34.router({
|
|
8401
|
+
updateModel: {
|
|
8402
|
+
method: "PATCH",
|
|
8403
|
+
path: "/api/zero/model-providers/:type/model",
|
|
8404
|
+
headers: authHeadersSchema,
|
|
8405
|
+
pathParams: z37.object({
|
|
8406
|
+
type: modelProviderTypeSchema
|
|
8407
|
+
}),
|
|
8408
|
+
body: updateModelRequestSchema,
|
|
8409
|
+
responses: {
|
|
8410
|
+
200: modelProviderResponseSchema,
|
|
8411
|
+
401: apiErrorSchema,
|
|
8412
|
+
403: apiErrorSchema,
|
|
8413
|
+
404: apiErrorSchema,
|
|
8414
|
+
500: apiErrorSchema
|
|
8415
|
+
},
|
|
8416
|
+
summary: "Update model selection for org-level provider (admin only)"
|
|
8417
|
+
}
|
|
8418
|
+
});
|
|
8293
8419
|
|
|
8294
8420
|
// ../../packages/core/src/contracts/zero-user-preferences.ts
|
|
8295
|
-
var
|
|
8296
|
-
var zeroUserPreferencesContract =
|
|
8421
|
+
var c35 = initContract();
|
|
8422
|
+
var zeroUserPreferencesContract = c35.router({
|
|
8297
8423
|
get: {
|
|
8298
8424
|
method: "GET",
|
|
8299
8425
|
path: "/api/zero/user-preferences",
|
|
@@ -8321,8 +8447,8 @@ var zeroUserPreferencesContract = c34.router({
|
|
|
8321
8447
|
});
|
|
8322
8448
|
|
|
8323
8449
|
// ../../packages/core/src/contracts/zero-secrets.ts
|
|
8324
|
-
var
|
|
8325
|
-
var zeroSecretsContract =
|
|
8450
|
+
var c36 = initContract();
|
|
8451
|
+
var zeroSecretsContract = c36.router({
|
|
8326
8452
|
set: {
|
|
8327
8453
|
method: "POST",
|
|
8328
8454
|
path: "/api/zero/secrets",
|
|
@@ -8338,7 +8464,7 @@ var zeroSecretsContract = c35.router({
|
|
|
8338
8464
|
summary: "Create or update a secret"
|
|
8339
8465
|
}
|
|
8340
8466
|
});
|
|
8341
|
-
var zeroVariablesContract =
|
|
8467
|
+
var zeroVariablesContract = c36.router({
|
|
8342
8468
|
set: {
|
|
8343
8469
|
method: "POST",
|
|
8344
8470
|
path: "/api/zero/variables",
|
|
@@ -8356,15 +8482,15 @@ var zeroVariablesContract = c35.router({
|
|
|
8356
8482
|
});
|
|
8357
8483
|
|
|
8358
8484
|
// ../../packages/core/src/contracts/zero-sessions.ts
|
|
8359
|
-
import { z as
|
|
8360
|
-
var
|
|
8361
|
-
var zeroSessionsByIdContract =
|
|
8485
|
+
import { z as z38 } from "zod";
|
|
8486
|
+
var c37 = initContract();
|
|
8487
|
+
var zeroSessionsByIdContract = c37.router({
|
|
8362
8488
|
getById: {
|
|
8363
8489
|
method: "GET",
|
|
8364
8490
|
path: "/api/zero/sessions/:id",
|
|
8365
8491
|
headers: authHeadersSchema,
|
|
8366
|
-
pathParams:
|
|
8367
|
-
id:
|
|
8492
|
+
pathParams: z38.object({
|
|
8493
|
+
id: z38.string().min(1, "Session ID is required")
|
|
8368
8494
|
}),
|
|
8369
8495
|
responses: {
|
|
8370
8496
|
200: sessionResponseSchema,
|
|
@@ -8377,24 +8503,24 @@ var zeroSessionsByIdContract = c36.router({
|
|
|
8377
8503
|
});
|
|
8378
8504
|
|
|
8379
8505
|
// ../../packages/core/src/contracts/integrations.ts
|
|
8380
|
-
import { z as
|
|
8381
|
-
var
|
|
8382
|
-
var integrationsSlackMessageContract =
|
|
8506
|
+
import { z as z39 } from "zod";
|
|
8507
|
+
var c38 = initContract();
|
|
8508
|
+
var integrationsSlackMessageContract = c38.router({
|
|
8383
8509
|
sendMessage: {
|
|
8384
8510
|
method: "POST",
|
|
8385
8511
|
path: "/api/agent/integrations/slack/message",
|
|
8386
8512
|
headers: authHeadersSchema,
|
|
8387
|
-
body:
|
|
8388
|
-
channel:
|
|
8389
|
-
text:
|
|
8390
|
-
threadTs:
|
|
8391
|
-
blocks:
|
|
8513
|
+
body: z39.object({
|
|
8514
|
+
channel: z39.string().min(1, "Channel ID is required"),
|
|
8515
|
+
text: z39.string().optional(),
|
|
8516
|
+
threadTs: z39.string().optional(),
|
|
8517
|
+
blocks: z39.array(z39.object({ type: z39.string() }).passthrough()).optional()
|
|
8392
8518
|
}),
|
|
8393
8519
|
responses: {
|
|
8394
|
-
200:
|
|
8395
|
-
ok:
|
|
8396
|
-
ts:
|
|
8397
|
-
channel:
|
|
8520
|
+
200: z39.object({
|
|
8521
|
+
ok: z39.literal(true),
|
|
8522
|
+
ts: z39.string().optional(),
|
|
8523
|
+
channel: z39.string().optional()
|
|
8398
8524
|
}),
|
|
8399
8525
|
400: apiErrorSchema,
|
|
8400
8526
|
401: apiErrorSchema,
|
|
@@ -9044,7 +9170,7 @@ function getConfigPath() {
|
|
|
9044
9170
|
return join2(homedir2(), ".vm0", "config.json");
|
|
9045
9171
|
}
|
|
9046
9172
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
9047
|
-
console.log(chalk4.bold(`VM0 CLI v${"9.74.
|
|
9173
|
+
console.log(chalk4.bold(`VM0 CLI v${"9.74.1"}`));
|
|
9048
9174
|
console.log();
|
|
9049
9175
|
const config = await loadConfig();
|
|
9050
9176
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -9833,8 +9959,8 @@ async function resolveSkills(skillUrls) {
|
|
|
9833
9959
|
}
|
|
9834
9960
|
|
|
9835
9961
|
// src/lib/domain/yaml-validator.ts
|
|
9836
|
-
import { z as
|
|
9837
|
-
var cliAgentNameSchema =
|
|
9962
|
+
import { z as z40 } from "zod";
|
|
9963
|
+
var cliAgentNameSchema = z40.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
|
|
9838
9964
|
/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?$/,
|
|
9839
9965
|
"Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
|
|
9840
9966
|
);
|
|
@@ -9848,7 +9974,7 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
|
|
|
9848
9974
|
resolveSkillRef(skillRef);
|
|
9849
9975
|
} catch (error) {
|
|
9850
9976
|
ctx.addIssue({
|
|
9851
|
-
code:
|
|
9977
|
+
code: z40.ZodIssueCode.custom,
|
|
9852
9978
|
message: error instanceof Error ? error.message : `Invalid skill reference: ${skillRef}`,
|
|
9853
9979
|
path: ["skills", i]
|
|
9854
9980
|
});
|
|
@@ -9858,15 +9984,15 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
|
|
|
9858
9984
|
}
|
|
9859
9985
|
}
|
|
9860
9986
|
);
|
|
9861
|
-
var cliComposeSchema =
|
|
9862
|
-
version:
|
|
9863
|
-
agents:
|
|
9864
|
-
volumes:
|
|
9987
|
+
var cliComposeSchema = z40.object({
|
|
9988
|
+
version: z40.string().min(1, "Missing config.version"),
|
|
9989
|
+
agents: z40.record(cliAgentNameSchema, cliAgentDefinitionSchema),
|
|
9990
|
+
volumes: z40.record(z40.string(), volumeConfigSchema).optional()
|
|
9865
9991
|
}).superRefine((config, ctx) => {
|
|
9866
9992
|
const agentKeys = Object.keys(config.agents);
|
|
9867
9993
|
if (agentKeys.length === 0) {
|
|
9868
9994
|
ctx.addIssue({
|
|
9869
|
-
code:
|
|
9995
|
+
code: z40.ZodIssueCode.custom,
|
|
9870
9996
|
message: "agents must have at least one agent defined",
|
|
9871
9997
|
path: ["agents"]
|
|
9872
9998
|
});
|
|
@@ -9874,7 +10000,7 @@ var cliComposeSchema = z39.object({
|
|
|
9874
10000
|
}
|
|
9875
10001
|
if (agentKeys.length > 1) {
|
|
9876
10002
|
ctx.addIssue({
|
|
9877
|
-
code:
|
|
10003
|
+
code: z40.ZodIssueCode.custom,
|
|
9878
10004
|
message: "Multiple agents not supported yet. Only one agent allowed.",
|
|
9879
10005
|
path: ["agents"]
|
|
9880
10006
|
});
|
|
@@ -9886,7 +10012,7 @@ var cliComposeSchema = z39.object({
|
|
|
9886
10012
|
if (agentVolumes && agentVolumes.length > 0) {
|
|
9887
10013
|
if (!config.volumes) {
|
|
9888
10014
|
ctx.addIssue({
|
|
9889
|
-
code:
|
|
10015
|
+
code: z40.ZodIssueCode.custom,
|
|
9890
10016
|
message: "Agent references volumes but no volumes section defined. Each volume must have explicit name and version.",
|
|
9891
10017
|
path: ["volumes"]
|
|
9892
10018
|
});
|
|
@@ -9896,7 +10022,7 @@ var cliComposeSchema = z39.object({
|
|
|
9896
10022
|
const parts = volDeclaration.split(":");
|
|
9897
10023
|
if (parts.length !== 2) {
|
|
9898
10024
|
ctx.addIssue({
|
|
9899
|
-
code:
|
|
10025
|
+
code: z40.ZodIssueCode.custom,
|
|
9900
10026
|
message: `Invalid volume declaration: ${volDeclaration}. Expected format: volume-key:/mount/path`,
|
|
9901
10027
|
path: ["agents", agentName, "volumes"]
|
|
9902
10028
|
});
|
|
@@ -9905,7 +10031,7 @@ var cliComposeSchema = z39.object({
|
|
|
9905
10031
|
const volumeKey = parts[0].trim();
|
|
9906
10032
|
if (!config.volumes[volumeKey]) {
|
|
9907
10033
|
ctx.addIssue({
|
|
9908
|
-
code:
|
|
10034
|
+
code: z40.ZodIssueCode.custom,
|
|
9909
10035
|
message: `Volume "${volumeKey}" is not defined in volumes section. Each volume must have explicit name and version.`,
|
|
9910
10036
|
path: ["volumes", volumeKey]
|
|
9911
10037
|
});
|
|
@@ -11104,7 +11230,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
11104
11230
|
options.autoUpdate = false;
|
|
11105
11231
|
}
|
|
11106
11232
|
if (options.autoUpdate !== false) {
|
|
11107
|
-
await startSilentUpgrade("9.74.
|
|
11233
|
+
await startSilentUpgrade("9.74.1");
|
|
11108
11234
|
}
|
|
11109
11235
|
try {
|
|
11110
11236
|
let result;
|
|
@@ -11939,7 +12065,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
11939
12065
|
withErrorHandler(
|
|
11940
12066
|
async (identifier, prompt, options) => {
|
|
11941
12067
|
if (options.autoUpdate !== false) {
|
|
11942
|
-
await startSilentUpgrade("9.74.
|
|
12068
|
+
await startSilentUpgrade("9.74.1");
|
|
11943
12069
|
}
|
|
11944
12070
|
const { org, name, version } = parseIdentifier(identifier);
|
|
11945
12071
|
let composeId;
|
|
@@ -13695,7 +13821,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
13695
13821
|
withErrorHandler(
|
|
13696
13822
|
async (prompt, options) => {
|
|
13697
13823
|
if (options.autoUpdate !== false) {
|
|
13698
|
-
const shouldExit = await checkAndUpgrade("9.74.
|
|
13824
|
+
const shouldExit = await checkAndUpgrade("9.74.1", prompt);
|
|
13699
13825
|
if (shouldExit) {
|
|
13700
13826
|
process.exit(0);
|
|
13701
13827
|
}
|
|
@@ -16069,7 +16195,7 @@ var listCommand9 = new Command65().name("list").alias("ls").description("List al
|
|
|
16069
16195
|
);
|
|
16070
16196
|
return;
|
|
16071
16197
|
}
|
|
16072
|
-
const nameWidth = Math.max(4, ...data.composes.map((
|
|
16198
|
+
const nameWidth = Math.max(4, ...data.composes.map((c39) => c39.name.length));
|
|
16073
16199
|
const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
|
|
16074
16200
|
" "
|
|
16075
16201
|
);
|
|
@@ -16670,7 +16796,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
|
|
|
16670
16796
|
if (!isInteractive()) {
|
|
16671
16797
|
throw new Error("--frequency is required (daily|weekly|monthly|once|loop)");
|
|
16672
16798
|
}
|
|
16673
|
-
const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((
|
|
16799
|
+
const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c39) => c39.value === existingFrequency) : 0;
|
|
16674
16800
|
frequency = await promptSelect(
|
|
16675
16801
|
"Schedule frequency",
|
|
16676
16802
|
FREQUENCY_CHOICES,
|
|
@@ -16695,7 +16821,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
|
|
|
16695
16821
|
throw new Error("--day is required for weekly/monthly");
|
|
16696
16822
|
}
|
|
16697
16823
|
if (frequency === "weekly") {
|
|
16698
|
-
const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((
|
|
16824
|
+
const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c39) => c39.value === existingDay) : 0;
|
|
16699
16825
|
const day2 = await promptSelect(
|
|
16700
16826
|
"Day of week",
|
|
16701
16827
|
DAY_OF_WEEK_CHOICES,
|
|
@@ -18145,7 +18271,7 @@ import chalk76 from "chalk";
|
|
|
18145
18271
|
var listCommand13 = new Command86().name("list").alias("ls").description("List all connectors and their status").action(
|
|
18146
18272
|
withErrorHandler(async () => {
|
|
18147
18273
|
const result = await listConnectors();
|
|
18148
|
-
const connectedMap = new Map(result.connectors.map((
|
|
18274
|
+
const connectedMap = new Map(result.connectors.map((c39) => [c39.type, c39]));
|
|
18149
18275
|
const allTypesRaw = Object.keys(CONNECTOR_TYPES);
|
|
18150
18276
|
const allTypes = [];
|
|
18151
18277
|
for (const type2 of allTypesRaw) {
|
|
@@ -18706,16 +18832,16 @@ async function handleModelProvider(ctx) {
|
|
|
18706
18832
|
const providerType = await step.prompt(
|
|
18707
18833
|
() => promptSelect(
|
|
18708
18834
|
"Select provider type:",
|
|
18709
|
-
choices.map((
|
|
18710
|
-
title:
|
|
18711
|
-
value:
|
|
18835
|
+
choices.map((c39) => ({
|
|
18836
|
+
title: c39.label,
|
|
18837
|
+
value: c39.type
|
|
18712
18838
|
}))
|
|
18713
18839
|
)
|
|
18714
18840
|
);
|
|
18715
18841
|
if (!providerType) {
|
|
18716
18842
|
process.exit(0);
|
|
18717
18843
|
}
|
|
18718
|
-
const selectedChoice = choices.find((
|
|
18844
|
+
const selectedChoice = choices.find((c39) => c39.type === providerType);
|
|
18719
18845
|
if (selectedChoice?.helpText) {
|
|
18720
18846
|
for (const line of selectedChoice.helpText.split("\n")) {
|
|
18721
18847
|
step.detail(chalk82.dim(line));
|
|
@@ -19069,13 +19195,13 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
19069
19195
|
if (latestVersion === null) {
|
|
19070
19196
|
throw new Error("Could not check for updates. Please try again later.");
|
|
19071
19197
|
}
|
|
19072
|
-
if (latestVersion === "9.74.
|
|
19073
|
-
console.log(chalk86.green(`\u2713 Already up to date (${"9.74.
|
|
19198
|
+
if (latestVersion === "9.74.1") {
|
|
19199
|
+
console.log(chalk86.green(`\u2713 Already up to date (${"9.74.1"})`));
|
|
19074
19200
|
return;
|
|
19075
19201
|
}
|
|
19076
19202
|
console.log(
|
|
19077
19203
|
chalk86.yellow(
|
|
19078
|
-
`Current version: ${"9.74.
|
|
19204
|
+
`Current version: ${"9.74.1"} -> Latest version: ${latestVersion}`
|
|
19079
19205
|
)
|
|
19080
19206
|
);
|
|
19081
19207
|
console.log();
|
|
@@ -19102,7 +19228,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
19102
19228
|
const success = await performUpgrade(packageManager);
|
|
19103
19229
|
if (success) {
|
|
19104
19230
|
console.log(
|
|
19105
|
-
chalk86.green(`\u2713 Upgraded from ${"9.74.
|
|
19231
|
+
chalk86.green(`\u2713 Upgraded from ${"9.74.1"} to ${latestVersion}`)
|
|
19106
19232
|
);
|
|
19107
19233
|
return;
|
|
19108
19234
|
}
|
|
@@ -19176,7 +19302,7 @@ var whoamiCommand = new Command95().name("whoami").description("Show current ide
|
|
|
19176
19302
|
|
|
19177
19303
|
// src/index.ts
|
|
19178
19304
|
var program = new Command96();
|
|
19179
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.74.
|
|
19305
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.74.1");
|
|
19180
19306
|
program.addCommand(authCommand);
|
|
19181
19307
|
program.addCommand(infoCommand);
|
|
19182
19308
|
program.addCommand(composeCommand);
|