kenso 0.1.148 → 0.1.149

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/kenso.js CHANGED
@@ -3389,7 +3389,7 @@ var VERSION;
3389
3389
  var init_version = __esm({
3390
3390
  "src/core/version.ts"() {
3391
3391
  "use strict";
3392
- VERSION = true ? "0.1.148" : "0.0.0-dev";
3392
+ VERSION = true ? "0.1.149" : "0.0.0-dev";
3393
3393
  }
3394
3394
  });
3395
3395
 
@@ -4702,9 +4702,9 @@ async function readRun(dir3) {
4702
4702
  return null;
4703
4703
  }
4704
4704
  if (!raw) return null;
4705
- const { runId, command: command87, createdAt, status } = raw;
4705
+ const { runId, command: command88, createdAt, status } = raw;
4706
4706
  if (typeof runId !== "string" || !RUN_ID_PATTERN.test(runId)) return null;
4707
- if (typeof command87 !== "string" || typeof createdAt !== "string") return null;
4707
+ if (typeof command88 !== "string" || typeof createdAt !== "string") return null;
4708
4708
  if (typeof status !== "string" || !STATUSES.includes(status)) return null;
4709
4709
  let chunksDone = chunkList(raw.chunksDone) ?? [];
4710
4710
  try {
@@ -4715,7 +4715,7 @@ async function readRun(dir3) {
4715
4715
  const record3 = {
4716
4716
  ...raw,
4717
4717
  runId,
4718
- command: command87,
4718
+ command: command88,
4719
4719
  args: asRecord3(raw.args) ?? {},
4720
4720
  createdAt,
4721
4721
  status,
@@ -4775,11 +4775,11 @@ async function loadRun(runId, env = process.env) {
4775
4775
  }
4776
4776
  return run;
4777
4777
  }
4778
- async function findIdentical(command87, args, inputSha256, env, workspaceId, anyWorkspace = false) {
4778
+ async function findIdentical(command88, args, inputSha256, env, workspaceId, anyWorkspace = false) {
4779
4779
  const identity = argsIdentity(args);
4780
4780
  const runs = await listRuns(env);
4781
4781
  return runs.filter(
4782
- (run) => run.command === command87 && (run.inputSha256 || void 0) === (inputSha256 || void 0) && (anyWorkspace || (run.workspaceId || void 0) === (workspaceId || void 0)) && argsIdentity(run.args) === identity
4782
+ (run) => run.command === command88 && (run.inputSha256 || void 0) === (inputSha256 || void 0) && (anyWorkspace || (run.workspaceId || void 0) === (workspaceId || void 0)) && argsIdentity(run.args) === identity
4783
4783
  );
4784
4784
  }
4785
4785
  function isOtherLiveProcess(pid) {
@@ -8305,8 +8305,8 @@ function idValue(value, field) {
8305
8305
  function shellQuote3(arg) {
8306
8306
  return /^[A-Za-z0-9_./:=@%+,-]+$/.test(arg) ? arg : `'${arg.replace(/'/g, `'\\''`)}'`;
8307
8307
  }
8308
- function commandLine2(ctx, command87, args, extra = []) {
8309
- const parts2 = ["kenso", ...command87.split(" "), ...(args.positionals ?? []).map(shellQuote3)];
8308
+ function commandLine2(ctx, command88, args, extra = []) {
8309
+ const parts2 = ["kenso", ...command88.split(" "), ...(args.positionals ?? []).map(shellQuote3)];
8310
8310
  for (const [name, value] of Object.entries(args.flags)) {
8311
8311
  if (value === void 0 || value === false) continue;
8312
8312
  if (value === true) parts2.push(`--${name}`);
@@ -8619,9 +8619,9 @@ function stringFlag2(flags, name) {
8619
8619
  const text4 = value.trim();
8620
8620
  return text4 === "" ? void 0 : text4;
8621
8621
  }
8622
- function requireFlag(flags, name, command87, hint) {
8622
+ function requireFlag(flags, name, command88, hint) {
8623
8623
  const value = stringFlag2(flags, name);
8624
- if (value === void 0) throw usageError(`--${name} is required for ${command87}.`, { field: name, next: `${command87} --help`, ...hint ? { hint } : {} });
8624
+ if (value === void 0) throw usageError(`--${name} is required for ${command88}.`, { field: name, next: `${command88} --help`, ...hint ? { hint } : {} });
8625
8625
  return value;
8626
8626
  }
8627
8627
  function positiveId(value) {
@@ -8630,8 +8630,8 @@ function positiveId(value) {
8630
8630
  const id = Number(text4);
8631
8631
  return Number.isSafeInteger(id) && id > 0 ? id : void 0;
8632
8632
  }
8633
- function idFlag(flags, name, command87) {
8634
- const raw = requireFlag(flags, name, command87);
8633
+ function idFlag(flags, name, command88) {
8634
+ const raw = requireFlag(flags, name, command88);
8635
8635
  const id = positiveId(raw);
8636
8636
  if (id === void 0) throw usageError(`--${name} must be a positive whole number (got "${raw}").`, { field: name });
8637
8637
  return id;
@@ -8651,8 +8651,8 @@ function isDryRun(ctx) {
8651
8651
  function shellQuote4(value) {
8652
8652
  return /^[A-Za-z0-9_\-.,:/@=+%]+$/.test(value) ? value : `'${value.replace(/'/g, `'\\''`)}'`;
8653
8653
  }
8654
- function sameCommand2(command87, flags, ctx, extra = []) {
8655
- const parts2 = [command87];
8654
+ function sameCommand2(command88, flags, ctx, extra = []) {
8655
+ const parts2 = [command88];
8656
8656
  for (const [name, value] of Object.entries(flags)) {
8657
8657
  if (value === void 0 || value === false) continue;
8658
8658
  if (value === true) parts2.push(`--${name}`);
@@ -8884,12 +8884,12 @@ function filterBody(flags) {
8884
8884
  }
8885
8885
  return parsed2;
8886
8886
  }
8887
- function targetBody(flags, target2, command87) {
8887
+ function targetBody(flags, target2, command88) {
8888
8888
  const ids2 = idList(flags, "ids");
8889
8889
  const filter = filterBody(flags);
8890
8890
  const everything = flags.all === true;
8891
8891
  if (ids2 !== void 0 === (filter !== void 0 || everything)) {
8892
- throw usageError(`Name the ${target2.plural} one way: --ids, --filter, or --all for every ${target2.noun} in the workspace.`, { field: "ids", next: `${command87} --help` });
8892
+ throw usageError(`Name the ${target2.plural} one way: --ids, --filter, or --all for every ${target2.noun} in the workspace.`, { field: "ids", next: `${command88} --help` });
8893
8893
  }
8894
8894
  const exclude = idList(flags, "exclude-ids");
8895
8895
  if (exclude !== void 0 && ids2 !== void 0) throw usageError("--exclude-ids goes with --filter or --all.", { field: "exclude-ids" });
@@ -8910,14 +8910,14 @@ function tagSet(flags) {
8910
8910
  return set2;
8911
8911
  }
8912
8912
  function requestBody(flags, target2, dryRun2) {
8913
- const command87 = `kenso ${target2.resource} bulk-update`;
8913
+ const command88 = `kenso ${target2.resource} bulk-update`;
8914
8914
  const pairs = Array.isArray(flags.set) ? flags.set : typeof flags.set === "string" ? [flags.set] : [];
8915
8915
  const tags = target2.tags ? tagSet(flags) : {};
8916
8916
  if (pairs.length === 0 && Object.keys(tags).length === 0) {
8917
- throw usageError(`--set${target2.tags ? " or --add-tag" : ""} is required for ${command87}.`, { field: "set", hint: "For example --set stage=engaged.", next: `${command87} --help` });
8917
+ throw usageError(`--set${target2.tags ? " or --add-tag" : ""} is required for ${command88}.`, { field: "set", hint: "For example --set stage=engaged.", next: `${command88} --help` });
8918
8918
  }
8919
8919
  return {
8920
- ...targetBody(flags, target2, command87),
8920
+ ...targetBody(flags, target2, command88),
8921
8921
  set: { ...parseSet(pairs, target2.aliases, target2.textFields), ...tags },
8922
8922
  ...dryRun2 ? { dryRun: true } : {},
8923
8923
  ...flags["overwrite-pinned"] === true ? { overwritePinned: true } : {}
@@ -8983,7 +8983,7 @@ function bulkUpdateCommand(target2) {
8983
8983
  };
8984
8984
  }
8985
8985
  function bulkDeleteCommand(target2) {
8986
- const command87 = `kenso ${target2.resource} bulk-delete`;
8986
+ const command88 = `kenso ${target2.resource} bulk-delete`;
8987
8987
  return {
8988
8988
  resource: target2.resource,
8989
8989
  action: "bulk-delete",
@@ -9007,7 +9007,7 @@ function bulkDeleteCommand(target2) {
9007
9007
  beta: { featureGates: { all: target2.featureGates } },
9008
9008
  operationIds: [`${target2.resource}.bulk-delete`, "changes.get"],
9009
9009
  dryRun: true,
9010
- run: (ctx, { flags }) => runChange(ctx, flags, `/v1/${target2.resource}/bulk-delete`, (dryRun2) => ({ ...targetBody(flags, target2, command87), dryRun: dryRun2 }))
9010
+ run: (ctx, { flags }) => runChange(ctx, flags, `/v1/${target2.resource}/bulk-delete`, (dryRun2) => ({ ...targetBody(flags, target2, command88), dryRun: dryRun2 }))
9011
9011
  };
9012
9012
  }
9013
9013
  async function runChange(ctx, flags, path, body2) {
@@ -11043,8 +11043,8 @@ var init_browser_login = __esm({
11043
11043
  defaultDeps = {
11044
11044
  sleep: (ms, signal) => delay5(ms, void 0, signal ? { signal } : void 0),
11045
11045
  now: () => Date.now(),
11046
- spawn: (command87, args) => {
11047
- const child = nodeSpawn(command87, args, { detached: true, stdio: "ignore" });
11046
+ spawn: (command88, args) => {
11047
+ const child = nodeSpawn(command88, args, { detached: true, stdio: "ignore" });
11048
11048
  child.on("error", () => {
11049
11049
  });
11050
11050
  child.unref();
@@ -12435,8 +12435,8 @@ var init_run = __esm({
12435
12435
  defaultDeps2 = {
12436
12436
  sleep: (ms, signal) => delay6(ms, void 0, signal ? { signal } : void 0),
12437
12437
  now: () => Date.now(),
12438
- spawn: (command87, args) => {
12439
- const child = nodeSpawn2(command87, args, { detached: true, stdio: "ignore" });
12438
+ spawn: (command88, args) => {
12439
+ const child = nodeSpawn2(command88, args, { detached: true, stdio: "ignore" });
12440
12440
  child.on("error", () => {
12441
12441
  });
12442
12442
  child.unref();
@@ -13414,12 +13414,12 @@ import { join as join17 } from "node:path";
13414
13414
  function whereDir(env) {
13415
13415
  return join17(runsRoot(env), WHERE_DIR);
13416
13416
  }
13417
- async function unfinishedWhereIds(ctx, command87, args) {
13417
+ async function unfinishedWhereIds(ctx, command88, args) {
13418
13418
  const dir3 = whereDir(ctx.env);
13419
13419
  const identity = argsIdentity(args);
13420
13420
  const workspaceId = ctx.client.workspaceId ?? ctx.auth.workspaceId;
13421
13421
  for (const run of await listRuns(ctx.env)) {
13422
- if (run.command !== command87 || run.status === "done" || run.status === "planned") continue;
13422
+ if (run.command !== command88 || run.status === "done" || run.status === "planned") continue;
13423
13423
  if ((run.workspaceId || void 0) !== (workspaceId || void 0) || argsIdentity(run.args) !== identity) continue;
13424
13424
  if (run.inputPath?.startsWith(`${dir3}/`) && existsSync7(run.inputPath)) return run.inputPath;
13425
13425
  }
@@ -13565,14 +13565,14 @@ async function idsFromRun(ctx, runId) {
13565
13565
  return { ...idItems(ids2), source: "run" };
13566
13566
  }
13567
13567
  async function collectIds(ctx, flags, kind, dryRun2) {
13568
- const command87 = `kenso contacts ${kind}`;
13568
+ const command88 = `kenso contacts ${kind}`;
13569
13569
  const ids2 = stringFlag2(flags, "ids");
13570
13570
  const where = kind === "restore" ? void 0 : stringFlag2(flags, "where");
13571
13571
  const run = kind === "restore" ? stringFlag2(flags, "run") : void 0;
13572
13572
  const given = [ids2, where, run].filter((v) => v !== void 0).length;
13573
13573
  if (given !== 1) {
13574
13574
  const choices = kind === "restore" ? "--ids <file|-> or --run <runId>" : "--ids <file|-> or --where '<json>'";
13575
- throw usageError(`${command87} needs exactly one of ${choices}.`, { field: "ids", next: `${command87} --help` });
13575
+ throw usageError(`${command88} needs exactly one of ${choices}.`, { field: "ids", next: `${command88} --help` });
13576
13576
  }
13577
13577
  if (ids2 !== void 0) return idsFromFile(ctx, ids2);
13578
13578
  if (where !== void 0) return idsFromWhere(ctx, kind, flags, where, dryRun2);
@@ -17338,8 +17338,8 @@ import { resolve as resolve11 } from "node:path";
17338
17338
  function kebab(key) {
17339
17339
  return key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
17340
17340
  }
17341
- function commandWords(command87) {
17342
- return command87.trim().split(/\s+/).filter((t) => t !== "");
17341
+ function commandWords(command88) {
17342
+ return command88.trim().split(/\s+/).filter((t) => t !== "");
17343
17343
  }
17344
17344
  function flagValue(value) {
17345
17345
  return typeof value === "string" ? value : typeof value === "object" ? JSON.stringify(value) : String(value);
@@ -17811,12 +17811,105 @@ var init_sandbox2 = __esm({
17811
17811
  }
17812
17812
  });
17813
17813
 
17814
+ // src/core/step-types.ts
17815
+ function loadStepTypes() {
17816
+ return readDataFile("step-types.json")?.stepTypes ?? [];
17817
+ }
17818
+ function rateCardAction(stepCostAction) {
17819
+ return stepCostAction.replace(/LinkedIn/g, "Linkedin").replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
17820
+ }
17821
+ var init_step_types = __esm({
17822
+ "src/core/step-types.ts"() {
17823
+ "use strict";
17824
+ init_data();
17825
+ }
17826
+ });
17827
+
17828
+ // src/commands/signals/types.ts
17829
+ var types_exports = {};
17830
+ __export(types_exports, {
17831
+ default: () => types_default
17832
+ });
17833
+ function choice(flag, value, allowed, fallback) {
17834
+ if (value === void 0) return fallback;
17835
+ if (typeof value === "string" && allowed.includes(value)) return value;
17836
+ const words2 = `${allowed.slice(0, -1).join(", ")} or ${allowed[allowed.length - 1]}`;
17837
+ throw usageError(`--${flag} must be ${words2} (got "${String(value)}").`, { field: flag });
17838
+ }
17839
+ function scopeOf(inputSchema) {
17840
+ const properties = inputSchema?.properties;
17841
+ return properties !== null && typeof properties === "object" && !Array.isArray(properties) ? Object.keys(properties) : [];
17842
+ }
17843
+ function costOf(step, cards) {
17844
+ if (step.cost?.free === true) return "free";
17845
+ const actions39 = step.cost?.action ? [step.cost.action] : [...new Set(Object.values(step.cost?.actionByTier ?? {}))];
17846
+ if (actions39.length === 0) return priceLine({ action: step.key, pricing: "unlisted" }, cards);
17847
+ return actions39.map((action) => priceLine({ action: rateCardAction(action), pricing: "fixed" }, cards)).join("; ");
17848
+ }
17849
+ function toRow(step, cards) {
17850
+ return {
17851
+ type: step.type,
17852
+ title: step.title,
17853
+ recordType: step.recordType ?? null,
17854
+ workflowType: step.workflowType ?? null,
17855
+ sourceGroup: step.sourceGroup ?? null,
17856
+ scope: scopeOf(step.inputSchema),
17857
+ requires: (step.requires ?? []).map((need) => `${need.kind}:${need.key}`),
17858
+ cost: costOf(step, cards)
17859
+ };
17860
+ }
17861
+ var WORKFLOW_TYPES, RECORD_TYPES, FOOTER, command59, types_default;
17862
+ var init_types = __esm({
17863
+ "src/commands/signals/types.ts"() {
17864
+ "use strict";
17865
+ init_errors();
17866
+ init_exit_codes();
17867
+ init_rate_card();
17868
+ init_step_types();
17869
+ WORKFLOW_TYPES = ["signal", "bulk_import", "all"];
17870
+ RECORD_TYPES = ["account", "person", "lead", "place"];
17871
+ FOOTER = "Hiring signals come from a scheduled source: kenso signals types --workflow-type bulk_import. Templates that start from a signal: kenso workflow-templates list";
17872
+ command59 = {
17873
+ resource: "signals",
17874
+ action: "types",
17875
+ summary: "List the signal triggers a workflow can start from, offline",
17876
+ brief: "offline",
17877
+ description: "Lists the triggers a workflow can start from, read from the step types this CLI ships: no request and no sign-in. By default the signal triggers (a change at an account or a person); --workflow-type bulk_import lists the scheduled sources and all lists both. scope names the trigger's settings, what a watch can be narrowed by today; requires names the flags and apps it needs; cost is free, or the price from your cached or bundled rate card.",
17878
+ effect: "read",
17879
+ flags: {
17880
+ "workflow-type": { type: "string", default: "signal", description: "signal (default), bulk_import or all" },
17881
+ "record-type": { type: "string", description: "Only the triggers that run on account, person, lead or place records" }
17882
+ },
17883
+ examples: [
17884
+ "kenso signals types",
17885
+ "kenso signals types --workflow-type bulk_import -o json",
17886
+ "kenso signals types --record-type account --fields type,scope"
17887
+ ],
17888
+ operationIds: [],
17889
+ async run(ctx, { flags }) {
17890
+ const workflowType = choice("workflow-type", flags["workflow-type"], WORKFLOW_TYPES, "signal");
17891
+ const recordType = choice("record-type", flags["record-type"], RECORD_TYPES);
17892
+ const triggers = loadStepTypes().filter(
17893
+ (step) => step.kind === "trigger" && step.systemOnly !== true && (workflowType === "all" ? step.workflowType === "signal" || step.workflowType === "bulk_import" : step.workflowType === workflowType) && (recordType === void 0 || step.recordType === recordType)
17894
+ );
17895
+ const cards = triggers.some((step) => step.cost?.free !== true) ? await loadRateCards(ctx, { live: false }) : [];
17896
+ await ctx.output.list(triggers.map((step) => toRow(step, cards)));
17897
+ ctx.output.info(FOOTER);
17898
+ return ExitCode.Ok;
17899
+ }
17900
+ };
17901
+ types_default = command59;
17902
+ }
17903
+ });
17904
+
17814
17905
  // src/commands/signals/index.ts
17815
17906
  var actions28;
17816
17907
  var init_signals = __esm({
17817
17908
  "src/commands/signals/index.ts"() {
17818
17909
  "use strict";
17819
- actions28 = {};
17910
+ actions28 = {
17911
+ types: () => Promise.resolve().then(() => (init_types(), types_exports)).then((m) => m.default)
17912
+ };
17820
17913
  }
17821
17914
  });
17822
17915
 
@@ -17856,14 +17949,14 @@ function unexpectedAnswer(tool) {
17856
17949
  exitCode: ExitCode.Server
17857
17950
  });
17858
17951
  }
17859
- var command59, list_default4;
17952
+ var command60, list_default4;
17860
17953
  var init_list4 = __esm({
17861
17954
  "src/commands/skill/list.ts"() {
17862
17955
  "use strict";
17863
17956
  init_errors();
17864
17957
  init_exit_codes();
17865
17958
  init_connect4();
17866
- command59 = {
17959
+ command60 = {
17867
17960
  resource: "skill",
17868
17961
  action: "list",
17869
17962
  effect: "read",
@@ -17888,7 +17981,7 @@ var init_list4 = __esm({
17888
17981
  return ExitCode.Ok;
17889
17982
  }
17890
17983
  };
17891
- list_default4 = command59;
17984
+ list_default4 = command60;
17892
17985
  }
17893
17986
  });
17894
17987
 
@@ -17897,7 +17990,7 @@ var show_exports3 = {};
17897
17990
  __export(show_exports3, {
17898
17991
  default: () => show_default3
17899
17992
  });
17900
- var command60, show_default3;
17993
+ var command61, show_default3;
17901
17994
  var init_show3 = __esm({
17902
17995
  "src/commands/skill/show.ts"() {
17903
17996
  "use strict";
@@ -17905,7 +17998,7 @@ var init_show3 = __esm({
17905
17998
  init_connect4();
17906
17999
  init_bundled();
17907
18000
  init_list4();
17908
- command60 = {
18001
+ command61 = {
17909
18002
  resource: "skill",
17910
18003
  action: "show",
17911
18004
  effect: "read",
@@ -17932,7 +18025,7 @@ var init_show3 = __esm({
17932
18025
  return ExitCode.Ok;
17933
18026
  }
17934
18027
  };
17935
- show_default3 = command60;
18028
+ show_default3 = command61;
17936
18029
  }
17937
18030
  });
17938
18031
 
@@ -18275,7 +18368,7 @@ __export(pull_exports, {
18275
18368
  });
18276
18369
  import { mkdir, readFile as readFile11, writeFile as writeFile5 } from "node:fs/promises";
18277
18370
  import { dirname as dirname3, join as join20, resolve as resolve13 } from "node:path";
18278
- var command61, pull_default;
18371
+ var command62, pull_default;
18279
18372
  var init_pull = __esm({
18280
18373
  "src/commands/studio/pull.ts"() {
18281
18374
  "use strict";
@@ -18286,7 +18379,7 @@ var init_pull = __esm({
18286
18379
  init_common4();
18287
18380
  init_folder2();
18288
18381
  init_transfer2();
18289
- command61 = {
18382
+ command62 = {
18290
18383
  resource: "studio",
18291
18384
  action: "pull",
18292
18385
  summary: "Write a template version's files to a folder",
@@ -18368,7 +18461,7 @@ var init_pull = __esm({
18368
18461
  return ExitCode.Ok;
18369
18462
  }
18370
18463
  };
18371
- pull_default = command61;
18464
+ pull_default = command62;
18372
18465
  }
18373
18466
  });
18374
18467
 
@@ -18409,7 +18502,7 @@ __export(push_exports, {
18409
18502
  default: () => push_default
18410
18503
  });
18411
18504
  import { resolve as resolve14 } from "node:path";
18412
- var BUILT_BY, DEFAULT_MESSAGE, command62, push_default;
18505
+ var BUILT_BY, DEFAULT_MESSAGE, command63, push_default;
18413
18506
  var init_push = __esm({
18414
18507
  "src/commands/studio/push.ts"() {
18415
18508
  "use strict";
@@ -18423,7 +18516,7 @@ var init_push = __esm({
18423
18516
  init_transfer2();
18424
18517
  BUILT_BY = "customer_agent";
18425
18518
  DEFAULT_MESSAGE = "Pushed with the Kenso CLI";
18426
- command62 = {
18519
+ command63 = {
18427
18520
  resource: "studio",
18428
18521
  action: "push",
18429
18522
  summary: "Save a folder's files to a template's draft and print the validation",
@@ -18518,7 +18611,7 @@ var init_push = __esm({
18518
18611
  );
18519
18612
  }
18520
18613
  };
18521
- push_default = command62;
18614
+ push_default = command63;
18522
18615
  }
18523
18616
  });
18524
18617
 
@@ -18527,7 +18620,7 @@ var validate_exports = {};
18527
18620
  __export(validate_exports, {
18528
18621
  default: () => validate_default
18529
18622
  });
18530
- var command63, validate_default;
18623
+ var command64, validate_default;
18531
18624
  var init_validate = __esm({
18532
18625
  "src/commands/studio/validate.ts"() {
18533
18626
  "use strict";
@@ -18536,7 +18629,7 @@ var init_validate = __esm({
18536
18629
  init_columns();
18537
18630
  init_common4();
18538
18631
  init_read();
18539
- command63 = {
18632
+ command64 = {
18540
18633
  resource: "studio",
18541
18634
  action: "validate",
18542
18635
  summary: "Validate a folder's files against a template without saving them",
@@ -18566,7 +18659,7 @@ var init_validate = __esm({
18566
18659
  throw validationFailed(validation, "The files have validation errors", commandLine2(ctx, "studio validate", args));
18567
18660
  }
18568
18661
  };
18569
- validate_default = command63;
18662
+ validate_default = command64;
18570
18663
  }
18571
18664
  });
18572
18665
 
@@ -18615,7 +18708,7 @@ function accountIds(value) {
18615
18708
  }
18616
18709
  return ids2.map(Number);
18617
18710
  }
18618
- var SHOWN2, command64, preview_default;
18711
+ var SHOWN2, command65, preview_default;
18619
18712
  var init_preview = __esm({
18620
18713
  "src/commands/studio/preview.ts"() {
18621
18714
  "use strict";
@@ -18627,7 +18720,7 @@ var init_preview = __esm({
18627
18720
  init_common4();
18628
18721
  init_folder2();
18629
18722
  SHOWN2 = 5;
18630
- command64 = {
18723
+ command65 = {
18631
18724
  resource: "studio",
18632
18725
  action: "preview",
18633
18726
  summary: "Render a saved version for up to 3 accounts; for local edits, studio push them to the draft first",
@@ -18677,7 +18770,7 @@ var init_preview = __esm({
18677
18770
  return ExitCode.Ok;
18678
18771
  }
18679
18772
  };
18680
- preview_default = command64;
18773
+ preview_default = command65;
18681
18774
  }
18682
18775
  });
18683
18776
 
@@ -18878,7 +18971,7 @@ function estimateOutput(templateId, target2, estimate) {
18878
18971
  ...target2.campaignId !== void 0 ? { estimateNote: "An upper bound: it counts one page per lead, and a campaign run builds one page per company." } : {}
18879
18972
  };
18880
18973
  }
18881
- var COMMAND6, sha2564, command65, fill_default;
18974
+ var COMMAND6, sha2564, command66, fill_default;
18882
18975
  var init_fill = __esm({
18883
18976
  "src/commands/studio/fill.ts"() {
18884
18977
  "use strict";
@@ -18896,7 +18989,7 @@ var init_fill = __esm({
18896
18989
  init_fill_runs();
18897
18990
  COMMAND6 = "studio fill";
18898
18991
  sha2564 = (data) => createHash10("sha256").update(data).digest("hex");
18899
- command65 = {
18992
+ command66 = {
18900
18993
  resource: "studio",
18901
18994
  action: "fill",
18902
18995
  summary: "Fill a template on many accounts or campaign leads (estimate first)",
@@ -18965,7 +19058,7 @@ var init_fill = __esm({
18965
19058
  return outcome.exitCode;
18966
19059
  }
18967
19060
  };
18968
- fill_default = command65;
19061
+ fill_default = command66;
18969
19062
  }
18970
19063
  });
18971
19064
 
@@ -19072,7 +19165,7 @@ var add_exports2 = {};
19072
19165
  __export(add_exports2, {
19073
19166
  default: () => add_default2
19074
19167
  });
19075
- var NEXT, command66, add_default2;
19168
+ var NEXT, command67, add_default2;
19076
19169
  var init_add2 = __esm({
19077
19170
  "src/commands/tasks/add.ts"() {
19078
19171
  "use strict";
@@ -19082,7 +19175,7 @@ var init_add2 = __esm({
19082
19175
  init_http();
19083
19176
  init_shared2();
19084
19177
  NEXT = 'kenso tasks add "Send the deck" --due tomorrow --account 812';
19085
- command66 = {
19178
+ command67 = {
19086
19179
  resource: "tasks",
19087
19180
  action: "add",
19088
19181
  summary: "Add a task: a title, an optional due day and time, assignee and the account, person or deal it is about",
@@ -19120,7 +19213,7 @@ var init_add2 = __esm({
19120
19213
  return ExitCode.Ok;
19121
19214
  }
19122
19215
  };
19123
- add_default2 = command66;
19216
+ add_default2 = command67;
19124
19217
  }
19125
19218
  });
19126
19219
 
@@ -19157,7 +19250,7 @@ function stoppedAt(error, id, finished, status) {
19157
19250
  details: error.details
19158
19251
  });
19159
19252
  }
19160
- var command67, done_default;
19253
+ var command68, done_default;
19161
19254
  var init_done = __esm({
19162
19255
  "src/commands/tasks/done.ts"() {
19163
19256
  "use strict";
@@ -19166,7 +19259,7 @@ var init_done = __esm({
19166
19259
  init_exit_codes();
19167
19260
  init_http();
19168
19261
  init_shared2();
19169
- command67 = {
19262
+ command68 = {
19170
19263
  resource: "tasks",
19171
19264
  action: "done",
19172
19265
  summary: "Complete one or more tasks (--undo reopens them)",
@@ -19200,7 +19293,7 @@ var init_done = __esm({
19200
19293
  return ExitCode.Ok;
19201
19294
  }
19202
19295
  };
19203
- done_default = command67;
19296
+ done_default = command68;
19204
19297
  }
19205
19298
  });
19206
19299
 
@@ -19209,7 +19302,7 @@ var assign_exports = {};
19209
19302
  __export(assign_exports, {
19210
19303
  default: () => assign_default
19211
19304
  });
19212
- var NEXT2, command68, assign_default;
19305
+ var NEXT2, command69, assign_default;
19213
19306
  var init_assign = __esm({
19214
19307
  "src/commands/tasks/assign.ts"() {
19215
19308
  "use strict";
@@ -19218,7 +19311,7 @@ var init_assign = __esm({
19218
19311
  init_done();
19219
19312
  init_shared2();
19220
19313
  NEXT2 = "kenso tasks assign <taskId> <me|memberId|email>";
19221
- command68 = {
19314
+ command69 = {
19222
19315
  resource: "tasks",
19223
19316
  action: "assign",
19224
19317
  summary: "Give a task to a member",
@@ -19242,7 +19335,7 @@ var init_assign = __esm({
19242
19335
  return ExitCode.Ok;
19243
19336
  }
19244
19337
  };
19245
- assign_default = command68;
19338
+ assign_default = command69;
19246
19339
  }
19247
19340
  });
19248
19341
 
@@ -19251,14 +19344,14 @@ var queue_exports = {};
19251
19344
  __export(queue_exports, {
19252
19345
  default: () => queue_default
19253
19346
  });
19254
- var SCOPES, command69, queue_default;
19347
+ var SCOPES, command70, queue_default;
19255
19348
  var init_queue = __esm({
19256
19349
  "src/commands/tasks/queue.ts"() {
19257
19350
  "use strict";
19258
19351
  init_errors();
19259
19352
  init_exit_codes();
19260
19353
  SCOPES = ["mine", "assigned_by_me", "everyone"];
19261
- command69 = {
19354
+ command70 = {
19262
19355
  resource: "tasks",
19263
19356
  action: "queue",
19264
19357
  summary: "Your open work by due day: tasks, touches, call tasks, reply reminders and Ken follow-ups",
@@ -19280,7 +19373,7 @@ var init_queue = __esm({
19280
19373
  return ExitCode.Ok;
19281
19374
  }
19282
19375
  };
19283
- queue_default = command69;
19376
+ queue_default = command70;
19284
19377
  }
19285
19378
  });
19286
19379
 
@@ -19522,7 +19615,7 @@ function readBody(req) {
19522
19615
  function reply(res, status, body2) {
19523
19616
  res.writeHead(status, { "content-type": "application/json" }).end(JSON.stringify(body2));
19524
19617
  }
19525
- var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command70, listen_default;
19618
+ var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command71, listen_default;
19526
19619
  var init_listen = __esm({
19527
19620
  "src/commands/webhooks/listen.ts"() {
19528
19621
  "use strict";
@@ -19533,7 +19626,7 @@ var init_listen = __esm({
19533
19626
  MIN_POLL_MS = 1e3;
19534
19627
  MAX_POLL_MS = 6e4;
19535
19628
  MAX_TRIGGER_BYTES = 1e6;
19536
- command70 = {
19629
+ command71 = {
19537
19630
  resource: "webhooks",
19538
19631
  action: "listen",
19539
19632
  summary: "Stream the workspace's events and forward them, signed, to a local handler",
@@ -19640,7 +19733,7 @@ var init_listen = __esm({
19640
19733
  return ExitCode.Ok;
19641
19734
  }
19642
19735
  };
19643
- listen_default = command70;
19736
+ listen_default = command71;
19644
19737
  }
19645
19738
  });
19646
19739
 
@@ -19659,7 +19752,7 @@ function notRunning() {
19659
19752
  next: LISTEN_NEXT
19660
19753
  });
19661
19754
  }
19662
- var LISTEN_NEXT, command71, trigger_default;
19755
+ var LISTEN_NEXT, command72, trigger_default;
19663
19756
  var init_trigger = __esm({
19664
19757
  "src/commands/webhooks/trigger.ts"() {
19665
19758
  "use strict";
@@ -19668,7 +19761,7 @@ var init_trigger = __esm({
19668
19761
  init_http();
19669
19762
  init_local();
19670
19763
  LISTEN_NEXT = "kenso webhooks listen --forward-to http://localhost:3000/hook";
19671
- command71 = {
19764
+ command72 = {
19672
19765
  resource: "webhooks",
19673
19766
  action: "trigger",
19674
19767
  summary: "Send a sample event of one type through the running kenso webhooks listen",
@@ -19726,7 +19819,7 @@ var init_trigger = __esm({
19726
19819
  return ExitCode.Ok;
19727
19820
  }
19728
19821
  };
19729
- trigger_default = command71;
19822
+ trigger_default = command72;
19730
19823
  }
19731
19824
  });
19732
19825
 
@@ -19747,14 +19840,14 @@ var status_exports3 = {};
19747
19840
  __export(status_exports3, {
19748
19841
  default: () => status_default3
19749
19842
  });
19750
- var command72, status_default3;
19843
+ var command73, status_default3;
19751
19844
  var init_status3 = __esm({
19752
19845
  "src/commands/work/status.ts"() {
19753
19846
  "use strict";
19754
19847
  init_exit_codes();
19755
19848
  init_http();
19756
19849
  init_common2();
19757
- command72 = {
19850
+ command73 = {
19758
19851
  resource: "work",
19759
19852
  action: "status",
19760
19853
  summary: "Show the Kenso AI work waiting for your own agent, per kind",
@@ -19789,7 +19882,7 @@ var init_status3 = __esm({
19789
19882
  return ExitCode.Ok;
19790
19883
  }
19791
19884
  };
19792
- status_default3 = command72;
19885
+ status_default3 = command73;
19793
19886
  }
19794
19887
  });
19795
19888
 
@@ -19921,9 +20014,9 @@ var init_files = __esm({
19921
20014
  import { execFile, spawnSync as spawnSync2 } from "node:child_process";
19922
20015
  import { readFileSync as readFileSync18 } from "node:fs";
19923
20016
  import { isAbsolute as isAbsolute2 } from "node:path";
19924
- function sudoArgs(user, command87, args, keep = [], set2 = {}) {
20017
+ function sudoArgs(user, command88, args, keep = [], set2 = {}) {
19925
20018
  const assignments = Object.entries(set2).map(([name, value]) => `${name}=${value}`);
19926
- return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command87, ...args];
20019
+ return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command88, ...args];
19927
20020
  }
19928
20021
  function agentKensoEnv(opts) {
19929
20022
  return {
@@ -19933,12 +20026,12 @@ function agentKensoEnv(opts) {
19933
20026
  AI_AGENT: opts.agentName
19934
20027
  };
19935
20028
  }
19936
- function sudoExec(user, command87, args, opts = {}) {
20029
+ function sudoExec(user, command88, args, opts = {}) {
19937
20030
  const [sudo = "/usr/bin/sudo", ...lead] = user.sudo;
19938
20031
  return new Promise((resolve21) => {
19939
20032
  execFile(
19940
20033
  sudo,
19941
- [...lead, ...sudoArgs(user.name, command87, args)],
20034
+ [...lead, ...sudoArgs(user.name, command88, args)],
19942
20035
  { env: { PATH: SUDO_PATH }, cwd: "/", timeout: opts.timeoutMs ?? PROBE_TIMEOUT_MS, maxBuffer: opts.maxBuffer ?? 1024 * 1024, encoding: "utf8", windowsHide: true, shell: false },
19943
20036
  (err, stdout, stderr) => {
19944
20037
  const code = err ? err.code : 0;
@@ -20048,9 +20141,9 @@ var init_folder3 = __esm({
20048
20141
  init_redact();
20049
20142
  init_agent_user();
20050
20143
  WorkRunFolder = class {
20051
- constructor(ctx, command87, args, outDir, shared = false) {
20144
+ constructor(ctx, command88, args, outDir, shared = false) {
20052
20145
  this.ctx = ctx;
20053
- this.command = command87;
20146
+ this.command = command88;
20054
20147
  this.args = args;
20055
20148
  this.outDir = outDir;
20056
20149
  this.shared = shared;
@@ -20165,7 +20258,7 @@ var pull_exports2 = {};
20165
20258
  __export(pull_exports2, {
20166
20259
  default: () => pull_default2
20167
20260
  });
20168
- var MAX_FILES, command73, pull_default2;
20261
+ var MAX_FILES, command74, pull_default2;
20169
20262
  var init_pull2 = __esm({
20170
20263
  "src/commands/work/pull.ts"() {
20171
20264
  "use strict";
@@ -20174,7 +20267,7 @@ var init_pull2 = __esm({
20174
20267
  init_common2();
20175
20268
  init_folder3();
20176
20269
  MAX_FILES = 100;
20177
- command73 = {
20270
+ command74 = {
20178
20271
  resource: "work",
20179
20272
  action: "pull",
20180
20273
  summary: "Claim waiting work into local work files, to answer by hand",
@@ -20253,7 +20346,7 @@ var init_pull2 = __esm({
20253
20346
  return interrupted7 ? ExitCode.Interrupted : ExitCode.Ok;
20254
20347
  }
20255
20348
  };
20256
- pull_default2 = command73;
20349
+ pull_default2 = command74;
20257
20350
  }
20258
20351
  });
20259
20352
 
@@ -20395,7 +20488,7 @@ __export(submit_exports, {
20395
20488
  default: () => submit_default
20396
20489
  });
20397
20490
  import { resolve as resolve17 } from "node:path";
20398
- var command74, submit_default;
20491
+ var command75, submit_default;
20399
20492
  var init_submit = __esm({
20400
20493
  "src/commands/work/submit.ts"() {
20401
20494
  "use strict";
@@ -20404,7 +20497,7 @@ var init_submit = __esm({
20404
20497
  init_files();
20405
20498
  init_answers();
20406
20499
  init_common2();
20407
- command74 = {
20500
+ command75 = {
20408
20501
  resource: "work",
20409
20502
  action: "submit",
20410
20503
  summary: "Send answers files to Kenso and write each one's results",
@@ -20437,7 +20530,7 @@ var init_submit = __esm({
20437
20530
  return totals.rejected > 0 ? ExitCode.Partial : ExitCode.Ok;
20438
20531
  }
20439
20532
  };
20440
- submit_default = command74;
20533
+ submit_default = command75;
20441
20534
  }
20442
20535
  });
20443
20536
 
@@ -20458,7 +20551,7 @@ function claimIdOf(arg) {
20458
20551
  if (!CLAIM_ID.test(arg)) throw usageError(`"${arg}" is neither a claim id nor a work file.`, { field: "claim", hint: "Claim ids look like awc_8fK2..." });
20459
20552
  return arg;
20460
20553
  }
20461
- var CLAIM_ID, command75, release_default;
20554
+ var CLAIM_ID, command76, release_default;
20462
20555
  var init_release = __esm({
20463
20556
  "src/commands/work/release.ts"() {
20464
20557
  "use strict";
@@ -20467,7 +20560,7 @@ var init_release = __esm({
20467
20560
  init_files();
20468
20561
  init_common2();
20469
20562
  CLAIM_ID = /^[A-Za-z0-9_-]{1,64}$/;
20470
- command75 = {
20563
+ command76 = {
20471
20564
  resource: "work",
20472
20565
  action: "release",
20473
20566
  summary: "Give claimed work back to the queue now",
@@ -20487,7 +20580,7 @@ var init_release = __esm({
20487
20580
  return ExitCode.Ok;
20488
20581
  }
20489
20582
  };
20490
- release_default = command75;
20583
+ release_default = command76;
20491
20584
  }
20492
20585
  });
20493
20586
 
@@ -20826,12 +20919,12 @@ function plain(text4) {
20826
20919
  return text4.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "");
20827
20920
  }
20828
20921
  function runStatus(bin, args, env, adapter, runAs) {
20829
- const command87 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
20922
+ const command88 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
20830
20923
  const commandArgs2 = runAs ? [...runAs.sudo.slice(1), ...sudoArgs(runAs.name, bin, args)] : args;
20831
20924
  const options = runAs ? { env: { PATH: SUDO_PATH }, cwd: "/" } : { env: childEnv(env, adapter) };
20832
20925
  return new Promise((resolve21) => {
20833
20926
  execFile2(
20834
- command87,
20927
+ command88,
20835
20928
  commandArgs2,
20836
20929
  { ...options, timeout: STATUS_TIMEOUT_MS, maxBuffer: 1024 * 1024, windowsHide: true, shell: false },
20837
20930
  (err, stdout, stderr) => {
@@ -21913,7 +22006,7 @@ var run_exports3 = {};
21913
22006
  __export(run_exports3, {
21914
22007
  default: () => run_default2
21915
22008
  });
21916
- var FAILURES_IN_A_ROW, command76, run_default2;
22009
+ var FAILURES_IN_A_ROW, command77, run_default2;
21917
22010
  var init_run3 = __esm({
21918
22011
  "src/commands/work/run.ts"() {
21919
22012
  "use strict";
@@ -21934,7 +22027,7 @@ var init_run3 = __esm({
21934
22027
  init_folder3();
21935
22028
  init_stop();
21936
22029
  FAILURES_IN_A_ROW = 3;
21937
- command76 = {
22030
+ command77 = {
21938
22031
  resource: "work",
21939
22032
  action: "run",
21940
22033
  summary: "Run your own coding agent on the waiting work until the queue is empty",
@@ -22260,7 +22353,7 @@ var init_run3 = __esm({
22260
22353
  return exitCodeFor(reason, totals.rejected > 0 || jobsFailed > 0);
22261
22354
  }
22262
22355
  };
22263
- run_default2 = command76;
22356
+ run_default2 = command77;
22264
22357
  }
22265
22358
  });
22266
22359
 
@@ -22421,7 +22514,7 @@ __export(init_exports, {
22421
22514
  });
22422
22515
  import { existsSync as existsSync13 } from "node:fs";
22423
22516
  import { join as join31, resolve as resolve20 } from "node:path";
22424
- var STEM, command77, init_default;
22517
+ var STEM, command78, init_default;
22425
22518
  var init_init = __esm({
22426
22519
  "src/commands/workflows/init.ts"() {
22427
22520
  "use strict";
@@ -22431,7 +22524,7 @@ var init_init = __esm({
22431
22524
  init_http();
22432
22525
  init_files2();
22433
22526
  STEM = /^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$/;
22434
- command77 = {
22527
+ command78 = {
22435
22528
  resource: "workflows",
22436
22529
  action: "init",
22437
22530
  summary: "Start a workflow file in this folder",
@@ -22487,7 +22580,7 @@ var init_init = __esm({
22487
22580
  return ExitCode.Ok;
22488
22581
  }
22489
22582
  };
22490
- init_default = command77;
22583
+ init_default = command78;
22491
22584
  }
22492
22585
  });
22493
22586
 
@@ -22500,7 +22593,7 @@ import { existsSync as existsSync14 } from "node:fs";
22500
22593
  function slugOf(name) {
22501
22594
  return name.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60).replace(/-+$/, "");
22502
22595
  }
22503
- var command78, pull_default3;
22596
+ var command79, pull_default3;
22504
22597
  var init_pull3 = __esm({
22505
22598
  "src/commands/workflows/pull.ts"() {
22506
22599
  "use strict";
@@ -22508,7 +22601,7 @@ var init_pull3 = __esm({
22508
22601
  init_exit_codes();
22509
22602
  init_common4();
22510
22603
  init_files2();
22511
- command78 = {
22604
+ command79 = {
22512
22605
  resource: "workflows",
22513
22606
  action: "pull",
22514
22607
  summary: "Write a workflow's definition to a file and bind it",
@@ -22567,7 +22660,7 @@ var init_pull3 = __esm({
22567
22660
  return ExitCode.Ok;
22568
22661
  }
22569
22662
  };
22570
- pull_default3 = command78;
22663
+ pull_default3 = command79;
22571
22664
  }
22572
22665
  });
22573
22666
 
@@ -22600,7 +22693,7 @@ function perRecord(estimate) {
22600
22693
  const max = bulk ? totals.bulkMaxMillicredits : totals.maxMillicredits;
22601
22694
  return typeof expected === "number" && typeof max === "number" ? { expectedCredits: expected / 1e3, maxCredits: max / 1e3 } : null;
22602
22695
  }
22603
- var FILE3, command79, check_default;
22696
+ var FILE3, command80, check_default;
22604
22697
  var init_check = __esm({
22605
22698
  "src/commands/workflows/check.ts"() {
22606
22699
  "use strict";
@@ -22611,7 +22704,7 @@ var init_check = __esm({
22611
22704
  init_columns();
22612
22705
  init_files2();
22613
22706
  FILE3 = { name: "file", required: true, description: "The workflow file (<name>.workflow.json)" };
22614
- command79 = {
22707
+ command80 = {
22615
22708
  resource: "workflows",
22616
22709
  action: "check",
22617
22710
  summary: "Validate a workflow file on the server and print one record's credit estimate",
@@ -22652,7 +22745,7 @@ var init_check = __esm({
22652
22745
  return valid ? ExitCode.Ok : ExitCode.Partial;
22653
22746
  }
22654
22747
  };
22655
- check_default = command79;
22748
+ check_default = command80;
22656
22749
  }
22657
22750
  });
22658
22751
 
@@ -22716,7 +22809,7 @@ function state(workflow, saved, published, extra = {}) {
22716
22809
  ...extra
22717
22810
  };
22718
22811
  }
22719
- var command80, push_default2;
22812
+ var command81, push_default2;
22720
22813
  var init_push2 = __esm({
22721
22814
  "src/commands/workflows/push.ts"() {
22722
22815
  "use strict";
@@ -22726,7 +22819,7 @@ var init_push2 = __esm({
22726
22819
  init_columns();
22727
22820
  init_check();
22728
22821
  init_files2();
22729
- command80 = {
22822
+ command81 = {
22730
22823
  resource: "workflows",
22731
22824
  action: "push",
22732
22825
  summary: "Save a workflow file as the workflow's draft, and publish it with --publish",
@@ -22830,7 +22923,7 @@ var init_push2 = __esm({
22830
22923
  return ExitCode.Ok;
22831
22924
  }
22832
22925
  };
22833
- push_default2 = command80;
22926
+ push_default2 = command81;
22834
22927
  }
22835
22928
  });
22836
22929
 
@@ -22843,8 +22936,8 @@ function recordOf(value) {
22843
22936
  if (value === void 0) return void 0;
22844
22937
  const at = value.indexOf(":");
22845
22938
  const record3 = { type: value.slice(0, Math.max(at, 0)), id: value.slice(at + 1).trim() };
22846
- if (at < 0 || !RECORD_TYPES.includes(record3.type) || record3.id === "") {
22847
- throw usageError(`--record is <type>:<id>, with type ${RECORD_TYPES.join(", ")} (got "${value}").`, { field: "record" });
22939
+ if (at < 0 || !RECORD_TYPES2.includes(record3.type) || record3.id === "") {
22940
+ throw usageError(`--record is <type>:<id>, with type ${RECORD_TYPES2.join(", ")} (got "${value}").`, { field: "record" });
22848
22941
  }
22849
22942
  return record3;
22850
22943
  }
@@ -22863,7 +22956,7 @@ async function startTest(ctx, workflowId, body2) {
22863
22956
  });
22864
22957
  }
22865
22958
  }
22866
- var RECORD_TYPES, MAX_WAIT_SECONDS, command81, test_default;
22959
+ var RECORD_TYPES2, MAX_WAIT_SECONDS, command82, test_default;
22867
22960
  var init_test = __esm({
22868
22961
  "src/commands/workflows/test.ts"() {
22869
22962
  "use strict";
@@ -22873,9 +22966,9 @@ var init_test = __esm({
22873
22966
  init_columns();
22874
22967
  init_check();
22875
22968
  init_files2();
22876
- RECORD_TYPES = ["account", "person", "lead", "place"];
22969
+ RECORD_TYPES2 = ["account", "person", "lead", "place"];
22877
22970
  MAX_WAIT_SECONDS = 50;
22878
- command81 = {
22971
+ command82 = {
22879
22972
  resource: "workflows",
22880
22973
  action: "test",
22881
22974
  summary: "Run the saved draft of a workflow file on one record and print the hash to publish with",
@@ -22931,7 +23024,7 @@ var init_test = __esm({
22931
23024
  return passed ? ExitCode.Ok : ExitCode.Error;
22932
23025
  }
22933
23026
  };
22934
- test_default = command81;
23027
+ test_default = command82;
22935
23028
  }
22936
23029
  });
22937
23030
 
@@ -22965,7 +23058,7 @@ function diffDefinitions(from, to) {
22965
23058
  stepsChanged: [...after.keys()].filter((id) => before.has(id) && differs(before.get(id), after.get(id)))
22966
23059
  };
22967
23060
  }
22968
- var command82, diff_default;
23061
+ var command83, diff_default;
22969
23062
  var init_diff = __esm({
22970
23063
  "src/commands/workflows/diff.ts"() {
22971
23064
  "use strict";
@@ -22974,7 +23067,7 @@ var init_diff = __esm({
22974
23067
  init_columns();
22975
23068
  init_check();
22976
23069
  init_files2();
22977
- command82 = {
23070
+ command83 = {
22978
23071
  resource: "workflows",
22979
23072
  action: "diff",
22980
23073
  summary: "Compare a workflow file with the published version or the draft",
@@ -23002,18 +23095,7 @@ var init_diff = __esm({
23002
23095
  return ExitCode.Ok;
23003
23096
  }
23004
23097
  };
23005
- diff_default = command82;
23006
- }
23007
- });
23008
-
23009
- // src/core/step-types.ts
23010
- function loadStepTypes() {
23011
- return readDataFile("step-types.json")?.stepTypes ?? [];
23012
- }
23013
- var init_step_types = __esm({
23014
- "src/core/step-types.ts"() {
23015
- "use strict";
23016
- init_data();
23098
+ diff_default = command83;
23017
23099
  }
23018
23100
  });
23019
23101
 
@@ -23097,7 +23179,7 @@ function workflowFileSchema(stepTypes) {
23097
23179
  }
23098
23180
  };
23099
23181
  }
23100
- var SCHEMA_ID, STEP_ID, MORE_THAN_ZERO, command83, schema_default;
23182
+ var SCHEMA_ID, STEP_ID, MORE_THAN_ZERO, command84, schema_default;
23101
23183
  var init_schema = __esm({
23102
23184
  "src/commands/workflows/schema.ts"() {
23103
23185
  "use strict";
@@ -23108,7 +23190,7 @@ var init_schema = __esm({
23108
23190
  SCHEMA_ID = "https://ken.so/schemas/workflow-file.json";
23109
23191
  STEP_ID = "^[a-z][a-z0-9_]{0,39}$";
23110
23192
  MORE_THAN_ZERO = { type: "number", exclusiveMinimum: 0 };
23111
- command83 = {
23193
+ command84 = {
23112
23194
  resource: "workflows",
23113
23195
  action: "schema",
23114
23196
  summary: "Print a JSON Schema for workflow files, for editors",
@@ -23134,7 +23216,7 @@ var init_schema = __esm({
23134
23216
  return ExitCode.Ok;
23135
23217
  }
23136
23218
  };
23137
- schema_default = command83;
23219
+ schema_default = command84;
23138
23220
  }
23139
23221
  });
23140
23222
 
@@ -23196,7 +23278,7 @@ function rewrap(err, overrides2) {
23196
23278
  details: err.details
23197
23279
  });
23198
23280
  }
23199
- var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE, command84, keys_default;
23281
+ var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE, command85, keys_default;
23200
23282
  var init_keys = __esm({
23201
23283
  "src/commands/workspace/keys.ts"() {
23202
23284
  "use strict";
@@ -23206,7 +23288,7 @@ var init_keys = __esm({
23206
23288
  TEMPLATES = ["admin", "editor", "viewer"];
23207
23289
  APP_NEXT_STEP = "A workspace admin can create it in the app: Settings > API keys > Workspace keys";
23208
23290
  NOT_AVAILABLE = "Workspace keys are not available for this workspace yet.";
23209
- command84 = {
23291
+ command85 = {
23210
23292
  resource: "workspace",
23211
23293
  action: "keys",
23212
23294
  summary: "Create an API key the workspace owns",
@@ -23268,7 +23350,7 @@ var init_keys = __esm({
23268
23350
  return ExitCode.Ok;
23269
23351
  }
23270
23352
  };
23271
- keys_default = command84;
23353
+ keys_default = command85;
23272
23354
  }
23273
23355
  });
23274
23356
 
@@ -23286,14 +23368,14 @@ function parseLimit2(value) {
23286
23368
  }
23287
23369
  return limit;
23288
23370
  }
23289
- var MAX_LIMIT2, command85, list_default5;
23371
+ var MAX_LIMIT2, command86, list_default5;
23290
23372
  var init_list5 = __esm({
23291
23373
  "src/commands/workspace/list.ts"() {
23292
23374
  "use strict";
23293
23375
  init_errors();
23294
23376
  init_exit_codes();
23295
23377
  MAX_LIMIT2 = 200;
23296
- command85 = {
23378
+ command86 = {
23297
23379
  resource: "workspace",
23298
23380
  action: "list",
23299
23381
  summary: "List the workspaces your key can use",
@@ -23322,7 +23404,7 @@ var init_list5 = __esm({
23322
23404
  return ExitCode.Ok;
23323
23405
  }
23324
23406
  };
23325
- list_default5 = command85;
23407
+ list_default5 = command86;
23326
23408
  }
23327
23409
  });
23328
23410
 
@@ -23331,7 +23413,7 @@ var use_exports = {};
23331
23413
  __export(use_exports, {
23332
23414
  default: () => use_default
23333
23415
  });
23334
- var command86, use_default;
23416
+ var command87, use_default;
23335
23417
  var init_use = __esm({
23336
23418
  "src/commands/workspace/use.ts"() {
23337
23419
  "use strict";
@@ -23339,7 +23421,7 @@ var init_use = __esm({
23339
23421
  init_errors();
23340
23422
  init_exit_codes();
23341
23423
  init_http();
23342
- command86 = {
23424
+ command87 = {
23343
23425
  resource: "workspace",
23344
23426
  action: "use",
23345
23427
  summary: "Set the profile's default workspace",
@@ -23401,7 +23483,7 @@ var init_use = __esm({
23401
23483
  return ExitCode.Ok;
23402
23484
  }
23403
23485
  };
23404
- use_default = command86;
23486
+ use_default = command87;
23405
23487
  }
23406
23488
  });
23407
23489
 
@@ -24085,8 +24167,8 @@ function agentNotice(env, agent, version, stderr, opts) {
24085
24167
  return async () => {
24086
24168
  try {
24087
24169
  if (!firstInSession(env, agent, "update")) return;
24088
- const command87 = updateCommand(opts.install ?? installKind(), opts.platform ?? process.platform);
24089
- stderr.write(`kenso ${latest} is out (you have ${version}): ${command87}
24170
+ const command88 = updateCommand(opts.install ?? installKind(), opts.platform ?? process.platform);
24171
+ stderr.write(`kenso ${latest} is out (you have ${version}): ${command88}
24090
24172
  `);
24091
24173
  } catch {
24092
24174
  }
@@ -24121,8 +24203,8 @@ function startUpdateNotice(argv, opts = {}) {
24121
24203
  if (!found) return;
24122
24204
  writeCheck(file, { checkedAt: new Date(now).toISOString(), latest: found });
24123
24205
  if (isNewer(found, version)) {
24124
- const command87 = updateCommand(install, opts.platform ?? process.platform);
24125
- stderr.write(`kenso ${found} is out (you have ${version}): ${command87}
24206
+ const command88 = updateCommand(install, opts.platform ?? process.platform);
24207
+ stderr.write(`kenso ${found} is out (you have ${version}): ${command88}
24126
24208
  Turn this off with KENSO_NO_UPDATE_NOTIFIER=1.
24127
24209
  `);
24128
24210
  }