@vm0/cli 9.33.0 → 9.35.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 +529 -283
- 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.35.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.35.0",
|
|
68
68
|
command: process.argv.slice(2).join(" ")
|
|
69
69
|
});
|
|
70
70
|
Sentry.setContext("runtime", {
|
|
@@ -75,7 +75,7 @@ if (DSN) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// src/index.ts
|
|
78
|
-
import { Command as
|
|
78
|
+
import { Command as Command78 } from "commander";
|
|
79
79
|
|
|
80
80
|
// src/commands/auth/index.ts
|
|
81
81
|
import { Command as Command5 } from "commander";
|
|
@@ -605,7 +605,7 @@ async function waitForSilentUpgrade(timeout = TIMEOUT_MS) {
|
|
|
605
605
|
// src/commands/info/index.ts
|
|
606
606
|
var CONFIG_PATH = join2(homedir2(), ".vm0", "config.json");
|
|
607
607
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
608
|
-
console.log(chalk7.bold(`VM0 CLI v${"9.
|
|
608
|
+
console.log(chalk7.bold(`VM0 CLI v${"9.35.0"}`));
|
|
609
609
|
console.log();
|
|
610
610
|
const config = await loadConfig();
|
|
611
611
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -794,7 +794,9 @@ var storedExecutionContextSchema = z3.object({
|
|
|
794
794
|
// Debug flag to force real Claude in mock environments (internal use only)
|
|
795
795
|
debugNoMockClaude: z3.boolean().optional(),
|
|
796
796
|
// Dispatch timestamp for E2E timing metrics
|
|
797
|
-
apiStartTime: z3.number().optional()
|
|
797
|
+
apiStartTime: z3.number().optional(),
|
|
798
|
+
// User's timezone preference (IANA format, e.g., "Asia/Shanghai")
|
|
799
|
+
userTimezone: z3.string().optional()
|
|
798
800
|
});
|
|
799
801
|
var executionContextSchema = z3.object({
|
|
800
802
|
runId: z3.string().uuid(),
|
|
@@ -816,7 +818,9 @@ var executionContextSchema = z3.object({
|
|
|
816
818
|
// Debug flag to force real Claude in mock environments (internal use only)
|
|
817
819
|
debugNoMockClaude: z3.boolean().optional(),
|
|
818
820
|
// Dispatch timestamp for E2E timing metrics
|
|
819
|
-
apiStartTime: z3.number().optional()
|
|
821
|
+
apiStartTime: z3.number().optional(),
|
|
822
|
+
// User's timezone preference (IANA format, e.g., "Asia/Shanghai")
|
|
823
|
+
userTimezone: z3.string().optional()
|
|
820
824
|
});
|
|
821
825
|
var runnersJobClaimContract = c.router({
|
|
822
826
|
claim: {
|
|
@@ -2632,8 +2636,8 @@ var MODEL_PROVIDER_TYPES = {
|
|
|
2632
2636
|
CLAUDE_CODE_SUBAGENT_MODEL: "$model",
|
|
2633
2637
|
API_TIMEOUT_MS: "3000000"
|
|
2634
2638
|
},
|
|
2635
|
-
models: ["
|
|
2636
|
-
defaultModel: "
|
|
2639
|
+
models: ["glm-5", "glm-4.7", "glm-4.5-air"],
|
|
2640
|
+
defaultModel: "glm-4.7"
|
|
2637
2641
|
},
|
|
2638
2642
|
"azure-foundry": {
|
|
2639
2643
|
framework: "claude-code",
|
|
@@ -3775,29 +3779,73 @@ var connectorSessionByIdContract = c19.router({
|
|
|
3775
3779
|
}
|
|
3776
3780
|
});
|
|
3777
3781
|
|
|
3778
|
-
// ../../packages/core/src/contracts/
|
|
3782
|
+
// ../../packages/core/src/contracts/user-preferences.ts
|
|
3779
3783
|
import { z as z24 } from "zod";
|
|
3780
3784
|
var c20 = initContract();
|
|
3781
|
-
var
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
+
var userPreferencesResponseSchema = z24.object({
|
|
3786
|
+
timezone: z24.string().nullable()
|
|
3787
|
+
});
|
|
3788
|
+
var updateUserPreferencesRequestSchema = z24.object({
|
|
3789
|
+
timezone: z24.string().min(1, "Timezone is required")
|
|
3790
|
+
});
|
|
3791
|
+
var userPreferencesContract = c20.router({
|
|
3792
|
+
/**
|
|
3793
|
+
* GET /api/user/preferences
|
|
3794
|
+
* Get current user's preferences
|
|
3795
|
+
*/
|
|
3796
|
+
get: {
|
|
3797
|
+
method: "GET",
|
|
3798
|
+
path: "/api/user/preferences",
|
|
3799
|
+
headers: authHeadersSchema,
|
|
3800
|
+
responses: {
|
|
3801
|
+
200: userPreferencesResponseSchema,
|
|
3802
|
+
401: apiErrorSchema,
|
|
3803
|
+
500: apiErrorSchema
|
|
3804
|
+
},
|
|
3805
|
+
summary: "Get user preferences"
|
|
3806
|
+
},
|
|
3807
|
+
/**
|
|
3808
|
+
* PUT /api/user/preferences
|
|
3809
|
+
* Update user preferences
|
|
3810
|
+
*/
|
|
3811
|
+
update: {
|
|
3812
|
+
method: "PUT",
|
|
3813
|
+
path: "/api/user/preferences",
|
|
3814
|
+
headers: authHeadersSchema,
|
|
3815
|
+
body: updateUserPreferencesRequestSchema,
|
|
3816
|
+
responses: {
|
|
3817
|
+
200: userPreferencesResponseSchema,
|
|
3818
|
+
400: apiErrorSchema,
|
|
3819
|
+
401: apiErrorSchema,
|
|
3820
|
+
500: apiErrorSchema
|
|
3821
|
+
},
|
|
3822
|
+
summary: "Update user preferences"
|
|
3823
|
+
}
|
|
3824
|
+
});
|
|
3825
|
+
|
|
3826
|
+
// ../../packages/core/src/contracts/public/agents.ts
|
|
3827
|
+
import { z as z25 } from "zod";
|
|
3828
|
+
var c21 = initContract();
|
|
3829
|
+
var publicAgentSchema = z25.object({
|
|
3830
|
+
id: z25.string(),
|
|
3831
|
+
name: z25.string(),
|
|
3832
|
+
currentVersionId: z25.string().nullable(),
|
|
3785
3833
|
createdAt: timestampSchema,
|
|
3786
3834
|
updatedAt: timestampSchema
|
|
3787
3835
|
});
|
|
3788
|
-
var agentVersionSchema =
|
|
3789
|
-
id:
|
|
3790
|
-
agentId:
|
|
3791
|
-
versionNumber:
|
|
3836
|
+
var agentVersionSchema = z25.object({
|
|
3837
|
+
id: z25.string(),
|
|
3838
|
+
agentId: z25.string(),
|
|
3839
|
+
versionNumber: z25.number(),
|
|
3792
3840
|
createdAt: timestampSchema
|
|
3793
3841
|
});
|
|
3794
3842
|
var publicAgentDetailSchema = publicAgentSchema;
|
|
3795
3843
|
var paginatedAgentsSchema = createPaginatedResponseSchema(publicAgentSchema);
|
|
3796
3844
|
var paginatedAgentVersionsSchema = createPaginatedResponseSchema(agentVersionSchema);
|
|
3797
3845
|
var agentListQuerySchema = listQuerySchema.extend({
|
|
3798
|
-
name:
|
|
3846
|
+
name: z25.string().optional()
|
|
3799
3847
|
});
|
|
3800
|
-
var publicAgentsListContract =
|
|
3848
|
+
var publicAgentsListContract = c21.router({
|
|
3801
3849
|
list: {
|
|
3802
3850
|
method: "GET",
|
|
3803
3851
|
path: "/v1/agents",
|
|
@@ -3812,13 +3860,13 @@ var publicAgentsListContract = c20.router({
|
|
|
3812
3860
|
description: "List all agents in the current scope with pagination. Use the `name` query parameter to filter by agent name."
|
|
3813
3861
|
}
|
|
3814
3862
|
});
|
|
3815
|
-
var publicAgentByIdContract =
|
|
3863
|
+
var publicAgentByIdContract = c21.router({
|
|
3816
3864
|
get: {
|
|
3817
3865
|
method: "GET",
|
|
3818
3866
|
path: "/v1/agents/:id",
|
|
3819
3867
|
headers: authHeadersSchema,
|
|
3820
|
-
pathParams:
|
|
3821
|
-
id:
|
|
3868
|
+
pathParams: z25.object({
|
|
3869
|
+
id: z25.string().min(1, "Agent ID is required")
|
|
3822
3870
|
}),
|
|
3823
3871
|
responses: {
|
|
3824
3872
|
200: publicAgentDetailSchema,
|
|
@@ -3830,13 +3878,13 @@ var publicAgentByIdContract = c20.router({
|
|
|
3830
3878
|
description: "Get agent details by ID"
|
|
3831
3879
|
}
|
|
3832
3880
|
});
|
|
3833
|
-
var publicAgentVersionsContract =
|
|
3881
|
+
var publicAgentVersionsContract = c21.router({
|
|
3834
3882
|
list: {
|
|
3835
3883
|
method: "GET",
|
|
3836
3884
|
path: "/v1/agents/:id/versions",
|
|
3837
3885
|
headers: authHeadersSchema,
|
|
3838
|
-
pathParams:
|
|
3839
|
-
id:
|
|
3886
|
+
pathParams: z25.object({
|
|
3887
|
+
id: z25.string().min(1, "Agent ID is required")
|
|
3840
3888
|
}),
|
|
3841
3889
|
query: listQuerySchema,
|
|
3842
3890
|
responses: {
|
|
@@ -3851,9 +3899,9 @@ var publicAgentVersionsContract = c20.router({
|
|
|
3851
3899
|
});
|
|
3852
3900
|
|
|
3853
3901
|
// ../../packages/core/src/contracts/public/runs.ts
|
|
3854
|
-
import { z as
|
|
3855
|
-
var
|
|
3856
|
-
var publicRunStatusSchema =
|
|
3902
|
+
import { z as z26 } from "zod";
|
|
3903
|
+
var c22 = initContract();
|
|
3904
|
+
var publicRunStatusSchema = z26.enum([
|
|
3857
3905
|
"pending",
|
|
3858
3906
|
"running",
|
|
3859
3907
|
"completed",
|
|
@@ -3861,54 +3909,54 @@ var publicRunStatusSchema = z25.enum([
|
|
|
3861
3909
|
"timeout",
|
|
3862
3910
|
"cancelled"
|
|
3863
3911
|
]);
|
|
3864
|
-
var publicRunSchema =
|
|
3865
|
-
id:
|
|
3866
|
-
agentId:
|
|
3867
|
-
agentName:
|
|
3912
|
+
var publicRunSchema = z26.object({
|
|
3913
|
+
id: z26.string(),
|
|
3914
|
+
agentId: z26.string(),
|
|
3915
|
+
agentName: z26.string(),
|
|
3868
3916
|
status: publicRunStatusSchema,
|
|
3869
|
-
prompt:
|
|
3917
|
+
prompt: z26.string(),
|
|
3870
3918
|
createdAt: timestampSchema,
|
|
3871
3919
|
startedAt: timestampSchema.nullable(),
|
|
3872
3920
|
completedAt: timestampSchema.nullable()
|
|
3873
3921
|
});
|
|
3874
3922
|
var publicRunDetailSchema = publicRunSchema.extend({
|
|
3875
|
-
error:
|
|
3876
|
-
executionTimeMs:
|
|
3877
|
-
checkpointId:
|
|
3878
|
-
sessionId:
|
|
3879
|
-
artifactName:
|
|
3880
|
-
artifactVersion:
|
|
3881
|
-
volumes:
|
|
3923
|
+
error: z26.string().nullable(),
|
|
3924
|
+
executionTimeMs: z26.number().nullable(),
|
|
3925
|
+
checkpointId: z26.string().nullable(),
|
|
3926
|
+
sessionId: z26.string().nullable(),
|
|
3927
|
+
artifactName: z26.string().nullable(),
|
|
3928
|
+
artifactVersion: z26.string().nullable(),
|
|
3929
|
+
volumes: z26.record(z26.string(), z26.string()).optional()
|
|
3882
3930
|
});
|
|
3883
3931
|
var paginatedRunsSchema = createPaginatedResponseSchema(publicRunSchema);
|
|
3884
|
-
var createRunRequestSchema =
|
|
3932
|
+
var createRunRequestSchema = z26.object({
|
|
3885
3933
|
// Agent identification (one of: agent, agentId, sessionId, checkpointId)
|
|
3886
|
-
agent:
|
|
3934
|
+
agent: z26.string().optional(),
|
|
3887
3935
|
// Agent name
|
|
3888
|
-
agentId:
|
|
3936
|
+
agentId: z26.string().optional(),
|
|
3889
3937
|
// Agent ID
|
|
3890
|
-
agentVersion:
|
|
3938
|
+
agentVersion: z26.string().optional(),
|
|
3891
3939
|
// Version specifier (e.g., "latest", "v1", specific ID)
|
|
3892
3940
|
// Continue session
|
|
3893
|
-
sessionId:
|
|
3941
|
+
sessionId: z26.string().optional(),
|
|
3894
3942
|
// Resume from checkpoint
|
|
3895
|
-
checkpointId:
|
|
3943
|
+
checkpointId: z26.string().optional(),
|
|
3896
3944
|
// Required
|
|
3897
|
-
prompt:
|
|
3945
|
+
prompt: z26.string().min(1, "Prompt is required"),
|
|
3898
3946
|
// Optional configuration
|
|
3899
|
-
variables:
|
|
3900
|
-
secrets:
|
|
3901
|
-
artifactName:
|
|
3947
|
+
variables: z26.record(z26.string(), z26.string()).optional(),
|
|
3948
|
+
secrets: z26.record(z26.string(), z26.string()).optional(),
|
|
3949
|
+
artifactName: z26.string().optional(),
|
|
3902
3950
|
// Artifact name to mount
|
|
3903
|
-
artifactVersion:
|
|
3951
|
+
artifactVersion: z26.string().optional(),
|
|
3904
3952
|
// Artifact version (defaults to latest)
|
|
3905
|
-
volumes:
|
|
3953
|
+
volumes: z26.record(z26.string(), z26.string()).optional()
|
|
3906
3954
|
// volume_name -> version
|
|
3907
3955
|
});
|
|
3908
3956
|
var runListQuerySchema = listQuerySchema.extend({
|
|
3909
3957
|
status: publicRunStatusSchema.optional()
|
|
3910
3958
|
});
|
|
3911
|
-
var publicRunsListContract =
|
|
3959
|
+
var publicRunsListContract = c22.router({
|
|
3912
3960
|
list: {
|
|
3913
3961
|
method: "GET",
|
|
3914
3962
|
path: "/v1/runs",
|
|
@@ -3940,13 +3988,13 @@ var publicRunsListContract = c21.router({
|
|
|
3940
3988
|
description: "Create and execute a new agent run. Returns 202 Accepted as runs execute asynchronously."
|
|
3941
3989
|
}
|
|
3942
3990
|
});
|
|
3943
|
-
var publicRunByIdContract =
|
|
3991
|
+
var publicRunByIdContract = c22.router({
|
|
3944
3992
|
get: {
|
|
3945
3993
|
method: "GET",
|
|
3946
3994
|
path: "/v1/runs/:id",
|
|
3947
3995
|
headers: authHeadersSchema,
|
|
3948
|
-
pathParams:
|
|
3949
|
-
id:
|
|
3996
|
+
pathParams: z26.object({
|
|
3997
|
+
id: z26.string().min(1, "Run ID is required")
|
|
3950
3998
|
}),
|
|
3951
3999
|
responses: {
|
|
3952
4000
|
200: publicRunDetailSchema,
|
|
@@ -3958,15 +4006,15 @@ var publicRunByIdContract = c21.router({
|
|
|
3958
4006
|
description: "Get run details by ID"
|
|
3959
4007
|
}
|
|
3960
4008
|
});
|
|
3961
|
-
var publicRunCancelContract =
|
|
4009
|
+
var publicRunCancelContract = c22.router({
|
|
3962
4010
|
cancel: {
|
|
3963
4011
|
method: "POST",
|
|
3964
4012
|
path: "/v1/runs/:id/cancel",
|
|
3965
4013
|
headers: authHeadersSchema,
|
|
3966
|
-
pathParams:
|
|
3967
|
-
id:
|
|
4014
|
+
pathParams: z26.object({
|
|
4015
|
+
id: z26.string().min(1, "Run ID is required")
|
|
3968
4016
|
}),
|
|
3969
|
-
body:
|
|
4017
|
+
body: z26.undefined(),
|
|
3970
4018
|
responses: {
|
|
3971
4019
|
200: publicRunDetailSchema,
|
|
3972
4020
|
400: publicApiErrorSchema,
|
|
@@ -3979,27 +4027,27 @@ var publicRunCancelContract = c21.router({
|
|
|
3979
4027
|
description: "Cancel a pending or running execution"
|
|
3980
4028
|
}
|
|
3981
4029
|
});
|
|
3982
|
-
var logEntrySchema =
|
|
4030
|
+
var logEntrySchema = z26.object({
|
|
3983
4031
|
timestamp: timestampSchema,
|
|
3984
|
-
type:
|
|
3985
|
-
level:
|
|
3986
|
-
message:
|
|
3987
|
-
metadata:
|
|
4032
|
+
type: z26.enum(["agent", "system", "network"]),
|
|
4033
|
+
level: z26.enum(["debug", "info", "warn", "error"]),
|
|
4034
|
+
message: z26.string(),
|
|
4035
|
+
metadata: z26.record(z26.string(), z26.unknown()).optional()
|
|
3988
4036
|
});
|
|
3989
4037
|
var paginatedLogsSchema = createPaginatedResponseSchema(logEntrySchema);
|
|
3990
4038
|
var logsQuerySchema = listQuerySchema.extend({
|
|
3991
|
-
type:
|
|
4039
|
+
type: z26.enum(["agent", "system", "network", "all"]).default("all"),
|
|
3992
4040
|
since: timestampSchema.optional(),
|
|
3993
4041
|
until: timestampSchema.optional(),
|
|
3994
|
-
order:
|
|
4042
|
+
order: z26.enum(["asc", "desc"]).default("asc")
|
|
3995
4043
|
});
|
|
3996
|
-
var publicRunLogsContract =
|
|
4044
|
+
var publicRunLogsContract = c22.router({
|
|
3997
4045
|
getLogs: {
|
|
3998
4046
|
method: "GET",
|
|
3999
4047
|
path: "/v1/runs/:id/logs",
|
|
4000
4048
|
headers: authHeadersSchema,
|
|
4001
|
-
pathParams:
|
|
4002
|
-
id:
|
|
4049
|
+
pathParams: z26.object({
|
|
4050
|
+
id: z26.string().min(1, "Run ID is required")
|
|
4003
4051
|
}),
|
|
4004
4052
|
query: logsQuerySchema,
|
|
4005
4053
|
responses: {
|
|
@@ -4012,30 +4060,30 @@ var publicRunLogsContract = c21.router({
|
|
|
4012
4060
|
description: "Get unified logs for a run. Combines agent, system, and network logs."
|
|
4013
4061
|
}
|
|
4014
4062
|
});
|
|
4015
|
-
var metricPointSchema =
|
|
4063
|
+
var metricPointSchema = z26.object({
|
|
4016
4064
|
timestamp: timestampSchema,
|
|
4017
|
-
cpuPercent:
|
|
4018
|
-
memoryUsedMb:
|
|
4019
|
-
memoryTotalMb:
|
|
4020
|
-
diskUsedMb:
|
|
4021
|
-
diskTotalMb:
|
|
4022
|
-
});
|
|
4023
|
-
var metricsSummarySchema =
|
|
4024
|
-
avgCpuPercent:
|
|
4025
|
-
maxMemoryUsedMb:
|
|
4026
|
-
totalDurationMs:
|
|
4027
|
-
});
|
|
4028
|
-
var metricsResponseSchema2 =
|
|
4029
|
-
data:
|
|
4065
|
+
cpuPercent: z26.number(),
|
|
4066
|
+
memoryUsedMb: z26.number(),
|
|
4067
|
+
memoryTotalMb: z26.number(),
|
|
4068
|
+
diskUsedMb: z26.number(),
|
|
4069
|
+
diskTotalMb: z26.number()
|
|
4070
|
+
});
|
|
4071
|
+
var metricsSummarySchema = z26.object({
|
|
4072
|
+
avgCpuPercent: z26.number(),
|
|
4073
|
+
maxMemoryUsedMb: z26.number(),
|
|
4074
|
+
totalDurationMs: z26.number().nullable()
|
|
4075
|
+
});
|
|
4076
|
+
var metricsResponseSchema2 = z26.object({
|
|
4077
|
+
data: z26.array(metricPointSchema),
|
|
4030
4078
|
summary: metricsSummarySchema
|
|
4031
4079
|
});
|
|
4032
|
-
var publicRunMetricsContract =
|
|
4080
|
+
var publicRunMetricsContract = c22.router({
|
|
4033
4081
|
getMetrics: {
|
|
4034
4082
|
method: "GET",
|
|
4035
4083
|
path: "/v1/runs/:id/metrics",
|
|
4036
4084
|
headers: authHeadersSchema,
|
|
4037
|
-
pathParams:
|
|
4038
|
-
id:
|
|
4085
|
+
pathParams: z26.object({
|
|
4086
|
+
id: z26.string().min(1, "Run ID is required")
|
|
4039
4087
|
}),
|
|
4040
4088
|
responses: {
|
|
4041
4089
|
200: metricsResponseSchema2,
|
|
@@ -4047,7 +4095,7 @@ var publicRunMetricsContract = c21.router({
|
|
|
4047
4095
|
description: "Get CPU, memory, and disk metrics for a run"
|
|
4048
4096
|
}
|
|
4049
4097
|
});
|
|
4050
|
-
var sseEventTypeSchema =
|
|
4098
|
+
var sseEventTypeSchema = z26.enum([
|
|
4051
4099
|
"status",
|
|
4052
4100
|
// Run status change
|
|
4053
4101
|
"output",
|
|
@@ -4059,26 +4107,26 @@ var sseEventTypeSchema = z25.enum([
|
|
|
4059
4107
|
"heartbeat"
|
|
4060
4108
|
// Keep-alive
|
|
4061
4109
|
]);
|
|
4062
|
-
var sseEventSchema =
|
|
4110
|
+
var sseEventSchema = z26.object({
|
|
4063
4111
|
event: sseEventTypeSchema,
|
|
4064
|
-
data:
|
|
4065
|
-
id:
|
|
4112
|
+
data: z26.unknown(),
|
|
4113
|
+
id: z26.string().optional()
|
|
4066
4114
|
// For Last-Event-ID reconnection
|
|
4067
4115
|
});
|
|
4068
|
-
var publicRunEventsContract =
|
|
4116
|
+
var publicRunEventsContract = c22.router({
|
|
4069
4117
|
streamEvents: {
|
|
4070
4118
|
method: "GET",
|
|
4071
4119
|
path: "/v1/runs/:id/events",
|
|
4072
4120
|
headers: authHeadersSchema,
|
|
4073
|
-
pathParams:
|
|
4074
|
-
id:
|
|
4121
|
+
pathParams: z26.object({
|
|
4122
|
+
id: z26.string().min(1, "Run ID is required")
|
|
4075
4123
|
}),
|
|
4076
|
-
query:
|
|
4077
|
-
lastEventId:
|
|
4124
|
+
query: z26.object({
|
|
4125
|
+
lastEventId: z26.string().optional()
|
|
4078
4126
|
// For reconnection
|
|
4079
4127
|
}),
|
|
4080
4128
|
responses: {
|
|
4081
|
-
200:
|
|
4129
|
+
200: z26.any(),
|
|
4082
4130
|
// SSE stream - actual content is text/event-stream
|
|
4083
4131
|
401: publicApiErrorSchema,
|
|
4084
4132
|
404: publicApiErrorSchema,
|
|
@@ -4090,28 +4138,28 @@ var publicRunEventsContract = c21.router({
|
|
|
4090
4138
|
});
|
|
4091
4139
|
|
|
4092
4140
|
// ../../packages/core/src/contracts/public/artifacts.ts
|
|
4093
|
-
import { z as
|
|
4094
|
-
var
|
|
4095
|
-
var publicArtifactSchema =
|
|
4096
|
-
id:
|
|
4097
|
-
name:
|
|
4098
|
-
currentVersionId:
|
|
4099
|
-
size:
|
|
4141
|
+
import { z as z27 } from "zod";
|
|
4142
|
+
var c23 = initContract();
|
|
4143
|
+
var publicArtifactSchema = z27.object({
|
|
4144
|
+
id: z27.string(),
|
|
4145
|
+
name: z27.string(),
|
|
4146
|
+
currentVersionId: z27.string().nullable(),
|
|
4147
|
+
size: z27.number(),
|
|
4100
4148
|
// Total size in bytes
|
|
4101
|
-
fileCount:
|
|
4149
|
+
fileCount: z27.number(),
|
|
4102
4150
|
createdAt: timestampSchema,
|
|
4103
4151
|
updatedAt: timestampSchema
|
|
4104
4152
|
});
|
|
4105
|
-
var artifactVersionSchema =
|
|
4106
|
-
id:
|
|
4153
|
+
var artifactVersionSchema = z27.object({
|
|
4154
|
+
id: z27.string(),
|
|
4107
4155
|
// SHA-256 content hash
|
|
4108
|
-
artifactId:
|
|
4109
|
-
size:
|
|
4156
|
+
artifactId: z27.string(),
|
|
4157
|
+
size: z27.number(),
|
|
4110
4158
|
// Size in bytes
|
|
4111
|
-
fileCount:
|
|
4112
|
-
message:
|
|
4159
|
+
fileCount: z27.number(),
|
|
4160
|
+
message: z27.string().nullable(),
|
|
4113
4161
|
// Optional commit message
|
|
4114
|
-
createdBy:
|
|
4162
|
+
createdBy: z27.string(),
|
|
4115
4163
|
createdAt: timestampSchema
|
|
4116
4164
|
});
|
|
4117
4165
|
var publicArtifactDetailSchema = publicArtifactSchema.extend({
|
|
@@ -4121,7 +4169,7 @@ var paginatedArtifactsSchema = createPaginatedResponseSchema(publicArtifactSchem
|
|
|
4121
4169
|
var paginatedArtifactVersionsSchema = createPaginatedResponseSchema(
|
|
4122
4170
|
artifactVersionSchema
|
|
4123
4171
|
);
|
|
4124
|
-
var publicArtifactsListContract =
|
|
4172
|
+
var publicArtifactsListContract = c23.router({
|
|
4125
4173
|
list: {
|
|
4126
4174
|
method: "GET",
|
|
4127
4175
|
path: "/v1/artifacts",
|
|
@@ -4136,13 +4184,13 @@ var publicArtifactsListContract = c22.router({
|
|
|
4136
4184
|
description: "List all artifacts in the current scope with pagination"
|
|
4137
4185
|
}
|
|
4138
4186
|
});
|
|
4139
|
-
var publicArtifactByIdContract =
|
|
4187
|
+
var publicArtifactByIdContract = c23.router({
|
|
4140
4188
|
get: {
|
|
4141
4189
|
method: "GET",
|
|
4142
4190
|
path: "/v1/artifacts/:id",
|
|
4143
4191
|
headers: authHeadersSchema,
|
|
4144
|
-
pathParams:
|
|
4145
|
-
id:
|
|
4192
|
+
pathParams: z27.object({
|
|
4193
|
+
id: z27.string().min(1, "Artifact ID is required")
|
|
4146
4194
|
}),
|
|
4147
4195
|
responses: {
|
|
4148
4196
|
200: publicArtifactDetailSchema,
|
|
@@ -4154,13 +4202,13 @@ var publicArtifactByIdContract = c22.router({
|
|
|
4154
4202
|
description: "Get artifact details by ID"
|
|
4155
4203
|
}
|
|
4156
4204
|
});
|
|
4157
|
-
var publicArtifactVersionsContract =
|
|
4205
|
+
var publicArtifactVersionsContract = c23.router({
|
|
4158
4206
|
list: {
|
|
4159
4207
|
method: "GET",
|
|
4160
4208
|
path: "/v1/artifacts/:id/versions",
|
|
4161
4209
|
headers: authHeadersSchema,
|
|
4162
|
-
pathParams:
|
|
4163
|
-
id:
|
|
4210
|
+
pathParams: z27.object({
|
|
4211
|
+
id: z27.string().min(1, "Artifact ID is required")
|
|
4164
4212
|
}),
|
|
4165
4213
|
query: listQuerySchema,
|
|
4166
4214
|
responses: {
|
|
@@ -4173,20 +4221,20 @@ var publicArtifactVersionsContract = c22.router({
|
|
|
4173
4221
|
description: "List all versions of an artifact with pagination"
|
|
4174
4222
|
}
|
|
4175
4223
|
});
|
|
4176
|
-
var publicArtifactDownloadContract =
|
|
4224
|
+
var publicArtifactDownloadContract = c23.router({
|
|
4177
4225
|
download: {
|
|
4178
4226
|
method: "GET",
|
|
4179
4227
|
path: "/v1/artifacts/:id/download",
|
|
4180
4228
|
headers: authHeadersSchema,
|
|
4181
|
-
pathParams:
|
|
4182
|
-
id:
|
|
4229
|
+
pathParams: z27.object({
|
|
4230
|
+
id: z27.string().min(1, "Artifact ID is required")
|
|
4183
4231
|
}),
|
|
4184
|
-
query:
|
|
4185
|
-
versionId:
|
|
4232
|
+
query: z27.object({
|
|
4233
|
+
versionId: z27.string().optional()
|
|
4186
4234
|
// Defaults to current version
|
|
4187
4235
|
}),
|
|
4188
4236
|
responses: {
|
|
4189
|
-
302:
|
|
4237
|
+
302: z27.undefined(),
|
|
4190
4238
|
// Redirect to presigned URL
|
|
4191
4239
|
401: publicApiErrorSchema,
|
|
4192
4240
|
404: publicApiErrorSchema,
|
|
@@ -4198,28 +4246,28 @@ var publicArtifactDownloadContract = c22.router({
|
|
|
4198
4246
|
});
|
|
4199
4247
|
|
|
4200
4248
|
// ../../packages/core/src/contracts/public/volumes.ts
|
|
4201
|
-
import { z as
|
|
4202
|
-
var
|
|
4203
|
-
var publicVolumeSchema =
|
|
4204
|
-
id:
|
|
4205
|
-
name:
|
|
4206
|
-
currentVersionId:
|
|
4207
|
-
size:
|
|
4249
|
+
import { z as z28 } from "zod";
|
|
4250
|
+
var c24 = initContract();
|
|
4251
|
+
var publicVolumeSchema = z28.object({
|
|
4252
|
+
id: z28.string(),
|
|
4253
|
+
name: z28.string(),
|
|
4254
|
+
currentVersionId: z28.string().nullable(),
|
|
4255
|
+
size: z28.number(),
|
|
4208
4256
|
// Total size in bytes
|
|
4209
|
-
fileCount:
|
|
4257
|
+
fileCount: z28.number(),
|
|
4210
4258
|
createdAt: timestampSchema,
|
|
4211
4259
|
updatedAt: timestampSchema
|
|
4212
4260
|
});
|
|
4213
|
-
var volumeVersionSchema =
|
|
4214
|
-
id:
|
|
4261
|
+
var volumeVersionSchema = z28.object({
|
|
4262
|
+
id: z28.string(),
|
|
4215
4263
|
// SHA-256 content hash
|
|
4216
|
-
volumeId:
|
|
4217
|
-
size:
|
|
4264
|
+
volumeId: z28.string(),
|
|
4265
|
+
size: z28.number(),
|
|
4218
4266
|
// Size in bytes
|
|
4219
|
-
fileCount:
|
|
4220
|
-
message:
|
|
4267
|
+
fileCount: z28.number(),
|
|
4268
|
+
message: z28.string().nullable(),
|
|
4221
4269
|
// Optional commit message
|
|
4222
|
-
createdBy:
|
|
4270
|
+
createdBy: z28.string(),
|
|
4223
4271
|
createdAt: timestampSchema
|
|
4224
4272
|
});
|
|
4225
4273
|
var publicVolumeDetailSchema = publicVolumeSchema.extend({
|
|
@@ -4227,7 +4275,7 @@ var publicVolumeDetailSchema = publicVolumeSchema.extend({
|
|
|
4227
4275
|
});
|
|
4228
4276
|
var paginatedVolumesSchema = createPaginatedResponseSchema(publicVolumeSchema);
|
|
4229
4277
|
var paginatedVolumeVersionsSchema = createPaginatedResponseSchema(volumeVersionSchema);
|
|
4230
|
-
var publicVolumesListContract =
|
|
4278
|
+
var publicVolumesListContract = c24.router({
|
|
4231
4279
|
list: {
|
|
4232
4280
|
method: "GET",
|
|
4233
4281
|
path: "/v1/volumes",
|
|
@@ -4242,13 +4290,13 @@ var publicVolumesListContract = c23.router({
|
|
|
4242
4290
|
description: "List all volumes in the current scope with pagination"
|
|
4243
4291
|
}
|
|
4244
4292
|
});
|
|
4245
|
-
var publicVolumeByIdContract =
|
|
4293
|
+
var publicVolumeByIdContract = c24.router({
|
|
4246
4294
|
get: {
|
|
4247
4295
|
method: "GET",
|
|
4248
4296
|
path: "/v1/volumes/:id",
|
|
4249
4297
|
headers: authHeadersSchema,
|
|
4250
|
-
pathParams:
|
|
4251
|
-
id:
|
|
4298
|
+
pathParams: z28.object({
|
|
4299
|
+
id: z28.string().min(1, "Volume ID is required")
|
|
4252
4300
|
}),
|
|
4253
4301
|
responses: {
|
|
4254
4302
|
200: publicVolumeDetailSchema,
|
|
@@ -4260,13 +4308,13 @@ var publicVolumeByIdContract = c23.router({
|
|
|
4260
4308
|
description: "Get volume details by ID"
|
|
4261
4309
|
}
|
|
4262
4310
|
});
|
|
4263
|
-
var publicVolumeVersionsContract =
|
|
4311
|
+
var publicVolumeVersionsContract = c24.router({
|
|
4264
4312
|
list: {
|
|
4265
4313
|
method: "GET",
|
|
4266
4314
|
path: "/v1/volumes/:id/versions",
|
|
4267
4315
|
headers: authHeadersSchema,
|
|
4268
|
-
pathParams:
|
|
4269
|
-
id:
|
|
4316
|
+
pathParams: z28.object({
|
|
4317
|
+
id: z28.string().min(1, "Volume ID is required")
|
|
4270
4318
|
}),
|
|
4271
4319
|
query: listQuerySchema,
|
|
4272
4320
|
responses: {
|
|
@@ -4279,20 +4327,20 @@ var publicVolumeVersionsContract = c23.router({
|
|
|
4279
4327
|
description: "List all versions of a volume with pagination"
|
|
4280
4328
|
}
|
|
4281
4329
|
});
|
|
4282
|
-
var publicVolumeDownloadContract =
|
|
4330
|
+
var publicVolumeDownloadContract = c24.router({
|
|
4283
4331
|
download: {
|
|
4284
4332
|
method: "GET",
|
|
4285
4333
|
path: "/v1/volumes/:id/download",
|
|
4286
4334
|
headers: authHeadersSchema,
|
|
4287
|
-
pathParams:
|
|
4288
|
-
id:
|
|
4335
|
+
pathParams: z28.object({
|
|
4336
|
+
id: z28.string().min(1, "Volume ID is required")
|
|
4289
4337
|
}),
|
|
4290
|
-
query:
|
|
4291
|
-
versionId:
|
|
4338
|
+
query: z28.object({
|
|
4339
|
+
versionId: z28.string().optional()
|
|
4292
4340
|
// Defaults to current version
|
|
4293
4341
|
}),
|
|
4294
4342
|
responses: {
|
|
4295
|
-
302:
|
|
4343
|
+
302: z28.undefined(),
|
|
4296
4344
|
// Redirect to presigned URL
|
|
4297
4345
|
401: publicApiErrorSchema,
|
|
4298
4346
|
404: publicApiErrorSchema,
|
|
@@ -5002,9 +5050,30 @@ async function getUsage(options) {
|
|
|
5002
5050
|
return response.json();
|
|
5003
5051
|
}
|
|
5004
5052
|
|
|
5053
|
+
// src/lib/api/domains/user-preferences.ts
|
|
5054
|
+
import { initClient as initClient11 } from "@ts-rest/core";
|
|
5055
|
+
async function getUserPreferences() {
|
|
5056
|
+
const config = await getClientConfig();
|
|
5057
|
+
const client = initClient11(userPreferencesContract, config);
|
|
5058
|
+
const result = await client.get({ headers: {} });
|
|
5059
|
+
if (result.status === 200) {
|
|
5060
|
+
return result.body;
|
|
5061
|
+
}
|
|
5062
|
+
handleError(result, "Failed to get user preferences");
|
|
5063
|
+
}
|
|
5064
|
+
async function updateUserPreferences(body) {
|
|
5065
|
+
const config = await getClientConfig();
|
|
5066
|
+
const client = initClient11(userPreferencesContract, config);
|
|
5067
|
+
const result = await client.update({ body });
|
|
5068
|
+
if (result.status === 200) {
|
|
5069
|
+
return result.body;
|
|
5070
|
+
}
|
|
5071
|
+
handleError(result, "Failed to update user preferences");
|
|
5072
|
+
}
|
|
5073
|
+
|
|
5005
5074
|
// src/lib/domain/yaml-validator.ts
|
|
5006
|
-
import { z as
|
|
5007
|
-
var cliAgentNameSchema =
|
|
5075
|
+
import { z as z29 } from "zod";
|
|
5076
|
+
var cliAgentNameSchema = z29.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
|
|
5008
5077
|
/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?$/,
|
|
5009
5078
|
"Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
|
|
5010
5079
|
);
|
|
@@ -5019,7 +5088,7 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
|
|
|
5019
5088
|
const skillUrl = agent.skills[i];
|
|
5020
5089
|
if (skillUrl && !validateGitHubTreeUrl(skillUrl)) {
|
|
5021
5090
|
ctx.addIssue({
|
|
5022
|
-
code:
|
|
5091
|
+
code: z29.ZodIssueCode.custom,
|
|
5023
5092
|
message: `Invalid skill URL: ${skillUrl}. Expected format: https://github.com/{owner}/{repo}/tree/{branch}/{path}`,
|
|
5024
5093
|
path: ["skills", i]
|
|
5025
5094
|
});
|
|
@@ -5028,15 +5097,15 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
|
|
|
5028
5097
|
}
|
|
5029
5098
|
}
|
|
5030
5099
|
);
|
|
5031
|
-
var cliComposeSchema =
|
|
5032
|
-
version:
|
|
5033
|
-
agents:
|
|
5034
|
-
volumes:
|
|
5100
|
+
var cliComposeSchema = z29.object({
|
|
5101
|
+
version: z29.string().min(1, "Missing config.version"),
|
|
5102
|
+
agents: z29.record(cliAgentNameSchema, cliAgentDefinitionSchema),
|
|
5103
|
+
volumes: z29.record(z29.string(), volumeConfigSchema).optional()
|
|
5035
5104
|
}).superRefine((config, ctx) => {
|
|
5036
5105
|
const agentKeys = Object.keys(config.agents);
|
|
5037
5106
|
if (agentKeys.length === 0) {
|
|
5038
5107
|
ctx.addIssue({
|
|
5039
|
-
code:
|
|
5108
|
+
code: z29.ZodIssueCode.custom,
|
|
5040
5109
|
message: "agents must have at least one agent defined",
|
|
5041
5110
|
path: ["agents"]
|
|
5042
5111
|
});
|
|
@@ -5044,7 +5113,7 @@ var cliComposeSchema = z28.object({
|
|
|
5044
5113
|
}
|
|
5045
5114
|
if (agentKeys.length > 1) {
|
|
5046
5115
|
ctx.addIssue({
|
|
5047
|
-
code:
|
|
5116
|
+
code: z29.ZodIssueCode.custom,
|
|
5048
5117
|
message: "Multiple agents not supported yet. Only one agent allowed.",
|
|
5049
5118
|
path: ["agents"]
|
|
5050
5119
|
});
|
|
@@ -5056,7 +5125,7 @@ var cliComposeSchema = z28.object({
|
|
|
5056
5125
|
if (agentVolumes && agentVolumes.length > 0) {
|
|
5057
5126
|
if (!config.volumes) {
|
|
5058
5127
|
ctx.addIssue({
|
|
5059
|
-
code:
|
|
5128
|
+
code: z29.ZodIssueCode.custom,
|
|
5060
5129
|
message: "Agent references volumes but no volumes section defined. Each volume must have explicit name and version.",
|
|
5061
5130
|
path: ["volumes"]
|
|
5062
5131
|
});
|
|
@@ -5066,7 +5135,7 @@ var cliComposeSchema = z28.object({
|
|
|
5066
5135
|
const parts = volDeclaration.split(":");
|
|
5067
5136
|
if (parts.length !== 2) {
|
|
5068
5137
|
ctx.addIssue({
|
|
5069
|
-
code:
|
|
5138
|
+
code: z29.ZodIssueCode.custom,
|
|
5070
5139
|
message: `Invalid volume declaration: ${volDeclaration}. Expected format: volume-key:/mount/path`,
|
|
5071
5140
|
path: ["agents", agentName, "volumes"]
|
|
5072
5141
|
});
|
|
@@ -5075,7 +5144,7 @@ var cliComposeSchema = z28.object({
|
|
|
5075
5144
|
const volumeKey = parts[0].trim();
|
|
5076
5145
|
if (!config.volumes[volumeKey]) {
|
|
5077
5146
|
ctx.addIssue({
|
|
5078
|
-
code:
|
|
5147
|
+
code: z29.ZodIssueCode.custom,
|
|
5079
5148
|
message: `Volume "${volumeKey}" is not defined in volumes section. Each volume must have explicit name and version.`,
|
|
5080
5149
|
path: ["volumes", volumeKey]
|
|
5081
5150
|
});
|
|
@@ -6054,7 +6123,7 @@ async function checkAndPromptMissingItems(config, options) {
|
|
|
6054
6123
|
variablesResponse.variables.map((v) => v.name)
|
|
6055
6124
|
);
|
|
6056
6125
|
const connectorProvided = getConnectorProvidedSecretNames(
|
|
6057
|
-
connectorsResponse.connectors.map((
|
|
6126
|
+
connectorsResponse.connectors.map((c25) => c25.type)
|
|
6058
6127
|
);
|
|
6059
6128
|
const missingSecrets = [...requiredSecrets].filter(
|
|
6060
6129
|
(name) => !existingSecretNames.has(name) && !connectorProvided.has(name)
|
|
@@ -6265,7 +6334,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
6265
6334
|
options.autoUpdate = false;
|
|
6266
6335
|
}
|
|
6267
6336
|
if (options.autoUpdate !== false) {
|
|
6268
|
-
await startSilentUpgrade("9.
|
|
6337
|
+
await startSilentUpgrade("9.35.0");
|
|
6269
6338
|
}
|
|
6270
6339
|
try {
|
|
6271
6340
|
let result;
|
|
@@ -7051,9 +7120,9 @@ var CodexEventParser = class {
|
|
|
7051
7120
|
}
|
|
7052
7121
|
}
|
|
7053
7122
|
if (itemType === "file_change" && item.changes && item.changes.length > 0) {
|
|
7054
|
-
const changes = item.changes.map((
|
|
7055
|
-
const action =
|
|
7056
|
-
return `${action}: ${
|
|
7123
|
+
const changes = item.changes.map((c25) => {
|
|
7124
|
+
const action = c25.kind === "add" ? "Created" : c25.kind === "modify" ? "Modified" : "Deleted";
|
|
7125
|
+
return `${action}: ${c25.path}`;
|
|
7057
7126
|
}).join("\n");
|
|
7058
7127
|
return {
|
|
7059
7128
|
type: "text",
|
|
@@ -7207,9 +7276,9 @@ var CodexEventRenderer = class {
|
|
|
7207
7276
|
return;
|
|
7208
7277
|
}
|
|
7209
7278
|
if (itemType === "file_change" && item.changes && item.changes.length > 0) {
|
|
7210
|
-
const summary = item.changes.map((
|
|
7211
|
-
const icon =
|
|
7212
|
-
return `${icon}${
|
|
7279
|
+
const summary = item.changes.map((c25) => {
|
|
7280
|
+
const icon = c25.kind === "add" ? "+" : c25.kind === "delete" ? "-" : "~";
|
|
7281
|
+
return `${icon}${c25.path}`;
|
|
7213
7282
|
}).join(", ");
|
|
7214
7283
|
console.log(chalk11.green("[files]") + ` ${summary}`);
|
|
7215
7284
|
return;
|
|
@@ -7230,7 +7299,7 @@ var CodexEventRenderer = class {
|
|
|
7230
7299
|
};
|
|
7231
7300
|
|
|
7232
7301
|
// src/lib/api/api-client.ts
|
|
7233
|
-
import { initClient as
|
|
7302
|
+
import { initClient as initClient12 } from "@ts-rest/core";
|
|
7234
7303
|
var ApiClient = class {
|
|
7235
7304
|
async getHeaders() {
|
|
7236
7305
|
const token = await getToken();
|
|
@@ -7256,7 +7325,7 @@ var ApiClient = class {
|
|
|
7256
7325
|
async getComposeByName(name, scope) {
|
|
7257
7326
|
const baseUrl = await this.getBaseUrl();
|
|
7258
7327
|
const headers = await this.getHeaders();
|
|
7259
|
-
const client =
|
|
7328
|
+
const client = initClient12(composesMainContract, {
|
|
7260
7329
|
baseUrl,
|
|
7261
7330
|
baseHeaders: headers,
|
|
7262
7331
|
jsonQuery: false
|
|
@@ -7277,7 +7346,7 @@ var ApiClient = class {
|
|
|
7277
7346
|
async getComposeById(id) {
|
|
7278
7347
|
const baseUrl = await this.getBaseUrl();
|
|
7279
7348
|
const headers = await this.getHeaders();
|
|
7280
|
-
const client =
|
|
7349
|
+
const client = initClient12(composesByIdContract, {
|
|
7281
7350
|
baseUrl,
|
|
7282
7351
|
baseHeaders: headers,
|
|
7283
7352
|
jsonQuery: false
|
|
@@ -7299,7 +7368,7 @@ var ApiClient = class {
|
|
|
7299
7368
|
async getComposeVersion(composeId, version) {
|
|
7300
7369
|
const baseUrl = await this.getBaseUrl();
|
|
7301
7370
|
const headers = await this.getHeaders();
|
|
7302
|
-
const client =
|
|
7371
|
+
const client = initClient12(composesVersionsContract, {
|
|
7303
7372
|
baseUrl,
|
|
7304
7373
|
baseHeaders: headers,
|
|
7305
7374
|
jsonQuery: false
|
|
@@ -7320,7 +7389,7 @@ var ApiClient = class {
|
|
|
7320
7389
|
async createOrUpdateCompose(body) {
|
|
7321
7390
|
const baseUrl = await this.getBaseUrl();
|
|
7322
7391
|
const headers = await this.getHeaders();
|
|
7323
|
-
const client =
|
|
7392
|
+
const client = initClient12(composesMainContract, {
|
|
7324
7393
|
baseUrl,
|
|
7325
7394
|
baseHeaders: headers,
|
|
7326
7395
|
jsonQuery: false
|
|
@@ -7343,7 +7412,7 @@ var ApiClient = class {
|
|
|
7343
7412
|
async createRun(body) {
|
|
7344
7413
|
const baseUrl = await this.getBaseUrl();
|
|
7345
7414
|
const headers = await this.getHeaders();
|
|
7346
|
-
const client =
|
|
7415
|
+
const client = initClient12(runsMainContract, {
|
|
7347
7416
|
baseUrl,
|
|
7348
7417
|
baseHeaders: headers,
|
|
7349
7418
|
jsonQuery: false
|
|
@@ -7359,7 +7428,7 @@ var ApiClient = class {
|
|
|
7359
7428
|
async getEvents(runId, options) {
|
|
7360
7429
|
const baseUrl = await this.getBaseUrl();
|
|
7361
7430
|
const headers = await this.getHeaders();
|
|
7362
|
-
const client =
|
|
7431
|
+
const client = initClient12(runEventsContract, {
|
|
7363
7432
|
baseUrl,
|
|
7364
7433
|
baseHeaders: headers,
|
|
7365
7434
|
jsonQuery: false
|
|
@@ -7381,7 +7450,7 @@ var ApiClient = class {
|
|
|
7381
7450
|
async getSystemLog(runId, options) {
|
|
7382
7451
|
const baseUrl = await this.getBaseUrl();
|
|
7383
7452
|
const headers = await this.getHeaders();
|
|
7384
|
-
const client =
|
|
7453
|
+
const client = initClient12(runSystemLogContract, {
|
|
7385
7454
|
baseUrl,
|
|
7386
7455
|
baseHeaders: headers,
|
|
7387
7456
|
jsonQuery: false
|
|
@@ -7404,7 +7473,7 @@ var ApiClient = class {
|
|
|
7404
7473
|
async getMetrics(runId, options) {
|
|
7405
7474
|
const baseUrl = await this.getBaseUrl();
|
|
7406
7475
|
const headers = await this.getHeaders();
|
|
7407
|
-
const client =
|
|
7476
|
+
const client = initClient12(runMetricsContract, {
|
|
7408
7477
|
baseUrl,
|
|
7409
7478
|
baseHeaders: headers,
|
|
7410
7479
|
jsonQuery: false
|
|
@@ -7427,7 +7496,7 @@ var ApiClient = class {
|
|
|
7427
7496
|
async getAgentEvents(runId, options) {
|
|
7428
7497
|
const baseUrl = await this.getBaseUrl();
|
|
7429
7498
|
const headers = await this.getHeaders();
|
|
7430
|
-
const client =
|
|
7499
|
+
const client = initClient12(runAgentEventsContract, {
|
|
7431
7500
|
baseUrl,
|
|
7432
7501
|
baseHeaders: headers,
|
|
7433
7502
|
jsonQuery: false
|
|
@@ -7450,7 +7519,7 @@ var ApiClient = class {
|
|
|
7450
7519
|
async getNetworkLogs(runId, options) {
|
|
7451
7520
|
const baseUrl = await this.getBaseUrl();
|
|
7452
7521
|
const headers = await this.getHeaders();
|
|
7453
|
-
const client =
|
|
7522
|
+
const client = initClient12(runNetworkLogsContract, {
|
|
7454
7523
|
baseUrl,
|
|
7455
7524
|
baseHeaders: headers,
|
|
7456
7525
|
jsonQuery: false
|
|
@@ -7476,7 +7545,7 @@ var ApiClient = class {
|
|
|
7476
7545
|
async getScope() {
|
|
7477
7546
|
const baseUrl = await this.getBaseUrl();
|
|
7478
7547
|
const headers = await this.getHeaders();
|
|
7479
|
-
const client =
|
|
7548
|
+
const client = initClient12(scopeContract, {
|
|
7480
7549
|
baseUrl,
|
|
7481
7550
|
baseHeaders: headers,
|
|
7482
7551
|
jsonQuery: false
|
|
@@ -7495,7 +7564,7 @@ var ApiClient = class {
|
|
|
7495
7564
|
async createScope(body) {
|
|
7496
7565
|
const baseUrl = await this.getBaseUrl();
|
|
7497
7566
|
const headers = await this.getHeaders();
|
|
7498
|
-
const client =
|
|
7567
|
+
const client = initClient12(scopeContract, {
|
|
7499
7568
|
baseUrl,
|
|
7500
7569
|
baseHeaders: headers,
|
|
7501
7570
|
jsonQuery: false
|
|
@@ -7514,7 +7583,7 @@ var ApiClient = class {
|
|
|
7514
7583
|
async updateScope(body) {
|
|
7515
7584
|
const baseUrl = await this.getBaseUrl();
|
|
7516
7585
|
const headers = await this.getHeaders();
|
|
7517
|
-
const client =
|
|
7586
|
+
const client = initClient12(scopeContract, {
|
|
7518
7587
|
baseUrl,
|
|
7519
7588
|
baseHeaders: headers,
|
|
7520
7589
|
jsonQuery: false
|
|
@@ -7534,7 +7603,7 @@ var ApiClient = class {
|
|
|
7534
7603
|
async getSession(sessionId) {
|
|
7535
7604
|
const baseUrl = await this.getBaseUrl();
|
|
7536
7605
|
const headers = await this.getHeaders();
|
|
7537
|
-
const client =
|
|
7606
|
+
const client = initClient12(sessionsByIdContract, {
|
|
7538
7607
|
baseUrl,
|
|
7539
7608
|
baseHeaders: headers,
|
|
7540
7609
|
jsonQuery: false
|
|
@@ -7556,7 +7625,7 @@ var ApiClient = class {
|
|
|
7556
7625
|
async getCheckpoint(checkpointId) {
|
|
7557
7626
|
const baseUrl = await this.getBaseUrl();
|
|
7558
7627
|
const headers = await this.getHeaders();
|
|
7559
|
-
const client =
|
|
7628
|
+
const client = initClient12(checkpointsByIdContract, {
|
|
7560
7629
|
baseUrl,
|
|
7561
7630
|
baseHeaders: headers,
|
|
7562
7631
|
jsonQuery: false
|
|
@@ -7577,7 +7646,7 @@ var ApiClient = class {
|
|
|
7577
7646
|
async prepareStorage(body) {
|
|
7578
7647
|
const baseUrl = await this.getBaseUrl();
|
|
7579
7648
|
const headers = await this.getHeaders();
|
|
7580
|
-
const client =
|
|
7649
|
+
const client = initClient12(storagesPrepareContract, {
|
|
7581
7650
|
baseUrl,
|
|
7582
7651
|
baseHeaders: headers,
|
|
7583
7652
|
jsonQuery: false
|
|
@@ -7596,7 +7665,7 @@ var ApiClient = class {
|
|
|
7596
7665
|
async commitStorage(body) {
|
|
7597
7666
|
const baseUrl = await this.getBaseUrl();
|
|
7598
7667
|
const headers = await this.getHeaders();
|
|
7599
|
-
const client =
|
|
7668
|
+
const client = initClient12(storagesCommitContract, {
|
|
7600
7669
|
baseUrl,
|
|
7601
7670
|
baseHeaders: headers,
|
|
7602
7671
|
jsonQuery: false
|
|
@@ -7615,7 +7684,7 @@ var ApiClient = class {
|
|
|
7615
7684
|
async getStorageDownload(query) {
|
|
7616
7685
|
const baseUrl = await this.getBaseUrl();
|
|
7617
7686
|
const headers = await this.getHeaders();
|
|
7618
|
-
const client =
|
|
7687
|
+
const client = initClient12(storagesDownloadContract, {
|
|
7619
7688
|
baseUrl,
|
|
7620
7689
|
baseHeaders: headers,
|
|
7621
7690
|
jsonQuery: false
|
|
@@ -7640,7 +7709,7 @@ var ApiClient = class {
|
|
|
7640
7709
|
async listStorages(query) {
|
|
7641
7710
|
const baseUrl = await this.getBaseUrl();
|
|
7642
7711
|
const headers = await this.getHeaders();
|
|
7643
|
-
const client =
|
|
7712
|
+
const client = initClient12(storagesListContract, {
|
|
7644
7713
|
baseUrl,
|
|
7645
7714
|
baseHeaders: headers,
|
|
7646
7715
|
jsonQuery: false
|
|
@@ -7660,7 +7729,7 @@ var ApiClient = class {
|
|
|
7660
7729
|
async deploySchedule(body) {
|
|
7661
7730
|
const baseUrl = await this.getBaseUrl();
|
|
7662
7731
|
const headers = await this.getHeaders();
|
|
7663
|
-
const client =
|
|
7732
|
+
const client = initClient12(schedulesMainContract, {
|
|
7664
7733
|
baseUrl,
|
|
7665
7734
|
baseHeaders: headers,
|
|
7666
7735
|
jsonQuery: false
|
|
@@ -7679,7 +7748,7 @@ var ApiClient = class {
|
|
|
7679
7748
|
async listSchedules() {
|
|
7680
7749
|
const baseUrl = await this.getBaseUrl();
|
|
7681
7750
|
const headers = await this.getHeaders();
|
|
7682
|
-
const client =
|
|
7751
|
+
const client = initClient12(schedulesMainContract, {
|
|
7683
7752
|
baseUrl,
|
|
7684
7753
|
baseHeaders: headers,
|
|
7685
7754
|
jsonQuery: false
|
|
@@ -7698,7 +7767,7 @@ var ApiClient = class {
|
|
|
7698
7767
|
async getScheduleByName(params) {
|
|
7699
7768
|
const baseUrl = await this.getBaseUrl();
|
|
7700
7769
|
const headers = await this.getHeaders();
|
|
7701
|
-
const client =
|
|
7770
|
+
const client = initClient12(schedulesByNameContract, {
|
|
7702
7771
|
baseUrl,
|
|
7703
7772
|
baseHeaders: headers,
|
|
7704
7773
|
jsonQuery: false
|
|
@@ -7720,7 +7789,7 @@ var ApiClient = class {
|
|
|
7720
7789
|
async deleteSchedule(params) {
|
|
7721
7790
|
const baseUrl = await this.getBaseUrl();
|
|
7722
7791
|
const headers = await this.getHeaders();
|
|
7723
|
-
const client =
|
|
7792
|
+
const client = initClient12(schedulesByNameContract, {
|
|
7724
7793
|
baseUrl,
|
|
7725
7794
|
baseHeaders: headers,
|
|
7726
7795
|
jsonQuery: false
|
|
@@ -7742,7 +7811,7 @@ var ApiClient = class {
|
|
|
7742
7811
|
async enableSchedule(params) {
|
|
7743
7812
|
const baseUrl = await this.getBaseUrl();
|
|
7744
7813
|
const headers = await this.getHeaders();
|
|
7745
|
-
const client =
|
|
7814
|
+
const client = initClient12(schedulesEnableContract, {
|
|
7746
7815
|
baseUrl,
|
|
7747
7816
|
baseHeaders: headers,
|
|
7748
7817
|
jsonQuery: false
|
|
@@ -7764,7 +7833,7 @@ var ApiClient = class {
|
|
|
7764
7833
|
async disableSchedule(params) {
|
|
7765
7834
|
const baseUrl = await this.getBaseUrl();
|
|
7766
7835
|
const headers = await this.getHeaders();
|
|
7767
|
-
const client =
|
|
7836
|
+
const client = initClient12(schedulesEnableContract, {
|
|
7768
7837
|
baseUrl,
|
|
7769
7838
|
baseHeaders: headers,
|
|
7770
7839
|
jsonQuery: false
|
|
@@ -7786,7 +7855,7 @@ var ApiClient = class {
|
|
|
7786
7855
|
async listScheduleRuns(params) {
|
|
7787
7856
|
const baseUrl = await this.getBaseUrl();
|
|
7788
7857
|
const headers = await this.getHeaders();
|
|
7789
|
-
const client =
|
|
7858
|
+
const client = initClient12(scheduleRunsContract, {
|
|
7790
7859
|
baseUrl,
|
|
7791
7860
|
baseHeaders: headers,
|
|
7792
7861
|
jsonQuery: false
|
|
@@ -7811,7 +7880,7 @@ var ApiClient = class {
|
|
|
7811
7880
|
async listPublicAgents(query) {
|
|
7812
7881
|
const baseUrl = await this.getBaseUrl();
|
|
7813
7882
|
const headers = await this.getHeaders();
|
|
7814
|
-
const client =
|
|
7883
|
+
const client = initClient12(publicAgentsListContract, {
|
|
7815
7884
|
baseUrl,
|
|
7816
7885
|
baseHeaders: headers,
|
|
7817
7886
|
jsonQuery: false
|
|
@@ -7830,7 +7899,7 @@ var ApiClient = class {
|
|
|
7830
7899
|
async listPublicArtifacts(query) {
|
|
7831
7900
|
const baseUrl = await this.getBaseUrl();
|
|
7832
7901
|
const headers = await this.getHeaders();
|
|
7833
|
-
const client =
|
|
7902
|
+
const client = initClient12(publicArtifactsListContract, {
|
|
7834
7903
|
baseUrl,
|
|
7835
7904
|
baseHeaders: headers,
|
|
7836
7905
|
jsonQuery: false
|
|
@@ -7849,7 +7918,7 @@ var ApiClient = class {
|
|
|
7849
7918
|
async getPublicArtifact(id) {
|
|
7850
7919
|
const baseUrl = await this.getBaseUrl();
|
|
7851
7920
|
const headers = await this.getHeaders();
|
|
7852
|
-
const client =
|
|
7921
|
+
const client = initClient12(publicArtifactByIdContract, {
|
|
7853
7922
|
baseUrl,
|
|
7854
7923
|
baseHeaders: headers,
|
|
7855
7924
|
jsonQuery: false
|
|
@@ -7868,7 +7937,7 @@ var ApiClient = class {
|
|
|
7868
7937
|
async listPublicVolumes(query) {
|
|
7869
7938
|
const baseUrl = await this.getBaseUrl();
|
|
7870
7939
|
const headers = await this.getHeaders();
|
|
7871
|
-
const client =
|
|
7940
|
+
const client = initClient12(publicVolumesListContract, {
|
|
7872
7941
|
baseUrl,
|
|
7873
7942
|
baseHeaders: headers,
|
|
7874
7943
|
jsonQuery: false
|
|
@@ -7887,7 +7956,7 @@ var ApiClient = class {
|
|
|
7887
7956
|
async getPublicVolume(id) {
|
|
7888
7957
|
const baseUrl = await this.getBaseUrl();
|
|
7889
7958
|
const headers = await this.getHeaders();
|
|
7890
|
-
const client =
|
|
7959
|
+
const client = initClient12(publicVolumeByIdContract, {
|
|
7891
7960
|
baseUrl,
|
|
7892
7961
|
baseHeaders: headers,
|
|
7893
7962
|
jsonQuery: false
|
|
@@ -7926,7 +7995,7 @@ var ApiClient = class {
|
|
|
7926
7995
|
async listCredentials() {
|
|
7927
7996
|
const baseUrl = await this.getBaseUrl();
|
|
7928
7997
|
const headers = await this.getHeaders();
|
|
7929
|
-
const client =
|
|
7998
|
+
const client = initClient12(credentialsMainContract, {
|
|
7930
7999
|
baseUrl,
|
|
7931
8000
|
baseHeaders: headers,
|
|
7932
8001
|
jsonQuery: false
|
|
@@ -7945,7 +8014,7 @@ var ApiClient = class {
|
|
|
7945
8014
|
async getCredential(name) {
|
|
7946
8015
|
const baseUrl = await this.getBaseUrl();
|
|
7947
8016
|
const headers = await this.getHeaders();
|
|
7948
|
-
const client =
|
|
8017
|
+
const client = initClient12(credentialsByNameContract, {
|
|
7949
8018
|
baseUrl,
|
|
7950
8019
|
baseHeaders: headers,
|
|
7951
8020
|
jsonQuery: false
|
|
@@ -7966,7 +8035,7 @@ var ApiClient = class {
|
|
|
7966
8035
|
async setCredential(body) {
|
|
7967
8036
|
const baseUrl = await this.getBaseUrl();
|
|
7968
8037
|
const headers = await this.getHeaders();
|
|
7969
|
-
const client =
|
|
8038
|
+
const client = initClient12(credentialsMainContract, {
|
|
7970
8039
|
baseUrl,
|
|
7971
8040
|
baseHeaders: headers,
|
|
7972
8041
|
jsonQuery: false
|
|
@@ -7985,7 +8054,7 @@ var ApiClient = class {
|
|
|
7985
8054
|
async deleteCredential(name) {
|
|
7986
8055
|
const baseUrl = await this.getBaseUrl();
|
|
7987
8056
|
const headers = await this.getHeaders();
|
|
7988
|
-
const client =
|
|
8057
|
+
const client = initClient12(credentialsByNameContract, {
|
|
7989
8058
|
baseUrl,
|
|
7990
8059
|
baseHeaders: headers,
|
|
7991
8060
|
jsonQuery: false
|
|
@@ -8006,7 +8075,7 @@ var ApiClient = class {
|
|
|
8006
8075
|
async getRealtimeToken(runId) {
|
|
8007
8076
|
const baseUrl = await this.getBaseUrl();
|
|
8008
8077
|
const headers = await this.getHeaders();
|
|
8009
|
-
const client =
|
|
8078
|
+
const client = initClient12(realtimeTokenContract, {
|
|
8010
8079
|
baseUrl,
|
|
8011
8080
|
baseHeaders: headers,
|
|
8012
8081
|
jsonQuery: false
|
|
@@ -8462,7 +8531,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
8462
8531
|
async (identifier, prompt, options) => {
|
|
8463
8532
|
try {
|
|
8464
8533
|
if (options.autoUpdate !== false) {
|
|
8465
|
-
await startSilentUpgrade("9.
|
|
8534
|
+
await startSilentUpgrade("9.35.0");
|
|
8466
8535
|
}
|
|
8467
8536
|
const { scope, name, version } = parseIdentifier(identifier);
|
|
8468
8537
|
if (scope && !options.experimentalSharedAgent) {
|
|
@@ -10038,7 +10107,7 @@ var cookAction = new Command27().name("cook").description("Quick start: prepare,
|
|
|
10038
10107
|
).option("-y, --yes", "Skip confirmation prompts").option("-v, --verbose", "Show full tool inputs and outputs").addOption(new Option5("--debug-no-mock-claude").hideHelp()).addOption(new Option5("--no-auto-update").hideHelp()).action(
|
|
10039
10108
|
async (prompt, options) => {
|
|
10040
10109
|
if (options.autoUpdate !== false) {
|
|
10041
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
10110
|
+
const shouldExit = await checkAndUpgrade("9.35.0", prompt);
|
|
10042
10111
|
if (shouldExit) {
|
|
10043
10112
|
process.exit(0);
|
|
10044
10113
|
}
|
|
@@ -10264,6 +10333,32 @@ var cookCommand = cookAction;
|
|
|
10264
10333
|
// src/commands/logs/index.ts
|
|
10265
10334
|
import { Command as Command31 } from "commander";
|
|
10266
10335
|
import chalk37 from "chalk";
|
|
10336
|
+
|
|
10337
|
+
// src/lib/utils/paginate.ts
|
|
10338
|
+
async function paginate(options) {
|
|
10339
|
+
const { fetchPage, getTimestamp, targetCount, initialSince } = options;
|
|
10340
|
+
const collected = [];
|
|
10341
|
+
let since = initialSince;
|
|
10342
|
+
let hasMore = true;
|
|
10343
|
+
while (hasMore) {
|
|
10344
|
+
const response = await fetchPage(since);
|
|
10345
|
+
collected.push(...response.items);
|
|
10346
|
+
hasMore = response.hasMore;
|
|
10347
|
+
if (targetCount !== "all" && collected.length >= targetCount) {
|
|
10348
|
+
return collected.slice(0, targetCount);
|
|
10349
|
+
}
|
|
10350
|
+
if (response.items.length > 0) {
|
|
10351
|
+
const lastItem = response.items[response.items.length - 1];
|
|
10352
|
+
since = getTimestamp(lastItem);
|
|
10353
|
+
} else {
|
|
10354
|
+
hasMore = false;
|
|
10355
|
+
}
|
|
10356
|
+
}
|
|
10357
|
+
return collected;
|
|
10358
|
+
}
|
|
10359
|
+
|
|
10360
|
+
// src/commands/logs/index.ts
|
|
10361
|
+
var PAGE_LIMIT = 100;
|
|
10267
10362
|
function buildPlatformLogsUrl(apiUrl, runId) {
|
|
10268
10363
|
const url = new URL(apiUrl);
|
|
10269
10364
|
const hostname = url.hostname;
|
|
@@ -10359,13 +10454,20 @@ function getLogType(options) {
|
|
|
10359
10454
|
var logsCommand2 = new Command31().name("logs").description("View logs for an agent run").argument("<runId>", "Run ID to fetch logs for").option("-a, --agent", "Show agent events (default)").option("-s, --system", "Show system log").option("-m, --metrics", "Show metrics").option("-n, --network", "Show network logs (proxy traffic)").option(
|
|
10360
10455
|
"--since <time>",
|
|
10361
10456
|
"Show logs since timestamp (e.g., 5m, 2h, 1d, 2024-01-15T10:30:00Z, 1705312200)"
|
|
10362
|
-
).option("--tail <n>", "Show last N entries (default: 5
|
|
10457
|
+
).option("--tail <n>", "Show last N entries (default: 5)").option("--head <n>", "Show first N entries").option("--all", "Fetch all log entries").action(
|
|
10363
10458
|
async (runId, options) => {
|
|
10364
10459
|
try {
|
|
10365
10460
|
const logType = getLogType(options);
|
|
10366
|
-
|
|
10461
|
+
const countModes = [
|
|
10462
|
+
options.tail !== void 0,
|
|
10463
|
+
options.head !== void 0,
|
|
10464
|
+
options.all === true
|
|
10465
|
+
].filter(Boolean).length;
|
|
10466
|
+
if (countModes > 1) {
|
|
10367
10467
|
console.error(
|
|
10368
|
-
chalk37.red(
|
|
10468
|
+
chalk37.red(
|
|
10469
|
+
"Options --tail, --head, and --all are mutually exclusive"
|
|
10470
|
+
)
|
|
10369
10471
|
);
|
|
10370
10472
|
process.exit(1);
|
|
10371
10473
|
}
|
|
@@ -10373,26 +10475,38 @@ var logsCommand2 = new Command31().name("logs").description("View logs for an ag
|
|
|
10373
10475
|
if (options.since) {
|
|
10374
10476
|
since = parseTime(options.since);
|
|
10375
10477
|
}
|
|
10478
|
+
const isAll = options.all === true;
|
|
10376
10479
|
const isHead = options.head !== void 0;
|
|
10377
|
-
const
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10480
|
+
const isTail = options.tail !== void 0;
|
|
10481
|
+
let targetCount;
|
|
10482
|
+
if (isAll) {
|
|
10483
|
+
targetCount = "all";
|
|
10484
|
+
} else if (isHead) {
|
|
10485
|
+
targetCount = Math.max(1, parseInt(options.head, 10));
|
|
10486
|
+
} else if (isTail) {
|
|
10487
|
+
targetCount = Math.max(1, parseInt(options.tail, 10));
|
|
10488
|
+
} else {
|
|
10489
|
+
targetCount = 5;
|
|
10490
|
+
}
|
|
10381
10491
|
const order = isHead ? "asc" : "desc";
|
|
10382
10492
|
const apiUrl = await getApiUrl();
|
|
10383
10493
|
const platformUrl = buildPlatformLogsUrl(apiUrl, runId);
|
|
10384
10494
|
switch (logType) {
|
|
10385
10495
|
case "agent":
|
|
10386
|
-
await showAgentEvents(
|
|
10496
|
+
await showAgentEvents(
|
|
10497
|
+
runId,
|
|
10498
|
+
{ since, targetCount, order },
|
|
10499
|
+
platformUrl
|
|
10500
|
+
);
|
|
10387
10501
|
break;
|
|
10388
10502
|
case "system":
|
|
10389
|
-
await showSystemLog(runId, { since,
|
|
10503
|
+
await showSystemLog(runId, { since, targetCount, order });
|
|
10390
10504
|
break;
|
|
10391
10505
|
case "metrics":
|
|
10392
|
-
await showMetrics(runId, { since,
|
|
10506
|
+
await showMetrics(runId, { since, targetCount, order });
|
|
10393
10507
|
break;
|
|
10394
10508
|
case "network":
|
|
10395
|
-
await showNetworkLogs(runId, { since,
|
|
10509
|
+
await showNetworkLogs(runId, { since, targetCount, order });
|
|
10396
10510
|
break;
|
|
10397
10511
|
}
|
|
10398
10512
|
} catch (error) {
|
|
@@ -10402,62 +10516,106 @@ var logsCommand2 = new Command31().name("logs").description("View logs for an ag
|
|
|
10402
10516
|
}
|
|
10403
10517
|
);
|
|
10404
10518
|
async function showAgentEvents(runId, options, platformUrl) {
|
|
10405
|
-
const
|
|
10406
|
-
|
|
10519
|
+
const firstResponse = await apiClient.getAgentEvents(runId, {
|
|
10520
|
+
since: options.since,
|
|
10521
|
+
limit: PAGE_LIMIT,
|
|
10522
|
+
order: options.order
|
|
10523
|
+
});
|
|
10524
|
+
if (firstResponse.events.length === 0) {
|
|
10407
10525
|
console.log(chalk37.yellow("No agent events found for this run"));
|
|
10408
10526
|
return;
|
|
10409
10527
|
}
|
|
10410
|
-
const
|
|
10528
|
+
const framework = firstResponse.framework;
|
|
10529
|
+
let allEvents;
|
|
10530
|
+
if (!firstResponse.hasMore || options.targetCount !== "all" && firstResponse.events.length >= options.targetCount) {
|
|
10531
|
+
allEvents = options.targetCount === "all" ? firstResponse.events : firstResponse.events.slice(0, options.targetCount);
|
|
10532
|
+
} else {
|
|
10533
|
+
const lastEvent = firstResponse.events[firstResponse.events.length - 1];
|
|
10534
|
+
const firstPageTimestamp = lastEvent ? new Date(lastEvent.createdAt).getTime() : void 0;
|
|
10535
|
+
const remainingEvents = await paginate({
|
|
10536
|
+
fetchPage: async (since) => {
|
|
10537
|
+
const response = await apiClient.getAgentEvents(runId, {
|
|
10538
|
+
since,
|
|
10539
|
+
limit: PAGE_LIMIT,
|
|
10540
|
+
order: options.order
|
|
10541
|
+
});
|
|
10542
|
+
return { items: response.events, hasMore: response.hasMore };
|
|
10543
|
+
},
|
|
10544
|
+
getTimestamp: (event) => new Date(event.createdAt).getTime(),
|
|
10545
|
+
targetCount: options.targetCount === "all" ? "all" : options.targetCount - firstResponse.events.length,
|
|
10546
|
+
initialSince: firstPageTimestamp
|
|
10547
|
+
});
|
|
10548
|
+
allEvents = [...firstResponse.events, ...remainingEvents];
|
|
10549
|
+
if (options.targetCount !== "all" && allEvents.length > options.targetCount) {
|
|
10550
|
+
allEvents = allEvents.slice(0, options.targetCount);
|
|
10551
|
+
}
|
|
10552
|
+
}
|
|
10553
|
+
const events = options.order === "desc" ? [...allEvents].reverse() : allEvents;
|
|
10411
10554
|
const renderer = createLogRenderer(true);
|
|
10412
10555
|
for (const event of events) {
|
|
10413
|
-
renderAgentEvent(event,
|
|
10414
|
-
}
|
|
10415
|
-
if (response.hasMore) {
|
|
10416
|
-
console.log();
|
|
10417
|
-
console.log(
|
|
10418
|
-
chalk37.dim(
|
|
10419
|
-
`Showing ${response.events.length} events. Use --tail to see more.`
|
|
10420
|
-
)
|
|
10421
|
-
);
|
|
10556
|
+
renderAgentEvent(event, framework, renderer);
|
|
10422
10557
|
}
|
|
10423
10558
|
console.log(chalk37.dim(`View on platform: ${platformUrl}`));
|
|
10424
10559
|
}
|
|
10425
10560
|
async function showSystemLog(runId, options) {
|
|
10426
|
-
const
|
|
10561
|
+
const limit = options.targetCount === "all" ? PAGE_LIMIT : Math.min(options.targetCount, PAGE_LIMIT);
|
|
10562
|
+
const response = await apiClient.getSystemLog(runId, {
|
|
10563
|
+
since: options.since,
|
|
10564
|
+
limit,
|
|
10565
|
+
order: options.order
|
|
10566
|
+
});
|
|
10427
10567
|
if (!response.systemLog) {
|
|
10428
10568
|
console.log(chalk37.yellow("No system log found for this run"));
|
|
10429
10569
|
return;
|
|
10430
10570
|
}
|
|
10431
10571
|
console.log(response.systemLog);
|
|
10432
|
-
if (response.hasMore) {
|
|
10433
|
-
console.log();
|
|
10434
|
-
console.log(
|
|
10435
|
-
chalk37.dim("More log entries available. Use --tail to see more.")
|
|
10436
|
-
);
|
|
10437
|
-
}
|
|
10438
10572
|
}
|
|
10439
10573
|
async function showMetrics(runId, options) {
|
|
10440
|
-
const
|
|
10441
|
-
|
|
10574
|
+
const firstResponse = await apiClient.getMetrics(runId, {
|
|
10575
|
+
since: options.since,
|
|
10576
|
+
limit: PAGE_LIMIT,
|
|
10577
|
+
order: options.order
|
|
10578
|
+
});
|
|
10579
|
+
if (firstResponse.metrics.length === 0) {
|
|
10442
10580
|
console.log(chalk37.yellow("No metrics found for this run"));
|
|
10443
10581
|
return;
|
|
10444
10582
|
}
|
|
10445
|
-
|
|
10583
|
+
let allMetrics;
|
|
10584
|
+
if (!firstResponse.hasMore || options.targetCount !== "all" && firstResponse.metrics.length >= options.targetCount) {
|
|
10585
|
+
allMetrics = options.targetCount === "all" ? firstResponse.metrics : firstResponse.metrics.slice(0, options.targetCount);
|
|
10586
|
+
} else {
|
|
10587
|
+
const lastMetric = firstResponse.metrics[firstResponse.metrics.length - 1];
|
|
10588
|
+
const firstPageTimestamp = lastMetric ? new Date(lastMetric.ts).getTime() : void 0;
|
|
10589
|
+
const remainingMetrics = await paginate({
|
|
10590
|
+
fetchPage: async (since) => {
|
|
10591
|
+
const response = await apiClient.getMetrics(runId, {
|
|
10592
|
+
since,
|
|
10593
|
+
limit: PAGE_LIMIT,
|
|
10594
|
+
order: options.order
|
|
10595
|
+
});
|
|
10596
|
+
return { items: response.metrics, hasMore: response.hasMore };
|
|
10597
|
+
},
|
|
10598
|
+
getTimestamp: (metric) => new Date(metric.ts).getTime(),
|
|
10599
|
+
targetCount: options.targetCount === "all" ? "all" : options.targetCount - firstResponse.metrics.length,
|
|
10600
|
+
initialSince: firstPageTimestamp
|
|
10601
|
+
});
|
|
10602
|
+
allMetrics = [...firstResponse.metrics, ...remainingMetrics];
|
|
10603
|
+
if (options.targetCount !== "all" && allMetrics.length > options.targetCount) {
|
|
10604
|
+
allMetrics = allMetrics.slice(0, options.targetCount);
|
|
10605
|
+
}
|
|
10606
|
+
}
|
|
10607
|
+
const metrics = options.order === "desc" ? [...allMetrics].reverse() : allMetrics;
|
|
10446
10608
|
for (const metric of metrics) {
|
|
10447
10609
|
console.log(formatMetric(metric));
|
|
10448
10610
|
}
|
|
10449
|
-
if (response.hasMore) {
|
|
10450
|
-
console.log();
|
|
10451
|
-
console.log(
|
|
10452
|
-
chalk37.dim(
|
|
10453
|
-
`Showing ${response.metrics.length} metrics. Use --tail to see more.`
|
|
10454
|
-
)
|
|
10455
|
-
);
|
|
10456
|
-
}
|
|
10457
10611
|
}
|
|
10458
10612
|
async function showNetworkLogs(runId, options) {
|
|
10459
|
-
const
|
|
10460
|
-
|
|
10613
|
+
const firstResponse = await apiClient.getNetworkLogs(runId, {
|
|
10614
|
+
since: options.since,
|
|
10615
|
+
limit: PAGE_LIMIT,
|
|
10616
|
+
order: options.order
|
|
10617
|
+
});
|
|
10618
|
+
if (firstResponse.networkLogs.length === 0) {
|
|
10461
10619
|
console.log(
|
|
10462
10620
|
chalk37.yellow(
|
|
10463
10621
|
"No network logs found for this run. Network logs are only captured when experimental_firewall is enabled on an experimental_runner"
|
|
@@ -10465,18 +10623,34 @@ async function showNetworkLogs(runId, options) {
|
|
|
10465
10623
|
);
|
|
10466
10624
|
return;
|
|
10467
10625
|
}
|
|
10468
|
-
|
|
10626
|
+
let allNetworkLogs;
|
|
10627
|
+
if (!firstResponse.hasMore || options.targetCount !== "all" && firstResponse.networkLogs.length >= options.targetCount) {
|
|
10628
|
+
allNetworkLogs = options.targetCount === "all" ? firstResponse.networkLogs : firstResponse.networkLogs.slice(0, options.targetCount);
|
|
10629
|
+
} else {
|
|
10630
|
+
const lastLog = firstResponse.networkLogs[firstResponse.networkLogs.length - 1];
|
|
10631
|
+
const firstPageTimestamp = lastLog ? new Date(lastLog.timestamp).getTime() : void 0;
|
|
10632
|
+
const remainingLogs = await paginate({
|
|
10633
|
+
fetchPage: async (since) => {
|
|
10634
|
+
const response = await apiClient.getNetworkLogs(runId, {
|
|
10635
|
+
since,
|
|
10636
|
+
limit: PAGE_LIMIT,
|
|
10637
|
+
order: options.order
|
|
10638
|
+
});
|
|
10639
|
+
return { items: response.networkLogs, hasMore: response.hasMore };
|
|
10640
|
+
},
|
|
10641
|
+
getTimestamp: (entry) => new Date(entry.timestamp).getTime(),
|
|
10642
|
+
targetCount: options.targetCount === "all" ? "all" : options.targetCount - firstResponse.networkLogs.length,
|
|
10643
|
+
initialSince: firstPageTimestamp
|
|
10644
|
+
});
|
|
10645
|
+
allNetworkLogs = [...firstResponse.networkLogs, ...remainingLogs];
|
|
10646
|
+
if (options.targetCount !== "all" && allNetworkLogs.length > options.targetCount) {
|
|
10647
|
+
allNetworkLogs = allNetworkLogs.slice(0, options.targetCount);
|
|
10648
|
+
}
|
|
10649
|
+
}
|
|
10650
|
+
const networkLogs = options.order === "desc" ? [...allNetworkLogs].reverse() : allNetworkLogs;
|
|
10469
10651
|
for (const entry of networkLogs) {
|
|
10470
10652
|
console.log(formatNetworkLog(entry));
|
|
10471
10653
|
}
|
|
10472
|
-
if (response.hasMore) {
|
|
10473
|
-
console.log();
|
|
10474
|
-
console.log(
|
|
10475
|
-
chalk37.dim(
|
|
10476
|
-
`Showing ${response.networkLogs.length} network logs. Use --tail to see more.`
|
|
10477
|
-
)
|
|
10478
|
-
);
|
|
10479
|
-
}
|
|
10480
10654
|
}
|
|
10481
10655
|
function handleError2(error, runId) {
|
|
10482
10656
|
if (error instanceof Error) {
|
|
@@ -10790,7 +10964,7 @@ var listCommand4 = new Command37().name("list").alias("ls").description("List al
|
|
|
10790
10964
|
);
|
|
10791
10965
|
return;
|
|
10792
10966
|
}
|
|
10793
|
-
const nameWidth = Math.max(4, ...data.composes.map((
|
|
10967
|
+
const nameWidth = Math.max(4, ...data.composes.map((c25) => c25.name.length));
|
|
10794
10968
|
const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
|
|
10795
10969
|
" "
|
|
10796
10970
|
);
|
|
@@ -11700,7 +11874,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
|
|
|
11700
11874
|
);
|
|
11701
11875
|
process.exit(1);
|
|
11702
11876
|
}
|
|
11703
|
-
const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((
|
|
11877
|
+
const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c25) => c25.value === existingFrequency) : 0;
|
|
11704
11878
|
frequency = await promptSelect(
|
|
11705
11879
|
"Schedule frequency",
|
|
11706
11880
|
FREQUENCY_CHOICES,
|
|
@@ -11729,7 +11903,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
|
|
|
11729
11903
|
process.exit(1);
|
|
11730
11904
|
}
|
|
11731
11905
|
if (frequency === "weekly") {
|
|
11732
|
-
const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((
|
|
11906
|
+
const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c25) => c25.value === existingDay) : 0;
|
|
11733
11907
|
const day2 = await promptSelect(
|
|
11734
11908
|
"Day of week",
|
|
11735
11909
|
DAY_OF_WEEK_CHOICES,
|
|
@@ -11811,11 +11985,17 @@ async function gatherOneTimeSchedule(optionDay, optionTime, existingTime) {
|
|
|
11811
11985
|
}
|
|
11812
11986
|
async function gatherTimezone(optionTimezone, existingTimezone) {
|
|
11813
11987
|
if (optionTimezone) return optionTimezone;
|
|
11814
|
-
|
|
11988
|
+
let userTimezone = null;
|
|
11989
|
+
try {
|
|
11990
|
+
const prefs = await getUserPreferences();
|
|
11991
|
+
userTimezone = prefs.timezone;
|
|
11992
|
+
} catch {
|
|
11993
|
+
}
|
|
11994
|
+
const defaultTimezone = userTimezone || detectTimezone();
|
|
11815
11995
|
if (!isInteractive()) {
|
|
11816
|
-
return
|
|
11996
|
+
return defaultTimezone;
|
|
11817
11997
|
}
|
|
11818
|
-
return await promptText("Timezone", existingTimezone ||
|
|
11998
|
+
return await promptText("Timezone", existingTimezone || defaultTimezone);
|
|
11819
11999
|
}
|
|
11820
12000
|
async function gatherPromptText(optionPrompt, existingPrompt) {
|
|
11821
12001
|
if (optionPrompt) return optionPrompt;
|
|
@@ -13426,7 +13606,7 @@ import { Command as Command71 } from "commander";
|
|
|
13426
13606
|
// src/commands/connector/connect.ts
|
|
13427
13607
|
import { Command as Command67 } from "commander";
|
|
13428
13608
|
import chalk67 from "chalk";
|
|
13429
|
-
import { initClient as
|
|
13609
|
+
import { initClient as initClient13 } from "@ts-rest/core";
|
|
13430
13610
|
function delay2(ms) {
|
|
13431
13611
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
13432
13612
|
}
|
|
@@ -13456,7 +13636,7 @@ var connectCommand = new Command67().name("connect").description("Connect a thir
|
|
|
13456
13636
|
const apiUrl = await getApiUrl();
|
|
13457
13637
|
const headers = await getHeaders2();
|
|
13458
13638
|
console.log(`Connecting ${chalk67.cyan(type2)}...`);
|
|
13459
|
-
const sessionsClient =
|
|
13639
|
+
const sessionsClient = initClient13(connectorSessionsContract, {
|
|
13460
13640
|
baseUrl: apiUrl,
|
|
13461
13641
|
baseHeaders: headers,
|
|
13462
13642
|
jsonQuery: false
|
|
@@ -13482,7 +13662,7 @@ To connect, visit: ${verificationUrl}`));
|
|
|
13482
13662
|
The session expires in ${Math.floor(session.expiresIn / 60)} minutes.`
|
|
13483
13663
|
);
|
|
13484
13664
|
console.log("\nWaiting for authorization...");
|
|
13485
|
-
const sessionClient =
|
|
13665
|
+
const sessionClient = initClient13(connectorSessionByIdContract, {
|
|
13486
13666
|
baseUrl: apiUrl,
|
|
13487
13667
|
baseHeaders: headers,
|
|
13488
13668
|
jsonQuery: false
|
|
@@ -13555,7 +13735,7 @@ import chalk68 from "chalk";
|
|
|
13555
13735
|
var listCommand9 = new Command68().name("list").alias("ls").description("List all connectors and their status").action(
|
|
13556
13736
|
withErrorHandler(async () => {
|
|
13557
13737
|
const result = await listConnectors();
|
|
13558
|
-
const connectedMap = new Map(result.connectors.map((
|
|
13738
|
+
const connectedMap = new Map(result.connectors.map((c25) => [c25.type, c25]));
|
|
13559
13739
|
const allTypes = Object.keys(CONNECTOR_TYPES);
|
|
13560
13740
|
const typeWidth = Math.max(4, ...allTypes.map((t) => t.length));
|
|
13561
13741
|
const statusText = "STATUS";
|
|
@@ -14104,16 +14284,16 @@ async function handleModelProvider(ctx) {
|
|
|
14104
14284
|
const providerType = await step.prompt(
|
|
14105
14285
|
() => promptSelect(
|
|
14106
14286
|
"Select provider type:",
|
|
14107
|
-
choices.map((
|
|
14108
|
-
title:
|
|
14109
|
-
value:
|
|
14287
|
+
choices.map((c25) => ({
|
|
14288
|
+
title: c25.label,
|
|
14289
|
+
value: c25.type
|
|
14110
14290
|
}))
|
|
14111
14291
|
)
|
|
14112
14292
|
);
|
|
14113
14293
|
if (!providerType) {
|
|
14114
14294
|
process.exit(0);
|
|
14115
14295
|
}
|
|
14116
|
-
const selectedChoice = choices.find((
|
|
14296
|
+
const selectedChoice = choices.find((c25) => c25.type === providerType);
|
|
14117
14297
|
if (selectedChoice?.helpText) {
|
|
14118
14298
|
for (const line of selectedChoice.helpText.split("\n")) {
|
|
14119
14299
|
step.detail(chalk74.dim(line));
|
|
@@ -14343,7 +14523,7 @@ import { Command as Command76 } from "commander";
|
|
|
14343
14523
|
// src/commands/dev-tool/compose.ts
|
|
14344
14524
|
import { Command as Command75 } from "commander";
|
|
14345
14525
|
import chalk77 from "chalk";
|
|
14346
|
-
import { initClient as
|
|
14526
|
+
import { initClient as initClient14 } from "@ts-rest/core";
|
|
14347
14527
|
function sleep2(ms) {
|
|
14348
14528
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
14349
14529
|
}
|
|
@@ -14352,7 +14532,7 @@ function timestamp() {
|
|
|
14352
14532
|
}
|
|
14353
14533
|
async function createComposeJob(githubUrl, overwrite) {
|
|
14354
14534
|
const config = await getClientConfig();
|
|
14355
|
-
const client =
|
|
14535
|
+
const client = initClient14(composeJobsMainContract, config);
|
|
14356
14536
|
const result = await client.create({
|
|
14357
14537
|
body: { githubUrl, overwrite }
|
|
14358
14538
|
});
|
|
@@ -14369,7 +14549,7 @@ async function createComposeJob(githubUrl, overwrite) {
|
|
|
14369
14549
|
}
|
|
14370
14550
|
async function getComposeJobStatus(jobId) {
|
|
14371
14551
|
const config = await getClientConfig();
|
|
14372
|
-
const client =
|
|
14552
|
+
const client = initClient14(composeJobsByIdContract, config);
|
|
14373
14553
|
const result = await client.getById({
|
|
14374
14554
|
params: { jobId }
|
|
14375
14555
|
});
|
|
@@ -14498,9 +14678,74 @@ function displayResult(job) {
|
|
|
14498
14678
|
// src/commands/dev-tool/index.ts
|
|
14499
14679
|
var devToolCommand = new Command76().name("dev-tool").description("Developer tools for testing and debugging").addCommand(composeCommand2);
|
|
14500
14680
|
|
|
14681
|
+
// src/commands/timezone/index.ts
|
|
14682
|
+
import { Command as Command77 } from "commander";
|
|
14683
|
+
import chalk78 from "chalk";
|
|
14684
|
+
function detectTimezone2() {
|
|
14685
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
14686
|
+
}
|
|
14687
|
+
function isValidTimezone(timezone) {
|
|
14688
|
+
try {
|
|
14689
|
+
Intl.DateTimeFormat(void 0, { timeZone: timezone });
|
|
14690
|
+
return true;
|
|
14691
|
+
} catch {
|
|
14692
|
+
return false;
|
|
14693
|
+
}
|
|
14694
|
+
}
|
|
14695
|
+
var timezoneCommand = new Command77().name("timezone").description("View or set your timezone preference").argument("[timezone]", "IANA timezone to set (e.g., America/New_York)").action(
|
|
14696
|
+
withErrorHandler(async (timezone) => {
|
|
14697
|
+
if (timezone) {
|
|
14698
|
+
if (!isValidTimezone(timezone)) {
|
|
14699
|
+
console.error(chalk78.red(`\u2717 Invalid timezone: ${timezone}`));
|
|
14700
|
+
console.error(
|
|
14701
|
+
chalk78.dim(
|
|
14702
|
+
" Use an IANA timezone identifier (e.g., America/New_York, Asia/Shanghai)"
|
|
14703
|
+
)
|
|
14704
|
+
);
|
|
14705
|
+
process.exit(1);
|
|
14706
|
+
}
|
|
14707
|
+
const result = await updateUserPreferences({ timezone });
|
|
14708
|
+
console.log(chalk78.green(`\u2713 Timezone set to ${chalk78.cyan(timezone)}`));
|
|
14709
|
+
if (result.timezone !== timezone) {
|
|
14710
|
+
console.log(chalk78.dim(` (Server returned: ${result.timezone})`));
|
|
14711
|
+
}
|
|
14712
|
+
return;
|
|
14713
|
+
}
|
|
14714
|
+
const prefs = await getUserPreferences();
|
|
14715
|
+
if (prefs.timezone) {
|
|
14716
|
+
console.log(`Current timezone: ${chalk78.cyan(prefs.timezone)}`);
|
|
14717
|
+
} else {
|
|
14718
|
+
const detectedTz = detectTimezone2();
|
|
14719
|
+
console.log(chalk78.dim("No timezone preference set."));
|
|
14720
|
+
console.log(chalk78.dim(`System timezone detected: ${detectedTz}`));
|
|
14721
|
+
if (isInteractive()) {
|
|
14722
|
+
const setNow = await promptText(
|
|
14723
|
+
"Would you like to set it now? (enter timezone or leave empty to skip)",
|
|
14724
|
+
detectedTz
|
|
14725
|
+
);
|
|
14726
|
+
if (setNow && setNow.trim()) {
|
|
14727
|
+
const tz = setNow.trim();
|
|
14728
|
+
if (!isValidTimezone(tz)) {
|
|
14729
|
+
console.error(chalk78.red(`\u2717 Invalid timezone: ${tz}`));
|
|
14730
|
+
process.exit(1);
|
|
14731
|
+
}
|
|
14732
|
+
await updateUserPreferences({ timezone: tz });
|
|
14733
|
+
console.log(chalk78.green(`\u2713 Timezone set to ${chalk78.cyan(tz)}`));
|
|
14734
|
+
}
|
|
14735
|
+
} else {
|
|
14736
|
+
console.log();
|
|
14737
|
+
console.log(
|
|
14738
|
+
`To set your timezone: ${chalk78.cyan("vm0 timezone <timezone>")}`
|
|
14739
|
+
);
|
|
14740
|
+
console.log(chalk78.dim("Example: vm0 timezone America/New_York"));
|
|
14741
|
+
}
|
|
14742
|
+
}
|
|
14743
|
+
})
|
|
14744
|
+
);
|
|
14745
|
+
|
|
14501
14746
|
// src/index.ts
|
|
14502
|
-
var program = new
|
|
14503
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
14747
|
+
var program = new Command78();
|
|
14748
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.35.0");
|
|
14504
14749
|
program.addCommand(authCommand);
|
|
14505
14750
|
program.addCommand(infoCommand);
|
|
14506
14751
|
program.addCommand(composeCommand);
|
|
@@ -14521,6 +14766,7 @@ program.addCommand(connectorCommand);
|
|
|
14521
14766
|
program.addCommand(onboardCommand);
|
|
14522
14767
|
program.addCommand(setupClaudeCommand);
|
|
14523
14768
|
program.addCommand(dashboardCommand);
|
|
14769
|
+
program.addCommand(timezoneCommand);
|
|
14524
14770
|
program.addCommand(devToolCommand, { hidden: true });
|
|
14525
14771
|
if (process.argv[1]?.endsWith("index.js") || process.argv[1]?.endsWith("index.ts") || process.argv[1]?.endsWith("vm0")) {
|
|
14526
14772
|
program.parse();
|