kenso 0.1.124 → 0.1.127
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 +221 -139
- package/dist/operations.index.json +1 -1
- package/dist/operations.json +1 -1
- package/docs/batch.md +7 -0
- package/docs/crm.md +7 -1
- package/docs/reference.md +8 -6
- package/package.json +2 -2
package/dist/kenso.js
CHANGED
|
@@ -2481,7 +2481,7 @@ var VERSION;
|
|
|
2481
2481
|
var init_version = __esm({
|
|
2482
2482
|
"src/core/version.ts"() {
|
|
2483
2483
|
"use strict";
|
|
2484
|
-
VERSION = true ? "0.1.
|
|
2484
|
+
VERSION = true ? "0.1.127" : "0.0.0-dev";
|
|
2485
2485
|
}
|
|
2486
2486
|
});
|
|
2487
2487
|
|
|
@@ -4310,9 +4310,9 @@ async function readRun(dir2) {
|
|
|
4310
4310
|
return null;
|
|
4311
4311
|
}
|
|
4312
4312
|
if (!raw) return null;
|
|
4313
|
-
const { runId, command:
|
|
4313
|
+
const { runId, command: command70, createdAt, status } = raw;
|
|
4314
4314
|
if (typeof runId !== "string" || !RUN_ID_PATTERN.test(runId)) return null;
|
|
4315
|
-
if (typeof
|
|
4315
|
+
if (typeof command70 !== "string" || typeof createdAt !== "string") return null;
|
|
4316
4316
|
if (typeof status !== "string" || !STATUSES.includes(status)) return null;
|
|
4317
4317
|
let chunksDone = chunkList(raw.chunksDone) ?? [];
|
|
4318
4318
|
try {
|
|
@@ -4323,7 +4323,7 @@ async function readRun(dir2) {
|
|
|
4323
4323
|
const record3 = {
|
|
4324
4324
|
...raw,
|
|
4325
4325
|
runId,
|
|
4326
|
-
command:
|
|
4326
|
+
command: command70,
|
|
4327
4327
|
args: asRecord3(raw.args) ?? {},
|
|
4328
4328
|
createdAt,
|
|
4329
4329
|
status,
|
|
@@ -4383,11 +4383,11 @@ async function loadRun(runId, env = process.env) {
|
|
|
4383
4383
|
}
|
|
4384
4384
|
return run;
|
|
4385
4385
|
}
|
|
4386
|
-
async function findIdentical(
|
|
4386
|
+
async function findIdentical(command70, args, inputSha256, env, workspaceId, anyWorkspace = false) {
|
|
4387
4387
|
const identity = argsIdentity(args);
|
|
4388
4388
|
const runs = await listRuns(env);
|
|
4389
4389
|
return runs.filter(
|
|
4390
|
-
(run) => run.command ===
|
|
4390
|
+
(run) => run.command === command70 && (run.inputSha256 || void 0) === (inputSha256 || void 0) && (anyWorkspace || (run.workspaceId || void 0) === (workspaceId || void 0)) && argsIdentity(run.args) === identity
|
|
4391
4391
|
);
|
|
4392
4392
|
}
|
|
4393
4393
|
function isOtherLiveProcess(pid) {
|
|
@@ -7654,8 +7654,8 @@ function idValue(value, field) {
|
|
|
7654
7654
|
function shellQuote3(arg) {
|
|
7655
7655
|
return /^[A-Za-z0-9_./:=@%+,-]+$/.test(arg) ? arg : `'${arg.replace(/'/g, `'\\''`)}'`;
|
|
7656
7656
|
}
|
|
7657
|
-
function commandLine2(ctx,
|
|
7658
|
-
const parts2 = ["kenso", ...
|
|
7657
|
+
function commandLine2(ctx, command70, args, extra = []) {
|
|
7658
|
+
const parts2 = ["kenso", ...command70.split(" "), ...(args.positionals ?? []).map(shellQuote3)];
|
|
7659
7659
|
for (const [name, value] of Object.entries(args.flags)) {
|
|
7660
7660
|
if (value === void 0 || value === false) continue;
|
|
7661
7661
|
if (value === true) parts2.push(`--${name}`);
|
|
@@ -7951,9 +7951,9 @@ function stringFlag2(flags, name) {
|
|
|
7951
7951
|
const text4 = value.trim();
|
|
7952
7952
|
return text4 === "" ? void 0 : text4;
|
|
7953
7953
|
}
|
|
7954
|
-
function requireFlag(flags, name,
|
|
7954
|
+
function requireFlag(flags, name, command70, hint) {
|
|
7955
7955
|
const value = stringFlag2(flags, name);
|
|
7956
|
-
if (value === void 0) throw usageError(`--${name} is required for ${
|
|
7956
|
+
if (value === void 0) throw usageError(`--${name} is required for ${command70}.`, { field: name, next: `${command70} --help`, ...hint ? { hint } : {} });
|
|
7957
7957
|
return value;
|
|
7958
7958
|
}
|
|
7959
7959
|
function positiveId(value) {
|
|
@@ -7962,8 +7962,8 @@ function positiveId(value) {
|
|
|
7962
7962
|
const id = Number(text4);
|
|
7963
7963
|
return Number.isSafeInteger(id) && id > 0 ? id : void 0;
|
|
7964
7964
|
}
|
|
7965
|
-
function idFlag(flags, name,
|
|
7966
|
-
const raw = requireFlag(flags, name,
|
|
7965
|
+
function idFlag(flags, name, command70) {
|
|
7966
|
+
const raw = requireFlag(flags, name, command70);
|
|
7967
7967
|
const id = positiveId(raw);
|
|
7968
7968
|
if (id === void 0) throw usageError(`--${name} must be a positive whole number (got "${raw}").`, { field: name });
|
|
7969
7969
|
return id;
|
|
@@ -7983,8 +7983,8 @@ function isDryRun(ctx) {
|
|
|
7983
7983
|
function shellQuote4(value) {
|
|
7984
7984
|
return /^[A-Za-z0-9_\-.,:/@=+%]+$/.test(value) ? value : `'${value.replace(/'/g, `'\\''`)}'`;
|
|
7985
7985
|
}
|
|
7986
|
-
function sameCommand2(
|
|
7987
|
-
const parts2 = [
|
|
7986
|
+
function sameCommand2(command70, flags, ctx, extra = []) {
|
|
7987
|
+
const parts2 = [command70];
|
|
7988
7988
|
for (const [name, value] of Object.entries(flags)) {
|
|
7989
7989
|
if (value === void 0 || value === false) continue;
|
|
7990
7990
|
if (value === true) parts2.push(`--${name}`);
|
|
@@ -8215,12 +8215,12 @@ function filterBody(flags) {
|
|
|
8215
8215
|
}
|
|
8216
8216
|
return parsed2;
|
|
8217
8217
|
}
|
|
8218
|
-
function targetBody(flags, target2,
|
|
8218
|
+
function targetBody(flags, target2, command70) {
|
|
8219
8219
|
const ids2 = idList(flags, "ids");
|
|
8220
8220
|
const filter = filterBody(flags);
|
|
8221
8221
|
const everything = flags.all === true;
|
|
8222
8222
|
if (ids2 !== void 0 === (filter !== void 0 || everything)) {
|
|
8223
|
-
throw usageError(`Name the ${target2.plural} one way: --ids, --filter, or --all for every ${target2.noun} in the workspace.`, { field: "ids", next: `${
|
|
8223
|
+
throw usageError(`Name the ${target2.plural} one way: --ids, --filter, or --all for every ${target2.noun} in the workspace.`, { field: "ids", next: `${command70} --help` });
|
|
8224
8224
|
}
|
|
8225
8225
|
const exclude = idList(flags, "exclude-ids");
|
|
8226
8226
|
if (exclude !== void 0 && ids2 !== void 0) throw usageError("--exclude-ids goes with --filter or --all.", { field: "exclude-ids" });
|
|
@@ -8241,14 +8241,14 @@ function tagSet(flags) {
|
|
|
8241
8241
|
return set2;
|
|
8242
8242
|
}
|
|
8243
8243
|
function requestBody(flags, target2, dryRun2) {
|
|
8244
|
-
const
|
|
8244
|
+
const command70 = `kenso ${target2.resource} bulk-update`;
|
|
8245
8245
|
const pairs = Array.isArray(flags.set) ? flags.set : typeof flags.set === "string" ? [flags.set] : [];
|
|
8246
8246
|
const tags = target2.tags ? tagSet(flags) : {};
|
|
8247
8247
|
if (pairs.length === 0 && Object.keys(tags).length === 0) {
|
|
8248
|
-
throw usageError(`--set${target2.tags ? " or --add-tag" : ""} is required for ${
|
|
8248
|
+
throw usageError(`--set${target2.tags ? " or --add-tag" : ""} is required for ${command70}.`, { field: "set", hint: "For example --set stage=engaged.", next: `${command70} --help` });
|
|
8249
8249
|
}
|
|
8250
8250
|
return {
|
|
8251
|
-
...targetBody(flags, target2,
|
|
8251
|
+
...targetBody(flags, target2, command70),
|
|
8252
8252
|
set: { ...parseSet(pairs, target2.aliases, target2.textFields), ...tags },
|
|
8253
8253
|
...dryRun2 ? { dryRun: true } : {},
|
|
8254
8254
|
...flags["overwrite-pinned"] === true ? { overwritePinned: true } : {}
|
|
@@ -8313,7 +8313,7 @@ function bulkUpdateCommand(target2) {
|
|
|
8313
8313
|
};
|
|
8314
8314
|
}
|
|
8315
8315
|
function bulkDeleteCommand(target2) {
|
|
8316
|
-
const
|
|
8316
|
+
const command70 = `kenso ${target2.resource} bulk-delete`;
|
|
8317
8317
|
return {
|
|
8318
8318
|
resource: target2.resource,
|
|
8319
8319
|
action: "bulk-delete",
|
|
@@ -8332,7 +8332,7 @@ function bulkDeleteCommand(target2) {
|
|
|
8332
8332
|
beta: { featureGates: { all: target2.featureGates } },
|
|
8333
8333
|
operationIds: [`${target2.resource}.bulk-delete`, "changes.get"],
|
|
8334
8334
|
dryRun: true,
|
|
8335
|
-
run: (ctx, { flags }) => runChange(ctx, flags, `/v1/${target2.resource}/bulk-delete`, (dryRun2) => ({ ...targetBody(flags, target2,
|
|
8335
|
+
run: (ctx, { flags }) => runChange(ctx, flags, `/v1/${target2.resource}/bulk-delete`, (dryRun2) => ({ ...targetBody(flags, target2, command70), dryRun: dryRun2 }))
|
|
8336
8336
|
};
|
|
8337
8337
|
}
|
|
8338
8338
|
async function runChange(ctx, flags, path, body2) {
|
|
@@ -8852,7 +8852,7 @@ var init_auth = __esm({
|
|
|
8852
8852
|
var batch_default;
|
|
8853
8853
|
var init_batch = __esm({
|
|
8854
8854
|
"docs/batch.md"() {
|
|
8855
|
-
batch_default = '# Batch runs\n\nA batch command takes a file, sends its rows to Kenso in chunks, and prints one JSON summary. Every input row gets one line in a results file, every run can be resumed, and nothing is written until you pass `--yes`.\n\nThe batch commands:\n\n- `contacts import`, `update`, `remove`, `restore`, `pause`, `resume`, `tag`, `untag` ([Leads](leads.md))\n- `people import` and `accounts import` ([CRM](crm.md), beta)\n- `studio fill` ([Studio](studio.md), beta)\n- any generated command run with `--each <file>`, once per row (see below)\n\n## Plan, then apply\n\nWithout `--yes` a batch command plans and changes nothing. `--dry-run` asks for the plan explicitly. `--yes` applies. Passing both is a usage error. Two exceptions to the plan below: `studio fill` without `--yes` prints its credit estimate and `next`, with no run or `plan.json` ([Studio](studio.md)), and a non-GET `--each` without `--yes` or `--dry-run` is a usage error (exit 2) rather than a plan.\n\n```bash\nkenso contacts import --campaign 812 --file leads.csv --dry-run\nkenso contacts import --campaign 812 --file leads.csv --yes\n```\n\nThe dry run parses and checks every row, may call read-only endpoints (a campaign read, a credit estimate, a contacts search for `--where`), writes `plan.json`, and prints the plan:\n\n```json\n{"run":"r_ubqu7wtx","dryRun":true,"command":"contacts remove","rows":3,"valid":3,"invalid":0,"chunks":1,"chunkSize":1000,"source":"ids","count":3,"firstIds":[11,12,13],"next":"kenso contacts remove --ids ids.txt --yes","plan":"/home/you/.kenso/runs/r_ubqu7wtx/plan.json"}\n```\n\nEvery plan has `run`, `dryRun`, `command`, `rows`, `valid`, `invalid`, `chunks`, `chunkSize`, `next` (the exact command that applies it) and `plan` (the file), plus fields of its own command. It adds `invalidRows` when rows were refused, `chunksDone` when it continues an unfinished run, and `alreadyDone: true` when the apply would change nothing.\n\nA file the CLI cannot read stops the run before anything is planned, with `file_unreadable` (exit 2), the line at fault and a hint: `leads.csv line 3: a quote is not closed.`, `leads.csv does not exist.`, `rows.jsonl line 7 is not valid JSON.`\n\n## The summary\n\nAn applied run prints one JSON object:\n\n```json\n{"run":"r_ubqu7wtx","rows":3,"ok":2,"created":0,"updated":0,"skipped":{},"failed":0,"notFound":1,"invalid":0,"changed":2,"results":"/home/you/.kenso/runs/r_ubqu7wtx/results.csv","resultsNdjson":"/home/you/.kenso/runs/r_ubqu7wtx/results.ndjson","resumed":false,"durationMs":412,"undo":"kenso contacts restore --run r_ubqu7wtx"}\n```\n\n| Field | Meaning |\n|---|---|\n| `run` | The run id: `r_` and 8 characters |\n| `rows` | Input rows |\n| `ok`, `created`, `updated` | Rows that succeeded, by kind |\n| `skipped` | Rows Kenso left alone on purpose, counted by reason, for example `{"duplicate":12}` |\n| `failed`, `notFound`, `invalid` | Rows that did not go through: refused or errored, id not found, refused locally |\n| `changed` | Rows this invocation changed. 0 when a rerun had nothing left to do |\n| `results`, `resultsNdjson` | Absolute paths of the results files |\n| `invalidRows` | Path of `invalid.csv`, when rows were refused locally |\n| `resumed` | True when this invocation continued an earlier run |\n| `durationMs` | Wall time of this invocation |\n| `pending` | Rows without a result yet, when the run did not finish |\n| `stopped` | `{code, message, hint}` when a stop condition ended the run (for example `limit_reached`) |\n| `interrupted` | True after Ctrl-C |\n| `next` | `kenso runs resume <runId>` when the run can continue |\n\nCommands add their own fields: `contacts import` adds `campaignId` and `notSendable`, `contacts remove` adds `undo`, `people import` adds `matched`, `addedToAccounts` and `emailFindsQueued`, `accounts import` adds `researchQueued` and `researchWaitingCredits`, `studio fill` adds `templateId`, `runs` and the estimate.\n\nExit codes: 0 when every row succeeded or was skipped, 5 when some rows are `failed`, `not_found` or `invalid`, 6 when a limit stopped the run, 130 after Ctrl-C. The full table is in [Output and errors](output-and-errors.md).\n\n## The run folder\n\nEach run keeps its files in `~/.kenso/runs/<runId>/` (`KENSO_RUNS_DIR` moves the root), or in `--out <dir>` when you pass it. A run in `--out` is also linked under the runs folder, so `kenso runs` finds it. The folder is mode 0700 and its files 0600.\n\nThe CLI refuses (exit 2) a runs folder or `--out` folder that another user owns or that it cannot make 0700 (a runs folder of yours that others can write is made 0700 first; a sticky runs folder root owns, such as a Kenso sandbox\'s, passes). `kenso runs list` leaves out, and `kenso runs show` and `resume` refuse with `run_not_private`, a run whose folder or `run.json` another user owns or can write. On Windows, which has no such owners and modes, these checks are skipped.\n\n| File | What it holds |\n|---|---|\n| `run.json` | The command, its arguments, the input path and SHA-256, the workspace, the chunk plan and the status (`planned`, `running`, `done`, `failed`, `interrupted`) |\n| `state.json` | The chunks done so far, rewritten after every chunk |\n| `results.csv` | One line per input row: `row,status,id,reason,error`, then extra columns such as `email` or `sendable` |\n| `results.ndjson` | The same rows as JSON lines |\n| `invalid.csv` | Rows refused before sending, with the reason |\n| `plan.json` | The last dry run\'s plan |\n| `summary.json` | The last summary printed |\n\n`row` is the 1-based number of the data row in the input (the CSV header is not counted). `status` is one of `created`, `updated`, `ok`, `skipped`, `failed`, `not_found` or `invalid`.\n\n```bash\nkenso runs list\nkenso runs list --limit 5 -o json\nkenso runs show r_ubqu7wtx\n```\n\n## Rerun and resume\n\nA run is identified by its command, its arguments, the SHA-256 of its input file, the workspace and the chunk size. `--yes`, `--dry-run`, `--wait`, `--concurrency` and the output flags are not part of it. Running the same command again on the same file:\n\n- **continues an unfinished run** (interrupted, stopped or crashed): finished chunks are skipped and the summary says `"resumed":true`.\n- **answers from a finished run where every row succeeded:** it prints that run\'s summary with `"changed":0` and `"alreadyDone":true`, sends no writes and exits 0 (a command may still read first: `contacts import` reads the campaign, and `contacts update --match email` looks up the campaign\'s contacts).\n- **starts a new run** when the last one finished with failed or invalid rows, or when the file changed. Lead, people and account writes match existing records (an email in a campaign, a person by email or LinkedIn URL, an account by domain), so sending a row twice never creates a duplicate.\n\n`kenso runs resume <runId>` does the same from the run id: it rebuilds the command from `run.json` and runs it with `--yes` from the folder it started in. It replays only a batch command (`contacts import`, `update`, `remove`, `restore`, `pause`, `resume`, `tag` and `untag`, `people import`, `accounts import`, `studio fill`, or a command run with `--each`) and only the flags that command takes, never a `kenso work` run. It refuses when the input was stdin, or the file is gone or changed. Two processes cannot work on one run: the second gets `run_in_progress` (exit 7).\n\n```bash\nkenso runs resume r_ubqu7wtx\n```\n\n`studio fill` is the exception: a fill charges for every page it builds, so it never fills the same ids twice. See [Studio](studio.md).\n\n## Ctrl-C\n\nThe first Ctrl-C cancels the requests in flight and starts no new chunks. The CLI writes the state and prints the summary with `"interrupted":true` and `"next":"kenso runs resume <runId>"`, then exits 130. A chunk that did not finish is sent again when you resume, which is safe because the writes match existing records. A second Ctrl-C quits at once.\n\n## Chunks, concurrency and rate limits\n\n| Command | Rows per call | At once |\n|---|---|---|\n| `contacts import` | 1,000 | 1 per campaign |\n| `contacts update`, `remove`, `restore`, `pause`, `resume` | 1,000 | 4 (`--concurrency`) |\n| `contacts tag`, `untag` | 250 | 4 (`--concurrency`) |\n| `people import` | 200 | 4 (`--concurrency`) |\n| `accounts import` | 100 | 4 (`--concurrency`) |\n| `studio fill` | 500 ids per fill run | 1 |\n| `--each` | 1 | 4 (`--concurrency`) |\n\n`--concurrency` takes 1 to 16. When the API\'s `RateLimit-Remaining` header drops below 10, the CLI sends one chunk at a time until it is back above 30.\n\nRetries:\n\n- **429:** the CLI waits for `Retry-After` (at least 1 second, at most 60 seconds) plus a random 0 to 20%, so several agents on one key do not all retry at the same moment, and tries again, with up to 15 minutes of waiting per command. After that it exits 6 (`rate_limited`).\n- **502, 503, 504 and network errors:** up to 3 retries with backoff, for GET, PUT, PATCH and DELETE, and for the POST routes the CLI knows are safe to repeat.\n- **`contacts import`:** no quick retry. After a 5xx or a dropped connection it waits 130 seconds, longer than the gateway\'s request timeout, and resends the chunk once.\n- **`contacts remove`:** after a 5xx or a dropped connection it waits 2 seconds and resends once. Ids the first call already removed are reported `ok` (reason `already_removed`), so the undo still restores them.\n- **Other 4xx answers:** never retried. The row or chunk is marked `failed` with the API\'s code.\n\nKenso answers a bulk call with 200 even when some items fail, so the CLI reads each item\'s result and never trusts the HTTP status alone.\n\n## Progress\n\nProgress goes to stderr, at most one line every 2 seconds (`chunk 7/20, 7000 rows, 6 failed`), and only when stderr is a terminal or you pass `--progress`. An agent gets only the summary.\n\n## Run any API operation once per row: --each\n\nEvery generated command takes `--each <file>`, a CSV or JSONL file or `-` for stdin. The command runs once per row through the same engine: one results line per row, resume, `--concurrency`. Row keys fill the route, query and body by API name (`accountId`) or flag name (`account-id`). A blank cell is left out and the literal `null` sends null. A GET runs right away; any other method needs `--yes` or `--dry-run`.\n\n```bash\nkenso accounts update --each stages.csv --dry-run\nkenso accounts update --each stages.csv --yes --concurrency 8\n```\n\nWith `stages.csv`:\n\n```csv\naccountId,stage,overwritePinned\n501,engaged,true\n502,customer,true\n```\n\nEach row is `ok` on a 2xx answer (with the created or returned id), `not_found` on 404, `failed` otherwise, or `invalid` when a required value is missing.\n\n## The token-saving pattern for agents\n\n1. Pass a file path, never the rows: `--file leads.csv`.\n2. Run `--dry-run`, read the plan, then run its `next`.\n3. Read the summary. If `failed`, `notFound` and `invalid` are 0, you are done.\n4. Otherwise read only the problem rows, for example `grep -E \'^[0-9]+,(failed|not_found|invalid),\' results.csv | head -50`, or `invalid.csv`.\n';
|
|
8855
|
+
batch_default = '# Batch runs\n\nA batch command takes a file, sends its rows to Kenso in chunks, and prints one JSON summary. Every input row gets one line in a results file, every run can be resumed, and nothing is written until you pass `--yes`.\n\nThe batch commands:\n\n- `contacts import`, `update`, `remove`, `restore`, `pause`, `resume`, `tag`, `untag` ([Leads](leads.md))\n- `people import` and `accounts import` ([CRM](crm.md), beta)\n- `studio fill` ([Studio](studio.md), beta)\n- any generated command run with `--each <file>`, once per row (see below)\n\n## Plan, then apply\n\nWithout `--yes` a batch command plans and changes nothing. `--dry-run` asks for the plan explicitly. `--yes` applies. Passing both is a usage error. Two exceptions to the plan below: `studio fill` without `--yes` prints its credit estimate and `next`, with no run or `plan.json` ([Studio](studio.md)), and a non-GET `--each` without `--yes` or `--dry-run` is a usage error (exit 2) rather than a plan.\n\n```bash\nkenso contacts import --campaign 812 --file leads.csv --dry-run\nkenso contacts import --campaign 812 --file leads.csv --yes\n```\n\nThe dry run parses and checks every row, may call read-only endpoints (a campaign read, a credit estimate, a contacts search for `--where`), writes `plan.json`, and prints the plan:\n\n```json\n{"run":"r_ubqu7wtx","dryRun":true,"command":"contacts remove","rows":3,"valid":3,"invalid":0,"chunks":1,"chunkSize":1000,"source":"ids","count":3,"firstIds":[11,12,13],"next":"kenso contacts remove --ids ids.txt --yes","plan":"/home/you/.kenso/runs/r_ubqu7wtx/plan.json"}\n```\n\nEvery plan has `run`, `dryRun`, `command`, `rows`, `valid`, `invalid`, `chunks`, `chunkSize`, `next` (the exact command that applies it) and `plan` (the file), plus fields of its own command. It adds `invalidRows` when rows were refused, `chunksDone` when it continues an unfinished run, and `alreadyDone: true` when the apply would change nothing.\n\nA file the CLI cannot read stops the run before anything is planned, with `file_unreadable` (exit 2), the line at fault and a hint: `leads.csv line 3: a quote is not closed.`, `leads.csv does not exist.`, `rows.jsonl line 7 is not valid JSON.`\n\n## The summary\n\nAn applied run prints one JSON object:\n\n```json\n{"run":"r_ubqu7wtx","rows":3,"ok":2,"created":0,"updated":0,"skipped":{},"failed":0,"notFound":1,"invalid":0,"changed":2,"results":"/home/you/.kenso/runs/r_ubqu7wtx/results.csv","resultsNdjson":"/home/you/.kenso/runs/r_ubqu7wtx/results.ndjson","resumed":false,"durationMs":412,"undo":"kenso contacts restore --run r_ubqu7wtx"}\n```\n\n| Field | Meaning |\n|---|---|\n| `run` | The run id: `r_` and 8 characters |\n| `rows` | Input rows |\n| `ok`, `created`, `updated` | Rows that succeeded, by kind |\n| `skipped` | Rows Kenso left alone on purpose, counted by reason, for example `{"duplicate":12}` |\n| `failed`, `notFound`, `invalid` | Rows that did not go through: refused or errored, id not found, refused locally |\n| `changed` | Rows this invocation changed. 0 when a rerun had nothing left to do |\n| `results`, `resultsNdjson` | Absolute paths of the results files |\n| `invalidRows` | Path of `invalid.csv`, when rows were refused locally |\n| `resumed` | True when this invocation continued an earlier run |\n| `durationMs` | Wall time of this invocation |\n| `pending` | Rows without a result yet, when the run did not finish |\n| `stopped` | `{code, message, hint}` when a stop condition ended the run (for example `limit_reached`) |\n| `interrupted` | True after Ctrl-C |\n| `next` | `kenso runs resume <runId>` when the run can continue |\n\nCommands add their own fields: `contacts import` adds `campaignId` and `notSendable`, `contacts remove` adds `undo`, `people import` adds `matched`, `addedToAccounts` and `emailFindsQueued`, `accounts import` adds `researchQueued` and `researchWaitingCredits`, `studio fill` adds `templateId`, `runs` and the estimate.\n\nExit codes: 0 when every row succeeded or was skipped, 5 when some rows are `failed`, `not_found` or `invalid`, 6 when a limit stopped the run, 130 after Ctrl-C. The full table is in [Output and errors](output-and-errors.md).\n\n## The run folder\n\nEach run keeps its files in `~/.kenso/runs/<runId>/` (`KENSO_RUNS_DIR` moves the root), or in `--out <dir>` when you pass it. A run in `--out` is also linked under the runs folder, so `kenso runs` finds it. The folder is mode 0700 and its files 0600.\n\nThe CLI refuses (exit 2) a runs folder or `--out` folder that another user owns or that it cannot make 0700 (a runs folder of yours that others can write is made 0700 first; a sticky runs folder root owns, such as a Kenso sandbox\'s, passes). `kenso runs list` leaves out, and `kenso runs show` and `resume` refuse with `run_not_private`, a run whose folder or `run.json` another user owns or can write. On Windows, which has no such owners and modes, these checks are skipped.\n\n| File | What it holds |\n|---|---|\n| `run.json` | The command, its arguments, the input path and SHA-256, the workspace, the chunk plan and the status (`planned`, `running`, `done`, `failed`, `interrupted`) |\n| `state.json` | The chunks done so far, rewritten after every chunk |\n| `results.csv` | One line per input row: `row,status,id,reason,error`, then extra columns such as `email` or `sendable` |\n| `results.ndjson` | The same rows as JSON lines |\n| `invalid.csv` | Rows refused before sending, with the reason |\n| `plan.json` | The last dry run\'s plan |\n| `summary.json` | The last summary printed |\n\n`row` is the 1-based number of the data row in the input (the CSV header is not counted). `status` is one of `created`, `updated`, `ok`, `skipped`, `failed`, `not_found` or `invalid`.\n\n```bash\nkenso runs list\nkenso runs list --limit 5 -o json\nkenso runs show r_ubqu7wtx\n```\n\n## Rerun and resume\n\nA run is identified by its command, its arguments, the SHA-256 of its input file, the workspace and the chunk size. `--yes`, `--dry-run`, `--wait`, `--concurrency` and the output flags are not part of it. Running the same command again on the same file:\n\n- **continues an unfinished run** (interrupted, stopped or crashed): finished chunks are skipped and the summary says `"resumed":true`.\n- **answers from a finished run where every row succeeded:** it prints that run\'s summary with `"changed":0` and `"alreadyDone":true`, sends no writes and exits 0 (a command may still read first: `contacts import` reads the campaign, and `contacts update --match email` looks up the campaign\'s contacts).\n- **starts a new run** when the last one finished with failed or invalid rows, or when the file changed. Lead, people and account writes match existing records (an email in a campaign, a person by email or LinkedIn URL, an account by domain), so sending a row twice never creates a duplicate.\n\n`kenso runs resume <runId>` does the same from the run id: it rebuilds the command from `run.json` and runs it with `--yes` from the folder it started in. It replays only a batch command (`contacts import`, `update`, `remove`, `restore`, `pause`, `resume`, `tag` and `untag`, `people import`, `accounts import`, `studio fill`, or a command run with `--each`) and only the flags that command takes, never a `kenso work` run. It refuses when the input was stdin, or the file is gone or changed. Two processes cannot work on one run: the second gets `run_in_progress` (exit 7).\n\n```bash\nkenso runs resume r_ubqu7wtx\n```\n\n`studio fill` is the exception: a fill charges for every page it builds, so it never fills the same ids twice. See [Studio](studio.md).\n\n## Ctrl-C\n\nThe first Ctrl-C cancels the requests in flight and starts no new chunks. The CLI writes the state and prints the summary with `"interrupted":true` and `"next":"kenso runs resume <runId>"`, then exits 130. A chunk that did not finish is sent again when you resume, which is safe because the writes match existing records. A second Ctrl-C quits at once.\n\n## Chunks, concurrency and rate limits\n\n| Command | Rows per call | At once |\n|---|---|---|\n| `contacts import` | 1,000 | 1 per campaign |\n| `contacts update`, `remove`, `restore`, `pause`, `resume` | 1,000 | 4 (`--concurrency`) |\n| `contacts tag`, `untag` | 250 | 4 (`--concurrency`) |\n| `people import` | 200 | 4 (`--concurrency`) |\n| `accounts import` | 100 | 4 (`--concurrency`) |\n| `studio fill` | 500 ids per fill run | 1 |\n| `--each` | 1 | 4 (`--concurrency`) |\n\n`--concurrency` takes 1 to 16. When the API\'s `RateLimit-Remaining` header drops below 10, the CLI sends one chunk at a time until it is back above 30.\n\nRetries:\n\n- **429:** the CLI waits for `Retry-After` (at least 1 second, at most 60 seconds) plus a random 0 to 20%, so several agents on one key do not all retry at the same moment, and tries again, with up to 15 minutes of waiting per command. After that it exits 6 (`rate_limited`).\n- **502, 503, 504 and network errors:** up to 3 retries with backoff, for GET, PUT, PATCH and DELETE, and for the POST routes the CLI knows are safe to repeat.\n- **`contacts import`:** no quick retry. After a 5xx or a dropped connection it waits 130 seconds, longer than the gateway\'s request timeout, and resends the chunk once.\n- **`contacts remove`:** after a 5xx or a dropped connection it waits 2 seconds and resends once. Ids the first call already removed are reported `ok` (reason `already_removed`), so the undo still restores them.\n- **Other 4xx answers:** never retried. The row or chunk is marked `failed` with the API\'s code.\n\nKenso answers a bulk call with 200 even when some items fail, so the CLI reads each item\'s result and never trusts the HTTP status alone.\n\n## Progress\n\nProgress goes to stderr, at most one line every 2 seconds (`chunk 7/20, 7000 rows, 6 failed`), and only when stderr is a terminal or you pass `--progress`. An agent gets only the summary.\n\n## Run any API operation once per row: --each\n\nEvery generated command takes `--each <file>`, a CSV or JSONL file or `-` for stdin. The command runs once per row through the same engine: one results line per row, resume, `--concurrency`. Row keys fill the route, query and body by API name (`accountId`) or flag name (`account-id`). A blank cell is left out and the literal `null` sends null. A GET runs right away; any other method needs `--yes` or `--dry-run`.\n\n```bash\nkenso accounts update --each stages.csv --dry-run\nkenso accounts update --each stages.csv --yes --concurrency 8\n```\n\nWith `stages.csv`:\n\n```csv\naccountId,stage,overwritePinned\n501,engaged,true\n502,customer,true\n```\n\nEach row is `ok` on a 2xx answer (with the created or returned id), `not_found` on 404, `failed` otherwise, or `invalid` when a required value is missing.\n\n`--each` sends one request per row. Where the API has a bulk or batch route, call it once instead: `campaigns bulk-pause` and `campaigns bulk-resume` take up to 50 campaign ids and answer with one result per campaign, and `threads batch-messages` reads the messages of up to 50 email threads.\n\n```bash\nkenso campaigns bulk-pause --data \'{"ids": [812, 813, 814]}\' --dry-run\nkenso threads batch-messages --thread-ids thr_abc,thr_def\n```\n\n## The token-saving pattern for agents\n\n1. Pass a file path, never the rows: `--file leads.csv`.\n2. Run `--dry-run`, read the plan, then run its `next`.\n3. Read the summary. If `failed`, `notFound` and `invalid` are 0, you are done.\n4. Otherwise read only the problem rows, for example `grep -E \'^[0-9]+,(failed|not_found|invalid),\' results.csv | head -50`, or `invalid.csv`.\n';
|
|
8856
8856
|
}
|
|
8857
8857
|
});
|
|
8858
8858
|
|
|
@@ -8868,7 +8868,7 @@ var init_connect = __esm({
|
|
|
8868
8868
|
var crm_default;
|
|
8869
8869
|
var init_crm = __esm({
|
|
8870
8870
|
"docs/crm.md"() {
|
|
8871
|
-
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| `import accounts <file.csv>`, `import people <file.csv>`, `import deals <file.csv>` | Import a CSV export of another CRM, up to 50,000 rows: Kenso proposes the mapping, you approve once, it runs in the background and can be undone for 30 days |\n| `accounts update --each`, `people update --each`, `opportunities update --each` | Edit many records from a file, one call per row |\n| `accounts bulk-update`, `people bulk-update`, `opportunities bulk-update` | Set the same fields on many records at once, by ids or by a filter, with a preview first. Needs `bulk_edit` too |\n| `accounts bulk-delete`, `people bulk-delete`, `opportunities bulk-delete` | Delete many records at once, by ids or by a filter, with a preview first. Not undone. Needs `bulk_edit` too |\n| `changes list`, `get`, `rows`, `apply`, `cancel`, `undo` | Follow a bulk change, read what each record got, stop it, or put the old values back for 30 days |\n| `accounts write-research`, `people write-research` | Store research you gathered as a record\'s latest research, free. `--each` writes many |\n| `opportunities move <id> [--stage <key>] [--pipeline <pipelineId>] [--reason <key>]` | Move a deal to a stage or another pipeline, with its won or lost reason; a field the stage asks for never stops it |\n| `opportunities stage-history <id>` | A deal\'s stage history: each stage, when, who moved it and how long it sat there |\n| `notes list`, `notes add`, `notes edit`, `notes delete` | Notes and comments on accounts, people and deals (needs `record_notes`) |\n| `deleted-accounts list`, `accounts restore --account-id <id>` | The accounts deleted in the last 30 days, and bringing one back |\n| `accounts duplicates`, `accounts merge <id> --into <id>`, `accounts merges list` | The pairs that look like one company, merging a pair, and the log of merges |\n| `export <accounts\\|people\\|deals>` | The list as CSV: everything, a saved view (`--view <id>`), 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. `--thread <id>` sets the switch for one thread |\n| `capture thread <threadId>` | One captured email thread: subject, people, time, Ken\'s summary, the members whose mailboxes hold it, and each body you may open. The id is `capturedThread.id` on a timeline row |\n| `views pin <viewId>`, `views unpin <viewId>` | Pin a saved view to your own sidebar, or take it off. Needs the `shared_views` flag |\n| `capture sync` | Read your captured mailbox now, instead of waiting for the next two-minute poll. Prints what the pass read, logged and created |\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| `opportunity-reasons get`, `opportunity-reasons replace` | List or edit why deals are lost and won |\n| `layouts show\\|set\\|reset <object>` | How every account, person or deal page in the workspace lays out its fields: header, rail sections and hidden fields (needs `record_layout`) |\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| `fields list`, `create`, `update`, `archive` | The built-in and custom fields of accounts, people and deals, and adding your own (needs `custom_fields`) |\n| `field-fill-settings`, `suggestions`, `fields fill` | How Ken fills each field from email, calls and meetings, the values it waits on you for, and filling a deal field for existing deals (needs `ken_field_fill`) |\n| `views list`, `create`, `run`, `update`, `delete` | Saved views of accounts, people and deals, private or shared with the workspace (needs `shared_views`) |\n| `reports summary`, `reports run <report>`, `reports query`, `dashboards` | Pipeline reports over your deals, your own counts and sums, and dashboards of saved charts (needs `opportunities` and `reports`) |\n| `forecast show`, `quotas list`, `set`, `propose` | Closed won, commit and best case against each member\'s quota for a month or quarter (needs `opportunities` and `forecast`) |\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# my accounts with a meeting this quarter: me is whoever runs it, so a saved view with it lists each member\'s own\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "owner", "operator": "is", "values": ["me"]}, {"field": "lastMeeting", "operator": "in_period", "values": ["this_quarter"]}]}}\' --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 --account-id 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\nTo set the same fields on many records, use `bulk-update` (below; it needs the `bulk_edit` flag). When every row gets its own values, or the workspace has no `bulk_edit`, 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## Change many accounts at once\n\n```bash\nkenso accounts bulk-update --filter \'{"filters":[{"field":"stage","operator":"is","values":["new"]}]}\' --set owner=42 --dry-run\nkenso changes apply --change-id 31\nkenso accounts bulk-update --ids 812,813 --set stage=engaged --set tier=2 --yes\nkenso changes get --change-id 31\n```\n\n`accounts bulk-update` sets the same fields on every account you name: `--ids` (1,000 at most), everything a `--filter` matches (the body `kenso accounts search --data` takes: `filters`, `where`, `q`; up to 50,000), or `--all`. A filter that holds only options and no condition (`--filter \'{"includeImportOnly":true}\'`) takes `--all` beside it. `--exclude-ids` leaves some of a filter\'s accounts out. `--set field=value` takes `ownerMemberId` (or `owner`), `stage`, `tierOverride` (or `tier`), `industry`, `fundingRound`, `employeeCount`, `hqLocation` and `cadenceDays`, and a custom field as `custom.<key>` (`--set custom.region=EMEA`; `kenso api GET \'/v1/fields?object=account\'` gives the keys); a value of `null` clears the field. `--add-tag 12,14` and `--remove-tag 13` put tags on every account or take them off (`kenso tags list` gives the ids); each tag is one row per account from `false` to `true` or back, so `kenso changes undo` takes off only the tags the change put on. People take them too; deals have no tags. A text field\'s value is sent as you type it (`--set hqLocation=10001` is the text "10001"); a custom field\'s type is not known to the CLI, so quote its text when it reads as a number or as true or false: `--set \'custom.code="10001"\'`. Use `accounts update --each` when every row gets its own values.\n\nIt makes a change set: the accounts it names and, for each, the field, its value before and its value after. Without `--yes` (or with `--dry-run`) it previews: it prints `count` and a `sample`, writes nothing, and `next` is the `kenso changes apply` command that writes exactly those accounts. With `--yes` it writes in the background and waits (`--timeout`, default 10m), then prints the change with its `counts`: `applied`, `unchanged` (already had the value), `conflict` (the account changed after the preview, so it was left alone) and `failed` (for example `pinned`: a person set the field by hand; `--overwrite-pinned` replaces it). Exit 5 when some accounts failed or conflicted. It needs the `bulk_edit` flag as well as `accounts`.\n\n`kenso accounts bulk-update` used to be the generated command for the route\'s older one-field body, which sets one `accountType` on up to 500 accounts and needs only `accounts`. The route still takes that body, but this command no longer sends it: use `kenso accounts update --each` with an `accountType` column, or `kenso api POST /v1/accounts/bulk-update --data \'{"accountIds":[812,813],"accountType":"lost"}\'`.\n\n`people bulk-update` and `opportunities bulk-update` work the same way. People take `--set` for `ownerMemberId` (or `owner`), `leadStatus`, `title`, `seniority`, `department` and `location`, and a `--filter` of `kenso people search --data` fields (`leadStatus`, `roles`, `tagIds`, `q` and the rest). Deals take `stage` (a live stage key), `ownerMemberId` (or `owner`), `closeDate` (or `close`), `amount`, `dealType` and `nextStep`, and a `--filter` of `kenso opportunities search --data` fields (`filters`, `accountId`, `pipelineId`, `q`, `missingFields`). A stage belongs to one pipeline, and a bulk stage change keeps every deal in its own: `"pipelineId"` in the filter names one pipeline\'s deals, and a deal of another pipeline is counted under `failed` with the row code `other_pipeline` and is not moved (`kenso opportunities update` moves one deal to another pipeline):\n\n```bash\nkenso opportunities bulk-update --filter \'{"pipelineId":3,"filters":[{"field":"stageCategory","operator":"is","values":["open"]}]}\' --set stage=proposal --dry-run\nkenso people bulk-update --ids 501,502 --set owner=42 --yes\n```\n\n### Delete many records at once\n\n```bash\nkenso people bulk-delete --filter \'{"onAccount":"none","leadStatus":["disqualified"]}\' --dry-run\nkenso changes apply --change-id 32\nkenso opportunities bulk-delete --ids 71,72,73 --yes\n```\n\n`accounts bulk-delete`, `people bulk-delete` and `opportunities bulk-delete` name their records the way `bulk-update` does (`--ids`, `--filter`, `--all`, `--exclude-ids`) and take no `--set`. Without `--yes` they preview: `count`, a `sample`, and `next` is the `kenso changes apply` command that deletes exactly those records. The API itself previews a delete whose body leaves `dryRun` out, so `--yes` sends `dryRun: false`. Each record is deleted as its own `delete` command deletes it, so one that cannot be deleted (a person still on an account) is counted as `failed` and the rest go on. `kenso changes undo` undoes a delete of accounts for 30 days: each account still deleted is restored, as `kenso accounts restore` restores it. A delete of people or deals is not undone.\n\n### Follow, stop and undo a change\n\n```bash\nkenso changes list --object accounts\nkenso changes rows --change-id 31 --status conflict,failed\nkenso changes cancel --change-id 31\nkenso changes undo --change-id 31\n```\n\n`changes list` shows the workspace\'s bulk changes, newest first, whoever made them. `changes rows` lists a change\'s records with the value before (`from`) and after (`to`) and a `status`; `--status conflict,failed` reads what a change missed. `changes cancel` drops a preview or stops a change that is still writing; what it already wrote stays. `changes undo` puts the old value back on every record that still holds the value the change wrote, for 30 days after it was applied (`undoUntil`). A record someone changed again since keeps its newer value: `counts.undone` is how many went back, `counts.applied` how many still hold the change. Undo answers `409 invalid_state` with `undo_expired`, `still_running`, `nothing_applied` or `not_undoable` (a delete of people or deals) when there is nothing it can put back.\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` (member ids, or `me` for whoever runs it), `closeDate` (`past_due`, `next_30_days`, `later`, `none`, or a period such as `this_week` or `next_quarter`), `sourceCampaignId`, `closedAt` and `createdAt` (periods). `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\nShaping them needs the `workspace_settings` permission:\n\n```bash\nkenso pipelines create --name Renewals --routing-rule "The account is already a customer" --data \'{"stages": [{"label": "Up for renewal", "category": "open"}, {"label": "Won", "category": "won"}, {"label": "Lost", "category": "lost"}]}\'\nkenso pipelines update --pipeline-id 6 --name Expansion --position 0\nkenso pipelines update --pipeline-id 6 --data @stages.json\nkenso pipelines archive --pipeline-id 6\nkenso pipelines restore --pipeline-id 6\nkenso pipelines propose --description "upsells and renewals for customers"\n```\n\n- **`create`** takes a unique `name`, the pipeline\'s `stages` in display order (at least one `open`, one `won` and one `lost`) and an optional `routingRule`: one sentence that says which deals belong there, which Ken reads to route a new deal that names no pipeline. Each stage gets a key from its label; a key another pipeline already uses gets the pipeline\'s name in front (`renewals_won`). A workspace has at most 10 pipelines.\n- **`update`** changes what you send. `stages` is the pipeline\'s whole stage list: read it with `pipelines get`, keep each stage\'s `key`, and add a new stage without one. A stage with live deals in it cannot be left out; archive it with `"isArchived": true` instead.\n- **`propose`** asks Ken to draft a pipeline from one sentence: a `name`, a `routingRule` and `stages`, in the shape `create` takes. It saves nothing. Read it, change what you want, and send it to `create`.\n- **`archive`** stops new deals from entering a pipeline and keeps the deals in it. The default pipeline cannot be archived, and nothing is deleted: `restore` brings a pipeline back.\n\n## Deals in a pipeline\n\nA deal\'s stage names its pipeline, and the deal\'s `pipelineId` repeats it. To work one pipeline\'s deals, or move a deal between pipelines:\n\n```bash\nkenso opportunities list --pipeline-id 6\nkenso opportunities search --pipeline-id 6 --data \'{"countBy": ["stage"]}\'\nkenso opportunities create --account-id 501 --pipeline-id 6\nkenso opportunities move 77 --pipeline 6\nkenso opportunities move 77 --pipeline 6 --stage negotiating\n```\n\n- **`create --pipeline-id`** opens the deal in that pipeline\'s first live open stage. Without it, and without a `stage`, Ken reads each pipeline\'s `routingRule` and opens the deal in the pipeline whose rule clearly fits the account, else in the default pipeline. A pipeline you name always wins.\n- **`move --pipeline`** alone keeps the deal\'s category (`open`, `won` or `lost`): it lands in that pipeline\'s live stage of the category with the same label as its stage now, else in the category\'s first live stage. The printed deal says where it landed. With `--stage`, the stage must be that pipeline\'s; the error lists the pipeline\'s stage keys otherwise.\n- An archived pipeline takes no deal from another pipeline (`pipeline_archived`). The deals already in it still move between its stages.\n- A move is a stage change: it writes the same history, and a stage a person set is refused with `pinned_by_user` unless you pass `--overwrite-pinned`.\n\n## Restore a deleted account\n\n```bash\nkenso deleted-accounts list\nkenso accounts restore --account-id 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 --account-id <id>` brings the account back with its domains, its people, its deals and its planned touches, which wait for approval again. Its Studio pages, committee seats and Knowledge facts do not come back: the delete purged them. 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## Import a CSV export of another CRM\n\n```bash\nkenso import accounts companies.csv\nkenso import accounts companies.csv --map "Company=name" --map "Notes=" --yes\nkenso import accounts --id 42 --yes\nkenso record-import-rows list --import-id 42 --outcome skipped\nkenso record-imports undo --import-id 42\n```\n\n`kenso import accounts <file.csv>` uploads the file (a header row, at most 50,000 rows) and prints Kenso\'s plan: which field each column fills, which columns it skips, how owner and stage values are read (`valueMaps`) and what it could not settle (`questions`). Headers of Kenso, Twenty, HubSpot, Attio and Salesforce exports are recognized. Nothing is written to your accounts yet. `--map "Header=field"` changes a column and `--map "Header="` skips it. A column fills a custom field with `--map "Header=custom.<key>"` (`kenso fields list --object account` has the keys; people are `person`, deals `opportunity`), and `--map "Header=new"` adds the custom field Kenso proposes for a column no field matches (`new:text` picks the type), and a column whose header is a custom field\'s label is mapped to it already; owner and stage values change with `kenso record-imports update --import-id <id>`.\n\nWith `--yes` the import starts and the command waits for it (`--timeout`, default 30m; the import keeps running on the server either way), then prints how many rows were created, updated, restored, left unchanged and skipped. Without `--yes` it stops at the plan and prints the command that starts that import (`--id <importId> --yes`), so the file is uploaded once. `--dry-run` sends nothing: with a file it prints the upload it would make, since the plan needs the upload, and with `--id` it reads the planned import and prints what `--map`, `--source` and `--research` would change on it. `--source twenty` names the system the file\'s record ids come from: pass the same one for every file of an export, so the people and deals files find the accounts by their old ids. `kenso record-imports delete --import-id <id>` discards an import that was planned and never started; one left planned for 30 days is discarded by itself.\n\nPer row: a domain no account has creates an account; a domain that is already an account fills only that account\'s empty fields, so nothing you entered is overwritten; an account deleted in the last 30 days is restored; a row with no usable domain is skipped, and `kenso record-import-rows list --import-id <id> --outcome skipped` says why. Research of new accounts is off unless you pass `--research`, which is charged per account. It needs the `accounts` and `crm_import_export` flags. This is a different command from `accounts import`, which creates accounts row by row from the machine running the CLI.\n\n`kenso record-imports undo --import-id <id>` takes a finished import back in the background (`kenso record-imports get --import-id <id>` reads `undoing`, then `undone`): an account the import created is deleted, and can be restored for 30 days, unless someone changed it since, it holds a deal, a person was added to it since, or it was merged; a field the import filled is emptied while it still holds the imported value. `kenso record-import-rows list --import-id <id>` shows each row\'s `undoOutcome`.\n\n`kenso import people <file.csv>` works the same way for people. Import the accounts file first: a people row\'s company id (Twenty\'s `Company Id`, HubSpot\'s associated company id) places the person on the account that kept that id, and without one the person goes on the account that holds their email\'s or company\'s domain. A people import never creates an account; a person whose company is no account comes in without one and the row says so. A row matches a person by email, then LinkedIn URL, then name on the company, as every other way into People does; a matched person gets only their empty fields filled (a phone only when they have none). A row with none of the three is skipped, and a row with only a name needs a company that is an account with a domain. `kenso record-imports undo --import-id <id>` takes a people import back too: a person it created leaves the accounts the row placed them on and is deleted, unless someone changed them since, they were contacted or have a touch planned, or they are on an open deal; a field it filled is emptied while it still holds the imported value. `kenso people import` stays the JSONL and enrichment path (`--find-emails`); `kenso import people` is the CRM file with a plan, a row report and one approval.\n\n`kenso import deals <file.csv>` works the same way for deals, after the accounts file and the people file. A row opens a deal on the account that kept its company id (Twenty\'s `Company Id`, HubSpot\'s associated company id), else on the account that holds its company domain; a row whose account Kenso does not know is skipped and says so. Its contact is the person a people import kept the row\'s contact id for (Twenty\'s `Point of Contact Id`). The plan maps each stage in the file to one of the workspace\'s deal stages (`valueMaps`, field `stage`): a stage\'s key or label matches by itself, Closed Won and Closed Lost go to the first won and lost stage, and a value with no match opens in the first open stage until you pick one with `kenso record-imports update`. Amounts stay in the workspace currency: an amount in another currency is left out with a warning, never converted. A row whose deal id an earlier import kept is that deal and only gets its empty fields filled. A row no id names a deal for is the one live deal on its account with its name and its contact (a side with no contact matches any) that is open, won or lost as the row is: it fills that deal\'s empty fields and keeps the row\'s id for it, and a row that matches two such deals is skipped and names them. A file with no id column is matched that way only, and the plan says so (`no_source_id`). `kenso record-imports undo --import-id <id>` takes a deals import back: a deal it opened is deleted unless someone changed it since, and a field it filled is emptied while it still holds the imported value. Undo in the reverse order of the imports (deals, then people, then accounts): an account that holds a deal is kept.\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 --view 40 --out pipeline.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 view of that object, your own or one shared with the workspace (`kenso views list --object account` shows the ids; people are `person`, deals `opportunity`): the file holds the rows the view lists, in its sort, so its row count is the view\'s count. `--filters`, `--where` (accounts), `--q` and `--sort` are the search operation\'s own fields; given with `--view`, each replaces that key of the view. 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## Duplicates and merges\n\n```bash\nkenso accounts duplicates --scan\nkenso accounts merge 812 --into 77 --dry-run\nkenso accounts merge 812 --into 77 --yes\nkenso accounts merges list --merged-by system\nkenso accounts merges 41\n```\n\nThese need the `crm_import_export` flag beside `accounts`. `accounts duplicates` lists the pairs of accounts that look like one company: both accounts, why they were paired (`reasons`: `domain`, `linkedin`, `name`) and `isCertain`, true when the two share the name and the domain apart from its ending (acme.com and acme.co). `--scan` compares every account first; a scan also runs after each accounts import. `--status dismissed` or `merged` shows the answered pairs. `kenso account-duplicates dismiss --duplicate-id <duplicateId>` answers that a pair is not a duplicate, for good.\n\n`accounts merge <accountId> --into <id>` merges the first account into the second, the one you keep. A merge cannot be undone, so look first: `--dry-run` prints `mergeSummary` (each field that changes with its value before and after, and how many people, deals, touches and domains move) and writes nothing. The merge itself needs `--yes` when no person is at the terminal. It answers the kept account with the same summary and a `mergeId`.\n\n`accounts merges list` is the log, newest first, and `accounts merges <mergeId>` opens one merge with `mergedValues`: the merged-away account as it was. `--merged-by system` shows the merges Ken made itself. Where automatic merging is on for the workspace, Ken merges only certain pairs, keeps the customer, then the owned, then the last touched account, and leaves a pair for you when both are customers, the two have different owners, or one is being worked and the other is set aside (`heldReason` on the pair says which). That job is off unless it was turned on for the workspace.\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. The created entry of a deal a CSV import brought in has `imported: true`; one imported in a won or lost stage entered it on its file\'s close date, which is its `enteredAt`. 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## Notes on accounts, people and deals\n\nWith the `record_notes` feature on, everyone who can see a record reads its notes. Name the record with exactly one of `--account`, `--person` and `--deal`:\n\n```bash\nkenso notes list --account 5\nkenso notes add --account 5 --body \'Budget approved, @[Jane Doe](41) please send the DPA\'\nkenso notes add --parent 900 --body \'Sent it this morning\' # a comment under note 900\ncat call-notes.md | kenso notes add --deal 77 --body - # the body from stdin\nkenso notes edit 900 --body \'Budget approved for Q1\' # the author only\nkenso notes edit 900 --pin\nkenso notes delete 900 --yes # kenso notes restore --note-id 900 brings it back\n```\n\nThe body is markdown, up to 20,000 characters. Mention a teammate as `@[Name](memberId)`: they get a notification that opens the note. A note shows on the record\'s Notes tab and its Activity timeline, and Ken\'s account brief quotes the account\'s notes. The MCP\'s `notes` tool does the same. A note on an account needs the accounts plan feature; people and deals work on every plan.\n\n## Required fields per stage\n\n```bash\nkenso pipelines stage-rules\nkenso pipelines stage-rules --pipeline 6\nkenso pipelines stage-rules proposal --require amount,closeDate,custom.tier --dry-run\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. Without `--pipeline` the list is the default pipeline\'s stages; `--pipeline <id>` lists that pipeline\'s. A stage key is unique across pipelines, so a stage of any pipeline is set by its key, and with `--pipeline` the command first checks the stage is that pipeline\'s. 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```bash\nkenso opportunities update --opportunity-id 4401 --stage proposal\nkenso opportunities list --missing-fields\n```\n\nEvery deal then carries `missingFields` (`[{field, label}]`). A create, or an update that sends a stage, answers `warnings` beside the deal for each field the stage asks for that the deal leaves empty: each prints on stderr as `warning: <message>`, stdout stays the deal and the exit code stays 0. `--missing-fields` keeps only the deals flagged Missing (also `missingFields: true` on `kenso opportunities search`).\n\n## Won and lost reasons\n\n```bash\nkenso opportunity-reasons get\nkenso opportunity-reasons replace --kind lost --data \'{"reasons":[{"key":"no_budget","label":"No budget"},{"label":"Built it in-house"}]}\'\nkenso opportunities move 4401 --stage lost --reason built_it_in_house\n```\n\n`kenso opportunities move <id> --stage <key> [--reason <key>]` sends the reason as `lostReasonKey` for a lost stage or `wonReasonKey` for a won stage; an open stage takes none. Each field the new stage asks for that the deal leaves empty prints a warning on stderr, and the move still goes through.\n\nWith the `deal_stage_rules` flag on, each workspace edits why its deals are lost and won. `get` prints `lost` and `won`, each `{isDefault, reasons: [{key, label, isArchived}]}`. `replace` takes a kind\'s whole list in order, as `get` prints it: keep a reason by its `key`, leave `key` out for a new one, and set `isArchived` to archive a reason or bring one back. A reason left out is archived too: deals keep it, and no write can pick it again. At least one reason stays live and at most 30, and labels stay unique, archived ones included. A deal takes a live key in `lostReasonKey` (a lost stage) or `wonReasonKey` (a won stage). A move to Lost without a reason still goes through, with a warning and "Missing: Lost reason" on the deal. Editing the lists needs the `workspace_settings` permission. The same as the MCP\'s `pipelines(operation="reasons-get")` and `reasons-replace`.\n\n## Record page layouts\n\n```bash\nkenso layouts show account\nkenso layouts set account --header tier,ownerMemberId,score,custom.arr\nkenso layouts show account > layout.json && kenso layouts set account --data @layout.json\nkenso layouts reset account --dry-run\nkenso layouts reset account --yes\n```\n\nWith the `record_layout` flag on, a workspace lays out each record page once, for every member: `account`, `person` or `opportunity` (a deal). `show` prints `GET /v1/record-layouts/{object}`: `isDefault`, `version`, `headerFields` (up to 6, pinned under the record\'s name), `railSections` (`{name, fields}`), `hiddenFields` (under the rail\'s More), `sections` (`{key, label, placement, locked, hidden}`, in page order) and `availableFields`. Field keys are the field catalog\'s (`ownerMemberId`, `closeDate`, `primaryDomain`); a custom field is `custom.<field_key>`, and a new one joins the last rail section.\n\n`set --header` pins up to 6 fields and keeps the rest of the saved layout; the fields it unpins go to the top of the first rail section. `set --data` saves a whole layout, so group the rail into sections or hide a section that way, starting from `show`. A save made after someone else\'s answers a conflict: show it again. `reset` puts the page back to Kenso\'s default for every member, so it needs `--yes` (save the layout with `show` first). `set` and `reset` print the request with `--dry-run` and change nothing. Saving needs the `workspace_settings` permission, and the account page also needs the `accounts` plan. The same as the MCP\'s `account_views` operations `record-layouts-get`, `record-layouts-replace` and `record-layouts-reset`.\n\n## Pin a saved view\n\n```bash\nkenso views pin 118\nkenso views unpin 118\n```\n\nWith the `shared_views` flag on, `views pin` adds a saved view to your own sidebar, nested under its list (an account view under Accounts, a person view under People, a deal view under Deals). It is `kenso pins add --kind view --view-id <viewId>` under the name you would try: it prints the pin, and a view already pinned answers the pin it has. Pins are yours alone: pinning a shared view does not pin it for a teammate. `views unpin` finds your pin of the view and removes it, and prints `{"viewId": ..., "removed": true}`; a view you had not pinned prints `removed: false` and changes nothing. The view itself stays either way. `kenso pins list` shows every pin you have.\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 with its offset (`2026-11-20T15:00:00Z`); `--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. When one fails, its error names the tasks before it, which are already changed. `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 the app path in `href` (null for a task, which opens in its panel).\n- `tasks list`, `get`, `update`, `delete`, `restore` and `task-queue list` are generated from the API: `kenso tasks --help` lists them.\n\n## Custom fields\n\n```bash\nkenso fields list --object account\nkenso fields create --object account --type select --label Region --data \'{"options":["EMEA","North America"]}\' --dry-run\nkenso fields create --object account --type select --label Region --data \'{"options":["EMEA","North America"]}\'\nkenso fields update --field-id 412 --label "Sales region"\nkenso fields archive --field-id 412 --yes\n```\n\nWith the `custom_fields` flag on, each workspace adds its own fields to accounts, people and deals (`--object account`, `person` or `opportunity`). `fields list` prints the built-in and custom fields; a custom field is `custom.<key>`, the name `customFields`, `bulk-update --set`, stage rules, layouts and imports use. Run it before you add a field that may already exist.\n\n- **`create`** takes `--object`, `--type` (`text`, `number`, `boolean`, `date`, `json`, `select`, `multi_select`, `currency`, `url` or `user`; fixed once created) and `--label`. `--key` is made from the label when you leave it out ("Contract value" is `contract_value`). `--description` says what the field means; Ken reads it when it fills the field. A select or multi_select takes its choices in `--data` as `options`, each a label or `{label, color, key}`, up to 200.\n- **`update`** changes the label, the description or the options. `options` in `--data` is the whole list: keep an option by its `key`, and one you leave out is archived, never deleted, so the records that hold it keep it.\n- **`archive`** hides a field from the pickers, the columns and the record rail and keeps every value, so it asks for `--yes`. `kenso fields update --field-id 412 --no-is-archived` brings it back. An object holds at most 100 live custom fields.\n\n## Field-fill settings and Ken\'s suggestions\n\n```bash\nkenso field-fill-settings list\nkenso field-fill-settings update --object opportunity --field amount --mode suggest --instruction "Budget the buyer named, in USD"\nkenso suggestions list --account-id 812\nkenso suggestions approve --suggestion-id 31\nkenso suggestions reject --suggestion-id 32 --reason "That was last year\'s budget"\nkenso fields fill --object opportunity --field nextStep --all\n```\n\nWith the `ken_field_fill` flag on, Ken reads email, calls and meetings and fills record fields. `field-fill-settings list` shows each field Ken can fill with its `mode`: `default` (Ken fills an empty field and suggests a change to a filled one), `off`, `suggest` (every value waits for a person) or `auto`. `update` sets a field\'s mode and an `--instruction` of up to 500 characters that tells Ken what to look for. A new mode applies to the next email, call or meeting Ken reads.\n\nA value that waits for a person is a suggestion: the field, its value now (`from`), Ken\'s value (`to`), the quote and its source. `suggestions list` shows the pending ones; narrow it with `--status`, `--object` and `--record-id` (one record), `--account-id` (the account, its people and its deals) or `--meeting-id`. `approve` writes Ken\'s value to the record (`--data \'{"value": ...}\'` writes yours instead) and `reject` leaves the record as it is. Both are a person\'s call: run them on the user\'s word.\n\n`fields fill` fills one deal field for the deals that have none, from their recorded meetings and captured email. As written above it only answers how many deals have no value and what filling them costs, and starts nothing; `--no-body-dry-run` starts it. It needs `bulk_edit` too, and works on deal fields only.\n\n## Saved views\n\n```bash\nkenso views list --object account\nkenso views create --object account --name "Tier 1, no meeting in 30 days" --visibility workspace --data @view.json --dry-run\nkenso views run --view-id 140 --limit 100 --include-total\nkenso views update --view-id 140 --name "Tier 1, quiet for 30 days"\nkenso views delete --view-id 140 --yes\n```\n\nWith the `shared_views` flag on, a saved view is a name, its object\'s search `filter` and `sort`, `columns` and a `layout` (`list` or `board`), private to its maker or shared with the workspace (`--visibility workspace`). `view.json` holds `filter` and `sort` in the shape the object\'s search takes (`filters`, `where`, `q`), so try it with `kenso accounts search --data` first. `views list` shows the workspace\'s shared views and your private ones. `run` lists a view\'s records exactly as its object\'s search returns them, page by page. `update` changes what you send, and `filter` replaces the whole filter. Any member changes or deletes a shared view, but only its maker makes it private. `delete` asks for `--yes` and takes the view off every member\'s sidebar. `kenso views pin` (above) pins one.\n\n## Reports and dashboards\n\n```bash\nkenso reports summary\nkenso reports list\nkenso reports run won_by_month --period this_year --owner 41\nkenso reports query --data \'{"measures":[{"op":"sum","field":"amount"}],"dimensions":[{"field":"stage"}]}\'\nkenso dashboards create --name "Q4 pipeline" --visibility workspace\nkenso dashboards add-chart --dashboard-id 3 --title "Won by month" --data \'{"report":{"key":"won_by_month","period":"this_year"}}\'\n```\n\nWith the `opportunities` and `reports` flags on, reports count and sum your deals. `reports summary` prints where the period stands (closed won, open pipeline, weighted pipeline, win rate) and what needs you, then one row per stock report. `reports run <report>` prints one stock report as a table: `pipeline_by_stage`, `won_by_month`, `stage_conversion`, `time_in_stage`, `won_by_source_campaign` or `activity_by_member`. Each takes `--period` (`this_quarter` by default, a month such as `2026-03`, a quarter, a year or a day range), `--owner` and `--pipeline`, and `--full` prints the whole answer with each bucket\'s filter for `opportunities search`.\n\n`reports query` asks your own question: `measures` (1 to 4 of `count`, `sum`, `avg` or `weighted_sum` of `amount`), `dimensions` (up to 2 of `stage`, `stageCategory`, `ownerMemberId`, `sourceCampaignId`, `closedAt`, `createdAt` or `closeDate`, the dates by `month`, `quarter` or `year`) and a `filter` as `opportunities search` takes it. It only reads.\n\nA dashboard keeps charts, up to 12, private to its owner or shared with the workspace. A chart is a stock report (`report`: its `key`, `period`, `ownerMemberId`, `pipelineId`) or a `query`, drawn as `bars` or a `trend`. `dashboards get --dashboard-id 3` reads one, and `update`, `remove-chart` and `delete` change it (the last two ask for `--yes`).\n\n## Forecast and quotas\n\n```bash\nkenso forecast show --period 2026-Q4\nkenso forecast show --period 2026-11 --include-deals\nkenso quotas list --period 2026-Q4\nkenso quotas propose --period 2027-Q1 --uplift-percent 15\nkenso quotas propose --period 2027-Q1 --uplift-percent 15 --apply\nkenso quotas set --period 2027-Q1 --member-id 41 --amount 120000\n```\n\nWith the `opportunities` and `forecast` flags on, `forecast show` reads closed won, commit and best case for a quarter (`2026-Q4`) or a month (`2026-11`), per member and for the team, each against its quota. Without `--period` it reads the current quarter. `--include-deals` adds the deals it counted. `quotas propose` works out each member\'s quota from what they closed won in the quarter before the period (or the last quarter that has ended) plus `--uplift-percent` (0 to 200, default 15), and writes nothing; with `--apply` it saves those amounts. `quotas set` sets one member\'s quota in the workspace currency, and `--data \'{"memberId":41,"amount":null}\'` removes it.\n';
|
|
8871
|
+
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| `import accounts <file.csv>`, `import people <file.csv>`, `import deals <file.csv>` | Import a CSV export of another CRM, up to 50,000 rows: Kenso proposes the mapping, you approve once, it runs in the background and can be undone for 30 days |\n| `accounts update --each`, `people update --each`, `opportunities update --each` | Edit many records from a file, one call per row |\n| `accounts bulk-update`, `people bulk-update`, `opportunities bulk-update` | Set the same fields on many records at once, by ids or by a filter, with a preview first. Needs `bulk_edit` too |\n| `accounts bulk-delete`, `people bulk-delete`, `opportunities bulk-delete` | Delete many records at once, by ids or by a filter, with a preview first. Not undone. Needs `bulk_edit` too |\n| `changes list`, `get`, `rows`, `apply`, `cancel`, `undo` | Follow a bulk change, read what each record got, stop it, or put the old values back for 30 days |\n| `accounts write-research`, `people write-research` | Store research you gathered as a record\'s latest research, free. `--each` writes many |\n| `opportunities move <id> [--stage <key>] [--pipeline <pipelineId>] [--reason <key>]` | Move a deal to a stage or another pipeline, with its won or lost reason; a field the stage asks for never stops it |\n| `opportunities stage-history <id>` | A deal\'s stage history: each stage, when, who moved it and how long it sat there |\n| `notes list`, `notes add`, `notes edit`, `notes delete` | Notes and comments on accounts, people and deals (needs `record_notes`) |\n| `deleted-accounts list`, `accounts restore --account-id <id>` | The accounts deleted in the last 30 days, and bringing one back |\n| `accounts duplicates`, `accounts merge <id> --into <id>`, `accounts merges list` | The pairs that look like one company, merging a pair, and the log of merges |\n| `export <accounts\\|people\\|deals>` | The list as CSV: everything, a saved view (`--view <id>`), 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. `--thread <id>` sets the switch for one thread |\n| `capture thread <threadId>` | One captured email thread: subject, people, time, Ken\'s summary, the members whose mailboxes hold it, and each body you may open. The id is `capturedThread.id` on a timeline row |\n| `views pin <viewId>`, `views unpin <viewId>` | Pin a saved view to your own sidebar, or take it off. Needs the `shared_views` flag |\n| `capture sync` | Read your captured mailbox now, instead of waiting for the next two-minute poll. Prints what the pass read, logged and created |\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| `opportunity-reasons get`, `opportunity-reasons replace` | List or edit why deals are lost and won |\n| `layouts show\\|set\\|reset <object>` | How every account, person or deal page in the workspace lays out its fields: header, rail sections and hidden fields (needs `record_layout`) |\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| `fields list`, `create`, `update`, `archive` | The built-in and custom fields of accounts, people and deals, and adding your own (needs `custom_fields`) |\n| `field-fill-settings`, `suggestions`, `fields fill` | How Ken fills each field from email, calls and meetings, the values it waits on you for, and filling a deal field for existing deals (needs `ken_field_fill`) |\n| `views list`, `create`, `run`, `update`, `delete` | Saved views of accounts, people and deals, private or shared with the workspace (needs `shared_views`) |\n| `reports summary`, `reports run <report>`, `reports query`, `dashboards` | Pipeline reports over your deals, your own counts and sums, and dashboards of saved charts (needs `opportunities` and `reports`) |\n| `forecast show`, `quotas list`, `set`, `propose` | Closed won, commit and best case against each member\'s quota for a month or quarter (needs `opportunities` and `forecast`) |\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# my accounts with a meeting this quarter: me is whoever runs it, so a saved view with it lists each member\'s own\nkenso accounts search --data \'{"where": {"match": "all", "conditions": [{"field": "owner", "operator": "is", "values": ["me"]}, {"field": "lastMeeting", "operator": "in_period", "values": ["this_quarter"]}]}}\' --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 --account-id 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\nTo set the same fields on many records, use `bulk-update` (below; it needs the `bulk_edit` flag). When every row gets its own values, or the workspace has no `bulk_edit`, 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## Change many accounts at once\n\n```bash\nkenso accounts bulk-update --filter \'{"filters":[{"field":"stage","operator":"is","values":["new"]}]}\' --set owner=42 --dry-run\nkenso changes apply --change-id 31\nkenso accounts bulk-update --ids 812,813 --set stage=engaged --set tier=2 --yes\nkenso changes get --change-id 31\n```\n\n`accounts bulk-update` sets the same fields on every account you name: `--ids` (1,000 at most), everything a `--filter` matches (the body `kenso accounts search --data` takes: `filters`, `where`, `q`; up to 50,000), or `--all`. A filter that holds only options and no condition (`--filter \'{"includeImportOnly":true}\'`) takes `--all` beside it. `--exclude-ids` leaves some of a filter\'s accounts out. `--set field=value` takes `ownerMemberId` (or `owner`), `stage`, `tierOverride` (or `tier`), `industry`, `fundingRound`, `employeeCount`, `hqLocation` and `cadenceDays`, and a custom field as `custom.<key>` (`--set custom.region=EMEA`; `kenso api GET \'/v1/fields?object=account\'` gives the keys); a value of `null` clears the field. `--add-tag 12,14` and `--remove-tag 13` put tags on every account or take them off (`kenso tags list` gives the ids); each tag is one row per account from `false` to `true` or back, so `kenso changes undo` takes off only the tags the change put on. People take them too; deals have no tags. A text field\'s value is sent as you type it (`--set hqLocation=10001` is the text "10001"); a custom field\'s type is not known to the CLI, so quote its text when it reads as a number or as true or false: `--set \'custom.code="10001"\'`. Use `accounts update --each` when every row gets its own values.\n\nIt makes a change set: the accounts it names and, for each, the field, its value before and its value after. Without `--yes` (or with `--dry-run`) it previews: it prints `count` and a `sample`, writes nothing, and `next` is the `kenso changes apply` command that writes exactly those accounts. With `--yes` it writes in the background and waits (`--timeout`, default 10m), then prints the change with its `counts`: `applied`, `unchanged` (already had the value), `conflict` (the account changed after the preview, so it was left alone) and `failed` (for example `pinned`: a person set the field by hand; `--overwrite-pinned` replaces it). Exit 5 when some accounts failed or conflicted. It needs the `bulk_edit` flag as well as `accounts`.\n\n`kenso accounts bulk-update` used to be the generated command for the route\'s older one-field body, which sets one `accountType` on up to 500 accounts and needs only `accounts`. The route still takes that body, but this command no longer sends it: use `kenso accounts update --each` with an `accountType` column, or `kenso api POST /v1/accounts/bulk-update --data \'{"accountIds":[812,813],"accountType":"lost"}\'`.\n\n`people bulk-update` and `opportunities bulk-update` work the same way. People take `--set` for `ownerMemberId` (or `owner`), `leadStatus`, `title`, `seniority`, `department` and `location`, and a `--filter` of `kenso people search --data` fields (`leadStatus`, `roles`, `tagIds`, `q` and the rest). Deals take `stage` (a live stage key), `ownerMemberId` (or `owner`), `closeDate` (or `close`), `amount`, `dealType` and `nextStep`, and a `--filter` of `kenso opportunities search --data` fields (`filters`, `accountId`, `pipelineId`, `q`, `missingFields`). A stage belongs to one pipeline, and a bulk stage change keeps every deal in its own: `"pipelineId"` in the filter names one pipeline\'s deals, and a deal of another pipeline is counted under `failed` with the row code `other_pipeline` and is not moved (`kenso opportunities update` moves one deal to another pipeline):\n\n```bash\nkenso opportunities bulk-update --filter \'{"pipelineId":3,"filters":[{"field":"stageCategory","operator":"is","values":["open"]}]}\' --set stage=proposal --dry-run\nkenso people bulk-update --ids 501,502 --set owner=42 --yes\n```\n\n### Delete many records at once\n\n```bash\nkenso people bulk-delete --filter \'{"onAccount":"none","leadStatus":["disqualified"]}\' --dry-run\nkenso changes apply --change-id 32\nkenso opportunities bulk-delete --ids 71,72,73 --yes\n```\n\n`accounts bulk-delete`, `people bulk-delete` and `opportunities bulk-delete` name their records the way `bulk-update` does (`--ids`, `--filter`, `--all`, `--exclude-ids`) and take no `--set`. Without `--yes` they preview: `count`, a `sample`, and `next` is the `kenso changes apply` command that deletes exactly those records. The API itself previews a delete whose body leaves `dryRun` out, so `--yes` sends `dryRun: false`. Each record is deleted as its own `delete` command deletes it, so one that cannot be deleted (a person still on an account) is counted as `failed` and the rest go on. `kenso changes undo` undoes a delete of accounts for 30 days: each account still deleted is restored, as `kenso accounts restore` restores it. A delete of people or deals is not undone.\n\n### Follow, stop and undo a change\n\n```bash\nkenso changes list --object accounts\nkenso changes rows --change-id 31 --status conflict,failed\nkenso changes cancel --change-id 31\nkenso changes undo --change-id 31\n```\n\n`changes list` shows the workspace\'s bulk changes, newest first, whoever made them. `changes rows` lists a change\'s records with the value before (`from`) and after (`to`) and a `status`; `--status conflict,failed` reads what a change missed. `changes cancel` drops a preview or stops a change that is still writing; what it already wrote stays. `changes undo` puts the old value back on every record that still holds the value the change wrote, for 30 days after it was applied (`undoUntil`). A record someone changed again since keeps its newer value: `counts.undone` is how many went back, `counts.applied` how many still hold the change. Undo answers `409 invalid_state` with `undo_expired`, `still_running`, `nothing_applied` or `not_undoable` (a delete of people or deals) when there is nothing it can put back.\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` (member ids, or `me` for whoever runs it), `closeDate` (`past_due`, `next_30_days`, `later`, `none`, or a period such as `this_week` or `next_quarter`), `sourceCampaignId`, `closedAt` and `createdAt` (periods). `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\nShaping them needs the `workspace_settings` permission:\n\n```bash\nkenso pipelines create --name Renewals --routing-rule "The account is already a customer" --data \'{"stages": [{"label": "Up for renewal", "category": "open"}, {"label": "Won", "category": "won"}, {"label": "Lost", "category": "lost"}]}\'\nkenso pipelines update --pipeline-id 6 --name Expansion --position 0\nkenso pipelines update --pipeline-id 6 --data @stages.json\nkenso pipelines archive --pipeline-id 6\nkenso pipelines restore --pipeline-id 6\nkenso pipelines propose --description "upsells and renewals for customers"\n```\n\n- **`create`** takes a unique `name`, the pipeline\'s `stages` in display order (at least one `open`, one `won` and one `lost`) and an optional `routingRule`: one sentence that says which deals belong there, which Ken reads to route a new deal that names no pipeline. Each stage gets a key from its label; a key another pipeline already uses gets the pipeline\'s name in front (`renewals_won`). A workspace has at most 10 pipelines.\n- **`update`** changes what you send. `stages` is the pipeline\'s whole stage list: read it with `pipelines get`, keep each stage\'s `key`, and add a new stage without one. A stage with live deals in it cannot be left out; archive it with `"isArchived": true` instead.\n- **`propose`** asks Ken to draft a pipeline from one sentence: a `name`, a `routingRule` and `stages`, in the shape `create` takes. It saves nothing. Read it, change what you want, and send it to `create`.\n- **`archive`** stops new deals from entering a pipeline and keeps the deals in it. The default pipeline cannot be archived, and nothing is deleted: `restore` brings a pipeline back.\n\n## Deals in a pipeline\n\nA deal\'s stage names its pipeline, and the deal\'s `pipelineId` repeats it. To work one pipeline\'s deals, or move a deal between pipelines:\n\n```bash\nkenso opportunities list --pipeline-id 6\nkenso opportunities search --pipeline-id 6 --data \'{"countBy": ["stage"]}\'\nkenso opportunities create --account-id 501 --pipeline-id 6\nkenso opportunities move 77 --pipeline 6\nkenso opportunities move 77 --pipeline 6 --stage negotiating\n```\n\n- **`create --pipeline-id`** opens the deal in that pipeline\'s first live open stage. Without it, and without a `stage`, Ken reads each pipeline\'s `routingRule` and opens the deal in the pipeline whose rule clearly fits the account, else in the default pipeline. A pipeline you name always wins.\n- **`move --pipeline`** alone keeps the deal\'s category (`open`, `won` or `lost`): it lands in that pipeline\'s live stage of the category with the same label as its stage now, else in the category\'s first live stage. The printed deal says where it landed. With `--stage`, the stage must be that pipeline\'s; the error lists the pipeline\'s stage keys otherwise.\n- An archived pipeline takes no deal from another pipeline (`pipeline_archived`). The deals already in it still move between its stages.\n- A move is a stage change: it writes the same history, and a stage a person set is refused with `pinned_by_user` unless you pass `--overwrite-pinned`.\n\n## Restore a deleted account\n\n```bash\nkenso deleted-accounts list\nkenso accounts restore --account-id 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 --account-id <id>` brings the account back with its domains, its people, its deals and its planned touches, which wait for approval again. Its Studio pages, committee seats and Knowledge facts do not come back: the delete purged them. 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## Import a CSV export of another CRM\n\n```bash\nkenso import accounts companies.csv\nkenso import accounts companies.csv --map "Company=name" --map "Notes=" --yes\nkenso import accounts --id 42 --yes\nkenso record-import-rows list --import-id 42 --outcome skipped\nkenso record-imports undo --import-id 42\n```\n\n`kenso import accounts <file.csv>` uploads the file (a header row, at most 50,000 rows) and prints Kenso\'s plan: which field each column fills, which columns it skips, how owner and stage values are read (`valueMaps`) and what it could not settle (`questions`). Headers of Kenso, Twenty, HubSpot, Attio and Salesforce exports are recognized. Nothing is written to your accounts yet. `--map "Header=field"` changes a column and `--map "Header="` skips it. A column fills a custom field with `--map "Header=custom.<key>"` (`kenso fields list --object account` has the keys; people are `person`, deals `opportunity`), and `--map "Header=new"` adds the custom field Kenso proposes for a column no field matches (`new:text` picks the type), and a column whose header is a custom field\'s label is mapped to it already; owner and stage values change with `kenso record-imports update --import-id <id>`.\n\nWith `--yes` the import starts and the command waits for it (`--timeout`, default 30m; the import keeps running on the server either way), then prints how many rows were created, updated, restored, left unchanged and skipped. Without `--yes` it stops at the plan and prints the command that starts that import (`--id <importId> --yes`), so the file is uploaded once. `--dry-run` sends nothing: with a file it prints the upload it would make, since the plan needs the upload, and with `--id` it reads the planned import and prints what `--map`, `--source` and `--research` would change on it. `--source twenty` names the system the file\'s record ids come from: pass the same one for every file of an export, so the people and deals files find the accounts by their old ids. `kenso record-imports delete --import-id <id>` discards an import that was planned and never started; one left planned for 30 days is discarded by itself.\n\nPer row: a domain no account has creates an account; a domain that is already an account fills only that account\'s empty fields, so nothing you entered is overwritten; an account deleted in the last 30 days is restored; a row with no usable domain is skipped, and `kenso record-import-rows list --import-id <id> --outcome skipped` says why. Research of new accounts is off unless you pass `--research`, which is charged per account. It needs the `accounts` and `crm_import_export` flags. This is a different command from `accounts import`, which creates accounts row by row from the machine running the CLI.\n\n`kenso record-imports undo --import-id <id>` takes a finished import back in the background (`kenso record-imports get --import-id <id>` reads `undoing`, then `undone`): an account the import created is deleted, and can be restored for 30 days, unless someone changed it since, it holds a deal, a person was added to it since, or it was merged; a field the import filled is emptied while it still holds the imported value. `kenso record-import-rows list --import-id <id>` shows each row\'s `undoOutcome`.\n\n`kenso import people <file.csv>` works the same way for people. Import the accounts file first: a people row\'s company id (Twenty\'s `Company Id`, HubSpot\'s associated company id) places the person on the account that kept that id, and without one the person goes on the account that holds their email\'s or company\'s domain. A people import never creates an account; a person whose company is no account comes in without one and the row says so. A row matches a person by email, then LinkedIn URL, then name on the company, as every other way into People does; a matched person gets only their empty fields filled (a phone only when they have none). A row with none of the three is skipped, and a row with only a name needs a company that is an account with a domain. `kenso record-imports undo --import-id <id>` takes a people import back too: a person it created leaves the accounts the row placed them on and is deleted, unless someone changed them since, they were contacted or have a touch planned, or they are on an open deal; a field it filled is emptied while it still holds the imported value. `kenso people import` stays the JSONL and enrichment path (`--find-emails`); `kenso import people` is the CRM file with a plan, a row report and one approval.\n\n`kenso import deals <file.csv>` works the same way for deals, after the accounts file and the people file. A row opens a deal on the account that kept its company id (Twenty\'s `Company Id`, HubSpot\'s associated company id), else on the account that holds its company domain; a row whose account Kenso does not know is skipped and says so. Its contact is the person a people import kept the row\'s contact id for (Twenty\'s `Point of Contact Id`). The plan maps each stage in the file to one of the workspace\'s deal stages (`valueMaps`, field `stage`): a stage\'s key or label matches by itself, Closed Won and Closed Lost go to the first won and lost stage, and a value with no match opens in the first open stage until you pick one with `kenso record-imports update`. Amounts stay in the workspace currency: an amount in another currency is left out with a warning, never converted. A row whose deal id an earlier import kept is that deal and only gets its empty fields filled. A row no id names a deal for is the one live deal on its account with its name and its contact (a side with no contact matches any) that is open, won or lost as the row is: it fills that deal\'s empty fields and keeps the row\'s id for it, and a row that matches two such deals is skipped and names them. A file with no id column is matched that way only, and the plan says so (`no_source_id`). `kenso record-imports undo --import-id <id>` takes a deals import back: a deal it opened is deleted unless someone changed it since, and a field it filled is emptied while it still holds the imported value. Undo in the reverse order of the imports (deals, then people, then accounts): an account that holds a deal is kept.\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 --view 40 --out pipeline.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 view of that object, your own or one shared with the workspace (`kenso views list --object account` shows the ids; people are `person`, deals `opportunity`): the file holds the rows the view lists, in its sort, so its row count is the view\'s count. `--filters`, `--where` (accounts), `--q` and `--sort` are the search operation\'s own fields; given with `--view`, each replaces that key of the view. 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## Duplicates and merges\n\n```bash\nkenso accounts duplicates --scan\nkenso accounts merge 812 --into 77 --dry-run\nkenso accounts merge 812 --into 77 --yes\nkenso accounts merges list --merged-by system\nkenso accounts merges 41\nkenso people merge 9 --into 7 --dry-run\nkenso people merge 9 --into 7 --yes\n```\n\nThese need the `crm_import_export` flag beside `accounts`. `accounts duplicates` lists the pairs of accounts that look like one company: both accounts, why they were paired (`reasons`: `domain`, `linkedin`, `name`) and `isCertain`, true when the two share the name and the domain apart from its ending (acme.com and acme.co). `--scan` compares every account first; a scan also runs after each accounts import. `--status dismissed` or `merged` shows the answered pairs. `kenso account-duplicates dismiss --duplicate-id <duplicateId>` answers that a pair is not a duplicate, for good.\n\n`accounts merge <accountId> --into <id>` merges the first account into the second, the one you keep. A merge cannot be undone, so look first: `--dry-run` prints `mergeSummary` (each field that changes with its value before and after, and how many people, deals, touches and domains move) and writes nothing. The merge itself needs `--yes` when no person is at the terminal. It answers the kept account with the same summary and a `mergeId`.\n\n`people merge <personId> --into <id>` merges the first person into the second, the one you keep, and needs only the `accounts` flag. The kept person keeps their own values and takes the other\'s for their blank fields, custom fields included; account places, deals, meetings, tasks, notes and captured email and meetings move to them. It cannot be undone either: `--dry-run` (which needs `crm_import_export`) prints the kept person with `mergeSummary`, the `fieldChanges` the merge would fill and `moved` (`accountCount`, `combinedAccountCount`, `opportunityCount`, `meetingCount`, `taskCount`, `noteCount`, `timelineEventCount`), and writes nothing. The merge itself needs `--yes` when no person is at the terminal. The same as the MCP\'s `people(operation="merge", dry_run=true)`.\n\n`accounts merges list` is the log, newest first, and `accounts merges <mergeId>` opens one merge with `mergedValues`: the merged-away account as it was. `--merged-by system` shows the merges Ken made itself. Where automatic merging is on for the workspace, Ken merges only certain pairs, keeps the customer, then the owned, then the last touched account, and leaves a pair for you when both are customers, the two have different owners, or one is being worked and the other is set aside (`heldReason` on the pair says which). That job is off unless it was turned on for the workspace.\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. The created entry of a deal a CSV import brought in has `imported: true`; one imported in a won or lost stage entered it on its file\'s close date, which is its `enteredAt`. 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## Notes on accounts, people and deals\n\nWith the `record_notes` feature on, everyone who can see a record reads its notes. Name the record with exactly one of `--account`, `--person` and `--deal`:\n\n```bash\nkenso notes list --account 5\nkenso notes list --account 5 --related # with the notes on its deals and people\nkenso notes list --parent 900 # every comment under note 900, oldest first\nkenso notes add --account 5 --body \'Budget approved, @[Jane Doe](41) please send the DPA\'\nkenso notes add --parent 900 --body \'Sent it this morning\' # a comment under note 900\ncat call-notes.md | kenso notes add --deal 77 --body - # the body from stdin\nkenso notes edit 900 --body \'Budget approved for Q1\' # the author only\nkenso notes edit 900 --pin\nkenso notes delete 900 --yes # kenso notes restore --note-id 900 brings it back\n```\n\n`notes list` prints each note with its first 50 comments; when `commentCount` is higher, `notes list --parent <noteId>` reads them all. The body is markdown, up to 20,000 characters. Mention a teammate as `@[Name](memberId)`: they get a notification that opens the note. A note shows on the record\'s Notes tab and its Activity timeline, and Ken\'s account brief quotes the notes on the account, its deals and its people (`notes list --account <id> --related` reads the same). The MCP\'s `notes` tool does the same. A note on an account needs the accounts plan feature; people and deals work on every plan.\n\n## Required fields per stage\n\n```bash\nkenso pipelines stage-rules\nkenso pipelines stage-rules --pipeline 6\nkenso pipelines stage-rules proposal --require amount,closeDate,custom.tier --dry-run\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. Without `--pipeline` the list is the default pipeline\'s stages; `--pipeline <id>` lists that pipeline\'s. A stage key is unique across pipelines, so a stage of any pipeline is set by its key, and with `--pipeline` the command first checks the stage is that pipeline\'s. 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```bash\nkenso opportunities update --opportunity-id 4401 --stage proposal\nkenso opportunities list --missing-fields\n```\n\nEvery deal then carries `missingFields` (`[{field, label}]`). A create, or an update that sends a stage, answers `warnings` beside the deal for each field the stage asks for that the deal leaves empty: each prints on stderr as `warning: <message>`, stdout stays the deal and the exit code stays 0. `--missing-fields` keeps only the deals flagged Missing (also `missingFields: true` on `kenso opportunities search`).\n\n## Won and lost reasons\n\n```bash\nkenso opportunity-reasons get\nkenso opportunity-reasons replace --kind lost --data \'{"reasons":[{"key":"no_budget","label":"No budget"},{"label":"Built it in-house"}]}\'\nkenso opportunities move 4401 --stage lost --reason built_it_in_house\n```\n\n`kenso opportunities move <id> --stage <key> [--reason <key>]` sends the reason as `lostReasonKey` for a lost stage or `wonReasonKey` for a won stage; an open stage takes none. Each field the new stage asks for that the deal leaves empty prints a warning on stderr, and the move still goes through.\n\nWith the `deal_stage_rules` flag on, each workspace edits why its deals are lost and won. `get` prints `lost` and `won`, each `{isDefault, reasons: [{key, label, isArchived}]}`. `replace` takes a kind\'s whole list in order, as `get` prints it: keep a reason by its `key`, leave `key` out for a new one, and set `isArchived` to archive a reason or bring one back. A reason left out is archived too: deals keep it, and no write can pick it again. At least one reason stays live and at most 30, and labels stay unique, archived ones included. A deal takes a live key in `lostReasonKey` (a lost stage) or `wonReasonKey` (a won stage). A move to Lost without a reason still goes through, with a warning and "Missing: Lost reason" on the deal. Editing the lists needs the `workspace_settings` permission. The same as the MCP\'s `pipelines(operation="reasons-get")` and `reasons-replace`.\n\n## Record page layouts\n\n```bash\nkenso layouts show account\nkenso layouts set account --header tier,ownerMemberId,score,custom.arr\nkenso layouts show account > layout.json && kenso layouts set account --data @layout.json\nkenso layouts reset account --dry-run\nkenso layouts reset account --yes\n```\n\nWith the `record_layout` flag on, a workspace lays out each record page once, for every member: `account`, `person` or `opportunity` (a deal). `show` prints `GET /v1/record-layouts/{object}`: `isDefault`, `version`, `headerFields` (up to 6, pinned under the record\'s name), `railSections` (`{name, fields}`), `hiddenFields` (under the rail\'s More), `sections` (`{key, label, placement, locked, hidden}`, in page order) and `availableFields`. Field keys are the field catalog\'s (`ownerMemberId`, `closeDate`, `primaryDomain`); a custom field is `custom.<field_key>`, and a new one joins the last rail section.\n\n`set --header` pins up to 6 fields and keeps the rest of the saved layout; the fields it unpins go to the top of the first rail section. `set --data` saves a whole layout, so group the rail into sections or hide a section that way, starting from `show`. A save made after someone else\'s answers a conflict: show it again. `reset` puts the page back to Kenso\'s default for every member, so it needs `--yes` (save the layout with `show` first). `set` and `reset` print the request with `--dry-run` and change nothing. Saving needs the `workspace_settings` permission, and the account page also needs the `accounts` plan. The same as the MCP\'s `account_views` operations `record-layouts-get`, `record-layouts-replace` and `record-layouts-reset`.\n\n## Pin a saved view\n\n```bash\nkenso views pin 118\nkenso views unpin 118\n```\n\nWith the `shared_views` flag on, `views pin` adds a saved view to your own sidebar, nested under its list (an account view under Accounts, a person view under People, a deal view under Deals). It is `kenso pins add --kind view --view-id <viewId>` under the name you would try: it prints the pin, and a view already pinned answers the pin it has. Pins are yours alone: pinning a shared view does not pin it for a teammate. `views unpin` finds your pin of the view and removes it, and prints `{"viewId": ..., "removed": true}`; a view you had not pinned prints `removed: false` and changes nothing. The view itself stays either way. `kenso pins list` shows every pin you have.\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 with its offset (`2026-11-20T15:00:00Z`); `--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. When one fails, its error names the tasks before it, which are already changed. `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 the app path in `href` (null for a task, which opens in its panel).\n- `tasks list`, `get`, `update`, `delete`, `restore` and `task-queue list` are generated from the API: `kenso tasks --help` lists them.\n\n## Custom fields\n\n```bash\nkenso fields list --object account\nkenso fields create --object account --type select --label Region --data \'{"options":["EMEA","North America"]}\' --dry-run\nkenso fields create --object account --type select --label Region --data \'{"options":["EMEA","North America"]}\'\nkenso fields update --field-id 412 --label "Sales region"\nkenso fields archive --field-id 412 --yes\n```\n\nWith the `custom_fields` flag on, each workspace adds its own fields to accounts, people and deals (`--object account`, `person` or `opportunity`). `fields list` prints the built-in and custom fields; a custom field is `custom.<key>`, the name `customFields`, `bulk-update --set`, stage rules, layouts and imports use. Run it before you add a field that may already exist.\n\n- **`create`** takes `--object`, `--type` (`text`, `number`, `boolean`, `date`, `json`, `select`, `multi_select`, `currency`, `url` or `user`; fixed once created) and `--label`. `--key` is made from the label when you leave it out ("Contract value" is `contract_value`). `--description` says what the field means; Ken reads it when it fills the field. A select or multi_select takes its choices in `--data` as `options`, each a label or `{label, color, key}`, up to 200.\n- **`update`** changes the label, the description or the options. `options` in `--data` is the whole list: keep an option by its `key`, and one you leave out is archived, never deleted, so the records that hold it keep it.\n- **`archive`** hides a field from the pickers, the columns and the record rail and keeps every value, so it asks for `--yes`. `kenso fields update --field-id 412 --no-is-archived` brings it back. An object holds at most 100 live custom fields.\n\n## Field-fill settings and Ken\'s suggestions\n\n```bash\nkenso field-fill-settings list\nkenso field-fill-settings update --object opportunity --field amount --mode suggest --instruction "Budget the buyer named, in USD"\nkenso suggestions list --account-id 812\nkenso suggestions approve --suggestion-id 31\nkenso suggestions reject --suggestion-id 32 --reason "That was last year\'s budget"\nkenso fields fill --object opportunity --field nextStep --all\n```\n\nWith the `ken_field_fill` flag on, Ken reads email, calls and meetings and fills record fields. `field-fill-settings list` shows each field Ken can fill with its `mode`: `default` (Ken fills an empty field and suggests a change to a filled one), `off`, `suggest` (every value waits for a person) or `auto`. `update` sets a field\'s mode and an `--instruction` of up to 500 characters that tells Ken what to look for. A new mode applies to the next email, call or meeting Ken reads.\n\nA value that waits for a person is a suggestion: the field, its value now (`from`), Ken\'s value (`to`), the quote and its source. `suggestions list` shows the pending ones; narrow it with `--status`, `--object` and `--record-id` (one record), `--account-id` (the account, its people and its deals) or `--meeting-id`. `approve` writes Ken\'s value to the record (`--data \'{"value": ...}\'` writes yours instead) and `reject` leaves the record as it is. Both are a person\'s call: run them on the user\'s word.\n\n`fields fill` fills one deal field for the deals that have none, from their recorded meetings and captured email. As written above it only answers how many deals have no value and what filling them costs, and starts nothing; `--no-body-dry-run` starts it. It needs `bulk_edit` too, and works on deal fields only.\n\n## Saved views\n\n```bash\nkenso views list --object account\nkenso views create --object account --name "Tier 1, no meeting in 30 days" --visibility workspace --data @view.json --dry-run\nkenso views run --view-id 140 --limit 100 --include-total\nkenso views update --view-id 140 --name "Tier 1, quiet for 30 days"\nkenso views delete --view-id 140 --yes\n```\n\nWith the `shared_views` flag on, a saved view is a name, its object\'s search `filter` and `sort`, `columns` and a `layout` (`list` or `board`), private to its maker or shared with the workspace (`--visibility workspace`). `view.json` holds `filter` and `sort` in the shape the object\'s search takes (`filters`, `where`, `q`), so try it with `kenso accounts search --data` first. `views list` shows the workspace\'s shared views and your private ones. `run` lists a view\'s records exactly as its object\'s search returns them, page by page. `update` changes what you send, and `filter` replaces the whole filter. Any member changes or deletes a shared view, but only its maker makes it private. `delete` asks for `--yes` and takes the view off every member\'s sidebar. `kenso views pin` (above) pins one.\n\n## Reports and dashboards\n\n```bash\nkenso reports summary\nkenso reports list\nkenso reports run won_by_month --period this_year --owner 41\nkenso reports query --data \'{"measures":[{"op":"sum","field":"amount"}],"dimensions":[{"field":"stage"}]}\'\nkenso dashboards create --name "Q4 pipeline" --visibility workspace\nkenso dashboards add-chart --dashboard-id 3 --title "Won by month" --data \'{"report":{"key":"won_by_month","period":"this_year"}}\'\n```\n\nWith the `opportunities` and `reports` flags on, reports count and sum your deals. `reports summary` prints where the period stands (closed won, open pipeline, weighted pipeline, win rate) and what needs you, then one row per stock report. `reports run <report>` prints one stock report as a table: `pipeline_by_stage`, `won_by_month`, `stage_conversion`, `time_in_stage`, `won_by_source_campaign` or `activity_by_member`. Each takes `--period` (`this_quarter` by default, a month such as `2026-03`, a quarter, a year or a day range), `--owner` and `--pipeline`, and `--full` prints the whole answer with each bucket\'s filter for `opportunities search`.\n\n`reports query` asks your own question: `measures` (1 to 4 of `count`, `sum`, `avg` or `weighted_sum` of `amount`), `dimensions` (up to 2 of `stage`, `stageCategory`, `ownerMemberId`, `sourceCampaignId`, `closedAt`, `createdAt` or `closeDate`, the dates by `month`, `quarter` or `year`) and a `filter` as `opportunities search` takes it. It only reads.\n\nA dashboard keeps charts, up to 12, private to its owner or shared with the workspace. A chart is a stock report (`report`: its `key`, `period`, `ownerMemberId`, `pipelineId`) or a `query`, drawn as `bars` or a `trend`. `dashboards get --dashboard-id 3` reads one, and `update`, `remove-chart` and `delete` change it (the last two ask for `--yes`).\n\n## Forecast and quotas\n\n```bash\nkenso forecast show --period 2026-Q4\nkenso forecast show --period 2026-11 --include-deals\nkenso quotas list --period 2026-Q4\nkenso quotas propose --period 2027-Q1 --uplift-percent 15\nkenso quotas propose --period 2027-Q1 --uplift-percent 15 --apply\nkenso quotas set --period 2027-Q1 --member-id 41 --amount 120000\n```\n\nWith the `opportunities` and `forecast` flags on, `forecast show` reads closed won, commit and best case for a quarter (`2026-Q4`) or a month (`2026-11`), per member and for the team, each against its quota. Without `--period` it reads the current quarter. `--include-deals` adds the deals it counted. `quotas propose` works out each member\'s quota from what they closed won in the quarter before the period (or the last quarter that has ended) plus `--uplift-percent` (0 to 200, default 15), and writes nothing; with `--apply` it saves those amounts. `quotas set` sets one member\'s quota in the workspace currency, and `--data \'{"memberId":41,"amount":null}\'` removes it.\n';
|
|
8872
8872
|
}
|
|
8873
8873
|
});
|
|
8874
8874
|
|
|
@@ -10060,8 +10060,8 @@ var init_browser_login = __esm({
|
|
|
10060
10060
|
defaultDeps = {
|
|
10061
10061
|
sleep: (ms, signal) => delay5(ms, void 0, signal ? { signal } : void 0),
|
|
10062
10062
|
now: () => Date.now(),
|
|
10063
|
-
spawn: (
|
|
10064
|
-
const child = nodeSpawn(
|
|
10063
|
+
spawn: (command70, args) => {
|
|
10064
|
+
const child = nodeSpawn(command70, args, { detached: true, stdio: "ignore" });
|
|
10065
10065
|
child.on("error", () => {
|
|
10066
10066
|
});
|
|
10067
10067
|
child.unref();
|
|
@@ -11362,8 +11362,8 @@ var init_run = __esm({
|
|
|
11362
11362
|
defaultDeps2 = {
|
|
11363
11363
|
sleep: (ms, signal) => delay6(ms, void 0, signal ? { signal } : void 0),
|
|
11364
11364
|
now: () => Date.now(),
|
|
11365
|
-
spawn: (
|
|
11366
|
-
const child = nodeSpawn2(
|
|
11365
|
+
spawn: (command70, args) => {
|
|
11366
|
+
const child = nodeSpawn2(command70, args, { detached: true, stdio: "ignore" });
|
|
11367
11367
|
child.on("error", () => {
|
|
11368
11368
|
});
|
|
11369
11369
|
child.unref();
|
|
@@ -12265,7 +12265,7 @@ var init_update = __esm({
|
|
|
12265
12265
|
init_mapping();
|
|
12266
12266
|
COMMAND3 = "kenso contacts update";
|
|
12267
12267
|
CHUNK_SIZE3 = 1e3;
|
|
12268
|
-
PAGE_SIZE =
|
|
12268
|
+
PAGE_SIZE = 1e3;
|
|
12269
12269
|
command21 = {
|
|
12270
12270
|
resource: "contacts",
|
|
12271
12271
|
action: "update",
|
|
@@ -12349,12 +12349,12 @@ import { join as join13 } from "node:path";
|
|
|
12349
12349
|
function whereDir(env) {
|
|
12350
12350
|
return join13(runsRoot(env), WHERE_DIR);
|
|
12351
12351
|
}
|
|
12352
|
-
async function unfinishedWhereIds(ctx,
|
|
12352
|
+
async function unfinishedWhereIds(ctx, command70, args) {
|
|
12353
12353
|
const dir2 = whereDir(ctx.env);
|
|
12354
12354
|
const identity = argsIdentity(args);
|
|
12355
12355
|
const workspaceId = ctx.client.workspaceId ?? ctx.auth.workspaceId;
|
|
12356
12356
|
for (const run of await listRuns(ctx.env)) {
|
|
12357
|
-
if (run.command !==
|
|
12357
|
+
if (run.command !== command70 || run.status === "done" || run.status === "planned") continue;
|
|
12358
12358
|
if ((run.workspaceId || void 0) !== (workspaceId || void 0) || argsIdentity(run.args) !== identity) continue;
|
|
12359
12359
|
if (run.inputPath?.startsWith(`${dir2}/`) && existsSync6(run.inputPath)) return run.inputPath;
|
|
12360
12360
|
}
|
|
@@ -12500,14 +12500,14 @@ async function idsFromRun(ctx, runId) {
|
|
|
12500
12500
|
return { ...idItems(ids2), source: "run" };
|
|
12501
12501
|
}
|
|
12502
12502
|
async function collectIds(ctx, flags, kind, dryRun2) {
|
|
12503
|
-
const
|
|
12503
|
+
const command70 = `kenso contacts ${kind}`;
|
|
12504
12504
|
const ids2 = stringFlag2(flags, "ids");
|
|
12505
12505
|
const where = kind === "restore" ? void 0 : stringFlag2(flags, "where");
|
|
12506
12506
|
const run = kind === "restore" ? stringFlag2(flags, "run") : void 0;
|
|
12507
12507
|
const given = [ids2, where, run].filter((v) => v !== void 0).length;
|
|
12508
12508
|
if (given !== 1) {
|
|
12509
12509
|
const choices = kind === "restore" ? "--ids <file|-> or --run <runId>" : "--ids <file|-> or --where '<json>'";
|
|
12510
|
-
throw usageError(`${
|
|
12510
|
+
throw usageError(`${command70} needs exactly one of ${choices}.`, { field: "ids", next: `${command70} --help` });
|
|
12511
12511
|
}
|
|
12512
12512
|
if (ids2 !== void 0) return idsFromFile(ctx, ids2);
|
|
12513
12513
|
if (where !== void 0) return idsFromWhere(ctx, kind, flags, where, dryRun2);
|
|
@@ -14279,22 +14279,38 @@ var command32, list_default;
|
|
|
14279
14279
|
var init_list = __esm({
|
|
14280
14280
|
"src/commands/notes/list.ts"() {
|
|
14281
14281
|
"use strict";
|
|
14282
|
+
init_errors();
|
|
14282
14283
|
init_exit_codes();
|
|
14283
14284
|
init_target();
|
|
14284
14285
|
command32 = {
|
|
14285
14286
|
resource: "notes",
|
|
14286
14287
|
action: "list",
|
|
14287
|
-
summary: "List the notes on an account, a person or a deal,
|
|
14288
|
-
description: "Reads GET /v1/notes for the one record you name and follows every page. Each note has id, body (markdown, mentions as @[Name](memberId)), mentions, isPinned, createdBy, createdAt, editedAt, commentCount and its first 50 comments, oldest first. A record outside your workspace or account scope is not_found.",
|
|
14289
|
-
flags:
|
|
14288
|
+
summary: "List the notes on an account, a person or a deal, or every comment under one note",
|
|
14289
|
+
description: "Reads GET /v1/notes for the one record you name and follows every page. Each note has id, body (markdown, mentions as @[Name](memberId)), mentions, isPinned, createdBy, createdAt, editedAt, commentCount and its first 50 comments, oldest first. When commentCount is above 50, --parent <noteId> (alone, no record flag) lists every comment under that note, oldest first. --account with --related adds the notes on the account's deals and on the people with a role on it, each naming its own record. A record or note outside your workspace or account scope is not_found.",
|
|
14290
|
+
flags: {
|
|
14291
|
+
...targetFlags,
|
|
14292
|
+
parent: { type: "string", description: "A note id: list its comments (instead of a record flag)" },
|
|
14293
|
+
related: { type: "boolean", description: "With --account: also the notes on its deals and people" }
|
|
14294
|
+
},
|
|
14290
14295
|
examples: [
|
|
14291
14296
|
"kenso notes list --account 5",
|
|
14297
|
+
"kenso notes list --account 5 --related",
|
|
14298
|
+
"kenso notes list --parent 900",
|
|
14292
14299
|
"kenso notes list --deal 77 --query '[].{id: id, by: createdBy.name, body: body}'"
|
|
14293
14300
|
],
|
|
14294
14301
|
beta: { featureGates: { all: ["record_notes"] } },
|
|
14295
14302
|
operationIds: ["notes.list"],
|
|
14296
14303
|
async run(ctx, { flags }) {
|
|
14297
|
-
const
|
|
14304
|
+
const next = "kenso notes list --account <accountId>";
|
|
14305
|
+
const note = flags.parent;
|
|
14306
|
+
const record3 = target(flags, next, note !== void 0);
|
|
14307
|
+
if (note !== void 0 && Object.keys(record3).length > 0) {
|
|
14308
|
+
throw usageError("--parent goes alone: its note decides the record.", { field: "parent", next });
|
|
14309
|
+
}
|
|
14310
|
+
if (flags.related === true && record3.accountId === void 0) {
|
|
14311
|
+
throw usageError("--related goes with --account: it adds the notes on the account's deals and people.", { field: "related", next });
|
|
14312
|
+
}
|
|
14313
|
+
const query = note === void 0 ? { ...record3, ...flags.related === true ? { includeRelated: "true" } : {} } : { parentNoteId: positiveId2(note, "parent", next) };
|
|
14298
14314
|
await ctx.output.list(ctx.client.paginate({ method: "GET", path: "/v1/notes", query, signal: ctx.signal }));
|
|
14299
14315
|
return ExitCode.Ok;
|
|
14300
14316
|
}
|
|
@@ -14892,6 +14908,70 @@ var init_bulk_delete3 = __esm({
|
|
|
14892
14908
|
}
|
|
14893
14909
|
});
|
|
14894
14910
|
|
|
14911
|
+
// src/commands/people/merge.ts
|
|
14912
|
+
var merge_exports2 = {};
|
|
14913
|
+
__export(merge_exports2, {
|
|
14914
|
+
default: () => merge_default2
|
|
14915
|
+
});
|
|
14916
|
+
var command39, merge_default2;
|
|
14917
|
+
var init_merge2 = __esm({
|
|
14918
|
+
"src/commands/people/merge.ts"() {
|
|
14919
|
+
"use strict";
|
|
14920
|
+
init_confirm();
|
|
14921
|
+
init_errors();
|
|
14922
|
+
init_exit_codes();
|
|
14923
|
+
init_http();
|
|
14924
|
+
init_common();
|
|
14925
|
+
command39 = {
|
|
14926
|
+
resource: "people",
|
|
14927
|
+
action: "merge",
|
|
14928
|
+
summary: "Merge a person into the one you keep. --dry-run shows what would move and writes nothing",
|
|
14929
|
+
description: "Sends POST /v1/people/{personId}/merge with intoPersonId, the person to keep. The kept person keeps every value they have and takes the merged person's values for their blank fields, custom fields included; account places, deals, meetings, tasks, notes and captured email and meetings move to them. A merge cannot be undone. With --dry-run the API runs the merge, answers the kept person with mergeSummary (fieldChanges the merge would fill, and moved: accountCount, combinedAccountCount, opportunityCount, meetingCount, taskCount, noteCount, timelineEventCount) and rolls it back: nothing is written. The dry run needs the crm_import_export flag.",
|
|
14930
|
+
flags: {
|
|
14931
|
+
into: { type: "string", description: "The id of the person to keep" },
|
|
14932
|
+
"into-person-id": { type: "string", description: "Same as --into" }
|
|
14933
|
+
},
|
|
14934
|
+
positionals: [{ name: "personId", required: true, description: "The person who is merged away" }],
|
|
14935
|
+
examples: ["kenso people merge 9 --into 7 --dry-run", "kenso people merge 9 --into 7 --yes"],
|
|
14936
|
+
beta: { featureGates: { all: ["accounts"] } },
|
|
14937
|
+
operationIds: ["people.merge"],
|
|
14938
|
+
dryRun: true,
|
|
14939
|
+
async run(ctx, { flags, positionals }) {
|
|
14940
|
+
const personId = positiveId(positionals[0] ?? "");
|
|
14941
|
+
if (personId === void 0) {
|
|
14942
|
+
throw usageError(`personId must be a positive whole number (got "${positionals[0] ?? ""}").`, {
|
|
14943
|
+
field: "personId",
|
|
14944
|
+
next: "kenso people merge <personId> --into <id>"
|
|
14945
|
+
});
|
|
14946
|
+
}
|
|
14947
|
+
const raw = flags.into ?? flags["into-person-id"];
|
|
14948
|
+
const into = typeof raw === "string" ? positiveId(raw) : void 0;
|
|
14949
|
+
if (into === void 0) {
|
|
14950
|
+
throw usageError("--into is required: the id of the person to keep.", {
|
|
14951
|
+
field: "into",
|
|
14952
|
+
next: `kenso people merge ${personId} --into <id> --dry-run`
|
|
14953
|
+
});
|
|
14954
|
+
}
|
|
14955
|
+
const dryRun2 = ctx.flags.dryRun === true;
|
|
14956
|
+
await confirmDestructive(
|
|
14957
|
+
ctx,
|
|
14958
|
+
`Merging person ${personId} into person ${into} cannot be undone`,
|
|
14959
|
+
`kenso people merge ${personId} --into ${into} --yes`
|
|
14960
|
+
);
|
|
14961
|
+
const res = await ctx.client.request({
|
|
14962
|
+
method: "POST",
|
|
14963
|
+
path: `/v1/people/${personId}/merge`,
|
|
14964
|
+
body: dryRun2 ? { intoPersonId: into, dryRun: true } : { intoPersonId: into },
|
|
14965
|
+
signal: ctx.signal
|
|
14966
|
+
});
|
|
14967
|
+
ctx.output.object(unwrap(res.body));
|
|
14968
|
+
return ExitCode.Ok;
|
|
14969
|
+
}
|
|
14970
|
+
};
|
|
14971
|
+
merge_default2 = command39;
|
|
14972
|
+
}
|
|
14973
|
+
});
|
|
14974
|
+
|
|
14895
14975
|
// src/commands/people/index.ts
|
|
14896
14976
|
var actions21;
|
|
14897
14977
|
var init_people = __esm({
|
|
@@ -14900,7 +14980,9 @@ var init_people = __esm({
|
|
|
14900
14980
|
actions21 = {
|
|
14901
14981
|
import: () => Promise.resolve().then(() => (init_import5(), import_exports4)).then((m) => m.default),
|
|
14902
14982
|
"bulk-update": () => Promise.resolve().then(() => (init_bulk_update4(), bulk_update_exports3)).then((m) => m.default),
|
|
14903
|
-
"bulk-delete": () => Promise.resolve().then(() => (init_bulk_delete3(), bulk_delete_exports3)).then((m) => m.default)
|
|
14983
|
+
"bulk-delete": () => Promise.resolve().then(() => (init_bulk_delete3(), bulk_delete_exports3)).then((m) => m.default),
|
|
14984
|
+
// Replaces the generated people merge: its body's dryRun would collide with the global --dry-run (DEV-13286).
|
|
14985
|
+
merge: () => Promise.resolve().then(() => (init_merge2(), merge_exports2)).then((m) => m.default)
|
|
14904
14986
|
};
|
|
14905
14987
|
}
|
|
14906
14988
|
});
|
|
@@ -14924,7 +15006,7 @@ function rule(stage) {
|
|
|
14924
15006
|
isDefault: stage.isDefaultRequiredFields
|
|
14925
15007
|
};
|
|
14926
15008
|
}
|
|
14927
|
-
var ID2,
|
|
15009
|
+
var ID2, command40, stage_rules_default;
|
|
14928
15010
|
var init_stage_rules = __esm({
|
|
14929
15011
|
"src/commands/pipelines/stage-rules.ts"() {
|
|
14930
15012
|
"use strict";
|
|
@@ -14933,7 +15015,7 @@ var init_stage_rules = __esm({
|
|
|
14933
15015
|
init_exit_codes();
|
|
14934
15016
|
init_http();
|
|
14935
15017
|
ID2 = /^[1-9]\d*$/;
|
|
14936
|
-
|
|
15018
|
+
command40 = {
|
|
14937
15019
|
resource: "pipelines",
|
|
14938
15020
|
action: "stage-rules",
|
|
14939
15021
|
summary: "List or set the fields a deal should have in each stage",
|
|
@@ -15005,7 +15087,7 @@ var init_stage_rules = __esm({
|
|
|
15005
15087
|
return ExitCode.Ok;
|
|
15006
15088
|
}
|
|
15007
15089
|
};
|
|
15008
|
-
stage_rules_default =
|
|
15090
|
+
stage_rules_default = command40;
|
|
15009
15091
|
}
|
|
15010
15092
|
});
|
|
15011
15093
|
|
|
@@ -15025,7 +15107,7 @@ var run_exports2 = {};
|
|
|
15025
15107
|
__export(run_exports2, {
|
|
15026
15108
|
default: () => run_default
|
|
15027
15109
|
});
|
|
15028
|
-
var REPORTS,
|
|
15110
|
+
var REPORTS, command41, run_default;
|
|
15029
15111
|
var init_run2 = __esm({
|
|
15030
15112
|
"src/commands/reports/run.ts"() {
|
|
15031
15113
|
"use strict";
|
|
@@ -15033,7 +15115,7 @@ var init_run2 = __esm({
|
|
|
15033
15115
|
init_exit_codes();
|
|
15034
15116
|
init_http();
|
|
15035
15117
|
REPORTS = ["pipeline_by_stage", "won_by_month", "stage_conversion", "time_in_stage", "won_by_source_campaign", "activity_by_member"];
|
|
15036
|
-
|
|
15118
|
+
command41 = {
|
|
15037
15119
|
resource: "reports",
|
|
15038
15120
|
action: "run",
|
|
15039
15121
|
summary: "Run a stock pipeline report and print its table",
|
|
@@ -15104,7 +15186,7 @@ var init_run2 = __esm({
|
|
|
15104
15186
|
return ExitCode.Ok;
|
|
15105
15187
|
}
|
|
15106
15188
|
};
|
|
15107
|
-
run_default =
|
|
15189
|
+
run_default = command41;
|
|
15108
15190
|
}
|
|
15109
15191
|
});
|
|
15110
15192
|
|
|
@@ -15113,14 +15195,14 @@ var summary_exports = {};
|
|
|
15113
15195
|
__export(summary_exports, {
|
|
15114
15196
|
default: () => summary_default
|
|
15115
15197
|
});
|
|
15116
|
-
var
|
|
15198
|
+
var command42, summary_default;
|
|
15117
15199
|
var init_summary = __esm({
|
|
15118
15200
|
"src/commands/reports/summary.ts"() {
|
|
15119
15201
|
"use strict";
|
|
15120
15202
|
init_errors();
|
|
15121
15203
|
init_exit_codes();
|
|
15122
15204
|
init_http();
|
|
15123
|
-
|
|
15205
|
+
command42 = {
|
|
15124
15206
|
resource: "reports",
|
|
15125
15207
|
action: "summary",
|
|
15126
15208
|
summary: "Read where the period stands and what needs you",
|
|
@@ -15181,7 +15263,7 @@ var init_summary = __esm({
|
|
|
15181
15263
|
return ExitCode.Ok;
|
|
15182
15264
|
}
|
|
15183
15265
|
};
|
|
15184
|
-
summary_default =
|
|
15266
|
+
summary_default = command42;
|
|
15185
15267
|
}
|
|
15186
15268
|
});
|
|
15187
15269
|
|
|
@@ -15202,14 +15284,14 @@ var list_exports2 = {};
|
|
|
15202
15284
|
__export(list_exports2, {
|
|
15203
15285
|
default: () => list_default2
|
|
15204
15286
|
});
|
|
15205
|
-
var
|
|
15287
|
+
var command43, list_default2;
|
|
15206
15288
|
var init_list2 = __esm({
|
|
15207
15289
|
"src/commands/runs/list.ts"() {
|
|
15208
15290
|
"use strict";
|
|
15209
15291
|
init_runs();
|
|
15210
15292
|
init_errors();
|
|
15211
15293
|
init_exit_codes();
|
|
15212
|
-
|
|
15294
|
+
command43 = {
|
|
15213
15295
|
resource: "runs",
|
|
15214
15296
|
action: "list",
|
|
15215
15297
|
summary: "List batch runs, newest first (finds an interrupted run)",
|
|
@@ -15230,7 +15312,7 @@ var init_list2 = __esm({
|
|
|
15230
15312
|
return ExitCode.Ok;
|
|
15231
15313
|
}
|
|
15232
15314
|
};
|
|
15233
|
-
list_default2 =
|
|
15315
|
+
list_default2 = command43;
|
|
15234
15316
|
}
|
|
15235
15317
|
});
|
|
15236
15318
|
|
|
@@ -15241,7 +15323,7 @@ __export(show_exports2, {
|
|
|
15241
15323
|
});
|
|
15242
15324
|
import { existsSync as existsSync7, readFileSync as readFileSync9 } from "node:fs";
|
|
15243
15325
|
import { join as join14 } from "node:path";
|
|
15244
|
-
var FILES,
|
|
15326
|
+
var FILES, command44, show_default2;
|
|
15245
15327
|
var init_show2 = __esm({
|
|
15246
15328
|
"src/commands/runs/show.ts"() {
|
|
15247
15329
|
"use strict";
|
|
@@ -15256,7 +15338,7 @@ var init_show2 = __esm({
|
|
|
15256
15338
|
["plan", "plan.json"],
|
|
15257
15339
|
["summary", "summary.json"]
|
|
15258
15340
|
];
|
|
15259
|
-
|
|
15341
|
+
command44 = {
|
|
15260
15342
|
resource: "runs",
|
|
15261
15343
|
action: "show",
|
|
15262
15344
|
summary: "Show one batch run and its files",
|
|
@@ -15283,7 +15365,7 @@ var init_show2 = __esm({
|
|
|
15283
15365
|
return ExitCode.Ok;
|
|
15284
15366
|
}
|
|
15285
15367
|
};
|
|
15286
|
-
show_default2 =
|
|
15368
|
+
show_default2 = command44;
|
|
15287
15369
|
}
|
|
15288
15370
|
});
|
|
15289
15371
|
|
|
@@ -15300,8 +15382,8 @@ import { resolve as resolve10 } from "node:path";
|
|
|
15300
15382
|
function kebab(key) {
|
|
15301
15383
|
return key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
15302
15384
|
}
|
|
15303
|
-
function commandWords(
|
|
15304
|
-
return
|
|
15385
|
+
function commandWords(command70) {
|
|
15386
|
+
return command70.trim().split(/\s+/).filter((t) => t !== "");
|
|
15305
15387
|
}
|
|
15306
15388
|
function flagValue(value) {
|
|
15307
15389
|
return typeof value === "string" ? value : typeof value === "object" ? JSON.stringify(value) : String(value);
|
|
@@ -15374,7 +15456,7 @@ async function refuseUnlessBatch(run, next) {
|
|
|
15374
15456
|
throw usageError(`Run ${run.runId} names flags kenso ${name} does not take (--${undeclared.join(", --")}), so it is not replayed.`, { next });
|
|
15375
15457
|
}
|
|
15376
15458
|
}
|
|
15377
|
-
var SKIPPED_KEYS,
|
|
15459
|
+
var SKIPPED_KEYS, command45, resume_default;
|
|
15378
15460
|
var init_resume = __esm({
|
|
15379
15461
|
"src/commands/runs/resume.ts"() {
|
|
15380
15462
|
"use strict";
|
|
@@ -15383,7 +15465,7 @@ var init_resume = __esm({
|
|
|
15383
15465
|
init_generated_hook();
|
|
15384
15466
|
init_registry();
|
|
15385
15467
|
SKIPPED_KEYS = /* @__PURE__ */ new Set(["positionals", "yes", "dryRun", "dry-run", "help", "version"]);
|
|
15386
|
-
|
|
15468
|
+
command45 = {
|
|
15387
15469
|
resource: "runs",
|
|
15388
15470
|
action: "resume",
|
|
15389
15471
|
summary: "Continue an interrupted batch run (its command with --yes, no dry run)",
|
|
@@ -15433,7 +15515,7 @@ var init_resume = __esm({
|
|
|
15433
15515
|
}
|
|
15434
15516
|
}
|
|
15435
15517
|
};
|
|
15436
|
-
resume_default =
|
|
15518
|
+
resume_default = command45;
|
|
15437
15519
|
}
|
|
15438
15520
|
});
|
|
15439
15521
|
|
|
@@ -15541,7 +15623,7 @@ var create_exports = {};
|
|
|
15541
15623
|
__export(create_exports, {
|
|
15542
15624
|
default: () => create_default
|
|
15543
15625
|
});
|
|
15544
|
-
var
|
|
15626
|
+
var command46, create_default;
|
|
15545
15627
|
var init_create = __esm({
|
|
15546
15628
|
"src/commands/sandbox/create.ts"() {
|
|
15547
15629
|
"use strict";
|
|
@@ -15549,7 +15631,7 @@ var init_create = __esm({
|
|
|
15549
15631
|
init_exit_codes();
|
|
15550
15632
|
init_http();
|
|
15551
15633
|
init_shared();
|
|
15552
|
-
|
|
15634
|
+
command46 = {
|
|
15553
15635
|
resource: "sandbox",
|
|
15554
15636
|
action: "create",
|
|
15555
15637
|
summary: "Create your developer sandbox and save its test key as the sandbox profile",
|
|
@@ -15591,7 +15673,7 @@ var init_create = __esm({
|
|
|
15591
15673
|
return ExitCode.Ok;
|
|
15592
15674
|
}
|
|
15593
15675
|
};
|
|
15594
|
-
create_default =
|
|
15676
|
+
create_default = command46;
|
|
15595
15677
|
}
|
|
15596
15678
|
});
|
|
15597
15679
|
|
|
@@ -15600,7 +15682,7 @@ var delete_exports2 = {};
|
|
|
15600
15682
|
__export(delete_exports2, {
|
|
15601
15683
|
default: () => delete_default2
|
|
15602
15684
|
});
|
|
15603
|
-
var
|
|
15685
|
+
var command47, delete_default2;
|
|
15604
15686
|
var init_delete2 = __esm({
|
|
15605
15687
|
"src/commands/sandbox/delete.ts"() {
|
|
15606
15688
|
"use strict";
|
|
@@ -15608,7 +15690,7 @@ var init_delete2 = __esm({
|
|
|
15608
15690
|
init_confirm();
|
|
15609
15691
|
init_exit_codes();
|
|
15610
15692
|
init_shared();
|
|
15611
|
-
|
|
15693
|
+
command47 = {
|
|
15612
15694
|
resource: "sandbox",
|
|
15613
15695
|
action: "delete",
|
|
15614
15696
|
summary: "Delete your sandbox and its test keys",
|
|
@@ -15635,7 +15717,7 @@ var init_delete2 = __esm({
|
|
|
15635
15717
|
return ExitCode.Ok;
|
|
15636
15718
|
}
|
|
15637
15719
|
};
|
|
15638
|
-
delete_default2 =
|
|
15720
|
+
delete_default2 = command47;
|
|
15639
15721
|
}
|
|
15640
15722
|
});
|
|
15641
15723
|
|
|
@@ -15644,14 +15726,14 @@ var key_exports = {};
|
|
|
15644
15726
|
__export(key_exports, {
|
|
15645
15727
|
default: () => key_default
|
|
15646
15728
|
});
|
|
15647
|
-
var
|
|
15729
|
+
var command48, key_default;
|
|
15648
15730
|
var init_key = __esm({
|
|
15649
15731
|
"src/commands/sandbox/key.ts"() {
|
|
15650
15732
|
"use strict";
|
|
15651
15733
|
init_exit_codes();
|
|
15652
15734
|
init_http();
|
|
15653
15735
|
init_shared();
|
|
15654
|
-
|
|
15736
|
+
command48 = {
|
|
15655
15737
|
resource: "sandbox",
|
|
15656
15738
|
action: "key",
|
|
15657
15739
|
summary: "Create a new test key for your sandbox and save it as the sandbox profile",
|
|
@@ -15671,7 +15753,7 @@ var init_key = __esm({
|
|
|
15671
15753
|
return ExitCode.Ok;
|
|
15672
15754
|
}
|
|
15673
15755
|
};
|
|
15674
|
-
key_default =
|
|
15756
|
+
key_default = command48;
|
|
15675
15757
|
}
|
|
15676
15758
|
});
|
|
15677
15759
|
|
|
@@ -15680,13 +15762,13 @@ var list_exports3 = {};
|
|
|
15680
15762
|
__export(list_exports3, {
|
|
15681
15763
|
default: () => list_default3
|
|
15682
15764
|
});
|
|
15683
|
-
var
|
|
15765
|
+
var command49, list_default3;
|
|
15684
15766
|
var init_list3 = __esm({
|
|
15685
15767
|
"src/commands/sandbox/list.ts"() {
|
|
15686
15768
|
"use strict";
|
|
15687
15769
|
init_exit_codes();
|
|
15688
15770
|
init_shared();
|
|
15689
|
-
|
|
15771
|
+
command49 = {
|
|
15690
15772
|
resource: "sandbox",
|
|
15691
15773
|
action: "list",
|
|
15692
15774
|
summary: "List your developer sandbox",
|
|
@@ -15702,7 +15784,7 @@ var init_list3 = __esm({
|
|
|
15702
15784
|
return ExitCode.Ok;
|
|
15703
15785
|
}
|
|
15704
15786
|
};
|
|
15705
|
-
list_default3 =
|
|
15787
|
+
list_default3 = command49;
|
|
15706
15788
|
}
|
|
15707
15789
|
});
|
|
15708
15790
|
|
|
@@ -15711,14 +15793,14 @@ var reset_exports = {};
|
|
|
15711
15793
|
__export(reset_exports, {
|
|
15712
15794
|
default: () => reset_default
|
|
15713
15795
|
});
|
|
15714
|
-
var
|
|
15796
|
+
var command50, reset_default;
|
|
15715
15797
|
var init_reset = __esm({
|
|
15716
15798
|
"src/commands/sandbox/reset.ts"() {
|
|
15717
15799
|
"use strict";
|
|
15718
15800
|
init_exit_codes();
|
|
15719
15801
|
init_http();
|
|
15720
15802
|
init_shared();
|
|
15721
|
-
|
|
15803
|
+
command50 = {
|
|
15722
15804
|
resource: "sandbox",
|
|
15723
15805
|
action: "reset",
|
|
15724
15806
|
summary: "Reset your sandbox to its seed data",
|
|
@@ -15736,7 +15818,7 @@ var init_reset = __esm({
|
|
|
15736
15818
|
return ExitCode.Ok;
|
|
15737
15819
|
}
|
|
15738
15820
|
};
|
|
15739
|
-
reset_default =
|
|
15821
|
+
reset_default = command50;
|
|
15740
15822
|
}
|
|
15741
15823
|
});
|
|
15742
15824
|
|
|
@@ -16035,7 +16117,7 @@ __export(pull_exports, {
|
|
|
16035
16117
|
});
|
|
16036
16118
|
import { mkdir, readFile as readFile11, writeFile as writeFile5 } from "node:fs/promises";
|
|
16037
16119
|
import { dirname as dirname2, join as join16, resolve as resolve12 } from "node:path";
|
|
16038
|
-
var
|
|
16120
|
+
var command51, pull_default;
|
|
16039
16121
|
var init_pull = __esm({
|
|
16040
16122
|
"src/commands/studio/pull.ts"() {
|
|
16041
16123
|
"use strict";
|
|
@@ -16046,7 +16128,7 @@ var init_pull = __esm({
|
|
|
16046
16128
|
init_common3();
|
|
16047
16129
|
init_folder();
|
|
16048
16130
|
init_transfer2();
|
|
16049
|
-
|
|
16131
|
+
command51 = {
|
|
16050
16132
|
resource: "studio",
|
|
16051
16133
|
action: "pull",
|
|
16052
16134
|
summary: "Write a template version's files to a folder",
|
|
@@ -16124,7 +16206,7 @@ var init_pull = __esm({
|
|
|
16124
16206
|
return ExitCode.Ok;
|
|
16125
16207
|
}
|
|
16126
16208
|
};
|
|
16127
|
-
pull_default =
|
|
16209
|
+
pull_default = command51;
|
|
16128
16210
|
}
|
|
16129
16211
|
});
|
|
16130
16212
|
|
|
@@ -16158,7 +16240,7 @@ __export(push_exports, {
|
|
|
16158
16240
|
default: () => push_default
|
|
16159
16241
|
});
|
|
16160
16242
|
import { resolve as resolve13 } from "node:path";
|
|
16161
|
-
var BUILT_BY, DEFAULT_MESSAGE,
|
|
16243
|
+
var BUILT_BY, DEFAULT_MESSAGE, command52, push_default;
|
|
16162
16244
|
var init_push = __esm({
|
|
16163
16245
|
"src/commands/studio/push.ts"() {
|
|
16164
16246
|
"use strict";
|
|
@@ -16172,7 +16254,7 @@ var init_push = __esm({
|
|
|
16172
16254
|
init_transfer2();
|
|
16173
16255
|
BUILT_BY = "customer_agent";
|
|
16174
16256
|
DEFAULT_MESSAGE = "Pushed with the Kenso CLI";
|
|
16175
|
-
|
|
16257
|
+
command52 = {
|
|
16176
16258
|
resource: "studio",
|
|
16177
16259
|
action: "push",
|
|
16178
16260
|
summary: "Save a folder's files to a template's draft and print the validation",
|
|
@@ -16266,7 +16348,7 @@ var init_push = __esm({
|
|
|
16266
16348
|
);
|
|
16267
16349
|
}
|
|
16268
16350
|
};
|
|
16269
|
-
push_default =
|
|
16351
|
+
push_default = command52;
|
|
16270
16352
|
}
|
|
16271
16353
|
});
|
|
16272
16354
|
|
|
@@ -16275,7 +16357,7 @@ var validate_exports = {};
|
|
|
16275
16357
|
__export(validate_exports, {
|
|
16276
16358
|
default: () => validate_default
|
|
16277
16359
|
});
|
|
16278
|
-
var
|
|
16360
|
+
var command53, validate_default;
|
|
16279
16361
|
var init_validate = __esm({
|
|
16280
16362
|
"src/commands/studio/validate.ts"() {
|
|
16281
16363
|
"use strict";
|
|
@@ -16284,7 +16366,7 @@ var init_validate = __esm({
|
|
|
16284
16366
|
init_columns();
|
|
16285
16367
|
init_common3();
|
|
16286
16368
|
init_read();
|
|
16287
|
-
|
|
16369
|
+
command53 = {
|
|
16288
16370
|
resource: "studio",
|
|
16289
16371
|
action: "validate",
|
|
16290
16372
|
summary: "Validate a folder's files against a template without saving them",
|
|
@@ -16313,7 +16395,7 @@ var init_validate = __esm({
|
|
|
16313
16395
|
throw validationFailed(validation, "The files have validation errors", commandLine2(ctx, "studio validate", args));
|
|
16314
16396
|
}
|
|
16315
16397
|
};
|
|
16316
|
-
validate_default =
|
|
16398
|
+
validate_default = command53;
|
|
16317
16399
|
}
|
|
16318
16400
|
});
|
|
16319
16401
|
|
|
@@ -16362,7 +16444,7 @@ function accountIds(value) {
|
|
|
16362
16444
|
}
|
|
16363
16445
|
return ids2.map(Number);
|
|
16364
16446
|
}
|
|
16365
|
-
var SHOWN,
|
|
16447
|
+
var SHOWN, command54, preview_default;
|
|
16366
16448
|
var init_preview = __esm({
|
|
16367
16449
|
"src/commands/studio/preview.ts"() {
|
|
16368
16450
|
"use strict";
|
|
@@ -16374,7 +16456,7 @@ var init_preview = __esm({
|
|
|
16374
16456
|
init_common3();
|
|
16375
16457
|
init_folder();
|
|
16376
16458
|
SHOWN = 5;
|
|
16377
|
-
|
|
16459
|
+
command54 = {
|
|
16378
16460
|
resource: "studio",
|
|
16379
16461
|
action: "preview",
|
|
16380
16462
|
summary: "Render a saved version for up to 3 accounts; for local edits, studio push them to the draft first",
|
|
@@ -16423,7 +16505,7 @@ var init_preview = __esm({
|
|
|
16423
16505
|
return ExitCode.Ok;
|
|
16424
16506
|
}
|
|
16425
16507
|
};
|
|
16426
|
-
preview_default =
|
|
16508
|
+
preview_default = command54;
|
|
16427
16509
|
}
|
|
16428
16510
|
});
|
|
16429
16511
|
|
|
@@ -16624,7 +16706,7 @@ function estimateOutput(templateId, target2, estimate2) {
|
|
|
16624
16706
|
...target2.campaignId !== void 0 ? { estimateNote: "An upper bound: it counts one page per lead, and a campaign run builds one page per company." } : {}
|
|
16625
16707
|
};
|
|
16626
16708
|
}
|
|
16627
|
-
var COMMAND6, sha2563,
|
|
16709
|
+
var COMMAND6, sha2563, command55, fill_default;
|
|
16628
16710
|
var init_fill = __esm({
|
|
16629
16711
|
"src/commands/studio/fill.ts"() {
|
|
16630
16712
|
"use strict";
|
|
@@ -16640,7 +16722,7 @@ var init_fill = __esm({
|
|
|
16640
16722
|
init_fill_runs();
|
|
16641
16723
|
COMMAND6 = "studio fill";
|
|
16642
16724
|
sha2563 = (data) => createHash9("sha256").update(data).digest("hex");
|
|
16643
|
-
|
|
16725
|
+
command55 = {
|
|
16644
16726
|
resource: "studio",
|
|
16645
16727
|
action: "fill",
|
|
16646
16728
|
summary: "Fill a template on many accounts or campaign leads (estimate first)",
|
|
@@ -16701,7 +16783,7 @@ var init_fill = __esm({
|
|
|
16701
16783
|
return outcome.exitCode;
|
|
16702
16784
|
}
|
|
16703
16785
|
};
|
|
16704
|
-
fill_default =
|
|
16786
|
+
fill_default = command55;
|
|
16705
16787
|
}
|
|
16706
16788
|
});
|
|
16707
16789
|
|
|
@@ -16808,7 +16890,7 @@ var add_exports2 = {};
|
|
|
16808
16890
|
__export(add_exports2, {
|
|
16809
16891
|
default: () => add_default2
|
|
16810
16892
|
});
|
|
16811
|
-
var NEXT,
|
|
16893
|
+
var NEXT, command56, add_default2;
|
|
16812
16894
|
var init_add2 = __esm({
|
|
16813
16895
|
"src/commands/tasks/add.ts"() {
|
|
16814
16896
|
"use strict";
|
|
@@ -16818,7 +16900,7 @@ var init_add2 = __esm({
|
|
|
16818
16900
|
init_http();
|
|
16819
16901
|
init_shared2();
|
|
16820
16902
|
NEXT = 'kenso tasks add "Send the deck" --due tomorrow --account 812';
|
|
16821
|
-
|
|
16903
|
+
command56 = {
|
|
16822
16904
|
resource: "tasks",
|
|
16823
16905
|
action: "add",
|
|
16824
16906
|
summary: "Add a task: a title, an optional due day and time, assignee and the account, person or deal it is about",
|
|
@@ -16855,7 +16937,7 @@ var init_add2 = __esm({
|
|
|
16855
16937
|
return ExitCode.Ok;
|
|
16856
16938
|
}
|
|
16857
16939
|
};
|
|
16858
|
-
add_default2 =
|
|
16940
|
+
add_default2 = command56;
|
|
16859
16941
|
}
|
|
16860
16942
|
});
|
|
16861
16943
|
|
|
@@ -16892,7 +16974,7 @@ function stoppedAt(error, id, finished, status) {
|
|
|
16892
16974
|
details: error.details
|
|
16893
16975
|
});
|
|
16894
16976
|
}
|
|
16895
|
-
var
|
|
16977
|
+
var command57, done_default;
|
|
16896
16978
|
var init_done = __esm({
|
|
16897
16979
|
"src/commands/tasks/done.ts"() {
|
|
16898
16980
|
"use strict";
|
|
@@ -16901,7 +16983,7 @@ var init_done = __esm({
|
|
|
16901
16983
|
init_exit_codes();
|
|
16902
16984
|
init_http();
|
|
16903
16985
|
init_shared2();
|
|
16904
|
-
|
|
16986
|
+
command57 = {
|
|
16905
16987
|
resource: "tasks",
|
|
16906
16988
|
action: "done",
|
|
16907
16989
|
summary: "Complete one or more tasks (--undo reopens them)",
|
|
@@ -16934,7 +17016,7 @@ var init_done = __esm({
|
|
|
16934
17016
|
return ExitCode.Ok;
|
|
16935
17017
|
}
|
|
16936
17018
|
};
|
|
16937
|
-
done_default =
|
|
17019
|
+
done_default = command57;
|
|
16938
17020
|
}
|
|
16939
17021
|
});
|
|
16940
17022
|
|
|
@@ -16943,7 +17025,7 @@ var assign_exports = {};
|
|
|
16943
17025
|
__export(assign_exports, {
|
|
16944
17026
|
default: () => assign_default
|
|
16945
17027
|
});
|
|
16946
|
-
var NEXT2,
|
|
17028
|
+
var NEXT2, command58, assign_default;
|
|
16947
17029
|
var init_assign = __esm({
|
|
16948
17030
|
"src/commands/tasks/assign.ts"() {
|
|
16949
17031
|
"use strict";
|
|
@@ -16952,7 +17034,7 @@ var init_assign = __esm({
|
|
|
16952
17034
|
init_done();
|
|
16953
17035
|
init_shared2();
|
|
16954
17036
|
NEXT2 = "kenso tasks assign <taskId> <me|memberId|email>";
|
|
16955
|
-
|
|
17037
|
+
command58 = {
|
|
16956
17038
|
resource: "tasks",
|
|
16957
17039
|
action: "assign",
|
|
16958
17040
|
summary: "Give a task to a member",
|
|
@@ -16975,7 +17057,7 @@ var init_assign = __esm({
|
|
|
16975
17057
|
return ExitCode.Ok;
|
|
16976
17058
|
}
|
|
16977
17059
|
};
|
|
16978
|
-
assign_default =
|
|
17060
|
+
assign_default = command58;
|
|
16979
17061
|
}
|
|
16980
17062
|
});
|
|
16981
17063
|
|
|
@@ -16984,14 +17066,14 @@ var queue_exports = {};
|
|
|
16984
17066
|
__export(queue_exports, {
|
|
16985
17067
|
default: () => queue_default
|
|
16986
17068
|
});
|
|
16987
|
-
var SCOPES,
|
|
17069
|
+
var SCOPES, command59, queue_default;
|
|
16988
17070
|
var init_queue = __esm({
|
|
16989
17071
|
"src/commands/tasks/queue.ts"() {
|
|
16990
17072
|
"use strict";
|
|
16991
17073
|
init_errors();
|
|
16992
17074
|
init_exit_codes();
|
|
16993
17075
|
SCOPES = ["mine", "assigned_by_me", "everyone"];
|
|
16994
|
-
|
|
17076
|
+
command59 = {
|
|
16995
17077
|
resource: "tasks",
|
|
16996
17078
|
action: "queue",
|
|
16997
17079
|
summary: "Your open work by due day: tasks, touches, call tasks, reply reminders and Ken follow-ups",
|
|
@@ -17012,7 +17094,7 @@ var init_queue = __esm({
|
|
|
17012
17094
|
return ExitCode.Ok;
|
|
17013
17095
|
}
|
|
17014
17096
|
};
|
|
17015
|
-
queue_default =
|
|
17097
|
+
queue_default = command59;
|
|
17016
17098
|
}
|
|
17017
17099
|
});
|
|
17018
17100
|
|
|
@@ -17248,7 +17330,7 @@ function readBody(req) {
|
|
|
17248
17330
|
function reply(res, status, body2) {
|
|
17249
17331
|
res.writeHead(status, { "content-type": "application/json" }).end(JSON.stringify(body2));
|
|
17250
17332
|
}
|
|
17251
|
-
var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES,
|
|
17333
|
+
var MIN_POLL_MS, MAX_POLL_MS, MAX_TRIGGER_BYTES, command60, listen_default;
|
|
17252
17334
|
var init_listen = __esm({
|
|
17253
17335
|
"src/commands/webhooks/listen.ts"() {
|
|
17254
17336
|
"use strict";
|
|
@@ -17259,7 +17341,7 @@ var init_listen = __esm({
|
|
|
17259
17341
|
MIN_POLL_MS = 1e3;
|
|
17260
17342
|
MAX_POLL_MS = 6e4;
|
|
17261
17343
|
MAX_TRIGGER_BYTES = 1e6;
|
|
17262
|
-
|
|
17344
|
+
command60 = {
|
|
17263
17345
|
resource: "webhooks",
|
|
17264
17346
|
action: "listen",
|
|
17265
17347
|
summary: "Stream the workspace's events and forward them, signed, to a local handler",
|
|
@@ -17365,7 +17447,7 @@ var init_listen = __esm({
|
|
|
17365
17447
|
return ExitCode.Ok;
|
|
17366
17448
|
}
|
|
17367
17449
|
};
|
|
17368
|
-
listen_default =
|
|
17450
|
+
listen_default = command60;
|
|
17369
17451
|
}
|
|
17370
17452
|
});
|
|
17371
17453
|
|
|
@@ -17384,7 +17466,7 @@ function notRunning() {
|
|
|
17384
17466
|
next: LISTEN_NEXT
|
|
17385
17467
|
});
|
|
17386
17468
|
}
|
|
17387
|
-
var LISTEN_NEXT,
|
|
17469
|
+
var LISTEN_NEXT, command61, trigger_default;
|
|
17388
17470
|
var init_trigger = __esm({
|
|
17389
17471
|
"src/commands/webhooks/trigger.ts"() {
|
|
17390
17472
|
"use strict";
|
|
@@ -17393,7 +17475,7 @@ var init_trigger = __esm({
|
|
|
17393
17475
|
init_http();
|
|
17394
17476
|
init_local();
|
|
17395
17477
|
LISTEN_NEXT = "kenso webhooks listen --forward-to http://localhost:3000/hook";
|
|
17396
|
-
|
|
17478
|
+
command61 = {
|
|
17397
17479
|
resource: "webhooks",
|
|
17398
17480
|
action: "trigger",
|
|
17399
17481
|
summary: "Send a sample event of one type through the running kenso webhooks listen",
|
|
@@ -17450,7 +17532,7 @@ var init_trigger = __esm({
|
|
|
17450
17532
|
return ExitCode.Ok;
|
|
17451
17533
|
}
|
|
17452
17534
|
};
|
|
17453
|
-
trigger_default =
|
|
17535
|
+
trigger_default = command61;
|
|
17454
17536
|
}
|
|
17455
17537
|
});
|
|
17456
17538
|
|
|
@@ -17471,14 +17553,14 @@ var status_exports3 = {};
|
|
|
17471
17553
|
__export(status_exports3, {
|
|
17472
17554
|
default: () => status_default3
|
|
17473
17555
|
});
|
|
17474
|
-
var
|
|
17556
|
+
var command62, status_default3;
|
|
17475
17557
|
var init_status3 = __esm({
|
|
17476
17558
|
"src/commands/work/status.ts"() {
|
|
17477
17559
|
"use strict";
|
|
17478
17560
|
init_exit_codes();
|
|
17479
17561
|
init_http();
|
|
17480
17562
|
init_common2();
|
|
17481
|
-
|
|
17563
|
+
command62 = {
|
|
17482
17564
|
resource: "work",
|
|
17483
17565
|
action: "status",
|
|
17484
17566
|
summary: "Show the Kenso AI work waiting for your own agent, per kind",
|
|
@@ -17512,7 +17594,7 @@ var init_status3 = __esm({
|
|
|
17512
17594
|
return ExitCode.Ok;
|
|
17513
17595
|
}
|
|
17514
17596
|
};
|
|
17515
|
-
status_default3 =
|
|
17597
|
+
status_default3 = command62;
|
|
17516
17598
|
}
|
|
17517
17599
|
});
|
|
17518
17600
|
|
|
@@ -17644,9 +17726,9 @@ var init_files = __esm({
|
|
|
17644
17726
|
import { execFile, spawnSync as spawnSync2 } from "node:child_process";
|
|
17645
17727
|
import { readFileSync as readFileSync12 } from "node:fs";
|
|
17646
17728
|
import { isAbsolute as isAbsolute2 } from "node:path";
|
|
17647
|
-
function sudoArgs(user,
|
|
17729
|
+
function sudoArgs(user, command70, args, keep = [], set2 = {}) {
|
|
17648
17730
|
const assignments = Object.entries(set2).map(([name, value]) => `${name}=${value}`);
|
|
17649
|
-
return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--",
|
|
17731
|
+
return ["-n", "-u", user, "-H", ...keep.length > 0 ? [`--preserve-env=${keep.join(",")}`] : [], ...assignments, "--", command70, ...args];
|
|
17650
17732
|
}
|
|
17651
17733
|
function agentKensoEnv(opts) {
|
|
17652
17734
|
return {
|
|
@@ -17656,12 +17738,12 @@ function agentKensoEnv(opts) {
|
|
|
17656
17738
|
AI_AGENT: opts.agentName
|
|
17657
17739
|
};
|
|
17658
17740
|
}
|
|
17659
|
-
function sudoExec(user,
|
|
17741
|
+
function sudoExec(user, command70, args, opts = {}) {
|
|
17660
17742
|
const [sudo = "/usr/bin/sudo", ...lead] = user.sudo;
|
|
17661
17743
|
return new Promise((resolve18) => {
|
|
17662
17744
|
execFile(
|
|
17663
17745
|
sudo,
|
|
17664
|
-
[...lead, ...sudoArgs(user.name,
|
|
17746
|
+
[...lead, ...sudoArgs(user.name, command70, args)],
|
|
17665
17747
|
{ env: { PATH: SUDO_PATH }, cwd: "/", timeout: opts.timeoutMs ?? PROBE_TIMEOUT_MS, maxBuffer: opts.maxBuffer ?? 1024 * 1024, encoding: "utf8", windowsHide: true, shell: false },
|
|
17666
17748
|
(err, stdout, stderr) => {
|
|
17667
17749
|
const code = err ? err.code : 0;
|
|
@@ -17771,9 +17853,9 @@ var init_folder2 = __esm({
|
|
|
17771
17853
|
init_redact();
|
|
17772
17854
|
init_agent_user();
|
|
17773
17855
|
WorkRunFolder = class {
|
|
17774
|
-
constructor(ctx,
|
|
17856
|
+
constructor(ctx, command70, args, outDir, shared = false) {
|
|
17775
17857
|
this.ctx = ctx;
|
|
17776
|
-
this.command =
|
|
17858
|
+
this.command = command70;
|
|
17777
17859
|
this.args = args;
|
|
17778
17860
|
this.outDir = outDir;
|
|
17779
17861
|
this.shared = shared;
|
|
@@ -17888,7 +17970,7 @@ var pull_exports2 = {};
|
|
|
17888
17970
|
__export(pull_exports2, {
|
|
17889
17971
|
default: () => pull_default2
|
|
17890
17972
|
});
|
|
17891
|
-
var MAX_FILES,
|
|
17973
|
+
var MAX_FILES, command63, pull_default2;
|
|
17892
17974
|
var init_pull2 = __esm({
|
|
17893
17975
|
"src/commands/work/pull.ts"() {
|
|
17894
17976
|
"use strict";
|
|
@@ -17897,7 +17979,7 @@ var init_pull2 = __esm({
|
|
|
17897
17979
|
init_common2();
|
|
17898
17980
|
init_folder2();
|
|
17899
17981
|
MAX_FILES = 100;
|
|
17900
|
-
|
|
17982
|
+
command63 = {
|
|
17901
17983
|
resource: "work",
|
|
17902
17984
|
action: "pull",
|
|
17903
17985
|
summary: "Claim waiting work into local work files, to answer by hand",
|
|
@@ -17975,7 +18057,7 @@ var init_pull2 = __esm({
|
|
|
17975
18057
|
return interrupted7 ? ExitCode.Interrupted : ExitCode.Ok;
|
|
17976
18058
|
}
|
|
17977
18059
|
};
|
|
17978
|
-
pull_default2 =
|
|
18060
|
+
pull_default2 = command63;
|
|
17979
18061
|
}
|
|
17980
18062
|
});
|
|
17981
18063
|
|
|
@@ -18117,7 +18199,7 @@ __export(submit_exports, {
|
|
|
18117
18199
|
default: () => submit_default
|
|
18118
18200
|
});
|
|
18119
18201
|
import { resolve as resolve16 } from "node:path";
|
|
18120
|
-
var
|
|
18202
|
+
var command64, submit_default;
|
|
18121
18203
|
var init_submit = __esm({
|
|
18122
18204
|
"src/commands/work/submit.ts"() {
|
|
18123
18205
|
"use strict";
|
|
@@ -18126,7 +18208,7 @@ var init_submit = __esm({
|
|
|
18126
18208
|
init_files();
|
|
18127
18209
|
init_answers();
|
|
18128
18210
|
init_common2();
|
|
18129
|
-
|
|
18211
|
+
command64 = {
|
|
18130
18212
|
resource: "work",
|
|
18131
18213
|
action: "submit",
|
|
18132
18214
|
summary: "Send answers files to Kenso and write each one's results",
|
|
@@ -18158,7 +18240,7 @@ var init_submit = __esm({
|
|
|
18158
18240
|
return totals.rejected > 0 ? ExitCode.Partial : ExitCode.Ok;
|
|
18159
18241
|
}
|
|
18160
18242
|
};
|
|
18161
|
-
submit_default =
|
|
18243
|
+
submit_default = command64;
|
|
18162
18244
|
}
|
|
18163
18245
|
});
|
|
18164
18246
|
|
|
@@ -18179,7 +18261,7 @@ function claimIdOf(arg) {
|
|
|
18179
18261
|
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..." });
|
|
18180
18262
|
return arg;
|
|
18181
18263
|
}
|
|
18182
|
-
var CLAIM_ID,
|
|
18264
|
+
var CLAIM_ID, command65, release_default;
|
|
18183
18265
|
var init_release = __esm({
|
|
18184
18266
|
"src/commands/work/release.ts"() {
|
|
18185
18267
|
"use strict";
|
|
@@ -18188,7 +18270,7 @@ var init_release = __esm({
|
|
|
18188
18270
|
init_files();
|
|
18189
18271
|
init_common2();
|
|
18190
18272
|
CLAIM_ID = /^[A-Za-z0-9_-]{1,64}$/;
|
|
18191
|
-
|
|
18273
|
+
command65 = {
|
|
18192
18274
|
resource: "work",
|
|
18193
18275
|
action: "release",
|
|
18194
18276
|
summary: "Give claimed work back to the queue now",
|
|
@@ -18207,7 +18289,7 @@ var init_release = __esm({
|
|
|
18207
18289
|
return ExitCode.Ok;
|
|
18208
18290
|
}
|
|
18209
18291
|
};
|
|
18210
|
-
release_default =
|
|
18292
|
+
release_default = command65;
|
|
18211
18293
|
}
|
|
18212
18294
|
});
|
|
18213
18295
|
|
|
@@ -18546,12 +18628,12 @@ function plain(text4) {
|
|
|
18546
18628
|
return text4.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "");
|
|
18547
18629
|
}
|
|
18548
18630
|
function runStatus(bin, args, env, adapter, runAs) {
|
|
18549
|
-
const
|
|
18631
|
+
const command70 = runAs ? runAs.sudo[0] ?? "/usr/bin/sudo" : bin;
|
|
18550
18632
|
const commandArgs2 = runAs ? [...runAs.sudo.slice(1), ...sudoArgs(runAs.name, bin, args)] : args;
|
|
18551
18633
|
const options = runAs ? { env: { PATH: SUDO_PATH }, cwd: "/" } : { env: childEnv(env, adapter) };
|
|
18552
18634
|
return new Promise((resolve18) => {
|
|
18553
18635
|
execFile2(
|
|
18554
|
-
|
|
18636
|
+
command70,
|
|
18555
18637
|
commandArgs2,
|
|
18556
18638
|
{ ...options, timeout: STATUS_TIMEOUT_MS, maxBuffer: 1024 * 1024, windowsHide: true, shell: false },
|
|
18557
18639
|
(err, stdout, stderr) => {
|
|
@@ -19633,7 +19715,7 @@ var run_exports3 = {};
|
|
|
19633
19715
|
__export(run_exports3, {
|
|
19634
19716
|
default: () => run_default2
|
|
19635
19717
|
});
|
|
19636
|
-
var FAILURES_IN_A_ROW,
|
|
19718
|
+
var FAILURES_IN_A_ROW, command66, run_default2;
|
|
19637
19719
|
var init_run3 = __esm({
|
|
19638
19720
|
"src/commands/work/run.ts"() {
|
|
19639
19721
|
"use strict";
|
|
@@ -19654,7 +19736,7 @@ var init_run3 = __esm({
|
|
|
19654
19736
|
init_folder2();
|
|
19655
19737
|
init_stop();
|
|
19656
19738
|
FAILURES_IN_A_ROW = 3;
|
|
19657
|
-
|
|
19739
|
+
command66 = {
|
|
19658
19740
|
resource: "work",
|
|
19659
19741
|
action: "run",
|
|
19660
19742
|
summary: "Run your own coding agent on the waiting work until the queue is empty",
|
|
@@ -19979,7 +20061,7 @@ var init_run3 = __esm({
|
|
|
19979
20061
|
return exitCodeFor(reason, totals.rejected > 0 || jobsFailed > 0);
|
|
19980
20062
|
}
|
|
19981
20063
|
};
|
|
19982
|
-
run_default2 =
|
|
20064
|
+
run_default2 = command66;
|
|
19983
20065
|
}
|
|
19984
20066
|
});
|
|
19985
20067
|
|
|
@@ -20019,7 +20101,7 @@ function rewrap(err, overrides) {
|
|
|
20019
20101
|
details: err.details
|
|
20020
20102
|
});
|
|
20021
20103
|
}
|
|
20022
|
-
var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE,
|
|
20104
|
+
var TEMPLATES, APP_NEXT_STEP, NOT_AVAILABLE, command67, keys_default;
|
|
20023
20105
|
var init_keys = __esm({
|
|
20024
20106
|
"src/commands/workspace/keys.ts"() {
|
|
20025
20107
|
"use strict";
|
|
@@ -20029,7 +20111,7 @@ var init_keys = __esm({
|
|
|
20029
20111
|
TEMPLATES = ["admin", "editor", "viewer"];
|
|
20030
20112
|
APP_NEXT_STEP = "A workspace admin can create it in the app: Settings > API keys > Workspace keys";
|
|
20031
20113
|
NOT_AVAILABLE = "Workspace keys are not available for this workspace yet.";
|
|
20032
|
-
|
|
20114
|
+
command67 = {
|
|
20033
20115
|
resource: "workspace",
|
|
20034
20116
|
action: "keys",
|
|
20035
20117
|
summary: "Create an API key the workspace owns",
|
|
@@ -20090,7 +20172,7 @@ var init_keys = __esm({
|
|
|
20090
20172
|
return ExitCode.Ok;
|
|
20091
20173
|
}
|
|
20092
20174
|
};
|
|
20093
|
-
keys_default =
|
|
20175
|
+
keys_default = command67;
|
|
20094
20176
|
}
|
|
20095
20177
|
});
|
|
20096
20178
|
|
|
@@ -20108,14 +20190,14 @@ function parseLimit(value) {
|
|
|
20108
20190
|
}
|
|
20109
20191
|
return limit;
|
|
20110
20192
|
}
|
|
20111
|
-
var MAX_LIMIT,
|
|
20193
|
+
var MAX_LIMIT, command68, list_default4;
|
|
20112
20194
|
var init_list4 = __esm({
|
|
20113
20195
|
"src/commands/workspace/list.ts"() {
|
|
20114
20196
|
"use strict";
|
|
20115
20197
|
init_errors();
|
|
20116
20198
|
init_exit_codes();
|
|
20117
20199
|
MAX_LIMIT = 200;
|
|
20118
|
-
|
|
20200
|
+
command68 = {
|
|
20119
20201
|
resource: "workspace",
|
|
20120
20202
|
action: "list",
|
|
20121
20203
|
summary: "List the workspaces your key can use",
|
|
@@ -20143,7 +20225,7 @@ var init_list4 = __esm({
|
|
|
20143
20225
|
return ExitCode.Ok;
|
|
20144
20226
|
}
|
|
20145
20227
|
};
|
|
20146
|
-
list_default4 =
|
|
20228
|
+
list_default4 = command68;
|
|
20147
20229
|
}
|
|
20148
20230
|
});
|
|
20149
20231
|
|
|
@@ -20152,7 +20234,7 @@ var use_exports = {};
|
|
|
20152
20234
|
__export(use_exports, {
|
|
20153
20235
|
default: () => use_default
|
|
20154
20236
|
});
|
|
20155
|
-
var
|
|
20237
|
+
var command69, use_default;
|
|
20156
20238
|
var init_use = __esm({
|
|
20157
20239
|
"src/commands/workspace/use.ts"() {
|
|
20158
20240
|
"use strict";
|
|
@@ -20160,7 +20242,7 @@ var init_use = __esm({
|
|
|
20160
20242
|
init_errors();
|
|
20161
20243
|
init_exit_codes();
|
|
20162
20244
|
init_http();
|
|
20163
|
-
|
|
20245
|
+
command69 = {
|
|
20164
20246
|
resource: "workspace",
|
|
20165
20247
|
action: "use",
|
|
20166
20248
|
summary: "Set the profile's default workspace",
|
|
@@ -20217,7 +20299,7 @@ var init_use = __esm({
|
|
|
20217
20299
|
return ExitCode.Ok;
|
|
20218
20300
|
}
|
|
20219
20301
|
};
|
|
20220
|
-
use_default =
|
|
20302
|
+
use_default = command69;
|
|
20221
20303
|
}
|
|
20222
20304
|
});
|
|
20223
20305
|
|
|
@@ -20795,8 +20877,8 @@ function startUpdateNotice(argv, opts = {}) {
|
|
|
20795
20877
|
if (!found) return;
|
|
20796
20878
|
writeCheck(file, { checkedAt: new Date(now).toISOString(), latest: found });
|
|
20797
20879
|
if (isNewer(found, version)) {
|
|
20798
|
-
const
|
|
20799
|
-
stderr.write(`kenso ${found} is out (you have ${version}): ${
|
|
20880
|
+
const command70 = updateCommand(install, opts.platform ?? process.platform);
|
|
20881
|
+
stderr.write(`kenso ${found} is out (you have ${version}): ${command70}
|
|
20800
20882
|
Turn this off with KENSO_NO_UPDATE_NOTIFIER=1.
|
|
20801
20883
|
`);
|
|
20802
20884
|
}
|