@keystrokehq/hosting 0.1.14 → 0.1.15

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
@@ -4393,6 +4393,25 @@ function superRefine(fn, params) {
4393
4393
  return /* @__PURE__ */ _superRefine(fn, params);
4394
4394
  }
4395
4395
  //#endregion
4396
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/compat.js
4397
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
4398
+ const ZodIssueCode = {
4399
+ invalid_type: "invalid_type",
4400
+ too_big: "too_big",
4401
+ too_small: "too_small",
4402
+ invalid_format: "invalid_format",
4403
+ not_multiple_of: "not_multiple_of",
4404
+ unrecognized_keys: "unrecognized_keys",
4405
+ invalid_union: "invalid_union",
4406
+ invalid_key: "invalid_key",
4407
+ invalid_element: "invalid_element",
4408
+ invalid_value: "invalid_value",
4409
+ custom: "custom"
4410
+ };
4411
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
4412
+ var ZodFirstPartyTypeKind;
4413
+ (function(ZodFirstPartyTypeKind) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
4414
+ //#endregion
4396
4415
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
4397
4416
  function number(params) {
4398
4417
  return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
@@ -5333,7 +5352,9 @@ const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
5333
5352
  appSlugs: array(string()).default([]),
5334
5353
  toolSlugs: array(string()).default([]),
5335
5354
  /** Credential requirements per tool slug (the agent's credential consumer key). */
5336
- toolRequirements: record(string(), array(CredentialRequirementSummarySchema)).optional()
5355
+ toolRequirements: record(string(), array(CredentialRequirementSummarySchema)).optional(),
5356
+ /** Credential requirements for the agent's VM sandbox env / git bootstrap. */
5357
+ sandboxRequirements: array(CredentialRequirementSummarySchema).optional()
5337
5358
  }),
5338
5359
  object({
5339
5360
  kind: literal("action"),
@@ -6256,9 +6277,24 @@ object({
6256
6277
  "contact",
6257
6278
  "enterprise-upgrade",
6258
6279
  "verification",
6259
- "slack-connect"
6280
+ "slack-connect",
6281
+ "connector-access"
6260
6282
  ]),
6261
- message: string().trim().max(5e3).optional()
6283
+ message: string().trim().max(5e3).optional(),
6284
+ /** Required for connector-access requests (sandbox VM secret exposure). */
6285
+ appSlug: string().trim().min(1).optional()
6286
+ }).superRefine((value, ctx) => {
6287
+ if (value.type === "connector-access" && !value.appSlug) ctx.addIssue({
6288
+ code: ZodIssueCode.custom,
6289
+ path: ["appSlug"],
6290
+ message: "appSlug is required for connector-access requests"
6291
+ });
6292
+ });
6293
+ object({ ok: literal(true) });
6294
+ object({
6295
+ message: string().trim().min(1).max(1e4),
6296
+ cliVersion: string().trim().min(1).max(64).optional(),
6297
+ projectSlug: string().trim().min(1).max(128).optional()
6262
6298
  });
6263
6299
  object({ ok: literal(true) });
6264
6300
  const TemplateKindSchema = _enum([
@@ -6311,6 +6347,46 @@ object({
6311
6347
  companyWebsite: string().optional()
6312
6348
  });
6313
6349
  object({ models: array(string()) });
6350
+ object({ accessToken: string() });
6351
+ const CredentialAccessUnavailableReasonSchema = _enum(["request_access", "reconnect_required"]);
6352
+ object({
6353
+ error: literal("credential_access_unavailable"),
6354
+ code: literal("credential_access_unavailable"),
6355
+ appSlug: string().min(1),
6356
+ reason: CredentialAccessUnavailableReasonSchema,
6357
+ requestAccessUrl: string().url().optional(),
6358
+ message: string().optional()
6359
+ });
6360
+ discriminatedUnion("kind", [
6361
+ object({
6362
+ kind: literal("api_key"),
6363
+ instanceId: string().min(1)
6364
+ }),
6365
+ object({
6366
+ kind: literal("oauth"),
6367
+ connectionId: string().min(1)
6368
+ }),
6369
+ object({
6370
+ kind: literal("keystroke"),
6371
+ instanceId: string().min(1),
6372
+ connectionId: string().min(1),
6373
+ appSlug: string().min(1)
6374
+ })
6375
+ ]);
6376
+ discriminatedUnion("kind", [
6377
+ object({
6378
+ kind: literal("api_key"),
6379
+ value: unknown()
6380
+ }),
6381
+ object({
6382
+ kind: literal("oauth"),
6383
+ accessToken: string().min(1)
6384
+ }),
6385
+ object({
6386
+ kind: literal("keystroke"),
6387
+ value: unknown()
6388
+ })
6389
+ ]);
6314
6390
  const ValidationErrorDetailSchema = object({
6315
6391
  path: string(),
6316
6392
  message: string()
@@ -8012,7 +8088,7 @@ function parseOrgArtifactsFromEnv(env = process.env) {
8012
8088
  const parsed = JSON.parse(Buffer.from(raw, "base64").toString("utf8"));
8013
8089
  if (!Array.isArray(parsed)) throw new Error("KEYSTROKE_ORG_ARTIFACTS must decode to a JSON array");
8014
8090
  return parsed.map((entry) => {
8015
- if (!entry || typeof entry !== "object" || typeof entry.projectId !== "string" || typeof entry.artifactStorageKey !== "string") throw new Error("KEYSTROKE_ORG_ARTIFACTS entries require projectId and artifactStorageKey");
8091
+ if (!entry || typeof entry !== "object" || typeof entry.projectId !== "string" || typeof entry.artifactStorageKey !== "string" || typeof entry.artifactId !== "string" || typeof entry.artifactVersion !== "number") throw new Error("KEYSTROKE_ORG_ARTIFACTS entries require projectId, artifactStorageKey, artifactId, and artifactVersion");
8016
8092
  return entry;
8017
8093
  });
8018
8094
  }
@@ -8214,7 +8290,9 @@ function createDockerRuntime(options = {}) {
8214
8290
  if (input.projects.length === 0) throw new Error("Docker org runtime requires at least one project deploy");
8215
8291
  let launch = resolveRuntimeLaunch(options, input.projects.map((project) => ({
8216
8292
  projectId: project.projectId,
8217
- artifactStorageKey: project.artifactStorageKey
8293
+ artifactStorageKey: project.artifactStorageKey,
8294
+ artifactId: project.artifactId,
8295
+ artifactVersion: project.artifactVersion
8218
8296
  })), input.database, input.env);
8219
8297
  if (options.workspacesMount) {
8220
8298
  const { hostPath, containerPath } = options.workspacesMount;