kenso 0.1.76 → 0.1.78

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
@@ -2477,7 +2477,7 @@ var VERSION;
2477
2477
  var init_version = __esm({
2478
2478
  "src/core/version.ts"() {
2479
2479
  "use strict";
2480
- VERSION = true ? "0.1.76" : "0.0.0-dev";
2480
+ VERSION = true ? "0.1.78" : "0.0.0-dev";
2481
2481
  }
2482
2482
  });
2483
2483
 
@@ -4174,9 +4174,9 @@ async function readRunDir(dir) {
4174
4174
  return null;
4175
4175
  }
4176
4176
  if (!raw) return null;
4177
- const { runId, command: command49, createdAt, status } = raw;
4177
+ const { runId, command: command51, createdAt, status } = raw;
4178
4178
  if (typeof runId !== "string" || !RUN_ID_PATTERN.test(runId)) return null;
4179
- if (typeof command49 !== "string" || typeof createdAt !== "string") return null;
4179
+ if (typeof command51 !== "string" || typeof createdAt !== "string") return null;
4180
4180
  if (typeof status !== "string" || !STATUSES.includes(status)) return null;
4181
4181
  let chunksDone = chunkList(raw.chunksDone) ?? [];
4182
4182
  try {
@@ -4187,7 +4187,7 @@ async function readRunDir(dir) {
4187
4187
  const record = {
4188
4188
  ...raw,
4189
4189
  runId,
4190
- command: command49,
4190
+ command: command51,
4191
4191
  args: asRecord3(raw.args) ?? {},
4192
4192
  createdAt,
4193
4193
  status,
@@ -4242,11 +4242,11 @@ async function loadRun(runId, env = process.env) {
4242
4242
  }
4243
4243
  return run;
4244
4244
  }
4245
- async function findIdentical(command49, args, inputSha256, env, workspaceId, anyWorkspace = false) {
4245
+ async function findIdentical(command51, args, inputSha256, env, workspaceId, anyWorkspace = false) {
4246
4246
  const identity = argsIdentity(args);
4247
4247
  const runs = await listRuns(env);
4248
4248
  return runs.filter(
4249
- (run) => run.command === command49 && (run.inputSha256 || void 0) === (inputSha256 || void 0) && (anyWorkspace || (run.workspaceId || void 0) === (workspaceId || void 0)) && argsIdentity(run.args) === identity
4249
+ (run) => run.command === command51 && (run.inputSha256 || void 0) === (inputSha256 || void 0) && (anyWorkspace || (run.workspaceId || void 0) === (workspaceId || void 0)) && argsIdentity(run.args) === identity
4250
4250
  );
4251
4251
  }
4252
4252
  function isOtherLiveProcess(pid) {
@@ -7451,8 +7451,8 @@ function idValue(value, field) {
7451
7451
  function shellQuote3(arg) {
7452
7452
  return /^[A-Za-z0-9_./:=@%+,-]+$/.test(arg) ? arg : `'${arg.replace(/'/g, `'\\''`)}'`;
7453
7453
  }
7454
- function commandLine2(ctx, command49, args, extra = []) {
7455
- const parts2 = ["kenso", ...command49.split(" "), ...(args.positionals ?? []).map(shellQuote3)];
7454
+ function commandLine2(ctx, command51, args, extra = []) {
7455
+ const parts2 = ["kenso", ...command51.split(" "), ...(args.positionals ?? []).map(shellQuote3)];
7456
7456
  for (const [name, value] of Object.entries(args.flags)) {
7457
7457
  if (value === void 0 || value === false) continue;
7458
7458
  if (value === true) parts2.push(`--${name}`);
@@ -7832,7 +7832,7 @@ var init_studio = __esm({
7832
7832
  var webhooks_default;
7833
7833
  var init_webhooks = __esm({
7834
7834
  "docs/webhooks.md"() {
7835
- webhooks_default = '# Webhooks: listen and trigger\n\nBuild and test a webhook handler on your own machine, with no public tunnel and no webhook endpoint in Kenso. `kenso webhooks listen` streams your workspace\'s events, prints each one as JSON and forwards it to your handler, signed the way Kenso signs its deliveries. `kenso webhooks trigger` sends a sample event through the running listener.\n\n| Command | What it does |\n|---|---|\n| `webhooks listen --forward-to <url>` | Streams events, prints one JSON line each, and POSTs each to your handler |\n| `webhooks listen --print-secret` | Prints the local signing secret and exits |\n| `webhooks trigger <event-type>` | Sends that type\'s sample through the running listener |\n\n## Quick start\n\nIn one terminal:\n\n```bash\nkenso webhooks listen --forward-to http://localhost:3000/hook\n```\n\nIt prints its signing secret on stderr:\n\n```\nReady. Forwarding events to http://localhost:3000/hook.\nSigning secret: whsec_... (the same on every run; kept in ~/.kenso/webhooks/signing-secret).\n```\n\nPut that secret in your handler\'s config (for example `KENSO_WEBHOOK_SECRET`). In another terminal:\n\n```bash\nkenso webhooks trigger reply.received\n```\n\nThe listener prints the event and your handler receives it. `kenso webhook-event-types list` lists every type with its sample body.\n\n## What your handler receives\n\nEach forward is a `POST` with a JSON body shaped like a webhook delivery (no envelope, `eventType` at the top) and the headers a Kenso delivery carries. How full the body is depends on where the event came from:\n\n- **A trigger** sends the type\'s full sample body, the same shape a webhook endpoint receives in production.\n- **A live event** is sparse. The event log keeps only part of each delivery, so the body has `eventType`, `eventId`, `timestamp` and `clientId`, plus the ids, statuses and `links` at their delivery paths (`contact.id`, `campaign.id`, `reply.classification`, ...). Names, emails, reply text and the other fields are not there: read them with the API, or build that part of the handler against a trigger\'s sample.\n\nThe headers:\n\n| Header | Value |\n|---|---|\n| `svix-id` | The event\'s id. Dedupe on it |\n| `svix-timestamp` | Unix seconds of the send |\n| `svix-signature` | `v1,` and the base64 HMAC-SHA256 of `{svix-id}.{svix-timestamp}.{body}`, keyed by the secret |\n| `content-type` | `application/json` |\n\nSo the verification code you write for production works unchanged: the Svix libraries (`svix` for Node, Python, Go and others) and the check in the Webhooks section of the Kenso API docs accept these deliveries. Only the secret differs. The listener\'s secret is local: it is made on your machine the first time you run `listen`, stays the same on every run, and is never a real endpoint\'s secret. In production, use your endpoint\'s secret from `kenso webhook-endpoints get-signing-secret --webhook-endpoint-id <webhookEndpointId>`.\n\nFor scripts, take the secret without starting a listener:\n\n```bash\nexport KENSO_WEBHOOK_SECRET=$(kenso webhooks listen --print-secret)\n```\n\n## Output\n\nstdout gets one JSON line per event, for `jq` or an agent:\n\n```json\n{"eventId":"0b6f...","type":"reply.received","timestamp":"2026-11-15T10:00:00Z","source":"live","forward":{"url":"http://localhost:3000/hook","status":200,"ms":12},"data":{"eventType":"reply.received","...":"..."}}\n```\n\n- `source` is `live` for a real event and `trigger` for a sample.\n- `forward` is what your handler answered: `status`, or `error` (`ECONNREFUSED` when nothing listens there). It is absent without `--forward-to`.\n- `data` is the body your handler received (or would receive, without `--forward-to`).\n\nThe ready line, the secret and the summary at Ctrl-C go to stderr.\n\n## Live events\n\n`listen` reads the workspace\'s event log (`GET /v1/event-occurrences`), so it receives the types with `mcp: true` in `kenso webhook-event-types list` that your seat can see. It polls the log, so a real event arrives within about 30 s; a trigger arrives at once. `--events reply.received,meeting.booked` (or `--events` repeated) narrows the types.\n\nThe event log is not on for every workspace yet. Where it is off, `listen` says so in a warning and still forwards everything you trigger, so you can build the handler first.\n\n## Triggers\n\n`trigger` takes the type\'s sample from `GET /v1/webhook-event-types`, gives it a new `eventId` (`evt_test_...`) and the current `timestamp`, and hands it to the listener for this workspace, which prints and forwards it like a live event. It sends nothing to Kenso\'s event log, to your webhook endpoints or to anyone else. It exits 1 with `forward_failed` when your handler did not answer 2xx, and with `listener_not_running` when no listener runs for the workspace.\n\nTo send a sample to a real, deployed endpoint instead, use `kenso webhook-endpoints test --webhook-endpoint-id <webhookEndpointId> --event-type reply.received`.\n\n## Stopping\n\nCtrl-C stops the listener. `listen` creates no webhook endpoint, no event subscription and no tunnel, so there is nothing to delete in Kenso. Its polls do keep the workspace\'s event log recording: the log stops on its own 7 days after the last poll. A poll that fails (a network error, a 5xx) prints a warning and is tried again a minute later; a bad key or a refused request ends the listener. It removes its local state file (the address `trigger` uses) on the way out.\n\n## Related: your API request logs\n\n`kenso logs tail` follows the same polling pattern for your API calls: it prints each request made with a Kenso API key as it is logged, so you see a failed call as it happens.\n\n```bash\nkenso logs tail --status 4xx,5xx --since 10m\nkenso logs tail --key apk_3f9c -o json\n```\n\nOn a terminal each row is one line: time, `[status]`, method, path template, error code, duration, key id, request id. Piped, or with `-o json`, each row is one JSON object per line. A row is logged after its request finishes, so a slow request can print up to a minute out of order. Where request logs are not on for the workspace yet, it exits 4 with `Request logs are not on for this workspace yet.`\n';
7835
+ webhooks_default = '# Webhooks: listen and trigger\n\nBuild and test a webhook handler on your own machine, with no public tunnel and no webhook endpoint in Kenso. `kenso webhooks listen` streams your workspace\'s events, prints each one as JSON and forwards it to your handler, signed the way Kenso signs its deliveries. `kenso webhooks trigger` sends a sample event through the running listener.\n\n| Command | What it does |\n|---|---|\n| `webhooks listen --forward-to <url>` | Streams events, prints one JSON line each, and POSTs each to your handler |\n| `webhooks listen --print-secret` | Prints the local signing secret and exits |\n| `webhooks trigger <event-type>` | Sends that type\'s sample through the running listener |\n\n## Quick start\n\nIn one terminal:\n\n```bash\nkenso webhooks listen --forward-to http://localhost:3000/hook\n```\n\nIt prints its signing secret on stderr:\n\n```\nReady. Forwarding events to http://localhost:3000/hook.\nSigning secret: whsec_... (the same on every run; kept in ~/.kenso/webhooks/signing-secret).\n```\n\nPut that secret in your handler\'s config (for example `KENSO_WEBHOOK_SECRET`). In another terminal:\n\n```bash\nkenso webhooks trigger reply.received\n```\n\nThe listener prints the event and your handler receives it. `kenso webhook-event-types list` lists every type with its sample body.\n\n## What your handler receives\n\nEach forward is a `POST` with a JSON body shaped like a webhook delivery (no envelope, `eventType` at the top) and the headers a Kenso delivery carries. How full the body is depends on where the event came from:\n\n- **A trigger** sends the type\'s full sample body, the same shape a webhook endpoint receives in production.\n- **A live event** is sparse. The event log keeps only part of each delivery, so the body has `eventType`, `eventId`, `timestamp` and `clientId`, plus the ids, statuses and `links` at their delivery paths (`contact.id`, `campaign.id`, `reply.classification`, ...). Names, emails, reply text and the other fields are not there: read them with the API, or build that part of the handler against a trigger\'s sample.\n\nThe headers:\n\n| Header | Value |\n|---|---|\n| `svix-id` | The event\'s id. Dedupe on it |\n| `svix-timestamp` | Unix seconds of the send |\n| `svix-signature` | `v1,` and the base64 HMAC-SHA256 of `{svix-id}.{svix-timestamp}.{body}`, keyed by the secret |\n| `content-type` | `application/json` |\n\nSo the verification code you write for production works unchanged: the Svix libraries (`svix` for Node, Python, Go and others) and the check in the Webhooks section of the Kenso API docs accept these deliveries. Only the secret differs. The listener\'s secret is local: it is made on your machine the first time you run `listen`, stays the same on every run, and is never a real endpoint\'s secret. In production, use your endpoint\'s secret from `kenso webhook-endpoints get-signing-secret --webhook-endpoint-id <webhookEndpointId>`.\n\nFor scripts, take the secret without starting a listener:\n\n```bash\nexport KENSO_WEBHOOK_SECRET=$(kenso webhooks listen --print-secret)\n```\n\n## Output\n\nstdout gets one JSON line per event, for `jq` or an agent:\n\n```json\n{"eventId":"0b6f...","type":"reply.received","timestamp":"2026-11-15T10:00:00Z","source":"live","forward":{"url":"http://localhost:3000/hook","status":200,"ms":12},"data":{"eventType":"reply.received","...":"..."}}\n```\n\n- `source` is `live` for a real event and `trigger` for a sample.\n- `forward` is what your handler answered: `status`, or `error` (`ECONNREFUSED` when nothing listens there). It is absent without `--forward-to`.\n- `data` is the body your handler received (or would receive, without `--forward-to`).\n\nThe ready line, the secret and the summary at Ctrl-C go to stderr.\n\n## Live events\n\n`listen` reads the workspace\'s event log (`GET /v1/event-occurrences`), so it receives the types with `mcp: true` in `kenso webhook-event-types list` that your seat can see. It polls the log, so a real event arrives within about 30 s; a trigger arrives at once. `--events reply.received,meeting.booked` (or `--events` repeated) narrows the types.\n\nThe event log is on for every workspace. It records a workspace\'s events from its first poll, so an event from before `listen` started is not in it. If `listen` warns that live events are not on for the workspace, it still forwards everything you trigger, so you can build the handler first.\n\n## Triggers\n\n`trigger` takes the type\'s sample from `GET /v1/webhook-event-types`, gives it a new `eventId` (`evt_test_...`) and the current `timestamp`, and hands it to the listener for this workspace, which prints and forwards it like a live event. It sends nothing to Kenso\'s event log, to your webhook endpoints or to anyone else. It exits 1 with `forward_failed` when your handler did not answer 2xx, and with `listener_not_running` when no listener runs for the workspace.\n\nTo send a sample to a real, deployed endpoint instead, use `kenso webhook-endpoints test --webhook-endpoint-id <webhookEndpointId> --event-type reply.received`.\n\n## Stopping\n\nCtrl-C stops the listener. `listen` creates no webhook endpoint, no event subscription and no tunnel, so there is nothing to delete in Kenso. Its polls do keep the workspace\'s event log recording: the log stops on its own 7 days after the last poll. A poll that fails (a network error, a 5xx) prints a warning and is tried again a minute later; a bad key or a refused request ends the listener. It removes its local state file (the address `trigger` uses) on the way out.\n\n## Related: your API request logs\n\n`kenso logs tail` follows the same polling pattern for your API calls: it prints each request made with a Kenso API key as it is logged, so you see a failed call as it happens.\n\n```bash\nkenso logs tail --status 4xx,5xx --since 10m\nkenso logs tail --key apk_3f9c -o json\n```\n\nOn a terminal each row is one line: time, `[status]`, method, path template, error code, duration, key id, request id. Piped, or with `-o json`, each row is one JSON object per line. A row is logged after its request finishes, so a slow request can print up to a minute out of order. Where request logs are not on for the workspace yet, it exits 4 with `Request logs are not on for this workspace yet.`\n';
7836
7836
  }
7837
7837
  });
7838
7838
 
@@ -8976,8 +8976,8 @@ var init_browser_login = __esm({
8976
8976
  defaultDeps = {
8977
8977
  sleep: (ms, signal) => delay2(ms, void 0, signal ? { signal } : void 0),
8978
8978
  now: () => Date.now(),
8979
- spawn: (command49, args) => {
8980
- const child = nodeSpawn(command49, args, { detached: true, stdio: "ignore" });
8979
+ spawn: (command51, args) => {
8980
+ const child = nodeSpawn(command51, args, { detached: true, stdio: "ignore" });
8981
8981
  child.on("error", () => {
8982
8982
  });
8983
8983
  child.unref();
@@ -10166,8 +10166,8 @@ var init_run = __esm({
10166
10166
  defaultDeps2 = {
10167
10167
  sleep: (ms, signal) => delay3(ms, void 0, signal ? { signal } : void 0),
10168
10168
  now: () => Date.now(),
10169
- spawn: (command49, args) => {
10170
- const child = nodeSpawn2(command49, args, { detached: true, stdio: "ignore" });
10169
+ spawn: (command51, args) => {
10170
+ const child = nodeSpawn2(command51, args, { detached: true, stdio: "ignore" });
10171
10171
  child.on("error", () => {
10172
10172
  });
10173
10173
  child.unref();
@@ -10208,9 +10208,9 @@ function stringFlag2(flags, name) {
10208
10208
  const text4 = value.trim();
10209
10209
  return text4 === "" ? void 0 : text4;
10210
10210
  }
10211
- function requireFlag(flags, name, command49, hint) {
10211
+ function requireFlag(flags, name, command51, hint) {
10212
10212
  const value = stringFlag2(flags, name);
10213
- if (value === void 0) throw usageError(`--${name} is required for ${command49}.`, { field: name, next: `${command49} --help`, ...hint ? { hint } : {} });
10213
+ if (value === void 0) throw usageError(`--${name} is required for ${command51}.`, { field: name, next: `${command51} --help`, ...hint ? { hint } : {} });
10214
10214
  return value;
10215
10215
  }
10216
10216
  function positiveId(value) {
@@ -10219,8 +10219,8 @@ function positiveId(value) {
10219
10219
  const id = Number(text4);
10220
10220
  return Number.isSafeInteger(id) && id > 0 ? id : void 0;
10221
10221
  }
10222
- function idFlag(flags, name, command49) {
10223
- const raw = requireFlag(flags, name, command49);
10222
+ function idFlag(flags, name, command51) {
10223
+ const raw = requireFlag(flags, name, command51);
10224
10224
  const id = positiveId(raw);
10225
10225
  if (id === void 0) throw usageError(`--${name} must be a positive whole number (got "${raw}").`, { field: name });
10226
10226
  return id;
@@ -10240,8 +10240,8 @@ function isDryRun(ctx) {
10240
10240
  function shellQuote4(value) {
10241
10241
  return /^[A-Za-z0-9_\-.,:/@=+%]+$/.test(value) ? value : `'${value.replace(/'/g, `'\\''`)}'`;
10242
10242
  }
10243
- function sameCommand2(command49, flags, ctx, extra = []) {
10244
- const parts2 = [command49];
10243
+ function sameCommand2(command51, flags, ctx, extra = []) {
10244
+ const parts2 = [command51];
10245
10245
  for (const [name, value] of Object.entries(flags)) {
10246
10246
  if (value === void 0 || value === false) continue;
10247
10247
  if (value === true) parts2.push(`--${name}`);
@@ -11378,12 +11378,12 @@ import { join as join11 } from "node:path";
11378
11378
  function whereDir(env) {
11379
11379
  return join11(runsRoot(env), WHERE_DIR);
11380
11380
  }
11381
- async function unfinishedWhereIds(ctx, command49, args) {
11381
+ async function unfinishedWhereIds(ctx, command51, args) {
11382
11382
  const dir = whereDir(ctx.env);
11383
11383
  const identity = argsIdentity(args);
11384
11384
  const workspaceId = ctx.client.workspaceId ?? ctx.auth.workspaceId;
11385
11385
  for (const run of await listRuns(ctx.env)) {
11386
- if (run.command !== command49 || run.status === "done" || run.status === "planned") continue;
11386
+ if (run.command !== command51 || run.status === "done" || run.status === "planned") continue;
11387
11387
  if ((run.workspaceId || void 0) !== (workspaceId || void 0) || argsIdentity(run.args) !== identity) continue;
11388
11388
  if (run.inputPath?.startsWith(`${dir}/`) && existsSync6(run.inputPath)) return run.inputPath;
11389
11389
  }
@@ -11529,14 +11529,14 @@ async function idsFromRun(ctx, runId) {
11529
11529
  return { ...idItems(ids2), source: "run" };
11530
11530
  }
11531
11531
  async function collectIds(ctx, flags, kind, dryRun2) {
11532
- const command49 = `kenso contacts ${kind}`;
11532
+ const command51 = `kenso contacts ${kind}`;
11533
11533
  const ids2 = stringFlag2(flags, "ids");
11534
11534
  const where = kind === "restore" ? void 0 : stringFlag2(flags, "where");
11535
11535
  const run = kind === "restore" ? stringFlag2(flags, "run") : void 0;
11536
11536
  const given = [ids2, where, run].filter((v) => v !== void 0).length;
11537
11537
  if (given !== 1) {
11538
11538
  const choices = kind === "restore" ? "--ids <file|-> or --run <runId>" : "--ids <file|-> or --where '<json>'";
11539
- throw usageError(`${command49} needs exactly one of ${choices}.`, { field: "ids", next: `${command49} --help` });
11539
+ throw usageError(`${command51} needs exactly one of ${choices}.`, { field: "ids", next: `${command51} --help` });
11540
11540
  }
11541
11541
  if (ids2 !== void 0) return idsFromFile(ctx, ids2);
11542
11542
  if (where !== void 0) return idsFromWhere(ctx, kind, flags, where, dryRun2);
@@ -11926,6 +11926,87 @@ var init_contacts = __esm({
11926
11926
  }
11927
11927
  });
11928
11928
 
11929
+ // src/commands/dashboards/show.ts
11930
+ var show_exports = {};
11931
+ __export(show_exports, {
11932
+ default: () => show_default
11933
+ });
11934
+ var command18, show_default;
11935
+ var init_show = __esm({
11936
+ "src/commands/dashboards/show.ts"() {
11937
+ "use strict";
11938
+ init_errors();
11939
+ init_exit_codes();
11940
+ init_http();
11941
+ command18 = {
11942
+ resource: "dashboards",
11943
+ action: "show",
11944
+ summary: "Run a dashboard's charts and print their numbers",
11945
+ description: "Reads GET /v1/dashboards/{dashboardId}?include=results and prints one row per chart bucket: the chart's id and title, the bucket's label, the measure the chart draws (valueKey) and its value. Amounts are in the workspace currency. The dashboard's name, each chart's total and any chart that could not run are printed to stderr. The numbers cover the deals you may read. --full prints the whole answer as one object, each chart with its stored report or query and its full result. List dashboards with kenso dashboards list.",
11946
+ flags: {
11947
+ "time-zone": { type: "string", description: "IANA zone days start in when you have no app time zone (default UTC)" },
11948
+ full: { type: "boolean", description: "Print the API's whole answer instead of the rows" }
11949
+ },
11950
+ positionals: [{ name: "dashboardId", required: true, description: "The dashboard's id, from kenso dashboards list" }],
11951
+ examples: ["kenso dashboards show 9", "kenso dashboards show 9 --full"],
11952
+ beta: { featureGates: { all: ["opportunities", "reports"] } },
11953
+ operationIds: ["dashboards.get"],
11954
+ async run(ctx, { flags, positionals }) {
11955
+ const id = (positionals[0] ?? "").trim();
11956
+ if (!/^[1-9]\d*$/.test(id)) {
11957
+ throw usageError(`"${id}" is not a dashboard id.`, { field: "dashboardId", next: "kenso dashboards list" });
11958
+ }
11959
+ const res = await ctx.client.request({
11960
+ method: "GET",
11961
+ path: `/v1/dashboards/${id}`,
11962
+ query: { include: "results", timeZone: typeof flags["time-zone"] === "string" ? flags["time-zone"] : void 0 },
11963
+ signal: ctx.signal
11964
+ });
11965
+ const data = unwrap(res.body);
11966
+ if (flags.full === true) {
11967
+ ctx.output.object(data);
11968
+ return ExitCode.Ok;
11969
+ }
11970
+ ctx.output.info(`${data.name} (${data.visibility}${data.isOwn ? "" : ", shared with you"}), ${data.charts.length} charts`);
11971
+ const rows = [];
11972
+ for (const chart of data.charts) {
11973
+ const measure = chart.valueKey ?? "";
11974
+ if (!chart.result) {
11975
+ ctx.output.info(`${chart.title}: ${chart.error ?? "no result"}`);
11976
+ continue;
11977
+ }
11978
+ const money = chart.result.measures?.find((m) => m.key === measure)?.format === "money";
11979
+ const total = `${chart.title}: ${measure} ${chart.result.totals[measure] ?? 0}`;
11980
+ ctx.output.info(money ? `${total} (${chart.result.currency})` : total);
11981
+ for (const bucket of chart.result.buckets) {
11982
+ rows.push({
11983
+ chart: chart.id,
11984
+ title: chart.title,
11985
+ bucket: bucket.labels.join(" / ") || bucket.keys.join(" / "),
11986
+ measure,
11987
+ value: bucket.values[measure] ?? null
11988
+ });
11989
+ }
11990
+ }
11991
+ await ctx.output.list(rows);
11992
+ return ExitCode.Ok;
11993
+ }
11994
+ };
11995
+ show_default = command18;
11996
+ }
11997
+ });
11998
+
11999
+ // src/commands/dashboards/index.ts
12000
+ var actions9;
12001
+ var init_dashboards = __esm({
12002
+ "src/commands/dashboards/index.ts"() {
12003
+ "use strict";
12004
+ actions9 = {
12005
+ show: () => Promise.resolve().then(() => (init_show(), show_exports)).then((m) => m.default)
12006
+ };
12007
+ }
12008
+ });
12009
+
11929
12010
  // src/commands/describe/describe.ts
11930
12011
  var describe_exports = {};
11931
12012
  __export(describe_exports, {
@@ -12034,7 +12115,7 @@ function unknown(words) {
12034
12115
  next: "kenso describe"
12035
12116
  });
12036
12117
  }
12037
- var command18, describe_default;
12118
+ var command19, describe_default;
12038
12119
  var init_describe = __esm({
12039
12120
  "src/commands/describe/describe.ts"() {
12040
12121
  "use strict";
@@ -12047,7 +12128,7 @@ var init_describe = __esm({
12047
12128
  init_manifest();
12048
12129
  init_help();
12049
12130
  init_registry();
12050
- command18 = {
12131
+ command19 = {
12051
12132
  resource: "describe",
12052
12133
  action: "",
12053
12134
  summary: "The command map as JSON: commands, flags, body schemas",
@@ -12088,16 +12169,16 @@ var init_describe = __esm({
12088
12169
  return ExitCode.Ok;
12089
12170
  }
12090
12171
  };
12091
- describe_default = command18;
12172
+ describe_default = command19;
12092
12173
  }
12093
12174
  });
12094
12175
 
12095
12176
  // src/commands/describe/index.ts
12096
- var actions9;
12177
+ var actions10;
12097
12178
  var init_describe2 = __esm({
12098
12179
  "src/commands/describe/index.ts"() {
12099
12180
  "use strict";
12100
- actions9 = {
12181
+ actions10 = {
12101
12182
  "": () => Promise.resolve().then(() => (init_describe(), describe_exports)).then((m) => m.default)
12102
12183
  };
12103
12184
  }
@@ -12112,7 +12193,7 @@ function findTopic(input) {
12112
12193
  const name = input.trim().toLowerCase().replace(/\.md$/, "");
12113
12194
  return TOPICS.find((t) => t.topic === name);
12114
12195
  }
12115
- var NAMES, command19, docs_default;
12196
+ var NAMES, command20, docs_default;
12116
12197
  var init_docs = __esm({
12117
12198
  "src/commands/docs/docs.ts"() {
12118
12199
  "use strict";
@@ -12120,7 +12201,7 @@ var init_docs = __esm({
12120
12201
  init_exit_codes();
12121
12202
  init_content();
12122
12203
  NAMES = TOPICS.map((t) => t.topic).join(", ");
12123
- command19 = {
12204
+ command20 = {
12124
12205
  resource: "docs",
12125
12206
  action: "",
12126
12207
  summary: "Offline docs: the topic list, or one topic",
@@ -12161,16 +12242,16 @@ var init_docs = __esm({
12161
12242
  return ExitCode.Ok;
12162
12243
  }
12163
12244
  };
12164
- docs_default = command19;
12245
+ docs_default = command20;
12165
12246
  }
12166
12247
  });
12167
12248
 
12168
12249
  // src/commands/docs/index.ts
12169
- var actions10;
12250
+ var actions11;
12170
12251
  var init_docs2 = __esm({
12171
12252
  "src/commands/docs/index.ts"() {
12172
12253
  "use strict";
12173
- actions10 = {
12254
+ actions11 = {
12174
12255
  "": () => Promise.resolve().then(() => (init_docs(), docs_exports)).then((m) => m.default)
12175
12256
  };
12176
12257
  }
@@ -12199,7 +12280,7 @@ function configCheck(env) {
12199
12280
  const octal = mode.toString(8).padStart(4, "0");
12200
12281
  return mode === 384 ? { name: "config_permissions", ok: true, detail: `${file} is ${octal}` } : { name: "config_permissions", ok: false, detail: `${file} is ${octal}: run chmod 600 ${file}` };
12201
12282
  }
12202
- var MIN_NODE_MAJOR, command20, actions11;
12283
+ var MIN_NODE_MAJOR, command21, actions12;
12203
12284
  var init_doctor = __esm({
12204
12285
  "src/commands/doctor/index.ts"() {
12205
12286
  "use strict";
@@ -12208,7 +12289,7 @@ var init_doctor = __esm({
12208
12289
  init_exit_codes();
12209
12290
  init_http();
12210
12291
  MIN_NODE_MAJOR = 22;
12211
- command20 = {
12292
+ command21 = {
12212
12293
  resource: "doctor",
12213
12294
  action: "",
12214
12295
  summary: "Check Node, the config, the API and the key",
@@ -12272,18 +12353,18 @@ var init_doctor = __esm({
12272
12353
  return keyFailed ? ExitCode.Auth : ExitCode.Error;
12273
12354
  }
12274
12355
  };
12275
- actions11 = {
12276
- "": async () => command20
12356
+ actions12 = {
12357
+ "": async () => command21
12277
12358
  };
12278
12359
  }
12279
12360
  });
12280
12361
 
12281
12362
  // src/commands/jobs/index.ts
12282
- var actions12;
12363
+ var actions13;
12283
12364
  var init_jobs2 = __esm({
12284
12365
  "src/commands/jobs/index.ts"() {
12285
12366
  "use strict";
12286
- actions12 = {
12367
+ actions13 = {
12287
12368
  wait: () => Promise.resolve().then(() => (init_wait(), wait_exports)).then((m) => m.default)
12288
12369
  };
12289
12370
  }
@@ -12316,7 +12397,7 @@ function readable(row) {
12316
12397
  const parts2 = [time, `[${row.status}]`, row.method, row.pathTemplate, row.errorCode, `${row.durationMs}ms`, row.apiKeyId, row.requestId];
12317
12398
  return parts2.filter((p) => p !== void 0 && p !== "").join(" ");
12318
12399
  }
12319
- var MIN_INTERVAL_MS, MAX_INTERVAL_MS, MAX_SINCE_MS, OVERLAP_MS, MAX_PAGES, RATE_LIMITED_WAIT_MS, isOwnPoll, pad, command21, tail_default;
12400
+ var MIN_INTERVAL_MS, MAX_INTERVAL_MS, MAX_SINCE_MS, OVERLAP_MS, MAX_PAGES, RATE_LIMITED_WAIT_MS, isOwnPoll, pad, command22, tail_default;
12320
12401
  var init_tail = __esm({
12321
12402
  "src/commands/logs/tail.ts"() {
12322
12403
  "use strict";
@@ -12332,7 +12413,7 @@ var init_tail = __esm({
12332
12413
  RATE_LIMITED_WAIT_MS = 3e4;
12333
12414
  isOwnPoll = (row) => row.method === "GET" && row.pathTemplate === "/v1/api-requests" && row.userAgent?.startsWith("kenso-cli/") === true;
12334
12415
  pad = (n) => String(n).padStart(2, "0");
12335
- command21 = {
12416
+ command22 = {
12336
12417
  resource: "logs",
12337
12418
  action: "tail",
12338
12419
  summary: "Stream your workspace's new API request log rows",
@@ -12438,16 +12519,16 @@ var init_tail = __esm({
12438
12519
  return ExitCode.Ok;
12439
12520
  }
12440
12521
  };
12441
- tail_default = command21;
12522
+ tail_default = command22;
12442
12523
  }
12443
12524
  });
12444
12525
 
12445
12526
  // src/commands/logs/index.ts
12446
- var actions13;
12527
+ var actions14;
12447
12528
  var init_logs = __esm({
12448
12529
  "src/commands/logs/index.ts"() {
12449
12530
  "use strict";
12450
- actions13 = {
12531
+ actions14 = {
12451
12532
  tail: () => Promise.resolve().then(() => (init_tail(), tail_exports)).then((m) => m.default)
12452
12533
  };
12453
12534
  }
@@ -12503,7 +12584,7 @@ function isRecord7(value) {
12503
12584
  function textOf(result) {
12504
12585
  return (result.content ?? []).filter((part) => part.type === "text" && typeof part.text === "string").map((part) => part.text).join("\n");
12505
12586
  }
12506
- var command22, call_default;
12587
+ var command23, call_default;
12507
12588
  var init_call = __esm({
12508
12589
  "src/commands/mcp/call.ts"() {
12509
12590
  "use strict";
@@ -12511,7 +12592,7 @@ var init_call = __esm({
12511
12592
  init_exit_codes();
12512
12593
  init_input();
12513
12594
  init_connect4();
12514
- command22 = {
12595
+ command23 = {
12515
12596
  resource: "mcp",
12516
12597
  action: "call",
12517
12598
  summary: "Call a hosted Kenso MCP tool, such as list_skills",
@@ -12564,7 +12645,7 @@ var init_call = __esm({
12564
12645
  return ExitCode.Ok;
12565
12646
  }
12566
12647
  };
12567
- call_default = command22;
12648
+ call_default = command23;
12568
12649
  }
12569
12650
  });
12570
12651
 
@@ -12573,13 +12654,13 @@ var tools_exports = {};
12573
12654
  __export(tools_exports, {
12574
12655
  default: () => tools_default
12575
12656
  });
12576
- var command23, tools_default;
12657
+ var command24, tools_default;
12577
12658
  var init_tools = __esm({
12578
12659
  "src/commands/mcp/tools.ts"() {
12579
12660
  "use strict";
12580
12661
  init_exit_codes();
12581
12662
  init_connect4();
12582
- command23 = {
12663
+ command24 = {
12583
12664
  resource: "mcp",
12584
12665
  action: "tools",
12585
12666
  summary: "List the hosted Kenso MCP's tools",
@@ -12594,16 +12675,16 @@ var init_tools = __esm({
12594
12675
  return ExitCode.Ok;
12595
12676
  }
12596
12677
  };
12597
- tools_default = command23;
12678
+ tools_default = command24;
12598
12679
  }
12599
12680
  });
12600
12681
 
12601
12682
  // src/commands/mcp/index.ts
12602
- var actions14;
12683
+ var actions15;
12603
12684
  var init_mcp = __esm({
12604
12685
  "src/commands/mcp/index.ts"() {
12605
12686
  "use strict";
12606
- actions14 = {
12687
+ actions15 = {
12607
12688
  call: () => Promise.resolve().then(() => (init_call(), call_exports)).then((m) => m.default),
12608
12689
  tools: () => Promise.resolve().then(() => (init_tools(), tools_exports)).then((m) => m.default)
12609
12690
  };
@@ -12615,14 +12696,14 @@ var stage_history_exports = {};
12615
12696
  __export(stage_history_exports, {
12616
12697
  default: () => stage_history_default
12617
12698
  });
12618
- var command24, stage_history_default;
12699
+ var command25, stage_history_default;
12619
12700
  var init_stage_history = __esm({
12620
12701
  "src/commands/opportunities/stage-history.ts"() {
12621
12702
  "use strict";
12622
12703
  init_errors();
12623
12704
  init_exit_codes();
12624
12705
  init_http();
12625
- command24 = {
12706
+ command25 = {
12626
12707
  resource: "opportunities",
12627
12708
  action: "stage-history",
12628
12709
  summary: "Show a deal's stage history: each stage, when, who moved it and how long it sat there",
@@ -12646,16 +12727,16 @@ var init_stage_history = __esm({
12646
12727
  return ExitCode.Ok;
12647
12728
  }
12648
12729
  };
12649
- stage_history_default = command24;
12730
+ stage_history_default = command25;
12650
12731
  }
12651
12732
  });
12652
12733
 
12653
12734
  // src/commands/opportunities/index.ts
12654
- var actions15;
12735
+ var actions16;
12655
12736
  var init_opportunities = __esm({
12656
12737
  "src/commands/opportunities/index.ts"() {
12657
12738
  "use strict";
12658
- actions15 = {
12739
+ actions16 = {
12659
12740
  "stage-history": () => Promise.resolve().then(() => (init_stage_history(), stage_history_exports)).then((m) => m.default)
12660
12741
  };
12661
12742
  }
@@ -12732,7 +12813,7 @@ function summarize3(results) {
12732
12813
  }
12733
12814
  return { matched, addedToAccounts, emailFindsQueued };
12734
12815
  }
12735
- var COMMAND5, CHUNK_SIZE6, ALIASES3, PERSON_FIELDS, ACCOUNT_NOT_FOUND, command25, import_default3;
12816
+ var COMMAND5, CHUNK_SIZE6, ALIASES3, PERSON_FIELDS, ACCOUNT_NOT_FOUND, command26, import_default3;
12736
12817
  var init_import3 = __esm({
12737
12818
  "src/commands/people/import.ts"() {
12738
12819
  "use strict";
@@ -12764,7 +12845,7 @@ var init_import3 = __esm({
12764
12845
  };
12765
12846
  PERSON_FIELDS = ["email", "fullName", "firstName", "lastName", "linkedinUrl", "title"];
12766
12847
  ACCOUNT_NOT_FOUND = "No account in this workspace has that domain. The person was saved without an account: add the account (kenso accounts import) and run the same command again.";
12767
- command25 = {
12848
+ command26 = {
12768
12849
  resource: "people",
12769
12850
  action: "import",
12770
12851
  summary: "Create or match people from a CSV or JSONL file, optionally onto accounts",
@@ -12829,16 +12910,16 @@ var init_import3 = __esm({
12829
12910
  return outcome.exitCode;
12830
12911
  }
12831
12912
  };
12832
- import_default3 = command25;
12913
+ import_default3 = command26;
12833
12914
  }
12834
12915
  });
12835
12916
 
12836
12917
  // src/commands/people/index.ts
12837
- var actions16;
12918
+ var actions17;
12838
12919
  var init_people = __esm({
12839
12920
  "src/commands/people/index.ts"() {
12840
12921
  "use strict";
12841
- actions16 = {
12922
+ actions17 = {
12842
12923
  import: () => Promise.resolve().then(() => (init_import3(), import_exports3)).then((m) => m.default)
12843
12924
  };
12844
12925
  }
@@ -12849,7 +12930,7 @@ var run_exports2 = {};
12849
12930
  __export(run_exports2, {
12850
12931
  default: () => run_default
12851
12932
  });
12852
- var REPORTS, command26, run_default;
12933
+ var REPORTS, command27, run_default;
12853
12934
  var init_run2 = __esm({
12854
12935
  "src/commands/reports/run.ts"() {
12855
12936
  "use strict";
@@ -12857,7 +12938,7 @@ var init_run2 = __esm({
12857
12938
  init_exit_codes();
12858
12939
  init_http();
12859
12940
  REPORTS = ["pipeline_by_stage", "won_by_month", "stage_conversion", "time_in_stage", "won_by_source_campaign", "activity_by_member"];
12860
- command26 = {
12941
+ command27 = {
12861
12942
  resource: "reports",
12862
12943
  action: "run",
12863
12944
  summary: "Run a stock pipeline report and print its table",
@@ -12918,17 +12999,89 @@ var init_run2 = __esm({
12918
12999
  return ExitCode.Ok;
12919
13000
  }
12920
13001
  };
12921
- run_default = command26;
13002
+ run_default = command27;
13003
+ }
13004
+ });
13005
+
13006
+ // src/commands/reports/summary.ts
13007
+ var summary_exports = {};
13008
+ __export(summary_exports, {
13009
+ default: () => summary_default
13010
+ });
13011
+ var command28, summary_default;
13012
+ var init_summary = __esm({
13013
+ "src/commands/reports/summary.ts"() {
13014
+ "use strict";
13015
+ init_errors();
13016
+ init_exit_codes();
13017
+ init_http();
13018
+ command28 = {
13019
+ resource: "reports",
13020
+ action: "summary",
13021
+ summary: "Read where the period stands and what needs you",
13022
+ description: "Reads GET /v1/reports/summary. Prints the summary in words, the four numbers (closed won, open pipeline, weighted, win rate; a fraction from 0 to 1) and each thing that needs you with the report that shows it to stderr, then one row per stock report: its key, the question it answers and its headline value, format and label. Run a report with kenso reports run <report>. --full prints the whole answer as one object.",
13023
+ flags: {
13024
+ period: {
13025
+ type: "string",
13026
+ description: "this_month, last_month, this_quarter (default), last_quarter, this_year, last_year, last_30_days, last_90_days, a month (2026-03), a quarter (2026-Q1), a year (2026) or a day range (2026-03-01..2026-03-31)"
13027
+ },
13028
+ owner: { type: "string", description: "Only this member's deals (a member id)", aliases: ["owner-member-id"] },
13029
+ "time-zone": { type: "string", description: "IANA zone days start in when you have no app time zone (default UTC)" },
13030
+ full: { type: "boolean", description: "Print the API's whole answer instead of the rows" }
13031
+ },
13032
+ examples: ["kenso reports summary", "kenso reports summary --period last_quarter --owner 41", "kenso reports summary --full"],
13033
+ beta: { featureGates: { all: ["opportunities", "reports"] } },
13034
+ operationIds: ["reports.summary"],
13035
+ async run(ctx, { flags }) {
13036
+ const owner = typeof flags.owner === "string" ? flags.owner.trim() : void 0;
13037
+ if (owner !== void 0 && !/^[1-9]\d*$/.test(owner)) {
13038
+ throw usageError(`--owner must be a member id (got "${owner}").`, { field: "owner", next: "kenso members list" });
13039
+ }
13040
+ const res = await ctx.client.request({
13041
+ method: "GET",
13042
+ path: "/v1/reports/summary",
13043
+ query: {
13044
+ period: typeof flags.period === "string" ? flags.period : void 0,
13045
+ ownerMemberId: owner,
13046
+ timeZone: typeof flags["time-zone"] === "string" ? flags["time-zone"] : void 0
13047
+ },
13048
+ signal: ctx.signal
13049
+ });
13050
+ const data = unwrap(res.body);
13051
+ if (flags.full === true) {
13052
+ ctx.output.object(data);
13053
+ return ExitCode.Ok;
13054
+ }
13055
+ ctx.output.info(`${data.period.from} to ${data.period.to} (${data.currency})`);
13056
+ ctx.output.info(data.read);
13057
+ ctx.output.info(data.stats.map((s) => `${s.label} ${s.value ?? "-"}${s.previous === void 0 ? "" : ` (was ${s.previous})`}`).join(", "));
13058
+ for (const need of data.needsYou) {
13059
+ ctx.output.info(`Needs you: ${need.title}. ${need.detail} (kenso reports run ${need.reportKey})`);
13060
+ }
13061
+ await ctx.output.list(
13062
+ data.reports.map((r) => ({
13063
+ report: r.key,
13064
+ question: r.question,
13065
+ value: r.headline?.value ?? null,
13066
+ format: r.headline?.format ?? null,
13067
+ label: r.headline?.label ?? r.note ?? null
13068
+ }))
13069
+ );
13070
+ return ExitCode.Ok;
13071
+ }
13072
+ };
13073
+ summary_default = command28;
12922
13074
  }
12923
13075
  });
12924
13076
 
12925
13077
  // src/commands/reports/index.ts
12926
- var actions17;
13078
+ var actions18;
12927
13079
  var init_reports = __esm({
12928
13080
  "src/commands/reports/index.ts"() {
12929
13081
  "use strict";
12930
- actions17 = {
12931
- run: () => Promise.resolve().then(() => (init_run2(), run_exports2)).then((m) => m.default)
13082
+ actions18 = {
13083
+ run: () => Promise.resolve().then(() => (init_run2(), run_exports2)).then((m) => m.default),
13084
+ summary: () => Promise.resolve().then(() => (init_summary(), summary_exports)).then((m) => m.default)
12932
13085
  };
12933
13086
  }
12934
13087
  });
@@ -12938,14 +13091,14 @@ var list_exports = {};
12938
13091
  __export(list_exports, {
12939
13092
  default: () => list_default
12940
13093
  });
12941
- var command27, list_default;
13094
+ var command29, list_default;
12942
13095
  var init_list = __esm({
12943
13096
  "src/commands/runs/list.ts"() {
12944
13097
  "use strict";
12945
13098
  init_runs();
12946
13099
  init_errors();
12947
13100
  init_exit_codes();
12948
- command27 = {
13101
+ command29 = {
12949
13102
  resource: "runs",
12950
13103
  action: "list",
12951
13104
  summary: "List batch runs, newest first (finds an interrupted run)",
@@ -12966,19 +13119,19 @@ var init_list = __esm({
12966
13119
  return ExitCode.Ok;
12967
13120
  }
12968
13121
  };
12969
- list_default = command27;
13122
+ list_default = command29;
12970
13123
  }
12971
13124
  });
12972
13125
 
12973
13126
  // src/commands/runs/show.ts
12974
- var show_exports = {};
12975
- __export(show_exports, {
12976
- default: () => show_default
13127
+ var show_exports2 = {};
13128
+ __export(show_exports2, {
13129
+ default: () => show_default2
12977
13130
  });
12978
13131
  import { existsSync as existsSync7, readFileSync as readFileSync9 } from "node:fs";
12979
13132
  import { join as join12 } from "node:path";
12980
- var FILES, command28, show_default;
12981
- var init_show = __esm({
13133
+ var FILES, command30, show_default2;
13134
+ var init_show2 = __esm({
12982
13135
  "src/commands/runs/show.ts"() {
12983
13136
  "use strict";
12984
13137
  init_runs();
@@ -12992,7 +13145,7 @@ var init_show = __esm({
12992
13145
  ["plan", "plan.json"],
12993
13146
  ["summary", "summary.json"]
12994
13147
  ];
12995
- command28 = {
13148
+ command30 = {
12996
13149
  resource: "runs",
12997
13150
  action: "show",
12998
13151
  summary: "Show one batch run and its files",
@@ -13019,7 +13172,7 @@ var init_show = __esm({
13019
13172
  return ExitCode.Ok;
13020
13173
  }
13021
13174
  };
13022
- show_default = command28;
13175
+ show_default2 = command30;
13023
13176
  }
13024
13177
  });
13025
13178
 
@@ -13078,14 +13231,14 @@ function resumeArgv(run, globals = {}) {
13078
13231
  async function sha256(path) {
13079
13232
  return createHash5("sha256").update(await readFile9(path)).digest("hex");
13080
13233
  }
13081
- var SKIPPED_KEYS, command29, resume_default;
13234
+ var SKIPPED_KEYS, command31, resume_default;
13082
13235
  var init_resume = __esm({
13083
13236
  "src/commands/runs/resume.ts"() {
13084
13237
  "use strict";
13085
13238
  init_runs();
13086
13239
  init_errors();
13087
13240
  SKIPPED_KEYS = /* @__PURE__ */ new Set(["positionals", "yes", "dryRun", "dry-run", "help", "version"]);
13088
- command29 = {
13241
+ command31 = {
13089
13242
  resource: "runs",
13090
13243
  action: "resume",
13091
13244
  summary: "Continue an interrupted batch run (its command with --yes, no dry run)",
@@ -13140,18 +13293,18 @@ var init_resume = __esm({
13140
13293
  }
13141
13294
  }
13142
13295
  };
13143
- resume_default = command29;
13296
+ resume_default = command31;
13144
13297
  }
13145
13298
  });
13146
13299
 
13147
13300
  // src/commands/runs/index.ts
13148
- var actions18;
13301
+ var actions19;
13149
13302
  var init_runs2 = __esm({
13150
13303
  "src/commands/runs/index.ts"() {
13151
13304
  "use strict";
13152
- actions18 = {
13305
+ actions19 = {
13153
13306
  list: () => Promise.resolve().then(() => (init_list(), list_exports)).then((m) => m.default),
13154
- show: () => Promise.resolve().then(() => (init_show(), show_exports)).then((m) => m.default),
13307
+ show: () => Promise.resolve().then(() => (init_show2(), show_exports2)).then((m) => m.default),
13155
13308
  resume: () => Promise.resolve().then(() => (init_resume(), resume_exports)).then((m) => m.default)
13156
13309
  };
13157
13310
  }
@@ -13248,7 +13401,7 @@ var create_exports = {};
13248
13401
  __export(create_exports, {
13249
13402
  default: () => create_default
13250
13403
  });
13251
- var command30, create_default;
13404
+ var command32, create_default;
13252
13405
  var init_create = __esm({
13253
13406
  "src/commands/sandbox/create.ts"() {
13254
13407
  "use strict";
@@ -13256,7 +13409,7 @@ var init_create = __esm({
13256
13409
  init_exit_codes();
13257
13410
  init_http();
13258
13411
  init_shared();
13259
- command30 = {
13412
+ command32 = {
13260
13413
  resource: "sandbox",
13261
13414
  action: "create",
13262
13415
  summary: "Create your developer sandbox and save its test key as the sandbox profile",
@@ -13298,7 +13451,7 @@ var init_create = __esm({
13298
13451
  return ExitCode.Ok;
13299
13452
  }
13300
13453
  };
13301
- create_default = command30;
13454
+ create_default = command32;
13302
13455
  }
13303
13456
  });
13304
13457
 
@@ -13307,7 +13460,7 @@ var delete_exports = {};
13307
13460
  __export(delete_exports, {
13308
13461
  default: () => delete_default
13309
13462
  });
13310
- var command31, delete_default;
13463
+ var command33, delete_default;
13311
13464
  var init_delete = __esm({
13312
13465
  "src/commands/sandbox/delete.ts"() {
13313
13466
  "use strict";
@@ -13315,7 +13468,7 @@ var init_delete = __esm({
13315
13468
  init_confirm();
13316
13469
  init_exit_codes();
13317
13470
  init_shared();
13318
- command31 = {
13471
+ command33 = {
13319
13472
  resource: "sandbox",
13320
13473
  action: "delete",
13321
13474
  summary: "Delete your sandbox and its test keys",
@@ -13342,7 +13495,7 @@ var init_delete = __esm({
13342
13495
  return ExitCode.Ok;
13343
13496
  }
13344
13497
  };
13345
- delete_default = command31;
13498
+ delete_default = command33;
13346
13499
  }
13347
13500
  });
13348
13501
 
@@ -13351,14 +13504,14 @@ var key_exports = {};
13351
13504
  __export(key_exports, {
13352
13505
  default: () => key_default
13353
13506
  });
13354
- var command32, key_default;
13507
+ var command34, key_default;
13355
13508
  var init_key = __esm({
13356
13509
  "src/commands/sandbox/key.ts"() {
13357
13510
  "use strict";
13358
13511
  init_exit_codes();
13359
13512
  init_http();
13360
13513
  init_shared();
13361
- command32 = {
13514
+ command34 = {
13362
13515
  resource: "sandbox",
13363
13516
  action: "key",
13364
13517
  summary: "Create a new test key for your sandbox and save it as the sandbox profile",
@@ -13378,7 +13531,7 @@ var init_key = __esm({
13378
13531
  return ExitCode.Ok;
13379
13532
  }
13380
13533
  };
13381
- key_default = command32;
13534
+ key_default = command34;
13382
13535
  }
13383
13536
  });
13384
13537
 
@@ -13387,13 +13540,13 @@ var list_exports2 = {};
13387
13540
  __export(list_exports2, {
13388
13541
  default: () => list_default2
13389
13542
  });
13390
- var command33, list_default2;
13543
+ var command35, list_default2;
13391
13544
  var init_list2 = __esm({
13392
13545
  "src/commands/sandbox/list.ts"() {
13393
13546
  "use strict";
13394
13547
  init_exit_codes();
13395
13548
  init_shared();
13396
- command33 = {
13549
+ command35 = {
13397
13550
  resource: "sandbox",
13398
13551
  action: "list",
13399
13552
  summary: "List your developer sandbox",
@@ -13409,7 +13562,7 @@ var init_list2 = __esm({
13409
13562
  return ExitCode.Ok;
13410
13563
  }
13411
13564
  };
13412
- list_default2 = command33;
13565
+ list_default2 = command35;
13413
13566
  }
13414
13567
  });
13415
13568
 
@@ -13418,14 +13571,14 @@ var reset_exports = {};
13418
13571
  __export(reset_exports, {
13419
13572
  default: () => reset_default
13420
13573
  });
13421
- var command34, reset_default;
13574
+ var command36, reset_default;
13422
13575
  var init_reset = __esm({
13423
13576
  "src/commands/sandbox/reset.ts"() {
13424
13577
  "use strict";
13425
13578
  init_exit_codes();
13426
13579
  init_http();
13427
13580
  init_shared();
13428
- command34 = {
13581
+ command36 = {
13429
13582
  resource: "sandbox",
13430
13583
  action: "reset",
13431
13584
  summary: "Reset your sandbox to its seed data",
@@ -13443,16 +13596,16 @@ var init_reset = __esm({
13443
13596
  return ExitCode.Ok;
13444
13597
  }
13445
13598
  };
13446
- reset_default = command34;
13599
+ reset_default = command36;
13447
13600
  }
13448
13601
  });
13449
13602
 
13450
13603
  // src/commands/sandbox/index.ts
13451
- var actions19;
13604
+ var actions20;
13452
13605
  var init_sandbox2 = __esm({
13453
13606
  "src/commands/sandbox/index.ts"() {
13454
13607
  "use strict";
13455
- actions19 = {
13608
+ actions20 = {
13456
13609
  create: () => Promise.resolve().then(() => (init_create(), create_exports)).then((m) => m.default),
13457
13610
  delete: () => Promise.resolve().then(() => (init_delete(), delete_exports)).then((m) => m.default),
13458
13611
  key: () => Promise.resolve().then(() => (init_key(), key_exports)).then((m) => m.default),
@@ -13463,11 +13616,11 @@ var init_sandbox2 = __esm({
13463
13616
  });
13464
13617
 
13465
13618
  // src/commands/skill/index.ts
13466
- var actions20;
13619
+ var actions21;
13467
13620
  var init_skill = __esm({
13468
13621
  "src/commands/skill/index.ts"() {
13469
13622
  "use strict";
13470
- actions20 = {
13623
+ actions21 = {
13471
13624
  install: () => Promise.resolve().then(() => (init_install(), install_exports)).then((m) => m.default)
13472
13625
  };
13473
13626
  }
@@ -13703,7 +13856,7 @@ __export(pull_exports, {
13703
13856
  });
13704
13857
  import { mkdir, writeFile as writeFile4 } from "node:fs/promises";
13705
13858
  import { dirname as dirname2, resolve as resolve11 } from "node:path";
13706
- var command35, pull_default;
13859
+ var command37, pull_default;
13707
13860
  var init_pull = __esm({
13708
13861
  "src/commands/studio/pull.ts"() {
13709
13862
  "use strict";
@@ -13713,7 +13866,7 @@ var init_pull = __esm({
13713
13866
  init_common2();
13714
13867
  init_folder();
13715
13868
  init_transfer2();
13716
- command35 = {
13869
+ command37 = {
13717
13870
  resource: "studio",
13718
13871
  action: "pull",
13719
13872
  summary: "Write a template version's files to a folder",
@@ -13760,7 +13913,7 @@ var init_pull = __esm({
13760
13913
  return ExitCode.Ok;
13761
13914
  }
13762
13915
  };
13763
- pull_default = command35;
13916
+ pull_default = command37;
13764
13917
  }
13765
13918
  });
13766
13919
 
@@ -13793,7 +13946,7 @@ var push_exports = {};
13793
13946
  __export(push_exports, {
13794
13947
  default: () => push_default
13795
13948
  });
13796
- var BUILT_BY, DEFAULT_MESSAGE, command36, push_default;
13949
+ var BUILT_BY, DEFAULT_MESSAGE, command38, push_default;
13797
13950
  var init_push = __esm({
13798
13951
  "src/commands/studio/push.ts"() {
13799
13952
  "use strict";
@@ -13805,7 +13958,7 @@ var init_push = __esm({
13805
13958
  init_read();
13806
13959
  BUILT_BY = "customer_agent";
13807
13960
  DEFAULT_MESSAGE = "Pushed with the Kenso CLI";
13808
- command36 = {
13961
+ command38 = {
13809
13962
  resource: "studio",
13810
13963
  action: "push",
13811
13964
  summary: "Save a folder's files to a template's draft and print the validation",
@@ -13897,7 +14050,7 @@ var init_push = __esm({
13897
14050
  );
13898
14051
  }
13899
14052
  };
13900
- push_default = command36;
14053
+ push_default = command38;
13901
14054
  }
13902
14055
  });
13903
14056
 
@@ -13906,7 +14059,7 @@ var validate_exports = {};
13906
14059
  __export(validate_exports, {
13907
14060
  default: () => validate_default
13908
14061
  });
13909
- var command37, validate_default;
14062
+ var command39, validate_default;
13910
14063
  var init_validate = __esm({
13911
14064
  "src/commands/studio/validate.ts"() {
13912
14065
  "use strict";
@@ -13915,7 +14068,7 @@ var init_validate = __esm({
13915
14068
  init_columns();
13916
14069
  init_common2();
13917
14070
  init_read();
13918
- command37 = {
14071
+ command39 = {
13919
14072
  resource: "studio",
13920
14073
  action: "validate",
13921
14074
  summary: "Validate a folder's files against a template without saving them",
@@ -13944,7 +14097,7 @@ var init_validate = __esm({
13944
14097
  throw validationFailed(validation, "The files have validation errors", commandLine2(ctx, "studio validate", args));
13945
14098
  }
13946
14099
  };
13947
- validate_default = command37;
14100
+ validate_default = command39;
13948
14101
  }
13949
14102
  });
13950
14103
 
@@ -13993,7 +14146,7 @@ function accountIds(value) {
13993
14146
  }
13994
14147
  return ids2.map(Number);
13995
14148
  }
13996
- var SHOWN, command38, preview_default;
14149
+ var SHOWN, command40, preview_default;
13997
14150
  var init_preview = __esm({
13998
14151
  "src/commands/studio/preview.ts"() {
13999
14152
  "use strict";
@@ -14005,7 +14158,7 @@ var init_preview = __esm({
14005
14158
  init_common2();
14006
14159
  init_folder();
14007
14160
  SHOWN = 5;
14008
- command38 = {
14161
+ command40 = {
14009
14162
  resource: "studio",
14010
14163
  action: "preview",
14011
14164
  summary: "Render a saved version for up to 3 accounts; for local edits, studio push them to the draft first",
@@ -14054,7 +14207,7 @@ var init_preview = __esm({
14054
14207
  return ExitCode.Ok;
14055
14208
  }
14056
14209
  };
14057
- preview_default = command38;
14210
+ preview_default = command40;
14058
14211
  }
14059
14212
  });
14060
14213
 
@@ -14255,7 +14408,7 @@ function estimateOutput(templateId, target, estimate2) {
14255
14408
  ...target.campaignId !== void 0 ? { estimateNote: "An upper bound: it counts one page per lead, and a campaign run builds one page per company." } : {}
14256
14409
  };
14257
14410
  }
14258
- var COMMAND6, sha2562, command39, fill_default;
14411
+ var COMMAND6, sha2562, command41, fill_default;
14259
14412
  var init_fill = __esm({
14260
14413
  "src/commands/studio/fill.ts"() {
14261
14414
  "use strict";
@@ -14271,7 +14424,7 @@ var init_fill = __esm({
14271
14424
  init_fill_runs();
14272
14425
  COMMAND6 = "studio fill";
14273
14426
  sha2562 = (data) => createHash8("sha256").update(data).digest("hex");
14274
- command39 = {
14427
+ command41 = {
14275
14428
  resource: "studio",
14276
14429
  action: "fill",
14277
14430
  summary: "Fill a template on many accounts or campaign leads (estimate first)",
@@ -14331,16 +14484,16 @@ var init_fill = __esm({
14331
14484
  return outcome.exitCode;
14332
14485
  }
14333
14486
  };
14334
- fill_default = command39;
14487
+ fill_default = command41;
14335
14488
  }
14336
14489
  });
14337
14490
 
14338
14491
  // src/commands/studio/index.ts
14339
- var actions21;
14492
+ var actions22;
14340
14493
  var init_studio2 = __esm({
14341
14494
  "src/commands/studio/index.ts"() {
14342
14495
  "use strict";
14343
- actions21 = {
14496
+ actions22 = {
14344
14497
  pull: () => Promise.resolve().then(() => (init_pull(), pull_exports)).then((m) => m.default),
14345
14498
  push: () => Promise.resolve().then(() => (init_push(), push_exports)).then((m) => m.default),
14346
14499
  validate: () => Promise.resolve().then(() => (init_validate(), validate_exports)).then((m) => m.default),
@@ -14482,7 +14635,7 @@ function readBody(req) {
14482
14635
  function reply(res, status, body2) {
14483
14636
  res.writeHead(status, { "content-type": "application/json" }).end(JSON.stringify(body2));
14484
14637
  }
14485
- var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command40, listen_default;
14638
+ var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command42, listen_default;
14486
14639
  var init_listen = __esm({
14487
14640
  "src/commands/webhooks/listen.ts"() {
14488
14641
  "use strict";
@@ -14493,7 +14646,7 @@ var init_listen = __esm({
14493
14646
  MIN_POLL_MS = 1e3;
14494
14647
  MAX_POLL_MS = 6e4;
14495
14648
  MAX_TRIGGER_BYTES = 1e6;
14496
- command40 = {
14649
+ command42 = {
14497
14650
  resource: "webhooks",
14498
14651
  action: "listen",
14499
14652
  summary: "Stream the workspace's events and forward them, signed, to a local handler",
@@ -14599,7 +14752,7 @@ var init_listen = __esm({
14599
14752
  return ExitCode.Ok;
14600
14753
  }
14601
14754
  };
14602
- listen_default = command40;
14755
+ listen_default = command42;
14603
14756
  }
14604
14757
  });
14605
14758
 
@@ -14618,7 +14771,7 @@ function notRunning() {
14618
14771
  next: LISTEN_NEXT
14619
14772
  });
14620
14773
  }
14621
- var LISTEN_NEXT, command41, trigger_default;
14774
+ var LISTEN_NEXT, command43, trigger_default;
14622
14775
  var init_trigger = __esm({
14623
14776
  "src/commands/webhooks/trigger.ts"() {
14624
14777
  "use strict";
@@ -14627,7 +14780,7 @@ var init_trigger = __esm({
14627
14780
  init_http();
14628
14781
  init_local();
14629
14782
  LISTEN_NEXT = "kenso webhooks listen --forward-to http://localhost:3000/hook";
14630
- command41 = {
14783
+ command43 = {
14631
14784
  resource: "webhooks",
14632
14785
  action: "trigger",
14633
14786
  summary: "Send a sample event of one type through the running kenso webhooks listen",
@@ -14684,16 +14837,16 @@ var init_trigger = __esm({
14684
14837
  return ExitCode.Ok;
14685
14838
  }
14686
14839
  };
14687
- trigger_default = command41;
14840
+ trigger_default = command43;
14688
14841
  }
14689
14842
  });
14690
14843
 
14691
14844
  // src/commands/webhooks/index.ts
14692
- var actions22;
14845
+ var actions23;
14693
14846
  var init_webhooks2 = __esm({
14694
14847
  "src/commands/webhooks/index.ts"() {
14695
14848
  "use strict";
14696
- actions22 = {
14849
+ actions23 = {
14697
14850
  listen: () => Promise.resolve().then(() => (init_listen(), listen_exports)).then((m) => m.default),
14698
14851
  trigger: () => Promise.resolve().then(() => (init_trigger(), trigger_exports)).then((m) => m.default)
14699
14852
  };
@@ -14888,14 +15041,14 @@ var status_exports3 = {};
14888
15041
  __export(status_exports3, {
14889
15042
  default: () => status_default3
14890
15043
  });
14891
- var command42, status_default3;
15044
+ var command44, status_default3;
14892
15045
  var init_status3 = __esm({
14893
15046
  "src/commands/work/status.ts"() {
14894
15047
  "use strict";
14895
15048
  init_exit_codes();
14896
15049
  init_http();
14897
15050
  init_common3();
14898
- command42 = {
15051
+ command44 = {
14899
15052
  resource: "work",
14900
15053
  action: "status",
14901
15054
  summary: "Show the Kenso AI work waiting for your own agent, per kind",
@@ -14929,7 +15082,7 @@ var init_status3 = __esm({
14929
15082
  return ExitCode.Ok;
14930
15083
  }
14931
15084
  };
14932
- status_default3 = command42;
15085
+ status_default3 = command44;
14933
15086
  }
14934
15087
  });
14935
15088
 
@@ -15061,9 +15214,9 @@ var init_files = __esm({
15061
15214
  import { execFile, spawnSync as spawnSync2 } from "node:child_process";
15062
15215
  import { readFileSync as readFileSync12 } from "node:fs";
15063
15216
  import { isAbsolute as isAbsolute2 } from "node:path";
15064
- function sudoArgs(user, command49, args, keep = [], set = {}) {
15217
+ function sudoArgs(user, command51, args, keep = [], set = {}) {
15065
15218
  const assignments = Object.entries(set).map(([name, value]) => `${name}=${value}`);
15066
- return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command49, ...args];
15219
+ return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command51, ...args];
15067
15220
  }
15068
15221
  function agentKensoEnv(opts) {
15069
15222
  return {
@@ -15073,12 +15226,12 @@ function agentKensoEnv(opts) {
15073
15226
  AI_AGENT: opts.agentName
15074
15227
  };
15075
15228
  }
15076
- function sudoExec(user, command49, args, opts = {}) {
15229
+ function sudoExec(user, command51, args, opts = {}) {
15077
15230
  const [sudo = "/usr/bin/sudo", ...lead] = user.sudo;
15078
15231
  return new Promise((resolve16) => {
15079
15232
  execFile(
15080
15233
  sudo,
15081
- [...lead, ...sudoArgs(user.name, command49, args)],
15234
+ [...lead, ...sudoArgs(user.name, command51, args)],
15082
15235
  { env: { PATH: SUDO_PATH }, cwd: "/", timeout: opts.timeoutMs ?? PROBE_TIMEOUT_MS, maxBuffer: opts.maxBuffer ?? 1024 * 1024, encoding: "utf8", windowsHide: true, shell: false },
15083
15236
  (err, stdout, stderr) => {
15084
15237
  const code = err ? err.code : 0;
@@ -15188,9 +15341,9 @@ var init_folder2 = __esm({
15188
15341
  init_redact();
15189
15342
  init_agent_user();
15190
15343
  WorkRunFolder = class {
15191
- constructor(ctx, command49, args, outDir, shared = false) {
15344
+ constructor(ctx, command51, args, outDir, shared = false) {
15192
15345
  this.ctx = ctx;
15193
- this.command = command49;
15346
+ this.command = command51;
15194
15347
  this.args = args;
15195
15348
  this.outDir = outDir;
15196
15349
  this.shared = shared;
@@ -15305,7 +15458,7 @@ var pull_exports2 = {};
15305
15458
  __export(pull_exports2, {
15306
15459
  default: () => pull_default2
15307
15460
  });
15308
- var MAX_FILES, command43, pull_default2;
15461
+ var MAX_FILES, command45, pull_default2;
15309
15462
  var init_pull2 = __esm({
15310
15463
  "src/commands/work/pull.ts"() {
15311
15464
  "use strict";
@@ -15314,7 +15467,7 @@ var init_pull2 = __esm({
15314
15467
  init_common3();
15315
15468
  init_folder2();
15316
15469
  MAX_FILES = 100;
15317
- command43 = {
15470
+ command45 = {
15318
15471
  resource: "work",
15319
15472
  action: "pull",
15320
15473
  summary: "Claim waiting work into local work files, to answer by hand",
@@ -15392,7 +15545,7 @@ var init_pull2 = __esm({
15392
15545
  return interrupted7 ? ExitCode.Interrupted : ExitCode.Ok;
15393
15546
  }
15394
15547
  };
15395
- pull_default2 = command43;
15548
+ pull_default2 = command45;
15396
15549
  }
15397
15550
  });
15398
15551
 
@@ -15534,7 +15687,7 @@ __export(submit_exports, {
15534
15687
  default: () => submit_default
15535
15688
  });
15536
15689
  import { resolve as resolve14 } from "node:path";
15537
- var command44, submit_default;
15690
+ var command46, submit_default;
15538
15691
  var init_submit = __esm({
15539
15692
  "src/commands/work/submit.ts"() {
15540
15693
  "use strict";
@@ -15543,7 +15696,7 @@ var init_submit = __esm({
15543
15696
  init_files();
15544
15697
  init_answers();
15545
15698
  init_common3();
15546
- command44 = {
15699
+ command46 = {
15547
15700
  resource: "work",
15548
15701
  action: "submit",
15549
15702
  summary: "Send answers files to Kenso and write each one's results",
@@ -15575,7 +15728,7 @@ var init_submit = __esm({
15575
15728
  return totals.rejected > 0 ? ExitCode.Partial : ExitCode.Ok;
15576
15729
  }
15577
15730
  };
15578
- submit_default = command44;
15731
+ submit_default = command46;
15579
15732
  }
15580
15733
  });
15581
15734
 
@@ -15596,7 +15749,7 @@ function claimIdOf(arg) {
15596
15749
  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..." });
15597
15750
  return arg;
15598
15751
  }
15599
- var CLAIM_ID, command45, release_default;
15752
+ var CLAIM_ID, command47, release_default;
15600
15753
  var init_release = __esm({
15601
15754
  "src/commands/work/release.ts"() {
15602
15755
  "use strict";
@@ -15605,7 +15758,7 @@ var init_release = __esm({
15605
15758
  init_files();
15606
15759
  init_common3();
15607
15760
  CLAIM_ID = /^[A-Za-z0-9_-]{1,64}$/;
15608
- command45 = {
15761
+ command47 = {
15609
15762
  resource: "work",
15610
15763
  action: "release",
15611
15764
  summary: "Give claimed work back to the queue now",
@@ -15624,7 +15777,7 @@ var init_release = __esm({
15624
15777
  return ExitCode.Ok;
15625
15778
  }
15626
15779
  };
15627
- release_default = command45;
15780
+ release_default = command47;
15628
15781
  }
15629
15782
  });
15630
15783
 
@@ -15963,12 +16116,12 @@ function plain(text4) {
15963
16116
  return text4.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "");
15964
16117
  }
15965
16118
  function runStatus(bin, args, env, adapter, runAs) {
15966
- const command49 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
16119
+ const command51 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
15967
16120
  const commandArgs2 = runAs ? [...runAs.sudo.slice(1), ...sudoArgs(runAs.name, bin, args)] : args;
15968
16121
  const options = runAs ? { env: { PATH: SUDO_PATH }, cwd: "/" } : { env: childEnv(env, adapter) };
15969
16122
  return new Promise((resolve16) => {
15970
16123
  execFile2(
15971
- command49,
16124
+ command51,
15972
16125
  commandArgs2,
15973
16126
  { ...options, timeout: STATUS_TIMEOUT_MS, maxBuffer: 1024 * 1024, windowsHide: true, shell: false },
15974
16127
  (err, stdout, stderr) => {
@@ -17050,7 +17203,7 @@ var run_exports3 = {};
17050
17203
  __export(run_exports3, {
17051
17204
  default: () => run_default2
17052
17205
  });
17053
- var FAILURES_IN_A_ROW, command46, run_default2;
17206
+ var FAILURES_IN_A_ROW, command48, run_default2;
17054
17207
  var init_run3 = __esm({
17055
17208
  "src/commands/work/run.ts"() {
17056
17209
  "use strict";
@@ -17071,7 +17224,7 @@ var init_run3 = __esm({
17071
17224
  init_folder2();
17072
17225
  init_stop();
17073
17226
  FAILURES_IN_A_ROW = 3;
17074
- command46 = {
17227
+ command48 = {
17075
17228
  resource: "work",
17076
17229
  action: "run",
17077
17230
  summary: "Run your own coding agent on the waiting work until the queue is empty",
@@ -17396,16 +17549,16 @@ var init_run3 = __esm({
17396
17549
  return exitCodeFor(reason, totals.rejected > 0 || jobsFailed > 0);
17397
17550
  }
17398
17551
  };
17399
- run_default2 = command46;
17552
+ run_default2 = command48;
17400
17553
  }
17401
17554
  });
17402
17555
 
17403
17556
  // src/commands/work/index.ts
17404
- var actions23;
17557
+ var actions24;
17405
17558
  var init_work2 = __esm({
17406
17559
  "src/commands/work/index.ts"() {
17407
17560
  "use strict";
17408
- actions23 = {
17561
+ actions24 = {
17409
17562
  status: () => Promise.resolve().then(() => (init_status3(), status_exports3)).then((m) => m.default),
17410
17563
  pull: () => Promise.resolve().then(() => (init_pull2(), pull_exports2)).then((m) => m.default),
17411
17564
  submit: () => Promise.resolve().then(() => (init_submit(), submit_exports)).then((m) => m.default),
@@ -17429,14 +17582,14 @@ function parseLimit(value) {
17429
17582
  }
17430
17583
  return limit;
17431
17584
  }
17432
- var MAX_LIMIT, command47, list_default3;
17585
+ var MAX_LIMIT, command49, list_default3;
17433
17586
  var init_list3 = __esm({
17434
17587
  "src/commands/workspace/list.ts"() {
17435
17588
  "use strict";
17436
17589
  init_errors();
17437
17590
  init_exit_codes();
17438
17591
  MAX_LIMIT = 200;
17439
- command47 = {
17592
+ command49 = {
17440
17593
  resource: "workspace",
17441
17594
  action: "list",
17442
17595
  summary: "List the workspaces your key can use",
@@ -17464,7 +17617,7 @@ var init_list3 = __esm({
17464
17617
  return ExitCode.Ok;
17465
17618
  }
17466
17619
  };
17467
- list_default3 = command47;
17620
+ list_default3 = command49;
17468
17621
  }
17469
17622
  });
17470
17623
 
@@ -17473,7 +17626,7 @@ var use_exports = {};
17473
17626
  __export(use_exports, {
17474
17627
  default: () => use_default
17475
17628
  });
17476
- var command48, use_default;
17629
+ var command50, use_default;
17477
17630
  var init_use = __esm({
17478
17631
  "src/commands/workspace/use.ts"() {
17479
17632
  "use strict";
@@ -17481,7 +17634,7 @@ var init_use = __esm({
17481
17634
  init_errors();
17482
17635
  init_exit_codes();
17483
17636
  init_http();
17484
- command48 = {
17637
+ command50 = {
17485
17638
  resource: "workspace",
17486
17639
  action: "use",
17487
17640
  summary: "Set the profile's default workspace",
@@ -17538,16 +17691,16 @@ var init_use = __esm({
17538
17691
  return ExitCode.Ok;
17539
17692
  }
17540
17693
  };
17541
- use_default = command48;
17694
+ use_default = command50;
17542
17695
  }
17543
17696
  });
17544
17697
 
17545
17698
  // src/commands/workspace/index.ts
17546
- var actions24;
17699
+ var actions25;
17547
17700
  var init_workspace = __esm({
17548
17701
  "src/commands/workspace/index.ts"() {
17549
17702
  "use strict";
17550
- actions24 = {
17703
+ actions25 = {
17551
17704
  list: () => Promise.resolve().then(() => (init_list3(), list_exports3)).then((m) => m.default),
17552
17705
  use: () => Promise.resolve().then(() => (init_use(), use_exports)).then((m) => m.default)
17553
17706
  };
@@ -17575,6 +17728,7 @@ var init_registry = __esm({
17575
17728
  init_completion2();
17576
17729
  init_connect3();
17577
17730
  init_contacts();
17731
+ init_dashboards();
17578
17732
  init_describe2();
17579
17733
  init_docs2();
17580
17734
  init_doctor();
@@ -17600,25 +17754,26 @@ var init_registry = __esm({
17600
17754
  completion: actions6,
17601
17755
  connect: actions7,
17602
17756
  contacts: actions8,
17603
- describe: actions9,
17604
- docs: actions10,
17605
- doctor: actions11,
17606
- jobs: actions12,
17757
+ dashboards: actions9,
17758
+ describe: actions10,
17759
+ docs: actions11,
17760
+ doctor: actions12,
17761
+ jobs: actions13,
17607
17762
  login: topLevel("login", actions4.login, "kenso auth login"),
17608
17763
  logout: topLevel("logout", actions4.logout, "kenso auth logout"),
17609
- logs: actions13,
17610
- mcp: actions14,
17611
- opportunities: actions15,
17612
- people: actions16,
17613
- reports: actions17,
17614
- runs: actions18,
17615
- sandbox: actions19,
17616
- skill: actions20,
17617
- studio: actions21,
17618
- webhooks: actions22,
17764
+ logs: actions14,
17765
+ mcp: actions15,
17766
+ opportunities: actions16,
17767
+ people: actions17,
17768
+ reports: actions18,
17769
+ runs: actions19,
17770
+ sandbox: actions20,
17771
+ skill: actions21,
17772
+ studio: actions22,
17773
+ webhooks: actions23,
17619
17774
  whoami: topLevel("whoami", actions4.status, "kenso auth status"),
17620
- work: actions23,
17621
- workspace: actions24
17775
+ work: actions24,
17776
+ workspace: actions25
17622
17777
  };
17623
17778
  resourceAliases = { leads: "contacts" };
17624
17779
  }
@@ -17755,8 +17910,8 @@ async function renderTopHelp(opts) {
17755
17910
  names.push(withPositionals(spec, spec.action));
17756
17911
  groups.set(hint, names);
17757
17912
  }
17758
- const actions26 = [...groups.entries()].map(([hint, names]) => `${names.join(", ")}${hint}`);
17759
- if (actions26.length > 0) rows.push([resource, actions26.join(", ")]);
17913
+ const actions27 = [...groups.entries()].map(([hint, names]) => `${names.join(", ")}${hint}`);
17914
+ if (actions27.length > 0) rows.push([resource, actions27.join(", ")]);
17760
17915
  }
17761
17916
  const at = 4 + Math.min(22, Math.max(0, ...rows.map(([left]) => left.length)));
17762
17917
  lines.push(
@@ -17769,7 +17924,7 @@ async function renderTopHelp(opts) {
17769
17924
  const [area = "", action = ""] = name.split(" ");
17770
17925
  byArea.set(area, [...byArea.get(area) ?? [], action]);
17771
17926
  }
17772
- const named = [...byArea.entries()].map(([area, actions26]) => `${area} ${actions26.join("|")}`);
17927
+ const named = [...byArea.entries()].map(([area, actions27]) => `${area} ${actions27.join("|")}`);
17773
17928
  lines.push(wrap(`Beta, hidden here but they run (the server decides): ${named.join(", ")}.`, " "));
17774
17929
  }
17775
17930
  const generated = await listGenerated({ features: opts.allCommands ? [] : getFeatures, env: opts.env });
@@ -17777,13 +17932,13 @@ async function renderTopHelp(opts) {
17777
17932
  if (visible.length > 0) {
17778
17933
  const byResource = /* @__PURE__ */ new Map();
17779
17934
  for (const g of visible) {
17780
- const actions26 = byResource.get(g.resource) ?? [];
17781
- actions26.push(`${g.action}${g.beta ? " (beta)" : ""}`);
17782
- byResource.set(g.resource, actions26);
17935
+ const actions27 = byResource.get(g.resource) ?? [];
17936
+ actions27.push(`${g.action}${g.beta ? " (beta)" : ""}`);
17937
+ byResource.set(g.resource, actions27);
17783
17938
  }
17784
17939
  const sorted2 = [...byResource.entries()].sort(([a], [b]) => a.localeCompare(b));
17785
17940
  if (opts.allCommands) {
17786
- const generatedRows = sorted2.map(([resource, actions26]) => [resource, actions26.sort().join(", ")]);
17941
+ const generatedRows = sorted2.map(([resource, actions27]) => [resource, actions27.sort().join(", ")]);
17787
17942
  lines.push("", "API resources (kenso <resource> <action>):", columns(generatedRows));
17788
17943
  } else {
17789
17944
  const names = new Set(sorted2.map(([resource]) => resource));
@@ -18099,8 +18254,8 @@ function startUpdateNotice(argv, opts = {}) {
18099
18254
  if (!found) return;
18100
18255
  writeCheck(file, { checkedAt: new Date(now).toISOString(), latest: found });
18101
18256
  if (isNewer(found, version)) {
18102
- const command49 = updateCommand(install, opts.platform ?? process.platform);
18103
- stderr.write(`kenso ${found} is out (you have ${version}): ${command49}
18257
+ const command51 = updateCommand(install, opts.platform ?? process.platform);
18258
+ stderr.write(`kenso ${found} is out (you have ${version}): ${command51}
18104
18259
  Turn this off with KENSO_NO_UPDATE_NOTIFIER=1.
18105
18260
  `);
18106
18261
  }
@@ -18142,7 +18297,7 @@ function resources() {
18142
18297
  const names = Object.entries(handWritten).filter(([, area]) => Object.keys(area).length > 0).map(([resource]) => resource);
18143
18298
  return sorted([...names, ...Object.keys(resourceAliases), ...loadManifest().operations.map((op) => op.resource)]);
18144
18299
  }
18145
- function actions25(resource) {
18300
+ function actions26(resource) {
18146
18301
  const own = Object.keys(handWritten[resource] ?? {}).filter((action) => action !== "");
18147
18302
  return sorted([...own, ...loadManifest().operations.filter((op) => op.resource === resource).map((op) => op.action)]);
18148
18303
  }
@@ -18207,7 +18362,7 @@ async function completions(words, globals) {
18207
18362
  return flagsOf2(spec, globals, positionals.length === 0);
18208
18363
  }
18209
18364
  if (positionals.length === 0) return resources();
18210
- if (!spec) return positionals.length === 1 ? actions25(resourceAliases[positionals[0]] ?? positionals[0]) : [];
18365
+ if (!spec) return positionals.length === 1 ? actions26(resourceAliases[positionals[0]] ?? positionals[0]) : [];
18211
18366
  const given = positionals.length - commandWords;
18212
18367
  const declared = spec.positionals ?? [];
18213
18368
  if (given < declared.length || declared.at(-1)?.variadic === true) {
@@ -18301,9 +18456,9 @@ function normalizeBooleans(argv, names, strict) {
18301
18456
  async function knownCommands() {
18302
18457
  const commands = /* @__PURE__ */ new Set();
18303
18458
  for (const [resource, area] of Object.entries(handWritten)) {
18304
- const actions26 = Object.keys(area);
18305
- if (actions26.length > 0) commands.add(resource);
18306
- for (const action of actions26) commands.add(action ? `${resource} ${action}` : resource);
18459
+ const actions27 = Object.keys(area);
18460
+ if (actions27.length > 0) commands.add(resource);
18461
+ for (const action of actions27) commands.add(action ? `${resource} ${action}` : resource);
18307
18462
  }
18308
18463
  for (const g of await listGenerated({ features: [] })) {
18309
18464
  commands.add(g.resource);