@vm0/cli 9.65.1 → 9.67.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 +123 -290
- 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.67.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.67.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.67.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"),
|
|
@@ -2634,7 +2624,6 @@ var variablesByNameContract = c11.router({
|
|
|
2634
2624
|
|
|
2635
2625
|
// ../../packages/core/src/contracts/model-providers.ts
|
|
2636
2626
|
import { z as z15 } from "zod";
|
|
2637
|
-
var c12 = initContract();
|
|
2638
2627
|
var MODEL_PROVIDER_TYPES = {
|
|
2639
2628
|
"claude-code-oauth-token": {
|
|
2640
2629
|
framework: "claude-code",
|
|
@@ -2970,137 +2959,18 @@ var upsertModelProviderResponseSchema = z15.object({
|
|
|
2970
2959
|
provider: modelProviderResponseSchema,
|
|
2971
2960
|
created: z15.boolean()
|
|
2972
2961
|
});
|
|
2973
|
-
var checkSecretResponseSchema = z15.object({
|
|
2974
|
-
exists: z15.boolean(),
|
|
2975
|
-
secretName: z15.string()
|
|
2976
|
-
});
|
|
2977
|
-
var modelProvidersMainContract = c12.router({
|
|
2978
|
-
list: {
|
|
2979
|
-
method: "GET",
|
|
2980
|
-
path: "/api/model-providers",
|
|
2981
|
-
headers: authHeadersSchema,
|
|
2982
|
-
responses: {
|
|
2983
|
-
200: modelProviderListResponseSchema,
|
|
2984
|
-
401: apiErrorSchema,
|
|
2985
|
-
500: apiErrorSchema
|
|
2986
|
-
},
|
|
2987
|
-
summary: "List all model providers"
|
|
2988
|
-
},
|
|
2989
|
-
upsert: {
|
|
2990
|
-
method: "PUT",
|
|
2991
|
-
path: "/api/model-providers",
|
|
2992
|
-
headers: authHeadersSchema,
|
|
2993
|
-
body: upsertModelProviderRequestSchema,
|
|
2994
|
-
responses: {
|
|
2995
|
-
200: upsertModelProviderResponseSchema,
|
|
2996
|
-
201: upsertModelProviderResponseSchema,
|
|
2997
|
-
400: apiErrorSchema,
|
|
2998
|
-
401: apiErrorSchema,
|
|
2999
|
-
409: apiErrorSchema,
|
|
3000
|
-
500: apiErrorSchema
|
|
3001
|
-
},
|
|
3002
|
-
summary: "Create or update a model provider"
|
|
3003
|
-
}
|
|
3004
|
-
});
|
|
3005
|
-
var modelProvidersCheckContract = c12.router({
|
|
3006
|
-
check: {
|
|
3007
|
-
method: "GET",
|
|
3008
|
-
path: "/api/model-providers/check/:type",
|
|
3009
|
-
headers: authHeadersSchema,
|
|
3010
|
-
pathParams: z15.object({
|
|
3011
|
-
type: modelProviderTypeSchema
|
|
3012
|
-
}),
|
|
3013
|
-
responses: {
|
|
3014
|
-
200: checkSecretResponseSchema,
|
|
3015
|
-
401: apiErrorSchema,
|
|
3016
|
-
500: apiErrorSchema
|
|
3017
|
-
},
|
|
3018
|
-
summary: "Check if secret exists for a model provider type"
|
|
3019
|
-
}
|
|
3020
|
-
});
|
|
3021
|
-
var modelProvidersByTypeContract = c12.router({
|
|
3022
|
-
delete: {
|
|
3023
|
-
method: "DELETE",
|
|
3024
|
-
path: "/api/model-providers/:type",
|
|
3025
|
-
headers: authHeadersSchema,
|
|
3026
|
-
pathParams: z15.object({
|
|
3027
|
-
type: modelProviderTypeSchema
|
|
3028
|
-
}),
|
|
3029
|
-
responses: {
|
|
3030
|
-
204: c12.noBody(),
|
|
3031
|
-
401: apiErrorSchema,
|
|
3032
|
-
404: apiErrorSchema,
|
|
3033
|
-
500: apiErrorSchema
|
|
3034
|
-
},
|
|
3035
|
-
summary: "Delete a model provider"
|
|
3036
|
-
}
|
|
3037
|
-
});
|
|
3038
|
-
var modelProvidersConvertContract = c12.router({
|
|
3039
|
-
convert: {
|
|
3040
|
-
method: "POST",
|
|
3041
|
-
path: "/api/model-providers/:type/convert",
|
|
3042
|
-
headers: authHeadersSchema,
|
|
3043
|
-
pathParams: z15.object({
|
|
3044
|
-
type: modelProviderTypeSchema
|
|
3045
|
-
}),
|
|
3046
|
-
body: z15.undefined(),
|
|
3047
|
-
responses: {
|
|
3048
|
-
200: modelProviderResponseSchema,
|
|
3049
|
-
400: apiErrorSchema,
|
|
3050
|
-
401: apiErrorSchema,
|
|
3051
|
-
404: apiErrorSchema,
|
|
3052
|
-
500: apiErrorSchema
|
|
3053
|
-
},
|
|
3054
|
-
summary: "Convert existing user secret to model provider"
|
|
3055
|
-
}
|
|
3056
|
-
});
|
|
3057
|
-
var modelProvidersSetDefaultContract = c12.router({
|
|
3058
|
-
setDefault: {
|
|
3059
|
-
method: "POST",
|
|
3060
|
-
path: "/api/model-providers/:type/set-default",
|
|
3061
|
-
headers: authHeadersSchema,
|
|
3062
|
-
pathParams: z15.object({
|
|
3063
|
-
type: modelProviderTypeSchema
|
|
3064
|
-
}),
|
|
3065
|
-
body: z15.undefined(),
|
|
3066
|
-
responses: {
|
|
3067
|
-
200: modelProviderResponseSchema,
|
|
3068
|
-
401: apiErrorSchema,
|
|
3069
|
-
404: apiErrorSchema,
|
|
3070
|
-
500: apiErrorSchema
|
|
3071
|
-
},
|
|
3072
|
-
summary: "Set a model provider as default for its framework"
|
|
3073
|
-
}
|
|
3074
|
-
});
|
|
3075
2962
|
var updateModelRequestSchema = z15.object({
|
|
3076
2963
|
selectedModel: z15.string().optional()
|
|
3077
2964
|
});
|
|
3078
|
-
var modelProvidersUpdateModelContract = c12.router({
|
|
3079
|
-
updateModel: {
|
|
3080
|
-
method: "PATCH",
|
|
3081
|
-
path: "/api/model-providers/:type/model",
|
|
3082
|
-
headers: authHeadersSchema,
|
|
3083
|
-
pathParams: z15.object({
|
|
3084
|
-
type: modelProviderTypeSchema
|
|
3085
|
-
}),
|
|
3086
|
-
body: updateModelRequestSchema,
|
|
3087
|
-
responses: {
|
|
3088
|
-
200: modelProviderResponseSchema,
|
|
3089
|
-
401: apiErrorSchema,
|
|
3090
|
-
404: apiErrorSchema,
|
|
3091
|
-
500: apiErrorSchema
|
|
3092
|
-
},
|
|
3093
|
-
summary: "Update model selection for an existing provider"
|
|
3094
|
-
}
|
|
3095
|
-
});
|
|
3096
2965
|
|
|
3097
2966
|
// ../../packages/core/src/contracts/sessions.ts
|
|
3098
2967
|
import { z as z16 } from "zod";
|
|
3099
|
-
var
|
|
2968
|
+
var c12 = initContract();
|
|
3100
2969
|
var storedChatMessageSchema = z16.object({
|
|
3101
2970
|
role: z16.enum(["user", "assistant"]),
|
|
3102
2971
|
content: z16.string(),
|
|
3103
2972
|
runId: z16.string().optional(),
|
|
2973
|
+
summaries: z16.array(z16.string()).optional(),
|
|
3104
2974
|
createdAt: z16.string()
|
|
3105
2975
|
});
|
|
3106
2976
|
var sessionResponseSchema = z16.object({
|
|
@@ -3141,7 +3011,7 @@ var checkpointResponseSchema = z16.object({
|
|
|
3141
3011
|
volumeVersionsSnapshot: volumeVersionsSnapshotSchema2.nullable(),
|
|
3142
3012
|
createdAt: z16.string()
|
|
3143
3013
|
});
|
|
3144
|
-
var sessionsContract =
|
|
3014
|
+
var sessionsContract = c12.router({
|
|
3145
3015
|
/**
|
|
3146
3016
|
* GET /api/agent/sessions?agentComposeId=X
|
|
3147
3017
|
* List chat sessions for an agent
|
|
@@ -3160,7 +3030,7 @@ var sessionsContract = c13.router({
|
|
|
3160
3030
|
summary: "List chat sessions for an agent"
|
|
3161
3031
|
}
|
|
3162
3032
|
});
|
|
3163
|
-
var sessionsByIdContract =
|
|
3033
|
+
var sessionsByIdContract = c12.router({
|
|
3164
3034
|
/**
|
|
3165
3035
|
* GET /api/agent/sessions/:id
|
|
3166
3036
|
* Get session by ID
|
|
@@ -3181,7 +3051,7 @@ var sessionsByIdContract = c13.router({
|
|
|
3181
3051
|
summary: "Get session by ID"
|
|
3182
3052
|
}
|
|
3183
3053
|
});
|
|
3184
|
-
var sessionMessagesContract =
|
|
3054
|
+
var sessionMessagesContract = c12.router({
|
|
3185
3055
|
/**
|
|
3186
3056
|
* POST /api/agent/sessions/:id/messages
|
|
3187
3057
|
* Append chat messages to a session
|
|
@@ -3211,7 +3081,7 @@ var sessionMessagesContract = c13.router({
|
|
|
3211
3081
|
summary: "Append chat messages to a session"
|
|
3212
3082
|
}
|
|
3213
3083
|
});
|
|
3214
|
-
var checkpointsByIdContract =
|
|
3084
|
+
var checkpointsByIdContract = c12.router({
|
|
3215
3085
|
/**
|
|
3216
3086
|
* GET /api/agent/checkpoints/:id
|
|
3217
3087
|
* Get checkpoint by ID
|
|
@@ -3235,7 +3105,7 @@ var checkpointsByIdContract = c13.router({
|
|
|
3235
3105
|
|
|
3236
3106
|
// ../../packages/core/src/contracts/chat-threads.ts
|
|
3237
3107
|
import { z as z17 } from "zod";
|
|
3238
|
-
var
|
|
3108
|
+
var c13 = initContract();
|
|
3239
3109
|
var chatThreadListItemSchema = z17.object({
|
|
3240
3110
|
id: z17.string(),
|
|
3241
3111
|
title: z17.string().nullable(),
|
|
@@ -3265,7 +3135,7 @@ var chatThreadDetailSchema = z17.object({
|
|
|
3265
3135
|
createdAt: z17.string(),
|
|
3266
3136
|
updatedAt: z17.string()
|
|
3267
3137
|
});
|
|
3268
|
-
var chatThreadsContract =
|
|
3138
|
+
var chatThreadsContract = c13.router({
|
|
3269
3139
|
create: {
|
|
3270
3140
|
method: "POST",
|
|
3271
3141
|
path: "/api/chat-threads",
|
|
@@ -3294,7 +3164,7 @@ var chatThreadsContract = c14.router({
|
|
|
3294
3164
|
summary: "List chat threads for an agent"
|
|
3295
3165
|
}
|
|
3296
3166
|
});
|
|
3297
|
-
var chatThreadByIdContract =
|
|
3167
|
+
var chatThreadByIdContract = c13.router({
|
|
3298
3168
|
get: {
|
|
3299
3169
|
method: "GET",
|
|
3300
3170
|
path: "/api/chat-threads/:id",
|
|
@@ -3308,7 +3178,7 @@ var chatThreadByIdContract = c14.router({
|
|
|
3308
3178
|
summary: "Get chat thread detail with messages"
|
|
3309
3179
|
}
|
|
3310
3180
|
});
|
|
3311
|
-
var chatThreadRunsContract =
|
|
3181
|
+
var chatThreadRunsContract = c13.router({
|
|
3312
3182
|
addRun: {
|
|
3313
3183
|
method: "POST",
|
|
3314
3184
|
path: "/api/chat-threads/:id/runs",
|
|
@@ -3328,7 +3198,7 @@ var chatThreadRunsContract = c14.router({
|
|
|
3328
3198
|
|
|
3329
3199
|
// ../../packages/core/src/contracts/runners.ts
|
|
3330
3200
|
import { z as z18 } from "zod";
|
|
3331
|
-
var
|
|
3201
|
+
var c14 = initContract();
|
|
3332
3202
|
var runnerGroupSchema = z18.string().regex(
|
|
3333
3203
|
/^[a-z0-9-]+\/[a-z0-9-]+$/,
|
|
3334
3204
|
"Runner group must be in org/name format (e.g., acme/production)"
|
|
@@ -3341,7 +3211,7 @@ var jobSchema = z18.object({
|
|
|
3341
3211
|
checkpointId: z18.uuid().nullable(),
|
|
3342
3212
|
experimentalProfile: z18.string().optional()
|
|
3343
3213
|
});
|
|
3344
|
-
var runnersPollContract =
|
|
3214
|
+
var runnersPollContract = c14.router({
|
|
3345
3215
|
poll: {
|
|
3346
3216
|
method: "POST",
|
|
3347
3217
|
path: "/api/runners/poll",
|
|
@@ -3411,6 +3281,8 @@ var storedExecutionContextSchema = z18.object({
|
|
|
3411
3281
|
var executionContextSchema = z18.object({
|
|
3412
3282
|
runId: z18.uuid(),
|
|
3413
3283
|
prompt: z18.string(),
|
|
3284
|
+
// System prompt appended to agent instructions (passed as --append-system-prompt to Claude CLI)
|
|
3285
|
+
appendSystemPrompt: z18.string().optional(),
|
|
3414
3286
|
agentComposeVersionId: z18.string().nullable(),
|
|
3415
3287
|
vars: z18.record(z18.string(), z18.string()).nullable(),
|
|
3416
3288
|
checkpointId: z18.uuid().nullable(),
|
|
@@ -3444,7 +3316,7 @@ var executionContextSchema = z18.object({
|
|
|
3444
3316
|
// VM profile for resource allocation (e.g., "vm0/default", "vm0/browser")
|
|
3445
3317
|
experimentalProfile: z18.string().optional()
|
|
3446
3318
|
});
|
|
3447
|
-
var runnersJobClaimContract =
|
|
3319
|
+
var runnersJobClaimContract = c14.router({
|
|
3448
3320
|
claim: {
|
|
3449
3321
|
method: "POST",
|
|
3450
3322
|
path: "/api/runners/jobs/:id/claim",
|
|
@@ -3470,7 +3342,7 @@ var runnersJobClaimContract = c15.router({
|
|
|
3470
3342
|
|
|
3471
3343
|
// ../../packages/core/src/contracts/schedules.ts
|
|
3472
3344
|
import { z as z19 } from "zod";
|
|
3473
|
-
var
|
|
3345
|
+
var c15 = initContract();
|
|
3474
3346
|
var scheduleTriggerSchema = z19.object({
|
|
3475
3347
|
cron: z19.string().optional(),
|
|
3476
3348
|
at: z19.string().optional(),
|
|
@@ -3587,7 +3459,7 @@ var deployScheduleResponseSchema = z19.object({
|
|
|
3587
3459
|
created: z19.boolean()
|
|
3588
3460
|
// true if created, false if updated
|
|
3589
3461
|
});
|
|
3590
|
-
var schedulesMainContract =
|
|
3462
|
+
var schedulesMainContract = c15.router({
|
|
3591
3463
|
/**
|
|
3592
3464
|
* POST /api/agent/schedules
|
|
3593
3465
|
* Deploy (create or update) a schedule
|
|
@@ -3625,7 +3497,7 @@ var schedulesMainContract = c16.router({
|
|
|
3625
3497
|
summary: "List all schedules"
|
|
3626
3498
|
}
|
|
3627
3499
|
});
|
|
3628
|
-
var schedulesByNameContract =
|
|
3500
|
+
var schedulesByNameContract = c15.router({
|
|
3629
3501
|
/**
|
|
3630
3502
|
* GET /api/agent/schedules/:name
|
|
3631
3503
|
* Get schedule by name
|
|
@@ -3663,7 +3535,7 @@ var schedulesByNameContract = c16.router({
|
|
|
3663
3535
|
composeId: z19.string().uuid("Compose ID required")
|
|
3664
3536
|
}),
|
|
3665
3537
|
responses: {
|
|
3666
|
-
204:
|
|
3538
|
+
204: c15.noBody(),
|
|
3667
3539
|
401: apiErrorSchema,
|
|
3668
3540
|
403: apiErrorSchema,
|
|
3669
3541
|
404: apiErrorSchema
|
|
@@ -3671,7 +3543,7 @@ var schedulesByNameContract = c16.router({
|
|
|
3671
3543
|
summary: "Delete schedule"
|
|
3672
3544
|
}
|
|
3673
3545
|
});
|
|
3674
|
-
var schedulesEnableContract =
|
|
3546
|
+
var schedulesEnableContract = c15.router({
|
|
3675
3547
|
/**
|
|
3676
3548
|
* POST /api/agent/schedules/:name/enable
|
|
3677
3549
|
* Enable a disabled schedule
|
|
@@ -3717,7 +3589,7 @@ var schedulesEnableContract = c16.router({
|
|
|
3717
3589
|
summary: "Disable schedule"
|
|
3718
3590
|
}
|
|
3719
3591
|
});
|
|
3720
|
-
var scheduleRunsContract =
|
|
3592
|
+
var scheduleRunsContract = c15.router({
|
|
3721
3593
|
/**
|
|
3722
3594
|
* GET /api/agent/schedules/:name/runs
|
|
3723
3595
|
* List recent runs for a schedule
|
|
@@ -3745,7 +3617,7 @@ var scheduleRunsContract = c16.router({
|
|
|
3745
3617
|
|
|
3746
3618
|
// ../../packages/core/src/contracts/realtime.ts
|
|
3747
3619
|
import { z as z20 } from "zod";
|
|
3748
|
-
var
|
|
3620
|
+
var c16 = initContract();
|
|
3749
3621
|
var ablyTokenRequestSchema = z20.object({
|
|
3750
3622
|
keyName: z20.string(),
|
|
3751
3623
|
ttl: z20.number().optional(),
|
|
@@ -3755,7 +3627,7 @@ var ablyTokenRequestSchema = z20.object({
|
|
|
3755
3627
|
nonce: z20.string(),
|
|
3756
3628
|
mac: z20.string()
|
|
3757
3629
|
});
|
|
3758
|
-
var runnerRealtimeTokenContract =
|
|
3630
|
+
var runnerRealtimeTokenContract = c16.router({
|
|
3759
3631
|
/**
|
|
3760
3632
|
* POST /api/runners/realtime/token
|
|
3761
3633
|
* Get an Ably token to subscribe to a runner group's job notification channel
|
|
@@ -3788,7 +3660,7 @@ var listQuerySchema = z21.object({
|
|
|
3788
3660
|
cursor: z21.string().optional(),
|
|
3789
3661
|
limit: z21.coerce.number().min(1).max(100).default(20)
|
|
3790
3662
|
});
|
|
3791
|
-
var
|
|
3663
|
+
var c17 = initContract();
|
|
3792
3664
|
var logStatusSchema = z21.enum([
|
|
3793
3665
|
"queued",
|
|
3794
3666
|
"pending",
|
|
@@ -3832,7 +3704,7 @@ var logDetailSchema = z21.object({
|
|
|
3832
3704
|
completedAt: z21.string().nullable(),
|
|
3833
3705
|
artifact: artifactSchema
|
|
3834
3706
|
});
|
|
3835
|
-
var logsListContract =
|
|
3707
|
+
var logsListContract = c17.router({
|
|
3836
3708
|
list: {
|
|
3837
3709
|
method: "GET",
|
|
3838
3710
|
path: "/api/app/logs",
|
|
@@ -3850,7 +3722,7 @@ var logsListContract = c18.router({
|
|
|
3850
3722
|
summary: "List agent run logs with pagination"
|
|
3851
3723
|
}
|
|
3852
3724
|
});
|
|
3853
|
-
var logsByIdContract =
|
|
3725
|
+
var logsByIdContract = c17.router({
|
|
3854
3726
|
getById: {
|
|
3855
3727
|
method: "GET",
|
|
3856
3728
|
path: "/api/app/logs/:id",
|
|
@@ -3870,7 +3742,7 @@ var artifactDownloadResponseSchema = z21.object({
|
|
|
3870
3742
|
url: z21.url(),
|
|
3871
3743
|
expiresAt: z21.string()
|
|
3872
3744
|
});
|
|
3873
|
-
var artifactDownloadContract =
|
|
3745
|
+
var artifactDownloadContract = c17.router({
|
|
3874
3746
|
getDownloadUrl: {
|
|
3875
3747
|
method: "GET",
|
|
3876
3748
|
path: "/api/app/artifacts/download",
|
|
@@ -3889,7 +3761,7 @@ var artifactDownloadContract = c18.router({
|
|
|
3889
3761
|
|
|
3890
3762
|
// ../../packages/core/src/contracts/compose-jobs.ts
|
|
3891
3763
|
import { z as z22 } from "zod";
|
|
3892
|
-
var
|
|
3764
|
+
var c18 = initContract();
|
|
3893
3765
|
var composeJobStatusSchema = z22.enum([
|
|
3894
3766
|
"pending",
|
|
3895
3767
|
"running",
|
|
@@ -3924,7 +3796,7 @@ var composeJobResponseSchema = z22.object({
|
|
|
3924
3796
|
startedAt: z22.string().optional(),
|
|
3925
3797
|
completedAt: z22.string().optional()
|
|
3926
3798
|
});
|
|
3927
|
-
var composeJobsMainContract =
|
|
3799
|
+
var composeJobsMainContract = c18.router({
|
|
3928
3800
|
/**
|
|
3929
3801
|
* POST /api/compose/jobs
|
|
3930
3802
|
* Create a new compose job from GitHub URL or platform content
|
|
@@ -3944,7 +3816,7 @@ var composeJobsMainContract = c19.router({
|
|
|
3944
3816
|
summary: "Create compose job"
|
|
3945
3817
|
}
|
|
3946
3818
|
});
|
|
3947
|
-
var composeJobsByIdContract =
|
|
3819
|
+
var composeJobsByIdContract = c18.router({
|
|
3948
3820
|
/**
|
|
3949
3821
|
* GET /api/compose/jobs/:jobId
|
|
3950
3822
|
* Get compose job status and result
|
|
@@ -3964,7 +3836,7 @@ var composeJobsByIdContract = c19.router({
|
|
|
3964
3836
|
summary: "Get compose job status"
|
|
3965
3837
|
}
|
|
3966
3838
|
});
|
|
3967
|
-
var webhookComposeCompleteContract =
|
|
3839
|
+
var webhookComposeCompleteContract = c18.router({
|
|
3968
3840
|
/**
|
|
3969
3841
|
* POST /api/webhooks/compose/complete
|
|
3970
3842
|
* Handle compose job completion from sandbox
|
|
@@ -3994,7 +3866,7 @@ var webhookComposeCompleteContract = c19.router({
|
|
|
3994
3866
|
|
|
3995
3867
|
// ../../packages/core/src/contracts/connectors.ts
|
|
3996
3868
|
import { z as z23 } from "zod";
|
|
3997
|
-
var
|
|
3869
|
+
var c19 = initContract();
|
|
3998
3870
|
var CONNECTOR_TYPES_DEF = {
|
|
3999
3871
|
axiom: {
|
|
4000
3872
|
label: "Axiom",
|
|
@@ -6654,7 +6526,7 @@ var connectorListResponseSchema = z23.object({
|
|
|
6654
6526
|
configuredTypes: z23.array(connectorTypeSchema),
|
|
6655
6527
|
connectorProvidedSecretNames: z23.array(z23.string())
|
|
6656
6528
|
});
|
|
6657
|
-
var connectorsMainContract =
|
|
6529
|
+
var connectorsMainContract = c19.router({
|
|
6658
6530
|
list: {
|
|
6659
6531
|
method: "GET",
|
|
6660
6532
|
path: "/api/connectors",
|
|
@@ -6667,7 +6539,7 @@ var connectorsMainContract = c20.router({
|
|
|
6667
6539
|
summary: "List all connectors for the authenticated user"
|
|
6668
6540
|
}
|
|
6669
6541
|
});
|
|
6670
|
-
var connectorsByTypeContract =
|
|
6542
|
+
var connectorsByTypeContract = c19.router({
|
|
6671
6543
|
get: {
|
|
6672
6544
|
method: "GET",
|
|
6673
6545
|
path: "/api/connectors/:type",
|
|
@@ -6691,7 +6563,7 @@ var connectorsByTypeContract = c20.router({
|
|
|
6691
6563
|
type: connectorTypeSchema
|
|
6692
6564
|
}),
|
|
6693
6565
|
responses: {
|
|
6694
|
-
204:
|
|
6566
|
+
204: c19.noBody(),
|
|
6695
6567
|
401: apiErrorSchema,
|
|
6696
6568
|
404: apiErrorSchema,
|
|
6697
6569
|
500: apiErrorSchema
|
|
@@ -6705,7 +6577,7 @@ var scopeDiffResponseSchema = z23.object({
|
|
|
6705
6577
|
currentScopes: z23.array(z23.string()),
|
|
6706
6578
|
storedScopes: z23.array(z23.string())
|
|
6707
6579
|
});
|
|
6708
|
-
var connectorScopeDiffContract =
|
|
6580
|
+
var connectorScopeDiffContract = c19.router({
|
|
6709
6581
|
getScopeDiff: {
|
|
6710
6582
|
method: "GET",
|
|
6711
6583
|
path: "/api/connectors/:type/scope-diff",
|
|
@@ -6740,7 +6612,7 @@ var connectorSessionStatusResponseSchema = z23.object({
|
|
|
6740
6612
|
status: connectorSessionStatusSchema,
|
|
6741
6613
|
errorMessage: z23.string().nullable().optional()
|
|
6742
6614
|
});
|
|
6743
|
-
var connectorSessionsContract =
|
|
6615
|
+
var connectorSessionsContract = c19.router({
|
|
6744
6616
|
/**
|
|
6745
6617
|
* POST /api/connectors/:type/sessions
|
|
6746
6618
|
* Create a new connector session for CLI device flow
|
|
@@ -6762,7 +6634,7 @@ var connectorSessionsContract = c20.router({
|
|
|
6762
6634
|
summary: "Create connector session for CLI device flow"
|
|
6763
6635
|
}
|
|
6764
6636
|
});
|
|
6765
|
-
var connectorSessionByIdContract =
|
|
6637
|
+
var connectorSessionByIdContract = c19.router({
|
|
6766
6638
|
/**
|
|
6767
6639
|
* GET /api/connectors/:type/sessions/:sessionId
|
|
6768
6640
|
* Get connector session status (for CLI polling)
|
|
@@ -6792,7 +6664,7 @@ var computerConnectorCreateResponseSchema = z23.object({
|
|
|
6792
6664
|
endpointPrefix: z23.string(),
|
|
6793
6665
|
domain: z23.string()
|
|
6794
6666
|
});
|
|
6795
|
-
var computerConnectorContract =
|
|
6667
|
+
var computerConnectorContract = c19.router({
|
|
6796
6668
|
create: {
|
|
6797
6669
|
method: "POST",
|
|
6798
6670
|
path: "/api/connectors/computer",
|
|
@@ -6823,7 +6695,7 @@ var computerConnectorContract = c20.router({
|
|
|
6823
6695
|
path: "/api/connectors/computer",
|
|
6824
6696
|
headers: authHeadersSchema,
|
|
6825
6697
|
responses: {
|
|
6826
|
-
204:
|
|
6698
|
+
204: c19.noBody(),
|
|
6827
6699
|
401: apiErrorSchema,
|
|
6828
6700
|
404: apiErrorSchema,
|
|
6829
6701
|
500: apiErrorSchema
|
|
@@ -7176,7 +7048,7 @@ async function expandFirewallConfigs(config, fetchFn) {
|
|
|
7176
7048
|
|
|
7177
7049
|
// ../../packages/core/src/contracts/user-preferences.ts
|
|
7178
7050
|
import { z as z24 } from "zod";
|
|
7179
|
-
var
|
|
7051
|
+
var c20 = initContract();
|
|
7180
7052
|
var sendModeSchema = z24.enum(["enter", "cmd-enter"]);
|
|
7181
7053
|
var userPreferencesResponseSchema = z24.object({
|
|
7182
7054
|
timezone: z24.string().nullable(),
|
|
@@ -7197,7 +7069,7 @@ var updateUserPreferencesRequestSchema = z24.object({
|
|
|
7197
7069
|
message: "At least one preference must be provided"
|
|
7198
7070
|
}
|
|
7199
7071
|
);
|
|
7200
|
-
var userPreferencesContract =
|
|
7072
|
+
var userPreferencesContract = c20.router({
|
|
7201
7073
|
/**
|
|
7202
7074
|
* GET /api/user/preferences
|
|
7203
7075
|
* Get current user's preferences
|
|
@@ -7234,7 +7106,7 @@ var userPreferencesContract = c21.router({
|
|
|
7234
7106
|
|
|
7235
7107
|
// ../../packages/core/src/contracts/org-list.ts
|
|
7236
7108
|
import { z as z25 } from "zod";
|
|
7237
|
-
var
|
|
7109
|
+
var c21 = initContract();
|
|
7238
7110
|
var orgListItemSchema = z25.object({
|
|
7239
7111
|
slug: z25.string(),
|
|
7240
7112
|
role: z25.string()
|
|
@@ -7243,7 +7115,7 @@ var orgListResponseSchema = z25.object({
|
|
|
7243
7115
|
orgs: z25.array(orgListItemSchema),
|
|
7244
7116
|
active: z25.string().optional()
|
|
7245
7117
|
});
|
|
7246
|
-
var orgListContract =
|
|
7118
|
+
var orgListContract = c21.router({
|
|
7247
7119
|
/**
|
|
7248
7120
|
* GET /api/org/list
|
|
7249
7121
|
* List all orgs accessible to the user
|
|
@@ -7263,7 +7135,7 @@ var orgListContract = c22.router({
|
|
|
7263
7135
|
|
|
7264
7136
|
// ../../packages/core/src/contracts/onboarding.ts
|
|
7265
7137
|
import { z as z26 } from "zod";
|
|
7266
|
-
var
|
|
7138
|
+
var c22 = initContract();
|
|
7267
7139
|
var onboardingStatusResponseSchema = z26.object({
|
|
7268
7140
|
needsOnboarding: z26.boolean(),
|
|
7269
7141
|
isAdmin: z26.boolean(),
|
|
@@ -7279,7 +7151,7 @@ var onboardingStatusResponseSchema = z26.object({
|
|
|
7279
7151
|
}).nullable(),
|
|
7280
7152
|
defaultAgentSkills: z26.array(z26.string())
|
|
7281
7153
|
});
|
|
7282
|
-
var onboardingStatusContract =
|
|
7154
|
+
var onboardingStatusContract = c22.router({
|
|
7283
7155
|
getStatus: {
|
|
7284
7156
|
method: "GET",
|
|
7285
7157
|
path: "/api/onboarding/status",
|
|
@@ -7294,7 +7166,7 @@ var onboardingStatusContract = c23.router({
|
|
|
7294
7166
|
|
|
7295
7167
|
// ../../packages/core/src/contracts/skills.ts
|
|
7296
7168
|
import { z as z27 } from "zod";
|
|
7297
|
-
var
|
|
7169
|
+
var c23 = initContract();
|
|
7298
7170
|
var skillFrontmatterSchema = z27.object({
|
|
7299
7171
|
name: z27.string().optional(),
|
|
7300
7172
|
description: z27.string().optional(),
|
|
@@ -7306,7 +7178,7 @@ var resolvedSkillSchema = z27.object({
|
|
|
7306
7178
|
versionHash: z27.string(),
|
|
7307
7179
|
frontmatter: skillFrontmatterSchema
|
|
7308
7180
|
});
|
|
7309
|
-
var skillsResolveContract =
|
|
7181
|
+
var skillsResolveContract = c23.router({
|
|
7310
7182
|
resolve: {
|
|
7311
7183
|
method: "POST",
|
|
7312
7184
|
path: "/api/skills/resolve",
|
|
@@ -7328,8 +7200,8 @@ var skillsResolveContract = c24.router({
|
|
|
7328
7200
|
|
|
7329
7201
|
// ../../packages/core/src/contracts/org-model-providers.ts
|
|
7330
7202
|
import { z as z28 } from "zod";
|
|
7331
|
-
var
|
|
7332
|
-
var orgModelProvidersMainContract =
|
|
7203
|
+
var c24 = initContract();
|
|
7204
|
+
var orgModelProvidersMainContract = c24.router({
|
|
7333
7205
|
list: {
|
|
7334
7206
|
method: "GET",
|
|
7335
7207
|
path: "/api/org/model-providers",
|
|
@@ -7357,7 +7229,7 @@ var orgModelProvidersMainContract = c25.router({
|
|
|
7357
7229
|
summary: "Create or update an org-level model provider (admin only)"
|
|
7358
7230
|
}
|
|
7359
7231
|
});
|
|
7360
|
-
var orgModelProvidersByTypeContract =
|
|
7232
|
+
var orgModelProvidersByTypeContract = c24.router({
|
|
7361
7233
|
delete: {
|
|
7362
7234
|
method: "DELETE",
|
|
7363
7235
|
path: "/api/org/model-providers/:type",
|
|
@@ -7366,7 +7238,7 @@ var orgModelProvidersByTypeContract = c25.router({
|
|
|
7366
7238
|
type: modelProviderTypeSchema
|
|
7367
7239
|
}),
|
|
7368
7240
|
responses: {
|
|
7369
|
-
204:
|
|
7241
|
+
204: c24.noBody(),
|
|
7370
7242
|
401: apiErrorSchema,
|
|
7371
7243
|
403: apiErrorSchema,
|
|
7372
7244
|
404: apiErrorSchema,
|
|
@@ -7375,7 +7247,7 @@ var orgModelProvidersByTypeContract = c25.router({
|
|
|
7375
7247
|
summary: "Delete an org-level model provider (admin only)"
|
|
7376
7248
|
}
|
|
7377
7249
|
});
|
|
7378
|
-
var orgModelProvidersSetDefaultContract =
|
|
7250
|
+
var orgModelProvidersSetDefaultContract = c24.router({
|
|
7379
7251
|
setDefault: {
|
|
7380
7252
|
method: "POST",
|
|
7381
7253
|
path: "/api/org/model-providers/:type/set-default",
|
|
@@ -7394,7 +7266,7 @@ var orgModelProvidersSetDefaultContract = c25.router({
|
|
|
7394
7266
|
summary: "Set org-level model provider as default (admin only)"
|
|
7395
7267
|
}
|
|
7396
7268
|
});
|
|
7397
|
-
var orgModelProvidersUpdateModelContract =
|
|
7269
|
+
var orgModelProvidersUpdateModelContract = c24.router({
|
|
7398
7270
|
updateModel: {
|
|
7399
7271
|
method: "PATCH",
|
|
7400
7272
|
path: "/api/org/model-providers/:type/model",
|
|
@@ -7416,8 +7288,8 @@ var orgModelProvidersUpdateModelContract = c25.router({
|
|
|
7416
7288
|
|
|
7417
7289
|
// ../../packages/core/src/contracts/org-secrets.ts
|
|
7418
7290
|
import { z as z29 } from "zod";
|
|
7419
|
-
var
|
|
7420
|
-
var orgSecretsMainContract =
|
|
7291
|
+
var c25 = initContract();
|
|
7292
|
+
var orgSecretsMainContract = c25.router({
|
|
7421
7293
|
list: {
|
|
7422
7294
|
method: "GET",
|
|
7423
7295
|
path: "/api/org/secrets",
|
|
@@ -7445,7 +7317,7 @@ var orgSecretsMainContract = c26.router({
|
|
|
7445
7317
|
summary: "Create or update an org-level secret (admin only)"
|
|
7446
7318
|
}
|
|
7447
7319
|
});
|
|
7448
|
-
var orgSecretsByNameContract =
|
|
7320
|
+
var orgSecretsByNameContract = c25.router({
|
|
7449
7321
|
delete: {
|
|
7450
7322
|
method: "DELETE",
|
|
7451
7323
|
path: "/api/org/secrets/:name",
|
|
@@ -7454,7 +7326,7 @@ var orgSecretsByNameContract = c26.router({
|
|
|
7454
7326
|
name: secretNameSchema
|
|
7455
7327
|
}),
|
|
7456
7328
|
responses: {
|
|
7457
|
-
204:
|
|
7329
|
+
204: c25.noBody(),
|
|
7458
7330
|
401: apiErrorSchema,
|
|
7459
7331
|
403: apiErrorSchema,
|
|
7460
7332
|
404: apiErrorSchema,
|
|
@@ -7466,8 +7338,8 @@ var orgSecretsByNameContract = c26.router({
|
|
|
7466
7338
|
|
|
7467
7339
|
// ../../packages/core/src/contracts/org-variables.ts
|
|
7468
7340
|
import { z as z30 } from "zod";
|
|
7469
|
-
var
|
|
7470
|
-
var orgVariablesMainContract =
|
|
7341
|
+
var c26 = initContract();
|
|
7342
|
+
var orgVariablesMainContract = c26.router({
|
|
7471
7343
|
list: {
|
|
7472
7344
|
method: "GET",
|
|
7473
7345
|
path: "/api/org/variables",
|
|
@@ -7495,7 +7367,7 @@ var orgVariablesMainContract = c27.router({
|
|
|
7495
7367
|
summary: "Create or update an org-level variable (admin only)"
|
|
7496
7368
|
}
|
|
7497
7369
|
});
|
|
7498
|
-
var orgVariablesByNameContract =
|
|
7370
|
+
var orgVariablesByNameContract = c26.router({
|
|
7499
7371
|
delete: {
|
|
7500
7372
|
method: "DELETE",
|
|
7501
7373
|
path: "/api/org/variables/:name",
|
|
@@ -7504,7 +7376,7 @@ var orgVariablesByNameContract = c27.router({
|
|
|
7504
7376
|
name: variableNameSchema
|
|
7505
7377
|
}),
|
|
7506
7378
|
responses: {
|
|
7507
|
-
204:
|
|
7379
|
+
204: c26.noBody(),
|
|
7508
7380
|
401: apiErrorSchema,
|
|
7509
7381
|
403: apiErrorSchema,
|
|
7510
7382
|
404: apiErrorSchema,
|
|
@@ -7514,23 +7386,6 @@ var orgVariablesByNameContract = c27.router({
|
|
|
7514
7386
|
}
|
|
7515
7387
|
});
|
|
7516
7388
|
|
|
7517
|
-
// ../../packages/core/src/org-reference.ts
|
|
7518
|
-
function isLegacySystemTemplate(reference) {
|
|
7519
|
-
return reference.startsWith("vm0-");
|
|
7520
|
-
}
|
|
7521
|
-
function getLegacySystemTemplateWarning(legacyFormat) {
|
|
7522
|
-
if (!isLegacySystemTemplate(legacyFormat)) {
|
|
7523
|
-
return void 0;
|
|
7524
|
-
}
|
|
7525
|
-
if (legacyFormat === "vm0-claude-code") {
|
|
7526
|
-
return `Warning: "${legacyFormat}" format is deprecated. Use "vm0/claude-code" instead.`;
|
|
7527
|
-
}
|
|
7528
|
-
if (legacyFormat.startsWith("vm0-github-cli")) {
|
|
7529
|
-
return `Warning: "${legacyFormat}" is deprecated. GitHub CLI is now included in the base image.`;
|
|
7530
|
-
}
|
|
7531
|
-
return `Warning: "${legacyFormat}" format is deprecated.`;
|
|
7532
|
-
}
|
|
7533
|
-
|
|
7534
7389
|
// ../../packages/core/src/storage-names.ts
|
|
7535
7390
|
function getInstructionsStorageName(agentName) {
|
|
7536
7391
|
return `agent-instructions@${agentName}`;
|
|
@@ -9589,24 +9444,6 @@ function hasVolumes(config) {
|
|
|
9589
9444
|
const volumes = cfg.volumes;
|
|
9590
9445
|
return typeof volumes === "object" && volumes !== null && Object.keys(volumes).length > 0;
|
|
9591
9446
|
}
|
|
9592
|
-
function checkLegacyImageFormat(config) {
|
|
9593
|
-
const cfg = config;
|
|
9594
|
-
const agentsConfig = cfg.agents;
|
|
9595
|
-
for (const [name, agentConfig] of Object.entries(agentsConfig)) {
|
|
9596
|
-
const image = agentConfig.image;
|
|
9597
|
-
if (image) {
|
|
9598
|
-
console.log(
|
|
9599
|
-
chalk6.yellow(
|
|
9600
|
-
`\u26A0 Agent "${name}": 'image' field is deprecated and will be ignored. The server resolves the image based on the framework.`
|
|
9601
|
-
)
|
|
9602
|
-
);
|
|
9603
|
-
const warning = getLegacySystemTemplateWarning(image);
|
|
9604
|
-
if (warning) {
|
|
9605
|
-
console.log(chalk6.yellow(` ${warning}`));
|
|
9606
|
-
}
|
|
9607
|
-
}
|
|
9608
|
-
}
|
|
9609
|
-
}
|
|
9610
9447
|
async function uploadAssets(agentName, agent, basePath, jsonMode) {
|
|
9611
9448
|
if (agent.instructions) {
|
|
9612
9449
|
if (!jsonMode) {
|
|
@@ -9772,11 +9609,6 @@ function mergeSkillVariables(agent, variables) {
|
|
|
9772
9609
|
agent.environment = environment;
|
|
9773
9610
|
}
|
|
9774
9611
|
}
|
|
9775
|
-
function getAppUrl(apiUrl) {
|
|
9776
|
-
const url = new URL(apiUrl);
|
|
9777
|
-
url.hostname = url.hostname.replace("www", "app");
|
|
9778
|
-
return url.origin;
|
|
9779
|
-
}
|
|
9780
9612
|
async function checkAndPromptMissingItems(config, options) {
|
|
9781
9613
|
const requiredSecrets = getSecretsFromComposeContent(config);
|
|
9782
9614
|
const requiredVars = getVarsFromComposeContent(config);
|
|
@@ -9806,27 +9638,18 @@ async function checkAndPromptMissingItems(config, options) {
|
|
|
9806
9638
|
if (missingSecrets.length === 0 && missingVars.length === 0) {
|
|
9807
9639
|
return { missingSecrets: [], missingVars: [] };
|
|
9808
9640
|
}
|
|
9809
|
-
const apiUrl = await getApiUrl();
|
|
9810
|
-
const appUrl = getAppUrl(apiUrl);
|
|
9811
|
-
const params = new URLSearchParams();
|
|
9812
|
-
if (missingSecrets.length > 0) {
|
|
9813
|
-
params.set("secrets", missingSecrets.join(","));
|
|
9814
|
-
}
|
|
9815
|
-
if (missingVars.length > 0) {
|
|
9816
|
-
params.set("vars", missingVars.join(","));
|
|
9817
|
-
}
|
|
9818
|
-
const setupUrl = `${appUrl}/environment-variables-setup?${params.toString()}`;
|
|
9819
9641
|
if (!options.json) {
|
|
9820
9642
|
console.log();
|
|
9821
|
-
console.log(
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
)
|
|
9826
|
-
|
|
9643
|
+
console.log(chalk6.yellow("\u26A0 Missing secrets/variables detected:"));
|
|
9644
|
+
if (missingSecrets.length > 0) {
|
|
9645
|
+
console.log(chalk6.yellow(` Secrets: ${missingSecrets.join(", ")}`));
|
|
9646
|
+
}
|
|
9647
|
+
if (missingVars.length > 0) {
|
|
9648
|
+
console.log(chalk6.yellow(` Variables: ${missingVars.join(", ")}`));
|
|
9649
|
+
}
|
|
9827
9650
|
console.log();
|
|
9828
9651
|
}
|
|
9829
|
-
return { missingSecrets, missingVars
|
|
9652
|
+
return { missingSecrets, missingVars };
|
|
9830
9653
|
}
|
|
9831
9654
|
async function finalizeCompose(config, agent, variables, options) {
|
|
9832
9655
|
const confirmed = await displayAndConfirmVariables(variables, options);
|
|
@@ -9853,7 +9676,6 @@ async function finalizeCompose(config, agent, variables, options) {
|
|
|
9853
9676
|
if (missingItems.missingSecrets.length > 0 || missingItems.missingVars.length > 0) {
|
|
9854
9677
|
result.missingSecrets = missingItems.missingSecrets;
|
|
9855
9678
|
result.missingVars = missingItems.missingVars;
|
|
9856
|
-
result.setupUrl = missingItems.setupUrl;
|
|
9857
9679
|
}
|
|
9858
9680
|
}
|
|
9859
9681
|
if (!options.json) {
|
|
@@ -9928,9 +9750,6 @@ async function handleGitHubCompose(url, options) {
|
|
|
9928
9750
|
)
|
|
9929
9751
|
});
|
|
9930
9752
|
}
|
|
9931
|
-
if (!options.json) {
|
|
9932
|
-
checkLegacyImageFormat(config);
|
|
9933
|
-
}
|
|
9934
9753
|
const skillResults = await uploadAssets(
|
|
9935
9754
|
agentName,
|
|
9936
9755
|
agent,
|
|
@@ -9974,7 +9793,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
9974
9793
|
options.autoUpdate = false;
|
|
9975
9794
|
}
|
|
9976
9795
|
if (options.autoUpdate !== false) {
|
|
9977
|
-
await startSilentUpgrade("9.
|
|
9796
|
+
await startSilentUpgrade("9.67.0");
|
|
9978
9797
|
}
|
|
9979
9798
|
try {
|
|
9980
9799
|
let result;
|
|
@@ -9982,9 +9801,6 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
9982
9801
|
result = await handleGitHubCompose(resolvedConfigFile, options);
|
|
9983
9802
|
} else {
|
|
9984
9803
|
const { config, agentName, agent, basePath } = await loadAndValidateConfig(resolvedConfigFile);
|
|
9985
|
-
if (!options.json) {
|
|
9986
|
-
checkLegacyImageFormat(config);
|
|
9987
|
-
}
|
|
9988
9804
|
const skillResults = await uploadAssets(
|
|
9989
9805
|
agentName,
|
|
9990
9806
|
agent,
|
|
@@ -10792,11 +10608,14 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
10792
10608
|
).option(
|
|
10793
10609
|
"--model-provider <type>",
|
|
10794
10610
|
"Override model provider (e.g., anthropic-api-key)"
|
|
10611
|
+
).option(
|
|
10612
|
+
"--append-system-prompt <text>",
|
|
10613
|
+
"Append text to the agent's system prompt"
|
|
10795
10614
|
).option("--verbose", "Show full tool inputs and outputs").option("--check-env", "Validate secrets and vars before running").addOption(new Option2("--debug-no-mock-claude").hideHelp()).addOption(new Option2("--no-auto-update").hideHelp()).action(
|
|
10796
10615
|
withErrorHandler(
|
|
10797
10616
|
async (identifier, prompt, options) => {
|
|
10798
10617
|
if (options.autoUpdate !== false) {
|
|
10799
|
-
await startSilentUpgrade("9.
|
|
10618
|
+
await startSilentUpgrade("9.67.0");
|
|
10800
10619
|
}
|
|
10801
10620
|
const { org, name, version } = parseIdentifier(identifier);
|
|
10802
10621
|
let composeId;
|
|
@@ -10848,6 +10667,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
10848
10667
|
volumeVersions: Object.keys(options.volumeVersion).length > 0 ? options.volumeVersion : void 0,
|
|
10849
10668
|
conversationId: options.conversation,
|
|
10850
10669
|
modelProvider: options.modelProvider,
|
|
10670
|
+
appendSystemPrompt: options.appendSystemPrompt,
|
|
10851
10671
|
checkEnv: options.checkEnv || void 0,
|
|
10852
10672
|
debugNoMockClaude: options.debugNoMockClaude || void 0
|
|
10853
10673
|
});
|
|
@@ -10895,6 +10715,9 @@ var resumeCommand = new Command9().name("resume").description("Resume an agent r
|
|
|
10895
10715
|
).option(
|
|
10896
10716
|
"--model-provider <type>",
|
|
10897
10717
|
"Override model provider (e.g., anthropic-api-key)"
|
|
10718
|
+
).option(
|
|
10719
|
+
"--append-system-prompt <text>",
|
|
10720
|
+
"Append text to the agent's system prompt"
|
|
10898
10721
|
).option("--verbose", "Show full tool inputs and outputs").option("--check-env", "Validate secrets and vars before running").addOption(new Option3("--debug-no-mock-claude").hideHelp()).action(
|
|
10899
10722
|
withErrorHandler(
|
|
10900
10723
|
async (checkpointId, prompt, options, command) => {
|
|
@@ -10917,6 +10740,7 @@ var resumeCommand = new Command9().name("resume").description("Resume an agent r
|
|
|
10917
10740
|
secrets: loadedSecrets,
|
|
10918
10741
|
volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0,
|
|
10919
10742
|
modelProvider: options.modelProvider || allOpts.modelProvider,
|
|
10743
|
+
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
10920
10744
|
checkEnv: options.checkEnv || allOpts.checkEnv || void 0,
|
|
10921
10745
|
debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
|
|
10922
10746
|
});
|
|
@@ -10957,6 +10781,9 @@ var continueCommand = new Command10().name("continue").description(
|
|
|
10957
10781
|
).option(
|
|
10958
10782
|
"--model-provider <type>",
|
|
10959
10783
|
"Override model provider (e.g., anthropic-api-key)"
|
|
10784
|
+
).option(
|
|
10785
|
+
"--append-system-prompt <text>",
|
|
10786
|
+
"Append text to the agent's system prompt"
|
|
10960
10787
|
).option("--verbose", "Show full tool inputs and outputs").option("--check-env", "Validate secrets and vars before running").addOption(new Option4("--debug-no-mock-claude").hideHelp()).action(
|
|
10961
10788
|
withErrorHandler(
|
|
10962
10789
|
async (agentSessionId, prompt, options, command) => {
|
|
@@ -10979,6 +10806,7 @@ var continueCommand = new Command10().name("continue").description(
|
|
|
10979
10806
|
vars: Object.keys(vars).length > 0 ? vars : void 0,
|
|
10980
10807
|
secrets: loadedSecrets,
|
|
10981
10808
|
modelProvider: options.modelProvider || allOpts.modelProvider,
|
|
10809
|
+
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
10982
10810
|
checkEnv: options.checkEnv || allOpts.checkEnv || void 0,
|
|
10983
10811
|
debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
|
|
10984
10812
|
});
|
|
@@ -12516,7 +12344,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
12516
12344
|
withErrorHandler(
|
|
12517
12345
|
async (prompt, options) => {
|
|
12518
12346
|
if (options.autoUpdate !== false) {
|
|
12519
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
12347
|
+
const shouldExit = await checkAndUpgrade("9.67.0", prompt);
|
|
12520
12348
|
if (shouldExit) {
|
|
12521
12349
|
process.exit(0);
|
|
12522
12350
|
}
|
|
@@ -14698,20 +14526,28 @@ import { tmpdir as tmpdir7 } from "os";
|
|
|
14698
14526
|
import * as tar6 from "tar";
|
|
14699
14527
|
import { stringify as yamlStringify } from "yaml";
|
|
14700
14528
|
function cleanComposeContent(content) {
|
|
14701
|
-
const
|
|
14529
|
+
const agents = {};
|
|
14530
|
+
for (const [name, agent] of Object.entries(content.agents)) {
|
|
14531
|
+
const cleaned = {
|
|
14532
|
+
framework: agent.framework
|
|
14533
|
+
};
|
|
14534
|
+
if (agent.description) cleaned.description = agent.description;
|
|
14535
|
+
if (agent.volumes) cleaned.volumes = agent.volumes;
|
|
14536
|
+
if (agent.environment) cleaned.environment = agent.environment;
|
|
14537
|
+
if (agent.instructions) cleaned.instructions = agent.instructions;
|
|
14538
|
+
if (agent.skills) cleaned.skills = agent.skills;
|
|
14539
|
+
if (agent.experimental_runner)
|
|
14540
|
+
cleaned.experimental_runner = agent.experimental_runner;
|
|
14541
|
+
agents[name] = cleaned;
|
|
14542
|
+
}
|
|
14543
|
+
const result = {
|
|
14702
14544
|
version: content.version,
|
|
14703
|
-
agents
|
|
14545
|
+
agents
|
|
14704
14546
|
};
|
|
14705
|
-
for (const [agentName, agent] of Object.entries(content.agents)) {
|
|
14706
|
-
const { image, working_dir: workingDir, ...rest } = agent;
|
|
14707
|
-
void image;
|
|
14708
|
-
void workingDir;
|
|
14709
|
-
cleaned.agents[agentName] = rest;
|
|
14710
|
-
}
|
|
14711
14547
|
if (content.volumes) {
|
|
14712
|
-
|
|
14548
|
+
result.volumes = content.volumes;
|
|
14713
14549
|
}
|
|
14714
|
-
return
|
|
14550
|
+
return result;
|
|
14715
14551
|
}
|
|
14716
14552
|
async function downloadInstructions(agentName, instructionsPath, destination) {
|
|
14717
14553
|
const destPath = join10(destination, instructionsPath);
|
|
@@ -14853,7 +14689,7 @@ var listCommand9 = new Command65().name("list").alias("ls").description("List al
|
|
|
14853
14689
|
);
|
|
14854
14690
|
return;
|
|
14855
14691
|
}
|
|
14856
|
-
const nameWidth = Math.max(4, ...data.composes.map((
|
|
14692
|
+
const nameWidth = Math.max(4, ...data.composes.map((c27) => c27.name.length));
|
|
14857
14693
|
const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
|
|
14858
14694
|
" "
|
|
14859
14695
|
);
|
|
@@ -15001,12 +14837,6 @@ function formatVariableSources(sources) {
|
|
|
15001
14837
|
function formatAgentDetails(agentName, agent, agentSources, volumeConfigs) {
|
|
15002
14838
|
console.log(` ${chalk59.cyan(agentName)}:`);
|
|
15003
14839
|
console.log(` Framework: ${agent.framework}`);
|
|
15004
|
-
if (agent.image) {
|
|
15005
|
-
console.log(` Image: ${agent.image}`);
|
|
15006
|
-
}
|
|
15007
|
-
if (agent.working_dir) {
|
|
15008
|
-
console.log(` Working Dir: ${agent.working_dir}`);
|
|
15009
|
-
}
|
|
15010
14840
|
formatVolumes(agent.volumes ?? [], volumeConfigs);
|
|
15011
14841
|
formatListSection("Skills", agent.skills ?? []);
|
|
15012
14842
|
if (agentSources) {
|
|
@@ -15271,6 +15101,9 @@ function validateTimeFormat(time) {
|
|
|
15271
15101
|
if (minute < 0 || minute > 59) {
|
|
15272
15102
|
return "Minute must be 0-59";
|
|
15273
15103
|
}
|
|
15104
|
+
if (minute % 5 !== 0) {
|
|
15105
|
+
return "Minute must be a multiple of 5 (0, 5, 10, ..., 55)";
|
|
15106
|
+
}
|
|
15274
15107
|
return true;
|
|
15275
15108
|
}
|
|
15276
15109
|
function validateDateFormat(date) {
|
|
@@ -15457,7 +15290,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
|
|
|
15457
15290
|
if (!isInteractive()) {
|
|
15458
15291
|
throw new Error("--frequency is required (daily|weekly|monthly|once|loop)");
|
|
15459
15292
|
}
|
|
15460
|
-
const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((
|
|
15293
|
+
const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c27) => c27.value === existingFrequency) : 0;
|
|
15461
15294
|
frequency = await promptSelect(
|
|
15462
15295
|
"Schedule frequency",
|
|
15463
15296
|
FREQUENCY_CHOICES,
|
|
@@ -15482,7 +15315,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
|
|
|
15482
15315
|
throw new Error("--day is required for weekly/monthly");
|
|
15483
15316
|
}
|
|
15484
15317
|
if (frequency === "weekly") {
|
|
15485
|
-
const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((
|
|
15318
|
+
const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c27) => c27.value === existingDay) : 0;
|
|
15486
15319
|
const day2 = await promptSelect(
|
|
15487
15320
|
"Day of week",
|
|
15488
15321
|
DAY_OF_WEEK_CHOICES,
|
|
@@ -16932,7 +16765,7 @@ import chalk76 from "chalk";
|
|
|
16932
16765
|
var listCommand13 = new Command86().name("list").alias("ls").description("List all connectors and their status").action(
|
|
16933
16766
|
withErrorHandler(async () => {
|
|
16934
16767
|
const result = await listConnectors();
|
|
16935
|
-
const connectedMap = new Map(result.connectors.map((
|
|
16768
|
+
const connectedMap = new Map(result.connectors.map((c27) => [c27.type, c27]));
|
|
16936
16769
|
const allTypesRaw = Object.keys(CONNECTOR_TYPES);
|
|
16937
16770
|
const allTypes = [];
|
|
16938
16771
|
for (const type2 of allTypesRaw) {
|
|
@@ -17493,16 +17326,16 @@ async function handleModelProvider(ctx) {
|
|
|
17493
17326
|
const providerType = await step.prompt(
|
|
17494
17327
|
() => promptSelect(
|
|
17495
17328
|
"Select provider type:",
|
|
17496
|
-
choices.map((
|
|
17497
|
-
title:
|
|
17498
|
-
value:
|
|
17329
|
+
choices.map((c27) => ({
|
|
17330
|
+
title: c27.label,
|
|
17331
|
+
value: c27.type
|
|
17499
17332
|
}))
|
|
17500
17333
|
)
|
|
17501
17334
|
);
|
|
17502
17335
|
if (!providerType) {
|
|
17503
17336
|
process.exit(0);
|
|
17504
17337
|
}
|
|
17505
|
-
const selectedChoice = choices.find((
|
|
17338
|
+
const selectedChoice = choices.find((c27) => c27.type === providerType);
|
|
17506
17339
|
if (selectedChoice?.helpText) {
|
|
17507
17340
|
for (const line of selectedChoice.helpText.split("\n")) {
|
|
17508
17341
|
step.detail(chalk82.dim(line));
|
|
@@ -17856,13 +17689,13 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17856
17689
|
if (latestVersion === null) {
|
|
17857
17690
|
throw new Error("Could not check for updates. Please try again later.");
|
|
17858
17691
|
}
|
|
17859
|
-
if (latestVersion === "9.
|
|
17860
|
-
console.log(chalk86.green(`\u2713 Already up to date (${"9.
|
|
17692
|
+
if (latestVersion === "9.67.0") {
|
|
17693
|
+
console.log(chalk86.green(`\u2713 Already up to date (${"9.67.0"})`));
|
|
17861
17694
|
return;
|
|
17862
17695
|
}
|
|
17863
17696
|
console.log(
|
|
17864
17697
|
chalk86.yellow(
|
|
17865
|
-
`Current version: ${"9.
|
|
17698
|
+
`Current version: ${"9.67.0"} -> Latest version: ${latestVersion}`
|
|
17866
17699
|
)
|
|
17867
17700
|
);
|
|
17868
17701
|
console.log();
|
|
@@ -17889,7 +17722,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17889
17722
|
const success = await performUpgrade(packageManager);
|
|
17890
17723
|
if (success) {
|
|
17891
17724
|
console.log(
|
|
17892
|
-
chalk86.green(`\u2713 Upgraded from ${"9.
|
|
17725
|
+
chalk86.green(`\u2713 Upgraded from ${"9.67.0"} to ${latestVersion}`)
|
|
17893
17726
|
);
|
|
17894
17727
|
return;
|
|
17895
17728
|
}
|
|
@@ -17903,7 +17736,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17903
17736
|
|
|
17904
17737
|
// src/index.ts
|
|
17905
17738
|
var program = new Command95();
|
|
17906
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
17739
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.67.0");
|
|
17907
17740
|
program.addCommand(authCommand);
|
|
17908
17741
|
program.addCommand(infoCommand);
|
|
17909
17742
|
program.addCommand(composeCommand);
|