@keystrokehq/hosting 0.1.6 → 0.1.7

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/index.cjs CHANGED
@@ -5290,18 +5290,19 @@ object({
5290
5290
  source: _enum([
5291
5291
  "custom",
5292
5292
  "mcp",
5293
- "openapi"
5293
+ "openapi",
5294
+ "graphql"
5294
5295
  ]).default("custom"),
5295
- mcpUrl: string().url().optional(),
5296
+ url: string().url().optional(),
5296
5297
  authKind: AppAuthKindSchema.optional(),
5297
5298
  fields: optionalCredentialFieldsSchema.optional(),
5298
5299
  credentialScheme: AppCredentialSchemeSchema.optional(),
5299
5300
  oauthScopes: array(OAuthScopeOptionSchema).optional()
5300
5301
  }).superRefine((data, ctx) => {
5301
- if (data.source === "mcp" && !data.mcpUrl) ctx.addIssue({
5302
+ if ((data.source === "mcp" || data.source === "openapi" || data.source === "graphql") && !data.url) ctx.addIssue({
5302
5303
  code: "custom",
5303
- message: "mcpUrl is required for MCP apps",
5304
- path: ["mcpUrl"]
5304
+ message: "url is required for this app source",
5305
+ path: ["url"]
5305
5306
  });
5306
5307
  if (!(data.authKind ?? (data.source === "custom" ? "api_key" : void 0))) {
5307
5308
  ctx.addIssue({
@@ -5327,7 +5328,7 @@ object({
5327
5328
  category: string().min(1),
5328
5329
  authKind: AppAuthKindSchema,
5329
5330
  source: AppSourceSchema,
5330
- mcpUrl: string().url().nullable().optional(),
5331
+ url: string().url().nullable().optional(),
5331
5332
  credentialFields: optionalCredentialFieldsSchema.optional(),
5332
5333
  credentialScheme: AppCredentialSchemeSchema.optional(),
5333
5334
  oauthScopes: array(OAuthScopeOptionSchema).optional(),
@@ -5347,7 +5348,7 @@ object({
5347
5348
  source: AppSourceSchema,
5348
5349
  credentialFields: AppCredentialFieldsSchema.optional(),
5349
5350
  credentialScheme: AppCredentialSchemeSchema.optional(),
5350
- mcpUrl: string().url().nullable().optional(),
5351
+ url: string().url().nullable().optional(),
5351
5352
  createdAt: string().min(1),
5352
5353
  updatedAt: string().min(1)
5353
5354
  });
@@ -5366,8 +5367,8 @@ object({
5366
5367
  credentialFields: AppCredentialFieldsSchema.optional(),
5367
5368
  /** Composio auth scheme when credentialFields are present. */
5368
5369
  credentialScheme: AppCredentialSchemeSchema.optional(),
5369
- /** Direct MCP server URL when source is mcp. */
5370
- mcpUrl: string().url().nullable().optional(),
5370
+ /** Endpoint URL for MCP, OpenAPI, or GraphQL custom apps. */
5371
+ url: string().url().nullable().optional(),
5371
5372
  /** When present, the app supports agent gateway bindings (external channels). */
5372
5373
  gateway: AppGatewaySchema.optional()
5373
5374
  });
@@ -5401,7 +5402,7 @@ object({
5401
5402
  credentialFields: record(string(), AppCredentialFieldSchema).optional(),
5402
5403
  credentialScheme: AppCredentialSchemeSchema.optional(),
5403
5404
  oauthScopes: array(OAuthScopeOptionSchema),
5404
- mcpUrl: string().url(),
5405
+ url: string().url(),
5405
5406
  oauth: McpAuthProbeOAuthSchema.optional(),
5406
5407
  serverName: string().optional(),
5407
5408
  serverDescription: string().optional()
@@ -5425,7 +5426,21 @@ object({
5425
5426
  credentialFields: record(string(), AppCredentialFieldSchema).optional(),
5426
5427
  credentialScheme: AppCredentialSchemeSchema.optional(),
5427
5428
  oauthScopes: array(OAuthScopeOptionSchema),
5428
- openapiUrl: string().url(),
5429
+ url: string().url(),
5430
+ name: string().optional(),
5431
+ description: string().optional(),
5432
+ homepageUrl: string().optional()
5433
+ })
5434
+ });
5435
+ object({ url: string().url() });
5436
+ object({
5437
+ detected: boolean(),
5438
+ template: object({
5439
+ authKind: AppAuthKindSchema,
5440
+ credentialFields: record(string(), AppCredentialFieldSchema).optional(),
5441
+ credentialScheme: AppCredentialSchemeSchema.optional(),
5442
+ oauthScopes: array(OAuthScopeOptionSchema),
5443
+ url: string().url(),
5429
5444
  name: string().optional(),
5430
5445
  description: string().optional(),
5431
5446
  homepageUrl: string().optional()
@@ -5687,6 +5702,7 @@ object({
5687
5702
  /** Honeypot — must stay empty; bots that fill it are ignored silently. */
5688
5703
  companyWebsite: string().optional()
5689
5704
  });
5705
+ object({ models: array(string()) });
5690
5706
  const ValidationErrorDetailSchema = object({
5691
5707
  path: string(),
5692
5708
  message: string()
@@ -5700,6 +5716,43 @@ object({
5700
5716
  details: array(ValidationErrorDetailSchema).optional()
5701
5717
  });
5702
5718
  object({ message: string() });
5719
+ const CHAT_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;
5720
+ [
5721
+ {
5722
+ mediaType: "image/png",
5723
+ ext: "png"
5724
+ },
5725
+ {
5726
+ mediaType: "image/jpeg",
5727
+ ext: "jpg"
5728
+ },
5729
+ {
5730
+ mediaType: "image/webp",
5731
+ ext: "webp"
5732
+ },
5733
+ {
5734
+ mediaType: "image/gif",
5735
+ ext: "gif"
5736
+ },
5737
+ {
5738
+ mediaType: "application/pdf",
5739
+ ext: "pdf"
5740
+ }
5741
+ ].map((type) => type.mediaType);
5742
+ const ChatAttachmentInputSchema = object({
5743
+ storageKey: string().min(1),
5744
+ mediaType: string().min(1),
5745
+ filename: string().optional()
5746
+ });
5747
+ object({
5748
+ contentType: string().min(1),
5749
+ filename: string().min(1),
5750
+ size: number$1().int().positive().max(CHAT_ATTACHMENT_MAX_BYTES)
5751
+ });
5752
+ object({
5753
+ uploadUrl: string().url(),
5754
+ storageKey: string().min(1)
5755
+ });
5703
5756
  const CredentialRunContextSchema = object({
5704
5757
  orgId: string().min(1).optional(),
5705
5758
  projectId: string().min(1).optional(),
@@ -5708,7 +5761,8 @@ const CredentialRunContextSchema = object({
5708
5761
  selection: record(string(), string()).optional()
5709
5762
  });
5710
5763
  const ThinkingLevelSchema = _enum([
5711
- "off",
5764
+ "provider-default",
5765
+ "none",
5712
5766
  "minimal",
5713
5767
  "low",
5714
5768
  "medium",
@@ -5716,15 +5770,17 @@ const ThinkingLevelSchema = _enum([
5716
5770
  "xhigh"
5717
5771
  ]);
5718
5772
  object({
5719
- message: string().min(1),
5773
+ message: string(),
5720
5774
  sessionId: string().min(1).optional(),
5721
5775
  subscriptionId: string().min(1).optional(),
5722
5776
  context: CredentialRunContextSchema.optional(),
5723
- thinkingLevel: ThinkingLevelSchema.optional()
5724
- });
5777
+ thinkingLevel: ThinkingLevelSchema.optional(),
5778
+ files: array(ChatAttachmentInputSchema).max(5).optional()
5779
+ }).refine((data) => data.message.trim().length > 0 || (data.files?.length ?? 0) > 0, { message: "message or files is required" });
5725
5780
  object({
5726
5781
  sessionId: string(),
5727
5782
  messages: array(record(string(), unknown())),
5783
+ text: string(),
5728
5784
  error: string().nullable()
5729
5785
  });
5730
5786
  const SkipResponseSchema = object({
@@ -5949,6 +6005,14 @@ object({
5949
6005
  steps: array(WorkflowStepRunSchema),
5950
6006
  trace: TraceResponseSchema.nullable()
5951
6007
  });
6008
+ const WorkflowHookStatusSchema = _enum(["waiting", "resumed"]);
6009
+ object({ items: array(object({
6010
+ token: string(),
6011
+ correlationId: string(),
6012
+ status: WorkflowHookStatusSchema,
6013
+ createdAt: string(),
6014
+ resumeUrl: string().nullable()
6015
+ })) });
5952
6016
  const AgentSessionStatusSchema = _enum([
5953
6017
  "running",
5954
6018
  "completed",
@@ -6726,6 +6790,10 @@ const AgentSummarySchema = object({
6726
6790
  description: string().optional(),
6727
6791
  sourcePath: string().min(1).optional(),
6728
6792
  model: string().optional(),
6793
+ capabilities: object({
6794
+ images: boolean(),
6795
+ files: boolean()
6796
+ }).optional(),
6729
6797
  systemPrompt: string().optional(),
6730
6798
  toolCount: optionalCount,
6731
6799
  credentialCount: optionalCount,
@@ -6838,6 +6906,20 @@ object({
6838
6906
  })),
6839
6907
  generatedAt: isoDateTime
6840
6908
  });
6909
+ /** A single source file returned by the bulk active-source download endpoint. */
6910
+ const DownloadActiveProjectSourceFileSchema = object({
6911
+ path: string().min(1),
6912
+ contents: string()
6913
+ });
6914
+ object({
6915
+ artifactId: string(),
6916
+ files: array(DownloadActiveProjectSourceFileSchema)
6917
+ });
6918
+ object({
6919
+ projectId: string(),
6920
+ artifactId: string(),
6921
+ pulledAt: string().datetime()
6922
+ });
6841
6923
  object({ files: array(object({
6842
6924
  id: string(),
6843
6925
  path: string().min(1)