@vm0/cli 9.65.0 → 9.66.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 +127 -296
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -45,7 +45,7 @@ if (DSN) {
|
|
|
45
45
|
Sentry.init({
|
|
46
46
|
dsn: DSN,
|
|
47
47
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
48
|
-
release: "9.
|
|
48
|
+
release: "9.66.0",
|
|
49
49
|
sendDefaultPii: false,
|
|
50
50
|
tracesSampleRate: 0,
|
|
51
51
|
shutdownTimeout: 500,
|
|
@@ -64,7 +64,7 @@ if (DSN) {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
Sentry.setContext("cli", {
|
|
67
|
-
version: "9.
|
|
67
|
+
version: "9.66.0",
|
|
68
68
|
command: process.argv.slice(2).join(" ")
|
|
69
69
|
});
|
|
70
70
|
Sentry.setContext("runtime", {
|
|
@@ -675,7 +675,7 @@ function getConfigPath() {
|
|
|
675
675
|
return join2(homedir2(), ".vm0", "config.json");
|
|
676
676
|
}
|
|
677
677
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
678
|
-
console.log(chalk4.bold(`VM0 CLI v${"9.
|
|
678
|
+
console.log(chalk4.bold(`VM0 CLI v${"9.66.0"}`));
|
|
679
679
|
console.log();
|
|
680
680
|
const config = await loadConfig();
|
|
681
681
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -902,17 +902,7 @@ var agentDefinitionSchema = z4.object({
|
|
|
902
902
|
displayName: z4.string().optional(),
|
|
903
903
|
description: z4.string().optional(),
|
|
904
904
|
sound: z4.string().optional()
|
|
905
|
-
}).optional()
|
|
906
|
-
/**
|
|
907
|
-
* @deprecated Server-resolved field. User input is ignored.
|
|
908
|
-
* @internal
|
|
909
|
-
*/
|
|
910
|
-
image: z4.string().optional(),
|
|
911
|
-
/**
|
|
912
|
-
* @deprecated Server-resolved field. User input is ignored.
|
|
913
|
-
* @internal
|
|
914
|
-
*/
|
|
915
|
-
working_dir: z4.string().optional()
|
|
905
|
+
}).optional()
|
|
916
906
|
});
|
|
917
907
|
var agentComposeContentSchema = z4.object({
|
|
918
908
|
version: z4.string().min(1, "Version is required"),
|
|
@@ -1291,7 +1281,8 @@ var orgDefaultAgentContract = c3.router({
|
|
|
1291
1281
|
400: apiErrorSchema,
|
|
1292
1282
|
401: apiErrorSchema,
|
|
1293
1283
|
403: apiErrorSchema,
|
|
1294
|
-
404: apiErrorSchema
|
|
1284
|
+
404: apiErrorSchema,
|
|
1285
|
+
409: apiErrorSchema
|
|
1295
1286
|
},
|
|
1296
1287
|
summary: "Set or unset the default agent for an org"
|
|
1297
1288
|
}
|
|
@@ -2633,7 +2624,6 @@ var variablesByNameContract = c11.router({
|
|
|
2633
2624
|
|
|
2634
2625
|
// ../../packages/core/src/contracts/model-providers.ts
|
|
2635
2626
|
import { z as z15 } from "zod";
|
|
2636
|
-
var c12 = initContract();
|
|
2637
2627
|
var MODEL_PROVIDER_TYPES = {
|
|
2638
2628
|
"claude-code-oauth-token": {
|
|
2639
2629
|
framework: "claude-code",
|
|
@@ -2969,137 +2959,18 @@ var upsertModelProviderResponseSchema = z15.object({
|
|
|
2969
2959
|
provider: modelProviderResponseSchema,
|
|
2970
2960
|
created: z15.boolean()
|
|
2971
2961
|
});
|
|
2972
|
-
var checkSecretResponseSchema = z15.object({
|
|
2973
|
-
exists: z15.boolean(),
|
|
2974
|
-
secretName: z15.string()
|
|
2975
|
-
});
|
|
2976
|
-
var modelProvidersMainContract = c12.router({
|
|
2977
|
-
list: {
|
|
2978
|
-
method: "GET",
|
|
2979
|
-
path: "/api/model-providers",
|
|
2980
|
-
headers: authHeadersSchema,
|
|
2981
|
-
responses: {
|
|
2982
|
-
200: modelProviderListResponseSchema,
|
|
2983
|
-
401: apiErrorSchema,
|
|
2984
|
-
500: apiErrorSchema
|
|
2985
|
-
},
|
|
2986
|
-
summary: "List all model providers"
|
|
2987
|
-
},
|
|
2988
|
-
upsert: {
|
|
2989
|
-
method: "PUT",
|
|
2990
|
-
path: "/api/model-providers",
|
|
2991
|
-
headers: authHeadersSchema,
|
|
2992
|
-
body: upsertModelProviderRequestSchema,
|
|
2993
|
-
responses: {
|
|
2994
|
-
200: upsertModelProviderResponseSchema,
|
|
2995
|
-
201: upsertModelProviderResponseSchema,
|
|
2996
|
-
400: apiErrorSchema,
|
|
2997
|
-
401: apiErrorSchema,
|
|
2998
|
-
409: apiErrorSchema,
|
|
2999
|
-
500: apiErrorSchema
|
|
3000
|
-
},
|
|
3001
|
-
summary: "Create or update a model provider"
|
|
3002
|
-
}
|
|
3003
|
-
});
|
|
3004
|
-
var modelProvidersCheckContract = c12.router({
|
|
3005
|
-
check: {
|
|
3006
|
-
method: "GET",
|
|
3007
|
-
path: "/api/model-providers/check/:type",
|
|
3008
|
-
headers: authHeadersSchema,
|
|
3009
|
-
pathParams: z15.object({
|
|
3010
|
-
type: modelProviderTypeSchema
|
|
3011
|
-
}),
|
|
3012
|
-
responses: {
|
|
3013
|
-
200: checkSecretResponseSchema,
|
|
3014
|
-
401: apiErrorSchema,
|
|
3015
|
-
500: apiErrorSchema
|
|
3016
|
-
},
|
|
3017
|
-
summary: "Check if secret exists for a model provider type"
|
|
3018
|
-
}
|
|
3019
|
-
});
|
|
3020
|
-
var modelProvidersByTypeContract = c12.router({
|
|
3021
|
-
delete: {
|
|
3022
|
-
method: "DELETE",
|
|
3023
|
-
path: "/api/model-providers/:type",
|
|
3024
|
-
headers: authHeadersSchema,
|
|
3025
|
-
pathParams: z15.object({
|
|
3026
|
-
type: modelProviderTypeSchema
|
|
3027
|
-
}),
|
|
3028
|
-
responses: {
|
|
3029
|
-
204: c12.noBody(),
|
|
3030
|
-
401: apiErrorSchema,
|
|
3031
|
-
404: apiErrorSchema,
|
|
3032
|
-
500: apiErrorSchema
|
|
3033
|
-
},
|
|
3034
|
-
summary: "Delete a model provider"
|
|
3035
|
-
}
|
|
3036
|
-
});
|
|
3037
|
-
var modelProvidersConvertContract = c12.router({
|
|
3038
|
-
convert: {
|
|
3039
|
-
method: "POST",
|
|
3040
|
-
path: "/api/model-providers/:type/convert",
|
|
3041
|
-
headers: authHeadersSchema,
|
|
3042
|
-
pathParams: z15.object({
|
|
3043
|
-
type: modelProviderTypeSchema
|
|
3044
|
-
}),
|
|
3045
|
-
body: z15.undefined(),
|
|
3046
|
-
responses: {
|
|
3047
|
-
200: modelProviderResponseSchema,
|
|
3048
|
-
400: apiErrorSchema,
|
|
3049
|
-
401: apiErrorSchema,
|
|
3050
|
-
404: apiErrorSchema,
|
|
3051
|
-
500: apiErrorSchema
|
|
3052
|
-
},
|
|
3053
|
-
summary: "Convert existing user secret to model provider"
|
|
3054
|
-
}
|
|
3055
|
-
});
|
|
3056
|
-
var modelProvidersSetDefaultContract = c12.router({
|
|
3057
|
-
setDefault: {
|
|
3058
|
-
method: "POST",
|
|
3059
|
-
path: "/api/model-providers/:type/set-default",
|
|
3060
|
-
headers: authHeadersSchema,
|
|
3061
|
-
pathParams: z15.object({
|
|
3062
|
-
type: modelProviderTypeSchema
|
|
3063
|
-
}),
|
|
3064
|
-
body: z15.undefined(),
|
|
3065
|
-
responses: {
|
|
3066
|
-
200: modelProviderResponseSchema,
|
|
3067
|
-
401: apiErrorSchema,
|
|
3068
|
-
404: apiErrorSchema,
|
|
3069
|
-
500: apiErrorSchema
|
|
3070
|
-
},
|
|
3071
|
-
summary: "Set a model provider as default for its framework"
|
|
3072
|
-
}
|
|
3073
|
-
});
|
|
3074
2962
|
var updateModelRequestSchema = z15.object({
|
|
3075
2963
|
selectedModel: z15.string().optional()
|
|
3076
2964
|
});
|
|
3077
|
-
var modelProvidersUpdateModelContract = c12.router({
|
|
3078
|
-
updateModel: {
|
|
3079
|
-
method: "PATCH",
|
|
3080
|
-
path: "/api/model-providers/:type/model",
|
|
3081
|
-
headers: authHeadersSchema,
|
|
3082
|
-
pathParams: z15.object({
|
|
3083
|
-
type: modelProviderTypeSchema
|
|
3084
|
-
}),
|
|
3085
|
-
body: updateModelRequestSchema,
|
|
3086
|
-
responses: {
|
|
3087
|
-
200: modelProviderResponseSchema,
|
|
3088
|
-
401: apiErrorSchema,
|
|
3089
|
-
404: apiErrorSchema,
|
|
3090
|
-
500: apiErrorSchema
|
|
3091
|
-
},
|
|
3092
|
-
summary: "Update model selection for an existing provider"
|
|
3093
|
-
}
|
|
3094
|
-
});
|
|
3095
2965
|
|
|
3096
2966
|
// ../../packages/core/src/contracts/sessions.ts
|
|
3097
2967
|
import { z as z16 } from "zod";
|
|
3098
|
-
var
|
|
2968
|
+
var c12 = initContract();
|
|
3099
2969
|
var storedChatMessageSchema = z16.object({
|
|
3100
2970
|
role: z16.enum(["user", "assistant"]),
|
|
3101
2971
|
content: z16.string(),
|
|
3102
2972
|
runId: z16.string().optional(),
|
|
2973
|
+
summaries: z16.array(z16.string()).optional(),
|
|
3103
2974
|
createdAt: z16.string()
|
|
3104
2975
|
});
|
|
3105
2976
|
var sessionResponseSchema = z16.object({
|
|
@@ -3140,7 +3011,7 @@ var checkpointResponseSchema = z16.object({
|
|
|
3140
3011
|
volumeVersionsSnapshot: volumeVersionsSnapshotSchema2.nullable(),
|
|
3141
3012
|
createdAt: z16.string()
|
|
3142
3013
|
});
|
|
3143
|
-
var sessionsContract =
|
|
3014
|
+
var sessionsContract = c12.router({
|
|
3144
3015
|
/**
|
|
3145
3016
|
* GET /api/agent/sessions?agentComposeId=X
|
|
3146
3017
|
* List chat sessions for an agent
|
|
@@ -3159,7 +3030,7 @@ var sessionsContract = c13.router({
|
|
|
3159
3030
|
summary: "List chat sessions for an agent"
|
|
3160
3031
|
}
|
|
3161
3032
|
});
|
|
3162
|
-
var sessionsByIdContract =
|
|
3033
|
+
var sessionsByIdContract = c12.router({
|
|
3163
3034
|
/**
|
|
3164
3035
|
* GET /api/agent/sessions/:id
|
|
3165
3036
|
* Get session by ID
|
|
@@ -3180,7 +3051,7 @@ var sessionsByIdContract = c13.router({
|
|
|
3180
3051
|
summary: "Get session by ID"
|
|
3181
3052
|
}
|
|
3182
3053
|
});
|
|
3183
|
-
var sessionMessagesContract =
|
|
3054
|
+
var sessionMessagesContract = c12.router({
|
|
3184
3055
|
/**
|
|
3185
3056
|
* POST /api/agent/sessions/:id/messages
|
|
3186
3057
|
* Append chat messages to a session
|
|
@@ -3210,7 +3081,7 @@ var sessionMessagesContract = c13.router({
|
|
|
3210
3081
|
summary: "Append chat messages to a session"
|
|
3211
3082
|
}
|
|
3212
3083
|
});
|
|
3213
|
-
var checkpointsByIdContract =
|
|
3084
|
+
var checkpointsByIdContract = c12.router({
|
|
3214
3085
|
/**
|
|
3215
3086
|
* GET /api/agent/checkpoints/:id
|
|
3216
3087
|
* Get checkpoint by ID
|
|
@@ -3234,7 +3105,7 @@ var checkpointsByIdContract = c13.router({
|
|
|
3234
3105
|
|
|
3235
3106
|
// ../../packages/core/src/contracts/chat-threads.ts
|
|
3236
3107
|
import { z as z17 } from "zod";
|
|
3237
|
-
var
|
|
3108
|
+
var c13 = initContract();
|
|
3238
3109
|
var chatThreadListItemSchema = z17.object({
|
|
3239
3110
|
id: z17.string(),
|
|
3240
3111
|
title: z17.string().nullable(),
|
|
@@ -3264,7 +3135,7 @@ var chatThreadDetailSchema = z17.object({
|
|
|
3264
3135
|
createdAt: z17.string(),
|
|
3265
3136
|
updatedAt: z17.string()
|
|
3266
3137
|
});
|
|
3267
|
-
var chatThreadsContract =
|
|
3138
|
+
var chatThreadsContract = c13.router({
|
|
3268
3139
|
create: {
|
|
3269
3140
|
method: "POST",
|
|
3270
3141
|
path: "/api/chat-threads",
|
|
@@ -3293,7 +3164,7 @@ var chatThreadsContract = c14.router({
|
|
|
3293
3164
|
summary: "List chat threads for an agent"
|
|
3294
3165
|
}
|
|
3295
3166
|
});
|
|
3296
|
-
var chatThreadByIdContract =
|
|
3167
|
+
var chatThreadByIdContract = c13.router({
|
|
3297
3168
|
get: {
|
|
3298
3169
|
method: "GET",
|
|
3299
3170
|
path: "/api/chat-threads/:id",
|
|
@@ -3307,7 +3178,7 @@ var chatThreadByIdContract = c14.router({
|
|
|
3307
3178
|
summary: "Get chat thread detail with messages"
|
|
3308
3179
|
}
|
|
3309
3180
|
});
|
|
3310
|
-
var chatThreadRunsContract =
|
|
3181
|
+
var chatThreadRunsContract = c13.router({
|
|
3311
3182
|
addRun: {
|
|
3312
3183
|
method: "POST",
|
|
3313
3184
|
path: "/api/chat-threads/:id/runs",
|
|
@@ -3327,7 +3198,7 @@ var chatThreadRunsContract = c14.router({
|
|
|
3327
3198
|
|
|
3328
3199
|
// ../../packages/core/src/contracts/runners.ts
|
|
3329
3200
|
import { z as z18 } from "zod";
|
|
3330
|
-
var
|
|
3201
|
+
var c14 = initContract();
|
|
3331
3202
|
var runnerGroupSchema = z18.string().regex(
|
|
3332
3203
|
/^[a-z0-9-]+\/[a-z0-9-]+$/,
|
|
3333
3204
|
"Runner group must be in org/name format (e.g., acme/production)"
|
|
@@ -3340,7 +3211,7 @@ var jobSchema = z18.object({
|
|
|
3340
3211
|
checkpointId: z18.uuid().nullable(),
|
|
3341
3212
|
experimentalProfile: z18.string().optional()
|
|
3342
3213
|
});
|
|
3343
|
-
var runnersPollContract =
|
|
3214
|
+
var runnersPollContract = c14.router({
|
|
3344
3215
|
poll: {
|
|
3345
3216
|
method: "POST",
|
|
3346
3217
|
path: "/api/runners/poll",
|
|
@@ -3443,7 +3314,7 @@ var executionContextSchema = z18.object({
|
|
|
3443
3314
|
// VM profile for resource allocation (e.g., "vm0/default", "vm0/browser")
|
|
3444
3315
|
experimentalProfile: z18.string().optional()
|
|
3445
3316
|
});
|
|
3446
|
-
var runnersJobClaimContract =
|
|
3317
|
+
var runnersJobClaimContract = c14.router({
|
|
3447
3318
|
claim: {
|
|
3448
3319
|
method: "POST",
|
|
3449
3320
|
path: "/api/runners/jobs/:id/claim",
|
|
@@ -3469,7 +3340,7 @@ var runnersJobClaimContract = c15.router({
|
|
|
3469
3340
|
|
|
3470
3341
|
// ../../packages/core/src/contracts/schedules.ts
|
|
3471
3342
|
import { z as z19 } from "zod";
|
|
3472
|
-
var
|
|
3343
|
+
var c15 = initContract();
|
|
3473
3344
|
var scheduleTriggerSchema = z19.object({
|
|
3474
3345
|
cron: z19.string().optional(),
|
|
3475
3346
|
at: z19.string().optional(),
|
|
@@ -3508,7 +3379,7 @@ var deployScheduleRequestSchema = z19.object({
|
|
|
3508
3379
|
intervalSeconds: z19.number().int().min(0).optional(),
|
|
3509
3380
|
timezone: z19.string().default("UTC"),
|
|
3510
3381
|
prompt: z19.string().min(1, "Prompt required"),
|
|
3511
|
-
// vars and secrets removed - now managed via
|
|
3382
|
+
// vars and secrets removed - now managed via server-side tables
|
|
3512
3383
|
artifactName: z19.string().optional(),
|
|
3513
3384
|
artifactVersion: z19.string().optional(),
|
|
3514
3385
|
volumeVersions: z19.record(z19.string(), z19.string()).optional(),
|
|
@@ -3586,7 +3457,7 @@ var deployScheduleResponseSchema = z19.object({
|
|
|
3586
3457
|
created: z19.boolean()
|
|
3587
3458
|
// true if created, false if updated
|
|
3588
3459
|
});
|
|
3589
|
-
var schedulesMainContract =
|
|
3460
|
+
var schedulesMainContract = c15.router({
|
|
3590
3461
|
/**
|
|
3591
3462
|
* POST /api/agent/schedules
|
|
3592
3463
|
* Deploy (create or update) a schedule
|
|
@@ -3624,7 +3495,7 @@ var schedulesMainContract = c16.router({
|
|
|
3624
3495
|
summary: "List all schedules"
|
|
3625
3496
|
}
|
|
3626
3497
|
});
|
|
3627
|
-
var schedulesByNameContract =
|
|
3498
|
+
var schedulesByNameContract = c15.router({
|
|
3628
3499
|
/**
|
|
3629
3500
|
* GET /api/agent/schedules/:name
|
|
3630
3501
|
* Get schedule by name
|
|
@@ -3662,7 +3533,7 @@ var schedulesByNameContract = c16.router({
|
|
|
3662
3533
|
composeId: z19.string().uuid("Compose ID required")
|
|
3663
3534
|
}),
|
|
3664
3535
|
responses: {
|
|
3665
|
-
204:
|
|
3536
|
+
204: c15.noBody(),
|
|
3666
3537
|
401: apiErrorSchema,
|
|
3667
3538
|
403: apiErrorSchema,
|
|
3668
3539
|
404: apiErrorSchema
|
|
@@ -3670,7 +3541,7 @@ var schedulesByNameContract = c16.router({
|
|
|
3670
3541
|
summary: "Delete schedule"
|
|
3671
3542
|
}
|
|
3672
3543
|
});
|
|
3673
|
-
var schedulesEnableContract =
|
|
3544
|
+
var schedulesEnableContract = c15.router({
|
|
3674
3545
|
/**
|
|
3675
3546
|
* POST /api/agent/schedules/:name/enable
|
|
3676
3547
|
* Enable a disabled schedule
|
|
@@ -3716,7 +3587,7 @@ var schedulesEnableContract = c16.router({
|
|
|
3716
3587
|
summary: "Disable schedule"
|
|
3717
3588
|
}
|
|
3718
3589
|
});
|
|
3719
|
-
var scheduleRunsContract =
|
|
3590
|
+
var scheduleRunsContract = c15.router({
|
|
3720
3591
|
/**
|
|
3721
3592
|
* GET /api/agent/schedules/:name/runs
|
|
3722
3593
|
* List recent runs for a schedule
|
|
@@ -3744,7 +3615,7 @@ var scheduleRunsContract = c16.router({
|
|
|
3744
3615
|
|
|
3745
3616
|
// ../../packages/core/src/contracts/realtime.ts
|
|
3746
3617
|
import { z as z20 } from "zod";
|
|
3747
|
-
var
|
|
3618
|
+
var c16 = initContract();
|
|
3748
3619
|
var ablyTokenRequestSchema = z20.object({
|
|
3749
3620
|
keyName: z20.string(),
|
|
3750
3621
|
ttl: z20.number().optional(),
|
|
@@ -3754,7 +3625,7 @@ var ablyTokenRequestSchema = z20.object({
|
|
|
3754
3625
|
nonce: z20.string(),
|
|
3755
3626
|
mac: z20.string()
|
|
3756
3627
|
});
|
|
3757
|
-
var runnerRealtimeTokenContract =
|
|
3628
|
+
var runnerRealtimeTokenContract = c16.router({
|
|
3758
3629
|
/**
|
|
3759
3630
|
* POST /api/runners/realtime/token
|
|
3760
3631
|
* Get an Ably token to subscribe to a runner group's job notification channel
|
|
@@ -3776,23 +3647,19 @@ var runnerRealtimeTokenContract = c17.router({
|
|
|
3776
3647
|
}
|
|
3777
3648
|
});
|
|
3778
3649
|
|
|
3779
|
-
// ../../packages/core/src/contracts/
|
|
3650
|
+
// ../../packages/core/src/contracts/logs.ts
|
|
3780
3651
|
import { z as z21 } from "zod";
|
|
3781
3652
|
var paginationSchema = z21.object({
|
|
3782
3653
|
hasMore: z21.boolean(),
|
|
3783
|
-
nextCursor: z21.string().nullable()
|
|
3654
|
+
nextCursor: z21.string().nullable(),
|
|
3655
|
+
totalPages: z21.number()
|
|
3784
3656
|
});
|
|
3785
3657
|
var listQuerySchema = z21.object({
|
|
3786
3658
|
cursor: z21.string().optional(),
|
|
3787
3659
|
limit: z21.coerce.number().min(1).max(100).default(20)
|
|
3788
3660
|
});
|
|
3789
|
-
var
|
|
3790
|
-
var
|
|
3791
|
-
hasMore: z21.boolean(),
|
|
3792
|
-
nextCursor: z21.string().nullable(),
|
|
3793
|
-
totalPages: z21.number()
|
|
3794
|
-
});
|
|
3795
|
-
var platformLogStatusSchema = z21.enum([
|
|
3661
|
+
var c17 = initContract();
|
|
3662
|
+
var logStatusSchema = z21.enum([
|
|
3796
3663
|
"queued",
|
|
3797
3664
|
"pending",
|
|
3798
3665
|
"running",
|
|
@@ -3801,33 +3668,33 @@ var platformLogStatusSchema = z21.enum([
|
|
|
3801
3668
|
"timeout",
|
|
3802
3669
|
"cancelled"
|
|
3803
3670
|
]);
|
|
3804
|
-
var
|
|
3671
|
+
var logEntrySchema = z21.object({
|
|
3805
3672
|
id: z21.uuid(),
|
|
3806
3673
|
sessionId: z21.string().nullable(),
|
|
3807
3674
|
agentName: z21.string(),
|
|
3808
3675
|
displayName: z21.string().nullable(),
|
|
3809
3676
|
orgSlug: z21.string().nullable(),
|
|
3810
3677
|
framework: z21.string().nullable(),
|
|
3811
|
-
status:
|
|
3678
|
+
status: logStatusSchema,
|
|
3812
3679
|
createdAt: z21.string(),
|
|
3813
3680
|
startedAt: z21.string().nullable(),
|
|
3814
3681
|
completedAt: z21.string().nullable()
|
|
3815
3682
|
});
|
|
3816
|
-
var
|
|
3817
|
-
data: z21.array(
|
|
3818
|
-
pagination:
|
|
3683
|
+
var logsListResponseSchema = z21.object({
|
|
3684
|
+
data: z21.array(logEntrySchema),
|
|
3685
|
+
pagination: paginationSchema
|
|
3819
3686
|
});
|
|
3820
3687
|
var artifactSchema = z21.object({
|
|
3821
3688
|
name: z21.string().nullable(),
|
|
3822
3689
|
version: z21.string().nullable()
|
|
3823
3690
|
});
|
|
3824
|
-
var
|
|
3691
|
+
var logDetailSchema = z21.object({
|
|
3825
3692
|
id: z21.uuid(),
|
|
3826
3693
|
sessionId: z21.string().nullable(),
|
|
3827
3694
|
agentName: z21.string(),
|
|
3828
3695
|
displayName: z21.string().nullable(),
|
|
3829
3696
|
framework: z21.string().nullable(),
|
|
3830
|
-
status:
|
|
3697
|
+
status: logStatusSchema,
|
|
3831
3698
|
prompt: z21.string(),
|
|
3832
3699
|
error: z21.string().nullable(),
|
|
3833
3700
|
createdAt: z21.string(),
|
|
@@ -3835,7 +3702,7 @@ var platformLogDetailSchema = z21.object({
|
|
|
3835
3702
|
completedAt: z21.string().nullable(),
|
|
3836
3703
|
artifact: artifactSchema
|
|
3837
3704
|
});
|
|
3838
|
-
var
|
|
3705
|
+
var logsListContract = c17.router({
|
|
3839
3706
|
list: {
|
|
3840
3707
|
method: "GET",
|
|
3841
3708
|
path: "/api/app/logs",
|
|
@@ -3844,16 +3711,16 @@ var platformLogsListContract = c18.router({
|
|
|
3844
3711
|
agent: z21.string().optional(),
|
|
3845
3712
|
name: z21.string().optional(),
|
|
3846
3713
|
org: z21.string().optional(),
|
|
3847
|
-
status:
|
|
3714
|
+
status: logStatusSchema.optional()
|
|
3848
3715
|
}),
|
|
3849
3716
|
responses: {
|
|
3850
|
-
200:
|
|
3717
|
+
200: logsListResponseSchema,
|
|
3851
3718
|
401: apiErrorSchema
|
|
3852
3719
|
},
|
|
3853
3720
|
summary: "List agent run logs with pagination"
|
|
3854
3721
|
}
|
|
3855
3722
|
});
|
|
3856
|
-
var
|
|
3723
|
+
var logsByIdContract = c17.router({
|
|
3857
3724
|
getById: {
|
|
3858
3725
|
method: "GET",
|
|
3859
3726
|
path: "/api/app/logs/:id",
|
|
@@ -3862,7 +3729,7 @@ var platformLogsByIdContract = c18.router({
|
|
|
3862
3729
|
id: z21.string().uuid("Invalid log ID")
|
|
3863
3730
|
}),
|
|
3864
3731
|
responses: {
|
|
3865
|
-
200:
|
|
3732
|
+
200: logDetailSchema,
|
|
3866
3733
|
401: apiErrorSchema,
|
|
3867
3734
|
404: apiErrorSchema
|
|
3868
3735
|
},
|
|
@@ -3873,7 +3740,7 @@ var artifactDownloadResponseSchema = z21.object({
|
|
|
3873
3740
|
url: z21.url(),
|
|
3874
3741
|
expiresAt: z21.string()
|
|
3875
3742
|
});
|
|
3876
|
-
var
|
|
3743
|
+
var artifactDownloadContract = c17.router({
|
|
3877
3744
|
getDownloadUrl: {
|
|
3878
3745
|
method: "GET",
|
|
3879
3746
|
path: "/api/app/artifacts/download",
|
|
@@ -3892,7 +3759,7 @@ var platformArtifactDownloadContract = c18.router({
|
|
|
3892
3759
|
|
|
3893
3760
|
// ../../packages/core/src/contracts/compose-jobs.ts
|
|
3894
3761
|
import { z as z22 } from "zod";
|
|
3895
|
-
var
|
|
3762
|
+
var c18 = initContract();
|
|
3896
3763
|
var composeJobStatusSchema = z22.enum([
|
|
3897
3764
|
"pending",
|
|
3898
3765
|
"running",
|
|
@@ -3927,7 +3794,7 @@ var composeJobResponseSchema = z22.object({
|
|
|
3927
3794
|
startedAt: z22.string().optional(),
|
|
3928
3795
|
completedAt: z22.string().optional()
|
|
3929
3796
|
});
|
|
3930
|
-
var composeJobsMainContract =
|
|
3797
|
+
var composeJobsMainContract = c18.router({
|
|
3931
3798
|
/**
|
|
3932
3799
|
* POST /api/compose/jobs
|
|
3933
3800
|
* Create a new compose job from GitHub URL or platform content
|
|
@@ -3947,7 +3814,7 @@ var composeJobsMainContract = c19.router({
|
|
|
3947
3814
|
summary: "Create compose job"
|
|
3948
3815
|
}
|
|
3949
3816
|
});
|
|
3950
|
-
var composeJobsByIdContract =
|
|
3817
|
+
var composeJobsByIdContract = c18.router({
|
|
3951
3818
|
/**
|
|
3952
3819
|
* GET /api/compose/jobs/:jobId
|
|
3953
3820
|
* Get compose job status and result
|
|
@@ -3967,7 +3834,7 @@ var composeJobsByIdContract = c19.router({
|
|
|
3967
3834
|
summary: "Get compose job status"
|
|
3968
3835
|
}
|
|
3969
3836
|
});
|
|
3970
|
-
var webhookComposeCompleteContract =
|
|
3837
|
+
var webhookComposeCompleteContract = c18.router({
|
|
3971
3838
|
/**
|
|
3972
3839
|
* POST /api/webhooks/compose/complete
|
|
3973
3840
|
* Handle compose job completion from sandbox
|
|
@@ -3997,7 +3864,7 @@ var webhookComposeCompleteContract = c19.router({
|
|
|
3997
3864
|
|
|
3998
3865
|
// ../../packages/core/src/contracts/connectors.ts
|
|
3999
3866
|
import { z as z23 } from "zod";
|
|
4000
|
-
var
|
|
3867
|
+
var c19 = initContract();
|
|
4001
3868
|
var CONNECTOR_TYPES_DEF = {
|
|
4002
3869
|
axiom: {
|
|
4003
3870
|
label: "Axiom",
|
|
@@ -6657,7 +6524,7 @@ var connectorListResponseSchema = z23.object({
|
|
|
6657
6524
|
configuredTypes: z23.array(connectorTypeSchema),
|
|
6658
6525
|
connectorProvidedSecretNames: z23.array(z23.string())
|
|
6659
6526
|
});
|
|
6660
|
-
var connectorsMainContract =
|
|
6527
|
+
var connectorsMainContract = c19.router({
|
|
6661
6528
|
list: {
|
|
6662
6529
|
method: "GET",
|
|
6663
6530
|
path: "/api/connectors",
|
|
@@ -6670,7 +6537,7 @@ var connectorsMainContract = c20.router({
|
|
|
6670
6537
|
summary: "List all connectors for the authenticated user"
|
|
6671
6538
|
}
|
|
6672
6539
|
});
|
|
6673
|
-
var connectorsByTypeContract =
|
|
6540
|
+
var connectorsByTypeContract = c19.router({
|
|
6674
6541
|
get: {
|
|
6675
6542
|
method: "GET",
|
|
6676
6543
|
path: "/api/connectors/:type",
|
|
@@ -6694,7 +6561,7 @@ var connectorsByTypeContract = c20.router({
|
|
|
6694
6561
|
type: connectorTypeSchema
|
|
6695
6562
|
}),
|
|
6696
6563
|
responses: {
|
|
6697
|
-
204:
|
|
6564
|
+
204: c19.noBody(),
|
|
6698
6565
|
401: apiErrorSchema,
|
|
6699
6566
|
404: apiErrorSchema,
|
|
6700
6567
|
500: apiErrorSchema
|
|
@@ -6708,7 +6575,7 @@ var scopeDiffResponseSchema = z23.object({
|
|
|
6708
6575
|
currentScopes: z23.array(z23.string()),
|
|
6709
6576
|
storedScopes: z23.array(z23.string())
|
|
6710
6577
|
});
|
|
6711
|
-
var connectorScopeDiffContract =
|
|
6578
|
+
var connectorScopeDiffContract = c19.router({
|
|
6712
6579
|
getScopeDiff: {
|
|
6713
6580
|
method: "GET",
|
|
6714
6581
|
path: "/api/connectors/:type/scope-diff",
|
|
@@ -6743,7 +6610,7 @@ var connectorSessionStatusResponseSchema = z23.object({
|
|
|
6743
6610
|
status: connectorSessionStatusSchema,
|
|
6744
6611
|
errorMessage: z23.string().nullable().optional()
|
|
6745
6612
|
});
|
|
6746
|
-
var connectorSessionsContract =
|
|
6613
|
+
var connectorSessionsContract = c19.router({
|
|
6747
6614
|
/**
|
|
6748
6615
|
* POST /api/connectors/:type/sessions
|
|
6749
6616
|
* Create a new connector session for CLI device flow
|
|
@@ -6765,7 +6632,7 @@ var connectorSessionsContract = c20.router({
|
|
|
6765
6632
|
summary: "Create connector session for CLI device flow"
|
|
6766
6633
|
}
|
|
6767
6634
|
});
|
|
6768
|
-
var connectorSessionByIdContract =
|
|
6635
|
+
var connectorSessionByIdContract = c19.router({
|
|
6769
6636
|
/**
|
|
6770
6637
|
* GET /api/connectors/:type/sessions/:sessionId
|
|
6771
6638
|
* Get connector session status (for CLI polling)
|
|
@@ -6795,7 +6662,7 @@ var computerConnectorCreateResponseSchema = z23.object({
|
|
|
6795
6662
|
endpointPrefix: z23.string(),
|
|
6796
6663
|
domain: z23.string()
|
|
6797
6664
|
});
|
|
6798
|
-
var computerConnectorContract =
|
|
6665
|
+
var computerConnectorContract = c19.router({
|
|
6799
6666
|
create: {
|
|
6800
6667
|
method: "POST",
|
|
6801
6668
|
path: "/api/connectors/computer",
|
|
@@ -6826,7 +6693,7 @@ var computerConnectorContract = c20.router({
|
|
|
6826
6693
|
path: "/api/connectors/computer",
|
|
6827
6694
|
headers: authHeadersSchema,
|
|
6828
6695
|
responses: {
|
|
6829
|
-
204:
|
|
6696
|
+
204: c19.noBody(),
|
|
6830
6697
|
401: apiErrorSchema,
|
|
6831
6698
|
404: apiErrorSchema,
|
|
6832
6699
|
500: apiErrorSchema
|
|
@@ -7179,7 +7046,7 @@ async function expandFirewallConfigs(config, fetchFn) {
|
|
|
7179
7046
|
|
|
7180
7047
|
// ../../packages/core/src/contracts/user-preferences.ts
|
|
7181
7048
|
import { z as z24 } from "zod";
|
|
7182
|
-
var
|
|
7049
|
+
var c20 = initContract();
|
|
7183
7050
|
var sendModeSchema = z24.enum(["enter", "cmd-enter"]);
|
|
7184
7051
|
var userPreferencesResponseSchema = z24.object({
|
|
7185
7052
|
timezone: z24.string().nullable(),
|
|
@@ -7200,7 +7067,7 @@ var updateUserPreferencesRequestSchema = z24.object({
|
|
|
7200
7067
|
message: "At least one preference must be provided"
|
|
7201
7068
|
}
|
|
7202
7069
|
);
|
|
7203
|
-
var userPreferencesContract =
|
|
7070
|
+
var userPreferencesContract = c20.router({
|
|
7204
7071
|
/**
|
|
7205
7072
|
* GET /api/user/preferences
|
|
7206
7073
|
* Get current user's preferences
|
|
@@ -7237,7 +7104,7 @@ var userPreferencesContract = c21.router({
|
|
|
7237
7104
|
|
|
7238
7105
|
// ../../packages/core/src/contracts/org-list.ts
|
|
7239
7106
|
import { z as z25 } from "zod";
|
|
7240
|
-
var
|
|
7107
|
+
var c21 = initContract();
|
|
7241
7108
|
var orgListItemSchema = z25.object({
|
|
7242
7109
|
slug: z25.string(),
|
|
7243
7110
|
role: z25.string()
|
|
@@ -7246,7 +7113,7 @@ var orgListResponseSchema = z25.object({
|
|
|
7246
7113
|
orgs: z25.array(orgListItemSchema),
|
|
7247
7114
|
active: z25.string().optional()
|
|
7248
7115
|
});
|
|
7249
|
-
var orgListContract =
|
|
7116
|
+
var orgListContract = c21.router({
|
|
7250
7117
|
/**
|
|
7251
7118
|
* GET /api/org/list
|
|
7252
7119
|
* List all orgs accessible to the user
|
|
@@ -7266,7 +7133,7 @@ var orgListContract = c22.router({
|
|
|
7266
7133
|
|
|
7267
7134
|
// ../../packages/core/src/contracts/onboarding.ts
|
|
7268
7135
|
import { z as z26 } from "zod";
|
|
7269
|
-
var
|
|
7136
|
+
var c22 = initContract();
|
|
7270
7137
|
var onboardingStatusResponseSchema = z26.object({
|
|
7271
7138
|
needsOnboarding: z26.boolean(),
|
|
7272
7139
|
isAdmin: z26.boolean(),
|
|
@@ -7282,7 +7149,7 @@ var onboardingStatusResponseSchema = z26.object({
|
|
|
7282
7149
|
}).nullable(),
|
|
7283
7150
|
defaultAgentSkills: z26.array(z26.string())
|
|
7284
7151
|
});
|
|
7285
|
-
var onboardingStatusContract =
|
|
7152
|
+
var onboardingStatusContract = c22.router({
|
|
7286
7153
|
getStatus: {
|
|
7287
7154
|
method: "GET",
|
|
7288
7155
|
path: "/api/onboarding/status",
|
|
@@ -7297,7 +7164,7 @@ var onboardingStatusContract = c23.router({
|
|
|
7297
7164
|
|
|
7298
7165
|
// ../../packages/core/src/contracts/skills.ts
|
|
7299
7166
|
import { z as z27 } from "zod";
|
|
7300
|
-
var
|
|
7167
|
+
var c23 = initContract();
|
|
7301
7168
|
var skillFrontmatterSchema = z27.object({
|
|
7302
7169
|
name: z27.string().optional(),
|
|
7303
7170
|
description: z27.string().optional(),
|
|
@@ -7309,7 +7176,7 @@ var resolvedSkillSchema = z27.object({
|
|
|
7309
7176
|
versionHash: z27.string(),
|
|
7310
7177
|
frontmatter: skillFrontmatterSchema
|
|
7311
7178
|
});
|
|
7312
|
-
var skillsResolveContract =
|
|
7179
|
+
var skillsResolveContract = c23.router({
|
|
7313
7180
|
resolve: {
|
|
7314
7181
|
method: "POST",
|
|
7315
7182
|
path: "/api/skills/resolve",
|
|
@@ -7331,8 +7198,8 @@ var skillsResolveContract = c24.router({
|
|
|
7331
7198
|
|
|
7332
7199
|
// ../../packages/core/src/contracts/org-model-providers.ts
|
|
7333
7200
|
import { z as z28 } from "zod";
|
|
7334
|
-
var
|
|
7335
|
-
var orgModelProvidersMainContract =
|
|
7201
|
+
var c24 = initContract();
|
|
7202
|
+
var orgModelProvidersMainContract = c24.router({
|
|
7336
7203
|
list: {
|
|
7337
7204
|
method: "GET",
|
|
7338
7205
|
path: "/api/org/model-providers",
|
|
@@ -7360,7 +7227,7 @@ var orgModelProvidersMainContract = c25.router({
|
|
|
7360
7227
|
summary: "Create or update an org-level model provider (admin only)"
|
|
7361
7228
|
}
|
|
7362
7229
|
});
|
|
7363
|
-
var orgModelProvidersByTypeContract =
|
|
7230
|
+
var orgModelProvidersByTypeContract = c24.router({
|
|
7364
7231
|
delete: {
|
|
7365
7232
|
method: "DELETE",
|
|
7366
7233
|
path: "/api/org/model-providers/:type",
|
|
@@ -7369,7 +7236,7 @@ var orgModelProvidersByTypeContract = c25.router({
|
|
|
7369
7236
|
type: modelProviderTypeSchema
|
|
7370
7237
|
}),
|
|
7371
7238
|
responses: {
|
|
7372
|
-
204:
|
|
7239
|
+
204: c24.noBody(),
|
|
7373
7240
|
401: apiErrorSchema,
|
|
7374
7241
|
403: apiErrorSchema,
|
|
7375
7242
|
404: apiErrorSchema,
|
|
@@ -7378,7 +7245,7 @@ var orgModelProvidersByTypeContract = c25.router({
|
|
|
7378
7245
|
summary: "Delete an org-level model provider (admin only)"
|
|
7379
7246
|
}
|
|
7380
7247
|
});
|
|
7381
|
-
var orgModelProvidersSetDefaultContract =
|
|
7248
|
+
var orgModelProvidersSetDefaultContract = c24.router({
|
|
7382
7249
|
setDefault: {
|
|
7383
7250
|
method: "POST",
|
|
7384
7251
|
path: "/api/org/model-providers/:type/set-default",
|
|
@@ -7397,7 +7264,7 @@ var orgModelProvidersSetDefaultContract = c25.router({
|
|
|
7397
7264
|
summary: "Set org-level model provider as default (admin only)"
|
|
7398
7265
|
}
|
|
7399
7266
|
});
|
|
7400
|
-
var orgModelProvidersUpdateModelContract =
|
|
7267
|
+
var orgModelProvidersUpdateModelContract = c24.router({
|
|
7401
7268
|
updateModel: {
|
|
7402
7269
|
method: "PATCH",
|
|
7403
7270
|
path: "/api/org/model-providers/:type/model",
|
|
@@ -7419,8 +7286,8 @@ var orgModelProvidersUpdateModelContract = c25.router({
|
|
|
7419
7286
|
|
|
7420
7287
|
// ../../packages/core/src/contracts/org-secrets.ts
|
|
7421
7288
|
import { z as z29 } from "zod";
|
|
7422
|
-
var
|
|
7423
|
-
var orgSecretsMainContract =
|
|
7289
|
+
var c25 = initContract();
|
|
7290
|
+
var orgSecretsMainContract = c25.router({
|
|
7424
7291
|
list: {
|
|
7425
7292
|
method: "GET",
|
|
7426
7293
|
path: "/api/org/secrets",
|
|
@@ -7448,7 +7315,7 @@ var orgSecretsMainContract = c26.router({
|
|
|
7448
7315
|
summary: "Create or update an org-level secret (admin only)"
|
|
7449
7316
|
}
|
|
7450
7317
|
});
|
|
7451
|
-
var orgSecretsByNameContract =
|
|
7318
|
+
var orgSecretsByNameContract = c25.router({
|
|
7452
7319
|
delete: {
|
|
7453
7320
|
method: "DELETE",
|
|
7454
7321
|
path: "/api/org/secrets/:name",
|
|
@@ -7457,7 +7324,7 @@ var orgSecretsByNameContract = c26.router({
|
|
|
7457
7324
|
name: secretNameSchema
|
|
7458
7325
|
}),
|
|
7459
7326
|
responses: {
|
|
7460
|
-
204:
|
|
7327
|
+
204: c25.noBody(),
|
|
7461
7328
|
401: apiErrorSchema,
|
|
7462
7329
|
403: apiErrorSchema,
|
|
7463
7330
|
404: apiErrorSchema,
|
|
@@ -7469,8 +7336,8 @@ var orgSecretsByNameContract = c26.router({
|
|
|
7469
7336
|
|
|
7470
7337
|
// ../../packages/core/src/contracts/org-variables.ts
|
|
7471
7338
|
import { z as z30 } from "zod";
|
|
7472
|
-
var
|
|
7473
|
-
var orgVariablesMainContract =
|
|
7339
|
+
var c26 = initContract();
|
|
7340
|
+
var orgVariablesMainContract = c26.router({
|
|
7474
7341
|
list: {
|
|
7475
7342
|
method: "GET",
|
|
7476
7343
|
path: "/api/org/variables",
|
|
@@ -7498,7 +7365,7 @@ var orgVariablesMainContract = c27.router({
|
|
|
7498
7365
|
summary: "Create or update an org-level variable (admin only)"
|
|
7499
7366
|
}
|
|
7500
7367
|
});
|
|
7501
|
-
var orgVariablesByNameContract =
|
|
7368
|
+
var orgVariablesByNameContract = c26.router({
|
|
7502
7369
|
delete: {
|
|
7503
7370
|
method: "DELETE",
|
|
7504
7371
|
path: "/api/org/variables/:name",
|
|
@@ -7507,7 +7374,7 @@ var orgVariablesByNameContract = c27.router({
|
|
|
7507
7374
|
name: variableNameSchema
|
|
7508
7375
|
}),
|
|
7509
7376
|
responses: {
|
|
7510
|
-
204:
|
|
7377
|
+
204: c26.noBody(),
|
|
7511
7378
|
401: apiErrorSchema,
|
|
7512
7379
|
403: apiErrorSchema,
|
|
7513
7380
|
404: apiErrorSchema,
|
|
@@ -7517,23 +7384,6 @@ var orgVariablesByNameContract = c27.router({
|
|
|
7517
7384
|
}
|
|
7518
7385
|
});
|
|
7519
7386
|
|
|
7520
|
-
// ../../packages/core/src/org-reference.ts
|
|
7521
|
-
function isLegacySystemTemplate(reference) {
|
|
7522
|
-
return reference.startsWith("vm0-");
|
|
7523
|
-
}
|
|
7524
|
-
function getLegacySystemTemplateWarning(legacyFormat) {
|
|
7525
|
-
if (!isLegacySystemTemplate(legacyFormat)) {
|
|
7526
|
-
return void 0;
|
|
7527
|
-
}
|
|
7528
|
-
if (legacyFormat === "vm0-claude-code") {
|
|
7529
|
-
return `Warning: "${legacyFormat}" format is deprecated. Use "vm0/claude-code" instead.`;
|
|
7530
|
-
}
|
|
7531
|
-
if (legacyFormat.startsWith("vm0-github-cli")) {
|
|
7532
|
-
return `Warning: "${legacyFormat}" is deprecated. GitHub CLI is now included in the base image.`;
|
|
7533
|
-
}
|
|
7534
|
-
return `Warning: "${legacyFormat}" format is deprecated.`;
|
|
7535
|
-
}
|
|
7536
|
-
|
|
7537
7387
|
// ../../packages/core/src/storage-names.ts
|
|
7538
7388
|
function getInstructionsStorageName(agentName) {
|
|
7539
7389
|
return `agent-instructions@${agentName}`;
|
|
@@ -7607,19 +7457,19 @@ var FEATURE_SWITCHES = {
|
|
|
7607
7457
|
maintainer: "ethan@vm0.ai",
|
|
7608
7458
|
enabled: true
|
|
7609
7459
|
},
|
|
7610
|
-
["
|
|
7460
|
+
["agents" /* Agents */]: {
|
|
7611
7461
|
maintainer: "ethan@vm0.ai",
|
|
7612
7462
|
enabled: true
|
|
7613
7463
|
},
|
|
7614
|
-
["
|
|
7464
|
+
["secrets" /* Secrets */]: {
|
|
7615
7465
|
maintainer: "ethan@vm0.ai",
|
|
7616
7466
|
enabled: false
|
|
7617
7467
|
},
|
|
7618
|
-
["
|
|
7468
|
+
["artifacts" /* Artifacts */]: {
|
|
7619
7469
|
maintainer: "ethan@vm0.ai",
|
|
7620
7470
|
enabled: false
|
|
7621
7471
|
},
|
|
7622
|
-
["
|
|
7472
|
+
["apiKeys" /* ApiKeys */]: {
|
|
7623
7473
|
maintainer: "ethan@vm0.ai",
|
|
7624
7474
|
enabled: false
|
|
7625
7475
|
},
|
|
@@ -9592,24 +9442,6 @@ function hasVolumes(config) {
|
|
|
9592
9442
|
const volumes = cfg.volumes;
|
|
9593
9443
|
return typeof volumes === "object" && volumes !== null && Object.keys(volumes).length > 0;
|
|
9594
9444
|
}
|
|
9595
|
-
function checkLegacyImageFormat(config) {
|
|
9596
|
-
const cfg = config;
|
|
9597
|
-
const agentsConfig = cfg.agents;
|
|
9598
|
-
for (const [name, agentConfig] of Object.entries(agentsConfig)) {
|
|
9599
|
-
const image = agentConfig.image;
|
|
9600
|
-
if (image) {
|
|
9601
|
-
console.log(
|
|
9602
|
-
chalk6.yellow(
|
|
9603
|
-
`\u26A0 Agent "${name}": 'image' field is deprecated and will be ignored. The server resolves the image based on the framework.`
|
|
9604
|
-
)
|
|
9605
|
-
);
|
|
9606
|
-
const warning = getLegacySystemTemplateWarning(image);
|
|
9607
|
-
if (warning) {
|
|
9608
|
-
console.log(chalk6.yellow(` ${warning}`));
|
|
9609
|
-
}
|
|
9610
|
-
}
|
|
9611
|
-
}
|
|
9612
|
-
}
|
|
9613
9445
|
async function uploadAssets(agentName, agent, basePath, jsonMode) {
|
|
9614
9446
|
if (agent.instructions) {
|
|
9615
9447
|
if (!jsonMode) {
|
|
@@ -9775,9 +9607,9 @@ function mergeSkillVariables(agent, variables) {
|
|
|
9775
9607
|
agent.environment = environment;
|
|
9776
9608
|
}
|
|
9777
9609
|
}
|
|
9778
|
-
function
|
|
9610
|
+
function getAppUrl(apiUrl) {
|
|
9779
9611
|
const url = new URL(apiUrl);
|
|
9780
|
-
url.hostname = url.hostname.replace("www", "
|
|
9612
|
+
url.hostname = url.hostname.replace("www", "app");
|
|
9781
9613
|
return url.origin;
|
|
9782
9614
|
}
|
|
9783
9615
|
async function checkAndPromptMissingItems(config, options) {
|
|
@@ -9810,7 +9642,7 @@ async function checkAndPromptMissingItems(config, options) {
|
|
|
9810
9642
|
return { missingSecrets: [], missingVars: [] };
|
|
9811
9643
|
}
|
|
9812
9644
|
const apiUrl = await getApiUrl();
|
|
9813
|
-
const
|
|
9645
|
+
const appUrl = getAppUrl(apiUrl);
|
|
9814
9646
|
const params = new URLSearchParams();
|
|
9815
9647
|
if (missingSecrets.length > 0) {
|
|
9816
9648
|
params.set("secrets", missingSecrets.join(","));
|
|
@@ -9818,7 +9650,7 @@ async function checkAndPromptMissingItems(config, options) {
|
|
|
9818
9650
|
if (missingVars.length > 0) {
|
|
9819
9651
|
params.set("vars", missingVars.join(","));
|
|
9820
9652
|
}
|
|
9821
|
-
const setupUrl = `${
|
|
9653
|
+
const setupUrl = `${appUrl}/environment-variables-setup?${params.toString()}`;
|
|
9822
9654
|
if (!options.json) {
|
|
9823
9655
|
console.log();
|
|
9824
9656
|
console.log(
|
|
@@ -9931,9 +9763,6 @@ async function handleGitHubCompose(url, options) {
|
|
|
9931
9763
|
)
|
|
9932
9764
|
});
|
|
9933
9765
|
}
|
|
9934
|
-
if (!options.json) {
|
|
9935
|
-
checkLegacyImageFormat(config);
|
|
9936
|
-
}
|
|
9937
9766
|
const skillResults = await uploadAssets(
|
|
9938
9767
|
agentName,
|
|
9939
9768
|
agent,
|
|
@@ -9977,7 +9806,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
9977
9806
|
options.autoUpdate = false;
|
|
9978
9807
|
}
|
|
9979
9808
|
if (options.autoUpdate !== false) {
|
|
9980
|
-
await startSilentUpgrade("9.
|
|
9809
|
+
await startSilentUpgrade("9.66.0");
|
|
9981
9810
|
}
|
|
9982
9811
|
try {
|
|
9983
9812
|
let result;
|
|
@@ -9985,9 +9814,6 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
9985
9814
|
result = await handleGitHubCompose(resolvedConfigFile, options);
|
|
9986
9815
|
} else {
|
|
9987
9816
|
const { config, agentName, agent, basePath } = await loadAndValidateConfig(resolvedConfigFile);
|
|
9988
|
-
if (!options.json) {
|
|
9989
|
-
checkLegacyImageFormat(config);
|
|
9990
|
-
}
|
|
9991
9817
|
const skillResults = await uploadAssets(
|
|
9992
9818
|
agentName,
|
|
9993
9819
|
agent,
|
|
@@ -10799,7 +10625,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
10799
10625
|
withErrorHandler(
|
|
10800
10626
|
async (identifier, prompt, options) => {
|
|
10801
10627
|
if (options.autoUpdate !== false) {
|
|
10802
|
-
await startSilentUpgrade("9.
|
|
10628
|
+
await startSilentUpgrade("9.66.0");
|
|
10803
10629
|
}
|
|
10804
10630
|
const { org, name, version } = parseIdentifier(identifier);
|
|
10805
10631
|
let composeId;
|
|
@@ -12519,7 +12345,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
12519
12345
|
withErrorHandler(
|
|
12520
12346
|
async (prompt, options) => {
|
|
12521
12347
|
if (options.autoUpdate !== false) {
|
|
12522
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
12348
|
+
const shouldExit = await checkAndUpgrade("9.66.0", prompt);
|
|
12523
12349
|
if (shouldExit) {
|
|
12524
12350
|
process.exit(0);
|
|
12525
12351
|
}
|
|
@@ -13081,7 +12907,7 @@ var ApiClient = class {
|
|
|
13081
12907
|
}
|
|
13082
12908
|
/**
|
|
13083
12909
|
* Deploy schedule (create or update)
|
|
13084
|
-
* Note: vars and secrets are now managed via
|
|
12910
|
+
* Note: vars and secrets are now managed via server-side tables (vm0 secret set, vm0 var set)
|
|
13085
12911
|
*/
|
|
13086
12912
|
async deploySchedule(body) {
|
|
13087
12913
|
const baseUrl = await this.getBaseUrl();
|
|
@@ -14701,20 +14527,28 @@ import { tmpdir as tmpdir7 } from "os";
|
|
|
14701
14527
|
import * as tar6 from "tar";
|
|
14702
14528
|
import { stringify as yamlStringify } from "yaml";
|
|
14703
14529
|
function cleanComposeContent(content) {
|
|
14704
|
-
const
|
|
14530
|
+
const agents = {};
|
|
14531
|
+
for (const [name, agent] of Object.entries(content.agents)) {
|
|
14532
|
+
const cleaned = {
|
|
14533
|
+
framework: agent.framework
|
|
14534
|
+
};
|
|
14535
|
+
if (agent.description) cleaned.description = agent.description;
|
|
14536
|
+
if (agent.volumes) cleaned.volumes = agent.volumes;
|
|
14537
|
+
if (agent.environment) cleaned.environment = agent.environment;
|
|
14538
|
+
if (agent.instructions) cleaned.instructions = agent.instructions;
|
|
14539
|
+
if (agent.skills) cleaned.skills = agent.skills;
|
|
14540
|
+
if (agent.experimental_runner)
|
|
14541
|
+
cleaned.experimental_runner = agent.experimental_runner;
|
|
14542
|
+
agents[name] = cleaned;
|
|
14543
|
+
}
|
|
14544
|
+
const result = {
|
|
14705
14545
|
version: content.version,
|
|
14706
|
-
agents
|
|
14546
|
+
agents
|
|
14707
14547
|
};
|
|
14708
|
-
for (const [agentName, agent] of Object.entries(content.agents)) {
|
|
14709
|
-
const { image, working_dir: workingDir, ...rest } = agent;
|
|
14710
|
-
void image;
|
|
14711
|
-
void workingDir;
|
|
14712
|
-
cleaned.agents[agentName] = rest;
|
|
14713
|
-
}
|
|
14714
14548
|
if (content.volumes) {
|
|
14715
|
-
|
|
14549
|
+
result.volumes = content.volumes;
|
|
14716
14550
|
}
|
|
14717
|
-
return
|
|
14551
|
+
return result;
|
|
14718
14552
|
}
|
|
14719
14553
|
async function downloadInstructions(agentName, instructionsPath, destination) {
|
|
14720
14554
|
const destPath = join10(destination, instructionsPath);
|
|
@@ -14856,7 +14690,7 @@ var listCommand9 = new Command65().name("list").alias("ls").description("List al
|
|
|
14856
14690
|
);
|
|
14857
14691
|
return;
|
|
14858
14692
|
}
|
|
14859
|
-
const nameWidth = Math.max(4, ...data.composes.map((
|
|
14693
|
+
const nameWidth = Math.max(4, ...data.composes.map((c27) => c27.name.length));
|
|
14860
14694
|
const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
|
|
14861
14695
|
" "
|
|
14862
14696
|
);
|
|
@@ -15004,12 +14838,6 @@ function formatVariableSources(sources) {
|
|
|
15004
14838
|
function formatAgentDetails(agentName, agent, agentSources, volumeConfigs) {
|
|
15005
14839
|
console.log(` ${chalk59.cyan(agentName)}:`);
|
|
15006
14840
|
console.log(` Framework: ${agent.framework}`);
|
|
15007
|
-
if (agent.image) {
|
|
15008
|
-
console.log(` Image: ${agent.image}`);
|
|
15009
|
-
}
|
|
15010
|
-
if (agent.working_dir) {
|
|
15011
|
-
console.log(` Working Dir: ${agent.working_dir}`);
|
|
15012
|
-
}
|
|
15013
14841
|
formatVolumes(agent.volumes ?? [], volumeConfigs);
|
|
15014
14842
|
formatListSection("Skills", agent.skills ?? []);
|
|
15015
14843
|
if (agentSources) {
|
|
@@ -15274,6 +15102,9 @@ function validateTimeFormat(time) {
|
|
|
15274
15102
|
if (minute < 0 || minute > 59) {
|
|
15275
15103
|
return "Minute must be 0-59";
|
|
15276
15104
|
}
|
|
15105
|
+
if (minute % 5 !== 0) {
|
|
15106
|
+
return "Minute must be a multiple of 5 (0, 5, 10, ..., 55)";
|
|
15107
|
+
}
|
|
15277
15108
|
return true;
|
|
15278
15109
|
}
|
|
15279
15110
|
function validateDateFormat(date) {
|
|
@@ -15460,7 +15291,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
|
|
|
15460
15291
|
if (!isInteractive()) {
|
|
15461
15292
|
throw new Error("--frequency is required (daily|weekly|monthly|once|loop)");
|
|
15462
15293
|
}
|
|
15463
|
-
const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((
|
|
15294
|
+
const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c27) => c27.value === existingFrequency) : 0;
|
|
15464
15295
|
frequency = await promptSelect(
|
|
15465
15296
|
"Schedule frequency",
|
|
15466
15297
|
FREQUENCY_CHOICES,
|
|
@@ -15485,7 +15316,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
|
|
|
15485
15316
|
throw new Error("--day is required for weekly/monthly");
|
|
15486
15317
|
}
|
|
15487
15318
|
if (frequency === "weekly") {
|
|
15488
|
-
const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((
|
|
15319
|
+
const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c27) => c27.value === existingDay) : 0;
|
|
15489
15320
|
const day2 = await promptSelect(
|
|
15490
15321
|
"Day of week",
|
|
15491
15322
|
DAY_OF_WEEK_CHOICES,
|
|
@@ -16935,7 +16766,7 @@ import chalk76 from "chalk";
|
|
|
16935
16766
|
var listCommand13 = new Command86().name("list").alias("ls").description("List all connectors and their status").action(
|
|
16936
16767
|
withErrorHandler(async () => {
|
|
16937
16768
|
const result = await listConnectors();
|
|
16938
|
-
const connectedMap = new Map(result.connectors.map((
|
|
16769
|
+
const connectedMap = new Map(result.connectors.map((c27) => [c27.type, c27]));
|
|
16939
16770
|
const allTypesRaw = Object.keys(CONNECTOR_TYPES);
|
|
16940
16771
|
const allTypes = [];
|
|
16941
16772
|
for (const type2 of allTypesRaw) {
|
|
@@ -17496,16 +17327,16 @@ async function handleModelProvider(ctx) {
|
|
|
17496
17327
|
const providerType = await step.prompt(
|
|
17497
17328
|
() => promptSelect(
|
|
17498
17329
|
"Select provider type:",
|
|
17499
|
-
choices.map((
|
|
17500
|
-
title:
|
|
17501
|
-
value:
|
|
17330
|
+
choices.map((c27) => ({
|
|
17331
|
+
title: c27.label,
|
|
17332
|
+
value: c27.type
|
|
17502
17333
|
}))
|
|
17503
17334
|
)
|
|
17504
17335
|
);
|
|
17505
17336
|
if (!providerType) {
|
|
17506
17337
|
process.exit(0);
|
|
17507
17338
|
}
|
|
17508
|
-
const selectedChoice = choices.find((
|
|
17339
|
+
const selectedChoice = choices.find((c27) => c27.type === providerType);
|
|
17509
17340
|
if (selectedChoice?.helpText) {
|
|
17510
17341
|
for (const line of selectedChoice.helpText.split("\n")) {
|
|
17511
17342
|
step.detail(chalk82.dim(line));
|
|
@@ -17859,13 +17690,13 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17859
17690
|
if (latestVersion === null) {
|
|
17860
17691
|
throw new Error("Could not check for updates. Please try again later.");
|
|
17861
17692
|
}
|
|
17862
|
-
if (latestVersion === "9.
|
|
17863
|
-
console.log(chalk86.green(`\u2713 Already up to date (${"9.
|
|
17693
|
+
if (latestVersion === "9.66.0") {
|
|
17694
|
+
console.log(chalk86.green(`\u2713 Already up to date (${"9.66.0"})`));
|
|
17864
17695
|
return;
|
|
17865
17696
|
}
|
|
17866
17697
|
console.log(
|
|
17867
17698
|
chalk86.yellow(
|
|
17868
|
-
`Current version: ${"9.
|
|
17699
|
+
`Current version: ${"9.66.0"} -> Latest version: ${latestVersion}`
|
|
17869
17700
|
)
|
|
17870
17701
|
);
|
|
17871
17702
|
console.log();
|
|
@@ -17892,7 +17723,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17892
17723
|
const success = await performUpgrade(packageManager);
|
|
17893
17724
|
if (success) {
|
|
17894
17725
|
console.log(
|
|
17895
|
-
chalk86.green(`\u2713 Upgraded from ${"9.
|
|
17726
|
+
chalk86.green(`\u2713 Upgraded from ${"9.66.0"} to ${latestVersion}`)
|
|
17896
17727
|
);
|
|
17897
17728
|
return;
|
|
17898
17729
|
}
|
|
@@ -17906,7 +17737,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17906
17737
|
|
|
17907
17738
|
// src/index.ts
|
|
17908
17739
|
var program = new Command95();
|
|
17909
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
17740
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.66.0");
|
|
17910
17741
|
program.addCommand(authCommand);
|
|
17911
17742
|
program.addCommand(infoCommand);
|
|
17912
17743
|
program.addCommand(composeCommand);
|