@vm0/cli 9.79.1 → 9.79.2

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.
@@ -47,7 +47,7 @@ if (DSN) {
47
47
  Sentry.init({
48
48
  dsn: DSN,
49
49
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
50
- release: "9.79.1",
50
+ release: "9.79.2",
51
51
  sendDefaultPii: false,
52
52
  tracesSampleRate: 0,
53
53
  shutdownTimeout: 500,
@@ -66,7 +66,7 @@ if (DSN) {
66
66
  }
67
67
  });
68
68
  Sentry.setContext("cli", {
69
- version: "9.79.1",
69
+ version: "9.79.2",
70
70
  command: process.argv.slice(2).join(" ")
71
71
  });
72
72
  Sentry.setContext("runtime", {
@@ -768,7 +768,7 @@ var triggerSourceSchema = z5.enum([
768
768
  var logEntrySchema = z5.object({
769
769
  id: z5.uuid(),
770
770
  sessionId: z5.string().nullable(),
771
- agentName: z5.string(),
771
+ agentId: z5.string().nullable(),
772
772
  displayName: z5.string().nullable(),
773
773
  orgSlug: z5.string().nullable(),
774
774
  framework: z5.string().nullable(),
@@ -795,7 +795,7 @@ var artifactSchema = z5.object({
795
795
  var logDetailSchema = z5.object({
796
796
  id: z5.uuid(),
797
797
  sessionId: z5.string().nullable(),
798
- agentName: z5.string(),
798
+ agentId: z5.string().nullable(),
799
799
  displayName: z5.string().nullable(),
800
800
  framework: z5.string().nullable(),
801
801
  modelProvider: z5.string().nullable(),
@@ -920,11 +920,11 @@ var orgDefaultAgentContract = c3.router({
920
920
  org: z7.string().optional()
921
921
  }),
922
922
  body: z7.object({
923
- agentComposeId: z7.uuid().nullable()
923
+ agentId: z7.uuid().nullable()
924
924
  }),
925
925
  responses: {
926
926
  200: z7.object({
927
- agentComposeId: z7.uuid().nullable()
927
+ agentId: z7.uuid().nullable()
928
928
  }),
929
929
  400: apiErrorSchema,
930
930
  401: apiErrorSchema,
@@ -2754,7 +2754,7 @@ var chatThreadListItemSchema = z18.object({
2754
2754
  id: z18.string(),
2755
2755
  title: z18.string().nullable(),
2756
2756
  preview: z18.string().nullable(),
2757
- agentComposeId: z18.string(),
2757
+ agentId: z18.string(),
2758
2758
  createdAt: z18.string(),
2759
2759
  updatedAt: z18.string()
2760
2760
  });
@@ -2775,7 +2775,7 @@ var unsavedRunSchema = z18.object({
2775
2775
  var chatThreadDetailSchema = z18.object({
2776
2776
  id: z18.string(),
2777
2777
  title: z18.string().nullable(),
2778
- agentComposeId: z18.string(),
2778
+ agentId: z18.string(),
2779
2779
  chatMessages: z18.array(storedChatMessageSchema2),
2780
2780
  latestSessionId: z18.string().nullable(),
2781
2781
  unsavedRuns: z18.array(unsavedRunSchema),
@@ -2788,7 +2788,7 @@ var chatThreadsContract = c11.router({
2788
2788
  path: "/api/zero/chat-threads",
2789
2789
  headers: authHeadersSchema,
2790
2790
  body: z18.object({
2791
- agentComposeId: z18.string().min(1),
2791
+ agentId: z18.string().min(1),
2792
2792
  title: z18.string().optional()
2793
2793
  }),
2794
2794
  responses: {
@@ -2806,7 +2806,7 @@ var chatThreadsContract = c11.router({
2806
2806
  path: "/api/zero/chat-threads",
2807
2807
  headers: authHeadersSchema,
2808
2808
  query: z18.object({
2809
- agentComposeId: z18.string().min(1, "agentComposeId is required")
2809
+ agentId: z18.string().min(1, "agentId is required")
2810
2810
  }),
2811
2811
  responses: {
2812
2812
  200: z18.object({ threads: z18.array(chatThreadListItemSchema) }),
@@ -2918,9 +2918,7 @@ var storedExecutionContextSchema = z19.object({
2918
2918
  apiStartTime: z19.number().optional(),
2919
2919
  // User's timezone preference (IANA format, e.g., "Asia/Shanghai")
2920
2920
  userTimezone: z19.string().optional(),
2921
- // Agent metadata for VM0_AGENT_NAME, VM0_AGENT_COMPOSE_ID, and VM0_AGENT_ORG env vars
2922
- agentName: z19.string().optional(),
2923
- agentComposeId: z19.string().optional(),
2921
+ // Org slug for agent used for VM0_ACTIVE_ORG when capabilities are present
2924
2922
  agentOrgSlug: z19.string().optional(),
2925
2923
  // Memory storage name (for first-run when manifest.memory is null)
2926
2924
  memoryName: z19.string().optional(),
@@ -2962,9 +2960,7 @@ var executionContextSchema = z19.object({
2962
2960
  apiStartTime: z19.number().optional(),
2963
2961
  // User's timezone preference (IANA format, e.g., "Asia/Shanghai")
2964
2962
  userTimezone: z19.string().optional(),
2965
- // Agent metadata
2966
- agentName: z19.string().optional(),
2967
- agentComposeId: z19.string().optional(),
2963
+ // Org slug for agent — used for VM0_ACTIVE_ORG when capabilities are present
2968
2964
  agentOrgSlug: z19.string().optional(),
2969
2965
  // Memory storage name (for first-run when manifest.memory is null)
2970
2966
  memoryName: z19.string().optional(),
@@ -6522,7 +6518,7 @@ var axiomFirewall = {
6522
6518
  name: "axiom",
6523
6519
  description: "Axiom API",
6524
6520
  placeholders: {
6525
- AXIOM_TOKEN: "xaat-Vm0PlaceHolder0000000000000000000000000000"
6521
+ AXIOM_TOKEN: "xaat-00000000-0000-0000-0000-000000000000"
6526
6522
  },
6527
6523
  apis: [
6528
6524
  {
@@ -11069,7 +11065,7 @@ var mondayFirewall = {
11069
11065
  name: "monday",
11070
11066
  description: "Monday.com API",
11071
11067
  placeholders: {
11072
- MONDAY_TOKEN: "Vm0PlaceHolder00000000000000000a"
11068
+ MONDAY_TOKEN: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IlZtMFBsYWNlSG9sZGVyIiwiaWF0IjoxNTE2MjM5MDIyfQ.Vm0PlaceHolder00000000000000000000000000000a"
11073
11069
  },
11074
11070
  apis: [
11075
11071
  {
@@ -11214,7 +11210,7 @@ var posthogFirewall = {
11214
11210
  name: "posthog",
11215
11211
  description: "PostHog API",
11216
11212
  placeholders: {
11217
- POSTHOG_TOKEN: "phx_Vm0PlaceHolder00000000000000000000000a"
11213
+ POSTHOG_TOKEN: "phx_Vm0PlaceHolder00000000000000000000000000000000a"
11218
11214
  },
11219
11215
  apis: [
11220
11216
  {
@@ -12156,6 +12152,32 @@ var stripeFirewall = {
12156
12152
  ]
12157
12153
  };
12158
12154
 
12155
+ // ../../packages/core/src/firewalls/supabase.generated.ts
12156
+ var supabaseFirewall = {
12157
+ name: "supabase",
12158
+ description: "Supabase Management API",
12159
+ placeholders: {
12160
+ SUPABASE_ACCESS_TOKEN: "sbp_oauth_0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b"
12161
+ },
12162
+ apis: [
12163
+ {
12164
+ base: "https://api.supabase.com",
12165
+ auth: {
12166
+ headers: {
12167
+ Authorization: "Bearer ${{ secrets.SUPABASE_ACCESS_TOKEN }}"
12168
+ }
12169
+ },
12170
+ permissions: [
12171
+ {
12172
+ name: "unrestricted",
12173
+ description: "Allow all endpoints",
12174
+ rules: ["ANY /{path*}"]
12175
+ }
12176
+ ]
12177
+ }
12178
+ ]
12179
+ };
12180
+
12159
12181
  // ../../packages/core/src/firewalls/todoist.generated.ts
12160
12182
  var todoistFirewall = {
12161
12183
  name: "todoist",
@@ -12936,6 +12958,7 @@ var builtinFirewalls = {
12936
12958
  sentry: sentryFirewall,
12937
12959
  slack: slackFirewall,
12938
12960
  stripe: stripeFirewall,
12961
+ supabase: supabaseFirewall,
12939
12962
  todoist: todoistFirewall,
12940
12963
  vercel: vercelFirewall,
12941
12964
  x: xFirewall,
@@ -13242,8 +13265,7 @@ var onboardingStatusResponseSchema = z24.object({
13242
13265
  isAdmin: z24.boolean(),
13243
13266
  hasOrg: z24.boolean(),
13244
13267
  hasDefaultAgent: z24.boolean(),
13245
- defaultAgentName: z24.string().nullable(),
13246
- defaultAgentComposeId: z24.string().nullable(),
13268
+ defaultAgentId: z24.string().nullable(),
13247
13269
  defaultAgentMetadata: z24.object({
13248
13270
  displayName: z24.string().optional(),
13249
13271
  description: z24.string().optional(),
@@ -13302,8 +13324,7 @@ var skillsResolveContract = c16.router({
13302
13324
  import { z as z26 } from "zod";
13303
13325
  var c17 = initContract();
13304
13326
  var zeroAgentResponseSchema = z26.object({
13305
- name: z26.string(),
13306
- agentComposeId: z26.string(),
13327
+ agentId: z26.string(),
13307
13328
  description: z26.string().nullable(),
13308
13329
  displayName: z26.string().nullable(),
13309
13330
  sound: z26.string().nullable(),
@@ -13353,24 +13374,24 @@ var zeroAgentsMainContract = c17.router({
13353
13374
  summary: "List zero agents"
13354
13375
  }
13355
13376
  });
13356
- var zeroAgentsByNameContract = c17.router({
13377
+ var zeroAgentsByIdContract = c17.router({
13357
13378
  get: {
13358
13379
  method: "GET",
13359
- path: "/api/zero/agents/:name",
13380
+ path: "/api/zero/agents/:id",
13360
13381
  headers: authHeadersSchema,
13361
- pathParams: z26.object({ name: z26.string() }),
13382
+ pathParams: z26.object({ id: z26.string() }),
13362
13383
  responses: {
13363
13384
  200: zeroAgentResponseSchema,
13364
13385
  401: apiErrorSchema,
13365
13386
  404: apiErrorSchema
13366
13387
  },
13367
- summary: "Get zero agent by name"
13388
+ summary: "Get zero agent by id"
13368
13389
  },
13369
13390
  update: {
13370
13391
  method: "PUT",
13371
- path: "/api/zero/agents/:name",
13392
+ path: "/api/zero/agents/:id",
13372
13393
  headers: authHeadersSchema,
13373
- pathParams: z26.object({ name: z26.string() }),
13394
+ pathParams: z26.object({ id: z26.string() }),
13374
13395
  body: zeroAgentRequestSchema,
13375
13396
  responses: {
13376
13397
  200: zeroAgentResponseSchema,
@@ -13383,9 +13404,9 @@ var zeroAgentsByNameContract = c17.router({
13383
13404
  },
13384
13405
  updateMetadata: {
13385
13406
  method: "PATCH",
13386
- path: "/api/zero/agents/:name",
13407
+ path: "/api/zero/agents/:id",
13387
13408
  headers: authHeadersSchema,
13388
- pathParams: z26.object({ name: z26.string() }),
13409
+ pathParams: z26.object({ id: z26.string() }),
13389
13410
  body: zeroAgentMetadataRequestSchema,
13390
13411
  responses: {
13391
13412
  200: zeroAgentResponseSchema,
@@ -13396,20 +13417,20 @@ var zeroAgentsByNameContract = c17.router({
13396
13417
  },
13397
13418
  delete: {
13398
13419
  method: "DELETE",
13399
- path: "/api/zero/agents/:name",
13420
+ path: "/api/zero/agents/:id",
13400
13421
  headers: authHeadersSchema,
13401
- pathParams: z26.object({ name: z26.string() }),
13422
+ pathParams: z26.object({ id: z26.string() }),
13402
13423
  body: c17.noBody(),
13403
13424
  responses: {
13404
13425
  204: c17.noBody(),
13405
13426
  401: apiErrorSchema,
13406
13427
  404: apiErrorSchema
13407
13428
  },
13408
- summary: "Delete zero agent by name"
13429
+ summary: "Delete zero agent by id"
13409
13430
  }
13410
13431
  });
13411
13432
  var zeroAgentFirewallPoliciesRequestSchema = z26.object({
13412
- name: z26.string(),
13433
+ agentId: z26.string(),
13413
13434
  policies: firewallPoliciesSchema
13414
13435
  });
13415
13436
  var zeroAgentFirewallPoliciesContract = c17.router({
@@ -13431,9 +13452,9 @@ var zeroAgentFirewallPoliciesContract = c17.router({
13431
13452
  var zeroAgentInstructionsContract = c17.router({
13432
13453
  get: {
13433
13454
  method: "GET",
13434
- path: "/api/zero/agents/:name/instructions",
13455
+ path: "/api/zero/agents/:id/instructions",
13435
13456
  headers: authHeadersSchema,
13436
- pathParams: z26.object({ name: z26.string() }),
13457
+ pathParams: z26.object({ id: z26.string() }),
13437
13458
  responses: {
13438
13459
  200: zeroAgentInstructionsResponseSchema,
13439
13460
  401: apiErrorSchema,
@@ -13443,9 +13464,9 @@ var zeroAgentInstructionsContract = c17.router({
13443
13464
  },
13444
13465
  update: {
13445
13466
  method: "PUT",
13446
- path: "/api/zero/agents/:name/instructions",
13467
+ path: "/api/zero/agents/:id/instructions",
13447
13468
  headers: authHeadersSchema,
13448
- pathParams: z26.object({ name: z26.string() }),
13469
+ pathParams: z26.object({ id: z26.string() }),
13449
13470
  body: zeroAgentInstructionsRequestSchema,
13450
13471
  responses: {
13451
13472
  200: zeroAgentResponseSchema,
@@ -13931,7 +13952,6 @@ var c24 = initContract();
13931
13952
  var scheduleResponseSchema = z31.object({
13932
13953
  id: z31.string().uuid(),
13933
13954
  agentId: z31.string().uuid(),
13934
- agentName: z31.string(),
13935
13955
  orgSlug: z31.string(),
13936
13956
  userId: z31.string(),
13937
13957
  name: z31.string(),
@@ -13978,14 +13998,11 @@ var zeroDeployScheduleRequestSchema = z31.object({
13978
13998
  artifactName: z31.string().optional(),
13979
13999
  artifactVersion: z31.string().optional(),
13980
14000
  volumeVersions: z31.record(z31.string(), z31.string()).optional(),
13981
- agentId: z31.string().uuid("Invalid agent ID").optional(),
13982
- composeId: z31.string().uuid("Invalid compose ID").optional(),
14001
+ agentId: z31.string().uuid("Invalid agent ID"),
13983
14002
  enabled: z31.boolean().optional(),
13984
14003
  notifyEmail: z31.boolean().optional(),
13985
14004
  notifySlack: z31.boolean().optional(),
13986
14005
  slackChannelId: z31.string().nullable().optional()
13987
- }).refine((data) => Boolean(data.agentId ?? data.composeId), {
13988
- message: "Either 'agentId' or 'composeId' must be provided"
13989
14006
  }).refine(
13990
14007
  (data) => {
13991
14008
  const triggers = [
@@ -14036,10 +14053,7 @@ var zeroSchedulesByNameContract = c24.router({
14036
14053
  name: z31.string().min(1, "Schedule name required")
14037
14054
  }),
14038
14055
  query: z31.object({
14039
- agentId: z31.string().uuid("Invalid agent ID").optional(),
14040
- composeId: z31.string().uuid("Invalid compose ID").optional()
14041
- }).refine((data) => Boolean(data.agentId ?? data.composeId), {
14042
- message: "Either 'agentId' or 'composeId' must be provided"
14056
+ agentId: z31.string().uuid("Invalid agent ID")
14043
14057
  }),
14044
14058
  responses: {
14045
14059
  204: c24.noBody(),
@@ -14059,10 +14073,7 @@ var zeroSchedulesEnableContract = c24.router({
14059
14073
  name: z31.string().min(1, "Schedule name required")
14060
14074
  }),
14061
14075
  body: z31.object({
14062
- agentId: z31.string().uuid("Invalid agent ID").optional(),
14063
- composeId: z31.string().uuid("Invalid compose ID").optional()
14064
- }).refine((data) => Boolean(data.agentId ?? data.composeId), {
14065
- message: "Either 'agentId' or 'composeId' must be provided"
14076
+ agentId: z31.string().uuid("Invalid agent ID")
14066
14077
  }),
14067
14078
  responses: {
14068
14079
  200: scheduleResponseSchema,
@@ -14081,10 +14092,7 @@ var zeroSchedulesEnableContract = c24.router({
14081
14092
  name: z31.string().min(1, "Schedule name required")
14082
14093
  }),
14083
14094
  body: z31.object({
14084
- agentId: z31.string().uuid("Invalid agent ID").optional(),
14085
- composeId: z31.string().uuid("Invalid compose ID").optional()
14086
- }).refine((data) => Boolean(data.agentId ?? data.composeId), {
14087
- message: "Either 'agentId' or 'composeId' must be provided"
14095
+ agentId: z31.string().uuid("Invalid agent ID")
14088
14096
  }),
14089
14097
  responses: {
14090
14098
  200: scheduleResponseSchema,
@@ -15319,43 +15327,43 @@ async function listZeroAgents() {
15319
15327
  if (result.status === 200) return result.body;
15320
15328
  handleError(result, "Failed to list zero agents");
15321
15329
  }
15322
- async function getZeroAgent(name) {
15330
+ async function getZeroAgent(id) {
15323
15331
  const config = await getClientConfig();
15324
- const client = initClient12(zeroAgentsByNameContract, config);
15325
- const result = await client.get({ params: { name } });
15332
+ const client = initClient12(zeroAgentsByIdContract, config);
15333
+ const result = await client.get({ params: { id } });
15326
15334
  if (result.status === 200) return result.body;
15327
- handleError(result, `Zero agent "${name}" not found`);
15335
+ handleError(result, `Zero agent "${id}" not found`);
15328
15336
  }
15329
- async function updateZeroAgent(name, body) {
15337
+ async function updateZeroAgent(id, body) {
15330
15338
  const config = await getClientConfig();
15331
- const client = initClient12(zeroAgentsByNameContract, config);
15332
- const result = await client.update({ params: { name }, body });
15339
+ const client = initClient12(zeroAgentsByIdContract, config);
15340
+ const result = await client.update({ params: { id }, body });
15333
15341
  if (result.status === 200) return result.body;
15334
- handleError(result, `Failed to update zero agent "${name}"`);
15342
+ handleError(result, `Failed to update zero agent "${id}"`);
15335
15343
  }
15336
- async function deleteZeroAgent(name) {
15344
+ async function deleteZeroAgent(id) {
15337
15345
  const config = await getClientConfig();
15338
- const client = initClient12(zeroAgentsByNameContract, config);
15339
- const result = await client.delete({ params: { name } });
15346
+ const client = initClient12(zeroAgentsByIdContract, config);
15347
+ const result = await client.delete({ params: { id } });
15340
15348
  if (result.status === 204) return;
15341
- handleError(result, `Zero agent "${name}" not found`);
15349
+ handleError(result, `Zero agent "${id}" not found`);
15342
15350
  }
15343
- async function getZeroAgentInstructions(name) {
15351
+ async function getZeroAgentInstructions(id) {
15344
15352
  const config = await getClientConfig();
15345
15353
  const client = initClient12(zeroAgentInstructionsContract, config);
15346
- const result = await client.get({ params: { name } });
15354
+ const result = await client.get({ params: { id } });
15347
15355
  if (result.status === 200) return result.body;
15348
- handleError(result, `Failed to get instructions for zero agent "${name}"`);
15356
+ handleError(result, `Failed to get instructions for zero agent "${id}"`);
15349
15357
  }
15350
- async function updateZeroAgentInstructions(name, content) {
15358
+ async function updateZeroAgentInstructions(id, content) {
15351
15359
  const config = await getClientConfig();
15352
15360
  const client = initClient12(zeroAgentInstructionsContract, config);
15353
15361
  const result = await client.update({
15354
- params: { name },
15362
+ params: { id },
15355
15363
  body: { content }
15356
15364
  });
15357
15365
  if (result.status === 200) return;
15358
- handleError(result, `Failed to update instructions for zero agent "${name}"`);
15366
+ handleError(result, `Failed to update instructions for zero agent "${id}"`);
15359
15367
  }
15360
15368
 
15361
15369
  // src/lib/api/domains/zero-connectors.ts
@@ -15495,8 +15503,12 @@ async function disableZeroSchedule(params) {
15495
15503
  handleError(result, `Failed to disable schedule "${params.name}"`);
15496
15504
  }
15497
15505
  async function resolveZeroScheduleByAgent(agentName, scheduleName) {
15506
+ const compose = await getComposeByName(agentName);
15507
+ if (!compose) {
15508
+ throw new Error(`Agent not found: ${agentName}`);
15509
+ }
15498
15510
  const { schedules } = await listZeroSchedules();
15499
- const agentSchedules = schedules.filter((s) => s.agentName === agentName);
15511
+ const agentSchedules = schedules.filter((s) => s.agentId === compose.id);
15500
15512
  if (agentSchedules.length === 0) {
15501
15513
  throw new Error(`No schedule found for agent "${agentName}"`);
15502
15514
  }
@@ -16600,10 +16612,10 @@ var createCommand = new Command24().name("create").description("Create a new zer
16600
16612
  });
16601
16613
  if (options.instructionsFile) {
16602
16614
  const content = readFileSync(options.instructionsFile, "utf-8");
16603
- await updateZeroAgentInstructions(agent.name, content);
16615
+ await updateZeroAgentInstructions(agent.agentId, content);
16604
16616
  }
16605
- console.log(chalk23.green(`\u2713 Zero agent '${agent.name}' created`));
16606
- console.log(` Compose ID: ${agent.agentComposeId}`);
16617
+ console.log(chalk23.green(`\u2713 Zero agent '${agent.agentId}' created`));
16618
+ console.log(` Agent ID: ${agent.agentId}`);
16607
16619
  console.log(` Connectors: ${agent.connectors.join(", ")}`);
16608
16620
  if (agent.displayName) {
16609
16621
  console.log(` Display Name: ${agent.displayName}`);
@@ -16657,10 +16669,10 @@ var viewCommand = new Command26().name("view").description("View a zero agent").
16657
16669
  withErrorHandler(
16658
16670
  async (name, options) => {
16659
16671
  const agent = await getZeroAgent(name);
16660
- console.log(chalk25.bold(agent.name));
16672
+ console.log(chalk25.bold(agent.agentId));
16661
16673
  if (agent.displayName) console.log(chalk25.dim(agent.displayName));
16662
16674
  console.log();
16663
- console.log(`Compose ID: ${agent.agentComposeId}`);
16675
+ console.log(`Agent ID: ${agent.agentId}`);
16664
16676
  console.log(`Connectors: ${agent.connectors.join(", ") || "-"}`);
16665
16677
  if (agent.description)
16666
16678
  console.log(`Description: ${agent.description}`);
@@ -16694,20 +16706,20 @@ var listCommand5 = new Command27().name("list").alias("ls").description("List al
16694
16706
  );
16695
16707
  return;
16696
16708
  }
16697
- const nameWidth = Math.max(4, ...agents.map((a) => a.name.length));
16709
+ const idWidth = Math.max(8, ...agents.map((a) => a.agentId.length));
16698
16710
  const displayWidth = Math.max(
16699
16711
  12,
16700
16712
  ...agents.map((a) => (a.displayName ?? "").length)
16701
16713
  );
16702
16714
  const header = [
16703
- "NAME".padEnd(nameWidth),
16715
+ "AGENT ID".padEnd(idWidth),
16704
16716
  "DISPLAY NAME".padEnd(displayWidth),
16705
16717
  "CONNECTORS"
16706
16718
  ].join(" ");
16707
16719
  console.log(chalk26.dim(header));
16708
16720
  for (const agent of agents) {
16709
16721
  const row = [
16710
- agent.name.padEnd(nameWidth),
16722
+ agent.agentId.padEnd(idWidth),
16711
16723
  (agent.displayName ?? "-").padEnd(displayWidth),
16712
16724
  agent.connectors.join(", ") || "-"
16713
16725
  ].join(" ");
@@ -17786,10 +17798,10 @@ async function gatherTiming(frequency, options, defaults) {
17786
17798
  if (!time) return null;
17787
17799
  return { day, time, atTime: void 0, intervalSeconds: void 0 };
17788
17800
  }
17789
- async function findExistingSchedule(agentName, scheduleName) {
17801
+ async function findExistingSchedule(agentId, scheduleName) {
17790
17802
  const { schedules } = await listZeroSchedules();
17791
17803
  return schedules.find(
17792
- (s) => s.agentName === agentName && s.name === scheduleName
17804
+ (s) => s.agentId === agentId && s.name === scheduleName
17793
17805
  );
17794
17806
  }
17795
17807
  async function buildAndDeploy(params) {
@@ -17910,11 +17922,14 @@ async function handleScheduleEnabling(params) {
17910
17922
  }
17911
17923
  var setupCommand2 = new Command36().name("setup").description("Create or edit a schedule for a zero agent").argument("<agent-name>", "Agent name to configure schedule for").option("-n, --name <schedule-name>", 'Schedule name (default: "default")').option("-f, --frequency <type>", "Frequency: daily|weekly|monthly|once|loop").option("-t, --time <HH:MM>", "Time to run (24-hour format)").option("-d, --day <day>", "Day of week (mon-sun) or day of month (1-31)").option("-i, --interval <seconds>", "Interval in seconds for loop mode").option("-z, --timezone <tz>", "IANA timezone").option("-p, --prompt <text>", "Prompt to run").option("--artifact-name <name>", "Artifact name", "artifact").option("-e, --enable", "Enable schedule immediately after creation").option("--notify-email", "Enable email notifications (default: true)").option("--no-notify-email", "Disable email notifications").option("--notify-slack", "Enable Slack notifications (default: true)").option("--no-notify-slack", "Disable Slack notifications").action(
17912
17924
  withErrorHandler(async (agentName, options) => {
17913
- const agent = await getZeroAgent(agentName);
17914
- const agentId = agent.agentComposeId;
17925
+ const compose = await getComposeByName(agentName);
17926
+ if (!compose) {
17927
+ throw new Error(`Agent not found: ${agentName}`);
17928
+ }
17929
+ const agentId = compose.id;
17915
17930
  const scheduleName = options.name || "default";
17916
17931
  const existingSchedule = await findExistingSchedule(
17917
- agentName,
17932
+ agentId,
17918
17933
  scheduleName
17919
17934
  );
17920
17935
  console.log(
@@ -18000,7 +18015,7 @@ var listCommand7 = new Command37().name("list").alias("ls").description("List al
18000
18015
  }
18001
18016
  const agentWidth = Math.max(
18002
18017
  5,
18003
- ...result.schedules.map((s) => s.agentName.length)
18018
+ ...result.schedules.map((s) => s.agentId.length)
18004
18019
  );
18005
18020
  const scheduleWidth = Math.max(
18006
18021
  8,
@@ -18025,7 +18040,7 @@ var listCommand7 = new Command37().name("list").alias("ls").description("List al
18025
18040
  const status = schedule.enabled ? chalk35.green("enabled") : chalk35.yellow("disabled");
18026
18041
  const nextRun = schedule.enabled ? formatRelativeTime(schedule.nextRunAt) : "-";
18027
18042
  const row = [
18028
- schedule.agentName.padEnd(agentWidth),
18043
+ schedule.agentId.padEnd(agentWidth),
18029
18044
  schedule.name.padEnd(scheduleWidth),
18030
18045
  trigger.padEnd(triggerWidth),
18031
18046
  status.padEnd(8 + (schedule.enabled ? 0 : 2)),
@@ -18060,7 +18075,7 @@ function printRunConfiguration(schedule) {
18060
18075
  const statusText = schedule.enabled ? chalk36.green("enabled") : chalk36.yellow("disabled");
18061
18076
  console.log(`${"Status:".padEnd(16)}${statusText}`);
18062
18077
  console.log(
18063
- `${"Agent:".padEnd(16)}${schedule.agentName} ${chalk36.dim(`(${schedule.orgSlug})`)}`
18078
+ `${"Agent:".padEnd(16)}${schedule.agentId} ${chalk36.dim(`(${schedule.orgSlug})`)}`
18064
18079
  );
18065
18080
  const promptPreview = schedule.prompt.length > 60 ? schedule.prompt.slice(0, 57) + "..." : schedule.prompt;
18066
18081
  console.log(`${"Prompt:".padEnd(16)}${chalk36.dim(promptPreview)}`);
@@ -18506,4 +18521,4 @@ export {
18506
18521
  zeroSecretCommand,
18507
18522
  zeroVariableCommand
18508
18523
  };
18509
- //# sourceMappingURL=chunk-ZKST6ZZZ.js.map
18524
+ //# sourceMappingURL=chunk-RXI3UIUZ.js.map