@keystrokehq/cli 0.1.4 → 0.1.6

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.
Files changed (43) hide show
  1. package/README.md +8 -9
  2. package/dist/dist-CWgqwAeq.mjs +19268 -0
  3. package/dist/dist-CWgqwAeq.mjs.map +1 -0
  4. package/dist/dist-DohqaxIM.mjs +3 -0
  5. package/dist/{dist-C47GdlWY.mjs → dist-H53GUsol.mjs} +1019 -183
  6. package/dist/dist-H53GUsol.mjs.map +1 -0
  7. package/dist/{dist-CJL2zYbP.mjs → dist-jchdNGBU.mjs} +62 -5
  8. package/dist/dist-jchdNGBU.mjs.map +1 -0
  9. package/dist/index.mjs +973 -377
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/{maybe-auto-update-B0kal2FM.mjs → maybe-auto-update-ClXO7U-6.mjs} +2 -2
  12. package/dist/{maybe-auto-update-B0kal2FM.mjs.map → maybe-auto-update-ClXO7U-6.mjs.map} +1 -1
  13. package/dist/pack-artifact-DVnIKrsg-CETr40a-.mjs +112 -0
  14. package/dist/pack-artifact-DVnIKrsg-CETr40a-.mjs.map +1 -0
  15. package/dist/skills-bundle/_AGENTS.md +7 -7
  16. package/dist/skills-bundle/skills/keystroke-actions/SKILL.md +39 -7
  17. package/dist/skills-bundle/skills/keystroke-actions/references/catalog-and-imports.md +25 -19
  18. package/dist/skills-bundle/skills/keystroke-agents/SKILL.md +7 -5
  19. package/dist/skills-bundle/skills/keystroke-apps/SKILL.md +133 -0
  20. package/dist/skills-bundle/skills/keystroke-apps/references/cli-and-catalog.md +66 -0
  21. package/dist/skills-bundle/skills/keystroke-cli/SKILL.md +3 -3
  22. package/dist/skills-bundle/skills/keystroke-cli/references/api-targets.md +6 -5
  23. package/dist/skills-bundle/skills/keystroke-deploy/SKILL.md +2 -2
  24. package/dist/skills-bundle/skills/keystroke-files/SKILL.md +6 -5
  25. package/dist/skills-bundle/skills/keystroke-gateways/SKILL.md +2 -2
  26. package/dist/skills-bundle/skills/keystroke-gateways/references/slack-setup.md +1 -1
  27. package/dist/skills-bundle/skills/keystroke-skills/SKILL.md +1 -1
  28. package/dist/skills-bundle/skills/keystroke-workflows/SKILL.md +1 -1
  29. package/dist/skills-bundle/skills/keystroke-workflows/references/authoring.md +2 -2
  30. package/dist/templates/hello-world/.env.example +1 -15
  31. package/dist/templates/hello-world/README.md +1 -1
  32. package/dist/templates/hello-world/package.json +1 -1
  33. package/dist/{version-Dxl3y5p6.mjs → version-CiPDVUdk.mjs} +10 -14
  34. package/dist/version-CiPDVUdk.mjs.map +1 -0
  35. package/package.json +8 -2
  36. package/dist/dist-C47GdlWY.mjs.map +0 -1
  37. package/dist/dist-CJL2zYbP.mjs.map +0 -1
  38. package/dist/dist-Ch53z2P3.mjs +0 -3
  39. package/dist/dist-CwR72_PS.mjs +0 -1887
  40. package/dist/dist-CwR72_PS.mjs.map +0 -1
  41. package/dist/skills-bundle/skills/keystroke-credentials/SKILL.md +0 -108
  42. package/dist/skills-bundle/skills/keystroke-credentials/references/cli-and-oauth.md +0 -51
  43. package/dist/version-Dxl3y5p6.mjs.map +0 -1
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
3
3
  var _a$1;
4
+ /** A special constant with type `never` */
5
+ const NEVER = /* @__PURE__ */ Object.freeze({ status: "aborted" });
4
6
  function $constructor(name, initializer, params) {
5
7
  function init(inst, def) {
6
8
  if (!inst._zod) Object.defineProperty(inst, "_zod", {
@@ -607,6 +609,7 @@ const string$1 = (params) => {
607
609
  const integer = /^-?\d+$/;
608
610
  const number$2 = /^-?\d+(?:\.\d+)?$/;
609
611
  const boolean$1 = /^(?:true|false)$/i;
612
+ const _null$2 = /^null$/i;
610
613
  const lowercase = /^[^A-Z]*$/;
611
614
  const uppercase = /^[^a-z]*$/;
612
615
  //#endregion
@@ -1419,6 +1422,26 @@ const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
1419
1422
  return payload;
1420
1423
  };
1421
1424
  });
1425
+ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
1426
+ $ZodType.init(inst, def);
1427
+ inst._zod.pattern = _null$2;
1428
+ inst._zod.values = new Set([null]);
1429
+ inst._zod.parse = (payload, _ctx) => {
1430
+ const input = payload.value;
1431
+ if (input === null) return payload;
1432
+ payload.issues.push({
1433
+ expected: "null",
1434
+ code: "invalid_type",
1435
+ input,
1436
+ inst
1437
+ });
1438
+ return payload;
1439
+ };
1440
+ });
1441
+ const $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => {
1442
+ $ZodType.init(inst, def);
1443
+ inst._zod.parse = (payload) => payload;
1444
+ });
1422
1445
  const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
1423
1446
  $ZodType.init(inst, def);
1424
1447
  inst._zod.parse = (payload) => payload;
@@ -2340,6 +2363,9 @@ function handlePipeResult(left, next, ctx) {
2340
2363
  fallback: left.fallback
2341
2364
  }, ctx);
2342
2365
  }
2366
+ const $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
2367
+ $ZodPipe.init(inst, def);
2368
+ });
2343
2369
  const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
2344
2370
  $ZodType.init(inst, def);
2345
2371
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -2805,6 +2831,17 @@ function _boolean(Class, params) {
2805
2831
  });
2806
2832
  }
2807
2833
  /* @__NO_SIDE_EFFECTS__ */
2834
+ function _null$1(Class, params) {
2835
+ return new Class({
2836
+ type: "null",
2837
+ ...normalizeParams(params)
2838
+ });
2839
+ }
2840
+ /* @__NO_SIDE_EFFECTS__ */
2841
+ function _any(Class) {
2842
+ return new Class({ type: "any" });
2843
+ }
2844
+ /* @__NO_SIDE_EFFECTS__ */
2808
2845
  function _unknown(Class) {
2809
2846
  return new Class({ type: "unknown" });
2810
2847
  }
@@ -3038,7 +3075,7 @@ function initializeContext(params) {
3038
3075
  external: params?.external ?? void 0
3039
3076
  };
3040
3077
  }
3041
- function process(schema, ctx, _params = {
3078
+ function process$1(schema, ctx, _params = {
3042
3079
  path: [],
3043
3080
  schemaPath: []
3044
3081
  }) {
@@ -3075,7 +3112,7 @@ function process(schema, ctx, _params = {
3075
3112
  const parent = schema._zod.parent;
3076
3113
  if (parent) {
3077
3114
  if (!result.ref) result.ref = parent;
3078
- process(parent, ctx, params);
3115
+ process$1(parent, ctx, params);
3079
3116
  ctx.seen.get(parent).isParent = true;
3080
3117
  }
3081
3118
  }
@@ -3295,7 +3332,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
3295
3332
  ...params,
3296
3333
  processors
3297
3334
  });
3298
- process(schema, ctx);
3335
+ process$1(schema, ctx);
3299
3336
  extractDefs(ctx, schema);
3300
3337
  return finalize(ctx, schema);
3301
3338
  };
@@ -3307,7 +3344,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
3307
3344
  io,
3308
3345
  processors
3309
3346
  });
3310
- process(schema, ctx);
3347
+ process$1(schema, ctx);
3311
3348
  extractDefs(ctx, schema);
3312
3349
  return finalize(ctx, schema);
3313
3350
  };
@@ -3473,7 +3510,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
3473
3510
  if (typeof minimum === "number") json.minItems = minimum;
3474
3511
  if (typeof maximum === "number") json.maxItems = maximum;
3475
3512
  json.type = "array";
3476
- json.items = process(def.element, ctx, {
3513
+ json.items = process$1(def.element, ctx, {
3477
3514
  ...params,
3478
3515
  path: [...params.path, "items"]
3479
3516
  });
@@ -3484,7 +3521,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
3484
3521
  json.type = "object";
3485
3522
  json.properties = {};
3486
3523
  const shape = def.shape;
3487
- for (const key in shape) json.properties[key] = process(shape[key], ctx, {
3524
+ for (const key in shape) json.properties[key] = process$1(shape[key], ctx, {
3488
3525
  ...params,
3489
3526
  path: [
3490
3527
  ...params.path,
@@ -3502,7 +3539,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
3502
3539
  if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
3503
3540
  else if (!def.catchall) {
3504
3541
  if (ctx.io === "output") json.additionalProperties = false;
3505
- } else if (def.catchall) json.additionalProperties = process(def.catchall, ctx, {
3542
+ } else if (def.catchall) json.additionalProperties = process$1(def.catchall, ctx, {
3506
3543
  ...params,
3507
3544
  path: [...params.path, "additionalProperties"]
3508
3545
  });
@@ -3510,7 +3547,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
3510
3547
  const unionProcessor = (schema, ctx, json, params) => {
3511
3548
  const def = schema._zod.def;
3512
3549
  const isExclusive = def.inclusive === false;
3513
- const options = def.options.map((x, i) => process(x, ctx, {
3550
+ const options = def.options.map((x, i) => process$1(x, ctx, {
3514
3551
  ...params,
3515
3552
  path: [
3516
3553
  ...params.path,
@@ -3523,7 +3560,7 @@ const unionProcessor = (schema, ctx, json, params) => {
3523
3560
  };
3524
3561
  const intersectionProcessor = (schema, ctx, json, params) => {
3525
3562
  const def = schema._zod.def;
3526
- const a = process(def.left, ctx, {
3563
+ const a = process$1(def.left, ctx, {
3527
3564
  ...params,
3528
3565
  path: [
3529
3566
  ...params.path,
@@ -3531,7 +3568,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
3531
3568
  0
3532
3569
  ]
3533
3570
  });
3534
- const b = process(def.right, ctx, {
3571
+ const b = process$1(def.right, ctx, {
3535
3572
  ...params,
3536
3573
  path: [
3537
3574
  ...params.path,
@@ -3548,7 +3585,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
3548
3585
  json.type = "array";
3549
3586
  const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
3550
3587
  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, {
3588
+ const prefixItems = def.items.map((x, i) => process$1(x, ctx, {
3552
3589
  ...params,
3553
3590
  path: [
3554
3591
  ...params.path,
@@ -3556,7 +3593,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
3556
3593
  i
3557
3594
  ]
3558
3595
  }));
3559
- const rest = def.rest ? process(def.rest, ctx, {
3596
+ const rest = def.rest ? process$1(def.rest, ctx, {
3560
3597
  ...params,
3561
3598
  path: [
3562
3599
  ...params.path,
@@ -3587,7 +3624,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
3587
3624
  const keyType = def.keyType;
3588
3625
  const patterns = keyType._zod.bag?.patterns;
3589
3626
  if (def.mode === "loose" && patterns && patterns.size > 0) {
3590
- const valueSchema = process(def.valueType, ctx, {
3627
+ const valueSchema = process$1(def.valueType, ctx, {
3591
3628
  ...params,
3592
3629
  path: [
3593
3630
  ...params.path,
@@ -3598,11 +3635,11 @@ const recordProcessor = (schema, ctx, _json, params) => {
3598
3635
  json.patternProperties = {};
3599
3636
  for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
3600
3637
  } else {
3601
- if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process(def.keyType, ctx, {
3638
+ if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$1(def.keyType, ctx, {
3602
3639
  ...params,
3603
3640
  path: [...params.path, "propertyNames"]
3604
3641
  });
3605
- json.additionalProperties = process(def.valueType, ctx, {
3642
+ json.additionalProperties = process$1(def.valueType, ctx, {
3606
3643
  ...params,
3607
3644
  path: [...params.path, "additionalProperties"]
3608
3645
  });
@@ -3615,7 +3652,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
3615
3652
  };
3616
3653
  const nullableProcessor = (schema, ctx, json, params) => {
3617
3654
  const def = schema._zod.def;
3618
- const inner = process(def.innerType, ctx, params);
3655
+ const inner = process$1(def.innerType, ctx, params);
3619
3656
  const seen = ctx.seen.get(schema);
3620
3657
  if (ctx.target === "openapi-3.0") {
3621
3658
  seen.ref = def.innerType;
@@ -3624,27 +3661,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
3624
3661
  };
3625
3662
  const nonoptionalProcessor = (schema, ctx, _json, params) => {
3626
3663
  const def = schema._zod.def;
3627
- process(def.innerType, ctx, params);
3664
+ process$1(def.innerType, ctx, params);
3628
3665
  const seen = ctx.seen.get(schema);
3629
3666
  seen.ref = def.innerType;
3630
3667
  };
3631
3668
  const defaultProcessor = (schema, ctx, json, params) => {
3632
3669
  const def = schema._zod.def;
3633
- process(def.innerType, ctx, params);
3670
+ process$1(def.innerType, ctx, params);
3634
3671
  const seen = ctx.seen.get(schema);
3635
3672
  seen.ref = def.innerType;
3636
3673
  json.default = JSON.parse(JSON.stringify(def.defaultValue));
3637
3674
  };
3638
3675
  const prefaultProcessor = (schema, ctx, json, params) => {
3639
3676
  const def = schema._zod.def;
3640
- process(def.innerType, ctx, params);
3677
+ process$1(def.innerType, ctx, params);
3641
3678
  const seen = ctx.seen.get(schema);
3642
3679
  seen.ref = def.innerType;
3643
3680
  if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
3644
3681
  };
3645
3682
  const catchProcessor = (schema, ctx, json, params) => {
3646
3683
  const def = schema._zod.def;
3647
- process(def.innerType, ctx, params);
3684
+ process$1(def.innerType, ctx, params);
3648
3685
  const seen = ctx.seen.get(schema);
3649
3686
  seen.ref = def.innerType;
3650
3687
  let catchValue;
@@ -3659,32 +3696,32 @@ const pipeProcessor = (schema, ctx, _json, params) => {
3659
3696
  const def = schema._zod.def;
3660
3697
  const inIsTransform = def.in._zod.traits.has("$ZodTransform");
3661
3698
  const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
3662
- process(innerType, ctx, params);
3699
+ process$1(innerType, ctx, params);
3663
3700
  const seen = ctx.seen.get(schema);
3664
3701
  seen.ref = innerType;
3665
3702
  };
3666
3703
  const readonlyProcessor = (schema, ctx, json, params) => {
3667
3704
  const def = schema._zod.def;
3668
- process(def.innerType, ctx, params);
3705
+ process$1(def.innerType, ctx, params);
3669
3706
  const seen = ctx.seen.get(schema);
3670
3707
  seen.ref = def.innerType;
3671
3708
  json.readOnly = true;
3672
3709
  };
3673
3710
  const promiseProcessor = (schema, ctx, _json, params) => {
3674
3711
  const def = schema._zod.def;
3675
- process(def.innerType, ctx, params);
3712
+ process$1(def.innerType, ctx, params);
3676
3713
  const seen = ctx.seen.get(schema);
3677
3714
  seen.ref = def.innerType;
3678
3715
  };
3679
3716
  const optionalProcessor = (schema, ctx, _json, params) => {
3680
3717
  const def = schema._zod.def;
3681
- process(def.innerType, ctx, params);
3718
+ process$1(def.innerType, ctx, params);
3682
3719
  const seen = ctx.seen.get(schema);
3683
3720
  seen.ref = def.innerType;
3684
3721
  };
3685
3722
  const lazyProcessor = (schema, ctx, _json, params) => {
3686
3723
  const innerType = schema._zod.innerType;
3687
- process(innerType, ctx, params);
3724
+ process$1(innerType, ctx, params);
3688
3725
  const seen = ctx.seen.get(schema);
3689
3726
  seen.ref = innerType;
3690
3727
  };
@@ -3739,7 +3776,7 @@ function toJSONSchema(input, params) {
3739
3776
  const defs = {};
3740
3777
  for (const entry of registry._idmap.entries()) {
3741
3778
  const [_, schema] = entry;
3742
- process(schema, ctx);
3779
+ process$1(schema, ctx);
3743
3780
  }
3744
3781
  const schemas = {};
3745
3782
  ctx.external = {
@@ -3759,7 +3796,7 @@ function toJSONSchema(input, params) {
3759
3796
  ...params,
3760
3797
  processors: allProcessors
3761
3798
  });
3762
- process(input, ctx);
3799
+ process$1(input, ctx);
3763
3800
  extractDefs(ctx, input);
3764
3801
  return finalize(ctx, input);
3765
3802
  }
@@ -4247,6 +4284,22 @@ const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
4247
4284
  function boolean(params) {
4248
4285
  return /* @__PURE__ */ _boolean(ZodBoolean, params);
4249
4286
  }
4287
+ const ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
4288
+ $ZodNull.init(inst, def);
4289
+ ZodType.init(inst, def);
4290
+ inst._zod.processJSONSchema = (ctx, json, params) => nullProcessor(inst, ctx, json, params);
4291
+ });
4292
+ function _null(params) {
4293
+ return /* @__PURE__ */ _null$1(ZodNull, params);
4294
+ }
4295
+ const ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
4296
+ $ZodAny.init(inst, def);
4297
+ ZodType.init(inst, def);
4298
+ inst._zod.processJSONSchema = (ctx, json, params) => void 0;
4299
+ });
4300
+ function any() {
4301
+ return /* @__PURE__ */ _any(ZodAny);
4302
+ }
4250
4303
  const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
4251
4304
  $ZodUnknown.init(inst, def);
4252
4305
  ZodType.init(inst, def);
@@ -4360,6 +4413,14 @@ function object(shape, params) {
4360
4413
  ...normalizeParams(params)
4361
4414
  });
4362
4415
  }
4416
+ function looseObject(shape, params) {
4417
+ return new ZodObject({
4418
+ type: "object",
4419
+ shape,
4420
+ catchall: unknown(),
4421
+ ...normalizeParams(params)
4422
+ });
4423
+ }
4363
4424
  const ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
4364
4425
  $ZodUnion.init(inst, def);
4365
4426
  ZodType.init(inst, def);
@@ -4632,6 +4693,10 @@ function pipe(in_, out) {
4632
4693
  out
4633
4694
  });
4634
4695
  }
4696
+ const ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
4697
+ ZodPipe.init(inst, def);
4698
+ $ZodPreprocess.init(inst, def);
4699
+ });
4635
4700
  const ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
4636
4701
  $ZodReadonly.init(inst, def);
4637
4702
  ZodType.init(inst, def);
@@ -4670,6 +4735,13 @@ function refine(fn, _params = {}) {
4670
4735
  function superRefine(fn, params) {
4671
4736
  return /* @__PURE__ */ _superRefine(fn, params);
4672
4737
  }
4738
+ function preprocess(fn, schema) {
4739
+ return new ZodPreprocess({
4740
+ type: "pipe",
4741
+ in: transform(fn),
4742
+ out: schema
4743
+ });
4744
+ }
4673
4745
  //#endregion
4674
4746
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
4675
4747
  function number(params) {
@@ -5053,6 +5125,7 @@ const LEGAL_TRUST_SLUGS = [
5053
5125
  "compliance",
5054
5126
  "cookie-policy",
5055
5127
  "cookies",
5128
+ "data-use",
5056
5129
  "disclose",
5057
5130
  "dpa",
5058
5131
  "eula",
@@ -5231,8 +5304,127 @@ const OrganizationSlugSchema = string().trim().toLowerCase().min(2, "Slug must b
5231
5304
  * fail to load.
5232
5305
  */
5233
5306
  const ClaimableOrganizationSlugSchema = OrganizationSlugSchema.refine((slug) => !RESERVED_ORGANIZATION_SLUGS.has(slug), "This slug is reserved");
5307
+ const ORGANIZATION_NAME_APOSTROPHE_PATTERN = /[''\u2018\u2019]/g;
5308
+ /** Normalize a display name into slug-shaped text (may be empty or too short to claim). */
5309
+ function normalizeOrganizationNameToSlugBase(name) {
5310
+ return name.trim().toLowerCase().replace(ORGANIZATION_NAME_APOSTROPHE_PATTERN, "").replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
5311
+ }
5234
5312
  /** Same format as organization slugs — org-scoped, no global reserved list. */
5235
5313
  const ProjectSlugSchema = OrganizationSlugSchema;
5314
+ /** Derive a URL slug from a project display name (not guaranteed unique within the org). */
5315
+ function slugifyProjectName(name) {
5316
+ const base = normalizeOrganizationNameToSlugBase(name);
5317
+ if (!base) return "project";
5318
+ const parsed = ProjectSlugSchema.safeParse(base);
5319
+ return parsed.success ? parsed.data : "project";
5320
+ }
5321
+ const OrganizationSlugErrorCodeSchema = _enum([
5322
+ "slug_taken",
5323
+ "slug_reserved",
5324
+ "slug_invalid"
5325
+ ]);
5326
+ const SlugAvailabilityReasonSchema = _enum([
5327
+ "taken",
5328
+ "reserved",
5329
+ "invalid"
5330
+ ]);
5331
+ const SlugAvailabilityResponseSchema = object({
5332
+ slug: string(),
5333
+ available: boolean(),
5334
+ reason: SlugAvailabilityReasonSchema.optional(),
5335
+ suggestion: OrganizationSlugSchema.optional()
5336
+ });
5337
+ object({
5338
+ slug: string().trim().min(1),
5339
+ excludeOrganizationId: string().min(1).optional()
5340
+ });
5341
+ const ProjectSlugAvailabilityReasonSchema = _enum(["taken", "invalid"]);
5342
+ const ProjectSlugAvailabilityResponseSchema = object({
5343
+ slug: string(),
5344
+ available: boolean(),
5345
+ reason: ProjectSlugAvailabilityReasonSchema.optional(),
5346
+ suggestion: ProjectSlugSchema.optional()
5347
+ });
5348
+ object({
5349
+ slug: string().trim().min(1),
5350
+ excludeProjectId: string().min(1).optional()
5351
+ });
5352
+ const ProjectStatusSchema = _enum([
5353
+ "inactive",
5354
+ "starting",
5355
+ "active",
5356
+ "failed"
5357
+ ]);
5358
+ const OrganizationUserRoleSchema = _enum([
5359
+ "owner",
5360
+ "admin",
5361
+ "builder"
5362
+ ]);
5363
+ const isoDateTime$5 = string().datetime();
5364
+ const OrganizationSchema = object({
5365
+ id: string(),
5366
+ name: string(),
5367
+ slug: OrganizationSlugSchema,
5368
+ verified: boolean(),
5369
+ createdAt: isoDateTime$5,
5370
+ updatedAt: isoDateTime$5
5371
+ });
5372
+ const ProjectSchema = object({
5373
+ id: string(),
5374
+ organizationId: string(),
5375
+ name: string(),
5376
+ slug: ProjectSlugSchema,
5377
+ description: string().nullable(),
5378
+ status: ProjectStatusSchema,
5379
+ baseUrl: string().nullable(),
5380
+ runtimeId: string().nullable(),
5381
+ lastError: string().nullable(),
5382
+ createdAt: isoDateTime$5,
5383
+ updatedAt: isoDateTime$5
5384
+ });
5385
+ const UserOrganizationSchema = object({
5386
+ organization: OrganizationSchema,
5387
+ role: OrganizationUserRoleSchema
5388
+ });
5389
+ const ActiveOrganizationResponseSchema = UserOrganizationSchema.nullable();
5390
+ const ListOrganizationsResponseSchema = array(UserOrganizationSchema);
5391
+ const CreateOrganizationRequestSchema = object({
5392
+ name: string().trim().min(1),
5393
+ /** Format-only at the wire boundary; reserved-name checks run in platform-database. */
5394
+ slug: OrganizationSlugSchema.optional()
5395
+ });
5396
+ const UpdateOrganizationRequestSchema = object({
5397
+ name: string().trim().min(1).optional(),
5398
+ slug: ClaimableOrganizationSlugSchema.optional()
5399
+ }).refine((data) => data.name !== void 0 || data.slug !== void 0, { message: "At least one field is required" });
5400
+ const CreateOrganizationResponseSchema = UserOrganizationSchema;
5401
+ const ListProjectsResponseSchema = array(ProjectSchema);
5402
+ const ProjectListMetricsSchema = object({
5403
+ agentCount: number$1(),
5404
+ workflowCount: number$1(),
5405
+ skillCount: number$1(),
5406
+ credentialCount: number$1(),
5407
+ lastDeploymentAt: isoDateTime$5.nullable()
5408
+ });
5409
+ const ListProjectMetricsResponseSchema = record(string(), ProjectListMetricsSchema);
5410
+ const CreateProjectRequestSchema = object({
5411
+ name: string().trim().min(1),
5412
+ description: string().trim().min(1).optional()
5413
+ });
5414
+ const UpdateProjectRequestSchema = object({
5415
+ name: string().trim().min(1).optional(),
5416
+ description: string().trim().optional(),
5417
+ slug: ProjectSlugSchema.optional()
5418
+ }).refine((data) => data.name !== void 0 || data.description !== void 0 || data.slug !== void 0, { message: "At least one field is required" });
5419
+ const CreateProjectResponseSchema = ProjectSchema;
5420
+ const ProjectResponseSchema = ProjectSchema;
5421
+ const ProjectReachabilityResponseSchema = object({ reachable: boolean() });
5422
+ /** Org-custom app slug segment (the part after `{orgSlug}/`). Same format as project slugs. */
5423
+ const AppSlugSchema = ProjectSlugSchema;
5424
+ /** Derive a slug segment from a display name (not guaranteed unique). */
5425
+ function slugifyAppName(name) {
5426
+ return slugifyProjectName(name);
5427
+ }
5236
5428
  /** Browser→platform request budget (ping + small platform overhead). */
5237
5429
  const PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS = 17e3;
5238
5430
  /** Normalize a public origin URL (no trailing slash). */
@@ -5262,6 +5454,15 @@ function listenPortFromPublicUrl(value, fallback) {
5262
5454
  return fallback;
5263
5455
  }
5264
5456
  }
5457
+ const LOCAL_PLATFORM_ORIGIN = "http://localhost:3002";
5458
+ /** Reads `PUBLIC_PLATFORM_URL` when explicitly set. */
5459
+ function resolveExplicitPublicPlatformOrigin(env = process.env) {
5460
+ return env.PUBLIC_PLATFORM_URL?.replace(/\/$/, "") || void 0;
5461
+ }
5462
+ /** `PUBLIC_PLATFORM_URL` origin; falls back to {@link LOCAL_PLATFORM_ORIGIN} when unset. */
5463
+ function resolvePublicPlatformOrigin(env = process.env) {
5464
+ return resolveExplicitPublicPlatformOrigin(env) ?? "http://localhost:3002";
5465
+ }
5265
5466
  /** On-disk path under the project root (packed in deploy artifacts when present). */
5266
5467
  const ROUTE_MANIFEST_REL_PATH = "dist/.keystroke/route-manifest.json";
5267
5468
  const StoredRouteManifestSkillSchema = object({
@@ -5274,6 +5475,10 @@ const attachmentSchemasSchema = record(string(), object({
5274
5475
  requestSchema: record(string(), unknown()),
5275
5476
  filterSchema: record(string(), unknown()).optional()
5276
5477
  }));
5478
+ const attachmentMetaSchema = record(string(), object({
5479
+ name: string().optional(),
5480
+ description: string().optional()
5481
+ }));
5277
5482
  const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
5278
5483
  object({ kind: literal("health") }),
5279
5484
  object({
@@ -5285,7 +5490,9 @@ const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
5285
5490
  model: string(),
5286
5491
  systemPrompt: string(),
5287
5492
  toolCount: number$1().int().nonnegative(),
5288
- credentialCount: number$1().int().nonnegative()
5493
+ credentialCount: number$1().int().nonnegative(),
5494
+ appSlugs: array(string()).default([]),
5495
+ toolSlugs: array(string()).default([])
5289
5496
  }),
5290
5497
  object({
5291
5498
  kind: literal("workflow"),
@@ -5301,13 +5508,20 @@ const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
5301
5508
  endpoint: string(),
5302
5509
  attachmentIds: array(string()),
5303
5510
  moduleFile: string(),
5304
- attachmentSchemas: attachmentSchemasSchema
5511
+ /** sha256 of the trigger source file, baked at build time for overview change-detection. */
5512
+ sourceHash: string().optional(),
5513
+ attachmentSchemas: attachmentSchemasSchema,
5514
+ attachmentMeta: attachmentMetaSchema.optional()
5305
5515
  }),
5306
5516
  object({
5307
5517
  kind: literal("trigger-poll"),
5308
5518
  attachmentId: string(),
5519
+ attachmentIds: array(string()),
5309
5520
  moduleFile: string(),
5310
- schedule: string()
5521
+ sourceHash: string().optional(),
5522
+ schedule: string(),
5523
+ name: string().optional(),
5524
+ description: string().optional()
5311
5525
  }),
5312
5526
  object({
5313
5527
  kind: literal("trigger-poll-group"),
@@ -5319,16 +5533,180 @@ const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
5319
5533
  object({
5320
5534
  kind: literal("cron-schedule"),
5321
5535
  attachmentId: string(),
5536
+ attachmentIds: array(string()),
5322
5537
  moduleFile: string(),
5323
- schedule: string()
5538
+ sourceHash: string().optional(),
5539
+ schedule: string(),
5540
+ name: string().optional(),
5541
+ description: string().optional()
5324
5542
  })
5325
5543
  ]);
5326
- const StoredRouteManifestSchema = object({
5544
+ const storedRouteManifestV2Schema = object({
5327
5545
  version: literal(2),
5328
5546
  entries: array(storedRouteManifestEntryV2Schema),
5329
5547
  skills: array(StoredRouteManifestSkillSchema).default([]),
5330
5548
  integrations: array(string()).optional()
5331
5549
  });
5550
+ const DERIVED_ENTRY_KINDS = new Set([
5551
+ "agent-sessions-list",
5552
+ "agent-session-detail",
5553
+ "workflow-runs-list",
5554
+ "workflow-run-detail",
5555
+ "trigger-runs-list",
5556
+ "trigger-run-detail"
5557
+ ]);
5558
+ function webhookEndpointFromPath(path) {
5559
+ return path.replace(/^\/triggers\//, "").replace(/^\/+|\/+$/g, "");
5560
+ }
5561
+ function legacyAgentAppSlugs(entry) {
5562
+ if (Array.isArray(entry.appSlugs)) return entry.appSlugs;
5563
+ if (Array.isArray(entry.credentialSlugs)) return entry.credentialSlugs;
5564
+ if (Array.isArray(entry.credentialKeys)) return entry.credentialKeys;
5565
+ return [];
5566
+ }
5567
+ /** TODO remove after all artifacts rebuilt — upcasts legacy v1 manifests to v2. */
5568
+ function normalizeEntryToV2(entry) {
5569
+ const kind = entry.kind;
5570
+ if (typeof kind !== "string") return null;
5571
+ if (DERIVED_ENTRY_KINDS.has(kind) || kind === "plugin") return null;
5572
+ if (kind === "health") return { kind: "health" };
5573
+ if (kind === "agent") {
5574
+ const slug = typeof entry.slug === "string" ? entry.slug : typeof entry.agentSlug === "string" ? entry.agentSlug : void 0;
5575
+ if (!slug || typeof entry.moduleFile !== "string") return null;
5576
+ return {
5577
+ kind: "agent",
5578
+ slug,
5579
+ moduleFile: entry.moduleFile,
5580
+ ...typeof entry.name === "string" ? { name: entry.name } : {},
5581
+ ...typeof entry.description === "string" ? { description: entry.description } : {},
5582
+ model: typeof entry.model === "string" ? entry.model : "",
5583
+ systemPrompt: typeof entry.systemPrompt === "string" ? entry.systemPrompt : "",
5584
+ toolCount: typeof entry.toolCount === "number" ? entry.toolCount : 0,
5585
+ credentialCount: typeof entry.credentialCount === "number" ? entry.credentialCount : 0,
5586
+ appSlugs: legacyAgentAppSlugs(entry),
5587
+ toolSlugs: Array.isArray(entry.toolSlugs) ? entry.toolSlugs : []
5588
+ };
5589
+ }
5590
+ if (kind === "workflow") {
5591
+ const slug = typeof entry.slug === "string" ? entry.slug : typeof entry.workflowSlug === "string" ? entry.workflowSlug : void 0;
5592
+ if (!slug || typeof entry.moduleFile !== "string") return null;
5593
+ const name = typeof entry.name === "string" ? entry.name : typeof entry.workflowName === "string" ? entry.workflowName : void 0;
5594
+ return {
5595
+ kind: "workflow",
5596
+ slug,
5597
+ moduleFile: entry.moduleFile,
5598
+ ...name ? { name } : {},
5599
+ ...typeof entry.description === "string" ? { description: entry.description } : {},
5600
+ subscribable: entry.subscribable === true,
5601
+ requestSchema: entry.requestSchema && typeof entry.requestSchema === "object" ? entry.requestSchema : {}
5602
+ };
5603
+ }
5604
+ if (kind === "trigger-webhook") {
5605
+ if (typeof entry.moduleFile !== "string" || !Array.isArray(entry.attachmentIds)) return null;
5606
+ const endpoint = typeof entry.endpoint === "string" ? entry.endpoint : typeof entry.path === "string" ? webhookEndpointFromPath(entry.path) : void 0;
5607
+ if (!endpoint) return null;
5608
+ return {
5609
+ kind: "trigger-webhook",
5610
+ endpoint,
5611
+ attachmentIds: entry.attachmentIds,
5612
+ moduleFile: entry.moduleFile,
5613
+ ...typeof entry.sourceHash === "string" ? { sourceHash: entry.sourceHash } : {},
5614
+ attachmentSchemas: entry.attachmentSchemas && typeof entry.attachmentSchemas === "object" ? entry.attachmentSchemas : {},
5615
+ ...entry.attachmentMeta && typeof entry.attachmentMeta === "object" ? { attachmentMeta: entry.attachmentMeta } : {}
5616
+ };
5617
+ }
5618
+ if (kind === "trigger-poll") {
5619
+ if (typeof entry.attachmentId !== "string" || typeof entry.moduleFile !== "string" || typeof entry.schedule !== "string") return null;
5620
+ return {
5621
+ kind: "trigger-poll",
5622
+ attachmentId: entry.attachmentId,
5623
+ attachmentIds: Array.isArray(entry.attachmentIds) ? entry.attachmentIds : [entry.attachmentId],
5624
+ moduleFile: entry.moduleFile,
5625
+ ...typeof entry.sourceHash === "string" ? { sourceHash: entry.sourceHash } : {},
5626
+ schedule: entry.schedule,
5627
+ ...typeof entry.name === "string" ? { name: entry.name } : {},
5628
+ ...typeof entry.description === "string" ? { description: entry.description } : {}
5629
+ };
5630
+ }
5631
+ if (kind === "trigger-poll-group") {
5632
+ if (typeof entry.pollId !== "string" || typeof entry.moduleFile !== "string" || typeof entry.schedule !== "string" || !Array.isArray(entry.attachmentIds)) return null;
5633
+ return {
5634
+ kind: "trigger-poll-group",
5635
+ pollId: entry.pollId,
5636
+ attachmentIds: entry.attachmentIds,
5637
+ moduleFile: entry.moduleFile,
5638
+ schedule: entry.schedule
5639
+ };
5640
+ }
5641
+ if (kind === "cron-schedule") {
5642
+ if (typeof entry.attachmentId !== "string" || typeof entry.moduleFile !== "string" || typeof entry.schedule !== "string") return null;
5643
+ return {
5644
+ kind: "cron-schedule",
5645
+ attachmentId: entry.attachmentId,
5646
+ attachmentIds: Array.isArray(entry.attachmentIds) ? entry.attachmentIds : [entry.attachmentId],
5647
+ moduleFile: entry.moduleFile,
5648
+ ...typeof entry.sourceHash === "string" ? { sourceHash: entry.sourceHash } : {},
5649
+ schedule: entry.schedule,
5650
+ ...typeof entry.name === "string" ? { name: entry.name } : {},
5651
+ ...typeof entry.description === "string" ? { description: entry.description } : {}
5652
+ };
5653
+ }
5654
+ return null;
5655
+ }
5656
+ /** TODO remove after all artifacts rebuilt — upcasts legacy v1 manifests to v2. */
5657
+ function normalizeV2ManifestInput(value) {
5658
+ if (!value || typeof value !== "object") return value;
5659
+ const raw = value;
5660
+ if (raw.version !== 2 || !Array.isArray(raw.entries)) return value;
5661
+ return {
5662
+ ...raw,
5663
+ entries: raw.entries.map((entry) => {
5664
+ if (!entry || typeof entry !== "object") return entry;
5665
+ const kind = entry.kind;
5666
+ if (kind === "trigger-poll" || kind === "cron-schedule" || kind === "trigger-webhook" || kind === "trigger-poll-group") {
5667
+ const trigger = entry;
5668
+ if (Array.isArray(trigger.attachmentIds)) return entry;
5669
+ return {
5670
+ ...trigger,
5671
+ attachmentIds: typeof trigger.attachmentId === "string" ? [trigger.attachmentId] : []
5672
+ };
5673
+ }
5674
+ if (kind !== "agent") return entry;
5675
+ const agent = entry;
5676
+ if (Array.isArray(agent.appSlugs)) return entry;
5677
+ const appSlugs = legacyAgentAppSlugs(agent);
5678
+ if (appSlugs.length === 0) return entry;
5679
+ const { credentialKeys: _credentialKeys, credentialSlugs: _credentialSlugs, ...rest } = agent;
5680
+ return {
5681
+ ...rest,
5682
+ appSlugs,
5683
+ toolSlugs: Array.isArray(agent.toolSlugs) ? agent.toolSlugs : []
5684
+ };
5685
+ })
5686
+ };
5687
+ }
5688
+ /** TODO remove after all artifacts rebuilt — upcasts legacy v1 manifests to v2. */
5689
+ function normalizeStoredRouteManifestToV2(value) {
5690
+ if (!value || typeof value !== "object") throw new Error("Invalid route manifest");
5691
+ const raw = value;
5692
+ if (raw.version === 2) return storedRouteManifestV2Schema.parse(normalizeV2ManifestInput(value));
5693
+ const entriesRaw = Array.isArray(raw.entries) ? raw.entries : [];
5694
+ const entries = [];
5695
+ for (const entry of entriesRaw) {
5696
+ if (!entry || typeof entry !== "object") continue;
5697
+ const normalized = normalizeEntryToV2(entry);
5698
+ if (normalized) entries.push(normalized);
5699
+ }
5700
+ return storedRouteManifestV2Schema.parse({
5701
+ version: 2,
5702
+ entries,
5703
+ skills: raw.skills ?? [],
5704
+ integrations: raw.integrations
5705
+ });
5706
+ }
5707
+ function parseStoredRouteManifest(value) {
5708
+ return normalizeStoredRouteManifestToV2(value);
5709
+ }
5332
5710
  /** Messaging platforms that support agent gateway bindings. */
5333
5711
  const ChannelPlatformKeySchema = _enum(["slack"]);
5334
5712
  const ChannelReactionSupportSchema = _enum([
@@ -5377,6 +5755,8 @@ const AppGatewaySchema = object({
5377
5755
  }),
5378
5756
  supportsChannelDirectory: boolean(),
5379
5757
  webhookPathHint: string().min(1),
5758
+ /** Composio/keystroke app slug for Connect when it differs from the gateway platform key (e.g. slack → slackbot). */
5759
+ connectAppId: string().min(1).optional(),
5380
5760
  docsUrl: string().url().optional(),
5381
5761
  tagline: string().min(1).optional()
5382
5762
  });
@@ -5388,7 +5768,11 @@ const ChannelPlatformSchema = object({
5388
5768
  fallbackDomain: string().min(1),
5389
5769
  description: string().min(1),
5390
5770
  tagline: string().min(1),
5391
- authKind: _enum(["oauth", "api_key"]),
5771
+ authKind: _enum([
5772
+ "oauth",
5773
+ "api_key",
5774
+ "keystroke"
5775
+ ]),
5392
5776
  credentialFields: array(object({
5393
5777
  key: string().min(1),
5394
5778
  label: string().min(1),
@@ -5410,6 +5794,7 @@ const ChannelPlatformSchema = object({
5410
5794
  }),
5411
5795
  webhookPathHint: string().min(1),
5412
5796
  supportsChannelDirectory: boolean(),
5797
+ connectAppId: string().min(1).optional(),
5413
5798
  docsUrl: string().url().optional()
5414
5799
  });
5415
5800
  const ChannelBindingSchema = object({
@@ -5438,15 +5823,15 @@ const ChannelDirectoryEntrySchema = object({
5438
5823
  memberCount: number$1().int().nonnegative().optional(),
5439
5824
  isArchived: boolean().optional()
5440
5825
  });
5441
- const ChannelConnectionListResponseSchema = object({ connections: array(ChannelConnectionSchema) });
5442
- const ChannelDirectoryListResponseSchema = object({ channels: array(ChannelDirectoryEntrySchema) });
5826
+ const ChannelConnectionListResponseSchema = array(ChannelConnectionSchema);
5827
+ const ChannelDirectoryListResponseSchema = array(ChannelDirectoryEntrySchema);
5443
5828
  object({ teamName: string().min(1).optional() });
5444
- const ChannelAccountListResponseSchema = object({ accounts: array(object({
5829
+ const ChannelAccountListResponseSchema = array(object({
5445
5830
  id: string().min(1),
5446
5831
  platform: ChannelPlatformKeySchema,
5447
5832
  label: string().min(1),
5448
5833
  connectedAt: string()
5449
- })) });
5834
+ }));
5450
5835
  const NewChannelBindingInputSchema = object({
5451
5836
  channelId: string().min(1),
5452
5837
  channelName: string().min(1),
@@ -5463,6 +5848,41 @@ const UpdateChannelBindingBodySchema = object({ patch: object({
5463
5848
  mode: ChannelListenModeSchema.optional(),
5464
5849
  subscribeOnMention: boolean().optional()
5465
5850
  }) });
5851
+ /**
5852
+ * Where a manual MCP API key is injected on each request. MCP servers don't
5853
+ * advertise API-key support in a discoverable way, so the user picks the
5854
+ * placement: a request header (optionally prefixed, e.g. `Bearer `) or a query
5855
+ * param (e.g. Exa's `exaApiKey`).
5856
+ */
5857
+ const McpApiKeyPlacementSchema = discriminatedUnion("kind", [object({
5858
+ kind: literal("header"),
5859
+ name: string().trim().min(1),
5860
+ /** Prepended to the token, e.g. `"Bearer "` for `Authorization: Bearer <token>`. */
5861
+ prefix: string().optional()
5862
+ }), object({
5863
+ kind: literal("query"),
5864
+ name: string().trim().min(1)
5865
+ })]);
5866
+ object({
5867
+ token: string().trim().min(1),
5868
+ placement: McpApiKeyPlacementSchema.default({
5869
+ kind: "header",
5870
+ name: "Authorization",
5871
+ prefix: "Bearer "
5872
+ })
5873
+ });
5874
+ /** Metadata for one vault field on a custom api_key app. */
5875
+ const AppCredentialFieldSchema = object({
5876
+ label: string().trim().min(1).optional(),
5877
+ secret: boolean().optional(),
5878
+ optional: boolean().optional(),
5879
+ description: string().trim().min(1).optional(),
5880
+ default: string().optional(),
5881
+ /** For direct MCP api-key apps: where this field's value is injected on the request. */
5882
+ placement: McpApiKeyPlacementSchema.optional()
5883
+ });
5884
+ /** Credential template keyed by vault field name. */
5885
+ 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" });
5466
5886
  /** A single OAuth scope an app can request, with human copy for connect UI. */
5467
5887
  const OAuthScopeOptionSchema = object({
5468
5888
  name: string().min(1),
@@ -5476,6 +5896,13 @@ const AppAuthKindSchema = _enum([
5476
5896
  "api_key",
5477
5897
  "keystroke"
5478
5898
  ]);
5899
+ /** Composio auth scheme for API-key style connections. */
5900
+ const AppCredentialSchemeSchema = _enum([
5901
+ "API_KEY",
5902
+ "BEARER_TOKEN",
5903
+ "BASIC",
5904
+ "BASIC_WITH_JWT"
5905
+ ]);
5479
5906
  /**
5480
5907
  * Where app metadata and execution are sourced (e.g. native, composio, pipedream, custom).
5481
5908
  * Opaque string — cloud/hosted entrypoints choose values; keystroke stays provider-agnostic.
@@ -5489,7 +5916,76 @@ object({
5489
5916
  logo: string().url().optional(),
5490
5917
  authKind: AppAuthKindSchema,
5491
5918
  oauthScopes: array(OAuthScopeOptionSchema)
5492
- }).extend({ source: AppSourceSchema });
5919
+ }).extend({
5920
+ source: AppSourceSchema,
5921
+ credentialFields: AppCredentialFieldsSchema.optional(),
5922
+ credentialScheme: AppCredentialSchemeSchema.optional()
5923
+ });
5924
+ const customAppNameSchema = string().trim().min(1, "Name is required");
5925
+ const AppSlugAvailabilityReasonSchema = ProjectSlugAvailabilityReasonSchema;
5926
+ const AppSlugAvailabilityResponseSchema = object({
5927
+ slug: string(),
5928
+ available: boolean(),
5929
+ reason: AppSlugAvailabilityReasonSchema.optional(),
5930
+ suggestion: AppSlugSchema.optional()
5931
+ });
5932
+ object({ slug: string().trim().min(1) });
5933
+ /** Request body for creating an org custom app (api_key or direct MCP). */
5934
+ const optionalCredentialFieldsSchema = record(string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/), AppCredentialFieldSchema);
5935
+ const CreateCustomAppRequestSchema = object({
5936
+ name: customAppNameSchema,
5937
+ slug: AppSlugSchema,
5938
+ description: string().trim().min(1),
5939
+ source: _enum([
5940
+ "custom",
5941
+ "mcp",
5942
+ "openapi"
5943
+ ]).default("custom"),
5944
+ mcpUrl: string().url().optional(),
5945
+ authKind: AppAuthKindSchema.optional(),
5946
+ fields: optionalCredentialFieldsSchema.optional(),
5947
+ credentialScheme: AppCredentialSchemeSchema.optional(),
5948
+ oauthScopes: array(OAuthScopeOptionSchema).optional()
5949
+ }).superRefine((data, ctx) => {
5950
+ if (data.source === "mcp" && !data.mcpUrl) ctx.addIssue({
5951
+ code: "custom",
5952
+ message: "mcpUrl is required for MCP apps",
5953
+ path: ["mcpUrl"]
5954
+ });
5955
+ if (!(data.authKind ?? (data.source === "custom" ? "api_key" : void 0))) {
5956
+ ctx.addIssue({
5957
+ code: "custom",
5958
+ message: "authKind is required",
5959
+ path: ["authKind"]
5960
+ });
5961
+ return;
5962
+ }
5963
+ if (data.source === "custom") {
5964
+ const parsed = AppCredentialFieldsSchema.safeParse(data.fields ?? {});
5965
+ if (!parsed.success) for (const issue of parsed.error.issues) ctx.addIssue({
5966
+ ...issue,
5967
+ path: ["fields", ...issue.path]
5968
+ });
5969
+ }
5970
+ });
5971
+ /** Full custom app detail returned by GET (includes credential template for sync). */
5972
+ const CustomAppDetailSchema = object({
5973
+ id: string().min(1),
5974
+ slug: string().min(1),
5975
+ name: string().min(1),
5976
+ description: string().min(1),
5977
+ category: string().min(1),
5978
+ authKind: AppAuthKindSchema,
5979
+ source: AppSourceSchema,
5980
+ mcpUrl: string().url().nullable().optional(),
5981
+ credentialFields: optionalCredentialFieldsSchema.optional(),
5982
+ credentialScheme: AppCredentialSchemeSchema.optional(),
5983
+ oauthScopes: array(OAuthScopeOptionSchema).optional(),
5984
+ createdAt: string().min(1),
5985
+ updatedAt: string().min(1)
5986
+ });
5987
+ const CreateCustomAppResponseSchema = CustomAppDetailSchema;
5988
+ const GetCustomAppResponseSchema = CustomAppDetailSchema;
5493
5989
  object({
5494
5990
  id: string().min(1),
5495
5991
  organizationId: string().min(1).nullable(),
@@ -5501,10 +5997,13 @@ object({
5501
5997
  authKind: AppAuthKindSchema,
5502
5998
  oauthScopes: array(OAuthScopeOptionSchema),
5503
5999
  source: AppSourceSchema,
6000
+ credentialFields: AppCredentialFieldsSchema.optional(),
6001
+ credentialScheme: AppCredentialSchemeSchema.optional(),
6002
+ mcpUrl: string().url().nullable().optional(),
5504
6003
  createdAt: string().min(1),
5505
6004
  updatedAt: string().min(1)
5506
6005
  });
5507
- const ListAppsResponseSchema = object({ apps: array(object({
6006
+ const ListAppsResponseSchema = array(object({
5508
6007
  id: string().min(1),
5509
6008
  name: string().min(1),
5510
6009
  description: string().min(1),
@@ -5513,9 +6012,139 @@ const ListAppsResponseSchema = object({ apps: array(object({
5513
6012
  logo: string().url().nullable().optional(),
5514
6013
  authKind: AppAuthKindSchema,
5515
6014
  oauthScopes: array(OAuthScopeOptionSchema),
6015
+ /** Where app metadata and execution are sourced (e.g. composio, custom). */
6016
+ source: AppSourceSchema,
6017
+ /** Custom api_key apps — vault field template for connect UI and sync. */
6018
+ credentialFields: AppCredentialFieldsSchema.optional(),
6019
+ /** Composio auth scheme when credentialFields are present. */
6020
+ credentialScheme: AppCredentialSchemeSchema.optional(),
6021
+ /** Direct MCP server URL when source is mcp. */
6022
+ mcpUrl: string().url().nullable().optional(),
5516
6023
  /** When present, the app supports agent gateway bindings (external channels). */
5517
6024
  gateway: AppGatewaySchema.optional()
5518
- })) });
6025
+ }));
6026
+ const McpAuthProbeModeSchema = _enum([
6027
+ "none",
6028
+ "token",
6029
+ "oauth"
6030
+ ]);
6031
+ const McpAuthProbeOAuthSchema = object({
6032
+ issuer: string().optional(),
6033
+ authorizationEndpoint: string().url(),
6034
+ tokenEndpoint: string().url(),
6035
+ registrationEndpoint: string().url().optional(),
6036
+ scopes: array(string()),
6037
+ resource: string().optional(),
6038
+ /** Human-readable label from OAuth protected-resource metadata (RFC 9728). */
6039
+ resourceName: string().optional()
6040
+ });
6041
+ object({
6042
+ url: string().url(),
6043
+ mode: McpAuthProbeModeSchema,
6044
+ unauthenticatedStatus: number$1().int().optional(),
6045
+ scheme: AppCredentialSchemeSchema.optional(),
6046
+ oauth: McpAuthProbeOAuthSchema.optional()
6047
+ });
6048
+ object({ url: string().url() });
6049
+ const McpDiscoverResponseSchema = object({
6050
+ detected: boolean(),
6051
+ template: object({
6052
+ authKind: AppAuthKindSchema,
6053
+ credentialFields: record(string(), AppCredentialFieldSchema).optional(),
6054
+ credentialScheme: AppCredentialSchemeSchema.optional(),
6055
+ oauthScopes: array(OAuthScopeOptionSchema),
6056
+ mcpUrl: string().url(),
6057
+ oauth: McpAuthProbeOAuthSchema.optional(),
6058
+ serverName: string().optional(),
6059
+ serverDescription: string().optional()
6060
+ })
6061
+ });
6062
+ const StartMcpOAuthConnectionInputSchema = object({
6063
+ appSlug: string().trim().min(1),
6064
+ projects: array(string().trim().min(1)).optional(),
6065
+ createOrganizationCredential: boolean().optional(),
6066
+ createUserProvidedCredential: boolean().optional(),
6067
+ label: string().trim().min(1).optional(),
6068
+ credentialInstanceId: string().trim().min(1).optional(),
6069
+ scopes: array(string()).optional()
6070
+ });
6071
+ const StartMcpOAuthConnectionResultSchema = object({ authorizeUrl: string().url() });
6072
+ object({ url: string().url() });
6073
+ const OpenApiDiscoverResponseSchema = object({
6074
+ detected: boolean(),
6075
+ template: object({
6076
+ authKind: AppAuthKindSchema,
6077
+ credentialFields: record(string(), AppCredentialFieldSchema).optional(),
6078
+ credentialScheme: AppCredentialSchemeSchema.optional(),
6079
+ oauthScopes: array(OAuthScopeOptionSchema),
6080
+ openapiUrl: string().url(),
6081
+ name: string().optional(),
6082
+ description: string().optional(),
6083
+ homepageUrl: string().optional()
6084
+ })
6085
+ });
6086
+ const CatalogAppsPageSchema = object({
6087
+ items: array(object({
6088
+ name: string(),
6089
+ description: string(),
6090
+ package: string()
6091
+ })),
6092
+ nextCursor: string().optional()
6093
+ });
6094
+ const CatalogAppDetailSchema = object({
6095
+ name: string(),
6096
+ description: string(),
6097
+ package: string(),
6098
+ version: string().optional()
6099
+ });
6100
+ const CatalogActionSummarySchema = object({
6101
+ slug: string(),
6102
+ name: string(),
6103
+ description: string().optional()
6104
+ });
6105
+ const CatalogActionsPageSchema = object({
6106
+ toolkit: string().optional(),
6107
+ items: array(CatalogActionSummarySchema),
6108
+ nextCursor: string().optional()
6109
+ });
6110
+ const CatalogActionDetailSchema = object({
6111
+ slug: string(),
6112
+ name: string(),
6113
+ description: string().optional(),
6114
+ inputParameters: record(string(), unknown()).optional(),
6115
+ outputParameters: record(string(), unknown()).optional(),
6116
+ version: string().optional()
6117
+ });
6118
+ const CatalogAppsPageResponseSchema = CatalogAppsPageSchema;
6119
+ const CatalogAppDetailResponseSchema = CatalogAppDetailSchema;
6120
+ const CatalogActionsPageResponseSchema = CatalogActionsPageSchema;
6121
+ const CatalogActionDetailResponseSchema = CatalogActionDetailSchema;
6122
+ const ORG_SLUG_SEPARATOR = "/";
6123
+ /** Parse a stored app slug into official vs org-custom parts. */
6124
+ function parseAppSlug(slug) {
6125
+ const trimmed = slug.trim();
6126
+ if (!trimmed) throw new Error("parseAppSlug requires a non-empty slug");
6127
+ const separatorIndex = trimmed.indexOf(ORG_SLUG_SEPARATOR);
6128
+ if (separatorIndex === -1) return {
6129
+ kind: "official",
6130
+ slug: trimmed
6131
+ };
6132
+ const orgSlug = trimmed.slice(0, separatorIndex);
6133
+ const name = trimmed.slice(separatorIndex + 1);
6134
+ if (!orgSlug || !name || trimmed.indexOf(ORG_SLUG_SEPARATOR, separatorIndex + 1) !== -1) throw new Error(`Invalid org app slug: ${slug}`);
6135
+ return {
6136
+ kind: "org",
6137
+ orgSlug,
6138
+ name,
6139
+ slug: trimmed
6140
+ };
6141
+ }
6142
+ /** Web URL that opens the org apps page with a connect dialog for the given app. */
6143
+ function buildConnectDeeplink(options) {
6144
+ const base = options.webUrl.replace(/\/+$/, "");
6145
+ const params = new URLSearchParams({ connect: options.appSlug });
6146
+ return `${base}/${options.orgSlug}/apps?${params.toString()}`;
6147
+ }
5519
6148
  /** How a credential instance is stored (`credential_instances.auth_kind`). */
5520
6149
  const CredentialAuthKindSchema = _enum([
5521
6150
  "api_key",
@@ -5574,7 +6203,7 @@ const AppCredentialSummarySchema = object({
5574
6203
  });
5575
6204
  const credentialSecretValueSchema = record(string(), unknown()).refine((value) => Object.keys(value).length > 0, { message: "value must be a non-empty object" });
5576
6205
  function hasCredentialTarget(input) {
5577
- return input.projects.length > 0 || input.createOrganizationCredential || input.createUserProvidedCredential;
6206
+ return input.projects.length > 0 || input.createOrganizationCredential || input.createUserProvidedCredential || Boolean(input.credentialInstanceId?.trim());
5578
6207
  }
5579
6208
  function addMissingCredentialTargetIssue(ctx, path = ["projects"]) {
5580
6209
  ctx.addIssue({
@@ -5587,7 +6216,11 @@ function addMissingCredentialTargetIssue(ctx, path = ["projects"]) {
5587
6216
  const CredentialTargetsFieldsSchema = object({
5588
6217
  projects: array(string().min(1)).default([]),
5589
6218
  createOrganizationCredential: boolean().default(false),
5590
- createUserProvidedCredential: boolean().default(false)
6219
+ createUserProvidedCredential: boolean().default(false),
6220
+ /** Display label for created credential instances (apps table / detail page). */
6221
+ label: string().trim().min(1).optional(),
6222
+ /** When set, update this credential instance in place (reconnect) instead of creating a new row. */
6223
+ credentialInstanceId: string().trim().min(1).optional()
5591
6224
  });
5592
6225
  /** Input for starting an OAuth connection (connect dialog / CLI connect). */
5593
6226
  const StartOAuthConnectionInputSchema = CredentialTargetsFieldsSchema.extend({
@@ -5600,6 +6233,22 @@ const StartOAuthConnectionResultSchema = object({
5600
6233
  status: _enum(["connected", "redirecting"]),
5601
6234
  authorizeUrl: string().url().nullable()
5602
6235
  });
6236
+ /** Input for starting a keystroke connection (connect dialog). */
6237
+ const StartKeystrokeConnectionInputSchema = CredentialTargetsFieldsSchema.extend({
6238
+ app: string().trim().min(1),
6239
+ value: credentialSecretValueSchema.optional()
6240
+ }).superRefine((input, ctx) => {
6241
+ if (!hasCredentialTarget(input)) addMissingCredentialTargetIssue(ctx);
6242
+ });
6243
+ /** Result of starting a keystroke connection. */
6244
+ const StartKeystrokeConnectionResultSchema = discriminatedUnion("status", [object({
6245
+ status: literal("connected"),
6246
+ connectionId: string().min(1)
6247
+ }), object({
6248
+ status: literal("redirecting"),
6249
+ authorizeUrl: string().url(),
6250
+ connectionId: string().min(1)
6251
+ })]);
5603
6252
  /** Request body for `POST /api/credentials` (manual api-key fan-out). */
5604
6253
  const CreateCredentialsRequestSchema = CredentialTargetsFieldsSchema.extend({
5605
6254
  appId: string().min(1),
@@ -5625,9 +6274,47 @@ const UpdateCredentialRequestSchema = object({
5625
6274
  isDefault: boolean().optional(),
5626
6275
  value: credentialSecretValueSchema.optional()
5627
6276
  }).refine((input) => input.label !== void 0 || input.isDefault !== void 0 || input.value !== void 0, { message: "At least one field is required" });
5628
- const ListCredentialsResponseSchema = object({ credentials: array(AppCredentialSummarySchema) });
5629
- const GetCredentialResponseSchema = object({ credential: AppCredentialSummarySchema });
5630
- const CreateCredentialsResponseSchema = object({ credentials: array(AppCredentialSummarySchema) });
6277
+ const ListCredentialsResponseSchema = array(AppCredentialSummarySchema);
6278
+ const GetCredentialResponseSchema = AppCredentialSummarySchema;
6279
+ const CreateCredentialsResponseSchema = array(AppCredentialSummarySchema);
6280
+ const CredentialAssignmentTargetTypeSchema = _enum(["workflow", "agent"]);
6281
+ const CredentialAssignmentRecordSchema = object({
6282
+ id: string(),
6283
+ targetType: CredentialAssignmentTargetTypeSchema,
6284
+ targetKey: string(),
6285
+ consumerId: string(),
6286
+ credentialSlug: string(),
6287
+ instanceId: string(),
6288
+ credential: string().optional(),
6289
+ scopeType: _enum([
6290
+ "organization",
6291
+ "project",
6292
+ "user"
6293
+ ]).optional(),
6294
+ createdAt: string(),
6295
+ updatedAt: string()
6296
+ });
6297
+ const CredentialAssignmentListResponseSchema = object({ assignments: array(CredentialAssignmentRecordSchema) });
6298
+ const AssignCredentialBodySchema = object({
6299
+ targetType: CredentialAssignmentTargetTypeSchema,
6300
+ targetKey: string().min(1),
6301
+ /** Omit or '*' for wildcard assignment. */
6302
+ consumerId: string().optional(),
6303
+ credential: string().min(1)
6304
+ });
6305
+ const CredentialAssignmentListQuerySchema = object({
6306
+ targetType: CredentialAssignmentTargetTypeSchema,
6307
+ targetKey: string().min(1)
6308
+ });
6309
+ const CredentialConsumerListQuerySchema = object({
6310
+ targetType: CredentialAssignmentTargetTypeSchema,
6311
+ targetKey: string().min(1)
6312
+ });
6313
+ const CredentialConsumerListResponseSchema = object({ consumers: array(object({
6314
+ consumerId: string(),
6315
+ label: string(),
6316
+ appSlugs: array(string())
6317
+ })) });
5631
6318
  const McpConnectionStatusSchema = _enum([
5632
6319
  "INITIATED",
5633
6320
  "ACTIVE",
@@ -5636,39 +6323,72 @@ const McpConnectionStatusSchema = _enum([
5636
6323
  "INACTIVE",
5637
6324
  "REVOKED"
5638
6325
  ]);
5639
- object({ apps: array(object({
6326
+ object({
5640
6327
  slug: string(),
5641
6328
  name: string(),
5642
6329
  connected: boolean(),
5643
6330
  connectionId: string().optional(),
5644
6331
  status: McpConnectionStatusSchema.optional()
5645
- })) });
6332
+ });
5646
6333
  object({
5647
6334
  connectionId: string(),
5648
6335
  entityId: string(),
5649
6336
  instanceId: string()
5650
6337
  });
6338
+ const McpCredentialAssignmentTargetSchema = object({
6339
+ type: CredentialAssignmentTargetTypeSchema,
6340
+ key: string().trim().min(1)
6341
+ });
5651
6342
  object({
5652
6343
  app: string().trim().min(1),
5653
6344
  tool: string().trim().min(1),
5654
6345
  arguments: record(string(), unknown()).default({}),
5655
- /**
5656
- * Resolved credential instance to execute against. When set, the platform executes that exact
5657
- * connection (scoped to the caller's org); when omitted it resolves the app's instance by scope.
5658
- */
5659
- instanceId: string().trim().min(1).optional(),
5660
6346
  /** Pinned provider toolkit version, sourced from the app definition; forwarded to the provider. */
5661
- version: string().trim().min(1)
6347
+ version: string().trim().min(1),
6348
+ /** When set, platform MCP resolve checks credential assignments before scope defaults. */
6349
+ assignmentTarget: McpCredentialAssignmentTargetSchema.optional(),
6350
+ /** Tool/step consumer id for assignment lookup (action slug or workflow step correlation id). */
6351
+ consumerId: string().trim().min(1).optional()
6352
+ });
6353
+ object({
6354
+ error: _enum([
6355
+ "not_found",
6356
+ "forbidden",
6357
+ "mcp_execute_failed"
6358
+ ]),
6359
+ message: string()
5662
6360
  });
5663
6361
  const SubmitTeamRequestRequestSchema = object({
5664
6362
  type: _enum([
5665
6363
  "org-deletion",
5666
6364
  "contact",
5667
- "enterprise-upgrade"
6365
+ "enterprise-upgrade",
6366
+ "verification"
5668
6367
  ]),
5669
6368
  message: string().trim().max(5e3).optional()
5670
6369
  });
5671
6370
  object({ ok: literal(true) });
6371
+ const MarketingContactCompanySizeSchema = _enum([
6372
+ "1-10",
6373
+ "11-50",
6374
+ "51-200",
6375
+ "201-500",
6376
+ "500+"
6377
+ ]);
6378
+ const SubmitMarketingContactRequestSchema = object({
6379
+ fullName: string().trim().min(1, "Full name is required").max(200),
6380
+ workEmail: string().trim().email("Enter a valid email address").max(320),
6381
+ companySize: MarketingContactCompanySizeSchema,
6382
+ message: string().trim().min(1, "Message is required").max(5e3),
6383
+ /** Honeypot — must stay empty; bots that fill it are ignored silently. */
6384
+ companyWebsite: string().optional()
6385
+ });
6386
+ function isCredentialInput(value) {
6387
+ if (typeof value !== "object" || value === null) return false;
6388
+ const candidate = value;
6389
+ return typeof candidate.key === "string" && CredentialAuthKindSchema.safeParse(candidate.kind).success && candidate.schema instanceof ZodType;
6390
+ }
6391
+ const credentialInputSchema = custom((value) => isCredentialInput(value), "must be a credential requirement");
5672
6392
  function normalizeCredentialList(list) {
5673
6393
  return list.map((item) => toCredentialRequirement(item));
5674
6394
  }
@@ -5684,112 +6404,12 @@ function toCredentialRequirement(item) {
5684
6404
  ...item.tokenField !== void 0 ? { tokenField: item.tokenField } : {}
5685
6405
  };
5686
6406
  }
5687
- const OrganizationSlugErrorCodeSchema = _enum([
5688
- "slug_taken",
5689
- "slug_reserved",
5690
- "slug_invalid"
5691
- ]);
5692
- const SlugAvailabilityReasonSchema = _enum([
5693
- "taken",
5694
- "reserved",
5695
- "invalid"
5696
- ]);
5697
- const SlugAvailabilityResponseSchema = object({
5698
- slug: string(),
5699
- available: boolean(),
5700
- reason: SlugAvailabilityReasonSchema.optional(),
5701
- suggestion: OrganizationSlugSchema.optional()
5702
- });
5703
- object({
5704
- slug: string().trim().min(1),
5705
- excludeOrganizationId: string().min(1).optional()
5706
- });
5707
- const ProjectSlugAvailabilityReasonSchema = _enum(["taken", "invalid"]);
5708
- const ProjectSlugAvailabilityResponseSchema = object({
5709
- slug: string(),
5710
- available: boolean(),
5711
- reason: ProjectSlugAvailabilityReasonSchema.optional(),
5712
- suggestion: ProjectSlugSchema.optional()
5713
- });
5714
- object({
5715
- slug: string().trim().min(1),
5716
- excludeProjectId: string().min(1).optional()
5717
- });
5718
- const ProjectStatusSchema = _enum([
5719
- "inactive",
5720
- "starting",
5721
- "active",
5722
- "failed"
5723
- ]);
5724
- const OrganizationUserRoleSchema = _enum([
5725
- "owner",
5726
- "admin",
5727
- "builder"
5728
- ]);
5729
- const isoDateTime$5 = string().datetime();
5730
- const OrganizationSchema = object({
5731
- id: string(),
5732
- name: string(),
5733
- slug: OrganizationSlugSchema,
5734
- createdAt: isoDateTime$5,
5735
- updatedAt: isoDateTime$5
5736
- });
5737
- const ProjectSchema = object({
5738
- id: string(),
5739
- organizationId: string(),
5740
- name: string(),
5741
- slug: ProjectSlugSchema,
5742
- description: string().nullable(),
5743
- status: ProjectStatusSchema,
5744
- baseUrl: string().nullable(),
5745
- runtimeId: string().nullable(),
5746
- lastError: string().nullable(),
5747
- createdAt: isoDateTime$5,
5748
- updatedAt: isoDateTime$5
5749
- });
5750
- const UserOrganizationSchema = object({
5751
- organization: OrganizationSchema,
5752
- role: OrganizationUserRoleSchema
5753
- });
5754
- const ActiveOrganizationResponseSchema = object({ organization: UserOrganizationSchema.nullable() });
5755
- const ListOrganizationsResponseSchema = object({ organizations: array(UserOrganizationSchema) });
5756
- const CreateOrganizationRequestSchema = object({
5757
- name: string().trim().min(1),
5758
- /** Format-only at the wire boundary; reserved-name checks run in platform-database. */
5759
- slug: OrganizationSlugSchema.optional()
5760
- });
5761
- const UpdateOrganizationRequestSchema = object({
5762
- name: string().trim().min(1).optional(),
5763
- slug: ClaimableOrganizationSlugSchema.optional()
5764
- }).refine((data) => data.name !== void 0 || data.slug !== void 0, { message: "At least one field is required" });
5765
- const CreateOrganizationResponseSchema = object({ organization: UserOrganizationSchema });
5766
- const ListProjectsResponseSchema = object({ projects: array(ProjectSchema) });
5767
- const ProjectListMetricsSchema = object({
5768
- agentCount: number$1(),
5769
- workflowCount: number$1(),
5770
- skillCount: number$1(),
5771
- credentialCount: number$1(),
5772
- lastDeploymentAt: isoDateTime$5.nullable()
5773
- });
5774
- const ListProjectMetricsResponseSchema = object({ metrics: record(string(), ProjectListMetricsSchema) });
5775
- const CreateProjectRequestSchema = object({
5776
- name: string().trim().min(1),
5777
- description: string().trim().min(1).optional()
5778
- });
5779
- const UpdateProjectRequestSchema = object({
5780
- name: string().trim().min(1).optional(),
5781
- description: string().trim().optional(),
5782
- slug: ProjectSlugSchema.optional()
5783
- }).refine((data) => data.name !== void 0 || data.description !== void 0 || data.slug !== void 0, { message: "At least one field is required" });
5784
- const CreateProjectResponseSchema = object({ project: ProjectSchema });
5785
- const ProjectResponseSchema = object({ project: ProjectSchema });
5786
- const ProjectReachabilityResponseSchema = object({ reachable: boolean() });
5787
6407
  const ValidationErrorDetailSchema = object({
5788
6408
  path: string(),
5789
6409
  message: string()
5790
6410
  });
5791
6411
  /** Machine-readable codes returned in standard API error bodies. */
5792
- const ErrorResponseCodeSchema = OrganizationSlugErrorCodeSchema.or(_enum(["needs_org_selection"]));
6412
+ const ErrorResponseCodeSchema = OrganizationSlugErrorCodeSchema.or(_enum(["needs_org_selection", "org_unverified"]));
5793
6413
  /** Standard JSON error body returned by the HTTP API. */
5794
6414
  const ErrorResponseSchema = object({
5795
6415
  error: string(),
@@ -5849,13 +6469,16 @@ const ConnectProvidersResponseSchema = object({ providers: array(object({
5849
6469
  })) });
5850
6470
  const ConnectAuthorizeUrlResponseSchema = object({ url: string() });
5851
6471
  const QueuedRunResponseSchema = object({ runId: string() });
5852
- const QueuedAgentPromptResponseSchema = object({ sessionId: string() });
6472
+ const QueuedAgentPromptResponseSchema = object({
6473
+ sessionId: string(),
6474
+ runId: string()
6475
+ });
5853
6476
  object({
5854
6477
  workflows: array(string().min(1)).optional(),
5855
6478
  attachments: array(string().min(1)).optional()
5856
6479
  });
5857
6480
  const PollRunMultiResponseSchema = object({ results: array(object({
5858
- attachmentKey: string(),
6481
+ attachmentSlug: string(),
5859
6482
  workflowKey: string(),
5860
6483
  runId: string().optional(),
5861
6484
  body: unknown().optional(),
@@ -5879,6 +6502,33 @@ object({
5879
6502
  kind: RunSourceKindSchema,
5880
6503
  id: string().nullable()
5881
6504
  });
6505
+ const AgentTriggerOriginSchema = _enum(["project", "ephemeral"]);
6506
+ const AgentTriggerStatusSchema = _enum([
6507
+ "active",
6508
+ "disabled",
6509
+ "completed"
6510
+ ]);
6511
+ const AgentTriggerTypeSchema = _enum([
6512
+ "webhook",
6513
+ "cron",
6514
+ "poll"
6515
+ ]);
6516
+ const AgentTriggerSummaryListResponseSchema = array(object({
6517
+ id: string(),
6518
+ label: string(),
6519
+ name: string().nullable().optional(),
6520
+ description: string().nullable().optional(),
6521
+ type: AgentTriggerTypeSchema,
6522
+ schedule: string().nullable(),
6523
+ endpoint: string().nullable(),
6524
+ origin: AgentTriggerOriginSchema,
6525
+ prompt: string().nullable(),
6526
+ status: AgentTriggerStatusSchema,
6527
+ executionCount: number$1().int().nonnegative(),
6528
+ until: string().nullable(),
6529
+ attachmentId: string(),
6530
+ attachmentSlug: string()
6531
+ }));
5882
6532
  const WorkflowRunStatusSchema = _enum([
5883
6533
  "pending",
5884
6534
  "running",
@@ -5956,7 +6606,7 @@ _enum([
5956
6606
  object({ include: string().optional() });
5957
6607
  const TriggerRunDetailSchema = object({
5958
6608
  id: string(),
5959
- attachmentId: string(),
6609
+ triggerId: string(),
5960
6610
  attachmentSlug: string().nullable(),
5961
6611
  triggerType: _enum([
5962
6612
  "cron",
@@ -6038,6 +6688,10 @@ const AgentSessionSummarySchema = object({
6038
6688
  status: AgentSessionStatusSchema,
6039
6689
  source: RunSourceKindSchema,
6040
6690
  sourceId: string().nullable(),
6691
+ title: string().nullable(),
6692
+ ranByUserName: string().nullable(),
6693
+ gatewayPlatform: string().nullable(),
6694
+ triggerType: AgentTriggerTypeSchema.nullable(),
6041
6695
  createdAt: string(),
6042
6696
  updatedAt: string(),
6043
6697
  messageCount: number$1()
@@ -6091,6 +6745,12 @@ const AgentSessionDetailResponseSchema = object({
6091
6745
  events: array(AgentEventSchema),
6092
6746
  trace: TraceResponseSchema.nullable()
6093
6747
  });
6748
+ object({ sinceSeq: number().int().min(0).optional() });
6749
+ const AgentSessionChatStateResponseSchema = object({
6750
+ status: AgentSessionStatusSchema,
6751
+ messages: array(record(string(), unknown())),
6752
+ live: record(string(), unknown()).nullable()
6753
+ });
6094
6754
  const SlackGatewayModeSchema = _enum([
6095
6755
  "mention",
6096
6756
  "channel",
@@ -6205,7 +6865,7 @@ const HistoryTraceTriggerSchema = object({
6205
6865
  workflowKey: string().optional(),
6206
6866
  agentKey: string().optional(),
6207
6867
  attachmentId: string().nullable().optional(),
6208
- attachmentKey: string().nullable().optional(),
6868
+ attachmentSlug: string().nullable().optional(),
6209
6869
  route: string().optional(),
6210
6870
  sourcePath: string().nullable().optional()
6211
6871
  }).nullable();
@@ -6245,7 +6905,7 @@ const HistoryRunDetailSchema = discriminatedUnion("kind", [object({
6245
6905
  }),
6246
6906
  trigger: object({
6247
6907
  id: string(),
6248
- attachmentKey: string().nullable(),
6908
+ attachmentSlug: string().nullable(),
6249
6909
  triggerType: string(),
6250
6910
  sourcePath: string().nullable(),
6251
6911
  payload: unknown().nullable(),
@@ -6277,7 +6937,7 @@ const HistoryRunDetailSchema = discriminatedUnion("kind", [object({
6277
6937
  }),
6278
6938
  gateway: object({
6279
6939
  threadId: string(),
6280
- attachmentKey: string().nullable()
6940
+ attachmentSlug: string().nullable()
6281
6941
  }).nullable(),
6282
6942
  messages: array(record(string(), unknown())),
6283
6943
  trace: HistoryTraceSchema.nullable(),
@@ -6306,7 +6966,9 @@ object({
6306
6966
  });
6307
6967
  const CredentialInstanceRecordSchema = object({
6308
6968
  id: string(),
6309
- key: string(),
6969
+ appSlug: string(),
6970
+ slug: string(),
6971
+ name: string().nullable(),
6310
6972
  scopeType: CredentialScopeTypeSchema,
6311
6973
  scopeId: string().nullable(),
6312
6974
  label: string().nullable(),
@@ -6316,6 +6978,8 @@ const CredentialInstanceRecordSchema = object({
6316
6978
  const CredentialInstanceListResponseSchema = object({ instances: array(CredentialInstanceRecordSchema) });
6317
6979
  const CreateCredentialInstanceBodySchema = object({
6318
6980
  key: string().min(1),
6981
+ slug: string().min(1).optional(),
6982
+ name: string().nullable().optional(),
6319
6983
  scopeType: CredentialScopeTypeSchema,
6320
6984
  scopeId: string().nullable().optional(),
6321
6985
  label: string().nullable().optional(),
@@ -6323,6 +6987,8 @@ const CreateCredentialInstanceBodySchema = object({
6323
6987
  value: record(string(), unknown()).refine((value) => Object.keys(value).length > 0, { message: "value must be a non-empty object" })
6324
6988
  });
6325
6989
  const UpdateCredentialInstanceBodySchema = object({
6990
+ slug: string().min(1).optional(),
6991
+ name: string().nullable().optional(),
6326
6992
  label: string().nullable().optional(),
6327
6993
  isDefault: boolean().optional(),
6328
6994
  value: record(string(), unknown()).refine((value) => Object.keys(value).length > 0, { message: "value must be a non-empty object" }).optional()
@@ -6332,6 +6998,18 @@ const TriggerRunTypeSchema = _enum([
6332
6998
  "webhook",
6333
6999
  "poll"
6334
7000
  ]);
7001
+ const TriggerRunOutcomeSchema = _enum([
7002
+ "dispatched",
7003
+ "skipped",
7004
+ "failed"
7005
+ ]);
7006
+ const TriggerRunReasonSchema = _enum([
7007
+ "filter_rejected",
7008
+ "transform_undefined",
7009
+ "invalid_payload",
7010
+ "source_error",
7011
+ "handler_error"
7012
+ ]);
6335
7013
  const TriggerRunWorkflowSummarySchema = object({
6336
7014
  id: string(),
6337
7015
  status: WorkflowRunStatusSchema,
@@ -6346,15 +7024,23 @@ const TriggerRunSummarySchema = object({
6346
7024
  triggerType: TriggerRunTypeSchema,
6347
7025
  triggeredAt: string(),
6348
7026
  sourcePath: string().nullable(),
6349
- workflowRun: TriggerRunWorkflowSummarySchema.nullable(),
6350
- agentSession: TriggerRunAgentSessionSummarySchema.nullable()
7027
+ outcome: TriggerRunOutcomeSchema,
7028
+ reason: TriggerRunReasonSchema.nullable(),
7029
+ detail: string().nullable(),
7030
+ /** Workflow runs dispatched by this fire (fan-out → one per matched workflow attachment). */
7031
+ workflowRuns: array(TriggerRunWorkflowSummarySchema),
7032
+ /** Agent sessions dispatched by this fire (fan-out → one per matched agent attachment). */
7033
+ agentSessions: array(TriggerRunAgentSessionSummarySchema)
6351
7034
  });
6352
7035
  const TriggerRunRecordSchema = object({
6353
7036
  id: string(),
6354
- attachmentId: string(),
7037
+ triggerId: string(),
6355
7038
  attachmentSlug: string(),
6356
7039
  triggerType: TriggerRunTypeSchema,
6357
7040
  sourcePath: string().nullable(),
7041
+ outcome: TriggerRunOutcomeSchema,
7042
+ reason: TriggerRunReasonSchema.nullable(),
7043
+ detail: string().nullable(),
6358
7044
  payload: unknown().nullable(),
6359
7045
  triggeredAt: string()
6360
7046
  });
@@ -6389,9 +7075,16 @@ const TriggerTypeSchema = _enum([
6389
7075
  "cron"
6390
7076
  ]);
6391
7077
  const TriggerTargetKindSchema = _enum(["workflow", "agent"]);
7078
+ const TriggerStatusSchema = _enum(["active", "disabled"]);
7079
+ const TriggerAttachmentStatusSchema = _enum(["active", "disabled"]);
6392
7080
  const TriggerListItemSchema = object({
6393
- key: string(),
7081
+ slug: string(),
7082
+ name: string().optional(),
7083
+ description: string().optional(),
6394
7084
  type: TriggerTypeSchema,
7085
+ status: TriggerStatusSchema.optional(),
7086
+ schedule: string().nullable().optional(),
7087
+ sourcePath: string().optional(),
6395
7088
  route: string().optional(),
6396
7089
  webhookUrl: string().url().optional(),
6397
7090
  targetKind: TriggerTargetKindSchema,
@@ -6401,6 +7094,136 @@ const TriggerListItemSchema = object({
6401
7094
  const TriggerListResponseSchema = object({ triggers: array(TriggerListItemSchema) });
6402
7095
  object({ endpoint: string().min(1).optional() });
6403
7096
  const TriggerDetailResponseSchema = TriggerListItemSchema;
7097
+ const TriggerAssignmentSchema = object({
7098
+ kind: TriggerTargetKindSchema,
7099
+ id: string(),
7100
+ slug: string(),
7101
+ name: string(),
7102
+ attachmentId: string(),
7103
+ attachmentSlug: string(),
7104
+ status: TriggerAttachmentStatusSchema,
7105
+ disabledAt: string().nullable()
7106
+ });
7107
+ /** Status of the downstream run/session a dispatched fire produced. */
7108
+ const WorkspaceTriggerRunStatusSchema = _enum([
7109
+ "completed",
7110
+ "running",
7111
+ "failed"
7112
+ ]);
7113
+ /**
7114
+ * Categorical reason a fire was recorded but produced no downstream run. These map
7115
+ * from the persisted `trigger_runs.reason` enum onto the labels the UI renders.
7116
+ */
7117
+ const WorkspaceTriggerSkipReasonSchema = _enum([
7118
+ "filtered",
7119
+ "no_new_data",
7120
+ "transform_undefined"
7121
+ ]);
7122
+ /**
7123
+ * A single downstream run/session a dispatched fire produced. A fan-out fire can
7124
+ * dispatch several of these (multiple workflows and/or agents off one source event).
7125
+ */
7126
+ const WorkspaceTriggerRunTargetSchema = discriminatedUnion("kind", [object({
7127
+ kind: literal("workflow"),
7128
+ runId: string(),
7129
+ workflowId: string(),
7130
+ status: WorkspaceTriggerRunStatusSchema,
7131
+ name: string()
7132
+ }), object({
7133
+ kind: literal("agent"),
7134
+ sessionId: string(),
7135
+ agentId: string(),
7136
+ status: WorkspaceTriggerRunStatusSchema,
7137
+ name: string()
7138
+ })]);
7139
+ /**
7140
+ * Outcome of a single trigger fire — drives the run-history row presentation. Every
7141
+ * recorded fire either dispatched one or more workflow/agent targets, was skipped by
7142
+ * trigger logic, or failed before any target ran.
7143
+ */
7144
+ const WorkspaceTriggerRunOutcomeSchema = discriminatedUnion("kind", [
7145
+ object({
7146
+ kind: literal("dispatched"),
7147
+ targets: array(WorkspaceTriggerRunTargetSchema)
7148
+ }),
7149
+ object({
7150
+ kind: literal("skipped"),
7151
+ reason: WorkspaceTriggerSkipReasonSchema
7152
+ }),
7153
+ object({
7154
+ kind: literal("failed"),
7155
+ error: string()
7156
+ })
7157
+ ]);
7158
+ const WorkspaceTriggerSummarySchema = object({
7159
+ /** `triggers.id` UUID for the trigger row. */
7160
+ id: string(),
7161
+ slug: string(),
7162
+ name: string(),
7163
+ description: string().nullable(),
7164
+ type: TriggerTypeSchema,
7165
+ status: TriggerStatusSchema,
7166
+ projectId: string(),
7167
+ projectName: string(),
7168
+ /** Webhook ingress URL (webhook triggers only). */
7169
+ webhookUrl: string().nullable(),
7170
+ /** Cron expression or poll cadence label (cron/poll triggers only). */
7171
+ schedule: string().nullable(),
7172
+ /** Workflows + agents currently bound to this source. */
7173
+ assignments: array(TriggerAssignmentSchema),
7174
+ lastFiredAt: string().nullable(),
7175
+ fireCount: number$1().int().nonnegative(),
7176
+ createdAt: string()
7177
+ });
7178
+ const WorkspaceTriggerDetailSchema = WorkspaceTriggerSummarySchema.extend({
7179
+ /** Source module file path, relative to the project root. */
7180
+ sourcePath: string() });
7181
+ const WorkspaceTriggerListResponseSchema = array(WorkspaceTriggerSummarySchema);
7182
+ const WorkspaceTriggerRunListResponseSchema = object({
7183
+ items: array(object({
7184
+ id: string(),
7185
+ triggerType: TriggerTypeSchema,
7186
+ triggeredAt: string(),
7187
+ /** Poll/webhook source path or endpoint that produced the fire. */
7188
+ sourcePath: string().nullable(),
7189
+ outcome: WorkspaceTriggerRunOutcomeSchema
7190
+ })),
7191
+ nextCursor: string().nullable()
7192
+ });
7193
+ const WorkspaceTriggerFileSchema = object({
7194
+ path: string(),
7195
+ contents: string()
7196
+ });
7197
+ /** LLM-generated markdown overview envelope served to the web dashboard. */
7198
+ const WorkspaceTriggerOverviewSchema = object({
7199
+ status: _enum([
7200
+ "generating",
7201
+ "ready",
7202
+ "failed"
7203
+ ]),
7204
+ markdown: string(),
7205
+ hash: string(),
7206
+ generatedAt: string().nullable(),
7207
+ model: string()
7208
+ });
7209
+ /** Inputs the worker feeds the LLM to generate a trigger overview. */
7210
+ const TriggerOverviewInputSchema = object({
7211
+ name: string(),
7212
+ description: string().nullable(),
7213
+ type: TriggerTypeSchema,
7214
+ schedule: string().nullable(),
7215
+ sourcePath: string(),
7216
+ sourceContents: string(),
7217
+ assignments: array(TriggerAssignmentSchema)
7218
+ });
7219
+ object({
7220
+ triggerId: string(),
7221
+ projectId: string(),
7222
+ triggerHash: string(),
7223
+ model: string(),
7224
+ input: TriggerOverviewInputSchema
7225
+ });
7226
+ object({ enabled: boolean() });
6404
7227
  const OrganizationMemberRoleSchema = _enum([
6405
7228
  "owner",
6406
7229
  "admin",
@@ -6424,7 +7247,7 @@ const OrganizationMemberSchema = object({
6424
7247
  joinedAt: isoDateTime$4.optional(),
6425
7248
  lastActiveAt: isoDateTime$4.nullable().optional()
6426
7249
  });
6427
- const ListOrganizationMembersResponseSchema = object({ members: array(OrganizationMemberSchema) });
7250
+ const ListOrganizationMembersResponseSchema = array(OrganizationMemberSchema);
6428
7251
  const InviteOrganizationMembersRequestSchema = object({
6429
7252
  emails: array(string().trim().email()).min(1),
6430
7253
  role: InvitableOrganizationMemberRoleSchema
@@ -6435,22 +7258,22 @@ const InviteOrganizationMemberResultStatusSchema = _enum([
6435
7258
  "pending",
6436
7259
  "invalid"
6437
7260
  ]);
6438
- const InviteOrganizationMembersResponseSchema = object({ results: array(object({
7261
+ const InviteOrganizationMembersResponseSchema = array(object({
6439
7262
  email: string(),
6440
7263
  status: InviteOrganizationMemberResultStatusSchema,
6441
7264
  invitationId: string().optional()
6442
- })) });
7265
+ }));
6443
7266
  const UpdateOrganizationMemberRequestSchema = object({ role: InvitableOrganizationMemberRoleSchema });
6444
- const UpdateOrganizationMemberResponseSchema = object({ member: OrganizationMemberSchema });
6445
- const ListOrganizationInvitationsResponseSchema = object({ invitations: array(object({
7267
+ const UpdateOrganizationMemberResponseSchema = OrganizationMemberSchema;
7268
+ const ListOrganizationInvitationsResponseSchema = array(object({
6446
7269
  id: string(),
6447
7270
  organizationName: string(),
6448
7271
  organizationSlug: OrganizationSlugSchema,
6449
7272
  invitedByName: string().optional(),
6450
7273
  invitedByEmail: string().email().optional(),
6451
7274
  role: OrganizationMemberRoleSchema
6452
- })) });
6453
- const AcceptOrganizationInvitationResponseSchema = object({ organization: UserOrganizationSchema });
7275
+ }));
7276
+ const AcceptOrganizationInvitationResponseSchema = UserOrganizationSchema;
6454
7277
  const DeclineOrganizationInvitationResponseSchema = object({ success: literal(true) });
6455
7278
  const isoDateTime$3 = string().datetime();
6456
7279
  const ApiKeyCreatorSchema = object({
@@ -6469,7 +7292,7 @@ const ApiKeySummarySchema = object({
6469
7292
  createdBy: ApiKeyCreatorSchema,
6470
7293
  isCreatedByCurrentUser: boolean()
6471
7294
  });
6472
- const ListApiKeysResponseSchema = object({ apiKeys: array(ApiKeySummarySchema) });
7295
+ const ListApiKeysResponseSchema = array(ApiKeySummarySchema);
6473
7296
  const CreateApiKeyRequestSchema = object({ name: string().trim().min(1).max(128) });
6474
7297
  const CreateApiKeyResponseSchema = ApiKeySummarySchema.extend({ secret: string() });
6475
7298
  const ProjectUserRoleSchema = _enum(["admin", "builder"]);
@@ -6487,7 +7310,7 @@ const ProjectMemberSchema = object({
6487
7310
  createdAt: isoDateTime$2,
6488
7311
  isCurrentUser: boolean().optional()
6489
7312
  });
6490
- const ListProjectMembersResponseSchema = object({ members: array(ProjectMemberSchema) });
7313
+ const ListProjectMembersResponseSchema = array(ProjectMemberSchema);
6491
7314
  const InviteProjectMembersRequestSchema = object({
6492
7315
  emails: array(string().trim().email()).min(1),
6493
7316
  role: ProjectUserRoleSchema
@@ -6498,12 +7321,12 @@ const InviteProjectMemberResultStatusSchema = _enum([
6498
7321
  "not_org_member",
6499
7322
  "invalid"
6500
7323
  ]);
6501
- const InviteProjectMembersResponseSchema = object({ results: array(object({
7324
+ const InviteProjectMembersResponseSchema = array(object({
6502
7325
  email: string(),
6503
7326
  status: InviteProjectMemberResultStatusSchema
6504
- })) });
7327
+ }));
6505
7328
  const UpdateProjectMemberRequestSchema = object({ role: ProjectUserRoleSchema });
6506
- const UpdateProjectMemberResponseSchema = object({ member: ProjectMemberSchema });
7329
+ const UpdateProjectMemberResponseSchema = ProjectMemberSchema;
6507
7330
  const ProjectSettingsSchema = object({
6508
7331
  description: string(),
6509
7332
  defaultRole: ProjectUserRoleSchema,
@@ -6514,7 +7337,7 @@ const UpdateProjectSettingsRequestSchema = object({
6514
7337
  defaultRole: ProjectUserRoleSchema.optional(),
6515
7338
  invitePermission: ProjectInvitePermissionSchema.optional()
6516
7339
  }).refine((data) => data.description !== void 0 || data.defaultRole !== void 0 || data.invitePermission !== void 0, { message: "At least one field is required" });
6517
- const ProjectSettingsResponseSchema = object({ settings: ProjectSettingsSchema });
7340
+ const ProjectSettingsResponseSchema = ProjectSettingsSchema;
6518
7341
  /** Custom avatar override; null means fall back to OAuth `users.image`. */
6519
7342
  const UserAvatarSchema = object({ url: url().nullable() });
6520
7343
  const UserAvatarPatchSchema = object({
@@ -6626,7 +7449,7 @@ const DownloadActiveProjectArtifactResponseSchema = object({
6626
7449
  downloadUrl: string().url(),
6627
7450
  expiresInSeconds: number$1().int().positive()
6628
7451
  });
6629
- const ListProjectDeploymentsResponseSchema = object({ deployments: array(object({
7452
+ const ListProjectDeploymentsResponseSchema = array(object({
6630
7453
  id: string(),
6631
7454
  projectId: string(),
6632
7455
  version: number$1().int().positive(),
@@ -6635,7 +7458,7 @@ const ListProjectDeploymentsResponseSchema = object({ deployments: array(object(
6635
7458
  deployedByAvatarUrl: string().optional(),
6636
7459
  createdAt: isoDateTime$1,
6637
7460
  active: boolean()
6638
- })) });
7461
+ }));
6639
7462
  const optionalCount = number$1().int().nonnegative().nullable().optional();
6640
7463
  const optionalTimestamp = string().nullable().optional();
6641
7464
  const AgentSummarySchema = object({
@@ -6647,8 +7470,13 @@ const AgentSummarySchema = object({
6647
7470
  description: string().optional(),
6648
7471
  sourcePath: string().min(1).optional(),
6649
7472
  model: string().optional(),
7473
+ systemPrompt: string().optional(),
6650
7474
  toolCount: optionalCount,
6651
7475
  credentialCount: optionalCount,
7476
+ apps: array(object({
7477
+ id: string(),
7478
+ label: string()
7479
+ })).optional(),
6652
7480
  lastRunAt: optionalTimestamp
6653
7481
  });
6654
7482
  const WorkflowSummarySchema = object({
@@ -6761,7 +7589,15 @@ object({
6761
7589
  })),
6762
7590
  generatedAt: isoDateTime
6763
7591
  });
7592
+ const ListAgentMemoryFilesResponseSchema = object({ files: array(object({
7593
+ id: string(),
7594
+ path: string().min(1)
7595
+ })) });
7596
+ const ListAgentWorkspaceFilesResponseSchema = object({ files: array(object({
7597
+ id: string(),
7598
+ path: string().min(1)
7599
+ })) });
6764
7600
  //#endregion
6765
- 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 };
7601
+ export { HistoryRunListQuerySchema as $, optional as $n, TriggerListResponseSchema as $t, CreateCustomAppRequestSchema as A, listenPortFromPublicUrl as An, PresignUserAvatarResponseSchema as At, CredentialConsumerListQuerySchema as B, _enum as Bn, RecentResourceListResponseSchema as Bt, ConnectAuthorizeUrlResponseSchema as C, WorkspaceTriggerDetailSchema as Cn, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS as Ct, CreateCredentialInstanceBodySchema as D, WorkspaceTriggerRunListResponseSchema as Dn, PresignProjectSourceRequestSchema as Dt, CreateApiKeyResponseSchema as E, WorkspaceTriggerOverviewSchema as En, PresignOrgLogoResponseSchema as Et, CreateProjectRequestSchema as F, parseStoredRouteManifest as Fn, PromptInputSchema as Ft, DownloadActiveProjectArtifactResponseSchema as G, boolean as Gn, StartKeystrokeConnectionResultSchema as Gt, CredentialInstanceListResponseSchema as H, _null as Hn, SkillSummaryListResponseSchema as Ht, CreateProjectResponseSchema as I, resolvePublicPlatformOrigin as In, PromptResponseSchema as It, GetCredentialResponseSchema as J, intersection as Jn, StartOAuthConnectionInputSchema as Jt, ErrorResponseSchema as K, custom as Kn, StartMcpOAuthConnectionInputSchema as Kt, CredentialAssignmentListQuerySchema as L, slugifyAppName as Ln, QueuedAgentPromptResponseSchema as Lt, CreateOrganizationRequestSchema as M, originFromPublicUrl as Mn, ProjectResponseSchema as Mt, CreateOrganizationResponseSchema as N, parseAppSlug as Nn, ProjectSettingsResponseSchema as Nt, CreateCredentialsRequestSchema as O, buildConnectDeeplink as On, PresignProjectSourceResponseSchema as Ot, CreateProjectArtifactResponseSchema as P, parseErrorResponse as Pn, ProjectSlugAvailabilityResponseSchema as Pt, HistoryRunDetailResponseSchema as Q, object as Qn, TriggerDetailResponseSchema as Qt, CredentialAssignmentListResponseSchema as R, number as Rn, QueuedRunResponseSchema as Rt, CompleteProjectArtifactResponseSchema as S, WorkflowSummaryListResponseSchema as Sn, OrganizationSidebarBrandingSchema as St, CreateApiKeyRequestSchema as T, WorkspaceTriggerListResponseSchema as Tn, PresignOrgLogoRequestSchema as Tt, CredentialInstanceRecordSchema as U, any as Un, SlugAvailabilityResponseSchema as Ut, CredentialConsumerListResponseSchema as V, _function as Vn, SkillSummaryDetailResponseSchema as Vt, DeclineOrganizationInvitationResponseSchema as W, array as Wn, StartKeystrokeConnectionInputSchema as Wt, HealthResponseSchema as X, looseObject as Xn, SubmitMarketingContactRequestSchema as Xt, GetCustomAppResponseSchema as Y, literal as Yn, StartOAuthConnectionResultSchema as Yt, HistoryRunCancelResponseSchema as Z, number$1 as Zn, SubmitTeamRequestRequestSchema as Zt, ChannelAccountListResponseSchema as _, UserPreferencesPatchSchema as _n, ListProjectMetricsResponseSchema as _t, AgentSessionDetailResponseSchema as a, UpdateOrganizationMemberRequestSchema as an, url as ar, LOCAL_PLATFORM_ORIGIN as at, ChannelDirectoryListResponseSchema as b, WorkflowRunListResponseSchema as bn, OpenApiDiscoverResponseSchema as bt, AgentSummaryListResponseSchema as c, UpdateProjectMemberRequestSchema as cn, NEVER as cr, ListApiKeysResponseSchema as ct, AssignCredentialBodySchema as d, UpdateProjectSettingsRequestSchema as dn, ListOrganizationInvitationsResponseSchema as dt, TriggerRunDetailResponseSchema as en, preprocess as er, HistoryRunListResponseSchema as et, BindChannelBodySchema as f, UploadProjectSourceManifestRequestSchema as fn, ListOrganizationMembersResponseSchema as ft, CatalogAppsPageResponseSchema as g, UserAvatarSchema as gn, ListProjectMembersResponseSchema as gt, CatalogAppDetailResponseSchema as h, UserAvatarPatchSchema as hn, ListProjectFilesResponseSchema as ht, AgentSessionChatStateResponseSchema as i, UpdateCredentialRequestSchema as in, unknown as ir, InviteProjectMembersResponseSchema as it, CreateCustomAppResponseSchema as j, normalizeCredentialList as jn, ProjectReachabilityResponseSchema as jt, CreateCredentialsResponseSchema as k, credentialInputSchema as kn, PresignUserAvatarRequestSchema as kt, AgentTriggerSummaryListResponseSchema as l, UpdateProjectMemberResponseSchema as ln, ListAppsResponseSchema as lt, CatalogActionsPageResponseSchema as m, UpsertGatewayAttachmentBodySchema as mn, ListProjectDeploymentsResponseSchema as mt, AcceptOrganizationInvitationResponseSchema as n, UpdateChannelBindingBodySchema as nn, string as nr, InviteOrganizationMembersResponseSchema as nt, AgentSessionListResponseSchema as o, UpdateOrganizationMemberResponseSchema as on, datetime as or, ListAgentMemoryFilesResponseSchema as ot, CatalogActionDetailResponseSchema as p, UploadProjectSourceResponseSchema as pn, ListOrganizationsResponseSchema as pt, GatewayAttachmentRecordSchema as q, discriminatedUnion as qn, StartMcpOAuthConnectionResultSchema as qt, ActiveOrganizationResponseSchema as r, UpdateCredentialInstanceBodySchema as rn, union as rr, InviteProjectMembersRequestSchema as rt, AgentSummaryDetailResponseSchema as s, UpdateOrganizationRequestSchema as sn, toJSONSchema as sr, ListAgentWorkspaceFilesResponseSchema as st, ACTIVE_ORG_HEADER as t, TriggerRunListResponseSchema as tn, record as tr, InviteOrganizationMembersRequestSchema as tt, AppSlugAvailabilityResponseSchema as u, UpdateProjectRequestSchema as un, ListCredentialsResponseSchema as ut, ChannelConnectionListResponseSchema as v, UserPreferencesSchema as vn, ListProjectsResponseSchema as vt, ConnectProvidersResponseSchema as w, WorkspaceTriggerFileSchema as wn, PollRunResponseSchema as wt, ChannelPlatformSchema as x, WorkflowSummaryDetailResponseSchema as xn, OrganizationSidebarBrandingPatchSchema as xt, ChannelConnectionSchema as y, WorkflowRunDetailResponseSchema as yn, McpDiscoverResponseSchema as yt, CredentialAssignmentRecordSchema as z, ZodType as zn, ROUTE_MANIFEST_REL_PATH as zt };
6766
7602
 
6767
- //# sourceMappingURL=dist-C47GdlWY.mjs.map
7603
+ //# sourceMappingURL=dist-H53GUsol.mjs.map