@keystrokehq/cli 1.0.24 → 1.0.25

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.
@@ -5686,7 +5686,9 @@ const UpdateChannelBindingBodySchema = object({ patch: object({
5686
5686
  const AppCredentialFieldSchema = object({
5687
5687
  label: string().trim().min(1).optional(),
5688
5688
  secret: boolean().optional(),
5689
- optional: boolean().optional()
5689
+ optional: boolean().optional(),
5690
+ description: string().trim().min(1).optional(),
5691
+ default: string().optional()
5690
5692
  });
5691
5693
  /** Credential template keyed by vault field name. */
5692
5694
  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" });
@@ -5703,6 +5705,13 @@ const AppAuthKindSchema = _enum([
5703
5705
  "api_key",
5704
5706
  "keystroke"
5705
5707
  ]);
5708
+ /** Composio auth scheme for API-key style connections. */
5709
+ const AppCredentialSchemeSchema = _enum([
5710
+ "API_KEY",
5711
+ "BEARER_TOKEN",
5712
+ "BASIC",
5713
+ "BASIC_WITH_JWT"
5714
+ ]);
5706
5715
  /**
5707
5716
  * Where app metadata and execution are sourced (e.g. native, composio, pipedream, custom).
5708
5717
  * Opaque string — cloud/hosted entrypoints choose values; keystroke stays provider-agnostic.
@@ -5716,7 +5725,11 @@ object({
5716
5725
  logo: string().url().optional(),
5717
5726
  authKind: AppAuthKindSchema,
5718
5727
  oauthScopes: array(OAuthScopeOptionSchema)
5719
- }).extend({ source: AppSourceSchema });
5728
+ }).extend({
5729
+ source: AppSourceSchema,
5730
+ credentialFields: AppCredentialFieldsSchema.optional(),
5731
+ credentialScheme: AppCredentialSchemeSchema.optional()
5732
+ });
5720
5733
  const customAppNameSchema = string().trim().min(1, "Name is required");
5721
5734
  const AppSlugAvailabilityReasonSchema = ProjectSlugAvailabilityReasonSchema;
5722
5735
  const AppSlugAvailabilityResponseSchema = object({
@@ -5760,6 +5773,7 @@ object({
5760
5773
  oauthScopes: array(OAuthScopeOptionSchema),
5761
5774
  source: AppSourceSchema,
5762
5775
  credentialFields: AppCredentialFieldsSchema.optional(),
5776
+ credentialScheme: AppCredentialSchemeSchema.optional(),
5763
5777
  createdAt: string().min(1),
5764
5778
  updatedAt: string().min(1)
5765
5779
  });
@@ -5776,6 +5790,8 @@ const ListAppsResponseSchema = array(object({
5776
5790
  source: AppSourceSchema,
5777
5791
  /** Custom api_key apps — vault field template for connect UI and sync. */
5778
5792
  credentialFields: AppCredentialFieldsSchema.optional(),
5793
+ /** Composio auth scheme when credentialFields are present. */
5794
+ credentialScheme: AppCredentialSchemeSchema.optional(),
5779
5795
  /** When present, the app supports agent gateway bindings (external channels). */
5780
5796
  gateway: AppGatewaySchema.optional()
5781
5797
  }));
@@ -5899,7 +5915,7 @@ const AppCredentialSummarySchema = object({
5899
5915
  });
5900
5916
  const credentialSecretValueSchema = record(string(), unknown()).refine((value) => Object.keys(value).length > 0, { message: "value must be a non-empty object" });
5901
5917
  function hasCredentialTarget(input) {
5902
- return input.projects.length > 0 || input.createOrganizationCredential || input.createUserProvidedCredential;
5918
+ return input.projects.length > 0 || input.createOrganizationCredential || input.createUserProvidedCredential || Boolean(input.credentialInstanceId?.trim());
5903
5919
  }
5904
5920
  function addMissingCredentialTargetIssue(ctx, path = ["projects"]) {
5905
5921
  ctx.addIssue({
@@ -5914,7 +5930,9 @@ const CredentialTargetsFieldsSchema = object({
5914
5930
  createOrganizationCredential: boolean().default(false),
5915
5931
  createUserProvidedCredential: boolean().default(false),
5916
5932
  /** Display label for created credential instances (apps table / detail page). */
5917
- label: string().trim().min(1).optional()
5933
+ label: string().trim().min(1).optional(),
5934
+ /** When set, update this credential instance in place (reconnect) instead of creating a new row. */
5935
+ credentialInstanceId: string().trim().min(1).optional()
5918
5936
  });
5919
5937
  /** Input for starting an OAuth connection (connect dialog / CLI connect). */
5920
5938
  const StartOAuthConnectionInputSchema = CredentialTargetsFieldsSchema.extend({
@@ -5928,15 +5946,21 @@ const StartOAuthConnectionResultSchema = object({
5928
5946
  authorizeUrl: string().url().nullable()
5929
5947
  });
5930
5948
  /** Input for starting a keystroke connection (connect dialog). */
5931
- const StartKeystrokeConnectionInputSchema = CredentialTargetsFieldsSchema.extend({ app: string().trim().min(1) }).superRefine((input, ctx) => {
5949
+ const StartKeystrokeConnectionInputSchema = CredentialTargetsFieldsSchema.extend({
5950
+ app: string().trim().min(1),
5951
+ value: credentialSecretValueSchema.optional()
5952
+ }).superRefine((input, ctx) => {
5932
5953
  if (!hasCredentialTarget(input)) addMissingCredentialTargetIssue(ctx);
5933
5954
  });
5934
5955
  /** Result of starting a keystroke connection. */
5935
- const StartKeystrokeConnectionResultSchema = object({
5936
- status: _enum(["redirecting"]),
5956
+ const StartKeystrokeConnectionResultSchema = discriminatedUnion("status", [object({
5957
+ status: literal("connected"),
5958
+ connectionId: string().min(1)
5959
+ }), object({
5960
+ status: literal("redirecting"),
5937
5961
  authorizeUrl: string().url(),
5938
- connectionId: string()
5939
- });
5962
+ connectionId: string().min(1)
5963
+ })]);
5940
5964
  /** Request body for `POST /api/credentials` (manual api-key fan-out). */
5941
5965
  const CreateCredentialsRequestSchema = CredentialTargetsFieldsSchema.extend({
5942
5966
  appId: string().min(1),
@@ -6038,6 +6062,14 @@ object({
6038
6062
  /** Tool/step consumer id for assignment lookup (action slug or workflow step correlation id). */
6039
6063
  consumerId: string().trim().min(1).optional()
6040
6064
  });
6065
+ object({
6066
+ error: _enum([
6067
+ "not_found",
6068
+ "forbidden",
6069
+ "mcp_execute_failed"
6070
+ ]),
6071
+ message: string()
6072
+ });
6041
6073
  const SubmitTeamRequestRequestSchema = object({
6042
6074
  type: _enum([
6043
6075
  "org-deletion",
@@ -7123,4 +7155,4 @@ const ListAgentWorkspaceFilesResponseSchema = object({ files: array(object({
7123
7155
  //#endregion
7124
7156
  export { HistoryRunListQuerySchema as $, NEVER as $n, UpdateChannelBindingBodySchema as $t, CreateCustomAppRequestSchema as A, ZodType as An, ProjectResponseSchema as At, CredentialConsumerListQuerySchema as B, literal as Bn, SkillSummaryListResponseSchema as Bt, ConnectAuthorizeUrlResponseSchema as C, normalizeCredentialList as Cn, PresignOrgLogoRequestSchema as Ct, CreateCredentialInstanceBodySchema as D, resolvePublicPlatformOrigin as Dn, PresignUserAvatarRequestSchema as Dt, CreateApiKeyResponseSchema as E, parseErrorResponse as En, PresignProjectSourceResponseSchema as Et, CreateProjectRequestSchema as F, array as Fn, QueuedAgentPromptResponseSchema as Ft, DownloadActiveProjectArtifactResponseSchema as G, preprocess as Gn, StartOAuthConnectionResultSchema as Gt, CredentialInstanceListResponseSchema as H, number$1 as Hn, StartKeystrokeConnectionInputSchema as Ht, CreateProjectResponseSchema as I, boolean as In, QueuedRunResponseSchema as It, GetCredentialResponseSchema as J, union as Jn, SubmitTeamRequestRequestSchema as Jt, ErrorResponseSchema as K, record as Kn, StoredRouteManifestSchema as Kt, CredentialAssignmentListQuerySchema as L, custom as Ln, ROUTE_MANIFEST_REL_PATH as Lt, CreateOrganizationRequestSchema as M, _function as Mn, ProjectSlugAvailabilityResponseSchema as Mt, CreateOrganizationResponseSchema as N, _null as Nn, PromptInputSchema as Nt, CreateCredentialsRequestSchema as O, slugifyAppName as On, PresignUserAvatarResponseSchema as Ot, CreateProjectArtifactResponseSchema as P, any as Pn, PromptResponseSchema as Pt, HistoryRunDetailResponseSchema as Q, toJSONSchema as Qn, TriggerRunListResponseSchema as Qt, CredentialAssignmentListResponseSchema as R, discriminatedUnion as Rn, RecentResourceListResponseSchema as Rt, CompleteProjectArtifactResponseSchema as S, listenPortFromPublicUrl as Sn, PollRunResponseSchema as St, CreateApiKeyRequestSchema as T, parseAppSlug as Tn, PresignProjectSourceRequestSchema as Tt, CredentialInstanceRecordSchema as U, object as Un, StartKeystrokeConnectionResultSchema as Ut, CredentialConsumerListResponseSchema as V, looseObject as Vn, SlugAvailabilityResponseSchema as Vt, DeclineOrganizationInvitationResponseSchema as W, optional as Wn, StartOAuthConnectionInputSchema as Wt, HealthResponseSchema as X, url as Xn, TriggerListResponseSchema as Xt, GetCustomAppResponseSchema as Y, unknown as Yn, TriggerDetailResponseSchema as Yt, HistoryRunCancelResponseSchema as Z, datetime as Zn, TriggerRunDetailResponseSchema as Zt, ChannelAccountListResponseSchema as _, WorkflowRunListResponseSchema as _n, ListProjectMetricsResponseSchema as _t, AgentSessionDetailResponseSchema as a, UpdateProjectMemberRequestSchema as an, LOCAL_PLATFORM_ORIGIN as at, ChannelDirectoryListResponseSchema as b, buildConnectDeeplink as bn, OrganizationSidebarBrandingSchema as bt, AgentSummaryListResponseSchema as c, UpdateProjectSettingsRequestSchema as cn, ListApiKeysResponseSchema as ct, AssignCredentialBodySchema as d, UpsertGatewayAttachmentBodySchema as dn, ListOrganizationInvitationsResponseSchema as dt, UpdateCredentialInstanceBodySchema as en, HistoryRunListResponseSchema as et, BindChannelBodySchema as f, UserAvatarPatchSchema as fn, ListOrganizationMembersResponseSchema as ft, CatalogAppsPageResponseSchema as g, WorkflowRunDetailResponseSchema as gn, ListProjectMembersResponseSchema as gt, CatalogAppDetailResponseSchema as h, UserPreferencesSchema as hn, ListProjectFilesResponseSchema as ht, AgentSessionChatStateResponseSchema as i, UpdateOrganizationRequestSchema as in, InviteProjectMembersResponseSchema as it, CreateCustomAppResponseSchema as j, _enum as jn, ProjectSettingsResponseSchema as jt, CreateCredentialsResponseSchema as k, number as kn, ProjectReachabilityResponseSchema as kt, AgentTriggerSummaryListResponseSchema as l, UploadProjectSourceManifestRequestSchema as ln, ListAppsResponseSchema as lt, CatalogActionsPageResponseSchema as m, UserPreferencesPatchSchema as mn, ListProjectDeploymentsResponseSchema as mt, AcceptOrganizationInvitationResponseSchema as n, UpdateOrganizationMemberRequestSchema as nn, InviteOrganizationMembersResponseSchema as nt, AgentSessionListResponseSchema as o, UpdateProjectMemberResponseSchema as on, ListAgentMemoryFilesResponseSchema as ot, CatalogActionDetailResponseSchema as p, UserAvatarSchema as pn, ListOrganizationsResponseSchema as pt, GatewayAttachmentRecordSchema as q, string as qn, SubmitMarketingContactRequestSchema as qt, ActiveOrganizationResponseSchema as r, UpdateOrganizationMemberResponseSchema as rn, InviteProjectMembersRequestSchema as rt, AgentSummaryDetailResponseSchema as s, UpdateProjectRequestSchema as sn, ListAgentWorkspaceFilesResponseSchema as st, ACTIVE_ORG_HEADER as t, UpdateCredentialRequestSchema as tn, InviteOrganizationMembersRequestSchema as tt, AppSlugAvailabilityResponseSchema as u, UploadProjectSourceResponseSchema as un, ListCredentialsResponseSchema as ut, ChannelConnectionListResponseSchema as v, WorkflowSummaryDetailResponseSchema as vn, ListProjectsResponseSchema as vt, ConnectProvidersResponseSchema as w, originFromPublicUrl as wn, PresignOrgLogoResponseSchema as wt, ChannelPlatformSchema as x, credentialInputSchema as xn, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS as xt, ChannelConnectionSchema as y, WorkflowSummaryListResponseSchema as yn, OrganizationSidebarBrandingPatchSchema as yt, CredentialAssignmentRecordSchema as z, intersection as zn, SkillSummaryDetailResponseSchema as zt };
7125
7157
 
7126
- //# sourceMappingURL=dist-3h33yl2W.mjs.map
7158
+ //# sourceMappingURL=dist-CBr6Vyut.mjs.map