@vm0/cli 9.102.1 → 9.102.3

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.
@@ -49,7 +49,7 @@ if (DSN) {
49
49
  Sentry.init({
50
50
  dsn: DSN,
51
51
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
52
- release: "9.102.1",
52
+ release: "9.102.3",
53
53
  sendDefaultPii: false,
54
54
  tracesSampleRate: 0,
55
55
  shutdownTimeout: 500,
@@ -68,7 +68,7 @@ if (DSN) {
68
68
  }
69
69
  });
70
70
  Sentry.setContext("cli", {
71
- version: "9.102.1",
71
+ version: "9.102.3",
72
72
  command: process.argv.slice(2).join(" ")
73
73
  });
74
74
  Sentry.setContext("runtime", {
@@ -5210,6 +5210,8 @@ var CONNECTOR_TYPES = CONNECTOR_TYPES_DEF;
5210
5210
  var connectorTypeSchema = z.enum(
5211
5211
  Object.keys(CONNECTOR_TYPES_DEF)
5212
5212
  );
5213
+
5214
+ // ../../packages/core/src/contracts/connector-utils.ts
5213
5215
  function getConnectorEnvironmentMapping(type) {
5214
5216
  return CONNECTOR_TYPES[type].environmentMapping;
5215
5217
  }
@@ -5287,56 +5289,6 @@ function getConnectorTypeForSecretName(name) {
5287
5289
  }
5288
5290
  return null;
5289
5291
  }
5290
- var connectorResponseSchema = z.object({
5291
- id: z.uuid().nullable(),
5292
- type: connectorTypeSchema,
5293
- authMethod: z.string(),
5294
- externalId: z.string().nullable(),
5295
- externalUsername: z.string().nullable(),
5296
- externalEmail: z.string().nullable(),
5297
- oauthScopes: z.array(z.string()).nullable(),
5298
- needsReconnect: z.boolean(),
5299
- createdAt: z.string(),
5300
- updatedAt: z.string()
5301
- });
5302
- var connectorListResponseSchema = z.object({
5303
- connectors: z.array(connectorResponseSchema),
5304
- configuredTypes: z.array(connectorTypeSchema),
5305
- connectorProvidedSecretNames: z.array(z.string())
5306
- });
5307
- var scopeDiffResponseSchema = z.object({
5308
- addedScopes: z.array(z.string()),
5309
- removedScopes: z.array(z.string()),
5310
- currentScopes: z.array(z.string()),
5311
- storedScopes: z.array(z.string())
5312
- });
5313
- var connectorSessionStatusSchema = z.enum([
5314
- "pending",
5315
- "complete",
5316
- "expired",
5317
- "error"
5318
- ]);
5319
- var connectorSessionResponseSchema = z.object({
5320
- id: z.uuid(),
5321
- code: z.string(),
5322
- type: connectorTypeSchema,
5323
- status: connectorSessionStatusSchema,
5324
- verificationUrl: z.string(),
5325
- expiresIn: z.number(),
5326
- interval: z.number(),
5327
- errorMessage: z.string().nullable().optional()
5328
- });
5329
- var connectorSessionStatusResponseSchema = z.object({
5330
- status: connectorSessionStatusSchema,
5331
- errorMessage: z.string().nullable().optional()
5332
- });
5333
- var computerConnectorCreateResponseSchema = z.object({
5334
- id: z.uuid(),
5335
- ngrokToken: z.string(),
5336
- bridgeToken: z.string(),
5337
- endpointPrefix: z.string(),
5338
- domain: z.string()
5339
- });
5340
5292
 
5341
5293
  // ../../packages/core/src/firewalls/agentmail.generated.ts
5342
5294
  var agentmailFirewall = {
@@ -27174,6 +27126,59 @@ var runnerRealtimeTokenContract = c13.router({
27174
27126
  }
27175
27127
  });
27176
27128
 
27129
+ // ../../packages/core/src/contracts/connector-schemas.ts
27130
+ import { z as z22 } from "zod";
27131
+ var connectorResponseSchema = z22.object({
27132
+ id: z22.uuid().nullable(),
27133
+ type: connectorTypeSchema,
27134
+ authMethod: z22.string(),
27135
+ externalId: z22.string().nullable(),
27136
+ externalUsername: z22.string().nullable(),
27137
+ externalEmail: z22.string().nullable(),
27138
+ oauthScopes: z22.array(z22.string()).nullable(),
27139
+ needsReconnect: z22.boolean(),
27140
+ createdAt: z22.string(),
27141
+ updatedAt: z22.string()
27142
+ });
27143
+ var connectorListResponseSchema = z22.object({
27144
+ connectors: z22.array(connectorResponseSchema),
27145
+ configuredTypes: z22.array(connectorTypeSchema),
27146
+ connectorProvidedSecretNames: z22.array(z22.string())
27147
+ });
27148
+ var scopeDiffResponseSchema = z22.object({
27149
+ addedScopes: z22.array(z22.string()),
27150
+ removedScopes: z22.array(z22.string()),
27151
+ currentScopes: z22.array(z22.string()),
27152
+ storedScopes: z22.array(z22.string())
27153
+ });
27154
+ var connectorSessionStatusSchema = z22.enum([
27155
+ "pending",
27156
+ "complete",
27157
+ "expired",
27158
+ "error"
27159
+ ]);
27160
+ var connectorSessionResponseSchema = z22.object({
27161
+ id: z22.uuid(),
27162
+ code: z22.string(),
27163
+ type: connectorTypeSchema,
27164
+ status: connectorSessionStatusSchema,
27165
+ verificationUrl: z22.string(),
27166
+ expiresIn: z22.number(),
27167
+ interval: z22.number(),
27168
+ errorMessage: z22.string().nullable().optional()
27169
+ });
27170
+ var connectorSessionStatusResponseSchema = z22.object({
27171
+ status: connectorSessionStatusSchema,
27172
+ errorMessage: z22.string().nullable().optional()
27173
+ });
27174
+ var computerConnectorCreateResponseSchema = z22.object({
27175
+ id: z22.uuid(),
27176
+ ngrokToken: z22.string(),
27177
+ bridgeToken: z22.string(),
27178
+ endpointPrefix: z22.string(),
27179
+ domain: z22.string()
27180
+ });
27181
+
27177
27182
  // ../../packages/core/src/firewall-loader.ts
27178
27183
  import { parse as parseYaml } from "yaml";
27179
27184
  var MAX_RESPONSE_SIZE = 128 * 1024;
@@ -27271,17 +27276,17 @@ function findMatchingPermissions(method, path, config, graphqlBody) {
27271
27276
  }
27272
27277
 
27273
27278
  // ../../packages/core/src/contracts/zero-user-preferences.ts
27274
- import { z as z22 } from "zod";
27279
+ import { z as z23 } from "zod";
27275
27280
  var c14 = initContract();
27276
- var sendModeSchema = z22.enum(["enter", "cmd-enter"]);
27277
- var userPreferencesResponseSchema = z22.object({
27278
- timezone: z22.string().nullable(),
27279
- pinnedAgentIds: z22.array(z22.string()),
27281
+ var sendModeSchema = z23.enum(["enter", "cmd-enter"]);
27282
+ var userPreferencesResponseSchema = z23.object({
27283
+ timezone: z23.string().nullable(),
27284
+ pinnedAgentIds: z23.array(z23.string()),
27280
27285
  sendMode: sendModeSchema
27281
27286
  });
27282
- var updateUserPreferencesRequestSchema = z22.object({
27283
- timezone: z22.string().min(1).optional(),
27284
- pinnedAgentIds: z22.array(z22.string()).optional(),
27287
+ var updateUserPreferencesRequestSchema = z23.object({
27288
+ timezone: z23.string().min(1).optional(),
27289
+ pinnedAgentIds: z23.array(z23.string()).optional(),
27285
27290
  sendMode: sendModeSchema.optional()
27286
27291
  }).refine(
27287
27292
  (data) => {
@@ -27319,31 +27324,31 @@ var zeroUserPreferencesContract = c14.router({
27319
27324
  });
27320
27325
 
27321
27326
  // ../../packages/core/src/contracts/org-list.ts
27322
- import { z as z23 } from "zod";
27323
- var orgListItemSchema = z23.object({
27324
- slug: z23.string(),
27325
- role: z23.string()
27327
+ import { z as z24 } from "zod";
27328
+ var orgListItemSchema = z24.object({
27329
+ slug: z24.string(),
27330
+ role: z24.string()
27326
27331
  });
27327
- var orgListResponseSchema = z23.object({
27328
- orgs: z23.array(orgListItemSchema),
27329
- active: z23.string().optional()
27332
+ var orgListResponseSchema = z24.object({
27333
+ orgs: z24.array(orgListItemSchema),
27334
+ active: z24.string().optional()
27330
27335
  });
27331
27336
 
27332
27337
  // ../../packages/core/src/contracts/onboarding.ts
27333
- import { z as z24 } from "zod";
27338
+ import { z as z25 } from "zod";
27334
27339
  var c15 = initContract();
27335
- var onboardingStatusResponseSchema = z24.object({
27336
- needsOnboarding: z24.boolean(),
27337
- isAdmin: z24.boolean(),
27338
- hasOrg: z24.boolean(),
27339
- hasDefaultAgent: z24.boolean(),
27340
- defaultAgentId: z24.string().nullable(),
27341
- defaultAgentMetadata: z24.object({
27342
- displayName: z24.string().optional(),
27343
- description: z24.string().optional(),
27344
- sound: z24.string().optional()
27340
+ var onboardingStatusResponseSchema = z25.object({
27341
+ needsOnboarding: z25.boolean(),
27342
+ isAdmin: z25.boolean(),
27343
+ hasOrg: z25.boolean(),
27344
+ hasDefaultAgent: z25.boolean(),
27345
+ defaultAgentId: z25.string().nullable(),
27346
+ defaultAgentMetadata: z25.object({
27347
+ displayName: z25.string().optional(),
27348
+ description: z25.string().optional(),
27349
+ sound: z25.string().optional()
27345
27350
  }).nullable(),
27346
- defaultAgentSkills: z24.array(z24.string())
27351
+ defaultAgentSkills: z25.array(z25.string())
27347
27352
  });
27348
27353
  var onboardingStatusContract = c15.router({
27349
27354
  getStatus: {
@@ -27364,7 +27369,7 @@ var onboardingCompleteContract = c15.router({
27364
27369
  headers: authHeadersSchema,
27365
27370
  body: c15.noBody(),
27366
27371
  responses: {
27367
- 200: z24.object({ ok: z24.boolean() }),
27372
+ 200: z25.object({ ok: z25.boolean() }),
27368
27373
  401: apiErrorSchema
27369
27374
  },
27370
27375
  summary: "Mark member onboarding as complete"
@@ -27375,15 +27380,15 @@ var onboardingSetupContract = c15.router({
27375
27380
  method: "POST",
27376
27381
  path: "/api/zero/onboarding/setup",
27377
27382
  headers: authHeadersSchema,
27378
- body: z24.object({
27379
- displayName: z24.string(),
27380
- workspaceName: z24.string().optional(),
27381
- sound: z24.string().optional(),
27382
- avatarUrl: z24.string().optional(),
27383
- selectedConnectors: z24.array(z24.string()).optional()
27383
+ body: z25.object({
27384
+ displayName: z25.string(),
27385
+ workspaceName: z25.string().optional(),
27386
+ sound: z25.string().optional(),
27387
+ avatarUrl: z25.string().optional(),
27388
+ selectedConnectors: z25.array(z25.string()).optional()
27384
27389
  }),
27385
27390
  responses: {
27386
- 200: z24.object({ agentId: z24.string() }),
27391
+ 200: z25.object({ agentId: z25.string() }),
27387
27392
  401: apiErrorSchema,
27388
27393
  422: apiErrorSchema
27389
27394
  },
@@ -27392,15 +27397,15 @@ var onboardingSetupContract = c15.router({
27392
27397
  });
27393
27398
 
27394
27399
  // ../../packages/core/src/contracts/skills.ts
27395
- import { z as z25 } from "zod";
27400
+ import { z as z26 } from "zod";
27396
27401
  var c16 = initContract();
27397
- var skillFrontmatterSchema = z25.object({
27398
- name: z25.string().optional(),
27399
- description: z25.string().optional()
27402
+ var skillFrontmatterSchema = z26.object({
27403
+ name: z26.string().optional(),
27404
+ description: z26.string().optional()
27400
27405
  });
27401
- var resolvedSkillSchema = z25.object({
27402
- storageName: z25.string(),
27403
- versionHash: z25.string(),
27406
+ var resolvedSkillSchema = z26.object({
27407
+ storageName: z26.string(),
27408
+ versionHash: z26.string(),
27404
27409
  frontmatter: skillFrontmatterSchema
27405
27410
  });
27406
27411
  var skillsResolveContract = c16.router({
@@ -27408,13 +27413,13 @@ var skillsResolveContract = c16.router({
27408
27413
  method: "POST",
27409
27414
  path: "/api/skills/resolve",
27410
27415
  headers: authHeadersSchema,
27411
- body: z25.object({
27412
- skills: z25.array(z25.url()).min(1).max(100)
27416
+ body: z26.object({
27417
+ skills: z26.array(z26.url()).min(1).max(100)
27413
27418
  }),
27414
27419
  responses: {
27415
- 200: z25.object({
27416
- resolved: z25.record(z25.string(), resolvedSkillSchema),
27417
- unresolved: z25.array(z25.string())
27420
+ 200: z26.object({
27421
+ resolved: z26.record(z26.string(), resolvedSkillSchema),
27422
+ unresolved: z26.array(z26.string())
27418
27423
  }),
27419
27424
  400: apiErrorSchema,
27420
27425
  401: apiErrorSchema
@@ -27424,38 +27429,38 @@ var skillsResolveContract = c16.router({
27424
27429
  });
27425
27430
 
27426
27431
  // ../../packages/core/src/contracts/zero-agents.ts
27427
- import { z as z26 } from "zod";
27432
+ import { z as z27 } from "zod";
27428
27433
  var c17 = initContract();
27429
- var zeroAgentCustomSkillNameSchema = z26.string().min(2).max(64).regex(/^[a-z0-9][a-z0-9-]*[a-z0-9]$/);
27430
- var zeroAgentResponseSchema = z26.object({
27431
- agentId: z26.string(),
27432
- ownerId: z26.string(),
27433
- description: z26.string().nullable(),
27434
- displayName: z26.string().nullable(),
27435
- sound: z26.string().nullable(),
27436
- avatarUrl: z26.string().nullable(),
27434
+ var zeroAgentCustomSkillNameSchema = z27.string().min(2).max(64).regex(/^[a-z0-9][a-z0-9-]*[a-z0-9]$/);
27435
+ var zeroAgentResponseSchema = z27.object({
27436
+ agentId: z27.string(),
27437
+ ownerId: z27.string(),
27438
+ description: z27.string().nullable(),
27439
+ displayName: z27.string().nullable(),
27440
+ sound: z27.string().nullable(),
27441
+ avatarUrl: z27.string().nullable(),
27437
27442
  firewallPolicies: firewallPoliciesSchema.nullable(),
27438
- customSkills: z26.array(z26.string()).default([])
27443
+ customSkills: z27.array(z27.string()).default([])
27439
27444
  });
27440
- var zeroAgentRequestSchema = z26.object({
27441
- description: z26.string().optional(),
27442
- displayName: z26.string().optional(),
27443
- sound: z26.string().optional(),
27444
- avatarUrl: z26.string().optional(),
27445
- customSkills: z26.array(zeroAgentCustomSkillNameSchema).optional()
27445
+ var zeroAgentRequestSchema = z27.object({
27446
+ description: z27.string().optional(),
27447
+ displayName: z27.string().optional(),
27448
+ sound: z27.string().optional(),
27449
+ avatarUrl: z27.string().optional(),
27450
+ customSkills: z27.array(zeroAgentCustomSkillNameSchema).optional()
27446
27451
  });
27447
- var zeroAgentMetadataRequestSchema = z26.object({
27448
- displayName: z26.string().optional(),
27449
- description: z26.string().optional(),
27450
- sound: z26.string().optional(),
27451
- avatarUrl: z26.string().nullable().optional()
27452
+ var zeroAgentMetadataRequestSchema = z27.object({
27453
+ displayName: z27.string().optional(),
27454
+ description: z27.string().optional(),
27455
+ sound: z27.string().optional(),
27456
+ avatarUrl: z27.string().nullable().optional()
27452
27457
  });
27453
- var zeroAgentInstructionsResponseSchema = z26.object({
27454
- content: z26.string().nullable(),
27455
- filename: z26.string().nullable()
27458
+ var zeroAgentInstructionsResponseSchema = z27.object({
27459
+ content: z27.string().nullable(),
27460
+ filename: z27.string().nullable()
27456
27461
  });
27457
- var zeroAgentInstructionsRequestSchema = z26.object({
27458
- content: z26.string()
27462
+ var zeroAgentInstructionsRequestSchema = z27.object({
27463
+ content: z27.string()
27459
27464
  });
27460
27465
  var zeroAgentsMainContract = c17.router({
27461
27466
  create: {
@@ -27477,7 +27482,7 @@ var zeroAgentsMainContract = c17.router({
27477
27482
  path: "/api/zero/agents",
27478
27483
  headers: authHeadersSchema,
27479
27484
  responses: {
27480
- 200: z26.array(zeroAgentResponseSchema),
27485
+ 200: z27.array(zeroAgentResponseSchema),
27481
27486
  401: apiErrorSchema,
27482
27487
  403: apiErrorSchema
27483
27488
  },
@@ -27489,7 +27494,7 @@ var zeroAgentsByIdContract = c17.router({
27489
27494
  method: "GET",
27490
27495
  path: "/api/zero/agents/:id",
27491
27496
  headers: authHeadersSchema,
27492
- pathParams: z26.object({ id: z26.string().uuid() }),
27497
+ pathParams: z27.object({ id: z27.string().uuid() }),
27493
27498
  responses: {
27494
27499
  200: zeroAgentResponseSchema,
27495
27500
  401: apiErrorSchema,
@@ -27502,7 +27507,7 @@ var zeroAgentsByIdContract = c17.router({
27502
27507
  method: "PUT",
27503
27508
  path: "/api/zero/agents/:id",
27504
27509
  headers: authHeadersSchema,
27505
- pathParams: z26.object({ id: z26.string().uuid() }),
27510
+ pathParams: z27.object({ id: z27.string().uuid() }),
27506
27511
  body: zeroAgentRequestSchema,
27507
27512
  responses: {
27508
27513
  200: zeroAgentResponseSchema,
@@ -27518,7 +27523,7 @@ var zeroAgentsByIdContract = c17.router({
27518
27523
  method: "PATCH",
27519
27524
  path: "/api/zero/agents/:id",
27520
27525
  headers: authHeadersSchema,
27521
- pathParams: z26.object({ id: z26.string().uuid() }),
27526
+ pathParams: z27.object({ id: z27.string().uuid() }),
27522
27527
  body: zeroAgentMetadataRequestSchema,
27523
27528
  responses: {
27524
27529
  200: zeroAgentResponseSchema,
@@ -27532,7 +27537,7 @@ var zeroAgentsByIdContract = c17.router({
27532
27537
  method: "DELETE",
27533
27538
  path: "/api/zero/agents/:id",
27534
27539
  headers: authHeadersSchema,
27535
- pathParams: z26.object({ id: z26.string().uuid() }),
27540
+ pathParams: z27.object({ id: z27.string().uuid() }),
27536
27541
  body: c17.noBody(),
27537
27542
  responses: {
27538
27543
  204: c17.noBody(),
@@ -27544,8 +27549,8 @@ var zeroAgentsByIdContract = c17.router({
27544
27549
  summary: "Delete zero agent by id"
27545
27550
  }
27546
27551
  });
27547
- var zeroAgentFirewallPoliciesRequestSchema = z26.object({
27548
- agentId: z26.string().uuid(),
27552
+ var zeroAgentFirewallPoliciesRequestSchema = z27.object({
27553
+ agentId: z27.string().uuid(),
27549
27554
  policies: firewallPoliciesSchema
27550
27555
  });
27551
27556
  var zeroAgentFirewallPoliciesContract = c17.router({
@@ -27569,7 +27574,7 @@ var zeroAgentInstructionsContract = c17.router({
27569
27574
  method: "GET",
27570
27575
  path: "/api/zero/agents/:id/instructions",
27571
27576
  headers: authHeadersSchema,
27572
- pathParams: z26.object({ id: z26.string().uuid() }),
27577
+ pathParams: z27.object({ id: z27.string().uuid() }),
27573
27578
  responses: {
27574
27579
  200: zeroAgentInstructionsResponseSchema,
27575
27580
  401: apiErrorSchema,
@@ -27582,7 +27587,7 @@ var zeroAgentInstructionsContract = c17.router({
27582
27587
  method: "PUT",
27583
27588
  path: "/api/zero/agents/:id/instructions",
27584
27589
  headers: authHeadersSchema,
27585
- pathParams: z26.object({ id: z26.string().uuid() }),
27590
+ pathParams: z27.object({ id: z27.string().uuid() }),
27586
27591
  body: zeroAgentInstructionsRequestSchema,
27587
27592
  responses: {
27588
27593
  200: zeroAgentResponseSchema,
@@ -27594,13 +27599,13 @@ var zeroAgentInstructionsContract = c17.router({
27594
27599
  summary: "Update zero agent instructions"
27595
27600
  }
27596
27601
  });
27597
- var zeroAgentCustomSkillSchema = z26.object({
27602
+ var zeroAgentCustomSkillSchema = z27.object({
27598
27603
  name: zeroAgentCustomSkillNameSchema,
27599
- displayName: z26.string().max(256).nullable(),
27600
- description: z26.string().max(1024).nullable()
27604
+ displayName: z27.string().max(256).nullable(),
27605
+ description: z27.string().max(1024).nullable()
27601
27606
  });
27602
- var skillFileEntrySchema = z26.object({
27603
- path: z26.string().min(1).max(256).refine(
27607
+ var skillFileEntrySchema = z27.object({
27608
+ path: z27.string().min(1).max(256).refine(
27604
27609
  (p) => {
27605
27610
  return !p.startsWith("/");
27606
27611
  },
@@ -27613,12 +27618,12 @@ var skillFileEntrySchema = z26.object({
27613
27618
  message: "Path must not contain .."
27614
27619
  }
27615
27620
  ),
27616
- content: z26.string()
27621
+ content: z27.string()
27617
27622
  });
27618
27623
  var SKILL_FILES_MAX_BYTES = 5 * 1024 * 1024;
27619
27624
  var SKILL_FILES_MAX_COUNT = 500;
27620
- var zeroAgentSkillFilesRequestSchema = z26.object({
27621
- files: z26.array(skillFileEntrySchema).min(1, "At least one file is required").max(
27625
+ var zeroAgentSkillFilesRequestSchema = z27.object({
27626
+ files: z27.array(skillFileEntrySchema).min(1, "At least one file is required").max(
27622
27627
  SKILL_FILES_MAX_COUNT,
27623
27628
  `Maximum ${SKILL_FILES_MAX_COUNT} files allowed`
27624
27629
  ).refine(
@@ -27640,18 +27645,18 @@ var zeroAgentSkillFilesRequestSchema = z26.object({
27640
27645
  { message: "Total file size must not exceed 5MB" }
27641
27646
  )
27642
27647
  });
27643
- var skillFileMetadataSchema = z26.object({
27644
- path: z26.string(),
27645
- size: z26.number()
27648
+ var skillFileMetadataSchema = z27.object({
27649
+ path: z27.string(),
27650
+ size: z27.number()
27646
27651
  });
27647
- var zeroAgentSkillContentResponseSchema = z26.object({
27648
- name: z26.string(),
27649
- displayName: z26.string().nullable(),
27650
- description: z26.string().nullable(),
27651
- content: z26.string().nullable(),
27652
- files: z26.array(skillFileMetadataSchema).nullable()
27652
+ var zeroAgentSkillContentResponseSchema = z27.object({
27653
+ name: z27.string(),
27654
+ displayName: z27.string().nullable(),
27655
+ description: z27.string().nullable(),
27656
+ content: z27.string().nullable(),
27657
+ files: z27.array(skillFileMetadataSchema).nullable()
27653
27658
  });
27654
- var zeroAgentSkillListResponseSchema = z26.array(
27659
+ var zeroAgentSkillListResponseSchema = z27.array(
27655
27660
  zeroAgentCustomSkillSchema
27656
27661
  );
27657
27662
  var zeroSkillsCollectionContract = c17.router({
@@ -27672,8 +27677,8 @@ var zeroSkillsCollectionContract = c17.router({
27672
27677
  headers: authHeadersSchema,
27673
27678
  body: zeroAgentSkillFilesRequestSchema.extend({
27674
27679
  name: zeroAgentCustomSkillNameSchema,
27675
- displayName: z26.string().max(256).optional(),
27676
- description: z26.string().max(1024).optional()
27680
+ displayName: z27.string().max(256).optional(),
27681
+ description: z27.string().max(1024).optional()
27677
27682
  }),
27678
27683
  responses: {
27679
27684
  201: zeroAgentCustomSkillSchema,
@@ -27690,7 +27695,7 @@ var zeroSkillsDetailContract = c17.router({
27690
27695
  method: "GET",
27691
27696
  path: "/api/zero/skills/:name",
27692
27697
  headers: authHeadersSchema,
27693
- pathParams: z26.object({ name: zeroAgentCustomSkillNameSchema }),
27698
+ pathParams: z27.object({ name: zeroAgentCustomSkillNameSchema }),
27694
27699
  responses: {
27695
27700
  200: zeroAgentSkillContentResponseSchema,
27696
27701
  401: apiErrorSchema,
@@ -27703,7 +27708,7 @@ var zeroSkillsDetailContract = c17.router({
27703
27708
  method: "PUT",
27704
27709
  path: "/api/zero/skills/:name",
27705
27710
  headers: authHeadersSchema,
27706
- pathParams: z26.object({ name: zeroAgentCustomSkillNameSchema }),
27711
+ pathParams: z27.object({ name: zeroAgentCustomSkillNameSchema }),
27707
27712
  body: zeroAgentSkillFilesRequestSchema,
27708
27713
  responses: {
27709
27714
  200: zeroAgentSkillContentResponseSchema,
@@ -27717,7 +27722,7 @@ var zeroSkillsDetailContract = c17.router({
27717
27722
  method: "DELETE",
27718
27723
  path: "/api/zero/skills/:name",
27719
27724
  headers: authHeadersSchema,
27720
- pathParams: z26.object({ name: zeroAgentCustomSkillNameSchema }),
27725
+ pathParams: z27.object({ name: zeroAgentCustomSkillNameSchema }),
27721
27726
  body: c17.noBody(),
27722
27727
  responses: {
27723
27728
  204: c17.noBody(),
@@ -27728,37 +27733,37 @@ var zeroSkillsDetailContract = c17.router({
27728
27733
  summary: "Delete custom skill from the organization"
27729
27734
  }
27730
27735
  });
27731
- var firewallAccessRequestStatusSchema = z26.enum([
27736
+ var firewallAccessRequestStatusSchema = z27.enum([
27732
27737
  "pending",
27733
27738
  "approved",
27734
27739
  "rejected"
27735
27740
  ]);
27736
- var firewallAccessRequestResponseSchema = z26.object({
27737
- id: z26.string().uuid(),
27738
- agentId: z26.string().uuid(),
27739
- firewallRef: z26.string(),
27740
- permission: z26.string(),
27741
- method: z26.string().nullable(),
27742
- path: z26.string().nullable(),
27743
- reason: z26.string().nullable(),
27741
+ var firewallAccessRequestResponseSchema = z27.object({
27742
+ id: z27.string().uuid(),
27743
+ agentId: z27.string().uuid(),
27744
+ firewallRef: z27.string(),
27745
+ permission: z27.string(),
27746
+ method: z27.string().nullable(),
27747
+ path: z27.string().nullable(),
27748
+ reason: z27.string().nullable(),
27744
27749
  status: firewallAccessRequestStatusSchema,
27745
- requesterUserId: z26.string(),
27746
- requesterName: z26.string().nullable(),
27747
- resolvedBy: z26.string().nullable(),
27748
- resolvedAt: z26.string().nullable(),
27749
- createdAt: z26.string()
27750
- });
27751
- var createFirewallAccessRequestSchema = z26.object({
27752
- agentId: z26.string().uuid(),
27753
- firewallRef: z26.string(),
27754
- permission: z26.string(),
27755
- method: z26.string().optional(),
27756
- path: z26.string().optional(),
27757
- reason: z26.string().optional()
27758
- });
27759
- var resolveFirewallAccessRequestSchema = z26.object({
27760
- requestId: z26.string().uuid(),
27761
- action: z26.enum(["approve", "reject"])
27750
+ requesterUserId: z27.string(),
27751
+ requesterName: z27.string().nullable(),
27752
+ resolvedBy: z27.string().nullable(),
27753
+ resolvedAt: z27.string().nullable(),
27754
+ createdAt: z27.string()
27755
+ });
27756
+ var createFirewallAccessRequestSchema = z27.object({
27757
+ agentId: z27.string().uuid(),
27758
+ firewallRef: z27.string(),
27759
+ permission: z27.string(),
27760
+ method: z27.string().optional(),
27761
+ path: z27.string().optional(),
27762
+ reason: z27.string().optional()
27763
+ });
27764
+ var resolveFirewallAccessRequestSchema = z27.object({
27765
+ requestId: z27.string().uuid(),
27766
+ action: z27.enum(["approve", "reject"])
27762
27767
  });
27763
27768
  var firewallAccessRequestsCreateContract = c17.router({
27764
27769
  create: {
@@ -27776,9 +27781,9 @@ var firewallAccessRequestsCreateContract = c17.router({
27776
27781
  summary: "Create firewall access request"
27777
27782
  }
27778
27783
  });
27779
- var firewallAccessRequestsListQuerySchema = z26.object({
27780
- agentId: z26.string(),
27781
- status: z26.string().optional()
27784
+ var firewallAccessRequestsListQuerySchema = z27.object({
27785
+ agentId: z27.string(),
27786
+ status: z27.string().optional()
27782
27787
  });
27783
27788
  var firewallAccessRequestsListContract = c17.router({
27784
27789
  list: {
@@ -27787,7 +27792,7 @@ var firewallAccessRequestsListContract = c17.router({
27787
27792
  headers: authHeadersSchema,
27788
27793
  query: firewallAccessRequestsListQuerySchema,
27789
27794
  responses: {
27790
- 200: z26.array(firewallAccessRequestResponseSchema),
27795
+ 200: z27.array(firewallAccessRequestResponseSchema),
27791
27796
  400: apiErrorSchema,
27792
27797
  401: apiErrorSchema,
27793
27798
  403: apiErrorSchema
@@ -27813,17 +27818,17 @@ var firewallAccessRequestsResolveContract = c17.router({
27813
27818
  });
27814
27819
 
27815
27820
  // ../../packages/core/src/contracts/user-connectors.ts
27816
- import { z as z27 } from "zod";
27821
+ import { z as z28 } from "zod";
27817
27822
  var c18 = initContract();
27818
- var userConnectorEnabledTypesSchema = z27.object({
27819
- enabledTypes: z27.array(z27.string())
27823
+ var userConnectorEnabledTypesSchema = z28.object({
27824
+ enabledTypes: z28.array(z28.string())
27820
27825
  });
27821
27826
  var zeroUserConnectorsContract = c18.router({
27822
27827
  get: {
27823
27828
  method: "GET",
27824
27829
  path: "/api/zero/agents/:id/user-connectors",
27825
27830
  headers: authHeadersSchema,
27826
- pathParams: z27.object({ id: z27.string().uuid() }),
27831
+ pathParams: z28.object({ id: z28.string().uuid() }),
27827
27832
  responses: {
27828
27833
  200: userConnectorEnabledTypesSchema,
27829
27834
  401: apiErrorSchema,
@@ -27836,7 +27841,7 @@ var zeroUserConnectorsContract = c18.router({
27836
27841
  method: "PUT",
27837
27842
  path: "/api/zero/agents/:id/user-connectors",
27838
27843
  headers: authHeadersSchema,
27839
- pathParams: z27.object({ id: z27.string().uuid() }),
27844
+ pathParams: z28.object({ id: z28.string().uuid() }),
27840
27845
  body: userConnectorEnabledTypesSchema,
27841
27846
  responses: {
27842
27847
  200: userConnectorEnabledTypesSchema,
@@ -27850,7 +27855,7 @@ var zeroUserConnectorsContract = c18.router({
27850
27855
  });
27851
27856
 
27852
27857
  // ../../packages/core/src/contracts/zero-connectors.ts
27853
- import { z as z28 } from "zod";
27858
+ import { z as z29 } from "zod";
27854
27859
  var c19 = initContract();
27855
27860
  var zeroConnectorsMainContract = c19.router({
27856
27861
  list: {
@@ -27870,7 +27875,7 @@ var zeroConnectorsByTypeContract = c19.router({
27870
27875
  method: "GET",
27871
27876
  path: "/api/zero/connectors/:type",
27872
27877
  headers: authHeadersSchema,
27873
- pathParams: z28.object({ type: connectorTypeSchema }),
27878
+ pathParams: z29.object({ type: connectorTypeSchema }),
27874
27879
  responses: {
27875
27880
  200: connectorResponseSchema,
27876
27881
  401: apiErrorSchema,
@@ -27882,7 +27887,7 @@ var zeroConnectorsByTypeContract = c19.router({
27882
27887
  method: "DELETE",
27883
27888
  path: "/api/zero/connectors/:type",
27884
27889
  headers: authHeadersSchema,
27885
- pathParams: z28.object({ type: connectorTypeSchema }),
27890
+ pathParams: z29.object({ type: connectorTypeSchema }),
27886
27891
  responses: {
27887
27892
  204: c19.noBody(),
27888
27893
  401: apiErrorSchema,
@@ -27896,7 +27901,7 @@ var zeroConnectorScopeDiffContract = c19.router({
27896
27901
  method: "GET",
27897
27902
  path: "/api/zero/connectors/:type/scope-diff",
27898
27903
  headers: authHeadersSchema,
27899
- pathParams: z28.object({ type: connectorTypeSchema }),
27904
+ pathParams: z29.object({ type: connectorTypeSchema }),
27900
27905
  responses: {
27901
27906
  200: scopeDiffResponseSchema,
27902
27907
  401: apiErrorSchema,
@@ -27905,22 +27910,22 @@ var zeroConnectorScopeDiffContract = c19.router({
27905
27910
  summary: "Get scope diff for a connector"
27906
27911
  }
27907
27912
  });
27908
- var connectorSearchAuthMethodSchema = z28.enum(["oauth", "api-token"]);
27909
- var connectorSearchItemSchema = z28.object({
27910
- id: z28.string(),
27911
- label: z28.string(),
27912
- description: z28.string(),
27913
- authMethods: z28.array(connectorSearchAuthMethodSchema)
27913
+ var connectorSearchAuthMethodSchema = z29.enum(["oauth", "api-token"]);
27914
+ var connectorSearchItemSchema = z29.object({
27915
+ id: z29.string(),
27916
+ label: z29.string(),
27917
+ description: z29.string(),
27918
+ authMethods: z29.array(connectorSearchAuthMethodSchema)
27914
27919
  });
27915
- var connectorSearchResponseSchema = z28.object({
27916
- connectors: z28.array(connectorSearchItemSchema)
27920
+ var connectorSearchResponseSchema = z29.object({
27921
+ connectors: z29.array(connectorSearchItemSchema)
27917
27922
  });
27918
27923
  var zeroConnectorsSearchContract = c19.router({
27919
27924
  search: {
27920
27925
  method: "GET",
27921
27926
  path: "/api/zero/connectors/search",
27922
27927
  headers: authHeadersSchema,
27923
- query: z28.object({ keyword: z28.string().optional() }),
27928
+ query: z29.object({ keyword: z29.string().optional() }),
27924
27929
  responses: {
27925
27930
  200: connectorSearchResponseSchema,
27926
27931
  401: apiErrorSchema
@@ -27933,8 +27938,8 @@ var zeroConnectorSessionsContract = c19.router({
27933
27938
  method: "POST",
27934
27939
  path: "/api/zero/connectors/:type/sessions",
27935
27940
  headers: authHeadersSchema,
27936
- pathParams: z28.object({ type: connectorTypeSchema }),
27937
- body: z28.object({}).optional(),
27941
+ pathParams: z29.object({ type: connectorTypeSchema }),
27942
+ body: z29.object({}).optional(),
27938
27943
  responses: {
27939
27944
  200: connectorSessionResponseSchema,
27940
27945
  400: apiErrorSchema,
@@ -27948,9 +27953,9 @@ var zeroConnectorSessionByIdContract = c19.router({
27948
27953
  method: "GET",
27949
27954
  path: "/api/zero/connectors/:type/sessions/:sessionId",
27950
27955
  headers: authHeadersSchema,
27951
- pathParams: z28.object({
27956
+ pathParams: z29.object({
27952
27957
  type: connectorTypeSchema,
27953
- sessionId: z28.uuid()
27958
+ sessionId: z29.uuid()
27954
27959
  }),
27955
27960
  responses: {
27956
27961
  200: connectorSessionStatusResponseSchema,
@@ -27966,7 +27971,7 @@ var zeroComputerConnectorContract = c19.router({
27966
27971
  method: "POST",
27967
27972
  path: "/api/zero/connectors/computer",
27968
27973
  headers: authHeadersSchema,
27969
- body: z28.object({}).optional(),
27974
+ body: z29.object({}).optional(),
27970
27975
  responses: {
27971
27976
  200: computerConnectorCreateResponseSchema,
27972
27977
  400: apiErrorSchema,
@@ -28000,7 +28005,7 @@ var zeroComputerConnectorContract = c19.router({
28000
28005
  });
28001
28006
 
28002
28007
  // ../../packages/core/src/contracts/zero-org.ts
28003
- import { z as z29 } from "zod";
28008
+ import { z as z30 } from "zod";
28004
28009
  var c20 = initContract();
28005
28010
  var zeroOrgContract = c20.router({
28006
28011
  get: {
@@ -28036,7 +28041,7 @@ var zeroOrgLeaveContract = c20.router({
28036
28041
  method: "POST",
28037
28042
  path: "/api/zero/org/leave",
28038
28043
  headers: authHeadersSchema,
28039
- body: z29.object({}),
28044
+ body: z30.object({}),
28040
28045
  responses: {
28041
28046
  200: orgMessageResponseSchema,
28042
28047
  401: apiErrorSchema,
@@ -28051,7 +28056,7 @@ var zeroOrgDeleteContract = c20.router({
28051
28056
  method: "POST",
28052
28057
  path: "/api/zero/org/delete",
28053
28058
  headers: authHeadersSchema,
28054
- body: z29.object({ slug: z29.string() }),
28059
+ body: z30.object({ slug: z30.string() }),
28055
28060
  responses: {
28056
28061
  200: orgMessageResponseSchema,
28057
28062
  400: apiErrorSchema,
@@ -28243,15 +28248,15 @@ var zeroOrgDomainsContract = c23.router({
28243
28248
  });
28244
28249
 
28245
28250
  // ../../packages/core/src/contracts/zero-composes.ts
28246
- import { z as z30 } from "zod";
28251
+ import { z as z31 } from "zod";
28247
28252
  var c24 = initContract();
28248
28253
  var zeroComposesMainContract = c24.router({
28249
28254
  getByName: {
28250
28255
  method: "GET",
28251
28256
  path: "/api/zero/composes",
28252
28257
  headers: authHeadersSchema,
28253
- query: z30.object({
28254
- name: z30.string().min(1, "Missing name query parameter")
28258
+ query: z31.object({
28259
+ name: z31.string().min(1, "Missing name query parameter")
28255
28260
  }),
28256
28261
  responses: {
28257
28262
  200: composeResponseSchema,
@@ -28267,8 +28272,8 @@ var zeroComposesByIdContract = c24.router({
28267
28272
  method: "GET",
28268
28273
  path: "/api/zero/composes/:id",
28269
28274
  headers: authHeadersSchema,
28270
- pathParams: z30.object({
28271
- id: z30.string().min(1, "Compose ID is required")
28275
+ pathParams: z31.object({
28276
+ id: z31.string().min(1, "Compose ID is required")
28272
28277
  }),
28273
28278
  responses: {
28274
28279
  200: composeResponseSchema,
@@ -28282,8 +28287,8 @@ var zeroComposesByIdContract = c24.router({
28282
28287
  method: "DELETE",
28283
28288
  path: "/api/zero/composes/:id",
28284
28289
  headers: authHeadersSchema,
28285
- pathParams: z30.object({
28286
- id: z30.string().uuid("Compose ID is required")
28290
+ pathParams: z31.object({
28291
+ id: z31.string().uuid("Compose ID is required")
28287
28292
  }),
28288
28293
  body: c24.noBody(),
28289
28294
  responses: {
@@ -28301,10 +28306,10 @@ var zeroComposesListContract = c24.router({
28301
28306
  method: "GET",
28302
28307
  path: "/api/zero/composes/list",
28303
28308
  headers: authHeadersSchema,
28304
- query: z30.object({}),
28309
+ query: z31.object({}),
28305
28310
  responses: {
28306
- 200: z30.object({
28307
- composes: z30.array(composeListItemSchema)
28311
+ 200: z31.object({
28312
+ composes: z31.array(composeListItemSchema)
28308
28313
  }),
28309
28314
  400: apiErrorSchema,
28310
28315
  401: apiErrorSchema,
@@ -28315,7 +28320,7 @@ var zeroComposesListContract = c24.router({
28315
28320
  });
28316
28321
 
28317
28322
  // ../../packages/core/src/contracts/zero-runs.ts
28318
- import { z as z31 } from "zod";
28323
+ import { z as z32 } from "zod";
28319
28324
  var zeroRunRequestSchema = unifiedRunRequestSchema.omit({
28320
28325
  triggerSource: true,
28321
28326
  memoryName: true,
@@ -28328,8 +28333,8 @@ var zeroRunRequestSchema = unifiedRunRequestSchema.omit({
28328
28333
  agentComposeId: true,
28329
28334
  appendSystemPrompt: true
28330
28335
  }).extend({
28331
- agentId: z31.string().optional(),
28332
- modelProvider: z31.string().optional()
28336
+ agentId: z32.string().optional(),
28337
+ modelProvider: z32.string().optional()
28333
28338
  });
28334
28339
  var c25 = initContract();
28335
28340
  var zeroRunsMainContract = c25.router({
@@ -28353,8 +28358,8 @@ var zeroRunsByIdContract = c25.router({
28353
28358
  method: "GET",
28354
28359
  path: "/api/zero/runs/:id",
28355
28360
  headers: authHeadersSchema,
28356
- pathParams: z31.object({
28357
- id: z31.string().min(1, "Run ID is required")
28361
+ pathParams: z32.object({
28362
+ id: z32.string().min(1, "Run ID is required")
28358
28363
  }),
28359
28364
  responses: {
28360
28365
  200: getRunResponseSchema,
@@ -28370,10 +28375,10 @@ var zeroRunsCancelContract = c25.router({
28370
28375
  method: "POST",
28371
28376
  path: "/api/zero/runs/:id/cancel",
28372
28377
  headers: authHeadersSchema,
28373
- pathParams: z31.object({
28374
- id: z31.string().min(1, "Run ID is required")
28378
+ pathParams: z32.object({
28379
+ id: z32.string().min(1, "Run ID is required")
28375
28380
  }),
28376
- body: z31.undefined(),
28381
+ body: z32.undefined(),
28377
28382
  responses: {
28378
28383
  200: cancelRunResponseSchema,
28379
28384
  400: apiErrorSchema,
@@ -28402,13 +28407,13 @@ var zeroRunAgentEventsContract = c25.router({
28402
28407
  method: "GET",
28403
28408
  path: "/api/zero/runs/:id/telemetry/agent",
28404
28409
  headers: authHeadersSchema,
28405
- pathParams: z31.object({
28406
- id: z31.string().min(1, "Run ID is required")
28410
+ pathParams: z32.object({
28411
+ id: z32.string().min(1, "Run ID is required")
28407
28412
  }),
28408
- query: z31.object({
28409
- since: z31.coerce.number().optional(),
28410
- limit: z31.coerce.number().min(1).max(100).default(5),
28411
- order: z31.enum(["asc", "desc"]).default("desc")
28413
+ query: z32.object({
28414
+ since: z32.coerce.number().optional(),
28415
+ limit: z32.coerce.number().min(1).max(100).default(5),
28416
+ order: z32.enum(["asc", "desc"]).default("desc")
28412
28417
  }),
28413
28418
  responses: {
28414
28419
  200: agentEventsResponseSchema,
@@ -28418,41 +28423,41 @@ var zeroRunAgentEventsContract = c25.router({
28418
28423
  summary: "Get agent events with pagination (zero proxy)"
28419
28424
  }
28420
28425
  });
28421
- var runContextVolumeSchema = z31.object({
28422
- name: z31.string(),
28423
- mountPath: z31.string(),
28424
- vasStorageName: z31.string(),
28425
- vasVersionId: z31.string()
28426
- });
28427
- var runContextArtifactSchema = z31.object({
28428
- mountPath: z31.string(),
28429
- vasStorageName: z31.string(),
28430
- vasVersionId: z31.string()
28431
- });
28432
- var runContextFirewallSchema = z31.object({
28433
- name: z31.string(),
28434
- ref: z31.string(),
28435
- apis: z31.array(
28436
- z31.object({
28437
- base: z31.string(),
28438
- permissions: z31.array(
28439
- z31.object({
28440
- name: z31.string(),
28441
- description: z31.string().optional(),
28442
- rules: z31.array(z31.string())
28426
+ var runContextVolumeSchema = z32.object({
28427
+ name: z32.string(),
28428
+ mountPath: z32.string(),
28429
+ vasStorageName: z32.string(),
28430
+ vasVersionId: z32.string()
28431
+ });
28432
+ var runContextArtifactSchema = z32.object({
28433
+ mountPath: z32.string(),
28434
+ vasStorageName: z32.string(),
28435
+ vasVersionId: z32.string()
28436
+ });
28437
+ var runContextFirewallSchema = z32.object({
28438
+ name: z32.string(),
28439
+ ref: z32.string(),
28440
+ apis: z32.array(
28441
+ z32.object({
28442
+ base: z32.string(),
28443
+ permissions: z32.array(
28444
+ z32.object({
28445
+ name: z32.string(),
28446
+ description: z32.string().optional(),
28447
+ rules: z32.array(z32.string())
28443
28448
  })
28444
28449
  ).optional()
28445
28450
  })
28446
28451
  )
28447
28452
  });
28448
- var runContextResponseSchema = z31.object({
28449
- prompt: z31.string(),
28450
- appendSystemPrompt: z31.string().nullable(),
28451
- secretNames: z31.array(z31.string()),
28452
- vars: z31.record(z31.string(), z31.string()).nullable(),
28453
- environment: z31.record(z31.string(), z31.string()),
28454
- firewalls: z31.array(runContextFirewallSchema),
28455
- volumes: z31.array(runContextVolumeSchema),
28453
+ var runContextResponseSchema = z32.object({
28454
+ prompt: z32.string(),
28455
+ appendSystemPrompt: z32.string().nullable(),
28456
+ secretNames: z32.array(z32.string()),
28457
+ vars: z32.record(z32.string(), z32.string()).nullable(),
28458
+ environment: z32.record(z32.string(), z32.string()),
28459
+ firewalls: z32.array(runContextFirewallSchema),
28460
+ volumes: z32.array(runContextVolumeSchema),
28456
28461
  artifact: runContextArtifactSchema.nullable(),
28457
28462
  memory: runContextArtifactSchema.nullable()
28458
28463
  });
@@ -28461,8 +28466,8 @@ var zeroRunContextContract = c25.router({
28461
28466
  method: "GET",
28462
28467
  path: "/api/zero/runs/:id/context",
28463
28468
  headers: authHeadersSchema,
28464
- pathParams: z31.object({
28465
- id: z31.string().min(1, "Run ID is required")
28469
+ pathParams: z32.object({
28470
+ id: z32.string().min(1, "Run ID is required")
28466
28471
  }),
28467
28472
  responses: {
28468
28473
  200: runContextResponseSchema,
@@ -28478,13 +28483,13 @@ var zeroRunNetworkLogsContract = c25.router({
28478
28483
  method: "GET",
28479
28484
  path: "/api/zero/runs/:id/network",
28480
28485
  headers: authHeadersSchema,
28481
- pathParams: z31.object({
28482
- id: z31.string().min(1, "Run ID is required")
28486
+ pathParams: z32.object({
28487
+ id: z32.string().min(1, "Run ID is required")
28483
28488
  }),
28484
- query: z31.object({
28485
- since: z31.coerce.number().optional(),
28486
- limit: z31.coerce.number().min(1).max(500).default(500),
28487
- order: z31.enum(["asc", "desc"]).default("asc")
28489
+ query: z32.object({
28490
+ since: z32.coerce.number().optional(),
28491
+ limit: z32.coerce.number().min(1).max(500).default(500),
28492
+ order: z32.enum(["asc", "desc"]).default("asc")
28488
28493
  }),
28489
28494
  responses: {
28490
28495
  200: networkLogsResponseSchema,
@@ -28500,14 +28505,14 @@ var zeroLogsSearchContract = c25.router({
28500
28505
  method: "GET",
28501
28506
  path: "/api/zero/logs/search",
28502
28507
  headers: authHeadersSchema,
28503
- query: z31.object({
28504
- keyword: z31.string().min(1),
28505
- agent: z31.string().optional(),
28506
- runId: z31.string().optional(),
28507
- since: z31.coerce.number().optional(),
28508
- limit: z31.coerce.number().min(1).max(50).default(20),
28509
- before: z31.coerce.number().min(0).max(10).default(0),
28510
- after: z31.coerce.number().min(0).max(10).default(0)
28508
+ query: z32.object({
28509
+ keyword: z32.string().min(1),
28510
+ agent: z32.string().optional(),
28511
+ runId: z32.string().optional(),
28512
+ since: z32.coerce.number().optional(),
28513
+ limit: z32.coerce.number().min(1).max(50).default(20),
28514
+ before: z32.coerce.number().min(0).max(10).default(0),
28515
+ after: z32.coerce.number().min(0).max(10).default(0)
28511
28516
  }),
28512
28517
  responses: {
28513
28518
  200: logsSearchResponseSchema,
@@ -28519,52 +28524,52 @@ var zeroLogsSearchContract = c25.router({
28519
28524
  });
28520
28525
 
28521
28526
  // ../../packages/core/src/contracts/zero-schedules.ts
28522
- import { z as z32 } from "zod";
28527
+ import { z as z33 } from "zod";
28523
28528
  var c26 = initContract();
28524
- var scheduleResponseSchema = z32.object({
28525
- id: z32.string().uuid(),
28526
- agentId: z32.string().uuid(),
28527
- displayName: z32.string().nullable(),
28528
- userId: z32.string(),
28529
- name: z32.string(),
28530
- triggerType: z32.enum(["cron", "once", "loop"]),
28531
- cronExpression: z32.string().nullable(),
28532
- atTime: z32.string().nullable(),
28533
- intervalSeconds: z32.number().nullable(),
28534
- timezone: z32.string(),
28535
- prompt: z32.string(),
28536
- description: z32.string().nullable(),
28537
- appendSystemPrompt: z32.string().nullable(),
28538
- vars: z32.record(z32.string(), z32.string()).nullable(),
28539
- secretNames: z32.array(z32.string()).nullable(),
28540
- volumeVersions: z32.record(z32.string(), z32.string()).nullable(),
28541
- enabled: z32.boolean(),
28542
- nextRunAt: z32.string().nullable(),
28543
- lastRunAt: z32.string().nullable(),
28544
- retryStartedAt: z32.string().nullable(),
28545
- consecutiveFailures: z32.number(),
28546
- createdAt: z32.string(),
28547
- updatedAt: z32.string()
28548
- });
28549
- var scheduleListResponseSchema = z32.object({
28550
- schedules: z32.array(scheduleResponseSchema)
28551
- });
28552
- var deployScheduleResponseSchema = z32.object({
28529
+ var scheduleResponseSchema = z33.object({
28530
+ id: z33.string().uuid(),
28531
+ agentId: z33.string().uuid(),
28532
+ displayName: z33.string().nullable(),
28533
+ userId: z33.string(),
28534
+ name: z33.string(),
28535
+ triggerType: z33.enum(["cron", "once", "loop"]),
28536
+ cronExpression: z33.string().nullable(),
28537
+ atTime: z33.string().nullable(),
28538
+ intervalSeconds: z33.number().nullable(),
28539
+ timezone: z33.string(),
28540
+ prompt: z33.string(),
28541
+ description: z33.string().nullable(),
28542
+ appendSystemPrompt: z33.string().nullable(),
28543
+ vars: z33.record(z33.string(), z33.string()).nullable(),
28544
+ secretNames: z33.array(z33.string()).nullable(),
28545
+ volumeVersions: z33.record(z33.string(), z33.string()).nullable(),
28546
+ enabled: z33.boolean(),
28547
+ nextRunAt: z33.string().nullable(),
28548
+ lastRunAt: z33.string().nullable(),
28549
+ retryStartedAt: z33.string().nullable(),
28550
+ consecutiveFailures: z33.number(),
28551
+ createdAt: z33.string(),
28552
+ updatedAt: z33.string()
28553
+ });
28554
+ var scheduleListResponseSchema = z33.object({
28555
+ schedules: z33.array(scheduleResponseSchema)
28556
+ });
28557
+ var deployScheduleResponseSchema = z33.object({
28553
28558
  schedule: scheduleResponseSchema,
28554
- created: z32.boolean()
28555
- });
28556
- var zeroDeployScheduleRequestSchema = z32.object({
28557
- name: z32.string().min(1).max(64, "Schedule name max 64 chars"),
28558
- cronExpression: z32.string().optional(),
28559
- atTime: z32.string().optional(),
28560
- intervalSeconds: z32.number().int().min(0).optional(),
28561
- timezone: z32.string().default("UTC"),
28562
- prompt: z32.string().min(1, "Prompt required"),
28563
- description: z32.string().optional(),
28564
- appendSystemPrompt: z32.string().optional(),
28565
- volumeVersions: z32.record(z32.string(), z32.string()).optional(),
28566
- agentId: z32.string().uuid("Invalid agent ID"),
28567
- enabled: z32.boolean().optional()
28559
+ created: z33.boolean()
28560
+ });
28561
+ var zeroDeployScheduleRequestSchema = z33.object({
28562
+ name: z33.string().min(1).max(64, "Schedule name max 64 chars"),
28563
+ cronExpression: z33.string().optional(),
28564
+ atTime: z33.string().optional(),
28565
+ intervalSeconds: z33.number().int().min(0).optional(),
28566
+ timezone: z33.string().default("UTC"),
28567
+ prompt: z33.string().min(1, "Prompt required"),
28568
+ description: z33.string().optional(),
28569
+ appendSystemPrompt: z33.string().optional(),
28570
+ volumeVersions: z33.record(z33.string(), z33.string()).optional(),
28571
+ agentId: z33.string().uuid("Invalid agent ID"),
28572
+ enabled: z33.boolean().optional()
28568
28573
  }).refine(
28569
28574
  (data) => {
28570
28575
  const triggers = [
@@ -28613,11 +28618,11 @@ var zeroSchedulesByNameContract = c26.router({
28613
28618
  method: "DELETE",
28614
28619
  path: "/api/zero/schedules/:name",
28615
28620
  headers: authHeadersSchema,
28616
- pathParams: z32.object({
28617
- name: z32.string().min(1, "Schedule name required")
28621
+ pathParams: z33.object({
28622
+ name: z33.string().min(1, "Schedule name required")
28618
28623
  }),
28619
- query: z32.object({
28620
- agentId: z32.string().uuid("Invalid agent ID")
28624
+ query: z33.object({
28625
+ agentId: z33.string().uuid("Invalid agent ID")
28621
28626
  }),
28622
28627
  responses: {
28623
28628
  204: c26.noBody(),
@@ -28633,11 +28638,11 @@ var zeroSchedulesEnableContract = c26.router({
28633
28638
  method: "POST",
28634
28639
  path: "/api/zero/schedules/:name/enable",
28635
28640
  headers: authHeadersSchema,
28636
- pathParams: z32.object({
28637
- name: z32.string().min(1, "Schedule name required")
28641
+ pathParams: z33.object({
28642
+ name: z33.string().min(1, "Schedule name required")
28638
28643
  }),
28639
- body: z32.object({
28640
- agentId: z32.string().uuid("Invalid agent ID")
28644
+ body: z33.object({
28645
+ agentId: z33.string().uuid("Invalid agent ID")
28641
28646
  }),
28642
28647
  responses: {
28643
28648
  200: scheduleResponseSchema,
@@ -28652,11 +28657,11 @@ var zeroSchedulesEnableContract = c26.router({
28652
28657
  method: "POST",
28653
28658
  path: "/api/zero/schedules/:name/disable",
28654
28659
  headers: authHeadersSchema,
28655
- pathParams: z32.object({
28656
- name: z32.string().min(1, "Schedule name required")
28660
+ pathParams: z33.object({
28661
+ name: z33.string().min(1, "Schedule name required")
28657
28662
  }),
28658
- body: z32.object({
28659
- agentId: z32.string().uuid("Invalid agent ID")
28663
+ body: z33.object({
28664
+ agentId: z33.string().uuid("Invalid agent ID")
28660
28665
  }),
28661
28666
  responses: {
28662
28667
  200: scheduleResponseSchema,
@@ -28673,11 +28678,11 @@ var zeroScheduleRunContract = c26.router({
28673
28678
  method: "POST",
28674
28679
  path: "/api/zero/schedules/run",
28675
28680
  headers: authHeadersSchema,
28676
- body: z32.object({
28677
- scheduleId: z32.string().uuid("Invalid schedule ID")
28681
+ body: z33.object({
28682
+ scheduleId: z33.string().uuid("Invalid schedule ID")
28678
28683
  }),
28679
28684
  responses: {
28680
- 201: z32.object({ runId: z32.string() }),
28685
+ 201: z33.object({ runId: z33.string() }),
28681
28686
  400: apiErrorSchema,
28682
28687
  401: apiErrorSchema,
28683
28688
  404: apiErrorSchema,
@@ -28688,7 +28693,7 @@ var zeroScheduleRunContract = c26.router({
28688
28693
  });
28689
28694
 
28690
28695
  // ../../packages/core/src/contracts/zero-model-providers.ts
28691
- import { z as z33 } from "zod";
28696
+ import { z as z34 } from "zod";
28692
28697
  var c27 = initContract();
28693
28698
  var zeroModelProvidersMainContract = c27.router({
28694
28699
  list: {
@@ -28723,7 +28728,7 @@ var zeroModelProvidersByTypeContract = c27.router({
28723
28728
  method: "DELETE",
28724
28729
  path: "/api/zero/model-providers/:type",
28725
28730
  headers: authHeadersSchema,
28726
- pathParams: z33.object({
28731
+ pathParams: z34.object({
28727
28732
  type: modelProviderTypeSchema
28728
28733
  }),
28729
28734
  responses: {
@@ -28741,10 +28746,10 @@ var zeroModelProvidersDefaultContract = c27.router({
28741
28746
  method: "POST",
28742
28747
  path: "/api/zero/model-providers/:type/default",
28743
28748
  headers: authHeadersSchema,
28744
- pathParams: z33.object({
28749
+ pathParams: z34.object({
28745
28750
  type: modelProviderTypeSchema
28746
28751
  }),
28747
- body: z33.undefined(),
28752
+ body: z34.undefined(),
28748
28753
  responses: {
28749
28754
  200: modelProviderResponseSchema,
28750
28755
  401: apiErrorSchema,
@@ -28760,7 +28765,7 @@ var zeroModelProvidersUpdateModelContract = c27.router({
28760
28765
  method: "PATCH",
28761
28766
  path: "/api/zero/model-providers/:type/model",
28762
28767
  headers: authHeadersSchema,
28763
- pathParams: z33.object({
28768
+ pathParams: z34.object({
28764
28769
  type: modelProviderTypeSchema
28765
28770
  }),
28766
28771
  body: updateModelRequestSchema,
@@ -28776,7 +28781,7 @@ var zeroModelProvidersUpdateModelContract = c27.router({
28776
28781
  });
28777
28782
 
28778
28783
  // ../../packages/core/src/contracts/zero-secrets.ts
28779
- import { z as z34 } from "zod";
28784
+ import { z as z35 } from "zod";
28780
28785
  var c28 = initContract();
28781
28786
  var zeroSecretsContract = c28.router({
28782
28787
  list: {
@@ -28810,7 +28815,7 @@ var zeroSecretsByNameContract = c28.router({
28810
28815
  method: "DELETE",
28811
28816
  path: "/api/zero/secrets/:name",
28812
28817
  headers: authHeadersSchema,
28813
- pathParams: z34.object({
28818
+ pathParams: z35.object({
28814
28819
  name: secretNameSchema
28815
28820
  }),
28816
28821
  responses: {
@@ -28854,7 +28859,7 @@ var zeroVariablesByNameContract = c28.router({
28854
28859
  method: "DELETE",
28855
28860
  path: "/api/zero/variables/:name",
28856
28861
  headers: authHeadersSchema,
28857
- pathParams: z34.object({
28862
+ pathParams: z35.object({
28858
28863
  name: variableNameSchema
28859
28864
  }),
28860
28865
  responses: {
@@ -28868,25 +28873,25 @@ var zeroVariablesByNameContract = c28.router({
28868
28873
  });
28869
28874
 
28870
28875
  // ../../packages/core/src/contracts/zero-sessions.ts
28871
- import { z as z35 } from "zod";
28876
+ import { z as z36 } from "zod";
28872
28877
  var c29 = initContract();
28873
- var zeroSessionResponseSchema = z35.object({
28874
- id: z35.string(),
28875
- agentId: z35.string(),
28876
- conversationId: z35.string().nullable(),
28877
- artifactName: z35.string().nullable(),
28878
- secretNames: z35.array(z35.string()).nullable(),
28879
- chatMessages: z35.array(storedChatMessageSchema2).optional(),
28880
- createdAt: z35.string(),
28881
- updatedAt: z35.string()
28878
+ var zeroSessionResponseSchema = z36.object({
28879
+ id: z36.string(),
28880
+ agentId: z36.string(),
28881
+ conversationId: z36.string().nullable(),
28882
+ artifactName: z36.string().nullable(),
28883
+ secretNames: z36.array(z36.string()).nullable(),
28884
+ chatMessages: z36.array(storedChatMessageSchema2).optional(),
28885
+ createdAt: z36.string(),
28886
+ updatedAt: z36.string()
28882
28887
  });
28883
28888
  var zeroSessionsByIdContract = c29.router({
28884
28889
  getById: {
28885
28890
  method: "GET",
28886
28891
  path: "/api/zero/sessions/:id",
28887
28892
  headers: authHeadersSchema,
28888
- pathParams: z35.object({
28889
- id: z35.string().min(1, "Session ID is required")
28893
+ pathParams: z36.object({
28894
+ id: z36.string().min(1, "Session ID is required")
28890
28895
  }),
28891
28896
  responses: {
28892
28897
  200: zeroSessionResponseSchema,
@@ -28899,18 +28904,18 @@ var zeroSessionsByIdContract = c29.router({
28899
28904
  });
28900
28905
 
28901
28906
  // ../../packages/core/src/contracts/integrations.ts
28902
- import { z as z36 } from "zod";
28907
+ import { z as z37 } from "zod";
28903
28908
  var c30 = initContract();
28904
- var sendSlackMessageBodySchema = z36.object({
28905
- channel: z36.string().min(1, "Channel ID is required"),
28906
- text: z36.string().optional(),
28907
- threadTs: z36.string().optional(),
28908
- blocks: z36.array(z36.object({ type: z36.string() }).passthrough()).optional()
28909
+ var sendSlackMessageBodySchema = z37.object({
28910
+ channel: z37.string().min(1, "Channel ID is required"),
28911
+ text: z37.string().optional(),
28912
+ threadTs: z37.string().optional(),
28913
+ blocks: z37.array(z37.object({ type: z37.string() }).passthrough()).optional()
28909
28914
  });
28910
- var sendSlackMessageResponseSchema = z36.object({
28911
- ok: z36.literal(true),
28912
- ts: z36.string().optional(),
28913
- channel: z36.string().optional()
28915
+ var sendSlackMessageResponseSchema = z37.object({
28916
+ ok: z37.literal(true),
28917
+ ts: z37.string().optional(),
28918
+ channel: z37.string().optional()
28914
28919
  });
28915
28920
  var integrationsSlackMessageContract = c30.router({
28916
28921
  sendMessage: {
@@ -28928,13 +28933,13 @@ var integrationsSlackMessageContract = c30.router({
28928
28933
  summary: "Send a Slack message via org bot token"
28929
28934
  }
28930
28935
  });
28931
- var slackUploadInitBodySchema = z36.object({
28932
- filename: z36.string().min(1, "Filename is required"),
28933
- length: z36.number().int().positive("File length must be a positive integer")
28936
+ var slackUploadInitBodySchema = z37.object({
28937
+ filename: z37.string().min(1, "Filename is required"),
28938
+ length: z37.number().int().positive("File length must be a positive integer")
28934
28939
  });
28935
- var slackUploadInitResponseSchema = z36.object({
28936
- uploadUrl: z36.string(),
28937
- fileId: z36.string()
28940
+ var slackUploadInitResponseSchema = z37.object({
28941
+ uploadUrl: z37.string(),
28942
+ fileId: z37.string()
28938
28943
  });
28939
28944
  var integrationsSlackUploadInitContract = c30.router({
28940
28945
  init: {
@@ -28952,16 +28957,16 @@ var integrationsSlackUploadInitContract = c30.router({
28952
28957
  summary: "Get a pre-signed Slack upload URL via org bot token"
28953
28958
  }
28954
28959
  });
28955
- var slackUploadCompleteBodySchema = z36.object({
28956
- fileId: z36.string().min(1, "File ID is required"),
28957
- channel: z36.string().min(1, "Channel ID is required"),
28958
- threadTs: z36.string().optional(),
28959
- title: z36.string().optional(),
28960
- initialComment: z36.string().optional()
28960
+ var slackUploadCompleteBodySchema = z37.object({
28961
+ fileId: z37.string().min(1, "File ID is required"),
28962
+ channel: z37.string().min(1, "Channel ID is required"),
28963
+ threadTs: z37.string().optional(),
28964
+ title: z37.string().optional(),
28965
+ initialComment: z37.string().optional()
28961
28966
  });
28962
- var slackUploadCompleteResponseSchema = z36.object({
28963
- fileId: z36.string(),
28964
- permalink: z36.string()
28967
+ var slackUploadCompleteResponseSchema = z37.object({
28968
+ fileId: z37.string(),
28969
+ permalink: z37.string()
28965
28970
  });
28966
28971
  var integrationsSlackUploadCompleteContract = c30.router({
28967
28972
  complete: {
@@ -28981,45 +28986,45 @@ var integrationsSlackUploadCompleteContract = c30.router({
28981
28986
  });
28982
28987
 
28983
28988
  // ../../packages/core/src/contracts/zero-billing.ts
28984
- import { z as z37 } from "zod";
28989
+ import { z as z38 } from "zod";
28985
28990
  var c31 = initContract();
28986
- var autoRechargeSchema = z37.object({
28987
- enabled: z37.boolean(),
28988
- threshold: z37.number().nullable(),
28989
- amount: z37.number().nullable()
28990
- });
28991
- var creditExpirySchema = z37.object({
28992
- expiringNextCycle: z37.number(),
28993
- nextExpiryDate: z37.string().nullable()
28994
- });
28995
- var billingStatusResponseSchema = z37.object({
28996
- tier: z37.string(),
28997
- credits: z37.number(),
28998
- subscriptionStatus: z37.string().nullable(),
28999
- currentPeriodEnd: z37.string().nullable(),
29000
- cancelAtPeriodEnd: z37.boolean(),
29001
- hasSubscription: z37.boolean(),
28991
+ var autoRechargeSchema = z38.object({
28992
+ enabled: z38.boolean(),
28993
+ threshold: z38.number().nullable(),
28994
+ amount: z38.number().nullable()
28995
+ });
28996
+ var creditExpirySchema = z38.object({
28997
+ expiringNextCycle: z38.number(),
28998
+ nextExpiryDate: z38.string().nullable()
28999
+ });
29000
+ var billingStatusResponseSchema = z38.object({
29001
+ tier: z38.string(),
29002
+ credits: z38.number(),
29003
+ subscriptionStatus: z38.string().nullable(),
29004
+ currentPeriodEnd: z38.string().nullable(),
29005
+ cancelAtPeriodEnd: z38.boolean(),
29006
+ hasSubscription: z38.boolean(),
29002
29007
  autoRecharge: autoRechargeSchema,
29003
29008
  creditExpiry: creditExpirySchema
29004
29009
  });
29005
- var checkoutResponseSchema = z37.object({
29006
- url: z37.string()
29010
+ var checkoutResponseSchema = z38.object({
29011
+ url: z38.string()
29007
29012
  });
29008
- var portalResponseSchema = z37.object({
29009
- url: z37.string()
29013
+ var portalResponseSchema = z38.object({
29014
+ url: z38.string()
29010
29015
  });
29011
- var checkoutRequestSchema = z37.object({
29012
- tier: z37.enum(["pro", "team"]),
29013
- successUrl: z37.string().url(),
29014
- cancelUrl: z37.string().url()
29016
+ var checkoutRequestSchema = z38.object({
29017
+ tier: z38.enum(["pro", "team"]),
29018
+ successUrl: z38.string().url(),
29019
+ cancelUrl: z38.string().url()
29015
29020
  });
29016
- var portalRequestSchema = z37.object({
29017
- returnUrl: z37.string().min(1)
29021
+ var portalRequestSchema = z38.object({
29022
+ returnUrl: z38.string().min(1)
29018
29023
  });
29019
- var autoRechargeUpdateRequestSchema = z37.object({
29020
- enabled: z37.boolean(),
29021
- threshold: z37.number().int().positive().optional(),
29022
- amount: z37.number().int().min(1e3).optional()
29024
+ var autoRechargeUpdateRequestSchema = z38.object({
29025
+ enabled: z38.boolean(),
29026
+ threshold: z38.number().int().positive().optional(),
29027
+ amount: z38.number().int().min(1e3).optional()
29023
29028
  });
29024
29029
  var zeroBillingStatusContract = c31.router({
29025
29030
  get: {
@@ -29093,16 +29098,16 @@ var zeroBillingAutoRechargeContract = c31.router({
29093
29098
  summary: "Update auto-recharge configuration"
29094
29099
  }
29095
29100
  });
29096
- var invoiceSchema = z37.object({
29097
- id: z37.string(),
29098
- number: z37.string().nullable(),
29099
- date: z37.number(),
29100
- amount: z37.number(),
29101
- status: z37.string().nullable(),
29102
- hostedInvoiceUrl: z37.string().nullable()
29101
+ var invoiceSchema = z38.object({
29102
+ id: z38.string(),
29103
+ number: z38.string().nullable(),
29104
+ date: z38.number(),
29105
+ amount: z38.number(),
29106
+ status: z38.string().nullable(),
29107
+ hostedInvoiceUrl: z38.string().nullable()
29103
29108
  });
29104
- var billingInvoicesResponseSchema = z37.object({
29105
- invoices: z37.array(invoiceSchema)
29109
+ var billingInvoicesResponseSchema = z38.object({
29110
+ invoices: z38.array(invoiceSchema)
29106
29111
  });
29107
29112
  var zeroBillingInvoicesContract = c31.router({
29108
29113
  get: {
@@ -29117,12 +29122,12 @@ var zeroBillingInvoicesContract = c31.router({
29117
29122
  summary: "Get invoices for current org"
29118
29123
  }
29119
29124
  });
29120
- var downgradeRequestSchema = z37.object({
29121
- targetTier: z37.enum(["free", "pro"])
29125
+ var downgradeRequestSchema = z38.object({
29126
+ targetTier: z38.enum(["free", "pro"])
29122
29127
  });
29123
- var downgradeResponseSchema = z37.object({
29124
- success: z37.boolean(),
29125
- effectiveDate: z37.string().nullable()
29128
+ var downgradeResponseSchema = z38.object({
29129
+ success: z38.boolean(),
29130
+ effectiveDate: z38.string().nullable()
29126
29131
  });
29127
29132
  var zeroBillingDowngradeContract = c31.router({
29128
29133
  create: {
@@ -29143,24 +29148,24 @@ var zeroBillingDowngradeContract = c31.router({
29143
29148
  });
29144
29149
 
29145
29150
  // ../../packages/core/src/contracts/zero-usage.ts
29146
- import { z as z38 } from "zod";
29151
+ import { z as z39 } from "zod";
29147
29152
  var c32 = initContract();
29148
- var memberUsageSchema = z38.object({
29149
- userId: z38.string(),
29150
- email: z38.string(),
29151
- inputTokens: z38.number(),
29152
- outputTokens: z38.number(),
29153
- cacheReadInputTokens: z38.number(),
29154
- cacheCreationInputTokens: z38.number(),
29155
- creditsCharged: z38.number(),
29156
- creditCap: z38.number().nullable()
29157
- });
29158
- var usageMembersResponseSchema = z38.object({
29159
- period: z38.object({
29160
- start: z38.string(),
29161
- end: z38.string()
29153
+ var memberUsageSchema = z39.object({
29154
+ userId: z39.string(),
29155
+ email: z39.string(),
29156
+ inputTokens: z39.number(),
29157
+ outputTokens: z39.number(),
29158
+ cacheReadInputTokens: z39.number(),
29159
+ cacheCreationInputTokens: z39.number(),
29160
+ creditsCharged: z39.number(),
29161
+ creditCap: z39.number().nullable()
29162
+ });
29163
+ var usageMembersResponseSchema = z39.object({
29164
+ period: z39.object({
29165
+ start: z39.string(),
29166
+ end: z39.string()
29162
29167
  }).nullable(),
29163
- members: z38.array(memberUsageSchema)
29168
+ members: z39.array(memberUsageSchema)
29164
29169
  });
29165
29170
  var zeroUsageMembersContract = c32.router({
29166
29171
  get: {
@@ -29177,16 +29182,16 @@ var zeroUsageMembersContract = c32.router({
29177
29182
  });
29178
29183
 
29179
29184
  // ../../packages/core/src/contracts/zero-team.ts
29180
- import { z as z39 } from "zod";
29185
+ import { z as z40 } from "zod";
29181
29186
  var c33 = initContract();
29182
- var teamComposeItemSchema = z39.object({
29183
- id: z39.string(),
29184
- displayName: z39.string().nullable(),
29185
- description: z39.string().nullable(),
29186
- sound: z39.string().nullable(),
29187
- avatarUrl: z39.string().nullable(),
29188
- headVersionId: z39.string().nullable(),
29189
- updatedAt: z39.string()
29187
+ var teamComposeItemSchema = z40.object({
29188
+ id: z40.string(),
29189
+ displayName: z40.string().nullable(),
29190
+ description: z40.string().nullable(),
29191
+ sound: z40.string().nullable(),
29192
+ avatarUrl: z40.string().nullable(),
29193
+ headVersionId: z40.string().nullable(),
29194
+ updatedAt: z40.string()
29190
29195
  });
29191
29196
  var zeroTeamContract = c33.router({
29192
29197
  list: {
@@ -29194,7 +29199,7 @@ var zeroTeamContract = c33.router({
29194
29199
  path: "/api/zero/team",
29195
29200
  headers: authHeadersSchema,
29196
29201
  responses: {
29197
- 200: z39.array(teamComposeItemSchema),
29202
+ 200: z40.array(teamComposeItemSchema),
29198
29203
  401: apiErrorSchema,
29199
29204
  403: apiErrorSchema,
29200
29205
  404: apiErrorSchema
@@ -29204,28 +29209,28 @@ var zeroTeamContract = c33.router({
29204
29209
  });
29205
29210
 
29206
29211
  // ../../packages/core/src/contracts/zero-integrations-slack.ts
29207
- import { z as z40 } from "zod";
29212
+ import { z as z41 } from "zod";
29208
29213
  var c34 = initContract();
29209
- var slackEnvironmentSchema = z40.object({
29210
- requiredSecrets: z40.array(z40.string()),
29211
- requiredVars: z40.array(z40.string()),
29212
- missingSecrets: z40.array(z40.string()),
29213
- missingVars: z40.array(z40.string())
29214
- });
29215
- var slackOrgStatusSchema = z40.object({
29216
- isConnected: z40.boolean(),
29217
- isInstalled: z40.boolean().optional(),
29218
- workspaceName: z40.string().nullable().optional(),
29219
- isAdmin: z40.boolean(),
29220
- installUrl: z40.string().nullable().optional(),
29221
- connectUrl: z40.string().nullable().optional(),
29222
- defaultAgentName: z40.string().nullable().optional(),
29223
- agentOrgSlug: z40.string().nullable().optional(),
29214
+ var slackEnvironmentSchema = z41.object({
29215
+ requiredSecrets: z41.array(z41.string()),
29216
+ requiredVars: z41.array(z41.string()),
29217
+ missingSecrets: z41.array(z41.string()),
29218
+ missingVars: z41.array(z41.string())
29219
+ });
29220
+ var slackOrgStatusSchema = z41.object({
29221
+ isConnected: z41.boolean(),
29222
+ isInstalled: z41.boolean().optional(),
29223
+ workspaceName: z41.string().nullable().optional(),
29224
+ isAdmin: z41.boolean(),
29225
+ installUrl: z41.string().nullable().optional(),
29226
+ connectUrl: z41.string().nullable().optional(),
29227
+ defaultAgentName: z41.string().nullable().optional(),
29228
+ agentOrgSlug: z41.string().nullable().optional(),
29224
29229
  environment: slackEnvironmentSchema.optional(),
29225
29230
  /** True when the installation's granted scopes are outdated (admin-only). */
29226
- scopeMismatch: z40.boolean().optional(),
29231
+ scopeMismatch: z41.boolean().optional(),
29227
29232
  /** OAuth install URL for re-authorization (admin-only, when scopeMismatch). */
29228
- reinstallUrl: z40.string().nullable().optional()
29233
+ reinstallUrl: z41.string().nullable().optional()
29229
29234
  });
29230
29235
  var zeroIntegrationsSlackContract = c34.router({
29231
29236
  getStatus: {
@@ -29243,11 +29248,11 @@ var zeroIntegrationsSlackContract = c34.router({
29243
29248
  path: "/api/zero/integrations/slack",
29244
29249
  headers: authHeadersSchema,
29245
29250
  body: c34.noBody(),
29246
- query: z40.object({
29247
- action: z40.string().optional()
29251
+ query: z41.object({
29252
+ action: z41.string().optional()
29248
29253
  }),
29249
29254
  responses: {
29250
- 200: z40.object({ ok: z40.boolean() }),
29255
+ 200: z41.object({ ok: z41.boolean() }),
29251
29256
  401: apiErrorSchema,
29252
29257
  403: apiErrorSchema,
29253
29258
  404: apiErrorSchema
@@ -29257,18 +29262,18 @@ var zeroIntegrationsSlackContract = c34.router({
29257
29262
  });
29258
29263
 
29259
29264
  // ../../packages/core/src/contracts/zero-slack-connect.ts
29260
- import { z as z41 } from "zod";
29265
+ import { z as z42 } from "zod";
29261
29266
  var c35 = initContract();
29262
- var slackConnectStatusSchema = z41.object({
29263
- isConnected: z41.boolean(),
29264
- isAdmin: z41.boolean(),
29265
- workspaceName: z41.string().nullable().optional(),
29266
- defaultAgentName: z41.string().nullable().optional()
29267
+ var slackConnectStatusSchema = z42.object({
29268
+ isConnected: z42.boolean(),
29269
+ isAdmin: z42.boolean(),
29270
+ workspaceName: z42.string().nullable().optional(),
29271
+ defaultAgentName: z42.string().nullable().optional()
29267
29272
  });
29268
- var slackConnectResponseSchema = z41.object({
29269
- success: z41.boolean(),
29270
- connectionId: z41.string(),
29271
- role: z41.string()
29273
+ var slackConnectResponseSchema = z42.object({
29274
+ success: z42.boolean(),
29275
+ connectionId: z42.string(),
29276
+ role: z42.string()
29272
29277
  });
29273
29278
  var zeroSlackConnectContract = c35.router({
29274
29279
  getStatus: {
@@ -29285,11 +29290,11 @@ var zeroSlackConnectContract = c35.router({
29285
29290
  method: "POST",
29286
29291
  path: "/api/zero/integrations/slack/connect",
29287
29292
  headers: authHeadersSchema,
29288
- body: z41.object({
29289
- workspaceId: z41.string().min(1),
29290
- slackUserId: z41.string().min(1),
29291
- channelId: z41.string().optional(),
29292
- threadTs: z41.string().optional()
29293
+ body: z42.object({
29294
+ workspaceId: z42.string().min(1),
29295
+ slackUserId: z42.string().min(1),
29296
+ channelId: z42.string().optional(),
29297
+ threadTs: z42.string().optional()
29293
29298
  }),
29294
29299
  responses: {
29295
29300
  200: slackConnectResponseSchema,
@@ -29303,11 +29308,11 @@ var zeroSlackConnectContract = c35.router({
29303
29308
  });
29304
29309
 
29305
29310
  // ../../packages/core/src/contracts/zero-slack-channels.ts
29306
- import { z as z42 } from "zod";
29311
+ import { z as z43 } from "zod";
29307
29312
  var c36 = initContract();
29308
- var slackChannelSchema = z42.object({
29309
- id: z42.string(),
29310
- name: z42.string()
29313
+ var slackChannelSchema = z43.object({
29314
+ id: z43.string(),
29315
+ name: z43.string()
29311
29316
  });
29312
29317
  var zeroSlackChannelsContract = c36.router({
29313
29318
  list: {
@@ -29315,7 +29320,7 @@ var zeroSlackChannelsContract = c36.router({
29315
29320
  path: "/api/zero/slack/channels",
29316
29321
  headers: authHeadersSchema,
29317
29322
  responses: {
29318
- 200: z42.object({ channels: z42.array(slackChannelSchema) }),
29323
+ 200: z43.object({ channels: z43.array(slackChannelSchema) }),
29319
29324
  401: apiErrorSchema,
29320
29325
  404: apiErrorSchema
29321
29326
  },
@@ -29324,19 +29329,19 @@ var zeroSlackChannelsContract = c36.router({
29324
29329
  });
29325
29330
 
29326
29331
  // ../../packages/core/src/contracts/zero-queue-position.ts
29327
- import { z as z43 } from "zod";
29332
+ import { z as z44 } from "zod";
29328
29333
  var c37 = initContract();
29329
- var queuePositionResponseSchema = z43.object({
29330
- position: z43.number(),
29331
- total: z43.number()
29334
+ var queuePositionResponseSchema = z44.object({
29335
+ position: z44.number(),
29336
+ total: z44.number()
29332
29337
  });
29333
29338
  var zeroQueuePositionContract = c37.router({
29334
29339
  getPosition: {
29335
29340
  method: "GET",
29336
29341
  path: "/api/zero/queue-position",
29337
29342
  headers: authHeadersSchema,
29338
- query: z43.object({
29339
- runId: z43.string().min(1, "runId is required")
29343
+ query: z44.object({
29344
+ runId: z44.string().min(1, "runId is required")
29340
29345
  }),
29341
29346
  responses: {
29342
29347
  200: queuePositionResponseSchema,
@@ -29349,20 +29354,20 @@ var zeroQueuePositionContract = c37.router({
29349
29354
  });
29350
29355
 
29351
29356
  // ../../packages/core/src/contracts/zero-member-credit-cap.ts
29352
- import { z as z44 } from "zod";
29357
+ import { z as z45 } from "zod";
29353
29358
  var c38 = initContract();
29354
- var memberCreditCapResponseSchema = z44.object({
29355
- userId: z44.string(),
29356
- creditCap: z44.number().nullable(),
29357
- creditEnabled: z44.boolean()
29359
+ var memberCreditCapResponseSchema = z45.object({
29360
+ userId: z45.string(),
29361
+ creditCap: z45.number().nullable(),
29362
+ creditEnabled: z45.boolean()
29358
29363
  });
29359
29364
  var zeroMemberCreditCapContract = c38.router({
29360
29365
  get: {
29361
29366
  method: "GET",
29362
29367
  path: "/api/zero/org/members/credit-cap",
29363
29368
  headers: authHeadersSchema,
29364
- query: z44.object({
29365
- userId: z44.string().min(1, "userId is required")
29369
+ query: z45.object({
29370
+ userId: z45.string().min(1, "userId is required")
29366
29371
  }),
29367
29372
  responses: {
29368
29373
  200: memberCreditCapResponseSchema,
@@ -29375,9 +29380,9 @@ var zeroMemberCreditCapContract = c38.router({
29375
29380
  method: "PUT",
29376
29381
  path: "/api/zero/org/members/credit-cap",
29377
29382
  headers: authHeadersSchema,
29378
- body: z44.object({
29379
- userId: z44.string().min(1),
29380
- creditCap: z44.number().int().positive().nullable()
29383
+ body: z45.object({
29384
+ userId: z45.string().min(1),
29385
+ creditCap: z45.number().int().positive().nullable()
29381
29386
  }),
29382
29387
  responses: {
29383
29388
  200: memberCreditCapResponseSchema,
@@ -29390,33 +29395,33 @@ var zeroMemberCreditCapContract = c38.router({
29390
29395
  });
29391
29396
 
29392
29397
  // ../../packages/core/src/contracts/zero-ask-user.ts
29393
- import { z as z45 } from "zod";
29398
+ import { z as z46 } from "zod";
29394
29399
  var c39 = initContract();
29395
- var askUserQuestionItemSchema = z45.object({
29396
- question: z45.string().min(1),
29397
- header: z45.string().max(12).optional(),
29398
- options: z45.array(
29399
- z45.object({
29400
- label: z45.string(),
29401
- description: z45.string().optional()
29400
+ var askUserQuestionItemSchema = z46.object({
29401
+ question: z46.string().min(1),
29402
+ header: z46.string().max(12).optional(),
29403
+ options: z46.array(
29404
+ z46.object({
29405
+ label: z46.string(),
29406
+ description: z46.string().optional()
29402
29407
  })
29403
29408
  ).min(1),
29404
- multiSelect: z45.boolean().optional()
29409
+ multiSelect: z46.boolean().optional()
29405
29410
  });
29406
- var askUserQuestionBodySchema = z45.object({
29407
- questions: z45.array(askUserQuestionItemSchema).min(1)
29411
+ var askUserQuestionBodySchema = z46.object({
29412
+ questions: z46.array(askUserQuestionItemSchema).min(1)
29408
29413
  });
29409
- var askUserQuestionResponseSchema = z45.object({
29410
- pendingId: z45.string().uuid()
29414
+ var askUserQuestionResponseSchema = z46.object({
29415
+ pendingId: z46.string().uuid()
29411
29416
  });
29412
- var askUserAnswerStatusSchema = z45.enum([
29417
+ var askUserAnswerStatusSchema = z46.enum([
29413
29418
  "pending",
29414
29419
  "answered",
29415
29420
  "expired"
29416
29421
  ]);
29417
- var askUserAnswerResponseSchema = z45.object({
29422
+ var askUserAnswerResponseSchema = z46.object({
29418
29423
  status: askUserAnswerStatusSchema,
29419
- answer: z45.string().optional()
29424
+ answer: z46.string().optional()
29420
29425
  });
29421
29426
  var zeroAskUserQuestionContract = c39.router({
29422
29427
  postQuestion: {
@@ -29437,8 +29442,8 @@ var zeroAskUserAnswerContract = c39.router({
29437
29442
  method: "GET",
29438
29443
  path: "/api/zero/ask-user/answer",
29439
29444
  headers: authHeadersSchema,
29440
- query: z45.object({
29441
- pendingId: z45.string().uuid()
29445
+ query: z46.object({
29446
+ pendingId: z46.string().uuid()
29442
29447
  }),
29443
29448
  responses: {
29444
29449
  200: askUserAnswerResponseSchema,
@@ -29450,18 +29455,18 @@ var zeroAskUserAnswerContract = c39.router({
29450
29455
  });
29451
29456
 
29452
29457
  // ../../packages/core/src/contracts/zero-developer-support.ts
29453
- import { z as z46 } from "zod";
29458
+ import { z as z47 } from "zod";
29454
29459
  var c40 = initContract();
29455
- var developerSupportBodySchema = z46.object({
29456
- title: z46.string().min(1, "Title is required"),
29457
- description: z46.string().min(1, "Description is required"),
29458
- consentCode: z46.string().optional()
29460
+ var developerSupportBodySchema = z47.object({
29461
+ title: z47.string().min(1, "Title is required"),
29462
+ description: z47.string().min(1, "Description is required"),
29463
+ consentCode: z47.string().optional()
29459
29464
  });
29460
- var consentCodeResponseSchema = z46.object({
29461
- consentCode: z46.string()
29465
+ var consentCodeResponseSchema = z47.object({
29466
+ consentCode: z47.string()
29462
29467
  });
29463
- var submitResponseSchema = z46.object({
29464
- reference: z46.string()
29468
+ var submitResponseSchema = z47.object({
29469
+ reference: z47.string()
29465
29470
  });
29466
29471
  var zeroDeveloperSupportContract = c40.router({
29467
29472
  submit: {
@@ -29470,7 +29475,7 @@ var zeroDeveloperSupportContract = c40.router({
29470
29475
  headers: authHeadersSchema,
29471
29476
  body: developerSupportBodySchema,
29472
29477
  responses: {
29473
- 200: z46.union([consentCodeResponseSchema, submitResponseSchema]),
29478
+ 200: z47.union([consentCodeResponseSchema, submitResponseSchema]),
29474
29479
  400: apiErrorSchema,
29475
29480
  401: apiErrorSchema
29476
29481
  },
@@ -29479,18 +29484,18 @@ var zeroDeveloperSupportContract = c40.router({
29479
29484
  });
29480
29485
 
29481
29486
  // ../../packages/core/src/contracts/zero-computer-use.ts
29482
- import { z as z47 } from "zod";
29487
+ import { z as z48 } from "zod";
29483
29488
  var c41 = initContract();
29484
- var registerResponseSchema = z47.object({
29485
- id: z47.string(),
29486
- domain: z47.string(),
29487
- token: z47.string(),
29488
- ngrokToken: z47.string(),
29489
- endpointPrefix: z47.string()
29489
+ var registerResponseSchema = z48.object({
29490
+ id: z48.string(),
29491
+ domain: z48.string(),
29492
+ token: z48.string(),
29493
+ ngrokToken: z48.string(),
29494
+ endpointPrefix: z48.string()
29490
29495
  });
29491
- var hostResponseSchema = z47.object({
29492
- domain: z47.string(),
29493
- token: z47.string()
29496
+ var hostResponseSchema = z48.object({
29497
+ domain: z48.string(),
29498
+ token: z48.string()
29494
29499
  });
29495
29500
  var zeroComputerUseRegisterContract = c41.router({
29496
29501
  register: {
@@ -29582,29 +29587,17 @@ function getInstructionsFilename(framework) {
29582
29587
  }
29583
29588
 
29584
29589
  // ../../packages/core/src/feature-switch.ts
29585
- var sha1Cache = /* @__PURE__ */ new Map();
29586
- async function sha1(input) {
29587
- const cached = sha1Cache.get(input);
29588
- if (cached) return cached;
29589
- const data = new TextEncoder().encode(input);
29590
- const hashBuffer = await crypto.subtle.digest("SHA-1", data);
29591
- const hashArray = Array.from(new Uint8Array(hashBuffer));
29592
- const hex = hashArray.map((b) => {
29593
- return b.toString(16).padStart(2, "0");
29594
- }).join("");
29595
- sha1Cache.set(input, hex);
29596
- return hex;
29590
+ function fnv1a(input) {
29591
+ let h = 2166136261 >>> 0;
29592
+ for (let i = 0; i < input.length; i++) {
29593
+ h ^= input.charCodeAt(i);
29594
+ h = Math.imul(h, 16777619) >>> 0;
29595
+ }
29596
+ return h.toString(16).padStart(8, "0");
29597
29597
  }
29598
- var STAFF_USER_HASHES = [
29599
- "afc25aa601481d794372ed765038148d3a160e2a",
29600
- "1e7de00267c699185653df499f68e8383013ca08",
29601
- "b397fa9b0330b421a5113ac88dd2b01ca2067cfe",
29602
- "d938bb6e49cb8ccfaa962942d69c9ccd1ee239af",
29603
- "67a65740246389d7fecf7702f8b7d6914ad38dc5",
29604
- "55651a8b2c85b35ff0629fa3d4718b9476069d0f"
29605
- ];
29598
+ var STAFF_USER_HASHES = [];
29606
29599
  var STAFF_ORG_ID_HASHES = [
29607
- "65de87977d6d1712cd88d7768209f33f7ed12e0b"
29600
+ "afce210e"
29608
29601
  // org_3ANttyrbWYJk6JKRSTRLEsbsDLe
29609
29602
  ];
29610
29603
  var FEATURE_SWITCHES = {
@@ -29824,22 +29817,22 @@ var FEATURE_SWITCHES = {
29824
29817
  enabledOrgIdHashes: STAFF_ORG_ID_HASHES
29825
29818
  }
29826
29819
  };
29827
- async function isFeatureEnabled(key, ctx) {
29820
+ function isFeatureEnabled(key, ctx) {
29828
29821
  const featureSwitch = FEATURE_SWITCHES[key];
29829
29822
  if (featureSwitch.enabled) {
29830
29823
  return true;
29831
29824
  }
29832
29825
  if (ctx?.userId && featureSwitch.enabledUserHashes?.length) {
29833
- const hash = await sha1(ctx.userId);
29834
- if (featureSwitch.enabledUserHashes.includes(hash)) return true;
29826
+ if (featureSwitch.enabledUserHashes.includes(fnv1a(ctx.userId)))
29827
+ return true;
29835
29828
  }
29836
29829
  if (ctx?.email && featureSwitch.enabledEmailHashes?.length) {
29837
- const hash = await sha1(ctx.email.toLowerCase());
29838
- if (featureSwitch.enabledEmailHashes.includes(hash)) return true;
29830
+ if (featureSwitch.enabledEmailHashes.includes(fnv1a(ctx.email.toLowerCase())))
29831
+ return true;
29839
29832
  }
29840
29833
  if (ctx?.orgId && featureSwitch.enabledOrgIdHashes?.length) {
29841
- const hash = await sha1(ctx.orgId);
29842
- if (featureSwitch.enabledOrgIdHashes.includes(hash)) return true;
29834
+ if (featureSwitch.enabledOrgIdHashes.includes(fnv1a(ctx.orgId)))
29835
+ return true;
29843
29836
  }
29844
29837
  return false;
29845
29838
  }
@@ -32112,4 +32105,4 @@ export {
32112
32105
  parseTime,
32113
32106
  paginate
32114
32107
  };
32115
- //# sourceMappingURL=chunk-DJWH2DJQ.js.map
32108
+ //# sourceMappingURL=chunk-Y46LDOHW.js.map