@keystrokehq/cli 0.1.4 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5231,8 +5231,127 @@ const OrganizationSlugSchema = string().trim().toLowerCase().min(2, "Slug must b
5231
5231
  * fail to load.
5232
5232
  */
5233
5233
  const ClaimableOrganizationSlugSchema = OrganizationSlugSchema.refine((slug) => !RESERVED_ORGANIZATION_SLUGS.has(slug), "This slug is reserved");
5234
+ const ORGANIZATION_NAME_APOSTROPHE_PATTERN = /[''\u2018\u2019]/g;
5235
+ /** Normalize a display name into slug-shaped text (may be empty or too short to claim). */
5236
+ function normalizeOrganizationNameToSlugBase(name) {
5237
+ return name.trim().toLowerCase().replace(ORGANIZATION_NAME_APOSTROPHE_PATTERN, "").replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
5238
+ }
5234
5239
  /** Same format as organization slugs — org-scoped, no global reserved list. */
5235
5240
  const ProjectSlugSchema = OrganizationSlugSchema;
5241
+ /** Derive a URL slug from a project display name (not guaranteed unique within the org). */
5242
+ function slugifyProjectName(name) {
5243
+ const base = normalizeOrganizationNameToSlugBase(name);
5244
+ if (!base) return "project";
5245
+ const parsed = ProjectSlugSchema.safeParse(base);
5246
+ return parsed.success ? parsed.data : "project";
5247
+ }
5248
+ const OrganizationSlugErrorCodeSchema = _enum([
5249
+ "slug_taken",
5250
+ "slug_reserved",
5251
+ "slug_invalid"
5252
+ ]);
5253
+ const SlugAvailabilityReasonSchema = _enum([
5254
+ "taken",
5255
+ "reserved",
5256
+ "invalid"
5257
+ ]);
5258
+ const SlugAvailabilityResponseSchema = object({
5259
+ slug: string(),
5260
+ available: boolean(),
5261
+ reason: SlugAvailabilityReasonSchema.optional(),
5262
+ suggestion: OrganizationSlugSchema.optional()
5263
+ });
5264
+ object({
5265
+ slug: string().trim().min(1),
5266
+ excludeOrganizationId: string().min(1).optional()
5267
+ });
5268
+ const ProjectSlugAvailabilityReasonSchema = _enum(["taken", "invalid"]);
5269
+ const ProjectSlugAvailabilityResponseSchema = object({
5270
+ slug: string(),
5271
+ available: boolean(),
5272
+ reason: ProjectSlugAvailabilityReasonSchema.optional(),
5273
+ suggestion: ProjectSlugSchema.optional()
5274
+ });
5275
+ object({
5276
+ slug: string().trim().min(1),
5277
+ excludeProjectId: string().min(1).optional()
5278
+ });
5279
+ const ProjectStatusSchema = _enum([
5280
+ "inactive",
5281
+ "starting",
5282
+ "active",
5283
+ "failed"
5284
+ ]);
5285
+ const OrganizationUserRoleSchema = _enum([
5286
+ "owner",
5287
+ "admin",
5288
+ "builder"
5289
+ ]);
5290
+ const isoDateTime$5 = string().datetime();
5291
+ const OrganizationSchema = object({
5292
+ id: string(),
5293
+ name: string(),
5294
+ slug: OrganizationSlugSchema,
5295
+ verified: boolean(),
5296
+ createdAt: isoDateTime$5,
5297
+ updatedAt: isoDateTime$5
5298
+ });
5299
+ const ProjectSchema = object({
5300
+ id: string(),
5301
+ organizationId: string(),
5302
+ name: string(),
5303
+ slug: ProjectSlugSchema,
5304
+ description: string().nullable(),
5305
+ status: ProjectStatusSchema,
5306
+ baseUrl: string().nullable(),
5307
+ runtimeId: string().nullable(),
5308
+ lastError: string().nullable(),
5309
+ createdAt: isoDateTime$5,
5310
+ updatedAt: isoDateTime$5
5311
+ });
5312
+ const UserOrganizationSchema = object({
5313
+ organization: OrganizationSchema,
5314
+ role: OrganizationUserRoleSchema
5315
+ });
5316
+ const ActiveOrganizationResponseSchema = UserOrganizationSchema.nullable();
5317
+ const ListOrganizationsResponseSchema = array(UserOrganizationSchema);
5318
+ const CreateOrganizationRequestSchema = object({
5319
+ name: string().trim().min(1),
5320
+ /** Format-only at the wire boundary; reserved-name checks run in platform-database. */
5321
+ slug: OrganizationSlugSchema.optional()
5322
+ });
5323
+ const UpdateOrganizationRequestSchema = object({
5324
+ name: string().trim().min(1).optional(),
5325
+ slug: ClaimableOrganizationSlugSchema.optional()
5326
+ }).refine((data) => data.name !== void 0 || data.slug !== void 0, { message: "At least one field is required" });
5327
+ const CreateOrganizationResponseSchema = UserOrganizationSchema;
5328
+ const ListProjectsResponseSchema = array(ProjectSchema);
5329
+ const ProjectListMetricsSchema = object({
5330
+ agentCount: number$1(),
5331
+ workflowCount: number$1(),
5332
+ skillCount: number$1(),
5333
+ credentialCount: number$1(),
5334
+ lastDeploymentAt: isoDateTime$5.nullable()
5335
+ });
5336
+ const ListProjectMetricsResponseSchema = record(string(), ProjectListMetricsSchema);
5337
+ const CreateProjectRequestSchema = object({
5338
+ name: string().trim().min(1),
5339
+ description: string().trim().min(1).optional()
5340
+ });
5341
+ const UpdateProjectRequestSchema = object({
5342
+ name: string().trim().min(1).optional(),
5343
+ description: string().trim().optional(),
5344
+ slug: ProjectSlugSchema.optional()
5345
+ }).refine((data) => data.name !== void 0 || data.description !== void 0 || data.slug !== void 0, { message: "At least one field is required" });
5346
+ const CreateProjectResponseSchema = ProjectSchema;
5347
+ const ProjectResponseSchema = ProjectSchema;
5348
+ const ProjectReachabilityResponseSchema = object({ reachable: boolean() });
5349
+ /** Org-custom app slug segment (the part after `{orgSlug}/`). Same format as project slugs. */
5350
+ const AppSlugSchema = ProjectSlugSchema;
5351
+ /** Derive a slug segment from a display name (not guaranteed unique). */
5352
+ function slugifyAppName(name) {
5353
+ return slugifyProjectName(name);
5354
+ }
5236
5355
  /** Browser→platform request budget (ping + small platform overhead). */
5237
5356
  const PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS = 17e3;
5238
5357
  /** Normalize a public origin URL (no trailing slash). */
@@ -5438,15 +5557,15 @@ const ChannelDirectoryEntrySchema = object({
5438
5557
  memberCount: number$1().int().nonnegative().optional(),
5439
5558
  isArchived: boolean().optional()
5440
5559
  });
5441
- const ChannelConnectionListResponseSchema = object({ connections: array(ChannelConnectionSchema) });
5442
- const ChannelDirectoryListResponseSchema = object({ channels: array(ChannelDirectoryEntrySchema) });
5560
+ const ChannelConnectionListResponseSchema = array(ChannelConnectionSchema);
5561
+ const ChannelDirectoryListResponseSchema = array(ChannelDirectoryEntrySchema);
5443
5562
  object({ teamName: string().min(1).optional() });
5444
- const ChannelAccountListResponseSchema = object({ accounts: array(object({
5563
+ const ChannelAccountListResponseSchema = array(object({
5445
5564
  id: string().min(1),
5446
5565
  platform: ChannelPlatformKeySchema,
5447
5566
  label: string().min(1),
5448
5567
  connectedAt: string()
5449
- })) });
5568
+ }));
5450
5569
  const NewChannelBindingInputSchema = object({
5451
5570
  channelId: string().min(1),
5452
5571
  channelName: string().min(1),
@@ -5463,6 +5582,14 @@ const UpdateChannelBindingBodySchema = object({ patch: object({
5463
5582
  mode: ChannelListenModeSchema.optional(),
5464
5583
  subscribeOnMention: boolean().optional()
5465
5584
  }) });
5585
+ /** Metadata for one vault field on a custom api_key app. */
5586
+ const AppCredentialFieldSchema = object({
5587
+ label: string().trim().min(1).optional(),
5588
+ secret: boolean().optional(),
5589
+ optional: boolean().optional()
5590
+ });
5591
+ /** Credential template keyed by vault field name. */
5592
+ const AppCredentialFieldsSchema = record(string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/), AppCredentialFieldSchema).refine((fields) => Object.keys(fields).length > 0, { message: "At least one credential field is required" }).refine((fields) => Object.values(fields).some((field) => field.optional !== true), { message: "At least one credential field must be required" });
5466
5593
  /** A single OAuth scope an app can request, with human copy for connect UI. */
5467
5594
  const OAuthScopeOptionSchema = object({
5468
5595
  name: string().min(1),
@@ -5490,6 +5617,37 @@ object({
5490
5617
  authKind: AppAuthKindSchema,
5491
5618
  oauthScopes: array(OAuthScopeOptionSchema)
5492
5619
  }).extend({ source: AppSourceSchema });
5620
+ const customAppNameSchema = string().trim().min(1, "Name is required");
5621
+ const AppSlugAvailabilityReasonSchema = ProjectSlugAvailabilityReasonSchema;
5622
+ const AppSlugAvailabilityResponseSchema = object({
5623
+ slug: string(),
5624
+ available: boolean(),
5625
+ reason: AppSlugAvailabilityReasonSchema.optional(),
5626
+ suggestion: AppSlugSchema.optional()
5627
+ });
5628
+ object({ slug: string().trim().min(1) });
5629
+ /** Request body for creating an org custom api_key app. */
5630
+ const CreateCustomAppRequestSchema = object({
5631
+ name: customAppNameSchema,
5632
+ slug: AppSlugSchema,
5633
+ description: string().trim().min(1),
5634
+ fields: AppCredentialFieldsSchema
5635
+ });
5636
+ /** Full custom app detail returned by GET (includes credential template for sync). */
5637
+ const CustomAppDetailSchema = object({
5638
+ id: string().min(1),
5639
+ slug: string().min(1),
5640
+ name: string().min(1),
5641
+ description: string().min(1),
5642
+ category: string().min(1),
5643
+ authKind: literal("api_key"),
5644
+ source: literal("custom"),
5645
+ credentialFields: AppCredentialFieldsSchema,
5646
+ createdAt: string().min(1),
5647
+ updatedAt: string().min(1)
5648
+ });
5649
+ const CreateCustomAppResponseSchema = CustomAppDetailSchema;
5650
+ const GetCustomAppResponseSchema = CustomAppDetailSchema;
5493
5651
  object({
5494
5652
  id: string().min(1),
5495
5653
  organizationId: string().min(1).nullable(),
@@ -5501,10 +5659,11 @@ object({
5501
5659
  authKind: AppAuthKindSchema,
5502
5660
  oauthScopes: array(OAuthScopeOptionSchema),
5503
5661
  source: AppSourceSchema,
5662
+ credentialFields: AppCredentialFieldsSchema.optional(),
5504
5663
  createdAt: string().min(1),
5505
5664
  updatedAt: string().min(1)
5506
5665
  });
5507
- const ListAppsResponseSchema = object({ apps: array(object({
5666
+ const ListAppsResponseSchema = array(object({
5508
5667
  id: string().min(1),
5509
5668
  name: string().min(1),
5510
5669
  description: string().min(1),
@@ -5513,9 +5672,69 @@ const ListAppsResponseSchema = object({ apps: array(object({
5513
5672
  logo: string().url().nullable().optional(),
5514
5673
  authKind: AppAuthKindSchema,
5515
5674
  oauthScopes: array(OAuthScopeOptionSchema),
5675
+ /** Where app metadata and execution are sourced (e.g. composio, custom). */
5676
+ source: AppSourceSchema,
5677
+ /** Custom api_key apps — vault field template for connect UI and sync. */
5678
+ credentialFields: AppCredentialFieldsSchema.optional(),
5516
5679
  /** When present, the app supports agent gateway bindings (external channels). */
5517
5680
  gateway: AppGatewaySchema.optional()
5518
- })) });
5681
+ }));
5682
+ const CatalogAppsPageSchema = object({
5683
+ items: array(object({
5684
+ name: string(),
5685
+ description: string(),
5686
+ package: string()
5687
+ })),
5688
+ nextCursor: string().optional()
5689
+ });
5690
+ const CatalogAppDetailSchema = object({
5691
+ name: string(),
5692
+ description: string(),
5693
+ package: string(),
5694
+ version: string().optional()
5695
+ });
5696
+ const CatalogActionSummarySchema = object({
5697
+ slug: string(),
5698
+ name: string(),
5699
+ description: string().optional()
5700
+ });
5701
+ const CatalogActionsPageSchema = object({
5702
+ toolkit: string().optional(),
5703
+ items: array(CatalogActionSummarySchema),
5704
+ nextCursor: string().optional()
5705
+ });
5706
+ const CatalogActionDetailSchema = object({
5707
+ slug: string(),
5708
+ name: string(),
5709
+ description: string().optional(),
5710
+ inputParameters: record(string(), unknown()).optional(),
5711
+ outputParameters: record(string(), unknown()).optional(),
5712
+ version: string().optional()
5713
+ });
5714
+ const CatalogAppsPageResponseSchema = CatalogAppsPageSchema;
5715
+ const CatalogAppDetailResponseSchema = CatalogAppDetailSchema;
5716
+ const CatalogActionsPageResponseSchema = CatalogActionsPageSchema;
5717
+ const CatalogActionDetailResponseSchema = CatalogActionDetailSchema;
5718
+ const ORG_SLUG_SEPARATOR = "/";
5719
+ /** Parse a stored app slug into official vs org-custom parts. */
5720
+ function parseAppSlug(slug) {
5721
+ const trimmed = slug.trim();
5722
+ if (!trimmed) throw new Error("parseAppSlug requires a non-empty slug");
5723
+ const separatorIndex = trimmed.indexOf(ORG_SLUG_SEPARATOR);
5724
+ if (separatorIndex === -1) return {
5725
+ kind: "official",
5726
+ slug: trimmed
5727
+ };
5728
+ const orgSlug = trimmed.slice(0, separatorIndex);
5729
+ const name = trimmed.slice(separatorIndex + 1);
5730
+ if (!orgSlug || !name || trimmed.indexOf(ORG_SLUG_SEPARATOR, separatorIndex + 1) !== -1) throw new Error(`Invalid org app slug: ${slug}`);
5731
+ return {
5732
+ kind: "org",
5733
+ orgSlug,
5734
+ name,
5735
+ slug: trimmed
5736
+ };
5737
+ }
5519
5738
  /** How a credential instance is stored (`credential_instances.auth_kind`). */
5520
5739
  const CredentialAuthKindSchema = _enum([
5521
5740
  "api_key",
@@ -5587,7 +5806,9 @@ function addMissingCredentialTargetIssue(ctx, path = ["projects"]) {
5587
5806
  const CredentialTargetsFieldsSchema = object({
5588
5807
  projects: array(string().min(1)).default([]),
5589
5808
  createOrganizationCredential: boolean().default(false),
5590
- createUserProvidedCredential: boolean().default(false)
5809
+ createUserProvidedCredential: boolean().default(false),
5810
+ /** Display label for created credential instances (apps table / detail page). */
5811
+ label: string().trim().min(1).optional()
5591
5812
  });
5592
5813
  /** Input for starting an OAuth connection (connect dialog / CLI connect). */
5593
5814
  const StartOAuthConnectionInputSchema = CredentialTargetsFieldsSchema.extend({
@@ -5600,6 +5821,25 @@ const StartOAuthConnectionResultSchema = object({
5600
5821
  status: _enum(["connected", "redirecting"]),
5601
5822
  authorizeUrl: string().url().nullable()
5602
5823
  });
5824
+ /** Input for starting a Composio/keystroke connection (connect dialog). */
5825
+ const StartKeystrokeConnectionInputSchema = object({
5826
+ app: string().trim().min(1),
5827
+ scopeType: AppCredentialScopeSchema,
5828
+ projectSlug: string().trim().min(1).optional(),
5829
+ label: string().trim().min(1).optional()
5830
+ }).superRefine((input, ctx) => {
5831
+ if (input.scopeType === "project" && !input.projectSlug?.trim()) ctx.addIssue({
5832
+ code: "custom",
5833
+ message: "projectSlug is required for project scope",
5834
+ path: ["projectSlug"]
5835
+ });
5836
+ });
5837
+ /** Result of starting a Composio/keystroke connection. */
5838
+ const StartKeystrokeConnectionResultSchema = object({
5839
+ status: _enum(["redirecting"]),
5840
+ authorizeUrl: string().url(),
5841
+ connectionId: string()
5842
+ });
5603
5843
  /** Request body for `POST /api/credentials` (manual api-key fan-out). */
5604
5844
  const CreateCredentialsRequestSchema = CredentialTargetsFieldsSchema.extend({
5605
5845
  appId: string().min(1),
@@ -5625,9 +5865,9 @@ const UpdateCredentialRequestSchema = object({
5625
5865
  isDefault: boolean().optional(),
5626
5866
  value: credentialSecretValueSchema.optional()
5627
5867
  }).refine((input) => input.label !== void 0 || input.isDefault !== void 0 || input.value !== void 0, { message: "At least one field is required" });
5628
- const ListCredentialsResponseSchema = object({ credentials: array(AppCredentialSummarySchema) });
5629
- const GetCredentialResponseSchema = object({ credential: AppCredentialSummarySchema });
5630
- const CreateCredentialsResponseSchema = object({ credentials: array(AppCredentialSummarySchema) });
5868
+ const ListCredentialsResponseSchema = array(AppCredentialSummarySchema);
5869
+ const GetCredentialResponseSchema = AppCredentialSummarySchema;
5870
+ const CreateCredentialsResponseSchema = array(AppCredentialSummarySchema);
5631
5871
  const McpConnectionStatusSchema = _enum([
5632
5872
  "INITIATED",
5633
5873
  "ACTIVE",
@@ -5636,13 +5876,13 @@ const McpConnectionStatusSchema = _enum([
5636
5876
  "INACTIVE",
5637
5877
  "REVOKED"
5638
5878
  ]);
5639
- object({ apps: array(object({
5879
+ object({
5640
5880
  slug: string(),
5641
5881
  name: string(),
5642
5882
  connected: boolean(),
5643
5883
  connectionId: string().optional(),
5644
5884
  status: McpConnectionStatusSchema.optional()
5645
- })) });
5885
+ });
5646
5886
  object({
5647
5887
  connectionId: string(),
5648
5888
  entityId: string(),
@@ -5652,11 +5892,6 @@ object({
5652
5892
  app: string().trim().min(1),
5653
5893
  tool: string().trim().min(1),
5654
5894
  arguments: record(string(), unknown()).default({}),
5655
- /**
5656
- * Resolved credential instance to execute against. When set, the platform executes that exact
5657
- * connection (scoped to the caller's org); when omitted it resolves the app's instance by scope.
5658
- */
5659
- instanceId: string().trim().min(1).optional(),
5660
5895
  /** Pinned provider toolkit version, sourced from the app definition; forwarded to the provider. */
5661
5896
  version: string().trim().min(1)
5662
5897
  });
@@ -5664,7 +5899,8 @@ const SubmitTeamRequestRequestSchema = object({
5664
5899
  type: _enum([
5665
5900
  "org-deletion",
5666
5901
  "contact",
5667
- "enterprise-upgrade"
5902
+ "enterprise-upgrade",
5903
+ "verification"
5668
5904
  ]),
5669
5905
  message: string().trim().max(5e3).optional()
5670
5906
  });
@@ -5684,112 +5920,12 @@ function toCredentialRequirement(item) {
5684
5920
  ...item.tokenField !== void 0 ? { tokenField: item.tokenField } : {}
5685
5921
  };
5686
5922
  }
5687
- const OrganizationSlugErrorCodeSchema = _enum([
5688
- "slug_taken",
5689
- "slug_reserved",
5690
- "slug_invalid"
5691
- ]);
5692
- const SlugAvailabilityReasonSchema = _enum([
5693
- "taken",
5694
- "reserved",
5695
- "invalid"
5696
- ]);
5697
- const SlugAvailabilityResponseSchema = object({
5698
- slug: string(),
5699
- available: boolean(),
5700
- reason: SlugAvailabilityReasonSchema.optional(),
5701
- suggestion: OrganizationSlugSchema.optional()
5702
- });
5703
- object({
5704
- slug: string().trim().min(1),
5705
- excludeOrganizationId: string().min(1).optional()
5706
- });
5707
- const ProjectSlugAvailabilityReasonSchema = _enum(["taken", "invalid"]);
5708
- const ProjectSlugAvailabilityResponseSchema = object({
5709
- slug: string(),
5710
- available: boolean(),
5711
- reason: ProjectSlugAvailabilityReasonSchema.optional(),
5712
- suggestion: ProjectSlugSchema.optional()
5713
- });
5714
- object({
5715
- slug: string().trim().min(1),
5716
- excludeProjectId: string().min(1).optional()
5717
- });
5718
- const ProjectStatusSchema = _enum([
5719
- "inactive",
5720
- "starting",
5721
- "active",
5722
- "failed"
5723
- ]);
5724
- const OrganizationUserRoleSchema = _enum([
5725
- "owner",
5726
- "admin",
5727
- "builder"
5728
- ]);
5729
- const isoDateTime$5 = string().datetime();
5730
- const OrganizationSchema = object({
5731
- id: string(),
5732
- name: string(),
5733
- slug: OrganizationSlugSchema,
5734
- createdAt: isoDateTime$5,
5735
- updatedAt: isoDateTime$5
5736
- });
5737
- const ProjectSchema = object({
5738
- id: string(),
5739
- organizationId: string(),
5740
- name: string(),
5741
- slug: ProjectSlugSchema,
5742
- description: string().nullable(),
5743
- status: ProjectStatusSchema,
5744
- baseUrl: string().nullable(),
5745
- runtimeId: string().nullable(),
5746
- lastError: string().nullable(),
5747
- createdAt: isoDateTime$5,
5748
- updatedAt: isoDateTime$5
5749
- });
5750
- const UserOrganizationSchema = object({
5751
- organization: OrganizationSchema,
5752
- role: OrganizationUserRoleSchema
5753
- });
5754
- const ActiveOrganizationResponseSchema = object({ organization: UserOrganizationSchema.nullable() });
5755
- const ListOrganizationsResponseSchema = object({ organizations: array(UserOrganizationSchema) });
5756
- const CreateOrganizationRequestSchema = object({
5757
- name: string().trim().min(1),
5758
- /** Format-only at the wire boundary; reserved-name checks run in platform-database. */
5759
- slug: OrganizationSlugSchema.optional()
5760
- });
5761
- const UpdateOrganizationRequestSchema = object({
5762
- name: string().trim().min(1).optional(),
5763
- slug: ClaimableOrganizationSlugSchema.optional()
5764
- }).refine((data) => data.name !== void 0 || data.slug !== void 0, { message: "At least one field is required" });
5765
- const CreateOrganizationResponseSchema = object({ organization: UserOrganizationSchema });
5766
- const ListProjectsResponseSchema = object({ projects: array(ProjectSchema) });
5767
- const ProjectListMetricsSchema = object({
5768
- agentCount: number$1(),
5769
- workflowCount: number$1(),
5770
- skillCount: number$1(),
5771
- credentialCount: number$1(),
5772
- lastDeploymentAt: isoDateTime$5.nullable()
5773
- });
5774
- const ListProjectMetricsResponseSchema = object({ metrics: record(string(), ProjectListMetricsSchema) });
5775
- const CreateProjectRequestSchema = object({
5776
- name: string().trim().min(1),
5777
- description: string().trim().min(1).optional()
5778
- });
5779
- const UpdateProjectRequestSchema = object({
5780
- name: string().trim().min(1).optional(),
5781
- description: string().trim().optional(),
5782
- slug: ProjectSlugSchema.optional()
5783
- }).refine((data) => data.name !== void 0 || data.description !== void 0 || data.slug !== void 0, { message: "At least one field is required" });
5784
- const CreateProjectResponseSchema = object({ project: ProjectSchema });
5785
- const ProjectResponseSchema = object({ project: ProjectSchema });
5786
- const ProjectReachabilityResponseSchema = object({ reachable: boolean() });
5787
5923
  const ValidationErrorDetailSchema = object({
5788
5924
  path: string(),
5789
5925
  message: string()
5790
5926
  });
5791
5927
  /** Machine-readable codes returned in standard API error bodies. */
5792
- const ErrorResponseCodeSchema = OrganizationSlugErrorCodeSchema.or(_enum(["needs_org_selection"]));
5928
+ const ErrorResponseCodeSchema = OrganizationSlugErrorCodeSchema.or(_enum(["needs_org_selection", "org_unverified"]));
5793
5929
  /** Standard JSON error body returned by the HTTP API. */
5794
5930
  const ErrorResponseSchema = object({
5795
5931
  error: string(),
@@ -6424,7 +6560,7 @@ const OrganizationMemberSchema = object({
6424
6560
  joinedAt: isoDateTime$4.optional(),
6425
6561
  lastActiveAt: isoDateTime$4.nullable().optional()
6426
6562
  });
6427
- const ListOrganizationMembersResponseSchema = object({ members: array(OrganizationMemberSchema) });
6563
+ const ListOrganizationMembersResponseSchema = array(OrganizationMemberSchema);
6428
6564
  const InviteOrganizationMembersRequestSchema = object({
6429
6565
  emails: array(string().trim().email()).min(1),
6430
6566
  role: InvitableOrganizationMemberRoleSchema
@@ -6435,22 +6571,22 @@ const InviteOrganizationMemberResultStatusSchema = _enum([
6435
6571
  "pending",
6436
6572
  "invalid"
6437
6573
  ]);
6438
- const InviteOrganizationMembersResponseSchema = object({ results: array(object({
6574
+ const InviteOrganizationMembersResponseSchema = array(object({
6439
6575
  email: string(),
6440
6576
  status: InviteOrganizationMemberResultStatusSchema,
6441
6577
  invitationId: string().optional()
6442
- })) });
6578
+ }));
6443
6579
  const UpdateOrganizationMemberRequestSchema = object({ role: InvitableOrganizationMemberRoleSchema });
6444
- const UpdateOrganizationMemberResponseSchema = object({ member: OrganizationMemberSchema });
6445
- const ListOrganizationInvitationsResponseSchema = object({ invitations: array(object({
6580
+ const UpdateOrganizationMemberResponseSchema = OrganizationMemberSchema;
6581
+ const ListOrganizationInvitationsResponseSchema = array(object({
6446
6582
  id: string(),
6447
6583
  organizationName: string(),
6448
6584
  organizationSlug: OrganizationSlugSchema,
6449
6585
  invitedByName: string().optional(),
6450
6586
  invitedByEmail: string().email().optional(),
6451
6587
  role: OrganizationMemberRoleSchema
6452
- })) });
6453
- const AcceptOrganizationInvitationResponseSchema = object({ organization: UserOrganizationSchema });
6588
+ }));
6589
+ const AcceptOrganizationInvitationResponseSchema = UserOrganizationSchema;
6454
6590
  const DeclineOrganizationInvitationResponseSchema = object({ success: literal(true) });
6455
6591
  const isoDateTime$3 = string().datetime();
6456
6592
  const ApiKeyCreatorSchema = object({
@@ -6469,7 +6605,7 @@ const ApiKeySummarySchema = object({
6469
6605
  createdBy: ApiKeyCreatorSchema,
6470
6606
  isCreatedByCurrentUser: boolean()
6471
6607
  });
6472
- const ListApiKeysResponseSchema = object({ apiKeys: array(ApiKeySummarySchema) });
6608
+ const ListApiKeysResponseSchema = array(ApiKeySummarySchema);
6473
6609
  const CreateApiKeyRequestSchema = object({ name: string().trim().min(1).max(128) });
6474
6610
  const CreateApiKeyResponseSchema = ApiKeySummarySchema.extend({ secret: string() });
6475
6611
  const ProjectUserRoleSchema = _enum(["admin", "builder"]);
@@ -6487,7 +6623,7 @@ const ProjectMemberSchema = object({
6487
6623
  createdAt: isoDateTime$2,
6488
6624
  isCurrentUser: boolean().optional()
6489
6625
  });
6490
- const ListProjectMembersResponseSchema = object({ members: array(ProjectMemberSchema) });
6626
+ const ListProjectMembersResponseSchema = array(ProjectMemberSchema);
6491
6627
  const InviteProjectMembersRequestSchema = object({
6492
6628
  emails: array(string().trim().email()).min(1),
6493
6629
  role: ProjectUserRoleSchema
@@ -6498,12 +6634,12 @@ const InviteProjectMemberResultStatusSchema = _enum([
6498
6634
  "not_org_member",
6499
6635
  "invalid"
6500
6636
  ]);
6501
- const InviteProjectMembersResponseSchema = object({ results: array(object({
6637
+ const InviteProjectMembersResponseSchema = array(object({
6502
6638
  email: string(),
6503
6639
  status: InviteProjectMemberResultStatusSchema
6504
- })) });
6640
+ }));
6505
6641
  const UpdateProjectMemberRequestSchema = object({ role: ProjectUserRoleSchema });
6506
- const UpdateProjectMemberResponseSchema = object({ member: ProjectMemberSchema });
6642
+ const UpdateProjectMemberResponseSchema = ProjectMemberSchema;
6507
6643
  const ProjectSettingsSchema = object({
6508
6644
  description: string(),
6509
6645
  defaultRole: ProjectUserRoleSchema,
@@ -6514,7 +6650,7 @@ const UpdateProjectSettingsRequestSchema = object({
6514
6650
  defaultRole: ProjectUserRoleSchema.optional(),
6515
6651
  invitePermission: ProjectInvitePermissionSchema.optional()
6516
6652
  }).refine((data) => data.description !== void 0 || data.defaultRole !== void 0 || data.invitePermission !== void 0, { message: "At least one field is required" });
6517
- const ProjectSettingsResponseSchema = object({ settings: ProjectSettingsSchema });
6653
+ const ProjectSettingsResponseSchema = ProjectSettingsSchema;
6518
6654
  /** Custom avatar override; null means fall back to OAuth `users.image`. */
6519
6655
  const UserAvatarSchema = object({ url: url().nullable() });
6520
6656
  const UserAvatarPatchSchema = object({
@@ -6626,7 +6762,7 @@ const DownloadActiveProjectArtifactResponseSchema = object({
6626
6762
  downloadUrl: string().url(),
6627
6763
  expiresInSeconds: number$1().int().positive()
6628
6764
  });
6629
- const ListProjectDeploymentsResponseSchema = object({ deployments: array(object({
6765
+ const ListProjectDeploymentsResponseSchema = array(object({
6630
6766
  id: string(),
6631
6767
  projectId: string(),
6632
6768
  version: number$1().int().positive(),
@@ -6635,7 +6771,7 @@ const ListProjectDeploymentsResponseSchema = object({ deployments: array(object(
6635
6771
  deployedByAvatarUrl: string().optional(),
6636
6772
  createdAt: isoDateTime$1,
6637
6773
  active: boolean()
6638
- })) });
6774
+ }));
6639
6775
  const optionalCount = number$1().int().nonnegative().nullable().optional();
6640
6776
  const optionalTimestamp = string().nullable().optional();
6641
6777
  const AgentSummarySchema = object({
@@ -6762,6 +6898,6 @@ object({
6762
6898
  generatedAt: isoDateTime
6763
6899
  });
6764
6900
  //#endregion
6765
- export { ListProjectsResponseSchema as $, normalizeCredentialList as $t, DownloadActiveProjectArtifactResponseSchema as A, TriggerRunListResponseSchema as At, InviteOrganizationMembersResponseSchema as B, UpdateProjectSettingsRequestSchema as Bt, CreateOrganizationResponseSchema as C, StartOAuthConnectionInputSchema as Ct, CredentialInstanceListResponseSchema as D, TriggerDetailResponseSchema as Dt, CreateProjectResponseSchema as E, SubmitTeamRequestRequestSchema as Et, HistoryRunCancelResponseSchema as F, UpdateOrganizationMemberResponseSchema as Ft, ListCredentialsResponseSchema as G, UserAvatarSchema as Gt, InviteProjectMembersResponseSchema as H, UploadProjectSourceResponseSchema as Ht, HistoryRunDetailResponseSchema as I, UpdateOrganizationRequestSchema as It, ListOrganizationsResponseSchema as J, WorkflowRunDetailResponseSchema as Jt, ListOrganizationInvitationsResponseSchema as K, UserPreferencesPatchSchema as Kt, HistoryRunListQuerySchema as L, UpdateProjectMemberRequestSchema as Lt, GatewayAttachmentRecordSchema as M, UpdateCredentialInstanceBodySchema as Mt, GetCredentialResponseSchema as N, UpdateCredentialRequestSchema as Nt, CredentialInstanceRecordSchema as O, TriggerListResponseSchema as Ot, HealthResponseSchema as P, UpdateOrganizationMemberRequestSchema as Pt, ListProjectMetricsResponseSchema as Q, listenPortFromPublicUrl as Qt, HistoryRunListResponseSchema as R, UpdateProjectMemberResponseSchema as Rt, CreateOrganizationRequestSchema as S, SlugAvailabilityResponseSchema as St, CreateProjectRequestSchema as T, StoredRouteManifestSchema as Tt, ListApiKeysResponseSchema as U, UpsertGatewayAttachmentBodySchema as Ut, InviteProjectMembersRequestSchema as V, UploadProjectSourceManifestRequestSchema as Vt, ListAppsResponseSchema as W, UserAvatarPatchSchema as Wt, ListProjectFilesResponseSchema as X, WorkflowSummaryDetailResponseSchema as Xt, ListProjectDeploymentsResponseSchema as Y, WorkflowRunListResponseSchema as Yt, ListProjectMembersResponseSchema as Z, WorkflowSummaryListResponseSchema as Zt, CreateApiKeyRequestSchema as _, QueuedRunResponseSchema as _t, AgentSessionListResponseSchema as a, custom as an, PresignOrgLogoResponseSchema as at, CreateCredentialsRequestSchema as b, SkillSummaryDetailResponseSchema as bt, BindChannelBodySchema as c, object as cn, PresignUserAvatarRequestSchema as ct, ChannelConnectionSchema as d, toJSONSchema as dn, ProjectResponseSchema as dt, originFromPublicUrl as en, OrganizationSidebarBrandingPatchSchema as et, ChannelDirectoryListResponseSchema as f, ProjectSettingsResponseSchema as ft, ConnectProvidersResponseSchema as g, QueuedAgentPromptResponseSchema as gt, ConnectAuthorizeUrlResponseSchema as h, PromptResponseSchema as ht, AgentSessionDetailResponseSchema as i, array as in, PresignOrgLogoRequestSchema as it, ErrorResponseSchema as j, UpdateChannelBindingBodySchema as jt, DeclineOrganizationInvitationResponseSchema as k, TriggerRunDetailResponseSchema as kt, ChannelAccountListResponseSchema as l, string as ln, PresignUserAvatarResponseSchema as lt, CompleteProjectArtifactResponseSchema as m, PromptInputSchema as mt, AcceptOrganizationInvitationResponseSchema as n, ZodType as nn, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS as nt, AgentSummaryDetailResponseSchema as o, discriminatedUnion as on, PresignProjectSourceRequestSchema as ot, ChannelPlatformSchema as p, ProjectSlugAvailabilityResponseSchema as pt, ListOrganizationMembersResponseSchema as q, UserPreferencesSchema as qt, ActiveOrganizationResponseSchema as r, _function as rn, PollRunResponseSchema as rt, AgentSummaryListResponseSchema as s, literal as sn, PresignProjectSourceResponseSchema as st, ACTIVE_ORG_HEADER as t, parseErrorResponse as tn, OrganizationSidebarBrandingSchema as tt, ChannelConnectionListResponseSchema as u, union as un, ProjectReachabilityResponseSchema as ut, CreateApiKeyResponseSchema as v, ROUTE_MANIFEST_REL_PATH as vt, CreateProjectArtifactResponseSchema as w, StartOAuthConnectionResultSchema as wt, CreateCredentialsResponseSchema as x, SkillSummaryListResponseSchema as xt, CreateCredentialInstanceBodySchema as y, RecentResourceListResponseSchema as yt, InviteOrganizationMembersRequestSchema as z, UpdateProjectRequestSchema as zt };
6901
+ export { ListCredentialsResponseSchema as $, UpsertGatewayAttachmentBodySchema as $t, CreateOrganizationResponseSchema as A, SlugAvailabilityResponseSchema as At, GetCredentialResponseSchema as B, TriggerRunListResponseSchema as Bt, CreateApiKeyResponseSchema as C, union as Cn, PromptResponseSchema as Ct, CreateCustomAppRequestSchema as D, RecentResourceListResponseSchema as Dt, CreateCredentialsResponseSchema as E, ROUTE_MANIFEST_REL_PATH as Et, CredentialInstanceRecordSchema as F, StoredRouteManifestSchema as Ft, HistoryRunListQuerySchema as G, UpdateOrganizationMemberResponseSchema as Gt, HealthResponseSchema as H, UpdateCredentialInstanceBodySchema as Ht, DeclineOrganizationInvitationResponseSchema as I, SubmitTeamRequestRequestSchema as It, InviteOrganizationMembersResponseSchema as J, UpdateProjectMemberResponseSchema as Jt, HistoryRunListResponseSchema as K, UpdateOrganizationRequestSchema as Kt, DownloadActiveProjectArtifactResponseSchema as L, TriggerDetailResponseSchema as Lt, CreateProjectRequestSchema as M, StartKeystrokeConnectionResultSchema as Mt, CreateProjectResponseSchema as N, StartOAuthConnectionInputSchema as Nt, CreateCustomAppResponseSchema as O, SkillSummaryDetailResponseSchema as Ot, CredentialInstanceListResponseSchema as P, StartOAuthConnectionResultSchema as Pt, ListAppsResponseSchema as Q, UploadProjectSourceResponseSchema as Qt, ErrorResponseSchema as R, TriggerListResponseSchema as Rt, CreateApiKeyRequestSchema as S, string as Sn, PromptInputSchema as St, CreateCredentialsRequestSchema as T, QueuedRunResponseSchema as Tt, HistoryRunCancelResponseSchema as U, UpdateCredentialRequestSchema as Ut, GetCustomAppResponseSchema as V, UpdateChannelBindingBodySchema as Vt, HistoryRunDetailResponseSchema as W, UpdateOrganizationMemberRequestSchema as Wt, InviteProjectMembersResponseSchema as X, UpdateProjectSettingsRequestSchema as Xt, InviteProjectMembersRequestSchema as Y, UpdateProjectRequestSchema as Yt, ListApiKeysResponseSchema as Z, UploadProjectSourceManifestRequestSchema as Zt, ChannelDirectoryListResponseSchema as _, array as _n, PresignUserAvatarResponseSchema as _t, AgentSessionListResponseSchema as a, WorkflowRunListResponseSchema as an, ListProjectMembersResponseSchema as at, ConnectAuthorizeUrlResponseSchema as b, literal as bn, ProjectSettingsResponseSchema as bt, AppSlugAvailabilityResponseSchema as c, listenPortFromPublicUrl as cn, OrganizationSidebarBrandingPatchSchema as ct, CatalogActionsPageResponseSchema as d, parseAppSlug as dn, PollRunResponseSchema as dt, UserAvatarPatchSchema as en, ListOrganizationInvitationsResponseSchema as et, CatalogAppDetailResponseSchema as f, parseErrorResponse as fn, PresignOrgLogoRequestSchema as ft, ChannelConnectionSchema as g, _function as gn, PresignUserAvatarRequestSchema as gt, ChannelConnectionListResponseSchema as h, _enum as hn, PresignProjectSourceResponseSchema as ht, AgentSessionDetailResponseSchema as i, WorkflowRunDetailResponseSchema as in, ListProjectFilesResponseSchema as it, CreateProjectArtifactResponseSchema as j, StartKeystrokeConnectionInputSchema as jt, CreateOrganizationRequestSchema as k, SkillSummaryListResponseSchema as kt, BindChannelBodySchema as l, normalizeCredentialList as ln, OrganizationSidebarBrandingSchema as lt, ChannelAccountListResponseSchema as m, ZodType as mn, PresignProjectSourceRequestSchema as mt, AcceptOrganizationInvitationResponseSchema as n, UserPreferencesPatchSchema as nn, ListOrganizationsResponseSchema as nt, AgentSummaryDetailResponseSchema as o, WorkflowSummaryDetailResponseSchema as on, ListProjectMetricsResponseSchema as ot, CatalogAppsPageResponseSchema as p, slugifyAppName as pn, PresignOrgLogoResponseSchema as pt, InviteOrganizationMembersRequestSchema as q, UpdateProjectMemberRequestSchema as qt, ActiveOrganizationResponseSchema as r, UserPreferencesSchema as rn, ListProjectDeploymentsResponseSchema as rt, AgentSummaryListResponseSchema as s, WorkflowSummaryListResponseSchema as sn, ListProjectsResponseSchema as st, ACTIVE_ORG_HEADER as t, UserAvatarSchema as tn, ListOrganizationMembersResponseSchema as tt, CatalogActionDetailResponseSchema as u, originFromPublicUrl as un, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS as ut, ChannelPlatformSchema as v, custom as vn, ProjectReachabilityResponseSchema as vt, CreateCredentialInstanceBodySchema as w, toJSONSchema as wn, QueuedAgentPromptResponseSchema as wt, ConnectProvidersResponseSchema as x, object as xn, ProjectSlugAvailabilityResponseSchema as xt, CompleteProjectArtifactResponseSchema as y, discriminatedUnion as yn, ProjectResponseSchema as yt, GatewayAttachmentRecordSchema as z, TriggerRunDetailResponseSchema as zt };
6766
6902
 
6767
- //# sourceMappingURL=dist-C47GdlWY.mjs.map
6903
+ //# sourceMappingURL=dist-DAVSXcfW.mjs.map