kenso 0.1.74 → 0.1.76

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.74" : "0.0.0-dev";
2480
+ VERSION = true ? "0.1.76" : "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: command48, createdAt, status } = raw;
4177
+ const { runId, command: command49, createdAt, status } = raw;
4178
4178
  if (typeof runId !== "string" || !RUN_ID_PATTERN.test(runId)) return null;
4179
- if (typeof command48 !== "string" || typeof createdAt !== "string") return null;
4179
+ if (typeof command49 !== "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: command48,
4190
+ command: command49,
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(command48, args, inputSha256, env, workspaceId, anyWorkspace = false) {
4245
+ async function findIdentical(command49, 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 === command48 && (run.inputSha256 || void 0) === (inputSha256 || void 0) && (anyWorkspace || (run.workspaceId || void 0) === (workspaceId || void 0)) && argsIdentity(run.args) === identity
4249
+ (run) => run.command === command49 && (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, command48, args, extra = []) {
7455
- const parts2 = ["kenso", ...command48.split(" "), ...(args.positionals ?? []).map(shellQuote3)];
7454
+ function commandLine2(ctx, command49, args, extra = []) {
7455
+ const parts2 = ["kenso", ...command49.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}`);
@@ -7784,7 +7784,7 @@ var init_connect = __esm({
7784
7784
  var crm_default;
7785
7785
  var init_crm = __esm({
7786
7786
  "docs/crm.md"() {
7787
- crm_default = '# CRM (beta)\n\nThe CRM commands work on Kenso\'s Accounts lane: accounts (companies), the people on them, and opportunities. They are beta: they need the `accounts` feature flag on your workspace (opportunities need `opportunities`, CRM sync needs `ingestion`). Help and `kenso describe` hide them until your workspace has the flag; `--all-commands` shows them.\n\n| Command | What it does |\n|---|---|\n| `accounts import` | Create accounts from a CSV or JSONL file. Research is charged per created account |\n| `people import` | Create or match people from a file, optionally onto accounts |\n| `accounts update --each`, `people update --each`, `opportunities update --each` | Edit many records from a file, one call per row |\n| `accounts write-research`, `people write-research` | Store research you gathered as a record\'s latest research, free. `--each` writes many |\n| `opportunities stage-history <id>` | A deal\'s stage history: each stage, when, who moved it and how long it sat there |\n| `capture status` | Your captured mailbox, its backfill progress and what teammates see of a captured email. Needs the `crm_capture` flag |\n| `capture connect` | Turn capture on for your own mailbox. `--private` starts it hidden from teammates; `--provider google` prints a sign-in link when no account is connected yet |\n| `capture private on\\|off` | Hide your captured email from teammates, or show it again. Email only: meetings stay visible |\n| `capture disconnect` | Turn capture off and delete your stored email bodies. Asks first; `--yes` skips the question |\n| `capture teammates-see summary\\|full_email` | Workspace admin: what teammates see of captured email |\n| `crm-connections`, `crm-imports`, `crm-sync-issues` | Read and run CRM sync. Connecting a CRM stays in the app |\n\nImport accounts first, then people: `people import` never creates an account.\n\n## Import accounts\n\n```bash\nkenso accounts import --file accounts.csv\nkenso accounts import --file accounts.csv --yes\n```\n\n```csv\nname,domain,industry,employeeCount\nAcme,acme.io,Software,120\nGlobex,globex.com,Manufacturing,"1,200"\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `name` (or `company`, `companyName`, `accountName`), `domains` (several, split on `,` or `;`) or one `domain` (or `website`, `companyDomain`), `industry`, `employeeCount`, `hqLocation`, `linkedinUrl`, `stage`, `angle`, `whyNow`, `fitScore`, `fundingRound`, `cadenceDays`, `ownerMemberId`, `kenCompanyId`, `sendsFromInboxId`, `sendsFromLinkedInAccountId` and `source`.\n- **A domain is required.** A file with no domain column is a usage error, and a row without a domain is `invalid` (`domain_required`).\n- **The dry run prices the research.** It asks for a credit estimate per 1,000 accounts and puts the sum in the plan: `kind`, `accountCount`, `totalMillicredits`, `availableMillicredits` and `sufficient`.\n- **Rows go 100 per call** to `POST /v1/accounts/bulk-create`.\n\nEach row comes back `created` (`id` is the new account; its research is queued, `researchQueued`, or waits for credits, `researchWaitingCredits`), `skipped` with reason `domain_taken` (already an account; `id` is that account) or `failed` (`reason` is the API\'s code, `error` names the field; an item Kenso failed to save is sent once more first). Rerunning the same file is safe: accounts that exist come back `domain_taken`.\n\n## Import people\n\n```bash\nkenso people import --file people.csv\nkenso people import --file people.csv --find-emails --yes\nkenso people import --file people.jsonl --dry-run\n```\n\n```csv\nfullName,email,title,accountDomain,role\nAnn Lee,ann@acme.io,VP Sales,acme.io,champion\nBob Ray,,CTO,acme.io,\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `email`, `fullName` (or `name`), `firstName`, `lastName`, `title`, `linkedinUrl` (or `linkedin`, `profileUrl`), `accountDomain` (or `domain`, `website`, `companyDomain`), `accountId`, `role` and `priority`. Other columns are ignored with one warning.\n- **A person needs a name:** `fullName`, or `firstName`, `lastName` or both (the CLI joins them). A row with none of them is `invalid` (`name_required`).\n- **To put a person on an account,** give `accountDomain` or `accountId`. A row with both sends only `accountId`.\n- **`--find-emails`** queues an email find (charged in credits) for each person without an email.\n- **Rows go 200 per call** to `POST /v1/people/batch`.\n\nPeople already in the workspace are matched by email, then LinkedIn URL, so running the same file again creates nobody twice. A row comes back `created` (a new person), `updated` (an existing person added to the account), `skipped` with reason `already_on_account`, `matched` (no account asked) or `previously_removed`, or `failed`: `account_not_found` saves the person without an account (import the account, then rerun to place them), any other reason is the API\'s. The summary adds `matched`, `addedToAccounts` and `emailFindsQueued`.\n\n## List and search accounts\n\n`accounts list` and `accounts search` sort and page on the server, so they reach every account in the workspace, however many there are.\n\n```bash\nkenso accounts list --sort score:desc --limit 100 # one page; the output\'s next: line is the following one\nkenso accounts list --sort score:desc --limit 100 --all # every page, to the end\nkenso accounts search --search hiring --sort latestSignalAt:desc --data \'{"qFields": ["name", "latestSignal"]}\'\nkenso accounts search --limit 1 --data \'{"countBy": ["stage"]}\' # how many accounts sit in each stage\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}]}, "sort": "tier,-pipelineAmount"}\' --all\n```\n\n- **`--sort`** takes up to 3 comma-separated keys, each `field` (ascending), `field:asc` or `field:desc`. The API\'s `-field` form needs the equals sign here, `--sort=-score`, because a value that starts with a dash reads as a flag. Fields: `createdAt`, `name`, `score`, `tier` (ascending is tier 1 first), `latestSignalAt`, `committee`, `pipelineAmount`, `nextTouchAt`, `lastTouchAt`. An account with no value for a key comes last in both directions. The default is `-createdAt`.\n- **`--limit`** is 1 to 1000 (default 50). `--cursor` takes the previous page\'s `nextCursor` with the same filters and sort; `--all` follows the cursors for you.\n- **`--search`** (also `--q`) matches the name or a domain.\n- **Lists and objects go in `--data`** on `search`, as the API takes them (`kenso describe accounts search`); a flag beside it sets or replaces one key:\n - `qFields` picks where the search text looks: `name`, `domain`, `latestSignal` (the latest signal\'s title).\n - `countBy` (`stage`, `stageGroup`) adds `counts` to the output: every value with the number of matching accounts that hold it, whatever the page. The output is then one object: `data`, `pagination` and `counts`.\n - `filters` and `where` narrow the accounts.\n\nAn account\'s timeline pages the same way. `kenso accounts activity 812` returns the newest 100 earlier rows and, when older ones exist, `data.nextCursor`. Pass it back as `--cursor` (with the same `--category`) for the rows before them, until a page comes without one.\n\n## Edit accounts, people and opportunities\n\nApart from `accounts bulk-update`, which sets one `accountType` on up to 500 accounts, there is no bulk edit route, so run the generated `update` command once per row with `--each`. Columns are the command\'s flags by API name or flag name, and the id column fills the route:\n\n```bash\nkenso accounts update --each accounts-edit.csv --dry-run # then the same with --yes\nkenso people update --each people-edit.csv --dry-run\nkenso opportunities update --each deals.csv --dry-run\n```\n\n```csv\naccountId,stage,ownerMemberId,overwritePinned\n501,engaged,42,true\n502,customer,42,true\n```\n\nA row that changes a field someone pinned in the app fails as a whole (`409 conflict`, `pinned_by_user`: nothing on that record changes, the other fields of the row included), unless the row sets `overwritePinned` to `true` (or you pass `--overwrite-pinned`, only with the person\'s OK). Every flag of an update command: `kenso accounts update --help`.\n\n## Search opportunities\n\n`kenso opportunities search` works as `accounts search` does: it takes `--search`, `--sort`, `--limit`, `--cursor`, `--all`, and its lists in `--data`.\n\n```bash\nkenso opportunities search --data \'{"filters": [{"field": "stageCategory", "operator": "is", "values": ["open"]}]}\' --all\nkenso opportunities search --data \'{"filters": [{"field": "ownerMemberId", "operator": "is", "values": ["none"]}, {"field": "closeDate", "operator": "is", "values": ["past_due", "next_30_days"]}]}\'\nkenso opportunities search --limit 1 --data \'{"countBy": ["stage", "ownerMemberId"]}\' # how many opportunities hold each value\n```\n\n- **`filters`** is a list of `{field, operator, values}`, all of which must hold. Fields: `stage` (a stage key), `stageCategory` (`open`, `won`, `lost`), `ownerMemberId`, `closeDate` (`past_due`, `next_30_days`, `later`, `none`) and `sourceCampaignId`. `operator` is `is` or `is_not`; the values of one condition are OR. `none` in `values` matches an opportunity with no owner, no source campaign or no close date.\n- **`countBy`** takes the same field names and adds `counts` to the output: per field, every value with the number of matching opportunities that hold it.\n- `--account-id` keeps the search to one account. `closeDate` counts days in the member\'s app time zone.\n\nOne person\'s deals, meetings and campaign contacts, as their person page lists them:\n\n```bash\nkenso opportunities list --person-id 9001 # the deals they are on, or are the primary person of\nkenso meetings list --person-id 9001 # the meetings they attend, among the ones you can see\nkenso contacts list --person-id 9001 # their contact in each campaign they are in\n```\n\n## Write research you gathered\n\n`accounts write-research` and `people write-research` store research you gathered outside Kenso as the record\'s latest research (`PUT /v1/accounts/{accountId}/research`, `PUT /v1/people/{personId}/research`). The Research tab shows it like a Ken run, with `trigger: agent` and `researchedAt` now. Nothing is charged, and no account or person field changes: set an account\'s own `fitScore`, `whyNow` or `angle` with `accounts update`. They need the `accounts_research` flag and accounts edit.\n\nThe body is the research block `accounts get --expand research` (or `people get-research`) returns, without its read-only fields: leave out `id`, `status`, `trigger`, `errorCode`, `researchedAt`, `isStale` and `appliedPrompt` (for a person also `mode`, `requestedAt`, `researchedMode`, `firecrawlCredits` and `webNote`), or the write fails with `unknown_field`. Pass it with `--data @file`:\n\n```bash\nkenso accounts write-research --account-id 501 --data @acme-dossier.json\nkenso people write-research --person-id 9001 --data @jane.json\n```\n\n```json\n{\n "tagline": { "text": "Payroll for EU contractors", "sourceUrls": ["https://acme.example"] },\n "description": { "text": "Acme runs payroll and compliance for companies hiring contractors in 30 EU countries.", "sourceUrls": ["https://acme.example"] },\n "links": { "website": "https://acme.example" },\n "whyNow": { "text": "Raised a $40M Series B in October", "sourceUrls": ["https://news.example/acme-b"], "date": "2026-10" },\n "fitScore": 82,\n "angle": "Lead with contractor onboarding time."\n}\n```\n\nMany records: one JSONL line per record, with the id next to the block\'s fields. Nested objects are sent as written. Use JSONL, not CSV: the block\'s fields are objects and lists, which a CSV cell cannot carry.\n\n```bash\nkenso accounts write-research --each dossiers.jsonl --dry-run # then the same with --yes\nkenso people write-research --each people-research.jsonl --yes --concurrency 8\n```\n\n```jsonl\n{"accountId": 501, "tagline": {"text": "Payroll for EU contractors"}, "links": {"website": "https://acme.example"}}\n{"accountId": 502, "description": {"text": "Cloud cost tooling for retailers."}, "links": {"website": "https://beta.example"}}\n```\n\nA row fails as a whole with the API\'s code: `validation_failed` (an unknown field is `unknown_field`, and `error.details` names every bad field), `research_in_progress` (`409`: Ken is researching that record now, write it again once the run ends; an account run waiting for credits counts too: it runs once the workspace has credits, and the write stays refused until that run ends) or `not_found`. Rerunning a file is safe: each write replaces the record\'s research shown.\n\n## CRM sync\n\nCRM sync has generated commands only: read connections, preview, start an import, and work through sync issues. Connect the CRM itself in the app.\n\n```bash\nkenso crm-connections list\nkenso crm-connections get --connection-id 7\nkenso crm-imports create --connection-id 7 --dry-run\nkenso crm-sync-issues list --connection-id 7 --all\n```\n\nRun `kenso crm-connections --help` (or add `--all-commands` when the actions are hidden) to see every action.\n\n## A deal\'s stage history\n\n```bash\nkenso opportunities stage-history 77\nkenso opportunities stage-history 77 --query "entries[].{to: stageLabel, at: enteredAt, by: changedBy}"\n```\n\nIt prints `GET /v1/opportunities/{id}/stage-history` as it is, the same rows as the deal page and the MCP\'s `opportunities(operation="get-stage-history")`: the stage now, `isComplete` and `entries`, oldest first, each with `fromStage`, `stage`, `stageLabel`, `enteredAt`, `leftAt`, `durationSeconds`, `actorKind`, `actorMemberId` and Ken\'s `reason` on a move its stage judge made. With the `deal_stage_rules` flag on, each entry also has `changedBy` (`member`, `agent`, `api_key`, `workflow`, `stage_judge`, `crm_sync` or `ken_automation`), `crmProvider` on a CRM sync, and on a move `fromStageLabel` and `fromStageDurationSeconds`, how long the deal sat in the stage it left. `isComplete` false means Kenso has no record of part of the history.\n';
7787
+ crm_default = '# CRM (beta)\n\nThe CRM commands work on Kenso\'s Accounts lane: accounts (companies), the people on them, and opportunities. They are beta: they need the `accounts` feature flag on your workspace (opportunities need `opportunities`, CRM sync needs `ingestion`). Help and `kenso describe` hide them until your workspace has the flag; `--all-commands` shows them.\n\n| Command | What it does |\n|---|---|\n| `accounts import` | Create accounts from a CSV or JSONL file. Research is charged per created account |\n| `people import` | Create or match people from a file, optionally onto accounts |\n| `accounts update --each`, `people update --each`, `opportunities update --each` | Edit many records from a file, one call per row |\n| `accounts write-research`, `people write-research` | Store research you gathered as a record\'s latest research, free. `--each` writes many |\n| `opportunities stage-history <id>` | A deal\'s stage history: each stage, when, who moved it and how long it sat there |\n| `capture status` | Your captured mailbox, its backfill progress and what teammates see of a captured email. Needs the `crm_capture` flag |\n| `capture connect` | Turn capture on for your own mailbox. `--private` starts it hidden from teammates; `--provider google` prints a sign-in link when no account is connected yet |\n| `capture private on\\|off` | Hide your captured email from teammates, or show it again. Email only: meetings stay visible |\n| `capture disconnect` | Turn capture off and delete your stored email bodies. Asks first; `--yes` skips the question |\n| `capture teammates-see summary\\|full_email` | Workspace admin: what teammates see of captured email |\n| `crm-connections`, `crm-imports`, `crm-sync-issues` | Read and run CRM sync. Connecting a CRM stays in the app |\n\nImport accounts first, then people: `people import` never creates an account.\n\n## Import accounts\n\n```bash\nkenso accounts import --file accounts.csv\nkenso accounts import --file accounts.csv --yes\n```\n\n```csv\nname,domain,industry,employeeCount\nAcme,acme.io,Software,120\nGlobex,globex.com,Manufacturing,"1,200"\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `name` (or `company`, `companyName`, `accountName`), `domains` (several, split on `,` or `;`) or one `domain` (or `website`, `companyDomain`), `industry`, `employeeCount`, `hqLocation`, `linkedinUrl`, `stage`, `angle`, `whyNow`, `fitScore`, `fundingRound`, `cadenceDays`, `ownerMemberId`, `kenCompanyId`, `sendsFromInboxId`, `sendsFromLinkedInAccountId` and `source`.\n- **A domain is required.** A file with no domain column is a usage error, and a row without a domain is `invalid` (`domain_required`).\n- **The dry run prices the research.** It asks for a credit estimate per 1,000 accounts and puts the sum in the plan: `kind`, `accountCount`, `totalMillicredits`, `availableMillicredits` and `sufficient`.\n- **Rows go 100 per call** to `POST /v1/accounts/bulk-create`.\n\nEach row comes back `created` (`id` is the new account; its research is queued, `researchQueued`, or waits for credits, `researchWaitingCredits`), `skipped` with reason `domain_taken` (already an account; `id` is that account) or `failed` (`reason` is the API\'s code, `error` names the field; an item Kenso failed to save is sent once more first). Rerunning the same file is safe: accounts that exist come back `domain_taken`.\n\n## Import people\n\n```bash\nkenso people import --file people.csv\nkenso people import --file people.csv --find-emails --yes\nkenso people import --file people.jsonl --dry-run\n```\n\n```csv\nfullName,email,title,accountDomain,role\nAnn Lee,ann@acme.io,VP Sales,acme.io,champion\nBob Ray,,CTO,acme.io,\n```\n\n- **Columns** map by name, ignoring case, spaces and dashes: `email`, `fullName` (or `name`), `firstName`, `lastName`, `title`, `linkedinUrl` (or `linkedin`, `profileUrl`), `accountDomain` (or `domain`, `website`, `companyDomain`), `accountId`, `role` and `priority`. Other columns are ignored with one warning.\n- **A person needs a name:** `fullName`, or `firstName`, `lastName` or both (the CLI joins them). A row with none of them is `invalid` (`name_required`).\n- **To put a person on an account,** give `accountDomain` or `accountId`. A row with both sends only `accountId`.\n- **`--find-emails`** queues an email find (charged in credits) for each person without an email.\n- **Rows go 200 per call** to `POST /v1/people/batch`.\n\nPeople already in the workspace are matched by email, then LinkedIn URL, so running the same file again creates nobody twice. A row comes back `created` (a new person), `updated` (an existing person added to the account), `skipped` with reason `already_on_account`, `matched` (no account asked) or `previously_removed`, or `failed`: `account_not_found` saves the person without an account (import the account, then rerun to place them), any other reason is the API\'s. The summary adds `matched`, `addedToAccounts` and `emailFindsQueued`.\n\n## List and search accounts\n\n`accounts list` and `accounts search` sort and page on the server, so they reach every account in the workspace, however many there are.\n\n```bash\nkenso accounts list --sort score:desc --limit 100 # one page; the output\'s next: line is the following one\nkenso accounts list --sort score:desc --limit 100 --all # every page, to the end\nkenso accounts search --search hiring --sort latestSignalAt:desc --data \'{"qFields": ["name", "latestSignal"]}\'\nkenso accounts search --limit 1 --data \'{"countBy": ["stage"]}\' # how many accounts sit in each stage\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}]}, "sort": "tier,-pipelineAmount"}\' --all\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "hqLocation", "operator": "contains", "values": ["Germany"]}]}}\' --all\n# tier 1 accounts with no meeting in 30 days: none since then, or none ever\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "tier", "operator": "is", "values": ["1"]}, {"match": "any", "conditions": [{"field": "lastMeeting", "operator": "older_than_days", "values": ["30"]}, {"field": "lastMeeting", "operator": "is_empty"}]}]}}\' --all\n```\n\n- **`--sort`** takes up to 3 comma-separated keys, each `field` (ascending), `field:asc` or `field:desc`. The API\'s `-field` form needs the equals sign here, `--sort=-score`, because a value that starts with a dash reads as a flag. Fields: `createdAt`, `name`, `score`, `tier` (ascending is tier 1 first), `latestSignalAt`, `committee`, `pipelineAmount`, `nextTouchAt`, `lastTouchAt`. An account with no value for a key comes last in both directions. The default is `-createdAt`.\n- **`--limit`** is 1 to 1000 (default 50). `--cursor` takes the previous page\'s `nextCursor` with the same filters and sort; `--all` follows the cursors for you.\n- **`--search`** (also `--q`) matches the name or a domain.\n- **Lists and objects go in `--data`** on `search`, as the API takes them (`kenso describe accounts search`); a flag beside it sets or replaces one key:\n - `qFields` picks where the search text looks: `name`, `domain`, `latestSignal` (the latest signal\'s title).\n - `countBy` (`stage`, `stageGroup`) adds `counts` to the output: every value with the number of matching accounts that hold it, whatever the page. The output is then one object: `data`, `pagination` and `counts`.\n - `filters` and `where` narrow the accounts.\n\nAn account\'s timeline pages the same way. `kenso accounts activity 812` returns the newest 100 earlier rows and, when older ones exist, `data.nextCursor`. Pass it back as `--cursor` (with the same `--category`) for the rows before them, until a page comes without one.\n\n## Edit accounts, people and opportunities\n\nApart from `accounts bulk-update`, which sets one `accountType` on up to 500 accounts, there is no bulk edit route, so run the generated `update` command once per row with `--each`. Columns are the command\'s flags by API name or flag name, and the id column fills the route:\n\n```bash\nkenso accounts update --each accounts-edit.csv --dry-run # then the same with --yes\nkenso people update --each people-edit.csv --dry-run\nkenso opportunities update --each deals.csv --dry-run\n```\n\n```csv\naccountId,stage,ownerMemberId,overwritePinned\n501,engaged,42,true\n502,customer,42,true\n```\n\nA row that changes a field someone pinned in the app fails as a whole (`409 conflict`, `pinned_by_user`: nothing on that record changes, the other fields of the row included), unless the row sets `overwritePinned` to `true` (or you pass `--overwrite-pinned`, only with the person\'s OK). Every flag of an update command: `kenso accounts update --help`.\n\n## Search opportunities\n\n`kenso opportunities search` works as `accounts search` does: it takes `--search`, `--sort`, `--limit`, `--cursor`, `--all`, and its lists in `--data`.\n\n```bash\nkenso opportunities search --data \'{"filters": [{"field": "stageCategory", "operator": "is", "values": ["open"]}]}\' --all\nkenso opportunities search --data \'{"filters": [{"field": "ownerMemberId", "operator": "is", "values": ["none"]}, {"field": "closeDate", "operator": "is", "values": ["past_due", "next_30_days"]}]}\'\nkenso opportunities search --limit 1 --data \'{"countBy": ["stage", "ownerMemberId"]}\' # how many opportunities hold each value\n```\n\n- **`filters`** is a list of `{field, operator, values}`, all of which must hold. Fields: `stage` (a stage key), `stageCategory` (`open`, `won`, `lost`), `ownerMemberId`, `closeDate` (`past_due`, `next_30_days`, `later`, `none`) and `sourceCampaignId`. `operator` is `is` or `is_not`; the values of one condition are OR. `none` in `values` matches an opportunity with no owner, no source campaign or no close date.\n- **`countBy`** takes the same field names and adds `counts` to the output: per field, every value with the number of matching opportunities that hold it.\n- `--account-id` keeps the search to one account. `closeDate` counts days in the member\'s app time zone.\n\nOne person\'s deals, meetings and campaign contacts, as their person page lists them:\n\n```bash\nkenso opportunities list --person-id 9001 # the deals they are on, or are the primary person of\nkenso meetings list --person-id 9001 # the meetings they attend, among the ones you can see\nkenso contacts list --person-id 9001 # their contact in each campaign they are in\n```\n\n## Write research you gathered\n\n`accounts write-research` and `people write-research` store research you gathered outside Kenso as the record\'s latest research (`PUT /v1/accounts/{accountId}/research`, `PUT /v1/people/{personId}/research`). The Research tab shows it like a Ken run, with `trigger: agent` and `researchedAt` now. Nothing is charged, and no account or person field changes: set an account\'s own `fitScore`, `whyNow` or `angle` with `accounts update`. They need the `accounts_research` flag and accounts edit.\n\nThe body is the research block `accounts get --expand research` (or `people get-research`) returns, without its read-only fields: leave out `id`, `status`, `trigger`, `errorCode`, `researchedAt`, `isStale` and `appliedPrompt` (for a person also `mode`, `requestedAt`, `researchedMode`, `firecrawlCredits` and `webNote`), or the write fails with `unknown_field`. Pass it with `--data @file`:\n\n```bash\nkenso accounts write-research --account-id 501 --data @acme-dossier.json\nkenso people write-research --person-id 9001 --data @jane.json\n```\n\n```json\n{\n "tagline": { "text": "Payroll for EU contractors", "sourceUrls": ["https://acme.example"] },\n "description": { "text": "Acme runs payroll and compliance for companies hiring contractors in 30 EU countries.", "sourceUrls": ["https://acme.example"] },\n "links": { "website": "https://acme.example" },\n "whyNow": { "text": "Raised a $40M Series B in October", "sourceUrls": ["https://news.example/acme-b"], "date": "2026-10" },\n "fitScore": 82,\n "angle": "Lead with contractor onboarding time."\n}\n```\n\nMany records: one JSONL line per record, with the id next to the block\'s fields. Nested objects are sent as written. Use JSONL, not CSV: the block\'s fields are objects and lists, which a CSV cell cannot carry.\n\n```bash\nkenso accounts write-research --each dossiers.jsonl --dry-run # then the same with --yes\nkenso people write-research --each people-research.jsonl --yes --concurrency 8\n```\n\n```jsonl\n{"accountId": 501, "tagline": {"text": "Payroll for EU contractors"}, "links": {"website": "https://acme.example"}}\n{"accountId": 502, "description": {"text": "Cloud cost tooling for retailers."}, "links": {"website": "https://beta.example"}}\n```\n\nA row fails as a whole with the API\'s code: `validation_failed` (an unknown field is `unknown_field`, and `error.details` names every bad field), `research_in_progress` (`409`: Ken is researching that record now, write it again once the run ends; an account run waiting for credits counts too: it runs once the workspace has credits, and the write stays refused until that run ends) or `not_found`. Rerunning a file is safe: each write replaces the record\'s research shown.\n\n## CRM sync\n\nCRM sync has generated commands only: read connections, preview, start an import, and work through sync issues. Connect the CRM itself in the app.\n\n```bash\nkenso crm-connections list\nkenso crm-connections get --connection-id 7\nkenso crm-imports create --connection-id 7 --dry-run\nkenso crm-sync-issues list --connection-id 7 --all\n```\n\nRun `kenso crm-connections --help` (or add `--all-commands` when the actions are hidden) to see every action.\n\n## A deal\'s stage history\n\n```bash\nkenso opportunities stage-history 77\nkenso opportunities stage-history 77 --query "entries[].{to: stageLabel, at: enteredAt, by: changedBy}"\n```\n\nIt prints `GET /v1/opportunities/{id}/stage-history` as it is, the same rows as the deal page and the MCP\'s `opportunities(operation="get-stage-history")`: the stage now, `isComplete` and `entries`, oldest first, each with `fromStage`, `stage`, `stageLabel`, `enteredAt`, `leftAt`, `durationSeconds`, `actorKind`, `actorMemberId` and Ken\'s `reason` on a move its stage judge made. With the `deal_stage_rules` flag on, each entry also has `changedBy` (`member`, `agent`, `api_key`, `workflow`, `stage_judge`, `crm_sync` or `ken_automation`), `crmProvider` on a CRM sync, and on a move `fromStageLabel` and `fromStageDurationSeconds`, how long the deal sat in the stage it left. `isComplete` false means Kenso has no record of part of the history.\n';
7788
7788
  }
7789
7789
  });
7790
7790
 
@@ -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: (command48, args) => {
8980
- const child = nodeSpawn(command48, args, { detached: true, stdio: "ignore" });
8979
+ spawn: (command49, args) => {
8980
+ const child = nodeSpawn(command49, 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: (command48, args) => {
10170
- const child = nodeSpawn2(command48, args, { detached: true, stdio: "ignore" });
10169
+ spawn: (command49, args) => {
10170
+ const child = nodeSpawn2(command49, 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, command48, hint) {
10211
+ function requireFlag(flags, name, command49, hint) {
10212
10212
  const value = stringFlag2(flags, name);
10213
- if (value === void 0) throw usageError(`--${name} is required for ${command48}.`, { field: name, next: `${command48} --help`, ...hint ? { hint } : {} });
10213
+ if (value === void 0) throw usageError(`--${name} is required for ${command49}.`, { field: name, next: `${command49} --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, command48) {
10223
- const raw = requireFlag(flags, name, command48);
10222
+ function idFlag(flags, name, command49) {
10223
+ const raw = requireFlag(flags, name, command49);
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(command48, flags, ctx, extra = []) {
10244
- const parts2 = [command48];
10243
+ function sameCommand2(command49, flags, ctx, extra = []) {
10244
+ const parts2 = [command49];
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, command48, args) {
11381
+ async function unfinishedWhereIds(ctx, command49, 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 !== command48 || run.status === "done" || run.status === "planned") continue;
11386
+ if (run.command !== command49 || 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 command48 = `kenso contacts ${kind}`;
11532
+ const command49 = `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(`${command48} needs exactly one of ${choices}.`, { field: "ids", next: `${command48} --help` });
11539
+ throw usageError(`${command49} needs exactly one of ${choices}.`, { field: "ids", next: `${command49} --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);
@@ -12844,19 +12844,108 @@ var init_people = __esm({
12844
12844
  }
12845
12845
  });
12846
12846
 
12847
+ // src/commands/reports/run.ts
12848
+ var run_exports2 = {};
12849
+ __export(run_exports2, {
12850
+ default: () => run_default
12851
+ });
12852
+ var REPORTS, command26, run_default;
12853
+ var init_run2 = __esm({
12854
+ "src/commands/reports/run.ts"() {
12855
+ "use strict";
12856
+ init_errors();
12857
+ init_exit_codes();
12858
+ init_http();
12859
+ REPORTS = ["pipeline_by_stage", "won_by_month", "stage_conversion", "time_in_stage", "won_by_source_campaign", "activity_by_member"];
12860
+ command26 = {
12861
+ resource: "reports",
12862
+ action: "run",
12863
+ summary: "Run a stock pipeline report and print its table",
12864
+ description: `Reads GET /v1/reports/{reportKey} and prints one row per bucket: the bucket's label under the dimension's name (stage, closedAt, sourceCampaignId) and each measure under its key (count, sumAmount, weightedAmount, avgAmount). Amounts are in the workspace currency. The report's title, its finding, the days it covers and the totals are printed to stderr. --full prints the whole answer as one object: headline, finding, stats, chart, the stored query, and result with each bucket's filter for opportunities search. Reports: ${REPORTS.join(", ")}; kenso reports list prints the ones your workspace has now.`,
12865
+ flags: {
12866
+ period: {
12867
+ type: "string",
12868
+ 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)"
12869
+ },
12870
+ owner: { type: "string", description: "Only this member's deals (a member id)", aliases: ["owner-member-id"] },
12871
+ "time-zone": { type: "string", description: "IANA zone days start in when you have no app time zone (default UTC)" },
12872
+ full: { type: "boolean", description: "Print the API's whole answer instead of the table" }
12873
+ },
12874
+ positionals: [{ name: "report", required: true, description: `A report key from kenso reports list, such as ${REPORTS.join(", ")}` }],
12875
+ examples: [
12876
+ "kenso reports run pipeline_by_stage",
12877
+ "kenso reports run won_by_month --period this_year --owner 41",
12878
+ "kenso reports run won_by_source_campaign --period 2026-Q4 --full"
12879
+ ],
12880
+ beta: { featureGates: { all: ["opportunities", "reports"] } },
12881
+ operationIds: ["reports.get"],
12882
+ async run(ctx, { flags, positionals }) {
12883
+ const report2 = (positionals[0] ?? "").trim();
12884
+ if (!/^[a-z][a-z0-9_]*$/.test(report2)) {
12885
+ throw usageError(`"${report2}" is not a report key. Reports: ${REPORTS.join(", ")}.`, { field: "report", next: "kenso reports list" });
12886
+ }
12887
+ const owner = typeof flags.owner === "string" ? flags.owner.trim() : void 0;
12888
+ if (owner !== void 0 && !/^[1-9]\d*$/.test(owner)) {
12889
+ throw usageError(`--owner must be a member id (got "${owner}").`, { field: "owner", next: "kenso members list" });
12890
+ }
12891
+ const res = await ctx.client.request({
12892
+ method: "GET",
12893
+ path: `/v1/reports/${report2}`,
12894
+ query: {
12895
+ period: typeof flags.period === "string" ? flags.period : void 0,
12896
+ ownerMemberId: owner,
12897
+ timeZone: typeof flags["time-zone"] === "string" ? flags["time-zone"] : void 0
12898
+ },
12899
+ signal: ctx.signal
12900
+ });
12901
+ const data = unwrap(res.body);
12902
+ if (flags.full === true) {
12903
+ ctx.output.object(data);
12904
+ return ExitCode.Ok;
12905
+ }
12906
+ const { result } = data;
12907
+ const names = result.dimensions.map((d) => d.field);
12908
+ ctx.output.info(data.title + (data.period ? ` (${data.period.from} to ${data.period.to})` : ""));
12909
+ ctx.output.info(data.finding);
12910
+ ctx.output.info(`Totals (${result.currency}): ${result.measures.map((m) => `${m.key} ${result.totals[m.key] ?? 0}`).join(", ")}`);
12911
+ await ctx.output.list(
12912
+ result.buckets.map((bucket) => ({
12913
+ ...Object.fromEntries(names.map((name, i) => [name, bucket.labels[i] ?? bucket.keys[i] ?? ""])),
12914
+ // A measure a row has no value for (a rate with nothing to divide by) prints as null.
12915
+ ...Object.fromEntries(result.measures.map((m) => [m.key, bucket.values[m.key] ?? null]))
12916
+ }))
12917
+ );
12918
+ return ExitCode.Ok;
12919
+ }
12920
+ };
12921
+ run_default = command26;
12922
+ }
12923
+ });
12924
+
12925
+ // src/commands/reports/index.ts
12926
+ var actions17;
12927
+ var init_reports = __esm({
12928
+ "src/commands/reports/index.ts"() {
12929
+ "use strict";
12930
+ actions17 = {
12931
+ run: () => Promise.resolve().then(() => (init_run2(), run_exports2)).then((m) => m.default)
12932
+ };
12933
+ }
12934
+ });
12935
+
12847
12936
  // src/commands/runs/list.ts
12848
12937
  var list_exports = {};
12849
12938
  __export(list_exports, {
12850
12939
  default: () => list_default
12851
12940
  });
12852
- var command26, list_default;
12941
+ var command27, list_default;
12853
12942
  var init_list = __esm({
12854
12943
  "src/commands/runs/list.ts"() {
12855
12944
  "use strict";
12856
12945
  init_runs();
12857
12946
  init_errors();
12858
12947
  init_exit_codes();
12859
- command26 = {
12948
+ command27 = {
12860
12949
  resource: "runs",
12861
12950
  action: "list",
12862
12951
  summary: "List batch runs, newest first (finds an interrupted run)",
@@ -12877,7 +12966,7 @@ var init_list = __esm({
12877
12966
  return ExitCode.Ok;
12878
12967
  }
12879
12968
  };
12880
- list_default = command26;
12969
+ list_default = command27;
12881
12970
  }
12882
12971
  });
12883
12972
 
@@ -12888,7 +12977,7 @@ __export(show_exports, {
12888
12977
  });
12889
12978
  import { existsSync as existsSync7, readFileSync as readFileSync9 } from "node:fs";
12890
12979
  import { join as join12 } from "node:path";
12891
- var FILES, command27, show_default;
12980
+ var FILES, command28, show_default;
12892
12981
  var init_show = __esm({
12893
12982
  "src/commands/runs/show.ts"() {
12894
12983
  "use strict";
@@ -12903,7 +12992,7 @@ var init_show = __esm({
12903
12992
  ["plan", "plan.json"],
12904
12993
  ["summary", "summary.json"]
12905
12994
  ];
12906
- command27 = {
12995
+ command28 = {
12907
12996
  resource: "runs",
12908
12997
  action: "show",
12909
12998
  summary: "Show one batch run and its files",
@@ -12930,7 +13019,7 @@ var init_show = __esm({
12930
13019
  return ExitCode.Ok;
12931
13020
  }
12932
13021
  };
12933
- show_default = command27;
13022
+ show_default = command28;
12934
13023
  }
12935
13024
  });
12936
13025
 
@@ -12989,14 +13078,14 @@ function resumeArgv(run, globals = {}) {
12989
13078
  async function sha256(path) {
12990
13079
  return createHash5("sha256").update(await readFile9(path)).digest("hex");
12991
13080
  }
12992
- var SKIPPED_KEYS, command28, resume_default;
13081
+ var SKIPPED_KEYS, command29, resume_default;
12993
13082
  var init_resume = __esm({
12994
13083
  "src/commands/runs/resume.ts"() {
12995
13084
  "use strict";
12996
13085
  init_runs();
12997
13086
  init_errors();
12998
13087
  SKIPPED_KEYS = /* @__PURE__ */ new Set(["positionals", "yes", "dryRun", "dry-run", "help", "version"]);
12999
- command28 = {
13088
+ command29 = {
13000
13089
  resource: "runs",
13001
13090
  action: "resume",
13002
13091
  summary: "Continue an interrupted batch run (its command with --yes, no dry run)",
@@ -13051,16 +13140,16 @@ var init_resume = __esm({
13051
13140
  }
13052
13141
  }
13053
13142
  };
13054
- resume_default = command28;
13143
+ resume_default = command29;
13055
13144
  }
13056
13145
  });
13057
13146
 
13058
13147
  // src/commands/runs/index.ts
13059
- var actions17;
13148
+ var actions18;
13060
13149
  var init_runs2 = __esm({
13061
13150
  "src/commands/runs/index.ts"() {
13062
13151
  "use strict";
13063
- actions17 = {
13152
+ actions18 = {
13064
13153
  list: () => Promise.resolve().then(() => (init_list(), list_exports)).then((m) => m.default),
13065
13154
  show: () => Promise.resolve().then(() => (init_show(), show_exports)).then((m) => m.default),
13066
13155
  resume: () => Promise.resolve().then(() => (init_resume(), resume_exports)).then((m) => m.default)
@@ -13159,7 +13248,7 @@ var create_exports = {};
13159
13248
  __export(create_exports, {
13160
13249
  default: () => create_default
13161
13250
  });
13162
- var command29, create_default;
13251
+ var command30, create_default;
13163
13252
  var init_create = __esm({
13164
13253
  "src/commands/sandbox/create.ts"() {
13165
13254
  "use strict";
@@ -13167,7 +13256,7 @@ var init_create = __esm({
13167
13256
  init_exit_codes();
13168
13257
  init_http();
13169
13258
  init_shared();
13170
- command29 = {
13259
+ command30 = {
13171
13260
  resource: "sandbox",
13172
13261
  action: "create",
13173
13262
  summary: "Create your developer sandbox and save its test key as the sandbox profile",
@@ -13209,7 +13298,7 @@ var init_create = __esm({
13209
13298
  return ExitCode.Ok;
13210
13299
  }
13211
13300
  };
13212
- create_default = command29;
13301
+ create_default = command30;
13213
13302
  }
13214
13303
  });
13215
13304
 
@@ -13218,7 +13307,7 @@ var delete_exports = {};
13218
13307
  __export(delete_exports, {
13219
13308
  default: () => delete_default
13220
13309
  });
13221
- var command30, delete_default;
13310
+ var command31, delete_default;
13222
13311
  var init_delete = __esm({
13223
13312
  "src/commands/sandbox/delete.ts"() {
13224
13313
  "use strict";
@@ -13226,7 +13315,7 @@ var init_delete = __esm({
13226
13315
  init_confirm();
13227
13316
  init_exit_codes();
13228
13317
  init_shared();
13229
- command30 = {
13318
+ command31 = {
13230
13319
  resource: "sandbox",
13231
13320
  action: "delete",
13232
13321
  summary: "Delete your sandbox and its test keys",
@@ -13253,7 +13342,7 @@ var init_delete = __esm({
13253
13342
  return ExitCode.Ok;
13254
13343
  }
13255
13344
  };
13256
- delete_default = command30;
13345
+ delete_default = command31;
13257
13346
  }
13258
13347
  });
13259
13348
 
@@ -13262,14 +13351,14 @@ var key_exports = {};
13262
13351
  __export(key_exports, {
13263
13352
  default: () => key_default
13264
13353
  });
13265
- var command31, key_default;
13354
+ var command32, key_default;
13266
13355
  var init_key = __esm({
13267
13356
  "src/commands/sandbox/key.ts"() {
13268
13357
  "use strict";
13269
13358
  init_exit_codes();
13270
13359
  init_http();
13271
13360
  init_shared();
13272
- command31 = {
13361
+ command32 = {
13273
13362
  resource: "sandbox",
13274
13363
  action: "key",
13275
13364
  summary: "Create a new test key for your sandbox and save it as the sandbox profile",
@@ -13289,7 +13378,7 @@ var init_key = __esm({
13289
13378
  return ExitCode.Ok;
13290
13379
  }
13291
13380
  };
13292
- key_default = command31;
13381
+ key_default = command32;
13293
13382
  }
13294
13383
  });
13295
13384
 
@@ -13298,13 +13387,13 @@ var list_exports2 = {};
13298
13387
  __export(list_exports2, {
13299
13388
  default: () => list_default2
13300
13389
  });
13301
- var command32, list_default2;
13390
+ var command33, list_default2;
13302
13391
  var init_list2 = __esm({
13303
13392
  "src/commands/sandbox/list.ts"() {
13304
13393
  "use strict";
13305
13394
  init_exit_codes();
13306
13395
  init_shared();
13307
- command32 = {
13396
+ command33 = {
13308
13397
  resource: "sandbox",
13309
13398
  action: "list",
13310
13399
  summary: "List your developer sandbox",
@@ -13320,7 +13409,7 @@ var init_list2 = __esm({
13320
13409
  return ExitCode.Ok;
13321
13410
  }
13322
13411
  };
13323
- list_default2 = command32;
13412
+ list_default2 = command33;
13324
13413
  }
13325
13414
  });
13326
13415
 
@@ -13329,14 +13418,14 @@ var reset_exports = {};
13329
13418
  __export(reset_exports, {
13330
13419
  default: () => reset_default
13331
13420
  });
13332
- var command33, reset_default;
13421
+ var command34, reset_default;
13333
13422
  var init_reset = __esm({
13334
13423
  "src/commands/sandbox/reset.ts"() {
13335
13424
  "use strict";
13336
13425
  init_exit_codes();
13337
13426
  init_http();
13338
13427
  init_shared();
13339
- command33 = {
13428
+ command34 = {
13340
13429
  resource: "sandbox",
13341
13430
  action: "reset",
13342
13431
  summary: "Reset your sandbox to its seed data",
@@ -13354,16 +13443,16 @@ var init_reset = __esm({
13354
13443
  return ExitCode.Ok;
13355
13444
  }
13356
13445
  };
13357
- reset_default = command33;
13446
+ reset_default = command34;
13358
13447
  }
13359
13448
  });
13360
13449
 
13361
13450
  // src/commands/sandbox/index.ts
13362
- var actions18;
13451
+ var actions19;
13363
13452
  var init_sandbox2 = __esm({
13364
13453
  "src/commands/sandbox/index.ts"() {
13365
13454
  "use strict";
13366
- actions18 = {
13455
+ actions19 = {
13367
13456
  create: () => Promise.resolve().then(() => (init_create(), create_exports)).then((m) => m.default),
13368
13457
  delete: () => Promise.resolve().then(() => (init_delete(), delete_exports)).then((m) => m.default),
13369
13458
  key: () => Promise.resolve().then(() => (init_key(), key_exports)).then((m) => m.default),
@@ -13374,11 +13463,11 @@ var init_sandbox2 = __esm({
13374
13463
  });
13375
13464
 
13376
13465
  // src/commands/skill/index.ts
13377
- var actions19;
13466
+ var actions20;
13378
13467
  var init_skill = __esm({
13379
13468
  "src/commands/skill/index.ts"() {
13380
13469
  "use strict";
13381
- actions19 = {
13470
+ actions20 = {
13382
13471
  install: () => Promise.resolve().then(() => (init_install(), install_exports)).then((m) => m.default)
13383
13472
  };
13384
13473
  }
@@ -13614,7 +13703,7 @@ __export(pull_exports, {
13614
13703
  });
13615
13704
  import { mkdir, writeFile as writeFile4 } from "node:fs/promises";
13616
13705
  import { dirname as dirname2, resolve as resolve11 } from "node:path";
13617
- var command34, pull_default;
13706
+ var command35, pull_default;
13618
13707
  var init_pull = __esm({
13619
13708
  "src/commands/studio/pull.ts"() {
13620
13709
  "use strict";
@@ -13624,7 +13713,7 @@ var init_pull = __esm({
13624
13713
  init_common2();
13625
13714
  init_folder();
13626
13715
  init_transfer2();
13627
- command34 = {
13716
+ command35 = {
13628
13717
  resource: "studio",
13629
13718
  action: "pull",
13630
13719
  summary: "Write a template version's files to a folder",
@@ -13671,7 +13760,7 @@ var init_pull = __esm({
13671
13760
  return ExitCode.Ok;
13672
13761
  }
13673
13762
  };
13674
- pull_default = command34;
13763
+ pull_default = command35;
13675
13764
  }
13676
13765
  });
13677
13766
 
@@ -13704,7 +13793,7 @@ var push_exports = {};
13704
13793
  __export(push_exports, {
13705
13794
  default: () => push_default
13706
13795
  });
13707
- var BUILT_BY, DEFAULT_MESSAGE, command35, push_default;
13796
+ var BUILT_BY, DEFAULT_MESSAGE, command36, push_default;
13708
13797
  var init_push = __esm({
13709
13798
  "src/commands/studio/push.ts"() {
13710
13799
  "use strict";
@@ -13716,7 +13805,7 @@ var init_push = __esm({
13716
13805
  init_read();
13717
13806
  BUILT_BY = "customer_agent";
13718
13807
  DEFAULT_MESSAGE = "Pushed with the Kenso CLI";
13719
- command35 = {
13808
+ command36 = {
13720
13809
  resource: "studio",
13721
13810
  action: "push",
13722
13811
  summary: "Save a folder's files to a template's draft and print the validation",
@@ -13808,7 +13897,7 @@ var init_push = __esm({
13808
13897
  );
13809
13898
  }
13810
13899
  };
13811
- push_default = command35;
13900
+ push_default = command36;
13812
13901
  }
13813
13902
  });
13814
13903
 
@@ -13817,7 +13906,7 @@ var validate_exports = {};
13817
13906
  __export(validate_exports, {
13818
13907
  default: () => validate_default
13819
13908
  });
13820
- var command36, validate_default;
13909
+ var command37, validate_default;
13821
13910
  var init_validate = __esm({
13822
13911
  "src/commands/studio/validate.ts"() {
13823
13912
  "use strict";
@@ -13826,7 +13915,7 @@ var init_validate = __esm({
13826
13915
  init_columns();
13827
13916
  init_common2();
13828
13917
  init_read();
13829
- command36 = {
13918
+ command37 = {
13830
13919
  resource: "studio",
13831
13920
  action: "validate",
13832
13921
  summary: "Validate a folder's files against a template without saving them",
@@ -13855,7 +13944,7 @@ var init_validate = __esm({
13855
13944
  throw validationFailed(validation, "The files have validation errors", commandLine2(ctx, "studio validate", args));
13856
13945
  }
13857
13946
  };
13858
- validate_default = command36;
13947
+ validate_default = command37;
13859
13948
  }
13860
13949
  });
13861
13950
 
@@ -13904,7 +13993,7 @@ function accountIds(value) {
13904
13993
  }
13905
13994
  return ids2.map(Number);
13906
13995
  }
13907
- var SHOWN, command37, preview_default;
13996
+ var SHOWN, command38, preview_default;
13908
13997
  var init_preview = __esm({
13909
13998
  "src/commands/studio/preview.ts"() {
13910
13999
  "use strict";
@@ -13916,7 +14005,7 @@ var init_preview = __esm({
13916
14005
  init_common2();
13917
14006
  init_folder();
13918
14007
  SHOWN = 5;
13919
- command37 = {
14008
+ command38 = {
13920
14009
  resource: "studio",
13921
14010
  action: "preview",
13922
14011
  summary: "Render a saved version for up to 3 accounts; for local edits, studio push them to the draft first",
@@ -13965,7 +14054,7 @@ var init_preview = __esm({
13965
14054
  return ExitCode.Ok;
13966
14055
  }
13967
14056
  };
13968
- preview_default = command37;
14057
+ preview_default = command38;
13969
14058
  }
13970
14059
  });
13971
14060
 
@@ -14166,7 +14255,7 @@ function estimateOutput(templateId, target, estimate2) {
14166
14255
  ...target.campaignId !== void 0 ? { estimateNote: "An upper bound: it counts one page per lead, and a campaign run builds one page per company." } : {}
14167
14256
  };
14168
14257
  }
14169
- var COMMAND6, sha2562, command38, fill_default;
14258
+ var COMMAND6, sha2562, command39, fill_default;
14170
14259
  var init_fill = __esm({
14171
14260
  "src/commands/studio/fill.ts"() {
14172
14261
  "use strict";
@@ -14182,7 +14271,7 @@ var init_fill = __esm({
14182
14271
  init_fill_runs();
14183
14272
  COMMAND6 = "studio fill";
14184
14273
  sha2562 = (data) => createHash8("sha256").update(data).digest("hex");
14185
- command38 = {
14274
+ command39 = {
14186
14275
  resource: "studio",
14187
14276
  action: "fill",
14188
14277
  summary: "Fill a template on many accounts or campaign leads (estimate first)",
@@ -14242,16 +14331,16 @@ var init_fill = __esm({
14242
14331
  return outcome.exitCode;
14243
14332
  }
14244
14333
  };
14245
- fill_default = command38;
14334
+ fill_default = command39;
14246
14335
  }
14247
14336
  });
14248
14337
 
14249
14338
  // src/commands/studio/index.ts
14250
- var actions20;
14339
+ var actions21;
14251
14340
  var init_studio2 = __esm({
14252
14341
  "src/commands/studio/index.ts"() {
14253
14342
  "use strict";
14254
- actions20 = {
14343
+ actions21 = {
14255
14344
  pull: () => Promise.resolve().then(() => (init_pull(), pull_exports)).then((m) => m.default),
14256
14345
  push: () => Promise.resolve().then(() => (init_push(), push_exports)).then((m) => m.default),
14257
14346
  validate: () => Promise.resolve().then(() => (init_validate(), validate_exports)).then((m) => m.default),
@@ -14393,7 +14482,7 @@ function readBody(req) {
14393
14482
  function reply(res, status, body2) {
14394
14483
  res.writeHead(status, { "content-type": "application/json" }).end(JSON.stringify(body2));
14395
14484
  }
14396
- var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command39, listen_default;
14485
+ var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command40, listen_default;
14397
14486
  var init_listen = __esm({
14398
14487
  "src/commands/webhooks/listen.ts"() {
14399
14488
  "use strict";
@@ -14404,7 +14493,7 @@ var init_listen = __esm({
14404
14493
  MIN_POLL_MS = 1e3;
14405
14494
  MAX_POLL_MS = 6e4;
14406
14495
  MAX_TRIGGER_BYTES = 1e6;
14407
- command39 = {
14496
+ command40 = {
14408
14497
  resource: "webhooks",
14409
14498
  action: "listen",
14410
14499
  summary: "Stream the workspace's events and forward them, signed, to a local handler",
@@ -14510,7 +14599,7 @@ var init_listen = __esm({
14510
14599
  return ExitCode.Ok;
14511
14600
  }
14512
14601
  };
14513
- listen_default = command39;
14602
+ listen_default = command40;
14514
14603
  }
14515
14604
  });
14516
14605
 
@@ -14529,7 +14618,7 @@ function notRunning() {
14529
14618
  next: LISTEN_NEXT
14530
14619
  });
14531
14620
  }
14532
- var LISTEN_NEXT, command40, trigger_default;
14621
+ var LISTEN_NEXT, command41, trigger_default;
14533
14622
  var init_trigger = __esm({
14534
14623
  "src/commands/webhooks/trigger.ts"() {
14535
14624
  "use strict";
@@ -14538,7 +14627,7 @@ var init_trigger = __esm({
14538
14627
  init_http();
14539
14628
  init_local();
14540
14629
  LISTEN_NEXT = "kenso webhooks listen --forward-to http://localhost:3000/hook";
14541
- command40 = {
14630
+ command41 = {
14542
14631
  resource: "webhooks",
14543
14632
  action: "trigger",
14544
14633
  summary: "Send a sample event of one type through the running kenso webhooks listen",
@@ -14595,16 +14684,16 @@ var init_trigger = __esm({
14595
14684
  return ExitCode.Ok;
14596
14685
  }
14597
14686
  };
14598
- trigger_default = command40;
14687
+ trigger_default = command41;
14599
14688
  }
14600
14689
  });
14601
14690
 
14602
14691
  // src/commands/webhooks/index.ts
14603
- var actions21;
14692
+ var actions22;
14604
14693
  var init_webhooks2 = __esm({
14605
14694
  "src/commands/webhooks/index.ts"() {
14606
14695
  "use strict";
14607
- actions21 = {
14696
+ actions22 = {
14608
14697
  listen: () => Promise.resolve().then(() => (init_listen(), listen_exports)).then((m) => m.default),
14609
14698
  trigger: () => Promise.resolve().then(() => (init_trigger(), trigger_exports)).then((m) => m.default)
14610
14699
  };
@@ -14799,14 +14888,14 @@ var status_exports3 = {};
14799
14888
  __export(status_exports3, {
14800
14889
  default: () => status_default3
14801
14890
  });
14802
- var command41, status_default3;
14891
+ var command42, status_default3;
14803
14892
  var init_status3 = __esm({
14804
14893
  "src/commands/work/status.ts"() {
14805
14894
  "use strict";
14806
14895
  init_exit_codes();
14807
14896
  init_http();
14808
14897
  init_common3();
14809
- command41 = {
14898
+ command42 = {
14810
14899
  resource: "work",
14811
14900
  action: "status",
14812
14901
  summary: "Show the Kenso AI work waiting for your own agent, per kind",
@@ -14840,7 +14929,7 @@ var init_status3 = __esm({
14840
14929
  return ExitCode.Ok;
14841
14930
  }
14842
14931
  };
14843
- status_default3 = command41;
14932
+ status_default3 = command42;
14844
14933
  }
14845
14934
  });
14846
14935
 
@@ -14972,9 +15061,9 @@ var init_files = __esm({
14972
15061
  import { execFile, spawnSync as spawnSync2 } from "node:child_process";
14973
15062
  import { readFileSync as readFileSync12 } from "node:fs";
14974
15063
  import { isAbsolute as isAbsolute2 } from "node:path";
14975
- function sudoArgs(user, command48, args, keep = [], set = {}) {
15064
+ function sudoArgs(user, command49, args, keep = [], set = {}) {
14976
15065
  const assignments = Object.entries(set).map(([name, value]) => `${name}=${value}`);
14977
- return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command48, ...args];
15066
+ return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command49, ...args];
14978
15067
  }
14979
15068
  function agentKensoEnv(opts) {
14980
15069
  return {
@@ -14984,12 +15073,12 @@ function agentKensoEnv(opts) {
14984
15073
  AI_AGENT: opts.agentName
14985
15074
  };
14986
15075
  }
14987
- function sudoExec(user, command48, args, opts = {}) {
15076
+ function sudoExec(user, command49, args, opts = {}) {
14988
15077
  const [sudo = "/usr/bin/sudo", ...lead] = user.sudo;
14989
15078
  return new Promise((resolve16) => {
14990
15079
  execFile(
14991
15080
  sudo,
14992
- [...lead, ...sudoArgs(user.name, command48, args)],
15081
+ [...lead, ...sudoArgs(user.name, command49, args)],
14993
15082
  { env: { PATH: SUDO_PATH }, cwd: "/", timeout: opts.timeoutMs ?? PROBE_TIMEOUT_MS, maxBuffer: opts.maxBuffer ?? 1024 * 1024, encoding: "utf8", windowsHide: true, shell: false },
14994
15083
  (err, stdout, stderr) => {
14995
15084
  const code = err ? err.code : 0;
@@ -15099,9 +15188,9 @@ var init_folder2 = __esm({
15099
15188
  init_redact();
15100
15189
  init_agent_user();
15101
15190
  WorkRunFolder = class {
15102
- constructor(ctx, command48, args, outDir, shared = false) {
15191
+ constructor(ctx, command49, args, outDir, shared = false) {
15103
15192
  this.ctx = ctx;
15104
- this.command = command48;
15193
+ this.command = command49;
15105
15194
  this.args = args;
15106
15195
  this.outDir = outDir;
15107
15196
  this.shared = shared;
@@ -15216,7 +15305,7 @@ var pull_exports2 = {};
15216
15305
  __export(pull_exports2, {
15217
15306
  default: () => pull_default2
15218
15307
  });
15219
- var MAX_FILES, command42, pull_default2;
15308
+ var MAX_FILES, command43, pull_default2;
15220
15309
  var init_pull2 = __esm({
15221
15310
  "src/commands/work/pull.ts"() {
15222
15311
  "use strict";
@@ -15225,7 +15314,7 @@ var init_pull2 = __esm({
15225
15314
  init_common3();
15226
15315
  init_folder2();
15227
15316
  MAX_FILES = 100;
15228
- command42 = {
15317
+ command43 = {
15229
15318
  resource: "work",
15230
15319
  action: "pull",
15231
15320
  summary: "Claim waiting work into local work files, to answer by hand",
@@ -15303,7 +15392,7 @@ var init_pull2 = __esm({
15303
15392
  return interrupted7 ? ExitCode.Interrupted : ExitCode.Ok;
15304
15393
  }
15305
15394
  };
15306
- pull_default2 = command42;
15395
+ pull_default2 = command43;
15307
15396
  }
15308
15397
  });
15309
15398
 
@@ -15445,7 +15534,7 @@ __export(submit_exports, {
15445
15534
  default: () => submit_default
15446
15535
  });
15447
15536
  import { resolve as resolve14 } from "node:path";
15448
- var command43, submit_default;
15537
+ var command44, submit_default;
15449
15538
  var init_submit = __esm({
15450
15539
  "src/commands/work/submit.ts"() {
15451
15540
  "use strict";
@@ -15454,7 +15543,7 @@ var init_submit = __esm({
15454
15543
  init_files();
15455
15544
  init_answers();
15456
15545
  init_common3();
15457
- command43 = {
15546
+ command44 = {
15458
15547
  resource: "work",
15459
15548
  action: "submit",
15460
15549
  summary: "Send answers files to Kenso and write each one's results",
@@ -15486,7 +15575,7 @@ var init_submit = __esm({
15486
15575
  return totals.rejected > 0 ? ExitCode.Partial : ExitCode.Ok;
15487
15576
  }
15488
15577
  };
15489
- submit_default = command43;
15578
+ submit_default = command44;
15490
15579
  }
15491
15580
  });
15492
15581
 
@@ -15507,7 +15596,7 @@ function claimIdOf(arg) {
15507
15596
  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..." });
15508
15597
  return arg;
15509
15598
  }
15510
- var CLAIM_ID, command44, release_default;
15599
+ var CLAIM_ID, command45, release_default;
15511
15600
  var init_release = __esm({
15512
15601
  "src/commands/work/release.ts"() {
15513
15602
  "use strict";
@@ -15516,7 +15605,7 @@ var init_release = __esm({
15516
15605
  init_files();
15517
15606
  init_common3();
15518
15607
  CLAIM_ID = /^[A-Za-z0-9_-]{1,64}$/;
15519
- command44 = {
15608
+ command45 = {
15520
15609
  resource: "work",
15521
15610
  action: "release",
15522
15611
  summary: "Give claimed work back to the queue now",
@@ -15535,7 +15624,7 @@ var init_release = __esm({
15535
15624
  return ExitCode.Ok;
15536
15625
  }
15537
15626
  };
15538
- release_default = command44;
15627
+ release_default = command45;
15539
15628
  }
15540
15629
  });
15541
15630
 
@@ -15874,12 +15963,12 @@ function plain(text4) {
15874
15963
  return text4.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "");
15875
15964
  }
15876
15965
  function runStatus(bin, args, env, adapter, runAs) {
15877
- const command48 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
15966
+ const command49 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
15878
15967
  const commandArgs2 = runAs ? [...runAs.sudo.slice(1), ...sudoArgs(runAs.name, bin, args)] : args;
15879
15968
  const options = runAs ? { env: { PATH: SUDO_PATH }, cwd: "/" } : { env: childEnv(env, adapter) };
15880
15969
  return new Promise((resolve16) => {
15881
15970
  execFile2(
15882
- command48,
15971
+ command49,
15883
15972
  commandArgs2,
15884
15973
  { ...options, timeout: STATUS_TIMEOUT_MS, maxBuffer: 1024 * 1024, windowsHide: true, shell: false },
15885
15974
  (err, stdout, stderr) => {
@@ -16957,12 +17046,12 @@ var init_stop = __esm({
16957
17046
  });
16958
17047
 
16959
17048
  // src/commands/work/run.ts
16960
- var run_exports2 = {};
16961
- __export(run_exports2, {
16962
- default: () => run_default
17049
+ var run_exports3 = {};
17050
+ __export(run_exports3, {
17051
+ default: () => run_default2
16963
17052
  });
16964
- var FAILURES_IN_A_ROW, command45, run_default;
16965
- var init_run2 = __esm({
17053
+ var FAILURES_IN_A_ROW, command46, run_default2;
17054
+ var init_run3 = __esm({
16966
17055
  "src/commands/work/run.ts"() {
16967
17056
  "use strict";
16968
17057
  init_errors();
@@ -16982,7 +17071,7 @@ var init_run2 = __esm({
16982
17071
  init_folder2();
16983
17072
  init_stop();
16984
17073
  FAILURES_IN_A_ROW = 3;
16985
- command45 = {
17074
+ command46 = {
16986
17075
  resource: "work",
16987
17076
  action: "run",
16988
17077
  summary: "Run your own coding agent on the waiting work until the queue is empty",
@@ -17307,21 +17396,21 @@ var init_run2 = __esm({
17307
17396
  return exitCodeFor(reason, totals.rejected > 0 || jobsFailed > 0);
17308
17397
  }
17309
17398
  };
17310
- run_default = command45;
17399
+ run_default2 = command46;
17311
17400
  }
17312
17401
  });
17313
17402
 
17314
17403
  // src/commands/work/index.ts
17315
- var actions22;
17404
+ var actions23;
17316
17405
  var init_work2 = __esm({
17317
17406
  "src/commands/work/index.ts"() {
17318
17407
  "use strict";
17319
- actions22 = {
17408
+ actions23 = {
17320
17409
  status: () => Promise.resolve().then(() => (init_status3(), status_exports3)).then((m) => m.default),
17321
17410
  pull: () => Promise.resolve().then(() => (init_pull2(), pull_exports2)).then((m) => m.default),
17322
17411
  submit: () => Promise.resolve().then(() => (init_submit(), submit_exports)).then((m) => m.default),
17323
17412
  release: () => Promise.resolve().then(() => (init_release(), release_exports)).then((m) => m.default),
17324
- run: () => Promise.resolve().then(() => (init_run2(), run_exports2)).then((m) => m.default)
17413
+ run: () => Promise.resolve().then(() => (init_run3(), run_exports3)).then((m) => m.default)
17325
17414
  };
17326
17415
  }
17327
17416
  });
@@ -17340,14 +17429,14 @@ function parseLimit(value) {
17340
17429
  }
17341
17430
  return limit;
17342
17431
  }
17343
- var MAX_LIMIT, command46, list_default3;
17432
+ var MAX_LIMIT, command47, list_default3;
17344
17433
  var init_list3 = __esm({
17345
17434
  "src/commands/workspace/list.ts"() {
17346
17435
  "use strict";
17347
17436
  init_errors();
17348
17437
  init_exit_codes();
17349
17438
  MAX_LIMIT = 200;
17350
- command46 = {
17439
+ command47 = {
17351
17440
  resource: "workspace",
17352
17441
  action: "list",
17353
17442
  summary: "List the workspaces your key can use",
@@ -17375,7 +17464,7 @@ var init_list3 = __esm({
17375
17464
  return ExitCode.Ok;
17376
17465
  }
17377
17466
  };
17378
- list_default3 = command46;
17467
+ list_default3 = command47;
17379
17468
  }
17380
17469
  });
17381
17470
 
@@ -17384,7 +17473,7 @@ var use_exports = {};
17384
17473
  __export(use_exports, {
17385
17474
  default: () => use_default
17386
17475
  });
17387
- var command47, use_default;
17476
+ var command48, use_default;
17388
17477
  var init_use = __esm({
17389
17478
  "src/commands/workspace/use.ts"() {
17390
17479
  "use strict";
@@ -17392,7 +17481,7 @@ var init_use = __esm({
17392
17481
  init_errors();
17393
17482
  init_exit_codes();
17394
17483
  init_http();
17395
- command47 = {
17484
+ command48 = {
17396
17485
  resource: "workspace",
17397
17486
  action: "use",
17398
17487
  summary: "Set the profile's default workspace",
@@ -17449,16 +17538,16 @@ var init_use = __esm({
17449
17538
  return ExitCode.Ok;
17450
17539
  }
17451
17540
  };
17452
- use_default = command47;
17541
+ use_default = command48;
17453
17542
  }
17454
17543
  });
17455
17544
 
17456
17545
  // src/commands/workspace/index.ts
17457
- var actions23;
17546
+ var actions24;
17458
17547
  var init_workspace = __esm({
17459
17548
  "src/commands/workspace/index.ts"() {
17460
17549
  "use strict";
17461
- actions23 = {
17550
+ actions24 = {
17462
17551
  list: () => Promise.resolve().then(() => (init_list3(), list_exports3)).then((m) => m.default),
17463
17552
  use: () => Promise.resolve().then(() => (init_use(), use_exports)).then((m) => m.default)
17464
17553
  };
@@ -17494,6 +17583,7 @@ var init_registry = __esm({
17494
17583
  init_mcp();
17495
17584
  init_opportunities();
17496
17585
  init_people();
17586
+ init_reports();
17497
17587
  init_runs2();
17498
17588
  init_sandbox2();
17499
17589
  init_skill();
@@ -17520,14 +17610,15 @@ var init_registry = __esm({
17520
17610
  mcp: actions14,
17521
17611
  opportunities: actions15,
17522
17612
  people: actions16,
17523
- runs: actions17,
17524
- sandbox: actions18,
17525
- skill: actions19,
17526
- studio: actions20,
17527
- webhooks: actions21,
17613
+ reports: actions17,
17614
+ runs: actions18,
17615
+ sandbox: actions19,
17616
+ skill: actions20,
17617
+ studio: actions21,
17618
+ webhooks: actions22,
17528
17619
  whoami: topLevel("whoami", actions4.status, "kenso auth status"),
17529
- work: actions22,
17530
- workspace: actions23
17620
+ work: actions23,
17621
+ workspace: actions24
17531
17622
  };
17532
17623
  resourceAliases = { leads: "contacts" };
17533
17624
  }
@@ -17664,8 +17755,8 @@ async function renderTopHelp(opts) {
17664
17755
  names.push(withPositionals(spec, spec.action));
17665
17756
  groups.set(hint, names);
17666
17757
  }
17667
- const actions25 = [...groups.entries()].map(([hint, names]) => `${names.join(", ")}${hint}`);
17668
- if (actions25.length > 0) rows.push([resource, actions25.join(", ")]);
17758
+ const actions26 = [...groups.entries()].map(([hint, names]) => `${names.join(", ")}${hint}`);
17759
+ if (actions26.length > 0) rows.push([resource, actions26.join(", ")]);
17669
17760
  }
17670
17761
  const at = 4 + Math.min(22, Math.max(0, ...rows.map(([left]) => left.length)));
17671
17762
  lines.push(
@@ -17678,7 +17769,7 @@ async function renderTopHelp(opts) {
17678
17769
  const [area = "", action = ""] = name.split(" ");
17679
17770
  byArea.set(area, [...byArea.get(area) ?? [], action]);
17680
17771
  }
17681
- const named = [...byArea.entries()].map(([area, actions25]) => `${area} ${actions25.join("|")}`);
17772
+ const named = [...byArea.entries()].map(([area, actions26]) => `${area} ${actions26.join("|")}`);
17682
17773
  lines.push(wrap(`Beta, hidden here but they run (the server decides): ${named.join(", ")}.`, " "));
17683
17774
  }
17684
17775
  const generated = await listGenerated({ features: opts.allCommands ? [] : getFeatures, env: opts.env });
@@ -17686,13 +17777,13 @@ async function renderTopHelp(opts) {
17686
17777
  if (visible.length > 0) {
17687
17778
  const byResource = /* @__PURE__ */ new Map();
17688
17779
  for (const g of visible) {
17689
- const actions25 = byResource.get(g.resource) ?? [];
17690
- actions25.push(`${g.action}${g.beta ? " (beta)" : ""}`);
17691
- byResource.set(g.resource, actions25);
17780
+ const actions26 = byResource.get(g.resource) ?? [];
17781
+ actions26.push(`${g.action}${g.beta ? " (beta)" : ""}`);
17782
+ byResource.set(g.resource, actions26);
17692
17783
  }
17693
17784
  const sorted2 = [...byResource.entries()].sort(([a], [b]) => a.localeCompare(b));
17694
17785
  if (opts.allCommands) {
17695
- const generatedRows = sorted2.map(([resource, actions25]) => [resource, actions25.sort().join(", ")]);
17786
+ const generatedRows = sorted2.map(([resource, actions26]) => [resource, actions26.sort().join(", ")]);
17696
17787
  lines.push("", "API resources (kenso <resource> <action>):", columns(generatedRows));
17697
17788
  } else {
17698
17789
  const names = new Set(sorted2.map(([resource]) => resource));
@@ -18008,8 +18099,8 @@ function startUpdateNotice(argv, opts = {}) {
18008
18099
  if (!found) return;
18009
18100
  writeCheck(file, { checkedAt: new Date(now).toISOString(), latest: found });
18010
18101
  if (isNewer(found, version)) {
18011
- const command48 = updateCommand(install, opts.platform ?? process.platform);
18012
- stderr.write(`kenso ${found} is out (you have ${version}): ${command48}
18102
+ const command49 = updateCommand(install, opts.platform ?? process.platform);
18103
+ stderr.write(`kenso ${found} is out (you have ${version}): ${command49}
18013
18104
  Turn this off with KENSO_NO_UPDATE_NOTIFIER=1.
18014
18105
  `);
18015
18106
  }
@@ -18051,7 +18142,7 @@ function resources() {
18051
18142
  const names = Object.entries(handWritten).filter(([, area]) => Object.keys(area).length > 0).map(([resource]) => resource);
18052
18143
  return sorted([...names, ...Object.keys(resourceAliases), ...loadManifest().operations.map((op) => op.resource)]);
18053
18144
  }
18054
- function actions24(resource) {
18145
+ function actions25(resource) {
18055
18146
  const own = Object.keys(handWritten[resource] ?? {}).filter((action) => action !== "");
18056
18147
  return sorted([...own, ...loadManifest().operations.filter((op) => op.resource === resource).map((op) => op.action)]);
18057
18148
  }
@@ -18116,7 +18207,7 @@ async function completions(words, globals) {
18116
18207
  return flagsOf2(spec, globals, positionals.length === 0);
18117
18208
  }
18118
18209
  if (positionals.length === 0) return resources();
18119
- if (!spec) return positionals.length === 1 ? actions24(resourceAliases[positionals[0]] ?? positionals[0]) : [];
18210
+ if (!spec) return positionals.length === 1 ? actions25(resourceAliases[positionals[0]] ?? positionals[0]) : [];
18120
18211
  const given = positionals.length - commandWords;
18121
18212
  const declared = spec.positionals ?? [];
18122
18213
  if (given < declared.length || declared.at(-1)?.variadic === true) {
@@ -18210,9 +18301,9 @@ function normalizeBooleans(argv, names, strict) {
18210
18301
  async function knownCommands() {
18211
18302
  const commands = /* @__PURE__ */ new Set();
18212
18303
  for (const [resource, area] of Object.entries(handWritten)) {
18213
- const actions25 = Object.keys(area);
18214
- if (actions25.length > 0) commands.add(resource);
18215
- for (const action of actions25) commands.add(action ? `${resource} ${action}` : resource);
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);
18216
18307
  }
18217
18308
  for (const g of await listGenerated({ features: [] })) {
18218
18309
  commands.add(g.resource);