@vm0/cli 9.34.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.
Files changed (2) hide show
  1. package/index.js +372 -231
  2. 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.34.0",
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.34.0",
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 Command77 } from "commander";
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.34.0"}`));
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: ["GLM-4.7", "GLM-4.5-Air"],
2636
- defaultModel: "GLM-4.7"
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/public/agents.ts
3782
+ // ../../packages/core/src/contracts/user-preferences.ts
3779
3783
  import { z as z24 } from "zod";
3780
3784
  var c20 = initContract();
3781
- var publicAgentSchema = z24.object({
3782
- id: z24.string(),
3783
- name: z24.string(),
3784
- currentVersionId: z24.string().nullable(),
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 = z24.object({
3789
- id: z24.string(),
3790
- agentId: z24.string(),
3791
- versionNumber: z24.number(),
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: z24.string().optional()
3846
+ name: z25.string().optional()
3799
3847
  });
3800
- var publicAgentsListContract = c20.router({
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 = c20.router({
3863
+ var publicAgentByIdContract = c21.router({
3816
3864
  get: {
3817
3865
  method: "GET",
3818
3866
  path: "/v1/agents/:id",
3819
3867
  headers: authHeadersSchema,
3820
- pathParams: z24.object({
3821
- id: z24.string().min(1, "Agent ID is required")
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 = c20.router({
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: z24.object({
3839
- id: z24.string().min(1, "Agent ID is required")
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 z25 } from "zod";
3855
- var c21 = initContract();
3856
- var publicRunStatusSchema = z25.enum([
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 = z25.object({
3865
- id: z25.string(),
3866
- agentId: z25.string(),
3867
- agentName: z25.string(),
3912
+ var publicRunSchema = z26.object({
3913
+ id: z26.string(),
3914
+ agentId: z26.string(),
3915
+ agentName: z26.string(),
3868
3916
  status: publicRunStatusSchema,
3869
- prompt: z25.string(),
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: z25.string().nullable(),
3876
- executionTimeMs: z25.number().nullable(),
3877
- checkpointId: z25.string().nullable(),
3878
- sessionId: z25.string().nullable(),
3879
- artifactName: z25.string().nullable(),
3880
- artifactVersion: z25.string().nullable(),
3881
- volumes: z25.record(z25.string(), z25.string()).optional()
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 = z25.object({
3932
+ var createRunRequestSchema = z26.object({
3885
3933
  // Agent identification (one of: agent, agentId, sessionId, checkpointId)
3886
- agent: z25.string().optional(),
3934
+ agent: z26.string().optional(),
3887
3935
  // Agent name
3888
- agentId: z25.string().optional(),
3936
+ agentId: z26.string().optional(),
3889
3937
  // Agent ID
3890
- agentVersion: z25.string().optional(),
3938
+ agentVersion: z26.string().optional(),
3891
3939
  // Version specifier (e.g., "latest", "v1", specific ID)
3892
3940
  // Continue session
3893
- sessionId: z25.string().optional(),
3941
+ sessionId: z26.string().optional(),
3894
3942
  // Resume from checkpoint
3895
- checkpointId: z25.string().optional(),
3943
+ checkpointId: z26.string().optional(),
3896
3944
  // Required
3897
- prompt: z25.string().min(1, "Prompt is required"),
3945
+ prompt: z26.string().min(1, "Prompt is required"),
3898
3946
  // Optional configuration
3899
- variables: z25.record(z25.string(), z25.string()).optional(),
3900
- secrets: z25.record(z25.string(), z25.string()).optional(),
3901
- artifactName: z25.string().optional(),
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: z25.string().optional(),
3951
+ artifactVersion: z26.string().optional(),
3904
3952
  // Artifact version (defaults to latest)
3905
- volumes: z25.record(z25.string(), z25.string()).optional()
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 = c21.router({
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 = c21.router({
3991
+ var publicRunByIdContract = c22.router({
3944
3992
  get: {
3945
3993
  method: "GET",
3946
3994
  path: "/v1/runs/:id",
3947
3995
  headers: authHeadersSchema,
3948
- pathParams: z25.object({
3949
- id: z25.string().min(1, "Run ID is required")
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 = c21.router({
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: z25.object({
3967
- id: z25.string().min(1, "Run ID is required")
4014
+ pathParams: z26.object({
4015
+ id: z26.string().min(1, "Run ID is required")
3968
4016
  }),
3969
- body: z25.undefined(),
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 = z25.object({
4030
+ var logEntrySchema = z26.object({
3983
4031
  timestamp: timestampSchema,
3984
- type: z25.enum(["agent", "system", "network"]),
3985
- level: z25.enum(["debug", "info", "warn", "error"]),
3986
- message: z25.string(),
3987
- metadata: z25.record(z25.string(), z25.unknown()).optional()
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: z25.enum(["agent", "system", "network", "all"]).default("all"),
4039
+ type: z26.enum(["agent", "system", "network", "all"]).default("all"),
3992
4040
  since: timestampSchema.optional(),
3993
4041
  until: timestampSchema.optional(),
3994
- order: z25.enum(["asc", "desc"]).default("asc")
4042
+ order: z26.enum(["asc", "desc"]).default("asc")
3995
4043
  });
3996
- var publicRunLogsContract = c21.router({
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: z25.object({
4002
- id: z25.string().min(1, "Run ID is required")
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 = z25.object({
4063
+ var metricPointSchema = z26.object({
4016
4064
  timestamp: timestampSchema,
4017
- cpuPercent: z25.number(),
4018
- memoryUsedMb: z25.number(),
4019
- memoryTotalMb: z25.number(),
4020
- diskUsedMb: z25.number(),
4021
- diskTotalMb: z25.number()
4022
- });
4023
- var metricsSummarySchema = z25.object({
4024
- avgCpuPercent: z25.number(),
4025
- maxMemoryUsedMb: z25.number(),
4026
- totalDurationMs: z25.number().nullable()
4027
- });
4028
- var metricsResponseSchema2 = z25.object({
4029
- data: z25.array(metricPointSchema),
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 = c21.router({
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: z25.object({
4038
- id: z25.string().min(1, "Run ID is required")
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 = z25.enum([
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 = z25.object({
4110
+ var sseEventSchema = z26.object({
4063
4111
  event: sseEventTypeSchema,
4064
- data: z25.unknown(),
4065
- id: z25.string().optional()
4112
+ data: z26.unknown(),
4113
+ id: z26.string().optional()
4066
4114
  // For Last-Event-ID reconnection
4067
4115
  });
4068
- var publicRunEventsContract = c21.router({
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: z25.object({
4074
- id: z25.string().min(1, "Run ID is required")
4121
+ pathParams: z26.object({
4122
+ id: z26.string().min(1, "Run ID is required")
4075
4123
  }),
4076
- query: z25.object({
4077
- lastEventId: z25.string().optional()
4124
+ query: z26.object({
4125
+ lastEventId: z26.string().optional()
4078
4126
  // For reconnection
4079
4127
  }),
4080
4128
  responses: {
4081
- 200: z25.any(),
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 z26 } from "zod";
4094
- var c22 = initContract();
4095
- var publicArtifactSchema = z26.object({
4096
- id: z26.string(),
4097
- name: z26.string(),
4098
- currentVersionId: z26.string().nullable(),
4099
- size: z26.number(),
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: z26.number(),
4149
+ fileCount: z27.number(),
4102
4150
  createdAt: timestampSchema,
4103
4151
  updatedAt: timestampSchema
4104
4152
  });
4105
- var artifactVersionSchema = z26.object({
4106
- id: z26.string(),
4153
+ var artifactVersionSchema = z27.object({
4154
+ id: z27.string(),
4107
4155
  // SHA-256 content hash
4108
- artifactId: z26.string(),
4109
- size: z26.number(),
4156
+ artifactId: z27.string(),
4157
+ size: z27.number(),
4110
4158
  // Size in bytes
4111
- fileCount: z26.number(),
4112
- message: z26.string().nullable(),
4159
+ fileCount: z27.number(),
4160
+ message: z27.string().nullable(),
4113
4161
  // Optional commit message
4114
- createdBy: z26.string(),
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 = c22.router({
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 = c22.router({
4187
+ var publicArtifactByIdContract = c23.router({
4140
4188
  get: {
4141
4189
  method: "GET",
4142
4190
  path: "/v1/artifacts/:id",
4143
4191
  headers: authHeadersSchema,
4144
- pathParams: z26.object({
4145
- id: z26.string().min(1, "Artifact ID is required")
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 = c22.router({
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: z26.object({
4163
- id: z26.string().min(1, "Artifact ID is required")
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 = c22.router({
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: z26.object({
4182
- id: z26.string().min(1, "Artifact ID is required")
4229
+ pathParams: z27.object({
4230
+ id: z27.string().min(1, "Artifact ID is required")
4183
4231
  }),
4184
- query: z26.object({
4185
- versionId: z26.string().optional()
4232
+ query: z27.object({
4233
+ versionId: z27.string().optional()
4186
4234
  // Defaults to current version
4187
4235
  }),
4188
4236
  responses: {
4189
- 302: z26.undefined(),
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 z27 } from "zod";
4202
- var c23 = initContract();
4203
- var publicVolumeSchema = z27.object({
4204
- id: z27.string(),
4205
- name: z27.string(),
4206
- currentVersionId: z27.string().nullable(),
4207
- size: z27.number(),
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: z27.number(),
4257
+ fileCount: z28.number(),
4210
4258
  createdAt: timestampSchema,
4211
4259
  updatedAt: timestampSchema
4212
4260
  });
4213
- var volumeVersionSchema = z27.object({
4214
- id: z27.string(),
4261
+ var volumeVersionSchema = z28.object({
4262
+ id: z28.string(),
4215
4263
  // SHA-256 content hash
4216
- volumeId: z27.string(),
4217
- size: z27.number(),
4264
+ volumeId: z28.string(),
4265
+ size: z28.number(),
4218
4266
  // Size in bytes
4219
- fileCount: z27.number(),
4220
- message: z27.string().nullable(),
4267
+ fileCount: z28.number(),
4268
+ message: z28.string().nullable(),
4221
4269
  // Optional commit message
4222
- createdBy: z27.string(),
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 = c23.router({
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 = c23.router({
4293
+ var publicVolumeByIdContract = c24.router({
4246
4294
  get: {
4247
4295
  method: "GET",
4248
4296
  path: "/v1/volumes/:id",
4249
4297
  headers: authHeadersSchema,
4250
- pathParams: z27.object({
4251
- id: z27.string().min(1, "Volume ID is required")
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 = c23.router({
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: z27.object({
4269
- id: z27.string().min(1, "Volume ID is required")
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 = c23.router({
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: z27.object({
4288
- id: z27.string().min(1, "Volume ID is required")
4335
+ pathParams: z28.object({
4336
+ id: z28.string().min(1, "Volume ID is required")
4289
4337
  }),
4290
- query: z27.object({
4291
- versionId: z27.string().optional()
4338
+ query: z28.object({
4339
+ versionId: z28.string().optional()
4292
4340
  // Defaults to current version
4293
4341
  }),
4294
4342
  responses: {
4295
- 302: z27.undefined(),
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 z28 } from "zod";
5007
- var cliAgentNameSchema = z28.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
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: z28.ZodIssueCode.custom,
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 = z28.object({
5032
- version: z28.string().min(1, "Missing config.version"),
5033
- agents: z28.record(cliAgentNameSchema, cliAgentDefinitionSchema),
5034
- volumes: z28.record(z28.string(), volumeConfigSchema).optional()
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: z28.ZodIssueCode.custom,
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: z28.ZodIssueCode.custom,
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: z28.ZodIssueCode.custom,
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: z28.ZodIssueCode.custom,
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: z28.ZodIssueCode.custom,
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((c24) => c24.type)
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.34.0");
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((c24) => {
7055
- const action = c24.kind === "add" ? "Created" : c24.kind === "modify" ? "Modified" : "Deleted";
7056
- return `${action}: ${c24.path}`;
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((c24) => {
7211
- const icon = c24.kind === "add" ? "+" : c24.kind === "delete" ? "-" : "~";
7212
- return `${icon}${c24.path}`;
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 initClient11 } from "@ts-rest/core";
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 = initClient11(composesMainContract, {
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 = initClient11(composesByIdContract, {
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 = initClient11(composesVersionsContract, {
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 = initClient11(composesMainContract, {
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 = initClient11(runsMainContract, {
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 = initClient11(runEventsContract, {
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 = initClient11(runSystemLogContract, {
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 = initClient11(runMetricsContract, {
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 = initClient11(runAgentEventsContract, {
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 = initClient11(runNetworkLogsContract, {
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 = initClient11(scopeContract, {
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 = initClient11(scopeContract, {
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 = initClient11(scopeContract, {
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 = initClient11(sessionsByIdContract, {
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 = initClient11(checkpointsByIdContract, {
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 = initClient11(storagesPrepareContract, {
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 = initClient11(storagesCommitContract, {
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 = initClient11(storagesDownloadContract, {
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 = initClient11(storagesListContract, {
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 = initClient11(schedulesMainContract, {
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 = initClient11(schedulesMainContract, {
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 = initClient11(schedulesByNameContract, {
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 = initClient11(schedulesByNameContract, {
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 = initClient11(schedulesEnableContract, {
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 = initClient11(schedulesEnableContract, {
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 = initClient11(scheduleRunsContract, {
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 = initClient11(publicAgentsListContract, {
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 = initClient11(publicArtifactsListContract, {
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 = initClient11(publicArtifactByIdContract, {
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 = initClient11(publicVolumesListContract, {
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 = initClient11(publicVolumeByIdContract, {
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 = initClient11(credentialsMainContract, {
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 = initClient11(credentialsByNameContract, {
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 = initClient11(credentialsMainContract, {
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 = initClient11(credentialsByNameContract, {
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 = initClient11(realtimeTokenContract, {
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.34.0");
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.34.0", prompt);
10110
+ const shouldExit = await checkAndUpgrade("9.35.0", prompt);
10042
10111
  if (shouldExit) {
10043
10112
  process.exit(0);
10044
10113
  }
@@ -10895,7 +10964,7 @@ var listCommand4 = new Command37().name("list").alias("ls").description("List al
10895
10964
  );
10896
10965
  return;
10897
10966
  }
10898
- const nameWidth = Math.max(4, ...data.composes.map((c24) => c24.name.length));
10967
+ const nameWidth = Math.max(4, ...data.composes.map((c25) => c25.name.length));
10899
10968
  const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
10900
10969
  " "
10901
10970
  );
@@ -11805,7 +11874,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
11805
11874
  );
11806
11875
  process.exit(1);
11807
11876
  }
11808
- const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c24) => c24.value === existingFrequency) : 0;
11877
+ const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c25) => c25.value === existingFrequency) : 0;
11809
11878
  frequency = await promptSelect(
11810
11879
  "Schedule frequency",
11811
11880
  FREQUENCY_CHOICES,
@@ -11834,7 +11903,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
11834
11903
  process.exit(1);
11835
11904
  }
11836
11905
  if (frequency === "weekly") {
11837
- const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c24) => c24.value === existingDay) : 0;
11906
+ const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c25) => c25.value === existingDay) : 0;
11838
11907
  const day2 = await promptSelect(
11839
11908
  "Day of week",
11840
11909
  DAY_OF_WEEK_CHOICES,
@@ -11916,11 +11985,17 @@ async function gatherOneTimeSchedule(optionDay, optionTime, existingTime) {
11916
11985
  }
11917
11986
  async function gatherTimezone(optionTimezone, existingTimezone) {
11918
11987
  if (optionTimezone) return optionTimezone;
11919
- const detectedTimezone = detectTimezone();
11988
+ let userTimezone = null;
11989
+ try {
11990
+ const prefs = await getUserPreferences();
11991
+ userTimezone = prefs.timezone;
11992
+ } catch {
11993
+ }
11994
+ const defaultTimezone = userTimezone || detectTimezone();
11920
11995
  if (!isInteractive()) {
11921
- return detectedTimezone;
11996
+ return defaultTimezone;
11922
11997
  }
11923
- return await promptText("Timezone", existingTimezone || detectedTimezone);
11998
+ return await promptText("Timezone", existingTimezone || defaultTimezone);
11924
11999
  }
11925
12000
  async function gatherPromptText(optionPrompt, existingPrompt) {
11926
12001
  if (optionPrompt) return optionPrompt;
@@ -13531,7 +13606,7 @@ import { Command as Command71 } from "commander";
13531
13606
  // src/commands/connector/connect.ts
13532
13607
  import { Command as Command67 } from "commander";
13533
13608
  import chalk67 from "chalk";
13534
- import { initClient as initClient12 } from "@ts-rest/core";
13609
+ import { initClient as initClient13 } from "@ts-rest/core";
13535
13610
  function delay2(ms) {
13536
13611
  return new Promise((resolve) => setTimeout(resolve, ms));
13537
13612
  }
@@ -13561,7 +13636,7 @@ var connectCommand = new Command67().name("connect").description("Connect a thir
13561
13636
  const apiUrl = await getApiUrl();
13562
13637
  const headers = await getHeaders2();
13563
13638
  console.log(`Connecting ${chalk67.cyan(type2)}...`);
13564
- const sessionsClient = initClient12(connectorSessionsContract, {
13639
+ const sessionsClient = initClient13(connectorSessionsContract, {
13565
13640
  baseUrl: apiUrl,
13566
13641
  baseHeaders: headers,
13567
13642
  jsonQuery: false
@@ -13587,7 +13662,7 @@ To connect, visit: ${verificationUrl}`));
13587
13662
  The session expires in ${Math.floor(session.expiresIn / 60)} minutes.`
13588
13663
  );
13589
13664
  console.log("\nWaiting for authorization...");
13590
- const sessionClient = initClient12(connectorSessionByIdContract, {
13665
+ const sessionClient = initClient13(connectorSessionByIdContract, {
13591
13666
  baseUrl: apiUrl,
13592
13667
  baseHeaders: headers,
13593
13668
  jsonQuery: false
@@ -13660,7 +13735,7 @@ import chalk68 from "chalk";
13660
13735
  var listCommand9 = new Command68().name("list").alias("ls").description("List all connectors and their status").action(
13661
13736
  withErrorHandler(async () => {
13662
13737
  const result = await listConnectors();
13663
- const connectedMap = new Map(result.connectors.map((c24) => [c24.type, c24]));
13738
+ const connectedMap = new Map(result.connectors.map((c25) => [c25.type, c25]));
13664
13739
  const allTypes = Object.keys(CONNECTOR_TYPES);
13665
13740
  const typeWidth = Math.max(4, ...allTypes.map((t) => t.length));
13666
13741
  const statusText = "STATUS";
@@ -14209,16 +14284,16 @@ async function handleModelProvider(ctx) {
14209
14284
  const providerType = await step.prompt(
14210
14285
  () => promptSelect(
14211
14286
  "Select provider type:",
14212
- choices.map((c24) => ({
14213
- title: c24.label,
14214
- value: c24.type
14287
+ choices.map((c25) => ({
14288
+ title: c25.label,
14289
+ value: c25.type
14215
14290
  }))
14216
14291
  )
14217
14292
  );
14218
14293
  if (!providerType) {
14219
14294
  process.exit(0);
14220
14295
  }
14221
- const selectedChoice = choices.find((c24) => c24.type === providerType);
14296
+ const selectedChoice = choices.find((c25) => c25.type === providerType);
14222
14297
  if (selectedChoice?.helpText) {
14223
14298
  for (const line of selectedChoice.helpText.split("\n")) {
14224
14299
  step.detail(chalk74.dim(line));
@@ -14448,7 +14523,7 @@ import { Command as Command76 } from "commander";
14448
14523
  // src/commands/dev-tool/compose.ts
14449
14524
  import { Command as Command75 } from "commander";
14450
14525
  import chalk77 from "chalk";
14451
- import { initClient as initClient13 } from "@ts-rest/core";
14526
+ import { initClient as initClient14 } from "@ts-rest/core";
14452
14527
  function sleep2(ms) {
14453
14528
  return new Promise((resolve) => setTimeout(resolve, ms));
14454
14529
  }
@@ -14457,7 +14532,7 @@ function timestamp() {
14457
14532
  }
14458
14533
  async function createComposeJob(githubUrl, overwrite) {
14459
14534
  const config = await getClientConfig();
14460
- const client = initClient13(composeJobsMainContract, config);
14535
+ const client = initClient14(composeJobsMainContract, config);
14461
14536
  const result = await client.create({
14462
14537
  body: { githubUrl, overwrite }
14463
14538
  });
@@ -14474,7 +14549,7 @@ async function createComposeJob(githubUrl, overwrite) {
14474
14549
  }
14475
14550
  async function getComposeJobStatus(jobId) {
14476
14551
  const config = await getClientConfig();
14477
- const client = initClient13(composeJobsByIdContract, config);
14552
+ const client = initClient14(composeJobsByIdContract, config);
14478
14553
  const result = await client.getById({
14479
14554
  params: { jobId }
14480
14555
  });
@@ -14603,9 +14678,74 @@ function displayResult(job) {
14603
14678
  // src/commands/dev-tool/index.ts
14604
14679
  var devToolCommand = new Command76().name("dev-tool").description("Developer tools for testing and debugging").addCommand(composeCommand2);
14605
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
+
14606
14746
  // src/index.ts
14607
- var program = new Command77();
14608
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.34.0");
14747
+ var program = new Command78();
14748
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.35.0");
14609
14749
  program.addCommand(authCommand);
14610
14750
  program.addCommand(infoCommand);
14611
14751
  program.addCommand(composeCommand);
@@ -14626,6 +14766,7 @@ program.addCommand(connectorCommand);
14626
14766
  program.addCommand(onboardCommand);
14627
14767
  program.addCommand(setupClaudeCommand);
14628
14768
  program.addCommand(dashboardCommand);
14769
+ program.addCommand(timezoneCommand);
14629
14770
  program.addCommand(devToolCommand, { hidden: true });
14630
14771
  if (process.argv[1]?.endsWith("index.js") || process.argv[1]?.endsWith("index.ts") || process.argv[1]?.endsWith("vm0")) {
14631
14772
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.34.0",
3
+ "version": "9.35.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",