@keystrokehq/cli 0.0.174 → 0.0.176

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.
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env node
2
+ import "node:os";
3
+ import "node:path";
2
4
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
3
5
  var _a$1;
4
6
  function $constructor(name, initializer, params) {
@@ -3038,7 +3040,7 @@ function initializeContext(params) {
3038
3040
  external: params?.external ?? void 0
3039
3041
  };
3040
3042
  }
3041
- function process(schema, ctx, _params = {
3043
+ function process$1(schema, ctx, _params = {
3042
3044
  path: [],
3043
3045
  schemaPath: []
3044
3046
  }) {
@@ -3075,7 +3077,7 @@ function process(schema, ctx, _params = {
3075
3077
  const parent = schema._zod.parent;
3076
3078
  if (parent) {
3077
3079
  if (!result.ref) result.ref = parent;
3078
- process(parent, ctx, params);
3080
+ process$1(parent, ctx, params);
3079
3081
  ctx.seen.get(parent).isParent = true;
3080
3082
  }
3081
3083
  }
@@ -3295,7 +3297,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
3295
3297
  ...params,
3296
3298
  processors
3297
3299
  });
3298
- process(schema, ctx);
3300
+ process$1(schema, ctx);
3299
3301
  extractDefs(ctx, schema);
3300
3302
  return finalize(ctx, schema);
3301
3303
  };
@@ -3307,7 +3309,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
3307
3309
  io,
3308
3310
  processors
3309
3311
  });
3310
- process(schema, ctx);
3312
+ process$1(schema, ctx);
3311
3313
  extractDefs(ctx, schema);
3312
3314
  return finalize(ctx, schema);
3313
3315
  };
@@ -3473,7 +3475,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
3473
3475
  if (typeof minimum === "number") json.minItems = minimum;
3474
3476
  if (typeof maximum === "number") json.maxItems = maximum;
3475
3477
  json.type = "array";
3476
- json.items = process(def.element, ctx, {
3478
+ json.items = process$1(def.element, ctx, {
3477
3479
  ...params,
3478
3480
  path: [...params.path, "items"]
3479
3481
  });
@@ -3484,7 +3486,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
3484
3486
  json.type = "object";
3485
3487
  json.properties = {};
3486
3488
  const shape = def.shape;
3487
- for (const key in shape) json.properties[key] = process(shape[key], ctx, {
3489
+ for (const key in shape) json.properties[key] = process$1(shape[key], ctx, {
3488
3490
  ...params,
3489
3491
  path: [
3490
3492
  ...params.path,
@@ -3502,7 +3504,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
3502
3504
  if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
3503
3505
  else if (!def.catchall) {
3504
3506
  if (ctx.io === "output") json.additionalProperties = false;
3505
- } else if (def.catchall) json.additionalProperties = process(def.catchall, ctx, {
3507
+ } else if (def.catchall) json.additionalProperties = process$1(def.catchall, ctx, {
3506
3508
  ...params,
3507
3509
  path: [...params.path, "additionalProperties"]
3508
3510
  });
@@ -3510,7 +3512,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
3510
3512
  const unionProcessor = (schema, ctx, json, params) => {
3511
3513
  const def = schema._zod.def;
3512
3514
  const isExclusive = def.inclusive === false;
3513
- const options = def.options.map((x, i) => process(x, ctx, {
3515
+ const options = def.options.map((x, i) => process$1(x, ctx, {
3514
3516
  ...params,
3515
3517
  path: [
3516
3518
  ...params.path,
@@ -3523,7 +3525,7 @@ const unionProcessor = (schema, ctx, json, params) => {
3523
3525
  };
3524
3526
  const intersectionProcessor = (schema, ctx, json, params) => {
3525
3527
  const def = schema._zod.def;
3526
- const a = process(def.left, ctx, {
3528
+ const a = process$1(def.left, ctx, {
3527
3529
  ...params,
3528
3530
  path: [
3529
3531
  ...params.path,
@@ -3531,7 +3533,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
3531
3533
  0
3532
3534
  ]
3533
3535
  });
3534
- const b = process(def.right, ctx, {
3536
+ const b = process$1(def.right, ctx, {
3535
3537
  ...params,
3536
3538
  path: [
3537
3539
  ...params.path,
@@ -3548,7 +3550,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
3548
3550
  json.type = "array";
3549
3551
  const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
3550
3552
  const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
3551
- const prefixItems = def.items.map((x, i) => process(x, ctx, {
3553
+ const prefixItems = def.items.map((x, i) => process$1(x, ctx, {
3552
3554
  ...params,
3553
3555
  path: [
3554
3556
  ...params.path,
@@ -3556,7 +3558,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
3556
3558
  i
3557
3559
  ]
3558
3560
  }));
3559
- const rest = def.rest ? process(def.rest, ctx, {
3561
+ const rest = def.rest ? process$1(def.rest, ctx, {
3560
3562
  ...params,
3561
3563
  path: [
3562
3564
  ...params.path,
@@ -3587,7 +3589,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
3587
3589
  const keyType = def.keyType;
3588
3590
  const patterns = keyType._zod.bag?.patterns;
3589
3591
  if (def.mode === "loose" && patterns && patterns.size > 0) {
3590
- const valueSchema = process(def.valueType, ctx, {
3592
+ const valueSchema = process$1(def.valueType, ctx, {
3591
3593
  ...params,
3592
3594
  path: [
3593
3595
  ...params.path,
@@ -3598,11 +3600,11 @@ const recordProcessor = (schema, ctx, _json, params) => {
3598
3600
  json.patternProperties = {};
3599
3601
  for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
3600
3602
  } else {
3601
- if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process(def.keyType, ctx, {
3603
+ if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$1(def.keyType, ctx, {
3602
3604
  ...params,
3603
3605
  path: [...params.path, "propertyNames"]
3604
3606
  });
3605
- json.additionalProperties = process(def.valueType, ctx, {
3607
+ json.additionalProperties = process$1(def.valueType, ctx, {
3606
3608
  ...params,
3607
3609
  path: [...params.path, "additionalProperties"]
3608
3610
  });
@@ -3615,7 +3617,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
3615
3617
  };
3616
3618
  const nullableProcessor = (schema, ctx, json, params) => {
3617
3619
  const def = schema._zod.def;
3618
- const inner = process(def.innerType, ctx, params);
3620
+ const inner = process$1(def.innerType, ctx, params);
3619
3621
  const seen = ctx.seen.get(schema);
3620
3622
  if (ctx.target === "openapi-3.0") {
3621
3623
  seen.ref = def.innerType;
@@ -3624,27 +3626,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
3624
3626
  };
3625
3627
  const nonoptionalProcessor = (schema, ctx, _json, params) => {
3626
3628
  const def = schema._zod.def;
3627
- process(def.innerType, ctx, params);
3629
+ process$1(def.innerType, ctx, params);
3628
3630
  const seen = ctx.seen.get(schema);
3629
3631
  seen.ref = def.innerType;
3630
3632
  };
3631
3633
  const defaultProcessor = (schema, ctx, json, params) => {
3632
3634
  const def = schema._zod.def;
3633
- process(def.innerType, ctx, params);
3635
+ process$1(def.innerType, ctx, params);
3634
3636
  const seen = ctx.seen.get(schema);
3635
3637
  seen.ref = def.innerType;
3636
3638
  json.default = JSON.parse(JSON.stringify(def.defaultValue));
3637
3639
  };
3638
3640
  const prefaultProcessor = (schema, ctx, json, params) => {
3639
3641
  const def = schema._zod.def;
3640
- process(def.innerType, ctx, params);
3642
+ process$1(def.innerType, ctx, params);
3641
3643
  const seen = ctx.seen.get(schema);
3642
3644
  seen.ref = def.innerType;
3643
3645
  if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
3644
3646
  };
3645
3647
  const catchProcessor = (schema, ctx, json, params) => {
3646
3648
  const def = schema._zod.def;
3647
- process(def.innerType, ctx, params);
3649
+ process$1(def.innerType, ctx, params);
3648
3650
  const seen = ctx.seen.get(schema);
3649
3651
  seen.ref = def.innerType;
3650
3652
  let catchValue;
@@ -3659,32 +3661,32 @@ const pipeProcessor = (schema, ctx, _json, params) => {
3659
3661
  const def = schema._zod.def;
3660
3662
  const inIsTransform = def.in._zod.traits.has("$ZodTransform");
3661
3663
  const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
3662
- process(innerType, ctx, params);
3664
+ process$1(innerType, ctx, params);
3663
3665
  const seen = ctx.seen.get(schema);
3664
3666
  seen.ref = innerType;
3665
3667
  };
3666
3668
  const readonlyProcessor = (schema, ctx, json, params) => {
3667
3669
  const def = schema._zod.def;
3668
- process(def.innerType, ctx, params);
3670
+ process$1(def.innerType, ctx, params);
3669
3671
  const seen = ctx.seen.get(schema);
3670
3672
  seen.ref = def.innerType;
3671
3673
  json.readOnly = true;
3672
3674
  };
3673
3675
  const promiseProcessor = (schema, ctx, _json, params) => {
3674
3676
  const def = schema._zod.def;
3675
- process(def.innerType, ctx, params);
3677
+ process$1(def.innerType, ctx, params);
3676
3678
  const seen = ctx.seen.get(schema);
3677
3679
  seen.ref = def.innerType;
3678
3680
  };
3679
3681
  const optionalProcessor = (schema, ctx, _json, params) => {
3680
3682
  const def = schema._zod.def;
3681
- process(def.innerType, ctx, params);
3683
+ process$1(def.innerType, ctx, params);
3682
3684
  const seen = ctx.seen.get(schema);
3683
3685
  seen.ref = def.innerType;
3684
3686
  };
3685
3687
  const lazyProcessor = (schema, ctx, _json, params) => {
3686
3688
  const innerType = schema._zod.innerType;
3687
- process(innerType, ctx, params);
3689
+ process$1(innerType, ctx, params);
3688
3690
  const seen = ctx.seen.get(schema);
3689
3691
  seen.ref = innerType;
3690
3692
  };
@@ -3739,7 +3741,7 @@ function toJSONSchema(input, params) {
3739
3741
  const defs = {};
3740
3742
  for (const entry of registry._idmap.entries()) {
3741
3743
  const [_, schema] = entry;
3742
- process(schema, ctx);
3744
+ process$1(schema, ctx);
3743
3745
  }
3744
3746
  const schemas = {};
3745
3747
  ctx.external = {
@@ -3759,7 +3761,7 @@ function toJSONSchema(input, params) {
3759
3761
  ...params,
3760
3762
  processors: allProcessors
3761
3763
  });
3762
- process(input, ctx);
3764
+ process$1(input, ctx);
3763
3765
  extractDefs(ctx, input);
3764
3766
  return finalize(ctx, input);
3765
3767
  }
@@ -5546,13 +5548,46 @@ const OAuthScopeOptionSchema = object({
5546
5548
  required: boolean().optional()
5547
5549
  });
5548
5550
  /** How an app authenticates when connecting credentials. */
5549
- const AppAuthKindSchema = _enum(["oauth", "api_key"]);
5551
+ const AppAuthKindSchema = _enum([
5552
+ "oauth",
5553
+ "api_key",
5554
+ "keystroke"
5555
+ ]);
5556
+ /**
5557
+ * Where app metadata and execution are sourced (e.g. native, composio, pipedream, custom).
5558
+ * Opaque string — cloud/hosted entrypoints choose values; keystroke stays provider-agnostic.
5559
+ */
5560
+ const AppSourceSchema = string().trim().min(1);
5561
+ object({
5562
+ slug: string().trim().min(1),
5563
+ name: string().min(1),
5564
+ description: string().min(1),
5565
+ category: string().min(1),
5566
+ logo: string().url().optional(),
5567
+ authKind: AppAuthKindSchema,
5568
+ oauthScopes: array(OAuthScopeOptionSchema)
5569
+ }).extend({ source: AppSourceSchema });
5570
+ object({
5571
+ id: string().min(1),
5572
+ organizationId: string().min(1).nullable(),
5573
+ slug: string().min(1),
5574
+ name: string().min(1),
5575
+ description: string().min(1),
5576
+ category: string().min(1),
5577
+ logo: string().url().nullable(),
5578
+ authKind: AppAuthKindSchema,
5579
+ oauthScopes: array(OAuthScopeOptionSchema),
5580
+ source: AppSourceSchema,
5581
+ createdAt: string().min(1),
5582
+ updatedAt: string().min(1)
5583
+ });
5550
5584
  const ListAppsResponseSchema = object({ apps: array(object({
5551
5585
  id: string().min(1),
5552
5586
  name: string().min(1),
5553
5587
  description: string().min(1),
5554
5588
  category: string().min(1),
5555
5589
  integrationDescription: string().min(1),
5590
+ logo: string().url().nullable().optional(),
5556
5591
  authKind: AppAuthKindSchema,
5557
5592
  oauthScopes: array(OAuthScopeOptionSchema),
5558
5593
  /** When present, the app supports agent gateway bindings (external channels). */
@@ -6806,4 +6841,4 @@ object({
6806
6841
  //#endregion
6807
6842
  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 };
6808
6843
 
6809
- //# sourceMappingURL=dist-XVz5PFMT.mjs.map
6844
+ //# sourceMappingURL=dist-1DXSFd_J.mjs.map