kenso 0.1.85 → 0.1.86

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.85" : "0.0.0-dev";
2480
+ VERSION = true ? "0.1.86" : "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: command56, createdAt, status } = raw;
4177
+ const { runId, command: command57, createdAt, status } = raw;
4178
4178
  if (typeof runId !== "string" || !RUN_ID_PATTERN.test(runId)) return null;
4179
- if (typeof command56 !== "string" || typeof createdAt !== "string") return null;
4179
+ if (typeof command57 !== "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: command56,
4190
+ command: command57,
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(command56, args, inputSha256, env, workspaceId, anyWorkspace = false) {
4245
+ async function findIdentical(command57, 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 === command56 && (run.inputSha256 || void 0) === (inputSha256 || void 0) && (anyWorkspace || (run.workspaceId || void 0) === (workspaceId || void 0)) && argsIdentity(run.args) === identity
4249
+ (run) => run.command === command57 && (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, command56, args, extra = []) {
7455
- const parts2 = ["kenso", ...command56.split(" "), ...(args.positionals ?? []).map(shellQuote3)];
7454
+ function commandLine2(ctx, command57, args, extra = []) {
7455
+ const parts2 = ["kenso", ...command57.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| `deleted-accounts list`, `accounts restore <id>` | The accounts deleted in the last 30 days, and bringing one back |\n| `export <accounts\\|people\\|deals>` | The list as CSV: everything, a saved Accounts view, or what the filters match |\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| `pipelines stage-rules` | List or set the fields a deal should have in each stage |\n| `crm-connections`, `crm-imports`, `crm-sync-issues` | Read and run CRM sync. Connecting a CRM stays in the app |\n| `tasks add`, `tasks done`, `tasks assign` | Add a to-do for a member on an account, person or deal, complete it, or hand it on (needs `tasks`) |\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## Pipelines\n\nA workspace with the `pipelines` flag on can run several deal pipelines, each with its own stages. These are generated commands (beta):\n\n```bash\nkenso pipelines list\nkenso pipelines list --query "[].{id: id, name: name, default: isDefault, stages: stages[].key}"\nkenso pipelines get --pipeline-id 5\n```\n\n`list` prints every pipeline in display order, archived ones included: `id`, `name`, `routingRule` (the one sentence Ken reads to decide whether a new deal belongs there), `isDefault`, `isArchived`, `position`, `opportunityCount`, `amountTotal` and `stages`, each stage as `kenso opportunity-stages list` prints it. A stage key is unique in the workspace, across pipelines, so a deal\'s `stage` names its pipeline and its `pipelineId` repeats it. The first read turns the workspace\'s stage list into its default pipeline, named Sales, with every deal in it. The same rows as the MCP\'s `pipelines(operation="list")`.\n\n## Restore a deleted account\n\n```bash\nkenso deleted-accounts list\nkenso accounts restore 812\n```\n\nA deleted account can be restored for 30 days. `deleted-accounts list` shows each one with who deleted it, `expiresAt` (restore works until then) and what comes back: `personCount`, `opportunityCount` and `touchCount`. `accounts restore <id>` brings the account back with its domains, its people, its deals and its planned touches, which wait for approval again. A domain another account took since stays with that account and is listed in `domainsTaken`. A merged account is not listed and cannot be restored: a merge has no undo. Both commands are behind the `crm_import_export` feature flag (`404` while it is off).\n\n## Export accounts, people or deals\n\n```bash\nkenso export accounts --out accounts.csv\nkenso export accounts --view 12 --out tier-1.csv\nkenso export deals --filters \'[{"field":"stageCategory","operator":"is","values":["open"]}]\' > open-deals.csv\n```\n\nIt writes the CSV that `POST /v1/accounts/export`, `/v1/people/export` or `/v1/opportunities/export` returns, to stdout or to `--out` (then it prints the file and its row count). With no filter it exports every record. More than 50,000 rows is refused: narrow the filters. `--view <id>` exports a saved Accounts view (`kenso account-views list` shows the ids). `--filters`, `--where` (accounts), `--q` and `--sort` are the search operation\'s own fields, so a deals or people view exports with its filters and sort. The accounts and deals files start with `id` and import back as they are. Each export writes an audit-log entry and needs the export permission. Accounts and deals also need the `crm_import_export` flag while it is in beta.\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\n## Required fields per stage\n\n```bash\nkenso pipelines stage-rules\nkenso pipelines stage-rules proposal --require amount,closeDate,custom.tier\nkenso pipelines stage-rules proposal --none\nkenso pipelines stage-rules lost --default\n```\n\nWith the `deal_stage_rules` flag on, each stage can name the fields a deal should have in it. Without a stage the command prints every stage\'s `key`, `label`, `category`, `isArchived`, `requiredFields` and `isDefault`, plus `requirableFields`: `amount`, `closeDate`, `ownerMemberId`, `primaryPersonId`, `nextStep`, `lostReasonKey`, `wonReasonKey` and `custom.<key>` for each custom deal field. `--require` sets the stage\'s whole list, in order, at most 10. `--none` requires nothing, and `--default` goes back to the default: a lost stage asks for `lostReasonKey`, any other stage nothing. Setting a rule needs the `workspace_settings` permission. The same as the MCP\'s `opportunities(operation="stages-set-required-fields")`.\n\nA missing field never stops a move. The deal moves, and it is flagged Missing on the board, the list and the deal page until the field is filled. A rule also applies to deals already in the stage.\n\n## Tasks\n\nTasks are to-dos a member owes: a title, an optional due day or time, an assignee and at most one account, person or deal. They need the `tasks` flag. The app calls deals "Deals"; the CLI keeps `--deal` for an opportunity id.\n\n```bash\nkenso tasks add "Send the deck" --due 2026-11-20 --account 812\nkenso tasks add "Call Ada back" --due 2026-11-18T16:00:00Z --person 501 --assignee 42\nkenso tasks list --assignee me --due overdue,today\nkenso task-queue list --scope mine\nkenso tasks assign 7 42\nkenso tasks done 7\nkenso tasks done 7 --undo\n```\n\n- `tasks add` sends `POST /v1/tasks`. Without `--assignee` the task is yours. A `--due` time\'s day is read in the assignee\'s app time zone.\n- `tasks done` completes the task (`PATCH /v1/tasks/{id}` with `status: done`), `--undo` reopens it. `tasks assign` gives it to another member, who gets a `task_assigned` notification.\n- `tasks list`, `get`, `update`, `delete`, `restore` and `task-queue list` are generated from the API: `kenso tasks --help` lists them. `task-queue list` is the Tasks screen\'s open work: tasks, manual touches and call tasks, by due day.\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| `deleted-accounts list`, `accounts restore <id>` | The accounts deleted in the last 30 days, and bringing one back |\n| `export <accounts\\|people\\|deals>` | The list as CSV: everything, a saved Accounts view, or what the filters match |\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| `pipelines stage-rules` | List or set the fields a deal should have in each stage |\n| `crm-connections`, `crm-imports`, `crm-sync-issues` | Read and run CRM sync. Connecting a CRM stays in the app |\n| `tasks add`, `tasks done`, `tasks assign`, `tasks queue` | Add a to-do for a member on an account, person or deal, complete it, hand it on, or read your open work (needs `tasks`) |\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## Pipelines\n\nA workspace with the `pipelines` flag on can run several deal pipelines, each with its own stages. These are generated commands (beta):\n\n```bash\nkenso pipelines list\nkenso pipelines list --query "[].{id: id, name: name, default: isDefault, stages: stages[].key}"\nkenso pipelines get --pipeline-id 5\n```\n\n`list` prints every pipeline in display order, archived ones included: `id`, `name`, `routingRule` (the one sentence Ken reads to decide whether a new deal belongs there), `isDefault`, `isArchived`, `position`, `opportunityCount`, `amountTotal` and `stages`, each stage as `kenso opportunity-stages list` prints it. A stage key is unique in the workspace, across pipelines, so a deal\'s `stage` names its pipeline and its `pipelineId` repeats it. The first read turns the workspace\'s stage list into its default pipeline, named Sales, with every deal in it. The same rows as the MCP\'s `pipelines(operation="list")`.\n\n## Restore a deleted account\n\n```bash\nkenso deleted-accounts list\nkenso accounts restore 812\n```\n\nA deleted account can be restored for 30 days. `deleted-accounts list` shows each one with who deleted it, `expiresAt` (restore works until then) and what comes back: `personCount`, `opportunityCount` and `touchCount`. `accounts restore <id>` brings the account back with its domains, its people, its deals and its planned touches, which wait for approval again. A domain another account took since stays with that account and is listed in `domainsTaken`. A merged account is not listed and cannot be restored: a merge has no undo. Both commands are behind the `crm_import_export` feature flag (`404` while it is off).\n\n## Export accounts, people or deals\n\n```bash\nkenso export accounts --out accounts.csv\nkenso export accounts --view 12 --out tier-1.csv\nkenso export deals --filters \'[{"field":"stageCategory","operator":"is","values":["open"]}]\' > open-deals.csv\n```\n\nIt writes the CSV that `POST /v1/accounts/export`, `/v1/people/export` or `/v1/opportunities/export` returns, to stdout or to `--out` (then it prints the file and its row count). With no filter it exports every record. More than 50,000 rows is refused: narrow the filters. `--view <id>` exports a saved Accounts view (`kenso account-views list` shows the ids). `--filters`, `--where` (accounts), `--q` and `--sort` are the search operation\'s own fields, so a deals or people view exports with its filters and sort. The accounts and deals files start with `id` and import back as they are. Each export writes an audit-log entry and needs the export permission. Accounts and deals also need the `crm_import_export` flag while it is in beta.\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\n## Required fields per stage\n\n```bash\nkenso pipelines stage-rules\nkenso pipelines stage-rules proposal --require amount,closeDate,custom.tier\nkenso pipelines stage-rules proposal --none\nkenso pipelines stage-rules lost --default\n```\n\nWith the `deal_stage_rules` flag on, each stage can name the fields a deal should have in it. Without a stage the command prints every stage\'s `key`, `label`, `category`, `isArchived`, `requiredFields` and `isDefault`, plus `requirableFields`: `amount`, `closeDate`, `ownerMemberId`, `primaryPersonId`, `nextStep`, `lostReasonKey`, `wonReasonKey` and `custom.<key>` for each custom deal field. `--require` sets the stage\'s whole list, in order, at most 10. `--none` requires nothing, and `--default` goes back to the default: a lost stage asks for `lostReasonKey`, any other stage nothing. Setting a rule needs the `workspace_settings` permission. The same as the MCP\'s `opportunities(operation="stages-set-required-fields")`.\n\nA missing field never stops a move. The deal moves, and it is flagged Missing on the board, the list and the deal page until the field is filled. A rule also applies to deals already in the stage.\n\n## Tasks\n\nTasks are to-dos a member owes: a title, an optional due day or time, an assignee and at most one account, person or deal. They need the `tasks` flag. The app calls deals "Deals"; the CLI keeps `--deal` for an opportunity id.\n\n```bash\nkenso tasks add "Send the deck" --due tomorrow --account 812\nkenso tasks add "Call Ada back" --due friday --at 16:00 --person 501 --assignee ada@acme.com\nkenso tasks list --assignee me --due overdue,today\nkenso tasks queue --scope mine\nkenso tasks assign 7 me\nkenso tasks done 7 8 9\nkenso tasks done 7 --undo\n```\n\n- `tasks add` sends `POST /v1/tasks`. `--due` takes `today`, `tomorrow`, a weekday (the next one: `friday` or `fri`), a day (`2026-11-20`) or an ISO 8601 time; `--at HH:MM` puts a time on that day (today without `--due`). Day words and `--at` read this computer\'s clock and time zone (`TZ`); a time\'s day is read in the assignee\'s app time zone. `--assignee` takes `me`, a member id or an email; without it the task is yours.\n- `tasks done` completes each task it names, in order (`PATCH /v1/tasks/{id}` with `status: done`); `--undo` reopens them. `tasks assign` gives a task to `me`, a member id or a member\'s email; that member gets a `task_assigned` notification.\n- `tasks queue` is `task-queue list` under the name you would try: the Tasks screen\'s open work by due day, with `--scope mine|assigned_by_me|everyone`. It lists tasks, manual touches, call tasks, inbox threads with a reminder due (when you can view the Inbox) and Ken\'s follow-ups to you, each with an app link in `href`.\n- `tasks list`, `get`, `update`, `delete`, `restore` and `task-queue list` are generated from the API: `kenso tasks --help` lists them.\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: (command56, args) => {
8980
- const child = nodeSpawn(command56, args, { detached: true, stdio: "ignore" });
8979
+ spawn: (command57, args) => {
8980
+ const child = nodeSpawn(command57, 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: (command56, args) => {
10170
- const child = nodeSpawn2(command56, args, { detached: true, stdio: "ignore" });
10169
+ spawn: (command57, args) => {
10170
+ const child = nodeSpawn2(command57, 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, command56, hint) {
10211
+ function requireFlag(flags, name, command57, hint) {
10212
10212
  const value = stringFlag2(flags, name);
10213
- if (value === void 0) throw usageError(`--${name} is required for ${command56}.`, { field: name, next: `${command56} --help`, ...hint ? { hint } : {} });
10213
+ if (value === void 0) throw usageError(`--${name} is required for ${command57}.`, { field: name, next: `${command57} --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, command56) {
10223
- const raw = requireFlag(flags, name, command56);
10222
+ function idFlag(flags, name, command57) {
10223
+ const raw = requireFlag(flags, name, command57);
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(command56, flags, ctx, extra = []) {
10244
- const parts2 = [command56];
10243
+ function sameCommand2(command57, flags, ctx, extra = []) {
10244
+ const parts2 = [command57];
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, command56, args) {
11381
+ async function unfinishedWhereIds(ctx, command57, 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 !== command56 || run.status === "done" || run.status === "planned") continue;
11386
+ if (run.command !== command57 || 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 command56 = `kenso contacts ${kind}`;
11532
+ const command57 = `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(`${command56} needs exactly one of ${choices}.`, { field: "ids", next: `${command56} --help` });
11539
+ throw usageError(`${command57} needs exactly one of ${choices}.`, { field: "ids", next: `${command57} --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);
@@ -14748,16 +14748,74 @@ function positiveId3(text4, field, next) {
14748
14748
  if (!Number.isSafeInteger(id) || id < 1) throw usageError(`${field} must be a positive whole number (got "${value}").`, { field, next });
14749
14749
  return id;
14750
14750
  }
14751
- function due(text4) {
14751
+ function due(dueText, atText, now = /* @__PURE__ */ new Date()) {
14752
+ const text4 = (dueText ?? "").trim();
14753
+ if (/^\d{4}-\d{2}-\d{2}T/.test(text4)) {
14754
+ if (atText !== void 0) throw usageError("--at puts a time on a day: give --due a day, not a time.", { field: "at", next: DUE_NEXT });
14755
+ if (Number.isNaN(Date.parse(text4))) throw badDue(text4);
14756
+ return { dueAt: text4 };
14757
+ }
14758
+ if (dueText === void 0 && atText === void 0) return {};
14759
+ const day = dueText === void 0 ? startOfDay(now) : dayOf(text4.toLowerCase(), now);
14760
+ if (atText === void 0) return { dueDate: ymd(day) };
14761
+ const at = /^([01]?\d|2[0-3]):([0-5]\d)$/.exec(atText.trim());
14762
+ if (!at) throw usageError(`--at must be a time of day as HH:MM (got "${atText}").`, { field: "at", next: DUE_NEXT });
14763
+ return { dueAt: new Date(day.getFullYear(), day.getMonth(), day.getDate(), Number(at[1]), Number(at[2])).toISOString() };
14764
+ }
14765
+ function dayOf(text4, now) {
14766
+ const today = startOfDay(now);
14767
+ if (text4 === "today") return today;
14768
+ if (text4 === "tomorrow") return addDays(today, 1);
14769
+ const weekday = WEEKDAYS.findIndex((name) => name === text4 || name.slice(0, 3) === text4);
14770
+ if (weekday >= 0) return addDays(today, (weekday - today.getDay() + 6) % 7 + 1);
14771
+ const parts2 = /^(\d{4})-(\d{2})-(\d{2})$/.exec(text4);
14772
+ if (parts2) {
14773
+ const day = new Date(Number(parts2[1]), Number(parts2[2]) - 1, Number(parts2[3]));
14774
+ if (ymd(day) === text4) return day;
14775
+ }
14776
+ throw badDue(text4);
14777
+ }
14778
+ function badDue(text4) {
14779
+ return usageError(`--due must be today, tomorrow, a weekday, a day (2026-11-20) or an ISO 8601 time (got "${text4}").`, {
14780
+ field: "due",
14781
+ next: DUE_NEXT
14782
+ });
14783
+ }
14784
+ async function memberId(ctx, text4, field, next) {
14752
14785
  const value = text4.trim();
14753
- if (/^\d{4}-\d{2}-\d{2}$/.test(value)) return { dueDate: value };
14754
- if (/^\d{4}-\d{2}-\d{2}T/.test(value) && !Number.isNaN(Date.parse(value))) return { dueAt: value };
14755
- throw usageError(`--due must be a day (2026-11-20) or an ISO 8601 time (2026-11-20T15:00:00Z) (got "${value}").`, { field: "due" });
14786
+ if (value.toLowerCase() === "me") {
14787
+ let me = unwrap((await ctx.client.request({ method: "GET", path: "/v1/me", signal: ctx.signal })).body);
14788
+ if (me && typeof me.id !== "number" && typeof me.data?.id === "number") me = me.data;
14789
+ if (typeof me?.id === "number") return me.id;
14790
+ throw usageError("This key belongs to no member: name a member id or email.", { field, next });
14791
+ }
14792
+ if (value.includes("@")) {
14793
+ const email = value.toLowerCase();
14794
+ for await (const member of ctx.client.paginate({ method: "GET", path: "/v1/members", signal: ctx.signal }, { pageSize: 200 })) {
14795
+ if (typeof member.email === "string" && member.email.toLowerCase() === email && typeof member.id === "number") return member.id;
14796
+ }
14797
+ throw new KensoError({
14798
+ code: "not_found",
14799
+ message: `No member of this workspace has the email ${value}.`,
14800
+ exitCode: ExitCode.NotFound,
14801
+ field,
14802
+ next: "kenso members list"
14803
+ });
14804
+ }
14805
+ return positiveId3(value, field, next);
14756
14806
  }
14807
+ var WEEKDAYS, DUE_NEXT, startOfDay, addDays, ymd;
14757
14808
  var init_shared2 = __esm({
14758
14809
  "src/commands/tasks/shared.ts"() {
14759
14810
  "use strict";
14760
14811
  init_errors();
14812
+ init_exit_codes();
14813
+ init_http();
14814
+ WEEKDAYS = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
14815
+ DUE_NEXT = 'kenso tasks add "Send the deck" --due tomorrow --at 15:00';
14816
+ startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate());
14817
+ addDays = (d, days) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + days);
14818
+ ymd = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
14761
14819
  }
14762
14820
  });
14763
14821
 
@@ -14774,24 +14832,25 @@ var init_add = __esm({
14774
14832
  init_exit_codes();
14775
14833
  init_http();
14776
14834
  init_shared2();
14777
- NEXT = 'kenso tasks add "Send the deck" --due 2026-11-20 --account 812';
14835
+ NEXT = 'kenso tasks add "Send the deck" --due tomorrow --account 812';
14778
14836
  command44 = {
14779
14837
  resource: "tasks",
14780
14838
  action: "add",
14781
- summary: "Add a task: a title, an optional due day or time, assignee and the account, person or deal it is about",
14782
- description: "Sends POST /v1/tasks and prints the task. The words after add are the title (1-500 characters). --due takes a day (2026-11-20) or a time (2026-11-20T15:00:00Z; its day is read in the assignee's app time zone). Without --assignee the task is yours. Link at most one of --account, --person, --deal: a person's task also shows on their first account, a deal's on its account and primary person. Linking an account on a plan without Accounts is plan_required.",
14839
+ summary: "Add a task: a title, an optional due day and time, assignee and the account, person or deal it is about",
14840
+ description: "Sends POST /v1/tasks and prints the task. The words after add are the title (1-500 characters). --due takes today, tomorrow, a weekday (the next one: friday or fri), a day (2026-11-20) or an ISO 8601 time; --at HH:MM puts a time on that day (today without --due). Day words and --at read this computer's clock and time zone (TZ); a time's day is read in the assignee's app time zone. --assignee takes me, a member id or an email; without it the task is yours. Link at most one of --account, --person, --deal: a person's task also shows on their first account, a deal's on its account and primary person. Linking an account on a plan without Accounts is plan_required.",
14783
14841
  flags: {
14784
- due: { type: "string", description: "Due day (YYYY-MM-DD) or time (ISO 8601)" },
14785
- assignee: { type: "string", description: "The member it is for (a member id); default you" },
14842
+ due: { type: "string", description: "Due day: today, tomorrow, a weekday, YYYY-MM-DD, or an ISO 8601 time" },
14843
+ at: { type: "string", description: "Due time on that day, HH:MM (today without --due)" },
14844
+ assignee: { type: "string", description: "The member it is for: me, a member id or an email; default you" },
14786
14845
  notes: { type: "string", description: "Notes (markdown)" },
14787
14846
  account: { type: "string", description: "Account id it is about" },
14788
14847
  person: { type: "string", description: "Person id it is about" },
14789
14848
  deal: { type: "string", description: "Deal (opportunity) id it is about" }
14790
14849
  },
14791
14850
  positionals: [{ name: "title", required: true, variadic: true, description: "The task, such as Send the deck to Maya" }],
14792
- examples: [NEXT, 'kenso tasks add "Call Ada back" --due 2026-11-18T16:00:00Z --person 501 --assignee 42'],
14851
+ examples: [NEXT, 'kenso tasks add "Call Ada back" --due friday --at 16:00 --person 501 --assignee ada@acme.com'],
14793
14852
  beta: { featureGates: { all: ["tasks"] } },
14794
- operationIds: ["tasks.create"],
14853
+ operationIds: ["tasks.create", "me.get", "members.list"],
14795
14854
  async run(ctx, { flags, positionals }) {
14796
14855
  const title = positionals.join(" ").trim();
14797
14856
  if (title === "") throw usageError("Give the task a title.", { field: "title", next: NEXT });
@@ -14799,8 +14858,8 @@ var init_add = __esm({
14799
14858
  if (links.length > 1) throw usageError("Link the task to one record: --account, --person or --deal.", { field: links[1], next: NEXT });
14800
14859
  const body2 = { title };
14801
14860
  if (typeof flags.notes === "string") body2.notes = flags.notes;
14802
- if (typeof flags.assignee === "string") body2.assigneeMemberId = positiveId3(flags.assignee, "assignee", NEXT);
14803
- if (typeof flags.due === "string") Object.assign(body2, due(flags.due));
14861
+ Object.assign(body2, due(typeof flags.due === "string" ? flags.due : void 0, typeof flags.at === "string" ? flags.at : void 0));
14862
+ if (typeof flags.assignee === "string") body2.assigneeMemberId = await memberId(ctx, flags.assignee, "assignee", NEXT);
14804
14863
  if (typeof flags.account === "string") body2.accountId = positiveId3(flags.account, "account", NEXT);
14805
14864
  if (typeof flags.person === "string") body2.personId = positiveId3(flags.person, "person", NEXT);
14806
14865
  if (typeof flags.deal === "string") body2.opportunityId = positiveId3(flags.deal, "deal", NEXT);
@@ -14839,16 +14898,23 @@ var init_done = __esm({
14839
14898
  command45 = {
14840
14899
  resource: "tasks",
14841
14900
  action: "done",
14842
- summary: "Complete a task (--undo reopens it)",
14843
- description: "Sends PATCH /v1/tasks/{taskId} with status done and prints the task: completedAt and completedByMemberId set, and task.completed written on the record's timeline. --undo sends status open, which reopens it.",
14901
+ summary: "Complete one or more tasks (--undo reopens them)",
14902
+ description: "Sends PATCH /v1/tasks/{taskId} with status done for each id, in order, and prints the task (one line per task for several): completedAt and completedByMemberId set, and task.completed written on the record's timeline. --undo sends status open, which reopens it. An error stops at that id; the ones before it are done.",
14844
14903
  flags: { undo: { type: "boolean", description: "Reopen the task instead" } },
14845
- positionals: [{ name: "taskId", required: true, description: "The task id" }],
14846
- examples: ["kenso tasks done 7", "kenso tasks done 7 --undo"],
14904
+ positionals: [{ name: "taskId", required: true, variadic: true, description: "One or more task ids" }],
14905
+ examples: ["kenso tasks done 7", "kenso tasks done 7 8 9", "kenso tasks done 7 --undo"],
14847
14906
  beta: { featureGates: { all: ["tasks"] } },
14848
14907
  operationIds: ["tasks.update"],
14849
14908
  async run(ctx, { flags, positionals }) {
14850
- const taskId = positiveId3(positionals[0], "taskId", "kenso tasks done <taskId>");
14851
- ctx.output.object(await patchTask(ctx, taskId, { status: flags.undo === true ? "open" : "done" }));
14909
+ const ids2 = [...new Set(positionals.map((text4) => positiveId3(text4, "taskId", "kenso tasks done <taskId>...")))];
14910
+ const change = { status: flags.undo === true ? "open" : "done" };
14911
+ if (ids2.length === 1) ctx.output.object(await patchTask(ctx, ids2[0], change));
14912
+ else
14913
+ await ctx.output.list(
14914
+ (async function* () {
14915
+ for (const id of ids2) yield await patchTask(ctx, id, change);
14916
+ })()
14917
+ );
14852
14918
  return ExitCode.Ok;
14853
14919
  }
14854
14920
  };
@@ -14868,24 +14934,24 @@ var init_assign = __esm({
14868
14934
  init_exit_codes();
14869
14935
  init_done();
14870
14936
  init_shared2();
14871
- NEXT2 = "kenso tasks assign <taskId> <memberId>";
14937
+ NEXT2 = "kenso tasks assign <taskId> <me|memberId|email>";
14872
14938
  command46 = {
14873
14939
  resource: "tasks",
14874
14940
  action: "assign",
14875
14941
  summary: "Give a task to a member",
14876
- description: "Sends PATCH /v1/tasks/{taskId} with assigneeMemberId and prints the task. The member gets a task_assigned notification unless they assigned it themselves. A member id outside the workspace is invalid_member.",
14942
+ description: "Sends PATCH /v1/tasks/{taskId} with assigneeMemberId and prints the task. The member is me, a member id or a member's email. They get a task_assigned notification unless they assigned it themselves. A member id outside the workspace is invalid_member.",
14877
14943
  flags: {},
14878
14944
  positionals: [
14879
14945
  { name: "taskId", required: true, description: "The task id" },
14880
- { name: "memberId", required: true, description: "The member it is for" }
14946
+ { name: "member", required: true, description: "The member it is for: me, a member id or an email" }
14881
14947
  ],
14882
- examples: ["kenso tasks assign 7 42"],
14948
+ examples: ["kenso tasks assign 7 42", "kenso tasks assign 7 me", "kenso tasks assign 7 ada@acme.com"],
14883
14949
  beta: { featureGates: { all: ["tasks"] } },
14884
- operationIds: ["tasks.update"],
14950
+ operationIds: ["tasks.update", "me.get", "members.list"],
14885
14951
  async run(ctx, { positionals }) {
14886
14952
  const taskId = positiveId3(positionals[0], "taskId", NEXT2);
14887
- const memberId = positiveId3(positionals[1], "memberId", NEXT2);
14888
- ctx.output.object(await patchTask(ctx, taskId, { assigneeMemberId: memberId }));
14953
+ const assignee = await memberId(ctx, positionals[1] ?? "", "member", NEXT2);
14954
+ ctx.output.object(await patchTask(ctx, taskId, { assigneeMemberId: assignee }));
14889
14955
  return ExitCode.Ok;
14890
14956
  }
14891
14957
  };
@@ -14893,6 +14959,43 @@ var init_assign = __esm({
14893
14959
  }
14894
14960
  });
14895
14961
 
14962
+ // src/commands/tasks/queue.ts
14963
+ var queue_exports = {};
14964
+ __export(queue_exports, {
14965
+ default: () => queue_default
14966
+ });
14967
+ var SCOPES, command47, queue_default;
14968
+ var init_queue = __esm({
14969
+ "src/commands/tasks/queue.ts"() {
14970
+ "use strict";
14971
+ init_errors();
14972
+ init_exit_codes();
14973
+ SCOPES = ["mine", "assigned_by_me", "everyone"];
14974
+ command47 = {
14975
+ resource: "tasks",
14976
+ action: "queue",
14977
+ summary: "Your open work by due day: tasks, touches, call tasks, reply reminders and Ken follow-ups",
14978
+ description: "Reads every page of GET /v1/task-queue, the rows of the app's Tasks screen and of kenso task-queue list, by due day, due time, then id. Each row has kind (task, touch, call_task, reply_reminder or ken_follow_up), id, title, dueDate, dueAt, dueBucket, overdue, record and href, the app path where it is worked (a task opens in its panel). --scope mine (default), assigned_by_me (tasks only) or everyone.",
14979
+ flags: {
14980
+ scope: { type: "string", description: "mine (default), assigned_by_me or everyone" },
14981
+ timezone: { type: "string", description: "IANA time zone for the due days when you have no app time zone" }
14982
+ },
14983
+ examples: ["kenso tasks queue", "kenso tasks queue --scope everyone -o table"],
14984
+ beta: { featureGates: { all: ["tasks"] } },
14985
+ operationIds: ["task-queue.list"],
14986
+ async run(ctx, { flags }) {
14987
+ const scope = typeof flags.scope === "string" ? flags.scope.trim() : void 0;
14988
+ if (scope !== void 0 && !SCOPES.includes(scope))
14989
+ throw usageError(`--scope must be mine, assigned_by_me or everyone (got "${scope}").`, { field: "scope", next: "kenso tasks queue --scope mine" });
14990
+ const query = { scope, timezone: typeof flags.timezone === "string" ? flags.timezone : void 0 };
14991
+ await ctx.output.list(ctx.client.paginate({ method: "GET", path: "/v1/task-queue", query, signal: ctx.signal }, { pageSize: 200 }));
14992
+ return ExitCode.Ok;
14993
+ }
14994
+ };
14995
+ queue_default = command47;
14996
+ }
14997
+ });
14998
+
14896
14999
  // src/commands/tasks/index.ts
14897
15000
  var actions25;
14898
15001
  var init_tasks = __esm({
@@ -14901,7 +15004,8 @@ var init_tasks = __esm({
14901
15004
  actions25 = {
14902
15005
  add: () => Promise.resolve().then(() => (init_add(), add_exports)).then((m) => m.default),
14903
15006
  done: () => Promise.resolve().then(() => (init_done(), done_exports)).then((m) => m.default),
14904
- assign: () => Promise.resolve().then(() => (init_assign(), assign_exports)).then((m) => m.default)
15007
+ assign: () => Promise.resolve().then(() => (init_assign(), assign_exports)).then((m) => m.default),
15008
+ queue: () => Promise.resolve().then(() => (init_queue(), queue_exports)).then((m) => m.default)
14905
15009
  };
14906
15010
  }
14907
15011
  });
@@ -15038,7 +15142,7 @@ function readBody(req) {
15038
15142
  function reply(res, status, body2) {
15039
15143
  res.writeHead(status, { "content-type": "application/json" }).end(JSON.stringify(body2));
15040
15144
  }
15041
- var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command47, listen_default;
15145
+ var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command48, listen_default;
15042
15146
  var init_listen = __esm({
15043
15147
  "src/commands/webhooks/listen.ts"() {
15044
15148
  "use strict";
@@ -15049,7 +15153,7 @@ var init_listen = __esm({
15049
15153
  MIN_POLL_MS = 1e3;
15050
15154
  MAX_POLL_MS = 6e4;
15051
15155
  MAX_TRIGGER_BYTES = 1e6;
15052
- command47 = {
15156
+ command48 = {
15053
15157
  resource: "webhooks",
15054
15158
  action: "listen",
15055
15159
  summary: "Stream the workspace's events and forward them, signed, to a local handler",
@@ -15155,7 +15259,7 @@ var init_listen = __esm({
15155
15259
  return ExitCode.Ok;
15156
15260
  }
15157
15261
  };
15158
- listen_default = command47;
15262
+ listen_default = command48;
15159
15263
  }
15160
15264
  });
15161
15265
 
@@ -15174,7 +15278,7 @@ function notRunning() {
15174
15278
  next: LISTEN_NEXT
15175
15279
  });
15176
15280
  }
15177
- var LISTEN_NEXT, command48, trigger_default;
15281
+ var LISTEN_NEXT, command49, trigger_default;
15178
15282
  var init_trigger = __esm({
15179
15283
  "src/commands/webhooks/trigger.ts"() {
15180
15284
  "use strict";
@@ -15183,7 +15287,7 @@ var init_trigger = __esm({
15183
15287
  init_http();
15184
15288
  init_local();
15185
15289
  LISTEN_NEXT = "kenso webhooks listen --forward-to http://localhost:3000/hook";
15186
- command48 = {
15290
+ command49 = {
15187
15291
  resource: "webhooks",
15188
15292
  action: "trigger",
15189
15293
  summary: "Send a sample event of one type through the running kenso webhooks listen",
@@ -15240,7 +15344,7 @@ var init_trigger = __esm({
15240
15344
  return ExitCode.Ok;
15241
15345
  }
15242
15346
  };
15243
- trigger_default = command48;
15347
+ trigger_default = command49;
15244
15348
  }
15245
15349
  });
15246
15350
 
@@ -15444,14 +15548,14 @@ var status_exports3 = {};
15444
15548
  __export(status_exports3, {
15445
15549
  default: () => status_default3
15446
15550
  });
15447
- var command49, status_default3;
15551
+ var command50, status_default3;
15448
15552
  var init_status3 = __esm({
15449
15553
  "src/commands/work/status.ts"() {
15450
15554
  "use strict";
15451
15555
  init_exit_codes();
15452
15556
  init_http();
15453
15557
  init_common3();
15454
- command49 = {
15558
+ command50 = {
15455
15559
  resource: "work",
15456
15560
  action: "status",
15457
15561
  summary: "Show the Kenso AI work waiting for your own agent, per kind",
@@ -15485,7 +15589,7 @@ var init_status3 = __esm({
15485
15589
  return ExitCode.Ok;
15486
15590
  }
15487
15591
  };
15488
- status_default3 = command49;
15592
+ status_default3 = command50;
15489
15593
  }
15490
15594
  });
15491
15595
 
@@ -15617,9 +15721,9 @@ var init_files = __esm({
15617
15721
  import { execFile, spawnSync as spawnSync2 } from "node:child_process";
15618
15722
  import { readFileSync as readFileSync12 } from "node:fs";
15619
15723
  import { isAbsolute as isAbsolute2 } from "node:path";
15620
- function sudoArgs(user, command56, args, keep = [], set = {}) {
15724
+ function sudoArgs(user, command57, args, keep = [], set = {}) {
15621
15725
  const assignments = Object.entries(set).map(([name, value]) => `${name}=${value}`);
15622
- return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command56, ...args];
15726
+ return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command57, ...args];
15623
15727
  }
15624
15728
  function agentKensoEnv(opts) {
15625
15729
  return {
@@ -15629,12 +15733,12 @@ function agentKensoEnv(opts) {
15629
15733
  AI_AGENT: opts.agentName
15630
15734
  };
15631
15735
  }
15632
- function sudoExec(user, command56, args, opts = {}) {
15736
+ function sudoExec(user, command57, args, opts = {}) {
15633
15737
  const [sudo = "/usr/bin/sudo", ...lead] = user.sudo;
15634
15738
  return new Promise((resolve16) => {
15635
15739
  execFile(
15636
15740
  sudo,
15637
- [...lead, ...sudoArgs(user.name, command56, args)],
15741
+ [...lead, ...sudoArgs(user.name, command57, args)],
15638
15742
  { env: { PATH: SUDO_PATH }, cwd: "/", timeout: opts.timeoutMs ?? PROBE_TIMEOUT_MS, maxBuffer: opts.maxBuffer ?? 1024 * 1024, encoding: "utf8", windowsHide: true, shell: false },
15639
15743
  (err, stdout, stderr) => {
15640
15744
  const code = err ? err.code : 0;
@@ -15744,9 +15848,9 @@ var init_folder2 = __esm({
15744
15848
  init_redact();
15745
15849
  init_agent_user();
15746
15850
  WorkRunFolder = class {
15747
- constructor(ctx, command56, args, outDir, shared = false) {
15851
+ constructor(ctx, command57, args, outDir, shared = false) {
15748
15852
  this.ctx = ctx;
15749
- this.command = command56;
15853
+ this.command = command57;
15750
15854
  this.args = args;
15751
15855
  this.outDir = outDir;
15752
15856
  this.shared = shared;
@@ -15861,7 +15965,7 @@ var pull_exports2 = {};
15861
15965
  __export(pull_exports2, {
15862
15966
  default: () => pull_default2
15863
15967
  });
15864
- var MAX_FILES, command50, pull_default2;
15968
+ var MAX_FILES, command51, pull_default2;
15865
15969
  var init_pull2 = __esm({
15866
15970
  "src/commands/work/pull.ts"() {
15867
15971
  "use strict";
@@ -15870,7 +15974,7 @@ var init_pull2 = __esm({
15870
15974
  init_common3();
15871
15975
  init_folder2();
15872
15976
  MAX_FILES = 100;
15873
- command50 = {
15977
+ command51 = {
15874
15978
  resource: "work",
15875
15979
  action: "pull",
15876
15980
  summary: "Claim waiting work into local work files, to answer by hand",
@@ -15948,7 +16052,7 @@ var init_pull2 = __esm({
15948
16052
  return interrupted7 ? ExitCode.Interrupted : ExitCode.Ok;
15949
16053
  }
15950
16054
  };
15951
- pull_default2 = command50;
16055
+ pull_default2 = command51;
15952
16056
  }
15953
16057
  });
15954
16058
 
@@ -16090,7 +16194,7 @@ __export(submit_exports, {
16090
16194
  default: () => submit_default
16091
16195
  });
16092
16196
  import { resolve as resolve14 } from "node:path";
16093
- var command51, submit_default;
16197
+ var command52, submit_default;
16094
16198
  var init_submit = __esm({
16095
16199
  "src/commands/work/submit.ts"() {
16096
16200
  "use strict";
@@ -16099,7 +16203,7 @@ var init_submit = __esm({
16099
16203
  init_files();
16100
16204
  init_answers();
16101
16205
  init_common3();
16102
- command51 = {
16206
+ command52 = {
16103
16207
  resource: "work",
16104
16208
  action: "submit",
16105
16209
  summary: "Send answers files to Kenso and write each one's results",
@@ -16131,7 +16235,7 @@ var init_submit = __esm({
16131
16235
  return totals.rejected > 0 ? ExitCode.Partial : ExitCode.Ok;
16132
16236
  }
16133
16237
  };
16134
- submit_default = command51;
16238
+ submit_default = command52;
16135
16239
  }
16136
16240
  });
16137
16241
 
@@ -16152,7 +16256,7 @@ function claimIdOf(arg) {
16152
16256
  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..." });
16153
16257
  return arg;
16154
16258
  }
16155
- var CLAIM_ID, command52, release_default;
16259
+ var CLAIM_ID, command53, release_default;
16156
16260
  var init_release = __esm({
16157
16261
  "src/commands/work/release.ts"() {
16158
16262
  "use strict";
@@ -16161,7 +16265,7 @@ var init_release = __esm({
16161
16265
  init_files();
16162
16266
  init_common3();
16163
16267
  CLAIM_ID = /^[A-Za-z0-9_-]{1,64}$/;
16164
- command52 = {
16268
+ command53 = {
16165
16269
  resource: "work",
16166
16270
  action: "release",
16167
16271
  summary: "Give claimed work back to the queue now",
@@ -16180,7 +16284,7 @@ var init_release = __esm({
16180
16284
  return ExitCode.Ok;
16181
16285
  }
16182
16286
  };
16183
- release_default = command52;
16287
+ release_default = command53;
16184
16288
  }
16185
16289
  });
16186
16290
 
@@ -16519,12 +16623,12 @@ function plain(text4) {
16519
16623
  return text4.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "");
16520
16624
  }
16521
16625
  function runStatus(bin, args, env, adapter, runAs) {
16522
- const command56 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
16626
+ const command57 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
16523
16627
  const commandArgs2 = runAs ? [...runAs.sudo.slice(1), ...sudoArgs(runAs.name, bin, args)] : args;
16524
16628
  const options = runAs ? { env: { PATH: SUDO_PATH }, cwd: "/" } : { env: childEnv(env, adapter) };
16525
16629
  return new Promise((resolve16) => {
16526
16630
  execFile2(
16527
- command56,
16631
+ command57,
16528
16632
  commandArgs2,
16529
16633
  { ...options, timeout: STATUS_TIMEOUT_MS, maxBuffer: 1024 * 1024, windowsHide: true, shell: false },
16530
16634
  (err, stdout, stderr) => {
@@ -17606,7 +17710,7 @@ var run_exports3 = {};
17606
17710
  __export(run_exports3, {
17607
17711
  default: () => run_default2
17608
17712
  });
17609
- var FAILURES_IN_A_ROW, command53, run_default2;
17713
+ var FAILURES_IN_A_ROW, command54, run_default2;
17610
17714
  var init_run3 = __esm({
17611
17715
  "src/commands/work/run.ts"() {
17612
17716
  "use strict";
@@ -17627,7 +17731,7 @@ var init_run3 = __esm({
17627
17731
  init_folder2();
17628
17732
  init_stop();
17629
17733
  FAILURES_IN_A_ROW = 3;
17630
- command53 = {
17734
+ command54 = {
17631
17735
  resource: "work",
17632
17736
  action: "run",
17633
17737
  summary: "Run your own coding agent on the waiting work until the queue is empty",
@@ -17952,7 +18056,7 @@ var init_run3 = __esm({
17952
18056
  return exitCodeFor(reason, totals.rejected > 0 || jobsFailed > 0);
17953
18057
  }
17954
18058
  };
17955
- run_default2 = command53;
18059
+ run_default2 = command54;
17956
18060
  }
17957
18061
  });
17958
18062
 
@@ -17985,14 +18089,14 @@ function parseLimit(value) {
17985
18089
  }
17986
18090
  return limit;
17987
18091
  }
17988
- var MAX_LIMIT, command54, list_default3;
18092
+ var MAX_LIMIT, command55, list_default3;
17989
18093
  var init_list3 = __esm({
17990
18094
  "src/commands/workspace/list.ts"() {
17991
18095
  "use strict";
17992
18096
  init_errors();
17993
18097
  init_exit_codes();
17994
18098
  MAX_LIMIT = 200;
17995
- command54 = {
18099
+ command55 = {
17996
18100
  resource: "workspace",
17997
18101
  action: "list",
17998
18102
  summary: "List the workspaces your key can use",
@@ -18020,7 +18124,7 @@ var init_list3 = __esm({
18020
18124
  return ExitCode.Ok;
18021
18125
  }
18022
18126
  };
18023
- list_default3 = command54;
18127
+ list_default3 = command55;
18024
18128
  }
18025
18129
  });
18026
18130
 
@@ -18029,7 +18133,7 @@ var use_exports = {};
18029
18133
  __export(use_exports, {
18030
18134
  default: () => use_default
18031
18135
  });
18032
- var command55, use_default;
18136
+ var command56, use_default;
18033
18137
  var init_use = __esm({
18034
18138
  "src/commands/workspace/use.ts"() {
18035
18139
  "use strict";
@@ -18037,7 +18141,7 @@ var init_use = __esm({
18037
18141
  init_errors();
18038
18142
  init_exit_codes();
18039
18143
  init_http();
18040
- command55 = {
18144
+ command56 = {
18041
18145
  resource: "workspace",
18042
18146
  action: "use",
18043
18147
  summary: "Set the profile's default workspace",
@@ -18094,7 +18198,7 @@ var init_use = __esm({
18094
18198
  return ExitCode.Ok;
18095
18199
  }
18096
18200
  };
18097
- use_default = command55;
18201
+ use_default = command56;
18098
18202
  }
18099
18203
  });
18100
18204
 
@@ -18663,8 +18767,8 @@ function startUpdateNotice(argv, opts = {}) {
18663
18767
  if (!found) return;
18664
18768
  writeCheck(file, { checkedAt: new Date(now).toISOString(), latest: found });
18665
18769
  if (isNewer(found, version)) {
18666
- const command56 = updateCommand(install, opts.platform ?? process.platform);
18667
- stderr.write(`kenso ${found} is out (you have ${version}): ${command56}
18770
+ const command57 = updateCommand(install, opts.platform ?? process.platform);
18771
+ stderr.write(`kenso ${found} is out (you have ${version}): ${command57}
18668
18772
  Turn this off with KENSO_NO_UPDATE_NOTIFIER=1.
18669
18773
  `);
18670
18774
  }