@keystrokehq/keystroke 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.
- package/dist/action.cjs +1 -1
- package/dist/action.d.cts +2 -2
- package/dist/action.d.mts +2 -2
- package/dist/action.mjs +1 -1
- package/dist/agent.cjs +47 -6625
- package/dist/agent.cjs.map +1 -1
- package/dist/agent.d.cts +2 -2
- package/dist/agent.d.mts +2 -2
- package/dist/agent.mjs +48 -6626
- package/dist/agent.mjs.map +1 -1
- package/dist/app.cjs +1 -1
- package/dist/app.d.cts +2 -2
- package/dist/app.d.mts +2 -2
- package/dist/app.mjs +1 -1
- package/dist/client.cjs +1 -1
- package/dist/client.mjs +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/credentials.cjs +1 -1
- package/dist/credentials.d.cts +1 -1
- package/dist/credentials.d.mts +1 -1
- package/dist/credentials.mjs +1 -1
- package/dist/{dist-D1qsfZPC.cjs → dist-B21SD2iJ.cjs} +6690 -21
- package/dist/dist-B21SD2iJ.cjs.map +1 -0
- package/dist/{dist-CE8Bys_M.cjs → dist-BhKByPZJ.cjs} +129 -6
- package/dist/dist-BhKByPZJ.cjs.map +1 -0
- package/dist/{dist-Cfj4uquz.mjs → dist-BqvxjcRz.mjs} +3 -3
- package/dist/{dist-Cfj4uquz.mjs.map → dist-BqvxjcRz.mjs.map} +1 -1
- package/dist/{dist-24hGLXP2.mjs → dist-CECXTPHW.mjs} +6673 -16
- package/dist/dist-CECXTPHW.mjs.map +1 -0
- package/dist/{dist-BJBiKPGz.cjs → dist-CtJ1zU3i.cjs} +3 -3
- package/dist/{dist-BJBiKPGz.cjs.map → dist-CtJ1zU3i.cjs.map} +1 -1
- package/dist/{dist-Kz_xVVMR.mjs → dist-DvwUCbk1.mjs} +129 -6
- package/dist/dist-DvwUCbk1.mjs.map +1 -0
- package/dist/{index-WT4ULMiw.d.cts → index-B1YicUCL.d.cts} +2 -1
- package/dist/index-B1YicUCL.d.cts.map +1 -0
- package/dist/{index-WT4ULMiw.d.mts → index-B1YicUCL.d.mts} +2 -1
- package/dist/index-B1YicUCL.d.mts.map +1 -0
- package/dist/{index-CwLz1Fhs.d.mts → index-CAyshOQj.d.mts} +4 -4
- package/dist/{index-CwLz1Fhs.d.mts.map → index-CAyshOQj.d.mts.map} +1 -1
- package/dist/{index-Cq2F2XdS.d.mts → index-CGHk6JeR.d.mts} +4 -3
- package/dist/{index-Cq2F2XdS.d.mts.map → index-CGHk6JeR.d.mts.map} +1 -1
- package/dist/{index-D4dAsbJr.d.cts → index-CGicsfPD.d.cts} +2 -2
- package/dist/{index-D4dAsbJr.d.cts.map → index-CGicsfPD.d.cts.map} +1 -1
- package/dist/{index-CB3he8Lx.d.mts → index-CVMv3juU.d.cts} +3 -3
- package/dist/{index-CB3he8Lx.d.mts.map → index-CVMv3juU.d.cts.map} +1 -1
- package/dist/{index-Dh5On360.d.cts → index-DVCXqEf3.d.mts} +3 -3
- package/dist/{index-Dh5On360.d.cts.map → index-DVCXqEf3.d.mts.map} +1 -1
- package/dist/{index-BTz2OMAM.d.cts → index-DY2poEgq.d.cts} +4 -3
- package/dist/{index-BTz2OMAM.d.cts.map → index-DY2poEgq.d.cts.map} +1 -1
- package/dist/{index-Sx9T2i0u.d.mts → index-Dax6Un8H.d.mts} +2 -2
- package/dist/{index-Sx9T2i0u.d.mts.map → index-Dax6Un8H.d.mts.map} +1 -1
- package/dist/{index-CRDakIp7.d.cts → index-bMNV2QpB.d.cts} +4 -4
- package/dist/{index-CRDakIp7.d.cts.map → index-bMNV2QpB.d.cts.map} +1 -1
- package/dist/{mistral-DOQjM8xW.mjs → mistral-DcdvWD3q.mjs} +2 -2
- package/dist/{mistral-DOQjM8xW.mjs.map → mistral-DcdvWD3q.mjs.map} +1 -1
- package/dist/{mistral-valYIS-y.cjs → mistral-mzeS6z9D.cjs} +2 -2
- package/dist/{mistral-valYIS-y.cjs.map → mistral-mzeS6z9D.cjs.map} +1 -1
- package/dist/{sse-2x1Rj7T8.mjs → sse-BgeDlOH5.mjs} +2 -2
- package/dist/{sse-2x1Rj7T8.mjs.map → sse-BgeDlOH5.mjs.map} +1 -1
- package/dist/{sse-B0wWt4Vq.cjs → sse-Ctz5ADnN.cjs} +2 -2
- package/dist/{sse-B0wWt4Vq.cjs.map → sse-Ctz5ADnN.cjs.map} +1 -1
- package/dist/trigger.cjs +1 -1
- package/dist/trigger.d.cts +3 -3
- package/dist/trigger.d.mts +3 -3
- package/dist/trigger.mjs +1 -1
- package/dist/workflow.cjs +1 -1
- package/dist/workflow.d.cts +2 -2
- package/dist/workflow.d.mts +2 -2
- package/dist/workflow.mjs +1 -1
- package/package.json +1 -1
- package/dist/dist-24hGLXP2.mjs.map +0 -1
- package/dist/dist-CE8Bys_M.cjs.map +0 -1
- package/dist/dist-D1qsfZPC.cjs.map +0 -1
- package/dist/dist-Kz_xVVMR.mjs.map +0 -1
- package/dist/index-WT4ULMiw.d.cts.map +0 -1
- package/dist/index-WT4ULMiw.d.mts.map +0 -1
|
@@ -885,13 +885,38 @@ zod.z.object({ patch: zod.z.object({
|
|
|
885
885
|
mode: ChannelListenModeSchema.optional(),
|
|
886
886
|
subscribeOnMention: zod.z.boolean().optional()
|
|
887
887
|
}) });
|
|
888
|
+
/**
|
|
889
|
+
* Where a manual MCP API key is injected on each request. MCP servers don't
|
|
890
|
+
* advertise API-key support in a discoverable way, so the user picks the
|
|
891
|
+
* placement: a request header (optionally prefixed, e.g. `Bearer `) or a query
|
|
892
|
+
* param (e.g. Exa's `exaApiKey`).
|
|
893
|
+
*/
|
|
894
|
+
const McpApiKeyPlacementSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
|
|
895
|
+
kind: zod.z.literal("header"),
|
|
896
|
+
name: zod.z.string().trim().min(1),
|
|
897
|
+
/** Prepended to the token, e.g. `"Bearer "` for `Authorization: Bearer <token>`. */
|
|
898
|
+
prefix: zod.z.string().optional()
|
|
899
|
+
}), zod.z.object({
|
|
900
|
+
kind: zod.z.literal("query"),
|
|
901
|
+
name: zod.z.string().trim().min(1)
|
|
902
|
+
})]);
|
|
903
|
+
zod.z.object({
|
|
904
|
+
token: zod.z.string().trim().min(1),
|
|
905
|
+
placement: McpApiKeyPlacementSchema.default({
|
|
906
|
+
kind: "header",
|
|
907
|
+
name: "Authorization",
|
|
908
|
+
prefix: "Bearer "
|
|
909
|
+
})
|
|
910
|
+
});
|
|
888
911
|
/** Metadata for one vault field on a custom api_key app. */
|
|
889
912
|
const AppCredentialFieldSchema = zod.z.object({
|
|
890
913
|
label: zod.z.string().trim().min(1).optional(),
|
|
891
914
|
secret: zod.z.boolean().optional(),
|
|
892
915
|
optional: zod.z.boolean().optional(),
|
|
893
916
|
description: zod.z.string().trim().min(1).optional(),
|
|
894
|
-
default: zod.z.string().optional()
|
|
917
|
+
default: zod.z.string().optional(),
|
|
918
|
+
/** For direct MCP api-key apps: where this field's value is injected on the request. */
|
|
919
|
+
placement: McpApiKeyPlacementSchema.optional()
|
|
895
920
|
});
|
|
896
921
|
/** Credential template keyed by vault field name. */
|
|
897
922
|
const AppCredentialFieldsSchema = zod.z.record(zod.z.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" });
|
|
@@ -942,11 +967,43 @@ zod.z.object({
|
|
|
942
967
|
suggestion: AppSlugSchema.optional()
|
|
943
968
|
});
|
|
944
969
|
zod.z.object({ slug: zod.z.string().trim().min(1) });
|
|
970
|
+
/** Request body for creating an org custom app (api_key or direct MCP). */
|
|
971
|
+
const optionalCredentialFieldsSchema = zod.z.record(zod.z.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/), AppCredentialFieldSchema);
|
|
945
972
|
zod.z.object({
|
|
946
973
|
name: customAppNameSchema,
|
|
947
974
|
slug: AppSlugSchema,
|
|
948
975
|
description: zod.z.string().trim().min(1),
|
|
949
|
-
|
|
976
|
+
source: zod.z.enum([
|
|
977
|
+
"custom",
|
|
978
|
+
"mcp",
|
|
979
|
+
"openapi"
|
|
980
|
+
]).default("custom"),
|
|
981
|
+
mcpUrl: zod.z.string().url().optional(),
|
|
982
|
+
authKind: AppAuthKindSchema.optional(),
|
|
983
|
+
fields: optionalCredentialFieldsSchema.optional(),
|
|
984
|
+
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
985
|
+
oauthScopes: zod.z.array(OAuthScopeOptionSchema).optional()
|
|
986
|
+
}).superRefine((data, ctx) => {
|
|
987
|
+
if (data.source === "mcp" && !data.mcpUrl) ctx.addIssue({
|
|
988
|
+
code: "custom",
|
|
989
|
+
message: "mcpUrl is required for MCP apps",
|
|
990
|
+
path: ["mcpUrl"]
|
|
991
|
+
});
|
|
992
|
+
if (!(data.authKind ?? (data.source === "custom" ? "api_key" : void 0))) {
|
|
993
|
+
ctx.addIssue({
|
|
994
|
+
code: "custom",
|
|
995
|
+
message: "authKind is required",
|
|
996
|
+
path: ["authKind"]
|
|
997
|
+
});
|
|
998
|
+
return;
|
|
999
|
+
}
|
|
1000
|
+
if (data.source === "custom") {
|
|
1001
|
+
const parsed = AppCredentialFieldsSchema.safeParse(data.fields ?? {});
|
|
1002
|
+
if (!parsed.success) for (const issue of parsed.error.issues) ctx.addIssue({
|
|
1003
|
+
...issue,
|
|
1004
|
+
path: ["fields", ...issue.path]
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
950
1007
|
});
|
|
951
1008
|
zod.z.object({
|
|
952
1009
|
id: zod.z.string().min(1),
|
|
@@ -954,9 +1011,12 @@ zod.z.object({
|
|
|
954
1011
|
name: zod.z.string().min(1),
|
|
955
1012
|
description: zod.z.string().min(1),
|
|
956
1013
|
category: zod.z.string().min(1),
|
|
957
|
-
authKind:
|
|
958
|
-
source:
|
|
959
|
-
|
|
1014
|
+
authKind: AppAuthKindSchema,
|
|
1015
|
+
source: AppSourceSchema,
|
|
1016
|
+
mcpUrl: zod.z.string().url().nullable().optional(),
|
|
1017
|
+
credentialFields: optionalCredentialFieldsSchema.optional(),
|
|
1018
|
+
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
1019
|
+
oauthScopes: zod.z.array(OAuthScopeOptionSchema).optional(),
|
|
960
1020
|
createdAt: zod.z.string().min(1),
|
|
961
1021
|
updatedAt: zod.z.string().min(1)
|
|
962
1022
|
});
|
|
@@ -973,6 +1033,7 @@ zod.z.object({
|
|
|
973
1033
|
source: AppSourceSchema,
|
|
974
1034
|
credentialFields: AppCredentialFieldsSchema.optional(),
|
|
975
1035
|
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
1036
|
+
mcpUrl: zod.z.string().url().nullable().optional(),
|
|
976
1037
|
createdAt: zod.z.string().min(1),
|
|
977
1038
|
updatedAt: zod.z.string().min(1)
|
|
978
1039
|
});
|
|
@@ -995,10 +1056,72 @@ const AppCatalogEntrySchema = zod.z.object({
|
|
|
995
1056
|
credentialFields: AppCredentialFieldsSchema.optional(),
|
|
996
1057
|
/** Composio auth scheme when credentialFields are present. */
|
|
997
1058
|
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
1059
|
+
/** Direct MCP server URL when source is mcp. */
|
|
1060
|
+
mcpUrl: zod.z.string().url().nullable().optional(),
|
|
998
1061
|
/** When present, the app supports agent gateway bindings (external channels). */
|
|
999
1062
|
gateway: AppGatewaySchema.optional()
|
|
1000
1063
|
});
|
|
1001
1064
|
zod.z.array(AppCatalogEntrySchema);
|
|
1065
|
+
const McpAuthProbeModeSchema = zod.z.enum([
|
|
1066
|
+
"none",
|
|
1067
|
+
"token",
|
|
1068
|
+
"oauth"
|
|
1069
|
+
]);
|
|
1070
|
+
const McpAuthProbeOAuthSchema = zod.z.object({
|
|
1071
|
+
issuer: zod.z.string().optional(),
|
|
1072
|
+
authorizationEndpoint: zod.z.string().url(),
|
|
1073
|
+
tokenEndpoint: zod.z.string().url(),
|
|
1074
|
+
registrationEndpoint: zod.z.string().url().optional(),
|
|
1075
|
+
scopes: zod.z.array(zod.z.string()),
|
|
1076
|
+
resource: zod.z.string().optional(),
|
|
1077
|
+
/** Human-readable label from OAuth protected-resource metadata (RFC 9728). */
|
|
1078
|
+
resourceName: zod.z.string().optional()
|
|
1079
|
+
});
|
|
1080
|
+
zod.z.object({
|
|
1081
|
+
url: zod.z.string().url(),
|
|
1082
|
+
mode: McpAuthProbeModeSchema,
|
|
1083
|
+
unauthenticatedStatus: zod.z.number().int().optional(),
|
|
1084
|
+
scheme: AppCredentialSchemeSchema.optional(),
|
|
1085
|
+
oauth: McpAuthProbeOAuthSchema.optional()
|
|
1086
|
+
});
|
|
1087
|
+
zod.z.object({ url: zod.z.string().url() });
|
|
1088
|
+
zod.z.object({
|
|
1089
|
+
detected: zod.z.boolean(),
|
|
1090
|
+
template: zod.z.object({
|
|
1091
|
+
authKind: AppAuthKindSchema,
|
|
1092
|
+
credentialFields: zod.z.record(zod.z.string(), AppCredentialFieldSchema).optional(),
|
|
1093
|
+
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
1094
|
+
oauthScopes: zod.z.array(OAuthScopeOptionSchema),
|
|
1095
|
+
mcpUrl: zod.z.string().url(),
|
|
1096
|
+
oauth: McpAuthProbeOAuthSchema.optional(),
|
|
1097
|
+
serverName: zod.z.string().optional(),
|
|
1098
|
+
serverDescription: zod.z.string().optional()
|
|
1099
|
+
})
|
|
1100
|
+
});
|
|
1101
|
+
zod.z.object({
|
|
1102
|
+
appSlug: zod.z.string().trim().min(1),
|
|
1103
|
+
projects: zod.z.array(zod.z.string().trim().min(1)).optional(),
|
|
1104
|
+
createOrganizationCredential: zod.z.boolean().optional(),
|
|
1105
|
+
createUserProvidedCredential: zod.z.boolean().optional(),
|
|
1106
|
+
label: zod.z.string().trim().min(1).optional(),
|
|
1107
|
+
credentialInstanceId: zod.z.string().trim().min(1).optional(),
|
|
1108
|
+
scopes: zod.z.array(zod.z.string()).optional()
|
|
1109
|
+
});
|
|
1110
|
+
zod.z.object({ authorizeUrl: zod.z.string().url() });
|
|
1111
|
+
zod.z.object({ url: zod.z.string().url() });
|
|
1112
|
+
zod.z.object({
|
|
1113
|
+
detected: zod.z.boolean(),
|
|
1114
|
+
template: zod.z.object({
|
|
1115
|
+
authKind: AppAuthKindSchema,
|
|
1116
|
+
credentialFields: zod.z.record(zod.z.string(), AppCredentialFieldSchema).optional(),
|
|
1117
|
+
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
1118
|
+
oauthScopes: zod.z.array(OAuthScopeOptionSchema),
|
|
1119
|
+
openapiUrl: zod.z.string().url(),
|
|
1120
|
+
name: zod.z.string().optional(),
|
|
1121
|
+
description: zod.z.string().optional(),
|
|
1122
|
+
homepageUrl: zod.z.string().optional()
|
|
1123
|
+
})
|
|
1124
|
+
});
|
|
1002
1125
|
const CatalogAppSummarySchema = zod.z.object({
|
|
1003
1126
|
name: zod.z.string(),
|
|
1004
1127
|
description: zod.z.string(),
|
|
@@ -2975,4 +3098,4 @@ Object.defineProperty(exports, "toolParameters", {
|
|
|
2975
3098
|
}
|
|
2976
3099
|
});
|
|
2977
3100
|
|
|
2978
|
-
//# sourceMappingURL=dist-
|
|
3101
|
+
//# sourceMappingURL=dist-BhKByPZJ.cjs.map
|